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
@@ -5,6 +5,24 @@ import { homedir } from 'node:os';
5
5
  import { createRecruitContextLoader, } from '../ehr/operations/recruit.js';
6
6
  import { rsFail } from './errors.js';
7
7
  const flowMemo = new Map();
8
+ /**
9
+ * 自用系统(selfUse=1)默认招聘流程兜底常量 —— 2026-11-05 用户明确指定写死。
10
+ *
11
+ * 背景:www.e-cology.com.cn 是自用系统,招聘流程**只有一条**「初筛+面试+offer阶段」。
12
+ * 该环境的运行时解析通道全部取不到值(实测):
13
+ * · 环境缓存无 defaultRecruitFlow 键、无 menus 字段
14
+ * · 原接口 /api/recruit/position/recruitFlow/list 不存在(静默失败)
15
+ * · 招聘流程菜单列表经 listInit + getListDatas 仍未返回可用行
16
+ *
17
+ * ⚠️ 与技能「环境 id 绝不入包、跨环境自适应」原则冲突,故**加双重守卫**:
18
+ * 仅当 selfUse=1 且域名等于 selfUseHost 时才使用本常量;其他环境继续走运行时解析,不受影响。
19
+ * 换环境或该流程数据变更时必须同步修改此处。
20
+ */
21
+ const SELFUSE_DEFAULT_FLOW = {
22
+ selfUseHost: 'www.e-cology.com.cn',
23
+ id: '874896524979806209',
24
+ name: '初筛+面试+offer阶段',
25
+ };
8
26
  const digitalMenuMemo = new Map();
9
27
  function cacheDirFor(baseUrl) {
10
28
  const url = new URL(baseUrl);
@@ -24,29 +42,63 @@ async function readLegacyCacheExtra(baseUrl) {
24
42
  const dir = cacheDirFor(baseUrl);
25
43
  if (!existsSync(dir))
26
44
  return { defaultRecruitFlow: null, digitalHumanMenu: null };
27
- const files = (await import('node:fs/promises')).readdir(dir);
28
- const jsonFiles = (await files).filter((f) => f.endsWith('.json'));
29
- if (jsonFiles.length !== 1)
30
- return { defaultRecruitFlow: null, digitalHumanMenu: null };
31
- const raw = JSON.parse(await readFile(join(dir, jsonFiles[0]), 'utf8'));
32
- const flow = raw?.defaultRecruitFlow && raw.defaultRecruitFlow.id
33
- ? { id: String(raw.defaultRecruitFlow.id), name: String(raw.defaultRecruitFlow.name || '') }
34
- : null;
35
- const dh = raw?.lists?.digital_human?.listId
36
- ? {
37
- menuName: String(raw.lists.digital_human.menuName || '面试数字人配置'),
38
- listId: String(raw.lists.digital_human.listId),
39
- cusMenuId: String(raw.lists.digital_human.cusMenuId || ''),
45
+ const files = await (await import('node:fs/promises')).readdir(dir);
46
+ const jsonFiles = files.filter((f) => f.endsWith('.json'));
47
+ // 原实现要求「目录内恰好 1 个 json 才读」,多环境/多应用共存时必然读不到 →
48
+ // 改为遍历全部 json,取第一个带所需键的(2026-11-05 修)。
49
+ let flow = null;
50
+ let dh = null;
51
+ for (const f of jsonFiles) {
52
+ let raw;
53
+ try {
54
+ raw = JSON.parse(await readFile(join(dir, f), 'utf8'));
55
+ }
56
+ catch {
57
+ continue;
58
+ }
59
+ if (!flow && raw?.defaultRecruitFlow && raw.defaultRecruitFlow.id) {
60
+ flow = { id: String(raw.defaultRecruitFlow.id), name: String(raw.defaultRecruitFlow.name || '') };
61
+ }
62
+ if (!dh && raw?.lists?.digital_human?.listId) {
63
+ dh = {
64
+ menuName: String(raw.lists.digital_human.menuName || '面试数字人配置'),
65
+ listId: String(raw.lists.digital_human.listId),
66
+ cusMenuId: String(raw.lists.digital_human.cusMenuId || ''),
67
+ };
40
68
  }
41
- : null;
69
+ if (flow && dh)
70
+ break;
71
+ }
42
72
  return { defaultRecruitFlow: flow, digitalHumanMenu: dh };
43
73
  }
44
74
  catch {
45
75
  return { defaultRecruitFlow: null, digitalHumanMenu: null };
46
76
  }
47
77
  }
48
- /** 默认招聘流程解析:招聘设置/流程列表中「默认启用」的那条(运行时解析,跨环境不写死)。 */
49
- async function resolveDefaultRecruitFlow(host, baseUrl, appId) {
78
+ /** 从菜单树/list 里找「招聘流程」列表参数(本环境实测存在于 lists.all_search) */
79
+ function findFlowMenu(cache) {
80
+ const all = ((cache.lists || {}).all_search || []);
81
+ const hit = all.find((m) => m && m.listId && /招聘流程/.test(String(m.menuName || '')));
82
+ if (hit) {
83
+ return { listId: String(hit.listId), cusMenuId: String(hit.cusMenuId || ''), menuName: String(hit.menuName || '招聘流程') };
84
+ }
85
+ return null;
86
+ }
87
+ /** 判断某行是否为「默认启用」流程:兼容多种字段命名 */
88
+ function isDefaultFlowRow(x) {
89
+ if (!x)
90
+ return false;
91
+ const cands = [x.is_default, x.isDefault, x.default_flow, x.defaultFlow, x.is_enable, x.enabled, x.status];
92
+ for (const v of cands) {
93
+ if (v === true || v === 1 || v === '1')
94
+ return true;
95
+ if (String(v) === '是' || String(v) === '启用' || String(v) === '默认')
96
+ return true;
97
+ }
98
+ return false;
99
+ }
100
+ /** 默认招聘流程解析:优先 legacy 缓存 → 招聘流程菜单列表 → 旧接口兜底。失败**不缓存**(允许多次重试)。 */
101
+ async function resolveDefaultRecruitFlow(host, baseUrl, appId, cache) {
50
102
  const memoKey = baseUrl;
51
103
  if (flowMemo.has(memoKey))
52
104
  return flowMemo.get(memoKey) ?? null;
@@ -56,24 +108,84 @@ async function resolveDefaultRecruitFlow(host, baseUrl, appId) {
56
108
  return legacy.defaultRecruitFlow;
57
109
  }
58
110
  let result = null;
59
- try {
60
- // 招聘流程配置( hire structures ):优先业务配置通道;接口不可用或为空时保持 null(由摘要标注"未解析到默认流程")
61
- const r = await host.request({
62
- path: '/api/recruit/position/recruitFlow/list',
63
- method: 'POST',
64
- body: { appId, current: 1, pageSize: 50 },
65
- operation: 'context.defaultRecruitFlow',
66
- });
67
- const rows = r?.data?.list || r?.data?.rows || r?.data || [];
68
- const list = Array.isArray(rows) ? rows : [];
69
- const enabled = list.find((x) => x && (x.isDefault === true || Number(x.isDefault) === 1 || x.default_flow === '1'))
70
- || list.find((x) => x && x.id);
71
- if (enabled?.id) {
72
- result = { id: String(enabled.id), name: String(enabled.name || enabled.flow_name || '') };
111
+ // ① 招聘流程菜单列表(本环境实测入口,原实现只调接口必然失败)
112
+ const menu = findFlowMenu(cache);
113
+ if (menu) {
114
+ try {
115
+ // getListDatas 的 passid/cid 必须是**表单 objId**,不是 listId;
116
+ // 先用 listInit 用 listId 反查 objId(口径同 interview-arrange 的数字人菜单解析)
117
+ let flowObjId = '';
118
+ try {
119
+ const liBody = {
120
+ cusMenuId: menu.cusMenuId,
121
+ listId: menu.listId,
122
+ urlPageTitle: menu.menuName,
123
+ };
124
+ liBody['appId_' + menu.listId] = appId;
125
+ const li = await host.request({ path: '/api/ebuilder/form/list/listInit', body: liBody });
126
+ flowObjId = String(li?.data?.objid || '');
127
+ }
128
+ catch { /* listInit 不可用 → 走接口兜底 */ }
129
+ if (flowObjId) {
130
+ const body = {
131
+ current: 1, pageSize: 50, tableuid: Math.random().toString(16).slice(2, 34),
132
+ listId: menu.listId, searchParamData: { searchType: '3', type: 'and' },
133
+ terminal: 'PC', browser: 'Chrome', requiredMatch: 1, mapResult: 1,
134
+ recheckQuery: 1, isFollow: 0, isShareToMe: 0, filterCondition: {},
135
+ cusMenuId: menu.cusMenuId, urlPageTitle: menu.menuName, menuName: menu.menuName,
136
+ };
137
+ const r = await host.request({
138
+ path: `/api/ebuilder/form/list/getListDatas?passid=${flowObjId}&cid=${flowObjId}`,
139
+ body,
140
+ headers: { ebBusinessId: menu.listId },
141
+ });
142
+ const rows = (r?.data?.data || r?.data?.displayData || []);
143
+ const pick = rows.find(isDefaultFlowRow) || (rows.length === 1 ? rows[0] : null);
144
+ if (pick) {
145
+ const id = String(pick.form_data_id || pick.id || '');
146
+ const name = String(pick.name || pick.flow_name || pick.content || '');
147
+ if (id && name)
148
+ result = { id, name };
149
+ }
150
+ }
151
+ }
152
+ catch { /* 菜单通道不可用 → 走接口兜底 */ }
153
+ }
154
+ // ② 旧接口兜底(原实现唯一通道,部分环境保留)
155
+ if (!result) {
156
+ try {
157
+ const r = await host.request({
158
+ path: '/api/recruit/position/recruitFlow/list',
159
+ method: 'POST',
160
+ body: { appId, current: 1, pageSize: 50 },
161
+ operation: 'context.defaultRecruitFlow',
162
+ });
163
+ const rows = r?.data?.list || r?.data?.rows || r?.data || [];
164
+ const list = Array.isArray(rows) ? rows : [];
165
+ const enabled = list.find(isDefaultFlowRow) || null;
166
+ if (enabled?.id) {
167
+ result = { id: String(enabled.id), name: String(enabled.name || enabled.flow_name || '') };
168
+ }
169
+ }
170
+ catch { /* 接口形态不符/未开放 */ }
171
+ }
172
+ // ③ 自用系统兜底(用户指定写死):仅 selfUse=1 且域名匹配时生效,不影响其他环境
173
+ if (!result) {
174
+ const isSelfUse = String(cache?.selfUse || '') === '1';
175
+ let host = '';
176
+ try {
177
+ host = new URL(baseUrl).hostname;
178
+ }
179
+ catch {
180
+ host = '';
181
+ }
182
+ if (isSelfUse && host === SELFUSE_DEFAULT_FLOW.selfUseHost) {
183
+ result = { id: SELFUSE_DEFAULT_FLOW.id, name: SELFUSE_DEFAULT_FLOW.name };
73
184
  }
74
185
  }
75
- catch { /* 接口形态不符/未开放:保持 null,不阻塞建职位 */ }
76
- flowMemo.set(memoKey, result);
186
+ // 只有解析成功才写入 memo:失败若也缓存 null,进程内后续所有请求都拿不到(原实现缺陷)
187
+ if (result)
188
+ flowMemo.set(memoKey, result);
77
189
  return result;
78
190
  }
79
191
  async function resolveDigitalHumanMenu(host, baseUrl, cache) {
@@ -102,7 +214,7 @@ export function createRecruitStageContext() {
102
214
  const cache = await loaders.get(loaderKey).load(host);
103
215
  const baseUrl = (await host.getSession()).baseUrl.replace(/\/+$/, '');
104
216
  const [defaultRecruitFlow, digitalHumanMenu] = await Promise.all([
105
- resolveDefaultRecruitFlow(host, baseUrl, cache.appId),
217
+ resolveDefaultRecruitFlow(host, baseUrl, cache.appId, cache),
106
218
  resolveDigitalHumanMenu(host, baseUrl, cache),
107
219
  ]);
108
220
  return { ...cache, defaultRecruitFlow, digitalHumanMenu };
@@ -1,3 +1,4 @@
1
+ import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
1
2
  import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
2
3
  import { existsSync } from 'node:fs';
3
4
  import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
@@ -35,7 +36,7 @@ function signature(payload, key) {
35
36
  }
36
37
  export function createRecruitStageContinuationSigner(ctx) {
37
38
  return {
38
- async issue(payload, ttlMs = 10 * 60_000) {
39
+ async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
39
40
  const issuedAt = Date.now();
40
41
  const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
41
42
  const sig = signature(body, await loadKey(ctx));
@@ -22,7 +22,7 @@
22
22
  import { randomUUID } from 'node:crypto';
23
23
  import { rsSuccess, schemaOf } from './types.js';
24
24
  import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
25
- import { objIdOf, formIdOf, getFormLayout, getFormLayoutMeta, saveFormData, runEsb, getFormButtons, resolvePersonId, getDsOptions, cachedDsMap, findMenuNode, resolveCurrentUser, buildCardUrl, buildListLocateUrl, talentLinkExtra, pickSaveButtonActions, computeRequiredHint, randHex32, } from '../shared.js';
25
+ import { objIdOf, formIdOf, getFormLayout, getFormLayoutMeta, saveFormData, runEsb, getFormButtons, resolvePersonId, getDsOptions, findMenuNode, resolveCurrentUser, buildCardUrl, buildListUrl, talentLinkExtra, pickSaveButtonActions, computeRequiredHint, randHex32, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
26
26
  // 面试计划表单字段 dataKey(缓存 fields 里取)。
27
27
  // 注意:digital_id 不放入此列表——它只在「面试方式含 AI」时才是必填,
28
28
  // 放进来会让未部署数字人的环境连非 AI 面试都建不了(单独按需校验)。
@@ -243,7 +243,7 @@ function planBrief(items) {
243
243
  return (items || []).map((x) => x.name + (x.position ? '(岗位:' + x.position + ')' : '') + ' [id=' + x.id + ']').join(';');
244
244
  }
245
245
  async function buildPlan(opts) {
246
- const { ctx, talentId, positionId, interviewer, type, session, start, end, email, mobile, aiPlan } = opts;
246
+ const { ctx, talentId, positionId, interviewer, type, session, start, end, email, mobile, aiPlan, rounds } = opts;
247
247
  const { host, appId, cache } = ctx;
248
248
  const objId = objIdOf(cache, 'interview_plan');
249
249
  const formId = formIdOf(cache, 'interview_plan');
@@ -262,8 +262,10 @@ async function buildPlan(opts) {
262
262
  if (!candManageId)
263
263
  throw rsFail('未定位到应聘管理记录(candidateManageId),请确认候选人已有应聘批次');
264
264
  // 面试方式/轮次枚举:环境缓存 field_options 已有同名映射时直接反转使用(省 2 请求),未覆盖才回源
265
- const typeMap = cachedDsMap(cache, objId, 'interview_type') || await getDsOptions(host, objId, fid('interview_type'), appId);
266
- const sessionMap = cachedDsMap(cache, objId, 'interview_session') || await getDsOptions(host, objId, fid('interview_session'), appId);
265
+ const [typeMap, sessionMap] = await Promise.all([
266
+ getDsOptions(host, objId, fid('interview_type')),
267
+ getDsOptions(host, objId, fid('interview_session')),
268
+ ]);
267
269
  const typeId = typeMap[type];
268
270
  if (!typeId)
269
271
  throw rsFail('面试方式「' + type + '」不在枚举中(' + Object.keys(typeMap).join('/') + ')');
@@ -362,6 +364,46 @@ async function buildPlan(opts) {
362
364
  if (aiPlanPicked) {
363
365
  dataDetails.push({ formField: { id: digitalFid }, dataOptions: [{ optionId: aiPlanPicked.id, content: aiPlanPicked.name }] });
364
366
  }
367
+ // ① 表单默认值优先(用户 2026-11-06 定稿):CLI 走 saveFormData 直写,不触发表单渲染,
368
+ // 页面点「保存」会自动带出的 defaultDetails 必须显式并入提交体,否则「状态」等字段落库为空。
369
+ // 布局元数据回源(有进程内 memo),不读可能过期的磁盘选项缓存。
370
+ const meta = await getFormLayoutMeta(host, formId).catch(() => null);
371
+ const invFields = {};
372
+ for (const [k, v] of Object.entries(fields))
373
+ invFields[String(v)] = k;
374
+ // AI 专属字段由 aiPlan / 面试方式联动控制,不能拿页面默认值覆盖;轮次由下面单独处理(仅当默认里没有时)
375
+ const EXCLUDE_DEFAULTS = new Set(['digital_id', 'interview_type', 'interview_paper_id', 'send_channel']);
376
+ const defaultsApplied = [];
377
+ for (const d of (meta?.defaultDetails || [])) {
378
+ const did = String(d.fieldId || '');
379
+ if (!did || dataDetails.some((x) => String(x.formField.id) === did))
380
+ continue;
381
+ const dk = invFields[did] || '';
382
+ if (EXCLUDE_DEFAULTS.has(dk))
383
+ continue;
384
+ const o = (d.dataOptions || [])[0];
385
+ if (o?.optionId)
386
+ dataDetails.push({ formField: { id: did }, dataOptions: [{ optionId: String(o.optionId), content: o.content || '' }] });
387
+ else if (d.content !== undefined && d.content !== '')
388
+ dataDetails.push({ formField: { id: did }, content: String(d.content) });
389
+ else
390
+ continue;
391
+ defaultsApplied.push(dk || did);
392
+ }
393
+ // ② 轮次 interview_rounds(ebbrowser 关联字段,值=数据字典表记录 id,跨环境必变,运行时按名解析)。
394
+ // 2026-11-06 真机实测:defaultDetails 无该字段、viewLinkages 只有 hide/edit/readonly/required/show
395
+ // (无 value 赋值联动)、initDetails 为空 ⇒ 页面联动不可用,按用户裁定默认「第一轮」。
396
+ const roundsName = String(rounds || '第一轮').trim();
397
+ let roundsWarning = null;
398
+ const roundsFid = fid('interview_rounds');
399
+ if (roundsFid && !dataDetails.some((x) => String(x.formField.id) === String(roundsFid))) {
400
+ const hit = (cache.dict?.raw || []).find((r) => String(r.selection_name || '').trim() === roundsName
401
+ && ['one', 'two', 'three', 'four'].includes(String(r.browser_key || '')));
402
+ if (hit)
403
+ dataDetails.push({ formField: { id: roundsFid }, dataOptions: [{ optionId: String(hit.option_id), content: roundsName }] });
404
+ else
405
+ roundsWarning = '数据字典未找到轮次「' + roundsName + '」(browserKey one/two/three/four),已跳过该字段,不臆造';
406
+ }
365
407
  return {
366
408
  host: ctx.host,
367
409
  objId, formId, appId, dataDetails, cand, typeId, sessionId, interviewerId, isAI, layoutId,
@@ -377,6 +419,9 @@ async function buildPlan(opts) {
377
419
  aiPlan: isAI
378
420
  ? (aiPlanPicked ? aiPlanPicked.name + '(id=' + aiPlanPicked.id + ')' : '未选择(AI面试必填,需用户指定)')
379
421
  : '(非 AI 面试,不适用)',
422
+ rounds: roundsName,
423
+ defaultsApplied: defaultsApplied.length ? defaultsApplied : undefined,
424
+ roundsWarning: roundsWarning || undefined,
380
425
  isAIInterview: isAI,
381
426
  },
382
427
  };
@@ -457,8 +502,13 @@ async function resolveRequiredHint(plan, ctx) {
457
502
  // 人才卡片详情 URL(EB 详情页):{baseUrl}/sp/ebdpage/view/{ebdDetailPageId}?talentId={id}
458
503
  function resolveTalentCardUrl(ctx, talentId) {
459
504
  const pid = ctx.cache.ebdDetailPageId;
460
- if (!pid)
461
- return null;
505
+ if (!pid || !talentId) {
506
+ // 缓存缺 ebdDetailPageId(首次运行/换环境)时禁止返回 null:退化为 EB 卡片单页,
507
+ // objId 从环境缓存 talent_pool 取,跨环境动态解析,绝不写死。
508
+ const forms = ctx.cache.forms || {};
509
+ const tobj = String(forms.talent_pool?.objId || forms.talent?.objId || '');
510
+ return tobj && talentId ? buildCardUrl(ctx.baseUrl, tobj, String(talentId)) : null;
511
+ }
462
512
  return `${ctx.baseUrl}/sp/ebdpage/view/${pid}?talentId=${talentId}${talentLinkExtra(ctx.cache)}`;
463
513
  }
464
514
  // 面试管理列表 URL:优先环境缓存菜单,回退 allMenus 解析(别名匹配,跨环境不写死)
@@ -531,7 +581,8 @@ const baseInput = {
531
581
  positionId: { type: 'string', description: '应聘职位 id(简历池人才必填)' },
532
582
  interviewer: { type: 'string', description: '面试官姓名(缺省=当前登录用户)' },
533
583
  type: { type: 'string', description: '面试方式(现场面试/视频面试/电话面试/AI面试;含 AI 时邮箱与方案必填)' },
534
- session: { type: 'string', description: '面试轮次(初试/复试/…)' },
584
+ session: { type: 'string', description: '面试阶段(初试/复试/…)' },
585
+ rounds: { type: 'string', description: '面试轮次(第一轮/第二轮/第三轮/第四轮;缺省=页面默认值或第一轮,按数据字典运行时解析)' },
535
586
  start: { type: 'string', pattern: '^\\d{4}-\\d{1,2}-\\d{1,2}[ T]\\d{1,2}:\\d{2}$', description: '开始时间 YYYY-MM-DD HH:mm(缺省=当前时间)' },
536
587
  end: { type: 'string', pattern: '^\\d{4}-\\d{1,2}-\\d{1,2}[ T]\\d{1,2}:\\d{2}$', description: '结束时间(缺省=AI +7天 / 其它 +1小时)' },
537
588
  email: { type: 'string', description: '候选人邮箱(AI 面试必填;补录值优先于人才资料)' },
@@ -539,6 +590,9 @@ const baseInput = {
539
590
  };
540
591
  async function prepare(args, env) {
541
592
  const ctx = await makeCtx(env);
593
+ const perm = await probeCreatePermission(ctx.host, objIdOf(ctx.cache, 'interview_plan'));
594
+ if (perm === 'denied')
595
+ throw rsFail('当前账号没有「面试计划」表单的创建权限,已阻断(未写入任何数据)');
542
596
  const talentId = await locateTalentId(ctx, args);
543
597
  const auto = nowAndEnd(args.type || '现场面试');
544
598
  const startTime = args.start || auto.s;
@@ -552,6 +606,7 @@ async function prepare(args, env) {
552
606
  email: args.email ? String(args.email) : undefined,
553
607
  mobile: args.mobile ? String(args.mobile) : undefined,
554
608
  aiPlan: args.aiPlan ? String(args.aiPlan) : undefined,
609
+ rounds: args.rounds ? String(args.rounds) : undefined,
555
610
  });
556
611
  plan.host = ctx.host;
557
612
  const aiPlanCandidates = plan.isAI
@@ -574,7 +629,8 @@ async function prepare(args, env) {
574
629
  const willSubmit = { formId: plan.formId, objId: plan.objId, dataDetails: plan.dataDetails };
575
630
  const { createHash } = await import('node:crypto');
576
631
  const fp = createHash('sha256').update(JSON.stringify(willSubmit)).digest('hex');
577
- const continuation = await env.continuation.issue({ operation: 'recruit-stage.interview.arrange.apply', fingerprint: fp });
632
+ const continuation = await env.continuation.issue({ operation: 'recruit-stage.interview.arrange.apply', fingerprint: fp,
633
+ enumMaps: await dsOptionsSnapshot(), timeWindow: { start: String(startTime), end: String(endTime) } });
578
634
  return rsSuccess('recruit-stage.interview.arrange.prepare', {
579
635
  mode: 'prepare', ...plan.summary,
580
636
  needAiPlan: plan.isAI && !plan.aiPlanPicked,
@@ -597,11 +653,13 @@ async function apply(args, env) {
597
653
  if (!args.continuation)
598
654
  throw rsValidationError('continuation_required', '缺少 continuation(来自 prepare 的 meta)');
599
655
  const payload = await env.continuation.verify(String(args.continuation), 'recruit-stage.interview.arrange.apply');
656
+ restoreDsOptions(payload.enumMaps);
600
657
  const ctx = await makeCtx(env);
601
658
  const talentId = await locateTalentId(ctx, args);
602
659
  const auto = nowAndEnd(args.type || '现场面试');
603
- const startTime = args.start || auto.s;
604
- const endTime = args.end || (args.start ? (shiftTime(String(args.start), auto.isAI ? 7 * 24 * 3600 * 1000 : 3600 * 1000) || auto.e) : auto.e);
660
+ // prepare 已把时间窗口放进 continuation:apply 复用它,避免两次运行时刻不同导致 fingerprint 漂移
661
+ const startTime = args.start || payload.timeWindow?.start || auto.s;
662
+ const endTime = args.end || (args.start ? (shiftTime(String(args.start), auto.isAI ? 7 * 24 * 3600 * 1000 : 3600 * 1000) || auto.e) : (payload.timeWindow?.end || auto.e));
605
663
  const plan = await buildPlan({
606
664
  ctx, talentId,
607
665
  positionId: args.positionId ? String(args.positionId) : undefined,
@@ -611,6 +669,7 @@ async function apply(args, env) {
611
669
  email: args.email ? String(args.email) : undefined,
612
670
  mobile: args.mobile ? String(args.mobile) : undefined,
613
671
  aiPlan: args.aiPlan ? String(args.aiPlan) : undefined,
672
+ rounds: args.rounds ? String(args.rounds) : undefined,
614
673
  });
615
674
  plan.host = ctx.host;
616
675
  // AI 面试方案必填:未选定直接阻断,不落库、不执行动作链
@@ -629,17 +688,28 @@ async function apply(args, env) {
629
688
  name: '面试管理-' + plan.cand.name + ' ' + plan.summary.time, dataDetails: plan.dataDetails,
630
689
  });
631
690
  const actionsRun = await execSaveActions(plan, formDataId);
691
+ // 第三层门禁:写完回查关键字段(后端对无效 optionId 会静默丢弃仍返回 success)
692
+ // union_status 可能被动作链推进,只要求非空;其余字段严格比对提交值。
693
+ const verification = await verifySubmitted({
694
+ host: ctx.host, formId: plan.formId, objId: plan.objId, dataId: formDataId,
695
+ expected: expectedFields(plan.dataDetails, ctx.cache.fields[plan.objId] || {}, ['interview_type', 'interview_session', 'interview_rounds', 'digital_id', 'email', 'union_status'], ['union_status']),
696
+ });
697
+ if (verification.mismatches.length)
698
+ invalidateEnvCache(ctx.baseUrl, ctx.appId);
699
+ const verifyWarnings = verification.mismatches.map((m) => '落库回查不一致:' + m.label + ' 期望 ' + m.expected + ',实际 ' + m.actual + '(该字段可能未写入)');
632
700
  const detailUrl = buildCardUrl(ctx.baseUrl, plan.objId, formDataId);
633
- const listLocateUrl = buildListLocateUrl(ctx.baseUrl, ctx.appId, (ctx.cache.lists?.interview?.listId) || '', plan.objId, formDataId);
701
+ // 列表链接只打开列表;详情单页由 viewLink 单独给出,不再用「列表+滑出详情」组合地址。
702
+ const listLocateUrl = buildListUrl(ctx.baseUrl, (ctx.cache.lists?.interview?.listId) || '');
634
703
  return rsSuccess('recruit-stage.interview.arrange.apply', {
635
- mode: 'apply', result: 'success', interviewFormId: formDataId,
704
+ mode: 'apply', result: verification.mismatches.length ? 'partial' : 'success', interviewFormId: formDataId,
636
705
  interviewCardUrl: detailUrl,
637
706
  viewLink: detailUrl ? `[查看 ${plan.cand.name || ''} 的面试安排详情](${detailUrl})` : null,
638
- listLocateLink: listLocateUrl ? `[打开面试管理列表(已定位本次面试安排)](${listLocateUrl})` : null,
639
- agentNote: '产物 = 两个 Markdown 链接(平台实证可点击):① viewLink 面试安排详情页 ② listLocateLink 面试管理列表并右侧滑出本次面试安排;按顺序原样放回答正文,缺哪个只给另一个、不输出半截。不要包 browsertool / <artifact> 标签。',
707
+ listLocateLink: listLocateUrl ? `[打开面试管理列表](${listLocateUrl})` : null,
708
+ agentNote: '产物 = 两个 Markdown 链接(平台实证可点击):① viewLink 面试安排详情单页 ② listLocateLink 面试管理列表(只打开列表,不打开详情)。按顺序原样放回答正文,缺哪个只给另一个、不输出半截。不要包 browsertool / <artifact> 标签。',
640
709
  aiPlan: plan.isAI && plan.aiPlanPicked ? { id: plan.aiPlanPicked.id, name: plan.aiPlanPicked.name } : undefined,
641
710
  saveActions: actionsRun.executed,
642
- warnings: actionsRun.warnings,
711
+ verification: { checked: verification.checked, mismatches: verification.mismatches, unavailable: verification.unavailable || null },
712
+ warnings: [...(actionsRun.warnings || []), ...verifyWarnings],
643
713
  assigned: actionsRun.assigned || {},
644
714
  });
645
715
  }
@@ -653,7 +723,7 @@ async function prefill(args, env) {
653
723
  const typeFid = fields.interview_type;
654
724
  if (!typeFid)
655
725
  throw rsFail('面试计划缺少字段 interview_type(ds/fields 解析不到)');
656
- const typeMap = cachedDsMap(ctx.cache, objId, 'interview_type') || await getDsOptions(ctx.host, objId, typeFid, ctx.appId);
726
+ const typeMap = await getDsOptions(ctx.host, objId, typeFid);
657
727
  const typeId = typeMap[typeKey];
658
728
  if (!typeId)
659
729
  throw rsFail('面试方式「' + typeKey + '」不在枚举中(' + Object.keys(typeMap).join('/') + ')');
@@ -1,6 +1,6 @@
1
1
  import { rsSuccess, schemaOf } from './types.js';
2
2
  import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
3
- import { objIdOf, formIdOf, saveFormData, runEsb, getDsOptions, cachedDsMap, getFormButtonsForData, findSubmitButton, analyzeButtonActions, getFormDataRecord, toSubmitDetails, randHex32, } from '../shared.js';
3
+ import { objIdOf, formIdOf, saveFormData, runEsb, getDsOptions, getFormButtonsForData, findSubmitButton, analyzeButtonActions, getFormDataRecord, toSubmitDetails, randHex32, dsOptionsSnapshot, restoreDsOptions, } from '../shared.js';
4
4
  // InterviewStatusEnum.INVALID(已失效):系统反馈按钮(填写/编辑/代评价)均要求非此状态
5
5
  const INVALID_STATUS_ID = '841052191228968977';
6
6
  const R = (v) => String(v ?? '').replace(/^<p>|<\/p>$/g, '').trim();
@@ -110,7 +110,7 @@ async function prepare(args, env) {
110
110
  // result optionId
111
111
  let newOptionId = null;
112
112
  if (args.result) {
113
- const opts = cachedDsMap(t.cache, t.objId, 'result') || await getDsOptions(t.host, t.objId, t.resultFid, t.appId);
113
+ const opts = await getDsOptions(t.host, t.objId, t.resultFid);
114
114
  newOptionId = opts[String(args.result)];
115
115
  if (!newOptionId)
116
116
  throw rsFail('未识别的面试结果「' + args.result + '」,可选:' + Object.keys(opts).join('/'));
@@ -120,7 +120,8 @@ async function prepare(args, env) {
120
120
  const willSubmit = { feedbackId: String(t.target.feedbackId), result: newResultName, comment: newComment };
121
121
  const { createHash } = await import('node:crypto');
122
122
  const fp = createHash('sha256').update(JSON.stringify(willSubmit)).digest('hex');
123
- const continuation = await env.continuation.issue({ operation: 'recruit-stage.interview.feedback.edit.apply', fingerprint: fp });
123
+ const continuation = await env.continuation.issue({ operation: 'recruit-stage.interview.feedback.edit.apply', fingerprint: fp,
124
+ enumMaps: await dsOptionsSnapshot() });
124
125
  return rsSuccess('recruit-stage.interview.feedback.edit.prepare', {
125
126
  mode: 'prepare',
126
127
  talentId: t.talentId,
@@ -146,13 +147,14 @@ async function apply(args, env) {
146
147
  if (!args.continuation)
147
148
  throw rsValidationError('continuation_required', '缺少 continuation(来自 prepare 的 meta)');
148
149
  const payload = await env.continuation.verify(String(args.continuation), 'recruit-stage.interview.feedback.edit.apply');
150
+ restoreDsOptions(payload.enumMaps);
149
151
  const t = await buildTarget(env, args);
150
152
  // 重新取最新 updateTimeStamp(乐观锁)
151
153
  const rec2 = await getFormDataRecord(t.host, t.formId, String(t.target.feedbackId), t.objId);
152
154
  const details2 = toSubmitDetails(rec2.dataDetails);
153
155
  let newOptionId = null;
154
156
  if (args.result) {
155
- const opts = cachedDsMap(t.cache, t.objId, 'result') || await getDsOptions(t.host, t.objId, t.resultFid, t.appId);
157
+ const opts = await getDsOptions(t.host, t.objId, t.resultFid);
156
158
  newOptionId = opts[String(args.result)];
157
159
  if (!newOptionId)
158
160
  throw rsFail('未识别的面试结果「' + args.result + '」,可选:' + Object.keys(opts).join('/'));