weaver-work-cli 0.1.8 → 0.1.21

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 (271) hide show
  1. package/README.md +25 -17
  2. package/dist/cmd/action.js +76 -0
  3. package/dist/cmd/index.js +2 -0
  4. package/dist/cmd/refs/index.js +103 -0
  5. package/dist/cmd/register.js +31 -0
  6. package/dist/cmd/root.js +1 -0
  7. package/dist/cmd/setup/index.js +25 -5
  8. package/dist/cmd/skills/index.js +37 -5
  9. package/dist/core/connector.js +54 -0
  10. package/dist/core/context.js +2 -1
  11. package/dist/core/input.js +48 -0
  12. package/dist/core/output.js +298 -3
  13. package/dist/core/refs.js +435 -0
  14. package/dist/core/state.js +26 -0
  15. package/dist/internal/e10/auth/commands.js +34 -19
  16. package/dist/internal/e10/auth/session.js +74 -2
  17. package/dist/internal/e10/auth/xiaoe.js +359 -94
  18. package/dist/internal/e10/context.js +18 -6
  19. package/dist/internal/e10/request-runtime.js +8 -1
  20. package/dist/internal/skills/install.js +148 -28
  21. package/dist/internal/skills/reader.js +12 -9
  22. package/dist/shortcuts/blog/continuation.js +74 -0
  23. package/dist/shortcuts/blog/errors.js +60 -0
  24. package/dist/shortcuts/blog/host.js +175 -0
  25. package/dist/shortcuts/blog/index.js +324 -0
  26. package/dist/shortcuts/blog/manifest.js +415 -0
  27. package/dist/shortcuts/blog/operations/comment.js +125 -0
  28. package/dist/shortcuts/blog/operations/comments.js +31 -0
  29. package/dist/shortcuts/blog/operations/edit.js +131 -0
  30. package/dist/shortcuts/blog/operations/export.js +46 -0
  31. package/dist/shortcuts/blog/operations/like.js +80 -0
  32. package/dist/shortcuts/blog/operations/publish.js +157 -0
  33. package/dist/shortcuts/blog/operations/query-user.js +58 -0
  34. package/dist/shortcuts/blog/operations/query.js +96 -0
  35. package/dist/shortcuts/blog/operations/registry.js +54 -0
  36. package/dist/shortcuts/blog/operations/remind.js +176 -0
  37. package/dist/shortcuts/blog/operations/shared.js +330 -0
  38. package/dist/shortcuts/blog/operations/types.js +16 -0
  39. package/dist/shortcuts/blog/operations.js +9 -0
  40. package/dist/shortcuts/caizhilian/continuation.js +70 -0
  41. package/dist/shortcuts/caizhilian/errors.js +53 -0
  42. package/dist/shortcuts/caizhilian/host.js +190 -0
  43. package/dist/shortcuts/caizhilian/index.js +186 -0
  44. package/dist/shortcuts/caizhilian/manifest.js +42 -0
  45. package/dist/shortcuts/caizhilian/operations/api.js +801 -0
  46. package/dist/shortcuts/caizhilian/operations/confirm.js +75 -0
  47. package/dist/shortcuts/caizhilian/operations/files.js +306 -0
  48. package/dist/shortcuts/caizhilian/operations/form.js +170 -0
  49. package/dist/shortcuts/caizhilian/operations/handlers/collab.js +611 -0
  50. package/dist/shortcuts/caizhilian/operations/handlers/document.js +890 -0
  51. package/dist/shortcuts/caizhilian/operations/handlers/file-collection.js +1227 -0
  52. package/dist/shortcuts/caizhilian/operations/handlers/file-upload.js +192 -0
  53. package/dist/shortcuts/caizhilian/operations/handlers/fileops.js +570 -0
  54. package/dist/shortcuts/caizhilian/operations/handlers/folder.js +1024 -0
  55. package/dist/shortcuts/caizhilian/operations/handlers/search.js +318 -0
  56. package/dist/shortcuts/caizhilian/operations/handlers/setting-attach.js +294 -0
  57. package/dist/shortcuts/caizhilian/operations/handlers/setting-backup.js +423 -0
  58. package/dist/shortcuts/caizhilian/operations/handlers/setting-encrypt.js +238 -0
  59. package/dist/shortcuts/caizhilian/operations/handlers/setting-storage.js +364 -0
  60. package/dist/shortcuts/caizhilian/operations/handlers/system.js +106 -0
  61. package/dist/shortcuts/caizhilian/operations/registry.js +151 -0
  62. package/dist/shortcuts/caizhilian/operations/shared.js +408 -0
  63. package/dist/shortcuts/caizhilian/operations/specs.js +698 -0
  64. package/dist/shortcuts/caizhilian/operations/types.js +57 -0
  65. package/dist/shortcuts/caizhilian/operations.js +21 -0
  66. package/dist/shortcuts/contract/continuation.js +70 -0
  67. package/dist/shortcuts/contract/errors.js +62 -0
  68. package/dist/shortcuts/contract/host.js +205 -0
  69. package/dist/shortcuts/contract/index.js +318 -0
  70. package/dist/shortcuts/contract/manifest.js +596 -0
  71. package/dist/shortcuts/contract/operations/clause-reference.js +78 -0
  72. package/dist/shortcuts/contract/operations/form-info.js +371 -0
  73. package/dist/shortcuts/contract/operations/read.js +118 -0
  74. package/dist/shortcuts/contract/operations/registry.js +43 -0
  75. package/dist/shortcuts/contract/operations/request.js +300 -0
  76. package/dist/shortcuts/contract/operations/shared.js +133 -0
  77. package/dist/shortcuts/contract/operations/subject.js +157 -0
  78. package/dist/shortcuts/contract/operations/template.js +81 -0
  79. package/dist/shortcuts/contract/operations/types.js +7 -0
  80. package/dist/shortcuts/contract/operations/workflow.js +52 -0
  81. package/dist/shortcuts/contract/operations/write.js +131 -0
  82. package/dist/shortcuts/contract/operations.js +8 -0
  83. package/dist/shortcuts/hrm/index.js +83 -2
  84. package/dist/shortcuts/hrm/manifest.js +16 -9
  85. package/dist/shortcuts/hrm/operations/employee.js +160 -30
  86. package/dist/shortcuts/hrm/operations/org.js +17 -3
  87. package/dist/shortcuts/hrm/operations/position.js +18 -2
  88. package/dist/shortcuts/hrm/operations/registry.js +2 -0
  89. package/dist/shortcuts/hrm/operations/resolve.js +449 -0
  90. package/dist/shortcuts/index.js +5 -1
  91. package/dist/shortcuts/invoice/index.js +74 -36
  92. package/dist/shortcuts/invoice/manifest.js +674 -4
  93. package/dist/shortcuts/invoice/markdown.js +172 -0
  94. package/dist/shortcuts/invoice/operations/add.js +3 -3
  95. package/dist/shortcuts/invoice/operations/delete.js +2 -2
  96. package/dist/shortcuts/invoice/operations/get.js +10 -2
  97. package/dist/shortcuts/invoice/operations/import.js +2 -2
  98. package/dist/shortcuts/invoice/operations/registry.js +8 -1
  99. package/dist/shortcuts/invoice/operations/reim-auto.js +719 -0
  100. package/dist/shortcuts/invoice/operations/reim.js +85 -2
  101. package/dist/shortcuts/invoice/operations/shared.js +75 -8
  102. package/dist/shortcuts/invoice/operations/update.js +2 -2
  103. package/dist/shortcuts/invoice/operations/upload-and-validate.js +93 -0
  104. package/dist/shortcuts/invoice/operations/validate-preview.js +2 -1
  105. package/dist/shortcuts/invoice/projection.js +328 -0
  106. package/dist/shortcuts/meeting/host.js +18 -1
  107. package/dist/shortcuts/meeting/manifest.js +30 -18
  108. package/dist/shortcuts/meeting/operations/eb/catalog.js +390 -0
  109. package/dist/shortcuts/meeting/operations/eb/conflict.js +389 -0
  110. package/dist/shortcuts/meeting/operations/eb/factory.js +389 -0
  111. package/dist/shortcuts/meeting/operations/eb/index.js +22 -0
  112. package/dist/shortcuts/meeting/operations/env.js +8 -1
  113. package/dist/shortcuts/meeting/operations/registry.js +2 -0
  114. package/dist/shortcuts/meeting/operations/signs.js +216 -2
  115. package/dist/shortcuts/workflow/endpoints.js +2 -1
  116. package/dist/shortcuts/workflow/errors.js +8 -2
  117. package/dist/shortcuts/workflow/host.js +11 -4
  118. package/dist/shortcuts/workflow/operations/form.js +1016 -590
  119. package/dist/shortcuts/workflow/operations/read.js +913 -231
  120. package/dist/shortcuts/workflow/operations/shared.js +21 -0
  121. package/dist/shortcuts/workflow/operations/write.js +750 -52
  122. package/dist/shortcuts/workflow/operations.js +36 -10
  123. package/docs/_catalog.md +6 -0
  124. package/docs/agent-invoice.md +5 -1
  125. package/docs/agent-io-channel-design.md +468 -0
  126. package/docs/agent-skill-install.md +9 -4
  127. package/docs/blog.md +123 -0
  128. package/docs/caizhilian.md +304 -0
  129. package/docs/contract.md +91 -0
  130. package/docs/e10-auth.md +4 -2
  131. package/docs/hrm.md +53 -11
  132. package/docs/invoice.md +5 -1
  133. package/docs/meeting.md +1 -1
  134. package/docs/operation-manual.md +15 -3
  135. package/docs/skill-review-2026-09-19.md +2 -2
  136. package/package.json +1 -1
  137. package/scripts/package-skill.mjs +32 -20
  138. package/scripts/xiaoe_env.py +118 -0
  139. package/skill-template/business-info.json +113 -14
  140. package/skill-template/domains/blog.md +24 -0
  141. package/skill-template/domains/caizhilian.md +22 -0
  142. package/skill-template/domains/hrm.md +2 -1
  143. package/skill-template/domains/jinchengda.md +23 -0
  144. package/skill-template/domains/meeting.md +1 -1
  145. package/skill-template/domains/workflow.md +1 -1
  146. package/skill-template/skill-template.md +1 -1
  147. package/skills/weaver-e10-blog/SKILL.md +111 -0
  148. package/skills/weaver-e10-blog/references/blog-comment.md +51 -0
  149. package/skills/weaver-e10-blog/references/blog-comments.md +39 -0
  150. package/skills/weaver-e10-blog/references/blog-default-permission.md +38 -0
  151. package/skills/weaver-e10-blog/references/blog-disabled-capabilities.md +11 -0
  152. package/skills/weaver-e10-blog/references/blog-edit.md +51 -0
  153. package/skills/weaver-e10-blog/references/blog-export.md +42 -0
  154. package/skills/weaver-e10-blog/references/blog-like.md +50 -0
  155. package/skills/weaver-e10-blog/references/blog-publish.md +52 -0
  156. package/skills/weaver-e10-blog/references/blog-query-user.md +45 -0
  157. package/skills/weaver-e10-blog/references/blog-query.md +49 -0
  158. package/skills/weaver-e10-blog/references/blog-remind.md +51 -0
  159. package/skills/weaver-e10-blog/references/blog-resolve-users.md +38 -0
  160. package/skills/weaver-e10-blog/references/source-manifest.json +1540 -0
  161. package/skills/weaver-e10-caizhilian/SKILL.md +217 -0
  162. package/skills/weaver-e10-caizhilian/references/agent-entry.md +106 -0
  163. package/skills/weaver-e10-caizhilian/references/collaboration.md +112 -0
  164. package/skills/weaver-e10-caizhilian/references/document.md +111 -0
  165. package/skills/weaver-e10-caizhilian/references/file-collection.md +173 -0
  166. package/skills/weaver-e10-caizhilian/references/file-upload.md +309 -0
  167. package/skills/weaver-e10-caizhilian/references/files.md +120 -0
  168. package/skills/weaver-e10-caizhilian/references/folder.md +122 -0
  169. package/skills/weaver-e10-caizhilian/references/org-browser.md +104 -0
  170. package/skills/weaver-e10-caizhilian/references/setting-attach.md +440 -0
  171. package/skills/weaver-e10-caizhilian/references/setting-backup.md +372 -0
  172. package/skills/weaver-e10-caizhilian/references/setting-encrypt.md +399 -0
  173. package/skills/weaver-e10-caizhilian/references/setting-storage.md +603 -0
  174. package/skills/weaver-e10-caizhilian/references/source-manifest.json +5694 -0
  175. package/skills/weaver-e10-caizhilian/references/withheld.md +93 -0
  176. package/skills/weaver-e10-caizhilian/references/write-protocol.md +120 -0
  177. package/skills/weaver-e10-calendar/SKILL.md +4 -3
  178. package/skills/weaver-e10-ebuilder-form/SKILL.md +4 -9
  179. package/skills/weaver-e10-ebuilder-form/references/context-routing.md +0 -9
  180. package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -5
  181. package/skills/weaver-e10-ebuilder-form/references/fields-browser.md +1 -5
  182. package/skills/weaver-e10-ebuilder-form/references/list-nlist.md +1 -5
  183. package/skills/weaver-e10-ebuilder-form/references/openapi-read.md +1 -5
  184. package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -5
  185. package/skills/weaver-e10-esb/SKILL.md +2 -2
  186. package/skills/weaver-e10-esb/references/source-manifest.json +9 -9
  187. package/skills/weaver-e10-hrm/SKILL.md +104 -9
  188. package/skills/weaver-e10-hrm/references/employee.md +89 -15
  189. package/skills/weaver-e10-hrm/references/org.md +114 -5
  190. package/skills/weaver-e10-hrm/references/position.md +14 -7
  191. package/skills/weaver-e10-hrm/references/source-manifest.json +1 -1
  192. package/skills/weaver-e10-jinchengda/SKILL.md +167 -0
  193. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +82 -0
  194. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +69 -0
  195. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +78 -0
  196. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +27 -0
  197. package/skills/weaver-e10-jinchengda/references/contract-request-status.md +71 -0
  198. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +94 -0
  199. package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +89 -0
  200. package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +77 -0
  201. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +66 -0
  202. package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +94 -0
  203. package/skills/weaver-e10-jinchengda/references/source-manifest.json +259 -0
  204. package/skills/weaver-e10-jiuchuanhui/SKILL.md +5 -11
  205. package/skills/weaver-e10-jucailin/SKILL.md +4 -3
  206. package/skills/weaver-e10-mail/SKILL.md +4 -11
  207. package/skills/weaver-e10-meeting/SKILL.md +66 -32
  208. package/skills/weaver-e10-meeting/references/meeting-change.md +5 -2
  209. package/skills/weaver-e10-meeting/references/meeting-create.md +2 -1
  210. package/skills/weaver-e10-meeting/references/meeting-eb.md +114 -0
  211. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +9 -8
  212. package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +35 -7
  213. package/skills/weaver-e10-meeting/references/meeting-update.md +1 -1
  214. package/skills/weaver-e10-okr/SKILL.md +6 -11
  215. package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
  216. package/skills/weaver-e10-plan/SKILL.md +3 -3
  217. package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +1 -1
  218. package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +1 -1
  219. package/skills/weaver-e10-plan/references/source-manifest.json +13 -13
  220. package/skills/weaver-e10-qiyecheng/SKILL.md +4 -10
  221. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +9 -9
  222. package/skills/weaver-e10-shared/SKILL.md +42 -34
  223. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +16 -43
  224. package/skills/weaver-e10-shared/references/json-output-contract.md +20 -11
  225. package/skills/weaver-e10-shared/references/non-interactive-environment.md +21 -14
  226. package/skills/weaver-e10-shijingran/SKILL.md +2 -1
  227. package/skills/weaver-e10-shijingran/references/source-manifest.json +9 -9
  228. package/skills/weaver-e10-skill-maker/SKILL.md +4 -10
  229. package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +5 -3
  230. package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +12 -27
  231. package/skills/weaver-e10-skill-maker/references/module-gap-audit-and-repair.md +17 -5
  232. package/skills/weaver-e10-skill-maker/references/source-update-detection.md +4 -27
  233. package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +1 -1
  234. package/skills/weaver-e10-wenshuding/SKILL.md +5 -16
  235. package/skills/weaver-e10-wenshuding/references/source-manifest.json +7 -7
  236. package/skills/weaver-e10-workflow/SKILL.md +41 -46
  237. package/skills/weaver-e10-workflow/references/source-manifest.json +39 -75
  238. package/skills/weaver-e10-workflow/references/workflow-batch.md +90 -29
  239. package/skills/weaver-e10-workflow/references/workflow-create.md +83 -109
  240. package/skills/weaver-e10-workflow/references/workflow-memory.md +19 -9
  241. package/skills/weaver-e10-workflow/references/workflow-operate.md +2 -2
  242. package/skills/weaver-e10-workflow/references/workflow-query.md +40 -27
  243. package/skills/weaver-e10-workflow/references/workflow-share.md +18 -2
  244. package/skills/weaver-e10-workflow/references/workflow-view.md +3 -4
  245. package/skills/weaver-e10-yepiaotong/SKILL.md +74 -39
  246. package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +22 -1
  247. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +3 -1
  248. package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +135 -0
  249. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +15 -3
  250. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +1 -1
  251. package/skills/weaver-e10-yepiaotong/references/invoice-summarize.py +217 -0
  252. package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +88 -0
  253. package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +7 -2
  254. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +89 -9
  255. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +1 -0
  256. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +70 -49
  257. package/skills/weaver-e10-yepiaotong/references/reim-fast-path.md +119 -0
  258. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +55 -36
  259. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +4 -0
  260. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +149 -0
  261. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +125 -5
  262. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +430 -63
  263. package/skills/weaver-e10-yimiaoban/SKILL.md +4 -12
  264. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
  265. package/skills/weaver-e10-ziguanjia/SKILL.md +2 -1
  266. package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +3 -3
  267. package/tools/weaver-skill-detector-1.0.13/SKILL.md +9 -9
  268. package/tools/weaver-skill-detector-1.0.13/references/checklist.md +3 -3
  269. package/tools/weaver-skill-detector-1.0.13/scripts/__pycache__/validate_skill.cpython-313.pyc +0 -0
  270. package/tools/weaver-skill-detector-1.0.13/scripts/validate_skill.py +98 -91
  271. package/scripts/sync-connector-skills.mjs +0 -172
@@ -1241,13 +1241,13 @@
1241
1241
  }
1242
1242
  },
1243
1243
  "artifactBaseline": {
1244
- "aggregateSha256": "084fd449a1270b77670a27b4bfd8fccec32b838306714e761ea2858c22d239e9",
1244
+ "aggregateSha256": "60eafebefaa0b7d6e75758ae78e3e5e1349ee453f33826de54c7293fb6e0fa41",
1245
1245
  "files": [
1246
1246
  {
1247
1247
  "path": "docs/_catalog.md",
1248
1248
  "role": "generated-doc",
1249
- "size": 4580,
1250
- "sha256": "7ec48267965b4ccd35dcc463ed0a73dd71c3f4d2fc3d978165f508261945d4b3"
1249
+ "size": 5332,
1250
+ "sha256": "a81903939aea5bf1196d1e3243709d2facf50d9bdcf74d8a6ca731061310dbbe"
1251
1251
  },
1252
1252
  {
1253
1253
  "path": "docs/project.md",
@@ -1258,8 +1258,8 @@
1258
1258
  {
1259
1259
  "path": "skill-template/business-info.json",
1260
1260
  "role": "generated-template",
1261
- "size": 6294,
1262
- "sha256": "7af8cc1b35564b11a4c33cf566b22919d75c8a4daeec488d6ff8979c098c8ff7"
1261
+ "size": 8216,
1262
+ "sha256": "370a45e86c6b7e33869c5df1bf08d9f22bd98fa8b157b49716e13bca0e7b63c3"
1263
1263
  },
1264
1264
  {
1265
1265
  "path": "skill-template/domains/shijingran.md",
@@ -1288,14 +1288,14 @@
1288
1288
  {
1289
1289
  "path": "skills/weaver-e10-shijingran/SKILL.md",
1290
1290
  "role": "generated-skill-entry",
1291
- "size": 6944,
1292
- "sha256": "e9556f31837163d637057981bdf5dddb7a1feed7653c61f0647c9d0a5ab38432"
1291
+ "size": 8174,
1292
+ "sha256": "597968607ca3321aac3b91e687c5963bdf1baee16d5f394aad64910e1ece53bf"
1293
1293
  },
1294
1294
  {
1295
1295
  "path": "src/shortcuts/index.ts",
1296
1296
  "role": "generated-cli",
1297
- "size": 1274,
1298
- "sha256": "54df058151b6f3602a2d112a49396b4ad4121cdba06d31c4c368ebd3235192c4"
1297
+ "size": 1420,
1298
+ "sha256": "569bef374df2d86b511150a0c609ce1abee63f8317994513bce6241276b5be40"
1299
1299
  },
1300
1300
  {
1301
1301
  "path": "src/shortcuts/project/continuation.ts",
@@ -11,13 +11,13 @@ agent_created: true
11
11
  requires:
12
12
  bins: ["weaver-work-cli"]
13
13
  dependencies:
14
- - weaver-e10-login
14
+ - weaver-e10-shared
15
15
  cliHelp: "weaver-work-cli skills --help"
16
16
  ---
17
17
 
18
18
  # weaver-work-cli Skill Maker
19
19
 
20
- **CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若不存在则必须先执行 `weaver-work-cli skills install shared --target-dir <当前Agent的Skills目录>`,若 CLI 未安装则先执行 `npm install -g weaver-work-cli`,安装或读取失败时必须停止执行。**
20
+ **CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须调用宿主提供的提问/确认弹框,向用户说明必须补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行)及补齐计划,并把下面两条待执行命令原样完整展示在确认信息中;Agent 不能在未确认时自行安装。用户明确确认后,Agent 必须直接代为按顺序执行且每条仅执行一次,不得要求或引导用户手动执行:① 缺 CLI 时执行 `npm install -g weaver-work-cli`;② 再执行 `weaver-work-cli skills install shared --target-dir <SKILLS_ROOT>` 装回共享 skill,`<SKILLS_ROOT>` 取本 SKILL.md 所在目录的上一级绝对目录(即与本技能同级的 skills 根目录),不要省略 `--target-dir`——省略会装进默认目录,导致本技能依然读不到共享规则。命令均成功后重新读取共享规则;仍读不到就停止并把结果报告用户,不得凭猜测继续。**
21
21
 
22
22
 
23
23
  本 Skill 参考飞书 CLI 的 `lark-skill-maker`,但输出范围更完整:Agent 需要把已经给出的业务模块资料同步固化为 `weaver-e10-*` Agent Skill 和对应 `src/shortcuts/<module>` TypeScript CLI 能力。新业务模块一开始没有对应 `weaver-work-cli` 业务命令是正常输入,但不能只生成文档型 Skill;默认要把 CLI 一并设计、实现、测试并让 Skill 调用真实 operation。转换时以**业务语义保真**为第一目标:入口 `SKILL.md` 可以轻量,但 `references/`、schema、handler、测试和禁用边界必须承接源资料里的可执行业务细节,不能把多份源 MD 压缩成泛泛概述导致能力退化。
@@ -26,15 +26,8 @@ cliHelp: "weaver-work-cli skills --help"
26
26
 
27
27
  ## 认证与请求头契约
28
28
 
29
- 登录与会话由 E10 登录能力统一提供:文档型约定为 `weaver-e10-login` 技能,本 CLI 场景下等价入口是 `weaver-work-cli auth ...` 命令体系。业务 Skill 不自建登录流程,不索取、打印或转存任何凭证。
29
+ 登录与会话由 `weaver-e10-shared` 共享规则和 `weaver-work-cli auth ...` 命令体系统一托管。业务 Skill 不自建登录流程,不索取、打印或转存任何凭证。
30
30
 
31
- CLI 发往 E10 的每个请求都自动携带以下三项用户信息参数,**缺一不可**(业务入参里不要传这些字段,也不要手工拼装请求头):
32
-
33
- ```text
34
- Cookie: <登录返回的完整原始 Cookie 串,原样透传,禁止裁剪/去重/改写>
35
- eteamsid: <登录返回的 ETEAMSID>
36
- User-Agent: AgentType=<agentType>,IsAgent=true
37
- ```
38
31
 
39
32
  ## 适用范围
40
33
 
@@ -53,6 +46,7 @@ User-Agent: AgentType=<agentType>,IsAgent=true
53
46
  - 用户已明确作为输入提供的业务文档、代码目录、接口说明或样例,视为本次转换的源资料;先读取与当前模块直接相关的原文和现有 reference,再判断是否缺口。不要只因为“需要读取 reference 原文”就停止。
54
47
  - 转换不得以摘要替代业务规则。源 MD 中的字段表、枚举/状态、默认值、固定参数、权限前置、分页/排序口径、ID 解析规则、流程分支、写入确认条件、错误码、返回结构、示例和禁用能力,必须分别落到 `manifest.ts` / handler / reference / 测试 / 禁用边界之一;确实不能迁移的细节要在待确认清单或禁用边界说明原因。
55
48
  - 源资料给出结构化 JSON 请求体字段表时,`inputSchema.properties` 必须逐字段转换字段名、类型、必填、数组元素和嵌套对象;禁止只暴露 `payload`、`body`、`requestPayload` 或 `object` 这类通用包裹字段来替代字段转换。确需兼容旧 `payload` 输入时,只能在 handler 归一化层保留兼容,schema/reference 仍以逐字段 canonical 入参为准。
49
+ - 源资料给出接口响应、出参或返回值字段表时,`outputSchema.properties` 必须按 CLI 成功 envelope 的 `data` 逐字段转换字段名、类型、必填、数组元素和嵌套对象;禁止只写 `result`、`data`、`raw` 或 `object` 这类通用包裹字段来替代返回值转换。确需透传服务端原始响应时,要在 `outputSchema` 中同时声明已知稳定字段和 raw 字段边界。
56
50
  - 缺口只阻断受影响的 operation;已能从源资料确认的只读、预览、准备或文档索引部分要继续实现。不能实现的能力写入待确认清单或禁用边界,不要生成假 operation。
57
51
  - 如果确实必须等用户补充,回复必须列出具体缺口并提出明确问题,例如缺少哪个 operation 的接口路径、请求方法、关键字段、权限边界、幂等键、回查接口或写入确认条件。不能只说“需要确认细节”,也不要以“实现前需要确认几个细节”“随后开始实现”这类状态句作为最终回复。
58
52
 
@@ -51,7 +51,9 @@
51
51
  - `deprecatedAlias`:兼容旧字段,写入 `deprecatedInputAliases` 并测试冲突规则。
52
52
  - `withheld`:源资料有该参数或能力,但当前 CLI 不支持,写清原因。
53
53
  - `needs-confirmation`:源资料只出现字段名或片段,缺少类型、是否必填、来源、枚举、权限、回查或绑定规则,等待用户补充。
54
- - `not-applicable`:接口内部字段、展示字段或返回字段,不应暴露为 Agent 入参。
54
+ - `not-applicable`:接口内部字段或展示字段,不应暴露为 Agent 入参;返回字段不得仅标为 not-applicable,必须继续纳入 `outputSchema` 或输出覆盖矩阵。
55
+
56
+ 还要为每个 operation 写入或更新输出覆盖矩阵,至少记录在 `source-manifest.json` 的 `operationImpact[operation].outputFields` / `outputSchemaCoverage` 或等价结构中。矩阵必须以源资料响应字段表、返回示例或代码中的稳定返回对象为起点,逐项记录返回字段名、源位置、类型、必填或可选、数组元素、嵌套对象、枚举/状态码和落到的 `outputSchema` 路径。源资料缺少响应字段表但有响应示例时,可以从示例抽取稳定字段并标注来源;源资料完全缺少响应事实时,登记 `missingOutputSchema` 或 `needs-confirmation`,不能用通用 `object`、`raw` 或 `result` 代替逐字段转换。
55
57
 
56
58
  入参 example 采用分级规则,不能因源资料没有 example 就阻断整个生成:
57
59
 
@@ -76,12 +78,12 @@
76
78
  不要把多份源 MD 压缩成一个“能力概述”。对每个业务对象或 operation,至少检查并迁移以下可执行细节:
77
79
 
78
80
  - 字段表:字段名、类型、必填、默认值、枚举/状态、单位、时间格式、ID 精度、别名、互斥/二选一/至少一个、固定参数和废弃字段兼容策略。
79
- - 请求与响应:接口路径、请求方法、query/body/form/file 位置、分页/排序/筛选口径、返回结构、成功判定、错误码、空结果语义和大结果展示规则。
81
+ - 请求与响应:接口路径、请求方法、query/body/form/file 位置、分页/排序/筛选口径、返回结构、返回字段名/类型/必填/数组元素/嵌套对象、成功判定、错误码、空结果语义和大结果展示规则。
80
82
  - 业务流程:前置查询、版本门禁、权限/scope、对象状态流转、跨链路差异、ID/名称解析、缓存或字典依赖、写前回查、写后回查和不确定结果处理。
81
83
  - 示例与边界:源资料已有入参 example 时必须迁移到 manifest 和 reference;源资料没有 example 时按参数完整度生成 `synthetic` 样例或登记 `missingExamples`,并在最终报告中列出待补充项;如果源资料区分成功、失败、不同链路或不同对象类型,要分别保留能影响执行的差异。
82
84
  - 禁用与缺口:源资料出现但未生成 CLI operation 的能力,必须进入 schema 的 withheld/disabled 信息或 reference 的禁用边界,并写清缺少的事实和为什么阻断。
83
85
 
84
- 迁移方式要按所有权落点分配:`manifest.ts` / `schema` 承载 WHAT,handler 和 host 承载请求形状与校验,`references/` 承载条件化 HOW,测试承载关键语义回归。不能只把细节写在自然语言里,也不能只在代码里实现而不让 Skill/reference 指到对应用法。若源资料给出 JSON 请求体字段表,`inputSchema.properties` 必须逐项暴露这些业务字段;不能把整段请求体塌缩成 `payload`/`body`/`requestPayload` 一个 object 后宣称已转换。
86
+ 迁移方式要按所有权落点分配:`manifest.ts` / `schema` 承载 WHAT,handler 和 host 承载请求形状与校验,`references/` 承载条件化 HOW,测试承载关键语义回归。不能只把细节写在自然语言里,也不能只在代码里实现而不让 Skill/reference 指到对应用法。若源资料给出 JSON 请求体字段表,`inputSchema.properties` 必须逐项暴露这些业务字段;不能把整段请求体塌缩成 `payload`/`body`/`requestPayload` 一个 object 后宣称已转换。若源资料给出响应字段表或返回示例,`outputSchema.properties` 必须按 CLI 成功 envelope 的 `data` 结构逐项暴露稳定返回字段;不能只把整段响应塌缩成 `result`/`data`/`raw` 一个 object 后宣称已转换。
85
87
 
86
88
  如果源资料描述的是底层接口,但仓库还没有对应 operation,按 [`module-cli-generation.md`](module-cli-generation.md) 先实现 CLI,再让 Skill 调用该 operation。确实缺少实现依据时,把缺口列入待确认清单并问用户,不能生成假 operation;缺口只阻断对应 operation,已确认的能力继续生成 CLI、测试、docs 和 Skill reference。
87
89
 
@@ -76,6 +76,7 @@ export interface <Module>OperationContract {
76
76
  source?: string;
77
77
  }>;
78
78
  inputSchema: Record<string, unknown>;
79
+ outputSchema: Record<string, unknown>;
79
80
  }
80
81
 
81
82
  export const <module>Operations: <Module>OperationContract[] = [
@@ -86,6 +87,11 @@ export const <module>Operations: <Module>OperationContract[] = [
86
87
  type: 'object',
87
88
  additionalProperties: false,
88
89
  properties: {}
90
+ },
91
+ outputSchema: {
92
+ type: 'object',
93
+ additionalProperties: false,
94
+ properties: {}
89
95
  }
90
96
  }
91
97
  ];
@@ -93,6 +99,8 @@ export const <module>Operations: <Module>OperationContract[] = [
93
99
 
94
100
  operation 名称使用 `<module>.<action>`,多级动作可用 `<module>.<object>.<action>`。`inputSchema` 必须禁止额外字段;需要二选一、至少一个、互斥、固定值或默认值时用 JSON Schema 表达,不把规则只写在说明里。源资料给出结构化 JSON 请求体字段表时,必须把字段逐项转换进 `inputSchema.properties`,包括必填、数组元素、嵌套对象、枚举和默认值;不得只写 `{ payload: { type: "object" } }`、`requestPayload`、`body` 或 `additionalProperties: true` 来代替参数转换。若为了兼容旧版本继续接受 `payload`,只能在 handler 归一化中处理,并用测试证明 canonical 顶层字段仍是 schema/reference 的唯一推荐输入。源资料给出权限、scope、角色、身份或接口前置条件时,记录到 `auth`、`permissions`、`scope` 或 `fixed` 中;如果当前模块不需要这些字段,可以省略,但不能把已知权限事实只放在正文里。
95
101
 
102
+ `outputSchema` 描述 `--json run` 成功 envelope 中的 `data` 字段,不描述外层 `{schemaVersion, ok, operation, meta, warnings}`。源资料给出接口响应、出参、返回值字段表或响应示例时,必须把稳定字段逐项转换进 `outputSchema.properties`,包括字段名、类型、必填、数组元素、嵌套对象、枚举、状态码和分页/汇总字段;不得只写 `{ result: { type: "object" } }`、`raw`、`data` 或 `additionalProperties: true` 来代替返回值转换。handler 对服务端响应做过归一化时,`outputSchema` 以 CLI 实际返回的 `data` 结构为准,并在属性说明里标注原始接口字段来源;确需保留服务端原始响应时,只能把 raw 字段作为附加属性暴露,同时仍要声明 CLI 已知的稳定字段。源资料没有返回字段表但有示例时,从示例抽取稳定字段并标明 `sourceType: "synthetic"` 或在 source-manifest 记录待复核;源资料完全缺少响应事实时,写入 `missingOutputSchema` 或等价待确认项,不要编造字段。
103
+
96
104
  `inputExamples` 是 Agent 入参格式的优先参考,按以下规则生成:
97
105
 
98
106
  - 源资料、历史 Skill、测试脚本或接口文档已有入参样例时,必须迁移到 `inputExamples`,`sourceType` 为 `source-provided`,`source` 指到源文件、标题、脚本或稳定 chunk;这类样例缺失时测试失败。
@@ -174,33 +182,10 @@ operation 名称使用 `<module>.<action>`,多级动作可用 `<module>.<objec
174
182
 
175
183
  生成的 E10 业务 Skill 必须遵守登录与凭证红线:
176
184
 
177
- - 登录与会话统一由 `weaver-e10-login` 提供;CLI 场景下的等价入口是 `weaver-work-cli auth ...`,业务 Skill 不得自行实现任何登录流程。
178
- - 生成的 SKILL.md frontmatter 必须声明 `dependencies:\n - weaver-e10-login`。
179
- - 每个请求必须携带 `weaver-e10-login` 返回的三项用户信息参数,缺一不可:
180
-
181
- ```text
182
- Cookie: <weaver-e10-login 返回的完整原始 Cookie 串>(禁止裁剪/去重/改写)
183
- eteamsid: <weaver-e10-login 返回的 ETEAMSID>
184
- User-Agent: AgentType=<agentType>,IsAgent=true
185
- ```
186
-
187
- - Skill 与 reference 文档中若描述了接口请求,必须同时写明上述请求头契约,否则发布门禁会阻断。
188
-
189
- ### 登录与凭证契约(生成产物必须遵循)
190
-
191
- 生成的 E10 业务 Skill 必须遵守登录与凭证红线:
192
-
193
- - 登录与会话统一由 `weaver-e10-login` 提供;CLI 场景下的等价入口是 `weaver-work-cli auth ...`,业务 Skill 不得自行实现任何登录流程。
194
- - 生成的 SKILL.md frontmatter 必须声明 `dependencies:\n - weaver-e10-login`。
195
- - 每个请求必须携带 `weaver-e10-login` 返回的三项用户信息参数,缺一不可:
196
-
197
- ```text
198
- Cookie: <weaver-e10-login 返回的完整原始 Cookie 串>(禁止裁剪/去重/改写)
199
- eteamsid: <weaver-e10-login 返回的 ETEAMSID>
200
- User-Agent: AgentType=<agentType>,IsAgent=true
201
- ```
202
-
203
- - Skill 与 reference 文档中若描述了接口请求,必须同时写明上述请求头契约,否则发布门禁会阻断。
185
+ - 登录与会话统一由 `weaver-e10-shared` 共享规则和 `weaver-work-cli auth ...` 命令体系托管,业务 Skill 不得自行实现任何登录流程。
186
+ - 生成的 SKILL.md frontmatter 必须声明 `dependencies:\n - weaver-e10-shared`。
187
+ - 每个请求的请求头三件套(Cookie 完整原始串 / `eteamsid` / `User-Agent`)由 `weaver-work-cli` 统一注入,业务侧不得手工拼装或覆盖;唯一权威声明见 [`../../weaver-e10-shared/SKILL.md`](../../weaver-e10-shared/SKILL.md) 的「请求头契约」章节。
188
+ - Skill 与 reference 文档中若描述了接口请求,只需一行指针引用 `weaver-e10-shared` 的「请求头契约」,不要复制完整代码块。
204
189
 
205
190
  E10 业务模块必须复用 `src/internal/e10` 的 session、profile 和 request runtime,不直接读取认证文件、Cookie、Keychain 或 legacy auth 目录,也不在业务 `host.ts` 中直接调用 `fetch`。业务 host 只封装本模块需要的请求方法,负责:
206
191
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  先构建单模块现状清单:
19
19
 
20
- - CLI manifest:`weaver-work-cli <command> schema` 或 `src/shortcuts/<command>/manifest.ts` 中的 operation、`inputSchema`、risk、fixed、权限、`inputExamples`、`missingExamples`。
20
+ - CLI manifest:`weaver-work-cli <command> schema` 或 `src/shortcuts/<command>/manifest.ts` 中的 operation、`inputSchema`、`outputSchema`、risk、fixed、权限、`inputExamples`、`missingExamples`。
21
21
  - handler/host:registry 是否一一对应,handler 是否使用 schema 字段,host 请求 method/path/query/body/form/file 是否可被测试断言。
22
22
  - Skill:`SKILL.md` 路由表、reference 文件、命令示例、禁用边界、写操作确认链说明。
23
23
  - Source manifest:`sources`、`sourceChunks`、`operationImpact`、`sourceCoverage`、`artifactBaseline`、参数覆盖矩阵和 notes。
@@ -28,6 +28,7 @@
28
28
  - 基线缺口:manifest 旧版、弱检测、源文件为空、artifactBaseline 缺失或聚合 hash 不一致。
29
29
  - 映射缺口:CLI operation 没有 `operationImpact`;`operationImpact` 指向不存在的 operation;sourceChunk 没有映射 operation/reference;业务源文件没有 `sourceCoverage`。
30
30
  - 参数缺口:源资料参数没有进入 `inputSchema`,也没有标记为 `fixed`、`derived`、`deprecatedAlias`、`withheld`、`needs-confirmation` 或 `not-applicable`。
31
+ - 输出缺口:源资料响应字段、出参或返回示例没有进入 `outputSchema`,也没有在 `operationImpact` 的 `outputFields` / `outputSchemaCoverage` / `missingOutputSchema` 中说明;只用 `result`、`data`、`raw` 或通用 `object` 包裹返回值视为未逐字段转换。
31
32
  - 示例缺口:源资料已有 example 但 manifest/reference 没迁移;源资料没有 example 但未记录 `missingExamples` 或 `synthetic` 样例。
32
33
  - 业务逻辑缺口:源资料里的接口路径、请求方法、固定参数、枚举、默认值、分页、状态流转、权限、ID 解析、写前/写后回查、错误码或返回结构没有落到 schema/handler/reference/test。
33
34
  - 写入安全缺口:新增、编辑、删除、导入、同步等真实写入缺少 `prepare -> apply`、`confirm: true`、continuation、指纹校验或 `partial/write_uncertain` 处理。
@@ -49,11 +50,11 @@
49
50
  修复必须按 contract-first 顺序推进:
50
51
 
51
52
  1. 锁定源事实:读对应 source chunk、源文档标题、接口定义、历史脚本或用户补充说明;记录来源锚点。
52
- 2. 更新 schema:补 `inputSchema`、required、enum、默认值、oneOf/anyOf、fixed、权限、`inputExamples` 或 `missingExamples`。
53
+ 2. 更新 schema:补 `inputSchema`、`outputSchema`、required、enum、默认值、oneOf/anyOf、fixed、权限、`inputExamples`、`missingExamples`、`missingOutputSchema`。
53
54
  3. 更新执行逻辑:补 handler 输入归一化、host 请求形状、固定参数、派生参数、错误映射、分页和写入确认链。
54
55
  4. 更新 Skill/reference:命令示例优先引用 manifest `inputExamples`;缺 example 时写 `missingExamples` 和待补事实,不伪装成源样例。
55
- 5. 更新 source-manifest:补 `sourceChunks`、`operationImpact`、`sourceCoverage`、`parameterCoverage`、`artifactBaseline` 和 notes。
56
- 6. 更新测试:至少覆盖 schema 字段、请求形状、reference 示例字段、source-manifest 映射、高风险写入确认链和缺口登记。
56
+ 5. 更新 source-manifest:补 `sourceChunks`、`operationImpact`、`sourceCoverage`、`parameterCoverage`、`outputFields` / `outputSchemaCoverage`、`artifactBaseline` 和 notes。
57
+ 6. 更新测试:至少覆盖 schema 字段、输出字段 schema、请求形状、reference 示例字段、source-manifest 映射、高风险写入确认链和缺口登记。
57
58
  7. 运行验证:业务测试、`weaver-work-cli <command> schema`、`weaver-work-cli skills read weaver-e10-<skill>`、layout 测试;创建或更新 Skill 后按 detector 规则询问是否质检。
58
59
 
59
60
  如果发现源资料中有底层接口但当前没有 operation,先判断是否能形成稳定、业务友好的高层 operation。能实现时补 CLI operation、reference 和测试;不能实现时写入 withheld,不要把原始接口路径直接暴露给 Agent。
@@ -67,10 +68,21 @@
67
68
  - 可由当前用户、前置查询、名称解析、prepare continuation 或上下文推导的字段,标为 `derived` 并测试解析失败路径。
68
69
  - 旧 Skill/历史脚本字段需要兼容时,进入 `deprecatedInputAliases`,并测试新旧字段冲突。
69
70
  - 源资料提到但缺少类型、必填、枚举或来源时,标为 `needs-confirmation`,最终报告列出具体问题。
70
- - 接口内部字段、返回字段或展示字段,标为 `not-applicable`。
71
+ - 接口内部字段或展示字段,标为 `not-applicable`。返回字段不能因为“不作为入参”就结束处理;必须继续进入输出修复规则。
71
72
 
72
73
  严禁为了让业务逻辑“跑起来”把不确定字段放进 `additionalProperties: true`。除非已有模块明确是通用 datajson 透传能力,否则业务 operation 的顶层 `inputSchema.additionalProperties` 必须为 `false`。
73
74
 
75
+ ## 输出修复规则
76
+
77
+ 补返回值时逐项判断归属:
78
+
79
+ - CLI 成功 envelope 外层字段固定为 `{schemaVersion, ok, operation, data, meta, warnings}`,`outputSchema` 只描述其中的 `data`。
80
+ - handler 已经归一化的字段,以 CLI 实际返回字段为准,并把源接口字段来源写入 description、reference 或 `operationImpact.outputFields`。
81
+ - 服务端原始响应需要保留时,可暴露 `result`、`raw` 等字段,但这只能作为附加调试/追溯字段;仍要逐项声明已知稳定的业务字段。
82
+ - 源资料响应字段表中的数组必须声明 `items`;嵌套对象必须声明 `properties`;确定必返字段必须进入 `required`;枚举、状态码、分页结束标记和金额/时间格式能确认时要写入 schema。
83
+ - 源资料只有响应示例时,从示例抽取稳定字段并标注示例来源;缺少类型、必填或嵌套结构时,在 `missingOutputSchema` 或 `outputSchemaCoverage` 中标记 `needs-confirmation`。
84
+ - 不要为了规避不确定性把整个输出写成 `additionalProperties: true`。只有明确的原始服务端透传字段可以 `additionalProperties: true`,且必须和稳定业务字段分开。
85
+
74
86
  ## 审计报告格式
75
87
 
76
88
  单模块扫描完成后,先输出或保留一份结构化报告,再动手修复。报告至少包含:
@@ -113,33 +113,10 @@
113
113
 
114
114
  生成的 E10 业务 Skill 必须遵守登录与凭证红线:
115
115
 
116
- - 登录与会话统一由 `weaver-e10-login` 提供;CLI 场景下的等价入口是 `weaver-work-cli auth ...`,业务 Skill 不得自行实现任何登录流程。
117
- - 生成的 SKILL.md frontmatter 必须声明 `dependencies:\n - weaver-e10-login`。
118
- - 每个请求必须携带 `weaver-e10-login` 返回的三项用户信息参数,缺一不可:
119
-
120
- ```text
121
- Cookie: <weaver-e10-login 返回的完整原始 Cookie 串>(禁止裁剪/去重/改写)
122
- eteamsid: <weaver-e10-login 返回的 ETEAMSID>
123
- User-Agent: AgentType=<agentType>,IsAgent=true
124
- ```
125
-
126
- - Skill 与 reference 文档中若描述了接口请求,必须同时写明上述请求头契约,否则发布门禁会阻断。
127
-
128
- ### 登录与凭证契约(生成产物必须遵循)
129
-
130
- 生成的 E10 业务 Skill 必须遵守登录与凭证红线:
131
-
132
- - 登录与会话统一由 `weaver-e10-login` 提供;CLI 场景下的等价入口是 `weaver-work-cli auth ...`,业务 Skill 不得自行实现任何登录流程。
133
- - 生成的 SKILL.md frontmatter 必须声明 `dependencies:\n - weaver-e10-login`。
134
- - 每个请求必须携带 `weaver-e10-login` 返回的三项用户信息参数,缺一不可:
135
-
136
- ```text
137
- Cookie: <weaver-e10-login 返回的完整原始 Cookie 串>(禁止裁剪/去重/改写)
138
- eteamsid: <weaver-e10-login 返回的 ETEAMSID>
139
- User-Agent: AgentType=<agentType>,IsAgent=true
140
- ```
141
-
142
- - Skill 与 reference 文档中若描述了接口请求,必须同时写明上述请求头契约,否则发布门禁会阻断。
116
+ - 登录与会话统一由 `weaver-e10-shared` 共享规则和 `weaver-work-cli auth ...` 命令体系托管,业务 Skill 不得自行实现任何登录流程。
117
+ - 生成的 SKILL.md frontmatter 必须声明 `dependencies:\n - weaver-e10-shared`。
118
+ - 每个请求的请求头三件套(Cookie 完整原始串 / `eteamsid` / `User-Agent`)由 `weaver-work-cli` 统一注入,业务侧不得手工拼装或覆盖;唯一权威声明见 [`../../weaver-e10-shared/SKILL.md`](../../weaver-e10-shared/SKILL.md) 的「请求头契约」章节。
119
+ - Skill 与 reference 文档中若描述了接口请求,只需一行指针引用 `weaver-e10-shared` 的「请求头契约」,不要复制完整代码块。
143
120
 
144
121
  只有源资料存在稳定锚点时才写 `sourceChunks`。可用锚点包括:
145
122
 
@@ -37,7 +37,7 @@ README.md
37
37
  入口文件保持轻量,必须包含:
38
38
 
39
39
  - frontmatter:使用检测工具认可的顶层字段,禁止 `metadata:` 嵌套。
40
- - CRITICAL:要求先读 `../weaver-e10-shared/SKILL.md`;若不存在先执行 `weaver-work-cli skills install shared --target-dir <当前Agent的Skills目录>`,若 CLI 未安装先执行 `npm install -g weaver-work-cli`,安装或读取失败时停止;业务模块安装前版本检查统一写在 shared Skill 中,不在各业务入口重复。
40
+ - CRITICAL:要求先读 `../weaver-e10-shared/SKILL.md`;若共享规则不存在、CLI 未安装或读取失败,必须调用宿主提供的提问/确认弹框说明缺失项与补齐计划,并在确认信息中原样展示 `npm install -g weaver-work-cli`(仅缺 CLI 时执行)和 `weaver-work-cli skills install shared --target-dir <当前Agent的Skills目录>`;用户明确确认后由 Agent 直接代为按顺序执行且每条仅执行一次,不得要求用户手动执行;安装或读取失败时停止。业务模块安装前版本检查统一写在 shared Skill 中,不在各业务入口重复。
41
41
  - 路由优先级:先判断是否属于该业务模块,再选 operation。
42
42
  - 高优先级语义:业务对象、别名、关键字段、常见用户说法。
43
43
  - 命令表:用户意图、CLI operation、按需读取的 reference。
@@ -11,31 +11,20 @@ agent_created: true
11
11
  requires:
12
12
  bins: ["weaver-work-cli"]
13
13
  dependencies:
14
- - weaver-e10-login
14
+ - weaver-e10-shared
15
15
  cliHelp: "weaver-work-cli archive --help"
16
16
  ---
17
17
 
18
- **CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若不存在则必须先执行 `weaver-work-cli skills install shared --target-dir <当前Agent的Skills目录>`,若 CLI 未安装则先执行 `npm install -g weaver-work-cli`,安装或读取失败时必须停止执行。**
18
+ **CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须调用宿主提供的提问/确认弹框,向用户说明必须补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行)及补齐计划,并把下面两条待执行命令原样完整展示在确认信息中;Agent 不能在未确认时自行安装。用户明确确认后,Agent 必须直接代为按顺序执行且每条仅执行一次,不得要求或引导用户手动执行:① 缺 CLI 时执行 `npm install -g weaver-work-cli`;② 再执行 `weaver-work-cli skills install shared --target-dir <SKILLS_ROOT>` 装回共享 skill,`<SKILLS_ROOT>` 取本 SKILL.md 所在目录的上一级绝对目录(即与本技能同级的 skills 根目录),不要省略 `--target-dir`——省略会装进默认目录,导致本技能依然读不到共享规则。命令均成功后重新读取共享规则;仍读不到就停止并把结果报告用户,不得凭猜测继续。**
19
+ **`--is-connector` 判据**:用户明确使用连接器、或上下文要求用连接器完成任务 → 传 `true`;本次任务或上下文直接选择单独技能 → 不传;用户没有明确说明时,按**正在运行的这份 Skill 是哪一级**定——**用户级(条目标 `(user)`)不传,连接器级(标 `(connector)`)传**(同名 Skill 只会运行用户级那一份)。传 `true` 时不要再写 `--profile` / `--base-url`。完整规则见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md)。
19
20
 
20
21
  认证和登录态只能按共享规则通过 `weaver-work-cli auth ...` 命令判断;禁止直接读取、列出、打印或解析用户主目录下的旧 `.e10-cli`、auth、config 或 Keychain 数据。
21
22
 
22
23
  ### 登录与请求头凭证契约
23
24
 
24
- 本 Skill 是 CLI 型技能,不自行发起 HTTP 请求:认证与会话**统一由登录 skill `weaver-e10-login` 提供**(即 `weaver-work-cli auth ...`),禁止自建或绕过登录流程。CLI 调用 E10 接口时按契约注入以下三项用户信息,**缺一不可**:
25
+ 本 Skill 是 CLI 型技能,不自行发起 HTTP 请求:认证与会话**统一由 `weaver-e10-shared` 共享规则和 `weaver-work-cli auth ...` 命令体系托管**,禁止自建或绕过登录流程。
25
26
 
26
- 接口请求头(由 CLI 注入,Agent 不手写):
27
-
28
- ```text
29
- Cookie: <登录返回的完整原始 Cookie 串> # 禁止裁剪、去重或改写
30
- eteamsid: <登录返回的 ETEAMSID>
31
- User-Agent: AgentType=<agentType>,IsAgent=true
32
- ```
33
-
34
- | 凭证 | 取值与要求 |
35
- | --- | --- |
36
- | `Cookie` | 登录返回的**完整原始 Cookie 串**,禁止裁剪、去重或改写 |
37
- | `eteamsid` | 登录返回的 `ETEAMSID` |
38
- | `User-Agent` | `AgentType=<agentType>,IsAgent=true` |
27
+ 请求头三件套(Cookie 完整原始串 / `eteamsid` / `User-Agent`)由 `weaver-work-cli` 统一注入,唯一权威声明见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md) 的「请求头契约」章节。
39
28
 
40
29
  Agent 不得自行拼接、改写或向用户索取上述凭证(禁止要求用户贴 Cookie / ETEAMSID / token),也不得直接 `curl` / `fetch` E10 接口。
41
30
  所有命令通过 `weaver-work-cli --json archive run <operation>` 执行:简单 JSON 优先传 `--input-json '<json>'`,复杂或多行 JSON 先写入 UTF-8 文件再传 `--input <path>`,只有确认当前 shell 能稳定传管道时才使用 `--input -`。调用前先按需读取 references 下对应的文件,查参数结构,不要猜字段;**references 是第一信息源**,`weaver-work-cli archive schema` 是 operation、字段和风险等级的合约来源。
@@ -323,7 +323,7 @@
323
323
  }
324
324
  },
325
325
  "artifactBaseline": {
326
- "aggregateSha256": "ef24e429b8ff9674c028dfafcac23fc7b1c54d4d8ec2cf3acc2599f76ef35daf",
326
+ "aggregateSha256": "4906c249dd3bf507af61ecceac521e3f002027fb80aa2d5c8ddc3d6c929c28e9",
327
327
  "files": [
328
328
  {
329
329
  "path": "src/shortcuts/archive/continuation.ts",
@@ -422,13 +422,13 @@
422
422
  },
423
423
  {
424
424
  "path": "src/shortcuts/index.ts",
425
- "size": 1274,
426
- "sha256": "54df058151b6f3602a2d112a49396b4ad4121cdba06d31c4c368ebd3235192c4"
425
+ "size": 1420,
426
+ "sha256": "569bef374df2d86b511150a0c609ce1abee63f8317994513bce6241276b5be40"
427
427
  },
428
428
  {
429
429
  "path": "skills/weaver-e10-wenshuding/SKILL.md",
430
- "size": 16450,
431
- "sha256": "beeda2dd8a11f5d5c8775d8b80fa72220dcf06eaf1980ccbdad18918e599bc7f"
430
+ "size": 17366,
431
+ "sha256": "6e734da55df0a3d16f96925766a88cdc9b1686786b989be8d9859bd58748df6b"
432
432
  },
433
433
  {
434
434
  "path": "skill-template/product.json",
@@ -503,8 +503,8 @@
503
503
  },
504
504
  {
505
505
  "path": "skill-template/business-info.json",
506
- "size": 6294,
507
- "sha256": "7af8cc1b35564b11a4c33cf566b22919d75c8a4daeec488d6ff8979c098c8ff7"
506
+ "size": 8216,
507
+ "sha256": "370a45e86c6b7e33869c5df1bf08d9f22bd98fa8b157b49716e13bca0e7b63c3"
508
508
  }
509
509
  ]
510
510
  },