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
@@ -1,6 +1,6 @@
1
1
  import { rsSuccess, schemaOf } from './types.js';
2
2
  import { rsFail } from '../errors.js';
3
- import { resolveCurrentUser, randHex32 } from '../shared.js';
3
+ import { resolveCurrentUser, randHex32, fetchDatasetRows } from '../shared.js';
4
4
  const TYPES = {
5
5
  demand: { listKey: 'demand', formType: 'demand_manage', title: '招聘需求', menuNames: ['招聘需求', '需求'] },
6
6
  position: { listKey: 'position', formType: 'position_manage', title: '招聘职位', menuNames: ['招聘职位', '职位列表', '职位管理'] },
@@ -192,12 +192,29 @@ async function runList(env, args, feedbackTodoMode) {
192
192
  const listParam = (feedbackTodoMode && !serverFilterReady ? findByMenu(FEEDBACK_TODO_MENU_NAMES) : null)
193
193
  || cache.lists[t.listKey]
194
194
  || findByMenu(t.menuNames);
195
- if (!listParam?.listId) {
196
- throw rsFail('当前环境未启用「' + t.title + '」功能(未找到对应菜单/列表参数,按能力探测拦截)');
195
+ // 菜单/listId 只作快路径;菜单缺失时直接按表单 objId 读表,不再把菜单当能力闸门。
196
+ let directRows = null;
197
+ let directTotal = null;
198
+ let directTruncated = false;
199
+ let listId = '';
200
+ let cusMenuId = '';
201
+ let menuName = t.title;
202
+ if (listParam?.listId) {
203
+ listId = String(listParam.listId);
204
+ cusMenuId = String(listParam.cusMenuId || '');
205
+ menuName = listParam.menuName || t.title;
206
+ }
207
+ else {
208
+ if (!formObjId) {
209
+ throw rsFail('当前环境未解析到「' + t.title + '」表单,无法读取数据');
210
+ }
211
+ const ds = await fetchDatasetRows(host, formObjId, { pageSize: Math.max(200, pageSize), maxRows: 1000 });
212
+ directRows = ds.rows;
213
+ directTotal = ds.total;
214
+ directTruncated = ds.truncated;
215
+ listId = 'dataset:' + formObjId;
216
+ menuName = t.title;
197
217
  }
198
- const listId = listParam.listId;
199
- const cusMenuId = listParam.cusMenuId;
200
- const menuName = listParam.menuName || t.title;
201
218
  // 精确筛选:参数 → dataKey → field_<fieldId>(mark 运行时解析)
202
219
  const commonSearchFields = {};
203
220
  const appliedFilters = [];
@@ -263,61 +280,68 @@ async function runList(env, args, feedbackTodoMode) {
263
280
  // 去掉会退化成「只能靠取到空页判断末页」,对十万级台账反而更慢且会静默截断。
264
281
  const PAGE_CONCURRENCY = 6;
265
282
  let countFetched = false;
266
- for (let start = 0; start < wantPages; start += PAGE_CONCURRENCY) {
267
- const end = Math.min(start + PAGE_CONCURRENCY, wantPages);
268
- const idxs = [];
269
- for (let i = start; i < end; i++)
270
- idxs.push(i);
271
- // 计数接口全程只发一次(与第一批并发出,失败不影响主流程)
272
- const needCount = !countFetched;
273
- if (needCount)
274
- countFetched = true;
275
- const countPromise = needCount
276
- ? (() => {
277
- const cntBody = { ...baseBody };
278
- delete cntBody.current;
279
- delete cntBody.pageSize;
280
- return host.request({
281
- path: '/api/ebuilder/form/list/getListDataCount?passid=' + formObjId + '&cid=' + formObjId,
282
- body: cntBody, headers: extra,
283
- }).catch(() => null);
284
- })()
285
- : Promise.resolve(null);
286
- const [c, ...pageResps] = await Promise.all([
287
- countPromise,
288
- ...idxs.map((i) => host.request({
289
- path: '/api/ebuilder/form/list/getListDatas?passid=' + formObjId + '&cid=' + formObjId,
290
- body: { ...baseBody, current: current + i },
291
- headers: extra,
292
- })),
293
- ]);
294
- if (c && typeof c?.data?.total === 'number')
295
- cntTotal = c.data.total;
296
- // 按页序消费,遇到末页或已达总数即停(并跳出后续批次)
297
- let stop = false;
298
- for (let k = 0; k < idxs.length; k++) {
299
- const i = idxs[k];
300
- const resp = pageResps[k];
301
- const rRaw = resp?.data?.data || [];
302
- const rDisp = resp?.data?.displayData;
303
- if (Array.isArray(rDisp) && rDisp.length) {
304
- hasDisplay = true;
305
- dispRows.push(...rDisp);
306
- }
307
- rawRows.push(...rRaw);
308
- const got = (Array.isArray(rDisp) && rDisp.length) ? rDisp.length : rRaw.length;
309
- lastGot = got;
310
- if (got < pageSize) {
311
- stop = true;
312
- break;
283
+ if (!directRows) {
284
+ for (let start = 0; start < wantPages; start += PAGE_CONCURRENCY) {
285
+ const end = Math.min(start + PAGE_CONCURRENCY, wantPages);
286
+ const idxs = [];
287
+ for (let i = start; i < end; i++)
288
+ idxs.push(i);
289
+ // 计数接口全程只发一次(与第一批并发出,失败不影响主流程)
290
+ const needCount = !countFetched;
291
+ if (needCount)
292
+ countFetched = true;
293
+ const countPromise = needCount
294
+ ? (() => {
295
+ const cntBody = { ...baseBody };
296
+ delete cntBody.current;
297
+ delete cntBody.pageSize;
298
+ return host.request({
299
+ path: '/api/ebuilder/form/list/getListDataCount?passid=' + formObjId + '&cid=' + formObjId,
300
+ body: cntBody, headers: extra,
301
+ }).catch(() => null);
302
+ })()
303
+ : Promise.resolve(null);
304
+ const [c, ...pageResps] = await Promise.all([
305
+ countPromise,
306
+ ...idxs.map((i) => host.request({
307
+ path: '/api/ebuilder/form/list/getListDatas?passid=' + formObjId + '&cid=' + formObjId,
308
+ body: { ...baseBody, current: current + i },
309
+ headers: extra,
310
+ })),
311
+ ]);
312
+ if (c && typeof c?.data?.total === 'number')
313
+ cntTotal = c.data.total;
314
+ // 按页序消费,遇到末页或已达总数即停(并跳出后续批次)
315
+ let stop = false;
316
+ for (let k = 0; k < idxs.length; k++) {
317
+ const i = idxs[k];
318
+ const resp = pageResps[k];
319
+ const rRaw = resp?.data?.data || [];
320
+ const rDisp = resp?.data?.displayData;
321
+ if (Array.isArray(rDisp) && rDisp.length) {
322
+ hasDisplay = true;
323
+ dispRows.push(...rDisp);
324
+ }
325
+ rawRows.push(...rRaw);
326
+ const got = (Array.isArray(rDisp) && rDisp.length) ? rDisp.length : rRaw.length;
327
+ lastGot = got;
328
+ if (got < pageSize) {
329
+ stop = true;
330
+ break;
331
+ }
332
+ if (cntTotal !== null && (current + i) * pageSize >= cntTotal) {
333
+ stop = true;
334
+ break;
335
+ }
313
336
  }
314
- if (cntTotal !== null && (current + i) * pageSize >= cntTotal) {
315
- stop = true;
337
+ if (stop)
316
338
  break;
317
- }
318
339
  }
319
- if (stop)
320
- break;
340
+ }
341
+ else {
342
+ rawRows.push(...directRows);
343
+ cntTotal = directTotal ?? directRows.length;
344
+ lastGot = directRows.length;
321
345
  }
322
346
  const rows = hasDisplay ? dispRows : rawRows;
323
347
  // 取回后本地过滤/排序(服务端时间筛选在部分列表不稳定,统一本地处理)
@@ -347,6 +371,14 @@ async function runList(env, args, feedbackTodoMode) {
347
371
  return av < bv ? 1 : av > bv ? -1 : 0; // 默认倒序(时间类:最新在前)
348
372
  });
349
373
  }
374
+ // 直读表没有服务端分页:先记录筛选后的完整条数,再按 current/pageSize 截取。
375
+ // 同时保留分页前的完整行集:feedbackTodo 的 total 要按完整集算,不能只数当前页。
376
+ const directFilteredRows = directRows ? workRows : [];
377
+ const filteredCount = workRows.length;
378
+ if (directRows && !args.all) {
379
+ const start = Math.max(0, (current - 1) * pageSize);
380
+ workRows = workRows.slice(start, start + pageSize);
381
+ }
350
382
  // 总数三态:① 计数接口精确 ② 到末页按已取回行数 ③ 不可知置 null(绝不把失败当 0)
351
383
  const reachedEnd = lastGot < pageSize;
352
384
  let total;
@@ -369,6 +401,20 @@ async function runList(env, args, feedbackTodoMode) {
369
401
  if (args.all && rows.length >= wantPages * pageSize && (cntTotal === null || cntTotal > rows.length)) {
370
402
  totalNote = `已取回 ${rows.length} 行(达 maxPages 上限 ${wantPages} 页),可能仍有更多;可增大 maxPages 或加精确筛选`;
371
403
  }
404
+ // 直读表 + 客户端筛选时,服务端 total 不能代表筛选结果;按本地筛选后的完整条数回填。
405
+ // 若直读已触顶 1000 行,则筛选结果也可能不完整,total 置 null 并在 note 里说明(不谎报精确)。
406
+ if (directRows && !feedbackTodoMode && (clientFilters.length || args.recent)) {
407
+ if (directTruncated) {
408
+ total = null;
409
+ totalExact = false;
410
+ totalNote = '直读表已达到 1000 行上限,筛选结果可能不完整;请加精确筛选后重查';
411
+ }
412
+ else {
413
+ total = filteredCount;
414
+ totalExact = true;
415
+ totalNote = '直读表模式:total 为本地筛选后的条数';
416
+ }
417
+ }
372
418
  // 原始层兜底翻译(displayData 存在时跳过全部翻译,零本地翻译、零额外请求)
373
419
  const dictNameMap = {};
374
420
  const optionsMap = {};
@@ -473,7 +519,7 @@ async function runList(env, args, feedbackTodoMode) {
473
519
  }
474
520
  }
475
521
  if (Array.isArray(arr)) {
476
- const names = arr.map((x) => x?.name || x?.username || x?.text || x?.title || (typeof x === 'string' ? x : null)).filter(Boolean);
522
+ const names = arr.map((x) => x?.name || x?.fieldOptionName || x?.username || x?.text || x?.title || (typeof x === 'string' ? x : null)).filter(Boolean);
477
523
  if (names.length) {
478
524
  row[k] = names.join('、');
479
525
  continue;
@@ -515,7 +561,7 @@ async function runList(env, args, feedbackTodoMode) {
515
561
  }
516
562
  }
517
563
  if (Array.isArray(arr)) {
518
- const names = arr.map((x) => x?.name || x?.text || x?.title || (typeof x === 'string' ? x : null)).filter(Boolean);
564
+ const names = arr.map((x) => x?.name || x?.fieldOptionName || x?.text || x?.title || (typeof x === 'string' ? x : null)).filter(Boolean);
519
565
  if (names.length) {
520
566
  row[k] = names.join('、');
521
567
  continue;
@@ -551,9 +597,70 @@ async function runList(env, args, feedbackTodoMode) {
551
597
  // feedbackTodo:从当前结果集派生两个待办视图
552
598
  if (feedbackTodoMode) {
553
599
  const me = feedbackUser?.name || '';
554
- const st = (r) => String(r.union_status_key || r.union_status || '');
555
- const tp = (r) => String(r.interview_type_key || r.interview_type || '');
556
- const iv = (r) => String(r.interviewer || '');
600
+ const myId = feedbackUser?.id ? String(feedbackUser.id) : '';
601
+ const scalar = (v) => {
602
+ if (v == null)
603
+ return '';
604
+ if (typeof v === 'object')
605
+ return String(v.id ?? v.value ?? v.key ?? v.label ?? '');
606
+ return String(v);
607
+ };
608
+ const tokensOf = (v) => {
609
+ const out = [];
610
+ const walk = (x, depth = 0) => {
611
+ if (x == null || depth > 4)
612
+ return;
613
+ if (Array.isArray(x)) {
614
+ for (const it of x)
615
+ walk(it, depth + 1);
616
+ return;
617
+ }
618
+ if (typeof x === 'object') {
619
+ for (const f of [x.id, x.value, x.employeeId, x.userId, x.name, x.text, x.label])
620
+ walk(f, depth + 1);
621
+ return;
622
+ }
623
+ const s = String(x).trim();
624
+ if (!s || /^\[object /.test(s))
625
+ return;
626
+ out.push(s);
627
+ if ((s.startsWith('[') || s.startsWith('{')) && s.length < 2000) {
628
+ try {
629
+ walk(JSON.parse(s), depth + 1);
630
+ }
631
+ catch { /* 非 JSON 文本,按普通字符串处理 */ }
632
+ }
633
+ };
634
+ walk(v);
635
+ return [...new Set(out)];
636
+ };
637
+ const st = (r) => scalar(r.union_status_key || r.union_status);
638
+ const tp = (r) => scalar(r.interview_type_key || r.interview_type);
639
+ // 直读表/原始层可能给的是选项 id 或人员 id,先按 field_options 归一,再做「待反馈」与「面试官=我」判断。
640
+ const statusLabel = (r) => {
641
+ const vals = [scalar(r.union_status), scalar(r.union_status_key)];
642
+ const mapped = vals.map((v) => optionMapOf(statusFieldId)[v]).find(Boolean);
643
+ return mapped || vals.find((v) => /待反馈/.test(v)) || st(r);
644
+ };
645
+ const isPendingRow = (r) => {
646
+ const vals = [scalar(r.union_status), scalar(r.union_status_key)];
647
+ if (pendingOptionId && vals.includes(pendingOptionId))
648
+ return true;
649
+ return /待反馈/.test(statusLabel(r));
650
+ };
651
+ const isMineRow = (r) => {
652
+ const tokens = [
653
+ ...tokensOf(r.interviewer),
654
+ ...tokensOf(r.interviewer_name),
655
+ ...tokensOf(r.interviewer_id),
656
+ ];
657
+ if (!tokens.length)
658
+ tokens.push(...tokensOf(r.feedbackUser));
659
+ if (!tokens.length)
660
+ return false;
661
+ return tokens.some((t) => (!!me && t.includes(me)) || (!!myId && t.includes(myId)));
662
+ };
663
+ const iv = (r) => tokensOf(r.interviewer).join(',');
557
664
  const slim = (r) => ({
558
665
  form_data_id: r.form_data_id,
559
666
  candidate_name: r.candidate_name,
@@ -570,14 +677,30 @@ async function runList(env, args, feedbackTodoMode) {
570
677
  // 参与方式按面试方式取值(现场=地点 / 视频=链接 / AI=小程序码),不要统一当"地点"
571
678
  participation: participationOf(r),
572
679
  });
573
- // 服务端已按「待反馈 + 面试官=我」筛过则直接用;兜底路径才做客户端二次筛
574
- const pending = serverFilterApplied ? outRows : outRows.filter((r) => /待反馈/.test(st(r)));
575
- const mineAll = serverFilterApplied ? outRows : (me ? pending.filter((r) => iv(r).includes(me)) : []);
680
+ // 服务端已按「待反馈 + 面试官=我」筛过则直接用;直读表/兜底路径才做客户端二次筛。
681
+ // 🔴 directRows 模式下 baseBody 里的服务端条件根本没发出去,不能把 serverFilterApplied 当已生效。
682
+ const effectiveServerFilter = serverFilterApplied && !directRows;
683
+ const scopeRows = directRows ? directFilteredRows : outRows;
684
+ const pendingAll = effectiveServerFilter ? scopeRows : scopeRows.filter(isPendingRow);
685
+ const mineAllAll = effectiveServerFilter ? scopeRows : ((me || feedbackUser?.id) ? pendingAll.filter(isMineRow) : []);
686
+ const pending = effectiveServerFilter ? outRows : outRows.filter(isPendingRow);
687
+ const mineAll = effectiveServerFilter ? outRows : ((me || feedbackUser?.id) ? pending.filter(isMineRow) : []);
576
688
  const myAi = mineAll.filter((r) => /AI\s*面试/i.test(tp(r)));
689
+ const myAiAll = mineAllAll.filter((r) => /AI\s*面试/i.test(tp(r)));
690
+ // 直读表是本地筛选,total 必须按分页前的完整集回填;否则会把「当前页 N 条」误报成待办总数。
691
+ if (directRows) {
692
+ total = directTruncated ? null : mineAllAll.length;
693
+ totalExact = !directTruncated;
694
+ out.total = total;
695
+ out.totalExact = totalExact;
696
+ out.totalNote = directTruncated
697
+ ? '直读表已达到 1000 行上限,待办可能不完整;请加精确筛选后重查'
698
+ : '直读表模式:total 为「待反馈 + 面试官=当前用户」本地筛选后的条数';
699
+ }
577
700
  const notes = [];
578
- if (!me)
701
+ if (!me && !feedbackUser?.id)
579
702
  notes.push('未能解析当前登录用户,无法按面试官过滤(结果为空)');
580
- if (serverFilterApplied) {
703
+ if (effectiveServerFilter) {
581
704
  notes.push('服务端已按「待反馈 + 当前登录人为面试官」筛选(commonSearchFields + in),total 为该条件下的精确条数');
582
705
  if (out.total !== null && outRows.length < out.total) {
583
706
  notes.push('⚠️ 仅取回 ' + outRows.length + '/' + out.total
@@ -588,22 +711,28 @@ async function runList(env, args, feedbackTodoMode) {
588
711
  // 🔴 必须点明实际扫描的列表:「我的面试」是分母已收敛的相关列表,且口径比台账窄,
589
712
  // 回退到「面试管理」时才是全量台账,两者的 total 含义完全不同,不能混报。
590
713
  notes.push('数据源列表「' + menuName + '」(total=' + (out.total === null ? '不可知' : out.total)
591
- + ',已扫描 ' + outRows.length + ' 条);「我的面试」为与我相关范围,仍需按面试官二次筛');
592
- if (out.total !== null && outRows.length < out.total) {
714
+ + ',已扫描 ' + scopeRows.length + ' 条);「我的面试」为与我相关范围,仍需按面试官二次筛');
715
+ if (!directRows && out.total !== null && outRows.length < out.total) {
593
716
  notes.push('⚠️ 未覆盖全部:已扫描 ' + outRows.length + '/' + out.total
594
717
  + ' 条(列表默认顺序),排在后面的待办会漏且不报错;请加大 maxPages 或 pageSize 后重查');
595
718
  }
719
+ if (directRows && directTruncated) {
720
+ notes.push('⚠️ 直读表已达 1000 行上限,排在后面的待办可能漏取');
721
+ }
722
+ if (directRows && (mineAllAll.length > mineAll.length || myAiAll.length > myAi.length)) {
723
+ notes.push('直读表 current/pageSize 只返回当前页 ' + outRows.length + ' 条明细;count 按直读完整集统计,可用 all=true 取回全部');
724
+ }
596
725
  }
597
- out.serverFiltered = serverFilterApplied;
726
+ out.serverFiltered = effectiveServerFilter;
598
727
  out.currentUserId = feedbackUser?.id || null;
599
728
  out.feedbackTodo = {
600
729
  currentUser: me || null,
601
- scanned: outRows.length,
730
+ scanned: scopeRows.length,
602
731
  total: out.total,
603
732
  totalExact: out.totalExact,
604
- myAiPendingFeedback: { count: myAi.length, rows: myAi.map(slim) },
733
+ myAiPendingFeedback: { count: myAiAll.length, rows: myAi.map(slim) },
605
734
  myOtherPendingFeedback: {
606
- count: mineAll.length - myAi.length,
735
+ count: mineAllAll.length - myAiAll.length,
607
736
  rows: mineAll.filter((r) => !/AI\s*面试/i.test(tp(r))).map(slim),
608
737
  },
609
738
  ...(notes.length ? { note: notes.join(';') } : {}),
@@ -8,7 +8,7 @@
8
8
  * 闸门 = checkResumeExtraction:环境未开启即报错停止,**不回退大模型/结构化输入**。
9
9
  * 接口返回什么就写什么,不做完整性校验、不因字段少/明细少而回退。checkRpaValid 已废弃。
10
10
  *
11
- * 链路:查重(两级:getCandidateByPhone 页面同款 + checkUnique 表单唯一性,含软删除占用)
11
+ * 链路:查重(唯一通道:getCandidateByPhone 页面同款接口)
12
12
  * → 建人才(首选 dataset/v2 主表+明细一次写入;被拦时回退 form/core 主表 + dataset update 补明细)
13
13
  * → initTalentBatch 初始化批次 → matchTalentLabel 触发规则匹配 → 平台标签写入(含学校归属自动推导)
14
14
  * → 读回校验明细行数 → 人才卡片/人才库定位双链接。
@@ -22,7 +22,7 @@ import path from 'node:path';
22
22
  import schoolTiers from '../school-tiers.json';
23
23
  import { rsSuccess, schemaOf } from './types.js';
24
24
  import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
25
- import { objIdOf, formIdOf, saveFormData, getFormLayoutMeta, runSaveButtonEsbActions, getTableMapping, invertTableMapping, datasetSaveFormData, datasetUpdateFormData, checkUnique, getCandidateByPhone, buildCardUrl, buildTalentViewUrl, talentLinkExtra, talentUiCardUrl, resolveTalentListUrl, findMenuNode, randHex32, getDsOptions, cachedDsMap, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
25
+ import { objIdOf, formIdOf, saveFormData, getFormLayoutMeta, runSaveButtonEsbActions, getTableMapping, invertTableMapping, datasetSaveFormData, datasetUpdateFormData, getCandidateByPhone, buildCardUrl, buildTalentViewUrl, talentLinkExtra, talentUiCardUrl, resolveTalentListUrl, findMenuNode, randHex32, getDsOptions, cachedDsMap, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
26
26
  import { addEntityTags, queryEntityTags } from '../tag-lookup.js';
27
27
  import { scanResumeSource } from '../fs-scan.js';
28
28
  import { saveBatchItems, loadBatchItems, saveOcrResult, loadOcrResult } from '../batch-store.js';
@@ -400,38 +400,6 @@ function buildSubDetails(structured, subs, cache) {
400
400
  });
401
401
  return { byTable, stats };
402
402
  }
403
- // 读记录简要(查重结果展示用):主表 name/mobile/email/college
404
- function makeBriefReader(ctx, formId, objId, fields) {
405
- const rev = {};
406
- for (const [dk, fid] of Object.entries(fields || {}))
407
- rev[String(fid)] = dk;
408
- return async (dataId) => {
409
- try {
410
- const r = await ctx.host.request({
411
- path: '/api/ebuilder/form/form/core/getFormDataAndLayout', method: 'POST',
412
- body: {
413
- terminalType: 'PC', dataId, formId, module: 'ebuilderform', newLayout: true,
414
- dataCrossLayout: false, permissionId: '', allReadOnly: true, initialDatas: [],
415
- dynamicData: false, cost: false, customParam: { objId, dataId },
416
- },
417
- });
418
- const fd = r?.data?.formData;
419
- if (!fd)
420
- return null;
421
- const dets = fd.dataDetails || [];
422
- const get = (dk) => {
423
- const d = dets.find((x) => rev[String(x.fieldId)] === dk);
424
- if (!d)
425
- return '';
426
- return String(d.content ?? (d.dataText || {}).content ?? (d.dataOptions || []).map((o) => o.content).join(',') ?? '');
427
- };
428
- return { name: get('candidate_name'), mobile: get('telephone'), email: get('email'), college: get('college') };
429
- }
430
- catch {
431
- return null;
432
- }
433
- };
434
- }
435
403
  // 人才卡片 URL(装了人才库 ecode 页面就指向新卡片页;否则环境缓存 ebdDetailPageId,自用追加 recruitType=useSelf)
436
404
  async function resolveTalentCardUrl(ctx, talentId) {
437
405
  if (talentId) {
@@ -883,9 +851,10 @@ async function buildImport(ctx, args) {
883
851
  subMeta, tagNames, schoolTagInfo, channelLabel, channelWarning, resumeFieldId,
884
852
  };
885
853
  }
886
- // 两级查重:① getCandidateByPhone(页面同款,命中即「已绑定人才」)② checkUnique(表单唯一性,捕捉无批次记录与软删除占用)
854
+ // 查重:只用页面同款的 getCandidateByPhone。
855
+ // 2026-11-30 用户口径:返回 candidateId/talentId 即重复;返回空对象即无重复;不再把 checkUnique 作为必需双通道。
887
856
  async function findExistingTalents(ctx, opts) {
888
- const { objId, formId, fields, mobile } = opts;
857
+ const { mobile } = opts;
889
858
  // 没有手机号时不存在「手机号唯一性」问题:标记为不适用且放行,不能误判成查重失败。
890
859
  const blank = {
891
860
  checked: true, unique: true, applicable: false,
@@ -895,15 +864,8 @@ async function findExistingTalents(ctx, opts) {
895
864
  };
896
865
  if (!mobile)
897
866
  return blank;
898
- // 两级查重并行:getCandidateByPhone(页面同款)与 checkUnique(表单唯一性)互不依赖 → 并行省 1 RTT。
899
- // 🔴 2026-11-29 查重失败必须 fail-closed:任一探针没拿到有效回包,都不能当成「唯一」继续建档。
900
- // 事故链:旧写法把 checkUnique 异常吞成 unique=true,dataset 保存又被判定为「可降级」,
901
- // 回退 form/core/saveFormData 绕过了平台唯一性校验,最终同一手机号被智能体建出多条人才。
902
- const phoneTask = getCandidateByPhone(ctx.host, mobile).then((b) => ({ ok: true, b }), (e) => ({ ok: false, e }));
903
- const uniqueTask = fields.telephone
904
- ? checkUnique(ctx.host, { objId, fieldId: fields.telephone, value: mobile }).then((r) => ({ ok: true, r }), (e) => ({ ok: false, e }))
905
- : Promise.resolve({ ok: false, e: new Error('人才表单缺少 telephone 字段映射') });
906
- const [phoneRes, uniqueRes] = await Promise.all([phoneTask, uniqueTask]);
867
+ // getCandidateByPhone 是唯一查重通道:请求失败必须 fail-closed,不能当成「唯一」继续建档。
868
+ const phoneRes = await getCandidateByPhone(ctx.host, mobile).then((b) => ({ ok: true, b }), (e) => ({ ok: false, e }));
907
869
  let byPhone = null;
908
870
  if (phoneRes.ok) {
909
871
  const b = phoneRes.b;
@@ -920,52 +882,20 @@ async function findExistingTalents(ctx, opts) {
920
882
  else {
921
883
  byPhone = { error: phoneRes.e?.message };
922
884
  }
923
- const formConflicts = { existing: [], unreadable: [] };
924
- let ids = [];
925
- let uniqueFlag = true;
926
- if (uniqueRes.ok && uniqueRes.r) {
927
- const r = uniqueRes.r;
928
- ids = r.formDataIds;
929
- uniqueFlag = r.unique !== false;
930
- const readBrief = makeBriefReader(ctx, formId, objId, fields);
931
- for (const id of ids) {
932
- if (byPhone?.talentId === id)
933
- continue;
934
- const rec = await readBrief(id);
935
- if (rec) {
936
- formConflicts.existing.push({
937
- talentId: id, ...rec,
938
- talentCardUrl: await resolveTalentCardUrl(ctx, id),
939
- talentListLocateUrl: await resolveTalentListLocateUrl(ctx, id),
940
- recordCardUrl: buildCardUrl(ctx.baseUrl, objId, id),
941
- });
942
- }
943
- else
944
- formConflicts.unreadable.push(id);
945
- }
946
- }
947
885
  const phoneChecked = phoneRes.ok;
948
- const uniqueChecked = uniqueRes.ok && !!uniqueRes.r;
949
886
  const checkErrors = [];
950
887
  if (!phoneChecked)
951
888
  checkErrors.push('getCandidateByPhone 查询失败:' + (phoneRes.e?.message || '未知错误'));
952
- if (!fields.telephone)
953
- checkErrors.push('人才表单缺少 telephone 字段映射,checkUnique 无法执行');
954
- else if (!uniqueChecked)
955
- checkErrors.push('checkUnique 查询失败:' + (uniqueRes.e?.message || '未知错误'));
956
- const checked = phoneChecked && uniqueChecked;
957
- const hit = Boolean(byPhone?.candidateId || byPhone?.talentId)
958
- || formConflicts.existing.length > 0
959
- || !uniqueFlag;
889
+ const checked = phoneChecked;
890
+ const hit = Boolean(byPhone?.candidateId || byPhone?.talentId);
960
891
  return {
961
892
  checked,
962
- // 只有两级都成功且无命中才是 unique;查重失败一律返回 false,下游必须阻断。
963
893
  unique: checked ? !hit : false,
964
894
  applicable: true,
965
- phoneChecked, uniqueChecked, checkErrors,
895
+ phoneChecked, uniqueChecked: phoneChecked, checkErrors,
966
896
  byPhone: byPhone && !byPhone.error ? byPhone : null,
967
897
  byPhoneError: byPhone?.error,
968
- formConflicts, ids,
898
+ formConflicts: { existing: [], unreadable: [] }, ids: [],
969
899
  };
970
900
  }
971
901
  function fingerprint(value) {
@@ -1020,10 +950,16 @@ async function prepare(args, env, opts = {}) {
1020
950
  if (legacy.length) {
1021
951
  throw rsValidationError('legacy_channel_removed', '解析只走 OCR:已移除 ' + legacy.join('/') + ' 通道,请改为只传 resumeFile(本地原件)或 fileId(已上传原件);OCR 自动执行,无需开关');
1022
952
  }
953
+ // ISS-203:更新已有人才此前完全不做权限探测,只有平台兜底;现在创建/更新都探一次
954
+ // (更新传目标记录 id,按该记录的编辑权限返回按钮)。
1023
955
  if (!opts.skipPermissionProbe) {
1024
- const perm = await probeCreatePermission(ctx.host, objIdOf(ctx.cache, 'talent_pool'));
1025
- if (perm === 'denied')
1026
- throw rsFail('当前账号没有「人才库」表单的创建权限,已阻断(未写入任何数据)');
956
+ const updateId = String(args.updateTalentId || '');
957
+ const perm = await probeCreatePermission(ctx.host, objIdOf(ctx.cache, 'talent_pool'), updateId);
958
+ if (perm === 'denied') {
959
+ throw rsFail(updateId
960
+ ? '当前账号没有(或已失去)该人才记录的编辑权限,已阻断(未写入任何数据)。'
961
+ : '当前账号没有「人才库」表单的创建权限,已阻断(未写入任何数据)');
962
+ }
1027
963
  }
1028
964
  mark('prepare.权限探测');
1029
965
  const argsT = args;
@@ -1179,7 +1115,7 @@ async function prepare(args, env, opts = {}) {
1179
1115
  : (dupInfo.unique ? undefined
1180
1116
  : '若本次是重试/复跑(上次 apply 可能已成功),请改用 updateTalentId=<命中的人才id> 走更新通道,不要重复建档'),
1181
1117
  note: !dupInfo.checked
1182
- ? '查重未完成(getCandidateByPhone/checkUnique 至少一个失败)→ 已阻断新建,必须先解决查重再提交'
1118
+ ? '查重未完成(getCandidateByPhone 查询失败)→ 已阻断新建,必须先解决查重再提交'
1183
1119
  : (dupInfo.byPhone
1184
1120
  ? '手机号已绑定人才(页面同款 getCandidateByPhone 命中)→ 不新建,给出人才查看页地址'
1185
1121
  : (dupInfo.formConflicts.existing.length