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
@@ -0,0 +1,153 @@
1
+ import { WorkflowCliError, workflowApiError } from '../../errors.js';
2
+ import { buildSearchQuery, extractTotal, rethrowAuthOrNetworkError } from '../read.js';
3
+ import { responseData } from '../shared.js';
4
+ import { generalRules } from './aigroupRules.js';
5
+ import { COLLECT_FILTER_KEYS, COLLECT_ORDER_KEYS, DEFAULT_TABID, LIST_ENDPOINT_BY_CATEGORY, QUERY_MAX_LIMIT, readCategory, readCollectPolicy, totalEndpointFor, } from './todoSmartConvert.core.js';
6
+ function recordOf(value) {
7
+ return value !== null && typeof value === 'object' && !Array.isArray(value)
8
+ ? value : {};
9
+ }
10
+ function idOf(value) {
11
+ if (typeof value === 'string')
12
+ return value.trim();
13
+ return typeof value === 'number' && Number.isSafeInteger(value) ? String(value) : '';
14
+ }
15
+ function successfulData(response) {
16
+ const outer = recordOf(response);
17
+ const data = recordOf(responseData(response));
18
+ const nested = recordOf(data.data);
19
+ const failed = [outer, data, nested].find(part => part.status === false || part.success === false || part.fail === true);
20
+ if (failed) {
21
+ const code = failed.code ?? outer.code;
22
+ throw workflowApiError('business_error', '待办查询失败,未生成分布统计', {
23
+ ...(typeof code === 'string' || typeof code === 'number' ? { code } : {}),
24
+ });
25
+ }
26
+ return data;
27
+ }
28
+ function displayRows(response) {
29
+ const data = successfulData(response);
30
+ const nested = recordOf(data.data);
31
+ const rows = nested.displayData ?? data.displayData;
32
+ if (!Array.isArray(rows) || rows.some(row => row === null || typeof row !== 'object' || Array.isArray(row))) {
33
+ throw workflowApiError('unexpected_response', '待办列表返回结构异常,未生成分布统计');
34
+ }
35
+ return rows;
36
+ }
37
+ /** 准备原生查询,并用同条件标准列表生成有界分布;不收窄时间、不生成摘要或汇总ID。 */
38
+ export async function prepareTodoQuery(args, env) {
39
+ const category = readCategory(args.category);
40
+ const requestedLimit = args.limit === undefined || args.limit === null || args.limit === '' ? QUERY_MAX_LIMIT : args.limit;
41
+ const policy = readCollectPolicy('query', requestedLimit);
42
+ const searchArgs = { category };
43
+ for (const key of [...COLLECT_FILTER_KEYS, ...COLLECT_ORDER_KEYS]) {
44
+ const value = args[key];
45
+ if (value !== undefined && value !== null && value !== '')
46
+ searchArgs[key] = value;
47
+ }
48
+ const explicitTab = ['tabid', 'tabName', 'subCategory'].some(key => searchArgs[key] !== undefined
49
+ && String(searchArgs[key]).trim() !== '');
50
+ if (!explicitTab)
51
+ searchArgs.tabid = DEFAULT_TABID;
52
+ if (searchArgs.isremarks === undefined) {
53
+ const defaultIsremarks = generalRules()?.identityFilter?.defaultIsremarks?.trim();
54
+ if (defaultIsremarks)
55
+ searchArgs.isremarks = defaultIsremarks;
56
+ }
57
+ const { query, warnings } = await buildSearchQuery(env, searchArgs, 'list', category === 'todo' ? { workflowNameMatch: 'all' } : {});
58
+ const isremarks = String(searchArgs.isremarks ?? '').trim();
59
+ if (isremarks)
60
+ query.params = { ...query.params, isremarks };
61
+ // 共享 builder 仍保留其他调用的单页100限制;本入口明确交由标准列表每页500获取。
62
+ const listQuery = { ...query, customDisplayPage: { current: 1, size: 500 } };
63
+ const totalBody = { ...listQuery };
64
+ delete totalBody.customDisplayPage;
65
+ let total = null;
66
+ try {
67
+ const response = await env.host.workflowRequest({
68
+ method: 'POST', path: totalEndpointFor(LIST_ENDPOINT_BY_CATEGORY[category]),
69
+ operation: 'workflow.todoSmartConvert.prepareQuery.total', body: totalBody,
70
+ });
71
+ successfulData(response);
72
+ const parsed = extractTotal(response);
73
+ if (parsed !== null && Number.isSafeInteger(parsed) && parsed >= 0)
74
+ total = parsed;
75
+ }
76
+ catch (error) {
77
+ rethrowAuthOrNetworkError(error);
78
+ if (!(error instanceof WorkflowCliError) || error.type === 'permission' || error.type === 'authorization'
79
+ || error.code === 401 || error.code === 403 || error.code === '401' || error.code === '403')
80
+ throw error;
81
+ }
82
+ const selectedNames = new Map();
83
+ const workflowConditions = recordOf(recordOf(listQuery.searchParams).formDatas).workflowid;
84
+ for (const condition of Array.isArray(workflowConditions) ? workflowConditions : []) {
85
+ const browserDatas = recordOf(condition).browserDatas;
86
+ for (const item of Array.isArray(browserDatas) ? browserDatas : []) {
87
+ const entry = recordOf(item);
88
+ const id = idOf(entry.id);
89
+ if (id && typeof entry.name === 'string' && entry.name.trim())
90
+ selectedNames.set(id, entry.name.trim());
91
+ }
92
+ }
93
+ const seen = new Set();
94
+ const counts = new Map();
95
+ const limit = policy.limit ?? QUERY_MAX_LIMIT;
96
+ let unreadRows = false;
97
+ for (let current = 1; total !== 0 && seen.size < limit; current += 1) {
98
+ const response = await env.host.workflowRequest({
99
+ method: 'POST', path: LIST_ENDPOINT_BY_CATEGORY[category],
100
+ operation: 'workflow.todoSmartConvert.prepareQuery.distribution',
101
+ body: { ...listQuery, customDisplayPage: { current, size: 500 } },
102
+ });
103
+ const rows = displayRows(response);
104
+ const parsedTotal = extractTotal(response);
105
+ const pageTotal = parsedTotal !== null && Number.isSafeInteger(parsedTotal) && parsedTotal >= 0 ? parsedTotal : null;
106
+ const before = seen.size;
107
+ for (const row of rows) {
108
+ const requestId = idOf(row.requestId) || idOf(row.requestid);
109
+ const workflowId = idOf(row.workflowId) || idOf(row.workflowid);
110
+ if (!requestId || !workflowId) {
111
+ throw workflowApiError('unexpected_response', '待办列表缺少流程标识,未生成分布统计');
112
+ }
113
+ if (seen.has(requestId))
114
+ continue;
115
+ if (seen.size >= limit) {
116
+ unreadRows = true;
117
+ break;
118
+ }
119
+ seen.add(requestId);
120
+ const name = [row.workflowName, row.workflowname].find(value => typeof value === 'string' && value.trim());
121
+ const workflowName = typeof name === 'string' ? name.trim() : selectedNames.get(workflowId) ?? '未提供名称';
122
+ const bucket = counts.get(workflowId);
123
+ if (bucket) {
124
+ bucket.count += 1;
125
+ if (bucket.workflowName === '未提供名称' && workflowName !== '未提供名称')
126
+ bucket.workflowName = workflowName;
127
+ }
128
+ else
129
+ counts.set(workflowId, { workflowId, workflowName, count: 1 });
130
+ }
131
+ if (total === null && pageTotal !== null && pageTotal >= seen.size)
132
+ total = pageTotal;
133
+ if (total !== null && total < seen.size)
134
+ total = pageTotal !== null && pageTotal >= seen.size ? pageTotal : null;
135
+ if (rows.length === 0 || seen.size === before || (total !== null && seen.size >= total))
136
+ break;
137
+ }
138
+ const complete = total !== null && seen.size === total && !unreadRows;
139
+ const sort = typeof searchArgs.sort === 'string' ? searchArgs.sort.trim() : '';
140
+ return {
141
+ stage: 'prepareQuery',
142
+ query: {
143
+ category, requestedLimit: policy.limit, totalAvailable: total,
144
+ filters: Object.fromEntries(Object.entries(searchArgs).filter(([key]) => !['category', 'tabid', 'sort'].includes(key))),
145
+ listQuery,
146
+ ...(sort ? { sort } : {}),
147
+ },
148
+ totalCount: total,
149
+ distribution: { items: [...counts.values()], readCount: seen.size, totalCount: total, complete, truncated: !complete },
150
+ markdown: total === null ? '查询条件已准备,数量待列表返回。' : `查询条件已准备,匹配${total}条待办。`,
151
+ ...(warnings?.length ? { warnings } : {}),
152
+ };
153
+ }
@@ -0,0 +1,232 @@
1
+ import { WORKFLOW_ENDPOINTS } from '../../endpoints.js';
2
+ import { CLARIFICATION_SUBTYPE, WorkflowCliError } from '../../errors.js';
3
+ import { buildSearchQuery, extractTotal, rethrowAuthOrNetworkError } from '../read.js';
4
+ import { responseData } from '../shared.js';
5
+ import { DEFAULT_TABID } from './todoSmartConvert.core.js';
6
+ import { generalRules } from './aigroupRules.js';
7
+ const COUNT_CONCURRENCY = 4;
8
+ function recordOf(value) {
9
+ return value !== null && typeof value === 'object' && !Array.isArray(value)
10
+ ? value : {};
11
+ }
12
+ function textOf(value) {
13
+ return typeof value === 'string' ? value.trim() : '';
14
+ }
15
+ /** Optional statistics must preserve real authentication, network and permission failures. */
16
+ function rethrowRequiredError(error) {
17
+ rethrowAuthOrNetworkError(error);
18
+ if (!(error instanceof WorkflowCliError))
19
+ throw error;
20
+ if (error.type === 'permission' || error.type === 'authorization'
21
+ || error.code === 401 || error.code === 403 || error.code === '401' || error.code === '403') {
22
+ throw error;
23
+ }
24
+ }
25
+ async function mapLimited(items, visit) {
26
+ const results = new Array(items.length);
27
+ let next = 0;
28
+ let failed = false;
29
+ let failure;
30
+ await Promise.all(Array.from({ length: Math.min(COUNT_CONCURRENCY, items.length) }, async () => {
31
+ while (!failed && next < items.length) {
32
+ const index = next++;
33
+ try {
34
+ results[index] = await visit(items[index]);
35
+ }
36
+ catch (error) {
37
+ failed = true;
38
+ failure = error;
39
+ }
40
+ }
41
+ }));
42
+ if (failed)
43
+ throw failure;
44
+ return results;
45
+ }
46
+ async function buildCandidateQuery(candidate, args, env) {
47
+ try {
48
+ const explicitTab = ['tabid', 'tabName', 'subCategory'].some(key => args[key] !== undefined
49
+ && args[key] !== null && String(args[key]).trim() !== '');
50
+ const { query } = await buildSearchQuery(env, {
51
+ ...args,
52
+ ...(!explicitTab ? { tabid: DEFAULT_TABID } : {}),
53
+ category: args.category ?? 'todo',
54
+ workflow: [candidate.display],
55
+ workflowTerm: 'in',
56
+ }, 'total');
57
+ const isremarks = textOf(args.isremarks) || generalRules()?.identityFilter?.defaultIsremarks?.trim() || '';
58
+ if (isremarks)
59
+ query.params = { ...recordOf(query.params), isremarks };
60
+ return { candidate, body: query };
61
+ }
62
+ catch (error) {
63
+ rethrowRequiredError(error);
64
+ // An unresolved person, field or other condition cannot produce a reliable count.
65
+ return { candidate, body: null };
66
+ }
67
+ }
68
+ async function loadWorkflowTypes(queries, env) {
69
+ const types = new Map();
70
+ const body = queries.find(query => query.body !== null)?.body;
71
+ if (!body)
72
+ return types;
73
+ const metadata = await fetchWorkflowMetadata(body, env);
74
+ for (const row of metadata) {
75
+ if (row.workflowTypeName)
76
+ types.set(row.workflowId, row.workflowTypeName);
77
+ }
78
+ return types;
79
+ }
80
+ /** Read one native tree for names/types; counts always come from the matching total query. */
81
+ export async function fetchWorkflowMetadata(query, env) {
82
+ try {
83
+ const params = { ...recordOf(query.params) };
84
+ // A candidate's form context must not restrict the tree to that one workflow.
85
+ delete params.workflowId;
86
+ delete params.searchAdWorkflowid;
87
+ const flowCenterParam = query.flowCenterParam ?? params.flowCenterParam;
88
+ const body = { params, ...(flowCenterParam !== undefined ? { flowCenterParam } : {}) };
89
+ const response = await env.host.workflowRequest({
90
+ method: 'POST', path: WORKFLOW_ENDPOINTS.TODO_TREE,
91
+ operation: 'workflow.todoSmartConvert.workflowMetadata', body,
92
+ });
93
+ const data = recordOf(responseData(response));
94
+ const roots = Array.isArray(data.data) ? data.data : [];
95
+ const metadata = new Map();
96
+ const conflicts = new Set();
97
+ const visit = (nodes, parentType) => {
98
+ for (const value of nodes) {
99
+ const node = recordOf(value);
100
+ const nodeId = textOf(node.id);
101
+ const name = textOf(node.content) || textOf(node.title);
102
+ const type = /^p?type_?-?\d+$/u.test(nodeId) && name ? name : parentType;
103
+ const workflow = /^wf_?(\d+)$/u.exec(nodeId);
104
+ if (workflow && name) {
105
+ const id = workflow[1];
106
+ const previous = metadata.get(id);
107
+ if (!previous)
108
+ metadata.set(id, { workflowId: id, workflowName: name, workflowTypeName: type });
109
+ else if (type && previous.workflowTypeName && previous.workflowTypeName !== type) {
110
+ previous.workflowTypeName = null;
111
+ conflicts.add(id);
112
+ }
113
+ else if (type && !conflicts.has(id))
114
+ previous.workflowTypeName = type;
115
+ }
116
+ if (Array.isArray(node.children))
117
+ visit(node.children, type);
118
+ }
119
+ };
120
+ visit(roots, null);
121
+ return [...metadata.values()];
122
+ }
123
+ catch (error) {
124
+ rethrowRequiredError(error);
125
+ return [];
126
+ }
127
+ }
128
+ async function loadCandidateCount(query, env) {
129
+ if (query.body === null)
130
+ return null;
131
+ try {
132
+ const response = await env.host.workflowRequest({
133
+ method: 'POST', path: WORKFLOW_ENDPOINTS.TODO_TOTAL,
134
+ operation: 'workflow.todoSmartConvert.clarification.total', body: query.body,
135
+ });
136
+ const count = extractTotal(response);
137
+ return count !== null && Number.isInteger(count) && count >= 0 ? count : null;
138
+ }
139
+ catch (error) {
140
+ rethrowRequiredError(error);
141
+ return null;
142
+ }
143
+ }
144
+ /** Enrich only workflow ambiguity, preserving candidate IDs and the original clarification contract. */
145
+ export async function enrichWorkflowClarification(error, args, env) {
146
+ if (args.category !== undefined && args.category !== 'todo')
147
+ return error;
148
+ if (!(error instanceof WorkflowCliError) || error.subtype !== CLARIFICATION_SUBTYPE)
149
+ return error;
150
+ const details = recordOf(error.details);
151
+ if (details.clarificationType !== 'workflow' || !Array.isArray(details.candidates))
152
+ return error;
153
+ const candidates = [];
154
+ for (const value of details.candidates) {
155
+ const source = recordOf(value);
156
+ const id = textOf(source.id);
157
+ const name = textOf(source.name);
158
+ if (!/^\d+$/u.test(id) || !name)
159
+ return error;
160
+ candidates.push({ ...source, id, name, display: `${name}(${id})`, index: candidates.length + 1,
161
+ workflowTypeName: textOf(source.workflowTypeName) || null, totalCount: null });
162
+ }
163
+ if (candidates.length < 2)
164
+ return error;
165
+ const nameRequests = new Map();
166
+ const scopedEnv = {
167
+ ...env,
168
+ host: {
169
+ workflowRequest: request => {
170
+ if (request.operation !== 'workflow.nameComplete')
171
+ return env.host.workflowRequest(request);
172
+ const key = JSON.stringify(request);
173
+ let pending = nameRequests.get(key);
174
+ if (!pending) {
175
+ pending = env.host.workflowRequest(request);
176
+ nameRequests.set(key, pending);
177
+ }
178
+ return pending;
179
+ },
180
+ workflowBinaryRequest: request => env.host.workflowBinaryRequest(request),
181
+ getSession: () => env.host.getSession(),
182
+ },
183
+ };
184
+ const queries = await mapLimited(candidates, candidate => buildCandidateQuery(candidate, args, scopedEnv));
185
+ // Only this enrichment shares counts: never reuse results across commands, filters or users.
186
+ const countRequests = new Map();
187
+ const [types, counts] = await Promise.all([
188
+ candidates.some(candidate => !candidate.workflowTypeName) ? loadWorkflowTypes(queries, env) : Promise.resolve(new Map()),
189
+ mapLimited(queries, query => {
190
+ if (query.body === null)
191
+ return Promise.resolve(null);
192
+ const key = JSON.stringify(query.body);
193
+ let pending = countRequests.get(key);
194
+ if (!pending) {
195
+ pending = loadCandidateCount(query, env);
196
+ countRequests.set(key, pending);
197
+ }
198
+ return pending;
199
+ }),
200
+ ]);
201
+ const enriched = candidates.map((candidate, index) => ({
202
+ ...candidate, workflowTypeName: candidate.workflowTypeName ?? types.get(candidate.id) ?? null, totalCount: counts[index],
203
+ })).filter(candidate => candidate.totalCount !== 0);
204
+ enriched.sort((left, right) => {
205
+ if (left.totalCount !== right.totalCount) {
206
+ if (left.totalCount === null)
207
+ return 1;
208
+ if (right.totalCount === null)
209
+ return -1;
210
+ return right.totalCount - left.totalCount;
211
+ }
212
+ return (left.workflowTypeName ?? '').localeCompare(right.workflowTypeName ?? '', 'zh-CN')
213
+ || left.name.localeCompare(right.name, 'zh-CN') || left.id.localeCompare(right.id);
214
+ });
215
+ const excluded = candidates.length - enriched.length;
216
+ const question = excluded === 0 ? error.message : enriched.length === 0
217
+ ? `匹配到的${candidates.length}个工作流在当前筛选条件下均无待办,无需选择。`
218
+ : `已排除当前筛选条件下没有待办的工作流,请确认要查询的工作流(剩余${enriched.length}项)。`;
219
+ return new WorkflowCliError(error.type, error.subtype, question, {
220
+ code: error.code, retryable: error.retryable, stage: error.stage, exitCode: error.exitCode,
221
+ partialData: error.partialData,
222
+ details: {
223
+ ...details,
224
+ ...(excluded > 0 ? {
225
+ clarificationQuestion: question,
226
+ ...(typeof details.message === 'string' ? { message: question } : {}),
227
+ ...(enriched.length === 0 ? { clarificationReason: 'no_matching_todos' } : {}),
228
+ } : {}),
229
+ candidates: enriched.map((candidate, index) => ({ ...candidate, index: index + 1 })),
230
+ },
231
+ });
232
+ }
@@ -91,11 +91,16 @@ function clarificationEnvelope(error, operation) {
91
91
  * 2026-10-30 新增一档:
92
92
  * - `workflow_required` —— **必填入参没给**(缺键/空数组/空字符串)。它不是「名称匹配不到」,
93
93
  * 而是调用方少传了入参;文案必须让模型先认账、再问用户要流程名,而不是让用户去"核对名称"。
94
+ * - `no_matching_todos` —— 已按条件核实同名候选的待办数量,结果全为0;返回业务空态,不再追问。
94
95
  *
95
96
  * 无 `reason` 时(名称解析 0 / 多命中 / 只给了填充词)保持原文案不变。
96
97
  */
97
98
  function clarificationNote(reason, candidateCount) {
98
99
  const base = '这不是失败,也**不代表查询已执行**:本次查询已停止,没有返回任何流程数据。';
100
+ if (reason === 'no_matching_todos') {
101
+ return '已按当前筛选条件核实全部匹配工作流的待办数量,结果均为0。'
102
+ + '请如实告知用户当前条件下没有待办;不要弹出空选择框、自动绑定工作流或要求用户重新提供名称。';
103
+ }
99
104
  // ★ 2026-10-30:`workflow_required` = **必填入参没给**,与「名称匹配不到」性质完全不同。
100
105
  // 这里要模型先认账(少传了入参),而不是去问用户「是不是名字打错了」。
101
106
  if (reason === 'workflow_required') {
package/docs/contract.md CHANGED
@@ -56,7 +56,7 @@ weaver-work-cli --json contract run contract.workflow.query --input-json '{"work
56
56
  | 流程解析 | `contract.workflow.query`、`contract.workflow.list`、`contract.workflow.form.info`(三段式:loadBaseParam → loadFrameParam → getFormLayout)、`contract.workflow.field.options` |
57
57
  | 流程写操作 | `contract.request.create.prepare/apply`、`contract.request.save.prepare/apply`、`contract.request.submit.prepare/apply`、`contract.request.supervise.prepare/apply` |
58
58
  | 流程状态 | `contract.request.status`、`contract.request.log` |
59
- | 合同智能审查 | `contract.review.upload`(ebContract 两段式上传 + 审查页)、`contract.review.export`(`getAiReviewRecord`) |
59
+ | 合同智能审查 | 上传走流程通道 `contract.flow.launch` / `contract.firstscreen.run`(收口按本轮 `flowId` 自动预热 `saveInternalRecord`);取结果 `contract.review.export`(`getAiReviewRecord`)/ `contract.review.digest`,**`flowId` 取助手 URL 上的动态值(= 本轮 `workflowId`,与预热同键同值),CLI 无默认值** |
60
60
  | 发起流程入口 | `contract.flow.page`、`contract.flow.launch`(workflow 模块上传 + `automaticFormFilling`) |
61
61
  | 模板推荐 | `contract.recommend.doc`(`recommendContractDoc`) |
62
62
  | 文档比对 | `contract.compare.upload`(docCompared)、`contract.compare.search`、`contract.compare.versions`、`contract.compare.page`、`contract.compare.diff` |
@@ -69,7 +69,7 @@ weaver-work-cli --json contract run contract.workflow.query --input-json '{"work
69
69
 
70
70
  ## 文件上传与页面地址
71
71
 
72
- - 上传统一走 `POST /api/file/preUploadCheck` → `POST /api/file/module/upload`;`module` 按场景固定:审查 `ebContract`、流程 `workflow`、比对 `docCompared`,不可混用。
72
+ - 上传统一走 `POST /api/file/preUploadCheck` → `POST /api/file/module/upload`;`module` 按场景固定:流程(含合同预审)`workflow`、比对 `docCompared`,不可混用(审查专用的 `ebContract` 通道已随 `contract.review.upload` 下线)。
73
73
  - 预检返回非空 `fileid` 即为秒传,跳过第二段;否则用 `preUploadId` + `uploadType` 带文件本体上传。
74
74
  - 成功判据是拿到非空 `fileId`,HTTP 200 不算成功;`uploadType=chunk` 时以 `upload_chunk_unsupported` 停止。
75
75
  - 只接受 `.doc` / `.docx`,单文件上限 200MB。
package/docs/e10-auth.md CHANGED
@@ -118,8 +118,9 @@ XiaoE 宿主(网页端 `XIAOE_CLIENT_TYPE=cloud`、桌面客户端 `client`)
118
118
  不加后缀,共用一份凭据(同租户没必要维护两份登录态)。显式 `--profile` 始终优先,不再自动改名。
119
119
 
120
120
  `auth login` 和 `auth oidc` 都严格走 E10 OAuth2.0 浏览器授权登录,不会读取或消费 XiaoE 统一登录凭据。本地默认监听
121
- `http://127.0.0.1:19800/callback`。如端口被占用,可以使用
122
- `--port 19801` 指定其他端口;如需要区分客户端来源,可以使用
121
+ `http://127.0.0.1:19800/callback`。默认端口被占用时自动切到系统分配的可用端口,
122
+ 实际端口同时用于授权 URL 和换票请求。也可以使用 `--port 0` 直接选可用端口,或
123
+ `--port 19801` 固定其他端口(显式固定端口被占用时仍报错);如需要区分客户端来源,可以使用
123
124
  `--agent_type <value>`。未显式传入时,CLI 会依次读取 `WEAVER_AGENT_TYPE`、
124
125
  `WORKBUDDY_AGENT_TYPE`、`CODEX_AGENT_TYPE`,再根据 `WORKBUDDY_*` / `CODEX_*`
125
126
  环境变量推断当前宿主,最后回落为 `weaver-work-cli`。浏览器授权地址会同时携带
@@ -129,6 +130,9 @@ XiaoE 宿主(网页端 `XIAOE_CLIENT_TYPE=cloud`、桌面客户端 `client`)
129
130
  智能小 E `xiaoe`(`agent_type` 为 `XiaoE`)、Codex `codex`;中文写法(如「豆包」「通义千问」)
130
131
  同样能归类。终端手工登录(回落为 `weaver-work-cli`)或无法归类的自定义 `agent_type` 不下发
131
132
  该参数,避免污染统计。
133
+ 同时再带一个 `promotionSource`,取 E10「推广来源」字典里的泛微标识:千问-et 连接器 `188`、
134
+ 豆包-et 连接器 `187`、workbuddy-et 连接器 `186`。它由上面的 `promotionKeyword` 反查得出,
135
+ 字典里没有收录的来源(智能小 E、Codex、终端手工登录)不下发,不臆造编号。
132
136
  授权完成后的本地回调页会为已识别的桌面宿主显示应用打开弹层。CLI 内置 WorkBuddy
133
137
  (`workbuddy://`)、智能小 E(`xiaoe-client://`)和 Codex(`codex://`)映射;其他
134
138
  智能体在 `agent_type` 本身是合法协议名时,默认按 `<agent_type>://` 唤起。Windows/macOS
@@ -140,8 +144,32 @@ Chrome/Edge 原生确认框。宿主需要返回特定会话时,可以传
140
144
  返回地址只接受桌面应用自定义协议,不接受 `http(s)`、脚本或本地文件 URL。“始终打开”
141
145
  偏好保存在当前本地回调地址的浏览器存储中。本地 CLI 打开通道默认保留 15 分钟;通道
142
146
  结束后页面会自动退回浏览器自定义协议打开方式,不直接显示网络请求错误。
147
+
148
+ **`auth init` 不展示该弹层**:无论 stdout 是否为终端、是否配置
149
+ `--agent-return-url` / `WEAVER_AGENT_RETURN_URL`,回调成功写入凭据后立即输出
150
+ `{"status":"authorized",...}` 并退出。进度和授权 URL 只写 stderr。
151
+ 豆包等宿主按「进程退出 + stdout」判定授权结果,不能让这一步依赖用户再次点击「打开」。
152
+ `auth login` / `auth oidc` 带 `--is-connector` 或 stdout 不是终端时也跳过默认回跳,
153
+ 但显式返回地址仍生效;它们保留原有登录结果输出格式,不使用 `auth init` 的平台 JSON 契约。
154
+ `--agent_type doubao` 继续传给 E10 作为渠道标识,无需更换成其他智能体名称绕过弹层。
155
+ 并发或刷新的回调不会重复换票;E10 的 HTTP 200 + `status:400` 也按失败处理,保留业务错误码。
156
+ 发布豆包连接器时,需要同步更新 `com.doubao/cli.json` 的 `install.default` 和 `install.linux`
157
+ 中的固定 CLI 版本或安装包地址。仅在普通终端安装本地 tgz,不能证明豆包隔离运行环境也已更新;
158
+ 应在连接器运行环境中执行 `weaver-work-cli --version`,Windows 下同时用
159
+ `where.exe weaver-work-cli` 确认命中的入口。安装包需重新运行构建以更新实际执行的 `dist/index.js`
160
+ 和 `dist/chunks`,仅修改 `dist/internal/e10/auth/commands.js` 不会更新 bundle 入口。
143
161
  智能小 E 统一登录不会经过浏览器,也不会显示“返回智能小 E”弹层;该弹层只属于用户另行显式发起的 `auth login` 浏览器 OAuth。
144
162
 
163
+ 唤起系统默认处理器时,CLI 不再依赖 `PATH` 解析可执行文件:Windows 取
164
+ `%SystemRoot%\System32\rundll32.exe`(探测不到再试 `Sysnative`,仍没有才回退裸命令名),
165
+ macOS/Linux 优先 `/usr/bin/open`、`/usr/bin/xdg-open`。连接器或沙箱宿主常把 `PATH` 整体
166
+ 重建、不含系统目录,裸命令名会 `spawn rundll32.exe ENOENT`,表现为授权页「打开应用」
167
+ 返回 500 且日志只剩「请确认应用已安装」;现在失败日志会带上真实的 `errno` 与命令路径。
168
+ 授权成功(`/callback` 或 `/agent-return` 打开动作)后,CLI 会先关空闲连接、最多 500ms 后
169
+ 强制关闭残留连接并立即退出,输出 `{"status":"authorized"}`。此前只调用 `server.close()`,
170
+ 浏览器的 keep-alive 连接会让回调迟迟不触发,以「进程退出」判定授权结果的宿主(如豆包)
171
+ 就会误报鉴权失败。
172
+
145
173
  HTTPS E10 授权页跳转到 HTTP loopback 是桌面 OAuth 的标准回调方式:它属于浏览器
146
174
  顶层导航,不按 Mixed Content 子资源请求处理。但部分 E10 环境或浏览器安全策略会把
147
175
  回调改成 `https://127.0.0.1:<port>`;由于 CLI 本地监听器是 HTTP,此时浏览器会显示
@@ -225,3 +253,28 @@ macOS/Linux(bash/zsh):
225
253
  eval "$(weaver-work-cli auth export-weaver-env --shell posix)"
226
254
  weaver-work-cli run node -e "console.log(process.env.WEAVER_BASE_URL || 'no e10 auth')"
227
255
  ```
256
+
257
+ ### 小E 统一登录:换票业务码与域名匹配
258
+
259
+ `auth xiaoe` 的核心是 `POST {XIAOE_DOMAIN}/spec-apps/api/app/rpachat/skill/extend/eteamId`,
260
+ body 只带 `{"domain": "<E10 baseUrl>"}`,用小E 登录态换一次性 `eteamId`。实测业务码:
261
+
262
+ | code | 上游 msg | 含义 / 处置 |
263
+ | --- | --- | --- |
264
+ | `0000` / `200` | 请求成功 | 成功,`data.eteamId` 可用 |
265
+ | `2001` | 未找到可用的e10系统 | domain 在小E 侧匹配不到该账号可用的 E10 系统 |
266
+ | `3005` | 账号已在其它地方登录 | 同一账号的旧会话被顶掉,重登小E |
267
+ | `3006` | 未登录,请先登录!/ token无效,禁止登录! | Authorization 缺失或被拒,登录态失效 |
268
+ | `4000` | 获取全局变量"code"值为空… | domain 命中 eteams,但账号没建过通用型应用 |
269
+
270
+ `2001` 的匹配是**严格字符串**,`domain` 必须是 `https://` + 主机名的裸形式:
271
+
272
+ - `https://www.e-cology.com.cn` → `0000`
273
+ - `https://www.e-cology.com.cn:443` → `2001`(**带端口即失配**)
274
+ - `http://www.e-cology.com.cn`、`https://…/e10`、`www.e-cology.com.cn` → `2001`
275
+ - 主机名大小写、尾斜杠不影响匹配
276
+
277
+ 因此私有化部署若跑在非标端口(如 `https://hpioa.example.net:8282`),必须先确认
278
+ 小E 侧登记的到底是带端口还是不带端口的域名,`--base-url` 要与之一字不差;两
279
+ 种写法都回 `2001` 时,说明该小E 账号根本没被授权到这台 E10(或该系统未在该小E
280
+ 服务域登记),此时应改用 `auth login` / `auth set` 直连,不要继续换票重试。
package/docs/ehr.md CHANGED
@@ -156,7 +156,7 @@ printf '%s\n' '{"beginDate":"2026-03-01","endDate":"2026-03-31"}' | weaver-work-
156
156
  **displayData 显示层策略**:EB 列表接口(`mapResult=1`)响应同时含 `data.data`(原始层,
157
157
  人员/字典字段为裸大 ID)与 `data.displayData`(显示层,服务端已内联姓名与字典中文)。
158
158
  列表 operation 优先取 displayData(零额外请求);缺失时回退原始层——字典映射 + 纯 ID 创建人
159
- 经 `/api/hrm/common/getEmployeeByIds`(`devtype: 5` 头,100 个一批)批量反查兜底。显示层行清理
159
+ 经 `/api/hrm/common/browser/destData/resource`(`selectIds` 逗号串,100 个一批)批量反查兜底。显示层行清理
160
160
  剔除 `DISPLAY_UI_KEYS`(operate/isToDo/todoPropSpan/flow_status 等)与 `xxxSpan`/`xxxAction` 动态后缀。
161
161
 
162
162
  **详情卡片**:`hasRights`(READ 闸门,严格前置)与 `getCandidateCardPrepareQuery` 并行
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weaver-work-cli",
3
- "version": "0.1.62",
3
+ "version": "0.1.64",
4
4
  "description": "面向泛微工作工具链的可扩展 TypeScript CLI 基础框架(E10 业票通等能力)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -5,7 +5,7 @@ display_name_en: Weaver E10 Organization Management
5
5
  description: 泛微E10组织管理(员工/组织/岗位查询)的 E10 查询能力,通过 weaver-work-cli hrm 命令执行。
6
6
  description_zh: 泛微E10组织管理(员工/组织/岗位查询)的 E10 查询能力,通过 weaver-work-cli hrm 命令执行。
7
7
  description_en: Weaver E10 Organization Management capabilities for E10, covering employee, organization and position queries, delivered through the weaver-work-cli hrm command.
8
- version: 1.0.28
8
+ version: 1.0.29
9
9
  author: 泛微网络科技股份有限公司
10
10
  agent_created: true
11
11
  requires:
@@ -133,7 +133,7 @@ weaver-work-cli --json hrm run hrm.org.resolve --input-json '{"virtual":"1号维
133
133
  三个业务域统一走 E10 HRM 内部浏览/详情接口,响应统一 `WeaResult` 契约,已在 CLI 内归一化,但语义差异仍会影响结果解读:
134
134
 
135
135
  - **响应成功判定**:统一 `code=200`(WeaResult)。业务失败码即使 HTTP 200 也会抛 `api/business_error`;`403` 会抛 `api/permission_denied`(提示联系管理员开启接口开关,不盲目重试)。
136
- - **数据行位置(描述的是上游原始响应,不是 CLI 输出)**:上游列表接口行在 `data.data`(浏览按钮 `browser/data/*` 与岗位批量 `queryListByOrgTree`);下属按 id 查询(`myDirectSubordinates`/`myIndirectSubordinates`)的行在 `data.page.result`、总数在 `data.page.totalCount`。
136
+ - **数据行位置(描述的是上游原始响应,不是 CLI 输出)**:上游列表接口行在 `data.data`(浏览按钮 `browser/data/*`、按 id 批量 `browser/destData/*` 与岗位批量 `queryListByOrgTree`);下属按 id 查询(`myDirectSubordinates`/`myIndirectSubordinates`)的行在 `data.page.result`、总数在 `data.page.totalCount`。
137
137
  - CLI 已把上述差异归一化:**列表类统一读 envelope 的 `data.rows` + `data.total`,分页参数在 `meta`(current/pageSize)**。不要把上游的 `data.data` / `data.page.result` 当成 CLI 输出路径。
138
138
  - ⚠️ **CLI 不会去请求 count 接口**(员工浏览上游的 `data.count` 恒为 0,调 count 也拿不到可靠总数):除 `subordinate.by-id` 外,`employee.query`/`subordinate.mine`/`dept.members` 的 `data.total` **就是本页行数**,不是真实总数。要真实总数只能按 `current` 逐页翻到 `rows.length < pageSize`;`subordinate.by-id` 的 `total` 来自上游 `page.totalCount`,是真值(并附 `data.page.hasNext/totalPages`)。
139
139
  - **详情接口**:员工卡片(`card/get`)、组织详情(`organization/getForm`)、岗位详情(`getEditOrAddPostForm`)底层都是 `WeaForm` 单对象。**上游响应**里业务字段在 `data.data`;CLI 会把它**展平上移一层**,因此**最终输出中业务字段直接挂在 envelope 的 `data` 下,不存在 `data.data` 嵌套**(`items`/`groups`/`layout` 等前端表单元数据已丢弃),并附 `link`。
@@ -149,7 +149,7 @@ weaver-work-cli --json hrm run hrm.org.resolve --input-json '{"virtual":"1号维
149
149
  - **🔴 分页统一约束:`pageSize` 默认 `10`、最大 `100`**。支持 `pageSize` 的操作只有 `employee.query`/`subordinate.mine`/`subordinate.by-id`/`dept.members`/`org.query`/`position.list`;`position.query` 不接受该参数(传入被忽略,固定按 200 返回)。需要更多数据时用 `current` 递增翻页,**禁止靠放大 `pageSize` 一次取回大结果**——大结果会整段进入上下文。`position.list` 自带自动翻页,通常无需显式传 `pageSize`。
150
150
  - 说明:服务端**不校验**该上限(实测 `pageSize=500` 会原样返回 500 行,不传 `pageSize` 时服务端按 20 返回),所以这条是**本技能为控制上下文体积定下的自觉约束**。Agent 必须遵守,不得因为"服务端没拦"就放大取值。
151
151
  - **🔴 `status` 不能单独使用**:`employee.query` 的 `status`(`["normal"]` 在职 / `["6"]` 离职)必须搭配其它条件(keyword/工号/姓名/手机/邮箱)。
152
- - **批量禁止循环单查**:批量查询一律走 `batch`(每批 ≤100,CLI 自动分批);岗位批量走 `position.list` 一次性返回,禁止按 id 逐个调详情。
152
+ - **批量禁止循环单查**:批量查询一律走 `batch`(每批 ≤100,CLI 自动分批;个别 id 无效不会整批失败,会进 `data.missing`,遇到时改查正确的人员 `id`,不要原值重试);岗位批量走 `position.list` 一次性返回,禁止按 id 逐个调详情。
153
153
  - **姓名/工号/名称模糊匹配**:多人命中时必须列出候选让用户选择,不得自动取第一条;`dept.members` 部门重名时报 `dept_ambiguous`,需改用组织 id。`hrm.org.resolve` 不抛歧义错误,而是回 `data.status = ambiguous` + `data.candidates`,同样必须问用户、不得自动取第一条。
154
154
  - **🔴 禁止自主任意解读名称**:`hrm.org.resolve` 报 `not_found` 时,`data.suggestions`(近似名称)**只是给用户看的提示,不是给你用的参数**——不得据此改名重试、也不得省略「不存在」这一事实直接给结果。凡「名称对不上」一律先回用户,用户确认后再用 `virtualId`/`orgId` 复调。
155
155
  - **🔴 禁止绕取未暴露能力**:`hrm.employee.dls`(代理商查询)与 `hrm.org.virtuals`(列多维)都在 `hrm schema --full` 的 `withheldOperations` 里声明为不可用;**不得构造假查询(如故意传不存在的维度名)去套内部字段**、也不得编造或绕过。用户问到就如实回答暂不支持。
@@ -9,7 +9,7 @@
9
9
  | operation | 必填 | 说明 |
10
10
  | --- | --- | --- |
11
11
  | `hrm.employee.query` | 至少一个收敛条件 | 按工号/姓名/手机/邮箱/状态分页查询员工;**默认每行只回人员信息(6 键)**,`full: true` 回完整行 |
12
- | `hrm.employee.batch` | `ids` | 按人员 id 列表批量查精简详情(每批 ≤100 自动分批,不含部门/岗位/上级名称) |
12
+ | `hrm.employee.batch` | `ids` | 按人员 id 列表批量查精简详情(每批 ≤100 自动分批,不含部门/岗位/上级名称);个别 id 无效不会拖垮整批,会进 `data.missing` |
13
13
  | `hrm.employee.detail` | `id` | 按人员 id 取**人员卡片**:默认只回核心业务字段(组织/上级/助理/职称/职级/办公地点等);`full: true` 才回完整卡片 |
14
14
  | `hrm.subordinate.mine` | `scope`(默认 all) | 查当前登录人的下属(direct/indirect/all),基于当前会话身份;**默认每行只回 `id`/`name`/`link`**(`full: true` 回完整行) |
15
15
  | `hrm.subordinate.by-id` | `id`(`scope` 默认 direct) | 按目标人员 id 查直接/间接下属(**无需切换会话**);所有下属 = direct + indirect 两次并集;**默认每行只回 `id`/`name`/`link`**(`full: true` 回完整行) |
@@ -146,7 +146,7 @@ weaver-work-cli --json hrm run hrm.dept.members --input-json '{"dept":"示例部
146
146
 
147
147
  ## 输出处理
148
148
 
149
- - 查询类返回 `data.rows`(行数组)+ `data.total` + `meta`(current/pageSize);批量/下属返回 `data.rows` + `data.total`。
149
+ - 查询类返回 `data.rows`(行数组)+ `data.total` + `meta`(current/pageSize);批量/下属返回 `data.rows` + `data.total`;`employee.batch` 在存在无法解析的 id 时另回 `data.missing`(字符串 id 数组,后端不会返回该字段)。
150
150
  - ⚠️ **`data.total` 是「本页行数」,不是真实总数**(源码用返回行数当 total)。实测同一个 `job_num:"WS"`:`pageSize=5` → `total=5`、`pageSize=50` → `total=50`、不传 → `total=20`。要真实总数只能按 `current` 逐页翻到 `rows.length < pageSize` 为止。**例外**:`subordinate.by-id` 的 `total` 是真实总数(另有 `data.page.hasNext/totalPages`)。
151
151
  - ⚠️ **不传 `pageSize` 时 `meta.pageSize` 会显示 200,但服务端实际只回 20 行**;别用 meta 判断"拿到了多少条"。
152
152
  - 列表行分两种形态:**默认精简行只有 `link`**(人员卡片链接 `/sp/hrm/profileInfo/{id}`);**完整行(`employee.query` 传 `full: true`、`dept.members`/下属传 `full: true`)额外有 `deptLink`(部门卡片链接)与 `departmentId`**,这时可同时输出 `[部门名](deptLink)`。两种形态都用 `[姓名](link)` 呈现人名。
@@ -169,6 +169,7 @@ weaver-work-cli --json hrm run hrm.dept.members --input-json '{"dept":"示例部
169
169
  - **🔴 `status` 不能单独使用**:必须搭配其它条件,否则 `empty_condition`。
170
170
  - 在职查询未命中时,CLI 会在 `data.hint` 提示"可能已离职",Agent 应据此询问用户是否要查离职人员,不要直接答复"查无此人"。
171
171
  - `employee.batch` 不含部门/岗位/上级**名称**(返回纯字符串),需要这些信息时改用 `employee.query`(列表行)或 `employee.detail`(人员卡片,含组织/上级/助理等;完整卡片需加 `full: true`)。
172
+ - **`employee.batch` 的无效 id 处理**:底层走 `POST /api/hrm/common/browser/destData/resource`(`selectIds` 逗号串,每批 ≤100)。该接口**只要批内有一个 id 解析失败就整批 500**(`For input string: "..."`),CLI 会自动二分降级定位脏 id,把它收进 `data.missing`,其余行照常返回。看到 `missing` 非空时,说明这些值不存在或不是人员 `id`(最常见是把 `userid`/`cid` 当人员 id 传),**不要用同一个值重试**,应先用 `employee.query` 反查出正确的人员 `id`。
172
173
  - `subordinate.by-id` 的 `scope` 两值:`direct`(直接)/`indirect`(间接);"所有下属"需两次调用并集(无 `all` 接口,实测 404)。
173
174
  - `subordinate.mine` 返回的是**当前登录人**的下属,查"某人的下属"请用 `subordinate.by-id`。
174
175
  - 人员 id 是长整型,按字符串传递。
@@ -181,3 +182,13 @@ weaver-work-cli --json hrm run hrm.dept.members --input-json '{"dept":"示例部
181
182
  - `dept_not_found`/`dept_ambiguous`:`dept.members` 组织未找到或重名,改用组织 id。
182
183
  - `permission_denied`(`code=403`):HRM 读接口开关未开启,提示用户联系管理员开启,不要盲目重试。
183
184
  - 认证类错误:停止查询并执行入口 `SKILL.md` 的登录失效强制分流;XiaoE 只走 `auth xiaoe`,非 XiaoE 只走 `auth login`,禁止其他登录 Skill。
185
+
186
+ ## 请求头(`weaver-work-cli` 统一注入)
187
+
188
+ 本技能不直接发 HTTP 请求:`employee.batch` 等操作由 CLI 组装并发出,请求头三件套由 CLI 统一注入,业务入参不要传、也不要手工拼装(权威声明见 `weaver-e10-shared`)。
189
+
190
+ ```text
191
+ Cookie: <weaver-work-cli 托管登录态的完整原始 Cookie 串,原样透传,禁止裁剪/去重/改写>
192
+ eteamsid: <weaver-work-cli 托管登录态的 ETEAMSID>
193
+ User-Agent: AgentType=<agentType>,IsAgent=true
194
+ ```