weaver-work-cli 0.1.69 → 0.1.71

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 (232) hide show
  1. package/dist/chunks/{archive-VUTREF3P.js → archive-5P33NAUN.js} +22 -5
  2. package/dist/chunks/{archive-oa-VXXO4RTB.js → archive-oa-YTY5D7DG.js} +17 -5
  3. package/dist/chunks/{asset-45U6TY7I.js → asset-3Q5MFQBX.js} +22 -5
  4. package/dist/chunks/{asset-idle-YCRBMTIT.js → asset-idle-PQPNYIS7.js} +15 -5
  5. package/dist/chunks/{attachment-content-7BEDNQ3O.js → attachment-content-7CN7JB6B.js} +3 -3
  6. package/dist/chunks/{blog-5AML4WMG.js → blog-MFHHK6ZR.js} +25 -5
  7. package/dist/chunks/{caizhilian-3P7BUNHT.js → caizhilian-OZ435AYW.js} +22 -8
  8. package/dist/chunks/{calendar-2HUXM3CZ.js → calendar-TNJXS5UC.js} +15 -5
  9. package/dist/chunks/{chunk-H2NRTGZR.js → chunk-2DNCKZRX.js} +3 -3
  10. package/dist/chunks/{chunk-DVFA3ODS.js → chunk-35A56FJ7.js} +12 -0
  11. package/dist/chunks/{chunk-HG6INLH6.js → chunk-6MMSLE6K.js} +23 -6
  12. package/dist/chunks/{chunk-UVWW5ABZ.js → chunk-B4NINGP2.js} +3 -3
  13. package/dist/chunks/{chunk-LRKKKO5A.js → chunk-DRJYPXKC.js} +3 -4
  14. package/dist/chunks/{chunk-3TZURS7M.js → chunk-EJLP63UO.js} +1 -1
  15. package/dist/chunks/{chunk-FMAZ42HS.js → chunk-FRMDHZSN.js} +11 -11
  16. package/dist/chunks/{chunk-MLJK4KLE.js → chunk-G7ZM2VOX.js} +34 -34
  17. package/dist/chunks/{chunk-LSVA7QA6.js → chunk-GB2MCJPG.js} +3 -1
  18. package/dist/chunks/{chunk-3CBURKSY.js → chunk-ICNUOWLL.js} +4 -4
  19. package/dist/chunks/{chunk-GTAFCAVP.js → chunk-IZCQU5D5.js} +1 -1
  20. package/dist/chunks/{chunk-BEYEXCWU.js → chunk-LU2SPJYY.js} +2 -2
  21. package/dist/chunks/{chunk-E7VWE2XI.js → chunk-MD5RXRI3.js} +3 -3
  22. package/dist/chunks/{chunk-VZUH3LKI.js → chunk-MZVQKQP5.js} +167 -157
  23. package/dist/chunks/{chunk-67AN5YJT.js → chunk-OFCF23FY.js} +9 -9
  24. package/dist/chunks/{chunk-ERAE4GHX.js → chunk-OPTJ6IF7.js} +1 -1
  25. package/dist/chunks/{chunk-727VKJQK.js → chunk-OZ7CJC7W.js} +2 -2
  26. package/dist/chunks/{chunk-T24EBWAZ.js → chunk-P3AFNAJ6.js} +48 -21
  27. package/dist/chunks/{chunk-4XYRTXRR.js → chunk-Q3EXRNB4.js} +1 -1
  28. package/dist/chunks/{chunk-QYDSTYGG.js → chunk-SKWKCLJX.js} +3 -3
  29. package/dist/chunks/{chunk-DSBV4GRK.js → chunk-SSS75WXW.js} +3 -3
  30. package/dist/chunks/{chunk-I5XB4MZT.js → chunk-SUWR5QEG.js} +94 -65
  31. package/dist/chunks/{chunk-YR3K53BU.js → chunk-VJWVB55R.js} +2 -2
  32. package/dist/chunks/{chunk-JAIZY37Z.js → chunk-VMVMEIL3.js} +4 -4
  33. package/dist/chunks/chunk-WM33BSIL.js +136 -0
  34. package/dist/chunks/{chunk-6DH73Q5H.js → chunk-X2C5CGGM.js} +52 -51
  35. package/dist/chunks/{chunk-ELF5TPSG.js → chunk-XLSJC6JZ.js} +6 -6
  36. package/dist/chunks/{chunk-U3OO3IZF.js → chunk-YN5SD4TX.js} +20 -7
  37. package/dist/chunks/{conflict-VKCRXHUV.js → conflict-Y4PXZ2YQ.js} +2 -2
  38. package/dist/chunks/{contract-3PMHUASH.js → contract-C3BGUMBM.js} +48 -5
  39. package/dist/chunks/{cowork-FZBTTBYX.js → cowork-2AWG4QLA.js} +37 -8
  40. package/dist/chunks/{create-flow-WYPLBLRK.js → create-flow-LOUOK46Z.js} +6 -6
  41. package/dist/chunks/{data-2YZ6A6TL.js → data-BSFYMXVO.js} +99 -184
  42. package/dist/chunks/{ebuilder-form-AWPTMZBZ.js → ebuilder-form-LAAMTD2Y.js} +17 -7
  43. package/dist/chunks/{ehr-MNPR4TE5.js → ehr-36KEX5SH.js} +62 -13
  44. package/dist/chunks/{entry-mode-BCJ7RPFC.js → entry-mode-6N2IGCS4.js} +3 -3
  45. package/dist/chunks/{env-SCVCHBN2.js → env-QYLS3EB3.js} +2 -2
  46. package/dist/chunks/{esb-GSB5QCEX.js → esb-PTYS3E67.js} +17 -7
  47. package/dist/chunks/{factory-CBXYOEBF.js → factory-LPFPKZ4T.js} +1 -1
  48. package/dist/chunks/{fna-XBSNUS2V.js → fna-JNHCLRDE.js} +15 -5
  49. package/dist/chunks/{group-chat-RFL4U7RF.js → group-chat-QP2WX4QJ.js} +3 -3
  50. package/dist/chunks/{host-2UMNXX5H.js → host-57LSRSE7.js} +4 -4
  51. package/dist/chunks/{host-NVDG3NC6.js → host-7BVR7CQ3.js} +4 -4
  52. package/dist/chunks/{host-SYPCA63D.js → host-C2BLBIID.js} +4 -4
  53. package/dist/chunks/{host-XVWBOSEN.js → host-K2ZKNXME.js} +4 -4
  54. package/dist/chunks/{host-R7BP3CTI.js → host-NS36QFLR.js} +6 -4
  55. package/dist/chunks/{host-BD44ASOD.js → host-QXFKQXNX.js} +4 -4
  56. package/dist/chunks/{hrm-FZUDJAND.js → hrm-FSGO4NSH.js} +15 -6
  57. package/dist/chunks/{im-F5NENPD7.js → im-2BFGS2XO.js} +16 -6
  58. package/dist/chunks/{invoice-DS6FLU55.js → invoice-JKLTTHSZ.js} +27 -6
  59. package/dist/chunks/{jiuchuanhui-PY2WEBUH.js → jiuchuanhui-PTABJE7V.js} +1294 -1134
  60. package/dist/chunks/{lazy-dispatch-F6O2EPGR.js → lazy-dispatch-YN2ZP3CS.js} +6 -6
  61. package/dist/chunks/{mail-ZEOSANEJ.js → mail-YNO7ZZUK.js} +116 -97
  62. package/dist/chunks/{meeting-N2AGGLVI.js → meeting-NIDHDBCB.js} +29 -16
  63. package/dist/chunks/{minute-doc-C62EZOJH.js → minute-doc-G3QAT7DE.js} +4 -4
  64. package/dist/chunks/{okr-OZUMTMCL.js → okr-QC52G6AJ.js} +15 -5
  65. package/dist/chunks/{operations-LQY3FTPH.js → operations-2WHIF5WV.js} +1 -1
  66. package/dist/chunks/{operations-UTUWFJTX.js → operations-MQV32ITT.js} +5 -5
  67. package/dist/chunks/{performance-GBKM5G2Y.js → performance-3MQ3AHDQ.js} +97 -11
  68. package/dist/chunks/{plan-C2NENH42.js → plan-ISINIEPY.js} +15 -5
  69. package/dist/chunks/{project-FAJ2P3UR.js → project-IJ6DVKT7.js} +18 -5
  70. package/dist/chunks/{reception-NH6MJFPR.js → reception-3H5LUG2I.js} +17 -7
  71. package/dist/chunks/{recruit-stage-DPEFHLSE.js → recruit-stage-MIOJXP6W.js} +412 -85
  72. package/dist/chunks/{registry-7US3QQXV.js → registry-3GQRYP2R.js} +12 -12
  73. package/dist/chunks/{registry-Y2HWS6JS.js → registry-3S7AVMXR.js} +4 -4
  74. package/dist/chunks/{registry-FTPUUHWC.js → registry-NHHKOEU3.js} +5 -5
  75. package/dist/chunks/{room-recommend-LMNF76YS.js → room-recommend-IOKBJVYP.js} +4 -4
  76. package/dist/chunks/{schedule-4QE2THAP.js → schedule-IB6EUARH.js} +4 -4
  77. package/dist/chunks/{smart-extract-GTYKF5TJ.js → smart-extract-N2TK3CEF.js} +19 -6
  78. package/dist/chunks/{workflow-KXYTQZ2H.js → workflow-RINBAL2M.js} +22 -8
  79. package/dist/cmd/auth/index.js +23 -0
  80. package/dist/cmd/e10/index.js +2 -1
  81. package/dist/cmd/index.js +2 -0
  82. package/dist/core/manifest-view.js +207 -0
  83. package/dist/core/output.js +38 -8
  84. package/dist/index.js +35 -35
  85. package/dist/internal/e10/auth/crypto.js +18 -8
  86. package/dist/internal/e10/auth/error-log.js +1 -2
  87. package/dist/internal/e10/auth/messages.js +2 -3
  88. package/dist/internal/e10/auth/xiaoe.js +1 -1
  89. package/dist/internal/e10/tls-policy.js +61 -13
  90. package/dist/shortcuts/archive/index.js +11 -2
  91. package/dist/shortcuts/archive/operations/download.js +1 -0
  92. package/dist/shortcuts/archive/operations/flow-url.js +3 -0
  93. package/dist/shortcuts/archive/operations/prelib.js +2 -0
  94. package/dist/shortcuts/archive/operations/upload.js +1 -0
  95. package/dist/shortcuts/archive-oa/index.js +11 -2
  96. package/dist/shortcuts/archive-oa/operations/borrow-car.js +2 -0
  97. package/dist/shortcuts/asset/index.js +11 -2
  98. package/dist/shortcuts/asset/manifest.js +7 -0
  99. package/dist/shortcuts/asset-idle/index.js +11 -2
  100. package/dist/shortcuts/blog/index.js +11 -2
  101. package/dist/shortcuts/blog/manifest.js +10 -0
  102. package/dist/shortcuts/caizhilian/host.js +20 -4
  103. package/dist/shortcuts/caizhilian/index.js +12 -2
  104. package/dist/shortcuts/caizhilian/manifest.js +4 -25
  105. package/dist/shortcuts/caizhilian/operations/handlers/search.js +34 -0
  106. package/dist/shortcuts/caizhilian/operations/registry.js +25 -1
  107. package/dist/shortcuts/calendar/index.js +11 -2
  108. package/dist/shortcuts/contract/index.js +11 -2
  109. package/dist/shortcuts/contract/manifest.js +32 -0
  110. package/dist/shortcuts/contract/operations/write.js +3 -0
  111. package/dist/shortcuts/cowork/index.js +21 -5
  112. package/dist/shortcuts/cowork/manifest.js +3 -0
  113. package/dist/shortcuts/cowork/operations/discuss-write.js +2 -0
  114. package/dist/shortcuts/cowork/operations/item-write.js +3 -0
  115. package/dist/shortcuts/cowork/operations/member-write.js +2 -0
  116. package/dist/shortcuts/cowork/operations/permission-write.js +2 -0
  117. package/dist/shortcuts/cowork/operations/review-write.js +1 -0
  118. package/dist/shortcuts/data/errors.js +16 -29
  119. package/dist/shortcuts/data/host.js +16 -7
  120. package/dist/shortcuts/data/index.js +12 -41
  121. package/dist/shortcuts/data/manifest.js +5 -44
  122. package/dist/shortcuts/data/operations/attend.js +2 -2
  123. package/dist/shortcuts/data/operations/conf.js +0 -88
  124. package/dist/shortcuts/data/operations/ds.js +4 -4
  125. package/dist/shortcuts/data/operations/index.js +1 -5
  126. package/dist/shortcuts/data/operations/module.js +40 -14
  127. package/dist/shortcuts/data/operations/query.js +2 -2
  128. package/dist/shortcuts/ebuilder-form/index.js +11 -2
  129. package/dist/shortcuts/ebuilder-form/manifest.js +12 -0
  130. package/dist/shortcuts/ehr/index.js +11 -2
  131. package/dist/shortcuts/ehr/operations/attend-write.js +51 -8
  132. package/dist/shortcuts/esb/index.js +11 -2
  133. package/dist/shortcuts/esb/manifest.js +2 -0
  134. package/dist/shortcuts/fna/index.js +11 -2
  135. package/dist/shortcuts/hrm/index.js +11 -1
  136. package/dist/shortcuts/im/index.js +11 -2
  137. package/dist/shortcuts/invoice/index.js +11 -2
  138. package/dist/shortcuts/invoice/manifest.js +8 -0
  139. package/dist/shortcuts/jiuchuanhui/cache.js +49 -35
  140. package/dist/shortcuts/jiuchuanhui/host.js +37 -5
  141. package/dist/shortcuts/jiuchuanhui/index.js +57 -7
  142. package/dist/shortcuts/jiuchuanhui/manifest.js +38 -1
  143. package/dist/shortcuts/jiuchuanhui/operations/customer-quick.js +110 -0
  144. package/dist/shortcuts/jiuchuanhui/operations/datajson.js +11 -56
  145. package/dist/shortcuts/jiuchuanhui/operations/esb.js +9 -16
  146. package/dist/shortcuts/jiuchuanhui/operations/generic.js +8 -30
  147. package/dist/shortcuts/jiuchuanhui/operations/registry.js +8 -2
  148. package/dist/shortcuts/jiuchuanhui/operations/shared.js +0 -10
  149. package/dist/shortcuts/mail/errors.js +14 -0
  150. package/dist/shortcuts/mail/index.js +23 -6
  151. package/dist/shortcuts/mail/manifest.js +11 -4
  152. package/dist/shortcuts/mail/operations/mail-blacklist.js +6 -6
  153. package/dist/shortcuts/mail/operations/mail-contacts.js +10 -10
  154. package/dist/shortcuts/mail/operations/mail-manage.js +15 -14
  155. package/dist/shortcuts/mail/operations/mail-read.js +7 -25
  156. package/dist/shortcuts/mail/operations/mail-send.js +12 -12
  157. package/dist/shortcuts/mail/operations/mail-sign.js +10 -10
  158. package/dist/shortcuts/mail/operations/mail-template.js +10 -10
  159. package/dist/shortcuts/meeting/index.js +11 -2
  160. package/dist/shortcuts/meeting/operations/invitation-publish.js +1 -0
  161. package/dist/shortcuts/okr/index.js +11 -2
  162. package/dist/shortcuts/performance/index.js +62 -3
  163. package/dist/shortcuts/performance/operations/flow-detail.js +5 -4
  164. package/dist/shortcuts/performance/scheme-validate.js +7 -0
  165. package/dist/shortcuts/performance/shared.js +40 -2
  166. package/dist/shortcuts/plan/index.js +11 -2
  167. package/dist/shortcuts/project/index.js +11 -2
  168. package/dist/shortcuts/project/operations/write.js +3 -0
  169. package/dist/shortcuts/reception/index.js +11 -2
  170. package/dist/shortcuts/reception/manifest.js +2 -2
  171. package/dist/shortcuts/reception/operations/ask.js +3 -0
  172. package/dist/shortcuts/recruit-stage/index.js +22 -3
  173. package/dist/shortcuts/recruit-stage/manifest.js +2 -0
  174. package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -16
  175. package/dist/shortcuts/recruit-stage/operations/profile.js +186 -0
  176. package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
  177. package/dist/shortcuts/recruit-stage/operations/resume-import.js +76 -47
  178. package/dist/shortcuts/recruit-stage/operations/search.js +151 -16
  179. package/dist/shortcuts/recruit-stage/operations/tag.js +17 -3
  180. package/dist/shortcuts/recruit-stage/shared.js +11 -1
  181. package/dist/shortcuts/smart-extract/index.js +11 -2
  182. package/dist/shortcuts/smart-extract/manifest.js +1 -0
  183. package/dist/shortcuts/smart-extract/operations/save.js +2 -0
  184. package/dist/shortcuts/workflow/index.js +21 -1
  185. package/dist/shortcuts/workflow/operations/aiDeepRead/collect.js +5 -2
  186. package/dist/shortcuts/workflow/operations/read.js +2 -2
  187. package/dist/shortcuts/workflow/operations/write.js +1 -1
  188. package/docs/caizhilian.md +1 -1
  189. package/docs/contract.md +1 -0
  190. package/docs/data.md +22 -22
  191. package/docs/e10-auth.md +41 -33
  192. package/docs/ehr.md +2 -0
  193. package/docs/jiuchuanhui.md +17 -5
  194. package/docs/reception.md +4 -3
  195. package/package.json +1 -1
  196. package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
  197. package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
  198. package/scripts/pysite/sitecustomize.py +41 -0
  199. package/skill-template/domains/data.md +4 -4
  200. package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
  201. package/skills/weaver-e10-caizhilian/references/org-browser.md +1 -0
  202. package/skills/weaver-e10-cowork/SKILL.md +3 -1
  203. package/skills/weaver-e10-data/SKILL.md +12 -16
  204. package/skills/weaver-e10-data/references/config-center.md +6 -7
  205. package/skills/weaver-e10-data/references/datasource.md +1 -1
  206. package/skills/weaver-e10-data/references/scene-and-misc.md +2 -2
  207. package/skills/weaver-e10-jiuchuanhui/SKILL.md +51 -90
  208. package/skills/weaver-e10-jiuchuanhui/references/cache.md +17 -13
  209. package/skills/weaver-e10-jiuchuanhui/references/clue.md +2 -2
  210. package/skills/weaver-e10-jiuchuanhui/references/customer.md +49 -11
  211. package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +3 -3
  212. package/skills/weaver-e10-jiuchuanhui/references/jiuchuanhui-entry.md +9 -7
  213. package/skills/weaver-e10-jiuchuanhui/references/sale.md +2 -2
  214. package/skills/weaver-e10-jucailin/references/attend-write.md +1 -1
  215. package/skills/weaver-e10-mail/SKILL.md +4 -1
  216. package/skills/weaver-e10-mail/references/mail-read.md +4 -2
  217. package/skills/weaver-e10-mail/references/safety-boundaries.md +1 -0
  218. package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
  219. package/skills/weaver-e10-performance/SKILL.md +9 -7
  220. package/skills/weaver-e10-performance/agents/openai.yaml +4 -2
  221. package/skills/weaver-e10-performance/references/flow-assess.md +19 -6
  222. package/skills/weaver-e10-recruit-stage/SKILL.md +125 -20
  223. package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +359 -0
  224. package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +87 -0
  225. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +9 -2
  226. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +1 -0
  227. package/skills/weaver-e10-recruit-stage/templates/match-report.html +177 -0
  228. package/skills/weaver-e10-shared/SKILL.md +22 -1
  229. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +2 -2
  230. package/skills/weaver-e10-workflow/SKILL.md +1 -1
  231. package/skills/weaver-e10-workflow/references/workflow-deep-read.md +8 -3
  232. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
@@ -37,6 +37,36 @@ const stepFields = { sort: { type: 'integer' }, stepType: stringField, raterType
37
37
  checkKps: booleanField, checkSignature: booleanField, stepWeight: numberField,
38
38
  scoreMinNum: nullableNumber, scoreMaxNum: nullableNumber, interviewOrder: { type: ['string', 'null'] },
39
39
  stepOperators: objectItems({ operateType: stringField, operater: { type: ['integer', 'string', 'null'] } }) };
40
+ /**
41
+ * 提醒配置元素(SchemeRemindSetting)。
42
+ * 证据:weaver-wr-performance 的 SchemeEditReq:397/402(List<SchemeRemindSetting>)、
43
+ * entity/SchemeRemindSetting.java、vo/basicSetting/RemindContentData.java;
44
+ * 事件名/提醒对象/timeRule 取值来自 weapp-performance 的 scheme/edit/remindCustomSetting.tsx 与 remindCustomEdit.tsx。
45
+ * 事件名不锁 enum:服务端不校验,前端才是权威取值源,锁死会挡住后续新增事件。
46
+ */
47
+ const remindContentItem = {
48
+ type: 'object',
49
+ additionalProperties: true,
50
+ properties: {
51
+ id: { type: ['string', 'null'], description: '内容记录 id(服务端生成,回传时原样带上)' },
52
+ langId: { type: 'integer', description: '语言 id(中文=7)' },
53
+ value: { type: 'string', description: '提醒内容文案,可含 {字段} 占位符' },
54
+ targetId: { type: ['string', 'null'], description: '内容模板 id,字符串形式' },
55
+ },
56
+ };
57
+ const remindSettingItem = {
58
+ type: 'object',
59
+ additionalProperties: true,
60
+ properties: {
61
+ remindEventName: { type: 'string', description: '提醒事件名。普通提醒:schemeSubmitRemind/schemeBackRemind/distributeDiscontRemind/distributeFileRemind/commitRemind/auditRemind/complateRemind/startFlowRemind/flowBackedRemind/flowBackRemind/commitedRemind/flowApprovedRemind;定时提醒:scoreEndRemind/approveEndRemind/scoreOverTimeRemind/approveOverTimeRemind/appealsOverTimeRemind' },
62
+ remindTarget: { type: 'string', description: '提醒对象:approver 审批人 / submiter 提交人 / distributionManager 分布负责人 / scorer 评分人 / kpiUser 被评分人 / appealsManager 申诉处理人。由事件决定,按服务端默认值原样带回,不要自造' },
63
+ remindStatus: { type: 'boolean', description: '是否启用' },
64
+ remindDay: { type: 'integer', description: '截止日期前 N 天(仅定时提醒需要;普通提醒填 0)' },
65
+ remindTime: { type: 'string', description: '提醒时刻 HH:mm,如 "08:00"(仅定时提醒需要)' },
66
+ timeRule: { type: 'string', enum: ['serverTime', 'localTime'], description: '时间基准:serverTime 按服务器时间 / localTime 按当地时间。真机回读报文通常不含该字段(缺省按 serverTime),原样带回时不必补写' },
67
+ remindContentData: { type: 'array', items: remindContentItem, description: '多语言提醒内容' },
68
+ },
69
+ };
40
70
  export const schemeEditReqSchema = {
41
71
  id: { type: 'string', description: '方案 id,字符串形式(18 位 Long 转 JSON 数字会丢精度)。首次暂存不传;再次暂存/发布必传(覆盖式更新)' },
42
72
  detailId: { type: 'string', description: '指标明细 id,字符串形式(发布时必传;缺失会导致 hr_kpi_details 重复插入、detail 永久 500)' },
@@ -92,8 +122,16 @@ export const schemeEditReqSchema = {
92
122
  kpsDistributeType: stringField, flowDistributeType: stringField, createMode: stringField,
93
123
  fieldFilters: { type: 'array', items: { type: 'object', additionalProperties: true } },
94
124
  operatingTargetList: { type: 'array', items: { type: 'object', additionalProperties: true } },
95
- remindOrdinaryData: { description: '自定义提醒配置,结构以接口为准' },
96
- remindTimeData: { description: '自定义提醒时间配置,结构以接口为准' },
125
+ remindOrdinaryData: {
126
+ type: 'array',
127
+ items: remindSettingItem,
128
+ description: '普通(事件型)提醒配置。⚠️ 必须与 remindTimeData 同时非空:服务端任一为空则整块提醒设置不落库。首选做法是从 scheme.detail 的 data 回读后,只改 remindStatus/remindDay/remindTime 再原样带回,不要凭空构造;回读记录还带 id/creator/tenantKey/createTime/deleteType/schemeId 等服务端字段,原样带回即可,普通提醒回读不含 remindTime 键。示例:[{"remindEventName":"commitRemind","remindTarget":"scorer","remindStatus":true,"remindDay":0,"timeRule":"serverTime","remindContentData":[{"langId":7,"value":"您有考核评分待提交"}]}]',
129
+ },
130
+ remindTimeData: {
131
+ type: 'array',
132
+ items: remindSettingItem,
133
+ description: '定时(截止/超时)提醒配置。⚠️ 必须与 remindOrdinaryData 同时非空;定时提醒需 remindDay + remindTime(真机报文形如 "08:00")。回读记录还带 id/creator/tenantKey/createTime/deleteType/schemeId 等服务端字段,原样带回即可。示例:[{"remindEventName":"scoreEndRemind","remindTarget":"scorer","remindStatus":true,"remindDay":3,"remindTime":"08:00","timeRule":"serverTime","remindContentData":[{"langId":7,"value":"评分将于 3 天后截止"}]}]',
134
+ },
97
135
  teffectTime: { type: 'string', description: '生效日期 yyyy-MM-dd(文档未提及时默认当天)' },
98
136
  failureTime: { type: 'string', description: '失效日期 yyyy-MM-dd(可选)' },
99
137
  dateTypeSet: { type: 'string', enum: ['setting', 'custom'], description: '自动时间项模式;填 distributeTime/forbidTime 时应为 custom' },
@@ -1,6 +1,7 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
3
  import { reportPlatformError } from '../../core/error-codes.js';
4
+ import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
4
5
  import { createPlanContinuationSigner } from './continuation.js';
5
6
  import { planValidationError } from './errors.js';
6
7
  import { createPlanHost } from './host.js';
@@ -97,8 +98,16 @@ export const planShortcut = {
97
98
  const plan = program.command('plan').description('泛微E10计划报告(报告详情/列表/新建/修改/发布/撤回/提交提醒/评论)');
98
99
  plan.command('schema')
99
100
  .description('Print plan operation manifest for agents')
100
- .action(action((ctx) => {
101
- ctx.output.write(planManifest, { json: true });
101
+ .option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
102
+ .option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
103
+ .option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
104
+ .action(action((ctx, options) => {
105
+ const schema = schemaOptionsOf(options);
106
+ ctx.output.write(manifestView(planManifest, schema), {
107
+ json: true,
108
+ // 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
109
+ ...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
110
+ });
102
111
  }));
103
112
  plan.command('run')
104
113
  .description('Run a plan operation with JSON input')
@@ -1,6 +1,7 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
3
  import { reportPlatformError } from '../../core/error-codes.js';
4
+ import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
4
5
  import { createProjectContinuationSigner } from './continuation.js';
5
6
  import { createProjectHost } from './host.js';
6
7
  import { projectManifest } from './manifest.js';
@@ -93,8 +94,16 @@ export const projectShortcut = {
93
94
  const project = program.command('project').description('泛微E10事井然项目管理(项目/任务查询与确认写入)');
94
95
  project.command('schema')
95
96
  .description('Print project operation manifest for agents')
96
- .action(action((ctx) => {
97
- ctx.output.write(projectManifest, { json: true });
97
+ .option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
98
+ .option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
99
+ .option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
100
+ .action(action((ctx, options) => {
101
+ const schema = schemaOptionsOf(options);
102
+ ctx.output.write(manifestView(projectManifest, schema), {
103
+ json: true,
104
+ // 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
105
+ ...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
106
+ });
98
107
  }));
99
108
  project.command('run')
100
109
  .description('Run a project operation with JSON input')
@@ -103,6 +103,7 @@ function createOperations(namePrefix, target) {
103
103
  action: prepareName,
104
104
  summary: `预览并生成${target.entity === 'task' ? '任务' : '项目'}创建写入 continuation,不发生写入`,
105
105
  risk: 'read-before-write',
106
+ requiresConfirmation: true,
106
107
  inputSchema: schemaOf({ records: SCHEMA_RECORDS }, { required: ['records'] }),
107
108
  handler: async (args, env) => {
108
109
  const operator = await operatorId(env.host);
@@ -161,6 +162,7 @@ function updateOperations(namePrefix, target) {
161
162
  action: prepareName,
162
163
  summary: `回查并预览${target.entity === 'task' ? '任务' : '项目'}更新,生成 continuation,不发生写入`,
163
164
  risk: 'read-before-write',
165
+ requiresConfirmation: true,
164
166
  inputSchema: schemaOf({ id: SCHEMA_ID_STRING, fields: SCHEMA_FIELDS }, { required: ['id', 'fields'] }),
165
167
  handler: async (args, env) => {
166
168
  const id = idString(args.id, 'id');
@@ -231,6 +233,7 @@ function deleteOperations(namePrefix, target) {
231
233
  action: prepareName,
232
234
  summary: `回查${target.entity === 'task' ? '任务' : '项目'}并生成不可逆删除 continuation,不发生删除`,
233
235
  risk: 'read-before-write',
236
+ requiresConfirmation: true,
234
237
  inputSchema: schemaOf({ id: SCHEMA_ID_STRING }, { required: ['id'] }),
235
238
  handler: async (args, env) => {
236
239
  const id = idString(args.id, 'id');
@@ -1,6 +1,7 @@
1
1
  import { join } from 'node:path';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
3
  import { stateRoot } from '../../core/state.js';
4
+ import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
4
5
  import { DEFAULT_WORKFLOW, STATE_SUBDIR } from './constants.js';
5
6
  import { receptionValidationError } from './errors.js';
6
7
  import { createReceptionHost } from './host.js';
@@ -75,8 +76,16 @@ export const receptionShortcut = {
75
76
  .description('泛微客户参观接待流程:出面板 → 出两份产物并挂附件 → 输出填单页 browsertool');
76
77
  reception.command('schema')
77
78
  .description('输出 operation 合约(Agent 自查入口)')
78
- .action(action((ctx) => {
79
- ctx.output.write(receptionManifest, { json: true });
79
+ .option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
80
+ .option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
81
+ .option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
82
+ .action(action((ctx, options) => {
83
+ const schema = schemaOptionsOf(options);
84
+ ctx.output.write(manifestView(receptionManifest, schema), {
85
+ json: true,
86
+ // 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
87
+ ...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
88
+ });
80
89
  }));
81
90
  reception.command('run')
82
91
  .description('按 operation 名执行(reception.ask / reception.doc / reception.render)')
@@ -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,
@@ -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,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
  };
@@ -481,10 +481,13 @@ async function buildJd(opts) {
481
481
  if (!fid(k))
482
482
  throw rsFail('职位管理缺少字段 ' + k + '(ds/fields 解析不到)');
483
483
  // 并行预取:refByFid(sets 解析依赖它)与 currentUser(仅第⑤步用,与 sets 无依赖)
484
- // 同时发出,避免过去「先等 refByFid → 再逐 set 串行 → 最后才取 currentUser」的多余 RTT。
484
+ // 🔴 2026-11-27 优化:当 sets 已覆盖全部 DEF_FROM_REF 字段时跳过 fetchRefByFid(省 2 HTTP)。
485
+ // dict 解析回退到无 group 搜索(dictIdByName(cache, value, '')),自用环境字典无歧义,结果一致。
486
+ const setsKeys = new Set(sets.map(([k]) => k));
487
+ const needsRefByFid = !DEF_FROM_REF.every(k => setsKeys.has(k));
485
488
  const currentUserPromise = resolveCurrentUser(host)
486
489
  .catch(() => null);
487
- const refByFid = await fetchRefByFid(ctx);
490
+ const refByFid = needsRefByFid ? await fetchRefByFid(ctx) : {};
488
491
  const map = new Map();
489
492
  const put = (d) => { if (d && d.formField && d.formField.id)
490
493
  map.set(String(d.formField.id), d); };
@@ -690,15 +693,19 @@ async function prepare(args, env) {
690
693
  const fp = fingerprint(willSubmit);
691
694
  const continuation = await env.continuation.issue({ operation: 'recruit-stage.jd.create.apply', fingerprint: fp,
692
695
  enumMaps: await dsOptionsSnapshot(),
693
- // 🔴 2026-11-07 修复:协议文档写「apply 带 confirm + continuation」,但 apply 原来只从 args 取
694
- // positionName/positionDuty/...,Agent 少传 positionName 就直接报 position_name_required。
695
- // 现把 prepare 用过的业务参数一并签进 continuation;apply 显式传的仍优先。
696
+ // 🔴 2026-11-27 优化:签入 willSubmit(已解析的完整提交数据)和 summary,
697
+ // apply 有 willSubmit 时直接用,跳过 buildJd(省 ~10 个 HTTP 请求,5-8 秒)。
698
+ willSubmit,
699
+ summary: jd.summary,
700
+ // 🔴 2026-11-27 修复:argsSnapshot 漏签了 sets,apply 不传 sets 时 buildJd 产出空 sets
701
+ // → 指纹不一致 → fingerprint_mismatch。现在补上。
696
702
  argsSnapshot: {
697
703
  positionName: String(args.positionName || ''),
698
704
  positionDuty: args.positionDuty ? String(args.positionDuty) : undefined,
699
705
  workRequest: args.workRequest ? String(args.workRequest) : undefined,
700
706
  demandId: args.demandId ? String(args.demandId) : undefined,
701
707
  demandName: args.demandName ? String(args.demandName) : undefined,
708
+ sets: args.sets,
702
709
  } });
703
710
  // 回执体积控制:continuation 与 fingerprint 放在返回体最前,避免大输出被截断时 Agent 取不到它们
704
711
  // 而重复调用 prepare(实测多花 10.7s)。
@@ -810,17 +817,27 @@ async function apply(args, env) {
810
817
  const positionName = String(merged.positionName || '').trim();
811
818
  if (!positionName)
812
819
  throw rsValidationError('position_name_required', 'positionName 必填');
813
- const jd = await buildJd({
814
- ctx, positionName,
815
- duty: merged.positionDuty ? String(merged.positionDuty) : undefined,
816
- requestText: merged.workRequest ? String(merged.workRequest) : undefined,
817
- demandId: merged.demandId ? String(merged.demandId) : undefined,
818
- demandName: merged.demandName ? String(merged.demandName) : undefined,
819
- sets: setsOf(merged),
820
- });
821
- const willSubmit = { formId: jd.formId, objId: jd.objId, dataDetails: jd.dataDetails };
822
- if (payload.fingerprint !== fingerprint(willSubmit)) {
823
- throw rsValidationError('fingerprint_mismatch', '待提交内容与 prepare 确认摘要不一致(字段值已变化),请重新 prepare 确认后再 apply');
820
+ // 🔴 2026-11-27 优化:prepare 签入了 willSubmit(已解析的完整 dataDetails),
821
+ // apply 直接用,跳过 buildJd(省 ~10 个 HTTP 请求,5-8 秒)。
822
+ // 旧 continuation(无 willSubmit)走原逻辑:buildJd + 指纹比对(argsSnapshot 已补 sets,不会再 mismatch)。
823
+ let jd;
824
+ if (payload.willSubmit) {
825
+ const ws = payload.willSubmit;
826
+ jd = { objId: ws.objId, formId: ws.formId, appId: ctx.appId, dataDetails: ws.dataDetails, summary: payload.summary || {} };
827
+ }
828
+ else {
829
+ jd = await buildJd({
830
+ ctx, positionName,
831
+ duty: merged.positionDuty ? String(merged.positionDuty) : undefined,
832
+ requestText: merged.workRequest ? String(merged.workRequest) : undefined,
833
+ demandId: merged.demandId ? String(merged.demandId) : undefined,
834
+ demandName: merged.demandName ? String(merged.demandName) : undefined,
835
+ sets: setsOf(merged),
836
+ });
837
+ const willSubmit = { formId: jd.formId, objId: jd.objId, dataDetails: jd.dataDetails };
838
+ if (payload.fingerprint !== fingerprint(willSubmit)) {
839
+ throw rsValidationError('fingerprint_mismatch', '待提交内容与 prepare 确认摘要不一致(字段值已变化),请重新 prepare 确认后再 apply');
840
+ }
824
841
  }
825
842
  // ① 保存职位管理表单 → ② addPosition 提交生成职位
826
843
  const formDataId = await saveFormData(host, {
@@ -0,0 +1,186 @@
1
+ import { rsSuccess, schemaOf } from './types.js';
2
+ import { rsFail } from '../errors.js';
3
+ import { objIdOf, formIdOf, getFormDataRecord, getFormLayoutMeta } from '../shared.js';
4
+ function makeDictLookup(cache) {
5
+ const byId = new Map();
6
+ for (const x of cache.dict?.raw || []) {
7
+ if (x.option_id && x.selection_name)
8
+ byId.set(String(x.option_id), x.selection_name);
9
+ }
10
+ return (id) => byId.get(String(id)) || '';
11
+ }
12
+ /** 从 dataDetails 提取展示值:dataOptions.content > dataText.content > content */
13
+ function detailDisplayValue(d, dictName) {
14
+ if (!d)
15
+ return '';
16
+ // 关联/选择字段:dataOptions[0].content 是展示名
17
+ if (Array.isArray(d.dataOptions) && d.dataOptions.length) {
18
+ const o = d.dataOptions[0];
19
+ return String(o?.content ?? o?.optionId ?? '');
20
+ }
21
+ // 长文本
22
+ if (d.dataText?.content != null)
23
+ return String(d.dataText.content);
24
+ // 单行文本/数字
25
+ if (d.content != null) {
26
+ // 字典类字段:content 存的是 optionId,翻译成名称
27
+ const s = String(d.content);
28
+ const dn = dictName(s);
29
+ return dn || s;
30
+ }
31
+ return '';
32
+ }
33
+ async function handlerProfile(args, env) {
34
+ const host = env.host;
35
+ const session = await host.getSession();
36
+ const ctx = { host, baseUrl: session.baseUrl.replace(/\/+$/, ''), appId: '', cache: await env.recruitContext() };
37
+ ctx.appId = ctx.cache.appId;
38
+ const talentId = String(args.talentId || '').trim();
39
+ if (!talentId)
40
+ throw rsFail('talentId 必填');
41
+ const objId = objIdOf(ctx.cache, 'talent_pool');
42
+ const formId = formIdOf(ctx.cache, 'talent_pool');
43
+ const fields = ctx.cache.fields[objId] || {};
44
+ // 反向字段映射:fieldId → dataKey
45
+ const revFields = {};
46
+ for (const [dk, fid] of Object.entries(fields))
47
+ revFields[String(fid)] = dk;
48
+ // 拉取完整记录(含明细表行)
49
+ const rec = await getFormDataRecord(host, formId, talentId, objId);
50
+ const dets = rec.dataDetails || [];
51
+ if (!dets.length)
52
+ throw rsFail('未找到人才记录(talentId=' + talentId + '),可能已删除或不存在');
53
+ const dictName = makeDictLookup(ctx.cache);
54
+ // 获取明细表元数据(subFormId → dataKey 映射)
55
+ const layoutMeta = await getFormLayoutMeta(host, formId);
56
+ const comps = layoutMeta?.formLayout?.pageLayouts?.[0]?.comps || [];
57
+ const subFormToDataKey = {};
58
+ for (const c of comps) {
59
+ const cfg = c.config || {};
60
+ if (c.type === 'DetailTable' && cfg.subFormId && cfg.dataKey) {
61
+ subFormToDataKey[String(cfg.subFormId)] = String(cfg.dataKey);
62
+ }
63
+ // 明细表列的字段映射
64
+ if (cfg.subFormId && cfg.fieldId && cfg.dataKey) {
65
+ revFields[String(cfg.fieldId)] = String(cfg.dataKey);
66
+ }
67
+ // 🔴 日期区间(DateRange/DateInterval):一个组件含 start/end 两个物理子字段,
68
+ // 各有独立 fieldId 与 dataKey,但组件本身没有 cfg.dataKey → 不单独处理会输出裸 fieldId
69
+ // (实测:教育经历返回 "840810461896392709":"2021-09-01",无法判断是入学还是毕业)。
70
+ if (cfg.subFormId && cfg.start && cfg.end) {
71
+ if (cfg.start.fieldId && cfg.start.dataKey)
72
+ revFields[String(cfg.start.fieldId)] = String(cfg.start.dataKey);
73
+ if (cfg.end.fieldId && cfg.end.dataKey)
74
+ revFields[String(cfg.end.fieldId)] = String(cfg.end.dataKey);
75
+ }
76
+ }
77
+ // 主表字段 + 明细表行分组
78
+ const main = {};
79
+ // 按 subFormId + dataIndex 分组明细行
80
+ const rowMap = {};
81
+ for (const d of dets) {
82
+ const fid = String(d.fieldId || d.formField?.id || '');
83
+ const dk = revFields[fid] || fid;
84
+ const val = detailDisplayValue(d, dictName);
85
+ if (d.subFormId) {
86
+ const sid = String(d.subFormId);
87
+ const didx = String(d.dataIndex ?? '0');
88
+ if (!rowMap[sid])
89
+ rowMap[sid] = new Map();
90
+ if (!rowMap[sid].has(didx))
91
+ rowMap[sid].set(didx, {});
92
+ if (val)
93
+ rowMap[sid].get(didx)[dk] = val;
94
+ }
95
+ else {
96
+ if (val)
97
+ main[dk] = val;
98
+ }
99
+ }
100
+ // 转换明细表为数组
101
+ // 🔴 subFormToDataKey 解析不到时(表单布局变更 / 明细表被隐藏 / 布局接口失败),
102
+ // dk 会退化成裸 subFormId,于是 subTables.rcrt_work_exp 取不到 →
103
+ // workExperience 静默返回空数组,调用方会误判「这个人没有工作经历」。
104
+ // 因此未归类的明细单独暴露在 unclassifiedDetails 并给 warning,绝不静默丢弃。
105
+ const subTables = {};
106
+ const subTableStats = {};
107
+ const unclassified = {};
108
+ for (const [sid, rows] of Object.entries(rowMap)) {
109
+ const arr = [...rows.values()].filter((r) => Object.keys(r).length > 0);
110
+ if (!arr.length)
111
+ continue;
112
+ const dk = subFormToDataKey[sid];
113
+ if (dk) {
114
+ subTables[dk] = arr;
115
+ subTableStats[dk] = arr.length;
116
+ }
117
+ else {
118
+ unclassified[sid] = arr;
119
+ }
120
+ }
121
+ const warnings = [];
122
+ const unclassifiedTotal = Object.values(unclassified).reduce((n, r) => n + r.length, 0);
123
+ if (unclassifiedTotal) {
124
+ warnings.push(`有 ${unclassifiedTotal} 行明细未能归类到已知明细表(表单布局未解析到对应 DetailTable 配置),已放在 unclassifiedDetails;不要据此判定「该候选人没有这些经历」`);
125
+ }
126
+ if (!layoutMeta) {
127
+ warnings.push('表单布局接口未返回数据,明细表列名可能显示为裸字段 id');
128
+ }
129
+ // 构建可读的档案结构
130
+ const profile = {
131
+ talentId,
132
+ basic: {
133
+ name: main.candidate_name || '',
134
+ mobile: main.telephone || '',
135
+ email: main.email || '',
136
+ gender: main.gender || '',
137
+ age: main.age || '',
138
+ birthday: main.birthday || '',
139
+ degree: main.highest_degree || '',
140
+ college: main.college || '',
141
+ joinworkdate: main.joinworkdate || '',
142
+ graduate_date: main.graduate_date || '',
143
+ intend_position: main.intend_position || '',
144
+ intended_workplace: main.intended_workplace || '',
145
+ // 🔴 实测(2026-11-27 自用环境):BOSS直聘等渠道导入的人才,现职/现公司在
146
+ // last_position_id / last_company_id,而 current_position / current_industry 为空
147
+ // (后者只在 OCR 解析出 jobInformations[0] 时才写)。不回退会让基本信息大面积空白,
148
+ // 匹配度评估拿不到关键依据。
149
+ current_position: main.current_position || main.last_position_id || '',
150
+ current_industry: main.current_industry || main.last_company_id || '',
151
+ expect_salary: main.expect_salary || '',
152
+ location_area: main.location_area || '',
153
+ recruit_status: main.recruit_status || '',
154
+ self_desc: main.self_desc || '',
155
+ work_ability: main.work_ability || '',
156
+ channel: main.channel || '',
157
+ },
158
+ education: subTables.rcrt_education_exp || [],
159
+ workExperience: subTables.rcrt_work_exp || [],
160
+ internship: subTables.rcrt_sxjl || [],
161
+ projectExperience: subTables.rcrt_project_exp || [],
162
+ awards: subTables.rcrt_award_exp || [],
163
+ languages: subTables.rcrt_language_skill || [],
164
+ subTableStats,
165
+ // 🔴 未归类明细与告警必须显式暴露:静默返回空数组会让调用方误判「没有这段经历」
166
+ ...(unclassifiedTotal ? { unclassifiedDetails: unclassified } : {}),
167
+ ...(warnings.length ? { warnings } : {}),
168
+ rawMain: main, // 完整主表字段(含可能新增的字段)
169
+ };
170
+ return rsSuccess('recruit-stage.candidate.profile', profile);
171
+ }
172
+ export const profileOperations = [
173
+ {
174
+ name: 'recruit-stage.candidate.profile',
175
+ resource: 'recruit.candidate',
176
+ method: 'query',
177
+ action: 'candidate.profile',
178
+ summary: '按 talentId 拉取人才完整档案:基本信息(主表全部字段)+ 教育经历 + 工作经历 + 项目经历等明细表。用于匹配度评估、候选人分析',
179
+ capability: 'recruit.candidate.profile',
180
+ risk: 'read',
181
+ inputSchema: schemaOf({
182
+ talentId: { type: 'string', description: '人才记录 id(来自 candidate.search 或 resume.import.apply 的 talentId)' },
183
+ }, { required: ['talentId'] }),
184
+ handler: handlerProfile,
185
+ },
186
+ ];
@@ -6,8 +6,10 @@ import { interviewFeedbackOperations } from './interview-feedback.js';
6
6
  import { listOperations } from './list.js';
7
7
  import { searchOperations } from './search.js';
8
8
  import { tagOperations } from './tag.js';
9
+ import { profileOperations } from './profile.js';
9
10
  const definitions = [
10
11
  ...searchOperations,
12
+ ...profileOperations,
11
13
  ...listOperations,
12
14
  ...tagOperations,
13
15
  ...jdCreateOperations,