weaver-work-cli 0.1.73 → 0.1.76

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 (363) hide show
  1. package/README.md +37 -1
  2. package/dist/chunks/{archive-THZV4ND4.js → archive-ENBSUMHV.js} +14 -9
  3. package/dist/chunks/{archive-oa-PQ23OLEV.js → archive-oa-7BFPQ6M5.js} +10 -7
  4. package/dist/chunks/{asset-RGPROZYH.js → asset-V5SUD3PW.js} +10 -7
  5. package/dist/chunks/{asset-idle-Z2PDX7NA.js → asset-idle-3CEL7WFX.js} +7 -4
  6. package/dist/chunks/{attachment-content-R3RPVOYE.js → attachment-content-24RL44SE.js} +3 -3
  7. package/dist/chunks/{blog-7U3QZPIF.js → blog-FLI4SS3P.js} +10 -7
  8. package/dist/chunks/{caizhilian-3AB42GCV.js → caizhilian-7WCTKCCP.js} +10 -7
  9. package/dist/chunks/{calendar-KINM64E4.js → calendar-G726HUUH.js} +10 -7
  10. package/dist/chunks/chunk-257JXJGD.js +30 -0
  11. package/dist/chunks/chunk-2BZ7TY4M.js +49 -0
  12. package/dist/chunks/{chunk-4BXR6CNB.js → chunk-2KW7AI6P.js} +2 -2
  13. package/dist/chunks/{chunk-WM33BSIL.js → chunk-2QCCXPNU.js} +1 -1
  14. package/dist/chunks/chunk-2UV4IZIT.js +473 -0
  15. package/dist/chunks/{chunk-R3MK2RBN.js → chunk-5E2FDXBU.js} +1 -1
  16. package/dist/chunks/{chunk-DRUND2PJ.js → chunk-5QUTQHXF.js} +225 -152
  17. package/dist/chunks/chunk-7DE3VMZD.js +35 -0
  18. package/dist/chunks/{chunk-PAFOLIYQ.js → chunk-AZC53XSQ.js} +1 -1
  19. package/dist/chunks/{chunk-6HT73VOI.js → chunk-BWFCTE43.js} +2 -2
  20. package/dist/chunks/{chunk-4YXAK6OA.js → chunk-FEZK536Z.js} +12 -7
  21. package/dist/chunks/{chunk-IU6UB2TD.js → chunk-FPWCCRKT.js} +48 -6
  22. package/dist/chunks/{chunk-LLCMOZ5L.js → chunk-H6N6U2D6.js} +11 -11
  23. package/dist/chunks/{chunk-54ST55IJ.js → chunk-JJONWB5N.js} +11 -1
  24. package/dist/chunks/{chunk-GWJLAF6B.js → chunk-JWF2R6EQ.js} +0 -462
  25. package/dist/chunks/chunk-KINXYJXM.js +205 -0
  26. package/dist/chunks/{chunk-F4HM25K4.js → chunk-KJA7CRES.js} +1 -1
  27. package/dist/chunks/chunk-L5SCNJKX.js +1166 -0
  28. package/dist/chunks/{chunk-TV46Q4NY.js → chunk-MS7MKBGJ.js} +74 -68
  29. package/dist/chunks/{chunk-XZBYRYWX.js → chunk-NZQRW4KL.js} +2 -2
  30. package/dist/chunks/chunk-OJ4JPD25.js +428 -0
  31. package/dist/chunks/chunk-OVTCWLNQ.js +1346 -0
  32. package/dist/chunks/{chunk-NUP4RYZK.js → chunk-PMRNIGKZ.js} +2 -2
  33. package/dist/chunks/{chunk-2CHGUYMG.js → chunk-Q7RXCK2Y.js} +4 -4
  34. package/dist/chunks/{chunk-AMAPQVBT.js → chunk-QVKRNL7L.js} +286 -305
  35. package/dist/chunks/{chunk-7QFVXP2X.js → chunk-R4PN3OFK.js} +8 -7
  36. package/dist/chunks/{chunk-L7TYG5SN.js → chunk-RVEKGVZU.js} +2 -2
  37. package/dist/chunks/{chunk-2XED2FKY.js → chunk-SQFKBWTR.js} +38 -36
  38. package/dist/chunks/chunk-SU6IJD6D.js +49 -0
  39. package/dist/chunks/{chunk-IBSJJGXL.js → chunk-T7HVQ2WP.js} +2 -2
  40. package/dist/chunks/{chunk-ZWLWXHJC.js → chunk-TBCKK6LH.js} +2 -2
  41. package/dist/chunks/{chunk-JMJBPP4B.js → chunk-UDBQJLQF.js} +2 -2
  42. package/dist/chunks/chunk-UUJK76HV.js +209 -0
  43. package/dist/chunks/{chunk-4I26YMBY.js → chunk-WHI6YAUE.js} +7 -3
  44. package/dist/chunks/{chunk-BWYVS62Z.js → chunk-WJQJ7YEX.js} +4 -4
  45. package/dist/chunks/{chunk-GAMGDNTF.js → chunk-XNN5PZTI.js} +1 -1
  46. package/dist/chunks/chunk-Y3C6MDL7.js +28 -0
  47. package/dist/chunks/chunk-ZM7RN2IM.js +38 -0
  48. package/dist/chunks/cli-DFLV57LO.js +226 -0
  49. package/dist/chunks/commands-J52MJ6NF.js +70 -0
  50. package/dist/chunks/{conflict-VPAR7E6F.js → conflict-72Q6DM4I.js} +2 -2
  51. package/dist/chunks/{contract-DDXAO2DZ.js → contract-IRNRQ5FY.js} +12446 -5964
  52. package/dist/chunks/{cowork-34QCHMDD.js → cowork-GZDODGKF.js} +11 -8
  53. package/dist/chunks/{create-flow-52PU2OBI.js → create-flow-UGTDI7SP.js} +6 -6
  54. package/dist/chunks/{data-CLQ62QGD.js → data-HTQZRPPI.js} +6 -3
  55. package/dist/chunks/{ebuilder-form-W5R7Q22S.js → ebuilder-form-GHNIZ7ET.js} +9 -6
  56. package/dist/chunks/{ehr-LCNAVMK5.js → ehr-PHIBBUIG.js} +23 -16
  57. package/dist/chunks/{entry-mode-6Z3ZV3DE.js → entry-mode-5WOXFE67.js} +3 -3
  58. package/dist/chunks/{env-RDKWAARB.js → env-H4ALHESA.js} +2 -2
  59. package/dist/chunks/{esb-ANKPUU65.js → esb-ATRKVHCD.js} +10 -7
  60. package/dist/chunks/{factory-434B7RAT.js → factory-COX6AVK7.js} +1 -1
  61. package/dist/chunks/{fna-AKBSG5HI.js → fna-IKYI3SST.js} +13 -8
  62. package/dist/chunks/{group-chat-PROTW22R.js → group-chat-ZIWQQO4G.js} +3 -3
  63. package/dist/chunks/{host-5R2SNFWD.js → host-6UOXYOOY.js} +6 -3
  64. package/dist/chunks/{host-7FJW4E7R.js → host-EJSJSLVK.js} +6 -3
  65. package/dist/chunks/{host-WO4L5G5I.js → host-EYNLB6S4.js} +6 -3
  66. package/dist/chunks/{host-PDJAKCT7.js → host-OT4KNR3G.js} +6 -3
  67. package/dist/chunks/{host-CGXUFQO4.js → host-UY4LQPN4.js} +6 -3
  68. package/dist/chunks/{host-XIYG4F4B.js → host-XXGDQM7D.js} +6 -3
  69. package/dist/chunks/{hrm-WGODDTEH.js → hrm-5JQ7QZ6A.js} +8 -5
  70. package/dist/chunks/{im-YKTKAJU3.js → im-2YJW3EI5.js} +7 -4
  71. package/dist/chunks/{invoice-PVYCCCVM.js → invoice-37HR6L3W.js} +956 -566
  72. package/dist/chunks/{jiuchuanhui-RKOQW7BY.js → jiuchuanhui-KBWUZ7WT.js} +17 -10
  73. package/dist/chunks/{lazy-dispatch-DW45AFQ5.js → lazy-dispatch-MZ3EZYDL.js} +22 -8
  74. package/dist/chunks/{mail-BNB5S4NW.js → mail-YBKUM6HM.js} +11 -8
  75. package/dist/chunks/{meeting-O2KDJH66.js → meeting-XE6CTXYA.js} +22 -18
  76. package/dist/chunks/{minute-doc-JUCG56GY.js → minute-doc-4BA2R5EA.js} +4 -4
  77. package/dist/chunks/{okr-LWFGWOE7.js → okr-HW7IULIR.js} +10 -7
  78. package/dist/chunks/{operations-532PN5OB.js → operations-4P2UYVLH.js} +7 -4
  79. package/dist/chunks/{performance-7W5COCFU.js → performance-PM2G6L3E.js} +6 -3
  80. package/dist/chunks/{plan-ZVY3IYTL.js → plan-3YYGZ7ZM.js} +10 -7
  81. package/dist/chunks/{project-SA62B7MH.js → project-XREEXFU2.js} +10 -7
  82. package/dist/chunks/{reception-NGIONPQ3.js → reception-7G3J2MA6.js} +8 -4
  83. package/dist/chunks/{recruit-stage-WOSN6MGP.js → recruit-stage-TSQWOGQD.js} +199 -74
  84. package/dist/chunks/register-SQOPIR2G.js +16 -0
  85. package/dist/chunks/{registry-N7P3W2RD.js → registry-3VTB3KLV.js} +7 -4
  86. package/dist/chunks/registry-7UDUWYB5.js +30 -0
  87. package/dist/chunks/{registry-R72GWXOG.js → registry-F4YFZLOD.js} +7 -3
  88. package/dist/chunks/{room-recommend-KCGIVUFR.js → room-recommend-FO3HLPNB.js} +4 -4
  89. package/dist/chunks/root-YZG2TS5W.js +16 -0
  90. package/dist/chunks/{schedule-6UP27HQ4.js → schedule-DHNNOHVS.js} +4 -4
  91. package/dist/chunks/{smart-extract-DDOQSPRB.js → smart-extract-T5Z4AULN.js} +15 -7
  92. package/dist/chunks/update-AV5VOXGY.js +13 -0
  93. package/dist/chunks/{workflow-V5ALD6QZ.js → workflow-MAGCHWYZ.js} +15 -10
  94. package/dist/cli.js +40 -0
  95. package/dist/cmd/action.js +3 -1
  96. package/dist/cmd/doctor/index.js +1 -1
  97. package/dist/cmd/e10/index.js +1 -1
  98. package/dist/cmd/identity/index.js +5 -8
  99. package/dist/cmd/index.js +2 -0
  100. package/dist/cmd/setup/index.js +1 -1
  101. package/dist/cmd/update/index.js +38 -0
  102. package/dist/core/manifest-view.js +1 -1
  103. package/dist/core/output.js +8 -1
  104. package/dist/core/runtime-agent.js +13 -0
  105. package/dist/core/update-notice.js +23 -0
  106. package/dist/index.js +105 -198
  107. package/dist/internal/e10/auth/agent-host-key.js +16 -0
  108. package/dist/internal/e10/auth/agent-hosts.js +45 -9
  109. package/dist/internal/e10/auth/commands.js +66 -36
  110. package/dist/internal/e10/auth/session.js +30 -15
  111. package/dist/internal/e10/auth/xiaoe.js +4 -20
  112. package/dist/internal/e10/auth-recovery.js +44 -4
  113. package/dist/internal/e10/context.js +5 -2
  114. package/dist/internal/update/bootstrap.js +96 -0
  115. package/dist/internal/update/npm.js +78 -0
  116. package/dist/internal/update/service.js +252 -0
  117. package/dist/internal/update/store.js +135 -0
  118. package/dist/shortcuts/archive/index.js +2 -2
  119. package/dist/shortcuts/archive/manifest.js +1 -0
  120. package/dist/shortcuts/archive/operations/search.js +3 -1
  121. package/dist/shortcuts/archive-oa/index.js +1 -1
  122. package/dist/shortcuts/asset/index.js +1 -1
  123. package/dist/shortcuts/asset-idle/index.js +1 -1
  124. package/dist/shortcuts/blog/index.js +1 -1
  125. package/dist/shortcuts/caizhilian/index.js +1 -1
  126. package/dist/shortcuts/calendar/index.js +1 -1
  127. package/dist/shortcuts/contract/data/bi-config.js +156 -0
  128. package/dist/shortcuts/contract/data/collection-ledger-html.js +189 -0
  129. package/dist/shortcuts/contract/data/collection-node-catalog.js +226 -0
  130. package/dist/shortcuts/contract/data/metric-catalog.js +154 -20
  131. package/dist/shortcuts/contract/data/report-renderers.js +414 -0
  132. package/dist/shortcuts/contract/data/report-spec.js +132 -0
  133. package/dist/shortcuts/contract/error-actions.js +114 -0
  134. package/dist/shortcuts/contract/host.js +12 -3
  135. package/dist/shortcuts/contract/index.js +17 -1
  136. package/dist/shortcuts/contract/manifest.js +398 -3
  137. package/dist/shortcuts/contract/ooxml/docx-table.js +48 -0
  138. package/dist/shortcuts/contract/operations/bi-preview.js +131 -0
  139. package/dist/shortcuts/contract/operations/bizreview-report.js +496 -0
  140. package/dist/shortcuts/contract/operations/collection-node.js +229 -0
  141. package/dist/shortcuts/contract/operations/docx-slots.js +735 -16
  142. package/dist/shortcuts/contract/operations/draft-build.js +940 -0
  143. package/dist/shortcuts/contract/operations/draft-submit.js +229 -0
  144. package/dist/shortcuts/contract/operations/first-screen.js +3 -2
  145. package/dist/shortcuts/contract/operations/generated-submit.js +175 -0
  146. package/dist/shortcuts/contract/operations/ledger-report.js +233 -0
  147. package/dist/shortcuts/contract/operations/ledger-stat.js +1400 -0
  148. package/dist/shortcuts/contract/operations/ledger.js +4 -1
  149. package/dist/shortcuts/contract/operations/metrics.js +9 -3
  150. package/dist/shortcuts/contract/operations/ops-draft.js +527 -0
  151. package/dist/shortcuts/contract/operations/page.js +9 -0
  152. package/dist/shortcuts/contract/operations/quote-submit.js +55 -229
  153. package/dist/shortcuts/contract/operations/registry.js +20 -0
  154. package/dist/shortcuts/contract/operations/sign-launch.js +256 -0
  155. package/dist/shortcuts/contract/operations/viewlink.js +334 -0
  156. package/dist/shortcuts/cowork/index.js +2 -2
  157. package/dist/shortcuts/ebuilder-form/index.js +1 -1
  158. package/dist/shortcuts/ehr/index.js +2 -2
  159. package/dist/shortcuts/ehr/manifest.js +1 -1
  160. package/dist/shortcuts/ehr/operations/recruit-position.js +7 -2
  161. package/dist/shortcuts/ehr/operations/recruit-write.js +7 -6
  162. package/dist/shortcuts/ehr/operations/recruit.js +318 -248
  163. package/dist/shortcuts/ehr/operations/shared.js +22 -2
  164. package/dist/shortcuts/esb/index.js +1 -1
  165. package/dist/shortcuts/fna/index.js +1 -1
  166. package/dist/shortcuts/fna/manifest.js +1 -0
  167. package/dist/shortcuts/fna/operations/expense-chart.js +3 -1
  168. package/dist/shortcuts/hrm/index.js +1 -1
  169. package/dist/shortcuts/invoice/business-response.js +13 -0
  170. package/dist/shortcuts/invoice/calendar.js +24 -0
  171. package/dist/shortcuts/invoice/host.js +26 -15
  172. package/dist/shortcuts/invoice/index.js +3 -3
  173. package/dist/shortcuts/invoice/invoice-record.js +7 -2
  174. package/dist/shortcuts/invoice/manifest.js +179 -155
  175. package/dist/shortcuts/invoice/operations/get.js +9 -3
  176. package/dist/shortcuts/invoice/operations/issuing-red-requests.js +138 -0
  177. package/dist/shortcuts/invoice/operations/registry.js +4 -5
  178. package/dist/shortcuts/invoice/operations/reim-auto.js +40 -2
  179. package/dist/shortcuts/invoice/operations/reim-customer-projects.js +79 -0
  180. package/dist/shortcuts/invoice/operations/reim-customer.js +79 -30
  181. package/dist/shortcuts/invoice/operations/reim-relation.js +0 -146
  182. package/dist/shortcuts/invoice/operations/reim.js +2 -126
  183. package/dist/shortcuts/invoice/operations/shared.js +15 -17
  184. package/dist/shortcuts/invoice/preapproval-enrichment.js +180 -0
  185. package/dist/shortcuts/invoice/projection.js +14 -0
  186. package/dist/shortcuts/invoice/read-enrichment.js +123 -0
  187. package/dist/shortcuts/jiuchuanhui/index.js +2 -2
  188. package/dist/shortcuts/jiuchuanhui/manifest.js +3 -0
  189. package/dist/shortcuts/mail/index.js +2 -2
  190. package/dist/shortcuts/meeting/index.js +1 -1
  191. package/dist/shortcuts/meeting/manifest.js +1 -0
  192. package/dist/shortcuts/meeting/operations/eb/catalog.js +5 -3
  193. package/dist/shortcuts/meeting/operations/eb/conflict.js +3 -1
  194. package/dist/shortcuts/meeting/operations/eb/create-flow.js +10 -9
  195. package/dist/shortcuts/meeting/operations/eb/factory.js +2 -0
  196. package/dist/shortcuts/meeting/operations/eb/member-expand.js +3 -2
  197. package/dist/shortcuts/meeting/operations/invitation-publish.js +3 -3
  198. package/dist/shortcuts/meeting/operations/invitation.js +4 -4
  199. package/dist/shortcuts/meeting/operations/link.js +3 -1
  200. package/dist/shortcuts/okr/index.js +1 -1
  201. package/dist/shortcuts/performance/index.js +1 -1
  202. package/dist/shortcuts/plan/index.js +1 -1
  203. package/dist/shortcuts/project/index.js +1 -1
  204. package/dist/shortcuts/reception/manifest.js +2 -2
  205. package/dist/shortcuts/recruit-stage/context.js +10 -2
  206. package/dist/shortcuts/recruit-stage/index.js +16 -3
  207. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +1 -1
  208. package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +1 -1
  209. package/dist/shortcuts/recruit-stage/operations/jd-create.js +17 -8
  210. package/dist/shortcuts/recruit-stage/operations/list.js +1 -1
  211. package/dist/shortcuts/recruit-stage/operations/resume-import.js +178 -35
  212. package/dist/shortcuts/recruit-stage/operations/search.js +2 -2
  213. package/dist/shortcuts/recruit-stage/operations/shortlist.js +4 -2
  214. package/dist/shortcuts/recruit-stage/shared.js +27 -53
  215. package/dist/shortcuts/smart-extract/manifest.js +1 -0
  216. package/dist/shortcuts/smart-extract/operations/fill.js +7 -2
  217. package/dist/shortcuts/smart-extract/operations/validate.js +4 -1
  218. package/dist/shortcuts/workflow/index.js +2 -2
  219. package/dist/shortcuts/workflow/manifest.js +1 -0
  220. package/dist/shortcuts/workflow/operations/aiDeepRead/render.js +4 -1
  221. package/dist/shortcuts/workflow/operations/deepRead.js +23 -2
  222. package/dist/shortcuts/workflow/operations/form.js +8 -2
  223. package/docs/agent-invoice.md +28 -2
  224. package/docs/contract.md +6 -1
  225. package/docs/e10-auth.md +25 -7
  226. package/docs/invoice.md +60 -9
  227. package/docs/operation-manual.md +15 -0
  228. package/package.json +2 -2
  229. package/skill-template/business-info.json +28 -0
  230. package/skill-template/domains/jinchengda.md +13 -1
  231. package/skill-template/domains/yepiaotong.md +36 -7
  232. package/skills/weaver-e10-archive-oa/references/source-manifest.json +3 -3
  233. package/skills/weaver-e10-caizhilian/references/auth-and-install.md +2 -1
  234. package/skills/weaver-e10-caizhilian/references/source-manifest.json +3 -3
  235. package/skills/weaver-e10-esb/references/source-manifest.json +3 -3
  236. package/skills/weaver-e10-jinchengda/SKILL.md +90 -32
  237. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +45 -0
  238. package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +68 -0
  239. package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +216 -0
  240. package/skills/weaver-e10-jinchengda/references/contract-clause-negotiate.md +215 -0
  241. package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +113 -0
  242. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +19 -3
  243. package/skills/weaver-e10-jinchengda/references/contract-decisions.md +114 -0
  244. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +53 -44
  245. package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +1 -1
  246. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +1 -1
  247. package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +200 -0
  248. package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +18 -1
  249. package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +138 -3
  250. package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +158 -0
  251. package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +3 -1
  252. package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +139 -0
  253. package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +2 -2
  254. package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +10 -3
  255. package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +106 -0
  256. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +1 -1
  257. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +176 -56
  258. package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +123 -0
  259. package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +410 -0
  260. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
  261. package/skills/weaver-e10-jinchengda/references/contract-viewlink.md +110 -0
  262. package/skills/weaver-e10-jinchengda/references/orchestration.md +38 -24
  263. package/skills/weaver-e10-meeting/SKILL.md +13 -0
  264. package/skills/weaver-e10-okr/SKILL.md +11 -0
  265. package/skills/weaver-e10-okr/references/source-manifest.json +7 -6
  266. package/skills/weaver-e10-performance/SKILL.md +131 -39
  267. package/skills/weaver-e10-performance/agents/openai.yaml +48 -17
  268. package/skills/weaver-e10-performance/references/default-assembly.md +3 -0
  269. package/skills/weaver-e10-performance/references/extraction-guide.md +17 -3
  270. package/skills/weaver-e10-performance/references/flow-assess.md +38 -5
  271. package/skills/weaver-e10-performance/references/scheme-setting-page.md +20 -3
  272. package/skills/weaver-e10-performance/scripts/assemble_scheme.py +461 -0
  273. package/skills/weaver-e10-performance/scripts/parse_appraisal_doc.py +41 -0
  274. package/skills/weaver-e10-plan/SKILL.md +10 -0
  275. package/skills/weaver-e10-plan/references/source-manifest.json +13 -13
  276. package/skills/weaver-e10-qiyecheng/SKILL.md +2 -2
  277. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +9 -9
  278. package/skills/weaver-e10-recruit-stage/SKILL.md +230 -202
  279. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +74 -46
  280. package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +3 -0
  281. package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +201 -36
  282. package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +336 -27
  283. package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +3 -0
  284. package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +15 -1
  285. package/skills/weaver-e10-recruit-stage/lib/report-attachment.mjs +38 -0
  286. package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +5 -1
  287. package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +4 -0
  288. package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +4 -0
  289. package/skills/weaver-e10-recruit-stage/references/position-templates.md +12 -8
  290. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +20 -18
  291. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +11 -7
  292. package/skills/weaver-e10-recruit-stage/references/recruit-check-install.md +5 -1
  293. package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +4 -0
  294. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +8 -4
  295. package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +6 -1
  296. package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +7 -3
  297. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +32 -25
  298. package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +4 -0
  299. package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -0
  300. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +5 -1
  301. package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +4 -0
  302. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +16 -10
  303. package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +6 -2
  304. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +148 -40
  305. package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +5 -1
  306. package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +32 -8
  307. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +4 -0
  308. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +8 -4
  309. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +6 -2
  310. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +41 -41
  311. package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +7 -3
  312. package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +7 -3
  313. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +8 -4
  314. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +5 -1
  315. package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +5 -1
  316. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +5 -1
  317. package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +41 -28
  318. package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +23 -26
  319. package/skills/weaver-e10-recruit-stage/templates/match-report.html +44 -36
  320. package/skills/weaver-e10-shared/SKILL.md +40 -5
  321. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +11 -1
  322. package/skills/weaver-e10-shared/references/json-output-contract.md +144 -8
  323. package/skills/weaver-e10-shared/references/weaver-e10-installation.md +11 -0
  324. package/skills/weaver-e10-shijingran/references/source-manifest.json +3 -3
  325. package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
  326. package/skills/weaver-e10-workflow/references/source-manifest.json +3 -3
  327. package/skills/weaver-e10-yepiaotong/SKILL.md +133 -61
  328. package/skills/weaver-e10-yepiaotong/references/invoice-add.md +3 -1
  329. package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +18 -2
  330. package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +3 -3
  331. package/skills/weaver-e10-yepiaotong/references/invoice-download.md +1 -1
  332. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +13 -1
  333. package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +3 -1
  334. package/skills/weaver-e10-yepiaotong/references/invoice-import.md +6 -4
  335. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +42 -45
  336. package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +1 -1
  337. package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +18 -2
  338. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +14 -1
  339. package/skills/weaver-e10-yepiaotong/references/invoice-red-workflow.md +96 -0
  340. package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +56 -369
  341. package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +16 -6
  342. package/skills/weaver-e10-yepiaotong/references/name-fuzzy-search.md +38 -0
  343. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +163 -646
  344. package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +90 -44
  345. package/skills/weaver-e10-yepiaotong/references/reim-eligibility-rules.md +85 -0
  346. package/skills/weaver-e10-yepiaotong/references/reim-fill-validation.md +61 -0
  347. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +91 -280
  348. package/skills/weaver-e10-yepiaotong/references/reim-preapproval-rules.md +98 -0
  349. package/skills/weaver-e10-yepiaotong/references/reim-travel-invoice-matching.md +48 -0
  350. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +234 -695
  351. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +395 -204
  352. package/skills/weaver-e10-yepiaotong/references/travel-application-fill.md +84 -0
  353. package/skills/weaver-e10-yepiaotong/references/workflow-direct-fill.md +165 -0
  354. package/skills/weaver-e10-yepiaotong.zip +0 -0
  355. package/dist/chunks/chunk-ICP53R52.js +0 -2849
  356. package/dist/chunks/registry-RIQ67ZT7.js +0 -27
  357. package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
  358. package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
  359. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +0 -93
  360. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +0 -774
  361. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +0 -111
  362. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +0 -360
  363. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +0 -167
@@ -0,0 +1,123 @@
1
+ import { InvoiceCliError } from './errors.js';
2
+ import { invoiceRecordOf } from './invoice-record.js';
3
+ import { readInvoicePreApprovals } from './preapproval-enrichment.js';
4
+ const EXPENSE_TYPE_TIMEOUT_MS = 5_000;
5
+ const EMPLOYEE_INFO_TIMEOUT_MS = 5_000;
6
+ function employeeEntities(value) {
7
+ if (value === undefined || value === null)
8
+ return [];
9
+ if (!Array.isArray(value))
10
+ throw new Error('人员实体不是数组');
11
+ return value.map(row => {
12
+ const id = typeof row?.id === 'string' ? row.id
13
+ : typeof row?.id === 'number' && Number.isSafeInteger(row.id) ? String(row.id) : null;
14
+ if (id === null || typeof row?.name !== 'string')
15
+ throw new Error('人员实体缺少有效 id / name');
16
+ return { id, name: row.name };
17
+ });
18
+ }
19
+ export async function readInvoiceEmployeeInfo(host, operation) {
20
+ try {
21
+ const session = await host.getSession();
22
+ if (!session.userId)
23
+ throw new Error('缺少当前人员 ID');
24
+ const result = await host.invoiceRequest({
25
+ path: `/api/bs/hrm/card/get/${encodeURIComponent(session.userId)}`,
26
+ method: 'GET',
27
+ query: { id: session.userId, readOnly: true },
28
+ headers: { Referer: `${session.baseUrl.replace(/\/+$/u, '')}/sp/hrm/profileInfo/${encodeURIComponent(session.userId)}` },
29
+ needsInvoiceToken: false,
30
+ timeoutMs: EMPLOYEE_INFO_TIMEOUT_MS,
31
+ operation,
32
+ });
33
+ const succeeded = result?.code !== undefined && result?.code !== null
34
+ ? Number(result.code) === 200 : result?.status === true;
35
+ if (!succeeded)
36
+ throw new Error('人员卡片请求失败');
37
+ const card = result?.data?.data;
38
+ if (!card || typeof card !== 'object' || Array.isArray(card) || Object.keys(card).length === 0) {
39
+ throw new Error('人员卡片缺少业务数据');
40
+ }
41
+ if (card.mobile !== undefined && card.mobile !== null && typeof card.mobile !== 'string') {
42
+ throw new Error('人员手机号不是字符串');
43
+ }
44
+ return {
45
+ info: {
46
+ department: employeeEntities(card.department),
47
+ mobile: card.mobile ?? null,
48
+ location: employeeEntities(card.location),
49
+ },
50
+ warnings: [],
51
+ };
52
+ }
53
+ catch (error) {
54
+ if (error && typeof error === 'object' && 'type' in error && error.type === 'authentication')
55
+ throw error;
56
+ return { info: null, warnings: ['当前人员信息暂不可用,employeeInfo 返回 null;发票结果仍正常返回。'] };
57
+ }
58
+ }
59
+ async function readExpenseTypes(host, operation) {
60
+ try {
61
+ const result = await host.invoiceRequest({
62
+ path: '/api/inc/syncFylx',
63
+ method: 'POST',
64
+ operation,
65
+ timeoutMs: EXPENSE_TYPE_TIMEOUT_MS,
66
+ body: {
67
+ start_pos: 0,
68
+ page_size: 200,
69
+ uc: 0,
70
+ mask: 1023,
71
+ req_base: { trace: String(Date.now()), dev: 1 },
72
+ },
73
+ });
74
+ if (!Array.isArray(result?.infos)) {
75
+ throw new Error('费用类型字典缺少 infos 数组');
76
+ }
77
+ const names = new Map();
78
+ for (const row of result.infos) {
79
+ const id = row?.fyid;
80
+ const name = row?.fyn;
81
+ if ((typeof id === 'string' || typeof id === 'number') && typeof name === 'string' && name.trim()) {
82
+ names.set(String(id), name);
83
+ }
84
+ }
85
+ return { names, warnings: [] };
86
+ }
87
+ catch (error) {
88
+ // 认证错误仍按原契约处理;辅助字典故障不丢弃已成功读取的发票。
89
+ if (error instanceof InvoiceCliError && error.type === 'authentication')
90
+ throw error;
91
+ return { names: null, warnings: ['费用类型字典暂不可用,fyn 返回 null;发票和相关凭证仍正常返回。'] };
92
+ }
93
+ }
94
+ /** 列表/详情主请求、费用字典和当前人员卡片并行;整批各查一次,不逐票补查。 */
95
+ export async function readInvoicesWithMetadata(host, request, options = {}) {
96
+ if (options.includePreApprovals !== undefined && typeof options.includePreApprovals !== 'boolean') {
97
+ throw new InvoiceCliError('validation', 'input_invalid', 'includePreApprovals 必须是布尔值');
98
+ }
99
+ const [response, types, employee] = await Promise.all([
100
+ host.invoiceRequest(request),
101
+ readExpenseTypes(host, request.operation),
102
+ readInvoiceEmployeeInfo(host, request.operation),
103
+ ]);
104
+ const missing = new Set();
105
+ const infos = Array.isArray(response?.infos) ? response.infos : [];
106
+ for (const wrapper of infos) {
107
+ const record = invoiceRecordOf(wrapper);
108
+ const id = record.fylx === undefined || record.fylx === null ? '' : String(record.fylx);
109
+ record.fyn = types.names?.get(id) ?? null;
110
+ record.travel_ids = Array.isArray(record.travel_ids) ? record.travel_ids : [];
111
+ if (id && types.names && record.fyn === null)
112
+ missing.add(id);
113
+ }
114
+ if (missing.size) {
115
+ types.warnings.push(`费用类型字典未匹配 ${missing.size} 个 ID:${[...missing].slice(0, 10).join('、')};对应 fyn 返回 null。`);
116
+ }
117
+ const approval = await readInvoicePreApprovals(host, {
118
+ operation: request.operation,
119
+ invoices: infos,
120
+ includePreApprovals: options.includePreApprovals,
121
+ });
122
+ return { response, employeeInfo: employee.info, preApprovals: approval.preApprovals, warnings: [...types.warnings, ...employee.warnings, ...approval.warnings] };
123
+ }
@@ -107,11 +107,11 @@ async function executeAndPrint(ctx, operation, input) {
107
107
  const envelope = failureEnvelope(error);
108
108
  if (ctx.getGlobalOptions().json) {
109
109
  const platformError = shouldReportPlatformError(error) ? toPlatformError(error) : {};
110
- console.error(JSON.stringify({ ...envelope, ...platformError }));
110
+ ctx.output.error({ ...envelope, ...platformError }, 0);
111
111
  }
112
112
  else {
113
113
  reportPlatformError(error);
114
- console.error(JSON.stringify(envelope, null, 2));
114
+ ctx.output.error(envelope);
115
115
  }
116
116
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
117
117
  }
@@ -84,6 +84,9 @@ const OPERATION_SUMMARIES = {
84
84
  'jiuchuanhui.customer.create.apply': '提交新建客户(落库前需确认);需 continuation + confirm',
85
85
  'jiuchuanhui.customer.get': '按 id 取客户详情',
86
86
  'jiuchuanhui.customer.search': '分页查询客户列表(支持条件过滤)',
87
+ 'jiuchuanhui.customer.mine.search': '查询我的客户(第一页 10 条;走客户快捷搜索接口)',
88
+ 'jiuchuanhui.customer.success.search': '查状态为「成功/成功客户」的客户(默认我的客户,可切全部或公海)',
89
+ 'jiuchuanhui.customer.open-sea.customers.search': '查询公海范围中的客户记录(第一页 10 条;走客户快捷搜索接口)',
87
90
  'jiuchuanhui.customer.type.search': '分页查询客户类型字典',
88
91
  'jiuchuanhui.customer.status.search': '分页查询客户状态字典',
89
92
  'jiuchuanhui.customer.industry.search': '分页查询客户行业字典',
@@ -90,10 +90,10 @@ async function executeAndPrint(ctx, operation, input) {
90
90
  const env = failureEnvelope(error);
91
91
  if (shouldReportPlatformError(error)) {
92
92
  const pe = toPlatformError(error);
93
- console.error(JSON.stringify({ ...env, code: pe.code, message: pe.message }, null, 2));
93
+ ctx.output.error({ ...env, code: pe.code, message: pe.message });
94
94
  }
95
95
  else {
96
- console.error(JSON.stringify(env, null, 2));
96
+ ctx.output.error(env);
97
97
  }
98
98
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
99
99
  }
@@ -90,7 +90,7 @@ async function executeAndPrint(ctx, operation, input) {
90
90
  }
91
91
  catch (error) {
92
92
  reportPlatformError(error);
93
- console.error(JSON.stringify(failureEnvelope(error), null, 2));
93
+ ctx.output.error(failureEnvelope(error));
94
94
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
95
95
  }
96
96
  }
@@ -56,6 +56,7 @@ function buildOperations() {
56
56
  name: definition.name,
57
57
  resource: definition.resource,
58
58
  summary: definition.summary,
59
+ ...(definition.notes ? { notes: definition.notes } : {}),
59
60
  capability: definition.capability,
60
61
  risk: definition.risk,
61
62
  ...(definition.requiresConfirmation ? { requiresConfirmation: true } : {}),
@@ -278,8 +278,8 @@ export const EB_ENDPOINTS = [
278
278
  queryParams: ['mt_id', 'address', 'enddatetime', 'begindatetime'],
279
279
  dateFilter: true,
280
280
  paramAliases: { roomId: 'address', room_id: 'address', day: 'date' },
281
- summary: 'EB 版会议室占用列表(query_roomusage_list + count)。按日期过滤传 date(yyyy-MM-dd)'
282
- + '或 begindatetime/enddatetime;**不传任何时间条件 = 返回全量历史**,不是接口不支持过滤',
281
+ summary: 'EB 版会议室占用列表(query_roomusage_list + count);按日期过滤传 date 或 begindatetime/enddatetime',
282
+ contractNotes: '日期格式 date=yyyy-MM-dd;**不传任何时间条件 = 返回全量历史**,不是接口不支持过滤。',
283
283
  },
284
284
  {
285
285
  domain: 'roomUsage',
@@ -738,7 +738,9 @@ export const EB_ENDPOINTS = [
738
738
  pkQueryParam: 'id',
739
739
  // 文档示例里 operateType.detail1 支持 cover(整组覆盖),默认是更新追加
740
740
  detailCover: true,
741
- summary: 'EB 版更新会议决议(update_mt_decision):改概述文本 + 决议明细(2026-10-27 新增接口)',
741
+ summary: 'EB 版更新会议决议(update_mt_decision):改概述文本 + 决议明细',
742
+ contractNotes: 'update_mt_decision 为 2026-10-27 新增接口(源资料口径);'
743
+ + '改概述文本传 id + mt_content 即可,明细默认「更新追加」,要整组替换需 detail1Mode=cover。',
742
744
  notes: [
743
745
  '`id` = **决议概述 id**(`decision.list` 的 rows[].mainTable.id),不是会议 id。',
744
746
  '只改概述文本:传 `id` + `mt_content` 即可,不必带 detail1(真机:明细原样保留)。',
@@ -607,7 +607,9 @@ const ebConflictMember = {
607
607
  resource: 'eb',
608
608
  method: 'meeting.eb.conflict.member',
609
609
  action: 'meeting.eb.conflict.member',
610
- summary: 'EB 版参会人员冲突检测(query_mtDetail_list 候选 → query_meeting_receipt_list?mt_id=多值批量 → 本地比对;2 次请求,无 N+1):按 member_conflict_chk/member_conflict 给出 verdict',
610
+ summary: 'EB 版参会人员冲突检测:候选取回执后本地比对(2 次请求,无 N+1),按应用设置给出 verdict。',
611
+ notes: '链路:query_mtDetail_list 取候选 → query_meeting_receipt_list?mt_id=多值批量 → 本地比对;'
612
+ + '判定依据取应用设置的 member_conflict_chk / member_conflict(禁止提交 / 仅提醒)。',
611
613
  capability: 'eb.conflict',
612
614
  risk: 'read',
613
615
  inputSchema: {
@@ -1273,10 +1273,11 @@ const ebMeetingCreateFlowPrepare = {
1273
1273
  resource: 'eb',
1274
1274
  method: 'meeting.eb.meeting.create.flow.prepare',
1275
1275
  action: 'meeting.eb.meeting.create.flow.prepare',
1276
- summary: '流程建会(准备):用固化流程候选逐个探测发起权限 —— 仅 1 个可发起就自动用它、多个都可发起则返回选项让用户选、'
1276
+ summary: '流程建会(准备):探测候选流程的发起权限并自动选定;不传开始时间时推荐人+会议室都空闲的时段,只出预览。',
1277
+ notes: '用固化流程候选逐个探测发起权限 —— 仅 1 个可发起就自动用它、多个都可发起则返回选项让用户选、'
1277
1278
  + '都不可发起报「没有发起权限」;不传 begin_datetime 时自动推荐「人+会议室都空闲」的时段。只出预览与确认票据,不提交。'
1278
1279
  + '⚠️ 用户提到客户名(「客户是 X」)时**必须先** meeting.eb.crm.search {"keyword":"X"} 拿 customerId,'
1279
- + '再传 crm_members:[{id,name}];只把客户名写进会议名称/内容,表单「参会客户」就是空的',
1280
+ + '再传 crm_members:[{id,name}];只把客户名写进会议名称/内容,表单「参会客户」就是空的。',
1280
1281
  capability: 'eb.meeting',
1281
1282
  risk: 'read-before-write',
1282
1283
  requiresConfirmation: true,
@@ -3343,13 +3344,13 @@ const ebMeetingCreateFlowQuick = {
3343
3344
  resource: 'eb',
3344
3345
  method: 'meeting.eb.meeting.create.flow.quick',
3345
3346
  action: 'meeting.eb.meeting.create.flow.quick',
3346
- summary: '一步流程建会(prepare+apply 合并):内部并行做会议室推荐/冲突检测/空闲时段,默认**弹浏览器表单**给用户核对提交'
3347
- + '(submit_mode=browser,小e 里预填人员/客户后由用户点提交;非小e 环境会自动写服务端);'
3348
- + '传 submit_mode=direct 才是服务端直提(拿 requestId + meetingId,会议当场生成、邀请函用真实数据)。'
3349
- + '多流程或需选择时不提交,返回选项。'
3350
- + '⚠️ 用户提到客户名时**必须先** meeting.eb.crm.search {"keyword":"X"} 拿 customerId 再传 crm_members:[{id,name}];'
3351
- + '只把客户名写进会议名称/内容而不传 crm_members 会被直接拒绝(crm_member_required)。'
3352
- + '⛔ 不要用 submit_mode=browser —— 小e 填单页不给浏览按钮赋值,参会人员/参会客户会整段丢失',
3347
+ summary: '一步流程建会(prepare+apply 合并):自动推荐会议室/检测冲突并提交;默认浏览器填单核对,submit_mode=direct 直提。',
3348
+ notes: '内部并行做会议室推荐/冲突检测/空闲时段。默认**弹浏览器表单**给用户核对提交(submit_mode=browser,'
3349
+ + '非小e 环境会自动写服务端);传 submit_mode=direct 才是服务端直提(拿 requestId + meetingId,'
3350
+ + '会议当场生成、邀请函用真实数据)。多流程或需选择时不提交,返回选项。'
3351
+ + '⚠️ 用户提到客户名时**必须先** meeting.eb.crm.search {"keyword":"X"} 拿 customerId 再传 '
3352
+ + 'crm_members:[{id,name}];只把客户名写进会议名称/内容而不传 crm_members 会被直接拒绝(crm_member_required)。'
3353
+ + '⛔ 小e 环境下不要用 submit_mode=browser:填单页不给浏览按钮赋值,参会人员/参会客户会整段丢失。',
3353
3354
  capability: 'eb.meeting',
3354
3355
  risk: 'high-risk-write',
3355
3356
  requiresConfirmation: true,
@@ -864,6 +864,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
864
864
  method: prepareName,
865
865
  action: prepareName,
866
866
  summary: `准备${endpoint.summary}(生成确认预览,不写入)`,
867
+ ...(endpoint.contractNotes ? { notes: endpoint.contractNotes } : {}),
867
868
  capability,
868
869
  risk: 'read-before-write',
869
870
  requiresConfirmation: true,
@@ -932,6 +933,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
932
933
  method: applyName,
933
934
  action: applyName,
934
935
  summary: `提交${endpoint.summary}(${writeOp},body 用 datas 数组);必须在用户明确确认后调用`,
936
+ ...(endpoint.contractNotes ? { notes: endpoint.contractNotes } : {}),
935
937
  capability,
936
938
  risk: 'high-risk-write',
937
939
  requiresConfirmation: true,
@@ -82,8 +82,9 @@ const meetingMemberExpand = {
82
82
  resource: 'member',
83
83
  method: 'expand',
84
84
  action: 'meeting.member.expand',
85
- summary: '把「我们部门所有人 / 某分部 / 模糊部门名」一次展开成员工 id 列表(查组织 + 取成员,带 30 天缓存,refresh 可强制刷新)。'
86
- + '支持 keywords 多个部门并集;模糊命中多个时返回 candidates(ambiguous=true)让用户点选,不猜。'
85
+ summary: '把「我们部门所有人 / 某分部 / 模糊部门名」展开成员工 id 列表;模糊命中多个时返回候选让用户选,不猜。',
86
+ notes: '查组织 + 取成员,带 30 天缓存,refresh 可强制刷新。支持 keywords 多个部门并集;'
87
+ + '模糊命中多个时返回 candidates(ambiguous=true)让用户点选。'
87
88
  + '⛔ 不要用 hrm.employee.query 不带条件查全公司(实测 51 秒)。',
88
89
  capability: 'eb.meeting',
89
90
  risk: 'read',
@@ -26,9 +26,9 @@ const meetingInvitationPublish = {
26
26
  resource: 'invitation',
27
27
  method: 'publish',
28
28
  action: 'meeting.invitation.publish',
29
- summary: '生成邀请函并**发布成 E10 文档**:模板填充 → 上传到文档中心(默认目录 300)→ 返回 docId。'
30
- + '拿到后把 `extraFields: {"邀请函":[{"id":docId,"name":文档名}]}` 传给建会接口即可写进表单。'
31
- + '会真实创建文档(需 confirm: true)。',
29
+ summary: '生成邀请函并发布成 E10 文档:模板填充 → 上传文档中心(默认目录 300)→ 返回 docId(真实创建,需确认)。',
30
+ notes: '拿到 docId 后把 `extraFields: {"邀请函":[{"id":docId,"name":文档名}]}` 传给建会接口即可写进表单。'
31
+ + '会真实创建文档,必须带 confirm: true。',
32
32
  capability: 'invitation',
33
33
  risk: 'high-risk-write',
34
34
  requiresConfirmation: true,
@@ -458,10 +458,10 @@ const meetingInvitationRender = {
458
458
  resource: 'invitation',
459
459
  method: 'render',
460
460
  action: 'meeting.invitation.render',
461
- summary: '按会议真实数据生成邀请函(只读,不发送):**同时返回 docx 与对话内可展示的 Markdown 全文**(`text` 字段),'
462
- + '会话里应直接把 `text` 贴出来,不要只给文件名让人自己下载;'
463
- + '数据取 meeting.eb.meeting.list 单查;议程有议题就按议题自动填、没有则保留模板示例行;'
464
- + '取不到的字段渲染成【待补充】(docx 里是黄色高亮);租户自定义字段用 extra 传入',
461
+ summary: '按会议真实数据生成邀请函(只读,不发送):同时返回 docx 与可展示的 Markdown 全文(text 字段)。',
462
+ notes: '会话里应直接把 `text` 贴出来,不要只给文件名让人自己下载;数据取 meeting.eb.meeting.list 单查;'
463
+ + '议程有议题就按议题自动填、没有则保留模板示例行;取不到的字段渲染成【待补充】(docx 里是黄色高亮);'
464
+ + '租户自定义字段用 extra 传入。',
465
465
  capability: 'invitation',
466
466
  risk: 'read',
467
467
  inputSchema: {
@@ -15,7 +15,9 @@ const meetingLink = {
15
15
  resource: 'link',
16
16
  method: 'resolve',
17
17
  action: 'meeting.link',
18
- summary: '生成对象详情页链接:EB 版 /sp/ebdfpage/card/0/{objid}/{dataid}(按 tag 解析 objid 并缓存);标准版会议 /sp/meeting/meetingSingle?meetingId=(会议室/会议类型无单页,不附链接)',
18
+ summary: '生成对象详情页链接:EB 版按 tag 解析 objid 生成 card 链接;标准版会议用 meetingId(会议室/类型无单页)。',
19
+ notes: 'EB 版:/sp/ebdfpage/card/0/{objid}/{dataid}(objid 按 tag 解析并缓存);'
20
+ + '标准版会议:/sp/meeting/meetingSingle?meetingId=;会议室/会议类型没有单页,不附链接。',
19
21
  capability: 'link',
20
22
  risk: 'read',
21
23
  inputSchema: {
@@ -86,7 +86,7 @@ async function executeAndPrint(ctx, operation, input) {
86
86
  }
87
87
  catch (error) {
88
88
  reportPlatformError(error);
89
- console.error(JSON.stringify(failureEnvelope(error), null, 2));
89
+ ctx.output.error(failureEnvelope(error));
90
90
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
91
91
  }
92
92
  }
@@ -82,7 +82,7 @@ async function executeAndPrint(ctx, operation, input) {
82
82
  ctx.output.write(successEnvelope(operation, result), { json: true });
83
83
  }
84
84
  catch (error) {
85
- console.error(JSON.stringify(failureEnvelope(error), null, 2));
85
+ ctx.output.error(failureEnvelope(error));
86
86
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
87
87
  }
88
88
  }
@@ -86,7 +86,7 @@ async function executeAndPrint(ctx, operation, input) {
86
86
  }
87
87
  catch (error) {
88
88
  reportPlatformError(error);
89
- console.error(JSON.stringify(failureEnvelope(error), null, 2));
89
+ ctx.output.error(failureEnvelope(error));
90
90
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
91
91
  }
92
92
  }
@@ -82,7 +82,7 @@ async function executeAndPrint(ctx, operation, input) {
82
82
  }
83
83
  catch (error) {
84
84
  reportPlatformError(error);
85
- console.error(JSON.stringify(failureEnvelope(error), null, 2));
85
+ ctx.output.error(failureEnvelope(error));
86
86
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
87
87
  }
88
88
  }
@@ -137,8 +137,8 @@ export const receptionOperations = [
137
137
  {
138
138
  name: 'reception.docRender',
139
139
  risk: 'read',
140
- summary: '一次完成 doc + render:出 docx/md、上传附件、拼 customParams、落 browsertool。'
141
- + '两者之间没有人工确认点,合并只为省一次工具往返;失败语义与分开调用一致。'
140
+ summary: '一次完成 doc + render:出 docx/md、上传附件、拼 customParams、落 browsertool,省一次工具往返。',
141
+ notes: '两者之间没有人工确认点,合并只为省一次工具往返;失败语义与分开调用一致。'
142
142
  + '--mode plan 只出内部参考文档 md,跳过 render(不出 browsertool、不做填单硬校验)。',
143
143
  inputSchema: {
144
144
  type: 'object',
@@ -279,18 +279,26 @@ async function resolveDigitalHumanMenu(host, baseUrl, cache) {
279
279
  }
280
280
  const loaders = new Map();
281
281
  export function createRecruitStageContext() {
282
- return async (host) => {
282
+ // 每个工厂独立记录「本次调用链」的缓存元信息:
283
+ // loaders 是进程级共享的(同进程多操作复用一次解析),但 lastCacheMeta 若直接读共享 loader,
284
+ // 会把「别的工厂/上一次调用」的元信息误报给当前回执。这里按工厂隔离,未调用过即 null。
285
+ let own = null;
286
+ const fn = (async (host) => {
283
287
  const loaderKey = 'shared';
284
288
  if (!loaders.has(loaderKey))
285
289
  loaders.set(loaderKey, createRecruitContextLoader());
290
+ own = null;
286
291
  const cache = await loaders.get(loaderKey).load(host);
292
+ own = loaders.get(loaderKey).lastMeta();
287
293
  const baseUrl = (await host.getSession()).baseUrl.replace(/\/+$/, '');
288
294
  const [defaultRecruitFlow, digitalHumanMenu] = await Promise.all([
289
295
  resolveDefaultRecruitFlow(host, baseUrl, cache.appId, cache),
290
296
  resolveDigitalHumanMenu(host, baseUrl, cache),
291
297
  ]);
292
298
  return { ...cache, defaultRecruitFlow, digitalHumanMenu };
293
- };
299
+ });
300
+ fn.lastCacheMeta = () => own;
301
+ return fn;
294
302
  }
295
303
  /** 供 operation 内直接取上下文的辅助(失败统一转 rs 错误)。 */
296
304
  export async function loadContext(host) {
@@ -77,6 +77,16 @@ function failureEnvelope(error) {
77
77
  error: toErrorEnvelope(error),
78
78
  };
79
79
  }
80
+ /**
81
+ * 把上下文缓存元信息挂进回执的 meta.cache(v6)。
82
+ * 抽取成独立函数是为了可单测:注入逻辑本身不该只能靠「跑真环境」验证。
83
+ * meta 为 null(本次未加载上下文,如 schema 类操作)时不产生任何字段。
84
+ */
85
+ export function attachCacheMeta(result, meta) {
86
+ if (!meta)
87
+ return result;
88
+ return { ...result, meta: { ...(result.meta || {}), cache: meta } };
89
+ }
80
90
  async function executeAndPrint(ctx, operation, input) {
81
91
  try {
82
92
  const host = createRecruitStageHost(ctx);
@@ -87,7 +97,10 @@ async function executeAndPrint(ctx, operation, input) {
87
97
  continuation: createRecruitStageContinuationSigner(ctx),
88
98
  recruitContext: () => contextLoader(host),
89
99
  });
90
- ctx.output.write(successEnvelope(operation, result), { json: true });
100
+ // 🔴 v6:把上下文缓存的真实状态随回执暴露(meta.cache)。此前技能层完全看不见
101
+ // 「命中/重建、warn、菜单形状、哪些列表没定位到」,只能等业务报错倒推。
102
+ const cacheMeta = contextLoader.lastCacheMeta();
103
+ ctx.output.write(successEnvelope(operation, attachCacheMeta(result, cacheMeta)), { json: true });
91
104
  }
92
105
  catch (error) {
93
106
  // stderr 只写一个 JSON 对象:顶层带平台码(E-XXXX),整段 stderr 可被一次 JSON.parse。
@@ -95,10 +108,10 @@ async function executeAndPrint(ctx, operation, input) {
95
108
  const env = failureEnvelope(error);
96
109
  if (shouldReportPlatformError(error)) {
97
110
  const pe = toPlatformError(error);
98
- console.error(JSON.stringify({ ...env, code: pe.code, message: pe.message }, null, 2));
111
+ ctx.output.error({ ...env, code: pe.code, message: pe.message });
99
112
  }
100
113
  else {
101
- console.error(JSON.stringify(env, null, 2));
114
+ ctx.output.error(env);
102
115
  }
103
116
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
104
117
  }
@@ -1031,7 +1031,7 @@ export const interviewArrangeOperations = [
1031
1031
  capability: 'recruit.interview.arrange',
1032
1032
  risk: 'write',
1033
1033
  requiresConfirmation: true,
1034
- inputSchema: schemaOf({ ...baseInput, confirm: { type: 'boolean' }, continuation: { type: 'string' } }, {}),
1034
+ inputSchema: schemaOf({ ...baseInput, confirm: { type: 'boolean' }, continuation: { type: 'string' } }, { required: ['confirm', 'continuation'] }),
1035
1035
  handler: apply,
1036
1036
  },
1037
1037
  {
@@ -289,7 +289,7 @@ export const interviewFeedbackOperations = [
289
289
  feedbackId: { type: 'string' }, planIndex: { type: 'integer', minimum: 0 },
290
290
  result: { type: 'string' }, comment: { type: 'string' },
291
291
  confirm: { type: 'boolean' }, continuation: { type: 'string' },
292
- }, {}),
292
+ }, { required: ['confirm', 'continuation'] }),
293
293
  handler: apply,
294
294
  },
295
295
  ];
@@ -30,6 +30,7 @@ import { rsSuccess, schemaOf } from './types.js';
30
30
  import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
31
31
  import { objIdOf, formIdOf, saveFormData, getDsOptions, getFormDataRecord, resolvePersonId, findMenuNode, resolveCurrentUser, resolveCurrentUserOrg, buildCardUrl, buildListUrl, randHex32, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
32
32
  import { toMenuList } from '../../ehr/operations/shared.js';
33
+ import { isSelfTenant } from '../../ehr/operations/recruit.js';
33
34
  const SCHEMA_ID_STR = { type: 'string', description: '18 位记录 id(字符串)' };
34
35
  // 职位管理表单字段 dataKey(缓存 fields 里取;不写死 fieldId)
35
36
  const DATAKEYS_TEXT = ['position_name'];
@@ -96,11 +97,11 @@ const DEF_CACHE_OPTION = {
96
97
  const DEFAULT_JOB_CATEGORY = '技术';
97
98
  // 招聘截止日期默认:今天 + 60 天(覆盖一个完整招聘周期)
98
99
  const DEFAULT_DAYS_TO_DEADLINE = 60;
99
- // 🔴 薪酬区间必填兜底(2026-11-28 用户口径):最低 18 / 最高 30,**单位是「千」**,
100
+ // 🔴 薪酬区间必填兜底(2026-11-29 用户口径修订):最低 15 / 最高 30,**单位是「千」**,
100
101
  // 与表单页面一致(页面 18.00 = 18K)。这两个字段是职位表单必填项,留空会导致保存校验失败。
101
- // ⚠️ 不要传「元」:resolveSetValue 只对**用户显式 sets 输入**做 ÷1000 换算,
102
- // 这里的默认值是直接写入的面板值,传 18000 会被当成 18000K。
103
- const DEF_SALARY = { salary_min: '18', salary_max: '30' };
102
+ // ⚠️ 统一按「千」传:sets 传 15/30 即 15K/30K;仅 ≥1000 的明显「元」值才会被折算,
103
+ // 默认值直接按千写入,不会二次换算。
104
+ const DEF_SALARY = { salary_min: '15', salary_max: '30' };
104
105
  /** 按岗位名推断职位序列族别:销售 → 销售;职能类 → 职能;其余(研发/实施/产品/项目)→ 技术 */
105
106
  function inferJobCategory(positionName) {
106
107
  const n = String(positionName || '');
@@ -450,7 +451,10 @@ async function resolveWorkLocation(ctx, value) {
450
451
  return hit ? { id: hit.id, name: hit.detail || hit.name || String(value) } : null;
451
452
  }
452
453
  /** 默认办公地点:按声明的详细地址在启用列表中精确解析 id,解析不到返回 null(不写、不继承)。 */
454
+ /** 默认办公地点:固定地址仅适用于自用租户;非自用租户直接返回 null(不查列表、不写字段)。 */
453
455
  async function resolveDefaultWorkLocation(ctx) {
456
+ if (!isSelfTenant(ctx.cache?.tenantKey))
457
+ return null;
454
458
  return resolveWorkLocation(ctx, DEFAULT_WORK_LOCATION);
455
459
  }
456
460
  // 解析 sets key=value → 提交 detail(按字段取值类别;解析不到返回 null)
@@ -461,13 +465,15 @@ async function resolveSetValue(ctx, key, value, refByFid) {
461
465
  if (!id)
462
466
  return null;
463
467
  if (NUM_KEYS.has(key)) {
464
- // 薪资字段单位是「千元」(页面 15.00 = 15K,与字段 ID 交叉验证);用户/Agent 传的是「元」。
465
- // 只对**显式输入**换算;从已有职位继承的值本来就是千元,绝不能再除一次。
468
+ // 薪资字段单位是「千」(页面 15.00 = 15K;2026-11-29 用户口径确认)。
469
+ // sets 传 15 / 30 就是 15K / 30K,**直接写入、不再 ÷1000**。
470
+ // 历史 bug:旧实现无条件 ÷1000,传 18 落库成 0.018、页面显示 0.02(已修)。
471
+ // 防呆:只有明显按「元」传入(≥1000,即 ≥100 万/月这种不可能量级)时才折算回千。
466
472
  if (key === 'salary_min' || key === 'salary_max') {
467
473
  const n = Number(String(value).replace(/,/g, ''));
468
474
  if (Number.isFinite(n) && n > 0) {
469
- const k = n / 1000;
470
- return { formField: { id }, content: String(Number.isInteger(k) ? k : Number(k.toFixed(3))) };
475
+ const k = n >= 1000 ? n / 1000 : n;
476
+ return { formField: { id }, content: String(Number.isInteger(k) ? k : Number(k.toFixed(2))) };
471
477
  }
472
478
  }
473
479
  return { formField: { id }, content: String(value) };
@@ -912,6 +918,9 @@ async function buildJd(opts) {
912
918
  filled.push('work_location');
913
919
  workLocationDefault = loc.name;
914
920
  }
921
+ else if (!isSelfTenant(ctx.cache?.tenantKey)) {
922
+ workLocationWarning = '当前环境未配置默认办公地点,本次不写 work_location;请用 sets 指定';
923
+ }
915
924
  else {
916
925
  workLocationWarning = `未在「办公地点」列表找到启用状态的默认地点「${DEFAULT_WORK_LOCATION}」,本次不写 work_location;请用 sets 指定`;
917
926
  }
@@ -434,7 +434,7 @@ async function runList(env, args, feedbackTodoMode) {
434
434
  await Promise.all([...needFieldIds].map((fieldId) => dsOptionsFor(fieldId)));
435
435
  }
436
436
  const out = {
437
- env: new URL(baseUrl).hostname, type, listId, menuName, total, totalExact,
437
+ env: new URL(baseUrl).hostname, baseUrl, selfUse: String(cache.selfUse || ''), type, listId, menuName, total, totalExact,
438
438
  ...(totalNote ? { totalNote } : {}),
439
439
  ...(appliedFilters.length ? { filters: appliedFilters } : {}),
440
440
  ...(args.recent ? { recentDays: Number(args.recent) } : {}),