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,399 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weaver-setting-encrypt
|
|
3
|
+
description: "对话式修改 weapp 后台\"文件设置 → 加解密设置\"页面的全部 8 个子字段(加解密功能开关、 第三方加解密软件、软件地址、加解密场景、加密/未加密 × 上传/下载 4 个文件处理字段)。 通过自然语言 / `setting-encrypt set --item key=value` 即可完成读取全量 → modify(保留原值)→ diff 让用户确认 → POST 落库。查询优先使用 `GET /api/file/thirdPlugEncDec/config`,旧版本 404 时兼容 `POST /api/file/tenant/setting`;保存使用 `POST /api/file/tenant/setting/save`。Use for 加解密、加密场景、华途、天锐绿盾、亿赛通、文件设置加解密、 <your-e10-domain>/info/fileSet/encryption."
|
|
4
|
+
license: Proprietary
|
|
5
|
+
compatibility: 泛微E10采知连配套使用,内部可自由使用与修改,禁止对外分发
|
|
6
|
+
metadata:
|
|
7
|
+
maintainer: unknown
|
|
8
|
+
type: capability
|
|
9
|
+
version: 1.1.9
|
|
10
|
+
updated: 2026-09-02
|
|
11
|
+
tags: [加解密, 加密场景, 华途, 天锐绿盾, 亿赛通, 文件设置加解密]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# weaver-setting-encrypt
|
|
15
|
+
|
|
16
|
+
> 版本 1.1.9:修正第三方软件名称到后端编码的转换,亿赛通提交为 `est`;同时兼容旧版本查询接口。
|
|
17
|
+
|
|
18
|
+
让"文件设置 → 加解密设置"页面**用对话就能改**。背后调两条 HTTP 接口:
|
|
19
|
+
- `GET /api/file/thirdPlugEncDec/config`(新版本专用端点,读完整 `EncryptionSettings`)
|
|
20
|
+
- 兼容旧版本:专用端点返回 404 时,改用 `POST /api/file/tenant/setting` 读取其
|
|
21
|
+
`data.encryptionSettings`,该请求仅查询,不保存配置
|
|
22
|
+
- `POST /api/file/tenant/setting/save`(保存,**EncryptionSettings 整对象 toString 存 JSON**)
|
|
23
|
+
|
|
24
|
+
修改前先 diff,**写操作必走对话确认**;CLI 走 GET 拉整对象 → merge 子字段 → 整对象 POST,
|
|
25
|
+
未指定子字段原样保留。
|
|
26
|
+
|
|
27
|
+
## 前置依赖
|
|
28
|
+
|
|
29
|
+
### 认证前置(必须)
|
|
30
|
+
|
|
31
|
+
本模块通过 CLI 托管的认证获取凭证(base_url + Cookie + eteamsid + User-Agent),凭证契约见共享规则 [`../../weaver-e10-shared/SKILL.md`](../../weaver-e10-shared/SKILL.md),不依赖手动配置文件,Agent 不得自己读取或输出凭证。
|
|
32
|
+
|
|
33
|
+
**使用前必须确保**:
|
|
34
|
+
1. CLI 已安装:`weaver-work-cli --version` 能正常输出版本号
|
|
35
|
+
2. 已完成登录:`weaver-work-cli auth status` 显示已登录
|
|
36
|
+
|
|
37
|
+
**首次登录**:
|
|
38
|
+
```text
|
|
39
|
+
# OAuth2.0 浏览器授权(推荐)
|
|
40
|
+
weaver-work-cli auth login
|
|
41
|
+
|
|
42
|
+
# 或手动写入 ETEAMSID(从浏览器 DevTools 复制)
|
|
43
|
+
weaver-work-cli auth set --eteamsid "PCACCOUNT_xxx"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**凭证过期处理**:操作返回认证错误时,提示用户通过 `weaver-work-cli auth login` 或 `weaver-work-cli auth set` 重新登录。
|
|
47
|
+
|
|
48
|
+
## When to use
|
|
49
|
+
|
|
50
|
+
- 用户说"把加解密功能打开""加解密软件地址改成 xxx""场景切到上传下载均不处理"
|
|
51
|
+
"加密文件上传=1 加密"等
|
|
52
|
+
- 改 weapp 后台的"加解密设置"页(`<your-e10-domain>/info/fileSet/encryption`)
|
|
53
|
+
- 调试 eteams-file 后台加解密功能(华途 / 天锐绿盾 / 亿赛通)
|
|
54
|
+
|
|
55
|
+
**不适用**:附件设置(见 `weaver-setting-attach`)、存储设置、备份设置、文件采集设置、
|
|
56
|
+
预览编辑设置、文件深度清理、页面设置——这 6 个 Tab 走的接口各不相同,**不在本 skill 范围**。
|
|
57
|
+
|
|
58
|
+
## 命令清单
|
|
59
|
+
|
|
60
|
+
CLI 软链名 `setting-encrypt`(用全名避开与 `weaver-setting-attach` 的 `setting-attach` 冲突)。
|
|
61
|
+
|
|
62
|
+
| 命令 | 作用 |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `setting-encrypt show` | 拉加解密配置并以表格打印(兼容旧版本查询端点) |
|
|
65
|
+
| `setting-encrypt set --item <key=value> [--item ...] [--dry-run] [--yes]` | GET → merge 子字段 → diff → 询问 → POST |
|
|
66
|
+
| `setting-encrypt diff --item ...` | 只打印解析后的子字段,不调任何接口 |
|
|
67
|
+
|
|
68
|
+
## 8 个支持字段(扁平 key)
|
|
69
|
+
|
|
70
|
+
CLI 接受三种写法:snake-case 别名 / 中英别名 / DTO 字段名。完整别名表见
|
|
71
|
+
[setting-encrypt-field-map.md](setting-encrypt-field-map.md)。
|
|
72
|
+
|
|
73
|
+
> **历史说明**:早期版本支持 13 个字段(含加密机分支:`encryptMachineType` /
|
|
74
|
+
> `encryptIp` / `encryptPort` / `encryptAppID` / `encryptAppKey`)。前端下拉已移除
|
|
75
|
+
> 加密机选项(只剩华途 / 天锐绿盾 / 亿赛通 3 个),后端 `EncryptionSettings.toString()`
|
|
76
|
+
> 也漏了 `encryptMachineType` 输出,这 5 个字段已废弃。CLI 一并移除。
|
|
77
|
+
|
|
78
|
+
| 别名(key) | DTO 字段 | 类型 | 备注 | 依赖 |
|
|
79
|
+
|---|---|---|---|---|
|
|
80
|
+
| `open-encrypt` | `openEncryptFunction` | bool | 加解密功能开关 | — |
|
|
81
|
+
| `encrypt-plugs` | `encryptPlugs` | enum | 后端编码:`est`=亿赛通、`tipray`=天锐绿盾、`vtext`=华途(对接方式/限制见 [setting-encrypt-third-party-plugins.md](setting-encrypt-third-party-plugins.md)) | — |
|
|
82
|
+
| `encrypt-url` | `encryptUrl` | str (URL) | 软件地址 | — |
|
|
83
|
+
| `encrypt-scene` | `encryptScene` | enum | 场景:`uploadAndDownloadEncrypt` / `uploadAndDownloadNotProcessed` / `custom` | — |
|
|
84
|
+
| `encrypt-file-upload` | `encryptFileUpload` | enum (str) | 加密文件-上传:`0`=解密 `1`=加密 其它=不处理 | `encrypt-scene=custom` |
|
|
85
|
+
| `encrypt-file-download` | `encryptFileDownload` | enum (str) | 加密文件-下载:同上 | `encrypt-scene=custom` |
|
|
86
|
+
| `unencrypted-file-upload` | `unencryptedFileUpload` | enum (str) | 未加密文件-上传:同上 | `encrypt-scene=custom` |
|
|
87
|
+
| `unencrypted-file-download` | `unencryptedFileDownload` | enum (str) | 未加密文件-下载:同上 | `encrypt-scene=custom` |
|
|
88
|
+
|
|
89
|
+
## 硬性门禁
|
|
90
|
+
|
|
91
|
+
1. **写操作必须先 diff**——`set` 不带 `--dry-run` 也不带 `--yes` 时,把 diff 打到
|
|
92
|
+
stdout 并等 stdin 输入 `y` 才发 POST;EOF / `n` / 非 `y` 视为取消。
|
|
93
|
+
**对话式 agent 流程**:即使 CLI 已带 `--yes`,**仍必须先在对话里走
|
|
94
|
+
"改前值 / 改后影响 / 明确询问" 三步**(见对话式规则 3),得到
|
|
95
|
+
"改 / 确认 / 好的" 之类回复后才调 CLI。
|
|
96
|
+
2. **`prod` 必加 --yes**——生产环境操作时必须同时带 `--yes` 才会发 POST。
|
|
97
|
+
3. **整对象 POST,子字段 merge**——`encryptionSettings` 是 DTO 嵌套对象,后端
|
|
98
|
+
`EncryptionSettings.java:49` 的 `updateSysFileItem` 接收**整对象**并存到 `param`
|
|
99
|
+
字段前 `toString()`(整对象变 JSON 串)。CLI 必须 GET 拉整对象 → 改子字段 merge
|
|
100
|
+
进 `current` → **整对象 toString 一起 POST**。**不能只 POST 改了的子字段**
|
|
101
|
+
(后端不支持增量,会覆盖整对象);也不能"只 diff 几个 key"就 POST(merge 时
|
|
102
|
+
其他子字段会丢)。
|
|
103
|
+
4. **保存后再次读取校验**——POST 完按同样的端点兼容逻辑重新读取并比对。
|
|
104
|
+
5. **不写日志到 home 之外**——所有凭证 / 日志只落在
|
|
105
|
+
`~/.minimax/skills/weaver-setting-encrypt/` 下。
|
|
106
|
+
6. **未指定子字段保留**——CLI 走 GET 拉整对象再 merge;只改指定子字段,其他保留。
|
|
107
|
+
7. **license 检查**——没 `ENC_DEC` license 时 GET 返回的 `openEncryptFunction=false`
|
|
108
|
+
且字段大多为空(前后端都可能拒);CLI 给出 warning 但仍允许 POST(看后端是否真拒)。
|
|
109
|
+
|
|
110
|
+
### 后端接口执行规则
|
|
111
|
+
|
|
112
|
+
加解密设置必须由 `scripts/encrypt_setting.py` 调用 `encrypt_api.py` 完成,禁止通过浏览器表单或浏览器自动化写入。浏览器仅可参与 `weaver-work-cli auth login` 登录授权。
|
|
113
|
+
|
|
114
|
+
- 查询接口优先是 `GET /api/file/thirdPlugEncDec/config`;旧版本返回 404 时,使用
|
|
115
|
+
`POST /api/file/tenant/setting` 读取 `data.encryptionSettings`。保存接口是
|
|
116
|
+
`POST /api/file/tenant/setting/save`。
|
|
117
|
+
- 保存前必须 GET 读取完整的 8 字段对象,合并目标字段后整体保存,不能只提交变更字段。
|
|
118
|
+
- 保存后必须重新 GET,确认 `encryptPlugs`、`encryptUrl`、`encryptScene` 与目标值一致;否则明确报告“未保存成功”。
|
|
119
|
+
- 下拉列表出现“亿赛通”仅说明前端提供该选项,不代表当前租户已经保存亿赛通;接口回读为空才是未配置。
|
|
120
|
+
- `[http://12332](http://12332).com` 不是无歧义的 URL。应先确认用户是否要写入 `http://12332.com`,不能由 agent 静默猜测。
|
|
121
|
+
- 用户明确表达“设置为 X”是修改意图;在提交外部写入前仍需按对话确认规则取得明确确认。确认一旦收到,应继续当前待保存流程,不要再次结束在“等待确认”。
|
|
122
|
+
|
|
123
|
+
## 对话式交互规则
|
|
124
|
+
|
|
125
|
+
> 这些是 **agent 在对话中使用本 skill 时**的硬约束,跟底层 CLI 脚本无关。命令行直接跑
|
|
126
|
+
> `setting-encrypt` 可以绕过,但任何经由本 skill 的 agent 流程都必须遵守。
|
|
127
|
+
|
|
128
|
+
1. **操作前必查登录态**
|
|
129
|
+
每次执行业务操作前,确认 CLI 已完成登录:
|
|
130
|
+
- 若 `weaver-work-cli auth status` 显示未登录,提示用户执行 `weaver-work-cli auth login` 或 `weaver-work-cli auth set` 完成登录
|
|
131
|
+
- 登录完成后**立刻**继续用户原本的请求,不要让用户再敲一次命令
|
|
132
|
+
|
|
133
|
+
2. **查询要简洁**(`show` / 读设置时的输出格式)
|
|
134
|
+
- **只返回三样**:设置项名(中文别名或 DTO 字段名)、当前值、**当前租户名**
|
|
135
|
+
- **不要**返回:bool 三态展开、enum 解释、字段语义说明、风险提示、
|
|
136
|
+
"建议/可以这么做" 等附加内容 —— 这些只在用户追问时再说
|
|
137
|
+
- 多项查询时一行一项,格式固定:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
<租户名> · <设置项名>:<当前值>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
3. **修改前必须三步问清**
|
|
144
|
+
- 步骤 a — **改前的值**:说清楚这一项当前是什么(从 GET 里取,不要瞎猜)
|
|
145
|
+
- 步骤 b — **改后影响**:说清楚改完会影响什么业务、放行/禁止哪些场景、
|
|
146
|
+
触及哪些用户,以及是否会**间接影响其他字段**(如 `encrypt-scene=custom`
|
|
147
|
+
后 4 个文件处理字段才生效)
|
|
148
|
+
- 步骤 c — **明确询问**:用一句话问"要改成 X 吗?",**得到用户肯定回复
|
|
149
|
+
(y / 改 / 确认 / 好的 之类)才发 POST**,即使 CLI 已带 `--yes` 也不许跳过
|
|
150
|
+
- 三步可以一次消息里说全,但步骤 c 的问句**必须独立成行**,不能藏在
|
|
151
|
+
长段落里让人找不到
|
|
152
|
+
|
|
153
|
+
4. **话术面向客户(非开发)**
|
|
154
|
+
本 skill 的对话对象是**客户/业务人员**,不是开发。所有输出话术:
|
|
155
|
+
- **禁止出现**:CLI key(`open-encrypt`、`encrypt-plugs` 等)、DTO 字段名
|
|
156
|
+
(`openEncryptFunction`、`encryptPlugs` 等)、布尔字面值(`true` / `false`)、
|
|
157
|
+
HTTP 术语(POST / GET / 200 / 401)、内部流程术语("步骤 a / 步骤 b / 步骤 c"、
|
|
158
|
+
"diff"、"回 y / 改"、"落库"、"diff 让用户确认")
|
|
159
|
+
- **必须使用**:业务中文名("加解密功能"、"加解密软件"、"加解密场景")、
|
|
160
|
+
业务状态("已开启 / 已关闭")、自然语言确认("要打开吗?回 改 / 确认 / 好的")
|
|
161
|
+
- 需要看技术细节时(用户主动问"用的什么字段" / "接口是啥" / "为什么改不了"),
|
|
162
|
+
**只在该轮回应**展开,平时一律隐藏
|
|
163
|
+
- 身份信息隐藏 `userId` / `tenantKey` 这类内部 ID,只说"当前租户"
|
|
164
|
+
|
|
165
|
+
5. **做不到时正确引导**
|
|
166
|
+
客户要改的项**当前工具/接口改不了**时,**不要**静默截断、**不要**发注定失败
|
|
167
|
+
的请求。常见场景:
|
|
168
|
+
- **license 没开**:租户没 `ENC_DEC` license 时,GET 返回的 `openEncryptFunction=false`
|
|
169
|
+
且大部分字段为空,POST 也会被后端拒。引导客户去找管理员开 license,
|
|
170
|
+
或者先去 eteams 后台"租户平台 → 租户详情 → 加解密授权"申请
|
|
171
|
+
- **字段只读**:某些字段受权限管控(当前登录账号没写权限)。让客户找管理员授权
|
|
172
|
+
- **字段间依赖**:`encrypt-file-upload` 等 4 个文件处理字段要
|
|
173
|
+
`encrypt-scene=custom` 才生效(其他依赖关系:3 个加解密软件分支的配置项完全相同,
|
|
174
|
+
不再有"加密机分支"额外配 IP/端口/appID/appKey 的差异)
|
|
175
|
+
- **远程服务/插件对接问题**:客户报"加解密不生效",但 E10 后台配置本身没问题——
|
|
176
|
+
这是**远程加解密服务不通**(华途/亿赛通)或**天锐绿盾本地没装**导致,**不是
|
|
177
|
+
改 E10 后台设置能解决的**。让客户找对应厂商/运维:
|
|
178
|
+
- 华途对接出问题 → 找华途侧开发 / 客户运维
|
|
179
|
+
- 亿赛通对接出问题 → 找亿赛通侧开发 / 客户运维
|
|
180
|
+
- 天锐绿盾没生效 → 检查应用服务器本地是否安装(文档:见 setting-encrypt-third-party-plugins.md 一节)
|
|
181
|
+
- 总部开发**只负责 E10 后台配置项,不管远程服务**;不要试图通过改 E10 设置来"修"
|
|
182
|
+
- **集成官方支持之外的插件**:走 E10 二开流程(由总部开发评估接入)
|
|
183
|
+
- **后端返回致命错误**(已知):不重试,直接告诉客户失败原因 + 正确路径
|
|
184
|
+
- 话术模板:
|
|
185
|
+
"这里改不了:<原因>。需要去<正确路径>那里先做<前置操作>。
|
|
186
|
+
在那边保存后,回到这里再让我帮你改加解密设置里的对应项,
|
|
187
|
+
就能改到你想要的值了。"
|
|
188
|
+
|
|
189
|
+
## 宿主
|
|
190
|
+
|
|
191
|
+
CLI 入口:
|
|
192
|
+
|
|
193
|
+
```text
|
|
194
|
+
python3 scripts/encrypt_setting.py <cmd> [args]
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## 与 weaver-setting-attach 的关系
|
|
199
|
+
|
|
200
|
+
两个 skill **互相独立**,可在同一台机器共存:
|
|
201
|
+
|
|
202
|
+
| | weaver-setting-attach | weaver-setting-encrypt |
|
|
203
|
+
|---|---|---|
|
|
204
|
+
| 改的页面 | 文件设置 → 附件设置 | 文件设置 → 加解密设置 |
|
|
205
|
+
| CLI 软链 | `setting-attach` | `setting-encrypt` |
|
|
206
|
+
| 共享 | 后端 `POST /api/file/tenant/setting/save` 共用一份;凭证统一通过 CLI 托管的认证获取 |
|
|
207
|
+
| 不同 | encrypt 优先用 `thirdPlugEncDec/config`,旧版本兼容 `tenant/setting`;POST 模式不同(attach 走"逐字段 update",encrypt 走"整对象 toString") |
|
|
208
|
+
|
|
209
|
+
## 版本
|
|
210
|
+
|
|
211
|
+
- 0.1.0(2026-08-06)首次创建。覆盖 eteams-file 截图"加解密设置" Tab 的 13 字段。
|
|
212
|
+
- 0.2.0(2026-08-06)优化:对话式规则完整内联(去除外部仓库依赖)、字段表加"依赖"列、
|
|
213
|
+
软链名统一为 `setting-encrypt`、门禁 4 表述修正、删除开发内部决策泄露、版本号规则确立。
|
|
214
|
+
- 0.2.1(2026-08-06)业务知识沉淀:新建 `setting-encrypt-third-party-plugins.md`,写入 3 个官方
|
|
215
|
+
插件对接步骤 / 限制 / 二开联系人;修正 `encryptPlugs` 常见值("三未信安"→"天锐绿盾 / 华途");
|
|
216
|
+
对话式规则 6 增加"远程服务/插件对接问题"与"集成官方支持之外插件"两类引导。
|
|
217
|
+
- 1.0.0(2026-08-09)字段大删减:前端 UI 下拉已移除加密机(`encryptMachine`)选项,
|
|
218
|
+
后端 `EncryptionSettings.toString()` 也漏了 `encryptMachineType` 输出。删除 5 个
|
|
219
|
+
加密机专属字段(`encrypt-machine-type` / `encrypt-ip` / `encrypt-port` / `encrypt-app-id` /
|
|
220
|
+
`encrypt-app-key`),CLI 字段表从 13 缩到 8。`encryptPlugs` 现在固定为华途 / 天锐绿盾 /
|
|
221
|
+
亿赛通 3 个值;3 个软件分支的配置项完全相同,不再有"加密机分支"差异。
|
|
222
|
+
- 1.1.7(2026-09-02)明确只能通过后端接口执行加解密设置,移除浏览器写入流程,保留未保存状态判定和歧义 URL 处理。
|
|
223
|
+
- 1.1.8(2026-09-02)兼容旧版本部署中 `thirdPlugEncDec/config` 不存在的情况:查询和保存后校验在专用接口 404 时改用 `tenant/setting` 的 `encryptionSettings`。
|
|
224
|
+
|
|
225
|
+
版本号规则 `x.y.z`:
|
|
226
|
+
- **x 升** — 大重构(GET/POST 模式变化、DTO 结构变化、字段大幅增删)
|
|
227
|
+
- **y 升** — 新增字段、新增命令、新增子模块
|
|
228
|
+
- **z 升** — 文案修正、门禁澄清、依赖注补充、不改行为的小修
|
|
229
|
+
# 接口协议
|
|
230
|
+
|
|
231
|
+
## 端点
|
|
232
|
+
|
|
233
|
+
| 操作 | 方法 | URL | 入参 | 出参 |
|
|
234
|
+
|---|---|---|---|---|
|
|
235
|
+
| 拉加解密配置(新版本) | `GET` | `{baseUrl}/api/file/thirdPlugEncDec/config` | (无) | `{code, data: EncryptionSettings}` |
|
|
236
|
+
| 拉加解密配置(旧版本兼容) | `POST` | `{baseUrl}/api/file/tenant/setting` | `{}` | `{code, data: FileSettingDto}`,取 `data.encryptionSettings` |
|
|
237
|
+
| 保存(走通用 setting save) | `POST` | `{baseUrl}/api/file/tenant/setting/save` | `{encryptionSettings: {...}}` | `{code, data: FileSettingDto}` |
|
|
238
|
+
|
|
239
|
+
## 鉴权
|
|
240
|
+
|
|
241
|
+
`Cookie: ETEAMSID=<id>`,与前端一致。
|
|
242
|
+
|
|
243
|
+
## EncryptionSettings 完整字段(8 子字段)
|
|
244
|
+
|
|
245
|
+
> **v1.0.0 (2026-08-09) 字段大删减**:从 13 缩到 8。前端 UI 下拉已移除加密机
|
|
246
|
+
> (`encryptMachine`) 选项,因此删除 `encryptMachineType` / `encryptIp` /
|
|
247
|
+
> `encryptPort` / `encryptAppID` / `encryptAppKey` 5 个加密机专属字段。
|
|
248
|
+
|
|
249
|
+
GET 端点返回的是**扁平 dict**(8 子字段直接平铺);POST 时整个扁平对象
|
|
250
|
+
作为 `encryptionSettings` 字段的值一起发:
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
// GET /api/file/thirdPlugEncDec/config 响应 data:
|
|
254
|
+
{
|
|
255
|
+
"openEncryptFunction": false,
|
|
256
|
+
"encryptPlugs": "",
|
|
257
|
+
"encryptUrl": "",
|
|
258
|
+
"encryptScene": "uploadAndDownloadEncrypt",
|
|
259
|
+
"encryptFileUpload": "",
|
|
260
|
+
"encryptFileDownload": "",
|
|
261
|
+
"unencryptedFileUpload": "",
|
|
262
|
+
"unencryptedFileDownload": ""
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// POST /api/file/tenant/setting/save 请求 body:
|
|
266
|
+
{
|
|
267
|
+
"encryptionSettings": { ← 整个扁平对象作为这个字段的值
|
|
268
|
+
"openEncryptFunction": true,
|
|
269
|
+
"encryptPlugs": "est",
|
|
270
|
+
...
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## POST 注意事项
|
|
276
|
+
|
|
277
|
+
1. **必须传整对象**:后端 `EncryptionSettings.updateSysFileItem` 接收的是
|
|
278
|
+
`FileSettingSaveParam.EncryptionSettings` 整个对象,存到 `param` 字段前
|
|
279
|
+
`toString()`(即整对象变 JSON 字符串存)。**不能只传 changed 子字段**。
|
|
280
|
+
2. **查询端点按部署版本选择**:优先走
|
|
281
|
+
`/api/file/thirdPlugEncDec/config`;若返回 404,则走
|
|
282
|
+
`/api/file/tenant/setting` 并读取 `data.encryptionSettings`。后者是旧版本
|
|
283
|
+
沿用的通用文件设置查询接口,查询请求不会保存配置。
|
|
284
|
+
3. **未指定子字段保留**:CLI 走 GET → merge → 整对象 POST;只改指定子字段。
|
|
285
|
+
前端历史上可能把 URL 分隔符编码为 `17643b38` / `17643f70`,CLI 会在读取和
|
|
286
|
+
校验时还原为普通 URL。
|
|
287
|
+
4. **license 控制**:没 `ENC_DEC` license 时 GET 返回的 `openEncryptFunction=false`,
|
|
288
|
+
且整个对象字段大多为空。
|
|
289
|
+
5. **encryptScene 校验**:后端 `StoThirdPlugEncDecProcess.java:718-722` 对值
|
|
290
|
+
做 `equalsIgnoreCase` 比对;不在 enum 内的值会被忽略(不抛错)。
|
|
291
|
+
6. **4 个文件处理字段仅 encryptScene=custom 时生效**:其它场景下后端用预设
|
|
292
|
+
覆盖这 4 个字段(实际行为见 `StoThirdPlugEncDecProcess.java:755-770`)。
|
|
293
|
+
|
|
294
|
+
## 后端实现位置
|
|
295
|
+
|
|
296
|
+
- Controller:`eteams-file/src/main/java/com/weaver/teams/file/e10/mvc/web/thirdplugencdec/FileThirdPlugEncDecController.java`
|
|
297
|
+
- 设置项注册:`eteams-file/src/main/java/com/weaver/teams/file/e10/manager/set/impl/EncryptionSettings.java`
|
|
298
|
+
- 业务逻辑:`eteams-file/src/main/java/com/weaver/teams/file/e10/manager/storage/chain/process/StoThirdPlugEncDecProcess.java`
|
|
299
|
+
- DTO:`eteams-file/src/main/java/com/weaver/teams/file/e10/dto/BaseSetDto.java`(嵌套类 `EncryptionSettings`)
|
|
300
|
+
- 前端 UI:`weapp-file/src/components/pc/FileSet/components/Encryption/index.tsx`
|
|
301
|
+
# 字段对照表(8 个子字段)
|
|
302
|
+
|
|
303
|
+
> 对应 eteams-file 后端 `BaseSetDto.EncryptionSettings`(嵌套类)。
|
|
304
|
+
> 整对象 toString() 存到 `FileObjTenantPermission.param` 字段。
|
|
305
|
+
> CLI 接受 snake-case 别名 / 中文别名 / DTO 字段名(驼峰)。
|
|
306
|
+
|
|
307
|
+
> **数据结构说明**:后端 GET `/api/file/thirdPlugEncDec/config` 返回的是**扁平的
|
|
308
|
+
> EncryptionSettings 字典**(8 个子字段直接平铺,没有外层 `encryptionSettings` 包装)。
|
|
309
|
+
> CLI 内部统一用扁平 dict;POST 时整个扁平对象作为 `encryptionSettings` 字段的值
|
|
310
|
+
> 一起发出去(参考 [setting-encrypt-api.md](setting-encrypt-api.md))。
|
|
311
|
+
|
|
312
|
+
> **v1.0.0 (2026-08-09) 字段大删减**:从 13 缩到 8。前端 UI 下拉已移除加密机
|
|
313
|
+
> (`encryptMachine`) 选项,后端 `EncryptionSettings.toString()` 也漏了
|
|
314
|
+
> `encryptMachineType` 输出,因此删除 5 个加密机专属字段
|
|
315
|
+
> (`encrypt-machine-type` / `encrypt-ip` / `encrypt-port` / `encrypt-app-id` /
|
|
316
|
+
> `encrypt-app-key`)。3 个加解密软件分支(华途 / 天锐绿盾 / 亿赛通)的配置项
|
|
317
|
+
> **完全相同**,不再有"加密机分支"差异。
|
|
318
|
+
|
|
319
|
+
## 1. 加解密功能开关
|
|
320
|
+
|
|
321
|
+
- **CLI key**:`open-encrypt`
|
|
322
|
+
- **中文**:`加解密功能`
|
|
323
|
+
- **DTO 字段**:`openEncryptFunction`
|
|
324
|
+
- **类型**:Boolean
|
|
325
|
+
- **示例**:`--item open-encrypt=true`
|
|
326
|
+
|
|
327
|
+
## 2. 第三方加解密软件
|
|
328
|
+
|
|
329
|
+
- **CLI key**:`encrypt-plugs`
|
|
330
|
+
- **中文**:`第三方加解密软件` / `加解密软件`
|
|
331
|
+
- **DTO 字段**:`encryptPlugs`
|
|
332
|
+
- **类型**:enum(后端内部编码)
|
|
333
|
+
- **后端值**:`est`=亿赛通 / `tipray`=天锐绿盾 / `vtext`=华途
|
|
334
|
+
- **输入别名**:CLI 也接受 `亿赛通` / `天锐绿盾` / `华途`,提交前会转换为上述编码
|
|
335
|
+
- **对接/限制**:
|
|
336
|
+
- 详细对接步骤、限制、二开联系人见 [setting-encrypt-third-party-plugins.md](setting-encrypt-third-party-plugins.md)
|
|
337
|
+
- 天锐绿盾**仅支持本地安装**;远程调用方式需走 E10 二开流程
|
|
338
|
+
- 华途/亿赛通都是远程服务,**总部开发不介入远程服务确认**,找客户/厂商侧
|
|
339
|
+
- **示例**:`--item encrypt-plugs=亿赛通`(实际提交 `encryptPlugs=est`)
|
|
340
|
+
|
|
341
|
+
## 3. 软件地址
|
|
342
|
+
|
|
343
|
+
- **CLI key**:`encrypt-url`
|
|
344
|
+
- **中文**:`软件地址` / `动态链接地址`
|
|
345
|
+
- **DTO 字段**:`encryptUrl`
|
|
346
|
+
- **类型**:URL 字符串
|
|
347
|
+
- **说明**:前端可能将 URL 中的 `/` 编码为 `17643b38`、反斜杠编码为 `17643f70`;CLI
|
|
348
|
+
读取和校验时会自动还原,不应把该编码当作地址内容填写。
|
|
349
|
+
- **示例**:`--item encrypt-url=http://<加解密服务IP>:<端口>/sec-server/s/rs/uni`
|
|
350
|
+
|
|
351
|
+
## 4. 加解密场景
|
|
352
|
+
|
|
353
|
+
- **CLI key**:`encrypt-scene`
|
|
354
|
+
- **中文**:`加解密场景` / `场景`
|
|
355
|
+
- **DTO 字段**:`encryptScene`
|
|
356
|
+
- **类型**:enum
|
|
357
|
+
- **值**(前端 `Encryption/index.tsx:122-129` 实际只有 3 个):
|
|
358
|
+
|
|
359
|
+
| 英文 id | 中文 | 含义 |
|
|
360
|
+
|---|---|---|
|
|
361
|
+
| `uploadAndDownloadEncrypt` | 上传解密,下载加密 | 推荐默认 |
|
|
362
|
+
| `uploadAndDownloadNotProcessed` | 上传下载均不处理 | 完全不过加解密软件 |
|
|
363
|
+
| `custom` | 自定义 | 走下面 4 个文件处理字段 |
|
|
364
|
+
|
|
365
|
+
> **截图里看到的第 4 个 radio "上传下载均处理"** —— 前端 data 数组只有 3 个 id,
|
|
366
|
+
> 第 4 个是 UI 展示但实际值走 `custom` + 4 个文件处理字段控制。
|
|
367
|
+
|
|
368
|
+
- **示例**:`--item encrypt-scene=custom` / `--item encrypt-scene=上传下载均不处理`
|
|
369
|
+
|
|
370
|
+
## 5-8. 4 个文件处理字段
|
|
371
|
+
|
|
372
|
+
> 仅当 `encrypt-scene=custom` 时生效。
|
|
373
|
+
> 值含义:`0`=解密 `1`=加密 其它(如 `2`)=不处理
|
|
374
|
+
|
|
375
|
+
| CLI key | 中文 | DTO 字段 | 默认 |
|
|
376
|
+
|---|---|---|---|
|
|
377
|
+
| `encrypt-file-upload` | 加密文件-上传 | `encryptFileUpload` | 加密文件上传时怎么处理 |
|
|
378
|
+
| `encrypt-file-download` | 加密文件-下载 | `encryptFileDownload` | 加密文件下载时怎么处理 |
|
|
379
|
+
| `unencrypted-file-upload` | 未加密文件-上传 | `unencryptedFileUpload` | 未加密文件上传时怎么处理 |
|
|
380
|
+
| `unencrypted-file-download` | 未加密文件-下载 | `unencryptedFileDownload` | 未加密文件下载时怎么处理 |
|
|
381
|
+
|
|
382
|
+
CLI 接受 3 种写法:
|
|
383
|
+
|
|
384
|
+
```text
|
|
385
|
+
--item encrypt-file-upload=1 # 英文数字
|
|
386
|
+
--item encrypt-file-upload=加密 # 中文别名
|
|
387
|
+
--item encrypt-file-upload=不处理 # 中文别名
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
## 逃生口
|
|
391
|
+
|
|
392
|
+
任意字段也支持直接用 DTO 字段名(驼峰)作为 key。**不推荐**:
|
|
393
|
+
|
|
394
|
+
```text
|
|
395
|
+
--item openEncryptFunction=true
|
|
396
|
+
--item encryptPlugs=est
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
逃生口只做 `parse_item` 解析,**不做业务校验**。
|