weaver-work-cli 0.1.75 → 0.1.78

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 (268) hide show
  1. package/README.md +3 -1
  2. package/dist/chunks/{archive-OZJ6PYUR.js → archive-ENBSUMHV.js} +1 -1
  3. package/dist/chunks/{archive-oa-BHL5RK2F.js → archive-oa-7BFPQ6M5.js} +1 -1
  4. package/dist/chunks/{asset-HKRFRQR2.js → asset-V5SUD3PW.js} +1 -1
  5. package/dist/chunks/{asset-idle-GGIR4KE7.js → asset-idle-3CEL7WFX.js} +1 -1
  6. package/dist/chunks/{attachment-content-4OV65NK5.js → attachment-content-TFOC3Y3X.js} +3 -3
  7. package/dist/chunks/{blog-HYDP4DV3.js → blog-FLI4SS3P.js} +1 -1
  8. package/dist/chunks/{caizhilian-JS4RQZ6Z.js → caizhilian-7WCTKCCP.js} +3 -3
  9. package/dist/chunks/{calendar-SWRY4DIT.js → calendar-G726HUUH.js} +1 -1
  10. package/dist/chunks/{chunk-5ZJGPEIB.js → chunk-2KW7AI6P.js} +1 -1
  11. package/dist/chunks/{chunk-JOY3HZXL.js → chunk-2UV4IZIT.js} +21 -15
  12. package/dist/chunks/{chunk-FEZK536Z.js → chunk-4PBN7NJY.js} +353 -43
  13. package/dist/chunks/{chunk-VOMDD2C5.js → chunk-5E2FDXBU.js} +1 -1
  14. package/dist/chunks/{chunk-ZUB4M4N3.js → chunk-5VQ7JHV4.js} +134 -49
  15. package/dist/chunks/{chunk-I6NOHKEK.js → chunk-7SQN5IZR.js} +1 -1
  16. package/dist/chunks/{chunk-4FCBEWNB.js → chunk-BP7BONZO.js} +675 -86
  17. package/dist/chunks/{chunk-U6Y32KEV.js → chunk-BWFCTE43.js} +1 -1
  18. package/dist/chunks/{chunk-PG5YSNYY.js → chunk-DACQKJ6O.js} +3 -3
  19. package/dist/chunks/{chunk-KWJEICD4.js → chunk-E2EY3DMS.js} +2 -2
  20. package/dist/chunks/{chunk-KEA4XQPO.js → chunk-FAC4IFGQ.js} +4 -4
  21. package/dist/chunks/{chunk-MXCRKXOP.js → chunk-FPWCCRKT.js} +1 -1
  22. package/dist/chunks/{minute-doc-OQUMDTKG.js → chunk-IBTGXLOT.js} +101 -18
  23. package/dist/chunks/{chunk-OJ4JPD25.js → chunk-LQLIXBJF.js} +6 -8
  24. package/dist/chunks/{chunk-BNKUHN4N.js → chunk-OVTCWLNQ.js} +2 -2
  25. package/dist/chunks/{chunk-5D2V7ZAN.js → chunk-PMRNIGKZ.js} +1 -1
  26. package/dist/chunks/{chunk-OQCK5SAU.js → chunk-RVEKGVZU.js} +1 -1
  27. package/dist/chunks/{chunk-2AUFKU2D.js → chunk-SWFTWNWL.js} +11 -11
  28. package/dist/chunks/{chunk-TA2RBUTH.js → chunk-TBCKK6LH.js} +1 -1
  29. package/dist/chunks/{chunk-SU6IJD6D.js → chunk-TD5IOEGN.js} +1 -1
  30. package/dist/chunks/{chunk-J7FAAHWH.js → chunk-UDBQJLQF.js} +1 -1
  31. package/dist/chunks/{chunk-BSR5TM7U.js → chunk-USYFVIUR.js} +22 -7
  32. package/dist/chunks/{chunk-ERZY6GYL.js → chunk-UZ2E3VNI.js} +1 -1
  33. package/dist/chunks/{chunk-NWYHCZTY.js → chunk-VNEU7OUN.js} +1 -1
  34. package/dist/chunks/{chunk-5QUTQHXF.js → chunk-WNFDR5PC.js} +198 -80
  35. package/dist/chunks/{chunk-LJI4N6FV.js → chunk-XNN5PZTI.js} +1 -1
  36. package/dist/chunks/{chunk-QJWVYOOV.js → chunk-Z44YFIN6.js} +2 -2
  37. package/dist/chunks/{chunk-ZWIMLT6P.js → chunk-ZOTXXGUM.js} +7 -7
  38. package/dist/chunks/{cli-FULPXIKJ.js → cli-WA7FOQKC.js} +35 -35
  39. package/dist/chunks/{commands-BNWFNTD3.js → commands-J52MJ6NF.js} +3 -3
  40. package/dist/chunks/{conflict-5BKCDV2F.js → conflict-D4GVAURN.js} +2 -2
  41. package/dist/chunks/{contract-WI23OXVC.js → contract-GW7US3UF.js} +4400 -3548
  42. package/dist/chunks/{cowork-DZBBVNMQ.js → cowork-GZDODGKF.js} +1 -1
  43. package/dist/chunks/{create-flow-7ZRBRKX7.js → create-flow-ERDGW3FZ.js} +10 -6
  44. package/dist/chunks/{data-PAZVE6QE.js → data-HTQZRPPI.js} +1 -1
  45. package/dist/chunks/{ebuilder-form-5SQXIGXN.js → ebuilder-form-GHNIZ7ET.js} +2 -2
  46. package/dist/chunks/{ehr-CX5F4ZAU.js → ehr-P6T7OAAV.js} +2 -2
  47. package/dist/chunks/{entry-mode-I2BYNONZ.js → entry-mode-SQU5WTX6.js} +3 -3
  48. package/dist/chunks/{env-ZAQZ7EHN.js → env-DASBNSEM.js} +2 -2
  49. package/dist/chunks/{esb-DQTXDIBF.js → esb-ATRKVHCD.js} +3 -3
  50. package/dist/chunks/{factory-XRI6KZ7H.js → factory-A3NAKZAA.js} +1 -1
  51. package/dist/chunks/{fna-FK6HQVJL.js → fna-IKYI3SST.js} +1 -1
  52. package/dist/chunks/{group-chat-MLWNYM2P.js → group-chat-7SEAVAJR.js} +3 -3
  53. package/dist/chunks/{host-MEC4VQZA.js → host-6UOXYOOY.js} +2 -2
  54. package/dist/chunks/{host-KUMU3DDK.js → host-EJSJSLVK.js} +2 -2
  55. package/dist/chunks/{host-3EPREGXS.js → host-EYNLB6S4.js} +2 -2
  56. package/dist/chunks/{host-T6NNQGVZ.js → host-OT4KNR3G.js} +2 -2
  57. package/dist/chunks/{host-VI7Q45PM.js → host-UY4LQPN4.js} +2 -2
  58. package/dist/chunks/{host-J74JGYAW.js → host-XXGDQM7D.js} +2 -2
  59. package/dist/chunks/{hrm-KKVAW4P5.js → hrm-5JQ7QZ6A.js} +2 -2
  60. package/dist/chunks/{im-47CIWQNL.js → im-2YJW3EI5.js} +2 -2
  61. package/dist/chunks/{invoice-CDYRBNIG.js → invoice-37HR6L3W.js} +937 -552
  62. package/dist/chunks/{jiuchuanhui-M7QTRHZK.js → jiuchuanhui-KBWUZ7WT.js} +1 -1
  63. package/dist/chunks/{lazy-dispatch-FKQJZFI5.js → lazy-dispatch-ZDKLS5MR.js} +6 -6
  64. package/dist/chunks/{mail-NRBS5N6Y.js → mail-YBKUM6HM.js} +1 -1
  65. package/dist/chunks/{meeting-WC5LD3IO.js → meeting-7AEQGBAT.js} +19 -13
  66. package/dist/chunks/minute-doc-REI6RUE4.js +20 -0
  67. package/dist/chunks/{okr-EHKSKMPL.js → okr-HW7IULIR.js} +1 -1
  68. package/dist/chunks/{operations-V5VM5MS2.js → operations-4P2UYVLH.js} +3 -3
  69. package/dist/chunks/{performance-ZJADXJPN.js → performance-PM2G6L3E.js} +1 -1
  70. package/dist/chunks/{plan-OTDNBDJ7.js → plan-3YYGZ7ZM.js} +1 -1
  71. package/dist/chunks/{project-4XVBQ3HX.js → project-6PRGBLO2.js} +39 -15
  72. package/dist/chunks/{reception-3FAHOOH7.js → reception-7G3J2MA6.js} +1 -1
  73. package/dist/chunks/{recruit-stage-3WTVWW2K.js → recruit-stage-TLZJUFHD.js} +544 -464
  74. package/dist/chunks/{registry-TJGCVRCW.js → registry-3VTB3KLV.js} +3 -3
  75. package/dist/chunks/{registry-F4YFZLOD.js → registry-KQ4TNUWO.js} +1 -1
  76. package/dist/chunks/{registry-NBTBXR4L.js → registry-UVTI323K.js} +12 -11
  77. package/dist/chunks/{room-recommend-KL62XB2Y.js → room-recommend-ELEJUYBN.js} +4 -4
  78. package/dist/chunks/{schedule-XOISYUPB.js → schedule-XBKY7VEA.js} +4 -4
  79. package/dist/chunks/{smart-extract-UYGNV3BM.js → smart-extract-T5Z4AULN.js} +1 -1
  80. package/dist/chunks/{update-AV5VOXGY.js → update-77ZUIYSG.js} +2 -2
  81. package/dist/chunks/{workflow-V54LJPXL.js → workflow-SYCBS5XD.js} +3 -3
  82. package/dist/index.js +3 -3
  83. package/dist/internal/update/service.js +9 -8
  84. package/dist/shortcuts/contract/data/collection-ledger-html.js +109 -33
  85. package/dist/shortcuts/contract/data/collection-node-catalog.js +26 -2
  86. package/dist/shortcuts/contract/data/report-renderers.js +75 -31
  87. package/dist/shortcuts/contract/data/report-spec.js +17 -3
  88. package/dist/shortcuts/contract/manifest.js +20 -3
  89. package/dist/shortcuts/contract/operations/bizreview-report.js +23 -2
  90. package/dist/shortcuts/contract/operations/collection-node.js +116 -1
  91. package/dist/shortcuts/contract/operations/compare-report.js +27 -5
  92. package/dist/shortcuts/contract/operations/credit-page.js +11 -2
  93. package/dist/shortcuts/contract/operations/docx-slots.js +27 -2
  94. package/dist/shortcuts/contract/operations/draft-submit.js +9 -6
  95. package/dist/shortcuts/contract/operations/elements-build.js +162 -30
  96. package/dist/shortcuts/contract/operations/elements-spec.js +50 -0
  97. package/dist/shortcuts/contract/operations/generated-submit.js +35 -0
  98. package/dist/shortcuts/contract/operations/ledger-card.js +32 -2
  99. package/dist/shortcuts/contract/operations/ledger-stat.js +17 -5
  100. package/dist/shortcuts/contract/operations/ledger.js +88 -16
  101. package/dist/shortcuts/contract/operations/metrics.js +16 -3
  102. package/dist/shortcuts/contract/operations/ops-draft.js +359 -27
  103. package/dist/shortcuts/contract/operations/page.js +23 -0
  104. package/dist/shortcuts/contract/operations/quote-recognize.js +91 -13
  105. package/dist/shortcuts/contract/operations/quote-submit.js +16 -0
  106. package/dist/shortcuts/contract/operations/review-report.js +11 -3
  107. package/dist/shortcuts/contract/operations/save-recognize.js +62 -1
  108. package/dist/shortcuts/contract/operations/triage.js +18 -3
  109. package/dist/shortcuts/contract/operations/viewlink.js +17 -1
  110. package/dist/shortcuts/ehr/operations/recruit.js +255 -90
  111. package/dist/shortcuts/invoice/business-response.js +13 -0
  112. package/dist/shortcuts/invoice/calendar.js +24 -0
  113. package/dist/shortcuts/invoice/host.js +26 -15
  114. package/dist/shortcuts/invoice/index.js +2 -2
  115. package/dist/shortcuts/invoice/invoice-record.js +7 -2
  116. package/dist/shortcuts/invoice/manifest.js +179 -155
  117. package/dist/shortcuts/invoice/operations/get.js +9 -3
  118. package/dist/shortcuts/invoice/operations/issuing-red-requests.js +138 -0
  119. package/dist/shortcuts/invoice/operations/registry.js +4 -5
  120. package/dist/shortcuts/invoice/operations/reim-auto.js +40 -2
  121. package/dist/shortcuts/invoice/operations/reim-customer-projects.js +79 -0
  122. package/dist/shortcuts/invoice/operations/reim-customer.js +79 -30
  123. package/dist/shortcuts/invoice/operations/reim-relation.js +0 -146
  124. package/dist/shortcuts/invoice/operations/reim.js +2 -126
  125. package/dist/shortcuts/invoice/operations/shared.js +15 -17
  126. package/dist/shortcuts/invoice/preapproval-enrichment.js +180 -0
  127. package/dist/shortcuts/invoice/projection.js +14 -0
  128. package/dist/shortcuts/invoice/read-enrichment.js +123 -0
  129. package/dist/shortcuts/meeting/confirm-gate.js +42 -0
  130. package/dist/shortcuts/meeting/continuation.js +6 -2
  131. package/dist/shortcuts/meeting/minute-doc.js +119 -12
  132. package/dist/shortcuts/meeting/operations/attachment.js +19 -0
  133. package/dist/shortcuts/meeting/operations/compose-outcome.js +24 -2
  134. package/dist/shortcuts/meeting/operations/eb/conflict.js +2 -1
  135. package/dist/shortcuts/meeting/operations/eb/create-flow.js +162 -19
  136. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +22 -3
  137. package/dist/shortcuts/meeting/operations/group-share.js +268 -0
  138. package/dist/shortcuts/meeting/operations/minute-content.js +58 -1
  139. package/dist/shortcuts/meeting/operations/minute-export.js +295 -0
  140. package/dist/shortcuts/meeting/operations/registry.js +4 -0
  141. package/dist/shortcuts/project/operations/read.js +40 -15
  142. package/dist/shortcuts/recruit-stage/context.js +16 -81
  143. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +89 -53
  144. package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +15 -5
  145. package/dist/shortcuts/recruit-stage/operations/jd-create.js +46 -108
  146. package/dist/shortcuts/recruit-stage/operations/list.js +203 -74
  147. package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -85
  148. package/dist/shortcuts/recruit-stage/operations/search.js +113 -53
  149. package/dist/shortcuts/recruit-stage/shared.js +153 -4
  150. package/dist/shortcuts/workflow/endpoints.js +2 -0
  151. package/dist/shortcuts/workflow/operations/form.js +11 -0
  152. package/dist/shortcuts/workflow/operations/read.js +24 -5
  153. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +2 -2
  154. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +2 -0
  155. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +28 -4
  156. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.node.js +198 -0
  157. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +4 -2
  158. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subordinate.js +70 -0
  159. package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +15 -5
  160. package/docs/agent-invoice.md +28 -2
  161. package/docs/invoice.md +60 -9
  162. package/docs/project.md +1 -1
  163. package/package.json +1 -1
  164. package/skill-template/domains/yepiaotong.md +36 -7
  165. package/skills/weaver-e10-jinchengda/SKILL.md +64 -28
  166. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +4 -4
  167. package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +1 -1
  168. package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +5 -4
  169. package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +26 -2
  170. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
  171. package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +9 -8
  172. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +47 -52
  173. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
  174. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +5 -5
  175. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +1 -1
  176. package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +7 -1
  177. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +21 -12
  178. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +44 -1
  179. package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +5 -4
  180. package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +8 -0
  181. package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +33 -3
  182. package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +1 -1
  183. package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +17 -3
  184. package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +12 -12
  185. package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +18 -10
  186. package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +77 -37
  187. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +7 -0
  188. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +55 -12
  189. package/skills/weaver-e10-jinchengda/references/contract-review-todo.md +102 -0
  190. package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +1 -17
  191. package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +11 -8
  192. package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +2 -1
  193. package/skills/weaver-e10-jinchengda/references/orchestration.md +6 -6
  194. package/skills/weaver-e10-meeting/SKILL.md +203 -80
  195. package/skills/weaver-e10-meeting/references/create-quickstart.md +98 -0
  196. package/skills/weaver-e10-meeting/references/delivery-checklist.md +34 -0
  197. package/skills/weaver-e10-meeting/references/error-codes.md +44 -0
  198. package/skills/weaver-e10-meeting/references/minutes-pipeline.md +56 -3
  199. package/skills/weaver-e10-meeting/references/room-recommend.md +2 -0
  200. package/skills/weaver-e10-recruit-stage/SKILL.md +158 -146
  201. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +64 -51
  202. package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +56 -18
  203. package/skills/weaver-e10-recruit-stage/lib/recruit-attach-probe.mjs +127 -0
  204. package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +217 -30
  205. package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +39 -7
  206. package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +2 -2
  207. package/skills/weaver-e10-recruit-stage/references/position-templates.md +10 -10
  208. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +18 -18
  209. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +29 -31
  210. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +2 -2
  211. package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +4 -2
  212. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +19 -20
  213. package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -4
  214. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +3 -3
  215. package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +10 -0
  216. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +4 -3
  217. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +21 -25
  218. package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +1 -1
  219. package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +19 -7
  220. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +31 -58
  221. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +3 -1
  222. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +2 -2
  223. package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +2 -2
  224. package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +1 -1
  225. package/skills/weaver-e10-recruit-stage/templates/match-report.html +25 -15
  226. package/skills/weaver-e10-shijingran/SKILL.md +2 -2
  227. package/skills/weaver-e10-shijingran/references/operations.md +5 -2
  228. package/skills/weaver-e10-shijingran/references/source-manifest.json +41 -40
  229. package/skills/weaver-e10-workflow/SKILL.md +13 -9
  230. package/skills/weaver-e10-workflow/references/todo-dialogue.md +33 -8
  231. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +19 -14
  232. package/skills/weaver-e10-workflow/references/workflow-create.md +1 -1
  233. package/skills/weaver-e10-workflow/references/workflow-query.md +4 -2
  234. package/skills/weaver-e10-workflow/references/workflow-view.md +3 -3
  235. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +132 -42
  236. package/skills/weaver-e10-yepiaotong/SKILL.md +133 -61
  237. package/skills/weaver-e10-yepiaotong/references/invoice-add.md +3 -1
  238. package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +18 -2
  239. package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +3 -3
  240. package/skills/weaver-e10-yepiaotong/references/invoice-download.md +1 -1
  241. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +13 -1
  242. package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +3 -1
  243. package/skills/weaver-e10-yepiaotong/references/invoice-import.md +6 -4
  244. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +42 -45
  245. package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +1 -1
  246. package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +18 -2
  247. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +14 -1
  248. package/skills/weaver-e10-yepiaotong/references/invoice-red-workflow.md +96 -0
  249. package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +56 -369
  250. package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +16 -6
  251. package/skills/weaver-e10-yepiaotong/references/name-fuzzy-search.md +38 -0
  252. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +163 -646
  253. package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +90 -44
  254. package/skills/weaver-e10-yepiaotong/references/reim-eligibility-rules.md +85 -0
  255. package/skills/weaver-e10-yepiaotong/references/reim-fill-validation.md +61 -0
  256. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +91 -280
  257. package/skills/weaver-e10-yepiaotong/references/reim-preapproval-rules.md +98 -0
  258. package/skills/weaver-e10-yepiaotong/references/reim-travel-invoice-matching.md +48 -0
  259. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +234 -695
  260. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +395 -204
  261. package/skills/weaver-e10-yepiaotong/references/travel-application-fill.md +84 -0
  262. package/skills/weaver-e10-yepiaotong/references/workflow-direct-fill.md +165 -0
  263. package/templates/meeting/minute.docx +0 -0
  264. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +0 -93
  265. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +0 -774
  266. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +0 -111
  267. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +0 -360
  268. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +0 -167
@@ -5,7 +5,7 @@
5
5
  * 设计目标:让智能体「一条命令、一次就对」,不再手写复合 PowerShell、不再逐条调 CLI。
6
6
  *
7
7
  * node lib/recruit-shortlist.mjs fetch --keyword "Java开发" --limit 5 --out-dir <产物目录>
8
- * node lib/recruit-shortlist.mjs build --data <evidence.json> --out-html <报告.html>
8
+ * node lib/recruit-shortlist.mjs build --data <data.json> --out-html <报告.html> --template match-report|evidence
9
9
  *
10
10
  * 为什么这样调用是安全的(对应 §2.1 纪律,均已实测):
11
11
  * · 无 JSON 内联 —— PowerShell 会剥离参数内双引号,纯 ASCII 也失败;
@@ -33,11 +33,49 @@ import { publishReport } from "./report-attachment.mjs";
33
33
  const execFileAsync = promisify(execFile);
34
34
  const HERE = path.dirname(fileURLToPath(import.meta.url));
35
35
  const SKILL_DIR = path.resolve(HERE, "..");
36
- const TEMPLATE = path.join(SKILL_DIR, "templates", "candidate-evidence.html");
37
- const PLACEHOLDER = "__EVIDENCE_DATA_PLACEHOLDER__";
36
+ // 双模板注册表:
37
+ // match-report —— 人岗匹配评估报告(六维评分 / 横条 / 证据表 / 对比表,REPORT_DATA 契约)
38
+ // evidence —— 简历检索与人岗匹配证据报告(works/projs + 证据 + 风险,EVIDENCE_DATA 契约)
39
+ const TEMPLATE_REGISTRY = {
40
+ "match-report": { file: "match-report.html", placeholder: "__REPORT_DATA_PLACEHOLDER__", kind: "match" },
41
+ "evidence": { file: "candidate-evidence.html", placeholder: "__EVIDENCE_DATA_PLACEHOLDER__", kind: "evidence" },
42
+ };
43
+ const DEFAULT_TEMPLATE = "evidence";
44
+
45
+ /** 解析 --template:注册名 / 自定义路径;占位符以模板文件内实际 `__*_DATA_PLACEHOLDER__` 为准 */
46
+ function resolveTemplate(arg) {
47
+ const key = String(arg || DEFAULT_TEMPLATE).trim().toLowerCase();
48
+ const reg = TEMPLATE_REGISTRY[key];
49
+ if (reg) {
50
+ return { name: key, kind: reg.kind, file: path.join(SKILL_DIR, "templates", reg.file), placeholder: reg.placeholder };
51
+ }
52
+ const file = path.resolve(arg);
53
+ if (!existsSync(file)) throw new Error(`模板缺失:${arg}`);
54
+ const tpl = readFileSync(file, "utf8");
55
+ const m = tpl.match(/__[A-Z_]+_DATA_PLACEHOLDER__/);
56
+ if (!m) throw new Error("模板缺少注入占位符 __*_DATA_PLACEHOLDER__");
57
+ return { name: path.basename(file), kind: "evidence", file, placeholder: m[0] };
58
+ }
38
59
  // 合规:不得把任何具体系统地址写成默认值(客户下载后会误连他方系统)。
39
60
  // baseUrl 只来自 ① --base-url ② CLI 回包 ③ 会话 hostname;都拿不到就报错让调用方显式给。
40
61
  const DEFAULT_BASE_URL = "";
62
+
63
+ // 人才卡片壳页 ID:与 SKILL.md 固定路由表一致,**仅自用域名有效**。其他环境(101/188/客户自有域名)
64
+ // 没有这个壳页,默认不下发 cardUrl,避免在别人的域名上拼出一个 404 的自用页面 ID。
65
+ // 可用 --card-page-id 显式覆盖(传空串=关闭);此处只登记页面 ID,实际 URL 一律用会话 baseUrl 拼。
66
+ const SELF_USE_HOST = "www.e-cology.com.cn";
67
+ const TALENT_CARD_PAGE_ID = "1343164177628012608";
68
+
69
+ /** 只有自用域名才认识这个壳页;baseUrl 拿不到或不匹配时一律视为“无壳页”(容忍只写主机名的写法) */
70
+ function isSelfUseBase(baseUrl) {
71
+ try {
72
+ let s = String(baseUrl || "").trim();
73
+ if (!/^https?:\/\//i.test(s)) s = `https://${s}`;
74
+ return new URL(s).host === SELF_USE_HOST;
75
+ } catch {
76
+ return false;
77
+ }
78
+ }
41
79
  const CLI_REL = path.join("weaver-work-cli", "dist", "index.js");
42
80
 
43
81
  /* ══════════════════════ CLI 入口探测(照 recruit-write-helper.mjs 的已验证模式)══════════════════════ */
@@ -114,6 +152,17 @@ function fromSkillTree() {
114
152
  return firstExisting(out);
115
153
  }
116
154
 
155
+ /** 当前 node 运行时自带的 CLI(常是旧版):自动探测时排除,显式指定除外。
156
+ * 与 recruit-write-helper.mjs / interview-summary.mjs 同口径——三处解析逻辑各自独立,
157
+ * 改这里必须同步改另两处(已知技术债,后续抽公共模块)。 */
158
+ function isRuntimeBundledCli(p) {
159
+ if (!p) return false;
160
+ const target = path.resolve(p);
161
+ const execDir = path.dirname(process.execPath);
162
+ return [path.join(execDir, "node_modules"), path.join(execDir, "lib", "node_modules")]
163
+ .some((base) => { const b = path.resolve(base); return target === b || target.startsWith(b + path.sep); });
164
+ }
165
+
117
166
  function resolveCliEntry(explicit) {
118
167
  const candidates = [
119
168
  () => explicit || "", // ⓪ --cli 显式指定(测试/非常规部署)
@@ -122,10 +171,13 @@ function resolveCliEntry(explicit) {
122
171
  fromGlobalRoots, // ③ 全局包
123
172
  fromPathShim, // ④ PATH shim 反推
124
173
  ];
125
- for (const cand of candidates) {
174
+ for (let i = 0; i < candidates.length; i++) {
175
+ const cand = candidates[i];
126
176
  let p = "";
127
177
  try { p = cand(); } catch { continue; }
128
- if (p && existsSync(p)) return p;
178
+ // ⓪/① 是显式指定,不受“运行时自带旧包”排除规则限制
179
+ const explicitLike = i === 0 || i === 1;
180
+ if (p && existsSync(p) && (explicitLike || !isRuntimeBundledCli(p))) return p;
129
181
  }
130
182
  return null;
131
183
  }
@@ -181,7 +233,67 @@ const cut = (s, n) => {
181
233
  return t.length > n ? t.slice(0, n) + "…" : t;
182
234
  };
183
235
 
184
- /** profile 回执 → 报告契约所需的候选人骨架(AI 只需补 level/verdict/evidence/risk) */
236
+ /**
237
+ * 人才卡片完整地址——链接的唯一真源(2026-11-29)。
238
+ * 为什么放在脚本里:正文简表的链接原先靠模型手拼「/sp/ebdpage/view/{pageId}?talentId=」,
239
+ * 19 位页面 ID 与 talentId 同名同形,实测 5 人里错 2 人(pageId 段被 talentId 顶替、query 整段丢失)。
240
+ * 现由脚本一次生成成品串,Agent 只复制不拼接;页面 ID 缺失(非自用环境)时返回空串,不下发死链。
241
+ */
242
+ function buildTalentCardUrl(baseUrl, talentId, pageId) {
243
+ const id = String(talentId || "").trim();
244
+ const pid = String(pageId || "").trim();
245
+ const base = String(baseUrl || "").trim().replace(/\/+$/, "");
246
+ if (!id || !pid || !base) return "";
247
+ return `${base}/sp/ebdpage/view/${pid}?talentId=${encodeURIComponent(id)}`;
248
+ }
249
+
250
+ /**
251
+ * 给候选人数组就地补 cardUrl,返回最终有链接的条数。
252
+ * force=true(显式传了 --card-page-id,含空串)时一律覆盖,保证「传空串=强制关闭」生效;
253
+ * force=false 时已有非空值不覆盖,便于上游先算好。
254
+ */
255
+ function attachCardUrls(list, baseUrl, pageId, force = false) {
256
+ let n = 0;
257
+ for (const c of list || []) {
258
+ if (!c) continue;
259
+ if (force || !String(c.cardUrl || "").trim()) {
260
+ c.cardUrl = buildTalentCardUrl(baseUrl, c.talentId, pageId);
261
+ }
262
+ if (String(c.cardUrl || "").trim()) n += 1;
263
+ }
264
+ return n;
265
+ }
266
+
267
+ /** 成品 Markdown 整串:简表直接复制本字段,禁止 Agent 再拼页面 ID 段;无 cardUrl 时回退纯文本姓名。 */
268
+ function markdownLink(c) {
269
+ const name = String(c?.name || "").trim();
270
+ const url = String(c?.cardUrl || "").trim();
271
+ return url ? `[${name}](${url})` : name;
272
+ }
273
+
274
+ /**
275
+ * 解析人才卡片页 ID:显式传 --card-page-id 即以其为准(传空串 / 只写参数名 = 关闭链接,不再回落默认);
276
+ * 没传时,只有 baseUrl 是自用域名才启用自用壳页,其余环境一律关闭(防跨环境死链)。
277
+ * 用 hasOwnProperty 判存在,不能用 `||`——空串是 falsy,会被默认值吃掉。
278
+ */
279
+ function resolveCardPageId(a, baseUrl) {
280
+ const argv = a || {};
281
+ if (!Object.prototype.hasOwnProperty.call(argv, "card-page-id")) {
282
+ return isSelfUseBase(baseUrl) ? TALENT_CARD_PAGE_ID : "";
283
+ }
284
+ const v = argv["card-page-id"];
285
+ if (v === true || v == null) return "";
286
+ const s = String(v).trim();
287
+ // PowerShell 会把空串参数吞掉,额外支持 off/none/false 作为「强制关闭」的等价写法
288
+ return ["", "off", "none", "false", "0"].includes(s.toLowerCase()) ? "" : s;
289
+ }
290
+
291
+ /** 是否显式传了 --card-page-id(含空串/只写参数名):显式即强制覆盖已有链接 */
292
+ function hasCardPageIdArg(a) {
293
+ return Object.prototype.hasOwnProperty.call(a || {}, "card-page-id");
294
+ }
295
+
296
+ /** profile 回执 → 报告契约候选人骨架;evidence 契约补 level/verdict/evidence/risk,match 契约补 scores/dimEvidence/overall */
185
297
  function toCandidate(prof, searchRow) {
186
298
  const basic = prof?.basic || {};
187
299
  const rawMain = prof?.rawMain || {};
@@ -218,11 +330,15 @@ function toCandidate(prof, searchRow) {
218
330
  },
219
331
  works,
220
332
  projs,
221
- // ↓ 这四个字段由 AI 依据原文填写,脚本不臆造
333
+ // ↓ evidence 契约字段:由 AI 依据原文填写,脚本不臆造
222
334
  level: "",
223
335
  verdict: "",
224
336
  evidence: "",
225
337
  risk: "",
338
+ // ↓ match-report 契约字段:六维分 / 六维证据 / 综合总分,出匹配评估报告时由 AI 填写
339
+ scores: {},
340
+ dimEvidence: {},
341
+ overall: null,
226
342
  };
227
343
  }
228
344
 
@@ -274,6 +390,10 @@ function compactOne(c, cfg) {
274
390
  else if (meta.selfDesc) meta.selfDesc = cut(meta.selfDesc, cfg.selfDesc);
275
391
  const out = {
276
392
  talentId: c.talentId,
393
+ // 🔴 成品链接:正文简表只能逐字复制该字段,禁止自行拼 /sp/ebdpage/view/{talentId}
394
+ cardUrl: c.cardUrl || "",
395
+ // 🔴 成品 Markdown 整串:简表姓名链接直接复制,不要再拆页 ID 与 talentId 拼接
396
+ linkMarkdown: markdownLink(c),
277
397
  name: c.name, degree: c.degree, college: c.college, pos: c.pos, industry: c.industry,
278
398
  meta,
279
399
  works: c.works.slice(0, cfg.works).map((w) => ({ co: w.co, pos: w.pos, range: w.range, desc: cut(w.desc, cfg.desc) })),
@@ -293,6 +413,9 @@ function briefForStdout(c) {
293
413
  const m = c._meta || {};
294
414
  return {
295
415
  talentId: c.talentId,
416
+ // 🔴 成品链接:正文简表只能逐字复制该字段
417
+ cardUrl: c.cardUrl || "",
418
+ linkMarkdown: markdownLink(c),
296
419
  name: c.name,
297
420
  degree: c.degree,
298
421
  college: c.college,
@@ -380,6 +503,9 @@ async function cmdFetchByPosition(a) {
380
503
  return 1;
381
504
  }
382
505
  const position = a.position || a["position-name"] || positionId;
506
+ // 🔴 链接在此一次性生成(draft / stdout / HTML 三处同源),Agent 不再手拼
507
+ const cardPageId = resolveCardPageId(a, baseUrl);
508
+ const cardUrlCount = attachCardUrls(candidates, baseUrl, cardPageId, hasCardPageIdArg(a));
383
509
  const draft = {
384
510
  position,
385
511
  baseUrl,
@@ -408,8 +534,9 @@ async function cmdFetchByPosition(a) {
408
534
  baseUrl,
409
535
  timing,
410
536
  ...(errors.length ? { errors } : {}),
537
+ ...(cardUrlCount < candidates.length ? { cardUrlMissing: candidates.length - cardUrlCount, cardUrlHint: "部分候选人未生成卡片链接:talentId 为空,或当前不是自用域名(非自用属正常,正文给纯文本姓名即可,不要填自用壳页 ID)" } : {}),
411
538
  candidates: brief ? candidates.map(briefForStdout) : candidates,
412
- nextStep: "为每人补 level(high|mid|low)/verdict/evidence/risk 后执行 build 生成报告",
539
+ nextStep: "出匹配评估报告(--template match-report):补 scores{六维}/dimEvidence{六维证据}/overall;出检索证据报告(--template evidence):补 level/verdict/evidence/risk;随后执行 build",
413
540
  };
414
541
  console.log(JSON.stringify(payload));
415
542
  return 0;
@@ -483,6 +610,7 @@ async function cmdFetch(a) {
483
610
  name: p.pj_name || "—", range: range(p.pj_date_0, p.pj_date_1), desc: p.pj_introduction || "",
484
611
  })),
485
612
  level: "", verdict: "", evidence: "", risk: "",
613
+ scores: {}, dimEvidence: {}, overall: null,
486
614
  });
487
615
 
488
616
  try {
@@ -547,6 +675,7 @@ async function cmdFetch(a) {
547
675
  works: [],
548
676
  projs: [],
549
677
  level: "", verdict: "", evidence: "", risk: "",
678
+ scores: {}, dimEvidence: {}, overall: null,
550
679
  _precision: true,
551
680
  _needProfile: true,
552
681
  });
@@ -628,6 +757,9 @@ async function cmdFetch(a) {
628
757
  console.log(JSON.stringify({ ok: false, reason: "no_base_url", hint: "无法确定系统地址:请显式传 --base-url <你的E10地址> 后重试" }));
629
758
  return 1;
630
759
  }
760
+ // 🔴 链接在此一次性生成(draft / stdout / HTML 三处同源),Agent 不再手拼
761
+ const cardPageId = resolveCardPageId(a, baseUrl);
762
+ const cardUrlCount = attachCardUrls(candidates, baseUrl, cardPageId, hasCardPageIdArg(a));
631
763
  const draft = {
632
764
  position: a.position || keyword,
633
765
  baseUrl,
@@ -658,6 +790,7 @@ async function cmdFetch(a) {
658
790
  shown: candidates.length,
659
791
  draftPath, // 完整档案(含全文描述),需要细节时读这里
660
792
  baseUrl,
793
+ ...(cardUrlCount < candidates.length ? { cardUrlMissing: candidates.length - cardUrlCount, cardUrlHint: "部分候选人未生成卡片链接:talentId 为空,或当前不是自用域名(非自用属正常,正文给纯文本姓名即可,不要填自用壳页 ID)" } : {}),
661
794
  timing,
662
795
  ...(precision ? { precision, precisionHit } : {}),
663
796
  ...(needProfileCount ? { needProfile: needProfileCount, needProfileHint: "以下候选人未补档案(--no-fill),仅有姓名/岗位/渠道,评分依据不足,需在结论中标注「档案待补」" } : {}),
@@ -679,8 +812,8 @@ async function cmdFetch(a) {
679
812
  } : {}),
680
813
  },
681
814
  nextStep: brief
682
- ? `需要完整素材时读 ${draftPath} 的 candidates 数组(含 works/projs 全文);为每人补 level(high|mid|low)/verdict/evidence/risk 后执行 build 生成报告`
683
- : "为每人补 level(high|mid|low)/verdict/evidence/risk 四个字段(证据只引 works/projs 原文,缺字段写「—」,不补造),写入 evidence.json 后执行 build 子命令生成报告",
815
+ ? `需要完整素材时读 ${draftPath} 的 candidates 数组(含 works/projs 全文);匹配评估报告补 scores/dimEvidence/overall(--template match-report),检索证据报告补 level/verdict/evidence/risk(--template evidence),随后执行 build`
816
+ : "匹配评估报告(--template match-report):每人补 scores{学历/经验/技能/行业/方向/稳定 六维0-100}、dimEvidence{六维证据}、overall 总分;检索证据报告(--template evidence):补 level(high|mid|low)/verdict/evidence/risk(证据只引 works/projs 原文,缺字段写「—」,不补造);写入 data.json 后执行 build",
684
817
  });
685
818
  let payload;
686
819
  if (brief) {
@@ -718,11 +851,13 @@ async function cmdFetch(a) {
718
851
 
719
852
  /* ══════════════════════ build:注入模板 + 内建自校验 ══════════════════════ */
720
853
 
721
- function mergeMissingFromDraft(data, dataPath) {
854
+ function mergeMissingFromDraft(data, dataPath, kind) {
722
855
  try {
723
856
  const draftPath = path.join(path.dirname(dataPath), "evidence_draft.json");
724
857
  if (!existsSync(draftPath)) return data;
725
858
  const draft = JSON.parse(readFileSync(draftPath, "utf8").replace(/^\uFEFF/, ""));
859
+ // AI 手写 evidence.json 时常漏 baseUrl,缺了就无法补 cardUrl;用 draft 的兜底
860
+ if (!String(data.baseUrl || "").trim() && draft.baseUrl) data.baseUrl = draft.baseUrl;
726
861
  const byId = new Map((draft.candidates || []).map((c) => [String(c.talentId || ""), c]));
727
862
  for (const c of data.candidates || []) {
728
863
  const src = byId.get(String(c.talentId || ""));
@@ -730,12 +865,26 @@ function mergeMissingFromDraft(data, dataPath) {
730
865
  for (const k of ["works", "projs"]) {
731
866
  if (!Array.isArray(c[k]) || c[k].length === 0) c[k] = src[k];
732
867
  }
733
- for (const k of ["degree", "college", "pos", "industry", "_meta"]) {
868
+ for (const k of ["degree", "college", "pos", "industry", "_meta", "cardUrl"]) {
734
869
  const cur = c[k];
735
870
  if ((Array.isArray(cur) && cur.length === 0) || (!Array.isArray(cur) && !String(cur || "").trim())) {
736
871
  if (src[k] !== undefined) c[k] = src[k];
737
872
  }
738
873
  }
874
+ // match-report 模板读 basic{}/latestWork{};draft 是顶层扁平字段,缺则按 talentId 回填
875
+ if (kind === "match") {
876
+ const basic = c.basic && typeof c.basic === "object" ? c.basic : {};
877
+ if (!String(basic.degree || "").trim() && src.degree) basic.degree = src.degree;
878
+ if (!String(basic.college || "").trim() && src.college) basic.college = src.college;
879
+ if (!String(basic.current_position || "").trim() && src.pos) basic.current_position = src.pos;
880
+ if (!String(basic.current_industry || "").trim() && src.industry) basic.current_industry = src.industry;
881
+ c.basic = basic;
882
+ const lw = c.latestWork && typeof c.latestWork === "object" ? c.latestWork : {};
883
+ const w0 = (Array.isArray(src.works) ? src.works[0] : null);
884
+ if (!String(lw.co_name || "").trim() && w0 && w0.co) lw.co_name = w0.co;
885
+ if (!String(lw.work_position || "").trim() && w0 && w0.pos) lw.work_position = w0.pos;
886
+ if (Object.keys(lw).length) c.latestWork = lw; else delete c.latestWork;
887
+ }
739
888
  }
740
889
  } catch { /* 合并失败不影响原有数据 */ }
741
890
  return data;
@@ -745,24 +894,39 @@ async function cmdBuild(a) {
745
894
  const t0 = Date.now();
746
895
  if (!a.data) throw new Error("--data 必填");
747
896
  if (!a["out-html"]) throw new Error("--out-html 必填");
748
- const tplPath = a.template || TEMPLATE;
749
- if (!existsSync(tplPath)) throw new Error(`模板缺失:${tplPath}`);
750
897
 
751
898
  const dataRaw = (await readFile(a.data, "utf8")).replace(/^\uFEFF/, "");
752
899
  let data;
753
900
  try { data = JSON.parse(dataRaw); }
754
- catch (e) { throw new Error(`--data 不是合法 JSON:${String(e.message).slice(0, 150)}`); }
901
+ catch (e) { throw new Error(`--data 不是合法 JSON:${String(e.message).slice(0, 150)}。常见原因:字符串内 ASCII 双引号未转义,或复制文本带入中文弯引号(“”);请改用转义或改写为直引号`); }
902
+
903
+ // 模板选择:显式 --template 优先;漏传时按数据形状兜底——
904
+ // 任一候选人带总分 overall 或 ≥3 个六维分数 → match-report,否则 evidence。
905
+ // 防止智能体漏传参数把人岗评估落成检索证据页(2026-11-29 修)。
906
+ const cs0 = data.candidates || [];
907
+ const scoreDimsOf = (c) => Object.values(c.scores || {}).filter((v) => Number.isFinite(Number(v))).length;
908
+ const matchish = cs0.some((c) => Number.isFinite(Number(c.overall)) || scoreDimsOf(c) >= 3);
909
+ const tpl = resolveTemplate(a.template || (matchish ? "match-report" : DEFAULT_TEMPLATE));
910
+ if (!existsSync(tpl.file)) throw new Error(`模板缺失:${tpl.file}`);
755
911
 
756
912
  // AI 补评估字段时容易只保留 verdict/evidence、把 works/projs 丢掉;
757
913
  // 同目录若有 fetch 落盘的 evidence_draft.json,按 talentId 自动补回原始档案片段,避免报告里「工作经历/项目经验 —」。
758
- data = mergeMissingFromDraft(data, path.resolve(a.data));
914
+ data = mergeMissingFromDraft(data, path.resolve(a.data), tpl.kind);
759
915
 
760
- const tpl = await readFile(tplPath, "utf8");
761
- if (!tpl.includes(PLACEHOLDER)) throw new Error("模板缺少注入占位符 __EVIDENCE_DATA_PLACEHOLDER__");
916
+ // 🔴 链接兜底:evidence.json 由 AI 手写,未必带 cardUrl;这里按 data.baseUrl 重算,
917
+ // 保证正文简表与 HTML 报告用的是同一串(模板优先读 c.cardUrl)。
918
+ const buildCardPageId = resolveCardPageId(a, data.baseUrl);
919
+ // data.baseUrl 存在 → 以本次环境为准重算(能纠正 AI 手写/旧数据里的错链接;非自用或显式关闭时清空);
920
+ // baseUrl 缺失才保留候选人自带 cardUrl(通常是 fetch 原样回填的成品串)。
921
+ const buildForce = Boolean(String(data.baseUrl || "").trim());
922
+ const buildCardUrlCount = attachCardUrls(data.candidates || [], data.baseUrl, buildCardPageId, buildForce);
923
+
924
+ const tplText = await readFile(tpl.file, "utf8");
925
+ if (!tplText.includes(tpl.placeholder)) throw new Error(`模板缺少注入占位符 ${tpl.placeholder}`);
762
926
 
763
927
  // 防 </script> 提前闭合:JSON 里的 < 统一转义
764
928
  const payload = JSON.stringify(data).replace(/</g, "\\u003c");
765
- const html = tpl.replace(PLACEHOLDER, payload);
929
+ const html = tplText.replace(tpl.placeholder, payload);
766
930
  const outHtml = path.resolve(a["out-html"]);
767
931
  await mkdir(path.dirname(outHtml), { recursive: true });
768
932
  await writeFile(outHtml, html, "utf8");
@@ -783,40 +947,61 @@ async function cmdBuild(a) {
783
947
  try { new Function(s); } catch (e) { syntaxOk = false; syntaxErr = String(e.message).slice(0, 160); }
784
948
  }
785
949
  const cs = data.candidates || [];
950
+ const isMatch = tpl.kind === "match";
951
+ const numOverall = cs.filter((c) => Number.isFinite(Number(c.overall))).length;
952
+ const scoreDims = (c) => Object.values(c.scores || {}).filter((v) => Number.isFinite(Number(v))).length;
953
+ const withScores = cs.filter((c) => scoreDims(c) >= 3).length;
954
+ const dimEv = (c) => {
955
+ const e = c.dimEvidence && typeof c.dimEvidence === "object" ? c.dimEvidence
956
+ : (c.evidence && typeof c.evidence === "object" ? c.evidence : {});
957
+ return Object.values(e).filter((v) => String(v || "").trim()).length;
958
+ };
959
+ const withDimEvidence = cs.filter((c) => dimEv(c) >= 3).length;
786
960
  const checks = {
787
- placeholderReplaced: !html.includes(PLACEHOLDER),
961
+ template: tpl.name,
962
+ placeholderReplaced: !html.includes(tpl.placeholder),
788
963
  scriptBlocks: scripts.length,
789
964
  syntaxOk,
790
965
  ...(syntaxErr ? { syntaxErr } : {}),
791
966
  candidateCount: cs.length,
792
967
  allHaveTalentId: cs.length > 0 && cs.every((c) => !!c.talentId),
968
+ allHaveCardUrl: cs.length > 0 && buildCardUrlCount === cs.length,
793
969
  allHaveName: cs.length > 0 && cs.every((c) => !!c.name),
794
- // AI 评估字段是否已填(未填则报告里结论为空,必须提示)
970
+ // evidence 契约字段(candidate-evidence.html)
795
971
  withVerdict: cs.filter((c) => String(c.verdict || "").trim()).length,
796
- withEvidence: cs.filter((c) => String(c.evidence || "").trim()).length,
972
+ withEvidence: cs.filter((c) => typeof c.evidence === "string" && String(c.evidence || "").trim()).length,
797
973
  withLevel: cs.filter((c) => ["high", "mid", "low"].includes(String(c.level || ""))).length,
798
974
  withWorks: cs.filter((c) => Array.isArray(c.works) && c.works.length > 0).length,
799
975
  withProjs: cs.filter((c) => Array.isArray(c.projs) && c.projs.length > 0).length,
976
+ // match 契约字段(match-report.html)
977
+ ...(isMatch ? { withOverall: numOverall, withScores, withDimEvidence } : {}),
800
978
  bytes,
801
979
  };
802
980
  checks.allGreen = Boolean(
803
981
  checks.placeholderReplaced && checks.syntaxOk && checks.candidateCount > 0
804
982
  && checks.allHaveTalentId && checks.allHaveName
805
- && checks.withVerdict === cs.length && checks.withEvidence === cs.length && checks.withLevel === cs.length
983
+ && (isMatch
984
+ ? checks.withOverall === cs.length && checks.withScores === cs.length
985
+ : checks.withVerdict === cs.length && checks.withEvidence === cs.length && checks.withLevel === cs.length)
806
986
  );
807
987
 
988
+ const missingHint = isMatch
989
+ ? "checks.allGreen=false:请为每位候选人补 overall(0-100 总分)、scores{学历/经验/技能/行业/方向/稳定 六维 0-100}、dimEvidence{六维证据} 后重新 build;语法或占位符异常则检查 --data 与模板"
990
+ : "checks.allGreen=false:请补齐每个候选人的 level/verdict/evidence/risk 后重新 build;语法或占位符异常则检查 --data 与模板";
991
+
808
992
  console.log(JSON.stringify({
809
993
  ok: true,
810
994
  htmlPath: outHtml,
811
995
  ...(reportError ? { reportError } : {}),
812
996
  checks,
813
997
  timing: { buildMs: Date.now() - t0 },
814
- ...(checks.allGreen ? {} : {
815
- hint: "checks.allGreen=false:请补齐每个候选人的 level/verdict/evidence/risk 后重新 build;语法或占位符异常则检查 --data 与模板",
816
- }),
817
- ...((checks.withWorks === 0 || checks.withProjs === 0) ? {
998
+ ...(checks.allGreen ? {} : { hint: missingHint }),
999
+ ...((!isMatch && (checks.withWorks === 0 || checks.withProjs === 0)) ? {
818
1000
  profileHint: "有候选人的 work/proj 为空:先确认 evidence_draft.json 是否在同目录,或把 fetch 的 works/projs 原样保留到 --data;报告里的「—」只应出现在档案确实没有该段经历时",
819
1001
  } : {}),
1002
+ ...(!checks.allHaveCardUrl ? {
1003
+ cardUrlHint: "有候选人缺卡片链接:data.baseUrl 为空,或当前不是自用域名(非自用属正常,正文与报告给纯文本姓名,不要手拼链接;也不要拿自用壳页 ID 强行覆盖)",
1004
+ } : {}),
820
1005
  }));
821
1006
  return checks.allGreen ? 0 : 0; // 校验未全绿不算执行失败,由 checks 表达
822
1007
  }
@@ -839,13 +1024,15 @@ function parseArgv(argv) {
839
1024
 
840
1025
  const USAGE = [
841
1026
  "用法:",
842
- " node lib/recruit-shortlist.mjs fetch --keyword <关键词> [--precision <精确探针词>] [--limit 5] [--concurrency 10] [--brief] [--no-fill] [--max-output 6144] [--out-dir <目录>] [--position <岗位名>] [--base-url <url>] [--cli <dist/index.js>]",
843
- " node lib/recruit-shortlist.mjs fetch --position-id <职位id> [--limit 5] [--concurrency 10] [--brief] [--out-dir <目录>] [--position <岗位名>] [--base-url <url>] [--cli <dist/index.js>]",
1027
+ " node lib/recruit-shortlist.mjs fetch --keyword <关键词> [--precision <精确探针词>] [--limit 5] [--concurrency 10] [--brief] [--no-fill] [--max-output 6144] [--out-dir <目录>] [--position <岗位名>] [--base-url <url>] [--card-page-id <人才卡片页id>] [--cli <dist/index.js>]",
1028
+ " node lib/recruit-shortlist.mjs fetch --position-id <职位id> [--limit 5] [--concurrency 10] [--brief] [--out-dir <目录>] [--position <岗位名>] [--base-url <url>] [--card-page-id <人才卡片页id>] [--cli <dist/index.js>]",
844
1029
  " --precision 与 --keyword 并发发出,捞回只在合成词下命中的高精度人选(推荐传「行业+职能」)",
845
1030
  " --brief stdout 只回摘要(姓名/岗位/学历/年限/公司岗位列表),完整素材见 draft 文件",
846
1031
  " --no-fill 精确探针命中的人不补拉档案(省约 1.2 秒),改用检索行骨架并标 needProfile;评分依据会缺失",
847
1032
  " --position-id 按职位取投递候选人前 N 条(不翻全页),再并发拉档案;与 --keyword 二选一",
848
- " node lib/recruit-shortlist.mjs build --data <evidence.json> --out-html <报告.html> [--template <html>]",
1033
+ " --card-page-id 人才卡片壳页 ID:默认仅自用域名(www.e-cology.com.cn)自动用 1343164177628012608;其他环境默认关闭链接(不猜、不手拼),确需指定时显式传;强制关闭用 --card-page-id off(PowerShell 会吞空串参数,推荐此写法)",
1034
+ " node lib/recruit-shortlist.mjs build --data <data.json> --out-html <报告.html> --template match-report|evidence [--card-page-id <人才卡片页id>]",
1035
+ " --template match-report=人岗匹配评估报告(六维评分/横条/证据表/对比表);evidence=检索证据报告(经历/项目/证据/风险);缺省按数据形状自动判定(有 overall/scores → match-report,否则 evidence)",
849
1036
  ].join("\n");
850
1037
 
851
1038
  const argv = parseArgv(process.argv.slice(2));
@@ -24,7 +24,7 @@
24
24
 
25
25
  import { execFileSync } from 'node:child_process';
26
26
  import { writeFileSync, readFileSync, existsSync, unlinkSync, mkdirSync, rmSync, renameSync, readdirSync } from 'node:fs';
27
- import { join, dirname, resolve as resolvePath } from 'node:path';
27
+ import { join, dirname, resolve as resolvePath, sep } from 'node:path';
28
28
  import { fileURLToPath } from 'node:url';
29
29
  import { homedir } from 'node:os';
30
30
 
@@ -45,6 +45,15 @@ function firstExisting(paths) {
45
45
  return '';
46
46
  }
47
47
 
48
+ /** 当前 node 运行时自带的 CLI:常是旧版,自动探测时必须排除(显式 WEAVER_WORK_CLI_ENTRY 除外)。 */
49
+ function isRuntimeBundledCli(p) {
50
+ if (!p) return false;
51
+ const target = resolvePath(p);
52
+ const execDir = dirname(process.execPath);
53
+ return [join(execDir, 'node_modules'), join(execDir, 'lib', 'node_modules')]
54
+ .some((base) => { const b = resolvePath(base); return target === b || target.startsWith(b + sep); });
55
+ }
56
+
48
57
  /** ① 从 PATH 里的 npm shim 反推全局包位置(最通用:能跑 CLI 就说明 PATH 里有它)。 */
49
58
  function fromPathShim() {
50
59
  const pathEnv = process.env.PATH || process.env.Path || '';
@@ -116,9 +125,9 @@ const CLI_ENTRY_CANDIDATES = [
116
125
  const localAppData = process.env.LOCALAPPDATA || '';
117
126
  return localAppData ? join(localAppData, 'xiaoeUserData', 'node_js_exe', 'node_modules', CLI_REL) : '';
118
127
  },
119
- // ③ 版本管理器(nvm / nvm-windows / Volta / fnm)+ 当前 node 自身目录
120
- fromVersionManagers,
121
- // ④ npm 全局根常见固定位置
128
+ // ③ npm 全局根(优先于版本管理器/当前 node 自带包)
129
+ // 🔴 2026-11-30 实测:WorkBuddy 运行时自带 node 的 node_modules 里有旧版 weaver-work-cli,
130
+ // 先命中它会让刚发版的 CLI 修复「改了没生效」。npm 全局根(通常是 Junction 到源码仓)必须更早。
122
131
  () => {
123
132
  const prefix = process.env.npm_config_prefix || process.env.PREFIX || '';
124
133
  const roots = prefix ? [join(prefix, 'lib', 'node_modules'), join(prefix, 'node_modules')] : [];
@@ -129,6 +138,8 @@ const CLI_ENTRY_CANDIDATES = [
129
138
  );
130
139
  return firstExisting(roots.map((r) => join(r, CLI_REL)));
131
140
  },
141
+ // ④ 版本管理器(nvm / nvm-windows / Volta / fnm)+ 当前 node 自身目录
142
+ fromVersionManagers,
132
143
  // ⑤ 从本脚本位置向上找 node_modules(技能被装进某个 node 工程时)
133
144
  () => {
134
145
  let dir = dirname(fileURLToPath(import.meta.url));
@@ -145,13 +156,27 @@ function resolveCliEntry() {
145
156
  for (const cand of CLI_ENTRY_CANDIDATES) {
146
157
  let p = '';
147
158
  try { p = cand(); } catch { continue; }
148
- if (p && existsSync(p)) return resolvePath(p);
159
+ // 排除 WorkBuddy/node 运行时自带的旧 CLI;显式指定的入口不受此限制
160
+ const explicit = process.env.WEAVER_WORK_CLI_ENTRY || '';
161
+ if (p && existsSync(p) && (p === explicit || !isRuntimeBundledCli(p))) return resolvePath(p);
149
162
  }
150
163
  return null;
151
164
  }
152
165
 
153
166
  const CLI_ENTRY = resolveCliEntry();
154
167
 
168
+ // 🔴 2026-11-30 用户拍板:安排面试未指定方式时,技能层默认 AI 面试。
169
+ // 只在本 helper 进入 CLI 前补值,不改 CLI 基座自身的默认(CLI 默认仍是现场面试)。
170
+ const SKILL_DEFAULT_INTERVIEW_TYPE = 'AI面试';
171
+ function withSkillDefaults(operation, params) {
172
+ if (operation === 'recruit-stage.interview.arrange'
173
+ && params && typeof params === 'object'
174
+ && !String(params.type || '').trim()) {
175
+ params.type = SKILL_DEFAULT_INTERVIEW_TYPE;
176
+ }
177
+ return params;
178
+ }
179
+
155
180
  // ── 状态目录与文件(按 operation 隔离,避免并发/交错覆盖)──────────────────────
156
181
  function stateDir() {
157
182
  const base = process.env.WEAVER_WORK_CLI_HOME || process.env.WORK_CLI_HOME || join(homedir(), '.weaver-work-cli');
@@ -329,7 +354,8 @@ function doPrepare(operation, paramsPath, inlineParams) {
329
354
  }
330
355
  }
331
356
 
332
- const result = runCli(operation + '.prepare', params);
357
+ const normalizedParams = withSkillDefaults(operation, params);
358
+ const result = runCli(operation + '.prepare', normalizedParams);
333
359
  if (!result?.ok) {
334
360
  // prepare 失败:不留状态文件,避免 apply 用到半截状态
335
361
  emit(result, 1);
@@ -346,7 +372,7 @@ function doPrepare(operation, paramsPath, inlineParams) {
346
372
  ensureDir(dir);
347
373
  const state = {
348
374
  operation,
349
- params,
375
+ params: normalizedParams,
350
376
  continuation,
351
377
  fingerprint: result?.meta?.fingerprint || null,
352
378
  savedAt: new Date().toISOString(),
@@ -478,6 +504,12 @@ function buildParamsFromArgv(argv) {
478
504
  const mode = process.argv[2];
479
505
  const operation = process.argv[3];
480
506
 
507
+ if (mode === '--print-paths') {
508
+ const skillDir = resolvePath(dirname(fileURLToPath(import.meta.url)), '..');
509
+ console.log(JSON.stringify({ skillDir, cliEntry: CLI_ENTRY, templates: join(skillDir, 'templates'), stateDir: stateDir() }, null, 2));
510
+ process.exit(0);
511
+ }
512
+
481
513
  if (mode === 'prepare') {
482
514
  if (!operation) emit(USAGE, 1);
483
515
  else if (!ALLOWED_OPERATION_RE.test(operation)) {
@@ -3,8 +3,8 @@
3
3
  * recruit-xiaoe-file.mjs —— 小E 附件桥(实验性):小E fileId → 下载字节 → 本地文件
4
4
  *
5
5
  * 背景:用户在小E 对话里上传简历后,平台侧只给 fileId(/rpa/api/upload 服务族),
6
- * 而 recruit-resume-import.mjs 只认本地路径或 E10 fileid。本脚本把小E fileId 落成本地文件,
7
- * 之后即可 `recruit-resume-import.mjs --resume-file <本脚本输出的本地路径>` 走既有导入链。
6
+ * 而建档链路(`lib/recruit-write-helper.mjs` 的 `recruit-stage.resume.import` prepare)只认本地路径或 E10 fileid。
7
+ * 本脚本把小E fileId 落成本地文件,之后把该路径作为简历原件传给 helper,走既有导入链。
8
8
  *
9
9
  * 下载契约(与 ecology_xiaoe src/api/file/index.ts fetchFileBlobById 逐条对齐,2026-10-22 实读):
10
10
  * GET {xiaoeDomain}/rpa/api/upload/downLoad?id=<fileId>
@@ -19,8 +19,8 @@
19
19
  | 薪酬月数 `number_of_pay_months` | 12 | — |
20
20
  | 招聘负责人 / 用人经理 | 当前登录人 | 由脚本自动填充,模板不指定 |
21
21
 
22
- > **薪资口径(2026-11-29 二次修正)**:`salary_min` / `salary_max` 的**单位就是「千」**,写 `15` 就是 15K、写 `30` 就是 30K,**CLI 直接落库、不再除以 1000**。CLI 默认值已改为 `salary_min=15` / `salary_max=30`。历史错误做法「传 15000 让 CLI 除以 1000」已废弃——那样会落成 0.015,页面显示 0.02。用户指定薪资时按千传值、以用户为准。
23
- > 只有**用户明确给出薪资数字**时才传 `sets`(单位**千/月**,如 15K 直接写 `15`,**不要再写 15000**)。
22
+ > **薪资口径(2026-11-30 三修,实测 CLI 0.1.75)**:`salary_min` / `salary_max` 的表单单位是**千元**(写 15 = 15K)。`sets` 两种写法都认:写 `15/30`(<1000,小值按千元写入)或写 `15000/30000`(≥1000,CLI 自动 ÷1000),结果同为 15K/30K;**不要写 0.015,也不要自行再乘/除**。CLI 默认值为 `salary_min=15` / `salary_max=30`。
23
+ > 只有**用户明确给出薪资数字**时才传 `sets`(本表统一千/月,如 15K 写 `15`;写 `15000` 也等价,CLI 会自动折算)。
24
24
  > 用户问「建议开多少」时才查 §1.1 给参考区间,且必须经用户确认后才传;用户没提就别提、别猜。
25
25
 
26
26
  > ⚠️ **枚举类字段必须与环境字典对齐,否则会被静默跳过**(2026-11-05 实测:`work_years=1年以上` 字典无此选项 → 进 `setSkipped`):
@@ -43,13 +43,13 @@
43
43
  |---|---|---|---|---|
44
44
  | Java / 后端开发 | 1-3 年 | 12 | 18 | 初级 |
45
45
  | Java / 后端开发 | 3-5 年 | 15 | 30 | 中级(**默认档**)|
46
- | Java / 后端开发 | 5 年以上 | 30000 | 45000 | 高级 / 技术负责人 |
47
- | 实施工程师 | 1-3 年 | 8000 | 13000 | 初级 |
48
- | 实施工程师 | 3-5 年 | 13000 | 20000 | 中级(**默认档**)|
49
- | 实施工程师 | 5 年以上 | 20000 | 30000 | 高级 / 项目负责人 |
50
- | 项目经理 | 3-5 年 | 15000 | 22000 | 中级 |
51
- | 项目经理 | 5 年以上 | 22000 | 35000 | 高级(**默认档**)|
52
- | 销售 / 客户经理 | 不限 | 8000 | 15000 | **底薪**,提成另议;摘要里必须注明「仅底薪」 |
46
+ | Java / 后端开发 | 5 年以上 | 30 | 45 | 高级 / 技术负责人 |
47
+ | 实施工程师 | 1-3 年 | 8 | 13 | 初级 |
48
+ | 实施工程师 | 3-5 年 | 13 | 20 | 中级(**默认档**)|
49
+ | 实施工程师 | 5 年以上 | 20 | 30 | 高级 / 项目负责人 |
50
+ | 项目经理 | 3-5 年 | 15 | 22 | 中级 |
51
+ | 项目经理 | 5 年以上 | 22 | 35 | 高级(**默认档**)|
52
+ | 销售 / 客户经理 | 不限 | 8 | 15 | **底薪**,提成另议;摘要里必须注明「仅底薪」 |
53
53
  | 实习生 | 在校 | 100 | 200 | **元/天**,`salary_type` 取「日薪」,摘要注明「日薪」 |
54
54
 
55
55
  > ⚠️ **岗位归属不确定时不要自己猜薪资**——CLI 默认 15/30 已经兜底;只有用户明确给值、或明确问「开多少合适」时才用本表,给建议档要说明依据。
@@ -225,7 +225,7 @@
225
225
  | 名称重复度 | 100 条中仅 60 个不同名称;"舟山民宿管家" 30 条、"蓝堡舟山普陀区蓝堡" 35 条 |
226
226
 
227
227
  > ⚠️ **该环境存在大量重复与疑似测试数据**。这正是取消「运行时拉取同类职位作参考」的直接原因——照此取默认值会把重复地点/名称带进新职位。模板库采用人工归纳口径,不依赖该数据分布。
228
- > **单位说明(2026-11-06)**:本表数值单位是「元/月」,按此原样传给 `sets`;CLI 会按职位表单的**千元**单位自动 ÷1000 提交(例:传 18000 → 存 18 = 18K)。不要自行换算,也不要把继承来的历史值再除一次。
228
+ > **单位说明(2026-11-30 三修)**:本表统一「千/月」(实习日薪行为「元/天」,`salary_type=日薪`);按表值原样传给 `sets`。若传 18000/30000 这类 ≥1000 的「元/月」值,CLI 会自动 ÷1000(18000→18、30000→30),与写 18/30 等价;**不要自行乘除**,也不要把继承来的历史值再除一次。
229
229
 
230
230
 
231
231