weaver-work-cli 0.1.7 → 0.1.20
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 +11 -11
- 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 +432 -0
- package/dist/core/state.js +26 -0
- package/dist/internal/e10/auth/commands.js +2 -2
- package/dist/internal/e10/auth/session.js +14 -0
- package/dist/internal/e10/auth/xiaoe.js +116 -51
- package/dist/internal/e10/request-runtime.js +5 -0
- 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 +346 -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 +969 -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 +623 -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/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/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 +6 -3
- package/dist/shortcuts/workflow/operations/form.js +931 -533
- package/dist/shortcuts/workflow/operations/read.js +462 -81
- package/dist/shortcuts/workflow/operations/shared.js +44 -0
- package/dist/shortcuts/workflow/operations/write.js +760 -56
- 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 +2 -2
- package/docs/hrm.md +19 -9
- 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 +2 -2
- package/scripts/package-skill.mjs +33 -20
- 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/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 +216 -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 +136 -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 +118 -0
- package/skills/weaver-e10-caizhilian/references/org-browser.md +104 -0
- package/skills/weaver-e10-caizhilian/references/setting-attach.md +410 -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 +5079 -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 +54 -6
- package/skills/weaver-e10-hrm/references/employee.md +89 -15
- package/skills/weaver-e10-hrm/references/org.md +7 -4
- 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 +166 -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 +36 -25
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +10 -31
- package/skills/weaver-e10-shared/references/json-output-contract.md +20 -11
- 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-wenshuding/SKILL.md +5 -16
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +7 -7
- package/skills/weaver-e10-workflow/SKILL.md +32 -37
- package/skills/weaver-e10-workflow/references/source-manifest.json +40 -77
- package/skills/weaver-e10-workflow/references/workflow-batch.md +90 -29
- package/skills/weaver-e10-workflow/references/workflow-create.md +79 -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 +37 -20
- package/skills/weaver-e10-workflow/references/workflow-share.md +18 -2
- package/skills/weaver-e10-workflow/references/workflow-view.md +4 -4
- package/skills/weaver-e10-yepiaotong/SKILL.md +75 -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-issuing.md +5 -5
- 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 +90 -10
- 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
|
@@ -11,14 +11,14 @@ agent_created: true
|
|
|
11
11
|
requires:
|
|
12
12
|
bins: ["weaver-work-cli"]
|
|
13
13
|
dependencies:
|
|
14
|
-
- weaver-e10-login
|
|
15
14
|
- weaver-e10-shared
|
|
16
15
|
cliHelp: "weaver-work-cli im --help"
|
|
17
16
|
---
|
|
18
17
|
|
|
19
18
|
# 泛微易秒办(im)
|
|
20
19
|
|
|
21
|
-
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON
|
|
20
|
+
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须先提示用户先补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行),并把下面两条待执行命令原样完整展示给用户;Agent 不能自行安装——必须先取得用户明确确认后再执行。用户确认后按顺序执行且仅执行一次:① 缺 CLI 时执行 `npm install -g weaver-work-cli`;② 再执行 `weaver-work-cli skills install shared --target-dir <SKILLS_ROOT>` 装回共享 skill,`<SKILLS_ROOT>` 取本 SKILL.md 所在目录的上一级绝对目录(即与本技能同级的 skills 根目录),不要省略 `--target-dir`——省略会装进默认目录,导致本技能依然读不到共享规则。命令均成功后重新读取共享规则;仍读不到就停止并把结果报告用户,不得凭猜测继续。**
|
|
21
|
+
**`--is-connector` 判据**:用户明确使用连接器、或上下文要求用连接器完成任务 → 传 `true`;本次任务或上下文直接选择单独技能 → 不传;用户没有明确说明时,按**正在运行的这份 Skill 是哪一级**定——**用户级(条目标 `(user)`)不传,连接器级(标 `(connector)`)传**(同名 Skill 只会运行用户级那一份)。传 `true` 时不要再写 `--profile` / `--base-url`。完整规则见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md)。
|
|
22
22
|
|
|
23
23
|
共享规则覆盖命令可用性检查、E10 认证、JSON 输出契约、大结果渲染和高风险写入确认链,本技能不再重复。
|
|
24
24
|
|
|
@@ -26,17 +26,9 @@ cliHelp: "weaver-work-cli im --help"
|
|
|
26
26
|
|
|
27
27
|
## 认证与请求头契约
|
|
28
28
|
|
|
29
|
-
**登录与会话一律由 `weaver-e10-
|
|
29
|
+
**登录与会话一律由 `weaver-e10-shared` 共享规则和 `weaver-work-cli auth ...` 命令体系托管**(小 E 宿主环境优先 `weaver-work-cli auth xiaoe`,其它环境由用户提供自有域名后走 `weaver-work-cli auth login`)。本技能**不自建登录**:禁止扫码/账号密码/自建 OAuth 取 token,禁止使用浏览器自动化登录,也不接触、打印、转存任何认证文件。
|
|
30
30
|
|
|
31
|
-
`weaver-work-cli im` 发往 E10
|
|
32
|
-
|
|
33
|
-
```text
|
|
34
|
-
Cookie: <weaver-e10-login 返回的完整原始 Cookie 串,原样透传,禁止裁剪/去重/改写>
|
|
35
|
-
eteamsid: <weaver-e10-login 返回的 ETEAMSID>
|
|
36
|
-
User-Agent: AgentType=<agentType>,IsAgent=true
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
三项若缺任一,服务端无法识别操作者或会判定登录失效;`weaver-work-cli im` 的每个 operation 都已在请求头中带齐。
|
|
31
|
+
`weaver-work-cli im` 发往 E10 的每个请求都由 CLI 统一注入请求头三件套,业务入参里不要传这些字段,也不要手工拼装请求头;唯一权威声明见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md) 的「请求头契约」章节。每个 operation 都已在请求头中带齐,缺任一服务端都无法识别操作者或会判定登录失效。
|
|
40
32
|
|
|
41
33
|
业务输入只描述业务对象与意图,凭证与请求头由 CLI 托管;需要诊断登录态时只用 `weaver-work-cli auth` / `doctor --e10` 与业务命令返回的 JSON 错误。
|
|
42
34
|
|
|
@@ -2265,7 +2265,7 @@
|
|
|
2265
2265
|
}
|
|
2266
2266
|
},
|
|
2267
2267
|
"artifactBaseline": {
|
|
2268
|
-
"aggregateSha256": "
|
|
2268
|
+
"aggregateSha256": "ef5648f34b8db6158058279b07d9849ea9c18a0a3b8918ee57f7a98f18a84547",
|
|
2269
2269
|
"files": [
|
|
2270
2270
|
{
|
|
2271
2271
|
"path": "docs/im.md",
|
|
@@ -2282,8 +2282,8 @@
|
|
|
2282
2282
|
{
|
|
2283
2283
|
"path": "skills/weaver-e10-yimiaoban/SKILL.md",
|
|
2284
2284
|
"role": "generated-reference",
|
|
2285
|
-
"size":
|
|
2286
|
-
"sha256": "
|
|
2285
|
+
"size": 12569,
|
|
2286
|
+
"sha256": "c221f7650948c02ec2bfa48f424826d98fc5b0f5581de9951905f00c920caa70"
|
|
2287
2287
|
},
|
|
2288
2288
|
{
|
|
2289
2289
|
"path": "skills/weaver-e10-yimiaoban/references/ding-write.md",
|
|
@@ -13,7 +13,8 @@ requires:
|
|
|
13
13
|
cliHelp: "weaver-work-cli asset --help"
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON
|
|
16
|
+
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须先提示用户先补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行),并把下面两条待执行命令原样完整展示给用户;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`——省略会装进默认目录,导致本技能依然读不到共享规则。命令均成功后重新读取共享规则;仍读不到就停止并把结果报告用户,不得凭猜测继续。**
|
|
17
|
+
**`--is-connector` 判据**:用户明确使用连接器、或上下文要求用连接器完成任务 → 传 `true`;本次任务或上下文直接选择单独技能 → 不传;用户没有明确说明时,按**正在运行的这份 Skill 是哪一级**定——**用户级(条目标 `(user)`)不传,连接器级(标 `(connector)`)传**(同名 Skill 只会运行用户级那一份)。传 `true` 时不要再写 `--profile` / `--base-url`。完整规则见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md)。
|
|
17
18
|
|
|
18
19
|
认证和登录态只能按共享规则通过 `weaver-work-cli auth ...` 命令判断;禁止直接读取、列出、打印或解析用户主目录下的旧 `.e10-cli`、auth、config 或 Keychain 数据。
|
|
19
20
|
所有命令通过 `weaver-work-cli --json asset run <operation>` 执行:简单 JSON 优先传 `--input-json '<json>'`,复杂或多行 JSON 先写入 UTF-8 文件再传 `--input <path>`,只有确认当前 shell 能稳定传管道时才使用 `--input -`。调用前先按需读取 references 下对应的文件,查参数结构,不要猜字段;**references 是第一信息源**,`weaver-work-cli asset schema` 是 operation、字段和风险等级的合约来源。
|
|
@@ -12,7 +12,7 @@ weaver-work-cli doctor --e10
|
|
|
12
12
|
weaver-work-cli asset schema
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
如未登录,按共享规则读取 `../../weaver-
|
|
15
|
+
如未登录,按共享规则读取 `../../weaver-e10-shared/references/e10-auth-and-session.md` 后处理。
|
|
16
16
|
|
|
17
17
|
## 固定入口
|
|
18
18
|
|
|
@@ -40,11 +40,11 @@ weaver-work-cli --json asset run asset.list --input-json '{"page_size":10}'
|
|
|
40
40
|
|
|
41
41
|
## 输出处理
|
|
42
42
|
|
|
43
|
-
成功结果在 stdout,失败结果在 stderr。判断规则读取共享 reference:`../../weaver-
|
|
43
|
+
成功结果在 stdout,失败结果在 stderr。判断规则读取共享 reference:`../../weaver-e10-shared/references/json-output-contract.md`。
|
|
44
44
|
|
|
45
45
|
列表、详情或回查结果可能很长时,不要把 stdout 的完整 envelope 直接展示给用户。默认 `page_size=10` 小页读取;只渲染资产决策所需字段,例如资产 ID、名称、编号、类型、状态、地点、管理人/使用人。需要更多结果时按 `page_no` 分页继续;需要保留完整原始 JSON 时落本地文件并返回路径。
|
|
46
46
|
|
|
47
|
-
高风险写入读取共享 reference:`../../weaver-
|
|
47
|
+
高风险写入读取共享 reference:`../../weaver-e10-shared/references/high-risk-write.md`。
|
|
48
48
|
|
|
49
49
|
## 版本门禁
|
|
50
50
|
|
|
@@ -49,13 +49,13 @@ license: MIT
|
|
|
49
49
|
<skill_dir>/scripts/validate_skill.py <用户提供的zip|.md|目录路径> [--json] [--out report.md] [--html report.html] [--market-live] [--market-catalog catalog.json] [--no-html]
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
-
|
|
52
|
+
- **默认按需输出 HTML 报告**:未显式传 `--html` 且未传 `--no-html` 时,只有检测结论为 `WARN` 或 `FAIL` 才生成 HTML 报告到「输入同目录/<输入名>-report.html」(如 `a.zip` → `a-report.html`;目录输入 → 同级 `<目录名>-report.html`);纯 `PASS` 不落 HTML 文件。控制台会在实际写出时打印「HTML 报告已写出: <路径>」。头部展示 **Skill 基础信息(MD5 / SHA256 / 文件大小)**、**技能能力清单**与**依赖的其他技能**标签云(独立胶囊圈选,仅展示 `weaver-` 前缀依赖),正文含各维度检测结果(威胁模型视图、行为图谱已按需求停用)。
|
|
53
53
|
- 不带参数时打印**可读报告**(含每项 ✅/❌/⚠️ 状态、命中位置、修复建议)。
|
|
54
|
-
- `--json`
|
|
54
|
+
- `--json` 输出结构化结果,便于二次处理(默认仅 `WARN/FAIL` 生成 HTML;配合 `--no-html` 可只留 JSON)。
|
|
55
55
|
- `--out report.md` 将报告落盘。
|
|
56
|
-
- `--html report.html` 自定义 HTML
|
|
57
|
-
- `--no-html`
|
|
58
|
-
- `--market-live`(推荐,**动态联网核查**):自动联网查询 skillhub.cn 市场,为每个 **`weaver-e10-` 前缀**依赖实时标注 **市场可搜(带跳转链接)/ 市场未收录 / 核查失败**,非 `weaver-e10-` 前缀依赖标注 **跳过核查**。判定基于技能 `slug` 精确匹配(避免子串误命中,如 `weaver-e10-
|
|
56
|
+
- `--html report.html` 自定义 HTML 报告输出路径(显式传参时即使纯 `PASS` 也会写出)。
|
|
57
|
+
- `--no-html` 关闭默认 HTML 输出(仅控制台/JSON,不落默认 HTML 文件)。
|
|
58
|
+
- `--market-live`(推荐,**动态联网核查**):自动联网查询 skillhub.cn 市场,为每个 **`weaver-e10-` 前缀**依赖实时标注 **市场可搜(带跳转链接)/ 市场未收录 / 核查失败**,非 `weaver-e10-` 前缀依赖标注 **跳过核查**。判定基于技能 `slug` 精确匹配(避免子串误命中,如 `weaver-e10-shared` 不会误判其它技能)。无需任何写死的清单文件。
|
|
59
59
|
- `--market-catalog catalog.json`(可选离线快照):不联网时传入「市场已收录技能清单」标注可达性,作为 `--market-live` 的离线替代。清单支持「列表」(`["a","b"]`,均为可搜)或「对象」(`{"a":true,"b":false}` 或富对象 `{"a":{"found":true,"market":"skillhub.cn","url":"..."}}`)。
|
|
60
60
|
- `--platform weaver|qwenwork`(**平台规范切换,默认 `weaver`**):
|
|
61
61
|
- `weaver`(默认):泛微生态规范,**既有行为完全不变**(`name` 必须 `weaver` 前缀、`display_name` 须以「泛微」开头、`author` 锁定为「泛微网络科技股份有限公司」等)。
|
|
@@ -170,10 +170,10 @@ SKILL.md 存在、frontmatter 完整、
|
|
|
170
170
|
- **B5 敏感词占位规范(INFO)**:建议复用 `-替换敏感词占位符-`。
|
|
171
171
|
- **B6/B7/B8**:子进程调用、命令行传凭证、硬编码密钥解密本地凭证。
|
|
172
172
|
- **B9 API 请求凭证完整性(BLOCK)**:skill 发起对外 API 请求时,必须同时携带 ① Cookie 完整原始串(禁止裁剪/去重/改写)② eteamsid ③ User-Agent(AgentType=<agentType>,IsAgent=true),三条缺一不可;Cookie 被 split / dict / 切片改写时另计 WARN。
|
|
173
|
-
- **B10 E10
|
|
174
|
-
- **B10a
|
|
175
|
-
- **B10b 禁止自建登录**:不得自行实现登录流程(Playwright / Selenium / Puppeteer 自动登录、扫码登录、账号密码登录、自建 OAuth 取 token
|
|
176
|
-
-
|
|
173
|
+
- **B10 E10 接口型技能「共享登录 + 凭证」契约(BLOCK,仅 `weaver-e10-` 前缀技能生效,`weaver-e10-shared` / `weaver-e10-shared-connector` 自身豁免)**:
|
|
174
|
+
- **B10a 登录必须走共享规则**:E10 接口型技能必须依赖 `weaver-e10-shared`;连接器版依赖 `weaver-e10-shared-connector`。需在 frontmatter `dependencies` 声明,或在正文/脚本中引用共享规则 / `weaver-work-cli auth`。无任何共享登录规则依赖证据即阻断。
|
|
175
|
+
- **B10b 禁止自建登录**:不得自行实现登录流程(Playwright / Selenium / Puppeteer 自动登录、扫码登录、账号密码登录、自建 OAuth 取 token),会话必须统一由共享规则与 `weaver-work-cli auth` 托管。
|
|
176
|
+
- ~~**B10c 接口文档须声明完整凭证**~~ **(2026-09-20 起停用)**:请求头三件套(Cookie 完整原始串 / eteamsid / User-Agent)已收敛为「唯一权威声明」,只写在 `weaver-e10-shared`(连接器版 `weaver-e10-shared-connector`)入口 SKILL.md 的「请求头契约」章节,业务模块一律改为指针引用、不再复制代码块。本规则按单个技能目录独立扫描,看不到 shared 的正文,继续启用会把正确的引用写法误判为 FAIL,故整段停用;脚本型技能仍由 B9 覆盖。
|
|
177
177
|
- 触发前提:存在 API 表面(脚本内真实 HTTP 调用,或文档中的接口请求描述)。纯规范/UI 类 E10 技能(无接口描述)自动跳过,不误伤。
|
|
178
178
|
|
|
179
179
|
**G. 扩展安全(WB,对齐官方 expert-reviewer G 组)**
|
|
@@ -123,9 +123,9 @@
|
|
|
123
123
|
| B7 | WV | 凭证未通过命令行明文传递 | HIGH | 子进程调用的参数块内不得出现 `ETEAMSID`/`token`/`session`/`cookie`/`password`/`secret` 等凭证字段,禁止以命令行参数或 env 明文传入凭证 |
|
|
124
124
|
| B8 | WV | 无硬编码加密密钥 / 本地凭证访问 | HIGH | 不得硬编码密钥常量用于 AES 解密本地会话凭证;不得访问 `<~/.e10-cli/profiles/*/auth>` 等本地敏感凭证路径(须脱敏并限定授权范围) |
|
|
125
125
|
| B9 | WV | **API 请求凭证完整性** | **BLOCK** | 发起对外 API 请求(requests / urllib / httpx / fetch / axios / curl 等)时,请求头必须同时携带 ① `Cookie` 完整原始串(禁止裁剪/去重/改写)② `eteamsid` ③ `User-Agent: AgentType=<agentType>,IsAgent=true`;缺任一项即阻断;Cookie 被 split / dict / 切片改写另计 WARN |
|
|
126
|
-
| B10a | WV |
|
|
127
|
-
| B10b | WV | **禁止自建登录** | **BLOCK** | 同 B10a 适用范围。不得自行实现登录流程:Playwright / Selenium / Puppeteer 自动登录、扫码/二维码登录、账号密码登录、自建 OAuth 取 token
|
|
128
|
-
| B10c | WV |
|
|
126
|
+
| B10a | WV | **登录必须走共享规则(E10 接口型技能)** | **BLOCK** | 仅对 `name` 为 `weaver-e10-` 前缀的技能生效(`weaver-e10-shared` / `weaver-e10-shared-connector` 自身豁免)。若为接口型技能(有脚本 HTTP 调用或文档接口描述),必须依赖 `weaver-e10-shared`;连接器版依赖 `weaver-e10-shared-connector`:frontmatter `dependencies` 声明,或正文/脚本引用共享规则 / `weaver-work-cli auth`。无任何共享登录规则依赖证据 → 阻断 |
|
|
127
|
+
| B10b | WV | **禁止自建登录** | **BLOCK** | 同 B10a 适用范围。不得自行实现登录流程:Playwright / Selenium / Puppeteer 自动登录、扫码/二维码登录、账号密码登录、自建 OAuth 取 token。会话必须统一由共享规则与 `weaver-work-cli auth` 托管 |
|
|
128
|
+
| ~~B10c~~ | WV | ~~**接口文档声明完整凭证(文档型 E10 技能)**~~ **(2026-09-20 起停用)** | 停用 | 请求头三件套(Cookie 完整原始串 / `eteamsid` / `User-Agent: AgentType=...,IsAgent=true`)已收敛为「唯一权威声明」,只写在 `weaver-e10-shared`(连接器版 `weaver-e10-shared-connector`)入口 SKILL.md 的「请求头契约」章节,业务模块改为指针引用、不再复制代码块。本规则按单个技能目录独立扫描,看不到 shared 正文,继续启用会把正确的引用写法误判为 FAIL,故整段停用;脚本型仍由 B9 覆盖 |
|
|
129
129
|
| — | WV | 触发前提与非适用 | INFO | B10 组需先检测到 API 表面(脚本内真实 HTTP 调用,或 Markdown 文档中的接口请求描述)才生效;纯规范/UI 类 E10 技能(如 `weaver-e10-ui-system`)无接口描述 → 自动跳过,不误伤。非 `weaver-e10-` 前缀技能整组不适用 |
|
|
130
130
|
|
|
131
131
|
---
|
|
Binary file
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
python validate_skill.py <path_to_skill.zip|.md|directory> [--json] [--out report.md] [--html report.html]
|
|
11
11
|
[--market-catalog catalog.json] [--market-live] [--no-html]
|
|
12
12
|
[--platform {weaver,qwenwork}]
|
|
13
|
-
#
|
|
14
|
-
#
|
|
13
|
+
# 默认仅在 WARN/FAIL 时自动输出 HTML 报告到「输入同目录/<输入名>-report.html」(如 a.zip → a-report.html);
|
|
14
|
+
# 纯 PASS 不落 HTML;显式传 --html <path> 可强制输出;--no-html 可关闭默认 HTML 输出(仅控制台/JSON)。
|
|
15
15
|
# --platform 显式指定目标发布平台(默认 weaver):
|
|
16
16
|
# weaver - 泛微生态(WorkBuddy 平台 + 泛微专属品牌/契约约束,原默认行为)
|
|
17
17
|
# qwenwork - 千问办公生态(按千问开发指南校验打包硬性、frontmatter 字段、连接器契约等)
|
|
@@ -2049,30 +2049,30 @@ def check_api_request_credentials(skill_dir: Path):
|
|
|
2049
2049
|
|
|
2050
2050
|
|
|
2051
2051
|
# ---------------------------------------------------------------------------
|
|
2052
|
-
# E10
|
|
2053
|
-
# 规则 1(B10a,BLOCK
|
|
2052
|
+
# E10 接口型技能「共享登录 + 凭证」契约检测(泛微强制红线,仅对 weaver-e10- 前缀技能生效)
|
|
2053
|
+
# 规则 1(B10a,BLOCK):登录必须走共享规则 —— 必须声明/引用 weaver-e10-shared(连接器版为 weaver-e10-shared-connector)
|
|
2054
|
+
# 或明确通过 weaver-work-cli auth 体系处理,
|
|
2054
2055
|
# 且不得自建登录(Playwright/Selenium 自动登录、账号密码登录、自建 OAuth 等)。
|
|
2055
|
-
# 规则 2(B10c,BLOCK):API
|
|
2056
|
+
# 规则 2(B10c,BLOCK):API 请求必须由 weaver-work-cli 托管并携带三项用户信息参数 ——
|
|
2056
2057
|
# ① Cookie 完整原始串(禁止裁剪/去重/改写)
|
|
2057
2058
|
# ② eteamsid
|
|
2058
2059
|
# ③ User-Agent(AgentType=<agentType>,IsAgent=true)
|
|
2059
|
-
# 触发范围:name 以 weaver-e10- 开头(weaver-e10-
|
|
2060
|
+
# 触发范围:name 以 weaver-e10- 开头(weaver-e10-shared 自身豁免),且确实存在 API 表面
|
|
2060
2061
|
# (脚本内真实 HTTP 调用,或文档中描述了接口请求/curl/请求头)。
|
|
2061
2062
|
# ---------------------------------------------------------------------------
|
|
2062
2063
|
|
|
2063
|
-
|
|
2064
|
+
SHARED_SKILL_NAMES = {"weaver-e10-shared", "weaver-e10-shared-connector"}
|
|
2064
2065
|
|
|
2065
|
-
#
|
|
2066
|
-
|
|
2067
|
-
r"weaver-e10-
|
|
2068
|
-
r"
|
|
2069
|
-
r"
|
|
2070
|
-
r"
|
|
2071
|
-
r"|登录技能",
|
|
2066
|
+
# 「登录走共享规则」的证据模式(任一命中即认为已接入共享登录约束)
|
|
2067
|
+
SHARED_AUTH_DEP_RE = re.compile(
|
|
2068
|
+
r"weaver-e10-shared(?:-connector)?" # 共享技能名(frontmatter 声明或正文引用)
|
|
2069
|
+
r"|weaver-work-cli\s+auth\b" # CLI 认证命令体系
|
|
2070
|
+
r"|共享规则" # 中文表述:共享规则
|
|
2071
|
+
r"|共享\s*(?:s?kill|技能)", # 中文表述:共享 skill / 共享技能
|
|
2072
2072
|
re.IGNORECASE,
|
|
2073
2073
|
)
|
|
2074
2074
|
|
|
2075
|
-
#
|
|
2075
|
+
# 自建登录(绕过共享规则)的可疑模式:命中即 BLOCK
|
|
2076
2076
|
SELF_LOGIN_RES = [
|
|
2077
2077
|
re.compile(r"\b(playwright|selenium|puppeteer|pyppeteer)\b", re.IGNORECASE),
|
|
2078
2078
|
re.compile(r"扫码\s*登录|二维码\s*登录", re.IGNORECASE),
|
|
@@ -2126,18 +2126,18 @@ def collect_api_surface(skill_dir: Path):
|
|
|
2126
2126
|
def check_weaver_e10_auth_contract(skill_dir: Path, name: str):
|
|
2127
2127
|
"""
|
|
2128
2128
|
E10 接口型技能专属红线(BLOCK):
|
|
2129
|
-
B10a
|
|
2130
|
-
B10c
|
|
2131
|
-
仅对 name 以 weaver-e10- 开头的技能生效;weaver-e10-
|
|
2129
|
+
B10a 登录必须走共享规则(依赖 weaver-e10-shared / weaver-e10-shared-connector,且不得自建登录)
|
|
2130
|
+
B10c 已于 2026-09-20 停用(请求头三件套收敛到 weaver-e10-shared 唯一权威声明,逐目录校验会误判引用写法)
|
|
2131
|
+
仅对 name 以 weaver-e10- 开头的技能生效;weaver-e10-shared 自身豁免。
|
|
2132
2132
|
"""
|
|
2133
2133
|
checks = []
|
|
2134
2134
|
nm = (name or "").strip().strip('"\'`')
|
|
2135
2135
|
if not nm.lower().startswith("weaver-e10-"):
|
|
2136
2136
|
return [Check("E10 登录与凭证契约", "适用范围内(weaver-e10- 前缀技能)", "PASS", "INFO",
|
|
2137
2137
|
f"当前技能 name='{nm}' 非 weaver-e10- 前缀,本组规则不适用。")]
|
|
2138
|
-
if nm.lower()
|
|
2139
|
-
return [Check("E10 登录与凭证契约", "
|
|
2140
|
-
"当前技能即
|
|
2138
|
+
if nm.lower() in SHARED_SKILL_NAMES:
|
|
2139
|
+
return [Check("E10 登录与凭证契约", "共享规则自身豁免", "PASS", "INFO",
|
|
2140
|
+
f"当前技能即 {nm},登录契约规则豁免。")]
|
|
2141
2141
|
|
|
2142
2142
|
script_hits, doc_hits, all_texts = collect_api_surface(skill_dir)
|
|
2143
2143
|
if not script_hits and not doc_hits:
|
|
@@ -2152,36 +2152,37 @@ def check_weaver_e10_auth_contract(skill_dir: Path, name: str):
|
|
|
2152
2152
|
)
|
|
2153
2153
|
surface_locs = (script_hits or doc_hits)[:15]
|
|
2154
2154
|
|
|
2155
|
-
# ---- B10a
|
|
2155
|
+
# ---- B10a 登录必须走共享规则 ----
|
|
2156
2156
|
joined = "\n".join(all_texts.values())
|
|
2157
|
-
|
|
2157
|
+
shared_evidence = []
|
|
2158
2158
|
for rel, text in all_texts.items():
|
|
2159
2159
|
for i, line in enumerate(scan_lines(text), start=1):
|
|
2160
|
-
if
|
|
2161
|
-
|
|
2162
|
-
if
|
|
2160
|
+
if SHARED_AUTH_DEP_RE.search(line):
|
|
2161
|
+
shared_evidence.append(f"{rel}:{i} → {line.strip()[:120]}")
|
|
2162
|
+
if shared_evidence:
|
|
2163
2163
|
checks.append(Check(
|
|
2164
|
-
"E10 登录与凭证契约", "
|
|
2165
|
-
f"
|
|
2166
|
-
f"(示例:{
|
|
2167
|
-
locations=
|
|
2164
|
+
"E10 登录与凭证契约", "登录走共享规则(依赖 weaver-e10-shared)", "PASS", "INFO",
|
|
2165
|
+
f"检测到共享规则/CLI auth 依赖证据 {len(shared_evidence)} 处"
|
|
2166
|
+
f"(示例:{shared_evidence[0]}),符合「登录必须走 weaver-e10-shared」要求。",
|
|
2167
|
+
locations=shared_evidence[:8],
|
|
2168
2168
|
))
|
|
2169
2169
|
else:
|
|
2170
2170
|
checks.append(Check(
|
|
2171
|
-
"E10 登录与凭证契约", "
|
|
2172
|
-
f"当前技能为 E10 接口型技能({surface_desc}
|
|
2173
|
-
"既未在 frontmatter `dependencies` 中声明 `weaver-e10-
|
|
2174
|
-
"`weaver-
|
|
2175
|
-
"
|
|
2171
|
+
"E10 登录与凭证契约", "登录走共享规则(依赖 weaver-e10-shared)", "FAIL", "BLOCK",
|
|
2172
|
+
f"当前技能为 E10 接口型技能({surface_desc}),但未发现任何共享登录规则依赖证据:"
|
|
2173
|
+
"既未在 frontmatter `dependencies` 中声明 `weaver-e10-shared`(连接器版为 `weaver-e10-shared-connector`),"
|
|
2174
|
+
"也未在正文/脚本中引用共享规则或 `weaver-work-cli auth`。"
|
|
2175
|
+
"「登录必须走共享规则」为泛微强制红线,未声明即阻断上架。",
|
|
2176
2176
|
locations=surface_locs,
|
|
2177
2177
|
suggestion="在 SKILL.md frontmatter 增加:\n"
|
|
2178
2178
|
"dependencies:\n"
|
|
2179
|
-
" - weaver-e10-
|
|
2180
|
-
"
|
|
2181
|
-
"
|
|
2179
|
+
" - weaver-e10-shared\n"
|
|
2180
|
+
"连接器版使用:\n"
|
|
2181
|
+
" - weaver-e10-shared-connector\n"
|
|
2182
|
+
"或在正文/脚本中明确:认证与会话由 weaver-e10-shared 共享规则和 `weaver-work-cli auth ...` 托管。"
|
|
2182
2183
|
))
|
|
2183
2184
|
|
|
2184
|
-
# ---- B10b
|
|
2185
|
+
# ---- B10b 禁止自建登录(绕过共享规则)----
|
|
2185
2186
|
self_login_hits = []
|
|
2186
2187
|
for rel, text in all_texts.items():
|
|
2187
2188
|
for i, line in enumerate(scan_lines(text), start=1):
|
|
@@ -2191,53 +2192,58 @@ def check_weaver_e10_auth_contract(skill_dir: Path, name: str):
|
|
|
2191
2192
|
break
|
|
2192
2193
|
if self_login_hits:
|
|
2193
2194
|
checks.append(Check(
|
|
2194
|
-
"E10 登录与凭证契约", "
|
|
2195
|
+
"E10 登录与凭证契约", "未自建登录(禁止绕过共享规则)", "FAIL", "BLOCK",
|
|
2195
2196
|
f"检测到自建登录/自动登录实现 {len(self_login_hits)} 处"
|
|
2196
2197
|
"(Playwright/Selenium 自动登录、扫码登录、账号密码登录、自建 OAuth 等)。"
|
|
2197
|
-
"E10 技能的登录与会话必须统一由 weaver-e10-
|
|
2198
|
+
"E10 技能的登录与会话必须统一由 weaver-e10-shared 共享规则和 weaver-work-cli auth 体系托管,禁止自行实现登录流程。",
|
|
2198
2199
|
locations=self_login_hits[:15],
|
|
2199
|
-
suggestion="
|
|
2200
|
-
"获取会话,再使用该会话发起业务请求。"
|
|
2200
|
+
suggestion="删除自建登录逻辑,改为依赖 weaver-e10-shared 共享规则,并通过 `weaver-work-cli auth ...` 处理会话。"
|
|
2201
2201
|
))
|
|
2202
2202
|
else:
|
|
2203
2203
|
checks.append(Check(
|
|
2204
|
-
"E10 登录与凭证契约", "
|
|
2204
|
+
"E10 登录与凭证契约", "未自建登录(禁止绕过共享规则)", "PASS", "INFO",
|
|
2205
2205
|
"未检测到自建登录实现(Playwright/Selenium/扫码/账号密码/自建 OAuth)。"
|
|
2206
2206
|
))
|
|
2207
2207
|
|
|
2208
|
-
# ---- B10c
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2208
|
+
# ---- B10c 三项用户信息参数完整(2026-09-20 停用)----
|
|
2209
|
+
# 停用原因:请求头三件套(Cookie 完整原始串 / eteamsid / User-Agent: AgentType=<agentType>,IsAgent=true)
|
|
2210
|
+
# 已收敛为「唯一权威声明」,只写在 weaver-e10-shared(连接器版 weaver-e10-shared-connector)入口 SKILL.md
|
|
2211
|
+
# 的「请求头契约」章节,业务模块一律改为指针引用,不再各自复制代码块。
|
|
2212
|
+
# 本规则按「单个技能目录」独立扫描,无法跨目录看到 shared 的正文,继续启用会把正确的引用写法误判为 FAIL,
|
|
2213
|
+
# 因此整段停用;脚本型技能仍由 B9「API 请求凭证完整性」覆盖,不重复判定。
|
|
2214
|
+
#
|
|
2215
|
+
# if not script_hits and doc_hits:
|
|
2216
|
+
# has_cookie = bool(COOKIE_HEADER_RE.search(joined))
|
|
2217
|
+
# has_eteamsid = bool(ETEAMSID_RE.search(joined))
|
|
2218
|
+
# has_ua = bool(UA_RE.search(joined) and AGENT_TYPE_RE.search(joined) and IS_AGENT_RE.search(joined))
|
|
2219
|
+
# missing = []
|
|
2220
|
+
# if not has_cookie:
|
|
2221
|
+
# missing.append("① Cookie 完整原始串(文档中未说明请求头携带 Cookie)")
|
|
2222
|
+
# if not has_eteamsid:
|
|
2223
|
+
# missing.append("② eteamsid(文档中未出现 eteamsid 字段)")
|
|
2224
|
+
# if not has_ua:
|
|
2225
|
+
# missing.append("③ User-Agent(AgentType=<agentType>,IsAgent=true)")
|
|
2226
|
+
# if missing:
|
|
2227
|
+
# checks.append(Check(
|
|
2228
|
+
# "E10 登录与凭证契约", "接口文档声明完整凭证(Cookie+eteamsid+User-Agent)", "FAIL", "BLOCK",
|
|
2229
|
+
# "当前技能以接口文档形式发起/描述 API 请求,必须明确要求由 weaver-work-cli 托管并携带三项用户信息参数,"
|
|
2230
|
+
# "缺一不可。当前缺失:\n" + "\n".join(f" · {m}" for m in missing),
|
|
2231
|
+
# locations=surface_locs,
|
|
2232
|
+
# suggestion="在接口文档的「请求头/认证」章节补充:\n"
|
|
2233
|
+
# "Cookie: <weaver-work-cli 托管登录态的完整原始 Cookie 串>(禁止裁剪/去重/改写)\n"
|
|
2234
|
+
# "eteamsid: <weaver-work-cli 托管登录态的 ETEAMSID>\n"
|
|
2235
|
+
# "User-Agent: AgentType=<agentType>,IsAgent=true"
|
|
2236
|
+
# ))
|
|
2237
|
+
# else:
|
|
2238
|
+
# checks.append(Check(
|
|
2239
|
+
# "E10 登录与凭证契约", "接口文档声明完整凭证(Cookie+eteamsid+User-Agent)", "PASS", "INFO",
|
|
2240
|
+
# "接口文档已声明三项强制凭证(Cookie 完整原始串 / eteamsid / User-Agent:AgentType=...,IsAgent=true)。"
|
|
2241
|
+
# ))
|
|
2242
|
+
# elif script_hits:
|
|
2243
|
+
# checks.append(Check(
|
|
2244
|
+
# "E10 登录与凭证契约", "接口文档声明完整凭证(Cookie+eteamsid+User-Agent)", "PASS", "INFO",
|
|
2245
|
+
# "脚本型技能的三项凭证校验由「API 凭证完整性」规则覆盖,此处不重复判定。"
|
|
2246
|
+
# ))
|
|
2241
2247
|
|
|
2242
2248
|
return checks
|
|
2243
2249
|
|
|
@@ -2898,13 +2904,13 @@ def looks_like_skill_name(name: str) -> bool:
|
|
|
2898
2904
|
"""
|
|
2899
2905
|
稳健判定「看起来像个泛微生态技能名」。仅接受一种高置信形状:
|
|
2900
2906
|
weaver-e10- 前缀 + 连字符:weaver-e10- 开头且必须含连字符
|
|
2901
|
-
(如 weaver-e10-
|
|
2907
|
+
(如 weaver-e10-shared、weaver-e10-hrm)。
|
|
2902
2908
|
依赖检测**只关注 weaver-e10- 前缀**的泛微生态技能(合作方要求),weaver- 但非
|
|
2903
2909
|
e10-/e10-/eteams- 等前缀视为平台模块名/内部引用,不作为技能依赖识别。
|
|
2904
2910
|
这样可排除:weaver-ebuilder-*/weaver-openserver-* 等内部接口模块、单单词
|
|
2905
2911
|
(send/list/api)、中文片段(以下外部/调用本)、URL 路径段(/references/、/send/)、
|
|
2906
2912
|
文档内函数/参数名(hrm-employee-query、emp-by-ids、to-uid)、全大写常量/环境变量
|
|
2907
|
-
(ETEAMSID、
|
|
2913
|
+
(ETEAMSID、WEAVER_AUTH_ENTRY,无连字符故不命中)。
|
|
2908
2914
|
说明:frontmatter 中**显式声明**的依赖(dependencies/requires 字段)同样受
|
|
2909
2915
|
weaver-e10- 前缀约束——非 weaver-e10- 前缀的一律不识别为技能依赖。
|
|
2910
2916
|
"""
|
|
@@ -2968,7 +2974,7 @@ def check_skill_dependencies(skill_dir: Path, skill_md: Path = None, market_cata
|
|
|
2968
2974
|
if block:
|
|
2969
2975
|
for m in re.finditer(r"^\s*-\s+(.+)$", block.group(1), re.MULTILINE):
|
|
2970
2976
|
add(m.group(1)) # frontmatter 显式声明:高置信度,不走 strict 判定
|
|
2971
|
-
# ③ description 中的依赖表述:「接口地址与认证由 weaver-e10-
|
|
2977
|
+
# ③ description 中的依赖表述:「接口地址与认证由 weaver-e10-shared 提供」
|
|
2972
2978
|
for m in re.finditer(r"^\s*description(?:_\w+)?\s*:\s*(.+)$", fm, re.MULTILINE):
|
|
2973
2979
|
for dm in re.finditer(r"由\s*([A-Za-z0-9][A-Za-z0-9._-]{1,60})\s*(?:提供|负责|承担)", m.group(1)):
|
|
2974
2980
|
add(dm.group(1), strict=True)
|
|
@@ -2997,7 +3003,7 @@ def check_skill_dependencies(skill_dir: Path, skill_md: Path = None, market_cata
|
|
|
2997
3003
|
for part in re.findall(r"[`'](weaver-e10-[\w-]+)[`']", m.group(0)):
|
|
2998
3004
|
add(part, strict=True)
|
|
2999
3005
|
# 泛微生态高精度信号:反引号/单引号包裹的 weaver-e10- 前缀带连字符标识符
|
|
3000
|
-
# (如 `weaver-e10-
|
|
3006
|
+
# (如 `weaver-e10-shared`)。self_names 已排除检测器自身(weaver-skill-detector)。
|
|
3001
3007
|
for m in re.finditer(r"[`'](weaver-e10-[\w-]+)[`']", text, re.IGNORECASE):
|
|
3002
3008
|
add(m.group(1), strict=True)
|
|
3003
3009
|
# 中文引述:「使用 xxx 技能」「调用 xxx skill」「委托 xxx skill」——命中须通过 strict 标识符形状校验,
|
|
@@ -3012,12 +3018,12 @@ def check_skill_dependencies(skill_dir: Path, skill_md: Path = None, market_cata
|
|
|
3012
3018
|
# 非反引号中文片段若以「的」结尾(如 执行的/可执行的),属修饰语而非技能名,跳过
|
|
3013
3019
|
if not g.startswith("`") and g.endswith("的"):
|
|
3014
3020
|
continue
|
|
3015
|
-
# 反引号包裹的视为代码标识符(如 `weaver-e10-
|
|
3021
|
+
# 反引号包裹的视为代码标识符(如 `weaver-e10-shared`),不受中文短语长度限制;
|
|
3016
3022
|
# 非反引号的中文短语仍限制 ≤16 字,避免长句误判为依赖
|
|
3017
3023
|
if not g.startswith("`") and len(g) > 16:
|
|
3018
3024
|
continue
|
|
3019
3025
|
add(g, strict=True)
|
|
3020
|
-
# 「由 xxx 提供/负责」表述(容错「会话」等中间词:由 weaver-e10-
|
|
3026
|
+
# 「由 xxx 提供/负责」表述(容错「会话」等中间词:由 weaver-e10-shared 会话提供)
|
|
3021
3027
|
for m in re.finditer(r"由\s*([A-Za-z0-9][A-Za-z0-9._-]{1,60})\s*(?:会话\s*)?(?:提供|负责|承担)", text):
|
|
3022
3028
|
add(m.group(1), strict=True)
|
|
3023
3029
|
|
|
@@ -3130,7 +3136,7 @@ def query_skillhub_market(names):
|
|
|
3130
3136
|
使用 skillhub.cn 公开检索接口 GET /api/skills?page=1&pageSize=24&sortBy=score&order=desc&keyword=<name>
|
|
3131
3137
|
(与 skillhub.cn 前端实际发出的请求一致),按 **slug 精确相等**(或 canonicalName 以 /<name> 结尾)
|
|
3132
3138
|
判定,避免子串误命中
|
|
3133
|
-
(例如 keyword=weaver-e10-
|
|
3139
|
+
(例如 keyword=weaver-e10-shared 会同时召回其它共享规则相关结果,必须精确匹配)。
|
|
3134
3140
|
|
|
3135
3141
|
设计取舍:本工具默认仍是「纯静态、零联网」。此函数为可选的 --market-live 模式提供
|
|
3136
3142
|
联网能力,把「是否可搜」的判定交给 skillhub.cn 实时返回,而非依赖一份写死的清单。
|
|
@@ -4086,15 +4092,15 @@ def main():
|
|
|
4086
4092
|
log(f"❌ {err}")
|
|
4087
4093
|
sys.exit(2)
|
|
4088
4094
|
|
|
4089
|
-
# 默认 HTML
|
|
4095
|
+
# 默认 HTML 输出路径:未显式指定 --html 且未禁用时,仅在 WARN/FAIL 后使用。
|
|
4090
4096
|
# zip/md 输入 → 去扩展名 + "-report.html"(如 weaver-e10-hrm.zip → weaver-e10-hrm-report.html);
|
|
4091
4097
|
# 目录输入 → 同级 "<目录名>-report.html"。
|
|
4098
|
+
default_html_path = None
|
|
4092
4099
|
if html_path is None and not no_html:
|
|
4093
4100
|
if target.is_file():
|
|
4094
|
-
|
|
4101
|
+
default_html_path = str(target.with_suffix("")) + "-report.html"
|
|
4095
4102
|
else:
|
|
4096
|
-
|
|
4097
|
-
log(f"默认 HTML 输出: {html_path}")
|
|
4103
|
+
default_html_path = str(target.parent / (target.name + "-report.html"))
|
|
4098
4104
|
|
|
4099
4105
|
market_catalog = None
|
|
4100
4106
|
if market_catalog_path:
|
|
@@ -4174,11 +4180,12 @@ def main():
|
|
|
4174
4180
|
Path(out_path).write_text(report, encoding="utf-8")
|
|
4175
4181
|
log(f"报告已写出: {out_path}")
|
|
4176
4182
|
|
|
4177
|
-
if
|
|
4183
|
+
html_output_path = html_path or (default_html_path if verdict != "PASS" else None)
|
|
4184
|
+
if html_output_path:
|
|
4178
4185
|
html = render_html(target_str, source_type, checks, verdict, n_err, n_warn,
|
|
4179
4186
|
file_info, platform=platform)
|
|
4180
|
-
Path(
|
|
4181
|
-
log(f"HTML 报告已写出: {
|
|
4187
|
+
Path(html_output_path).write_text(html, encoding="utf-8")
|
|
4188
|
+
log(f"HTML 报告已写出: {html_output_path}")
|
|
4182
4189
|
|
|
4183
4190
|
sys.exit(1 if verdict == "FAIL" else 0)
|
|
4184
4191
|
finally:
|