weaver-work-cli 0.1.1 → 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 (351) hide show
  1. package/README.md +187 -76
  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 +160 -55
  7. package/dist/internal/e10/auth/crypto.js +7 -22
  8. package/dist/internal/e10/auth/session.js +1 -1
  9. package/dist/internal/e10/auth/xiaoe.js +268 -0
  10. package/dist/internal/e10/context.js +16 -2
  11. package/dist/internal/e10/index.js +1 -0
  12. package/dist/internal/e10/request-runtime.js +344 -0
  13. package/dist/internal/skills/install.js +48 -6
  14. package/dist/internal/skills/reader.js +27 -0
  15. package/dist/shortcuts/archive/continuation.js +70 -0
  16. package/dist/shortcuts/archive/errors.js +53 -0
  17. package/dist/shortcuts/archive/host.js +197 -0
  18. package/dist/shortcuts/archive/index.js +363 -0
  19. package/dist/shortcuts/archive/manifest.js +45 -0
  20. package/dist/shortcuts/archive/operations/archive-info.js +55 -0
  21. package/dist/shortcuts/archive/operations/borrow-car.js +146 -0
  22. package/dist/shortcuts/archive/operations/borrow-list.js +200 -0
  23. package/dist/shortcuts/archive/operations/confirm.js +46 -0
  24. package/dist/shortcuts/archive/operations/download.js +238 -0
  25. package/dist/shortcuts/archive/operations/flow-url.js +240 -0
  26. package/dist/shortcuts/archive/operations/fonds.js +95 -0
  27. package/dist/shortcuts/archive/operations/getPageUrl.js +137 -0
  28. package/dist/shortcuts/archive/operations/registry.js +43 -0
  29. package/dist/shortcuts/archive/operations/search.js +88 -0
  30. package/dist/shortcuts/archive/operations/shared.js +120 -0
  31. package/dist/shortcuts/archive/operations/types.js +23 -0
  32. package/dist/shortcuts/archive/operations/upload.js +182 -0
  33. package/dist/shortcuts/archive/operations.js +13 -0
  34. package/dist/shortcuts/archive/render/search-format.js +276 -0
  35. package/dist/shortcuts/archive/render/search-view.js +125 -0
  36. package/dist/shortcuts/asset/continuation.js +70 -0
  37. package/dist/shortcuts/asset/errors.js +67 -0
  38. package/dist/shortcuts/asset/host.js +438 -0
  39. package/dist/shortcuts/asset/index.js +255 -0
  40. package/dist/shortcuts/asset/manifest.js +471 -0
  41. package/dist/shortcuts/asset/operations/query.js +249 -0
  42. package/dist/shortcuts/asset/operations/registry.js +85 -0
  43. package/dist/shortcuts/asset/operations/shared.js +100 -0
  44. package/dist/shortcuts/asset/operations/type-cache.js +49 -0
  45. package/dist/shortcuts/asset/operations/types.js +1 -0
  46. package/dist/shortcuts/asset/operations/viewlink.js +117 -0
  47. package/dist/shortcuts/asset/operations/write.js +435 -0
  48. package/dist/shortcuts/asset/operations.js +9 -0
  49. package/dist/shortcuts/calendar/continuation.js +70 -0
  50. package/dist/shortcuts/calendar/errors.js +53 -0
  51. package/dist/shortcuts/calendar/host.js +148 -0
  52. package/dist/shortcuts/calendar/index.js +125 -0
  53. package/dist/shortcuts/calendar/manifest.js +26 -0
  54. package/dist/shortcuts/calendar/operations/read.js +259 -0
  55. package/dist/shortcuts/calendar/operations/registry.js +31 -0
  56. package/dist/shortcuts/calendar/operations/shared.js +132 -0
  57. package/dist/shortcuts/calendar/operations/types.js +25 -0
  58. package/dist/shortcuts/calendar/operations/write.js +439 -0
  59. package/dist/shortcuts/calendar/operations.js +8 -0
  60. package/dist/shortcuts/ehr/continuation.js +70 -0
  61. package/dist/shortcuts/ehr/errors.js +53 -0
  62. package/dist/shortcuts/ehr/host.js +213 -0
  63. package/dist/shortcuts/ehr/index.js +205 -0
  64. package/dist/shortcuts/ehr/manifest.js +47 -0
  65. package/dist/shortcuts/ehr/operations/attend-read.js +373 -0
  66. package/dist/shortcuts/ehr/operations/attend-write.js +514 -0
  67. package/dist/shortcuts/ehr/operations/hr-contact.js +363 -0
  68. package/dist/shortcuts/ehr/operations/hr-ds.js +298 -0
  69. package/dist/shortcuts/ehr/operations/hr-report.js +386 -0
  70. package/dist/shortcuts/ehr/operations/recruit-write.js +1629 -0
  71. package/dist/shortcuts/ehr/operations/recruit.js +803 -0
  72. package/dist/shortcuts/ehr/operations/registry.js +43 -0
  73. package/dist/shortcuts/ehr/operations/salary.js +319 -0
  74. package/dist/shortcuts/ehr/operations/shared.js +246 -0
  75. package/dist/shortcuts/ehr/operations/types.js +25 -0
  76. package/dist/shortcuts/ehr/operations.js +25 -0
  77. package/dist/shortcuts/esb/continuation.js +70 -0
  78. package/dist/shortcuts/esb/errors.js +65 -0
  79. package/dist/shortcuts/esb/host.js +187 -0
  80. package/dist/shortcuts/esb/index.js +112 -0
  81. package/dist/shortcuts/esb/manifest.js +91 -0
  82. package/dist/shortcuts/esb/operations/input-format.js +31 -0
  83. package/dist/shortcuts/esb/operations/registry.js +48 -0
  84. package/dist/shortcuts/esb/operations/shared.js +152 -0
  85. package/dist/shortcuts/esb/operations/trigger.js +76 -0
  86. package/dist/shortcuts/esb/operations/types.js +21 -0
  87. package/dist/shortcuts/esb/operations.js +15 -0
  88. package/dist/shortcuts/fna/continuation.js +70 -0
  89. package/dist/shortcuts/fna/errors.js +59 -0
  90. package/dist/shortcuts/fna/host.js +146 -0
  91. package/dist/shortcuts/fna/index.js +111 -0
  92. package/dist/shortcuts/fna/manifest.js +41 -0
  93. package/dist/shortcuts/fna/operations/budget.js +124 -0
  94. package/dist/shortcuts/fna/operations/expense-center.js +148 -0
  95. package/dist/shortcuts/fna/operations/invoice-writeoff.js +212 -0
  96. package/dist/shortcuts/fna/operations/loan.js +195 -0
  97. package/dist/shortcuts/fna/operations/registry.js +35 -0
  98. package/dist/shortcuts/fna/operations/shared.js +210 -0
  99. package/dist/shortcuts/fna/operations/types.js +25 -0
  100. package/dist/shortcuts/fna/operations.js +19 -0
  101. package/dist/shortcuts/hrm/errors.js +38 -0
  102. package/dist/shortcuts/hrm/host.js +156 -0
  103. package/dist/shortcuts/hrm/index.js +111 -0
  104. package/dist/shortcuts/hrm/manifest.js +32 -0
  105. package/dist/shortcuts/hrm/operations/employee.js +338 -0
  106. package/dist/shortcuts/hrm/operations/org.js +110 -0
  107. package/dist/shortcuts/hrm/operations/position.js +176 -0
  108. package/dist/shortcuts/hrm/operations/registry.js +33 -0
  109. package/dist/shortcuts/hrm/operations/shared.js +143 -0
  110. package/dist/shortcuts/hrm/operations/types.js +23 -0
  111. package/dist/shortcuts/hrm/operations.js +19 -0
  112. package/dist/shortcuts/index.js +20 -0
  113. package/dist/shortcuts/invoice/host.js +99 -94
  114. package/dist/shortcuts/invoice/index.js +65 -61
  115. package/dist/shortcuts/invoice/manifest.js +222 -14
  116. package/dist/shortcuts/invoice/operations/browse-field.js +17 -0
  117. package/dist/shortcuts/invoice/operations/issuing.js +198 -0
  118. package/dist/shortcuts/invoice/operations/ocr-preview.js +6 -3
  119. package/dist/shortcuts/invoice/operations/registry.js +17 -0
  120. package/dist/shortcuts/invoice/operations/reim.js +401 -0
  121. package/dist/shortcuts/invoice/operations/shared.js +271 -6
  122. package/dist/shortcuts/invoice/operations/validate-preview.js +1 -1
  123. package/dist/shortcuts/jiuchuanhui/cache.js +441 -0
  124. package/dist/shortcuts/jiuchuanhui/continuation.js +70 -0
  125. package/dist/shortcuts/jiuchuanhui/errors.js +59 -0
  126. package/dist/shortcuts/jiuchuanhui/host.js +159 -0
  127. package/dist/shortcuts/jiuchuanhui/index.js +109 -0
  128. package/dist/shortcuts/jiuchuanhui/manifest.js +469 -0
  129. package/dist/shortcuts/jiuchuanhui/operations/datajson.js +214 -0
  130. package/dist/shortcuts/jiuchuanhui/operations/esb.js +157 -0
  131. package/dist/shortcuts/jiuchuanhui/operations/generic.js +146 -0
  132. package/dist/shortcuts/jiuchuanhui/operations/registry.js +133 -0
  133. package/dist/shortcuts/jiuchuanhui/operations/shared.js +158 -0
  134. package/dist/shortcuts/jiuchuanhui/operations/types.js +1 -0
  135. package/dist/shortcuts/jiuchuanhui/operations.js +8 -0
  136. package/dist/shortcuts/mail/continuation.js +70 -0
  137. package/dist/shortcuts/mail/errors.js +53 -0
  138. package/dist/shortcuts/mail/host.js +182 -0
  139. package/dist/shortcuts/mail/index.js +519 -0
  140. package/dist/shortcuts/mail/manifest.js +38 -0
  141. package/dist/shortcuts/mail/operations/mail-blacklist.js +79 -0
  142. package/dist/shortcuts/mail/operations/mail-contacts.js +195 -0
  143. package/dist/shortcuts/mail/operations/mail-manage.js +335 -0
  144. package/dist/shortcuts/mail/operations/mail-read.js +508 -0
  145. package/dist/shortcuts/mail/operations/mail-send.js +474 -0
  146. package/dist/shortcuts/mail/operations/mail-sign.js +203 -0
  147. package/dist/shortcuts/mail/operations/mail-template.js +170 -0
  148. package/dist/shortcuts/mail/operations/registry.js +41 -0
  149. package/dist/shortcuts/mail/operations/shared.js +64 -0
  150. package/dist/shortcuts/mail/operations/types.js +27 -0
  151. package/dist/shortcuts/mail/operations.js +19 -0
  152. package/dist/shortcuts/plan/continuation.js +70 -0
  153. package/dist/shortcuts/plan/errors.js +70 -0
  154. package/dist/shortcuts/plan/host.js +180 -0
  155. package/dist/shortcuts/plan/index.js +150 -0
  156. package/dist/shortcuts/plan/manifest.js +53 -0
  157. package/dist/shortcuts/plan/operations/link.js +256 -0
  158. package/dist/shortcuts/plan/operations/read.js +259 -0
  159. package/dist/shortcuts/plan/operations/registry.js +33 -0
  160. package/dist/shortcuts/plan/operations/shared.js +246 -0
  161. package/dist/shortcuts/plan/operations/types.js +49 -0
  162. package/dist/shortcuts/plan/operations/version.js +49 -0
  163. package/dist/shortcuts/plan/operations/write.js +710 -0
  164. package/dist/shortcuts/plan/operations.js +8 -0
  165. package/docs/SKILL.md +11 -7
  166. package/docs/_catalog.md +23 -5
  167. package/docs/agent-invoice.md +31 -10
  168. package/docs/agent-skill-install.md +211 -0
  169. package/docs/calendar.md +87 -0
  170. package/docs/e10-auth.md +28 -9
  171. package/docs/ehr.md +186 -0
  172. package/docs/esb.md +64 -0
  173. package/docs/fna.md +72 -0
  174. package/docs/hrm.md +89 -0
  175. package/docs/invoice.md +66 -20
  176. package/docs/jiuchuanhui.md +131 -0
  177. package/docs/operation-manual.md +443 -0
  178. package/docs/plan.md +82 -0
  179. package/docs/wenshuding.md +129 -0
  180. package/docs/ziguanjia.md +89 -0
  181. package/package.json +4 -4
  182. package/scripts/package-skill.mjs +127 -34
  183. package/scripts/postbuild.mjs +13 -0
  184. package/skill-template/business-info.json +13 -2
  185. package/skill-template/domains/calendar.md +15 -0
  186. package/skill-template/domains/esb.md +13 -0
  187. package/skill-template/domains/hrm.md +16 -0
  188. package/skill-template/domains/jiuchuanhui.md +23 -0
  189. package/skill-template/domains/jucailin.md +22 -0
  190. package/skill-template/domains/mail.md +21 -0
  191. package/skill-template/domains/plan.md +17 -0
  192. package/skill-template/domains/qiyecheng.md +17 -0
  193. package/skill-template/domains/shared.md +9 -3
  194. package/skill-template/domains/skill-maker.md +10 -0
  195. package/skill-template/domains/wenshuding.md +22 -0
  196. package/skill-template/domains/{invoice.md → yepiaotong.md} +4 -0
  197. package/skill-template/domains/ziguanjia.md +21 -0
  198. package/skill-template/master-skill-template.md +12 -6
  199. package/skill-template/skill-template.md +40 -9
  200. package/skills/weaver-e10-calendar/SKILL.md +101 -0
  201. package/skills/weaver-e10-calendar/product.json +8 -0
  202. package/skills/weaver-e10-calendar/references/calendar-app-check.md +65 -0
  203. package/skills/weaver-e10-calendar/references/calendar-dict.md +55 -0
  204. package/skills/weaver-e10-calendar/references/calendar-query.md +70 -0
  205. package/skills/weaver-e10-calendar/references/calendar-write.md +97 -0
  206. package/skills/weaver-e10-calendar/references/source-manifest.json +54 -0
  207. package/skills/weaver-e10-esb/SKILL.md +102 -0
  208. package/skills/weaver-e10-esb/product.json +8 -0
  209. package/skills/weaver-e10-esb/references/input-format.md +52 -0
  210. package/skills/weaver-e10-esb/references/source-manifest.json +242 -0
  211. package/skills/weaver-e10-esb/references/trigger.md +99 -0
  212. package/skills/weaver-e10-hrm/SKILL.md +87 -0
  213. package/skills/weaver-e10-hrm/product.json +8 -0
  214. package/skills/weaver-e10-hrm/references/employee.md +109 -0
  215. package/skills/weaver-e10-hrm/references/org.md +95 -0
  216. package/skills/weaver-e10-hrm/references/position.md +95 -0
  217. package/skills/weaver-e10-hrm/references/source-manifest.json +121 -0
  218. package/skills/weaver-e10-jiuchuanhui/SKILL.md +174 -0
  219. package/skills/weaver-e10-jiuchuanhui/product.json +8 -0
  220. package/skills/weaver-e10-jiuchuanhui/references/cache.md +110 -0
  221. package/skills/weaver-e10-jiuchuanhui/references/clue.md +61 -0
  222. package/skills/weaver-e10-jiuchuanhui/references/contact-plan.md +56 -0
  223. package/skills/weaver-e10-jiuchuanhui/references/contact-records.md +48 -0
  224. package/skills/weaver-e10-jiuchuanhui/references/contact.md +56 -0
  225. package/skills/weaver-e10-jiuchuanhui/references/customer.md +69 -0
  226. package/skills/weaver-e10-jiuchuanhui/references/disabled-capabilities.md +24 -0
  227. package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +60 -0
  228. package/skills/weaver-e10-jiuchuanhui/references/general-helpers.md +59 -0
  229. package/skills/weaver-e10-jiuchuanhui/references/jiuchuanhui-entry.md +60 -0
  230. package/skills/weaver-e10-jiuchuanhui/references/sale.md +72 -0
  231. package/skills/weaver-e10-jiuchuanhui/references/source-manifest.json +2632 -0
  232. package/skills/weaver-e10-jucailin/SKILL.md +101 -0
  233. package/skills/weaver-e10-jucailin/product.json +8 -0
  234. package/skills/weaver-e10-jucailin/references/attend-read.md +73 -0
  235. package/skills/weaver-e10-jucailin/references/attend-write.md +82 -0
  236. package/skills/weaver-e10-jucailin/references/hr-contact.md +92 -0
  237. package/skills/weaver-e10-jucailin/references/hr-datasource.md +104 -0
  238. package/skills/weaver-e10-jucailin/references/hr-report.md +76 -0
  239. package/skills/weaver-e10-jucailin/references/recruit-read.md +76 -0
  240. package/skills/weaver-e10-jucailin/references/recruit-write.md +70 -0
  241. package/skills/weaver-e10-jucailin/references/safety-boundaries.md +35 -0
  242. package/skills/weaver-e10-jucailin/references/salary.md +110 -0
  243. package/skills/weaver-e10-jucailin/references/source-manifest.json +152 -0
  244. package/skills/weaver-e10-mail/SKILL.md +151 -0
  245. package/skills/weaver-e10-mail/product.json +8 -0
  246. package/skills/weaver-e10-mail/references/mail-agent-entry.md +47 -0
  247. package/skills/weaver-e10-mail/references/mail-attachment.md +30 -0
  248. package/skills/weaver-e10-mail/references/mail-blacklist.md +27 -0
  249. package/skills/weaver-e10-mail/references/mail-contacts.md +33 -0
  250. package/skills/weaver-e10-mail/references/mail-manage.md +44 -0
  251. package/skills/weaver-e10-mail/references/mail-read.md +76 -0
  252. package/skills/weaver-e10-mail/references/mail-send.md +43 -0
  253. package/skills/weaver-e10-mail/references/mail-sign.md +33 -0
  254. package/skills/weaver-e10-mail/references/mail-template.md +31 -0
  255. package/skills/weaver-e10-mail/references/safety-boundaries.md +32 -0
  256. package/skills/weaver-e10-plan/SKILL.md +139 -0
  257. package/skills/weaver-e10-plan/product.json +8 -0
  258. package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +123 -0
  259. package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +138 -0
  260. package/skills/weaver-e10-plan/references/plan-report-query.md +154 -0
  261. package/skills/weaver-e10-plan/references/plan-report-remind.md +104 -0
  262. package/skills/weaver-e10-plan/references/plan-report-write.md +162 -0
  263. package/skills/weaver-e10-plan/references/source-manifest.json +858 -0
  264. package/skills/weaver-e10-qiyecheng/SKILL.md +118 -0
  265. package/skills/weaver-e10-qiyecheng/product.json +8 -0
  266. package/skills/weaver-e10-qiyecheng/references/budget.md +65 -0
  267. package/skills/weaver-e10-qiyecheng/references/catalog.md +56 -0
  268. package/skills/weaver-e10-qiyecheng/references/expense-center.md +51 -0
  269. package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +57 -0
  270. package/skills/weaver-e10-qiyecheng/references/loan-management.md +59 -0
  271. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +698 -0
  272. package/skills/weaver-e10-shared/SKILL.md +86 -0
  273. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +127 -0
  274. package/skills/weaver-e10-shared/references/json-output-contract.md +120 -0
  275. package/skills/weaver-e10-shared/references/weaver-e10-installation.md +110 -0
  276. package/skills/weaver-e10-skill-maker/SKILL.md +77 -0
  277. package/skills/weaver-e10-skill-maker/product.json +8 -0
  278. package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +124 -0
  279. package/skills/weaver-e10-skill-maker/references/detector-validation.md +101 -0
  280. package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +230 -0
  281. package/skills/weaver-e10-skill-maker/references/post-generation-install.md +105 -0
  282. package/skills/weaver-e10-skill-maker/references/source-update-detection.md +261 -0
  283. package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +141 -0
  284. package/skills/weaver-e10-wenshuding/SKILL.md +157 -0
  285. package/skills/weaver-e10-wenshuding/product.json +8 -0
  286. package/skills/weaver-e10-wenshuding/references/archive-agent-entry.md +63 -0
  287. package/skills/weaver-e10-wenshuding/references/archive-borrow-car.md +52 -0
  288. package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +52 -0
  289. package/skills/weaver-e10-wenshuding/references/archive-disabled-capabilities.md +22 -0
  290. package/skills/weaver-e10-wenshuding/references/archive-download.md +48 -0
  291. package/skills/weaver-e10-wenshuding/references/archive-flow.md +46 -0
  292. package/skills/weaver-e10-wenshuding/references/archive-fonds.md +34 -0
  293. package/skills/weaver-e10-wenshuding/references/archive-info.md +33 -0
  294. package/skills/weaver-e10-wenshuding/references/archive-search.md +52 -0
  295. package/skills/weaver-e10-wenshuding/references/archive-upload.md +41 -0
  296. package/skills/weaver-e10-wenshuding/references/source-manifest.json +517 -0
  297. package/skills/weaver-e10-yepiaotong/SKILL.md +184 -0
  298. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-add.md +1 -1
  299. package/skills/weaver-e10-yepiaotong/references/invoice-agent-entry.md +47 -0
  300. package/skills/weaver-e10-yepiaotong/references/invoice-browse-field-data.md +204 -0
  301. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-delete.md +1 -1
  302. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-detail.md +13 -5
  303. package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +28 -0
  304. package/skills/weaver-e10-yepiaotong/references/invoice-download.md +31 -0
  305. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +45 -0
  306. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-file-upload.md +15 -4
  307. package/skills/weaver-e10-yepiaotong/references/invoice-import.md +45 -0
  308. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +120 -0
  309. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-field-rules.md +161 -0
  310. package/skills/weaver-e10-yepiaotong/references/invoice-issuing.md +99 -0
  311. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-ocr-preview.md +14 -4
  312. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +58 -0
  313. package/skills/weaver-e10-yepiaotong/references/invoice-red.md +261 -0
  314. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +97 -0
  315. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-update.md +1 -1
  316. package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-validation-preview.md +10 -3
  317. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +1340 -0
  318. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +845 -0
  319. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +94 -0
  320. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +449 -0
  321. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +266 -0
  322. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +494 -0
  323. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +1103 -0
  324. package/skills/weaver-e10-ziguanjia/SKILL.md +162 -0
  325. package/skills/weaver-e10-ziguanjia/product.json +8 -0
  326. package/skills/weaver-e10-ziguanjia/references/source-manifest.json +147 -0
  327. package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +65 -0
  328. package/skills/weaver-e10-ziguanjia/references/ziguanjia-create.md +45 -0
  329. package/skills/weaver-e10-ziguanjia/references/ziguanjia-depre.md +48 -0
  330. package/skills/weaver-e10-ziguanjia/references/ziguanjia-disabled-capabilities.md +22 -0
  331. package/skills/weaver-e10-ziguanjia/references/ziguanjia-purch.md +57 -0
  332. package/skills/weaver-e10-ziguanjia/references/ziguanjia-query.md +62 -0
  333. package/skills/weaver-e10-ziguanjia/references/ziguanjia-repair.md +83 -0
  334. package/skills/weaver-e10-ziguanjia/references/ziguanjia-resolve.md +49 -0
  335. package/skills/weaver-e10-ziguanjia/references/ziguanjia-return.md +70 -0
  336. package/skills/weaver-e10-ziguanjia/references/ziguanjia-update.md +45 -0
  337. package/skills/weaver-e10-ziguanjia/references/ziguanjia-use.md +60 -0
  338. package/skills/weaver-e10-ziguanjia/references/ziguanjia-viewlink.md +81 -0
  339. package/skills/weaver-work-cli-invoice/SKILL.md +0 -103
  340. package/skills/weaver-work-cli-invoice/references/invoice-agent-entry.md +0 -38
  341. package/skills/weaver-work-cli-invoice/references/invoice-disabled-capabilities.md +0 -26
  342. package/skills/weaver-work-cli-invoice/references/invoice-download.md +0 -22
  343. package/skills/weaver-work-cli-invoice/references/invoice-enterprise-list.md +0 -35
  344. package/skills/weaver-work-cli-invoice/references/invoice-import.md +0 -28
  345. package/skills/weaver-work-cli-invoice/references/invoice-personal-list.md +0 -47
  346. package/skills/weaver-work-cli-shared/SKILL.md +0 -53
  347. package/skills/weaver-work-cli-shared/references/e10-auth-and-session.md +0 -83
  348. package/skills/weaver-work-cli-shared/references/json-output-contract.md +0 -61
  349. package/skills/weaver-work-cli-shared/references/weaver-work-cli-installation.md +0 -61
  350. /package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/high-risk-write.md +0 -0
  351. /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,53 @@ 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`;需要自定义时可加
94
- `--target-dir <path>`。
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"`);需要自定义时可加
141
+ `--target-dir <path>`。默认目标面向 Codex CLI;WorkBuddy 等桌面 Agent 的
142
+ 用户级 Skill 目录不是默认目标,需显式指定:
95
143
 
96
- 卸载全局命令:
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):
97
151
 
98
152
  ```bash
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
162
+ ```
163
+
164
+ 各 Agent 环境的 skill 目录、从本地开发仓库升级到最新版的完整流程与验证
165
+ 步骤见 `docs/agent-skill-install.md`。
166
+
167
+ 卸载全局命令:
168
+
169
+ ```text
99
170
  npm unlink -g weaver-work-cli
100
171
  # 或
101
172
  npm uninstall -g weaver-work-cli
@@ -103,7 +174,7 @@ npm uninstall -g weaver-work-cli
103
174
 
104
175
  ## 常用命令
105
176
 
106
- ```bash
177
+ ```text
107
178
  weaver-work-cli --help
108
179
  weaver-work-cli --version
109
180
  weaver-work-cli commands list
@@ -113,15 +184,15 @@ weaver-work-cli docs copy
113
184
  weaver-work-cli doctor --e10
114
185
  weaver-work-cli setup invoice
115
186
  weaver-work-cli skills list
116
- weaver-work-cli skills read weaver-work-cli-invoice
117
- weaver-work-cli skills install invoice
187
+ weaver-work-cli skills read weaver-e10-yepiaotong
188
+ weaver-work-cli skills install yepiaotong
118
189
  weaver-work-cli invoice schema
119
- 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}'
120
191
  ```
121
192
 
122
193
  为了兼容 E10 使用习惯,`auth` 命令保留在顶层;同时也支持 `e10 auth` 命名空间:
123
194
 
124
- ```bash
195
+ ```text
125
196
  weaver-work-cli auth status
126
197
  weaver-work-cli e10 auth status
127
198
  ```
@@ -130,43 +201,59 @@ weaver-work-cli e10 auth status
130
201
 
131
202
  方式一:浏览器 OAuth2.0 登录,推荐优先使用。
132
203
 
133
- ```bash
204
+ ```text
134
205
  weaver-work-cli auth login --base-url "https://weapp.xxx.cn"
135
206
  ```
136
207
 
137
208
  等价命令:
138
209
 
139
- ```bash
210
+ ```text
140
211
  weaver-work-cli auth oidc --base-url "https://weapp.xxx.cn"
141
212
  ```
142
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
+
143
226
  默认本地回调地址为 `http://127.0.0.1:19800/callback`。如果端口被占用:
144
227
 
145
- ```bash
228
+ ```text
146
229
  weaver-work-cli auth login --base-url "https://weapp.xxx.cn" --port 19801
147
230
  ```
148
231
 
149
- 需要区分客户端来源时,可以指定 `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 授权确认页展示客户端名称:
150
237
 
151
- ```bash
152
- 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
153
240
  ```
154
241
 
155
242
  方式二:手动写入浏览器中的 `ETEAMSID`。
156
243
 
157
- ```bash
244
+ ```text
158
245
  weaver-work-cli auth set --eteamsid "PCACCOUNT_xxx" --base-url "https://weapp.xxx.cn"
159
246
  ```
160
247
 
161
248
  如果 E10 环境需要区分 agent:
162
249
 
163
- ```bash
164
- 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
165
252
  ```
166
253
 
167
254
  查看登录状态:
168
255
 
169
- ```bash
256
+ ```text
170
257
  weaver-work-cli auth status
171
258
  weaver-work-cli auth status --no-check
172
259
  weaver-work-cli --json auth status --no-check
@@ -174,7 +261,7 @@ weaver-work-cli --json auth status --no-check
174
261
 
175
262
  查看当前用户:
176
263
 
177
- ```bash
264
+ ```text
178
265
  weaver-work-cli auth whoami
179
266
  weaver-work-cli auth whoami --live
180
267
  weaver-work-cli auth whoami --json
@@ -182,18 +269,14 @@ weaver-work-cli auth whoami --json
182
269
 
183
270
  清理当前 profile 的登录状态:
184
271
 
185
- ```bash
272
+ ```text
186
273
  weaver-work-cli auth logout
187
- weaver-work-cli --profile <name> auth logout
274
+ weaver-work-cli --profile PROFILE_NAME auth logout
188
275
  ```
189
276
 
190
277
  `auth logout` 只删除本地 auth 文件,不删除 profile 配置和 keychain 密钥。
191
278
 
192
- 导出 E10 登录态到当前 shell
193
-
194
- ```bash
195
- eval "$(weaver-work-cli auth export-weaver-env)"
196
- ```
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_*` 值。
197
280
 
198
281
  导出的环境变量包括:
199
282
 
@@ -205,31 +288,45 @@ eval "$(weaver-work-cli auth export-weaver-env)"
205
288
 
206
289
  通过 `weaver-work-cli run` 执行外部命令时,CLI 会在前置钩子中自动注入上述 `WEAVER_*` 变量:
207
290
 
208
- ```bash
291
+ ```text
209
292
  weaver-work-cli run node -e "console.log(process.env.WEAVER_BASE_URL || 'no e10 auth')"
210
293
  ```
211
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
+
212
309
  ## Profile 管理
213
310
 
214
311
  鉴权文件默认由 `weaver-work-cli` 独立管理:
215
312
 
216
- - 鉴权根目录:`~/.weaver-work-cli/e10`
217
- - Profile 目录:`~/.weaver-work-cli/e10/profiles/<profile>`
218
- - 当前激活 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`(位于鉴权根目录下)
219
316
  - Keychain service/account:`weaver-work-cli` / `auth-key`
220
317
 
221
- CLI 默认不读取、不迁移 `e10-login` / `e10-cli` `~/.e10-cli` 登录态;
318
+ CLI 默认不读取、不迁移 `e10-login` / `e10-cli` 的旧 `.e10-cli` 登录态;
222
319
  打包给用户后,用户必须通过 `weaver-work-cli auth login` 或
223
320
  `weaver-work-cli auth set` 建立本插件自己的登录状态。确需复用外部 auth 文件时,
224
321
  可以显式使用 `--auth <path>` 或 `E10_AUTH_PATH`。
225
322
 
226
323
  常用 profile 命令:
227
324
 
228
- ```bash
325
+ ```text
229
326
  weaver-work-cli auth profile list
230
327
  weaver-work-cli auth profile current
231
- weaver-work-cli auth profile use <name>
232
- 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
233
330
  ```
234
331
 
235
332
  支持的鉴权相关环境变量:
@@ -266,8 +363,8 @@ src/
266
363
  services/ 可复用的非业务服务。
267
364
  docs/ 随包发布的 CLI 文档。
268
365
  skills/ 随包发布的 Agent Skills;入口 SKILL.md 做路由,细节放 references/。
269
- weaver-work-cli-shared/ 所有业务 Skill 共享的安装、认证、JSON 和写入规则。
270
- weaver-work-cli-invoice/ 业票通业务 Skill。
366
+ weaver-e10-shared/ 所有业务 Skill 共享的安装、认证、JSON 和写入规则。
367
+ weaver-e10-yepiaotong/ 业票通业务 Skill。
271
368
  skill-template/ 新增或重写业务 Skill 时使用的模板来源,参考 lark-cli 的 skill-template。
272
369
  templates/ 后续 shortcut 脚手架模板。
273
370
  scripts/ 维护脚本。
@@ -280,16 +377,16 @@ test/ Node 内置测试运行器测试。
280
377
 
281
378
  - `cmd`:稳定的系统/平台命令,例如 `config`、`doctor`、`run`、`e10 auth`、`skills list/read`。
282
379
  - `shortcuts`:业务友好的高层命令,例如 `invoice list`、`invoice import prepare`;按 `src/shortcuts/<business-module>` 分模块维护,模块内每个业务 operation 用相对独立的 class 封装。
283
- - `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`。
284
381
  - `skill-template`:维护者新增业务 Skill 时的模板来源,作用类似飞书 CLI 的 `skill-template`。`master-skill-template.md` 用于未来聚合入口,`skill-template.md` 用于单业务 Skill,`business-info.json` 记录路由关键词,`domains/*.md` 记录当前业务域应拆出的 reference 与 Agent 调优重点。
285
382
 
286
383
  ## 新增业务 Shortcut
287
384
 
288
385
  业务 shortcut 统一创建在 `src/shortcuts/<name>` 下,不和框架内置命令、E10 共享适配混放。
289
- 配套 Agent Skill 统一创建在 `skills/weaver-work-cli-<name>`:
386
+ 配套 Agent Skill 统一创建在 `skills/weaver-e10-<name>`:
290
387
 
291
388
  ```text
292
- skills/weaver-work-cli-<name>/
389
+ skills/weaver-e10-<name>/
293
390
  SKILL.md 入口路由:共享 Skill、schema、reference 索引、禁用边界。
294
391
  product.json 可选:业务 Skill 包元信息。
295
392
  references/
@@ -298,48 +395,62 @@ skills/weaver-work-cli-<name>/
298
395
  <name>-write.md prepare/apply 写入协议、确认和回查。
299
396
  ```
300
397
 
301
- 新增 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。
302
399
 
303
- 当前已内置 `invoice` shortcut,用于 E10 业票通发票管理。典型调用:
400
+ 当前已内置 `yepiaotong` shortcut,用于 E10 业票通发票管理。典型调用:
304
401
 
305
- ```bash
306
- weaver-work-cli --json invoice list --input -
307
- weaver-work-cli --json invoice enterprise list --input -
308
- 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
309
406
  weaver-work-cli --json invoice upload --file ./invoice.pdf
310
407
  weaver-work-cli --json invoice ocr preview --file ./invoice.pdf
311
- weaver-work-cli --json invoice validate preview --fid <fid> --scope personal
312
- 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
313
410
  ```
314
411
 
315
412
  写操作固定使用 `prepare -> apply`:
316
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
+
317
426
  ```bash
318
- echo '{"file":"./invoice.pdf","validate":false,"syncToOa":false}' \
319
- | weaver-work-cli --json invoice import prepare --input -
427
+ weaver-work-cli --json invoice run invoice.ocr.preview --input-json '{"file":"./invoice.pdf"}'
320
428
 
321
- echo '{"file":"./invoice.pdf","continuation":"<prepare返回值>","confirm":true}' \
322
- | weaver-work-cli --json invoice import apply --input -
429
+ weaver-work-cli --json invoice import prepare --input-json '{"file":"./invoice.pdf","validate":true,"syncToOa":true}'
430
+
431
+ weaver-work-cli --json invoice import apply --input-json '{"file":"./invoice.pdf","continuation":"PREPARE_CONTINUATION","confirm":true}'
323
432
  ```
324
433
 
325
- 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。
435
+
436
+ 输出处理参考飞书 CLI 的 Agent 友好实践,但当前项目仍是轻量输出层:`ctx.output.write` 在 JSON 模式下直接把完整 envelope 打到 stdout,失败写 stderr;暂未提供通用 `--jq`、`--format table/ndjson` 或 `--page-all`。因此业务 Skill 会预先要求 Agent 控制响应量:列表默认 `page_size=10`,按业务分页字段继续;给用户只渲染摘要、关键字段、数量和下一步,超长详情/OCR/调试 JSON 优先落本地文件并返回路径。
326
437
 
327
438
  如需交付通用 Agent Skill 包:
328
439
 
329
- ```bash
440
+ ```text
330
441
  npm run build:skill -- invoice
331
442
  # 或保留的 invoice 便捷命令
332
- npm run build:invoice-skill
443
+ npm run build:yepiaotong-skill
333
444
  ```
334
445
 
335
- 输出文件默认在 `dist/weaver-work-cli-invoice-skill.zip`。该 zip 主要用于
446
+ 输出文件默认在 `dist/weaver-e10-yepiaotong-skill.zip`。该 zip 主要用于
336
447
  Codex/Agent 平台导入、离线分发或版本归档;日常推荐直接通过 npm 包内置内容
337
- 执行 `weaver-work-cli skills install invoice`。zip 包包含
338
- `weaver-work-cli-invoice` 和共享的 `weaver-work-cli-shared`,要求用户本机已安装
448
+ 执行 `weaver-work-cli skills install yepiaotong`。zip 包包含
449
+ `weaver-e10-yepiaotong` 和共享的 `weaver-e10-shared`,要求用户本机已安装
339
450
  可用的 `weaver-work-cli`。
340
451
  如需打包全部 Skill:
341
452
 
342
- ```bash
453
+ ```text
343
454
  npm run build:skill
344
455
  ```
345
456
 
@@ -405,7 +516,7 @@ export const builtinShortcuts: CliCommand[] = [
405
516
 
406
517
  验证命令是否注册成功:
407
518
 
408
- ```bash
519
+ ```text
409
520
  npm run build
410
521
  node dist/index.js commands list
411
522
  node dist/index.js workflow --help
@@ -415,7 +526,7 @@ node dist/index.js workflow --help
415
526
 
416
527
  ## 发布前验证
417
528
 
418
- ```bash
529
+ ```text
419
530
  npm run build
420
531
  npm test
421
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