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
@@ -26,9 +26,11 @@ import {
26
26
  import {
27
27
  E10_REAUTH_GUIDANCE,
28
28
  createFetchTimingSink,
29
- hasXiaoEEnv,
30
29
  runWithFetchTiming
31
- } from "./chunk-WIWDVETN.js";
30
+ } from "./chunk-TJN4PIYO.js";
31
+ import {
32
+ hasXiaoEEnv
33
+ } from "./chunk-FDBAFANU.js";
32
34
 
33
35
  // src/shortcuts/workflow/operations/form.ts
34
36
  import { randomUUID } from "node:crypto";
@@ -237,6 +239,8 @@ var WORKFLOW_ENDPOINTS = {
237
239
  /** 待办总数 / 列表 */
238
240
  TODO_TOTAL: "/api/workflow/list/total/getTodoListTotal",
239
241
  TODO_LIST: "/api/workflow/list/data/getTodoListData",
242
+ /** 待办分类树:流程大类/父类型下的工作流名称与归属类型。 */
243
+ TODO_TREE: "/api/workflow/list/tree/getTodoListTree",
240
244
  /** 待办分组计数(按工作流/参与节点/参与身份三元组) */
241
245
  TODO_GROUP_STAT: "/api/workflow/list/count/getTodoGroupCount",
242
246
  /** 智能分组:AI 待办汇总产物落库(返回落库主键 id;2026-11-13 用户定稿) */
@@ -980,7 +984,7 @@ function clarificationCandidates(items, limit) {
980
984
  display: `${item.name}(${item.id})`
981
985
  }));
982
986
  }
983
- async function resolveTerm(env, systemKey, rawValue, label) {
987
+ async function resolveTerm(env, systemKey, rawValue, label, workflowNameMatch) {
984
988
  const text = asString(rawValue);
985
989
  if (!text) return null;
986
990
  const parsed = parseNameWithId(text);
@@ -1002,15 +1006,15 @@ async function resolveTerm(env, systemKey, rawValue, label) {
1002
1006
  );
1003
1007
  }
1004
1008
  const exact = candidates.filter((item) => item.name.trim().toLowerCase() === text.trim().toLowerCase());
1005
- if (exact.length === 1) return exact[0];
1009
+ if (exact.length === 1 && workflowNameMatch !== "all") return exact[0];
1006
1010
  if (candidates.length === 1) return candidates[0];
1007
- const selected = exact.length ? exact : candidates;
1011
+ const selected = exact.length && workflowNameMatch !== "all" ? exact : candidates;
1008
1012
  if (selected.length === 1) return selected[0];
1009
1013
  throw workflowClarificationError(
1010
1014
  clarificationType,
1011
1015
  text,
1012
1016
  `${label}\u300C${text}\u300D\u5339\u914D\u5230 ${selected.length} \u4E2A\u5019\u9009\u9879\uFF0C\u8BF7\u786E\u8BA4\u8981\u67E5\u8BE2\u7684\u5177\u4F53${label}\u3002`,
1013
- clarificationCandidates(selected, 10)
1017
+ clarificationCandidates(selected, systemKey === "workflowid" ? selected.length : 10)
1014
1018
  );
1015
1019
  }
1016
1020
  async function resolveTermForNotin(env, systemKey, rawValue, label) {
@@ -1027,7 +1031,7 @@ async function resolveTermForNotin(env, systemKey, rawValue, label) {
1027
1031
  SYSTEM_CLARIFICATION_TYPES[systemKey],
1028
1032
  text,
1029
1033
  `${label}\u300C${text}\u300D\u5339\u914D\u5230 ${candidates.length} \u4E2A\u5019\u9009\u9879\u4E14\u65E0\u5168\u540D\u7CBE\u786E\u5339\u914D\uFF0C\u6392\u9664\u8303\u56F4\u4E0D\u660E\u786E\uFF0C\u8BF7\u786E\u8BA4\u8981\u6392\u9664\u7684\u5177\u4F53${label}\u3002`,
1030
- clarificationCandidates(candidates, 10)
1034
+ clarificationCandidates(candidates, systemKey === "workflowid" ? candidates.length : 10)
1031
1035
  );
1032
1036
  }
1033
1037
  async function fetchRequestLevels(env) {
@@ -1453,7 +1457,7 @@ async function resolveFilterFieldItem(env, raw, fields, workflowLabel, ordinal)
1453
1457
  `\u5B57\u6BB5\u300C${field.fieldName}\u300D\u7684\u7EC4\u4EF6\u7C7B\u578B ${field.componentKey} \u6682\u4E0D\u652F\u6301\u4F5C\u4E3A\u7B5B\u9009\u6761\u4EF6\uFF08filterFields \u7B2C ${ordinal} \u9879\uFF09\uFF0C\u672C\u6B21\u67E5\u8BE2\u5DF2\u505C\u6B62\u3002\u8BF7\u6539\u7528\u6587\u672C/\u6570\u503C/\u65E5\u671F/\u9009\u9879\u7C7B\u5B57\u6BB5\u3002`
1454
1458
  );
1455
1459
  }
1456
- async function buildSearchQuery(env, args, mode) {
1460
+ async function buildSearchQuery(env, args, mode, options = {}) {
1457
1461
  const rawJson = args.queryJson;
1458
1462
  let query;
1459
1463
  if (rawJson && typeof rawJson === "object") {
@@ -1547,7 +1551,7 @@ async function buildSearchQuery(env, args, mode) {
1547
1551
  if (workflows && workflows.length) {
1548
1552
  const seenWorkflowIds = /* @__PURE__ */ new Set();
1549
1553
  for (const w of workflows) {
1550
- const resolvedList = workflowTerm === "notin" ? await resolveTermForNotin(env, "workflowid", w, "\u5DE5\u4F5C\u6D41") : [await resolveTerm(env, "workflowid", w, "\u5DE5\u4F5C\u6D41")].filter(
1554
+ const resolvedList = workflowTerm === "notin" ? await resolveTermForNotin(env, "workflowid", w, "\u5DE5\u4F5C\u6D41") : [await resolveTerm(env, "workflowid", w, "\u5DE5\u4F5C\u6D41", options.workflowNameMatch)].filter(
1551
1555
  (resolved) => resolved !== null
1552
1556
  );
1553
1557
  if (workflowTerm === "notin" && resolvedList.length === 0) notinMisses.push(String(w));
@@ -5284,9 +5288,8 @@ var READONLY_COMPONENTS = /* @__PURE__ */ new Set([
5284
5288
  "subtablecontrol",
5285
5289
  "mobileinteraction"
5286
5290
  ]);
5287
- function isBrowserLikeComponentKey(componentKey) {
5288
- const normalized = String(componentKey ?? "").toLowerCase();
5289
- return normalized === "einvoicecomponent" || normalized === "filecomponent";
5291
+ function isInvoiceComponentKey(componentKey) {
5292
+ return String(componentKey ?? "").toLowerCase() === "einvoicecomponent";
5290
5293
  }
5291
5294
  var SYSTEM_FIELD_KEYS = {
5292
5295
  REQUEST_NAMEL: "\u6D41\u7A0B\u6807\u9898",
@@ -6666,7 +6669,7 @@ async function buildCreateFormData(workflowId, env, options = {}) {
6666
6669
  for (const key of ["isBrowser", "isSelect", "isMultiple", "browserType", "browserModule"]) {
6667
6670
  if (field[key]) item[key] = field[key];
6668
6671
  }
6669
- if (!item.isBrowser && isBrowserLikeComponentKey(field.componentKey)) item.isBrowser = true;
6672
+ if (!item.isBrowser && isInvoiceComponentKey(field.componentKey)) item.isBrowser = true;
6670
6673
  if (String(field.componentKey ?? "").toLowerCase() === "employeescope") item.isEmployeeScope = true;
6671
6674
  if (String(field.componentKey ?? "").toLowerCase() === "einvoicecomponent") item.isEinvoice = true;
6672
6675
  if (String(field.componentKey ?? "").toLowerCase() === "filecomponent") {
@@ -8482,7 +8485,7 @@ function xiaoECustomParams(preview, fields) {
8482
8485
  const browserFieldIds = /* @__PURE__ */ new Set();
8483
8486
  for (const field of toArray(fields)) {
8484
8487
  const id = String(field?.id ?? "").trim();
8485
- if (id && (field?.isBrowser || isBrowserLikeComponentKey(field?.componentKey))) browserFieldIds.add(id);
8488
+ if (id && (field?.isBrowser || isInvoiceComponentKey(field?.componentKey))) browserFieldIds.add(id);
8486
8489
  }
8487
8490
  for (const item of toArray(preview)) {
8488
8491
  const fieldId = String(item?.fieldId ?? "").trim();
@@ -10136,6 +10139,7 @@ var UNKNOWN_DATE = "\u672A\u77E5\u65E5\u671F";
10136
10139
  var DEFAULT_TOP_N = 10;
10137
10140
  var STAGE_VALUES = [
10138
10141
  "auto",
10142
+ "prepareQuery",
10139
10143
  "collect",
10140
10144
  "group",
10141
10145
  "smartGroup",
@@ -10145,7 +10149,8 @@ var STAGE_VALUES = [
10145
10149
  "groupSummaryContext",
10146
10150
  "groupSummary",
10147
10151
  "smartGroupAdd",
10148
- "aggregate"
10152
+ "aggregate",
10153
+ "view"
10149
10154
  ];
10150
10155
  function asRecord(value) {
10151
10156
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -10503,11 +10508,12 @@ function rowFromAny(raw, extraFields) {
10503
10508
  requestId: pick(["requestId", "requestid", "request_id", "id"]) ?? "",
10504
10509
  workflowId: pick(["workflowId", "workflowid", "workflowtype"]) ?? "",
10505
10510
  userMasterId: pick(["userMasterId", "usermasterid", "userid"]) ?? "",
10506
- isremark: pickNumber(["isremark", "isRemark"]),
10511
+ isremark: pickNumber(["isremark", "isRemark", "isremarktype"]),
10507
10512
  nodeId: pick(["nodeId", "nodeid", "currentNodeId"]) ?? "",
10508
10513
  overTime: record.overdue === true || record.overTime === true || record.overtime === true,
10509
10514
  userOverTime: pick(["userOverTime", "userOvertime", "userovertime"]) ?? "",
10510
10515
  requestLevel: pickNumber(["requestLevel", "requestlevel"]),
10516
+ ...typeof record.handleStatus === "boolean" || record.handleStatus === null ? { handleStatus: record.handleStatus } : {},
10511
10517
  // requestlevelTitle 是纯文本("正常"),requestlevelShow 带 span;两者都清洗后再取。
10512
10518
  requestLevelShow: pick(["requestlevelTitle", "requestLevelShow", "requestlevelShow", "requestLevelText", "urgency"], true) ?? "",
10513
10519
  requestNameTitle: pick(["requestNameTitle", "requestnameTitle", "requestnametitle", "requestname", "title", "flowName"], true) ?? "",
@@ -11743,6 +11749,7 @@ var DISPLAY_ROW_FIELDS = [
11743
11749
  // 状态位
11744
11750
  "overdue",
11745
11751
  "userOverTime",
11752
+ "handleStatus",
11746
11753
  "requestlevel",
11747
11754
  "requestLevelShow",
11748
11755
  "requestlevelShow",
@@ -11783,7 +11790,7 @@ function projectDisplayRows(response, extraFields) {
11783
11790
  const picked = {};
11784
11791
  for (const key of DISPLAY_ROW_FIELDS) {
11785
11792
  const value = source[key];
11786
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
11793
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || key === "handleStatus" && value === null) {
11787
11794
  picked[key] = value;
11788
11795
  }
11789
11796
  }
@@ -12598,6 +12605,7 @@ function toRequestData(row) {
12598
12605
  userOverTime: row.userOverTime,
12599
12606
  requestLevel: row.requestLevel,
12600
12607
  requestLevelShow: row.requestLevelShow,
12608
+ ...typeof row.handleStatus === "boolean" || row.handleStatus === null ? { handleStatus: row.handleStatus } : {},
12601
12609
  requestNameTitle: row.requestNameTitle,
12602
12610
  creater: row.creater,
12603
12611
  createrName: row.createrName,
@@ -12794,6 +12802,7 @@ async function collectRawTodos(args, env) {
12794
12802
  const priorityFields = priorityRuleFields();
12795
12803
  const policy = readCollectPolicy(args.outputMode, args.limit);
12796
12804
  const queryOnly = policy.outputMode === "query";
12805
+ if (queryOnly) priorityFields.add("curuserovertime");
12797
12806
  const requestedLimit = policy.limit;
12798
12807
  const limit = policy.limit;
12799
12808
  const threshold = policy.threshold;
@@ -12846,7 +12855,12 @@ async function collectRawTodos(args, env) {
12846
12855
  return `${fmt(start)} ${fmt(end)}`;
12847
12856
  };
12848
12857
  const probeTodoTotal = async () => {
12849
- const { query } = await buildSearchQuery(listEnv, { ...searchArgs, current: 1, pageSize }, "list");
12858
+ const { query } = await buildSearchQuery(
12859
+ listEnv,
12860
+ { ...searchArgs, current: 1, pageSize },
12861
+ "list",
12862
+ category === "todo" ? { workflowNameMatch: "all" } : {}
12863
+ );
12850
12864
  const isremarks = String(searchArgs.isremarks ?? "").trim();
12851
12865
  if (isremarks !== "") query.params = { ...query.params || {}, isremarks };
12852
12866
  const totalBody = JSON.parse(JSON.stringify(query));
@@ -12921,7 +12935,8 @@ async function collectRawTodos(args, env) {
12921
12935
  const { query, warnings: buildWarnings } = await buildSearchQuery(
12922
12936
  listEnv,
12923
12937
  { ...searchArgs, current: pageNo, pageSize },
12924
- "list"
12938
+ "list",
12939
+ category === "todo" ? { workflowNameMatch: "all" } : {}
12925
12940
  );
12926
12941
  for (const warning of buildWarnings ?? []) {
12927
12942
  if (!warnings.includes(warning)) warnings.push(warning);
@@ -13068,7 +13083,7 @@ async function collectRawTodos(args, env) {
13068
13083
  let groupingBrief = [];
13069
13084
  let groupInfo = null;
13070
13085
  let detailStats = null;
13071
- const grouped = items.length > 0 ? runGroup({
13086
+ const grouped = !queryOnly && items.length > 0 ? runGroup({
13072
13087
  items,
13073
13088
  ...args.groupBy !== void 0 ? { groupBy: args.groupBy } : {},
13074
13089
  ...args.topN !== void 0 ? { topN: args.topN } : {}
@@ -13236,6 +13251,354 @@ async function collectRawTodos(args, env) {
13236
13251
  };
13237
13252
  }
13238
13253
 
13254
+ // src/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.ts
13255
+ function recordOf(value) {
13256
+ return value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
13257
+ }
13258
+ function idOf(value) {
13259
+ if (typeof value === "string") return value.trim();
13260
+ return typeof value === "number" && Number.isSafeInteger(value) ? String(value) : "";
13261
+ }
13262
+ function successfulData(response) {
13263
+ const outer = recordOf(response);
13264
+ const data = recordOf(responseData(response));
13265
+ const nested = recordOf(data.data);
13266
+ const failed = [outer, data, nested].find((part) => part.status === false || part.success === false || part.fail === true);
13267
+ if (failed) {
13268
+ const code = failed.code ?? outer.code;
13269
+ throw workflowApiError("business_error", "\u5F85\u529E\u67E5\u8BE2\u5931\u8D25\uFF0C\u672A\u751F\u6210\u5206\u5E03\u7EDF\u8BA1", {
13270
+ ...typeof code === "string" || typeof code === "number" ? { code } : {}
13271
+ });
13272
+ }
13273
+ return data;
13274
+ }
13275
+ function displayRows(response) {
13276
+ const data = successfulData(response);
13277
+ const nested = recordOf(data.data);
13278
+ const rows = nested.displayData ?? data.displayData;
13279
+ if (!Array.isArray(rows) || rows.some((row) => row === null || typeof row !== "object" || Array.isArray(row))) {
13280
+ throw workflowApiError("unexpected_response", "\u5F85\u529E\u5217\u8868\u8FD4\u56DE\u7ED3\u6784\u5F02\u5E38\uFF0C\u672A\u751F\u6210\u5206\u5E03\u7EDF\u8BA1");
13281
+ }
13282
+ return rows;
13283
+ }
13284
+ async function prepareTodoQuery(args, env) {
13285
+ const category = readCategory(args.category);
13286
+ const requestedLimit = args.limit === void 0 || args.limit === null || args.limit === "" ? QUERY_MAX_LIMIT : args.limit;
13287
+ const policy = readCollectPolicy("query", requestedLimit);
13288
+ const searchArgs = { category };
13289
+ for (const key of [...COLLECT_FILTER_KEYS, ...COLLECT_ORDER_KEYS]) {
13290
+ const value = args[key];
13291
+ if (value !== void 0 && value !== null && value !== "") searchArgs[key] = value;
13292
+ }
13293
+ const explicitTab = ["tabid", "tabName", "subCategory"].some((key) => searchArgs[key] !== void 0 && String(searchArgs[key]).trim() !== "");
13294
+ if (!explicitTab) searchArgs.tabid = DEFAULT_TABID2;
13295
+ if (searchArgs.isremarks === void 0) {
13296
+ const defaultIsremarks = generalRules()?.identityFilter?.defaultIsremarks?.trim();
13297
+ if (defaultIsremarks) searchArgs.isremarks = defaultIsremarks;
13298
+ }
13299
+ const { query, warnings } = await buildSearchQuery(
13300
+ env,
13301
+ searchArgs,
13302
+ "list",
13303
+ category === "todo" ? { workflowNameMatch: "all" } : {}
13304
+ );
13305
+ const isremarks = String(searchArgs.isremarks ?? "").trim();
13306
+ if (isremarks) query.params = { ...query.params, isremarks };
13307
+ const listQuery = { ...query, customDisplayPage: { current: 1, size: 500 } };
13308
+ const totalBody = { ...listQuery };
13309
+ delete totalBody.customDisplayPage;
13310
+ let total = null;
13311
+ try {
13312
+ const response = await env.host.workflowRequest({
13313
+ method: "POST",
13314
+ path: totalEndpointFor(LIST_ENDPOINT_BY_CATEGORY[category]),
13315
+ operation: "workflow.todoSmartConvert.prepareQuery.total",
13316
+ body: totalBody
13317
+ });
13318
+ successfulData(response);
13319
+ const parsed = extractTotal(response);
13320
+ if (parsed !== null && Number.isSafeInteger(parsed) && parsed >= 0) total = parsed;
13321
+ } catch (error) {
13322
+ rethrowAuthOrNetworkError(error);
13323
+ if (!(error instanceof WorkflowCliError) || error.type === "permission" || error.type === "authorization" || error.code === 401 || error.code === 403 || error.code === "401" || error.code === "403") throw error;
13324
+ }
13325
+ const selectedNames = /* @__PURE__ */ new Map();
13326
+ const workflowConditions = recordOf(recordOf(listQuery.searchParams).formDatas).workflowid;
13327
+ for (const condition of Array.isArray(workflowConditions) ? workflowConditions : []) {
13328
+ const browserDatas = recordOf(condition).browserDatas;
13329
+ for (const item of Array.isArray(browserDatas) ? browserDatas : []) {
13330
+ const entry = recordOf(item);
13331
+ const id = idOf(entry.id);
13332
+ if (id && typeof entry.name === "string" && entry.name.trim()) selectedNames.set(id, entry.name.trim());
13333
+ }
13334
+ }
13335
+ const seen = /* @__PURE__ */ new Set();
13336
+ const counts = /* @__PURE__ */ new Map();
13337
+ const limit = policy.limit ?? QUERY_MAX_LIMIT;
13338
+ let unreadRows = false;
13339
+ for (let current = 1; total !== 0 && seen.size < limit; current += 1) {
13340
+ const response = await env.host.workflowRequest({
13341
+ method: "POST",
13342
+ path: LIST_ENDPOINT_BY_CATEGORY[category],
13343
+ operation: "workflow.todoSmartConvert.prepareQuery.distribution",
13344
+ body: { ...listQuery, customDisplayPage: { current, size: 500 } }
13345
+ });
13346
+ const rows = displayRows(response);
13347
+ const parsedTotal = extractTotal(response);
13348
+ const pageTotal = parsedTotal !== null && Number.isSafeInteger(parsedTotal) && parsedTotal >= 0 ? parsedTotal : null;
13349
+ const before = seen.size;
13350
+ for (const row of rows) {
13351
+ const requestId = idOf(row.requestId) || idOf(row.requestid);
13352
+ const workflowId = idOf(row.workflowId) || idOf(row.workflowid);
13353
+ if (!requestId || !workflowId) {
13354
+ throw workflowApiError("unexpected_response", "\u5F85\u529E\u5217\u8868\u7F3A\u5C11\u6D41\u7A0B\u6807\u8BC6\uFF0C\u672A\u751F\u6210\u5206\u5E03\u7EDF\u8BA1");
13355
+ }
13356
+ if (seen.has(requestId)) continue;
13357
+ if (seen.size >= limit) {
13358
+ unreadRows = true;
13359
+ break;
13360
+ }
13361
+ seen.add(requestId);
13362
+ const name = [row.workflowName, row.workflowname].find((value) => typeof value === "string" && value.trim());
13363
+ const workflowName = typeof name === "string" ? name.trim() : selectedNames.get(workflowId) ?? "\u672A\u63D0\u4F9B\u540D\u79F0";
13364
+ const bucket = counts.get(workflowId);
13365
+ if (bucket) {
13366
+ bucket.count += 1;
13367
+ if (bucket.workflowName === "\u672A\u63D0\u4F9B\u540D\u79F0" && workflowName !== "\u672A\u63D0\u4F9B\u540D\u79F0") bucket.workflowName = workflowName;
13368
+ } else counts.set(workflowId, { workflowId, workflowName, count: 1 });
13369
+ }
13370
+ if (total === null && pageTotal !== null && pageTotal >= seen.size) total = pageTotal;
13371
+ if (total !== null && total < seen.size) total = pageTotal !== null && pageTotal >= seen.size ? pageTotal : null;
13372
+ if (rows.length === 0 || seen.size === before || total !== null && seen.size >= total) break;
13373
+ }
13374
+ const complete = total !== null && seen.size === total && !unreadRows;
13375
+ const sort = typeof searchArgs.sort === "string" ? searchArgs.sort.trim() : "";
13376
+ return {
13377
+ stage: "prepareQuery",
13378
+ query: {
13379
+ category,
13380
+ requestedLimit: policy.limit,
13381
+ totalAvailable: total,
13382
+ filters: Object.fromEntries(Object.entries(searchArgs).filter(([key]) => !["category", "tabid", "sort"].includes(key))),
13383
+ listQuery,
13384
+ ...sort ? { sort } : {}
13385
+ },
13386
+ totalCount: total,
13387
+ distribution: { items: [...counts.values()], readCount: seen.size, totalCount: total, complete, truncated: !complete },
13388
+ markdown: total === null ? "\u67E5\u8BE2\u6761\u4EF6\u5DF2\u51C6\u5907\uFF0C\u6570\u91CF\u5F85\u5217\u8868\u8FD4\u56DE\u3002" : `\u67E5\u8BE2\u6761\u4EF6\u5DF2\u51C6\u5907\uFF0C\u5339\u914D${total}\u6761\u5F85\u529E\u3002`,
13389
+ ...warnings?.length ? { warnings } : {}
13390
+ };
13391
+ }
13392
+
13393
+ // src/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.ts
13394
+ var COUNT_CONCURRENCY = 4;
13395
+ function recordOf2(value) {
13396
+ return value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
13397
+ }
13398
+ function textOf(value) {
13399
+ return typeof value === "string" ? value.trim() : "";
13400
+ }
13401
+ function rethrowRequiredError(error) {
13402
+ rethrowAuthOrNetworkError(error);
13403
+ if (!(error instanceof WorkflowCliError)) throw error;
13404
+ if (error.type === "permission" || error.type === "authorization" || error.code === 401 || error.code === 403 || error.code === "401" || error.code === "403") {
13405
+ throw error;
13406
+ }
13407
+ }
13408
+ async function mapLimited(items, visit) {
13409
+ const results = new Array(items.length);
13410
+ let next = 0;
13411
+ let failed = false;
13412
+ let failure;
13413
+ await Promise.all(Array.from({ length: Math.min(COUNT_CONCURRENCY, items.length) }, async () => {
13414
+ while (!failed && next < items.length) {
13415
+ const index = next++;
13416
+ try {
13417
+ results[index] = await visit(items[index]);
13418
+ } catch (error) {
13419
+ failed = true;
13420
+ failure = error;
13421
+ }
13422
+ }
13423
+ }));
13424
+ if (failed) throw failure;
13425
+ return results;
13426
+ }
13427
+ async function buildCandidateQuery(candidate, args, env) {
13428
+ try {
13429
+ const explicitTab = ["tabid", "tabName", "subCategory"].some((key) => args[key] !== void 0 && args[key] !== null && String(args[key]).trim() !== "");
13430
+ const { query } = await buildSearchQuery(env, {
13431
+ ...args,
13432
+ ...!explicitTab ? { tabid: DEFAULT_TABID2 } : {},
13433
+ category: args.category ?? "todo",
13434
+ workflow: [candidate.display],
13435
+ workflowTerm: "in"
13436
+ }, "total");
13437
+ const isremarks = textOf(args.isremarks) || generalRules()?.identityFilter?.defaultIsremarks?.trim() || "";
13438
+ if (isremarks) query.params = { ...recordOf2(query.params), isremarks };
13439
+ return { candidate, body: query };
13440
+ } catch (error) {
13441
+ rethrowRequiredError(error);
13442
+ return { candidate, body: null };
13443
+ }
13444
+ }
13445
+ async function loadWorkflowTypes(queries, env) {
13446
+ const types = /* @__PURE__ */ new Map();
13447
+ const body = queries.find((query) => query.body !== null)?.body;
13448
+ if (!body) return types;
13449
+ const metadata = await fetchWorkflowMetadata(body, env);
13450
+ for (const row of metadata) {
13451
+ if (row.workflowTypeName) types.set(row.workflowId, row.workflowTypeName);
13452
+ }
13453
+ return types;
13454
+ }
13455
+ async function fetchWorkflowMetadata(query, env) {
13456
+ try {
13457
+ const params = { ...recordOf2(query.params) };
13458
+ delete params.workflowId;
13459
+ delete params.searchAdWorkflowid;
13460
+ const flowCenterParam = query.flowCenterParam ?? params.flowCenterParam;
13461
+ const body = { params, ...flowCenterParam !== void 0 ? { flowCenterParam } : {} };
13462
+ const response = await env.host.workflowRequest({
13463
+ method: "POST",
13464
+ path: WORKFLOW_ENDPOINTS.TODO_TREE,
13465
+ operation: "workflow.todoSmartConvert.workflowMetadata",
13466
+ body
13467
+ });
13468
+ const data = recordOf2(responseData(response));
13469
+ const roots = Array.isArray(data.data) ? data.data : [];
13470
+ const metadata = /* @__PURE__ */ new Map();
13471
+ const conflicts = /* @__PURE__ */ new Set();
13472
+ const visit = (nodes, parentType) => {
13473
+ for (const value of nodes) {
13474
+ const node = recordOf2(value);
13475
+ const nodeId = textOf(node.id);
13476
+ const name = textOf(node.content) || textOf(node.title);
13477
+ const type = /^p?type_?-?\d+$/u.test(nodeId) && name ? name : parentType;
13478
+ const workflow = /^wf_?(\d+)$/u.exec(nodeId);
13479
+ if (workflow && name) {
13480
+ const id = workflow[1];
13481
+ const previous = metadata.get(id);
13482
+ if (!previous) metadata.set(id, { workflowId: id, workflowName: name, workflowTypeName: type });
13483
+ else if (type && previous.workflowTypeName && previous.workflowTypeName !== type) {
13484
+ previous.workflowTypeName = null;
13485
+ conflicts.add(id);
13486
+ } else if (type && !conflicts.has(id)) previous.workflowTypeName = type;
13487
+ }
13488
+ if (Array.isArray(node.children)) visit(node.children, type);
13489
+ }
13490
+ };
13491
+ visit(roots, null);
13492
+ return [...metadata.values()];
13493
+ } catch (error) {
13494
+ rethrowRequiredError(error);
13495
+ return [];
13496
+ }
13497
+ }
13498
+ async function loadCandidateCount(query, env) {
13499
+ if (query.body === null) return null;
13500
+ try {
13501
+ const response = await env.host.workflowRequest({
13502
+ method: "POST",
13503
+ path: WORKFLOW_ENDPOINTS.TODO_TOTAL,
13504
+ operation: "workflow.todoSmartConvert.clarification.total",
13505
+ body: query.body
13506
+ });
13507
+ const count = extractTotal(response);
13508
+ return count !== null && Number.isInteger(count) && count >= 0 ? count : null;
13509
+ } catch (error) {
13510
+ rethrowRequiredError(error);
13511
+ return null;
13512
+ }
13513
+ }
13514
+ async function enrichWorkflowClarification(error, args, env) {
13515
+ if (args.category !== void 0 && args.category !== "todo") return error;
13516
+ if (!(error instanceof WorkflowCliError) || error.subtype !== CLARIFICATION_SUBTYPE) return error;
13517
+ const details = recordOf2(error.details);
13518
+ if (details.clarificationType !== "workflow" || !Array.isArray(details.candidates)) return error;
13519
+ const candidates = [];
13520
+ for (const value of details.candidates) {
13521
+ const source = recordOf2(value);
13522
+ const id = textOf(source.id);
13523
+ const name = textOf(source.name);
13524
+ if (!/^\d+$/u.test(id) || !name) return error;
13525
+ candidates.push({
13526
+ ...source,
13527
+ id,
13528
+ name,
13529
+ display: `${name}(${id})`,
13530
+ index: candidates.length + 1,
13531
+ workflowTypeName: textOf(source.workflowTypeName) || null,
13532
+ totalCount: null
13533
+ });
13534
+ }
13535
+ if (candidates.length < 2) return error;
13536
+ const nameRequests = /* @__PURE__ */ new Map();
13537
+ const scopedEnv = {
13538
+ ...env,
13539
+ host: {
13540
+ workflowRequest: (request) => {
13541
+ if (request.operation !== "workflow.nameComplete") return env.host.workflowRequest(request);
13542
+ const key = JSON.stringify(request);
13543
+ let pending = nameRequests.get(key);
13544
+ if (!pending) {
13545
+ pending = env.host.workflowRequest(request);
13546
+ nameRequests.set(key, pending);
13547
+ }
13548
+ return pending;
13549
+ },
13550
+ workflowBinaryRequest: (request) => env.host.workflowBinaryRequest(request),
13551
+ getSession: () => env.host.getSession()
13552
+ }
13553
+ };
13554
+ const queries = await mapLimited(candidates, (candidate) => buildCandidateQuery(candidate, args, scopedEnv));
13555
+ const countRequests = /* @__PURE__ */ new Map();
13556
+ const [types, counts] = await Promise.all([
13557
+ candidates.some((candidate) => !candidate.workflowTypeName) ? loadWorkflowTypes(queries, env) : Promise.resolve(/* @__PURE__ */ new Map()),
13558
+ mapLimited(queries, (query) => {
13559
+ if (query.body === null) return Promise.resolve(null);
13560
+ const key = JSON.stringify(query.body);
13561
+ let pending = countRequests.get(key);
13562
+ if (!pending) {
13563
+ pending = loadCandidateCount(query, env);
13564
+ countRequests.set(key, pending);
13565
+ }
13566
+ return pending;
13567
+ })
13568
+ ]);
13569
+ const enriched = candidates.map((candidate, index) => ({
13570
+ ...candidate,
13571
+ workflowTypeName: candidate.workflowTypeName ?? types.get(candidate.id) ?? null,
13572
+ totalCount: counts[index]
13573
+ })).filter((candidate) => candidate.totalCount !== 0);
13574
+ enriched.sort((left, right) => {
13575
+ if (left.totalCount !== right.totalCount) {
13576
+ if (left.totalCount === null) return 1;
13577
+ if (right.totalCount === null) return -1;
13578
+ return right.totalCount - left.totalCount;
13579
+ }
13580
+ return (left.workflowTypeName ?? "").localeCompare(right.workflowTypeName ?? "", "zh-CN") || left.name.localeCompare(right.name, "zh-CN") || left.id.localeCompare(right.id);
13581
+ });
13582
+ const excluded = candidates.length - enriched.length;
13583
+ const question = excluded === 0 ? error.message : enriched.length === 0 ? `\u5339\u914D\u5230\u7684${candidates.length}\u4E2A\u5DE5\u4F5C\u6D41\u5728\u5F53\u524D\u7B5B\u9009\u6761\u4EF6\u4E0B\u5747\u65E0\u5F85\u529E\uFF0C\u65E0\u9700\u9009\u62E9\u3002` : `\u5DF2\u6392\u9664\u5F53\u524D\u7B5B\u9009\u6761\u4EF6\u4E0B\u6CA1\u6709\u5F85\u529E\u7684\u5DE5\u4F5C\u6D41\uFF0C\u8BF7\u786E\u8BA4\u8981\u67E5\u8BE2\u7684\u5DE5\u4F5C\u6D41\uFF08\u5269\u4F59${enriched.length}\u9879\uFF09\u3002`;
13584
+ return new WorkflowCliError(error.type, error.subtype, question, {
13585
+ code: error.code,
13586
+ retryable: error.retryable,
13587
+ stage: error.stage,
13588
+ exitCode: error.exitCode,
13589
+ partialData: error.partialData,
13590
+ details: {
13591
+ ...details,
13592
+ ...excluded > 0 ? {
13593
+ clarificationQuestion: question,
13594
+ ...typeof details.message === "string" ? { message: question } : {},
13595
+ ...enriched.length === 0 ? { clarificationReason: "no_matching_todos" } : {}
13596
+ } : {},
13597
+ candidates: enriched.map((candidate, index) => ({ ...candidate, index: index + 1 }))
13598
+ }
13599
+ });
13600
+ }
13601
+
13239
13602
  // src/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.aggregate.ts
13240
13603
  function runSmartConvert(args) {
13241
13604
  assertKnownKeys(args);
@@ -14794,13 +15157,13 @@ var inputSchema = schemaOf({
14794
15157
  outputMode: {
14795
15158
  type: "string",
14796
15159
  enum: [...OUTPUT_MODE_VALUES],
14797
- description: "query\uFF1A\u6807\u9898\u6E05\u5355\uFF0C\u9ED8\u8BA4\u6700\u591A500\u6761\uFF0C\u660E\u786E\u6269\u5927\u65F6\u6700\u591A1000\u6761\uFF1Bsummary\uFF1A\u5B8C\u6574\u6458\u8981\uFF0C\u9ED8\u8BA4\u53CA\u6700\u591A100\u6761\u3002\u4E24\u79CD\u6A21\u5F0F\u65E0\u65F6\u95F4\u6761\u4EF6\u65F6\u6309\u5404\u81EA\u6761\u6570\u9608\u503C\u964D\u7EA7\uFF0C\u6700\u4F4E\u8FD17\u5929\uFF1B\u4E0D\u4F20\u4FDD\u7559\u5386\u53F2\u53D6\u6570\u53CA\u964D\u7EA7\u89C4\u5219\u3002"
15160
+ description: "query\uFF1A\u6807\u9898\u6E05\u5355\uFF0C\u9ED8\u8BA4\u6700\u591A500\u6761\uFF0C\u660E\u786E\u6269\u5927\u65F6\u6700\u591A1000\u6761\uFF1Bsummary\uFF1A\u5B8C\u6574\u6458\u8981\uFF0C\u9ED8\u8BA4\u53CA\u6700\u591A100\u6761\u3002collect \u65E0\u65F6\u95F4\u6761\u4EF6\u65F6\u6309\u5404\u81EA\u6761\u6570\u9608\u503C\u964D\u7EA7\uFF0C\u6700\u4F4E\u8FD17\u5929\uFF1BprepareQuery \u4E0D\u81EA\u52A8\u6539\u65F6\u95F4\u8303\u56F4\uFF1B\u4E0D\u4F20\u4FDD\u7559\u5386\u53F2\u53D6\u6570\u53CA\u964D\u7EA7\u89C4\u5219\u3002"
14798
15161
  },
14799
15162
  stage: {
14800
15163
  type: "string",
14801
15164
  enum: [...STAGE_VALUES],
14802
15165
  default: "auto",
14803
- description: "\u9636\u6BB5\uFF1Aauto\u3001collect\u3001group\u3001smartGroup\u3001summaryContext\u3001summary\u3001groupSummaryContext\u3001groupSummary\u3001smartGroupAdd \u6216 aggregate\u3002"
15166
+ description: "\u9636\u6BB5\uFF1AprepareQuery \u51C6\u5907\u539F\u751F\u5217\u8868\u67E5\u8BE2\u62A5\u6587\uFF0C\u8BFB\u53D6\u540C\u6761\u4EF6\u603B\u6570\u53CA\u6807\u51C6\u5217\u8868\u751F\u6210\u5DE5\u4F5C\u6D41\u5206\u5E03\uFF0C\u4E0D\u8FD4\u56DE\u660E\u7EC6\u6216\u4FDD\u5B58ID\uFF1B\u5176\u4F59 auto\u3001collect\u3001group\u3001smartGroup\u3001summaryContext\u3001summary\u3001groupSummaryContext\u3001groupSummary\u3001smartGroupAdd \u6216 aggregate\u3002"
14804
15167
  },
14805
15168
  items: {
14806
15169
  type: "array",
@@ -14852,7 +15215,7 @@ var inputSchema = schemaOf({
14852
15215
  limit: {
14853
15216
  type: "integer",
14854
15217
  minimum: 1,
14855
- description: "collect \u53D6\u6570\u6761\u6570\uFF1AoutputMode=query \u9ED8\u8BA4500\u3001\u6700\u591A1000\uFF0Csummary \u9ED8\u8BA4\u53CA\u6700\u591A100\uFF1B\u663E\u5F0F\u6A21\u5F0F\u4E25\u683C\u9650\u5236\u8FD4\u56DE\u6761\u6570\u3002\u672A\u6307\u5B9A outputMode \u65F6\u4FDD\u7559\u5386\u53F2\u884C\u4E3A\uFF1A\u4E0D\u4F20\u4E0D\u9650\u6761\u6570\uFF0C\u4F20\u5165\u503C\u4E3A\u6574\u9875\u505C\u6B62\u9608\u503C\u3002\u5355\u9875\u6700\u591A " + FETCH_PAGE_SIZE + " \u6761\u3002"
15218
+ description: "prepareQuery \u9ED8\u8BA4\u53CA\u6700\u591A\u8BFB\u53D61000\u6761\u7EDF\u8BA1\u5206\u5E03\uFF0CCLI\u4E0E\u7EC4\u4EF6\u5404\u81EA\u6BCF\u9875\u8BF7\u6C42500\uFF1Bcollect \u53D6\u6570\u6761\u6570\uFF1AoutputMode=query \u9ED8\u8BA4500\u3001\u6700\u591A1000\uFF0Csummary \u9ED8\u8BA4\u53CA\u6700\u591A100\uFF1B\u663E\u5F0F\u6A21\u5F0F\u4E25\u683C\u9650\u5236\u8FD4\u56DE\u6761\u6570\u3002\u672A\u6307\u5B9A outputMode \u65F6\u4FDD\u7559\u5386\u53F2\u884C\u4E3A\uFF1A\u4E0D\u4F20\u4E0D\u9650\u6761\u6570\uFF0C\u4F20\u5165\u503C\u4E3A\u6574\u9875\u505C\u6B62\u9608\u503C\u3002\u5355\u9875\u6700\u591A " + FETCH_PAGE_SIZE + " \u6761\u3002"
14856
15219
  },
14857
15220
  pageSize: {
14858
15221
  type: "integer",
@@ -14979,6 +15342,24 @@ var workflowTodoSmartConvertOperations = [{
14979
15342
  warnings: warning ? [...extraWarnings, warning] : extraWarnings
14980
15343
  };
14981
15344
  };
15345
+ if (stage === "prepareQuery") {
15346
+ try {
15347
+ const result = await prepareTodoQuery(args, env);
15348
+ return finish(env, args, startedAt, stage, result, { branch: "todo-query", stage }, result.warnings);
15349
+ } catch (error) {
15350
+ throw await enrichWorkflowClarification(error, args, env);
15351
+ }
15352
+ }
15353
+ if (stage === "view") {
15354
+ if (!Array.isArray(args.wfIdGroup)) throw workflowValidationError("final_groups_required", "stage=view \u9700\u8981 wfIdGroup");
15355
+ const groups = await readFinalGroups({ wfIdGroup: args.wfIdGroup }, env);
15356
+ const final = withPriorityView({
15357
+ smartSummaryTitle: typeof args.smartSummaryTitle === "string" ? args.smartSummaryTitle : "",
15358
+ totalCount: totalTodoCount(groups),
15359
+ wfIdGroup: groups
15360
+ }, [], { stripRawFields: true });
15361
+ return finish(env, args, startedAt, stage, final.data, { branch: "todo-smart-convert", stage, deterministic: true });
15362
+ }
14982
15363
  if ((stage === "group" || stage === "smartGroup" || stage === "aggregate") && !hasItems) {
14983
15364
  throw workflowValidationError(
14984
15365
  "items_required",
@@ -15130,7 +15511,12 @@ var workflowTodoSmartConvertOperations = [{
15130
15511
  });
15131
15512
  }
15132
15513
  if (stage === "collect" || !hasItems) {
15133
- const result = await collectRawTodos(args, env);
15514
+ let result;
15515
+ try {
15516
+ result = await collectRawTodos(args, env);
15517
+ } catch (error) {
15518
+ throw await enrichWorkflowClarification(error, args, env);
15519
+ }
15134
15520
  return finish(env, args, startedAt, "collect", result, {
15135
15521
  branch: "todo-smart-convert",
15136
15522
  stage: "collect"
@@ -7,8 +7,8 @@ import {
7
7
  findCommonFreeSlots,
8
8
  meetingEbConflictOperations,
9
9
  runEbConflictCheck
10
- } from "./chunk-6XSSAUNW.js";
11
- import "./chunk-DTCQFTHW.js";
10
+ } from "./chunk-XHSEK2VM.js";
11
+ import "./chunk-4AFWOGOV.js";
12
12
  import "./chunk-7BDPM5ST.js";
13
13
  import "./chunk-UG5G54VL.js";
14
14
  import "./chunk-BUSC6UAE.js";