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
@@ -0,0 +1,86 @@
1
+ # 已发布自定义接口(按 interfacePk)
2
+
3
+ ## 何时使用
4
+
5
+ 用户明确指向「已发布的自定义接口」,并能提供 `interfacePk` 时使用。走 `getFormDataByPk` / `getFormDataList` / `getFormDataCount` / `saveFormData` / `updateFormData` / `deleteFormData` 一族。
6
+
7
+ **与 OpenAPI 的区分**:有 `objId` 走 OpenAPI(见 [`openapi-read.md`](openapi-read.md));有 `interfacePk` 且用户明确是已发布自定义接口时走本族。两者同时出现且用户没指定时,先向用户消歧,不要两边试跑。
8
+
9
+ ## 请求头契约(CLI 注入,Agent 不手写)
10
+
11
+ ```text
12
+ Cookie: <e10-login 返回的完整原始 Cookie 串>(禁止裁剪/去重/改写)
13
+ eteamsid: <e10-login 返回的 ETEAMSID>
14
+ User-Agent: AgentType=<agentType>,IsAgent=true
15
+ ```
16
+
17
+ ## operation
18
+
19
+ | operation | risk | 必填 | 用途 |
20
+ | --- | --- | --- | --- |
21
+ | `ebuilder-form.custom.detail` | read | `interfacePk` + `dataId` | 按主键查详情 |
22
+ | `ebuilder-form.custom.query` | read | `interfacePk` | 分页查询 |
23
+ | `ebuilder-form.custom.count` | read | `interfacePk` | 查询总数 |
24
+ | `ebuilder-form.custom.add.prepare` | read-before-write | `interfacePk` + `datas` | 准备新增,签发 continuation |
25
+ | `ebuilder-form.custom.add.apply` | high-risk-write | `confirm` + `continuation` | 确认后执行新增 |
26
+ | `ebuilder-form.custom.update.prepare` | read-before-write | `interfacePk` + `datas` | 准备修改,签发 continuation |
27
+ | `ebuilder-form.custom.update.apply` | high-risk-write | `confirm` + `continuation` | 确认后执行修改 |
28
+ | `ebuilder-form.custom.delete.prepare` | read-before-write | `interfacePk` + `dataIds` | 准备删除(批量,字符串数组),签发 continuation |
29
+ | `ebuilder-form.custom.delete.apply` | high-risk-write | `confirm` + `continuation` | 确认后执行删除 |
30
+
31
+ ### 参数说明
32
+
33
+ | 字段 | 说明 |
34
+ | --- | --- |
35
+ | `interfacePk` | 已发布自定义接口主键(必填);由用户提供或从接口清单取得,**不要猜测** |
36
+ | `dataId` / `dataIds` | 单条详情主键 / 批量删除主键数组 |
37
+ | `datas` | 新增、修改的数据数组 |
38
+ | `mainTable` | 查询条件对象 |
39
+ | `pageNo` / `pageSize` | 分页 |
40
+ | `operationinfo` | 操作备注(可选) |
41
+
42
+ 写操作同样遵循 prepare → 用户确认 → apply 两段式,continuation 有效期 10 分钟,规则与 [`openapi-write.md`](openapi-write.md) 一致。
43
+
44
+ ## 处理链
45
+
46
+ 1. 确认 `interfacePk`;拿不到就向用户索取,不要从接口名猜。
47
+ 2. 需要字段与选项时先 `fields.get` / `options.get`(见 [`fields-browser.md`](fields-browser.md))。
48
+ 3. 读操作直接执行;写操作走 prepare → 确认 → apply。
49
+ 4. 摘要输出,不粘贴超长 JSON。
50
+
51
+ ## 命令
52
+
53
+ Windows PowerShell:
54
+
55
+ ```powershell
56
+ weaver-work-cli --json ebuilder-form run ebuilder-form.custom.count --input-json '{"interfacePk":"INTERFACE_PK","mainTable":{}}'
57
+ weaver-work-cli --json ebuilder-form run ebuilder-form.custom.query --input-json '{"interfacePk":"INTERFACE_PK","mainTable":{},"pageNo":1,"pageSize":20}'
58
+ weaver-work-cli --json ebuilder-form run ebuilder-form.custom.add.prepare --input-json '{"interfacePk":"INTERFACE_PK","datas":[{"name":"示例客户"}]}'
59
+ weaver-work-cli --json ebuilder-form run ebuilder-form.custom.add.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
60
+ ```
61
+
62
+ macOS/Linux(bash/zsh):
63
+
64
+ ```bash
65
+ weaver-work-cli --json ebuilder-form run ebuilder-form.custom.query --input-json '{"interfacePk":"INTERFACE_PK","mainTable":{},"pageNo":1,"pageSize":20}'
66
+ ```
67
+
68
+ ## 失败处理
69
+
70
+ | subtype | 含义 | 处置 |
71
+ | --- | --- | --- |
72
+ | `interface_pk_required` | 缺少 `interfacePk` | 向用户索取,不要猜 |
73
+ | `confirmation` / `required` / `confirm_required` | 未显式确认 | 先向用户确认,再传 `confirm: true` |
74
+ | `continuation_invalid` / `continuation_expired` / `continuation_mismatch` | continuation 失效 | 重新 prepare |
75
+ | `continuation_actor_changed` | 登录身份变化 | 重新 prepare 并重新取得确认 |
76
+ | `field_required` / `field_invalid` / `field_forbidden` | 字段问题 | 以 `fields.get` 为准修正,不绕过 |
77
+ | `business_error` / `http_error` | 服务端或 HTTP 失败 | 保留业务消息,停止后续写入 |
78
+ | `write_uncertain` | 结果未知 | 立即停止,禁止自动重放;先只读核验 |
79
+ | `session_expired` | 登录态失效 | 恢复会话后重新 prepare |
80
+
81
+ ## 红线
82
+
83
+ - 自定义接口的字段契约由发布方定义,缺失字段时向用户索取,禁止编造默认值。
84
+ - 批量删除会一次删除 `dataIds` 全部目标,confirm 前必须把完整清单念给用户确认。
85
+ - 自定义接口的返回字段取决于接口发布时的配置,**不能假设返回完整表单数据**;缺失字段按「接口未返回」处理,不要凭字段定义猜测。
86
+ - `write_uncertain` 不重试。
@@ -0,0 +1,50 @@
1
+ # 能力边界与暂不可用项
2
+
3
+ ## 何时使用
4
+
5
+ 用户要求的能力不在 `ebuilder-form schema` 中,或命令返回 `operation_unknown` / `path_forbidden` 时读取本文件,用于**如实告知边界并给出替代路径**,而不是换接口硬试。
6
+
7
+ ## 当前不在 CLI 能力范围内
8
+
9
+ | 能力 | 状态 | 替代路径 |
10
+ | --- | --- | --- |
11
+ | 新建/发布 eBuilder 应用、表单与自定义接口 | 未纳入 CLI | 在 E10 建模中心完成,CLI 只消费已发布产物 |
12
+ | 修改 List/NList 页面布局、显示列、固定条件 | 未纳入 CLI | 页面配置在 E10 端完成;CLI 的 `list.config` / `nlist.config` 只读 |
13
+ | 表单字段的新增、删除与元数据修改 | 未纳入 CLI | `fields.get` / `options.get` 只读 |
14
+ | 附件上传下载、OCR、图片与本地文件解析 | 未纳入 CLI | 本模块不涉及;其它模块(如 `weaver-e10-yepiaotong`)处理文件类能力 |
15
+ | 表单数据的批量导入/导出 | 未纳入 CLI | 只能逐条走 OpenAPI / 自定义接口写操作 |
16
+ | 审批、流程流转、转办与加签 | 不属于本模块 | 走 `weaver-e10-workflow` |
17
+ | 人员、部门、岗位与组织架构查询 | 不属于本模块 | 走 `weaver-e10-hrm` |
18
+ | 未出现在 `ebuilder-form schema` 中的任何 operation | 一律不可用 | 先跑 `weaver-work-cli ebuilder-form schema` 核对 |
19
+
20
+ ## 硬边界(违反即失败)
21
+
22
+ - 禁止绕过 `weaver-work-cli` 直接 `curl` / `fetch` 访问 E10 接口,禁止直连 `/api/bs/` 路径。
23
+ - 禁止写死默认域名;系统地址由登录态决定。
24
+ - 禁止从 `menuId`、`appId`、`listId`、`objId` 互相猜测。
25
+ - 禁止手工构造 NList 的 `customConfig`(LZW 编码),必须用 `nlist.config` 的返回值。
26
+ - 禁止手工构造或跨操作复用 continuation。
27
+ - 禁止用字段显示名当写入键;`name == id` 的自定义字段必须改用 `config.dataKey`。
28
+ - 查询全部页达到或超过 100 页预算时,请用户增加筛选条件,不得拆成多次单页查询规避。
29
+ - 不得通过 `checkRight=false` 绕过数据创建、修改或删除的权限校验。
30
+ - 写操作返回 `write_uncertain` 时立即停止,禁止自动重放。
31
+
32
+ ## 失败出口
33
+
34
+ | 现象 | 处置 |
35
+ | --- | --- |
36
+ | `operation_unknown` | 该 operation 不在 schema 中,跑 `weaver-work-cli ebuilder-form schema` 核对可用清单 |
37
+ | `path_forbidden` / `origin_invalid` | 触碰了地址或域名红线,停止并说明原因,不要改写路径绕过 |
38
+ | `protocol` | 请求协议不被接受,检查是否为 CLI 未覆盖的地址形态,不要手工改协议 |
39
+ | `session_expired` | 按 shared 规则恢复 E10 会话后从只读步骤重新开始 |
40
+
41
+ ## 自检命令
42
+
43
+ 遇到"不知道能不能做"时,先跑:
44
+
45
+ ```text
46
+ weaver-work-cli ebuilder-form --help
47
+ weaver-work-cli ebuilder-form schema
48
+ ```
49
+
50
+ 以 `schema` 为唯一事实来源:没有出现在 schema 中的能力,不要写成可执行步骤。
@@ -0,0 +1,100 @@
1
+ # 字段、选项与浏览字段解析
2
+
3
+ ## 何时使用
4
+
5
+ 写入前确认真实字段名、取选择类字段的选项、确认主表/明细表标识映射、把人员/部门/流程等名称解析成 ID 时使用。
6
+
7
+ **写入键的取值顺序**:字段定义里的 `text` 是显示名,**不能当写入键**;通常写入键用字段的 `name`;当 `name == id`(自定义字段常见)或目标接口明确要求组件数据键时,改用 `config.dataKey`。写入前一律用 `fields.get` 核对,不要凭用户叫法猜键名。
8
+
9
+ ## 请求头契约(CLI 注入,Agent 不手写)
10
+
11
+ ```text
12
+ Cookie: <e10-login 返回的完整原始 Cookie 串>(禁止裁剪/去重/改写)
13
+ eteamsid: <e10-login 返回的 ETEAMSID>
14
+ User-Agent: AgentType=<agentType>,IsAgent=true
15
+ ```
16
+
17
+ ## operation
18
+
19
+ | operation | risk | 必填 | 用途 |
20
+ | --- | --- | --- | --- |
21
+ | `ebuilder-form.fields.get` | read | 上下文 | 读 eBuilder 字段定义,返回主表与明细表字段、`config.dataKey`、`browserParams` 和组件类型 |
22
+ | `ebuilder-form.options.get` | read | 上下文 + 字段标识 | 按字段元数据 ID 读选择类字段选项 |
23
+ | `ebuilder-form.mapping.get` | read | `objId` | 读 `mainTable` / `detailN` 与主表、明细表标识映射 |
24
+ | `ebuilder-form.browser.resolve` | read | `module` + `browserType` + `query` | 把名称解析为可选项 ID |
25
+
26
+ ### `fields.get` 参数
27
+
28
+ | 字段 | 说明 |
29
+ | --- | --- |
30
+ | `groupId` | eBuilder 应用或分组标识。**优先用菜单/上下文解析返回的 `appId`**;没有可靠值时从当前应用上下文取得,不要猜测 |
31
+ | `sourceId` | 来源对象 ID,通常传 `objId` |
32
+ | `sourceType` | 数据来源类型,表单场景传 `FORM`(默认);布局逻辑字段传 `LOGIC` |
33
+ | `detailFieldsGroup` | 取明细表字段分组 |
34
+ | `enableMerge` | 合并主表与明细表字段 |
35
+ | `customParam` / `params` | 透传参数;一般不要手工构造 |
36
+
37
+ ### `options.get` 参数
38
+
39
+ | 字段 | 说明 |
40
+ | --- | --- |
41
+ | `fieldName` / `fieldId` | **字段元数据 ID**(纯数字),取 `fields.get` 返回的 `fields[].id`,二选一。它不是字段显示文本,也不是字段对象的 `name` |
42
+ | `sourceType` | 数据来源类型,默认 `FORM` |
43
+ | `groupId` | 与 `fields.get` 使用时保持一致 |
44
+ | `optionLevel` | 选项层级,默认 `1`;存在层级选项时按实际层级传入 |
45
+
46
+ 选项返回 `id`(选项 ID)与 `name`(选项名称):**写入用 `id`,展示用 `name`**,层级选项按 `pid` 建立父子关系。
47
+
48
+ ### `browser.resolve` 参数
49
+
50
+ | 字段 | 说明 |
51
+ | --- | --- |
52
+ | `module` | 浏览接口模块,例如 `hrm`、`workflow/core`、`doc`、`task` |
53
+ | `browserType` | 浏览类型,例如 `resource`(人员)、`department`(部门)、`subcompany`(分部)、`wfcRequest`(流程) |
54
+ | `query` | 要解析的业务名称(用户提供名称即可,不要求用户预先知道系统 ID) |
55
+ | `multiple` | 是否允许多选 |
56
+ | `limit` | 返回条数上限 |
57
+ | `extra` | 模块要求的附加参数 |
58
+
59
+ ## 处理链
60
+
61
+ 1. `fields.get` 取真实字段定义,确认写入键(默认 `name`;`name == id` 时用 `config.dataKey`)。
62
+ 2. 选择类字段用 `options.get` 取选项,**传选项 `id`,不传中文名**。
63
+ 3. 需要写明细表时用 `mapping.get` 确认 `detail1` / `detail2` 对应的标识,**按接口返回关系使用,不能按名称或本地顺序自行编号**。
64
+ 4. 人员/部门/流程等关联字段用 `browser.resolve` 把名称解析为 ID;**多命中时必须让用户选**,不得自动取第一条,也不得要求用户先提供 ID。
65
+
66
+ ## 命令
67
+
68
+ Windows PowerShell:
69
+
70
+ ```powershell
71
+ weaver-work-cli --json ebuilder-form run ebuilder-form.fields.get --input-json '{"context":{"objId":"121000000000000001"}}'
72
+ weaver-work-cli --json ebuilder-form run ebuilder-form.options.get --input-json '{"context":{"objId":"121000000000000001"},"fieldName":"customer_type"}'
73
+ weaver-work-cli --json ebuilder-form run ebuilder-form.mapping.get --input-json '{"objId":"121000000000000001"}'
74
+ weaver-work-cli --json ebuilder-form run ebuilder-form.browser.resolve --input-json '{"module":"hrm","browserType":"resource","query":"张三"}'
75
+ ```
76
+
77
+ macOS/Linux(bash/zsh):
78
+
79
+ ```bash
80
+ weaver-work-cli --json ebuilder-form run ebuilder-form.browser.resolve --input-json '{"module":"hrm","browserType":"resource","query":"张三"}'
81
+ ```
82
+
83
+ ## 失败处理
84
+
85
+ | subtype | 含义 | 处置 |
86
+ | --- | --- | --- |
87
+ | `field_required` | 未提供字段标识 | 补 `fieldName` 或 `fieldId` |
88
+ | `field_invalid` | 字段标识非法或不存在 | 以 `fields.get` 返回的字段为准重新取值 |
89
+ | `field_forbidden` | 该字段不允许写入或不允许该操作 | 停止写入并原样转达,不要换字段绕过 |
90
+ | `obj_id_required` | 缺少 `objId` | 回 `context.resolve` 补齐 |
91
+ | `query_required` | `browser.resolve` 缺少 `query` | 补名称关键词 |
92
+ | `unknown_field` | 入参字段不在 schema 中 | 去掉该字段,不要猜参数 |
93
+ | `session_expired` | 登录态失效 | 按 shared 规则恢复 E10 会话后从只读步骤重新开始 |
94
+
95
+ ## 红线
96
+
97
+ - 禁止用字段显示名(`text`)当写入键;默认用 `name`,`name == id` 或接口要求组件键时才用 `config.dataKey`。
98
+ - 选项一律传 `id`,不传中文名称;不要在调用方硬编码生产选项 ID 或名称。
99
+ - 名称解析多命中时必须让用户选,禁止自动取第一条;也不要把「让用户提供 ID」当成解析手段。
100
+ - 字段定义中的 `config.options` 已够用时可直接用,但要完整名称或最新选项时以 `options.get` 结果为准。
@@ -0,0 +1,91 @@
1
+ # List / NList 列表查询
2
+
3
+ ## 何时使用
4
+
5
+ 用户要看某个 eBuilder 页面里的表格数据、分页结果、真实总数,或需要先知道有哪些可搜索字段/固定条件时使用。
6
+
7
+ 先按 [`context-routing.md`](context-routing.md) 拿到 `context`,再按 `context.listKind` 分流:**`List` 走 `list.*`,`NList` 走 `nlist.*`,两套接口不要互相试跑。**
8
+
9
+ ## 请求头契约(CLI 注入,Agent 不手写)
10
+
11
+ ```text
12
+ Cookie: <e10-login 返回的完整原始 Cookie 串>(禁止裁剪/去重/改写)
13
+ eteamsid: <e10-login 返回的 ETEAMSID>
14
+ User-Agent: AgentType=<agentType>,IsAgent=true
15
+ ```
16
+
17
+ ## operation
18
+
19
+ | operation | risk | 用途 |
20
+ | --- | --- | --- |
21
+ | `ebuilder-form.list.config` | read | 读传统表格 List 的基础设置、显示列、排序、搜索、统计和固定条件 |
22
+ | `ebuilder-form.list.query` | read | 按 List 运行时接口查分页数据和真实总数 |
23
+ | `ebuilder-form.nlist.config` | read | 读数据列表 NList 的页面、组件与 `comps[1].config` 运行时配置 |
24
+ | `ebuilder-form.nlist.query` | read | 按 NList eblist 运行时接口查分页数据和真实总数 |
25
+
26
+ 四个 operation 都接受 `context`(推荐)或等价的定位字段(`appId` / `apiPrefix` / `objId` / `listId` / `hostPageId` / `listKind`)。
27
+
28
+ ### `list.query` 查询参数
29
+
30
+ | 字段 | 说明 |
31
+ | --- | --- |
32
+ | `pageNo` / `pageSize` | 分页;默认小页读取,用户没要求全量时不要放大 |
33
+ | `allPages` | 拉全部页;预计达到或超过 100 页时 CLI 会拒绝(见失败处理) |
34
+ | `searchParamData` / `filterCondition` | 搜索与固定条件对象,结构以 `list.config` 返回为准 |
35
+ | `orderParams` | 排序参数数组 |
36
+ | `tableuid` | 每次查询生成的随机值,一般来自 `list.config`,不要手工构造 |
37
+ | `passid` / `cid` | 默认取上下文的 `objId`;只有页面运行上下文明确给出其他值时才显式传 |
38
+
39
+ ### `nlist.query` 查询参数
40
+
41
+ | 字段 | 说明 |
42
+ | --- | --- |
43
+ | `pageNo` / `pageSize` / `allPages` | 同上 |
44
+ | `compId` | 目标组件 ID,来自 `nlist.config` |
45
+ | `tableuid` / `refPluginPackageId` | 运行时透传标识 |
46
+ | `customConfig` | NList 的 LZW 数字串编码配置对象,**必须用 `nlist.config` 的返回值,不要手工拼** |
47
+ | `filter` / `fieldFilter` / `pageFilter` | 过滤条件,结构以 `nlist.config` 为准 |
48
+
49
+ ## 处理链
50
+
51
+ 1. `context.resolve` 拿 `context` 与 `listKind`。NList 的 `listId` 以配置 `comps[1].config.ebListId` 为准、`objId` 以该配置的 `objId` 为准;菜单 `pageId` 只用于取页面信息,不要拿它和 `ebListId` 反复匹配;`comps[1]`、`config`、`ebListId` 或 `objId` 缺失时停止并报告结构问题,不要扫描其他组件回退。
52
+ 2. 需要知道可搜索字段或固定条件时,先跑对应的 `config`(`list.config` / `nlist.config`)。
53
+ 3. 组装查询条件跑 `query`。
54
+ 4. 结果摘要给用户:条数、总数、是否还有更多。**不要原样粘贴超长 JSON。**
55
+
56
+ ## 命令
57
+
58
+ Windows PowerShell:
59
+
60
+ ```powershell
61
+ weaver-work-cli --json ebuilder-form run ebuilder-form.list.config --input-json '{"context":{"objId":"121000000000000001","listId":"1001","listKind":"List"}}'
62
+ weaver-work-cli --json ebuilder-form run ebuilder-form.list.query --input-json '{"context":{"objId":"121000000000000001","listId":"1001","listKind":"List"},"pageNo":1,"pageSize":20}'
63
+ ```
64
+
65
+ macOS/Linux(bash/zsh):
66
+
67
+ ```bash
68
+ weaver-work-cli --json ebuilder-form run ebuilder-form.nlist.query --input-json '{"context":{"objId":"121000000000000001","listKind":"NList"},"pageNo":1,"pageSize":20}'
69
+ ```
70
+
71
+ ## 失败处理
72
+
73
+ | subtype | 含义 | 处置 |
74
+ | --- | --- | --- |
75
+ | `list_context_invalid` | 上下文缺少 List 所需字段 | 重跑 `context.resolve`,不要手工补 `listId` |
76
+ | `nlist_context_invalid` | 上下文缺少 NList 所需字段 | 同上 |
77
+ | `list_kind_invalid` | `listKind` 不是 `List` / `NList` | 以 `context.resolve` 返回值为准 |
78
+ | `list_id_required` / `host_page_id_required` | 缺少列表/页面标识 | 回 `context.resolve` 补齐 |
79
+ | `nlist_config_missing` / `nlist_component_missing` | 拿不到 NList 组件配置 | 先跑 `nlist.config`;仍缺失说明该页面不是 NList,改用 `list.*` |
80
+ | `nlist_config_invalid` / `custom_config_invalid` | `customConfig` 非法 | 用 `nlist.config` 返回值原样回传,不要手工改写 |
81
+ | `page_size_too_large` | 单页条数超限 | 调小 `pageSize` 分页读取,不要一次拉全量 |
82
+ | `page_type_invalid` / `page_response_invalid` | 分页响应异常 | 停止并原样反馈,不要换页重试 |
83
+ | `too_many_pages` | 查询全部页达到或超过 100 页预算 | 请用户增加筛选条件;**不得**拆成多次单页查询规避预算 |
84
+ | `count_invalid` | 总数不可用 | 如实说明总数未知,不要拿行数冒充总数 |
85
+ | `session_expired` | 登录态失效 | 按 shared 规则恢复 E10 会话后从只读步骤重新开始 |
86
+
87
+ ## 红线
88
+
89
+ - 单页大小受 CLI 限制,超限时按错误提示调小,不要绕过。
90
+ - `customConfig` 是 CLI 内部编码,禁止自行构造或改写。
91
+ - 明细展开会产生重复行,统计条数时以 `query` 返回的真实总数为准,不要自行去重。
@@ -0,0 +1,74 @@
1
+ # OpenAPI 只读查询(按 objId)
2
+
3
+ ## 何时使用
4
+
5
+ 已知表单对象 `objId`,要查单条详情、按条件分页查表单数据或查总数时使用。走 E10 表单 OpenAPI(`getDataById` / `getAllData` / `getAllDataCount`)。
6
+
7
+ 若目标不是 OpenAPI 而是已发布的自定义接口(有 `interfacePk`),改走 [`custom-api.md`](custom-api.md)。两者同时出现且用户没指定时,先向用户消歧。
8
+
9
+ ## 请求头契约(CLI 注入,Agent 不手写)
10
+
11
+ ```text
12
+ Cookie: <e10-login 返回的完整原始 Cookie 串>(禁止裁剪/去重/改写)
13
+ eteamsid: <e10-login 返回的 ETEAMSID>
14
+ User-Agent: AgentType=<agentType>,IsAgent=true
15
+ ```
16
+
17
+ ## operation
18
+
19
+ | operation | risk | 必填 | 用途 |
20
+ | --- | --- | --- | --- |
21
+ | `ebuilder-form.openapi.detail` | read | `objId` + `dataId` | 按数据 ID 取单条详情 |
22
+ | `ebuilder-form.openapi.query` | read | `objId` | 表单级分页查询 |
23
+ | `ebuilder-form.openapi.count` | read | `objId` | 表单级总数查询 |
24
+
25
+ ### 公共参数
26
+
27
+ | 字段 | 说明 |
28
+ | --- | --- |
29
+ | `objId` | 表单对象 ID(必填),来自 `context.resolve` |
30
+ | `mainTable` | 主表查询条件对象;字段名以 [`fields-browser.md`](fields-browser.md) 取到的写入键为准 |
31
+ | `pageNo` / `pageSize` | 分页(`query` 专用);默认小页读取 |
32
+ | `isReturnDetail` | 是否返回明细表数据 |
33
+ | `fieldNoFindIgnore` | 字段不存在时忽略而非报错;**不要为了绕过报错而默认打开** |
34
+
35
+ ## 处理链
36
+
37
+ 1. `context.resolve` 拿 `objId`(必要时先 `menu.search`)。
38
+ 2. 需要条件字段时先 `fields.get` 确认写入键。
39
+ 3. `openapi.count` 确认量级 → `openapi.query` 小页读取 → 需要单条完整数据时 `openapi.detail`。
40
+ 4. 摘要给用户:命中数、已读页数、是否还有更多。**不要原样粘贴超长 JSON。**
41
+
42
+ ## 命令
43
+
44
+ Windows PowerShell:
45
+
46
+ ```powershell
47
+ weaver-work-cli --json ebuilder-form run ebuilder-form.openapi.count --input-json '{"objId":"121000000000000001","mainTable":{}}'
48
+ weaver-work-cli --json ebuilder-form run ebuilder-form.openapi.query --input-json '{"objId":"121000000000000001","mainTable":{},"pageNo":1,"pageSize":20}'
49
+ weaver-work-cli --json ebuilder-form run ebuilder-form.openapi.detail --input-json '{"objId":"121000000000000001","dataId":"1234567890123456789"}'
50
+ ```
51
+
52
+ macOS/Linux(bash/zsh):
53
+
54
+ ```bash
55
+ weaver-work-cli --json ebuilder-form run ebuilder-form.openapi.query --input-json '{"objId":"121000000000000001","mainTable":{},"pageNo":1,"pageSize":20}'
56
+ ```
57
+
58
+ ## 失败处理
59
+
60
+ | subtype | 含义 | 处置 |
61
+ | --- | --- | --- |
62
+ | `obj_id_required` | 缺少 `objId` | 回 `context.resolve` 补齐,不要从其它 ID 猜 |
63
+ | `field_required` | 缺少必要字段 | 补字段后重试 |
64
+ | `field_invalid` | 字段名不被接口接受 | 用 `fields.get` 的 `config.dataKey` 重新取值 |
65
+ | `http_error` | HTTP 层失败 | 保留业务消息,停止后续步骤,不重试 |
66
+ | `business_error` | 服务端业务失败 | 原样转达业务消息,不要改写或美化 |
67
+ | `response_invalid` | 响应结构异常 | 停止并原样反馈,不要换接口重试 |
68
+ | `session_expired` | 登录态失效 | 按 shared 规则恢复 E10 会话后从只读步骤重新开始 |
69
+
70
+ ## 红线
71
+
72
+ - 长整型 `objId` / `dataId` 一律按字符串传递,避免精度丢失。
73
+ - 不要把 `fieldNoFindIgnore` 当成绕过字段校验的开关。
74
+ - 查询结果只是"当前页",汇报总数时必须用 `count` 的返回值。
@@ -0,0 +1,86 @@
1
+ # OpenAPI 写入(新增 / 修改 / 删除)
2
+
3
+ ## 何时使用
4
+
5
+ 按 `objId` 对 eBuilder 表单做新增、修改、删除时使用。**全部为高风险写操作,必须走 prepare → 用户确认 → apply 两段式。**
6
+
7
+ 写入前必须先用 [`fields-browser.md`](fields-browser.md) 确认真实字段名与选项值。
8
+
9
+ ## 请求头契约(CLI 注入,Agent 不手写)
10
+
11
+ ```text
12
+ Cookie: <e10-login 返回的完整原始 Cookie 串>(禁止裁剪/去重/改写)
13
+ eteamsid: <e10-login 返回的 ETEAMSID>
14
+ User-Agent: AgentType=<agentType>,IsAgent=true
15
+ ```
16
+
17
+ ## operation
18
+
19
+ | operation | risk | 必填 | 用途 |
20
+ | --- | --- | --- | --- |
21
+ | `ebuilder-form.openapi.add.prepare` | read-before-write | `objId` + `datas` | 准备新增,签发 continuation,**不写入** |
22
+ | `ebuilder-form.openapi.add.apply` | high-risk-write | `confirm` + `continuation` | 确认后执行新增 |
23
+ | `ebuilder-form.openapi.update.prepare` | read-before-write | `objId` + `datas` | 准备修改,签发 continuation |
24
+ | `ebuilder-form.openapi.update.apply` | high-risk-write | `confirm` + `continuation` | 确认后执行修改 |
25
+ | `ebuilder-form.openapi.delete.prepare` | read-before-write | `objId` + 删除条件 | 准备删除,签发 continuation |
26
+ | `ebuilder-form.openapi.delete.apply` | high-risk-write | `confirm` + `continuation` | 确认后执行删除 |
27
+
28
+ ### prepare 参数
29
+
30
+ | 字段 | 说明 |
31
+ | --- | --- |
32
+ | `objId` | 表单对象 ID(必填) |
33
+ | `datas` | 数据数组(新增/修改必填);每项为主表字段对象,明细表按 `mapping.get` 得到的 `detail1` / `detail2` 键组织 |
34
+ | `dataId` | 删除时的数据 ID;与 `mainTable` 二选一 |
35
+ | `mainTable` | 删除条件对象,按数据 ID 删除时传 `{"id":"..."}` |
36
+ | `operationinfo` | 操作备注信息(可选) |
37
+
38
+ ### apply 参数
39
+
40
+ `confirm` 必须显式为 `true`;`continuation` 必须原样回传 prepare 的返回值。continuation 有效期 **10 分钟**,绑定 operation 与提交内容。
41
+
42
+ ## 处理链(缺一步即失败)
43
+
44
+ 1. `context.resolve` 确认 `objId`。
45
+ 2. `fields.get` / `options.get` 确认写入键与选项值;关联字段用 `browser.resolve` 解析 ID。
46
+ 3. `*.prepare` → 拿 `requestPreview` 与 `continuation`;**此时未写入任何数据**。
47
+ 4. 向用户摘要:目标表单、动作、字段与值、影响条数、不可逆性,取得**明确确认**。
48
+ 5. `*.apply` 传 `confirm: true` 与 `continuation`。
49
+ 6. 需要时用 `openapi.detail` 只读回查确认结果。
50
+
51
+ ## 命令
52
+
53
+ Windows PowerShell:
54
+
55
+ ```powershell
56
+ weaver-work-cli --json ebuilder-form run ebuilder-form.openapi.add.prepare --input-json '{"objId":"121000000000000001","datas":[{"name":"示例客户"}]}'
57
+ weaver-work-cli --json ebuilder-form run ebuilder-form.openapi.add.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
58
+ ```
59
+
60
+ macOS/Linux(bash/zsh):
61
+
62
+ ```bash
63
+ weaver-work-cli --json ebuilder-form run ebuilder-form.openapi.delete.prepare --input-json '{"objId":"121000000000000001","dataId":"1234567890123456789"}'
64
+ weaver-work-cli --json ebuilder-form run ebuilder-form.openapi.delete.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
65
+ ```
66
+
67
+ ## 失败处理
68
+
69
+ | subtype | 含义 | 处置 |
70
+ | --- | --- | --- |
71
+ | `confirmation` / `required` / `confirm_required` | 未显式确认 | 先向用户确认,再传 `confirm: true` |
72
+ | `continuation_invalid` / `continuation_expired` / `continuation_mismatch` | continuation 无效、过期或不属于当前 operation | 重新执行 prepare,**不要复用旧 continuation** |
73
+ | `continuation_actor_changed` | 当前 E10 登录身份与 prepare 时不一致 | 重新 prepare 并重新取得用户确认 |
74
+ | `delete_target_required` | 删除未指定目标 | 补 `dataId` 或 `mainTable` |
75
+ | `field_required` / `field_invalid` / `field_forbidden` | 字段缺失 / 非法 / 禁止写入 | 以 `fields.get` 为准修正;禁止换字段绕过 |
76
+ | `business_error` / `http_error` | 服务端业务或 HTTP 失败 | 保留业务消息,停止后续写入 |
77
+ | `write_uncertain` | 写请求结果未知 | **立即停止,禁止自动重放**;先做只读核验再向用户汇报 |
78
+ | `session_expired` | 登录态失效 | 按 shared 规则恢复 E10 会话后**重新 prepare**(旧 continuation 作废) |
79
+
80
+ ## 红线
81
+
82
+ - 禁止跳过 prepare 直接 apply,禁止手工构造或跨操作复用 continuation。
83
+ - `write_uncertain` 不重试:重复提交会造成重复新增或覆盖用户刚改的数据。
84
+ - 删除不可逆:目标不明确时先询问;即使用户已明确目标也必须走 continuation 校验。
85
+ - 不得通过 `checkRight=false` 绕过权限校验。
86
+ - 写接口返回业务 `status=false` 时,真实失败原因在 `data.datajson.message`,不要被外层 `message.msg=success` 覆盖;向用户转述前先读这一层。
@@ -0,0 +1,107 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "generatedFrom": {
4
+ "path": "weaver-e10-ebuilder-form",
5
+ "skill": "weaver-e10-ebuilder-form",
6
+ "command": "ebuilder-form"
7
+ },
8
+ "sources": [
9
+ { "path": "SKILL.md", "sha256": "999172568786502cdd835a46a7f8905f11e12ab22f30c2b20c0fec7dfec1d5c9", "role": "existing-skill" },
10
+ { "path": "agents/openai.yaml", "sha256": "c64518022c780d6dc2ed615a03fe3ecade3fecfbc6132bd46061021a45437f58", "role": "requirement" },
11
+ { "path": "references/browser-fields.md", "sha256": "096002525c7719a5143e48b75e27cc51763ef013553998620ee8be0475d3b24e", "role": "api-doc" },
12
+ { "path": "references/catalog.md", "sha256": "bde8c90c4aa712b098716baa1010e9dbe6c7db69b5e6ed8dbd9de8e021b03499", "role": "api-doc" },
13
+ { "path": "references/cli.md", "sha256": "bd7c648a266b2378aecabf0923d47a21fd87c9f1d184ef4041416e95aa39e75f", "role": "api-doc" },
14
+ { "path": "references/deployment-routing.md", "sha256": "73b874f87c6de19027e812ffb5b3dddf9ed963ad75ddd675c0ec0d2d81a89197", "role": "api-doc" },
15
+ { "path": "references/ebuilder-customapi-formdata-add.md", "sha256": "dea6f1bddc7f544ad605a7aa0825f76882bf675f87228008fc4909b3b10c3390", "role": "api-doc" },
16
+ { "path": "references/ebuilder-customapi-formdata-count.md", "sha256": "097976303c0a97ce683d683d41b9bd7f33ae54e077d3a51b165778d889930a41", "role": "api-doc" },
17
+ { "path": "references/ebuilder-customapi-formdata-delete.md", "sha256": "a0a43bf2b8032dadb7c7db2abe82e092ecea2530989ca5591c9f9145908007f5", "role": "api-doc" },
18
+ { "path": "references/ebuilder-customapi-formdata-querybypk.md", "sha256": "1db36f3215908c48637814a99c6be58ef6968d58a5895b0154624c1905506f38", "role": "api-doc" },
19
+ { "path": "references/ebuilder-customapi-formdata-querypagedata.md", "sha256": "0c2ab32a1001fe73bc3984252207a4c60b411d77d244e3d9ea12e2db86893607", "role": "api-doc" },
20
+ { "path": "references/ebuilder-customapi-formdata-update.md", "sha256": "d132d8282099cb0067d824e4c89bbff97c131d1c7e392725f06ae79956821a82", "role": "api-doc" },
21
+ { "path": "references/ebuilder-openapi-common.md", "sha256": "4b5bb706583ad9a1ff1959b5e389906ce534ec8deeac4a97b20a5af135059b39", "role": "api-doc" },
22
+ { "path": "references/ebuilder-openapi-formdata-deletedata.md", "sha256": "3fed56e7247792753787df74ae6404c96c7bad56be4b325f4c79f8f61d9c33aa", "role": "api-doc" },
23
+ { "path": "references/ebuilder-openapi-formdata-getalldata.md", "sha256": "2b537026902c6eb9f56758f43fd904a5e96dc47d9a40eb1e6918bf0c084a4df3", "role": "api-doc" },
24
+ { "path": "references/ebuilder-openapi-formdata-getalldatacount.md", "sha256": "7a2ab547a8b0c142973ec2bd292b5e27956a4ab9816c0e5c0f85fb66ca39e49f", "role": "api-doc" },
25
+ { "path": "references/ebuilder-openapi-formdata-getdatabyid.md", "sha256": "5e000a15c9fbd3645f9fb61e6e076fc181c6f6bd07933c59a11be70d69226bb0", "role": "api-doc" },
26
+ { "path": "references/ebuilder-openapi-formdata-getfields.md", "sha256": "685b80d8334e0c27e41568a85bad5358f5996dbc336fb97b9e8fa4c092843039", "role": "api-doc" },
27
+ { "path": "references/ebuilder-openapi-formdata-getoptions.md", "sha256": "0f9543855762efad708b89d201234455b0d5ccba680c56a988164ebb849b0a68", "role": "api-doc" },
28
+ { "path": "references/ebuilder-openapi-formdata-gettablemapping.md", "sha256": "f26ab03139058968b0c2e04074399453c3faf4be6f996e9a267b1aab09926c01", "role": "api-doc" },
29
+ { "path": "references/ebuilder-openapi-formdata-saveformdata.md", "sha256": "9a743a4b3ff0dcde416626543e9f2f1b26f9100630d0897dc619aa32fbf94cce", "role": "api-doc" },
30
+ { "path": "references/ebuilder-openapi-formdata-updateformdata.md", "sha256": "18b2ebc58070f18893b82925a55b3a11596e1f12b80f4f26b9005f3d4a3d419e", "role": "api-doc" },
31
+ { "path": "references/list-pagination.md", "sha256": "1887fe99be73f1ddbe278daf4c89106c4d91414540bf03fc6355f669aa8533be", "role": "api-doc" },
32
+ { "path": "references/menu-listid-resolution.md", "sha256": "5e2970c5bb68998b345029cf16a5d661136e8a5a4a19c75680293def533eb2ba", "role": "api-doc" },
33
+ { "path": "references/menu-search.md", "sha256": "0f9565510ac4a024f1f527b643a4b846dfe456662afdd94a496d31dfd90bbf2d", "role": "api-doc" },
34
+ { "path": "references/nlist-config.md", "sha256": "597b3f88b4d8f3ce242766289fce30396158aa03fe779ba484b0d1b0f6afe92a", "role": "api-doc" },
35
+ { "path": "references/nlist-pagination.md", "sha256": "46360d753cd041f3db8cbd5d01ded465773855bd656519a253003a9ac0541592", "role": "api-doc" },
36
+ { "path": "references/routing.md", "sha256": "953a91e6ad074febdd6ccfc053838d0c686753f8edfcee4427395459c58e646b", "role": "api-doc" },
37
+ { "path": "references/runtime-routing.md", "sha256": "126cdc5a14ff31c7e26cb1356663ae0b5578a88bef0a96af788e88291b849e8e", "role": "api-doc" },
38
+ { "path": "references/session-and-routing.md", "sha256": "86b14140155c1026470d4fcc0a3070c0a0c8937adaa8890461a3a7de8cccc64e", "role": "api-doc" },
39
+ { "path": "references/table-config.md", "sha256": "489c1e9eeee3aa4e2b355833d55fba64bbd0c1beefccbe916da2ea7b60e42e0b", "role": "api-doc" },
40
+ { "path": "scripts/ebuilder_http.py", "sha256": "16c242d31a2ec61435182aaac8568d2f72877dc89352c00da1e269ceaf66a7a0", "role": "code" },
41
+ { "path": "scripts/form_data.py", "sha256": "ddd5f232e51c3967fb6bed165248483301bd1ae85576905d28325f01d642ecdd", "role": "code" },
42
+ { "path": "scripts/get_form_views.py", "sha256": "fd09b7b54b4f067a9f6a3b56765d59211fa5803b94389df802432818173fdbf5", "role": "code" },
43
+ { "path": "scripts/get_nlist_config.py", "sha256": "628bea6be2f786b9d27386ddc4caf1412bca3d2d55bc3ad4d4471d483570277a", "role": "code" },
44
+ { "path": "scripts/get_table_config.py", "sha256": "839e346596e22eefd0ad6d9d889c8d5aa67159a364a6fc6d272f14350cc09f2c", "role": "code" },
45
+ { "path": "scripts/query_browser_field.py", "sha256": "10ddf4cfff78e7f990eddab1eb24b842612fd214eaebd3d29c868f45c13a79fe", "role": "code" },
46
+ { "path": "scripts/query_list_data.py", "sha256": "70487ae1635104fcb0e54364a0c869612d3a6d05d62ed588e0e5395da0ff01c8", "role": "code" },
47
+ { "path": "scripts/query_nlist_data.py", "sha256": "b2eebc31f16ff26cd8465aa91d99ed22febaaecb9f9e87064393753246d4eaa3", "role": "code" }
48
+ ],
49
+ "sourceChunks": [
50
+ {
51
+ "id": "menu-search-and-context",
52
+ "sources": ["references/menu-search.md", "references/menu-listid-resolution.md", "references/deployment-routing.md", "references/runtime-routing.md", "references/session-and-routing.md", "scripts/form_data.py"],
53
+ "operations": ["ebuilder-form.menu.search", "ebuilder-form.context.resolve", "ebuilder-form.views.list"],
54
+ "references": ["context-routing.md"]
55
+ },
56
+ {
57
+ "id": "list-nlist-runtime",
58
+ "sources": ["references/table-config.md", "references/list-pagination.md", "references/nlist-config.md", "references/nlist-pagination.md", "scripts/get_table_config.py", "scripts/get_nlist_config.py", "scripts/query_list_data.py", "scripts/query_nlist_data.py"],
59
+ "operations": ["ebuilder-form.list.config", "ebuilder-form.list.query", "ebuilder-form.nlist.config", "ebuilder-form.nlist.query"],
60
+ "references": ["list-nlist.md"]
61
+ },
62
+ {
63
+ "id": "fields-options-browser",
64
+ "sources": ["references/browser-fields.md", "references/ebuilder-openapi-formdata-getfields.md", "references/ebuilder-openapi-formdata-getoptions.md", "references/ebuilder-openapi-formdata-gettablemapping.md", "scripts/query_browser_field.py"],
65
+ "operations": ["ebuilder-form.fields.get", "ebuilder-form.options.get", "ebuilder-form.mapping.get", "ebuilder-form.browser.resolve"],
66
+ "references": ["fields-browser.md"]
67
+ },
68
+ {
69
+ "id": "openapi-formdata",
70
+ "sources": ["references/ebuilder-openapi-common.md", "references/ebuilder-openapi-formdata-getdatabyid.md", "references/ebuilder-openapi-formdata-getalldata.md", "references/ebuilder-openapi-formdata-getalldatacount.md", "references/ebuilder-openapi-formdata-saveformdata.md", "references/ebuilder-openapi-formdata-updateformdata.md", "references/ebuilder-openapi-formdata-deletedata.md", "references/cli.md", "scripts/form_data.py"],
71
+ "operations": ["ebuilder-form.openapi.detail", "ebuilder-form.openapi.query", "ebuilder-form.openapi.count", "ebuilder-form.openapi.add.prepare", "ebuilder-form.openapi.add.apply", "ebuilder-form.openapi.update.prepare", "ebuilder-form.openapi.update.apply", "ebuilder-form.openapi.delete.prepare", "ebuilder-form.openapi.delete.apply"],
72
+ "references": ["openapi-read.md", "openapi-write.md"]
73
+ },
74
+ {
75
+ "id": "custom-formdata",
76
+ "sources": ["references/ebuilder-customapi-formdata-add.md", "references/ebuilder-customapi-formdata-update.md", "references/ebuilder-customapi-formdata-delete.md", "references/ebuilder-customapi-formdata-querybypk.md", "references/ebuilder-customapi-formdata-querypagedata.md", "references/ebuilder-customapi-formdata-count.md"],
77
+ "operations": ["ebuilder-form.custom.detail", "ebuilder-form.custom.query", "ebuilder-form.custom.count", "ebuilder-form.custom.add.prepare", "ebuilder-form.custom.add.apply", "ebuilder-form.custom.update.prepare", "ebuilder-form.custom.update.apply", "ebuilder-form.custom.delete.prepare", "ebuilder-form.custom.delete.apply"],
78
+ "references": ["custom-api.md"]
79
+ }
80
+ ],
81
+ "sourceCoverage": [
82
+ { "path": "SKILL.md", "status": "converted", "references": ["SKILL.md", "context-routing.md", "list-nlist.md", "openapi-write.md"] },
83
+ { "path": "agents/openai.yaml", "status": "converted", "references": ["SKILL.md"] },
84
+ { "path": "references/*.md", "status": "converted", "references": ["context-routing.md", "list-nlist.md", "fields-browser.md", "openapi-read.md", "openapi-write.md", "custom-api.md", "disabled-capabilities.md"] },
85
+ { "path": "scripts/*.py", "status": "converted", "operations": ["ebuilder-form.context.resolve", "ebuilder-form.nlist.query", "ebuilder-form.openapi.*", "ebuilder-form.browser.resolve"], "notes": "脚本不随 Skill 打包;URL 解析、NList customConfig 编码、字段 dataKey 选择、成功判定和写入确认语义已迁移到 TypeScript CLI 与 references。" }
86
+ ],
87
+ "withheld": [
88
+ {
89
+ "capability": "一步按显示名新增/修改并自动解析所有字段",
90
+ "reason": "已拆成 fields/options/browser + prepare/apply,避免把字段匹配和重名处理只放在提示层。"
91
+ },
92
+ {
93
+ "capability": "文件上传、附件、OCR、导入",
94
+ "reason": "源资料未提供稳定接口与文件处理确认链;当前模块不读取或上传用户文件。"
95
+ },
96
+ {
97
+ "capability": "eBuilder 配置写入或菜单/页面修改",
98
+ "reason": "源资料明确业务边界为菜单/列表/表单数据,不包含配置写入确认链。"
99
+ }
100
+ ],
101
+ "generatedArtifacts": [
102
+ "src/shortcuts/ebuilder-form",
103
+ "docs/ebuilder-form.md",
104
+ "skills/weaver-e10-ebuilder-form",
105
+ "skill-template/domains/ebuilder-form.md"
106
+ ]
107
+ }
@@ -15,7 +15,7 @@ cliHelp: "weaver-work-cli esb --help"
15
15
 
16
16
  # 泛微E10 ESB动作流执行
17
17
 
18
- **CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若不存在则必须先执行 `weaver-work-cli skills install shared`,若 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
  本技能覆盖 ESB 中心的**自定义触发类型动作流**:取入参模板(只读)与执行动作流(写操作,需确认)。按动作流名称解析 ID、唯一值对应的 `primary_key` SQL 查询都不在本技能范围内,见「不在范围」。