weaver-work-cli 0.1.8 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -17
- package/dist/cmd/action.js +76 -0
- package/dist/cmd/index.js +2 -0
- package/dist/cmd/refs/index.js +103 -0
- package/dist/cmd/register.js +31 -0
- package/dist/cmd/root.js +1 -0
- package/dist/cmd/setup/index.js +25 -5
- package/dist/cmd/skills/index.js +37 -5
- package/dist/core/connector.js +54 -0
- package/dist/core/context.js +2 -1
- package/dist/core/input.js +48 -0
- package/dist/core/output.js +298 -3
- package/dist/core/refs.js +435 -0
- package/dist/core/state.js +26 -0
- package/dist/internal/e10/auth/commands.js +34 -19
- package/dist/internal/e10/auth/session.js +74 -2
- package/dist/internal/e10/auth/xiaoe.js +359 -94
- package/dist/internal/e10/context.js +18 -6
- package/dist/internal/e10/request-runtime.js +8 -1
- package/dist/internal/skills/install.js +148 -28
- package/dist/internal/skills/reader.js +12 -9
- package/dist/shortcuts/blog/continuation.js +74 -0
- package/dist/shortcuts/blog/errors.js +60 -0
- package/dist/shortcuts/blog/host.js +175 -0
- package/dist/shortcuts/blog/index.js +324 -0
- package/dist/shortcuts/blog/manifest.js +415 -0
- package/dist/shortcuts/blog/operations/comment.js +125 -0
- package/dist/shortcuts/blog/operations/comments.js +31 -0
- package/dist/shortcuts/blog/operations/edit.js +131 -0
- package/dist/shortcuts/blog/operations/export.js +46 -0
- package/dist/shortcuts/blog/operations/like.js +80 -0
- package/dist/shortcuts/blog/operations/publish.js +157 -0
- package/dist/shortcuts/blog/operations/query-user.js +58 -0
- package/dist/shortcuts/blog/operations/query.js +96 -0
- package/dist/shortcuts/blog/operations/registry.js +54 -0
- package/dist/shortcuts/blog/operations/remind.js +176 -0
- package/dist/shortcuts/blog/operations/shared.js +330 -0
- package/dist/shortcuts/blog/operations/types.js +16 -0
- package/dist/shortcuts/blog/operations.js +9 -0
- package/dist/shortcuts/caizhilian/continuation.js +70 -0
- package/dist/shortcuts/caizhilian/errors.js +53 -0
- package/dist/shortcuts/caizhilian/host.js +190 -0
- package/dist/shortcuts/caizhilian/index.js +186 -0
- package/dist/shortcuts/caizhilian/manifest.js +42 -0
- package/dist/shortcuts/caizhilian/operations/api.js +801 -0
- package/dist/shortcuts/caizhilian/operations/confirm.js +75 -0
- package/dist/shortcuts/caizhilian/operations/files.js +306 -0
- package/dist/shortcuts/caizhilian/operations/form.js +170 -0
- package/dist/shortcuts/caizhilian/operations/handlers/collab.js +611 -0
- package/dist/shortcuts/caizhilian/operations/handlers/document.js +890 -0
- package/dist/shortcuts/caizhilian/operations/handlers/file-collection.js +1227 -0
- package/dist/shortcuts/caizhilian/operations/handlers/file-upload.js +192 -0
- package/dist/shortcuts/caizhilian/operations/handlers/fileops.js +570 -0
- package/dist/shortcuts/caizhilian/operations/handlers/folder.js +1024 -0
- package/dist/shortcuts/caizhilian/operations/handlers/search.js +318 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-attach.js +294 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-backup.js +423 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-encrypt.js +238 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-storage.js +364 -0
- package/dist/shortcuts/caizhilian/operations/handlers/system.js +106 -0
- package/dist/shortcuts/caizhilian/operations/registry.js +151 -0
- package/dist/shortcuts/caizhilian/operations/shared.js +408 -0
- package/dist/shortcuts/caizhilian/operations/specs.js +698 -0
- package/dist/shortcuts/caizhilian/operations/types.js +57 -0
- package/dist/shortcuts/caizhilian/operations.js +21 -0
- package/dist/shortcuts/contract/continuation.js +70 -0
- package/dist/shortcuts/contract/errors.js +62 -0
- package/dist/shortcuts/contract/host.js +205 -0
- package/dist/shortcuts/contract/index.js +318 -0
- package/dist/shortcuts/contract/manifest.js +596 -0
- package/dist/shortcuts/contract/operations/clause-reference.js +78 -0
- package/dist/shortcuts/contract/operations/form-info.js +371 -0
- package/dist/shortcuts/contract/operations/read.js +118 -0
- package/dist/shortcuts/contract/operations/registry.js +43 -0
- package/dist/shortcuts/contract/operations/request.js +300 -0
- package/dist/shortcuts/contract/operations/shared.js +133 -0
- package/dist/shortcuts/contract/operations/subject.js +157 -0
- package/dist/shortcuts/contract/operations/template.js +81 -0
- package/dist/shortcuts/contract/operations/types.js +7 -0
- package/dist/shortcuts/contract/operations/workflow.js +52 -0
- package/dist/shortcuts/contract/operations/write.js +131 -0
- package/dist/shortcuts/contract/operations.js +8 -0
- package/dist/shortcuts/hrm/index.js +83 -2
- package/dist/shortcuts/hrm/manifest.js +16 -9
- package/dist/shortcuts/hrm/operations/employee.js +160 -30
- package/dist/shortcuts/hrm/operations/org.js +17 -3
- package/dist/shortcuts/hrm/operations/position.js +18 -2
- package/dist/shortcuts/hrm/operations/registry.js +2 -0
- package/dist/shortcuts/hrm/operations/resolve.js +449 -0
- package/dist/shortcuts/index.js +5 -1
- package/dist/shortcuts/invoice/index.js +74 -36
- package/dist/shortcuts/invoice/manifest.js +674 -4
- package/dist/shortcuts/invoice/markdown.js +172 -0
- package/dist/shortcuts/invoice/operations/add.js +3 -3
- package/dist/shortcuts/invoice/operations/delete.js +2 -2
- package/dist/shortcuts/invoice/operations/get.js +10 -2
- package/dist/shortcuts/invoice/operations/import.js +2 -2
- package/dist/shortcuts/invoice/operations/registry.js +8 -1
- package/dist/shortcuts/invoice/operations/reim-auto.js +719 -0
- package/dist/shortcuts/invoice/operations/reim.js +85 -2
- package/dist/shortcuts/invoice/operations/shared.js +75 -8
- package/dist/shortcuts/invoice/operations/update.js +2 -2
- package/dist/shortcuts/invoice/operations/upload-and-validate.js +93 -0
- package/dist/shortcuts/invoice/operations/validate-preview.js +2 -1
- package/dist/shortcuts/invoice/projection.js +328 -0
- package/dist/shortcuts/meeting/host.js +18 -1
- package/dist/shortcuts/meeting/manifest.js +30 -18
- package/dist/shortcuts/meeting/operations/eb/catalog.js +390 -0
- package/dist/shortcuts/meeting/operations/eb/conflict.js +389 -0
- package/dist/shortcuts/meeting/operations/eb/factory.js +389 -0
- package/dist/shortcuts/meeting/operations/eb/index.js +22 -0
- package/dist/shortcuts/meeting/operations/env.js +8 -1
- package/dist/shortcuts/meeting/operations/registry.js +2 -0
- package/dist/shortcuts/meeting/operations/signs.js +216 -2
- package/dist/shortcuts/workflow/endpoints.js +2 -1
- package/dist/shortcuts/workflow/errors.js +8 -2
- package/dist/shortcuts/workflow/host.js +11 -4
- package/dist/shortcuts/workflow/operations/form.js +1016 -590
- package/dist/shortcuts/workflow/operations/read.js +913 -231
- package/dist/shortcuts/workflow/operations/shared.js +21 -0
- package/dist/shortcuts/workflow/operations/write.js +750 -52
- package/dist/shortcuts/workflow/operations.js +36 -10
- package/docs/_catalog.md +6 -0
- package/docs/agent-invoice.md +5 -1
- package/docs/agent-io-channel-design.md +468 -0
- package/docs/agent-skill-install.md +9 -4
- package/docs/blog.md +123 -0
- package/docs/caizhilian.md +304 -0
- package/docs/contract.md +91 -0
- package/docs/e10-auth.md +4 -2
- package/docs/hrm.md +53 -11
- package/docs/invoice.md +5 -1
- package/docs/meeting.md +1 -1
- package/docs/operation-manual.md +15 -3
- package/docs/skill-review-2026-09-19.md +2 -2
- package/package.json +1 -1
- package/scripts/package-skill.mjs +32 -20
- package/scripts/xiaoe_env.py +118 -0
- package/skill-template/business-info.json +113 -14
- package/skill-template/domains/blog.md +24 -0
- package/skill-template/domains/caizhilian.md +22 -0
- package/skill-template/domains/hrm.md +2 -1
- package/skill-template/domains/jinchengda.md +23 -0
- package/skill-template/domains/meeting.md +1 -1
- package/skill-template/domains/workflow.md +1 -1
- package/skill-template/skill-template.md +1 -1
- package/skills/weaver-e10-blog/SKILL.md +111 -0
- package/skills/weaver-e10-blog/references/blog-comment.md +51 -0
- package/skills/weaver-e10-blog/references/blog-comments.md +39 -0
- package/skills/weaver-e10-blog/references/blog-default-permission.md +38 -0
- package/skills/weaver-e10-blog/references/blog-disabled-capabilities.md +11 -0
- package/skills/weaver-e10-blog/references/blog-edit.md +51 -0
- package/skills/weaver-e10-blog/references/blog-export.md +42 -0
- package/skills/weaver-e10-blog/references/blog-like.md +50 -0
- package/skills/weaver-e10-blog/references/blog-publish.md +52 -0
- package/skills/weaver-e10-blog/references/blog-query-user.md +45 -0
- package/skills/weaver-e10-blog/references/blog-query.md +49 -0
- package/skills/weaver-e10-blog/references/blog-remind.md +51 -0
- package/skills/weaver-e10-blog/references/blog-resolve-users.md +38 -0
- package/skills/weaver-e10-blog/references/source-manifest.json +1540 -0
- package/skills/weaver-e10-caizhilian/SKILL.md +217 -0
- package/skills/weaver-e10-caizhilian/references/agent-entry.md +106 -0
- package/skills/weaver-e10-caizhilian/references/collaboration.md +112 -0
- package/skills/weaver-e10-caizhilian/references/document.md +111 -0
- package/skills/weaver-e10-caizhilian/references/file-collection.md +173 -0
- package/skills/weaver-e10-caizhilian/references/file-upload.md +309 -0
- package/skills/weaver-e10-caizhilian/references/files.md +120 -0
- package/skills/weaver-e10-caizhilian/references/folder.md +122 -0
- package/skills/weaver-e10-caizhilian/references/org-browser.md +104 -0
- package/skills/weaver-e10-caizhilian/references/setting-attach.md +440 -0
- package/skills/weaver-e10-caizhilian/references/setting-backup.md +372 -0
- package/skills/weaver-e10-caizhilian/references/setting-encrypt.md +399 -0
- package/skills/weaver-e10-caizhilian/references/setting-storage.md +603 -0
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +5694 -0
- package/skills/weaver-e10-caizhilian/references/withheld.md +93 -0
- package/skills/weaver-e10-caizhilian/references/write-protocol.md +120 -0
- package/skills/weaver-e10-calendar/SKILL.md +4 -3
- package/skills/weaver-e10-ebuilder-form/SKILL.md +4 -9
- package/skills/weaver-e10-ebuilder-form/references/context-routing.md +0 -9
- package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/fields-browser.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/list-nlist.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/openapi-read.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -5
- package/skills/weaver-e10-esb/SKILL.md +2 -2
- package/skills/weaver-e10-esb/references/source-manifest.json +9 -9
- package/skills/weaver-e10-hrm/SKILL.md +104 -9
- package/skills/weaver-e10-hrm/references/employee.md +89 -15
- package/skills/weaver-e10-hrm/references/org.md +114 -5
- package/skills/weaver-e10-hrm/references/position.md +14 -7
- package/skills/weaver-e10-hrm/references/source-manifest.json +1 -1
- package/skills/weaver-e10-jinchengda/SKILL.md +167 -0
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +82 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +69 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +78 -0
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +27 -0
- package/skills/weaver-e10-jinchengda/references/contract-request-status.md +71 -0
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +94 -0
- package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +89 -0
- package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +77 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +66 -0
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +94 -0
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +259 -0
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +5 -11
- package/skills/weaver-e10-jucailin/SKILL.md +4 -3
- package/skills/weaver-e10-mail/SKILL.md +4 -11
- package/skills/weaver-e10-meeting/SKILL.md +66 -32
- package/skills/weaver-e10-meeting/references/meeting-change.md +5 -2
- package/skills/weaver-e10-meeting/references/meeting-create.md +2 -1
- package/skills/weaver-e10-meeting/references/meeting-eb.md +114 -0
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +9 -8
- package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +35 -7
- package/skills/weaver-e10-meeting/references/meeting-update.md +1 -1
- package/skills/weaver-e10-okr/SKILL.md +6 -11
- package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
- package/skills/weaver-e10-plan/SKILL.md +3 -3
- package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +1 -1
- package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +1 -1
- package/skills/weaver-e10-plan/references/source-manifest.json +13 -13
- package/skills/weaver-e10-qiyecheng/SKILL.md +4 -10
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +9 -9
- package/skills/weaver-e10-shared/SKILL.md +42 -34
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +16 -43
- package/skills/weaver-e10-shared/references/json-output-contract.md +20 -11
- package/skills/weaver-e10-shared/references/non-interactive-environment.md +21 -14
- package/skills/weaver-e10-shijingran/SKILL.md +2 -1
- package/skills/weaver-e10-shijingran/references/source-manifest.json +9 -9
- package/skills/weaver-e10-skill-maker/SKILL.md +4 -10
- package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +5 -3
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +12 -27
- package/skills/weaver-e10-skill-maker/references/module-gap-audit-and-repair.md +17 -5
- package/skills/weaver-e10-skill-maker/references/source-update-detection.md +4 -27
- package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +1 -1
- package/skills/weaver-e10-wenshuding/SKILL.md +5 -16
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +7 -7
- package/skills/weaver-e10-workflow/SKILL.md +41 -46
- package/skills/weaver-e10-workflow/references/source-manifest.json +39 -75
- package/skills/weaver-e10-workflow/references/workflow-batch.md +90 -29
- package/skills/weaver-e10-workflow/references/workflow-create.md +83 -109
- package/skills/weaver-e10-workflow/references/workflow-memory.md +19 -9
- package/skills/weaver-e10-workflow/references/workflow-operate.md +2 -2
- package/skills/weaver-e10-workflow/references/workflow-query.md +40 -27
- package/skills/weaver-e10-workflow/references/workflow-share.md +18 -2
- package/skills/weaver-e10-workflow/references/workflow-view.md +3 -4
- package/skills/weaver-e10-yepiaotong/SKILL.md +74 -39
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +22 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +135 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +15 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-summarize.py +217 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +88 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +7 -2
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +89 -9
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +1 -0
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +70 -49
- package/skills/weaver-e10-yepiaotong/references/reim-fast-path.md +119 -0
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +55 -36
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +4 -0
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +149 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +125 -5
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +430 -63
- package/skills/weaver-e10-yimiaoban/SKILL.md +4 -12
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
- package/skills/weaver-e10-ziguanjia/SKILL.md +2 -1
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +3 -3
- package/tools/weaver-skill-detector-1.0.13/SKILL.md +9 -9
- package/tools/weaver-skill-detector-1.0.13/references/checklist.md +3 -3
- package/tools/weaver-skill-detector-1.0.13/scripts/__pycache__/validate_skill.cpython-313.pyc +0 -0
- package/tools/weaver-skill-detector-1.0.13/scripts/validate_skill.py +98 -91
- package/scripts/sync-connector-skills.mjs +0 -172
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# 合同类型与模板查询
|
|
2
|
+
|
|
3
|
+
## 请求头 / 认证
|
|
4
|
+
|
|
5
|
+
本文件描述的 API 请求通过 `weaver-work-cli` 执行,CLI 从 E10 登录会话自动注入以下凭证头(禁止业务输入携带):
|
|
6
|
+
|
|
7
|
+
| 请求头 | 值 |
|
|
8
|
+
|--------|-----|
|
|
9
|
+
| `Cookie` | `<e10-login 返回的完整原始 Cookie 串>`(禁止裁剪/去重/改写) |
|
|
10
|
+
| `eteamsid` | `<e10-login 返回的 ETEAMSID>` |
|
|
11
|
+
| `User-Agent` | `AgentType=<agentType>,IsAgent=true` |
|
|
12
|
+
|
|
13
|
+
业务输入(`--input-json` / `--input`)**不得包含** `userid`、`userId`、`token`、`cookie`、`eteamsid` 等字段,用户 ID 由 CLI 从会话注入。
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
用途:按合同类型定位可选模板,或对指定模板查看详情。四个 operation 全部为 `read`。
|
|
17
|
+
|
|
18
|
+
## operation 与接口
|
|
19
|
+
|
|
20
|
+
| operation | 方法 | 路径 | 关键输入 |
|
|
21
|
+
|---|---|---|---|
|
|
22
|
+
| `contract.type.tree` | GET | `/api/ebd/contract/type/allTypes` | 无(无需传参) |
|
|
23
|
+
| `contract.template.tree` | GET | `/api/ebd/contract/tpltree/queryList` | `treeName`、`parentId`、`treeType`、`isSystem`、`useType`、`appId` |
|
|
24
|
+
| `contract.template.list` | GET | `/api/ebd/contract/tplinfo/getListPage` | `templateName`、`belongId`、`contractType`、`templateStatus`、`source`、`pageNo`、`pageSize` 等 |
|
|
25
|
+
| `contract.template.detail` | GET | `/api/ebd/contract/tplinfo/getById` | `id`(必填,模板 ID) |
|
|
26
|
+
|
|
27
|
+
分页参数命名:`contract.template.list` 用 `pageNo`(从 1 开始)+ `pageSize`,CLI 默认 `pageNo=1`、`pageSize=10`。不要与其它接口的 `pageNum` 混用。
|
|
28
|
+
|
|
29
|
+
## 处理链
|
|
30
|
+
|
|
31
|
+
1. `contract.type.tree` 拿全部合同类型(含收支类型、适用部门)。
|
|
32
|
+
2. `contract.template.tree` 拿模板分类树,取目标分类的 `belongId`。
|
|
33
|
+
3. `contract.template.list` 传运行时拿到的 `belongId` / `contractType` 列出模板;默认小页,用户要全量时再翻页。
|
|
34
|
+
4. `contract.template.detail` 传模板 `id` 看详情。
|
|
35
|
+
|
|
36
|
+
## 调用示例
|
|
37
|
+
|
|
38
|
+
Windows PowerShell:
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
weaver-work-cli --json contract run contract.type.tree
|
|
42
|
+
weaver-work-cli --json contract run contract.template.tree --input-json '{"treeName":"采购合同"}'
|
|
43
|
+
weaver-work-cli --json contract run contract.template.list --input-json '{"belongId":"12345","pageNo":1,"pageSize":10}'
|
|
44
|
+
weaver-work-cli --json contract run contract.template.detail --input-json '{"id":"67890"}'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
macOS/Linux(bash/zsh):
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
weaver-work-cli --json contract run contract.type.tree
|
|
51
|
+
weaver-work-cli --json contract run contract.template.tree --input-json '{"treeName":"采购合同"}'
|
|
52
|
+
weaver-work-cli --json contract run contract.template.list --input-json '{"belongId":"12345","pageNo":1,"pageSize":10}'
|
|
53
|
+
weaver-work-cli --json contract run contract.template.detail --input-json '{"id":"67890"}'
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 结果解读
|
|
57
|
+
|
|
58
|
+
- `/api/ebd/**` 的成功码是顶层 `code = 0`;`code != 0` 时 CLI 抛 `api/business_error` 并带相对路径与脱敏参数摘要。
|
|
59
|
+
- 展示模板候选时给名称、状态和推荐理由;**不要伪造"智能评分"**。
|
|
60
|
+
- 列表为空时说明"当前分类下没有模板",不要改用其它接口轮询。
|
|
61
|
+
- 分类 ID 与模板 ID 均为环境相关字符串,必须来自上一步运行时结果。
|
|
62
|
+
|
|
63
|
+
## 注意
|
|
64
|
+
|
|
65
|
+
- 不要凭模板名称猜测 `id`;`contract.template.detail` 的 `id` 必须来自列表或分类树的返回。
|
|
66
|
+
- 用户只问"有哪些模板"时不要直接拉全量,先取小页并说明是否还有更多。
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# 合同审批流程:流程与表单解析
|
|
2
|
+
|
|
3
|
+
## 请求头 / 认证
|
|
4
|
+
|
|
5
|
+
本文件描述的 API 请求通过 `weaver-work-cli` 执行,CLI 从 E10 登录会话自动注入以下凭证头(禁止业务输入携带):
|
|
6
|
+
|
|
7
|
+
| 请求头 | 值 |
|
|
8
|
+
|--------|-----|
|
|
9
|
+
| `Cookie` | `<e10-login 返回的完整原始 Cookie 串>`(禁止裁剪/去重/改写) |
|
|
10
|
+
| `eteamsid` | `<e10-login 返回的 ETEAMSID>` |
|
|
11
|
+
| `User-Agent` | `AgentType=<agentType>,IsAgent=true` |
|
|
12
|
+
|
|
13
|
+
业务输入(`--input-json` / `--input`)**不得包含** `userid`、`userId`、`token`、`cookie`、`eteamsid` 等字段,用户 ID 由 CLI 从会话注入。
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
用途:把"流程名称""字段名称""选项名称"等人类语义,解析成运行时可用的 `workflowId`、`fieldId`、`optionId`。全部为 `read`。
|
|
17
|
+
|
|
18
|
+
## operation 与接口
|
|
19
|
+
|
|
20
|
+
| operation | 方法 | 路径 | 关键输入 |
|
|
21
|
+
|---|---|---|---|
|
|
22
|
+
| `contract.workflow.query` | POST | `/api/workflow/pathdef/openapi/getBaseInfoByCondition` | `workflowName`(必填)、`workflowType`、`status` |
|
|
23
|
+
| `contract.workflow.list` | POST | `/api/workflow/list/paService/v1/getCreateWorkflowList` | `wfpCode`(必填,0 个人审批 / 1 团队审批)、`filterHide` |
|
|
24
|
+
| `contract.workflow.form.info` | POST | 三段式,见下方说明 | `workflowId`(必填) |
|
|
25
|
+
| `contract.workflow.field.options` | POST | `/api/workflow/core/paService/v1/getFieldOption` | `fieldId`(必填)、`pageNo`、`pageSize` |
|
|
26
|
+
|
|
27
|
+
前三个接口由 CLI 注入 `userid`(来自 E10 会话),业务输入禁止携带。
|
|
28
|
+
|
|
29
|
+
### `contract.workflow.form.info` 的三段式
|
|
30
|
+
|
|
31
|
+
一次 `form.info` 调用内部串三次请求,中间值(requestId / nodeId / authStr / formId)由 CLI 自行传递,调用方只需要 `workflowId`:
|
|
32
|
+
|
|
33
|
+
| 步骤 | 路径 | 作用 |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| 1 | `/api/workflow/core/flowPage/loadBaseParam` | 取表单会话:`requestId`、`nodeId`、`authStr`、`authSignature` |
|
|
36
|
+
| 2 | `/api/workflow/core/flowPage/loadFrameParam` | 取表单身份:`formId`、`relateType`、节点与权限开关 |
|
|
37
|
+
| 3 | `/api/workflow/core/form/core/getFormLayout` | 取字段布局:`form`、`formLayout`、`viewRelateConfig`(静态必填) |
|
|
38
|
+
|
|
39
|
+
第三步路径按 `relateType` 切换:建模表单(`WEA_EBUILDER`)走 `/api/ebuilder/flow/form/core/getFormLayout`,
|
|
40
|
+
普通工作流表单保持 `/api/workflow/core/form/core/getFormLayout`。
|
|
41
|
+
|
|
42
|
+
> 历史实现走 `/api/workflow/pathdef/openapi/getFormInfo`(openapi 系列),在 E10 10.0.9807.01 合同租户上
|
|
43
|
+
> 返回成功但**表单为空**,读不到任何字段。已废弃。
|
|
44
|
+
|
|
45
|
+
输出要点:`formId`、`layoutId`、`requiredFields`、`subFormRequired`(明细表必填)、
|
|
46
|
+
`fields[]`(`id`/`name`/`componentKey`/`required`/`readOnly`/`subFormId`/`isBrowser`/`browserType`/`options`/`format`)。
|
|
47
|
+
`requiredSource` 标出必填口径的来源:`viewRelateConfig`(服务端下发,权威)或 `field-metadata`(字段自带标记)。
|
|
48
|
+
`readOnly` / `disableEdit` 的字段写不进去;`subFormId` 非空的字段属于明细表,要放进该明细的行数据里。
|
|
49
|
+
|
|
50
|
+
## 处理链
|
|
51
|
+
|
|
52
|
+
1. 名称明确:用 `contract.workflow.query`,取返回条目的 `activeWfId`(或 `id`)作为 `workflowId`。
|
|
53
|
+
2. 名称不明确:用 `contract.workflow.list` 枚举前台可发起流程,让用户选择。
|
|
54
|
+
3. 读字段定义:用 `contract.workflow.form.info`,一次调用完成三段式读取;从 `fields[]` 取 `id`、`componentKey`、`required`、`options`、`format`。
|
|
55
|
+
4. 读选项:普通 Select/RadioBox/CheckBox 的选项直接就在 `fields[].options` 里;浏览按钮类字段(人力/部门/建模对象等,`isBrowser=true`)的候选用 `contract.workflow.field.options` 查,`fieldId` 取字段 id。
|
|
56
|
+
|
|
57
|
+
## 调用示例
|
|
58
|
+
|
|
59
|
+
Windows PowerShell:
|
|
60
|
+
|
|
61
|
+
```powershell
|
|
62
|
+
weaver-work-cli --json contract run contract.workflow.query --input-json '{"workflowName":"销售合同起草","status":"1"}'
|
|
63
|
+
weaver-work-cli --json contract run contract.workflow.list --input-json '{"wfpCode":0}'
|
|
64
|
+
weaver-work-cli --json contract run contract.workflow.form.info --input-json '{"workflowId":"12345"}'
|
|
65
|
+
weaver-work-cli --json contract run contract.workflow.field.options --input-json '{"fieldId":"111","pageNo":1,"pageSize":50}'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
macOS/Linux(bash/zsh):
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
weaver-work-cli --json contract run contract.workflow.query --input-json '{"workflowName":"销售合同起草","status":"1"}'
|
|
72
|
+
weaver-work-cli --json contract run contract.workflow.list --input-json '{"wfpCode":0}'
|
|
73
|
+
weaver-work-cli --json contract run contract.workflow.form.info --input-json '{"workflowId":"12345"}'
|
|
74
|
+
weaver-work-cli --json contract run contract.workflow.field.options --input-json '{"fieldId":"111","pageNo":1,"pageSize":50}'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 结果解读与边界
|
|
78
|
+
|
|
79
|
+
- 成功码按路径分组判定:`/api/workflow/core/paService/**` 看 `message.errcode`(0 与 200 都算成功);
|
|
80
|
+
三段式表单接口没有 `message` 节点,靠 `fail`/`status` 与显式 errcode 判定——只有出现非 0/200 的 errcode 才算失败。
|
|
81
|
+
响应载荷统一包在 `data` 里,顶层 `code/msg/status` 只是传输状态。
|
|
82
|
+
- `baseInfoList` 为空 = 未找到同名流程:提示用户确认名称或改用 `contract.workflow.list` 枚举。
|
|
83
|
+
- 同名多结果:展示候选(名称、版本)请用户选择,或加 `status=1` 收敛,**不默认取第一条**。
|
|
84
|
+
- 名称匹配不到选项:展示候选请用户确认,**不得猜测 optionId**。
|
|
85
|
+
- 非选择类字段(文本、金额、日期)没有选项,本接口不提供。
|
|
86
|
+
- 响应中的 `tenantKey`、`creator` 等环境敏感字段不输出。
|
|
87
|
+
|
|
88
|
+
## 注意
|
|
89
|
+
|
|
90
|
+
- 12 类合同审批流程(销售、采购、协议、变更、解除、关闭、开票、收款、付款、履约计划、进度提报、供应商准入)都走同一条解析链,不要为每类流程假设固定的 `workflowId`。
|
|
91
|
+
- **发起流程前不需要、也不允许再去调用活动版本接口**:`getActiveWfId` 在部分租户返回 500 系统错误,`contract.request.create.prepare` 已经不依赖它,直接用 `workflow.query` / `workflow.list` 解析出的 `workflowId` 发起即可。
|
|
92
|
+
- **读不到字段时先怀疑路径,不要怀疑表单**:`fields` 为空就该怀疑选错了接口族(见上方「三段式」说明),不要据此告诉用户"这个表单没有字段"。
|
|
93
|
+
- 要按真实表单发起(带必填校验、明细行、浏览按钮解析),用 `weaver-e10-workflow` 的 `workflow.createForm` → `createPrepare` → `createApply`;`form.info` 只负责把表单结构读出来。
|
|
94
|
+
- 解析完成前不要进入写操作;写操作见 [`contract-request-write.md`](contract-request-write.md)。
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"module": "contract",
|
|
4
|
+
"skill": "weaver-e10-jinchengda",
|
|
5
|
+
"generatedAt": "2026-09-20T09:52:00.000Z",
|
|
6
|
+
"sourceSet": {
|
|
7
|
+
"aggregateSha256": "84b6cd88057c3a82e42069c09265ba00313078bc8566169a9bc2c3985ec34381",
|
|
8
|
+
"sourceRoots": [
|
|
9
|
+
"<user-provided>/泛微E10今承达合同管理"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"generatedTargets": {
|
|
13
|
+
"cli": [
|
|
14
|
+
"src/shortcuts/contract",
|
|
15
|
+
"src/shortcuts/index.ts"
|
|
16
|
+
],
|
|
17
|
+
"skill": [
|
|
18
|
+
"skills/weaver-e10-jinchengda"
|
|
19
|
+
],
|
|
20
|
+
"tests": [
|
|
21
|
+
"test/business/contract-host.test.ts",
|
|
22
|
+
"test/business/contract-operations.test.ts"
|
|
23
|
+
],
|
|
24
|
+
"docs": [
|
|
25
|
+
"docs/contract.md",
|
|
26
|
+
"skill-template/domains/jinchengda.md"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"sources": [
|
|
30
|
+
{
|
|
31
|
+
"path": "SKILL.md",
|
|
32
|
+
"role": "skill-doc",
|
|
33
|
+
"size": 7538,
|
|
34
|
+
"sha256": "f7612cb9539ac963c5590d60b8f2c9b67433d785a3ec6ecf58fa0114fa7ba04e"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"path": "feature-map.json",
|
|
38
|
+
"role": "feature-map",
|
|
39
|
+
"size": 1773,
|
|
40
|
+
"sha256": "17ee22bd43e8bb7ad8f9be626fec9b89ddb5270bafb012b6deb106ae782acb1e"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"path": "references/api-contract-type-tree.md",
|
|
44
|
+
"role": "api-doc",
|
|
45
|
+
"size": 3546,
|
|
46
|
+
"sha256": "ff19b867c7482df50d74e8e5ddb7b8b18b1be71b1bca4a55c68a7cf317524e08"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"path": "references/approval-workflows/api-active-wf-id.md",
|
|
50
|
+
"role": "api-doc",
|
|
51
|
+
"size": 1712,
|
|
52
|
+
"sha256": "18598eee4d582ac29454c5cf52132ebd7809c6744076f3a1a4d3e4e7d4e4747c"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"path": "references/approval-workflows/api-create-request.md",
|
|
56
|
+
"role": "api-doc",
|
|
57
|
+
"size": 3809,
|
|
58
|
+
"sha256": "792cefd71aa31692f0d326710753a5fc3a1d39957de1a0514a65b693d3dfe212"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"path": "references/approval-workflows/api-create-workflow-list.md",
|
|
62
|
+
"role": "api-doc",
|
|
63
|
+
"size": 2046,
|
|
64
|
+
"sha256": "8414a892d42f6c6e5214be21add5ef9a92d8409eecb8fa5b3ffb61c9a95461c0"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"path": "references/approval-workflows/api-ebuilder-get-all-data.md",
|
|
68
|
+
"role": "api-doc",
|
|
69
|
+
"size": 3694,
|
|
70
|
+
"sha256": "8a545f91eb510828652d90d7619cf9c6ee0e976c36efef78d54205884ecf2c08"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"path": "references/approval-workflows/api-ebuilder-get-objs-by-tag.md",
|
|
74
|
+
"role": "api-doc",
|
|
75
|
+
"size": 2739,
|
|
76
|
+
"sha256": "a0154375d343618a7090b448a47c68ee7c405d538dddaa793130406808965bfa"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"path": "references/approval-workflows/api-field-option.md",
|
|
80
|
+
"role": "api-doc",
|
|
81
|
+
"size": 2996,
|
|
82
|
+
"sha256": "91d75013150878c56343941bf5bb4e18eea799f6e21098957bc2c74dd67173fe"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"path": "references/approval-workflows/api-form-info.md",
|
|
86
|
+
"role": "api-doc",
|
|
87
|
+
"size": 3849,
|
|
88
|
+
"sha256": "cc6f15bee3505d45bd7095a8cf724caa648b321204732abefea8cfb7ecfae058"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"path": "references/approval-workflows/api-request-log.md",
|
|
92
|
+
"role": "api-doc",
|
|
93
|
+
"size": 1914,
|
|
94
|
+
"sha256": "a0a4d938792f8fb5e23a500dec819443dc2e8032eb2120a4bd58cfaa06436538"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"path": "references/approval-workflows/api-request-status.md",
|
|
98
|
+
"role": "api-doc",
|
|
99
|
+
"size": 2867,
|
|
100
|
+
"sha256": "05d3300beef33f904c7e7b730b00e11098083a904e3424333828df57c9a68882"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"path": "references/approval-workflows/api-request-supervise.md",
|
|
104
|
+
"role": "api-doc",
|
|
105
|
+
"size": 2673,
|
|
106
|
+
"sha256": "bcdddf7e04d0b3e96aa5fb4e10325f7df773e7d6c0aa5baeb0800d27b675c213"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"path": "references/approval-workflows/api-save-form-data.md",
|
|
110
|
+
"role": "api-doc",
|
|
111
|
+
"size": 4675,
|
|
112
|
+
"sha256": "f77ed8d2b4820b93e7c9c7321bbecca2b99c6b6eea9fe023698360daa1ff95db"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"path": "references/approval-workflows/api-submit-request.md",
|
|
116
|
+
"role": "api-doc",
|
|
117
|
+
"size": 4056,
|
|
118
|
+
"sha256": "fa65f21289327428bd0fc5832792aa479e2573653d601e5e9d474514b8b06047"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"path": "references/approval-workflows/api-workflow-query.md",
|
|
122
|
+
"role": "api-doc",
|
|
123
|
+
"size": 3642,
|
|
124
|
+
"sha256": "e72576f81cff821b74103b5c774bf9d0e48ee8fbe3e19f4269b5bfaf313eaef4"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"path": "references/approval-workflows/catalog.md",
|
|
128
|
+
"role": "api-doc",
|
|
129
|
+
"size": 2961,
|
|
130
|
+
"sha256": "daaf69eab644481919e84850ac631bc25a1f9a9a294d74b29d28654d4a39bc38"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"path": "references/catalog.md",
|
|
134
|
+
"role": "catalog",
|
|
135
|
+
"size": 3023,
|
|
136
|
+
"sha256": "322f204d03e87463b5b3846f813d27f52726a048c5122957933dccdf64de313d"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"path": "references/clause-recommender/api-clause-group-list.md",
|
|
140
|
+
"role": "api-doc",
|
|
141
|
+
"size": 3174,
|
|
142
|
+
"sha256": "0a3e9b20a9bb7194c6bf56a7674514176ee0c8b1f09969597a167554b3e159bb"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"path": "references/clause-recommender/api-clause-list.md",
|
|
146
|
+
"role": "api-doc",
|
|
147
|
+
"size": 3807,
|
|
148
|
+
"sha256": "f48e04fc7e79aedda99e4396b4cdb68c9c1d0d581cd25c0a9d84de10abe29cf0"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"path": "references/clause-recommender/api-clause-reference-query.md",
|
|
152
|
+
"role": "api-doc",
|
|
153
|
+
"size": 3740,
|
|
154
|
+
"sha256": "be7c8b59bc3545129b8e4ac2b899244b43c9903efa97ef09256384cc92563999"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"path": "references/clause-recommender/api-clause-reference-save.md",
|
|
158
|
+
"role": "api-doc",
|
|
159
|
+
"size": 2524,
|
|
160
|
+
"sha256": "174e01c49bf8035ea622a301ad4d95d975a00403b8b929490fc5364b0c50c1bb"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"path": "references/clause-recommender/api-clause-search.md",
|
|
164
|
+
"role": "api-doc",
|
|
165
|
+
"size": 5389,
|
|
166
|
+
"sha256": "4fffb766e0077b493044505d6b6f21b71381bf8aa4160ecc9f691ef49bad6fda"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"path": "references/clause-recommender/api-clause-tags.md",
|
|
170
|
+
"role": "api-doc",
|
|
171
|
+
"size": 2850,
|
|
172
|
+
"sha256": "a2024388d2a02ecd32623d01d599e0133d8145247533d9027242d48d62448ae2"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"path": "references/clause-recommender/api-clause-tree-list.md",
|
|
176
|
+
"role": "api-doc",
|
|
177
|
+
"size": 2726,
|
|
178
|
+
"sha256": "8223c5e6515e2cf3afa17dbeebbaed2f86593d3541b688818d914533e956a110"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"path": "references/enterprise-credit/api-enterprise-credit.md",
|
|
182
|
+
"role": "api-doc",
|
|
183
|
+
"size": 383,
|
|
184
|
+
"sha256": "d12be1646e2ae497d36246639d33fc97313631eb5aae097d106ea2da92a8fc1d"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"path": "references/signing-subjects/api-form-create.md",
|
|
188
|
+
"role": "api-doc",
|
|
189
|
+
"size": 2474,
|
|
190
|
+
"sha256": "2f0fa557be0353ed89e00f772f042efc3def6c246ba51b53c1402daca2333a8a"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"path": "references/signing-subjects/api-form-fields.md",
|
|
194
|
+
"role": "api-doc",
|
|
195
|
+
"size": 2885,
|
|
196
|
+
"sha256": "ca64934b0f3bee7f2c959f034fe55c163931bffe0635657047c02e4de4c3ec0a"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"path": "references/signing-subjects/api-form-options.md",
|
|
200
|
+
"role": "api-doc",
|
|
201
|
+
"size": 1651,
|
|
202
|
+
"sha256": "16f09be5b67a788f92cb1d8cad2a1cce59ed5481d1c31aa5e11085ab6778cffe"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"path": "references/signing-subjects/api-form-query.md",
|
|
206
|
+
"role": "api-doc",
|
|
207
|
+
"size": 2399,
|
|
208
|
+
"sha256": "12fd401ba8fb62aec209869a903b81e6539b6ae2c00d0775f20f6465369b0ae8"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"path": "references/signing-subjects/api-tag-app.md",
|
|
212
|
+
"role": "api-doc",
|
|
213
|
+
"size": 1507,
|
|
214
|
+
"sha256": "e24752e664d5d81eae1b3300ff91212ddc8a41930ed1a7486fde8b1b7f572568"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"path": "references/signing-subjects/api-tag-form.md",
|
|
218
|
+
"role": "api-doc",
|
|
219
|
+
"size": 2381,
|
|
220
|
+
"sha256": "0aebbcf8699bd80548860d304aa7f14a6230132007c664c317044f83071dbb80"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"path": "references/template-selector/api-contract-type-tree.md",
|
|
224
|
+
"role": "api-doc",
|
|
225
|
+
"size": 3144,
|
|
226
|
+
"sha256": "8302cdc48d914ffe894dfd3e297085155b9a8bbace4a1c13a9ba318d412e6e71"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"path": "references/template-selector/api-template-detail.md",
|
|
230
|
+
"role": "api-doc",
|
|
231
|
+
"size": 4220,
|
|
232
|
+
"sha256": "ce87bf4f033f1f61ac71e9dcc25d993d62fc9b26fea7857e51675bbf5b0ab252"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"path": "references/template-selector/api-template-list.md",
|
|
236
|
+
"role": "api-doc",
|
|
237
|
+
"size": 5063,
|
|
238
|
+
"sha256": "213e147e8cf8047998b35547d569257476d68f9dc6a9d3b6139f358607e9f853"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"path": "references/template-selector/api-template-tree-list.md",
|
|
242
|
+
"role": "api-doc",
|
|
243
|
+
"size": 2990,
|
|
244
|
+
"sha256": "4346009b9afa272ab014958af17d7c8ac2b3be8b1eb6b4034059d8fc2c51bb90"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"path": "tests/test-plan.md",
|
|
248
|
+
"role": "test-plan",
|
|
249
|
+
"size": 1856,
|
|
250
|
+
"sha256": "a641aac5dc7610b8137604abbf6a4c1ea15a6928f0c133799c37ba533566d992"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"notes": [
|
|
254
|
+
"只记录源资料指纹和转换摘要,不保存 Cookie、Token 或大段源正文。",
|
|
255
|
+
"源资料内部存在状态冲突:SKILL.md 标注 CM-005~CM-015 多数可用,feature-map.json 将 CM-005~CM-015 列入 not_released;实现以接口文档完整可读为准。",
|
|
256
|
+
"企业资信 CM-018 的三个子文档(api-credit-info.md、api-enterprise-change.md、api-monitor-config.md)在源资料中不存在,对应能力已列入 withheldOperations。",
|
|
257
|
+
"撤回/退回接口源资料只提及、未给出路径与参数,已列入 withheldOperations。"
|
|
258
|
+
]
|
|
259
|
+
}
|
|
@@ -11,13 +11,14 @@ agent_created: true
|
|
|
11
11
|
requires:
|
|
12
12
|
bins: ["weaver-work-cli"]
|
|
13
13
|
dependencies:
|
|
14
|
-
- weaver-e10-
|
|
14
|
+
- weaver-e10-shared
|
|
15
15
|
cliHelp: "weaver-work-cli jiuchuanhui --help"
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON
|
|
18
|
+
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须调用宿主提供的提问/确认弹框,向用户说明必须补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行)及补齐计划,并把下面两条待执行命令原样完整展示在确认信息中;Agent 不能在未确认时自行安装。用户明确确认后,Agent 必须直接代为按顺序执行且每条仅执行一次,不得要求或引导用户手动执行:① 缺 CLI 时执行 `npm install -g weaver-work-cli`;② 再执行 `weaver-work-cli skills install shared --target-dir <SKILLS_ROOT>` 装回共享 skill,`<SKILLS_ROOT>` 取本 SKILL.md 所在目录的上一级绝对目录(即与本技能同级的 skills 根目录),不要省略 `--target-dir`——省略会装进默认目录,导致本技能依然读不到共享规则。命令均成功后重新读取共享规则;仍读不到就停止并把结果报告用户,不得凭猜测继续。**
|
|
19
|
+
**`--is-connector` 判据**:用户明确使用连接器、或上下文要求用连接器完成任务 → 传 `true`;本次任务或上下文直接选择单独技能 → 不传;用户没有明确说明时,按**正在运行的这份 Skill 是哪一级**定——**用户级(条目标 `(user)`)不传,连接器级(标 `(connector)`)传**(同名 Skill 只会运行用户级那一份)。传 `true` 时不要再写 `--profile` / `--base-url`。完整规则见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md)。
|
|
19
20
|
|
|
20
|
-
认证和登录态只能按共享规则通过 `weaver-work-cli auth ...`
|
|
21
|
+
认证和登录态只能按共享规则通过 `weaver-work-cli auth ...` 命令判断;请求头三件套由 CLI 统一注入(唯一权威声明见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md) 的「请求头契约」章节),业务调用方不得覆盖,也不得在业务 JSON 中传入凭证类字段。禁止直接读取、列出、打印或解析用户主目录下的 `.e10-cli`、auth、config 或 Keychain 数据。
|
|
21
22
|
所有命令通过 `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、字段和风险等级的合约来源。
|
|
22
23
|
命令示例、提示词和临时说明必须同时兼容 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 写法。
|
|
23
24
|
涉及附件、图片、本地文件、远程 URL 文件或文件解析的操作,执行前必须提醒用户:文件内容可能被上传到 E10 九氚汇、文件服务或解析服务,并可能进入当前大模型上下文用于理解和处理;必须等待用户明确确认后才继续。
|
|
@@ -26,15 +27,8 @@ cliHelp: "weaver-work-cli jiuchuanhui --help"
|
|
|
26
27
|
|
|
27
28
|
## 认证与请求头契约
|
|
28
29
|
|
|
29
|
-
登录与会话由
|
|
30
|
+
登录与会话由 `weaver-e10-shared` 共享规则和 `weaver-work-cli auth ...` 命令体系统一托管。业务 Skill 不自建登录流程,不索取、打印或转存任何凭证。
|
|
30
31
|
|
|
31
|
-
CLI 发往 E10 的每个请求都自动携带以下三项用户信息参数,**缺一不可**(业务入参里不要传这些字段,也不要手工拼装请求头):
|
|
32
|
-
|
|
33
|
-
```text
|
|
34
|
-
Cookie: <登录返回的完整原始 Cookie 串,原样透传,禁止裁剪/去重/改写>
|
|
35
|
-
eteamsid: <登录返回的 ETEAMSID>
|
|
36
|
-
User-Agent: AgentType=<agentType>,IsAgent=true
|
|
37
|
-
```
|
|
38
32
|
|
|
39
33
|
## 启动与缓存(MUST)
|
|
40
34
|
|
|
@@ -15,8 +15,8 @@ cliHelp: "weaver-work-cli ehr --help"
|
|
|
15
15
|
|
|
16
16
|
# 泛微聚才林人事云
|
|
17
17
|
|
|
18
|
-
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON
|
|
19
|
-
|
|
18
|
+
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须调用宿主提供的提问/确认弹框,向用户说明必须补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行)及补齐计划,并把下面两条待执行命令原样完整展示在确认信息中;Agent 不能在未确认时自行安装。用户明确确认后,Agent 必须直接代为按顺序执行且每条仅执行一次,不得要求或引导用户手动执行:① 缺 CLI 时执行 `npm install -g weaver-work-cli`;② 再执行 `weaver-work-cli skills install shared --target-dir <SKILLS_ROOT>` 装回共享 skill,`<SKILLS_ROOT>` 取本 SKILL.md 所在目录的上一级绝对目录(即与本技能同级的 skills 根目录),不要省略 `--target-dir`——省略会装进默认目录,导致本技能依然读不到共享规则。命令均成功后重新读取共享规则;仍读不到就停止并把结果报告用户,不得凭猜测继续。**
|
|
19
|
+
**`--is-connector` 判据**:用户明确使用连接器、或上下文要求用连接器完成任务 → 传 `true`;本次任务或上下文直接选择单独技能 → 不传;用户没有明确说明时,按**正在运行的这份 Skill 是哪一级**定——**用户级(条目标 `(user)`)不传,连接器级(标 `(connector)`)传**(同名 Skill 只会运行用户级那一份)。传 `true` 时不要再写 `--profile` / `--base-url`。完整规则见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md)。
|
|
20
20
|
|
|
21
21
|
本技能覆盖聚才林业务域:**人事档案(hr)**、**出勤管理(attend)**、**薪酬管理(salary)**、**招聘(recruit,读 + 写)**。招聘写操作走 prepare→apply 确认协议;撤销类写操作不实现,原因见 [`references/safety-boundaries.md`](references/safety-boundaries.md)。
|
|
22
22
|
|
|
@@ -96,7 +96,8 @@ weaver-work-cli --json ehr run ehr.attend.summary.get --input-json '{"beginDate"
|
|
|
96
96
|
macOS/Linux(bash/zsh):
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
printf '%s
|
|
99
|
+
printf '%s
|
|
100
|
+
' '{"beginDate":"2026-03-01","endDate":"2026-03-31"}' | weaver-work-cli --json ehr run ehr.attend.summary.get --input -
|
|
100
101
|
```
|
|
101
102
|
|
|
102
103
|
复杂 JSON 建议保存为 UTF-8 文件后按平台传给 `--input <file>`。
|
|
@@ -11,11 +11,12 @@ agent_created: true
|
|
|
11
11
|
requires:
|
|
12
12
|
bins: ["weaver-work-cli"]
|
|
13
13
|
dependencies:
|
|
14
|
-
- weaver-e10-
|
|
14
|
+
- weaver-e10-shared
|
|
15
15
|
cliHelp: "weaver-work-cli mail --help"
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON
|
|
18
|
+
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须调用宿主提供的提问/确认弹框,向用户说明必须补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行)及补齐计划,并把下面两条待执行命令原样完整展示在确认信息中;Agent 不能在未确认时自行安装。用户明确确认后,Agent 必须直接代为按顺序执行且每条仅执行一次,不得要求或引导用户手动执行:① 缺 CLI 时执行 `npm install -g weaver-work-cli`;② 再执行 `weaver-work-cli skills install shared --target-dir <SKILLS_ROOT>` 装回共享 skill,`<SKILLS_ROOT>` 取本 SKILL.md 所在目录的上一级绝对目录(即与本技能同级的 skills 根目录),不要省略 `--target-dir`——省略会装进默认目录,导致本技能依然读不到共享规则。命令均成功后重新读取共享规则;仍读不到就停止并把结果报告用户,不得凭猜测继续。**
|
|
19
|
+
**`--is-connector` 判据**:用户明确使用连接器、或上下文要求用连接器完成任务 → 传 `true`;本次任务或上下文直接选择单独技能 → 不传;用户没有明确说明时,按**正在运行的这份 Skill 是哪一级**定——**用户级(条目标 `(user)`)不传,连接器级(标 `(connector)`)传**(同名 Skill 只会运行用户级那一份)。传 `true` 时不要再写 `--profile` / `--base-url`。完整规则见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md)。
|
|
19
20
|
|
|
20
21
|
认证和登录态只能按共享规则通过 `weaver-work-cli auth ...` 命令判断;禁止直接读取、列出、打印或解析用户主目录下的旧 `.e10-cli`、auth、config 或 Keychain 数据。
|
|
21
22
|
所有命令通过 `weaver-work-cli --json mail run <operation>` 执行:简单 JSON 优先传 `--input-json '<json>'`,复杂或多行 JSON 先写入 UTF-8 文件再传 `--input <path>`,只有确认当前 shell 能稳定传管道时才使用 `--input -`。调用前先按需读取 references 下对应的文件,查参数结构,不要猜字段;**references 是第一信息源**,`weaver-work-cli mail schema` 是 operation、字段和风险等级的合约来源。
|
|
@@ -26,15 +27,7 @@ cliHelp: "weaver-work-cli mail --help"
|
|
|
26
27
|
|
|
27
28
|
## 认证与请求头契约
|
|
28
29
|
|
|
29
|
-
登录与会话由
|
|
30
|
-
|
|
31
|
-
CLI 发往 E10 的每个请求都自动携带以下三项用户信息参数,**缺一不可**(业务入参里不要传这些字段,也不要手工拼装请求头):
|
|
32
|
-
|
|
33
|
-
```text
|
|
34
|
-
Cookie: <登录返回的完整原始 Cookie 串,原样透传,禁止裁剪/去重/改写>
|
|
35
|
-
eteamsid: <登录返回的 ETEAMSID>
|
|
36
|
-
User-Agent: AgentType=<agentType>,IsAgent=true
|
|
37
|
-
```
|
|
30
|
+
登录与会话由 `weaver-e10-shared` 共享规则和 `weaver-work-cli auth ...` 命令体系统一托管。业务 Skill 不自建登录流程,不索取、打印或转存任何凭证。
|
|
38
31
|
|
|
39
32
|
## 路由优先级(先判断是不是 E10 邮件,再选 operation)
|
|
40
33
|
|