weaver-work-cli 0.1.42 → 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 (318) hide show
  1. package/README.md +17 -0
  2. package/dist/chunks/{archive-J4I6MCKF.js → archive-P6TBQGKL.js} +13 -5
  3. package/dist/chunks/{archive-oa-BRZKKTO4.js → archive-oa-7TQ2NXOH.js} +12 -5
  4. package/dist/chunks/{asset-L7D4FAOZ.js → asset-3ELRG37G.js} +11 -4
  5. package/dist/chunks/{asset-idle-DADLLV75.js → asset-idle-WIGMUFMD.js} +7 -3
  6. package/dist/chunks/{attachment-content-K4C7VLWQ.js → attachment-content-E3276UOV.js} +5 -4
  7. package/dist/chunks/{blog-BVGQ7NZL.js → blog-C5NMZAAC.js} +11 -4
  8. package/dist/chunks/{caizhilian-SAADNFD6.js → caizhilian-5XSM2DFP.js} +13 -6
  9. package/dist/chunks/{calendar-Q7NQY5Z2.js → calendar-FI2WNSBO.js} +12 -5
  10. package/dist/chunks/{chunk-YRSZQUD2.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-EKWAQSLU.js → chunk-BCVYBYYT.js} +432 -2248
  16. package/dist/chunks/{chunk-W7BEHOSR.js → chunk-CWYGFU5B.js} +2 -2
  17. package/dist/chunks/{chunk-NOODWMCL.js → chunk-D4ADSZ7H.js} +1 -1
  18. package/dist/chunks/{chunk-SA6VBIHY.js → chunk-ETNJSKMM.js} +214 -16
  19. package/dist/chunks/{chunk-BBKDXQEC.js → chunk-F4E4EM35.js} +3 -3
  20. package/dist/chunks/{chunk-IZ7S7QUS.js → chunk-FAZTGX7S.js} +6 -6
  21. package/dist/chunks/{chunk-NKZRQXST.js → chunk-FRZKBMSW.js} +52 -36
  22. package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
  23. package/dist/chunks/{chunk-GEWYMQME.js → chunk-GAMZLAG2.js} +1 -1
  24. package/dist/chunks/{chunk-R4CHUSKC.js → chunk-GM6J7Q4B.js} +4 -4
  25. package/dist/chunks/{chunk-APVFJUQH.js → chunk-GRDRG6HP.js} +3 -3
  26. package/dist/chunks/{chunk-LDZQPUIA.js → chunk-HIT4Y6OI.js} +1 -1
  27. package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
  28. package/dist/chunks/{chunk-LADPYOWC.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-BIPYLLVS.js → chunk-N4M2DDFE.js} +15 -15
  32. package/dist/chunks/{chunk-QKNKR4RH.js → chunk-OF4S23UB.js} +4 -4
  33. package/dist/chunks/{chunk-JPRO6ER2.js → chunk-PC7VKEB5.js} +57 -60
  34. package/dist/chunks/{chunk-4PD5NWAX.js → chunk-PUQS5MWL.js} +2 -2
  35. package/dist/chunks/{chunk-2LV74IWP.js → chunk-Q4OYAQYH.js} +1 -1
  36. package/dist/chunks/{chunk-72CKAUAG.js → chunk-QVSWRLLU.js} +7 -5
  37. package/dist/chunks/{chunk-4RAE6JXP.js → chunk-TA7FXXJD.js} +6 -3
  38. package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
  39. package/dist/chunks/{chunk-FOAA27U5.js → chunk-UFIT2UU3.js} +16 -4
  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-G4UR6NXN.js → chunk-WSF4NNMR.js} +3 -3
  44. package/dist/chunks/chunk-XHK4MDR5.js +2497 -0
  45. package/dist/chunks/{chunk-3KTFS4IA.js → chunk-XNIK66I4.js} +19 -9
  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-GHXCDPTM.js → chunk-Z7VYWPZV.js} +1 -1
  49. package/dist/chunks/{conflict-F2OMZRTO.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-5BETHRSG.js → contract-DNIIW5VJ.js} +13 -5
  55. package/dist/chunks/{cowork-3MN6EQQO.js → cowork-GMLRGVIW.js} +11 -4
  56. package/dist/chunks/{create-flow-5FQNNMVO.js → create-flow-J22BO65E.js} +8 -7
  57. package/dist/chunks/{ebuilder-form-SBHOYBUD.js → ebuilder-form-ANV2FHYV.js} +12 -7
  58. package/dist/chunks/{ehr-KMOJULKG.js → ehr-GSTGAIY3.js} +266 -24
  59. package/dist/chunks/{employee-SAK2QYXX.js → employee-22BGJ3QS.js} +3 -3
  60. package/dist/chunks/{env-LB7NBL2O.js → env-BX3VRFS7.js} +4 -3
  61. package/dist/chunks/{esb-W2PJCFCX.js → esb-ATAIASX2.js} +12 -7
  62. package/dist/chunks/{factory-6ZFQXQ46.js → factory-PETTFME6.js} +3 -2
  63. package/dist/chunks/{fna-ZQPCUV4R.js → fna-YEKBSFSX.js} +14 -8
  64. package/dist/chunks/{group-chat-2HHAJN46.js → group-chat-BFVXAYFX.js} +5 -4
  65. package/dist/chunks/{host-ATKVNZAT.js → host-HRBXEPDQ.js} +5 -5
  66. package/dist/chunks/{host-BQH22NTQ.js → host-LR55CTHP.js} +5 -5
  67. package/dist/chunks/{host-X2CSLFM6.js → host-SUOY6VYQ.js} +5 -5
  68. package/dist/chunks/{host-4CBHGOHT.js → host-SZGV4UNT.js} +5 -5
  69. package/dist/chunks/{host-YTODKMSL.js → host-WIKN2EJ5.js} +5 -5
  70. package/dist/chunks/{hrm-FFM4UJFS.js → hrm-NRDO4W5G.js} +11 -7
  71. package/dist/chunks/{im-VEHKDQPB.js → im-IQ2HN23S.js} +8 -7
  72. package/dist/chunks/{invoice-LVIKSIIF.js → invoice-MNRW76PP.js} +636 -1768
  73. package/dist/chunks/{jiuchuanhui-X6DINO5P.js → jiuchuanhui-DTRBAX4N.js} +14 -6
  74. package/dist/chunks/{lazy-dispatch-KSWTN5L6.js → lazy-dispatch-ZVWAI25B.js} +7 -6
  75. package/dist/chunks/{mail-VDKRGUD3.js → mail-ZVAUXOJA.js} +16 -14
  76. package/dist/chunks/{meeting-CLC6HP3Z.js → meeting-FEVPZ67S.js} +21 -14
  77. package/dist/chunks/{okr-CHG4OO3U.js → okr-SDH3E5RA.js} +12 -5
  78. package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
  79. package/dist/chunks/{plan-XWR75667.js → plan-E35JFDI7.js} +12 -5
  80. package/dist/chunks/{project-5BXOOKMG.js → project-73QXBAB2.js} +11 -4
  81. package/dist/chunks/reception-UWZVACBN.js +1899 -0
  82. package/dist/chunks/{recruit-stage-DGMFNNDE.js → recruit-stage-4MAOCKFY.js} +320 -57
  83. package/dist/chunks/registry-IM5G23LS.js +24 -0
  84. package/dist/chunks/{registry-RHMW6ANW.js → registry-JDUS4E7D.js} +7 -6
  85. package/dist/chunks/{registry-7FFOXIAW.js → registry-KNKSCJNT.js} +7 -6
  86. package/dist/chunks/{registry-Z43434VG.js → registry-PO7SI256.js} +4 -4
  87. package/dist/chunks/{registry-OZSMDVPP.js → registry-PVUZQDDQ.js} +3 -3
  88. package/dist/chunks/{room-recommend-62H7ZQQ6.js → room-recommend-H7KLXA5R.js} +6 -5
  89. package/dist/chunks/{schedule-FNXKH3DQ.js → schedule-ESZIBAUO.js} +6 -5
  90. package/dist/chunks/{workflow-ADHKCAJK.js → workflow-CWJFJLQU.js} +13 -8
  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 +37 -31
  98. package/dist/internal/e10/auth/commands.js +163 -8
  99. package/dist/internal/e10/auth/error-log.js +182 -0
  100. package/dist/internal/e10/auth/session.js +17 -3
  101. package/dist/internal/e10/auth-recovery.js +39 -12
  102. package/dist/internal/e10/context.js +17 -2
  103. package/dist/internal/skills/install.js +9 -1
  104. package/dist/shortcuts/archive/continuation.js +2 -1
  105. package/dist/shortcuts/archive/index.js +3 -0
  106. package/dist/shortcuts/archive/operations/confirm.js +2 -1
  107. package/dist/shortcuts/archive-oa/continuation.js +2 -1
  108. package/dist/shortcuts/archive-oa/index.js +2 -0
  109. package/dist/shortcuts/archive-oa/operations/confirm.js +2 -1
  110. package/dist/shortcuts/asset/continuation.js +2 -1
  111. package/dist/shortcuts/asset/index.js +2 -0
  112. package/dist/shortcuts/asset-idle/index.js +2 -0
  113. package/dist/shortcuts/blog/continuation.js +2 -1
  114. package/dist/shortcuts/blog/index.js +2 -0
  115. package/dist/shortcuts/caizhilian/continuation.js +2 -1
  116. package/dist/shortcuts/caizhilian/index.js +2 -0
  117. package/dist/shortcuts/caizhilian/operations/confirm.js +3 -2
  118. package/dist/shortcuts/calendar/continuation.js +2 -1
  119. package/dist/shortcuts/calendar/index.js +2 -0
  120. package/dist/shortcuts/calendar/operations/write.js +1 -1
  121. package/dist/shortcuts/contract/continuation.js +2 -1
  122. package/dist/shortcuts/contract/index.js +2 -0
  123. package/dist/shortcuts/contract/operations/write.js +2 -1
  124. package/dist/shortcuts/cowork/continuation.js +2 -1
  125. package/dist/shortcuts/cowork/index.js +2 -0
  126. package/dist/shortcuts/ebuilder-form/continuation.js +2 -1
  127. package/dist/shortcuts/ebuilder-form/index.js +2 -0
  128. package/dist/shortcuts/ebuilder-form/operations/write.js +3 -2
  129. package/dist/shortcuts/ehr/continuation.js +2 -1
  130. package/dist/shortcuts/ehr/index.js +2 -0
  131. package/dist/shortcuts/ehr/operations/attend-write.js +1 -1
  132. package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +182 -3
  133. package/dist/shortcuts/ehr/operations/recruit-position.js +134 -2
  134. package/dist/shortcuts/ehr/operations/recruit-write.js +1 -1
  135. package/dist/shortcuts/esb/continuation.js +2 -1
  136. package/dist/shortcuts/esb/index.js +2 -0
  137. package/dist/shortcuts/esb/operations/trigger.js +2 -1
  138. package/dist/shortcuts/fna/continuation.js +2 -1
  139. package/dist/shortcuts/fna/index.js +2 -0
  140. package/dist/shortcuts/fna/operations/invoice-writeoff.js +1 -1
  141. package/dist/shortcuts/fna/operations/loan.js +1 -1
  142. package/dist/shortcuts/hrm/index.js +2 -0
  143. package/dist/shortcuts/im/continuation.js +2 -1
  144. package/dist/shortcuts/index.js +5 -0
  145. package/dist/shortcuts/invoice/continuation.js +2 -1
  146. package/dist/shortcuts/invoice/index.js +14 -15
  147. package/dist/shortcuts/invoice/invoice-record.js +93 -0
  148. package/dist/shortcuts/invoice/manifest.js +190 -393
  149. package/dist/shortcuts/invoice/operations/add.js +2 -1
  150. package/dist/shortcuts/invoice/operations/delete.js +2 -1
  151. package/dist/shortcuts/invoice/operations/import.js +2 -1
  152. package/dist/shortcuts/invoice/operations/issuing-contract-detail.js +86 -0
  153. package/dist/shortcuts/invoice/operations/issuing-contracts.js +210 -0
  154. package/dist/shortcuts/invoice/operations/registry.js +17 -17
  155. package/dist/shortcuts/invoice/operations/reim-auto.js +4 -569
  156. package/dist/shortcuts/invoice/operations/reim.js +52 -341
  157. package/dist/shortcuts/invoice/operations/shared.js +21 -4
  158. package/dist/shortcuts/invoice/operations/update.js +2 -1
  159. package/dist/shortcuts/invoice/projection.js +10 -62
  160. package/dist/shortcuts/jiuchuanhui/continuation.js +2 -1
  161. package/dist/shortcuts/jiuchuanhui/index.js +2 -0
  162. package/dist/shortcuts/jiuchuanhui/operations/datajson.js +2 -1
  163. package/dist/shortcuts/jiuchuanhui/operations/esb.js +2 -1
  164. package/dist/shortcuts/mail/continuation.js +2 -1
  165. package/dist/shortcuts/mail/index.js +2 -0
  166. package/dist/shortcuts/mail/operations/mail-blacklist.js +1 -1
  167. package/dist/shortcuts/mail/operations/mail-contacts.js +1 -1
  168. package/dist/shortcuts/mail/operations/mail-send.js +1 -1
  169. package/dist/shortcuts/mail/operations/mail-sign.js +1 -1
  170. package/dist/shortcuts/mail/operations/mail-template.js +1 -1
  171. package/dist/shortcuts/meeting/continuation.js +2 -1
  172. package/dist/shortcuts/meeting/index.js +2 -0
  173. package/dist/shortcuts/meeting/operations/change.js +1 -1
  174. package/dist/shortcuts/meeting/operations/create.js +1 -1
  175. package/dist/shortcuts/meeting/operations/eb/create-flow.js +16 -7
  176. package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
  177. package/dist/shortcuts/meeting/operations/eb/factory.js +1 -1
  178. package/dist/shortcuts/meeting/operations/lifecycle.js +1 -1
  179. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  180. package/dist/shortcuts/meeting/operations/signs.js +1 -1
  181. package/dist/shortcuts/okr/continuation.js +2 -1
  182. package/dist/shortcuts/okr/index.js +2 -0
  183. package/dist/shortcuts/okr/operations/write.js +1 -1
  184. package/dist/shortcuts/plan/continuation.js +2 -1
  185. package/dist/shortcuts/plan/index.js +2 -0
  186. package/dist/shortcuts/plan/operations/write.js +1 -1
  187. package/dist/shortcuts/project/continuation.js +2 -1
  188. package/dist/shortcuts/project/index.js +2 -0
  189. package/dist/shortcuts/reception/constants.js +53 -0
  190. package/dist/shortcuts/reception/errors.js +54 -0
  191. package/dist/shortcuts/reception/host.js +125 -0
  192. package/dist/shortcuts/reception/index.js +198 -0
  193. package/dist/shortcuts/reception/manifest.js +177 -0
  194. package/dist/shortcuts/reception/operations/ask.js +71 -0
  195. package/dist/shortcuts/reception/operations/browsertool.js +58 -0
  196. package/dist/shortcuts/reception/operations/compose.js +129 -0
  197. package/dist/shortcuts/reception/operations/customparams.js +74 -0
  198. package/dist/shortcuts/reception/operations/doc.js +238 -0
  199. package/dist/shortcuts/reception/operations/docrender.js +36 -0
  200. package/dist/shortcuts/reception/operations/panels.js +179 -0
  201. package/dist/shortcuts/reception/operations/registry.js +26 -0
  202. package/dist/shortcuts/reception/operations/render-assets.js +184 -0
  203. package/dist/shortcuts/reception/operations/render.js +123 -0
  204. package/dist/shortcuts/reception/operations/runs.js +38 -0
  205. package/dist/shortcuts/reception/operations/schedule.js +127 -0
  206. package/dist/shortcuts/reception/operations/shared.js +196 -0
  207. package/dist/shortcuts/reception/operations/snapshot.js +68 -0
  208. package/dist/shortcuts/reception/operations/types.js +1 -0
  209. package/dist/shortcuts/reception/operations.js +33 -0
  210. package/dist/shortcuts/reception/upload.js +218 -0
  211. package/dist/shortcuts/recruit-stage/context.js +145 -33
  212. package/dist/shortcuts/recruit-stage/continuation.js +2 -1
  213. package/dist/shortcuts/recruit-stage/operations/jd-create.js +106 -17
  214. package/dist/shortcuts/recruit-stage/operations/resume-import.js +166 -10
  215. package/dist/shortcuts/workflow/continuation.js +2 -1
  216. package/dist/shortcuts/workflow/index.js +2 -0
  217. package/dist/shortcuts/workflow/operations/form.js +32 -8
  218. package/dist/shortcuts/workflow/operations/write.js +1 -1
  219. package/docs/_catalog.md +3 -0
  220. package/docs/agent-invoice.md +1 -1
  221. package/docs/archive-oa.md +1 -1
  222. package/docs/caizhilian.md +1 -1
  223. package/docs/calendar.md +1 -1
  224. package/docs/contract.md +1 -1
  225. package/docs/e10-auth.md +16 -0
  226. package/docs/ehr.md +2 -2
  227. package/docs/esb.md +1 -1
  228. package/docs/im.md +1 -1
  229. package/docs/invoice.md +8 -12
  230. package/docs/okr.md +1 -1
  231. package/docs/reception.md +119 -0
  232. package/package.json +1 -1
  233. package/scripts/clean.mjs +43 -2
  234. package/skill-template/business-info.json +18 -2
  235. package/skill-template/domains/caizhilian.md +1 -1
  236. package/skill-template/domains/reception-flow.md +18 -0
  237. package/skill-template/domains/yepiaotong.md +4 -7
  238. package/skills/weaver-e10-archive-oa/references/source-manifest.json +14 -14
  239. package/skills/weaver-e10-blog/references/blog-publish.md +1 -1
  240. package/skills/weaver-e10-blog/references/source-manifest.json +7 -7
  241. package/skills/weaver-e10-caizhilian/references/source-manifest.json +21 -21
  242. package/skills/weaver-e10-caizhilian/references/write-protocol.md +2 -2
  243. package/skills/weaver-e10-calendar/references/calendar-write.md +1 -1
  244. package/skills/weaver-e10-cowork/SKILL.md +1 -1
  245. package/skills/weaver-e10-ebuilder-form/SKILL.md +1 -1
  246. package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -1
  247. package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -1
  248. package/skills/weaver-e10-esb/SKILL.md +2 -2
  249. package/skills/weaver-e10-esb/references/source-manifest.json +22 -22
  250. package/skills/weaver-e10-esb/references/trigger.md +2 -2
  251. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
  252. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +1 -1
  253. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +1 -1
  254. package/skills/weaver-e10-jinchengda/references/source-manifest.json +29 -29
  255. package/skills/weaver-e10-jucailin/SKILL.md +1 -1
  256. package/skills/weaver-e10-jucailin/references/attend-write.md +2 -2
  257. package/skills/weaver-e10-jucailin/references/recruit-create.md +12 -3
  258. package/skills/weaver-e10-jucailin/references/recruit-write.md +1 -1
  259. package/skills/weaver-e10-meeting/SKILL.md +8 -6
  260. package/skills/weaver-e10-meeting/references/meeting-change.md +1 -1
  261. package/skills/weaver-e10-meeting/references/meeting-create.md +1 -1
  262. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +1 -1
  263. package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
  264. package/skills/weaver-e10-okr/references/okr-align.md +1 -1
  265. package/skills/weaver-e10-okr/references/okr-keyresult.md +1 -1
  266. package/skills/weaver-e10-okr/references/okr-write.md +1 -1
  267. package/skills/weaver-e10-okr/references/source-manifest.json +8 -8
  268. package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
  269. package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
  270. package/skills/weaver-e10-qiyecheng/references/loan-management.md +1 -1
  271. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +18 -18
  272. package/skills/weaver-e10-reception-flow/SKILL.md +173 -0
  273. 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
  274. package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +213 -0
  275. package/skills/weaver-e10-reception-flow/references/browsertool.md +68 -0
  276. package/skills/weaver-e10-reception-flow/references/env-pitfalls.md +51 -0
  277. package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +227 -0
  278. package/skills/weaver-e10-reception-flow/references/guide.md +179 -0
  279. package/skills/weaver-e10-reception-flow/scripts/locate.sh +14 -0
  280. package/skills/weaver-e10-reception-flow/scripts/render.py +724 -0
  281. package/skills/weaver-e10-recruit-stage/SKILL.md +9 -5
  282. package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +1 -1
  283. package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +66 -0
  284. package/skills/weaver-e10-recruit-stage/references/position-templates.md +202 -0
  285. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +22 -0
  286. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +14 -1
  287. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +6 -0
  288. package/skills/weaver-e10-shijingran/SKILL.md +5 -5
  289. package/skills/weaver-e10-shijingran/references/source-manifest.json +37 -36
  290. package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +2 -0
  291. package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
  292. package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
  293. package/skills/weaver-e10-yepiaotong/SKILL.md +19 -26
  294. package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +13 -10
  295. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +2 -0
  296. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +194 -155
  297. package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +28 -32
  298. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +5 -1
  299. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +8 -10
  300. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +211 -616
  301. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +149 -117
  302. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +17 -20
  303. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +20 -39
  304. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +55 -22
  305. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -17
  306. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +88 -92
  307. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +144 -354
  308. package/skills/weaver-e10-yimiaoban/SKILL.md +1 -1
  309. package/skills/weaver-e10-yimiaoban/references/msg-write.md +1 -1
  310. package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
  311. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +7 -7
  312. package/dist/chunks/chunk-TTPJJJC4.js +0 -465
  313. package/dist/chunks/registry-BKBZPBAJ.js +0 -23
  314. package/dist/shortcuts/invoice/markdown.js +0 -172
  315. package/dist/shortcuts/invoice/operations/issuing-qys.js +0 -424
  316. package/skills/weaver-e10-meeting.zip +0 -0
  317. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +0 -131
  318. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +0 -179
@@ -1,5 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
+ import { reportPlatformError } from '../../core/error-codes.js';
3
4
  import { createJiuchuanhuiContinuationSigner } from './continuation.js';
4
5
  import { createJiuchuanhuiHost } from './host.js';
5
6
  import { jiuchuanhuiManifest } from './manifest.js';
@@ -82,6 +83,7 @@ async function executeAndPrint(ctx, operation, input) {
82
83
  ctx.output.write(successEnvelope(operation, result), { json: true });
83
84
  }
84
85
  catch (error) {
86
+ reportPlatformError(error);
85
87
  console.error(JSON.stringify(failureEnvelope(error), null, 2));
86
88
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
87
89
  }
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
1
2
  import { jiuchuanhuiConfirmationError, jiuchuanhuiPartialError, jiuchuanhuiValidationError, isJiuchuanhuiNetworkError, } from '../errors.js';
2
3
  import { asObject, asPositiveString, byIdBody, datasBody, listBody, listRecords, pagingFrom, resultDataIds, sessionMatches, stripForbiddenKeys, workflow, } from './shared.js';
3
4
  /**
@@ -32,7 +33,7 @@ export class DatajsonWritePrepareOperation {
32
33
  data: {
33
34
  preview,
34
35
  continuation: continuationToken,
35
- expiresInSeconds: 600,
36
+ expiresInSeconds: CONTINUATION_TTL_SECONDS,
36
37
  workflow: workflow(this.applyOperation, 'AWAITING_CONFIRMATION'),
37
38
  },
38
39
  };
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
1
2
  import { jiuchuanhuiConfirmationError, jiuchuanhuiPartialError, jiuchuanhuiValidationError, isJiuchuanhuiNetworkError, } from '../errors.js';
2
3
  import { asObject, asNonEmptyString, esbBody, esbOutcome, sessionMatches, workflow } from './shared.js';
3
4
  /**
@@ -36,7 +37,7 @@ export class EsbWritePrepareOperation {
36
37
  data: {
37
38
  preview,
38
39
  continuation: continuationToken,
39
- expiresInSeconds: 600,
40
+ expiresInSeconds: CONTINUATION_TTL_SECONDS,
40
41
  workflow: workflow(this.applyOperation, 'AWAITING_CONFIRMATION'),
41
42
  },
42
43
  };
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
1
2
  import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
2
3
  import { existsSync } from 'node:fs';
3
4
  import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
@@ -35,7 +36,7 @@ function signature(payload, key) {
35
36
  }
36
37
  export function createMailContinuationSigner(ctx) {
37
38
  return {
38
- async issue(payload, ttlMs = 10 * 60_000) {
39
+ async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
39
40
  const issuedAt = Date.now();
40
41
  const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
41
42
  const sig = signature(body, await loadKey(ctx));
@@ -1,5 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
+ import { reportPlatformError } from '../../core/error-codes.js';
3
4
  import { createMailContinuationSigner } from './continuation.js';
4
5
  import { createMailHost } from './host.js';
5
6
  import { mailManifest } from './manifest.js';
@@ -83,6 +84,7 @@ async function executeAndPrint(ctx, operation, input) {
83
84
  ctx.output.write(successEnvelope(operation, result), { json: true });
84
85
  }
85
86
  catch (error) {
87
+ reportPlatformError(error);
86
88
  console.error(JSON.stringify(failureEnvelope(error), null, 2));
87
89
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
88
90
  }
@@ -1,6 +1,6 @@
1
+ import { CONTINUATION_TTL_MS } from '../../../core/continuation-ttl.js';
1
2
  import { mailValidationError } from '../errors.js';
2
3
  import { WRITE, mailSuccess, schemaOf, SCHEMA_STRING } from './types.js';
3
- const CONTINUATION_TTL_MS = 600_000;
4
4
  const BLACKLIST_SCHEMA = schemaOf({
5
5
  operateType: { type: 'string', description: 'add / delete' },
6
6
  mailAddress: SCHEMA_STRING,
@@ -1,6 +1,6 @@
1
+ import { CONTINUATION_TTL_MS } from '../../../core/continuation-ttl.js';
1
2
  import { mailValidationError } from '../errors.js';
2
3
  import { WRITE, mailSuccess, schemaOf, SCHEMA_STRING } from './types.js';
3
- const CONTINUATION_TTL_MS = 600_000;
4
4
  // ---------------------------------------------------------------------------
5
5
  // 联系人 新增/编辑(prepare/apply)
6
6
  // ---------------------------------------------------------------------------
@@ -1,7 +1,7 @@
1
+ import { CONTINUATION_TTL_MS } from '../../../core/continuation-ttl.js';
1
2
  import { randomBytes } from 'node:crypto';
2
3
  import { mailValidationError } from '../errors.js';
3
4
  import { WRITE, mailSuccess, schemaOf, SCHEMA_STRING } from './types.js';
4
- const CONTINUATION_TTL_MS = 600_000;
5
5
  function b64(s) {
6
6
  return Buffer.from(s, 'utf8').toString('base64');
7
7
  }
@@ -1,6 +1,6 @@
1
+ import { CONTINUATION_TTL_MS } from '../../../core/continuation-ttl.js';
1
2
  import { mailValidationError } from '../errors.js';
2
3
  import { READ, WRITE, mailSuccess, schemaOf, SCHEMA_STRING } from './types.js';
3
- const CONTINUATION_TTL_MS = 600_000;
4
4
  const SIGN_SCHEMA = schemaOf({
5
5
  id: SCHEMA_STRING,
6
6
  signName: SCHEMA_STRING,
@@ -1,6 +1,6 @@
1
+ import { CONTINUATION_TTL_MS } from '../../../core/continuation-ttl.js';
1
2
  import { mailValidationError } from '../errors.js';
2
3
  import { WRITE, mailSuccess, schemaOf, SCHEMA_STRING } from './types.js';
3
- const CONTINUATION_TTL_MS = 600_000;
4
4
  const TEMPLATE_SCHEMA = schemaOf({
5
5
  id: SCHEMA_STRING,
6
6
  templateType: SCHEMA_STRING,
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
1
2
  import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
2
3
  import { existsSync } from 'node:fs';
3
4
  import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
@@ -35,7 +36,7 @@ function signature(payload, key) {
35
36
  }
36
37
  export function createMeetingContinuationSigner(ctx) {
37
38
  return {
38
- async issue(payload, ttlMs = 10 * 60_000) {
39
+ async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
39
40
  const issuedAt = Date.now();
40
41
  const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
41
42
  const sig = signature(body, await loadKey(ctx));
@@ -1,5 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
+ import { reportPlatformError } from '../../core/error-codes.js';
3
4
  import { createMeetingContinuationSigner } from './continuation.js';
4
5
  import { createMeetingHost } from './host.js';
5
6
  import { meetingManifest, OPERATION_INDEX_HINT } from './manifest.js';
@@ -87,6 +88,7 @@ async function executeAndPrint(ctx, operation, input) {
87
88
  ctx.output.write(successEnvelope(operation, result), { json: true });
88
89
  }
89
90
  catch (error) {
91
+ reportPlatformError(error);
90
92
  console.error(JSON.stringify(failureEnvelope(error), null, 2));
91
93
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
92
94
  }
@@ -1,8 +1,8 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
1
2
  import { createHash } from 'node:crypto';
2
3
  import { meetingConfirmationError, meetingPartialError, meetingValidationError } from '../errors.js';
3
4
  import { meetingSuccess, SCHEMA_DATETIME_MINUTE, SCHEMA_ID } from './types.js';
4
5
  import { assertDateTimeMinute, extractRows, mergeSnapshot, toIdCsv, toIdString } from './shared.js';
5
- const CONTINUATION_TTL_SECONDS = 600;
6
6
  const LIST_PATH = '/api/meeting/search/getMeetingList';
7
7
  function fingerprint(value) {
8
8
  return createHash('sha256').update(JSON.stringify(value ?? null)).digest('hex').slice(0, 32);
@@ -1,8 +1,8 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
1
2
  import { createHash } from 'node:crypto';
2
3
  import { meetingConflictError, meetingConfirmationError, meetingPartialError, meetingValidationError } from '../errors.js';
3
4
  import { meetingSuccess, SCHEMA_DATETIME_MINUTE, SCHEMA_ID } from './types.js';
4
5
  import { assertDateTimeMinute, extractConflict, mergeSnapshot, toIdCsv, toIdString, } from './shared.js';
5
- const CONTINUATION_TTL_SECONDS = 600;
6
6
  function fingerprint(value) {
7
7
  return createHash('sha256').update(JSON.stringify(value ?? null)).digest('hex').slice(0, 32);
8
8
  }
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_MS, CONTINUATION_TTL_SECONDS } from '../../../../core/continuation-ttl.js';
1
2
  import { existsSync } from 'node:fs';
2
3
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
3
4
  import { homedir } from 'node:os';
@@ -278,6 +279,13 @@ export async function shapeBrowserValues(env, values) {
278
279
  readable.address = String(shaped.address);
279
280
  }
280
281
  }
282
+ // 邀请函要用「人话版本」的时间(预置函走 readable,之前这里没放,导致预置函时间缺失)
283
+ if (shaped.begin_datetime !== undefined && String(shaped.begin_datetime).trim() !== '') {
284
+ readable.begin_datetime = String(shaped.begin_datetime).trim();
285
+ }
286
+ if (shaped.end_datetime !== undefined && String(shaped.end_datetime).trim() !== '') {
287
+ readable.end_datetime = String(shaped.end_datetime).trim();
288
+ }
281
289
  const personFields = ['hrm_members', 'caller', 'contacter'];
282
290
  const idPool = [];
283
291
  for (const key of personFields) {
@@ -2046,8 +2054,11 @@ const ebMeetingCreateFlowPrepare = {
2046
2054
  })();
2047
2055
  const shaped = await shapeBrowserValues(env, {
2048
2056
  mt_name: args.mt_name,
2049
- begin_datetime: args.begin_datetime,
2050
- end_datetime: args.end_datetime,
2057
+ // ⛔ 2026-11-05 修:用户只说「明天下午」时,时间是 CLI 按 time_slot 展开出来的(beginText/endText),
2058
+ // 原始入参 args.begin_datetime 是空的 —— 以前这里直接取 args,表单两个时间字段就空着,
2059
+ // 页面打开后默认成"当前时间"(用户实测:填 11-06 13:00–18:00,表单显示 11-05 17:25)。
2060
+ begin_datetime: beginText || args.begin_datetime,
2061
+ end_datetime: endText || args.end_datetime,
2051
2062
  mt_desc: args.mt_desc,
2052
2063
  address: addressInput,
2053
2064
  customize_address: args.customize_address,
@@ -2148,9 +2159,7 @@ const ebMeetingCreateFlowPrepare = {
2148
2159
  + '传 crm_detail_mode:"only" 再配 crm_member_details 才覆盖本次自动带入。');
2149
2160
  }
2150
2161
  else if (auto.missing.length > 0) {
2151
- warnings.push(`已写「参会客户」,但没能自动带出「${auto.missing.join('、')}」的联系人(CRM 里查不到)。`
2152
- + '请把已查到的联系人直接告给用户核对;确实没有联系人时问一次姓名+手机号,'
2153
- + '再以 crm_member_details:[{"xm":"张三","sjhm":"13800000000"}] 重新 prepare。');
2162
+ warnings.push(`已写「参会客户」,但没能自动带出「${auto.missing.join('、')}」的联系人(CRM 里没建档联系人)。`);
2154
2163
  }
2155
2164
  }
2156
2165
  }
@@ -2293,7 +2302,7 @@ const ebMeetingCreateFlowPrepare = {
2293
2302
  },
2294
2303
  },
2295
2304
  fingerprint: JSON.stringify({ workflowId, main, ...(detailPayload ? { details: detailPayload } : {}) }),
2296
- }, 10 * 60 * 1000);
2305
+ }, CONTINUATION_TTL_MS);
2297
2306
  return meetingSuccess('meeting.eb.meeting.create.flow.prepare', {
2298
2307
  status: 'AWAITING_CONFIRMATION',
2299
2308
  preview: {
@@ -2321,7 +2330,7 @@ const ebMeetingCreateFlowPrepare = {
2321
2330
  ...(Object.keys(decisions).length > 0 ? { decisions } : {}),
2322
2331
  },
2323
2332
  continuation,
2324
- expiresInSeconds: 600,
2333
+ expiresInSeconds: CONTINUATION_TTL_SECONDS,
2325
2334
  }, warnings.length > 0 ? { warnings } : {});
2326
2335
  },
2327
2336
  };
@@ -14,12 +14,12 @@
14
14
  * - `meeting.eb.decision.publish`:写决议(概述 + 明细)→ 自动写回会议为已决议(含部分失败语义);
15
15
  * - `meeting.eb.sign.mark`:按「会议 + 参会人」自动定位签到记录,走 update 补签 / 补签退。
16
16
  */
17
+ import { CONTINUATION_TTL_SECONDS } from '../../../../core/continuation-ttl.js';
17
18
  import { EB_BASE, ebBusinessSuccess, extractEbRows, fingerprint, normalizeEbWrite, queryBody, requireConfirm, verifyLease, writeBody, } from './factory.js';
18
19
  import { EB_ENDPOINTS } from './catalog.js';
19
20
  import { meetingSuccess } from '../types.js';
20
21
  import { meetingPartialError, meetingValidationError } from '../../errors.js';
21
22
  import { toIdString } from '../shared.js';
22
- const CONTINUATION_TTL_SECONDS = 600;
23
23
  const DATE_PATTERN = '^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}$';
24
24
  /** 本地时间的 yyyy-MM-dd HH:mm:ss(EB 的签到/完成时间字段要求带秒)。 */
25
25
  function formatSecondNow() {
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../../core/continuation-ttl.js';
1
2
  import { createHash } from 'node:crypto';
2
3
  import { meetingConfirmationError, meetingPartialError, meetingValidationError } from '../../errors.js';
3
4
  import { meetingSuccess, SCHEMA_ID } from '../types.js';
@@ -58,7 +59,6 @@ async function buildPersonnelText(env, data) {
58
59
  }
59
60
  return out;
60
61
  }
61
- const CONTINUATION_TTL_SECONDS = 600;
62
62
  /**
63
63
  * EB 响应成功判定。
64
64
  * EB 的响应体与标准版不同:成功时顶层常为 `{datajson:{...}}`(可能不带 status/code),
@@ -1,8 +1,8 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
1
2
  import { createHash } from 'node:crypto';
2
3
  import { meetingConfirmationError, meetingPartialError, meetingValidationError } from '../errors.js';
3
4
  import { meetingSuccess, SCHEMA_ID } from './types.js';
4
5
  import { assertMeetingExists, mergeSnapshot, toIdString } from './shared.js';
5
- const CONTINUATION_TTL_SECONDS = 600;
6
6
  function fingerprint(value) {
7
7
  return createHash('sha256').update(JSON.stringify(value ?? null)).digest('hex').slice(0, 32);
8
8
  }
@@ -1,8 +1,8 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
1
2
  import { createHash } from 'node:crypto';
2
3
  import { meetingPartialError, meetingValidationError } from '../errors.js';
3
4
  import { meetingSuccess, SCHEMA_ID } from './types.js';
4
5
  import { extractRows, mergeSnapshot, pickBusinessInput, toIdString } from './shared.js';
5
- const CONTINUATION_TTL_SECONDS = 600;
6
6
  function fingerprint(value) {
7
7
  return createHash('sha256').update(JSON.stringify(value ?? null)).digest('hex').slice(0, 32);
8
8
  }
@@ -1,8 +1,8 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
1
2
  import { createHash } from 'node:crypto';
2
3
  import { meetingConfirmationError, meetingPartialError, meetingValidationError } from '../errors.js';
3
4
  import { meetingSuccess, SCHEMA_ID } from './types.js';
4
5
  import { extractRows, mergeSnapshot, pickBusinessInput, toIdString } from './shared.js';
5
- const CONTINUATION_TTL_SECONDS = 600;
6
6
  function fingerprint(value) {
7
7
  return createHash('sha256').update(JSON.stringify(value ?? null)).digest('hex').slice(0, 32);
8
8
  }
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
1
2
  import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
2
3
  import { existsSync } from 'node:fs';
3
4
  import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
@@ -35,7 +36,7 @@ function signature(payload, key) {
35
36
  }
36
37
  export function createOkrContinuationSigner(ctx) {
37
38
  return {
38
- async issue(payload, ttlMs = 10 * 60_000) {
39
+ async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
39
40
  const issuedAt = Date.now();
40
41
  const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
41
42
  const sig = signature(body, await loadKey(ctx));
@@ -1,5 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
+ import { reportPlatformError } from '../../core/error-codes.js';
3
4
  import { createOkrContinuationSigner } from './continuation.js';
4
5
  import { okrValidationError } from './errors.js';
5
6
  import { createOkrHost } from './host.js';
@@ -83,6 +84,7 @@ async function executeAndPrint(ctx, operation, input) {
83
84
  ctx.output.write(successEnvelope(operation, result), { json: true });
84
85
  }
85
86
  catch (error) {
87
+ reportPlatformError(error);
86
88
  console.error(JSON.stringify(failureEnvelope(error), null, 2));
87
89
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
88
90
  }
@@ -1,9 +1,9 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
1
2
  import { okrApiError, okrPartialError, okrValidationError } from '../errors.js';
2
3
  import { businessMessage, isDatajsonSuccess, isFlagSuccess } from '../host.js';
3
4
  import { buildStandardSaveBody, createDetailUrlResolver, fetchGoalRaw, goalPrincipalId, okrAbsoluteUrl, resolveLink, } from './link.js';
4
5
  import { assertLinkSupported, compact, ebPeriodFields, ensureConfirmLease, fingerprint, optionValue, resolvePeriod, toIdString, toPersonIdListText, toPersonIdString, } from './shared.js';
5
6
  import { okrSuccess, schemaOf, SCHEMA_DATE, SCHEMA_ID, SCHEMA_ID_LIST_TEXT, SCHEMA_PERSON_ID, SCHEMA_PERIOD_TYPE, SCHEMA_QUARTER, SCHEMA_SCOPE, } from './types.js';
6
- const CONTINUATION_TTL_SECONDS = 600;
7
7
  /** ebuilder 新建目标接口支持的 mainTable 字段(源资料 okr_createGoal 传入字段)。 */
8
8
  const EB_CREATE_KEYS = [
9
9
  'principal_dept',
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
1
2
  import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
2
3
  import { existsSync } from 'node:fs';
3
4
  import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
@@ -35,7 +36,7 @@ function signature(payload, key) {
35
36
  }
36
37
  export function createPlanContinuationSigner(ctx) {
37
38
  return {
38
- async issue(payload, ttlMs = 10 * 60_000) {
39
+ async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
39
40
  const issuedAt = Date.now();
40
41
  const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
41
42
  const sig = signature(body, await loadKey(ctx));
@@ -1,5 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
+ import { reportPlatformError } from '../../core/error-codes.js';
3
4
  import { createPlanContinuationSigner } from './continuation.js';
4
5
  import { planValidationError } from './errors.js';
5
6
  import { createPlanHost } from './host.js';
@@ -83,6 +84,7 @@ async function executeAndPrint(ctx, operation, input) {
83
84
  ctx.output.write(successEnvelope(operation, result), { json: true });
84
85
  }
85
86
  catch (error) {
87
+ reportPlatformError(error);
86
88
  console.error(JSON.stringify(failureEnvelope(error), null, 2));
87
89
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
88
90
  }
@@ -1,9 +1,9 @@
1
+ import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
1
2
  import { isPlanErrorType, planApiError, planPartialError, planValidationError } from '../errors.js';
2
3
  import { businessMessage, isDatajsonSuccess, isFlagSuccess, isWeaverCodeSuccess, } from '../host.js';
3
4
  import { POST_STATUS_LABELS, SCHEMA_ID, SCHEMA_REPORT_TYPE, planSuccess, schemaOf, } from './types.js';
4
5
  import { assertLinkSupported, assertReportType, compact, defaultRemindContent, ensureConfirmLease, fingerprint, resolveSerialNumber, resolveYear, toIdListText, toIdString, } from './shared.js';
5
6
  import { buildDetailUrl, lookupReport, resolveLink } from './link.js';
6
- const CONTINUATION_TTL_SECONDS = 600;
7
7
  const REMIND_MESSAGE_EVENT_CODE = 14;
8
8
  const BODY_KEYS = ['content', 'summary', 'plans'];
9
9
  function textField(value, field) {
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
1
2
  import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
2
3
  import { existsSync } from 'node:fs';
3
4
  import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
@@ -35,7 +36,7 @@ function signature(payload, key) {
35
36
  }
36
37
  export function createProjectContinuationSigner(ctx) {
37
38
  return {
38
- async issue(payload, ttlMs = 10 * 60_000) {
39
+ async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
39
40
  const issuedAt = Date.now();
40
41
  const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
41
42
  const sig = signature(body, await loadKey(ctx));
@@ -1,5 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
3
+ import { reportPlatformError } from '../../core/error-codes.js';
3
4
  import { createProjectContinuationSigner } from './continuation.js';
4
5
  import { createProjectHost } from './host.js';
5
6
  import { projectManifest } from './manifest.js';
@@ -79,6 +80,7 @@ async function executeAndPrint(ctx, operation, input) {
79
80
  ctx.output.write(successEnvelope(operation, result), { json: true });
80
81
  }
81
82
  catch (error) {
83
+ reportPlatformError(error);
82
84
  console.error(JSON.stringify(failureEnvelope(error), null, 2));
83
85
  process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
84
86
  }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * reception 域常量。
3
+ *
4
+ * 与环境有关的路径一律不写死在这里:状态目录由 `stateRoot(ctx)` 提供,
5
+ * 模板与 render.py 由技能包自带、通过参数或快照同目录推导。
6
+ */
7
+ /** 目标流程名。可用 --workflow 覆盖,用于同租户内的变体流程。 */
8
+ export const DEFAULT_WORKFLOW = '泛微客户参观接待流程';
9
+ /** 状态目录名,落在 `<stateRoot>/reception/` 下,跟 profile 走。 */
10
+ export const STATE_SUBDIR = 'reception';
11
+ /** 产物默认输出目录(宿主不传 --out-dir 时)。 */
12
+ export const DEFAULT_OUT_DIR_WIN = '.reception-cli/out';
13
+ export const DEFAULT_OUT_DIR_POSIX = '/workspace/files';
14
+ /** 后勤 6 项 + 手机号:不给预设选项,一律手动填写。 */
15
+ export const LOGISTICS_FIELDS = ['headcount', 'meetingRoom', 'pickup', 'meal', 'hotel', 'gift'];
16
+ export const LOGISTICS_LABEL = {
17
+ headcount: '人数',
18
+ meetingRoom: '会议室',
19
+ pickup: '接送/用车',
20
+ meal: '用餐',
21
+ hotel: '住宿',
22
+ gift: '伴手礼',
23
+ mobile: '手机',
24
+ };
25
+ /**
26
+ * 面板标题。宿主硬约束(实测):title 严格单行,超长直接截断成「…」。
27
+ * 只留一句短话,完整样例放 placeholder,口径放 hint(不渲染,仅模型兜底)。
28
+ */
29
+ export const LOGISTICS_TITLE = '接待细节(人数、具体安排、用餐情况等)';
30
+ /** 输入框灰字:固定字段清单。样例里的手机号会被宿主脱敏成 [[PHONE_001]],所以不给样例。 */
31
+ export const LOGISTICS_PLACEHOLDER = '客户人数、是否会议、是否接送、是否用餐、是否代订住宿、是否伴手礼、陪同人员手机号';
32
+ /** 模型侧兜底口径。宿主不渲染 hint,切勿并入 title。 */
33
+ export const LOGISTICS_HINT = [
34
+ '照输入框灰字样例写,逗号或「|」隔开都行;没定的项直接不写。',
35
+ '人数:如「10人」',
36
+ '会议室:总部129 / 总部130 / 总部131,或「不需会议室」',
37
+ '接送/用车:如「虹桥接机2辆商务车 10:00」或「不用车」',
38
+ '用餐:公司食堂 / 小餐厅 / 外部餐厅 / 不用餐',
39
+ '住宿:如「2间大床房住1晚」或「不住」',
40
+ '伴手礼:如「礼盒每人1份」或「不用」',
41
+ '手机:11 位,只用于行程单显示接待人联系方式(系统不查员工手机号)',
42
+ ].join('\n');
43
+ /** 客户需求面板的固定选项。取值为原文,模型检索案例时直接用它拼检索词。 */
44
+ export const CUSTOMER_NEED_OPTIONS = [
45
+ '了解泛微产品与政务行业解决方案',
46
+ '参观总部环境与展厅,了解公司实力',
47
+ '交流具体项目合作与实施细节',
48
+ '暂未确定,先进待办',
49
+ ];
50
+ /** 快照文件的 kind 标识,用于拒收无关 JSON。 */
51
+ export const SNAPSHOT_KIND = 'reception-fields-snapshot';
52
+ /** python 探测结果的缓存时长(7 天)。 */
53
+ export const PYTHON_CACHE_TTL_MS = 7 * 24 * 3600 * 1000;
@@ -0,0 +1,54 @@
1
+ import { CliError, ExitCode } from '../../core/errors.js';
2
+ /**
3
+ * reception 域内结构化错误。
4
+ *
5
+ * 约定:
6
+ * - `type` 用 CLI 规范的分类词(validation / environment / business / authentication);
7
+ * - `subtype` 保留接待流程既有的全大写业务码(KNOWN_REQUIRED / RUN_NOT_FOUND 等),
8
+ * SKILL.md 与历史排障记录都按这套码检索,改小写会让文档与实现脱节。
9
+ */
10
+ export class ReceptionCliError extends CliError {
11
+ type;
12
+ subtype;
13
+ retryable;
14
+ stage;
15
+ details;
16
+ constructor(type, subtype, message, options = {}) {
17
+ super(message, options.exitCode ?? ExitCode.GeneralError);
18
+ this.name = 'ReceptionCliError';
19
+ this.type = type;
20
+ this.subtype = subtype;
21
+ this.retryable = options.retryable ?? false;
22
+ this.stage = options.stage;
23
+ this.details = options.details;
24
+ }
25
+ }
26
+ /** 入参问题:缺参数、JSON 不合法、校验不过。退出码 2。 */
27
+ export const receptionValidationError = (subtype, message, details) => new ReceptionCliError('validation', subtype, message, {
28
+ details,
29
+ exitCode: ExitCode.UsageError,
30
+ });
31
+ /** 环境问题:缺 python、缺快照、渲染脚本找不到。退出码 3。 */
32
+ export const receptionEnvironmentError = (subtype, message, details) => new ReceptionCliError('environment', subtype, message, {
33
+ details,
34
+ exitCode: ExitCode.AuthError,
35
+ });
36
+ /** 业务问题:渲染失败、上传失败、run 丢失。退出码 1。 */
37
+ export const receptionBusinessError = (subtype, message, details) => new ReceptionCliError('business', subtype, message, {
38
+ details,
39
+ exitCode: ExitCode.GeneralError,
40
+ });
41
+ /**
42
+ * run 状态缺失。
43
+ *
44
+ * 与其它业务错误分开放:调用方(doc)会捕获它走"带 --known 现场重建"的分支,
45
+ * 因此必须是可识别的类型,不能只是一个 message。
46
+ */
47
+ export const receptionRunNotFound = (runId, stateDir) => new ReceptionCliError('business', 'RUN_NOT_FOUND', `找不到 run:${runId}`, {
48
+ exitCode: ExitCode.GeneralError,
49
+ details: {
50
+ runId,
51
+ stateDir,
52
+ hint: '把 ask 用过的 --known 与 answers 一起带上重跑 doc,CLI 会现场重建 run',
53
+ },
54
+ });