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
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-LUSPKZKY.js";
5
+ } from "./chunk-UG5G54VL.js";
6
6
 
7
7
  // src/internal/e10/auth/session.ts
8
8
  import { constants, createDecipheriv as createDecipheriv2, createHash, publicEncrypt } from "node:crypto";
@@ -52,6 +52,75 @@ function writeWithRetry(path, data, options) {
52
52
  }
53
53
  }
54
54
 
55
+ // src/internal/e10/network-error.ts
56
+ var NETWORK_ERROR_CODES = /* @__PURE__ */ new Set([
57
+ "ECONNREFUSED",
58
+ "ECONNRESET",
59
+ "ECONNABORTED",
60
+ "EHOSTUNREACH",
61
+ "EHOSTDOWN",
62
+ "ENETUNREACH",
63
+ "ENETDOWN",
64
+ "ENETRESET",
65
+ "ENOTFOUND",
66
+ "EAI_AGAIN",
67
+ "EPIPE",
68
+ "ETIMEDOUT",
69
+ "ESOCKETTIMEDOUT",
70
+ "ERR_SOCKET_CONNECTION_TIMEOUT",
71
+ "UND_ERR_CONNECT_TIMEOUT",
72
+ "UND_ERR_HEADERS_TIMEOUT",
73
+ "UND_ERR_BODY_TIMEOUT",
74
+ "UND_ERR_SOCKET",
75
+ "UND_ERR_CLOSED",
76
+ "UND_ERR_ABORTED",
77
+ "CERT_HAS_EXPIRED",
78
+ "DEPTH_ZERO_SELF_SIGNED_CERT",
79
+ "SELF_SIGNED_CERT_IN_CHAIN",
80
+ "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
81
+ "ERR_TLS_CERT_ALTNAME_INVALID",
82
+ "ERR_SSL_WRONG_VERSION_NUMBER"
83
+ ]);
84
+ var ABORT_ERROR_CODE = "ABORT_ERR";
85
+ function asRecord(value) {
86
+ return value && typeof value === "object" ? value : null;
87
+ }
88
+ function readErrorCauseCode(error, maxDepth = 5) {
89
+ let current = error;
90
+ const seen = /* @__PURE__ */ new Set();
91
+ for (let depth = 0; depth < maxDepth; depth += 1) {
92
+ if (current === void 0 || current === null || seen.has(current)) return void 0;
93
+ seen.add(current);
94
+ if (current instanceof Error && current.name === "AbortError") return ABORT_ERROR_CODE;
95
+ const record = asRecord(current);
96
+ if (!record) return void 0;
97
+ if (record.name === "AbortError") return ABORT_ERROR_CODE;
98
+ const code = record.code;
99
+ if (typeof code === "string" && code) return code;
100
+ const errno = record.errno;
101
+ if (typeof errno === "string" && errno) return errno;
102
+ if (typeof errno === "number") return String(errno);
103
+ current = record.cause;
104
+ }
105
+ return void 0;
106
+ }
107
+ function isAbortError(error) {
108
+ if (error instanceof Error && error.name === "AbortError") return true;
109
+ return asRecord(error)?.name === "AbortError";
110
+ }
111
+ function isNetworkErrorCode(code) {
112
+ return typeof code === "string" && NETWORK_ERROR_CODES.has(code.toUpperCase());
113
+ }
114
+ var TRANSPORT_MESSAGE_PATTERN = /fetch failed|socket hang up|other side closed|network|connection (?:refused|reset|closed)|timed? ?out|timeout|certificate|getaddrinfo|dns lookup/i;
115
+ function looksLikeTransportMessage(message) {
116
+ return TRANSPORT_MESSAGE_PATTERN.test(message);
117
+ }
118
+ function createTimeoutSignal(timeoutMs) {
119
+ const controller = new AbortController();
120
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
121
+ return { signal: controller.signal, clear: () => clearTimeout(timer) };
122
+ }
123
+
55
124
  // src/internal/e10/auth/crypto.ts
56
125
  import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
57
126
  import { existsSync, mkdirSync, readFileSync } from "node:fs";
@@ -189,6 +258,7 @@ function parseAuthFile(raw) {
189
258
  }
190
259
 
191
260
  // src/internal/e10/auth/session.ts
261
+ var E10_TEAMS_CHECK_TIMEOUT_MS = 15e3;
192
262
  var RSA_PUBLIC_KEY_PEM = `-----BEGIN PUBLIC KEY-----
193
263
  MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCEOk/WyyJKdAHIfMODFnKg7MBoraFBnL3F18hhLx5n01J5g4hCkmpc5+KQFKIQIA/QWk9m7QBzI/OV9ZDFk54LaWm3xP8C+P1TPp7UVGz3iNDLdvgSxuGEYPmML3NaqkbVlvW7/NlNA3ED4Kao7rR5GUYSdFfbaBoxBFae638hzQIDAQAB
194
264
  -----END PUBLIC KEY-----`;
@@ -359,16 +429,16 @@ function findAuthFile(startDir = process.cwd(), options = {}) {
359
429
  if (existsSync2(activeProfileAuth)) return activeProfileAuth;
360
430
  return null;
361
431
  }
362
- function asRecord(value) {
432
+ function asRecord2(value) {
363
433
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
364
434
  }
365
435
  function readTeamsCheckUserInfo(resp, data) {
366
- const root = asRecord(data);
367
- const nested = asRecord(root.data);
368
- const currentUser = asRecord(root.currentUser || nested.currentUser);
369
- const currentTenant = asRecord(root.currentTenant || nested.currentTenant);
370
- const department = asRecord(currentUser.department);
371
- const position = asRecord(currentUser.position);
436
+ const root = asRecord2(data);
437
+ const nested = asRecord2(root.data);
438
+ const currentUser = asRecord2(root.currentUser || nested.currentUser);
439
+ const currentTenant = asRecord2(root.currentTenant || nested.currentTenant);
440
+ const department = asRecord2(currentUser.department);
441
+ const position = asRecord2(currentUser.position);
372
442
  const userId = resp.headers.get("employeeId") || currentUser.employeeId || currentUser.id || nested.employeeId || root.employeeId || "";
373
443
  const tenantKey = currentUser.tenantKey || currentTenant.tenantKey || nested.tenantKey || nested.tenantkey || root.tenantKey || root.tenantkey || "";
374
444
  return {
@@ -582,6 +652,7 @@ var E10AuthSession = class _E10AuthSession {
582
652
  return session;
583
653
  }
584
654
  async fetchEmployeeId() {
655
+ const { signal, clear } = createTimeoutSignal(E10_TEAMS_CHECK_TIMEOUT_MS);
585
656
  try {
586
657
  const resp = await fetch(
587
658
  `${this.getBaseUrl()}/api/baseserver/layout/teamsCheck?clientType=not_xinchuang&client=WEB&domainName=${encodeURIComponent(this.getBaseUrl())}`,
@@ -594,7 +665,8 @@ var E10AuthSession = class _E10AuthSession {
594
665
  cookie: this.cookieHeader(),
595
666
  "user-agent": this.uaHeader(),
596
667
  origin: this.getBaseUrl()
597
- }
668
+ },
669
+ signal
598
670
  }
599
671
  );
600
672
  const data = await resp.json().catch(() => ({}));
@@ -606,9 +678,19 @@ var E10AuthSession = class _E10AuthSession {
606
678
  if (userInfo.subcompany) this.data.subcompany = userInfo.subcompany;
607
679
  if (userInfo.position) this.data.position = userInfo.position;
608
680
  } catch {
681
+ } finally {
682
+ clear();
609
683
  }
610
684
  }
611
- async checkValid() {
685
+ /**
686
+ * 三态探活:`true` 明确有效、`false` 明确失效(401/403)、`undefined` 无法判定(网络/5xx)。
687
+ *
688
+ * 为什么要和 `checkValid()` 分开:平台连接器判断"是否已登录"时,
689
+ * 把网络抖动当成"未登录"会逼用户重复登录;而把 401 当成"已登录"会让后续业务全失败。
690
+ * 未认定失效时保持乐观,明确失效才降级。
691
+ */
692
+ async probeValid() {
693
+ const { signal, clear } = createTimeoutSignal(E10_TEAMS_CHECK_TIMEOUT_MS);
612
694
  try {
613
695
  const resp = await fetch(`${this.getBaseUrl()}/api/ecode/tree/list?parentId=0`, {
614
696
  headers: {
@@ -617,13 +699,21 @@ var E10AuthSession = class _E10AuthSession {
617
699
  cookie: this.cookieHeader(),
618
700
  "user-agent": this.uaHeader()
619
701
  },
620
- redirect: "manual"
702
+ redirect: "manual",
703
+ signal
621
704
  });
622
- return resp.status === 200;
705
+ if (resp.status === 200) return true;
706
+ if (resp.status === 401 || resp.status === 403) return false;
707
+ return void 0;
623
708
  } catch {
624
- return false;
709
+ return void 0;
710
+ } finally {
711
+ clear();
625
712
  }
626
713
  }
714
+ async checkValid() {
715
+ return await this.probeValid() === true;
716
+ }
627
717
  async ensureValid() {
628
718
  if (await this.checkValid()) return true;
629
719
  const account = process.env.E10_ACCOUNT;
@@ -722,6 +812,8 @@ var E10AuthSession = class _E10AuthSession {
722
812
  var E10_REAUTH_GUIDANCE = "\u8BF7\u7ED3\u5408\u5F53\u524D\u5BBF\u4E3B\u73AF\u5883\u9009\u62E9\u5408\u9002\u7684\u767B\u5F55\u65B9\u5F0F\uFF0C\u6062\u590D\u767B\u5F55\u540E\u91CD\u8BD5\u539F\u8BF7\u6C42\u3002";
723
813
  var E10_AUTH_REQUIRED_MESSAGE = `E10 \u767B\u5F55\u6001\u4E0D\u53EF\u7528\u3002${E10_REAUTH_GUIDANCE}`;
724
814
  var E10_XIAOE_RECOVERY_FAILED_MESSAGE = "E10 \u767B\u5F55\u6001\u4E0D\u53EF\u7528\u3002\u5DF2\u5C1D\u8BD5\u5C0F e \u81EA\u52A8\u91CD\u65B0\u83B7\u53D6\u767B\u5F55\u4FE1\u606F\uFF0C\u4F46\u672A\u53D6\u5F97\u53EF\u7528\u767B\u5F55\u6001\u3002\u8BF7\u5728\u5C0F e \u4E2D\u6062\u590D\u767B\u5F55\u540E\u91CD\u8BD5\u3002";
815
+ var E10_XIAOE_HOST_CREDENTIAL_MISSING_MESSAGE = "E10 \u767B\u5F55\u6001\u4E0D\u53EF\u7528\u3002\u5C0F e \u7F51\u9875\u7AEF\u672A\u5411\u5F53\u524D\u8FD0\u884C\u73AF\u5883\u6CE8\u5165\u7EDF\u4E00\u767B\u5F55\u51ED\u636E\uFF0C\u81EA\u52A8\u83B7\u53D6\u5DF2\u505C\u6B62\u3002\u8BF7\u68C0\u67E5\u7F51\u9875\u6280\u80FD\u6C99\u7BB1\u7684\u5BBF\u4E3B\u51ED\u636E\u900F\u4F20\u540E\u91CD\u8BD5\u3002";
816
+ var E10_XIAOE_NETWORK_UNAVAILABLE_MESSAGE = "\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5 E10\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5";
725
817
  var E10_SESSION_EXPIRED_MESSAGE = `E10 \u767B\u5F55\u6001\u5DF2\u5931\u6548\uFF0C\u672C\u6B21\u64CD\u4F5C\u5DF2\u505C\u6B62\u3002${E10_REAUTH_GUIDANCE}`;
726
818
 
727
819
  // src/core/package-paths.ts
@@ -836,6 +928,82 @@ var XIAOE_CLIENT_SETTINGS_SOURCE = "XiaoE/Robots/user_settings.json";
836
928
  var XIAOE_USER_TOKEN_SOURCE = "XIAOE_USER_TOKEN";
837
929
  var XIAOE_BUNDLED_ENV_SCRIPT_SOURCE = "bundled scripts/xiaoe_env.py";
838
930
  var XIAOE_ETEAMID_TTL_MS = 72e5;
931
+ var XIAOE_DIAGNOSTIC_MAX_LENGTH = 300;
932
+ function redactXiaoEDiagnostic(message, secrets) {
933
+ let text = message;
934
+ for (const secret of secrets) {
935
+ if (secret && secret.length >= 8 && text.includes(secret)) {
936
+ text = text.split(secret).join("<redacted>");
937
+ }
938
+ }
939
+ const normalized = text.replace(/\s+/gu, " ").trim();
940
+ return normalized.length > XIAOE_DIAGNOSTIC_MAX_LENGTH ? `${normalized.slice(0, XIAOE_DIAGNOSTIC_MAX_LENGTH)}\u2026` : normalized;
941
+ }
942
+ function noteXiaoEStep(diagnostics, step) {
943
+ diagnostics?.attemptedSteps.push(step);
944
+ }
945
+ function tagXiaoEError(message, tags) {
946
+ return Object.assign(new CliError(message, 3 /* AuthError */), tags);
947
+ }
948
+ function readTag(error, key, type) {
949
+ if (!error || typeof error !== "object") return void 0;
950
+ const value = error[key];
951
+ return typeof value === type ? value : void 0;
952
+ }
953
+ function classifyXiaoEHttpStatus(status) {
954
+ if (status === 401 || status === 403) return "credential";
955
+ if (status >= 300 && status < 400) return "credential";
956
+ return status >= 400 ? "http" : "credential";
957
+ }
958
+ function classifyXiaoEError(error) {
959
+ const taggedKind = readTag(error, "errorKind", "string");
960
+ const taggedStatus = readTag(error, "status", "number");
961
+ const taggedCause = readTag(error, "causeCode", "string");
962
+ const causeCode = taggedCause || readErrorCauseCode(error);
963
+ const withCause = causeCode ? { causeCode } : {};
964
+ const withStatus = taggedStatus === void 0 ? {} : { status: taggedStatus };
965
+ if (taggedKind) return { kind: taggedKind, ...withCause, ...withStatus };
966
+ const message = error instanceof Error ? error.message : String(error);
967
+ if (isAbortError(error)) return { kind: "network", causeCode: causeCode || "ETIMEDOUT" };
968
+ if (taggedStatus !== void 0) {
969
+ return { kind: classifyXiaoEHttpStatus(taggedStatus), ...withCause, status: taggedStatus };
970
+ }
971
+ if (causeCode && isNetworkErrorCode(causeCode)) return { kind: "network", causeCode };
972
+ const httpMatch = /\bHTTP (\d{3})\b/u.exec(message);
973
+ if (httpMatch) {
974
+ const status = Number(httpMatch[1]);
975
+ return { kind: classifyXiaoEHttpStatus(status), ...withCause, status };
976
+ }
977
+ if (looksLikeTransportMessage(message)) return { kind: "network", ...withCause };
978
+ return { kind: "credential", ...withCause };
979
+ }
980
+ function noteXiaoEError(diagnostics, error, secrets = [], stage = "e10_session") {
981
+ if (!diagnostics) return;
982
+ const message = error instanceof Error ? error.message : String(error);
983
+ const redacted = redactXiaoEDiagnostic(message, secrets);
984
+ if (redacted) diagnostics.lastError = redacted;
985
+ const { kind, causeCode, status } = classifyXiaoEError(error);
986
+ const failure = {
987
+ stage: readTag(error, "stage", "string") ?? stage,
988
+ kind,
989
+ message: redacted,
990
+ ...causeCode ? { causeCode } : {},
991
+ ...status === void 0 ? {} : { httpStatus: status }
992
+ };
993
+ if (!diagnostics.failures) diagnostics.failures = [];
994
+ diagnostics.failures.push(failure);
995
+ }
996
+ function summarizeXiaoEFailureKind(diagnostics) {
997
+ const failures = diagnostics?.failures || [];
998
+ if (!failures.length) return void 0;
999
+ if (failures.some((failure) => failure.kind === "credential")) return "credential";
1000
+ if (failures.some((failure) => failure.kind === "http")) return "http";
1001
+ return failures.every((failure) => failure.kind === "network") ? "network" : void 0;
1002
+ }
1003
+ function lastXiaoEFailure(diagnostics) {
1004
+ const failures = diagnostics?.failures || [];
1005
+ return failures.length ? failures[failures.length - 1] : void 0;
1006
+ }
839
1007
  function envString(env, ...keys) {
840
1008
  for (const key of keys) {
841
1009
  const value = env[key];
@@ -854,6 +1022,15 @@ function hasXiaoEEnv(env = process.env, options = {}) {
854
1022
  const explicitAgentType = envString(env, "WEAVER_AGENT_TYPE");
855
1023
  return explicitAgentType ? isXiaoERuntimeAgent(explicitAgentType) : false;
856
1024
  }
1025
+ function resolveXiaoEClientType(env = process.env) {
1026
+ const raw = envString(env, "XIAOE_CLIENT_TYPE").toLowerCase();
1027
+ if (raw === "client" || raw === "desktop" || raw === "pc") return "client";
1028
+ if (raw === "cloud" || raw === "web" || raw === "browser") return "cloud";
1029
+ return void 0;
1030
+ }
1031
+ function isXiaoECloudRuntime(env = process.env) {
1032
+ return resolveXiaoEClientType(env) === "cloud";
1033
+ }
857
1034
  function describeXiaoECredentialSource(source) {
858
1035
  if (source === XIAOE_USER_TOKEN_SOURCE || source === XIAOE_BUNDLED_ENV_SCRIPT_SOURCE) {
859
1036
  return {
@@ -1352,14 +1529,17 @@ function inspectXiaoEUnifiedLoginSources(options = {}) {
1352
1529
  });
1353
1530
  const platformCredential = hasXiaoEPlatformCredential(env);
1354
1531
  const allowLocalDiscovery = options.allowLocalDiscovery !== false;
1355
- const tokenScript = options.allowTokenScript !== false && hasXiaoETokenScript(env, allowLocalDiscovery);
1356
- const clientCredential = hasXiaoEClientCredential(env, allowLocalDiscovery);
1532
+ const clientType = resolveXiaoEClientType(env);
1533
+ const allowDesktopChannels = clientType !== "cloud";
1534
+ const tokenScript = allowDesktopChannels && options.allowTokenScript !== false && hasXiaoETokenScript(env, allowLocalDiscovery);
1535
+ const clientCredential = allowDesktopChannels && hasXiaoEClientCredential(env, allowLocalDiscovery);
1357
1536
  const environmentCredential = Boolean(baseUrl && resolveXiaoEUnifiedLoginCredential(baseUrl, env));
1358
1537
  return {
1359
1538
  platformCredential,
1360
1539
  tokenScript,
1361
1540
  clientCredential,
1362
1541
  environmentCredential,
1542
+ clientType,
1363
1543
  any: platformCredential || tokenScript || clientCredential || environmentCredential
1364
1544
  };
1365
1545
  }
@@ -1382,37 +1562,71 @@ async function fetchXiaoEClientEteamId(credential, domain) {
1382
1562
  });
1383
1563
  if (resp.status < 300 || resp.status >= 400) break;
1384
1564
  if (redirects === 5) {
1385
- throw new CliError("XiaoE client token endpoint redirected too many times.", 3 /* AuthError */);
1565
+ throw tagXiaoEError("XiaoE client token endpoint redirected too many times.", {
1566
+ errorKind: "http"
1567
+ });
1386
1568
  }
1387
1569
  const location = resp.headers.get("location");
1388
1570
  if (!location) {
1389
- throw new CliError("XiaoE client token endpoint returned a redirect without Location.", 3 /* AuthError */);
1571
+ throw tagXiaoEError("XiaoE client token endpoint returned a redirect without Location.", {
1572
+ errorKind: "http",
1573
+ status: resp.status
1574
+ });
1390
1575
  }
1391
1576
  const next = new URL(location, endpoint);
1392
1577
  const sameOrigin = next.origin === endpoint.origin;
1393
1578
  const sameHostHttpsUpgrade = endpoint.protocol === "http:" && next.protocol === "https:" && next.hostname === endpoint.hostname;
1394
1579
  const safeProtocol = next.protocol === "http:" || next.protocol === "https:";
1395
1580
  if (!safeProtocol || next.username || next.password || !sameOrigin && !sameHostHttpsUpgrade) {
1396
- throw new CliError("XiaoE client token endpoint attempted an unsafe cross-origin redirect.", 3 /* AuthError */);
1581
+ throw tagXiaoEError("XiaoE client token endpoint attempted an unsafe cross-origin redirect.", {
1582
+ errorKind: "http",
1583
+ status: resp.status
1584
+ });
1397
1585
  }
1398
1586
  await resp.body?.cancel().catch(() => void 0);
1399
1587
  endpoint = next;
1400
1588
  }
1401
1589
  if (!resp?.ok) {
1402
- throw new CliError(`XiaoE client token endpoint returned HTTP ${resp?.status || 0}.`, 3 /* AuthError */);
1590
+ const status = resp?.status || 0;
1591
+ throw tagXiaoEError(`XiaoE client token endpoint returned HTTP ${status}.`, {
1592
+ errorKind: classifyXiaoEHttpStatus(status),
1593
+ status
1594
+ });
1403
1595
  }
1404
- const data = await resp.json().catch(() => null);
1596
+ const data = await resp.json().catch((error) => {
1597
+ if (isAbortError(error)) throw error;
1598
+ return null;
1599
+ });
1405
1600
  if (!data || typeof data !== "object" || Array.isArray(data)) {
1406
- throw new CliError("XiaoE client token endpoint returned invalid JSON.", 3 /* AuthError */);
1601
+ throw tagXiaoEError("XiaoE client token endpoint returned invalid JSON.", {
1602
+ errorKind: "http",
1603
+ status: resp.status
1604
+ });
1407
1605
  }
1408
1606
  const payload = data;
1409
1607
  const businessCode = payload.code;
1410
1608
  const businessData = payload.data && typeof payload.data === "object" && !Array.isArray(payload.data) ? payload.data : {};
1411
1609
  if (businessCode !== "0000" && businessCode !== 0 && businessCode !== 200 || !readString(businessData, "eteamId")) {
1412
1610
  const codeText = businessCode === void 0 ? "missing" : String(businessCode);
1413
- throw new CliError(`XiaoE client token exchange failed with business code ${codeText}.`, 3 /* AuthError */);
1611
+ throw tagXiaoEError(`XiaoE client token exchange failed with business code ${codeText}.`, {
1612
+ errorKind: "credential"
1613
+ });
1414
1614
  }
1415
1615
  return payload;
1616
+ } catch (error) {
1617
+ if (isAbortError(error)) {
1618
+ throw tagXiaoEError(
1619
+ `XiaoE client token endpoint timed out after ${XIAOE_CLIENT_TOKEN_TIMEOUT_MS} ms.`,
1620
+ { errorKind: "network", causeCode: "ETIMEDOUT" }
1621
+ );
1622
+ }
1623
+ if (error instanceof CliError) throw error;
1624
+ const causeCode = readErrorCauseCode(error);
1625
+ const message = error instanceof Error ? error.message : String(error);
1626
+ throw tagXiaoEError(
1627
+ `XiaoE client token endpoint request failed${causeCode ? ` (${causeCode})` : ""}: ${message}`,
1628
+ { errorKind: "network", ...causeCode ? { causeCode } : {} }
1629
+ );
1416
1630
  } finally {
1417
1631
  clearTimeout(timer);
1418
1632
  }
@@ -1461,26 +1675,58 @@ function createXiaoEUnifiedLoginUnavailableError(baseUrl = "") {
1461
1675
  });
1462
1676
  }
1463
1677
  async function resolveUserInfo(baseUrl, eteamsId, rawCookie = "", agentType = "") {
1464
- const resp = await fetch(`${baseUrl}/api/baseserver/layout/teamsCheck?clientType=not_xinchuang&client=WEB&domainName=${encodeURIComponent(baseUrl)}`, {
1465
- method: "POST",
1466
- headers: {
1467
- accept: "application/json",
1468
- "content-type": "application/json",
1469
- eteamsid: eteamsId,
1470
- cookie: buildE10CookieHeader(rawCookie, eteamsId, agentType),
1471
- "user-agent": agentType ? `AgentType=${agentType},IsAgent=true` : "weaver-work-cli",
1472
- origin: baseUrl
1473
- },
1474
- redirect: "manual"
1475
- });
1476
- const data = await resp.json().catch(() => ({}));
1477
- return { userInfo: readTeamsCheckUserInfo(resp, data), setCookie: extractRawSetCookie(resp) };
1678
+ const { signal, clear } = createTimeoutSignal(E10_TEAMS_CHECK_TIMEOUT_MS);
1679
+ try {
1680
+ const resp = await fetch(`${baseUrl}/api/baseserver/layout/teamsCheck?clientType=not_xinchuang&client=WEB&domainName=${encodeURIComponent(baseUrl)}`, {
1681
+ method: "POST",
1682
+ headers: {
1683
+ accept: "application/json",
1684
+ "content-type": "application/json",
1685
+ eteamsid: eteamsId,
1686
+ cookie: buildE10CookieHeader(rawCookie, eteamsId, agentType),
1687
+ "user-agent": agentType ? `AgentType=${agentType},IsAgent=true` : "weaver-work-cli",
1688
+ origin: baseUrl
1689
+ },
1690
+ redirect: "manual",
1691
+ signal
1692
+ });
1693
+ const data = await resp.json().catch((error) => {
1694
+ if (isAbortError(error)) throw error;
1695
+ return {};
1696
+ });
1697
+ return { userInfo: readTeamsCheckUserInfo(resp, data), setCookie: extractRawSetCookie(resp), status: resp.status };
1698
+ } catch (error) {
1699
+ if (isAbortError(error)) {
1700
+ throw tagXiaoEError(
1701
+ `E10 teamsCheck timed out after ${E10_TEAMS_CHECK_TIMEOUT_MS} ms.`,
1702
+ { errorKind: "network", stage: "teams_check", causeCode: "ETIMEDOUT" }
1703
+ );
1704
+ }
1705
+ if (error instanceof CliError) throw error;
1706
+ const causeCode = readErrorCauseCode(error);
1707
+ const message = error instanceof Error ? error.message : String(error);
1708
+ throw tagXiaoEError(
1709
+ `E10 teamsCheck request failed${causeCode ? ` (${causeCode})` : ""}: ${message}`,
1710
+ { errorKind: "network", stage: "teams_check", ...causeCode ? { causeCode } : {} }
1711
+ );
1712
+ } finally {
1713
+ clear();
1714
+ }
1478
1715
  }
1479
1716
  async function saveXiaoEUnifiedLogin(input) {
1480
1717
  const baseUrl = normalizeUrl(input.baseUrl);
1481
- const { userInfo, setCookie } = await resolveUserInfo(baseUrl, input.eteamsId, input.rawCookie || "", XIAOE_AGENT_TYPE);
1718
+ const { userInfo, setCookie, status } = await resolveUserInfo(baseUrl, input.eteamsId, input.rawCookie || "", XIAOE_AGENT_TYPE);
1482
1719
  if (!userInfo.userId) {
1483
- throw new CliError("Could not resolve userId. Check whether XiaoE unified login is valid for this E10 domain.", 3 /* AuthError */);
1720
+ const statusText = status || 0;
1721
+ throw classifyXiaoEHttpStatus(statusText) === "http" ? tagXiaoEError(`E10 teamsCheck returned HTTP ${statusText}.`, {
1722
+ errorKind: "http",
1723
+ stage: "teams_check",
1724
+ status: statusText
1725
+ }) : tagXiaoEError("Could not resolve userId. Check whether XiaoE unified login is valid for this E10 domain.", {
1726
+ errorKind: "credential",
1727
+ stage: "teams_check",
1728
+ status: statusText
1729
+ });
1484
1730
  }
1485
1731
  const tenantKey = userInfo.tenantKey || input.tenantKeyFallback || "";
1486
1732
  const profile = input.profileHint || profileNameFromUrl(baseUrl);
@@ -1537,41 +1783,67 @@ async function tryXiaoEUnifiedLogin(options = {}) {
1537
1783
  profileBaseUrl: options.profileBaseUrl,
1538
1784
  env
1539
1785
  });
1540
- const mayUseTokenScript = options.allowTokenScript === true;
1541
- if (!baseUrl && !mayUseTokenScript) return null;
1786
+ const mayUseTokenScript = options.allowTokenScript === true && !isXiaoECloudRuntime(env);
1787
+ const diagnostics = options.diagnostics;
1788
+ const platformCredentialDetected = hasXiaoEPlatformCredential(env);
1789
+ const secrets = [envString(env, "XIAOE_USER_TOKEN")];
1790
+ if (diagnostics) {
1791
+ diagnostics.baseUrl = baseUrl;
1792
+ diagnostics.platformCredentialDetected = platformCredentialDetected;
1793
+ diagnostics.clientType = resolveXiaoEClientType(env);
1794
+ }
1795
+ if (!baseUrl && !mayUseTokenScript) {
1796
+ noteXiaoEStep(diagnostics, "base_url:missing");
1797
+ return null;
1798
+ }
1542
1799
  let credential = null;
1543
- if (hasXiaoEPlatformCredential(env)) {
1800
+ if (platformCredentialDetected) {
1544
1801
  options.logger?.info("Trying XiaoE platform credential from XIAOE_USER_TOKEN...");
1545
1802
  try {
1546
1803
  credential = await resolveXiaoEPlatformCredential(baseUrl || DEFAULT_E10_BASE_URL, env);
1547
1804
  } catch (error) {
1548
1805
  const message = error instanceof Error ? error.message : String(error);
1806
+ noteXiaoEError(diagnostics, error, secrets, "platform_token");
1549
1807
  options.logger?.warn("XiaoE platform credential failed. " + message);
1550
1808
  }
1551
1809
  if (!credential) {
1552
1810
  options.logger?.warn(options.allowBundledEnvScript ? "XiaoE platform credential did not return usable ETEAMSID; will try the CLI-bundled xiaoe_env.py compatibility path next." : "XiaoE platform credential did not return usable ETEAMSID; will try xiaoeUserData/tokens.py next.");
1553
1811
  }
1554
1812
  }
1555
- if (!credential && options.allowBundledEnvScript && hasXiaoEPlatformCredential(env)) {
1556
- const scriptPath = xiaoEBundledEnvScriptPath();
1557
- if (!scriptPath) {
1558
- options.logger?.warn("CLI-bundled xiaoe_env.py was not found; will try desktop XiaoE credential sources next.");
1813
+ noteXiaoEStep(
1814
+ diagnostics,
1815
+ credential ? "platform_token:ok" : `platform_token:${platformCredentialDetected ? "failed" : "missing"}`
1816
+ );
1817
+ if (!credential) {
1818
+ if (!options.allowBundledEnvScript) {
1819
+ noteXiaoEStep(diagnostics, "bundled_env_script:disabled");
1820
+ } else if (!platformCredentialDetected) {
1821
+ noteXiaoEStep(diagnostics, "bundled_env_script:missing");
1559
1822
  } else {
1560
- options.logger?.info("Trying CLI-bundled xiaoe_env.py compatibility credential...");
1561
- try {
1562
- credential = await resolveXiaoEBundledEnvScriptCredential(baseUrl || DEFAULT_E10_BASE_URL, env);
1563
- } catch (error) {
1564
- const message = error instanceof Error ? error.message : String(error);
1565
- options.logger?.warn("CLI-bundled xiaoe_env.py failed. " + message);
1566
- }
1567
- if (!credential) {
1568
- options.logger?.warn("CLI-bundled xiaoe_env.py did not return usable ETEAMSID; will try xiaoeUserData/tokens.py next.");
1823
+ const scriptPath = xiaoEBundledEnvScriptPath();
1824
+ if (!scriptPath) {
1825
+ noteXiaoEStep(diagnostics, "bundled_env_script:missing");
1826
+ options.logger?.warn("CLI-bundled xiaoe_env.py was not found; will try desktop XiaoE credential sources next.");
1827
+ } else {
1828
+ options.logger?.info("Trying CLI-bundled xiaoe_env.py compatibility credential...");
1829
+ try {
1830
+ credential = await resolveXiaoEBundledEnvScriptCredential(baseUrl || DEFAULT_E10_BASE_URL, env);
1831
+ } catch (error) {
1832
+ const message = error instanceof Error ? error.message : String(error);
1833
+ noteXiaoEError(diagnostics, error, secrets, "bundled_env_script");
1834
+ options.logger?.warn("CLI-bundled xiaoe_env.py failed. " + message);
1835
+ }
1836
+ if (!credential) {
1837
+ options.logger?.warn("CLI-bundled xiaoe_env.py did not return usable ETEAMSID; will try xiaoeUserData/tokens.py next.");
1838
+ }
1839
+ noteXiaoEStep(diagnostics, `bundled_env_script:${credential ? "ok" : "failed"}`);
1569
1840
  }
1570
1841
  }
1571
1842
  }
1572
1843
  if (!credential && mayUseTokenScript) {
1573
1844
  const tokenScriptPath = xiaoETokenScriptPath(env);
1574
1845
  if (!tokenScriptPath) {
1846
+ noteXiaoEStep(diagnostics, "token_script:missing");
1575
1847
  options.logger?.warn("XiaoE token script not found. Expected xiaoeUserData/tokens.py; will try the local XiaoE client session next.");
1576
1848
  } else {
1577
1849
  options.logger?.info("Trying XiaoE token script credential...");
@@ -1579,11 +1851,13 @@ async function tryXiaoEUnifiedLogin(options = {}) {
1579
1851
  credential = await resolveXiaoETokenScriptCredential(baseUrl || DEFAULT_E10_BASE_URL, env);
1580
1852
  } catch (error) {
1581
1853
  const message = error instanceof Error ? error.message : String(error);
1854
+ noteXiaoEError(diagnostics, error, secrets, "token_script");
1582
1855
  options.logger?.warn("XiaoE token script failed. " + message);
1583
1856
  }
1584
1857
  if (!credential) {
1585
1858
  options.logger?.warn("XiaoE token script did not return usable ETEAMSID; will try the local XiaoE client session next.");
1586
1859
  }
1860
+ noteXiaoEStep(diagnostics, `token_script:${credential ? "ok" : "failed"}`);
1587
1861
  }
1588
1862
  if (!credential && hasXiaoEClientCredential(env)) {
1589
1863
  options.logger?.info("Trying built-in XiaoE client session credential...");
@@ -1591,18 +1865,29 @@ async function tryXiaoEUnifiedLogin(options = {}) {
1591
1865
  credential = await resolveXiaoEClientCredential(baseUrl || DEFAULT_E10_BASE_URL, env);
1592
1866
  } catch (error) {
1593
1867
  const message = error instanceof Error ? error.message : String(error);
1868
+ noteXiaoEError(diagnostics, error, secrets, "client_session");
1594
1869
  options.logger?.warn("Built-in XiaoE client credential failed. " + message);
1595
1870
  }
1596
1871
  if (!credential) {
1597
1872
  options.logger?.warn("Built-in XiaoE client credential did not return usable ETEAMSID; will try WEAVER_XIAOE_* credentials next.");
1598
1873
  }
1874
+ noteXiaoEStep(diagnostics, `client_session:${credential ? "ok" : "failed"}`);
1875
+ } else if (!credential) {
1876
+ noteXiaoEStep(diagnostics, "client_session:missing");
1599
1877
  }
1878
+ } else if (!credential) {
1879
+ noteXiaoEStep(diagnostics, "token_script:disabled");
1880
+ noteXiaoEStep(diagnostics, "client_session:disabled");
1600
1881
  }
1601
1882
  if (!credential && baseUrl) credential = resolveXiaoEUnifiedLoginCredential(baseUrl, env);
1602
- if (!credential) return null;
1883
+ if (!credential) {
1884
+ noteXiaoEStep(diagnostics, "environment_map:empty");
1885
+ return null;
1886
+ }
1887
+ noteXiaoEStep(diagnostics, `credential_source:${credential.source}`);
1603
1888
  options.logger?.info("Detected XiaoE unified login for this E10 domain. Trying XiaoE auth...");
1604
1889
  try {
1605
- return await saveXiaoEUnifiedLogin({
1890
+ const login = await saveXiaoEUnifiedLogin({
1606
1891
  baseUrl: credential.baseUrl || baseUrl || DEFAULT_E10_BASE_URL,
1607
1892
  eteamsId: credential.eteamsId,
1608
1893
  rawCookie: credential.rawCookie,
@@ -1611,8 +1896,16 @@ async function tryXiaoEUnifiedLogin(options = {}) {
1611
1896
  profileHint: options.profileHint,
1612
1897
  credentialSource: describeXiaoECredentialSource(credential.source)
1613
1898
  });
1899
+ noteXiaoEStep(diagnostics, "e10_session:ok");
1900
+ if (diagnostics) {
1901
+ delete diagnostics.lastError;
1902
+ delete diagnostics.failures;
1903
+ }
1904
+ return login;
1614
1905
  } catch (error) {
1615
1906
  const message = error instanceof Error ? error.message : String(error);
1907
+ noteXiaoEError(diagnostics, error, secrets, "e10_session");
1908
+ noteXiaoEStep(diagnostics, "e10_session:failed");
1616
1909
  options.logger?.warn("XiaoE unified login failed. " + message);
1617
1910
  return null;
1618
1911
  }
@@ -1647,6 +1940,7 @@ export {
1647
1940
  packagePath,
1648
1941
  packageFileUrl,
1649
1942
  normalizeGlobalOptions,
1943
+ readErrorCauseCode,
1650
1944
  getE10AuthRoot,
1651
1945
  getActiveProfile,
1652
1946
  setActiveProfile,
@@ -1668,9 +1962,13 @@ export {
1668
1962
  E10_REAUTH_GUIDANCE,
1669
1963
  E10_AUTH_REQUIRED_MESSAGE,
1670
1964
  E10_XIAOE_RECOVERY_FAILED_MESSAGE,
1965
+ E10_XIAOE_HOST_CREDENTIAL_MISSING_MESSAGE,
1966
+ E10_XIAOE_NETWORK_UNAVAILABLE_MESSAGE,
1671
1967
  E10_SESSION_EXPIRED_MESSAGE,
1672
1968
  isXiaoERuntimeAgent,
1673
1969
  XIAOE_AGENT_TYPE,
1970
+ summarizeXiaoEFailureKind,
1971
+ lastXiaoEFailure,
1674
1972
  hasXiaoEEnv,
1675
1973
  inspectXiaoEUnifiedLoginSources,
1676
1974
  resolveXiaoEPreferredBaseUrl,
@@ -49,5 +49,6 @@ function toErrorEnvelope(error) {
49
49
  export {
50
50
  CliError,
51
51
  isCliError,
52
+ isStructuredError,
52
53
  toErrorEnvelope
53
54
  };
@@ -2,7 +2,10 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  esbValidationError
5
- } from "./chunk-GPMFD4RD.js";
5
+ } from "./chunk-TXUG266F.js";
6
+ import {
7
+ CONTINUATION_TTL_MS
8
+ } from "./chunk-7BDPM5ST.js";
6
9
 
7
10
  // src/shortcuts/esb/continuation.ts
8
11
  import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
@@ -37,7 +40,7 @@ function signature(payload, key) {
37
40
  }
38
41
  function createEsbContinuationSigner(ctx) {
39
42
  return {
40
- async issue(payload, ttlMs = 10 * 6e4) {
43
+ async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
41
44
  const issuedAt = Date.now();
42
45
  const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
43
46
  const sig = signature(body, await loadKey(ctx));
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-LUSPKZKY.js";
5
+ } from "./chunk-UG5G54VL.js";
6
6
 
7
7
  // src/shortcuts/workflow/errors.ts
8
8
  var WorkflowCliError = class extends CliError {