weaver-work-cli 0.1.2 → 0.1.4

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 (341) hide show
  1. package/README.md +176 -78
  2. package/dist/cmd/setup/index.js +5 -5
  3. package/dist/cmd/skills/index.js +1 -1
  4. package/dist/core/hooks.js +7 -0
  5. package/dist/index.js +0 -0
  6. package/dist/internal/e10/auth/commands.js +159 -54
  7. package/dist/internal/e10/auth/xiaoe.js +268 -0
  8. package/dist/internal/e10/context.js +16 -2
  9. package/dist/internal/e10/index.js +1 -0
  10. package/dist/internal/e10/request-runtime.js +344 -0
  11. package/dist/internal/skills/install.js +48 -6
  12. package/dist/internal/skills/reader.js +27 -0
  13. package/dist/shortcuts/archive/continuation.js +70 -0
  14. package/dist/shortcuts/archive/errors.js +53 -0
  15. package/dist/shortcuts/archive/host.js +197 -0
  16. package/dist/shortcuts/archive/index.js +363 -0
  17. package/dist/shortcuts/archive/manifest.js +45 -0
  18. package/dist/shortcuts/archive/operations/archive-info.js +55 -0
  19. package/dist/shortcuts/archive/operations/borrow-car.js +146 -0
  20. package/dist/shortcuts/archive/operations/borrow-list.js +200 -0
  21. package/dist/shortcuts/archive/operations/confirm.js +46 -0
  22. package/dist/shortcuts/archive/operations/download.js +238 -0
  23. package/dist/shortcuts/archive/operations/flow-url.js +240 -0
  24. package/dist/shortcuts/archive/operations/fonds.js +95 -0
  25. package/dist/shortcuts/archive/operations/getPageUrl.js +137 -0
  26. package/dist/shortcuts/archive/operations/registry.js +43 -0
  27. package/dist/shortcuts/archive/operations/search.js +88 -0
  28. package/dist/shortcuts/archive/operations/shared.js +120 -0
  29. package/dist/shortcuts/archive/operations/types.js +23 -0
  30. package/dist/shortcuts/archive/operations/upload.js +182 -0
  31. package/dist/shortcuts/archive/operations.js +13 -0
  32. package/dist/shortcuts/archive/render/search-format.js +276 -0
  33. package/dist/shortcuts/archive/render/search-view.js +125 -0
  34. package/dist/shortcuts/asset/continuation.js +70 -0
  35. package/dist/shortcuts/asset/errors.js +67 -0
  36. package/dist/shortcuts/asset/host.js +438 -0
  37. package/dist/shortcuts/asset/index.js +255 -0
  38. package/dist/shortcuts/asset/manifest.js +471 -0
  39. package/dist/shortcuts/asset/operations/query.js +249 -0
  40. package/dist/shortcuts/asset/operations/registry.js +85 -0
  41. package/dist/shortcuts/asset/operations/shared.js +100 -0
  42. package/dist/shortcuts/asset/operations/type-cache.js +49 -0
  43. package/dist/shortcuts/asset/operations/types.js +1 -0
  44. package/dist/shortcuts/asset/operations/viewlink.js +117 -0
  45. package/dist/shortcuts/asset/operations/write.js +435 -0
  46. package/dist/shortcuts/asset/operations.js +9 -0
  47. package/dist/shortcuts/calendar/continuation.js +70 -0
  48. package/dist/shortcuts/calendar/errors.js +53 -0
  49. package/dist/shortcuts/calendar/host.js +148 -0
  50. package/dist/shortcuts/calendar/index.js +125 -0
  51. package/dist/shortcuts/calendar/manifest.js +26 -0
  52. package/dist/shortcuts/calendar/operations/read.js +259 -0
  53. package/dist/shortcuts/calendar/operations/registry.js +31 -0
  54. package/dist/shortcuts/calendar/operations/shared.js +132 -0
  55. package/dist/shortcuts/calendar/operations/types.js +25 -0
  56. package/dist/shortcuts/calendar/operations/write.js +439 -0
  57. package/dist/shortcuts/calendar/operations.js +8 -0
  58. package/dist/shortcuts/ehr/continuation.js +70 -0
  59. package/dist/shortcuts/ehr/errors.js +53 -0
  60. package/dist/shortcuts/ehr/host.js +213 -0
  61. package/dist/shortcuts/ehr/index.js +205 -0
  62. package/dist/shortcuts/ehr/manifest.js +47 -0
  63. package/dist/shortcuts/ehr/operations/attend-read.js +373 -0
  64. package/dist/shortcuts/ehr/operations/attend-write.js +514 -0
  65. package/dist/shortcuts/ehr/operations/hr-contact.js +363 -0
  66. package/dist/shortcuts/ehr/operations/hr-ds.js +298 -0
  67. package/dist/shortcuts/ehr/operations/hr-report.js +386 -0
  68. package/dist/shortcuts/ehr/operations/recruit-write.js +1629 -0
  69. package/dist/shortcuts/ehr/operations/recruit.js +803 -0
  70. package/dist/shortcuts/ehr/operations/registry.js +43 -0
  71. package/dist/shortcuts/ehr/operations/salary.js +319 -0
  72. package/dist/shortcuts/ehr/operations/shared.js +246 -0
  73. package/dist/shortcuts/ehr/operations/types.js +25 -0
  74. package/dist/shortcuts/ehr/operations.js +25 -0
  75. package/dist/shortcuts/esb/continuation.js +70 -0
  76. package/dist/shortcuts/esb/errors.js +65 -0
  77. package/dist/shortcuts/esb/host.js +187 -0
  78. package/dist/shortcuts/esb/index.js +112 -0
  79. package/dist/shortcuts/esb/manifest.js +91 -0
  80. package/dist/shortcuts/esb/operations/input-format.js +31 -0
  81. package/dist/shortcuts/esb/operations/registry.js +48 -0
  82. package/dist/shortcuts/esb/operations/shared.js +152 -0
  83. package/dist/shortcuts/esb/operations/trigger.js +76 -0
  84. package/dist/shortcuts/esb/operations/types.js +21 -0
  85. package/dist/shortcuts/esb/operations.js +15 -0
  86. package/dist/shortcuts/fna/continuation.js +70 -0
  87. package/dist/shortcuts/fna/errors.js +59 -0
  88. package/dist/shortcuts/fna/host.js +146 -0
  89. package/dist/shortcuts/fna/index.js +111 -0
  90. package/dist/shortcuts/fna/manifest.js +41 -0
  91. package/dist/shortcuts/fna/operations/budget.js +124 -0
  92. package/dist/shortcuts/fna/operations/expense-center.js +148 -0
  93. package/dist/shortcuts/fna/operations/invoice-writeoff.js +212 -0
  94. package/dist/shortcuts/fna/operations/loan.js +195 -0
  95. package/dist/shortcuts/fna/operations/registry.js +35 -0
  96. package/dist/shortcuts/fna/operations/shared.js +210 -0
  97. package/dist/shortcuts/fna/operations/types.js +25 -0
  98. package/dist/shortcuts/fna/operations.js +19 -0
  99. package/dist/shortcuts/hrm/errors.js +38 -0
  100. package/dist/shortcuts/hrm/host.js +156 -0
  101. package/dist/shortcuts/hrm/index.js +111 -0
  102. package/dist/shortcuts/hrm/manifest.js +32 -0
  103. package/dist/shortcuts/hrm/operations/employee.js +338 -0
  104. package/dist/shortcuts/hrm/operations/org.js +110 -0
  105. package/dist/shortcuts/hrm/operations/position.js +176 -0
  106. package/dist/shortcuts/hrm/operations/registry.js +33 -0
  107. package/dist/shortcuts/hrm/operations/shared.js +143 -0
  108. package/dist/shortcuts/hrm/operations/types.js +23 -0
  109. package/dist/shortcuts/hrm/operations.js +19 -0
  110. package/dist/shortcuts/index.js +20 -0
  111. package/dist/shortcuts/invoice/host.js +99 -94
  112. package/dist/shortcuts/invoice/index.js +58 -59
  113. package/dist/shortcuts/invoice/manifest.js +200 -3
  114. package/dist/shortcuts/invoice/operations/browse-field.js +17 -0
  115. package/dist/shortcuts/invoice/operations/issuing.js +198 -0
  116. package/dist/shortcuts/invoice/operations/registry.js +17 -0
  117. package/dist/shortcuts/invoice/operations/reim.js +401 -0
  118. package/dist/shortcuts/invoice/operations/shared.js +247 -0
  119. package/dist/shortcuts/jiuchuanhui/cache.js +441 -0
  120. package/dist/shortcuts/jiuchuanhui/continuation.js +70 -0
  121. package/dist/shortcuts/jiuchuanhui/errors.js +59 -0
  122. package/dist/shortcuts/jiuchuanhui/host.js +159 -0
  123. package/dist/shortcuts/jiuchuanhui/index.js +109 -0
  124. package/dist/shortcuts/jiuchuanhui/manifest.js +469 -0
  125. package/dist/shortcuts/jiuchuanhui/operations/datajson.js +214 -0
  126. package/dist/shortcuts/jiuchuanhui/operations/esb.js +157 -0
  127. package/dist/shortcuts/jiuchuanhui/operations/generic.js +146 -0
  128. package/dist/shortcuts/jiuchuanhui/operations/registry.js +133 -0
  129. package/dist/shortcuts/jiuchuanhui/operations/shared.js +158 -0
  130. package/dist/shortcuts/jiuchuanhui/operations/types.js +1 -0
  131. package/dist/shortcuts/jiuchuanhui/operations.js +8 -0
  132. package/dist/shortcuts/mail/continuation.js +70 -0
  133. package/dist/shortcuts/mail/errors.js +53 -0
  134. package/dist/shortcuts/mail/host.js +182 -0
  135. package/dist/shortcuts/mail/index.js +519 -0
  136. package/dist/shortcuts/mail/manifest.js +38 -0
  137. package/dist/shortcuts/mail/operations/mail-blacklist.js +79 -0
  138. package/dist/shortcuts/mail/operations/mail-contacts.js +195 -0
  139. package/dist/shortcuts/mail/operations/mail-manage.js +335 -0
  140. package/dist/shortcuts/mail/operations/mail-read.js +508 -0
  141. package/dist/shortcuts/mail/operations/mail-send.js +474 -0
  142. package/dist/shortcuts/mail/operations/mail-sign.js +203 -0
  143. package/dist/shortcuts/mail/operations/mail-template.js +170 -0
  144. package/dist/shortcuts/mail/operations/registry.js +41 -0
  145. package/dist/shortcuts/mail/operations/shared.js +64 -0
  146. package/dist/shortcuts/mail/operations/types.js +27 -0
  147. package/dist/shortcuts/mail/operations.js +19 -0
  148. package/dist/shortcuts/plan/continuation.js +70 -0
  149. package/dist/shortcuts/plan/errors.js +70 -0
  150. package/dist/shortcuts/plan/host.js +180 -0
  151. package/dist/shortcuts/plan/index.js +150 -0
  152. package/dist/shortcuts/plan/manifest.js +53 -0
  153. package/dist/shortcuts/plan/operations/link.js +256 -0
  154. package/dist/shortcuts/plan/operations/read.js +259 -0
  155. package/dist/shortcuts/plan/operations/registry.js +33 -0
  156. package/dist/shortcuts/plan/operations/shared.js +246 -0
  157. package/dist/shortcuts/plan/operations/types.js +49 -0
  158. package/dist/shortcuts/plan/operations/version.js +49 -0
  159. package/dist/shortcuts/plan/operations/write.js +710 -0
  160. package/dist/shortcuts/plan/operations.js +8 -0
  161. package/docs/SKILL.md +11 -7
  162. package/docs/_catalog.md +22 -5
  163. package/docs/agent-invoice.md +19 -9
  164. package/docs/agent-skill-install.md +141 -22
  165. package/docs/calendar.md +87 -0
  166. package/docs/e10-auth.md +28 -9
  167. package/docs/ehr.md +186 -0
  168. package/docs/esb.md +64 -0
  169. package/docs/fna.md +72 -0
  170. package/docs/hrm.md +89 -0
  171. package/docs/invoice.md +61 -20
  172. package/docs/jiuchuanhui.md +131 -0
  173. package/docs/operation-manual.md +443 -0
  174. package/docs/plan.md +82 -0
  175. package/docs/wenshuding.md +129 -0
  176. package/docs/ziguanjia.md +89 -0
  177. package/package.json +4 -4
  178. package/scripts/package-skill.mjs +127 -34
  179. package/scripts/postbuild.mjs +13 -0
  180. package/skill-template/business-info.json +13 -2
  181. package/skill-template/domains/calendar.md +15 -0
  182. package/skill-template/domains/esb.md +13 -0
  183. package/skill-template/domains/hrm.md +16 -0
  184. package/skill-template/domains/jiuchuanhui.md +23 -0
  185. package/skill-template/domains/jucailin.md +22 -0
  186. package/skill-template/domains/mail.md +21 -0
  187. package/skill-template/domains/plan.md +17 -0
  188. package/skill-template/domains/qiyecheng.md +17 -0
  189. package/skill-template/domains/shared.md +5 -3
  190. package/skill-template/domains/skill-maker.md +10 -0
  191. package/skill-template/domains/wenshuding.md +22 -0
  192. package/skill-template/domains/{invoice.md → yepiaotong.md} +4 -0
  193. package/skill-template/domains/ziguanjia.md +21 -0
  194. package/skill-template/master-skill-template.md +12 -6
  195. package/skill-template/skill-template.md +26 -10
  196. package/skills/weaver-e10-calendar/SKILL.md +101 -0
  197. package/skills/weaver-e10-calendar/product.json +8 -0
  198. package/skills/weaver-e10-calendar/references/calendar-app-check.md +65 -0
  199. package/skills/weaver-e10-calendar/references/calendar-dict.md +55 -0
  200. package/skills/weaver-e10-calendar/references/calendar-query.md +70 -0
  201. package/skills/weaver-e10-calendar/references/calendar-write.md +97 -0
  202. package/skills/weaver-e10-calendar/references/source-manifest.json +54 -0
  203. package/skills/weaver-e10-esb/SKILL.md +102 -0
  204. package/skills/weaver-e10-esb/product.json +8 -0
  205. package/skills/weaver-e10-esb/references/input-format.md +52 -0
  206. package/skills/weaver-e10-esb/references/source-manifest.json +242 -0
  207. package/skills/weaver-e10-esb/references/trigger.md +99 -0
  208. package/skills/weaver-e10-hrm/SKILL.md +87 -0
  209. package/skills/weaver-e10-hrm/product.json +8 -0
  210. package/skills/weaver-e10-hrm/references/employee.md +109 -0
  211. package/skills/weaver-e10-hrm/references/org.md +95 -0
  212. package/skills/weaver-e10-hrm/references/position.md +95 -0
  213. package/skills/weaver-e10-hrm/references/source-manifest.json +121 -0
  214. package/skills/weaver-e10-jiuchuanhui/SKILL.md +174 -0
  215. package/skills/weaver-e10-jiuchuanhui/product.json +8 -0
  216. package/skills/weaver-e10-jiuchuanhui/references/cache.md +110 -0
  217. package/skills/weaver-e10-jiuchuanhui/references/clue.md +61 -0
  218. package/skills/weaver-e10-jiuchuanhui/references/contact-plan.md +56 -0
  219. package/skills/weaver-e10-jiuchuanhui/references/contact-records.md +48 -0
  220. package/skills/weaver-e10-jiuchuanhui/references/contact.md +56 -0
  221. package/skills/weaver-e10-jiuchuanhui/references/customer.md +69 -0
  222. package/skills/weaver-e10-jiuchuanhui/references/disabled-capabilities.md +24 -0
  223. package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +60 -0
  224. package/skills/weaver-e10-jiuchuanhui/references/general-helpers.md +59 -0
  225. package/skills/weaver-e10-jiuchuanhui/references/jiuchuanhui-entry.md +60 -0
  226. package/skills/weaver-e10-jiuchuanhui/references/sale.md +72 -0
  227. package/skills/weaver-e10-jiuchuanhui/references/source-manifest.json +2632 -0
  228. package/skills/weaver-e10-jucailin/SKILL.md +101 -0
  229. package/skills/weaver-e10-jucailin/product.json +8 -0
  230. package/skills/weaver-e10-jucailin/references/attend-read.md +73 -0
  231. package/skills/weaver-e10-jucailin/references/attend-write.md +82 -0
  232. package/skills/weaver-e10-jucailin/references/hr-contact.md +92 -0
  233. package/skills/weaver-e10-jucailin/references/hr-datasource.md +104 -0
  234. package/skills/weaver-e10-jucailin/references/hr-report.md +76 -0
  235. package/skills/weaver-e10-jucailin/references/recruit-read.md +76 -0
  236. package/skills/weaver-e10-jucailin/references/recruit-write.md +70 -0
  237. package/skills/weaver-e10-jucailin/references/safety-boundaries.md +35 -0
  238. package/skills/weaver-e10-jucailin/references/salary.md +110 -0
  239. package/skills/weaver-e10-jucailin/references/source-manifest.json +152 -0
  240. package/skills/weaver-e10-mail/SKILL.md +151 -0
  241. package/skills/weaver-e10-mail/product.json +8 -0
  242. package/skills/weaver-e10-mail/references/mail-agent-entry.md +47 -0
  243. package/skills/weaver-e10-mail/references/mail-attachment.md +30 -0
  244. package/skills/weaver-e10-mail/references/mail-blacklist.md +27 -0
  245. package/skills/weaver-e10-mail/references/mail-contacts.md +33 -0
  246. package/skills/weaver-e10-mail/references/mail-manage.md +44 -0
  247. package/skills/weaver-e10-mail/references/mail-read.md +76 -0
  248. package/skills/weaver-e10-mail/references/mail-send.md +43 -0
  249. package/skills/weaver-e10-mail/references/mail-sign.md +33 -0
  250. package/skills/weaver-e10-mail/references/mail-template.md +31 -0
  251. package/skills/weaver-e10-mail/references/safety-boundaries.md +32 -0
  252. package/skills/weaver-e10-plan/SKILL.md +139 -0
  253. package/skills/weaver-e10-plan/product.json +8 -0
  254. package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +123 -0
  255. package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +138 -0
  256. package/skills/weaver-e10-plan/references/plan-report-query.md +154 -0
  257. package/skills/weaver-e10-plan/references/plan-report-remind.md +104 -0
  258. package/skills/weaver-e10-plan/references/plan-report-write.md +162 -0
  259. package/skills/weaver-e10-plan/references/source-manifest.json +858 -0
  260. package/skills/weaver-e10-qiyecheng/SKILL.md +118 -0
  261. package/skills/weaver-e10-qiyecheng/product.json +8 -0
  262. package/skills/weaver-e10-qiyecheng/references/budget.md +65 -0
  263. package/skills/weaver-e10-qiyecheng/references/catalog.md +56 -0
  264. package/skills/weaver-e10-qiyecheng/references/expense-center.md +51 -0
  265. package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +57 -0
  266. package/skills/weaver-e10-qiyecheng/references/loan-management.md +59 -0
  267. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +698 -0
  268. package/skills/weaver-e10-shared/SKILL.md +86 -0
  269. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +127 -0
  270. package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/json-output-contract.md +34 -0
  271. package/skills/weaver-e10-shared/references/weaver-e10-installation.md +110 -0
  272. package/skills/weaver-e10-skill-maker/SKILL.md +77 -0
  273. package/skills/weaver-e10-skill-maker/product.json +8 -0
  274. package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +124 -0
  275. package/skills/weaver-e10-skill-maker/references/detector-validation.md +101 -0
  276. package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +230 -0
  277. package/skills/weaver-e10-skill-maker/references/post-generation-install.md +105 -0
  278. package/skills/weaver-e10-skill-maker/references/source-update-detection.md +261 -0
  279. package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +141 -0
  280. package/skills/weaver-e10-wenshuding/SKILL.md +157 -0
  281. package/skills/weaver-e10-wenshuding/product.json +8 -0
  282. package/skills/weaver-e10-wenshuding/references/archive-agent-entry.md +63 -0
  283. package/skills/weaver-e10-wenshuding/references/archive-borrow-car.md +52 -0
  284. package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +52 -0
  285. package/skills/weaver-e10-wenshuding/references/archive-disabled-capabilities.md +22 -0
  286. package/skills/weaver-e10-wenshuding/references/archive-download.md +48 -0
  287. package/skills/weaver-e10-wenshuding/references/archive-flow.md +46 -0
  288. package/skills/weaver-e10-wenshuding/references/archive-fonds.md +34 -0
  289. package/skills/weaver-e10-wenshuding/references/archive-info.md +33 -0
  290. package/skills/weaver-e10-wenshuding/references/archive-search.md +52 -0
  291. package/skills/weaver-e10-wenshuding/references/archive-upload.md +41 -0
  292. package/skills/weaver-e10-wenshuding/references/source-manifest.json +517 -0
  293. package/skills/weaver-e10-yepiaotong/SKILL.md +184 -0
  294. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-add.md +1 -1
  295. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-agent-entry.md +16 -9
  296. package/skills/weaver-e10-yepiaotong/references/invoice-browse-field-data.md +204 -0
  297. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-delete.md +1 -1
  298. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-detail.md +13 -5
  299. package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +28 -0
  300. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-download.md +9 -2
  301. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-enterprise-list.md +12 -4
  302. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-file-upload.md +9 -2
  303. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-import.md +16 -7
  304. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +120 -0
  305. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-field-rules.md +161 -0
  306. package/skills/weaver-e10-yepiaotong/references/invoice-issuing.md +99 -0
  307. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-ocr-preview.md +12 -4
  308. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-personal-list.md +12 -4
  309. package/skills/weaver-e10-yepiaotong/references/invoice-red.md +261 -0
  310. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +97 -0
  311. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-update.md +1 -1
  312. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-validation-preview.md +9 -2
  313. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +1340 -0
  314. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +845 -0
  315. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +94 -0
  316. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +449 -0
  317. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +266 -0
  318. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +494 -0
  319. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +1103 -0
  320. package/skills/weaver-e10-ziguanjia/SKILL.md +162 -0
  321. package/skills/weaver-e10-ziguanjia/product.json +8 -0
  322. package/skills/weaver-e10-ziguanjia/references/source-manifest.json +147 -0
  323. package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +65 -0
  324. package/skills/weaver-e10-ziguanjia/references/ziguanjia-create.md +45 -0
  325. package/skills/weaver-e10-ziguanjia/references/ziguanjia-depre.md +48 -0
  326. package/skills/weaver-e10-ziguanjia/references/ziguanjia-disabled-capabilities.md +22 -0
  327. package/skills/weaver-e10-ziguanjia/references/ziguanjia-purch.md +57 -0
  328. package/skills/weaver-e10-ziguanjia/references/ziguanjia-query.md +62 -0
  329. package/skills/weaver-e10-ziguanjia/references/ziguanjia-repair.md +83 -0
  330. package/skills/weaver-e10-ziguanjia/references/ziguanjia-resolve.md +49 -0
  331. package/skills/weaver-e10-ziguanjia/references/ziguanjia-return.md +70 -0
  332. package/skills/weaver-e10-ziguanjia/references/ziguanjia-update.md +45 -0
  333. package/skills/weaver-e10-ziguanjia/references/ziguanjia-use.md +60 -0
  334. package/skills/weaver-e10-ziguanjia/references/ziguanjia-viewlink.md +81 -0
  335. package/skills/weaver-work-cli-invoice/SKILL.md +0 -122
  336. package/skills/weaver-work-cli-invoice/references/invoice-disabled-capabilities.md +0 -26
  337. package/skills/weaver-work-cli-shared/SKILL.md +0 -63
  338. package/skills/weaver-work-cli-shared/references/e10-auth-and-session.md +0 -90
  339. package/skills/weaver-work-cli-shared/references/weaver-work-cli-installation.md +0 -73
  340. /package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/high-risk-write.md +0 -0
  341. /package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/product.json +0 -0
package/README.md CHANGED
@@ -9,12 +9,32 @@
9
9
  - Node.js >= 18
10
10
  - npm
11
11
 
12
+ ## 跨平台命令约定
13
+
14
+ 文档中的 CLI 示例按环境选择执行。完全相同的 `node`、`npm`、`git` 和 `weaver-work-cli` 命令可作为通用示例;涉及 JSON 输入、用户目录、文件删除/比对、Python 启动器或路径分隔符时,同时给 Windows PowerShell 和 macOS/Linux(bash/zsh)两套示例。Agent 应先判断当前环境:Windows 或 PowerShell 用 Windows 示例;macOS/Linux、bash 或 zsh 用 macOS/Linux 示例;不确定时先通过宿主环境或 `node -p "process.platform"` 判断。Windows/PowerShell 下不要使用 `printf`、`$HOME/...`、`~/...`、bash 反斜杠续行、`rm/ls/diff/python3` 等 Unix-only 写法。
15
+
16
+ 简单 JSON 输入优先使用 `--input-json`,避免不同 shell 对管道和引号的处理差异:
17
+
18
+ Windows PowerShell:
19
+
20
+ ```powershell
21
+ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0}'
22
+ ```
23
+
24
+ macOS/Linux(bash/zsh):
25
+
26
+ ```bash
27
+ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0}'
28
+ ```
29
+
30
+ 复杂 JSON 或包含多行内容时,建议先保存为 UTF-8 `.json` 文件,再按平台传给 `--input`:Windows PowerShell 用 `--input "C:\path\to\input.json"`,macOS/Linux 用 `--input "/path/to/input.json"`。当前 CLI 会兼容 Windows PowerShell 常见 UTF-8 BOM 文件。文档、提示词和 Skill Maker 生成内容都要保持这种双平台口径,不把单一平台命令写成唯一默认步骤。
31
+
12
32
  ## 下载后快速运行
13
33
 
14
34
  从代码仓库获取项目:
15
35
 
16
- ```bash
17
- git clone <git-repo-url> weaver-work-cli
36
+ ```text
37
+ git clone GIT_REPO_URL weaver-work-cli
18
38
  cd weaver-work-cli
19
39
  npm install
20
40
  npm run build
@@ -23,14 +43,14 @@ node dist/index.js --help
23
43
 
24
44
  开发阶段可以直接从源码运行:
25
45
 
26
- ```bash
46
+ ```text
27
47
  npm run dev -- --help
28
48
  npm run dev -- commands list
29
49
  ```
30
50
 
31
51
  构建后的本地验证:
32
52
 
33
- ```bash
53
+ ```text
34
54
  npm run build
35
55
  node dist/index.js --version
36
56
  node dist/index.js commands list
@@ -41,9 +61,22 @@ node dist/index.js doctor --e10
41
61
 
42
62
  从当前源码目录安装到全局命令:
43
63
 
64
+ Windows PowerShell:
65
+
66
+ ```powershell
67
+ # 在克隆到本地的仓库根目录执行(将示例路径替换为实际路径)
68
+ cd C:\path\to\weaver-work-cli
69
+ npm install
70
+ npm run build
71
+ npm link
72
+ weaver-work-cli --help
73
+ ```
74
+
75
+ macOS/Linux(bash/zsh):
76
+
44
77
  ```bash
45
- # 在克隆到本地的仓库根目录执行(将 <repo-root> 替换为实际路径)
46
- cd <repo-root>
78
+ # 在克隆到本地的仓库根目录执行(将示例路径替换为实际路径)
79
+ cd /path/to/weaver-work-cli
47
80
  npm install
48
81
  npm run build
49
82
  npm link
@@ -52,18 +85,31 @@ weaver-work-cli --help
52
85
 
53
86
  打包后全局安装:
54
87
 
88
+ Windows PowerShell:
89
+
90
+ ```powershell
91
+ # 在克隆到本地的仓库根目录执行(将示例路径替换为实际路径)
92
+ cd C:\path\to\weaver-work-cli
93
+ npm run build
94
+ npm pack
95
+ npm install -g .\weaver-work-cli-0.1.2.tgz
96
+ weaver-work-cli --version
97
+ ```
98
+
99
+ macOS/Linux(bash/zsh):
100
+
55
101
  ```bash
56
- # 在克隆到本地的仓库根目录执行(将 <repo-root> 替换为实际路径)
57
- cd <repo-root>
102
+ # 在克隆到本地的仓库根目录执行(将示例路径替换为实际路径)
103
+ cd /path/to/weaver-work-cli
58
104
  npm run build
59
105
  npm pack
60
- npm install -g ./weaver-work-cli-0.1.0.tgz
106
+ npm install -g ./weaver-work-cli-0.1.2.tgz
61
107
  weaver-work-cli --version
62
108
  ```
63
109
 
64
110
  发布到 npm 或公司私有 registry 后,可以直接安装:
65
111
 
66
- ```bash
112
+ ```text
67
113
  npm install -g weaver-work-cli
68
114
  weaver-work-cli setup invoice
69
115
  ```
@@ -74,28 +120,45 @@ Agent Skill 文档都包含在这个 npm 包中;普通 CLI 用户不需要再
74
120
 
75
121
  首次启用发票业务时:
76
122
 
77
- ```bash
123
+ ```text
78
124
  weaver-work-cli setup invoice
79
- weaver-work-cli auth login --base-url "https://weapp.xxx.cn"
125
+ weaver-work-cli auth login --base-url "https://weapp.xxx.cn" --agent_type "<当前智能体名称>"
80
126
  weaver-work-cli invoice schema
81
127
  ```
82
128
 
83
129
  如果要让 Codex/Agent 一键识别发票业务,把随包 Skill 安装到 Codex skills 目录:
84
130
 
85
- ```bash
131
+ ```text
86
132
  weaver-work-cli setup invoice --install-skill
87
133
  # 或只安装 Skill
88
- weaver-work-cli skills install invoice
134
+ weaver-work-cli skills install yepiaotong
89
135
  ```
90
136
 
91
- `skills install invoice` 会同时安装 `weaver-work-cli-shared` 和
92
- `weaver-work-cli-invoice`。默认目标目录是 `$CODEX_HOME/skills`,未设置
93
- `CODEX_HOME` 时使用 `~/.codex/skills`;需要自定义时可加
137
+ `skills install yepiaotong` 会同时安装 `weaver-e10-shared` 和
138
+ `weaver-e10-yepiaotong`。默认目标目录优先使用环境变量 `CODEX_HOME` 下的
139
+ `skills` 子目录;未设置 `CODEX_HOME` 时使用用户主目录下的 `.codex/skills`
140
+ (Windows PowerShell 示例:`"$env:USERPROFILE\.codex\skills"`);需要自定义时可加
94
141
  `--target-dir <path>`。默认目标面向 Codex CLI;WorkBuddy 等桌面 Agent 的
95
142
  用户级 Skill 目录不是默认目标,需显式指定:
96
143
 
144
+ Windows PowerShell:
145
+
146
+ ```powershell
147
+ weaver-work-cli skills install yepiaotong --target-dir "$env:USERPROFILE\.workbuddy\skills"
148
+ ```
149
+
150
+ macOS/Linux(bash/zsh):
151
+
97
152
  ```bash
98
- weaver-work-cli skills install invoice --target-dir ~/.workbuddy/skills
153
+ weaver-work-cli skills install yepiaotong --target-dir "$HOME/.workbuddy/skills"
154
+ ```
155
+
156
+ 如果要让 Agent 根据用户提供的新业务模块文档或代码同步生成/更新业务 CLI 和
157
+ weaver 风格的业务 Skill,在生成后按泛微技能检测工具做静态质检,并在检测
158
+ 通过后询问是否安装到当前智能体,可安装 Skill Maker:
159
+
160
+ ```text
161
+ weaver-work-cli skills install skill-maker
99
162
  ```
100
163
 
101
164
  各 Agent 环境的 skill 目录、从本地开发仓库升级到最新版的完整流程与验证
@@ -103,7 +166,7 @@ weaver-work-cli skills install invoice --target-dir ~/.workbuddy/skills
103
166
 
104
167
  卸载全局命令:
105
168
 
106
- ```bash
169
+ ```text
107
170
  npm unlink -g weaver-work-cli
108
171
  # 或
109
172
  npm uninstall -g weaver-work-cli
@@ -111,7 +174,7 @@ npm uninstall -g weaver-work-cli
111
174
 
112
175
  ## 常用命令
113
176
 
114
- ```bash
177
+ ```text
115
178
  weaver-work-cli --help
116
179
  weaver-work-cli --version
117
180
  weaver-work-cli commands list
@@ -121,15 +184,15 @@ weaver-work-cli docs copy
121
184
  weaver-work-cli doctor --e10
122
185
  weaver-work-cli setup invoice
123
186
  weaver-work-cli skills list
124
- weaver-work-cli skills read weaver-work-cli-invoice
125
- weaver-work-cli skills install invoice
187
+ weaver-work-cli skills read weaver-e10-yepiaotong
188
+ weaver-work-cli skills install yepiaotong
126
189
  weaver-work-cli invoice schema
127
- weaver-work-cli --json invoice run invoice.list --input -
190
+ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0}'
128
191
  ```
129
192
 
130
193
  为了兼容 E10 使用习惯,`auth` 命令保留在顶层;同时也支持 `e10 auth` 命名空间:
131
194
 
132
- ```bash
195
+ ```text
133
196
  weaver-work-cli auth status
134
197
  weaver-work-cli e10 auth status
135
198
  ```
@@ -138,43 +201,59 @@ weaver-work-cli e10 auth status
138
201
 
139
202
  方式一:浏览器 OAuth2.0 登录,推荐优先使用。
140
203
 
141
- ```bash
204
+ ```text
142
205
  weaver-work-cli auth login --base-url "https://weapp.xxx.cn"
143
206
  ```
144
207
 
145
208
  等价命令:
146
209
 
147
- ```bash
210
+ ```text
148
211
  weaver-work-cli auth oidc --base-url "https://weapp.xxx.cn"
149
212
  ```
150
213
 
214
+ 在小 E 宿主环境中,`auth login` / `auth oidc` / `auth xiaoe` 会先读取宿主注入的
215
+ `XIAOE_*` 环境变量,匹配当前登录域名对应的统一登录凭证。匹配成功时直接保存登录态,
216
+ 并固定使用 `agentType=Xiao.E`;未显式传域名时,会优先使用小 E 环境变量里的首个
217
+ 支持域名,其次才使用当前 profile 配置,仍没有支持域名时保留资料包默认域名
218
+ `https://www.e-cology.com.cn`。小 E 凭证校验失败、当前域名不在支持范围内,
219
+ 或客户切换了访问域名时,会自动降级到原浏览器 OAuth2.0 登录。业务命令在未显式
220
+ 指定 `--auth` / `--profile` 时,也会自动优先尝试小 E 统一登录。也可以显式使用:
221
+
222
+ ```text
223
+ weaver-work-cli auth xiaoe
224
+ ```
225
+
151
226
  默认本地回调地址为 `http://127.0.0.1:19800/callback`。如果端口被占用:
152
227
 
153
- ```bash
228
+ ```text
154
229
  weaver-work-cli auth login --base-url "https://weapp.xxx.cn" --port 19801
155
230
  ```
156
231
 
157
- 需要区分客户端来源时,可以指定 `agent_type`,默认值为 `weaver-work-cli`:
232
+ 需要区分客户端来源时,可以指定 `agent_type`。未显式传入时,CLI 会尝试从
233
+ `WEAVER_AGENT_TYPE`、`WORKBUDDY_AGENT_TYPE`、`CODEX_AGENT_TYPE` 以及
234
+ `WORKBUDDY_*` / `CODEX_*` 环境变量推断当前智能体,最后回落为 `weaver-work-cli`。
235
+ 浏览器授权地址会同时携带 `agent_type=<value>` 和 `from=<value>`,其中 `from`
236
+ 用于 E10 授权确认页展示客户端名称:
158
237
 
159
- ```bash
160
- weaver-work-cli auth login --base-url "https://weapp.xxx.cn" --agent_type weaver-work-cli
238
+ ```text
239
+ weaver-work-cli auth login --base-url "https://weapp.xxx.cn" --agent_type workbuddy
161
240
  ```
162
241
 
163
242
  方式二:手动写入浏览器中的 `ETEAMSID`。
164
243
 
165
- ```bash
244
+ ```text
166
245
  weaver-work-cli auth set --eteamsid "PCACCOUNT_xxx" --base-url "https://weapp.xxx.cn"
167
246
  ```
168
247
 
169
248
  如果 E10 环境需要区分 agent:
170
249
 
171
- ```bash
172
- weaver-work-cli auth set --eteamsid "PCACCOUNT_xxx" --base-url "https://weapp.xxx.cn" --agent_type weaver-work-cli
250
+ ```text
251
+ weaver-work-cli auth set --eteamsid "PCACCOUNT_xxx" --base-url "https://weapp.xxx.cn" --agent_type workbuddy
173
252
  ```
174
253
 
175
254
  查看登录状态:
176
255
 
177
- ```bash
256
+ ```text
178
257
  weaver-work-cli auth status
179
258
  weaver-work-cli auth status --no-check
180
259
  weaver-work-cli --json auth status --no-check
@@ -182,7 +261,7 @@ weaver-work-cli --json auth status --no-check
182
261
 
183
262
  查看当前用户:
184
263
 
185
- ```bash
264
+ ```text
186
265
  weaver-work-cli auth whoami
187
266
  weaver-work-cli auth whoami --live
188
267
  weaver-work-cli auth whoami --json
@@ -190,18 +269,14 @@ weaver-work-cli auth whoami --json
190
269
 
191
270
  清理当前 profile 的登录状态:
192
271
 
193
- ```bash
272
+ ```text
194
273
  weaver-work-cli auth logout
195
- weaver-work-cli --profile <name> auth logout
274
+ weaver-work-cli --profile PROFILE_NAME auth logout
196
275
  ```
197
276
 
198
277
  `auth logout` 只删除本地 auth 文件,不删除 profile 配置和 keychain 密钥。
199
278
 
200
- 导出 E10 登录态到当前 shell
201
-
202
- ```bash
203
- eval "$(weaver-work-cli auth export-weaver-env)"
204
- ```
279
+ 需要给子进程使用 E10 登录态时优先使用 `weaver-work-cli run ...`,两端一致可用。`weaver-work-cli auth export-weaver-env` 可按 shell 输出当前会话可执行的环境变量设置语句,默认 `--shell auto` 会在 Windows 输出 PowerShell 语法,在 macOS/Linux 输出 POSIX shell 语法;也可显式使用 `--shell powershell` 或 `--shell posix`。不要手工打印或转贴 `WEAVER_*` 值。
205
280
 
206
281
  导出的环境变量包括:
207
282
 
@@ -213,31 +288,45 @@ eval "$(weaver-work-cli auth export-weaver-env)"
213
288
 
214
289
  通过 `weaver-work-cli run` 执行外部命令时,CLI 会在前置钩子中自动注入上述 `WEAVER_*` 变量:
215
290
 
216
- ```bash
291
+ ```text
217
292
  weaver-work-cli run node -e "console.log(process.env.WEAVER_BASE_URL || 'no e10 auth')"
218
293
  ```
219
294
 
295
+ 如必须导出到当前 shell,按环境选择:
296
+
297
+ Windows PowerShell:
298
+
299
+ ```powershell
300
+ Invoke-Expression (weaver-work-cli auth export-weaver-env --shell powershell)
301
+ ```
302
+
303
+ macOS/Linux(bash/zsh):
304
+
305
+ ```bash
306
+ eval "$(weaver-work-cli auth export-weaver-env --shell posix)"
307
+ ```
308
+
220
309
  ## Profile 管理
221
310
 
222
311
  鉴权文件默认由 `weaver-work-cli` 独立管理:
223
312
 
224
- - 鉴权根目录:`~/.weaver-work-cli/e10`
225
- - Profile 目录:`~/.weaver-work-cli/e10/profiles/<profile>`
226
- - 当前激活 profile:`~/.weaver-work-cli/e10/profile`
313
+ - 鉴权根目录:通过 `weaver-work-cli auth root` 查看;默认位于用户主目录下的 `.weaver-work-cli/e10`(Windows PowerShell:`$env:USERPROFILE\.weaver-work-cli\e10`;macOS/Linux:`$HOME/.weaver-work-cli/e10`)
314
+ - Profile 目录:`profiles/<profile>`(位于鉴权根目录下)
315
+ - 当前激活 profile:`profile`(位于鉴权根目录下)
227
316
  - Keychain service/account:`weaver-work-cli` / `auth-key`
228
317
 
229
- CLI 默认不读取、不迁移 `e10-login` / `e10-cli` `~/.e10-cli` 登录态;
318
+ CLI 默认不读取、不迁移 `e10-login` / `e10-cli` 的旧 `.e10-cli` 登录态;
230
319
  打包给用户后,用户必须通过 `weaver-work-cli auth login` 或
231
320
  `weaver-work-cli auth set` 建立本插件自己的登录状态。确需复用外部 auth 文件时,
232
321
  可以显式使用 `--auth <path>` 或 `E10_AUTH_PATH`。
233
322
 
234
323
  常用 profile 命令:
235
324
 
236
- ```bash
325
+ ```text
237
326
  weaver-work-cli auth profile list
238
327
  weaver-work-cli auth profile current
239
- weaver-work-cli auth profile use <name>
240
- weaver-work-cli --profile <name> auth status
328
+ weaver-work-cli auth profile use PROFILE_NAME
329
+ weaver-work-cli --profile PROFILE_NAME auth status
241
330
  ```
242
331
 
243
332
  支持的鉴权相关环境变量:
@@ -274,8 +363,8 @@ src/
274
363
  services/ 可复用的非业务服务。
275
364
  docs/ 随包发布的 CLI 文档。
276
365
  skills/ 随包发布的 Agent Skills;入口 SKILL.md 做路由,细节放 references/。
277
- weaver-work-cli-shared/ 所有业务 Skill 共享的安装、认证、JSON 和写入规则。
278
- weaver-work-cli-invoice/ 业票通业务 Skill。
366
+ weaver-e10-shared/ 所有业务 Skill 共享的安装、认证、JSON 和写入规则。
367
+ weaver-e10-yepiaotong/ 业票通业务 Skill。
279
368
  skill-template/ 新增或重写业务 Skill 时使用的模板来源,参考 lark-cli 的 skill-template。
280
369
  templates/ 后续 shortcut 脚手架模板。
281
370
  scripts/ 维护脚本。
@@ -288,16 +377,16 @@ test/ Node 内置测试运行器测试。
288
377
 
289
378
  - `cmd`:稳定的系统/平台命令,例如 `config`、`doctor`、`run`、`e10 auth`、`skills list/read`。
290
379
  - `shortcuts`:业务友好的高层命令,例如 `invoice list`、`invoice import prepare`;按 `src/shortcuts/<business-module>` 分模块维护,模块内每个业务 operation 用相对独立的 class 封装。
291
- - `skills`:Agent 可读的使用说明和引用文件;按 `skills/weaver-work-cli-<business-module>` 分模块维护。业务入口 `SKILL.md` 只放路由、前置要求和执行原则,具体 operation、工作流、错误处理放到 `references/*.md`;公共规则只放在 `weaver-work-cli-shared`。
380
+ - `skills`:Agent 可读的使用说明和引用文件;按 `skills/weaver-e10-<business-module>` 分模块维护。业务入口 `SKILL.md` 只放路由、前置要求和执行原则,具体 operation、工作流、错误处理放到 `references/*.md`;公共规则只放在 `weaver-e10-shared`。
292
381
  - `skill-template`:维护者新增业务 Skill 时的模板来源,作用类似飞书 CLI 的 `skill-template`。`master-skill-template.md` 用于未来聚合入口,`skill-template.md` 用于单业务 Skill,`business-info.json` 记录路由关键词,`domains/*.md` 记录当前业务域应拆出的 reference 与 Agent 调优重点。
293
382
 
294
383
  ## 新增业务 Shortcut
295
384
 
296
385
  业务 shortcut 统一创建在 `src/shortcuts/<name>` 下,不和框架内置命令、E10 共享适配混放。
297
- 配套 Agent Skill 统一创建在 `skills/weaver-work-cli-<name>`:
386
+ 配套 Agent Skill 统一创建在 `skills/weaver-e10-<name>`:
298
387
 
299
388
  ```text
300
- skills/weaver-work-cli-<name>/
389
+ skills/weaver-e10-<name>/
301
390
  SKILL.md 入口路由:共享 Skill、schema、reference 索引、禁用边界。
302
391
  product.json 可选:业务 Skill 包元信息。
303
392
  references/
@@ -306,53 +395,62 @@ skills/weaver-work-cli-<name>/
306
395
  <name>-write.md prepare/apply 写入协议、确认和回查。
307
396
  ```
308
397
 
309
- 新增 Skill 时先参考 `skill-template/skill-template.md` 和 `skill-template/domains/<name>.md`。入口文件不要复制大段接口细节;让 Agent 按用户意图读取最小必要 reference。
398
+ 新增业务模块时默认同步维护 `src/shortcuts/<name>` 和 `skills/weaver-e10-<name>`。Skill Maker 会参考 `skill-template/skill-template.md`、`skill-template/domains/<name>.md` 和自身 CLI 生成规范;入口文件不要复制大段接口细节,让 Agent 按用户意图读取最小必要 reference。
310
399
 
311
- 当前已内置 `invoice` shortcut,用于 E10 业票通发票管理。典型调用:
400
+ 当前已内置 `yepiaotong` shortcut,用于 E10 业票通发票管理。典型调用:
312
401
 
313
- ```bash
314
- weaver-work-cli --json invoice list --input -
315
- weaver-work-cli --json invoice enterprise list --input -
316
- weaver-work-cli --json invoice get --fid <fid>
402
+ ```text
403
+ weaver-work-cli --json invoice list --input-json '{"page_size":10,"start_pos":0}'
404
+ weaver-work-cli --json invoice enterprise list --input-json '{"page_size":10,"start_pos":0}'
405
+ weaver-work-cli --json invoice get --fid INVOICE_FID
317
406
  weaver-work-cli --json invoice upload --file ./invoice.pdf
318
407
  weaver-work-cli --json invoice ocr preview --file ./invoice.pdf
319
- weaver-work-cli --json invoice validate preview --fid <fid> --scope personal
320
- weaver-work-cli --json invoice download --fid <fid> --file-id <fileId> --output ./invoice.pdf
408
+ weaver-work-cli --json invoice validate preview --fid INVOICE_FID --scope personal
409
+ weaver-work-cli --json invoice download --fid INVOICE_FID --file-id FILE_ID --output ./invoice.pdf
321
410
  ```
322
411
 
323
412
  写操作固定使用 `prepare -> apply`:
324
413
 
414
+ Windows PowerShell:
415
+
416
+ ```powershell
417
+ weaver-work-cli --json invoice run invoice.ocr.preview --input-json '{"file":"./invoice.pdf"}'
418
+
419
+ weaver-work-cli --json invoice import prepare --input-json '{"file":"./invoice.pdf","validate":true,"syncToOa":true}'
420
+
421
+ weaver-work-cli --json invoice import apply --input-json '{"file":"./invoice.pdf","continuation":"PREPARE_CONTINUATION","confirm":true}'
422
+ ```
423
+
424
+ macOS/Linux(bash/zsh):
425
+
325
426
  ```bash
326
- echo '{"file":"./invoice.pdf"}' \
327
- | weaver-work-cli --json invoice run invoice.ocr.preview --input -
427
+ weaver-work-cli --json invoice run invoice.ocr.preview --input-json '{"file":"./invoice.pdf"}'
328
428
 
329
- echo '{"file":"./invoice.pdf","validate":true,"syncToOa":true}' \
330
- | weaver-work-cli --json invoice import prepare --input -
429
+ weaver-work-cli --json invoice import prepare --input-json '{"file":"./invoice.pdf","validate":true,"syncToOa":true}'
331
430
 
332
- echo '{"file":"./invoice.pdf","continuation":"<prepare返回值>","confirm":true}' \
333
- | weaver-work-cli --json invoice import apply --input -
431
+ weaver-work-cli --json invoice import apply --input-json '{"file":"./invoice.pdf","continuation":"PREPARE_CONTINUATION","confirm":true}'
334
432
  ```
335
433
 
336
- Agent 应优先调用 `weaver-work-cli --json invoice run <operation> --input -`,并读取 `weaver-work-cli invoice schema` 获取 operation 契约。共享、转让和标签接口因缺少稳定 ID 来源和写后回查契约,当前不暴露给 Agent。
434
+ Agent 应优先调用 `weaver-work-cli --json invoice run <operation> --input-json '<json>'`,复杂输入或文件化输入使用 `--input <path>`,并读取 `weaver-work-cli invoice schema` 获取 operation 契约。共享、转让和标签接口因缺少稳定 ID 来源和写后回查契约,当前不暴露给 Agent。
337
435
 
338
436
  输出处理参考飞书 CLI 的 Agent 友好实践,但当前项目仍是轻量输出层:`ctx.output.write` 在 JSON 模式下直接把完整 envelope 打到 stdout,失败写 stderr;暂未提供通用 `--jq`、`--format table/ndjson` 或 `--page-all`。因此业务 Skill 会预先要求 Agent 控制响应量:列表默认 `page_size=10`,按业务分页字段继续;给用户只渲染摘要、关键字段、数量和下一步,超长详情/OCR/调试 JSON 优先落本地文件并返回路径。
339
437
 
340
438
  如需交付通用 Agent Skill 包:
341
439
 
342
- ```bash
440
+ ```text
343
441
  npm run build:skill -- invoice
344
442
  # 或保留的 invoice 便捷命令
345
- npm run build:invoice-skill
443
+ npm run build:yepiaotong-skill
346
444
  ```
347
445
 
348
- 输出文件默认在 `dist/weaver-work-cli-invoice-skill.zip`。该 zip 主要用于
446
+ 输出文件默认在 `dist/weaver-e10-yepiaotong-skill.zip`。该 zip 主要用于
349
447
  Codex/Agent 平台导入、离线分发或版本归档;日常推荐直接通过 npm 包内置内容
350
- 执行 `weaver-work-cli skills install invoice`。zip 包包含
351
- `weaver-work-cli-invoice` 和共享的 `weaver-work-cli-shared`,要求用户本机已安装
448
+ 执行 `weaver-work-cli skills install yepiaotong`。zip 包包含
449
+ `weaver-e10-yepiaotong` 和共享的 `weaver-e10-shared`,要求用户本机已安装
352
450
  可用的 `weaver-work-cli`。
353
451
  如需打包全部 Skill:
354
452
 
355
- ```bash
453
+ ```text
356
454
  npm run build:skill
357
455
  ```
358
456
 
@@ -418,7 +516,7 @@ export const builtinShortcuts: CliCommand[] = [
418
516
 
419
517
  验证命令是否注册成功:
420
518
 
421
- ```bash
519
+ ```text
422
520
  npm run build
423
521
  node dist/index.js commands list
424
522
  node dist/index.js workflow --help
@@ -428,7 +526,7 @@ node dist/index.js workflow --help
428
526
 
429
527
  ## 发布前验证
430
528
 
431
- ```bash
529
+ ```text
432
530
  npm run build
433
531
  npm test
434
532
  npm pack --dry-run
@@ -22,7 +22,7 @@ export const setupCommand = {
22
22
  ? options
23
23
  : {};
24
24
  const authFile = findAuthFile(ctx.cwd, ctx.getGlobalOptions());
25
- const packagedSkills = resolvePackagedSkillNames(SKILLS_DIR, 'invoice');
25
+ const packagedSkills = resolvePackagedSkillNames(SKILLS_DIR, 'yepiaotong');
26
26
  const checks = [
27
27
  {
28
28
  name: 'node',
@@ -36,7 +36,7 @@ export const setupCommand = {
36
36
  },
37
37
  {
38
38
  name: 'invoiceSkillPackaged',
39
- ok: packagedSkills.includes('weaver-work-cli-invoice'),
39
+ ok: packagedSkills.includes('weaver-e10-yepiaotong'),
40
40
  detail: packagedSkills.join(', '),
41
41
  },
42
42
  {
@@ -46,14 +46,14 @@ export const setupCommand = {
46
46
  },
47
47
  ];
48
48
  const skillInstall = opts.installSkill
49
- ? installPackagedSkills(SKILLS_DIR, opts.skillTargetDir || defaultCodexSkillsRoot(ctx.env), 'invoice')
49
+ ? installPackagedSkills(SKILLS_DIR, opts.skillTargetDir || defaultCodexSkillsRoot(ctx.env), 'yepiaotong')
50
50
  : null;
51
51
  const nextActions = [];
52
52
  if (!checks.find((check) => check.name === 'e10Auth')?.ok) {
53
- nextActions.push('Run: weaver-work-cli auth login --base-url <E10_BASE_URL>');
53
+ nextActions.push('Run: weaver-work-cli auth login --base-url <E10_BASE_URL> --agent_type <agent_type>');
54
54
  }
55
55
  if (!skillInstall) {
56
- nextActions.push('Optional Agent setup: weaver-work-cli skills install invoice');
56
+ nextActions.push('Optional Agent setup: weaver-work-cli skills install yepiaotong');
57
57
  }
58
58
  nextActions.push('Verify invoice operations: weaver-work-cli invoice schema');
59
59
  const ok = checks.every((check) => check.ok);
@@ -55,7 +55,7 @@ export const skillsCommand = {
55
55
  }));
56
56
  skills.command('install')
57
57
  .description('Install packaged skills into Codex skills directory')
58
- .argument('[target]', 'skill name, short name such as invoice, or all', 'all')
58
+ .argument('[target]', 'skill name (weaver-e10-* or legacy weaver-work-cli-*), short name such as skill-maker, or all', 'all')
59
59
  .option('--target-dir <path>', 'override target skills directory')
60
60
  .action(action((ctx, target, options) => {
61
61
  const opts = options && typeof options === 'object' ? options : {};
@@ -6,6 +6,7 @@ export class HookManager {
6
6
  beforeRun: [],
7
7
  afterRun: [],
8
8
  };
9
+ e10RequestInterceptors = [];
9
10
  register(hooks) {
10
11
  for (const [name, handler] of Object.entries(hooks)) {
11
12
  if (handler) {
@@ -38,4 +39,10 @@ export class HookManager {
38
39
  await hook(ctx, result);
39
40
  }
40
41
  }
42
+ registerE10RequestInterceptor(interceptor) {
43
+ this.e10RequestInterceptors.push(interceptor);
44
+ }
45
+ getE10RequestInterceptors() {
46
+ return this.e10RequestInterceptors;
47
+ }
41
48
  }
package/dist/index.js CHANGED
File without changes