weaver-work-cli 0.1.62 → 0.1.64

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 (299) hide show
  1. package/dist/chunks/{archive-S2VKZWQ3.js → archive-WUZKAEZ6.js} +5 -4
  2. package/dist/chunks/{archive-oa-HEDSIUUY.js → archive-oa-PN46RTI2.js} +5 -4
  3. package/dist/chunks/{asset-HYH4W357.js → asset-ZPC5VWZM.js} +5 -4
  4. package/dist/chunks/{asset-idle-N7REBNGL.js → asset-idle-DHGP3NYY.js} +5 -4
  5. package/dist/chunks/{attachment-content-VYYA75FR.js → attachment-content-JQDW3BIB.js} +3 -3
  6. package/dist/chunks/{blog-SLMZZICV.js → blog-JC47AIXK.js} +5 -4
  7. package/dist/chunks/{caizhilian-RV43KKBT.js → caizhilian-IKIHM77A.js} +5 -5
  8. package/dist/chunks/{calendar-DMVZ4OLY.js → calendar-GZTSJ57Y.js} +5 -4
  9. package/dist/chunks/{chunk-H6YOMI3U.js → chunk-26FCCU5O.js} +5 -3
  10. package/dist/chunks/{chunk-E5YD5JWR.js → chunk-3PCXBG4H.js} +1 -1
  11. package/dist/chunks/{chunk-UBRWONP4.js → chunk-3W5NMGDS.js} +2 -2
  12. package/dist/chunks/{chunk-DTCQFTHW.js → chunk-4AFWOGOV.js} +3 -3
  13. package/dist/chunks/{chunk-VNYOUAWV.js → chunk-5QQKLR6H.js} +11 -11
  14. package/dist/chunks/{chunk-BQYX2UX5.js → chunk-6T5X6YWX.js} +5 -3
  15. package/dist/chunks/{chunk-KXJA42EA.js → chunk-AFZTMYGC.js} +1 -1
  16. package/dist/chunks/{chunk-YI2YMW5N.js → chunk-AGSO3PIK.js} +2 -2
  17. package/dist/chunks/{chunk-IW7A2IQY.js → chunk-C4YQJFZV.js} +43 -15
  18. package/dist/chunks/{chunk-WIWDVETN.js → chunk-FDBAFANU.js} +76 -76
  19. package/dist/chunks/{chunk-NRYDJN4J.js → chunk-FJUOUSV3.js} +89 -8
  20. package/dist/chunks/{chunk-EGANE35F.js → chunk-HLT6B26P.js} +1 -1
  21. package/dist/chunks/{chunk-P6TXQK75.js → chunk-HWA2A25Y.js} +5 -3
  22. package/dist/chunks/{chunk-T2KVJFWJ.js → chunk-I3MOFD6Q.js} +4 -7
  23. package/dist/chunks/chunk-IN6NXQ26.js +680 -0
  24. package/dist/chunks/{chunk-UBGWIXU3.js → chunk-INVYKG4I.js} +140 -45
  25. package/dist/chunks/{chunk-QBDXJS2W.js → chunk-K7QKQRSL.js} +168 -62
  26. package/dist/chunks/{chunk-BIA2NKUG.js → chunk-KDFEHDIB.js} +5 -5
  27. package/dist/chunks/{chunk-ILALC2N6.js → chunk-KYDXWYFB.js} +1 -1
  28. package/dist/chunks/{chunk-V2LASYKO.js → chunk-Q6D6PSMH.js} +30 -24
  29. package/dist/chunks/{chunk-UQFPF4EX.js → chunk-RMOH2GMF.js} +2 -2
  30. package/dist/chunks/{chunk-VBFBMM7G.js → chunk-SCMHG23G.js} +387 -70
  31. package/dist/chunks/chunk-TJN4PIYO.js +47 -0
  32. package/dist/chunks/{chunk-JFAWZX53.js → chunk-UPVAQJKS.js} +282 -131
  33. package/dist/chunks/{chunk-KY3R42RS.js → chunk-VLY5RTVO.js} +5 -3
  34. package/dist/chunks/{chunk-TEZHIB6T.js → chunk-WSHIOSGM.js} +5 -3
  35. package/dist/chunks/{chunk-6XSSAUNW.js → chunk-XHSEK2VM.js} +48 -12
  36. package/dist/chunks/{chunk-XT77MP54.js → chunk-YTFNMQO4.js} +410 -24
  37. package/dist/chunks/{conflict-GFJRS6I7.js → conflict-UUC7AFUI.js} +2 -2
  38. package/dist/chunks/{contract-U3ZGNRWB.js → contract-INMS7SYQ.js} +3051 -4497
  39. package/dist/chunks/{cowork-EX7PKIDK.js → cowork-34CBYVQP.js} +5 -4
  40. package/dist/chunks/{create-flow-EJZD434E.js → create-flow-YOR4QTAJ.js} +18 -6
  41. package/dist/chunks/{data-FOODGAMF.js → data-QKWI5325.js} +14 -3
  42. package/dist/chunks/{ebuilder-form-I2EOKODG.js → ebuilder-form-ZONRROK4.js} +4 -4
  43. package/dist/chunks/{ehr-TE4RFNID.js → ehr-2CONM7R6.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-S2ENJ6GZ.js} +3 -3
  46. package/dist/chunks/{env-TID5NFR6.js → env-ZSAXU5PJ.js} +2 -2
  47. package/dist/chunks/{esb-7L6MHYLB.js → esb-FQASCY2H.js} +8 -8
  48. package/dist/chunks/{factory-OG7BPMH5.js → factory-N76QQA53.js} +1 -1
  49. package/dist/chunks/{fna-6V2ENR3Y.js → fna-FCLVIWAS.js} +5 -4
  50. package/dist/chunks/{group-chat-5DKPWIHL.js → group-chat-UM665WDZ.js} +3 -3
  51. package/dist/chunks/{host-VTPAWDZV.js → host-2ED2KC4X.js} +4 -4
  52. package/dist/chunks/{host-TJ5VVHM7.js → host-2UYZEY2V.js} +4 -4
  53. package/dist/chunks/{host-3DLYA54R.js → host-46NYKDQP.js} +4 -4
  54. package/dist/chunks/{host-OGBHL75G.js → host-7IPZKIM4.js} +4 -4
  55. package/dist/chunks/{host-GOJHHTPY.js → host-P7G22WNM.js} +4 -4
  56. package/dist/chunks/{host-ONZC6AE7.js → host-XLCBLNJD.js} +4 -4
  57. package/dist/chunks/{hrm-2N7NFQDZ.js → hrm-XKL27NX2.js} +6 -6
  58. package/dist/chunks/{im-XCH47ZBN.js → im-NDYIMASG.js} +4 -4
  59. package/dist/chunks/{invoice-5KJ7T774.js → invoice-MOGNB6HN.js} +4 -4
  60. package/dist/chunks/{jiuchuanhui-PL6DRPBM.js → jiuchuanhui-3T5X7SB7.js} +5 -4
  61. package/dist/chunks/{lazy-dispatch-UATEN7H7.js → lazy-dispatch-4WOIL3ZQ.js} +5 -5
  62. package/dist/chunks/{mail-Q7Z4CQ4D.js → mail-P7VMUKQW.js} +5 -4
  63. package/dist/chunks/{meeting-5E3BNARL.js → meeting-MMTYDHXA.js} +16 -15
  64. package/dist/chunks/{minute-doc-NXRE5C77.js → minute-doc-LCSBWGJ3.js} +4 -4
  65. package/dist/chunks/{okr-3O3XNYOK.js → okr-VZXRQGS4.js} +5 -4
  66. package/dist/chunks/{operations-EZWG72FH.js → operations-MI2BSKZX.js} +5 -5
  67. package/dist/chunks/{performance-Y7CPNSOR.js → performance-OPEQNW7Y.js} +873 -17
  68. package/dist/chunks/{plan-BLGPZF5M.js → plan-TJAS4N5X.js} +5 -4
  69. package/dist/chunks/{project-6MZMLJMP.js → project-CYBGU6K6.js} +5 -4
  70. package/dist/chunks/{reception-F2VT2X52.js → reception-3FT2F66K.js} +3 -3
  71. package/dist/chunks/{recruit-stage-4ETIBMIW.js → recruit-stage-WPGB5BDJ.js} +654 -336
  72. package/dist/chunks/{registry-3FYSWV3U.js → registry-BAWCWV4D.js} +3 -3
  73. package/dist/chunks/{registry-I4DVPDMU.js → registry-FNI5E76J.js} +12 -12
  74. package/dist/chunks/{registry-3UGIWH53.js → registry-JMNOXRST.js} +2 -2
  75. package/dist/chunks/{registry-7RS74TCK.js → registry-QRMXRSCT.js} +5 -5
  76. package/dist/chunks/{room-recommend-GWCVKCXW.js → room-recommend-I7QQRHEL.js} +4 -4
  77. package/dist/chunks/{schedule-6AN63MJQ.js → schedule-3P7EWGNZ.js} +4 -4
  78. package/dist/chunks/{smart-extract-SR4SJJKN.js → smart-extract-FOBSVNYW.js} +3 -3
  79. package/dist/chunks/{workflow-KF7FA2UQ.js → workflow-U2KKTVQY.js} +10 -7
  80. package/dist/index.js +34 -34
  81. package/dist/internal/e10/auth/commands.js +203 -44
  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/error-actions.js +112 -0
  88. package/dist/shortcuts/contract/errors.js +9 -1
  89. package/dist/shortcuts/contract/index.js +14 -39
  90. package/dist/shortcuts/contract/manifest.js +130 -274
  91. package/dist/shortcuts/contract/operations/compare-report.js +437 -0
  92. package/dist/shortcuts/contract/operations/compare.js +2 -0
  93. package/dist/shortcuts/contract/operations/docx-slots.js +112 -5
  94. package/dist/shortcuts/contract/operations/docx-verify.js +2 -70
  95. package/dist/shortcuts/contract/operations/elements-build.js +82 -56
  96. package/dist/shortcuts/contract/operations/elements-spec.js +140 -3
  97. package/dist/shortcuts/contract/operations/first-screen.js +96 -207
  98. package/dist/shortcuts/contract/operations/flow.js +19 -1
  99. package/dist/shortcuts/contract/operations/{card-ebdf-list.js → ledger-card.js} +123 -27
  100. package/dist/shortcuts/contract/operations/ledger.js +343 -1
  101. package/dist/shortcuts/contract/operations/metrics.js +93 -0
  102. package/dist/shortcuts/contract/operations/modeltext.js +3 -3
  103. package/dist/shortcuts/contract/operations/money.js +90 -0
  104. package/dist/shortcuts/contract/operations/page.js +8 -4
  105. package/dist/shortcuts/contract/operations/performance.js +53 -0
  106. package/dist/shortcuts/contract/operations/placeholder-scan.js +104 -0
  107. package/dist/shortcuts/contract/operations/quote-recognize.js +326 -0
  108. package/dist/shortcuts/contract/operations/quote-ref.js +179 -0
  109. package/dist/shortcuts/contract/operations/quote-submit.js +281 -0
  110. package/dist/shortcuts/contract/operations/quote.js +66 -12
  111. package/dist/shortcuts/contract/operations/recommend.js +42 -1
  112. package/dist/shortcuts/contract/operations/registry.js +16 -23
  113. package/dist/shortcuts/contract/operations/{card-risk-report.js → review-report.js} +24 -114
  114. package/dist/shortcuts/contract/operations/review.js +33 -167
  115. package/dist/shortcuts/contract/operations/save-recognize.js +173 -43
  116. package/dist/shortcuts/contract/operations/solutions-spec.js +79 -0
  117. package/dist/shortcuts/contract/operations/triage.js +68 -15
  118. package/dist/shortcuts/contract/operations/{template.js → type-clause-read.js} +10 -25
  119. package/dist/shortcuts/contract/operations/upload.js +17 -11
  120. package/dist/shortcuts/contract/prewarm-cache.js +6 -2
  121. package/dist/shortcuts/contract/prewarm.js +33 -23
  122. package/dist/shortcuts/contract/recommend-cache.js +191 -0
  123. package/dist/shortcuts/data/operations/shared.js +14 -1
  124. package/dist/shortcuts/ehr/operations/recruit-interview-overview.js +85 -62
  125. package/dist/shortcuts/ehr/operations/recruit-position.js +21 -13
  126. package/dist/shortcuts/ehr/operations/recruit-short-cache.js +59 -0
  127. package/dist/shortcuts/ehr/operations/recruit-tag.js +17 -11
  128. package/dist/shortcuts/ehr/operations/recruit-write.js +118 -70
  129. package/dist/shortcuts/ehr/operations/recruit.js +338 -121
  130. package/dist/shortcuts/hrm/operations/employee.js +64 -17
  131. package/dist/shortcuts/hrm/operations/resolve.js +419 -369
  132. package/dist/shortcuts/im/host.js +38 -22
  133. package/dist/shortcuts/meeting/operations/eb/conflict.js +60 -2
  134. package/dist/shortcuts/meeting/operations/eb/create-flow.js +138 -15
  135. package/dist/shortcuts/meeting/operations/eb/create-form-link.js +380 -0
  136. package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
  137. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +1 -3
  138. package/dist/shortcuts/performance/flow-utils.js +363 -0
  139. package/dist/shortcuts/performance/manifest.js +2 -2
  140. package/dist/shortcuts/performance/operations/flow-detail.js +85 -0
  141. package/dist/shortcuts/performance/operations/flow-list.js +213 -0
  142. package/dist/shortcuts/performance/operations/flow-score.js +241 -0
  143. package/dist/shortcuts/performance/operations/registry.js +6 -0
  144. package/dist/shortcuts/recruit-stage/batch-store.js +44 -0
  145. package/dist/shortcuts/recruit-stage/context.js +75 -9
  146. package/dist/shortcuts/recruit-stage/manifest.js +1 -1
  147. package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -22
  148. package/dist/shortcuts/recruit-stage/operations/list.js +187 -37
  149. package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
  150. package/dist/shortcuts/recruit-stage/operations/resume-import.js +231 -313
  151. package/dist/shortcuts/recruit-stage/operations/search.js +5 -5
  152. package/dist/shortcuts/recruit-stage/operations/tag.js +286 -0
  153. package/dist/shortcuts/workflow/endpoints.js +2 -0
  154. package/dist/shortcuts/workflow/operations/form.js +12 -15
  155. package/dist/shortcuts/workflow/operations/read.js +8 -8
  156. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +3 -2
  157. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +7 -6
  158. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +4 -3
  159. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +1 -0
  160. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +33 -6
  161. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +153 -0
  162. package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +232 -0
  163. package/dist/shortcuts/workflow/operations.js +5 -0
  164. package/docs/contract.md +2 -2
  165. package/docs/e10-auth.md +55 -2
  166. package/docs/ehr.md +1 -1
  167. package/package.json +1 -1
  168. package/skills/weaver-e10-hrm/SKILL.md +3 -3
  169. package/skills/weaver-e10-hrm/references/employee.md +13 -2
  170. package/skills/weaver-e10-jinchengda/SKILL.md +283 -345
  171. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -14
  172. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +21 -12
  173. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +126 -202
  174. package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +13 -5
  175. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +28 -20
  176. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +12 -17
  177. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +7 -13
  178. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +47 -16
  179. package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +10 -18
  180. package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +19 -18
  181. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +114 -61
  182. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +8 -2
  183. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +78 -112
  184. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +67 -333
  185. package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +18 -15
  186. package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +80 -84
  187. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +38 -34
  188. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +132 -47
  189. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +108 -217
  190. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +14 -20
  191. package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +13 -7
  192. package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +86 -46
  193. package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +12 -10
  194. package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +22 -14
  195. package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +18 -18
  196. package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +27 -26
  197. package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +252 -0
  198. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +15 -23
  199. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +290 -104
  200. package/skills/weaver-e10-jinchengda/references/contract-request-status.md +5 -12
  201. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +12 -18
  202. package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +11 -17
  203. package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +5 -11
  204. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +56 -7
  205. package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +12 -12
  206. package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +10 -16
  207. package/skills/weaver-e10-jinchengda/references/orchestration.md +33 -35
  208. package/skills/weaver-e10-jucailin/SKILL.md +6 -7
  209. package/skills/weaver-e10-jucailin/agents/openai.yaml +52 -0
  210. package/skills/weaver-e10-jucailin/references/recruit-interview-overview.md +8 -6
  211. package/skills/weaver-e10-jucailin/references/recruit-read.md +4 -0
  212. package/skills/weaver-e10-jucailin/references/recruit-screening-to-interview-sop.md +2 -2
  213. package/skills/weaver-e10-jucailin/references/recruit-write.md +4 -4
  214. package/skills/weaver-e10-meeting/SKILL.md +87 -534
  215. package/skills/weaver-e10-meeting/references/commands-table.md +61 -0
  216. package/skills/weaver-e10-meeting/references/create-commands.md +136 -0
  217. package/skills/weaver-e10-meeting/references/create-flow.md +9 -7
  218. package/skills/weaver-e10-meeting/references/create-guardrails.md +23 -17
  219. package/skills/weaver-e10-meeting/references/custom-fields.md +40 -0
  220. package/skills/weaver-e10-meeting/references/eb-contracts.md +60 -0
  221. package/skills/weaver-e10-meeting/references/invitation.md +69 -0
  222. package/skills/weaver-e10-meeting/references/meeting-eb.md +26 -26
  223. package/skills/weaver-e10-meeting/references/meeting-invitation.md +2 -2
  224. package/skills/weaver-e10-meeting/references/meeting-minute-file.md +2 -2
  225. package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
  226. package/skills/weaver-e10-meeting/references/minutes-pipeline.md +119 -0
  227. package/skills/weaver-e10-meeting/references/pitfalls.md +1 -1
  228. package/skills/weaver-e10-meeting/references/room-recommend.md +88 -0
  229. package/skills/weaver-e10-performance/SKILL.md +45 -5
  230. package/skills/weaver-e10-performance/agents/openai.yaml +26 -2
  231. package/skills/weaver-e10-performance/references/flow-api.md +128 -0
  232. package/skills/weaver-e10-performance/references/flow-assess.md +149 -0
  233. package/skills/weaver-e10-recruit-stage/SKILL.md +317 -266
  234. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +22 -27
  235. package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +1 -1
  236. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +30 -27
  237. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +2 -6
  238. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +12 -10
  239. package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +2 -0
  240. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +23 -19
  241. package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +3 -1
  242. package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +18 -16
  243. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +25 -23
  244. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +10 -10
  245. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +2 -2
  246. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +11 -11
  247. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +150 -85
  248. package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +14 -18
  249. package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +1 -1
  250. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +173 -0
  251. package/skills/weaver-e10-recruit-stage/references/recruit-tag-taxonomy.json +76 -0
  252. package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +3 -1
  253. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +2 -2
  254. package/skills/weaver-e10-workflow/SKILL.md +49 -32
  255. package/skills/weaver-e10-workflow/references/todo-dialogue.md +67 -34
  256. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +65 -51
  257. package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +18 -11
  258. package/skills/weaver-e10-workflow/references/workflow-create.md +2 -2
  259. package/skills/weaver-e10-workflow/references/workflow-memory.md +19 -37
  260. package/skills/weaver-e10-workflow/references/workflow-query.md +25 -22
  261. package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
  262. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +318 -110
  263. package/skills/weaver-e10-yimiaoban/SKILL.md +17 -14
  264. package/skills/weaver-e10-yimiaoban/references/person.md +1 -1
  265. package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
  266. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +9 -9
  267. package/dist/chunks/chunk-6QYNE6HE.js +0 -658
  268. package/dist/chunks/chunk-SHYQUBY3.js +0 -48
  269. package/dist/shortcuts/contract/operations/card-action.js +0 -1266
  270. package/dist/shortcuts/contract/operations/card-plan.js +0 -393
  271. package/dist/shortcuts/contract/operations/card.js +0 -232
  272. package/dist/shortcuts/contract/operations/compare-screen.js +0 -378
  273. package/dist/shortcuts/contract/operations/quote-to-contract.js +0 -495
  274. package/dist/shortcuts/contract/operations/quotescreen.js +0 -529
  275. package/dist/shortcuts/contract/operations/summary-validate.js +0 -293
  276. package/dist/shortcuts/contract/operations/summary.js +0 -187
  277. package/dist/shortcuts/ehr/recruit-stage/batch-store.js +0 -78
  278. package/dist/shortcuts/ehr/recruit-stage/context.js +0 -231
  279. package/dist/shortcuts/ehr/recruit-stage/continuation.js +0 -74
  280. package/dist/shortcuts/ehr/recruit-stage/errors.js +0 -65
  281. package/dist/shortcuts/ehr/recruit-stage/fs-scan.js +0 -165
  282. package/dist/shortcuts/ehr/recruit-stage/host.js +0 -109
  283. package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +0 -1065
  284. package/dist/shortcuts/ehr/recruit-stage/operations/interview-feedback.js +0 -295
  285. package/dist/shortcuts/ehr/recruit-stage/operations/jd-create.js +0 -961
  286. package/dist/shortcuts/ehr/recruit-stage/operations/list.js +0 -431
  287. package/dist/shortcuts/ehr/recruit-stage/operations/registry.js +0 -50
  288. package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +0 -1655
  289. package/dist/shortcuts/ehr/recruit-stage/operations/search.js +0 -158
  290. package/dist/shortcuts/ehr/recruit-stage/operations/types.js +0 -34
  291. package/dist/shortcuts/ehr/recruit-stage/runtime.js +0 -31
  292. package/dist/shortcuts/ehr/recruit-stage/school-tiers.json +0 -318
  293. package/dist/shortcuts/ehr/recruit-stage/shared.js +0 -887
  294. package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +0 -22
  295. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +0 -554
  296. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +0 -279
  297. package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +0 -483
  298. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -46
  299. package/skills/weaver-e10-recruit-stage/lib/recruit-resume-photo.py +0 -194
@@ -2,21 +2,22 @@ import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'no
2
2
  import { dirname, resolve } from 'node:path';
3
3
  import { contractValidationError } from '../errors.js';
4
4
  /**
5
- * 合同风险审查报告渲染器(本地,零依赖)。
5
+ * 合同风险审查报告渲染器(本地,零依赖):`contract.review.report`。
6
6
  *
7
- * 迁移自 `scripts/render_risk_report.py`(2026-11-12 第二批)。
7
+ * 迁移自 `scripts/render_risk_report.py`(2026-11-12 第二批);
8
+ * 2026-11-19 改口径:报告**只以 HTML 产物文件交付**,不再产出任何卡片 payload。
8
9
  *
9
- * 约定不变:
10
- * - 输出 HTML 内**不得出现双引号**(放进 customParams.html 会被截断);
10
+ * 约定:
11
+ * - `out` **必填**,每次调用都把 HTML 写盘并返回 `data.out` 产物路径;
12
+ * - 交付方式:产物文件 + `open_web` 打开 `file:///` 预览(不出卡片、不注入面板);
13
+ * - 输出 HTML 内**不得出现双引号**(历史原因来自 customParams.html,现由 lint 继续兜底);
11
14
  * - 统计只保留三项:审查规则总数 / 判定无风险 / 判定有风险;
12
- * - 「查看审查详情」按钮通过 rightPanel.open 打开 AIContractV2 审查组件。
15
+ * - 报告内**不含任何跳转 / 详情按钮**(原「查看审查详情」按钮随 rightPanel + AIContractV2 一并移除;
16
+ * 详情入口由对话侧的 `open_web` + `tab=RiskReview` 提供),只保留「下载报告」。
13
17
  *
14
18
  * 模板内嵌在源码中:CLI 以 npm 包装安装后 `dist/` 与 `skills/` 相对位置不稳定,
15
19
  * 依赖外部模板文件会在打包场景下静默失效。显式传 `template` 才读外部文件。
16
20
  */
17
- const DEFAULT_AIID = '1326842382967570463';
18
- const DEFAULT_SRC_PATH = '/sp/contract/business/ai-contract';
19
- const DEFAULT_BASE = 'https://www.e-cology.com.cn';
20
21
  const DEFAULT_TEMPLATE = `<section id='{{CARD_ID}}' style='padding:16px 18px;font-family:sans-serif;background:#fafbfd;border-radius:12px'>
21
22
 
22
23
  <div style='display:flex;align-items:center;justify-content:space-between;margin-bottom:16px'>
@@ -26,7 +27,6 @@ const DEFAULT_TEMPLATE = `<section id='{{CARD_ID}}' style='padding:16px 18px;fon
26
27
  </div>
27
28
  <div style='flex:0 0 auto;display:flex;align-items:center;gap:8px'>
28
29
  <button type='button' data-act='download' style='background:#fff;color:#1d6fd8;border:1px solid #1d6fd8;border-radius:8px;padding:8px 16px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit'>下载报告</button>
29
- <button type='button' data-act='detail' style='background:#1d6fd8;color:#fff;border:none;border-radius:8px;padding:9px 18px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit'>查看审查详情</button>
30
30
  </div>
31
31
  </div>
32
32
 
@@ -84,29 +84,6 @@ const DEFAULT_TEMPLATE = `<section id='{{CARD_ID}}' style='padding:16px 18px;fon
84
84
  var statusEl = root.querySelector('[data-status]');
85
85
  function say(m) { if (statusEl) { statusEl.textContent = m; } }
86
86
 
87
- function getPlugin() {
88
- if (window.xiaoePlugin) { return window.xiaoePlugin; }
89
- if (window.rawWindow && window.rawWindow.xiaoePlugin) { return window.rawWindow.xiaoePlugin; }
90
- return null;
91
- }
92
-
93
- var DETAIL_CFG = {{DETAIL_CFG}};
94
-
95
- function openDetail() {
96
- var plugin = getPlugin();
97
- if (!plugin || !plugin.rightPanel || typeof plugin.rightPanel.open !== 'function') {
98
- say('当前环境不支持打开右侧面板,请在小e客户端内查看');
99
- return;
100
- }
101
- say('正在打开审查详情…');
102
- try {
103
- plugin.rightPanel.open(DETAIL_CFG);
104
- say('');
105
- } catch (err) {
106
- say('审查详情打开失败,请确认右侧面板已挂载');
107
- }
108
- }
109
-
110
87
  // 导出前先克隆,去掉脚本、按钮与提示位,得到干净的静态报告
111
88
  function cleanClone() {
112
89
  var clone = root.cloneNode(true);
@@ -162,7 +139,6 @@ const DEFAULT_TEMPLATE = `<section id='{{CARD_ID}}' style='padding:16px 18px;fon
162
139
  }
163
140
  t = t.parentNode;
164
141
  }
165
- if (act === 'detail') { openDetail(); return; }
166
142
  if (act === 'download') { downloadReport(); return; }
167
143
  });
168
144
 
@@ -176,7 +152,6 @@ const DEFAULT_TEMPLATE = `<section id='{{CARD_ID}}' style='padding:16px 18px;fon
176
152
  }
177
153
  t = t.parentNode;
178
154
  }
179
- if (act === 'detail') { t.style.background = '#1659b8'; }
180
155
  if (act === 'download') { t.style.background = '#eef4fd'; }
181
156
  });
182
157
 
@@ -190,7 +165,6 @@ const DEFAULT_TEMPLATE = `<section id='{{CARD_ID}}' style='padding:16px 18px;fon
190
165
  }
191
166
  t = t.parentNode;
192
167
  }
193
- if (act === 'detail') { t.style.background = '#1d6fd8'; }
194
168
  if (act === 'download') { t.style.background = '#fff'; }
195
169
  });
196
170
  })();
@@ -333,10 +307,6 @@ function mergeMeta(data, meta) {
333
307
  setDefault('partyA', truthyText(meta.partyA));
334
308
  setDefault('partyB', truthyText(meta.partyB));
335
309
  setDefault('reviewDate', truthyText(meta.reviewDate));
336
- data.fileId = truthyText(meta.fileId) || truthyText(data.fileId);
337
- data.fileName = truthyText(meta.fileName) || truthyText(data.fileName);
338
- data.aiid = truthyText(meta.aiid) || DEFAULT_AIID;
339
- data.base = truthyText(meta.baseUrl) || DEFAULT_BASE;
340
310
  data.cardId = truthyText(meta.cardId) || truthyText(data.cardId) || `cr-report-${truthyText(data.stamp) || '000'}`;
341
311
  const datePart = truthyText(data.reviewDate).split('-').join('') || 'report';
342
312
  data.fileBase = safeName(`风险审查报告_${truthyText(data.contract)}_${datePart}`);
@@ -391,31 +361,6 @@ function passTags(d) {
391
361
  });
392
362
  return out.join('');
393
363
  }
394
- /** rightPanel.open 的 e10Sdk 配置,单引号序列化(ES5 安全)。 */
395
- function detailCfg(d) {
396
- const cfg = {
397
- type: 'e10Sdk',
398
- width: 1300,
399
- contentProps: {
400
- src: `${truthyText(d.base)}${DEFAULT_SRC_PATH}`,
401
- sdkOptions: {
402
- compName: 'ui.CorsComponent',
403
- routerType: 'MemoryRouter',
404
- routerProps: { initialEntries: [DEFAULT_SRC_PATH] },
405
- params: {
406
- app: '@weapp/contract',
407
- compName: 'AIContractV2',
408
- aiProps: {
409
- aiid: truthyText(d.aiid),
410
- fileId: truthyText(d.fileId),
411
- fileName: truthyText(d.fileName),
412
- },
413
- },
414
- },
415
- },
416
- };
417
- return JSON.stringify(cfg).replace(/"/gu, "'");
418
- }
419
364
  export function renderRiskReport(d, template) {
420
365
  const cardId = truthyText(d.cardId) || `cr-report-${truthyText(d.stamp) || '000'}`;
421
366
  return template
@@ -429,32 +374,7 @@ export function renderRiskReport(d, template) {
429
374
  .split('{{RISK_COUNT}}').join(String(d.risk ?? 0))
430
375
  .split('{{RISK_ITEMS}}').join(riskItems(d))
431
376
  .split('{{PASS_COUNT}}').join(String(d.noRisk ?? 0))
432
- .split('{{PASS_TAGS}}').join(passTags(d))
433
- .split('{{DETAIL_CFG}}').join(detailCfg(d));
434
- }
435
- export function buildRiskPayload(html, d, callId) {
436
- return {
437
- version: 1,
438
- callId,
439
- toolId: 'fill_form',
440
- arguments: {
441
- type: 'e10',
442
- title: truthyText(d.title) || '合同风险审查报告',
443
- src: `${truthyText(d.base)}/sp/contract/xiaoe-custom-page`,
444
- width: 1300,
445
- sdkRenderType: 'inline',
446
- sdkOptions: {
447
- compName: 'ui.CorsComponent',
448
- routerType: 'MemoryRouter',
449
- routerProps_pc: { initialEntries: ['/sp/contract/xiaoe-custom-page'] },
450
- params_pc: {
451
- app: '@weapp/contract',
452
- compName: 'xiaoeCustomPage',
453
- customParams: { html },
454
- },
455
- },
456
- },
457
- };
377
+ .split('{{PASS_TAGS}}').join(passTags(d));
458
378
  }
459
379
  /** 交付前自检:双引号数量、ES5 语法禁用项。 */
460
380
  export function lintRiskHtml(html) {
@@ -472,17 +392,16 @@ export function lintRiskHtml(html) {
472
392
  return { problems, js };
473
393
  }
474
394
  const META_KEYS = [
475
- 'contract', 'partyA', 'partyB', 'reviewDate', 'fileId', 'fileName',
476
- 'aiid', 'baseUrl', 'cardId', 'callId', 'title',
395
+ 'contract', 'partyA', 'partyB', 'reviewDate', 'cardId',
477
396
  ];
478
397
  /**
479
- * 渲染合同风险审查报告卡片。
398
+ * 渲染合同风险审查报告 HTML 产物。
480
399
  *
481
400
  * 入参二选一:`ref`(CLI 落盘审查结果,含 envelope)或 `data`(已归一化 report_data.json)。
482
- * 输出 HTML 不默认落盘(报告只作为卡片交付);显式传 `out` 才写文件。
401
+ * `out` 必填:报告只以 HTML 产物文件交付,不出卡片、不注入面板。
483
402
  */
484
- export const contractCardRiskReportOperation = {
485
- name: 'contract.card.risk-report',
403
+ export const contractReviewReportOperation = {
404
+ name: 'contract.review.report',
486
405
  async execute(input) {
487
406
  const refPath = typeof input.ref === 'string' && input.ref.trim() ? resolve(input.ref.trim()) : '';
488
407
  const dataPath = typeof input.data === 'string' && input.data.trim() ? resolve(input.data.trim()) : '';
@@ -529,21 +448,13 @@ export const contractCardRiskReportOperation = {
529
448
  writeFileSync(dumpPath, JSON.stringify(data, null, 2), 'utf8');
530
449
  dumpDataOut = dumpPath;
531
450
  }
532
- let htmlOut;
533
- if (typeof input.out === 'string' && input.out.trim()) {
534
- htmlOut = resolve(input.out.trim());
535
- mkdirSync(dirname(htmlOut), { recursive: true });
536
- writeFileSync(htmlOut, html, 'utf8');
537
- }
538
- let payloadOut;
539
- let payload;
540
- if (typeof input.payload === 'string' && input.payload.trim()) {
541
- const callId = truthyText(input.callId) || `contract-risk-report-${truthyText(data.stamp) || '000'}`;
542
- payload = buildRiskPayload(html, data, callId);
543
- payloadOut = resolve(input.payload.trim());
544
- mkdirSync(dirname(payloadOut), { recursive: true });
545
- writeFileSync(payloadOut, JSON.stringify(payload, null, 2), 'utf8');
451
+ const outInput = typeof input.out === 'string' ? input.out.trim() : '';
452
+ if (!outInput) {
453
+ throw contractValidationError('out_required', '缺少 out:报告只以 HTML 产物文件交付,必须显式给出输出绝对路径(不再支持只出卡片、不落盘的调用)');
546
454
  }
455
+ const htmlOut = resolve(outInput);
456
+ mkdirSync(dirname(htmlOut), { recursive: true });
457
+ writeFileSync(htmlOut, html, 'utf8');
547
458
  return {
548
459
  status: 'COMPLETE',
549
460
  data: {
@@ -555,11 +466,10 @@ export const contractCardRiskReportOperation = {
555
466
  lintProblems: problems,
556
467
  ...(js ? { scriptLength: js.length } : {}),
557
468
  ...(dumpDataOut ? { dumpData: dumpDataOut } : {}),
558
- ...(htmlOut ? { output: htmlOut } : {}),
559
- ...(payloadOut && payload ? { payload: payloadOut, callId: payload.callId } : {}),
560
- note: htmlOut ? '' : '未传 out:按约定报告只作为卡片交付,不落盘',
469
+ out: htmlOut,
470
+ note: '报告已落盘;交付方式为产物文件 + open_web 打开该文件的 file:/// 绝对路径(不出卡片)',
561
471
  },
562
472
  };
563
473
  },
564
474
  };
565
- export const contractCardRiskReportOperations = [contractCardRiskReportOperation];
475
+ export const contractReviewReportOperations = [contractReviewReportOperation];
@@ -1,14 +1,33 @@
1
1
  import { existsSync, readFileSync, statSync } from 'node:fs';
2
2
  import { resolve } from 'node:path';
3
3
  import { contractValidationError } from '../errors.js';
4
- import { reviewPageUrl } from './page.js';
5
4
  import { requireNonEmptyString } from './shared.js';
6
- import { assertContractDocument, uploadFile } from './upload.js';
7
- import { AI_REVIEW_PREWARM_FLOW_ID, ensurePrewarmed, prewarmAll } from '../prewarm.js';
8
5
  /** 固定 AI 审查助手 ID,只用于导出审查记录接口,不要拼到审查页地址上。 */
9
6
  export const AI_REVIEW_ASSISTANT_ID = '1326842382967570463';
10
- export { AI_REVIEW_PREWARM_FLOW_ID };
11
- const MAX_FILES = 10;
7
+ /**
8
+ * 审查链路只保留「取结果」两个出口:`contract.review.export` / `contract.review.digest`。
9
+ *
10
+ * 2026-11-19 定稿:**不存在单独的预审上传通道**——`contract.review.upload` 与
11
+ * `contract.review.prewarm` 已从 CLI 移除。合同上传一律走流程通道
12
+ * (`contract.firstscreen.run` / `contract.flow.launch`,module=`workflow`),
13
+ * 流程上传在收口时**自动触发预审预热**(见 `upload.ts` 的 `finish()`);
14
+ * 比对文件走比对通道(module=`docCompared`)。本文件不再承担任何上传职责。
15
+ */
16
+ /**
17
+ * 取审查结果的 `flowId` 只能由调用方动态给:它等于合同智能页(助手 URL)上的 `flowId`,
18
+ * 也就是本轮合同流程的 `workflowId`。
19
+ *
20
+ * 2026-11-19 用户定稿:**禁止再用任何写死的流程 ID 兜底**。原实现缺省写死
21
+ * `1269716062340284522`(恰好是新客户流程的 workflowId),只有走新客户流程时能取到结果,
22
+ * 其余三个流程(契约锁 / 老客户增值 / 常规二次销售)会按错误的流程键去查,取回空记录。
23
+ * 该值与预热 `saveInternalRecord` 必须同键同值,因此缺失时直接报错、不静默降级。
24
+ */
25
+ function requireReviewFlowId(value) {
26
+ if (value === undefined || value === null || value === '') {
27
+ throw contractValidationError('flowId_required', 'flowId 必传,且必须等于助手 URL 上的 flowId(= 本轮合同流程 workflowId,取 firstscreen.run / flow.launch 返回的 workflowId);该值随流程动态变化,CLI 不再有固定兜底值');
28
+ }
29
+ return requireNonEmptyString(value, 'flowId', 64);
30
+ }
12
31
  /** 合同预审固定只走风险审查,sclx 取值为 8(2026-11-09 用户确认)。 */
13
32
  export const CONTRACT_REVIEW_SCLX = '8';
14
33
  /**
@@ -164,161 +183,6 @@ function readPersistedEnvelope(path) {
164
183
  return envelope && typeof envelope === 'object' ? envelope : parsed;
165
184
  }
166
185
  export const contractReviewOperations = [
167
- {
168
- name: 'contract.review.upload',
169
- async execute(input, { host }) {
170
- const prewarmEnabled = input.prewarm !== false;
171
- const existingIds = input.fileIds;
172
- // ---- 路径一:复用当前会话已有的 fileId(2026-11-12 用户定稿)----
173
- // 预审与 module 无关,所以只要手上已有 fileId 就直接用,不必重新上传。
174
- // 典型场景:发起流程时已经上传过,点「预审」时不该再传一遍。
175
- if (existingIds !== undefined) {
176
- if (input.paths !== undefined) {
177
- throw contractValidationError('input_conflict', 'paths 与 fileIds 只能二选一:要么本地上传,要么复用已有 fileId');
178
- }
179
- if (!Array.isArray(existingIds) || existingIds.length === 0) {
180
- throw contractValidationError('file_ids_required', 'fileIds 必须是非空的 fileId 数组');
181
- }
182
- if (existingIds.length > MAX_FILES) {
183
- throw contractValidationError('file_ids_too_many', `一次最多处理 ${MAX_FILES} 份合同`);
184
- }
185
- const names = Array.isArray(input.fileNames) ? input.fileNames : [];
186
- const files = existingIds.map((rawItem, index) => {
187
- const fileId = requireNonEmptyString(rawItem, `fileIds[${index}]`, 64).trim();
188
- const name = typeof names[index] === 'string' ? String(names[index]) : '';
189
- return { fileId, name, size: 0, md5: '', reused: true };
190
- });
191
- const prewarm = prewarmEnabled ? await ensurePrewarmed(host, files.map((file) => file.fileId)) : null;
192
- const warnings = (prewarm?.results ?? [])
193
- .filter((item) => !item.ok)
194
- .map((item) => `预审预热失败(fileId ${item.fileId}):${item.error}`);
195
- if (!prewarmEnabled) {
196
- warnings.push('已按 prewarm=false 跳过预审预热,打开审查页时才会开始跑预审');
197
- }
198
- const session = await host.getSession();
199
- return {
200
- status: 'COMPLETE',
201
- data: {
202
- files,
203
- reusedFileIds: true,
204
- prewarm: prewarm
205
- ? {
206
- flowId: AI_REVIEW_PREWARM_FLOW_ID,
207
- enabled: true,
208
- okCount: prewarm.okCount,
209
- failCount: prewarm.failCount,
210
- skippedCount: prewarm.skippedCount,
211
- results: prewarm.results,
212
- }
213
- : { flowId: AI_REVIEW_PREWARM_FLOW_ID, enabled: false },
214
- warnings,
215
- url: reviewPageUrl(session.baseUrl, files),
216
- page: { width: 1300 },
217
- note: '已复用会话中已有的 fileId,未重新上传;预审与 module 无关,可直接打开审查页',
218
- },
219
- };
220
- }
221
- // ---- 路径二:本地上传(uploadFile 内部已触发预热)----
222
- const paths = input.paths;
223
- if (!Array.isArray(paths) || paths.length === 0) {
224
- throw contractValidationError('paths_required', 'paths 必须是非空的本地合同文件路径数组,或改用 fileIds 复用已有文件');
225
- }
226
- if (paths.length > MAX_FILES) {
227
- throw contractValidationError('paths_too_many', `一次最多上传 ${MAX_FILES} 份合同`);
228
- }
229
- const files = [];
230
- for (const rawPath of paths) {
231
- const path = requireNonEmptyString(rawPath, 'paths[]', 1000);
232
- assertContractDocument(path);
233
- files.push(await uploadFile(host, { path, module: 'ebContract', prewarm: prewarmEnabled }));
234
- }
235
- // uploadFile 已在上传成功那一刻触发过预热;这里再调一次 ensurePrewarmed 只是兜底,
236
- // 命中"本轮已预热"会直接跳过,不会重复请求接口。
237
- const prewarm = prewarmEnabled
238
- ? await ensurePrewarmed(host, files.map((file) => file.fileId))
239
- : null;
240
- const warnings = (prewarm?.results ?? [])
241
- .filter((item) => !item.ok)
242
- .map((item) => `预审预热失败(fileId ${item.fileId}):${item.error}`);
243
- if (!prewarmEnabled) {
244
- warnings.push('已按 prewarm=false 跳过预审预热,打开审查页时才会开始跑预审');
245
- }
246
- const session = await host.getSession();
247
- return {
248
- status: 'COMPLETE',
249
- data: {
250
- files,
251
- reusedFileIds: false,
252
- prewarm: prewarm
253
- ? {
254
- flowId: AI_REVIEW_PREWARM_FLOW_ID,
255
- enabled: true,
256
- okCount: prewarm.okCount,
257
- failCount: prewarm.failCount,
258
- skippedCount: prewarm.skippedCount,
259
- results: prewarm.results,
260
- }
261
- : { flowId: AI_REVIEW_PREWARM_FLOW_ID, enabled: false },
262
- warnings,
263
- url: reviewPageUrl(session.baseUrl, files),
264
- page: { width: 1300 },
265
- note: '上传完成并已触发预审预热(同一 fileId 只触发一次);把 url 原样放进 browsertool 的 arguments.url,并带 width: 1300;不要做整体编码',
266
- },
267
- };
268
- },
269
- },
270
- {
271
- name: 'contract.review.prewarm',
272
- async execute(input, { host }) {
273
- const fileId = requireNonEmptyString(input.fileId, 'fileId', 64).trim();
274
- if (input.fileIds !== undefined) {
275
- throw contractValidationError('input_conflict', 'fileId 与 fileIds 只能二选一');
276
- }
277
- // 显式补触发:默认绕过本地去重,确保真的发一次请求。
278
- const force = input.force !== false;
279
- const summary = await ensurePrewarmed(host, [fileId], { force });
280
- const result = summary.results[0];
281
- if (!result || !result.ok) {
282
- // 独立调用时用户是显式要预热,失败要如实报错而不是静默吞掉。
283
- throw new Error(`预审预热失败:${result?.error ?? '未知原因'}`);
284
- }
285
- return {
286
- status: 'COMPLETE',
287
- data: {
288
- fileId,
289
- flowId: AI_REVIEW_PREWARM_FLOW_ID,
290
- prewarmed: true,
291
- note: '已触发预审预处理,服务端开始跑预审;稍后打开审查页即可看到结果',
292
- },
293
- };
294
- },
295
- },
296
- {
297
- name: 'contract.review.prewarm.batch',
298
- async execute(input, { host }) {
299
- const raw = input.fileIds;
300
- if (!Array.isArray(raw) || raw.length === 0) {
301
- throw contractValidationError('file_ids_required', 'fileIds 必须是非空的 fileId 数组');
302
- }
303
- if (raw.length > MAX_FILES) {
304
- throw contractValidationError('file_ids_too_many', `一次最多预热 ${MAX_FILES} 份文件`);
305
- }
306
- const fileIds = raw.map((item, index) => requireNonEmptyString(item, `fileIds[${index}]`, 64).trim());
307
- const results = await prewarmAll(host, fileIds);
308
- return {
309
- status: results.every((item) => item.ok) ? 'COMPLETE' : 'PARTIAL',
310
- data: {
311
- flowId: AI_REVIEW_PREWARM_FLOW_ID,
312
- okCount: results.filter((item) => item.ok).length,
313
- failCount: results.filter((item) => !item.ok).length,
314
- results,
315
- warnings: results
316
- .filter((item) => !item.ok)
317
- .map((item) => `预审预热失败(fileId ${item.fileId}):${item.error}`),
318
- },
319
- };
320
- },
321
- },
322
186
  {
323
187
  name: 'contract.review.export',
324
188
  async execute(input, { host }) {
@@ -327,9 +191,8 @@ export const contractReviewOperations = [
327
191
  // 请求体与前端实际调用保持一致:flowId + sclx + fileId。
328
192
  // 注意:不要带 ai_id —— 带上会导致服务端返回空记录(2026-11-09 实测)。
329
193
  // 预审与文件上传时的 module 无关,任何来源的 fileId 都可导出。
330
- const flowId = (input.flowId === undefined || input.flowId === null || input.flowId === '')
331
- ? AI_REVIEW_PREWARM_FLOW_ID
332
- : requireNonEmptyString(input.flowId, 'flowId', 64);
194
+ // flowId 必须是助手 URL 上那个动态值(= 本轮 workflowId),与预热同键同值。
195
+ const flowId = requireReviewFlowId(input.flowId);
333
196
  const value = await host.contractRequest({
334
197
  method: 'POST',
335
198
  path: '/api/ebd/contract/ai/getAiReviewRecord',
@@ -345,6 +208,7 @@ export const contractReviewOperations = [
345
208
  status: records.length ? 'COMPLETE' : 'EMPTY',
346
209
  data: {
347
210
  fileId,
211
+ flowId,
348
212
  sclx,
349
213
  aiId: AI_REVIEW_ASSISTANT_ID,
350
214
  hasContent: records.length > 0,
@@ -380,6 +244,8 @@ export const contractReviewOperations = [
380
244
  let records;
381
245
  let sclx = CONTRACT_REVIEW_SCLX;
382
246
  let source = 'api';
247
+ // 走接口时必填:助手 URL 上那个动态 flowId(= 本轮 workflowId),与预热同键同值。
248
+ let flowId = '';
383
249
  if (refPath) {
384
250
  const envelope = readPersistedEnvelope(refPath);
385
251
  records = collectRecords(envelope);
@@ -390,9 +256,7 @@ export const contractReviewOperations = [
390
256
  }
391
257
  else {
392
258
  sclx = normalizeSclx(input.sclx);
393
- const flowId = (input.flowId === undefined || input.flowId === null || input.flowId === '')
394
- ? AI_REVIEW_PREWARM_FLOW_ID
395
- : requireNonEmptyString(input.flowId, 'flowId', 64);
259
+ flowId = requireReviewFlowId(input.flowId);
396
260
  const value = await host.contractRequest({
397
261
  method: 'POST',
398
262
  path: '/api/ebd/contract/ai/getAiReviewRecord',
@@ -406,10 +270,11 @@ export const contractReviewOperations = [
406
270
  status: 'EMPTY',
407
271
  data: {
408
272
  fileId,
273
+ ...(flowId ? { flowId } : {}),
409
274
  sclx,
410
275
  source,
411
276
  hasContent: false,
412
- note: '该文件暂无审查结果:若刚触发预审,需等待审查跑完再取;确认 sclx=8 且未带 ai_id',
277
+ note: '该文件暂无审查结果:若刚触发预审,需等待审查跑完再取;确认 sclx=8、未带 ai_id,且 flowId 与本轮助手 URL(= workflowId)及预热接口完全一致',
413
278
  },
414
279
  };
415
280
  }
@@ -429,6 +294,7 @@ export const contractReviewOperations = [
429
294
  status: 'COMPLETE',
430
295
  data: {
431
296
  fileId,
297
+ ...(flowId ? { flowId } : {}),
432
298
  sclx,
433
299
  source,
434
300
  hasContent: digest.hasContent,