weaver-work-cli 0.1.62 → 0.1.63

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 (272) hide show
  1. package/dist/chunks/{archive-S2VKZWQ3.js → archive-BLDYBZDX.js} +5 -4
  2. package/dist/chunks/{archive-oa-HEDSIUUY.js → archive-oa-3GJ3TWXR.js} +5 -4
  3. package/dist/chunks/{asset-HYH4W357.js → asset-AFXJN4CK.js} +5 -4
  4. package/dist/chunks/{asset-idle-N7REBNGL.js → asset-idle-VUJXWGWJ.js} +5 -4
  5. package/dist/chunks/{attachment-content-VYYA75FR.js → attachment-content-VMJA7NSQ.js} +3 -3
  6. package/dist/chunks/{blog-SLMZZICV.js → blog-EREB35VU.js} +5 -4
  7. package/dist/chunks/{caizhilian-RV43KKBT.js → caizhilian-ATM2JO5S.js} +5 -5
  8. package/dist/chunks/{calendar-DMVZ4OLY.js → calendar-E26ZIH7S.js} +5 -4
  9. package/dist/chunks/{chunk-6XSSAUNW.js → chunk-4OB22YKE.js} +48 -12
  10. package/dist/chunks/{chunk-UBGWIXU3.js → chunk-5CY37VLS.js} +131 -38
  11. package/dist/chunks/{chunk-EGANE35F.js → chunk-6G2JARDK.js} +1 -1
  12. package/dist/chunks/{chunk-WIWDVETN.js → chunk-6VCQLZXE.js} +75 -76
  13. package/dist/chunks/{chunk-E5YD5JWR.js → chunk-BY3WDJO5.js} +1 -1
  14. package/dist/chunks/{chunk-IW7A2IQY.js → chunk-C4YQJFZV.js} +43 -15
  15. package/dist/chunks/{chunk-BQYX2UX5.js → chunk-C5PIGPGX.js} +5 -3
  16. package/dist/chunks/{chunk-UBRWONP4.js → chunk-EOZHSNND.js} +2 -2
  17. package/dist/chunks/{chunk-UQFPF4EX.js → chunk-G3ZM57PD.js} +2 -2
  18. package/dist/chunks/{chunk-XT77MP54.js → chunk-GOBNIGWS.js} +410 -24
  19. package/dist/chunks/{chunk-KY3R42RS.js → chunk-GQK6WLOS.js} +5 -3
  20. package/dist/chunks/{chunk-BIA2NKUG.js → chunk-HEJPVXD3.js} +5 -5
  21. package/dist/chunks/{chunk-ILALC2N6.js → chunk-I4C2KR2G.js} +1 -1
  22. package/dist/chunks/{chunk-YI2YMW5N.js → chunk-IGICM3WJ.js} +2 -2
  23. package/dist/chunks/chunk-IN6NXQ26.js +680 -0
  24. package/dist/chunks/{chunk-VBFBMM7G.js → chunk-LOVAIGM2.js} +387 -70
  25. package/dist/chunks/{chunk-H6YOMI3U.js → chunk-OMAGCLUE.js} +5 -3
  26. package/dist/chunks/{chunk-VNYOUAWV.js → chunk-QAMIIFP6.js} +11 -11
  27. package/dist/chunks/{chunk-QBDXJS2W.js → chunk-QZYKZ7MQ.js} +16 -8
  28. package/dist/chunks/{chunk-V2LASYKO.js → chunk-RR45ELVE.js} +30 -24
  29. package/dist/chunks/{chunk-NRYDJN4J.js → chunk-RV2JAA5I.js} +89 -8
  30. package/dist/chunks/{chunk-TEZHIB6T.js → chunk-SDPC7BG2.js} +5 -3
  31. package/dist/chunks/{chunk-T2KVJFWJ.js → chunk-SHBDXEUE.js} +4 -7
  32. package/dist/chunks/{chunk-P6TXQK75.js → chunk-THMBDCRA.js} +5 -3
  33. package/dist/chunks/chunk-TJN4PIYO.js +47 -0
  34. package/dist/chunks/{chunk-DTCQFTHW.js → chunk-TNFIUZ4H.js} +3 -3
  35. package/dist/chunks/{chunk-JFAWZX53.js → chunk-UPVAQJKS.js} +282 -131
  36. package/dist/chunks/{chunk-KXJA42EA.js → chunk-WPBZQVLS.js} +1 -1
  37. package/dist/chunks/{conflict-GFJRS6I7.js → conflict-AMNTM3FV.js} +2 -2
  38. package/dist/chunks/{contract-U3ZGNRWB.js → contract-PLO2V2NO.js} +2333 -4426
  39. package/dist/chunks/{cowork-EX7PKIDK.js → cowork-FZAXE6FO.js} +5 -4
  40. package/dist/chunks/{create-flow-EJZD434E.js → create-flow-2DAUN7HU.js} +16 -6
  41. package/dist/chunks/{data-FOODGAMF.js → data-7NXMWET4.js} +3 -3
  42. package/dist/chunks/{ebuilder-form-I2EOKODG.js → ebuilder-form-DEYHX6M7.js} +4 -4
  43. package/dist/chunks/{ehr-TE4RFNID.js → ehr-QQH2DYYA.js} +244 -151
  44. package/dist/chunks/{employee-DR5Y64TI.js → employee-PGMY6NI6.js} +1 -1
  45. package/dist/chunks/{entry-mode-ZOLSXEGX.js → entry-mode-2JTVEKMP.js} +3 -3
  46. package/dist/chunks/{env-TID5NFR6.js → env-2JZMXC6I.js} +2 -2
  47. package/dist/chunks/{esb-7L6MHYLB.js → esb-I5ZFHJUK.js} +8 -8
  48. package/dist/chunks/{factory-OG7BPMH5.js → factory-XIATYHU6.js} +1 -1
  49. package/dist/chunks/{fna-6V2ENR3Y.js → fna-3V2TL6B2.js} +5 -4
  50. package/dist/chunks/{group-chat-5DKPWIHL.js → group-chat-CVYUZCOQ.js} +3 -3
  51. package/dist/chunks/{host-TJ5VVHM7.js → host-4DP7C7YQ.js} +4 -4
  52. package/dist/chunks/{host-3DLYA54R.js → host-4KQCAEWA.js} +4 -4
  53. package/dist/chunks/{host-ONZC6AE7.js → host-4X2F3JPQ.js} +4 -4
  54. package/dist/chunks/{host-OGBHL75G.js → host-BD7NAM33.js} +4 -4
  55. package/dist/chunks/{host-VTPAWDZV.js → host-CBONEAZS.js} +4 -4
  56. package/dist/chunks/{host-GOJHHTPY.js → host-L37QVNIV.js} +4 -4
  57. package/dist/chunks/{hrm-2N7NFQDZ.js → hrm-OL3IKN7C.js} +6 -6
  58. package/dist/chunks/{im-XCH47ZBN.js → im-YXQWUF3R.js} +4 -4
  59. package/dist/chunks/{invoice-5KJ7T774.js → invoice-4WY32PR2.js} +4 -4
  60. package/dist/chunks/{jiuchuanhui-PL6DRPBM.js → jiuchuanhui-L6SHLONH.js} +5 -4
  61. package/dist/chunks/{lazy-dispatch-UATEN7H7.js → lazy-dispatch-OYE6QV24.js} +5 -5
  62. package/dist/chunks/{mail-Q7Z4CQ4D.js → mail-PZV2KNRU.js} +5 -4
  63. package/dist/chunks/{meeting-5E3BNARL.js → meeting-6SOBCC6N.js} +16 -15
  64. package/dist/chunks/{minute-doc-NXRE5C77.js → minute-doc-KSJSJNOH.js} +4 -4
  65. package/dist/chunks/{okr-3O3XNYOK.js → okr-B76FW5M2.js} +5 -4
  66. package/dist/chunks/{operations-EZWG72FH.js → operations-YOMEGFLV.js} +5 -5
  67. package/dist/chunks/{performance-Y7CPNSOR.js → performance-4VBKUPFO.js} +5 -4
  68. package/dist/chunks/{plan-BLGPZF5M.js → plan-HBNZRQTI.js} +5 -4
  69. package/dist/chunks/{project-6MZMLJMP.js → project-IV6FWK74.js} +5 -4
  70. package/dist/chunks/{reception-F2VT2X52.js → reception-BR5YURT6.js} +3 -3
  71. package/dist/chunks/{recruit-stage-4ETIBMIW.js → recruit-stage-4HQ6OGXT.js} +654 -336
  72. package/dist/chunks/{registry-I4DVPDMU.js → registry-7LICMV5J.js} +12 -12
  73. package/dist/chunks/{registry-3FYSWV3U.js → registry-JFQEFC7E.js} +3 -3
  74. package/dist/chunks/{registry-3UGIWH53.js → registry-JMNOXRST.js} +2 -2
  75. package/dist/chunks/{registry-7RS74TCK.js → registry-MZJQX65Q.js} +5 -5
  76. package/dist/chunks/{room-recommend-GWCVKCXW.js → room-recommend-43GLLE7Y.js} +4 -4
  77. package/dist/chunks/{schedule-6AN63MJQ.js → schedule-ZQ42BEW6.js} +4 -4
  78. package/dist/chunks/{smart-extract-SR4SJJKN.js → smart-extract-QKAEAZGM.js} +3 -3
  79. package/dist/chunks/{workflow-KF7FA2UQ.js → workflow-6HV7H5PC.js} +10 -7
  80. package/dist/index.js +34 -34
  81. package/dist/internal/e10/auth/commands.js +21 -1
  82. package/dist/internal/e10/auth/xiaoe.js +6 -2
  83. package/dist/internal/e10/auth-recovery.js +28 -2
  84. package/dist/internal/e10/request-runtime.js +15 -3
  85. package/dist/internal/e10/request-trace.js +65 -0
  86. package/dist/shortcuts/contract/data/metric-catalog.js +149 -0
  87. package/dist/shortcuts/contract/index.js +14 -39
  88. package/dist/shortcuts/contract/manifest.js +115 -270
  89. package/dist/shortcuts/contract/operations/compare-report.js +437 -0
  90. package/dist/shortcuts/contract/operations/compare.js +2 -0
  91. package/dist/shortcuts/contract/operations/first-screen.js +96 -207
  92. package/dist/shortcuts/contract/operations/flow.js +19 -1
  93. package/dist/shortcuts/contract/operations/{card-ebdf-list.js → ledger-card.js} +98 -25
  94. package/dist/shortcuts/contract/operations/ledger.js +315 -1
  95. package/dist/shortcuts/contract/operations/metrics.js +93 -0
  96. package/dist/shortcuts/contract/operations/modeltext.js +3 -3
  97. package/dist/shortcuts/contract/operations/page.js +8 -4
  98. package/dist/shortcuts/contract/operations/performance.js +53 -0
  99. package/dist/shortcuts/contract/operations/quote-recognize.js +289 -0
  100. package/dist/shortcuts/contract/operations/quote-submit.js +264 -0
  101. package/dist/shortcuts/contract/operations/recommend.js +42 -1
  102. package/dist/shortcuts/contract/operations/registry.js +16 -23
  103. package/dist/shortcuts/contract/operations/{card-risk-report.js → review-report.js} +24 -114
  104. package/dist/shortcuts/contract/operations/review.js +33 -167
  105. package/dist/shortcuts/contract/operations/save-recognize.js +173 -43
  106. package/dist/shortcuts/contract/operations/triage.js +13 -6
  107. package/dist/shortcuts/contract/operations/{template.js → type-clause-read.js} +10 -25
  108. package/dist/shortcuts/contract/operations/upload.js +17 -11
  109. package/dist/shortcuts/contract/prewarm-cache.js +6 -2
  110. package/dist/shortcuts/contract/prewarm.js +33 -23
  111. package/dist/shortcuts/contract/recommend-cache.js +191 -0
  112. package/dist/shortcuts/ehr/operations/recruit-interview-overview.js +85 -62
  113. package/dist/shortcuts/ehr/operations/recruit-position.js +21 -13
  114. package/dist/shortcuts/ehr/operations/recruit-short-cache.js +59 -0
  115. package/dist/shortcuts/ehr/operations/recruit-tag.js +17 -11
  116. package/dist/shortcuts/ehr/operations/recruit-write.js +118 -70
  117. package/dist/shortcuts/ehr/operations/recruit.js +338 -121
  118. package/dist/shortcuts/hrm/operations/employee.js +64 -17
  119. package/dist/shortcuts/hrm/operations/resolve.js +419 -369
  120. package/dist/shortcuts/im/host.js +38 -22
  121. package/dist/shortcuts/meeting/operations/eb/conflict.js +60 -2
  122. package/dist/shortcuts/meeting/operations/eb/create-flow.js +116 -7
  123. package/dist/shortcuts/meeting/operations/eb/create-form-link.js +380 -0
  124. package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
  125. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +1 -3
  126. package/dist/shortcuts/recruit-stage/batch-store.js +44 -0
  127. package/dist/shortcuts/recruit-stage/context.js +75 -9
  128. package/dist/shortcuts/recruit-stage/manifest.js +1 -1
  129. package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -22
  130. package/dist/shortcuts/recruit-stage/operations/list.js +187 -37
  131. package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
  132. package/dist/shortcuts/recruit-stage/operations/resume-import.js +231 -313
  133. package/dist/shortcuts/recruit-stage/operations/search.js +5 -5
  134. package/dist/shortcuts/recruit-stage/operations/tag.js +286 -0
  135. package/dist/shortcuts/workflow/endpoints.js +2 -0
  136. package/dist/shortcuts/workflow/operations/form.js +12 -15
  137. package/dist/shortcuts/workflow/operations/read.js +8 -8
  138. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +3 -2
  139. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +7 -6
  140. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +4 -3
  141. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +1 -0
  142. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +33 -6
  143. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +153 -0
  144. package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +232 -0
  145. package/dist/shortcuts/workflow/operations.js +5 -0
  146. package/docs/contract.md +2 -2
  147. package/docs/e10-auth.md +28 -0
  148. package/docs/ehr.md +1 -1
  149. package/package.json +1 -1
  150. package/skills/weaver-e10-hrm/SKILL.md +3 -3
  151. package/skills/weaver-e10-hrm/references/employee.md +13 -2
  152. package/skills/weaver-e10-jinchengda/SKILL.md +237 -347
  153. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -14
  154. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +21 -12
  155. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +109 -185
  156. package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +12 -4
  157. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +28 -20
  158. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +12 -17
  159. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +7 -13
  160. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +21 -12
  161. package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +10 -18
  162. package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +18 -17
  163. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +114 -61
  164. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +8 -2
  165. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +73 -104
  166. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +32 -37
  167. package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +12 -10
  168. package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +70 -82
  169. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +37 -33
  170. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +94 -27
  171. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +5 -5
  172. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +9 -15
  173. package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +9 -4
  174. package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +59 -32
  175. package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +7 -5
  176. package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +21 -13
  177. package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +13 -13
  178. package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +6 -5
  179. package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +250 -0
  180. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +11 -20
  181. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +203 -54
  182. package/skills/weaver-e10-jinchengda/references/contract-request-status.md +4 -11
  183. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +11 -17
  184. package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +11 -17
  185. package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +5 -11
  186. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +56 -7
  187. package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +10 -16
  188. package/skills/weaver-e10-jinchengda/references/orchestration.md +31 -33
  189. package/skills/weaver-e10-jucailin/SKILL.md +6 -7
  190. package/skills/weaver-e10-jucailin/agents/openai.yaml +52 -0
  191. package/skills/weaver-e10-jucailin/references/recruit-interview-overview.md +8 -6
  192. package/skills/weaver-e10-jucailin/references/recruit-read.md +4 -0
  193. package/skills/weaver-e10-jucailin/references/recruit-screening-to-interview-sop.md +2 -2
  194. package/skills/weaver-e10-jucailin/references/recruit-write.md +4 -4
  195. package/skills/weaver-e10-meeting/SKILL.md +83 -531
  196. package/skills/weaver-e10-meeting/references/commands-table.md +61 -0
  197. package/skills/weaver-e10-meeting/references/create-commands.md +136 -0
  198. package/skills/weaver-e10-meeting/references/create-flow.md +3 -1
  199. package/skills/weaver-e10-meeting/references/create-guardrails.md +14 -8
  200. package/skills/weaver-e10-meeting/references/custom-fields.md +40 -0
  201. package/skills/weaver-e10-meeting/references/eb-contracts.md +60 -0
  202. package/skills/weaver-e10-meeting/references/invitation.md +69 -0
  203. package/skills/weaver-e10-meeting/references/minutes-pipeline.md +119 -0
  204. package/skills/weaver-e10-meeting/references/pitfalls.md +1 -1
  205. package/skills/weaver-e10-meeting/references/room-recommend.md +88 -0
  206. package/skills/weaver-e10-recruit-stage/SKILL.md +317 -266
  207. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +22 -27
  208. package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +1 -1
  209. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +30 -27
  210. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +2 -6
  211. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +12 -10
  212. package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +2 -0
  213. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +23 -19
  214. package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +3 -1
  215. package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +18 -16
  216. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +25 -23
  217. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +10 -10
  218. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +2 -2
  219. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +11 -11
  220. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +150 -85
  221. package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +14 -18
  222. package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +1 -1
  223. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +173 -0
  224. package/skills/weaver-e10-recruit-stage/references/recruit-tag-taxonomy.json +76 -0
  225. package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +3 -1
  226. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +2 -2
  227. package/skills/weaver-e10-workflow/SKILL.md +49 -32
  228. package/skills/weaver-e10-workflow/references/todo-dialogue.md +67 -34
  229. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +65 -51
  230. package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +18 -11
  231. package/skills/weaver-e10-workflow/references/workflow-create.md +2 -2
  232. package/skills/weaver-e10-workflow/references/workflow-memory.md +19 -37
  233. package/skills/weaver-e10-workflow/references/workflow-query.md +25 -22
  234. package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
  235. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +318 -110
  236. package/skills/weaver-e10-yimiaoban/SKILL.md +10 -10
  237. package/skills/weaver-e10-yimiaoban/references/person.md +1 -1
  238. package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
  239. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +9 -9
  240. package/dist/chunks/chunk-6QYNE6HE.js +0 -658
  241. package/dist/chunks/chunk-SHYQUBY3.js +0 -48
  242. package/dist/shortcuts/contract/operations/card-action.js +0 -1266
  243. package/dist/shortcuts/contract/operations/card-plan.js +0 -393
  244. package/dist/shortcuts/contract/operations/card.js +0 -232
  245. package/dist/shortcuts/contract/operations/compare-screen.js +0 -378
  246. package/dist/shortcuts/contract/operations/quote-to-contract.js +0 -495
  247. package/dist/shortcuts/contract/operations/quotescreen.js +0 -529
  248. package/dist/shortcuts/contract/operations/summary-validate.js +0 -293
  249. package/dist/shortcuts/contract/operations/summary.js +0 -187
  250. package/dist/shortcuts/ehr/recruit-stage/batch-store.js +0 -78
  251. package/dist/shortcuts/ehr/recruit-stage/context.js +0 -231
  252. package/dist/shortcuts/ehr/recruit-stage/continuation.js +0 -74
  253. package/dist/shortcuts/ehr/recruit-stage/errors.js +0 -65
  254. package/dist/shortcuts/ehr/recruit-stage/fs-scan.js +0 -165
  255. package/dist/shortcuts/ehr/recruit-stage/host.js +0 -109
  256. package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +0 -1065
  257. package/dist/shortcuts/ehr/recruit-stage/operations/interview-feedback.js +0 -295
  258. package/dist/shortcuts/ehr/recruit-stage/operations/jd-create.js +0 -961
  259. package/dist/shortcuts/ehr/recruit-stage/operations/list.js +0 -431
  260. package/dist/shortcuts/ehr/recruit-stage/operations/registry.js +0 -50
  261. package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +0 -1655
  262. package/dist/shortcuts/ehr/recruit-stage/operations/search.js +0 -158
  263. package/dist/shortcuts/ehr/recruit-stage/operations/types.js +0 -34
  264. package/dist/shortcuts/ehr/recruit-stage/runtime.js +0 -31
  265. package/dist/shortcuts/ehr/recruit-stage/school-tiers.json +0 -318
  266. package/dist/shortcuts/ehr/recruit-stage/shared.js +0 -887
  267. package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +0 -22
  268. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +0 -554
  269. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +0 -279
  270. package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +0 -483
  271. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -46
  272. package/skills/weaver-e10-recruit-stage/lib/recruit-resume-photo.py +0 -194
@@ -6,9 +6,9 @@
6
6
  * 避免每次现场拼脚本,也避免多跑一次 stage=group 进程(每次 CLI 启动约 6~7s)。
7
7
  *
8
8
  * 用法:
9
- * node todo-summary.cjs query [--limit 500] [筛选条件] [--out DIR] [--prompt "用户完整提示词"]
10
- * → collect → smartGroup(不取摘要上下文)→ 仅标题清单落库与组件;不生成 AI 摘要或二次分组
11
- * node todo-summary.cjs prep [--limit 100] [--exclude 内部留言] [--days 365 | --from A --to B] [--out DIR] [--prompt "用户完整提示词"] # 摘要默认/最多100条;未指定时间时由 CLI 按模式阈值自动收窄范围
9
+ * node todo-summary.cjs query [--limit 1000] [筛选条件] [--out DIR] [--prompt "用户完整提示词"]
10
+ * → prepareQuery;准备原生查询条件、数量与工作流分布,组件每页500条独立取数,不生成 AI 摘要或二次分组
11
+ * node todo-summary.cjs prep [--limit 100] [--exclude 内部留言] [--days 365 | --from A --to B] [--out DIR] [--prompt "用户完整提示词"] # 摘要默认/最多100条
12
12
  * 筛选条件(2026-11-06 起,与 workflow.search 同口径,可任选组合):
13
13
  * --workflow "费用报销(ID),采购申请(ID)" --workflow-term in|notin
14
14
  * --request-name 报销 --request-name-term like|eq|ne|in|notin
@@ -114,6 +114,7 @@ function cliEnv() {
114
114
  // 只探测当前实际入口的 schema,不用版本号推测能力,也不把能力缓存到后续 helper 进程。
115
115
  // schema 不可用时使用既有协议;业务阶段仍只执行一次,失败直接交给原有错误处理。
116
116
  let outputModeCapability;
117
+ let prepareQueryCapability = false;
117
118
  function supportsOutputMode() {
118
119
  if (outputModeCapability !== undefined) return outputModeCapability;
119
120
  outputModeCapability = false;
@@ -131,6 +132,8 @@ function supportsOutputMode() {
131
132
  const schema = result.inputSchema || (result.ok === true && result.data && result.data.inputSchema);
132
133
  const modes = schema && schema.properties && schema.properties.outputMode && schema.properties.outputMode.enum;
133
134
  outputModeCapability = Array.isArray(modes) && modes.includes('query') && modes.includes('summary');
135
+ prepareQueryCapability = Array.isArray(schema?.properties?.stage?.enum)
136
+ && schema.properties.stage.enum.includes('prepareQuery');
134
137
  }
135
138
  } catch {
136
139
  // 仅 schema 读取失败允许兼容既有协议;不要捕获或重试任何真实业务调用。
@@ -324,14 +327,18 @@ function resolveBaseUrl(state, dir) {
324
327
  * - 外框固定:`callId` 写死 `todo_summary`、`toolId` 写死 `fill_form`(2026-10-28 规范);
325
328
  * - `arguments` 层新增 `displayMode: "tabs"` 与 `panelKey`(2026-11-10 用户要求,层级同 title/src):
326
329
  * panelKey = `todo_summary_<当前时间戳>`,每轮汇总各开各的面板,避免前端把新旧载荷混进同一 panel;
327
- * - `params.data` 只带 `{"id": "<smartgroup/add 落库返回的主键>"}`(2026-11-13 用户定稿,
330
+ * - 摘要的 `params.data` 带 `{"id": "<smartgroup/add 落库返回的主键>"}`(2026-11-13 用户定稿,
328
331
  * 取代旧的 `params.data.dataSource` 本地服务地址)。id 按服务端响应的**原样数字串**内嵌
329
332
  * (字符串形态,防雪花 id 超出 JS Number 安全整数范围丢精度);组件侧拿 id 走服务端读回链路;
333
+ * - 查询仅带原生 listQuery 与读取上限/真实总数;摘要带服务端 id;
334
+ * 查询标题为「待办列表」,摘要标题为「待办摘要汇总」;
330
335
  * - 包裹完成后立刻 `JSON.parse` 自检,坏载荷不交给用户。
331
336
  */
332
- function wrapBrowseToolPayload(baseUrl, smartGroupId) {
337
+ function wrapBrowseToolPayload(baseUrl, smartGroupId, title = '待办摘要汇总', options = {}) {
333
338
  const src = `${String(baseUrl).replace(/\/+$/, '')}/workflow/list/todo`;
334
339
  const panelKey = `todo_summary_${Date.now()}`;
340
+ const data = smartGroupId && typeof smartGroupId === 'object' ? smartGroupId : { id: String(smartGroupId) };
341
+ const inline = Number.isInteger(options.totalCount) && options.totalCount >= 0 && options.totalCount < 5;
335
342
  const text = [
336
343
  '{',
337
344
  ' "version": "1.0",',
@@ -339,11 +346,11 @@ function wrapBrowseToolPayload(baseUrl, smartGroupId) {
339
346
  ' "toolId": "fill_form",',
340
347
  ' "arguments": {',
341
348
  ' "type": "e10",',
342
- ' "title": "待办摘要汇总",',
349
+ ` "title": ${JSON.stringify(title)},`,
343
350
  ' "displayMode": "tabs",',
344
351
  ` "panelKey": ${JSON.stringify(panelKey)},`,
345
352
  ` "src": ${JSON.stringify(src)},`,
346
- ' "sdkRenderType": "drawer",',
353
+ ` "sdkRenderType": ${JSON.stringify(inline ? 'inline' : 'drawer')},`,
347
354
  ' "sdkOptions": {',
348
355
  ' "compName": "ui.CorsComponent",',
349
356
  ' "routerType": "MemoryRouter",',
@@ -352,9 +359,7 @@ function wrapBrowseToolPayload(baseUrl, smartGroupId) {
352
359
  ' "params_pc": { "app": "@weapp/workflow", "compName": "Comp.WflTodoSummary", "clientType": "pc" },',
353
360
  ' "params_mobile": { "app": "@weapp/workflow", "compName": "Comp.WflTodoSummary", "clientType": "mobile" },',
354
361
  ' "params": {',
355
- ' "data": {',
356
- ` "id": ${JSON.stringify(String(smartGroupId))}`,
357
- ' }',
362
+ ` "data": ${JSON.stringify(data)}`,
358
363
  ' }',
359
364
  ' }',
360
365
  ' }',
@@ -364,31 +369,28 @@ function wrapBrowseToolPayload(baseUrl, smartGroupId) {
364
369
  return `${text}\n`;
365
370
  }
366
371
 
367
- /** 当前登录用户的 employeeId(优先组链接的 secondEmpId,2026-11-10 用户定)。结果缓存在 state.json。 */
368
- function resolveEmployeeId(state, dir) {
369
- if (state.deliveryEmployeeId) return state.deliveryEmployeeId;
370
- try {
371
- const who = JSON.parse(runCli(['--json', 'auth', 'whoami'], { encoding: 'utf8', maxBuffer: 16 * 1024 * 1024, env: cliEnv() }));
372
- const employeeId = String((who.data || who).employeeId || '').trim();
373
- if (!employeeId) return null;
374
- state.deliveryEmployeeId = employeeId;
375
- fs.writeFileSync(path.join(dir, 'state.json'), JSON.stringify(state));
376
- return employeeId;
377
- } catch {
378
- return null;
379
- }
372
+ /** 仅使用与交付范围一致的真实总数;已读取条数不能证明已覆盖全部。 */
373
+ function resolveMatchingTotal(state, displayedCount) {
374
+ if (state.dropped > 0) return null;
375
+ const steps = state.degrade && Array.isArray(state.degrade.steps) ? state.degrade.steps : [];
376
+ const currentStep = state.degrade && state.degrade.applied ? steps[steps.length - 1] : steps[0];
377
+ const candidates = [state.queryMeta?.totalAvailable, currentStep && currentStep.total];
378
+ for (const value of candidates) {
379
+ if ((typeof value !== 'number' && typeof value !== 'string') || String(value).trim() === '') continue;
380
+ const total = Number(value);
381
+ if (Number.isInteger(total) && total >= 0 && total >= displayedCount) return total;
382
+ }
383
+ return null;
380
384
  }
381
385
 
382
386
  /**
383
- * 交付正文前段(2026-11-10 用户定稿,纯函数便于测试):
387
+ * 摘要交付正文前段(纯函数便于测试;普通 query 不调用):
384
388
  * ① 总数/降级说明行 —— 总数取 collect 首轮 getTodoListTotal 的结果(state.degrade.steps[0].total);
385
389
  * 新模式由 windowDays / terminal 和最后一步 scope 描述实际范围(最低近7天);
386
390
  * 历史无上述字段时保留 level=5 对应近1个月终点级的解释;
387
- * ② 优先组条目表格(2026-11-11 16:10 用户定稿;16:19 反馈:摘要列只保留摘要文字,重要/紧急徽标不再展示)
388
- * ——两列:摘要(纯文本,竖线转义;摘要为空用流程标题兜底)|
389
- * 操作(固定「查看详情」,详情链接挂它上);超过 5 条截前 5 条并在标题提示「(前 5 条)」,
390
- * 不超过不带括号;链接 = {baseUrl}/sp/workflow/flowpage/view/{requestId}?secondEmpId={employeeId}&requestId={requestId};
391
- * ③ 工作流分组表格 —— 排除优先组,按组内条数降序。
391
+ * ② 优先组条目表格:仅显示流程标题,无操作列或链接;
392
+ * 超过5条截前5条并在标题提示「(前5条)」,不超过不带括号;
393
+ * ③ 工作流分组表格:排除优先组,只有多个工作流时展示,按组内条数降序。
392
394
  */
393
395
  function describeDegradeWindow(degrade) {
394
396
  const steps = Array.isArray(degrade.steps) ? degrade.steps : [];
@@ -421,7 +423,7 @@ function buildReplyPrologue(state, payload, opts) {
421
423
  ? (!state.dropped && initialCandidate !== null && Number.isInteger(Number(initialCandidate))
422
424
  && Number(initialCandidate) >= totalCount ? Number(initialCandidate) : null)
423
425
  : initialCandidate;
424
- if (degrade && degrade.applied) {
426
+ if (degrade && degrade.applied && !opts.tablesOnly) {
425
427
  // 2026-11-11 17:09 用户定稿:「本次共查询到X条待办,其中近N内到达的共N条。针对近期待办汇总如下:」
426
428
  // 首轮总数未知时提示数量较多;新摘要模式另外说明该范围总数与本次实际汇总数。
427
429
  const windowText = describeDegradeWindow(degrade);
@@ -437,7 +439,7 @@ function buildReplyPrologue(state, payload, opts) {
437
439
  : `本次汇总${windowText}的${totalCount}条待办。`;
438
440
  lines.push(`${head}${coverage}针对近期待办汇总如下:`);
439
441
  } else lines.push(`${head}其中${windowText}的共${totalCount}条。针对近期待办汇总如下:`);
440
- } else {
442
+ } else if (!opts.tablesOnly) {
441
443
  // 无降级:「本次共查询到X条待办,汇总如下:」(首轮总数拿不到时用实际取到数兜底)
442
444
  const shown = initialTotal !== null ? initialTotal : totalCount;
443
445
  lines.push(state.outputMode === 'summary' && Number(shown) > totalCount
@@ -456,24 +458,15 @@ function buildReplyPrologue(state, payload, opts) {
456
458
  }
457
459
  }
458
460
  if (priorityRows.length > 0) {
459
- // 2026-11-11 16:10 用户定稿:条目列表改为**两列表格**——第一列摘要(纯文本 + 重要/紧急徽标,
460
- // 竖线转义;摘要为空用流程标题兜底),第二列操作(固定文案「查看详情」,详情链接挂它上面;
461
- // 无链接时按 — 兜底)。做了 5 条截取才提示「(前 5 条)」,没截取不带括号。
462
- // 仅改本函数的 md 输出,json/源数据结构不动。
461
+ // 查询与摘要的优先表统一仅显示标题;组件中的摘要与条目结构保持原样。
463
462
  const capText = priorityRows.length > 5 ? '(前 5 条)' : '';
464
463
  lines.push('', `**建议您优先处理**${capText}:`, '');
465
- lines.push('| 摘要 | 操作 |', '| --- | --- |');
466
- const linkBase = String(opts.baseUrl || '').replace(/\/+$/, '');
464
+ lines.push('| 流程标题 |', '| --- |');
467
465
  const clean = (text) => String(text ?? '').replace(/\s+/g, ' ').replace(/[[\]]/g, '').trim();
468
466
  priorityRows.slice(0, 5).forEach((row) => {
469
467
  const requestId = String(row.requestId || '');
470
- const link = requestId && linkBase
471
- ? `${linkBase}/sp/workflow/flowpage/view/${requestId}?secondEmpId=${opts.employeeId || ''}&requestId=${requestId}`
472
- : null;
473
- // 2026-11-11 16:19 用户定稿:摘要列只保留摘要文字——重要/紧急徽标不再展示。
474
- const summaryText = clean(row.summary) || clean(row.requestNameTitle) || requestId || '—';
475
- const action = link ? `[查看详情](${link})` : '—';
476
- lines.push(`| ${summaryText.replace(/\|/g, '\\|')} | ${action} |`);
468
+ const title = clean(row.requestNameTitle) || requestId || '—';
469
+ lines.push(`| ${title.replace(/\|/g, '\\|')} |`);
477
470
  });
478
471
  }
479
472
 
@@ -481,11 +474,13 @@ function buildReplyPrologue(state, payload, opts) {
481
474
  .filter((g) => !isPriority(g))
482
475
  .map((g) => ({ title: String(g.title || ''), count: Number(g.count) || 0 }))
483
476
  .sort((a, b) => b.count - a.count);
484
- if (tableRows.length > 0) {
477
+ if (tableRows.length > 1) {
485
478
  // 2026-11-11 用户定稿:①表格加标题(与「建议您优先处理」同一样式的粗体标题行,15:53 定稿文案
486
479
  // 为「工作流分布情况」);②按总数降序只取前 10 个工作流,超出部分汇总成一行「其它」(总数为剩余各项之和);
487
- // 不超过 10 个时不出现「其它」行。仅改本函数的 md 输出,json/源数据结构不动。
488
- lines.push('', '**工作流分布情况**:');
480
+ // 单工作流不输出分布;不超过10个时不出现「其它」行,json/源数据结构不动。
481
+ const scope = state.outputMode === 'summary' && resolveMatchingTotal(state, totalCount) !== totalCount
482
+ ? `(本次汇总${totalCount}条)` : '';
483
+ lines.push('', opts.tablesOnly ? '**工作流分布情况(本次展示)**:' : `**工作流分布情况${scope}**:`);
489
484
  lines.push('| 工作流 | 总数 |', '| --- | --- |');
490
485
  for (const row of tableRows.slice(0, 10)) {
491
486
  lines.push(`| ${row.title.replace(/\|/g, '\\|')} | ${row.count} |`);
@@ -519,7 +514,7 @@ function ruleFingerprint() {
519
514
  const aigroupDir = path.join(path.resolve(__dirname, '..'), 'aigroup');
520
515
  const parts = [];
521
516
  for (const name of ['default.json', 'user-intents.json']) {
522
- const file = path.join(aigroupDir, name);
517
+ const file = path.resolve(aigroupDir, name);
523
518
  if (!fs.existsSync(file)) continue;
524
519
  const buf = fs.readFileSync(file);
525
520
  parts.push(`${name}#${createHash('sha256').update(buf).digest('hex').slice(0, 16)}(${buf.length}B)`);
@@ -536,7 +531,7 @@ function requiredFieldsFor(title) {
536
531
  return Array.isArray(rule.summaryRequiredFields) ? rule.summaryRequiredFields.filter((f) => typeof f === 'string' && f.trim()) : [];
537
532
  }
538
533
 
539
- /** 普通查询与摘要共用服务端落库协议;失败时不生成组件载荷。 */
534
+ /** 摘要及旧 CLI 兼容查询走服务端落库;失败时不生成组件载荷。 */
540
535
  function persistPayload(payload, dir, queryPrompt) {
541
536
  const addResult = runStage({
542
537
  stage: 'smartGroupAdd',
@@ -675,19 +670,12 @@ function exportFinal(result, dir, state, kept, opts = {}) {
675
670
  process.exit(1);
676
671
  }
677
672
  // 交付正文与 stdout 共用同一份;`params.data.id` = 落库主键(原样数字串,保雪花精度)。
678
- const finalText = wrapBrowseToolPayload(baseUrl, smartGroupId);
673
+ const knownTotal = resolveMatchingTotal(state, payload.totalCount);
674
+ const finalText = wrapBrowseToolPayload(baseUrl, smartGroupId, '待办摘要汇总', { totalCount: knownTotal });
679
675
  // 交付 = 回复正文(总数/降级说明 + 优先组前 5 列表 + 工作流表格 + <browsertool> 块)。
680
676
  // 2026-11-10 用户定稿:正文不再是只有组件块,前段由脚本产出、模型原样粘贴(勿增删改写)。
681
677
  const delivery = `<browsertool>\n${finalText.trimEnd()}\n</browsertool>`;
682
- const employeeId = resolveEmployeeId(state, dir);
683
- if (!employeeId) console.log('(secondEmpId 缺失:auth whoami 未返回 employeeId,优先组链接不带该参数)');
684
- const receivedById = new Map();
685
- for (const row of kept || []) {
686
- if (row && row.requestId) {
687
- receivedById.set(String(row.requestId), String(row.receivedTime || row.receivedatetime || ''));
688
- }
689
- }
690
- const prologueLines = buildReplyPrologue(state, payload, { baseUrl, employeeId, receivedById });
678
+ const prologueLines = buildReplyPrologue(state, payload, { tablesOnly: false });
691
679
  const replyBody = [...prologueLines, '', delivery].join('\n');
692
680
  fs.writeFileSync(path.join(dir, 'reply.md'), replyBody);
693
681
  console.log('\n[JSON_BEGIN]');
@@ -808,14 +796,103 @@ function parseFilterFieldsFlag(text) {
808
796
  }
809
797
  }
810
798
 
799
+ function workflowClarificationCandidates(data) {
800
+ const source = Array.isArray(data.candidates) ? data.candidates : [];
801
+ return source.filter(candidate => candidate && typeof candidate === 'object' && !Array.isArray(candidate))
802
+ .map(candidate => {
803
+ const id = String(candidate.id ?? '').trim();
804
+ const display = String(candidate.display || (candidate.name && id ? `${candidate.name}(${id})` : candidate.name) || '').trim();
805
+ const rawName = String(candidate.name || display).trim();
806
+ const name = (id && rawName.endsWith(`(${id})`) ? rawName.slice(0, -id.length - 2) : rawName)
807
+ .replace(/\s+/g, ' ').trim();
808
+ const workflowTypeName = typeof candidate.workflowTypeName === 'string'
809
+ ? candidate.workflowTypeName.replace(/\s+/g, ' ').trim() || null : null;
810
+ const rawCount = candidate.totalCount;
811
+ const count = typeof rawCount === 'number' || (typeof rawCount === 'string' && /^\d+$/.test(rawCount.trim()))
812
+ ? Number(rawCount) : null;
813
+ const totalCount = Number.isSafeInteger(count) && count >= 0 ? count : null;
814
+ return { id, name, display, workflowTypeName, totalCount };
815
+ }).filter(candidate => candidate.name && candidate.display);
816
+ }
817
+
818
+ /** 只有所有候选计数已知、且恰有一个正数时,才允许自动绑定。 */
819
+ function uniquePositiveWorkflow(data) {
820
+ if (data.clarificationType !== 'workflow' || !Array.isArray(data.candidates) || !data.candidates.length) return null;
821
+ const candidates = workflowClarificationCandidates(data);
822
+ if (candidates.length !== data.candidates.length || candidates.some(candidate => candidate.totalCount === null)) return null;
823
+ const positive = candidates.filter(candidate => candidate.totalCount > 0);
824
+ return positive.length === 1 ? positive[0] : null;
825
+ }
826
+
827
+ function resolveUniqueWorkflowInput(input, data) {
828
+ const candidate = uniquePositiveWorkflow(data);
829
+ if (!candidate || !/^\d+$/.test(candidate.id) || candidate.display !== `${candidate.name}(${candidate.id})`
830
+ || !Array.isArray(input.workflow) || !input.workflow.every(value => typeof value === 'string')) return null;
831
+ const keyword = typeof data.clarificationKeyword === 'string' ? data.clarificationKeyword.trim() : '';
832
+ let index = -1;
833
+ if (keyword) {
834
+ const matches = input.workflow.flatMap((value, position) => value.trim() === keyword ? [position] : []);
835
+ if (matches.length !== 1) return null;
836
+ [index] = matches;
837
+ } else if (input.workflow.length === 1) {
838
+ const name = input.workflow[0].trim();
839
+ if (name !== candidate.name || /^\d+$/.test(name) || /\(\d+\)$/.test(name)) return null;
840
+ index = 0;
841
+ }
842
+ if (index < 0) return null;
843
+ return { workflow: input.workflow.map((value, position) => position === index ? candidate.display : value), candidate };
844
+ }
845
+
811
846
  /**
812
- * 打印澄清信封(`ok:true` + `status=NEEDS_CLARIFICATION`)。
813
- *
814
- * 口径与 SKILL 一致:**不是失败,也不是「查无数据」**——本次查询**没有执行**。候选原样列出,
815
- * 由执行方交给用户确认后用「名称(ID)」重发;**不要**自行挑一个候选继续,也不要把这段转述成
816
- * 「没有匹配的流程 / 结果为 0 条」。
847
+ * 打印澄清信封。工作流标签展示类型与同条件数量,内部绑定直接输出给模型。
848
+ * 全0和唯一正数不弹选择框;未知不当0。其他实体沿用原方式。
817
849
  */
818
- function printClarification(data, dir) {
850
+ function printClarification(data, dir, input = {}) {
851
+ if (data.clarificationType === 'workflow') {
852
+ const normalized = workflowClarificationCandidates(data);
853
+ const automatic = uniquePositiveWorkflow(data);
854
+ const noMatches = (normalized.length > 0 && normalized.every(candidate => candidate.totalCount === 0))
855
+ || (normalized.length === 0 && data.clarificationReason === 'no_matching_todos');
856
+ const candidates = normalized.filter(candidate => candidate.totalCount !== 0)
857
+ .sort((left, right) => {
858
+ if (left.totalCount === null) return right.totalCount === null ? 0 : 1;
859
+ return right.totalCount === null ? -1 : right.totalCount - left.totalCount;
860
+ }).map((candidate, index) => ({ ...candidate, index: index + 1,
861
+ label: [candidate.name,
862
+ candidate.workflowTypeName ? `类型:${candidate.workflowTypeName}` : null,
863
+ candidate.totalCount === null ? null : `${candidate.totalCount}条`,
864
+ ].filter(Boolean).join('|'),
865
+ }));
866
+ const requiresSelection = candidates.length > 0 && !automatic;
867
+ const pickerOptions = candidates.map(candidate => ({ label: candidate.label, value: candidate.display }));
868
+ if (candidates.length > 1 && !(Array.isArray(input.filterFields) && input.filterFields.length > 0)) {
869
+ pickerOptions.push({ label: '全部匹配的工作流', value: '__ALL__' });
870
+ }
871
+ const pickerList = requiresSelection ? [{
872
+ id: 'workflow_choice', inputType: 'single', required: true, allowCustomInput: false,
873
+ title: '请选择要查询的工作流', options: pickerOptions,
874
+ }] : [];
875
+ const question = noMatches ? '当前筛选条件下,匹配的工作流均无待办,无需选择。'
876
+ : automatic ? `当前筛选条件下仅“${automatic.name}”有待办,但本轮未完成自动续查。`
877
+ : candidates.length ? '请选择要查询的工作流。' : '暂未取得可供选择的工作流,请补充更具体的工作流名称。';
878
+ const lines = [question];
879
+ for (const candidate of candidates) lines.push(` ${candidate.index}. ${candidate.label}`);
880
+ lines.push(automatic
881
+ ? '无需弹出工作流选择框。无法安全对应原工作流词,或本轮已自动续查一次仍有歧义。不要再次自动重发,应澄清原词或核对筛选条件。'
882
+ : candidates.length
883
+ ? '宿主支持 pickerList 时原样传入下列 pickerList,不用 name 重建选项;其他宿主按上述编号逐项复制 label。已知数量从多到少、未知最后,不得因推荐或最近选择重排。requiresSelection 为 true 时先提问并等待用户选择,未回复前不查询第一项或全部。所选 display 仅绑定该候选;只有用户明确选择 __ALL__ 才绑定本轮完整候选集合,并保留其他筛选条件。'
884
+ : '本轮没有可选择项,不弹出空选择框。');
885
+ lines.push('下列 JSON 仅用于本轮候选绑定,不向用户展示 ID、display 等内部字段。');
886
+ lines.push('[CLARIFICATION_BEGIN]', JSON.stringify({
887
+ status: 'NEEDS_CLARIFICATION', clarificationType: 'workflow',
888
+ ...(noMatches ? { clarificationReason: 'no_matching_todos' }
889
+ : data.clarificationReason ? { clarificationReason: data.clarificationReason } : {}),
890
+ clarificationKeyword: typeof data.clarificationKeyword === 'string' ? data.clarificationKeyword : null,
891
+ clarificationQuestion: question, requiresSelection, candidates, pickerList,
892
+ }), '[CLARIFICATION_END]');
893
+ console.log(lines.join('\n'));
894
+ return;
895
+ }
819
896
  const question = String(data.clarificationQuestion || '请确认查询条件。');
820
897
  const lines = [`⚠ 需要先确认查询范围(本次查询**没有执行**,不是「没有数据」):`, ` ${question}`];
821
898
  const candidates = Array.isArray(data.candidates) ? data.candidates : [];
@@ -837,9 +914,9 @@ function printClarification(data, dir) {
837
914
 
838
915
  function readOutputLimit(args, outputMode) {
839
916
  const maximum = outputMode === 'query' ? 1000 : 100;
840
- const limit = args.limit === undefined ? (outputMode === 'query' ? 500 : 100) : Number(args.limit);
917
+ const limit = args.limit === undefined ? (outputMode === 'query' ? 1000 : 100) : Number(args.limit);
841
918
  if (args.limit === true || !Number.isInteger(limit) || limit < 1 || limit > maximum) {
842
- console.error('✖ %s --limit 必须是 1~%d 的整数;默认 %d。', outputMode, maximum, outputMode === 'query' ? 500 : 100);
919
+ console.error('✖ %s --limit 必须是 1~%d 的整数;默认 %d。', outputMode, maximum, outputMode === 'query' ? 1000 : 100);
843
920
  process.exit(1);
844
921
  }
845
922
  return limit;
@@ -865,14 +942,14 @@ function cmdPrep(args) {
865
942
  }
866
943
 
867
944
  const startedAt = nowIso();
868
- const input = { stage: 'collect', outputMode, limit };
945
+ const input = { stage: args._prepareQuery === true ? 'prepareQuery' : 'collect', outputMode, limit };
869
946
  // 2026-11-11 用户定稿:排除清单必须进 CLI 查询条件——首轮 getTodoListTotal 要带上
870
947
  // 提示词中的**完整条件**(含排除项),否则交付正文的「您共 X 条待办」与实际纳入条数
871
948
  // 口径对不上(实测 223 vs 53)。本地剔除保留作兜底(正常情况下 CLI 已排除,dropped=0)。
872
949
  // 显式传了 --workflow/--workflow-term 时不自动转(用户显式工作流条件 + 表单字段条件并存
873
950
  // 是正常场景,workflow 参数归它用),排除清单仅本地剔除并告警。
874
951
  if (exclude.length) {
875
- if (input.workflow === undefined && args['workflow-term'] === undefined) {
952
+ if (args.workflow === undefined && args['workflow-term'] === undefined) {
876
953
  input.workflow = exclude.slice();
877
954
  input.workflowTerm = 'notin';
878
955
  } else {
@@ -934,16 +1011,25 @@ function cmdPrep(args) {
934
1011
  } else input[key] = String(value);
935
1012
  }
936
1013
  const t0 = Date.now();
937
- const collect = runStage(input, dir, 'collect');
1014
+ const stageName = args._prepareQuery === true ? 'prepare-query' : 'collect';
1015
+ let collect = runStage(input, dir, stageName);
1016
+ if (collect.data && collect.data.status === 'NEEDS_CLARIFICATION') {
1017
+ const resolved = resolveUniqueWorkflowInput(input, collect.data);
1018
+ if (resolved) {
1019
+ input.workflow = resolved.workflow;
1020
+ collect = runStage(input, dir, `${stageName}-resolved`);
1021
+ }
1022
+ }
938
1023
  const collectWallMs = Date.now() - t0;
939
1024
  // 澄清信封(ok:true + status=NEEDS_CLARIFICATION)不是失败、更不是「0 条」:
940
1025
  // 名称/字段没对上时 CLI **没有执行查询**,把候选原样透出,交模型与用户确认后用
941
1026
  // 「名称(ID)」重发。旧实现直接走下面的空结果分支 ⇒ 用户看到「您当前没有符合条件的待办」,
942
1027
  // 与真实原因(字段重名/工作流重名)完全不同(2026-11-06 修)。
943
1028
  if (collect.data && collect.data.status === 'NEEDS_CLARIFICATION') {
944
- printClarification(collect.data, dir);
1029
+ printClarification(collect.data, dir, input);
945
1030
  return 'CLARIFICATION';
946
1031
  }
1032
+ if (args._prepareQuery === true) return collect;
947
1033
  // **两个口径必须分开**(性能调优时最容易看错的地方):
948
1034
  // - collectWallMs:脚本进程视角的墙钟,含 node 启动 + 模块加载(沙箱下 5~7s);
949
1035
  // - collectMs:CLI 自报的 collect 阶段内部耗时,只含真实业务(取数 + 归一)。
@@ -1083,7 +1169,7 @@ function cmdPrep(args) {
1083
1169
  (degrade.steps || []).map((s) => `${s.scope}=${s.total === null ? '未知' : s.total}`).join(' → '));
1084
1170
  }
1085
1171
  console.log('输出目录:%s\n', dir);
1086
- if (args._query === true) return;
1172
+ if (args._query === true) return collect;
1087
1173
  const focusKinds = focusCoversKinds(args.focus && args.focus !== true ? args.focus : '');
1088
1174
  // 规则里 focus:false 的组**必须**由模型给 aiGroups(如 安全问题处理工单),prep 阶段就标出来,
1089
1175
  // 不要等 build 报 ai_groups_required 才知道(2026-11-01 用户确认的规范缺陷)。
@@ -1411,12 +1497,122 @@ function cmdRun(args) {
1411
1497
  });
1412
1498
  }
1413
1499
 
1414
- /** 普通查询复用组件协议,但不调用任何 AI 摘要、组摘要或二次分组阶段。 */
1500
+ /** 普通查询仅保留定位、展示与优先排序需要的列表字段。 */
1501
+ const QUERY_REQUEST_FIELDS = [
1502
+ 'requestId', 'workflowId', 'workflowName', 'userMasterId', 'isremark', 'nodeId',
1503
+ 'overTime', 'userOverTime', 'curUserOverTime', 'requestLevel', 'requestLevelShow', 'requestNameTitle',
1504
+ 'creater', 'createrName', 'lastFeedBackDateTime', 'planFinishDatetime',
1505
+ 'receivedTime', 'receivedatetime', 'flowStatus', 'requestMark', 'handleStatus',
1506
+ ];
1507
+
1508
+ /** ID 兼容查询保存一级分组,使旧组件也能直接展示,不调用 AI 分组阶段。 */
1509
+ function buildQuerySections(displayItems) {
1510
+ const timestamp = value => {
1511
+ if (typeof value !== 'string' || !value.trim()) return undefined;
1512
+ const text = value.trim();
1513
+ if (/^\d{13}$/.test(text)) return Number(text);
1514
+ if (/^\d{10}$/.test(text)) return Number(text) * 1000;
1515
+ if (!/^\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/.test(text)) return undefined;
1516
+ const time = new Date(text.replace(' ', 'T')).getTime();
1517
+ return Number.isFinite(time) ? time : undefined;
1518
+ };
1519
+ const compare = (left, right, direction = 1) => left === undefined
1520
+ ? right === undefined ? 0 : 1 : right === undefined ? -1 : (left - right) * direction;
1521
+ const now = new Date();
1522
+ const today = new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime();
1523
+ const tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1).getTime();
1524
+ const excludedRemarks = new Set([20, 21, 30, 31, 40, 41, 50, 51, 60, 61, 70, 71, 80, 81]);
1525
+ const priority = displayItems.filter(({ requestData }) => {
1526
+ if (requestData.isremark === undefined || excludedRemarks.has(requestData.isremark)) return false;
1527
+ const deadline = timestamp(requestData.curUserOverTime);
1528
+ return requestData.overTime === true || (requestData.requestLevel ?? 0) >= 1
1529
+ || (deadline !== undefined && deadline >= today && deadline < tomorrow);
1530
+ }).sort(({ requestData: left }, { requestData: right }) =>
1531
+ compare(timestamp(left.curUserOverTime), timestamp(right.curUserOverTime))
1532
+ || compare(left.requestLevel, right.requestLevel, -1)
1533
+ || compare(timestamp(left.receivedatetime), timestamp(right.receivedatetime), -1)
1534
+ || String(left.requestId).localeCompare(String(right.requestId)));
1535
+ const priorityIds = new Set(priority.map(item => item.requestData.requestId));
1536
+ const workflows = new Map();
1537
+ for (const item of displayItems) {
1538
+ if (priorityIds.has(item.requestData.requestId)) continue;
1539
+ const workflowId = String(item.requestData.workflowId ?? '');
1540
+ const items = workflows.get(workflowId) || [];
1541
+ items.push(item);
1542
+ workflows.set(workflowId, items);
1543
+ }
1544
+ return [
1545
+ ...(priority.length ? [{ id: 'todo-list:priority', title: '建议优先处理的流程',
1546
+ topPriority: true, count: priority.length, defaultExpanded: true, displayItems: priority }] : []),
1547
+ ...Array.from(workflows, ([workflowId, items]) => ({
1548
+ id: `todo-list:${workflowId}`, title: items.find(item => item.requestData.workflowName)?.requestData.workflowName || '全部待办',
1549
+ topPriority: false, count: items.length, defaultExpanded: true, displayItems: items,
1550
+ })),
1551
+ ];
1552
+ }
1553
+
1554
+ function hasLocalWorkflowExclusion(args) {
1555
+ return args.exclude && args.exclude !== true && String(args.exclude).split(',').some(value => value.trim())
1556
+ && (args.workflow !== undefined || args['workflow-term'] !== undefined);
1557
+ }
1558
+
1559
+ /** 仅将确定性计数放入会话正文,不改变组件数据源或生成 AI 分组。 */
1560
+ function buildQueryDistribution(distribution, total) {
1561
+ if (!distribution || !Array.isArray(distribution.items)) return [];
1562
+ const rows = distribution.items.filter(row => row && Number.isInteger(row.count) && row.count > 0)
1563
+ .map(row => ({ workflowId: String(row.workflowId || ''), workflowName: String(row.workflowName || '未提供名称'), count: row.count }))
1564
+ .sort((a, b) => b.count - a.count);
1565
+ if (new Set(rows.map(row => row.workflowId)).size <= 1) return [];
1566
+ const counted = rows.reduce((sum, row) => sum + row.count, 0);
1567
+ const readCount = Number.isInteger(distribution.readCount) && distribution.readCount >= counted
1568
+ ? distribution.readCount : counted;
1569
+ const complete = distribution.complete === true && distribution.truncated !== true
1570
+ && total !== null && readCount === total && counted === readCount;
1571
+ const lines = ['', complete ? '**工作流分布情况**:' : `**工作流分布情况(本次读取${readCount}条)**:`,
1572
+ '| 工作流 | 总数 |', '| --- | --- |'];
1573
+ const cell = value => String(value).replace(/[\r\n\t]+/g, ' ').replace(/[\\|`*_[\]<>]/g, '\\$&');
1574
+ for (const row of rows.slice(0, 10)) lines.push(`| ${cell(row.workflowName)} | ${row.count} |`);
1575
+ if (rows.length > 10) lines.push(`| 其它 | ${rows.slice(10).reduce((sum, row) => sum + row.count, 0)} |`);
1576
+ return lines;
1577
+ }
1578
+
1415
1579
  function cmdQuery(args) {
1416
1580
  const limit = readOutputLimit(args, 'query');
1417
1581
  const dir = args.out && args.out !== true
1418
1582
  ? String(args.out)
1419
1583
  : fs.mkdtempSync(path.join(os.tmpdir(), 'todo-query-'));
1584
+ supportsOutputMode();
1585
+ if (!prepareQueryCapability || hasLocalWorkflowExclusion(args)) return cmdLegacyQuery(args, dir, limit);
1586
+ const prepared = cmdPrep({
1587
+ ...args, out: dir, limit, _query: true, _prepareQuery: true,
1588
+ focus: undefined, 'summary-chars': undefined, 'group-summary-chars': undefined,
1589
+ });
1590
+ if (prepared === 'CLARIFICATION') return;
1591
+ const query = prepared.data.query || {};
1592
+ if (!query.listQuery || typeof query.listQuery !== 'object' || Array.isArray(query.listQuery)) {
1593
+ console.error('✖ 查询条件未准备完成,本次停止交付。');
1594
+ process.exit(1);
1595
+ }
1596
+ const totalValue = Object.prototype.hasOwnProperty.call(prepared.data, 'totalCount')
1597
+ ? prepared.data.totalCount : query.totalAvailable;
1598
+ const state = { outputMode: 'query', queryMeta: { ...query, totalAvailable: totalValue } };
1599
+ const total = resolveMatchingTotal(state, 0);
1600
+ const warnings = Array.isArray(prepared.data.warnings)
1601
+ ? prepared.data.warnings.filter(value => typeof value === 'string' && value.trim()).map(value => `注意:${value.trim()}`) : [];
1602
+ if (total === 0) {
1603
+ if (warnings.length) console.log(warnings.join('\n'));
1604
+ console.log('您当前没有符合条件的待办。');
1605
+ return;
1606
+ }
1607
+ const data = { listQuery: query.listQuery, limit, ...(total === null ? {} : { totalCount: total }) };
1608
+ const lines = [...warnings, total === null ? `待办列表如下,本次最多展示${limit}条。`
1609
+ : `本次共匹配${total}条待办${total > limit ? `,本次最多展示${limit}条` : ''},清单如下:`];
1610
+ lines.push(...buildQueryDistribution(prepared.data.distribution, total));
1611
+ deliverQuery(data, state, dir, total, lines);
1612
+ }
1613
+
1614
+ /** 旧 CLI 缺少准备查询阶段时保留原交付,业务失败不重试或切换路径。 */
1615
+ function cmdLegacyQuery(args, dir, limit) {
1420
1616
  const prepResult = cmdPrep({
1421
1617
  ...args, out: dir, limit, _query: true,
1422
1618
  // 这些是摘要/二次分组偏好,不是查询条件,不让 collect 为它们准备 AI 素材。
@@ -1425,46 +1621,35 @@ function cmdQuery(args) {
1425
1621
  if (prepResult === 'EMPTY' || prepResult === 'CLARIFICATION') return;
1426
1622
  const state = readJson(path.join(dir, 'state.json'));
1427
1623
  const kept = readJson(path.join(dir, 'items.json'));
1428
- const grouped = runStage({ stage: 'smartGroup', outputMode: 'query', items: kept, withDetailContext: false }, dir, 'smartgroup');
1429
1624
  const seen = new Set();
1430
- const wfIdGroup = [];
1431
- for (const group of grouped.data.wfIdGroup || []) {
1432
- // smartGroup 的首次分组是按工作流平铺;query 不创建优先组或复制优先规则解释器。
1433
- if (group.topPriority === true || group.id === 'priority') continue;
1434
- const displayItems = [];
1435
- for (const item of group.displayItems || []) {
1436
- for (const source of item.type === 'request' ? [item.requestData] : (item.requestDatas || [])) {
1437
- if (!source || !source.requestId || seen.has(String(source.requestId))) continue;
1438
- const requestData = { ...source, summary: '' };
1439
- delete requestData._rawFields;
1440
- seen.add(String(requestData.requestId));
1441
- displayItems.push({ type: 'request', requestData });
1442
- }
1625
+ const displayItems = [];
1626
+ for (const row of kept) {
1627
+ const requestId = String(row.requestId || '').trim();
1628
+ if (!requestId) {
1629
+ console.error('✖ 普通查询结构校验失败:条目缺少流程标识,停止交付。');
1630
+ process.exit(1);
1443
1631
  }
1444
- if (displayItems.length) {
1445
- wfIdGroup.push({
1446
- id: group.id, title: group.title, count: displayItems.length,
1447
- topPriority: false, defaultExpanded: true, displayItems,
1448
- });
1632
+ if (seen.has(requestId)) continue;
1633
+ const requestData = Object.fromEntries(QUERY_REQUEST_FIELDS
1634
+ .filter(key => Object.prototype.hasOwnProperty.call(row, key))
1635
+ .map(key => [key, row[key]]));
1636
+ if (typeof requestData.curUserOverTime !== 'string' && typeof row._rawFields?.curUserOverTime === 'string') {
1637
+ requestData.curUserOverTime = row._rawFields.curUserOverTime;
1449
1638
  }
1450
- }
1451
- const expectedIds = new Set(kept.map((row) => String(row.requestId || '')).filter(Boolean));
1452
- if (seen.size !== expectedIds.size || [...expectedIds].some((id) => !seen.has(id))) {
1453
- console.error('✖ 普通查询结构校验失败:工作流清单未完整覆盖本次查询条目,停止交付。');
1454
- process.exit(1);
1639
+ if (typeof requestData.receivedatetime !== 'string' && typeof row.receivedTime === 'string') {
1640
+ requestData.receivedatetime = row.receivedTime;
1641
+ }
1642
+ requestData.requestId = requestId;
1643
+ requestData.summary = '';
1644
+ seen.add(requestId);
1645
+ displayItems.push({ type: 'request', requestData });
1455
1646
  }
1456
1647
  const count = seen.size;
1648
+ const wfIdGroup = buildQuerySections(displayItems);
1457
1649
  const payload = { smartSummaryTitle: `本次为您查询${count}条待办,清单如下:`, totalCount: count, wfIdGroup };
1458
- const baseUrl = resolveBaseUrl(state, dir);
1459
- const smartGroupId = persistPayload(payload, dir, state.prompt);
1460
- const queryMeta = state.queryMeta || {};
1461
1650
  const degradeSteps = state.degrade && Array.isArray(state.degrade.steps) ? state.degrade.steps : [];
1462
- const currentStep = state.degrade && state.degrade.applied ? degradeSteps[degradeSteps.length - 1] : degradeSteps[0];
1463
1651
  // 列表可能不带 total;只用相同查询范围的计数兜底,终点级不能借用原范围的首轮总数。
1464
- const totals = [queryMeta.totalAvailable, currentStep && currentStep.total]
1465
- .filter((value) => value !== null && value !== undefined && String(value).trim() !== '')
1466
- .map(Number);
1467
- const total = state.dropped > 0 ? null : (totals.find((value) => Number.isInteger(value) && value >= count) ?? null);
1652
+ const total = resolveMatchingTotal(state, count);
1468
1653
  const lines = [];
1469
1654
  if (state.degrade && state.degrade.applied) {
1470
1655
  const scope = describeDegradeWindow(state.degrade).replace('内到达', '到达').replace('近1个月', '近一个月');
@@ -1480,9 +1665,32 @@ function cmdQuery(args) {
1480
1665
  }
1481
1666
  if (total !== null && total > count) lines.push(`本次展示范围内还有${total - count}条未展示。`);
1482
1667
  else if (total === null && (count >= limit || state.truncated > 0)) lines.push(`本次最多展示${limit}条,尚未确认是否已覆盖全部。`);
1483
- const delivery = `<browsertool>\n${wrapBrowseToolPayload(baseUrl, smartGroupId).trimEnd()}\n</browsertool>`;
1484
- const replyBody = [...lines, '', delivery].join('\n');
1668
+ const distribution = new Map();
1669
+ for (const { requestData } of displayItems) {
1670
+ const workflowId = String(requestData.workflowId || '');
1671
+ const existing = distribution.get(workflowId);
1672
+ if (existing) existing.count += 1;
1673
+ else distribution.set(workflowId, { workflowId, workflowName: requestData.workflowName, count: 1 });
1674
+ }
1675
+ lines.push(...buildQueryDistribution({ items: [...distribution.values()], readCount: count,
1676
+ complete: total === count, truncated: state.truncated > 0 }, total));
1677
+ const nativeQuery = !hasLocalWorkflowExclusion(args) && state.queryMeta?.listQuery;
1678
+ const data = nativeQuery ? { listQuery: nativeQuery, limit, ...(total === null ? {} : { totalCount: total }) }
1679
+ : persistPayload(payload, dir, state.prompt);
1485
1680
  fs.writeFileSync(path.join(dir, 'final.data.json'), JSON.stringify(payload));
1681
+ deliverQuery(data, state, dir, total, lines);
1682
+ }
1683
+
1684
+ function deliverQuery(data, state, dir, total, lines) {
1685
+ const listQuery = data?.listQuery;
1686
+ if (listQuery?.params && typeof listQuery.params === 'object' && !Array.isArray(listQuery.params)) {
1687
+ const params = { ...listQuery.params };
1688
+ delete params.flowSpareType;
1689
+ data = { ...data, listQuery: { ...listQuery, params } };
1690
+ }
1691
+ const baseUrl = resolveBaseUrl(state, dir);
1692
+ const delivery = `<browsertool>\n${wrapBrowseToolPayload(baseUrl, data, '待办列表', { totalCount: total }).trimEnd()}\n</browsertool>`;
1693
+ const replyBody = [...lines, '', delivery].join('\n');
1486
1694
  fs.writeFileSync(path.join(dir, 'reply.md'), replyBody);
1487
1695
  console.log('\n[JSON_BEGIN]\n%s\n[JSON_END]', replyBody);
1488
1696
  console.log('交付正文已落盘:%s(原样粘贴正文与 browsertool,勿改写为旧卡片列表)', path.join(dir, 'reply.md'));
@@ -1497,8 +1705,8 @@ else if (cmd === 'finish') cmdFinish(args);
1497
1705
  else if (cmd === 'run') cmdRun(args);
1498
1706
  else {
1499
1707
  console.log('用法:node ' + path.basename(__filename) + ' <query|run|prep|build|finish> [options]');
1500
- console.log(' query [--limit 500] [筛选条件] [--out DIR] [--prompt "用户完整提示词"] # 标题清单组件,不生成 AI 摘要或二次分组;limit 为 1~1000,默认 500');
1501
- console.log(' run [--days N | --from A --to B] [--limit 100] [--out DIR] [--timing-report] [--prompt "用户完整提示词"] # 摘要默认/最多100条,较小可降低;未指定时间时按 CLI 实际规则收窄范围');
1708
+ console.log(' query [--limit 1000] [筛选条件] [--out DIR] [--prompt "用户完整提示词"] # 标题清单组件,每页500条;不生成 AI 摘要或二次分组;limit 为 1~1000,默认 1000');
1709
+ console.log(' run [--days N | --from A --to B] [--limit 100] [--out DIR] [--timing-report] [--prompt "用户完整提示词"] # 摘要默认/最多100条,沿用原工作流规则');
1502
1710
  console.log(' prep --limit 100 [--exclude 内部留言] [--days 1460] [--sub-category 待处理] [--tabid 7] [--isremarks 1,2] [--out DIR] # 小分类:--sub-category/--tabid(显式 tabid 优先);isremarks=备注筛选(数字逗号拼接)');
1503
1711
  console.log(' build --dir DIR [--plan aiGroups.json] # aiGroups 可先落盘(不传也行):build 只做首次分组+平铺,二次分组在 finish');
1504
1712
  console.log(' finish --dir DIR [--summaries aiSummaries.json] [--group-summaries aiGroupSummaries.json] [--timing-report]');
@@ -1507,7 +1715,7 @@ else {
1507
1715
  console.log(' 组摘要未回填:以 exit 0 + NEEDS_GROUP_SUMMARIES 返回(不导出),完整素材在 <out>/need-group-summaries.json;');
1508
1716
  console.log(' 在该文件补 summary 后用 --group-summaries 指回它重跑。真失败(空摘要/降级话术/要素缺失/详情失败)仍 exit 1;');
1509
1717
  console.log(' 豁免:--allow-empty-summary / --allow-detail-fail');
1510
- console.log(' 默认:载荷只带 params.data.id(smartgroup/add 落库主键);本地 serve 与 --no-serve 内联回退已于 2026-11-13 删除');
1718
+ console.log(' 默认:查询仅携带原生 listQuery 与读取上限/真实总数,由组件直接分页;摘要携带服务端 id');
1511
1719
  console.log(' 落库:finish 导出前调 POST /api/workflow/list/smartgroup/add(queryTypeId=todo_smart_group);失败即 exit 1,不降级');
1512
1720
  console.log(' queryPrompt:run/prep 传 --prompt "用户完整提示词",落库时存 queryPrompt(不传为空串)');
1513
1721
  console.log(' 提示:`--timing-report` 会在控制台打一段耗时摘要(阶段墙钟 / CLI 内部),**不产出 md**');