weaver-work-cli 0.1.5 → 0.1.7

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 (225) hide show
  1. package/README.md +14 -9
  2. package/dist/cmd/skills/index.js +60 -0
  3. package/dist/internal/e10/auth/commands.js +48 -32
  4. package/dist/internal/e10/auth/session.js +44 -3
  5. package/dist/internal/e10/auth/xiaoe.js +363 -11
  6. package/dist/internal/e10/context.js +4 -2
  7. package/dist/internal/skills/detector.js +42 -0
  8. package/dist/internal/skills/install.js +50 -3
  9. package/dist/shortcuts/archive/render/search-format.js +12 -3
  10. package/dist/shortcuts/ebuilder-form/continuation.js +70 -0
  11. package/dist/shortcuts/ebuilder-form/errors.js +54 -0
  12. package/dist/shortcuts/ebuilder-form/host.js +1238 -0
  13. package/dist/shortcuts/ebuilder-form/index.js +108 -0
  14. package/dist/shortcuts/ebuilder-form/manifest.js +347 -0
  15. package/dist/shortcuts/ebuilder-form/operations/read.js +157 -0
  16. package/dist/shortcuts/ebuilder-form/operations/registry.js +56 -0
  17. package/dist/shortcuts/ebuilder-form/operations/shared.js +132 -0
  18. package/dist/shortcuts/ebuilder-form/operations/types.js +19 -0
  19. package/dist/shortcuts/ebuilder-form/operations/write.js +277 -0
  20. package/dist/shortcuts/ebuilder-form/operations.js +8 -0
  21. package/dist/shortcuts/ehr/operations/salary.js +2 -140
  22. package/dist/shortcuts/im/continuation.js +70 -0
  23. package/dist/shortcuts/{yimiaoban → im}/errors.js +14 -14
  24. package/dist/shortcuts/{yimiaoban → im}/host.js +26 -26
  25. package/dist/shortcuts/{yimiaoban → im}/index.js +42 -42
  26. package/dist/shortcuts/{yimiaoban → im}/manifest.js +7 -6
  27. package/dist/shortcuts/{yimiaoban → im}/operations/file-user.js +54 -41
  28. package/dist/shortcuts/{yimiaoban → im}/operations/group-read.js +46 -44
  29. package/dist/shortcuts/{yimiaoban → im}/operations/group-write.js +113 -66
  30. package/dist/shortcuts/{yimiaoban → im}/operations/msg-sync.js +164 -141
  31. package/dist/shortcuts/{yimiaoban → im}/operations/msg-write.js +47 -47
  32. package/dist/shortcuts/{yimiaoban → im}/operations/person.js +10 -10
  33. package/dist/shortcuts/{yimiaoban → im}/operations/registry.js +10 -8
  34. package/dist/shortcuts/{yimiaoban → im}/operations/session.js +82 -83
  35. package/dist/shortcuts/im/operations/shared.js +442 -0
  36. package/dist/shortcuts/{yimiaoban → im}/operations/types.js +1 -1
  37. package/dist/shortcuts/im/operations/user-remind.js +201 -0
  38. package/dist/shortcuts/{yimiaoban → im}/operations/write-util.js +7 -7
  39. package/dist/shortcuts/{yimiaoban → im}/operations.js +3 -3
  40. package/dist/shortcuts/index.js +10 -2
  41. package/dist/shortcuts/invoice/manifest.js +113 -10
  42. package/dist/shortcuts/invoice/operations/import.js +39 -14
  43. package/dist/shortcuts/invoice/operations/reim.js +38 -18
  44. package/dist/shortcuts/invoice/operations/shared.js +35 -6
  45. package/dist/shortcuts/jiuchuanhui/manifest.js +3 -3
  46. package/dist/shortcuts/jiuchuanhui/operations/registry.js +2 -2
  47. package/dist/shortcuts/{yimiaoban → okr}/continuation.js +10 -10
  48. package/dist/shortcuts/okr/errors.js +70 -0
  49. package/dist/shortcuts/okr/host.js +169 -0
  50. package/dist/shortcuts/okr/index.js +155 -0
  51. package/dist/shortcuts/okr/manifest.js +70 -0
  52. package/dist/shortcuts/okr/operations/link.js +305 -0
  53. package/dist/shortcuts/okr/operations/read.js +481 -0
  54. package/dist/shortcuts/okr/operations/registry.js +31 -0
  55. package/dist/shortcuts/okr/operations/shared.js +381 -0
  56. package/dist/shortcuts/okr/operations/types.js +88 -0
  57. package/dist/shortcuts/okr/operations/write.js +838 -0
  58. package/dist/shortcuts/okr/operations.js +8 -0
  59. package/dist/shortcuts/project/continuation.js +70 -0
  60. package/dist/shortcuts/project/errors.js +53 -0
  61. package/dist/shortcuts/project/host.js +160 -0
  62. package/dist/shortcuts/project/index.js +106 -0
  63. package/dist/shortcuts/project/manifest.js +36 -0
  64. package/dist/shortcuts/project/operations/read.js +551 -0
  65. package/dist/shortcuts/project/operations/registry.js +31 -0
  66. package/dist/shortcuts/project/operations/shared.js +68 -0
  67. package/dist/shortcuts/project/operations/types.js +39 -0
  68. package/dist/shortcuts/project/operations/write.js +266 -0
  69. package/dist/shortcuts/project/operations.js +8 -0
  70. package/dist/shortcuts/workflow/continuation.js +508 -0
  71. package/dist/shortcuts/workflow/endpoints.js +149 -0
  72. package/dist/shortcuts/workflow/errors.js +112 -0
  73. package/dist/shortcuts/workflow/host.js +224 -0
  74. package/dist/shortcuts/workflow/index.js +116 -0
  75. package/dist/shortcuts/workflow/manifest.js +30 -0
  76. package/dist/shortcuts/workflow/operations/form.js +4159 -0
  77. package/dist/shortcuts/workflow/operations/read.js +3778 -0
  78. package/dist/shortcuts/workflow/operations/registry.js +33 -0
  79. package/dist/shortcuts/workflow/operations/shared.js +167 -0
  80. package/dist/shortcuts/workflow/operations/types.js +44 -0
  81. package/dist/shortcuts/workflow/operations/write.js +1991 -0
  82. package/dist/shortcuts/workflow/operations.js +119 -0
  83. package/dist/shortcuts/workflow/state.js +182 -0
  84. package/docs/SKILL.md +5 -3
  85. package/docs/_catalog.md +10 -1
  86. package/docs/agent-invoice.md +2 -2
  87. package/docs/agent-skill-install.md +2 -2
  88. package/docs/e10-auth.md +3 -1
  89. package/docs/ebuilder-form.md +38 -0
  90. package/docs/im.md +104 -0
  91. package/docs/invoice.md +5 -5
  92. package/docs/okr.md +122 -0
  93. package/docs/operation-manual.md +10 -7
  94. package/docs/project.md +69 -0
  95. package/docs/skill-review-2026-09-19.md +68 -0
  96. package/package.json +3 -2
  97. package/scripts/package-skill.mjs +38 -11
  98. package/scripts/sync-connector-skills.mjs +172 -0
  99. package/skill-template/business-info.json +357 -16
  100. package/skill-template/domains/ebuilder-form.md +5 -0
  101. package/skill-template/domains/okr.md +18 -0
  102. package/skill-template/domains/shijingran.md +3 -0
  103. package/skill-template/domains/skill-maker.md +4 -4
  104. package/skill-template/domains/workflow.md +22 -0
  105. package/skill-template/domains/yepiaotong.md +4 -2
  106. package/skill-template/domains/yimiaoban.md +13 -10
  107. package/skill-template/product.json +5 -0
  108. package/skill-template/skill-template.md +1 -0
  109. package/skills/weaver-e10-calendar/SKILL.md +5 -1
  110. package/skills/weaver-e10-calendar/references/calendar-query.md +7 -0
  111. package/skills/weaver-e10-calendar/references/source-manifest.json +314 -32
  112. package/skills/weaver-e10-ebuilder-form/SKILL.md +123 -0
  113. package/skills/weaver-e10-ebuilder-form/references/context-routing.md +90 -0
  114. package/skills/weaver-e10-ebuilder-form/references/custom-api.md +86 -0
  115. package/skills/weaver-e10-ebuilder-form/references/disabled-capabilities.md +50 -0
  116. package/skills/weaver-e10-ebuilder-form/references/fields-browser.md +100 -0
  117. package/skills/weaver-e10-ebuilder-form/references/list-nlist.md +91 -0
  118. package/skills/weaver-e10-ebuilder-form/references/openapi-read.md +74 -0
  119. package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +86 -0
  120. package/skills/weaver-e10-ebuilder-form/references/source-manifest.json +107 -0
  121. package/skills/weaver-e10-esb/SKILL.md +1 -1
  122. package/skills/weaver-e10-esb/references/source-manifest.json +15 -14
  123. package/skills/weaver-e10-hrm/SKILL.md +1 -1
  124. package/skills/weaver-e10-hrm/references/source-manifest.json +357 -38
  125. package/skills/weaver-e10-jiuchuanhui/SKILL.md +22 -4
  126. package/skills/weaver-e10-jiuchuanhui/references/clue.md +4 -2
  127. package/skills/weaver-e10-jiuchuanhui/references/contact.md +1 -1
  128. package/skills/weaver-e10-jiuchuanhui/references/customer.md +3 -3
  129. package/skills/weaver-e10-jiuchuanhui/references/disabled-capabilities.md +1 -1
  130. package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +10 -10
  131. package/skills/weaver-e10-jiuchuanhui/references/general-helpers.md +3 -3
  132. package/skills/weaver-e10-jiuchuanhui/references/sale.md +7 -7
  133. package/skills/weaver-e10-jiuchuanhui/references/source-manifest.json +3 -3
  134. package/skills/weaver-e10-jucailin/SKILL.md +2 -2
  135. package/skills/weaver-e10-mail/SKILL.md +22 -6
  136. package/skills/weaver-e10-meeting/SKILL.md +22 -1
  137. package/skills/weaver-e10-okr/SKILL.md +139 -0
  138. package/skills/weaver-e10-okr/references/okr-align.md +59 -0
  139. package/skills/weaver-e10-okr/references/okr-keyresult.md +68 -0
  140. package/skills/weaver-e10-okr/references/okr-link-routing.md +67 -0
  141. package/skills/weaver-e10-okr/references/okr-query.md +105 -0
  142. package/skills/weaver-e10-okr/references/okr-write.md +94 -0
  143. package/skills/weaver-e10-okr/references/source-manifest.json +672 -0
  144. package/skills/weaver-e10-plan/SKILL.md +3 -3
  145. package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
  146. package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
  147. package/skills/weaver-e10-qiyecheng/SKILL.md +21 -1
  148. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +17 -17
  149. package/skills/weaver-e10-shared/SKILL.md +79 -11
  150. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +41 -8
  151. package/skills/weaver-e10-shared/references/non-interactive-environment.md +78 -0
  152. package/skills/weaver-e10-shared/references/weaver-e10-installation.md +39 -0
  153. package/skills/weaver-e10-shijingran/SKILL.md +83 -0
  154. package/skills/weaver-e10-shijingran/references/field-resolution.md +105 -0
  155. package/skills/weaver-e10-shijingran/references/operations.md +154 -0
  156. package/skills/weaver-e10-shijingran/references/source-manifest.json +1380 -0
  157. package/skills/weaver-e10-shijingran/references/write-operations.md +90 -0
  158. package/skills/weaver-e10-skill-maker/SKILL.md +26 -9
  159. package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +39 -8
  160. package/skills/weaver-e10-skill-maker/references/detector-validation.md +25 -8
  161. package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +66 -5
  162. package/skills/weaver-e10-skill-maker/references/module-gap-audit-and-repair.md +86 -0
  163. package/skills/weaver-e10-skill-maker/references/source-update-detection.md +59 -5
  164. package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +16 -8
  165. package/skills/weaver-e10-wenshuding/SKILL.md +28 -4
  166. package/skills/weaver-e10-wenshuding/references/archive-search.md +14 -0
  167. package/skills/weaver-e10-wenshuding/references/source-manifest.json +27 -26
  168. package/skills/weaver-e10-workflow/SKILL.md +250 -0
  169. package/skills/weaver-e10-workflow/references/source-manifest.json +1062 -0
  170. package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +96 -0
  171. package/skills/weaver-e10-workflow/references/workflow-batch.md +275 -0
  172. package/skills/weaver-e10-workflow/references/workflow-create.md +182 -0
  173. package/skills/weaver-e10-workflow/references/workflow-edit.md +106 -0
  174. package/skills/weaver-e10-workflow/references/workflow-memory.md +165 -0
  175. package/skills/weaver-e10-workflow/references/workflow-operate.md +153 -0
  176. package/skills/weaver-e10-workflow/references/workflow-query.md +821 -0
  177. package/skills/weaver-e10-workflow/references/workflow-share.md +117 -0
  178. package/skills/weaver-e10-workflow/references/workflow-view.md +189 -0
  179. package/skills/weaver-e10-yepiaotong/SKILL.md +28 -28
  180. package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +11 -5
  181. package/skills/weaver-e10-yepiaotong/references/invoice-import.md +14 -8
  182. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +9 -43
  183. package/skills/weaver-e10-yepiaotong/references/invoice-issuing.md +8 -0
  184. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +13 -17
  185. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +6 -7
  186. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +2 -2
  187. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +1155 -553
  188. package/skills/weaver-e10-yimiaoban/SKILL.md +56 -38
  189. package/skills/weaver-e10-yimiaoban/references/ding-write.md +8 -8
  190. package/skills/weaver-e10-yimiaoban/references/error-codes.md +16 -0
  191. package/skills/weaver-e10-yimiaoban/references/field-resolution.md +10 -10
  192. package/skills/weaver-e10-yimiaoban/references/file-user-i18n.md +12 -12
  193. package/skills/weaver-e10-yimiaoban/references/group-read.md +16 -16
  194. package/skills/weaver-e10-yimiaoban/references/group-write.md +17 -15
  195. package/skills/weaver-e10-yimiaoban/references/msg-read.md +21 -17
  196. package/skills/weaver-e10-yimiaoban/references/msg-write.md +10 -10
  197. package/skills/weaver-e10-yimiaoban/references/person.md +6 -6
  198. package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +15 -11
  199. package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +11 -10
  200. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +2164 -154
  201. package/skills/weaver-e10-yimiaoban/references/user-remind.md +75 -0
  202. package/skills/weaver-e10-ziguanjia/SKILL.md +4 -2
  203. package/skills/weaver-e10-ziguanjia/references/source-manifest.json +99 -29
  204. package/tools/weaver-skill-detector-1.0.13/SKILL.md +253 -0
  205. package/tools/weaver-skill-detector-1.0.13/_meta.json +6 -0
  206. package/tools/weaver-skill-detector-1.0.13/references/checklist.md +298 -0
  207. package/tools/weaver-skill-detector-1.0.13/scripts/validate_skill.py +4190 -0
  208. package/dist/shortcuts/yimiaoban/operations/shared.js +0 -236
  209. package/docs/yimiaoban.md +0 -86
  210. package/skills/weaver-e10-calendar/product.json +0 -8
  211. package/skills/weaver-e10-esb/product.json +0 -8
  212. package/skills/weaver-e10-hrm/product.json +0 -8
  213. package/skills/weaver-e10-jiuchuanhui/product.json +0 -8
  214. package/skills/weaver-e10-jucailin/product.json +0 -8
  215. package/skills/weaver-e10-mail/product.json +0 -8
  216. package/skills/weaver-e10-meeting/product.json +0 -8
  217. package/skills/weaver-e10-plan/product.json +0 -8
  218. package/skills/weaver-e10-qiyecheng/product.json +0 -8
  219. package/skills/weaver-e10-skill-maker/product.json +0 -8
  220. package/skills/weaver-e10-wenshuding/product.json +0 -8
  221. package/skills/weaver-e10-yepiaotong/product.json +0 -8
  222. package/skills/weaver-e10-yepiaotong/references/invoice-red.md +0 -261
  223. package/skills/weaver-e10-yimiaoban/product.json +0 -8
  224. package/skills/weaver-e10-ziguanjia/product.json +0 -8
  225. /package/dist/shortcuts/{yimiaoban → im}/operations/msg-parse.js +0 -0
@@ -104,12 +104,12 @@
104
104
  }
105
105
  },
106
106
  "artifactBaseline": {
107
- "aggregateSha256": "37985ab4ee42990df1edf9d9922f820f199116dfb4da0f3127402884d25e5325",
107
+ "aggregateSha256": "9867d4f6de7aa27f37e6bad3702e22b3d2f3fe5b62157642e32861a1847c22f9",
108
108
  "files": [
109
109
  {
110
110
  "path": "docs/_catalog.md",
111
- "size": 2580,
112
- "sha256": "6944c1aaf36be248aed86513265c6ef41932dd09ad140d900ef3d0238104e431"
111
+ "size": 4580,
112
+ "sha256": "7ec48267965b4ccd35dcc463ed0a73dd71c3f4d2fc3d978165f508261945d4b3"
113
113
  },
114
114
  {
115
115
  "path": "docs/esb.md",
@@ -118,13 +118,13 @@
118
118
  },
119
119
  {
120
120
  "path": "docs/SKILL.md",
121
- "size": 3703,
122
- "sha256": "4e30b95045178cd1fdb008f40936253b07a117f48b3801177ea08cd7968d4109"
121
+ "size": 4986,
122
+ "sha256": "12f0a13396dd24b073abdf438ea82a7b307deb7d33dede5cb7d177172cb37d65"
123
123
  },
124
124
  {
125
125
  "path": "skill-template/business-info.json",
126
- "size": 1772,
127
- "sha256": "16ddf164f518921175a87dbb2ca8262e85da2a43afe5b1eb149c2326e96bdb5e"
126
+ "size": 6294,
127
+ "sha256": "7af8cc1b35564b11a4c33cf566b22919d75c8a4daeec488d6ff8979c098c8ff7"
128
128
  },
129
129
  {
130
130
  "path": "skill-template/domains/esb.md",
@@ -132,9 +132,10 @@
132
132
  "sha256": "a88dc8b44452a121bb2974c156e512ca34c1c71c8fe66407b3de7e94557a4e95"
133
133
  },
134
134
  {
135
- "path": "skills/weaver-e10-esb/product.json",
136
- "size": 178,
137
- "sha256": "206c4277cfe7b0c533789fc67a9b697d64714a185d2fccc042fa4ac76d40e6ea"
135
+ "path": "skill-template/product.json",
136
+ "role": "generated-skill-meta",
137
+ "size": 89,
138
+ "sha256": "211300a31c39f0feea66331101edea394ae841307302404c6d113b314954ee83"
138
139
  },
139
140
  {
140
141
  "path": "skills/weaver-e10-esb/references/input-format.md",
@@ -148,8 +149,8 @@
148
149
  },
149
150
  {
150
151
  "path": "skills/weaver-e10-esb/SKILL.md",
151
- "size": 6799,
152
- "sha256": "20b0eb14c79a31188c7dfefd4de0adc9e5c53dfb93b10bdd18d71d4c228a84b9"
152
+ "size": 6841,
153
+ "sha256": "b6b1bb5c629ef627267de04922e0f5a9504fe7eafe52f8406924f2981a14198d"
153
154
  },
154
155
  {
155
156
  "path": "src/shortcuts/esb/continuation.ts",
@@ -208,8 +209,8 @@
208
209
  },
209
210
  {
210
211
  "path": "src/shortcuts/index.ts",
211
- "size": 648,
212
- "sha256": "f07b4df6baf33848ef0ce2134065373a03a9f871be0de556f0f1cdcad3f832dd"
212
+ "size": 1274,
213
+ "sha256": "54df058151b6f3602a2d112a49396b4ad4121cdba06d31c4c368ebd3235192c4"
213
214
  },
214
215
  {
215
216
  "path": "test/business/esb-command.test.ts",
@@ -15,7 +15,7 @@ cliHelp: "weaver-work-cli hrm --help"
15
15
 
16
16
  # 泛微E10组织管理
17
17
 
18
- **CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若不存在则必须先执行 `weaver-work-cli skills install shared --skills-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 输出和高风险写入规则。若不存在则必须先执行 `weaver-work-cli skills install shared --target-dir <当前Agent的Skills目录>`,若 CLI 未安装则先执行 `npm install -g weaver-work-cli`,安装或读取失败时必须停止执行。**
19
19
 
20
20
 
21
21
  本技能覆盖组织管理三大业务域:**员工(employee)**、**组织(org)**、**岗位(position)**,全部为只读查询,无写操作。代理商查询(`containsDls=true`)属于禁用边界,见 [`references/employee.md`](references/employee.md)。
@@ -34,30 +34,150 @@
34
34
  ]
35
35
  },
36
36
  "sources": [
37
- { "path": "SKILL.md", "role": "api-doc", "size": 17494, "sha256": "24866b321ca546eeeac7122f6b08d85ce8aea8ae44b01c52b75b914cca97fa43" },
38
- { "path": "employee/catalog.md", "role": "api-doc", "size": 8936, "sha256": "66fcc010eb555498eae78a21e18d2a36c5605b081a0d013f015234a84ecba705" },
39
- { "path": "employee/module.md", "role": "api-doc", "size": 21455, "sha256": "1fede5c4542776f0faa43d0a624af8f1018bd786744f3abc8a3b16ef3885d362" },
40
- { "path": "employee/hrm-employee-query.md", "role": "api-doc", "size": 14166, "sha256": "d06aa7b8fab8555ec174a47677600128860665b83c26732db323da44b3dd149c" },
41
- { "path": "employee/hrm-employee-detail.md", "role": "api-doc", "size": 9699, "sha256": "e07ce5738393b97ee8ebf829592fc2236d03e5a9cd1c7f2dc48e48461a8350ac" },
42
- { "path": "employee/hrm-employee-batch-detail.md", "role": "api-doc", "size": 7507, "sha256": "f09d3a6270be8a30a6fca81408849444f3e8ad8fbcee0107e7995b9d31f76acc" },
43
- { "path": "employee/hrm-employee-subordinate.md", "role": "api-doc", "size": 8156, "sha256": "a50101c73a7da66a1e9cde4566e918a222be23166470b325c3304ee6864ede1d" },
44
- { "path": "employee/hrm-employee-subordinate-byid.md", "role": "api-doc", "size": 10421, "sha256": "8369c287f538f7e34a63bdba1d7827d227abcdbecdf03c99c6fc660ccc2fa9dd" },
45
- { "path": "employee/hrm-employee-dls.md", "role": "api-doc", "size": 6577, "sha256": "a4adae454cc909a479ab33c663f73c6ede700df6211567d65094b71c19116d77" },
46
- { "path": "employee/hrm-employee-matching.md", "role": "api-doc", "size": 7138, "sha256": "eba3b7270a7707106e48069d78417b56ce0b31ac1dee11987eb43f95cfd03334" },
47
- { "path": "org/catalog.md", "role": "api-doc", "size": 3689, "sha256": "ca1196557cb9b74d2502fc2ca293055f0b537b8dc304a6b1d10f553c49f83f12" },
48
- { "path": "org/module.md", "role": "api-doc", "size": 11161, "sha256": "415e2e2ab2d1d905bd1131770abc9dfd53141f0da9e019ec5bee92beb7d14a32" },
49
- { "path": "org/hrm-org-subcompany-list.md", "role": "api-doc", "size": 7176, "sha256": "1f112cbd4512c93f45cf1d1f04da01c5554e1356d13e8a3a9410c5cf37252aca" },
50
- { "path": "org/hrm-org-department-list.md", "role": "api-doc", "size": 8471, "sha256": "a2fbc5d1b615bb596a045bfa5738b762d7bc1c46689ef0fbf0b3fa17222235f4" },
51
- { "path": "org/hrm-org-detail.md", "role": "api-doc", "size": 13600, "sha256": "8d0be5707dccdee6f04b5f084830018047b44824ed7c5d4192fafacbd321c04a" },
52
- { "path": "org/hrm-org-path-query.md", "role": "api-doc", "size": 7736, "sha256": "548675ef7359373a4e3ab166a9378fe25b97847560b690aaa7ac65d597dc99ff" },
53
- { "path": "position/catalog.md", "role": "api-doc", "size": 5149, "sha256": "0b60e5bb1508c9d37cfaa70eceda08cacc20ee8631362d2b9bd311d86882738d" },
54
- { "path": "position/module.md", "role": "api-doc", "size": 10909, "sha256": "c75b8e4a0f0f9e2989224a63ba37acb9e7cdf1844322ac53eea23ec0b4660803" },
55
- { "path": "position/hrm-position-browse.md", "role": "api-doc", "size": 8844, "sha256": "ee52c1f1b4d36b2527b2a13c04fa07298db7a4afb24d100278b4a86dfd798414" },
56
- { "path": "position/hrm-position-detail.md", "role": "api-doc", "size": 11809, "sha256": "00d4853296292eb1b8de1c0a353641d55e697ccff6db9cb948c6039b641a83c2" },
57
- { "path": "position/hrm-position-list.md", "role": "api-doc", "size": 9980, "sha256": "d4cc8b258fc765836d5f3e2e7cce9fda1c5ca4c6d63140b99396c9926b3ffd71" },
58
- { "path": "scripts/hrm-cli.mjs", "role": "code", "size": 17279, "sha256": "56081ce43a5870a9830778e89982d8dfa4dfc21999695f8af4e4dddb43a06a1e" },
59
- { "path": "scripts/hrm-position-cli.mjs", "role": "code", "size": 12062, "sha256": "f8a5fd7d859dc81a739d1989e093cd6d676d56a26a02740c4b31bcad26c8286d" },
60
- { "path": "scripts/hrm-request.mjs", "role": "code", "size": 12478, "sha256": "6480e18a029d9e468a0f8acc5d856958eb94e7132e7ee9f7a9cce8306fcdf8df" }
37
+ {
38
+ "path": "SKILL.md",
39
+ "role": "api-doc",
40
+ "size": 17494,
41
+ "sha256": "24866b321ca546eeeac7122f6b08d85ce8aea8ae44b01c52b75b914cca97fa43"
42
+ },
43
+ {
44
+ "path": "employee/catalog.md",
45
+ "role": "api-doc",
46
+ "size": 8936,
47
+ "sha256": "66fcc010eb555498eae78a21e18d2a36c5605b081a0d013f015234a84ecba705"
48
+ },
49
+ {
50
+ "path": "employee/module.md",
51
+ "role": "api-doc",
52
+ "size": 21455,
53
+ "sha256": "1fede5c4542776f0faa43d0a624af8f1018bd786744f3abc8a3b16ef3885d362"
54
+ },
55
+ {
56
+ "path": "employee/hrm-employee-query.md",
57
+ "role": "api-doc",
58
+ "size": 14166,
59
+ "sha256": "d06aa7b8fab8555ec174a47677600128860665b83c26732db323da44b3dd149c"
60
+ },
61
+ {
62
+ "path": "employee/hrm-employee-detail.md",
63
+ "role": "api-doc",
64
+ "size": 9699,
65
+ "sha256": "e07ce5738393b97ee8ebf829592fc2236d03e5a9cd1c7f2dc48e48461a8350ac"
66
+ },
67
+ {
68
+ "path": "employee/hrm-employee-batch-detail.md",
69
+ "role": "api-doc",
70
+ "size": 7507,
71
+ "sha256": "f09d3a6270be8a30a6fca81408849444f3e8ad8fbcee0107e7995b9d31f76acc"
72
+ },
73
+ {
74
+ "path": "employee/hrm-employee-subordinate.md",
75
+ "role": "api-doc",
76
+ "size": 8156,
77
+ "sha256": "a50101c73a7da66a1e9cde4566e918a222be23166470b325c3304ee6864ede1d"
78
+ },
79
+ {
80
+ "path": "employee/hrm-employee-subordinate-byid.md",
81
+ "role": "api-doc",
82
+ "size": 10421,
83
+ "sha256": "8369c287f538f7e34a63bdba1d7827d227abcdbecdf03c99c6fc660ccc2fa9dd"
84
+ },
85
+ {
86
+ "path": "employee/hrm-employee-dls.md",
87
+ "role": "api-doc",
88
+ "size": 6577,
89
+ "sha256": "a4adae454cc909a479ab33c663f73c6ede700df6211567d65094b71c19116d77"
90
+ },
91
+ {
92
+ "path": "employee/hrm-employee-matching.md",
93
+ "role": "api-doc",
94
+ "size": 7138,
95
+ "sha256": "eba3b7270a7707106e48069d78417b56ce0b31ac1dee11987eb43f95cfd03334"
96
+ },
97
+ {
98
+ "path": "org/catalog.md",
99
+ "role": "api-doc",
100
+ "size": 3689,
101
+ "sha256": "ca1196557cb9b74d2502fc2ca293055f0b537b8dc304a6b1d10f553c49f83f12"
102
+ },
103
+ {
104
+ "path": "org/module.md",
105
+ "role": "api-doc",
106
+ "size": 11161,
107
+ "sha256": "415e2e2ab2d1d905bd1131770abc9dfd53141f0da9e019ec5bee92beb7d14a32"
108
+ },
109
+ {
110
+ "path": "org/hrm-org-subcompany-list.md",
111
+ "role": "api-doc",
112
+ "size": 7176,
113
+ "sha256": "1f112cbd4512c93f45cf1d1f04da01c5554e1356d13e8a3a9410c5cf37252aca"
114
+ },
115
+ {
116
+ "path": "org/hrm-org-department-list.md",
117
+ "role": "api-doc",
118
+ "size": 8471,
119
+ "sha256": "a2fbc5d1b615bb596a045bfa5738b762d7bc1c46689ef0fbf0b3fa17222235f4"
120
+ },
121
+ {
122
+ "path": "org/hrm-org-detail.md",
123
+ "role": "api-doc",
124
+ "size": 13600,
125
+ "sha256": "8d0be5707dccdee6f04b5f084830018047b44824ed7c5d4192fafacbd321c04a"
126
+ },
127
+ {
128
+ "path": "org/hrm-org-path-query.md",
129
+ "role": "api-doc",
130
+ "size": 7736,
131
+ "sha256": "548675ef7359373a4e3ab166a9378fe25b97847560b690aaa7ac65d597dc99ff"
132
+ },
133
+ {
134
+ "path": "position/catalog.md",
135
+ "role": "api-doc",
136
+ "size": 5149,
137
+ "sha256": "0b60e5bb1508c9d37cfaa70eceda08cacc20ee8631362d2b9bd311d86882738d"
138
+ },
139
+ {
140
+ "path": "position/module.md",
141
+ "role": "api-doc",
142
+ "size": 10909,
143
+ "sha256": "c75b8e4a0f0f9e2989224a63ba37acb9e7cdf1844322ac53eea23ec0b4660803"
144
+ },
145
+ {
146
+ "path": "position/hrm-position-browse.md",
147
+ "role": "api-doc",
148
+ "size": 8844,
149
+ "sha256": "ee52c1f1b4d36b2527b2a13c04fa07298db7a4afb24d100278b4a86dfd798414"
150
+ },
151
+ {
152
+ "path": "position/hrm-position-detail.md",
153
+ "role": "api-doc",
154
+ "size": 11809,
155
+ "sha256": "00d4853296292eb1b8de1c0a353641d55e697ccff6db9cb948c6039b641a83c2"
156
+ },
157
+ {
158
+ "path": "position/hrm-position-list.md",
159
+ "role": "api-doc",
160
+ "size": 9980,
161
+ "sha256": "d4cc8b258fc765836d5f3e2e7cce9fda1c5ca4c6d63140b99396c9926b3ffd71"
162
+ },
163
+ {
164
+ "path": "scripts/hrm-cli.mjs",
165
+ "role": "code",
166
+ "size": 17279,
167
+ "sha256": "56081ce43a5870a9830778e89982d8dfa4dfc21999695f8af4e4dddb43a06a1e"
168
+ },
169
+ {
170
+ "path": "scripts/hrm-position-cli.mjs",
171
+ "role": "code",
172
+ "size": 12062,
173
+ "sha256": "f8a5fd7d859dc81a739d1989e093cd6d676d56a26a02740c4b31bcad26c8286d"
174
+ },
175
+ {
176
+ "path": "scripts/hrm-request.mjs",
177
+ "role": "code",
178
+ "size": 12478,
179
+ "sha256": "6480e18a029d9e468a0f8acc5d856958eb94e7132e7ee9f7a9cce8306fcdf8df"
180
+ }
61
181
  ],
62
182
  "sourceChunks": [
63
183
  {
@@ -73,7 +193,9 @@
73
193
  "hrm.subordinate.by-id",
74
194
  "hrm.dept.members"
75
195
  ],
76
- "mapsToReferences": ["references/employee.md"]
196
+ "mapsToReferences": [
197
+ "references/employee.md"
198
+ ]
77
199
  },
78
200
  {
79
201
  "id": "hrm.org",
@@ -84,7 +206,9 @@
84
206
  "hrm.org.query",
85
207
  "hrm.org.detail"
86
208
  ],
87
- "mapsToReferences": ["references/org.md"]
209
+ "mapsToReferences": [
210
+ "references/org.md"
211
+ ]
88
212
  },
89
213
  {
90
214
  "id": "hrm.position",
@@ -96,21 +220,216 @@
96
220
  "hrm.position.detail",
97
221
  "hrm.position.list"
98
222
  ],
99
- "mapsToReferences": ["references/position.md"]
223
+ "mapsToReferences": [
224
+ "references/position.md"
225
+ ]
100
226
  }
101
227
  ],
102
228
  "operationImpact": {
103
- "hrm.employee.query": { "sourceChunkIds": ["hrm.employee"], "schemaFields": ["keyword", "username", "job_num", "mobile", "email", "status", "current", "pageSize"], "references": ["references/employee.md"], "tests": ["test/business/hrm-operations.test.ts", "test/business/hrm-host.test.ts"], "risk": "read", "requiresConfirmationChain": false },
104
- "hrm.employee.batch": { "sourceChunkIds": ["hrm.employee"], "schemaFields": ["ids"], "references": ["references/employee.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false },
105
- "hrm.employee.detail": { "sourceChunkIds": ["hrm.employee"], "schemaFields": ["id"], "references": ["references/employee.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false },
106
- "hrm.subordinate.mine": { "sourceChunkIds": ["hrm.employee"], "schemaFields": ["scope", "current", "pageSize"], "references": ["references/employee.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false },
107
- "hrm.subordinate.by-id": { "sourceChunkIds": ["hrm.employee"], "schemaFields": ["id", "scope", "pageNo", "pageSize"], "references": ["references/employee.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false },
108
- "hrm.dept.members": { "sourceChunkIds": ["hrm.employee"], "schemaFields": ["dept", "current", "pageSize"], "references": ["references/employee.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false },
109
- "hrm.org.query": { "sourceChunkIds": ["hrm.org"], "schemaFields": ["type", "name", "code", "parent", "subcompany", "supSubDepartment", "current", "pageSize"], "references": ["references/org.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false },
110
- "hrm.org.detail": { "sourceChunkIds": ["hrm.org"], "schemaFields": ["id"], "references": ["references/org.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false },
111
- "hrm.position.query": { "sourceChunkIds": ["hrm.position"], "schemaFields": ["keyword", "name", "code"], "references": ["references/position.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false },
112
- "hrm.position.detail": { "sourceChunkIds": ["hrm.position"], "schemaFields": ["id"], "references": ["references/position.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false },
113
- "hrm.position.list": { "sourceChunkIds": ["hrm.position"], "schemaFields": ["org", "name", "code", "all", "pageSize"], "references": ["references/position.md"], "tests": ["test/business/hrm-operations.test.ts"], "risk": "read", "requiresConfirmationChain": false }
229
+ "hrm.employee.query": {
230
+ "sourceChunkIds": [
231
+ "hrm.employee"
232
+ ],
233
+ "schemaFields": [
234
+ "keyword",
235
+ "username",
236
+ "job_num",
237
+ "mobile",
238
+ "email",
239
+ "status",
240
+ "current",
241
+ "pageSize"
242
+ ],
243
+ "references": [
244
+ "references/employee.md"
245
+ ],
246
+ "tests": [
247
+ "test/business/hrm-operations.test.ts",
248
+ "test/business/hrm-host.test.ts"
249
+ ],
250
+ "risk": "read",
251
+ "requiresConfirmationChain": false
252
+ },
253
+ "hrm.employee.batch": {
254
+ "sourceChunkIds": [
255
+ "hrm.employee"
256
+ ],
257
+ "schemaFields": [
258
+ "ids"
259
+ ],
260
+ "references": [
261
+ "references/employee.md"
262
+ ],
263
+ "tests": [
264
+ "test/business/hrm-operations.test.ts"
265
+ ],
266
+ "risk": "read",
267
+ "requiresConfirmationChain": false
268
+ },
269
+ "hrm.employee.detail": {
270
+ "sourceChunkIds": [
271
+ "hrm.employee"
272
+ ],
273
+ "schemaFields": [
274
+ "id"
275
+ ],
276
+ "references": [
277
+ "references/employee.md"
278
+ ],
279
+ "tests": [
280
+ "test/business/hrm-operations.test.ts"
281
+ ],
282
+ "risk": "read",
283
+ "requiresConfirmationChain": false
284
+ },
285
+ "hrm.subordinate.mine": {
286
+ "sourceChunkIds": [
287
+ "hrm.employee"
288
+ ],
289
+ "schemaFields": [
290
+ "scope",
291
+ "current",
292
+ "pageSize"
293
+ ],
294
+ "references": [
295
+ "references/employee.md"
296
+ ],
297
+ "tests": [
298
+ "test/business/hrm-operations.test.ts"
299
+ ],
300
+ "risk": "read",
301
+ "requiresConfirmationChain": false
302
+ },
303
+ "hrm.subordinate.by-id": {
304
+ "sourceChunkIds": [
305
+ "hrm.employee"
306
+ ],
307
+ "schemaFields": [
308
+ "id",
309
+ "scope",
310
+ "pageNo",
311
+ "pageSize"
312
+ ],
313
+ "references": [
314
+ "references/employee.md"
315
+ ],
316
+ "tests": [
317
+ "test/business/hrm-operations.test.ts"
318
+ ],
319
+ "risk": "read",
320
+ "requiresConfirmationChain": false
321
+ },
322
+ "hrm.dept.members": {
323
+ "sourceChunkIds": [
324
+ "hrm.employee"
325
+ ],
326
+ "schemaFields": [
327
+ "dept",
328
+ "current",
329
+ "pageSize"
330
+ ],
331
+ "references": [
332
+ "references/employee.md"
333
+ ],
334
+ "tests": [
335
+ "test/business/hrm-operations.test.ts"
336
+ ],
337
+ "risk": "read",
338
+ "requiresConfirmationChain": false
339
+ },
340
+ "hrm.org.query": {
341
+ "sourceChunkIds": [
342
+ "hrm.org"
343
+ ],
344
+ "schemaFields": [
345
+ "type",
346
+ "name",
347
+ "code",
348
+ "parent",
349
+ "subcompany",
350
+ "supSubDepartment",
351
+ "current",
352
+ "pageSize"
353
+ ],
354
+ "references": [
355
+ "references/org.md"
356
+ ],
357
+ "tests": [
358
+ "test/business/hrm-operations.test.ts"
359
+ ],
360
+ "risk": "read",
361
+ "requiresConfirmationChain": false
362
+ },
363
+ "hrm.org.detail": {
364
+ "sourceChunkIds": [
365
+ "hrm.org"
366
+ ],
367
+ "schemaFields": [
368
+ "id"
369
+ ],
370
+ "references": [
371
+ "references/org.md"
372
+ ],
373
+ "tests": [
374
+ "test/business/hrm-operations.test.ts"
375
+ ],
376
+ "risk": "read",
377
+ "requiresConfirmationChain": false
378
+ },
379
+ "hrm.position.query": {
380
+ "sourceChunkIds": [
381
+ "hrm.position"
382
+ ],
383
+ "schemaFields": [
384
+ "keyword",
385
+ "name",
386
+ "code"
387
+ ],
388
+ "references": [
389
+ "references/position.md"
390
+ ],
391
+ "tests": [
392
+ "test/business/hrm-operations.test.ts"
393
+ ],
394
+ "risk": "read",
395
+ "requiresConfirmationChain": false
396
+ },
397
+ "hrm.position.detail": {
398
+ "sourceChunkIds": [
399
+ "hrm.position"
400
+ ],
401
+ "schemaFields": [
402
+ "id"
403
+ ],
404
+ "references": [
405
+ "references/position.md"
406
+ ],
407
+ "tests": [
408
+ "test/business/hrm-operations.test.ts"
409
+ ],
410
+ "risk": "read",
411
+ "requiresConfirmationChain": false
412
+ },
413
+ "hrm.position.list": {
414
+ "sourceChunkIds": [
415
+ "hrm.position"
416
+ ],
417
+ "schemaFields": [
418
+ "org",
419
+ "name",
420
+ "code",
421
+ "all",
422
+ "pageSize"
423
+ ],
424
+ "references": [
425
+ "references/position.md"
426
+ ],
427
+ "tests": [
428
+ "test/business/hrm-operations.test.ts"
429
+ ],
430
+ "risk": "read",
431
+ "requiresConfirmationChain": false
432
+ }
114
433
  },
115
434
  "notes": [
116
435
  "源资料为用户提供的 weaver-interface 仓库 hrm 模块(原始 document-skill 形态,含 SKILL.md + employee/org/position 模块文档 + scripts/*.mjs 参考 CLI)。",
@@ -10,24 +10,41 @@ author: 泛微网络科技股份有限公司
10
10
  agent_created: true
11
11
  requires:
12
12
  bins: ["weaver-work-cli"]
13
+ dependencies:
14
+ - weaver-e10-login
13
15
  cliHelp: "weaver-work-cli jiuchuanhui --help"
14
16
  ---
15
17
 
16
- **CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若不存在则必须先执行 `weaver-work-cli skills install shared --skills-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 输出和高风险写入规则。若不存在则必须先执行 `weaver-work-cli skills install shared --target-dir <当前Agent的Skills目录>`,若 CLI 未安装则先执行 `npm install -g weaver-work-cli`,安装或读取失败时必须停止执行。**
17
19
 
18
20
  认证和登录态只能按共享规则通过 `weaver-work-cli auth ...` 命令判断;CLI 会自动携带完整 Cookie、`eteamsid` 与 `User-Agent: AgentType=<agentType>,IsAgent=true`,业务调用方不得覆盖这三条 header,也不得在业务 JSON 中传入这些 key。禁止直接读取、列出、打印或解析用户主目录下的 `.e10-cli`、auth、config 或 Keychain 数据。
19
21
  所有命令通过 `weaver-work-cli --json jiuchuanhui run <operation>` 执行:简单 JSON 传 `--input-json '<json>'`,复杂或多行 JSON 先写入 UTF-8 文件再传 `--input <path>`,只有确认当前 shell 能稳定传管道时才使用 `--input -`。调用前先按需读取 references 下对应的文件,查参数结构,不要猜字段;**references 是第一信息源**,`weaver-work-cli jiuchuanhui schema` 是 operation、字段和风险等级的合约来源。
20
22
  命令示例、提示词和临时说明必须同时兼容 Windows 和 macOS/Linux;涉及 JSON 输入、用户目录、路径分隔符、Python 启动器、文件删除、目录查看或文件比对时,同时给 Windows PowerShell 与 macOS/Linux(bash/zsh)两套示例。Agent 先根据当前系统和 shell 选择对应示例,不确定时用 `node -p "process.platform"` 判断。Windows/PowerShell 下不要使用 `printf`、`$HOME/...`、`~/...`、bash 反斜杠续行、`rm/ls/diff/python3` 等 Unix-only 写法。
21
23
  涉及附件、图片、本地文件、远程 URL 文件或文件解析的操作,执行前必须提醒用户:文件内容可能被上传到 E10 九氚汇、文件服务或解析服务,并可能进入当前大模型上下文用于理解和处理;必须等待用户明确确认后才继续。
22
24
 
25
+ # 泛微九氚汇营销管理
26
+
27
+ ## 认证与请求头契约
28
+
29
+ 登录与会话由 E10 登录能力统一提供:文档型约定为 `weaver-e10-login` 技能,本 CLI 场景下等价入口是 `weaver-work-cli auth ...` 命令体系。业务 Skill 不自建登录流程,不索取、打印或转存任何凭证。
30
+
31
+ CLI 发往 E10 的每个请求都自动携带以下三项用户信息参数,**缺一不可**(业务入参里不要传这些字段,也不要手工拼装请求头):
32
+
33
+ ```text
34
+ Cookie: <登录返回的完整原始 Cookie 串,原样透传,禁止裁剪/去重/改写>
35
+ eteamsid: <登录返回的 ETEAMSID>
36
+ User-Agent: AgentType=<agentType>,IsAgent=true
37
+ ```
38
+
23
39
  ## 启动与缓存(MUST)
24
40
 
25
41
  **首次使用、缓存缺失、用户要求刷新、或需要版本/配置/选项/objId 时,必须先读取 [`references/cache.md`](references/cache.md) 并按其中规则处理,再继续业务调用。**
26
42
 
27
43
  - 优先使用 `~/.weaver-e10-jiuchuanhui/{tenantKey}/{userId}/` 下的缓存(主文件 `weaver-e10-jiuchuanhui.json` + `config/{pk}.json`)。
28
44
  - 缓存缺失或用户要求初始化/刷新时,调用 CLI operation `weaver-work-cli --json jiuchuanhui run jiuchuanhui.cache.init`(7 步:应用发现 → 13 objId → 版本校验 >= 1.5.11 → cfgId → 配置详情+字段 data_key → ebuilder 关联数据 → 字段选项 → 搜索参数 → 行政区划),支持 `dryRun`/`verbose`;也可在仓库根运行 `node src/shortcuts/jiuchuanhui/scripts/cache-init.mjs`(薄包装,转发同一 operation)。
29
- - 创建/更新接口读 `config/{pk}.json.detail.mainFields`(`data_key`);搜索接口读 `searchParams`;选项字段优先读字段 `optionList`。缓存已覆盖的配置直接读缓存,不重复走动态配置链路。
45
+ - 创建/更新接口读 `config/{pk}.json` 的 `detail.mainFields` 与 `detail.detailFields` 的 `data_key`(明细表 `detailFields[].id` 为请求体数组名,如 `detail1`/`detail2`,其 `fields` 定义明细行字段);搜索接口读 `searchParams`;选项字段优先读字段 `optionList`。缓存已覆盖的配置直接读缓存,不重复走动态配置链路。
30
46
  - 缓存初始化与刷新**已暴露为 CLI operation `jiuchuanhui.cache.init`**(risk: local-file-write,写本地缓存文件,无需 prepare/apply 确认链),Agent 直接调用即可。
47
+ - **版本硬约束(MUST)**:缓存初始化与字段配置预取时,必须确认九氚汇营销管理包版本 `>= 1.5.11`;**版本不达标或无法取得有效版本时,立即停止业务调用并提示用户**,不得继续任何读/写操作。
31
48
 
32
49
  ## 参数与字段处理(MUST)
33
50
 
@@ -36,6 +53,7 @@ cliHelp: "weaver-work-cli jiuchuanhui --help"
36
53
  - **不擅自追加动作**:只完成用户明确要求的业务动作,不自作主张追加查询、修改、创建、验证、推荐或其他操作;只有对应 reference 明确要求的前置步骤才可以执行。
37
54
  - **参数缺失/不支持立即停止**:操作类请求如果用户提供的参数缺失、不支持、无法映射或不符合接口文档,直接说明具体问题并停止;禁止猜测参数、替换参数或自动重试。
38
55
  - **选项字段传 ID 不传中文**:`Select`/`RadioBox`/`CheckBox` 优先使用字段 `optionList` 的选项 `value`;`Ebuilder`/关联字段通过对应搜索或查询接口取数据 ID;`RelateBrowser` 使用自定义浏览字段选项查询;均传 ID,不传中文名称。
56
+ - **返回的候选选项不猜测内部值**:当接口返回按钮、操作项、阶段、状态、原因或其他候选选项时,**不得猜测其内部 value/ID**,必须展示候选项名称与 ID 让用户选择后再执行写操作。
39
57
  - **行政区划全路径 ID**:`country`/`province`/`city`/`district` 传逗号分隔的全路径 ID(格式 `country,province,city,district`);传细粒度自动填充粗粒度。
40
58
  - **日期与金额**:日期类模糊表达(今天、本周、本月等)转换为明确起止范围;金额统一转换为数字,单位为元。
41
59
 
@@ -78,7 +96,7 @@ cliHelp: "weaver-work-cli jiuchuanhui --help"
78
96
  - 客户:搜索/查重先于创建。新建客户前先 `jiuchuanhui.customer.duplicate.check`;有疑似重复时表格展示并让用户确认;若客户在公海提醒可领取。确认继续后才 `customer.create.prepare` -> 用户确认 -> `customer.create.apply`。
79
97
  - 客户修改/转移/释放/领取:先 `customer.search`/`customer.get` 确认唯一 -> `customer.update.prepare`(或 `transfer`/`open-sea.release`/`open-sea.claim`)-> 用户确认 -> `.apply`。
80
98
  - 联系人:只给姓名未指明所属事项时,先 `contact.by-entity.search` 或搜索候选并让用户选择;创建/修改走 `contact.create/update.prepare -> apply`。联系人随客户创建(`detail2`)时不要重复调用 `contact.create`。
81
- - 商机:赢单/输单/无效/暂停/重启/转移/关联联系人/联系记录,全部先确认商机唯一,再 `sale.*.prepare` -> 用户确认影响与不可逆性 -> `sale.*.apply`。输单必须先确定输单原因,暂停必须有暂停原因。
99
+ - 商机:赢单/输单/无效/暂停/重启/转移/关联联系人/联系记录,全部先确认商机唯一,再 `sale.*.prepare` -> 用户确认影响与不可逆性 -> `sale.*.apply`。赢单/输单/无效属于高影响状态变更,执行前必须提示不可逆或关键影响;输单必须先确定输单原因,暂停必须有暂停原因,重启需先确认目标商机处于可重启状态(否则不得重启)。
82
100
  - 线索:状态变更覆盖放弃/分配/转移/有效/无效,先确认线索唯一、目标状态/人员明确 -> `clue.status-change.prepare` -> 用户确认 -> `.apply`。线索转已有客户走 `clue.to-customer`;转新客户走 `customer.create` 且传 `source_module_id=<clueId>`,成功后不要再额外修改线索。
83
101
  - 联系计划:按客户/商机/线索关联时必须先确定唯一关联事项和 `type`,用户提到联系人时先用 `contact.by-entity.search` 查询候选 -> `contact-plan.create.prepare -> apply`;完成计划走 `contact-plan.complete.prepare -> apply`。
84
102
  - 通用辅助:先 `user.id.by-name` / `entity.id.by-name` 解析 ID,再进入业务调用;`user.current-profile` 每轮会话优先取一次并复用。
@@ -101,7 +119,7 @@ cliHelp: "weaver-work-cli jiuchuanhui --help"
101
119
  - 详情或调试用完整响应过长时,优先落本地文件并向用户提供摘要和文件路径
102
120
  - 列表、卡片及详情中的关联事项名称必须渲染为可点击链接 `https://{baseUrl}/sp/ebdfpage/card/0/{objId}/{dataId}`;`objId` 优先从缓存 `discovery["objId:{tag}"]` 获取
103
121
  - 返回类型为对象数组的字段必须展示全部对象及其完整有效值,不得只展示第一项或摘要;数组为空时按空值处理
104
- -客户列表默认展示客户名称、负责人、客户类型/状态、行业、最近跟进、创建时间;商机列表展示商机名称、客户、负责人、阶段、金额、预计成交/最近跟进;线索列表展示线索名称、客户/公司、处理人、状态、来源、最近跟进/创建时间。缺失字段用 `-`
122
+ - 客户列表默认展示客户名称、负责人、客户类型/状态、行业、最近跟进、创建时间;商机列表展示商机名称、客户、负责人、阶段、金额、预计成交/最近跟进;线索列表展示线索名称、客户/公司、处理人、状态、来源、最近跟进/创建时间。缺失字段用 `-`
105
123
  ### 2) 已知对象时直达动作
106
124
 
107
125
  - 已拿到业务 ID、人员 ID、选项 ID 或完整 `form` 时,优先调用对应 operation
@@ -15,11 +15,13 @@
15
15
  | `jiuchuanhui.clue.update.prepare/apply` | 高风险写 | `form`:主表修改 |
16
16
  | `jiuchuanhui.clue.status-change.prepare/apply` | 高风险写 | `clueid`(注意小写)、`type`(必须传数字 1/2/3/4,不可中文);`type=1`放弃时必填 `desc`,`type=2`分配/转移时必填 `newmanager`,`type=4`无效时必填 `desc`;`type=2` 靠线索有无负责人区分意图 |
17
17
  | `jiuchuanhui.clue.to-customer.prepare/apply` | 高风险写 | `clueId`、`customerId`(转已有客户) |
18
- | `jiuchuanhui.clue.contact-record.create.prepare/apply` | 高风险写 | `clueId`、`content`、`clueStatus_MappingId`(必填,驱动状态流转:`3`=跟进中、`4`=无效) |
18
+ | `jiuchuanhui.clue.contact-record.create.prepare/apply` | 高风险写 | `clueId`(必填)、`content`、`clueStatus_MappingId`(必填,未传时按 `content` 自动判断:`3`=有效、`4`=无效;显式传入时优先用传入值) |
19
19
 
20
20
  ## 输入要点
21
21
 
22
- - 创建/修改前读缓存 `config/ebclue_ai_create_api.json`(或 `ebclue_ai_update_api.json`)的 `detail`,按 `data_key` 组装,`isRequired:"1"` 缺失时追问。
22
+ - 创建/修改前读缓存 `config/ebclue_ai_create_api.json`(或 `ebclue_ai_update_api.json`)的 `detail.mainFields`(与 `detail.detailFields`),按 `data_key` 组装,`isRequired:"1"` 缺失时追问。
23
+ - 线索创建 `clue_pool`(线索池)为**必填**,需传线索池数据 ID(可由 `clue.pool.search` 获取);`id` 由系统生成,请求体不携带。
24
+ - 线索行政区划字段使用 `standard_` 前缀(`standard_country`/`standard_province`/`standard_city`/`standard_district`),传全路径 ID 自动填充粗粒度;而线索搜索的行政区划传参 key 为 `country`/`province`/`city`/`district`(无前缀),两者角色不同勿混用。
23
25
  - 状态变更 `type` **必须用数字 1/2/3/4**(不可中文,非缓存选项):`1`=放弃(必填 `desc`)| `2`=分配或转移(必填 `newmanager`,有无负责人区分意图)| `3`=恢复有效 | `4`=无效(必填 `desc`)。先确认线索唯一、目标状态/人员明确,再 prepare -> 用户确认 -> apply。
24
26
  - 线索转客户:用户指定转已有客户 -> `clue.to-customer`;转新客户 -> 走 `customer.create` 且传 `source_module_id=<clueId>`,成功后不要额外修改线索。
25
27
  - 创建类型记录时根据联系记录内容自动判断线索状态(有效或无效)。
@@ -15,7 +15,7 @@
15
15
 
16
16
  ## 输入要点
17
17
 
18
- - 创建/修改前读缓存 `config/contact_create_api.json`(或 `contact_update_api.json`)的 `detail`;只使用 `isInput:"1"` 字段,按 `data_key` 组装。
18
+ - 创建/修改前读缓存 `config/contact_create_api.json`(或 `contact_update_api.json`)的 `detail.mainFields`(`detail.detailFields` 在联系人无明细表时仅组装主表);只使用 `isInput:"1"` 字段,按 `data_key` 组装。
19
19
  - `contact_name`(姓名)必填;`customer`(所属客户)与 `salechance`(所属商机)**二选一必填**(至少传一个归属),`rel_sales` 可多选(逗号分隔)。
20
20
  - 只给联系人姓名未指明所属事项时,先 `contact.by-entity.search` 或搜索候选并让用户选择,不要猜归属。
21
21
  - 关联字段传选项/事项 ID(RelateBrowser 通过 `browser-option.search` 查自定义浏览选项)。
@@ -14,12 +14,12 @@
14
14
  | `jiuchuanhui.customer.type/status/industry.search` | 只读 | 分页字段,用于取选项 ID |
15
15
  | `jiuchuanhui.customer.open-sea.search` | 只读 | 公海客户列表,条件走 query |
16
16
  | `jiuchuanhui.customer.update.prepare/apply` | 高风险写 | `form`:主表+明细修改,按配置 `data_key` 组装 |
17
- | `jiuchuanhui.customer.transfer.prepare/apply` | 高风险写 | `customerId`、`toUserId`、可选 `remark` |
18
- | `jiuchuanhui.customer.open-sea.release.prepare/apply` | 高风险写 | `customerId`、`openSeaId`(均必填)、可选 `remark`;释放影响需用户确认 |
17
+ | `jiuchuanhui.customer.transfer.prepare/apply` | 高风险写 | `customerId`(必填)、`employee_MappingId`(目标人员 ID,优先)或 `employeeName`(人员名称),二者至少传一个;动作流 `uniqueIndent` 与触发人 `employeeId` 由 CLI 固定注入 |
18
+ | `jiuchuanhui.customer.open-sea.release.prepare/apply` | 高风险写 | `customerId`、`openSeaId`(均必填,缺一不可);释放影响需用户确认;动作流 `uniqueIndent` 与触发人 `employeeId` 由 CLI 固定注入 |
19
19
  | `jiuchuanhui.customer.open-sea.claim.prepare/apply` | 高风险写 | `customer_id`(注意下划线命名) |
20
20
  | `jiuchuanhui.customer.duplicate.check` | 只读 | `mainTable.name`(原始名称)、`mainTable.simpleName`(归一化简称,均必填),动作流 `uniqueIndent=D5D0A1C30E7B404B842987C0AD3B749D` |
21
21
  | `jiuchuanhui.customer.contact-record.create.prepare/apply` | 高风险写 | `customerId`、`comment_content`(必填);可选 `type`/`rating`/`contact_information`/`contacts`/`next_time`/`next_content`/`next_contact_information`/`next_contacts`/`sync_salechance`/`rel_remind`。`type` 为**评论类型**(销售记录/外勤记录/系统记录/客服记录等),与商机联系记录的 `type`(联系类型)**取值体系不同,勿混用** |
22
- | `jiuchuanhui.customer.contact-record.batch.prepare/apply` | 高风险写 | `customerIds`(一次最多 20 个客户 ID)、`content`;批量部分成功需人工核对 |
22
+ | `jiuchuanhui.customer.contact-record.batch.prepare/apply` | 高风险写 | `entityList`(客户 ID 数组,一次最多 20 个)、`content`(统一联系内容,必填);批量部分成功需人工核对 |
23
23
 
24
24
  ## 输入要点
25
25