weaver-work-cli 0.1.40 → 0.1.44

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 (401) hide show
  1. package/README.md +17 -0
  2. package/dist/chunks/{archive-JHTONRST.js → archive-P6TBQGKL.js} +13 -5
  3. package/dist/chunks/{archive-oa-FCHLCPHC.js → archive-oa-7TQ2NXOH.js} +12 -5
  4. package/dist/chunks/{asset-RLIHC7DB.js → asset-3ELRG37G.js} +11 -4
  5. package/dist/chunks/{asset-idle-KVOFTLCP.js → asset-idle-WIGMUFMD.js} +7 -3
  6. package/dist/chunks/{attachment-content-RZYDB3MB.js → attachment-content-E3276UOV.js} +5 -4
  7. package/dist/chunks/{blog-42OZTJNP.js → blog-C5NMZAAC.js} +11 -4
  8. package/dist/chunks/{caizhilian-KRK547K5.js → caizhilian-5XSM2DFP.js} +13 -6
  9. package/dist/chunks/{calendar-RTWAMKHD.js → calendar-FI2WNSBO.js} +71 -26
  10. package/dist/chunks/{chunk-CXRQWOZ5.js → chunk-3YBDYOC4.js} +3 -3
  11. package/dist/chunks/{chunk-OOUTBLZ4.js → chunk-56EZERK4.js} +1 -1
  12. package/dist/chunks/chunk-6N4JPNFL.js +76 -0
  13. package/dist/chunks/{chunk-ZUX3P6BQ.js → chunk-727FH2NI.js} +1 -1
  14. package/dist/chunks/chunk-7BDPM5ST.js +11 -0
  15. package/dist/chunks/{chunk-LN447PY2.js → chunk-BCVYBYYT.js} +432 -2247
  16. package/dist/chunks/{chunk-7E6MUOEK.js → chunk-CWYGFU5B.js} +2 -2
  17. package/dist/chunks/{chunk-NOODWMCL.js → chunk-D4ADSZ7H.js} +1 -1
  18. package/dist/chunks/{chunk-WFFNM65B.js → chunk-ETNJSKMM.js} +281 -29
  19. package/dist/chunks/{chunk-CAQNBBQA.js → chunk-F4E4EM35.js} +3 -3
  20. package/dist/chunks/{chunk-4CTESSKI.js → chunk-FAZTGX7S.js} +6 -6
  21. package/dist/chunks/chunk-FRZKBMSW.js +2562 -0
  22. package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
  23. package/dist/chunks/{chunk-NJKREDA3.js → chunk-GAMZLAG2.js} +1 -1
  24. package/dist/chunks/{chunk-FLS4DPGP.js → chunk-GM6J7Q4B.js} +28 -15
  25. package/dist/chunks/{chunk-NETCCARD.js → chunk-GRDRG6HP.js} +3 -3
  26. package/dist/chunks/chunk-HIT4Y6OI.js +1238 -0
  27. package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
  28. package/dist/chunks/{chunk-IZSSVYAG.js → chunk-IAZ3UPY6.js} +3 -3
  29. package/dist/chunks/{chunk-ZEDWSH32.js → chunk-IC62NFM5.js} +1 -1
  30. package/dist/chunks/{chunk-P26ZWSKU.js → chunk-KIHNAS25.js} +5 -2
  31. package/dist/chunks/{chunk-57IECMWX.js → chunk-N4M2DDFE.js} +29 -15
  32. package/dist/chunks/{chunk-JWRZM2H2.js → chunk-OF4S23UB.js} +4 -4
  33. package/dist/chunks/{chunk-VNBU55SL.js → chunk-PC7VKEB5.js} +80 -2458
  34. package/dist/chunks/{chunk-G2JSIUWF.js → chunk-PUQS5MWL.js} +91 -2
  35. package/dist/chunks/{chunk-E7OK5WD5.js → chunk-Q4OYAQYH.js} +5 -5
  36. package/dist/chunks/{chunk-7BRU4EFH.js → chunk-QVSWRLLU.js} +35 -6
  37. package/dist/chunks/{chunk-T6EGVBKU.js → chunk-TA7FXXJD.js} +6 -3
  38. package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
  39. package/dist/chunks/{chunk-4TEDNCON.js → chunk-UFIT2UU3.js} +354 -56
  40. package/dist/chunks/{chunk-LUSPKZKY.js → chunk-UG5G54VL.js} +1 -0
  41. package/dist/chunks/{chunk-NIAJ5ZCG.js → chunk-UL5XUQ25.js} +5 -2
  42. package/dist/chunks/{chunk-FMPJJYYI.js → chunk-WRXSAVKO.js} +1 -1
  43. package/dist/chunks/{chunk-7U577Q7U.js → chunk-WSF4NNMR.js} +3 -3
  44. package/dist/chunks/chunk-XHK4MDR5.js +2497 -0
  45. package/dist/chunks/{chunk-LFMSDBZN.js → chunk-XNIK66I4.js} +326 -161
  46. package/dist/chunks/{chunk-3SO6QL6U.js → chunk-YWX377BY.js} +5 -2
  47. package/dist/chunks/{chunk-BYATLLEF.js → chunk-Z3GDFVJR.js} +1 -1
  48. package/dist/chunks/{chunk-I566ZYNF.js → chunk-Z7VYWPZV.js} +1 -1
  49. package/dist/chunks/{conflict-VR55AOOO.js → conflict-ARLSZJ6V.js} +4 -3
  50. package/dist/chunks/{continuation-2CKSBLA6.js → continuation-3S37AUSH.js} +4 -3
  51. package/dist/chunks/{continuation-RN6PZN2M.js → continuation-3XLYYTKV.js} +4 -3
  52. package/dist/chunks/{continuation-HZIZRZBX.js → continuation-HFW2YT5S.js} +4 -3
  53. package/dist/chunks/{continuation-NLECEJPX.js → continuation-KI7DRRZN.js} +4 -3
  54. package/dist/chunks/{contract-HI4FNPYE.js → contract-DNIIW5VJ.js} +13 -5
  55. package/dist/chunks/{cowork-HJLI353D.js → cowork-GMLRGVIW.js} +31 -14
  56. package/dist/chunks/create-flow-J22BO65E.js +56 -0
  57. package/dist/chunks/{ebuilder-form-HTGI63UU.js → ebuilder-form-ANV2FHYV.js} +12 -7
  58. package/dist/chunks/{ehr-GYXIYH3A.js → ehr-GSTGAIY3.js} +695 -1255
  59. package/dist/chunks/{employee-SAK2QYXX.js → employee-22BGJ3QS.js} +3 -3
  60. package/dist/chunks/{env-DW3G4HUO.js → env-BX3VRFS7.js} +4 -3
  61. package/dist/chunks/{esb-I5INCEFE.js → esb-ATAIASX2.js} +12 -7
  62. package/dist/chunks/{factory-TKXGXS6L.js → factory-PETTFME6.js} +3 -2
  63. package/dist/chunks/{fna-K2MHTQ24.js → fna-YEKBSFSX.js} +14 -8
  64. package/dist/chunks/{group-chat-VYBNMJLG.js → group-chat-BFVXAYFX.js} +7 -4
  65. package/dist/chunks/{host-D5SERMAJ.js → host-HRBXEPDQ.js} +5 -5
  66. package/dist/chunks/{host-JM4YVHFM.js → host-LR55CTHP.js} +5 -5
  67. package/dist/chunks/{host-L3VLITMT.js → host-SUOY6VYQ.js} +5 -5
  68. package/dist/chunks/{host-ZUQTJYYK.js → host-SZGV4UNT.js} +5 -5
  69. package/dist/chunks/{host-256GVCAH.js → host-WIKN2EJ5.js} +5 -5
  70. package/dist/chunks/{hrm-VLRBKTZB.js → hrm-NRDO4W5G.js} +11 -7
  71. package/dist/chunks/{im-QK3VTLXK.js → im-IQ2HN23S.js} +11 -10
  72. package/dist/chunks/{invoice-T5JTA32H.js → invoice-MNRW76PP.js} +636 -1768
  73. package/dist/chunks/{jiuchuanhui-P2FNEQVZ.js → jiuchuanhui-DTRBAX4N.js} +14 -6
  74. package/dist/chunks/{lazy-dispatch-XRRI46M6.js → lazy-dispatch-ZVWAI25B.js} +7 -6
  75. package/dist/chunks/{mail-3Y7MJ6PS.js → mail-ZVAUXOJA.js} +16 -14
  76. package/dist/chunks/{meeting-M7LTXGJE.js → meeting-FEVPZ67S.js} +21 -13
  77. package/dist/chunks/{okr-OBC6S67L.js → okr-SDH3E5RA.js} +12 -5
  78. package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
  79. package/dist/chunks/{plan-5H6I53SK.js → plan-E35JFDI7.js} +12 -5
  80. package/dist/chunks/{project-L75QZV4S.js → project-73QXBAB2.js} +49 -25
  81. package/dist/chunks/reception-UWZVACBN.js +1899 -0
  82. package/dist/chunks/recruit-stage-4MAOCKFY.js +4770 -0
  83. package/dist/chunks/registry-IM5G23LS.js +24 -0
  84. package/dist/chunks/{registry-UGRBCBHO.js → registry-JDUS4E7D.js} +7 -6
  85. package/dist/chunks/{registry-RXPN6BBT.js → registry-KNKSCJNT.js} +7 -6
  86. package/dist/chunks/{registry-NYPYMZXG.js → registry-PO7SI256.js} +4 -4
  87. package/dist/chunks/{registry-QGHFNUWS.js → registry-PVUZQDDQ.js} +3 -3
  88. package/dist/chunks/{room-recommend-A3UDC3CA.js → room-recommend-H7KLXA5R.js} +6 -5
  89. package/dist/chunks/{schedule-5GCACCK7.js → schedule-ESZIBAUO.js} +6 -5
  90. package/dist/chunks/{workflow-M5ZJ7DWF.js → workflow-CWJFJLQU.js} +15 -10
  91. package/dist/cmd/action.js +6 -0
  92. package/dist/cmd/identity/index.js +45 -0
  93. package/dist/cmd/index.js +2 -0
  94. package/dist/core/continuation-ttl.js +18 -0
  95. package/dist/core/error-codes.js +85 -0
  96. package/dist/core/logger.js +11 -0
  97. package/dist/index.js +41 -30
  98. package/dist/internal/e10/auth/commands.js +164 -8
  99. package/dist/internal/e10/auth/error-log.js +182 -0
  100. package/dist/internal/e10/auth/messages.js +6 -0
  101. package/dist/internal/e10/auth/session.js +34 -3
  102. package/dist/internal/e10/auth/xiaoe.js +286 -44
  103. package/dist/internal/e10/auth-recovery.js +72 -14
  104. package/dist/internal/e10/context.js +72 -13
  105. package/dist/internal/e10/index.js +1 -1
  106. package/dist/internal/e10/network-error.js +93 -0
  107. package/dist/internal/e10/request-runtime.js +6 -0
  108. package/dist/internal/skills/install.js +9 -1
  109. package/dist/shortcuts/archive/continuation.js +2 -1
  110. package/dist/shortcuts/archive/index.js +3 -0
  111. package/dist/shortcuts/archive/operations/confirm.js +2 -1
  112. package/dist/shortcuts/archive-oa/continuation.js +2 -1
  113. package/dist/shortcuts/archive-oa/index.js +2 -0
  114. package/dist/shortcuts/archive-oa/operations/confirm.js +2 -1
  115. package/dist/shortcuts/asset/continuation.js +2 -1
  116. package/dist/shortcuts/asset/index.js +2 -0
  117. package/dist/shortcuts/asset-idle/index.js +2 -0
  118. package/dist/shortcuts/blog/continuation.js +2 -1
  119. package/dist/shortcuts/blog/index.js +2 -0
  120. package/dist/shortcuts/caizhilian/continuation.js +2 -1
  121. package/dist/shortcuts/caizhilian/index.js +2 -0
  122. package/dist/shortcuts/caizhilian/operations/confirm.js +3 -2
  123. package/dist/shortcuts/calendar/continuation.js +2 -1
  124. package/dist/shortcuts/calendar/index.js +2 -0
  125. package/dist/shortcuts/calendar/operations/read.js +31 -22
  126. package/dist/shortcuts/calendar/operations/write.js +46 -2
  127. package/dist/shortcuts/contract/continuation.js +2 -1
  128. package/dist/shortcuts/contract/index.js +2 -0
  129. package/dist/shortcuts/contract/operations/write.js +2 -1
  130. package/dist/shortcuts/cowork/continuation.js +2 -1
  131. package/dist/shortcuts/cowork/index.js +2 -0
  132. package/dist/shortcuts/cowork/operations/discuss-write.js +5 -1
  133. package/dist/shortcuts/cowork/operations/item-write.js +1 -7
  134. package/dist/shortcuts/cowork/operations/member-write.js +3 -1
  135. package/dist/shortcuts/cowork/operations/permission-write.js +5 -1
  136. package/dist/shortcuts/cowork/operations/shared.js +7 -0
  137. package/dist/shortcuts/ebuilder-form/continuation.js +2 -1
  138. package/dist/shortcuts/ebuilder-form/index.js +2 -0
  139. package/dist/shortcuts/ebuilder-form/operations/write.js +3 -2
  140. package/dist/shortcuts/ehr/continuation.js +2 -1
  141. package/dist/shortcuts/ehr/index.js +2 -0
  142. package/dist/shortcuts/ehr/operations/attend-write.js +44 -2
  143. package/dist/shortcuts/ehr/operations/hr-contact.js +7 -4
  144. package/dist/shortcuts/ehr/operations/hr-report.js +13 -7
  145. package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +317 -63
  146. package/dist/shortcuts/ehr/operations/recruit-position.js +134 -2
  147. package/dist/shortcuts/ehr/operations/recruit-write.js +263 -18
  148. package/dist/shortcuts/ehr/operations/recruit.js +10 -4
  149. package/dist/shortcuts/ehr/operations/shared.js +47 -0
  150. package/dist/shortcuts/esb/continuation.js +2 -1
  151. package/dist/shortcuts/esb/index.js +2 -0
  152. package/dist/shortcuts/esb/operations/trigger.js +2 -1
  153. package/dist/shortcuts/fna/continuation.js +2 -1
  154. package/dist/shortcuts/fna/index.js +2 -0
  155. package/dist/shortcuts/fna/operations/invoice-writeoff.js +1 -1
  156. package/dist/shortcuts/fna/operations/loan.js +1 -1
  157. package/dist/shortcuts/hrm/index.js +2 -0
  158. package/dist/shortcuts/hrm/operations/org.js +118 -0
  159. package/dist/shortcuts/im/continuation.js +2 -1
  160. package/dist/shortcuts/index.js +10 -0
  161. package/dist/shortcuts/invoice/continuation.js +2 -1
  162. package/dist/shortcuts/invoice/index.js +14 -15
  163. package/dist/shortcuts/invoice/invoice-record.js +93 -0
  164. package/dist/shortcuts/invoice/manifest.js +190 -393
  165. package/dist/shortcuts/invoice/operations/add.js +2 -1
  166. package/dist/shortcuts/invoice/operations/delete.js +2 -1
  167. package/dist/shortcuts/invoice/operations/import.js +2 -1
  168. package/dist/shortcuts/invoice/operations/issuing-contract-detail.js +86 -0
  169. package/dist/shortcuts/invoice/operations/issuing-contracts.js +210 -0
  170. package/dist/shortcuts/invoice/operations/registry.js +17 -17
  171. package/dist/shortcuts/invoice/operations/reim-auto.js +4 -569
  172. package/dist/shortcuts/invoice/operations/reim.js +52 -341
  173. package/dist/shortcuts/invoice/operations/shared.js +21 -4
  174. package/dist/shortcuts/invoice/operations/update.js +2 -1
  175. package/dist/shortcuts/invoice/projection.js +10 -62
  176. package/dist/shortcuts/jiuchuanhui/continuation.js +2 -1
  177. package/dist/shortcuts/jiuchuanhui/index.js +2 -0
  178. package/dist/shortcuts/jiuchuanhui/operations/datajson.js +2 -1
  179. package/dist/shortcuts/jiuchuanhui/operations/esb.js +2 -1
  180. package/dist/shortcuts/mail/continuation.js +2 -1
  181. package/dist/shortcuts/mail/index.js +2 -0
  182. package/dist/shortcuts/mail/operations/mail-blacklist.js +1 -1
  183. package/dist/shortcuts/mail/operations/mail-contacts.js +1 -1
  184. package/dist/shortcuts/mail/operations/mail-send.js +1 -1
  185. package/dist/shortcuts/mail/operations/mail-sign.js +1 -1
  186. package/dist/shortcuts/mail/operations/mail-template.js +1 -1
  187. package/dist/shortcuts/meeting/continuation.js +2 -1
  188. package/dist/shortcuts/meeting/index.js +2 -0
  189. package/dist/shortcuts/meeting/operations/change.js +1 -1
  190. package/dist/shortcuts/meeting/operations/create.js +1 -1
  191. package/dist/shortcuts/meeting/operations/eb/catalog.js +4 -1
  192. package/dist/shortcuts/meeting/operations/eb/create-flow.js +101 -35
  193. package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
  194. package/dist/shortcuts/meeting/operations/eb/factory.js +34 -1
  195. package/dist/shortcuts/meeting/operations/eb/group-chat.js +25 -3
  196. package/dist/shortcuts/meeting/operations/eb/person-cache.js +96 -0
  197. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +33 -11
  198. package/dist/shortcuts/meeting/operations/lifecycle.js +1 -1
  199. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  200. package/dist/shortcuts/meeting/operations/signs.js +1 -1
  201. package/dist/shortcuts/okr/continuation.js +2 -1
  202. package/dist/shortcuts/okr/index.js +2 -0
  203. package/dist/shortcuts/okr/operations/write.js +1 -1
  204. package/dist/shortcuts/plan/continuation.js +2 -1
  205. package/dist/shortcuts/plan/index.js +2 -0
  206. package/dist/shortcuts/plan/operations/write.js +1 -1
  207. package/dist/shortcuts/project/continuation.js +2 -1
  208. package/dist/shortcuts/project/index.js +2 -0
  209. package/dist/shortcuts/project/operations/read.js +6 -25
  210. package/dist/shortcuts/project/operations/shared.js +22 -0
  211. package/dist/shortcuts/project/operations/write.js +28 -2
  212. package/dist/shortcuts/reception/constants.js +53 -0
  213. package/dist/shortcuts/reception/errors.js +54 -0
  214. package/dist/shortcuts/reception/host.js +125 -0
  215. package/dist/shortcuts/reception/index.js +198 -0
  216. package/dist/shortcuts/reception/manifest.js +177 -0
  217. package/dist/shortcuts/reception/operations/ask.js +71 -0
  218. package/dist/shortcuts/reception/operations/browsertool.js +58 -0
  219. package/dist/shortcuts/reception/operations/compose.js +129 -0
  220. package/dist/shortcuts/reception/operations/customparams.js +74 -0
  221. package/dist/shortcuts/reception/operations/doc.js +238 -0
  222. package/dist/shortcuts/reception/operations/docrender.js +36 -0
  223. package/dist/shortcuts/reception/operations/panels.js +179 -0
  224. package/dist/shortcuts/reception/operations/registry.js +26 -0
  225. package/dist/shortcuts/reception/operations/render-assets.js +184 -0
  226. package/dist/shortcuts/reception/operations/render.js +123 -0
  227. package/dist/shortcuts/reception/operations/runs.js +38 -0
  228. package/dist/shortcuts/reception/operations/schedule.js +127 -0
  229. package/dist/shortcuts/reception/operations/shared.js +196 -0
  230. package/dist/shortcuts/reception/operations/snapshot.js +68 -0
  231. package/dist/shortcuts/reception/operations/types.js +1 -0
  232. package/dist/shortcuts/reception/operations.js +33 -0
  233. package/dist/shortcuts/reception/upload.js +218 -0
  234. package/dist/shortcuts/recruit-stage/context.js +231 -0
  235. package/dist/shortcuts/recruit-stage/continuation.js +74 -0
  236. package/dist/shortcuts/recruit-stage/errors.js +65 -0
  237. package/dist/shortcuts/recruit-stage/host.js +109 -0
  238. package/dist/shortcuts/recruit-stage/index.js +115 -0
  239. package/dist/shortcuts/recruit-stage/manifest.js +29 -0
  240. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +722 -0
  241. package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +269 -0
  242. package/dist/shortcuts/recruit-stage/operations/jd-create.js +719 -0
  243. package/dist/shortcuts/recruit-stage/operations/list.js +431 -0
  244. package/dist/shortcuts/recruit-stage/operations/registry.js +38 -0
  245. package/dist/shortcuts/recruit-stage/operations/resume-import.js +1354 -0
  246. package/dist/shortcuts/recruit-stage/operations/search.js +158 -0
  247. package/dist/shortcuts/recruit-stage/operations/types.js +25 -0
  248. package/dist/shortcuts/recruit-stage/school-tiers.json +318 -0
  249. package/dist/shortcuts/recruit-stage/shared.js +608 -0
  250. package/dist/shortcuts/workflow/continuation.js +2 -1
  251. package/dist/shortcuts/workflow/index.js +2 -0
  252. package/dist/shortcuts/workflow/operations/form.js +32 -8
  253. package/dist/shortcuts/workflow/operations/todoSmartConvert/detailFieldRules.js +4 -2
  254. package/dist/shortcuts/workflow/operations/todoSmartConvert/summaryCache.js +13 -6
  255. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailCache.js +17 -24
  256. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailFetcher.js +14 -9
  257. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +50 -8
  258. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +2 -1
  259. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.detail.js +17 -11
  260. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +7 -39
  261. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +3 -2
  262. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +51 -15
  263. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.pipeline.js +16 -1
  264. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +151 -63
  265. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subGroup.js +56 -0
  266. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +39 -14
  267. package/dist/shortcuts/workflow/operations/write.js +1 -1
  268. package/docs/_catalog.md +3 -0
  269. package/docs/agent-invoice.md +1 -1
  270. package/docs/archive-oa.md +1 -1
  271. package/docs/caizhilian.md +1 -1
  272. package/docs/calendar.md +1 -1
  273. package/docs/contract.md +1 -1
  274. package/docs/e10-auth.md +23 -1
  275. package/docs/ehr.md +2 -2
  276. package/docs/esb.md +1 -1
  277. package/docs/im.md +1 -1
  278. package/docs/invoice.md +8 -12
  279. package/docs/okr.md +1 -1
  280. package/docs/operation-manual.md +8 -0
  281. package/docs/reception.md +119 -0
  282. package/package.json +1 -1
  283. package/scripts/clean.mjs +43 -2
  284. package/scripts/install-skill-to-xiaoe.mjs +105 -0
  285. package/scripts/package-skill.mjs +4 -2
  286. package/skill-template/business-info.json +42 -2
  287. package/skill-template/domains/caizhilian.md +1 -1
  288. package/skill-template/domains/reception-flow.md +18 -0
  289. package/skill-template/domains/recruit-stage.md +29 -0
  290. package/skill-template/domains/yepiaotong.md +4 -7
  291. package/skills/weaver-e10-archive-oa/references/source-manifest.json +14 -14
  292. package/skills/weaver-e10-blog/references/blog-publish.md +1 -1
  293. package/skills/weaver-e10-blog/references/source-manifest.json +7 -7
  294. package/skills/weaver-e10-caizhilian/references/source-manifest.json +21 -21
  295. package/skills/weaver-e10-caizhilian/references/write-protocol.md +2 -2
  296. package/skills/weaver-e10-calendar/SKILL.md +2 -1
  297. package/skills/weaver-e10-calendar/references/calendar-write.md +55 -1
  298. package/skills/weaver-e10-cowork/SKILL.md +1 -1
  299. package/skills/weaver-e10-cowork/references/cowork-write.md +3 -1
  300. package/skills/weaver-e10-ebuilder-form/SKILL.md +1 -1
  301. package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -1
  302. package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -1
  303. package/skills/weaver-e10-esb/SKILL.md +2 -2
  304. package/skills/weaver-e10-esb/references/source-manifest.json +22 -22
  305. package/skills/weaver-e10-esb/references/trigger.md +2 -2
  306. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
  307. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +1 -1
  308. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +1 -1
  309. package/skills/weaver-e10-jinchengda/references/source-manifest.json +29 -29
  310. package/skills/weaver-e10-jucailin/SKILL.md +1 -1
  311. package/skills/weaver-e10-jucailin/references/attend-write.md +10 -2
  312. package/skills/weaver-e10-jucailin/references/hr-contact.md +8 -0
  313. package/skills/weaver-e10-jucailin/references/hr-report.md +8 -0
  314. package/skills/weaver-e10-jucailin/references/recruit-create.md +14 -5
  315. package/skills/weaver-e10-jucailin/references/recruit-read.md +1 -1
  316. package/skills/weaver-e10-jucailin/references/recruit-write.md +5 -4
  317. package/skills/weaver-e10-mail/SKILL.md +1 -1
  318. package/skills/weaver-e10-meeting/SKILL.md +39 -7
  319. package/skills/weaver-e10-meeting/references/meeting-change.md +1 -1
  320. package/skills/weaver-e10-meeting/references/meeting-create.md +1 -1
  321. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +1 -1
  322. package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
  323. package/skills/weaver-e10-okr/references/okr-align.md +1 -1
  324. package/skills/weaver-e10-okr/references/okr-keyresult.md +1 -1
  325. package/skills/weaver-e10-okr/references/okr-write.md +1 -1
  326. package/skills/weaver-e10-okr/references/source-manifest.json +8 -8
  327. package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
  328. package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
  329. package/skills/weaver-e10-qiyecheng/references/loan-management.md +1 -1
  330. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +18 -18
  331. package/skills/weaver-e10-reception-flow/SKILL.md +173 -0
  332. package/skills/weaver-e10-reception-flow/assets//350/241/214/347/250/213/345/215/225/346/250/241/346/235/277-/346/263/233/345/276/256.docx +0 -0
  333. package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +213 -0
  334. package/skills/weaver-e10-reception-flow/references/browsertool.md +68 -0
  335. package/skills/weaver-e10-reception-flow/references/env-pitfalls.md +51 -0
  336. package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +227 -0
  337. package/skills/weaver-e10-reception-flow/references/guide.md +179 -0
  338. package/skills/weaver-e10-reception-flow/scripts/locate.sh +14 -0
  339. package/skills/weaver-e10-reception-flow/scripts/render.py +724 -0
  340. package/skills/weaver-e10-recruit-stage/SKILL.md +230 -0
  341. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +119 -0
  342. package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +188 -0
  343. package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +66 -0
  344. package/skills/weaver-e10-recruit-stage/references/position-templates.md +202 -0
  345. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +322 -0
  346. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +127 -0
  347. package/skills/weaver-e10-recruit-stage/references/recruit-check-install.md +65 -0
  348. package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +63 -0
  349. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +142 -0
  350. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +95 -0
  351. package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +56 -0
  352. package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +101 -0
  353. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +148 -0
  354. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +77 -0
  355. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +59 -0
  356. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +69 -0
  357. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +241 -0
  358. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +451 -0
  359. package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +128 -0
  360. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +146 -0
  361. package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +69 -0
  362. package/skills/weaver-e10-shared/SKILL.md +1 -1
  363. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +10 -2
  364. package/skills/weaver-e10-shijingran/SKILL.md +7 -6
  365. package/skills/weaver-e10-shijingran/references/operations.md +3 -1
  366. package/skills/weaver-e10-shijingran/references/source-manifest.json +30 -28
  367. package/skills/weaver-e10-shijingran/references/write-operations.md +2 -0
  368. package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +2 -0
  369. package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
  370. package/skills/weaver-e10-workflow/SKILL.md +4 -2
  371. package/skills/weaver-e10-workflow/aigroup/default.json +11 -9
  372. package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
  373. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +23 -13
  374. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +62 -20
  375. package/skills/weaver-e10-yepiaotong/SKILL.md +28 -36
  376. package/skills/weaver-e10-yepiaotong/references/invoice-agent-entry.md +6 -3
  377. package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +13 -10
  378. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +2 -0
  379. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +194 -155
  380. package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +28 -32
  381. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +5 -1
  382. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +8 -10
  383. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +211 -616
  384. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +149 -117
  385. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +17 -20
  386. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +20 -39
  387. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +55 -22
  388. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -17
  389. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +88 -92
  390. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +144 -354
  391. package/skills/weaver-e10-yimiaoban/SKILL.md +1 -1
  392. package/skills/weaver-e10-yimiaoban/references/msg-write.md +1 -1
  393. package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
  394. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +7 -7
  395. package/dist/chunks/chunk-SPRHHSVC.js +0 -465
  396. package/dist/chunks/registry-KMHCPAAD.js +0 -22
  397. package/dist/shortcuts/invoice/markdown.js +0 -172
  398. package/dist/shortcuts/invoice/operations/issuing-qys.js +0 -424
  399. package/skills/weaver-e10-meeting.zip +0 -0
  400. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +0 -131
  401. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +0 -179
@@ -245,7 +245,7 @@ weaver-work-cli --json caizhilian run caizhilian.attachment.download --input-jso
245
245
  - **枚举拼写 1:1 沿用源接口**:权限相关键是 `deletePremisstion` / `downloadPremisstion` / `newCreateDocPremisstion` / `newCreateFolderPremisstion` / `settingPermission`(源拼写 `Premisstion`,不要改成 `Permission`)。
246
246
  - **根文件夹约定**:`folder_id` 100 = 系统、200 = 公共、300 = 个人;`folder_type` / `kb_type` 取 `company` / `privy` / `sys`。`folder.create` 在 `parent_type=privy` 时强制 `sequence=0`、`inherit_parent=false`。
247
247
  - **分页语义**:`has_next = 本页条数 >= page_size`;`page_no` / `page_size <= 0` 报 `validation/number_invalid`(源是静默归一,CLI 选择显式报错)。
248
- - **确认链**:票据有效期 10 分钟,绑定 baseUrl + 登录账号 + 目标 apply 操作名 + 入参指纹 + 请求体指纹(文件类还绑定 MD5 与大小)。相应报错为 `continuation_expired` / `continuation_context_mismatch` / `continuation_mismatch` / `continuation_args_changed` / `continuation_target_changed` / `plan_changed` / `file_changed`,一律重新 prepare。
248
+ - **确认链**:票据有效期 24 小时,绑定 baseUrl + 登录账号 + 目标 apply 操作名 + 入参指纹 + 请求体指纹(文件类还绑定 MD5 与大小)。相应报错为 `continuation_expired` / `continuation_context_mismatch` / `continuation_mismatch` / `continuation_args_changed` / `continuation_target_changed` / `plan_changed` / `file_changed`,一律重新 prepare。
249
249
  - **文件传输**:上传统一走 `preUploadCheck` → `module/upload`,命中 MD5 秒传时不真正传文件;下载文件名取响应头 `content-disposition`(已过滤路径穿越),同名文件按 `名称(1).扩展名` 自动改名,不覆盖。
250
250
  - **共享语义**:`share.add` 在服务端返回 `code=500 + status=true` 时判定为「已存在」,返回 `{ added: false, message }`,不算失败;其他业务失败抛 `api/business_error`。`participant.remove` 用 `share_entry_id` 而不是 `user_id`。
251
251
  - **标签语义**:`type=0` 公共标签(仅 document 可用)、`type=1` 个人标签;批量写操作按「公共组 + 个人组」两次请求提交,空组跳过。
package/docs/calendar.md CHANGED
@@ -53,7 +53,7 @@ weaver-work-cli --json calendar run <operation> --input-json '{"key":"value"}'
53
53
 
54
54
  1. `prepare` 只归一化、补默认值、查当前数据(更新/删除)、生成预览和 continuation,不写入。
55
55
  2. `apply` 必须带 `confirm=true` 与 prepare 返回的 continuation。
56
- 3. continuation 绑定 `baseUrl`/`profile`/`userId`,10 分钟有效;变化触发 `context_mismatch`,字段指纹变化触发 `target_changed`。
56
+ 3. continuation 绑定 `baseUrl`/`profile`/`userId`,24 小时有效;变化触发 `context_mismatch`,字段指纹变化触发 `target_changed`。
57
57
  4. 网络中断抛 `partial/write_uncertain`,禁止自动重试,先做只读回查。
58
58
 
59
59
  ## 关键业务规则
package/docs/contract.md CHANGED
@@ -100,7 +100,7 @@ weaver-work-cli --json contract run contract.workflow.query --input-json '{"work
100
100
 
101
101
  ## 写操作确认链
102
102
 
103
- - 写操作一律 `prepare -> apply`:`prepare` 返回脱敏 `preview` 与 `continuation`(有效期 10 分钟),`apply` 必须带 `continuation` 与 `confirm: true`。
103
+ - 写操作一律 `prepare -> apply`:`prepare` 返回脱敏 `preview` 与 `continuation`(有效期 24 小时),`apply` 必须带 `continuation` 与 `confirm: true`。
104
104
  - 提交审批与催办需要与“创建并保存”分开的第二次确认。
105
105
  - 提交后回读 `contract.request.status`,`flowStatus.code` 为 1(审批中)或 3(已归档)才算生效。
106
106
  - 写请求超时或断线返回 `partial/write_uncertain`(退出码 11),禁止自动重放。
package/docs/e10-auth.md CHANGED
@@ -76,7 +76,7 @@ XiaoE 宿主身份有两种判定入口:桌面客户端由 Agent 根据“智
76
76
 
77
77
  CLI 依次尝试成对的平台凭据、npm 包自带的 `scripts/xiaoe_env.py` 兼容路径、宿主 `xiaoeUserData/tokens.py`、桌面 XiaoE 客户端本地会话和 `WEAVER_XIAOE_*` ETEAMSID 映射。客户端会话优先读取 `XIAOE_USER_SETTINGS_PATH`,再从 `XIAOE_ROBOT_DATA_ROOT` / `XIAOE_ROBOT_ROOT` 查找,最后回退 macOS `~/Library/Application Support/XiaoE/Robots/<id>/user_settings.json` 或 Windows `%LOCALAPPDATA%/XiaoE/Robots/<id>/user_settings.json`。这些变量和文件只用于定位凭据,不能用于识别宿主。`XIAOE_DOMAIN` 是 XiaoE/erpa 换票服务地址,不是 E10 登录地址。
78
78
 
79
- E10 目标地址按“显式 `--base-url` → 专用 `WEAVER_XIAOE_*` E10 配置/映射 → 当前 profile → `https://www.e-cology.com.cn`”解析。凭证可用时,CLI 直接保存登录态,保存的 `agentType` 固定为 `XiaoE`。统一登录失败时,所有操作系统都返回 `authentication/xiaoe_credential_unavailable`,不启动浏览器 OAuth。需要浏览器授权时必须另行显式执行 `auth login`。
79
+ E10 目标地址按“显式 `--base-url` → 专用 `WEAVER_XIAOE_*` E10 配置/映射 → 当前 profile → `https://www.e-cology.com.cn`”解析。凭证可用时,CLI 直接保存登录态,保存的 `agentType` 固定为 `XiaoE`。统一登录失败时,所有操作系统都返回 `authentication/xiaoe_credential_unavailable`(若失败全程都是网络错误则返回 `authentication/xiaoe_network_unavailable`,提示“暂时无法连接 E10,请稍后重试”并标记为可重试),不启动浏览器 OAuth。需要浏览器授权时必须另行显式执行 `auth login`。
80
80
 
81
81
  脚本兼容链路会先自动发现桌面 XiaoE 客户端内置 Python(macOS 应用包与 Windows 按用户/全局安装均支持),再回退到系统 `python3`、`/usr/bin/python3`、`python`;Windows 的系统回退顺序为 `python`、`python3`、`py`。可用 `WEAVER_XIAOE_TOKEN_SCRIPT_PYTHON` 精确指定解释器,用 `WEAVER_XIAOE_TOKEN_SCRIPT_PATH` 指定桌面宿主脚本路径(旧名 `XIAOE_TOKEN_SCRIPT_PYTHON` / `XIAOE_TOKEN_SCRIPT_PATH` 仍兼容)。CLI 自带的 `xiaoe_env.py` 位于 npm 包 `scripts/`,不会放入 `weaver-e10-shared` Skill;Skill 包禁止携带或直接执行 Token 脚本。`XIAOE_` 是平台保留前缀,本 CLI 的自定义变量统一使用 `WEAVER_XIAOE_*`。
82
82
 
@@ -84,12 +84,34 @@ E10 目标地址按“显式 `--base-url` → 专用 `WEAVER_XIAOE_*` E10 配置
84
84
 
85
85
  XiaoE 换票结果中的 `expiryTimes` 按 Unix 毫秒时间戳持久化。宿主脚本未返回该字段时,CLI 与 XiaoE `tokens.py` 保持一致,按换票成功时间加 2 小时生成。业务命令加载会话后或长进程每次请求前发现当前时间达到 `expiryTimes` 时,会先静默重新换票;换票失败则停止本次业务请求,不会继续发送已知过期的 ETEAMSID。
86
86
 
87
+ 小 e 换票接口、`teamsCheck` 与本地会话探测都带 15 秒超时(含读响应体)。超时按网络错误处理(`causeCode=ETIMEDOUT`),不会再出现某一步没有上限、把整条命令挂死的情况;`auth status` 之类的富化请求超时后只是放弃更新信息,不影响命令本身。
88
+
87
89
  业务命令缺少可读取的本地会话时,若当前运行时已通过 `XIAOE_*`、`--runtime-agent xiaoe` 等标记识别为 XiaoE,公共会话加载层会先静默尝试统一登录,成功后继续业务操作。失败时返回 `authentication/xiaoe_credential_unavailable`,并明确提示已尝试自动获取。显式 `--auth` 不触发此恢复;未识别到 XiaoE 的首次认证仍需显式选择登录方式。`auth status --no-check` 等本地状态查询不会主动登录。已有 XiaoE 会话被 E10 接口明确拒绝为失效时,公共请求运行时会根据持久化会话的 `agentType` / `loginSource` 静默换票并重放原请求一次;这条路径不依赖 shared Skill、Agent、`XIAOE_*` 或 `--runtime-agent xiaoe`。它不会打印中间登录步骤,不会自动打开浏览器,也不会对流式请求、网络错误、`partial` / `write_uncertain` 做重放。`--runtime-agent xiaoe` 表示当前运行时身份,不携带凭据。WorkBuddy、Codex 及其他智能体首次认证使用 `auth login --base-url <url> --agent_type <agent_type>` 的浏览器 OAuth 流程。
88
90
 
89
91
  无法使用浏览器回调时,可以用 `auth set` 直接写入浏览器中复制到的
90
92
  `ETEAMSID`。命令会调用 `teamsCheck` 解析当前用户、租户和组织信息,并写入
91
93
  E10 兼容的 auth 文件。
92
94
 
95
+ 静默恢复失败时,`authentication/xiaoe_credential_unavailable` 会带 `details` 以便定位而不必复现:`attemptedSteps` 按序记录评估过的凭证通道及结果(如 `platform_token:missing`、`bundled_env_script:failed`、`token_script:disabled`、`environment_map:empty`、`e10_session:failed`),`failures` 按发生顺序保留每一次失败的阶段(`platform_token` / `bundled_env_script` / `token_script` / `client_session` / `teams_check` / `e10_session`)、类别(`network` / `http` / `credential`)以及网络错误的系统错误码 `causeCode`(取自 `error.cause.code`,如 `ECONNREFUSED`、`ETIMEDOUT`)和 HTTP 错误的状态码 `httpStatus`,`lastError` 是最后一条真实原因(已对已知凭据脱敏并截断到 300 字符),并附带解析出的 `baseUrl`、`clientType`、`platformCredentialDetected`、整体归类 `errorKind` 与最后失败阶段 `failureStage`;若票其实换到了、但按 `expiryTimes` 判定为已过期,会额外带 `resultSessionExpired: true`。当且仅当所有失败都是网络错误时,错误改为 `authentication/xiaoe_network_unavailable`、`retryable: true`,文案换成“暂时无法连接 E10,请稍后重试”(此时登录态并未被验证,提示用户重新登录属于误导)。这条路径默认依然完全无输出,需要看每一步的过程日志时给业务命令加 `--verbose`(经 stderr 以 `[debug]` 前缀输出;`--json` 下完全不输出)。
96
+
97
+ 显式 `auth xiaoe` 失败和上述静默恢复失败都会把同一份诊断持久化为 JSON Lines。
98
+ 持久化前会再次移除 URL 查询参数、已知凭据、Bearer 值和服务端原始 `details`;日志不保存
99
+ Cookie、ETEAMSID 或 Token。支持 POSIX 权限的平台会把日志目录和文件分别限制为 `0700`
100
+ 和 `0600`。查看与清理只通过 CLI:
101
+
102
+ ```text
103
+ weaver-work-cli auth logs
104
+ weaver-work-cli auth logs show --limit 100
105
+ weaver-work-cli --json auth logs show --limit 100
106
+ weaver-work-cli auth logs path
107
+ weaver-work-cli auth logs clear
108
+ ```
109
+
110
+ `auth logs` 默认按时间倒序显示最近 50 条,`--limit` 范围为 1–500;`auth logs clear`
111
+ 只删除固定的 XiaoE 认证错误日志,不影响 profile、登录态或 keychain。
112
+
113
+ 网页端若返回 `details.reason=host_credential_not_injected`,表示沙箱仍带 `XIAOE_CLIENT_TYPE=cloud` 标记,但宿主注入的平台凭据在启动子进程时丢失。这不是 E10 登录损坏,也不能通过重试或浏览器 OAuth 自愈;沙箱启动器必须保留宿主环境并只定向覆盖 `WEAVER_WORK_CLI_AUTH_ROOT` 等测试变量,不得用 `env -i`、空环境字典或不包含 XiaoE 平台凭据的白名单启动 CLI。凭据值不得写入命令、日志或错误详情。
114
+
93
115
  `auth whoami` 默认读取本地缓存,不发网络请求;`auth whoami --live` 会调用
94
116
  `teamsCheck` 获取实时信息。`auth export-weaver-env` 会输出
95
117
  `WEAVER_BASE_URL`、`WEAVER_ETEAMSID`、`WEAVER_COOKIE`、`WEAVER_USER_AGENT` 和
package/docs/ehr.md CHANGED
@@ -113,7 +113,7 @@ HR 报表类接口走 `application/x-www-form-urlencoded`(`sourceType=LOGIC` +
113
113
 
114
114
  1. `prepare` 只预览并生成 continuation,不发送写请求。
115
115
  2. `apply` 必须带 `confirm=true` 与 `prepare` 返回的 continuation。
116
- 3. continuation 绑定 `baseUrl`/`profile`/`userId`,10 分钟有效;租户或账号变化会触发 `context_mismatch`。
116
+ 3. continuation 绑定 `baseUrl`/`profile`/`userId`,24 小时有效;租户或账号变化会触发 `context_mismatch`。
117
117
  4. 关键参数与 `prepare` 快照不一致时触发 `target_changed`,必须重新 `prepare`。
118
118
  5. 网络中断抛出 `partial/write_uncertain`(退出码 `partial`),**禁止自动重试**,先做只读回查。
119
119
 
@@ -168,7 +168,7 @@ printf '%s\n' '{"beginDate":"2026-03-01","endDate":"2026-03-31"}' | weaver-work-
168
168
  招聘 EB 接口要求 `ebBusinessId: <listId>` 请求头,`ds/fields` 要求 multipart/form-data,
169
169
  两者由 `host.ts` 的 `headers`/`multipart` 通道支持(认证头仍由运行时统一注入并保护)。
170
170
 
171
- **招聘写操作**(`operations/recruit-write.ts`):candidate.create / interview.arrange / offer.send / entry.process / interview.feedback.edit / interview.feedback.urge 六对 prepare→apply 已实现(迁移自 ehr 技能 recruit-* 写脚本),全部走确认链协议:prepare(只读定位/查重/枚举与人员解析 + 摘要 + continuation 10 分钟)→ 用户确认 → apply(confirm + 指纹校验 + 会话绑定校验 + 部分操作 apply 阶段二次查重);多步写入(saveFormData → initTalentBatch / sendOffer / saveEstPreEntry / runEsb)中断报 `partial/write_uncertain` 禁止自动重试。Offer 邮件、面试通知(notify)、催评为 L3 外部通知。esbActionIds 全部运行时按钮解析(getFormButtons/getListButtons),解析不到阻断不编造。入职撤销(entry.cancel.change)暂缓实现。
171
+ **招聘写操作**(`operations/recruit-write.ts`):candidate.create / interview.arrange / offer.send / entry.process / interview.feedback.edit / interview.feedback.urge 六对 prepare→apply 已实现(迁移自 ehr 技能 recruit-* 写脚本),全部走确认链协议:prepare(只读定位/查重/枚举与人员解析 + 摘要 + continuation 24 小时)→ 用户确认 → apply(confirm + 指纹校验 + 会话绑定校验 + 部分操作 apply 阶段二次查重);多步写入(saveFormData → initTalentBatch / sendOffer / saveEstPreEntry / runEsb)中断报 `partial/write_uncertain` 禁止自动重试。Offer 邮件、面试通知(notify)、催评为 L3 外部通知。esbActionIds 全部运行时按钮解析(getFormButtons/getListButtons),解析不到阻断不编造。入职撤销(entry.cancel.change)暂缓实现。
172
172
 
173
173
  ## 禁用边界
174
174
 
package/docs/esb.md CHANGED
@@ -32,7 +32,7 @@ src/shortcuts/esb/
32
32
  | operation | 风险 | 用途 |
33
33
  | --- | --- | --- |
34
34
  | `esb.input-format` | `read` | 按 `applicationId` 取回 `customParams` 模板、`moduleSource` 与 `esbFlowId`;无副作用 |
35
- | `esb.trigger.prepare` | `read-before-write` | 只读回查目标动作流、组装触发请求体、签发 continuation(10 分钟);不触发动作流 |
35
+ | `esb.trigger.prepare` | `read-before-write` | 只读回查目标动作流、组装触发请求体、签发 continuation(24 小时);不触发动作流 |
36
36
  | `esb.trigger.apply` | `high-risk-write` | 校验 continuation 与登录身份后调用触发接口,需 `confirm: true` |
37
37
 
38
38
  ## 常见命令
package/docs/im.md CHANGED
@@ -68,7 +68,7 @@ weaver-work-cli --json im run <operation> --input-json '{"key":"value"}'
68
68
 
69
69
  所有写操作(send/withdraw/top.set/ding/group 系列)统一 `prepare → apply`:
70
70
 
71
- - `prepare`:只读校验(成员解析、源消息读取、接收人计算),返回 `summary` + `continuation`(HMAC-SHA256 签名,10 分钟有效,含 baseUrl/profile/userId 指纹与 snapshot 指纹)。
71
+ - `prepare`:只读校验(成员解析、源消息读取、接收人计算),返回 `summary` + `continuation`(HMAC-SHA256 签名,24 小时有效,含 baseUrl/profile/userId 指纹与 snapshot 指纹)。
72
72
  - `apply`:必须 `confirm:true` + 有效 continuation;校验租户/账号一致(`context_mismatch`)与目标指纹(`target_changed`);执行后不确定结果返回 `partial/write_uncertain`,禁止自动重试。
73
73
 
74
74
  会话提醒设置(`im.user.setRemind`,接口 `POST /api/em/msg/executeIm/user/setMsgRemind`)走同一确认链:`sessionType` 取 `1` 单聊会话(`toUid`+`toCid`)、`2` 群聊会话(`groupId`)、`4` 系统会话(`group`);`reminder` 取 `0` 消息接收提醒 / `1` 消息接收但不提醒(免打扰)。操作者身份由 CLI 用当前登录人填充,调用方不能自带。
package/docs/invoice.md CHANGED
@@ -52,6 +52,8 @@ weaver-work-cli --json invoice list --fields number,detailUrl
52
52
 
53
53
  当前输出层把完整 JSON 直接写 stdout。0.1.17 起可用 `--view summary`(列表语义平表,仅 `invoice.list` / `invoice.enterprise.list` 支持)与 `--fields a,b.c`(点路径投影,所有 operation 可用)裁剪输出——两者互斥,只影响输出、不改变请求参数;仍不提供飞书 CLI 的 `--jq`、`--format table/ndjson` 或通用 `--page-all`。Agent 使用时应默认小页读取和摘要渲染:列表先 `page_size=10`,按 `start_pos` 继续;回复只展示关键字段和数量,超长详情/OCR/调试 JSON 落本地文件后给路径。
54
54
 
55
+ 票面扩展信息 `ext`(费用说明、城市、备注、起止地、上下车站点)对报销按城市 / 行程筛票很关键。`/api/inc/sync` 的 `mext` 按位选择返回哪些 `ext` 字段,不传就不返回 `ext`,所以 `invoice.list` / `invoice.enterprise.list` 默认传 `mext=2147483647` 取回完整 `ext`(调用方显式传的 `mext` 优先)。每条发票保留原始 `ext` 字符串,另加解析好的 `extInfo`(`expenseNote`、`content`、`city`、`province`、`comment`、`from`、`to`、`stationGetOn`、`stationGetOff`,空值省键);`--view summary`、`--view detail` 把这些字段平铺展示。提取逻辑在 `src/shortcuts/invoice/invoice-record.ts`,列表项是 `{ info, ret }` 包装时也能识别。
56
+
55
57
  ## Operation 目录
56
58
 
57
59
  | Operation | 风险 | 固定规则 |
@@ -69,17 +71,15 @@ weaver-work-cli --json invoice list --fields number,detailUrl
69
71
  | `invoice.delete.prepare/apply` | 高风险写 | 固定软删除 `flag=0`,确认后执行并回查 |
70
72
  | `invoice.browse-field.data` | 只读 | 基于详情接口生成流程表单发票浏览按钮 JSON |
71
73
  | `invoice.reim.file-ocr.preview` | 文件识别预览 | 对 E10 fileId 调用报销场景的发票识别接口,只保留成功项 |
72
- | `invoice.reim.requests.list` | 只读 | 查询事前申请流程列表,默认 `pageNo=1`、`pageSize=100`;未传 `cusCreateDateEnd` 时按东八区当天 + 1 天填入,传入时按该日期再 + 1 天发给接口;每条只输出 `requestid` / `workflowid` / `requestname` / `flowStatus` / `creatorId` / `creatorName` / `createTime` |
74
+ | `invoice.reim.requests.list` | 只读 | 查询事前申请流程列表,默认 `pageNo=1`、`pageSize=100`;结束日取传入的 `cusCreateDateEnd` 或东八区当天,发给接口时再 + 1 天;未传 `cusCreateDateStart` 时取结束日前 7 天,第 1 页为空自动放宽到结束日前 1 个月再查一次,`scene="phone"`(话费)时取结束日前 90 天且不放宽;返回 `data.query`(实际 `cusCreateDateStart`、业务结束日 `cusCreateDateEnd`、`widened`);每条只输出 `requestid` / `workflowid` / `requestname` / `flowStatus` / `creatorId` / `creatorName` / `createTime` |
73
75
  | `invoice.reim.workflow.resolve` | 只读 | 根据事前申请 ID 获取报销工作流;无事前申请时传空数组 |
74
- | `invoice.reim.form.structure` | 只读 | 获取报销流程表单字段结构 |
75
- | `invoice.reim.row-info` | 只读 | 使用 urlencoded 请求获取单张发票明细行预填信息 |
76
+ | `invoice.reim.candidates.list` | 只读 | 按日期自动翻页拉取未报销发票,分成 `available`(可报)/ `assigned`(已挂单)两组并给出金额合计 |
76
77
  | `invoice.reim.employee-superiors` | 只读 | 获取当前人员和上级信息 |
77
78
  | `invoice.reim.field.search` | 只读 | `GET /api/government/formStructure/fieldRelateSearch`;按名称模糊搜相关客户或相关项目。返回 `match=unique/multiple/none`:一条直接填 `名称(ID)`,多条让用户选。报销时客户和项目必须在建草稿前确认 |
78
- | `invoice.reim.flow.create.prepare/apply` | 高风险写 | continuation 绑定已组装报销单 JSON;`work_flow_id/mainFormId/request_name/main_fields/detail_rows` 等字段在 schema 顶层逐项暴露,确认后调用 `createFlowNew` |
79
- | `invoice.reim.flow.update.prepare/apply` | 高风险写 | continuation 绑定更新报销单 JSON;确认后调用 `updateFlow` |
80
- | `invoice.issuing.qys.list` | 只读 | 获取待开票合同数据(含契约锁、泛微及其他合同),返回可开票行 `items` 与按「合同号 + 购方」汇总的 `groups`(开票金额合计按分累加、`blockedRows` 计不可开票行、`sellerNames` 为核算公司);AI 开票据此调用 `weaver-e10-workflow` 发起开票流程草稿 |
79
+ | `invoice.issuing.contracts.list` | 只读 | 入参 `cards`(`workflow.search` 返回的 `data.cards`,原样传入)或 `requestIds`,二选一,最多 50 条。对每个 `requestId` 调一次 `POST /api/ebuilder/form/eblist/getData`(合同虚拟表,按「合同审批流程」过滤,明细按 100 行一页取完),把结果拼回卡片:`invoiced`(查不到明细为 `true`,即已开票)、`contractNo`、`customerName`、`buyerTaxNo`、`sellerName`、`invoiceAmount`(全部明细金额之和,两位小数)、`invoiceGroups[]`(按分组标识汇总 `group` / `amount` / `items[]`);顶层返回 `count`、`pendingCount`、`invoicedCount`。AI 开票先用 `weaver-e10-workflow` 的 `workflow.search` 查三个合同审批流程(用户点名检索词时追加 `requestName`,按流程标题模糊搜索;不传则不带该字段),再用本命令列出待开票合同 |
80
+ | `invoice.issuing.contract.detail` | 只读 | 入参 `requestId`(用户选定的合同审批流程)。`POST /api/workflow/core/paService/v1/getWorkflowRequest`(`isReadRequest=false`,不标记已读),只取主表:`customer`(「客户名称」Ebuilder 的 `{id, name}`,没有时取「最终用户卡片」)、`customerSource`、`contractDocuments[]`(「合同正文及附件」每个文件的 `docId` / `fileId` / `name`)、`contractDocIds`(全部 `docId` 逗号连接)。AI 开票「合同客户」填 `customer` 的 `{id, name}`;「合同文本」与合同流程一样,按每个文件的 `docId`、`name` 填 `{id, name}`,多个文件传数组,不要填 `contractDocIds` 逗号串或纯数字 id |
81
81
 
82
- > 直接开票类 operation(`invoice.issuing.make.prepare/apply`、`invoice.issuing.qys.prepare`、`invoice.issuing.result`)已于 0.1.27 移除:开票按销售方选择流程草稿(销售方取台账「核算公司」,名称必须完全相同:「上海亘岩网络科技有限公司」走「契约锁合同收款发票开具及快递申请」;泛微网络、泛微软件、上海田亩、成都泛微、泛微国际、北京泛微、浙江泛微走「合同收款发票开具及快递申请」;为空或不在名单里时先问用户;退票、冲红、红冲走「合同开票冲红流程」),不再支持绕过流程直接调用 `makeInvoice`。
82
+ > 报销单的创建与修改统一走 `weaver-e10-workflow`(`workflow.createForm` / `workflow.createRequest` / `workflow.edit*`),旧的 `invoice.reim.form.structure`、`invoice.reim.row-info`、`invoice.reim.row-info-batch`、`invoice.reim.flow.create.prepare/apply`、`invoice.reim.flow.update.prepare/apply`、`invoice.reim.template.build`、`invoice.reim.flow.create.auto-prepare` 已移除;`invoice.issuing.qys.list` 也已由 `invoice.issuing.contracts.list` / `invoice.issuing.contract.detail` 取代。调用这些旧 operation 会返回 `validation/operation_retired`(退出码 2),`error.details` 给出 `replacement`(替代链路)和 `reference`(skill 文档),完整清单见 `invoice schema` 的 `retiredOperations`。
83
83
 
84
84
  共享、转让和标签仍暂不暴露给 Agent:新版源资料给出了提交接口,但还缺少稳定的接收人 `appid/cid/uid` 解析来源、标签关系查询和写后回查契约。
85
85
 
@@ -107,8 +107,6 @@ weaver-work-cli --json invoice run invoice.ocr.preview --input-json '{"file":"./
107
107
  weaver-work-cli --json invoice import prepare --input-json '{"file":"./invoice.pdf","validate":true,"syncToOa":true}'
108
108
 
109
109
  weaver-work-cli --json invoice import apply --input-json '{"file":"./invoice.pdf","continuation":"PREPARE_CONTINUATION","confirm":true}'
110
-
111
- weaver-work-cli --json invoice run invoice.reim.flow.create.prepare --input .\reim-create.json
112
110
  ```
113
111
 
114
112
  macOS/Linux(bash/zsh):
@@ -119,13 +117,11 @@ weaver-work-cli --json invoice run invoice.ocr.preview --input-json '{"file":"./
119
117
  weaver-work-cli --json invoice import prepare --input-json '{"file":"./invoice.pdf","validate":true,"syncToOa":true}'
120
118
 
121
119
  weaver-work-cli --json invoice import apply --input-json '{"file":"./invoice.pdf","continuation":"PREPARE_CONTINUATION","confirm":true}'
122
-
123
- weaver-work-cli --json invoice run invoice.reim.flow.create.prepare --input ./reim-create.json
124
120
  ```
125
121
 
126
122
  导入发票文件或远程 URL 时,面向 Agent 的正常链路是先 `invoice.ocr.preview`,再 `invoice.import.prepare` 使用 `validate=true`、`syncToOa=true`。只有用户明确要求跳过查验或离线导入时才传 `validate=false`;`validate=false` 表示跳过查验,不能描述为“查验通过”。`filedMap`、嵌套字段映射等 JSON 参数在 `--input-json` 中保持对象,CLI 只在 multipart 提交前序列化。
127
123
 
128
- 报销单创建只接受 Agent 已组装好的结构化 JSON;开票按销售方选择流程后,通过 `weaver-e10-workflow` 发起对应开票流程草稿(退票、冲红、红冲发起「合同开票冲红流程」),CLI 不再提供直接开票接口。发票与事前申请只按时间关联,一张发票同时落在多条事前申请上时由用户选择。CLI 不负责猜测出差客户或税率;这些规则在 Skill reference 中指导 Agent 组装和展示预览。报销单创建的字段必须在 operation 顶层逐项传入,不再包一层通用 `payload`。当前修正资料包没有客户档案查询或红字发票红冲接口,`invoice.customer.*` 和 `invoice.red.*` 不暴露为 operation,Agent 不能绕过 CLI 调用原始接口。写操作出现网络中断、部分成功、缺少回执 ID 或回查失败时,CLI 返回 `partial/write_uncertain`,Agent 禁止自动重复提交。
124
+ 报销单由 Agent 按 Skill 规则组装 `data` 后,通过 `weaver-e10-workflow` 存草稿;待开票合同由 `workflow.search` 查出合同审批流程后(用户点名检索词时追加 `requestName` 做标题模糊搜索),交给 `invoice.issuing.contracts.list` 补齐开票信息;用户选定并确认后,按销售方通过 `weaver-e10-workflow` 创建「合同收款发票开具及快递申请」或「契约锁合同收款发票开具及快递申请」草稿,不提交。发票与事前申请只按时间关联,一张发票同时落在多条事前申请上时由用户选择。CLI 不负责猜测出差客户或税率;这些规则在 Skill reference 中指导 Agent 组装。当前修正资料包没有客户档案查询或红字发票红冲接口,`invoice.customer.*` 和 `invoice.red.*` 不暴露为 operation,Agent 不能绕过 CLI 调用原始接口。写操作出现网络中断、部分成功、缺少回执 ID 或回查失败时,CLI 返回 `partial/write_uncertain`,Agent 禁止自动重复提交。
129
125
 
130
126
  ## 编辑白名单
131
127
 
package/docs/okr.md CHANGED
@@ -77,7 +77,7 @@ OKR 目标在不同租户走两套互不兼容的接口链路,由 `okr.version
77
77
 
78
78
  1. `prepare` 只归一化、补默认值、查当前数据(编辑时)、生成预览和 continuation,不写入。
79
79
  2. `apply` 必须带 `confirm=true` 与 prepare 返回的 continuation。
80
- 3. continuation 绑定 `baseUrl`/`profile`/`userId`,10 分钟有效;变化触发 `context_mismatch`,字段指纹变化触发 `target_changed`。
80
+ 3. continuation 绑定 `baseUrl`/`profile`/`userId`,24 小时有效;变化触发 `context_mismatch`,字段指纹变化触发 `target_changed`。
81
81
  4. 网络中断抛 `partial/write_uncertain`,禁止自动重试,先做只读回查。
82
82
 
83
83
  ## 关键业务规则
@@ -381,6 +381,14 @@ dist/weaver-e10-<module>-skill.zip
381
381
 
382
382
  打包单个业务模块时会自动包含 `weaver-e10-shared`。zip 用于平台导入、离线分发或版本归档;本机日常安装优先使用 `weaver-work-cli skills install <module>`。
383
383
 
384
+ 若目标环境已装有共享 skill、只需分发业务模块本身,加 `--no-shared`(脚本位置参数之后):
385
+
386
+ ```bash
387
+ node scripts/package-skill.mjs yepiaotong dist/weaver-e10-yepiaotong-only.zip --no-shared
388
+ ```
389
+
390
+ 此时产物内只有业务模块目录,`../weaver-e10-shared/` 的相对引用需由目标环境自行提供。
391
+
384
392
  ## 10. 安装新生成的业务模块 Skill
385
393
 
386
394
  检测通过并得到用户确认后安装:
@@ -0,0 +1,119 @@
1
+ # reception — 泛微客户参观接待流程
2
+
3
+ `reception` 模块把「客户参观接待」这条业务链路收敛成三个 operation:出面板、出件并挂附件、输出填单页。
4
+ 它原本是一个独立的 `@weaver/reception-cli` 包(含自建鉴权、会话缓存、写闸门、客户/人员 ID 检索),
5
+ 现已并入 `weaver-work-cli`,**独立包退役**。
6
+
7
+ ## 为什么合并
8
+
9
+ 旧实现有 2874 行代码,其中约 1200 行是"因为不在 CLI 里"才产生的重复设施:
10
+
11
+ | 旧模块 | 行数 | 合并后 |
12
+ |---|---|---|
13
+ | `cli.js` + `session-cache.js`(spawn CLI 换会话、落盘 session.env) | 261 | 删,改用 `requireE10Session` |
14
+ | `customer.js` + `employee.js`(查客户/人员 ID) | 298 | 删,v5.4.0 起直接传中文名 |
15
+ | `formctx.js`(实时取表单结构) | 72 | 删,主链路用字段快照 |
16
+ | `payload.js` + `submit.js` + `gate.js` 闸门(兜底写链路) | 166 | 删,需要写时直接用 `workflow` 模块 |
17
+ | `commands.js` 的 prepare/build | ~330 | 删,同上 |
18
+ | `bin/reception.js` | 30 | 并入命令面 |
19
+
20
+ 保留的是纯业务口径:字段映射、日程 7 列、customParams 拼装、browsertool 渲染、面板与后勤解析。
21
+
22
+ ## CLI 结构
23
+
24
+ ```text
25
+ weaver-work-cli reception --help
26
+ weaver-work-cli reception schema
27
+ weaver-work-cli --json reception ask --known-file known.json [--user "<姓名>"]
28
+ weaver-work-cli --json reception doc --run-id <id> --answers-file answers.json --snapshot <skill>/data/fields-snapshot.json
29
+ weaver-work-cli --json reception render --run-id <id>
30
+ ```
31
+
32
+ > 示例为 macOS/Linux 写法;**Windows PowerShell** 下路径用引号包起来即可(`--snapshot "C:\...\fields-snapshot.json"`),参数完全一致。
33
+
34
+ `--snapshot` 只在 `doc` 传一次:`doc` 成功后路径写进 run,`render` 直接复用。
35
+ 只有 run 被重建(`RUN_NOT_FOUND` 后现场重建)时,`render` 才需要补传。
36
+
37
+ 通用入口也支持 operation 名:
38
+
39
+ ```text
40
+ weaver-work-cli --json reception run reception.ask --input-json '{"known":{"customer":"某某集团"}}'
41
+ ```
42
+
43
+ ## operation 合约
44
+
45
+ | operation | risk | 作用 |
46
+ |---|---|---|
47
+ | `reception.ask` | read | 按 7 项抽取结果算缺口、出面板,返回 `runId` |
48
+ | `reception.doc` | read | 渲染行程单 docx + 内部参考 md,上传两份附件拿 fileid |
49
+ | `reception.render` | read | 按快照拼 `customParams`,输出 `<browsertool>` |
50
+
51
+ 全链路 **零写请求**(`writePolicy: none`):只上传附件,流程由用户在页面上提交。
52
+ 因此三个 operation 都是 `read`,也没有 continuation 票据。
53
+
54
+ ## 典型链路
55
+
56
+ ```text
57
+ ask(出面板,≤2 屏)
58
+ → ask_user(panels) 只调一次
59
+ → (案例 + 专家检索,软依赖) 结果写 cases.json
60
+ → doc 两份产物 + attachments
61
+ → render browsertool,宿主打开填单页
62
+ ```
63
+
64
+ 失败恢复的关键一条:`RUN_NOT_FOUND` 时**不要重跑 ask**,把 `--known` 带上重跑 `doc`,
65
+ CLI 会现场重建 run 并返回 `rebuilt: true` + 新 `runId`。
66
+
67
+ ## 资产边界
68
+
69
+ CLI 不打包下面这两个,它们属于技能包 `weaver-e10-reception-flow`:
70
+
71
+ | 资产 | 位置 | 谁读 |
72
+ |---|---|---|
73
+ | 字段快照 `fields-snapshot.json` | `<skill>/data/` | CLI(经 `--snapshot`) |
74
+ | 渲染器 `render.py` + 行程单模板 | `<skill>/scripts/`、`<skill>/assets/` | CLI 调起 python 子进程 |
75
+
76
+ `render.py` 用自身路径定位模板(`../assets/行程单模板-泛微.docx`),CLI 只需找到脚本本身:
77
+ 优先 `--render-py`,其次从 `--snapshot` 反推 `<skill>/scripts/render.py`。
78
+
79
+ ## 状态与缓存
80
+
81
+ - `<stateRoot>/reception/runs/<runId>.json`:run 状态(`ask` 建、`doc` 写、`render` 读)
82
+ - `<stateRoot>/reception/python.json`:python 探测结果,7 天有效
83
+ - `<stateRoot>/reception/out/`:默认产物目录(`--out-dir` 可覆盖)
84
+
85
+ `stateRoot` 与 CLI profile 同级(Windows 默认 `~/.weaver-work-cli`),多环境不串。
86
+
87
+ ## 源码结构
88
+
89
+ ```text
90
+ src/shortcuts/reception/
91
+ ├── index.ts 命令面:schema / run / ask / doc / render
92
+ ├── manifest.ts operation 合约(schema 原样输出)
93
+ ├── operations.ts 调度入口 + 凭据字段拦截
94
+ ├── constants.ts 流程名、面板文案、后勤字段
95
+ ├── host.ts 会话 + 上传(复用 runtime 的 formData)
96
+ ├── errors.ts 域内结构化错误
97
+ └── operations/
98
+ ├── ask.ts / doc.ts / render.ts
99
+ ├── panels.ts 后勤解析、answers 合并、面板生成
100
+ ├── compose.ts 接待数据 → customParams
101
+ ├── customparams.ts 多值/明细拼接口径
102
+ ├── schedule.ts 日程 7 列与标准议程
103
+ ├── browsertool.ts fill_form + sdkOptions
104
+ ├── snapshot.ts 快照定位与漂移对拍
105
+ ├── render-assets.ts python 探测 + render.py 调度
106
+ ├── runs.ts run 状态
107
+ └── shared.ts JSON 入参、哈希、稳定序列化
108
+ ```
109
+
110
+ ## 验证
111
+
112
+ ```bash
113
+ npm run build
114
+ node dist/index.js reception --help
115
+ node dist/index.js --json reception schema
116
+ node --test --import tsx test/business/reception-*.test.ts
117
+ ```
118
+
119
+ `doc` 的真实渲染用例需要 python-docx 与技能包同时存在,缺任一项会自动跳过。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weaver-work-cli",
3
- "version": "0.1.40",
3
+ "version": "0.1.44",
4
4
  "description": "面向泛微工作工具链的可扩展 TypeScript CLI 基础框架(E10 业票通等能力)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/scripts/clean.mjs CHANGED
@@ -1,4 +1,45 @@
1
- import { rmSync } from 'node:fs';
1
+ #!/usr/bin/env node
2
+ /**
3
+ * 清 dist。
4
+ *
5
+ * 不用 fs.rmSync 的原因:本机给 Node 注入了 safe-delete 拦截层(node-language-shim.cjs),
6
+ * 删除会改走回收站,几百个文件逐个 spawn 回收站命令,表现为"构建卡住不动"。
7
+ * 这里优先用系统删除命令(不经过 shim),失败再退回 Node 原生实现。
8
+ *
9
+ * 这是清构建产物,不是删用户数据,所以不进回收站是符合预期的。
10
+ */
11
+ import { existsSync, rmSync } from 'node:fs';
12
+ import { spawnSync } from 'node:child_process';
2
13
  import { resolve } from 'node:path';
3
14
 
4
- rmSync(resolve('dist'), { recursive: true, force: true });
15
+ // 防误删:只允许在项目根执行
16
+ if (!existsSync(resolve('package.json'))) {
17
+ console.error('clean: 请在项目根目录执行(找不到 package.json)');
18
+ process.exit(1);
19
+ }
20
+
21
+ const target = resolve('dist');
22
+ if (!existsSync(target)) process.exit(0);
23
+
24
+ // 系统命令优先:不经过 Node 的删除拦截层
25
+ const ok = process.platform === 'win32'
26
+ ? spawnSync('cmd.exe', ['/c', 'rmdir', '/s', '/q', target], { stdio: 'ignore' }).status === 0
27
+ : spawnSync('rm', ['-rf', target], { stdio: 'ignore' }).status === 0;
28
+
29
+ if (ok && !existsSync(target)) process.exit(0);
30
+
31
+ // 系统命令不可用时退回原生实现
32
+ try {
33
+ rmSync(target, { recursive: true, force: true });
34
+ } catch (error) {
35
+ console.error(`clean: 删除失败:${error.message}`);
36
+ }
37
+
38
+ // 仍失败就停下来,不要让 build 带着 stale 产物继续
39
+ if (existsSync(target)) {
40
+ console.error('clean: dist 仍存在,请手动删除后重跑:');
41
+ console.error(process.platform === 'win32'
42
+ ? ` Remove-Item -Force -Recurse "${target}"`
43
+ : ` rm -rf "${target}"`);
44
+ process.exit(1);
45
+ }
@@ -0,0 +1,105 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * 把仓库里的 weaver-e10-meeting 技能铺到小E 的 user-skills 目录(一键恢复)。
4
+ *
5
+ * 背景(2026-11-04):小E 的「更新 skill」会从平台技能库拉 2.11.0 覆盖本地,
6
+ * 而且有一次直接把 `user-skills/weaver-e10-meeting` 主目录删了(只剩 .backup-*),
7
+ * 导致模型读到旧版本、按旧规则把用户推去页面手工建会。
8
+ *
9
+ * 用法:node scripts/install-skill-to-xiaoe.mjs
10
+ * 做的事:
11
+ * 1. 找 AppData/Local/xiaoeUserData/userdata/<id>/user-skills;
12
+ * 2. 复制仓库 skills/weaver-e10-meeting 全部文件过去;
13
+ * 3. 保留/恢复 .skill-id(优先原文件 → 备份目录 → base.json 的 id);
14
+ * 4. 把 base.json 里该技能的 version 同步成 SKILL.md frontmatter 的版本。
15
+ */
16
+ import { existsSync, readFileSync, readdirSync, statSync, copyFileSync, mkdirSync, writeFileSync } from 'node:fs';
17
+ import path from 'node:path';
18
+ import { fileURLToPath } from 'node:url';
19
+
20
+ const here = path.dirname(fileURLToPath(import.meta.url));
21
+ const repoRoot = path.resolve(here, '..');
22
+ const skillSrc = path.join(repoRoot, 'skills', 'weaver-e10-meeting');
23
+ const SKILL_NAME = 'weaver-e10-meeting';
24
+
25
+ const localAppData = process.env.LOCALAPPDATA || path.join(process.env.USERPROFILE || '', 'AppData', 'Local');
26
+ const userdataRoot = path.join(localAppData, 'xiaoeUserData', 'userdata');
27
+ if (!existsSync(userdataRoot)) {
28
+ console.error(`找不到小E 数据目录:${userdataRoot}`);
29
+ process.exit(1);
30
+ }
31
+
32
+ const version = (() => {
33
+ const text = readFileSync(path.join(skillSrc, 'SKILL.md'), 'utf8').replace(/\r\n/g, '\n');
34
+ const m = text.match(/^version:\s*(.+)$/m);
35
+ return m ? m[1].trim() : '';
36
+ })();
37
+
38
+ let installed = 0;
39
+ // 2026-11-04 实测:小E 真正加载的是**租户级** `tenant-skills`(优先级更高),
40
+ // `user-skills` 那份会被平台「更新 skill」重置回 2.11.0,所以两个目录都要铺。
41
+ for (const scope of ['tenant-skills', 'user-skills']) {
42
+ for (const userDir of readdirSync(userdataRoot)) {
43
+ const skillsRoot = path.join(userdataRoot, userDir, scope);
44
+ if (!existsSync(skillsRoot)) continue;
45
+ installInto(skillsRoot);
46
+ }
47
+ }
48
+
49
+ function installInto(skillsRoot) {
50
+ const target = path.join(skillsRoot, SKILL_NAME);
51
+
52
+ // 1) 保留原 .skill-id;没有就从备份目录找;再没有就从 base.json 的条目取
53
+ let skillId = '';
54
+ try {
55
+ skillId = readFileSync(path.join(target, '.skill-id'), 'utf8').trim();
56
+ } catch { /* 主目录被删过就没有 */ }
57
+ if (!skillId) {
58
+ const backup = readdirSync(skillsRoot).find((name) => name.startsWith('.backup') && name.includes('meeting'));
59
+ if (backup) {
60
+ try {
61
+ skillId = readFileSync(path.join(skillsRoot, backup, '.skill-id'), 'utf8').trim();
62
+ } catch { /* ignore */ }
63
+ }
64
+ }
65
+ const baseJsonPath = path.join(skillsRoot, 'base.json');
66
+ let base = null;
67
+ if (existsSync(baseJsonPath)) {
68
+ try {
69
+ base = JSON.parse(readFileSync(baseJsonPath, 'utf8'));
70
+ const entry = (base.skills ?? []).find((s) => s.name === SKILL_NAME);
71
+ if (!skillId) skillId = String(entry?.id ?? '');
72
+ } catch { /* ignore */ }
73
+ }
74
+
75
+ // 2) 复制技能文件
76
+ const copyDir = (rel) => {
77
+ const srcDir = path.join(skillSrc, rel);
78
+ const dstDir = path.join(target, rel);
79
+ mkdirSync(dstDir, { recursive: true });
80
+ for (const name of readdirSync(srcDir)) {
81
+ const src = path.join(srcDir, name);
82
+ const dst = path.join(dstDir, name);
83
+ if (statSync(src).isDirectory()) copyDir(rel ? `${rel}/${name}` : name);
84
+ else copyFileSync(src, dst);
85
+ }
86
+ };
87
+ copyDir('');
88
+
89
+ // 3) 写回 .skill-id
90
+ if (skillId) writeFileSync(path.join(target, '.skill-id'), skillId, 'utf8');
91
+
92
+ // 4) 同步 base.json 版本
93
+ if (base) {
94
+ const entry = (base.skills ?? []).find((s) => s.name === SKILL_NAME);
95
+ if (entry) {
96
+ entry.version = version;
97
+ entry.updateTime = Date.now();
98
+ writeFileSync(baseJsonPath, JSON.stringify(base, null, 2), 'utf8');
99
+ }
100
+ }
101
+
102
+ installed += 1;
103
+ console.log(`已铺装:${target}(version=${version},skillId=${skillId || '未取到'})`);
104
+ }
105
+ if (installed === 0) console.error('没有找到可铺装的 user-skills 目录');
@@ -15,7 +15,9 @@ const packageJsonPath = path.join(repositoryRoot, 'package.json')
15
15
  const sharedSkillName = 'weaver-e10-shared'
16
16
  const skillPrefix = 'weaver-e10-'
17
17
  const legacySkillPrefix = 'weaver-work-cli-'
18
- const [requestedSkillArg, outputArg] = process.argv.slice(2)
18
+ const rawArgs = process.argv.slice(2)
19
+ const includeShared = !rawArgs.includes('--no-shared')
20
+ const [requestedSkillArg, outputArg] = rawArgs.filter((arg) => !arg.startsWith('--'))
19
21
 
20
22
  function sha256(value) {
21
23
  return createHash('sha256').update(value).digest('hex')
@@ -59,7 +61,7 @@ async function resolveSkillNames() {
59
61
  if (!requestedSkill) return allSkills
60
62
  if (!allSkills.includes(requestedSkill)) throw new Error(`未知 Skill:${requestedSkill}`)
61
63
  const names = []
62
- if (requestedSkill !== sharedSkillName && allSkills.includes(sharedSkillName)) names.push(sharedSkillName)
64
+ if (includeShared && requestedSkill !== sharedSkillName && allSkills.includes(sharedSkillName)) names.push(sharedSkillName)
63
65
  names.push(requestedSkill)
64
66
  return names
65
67
  }
@@ -88,7 +88,6 @@
88
88
  "自动填单",
89
89
  "事前申请报销",
90
90
  "开票",
91
- "存台账",
92
91
  "发票浏览按钮"
93
92
  ],
94
93
  "weaver-e10-jucailin": [
@@ -249,6 +248,30 @@
249
248
  "表单分页",
250
249
  "表单详情"
251
250
  ],
251
+ "weaver-e10-recruit-stage": [
252
+ "招聘",
253
+ "招聘助手",
254
+ "招聘启事",
255
+ "招聘岗位",
256
+ "JD",
257
+ "岗位JD",
258
+ "职位",
259
+ "简历",
260
+ "简历解析",
261
+ "简历建档",
262
+ "人才",
263
+ "人才库",
264
+ "候选人",
265
+ "人岗匹配",
266
+ "筛选候选人",
267
+ "面试",
268
+ "AI面试",
269
+ "安排面试",
270
+ "面试安排",
271
+ "面试反馈",
272
+ "面试官",
273
+ "催促面试评价"
274
+ ],
252
275
  "weaver-e10-shared": [
253
276
  "安装",
254
277
  "登录",
@@ -525,5 +548,22 @@
525
548
  "置信度",
526
549
  "处置建议",
527
550
  "资管家闲置"
551
+ ],
552
+ "weaver-e10-reception-flow": [
553
+ "客户参观",
554
+ "客户来访",
555
+ "客户到访",
556
+ "客户接待",
557
+ "接待流程",
558
+ "接待行程单",
559
+ "参观接待",
560
+ "来访接待",
561
+ "接待细节",
562
+ "行程单",
563
+ "接待方案",
564
+ "接待交流参考文档",
565
+ "参观总部",
566
+ "参观典型客户",
567
+ "客户参观接待流程"
528
568
  ]
529
- }
569
+ }
@@ -16,7 +16,7 @@ Agent 调优重点:
16
16
  - 业务输入不得包含 Cookie、ETEAMSID、Token 或内部控制字段;认证只走 `weaver-work-cli auth ...`。
17
17
  - ID 一律来自查询:`doc_id` 来自检索或详情,`folder_id` 来自 `folder.query-by-name`,人员与部门 ID 来自 `org.search-*`,权限与共享的合法取值来自 `*.form` / `*.list`。
18
18
  - 枚举拼写 1:1 沿用源接口,权限键是 `deletePremisstion` / `downloadPremisstion` / `newCreateDocPremisstion` / `newCreateFolderPremisstion`,不要「纠正」成 `Permission`。
19
- - 写操作只接受 CLI 生成的 continuation,不手工构造、不跨操作复用;apply 入参必须与 prepare 逐字一致,票据有效期 10 分钟。
19
+ - 写操作只接受 CLI 生成的 continuation,不手工构造、不跨操作复用;apply 入参必须与 prepare 逐字一致,票据有效期 24 小时。
20
20
  - 分页 `has_next` 按「本页条数 >= page_size」判定,服务端 `total` 不可信;列表默认小页,回复只给摘要。
21
21
  - 附件、封面图片、正文文件属于用户私有数据:上传下载前必须提醒文件可能进入大模型上下文并取得明确确认;文件内容不得读入上下文,只引用路径与元数据。
22
22
  - 上传与下载是长耗时操作(120 秒超时、下载上限 100MB),一次只跑一个,不并发批量传输。
@@ -0,0 +1,18 @@
1
+ 本业务域用于泛微客户参观接待,覆盖「从原话抽取 → 补缺口 → 出两份产物 → 打开填单页」这一条完整链路。入口 `SKILL.md` 按 weaver 风格组织:CRITICAL 共享前置、四步主流程、原话抽取口径、面板约束、建单口径、失败处理、重跑恢复。具体细节拆到 `references/`:
2
+
3
+ - `guide.md`:7 项抽取线索、歧义判据、引导话术、案例与专家检索口径(**只讲抽取与检索,不讲交互形态**)。
4
+ - `browsertool.md`:`<browsertool>` 的 `fill_form + sdkOptions` 形态、`sdkRenderType` 取值含义与排障。
5
+ - `fields-snapshot.md`:字段 ID / 组件类型 / 选项编码 / 明细 7 列的人读对照版;程序读 `data/fields-snapshot.json`。
6
+ - `env-pitfalls.md`:环境踩坑、退出码语义、完整失败矩阵与假阴性判定。
7
+
8
+ Agent 调优重点:
9
+
10
+ - 意图命中「客户来访 / 参观 / 到访 / 接待」即进入本域,先抽取 7 项再决定问什么,不要一上来就提问。
11
+ - 抽取由模型做,CLI 不重做:`reception.ask` 只按 `--known` 算缺口并出面板。
12
+ - 面板只能原样来自 `ask` 回包,**总屏数 ≤2**(客户需求 + 接待细节),手机号并入接待细节,不单独出屏。
13
+ - `ask_user` 只调一次;用户少答的进待办,禁止二轮追问。
14
+ - 案例与专家检索是软依赖:先检索再出件,工具缺失或空结果才跳过,并在内部文档「待确认事项」注明。
15
+ - 两份产物分别是对外行程单 docx 与内部参考 md;**案例与专家只进内部 md**,对外件 `externalLeaks` 必须为 0。
16
+ - 本链路零写请求:只上传附件,流程由用户在页面上自己提交,助手不得代点。
17
+ - `RUN_NOT_FOUND` 时不重跑整轮、不重走面板:带 `--known-file` 重跑 `doc`,CLI 现场重建 run。
18
+ - 技能包只提供数据与资产(快照 / `render.py` / 模板),doc 与 render 必须显式 `--snapshot "$SD/data/fields-snapshot.json"`。