fix: 修复审核记录导出进度与后台等待机制

为审核记录导出增加可复用的本地后台任务及 status/wait/list,等待超时或观察进程退出后任务继续执行。
统一实时脱敏诊断输出,保留 stdout 单一 JSON;补齐高级参数、预览和筛选配置摘要。
默认保留合思未找到单据,分别统计单据与审核记录,并显式报告部分补取失败。
补充 CLI/Skill 版本诊断、技能路由及回归测试,修复企业列表加载开销和源码更新测试隔离。
This commit is contained in:
gitea committed 2026-10-27 15:59:04 +08:00
1 parent 477cc630b4
commit db5a3f7139
24 files changed
+1239 -174

No files matched your search

+24 -7
View File
@@ -491,19 +491,36 @@ export const HELP_REGISTRY: AreaHelp[] = [
},
{
name: "export",
summary: "Export approval run audit records to Excel workbook. Add --with-flow to include E人工行为 / E人工意见 columns (requires Hose Open API; adds ~30s for large batches).",
usage: ["seal-use approval-runs export [--sn <SN1,SN2>] [--start-date <YYYY-MM-DD|ms>] [--end-date <YYYY-MM-DD|ms>] [--force] [--status <status>] [--manual-status <status>] [--completed-only] [--limit <n>] [--downloads] [--with-flow] [--out <file>] [--corp <corpId>]"],
summary: "Export approval run audit records to Excel. Background tasks support status/wait; missing Hose documents are retained by default.",
usage: [
"seal-use approval-runs export [--sn <SN1,SN2>] [--start-date <YYYY-MM-DD|ms>] [--end-date <YYYY-MM-DD|ms>] [--force] [--status <status>] [--manual-status <status>] [--completed-only] [--limit <n>] [--downloads] [--with-flow] [--include-deleted|--exclude-deleted] [--include-simulation] [--task-mode <mode>] [--source-system <source>] [--flow-concurrency <n>] [--no-wait|--wait] [--timeout 10m] [--poll-interval 2s] [--dry-run] [--out <file>] [--corp <corpId>]",
"seal-use approval-runs export status <taskId> [--corp <corpId>]",
"seal-use approval-runs export wait <taskId> [--timeout 10m] [--poll-interval 2s] [--corp <corpId>]",
"seal-use approval-runs export list [--limit <n>] [--corp <corpId>]"
],
options: [
{ flag: "--sn, --sns <SNs>", description: "Target specific document SNs (comma-separated, e.g. B26002307,B26002144); fast indexed search bypassing full pagination" },
{ flag: "--with-flow", description: "Enrich export with Hose human actions and opinions in E人工行为 / E人工意见 columns (rejection 2-B, mid-flow modifications, action emojis)" },
{ flag: "--sn <SNs>", description: "Target document SNs (comma-separated); without dates, search their history" },
{ flag: "--with-flow", description: "Fetch Hose native human actions/opinions into E人工行为 / E人工意见 (default off). Additional requests scale with unique documents; large exports can take minutes" },
{ flag: "--no-flow", description: "Explicitly disable additional Hose flow requests; existing Seal human result columns remain" },
{ flag: "--include-deleted", description: "Retain and mark documents not found in Hose (default); not-found does not prove deletion" },
{ flag: "--exclude-deleted", description: "Exclude records whose native Hose flow is not found; requires --with-flow" },
{ flag: "--include-simulation", description: "Include simulation runs (default off in production, on in test enterprises)" },
{ flag: "--task-mode <mode>", description: "Filter assisted, automatic or simulation; simulation explicitly includes test runs" },
{ flag: "--source-system <source>", description: "Filter source system; Hose exports retain Hose business sources" },
{ flag: "--flow-concurrency <n>", description: "Native Hose flow request concurrency, integer 1..5 (default 3)" },
{ flag: "--start-date <date>", description: "Filter records by start date (YYYY-MM-DD or ms timestamp)" },
{ flag: "--end-date <date>", description: "Filter records by end date (YYYY-MM-DD or ms timestamp)" },
{ flag: "--force", description: "Force export when time range exceeds 180 days" },
{ flag: "--status <status>", description: "Filter by system status (e.g. completed, processing)" },
{ flag: "--manual-status <status>", description: "Filter by manual approval status (e.g. APPROVED, TERMINATED)" },
{ flag: "--completed-only", description: "Only export completed approval runs" },
{ flag: "--limit <n>", description: "Maximum number of records to export" },
{ flag: "--downloads", description: "Save exported workbook directly to user's ~/Downloads directory" },
{ flag: "--completed-only", description: "Only completed AI runs; does not require human approval to have finished (default no status restriction)" },
{ flag: "--limit <n>", description: "Maximum selected approval runs, integer 1..100000 (default 100000 safety cap)" },
{ flag: "--downloads", description: "Save workbook in ~/Downloads (default when --out is omitted)" },
{ flag: "--no-wait", description: "Immediately return a local task ticket; worker continues independently. Matching in-flight tasks are reused" },
{ flag: "--wait", description: "Wait with a time limit (default 10m); without waiting flags the existing blocking behavior is retained" },
{ flag: "--timeout <duration>", description: "Bound waiting; timeout returns completed:false/timedOut:true and does not stop the worker" },
{ flag: "--poll-interval <duration>", description: "Local status polling interval (default 2s)" },
{ flag: "--dry-run", description: "Preview effective export options without network requests, task creation or output files" },
{ flag: "--out <file>", description: "Custom output file path" }
]
},