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
@@ -272,10 +272,11 @@ function addDays(date, delta) {
272
272
  }
273
273
 
274
274
  // src/shortcuts/ehr/operations/recruit.ts
275
- import { randomBytes, randomUUID } from "node:crypto";
276
- import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
275
+ import { createHash, randomBytes, randomUUID } from "node:crypto";
276
+ import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
277
277
  import { homedir } from "node:os";
278
- import { join, resolve } from "node:path";
278
+ import { dirname, join, relative, resolve } from "node:path";
279
+ import { fileURLToPath } from "node:url";
279
280
 
280
281
  // src/shortcuts/ehr/operations/types.ts
281
282
  var READ = "read";
@@ -307,12 +308,17 @@ function isSelfTenant(tenantKey) {
307
308
  const key = String(tenantKey || "").trim();
308
309
  return !!key && SELF_TENANT_KEYS.has(key);
309
310
  }
310
- var RECRUIT_CACHE_VERSION = 8;
311
+ var RECRUIT_CACHE_VERSION = 12;
311
312
  var RECRUIT_CACHE_TTL_DEFAULT_MS = 12 * 60 * 60 * 1e3;
313
+ var RECRUIT_VOLATILE_TTL_DEFAULT_MS = 5 * 60 * 1e3;
312
314
  function recruitCacheTtlMs() {
313
315
  const raw = Number(process.env.E10_RS_RECRUIT_CACHE_TTL_MS || "");
314
316
  return Number.isFinite(raw) && raw > 0 ? raw : RECRUIT_CACHE_TTL_DEFAULT_MS;
315
317
  }
318
+ function recruitVolatileTtlMs() {
319
+ const raw = Number(process.env.E10_RS_RECRUIT_VOLATILE_TTL_MS || "");
320
+ return Number.isFinite(raw) && raw > 0 ? raw : RECRUIT_VOLATILE_TTL_DEFAULT_MS;
321
+ }
316
322
  var RECRUIT_CRITICAL_FORMS = /* @__PURE__ */ new Set(["position_manage", "talent_pool", "interview_plan"]);
317
323
  var RECRUIT_CRITICAL_FORM_LABELS = {
318
324
  position_manage: "\u62DB\u8058\u804C\u4F4D",
@@ -331,6 +337,13 @@ function hasCriticalFields(cache) {
331
337
  if (!dictByName || typeof dictByName !== "object" || !Object.keys(dictByName).length) return false;
332
338
  return true;
333
339
  }
340
+ function codeHashOk(cache) {
341
+ return !cache?.codeHash || cache.codeHash === recruitCodeHash();
342
+ }
343
+ function volatileFresh(cache) {
344
+ const at = Number(cache?.volatileSavedAt || cache?.savedAt || 0);
345
+ return at > 0 && Date.now() - at <= recruitVolatileTtlMs();
346
+ }
334
347
  var RECRUIT_TAGS = {
335
348
  talent_pool: "uf_rcrt_talent_pool",
336
349
  interview_plan: "uf_rcrt_interview_plan",
@@ -401,6 +414,34 @@ function cacheDirFor(baseUrl) {
401
414
  const home = process.env.WEAVER_WORK_CLI_HOME || process.env.WORK_CLI_HOME || resolve(homedir(), ".weaver-work-cli");
402
415
  return join(home, "env-cache", "recruit-ops", host);
403
416
  }
417
+ var recruitCodeHashMemo = "";
418
+ function collectRecruitCodeFiles(root, rel, out) {
419
+ const abs = join(root, rel);
420
+ if (!existsSync(abs)) return;
421
+ const st = statSync(abs);
422
+ if (st.isDirectory()) {
423
+ for (const entry of readdirSync(abs).sort()) collectRecruitCodeFiles(root, join(rel, entry), out);
424
+ return;
425
+ }
426
+ if (/\.(ts|js|mjs)$/.test(abs)) out.push(abs);
427
+ }
428
+ function recruitCodeHash() {
429
+ if (recruitCodeHashMemo) return recruitCodeHashMemo;
430
+ const here = fileURLToPath(import.meta.url);
431
+ const shortcutsDir = dirname(dirname(dirname(here)));
432
+ const files = [];
433
+ collectRecruitCodeFiles(shortcutsDir, "recruit-stage", files);
434
+ collectRecruitCodeFiles(shortcutsDir, join("ehr", "operations", "recruit"), files);
435
+ collectRecruitCodeFiles(shortcutsDir, join("ehr", "operations", "shared"), files);
436
+ const h = createHash("sha256");
437
+ h.update("recruit-context-v12\n");
438
+ for (const file of files.sort()) {
439
+ const rel = relative(shortcutsDir, file).replace(/\\/g, "/");
440
+ h.update(`${rel}\0${readFileSync(file, "utf8")}\0`);
441
+ }
442
+ recruitCodeHashMemo = h.digest("hex").slice(0, 24);
443
+ return recruitCodeHashMemo;
444
+ }
404
445
  function snapshotPathFor(baseUrl) {
405
446
  const url = new URL(baseUrl);
406
447
  const host = url.hostname + (url.port ? `_${url.port}` : "");
@@ -412,19 +453,25 @@ function readContextSnapshot(baseUrl) {
412
453
  const raw = JSON.parse(readFileSync(snapshotPathFor(baseUrl), "utf8"));
413
454
  if (!raw?.at || raw.cacheVersion !== RECRUIT_CACHE_VERSION) return null;
414
455
  if (Date.now() - raw.at > recruitCacheTtlMs()) return null;
415
- if (!raw.resolved || !hasCriticalFields({ ...raw.resolved, appId: raw.appId })) return null;
456
+ if (!raw.resolved || !codeHashOk(raw.resolved) || !hasCriticalFields({ ...raw.resolved, appId: raw.appId })) return null;
416
457
  return raw;
417
458
  } catch {
418
459
  return null;
419
460
  }
420
461
  }
421
- function writeContextSnapshot(baseUrl, appId, resolved) {
462
+ function writeContextSnapshot(baseUrl, appId, resolved, currentUserId) {
422
463
  if (Array.isArray(resolved?.degraded) && resolved.degraded.length) return;
423
464
  if (isXiaoECloudRuntime()) return;
424
465
  try {
425
466
  const path = snapshotPathFor(baseUrl);
426
467
  mkdirSync(join(path, ".."), { recursive: true });
427
- writeFileSync(path, JSON.stringify({ at: Date.now(), cacheVersion: RECRUIT_CACHE_VERSION, appId, resolved }), "utf8");
468
+ writeFileSync(path, JSON.stringify({
469
+ at: Date.now(),
470
+ cacheVersion: RECRUIT_CACHE_VERSION,
471
+ appId,
472
+ ownerUserId: currentUserId,
473
+ resolved
474
+ }), "utf8");
428
475
  } catch {
429
476
  }
430
477
  }
@@ -511,10 +558,13 @@ function datasetPageSize(fallback) {
511
558
  }
512
559
  async function fetchAllDatasetRows(host, objId, options) {
513
560
  const rows = [];
514
- const maxPages = Math.max(1, Math.ceil(options.maxRows / Math.max(1, options.pageSize)));
561
+ const safePageSize = Math.max(1, Math.min(options.pageSize, 100));
562
+ const maxPages = Math.max(1, Math.ceil(options.maxRows / safePageSize));
515
563
  let pageNo = 1;
516
564
  for (; ; ) {
517
- if (pageNo > maxPages) return { rows, pages: pageNo - 1, truncated: true };
565
+ if (pageNo > maxPages || rows.length >= options.maxRows) {
566
+ return { rows, pages: pageNo - 1, truncated: rows.length >= options.maxRows };
567
+ }
518
568
  const response = await host.request({
519
569
  method: "POST",
520
570
  path: "/api/ebuilder/form/dataset/v2/getAllData",
@@ -525,38 +575,11 @@ async function fetchAllDatasetRows(host, objId, options) {
525
575
  });
526
576
  const pageRows = response?.data?.datajson?.datas || [];
527
577
  if (!pageRows.length) return { rows, pages: pageNo, truncated: false };
528
- rows.push(...pageRows);
578
+ rows.push(...pageRows.slice(0, Math.max(0, options.maxRows - rows.length)));
529
579
  pageNo += 1;
530
580
  }
531
581
  }
532
- async function resolveRecruitEnv(host, appId) {
533
- const degraded = [];
534
- const warn = [];
535
- const forms = {};
536
- let tenantKey = "";
537
- const tagEntries = Object.entries(RECRUIT_TAGS);
538
- const tagResponses = await Promise.all(tagEntries.map(([, tag]) => host.request({
539
- path: "/api/ebuilder/form/obj/getObjsByTag",
540
- query: { appId, tag }
541
- })));
542
- tagEntries.forEach(([logic], idx) => {
543
- const response = tagResponses[idx];
544
- const entry = Array.isArray(response?.data) && response.data.length ? response.data[0] : null;
545
- forms[logic] = {
546
- objId: String(entry?.id || ""),
547
- formId: String(entry?.formId || ""),
548
- objName: entry?.objName || ""
549
- };
550
- if (!tenantKey && entry?.tenantKey) tenantKey = String(entry.tenantKey);
551
- });
552
- for (const logic of RECRUIT_CRITICAL_FORMS) {
553
- if (forms[logic]?.objId) continue;
554
- throw new RecruitContextError(
555
- "recruit_form_unresolved",
556
- `\u5F53\u524D\u73AF\u5883\u672A\u89E3\u6790\u5230\u300C${RECRUIT_CRITICAL_FORM_LABELS[logic] || logic}\u300D\u8868\u5355\uFF08getObjsByTag \u8FD4\u56DE\u7A7A\uFF09\uFF0C\u5DF2\u4E2D\u6B62\u4E14\u672A\u5199\u5165\u7F13\u5B58\uFF1B\u8BF7\u786E\u8BA4\u62DB\u8058\u5E94\u7528\u5DF2\u5B89\u88C5\u3001\u8D26\u53F7\u5BF9\u8BE5\u8868\u5355\u6709\u6743\u9650\u540E\u91CD\u8BD5\u3002`
557
- );
558
- }
559
- if (!forms.dictionary?.objId) degraded.push("dict");
582
+ async function resolveRecruitMenus(host, appId) {
560
583
  const flat = [];
561
584
  const walk = (nodes) => {
562
585
  for (const node of toMenuList(nodes)) {
@@ -578,7 +601,8 @@ async function resolveRecruitEnv(host, appId) {
578
601
  } catch {
579
602
  menuFailed = true;
580
603
  }
581
- if (menuFailed || !flat.length) warn.push("menus");
604
+ const menuWarn = [];
605
+ if (menuFailed || !flat.length) menuWarn.push("menus");
582
606
  const searchMenus = [];
583
607
  const pages = [];
584
608
  for (const node of flat) {
@@ -588,6 +612,64 @@ async function resolveRecruitEnv(host, appId) {
588
612
  pages.push({ menuName: node.menuName, pageId: String(node.pageId || "") });
589
613
  }
590
614
  }
615
+ const lists = {
616
+ talent: null,
617
+ demand: null,
618
+ position: null,
619
+ entry: null,
620
+ offer: null,
621
+ interview: null,
622
+ candidate: null,
623
+ dict: searchMenus.find((m) => (m.menuName || "").trim() === "\u6570\u636E\u5B57\u5178") || null,
624
+ biz_config: searchMenus.find((m) => (m.menuName || "").trim() === "\u4E1A\u52A1\u914D\u7F6E\u6620\u5C04\u8868") || null,
625
+ all_search: searchMenus,
626
+ pages
627
+ };
628
+ for (const [biz, keywords] of Object.entries(LIST_KEYWORDS)) {
629
+ for (const menu of searchMenus) {
630
+ if (keywords.some((keyword) => (menu.menuName || "").includes(keyword))) {
631
+ lists[biz] = menu;
632
+ break;
633
+ }
634
+ }
635
+ }
636
+ if (!menuFailed && flat.length > 0 && Object.keys(LIST_KEYWORDS).filter((k) => k !== "biz_config").every((k) => !lists[k])) {
637
+ menuWarn.push("menus-renamed");
638
+ }
639
+ return { lists, menuShape, menuWarn };
640
+ }
641
+ async function resolveRecruitEnv(host, appId) {
642
+ const degraded = [];
643
+ const warn = [];
644
+ const forms = {};
645
+ let tenantKey = "";
646
+ const tagEntries = Object.entries(RECRUIT_TAGS);
647
+ const tagResponses = await Promise.all(tagEntries.map(([, tag]) => host.request({
648
+ path: "/api/ebuilder/form/obj/getObjsByTag",
649
+ query: { appId, tag }
650
+ })));
651
+ tagEntries.forEach(([logic], idx) => {
652
+ const response = tagResponses[idx];
653
+ const entry = Array.isArray(response?.data) && response.data.length ? response.data[0] : null;
654
+ forms[logic] = {
655
+ objId: String(entry?.id || ""),
656
+ formId: String(entry?.formId || ""),
657
+ objName: entry?.objName || ""
658
+ };
659
+ if (!tenantKey && entry?.tenantKey) tenantKey = String(entry.tenantKey);
660
+ });
661
+ for (const logic of RECRUIT_CRITICAL_FORMS) {
662
+ if (forms[logic]?.objId) continue;
663
+ throw new RecruitContextError(
664
+ "recruit_form_unresolved",
665
+ `\u5F53\u524D\u73AF\u5883\u672A\u89E3\u6790\u5230\u300C${RECRUIT_CRITICAL_FORM_LABELS[logic] || logic}\u300D\u8868\u5355\uFF08getObjsByTag \u8FD4\u56DE\u7A7A\uFF09\uFF0C\u5DF2\u4E2D\u6B62\u4E14\u672A\u5199\u5165\u7F13\u5B58\uFF1B\u8BF7\u786E\u8BA4\u62DB\u8058\u5E94\u7528\u5DF2\u5B89\u88C5\u3001\u8D26\u53F7\u5BF9\u8BE5\u8868\u5355\u6709\u6743\u9650\u540E\u91CD\u8BD5\u3002`
666
+ );
667
+ }
668
+ if (!forms.dictionary?.objId) degraded.push("dict");
669
+ const menus = await resolveRecruitMenus(host, appId);
670
+ const lists = menus.lists;
671
+ const menuShape = menus.menuShape;
672
+ warn.push(...menus.menuWarn);
591
673
  const fields = {};
592
674
  const fieldOptions = {};
593
675
  const resolvedForms = Object.entries(forms).filter(([, v]) => v.objId);
@@ -608,7 +690,7 @@ async function resolveRecruitEnv(host, appId) {
608
690
  const loadDict = async () => {
609
691
  if (dictObjId) {
610
692
  try {
611
- const page = await fetchAllDatasetRows(host, dictObjId, { pageSize: datasetPageSize(500), maxRows: 2e4 });
693
+ const page = await fetchAllDatasetRows(host, dictObjId, { pageSize: datasetPageSize(500), maxRows: 1e3 });
612
694
  if (page.truncated) warn.push("dict-truncated");
613
695
  for (const row of page.rows) {
614
696
  const main = row?.mainTable || {};
@@ -640,7 +722,7 @@ async function resolveRecruitEnv(host, appId) {
640
722
  const loadBizConfig = async () => {
641
723
  if (bizConfig.objId) {
642
724
  try {
643
- const page = await fetchAllDatasetRows(host, bizConfig.objId, { pageSize: datasetPageSize(100), maxRows: 5e3 });
725
+ const page = await fetchAllDatasetRows(host, bizConfig.objId, { pageSize: datasetPageSize(100), maxRows: 1e3 });
644
726
  if (page.truncated) warn.push("biz_config-truncated");
645
727
  for (const row of page.rows) {
646
728
  const main = row?.mainTable || {};
@@ -701,32 +783,6 @@ async function resolveRecruitEnv(host, appId) {
701
783
  } catch {
702
784
  }
703
785
  }
704
- const lists = {
705
- talent: null,
706
- demand: null,
707
- position: null,
708
- entry: null,
709
- offer: null,
710
- // dict / biz_config 仅作为菜单元数据保留(供 describeTargets 诊断);
711
- // 字典与业务配置的实际读取已改走 dataset/v2 B 通道,不再依赖这两个菜单项。
712
- interview: null,
713
- candidate: null,
714
- dict: searchMenus.find((m) => (m.menuName || "").trim() === "\u6570\u636E\u5B57\u5178") || null,
715
- biz_config: searchMenus.find((m) => (m.menuName || "").trim() === "\u4E1A\u52A1\u914D\u7F6E\u6620\u5C04\u8868") || null,
716
- all_search: searchMenus,
717
- pages
718
- };
719
- for (const [biz, keywords] of Object.entries(LIST_KEYWORDS)) {
720
- for (const menu of searchMenus) {
721
- if (keywords.some((keyword) => (menu.menuName || "").includes(keyword))) {
722
- lists[biz] = menu;
723
- break;
724
- }
725
- }
726
- }
727
- if (!menuFailed && flat.length > 0 && Object.keys(LIST_KEYWORDS).filter((k) => k !== "biz_config").every((k) => !lists[k])) {
728
- warn.push("menus-renamed");
729
- }
730
786
  const dedupe = (list) => [...new Set(list)];
731
787
  return {
732
788
  appId,
@@ -741,7 +797,8 @@ async function resolveRecruitEnv(host, appId) {
741
797
  options,
742
798
  dict: { by_name: dictByName, raw: dictRaw },
743
799
  ebdDetailPageId,
744
- selfUse
800
+ selfUse,
801
+ volatileSavedAt: Date.now()
745
802
  };
746
803
  }
747
804
  function listUnavailableHint(cache) {
@@ -777,21 +834,59 @@ function toCacheMeta(cache, source, savedAt, persisted = true) {
777
834
  function srcAge(saved, source) {
778
835
  return source === "rebuild" ? 0 : Math.max(0, Date.now() - saved);
779
836
  }
837
+ async function refreshVolatileMenus(host, appId, cache) {
838
+ const menus = await resolveRecruitMenus(host, appId);
839
+ const failed = menus.menuWarn.includes("menus");
840
+ const hasBizList = ["talent", "demand", "position", "entry", "offer", "interview", "candidate", "dict", "biz_config"].some((k) => !!cache.lists?.[k]);
841
+ if (!failed || !hasBizList) {
842
+ cache.lists = menus.lists;
843
+ cache.menuShape = menus.menuShape;
844
+ }
845
+ const keptWarn = (Array.isArray(cache.warn) ? cache.warn : []).filter((w) => w !== "menus" && w !== "menus-renamed");
846
+ cache.warn = [.../* @__PURE__ */ new Set([...keptWarn, ...menus.menuWarn])];
847
+ cache.volatileSavedAt = Date.now();
848
+ }
849
+ function adoptStableSchemaOnly(cache, currentUserId) {
850
+ cache.lists = {
851
+ talent: null,
852
+ demand: null,
853
+ position: null,
854
+ entry: null,
855
+ offer: null,
856
+ interview: null,
857
+ candidate: null,
858
+ dict: null,
859
+ biz_config: null,
860
+ all_search: [],
861
+ pages: []
862
+ };
863
+ cache.menuShape = "unavailable";
864
+ const kept = (Array.isArray(cache.warn) ? cache.warn : []).filter((w) => w !== "menus" && w !== "menus-renamed");
865
+ cache.warn = [.../* @__PURE__ */ new Set([...kept, "menus"])];
866
+ cache.ownerUserId = currentUserId || cache.ownerUserId || "";
867
+ cache.volatileSavedAt = 1;
868
+ }
780
869
  function createRecruitContextLoader() {
781
870
  const memo = /* @__PURE__ */ new Map();
782
871
  let last = null;
783
872
  async function load(host) {
784
873
  const session = await host.getSession();
785
874
  const baseUrl = session.baseUrl.replace(/\/+$/, "");
786
- const memoKey = baseUrl;
875
+ const currentUserId = String(session.userId || "");
876
+ const memoKey = baseUrl + "|" + currentUserId;
787
877
  const cached = memo.get(memoKey);
788
878
  if (cached) {
789
879
  const memoAge = Date.now() - Number(cached.savedAt || 0);
790
- const memoUsable = Number(cached.savedAt || 0) > 0 && memoAge <= recruitCacheTtlMs() && !(Array.isArray(cached.degraded) && cached.degraded.length) && hasCriticalFields(cached);
791
- if (memoUsable) {
880
+ const memoUsable = Number(cached.savedAt || 0) > 0 && memoAge <= recruitCacheTtlMs() && !(Array.isArray(cached.degraded) && cached.degraded.length) && codeHashOk(cached) && hasCriticalFields(cached);
881
+ if (memoUsable && volatileFresh(cached)) {
792
882
  last = toCacheMeta(cached, "memo", cached.savedAt, !isXiaoECloudRuntime());
793
883
  return cached;
794
884
  }
885
+ if (memoUsable && isXiaoECloudRuntime()) {
886
+ await refreshVolatileMenus(host, cached.appId, cached);
887
+ last = toCacheMeta(cached, "memo", cached.savedAt, false);
888
+ return cached;
889
+ }
795
890
  memo.delete(memoKey);
796
891
  }
797
892
  const cloudRuntime = isXiaoECloudRuntime();
@@ -814,8 +909,14 @@ function createRecruitContextLoader() {
814
909
  const candidate = JSON.parse(readFileSync(file, "utf8"));
815
910
  const savedAt = Number(candidate?.savedAt || 0);
816
911
  const fresh = savedAt > 0 && Date.now() - savedAt <= recruitCacheTtlMs();
817
- if (candidate && candidate.cacheVersion === RECRUIT_CACHE_VERSION && fresh && hasCriticalFields(candidate)) {
912
+ const ownerOk = !currentUserId && !candidate?.ownerUserId || !!currentUserId && !!candidate?.ownerUserId && String(candidate.ownerUserId) === currentUserId;
913
+ const ownerMismatch = !!currentUserId && !!candidate?.ownerUserId && String(candidate.ownerUserId) !== currentUserId;
914
+ const ownerUnprovable = !currentUserId && !!candidate?.ownerUserId;
915
+ if (candidate && (ownerOk || ownerMismatch || ownerUnprovable) && candidate.cacheVersion === RECRUIT_CACHE_VERSION && fresh && codeHashOk(candidate) && hasCriticalFields(candidate)) {
916
+ if (ownerMismatch || ownerUnprovable) adoptStableSchemaOnly(candidate, currentUserId);
917
+ else if (!volatileFresh(candidate)) await refreshVolatileMenus(host, appId, candidate);
818
918
  memo.set(memoKey, candidate);
919
+ persistContextCache(baseUrl, appId, candidate, { preserveSavedAt: true });
819
920
  last = toCacheMeta(candidate, "disk", savedAt);
820
921
  return candidate;
821
922
  }
@@ -837,8 +938,17 @@ function createRecruitContextLoader() {
837
938
  tagStillMatches = false;
838
939
  }
839
940
  if (tagStillMatches) {
840
- const adopted = { ...snapshot.resolved, cacheVersion: RECRUIT_CACHE_VERSION, savedAt: Date.now() };
841
- persistContextCache(baseUrl, appId, adopted);
941
+ const ownerMismatch = !!currentUserId && !!String(snapshot.ownerUserId || "") && String(snapshot.ownerUserId) !== currentUserId;
942
+ const adopted = {
943
+ ...snapshot.resolved,
944
+ cacheVersion: RECRUIT_CACHE_VERSION,
945
+ ownerUserId: currentUserId || snapshot.ownerUserId,
946
+ // 沿用快照的生成时间,不重置为 now:否则「快照 + 缓存」可把 12h 有效期叠成 24h(ISS-301 同族)。
947
+ savedAt: Number(snapshot.at) || Date.now()
948
+ };
949
+ if (ownerMismatch) adoptStableSchemaOnly(adopted, currentUserId);
950
+ else if (!volatileFresh(adopted)) await refreshVolatileMenus(host, appId, adopted);
951
+ persistContextCache(baseUrl, appId, adopted, { preserveSavedAt: true });
842
952
  memo.set(memoKey, adopted);
843
953
  last = toCacheMeta(adopted, "snapshot", adopted.savedAt);
844
954
  return adopted;
@@ -847,16 +957,21 @@ function createRecruitContextLoader() {
847
957
  const resolved = await resolveRecruitEnv(host, appId);
848
958
  const degradedNow = Array.isArray(resolved.degraded) && resolved.degraded.length > 0;
849
959
  const persisted = !degradedNow && !cloudRuntime;
850
- persistContextCache(baseUrl, appId, { ...resolved, cacheVersion: RECRUIT_CACHE_VERSION });
851
- writeContextSnapshot(baseUrl, appId, resolved);
852
- const withStamp = { ...resolved, savedAt: Date.now() };
960
+ const withStamp = {
961
+ ...resolved,
962
+ ownerUserId: currentUserId,
963
+ codeHash: recruitCodeHash(),
964
+ savedAt: Date.now()
965
+ };
966
+ persistContextCache(baseUrl, appId, withStamp);
967
+ writeContextSnapshot(baseUrl, appId, withStamp, currentUserId);
853
968
  if (!degradedNow) memo.set(memoKey, withStamp);
854
969
  last = toCacheMeta(withStamp, "rebuild", withStamp.savedAt, persisted);
855
970
  return withStamp;
856
971
  }
857
972
  return { load, lastMeta: () => last };
858
973
  }
859
- function persistContextCache(baseUrl, appId, cache) {
974
+ function persistContextCache(baseUrl, appId, cache, options = {}) {
860
975
  if (Array.isArray(cache?.degraded) && cache.degraded.length) {
861
976
  if (process.env.WEAVER_CLI_DEBUG_CACHE) {
862
977
  console.error("[recruit-context] \u89E3\u6790\u5B58\u5728\u81F4\u547D\u964D\u7EA7\uFF08", cache.degraded.join(","), "\uFF09\uFF0C\u672C\u6B21\u4E0D\u843D\u76D8\uFF0C\u4E0B\u6B21\u8C03\u7528\u5C06\u5168\u91CF\u91CD\u5EFA");
@@ -883,8 +998,11 @@ function persistContextCache(baseUrl, appId, cache) {
883
998
  envKey: `${dir.split(/[\\/]/).pop()}|${appId}`,
884
999
  ...cache,
885
1000
  cacheVersion: RECRUIT_CACHE_VERSION,
886
- // 🔴 savedAt 必须在 ...cache 之后:防止调用方携带旧 savedAt 把新写入标成过期
887
- savedAt: Date.now()
1001
+ codeHash: recruitCodeHash(),
1002
+ // 🔴 savedAt 必须在 ...cache 之后:防止调用方携带旧 savedAt 把新写入标成过期。
1003
+ // 命中回写(preserveSavedAt)例外:沿用调用方原 savedAt,只更新 volatileSavedAt 等易变字段,
1004
+ // 否则每次命中都会刷新主 TTL,12h 自愈永久失效。
1005
+ savedAt: options.preserveSavedAt && Number(cache?.savedAt || 0) > 0 ? Number(cache.savedAt) : Date.now()
888
1006
  }, null, 2),
889
1007
  "utf8"
890
1008
  );
@@ -6,7 +6,7 @@ import {
6
6
  CAIZHILIAN_BUSINESS_FALLBACK_MESSAGE,
7
7
  caizhilianBusinessMessage,
8
8
  isCaizhilianBusinessSuccess
9
- } from "./chunk-5D2V7ZAN.js";
9
+ } from "./chunk-PMRNIGKZ.js";
10
10
  import {
11
11
  CaizhilianCliError,
12
12
  caizhilianAuthError,
@@ -2,11 +2,11 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-I6NOHKEK.js";
5
+ } from "./chunk-7SQN5IZR.js";
6
6
  import {
7
7
  meetingSuccess,
8
8
  meetingValidationError
9
- } from "./chunk-ERZY6GYL.js";
9
+ } from "./chunk-UZ2E3VNI.js";
10
10
 
11
11
  // src/shortcuts/meeting/operations/eb/entry-mode.ts
12
12
  import { join, dirname } from "node:path";
@@ -12,7 +12,7 @@ import {
12
12
  meetingValidationError,
13
13
  queryBody,
14
14
  toIdCsv
15
- } from "./chunk-ERZY6GYL.js";
15
+ } from "./chunk-UZ2E3VNI.js";
16
16
 
17
17
  // src/shortcuts/meeting/operations/eb/conflict.ts
18
18
  var ACTIVE_MT_STATUS = "1,2,8,9";
@@ -146,7 +146,7 @@ async function collectMemberConflicts(members, begin, end, excludeMtId, env, ope
146
146
  let candidates = allCandidates;
147
147
  let prefilterSkipped = 0;
148
148
  try {
149
- const { resolveEmployeeNames } = await import("./create-flow-7ZRBRKX7.js");
149
+ const { resolveEmployeeNames } = await import("./create-flow-ERDGW3FZ.js");
150
150
  const names = await resolveEmployeeNames(env, members);
151
151
  const tokens = [...members, ...names.values()].map((token) => String(token ?? "").trim()).filter((token) => token !== "");
152
152
  if (tokens.length > 0) {
@@ -315,7 +315,7 @@ var ebMeetingWritePreflight = async ({ endpoint, payload, args, env, extras }) =
315
315
  const items = rawMembers.split(/[,;,;]+/u).map((item) => item.trim()).filter((item) => item !== "");
316
316
  const nameLike = items.filter((item) => !/^\d+$/u.test(item));
317
317
  if (nameLike.length > 0) {
318
- const { resolveMemberIdsByName } = await import("./schedule-XOISYUPB.js");
318
+ const { resolveMemberIdsByName } = await import("./schedule-XBKY7VEA.js");
319
319
  const idsByName = await resolveMemberIdsByName(env, nameLike);
320
320
  const resolved = items.map((item) => idsByName.get(item) ?? item);
321
321
  payload.mainTable.hrm_members = [...new Set(resolved)].join(",");
@@ -429,7 +429,7 @@ var ebConflictRoom = {
429
429
  resource: "eb",
430
430
  method: "meeting.eb.conflict.room",
431
431
  action: "meeting.eb.conflict.room",
432
- summary: "EB \u7248\u4F1A\u8BAE\u5BA4\u51B2\u7A81\u68C0\u6D4B\uFF08query_roomusage_list \u67E5\u8BE5\u4F1A\u8BAE\u5BA4\u65F6\u6BB5\u5185\u5360\u7528\uFF09\uFF1A\u6309\u5E94\u7528\u8BBE\u7F6E room_conflict_chk/room_conflict \u7ED9\u51FA verdict",
432
+ summary: "EB \u7248\u4F1A\u8BAE\u5BA4\u51B2\u7A81\u68C0\u6D4B\uFF08query_roomusage_list \u67E5\u8BE5\u4F1A\u8BAE\u5BA4\u65F6\u6BB5\u5185\u5360\u7528\uFF09\uFF1A\u6309\u5E94\u7528\u8BBE\u7F6E room_conflict_chk/room_conflict \u7ED9\u51FA verdict\u3002\u53EA\u7528\u4E8E\u300C\u53EA\u95EE\u4E0D\u5EFA\u300D\uFF1B\u7528\u6237\u8981\u5EFA\u4F1A\u8BF7\u76F4\u63A5 create.flow.prepare \u2014\u2014 \u5B83\u5185\u90E8\u5224\u51B2\u7A81\uFF0C\u88AB\u5360\u4F1A\u81EA\u52A8\u6362\u623F\u5E76\u7ED9\u51FA\u66FF\u4EE3\u623F",
433
433
  capability: "eb.conflict",
434
434
  risk: "read",
435
435
  inputSchema: {
@@ -448,7 +448,7 @@ var ebConflictRoom = {
448
448
  let addressId = String(args.address ?? "").trim();
449
449
  let resolvedRoom = null;
450
450
  if (!addressId && String(args.room_name ?? "").trim()) {
451
- const { resolveAddressRoom } = await import("./create-flow-7ZRBRKX7.js");
451
+ const { resolveAddressRoom } = await import("./create-flow-ERDGW3FZ.js");
452
452
  const resolved = await resolveAddressRoom(env, String(args.room_name));
453
453
  if (!resolved?.id) {
454
454
  throw meetingValidationError(
@@ -638,7 +638,7 @@ async function findCommonFreeSlots(env, input) {
638
638
  let meetings = allMeetings;
639
639
  let prefilterSkipped = 0;
640
640
  try {
641
- const { resolveEmployeeNames } = await import("./create-flow-7ZRBRKX7.js");
641
+ const { resolveEmployeeNames } = await import("./create-flow-ERDGW3FZ.js");
642
642
  const names2 = await resolveEmployeeNames(env, members);
643
643
  const tokens = [...members, ...names2.values()].map((token) => String(token ?? "").trim()).filter((token) => token !== "");
644
644
  if (tokens.length > 0 && process.env.WEAVER_MEETING_NO_PREFILTER !== "1") {
@@ -676,7 +676,7 @@ async function findCommonFreeSlots(env, input) {
676
676
  const scheduleItems = [];
677
677
  if (includeSchedule) {
678
678
  try {
679
- const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-XOISYUPB.js");
679
+ const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-XBKY7VEA.js");
680
680
  const dayBegin = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 0, 0, 0, 0);
681
681
  const dayEnd = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 23, 59, 0, 0);
682
682
  const flow = await runScheduleConflictFlow(env, {