weaver-work-cli 0.1.67 → 0.1.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/chunks/{archive-WUZKAEZ6.js → archive-SJTC5265.js} +12 -8
  2. package/dist/chunks/{asset-ZPC5VWZM.js → asset-XM3Y4FVU.js} +12 -7
  3. package/dist/chunks/{attachment-content-7SDA6WER.js → attachment-content-IXIBOET6.js} +3 -3
  4. package/dist/chunks/{chunk-JU5OPHSY.js → chunk-3NJQTG6X.js} +36 -27
  5. package/dist/chunks/{chunk-IN6NXQ26.js → chunk-3Q5F4C5B.js} +47 -27
  6. package/dist/chunks/{chunk-DTJZOAO6.js → chunk-6OK4LW76.js} +7 -7
  7. package/dist/chunks/{chunk-5QYE52LG.js → chunk-7M5OYRK2.js} +18 -9
  8. package/dist/chunks/{chunk-6ZOSVKMT.js → chunk-BJNSTCJK.js} +1 -1
  9. package/dist/chunks/{chunk-RU7ZZQQQ.js → chunk-C5IIIT4D.js} +4 -4
  10. package/dist/chunks/{chunk-G7PQWD4L.js → chunk-DVFA3ODS.js} +38 -10
  11. package/dist/chunks/{chunk-ATEXBEPD.js → chunk-LCM5SSGJ.js} +4 -1
  12. package/dist/chunks/{chunk-KS6LXSCA.js → chunk-LXXR2RRE.js} +73 -69
  13. package/dist/chunks/{chunk-MRYKV5HN.js → chunk-O7KPHPXQ.js} +35 -35
  14. package/dist/chunks/{chunk-LNWFHNVK.js → chunk-OKUJY5YB.js} +318 -37
  15. package/dist/chunks/{chunk-C4YQJFZV.js → chunk-PAWXVT6H.js} +22 -11
  16. package/dist/chunks/{chunk-TXXO4TJT.js → chunk-QHKY4WZA.js} +2 -2
  17. package/dist/chunks/{chunk-33ANTJWB.js → chunk-QO6JYDIW.js} +3 -3
  18. package/dist/chunks/{chunk-R6GGDZ2C.js → chunk-X7ZTM4XG.js} +1 -1
  19. package/dist/chunks/{chunk-XARLZK6C.js → chunk-Y7RGBRLG.js} +3 -3
  20. package/dist/chunks/{chunk-4PYLZORW.js → chunk-YSEHTSHS.js} +8 -8
  21. package/dist/chunks/{conflict-DYCSX7CN.js → conflict-CEXRX2KP.js} +2 -2
  22. package/dist/chunks/{contract-N5WNHKHI.js → contract-PM3EUPZC.js} +38 -20
  23. package/dist/chunks/{create-flow-PABAGCK2.js → create-flow-DG6D7U2L.js} +6 -6
  24. package/dist/chunks/{data-QKWI5325.js → data-3G4GQS5P.js} +13 -1
  25. package/dist/chunks/{ebuilder-form-ZONRROK4.js → ebuilder-form-5ENYH7IF.js} +1 -1
  26. package/dist/chunks/{employee-PGMY6NI6.js → employee-QX57HEWS.js} +1 -1
  27. package/dist/chunks/{entry-mode-C2WPJQJM.js → entry-mode-KMP66KHE.js} +3 -3
  28. package/dist/chunks/{env-SEEXUXZF.js → env-SW6CTETI.js} +2 -2
  29. package/dist/chunks/{factory-WNLDOLJZ.js → factory-ETQAICPA.js} +1 -1
  30. package/dist/chunks/{group-chat-DOS4XWUN.js → group-chat-GTYMCBYS.js} +3 -3
  31. package/dist/chunks/{hrm-XKL27NX2.js → hrm-5WSMSKPX.js} +3 -3
  32. package/dist/chunks/{im-NDYIMASG.js → im-P7GNBRG6.js} +1 -1
  33. package/dist/chunks/{invoice-SMODTN2D.js → invoice-2QCVNXBG.js} +2 -1
  34. package/dist/chunks/{jiuchuanhui-3T5X7SB7.js → jiuchuanhui-FHGFYAHU.js} +4 -1
  35. package/dist/chunks/{meeting-2IWXP5IL.js → meeting-3PTTPUSG.js} +11 -11
  36. package/dist/chunks/{minute-doc-N4OR5OLP.js → minute-doc-3IMRJDJV.js} +2 -2
  37. package/dist/chunks/{okr-VZXRQGS4.js → okr-OIWJRYWY.js} +7 -1
  38. package/dist/chunks/{operations-62N6EP3C.js → operations-LQY3FTPH.js} +1 -1
  39. package/dist/chunks/{org-NFE7X7FK.js → org-MWWIFNAO.js} +1 -1
  40. package/dist/chunks/{reception-3FT2F66K.js → reception-2VSWJQ5N.js} +4 -2
  41. package/dist/chunks/{recruit-stage-WPGB5BDJ.js → recruit-stage-KHJYQE3I.js} +4 -1
  42. package/dist/chunks/{registry-JMNOXRST.js → registry-4S3RXXWS.js} +3 -3
  43. package/dist/chunks/{registry-E5RQJVWN.js → registry-AC33ZZVH.js} +1 -1
  44. package/dist/chunks/{registry-ABKBGGGK.js → registry-FXBOGH2X.js} +1 -1
  45. package/dist/chunks/{registry-XOUVCSV4.js → registry-PHPYTXS4.js} +11 -11
  46. package/dist/chunks/{room-recommend-TWIEVY44.js → room-recommend-BKCPAXQG.js} +4 -4
  47. package/dist/chunks/{schedule-XZ4UUX4E.js → schedule-Q3MPSZV6.js} +4 -4
  48. package/dist/chunks/{smart-extract-DEBLJPCQ.js → smart-extract-TYYKC244.js} +28 -17
  49. package/dist/chunks/{workflow-D7LBN5MZ.js → workflow-GEDHALMY.js} +1 -1
  50. package/dist/index.js +15 -15
  51. package/dist/shortcuts/archive/operations/archive-info.js +9 -5
  52. package/dist/shortcuts/asset/manifest.js +8 -3
  53. package/dist/shortcuts/contract/manifest.js +38 -20
  54. package/dist/shortcuts/data/manifest.js +13 -1
  55. package/dist/shortcuts/ebuilder-form/manifest.js +38 -10
  56. package/dist/shortcuts/hrm/operations/employee.js +22 -11
  57. package/dist/shortcuts/hrm/operations/org.js +18 -9
  58. package/dist/shortcuts/hrm/operations/position.js +24 -12
  59. package/dist/shortcuts/hrm/operations/resolve.js +18 -10
  60. package/dist/shortcuts/im/operations/group-read.js +4 -1
  61. package/dist/shortcuts/invoice/manifest.js +1 -0
  62. package/dist/shortcuts/jiuchuanhui/manifest.js +4 -1
  63. package/dist/shortcuts/meeting/operations/attachment-content.js +25 -16
  64. package/dist/shortcuts/meeting/operations/eb/member-expand.js +1 -0
  65. package/dist/shortcuts/meeting/operations/invitation.js +1 -1
  66. package/dist/shortcuts/meeting/operations/link.js +20 -17
  67. package/dist/shortcuts/okr/operations/read.js +7 -1
  68. package/dist/shortcuts/reception/manifest.js +2 -0
  69. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +4 -1
  70. package/dist/shortcuts/smart-extract/operations/structure.js +13 -10
  71. package/dist/shortcuts/smart-extract/operations/target.js +15 -7
  72. package/dist/shortcuts/workflow/operations/aiDeepRead/collect.js +26 -2
  73. package/dist/shortcuts/workflow/operations/aiDeepRead/render.js +23 -4
  74. package/dist/shortcuts/workflow/operations/deepRead.js +295 -4
  75. package/dist/shortcuts/workflow/operations/read.js +32 -20
  76. package/package.json +1 -1
  77. package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
  78. package/skills/weaver-e10-workflow/SKILL.md +10 -10
  79. package/skills/weaver-e10-workflow/aiDeepRead/templates//346/261/207/346/200/273/345/256/241/346/211/271-demo.html +92 -12
  80. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +6 -4
  81. package/skills/weaver-e10-workflow/references/workflow-deep-read.md +44 -8
  82. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +84 -12
  83. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
@@ -1136,6 +1136,7 @@ export const invoiceOperations = [
1136
1136
  description: '合同审批流程 requestId 列表;与 cards 二选一',
1137
1137
  },
1138
1138
  },
1139
+ anyOf: [{ required: ['cards'] }, { required: ['requestIds'] }],
1139
1140
  },
1140
1141
  outputSchema: issuingContractsOutputSchema,
1141
1142
  },
@@ -81,7 +81,10 @@ export const jiuchuanhuiOperations = [
81
81
  inputSchema: {
82
82
  type: 'object',
83
83
  additionalProperties: false,
84
- properties: { tag: { type: 'string', default: 'jch-crm-project' } },
84
+ properties: {
85
+ tag: { type: 'string', description: '应用标签;必填,常用 jch-crm-project(不会自动注入默认值)' },
86
+ },
87
+ required: ['tag'],
85
88
  },
86
89
  },
87
90
  {
@@ -269,10 +269,13 @@ const attachmentList = {
269
269
  summary: '查询会议/议题的附件清单(返回 fileId):会议附件 mt_accessorys、项目文件 project_files、议题资料 related_materials;直接读 EB 详情原始值,不经摘要层',
270
270
  capability: 'attachment',
271
271
  risk: 'read',
272
- inputSchema: schemaOf({
273
- mtId: { ...SCHEMA_ID, description: '会议 id(查会议附件时必填,与 topicId 二选一)' },
274
- topicId: { ...SCHEMA_ID, description: '议题 id(查议题资料时用)' },
275
- }, { required: [] }),
272
+ inputSchema: {
273
+ ...schemaOf({
274
+ mtId: { ...SCHEMA_ID, description: '会议 id(查会议附件时必填,与 topicId 二选一)' },
275
+ topicId: { ...SCHEMA_ID, description: '议题 id(查议题资料时用)' },
276
+ }, { required: [] }),
277
+ anyOf: [{ required: ['mtId'] }, { required: ['topicId'] }],
278
+ },
276
279
  handler: async (args, env) => {
277
280
  const mtId = String(args.mtId ?? '').trim();
278
281
  const topicId = String(args.topicId ?? '').trim();
@@ -306,12 +309,15 @@ const attachmentDownload = {
306
309
  summary: '按 fileId 下载附件到本地(默认 ~/.weaver-work-cli/meeting/attachments/);也可传 mtId 一次下载该会议全部附件',
307
310
  capability: 'attachment',
308
311
  risk: 'read',
309
- inputSchema: schemaOf({
310
- fileId: { ...SCHEMA_ID, description: '文件 id(与 mtId 二选一)' },
311
- mtId: { ...SCHEMA_ID, description: '会议 id:一次下载该会议全部附件与项目文件' },
312
- outDir: { type: 'string', description: '落地目录(默认 <state>/meeting/attachments)' },
313
- fileName: { type: 'string', description: '指定文件名(仅单文件时生效)' },
314
- }, { required: [] }),
312
+ inputSchema: {
313
+ ...schemaOf({
314
+ fileId: { ...SCHEMA_ID, description: '文件 id(与 mtId 二选一)' },
315
+ mtId: { ...SCHEMA_ID, description: '会议 id:一次下载该会议全部附件与项目文件' },
316
+ outDir: { type: 'string', description: '落地目录(默认 <state>/meeting/attachments)' },
317
+ fileName: { type: 'string', description: '指定文件名(仅单文件时生效)' },
318
+ }, { required: [] }),
319
+ anyOf: [{ required: ['fileId'] }, { required: ['mtId'] }],
320
+ },
315
321
  handler: async (args, env) => {
316
322
  const fileId = String(args.fileId ?? '').trim();
317
323
  const mtId = String(args.mtId ?? '').trim();
@@ -353,12 +359,15 @@ const attachmentExtract = {
353
359
  summary: '下载附件并抽取纯文本(txt/md/csv/json/docx/xlsx/pptx),返回正文与 txt 落地路径;pdf/图片等不支持格式会明确标注,不编造内容',
354
360
  capability: 'attachment',
355
361
  risk: 'read',
356
- inputSchema: schemaOf({
357
- fileId: { ...SCHEMA_ID, description: '文件 id(与 mtId 二选一)' },
358
- mtId: { ...SCHEMA_ID, description: '会议 id:抽取该会议全部附件(最多 10 个)' },
359
- maxChars: { type: 'number', description: '每个文件返回正文的最大字符数(默认 4000,最多 20000)' },
360
- outDir: { type: 'string', description: '落地目录(默认 <state>/meeting/attachments)' },
361
- }, { required: [] }),
362
+ inputSchema: {
363
+ ...schemaOf({
364
+ fileId: { ...SCHEMA_ID, description: '文件 id(与 mtId 二选一)' },
365
+ mtId: { ...SCHEMA_ID, description: '会议 id:抽取该会议全部附件(最多 10 个)' },
366
+ maxChars: { type: 'number', description: '每个文件返回正文的最大字符数(默认 4000,最多 20000)' },
367
+ outDir: { type: 'string', description: '落地目录(默认 <state>/meeting/attachments)' },
368
+ }, { required: [] }),
369
+ anyOf: [{ required: ['fileId'] }, { required: ['mtId'] }],
370
+ },
362
371
  handler: async (args, env) => {
363
372
  const fileId = String(args.fileId ?? '').trim();
364
373
  const mtId = String(args.mtId ?? '').trim();
@@ -98,6 +98,7 @@ const meetingMemberExpand = {
98
98
  refresh: { type: 'boolean', description: '忽略缓存重新查(默认 false)' },
99
99
  maxDepartments: { type: 'number', description: `分部展开时最多取几个部门,默认 ${MAX_DEPARTMENTS}` },
100
100
  },
101
+ anyOf: [{ required: ['keyword'] }, { required: ['keywords'] }],
101
102
  },
102
103
  handler: async (args, env) => {
103
104
  const tokens = [
@@ -489,7 +489,7 @@ const meetingInvitationRender = {
489
489
  description: '输出文件完整路径(可选)。缺省写到 ~/.weaver-work-cli/meeting/invitations/邀请函-{会议名}-{日期}.docx',
490
490
  },
491
491
  },
492
- required: [],
492
+ anyOf: [{ required: ['mtId'] }, { required: ['mt_name', 'begin_datetime'] }],
493
493
  },
494
494
  handler: async (args, env) => {
495
495
  const mtId = String(args.mtId ?? '').trim();
@@ -18,23 +18,26 @@ const meetingLink = {
18
18
  summary: '生成对象详情页链接:EB 版 /sp/ebdfpage/card/0/{objid}/{dataid}(按 tag 解析 objid 并缓存);标准版会议 /sp/meeting/meetingSingle?meetingId=(会议室/会议类型无单页,不附链接)',
19
19
  capability: 'link',
20
20
  risk: 'read',
21
- inputSchema: schemaOf({
22
- dataId: { ...SCHEMA_ID, description: '对象 id:标准版=会议 id;EB 版=表单数据 id(单条查询用)' },
23
- dataIds: { ...SCHEMA_ID_LIST, description: '批量:一次为多条数据生成链接(列表输出用)' },
24
- type: {
25
- type: 'string',
26
- enum: [...EB_TYPES],
27
- description: '对象类别(默认 meeting)。映射 EB 表 tag,详见 references/meeting-eb.md 的链接章节',
28
- },
29
- tag: { type: 'string', description: '直接指定 EB 表 tag(如 uf_mt_detail),与 type 二选一,优先于 type' },
30
- mode: {
31
- type: 'string',
32
- enum: ['auto', 'eb', 'standard'],
33
- description: 'auto(默认)=按当前环境模式自动判定;也可显式指定',
34
- },
35
- name: { type: 'string', description: '链接显示名;传入后同时返回 markdown 内联链接' },
36
- refresh: { type: 'boolean', description: 'true=强制重新解析 EB objid(忽略缓存)' },
37
- }, { required: [] }),
21
+ inputSchema: {
22
+ ...schemaOf({
23
+ dataId: { ...SCHEMA_ID, description: '对象 id:标准版=会议 id;EB 版=表单数据 id(单条查询用)' },
24
+ dataIds: { ...SCHEMA_ID_LIST, description: '批量:一次为多条数据生成链接(列表输出用)' },
25
+ type: {
26
+ type: 'string',
27
+ enum: [...EB_TYPES],
28
+ description: '对象类别(默认 meeting)。映射 EB 表 tag,详见 references/meeting-eb.md 的链接章节',
29
+ },
30
+ tag: { type: 'string', description: '直接指定 EB 表 tag(如 uf_mt_detail),与 type 二选一,优先于 type' },
31
+ mode: {
32
+ type: 'string',
33
+ enum: ['auto', 'eb', 'standard'],
34
+ description: 'auto(默认)=按当前环境模式自动判定;也可显式指定',
35
+ },
36
+ name: { type: 'string', description: '链接显示名;传入后同时返回 markdown 内联链接' },
37
+ refresh: { type: 'boolean', description: 'true=强制重新解析 EB objid(忽略缓存)' },
38
+ }, { required: [] }),
39
+ anyOf: [{ required: ['dataId'] }, { required: ['dataIds'] }],
40
+ },
38
41
  handler: async (args, { host, ctx }) => {
39
42
  const single = args.dataId !== undefined && args.dataId !== null && String(args.dataId).trim() !== '';
40
43
  const batch = Array.isArray(args.dataIds)
@@ -150,7 +150,13 @@ const okrList = {
150
150
  match: { type: 'string', enum: ['and', 'or'], default: 'and', description: '多条件关系(仅标准版链路)' },
151
151
  page_no: { type: 'integer', minimum: 1, default: 1 },
152
152
  page_size: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
153
- }, { description: 'self 模式必填 period_type + period_range;all 模式按需传 name / principalid / status' }),
153
+ }, {
154
+ anyOf: [
155
+ { required: ['query_scope'], properties: { query_scope: { const: 'all' } } },
156
+ { required: ['period_type', 'period_range'] },
157
+ ],
158
+ description: 'self 模式必填 period_type + period_range;all 模式需显式传 query_scope=all,按需传 name / principalid / status',
159
+ }),
154
160
  handler: async (args, { host }) => {
155
161
  const { pageNo, pageSize } = pageOf(args);
156
162
  const queryScope = resolveQueryScope(args);
@@ -68,6 +68,7 @@ export const receptionOperations = [
68
68
  snapshot: { type: 'string', description: '字段快照路径;同时用于推导技能包内 render.py 位置' },
69
69
  renderPy: { type: 'string', description: '显式指定 render.py 路径' },
70
70
  },
71
+ anyOf: [{ required: ['runId'] }, { required: ['known'] }],
71
72
  },
72
73
  outputSchema: {
73
74
  type: 'object',
@@ -153,6 +154,7 @@ export const receptionOperations = [
153
154
  description: '填单页打开形态:drawer 为右侧抽屉(默认)',
154
155
  },
155
156
  },
157
+ anyOf: [{ required: ['runId'] }, { required: ['known'] }],
156
158
  },
157
159
  outputSchema: {
158
160
  type: 'object',
@@ -1033,7 +1033,10 @@ export const interviewArrangeOperations = [
1033
1033
  summary: '预填模式(人工保存):输出人才卡片 URL + 面试管理列表 URL + 选面试方式的 jsExpr,触发表单联动后由 HR 核对保存,不落库',
1034
1034
  capability: 'recruit.interview.arrange',
1035
1035
  risk: 'read',
1036
- inputSchema: schemaOf(baseInput, {}),
1036
+ inputSchema: {
1037
+ ...schemaOf(baseInput, {}),
1038
+ anyOf: [{ required: ['talentId'] }, { required: ['mobile'] }, { required: ['name'] }],
1039
+ },
1037
1040
  handler: prefill,
1038
1041
  },
1039
1042
  {
@@ -323,16 +323,19 @@ const formStructure = {
323
323
  name: 'smart-extract.form.structure',
324
324
  risk: 'read',
325
325
  summary: '取表单结构并归一化:传 workflowId(+nodeId,缺省自动取发起节点) 走流程节点字段,传 formId 走 EB 表单。输出 mainFieldsStr/subFieldsStr 压缩串,可直接进提示词。',
326
- inputSchema: schemaOf({
327
- workflowId: { ...SCHEMA_ID, description: '流程模板 ID(wf)' },
328
- nodeId: { ...SCHEMA_ID, description: '流程节点 ID;不传时自动取发起节点' },
329
- formId: { ...SCHEMA_ID, description: 'EB 表单 ID(与 workflowId 二选一)' },
330
- targetFieldIdList: {
331
- type: 'array',
332
- items: { type: 'string' },
333
- description: '只输出这些字段 ID(可选)',
334
- },
335
- }),
326
+ inputSchema: {
327
+ ...schemaOf({
328
+ workflowId: { ...SCHEMA_ID, description: '流程模板 ID(wf)' },
329
+ nodeId: { ...SCHEMA_ID, description: '流程节点 ID;不传时自动取发起节点' },
330
+ formId: { ...SCHEMA_ID, description: 'EB 表单 ID(与 workflowId 二选一)' },
331
+ targetFieldIdList: {
332
+ type: 'array',
333
+ items: { type: 'string' },
334
+ description: '只输出这些字段 ID(可选)',
335
+ },
336
+ }),
337
+ anyOf: [{ required: ['workflowId'] }, { required: ['formId'] }],
338
+ },
336
339
  handler: async (args, env) => {
337
340
  const workflowId = optionalId(args.workflowId, 'workflowId');
338
341
  const formId = optionalId(args.formId, 'formId');
@@ -16,13 +16,21 @@ const targetResolve = {
16
16
  name: 'smart-extract.target.resolve',
17
17
  risk: 'read',
18
18
  summary: '把目标收敛成 ID:workflowId/formId/objId 直接回显校验;给 workflowKeyword 时列出当前用户可发起的流程并做名称匹配。返回 modeType 与命中项。',
19
- inputSchema: schemaOf({
20
- workflowId: { ...SCHEMA_ID, description: '流程模板 ID' },
21
- formId: { ...SCHEMA_ID, description: 'EB 表单 ID' },
22
- objId: { ...SCHEMA_ID, description: 'EB 建模对象 ID(会自动转换成 formId)' },
23
- workflowKeyword: { type: 'string', description: '流程名称关键字(只在可发起流程里做包含匹配)' },
24
- limit: { type: 'integer', description: '关键字匹配返回条数上限,默认 10' },
25
- }),
19
+ inputSchema: {
20
+ ...schemaOf({
21
+ workflowId: { ...SCHEMA_ID, description: '流程模板 ID' },
22
+ formId: { ...SCHEMA_ID, description: 'EB 表单 ID' },
23
+ objId: { ...SCHEMA_ID, description: 'EB 建模对象 ID(会自动转换成 formId)' },
24
+ workflowKeyword: { type: 'string', description: '流程名称关键字(只在可发起流程里做包含匹配)' },
25
+ limit: { type: 'integer', description: '关键字匹配返回条数上限,默认 10' },
26
+ }),
27
+ anyOf: [
28
+ { required: ['workflowId'] },
29
+ { required: ['formId'] },
30
+ { required: ['objId'] },
31
+ { required: ['workflowKeyword'] },
32
+ ],
33
+ },
26
34
  handler: async (args, env) => {
27
35
  const workflowId = optionalId(args.workflowId, 'workflowId');
28
36
  const formId = optionalId(args.formId, 'formId');
@@ -1378,7 +1378,7 @@ export function writeCollectCache(payload, batchSize) {
1378
1378
  * 只取原始数据,不做任何详读加工。
1379
1379
  */
1380
1380
  export async function collectDeepReadRawData(args, env, effective) {
1381
- const { mode, requestId, workflowId, workflowName, workflowIds, fetchWorkflowNames, fetch, count, requestLog, batchSize, group, dataDimension, originData, defaultPrompt } = effective;
1381
+ const { mode, requestId, workflowId, workflowName, workflowIds, fetchWorkflowNames, fetch, count, requestLog, batchSize, group, dataDimension, originData, defaultPrompt, receiveTime, search } = effective;
1382
1382
  const warnings = [];
1383
1383
  // 端点:当前 config.fetch.scope 只支持 todo(待办),其余值明确报错而不是静默换端点。
1384
1384
  const scope = String(fetch.scope ?? 'todo');
@@ -1452,6 +1452,12 @@ export async function collectDeepReadRawData(args, env, effective) {
1452
1452
  else if (replayQueryBase) {
1453
1453
  warnings.push(`列表取数走 originData 回放(${originData.id}):请求报文基础部分取自文件 listQuery,仅 customDisplayPage 按 CLI 翻页逻辑改写;params.workflowids 按 config.fetch.workflowIds 补充注入(2026-11-24 用户定稿)。`);
1454
1454
  }
1455
+ if (receiveTime && !originData) {
1456
+ warnings.push(`接收时间窗口已生效(receiveTime=${receiveTime},2026-11-25 用户定稿):复用 workflow.search 条件解析注入 formDatas.receivedatetime,取数范围 = 窗口内按排序取前 N 条。`);
1457
+ }
1458
+ if (search && !originData) {
1459
+ warnings.push(`search 附加条件已生效(${Object.keys(search).join('、')},2026-11-25 用户定稿):复用 workflow.search 条件解析(条件参数同名同契约),取数范围 = 命中全部条件的行按排序取前 N 条。`);
1460
+ }
1455
1461
  for (let pageNo = 1; rawRows.length < requestedCount; pageNo += 1) {
1456
1462
  let response;
1457
1463
  if (replaySummaryPages) {
@@ -1480,12 +1486,27 @@ export async function collectDeepReadRawData(args, env, effective) {
1480
1486
  query.customDisplayPage = { current: pageNo, size: pageSize };
1481
1487
  }
1482
1488
  else {
1483
- const { query: builtQuery } = await buildSearchQuery(env, {
1489
+ // 接收时间窗口 + search 附加条件(2026-11-25 用户定稿):复用 workflow.search 的条件
1490
+ // 解析能力——receiveTime 透传(applyTimeCondition → formDatas.receivedatetime),search
1491
+ // 附加条件键名与 workflow.search 同名原样透传(发起人/部门/分部/未操作者/来源/工作流类型/
1492
+ // 标题/编号/工号/紧急程度/节点/流程状态/创建与完成时间/filterFields/exRequestId 等)。
1493
+ // 「前 N 条」与条件取交集 = 命中条件的行按排序取前 N 条,翻页补足逻辑不变。
1494
+ // 回放模式不透传(范围由文件圈定)。filterFields 需要单工作流解析(buildSearchQuery 契约
1495
+ // field_require_workflow):byWorkflow 模式把顶层 workflowName 传入 workflow 参数供其解析,
1496
+ // 解析结果与 params.workflowId 字面键同源一致。
1497
+ const searchArgs = search ?? {};
1498
+ const needsWorkflowForFields = mode === 'byWorkflow'
1499
+ && searchArgs.filterFields !== undefined && searchArgs.filterFields !== null;
1500
+ const { query: builtQuery, warnings: searchWarnings } = await buildSearchQuery(env, {
1484
1501
  category: scope,
1485
1502
  sort: sortText,
1486
1503
  current: pageNo,
1487
1504
  pageSize,
1505
+ ...(receiveTime ? { receiveTime } : {}),
1506
+ ...(needsWorkflowForFields ? { workflow: String(workflowName) } : {}),
1507
+ ...searchArgs,
1488
1508
  }, 'list');
1509
+ warnings.push(...(searchWarnings ?? []));
1489
1510
  query = builtQuery;
1490
1511
  // 字面键(2026-11-18 用户定稿):放 params 层,与 tabid/dimension 等基础参数平级。
1491
1512
  // ID 一律字符串透传:E10 的 requestId/workflowId 是 19 位长整数(超出 JS Number 安全范围),
@@ -1660,6 +1681,7 @@ export async function collectDeepReadRawData(args, env, effective) {
1660
1681
  workflowName,
1661
1682
  ...(mode === 'byTodo' ? { workflowIds: [...workflowIds] } : {}),
1662
1683
  ...(originData ? { originDataId: originData.id } : {}),
1684
+ ...(receiveTime && !originData ? { receiveTime } : {}),
1663
1685
  },
1664
1686
  sort: sortText,
1665
1687
  requestedCount,
@@ -1685,6 +1707,8 @@ export async function collectDeepReadRawData(args, env, effective) {
1685
1707
  workflowName,
1686
1708
  ...(mode === 'byTodo' ? { workflowIds: [...workflowIds] } : {}),
1687
1709
  ...(originData ? { originDataId: originData.id } : {}),
1710
+ ...(receiveTime && !originData ? { receiveTime } : {}),
1711
+ ...(search && !originData ? { searchKeys: Object.keys(search) } : {}),
1688
1712
  },
1689
1713
  ...(originData ? { originData: { id: originData.id, kind: originData.kind, file: originData.file } } : {}),
1690
1714
  rows,
@@ -133,7 +133,8 @@ function buildCardHtml(card, con, buckets, logLine, hasFilterBar) {
133
133
  ? ` data-buckets='${escapeHtml(JSON.stringify(buckets))}'`
134
134
  : '';
135
135
  const miss = (s) => (s && String(s).trim() !== '' ? escapeHtml(String(s).trim()) : '(该条未详读,结论缺失)');
136
- return ` <div class="card" data-requestid="${escapeHtml(card.requestId)}"${bucketsAttr} onclick="toggleCard(this)">
136
+ const userMasterIdAttr = card.userMasterId ? ` data-usermasterid="${escapeHtml(card.userMasterId)}"` : '';
137
+ return ` <div class="card" data-requestid="${escapeHtml(card.requestId)}"${userMasterIdAttr}${bucketsAttr} onclick="toggleCard(this)">
137
138
  <div class="card-title"><span class="card-check"></span>${miss(card.title)}${badgeMark}${badgeWarn}</div>
138
139
  <div class="meta-grid">
139
140
  ${metaHtml}
@@ -275,9 +276,11 @@ export function cleanupTempArtifacts(cacheFile) {
275
276
  }
276
277
  return removed;
277
278
  }
278
- /** 汇总审批版渲染:替换 sub / 筛选条注释块 / 卡片列表。 */
279
+ /** 汇总审批版渲染:替换 sub / 筛选条注释块 / 卡片列表 / 登录人 userId 占位符。 */
279
280
  export function renderSummaryHtml(templateHtml, opts) {
280
281
  let html = templateHtml;
282
+ // 0) 登录人 userId 占位符(提交按钮 operateUserIds 数据源)
283
+ html = html.replace(/__OPERATOR_USER_ID__/g, escapeHtml(opts.operatorUserId ?? ''));
281
284
  // 1) title 与 sub
282
285
  html = html.replace(/<title>[\s\S]*?<\/title>/, `<title>汇总审批</title>`);
283
286
  html = html.replace(/<div class="sub">[\s\S]*?<\/div>/, `<div class="sub">${escapeHtml(opts.subtitle)}</div>`);
@@ -389,7 +392,7 @@ export function workflowDeepReadRenderOperations() {
389
392
  description: '输出 HTML 绝对路径(可选;默认写到主缓存同目录 aiDeepRead-render-<时间戳>.html)。',
390
393
  },
391
394
  }, { required: ['cacheFile'] }),
392
- handler: async (args, _env) => {
395
+ handler: async (args, env) => {
393
396
  const started = Date.now();
394
397
  const cacheFile = asString(args.cacheFile)?.trim();
395
398
  if (!cacheFile) {
@@ -416,6 +419,18 @@ export function workflowDeepReadRenderOperations() {
416
419
  }
417
420
  const grouping = cache.grouping ?? { matched: false, fields: [] };
418
421
  const warnings = [];
422
+ // 当前登录人 userId(2026-11-25 用户八次定稿:提交按钮 operateUserIds 用登录人 id
423
+ // 按 requestIds 条数重复拼接——渲染时注入模板 __OPERATOR_USER_ID__ 占位符;
424
+ // 会话缺失/查询失败不阻断渲染,注入空串 + warning 透出)。
425
+ let operatorUserId = '';
426
+ try {
427
+ const session = await env.host.getSession();
428
+ operatorUserId = String(session?.userId ?? '').trim();
429
+ }
430
+ catch { /* 保持空串,warning 透出 */ }
431
+ if (!operatorUserId) {
432
+ warnings.push('当前会话未提供登录人 userId:HTML 提交按钮的 operateUserIds 将为空段位(提交可能被服务端拒绝)');
433
+ }
419
434
  const conclusions = Array.isArray(args.conclusions) ? args.conclusions : [];
420
435
  const conByRid = new Map();
421
436
  for (const c of conclusions) {
@@ -440,8 +455,12 @@ export function workflowDeepReadRenderOperations() {
440
455
  const hasFilterBar = fieldsState.some((f) => f.buckets.some((b) => (f.counts[b] ?? 0) > 0));
441
456
  const cardSourceOf = (row) => {
442
457
  const bi = detailById.get(String(row.requestId))?.basicInfo ?? {};
458
+ // 行键大小写混杂(与 collect.displayFieldOf 同因):userMasterId 忽略大小写兜底查找
459
+ const userMasterIdRaw = row.userMasterId
460
+ ?? Object.entries(row).find(([k]) => k.toLowerCase() === 'usermasterid')?.[1];
443
461
  return {
444
462
  requestId: String(row.requestId),
463
+ userMasterId: String(userMasterIdRaw ?? '').trim() || undefined,
445
464
  title: String(bi.requestTitle ?? row.requestNameTitle ?? '').trim() || String(row.requestId),
446
465
  requestMark: String(bi.requestMark ?? '').trim() || undefined,
447
466
  creatorName: String(bi.creatorName ?? row.createrName ?? '').trim() || undefined,
@@ -533,7 +552,7 @@ export function workflowDeepReadRenderOperations() {
533
552
  const wfNames = loadFetchWorkflowNames();
534
553
  const scopeLabel = wfNames.length > 0 ? wfNames.join('、') : 'fetch.workflowNames';
535
554
  const subtitle = `当前数据统计范围:${scopeLabel}下的数据,不包括:草稿、被退回及详情存在必填字段`;
536
- html = renderSummaryHtml(templateHtml, { subtitle, cardsHtml, filterBarHtml });
555
+ html = renderSummaryHtml(templateHtml, { subtitle, cardsHtml, filterBarHtml, operatorUserId });
537
556
  cardCount = rows.length;
538
557
  }
539
558
  mkdirSync(dirname(outputFile), { recursive: true });