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
@@ -0,0 +1,138 @@
1
+ # 意图判定、版本路由与通用规则
2
+
3
+ ## 何时使用
4
+
5
+ 任何与「报告 / 周报 / 月报 / 季报 / 年报 / 年中报告」相关的请求,先读本 reference 完成意图判定和链路判定,再按需读取其它 reference。
6
+
7
+ ## 一、意图判定(最高优先级)
8
+
9
+ 自上而下命中即止,命中后不再二次询问。
10
+
11
+ ### 1. B 链路(查询与管理已有报告)——禁止采集业务数据
12
+
13
+ 消息中出现以下任一信号即走 B:
14
+
15
+ `查看` / `查询` / `列表` / `共享给我的` / `团队` / `下属` / `成员` / `某某某的报告` / `已提交` / `发布` / `撤回` / `修改` / `提醒他们交报告`。
16
+
17
+ B 链路只调用报告侧 operation,**禁止**因为「报告」二字去调用 IM消息、日报、日程、会议、项目任务、客户营销、流程等业务模块采集数据。
18
+
19
+ ### 2. A 链路(生成与汇总报告)——必须采集业务数据
20
+
21
+ 未命中 B 链路任何信号,且同时满足以下两个要素时走 A:
22
+
23
+ - 动词要素:汇总 / 生成 / 写 / 整理 / 总结 / 帮我出一份;
24
+ - 对象要素:周期词(周报 / 月报 / 季报 / 年报 / 周 / 月 / 季度 / 本周 / 上周 / 本月 / 上月 / 本季度 / 上季度)+ 内容词(报告 / 周报 / 内容 / 工作 / 总结)。
25
+
26
+ ### 3. 默认值规则
27
+
28
+ 动词为「汇总 / 生成 / 写 / 整理」,对象含周期与报告类名词,且未命中 B 链路信号时,一律按 A 处理,默认采集**当前登录人自己**的业务数据。以下说法直接归入 A:
29
+
30
+ - 汇总上周报告、汇总本周报告、汇总上月报告、汇总上季度报告;
31
+ - 生成上周报告、生成本周报告、帮我写周报 / 写月报 / 写季报 / 写年报;
32
+ - 帮我整理上周工作写报告、把上周的工作总结成周报。
33
+
34
+ A 链路的完整作业步骤见 [`plan-collect-and-compose.md`](plan-collect-and-compose.md)。
35
+
36
+ ## 二、版本路由与租户缓存
37
+
38
+ 报告侧接口分标准版与 e10-ebuilder 版两套链路,由 CLI 统一判定,Agent **不要手工选择链路**。
39
+
40
+ | 步骤 | 行为 |
41
+ | --- | --- |
42
+ | 1 | 优先读租户隔离、有效期 1 天的版本判定缓存;命中且未过期直接复用,跳过版本接口 |
43
+ | 2 | 缓存缺失或过期时调用 `plan_searchAppver`,读取返回字段 `ver_name` |
44
+ | 3 | `ver_name = V2` → 全部报告侧接口走 **e10-ebuilder 链路**;其它情况 → **标准版链路** |
45
+ | 4 | 把判定结果写入租户缓存,有效期 1 天 |
46
+
47
+ 禁止行为:不读缓存直接调版本接口;缓存过期不重新拉取;跳过版本判定硬编码链路;eb 链路命中后混用标准版接口。
48
+
49
+ - 查看当前判定结果:`plan.version.check`(或 `plan route`),返回 `link`(`standard` / `eb`)、`verName`、`cached`、`degraded`。
50
+ - `degraded: true` 表示版本接口暂不可用、已降级为标准版链路,此时不写缓存,下次会重试。
51
+ - **采集业务数据阶段禁止调用版本接口和任何报告侧接口**,只在判定为 B 链路、或 A 链路走到「用户确认后做重复性检查」时才允许触发版本路由。
52
+
53
+ ### eb 报告详情页表单 id
54
+
55
+ eb 链路详情页地址为 `/sp/ebdfpage/card/0/{报告详情 eb 表单 id}/{报告 id}`,其中表单 id 指 **idobjId**(不是 formId)。`plan.eb.form.resolve` 负责解析:
56
+
57
+ - 应用 appTag:`weaver-wrplan-eb`;报告详情表单 tag:`uf_plan_work_report`。
58
+ - 租户 key 为 `tt1pa2w2i3` 时无需动态获取,固定为 `1029659181695361024`;其它租户按 appTag、表单 tag 动态获取。
59
+ - 取到后按租户**长期缓存**,后续直接使用,不再动态获取。
60
+
61
+ `plan.report.get` 与 `plan.report.page` 已在 `detailUrl` 中返回拼好的详情页地址,Agent 直接用即可。
62
+
63
+ ## 三、operation 总表
64
+
65
+ | operation | 风险 | 说明 |
66
+ | --- | --- | --- |
67
+ | `plan.version.check` | read | 判定租户报告链路,命中缓存则跳过接口调用 |
68
+ | `plan.eb.form.resolve` | read | 解析 eb 报告详情表单 id(idobjId) |
69
+ | `plan.report.get` | read | 按 id 或按周期查询单份报告详情,附带评论总条数 |
70
+ | `plan.report.page` | read | 分页查询报告列表 |
71
+ | `plan.comment.list` | read | 查询报告评论内容(标准版链路) |
72
+ | `plan.report.create.prepare` / `.apply` | read-before-write / high-risk-write | 新建报告 |
73
+ | `plan.report.update.prepare` / `.apply` | read-before-write / high-risk-write | 修改报告 |
74
+ | `plan.report.publish.prepare` / `.apply` | read-before-write / high-risk-write | 发布报告 |
75
+ | `plan.report.withdraw.prepare` / `.apply` | read-before-write / high-risk-write | 撤回报告(标准版链路) |
76
+ | `plan.report.remind.prepare` / `.apply` | read-before-write / high-risk-write | 发送提交提醒(标准版链路) |
77
+
78
+ 字段细节以 `weaver-work-cli plan schema` 为准。
79
+
80
+ ## 四、通用基础规则(两条链路均生效)
81
+
82
+ 1. **周期计算**:周报年份、周数严格遵循 ISO8601,1 月 4 日所在周为当年第 1 周。未明确周期类型时先向用户确认周/月/季/年,确认前不得臆造区间。
83
+ 2. **跳转能力**:报告新建、查询、修改、发布、撤回成功后,必须把 `detailUrl` 呈现为可点击链接。
84
+ 3. **分页表格输出**:分页接口返回的列表必须用表格展示,固定列为 **报告名称 / 报告创建人名称 / 发布时间**;报告名称可点击,直接跳转 `detailUrl`。
85
+ 4. **人员 ID 规则**:所有传递和获取人员 id 的地方,都取 `id` 或 `employeeId` 字段,**禁止取 `userId`**。人员信息通过 weaver-e10-hrm skill 获取。
86
+ 5. **雪花 ID 传参**:请求体中的雪花 ID(人员 ID、报告 ID 等)必须加引号包裹为字符串,避免数字精度丢失。CLI 已完成归一化,业务输入按字符串传更安全。
87
+ 6. **重复性判断**:判断当前人员是否提交某个周期的报告,**只能**通过 `plan.report.get` 按周期查询(必须传报告年份、报告类型、报告周期,创建人缺省为当前登录人)。
88
+ 7. **不得重复创建**:当且仅当用户确认需要创建某个周期的报告时才判断是否已创建;若已创建,不得重复创建,需明确告知用户并征询是否改为编辑。
89
+ 8. **字段名禁止项**:任何执行阶段和最终创建的报告内容中,决不允许出现报告相关的数据库英文字段名。CLI 已把 eb 链路返回值归一化为业务字段(`reportId` / `title` / `content` / `summary` / `plans` / `year` / `type` / `serialNumber` / `postStatus` / `postTime` / `creator` / `detailUrl`),Agent 只使用这些业务键,不要向用户复述原始接口结构。
90
+ 9. **认证三件套**:所有请求必须携带完整登录态(Cookie 完整原始串、eteamsid、User-Agent)。由 CLI 托管,禁止输出、索取或写入任何凭证;未登录时先按共享规则读取 `../weaver-e10-shared/references/e10-auth-and-session.md` 并通过 `weaver-work-cli auth ...` 确认会话。
91
+
92
+ ## 命令
93
+
94
+ Windows PowerShell:
95
+
96
+ ```powershell
97
+ weaver-work-cli --json plan run plan.version.check --input-json '{"refresh":false}'
98
+ ```
99
+
100
+ macOS/Linux(bash/zsh):
101
+
102
+ ```bash
103
+ weaver-work-cli --json plan run plan.version.check --input-json '{"refresh":false}'
104
+ ```
105
+
106
+ 强制重新判定链路:
107
+
108
+ Windows PowerShell:
109
+
110
+ ```powershell
111
+ weaver-work-cli --json plan run plan.version.check --input-json '{"refresh":true}'
112
+ ```
113
+
114
+ macOS/Linux(bash/zsh):
115
+
116
+ ```bash
117
+ weaver-work-cli --json plan run plan.version.check --input-json '{"refresh":true}'
118
+ ```
119
+
120
+ ## 输出处理
121
+
122
+ `plan.version.check` 返回示例(字段说明):
123
+
124
+ - `link`:`standard` 或 `eb`,本次生效的链路。
125
+ - `verName`:版本接口返回的 `ver_name` 原始值。
126
+ - `cached`:本次结果是否来自缓存。
127
+ - `degraded`:是否因版本接口不可用而降级为标准版。
128
+
129
+ ## 注意
130
+
131
+ - 报告侧接口链路由 CLI 判定并缓存;Agent 不要缓存或自行推断链路。
132
+ - 采集阶段(A 链路第 1~7 步)不得触发版本接口或报告侧接口。
133
+
134
+ ## 失败处理
135
+
136
+ - `authentication` / `session_expired`:先向用户确认 E10 登录域名,再执行 `weaver-work-cli auth login`。
137
+ - `policy` / `link_unsupported`:该能力在当前链路不可用,按 `message` 给出的替代路径处理。
138
+ - `endpoint_not_found`(HTTP 404):当前环境可能未部署「计划报告」相关应用或接口,先向用户说明再决定是否停止。
@@ -0,0 +1,154 @@
1
+ # 查询报告详情、报告列表与评论
2
+
3
+ ## 何时使用
4
+
5
+ - 用户要看某份报告的内容(「看看小A 2026年第33周的报告」「本周我交报告了吗」);
6
+ - 用户要看共享给自己的报告、下属的报告、团队成员的报告(「共享给我的报告」「下属这周交了吗」);
7
+ - 用户在查看报告详情后要求查看评论内容。
8
+
9
+ 对应 operation:`plan.report.get`、`plan.report.page`、`plan.comment.list`。
10
+
11
+ ## 输入要点
12
+
13
+ ### plan.report.get
14
+
15
+ | 字段 | 说明 |
16
+ | --- | --- |
17
+ | `id` | 报告 id;与周期参数二选一,给了 `id` 就忽略周期参数 |
18
+ | `year` | 报告年份;缺省取本年 |
19
+ | `type` | `week` / `month` / `season` / `halfYear` / `year` |
20
+ | `serialNumber` | 报告周期(正整数) |
21
+ | `creatorUserId` | 报告创建人 id;缺省为当前登录人。**禁止传 userId 之外的 ID 形态,需由 weaver-e10-hrm 解析姓名** |
22
+ | `withComments` | 标准版链路下是否同时查询评论总条数,默认 `true` |
23
+
24
+ 按周期查询时 `type` + `serialNumber` 必填,`year` 缺省取本年;`creatorUserId` 缺省为当前登录人。CLI 内部按周期查询为标准版链路要求,缺省值会自动补齐。
25
+
26
+ ### plan.report.page
27
+
28
+ | 字段 | 说明 |
29
+ | --- | --- |
30
+ | `scope` | `share`(共享给我的,默认)/ `mine`(我自己及他人共享给我的,eb 链路按创建人筛选) |
31
+ | `unreadOnly` | 仅看未读(标准版专属,eb 链路不支持) |
32
+ | `year` / `type` / `serialNumber` | 报告筛选条件 |
33
+ | `creatorUserId` | 报告创建人 id(eb 链路支持;标准版分页接口不支持按创建人筛选,会返回警告) |
34
+ | `onlyIncludeSubs` | 是否只包含下属(标准版专属) |
35
+ | `pageNo` / `pageSize` | 默认 1 / 10,`pageSize` 最大 100;不自动翻页 |
36
+
37
+ ### plan.comment.list
38
+
39
+ | 字段 | 说明 |
40
+ | --- | --- |
41
+ | `reportId` | 报告 id(必填) |
42
+ | `pageNo` / `pageSize` | 默认 1 / 10 |
43
+
44
+ ## 命令
45
+
46
+ 查询某份报告(按周期,本周周报):
47
+
48
+ Windows PowerShell:
49
+
50
+ ```powershell
51
+ weaver-work-cli --json plan run plan.report.get --input-json '{"year":2026,"type":"week","serialNumber":36}'
52
+ ```
53
+
54
+ macOS/Linux(bash/zsh):
55
+
56
+ ```bash
57
+ weaver-work-cli --json plan run plan.report.get --input-json '{"year":2026,"type":"week","serialNumber":36}'
58
+ ```
59
+
60
+ 按报告 id 查询:
61
+
62
+ Windows PowerShell:
63
+
64
+ ```powershell
65
+ weaver-work-cli --json plan run plan.report.get --input-json '{"id":"PLACEHOLDER_REPORT_ID"}'
66
+ ```
67
+
68
+ macOS/Linux(bash/zsh):
69
+
70
+ ```bash
71
+ weaver-work-cli --json plan run plan.report.get --input-json '{"id":"PLACEHOLDER_REPORT_ID"}'
72
+ ```
73
+
74
+ 分页查询共享给我的报告:
75
+
76
+ Windows PowerShell:
77
+
78
+ ```powershell
79
+ weaver-work-cli --json plan run plan.report.page --input-json '{"pageNo":1,"pageSize":10}'
80
+ ```
81
+
82
+ macOS/Linux(bash/zsh):
83
+
84
+ ```bash
85
+ weaver-work-cli --json plan run plan.report.page --input-json '{"pageNo":1,"pageSize":10}'
86
+ ```
87
+
88
+ 只查下属、只看未读(标准版链路):
89
+
90
+ Windows PowerShell:
91
+
92
+ ```powershell
93
+ weaver-work-cli --json plan run plan.report.page --input-json '{"unreadOnly":true,"onlyIncludeSubs":true,"pageNo":1,"pageSize":20}'
94
+ ```
95
+
96
+ macOS/Linux(bash/zsh):
97
+
98
+ ```bash
99
+ weaver-work-cli --json plan run plan.report.page --input-json '{"unreadOnly":true,"onlyIncludeSubs":true,"pageNo":1,"pageSize":20}'
100
+ ```
101
+
102
+ 查看评论内容(仅标准版链路):
103
+
104
+ Windows PowerShell:
105
+
106
+ ```powershell
107
+ weaver-work-cli --json plan run plan.comment.list --input-json '{"reportId":"PLACEHOLDER_REPORT_ID","pageNo":1,"pageSize":10}'
108
+ ```
109
+
110
+ macOS/Linux(bash/zsh):
111
+
112
+ ```bash
113
+ weaver-work-cli --json plan run plan.comment.list --input-json '{"reportId":"PLACEHOLDER_REPORT_ID","pageNo":1,"pageSize":10}'
114
+ ```
115
+
116
+ ## 输出处理
117
+
118
+ ### plan.report.get
119
+
120
+ - `exists`:报告是否存在。`false` 表示该人员该周期没有报告(用于判断是否提交)。
121
+ - `report`:统一的业务报告结构(`reportId` / `title` / `content` / `summary` / `plans` / `year` / `type` / `typeLabel` / `serialNumber` / `postStatus` / `postStatusLabel` / `postTime` / `postTimeStatus` / `creator`)。
122
+ - `detailUrl`:可直接跳转的报告详情页链接,必须呈现给用户。
123
+ - `commentCount` / `commentHint`:仅在**标准版链路且评论总条数大于 0** 时出现。
124
+
125
+ ### 评论处理规则(查询单份报告详情时生效)
126
+
127
+ 1. 评论总条数 = 0:只返回报告详情,**完全忽略评论模块**,不输出任何评论相关文字。
128
+ 2. 评论总条数 > 0:返回报告详情,并附加提示「该报告下共有 {N} 条评论,是否需要查看评论内容?」,**禁止直接输出评论内容**。
129
+ 3. 只有收到用户明确的查看评论类指令后,才调用 `plan.comment.list` 展示全部评论详情。
130
+
131
+ ### plan.report.page
132
+
133
+ `rows` 中每行都是统一业务报告结构,并带 `detailUrl`。必须用表格呈现,固定列:
134
+
135
+ | 报告名称 | 报告创建人名称 | 发布时间 |
136
+ | --- | --- | --- |
137
+
138
+ - 报告名称渲染为指向 `detailUrl` 的可点击链接。
139
+ - `count` 为本页返回行数;`pageSize` 最大 100,不做自动翻页。
140
+ - `warnings` 非空时要向用户简要说明(例如标准版链路忽略 `creatorUserId`)。
141
+
142
+ ## 注意
143
+
144
+ - 「某某某的报告」需要先由 weaver-e10-hrm skill 把姓名解析为人员 ID,再作为 `creatorUserId` 传入;禁止把姓名直接当 ID 传。
145
+ - 标准版链路的报告列表接口语义是「共享给我的报告」,它不能按创建人过滤;需要按人筛选时改用 eb 链路或按 `plan.report.get` 精确查询。
146
+ - eb 链路未提供报告评论接口,`plan.comment.list` 会返回 `policy/link_unsupported`;此时如实告知用户该链路无法查询评论。
147
+ - 不要在只读查询场景调用业务模块采集数据。
148
+
149
+ ## 失败处理
150
+
151
+ - `not_found`:目标报告不存在。按周期查询时 `exists:false` 是正常结果,不是错误。
152
+ - `validation/type_invalid` / `validation/serial_number_invalid` / `validation/year_invalid`:入参不合法,按提示修正后重试一次。
153
+ - `policy/link_unsupported`:该能力在当前链路不可用,按 `message` 说明告知用户。
154
+ - `authentication` / `session_expired`:先确认 E10 登录域名再执行 `weaver-work-cli auth login`。
@@ -0,0 +1,104 @@
1
+ # 发送报告提交提醒
2
+
3
+ ## 何时使用
4
+
5
+ - 查询发现部分人员在指定周期没有报告,用户确认需要提醒时;
6
+ - 用户直接要求「提醒某某交报告」「催一下团队交周报」。
7
+
8
+ 对应 operation:`plan.report.remind.prepare` → `plan.report.remind.apply`(**仅标准版链路**)。
9
+
10
+ ## 触发前提
11
+
12
+ 1. 先用 `plan.report.get` 按周期确认目标人员在该周期确实没有报告(逐人确认,缺省创建人参数需替换为目标人员 ID)。
13
+ 2. 把「哪些人缺少该周期报告」摘要给用户,并询问 **是否需要向提交人发送提交提醒**。
14
+ 3. 用户明确确认后,才进入 `prepare → apply`。
15
+
16
+ 不要未经确认就批量发送提醒。
17
+
18
+ ## 输入要点
19
+
20
+ | 字段 | 说明 |
21
+ | --- | --- |
22
+ | `personIds` | 需要提醒的人员 ID(`["1001","1002"]` 数组或 `"1001,1002"` 英文逗号拼接字符串)。**必须由 weaver-e10-hrm 解析姓名得到真实人员 ID,禁止传姓名** |
23
+ | `year` | 报告年份;缺省取本年 |
24
+ | `type` | `week` / `month` / `season` / `halfYear` / `year`(必填) |
25
+ | `serialNumber` | 报告周期(必填) |
26
+ | `content` | 提醒文案;缺省按周期生成默认文案 |
27
+
28
+ ## 默认提醒文案
29
+
30
+ 用户未指定文案时使用动态默认文案,年份与周期随实际条件替换:
31
+
32
+ | 报告类型 | 默认文案 |
33
+ | --- | --- |
34
+ | 周报 | 请提交{年份}年第{N}周的报告 |
35
+ | 月报 | 请提交{年份}年{N}月的报告 |
36
+ | 季报 | 请提交{年份}年第{N}季度的报告 |
37
+ | 年中报告 | 请提交{年份}年年中报告 |
38
+ | 年报 | 请提交{年份}年年度报告 |
39
+
40
+ ## 命令
41
+
42
+ 准备发送(含默认文案):
43
+
44
+ Windows PowerShell:
45
+
46
+ ```powershell
47
+ weaver-work-cli --json plan run plan.report.remind.prepare --input-json '{"personIds":["PLACEHOLDER_PERSON_ID"],"year":2026,"type":"week","serialNumber":36}'
48
+ ```
49
+
50
+ macOS/Linux(bash/zsh):
51
+
52
+ ```bash
53
+ weaver-work-cli --json plan run plan.report.remind.prepare --input-json '{"personIds":["PLACEHOLDER_PERSON_ID"],"year":2026,"type":"week","serialNumber":36}'
54
+ ```
55
+
56
+ 指定文案:
57
+
58
+ Windows PowerShell:
59
+
60
+ ```powershell
61
+ weaver-work-cli --json plan run plan.report.remind.prepare --input-json '{"personIds":"PLACEHOLDER_PERSON_ID,PLACEHOLDER_PERSON_ID_2","type":"month","serialNumber":9,"content":"请在今天 18:00 前提交9月月报"}'
62
+ ```
63
+
64
+ macOS/Linux(bash/zsh):
65
+
66
+ ```bash
67
+ weaver-work-cli --json plan run plan.report.remind.prepare --input-json '{"personIds":"PLACEHOLDER_PERSON_ID,PLACEHOLDER_PERSON_ID_2","type":"month","serialNumber":9,"content":"请在今天 18:00 前提交9月月报"}'
68
+ ```
69
+
70
+ 用户确认后发送:
71
+
72
+ Windows PowerShell:
73
+
74
+ ```powershell
75
+ weaver-work-cli --json plan run plan.report.remind.apply --input-json '{"confirm":true,"continuation":"PLACEHOLDER_CONTINUATION"}'
76
+ ```
77
+
78
+ macOS/Linux(bash/zsh):
79
+
80
+ ```bash
81
+ weaver-work-cli --json plan run plan.report.remind.apply --input-json '{"confirm":true,"continuation":"PLACEHOLDER_CONTINUATION"}'
82
+ ```
83
+
84
+ ## 输出处理
85
+
86
+ `prepare` 返回 `preview`:`personIds`(人员 ID 列表)、`targets`(年份/类型/周期)、`content`(实际文案)、`messageEventCode`(固定 14)以及 `continuation`。
87
+
88
+ 必须把「提醒对象 + 周期 + 实际文案」摘要给用户后再执行 `apply`。
89
+
90
+ `apply` 返回 `status: COMPLETE` 与 `personIds`、`content`。
91
+
92
+ ## 注意
93
+
94
+ - 人员 ID 必须来自 weaver-e10-hrm 的 `id` / `employeeId`,**禁止使用 `userId`,禁止直接传姓名**。
95
+ - 提醒接口为标准版链路专属;eb 链路返回 `policy/link_unsupported`,如实告知用户当前链路无法发送提交提醒。
96
+ - 提醒属于对外发送动作,必须在用户明确确认后才 `apply`。
97
+
98
+ ## 失败处理
99
+
100
+ - `policy/link_unsupported`:当前租户走 eb 链路,无提交提醒接口。
101
+ - `validation/ids_invalid` / `ids_required`:人员 ID 不合法或为空。
102
+ - `confirmation/required`:未取得用户确认。
103
+ - `partial` / `write_uncertain`:提醒是否已发送不确定,**禁止自动重试**,先向用户说明并询问是否重发。
104
+ - `api/business_error`:接口返回业务失败,按 `error.message` 说明。
@@ -0,0 +1,162 @@
1
+ # 新建 / 修改 / 发布 / 撤回报告
2
+
3
+ ## 何时使用
4
+
5
+ - 用户明确要求新建、修改、发布、撤回某个周期的报告;
6
+ - A 链路汇总完成、用户确认「生成对应周期的报告」后,创建报告;
7
+ - 用户已确认要报告但还没创建草稿,又要直接发布(先创建,再发布)。
8
+
9
+ 这些 operation 全部是 `prepare → apply` 写入链,必须先取得用户明确确认。
10
+
11
+ ## 输入要点
12
+
13
+ ### 新建 `plan.report.create.prepare` / `.apply`
14
+
15
+ | 字段 | 说明 |
16
+ | --- | --- |
17
+ | `content` | 工作成效(支持 HTML 片段) |
18
+ | `summary` | 总结心得 |
19
+ | `plans` | 计划内容 |
20
+ | `year` | 报告年份;缺省取本年 |
21
+ | `type` | `week` / `month` / `season` / `halfYear` / `year`(必填) |
22
+ | `serialNumber` | 报告周期(必填,正整数) |
23
+ | `userName` | 当前登录人姓名,eb 链路自动生成报告名称时必填(由 weaver-e10-hrm 解析) |
24
+ | `title` | 报告名称,直接指定时优先于自动生成 |
25
+
26
+ - `content` / `summary` / `plans` 至少提供一个。
27
+ - eb 链路创建时发布状态固定为草稿(`0`),不允许为空或其它状态;报告名称按「{姓名}{年份}年第{N}周的报告」(周报)等规则动态生成。
28
+ - 标准版链路的报告名称由服务端生成并返回,无需传 `title` / `userName`。
29
+
30
+ ### 修改 `plan.report.update.prepare` / `.apply`
31
+
32
+ 用 `id` 或 `year` + `type` + `serialNumber`(+ `creatorUserId`)定位报告,再传要更新的 `content` / `summary` / `plans`(至少一个)。`prepare` 会先查当前内容并给出 before/after 差异;未传的字段保持原值。
33
+
34
+ ### 发布 `plan.report.publish.prepare` / `.apply`
35
+
36
+ 用 `id` 或周期参数定位报告。`prepare` 会校验报告存在且当前不是「已发布」;若还没创建草稿,先走新建流程。
37
+
38
+ ### 撤回 `plan.report.withdraw.prepare` / `.apply`
39
+
40
+ 用 `id` 或周期参数定位报告,`prepare` 会校验当前状态为「已发布(1)」。**仅标准版链路支持**:eb 链路的撤回是 ESB 动作流「eb撤回报告」,源资料未提供动作流唯一标识,CLI 返回 `policy/link_unsupported`,需要改用 weaver-e10-customesb-execute skill 执行同名动作流。
41
+
42
+ ## 命令
43
+
44
+ ### 新建(先 prepare)
45
+
46
+ Windows PowerShell:
47
+
48
+ ```powershell
49
+ weaver-work-cli --json plan run plan.report.create.prepare --input-json '{"type":"week","serialNumber":36,"content":"<p>完成A模块联调</p>","summary":"<p>节奏可控</p>","plans":"<p>推进B模块</p>"}'
50
+ ```
51
+
52
+ macOS/Linux(bash/zsh):
53
+
54
+ ```bash
55
+ weaver-work-cli --json plan run plan.report.create.prepare --input-json '{"type":"week","serialNumber":36,"content":"<p>完成A模块联调</p>","summary":"<p>节奏可控</p>","plans":"<p>推进B模块</p>"}'
56
+ ```
57
+
58
+ 用户确认后 apply(`continuation` 用原样回传):
59
+
60
+ Windows PowerShell:
61
+
62
+ ```powershell
63
+ weaver-work-cli --json plan run plan.report.create.apply --input-json '{"confirm":true,"continuation":"PLACEHOLDER_CONTINUATION"}'
64
+ ```
65
+
66
+ macOS/Linux(bash/zsh):
67
+
68
+ ```bash
69
+ weaver-work-cli --json plan run plan.report.create.apply --input-json '{"confirm":true,"continuation":"PLACEHOLDER_CONTINUATION"}'
70
+ ```
71
+
72
+ ### 修改
73
+
74
+ Windows PowerShell:
75
+
76
+ ```powershell
77
+ weaver-work-cli --json plan run plan.report.update.prepare --input-json '{"type":"week","serialNumber":36,"plans":"<p>下周三完成B模块验收</p>"}'
78
+ ```
79
+
80
+ macOS/Linux(bash/zsh):
81
+
82
+ ```bash
83
+ weaver-work-cli --json plan run plan.report.update.prepare --input-json '{"type":"week","serialNumber":36,"plans":"<p>下周三完成B模块验收</p>"}'
84
+ ```
85
+
86
+ ### 发布
87
+
88
+ Windows PowerShell:
89
+
90
+ ```powershell
91
+ weaver-work-cli --json plan run plan.report.publish.prepare --input-json '{"year":2026,"type":"week","serialNumber":36}'
92
+ ```
93
+
94
+ macOS/Linux(bash/zsh):
95
+
96
+ ```bash
97
+ weaver-work-cli --json plan run plan.report.publish.prepare --input-json '{"year":2026,"type":"week","serialNumber":36}'
98
+ ```
99
+
100
+ ### 撤回
101
+
102
+ Windows PowerShell:
103
+
104
+ ```powershell
105
+ weaver-work-cli --json plan run plan.report.withdraw.prepare --input-json '{"year":2026,"type":"week","serialNumber":36}'
106
+ ```
107
+
108
+ macOS/Linux(bash/zsh):
109
+
110
+ ```bash
111
+ weaver-work-cli --json plan run plan.report.withdraw.prepare --input-json '{"year":2026,"type":"week","serialNumber":36}'
112
+ ```
113
+
114
+ 复杂或多行内容(例如大段 HTML 报告正文)建议写入 UTF-8 JSON 文件后用 `--input <path>`:
115
+
116
+ Windows PowerShell:
117
+
118
+ ```powershell
119
+ weaver-work-cli --json plan run plan.report.create.prepare --input "C:\path\to\plan-create.json"
120
+ ```
121
+
122
+ macOS/Linux(bash/zsh):
123
+
124
+ ```bash
125
+ weaver-work-cli --json plan run plan.report.create.prepare --input "/path/to/plan-create.json"
126
+ ```
127
+
128
+ ## 输出处理
129
+
130
+ `*.prepare` 返回:
131
+
132
+ - `status`:`AWAITING_CONFIRMATION`(可继续确认执行)或 `ALREADY_EXISTS`(该周期报告已存在,不签发 continuation)。
133
+ - `preview`:将要写入的业务内容(新建为完整内容,修改为 `before` / `after` / `changedFields`)。
134
+ - `continuation` + `expiresInSeconds`:确认凭据,默认 10 分钟有效。
135
+ - `link`:本次生效的链路(`standard` / `eb`)。
136
+
137
+ `*.apply` 返回:
138
+
139
+ - `status: COMPLETE`;
140
+ - `reportId`(新建时返回新建报告 id)、`detailUrl`(必须呈现为可点击链接)。
141
+
142
+ ## 注意
143
+
144
+ - **重复创建防护**:`plan.report.create.prepare` 会按周期(年份 + 类型 + 周期 + 当前登录人)先查重。返回 `status: ALREADY_EXISTS` 时**禁止**直接创建,必须先询问用户是否改为编辑已有报告。
145
+ - **先草稿后发布**:用户要求直接发布但还没有草稿时,先走新建(prepare→apply),再走发布(prepare→apply)。
146
+ - **判断是否已提交**只能通过 `plan.report.get` 按周期查询,不要用列表接口猜。
147
+ - **禁止出现数据库英文字段名**:创建出的报告内容与给用户的回复中,不要出现 `content` / `f_content` / `summary` / `f_summary` / `plans` / `f_plans` / `year` / `f_year` / `type` / `f_type` / `serial_number` / `f_serial_number` 等字段名。CLI 输入输出均为业务字段,直接使用即可。
148
+ - 涉及「让谁看/共享范围」「按上级或部门层级」等报告名称前缀信息,标准版由服务端处理;不要手工拼报告名称。
149
+ - 报告正文可能包含大段 HTML,属于业务数据处理,写入前必须在 `prepare` 预览里让用户确认内容。
150
+
151
+ ## 失败处理
152
+
153
+ - `confirmation/required`:没有传 `confirm=true`。必须取得用户明确确认后再调用。
154
+ - `validation/continuation_invalid` / `continuation_mismatch` / `continuation_expired`:continuation 不合法、串用或过期,重新执行 `prepare`。
155
+ - `validation/context_mismatch` / `link_changed`:租户或登录账号变化、链路变化,重新执行 `prepare`。
156
+ - `validation/report_exists`:并发或状态变化导致重复。停止创建,改为询问用户是否编辑。
157
+ - `validation/not_found`:目标报告不存在;发布/撤回/修改前先创建。
158
+ - `validation/already_published`:已发布,无需重复发布。
159
+ - `validation/not_published`:不是已发布状态,无法撤回。
160
+ - `validation/userName_required`:eb 链路上未提供报告名称与姓名,先由 weaver-e10-hrm 解析当前登录人姓名后重试。
161
+ - `policy/link_unsupported`:该能力在当前链路不可用(eb 撤回),按 `message` 给出的替代路径处理。
162
+ - `partial` / `write_uncertain`:写请求已发出但结果不确定。**立即停止,禁止自动重试**;先用 `plan.report.get` 做一次只读回查,再向用户说明并让用户决定。