weaver-work-cli 0.1.42 → 0.1.45

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 +21 -0
  2. package/dist/chunks/{archive-J4I6MCKF.js → archive-ZQ4A4TV6.js} +399 -47
  3. package/dist/chunks/{archive-oa-BRZKKTO4.js → archive-oa-BBDP7AKJ.js} +12 -5
  4. package/dist/chunks/{asset-L7D4FAOZ.js → asset-ZOJVBWZH.js} +11 -4
  5. package/dist/chunks/{asset-idle-DADLLV75.js → asset-idle-XGB5IPGT.js} +7 -3
  6. package/dist/chunks/{attachment-content-K4C7VLWQ.js → attachment-content-CE3GMWTS.js} +5 -4
  7. package/dist/chunks/{blog-BVGQ7NZL.js → blog-QSHLZSFW.js} +11 -4
  8. package/dist/chunks/caizhilian-KCQYFH72.js +204 -0
  9. package/dist/chunks/{calendar-Q7NQY5Z2.js → calendar-DLGMRJQA.js} +12 -5
  10. package/dist/chunks/{chunk-W7BEHOSR.js → chunk-3WBIQLMB.js} +2 -2
  11. package/dist/chunks/{chunk-4PD5NWAX.js → chunk-3YV7PKRL.js} +2 -2
  12. package/dist/chunks/{chunk-JPRO6ER2.js → chunk-3ZMAQQ3W.js} +185 -60
  13. package/dist/chunks/{chunk-R4CHUSKC.js → chunk-4EXOIQDI.js} +40 -10
  14. package/dist/chunks/{chunk-OOUTBLZ4.js → chunk-56EZERK4.js} +1 -1
  15. package/dist/chunks/chunk-6N4JPNFL.js +76 -0
  16. package/dist/chunks/{chunk-SA6VBIHY.js → chunk-6NXT4ICB.js} +342 -17
  17. package/dist/chunks/{chunk-ZUX3P6BQ.js → chunk-727FH2NI.js} +1 -1
  18. package/dist/chunks/chunk-762M5XJS.js +215 -0
  19. package/dist/chunks/{chunk-GEWYMQME.js → chunk-77YP6I52.js} +1 -1
  20. package/dist/chunks/chunk-7BDPM5ST.js +11 -0
  21. package/dist/chunks/{chunk-G4UR6NXN.js → chunk-CZNZKOHR.js} +3 -3
  22. package/dist/chunks/{chunk-GHXCDPTM.js → chunk-DGMYACGJ.js} +1 -1
  23. package/dist/chunks/{chunk-4RAE6JXP.js → chunk-DLY5GUXX.js} +6 -3
  24. package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
  25. package/dist/chunks/{chunk-EKWAQSLU.js → chunk-GR76ZDDX.js} +432 -2248
  26. package/dist/chunks/{chunk-APVFJUQH.js → chunk-HFXK54M4.js} +3 -3
  27. package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
  28. package/dist/chunks/{chunk-ZEDWSH32.js → chunk-IC62NFM5.js} +1 -1
  29. package/dist/chunks/{chunk-3KTFS4IA.js → chunk-JB34OE7R.js} +808 -85
  30. package/dist/chunks/{chunk-72CKAUAG.js → chunk-JWWTI63L.js} +59 -7
  31. package/dist/chunks/{chunk-P26ZWSKU.js → chunk-KIHNAS25.js} +5 -2
  32. package/dist/chunks/{chunk-NKZRQXST.js → chunk-LGKWL4OH.js} +200 -47
  33. package/dist/chunks/chunk-LRCPNDZA.js +2529 -0
  34. package/dist/chunks/{chunk-QKNKR4RH.js → chunk-LXFVWZLM.js} +4 -4
  35. package/dist/chunks/{chunk-NOODWMCL.js → chunk-O6CMPO65.js} +25 -2
  36. package/dist/chunks/{chunk-BIPYLLVS.js → chunk-OAE3AZBQ.js} +15 -15
  37. package/dist/chunks/chunk-P5GQRWDC.js +60 -0
  38. package/dist/chunks/{caizhilian-SAADNFD6.js → chunk-PGO4ILMQ.js} +44 -517
  39. package/dist/chunks/{chunk-2LV74IWP.js → chunk-Q4OYAQYH.js} +1 -1
  40. package/dist/chunks/{chunk-LDZQPUIA.js → chunk-T4MWQAQB.js} +8 -6
  41. package/dist/chunks/{chunk-BBKDXQEC.js → chunk-TGAGQV4I.js} +3 -3
  42. package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
  43. package/dist/chunks/{chunk-FOAA27U5.js → chunk-U6R6FZHD.js} +184 -18
  44. package/dist/chunks/{chunk-LUSPKZKY.js → chunk-UG5G54VL.js} +1 -0
  45. package/dist/chunks/{chunk-NIAJ5ZCG.js → chunk-UL5XUQ25.js} +5 -2
  46. package/dist/chunks/{chunk-IZ7S7QUS.js → chunk-VIMCY4DI.js} +6 -6
  47. package/dist/chunks/chunk-VRPH24IC.js +76 -0
  48. package/dist/chunks/{chunk-FMPJJYYI.js → chunk-WRXSAVKO.js} +1 -1
  49. package/dist/chunks/{chunk-YRSZQUD2.js → chunk-YIKSL36S.js} +3 -3
  50. package/dist/chunks/{chunk-3SO6QL6U.js → chunk-YWX377BY.js} +5 -2
  51. package/dist/chunks/{chunk-BYATLLEF.js → chunk-Z3GDFVJR.js} +1 -1
  52. package/dist/chunks/{chunk-LADPYOWC.js → chunk-Z6UUBY37.js} +3 -3
  53. package/dist/chunks/{conflict-F2OMZRTO.js → conflict-IYJETSGT.js} +4 -3
  54. package/dist/chunks/{continuation-2CKSBLA6.js → continuation-3S37AUSH.js} +4 -3
  55. package/dist/chunks/{continuation-RN6PZN2M.js → continuation-3XLYYTKV.js} +4 -3
  56. package/dist/chunks/continuation-GW6PRWK3.js +12 -0
  57. package/dist/chunks/{continuation-HZIZRZBX.js → continuation-HFW2YT5S.js} +4 -3
  58. package/dist/chunks/{continuation-NLECEJPX.js → continuation-KI7DRRZN.js} +4 -3
  59. package/dist/chunks/{contract-5BETHRSG.js → contract-3QLAGYQL.js} +5803 -4593
  60. package/dist/chunks/{cowork-3MN6EQQO.js → cowork-3ACICHDQ.js} +11 -4
  61. package/dist/chunks/{create-flow-5FQNNMVO.js → create-flow-7JLC7UID.js} +8 -7
  62. package/dist/chunks/{ebuilder-form-SBHOYBUD.js → ebuilder-form-GWDTKEI2.js} +14 -9
  63. package/dist/chunks/{ehr-KMOJULKG.js → ehr-MYRDCHZ4.js} +357 -43
  64. package/dist/chunks/{employee-SAK2QYXX.js → employee-NOHNXC46.js} +3 -3
  65. package/dist/chunks/{env-LB7NBL2O.js → env-3MBHAWBL.js} +4 -3
  66. package/dist/chunks/{esb-W2PJCFCX.js → esb-4BQHNP5C.js} +12 -7
  67. package/dist/chunks/{factory-6ZFQXQ46.js → factory-TZEVU4DU.js} +3 -2
  68. package/dist/chunks/{fna-ZQPCUV4R.js → fna-ZVB2IILI.js} +14 -8
  69. package/dist/chunks/{group-chat-2HHAJN46.js → group-chat-KL3HFKRM.js} +5 -4
  70. package/dist/chunks/{host-YTODKMSL.js → host-3TNBMDTR.js} +5 -5
  71. package/dist/chunks/host-7NTIBSPK.js +25 -0
  72. package/dist/chunks/{host-4CBHGOHT.js → host-7OWWPLM4.js} +5 -5
  73. package/dist/chunks/{host-ATKVNZAT.js → host-G3VU7SDW.js} +5 -5
  74. package/dist/chunks/{host-BQH22NTQ.js → host-M4XP5URR.js} +5 -5
  75. package/dist/chunks/{host-X2CSLFM6.js → host-TUOIOEMC.js} +5 -5
  76. package/dist/chunks/{hrm-FFM4UJFS.js → hrm-UNKCCCGP.js} +11 -7
  77. package/dist/chunks/{im-VEHKDQPB.js → im-NJB7ZYMH.js} +8 -7
  78. package/dist/chunks/{invoice-LVIKSIIF.js → invoice-OQP3TMKQ.js} +636 -1768
  79. package/dist/chunks/{jiuchuanhui-X6DINO5P.js → jiuchuanhui-ASFZBMPU.js} +14 -6
  80. package/dist/chunks/{lazy-dispatch-KSWTN5L6.js → lazy-dispatch-UH6HGK2I.js} +7 -6
  81. package/dist/chunks/{mail-VDKRGUD3.js → mail-M3HJF5ER.js} +16 -14
  82. package/dist/chunks/{meeting-CLC6HP3Z.js → meeting-C67EHQ4Z.js} +21 -14
  83. package/dist/chunks/{okr-CHG4OO3U.js → okr-EVX7FB5G.js} +12 -5
  84. package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
  85. package/dist/chunks/operations-J7PUIVWZ.js +15 -0
  86. package/dist/chunks/{plan-XWR75667.js → plan-2QJQEPBO.js} +12 -5
  87. package/dist/chunks/{project-5BXOOKMG.js → project-XELELW2T.js} +11 -4
  88. package/dist/chunks/reception-5WITA44R.js +1899 -0
  89. package/dist/chunks/{recruit-stage-DGMFNNDE.js → recruit-stage-AHY5QAMF.js} +745 -149
  90. package/dist/chunks/{registry-RHMW6ANW.js → registry-AQVGHUM6.js} +7 -6
  91. package/dist/chunks/{registry-OZSMDVPP.js → registry-PVUZQDDQ.js} +3 -3
  92. package/dist/chunks/{registry-7FFOXIAW.js → registry-QJCZ2GVG.js} +7 -6
  93. package/dist/chunks/{registry-Z43434VG.js → registry-VWXWPVAG.js} +4 -4
  94. package/dist/chunks/registry-XPWPGHYE.js +24 -0
  95. package/dist/chunks/{room-recommend-62H7ZQQ6.js → room-recommend-CNWE5WQK.js} +8 -5
  96. package/dist/chunks/{schedule-FNXKH3DQ.js → schedule-YYNYBQIE.js} +6 -5
  97. package/dist/chunks/{workflow-ADHKCAJK.js → workflow-BSYT5TGL.js} +15 -8
  98. package/dist/cmd/action.js +6 -0
  99. package/dist/cmd/identity/index.js +45 -0
  100. package/dist/cmd/index.js +2 -0
  101. package/dist/core/continuation-ttl.js +18 -0
  102. package/dist/core/error-codes.js +85 -0
  103. package/dist/core/logger.js +11 -0
  104. package/dist/index.js +37 -31
  105. package/dist/internal/e10/auth/commands.js +195 -8
  106. package/dist/internal/e10/auth/error-log.js +312 -0
  107. package/dist/internal/e10/auth/session.js +17 -3
  108. package/dist/internal/e10/auth/xiaoe.js +176 -13
  109. package/dist/internal/e10/auth-recovery.js +39 -12
  110. package/dist/internal/e10/context.js +29 -3
  111. package/dist/internal/skills/install.js +9 -1
  112. package/dist/shortcuts/archive/continuation.js +2 -1
  113. package/dist/shortcuts/archive/index.js +3 -0
  114. package/dist/shortcuts/archive/operations/borrow-list.js +105 -14
  115. package/dist/shortcuts/archive/operations/confirm.js +2 -1
  116. package/dist/shortcuts/archive/operations/flow-url.js +182 -22
  117. package/dist/shortcuts/archive/operations/getPageUrl.js +75 -0
  118. package/dist/shortcuts/archive/operations/prelib.js +33 -4
  119. package/dist/shortcuts/archive/operations/shared.js +52 -0
  120. package/dist/shortcuts/archive-oa/continuation.js +2 -1
  121. package/dist/shortcuts/archive-oa/index.js +2 -0
  122. package/dist/shortcuts/archive-oa/operations/confirm.js +2 -1
  123. package/dist/shortcuts/asset/continuation.js +2 -1
  124. package/dist/shortcuts/asset/index.js +2 -0
  125. package/dist/shortcuts/asset-idle/index.js +2 -0
  126. package/dist/shortcuts/blog/continuation.js +2 -1
  127. package/dist/shortcuts/blog/index.js +2 -0
  128. package/dist/shortcuts/caizhilian/continuation.js +2 -1
  129. package/dist/shortcuts/caizhilian/index.js +2 -0
  130. package/dist/shortcuts/caizhilian/operations/confirm.js +3 -2
  131. package/dist/shortcuts/calendar/continuation.js +2 -1
  132. package/dist/shortcuts/calendar/index.js +2 -0
  133. package/dist/shortcuts/calendar/operations/write.js +1 -1
  134. package/dist/shortcuts/contract/continuation.js +2 -1
  135. package/dist/shortcuts/contract/host.js +111 -4
  136. package/dist/shortcuts/contract/index.js +21 -0
  137. package/dist/shortcuts/contract/manifest.js +125 -0
  138. package/dist/shortcuts/contract/ooxml/clause-insert.js +249 -0
  139. package/dist/shortcuts/contract/operations/clause-insert.js +56 -0
  140. package/dist/shortcuts/contract/operations/customer.js +192 -0
  141. package/dist/shortcuts/contract/operations/file-download.js +75 -0
  142. package/dist/shortcuts/contract/operations/flow.js +44 -2
  143. package/dist/shortcuts/contract/operations/form-info.js +162 -62
  144. package/dist/shortcuts/contract/operations/registry.js +8 -0
  145. package/dist/shortcuts/contract/operations/review.js +116 -1
  146. package/dist/shortcuts/contract/operations/summary.js +177 -0
  147. package/dist/shortcuts/contract/operations/upload.js +64 -4
  148. package/dist/shortcuts/contract/operations/write.js +2 -1
  149. package/dist/shortcuts/contract/upload-cache.js +104 -0
  150. package/dist/shortcuts/cowork/continuation.js +2 -1
  151. package/dist/shortcuts/cowork/index.js +2 -0
  152. package/dist/shortcuts/ebuilder-form/continuation.js +2 -1
  153. package/dist/shortcuts/ebuilder-form/index.js +2 -0
  154. package/dist/shortcuts/ebuilder-form/operations/write.js +3 -2
  155. package/dist/shortcuts/ehr/continuation.js +2 -1
  156. package/dist/shortcuts/ehr/index.js +2 -0
  157. package/dist/shortcuts/ehr/operations/attend-write.js +1 -1
  158. package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +186 -5
  159. package/dist/shortcuts/ehr/operations/recruit-position.js +239 -6
  160. package/dist/shortcuts/ehr/operations/recruit-write.js +18 -19
  161. package/dist/shortcuts/ehr/operations/recruit.js +17 -5
  162. package/dist/shortcuts/esb/continuation.js +2 -1
  163. package/dist/shortcuts/esb/index.js +2 -0
  164. package/dist/shortcuts/esb/operations/trigger.js +2 -1
  165. package/dist/shortcuts/fna/continuation.js +2 -1
  166. package/dist/shortcuts/fna/index.js +2 -0
  167. package/dist/shortcuts/fna/operations/invoice-writeoff.js +1 -1
  168. package/dist/shortcuts/fna/operations/loan.js +1 -1
  169. package/dist/shortcuts/hrm/index.js +2 -0
  170. package/dist/shortcuts/hrm/operations/employee.js +29 -1
  171. package/dist/shortcuts/im/continuation.js +2 -1
  172. package/dist/shortcuts/index.js +5 -0
  173. package/dist/shortcuts/invoice/continuation.js +2 -1
  174. package/dist/shortcuts/invoice/index.js +14 -15
  175. package/dist/shortcuts/invoice/invoice-record.js +93 -0
  176. package/dist/shortcuts/invoice/manifest.js +190 -393
  177. package/dist/shortcuts/invoice/operations/add.js +2 -1
  178. package/dist/shortcuts/invoice/operations/delete.js +2 -1
  179. package/dist/shortcuts/invoice/operations/import.js +2 -1
  180. package/dist/shortcuts/invoice/operations/issuing-contract-detail.js +86 -0
  181. package/dist/shortcuts/invoice/operations/issuing-contracts.js +210 -0
  182. package/dist/shortcuts/invoice/operations/registry.js +17 -17
  183. package/dist/shortcuts/invoice/operations/reim-auto.js +4 -569
  184. package/dist/shortcuts/invoice/operations/reim.js +52 -341
  185. package/dist/shortcuts/invoice/operations/shared.js +21 -4
  186. package/dist/shortcuts/invoice/operations/update.js +2 -1
  187. package/dist/shortcuts/invoice/projection.js +10 -62
  188. package/dist/shortcuts/jiuchuanhui/continuation.js +2 -1
  189. package/dist/shortcuts/jiuchuanhui/index.js +2 -0
  190. package/dist/shortcuts/jiuchuanhui/operations/datajson.js +2 -1
  191. package/dist/shortcuts/jiuchuanhui/operations/esb.js +2 -1
  192. package/dist/shortcuts/mail/continuation.js +2 -1
  193. package/dist/shortcuts/mail/index.js +2 -0
  194. package/dist/shortcuts/mail/operations/mail-blacklist.js +1 -1
  195. package/dist/shortcuts/mail/operations/mail-contacts.js +1 -1
  196. package/dist/shortcuts/mail/operations/mail-send.js +1 -1
  197. package/dist/shortcuts/mail/operations/mail-sign.js +1 -1
  198. package/dist/shortcuts/mail/operations/mail-template.js +1 -1
  199. package/dist/shortcuts/meeting/continuation.js +2 -1
  200. package/dist/shortcuts/meeting/index.js +2 -0
  201. package/dist/shortcuts/meeting/operations/change.js +1 -1
  202. package/dist/shortcuts/meeting/operations/create.js +1 -1
  203. package/dist/shortcuts/meeting/operations/eb/create-flow.js +198 -65
  204. package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
  205. package/dist/shortcuts/meeting/operations/eb/draft-memory.js +56 -0
  206. package/dist/shortcuts/meeting/operations/eb/factory.js +59 -4
  207. package/dist/shortcuts/meeting/operations/eb/person-cache.js +2 -2
  208. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +47 -5
  209. package/dist/shortcuts/meeting/operations/invitation-publish.js +132 -0
  210. package/dist/shortcuts/meeting/operations/lifecycle.js +1 -1
  211. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  212. package/dist/shortcuts/meeting/operations/registry.js +2 -0
  213. package/dist/shortcuts/meeting/operations/signs.js +1 -1
  214. package/dist/shortcuts/okr/continuation.js +2 -1
  215. package/dist/shortcuts/okr/index.js +2 -0
  216. package/dist/shortcuts/okr/operations/write.js +1 -1
  217. package/dist/shortcuts/plan/continuation.js +2 -1
  218. package/dist/shortcuts/plan/index.js +2 -0
  219. package/dist/shortcuts/plan/operations/write.js +1 -1
  220. package/dist/shortcuts/project/continuation.js +2 -1
  221. package/dist/shortcuts/project/index.js +2 -0
  222. package/dist/shortcuts/reception/constants.js +53 -0
  223. package/dist/shortcuts/reception/errors.js +54 -0
  224. package/dist/shortcuts/reception/host.js +125 -0
  225. package/dist/shortcuts/reception/index.js +198 -0
  226. package/dist/shortcuts/reception/manifest.js +177 -0
  227. package/dist/shortcuts/reception/operations/ask.js +71 -0
  228. package/dist/shortcuts/reception/operations/browsertool.js +58 -0
  229. package/dist/shortcuts/reception/operations/compose.js +129 -0
  230. package/dist/shortcuts/reception/operations/customparams.js +74 -0
  231. package/dist/shortcuts/reception/operations/doc.js +238 -0
  232. package/dist/shortcuts/reception/operations/docrender.js +36 -0
  233. package/dist/shortcuts/reception/operations/panels.js +179 -0
  234. package/dist/shortcuts/reception/operations/registry.js +26 -0
  235. package/dist/shortcuts/reception/operations/render-assets.js +184 -0
  236. package/dist/shortcuts/reception/operations/render.js +123 -0
  237. package/dist/shortcuts/reception/operations/runs.js +38 -0
  238. package/dist/shortcuts/reception/operations/schedule.js +127 -0
  239. package/dist/shortcuts/reception/operations/shared.js +196 -0
  240. package/dist/shortcuts/reception/operations/snapshot.js +68 -0
  241. package/dist/shortcuts/reception/operations/types.js +1 -0
  242. package/dist/shortcuts/reception/operations.js +33 -0
  243. package/dist/shortcuts/reception/upload.js +218 -0
  244. package/dist/shortcuts/recruit-stage/context.js +145 -33
  245. package/dist/shortcuts/recruit-stage/continuation.js +2 -1
  246. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +86 -16
  247. package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +6 -4
  248. package/dist/shortcuts/recruit-stage/operations/jd-create.js +289 -48
  249. package/dist/shortcuts/recruit-stage/operations/resume-import.js +207 -25
  250. package/dist/shortcuts/recruit-stage/shared.js +161 -18
  251. package/dist/shortcuts/workflow/continuation.js +2 -1
  252. package/dist/shortcuts/workflow/index.js +4 -0
  253. package/dist/shortcuts/workflow/operations/form.js +32 -8
  254. package/dist/shortcuts/workflow/operations/read.js +8 -3
  255. package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +92 -5
  256. package/dist/shortcuts/workflow/operations/todoSmartConvert/priorityExpr.js +509 -0
  257. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +22 -1
  258. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +32 -6
  259. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +57 -11
  260. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +165 -52
  261. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +57 -14
  262. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +44 -18
  263. package/dist/shortcuts/workflow/operations/write.js +1 -1
  264. package/docs/_catalog.md +3 -0
  265. package/docs/agent-invoice.md +1 -1
  266. package/docs/archive-oa.md +1 -1
  267. package/docs/caizhilian.md +1 -1
  268. package/docs/calendar.md +1 -1
  269. package/docs/contract.md +2 -1
  270. package/docs/e10-auth.md +19 -1
  271. package/docs/ehr.md +2 -2
  272. package/docs/esb.md +1 -1
  273. package/docs/im.md +1 -1
  274. package/docs/invoice.md +8 -12
  275. package/docs/okr.md +1 -1
  276. package/docs/reception.md +119 -0
  277. package/docs/todo-smart-convert/data-contract.md +7 -0
  278. package/package.json +1 -1
  279. package/scripts/clean.mjs +43 -2
  280. package/skill-template/business-info.json +18 -2
  281. package/skill-template/domains/caizhilian.md +1 -1
  282. package/skill-template/domains/jinchengda.md +2 -0
  283. package/skill-template/domains/reception-flow.md +18 -0
  284. package/skill-template/domains/yepiaotong.md +4 -7
  285. package/skills/weaver-e10-archive-oa/references/source-manifest.json +14 -14
  286. package/skills/weaver-e10-blog/references/blog-publish.md +1 -1
  287. package/skills/weaver-e10-blog/references/source-manifest.json +7 -7
  288. package/skills/weaver-e10-caizhilian/references/source-manifest.json +21 -21
  289. package/skills/weaver-e10-caizhilian/references/write-protocol.md +2 -2
  290. package/skills/weaver-e10-calendar/references/calendar-write.md +1 -1
  291. package/skills/weaver-e10-cowork/SKILL.md +1 -1
  292. package/skills/weaver-e10-ebuilder-form/SKILL.md +1 -1
  293. package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -1
  294. package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -1
  295. package/skills/weaver-e10-esb/SKILL.md +2 -2
  296. package/skills/weaver-e10-esb/references/source-manifest.json +22 -22
  297. package/skills/weaver-e10-esb/references/trigger.md +2 -2
  298. package/skills/weaver-e10-jinchengda/SKILL.md +198 -205
  299. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +759 -0
  300. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +250 -0
  301. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +146 -7
  302. package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +178 -0
  303. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
  304. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +1 -1
  305. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +75 -0
  306. package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +137 -0
  307. package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +163 -0
  308. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +52 -3
  309. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +92 -5
  310. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +602 -0
  311. package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +209 -0
  312. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +126 -0
  313. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +312 -0
  314. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +555 -0
  315. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +47 -12
  316. package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +469 -0
  317. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +154 -1
  318. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +1 -1
  319. package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +224 -0
  320. package/skills/weaver-e10-jinchengda/references/orchestration.md +355 -0
  321. package/skills/weaver-e10-jinchengda/references/source-manifest.json +29 -29
  322. package/skills/weaver-e10-jucailin/SKILL.md +1 -1
  323. package/skills/weaver-e10-jucailin/references/attend-write.md +2 -2
  324. package/skills/weaver-e10-jucailin/references/recruit-create.md +15 -4
  325. package/skills/weaver-e10-jucailin/references/recruit-write.md +3 -3
  326. package/skills/weaver-e10-meeting/SKILL.md +64 -14
  327. package/skills/weaver-e10-meeting/references/meeting-change.md +1 -1
  328. package/skills/weaver-e10-meeting/references/meeting-create.md +1 -1
  329. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +1 -1
  330. package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
  331. package/skills/weaver-e10-okr/references/okr-align.md +1 -1
  332. package/skills/weaver-e10-okr/references/okr-keyresult.md +1 -1
  333. package/skills/weaver-e10-okr/references/okr-write.md +1 -1
  334. package/skills/weaver-e10-okr/references/source-manifest.json +8 -8
  335. package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
  336. package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
  337. package/skills/weaver-e10-qiyecheng/references/loan-management.md +1 -1
  338. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +18 -18
  339. package/skills/weaver-e10-reception-flow/SKILL.md +173 -0
  340. 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
  341. package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +213 -0
  342. package/skills/weaver-e10-reception-flow/references/browsertool.md +68 -0
  343. package/skills/weaver-e10-reception-flow/references/env-pitfalls.md +51 -0
  344. package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +227 -0
  345. package/skills/weaver-e10-reception-flow/references/guide.md +179 -0
  346. package/skills/weaver-e10-reception-flow/scripts/locate.sh +14 -0
  347. package/skills/weaver-e10-reception-flow/scripts/render.py +724 -0
  348. package/skills/weaver-e10-recruit-stage/SKILL.md +19 -10
  349. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +10 -2
  350. package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +1 -1
  351. package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +66 -0
  352. package/skills/weaver-e10-recruit-stage/references/position-templates.md +204 -0
  353. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +13 -1
  354. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +29 -6
  355. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +27 -14
  356. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +21 -2
  357. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +9 -1
  358. package/skills/weaver-e10-shijingran/SKILL.md +5 -5
  359. package/skills/weaver-e10-shijingran/references/source-manifest.json +37 -36
  360. package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +2 -0
  361. package/skills/weaver-e10-wenshuding/SKILL.md +17 -7
  362. package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +28 -0
  363. package/skills/weaver-e10-wenshuding/references/archive-flow.md +24 -8
  364. package/skills/weaver-e10-wenshuding/references/archive-prelib-list.md +3 -0
  365. package/skills/weaver-e10-wenshuding/references/archive-prelib-open.md +4 -0
  366. package/skills/weaver-e10-wenshuding/references/archive-search.md +3 -1
  367. package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
  368. package/skills/weaver-e10-workflow/SKILL.md +19 -17
  369. package/skills/weaver-e10-workflow/aigroup/default.json +10 -6
  370. package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
  371. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +36 -3
  372. package/skills/weaver-e10-workflow/references/workflow-memory.md +1 -1
  373. package/skills/weaver-e10-workflow/references/workflow-query.md +9 -6
  374. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +152 -1
  375. package/skills/weaver-e10-yepiaotong/SKILL.md +19 -26
  376. package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +13 -10
  377. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +2 -0
  378. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +194 -155
  379. package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +28 -32
  380. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +5 -1
  381. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +8 -10
  382. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +211 -616
  383. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +149 -117
  384. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +17 -20
  385. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +20 -39
  386. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +55 -22
  387. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -17
  388. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +88 -92
  389. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +144 -354
  390. package/skills/weaver-e10-yimiaoban/SKILL.md +18 -6
  391. package/skills/weaver-e10-yimiaoban/references/msg-write.md +31 -1
  392. package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
  393. package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +72 -0
  394. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +11 -11
  395. package/dist/chunks/chunk-TTPJJJC4.js +0 -465
  396. package/dist/chunks/registry-BKBZPBAJ.js +0 -23
  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
@@ -4,7 +4,7 @@ import {
4
4
  imBusinessError,
5
5
  imConfirmationError,
6
6
  imValidationError
7
- } from "./chunk-ZEDWSH32.js";
7
+ } from "./chunk-IC62NFM5.js";
8
8
  import {
9
9
  collapseNewlines,
10
10
  collectI18nIds,
@@ -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/ehr/errors.ts
8
8
  var EhrCliError = class extends CliError {
@@ -279,7 +279,7 @@ var SCHEMA_STRING_LIST = { type: "array", items: { type: "string" } };
279
279
 
280
280
  // src/shortcuts/ehr/operations/recruit.ts
281
281
  var RECRUIT_APP_TAG = "weaver-recruit-service";
282
- var RECRUIT_CACHE_VERSION = 1;
282
+ var RECRUIT_CACHE_VERSION = 3;
283
283
  var RECRUIT_TAGS = {
284
284
  talent_pool: "uf_rcrt_talent_pool",
285
285
  interview_plan: "uf_rcrt_interview_plan",
@@ -400,20 +400,22 @@ async function fetchFormFields(host, appId, objId) {
400
400
  const dataKey = config.dataKey || "";
401
401
  const fieldId = String(field?.id || "");
402
402
  if (dataKey && fieldId) fmap[dataKey] = fieldId;
403
- if (fieldId && Array.isArray(config.options) && config.options.length) {
403
+ const selectLike = field?.type === "Select" || field?.type === "Switch";
404
+ if (selectLike && fieldId && Array.isArray(config.options) && config.options.length) {
404
405
  const map = {};
405
406
  for (const option of config.options) {
406
407
  if (!option || typeof option !== "object") continue;
407
408
  const name = option.name;
408
- let selectionId = option.selectionId;
409
+ const scalar = (v) => (typeof v === "string" || typeof v === "number") && String(v) !== "" ? String(v) : "";
410
+ let selectionId = scalar(option.value) || scalar(option.valueKey);
409
411
  if (!selectionId && typeof option.extra === "string") {
410
412
  try {
411
413
  const extra = JSON.parse(option.extra);
412
- selectionId = extra.selectionId || extra.id;
414
+ selectionId = scalar(extra.valueKey) || scalar(extra.value);
413
415
  } catch {
414
416
  }
415
417
  }
416
- if (!selectionId) selectionId = option.value || option.valueKey || option.id;
418
+ if (!selectionId) selectionId = scalar(option.selectionId) || scalar(option.id);
417
419
  if (selectionId && name) map[String(selectionId)] = name;
418
420
  }
419
421
  if (Object.keys(map).length) omap[fieldId] = map;
@@ -8,17 +8,17 @@ import {
8
8
  esbPermissionError,
9
9
  esbValidationError,
10
10
  esbWriteUncertain
11
- } from "./chunk-GPMFD4RD.js";
11
+ } from "./chunk-TXUG266F.js";
12
12
  import {
13
13
  E10ApiError,
14
14
  createE10RequestRuntime,
15
15
  isE10SessionExpiredResponse,
16
16
  requireE10Session
17
- } from "./chunk-SA6VBIHY.js";
17
+ } from "./chunk-6NXT4ICB.js";
18
18
  import {
19
19
  E10_SESSION_EXPIRED_MESSAGE,
20
20
  getActiveProfile
21
- } from "./chunk-FOAA27U5.js";
21
+ } from "./chunk-U6R6FZHD.js";
22
22
 
23
23
  // src/shortcuts/esb/host.ts
24
24
  var ESB_PATHS = {
@@ -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/esb/errors.ts
8
8
  var EsbCliError = class extends CliError {
@@ -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";
@@ -682,7 +682,14 @@ var E10AuthSession = class _E10AuthSession {
682
682
  clear();
683
683
  }
684
684
  }
685
- async checkValid() {
685
+ /**
686
+ * 三态探活:`true` 明确有效、`false` 明确失效(401/403)、`undefined` 无法判定(网络/5xx)。
687
+ *
688
+ * 为什么要和 `checkValid()` 分开:平台连接器判断"是否已登录"时,
689
+ * 把网络抖动当成"未登录"会逼用户重复登录;而把 401 当成"已登录"会让后续业务全失败。
690
+ * 未认定失效时保持乐观,明确失效才降级。
691
+ */
692
+ async probeValid() {
686
693
  const { signal, clear } = createTimeoutSignal(E10_TEAMS_CHECK_TIMEOUT_MS);
687
694
  try {
688
695
  const resp = await fetch(`${this.getBaseUrl()}/api/ecode/tree/list?parentId=0`, {
@@ -695,13 +702,18 @@ var E10AuthSession = class _E10AuthSession {
695
702
  redirect: "manual",
696
703
  signal
697
704
  });
698
- 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;
699
708
  } catch {
700
- return false;
709
+ return void 0;
701
710
  } finally {
702
711
  clear();
703
712
  }
704
713
  }
714
+ async checkValid() {
715
+ return await this.probeValid() === true;
716
+ }
705
717
  async ensureValid() {
706
718
  if (await this.checkValid()) return true;
707
719
  const account = process.env.E10_ACCOUNT;
@@ -917,15 +929,25 @@ var XIAOE_USER_TOKEN_SOURCE = "XIAOE_USER_TOKEN";
917
929
  var XIAOE_BUNDLED_ENV_SCRIPT_SOURCE = "bundled scripts/xiaoe_env.py";
918
930
  var XIAOE_ETEAMID_TTL_MS = 72e5;
919
931
  var XIAOE_DIAGNOSTIC_MAX_LENGTH = 300;
920
- function redactXiaoEDiagnostic(message, secrets) {
932
+ var XIAOE_SCRIPT_DIAGNOSTIC_MAX_LENGTH = 2e3;
933
+ function redactXiaoEDiagnostic(message, secrets, maxLength = XIAOE_DIAGNOSTIC_MAX_LENGTH) {
921
934
  let text = message;
922
935
  for (const secret of secrets) {
923
936
  if (secret && secret.length >= 8 && text.includes(secret)) {
924
937
  text = text.split(secret).join("<redacted>");
925
938
  }
926
939
  }
940
+ text = text.replace(/\b(Bearer\s+)[A-Za-z0-9._~+/=-]+/giu, "$1<redacted>").replace(
941
+ /((?:eteamsid|access[_-]?token|refresh[_-]?token|auth(?:orization)?|cookie|session[_-]?id|secret|password)\s*[:=]\s*)(["']?)[^\s,;}"']+/giu,
942
+ "$1$2<redacted>"
943
+ );
927
944
  const normalized = text.replace(/\s+/gu, " ").trim();
928
- return normalized.length > XIAOE_DIAGNOSTIC_MAX_LENGTH ? `${normalized.slice(0, XIAOE_DIAGNOSTIC_MAX_LENGTH)}\u2026` : normalized;
945
+ return normalized.length > maxLength ? `${normalized.slice(0, maxLength)}\u2026` : normalized;
946
+ }
947
+ function xiaoEDiagnosticSecrets(env) {
948
+ return Object.entries(env).filter(([key, value]) => Boolean(
949
+ value && (key.startsWith("XIAOE_") || key.startsWith("WEAVER_XIAOE_")) && /(?:TOKEN|AUTH|ETEAMSID|COOKIE|SESSION|SECRET|PASSWORD)/iu.test(key)
950
+ )).map(([, value]) => value);
929
951
  }
930
952
  function noteXiaoEStep(diagnostics, step) {
931
953
  diagnostics?.attemptedSteps.push(step);
@@ -938,6 +960,12 @@ function readTag(error, key, type) {
938
960
  const value = error[key];
939
961
  return typeof value === type ? value : void 0;
940
962
  }
963
+ function readExchangeRequest(error) {
964
+ if (!error || typeof error !== "object") return void 0;
965
+ const request = error.request;
966
+ if (!request || typeof request !== "object" || Array.isArray(request)) return void 0;
967
+ return request;
968
+ }
941
969
  function classifyXiaoEHttpStatus(status) {
942
970
  if (status === 401 || status === 403) return "credential";
943
971
  if (status >= 300 && status < 400) return "credential";
@@ -968,19 +996,41 @@ function classifyXiaoEError(error) {
968
996
  function noteXiaoEError(diagnostics, error, secrets = [], stage = "e10_session") {
969
997
  if (!diagnostics) return;
970
998
  const message = error instanceof Error ? error.message : String(error);
999
+ const request = readExchangeRequest(error);
971
1000
  const redacted = redactXiaoEDiagnostic(message, secrets);
972
1001
  if (redacted) diagnostics.lastError = redacted;
1002
+ const failureMessage = request || stage === "bundled_env_script" ? redactXiaoEDiagnostic(message, secrets, XIAOE_SCRIPT_DIAGNOSTIC_MAX_LENGTH) : redacted;
973
1003
  const { kind, causeCode, status } = classifyXiaoEError(error);
974
1004
  const failure = {
975
1005
  stage: readTag(error, "stage", "string") ?? stage,
976
1006
  kind,
977
- message: redacted,
1007
+ message: failureMessage,
978
1008
  ...causeCode ? { causeCode } : {},
979
- ...status === void 0 ? {} : { httpStatus: status }
1009
+ ...status === void 0 ? {} : { httpStatus: status },
1010
+ ...request ? { request } : {}
980
1011
  };
981
1012
  if (!diagnostics.failures) diagnostics.failures = [];
982
1013
  diagnostics.failures.push(failure);
983
1014
  }
1015
+ function xiaoEErrorChainDetail(error, secrets) {
1016
+ const parts = [];
1017
+ const seen = /* @__PURE__ */ new Set();
1018
+ let current = error;
1019
+ for (let depth = 0; depth < 5 && current !== void 0 && current !== null; depth += 1) {
1020
+ if (seen.has(current)) break;
1021
+ seen.add(current);
1022
+ const record = typeof current === "object" ? current : null;
1023
+ const name = current instanceof Error ? current.name : typeof record?.name === "string" ? record.name : `cause${depth}`;
1024
+ const message = current instanceof Error ? current.message : typeof record?.message === "string" ? record.message : String(current);
1025
+ const attributes = ["code", "errno", "syscall", "hostname", "address", "port"].map((key) => {
1026
+ const value = record?.[key];
1027
+ return typeof value === "string" || typeof value === "number" ? `${key}=${String(value)}` : "";
1028
+ }).filter(Boolean);
1029
+ parts.push(`${name}: ${message}${attributes.length ? ` {${attributes.join(", ")}}` : ""}`);
1030
+ current = record?.cause;
1031
+ }
1032
+ return redactXiaoEDiagnostic(parts.join(" <- "), secrets, XIAOE_SCRIPT_DIAGNOSTIC_MAX_LENGTH);
1033
+ }
984
1034
  function summarizeXiaoEFailureKind(diagnostics) {
985
1035
  const failures = diagnostics?.failures || [];
986
1036
  if (!failures.length) return void 0;
@@ -1313,6 +1363,75 @@ function xiaoETokenScriptPythonCandidates(env = process.env, platform = process.
1313
1363
  function isXiaoETokenScriptEnvFailure(message) {
1314
1364
  return /No module named|ModuleNotFoundError|ENOENT|EACCES|permission denied|command not found|not recognized as an internal|cannot find the file/i.test(message);
1315
1365
  }
1366
+ function safeXiaoEEndpoint(value) {
1367
+ const url = value instanceof URL ? new URL(value.toString()) : new URL(value);
1368
+ url.username = "";
1369
+ url.password = "";
1370
+ url.search = "";
1371
+ url.hash = "";
1372
+ return url.toString();
1373
+ }
1374
+ function xiaoEExchangeRequestDiagnostic(options) {
1375
+ const endpoint = safeXiaoEEndpoint(options.endpoint);
1376
+ const finalEndpoint = options.finalEndpoint ? safeXiaoEEndpoint(options.finalEndpoint) : endpoint;
1377
+ const body = { domain: options.domain || DEFAULT_E10_BASE_URL };
1378
+ const serializedBody = JSON.stringify(body);
1379
+ return {
1380
+ transport: options.transport,
1381
+ method: "POST",
1382
+ endpoint,
1383
+ ...finalEndpoint === endpoint ? {} : { finalEndpoint },
1384
+ redirect: options.transport === "node_fetch" ? "manual" : "safe-follow",
1385
+ headers: {
1386
+ "content-type": "application/json",
1387
+ authorization: "<redacted>"
1388
+ },
1389
+ authorizationPresent: Boolean(options.authorization),
1390
+ authorizationLength: options.authorization.length,
1391
+ body,
1392
+ bodyBytes: Buffer.byteLength(serializedBody, "utf8"),
1393
+ timeoutMs: XIAOE_CLIENT_TOKEN_TIMEOUT_MS,
1394
+ elapsedMs: Math.max(0, Date.now() - options.startedAt),
1395
+ ...options.redirectCount ? { redirectCount: options.redirectCount } : {}
1396
+ };
1397
+ }
1398
+ function xiaoEPythonFailureDetail(error, stderr, env) {
1399
+ const stderrText = stderr.trim();
1400
+ const lines = stderrText.split(/\r?\n/u).map((line) => line.trim()).filter(Boolean);
1401
+ let scriptMessage = "";
1402
+ for (const line of [...lines].reverse()) {
1403
+ try {
1404
+ const parsed = JSON.parse(line);
1405
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
1406
+ const candidate = readString(parsed, "msg", "message", "error");
1407
+ if (candidate) {
1408
+ scriptMessage = candidate;
1409
+ break;
1410
+ }
1411
+ }
1412
+ } catch {
1413
+ }
1414
+ }
1415
+ const stderrTail = lines.slice(-12).join(" | ");
1416
+ const rawDetail = [
1417
+ `exitCode=${String(error.code ?? "unknown")}`,
1418
+ ...error.signal ? [`signal=${error.signal}`] : [],
1419
+ ...error.killed ? ["killed=true"] : [],
1420
+ ...scriptMessage ? [`scriptMessage=${scriptMessage}`] : [],
1421
+ ...stderrTail ? [`stderrTail=${stderrTail}`] : [`processError=${error.message || "unknown error"}`]
1422
+ ].join(" ");
1423
+ const detail = redactXiaoEDiagnostic(
1424
+ rawDetail,
1425
+ xiaoEDiagnosticSecrets(env),
1426
+ XIAOE_SCRIPT_DIAGNOSTIC_MAX_LENGTH
1427
+ );
1428
+ const causeCode = /\b(?:UND_ERR_[A-Z_]+|E[A-Z_]{3,})\b/u.exec(detail)?.[0];
1429
+ return {
1430
+ detail,
1431
+ ...causeCode && isNetworkErrorCode(causeCode) ? { causeCode } : {},
1432
+ network: Boolean(causeCode && isNetworkErrorCode(causeCode) || looksLikeTransportMessage(detail))
1433
+ };
1434
+ }
1316
1435
  async function runXiaoETokenScriptOnce(pythonCommand, scriptPath, baseUrl, env) {
1317
1436
  const wrapper = [
1318
1437
  "import ast,contextlib,io,json,runpy,sys",
@@ -1356,8 +1475,15 @@ async function runXiaoETokenScriptOnce(pythonCommand, scriptPath, baseUrl, env)
1356
1475
  },
1357
1476
  (error, stdout, stderr) => {
1358
1477
  if (error) {
1359
- const detail = (stderr || error.message || "unknown error").trim().split("\n").slice(-1)[0];
1360
- reject(new CliError("XiaoE credential script failed: " + detail, 3 /* AuthError */));
1478
+ const { detail, causeCode, network } = xiaoEPythonFailureDetail(error, stderr, env);
1479
+ const scriptError = new CliError("XiaoE credential script failed: " + detail, 3 /* AuthError */);
1480
+ if (network) {
1481
+ Object.assign(scriptError, {
1482
+ errorKind: "network",
1483
+ ...causeCode ? { causeCode } : {}
1484
+ });
1485
+ }
1486
+ reject(scriptError);
1361
1487
  return;
1362
1488
  }
1363
1489
  const text = stdout.trim();
@@ -1402,7 +1528,25 @@ async function resolveXiaoETokenScriptCredential(baseUrl, env = process.env) {
1402
1528
  async function resolveXiaoEBundledEnvScriptCredential(baseUrl, env = process.env) {
1403
1529
  const scriptPath = xiaoEBundledEnvScriptPath();
1404
1530
  if (!scriptPath) return null;
1405
- const tokenData = await runXiaoEPythonCredentialScript(scriptPath, baseUrl, env);
1531
+ const platformCredential = readXiaoEPlatformCredential(env);
1532
+ const startedAt = Date.now();
1533
+ let tokenData;
1534
+ try {
1535
+ tokenData = await runXiaoEPythonCredentialScript(scriptPath, baseUrl, env);
1536
+ } catch (error) {
1537
+ if (platformCredential && error && typeof error === "object") {
1538
+ Object.assign(error, {
1539
+ request: xiaoEExchangeRequestDiagnostic({
1540
+ transport: "bundled_python",
1541
+ endpoint: `${platformCredential.erpaUrl}${XIAOE_SKILL_ETEAMID_API_PATH}`,
1542
+ domain: baseUrl,
1543
+ authorization: platformCredential.authToken,
1544
+ startedAt
1545
+ })
1546
+ });
1547
+ }
1548
+ throw error;
1549
+ }
1406
1550
  if (!tokenData) return null;
1407
1551
  return withDefaultXiaoEExpiry(
1408
1552
  readXiaoECredentialRecord(tokenData, XIAOE_BUNDLED_ENV_SCRIPT_SOURCE, baseUrl)
@@ -1532,10 +1676,23 @@ function inspectXiaoEUnifiedLoginSources(options = {}) {
1532
1676
  };
1533
1677
  }
1534
1678
  async function fetchXiaoEClientEteamId(credential, domain) {
1679
+ const requestedDomain = domain || DEFAULT_E10_BASE_URL;
1680
+ const startedAt = Date.now();
1681
+ const initialEndpoint = new URL(`${credential.erpaUrl}${XIAOE_SKILL_ETEAMID_API_PATH}`);
1682
+ let endpoint = initialEndpoint;
1683
+ let redirectCount = 0;
1684
+ const requestDiagnostic = () => xiaoEExchangeRequestDiagnostic({
1685
+ transport: "node_fetch",
1686
+ endpoint: initialEndpoint,
1687
+ finalEndpoint: endpoint,
1688
+ domain: requestedDomain,
1689
+ authorization: credential.authToken,
1690
+ startedAt,
1691
+ redirectCount
1692
+ });
1535
1693
  const controller = new AbortController();
1536
1694
  const timer = setTimeout(() => controller.abort(), XIAOE_CLIENT_TOKEN_TIMEOUT_MS);
1537
1695
  try {
1538
- let endpoint = new URL(`${credential.erpaUrl}${XIAOE_SKILL_ETEAMID_API_PATH}`);
1539
1696
  let resp = null;
1540
1697
  for (let redirects = 0; redirects <= 5; redirects += 1) {
1541
1698
  resp = await fetch(endpoint, {
@@ -1544,7 +1701,7 @@ async function fetchXiaoEClientEteamId(credential, domain) {
1544
1701
  "content-type": "application/json",
1545
1702
  authorization: credential.authToken
1546
1703
  },
1547
- body: JSON.stringify({ domain: domain || DEFAULT_E10_BASE_URL }),
1704
+ body: JSON.stringify({ domain: requestedDomain }),
1548
1705
  redirect: "manual",
1549
1706
  signal: controller.signal
1550
1707
  });
@@ -1573,6 +1730,7 @@ async function fetchXiaoEClientEteamId(credential, domain) {
1573
1730
  }
1574
1731
  await resp.body?.cancel().catch(() => void 0);
1575
1732
  endpoint = next;
1733
+ redirectCount = redirects + 1;
1576
1734
  }
1577
1735
  if (!resp?.ok) {
1578
1736
  const status = resp?.status || 0;
@@ -1605,15 +1763,22 @@ async function fetchXiaoEClientEteamId(credential, domain) {
1605
1763
  if (isAbortError(error)) {
1606
1764
  throw tagXiaoEError(
1607
1765
  `XiaoE client token endpoint timed out after ${XIAOE_CLIENT_TOKEN_TIMEOUT_MS} ms.`,
1608
- { errorKind: "network", causeCode: "ETIMEDOUT" }
1766
+ { errorKind: "network", causeCode: "ETIMEDOUT", request: requestDiagnostic() }
1609
1767
  );
1610
1768
  }
1611
- if (error instanceof CliError) throw error;
1769
+ if (error instanceof CliError) {
1770
+ Object.assign(error, { request: requestDiagnostic() });
1771
+ throw error;
1772
+ }
1612
1773
  const causeCode = readErrorCauseCode(error);
1613
- const message = error instanceof Error ? error.message : String(error);
1774
+ const detail = xiaoEErrorChainDetail(error, [credential.authToken]);
1614
1775
  throw tagXiaoEError(
1615
- `XiaoE client token endpoint request failed${causeCode ? ` (${causeCode})` : ""}: ${message}`,
1616
- { errorKind: "network", ...causeCode ? { causeCode } : {} }
1776
+ `XiaoE client token endpoint request failed${causeCode ? ` (${causeCode})` : ""}: ${detail}`,
1777
+ {
1778
+ errorKind: "network",
1779
+ ...causeCode ? { causeCode } : {},
1780
+ request: requestDiagnostic()
1781
+ }
1617
1782
  );
1618
1783
  } finally {
1619
1784
  clearTimeout(timer);
@@ -1928,6 +2093,7 @@ export {
1928
2093
  packagePath,
1929
2094
  packageFileUrl,
1930
2095
  normalizeGlobalOptions,
2096
+ writeWithRetry,
1931
2097
  readErrorCauseCode,
1932
2098
  getE10AuthRoot,
1933
2099
  getActiveProfile,
@@ -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));
@@ -3,13 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  readCache,
5
5
  writeCache
6
- } from "./chunk-GHXCDPTM.js";
6
+ } from "./chunk-DGMYACGJ.js";
7
7
  import {
8
8
  SCHEMA_DATETIME_MINUTE,
9
9
  meetingSuccess,
10
10
  meetingValidationError,
11
11
  schemaOf
12
- } from "./chunk-72CKAUAG.js";
12
+ } from "./chunk-JWWTI63L.js";
13
13
 
14
14
  // src/shortcuts/meeting/operations/eb/schedule.ts
15
15
  var SCHEDULE_TYPE_PATH = "/api/ebuilder/form/formdata/v2/getFormDataList/queryAgendaType";
@@ -110,9 +110,9 @@ async function runScheduleConflictFlow(env, input) {
110
110
  if (!employeeId) {
111
111
  throw meetingValidationError("schedule_employee_required", "\u53D6\u4E0D\u5230\u5F53\u524D\u767B\u5F55\u7528\u6237 id\uFF0C\u65E0\u6CD5\u89E6\u53D1 ESB \u65E5\u7A0B\u67E5\u8BE2");
112
112
  }
113
- const { createEsbHost } = await import("./host-YTODKMSL.js");
114
- const { createEsbContinuationSigner } = await import("./continuation-NLECEJPX.js");
115
- const { getEsbOperation } = await import("./registry-7FFOXIAW.js");
113
+ const { createEsbHost } = await import("./host-3TNBMDTR.js");
114
+ const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
115
+ const { getEsbOperation } = await import("./registry-QJCZ2GVG.js");
116
116
  const esbEnv = {
117
117
  ctx: env.ctx,
118
118
  host: createEsbHost(env.ctx),
@@ -331,7 +331,7 @@ async function resolveMemberIdsByName(env, names) {
331
331
  const unique = [...new Set(names)].filter((name) => name !== "");
332
332
  if (unique.length === 0) return map;
333
333
  try {
334
- const { hrmEmployeeOperations } = await import("./employee-SAK2QYXX.js");
334
+ const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
335
335
  const query = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.query");
336
336
  if (!query) return map;
337
337
  for (const name of unique) {
@@ -0,0 +1,76 @@
1
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
+ const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ caizhilianValidationError
5
+ } from "./chunk-P5GQRWDC.js";
6
+ import {
7
+ CONTINUATION_TTL_MS
8
+ } from "./chunk-7BDPM5ST.js";
9
+
10
+ // src/shortcuts/caizhilian/continuation.ts
11
+ import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
12
+ import { existsSync } from "node:fs";
13
+ import { chmod, mkdir, readFile, writeFile } from "node:fs/promises";
14
+ import { homedir } from "node:os";
15
+ import { resolve } from "node:path";
16
+ function stateRoot(ctx) {
17
+ const configured = ctx?.config?.path();
18
+ if (configured) return resolve(configured, "..");
19
+ return process.env.WEAVER_WORK_CLI_HOME || process.env.WORK_CLI_HOME || resolve(homedir(), ".weaver-work-cli");
20
+ }
21
+ async function loadKey(ctx) {
22
+ const keysDir = resolve(stateRoot(ctx), "keys");
23
+ const filename = resolve(keysDir, "caizhilian-continuation.key");
24
+ await mkdir(keysDir, { recursive: true, mode: 448 });
25
+ if (existsSync(filename)) return readFile(filename);
26
+ const key = randomBytes(32);
27
+ try {
28
+ await writeFile(filename, key, { flag: "wx", mode: 384 });
29
+ if (process.platform !== "win32") await chmod(filename, 384).catch(() => void 0);
30
+ return key;
31
+ } catch {
32
+ return readFile(filename);
33
+ }
34
+ }
35
+ function encode(value) {
36
+ return Buffer.from(JSON.stringify(value)).toString("base64url");
37
+ }
38
+ function signature(payload, key) {
39
+ return createHmac("sha256", key).update(payload).digest("base64url");
40
+ }
41
+ function createCaizhilianContinuationSigner(ctx) {
42
+ return {
43
+ async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
44
+ const issuedAt = Date.now();
45
+ const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
46
+ const sig = signature(body, await loadKey(ctx));
47
+ return `${body}.${sig}`;
48
+ },
49
+ async verify(token, expectedOperation) {
50
+ if (typeof token !== "string" || !token.includes(".")) {
51
+ throw caizhilianValidationError("continuation_invalid", "continuation \u65E0\u6548");
52
+ }
53
+ const [body, provided] = token.split(".");
54
+ const expected = signature(body, await loadKey(ctx));
55
+ const valid = provided.length === expected.length && timingSafeEqual(Buffer.from(provided), Buffer.from(expected));
56
+ if (!valid) throw caizhilianValidationError("continuation_invalid", "continuation \u7B7E\u540D\u6821\u9A8C\u5931\u8D25");
57
+ let value;
58
+ try {
59
+ value = JSON.parse(Buffer.from(body, "base64url").toString("utf8"));
60
+ } catch {
61
+ throw caizhilianValidationError("continuation_invalid", "continuation \u5185\u5BB9\u65E0\u6CD5\u89E3\u6790");
62
+ }
63
+ if (value.operation !== expectedOperation) {
64
+ throw caizhilianValidationError("continuation_mismatch", "continuation \u4E0D\u5C5E\u4E8E\u5F53\u524D\u64CD\u4F5C");
65
+ }
66
+ if (!Number.isSafeInteger(value.expiresAt) || value.expiresAt < Date.now()) {
67
+ throw caizhilianValidationError("continuation_expired", "continuation \u5DF2\u8FC7\u671F");
68
+ }
69
+ return value;
70
+ }
71
+ };
72
+ }
73
+
74
+ export {
75
+ createCaizhilianContinuationSigner
76
+ };
@@ -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 {
@@ -5,15 +5,15 @@ import {
5
5
  ebuilderBusinessError,
6
6
  ebuilderNetworkError,
7
7
  ebuilderValidationError
8
- } from "./chunk-BYATLLEF.js";
8
+ } from "./chunk-Z3GDFVJR.js";
9
9
  import {
10
10
  createE10RequestRuntime,
11
11
  isE10SessionExpiredResponse,
12
12
  requireE10Session
13
- } from "./chunk-SA6VBIHY.js";
13
+ } from "./chunk-6NXT4ICB.js";
14
14
  import {
15
15
  getActiveProfile
16
- } from "./chunk-FOAA27U5.js";
16
+ } from "./chunk-U6R6FZHD.js";
17
17
 
18
18
  // src/shortcuts/ebuilder-form/host.ts
19
19
  import { randomUUID } from "node:crypto";
@@ -2,7 +2,10 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  ebuilderValidationError
5
- } from "./chunk-BYATLLEF.js";
5
+ } from "./chunk-Z3GDFVJR.js";
6
+ import {
7
+ CONTINUATION_TTL_MS
8
+ } from "./chunk-7BDPM5ST.js";
6
9
 
7
10
  // src/shortcuts/ebuilder-form/continuation.ts
8
11
  import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
@@ -37,7 +40,7 @@ function signature(payload, key) {
37
40
  }
38
41
  function createEbuilderFormContinuationSigner(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/ebuilder-form/errors.ts
8
8
  var EbuilderFormCliError = class extends CliError {
@@ -5,17 +5,17 @@ import {
5
5
  hrmAuthError,
6
6
  hrmNetworkError,
7
7
  hrmValidationError
8
- } from "./chunk-OOUTBLZ4.js";
8
+ } from "./chunk-56EZERK4.js";
9
9
  import {
10
10
  E10ApiError,
11
11
  createE10RequestRuntime,
12
12
  isE10SessionExpiredResponse,
13
13
  requireE10Session
14
- } from "./chunk-SA6VBIHY.js";
14
+ } from "./chunk-6NXT4ICB.js";
15
15
  import {
16
16
  E10_SESSION_EXPIRED_MESSAGE,
17
17
  getActiveProfile
18
- } from "./chunk-FOAA27U5.js";
18
+ } from "./chunk-U6R6FZHD.js";
19
19
 
20
20
  // src/shortcuts/hrm/host.ts
21
21
  function inferProfile(ctx) {
@@ -7,9 +7,10 @@ import {
7
7
  findCommonFreeSlots,
8
8
  meetingEbConflictOperations,
9
9
  runEbConflictCheck
10
- } from "./chunk-QKNKR4RH.js";
11
- import "./chunk-72CKAUAG.js";
12
- import "./chunk-LUSPKZKY.js";
10
+ } from "./chunk-LXFVWZLM.js";
11
+ import "./chunk-JWWTI63L.js";
12
+ import "./chunk-7BDPM5ST.js";
13
+ import "./chunk-UG5G54VL.js";
13
14
  import "./chunk-BUSC6UAE.js";
14
15
  export {
15
16
  assertEbCreatePathAllowed,