weaver-work-cli 0.1.70 → 0.1.73

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 (263) hide show
  1. package/dist/chunks/{archive-VUTREF3P.js → archive-THZV4ND4.js} +22 -5
  2. package/dist/chunks/{archive-oa-VXXO4RTB.js → archive-oa-PQ23OLEV.js} +17 -5
  3. package/dist/chunks/{asset-45U6TY7I.js → asset-RGPROZYH.js} +22 -5
  4. package/dist/chunks/{asset-idle-YCRBMTIT.js → asset-idle-Z2PDX7NA.js} +15 -5
  5. package/dist/chunks/{attachment-content-DMU7KNZ7.js → attachment-content-R3RPVOYE.js} +3 -3
  6. package/dist/chunks/{blog-5AML4WMG.js → blog-7U3QZPIF.js} +25 -5
  7. package/dist/chunks/{caizhilian-3P7BUNHT.js → caizhilian-3AB42GCV.js} +22 -8
  8. package/dist/chunks/{calendar-2HUXM3CZ.js → calendar-KINM64E4.js} +15 -5
  9. package/dist/chunks/{chunk-EHH363SP.js → chunk-2CHGUYMG.js} +4 -4
  10. package/dist/chunks/{chunk-GWM5TLIK.js → chunk-2XED2FKY.js} +34 -34
  11. package/dist/chunks/{chunk-DVFA3ODS.js → chunk-35A56FJ7.js} +12 -0
  12. package/dist/chunks/{chunk-QYDSTYGG.js → chunk-4BXR6CNB.js} +3 -3
  13. package/dist/chunks/{chunk-KDOJW5LH.js → chunk-4I26YMBY.js} +1 -1
  14. package/dist/chunks/{chunk-X6PMJQGO.js → chunk-4YXAK6OA.js} +19 -8
  15. package/dist/chunks/{chunk-HG6INLH6.js → chunk-54ST55IJ.js} +28 -7
  16. package/dist/chunks/{chunk-DSBV4GRK.js → chunk-6HT73VOI.js} +3 -3
  17. package/dist/chunks/{chunk-4W6BSNIL.js → chunk-7QFVXP2X.js} +6 -6
  18. package/dist/chunks/{chunk-I5XB4MZT.js → chunk-AMAPQVBT.js} +95 -65
  19. package/dist/chunks/{chunk-L2A3COWV.js → chunk-BWYVS62Z.js} +4 -4
  20. package/dist/chunks/{chunk-UPVAQJKS.js → chunk-DRUND2PJ.js} +130 -79
  21. package/dist/chunks/{chunk-LJE7RZNC.js → chunk-F4HM25K4.js} +1 -1
  22. package/dist/chunks/{chunk-T24EBWAZ.js → chunk-GAMGDNTF.js} +48 -21
  23. package/dist/chunks/{chunk-H2NRTGZR.js → chunk-GWJLAF6B.js} +3 -3
  24. package/dist/chunks/{chunk-XIBMZEDB.js → chunk-IBSJJGXL.js} +2 -2
  25. package/dist/chunks/{chunk-VZUH3LKI.js → chunk-ICP53R52.js} +167 -157
  26. package/dist/chunks/{chunk-LRKKKO5A.js → chunk-IU6UB2TD.js} +3 -4
  27. package/dist/chunks/{chunk-GTAFCAVP.js → chunk-IZCQU5D5.js} +1 -1
  28. package/dist/chunks/{chunk-727VKJQK.js → chunk-JMJBPP4B.js} +2 -2
  29. package/dist/chunks/{chunk-UVWW5ABZ.js → chunk-L7TYG5SN.js} +3 -3
  30. package/dist/chunks/{chunk-HAORST2G.js → chunk-LLCMOZ5L.js} +11 -11
  31. package/dist/chunks/{chunk-U3OO3IZF.js → chunk-NUP4RYZK.js} +20 -7
  32. package/dist/chunks/{chunk-IVCOZCAW.js → chunk-PAFOLIYQ.js} +1 -1
  33. package/dist/chunks/{chunk-LSVA7QA6.js → chunk-R3MK2RBN.js} +3 -1
  34. package/dist/chunks/{chunk-GFOFUH6O.js → chunk-TV46Q4NY.js} +52 -51
  35. package/dist/chunks/chunk-WM33BSIL.js +136 -0
  36. package/dist/chunks/{chunk-7CINV2BU.js → chunk-XZBYRYWX.js} +2 -2
  37. package/dist/chunks/{chunk-E7VWE2XI.js → chunk-ZWLWXHJC.js} +3 -3
  38. package/dist/chunks/{conflict-YW5BULJ3.js → conflict-VPAR7E6F.js} +2 -2
  39. package/dist/chunks/{contract-3PMHUASH.js → contract-DDXAO2DZ.js} +48 -5
  40. package/dist/chunks/{cowork-FZBTTBYX.js → cowork-34QCHMDD.js} +37 -8
  41. package/dist/chunks/{create-flow-5OBS3B3V.js → create-flow-52PU2OBI.js} +6 -6
  42. package/dist/chunks/{data-2YZ6A6TL.js → data-CLQ62QGD.js} +99 -184
  43. package/dist/chunks/{ebuilder-form-AWPTMZBZ.js → ebuilder-form-W5R7Q22S.js} +17 -7
  44. package/dist/chunks/{ehr-MNPR4TE5.js → ehr-LCNAVMK5.js} +67 -17
  45. package/dist/chunks/{entry-mode-L65OWPFM.js → entry-mode-6Z3ZV3DE.js} +3 -3
  46. package/dist/chunks/{env-XW7LYIME.js → env-RDKWAARB.js} +2 -2
  47. package/dist/chunks/{esb-GSB5QCEX.js → esb-ANKPUU65.js} +17 -7
  48. package/dist/chunks/{factory-MHFZZAGH.js → factory-434B7RAT.js} +1 -1
  49. package/dist/chunks/{fna-XBSNUS2V.js → fna-AKBSG5HI.js} +15 -5
  50. package/dist/chunks/{group-chat-EEOLO5NM.js → group-chat-PROTW22R.js} +3 -3
  51. package/dist/chunks/{host-NVDG3NC6.js → host-5R2SNFWD.js} +4 -4
  52. package/dist/chunks/{host-2UMNXX5H.js → host-7FJW4E7R.js} +4 -4
  53. package/dist/chunks/{host-XVWBOSEN.js → host-CGXUFQO4.js} +4 -4
  54. package/dist/chunks/{host-R7BP3CTI.js → host-PDJAKCT7.js} +6 -4
  55. package/dist/chunks/{host-SYPCA63D.js → host-WO4L5G5I.js} +4 -4
  56. package/dist/chunks/{host-BD44ASOD.js → host-XIYG4F4B.js} +4 -4
  57. package/dist/chunks/{hrm-FZUDJAND.js → hrm-WGODDTEH.js} +15 -6
  58. package/dist/chunks/{im-F5NENPD7.js → im-YKTKAJU3.js} +16 -6
  59. package/dist/chunks/{invoice-DS6FLU55.js → invoice-PVYCCCVM.js} +27 -6
  60. package/dist/chunks/{jiuchuanhui-JCBUR563.js → jiuchuanhui-RKOQW7BY.js} +19 -6
  61. package/dist/chunks/{lazy-dispatch-F6O2EPGR.js → lazy-dispatch-DW45AFQ5.js} +6 -6
  62. package/dist/chunks/{mail-ZEOSANEJ.js → mail-BNB5S4NW.js} +116 -97
  63. package/dist/chunks/{meeting-PCD5EPBF.js → meeting-O2KDJH66.js} +29 -16
  64. package/dist/chunks/{minute-doc-WTZJVCHG.js → minute-doc-JUCG56GY.js} +4 -4
  65. package/dist/chunks/{okr-OZUMTMCL.js → okr-LWFGWOE7.js} +15 -5
  66. package/dist/chunks/{operations-LQY3FTPH.js → operations-2WHIF5WV.js} +1 -1
  67. package/dist/chunks/{operations-UTUWFJTX.js → operations-532PN5OB.js} +5 -5
  68. package/dist/chunks/{performance-SMVTPK6T.js → performance-7W5COCFU.js} +92 -7
  69. package/dist/chunks/{plan-C2NENH42.js → plan-ZVY3IYTL.js} +15 -5
  70. package/dist/chunks/{project-FAJ2P3UR.js → project-SA62B7MH.js} +18 -5
  71. package/dist/chunks/{reception-NH6MJFPR.js → reception-NGIONPQ3.js} +128 -49
  72. package/dist/chunks/{recruit-stage-DPEFHLSE.js → recruit-stage-WOSN6MGP.js} +1264 -197
  73. package/dist/chunks/{registry-FTPUUHWC.js → registry-N7P3W2RD.js} +5 -5
  74. package/dist/chunks/{registry-3B3OAJYX.js → registry-R72GWXOG.js} +4 -4
  75. package/dist/chunks/{registry-ZQ7OONCB.js → registry-RIQ67ZT7.js} +12 -12
  76. package/dist/chunks/{room-recommend-73NBN3RU.js → room-recommend-KCGIVUFR.js} +4 -4
  77. package/dist/chunks/{schedule-SDBOBBUQ.js → schedule-6UP27HQ4.js} +4 -4
  78. package/dist/chunks/{smart-extract-GTYKF5TJ.js → smart-extract-DDOQSPRB.js} +19 -6
  79. package/dist/chunks/{workflow-OWHWLAOX.js → workflow-V5ALD6QZ.js} +22 -8
  80. package/dist/cmd/auth/index.js +23 -0
  81. package/dist/cmd/e10/index.js +2 -1
  82. package/dist/cmd/index.js +2 -0
  83. package/dist/core/manifest-view.js +207 -0
  84. package/dist/core/output.js +42 -8
  85. package/dist/index.js +35 -35
  86. package/dist/internal/e10/auth/crypto.js +18 -8
  87. package/dist/internal/e10/auth/error-log.js +1 -2
  88. package/dist/internal/e10/auth/messages.js +2 -3
  89. package/dist/internal/e10/auth/xiaoe.js +1 -1
  90. package/dist/internal/e10/tls-policy.js +61 -13
  91. package/dist/shortcuts/archive/index.js +11 -2
  92. package/dist/shortcuts/archive/operations/download.js +1 -0
  93. package/dist/shortcuts/archive/operations/flow-url.js +3 -0
  94. package/dist/shortcuts/archive/operations/prelib.js +2 -0
  95. package/dist/shortcuts/archive/operations/upload.js +1 -0
  96. package/dist/shortcuts/archive-oa/index.js +11 -2
  97. package/dist/shortcuts/archive-oa/operations/borrow-car.js +2 -0
  98. package/dist/shortcuts/asset/index.js +11 -2
  99. package/dist/shortcuts/asset/manifest.js +7 -0
  100. package/dist/shortcuts/asset-idle/index.js +11 -2
  101. package/dist/shortcuts/blog/index.js +11 -2
  102. package/dist/shortcuts/blog/manifest.js +10 -0
  103. package/dist/shortcuts/caizhilian/host.js +20 -4
  104. package/dist/shortcuts/caizhilian/index.js +12 -2
  105. package/dist/shortcuts/caizhilian/manifest.js +4 -25
  106. package/dist/shortcuts/caizhilian/operations/handlers/search.js +34 -0
  107. package/dist/shortcuts/caizhilian/operations/registry.js +25 -1
  108. package/dist/shortcuts/calendar/index.js +11 -2
  109. package/dist/shortcuts/contract/index.js +11 -2
  110. package/dist/shortcuts/contract/manifest.js +32 -0
  111. package/dist/shortcuts/contract/operations/write.js +3 -0
  112. package/dist/shortcuts/cowork/index.js +21 -5
  113. package/dist/shortcuts/cowork/manifest.js +3 -0
  114. package/dist/shortcuts/cowork/operations/discuss-write.js +2 -0
  115. package/dist/shortcuts/cowork/operations/item-write.js +3 -0
  116. package/dist/shortcuts/cowork/operations/member-write.js +2 -0
  117. package/dist/shortcuts/cowork/operations/permission-write.js +2 -0
  118. package/dist/shortcuts/cowork/operations/review-write.js +1 -0
  119. package/dist/shortcuts/data/errors.js +16 -29
  120. package/dist/shortcuts/data/host.js +16 -7
  121. package/dist/shortcuts/data/index.js +12 -41
  122. package/dist/shortcuts/data/manifest.js +5 -44
  123. package/dist/shortcuts/data/operations/attend.js +2 -2
  124. package/dist/shortcuts/data/operations/conf.js +0 -88
  125. package/dist/shortcuts/data/operations/ds.js +4 -4
  126. package/dist/shortcuts/data/operations/index.js +1 -5
  127. package/dist/shortcuts/data/operations/module.js +40 -14
  128. package/dist/shortcuts/data/operations/query.js +2 -2
  129. package/dist/shortcuts/ebuilder-form/index.js +11 -2
  130. package/dist/shortcuts/ebuilder-form/manifest.js +12 -0
  131. package/dist/shortcuts/ehr/index.js +11 -2
  132. package/dist/shortcuts/ehr/operations/attend-write.js +51 -8
  133. package/dist/shortcuts/ehr/operations/recruit-position.js +4 -3
  134. package/dist/shortcuts/ehr/operations/recruit-short-cache.js +6 -2
  135. package/dist/shortcuts/ehr/operations/recruit-write.js +3 -3
  136. package/dist/shortcuts/ehr/operations/recruit.js +206 -82
  137. package/dist/shortcuts/ehr/operations/shared.js +31 -0
  138. package/dist/shortcuts/esb/index.js +11 -2
  139. package/dist/shortcuts/esb/manifest.js +2 -0
  140. package/dist/shortcuts/fna/index.js +11 -2
  141. package/dist/shortcuts/hrm/index.js +11 -1
  142. package/dist/shortcuts/im/index.js +11 -2
  143. package/dist/shortcuts/invoice/index.js +11 -2
  144. package/dist/shortcuts/invoice/manifest.js +8 -0
  145. package/dist/shortcuts/jiuchuanhui/index.js +15 -1
  146. package/dist/shortcuts/jiuchuanhui/manifest.js +2 -0
  147. package/dist/shortcuts/mail/errors.js +14 -0
  148. package/dist/shortcuts/mail/index.js +23 -6
  149. package/dist/shortcuts/mail/manifest.js +11 -4
  150. package/dist/shortcuts/mail/operations/mail-blacklist.js +6 -6
  151. package/dist/shortcuts/mail/operations/mail-contacts.js +10 -10
  152. package/dist/shortcuts/mail/operations/mail-manage.js +15 -14
  153. package/dist/shortcuts/mail/operations/mail-read.js +7 -25
  154. package/dist/shortcuts/mail/operations/mail-send.js +12 -12
  155. package/dist/shortcuts/mail/operations/mail-sign.js +10 -10
  156. package/dist/shortcuts/mail/operations/mail-template.js +10 -10
  157. package/dist/shortcuts/meeting/index.js +11 -2
  158. package/dist/shortcuts/meeting/operations/invitation-publish.js +1 -0
  159. package/dist/shortcuts/okr/index.js +11 -2
  160. package/dist/shortcuts/performance/index.js +62 -3
  161. package/dist/shortcuts/performance/scheme-validate.js +7 -0
  162. package/dist/shortcuts/performance/shared.js +40 -2
  163. package/dist/shortcuts/plan/index.js +11 -2
  164. package/dist/shortcuts/project/index.js +11 -2
  165. package/dist/shortcuts/project/operations/write.js +3 -0
  166. package/dist/shortcuts/reception/constants.js +22 -0
  167. package/dist/shortcuts/reception/index.js +15 -2
  168. package/dist/shortcuts/reception/manifest.js +17 -3
  169. package/dist/shortcuts/reception/operations/ask.js +3 -0
  170. package/dist/shortcuts/reception/operations/doc.js +24 -11
  171. package/dist/shortcuts/reception/operations/docrender.js +18 -1
  172. package/dist/shortcuts/reception/operations/render-assets.js +93 -22
  173. package/dist/shortcuts/recruit-stage/context.js +12 -6
  174. package/dist/shortcuts/recruit-stage/index.js +22 -3
  175. package/dist/shortcuts/recruit-stage/manifest.js +2 -0
  176. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +19 -10
  177. package/dist/shortcuts/recruit-stage/operations/jd-create.js +487 -38
  178. package/dist/shortcuts/recruit-stage/operations/list.js +72 -1
  179. package/dist/shortcuts/recruit-stage/operations/profile.js +194 -0
  180. package/dist/shortcuts/recruit-stage/operations/registry.js +20 -2
  181. package/dist/shortcuts/recruit-stage/operations/resume-import.js +258 -63
  182. package/dist/shortcuts/recruit-stage/operations/search.js +226 -27
  183. package/dist/shortcuts/recruit-stage/operations/shortlist.js +122 -0
  184. package/dist/shortcuts/recruit-stage/operations/tag.js +17 -3
  185. package/dist/shortcuts/recruit-stage/shared.js +158 -4
  186. package/dist/shortcuts/smart-extract/index.js +11 -2
  187. package/dist/shortcuts/smart-extract/manifest.js +1 -0
  188. package/dist/shortcuts/smart-extract/operations/save.js +2 -0
  189. package/dist/shortcuts/workflow/index.js +21 -1
  190. package/dist/shortcuts/workflow/operations/form.js +36 -2
  191. package/dist/shortcuts/workflow/operations/read.js +2 -2
  192. package/dist/shortcuts/workflow/operations/write.js +1 -1
  193. package/docs/caizhilian.md +1 -1
  194. package/docs/contract.md +1 -0
  195. package/docs/data.md +22 -22
  196. package/docs/e10-auth.md +41 -33
  197. package/docs/ehr.md +2 -0
  198. package/docs/reception.md +4 -3
  199. package/package.json +1 -1
  200. package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
  201. package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
  202. package/scripts/pysite/sitecustomize.py +41 -0
  203. package/skill-template/domains/data.md +4 -4
  204. package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
  205. package/skills/weaver-e10-caizhilian/references/org-browser.md +1 -0
  206. package/skills/weaver-e10-cowork/SKILL.md +3 -1
  207. package/skills/weaver-e10-data/SKILL.md +12 -16
  208. package/skills/weaver-e10-data/references/config-center.md +6 -7
  209. package/skills/weaver-e10-data/references/datasource.md +1 -1
  210. package/skills/weaver-e10-data/references/scene-and-misc.md +2 -2
  211. package/skills/weaver-e10-jiuchuanhui/SKILL.md +6 -4
  212. package/skills/weaver-e10-jiuchuanhui/references/clue.md +2 -2
  213. package/skills/weaver-e10-jiuchuanhui/references/customer.md +18 -8
  214. package/skills/weaver-e10-jiuchuanhui/references/sale.md +2 -2
  215. package/skills/weaver-e10-jucailin/SKILL.md +7 -3
  216. package/skills/weaver-e10-jucailin/references/attend-write.md +1 -1
  217. package/skills/weaver-e10-jucailin/references/recruit-output-links.md +33 -0
  218. package/skills/weaver-e10-jucailin/references/recruit-write.md +2 -0
  219. package/skills/weaver-e10-mail/SKILL.md +4 -1
  220. package/skills/weaver-e10-mail/references/mail-read.md +4 -2
  221. package/skills/weaver-e10-mail/references/safety-boundaries.md +1 -0
  222. package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
  223. package/skills/weaver-e10-performance/SKILL.md +8 -6
  224. package/skills/weaver-e10-reception-flow/SKILL.md +97 -41
  225. package/skills/weaver-e10-reception-flow/references/guide.md +3 -1
  226. package/skills/weaver-e10-recruit-stage/SKILL.md +557 -75
  227. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +67 -44
  228. package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +279 -0
  229. package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +198 -0
  230. package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +697 -0
  231. package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +507 -0
  232. package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +87 -0
  233. package/skills/weaver-e10-recruit-stage/references/position-templates.md +19 -18
  234. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +19 -18
  235. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +1 -1
  236. package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +1 -1
  237. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +15 -2
  238. package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +37 -0
  239. package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +4 -4
  240. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +64 -28
  241. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +43 -2
  242. package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +41 -0
  243. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +4 -4
  244. package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +2 -2
  245. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +25 -7
  246. package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +51 -0
  247. package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +63 -0
  248. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +4 -4
  249. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +2 -2
  250. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +58 -33
  251. package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +4 -4
  252. package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +5 -5
  253. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +2 -2
  254. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +11 -10
  255. package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +2 -2
  256. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +2 -2
  257. package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +106 -0
  258. package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +325 -0
  259. package/skills/weaver-e10-recruit-stage/templates/match-report.html +265 -0
  260. package/skills/weaver-e10-shared/SKILL.md +22 -1
  261. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +2 -2
  262. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
  263. package/skills/weaver-e10-jucailin/references/source-manifest.json +0 -152
@@ -2,8 +2,8 @@ import { receptionOperationNames } from './operations/registry.js';
2
2
  export const receptionOperations = [
3
3
  {
4
4
  name: 'reception.ask',
5
- risk: 'read',
6
- summary: '按 7 项抽取结果出交互面板:客户需求(已明确则跳过)+ 接待细节(常驻)+ 是否会议(必问,原话明确提及会议室才跳过)。返回 runId 供 doc 使用。',
5
+ risk: 'read-with-side-effect',
6
+ summary: '按 7 项抽取结果出交互面板:客户需求(已明确则跳过)+ 接待细节(常驻)+ 是否会议(必问,原话明确提及会议室才跳过)。返回 runId 供 doc 使用;每次调用会在本地新建一份 run 记录(无服务端写入),不要当纯读取反复重试。',
7
7
  inputSchema: {
8
8
  type: 'object',
9
9
  additionalProperties: false,
@@ -65,6 +65,11 @@ export const receptionOperations = [
65
65
  workflow: { type: 'string', description: '目标流程名' },
66
66
  outDir: { type: 'string', description: '产物输出目录' },
67
67
  noUpload: { type: 'boolean', description: '跳过附件上传,只出本地文件' },
68
+ mode: {
69
+ type: 'string',
70
+ enum: ['plan', 'flow'],
71
+ description: '出件范围:plan=只出内部参考文档 md(不渲染 docx、不上传附件);flow=完整链路。默认 flow',
72
+ },
68
73
  snapshot: { type: 'string', description: '字段快照路径;同时用于推导技能包内 render.py 位置' },
69
74
  renderPy: { type: 'string', description: '显式指定 render.py 路径' },
70
75
  },
@@ -74,6 +79,7 @@ export const receptionOperations = [
74
79
  type: 'object',
75
80
  properties: {
76
81
  runId: { type: 'string' },
82
+ mode: { type: 'string', description: '本次实际生效的出件范围:plan / flow' },
77
83
  rebuilt: { type: 'boolean' },
78
84
  files: { type: 'array', items: { type: 'object' } },
79
85
  internalDoc: {
@@ -132,7 +138,8 @@ export const receptionOperations = [
132
138
  name: 'reception.docRender',
133
139
  risk: 'read',
134
140
  summary: '一次完成 doc + render:出 docx/md、上传附件、拼 customParams、落 browsertool。'
135
- + '两者之间没有人工确认点,合并只为省一次工具往返;失败语义与分开调用一致。',
141
+ + '两者之间没有人工确认点,合并只为省一次工具往返;失败语义与分开调用一致。'
142
+ + '--mode plan 只出内部参考文档 md,跳过 render(不出 browsertool、不做填单硬校验)。',
136
143
  inputSchema: {
137
144
  type: 'object',
138
145
  additionalProperties: false,
@@ -145,6 +152,11 @@ export const receptionOperations = [
145
152
  workflow: { type: 'string', description: '目标流程名' },
146
153
  outDir: { type: 'string', description: '产物输出目录' },
147
154
  noUpload: { type: 'boolean', description: '跳过附件上传,只出本地文件' },
155
+ mode: {
156
+ type: 'string',
157
+ enum: ['plan', 'flow'],
158
+ description: '出件范围:plan=只出内部参考文档 md(不渲染 docx、不上传附件、不打开填单页);flow=完整链路。默认 flow',
159
+ },
148
160
  snapshot: { type: 'string', description: '字段快照路径;同时用于推导技能包内 render.py 位置' },
149
161
  allowMissingRestaurant: { type: 'boolean', description: '提了小餐厅但确实拿不到包厢号时放行(明细留空进待办),默认 false 直接报 RESTAURANT_DETAIL_MISSING' },
150
162
  renderPy: { type: 'string', description: '显式指定 render.py 路径' },
@@ -160,6 +172,8 @@ export const receptionOperations = [
160
172
  type: 'object',
161
173
  properties: {
162
174
  runId: { type: 'string' },
175
+ mode: { type: 'string', description: '本次实际生效的出件范围:plan / flow' },
176
+ renderSkipped: { type: 'boolean', description: 'plan 模式恒为 true:没有调 render,回包里不会有 browsertool' },
163
177
  rebuilt: { type: 'boolean' },
164
178
  files: { type: 'array', items: { type: 'object' } },
165
179
  internalDoc: {
@@ -64,6 +64,9 @@ export async function ask(input, ctx) {
64
64
  // 而 ask 只拿它填 empId(登录人兜底)和 base(拼 URL),这两件事 doc / render 阶段
65
65
  // 本来就绕不开会话,放在那里做即可。ask 保持纯本地,冷启动从 643ms 降到 340ms。
66
66
  data.empId = '';
67
+ // 注意:这里会落一份 run(stateDir/runs/<runId>.json),是 ask 唯一的副作用。
68
+ // 合约里因此标 read-with-side-effect,而不是 read —— 同一份输入重复调用会生成不同 runId,
69
+ // 调用方不能把它当成「随便重试的纯读取」。
67
70
  const runId = newRunId();
68
71
  saveRun(ctx.stateDir, {
69
72
  runId,
@@ -1,11 +1,11 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
  import { basename, join } from 'node:path';
3
- import { DEFAULT_WORKFLOW } from '../constants.js';
3
+ import { DEFAULT_WORKFLOW, normalizeReceptionMode } from '../constants.js';
4
4
  import { receptionValidationError } from '../errors.js';
5
5
  import { applyMeetingPolicy, normalizeMeeting } from './leads.js';
6
6
  import { mergeAnswers } from './panels.js';
7
7
  import { normalizeRestaurant } from './restaurant.js';
8
- import { requirePython, renderBoth, resolveRenderPy } from './render-assets.js';
8
+ import { renderBoth, renderMdOnly, requirePython, resolveRenderPy } from './render-assets.js';
9
9
  import { newRunId, saveRun, tryLoadRun } from './runs.js';
10
10
  import { canonical, ensureDir, parseJsonText, sha256, writeJson } from './shared.js';
11
11
  /** 案例 + 专家检索结果注入。软依赖:文件没给 / 给空就整段不出,不阻断出单。 */
@@ -85,6 +85,9 @@ export async function doc(input, ctx) {
85
85
  const startedAt = Date.now();
86
86
  const runIdArg = String(input.runId || '').trim();
87
87
  const knownArg = input.known || null;
88
+ const mode = normalizeReceptionMode(input.mode);
89
+ /** plan:只出内部参考文档 md。docx 与附件都服务填单页,这里一律不产出。 */
90
+ const planOnly = mode === 'plan';
88
91
  let run = runIdArg ? tryLoadRun(ctx.stateDir, runIdArg) : null;
89
92
  let rebuilt = false;
90
93
  if (!run) {
@@ -107,7 +110,7 @@ export async function doc(input, ctx) {
107
110
  data: { ...knownArg },
108
111
  customer: null,
109
112
  user: null,
110
- mode: 'browsertool',
113
+ mode,
111
114
  };
112
115
  }
113
116
  const answers = input.answers ?? run.answers ?? {};
@@ -148,14 +151,17 @@ export async function doc(input, ctx) {
148
151
  const dataHash = sha256(canonical(data)).slice(0, 32);
149
152
  const dataPath = join(ctx.stateDir, `doc-data-${dataHash.slice(0, 12)}.json`);
150
153
  writeJson(dataPath, data);
151
- const python = requirePython(ctx.stateDir);
154
+ const python = requirePython(ctx.stateDir, !planOnly);
152
155
  const renderPy = resolveRenderPy(input.renderPy || '', input.snapshot || '');
153
- const noUpload = input.noUpload === true;
156
+ // plan 模式强制跳过上传:附件字段只服务填单页,而 plan 根本不出填单页
157
+ const noUpload = planOnly || input.noUpload === true;
154
158
  // 会话与渲染并行:渲染约 7s,会话读取基本瞬时,没必要串行等
155
159
  const sessionPromise = noUpload
156
160
  ? Promise.resolve(null)
157
161
  : ctx.host.getSession();
158
- const renderPromise = renderBoth({ python, renderPy, dataPath, outDir });
162
+ const renderPromise = planOnly
163
+ ? renderMdOnly({ python, renderPy, dataPath, outDir })
164
+ : renderBoth({ python, renderPy, dataPath, outDir });
159
165
  const uploadPromise = renderPromise.then(async (rendered) => {
160
166
  if (noUpload)
161
167
  return null;
@@ -230,11 +236,12 @@ export async function doc(input, ctx) {
230
236
  warnings.push('未取得 E10 会话:附件未上传,产物按本地文件交付');
231
237
  }
232
238
  }
233
- else if (noUpload) {
239
+ else if (noUpload && !planOnly) {
234
240
  warnings.push('已按 --no-upload 跳过上传:页面上需要手动添加附件');
235
241
  }
236
242
  run.answers = answers;
237
243
  run.data = data;
244
+ run.mode = mode;
238
245
  run.files = rendered.result.files || [];
239
246
  // 记住快照路径,render 就不必再传一次
240
247
  if (input.snapshot)
@@ -268,6 +275,7 @@ export async function doc(input, ctx) {
268
275
  ok: true,
269
276
  data: {
270
277
  runId: run.runId,
278
+ mode,
271
279
  rebuilt,
272
280
  files: (rendered.result.files || []).map((file) => ({ kind: file.kind, path: file.path, size: file.size })),
273
281
  internalDoc,
@@ -286,10 +294,15 @@ export async function doc(input, ctx) {
286
294
  },
287
295
  },
288
296
  warnings,
289
- next: {
290
- command: `weaver-work-cli reception render --run-id ${run.runId}`,
291
- reason: '附件 fileid 已写入 run,render 会自动带上',
292
- },
297
+ next: planOnly
298
+ ? {
299
+ command: '把 data.internalDoc.content 全文作为回复正文',
300
+ reason: '场景一只交付《接待交流参考文档》,不生成行程单、不上传附件、不打开填单页',
301
+ }
302
+ : {
303
+ command: `weaver-work-cli reception render --run-id ${run.runId}`,
304
+ reason: '附件 fileid 已写入 run,render 会自动带上',
305
+ },
293
306
  };
294
307
  }
295
308
  export const docOperation = {
@@ -1,3 +1,4 @@
1
+ import { normalizeReceptionMode } from '../constants.js';
1
2
  import { doc } from './doc.js';
2
3
  import { render } from './render.js';
3
4
  /**
@@ -6,16 +7,31 @@ import { render } from './render.js';
6
7
  * 为什么合并:`doc` 与 `render` 之间没有人工确认点,拆两次只会多付一次工具往返
7
8
  * (宿主侧单次 3~5 秒),而 CLI 内部这两步加起来只有几百毫秒。
8
9
  *
10
+ * `--mode plan` 时只跑 doc(且只出 md),**不进 render**:plan 不产出填单页,
11
+ * 会议未表态 / 小餐厅缺包厢这两条硬校验也就没有意义——它们拦的是填单页,
12
+ * 不是参考文档。plan 的交付物是 `internalDoc.content`,回包里 `renderSkipped: true`。
13
+ *
9
14
  * 失败语义与分开调用**完全一致**,不因为合并而改变:
10
15
  * - `doc` 失败(快照缺失 / render.py 缺失 / python-docx 缺失)→ 直接返回 doc 的错误,不继续 render;
11
16
  * - 附件上传失败**不算** doc 失败(只进 `warnings` + `uploadDiagnostics`),`customParams` 照常产出;
12
17
  * - `render` 失败 → 返回 render 的错误,此时文件已生成,回包里仍带 `files`。
13
18
  */
14
19
  export async function docRender(input, ctx) {
20
+ const mode = normalizeReceptionMode(input.mode);
15
21
  const docResult = await doc(input, ctx);
16
22
  if (!docResult.ok)
17
23
  return docResult;
18
- const runId = String((docResult.data || {}).runId || input.runId || '');
24
+ const docData = docResult.data || {};
25
+ if (mode === 'plan') {
26
+ return {
27
+ state: docResult.state,
28
+ ok: true,
29
+ data: { ...docData, mode, renderSkipped: true },
30
+ warnings: docResult.warnings || [],
31
+ next: docResult.next,
32
+ };
33
+ }
34
+ const runId = String(docData.runId || input.runId || '');
19
35
  // answers / snapshotPath 已经由 doc 写进 run,这里只传 runId;
20
36
  // sdkRender 属于 render 自己的入参,透传即可。
21
37
  let renderResult;
@@ -50,6 +66,7 @@ export async function docRender(input, ctx) {
50
66
  ...docResult.data,
51
67
  ...renderResult.data,
52
68
  runId,
69
+ mode,
53
70
  },
54
71
  warnings: [...(docResult.warnings || []), ...(renderResult.warnings || [])],
55
72
  next: renderResult.next,
@@ -14,6 +14,8 @@ import { skillRootFromSnapshot } from './snapshot.js';
14
14
  */
15
15
  const PYTHON_CACHE_FILE = 'python.json';
16
16
  let pythonCache;
17
+ /** 只出 md 时的探测结果(不要求 python-docx),与 docx 的缓存分开存。 */
18
+ let pythonCacheAny;
17
19
  function runSync(file, args, options = {}) {
18
20
  const result = spawnSync(file, args, { encoding: 'utf8', maxBuffer: 16 * 1024 * 1024, ...options });
19
21
  return {
@@ -47,43 +49,83 @@ function lastJsonLine(text) {
47
49
  return null;
48
50
  }
49
51
  /**
50
- * 依次探测 RECEPTION_PY / python3 / python,要求能 `import docx`。
52
+ * 探测一次解释器,成功返回它的**绝对路径**(`sys.executable`),失败返回 null。
53
+ *
54
+ * 为什么不直接返回命令名:Windows 的 `py` launcher 会读脚本 shebang。`render.py` 第一行是
55
+ * `#!/usr/bin/env python3`,`py render.py` 会被导向 PATH 里的 `python3`(WorkBuddy 自带、
56
+ * 没有 python-docx),而 `py -3 -c "import docx"` 用的是默认版本——**探测通过、执行却失败**,
57
+ * 表现为「明明装了 python-docx 却报缺少 python-docx」。
58
+ * 返回 `sys.executable` 让探测与执行落在同一个解释器上,同时绕开 launcher 的二次选择。
59
+ */
60
+ function probePython(file, args) {
61
+ const result = spawnSync(file, args, { encoding: 'utf8', maxBuffer: 1024 * 1024 });
62
+ if (result.status !== 0)
63
+ return null;
64
+ const lines = String(result.stdout || '').trim().split(/\r?\n/).filter(Boolean);
65
+ const exe = lines.length ? lines[lines.length - 1].trim() : '';
66
+ return exe || null;
67
+ }
68
+ /**
69
+ * 依次探测 RECEPTION_PY / python3 / python / py,要求能 `import docx`。
51
70
  * 探测结果落盘 7 天省掉每次 0.3~1s;磁盘缓存也要能真跑起来才认(避免升级后命中死路径)。
71
+ *
72
+ * `requireDocx=false` 用于只出内部参考文档(`--mode plan`):md 分支不碰 python-docx,
73
+ * 探测条件也得跟着放宽,否则缺 docx 库的机器连 md 都出不来。
52
74
  */
53
- export function pickPython(stateDir) {
54
- if (pythonCache !== undefined)
75
+ export function pickPython(stateDir, requireDocx = true) {
76
+ if (requireDocx && pythonCache !== undefined)
55
77
  return pythonCache;
78
+ if (!requireDocx && pythonCacheAny !== undefined)
79
+ return pythonCacheAny;
80
+ // 显式指定优先,原样使用(调用方自己负责指对)
56
81
  if (process.env.RECEPTION_PY) {
57
- pythonCache = process.env.RECEPTION_PY;
58
- return pythonCache;
82
+ const envPy = process.env.RECEPTION_PY;
83
+ if (requireDocx)
84
+ pythonCache = envPy;
85
+ else
86
+ pythonCacheAny = envPy;
87
+ return envPy;
59
88
  }
89
+ const probe = ['-c', requireDocx ? 'import docx, sys; print(sys.executable)' : 'import sys; print(sys.executable)'];
60
90
  const cachePath = join(stateDir, PYTHON_CACHE_FILE);
61
91
  const disk = readJson(cachePath);
62
92
  if (disk?.py && Date.now() - Number(disk.at || 0) < PYTHON_CACHE_TTL_MS) {
63
- if (runSync(disk.py, ['-c', 'import docx'], { stdio: 'ignore' }).status === 0) {
64
- pythonCache = disk.py;
65
- return pythonCache;
93
+ const hit = probePython(disk.py, probe);
94
+ if (hit) {
95
+ if (requireDocx)
96
+ pythonCache = hit;
97
+ else
98
+ pythonCacheAny = hit;
99
+ return hit;
66
100
  }
67
101
  }
68
102
  for (const candidate of ['python3', 'python', 'py']) {
69
- const args = candidate === 'py' ? ['-3', '-c', 'import docx'] : ['-c', 'import docx'];
70
- if (runSync(candidate, args, { stdio: 'ignore' }).status === 0) {
71
- pythonCache = candidate;
72
- try {
73
- writeJson(cachePath, { py: candidate, at: Date.now() });
74
- }
75
- catch {
76
- // 缓存写不进不阻断
77
- }
78
- return candidate;
103
+ const exe = probePython(candidate, candidate === 'py' ? ['-3', ...probe] : probe);
104
+ if (!exe)
105
+ continue;
106
+ if (requireDocx)
107
+ pythonCache = exe;
108
+ else
109
+ pythonCacheAny = exe;
110
+ try {
111
+ // 缓存绝对路径:下次直接用它,不再经 PATH 解析
112
+ writeJson(cachePath, { py: exe, at: Date.now() });
79
113
  }
114
+ catch {
115
+ // 缓存写不进不阻断
116
+ }
117
+ return exe;
80
118
  }
81
- pythonCache = null;
119
+ if (requireDocx)
120
+ pythonCache = null;
121
+ else
122
+ pythonCacheAny = null;
82
123
  return null;
83
124
  }
84
125
  /** 测试用:清掉进程内缓存。 */
85
126
  export function resetPythonCache() {
86
127
  pythonCache = undefined;
128
+ pythonCacheAny = undefined;
87
129
  }
88
130
  /**
89
131
  * 定位 render.py。优先级:显式参数 → 环境变量 → 技能包内固定相对位置。
@@ -173,11 +215,40 @@ export async function renderBoth(options) {
173
215
  parallelMs: Date.now() - startedAt,
174
216
  };
175
217
  }
218
+ /**
219
+ * 只渲染内部参考文档 md(`--mode plan`)。
220
+ *
221
+ * 返回结构与 renderBoth 对齐,调用方不必为两种模式写两套取值逻辑;
222
+ * docx 侧的耗时与产物一律为空,避免上层误把「没渲染」当成「渲染失败」。
223
+ */
224
+ export async function renderMdOnly(options) {
225
+ ensureDir(options.outDir);
226
+ const startedAt = Date.now();
227
+ const mdResult = await renderOnly({ ...options, only: 'md' });
228
+ const elapsed = Date.now() - startedAt;
229
+ const files = mdResult.files || [];
230
+ return {
231
+ result: {
232
+ ...mdResult,
233
+ files,
234
+ verify: { ...(mdResult.verify || {}), fileCount: files.length },
235
+ },
236
+ docxResult: { ok: true, files: [] },
237
+ mdResult,
238
+ docxMs: 0,
239
+ mdMs: elapsed,
240
+ parallelMs: elapsed,
241
+ };
242
+ }
176
243
  /** 供 doc 用:缺 python 时给出可执行的提示而不是堆栈。 */
177
- export function requirePython(stateDir) {
178
- const python = pickPython(stateDir);
244
+ export function requirePython(stateDir, requireDocx = true) {
245
+ const python = pickPython(stateDir, requireDocx);
179
246
  if (!python) {
180
- throw receptionEnvironmentError('NO_PYTHON_DOCX', '缺 python3 + python-docx,无法渲染 docx', { hint: 'pip install python-docx;离线环境只能交付 md' });
247
+ throw receptionEnvironmentError(requireDocx ? 'NO_PYTHON_DOCX' : 'NO_PYTHON', requireDocx ? '缺 python3 + python-docx,无法渲染 docx' : '缺 python3,无法渲染接待参考文档', {
248
+ hint: requireDocx
249
+ ? 'pip install python-docx;离线环境只能交付 md'
250
+ : '安装 python3 后重试;只出接待方案(--mode plan)同样需要 python3 跑 render.py',
251
+ });
181
252
  }
182
253
  return python;
183
254
  }
@@ -2,7 +2,7 @@ import { join, resolve, dirname } from 'node:path';
2
2
  import { existsSync } from 'node:fs';
3
3
  import { readFile, writeFile, mkdir } from 'node:fs/promises';
4
4
  import { homedir } from 'node:os';
5
- import { createRecruitContextLoader, } from '../ehr/operations/recruit.js';
5
+ import { createRecruitContextLoader, isSelfTenant, } from '../ehr/operations/recruit.js';
6
6
  import { rsFail } from './errors.js';
7
7
  const flowMemo = new Map();
8
8
  /**
@@ -86,9 +86,10 @@ async function readLegacyCacheExtra(baseUrl) {
86
86
  */
87
87
  const FLOW_MISS_TTL_MS = 6 * 60 * 60 * 1000;
88
88
  /**
89
- * 失败标记**必须放在环境缓存目录之外**:`createRecruitContextLoader` 用「目录内恰好 1 个 json 就复用」
90
- * 的启发式命中缓存,往同目录塞第二个 json 会直接把上下文缓存打冷(2026-11-18 实测:首次实现放同目录,
91
- * 之后每次调用都退化成 40+ 请求的全量重建,比省下的 0.55 s 贵得多)。
89
+ * 失败标记放在环境缓存目录之外、且以 `_` 开头命名(`_recruit-stage/flow-miss-<host>.json`):
90
+ * `createRecruitContextLoader` 的磁盘缓存按 `<appId>.json` 精确读取且排除 `_` 开头文件,
91
+ * 辅助标记放同目录也不会干扰命中(2026-11-28 缓存治理后双保险;旧实现「目录内恰好
92
+ * 1 个 json 才命中」时放同目录会把上下文缓存打冷,故历史上必须放目录外)。
92
93
  */
93
94
  function flowMissPath(baseUrl) {
94
95
  const hostDir = cacheDirFor(baseUrl); // .../env-cache/recruit-ops/<host>
@@ -228,7 +229,11 @@ async function resolveDefaultRecruitFlow(host, baseUrl, appId, cache) {
228
229
  }
229
230
  catch { /* 接口形态不符/未开放 */ }
230
231
  }
231
- // ③ 自用系统兜底(用户指定写死):仅 selfUse=1 且域名匹配时生效,不影响其他环境
232
+ // ③ 自用系统兜底(用户指定写死),不影响其他环境。
233
+ // 🔴 2026-11-28 判据升级:自用租户 key 唯一命中即生效,不再强制要求域名匹配。
234
+ // 同一套自用环境有多个入口(www.e-cology.com.cn / 内网 IP / 带端口),
235
+ // 按域名判会漏掉内网入口;tenantKey 与入口地址、菜单权限、业务配置表都无关,最稳定。
236
+ // 旧缓存没有 tenantKey 时退回原来的 selfUse + 域名双守卫,行为不变。
232
237
  if (!result) {
233
238
  const isSelfUse = String(cache?.selfUse || '') === '1';
234
239
  let host = '';
@@ -238,7 +243,8 @@ async function resolveDefaultRecruitFlow(host, baseUrl, appId, cache) {
238
243
  catch {
239
244
  host = '';
240
245
  }
241
- if (isSelfUse && host === SELFUSE_DEFAULT_FLOW.selfUseHost) {
246
+ const bySelfTenant = isSelfTenant(cache?.tenantKey);
247
+ if (bySelfTenant || (isSelfUse && host === SELFUSE_DEFAULT_FLOW.selfUseHost)) {
242
248
  result = { id: SELFUSE_DEFAULT_FLOW.id, name: SELFUSE_DEFAULT_FLOW.name };
243
249
  }
244
250
  }
@@ -1,5 +1,7 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
+ import { shouldReportPlatformError, toPlatformError } from '../../core/error-codes.js';
4
+ import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
3
5
  import { createRecruitStageContinuationSigner } from './continuation.js';
4
6
  import { createRecruitStageHost } from './host.js';
5
7
  import { recruitStageManifest } from './manifest.js';
@@ -88,7 +90,16 @@ async function executeAndPrint(ctx, operation, input) {
88
90
  ctx.output.write(successEnvelope(operation, result), { json: true });
89
91
  }
90
92
  catch (error) {
91
- console.error(JSON.stringify(failureEnvelope(error), null, 2));
93
+ // stderr 只写一个 JSON 对象:顶层带平台码(E-XXXX),整段 stderr 可被一次 JSON.parse。
94
+ // 此前只打富信封、没有任何平台码,宿主侧拿不到 E-XXXX(审计 RE-02 / G-06)。
95
+ const env = failureEnvelope(error);
96
+ if (shouldReportPlatformError(error)) {
97
+ const pe = toPlatformError(error);
98
+ console.error(JSON.stringify({ ...env, code: pe.code, message: pe.message }, null, 2));
99
+ }
100
+ else {
101
+ console.error(JSON.stringify(env, null, 2));
102
+ }
92
103
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
93
104
  }
94
105
  }
@@ -100,8 +111,16 @@ export const recruitStageShortcut = {
100
111
  const rs = program.command('recruit-stage').description('泛微E10招聘助手(招聘启事生成/简历解析建档/AI面试邀约与反馈)');
101
112
  rs.command('schema')
102
113
  .description('Print recruit-stage operation manifest for agents')
103
- .action(action((ctx) => {
104
- ctx.output.write(recruitStageManifest, { json: true });
114
+ .option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
115
+ .option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
116
+ .option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
117
+ .action(action((ctx, options) => {
118
+ const schema = schemaOptionsOf(options);
119
+ ctx.output.write(manifestView(recruitStageManifest, schema), {
120
+ json: true,
121
+ // 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
122
+ ...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
123
+ });
105
124
  }));
106
125
  rs.command('run')
107
126
  .description('Run a recruit-stage operation with JSON input')
@@ -25,5 +25,7 @@ export const recruitStageManifest = {
25
25
  sourceSkill: 'weaver-e10-recruit-stage',
26
26
  capabilities: ['recruit.jd.create', 'recruit.resume.import', 'recruit.interview.arrange', 'recruit.interview.feedback', 'recruit.list', 'recruit.candidate.search', 'recruit.tag'],
27
27
  operations: buildOperations(),
28
+ // 招聘域当前没有 withheld 能力,显式给 0,便于模型按统一字段判断边界(2026-11-27 审计 G-10)。
29
+ withheldCount: 0,
28
30
  withheldOperations: [],
29
31
  };
@@ -23,6 +23,7 @@ import { randomUUID } from 'node:crypto';
23
23
  import { rsSuccess, schemaOf } from './types.js';
24
24
  import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
25
25
  import { objIdOf, formIdOf, getFormLayout, getFormLayoutMeta, saveFormData, runEsb, getFormButtons, resolvePersonId, getDsOptions, getDsOptionsFull, findMenuNode, resolveCurrentUser, buildCardUrl, talentLinkExtra, pickSaveButtonActions, computeRequiredHint, randHex32, talentUiCardUrl, resolveInterviewListUrlOrNative, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
26
+ import { toMenuList } from '../../ehr/operations/shared.js';
26
27
  // 面试计划表单字段 dataKey(缓存 fields 里取)。
27
28
  // 注意:digital_id 不放入此列表——它只在「面试方式含 AI」时才是必填,
28
29
  // 放进来会让未部署数字人的环境连非 AI 面试都建不了(单独按需校验)。
@@ -450,7 +451,11 @@ async function callAssignedInterview(host, formDataId) {
450
451
  // 页面判断用松散比较 res.code == '200',保持一致(code 可能是数字或字符串)
451
452
  const ok = String(r?.code) === '200' || r?.status === true || r?.success === true;
452
453
  if (!ok)
453
- throw rsFail('分配面试(assignedInterview)失败:' + (r?.msg || JSON.stringify(r).slice(0, 200)));
454
+ throw rsFail('分配面试(assignedInterview)失败:' + (r?.msg || JSON.stringify(r).slice(0, 200))
455
+ // 🔴 2026-11-28 真机复现(188,未配流程的职位):① 保存已成功、记录已落库,只有 ② 分配失败。
456
+ // 不写清楚时用户只看到列表里一条「未开始」的面试,以为是技能把状态写错了。
457
+ + '。⚠️ 面试记录已保存(formDataId=' + formDataId + ',状态停留在表单默认值,通常为「未开始」);'
458
+ + '不要重新 apply(会重复创建面试记录)。请到面试管理列表查看该记录,修正职位流程配置后用 updateTalentId 走更新通道。常见原因:职位未配置招聘流程(流程 ID 为空)。');
454
459
  return r?.data || {};
455
460
  }
456
461
  async function execSaveActions(plan, formDataId) {
@@ -475,7 +480,8 @@ async function execSaveActions(plan, formDataId) {
475
480
  const ok = r?.status !== false;
476
481
  executed.push({ ...base, ok, msg: r?.successMsg || r?.failMsg || '' });
477
482
  if (!ok)
478
- throw rsFail('「保存」后续动作「' + (a.name || a.id) + '」执行失败:' + (r?.failMsg || '未知原因'));
483
+ throw rsFail('「保存」后续动作「' + (a.name || a.id) + '」执行失败:' + (r?.failMsg || '未知原因')
484
+ + '。⚠️ 面试记录已保存并分配成功(formDataId=' + formDataId + '),该后续动作不影响面试记录本身;不要重新 apply(会重复创建)。');
479
485
  }
480
486
  else if (a.actionType === 'jsCode') {
481
487
  if (ASSIGNED_API_RE.test(a.ecode || '')) {
@@ -537,13 +543,18 @@ async function resolveInterviewListUrl(ctx) {
537
543
  if (cachedMenu?.listId && cachedMenu.combinationId) {
538
544
  return `${baseUrl}/ebdapp/view/${appId}/combination/${cachedMenu.combinationId}-${cachedMenu.listId || cachedMenu.cusMenuId}/search/${cachedMenu.pageId || cachedMenu.cusMenuId}?terminal=PC&cusMenuId=${cachedMenu.cusMenuId}`;
539
545
  }
540
- const r = await host.request({ path: `/api/cusapp/app/allMenus?isFront=1&appId=${appId}&terminalType=PC`, method: 'GET' });
541
546
  const flat = [];
542
- (function walk(ns) { for (const n of (ns || []))
543
- if (n && typeof n === 'object') {
544
- flat.push(n);
545
- walk(n.children || n.childs);
546
- } })(r?.data?.cusAppMenus || r?.data);
547
+ try {
548
+ const r = await host.request({ path: `/api/cusapp/app/allMenus?isFront=1&appId=${appId}&terminalType=PC`, method: 'GET' });
549
+ (function walk(ns) { for (const n of toMenuList(ns))
550
+ if (n && typeof n === 'object') {
551
+ flat.push(n);
552
+ walk(n.children ?? n.childs);
553
+ } })(r?.data);
554
+ }
555
+ catch {
556
+ return null; // 菜单不可用:调用方按「没找到」处理
557
+ }
547
558
  const node = findMenuNode(flat, ['面试管理', '面试安排列表', '面试安排'], (n) => n.combinationId && n.id && n.pageId);
548
559
  if (!node)
549
560
  return null;
@@ -782,7 +793,6 @@ async function applyCore(args, env, payload) {
782
793
  interviewer: plan.summary.interviewer,
783
794
  viewLink: detailUrl ? `[查看 ${plan.cand.name || ''} 的面试安排详情](${detailUrl})` : null,
784
795
  listLocateLink: listLocateUrl ? `[打开面试管理列表](${listLocateUrl})` : null,
785
- agentNote: '产物 = 两个 Markdown 链接(平台实证可点击):① viewLink 面试安排详情单页(原样搬运,不改)② listLocateLink 面试列表——若技能「固定参数表」配置了本租户的固定页面路由,按 recruit-output-links.md 覆盖规则用固定路由替换 path 段(origin 取自 viewLink),否则原样搬运。按顺序放回答正文,缺哪个只给另一个、不输出半截。不要包 browsertool / <artifact> 标签。',
786
796
  aiPlan: plan.isAI && plan.aiPlanPicked ? { id: plan.aiPlanPicked.id, name: plan.aiPlanPicked.name } : undefined,
787
797
  saveActions: actionsRun.executed,
788
798
  verification: { checked: verification.checked, mismatches: verification.mismatches, unavailable: verification.unavailable || null },
@@ -997,7 +1007,6 @@ async function batchApply(args, env) {
997
1007
  failed,
998
1008
  items: results,
999
1009
  resultTable: lines.join('\n'),
1000
- agentNote: '把 resultTable 原样放回答正文(这是本次批量约面的结果清单);失败/部分成功的条目要连同 message 一起说清楚,不要只报总数。',
1001
1010
  });
1002
1011
  }
1003
1012
  export const interviewArrangeOperations = [