weaver-work-cli 0.1.42 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/README.md +17 -0
  2. package/dist/chunks/{archive-J4I6MCKF.js → archive-P6TBQGKL.js} +13 -5
  3. package/dist/chunks/{archive-oa-BRZKKTO4.js → archive-oa-7TQ2NXOH.js} +12 -5
  4. package/dist/chunks/{asset-L7D4FAOZ.js → asset-3ELRG37G.js} +11 -4
  5. package/dist/chunks/{asset-idle-DADLLV75.js → asset-idle-WIGMUFMD.js} +7 -3
  6. package/dist/chunks/{attachment-content-K4C7VLWQ.js → attachment-content-E3276UOV.js} +5 -4
  7. package/dist/chunks/{blog-BVGQ7NZL.js → blog-C5NMZAAC.js} +11 -4
  8. package/dist/chunks/{caizhilian-SAADNFD6.js → caizhilian-5XSM2DFP.js} +13 -6
  9. package/dist/chunks/{calendar-Q7NQY5Z2.js → calendar-FI2WNSBO.js} +12 -5
  10. package/dist/chunks/{chunk-YRSZQUD2.js → chunk-3YBDYOC4.js} +3 -3
  11. package/dist/chunks/{chunk-OOUTBLZ4.js → chunk-56EZERK4.js} +1 -1
  12. package/dist/chunks/chunk-6N4JPNFL.js +76 -0
  13. package/dist/chunks/{chunk-ZUX3P6BQ.js → chunk-727FH2NI.js} +1 -1
  14. package/dist/chunks/chunk-7BDPM5ST.js +11 -0
  15. package/dist/chunks/{chunk-EKWAQSLU.js → chunk-BCVYBYYT.js} +432 -2248
  16. package/dist/chunks/{chunk-W7BEHOSR.js → chunk-CWYGFU5B.js} +2 -2
  17. package/dist/chunks/{chunk-NOODWMCL.js → chunk-D4ADSZ7H.js} +1 -1
  18. package/dist/chunks/{chunk-SA6VBIHY.js → chunk-ETNJSKMM.js} +214 -16
  19. package/dist/chunks/{chunk-BBKDXQEC.js → chunk-F4E4EM35.js} +3 -3
  20. package/dist/chunks/{chunk-IZ7S7QUS.js → chunk-FAZTGX7S.js} +6 -6
  21. package/dist/chunks/{chunk-NKZRQXST.js → chunk-FRZKBMSW.js} +52 -36
  22. package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
  23. package/dist/chunks/{chunk-GEWYMQME.js → chunk-GAMZLAG2.js} +1 -1
  24. package/dist/chunks/{chunk-R4CHUSKC.js → chunk-GM6J7Q4B.js} +4 -4
  25. package/dist/chunks/{chunk-APVFJUQH.js → chunk-GRDRG6HP.js} +3 -3
  26. package/dist/chunks/{chunk-LDZQPUIA.js → chunk-HIT4Y6OI.js} +1 -1
  27. package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
  28. package/dist/chunks/{chunk-LADPYOWC.js → chunk-IAZ3UPY6.js} +3 -3
  29. package/dist/chunks/{chunk-ZEDWSH32.js → chunk-IC62NFM5.js} +1 -1
  30. package/dist/chunks/{chunk-P26ZWSKU.js → chunk-KIHNAS25.js} +5 -2
  31. package/dist/chunks/{chunk-BIPYLLVS.js → chunk-N4M2DDFE.js} +15 -15
  32. package/dist/chunks/{chunk-QKNKR4RH.js → chunk-OF4S23UB.js} +4 -4
  33. package/dist/chunks/{chunk-JPRO6ER2.js → chunk-PC7VKEB5.js} +57 -60
  34. package/dist/chunks/{chunk-4PD5NWAX.js → chunk-PUQS5MWL.js} +2 -2
  35. package/dist/chunks/{chunk-2LV74IWP.js → chunk-Q4OYAQYH.js} +1 -1
  36. package/dist/chunks/{chunk-72CKAUAG.js → chunk-QVSWRLLU.js} +7 -5
  37. package/dist/chunks/{chunk-4RAE6JXP.js → chunk-TA7FXXJD.js} +6 -3
  38. package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
  39. package/dist/chunks/{chunk-FOAA27U5.js → chunk-UFIT2UU3.js} +16 -4
  40. package/dist/chunks/{chunk-LUSPKZKY.js → chunk-UG5G54VL.js} +1 -0
  41. package/dist/chunks/{chunk-NIAJ5ZCG.js → chunk-UL5XUQ25.js} +5 -2
  42. package/dist/chunks/{chunk-FMPJJYYI.js → chunk-WRXSAVKO.js} +1 -1
  43. package/dist/chunks/{chunk-G4UR6NXN.js → chunk-WSF4NNMR.js} +3 -3
  44. package/dist/chunks/chunk-XHK4MDR5.js +2497 -0
  45. package/dist/chunks/{chunk-3KTFS4IA.js → chunk-XNIK66I4.js} +19 -9
  46. package/dist/chunks/{chunk-3SO6QL6U.js → chunk-YWX377BY.js} +5 -2
  47. package/dist/chunks/{chunk-BYATLLEF.js → chunk-Z3GDFVJR.js} +1 -1
  48. package/dist/chunks/{chunk-GHXCDPTM.js → chunk-Z7VYWPZV.js} +1 -1
  49. package/dist/chunks/{conflict-F2OMZRTO.js → conflict-ARLSZJ6V.js} +4 -3
  50. package/dist/chunks/{continuation-2CKSBLA6.js → continuation-3S37AUSH.js} +4 -3
  51. package/dist/chunks/{continuation-RN6PZN2M.js → continuation-3XLYYTKV.js} +4 -3
  52. package/dist/chunks/{continuation-HZIZRZBX.js → continuation-HFW2YT5S.js} +4 -3
  53. package/dist/chunks/{continuation-NLECEJPX.js → continuation-KI7DRRZN.js} +4 -3
  54. package/dist/chunks/{contract-5BETHRSG.js → contract-DNIIW5VJ.js} +13 -5
  55. package/dist/chunks/{cowork-3MN6EQQO.js → cowork-GMLRGVIW.js} +11 -4
  56. package/dist/chunks/{create-flow-5FQNNMVO.js → create-flow-J22BO65E.js} +8 -7
  57. package/dist/chunks/{ebuilder-form-SBHOYBUD.js → ebuilder-form-ANV2FHYV.js} +12 -7
  58. package/dist/chunks/{ehr-KMOJULKG.js → ehr-GSTGAIY3.js} +266 -24
  59. package/dist/chunks/{employee-SAK2QYXX.js → employee-22BGJ3QS.js} +3 -3
  60. package/dist/chunks/{env-LB7NBL2O.js → env-BX3VRFS7.js} +4 -3
  61. package/dist/chunks/{esb-W2PJCFCX.js → esb-ATAIASX2.js} +12 -7
  62. package/dist/chunks/{factory-6ZFQXQ46.js → factory-PETTFME6.js} +3 -2
  63. package/dist/chunks/{fna-ZQPCUV4R.js → fna-YEKBSFSX.js} +14 -8
  64. package/dist/chunks/{group-chat-2HHAJN46.js → group-chat-BFVXAYFX.js} +5 -4
  65. package/dist/chunks/{host-ATKVNZAT.js → host-HRBXEPDQ.js} +5 -5
  66. package/dist/chunks/{host-BQH22NTQ.js → host-LR55CTHP.js} +5 -5
  67. package/dist/chunks/{host-X2CSLFM6.js → host-SUOY6VYQ.js} +5 -5
  68. package/dist/chunks/{host-4CBHGOHT.js → host-SZGV4UNT.js} +5 -5
  69. package/dist/chunks/{host-YTODKMSL.js → host-WIKN2EJ5.js} +5 -5
  70. package/dist/chunks/{hrm-FFM4UJFS.js → hrm-NRDO4W5G.js} +11 -7
  71. package/dist/chunks/{im-VEHKDQPB.js → im-IQ2HN23S.js} +8 -7
  72. package/dist/chunks/{invoice-LVIKSIIF.js → invoice-MNRW76PP.js} +636 -1768
  73. package/dist/chunks/{jiuchuanhui-X6DINO5P.js → jiuchuanhui-DTRBAX4N.js} +14 -6
  74. package/dist/chunks/{lazy-dispatch-KSWTN5L6.js → lazy-dispatch-ZVWAI25B.js} +7 -6
  75. package/dist/chunks/{mail-VDKRGUD3.js → mail-ZVAUXOJA.js} +16 -14
  76. package/dist/chunks/{meeting-CLC6HP3Z.js → meeting-FEVPZ67S.js} +21 -14
  77. package/dist/chunks/{okr-CHG4OO3U.js → okr-SDH3E5RA.js} +12 -5
  78. package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
  79. package/dist/chunks/{plan-XWR75667.js → plan-E35JFDI7.js} +12 -5
  80. package/dist/chunks/{project-5BXOOKMG.js → project-73QXBAB2.js} +11 -4
  81. package/dist/chunks/reception-UWZVACBN.js +1899 -0
  82. package/dist/chunks/{recruit-stage-DGMFNNDE.js → recruit-stage-4MAOCKFY.js} +320 -57
  83. package/dist/chunks/registry-IM5G23LS.js +24 -0
  84. package/dist/chunks/{registry-RHMW6ANW.js → registry-JDUS4E7D.js} +7 -6
  85. package/dist/chunks/{registry-7FFOXIAW.js → registry-KNKSCJNT.js} +7 -6
  86. package/dist/chunks/{registry-Z43434VG.js → registry-PO7SI256.js} +4 -4
  87. package/dist/chunks/{registry-OZSMDVPP.js → registry-PVUZQDDQ.js} +3 -3
  88. package/dist/chunks/{room-recommend-62H7ZQQ6.js → room-recommend-H7KLXA5R.js} +6 -5
  89. package/dist/chunks/{schedule-FNXKH3DQ.js → schedule-ESZIBAUO.js} +6 -5
  90. package/dist/chunks/{workflow-ADHKCAJK.js → workflow-CWJFJLQU.js} +13 -8
  91. package/dist/cmd/action.js +6 -0
  92. package/dist/cmd/identity/index.js +45 -0
  93. package/dist/cmd/index.js +2 -0
  94. package/dist/core/continuation-ttl.js +18 -0
  95. package/dist/core/error-codes.js +85 -0
  96. package/dist/core/logger.js +11 -0
  97. package/dist/index.js +37 -31
  98. package/dist/internal/e10/auth/commands.js +163 -8
  99. package/dist/internal/e10/auth/error-log.js +182 -0
  100. package/dist/internal/e10/auth/session.js +17 -3
  101. package/dist/internal/e10/auth-recovery.js +39 -12
  102. package/dist/internal/e10/context.js +17 -2
  103. package/dist/internal/skills/install.js +9 -1
  104. package/dist/shortcuts/archive/continuation.js +2 -1
  105. package/dist/shortcuts/archive/index.js +3 -0
  106. package/dist/shortcuts/archive/operations/confirm.js +2 -1
  107. package/dist/shortcuts/archive-oa/continuation.js +2 -1
  108. package/dist/shortcuts/archive-oa/index.js +2 -0
  109. package/dist/shortcuts/archive-oa/operations/confirm.js +2 -1
  110. package/dist/shortcuts/asset/continuation.js +2 -1
  111. package/dist/shortcuts/asset/index.js +2 -0
  112. package/dist/shortcuts/asset-idle/index.js +2 -0
  113. package/dist/shortcuts/blog/continuation.js +2 -1
  114. package/dist/shortcuts/blog/index.js +2 -0
  115. package/dist/shortcuts/caizhilian/continuation.js +2 -1
  116. package/dist/shortcuts/caizhilian/index.js +2 -0
  117. package/dist/shortcuts/caizhilian/operations/confirm.js +3 -2
  118. package/dist/shortcuts/calendar/continuation.js +2 -1
  119. package/dist/shortcuts/calendar/index.js +2 -0
  120. package/dist/shortcuts/calendar/operations/write.js +1 -1
  121. package/dist/shortcuts/contract/continuation.js +2 -1
  122. package/dist/shortcuts/contract/index.js +2 -0
  123. package/dist/shortcuts/contract/operations/write.js +2 -1
  124. package/dist/shortcuts/cowork/continuation.js +2 -1
  125. package/dist/shortcuts/cowork/index.js +2 -0
  126. package/dist/shortcuts/ebuilder-form/continuation.js +2 -1
  127. package/dist/shortcuts/ebuilder-form/index.js +2 -0
  128. package/dist/shortcuts/ebuilder-form/operations/write.js +3 -2
  129. package/dist/shortcuts/ehr/continuation.js +2 -1
  130. package/dist/shortcuts/ehr/index.js +2 -0
  131. package/dist/shortcuts/ehr/operations/attend-write.js +1 -1
  132. package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +182 -3
  133. package/dist/shortcuts/ehr/operations/recruit-position.js +134 -2
  134. package/dist/shortcuts/ehr/operations/recruit-write.js +1 -1
  135. package/dist/shortcuts/esb/continuation.js +2 -1
  136. package/dist/shortcuts/esb/index.js +2 -0
  137. package/dist/shortcuts/esb/operations/trigger.js +2 -1
  138. package/dist/shortcuts/fna/continuation.js +2 -1
  139. package/dist/shortcuts/fna/index.js +2 -0
  140. package/dist/shortcuts/fna/operations/invoice-writeoff.js +1 -1
  141. package/dist/shortcuts/fna/operations/loan.js +1 -1
  142. package/dist/shortcuts/hrm/index.js +2 -0
  143. package/dist/shortcuts/im/continuation.js +2 -1
  144. package/dist/shortcuts/index.js +5 -0
  145. package/dist/shortcuts/invoice/continuation.js +2 -1
  146. package/dist/shortcuts/invoice/index.js +14 -15
  147. package/dist/shortcuts/invoice/invoice-record.js +93 -0
  148. package/dist/shortcuts/invoice/manifest.js +190 -393
  149. package/dist/shortcuts/invoice/operations/add.js +2 -1
  150. package/dist/shortcuts/invoice/operations/delete.js +2 -1
  151. package/dist/shortcuts/invoice/operations/import.js +2 -1
  152. package/dist/shortcuts/invoice/operations/issuing-contract-detail.js +86 -0
  153. package/dist/shortcuts/invoice/operations/issuing-contracts.js +210 -0
  154. package/dist/shortcuts/invoice/operations/registry.js +17 -17
  155. package/dist/shortcuts/invoice/operations/reim-auto.js +4 -569
  156. package/dist/shortcuts/invoice/operations/reim.js +52 -341
  157. package/dist/shortcuts/invoice/operations/shared.js +21 -4
  158. package/dist/shortcuts/invoice/operations/update.js +2 -1
  159. package/dist/shortcuts/invoice/projection.js +10 -62
  160. package/dist/shortcuts/jiuchuanhui/continuation.js +2 -1
  161. package/dist/shortcuts/jiuchuanhui/index.js +2 -0
  162. package/dist/shortcuts/jiuchuanhui/operations/datajson.js +2 -1
  163. package/dist/shortcuts/jiuchuanhui/operations/esb.js +2 -1
  164. package/dist/shortcuts/mail/continuation.js +2 -1
  165. package/dist/shortcuts/mail/index.js +2 -0
  166. package/dist/shortcuts/mail/operations/mail-blacklist.js +1 -1
  167. package/dist/shortcuts/mail/operations/mail-contacts.js +1 -1
  168. package/dist/shortcuts/mail/operations/mail-send.js +1 -1
  169. package/dist/shortcuts/mail/operations/mail-sign.js +1 -1
  170. package/dist/shortcuts/mail/operations/mail-template.js +1 -1
  171. package/dist/shortcuts/meeting/continuation.js +2 -1
  172. package/dist/shortcuts/meeting/index.js +2 -0
  173. package/dist/shortcuts/meeting/operations/change.js +1 -1
  174. package/dist/shortcuts/meeting/operations/create.js +1 -1
  175. package/dist/shortcuts/meeting/operations/eb/create-flow.js +16 -7
  176. package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
  177. package/dist/shortcuts/meeting/operations/eb/factory.js +1 -1
  178. package/dist/shortcuts/meeting/operations/lifecycle.js +1 -1
  179. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  180. package/dist/shortcuts/meeting/operations/signs.js +1 -1
  181. package/dist/shortcuts/okr/continuation.js +2 -1
  182. package/dist/shortcuts/okr/index.js +2 -0
  183. package/dist/shortcuts/okr/operations/write.js +1 -1
  184. package/dist/shortcuts/plan/continuation.js +2 -1
  185. package/dist/shortcuts/plan/index.js +2 -0
  186. package/dist/shortcuts/plan/operations/write.js +1 -1
  187. package/dist/shortcuts/project/continuation.js +2 -1
  188. package/dist/shortcuts/project/index.js +2 -0
  189. package/dist/shortcuts/reception/constants.js +53 -0
  190. package/dist/shortcuts/reception/errors.js +54 -0
  191. package/dist/shortcuts/reception/host.js +125 -0
  192. package/dist/shortcuts/reception/index.js +198 -0
  193. package/dist/shortcuts/reception/manifest.js +177 -0
  194. package/dist/shortcuts/reception/operations/ask.js +71 -0
  195. package/dist/shortcuts/reception/operations/browsertool.js +58 -0
  196. package/dist/shortcuts/reception/operations/compose.js +129 -0
  197. package/dist/shortcuts/reception/operations/customparams.js +74 -0
  198. package/dist/shortcuts/reception/operations/doc.js +238 -0
  199. package/dist/shortcuts/reception/operations/docrender.js +36 -0
  200. package/dist/shortcuts/reception/operations/panels.js +179 -0
  201. package/dist/shortcuts/reception/operations/registry.js +26 -0
  202. package/dist/shortcuts/reception/operations/render-assets.js +184 -0
  203. package/dist/shortcuts/reception/operations/render.js +123 -0
  204. package/dist/shortcuts/reception/operations/runs.js +38 -0
  205. package/dist/shortcuts/reception/operations/schedule.js +127 -0
  206. package/dist/shortcuts/reception/operations/shared.js +196 -0
  207. package/dist/shortcuts/reception/operations/snapshot.js +68 -0
  208. package/dist/shortcuts/reception/operations/types.js +1 -0
  209. package/dist/shortcuts/reception/operations.js +33 -0
  210. package/dist/shortcuts/reception/upload.js +218 -0
  211. package/dist/shortcuts/recruit-stage/context.js +145 -33
  212. package/dist/shortcuts/recruit-stage/continuation.js +2 -1
  213. package/dist/shortcuts/recruit-stage/operations/jd-create.js +106 -17
  214. package/dist/shortcuts/recruit-stage/operations/resume-import.js +166 -10
  215. package/dist/shortcuts/workflow/continuation.js +2 -1
  216. package/dist/shortcuts/workflow/index.js +2 -0
  217. package/dist/shortcuts/workflow/operations/form.js +32 -8
  218. package/dist/shortcuts/workflow/operations/write.js +1 -1
  219. package/docs/_catalog.md +3 -0
  220. package/docs/agent-invoice.md +1 -1
  221. package/docs/archive-oa.md +1 -1
  222. package/docs/caizhilian.md +1 -1
  223. package/docs/calendar.md +1 -1
  224. package/docs/contract.md +1 -1
  225. package/docs/e10-auth.md +16 -0
  226. package/docs/ehr.md +2 -2
  227. package/docs/esb.md +1 -1
  228. package/docs/im.md +1 -1
  229. package/docs/invoice.md +8 -12
  230. package/docs/okr.md +1 -1
  231. package/docs/reception.md +119 -0
  232. package/package.json +1 -1
  233. package/scripts/clean.mjs +43 -2
  234. package/skill-template/business-info.json +18 -2
  235. package/skill-template/domains/caizhilian.md +1 -1
  236. package/skill-template/domains/reception-flow.md +18 -0
  237. package/skill-template/domains/yepiaotong.md +4 -7
  238. package/skills/weaver-e10-archive-oa/references/source-manifest.json +14 -14
  239. package/skills/weaver-e10-blog/references/blog-publish.md +1 -1
  240. package/skills/weaver-e10-blog/references/source-manifest.json +7 -7
  241. package/skills/weaver-e10-caizhilian/references/source-manifest.json +21 -21
  242. package/skills/weaver-e10-caizhilian/references/write-protocol.md +2 -2
  243. package/skills/weaver-e10-calendar/references/calendar-write.md +1 -1
  244. package/skills/weaver-e10-cowork/SKILL.md +1 -1
  245. package/skills/weaver-e10-ebuilder-form/SKILL.md +1 -1
  246. package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -1
  247. package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -1
  248. package/skills/weaver-e10-esb/SKILL.md +2 -2
  249. package/skills/weaver-e10-esb/references/source-manifest.json +22 -22
  250. package/skills/weaver-e10-esb/references/trigger.md +2 -2
  251. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
  252. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +1 -1
  253. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +1 -1
  254. package/skills/weaver-e10-jinchengda/references/source-manifest.json +29 -29
  255. package/skills/weaver-e10-jucailin/SKILL.md +1 -1
  256. package/skills/weaver-e10-jucailin/references/attend-write.md +2 -2
  257. package/skills/weaver-e10-jucailin/references/recruit-create.md +12 -3
  258. package/skills/weaver-e10-jucailin/references/recruit-write.md +1 -1
  259. package/skills/weaver-e10-meeting/SKILL.md +8 -6
  260. package/skills/weaver-e10-meeting/references/meeting-change.md +1 -1
  261. package/skills/weaver-e10-meeting/references/meeting-create.md +1 -1
  262. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +1 -1
  263. package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
  264. package/skills/weaver-e10-okr/references/okr-align.md +1 -1
  265. package/skills/weaver-e10-okr/references/okr-keyresult.md +1 -1
  266. package/skills/weaver-e10-okr/references/okr-write.md +1 -1
  267. package/skills/weaver-e10-okr/references/source-manifest.json +8 -8
  268. package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
  269. package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
  270. package/skills/weaver-e10-qiyecheng/references/loan-management.md +1 -1
  271. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +18 -18
  272. package/skills/weaver-e10-reception-flow/SKILL.md +173 -0
  273. package/skills/weaver-e10-reception-flow/assets//350/241/214/347/250/213/345/215/225/346/250/241/346/235/277-/346/263/233/345/276/256.docx +0 -0
  274. package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +213 -0
  275. package/skills/weaver-e10-reception-flow/references/browsertool.md +68 -0
  276. package/skills/weaver-e10-reception-flow/references/env-pitfalls.md +51 -0
  277. package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +227 -0
  278. package/skills/weaver-e10-reception-flow/references/guide.md +179 -0
  279. package/skills/weaver-e10-reception-flow/scripts/locate.sh +14 -0
  280. package/skills/weaver-e10-reception-flow/scripts/render.py +724 -0
  281. package/skills/weaver-e10-recruit-stage/SKILL.md +9 -5
  282. package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +1 -1
  283. package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +66 -0
  284. package/skills/weaver-e10-recruit-stage/references/position-templates.md +202 -0
  285. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +22 -0
  286. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +14 -1
  287. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +6 -0
  288. package/skills/weaver-e10-shijingran/SKILL.md +5 -5
  289. package/skills/weaver-e10-shijingran/references/source-manifest.json +37 -36
  290. package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +2 -0
  291. package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
  292. package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
  293. package/skills/weaver-e10-yepiaotong/SKILL.md +19 -26
  294. package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +13 -10
  295. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +2 -0
  296. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +194 -155
  297. package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +28 -32
  298. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +5 -1
  299. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +8 -10
  300. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +211 -616
  301. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +149 -117
  302. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +17 -20
  303. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +20 -39
  304. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +55 -22
  305. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -17
  306. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +88 -92
  307. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +144 -354
  308. package/skills/weaver-e10-yimiaoban/SKILL.md +1 -1
  309. package/skills/weaver-e10-yimiaoban/references/msg-write.md +1 -1
  310. package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
  311. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +7 -7
  312. package/dist/chunks/chunk-TTPJJJC4.js +0 -465
  313. package/dist/chunks/registry-BKBZPBAJ.js +0 -23
  314. package/dist/shortcuts/invoice/markdown.js +0 -172
  315. package/dist/shortcuts/invoice/operations/issuing-qys.js +0 -424
  316. package/skills/weaver-e10-meeting.zip +0 -0
  317. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +0 -131
  318. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +0 -179
@@ -1,5 +1,5 @@
1
+ import { FULL_EXT_MASK } from './invoice-record.js';
1
2
  import { DETAIL_ITEM_FIELDS, OUTPUT_VIEWS, SUMMARY_ITEM_FIELDS } from './projection.js';
2
- import { OUTPUT_FORMATS } from './markdown.js';
3
3
  function objectSchema(properties, required = [], additionalProperties = false) {
4
4
  return {
5
5
  type: 'object',
@@ -35,10 +35,15 @@ function epochEndDateProperty(label) {
35
35
  }
36
36
  const listProperties = {
37
37
  page_size: { type: 'integer', minimum: 1, maximum: 200 },
38
- start_pos: { type: 'integer', minimum: 0 },
38
+ start_pos: { type: 'integer', minimum: 0, description: '服务端分页偏移。翻页时按 page_size 递增,不要按返回的 items 条数递增(items 已剔除全额红冲票,可能不满一页)。' },
39
39
  req_type: { type: 'integer', enum: [0, 1, 7, 8] },
40
40
  mask: { type: 'integer', minimum: 0 },
41
- mext: { type: 'integer', minimum: 0 },
41
+ mext: {
42
+ type: 'integer',
43
+ minimum: 0,
44
+ default: FULL_EXT_MASK,
45
+ description: `按位选择返回哪些 ext 字段(1=trate、2=ttax …);不传按 ${FULL_EXT_MASK} 返回完整 ext(费用说明、城市、备注、起止地等),传 0 不返回 ext。`,
46
+ },
42
47
  content: { type: 'string' },
43
48
  types: { type: 'array', items: { type: 'integer' } },
44
49
  date_begin: epochDateProperty('开票日期起(含)'),
@@ -90,94 +95,6 @@ const listProperties = {
90
95
  const positiveId = { type: 'string', pattern: '^[1-9]\\d*$' };
91
96
  const positiveIdArray = { type: 'array', minItems: 1, maxItems: 100, items: positiveId };
92
97
  const jsonObject = { type: 'object', additionalProperties: true };
93
- const reimFieldValue = {
94
- type: 'object',
95
- additionalProperties: false,
96
- properties: {
97
- fieldId: { type: 'string', minLength: 1 },
98
- fieldName: { type: 'string' },
99
- value: {},
100
- optionValue: {},
101
- unable_to_fill: { type: 'boolean' },
102
- need_search: { type: 'boolean' },
103
- },
104
- required: ['fieldId'],
105
- };
106
- const reimNeedUserConfirm = {
107
- type: 'object',
108
- additionalProperties: false,
109
- properties: {
110
- fieldId: { type: 'string', minLength: 1 },
111
- fieldName: { type: 'string' },
112
- dataIndex: { type: ['integer', 'null'], minimum: 1 },
113
- reason: { type: 'string', minLength: 1 },
114
- candidates: {
115
- type: 'array',
116
- items: {
117
- type: 'object',
118
- additionalProperties: true,
119
- properties: {
120
- id: { type: 'string', minLength: 1 },
121
- name: { type: 'string' },
122
- },
123
- },
124
- },
125
- },
126
- required: ['fieldId', 'reason'],
127
- };
128
- const reimUnableToFill = {
129
- type: 'object',
130
- additionalProperties: false,
131
- properties: {
132
- fieldId: { type: 'string', minLength: 1 },
133
- fieldName: { type: 'string' },
134
- dataIndex: { type: ['integer', 'null'], minimum: 1 },
135
- reason: { type: 'string', minLength: 1 },
136
- },
137
- required: ['fieldId', 'reason'],
138
- };
139
- const reimDetailRow = {
140
- type: 'object',
141
- additionalProperties: false,
142
- properties: {
143
- dataIndex: { type: 'integer', minimum: 1 },
144
- subFormId: { type: 'string', minLength: 1 },
145
- invoiceId: { type: 'string', minLength: 1 },
146
- fields: { type: 'array', items: reimFieldValue },
147
- },
148
- required: ['dataIndex', 'subFormId', 'invoiceId', 'fields'],
149
- };
150
- const reimFlowCreateProperties = {
151
- work_flow_id: { type: 'string', minLength: 1, description: '目标报销流程的工作流 ID。' },
152
- mainFormId: { type: 'string', minLength: 1, description: '报销单主表 formId,来自 invoice.reim.form.structure。' },
153
- request_name: { type: 'string', minLength: 1, description: '流程标题。' },
154
- main_fields: { type: 'array', items: reimFieldValue, description: '主表字段值列表。' },
155
- detail_rows: { type: 'array', minItems: 1, items: reimDetailRow, description: '明细表行数据。' },
156
- need_user_confirm: { type: 'array', items: reimNeedUserConfirm, description: '需用户确认的字段。' },
157
- unable_to_fill: { type: 'array', items: reimUnableToFill, description: '无法自动填写的字段。' },
158
- };
159
- const reimFlowCreateRequired = ['work_flow_id', 'mainFormId', 'request_name', 'main_fields', 'detail_rows'];
160
- const reimFlowUpdateProperties = {
161
- requestId: { type: 'string', minLength: 1, description: '要更新的流程 requestId。' },
162
- mainFormId: { type: 'string', minLength: 1, description: '报销单主表 formId。' },
163
- main_fields: { type: 'array', minItems: 1, items: reimFieldValue, description: '需要更新的主表字段列表。' },
164
- detail_rows: { type: 'array', minItems: 1, items: reimDetailRow, description: '需要更新或新增的明细行数据。' },
165
- deleteDetailRows: {
166
- type: 'array',
167
- minItems: 1,
168
- items: {
169
- type: 'object',
170
- additionalProperties: true,
171
- properties: {
172
- detailId: { type: 'string', minLength: 1 },
173
- dataIndex: { type: 'integer', minimum: 1 },
174
- },
175
- },
176
- description: '需要删除的明细行。',
177
- },
178
- need_user_confirm: { type: 'array', items: reimNeedUserConfirm, description: '需用户确认的字段。' },
179
- unable_to_fill: { type: 'array', items: reimUnableToFill, description: '无法自动填写的字段。' },
180
- };
181
98
  const rawValue = { description: '服务端原始字段,类型随接口返回而定。' };
182
99
  const rawObject = objectSchema({}, [], true);
183
100
  const rawArray = arrayOf(rawObject);
@@ -335,12 +252,30 @@ const resultEnvelopeOutput = (dataSchema = rawValue) => objectSchema({
335
252
  data: dataSchema,
336
253
  workflow: workflowSchema,
337
254
  }, ['result', 'data', 'workflow']);
255
+ const extInfoSchema = objectSchema({
256
+ expenseNote: { type: 'string', description: '费用说明(ext.expenseDesc),如「上海-武汉」' },
257
+ content: { type: 'string', description: '消费内容(ext.content;为空时取 ext.products[].name)' },
258
+ city: { type: 'string', description: '城市(ext.city)' },
259
+ province: { type: 'string', description: '省份(ext.province,为空时取票面 province)' },
260
+ comment: { type: 'string', description: '备注(ext.comment),常写出差地、订单号和行程' },
261
+ from: { type: 'string', description: '出发地(ext.from → 票面 from → ext.passengersService[0].from)' },
262
+ to: { type: 'string', description: '到达地(ext.to → 票面 to → ext.passengersService[0].to)' },
263
+ stationGetOn: { type: 'string', description: '上车站(ext.station_geton)' },
264
+ stationGetOff: { type: 'string', description: '下车站(ext.station_getoff)' },
265
+ });
266
+ const listInvoiceItemSchema = {
267
+ ...invoiceInfoSchema,
268
+ properties: {
269
+ ...invoiceInfoSchema.properties,
270
+ extInfo: { ...extInfoSchema, description: '已解析的 ext 语义字段,空值省键;原始 ext 字符串仍保留' },
271
+ },
272
+ };
338
273
  const listOutputSchema = objectSchema({
339
- items: arrayOf(invoiceInfoSchema),
340
- total: { type: 'integer' },
341
- totalAmount: { type: 'string' },
342
- totalAmountExcludingTax: { type: 'string' },
343
- hasMore: { type: 'boolean' },
274
+ items: arrayOf(listInvoiceItemSchema, { description: '本页发票,已剔除全额红冲票(comm_info.pro.status=8),条数可能少于 page_size。' }),
275
+ total: { type: 'integer', description: '服务端汇总的总张数,含 items 里已剔除的全额红冲票。' },
276
+ totalAmount: { type: 'string', description: '服务端汇总的价税合计,含已剔除的全额红冲票。' },
277
+ totalAmountExcludingTax: { type: 'string', description: '服务端汇总的不含税合计,含已剔除的全额红冲票。' },
278
+ hasMore: { type: 'boolean', description: '是否还有下一页。判断是否翻页只看它,不要用 items 条数是否等于 page_size 推断。' },
344
279
  scope: { type: 'string', enum: ['personal', 'enterprise'] },
345
280
  }, ['items', 'total', 'totalAmount', 'totalAmountExcludingTax', 'hasMore', 'scope']);
346
281
  /**
@@ -349,12 +284,12 @@ const listOutputSchema = objectSchema({
349
284
  */
350
285
  const summaryOutputView = {
351
286
  name: 'summary',
352
- description: '语义化平表,省略空值字段;列表级汇总在前、items 在后,并附 itemCount。用 CLI 的 --view summary 启用。',
287
+ description: '语义化平表,省略空值字段;列表级汇总在前、items 在后,并附 itemCount。含 ext 里的 expenseNote(费用说明)、content、city、province、comment(备注)、from / to、stationGetOn / stationGetOff。用 CLI 的 --view summary 启用。',
353
288
  itemFields: SUMMARY_ITEM_FIELDS,
354
289
  };
355
290
  const detailOutputView = {
356
291
  name: 'detail',
357
- description: '单张发票的语义详情:summary 字段,外加 attachments(附件清单)、expenseNote(费用说明)、issuer(开票人)、checkState(查验标记,0=未查验,与票面 valid 不是一个口径)。用 CLI 的 --view detail 启用。',
292
+ description: '单张发票的语义详情:summary 字段(含 ext 的费用说明、城市、备注、起止地等),外加 attachments(附件清单)、issuer(开票人)、checkState(查验标记,0=未查验,与票面 valid 不是一个口径)。用 CLI 的 --view detail 启用。',
358
293
  itemFields: DETAIL_ITEM_FIELDS,
359
294
  };
360
295
  const uploadOutputSchema = objectSchema({
@@ -504,34 +439,6 @@ const workflowResolveDataSchema = objectSchema({
504
439
  workFlowName: { type: 'string' },
505
440
  }, ['workFlowId', 'workFlowName'])),
506
441
  }, [], true);
507
- const reimFieldOptionSchema = objectSchema({
508
- optionId: { type: 'string' },
509
- optionName: { type: 'string' },
510
- optionValue: { type: 'string' },
511
- }, [], true);
512
- const reimFormFieldSchema = objectSchema({
513
- fieldId: { type: 'string' },
514
- fieldName: { type: 'string' },
515
- fieldType: { type: 'string' },
516
- single: { type: 'boolean' },
517
- marked: { type: 'boolean' },
518
- options: arrayOf(reimFieldOptionSchema),
519
- }, ['fieldId', 'fieldName', 'fieldType'], true);
520
- const formStructureDataSchema = objectSchema({
521
- mainFormId: { type: 'string' },
522
- mainFields: arrayOf(reimFormFieldSchema),
523
- subTables: arrayOf(objectSchema({
524
- subFormId: { type: 'string' },
525
- subFormName: { type: 'string' },
526
- subFields: arrayOf(reimFormFieldSchema),
527
- }, ['subFormId', 'subFields'], true)),
528
- }, ['mainFormId', 'mainFields', 'subTables'], true);
529
- const rowInfoDataSchema = objectSchema({
530
- date: { type: 'string' },
531
- fysm: { type: 'string' },
532
- itinerary: { type: 'string' },
533
- subjectId: { type: 'string' },
534
- }, [], true);
535
442
  const employeeSchema = objectSchema({
536
443
  id: { type: 'string' },
537
444
  name: { type: 'string' },
@@ -546,32 +453,6 @@ const fieldSearchItemSchema = objectSchema({
546
453
  value: { type: 'string' },
547
454
  }, ['id', 'name'], true);
548
455
  const fieldSearchItemsSchema = arrayOf(fieldSearchItemSchema);
549
- const flowPreviewOutputSchema = objectSchema({
550
- requestName: { type: 'string' },
551
- workflowId: { type: 'string' },
552
- mainFormId: { type: 'string' },
553
- mainFieldCount: { type: 'integer' },
554
- detailRowCount: { type: 'integer' },
555
- }, ['requestName', 'workflowId', 'mainFormId', 'mainFieldCount', 'detailRowCount']);
556
- const flowUpdatePreviewOutputSchema = objectSchema({
557
- requestId: { type: 'string' },
558
- mainFormId: { type: 'string' },
559
- mainFieldCount: { type: 'integer' },
560
- detailRowCount: { type: 'integer' },
561
- deleteDetailRowCount: { type: 'integer' },
562
- }, ['requestId', 'mainFormId', 'mainFieldCount', 'detailRowCount', 'deleteDetailRowCount']);
563
- const flowCreateApplyOutputSchema = objectSchema({
564
- requestId: { type: 'string' },
565
- requestName: { type: 'string' },
566
- viewUrl: { type: 'string', format: 'uri' },
567
- result: rawObject,
568
- workflow: workflowSchema,
569
- }, ['requestId', 'requestName', 'viewUrl', 'result', 'workflow']);
570
- const flowUpdateApplyOutputSchema = objectSchema({
571
- requestId: { type: 'string' },
572
- result: rawObject,
573
- workflow: workflowSchema,
574
- }, ['requestId', 'result', 'workflow']);
575
456
  const reimCandidateItemSchema = objectSchema({
576
457
  fid: { type: 'string' },
577
458
  number: { type: 'string' },
@@ -590,114 +471,63 @@ const reimCandidatesOutputSchema = objectSchema({
590
471
  hasMore: { type: 'boolean' },
591
472
  available: arrayOf(reimCandidateItemSchema),
592
473
  assigned: arrayOf(reimCandidateItemSchema),
593
- redReversed: arrayOf(reimCandidateItemSchema),
594
474
  summary: objectSchema({
595
475
  availableCount: { type: 'integer' },
596
476
  assignedCount: { type: 'integer' },
597
- redReversedCount: { type: 'integer' },
598
477
  availableAmount: { type: 'string' },
599
478
  assignedAmount: { type: 'string' },
600
- redReversedAmount: { type: 'string' },
601
- filteredRedReversedCount: { type: 'integer' },
602
- }, ['availableCount', 'assignedCount', 'redReversedCount', 'availableAmount', 'assignedAmount', 'redReversedAmount', 'filteredRedReversedCount']),
479
+ }, ['availableCount', 'assignedCount', 'availableAmount', 'assignedAmount']),
603
480
  warnings: arrayOf({ type: 'string' }),
604
481
  workflow: workflowSchema,
605
- }, ['total', 'fetched', 'hasMore', 'available', 'assigned', 'redReversed', 'summary', 'warnings', 'workflow']);
606
- const reimTemplateInputProperties = {
607
- invoiceIds: { type: 'array', minItems: 1, maxItems: 100, items: positiveId, description: '用于报销的发票 fid 列表,将作为明细行顺序。' },
608
- requestName: { type: 'string', minLength: 1, maxLength: 100, description: '报销单标题。' },
609
- workflowId: { ...positiveId, description: `目标报销流程工作流 ID。不传时自动解析唯一候选;当前模板固化映射对应的流程为 ${'100003460000000060'}(总部费用报销)。` },
610
- reason: { type: 'string', maxLength: 500, description: '报销事由,缺省使用 requestName。' },
611
- relatedCustomerId: { ...positiveId, description: '相关客户 ID(非出差场景)。缺省留空并产生 warning。' },
612
- relatedCustomerName: { type: 'string', minLength: 1, maxLength: 200, description: '相关客户名称。只传名称时会反查 ID;与 relatedCustomerId 同时传时只用于渲染预览中文名,不额外请求。' },
613
- contractNo: { type: 'string', minLength: 1, maxLength: 100, description: '合同号。未传入时默认使用 "20260999",不再留空。' },
614
- };
615
- const reimPreviewLabeledFieldSchema = objectSchema({
616
- fieldId: { type: 'string' },
617
- fieldName: { type: 'string' },
618
- value: { type: 'string' },
619
- optionValue: { type: 'string' },
620
- text: { type: 'string', description: '已渲染的「中文(id)」文本,可直接展示。' },
621
- });
622
- const reimPreviewLabeledRowSchema = objectSchema({
623
- dataIndex: { type: 'integer' },
624
- invoiceId: { type: 'string' },
625
- invoiceNumber: { type: 'string' },
626
- amount: { type: 'string' },
627
- expenseNote: { type: 'string' },
628
- subject: { type: 'string', description: '费用科目,已渲染成「中文(id)」。' },
629
- currency: { type: 'string', description: '币种,已渲染成「中文(id)」。' },
630
- });
631
- const reimTemplatePreviewSchema = objectSchema({
632
- ...flowPreviewOutputSchema.properties,
633
- totalAmount: { type: 'string' },
634
- invoiceCount: { type: 'integer' },
635
- mainFields: arrayOf(reimPreviewLabeledFieldSchema, { description: '主表字段的可读渲染,字典类 ID 已带中文名。' }),
636
- detailRows: arrayOf(reimPreviewLabeledRowSchema, { description: '明细行的可读渲染,科目/币种已带中文名。' }),
637
- unresolvedLabels: arrayOf({ type: 'string' }, { description: '未能取到中文名的 ID 清单。' }),
638
- }, ['requestName', 'workflowId', 'mainFormId', 'mainFieldCount', 'detailRowCount', 'totalAmount', 'invoiceCount', 'mainFields', 'detailRows', 'unresolvedLabels']);
639
- const reimTemplatePayloadSchema = objectSchema(reimFlowCreateProperties, [...reimFlowCreateRequired]);
640
- const reimLabelsSchema = objectSchema({
641
- workflow: objectSchema({ id: { type: 'string' }, name: { type: 'string' } }),
642
- mainFormId: { type: 'string' },
643
- detailSubForm: objectSchema({ id: { type: 'string' }, name: { type: 'string' } }),
644
- employees: { type: 'object', additionalProperties: { type: 'string' } },
645
- subjects: { type: 'object', additionalProperties: { type: 'string' } },
646
- currencies: { type: 'object', additionalProperties: { type: 'string' } },
647
- customers: { type: 'object', additionalProperties: { type: 'string' } },
648
- selectOptions: { type: 'object', additionalProperties: { type: 'object', additionalProperties: { type: 'string' } } },
649
- customer: { type: ['object', 'null'], additionalProperties: true },
650
- unresolved: arrayOf({ type: 'string' }),
651
- }, ['workflow', 'employees', 'subjects', 'currencies', 'customers', 'selectOptions', 'unresolved']);
652
- const reimTemplateBuildOutputSchema = objectSchema({
653
- payload: reimTemplatePayloadSchema,
654
- preview: reimTemplatePreviewSchema,
655
- labels: reimLabelsSchema,
656
- warnings: arrayOf({ type: 'string' }),
657
- workflow: workflowSchema,
658
- }, ['payload', 'preview', 'labels', 'warnings', 'workflow']);
659
- const reimAutoPrepareOutputSchema = continuationPreviewOutput(reimTemplatePreviewSchema, {
660
- payload: reimTemplatePayloadSchema,
661
- labels: reimLabelsSchema,
662
- warnings: arrayOf({ type: 'string' }),
663
- });
482
+ }, ['total', 'fetched', 'hasMore', 'available', 'assigned', 'summary', 'warnings', 'workflow']);
664
483
  const nullableText = { type: ['string', 'null'] };
665
- const qysListOutputSchema = objectSchema({
666
- items: arrayOf(objectSchema({
667
- issuable: { type: 'boolean' },
668
- blockers: arrayOf({ type: 'string' }),
669
- }, ['formDataId', 'issuable', 'blockers'], true)),
670
- groups: arrayOf(objectSchema({
671
- contractNo: { type: 'string' },
672
- contractFlowId: { type: 'string', description: '台账「合同审批流程」的流程 ID,用于填开票流程的「相关合同审批流程」' },
673
- contractFlowName: { type: 'string' },
674
- purchaserName: { type: 'string' },
675
- purchaserTaxNo: { type: 'string' },
676
- purchaserBankName: { type: 'string', description: '购方开户行名称;台账把名称写进账号列时已拆出' },
677
- purchaserBankAccount: { type: 'string', description: '购方开户行账号(只含账号);台账混写时已去掉开户行名称' },
678
- invoiceTypes: arrayOf({ type: 'string' }),
679
- specialInvoiceWithoutTaxNo: { type: 'boolean', description: '购方无税号但台账发票类型是专票;为 true 时不能发起开票流程,需先在台账改为普票' },
680
- goodsNames: arrayOf({ type: 'string' }),
681
- taxRates: arrayOf({ type: 'string' }),
682
- specifications: arrayOf({ type: 'string' }, { description: '可开票行“规格型号”去重(开票流程主表“所售产品版本号”取此值)' }),
683
- sellerNames: arrayOf({ type: 'string' }, { description: '台账“核算公司”去重,即所属公司(销售方);空名称不计入。用于选择开票流程' }),
684
- rowCount: { type: 'integer' },
685
- formDataIds: arrayOf({ type: 'string' }),
686
- totalAmount: { type: 'string', description: '可开票行“开票金额”合计,按分累加(开票流程按含税金额使用)' },
687
- blockedRows: { type: 'integer', description: '同组已开票、开票中或已废弃的行数' },
688
- warnings: arrayOf({ type: 'string' }),
689
- }, ['contractNo', 'purchaserName', 'purchaserBankName', 'purchaserBankAccount', 'rowCount', 'formDataIds', 'totalAmount', 'blockedRows', 'specialInvoiceWithoutTaxNo', 'warnings'])),
690
- matched: { type: 'integer' },
691
- truncated: { type: 'boolean' },
692
- scanned: { type: 'integer' },
693
- scanComplete: { type: 'boolean' },
694
- }, ['items', 'groups', 'matched', 'truncated', 'scanned', 'scanComplete']);
484
+ const issuingContractsOutputSchema = objectSchema({
485
+ cards: arrayOf(objectSchema({
486
+ requestId: { type: 'string', description: '合同审批流程的 requestId' },
487
+ invoiced: { type: 'boolean', description: '合同虚拟表查不到开票明细时为 true(已开票);有明细为 false(待开票)' },
488
+ contractNo: { ...nullableText, description: '合同号;已开票时为 null' },
489
+ customerName: { ...nullableText, description: '客户(购方)名称;已开票时为 null' },
490
+ buyerTaxNo: { ...nullableText, description: '购方税号' },
491
+ sellerName: { ...nullableText, description: '销售方名称' },
492
+ invoiceAmount: { ...nullableText, description: '开票金额:全部明细金额之和,两位小数;已开票时为 null' },
493
+ invoiceGroups: arrayOf(objectSchema({
494
+ group: { ...nullableText, description: '分组标识' },
495
+ amount: { type: 'string', description: '该分组明细金额之和,两位小数' },
496
+ items: arrayOf(objectSchema({
497
+ name: { ...nullableText, description: '开票项目,如 技术服务费' },
498
+ amount: { type: 'string' },
499
+ }, ['name', 'amount'])),
500
+ }, ['group', 'amount', 'items'])),
501
+ }, ['requestId', 'invoiced', 'contractNo', 'customerName', 'invoiceAmount', 'invoiceGroups'], true)),
502
+ count: { type: 'integer' },
503
+ pendingCount: { type: 'integer', description: '待开票(invoiced=false)条数' },
504
+ invoicedCount: { type: 'integer', description: '已开票(invoiced=true)条数' },
505
+ }, ['cards', 'count', 'pendingCount', 'invoicedCount']);
506
+ const issuingContractDetailOutputSchema = objectSchema({
507
+ requestId: { type: 'string', description: '合同审批流程 requestId' },
508
+ requestName: { ...nullableText, description: '合同审批流程标题' },
509
+ workflowName: { ...nullableText, description: '合同审批流程所属工作流' },
510
+ customer: {
511
+ type: ['object', 'null'],
512
+ additionalProperties: false,
513
+ required: ['id', 'name'],
514
+ properties: { id: { type: 'string' }, name: { type: 'string' } },
515
+ description: '客户:取「客户名称」,没有时取「最终用户卡片」;开票申请「合同客户」填这个 {id, name}',
516
+ },
517
+ customerSource: { ...nullableText, description: 'customer 取自哪个字段:客户名称 / 最终用户卡片' },
518
+ contractDocuments: arrayOf(objectSchema({
519
+ docId: { ...nullableText, description: '文档 id。开票申请「合同文本」与合同流程一样传 {id, name},id 用这个值' },
520
+ fileId: nullableText,
521
+ name: { ...nullableText, description: '文件名。开票申请「合同文本」的 name 用这个值' },
522
+ }, ['docId', 'fileId', 'name'])),
523
+ contractDocIds: { ...nullableText, description: '全部文档 id,英文逗号分隔。开票申请「合同文本」不要填这个字符串' },
524
+ }, ['requestId', 'requestName', 'workflowName', 'customer', 'customerSource', 'contractDocuments', 'contractDocIds']);
695
525
  export const invoiceOperations = [
696
526
  {
697
527
  name: 'invoice.list',
698
528
  risk: 'read',
699
529
  scope: 'personal',
700
- fixed: { flag: 0, defaultSreim: '3', defaultBillType: 0 },
530
+ fixed: { flag: 0, defaultSreim: '3', defaultBillType: 0, excludeProStatus: 8 },
701
531
  inputSchema: { type: 'object', additionalProperties: false, properties: listProperties },
702
532
  outputSchema: listOutputSchema,
703
533
  outputViews: [summaryOutputView],
@@ -706,7 +536,7 @@ export const invoiceOperations = [
706
536
  name: 'invoice.enterprise.list',
707
537
  risk: 'read',
708
538
  scope: 'enterprise',
709
- fixed: { flag: 6, defaultSreim: '3', defaultBillType: 0 },
539
+ fixed: { flag: 6, defaultSreim: '3', defaultBillType: 0, excludeProStatus: 8 },
710
540
  inputSchema: { type: 'object', additionalProperties: false, properties: listProperties },
711
541
  outputSchema: listOutputSchema,
712
542
  outputViews: [summaryOutputView],
@@ -996,7 +826,13 @@ export const invoiceOperations = [
996
826
  {
997
827
  name: 'invoice.reim.requests.list',
998
828
  risk: 'read',
999
- fixed: { path: '/api/inc/book/getRequestListByTabId', defaultPageNo: 1, defaultPageSize: 100, defaultCusCreateDateEnd: 'passedOrShanghaiToday+1' },
829
+ fixed: {
830
+ path: '/api/inc/book/getRequestListByTabId',
831
+ defaultPageNo: 1,
832
+ defaultPageSize: 100,
833
+ defaultCusCreateDateEnd: 'passedOrShanghaiToday+1',
834
+ defaultCusCreateDateStart: 'end-7d, page1Empty→end-1month; scene=phone→end-90d',
835
+ },
1000
836
  inputSchema: {
1001
837
  type: 'object',
1002
838
  additionalProperties: false,
@@ -1004,15 +840,29 @@ export const invoiceOperations = [
1004
840
  pageNo: { type: 'integer', minimum: 1, maximum: 10000, default: 1 },
1005
841
  pageSize: { type: 'integer', minimum: 1, maximum: 200, default: 100, description: '每页条数。不传时默认 100。' },
1006
842
  requestname: { type: 'string', minLength: 1 },
1007
- cusCreateDateStart: { type: 'string', pattern: '^\\d{4}-\\d{2}-\\d{2}$' },
843
+ cusCreateDateStart: {
844
+ type: 'string',
845
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
846
+ description: '发起日期开始(YYYY-MM-DD)。用户没指定时不要传:CLI 取结束日前 7 天,第 1 页查不到再放宽到结束日前 1 个月;scene=phone 时取结束日前 90 天。',
847
+ },
1008
848
  cusCreateDateEnd: {
1009
849
  type: 'string',
1010
850
  pattern: '^\\d{4}-\\d{2}-\\d{2}$',
1011
851
  description: '发起日期结束(YYYY-MM-DD)。不传时按东八区当天 + 1 天填入;传入时按该日期再 + 1 天后发给接口。调用方传业务结束日本身,不要自己再加 1 天。',
1012
852
  },
853
+ scene: { type: 'string', enum: ['phone'], description: '话费报销传 "phone",默认开始日改为结束日前 90 天。' },
1013
854
  },
1014
855
  },
1015
- outputSchema: resultEnvelopeOutput(requestListDataSchema),
856
+ outputSchema: objectSchema({
857
+ result: rawObject,
858
+ data: requestListDataSchema,
859
+ workflow: workflowSchema,
860
+ query: objectSchema({
861
+ cusCreateDateStart: { type: 'string', description: '本次实际使用的发起日期开始' },
862
+ cusCreateDateEnd: { type: 'string', description: '本次的业务结束日(发给接口时已再 + 1 天)' },
863
+ widened: { type: 'boolean', description: '是否因 7 天内查不到而放宽到 1 个月' },
864
+ }, ['cusCreateDateStart', 'cusCreateDateEnd', 'widened']),
865
+ }, ['result', 'data', 'workflow', 'query']),
1016
866
  },
1017
867
  {
1018
868
  name: 'invoice.reim.workflow.resolve',
@@ -1027,64 +877,6 @@ export const invoiceOperations = [
1027
877
  },
1028
878
  outputSchema: resultEnvelopeOutput(workflowResolveDataSchema),
1029
879
  },
1030
- {
1031
- name: 'invoice.reim.form.structure',
1032
- risk: 'read',
1033
- fixed: { path: '/api/inc/book/getFormStructure', defaultNodeId: '1' },
1034
- inputSchema: {
1035
- type: 'object',
1036
- additionalProperties: false,
1037
- properties: {
1038
- workflowId: positiveId,
1039
- nodeId: { type: 'string', minLength: 1, default: '1' },
1040
- },
1041
- required: ['workflowId'],
1042
- },
1043
- outputSchema: resultEnvelopeOutput(formStructureDataSchema),
1044
- },
1045
- {
1046
- name: 'invoice.reim.row-info',
1047
- risk: 'read',
1048
- fixed: { path: '/api/secondev/fna/expense/dataInfo/getRowInfo', sf_request_type: 'fetch' },
1049
- inputSchema: {
1050
- type: 'object',
1051
- additionalProperties: false,
1052
- properties: {
1053
- invoiceId: positiveId,
1054
- requestid: { type: 'string' },
1055
- cdzt: positiveId,
1056
- },
1057
- required: ['invoiceId'],
1058
- },
1059
- outputSchema: resultEnvelopeOutput(rowInfoDataSchema),
1060
- },
1061
- {
1062
- name: 'invoice.reim.row-info-batch',
1063
- risk: 'read',
1064
- fixed: { path: '/api/secondev/fna/expense/dataInfo/getRowInfo', sf_request_type: 'fetch', concurrency: 4 },
1065
- inputSchema: {
1066
- type: 'object',
1067
- additionalProperties: false,
1068
- properties: {
1069
- invoiceIds: positiveIdArray,
1070
- requestid: { type: 'string' },
1071
- cdzt: positiveId,
1072
- },
1073
- required: ['invoiceIds'],
1074
- },
1075
- outputSchema: objectSchema({
1076
- results: arrayOf(objectSchema({
1077
- invoiceId: { type: 'string' },
1078
- status: { type: 'string', enum: ['success', 'fail'] },
1079
- data: rowInfoDataSchema,
1080
- error: { type: 'string' },
1081
- }, ['invoiceId', 'status'])),
1082
- succeeded: { type: 'integer' },
1083
- failed: { type: 'integer' },
1084
- total: { type: 'integer' },
1085
- workflow: workflowSchema,
1086
- }, ['results', 'succeeded', 'failed', 'total', 'workflow']),
1087
- },
1088
880
  {
1089
881
  name: 'invoice.reim.employee-superiors',
1090
882
  risk: 'read',
@@ -1122,117 +914,126 @@ export const invoiceOperations = [
1122
914
  }, ['result', 'data', 'keywords', 'match', 'items', 'workflow']),
1123
915
  },
1124
916
  {
1125
- name: 'invoice.reim.flow.create.prepare',
1126
- risk: 'read-before-write',
1127
- fixed: { path: '/api/inc/book/createFlowNew' },
1128
- inputSchema: {
1129
- type: 'object',
1130
- additionalProperties: false,
1131
- properties: reimFlowCreateProperties,
1132
- required: reimFlowCreateRequired,
1133
- },
1134
- outputSchema: continuationPreviewOutput(flowPreviewOutputSchema),
1135
- },
1136
- {
1137
- name: 'invoice.reim.flow.create.apply',
1138
- risk: 'high-risk-write',
917
+ name: 'invoice.reim.candidates.list',
918
+ risk: 'read',
919
+ fixed: { path: '/api/inc/sync', sreim: '3', billType: 0, excludeProStatus: 8 },
1139
920
  inputSchema: {
1140
921
  type: 'object',
1141
922
  additionalProperties: false,
1142
923
  properties: {
1143
- ...reimFlowCreateProperties,
1144
- continuation: { type: 'string', minLength: 1 },
1145
- confirm: { const: true },
924
+ date_begin: { type: 'string', pattern: '^\\d{4}-\\d{2}-\\d{2}$', description: '开票日期起(YYYY-MM-DD,含)。' },
925
+ date_end: { type: 'string', pattern: '^\\d{4}-\\d{2}-\\d{2}$', description: '开票日期止(YYYY-MM-DD,含)。' },
926
+ consumption_tm_begin: epochDateProperty('消费日期起(含)'),
927
+ consumption_tm_end: epochEndDateProperty('消费日期止(含)'),
928
+ page_size: { type: 'integer', minimum: 10, maximum: 200, default: 50, description: '单页条数。' },
929
+ max_items: { type: 'integer', minimum: 1, maximum: 500, default: 200, description: '最多拉取条数,超出截断并产生 warning。' },
1146
930
  },
1147
- required: [...reimFlowCreateRequired, 'continuation', 'confirm'],
1148
931
  },
1149
- outputSchema: flowCreateApplyOutputSchema,
932
+ outputSchema: reimCandidatesOutputSchema,
1150
933
  },
1151
934
  {
1152
- name: 'invoice.reim.flow.update.prepare',
1153
- risk: 'read-before-write',
1154
- fixed: { path: '/api/inc/book/updateFlow' },
1155
- inputSchema: {
1156
- type: 'object',
1157
- additionalProperties: false,
1158
- properties: reimFlowUpdateProperties,
1159
- required: ['requestId', 'mainFormId'],
1160
- anyOf: [{ required: ['main_fields'] }, { required: ['detail_rows'] }, { required: ['deleteDetailRows'] }],
935
+ name: 'invoice.issuing.contracts.list',
936
+ risk: 'read',
937
+ fixed: {
938
+ path: '/api/ebuilder/form/eblist/getData',
939
+ source: '合同虚拟表(按「合同审批流程」requestId 过滤)',
940
+ note: '每个 requestId 单独查询一次,结果按 requestId 拼回 cards',
1161
941
  },
1162
- outputSchema: continuationPreviewOutput(flowUpdatePreviewOutputSchema),
1163
- },
1164
- {
1165
- name: 'invoice.reim.flow.update.apply',
1166
- risk: 'high-risk-write',
1167
942
  inputSchema: {
1168
943
  type: 'object',
1169
944
  additionalProperties: false,
1170
945
  properties: {
1171
- ...reimFlowUpdateProperties,
1172
- continuation: { type: 'string', minLength: 1 },
1173
- confirm: { const: true },
946
+ cards: {
947
+ type: 'array',
948
+ maxItems: 50,
949
+ items: { type: 'object', required: ['requestId'], additionalProperties: true },
950
+ description: 'workflow.search 返回的 data.cards,原样传入;与 requestIds 二选一',
951
+ },
952
+ requestIds: {
953
+ type: 'array',
954
+ maxItems: 50,
955
+ items: { type: 'string', pattern: '^\\d+$' },
956
+ description: '合同审批流程 requestId 列表;与 cards 二选一',
957
+ },
1174
958
  },
1175
- required: ['requestId', 'mainFormId', 'continuation', 'confirm'],
1176
- anyOf: [{ required: ['main_fields'] }, { required: ['detail_rows'] }, { required: ['deleteDetailRows'] }],
1177
959
  },
1178
- outputSchema: flowUpdateApplyOutputSchema,
960
+ outputSchema: issuingContractsOutputSchema,
1179
961
  },
1180
962
  {
1181
- name: 'invoice.reim.candidates.list',
963
+ name: 'invoice.issuing.contract.detail',
1182
964
  risk: 'read',
1183
- fixed: { path: '/api/inc/sync', sreim: '3', billType: 0 },
965
+ fixed: {
966
+ path: '/api/workflow/core/paService/v1/getWorkflowRequest',
967
+ source: '合同审批流程详情(isReadRequest=false,不标记已读)',
968
+ note: '只取主表「客户名称」/「最终用户卡片」与「合同正文及附件」',
969
+ },
1184
970
  inputSchema: {
1185
971
  type: 'object',
1186
972
  additionalProperties: false,
973
+ required: ['requestId'],
1187
974
  properties: {
1188
- date_begin: { type: 'string', pattern: '^\\d{4}-\\d{2}-\\d{2}$', description: '开票日期起(YYYY-MM-DD,含)。' },
1189
- date_end: { type: 'string', pattern: '^\\d{4}-\\d{2}-\\d{2}$', description: '开票日期止(YYYY-MM-DD,含)。' },
1190
- consumption_tm_begin: epochDateProperty('消费日期起(含)'),
1191
- consumption_tm_end: epochEndDateProperty('消费日期止(含)'),
1192
- page_size: { type: 'integer', minimum: 10, maximum: 200, default: 50, description: '单页条数。' },
1193
- max_items: { type: 'integer', minimum: 1, maximum: 500, default: 200, description: '最多拉取条数(不含被过滤的红冲票),超出截断并产生 warning。' },
1194
- include_red_reversed: { type: 'boolean', default: false, description: '是否在结果中保留全额红冲(status=8)发票。默认 false —— 报销场景直接过滤掉,过滤张数由 summary.filteredRedReversedCount 告知,不会静默丢失。' },
975
+ requestId: { type: 'string', pattern: '^\\d+$', description: '用户选定的合同审批流程 requestId' },
1195
976
  },
1196
977
  },
1197
- outputSchema: reimCandidatesOutputSchema,
978
+ outputSchema: issuingContractDetailOutputSchema,
979
+ },
980
+ ];
981
+ const REIM_REFERENCE = 'references/invoice-reim.md';
982
+ const ISSUING_REFERENCE = 'references/invoice-issuing-workflow.md';
983
+ /**
984
+ * 已下线的 operation:不可执行,也不在 operations 里。注册表按名字返回 operation_retired 和替代链路,
985
+ * 照旧 skill 调用的 Agent / 脚本才知道怎么改,而不是只拿到 operation_unknown。
986
+ */
987
+ export const invoiceRetiredOperations = [
988
+ {
989
+ name: 'invoice.reim.form.structure',
990
+ replacement: '载入报销表单改用 weaver-e10-workflow 的 workflow.createForm(workflow 传 {workFlowName}({workFlowId}))',
991
+ reference: REIM_REFERENCE,
992
+ },
993
+ {
994
+ name: 'invoice.reim.row-info',
995
+ replacement: '明细行不再预填:每行只写「相关发票」(用 invoice.browse-field.data 生成),其余列由联动带出',
996
+ reference: REIM_REFERENCE,
997
+ },
998
+ {
999
+ name: 'invoice.reim.row-info-batch',
1000
+ replacement: '明细行不再预填:每行只写「相关发票」(用 invoice.browse-field.data 生成),其余列由联动带出',
1001
+ reference: REIM_REFERENCE,
1002
+ },
1003
+ {
1004
+ name: 'invoice.reim.flow.create.prepare',
1005
+ replacement: '创建报销单改用 weaver-e10-workflow 的 workflow.createRequest(action 固定 draft,存草稿)',
1006
+ reference: REIM_REFERENCE,
1007
+ },
1008
+ {
1009
+ name: 'invoice.reim.flow.create.apply',
1010
+ replacement: '创建报销单改用 weaver-e10-workflow 的 workflow.createRequest(action 固定 draft,存草稿)',
1011
+ reference: REIM_REFERENCE,
1012
+ },
1013
+ {
1014
+ name: 'invoice.reim.flow.update.prepare',
1015
+ replacement: '修改报销单改用 weaver-e10-workflow 的 workflow.editLoad → workflow.editPrepare → workflow.editApply',
1016
+ reference: REIM_REFERENCE,
1017
+ },
1018
+ {
1019
+ name: 'invoice.reim.flow.update.apply',
1020
+ replacement: '修改报销单改用 weaver-e10-workflow 的 workflow.editLoad → workflow.editPrepare → workflow.editApply',
1021
+ reference: REIM_REFERENCE,
1198
1022
  },
1199
1023
  {
1200
1024
  name: 'invoice.reim.template.build',
1201
- risk: 'read',
1202
- inputSchema: {
1203
- type: 'object',
1204
- additionalProperties: false,
1205
- properties: reimTemplateInputProperties,
1206
- required: ['invoiceIds', 'requestName'],
1207
- },
1208
- outputSchema: reimTemplateBuildOutputSchema,
1025
+ replacement: '改为 invoice.reim.candidates.list 取候选发票 → workflow.createForm 载入表单 → 按 reim-form-fill-rules.md 组装 data → workflow.createRequest 存草稿',
1026
+ reference: REIM_REFERENCE,
1209
1027
  },
1210
1028
  {
1211
1029
  name: 'invoice.reim.flow.create.auto-prepare',
1212
- risk: 'read-before-write',
1213
- inputSchema: {
1214
- type: 'object',
1215
- additionalProperties: false,
1216
- properties: reimTemplateInputProperties,
1217
- required: ['invoiceIds', 'requestName'],
1218
- },
1219
- outputSchema: reimAutoPrepareOutputSchema,
1030
+ replacement: '改为 invoice.reim.candidates.list 取候选发票 → workflow.createForm 载入表单 → 按 reim-form-fill-rules.md 组装 data → workflow.createRequest 存草稿',
1031
+ reference: REIM_REFERENCE,
1220
1032
  },
1221
1033
  {
1222
1034
  name: 'invoice.issuing.qys.list',
1223
- risk: 'read',
1224
- fixed: { path: '/api/ebuilder/form/list/getListDatas', ledger: '待开票合同数据' },
1225
- inputSchema: {
1226
- type: 'object',
1227
- additionalProperties: false,
1228
- properties: {
1229
- keyword: { type: 'string', description: '模糊匹配合同号、购买方名称、合同审批流程名称、商品名称或开票名称' },
1230
- contractNo: { type: 'string', description: '按合同号精确筛选' },
1231
- includeIssued: { type: 'boolean', default: false, description: '是否包含已开票、开票中或已废弃的行。默认 false 只返回可开票行;groups 始终按合同号+购方汇总,blockedRows 计不可开票行数。' },
1232
- limit: { type: 'integer', minimum: 1, maximum: 100, default: 20 },
1233
- },
1234
- },
1235
- outputSchema: qysListOutputSchema,
1035
+ replacement: '改为 workflow.search 查合同审批流程 → 把 data.cards 传给 invoice.issuing.contracts.list 列出待开票合同 → 选定后用 invoice.issuing.contract.detail 取客户和合同文档',
1036
+ reference: ISSUING_REFERENCE,
1236
1037
  },
1237
1038
  ];
1238
1039
  export const invoiceManifest = {
@@ -1253,15 +1054,10 @@ export const invoiceManifest = {
1253
1054
  default: 'full',
1254
1055
  description: `输出视图。full=完整包络;summary=${SUMMARY_ITEM_FIELDS.length} 个语义字段的平表,仅 invoice.list / invoice.enterprise.list 支持;detail=${DETAIL_ITEM_FIELDS.length} 个字段的单张发票详情(含附件、费用说明、查验标记),仅 invoice.get 支持。`,
1255
1056
  },
1256
- '--format': {
1257
- values: OUTPUT_FORMATS,
1258
- default: 'json',
1259
- description: '输出格式。json=标准 envelope(默认,供程序消费);markdown=人读渲染(票夹列表/发票详情两类模板,内置列顺序与单位),仅 invoice.list / invoice.enterprise.list / invoice.get 支持,且与 --json、--fields 互斥。markdown 档自带字段口径(list→summary、get→detail),不必再传 --view。',
1260
- },
1261
1057
  '--fields': {
1262
1058
  description: '逗号分隔的点路径列表,按原结构投影,例如 --fields number,detailUrl。所有 operation 可用;未命中的路径会出现在 meta.projection.missingFields 里。⚠️ 不要用裸 total 取金额:发票顶层 total 是 E10 的独立字段(实测恒为 0),价税合计在 comm_info.price.total,不含税金额在 comm_info.price.amount。',
1263
1059
  },
1264
- note: '--view 与 --fields 互斥;--format markdown 与 --json/--fields 互斥。投影只影响输出,不改变任何请求参数;meta.projection 会说明本次裁剪结果。',
1060
+ note: '--view 与 --fields 互斥。投影只影响输出,不改变任何请求参数;meta.projection 会说明本次裁剪结果。',
1265
1061
  },
1266
1062
  operations: invoiceOperations,
1267
1063
  withheldOperations: [
@@ -1278,6 +1074,7 @@ export const invoiceManifest = {
1278
1074
  reason: '新增源资料给出 /api/my/tag/common/batchAddEntityTag 请求体,但仍缺少标签定义查询、当前标签关系回查和移除/替换语义。',
1279
1075
  },
1280
1076
  ],
1077
+ retiredOperations: invoiceRetiredOperations,
1281
1078
  };
1282
1079
  export function hasInvoiceOperation(operation) {
1283
1080
  return invoiceOperations.some((item) => item.name === operation);