diff --git a/packages/connector/wecom-cli/README.i18n.yaml b/packages/connector/wecom-cli/README.i18n.yaml index 7344023be9..e5a05c177b 100644 --- a/packages/connector/wecom-cli/README.i18n.yaml +++ b/packages/connector/wecom-cli/README.i18n.yaml @@ -9,8 +9,8 @@ en: 64ada5d1b3aac000 zh: b18083c73eabe29a /deepseek-ai-dsh-wecom-cli/summary: - en: 3797939f599e30aa - zh: 7ba3897c2ae648eb + en: 9489a8025deee79d + zh: 1414740e045cd9a1 /deepseek-ai-dsh-wecom-cli/table-of-contents: en: d152484eb41ac6b4 zh: 09388d293f9be9cb @@ -21,8 +21,8 @@ en: 4034b64f387ae470 zh: 748eeb0414ceace4 /deepseek-ai-dsh-wecom-cli/use-this-package/what-you-get: - en: 6fd2679febe1e32c - zh: 572186c1bd419625 + en: 470efb04014aec86 + zh: 3c06434a4cfb8b9c /deepseek-ai-dsh-wecom-cli/use-this-package/authorization-operations: en: 7d0ec689a89b609e zh: 86ce0058d42f38b1 @@ -30,8 +30,8 @@ en: 9f62785a7999eef2 zh: 2b345355d9515d13 /deepseek-ai-dsh-wecom-cli/understand-the-implementation: - en: 899036f1b43e1570 - zh: 50be7bf6d47cf185 + en: 5733a8fee2c43400 + zh: a0367f0fe8970ecf /deepseek-ai-dsh-wecom-cli/further-exploration: en: ab2a30827085cf94 zh: 92eccac3d8db8ace @@ -42,11 +42,11 @@ en: 7265024b55daf9ef zh: 3447e587c56a25d6 /deepseek-ai-dsh-wecom-cli/model-experience/skill-catalog-entries/what-the-model-sees: - en: ec32ffc442e9b899 - zh: 426e4ca7ac40f147 + en: 92eb47194f3c8cc3 + zh: b9cfda74948e4b1a /deepseek-ai-dsh-wecom-cli/model-experience/skill-catalog-entries/token-effect: - en: 9378534bfff757a8 - zh: efe6147c75aa247a + en: 5c0018a8ae3cd3d3 + zh: 341e13c2f26125be /deepseek-ai-dsh-wecom-cli/model-experience/skill-catalog-entries/kv-cache-effect: en: ce9139edf3309f2b zh: bca06594b3e557e5 @@ -54,17 +54,17 @@ en: 8955ac196848e69f zh: 54aa7db097eafd3c /deepseek-ai-dsh-wecom-cli/model-experience/loaded-skill-body/what-the-model-sees: - en: 438a700e98072f1d - zh: 1bee43ade7789143 + en: 2afd3b7a0b666202 + zh: 7a1325e3dae2d9fa /deepseek-ai-dsh-wecom-cli/model-experience/loaded-skill-body/token-effect: - en: 957d966dfe72a1bd - zh: 92b32dcae4c8e347 + en: 1ed287a86abbc585 + zh: 5d55a6fd61786866 /deepseek-ai-dsh-wecom-cli/model-experience/loaded-skill-body/kv-cache-effect: en: 1f6b842a95e14ce4 zh: 0d57cdec5e828828 /deepseek-ai-dsh-wecom-cli/known-limitations-and-deferred-work: - en: e502cb6227e1c1a9 - zh: 0e34c683effc86b2 + en: c1133f8d4a0b4400 + zh: c4afa3136668fbb8 /deepseek-ai-dsh-wecom-cli/known-limitations-and-deferred-work/dev-note: - en: 66bbbc6ce4221b09 - zh: c41298add7a623d5 + en: 9b6699137b57ded7 + zh: 0ee77c64d5f93050 diff --git a/packages/connector/wecom-cli/README.md b/packages/connector/wecom-cli/README.md index 86620a3ca4..5242e9753e 100644 --- a/packages/connector/wecom-cli/README.md +++ b/packages/connector/wecom-cli/README.md @@ -9,7 +9,7 @@ English | [中文](README.zh.md) ## Summary -This package is the Host row of the [WeCom plugin](../wecom/README.md). It installs a pinned `@wecom/cli`, puts its `wecom-cli` executable on the private Shell PATH, and registers the official WeCom skills it ships. Its `wecom` Remote checks the CLI's authorization, binds a bot through the CLI's QR-code page, and cancels, for the [WeCom plugin page](../../client/ui-wecom/README.md). The CLI keeps the bot credentials in its default configuration, which the user's own terminal shares. Only macOS is supported. +This package is the Host row of the [WeCom plugin](../wecom/README.md). It installs a pinned `@wecom/cli`, puts its `wecom-cli` executable on the private Shell PATH, and registers one `wecom` skill whose guides are the official WeCom skills. Its `wecom` Remote checks the CLI's authorization, binds a bot through the CLI's QR-code page, and cancels, for the [WeCom plugin page](../../client/ui-wecom/README.md). The CLI keeps the bot credentials in its default configuration, which the user's own terminal shares. Only macOS is supported. ## Table of Contents @@ -31,7 +31,7 @@ Install the [WeCom plugin bundle](../wecom/README.md), which inserts this packag ### What you get -After the plugin loads, the official skills, such as `wecomcli-doc`, `wecomcli-message`, and `wecomcli-shared`, join the skill catalog. The agent loads one with the `skill` tool and runs `wecom-cli` commands through the ordinary Shell tools under the current sandbox and approval policy. When `wecom-cli auth show --status` reports no authorization, the agent asks the user to connect WeCom on the plugin page; it runs the CLI's own `auth init` only when the user asks to finish it in the conversation, with single-command approval because it writes outside the workspace. +After the plugin loads, one `wecom` skill joins the skill catalog. The agent loads it with the `skill` tool, opens the guide it needs, such as `wecomcli-doc` or `wecomcli-message`, with the file tools, and runs `wecom-cli` commands through the ordinary Shell tools under the current sandbox and approval policy. When `wecom-cli auth show --status` reports no authorization, the agent asks the user to connect WeCom on the plugin page; it runs the CLI's own `auth init` only when the user asks to finish it in the conversation, with single-command approval because it writes outside the workspace. Turning the row off in Plugin Manager withdraws the skills and the private PATH entry for later Shell calls. The CLI authorization stays in place. @@ -70,7 +70,7 @@ The generated [config catalog](../../../docs/config-catalog.md#deepseek-aidsh-we [`src/index.ts`](src/index.ts) is a Remote service registered as `ctx.wecom`. It requires a Host subprocess runtime, checks that `binDir/wecom-cli` is executable, registers `binDir` with [Shell environment](../../shell/shell-env/README.md) as the `wecom` PATH contribution, and mounts a [filesystem skill provider](../../skill/skill-filesystem/README.md) named `wecom` over this package's `skills/` directory, without the default roots or watching. [`src/directory.ts`](src/directory.ts) resolves the platform package that `@wecom/cli` installs as an optional dependency. The [CLI account library](../cli-account/README.md) runs each command on the private PATH, so the backend and the Shell use the same executable, and runs one operation at a time. [`src/account.ts`](src/account.ts) extends that runtime with the WeCom commands and reads the QR-code link from the output lines of `auth init`. Disposal cancels the active operation, aborts running commands, and settles after their processes exit. -[`skills/`](skills) is a copy of `skills/` from `WecomTeam/wecom-cli` at commit `4c74ff2`, because upstream publishes the skills only in that repository and not in the npm package. Only `wecomcli-shared/SKILL.md` differs: it uses the plugin's `wecom-cli` instead of installing one, and sends authorization to the plugin page. References are ordinary files in each skill's directory. +[`skills/wecom/SKILL.md`](skills/wecom/SKILL.md) is the only skill: the DSH guidance, an index of the guides, and how to open them. [`skills/wecom/guides/`](skills/wecom/guides) is an unchanged copy of `skills/` from `WecomTeam/wecom-cli` at commit `4c74ff2`, because upstream publishes the skills only in that repository and not in the npm package. The filesystem provider discovers only `//SKILL.md`, so the guides are not separate skills. Where the DSH guidance and `wecomcli-shared` disagree, the entry tells the agent to follow the DSH guidance: it uses the plugin's `wecom-cli` instead of installing one, and sends authorization to the plugin page. References are ordinary files in each guide's directory. @@ -95,11 +95,11 @@ The generated [config catalog](../../../docs/config-catalog.md#deepseek-aidsh-we #### What the model sees -Each of the 15 bundled skills appears in the skill catalog with its upstream name and Chinese description; the catalog owner shortens long descriptions. The `wecomcli-shared` description tells the agent to check authorization before the first `wecom-cli` command and to send the user to the WeCom plugin page when it is missing. +The skill catalog lists one `wecom` skill. Its Chinese description names the WeCom features it covers and tells the agent to load it, then read the matching guide, whenever the user mentions WeCom or those features or gives a `doc.weixin.qq.com` or `drive.weixin.qq.com` link. #### Token effect -The entries stay in context while the plugin is loaded. Their names and descriptions total about 3,700 characters. +The entry stays in context while the plugin is loaded. Its name and description total about 160 characters. #### KV Cache effect @@ -109,11 +109,11 @@ The catalog is fixed for one plugin version. Loading or unloading the plugin cha #### What the model sees -A `skill` tool result contains the skill's `SKILL.md` body, and its resource base is the skill's directory, so referenced files are read with the ordinary file tools. The `wecomcli-shared` body tells the agent to run the plugin's `wecom-cli` by name, to ask the user to connect on the plugin page before running `auth init --noninteractive` itself, and to run that command with single-command approval. +A `skill` tool result for `wecom` contains about 2,000 characters: the DSH guidance, an index that gives each of the 15 guides one sentence with the upstream routing rules, and how to open a guide. The DSH guidance tells the agent to run the plugin's `wecom-cli` by name, to ask the user to connect on the plugin page before running `auth init --noninteractive` itself, and to run that command with single-command approval; it takes precedence over `wecomcli-shared` where they disagree. Its resource base is `skills/wecom`, so the agent opens `guides//SKILL.md` with the file tools rather than the `skill` tool, treats a skill the guides name as that guide, and resolves a guide's relative paths against the guide's own directory. #### Token effect -Each load adds one body to the retained tool history. Reference files arrive as ordinary file-read output. +Each load adds the entry body to the retained tool history. Guides and their reference files arrive as ordinary file-read output. #### KV Cache effect @@ -127,7 +127,7 @@ Loading appends a tool result and does not rewrite earlier context. - The plugin requires a subprocess runtime on this Host and fails to load when the composition's subprocess runtime runs elsewhere, such as over SSH. - The plugin uses the CLI's default configuration. Authorizing from DSH affects the user's own terminal, and there is no DSH-private bot or bot picker. `wecom-cli` cannot revoke the authorization, so neither the page nor turning the plugin off removes it. - Connection reads the QR-code link from the plain-text output of `auth init --noninteractive --no-browser`; a CLI version that changes that output fails the connection with a retryable result. -- The bundled skills follow upstream commit `4c74ff2`; updating them is a manual copy that must keep the `wecomcli-shared` changes. +- The guides follow upstream commit `4c74ff2`; updating them is a manual copy, after which the entry's index and DSH guidance must be checked against the new guides. ### Dev Note @@ -135,6 +135,6 @@ Loading appends a tool result and does not rewrite earlier context.
Working context for maintainers — click to expand -`.gitattributes` marks `skills/**` as vendored and exempts it from whitespace checks, so the copy keeps upstream whitespace. Specs and the `wecom-skills` session snapshot use stand-in executables through `binDir`. +`.gitattributes` marks `skills/wecom/guides/**` as vendored and exempts it from whitespace checks, so the copy keeps upstream whitespace; the entry `SKILL.md` gets ordinary checks. Specs and the `wecom-skills` session snapshot use stand-in executables through `binDir`.
diff --git a/packages/connector/wecom-cli/README.zh.md b/packages/connector/wecom-cli/README.zh.md index 14a85505f3..c88733a8bf 100644 --- a/packages/connector/wecom-cli/README.zh.md +++ b/packages/connector/wecom-cli/README.zh.md @@ -9,7 +9,7 @@ kind: "package-reference" ## 概述 -本包是[企业微信插件](../wecom/README.zh.md)的 Host 行。它安装固定版本的 `@wecom/cli`,把其 `wecom-cli` 可执行文件放进私有 Shell PATH,并注册随包提供的官方企业微信技能。它的 `wecom` Remote 为[企业微信插件页面](../../client/ui-wecom/README.zh.md)检查 CLI 的授权、通过 CLI 的扫码页面绑定机器人,以及取消操作。CLI 把机器人凭据保存在默认配置中,与用户自己的终端共用。仅支持 macOS。 +本包是[企业微信插件](../wecom/README.zh.md)的 Host 行。它安装固定版本的 `@wecom/cli`,把其 `wecom-cli` 可执行文件放进私有 Shell PATH,并注册一个 `wecom` skill,其子指南是官方企业微信技能。它的 `wecom` Remote 为[企业微信插件页面](../../client/ui-wecom/README.zh.md)检查 CLI 的授权、通过 CLI 的扫码页面绑定机器人,以及取消操作。CLI 把机器人凭据保存在默认配置中,与用户自己的终端共用。仅支持 macOS。 ## 目录 @@ -31,7 +31,7 @@ kind: "package-reference" ### 获得的能力 -插件加载后,`wecomcli-doc`、`wecomcli-message`、`wecomcli-shared` 等官方 skill 进入 skill 目录。agent 用 `skill` 工具加载其中一个,并在当前沙箱与审批策略下通过普通 Shell 工具运行 `wecom-cli` 命令。`wecom-cli auth show --status` 报告未授权时,agent 会请用户到插件页连接企业微信;只有用户要求在对话中完成时,才运行 CLI 自带的 `auth init`,并因为它会在工作区之外写入而申请单条命令审批。 +插件加载后,一个 `wecom` skill 进入 skill 目录。agent 用 `skill` 工具加载它,用文件工具打开所需的子指南(例如 `wecomcli-doc` 或 `wecomcli-message`),并在当前沙箱与审批策略下通过普通 Shell 工具运行 `wecom-cli` 命令。`wecom-cli auth show --status` 报告未授权时,agent 会请用户到插件页连接企业微信;只有用户要求在对话中完成时,才运行 CLI 自带的 `auth init`,并因为它会在工作区之外写入而申请单条命令审批。 在 Plugin Manager 中关闭该行会为后续 Shell 调用撤下 skill 与私有 PATH 条目,CLI 的授权保持不变。 @@ -70,7 +70,7 @@ kind: "package-reference" [`src/index.ts`](src/index.ts) 是注册为 `ctx.wecom` 的 Remote 服务。它要求 subprocess 运行时位于本 Host,检查 `binDir/wecom-cli` 是否可执行,把 `binDir` 作为 `wecom` PATH 贡献注册到 [Shell 环境](../../shell/shell-env/README.zh.md),并在本包的 `skills/` 目录上挂载一个名为 `wecom` 的[文件系统 skill 提供方](../../skill/skill-filesystem/README.zh.md),不包含默认根目录,也不监听变化。[`src/directory.ts`](src/directory.ts) 定位 `@wecom/cli` 作为可选依赖安装的平台包。[CLI 账号库](../cli-account/README.zh.md)在私有 PATH 上运行每条命令,使后端与 Shell 使用同一个可执行文件,并一次执行一个操作。[`src/account.ts`](src/account.ts) 在该运行时上实现企业微信的命令,并从 `auth init` 的输出行中读取扫码链接。释放时取消进行中的操作,中止正在运行的命令,并在这些进程退出后完成。 -[`skills/`](skills) 复制自 `WecomTeam/wecom-cli` 在提交 `4c74ff2` 时的 `skills/`,因为上游只在该仓库发布这些 skill,没有放进 npm 包。只有 `wecomcli-shared/SKILL.md` 有改动:它使用插件提供的 `wecom-cli`,不再自行安装,并把授权引导到插件页。引用文件是每个 skill 目录中的普通文件。 +[`skills/wecom/SKILL.md`](skills/wecom/SKILL.md) 是唯一的 skill:DSH 指引、子指南索引和打开方式。[`skills/wecom/guides/`](skills/wecom/guides) 原样复制自 `WecomTeam/wecom-cli` 在提交 `4c74ff2` 时的 `skills/`,因为上游只在该仓库发布这些 skill,没有放进 npm 包。文件系统提供方只发现 `//SKILL.md`,因此子指南不是独立的 skill。DSH 指引与 `wecomcli-shared` 不一致时,总入口要求 agent 以 DSH 指引为准:使用插件提供的 `wecom-cli`,不再自行安装,并把授权引导到插件页。引用文件是每个子指南目录中的普通文件。 @@ -95,11 +95,11 @@ kind: "package-reference" #### 模型看到什么 -随包提供的 15 个 skill 都以上游名称和中文描述出现在 skill 目录中;过长的描述由目录所有者缩短。`wecomcli-shared` 的描述要求 agent 在首次运行 `wecom-cli` 命令前检查授权,未授权时引导用户到企业微信插件页面。 +skill 目录只列出一个 `wecom` skill。其中文描述列出它覆盖的企业微信功能,并要求 agent 在用户提到企业微信或这些功能、或给出 `doc.weixin.qq.com`、`drive.weixin.qq.com` 链接时加载它,再读取对应的子指南。 #### Token 影响 -插件加载期间这些条目一直留在上下文中。其名称与描述合计约 3,700 个字符。 +插件加载期间这一条目一直留在上下文中。其名称与描述合计约 160 个字符。 #### KV Cache 影响 @@ -109,11 +109,11 @@ kind: "package-reference" #### 模型看到什么 -`skill` 工具结果包含该 skill 的 `SKILL.md` 正文,其资源根目录是该 skill 的目录,因此引用文件用普通文件工具读取。`wecomcli-shared` 正文要求 agent 按名称运行插件提供的 `wecom-cli`,先请用户到插件页连接,再考虑自行运行 `auth init --noninteractive`,并以单条命令审批运行该命令。 +`wecom` 的 `skill` 工具结果约 2,000 个字符:DSH 指引、为 15 个子指南各写一句话并保留上游分流规则的索引,以及打开子指南的方式。DSH 指引要求 agent 按名称运行插件提供的 `wecom-cli`,先请用户到插件页连接,再考虑自行运行 `auth init --noninteractive`,并以单条命令审批运行该命令;与 `wecomcli-shared` 不一致时以它为准。其资源根目录是 `skills/wecom`,因此 agent 用文件工具而不是 `skill` 工具打开 `guides//SKILL.md`,把子指南按名字提到的技能当作对应子指南,并按子指南自己的目录解析其中的相对路径。 #### Token 影响 -每次加载把一份正文加入保留的工具历史。引用文件作为普通的文件读取输出返回。 +每次加载把总入口正文加入保留的工具历史。子指南及其引用文件作为普通的文件读取输出返回。 #### KV Cache 影响 @@ -127,7 +127,7 @@ kind: "package-reference" - 插件要求 subprocess 运行时位于本 Host;组合中的 subprocess 运行时在别处运行(例如通过 SSH)时,插件加载失败。 - 插件使用 CLI 的默认配置。在 DSH 中授权会影响用户自己的终端,没有 DSH 私有机器人或机器人选择器。`wecom-cli` 无法撤销授权,因此页面和关闭插件都不会移除它。 - 连接从 `auth init --noninteractive --no-browser` 的纯文本输出中读取扫码链接;CLI 版本改变该输出时,连接以可重试的结果失败。 -- 随包 skill 跟随上游提交 `4c74ff2`;更新时需手动复制,并保留 `wecomcli-shared` 的改动。 +- 子指南跟随上游提交 `4c74ff2`;更新时需手动复制,之后要按新的子指南核对总入口的索引和 DSH 指引。 ### 开发备注 @@ -135,6 +135,6 @@ kind: "package-reference"
维护者工作上下文——点击展开 -`.gitattributes` 把 `skills/**` 标为 vendored 并免除空白检查,使复制的文件保留上游空白。单测与 `wecom-skills` 会话快照通过 `binDir` 使用替身可执行文件。 +`.gitattributes` 把 `skills/wecom/guides/**` 标为 vendored 并免除空白检查,使复制的文件保留上游空白;总入口 `SKILL.md` 照常检查。单测与 `wecom-skills` 会话快照通过 `binDir` 使用替身可执行文件。
diff --git a/packages/connector/wecom-cli/skills/wecom/SKILL.md b/packages/connector/wecom-cli/skills/wecom/SKILL.md new file mode 100644 index 0000000000..9c69780565 --- /dev/null +++ b/packages/connector/wecom-cli/skills/wecom/SKILL.md @@ -0,0 +1,39 @@ +--- +name: wecom +description: 企业微信插件:通过 wecom-cli 使用企业微信的通讯录、消息、日程、在线会议、待办、邮件、微盘、文档、在线表格、智能表格、智能文档和 PPT。用户提到企业微信或这些功能,或给出 doc.weixin.qq.com、drive.weixin.qq.com 链接时,先加载本技能,再按索引读取对应子指南。 +--- + +# 企业微信插件 + +## DSH 指引 + +- 在面向用户的回复中,把这项集成称为“企业微信插件”。`wecom-cli` 由企业微信插件安装并加入 Host Shell 的 PATH,直接按名称运行。不要执行 `npm install -g @wecom/cli`,也不要用其他方式另装或升级 `wecom-cli`。 +- `wecom-cli` 的授权保存在这台电脑的默认配置目录,与用户自己终端里的 `wecom-cli` 共用。 +- 首次运行业务命令前,先读 `wecomcli-shared` 子指南并按它检查授权。本节与该子指南冲突时以本节为准:它 Step 1 的版本检查不需要安装或升级;它 Step 3 的初始化改为下一条。 +- 未授权时,先请用户在「插件」中打开企业微信插件页面,点击“连接企业微信”并用企业微信扫码授权;用户完成后重新检查授权。只有用户要求在本次对话中完成授权时,才执行 `wecom-cli auth init --noninteractive`:它会输出扫码链接和二维码,并最多等待 5 分钟扫码,把扫码链接告诉用户。它会把凭据写到工作区之外,保存被拒绝时这次扫码也会作废:从一开始就用 Shell 工具的单条命令审批运行。 +- 其他 `wecom-cli` 命令在现有沙箱中运行;只有凭据、缓存或日志写入被拒绝时,才申请单条命令审批。 +- 不要索取或输出 Bot Secret、token 等凭据。 + +## 子指南索引 + +- `wecomcli-shared`:授权检查和所有子指南共用的输出约束(ID 类字段不外露);首次运行 `wecom-cli` 业务命令前先读。 +- `wecomcli-contact`:按姓名、拼音、英文名或别名搜索通讯录,查询 userid、部门和职务。 +- `wecomcli-message`:查询可以发消息的会话,向单聊或群聊发送文本、Markdown、图片、文件、语音或视频。 +- `wecomcli-calendar`:不含在线会议链接的日程、会议室预订和查忙闲;用户只说“开会”“约个会”时,先按本指南或 `wecomcli-meeting` 的消歧流程追问,不要直接创建。 +- `wecomcli-meeting`:含会议号或入会链接的在线会议的创建、查询、纪要、转写、更新和取消;消歧规则同上。 +- `wecomcli-todo`:待办的创建、完成、查询筛选和修改。 +- `wecomcli-email`:邮件的收发、搜索和详情;只有用户明确提到邮箱或邮件时,才用它发送日程或会议邀请。 +- `wecomcli-disk`:微盘(网盘、共享空间)中文件的列出、搜索、元信息、位置、上传、下载和重命名;在线文档的内容读写交给对应的文档子指南。 +- `wecomcli-media`:按 media_id 下载媒体文件,或上传本地文件换取 media_id;只搬运文件,不解析内容。 +- `wecomcli-doc-manage`:各类文档的搜索(含最近浏览)、改名、成员权限和加入规则。 +- `wecomcli-smartpage`:智能文档;用户只说“文档”“新建文档”“整理成文档”等未指定类型时使用,也负责把 .md 导入为文档。 +- `wecomcli-doc`:doc 文档;仅当用户明确说 doc、docx、word、在线文档或 office 文档,或给出 `doc.weixin.qq.com/doc/` 链接时使用。 +- `wecomcli-smartsheet`:智能表格的记录、字段、视图、图表和样式;用户没有明确说“在线表格”时默认使用。 +- `wecomcli-sheet`:在线表格;用户明确说“在线表格”或“excel 表格”、要导入 CSV 或 Excel,或给出 `doc.weixin.qq.com/sheet/` 链接时使用。 +- `wecomcli-pptx`:生成、编辑在线 PPT,或把本地 .ppt、.pptx 导入为在线文档;只读取本地 PPT 内容时改用 `wecomcli-media`。 + +## 打开子指南 + +- 子指南不是独立的 skill,不要用 `skill` 工具加载;用文件读取工具打开本技能目录下的 `guides/<名字>/SKILL.md`。 +- 子指南正文按名字提到的技能(例如“wecomcli-shared 技能”“改用 wecomcli-meeting 技能”)就是 `guides/<名字>/SKILL.md`,同样用文件读取工具打开。 +- 子指南中的相对路径(例如 `references/...`、`../wecomcli-calendar/...`)相对该子指南自己的目录 `guides/<名字>/`。 diff --git a/packages/connector/wecom-cli/tests/plugin.spec.ts b/packages/connector/wecom-cli/tests/plugin.spec.ts index 34f091c626..ef5fbe5dd8 100644 --- a/packages/connector/wecom-cli/tests/plugin.spec.ts +++ b/packages/connector/wecom-cli/tests/plugin.spec.ts @@ -1,4 +1,4 @@ -import { readdir, rm } from 'node:fs/promises' +import { rm } from 'node:fs/promises' import { Context } from '@deepseek-ai/cordis' import SkillRegistry from '@deepseek-ai/dsh-skill' import * as ShellEnv from '@deepseek-ai/dsh-shell-env' @@ -7,7 +7,6 @@ import Wecom from '../src/index.ts' import { createBinDir, ScriptedSubprocess } from './harness.ts' const CONFIG = { commandTimeoutMs: 5_000 } -const SKILLS_DIR = new URL('../skills/', import.meta.url) describe('WeCom plugin', () => { let ctx: Context @@ -29,15 +28,15 @@ describe('WeCom plugin', () => { await rm(binDir, { recursive: true, force: true }) }) - it('publishes the bundled skills under the wecom provider and loads the DSH-adapted shared skill', async () => { + it('publishes one wecom entry skill whose body carries the DSH guidance', async () => { await ctx.plugin(Wecom, { ...CONFIG, binDir }) const catalog = await ctx.skills.list() - expect(catalog.map(skill => skill.name).sort()).toEqual((await readdir(SKILLS_DIR)).sort()) - expect(new Set(catalog.map(skill => `${skill.provider}/${skill.source}`))).toEqual(new Set(['wecom/bundled'])) + expect(catalog.map(skill => `${skill.provider}/${skill.source}/${skill.name}`)).toEqual(['wecom/bundled/wecom']) - const shared = await ctx.skills.get('wecomcli-shared') - expect(shared?.content).toContain('在 DSH 中,`wecom-cli` 由企业微信插件安装并加入 Host Shell 的 PATH') + const entry = await ctx.skills.get('wecom') + expect(entry?.content).toContain('`wecom-cli` 由企业微信插件安装并加入 Host Shell 的 PATH') + expect(await ctx.skills.get('wecomcli-shared')).toBeUndefined() }) it('refuses to load without a Host subprocess runtime', () => { diff --git a/packages/connector/wecom-cli/tests/skills.spec.ts b/packages/connector/wecom-cli/tests/skills.spec.ts new file mode 100644 index 0000000000..69bb473648 --- /dev/null +++ b/packages/connector/wecom-cli/tests/skills.spec.ts @@ -0,0 +1,37 @@ +/** The bundled entry skill: its index names exactly the upstream guides, and it reaches the model below the pruner threshold. */ +import { readdirSync, readFileSync, statSync } from 'node:fs' +import { join } from 'node:path' +import { fileURLToPath } from 'node:url' +import { renderSkillContent } from '@deepseek-ai/dsh-skill' +import { expect, it } from 'vitest' + +const entry = fileURLToPath(new URL('../skills/wecom/', import.meta.url)) +const guides = join(entry, 'guides') + +/** + * `packages/bundle/web-app/presets/standard.patch.yml` prunes a tool result only above `thresholdChars: 8192` + * code points; a skill result below it reaches the model intact. + */ +const PRUNER_THRESHOLD_CHARS = 8192 + +/** The body the `skill` tool returns: the file without its YAML frontmatter. */ +function body(): string { + const text = readFileSync(join(entry, 'SKILL.md'), 'utf8') + const end = text.indexOf('\n---\n', 4) + return text.slice(end + '\n---\n'.length) +} + +it('ships only the wecom entry at the bundled skill root', () => { + expect(readdirSync(fileURLToPath(new URL('../skills/', import.meta.url)))).toEqual(['wecom']) +}) + +it('renders the entry below the pruner threshold', () => { + const rendered = renderSkillContent({ name: 'wecom', provider: 'wecom', resourceBase: { kind: 'directory', path: entry }, content: body() }) + expect(Array.from(rendered).length).toBeLessThan(PRUNER_THRESHOLD_CHARS) +}) + +it('indexes every upstream guide exactly once, and each indexed guide exists', () => { + const indexed = [...body().matchAll(/^- `(wecomcli-[a-z-]+)`:/gmu)].map(match => match[1] ?? '') + expect(indexed.toSorted()).toEqual(readdirSync(guides).toSorted()) + for (const name of indexed) expect(() => statSync(join(guides, name, 'SKILL.md')), name).not.toThrow() +}) diff --git a/snapshots/session/wecom-skills/session.v4.jsonl b/snapshots/session/wecom-skills/session.v4.jsonl index 216d8df323..06d17aa6cd 100644 --- a/snapshots/session/wecom-skills/session.v4.jsonl +++ b/snapshots/session/wecom-skills/session.v4.jsonl @@ -9,7 +9,7 @@ {"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"} {"type":"user/message","data":{"content":[{"type":"text","text":"Check the WeCom authorization with wecom-cli, then reply DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"} {"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"\nA skill is a reusable set of task-specific instructions. The following skills are available in this session:\n\n\n- `wecomcli-calendar`: 企业微信日程管理。当用户需要预约日程、预订会议室、查看/更新/取消日程或查忙闲时触发。本技能负责『日程』——即不含在线会议链接的安排(也涵盖纯线下面对面碰头);若用户要的是『在线会议』(含会议号/入会链接、可远程或视频参会),改用 wecomcli-meeting 技能。用户仅说'开会/约个会/某会'等、未明确要创建的是日程还是在线会议时,必须先读取本技能并按其中的消歧流程向用户追问确认后再处理,不可臆断直接创建。\n- `wecomcli-contact`: 使用 wecom-cli 按姓名、拼音、英文名或别名搜索企业微信通讯录中的人员,并查询匹配人员的 userid、部门和职务。适用于查找联系人、区分同名人员、获取用户 userid,以及列出全部同名人员。\n- `wecomcli-disk`: 企业微信微盘(Disk / 网盘)文件操作技能。承接\"微盘 / 网盘\"里的文件列出、搜索、读取元信息、上传、下载、重命名、新建文件夹操作。用户明确提到\"微盘\"/\"网盘\"/\"共享空间\"时必须先读取本技能获取完整指引,不得凭记忆处理。用户说\"上传到微盘\"、\"帮我在微盘里搜一下 xxx\"、\"微盘那个 PPT 在哪\"、\"下载微盘那个文件\"、\"把微盘那个文件重命名成 xxx\"、或直接给出 `https://drive.weixin.qq.com/s?k=...` 形式的微盘文件链接时使用本技能。与 `wecomcli-doc` / `wecomcli-sheet` / `wecomcli-smartsheet` / `wecomcli-smartpage` 的区别:本技能处理微盘里所有文件(含在线文档)的搜索/列表/基础信息/位置/路径/重命名等文件级操作;在线文档(`doc/sheet/smartsheet/smartpage` 类型)的内容读写走对应文档技能,不由本技能接管。当用户问「这个文档在微盘哪里」或问某文件在微盘的位置时,由本技能用 get 返回空间名/文件夹名/路径等元信息。\n- `wecomcli-doc`: 企业微信在线 doc 文档技能。能够新建 doc、导入本地 .doc/.docx/.txt 为 doc、读取 doc 内容、向 doc 追加或覆盖写入。仅当用户明确出现「doc」「docx」「word」「在线文档」「office 文档」等强类型词,或提供 https://doc.weixin.qq.com/doc/xxx 链接时才使用本技能。用户说\"文档\"\"新建文档\"\"写文档\"\"整理成文档\"\"输出到文档\"等未指定类型的泛化表达,一律使用 wecomcli-smartpage。\n- `wecomcli-doc-manage`: 企业微信文档公共管理:搜索文档(最近浏览/创建)、文档改名、添加文档成员权限、设置文档加入规则。适用于所有文档类型(doc文档 / 在线表格 / 智能表格 / 智能文档)。新建或导入doc文档请使用 wecomcli-doc;新建或导入在线表格请使用 wecomcli-sheet;智能表格内容 CRUD 请使用 wecomcli-smartsheet;生成智能文档请使用 wecomcli-smartpage。\"看过哪些文档/浏览历史\"类需求走本技能,不要走 wecom_get_user_memory。\n- `wecomcli-email`: 企业微信邮件:发送/回复/转发邮件、搜索邮件列表、获取邮件详情(正文、附件、内嵌图片解析),支持通过邮件发送日程邀约和会议预定。当用户涉及内部邮件收发、邮件查询、邮件管理等需求时使用。注意:日程和会议有单独的技能,仅当用户明确提到\"邮箱\"或\"邮件\"时(如\"通过邮箱发送会议邀请\"、\"发封会议邮件\"),才使用本技能处理会议日程邮件。\n- `wecomcli-media`: 企业微信媒体文件上传/下载技能。承接基于 media_id 下载媒体文件到本地,以及上传本地文件获取 media_id 两类操作。当其他技能(微盘、邮件等)返回了 media_id 需要落地为本地文件,或已有本地文件需要转换为 media_id 供其他技能使用时,必须先读取本技能获取完整指引,不得凭记忆处理。本技能不解析/识别文件内容,仅负责文件本身的搬运。\n- `wecomcli-meeting`: 企业微信会议管理。本技能负责『在线会议』——即含在线会议链接(含会议号/入会链接、可远程或视频参会)的会议的创建、查询、搜索、获取详情(含会议信息、纪要、待办)、查询会议转写原文(逐字发言记录)、更新、取消等全部操作;若用户要的是不含在线会议链接的『日程』(也涵盖纯线下面对面碰头),改用 wecomcli-calendar 技能。用户仅说'开会/约个会/某会/某会议'等、未明确要创建的是日程还是在线会议时,必须先读取本技能并按其中的消歧流程向用户追问确认后再处理,不可臆断直接创建。\n- `wecomcli-message`: 查询当前可以发送消息的聊天会话范围,并向会话列表中的单聊或群聊发送文本、Markdown、图片、文件、语音、视频消息。用户要求“给某人发消息”“在某个群里通知”“给最近会话发消息”或“把图片/文件/语音/视频发到企业微信”时使用。\n- `wecomcli-pptx`: 企业微信 PPT 技能。三类能力:(1) 生成 PPT——根据主题、大纲、文档或参考材料创建在线演示文稿;(2) 编辑在线 PPT;(3) 导入 PPT——把本地 .ppt/.pptx 导入为企微在线文档。生成与编辑一律作用于企微在线 slide 文档,交付形态为在线文档链接。当用户提到'做个PPT'、'生成演示文稿'、'写份汇报PPT'、'把这份文档转成PPT'、'照着这个模板做几页'、'改第3页标题'、'把这页图表数据换掉'、'加一页总结'、'封面换个配色'、'导入PPT'等表述,或提供本地 .ppt/.pptx 要求导入时触发。用户在本会话里已生成过 PPT 后追加的任何页面级改动('第二页再加张图'、'这几页顺序调一下')同样走本技能。若只读取/解析本地 PPT 文件内容(不编辑)请改用 wecomcli-media。\n- `wecomcli-shared`: wecom-cli 业务技能的公共前置检查、获取机器人及授权真人身份,以及通用输出约束。任何 wecomcli-* 技能首次准备执行 wecom-cli 命令前,都必须同时读取本技能,检查企业微信凭证是否已授权;未授权时引导用户在企业微信插件页面扫码授权。本技能还定义所有技能通用的 ID 类字段禁止外露约束。本技能不处理具体业务请求。\n- `wecomcli-sheet`: 企业微信在线表格文档管理:新建在线表格、导入 CSV/Excel 为在线表格、读取表格信息与数据、修改表格内容、追加行数据、子表管理。当用户提到'表格'、'在线表格'、'excel表格'这些关键词触发,或链接形如 https://doc.weixin.qq.com/sheet/xxx 时触发。文档公共操作请使用 wecomcli-doc-manage;doc文档操作请使用 wecomcli-doc;智能表格内容 CRUD 请使用 wecomcli-smartsheet。\n- `wecomcli-smartpage`: 企业微信智能文档(smartpage)操作技能。能够新建文档、导入 .md 为文档、读取文档内容、修改文档内容(整页重写、局部编辑、增删子页面)、上传附件到文档,以及搭建带看板/图表的数据系统页面和信息收集表单页面。当用户提及文档,智能文档,智能主页、提供 https://doc.weixin.qq.com/smartpage/xxx 或 https://page.weixin.qq.com/smartpage/xxx 链接、要求整理成文档,或表达\"新建文档\"\"把 md 导入成文档\"等未指定文档类型的需求时,也应使用本技能。\n- `wecomcli-smartsheet`: 企业微信智能表格内容操作技能——专注于智能表格(smartsheet)的数据、结构与样式管理:读取表结构与记录、管理子表/字段/记录/视图/图表,以及修改行列样式(填色/高亮);记录新增或更新遇到 851003 / no authority 时通过 Webhook 兜底写入。触发条件:用户提到智能表格、企微表格、smartsheet 的内容操作或样式修改,或链接形如 https://doc.weixin.qq.com/smartsheet/s3_xxx。企业微信表格分为「智能表格」和「在线表格」两种类型,本文档介绍的是智能表格的相关技能。智能表格包含子表(sheet)、视图(view)、字段/列(field),每条记录(record)以 `record_id` 作为主键,结构类似关系型数据库。当用户未明确说明使用「在线表格」时,一律默认使用功能更强大的智能表格(本技能)。\n- `wecomcli-todo`: 管理企业微信待办,支持创建、删除或退出、完成、查询和筛选,以及修改标题、描述、参与人名单和截止时间。\n\n\nIf the user names a skill, or the task clearly matches a skill's description, call the `skill` tool with the exact skill name before taking task actions. Load all applicable skills, then follow their full instructions. This catalog contains summaries only; do not infer or follow a skill's instructions until it has been loaded.\nA user may also invoke a skill directly; its block then appears in this conversation. Follow it, and do not call the `skill` tool again for that skill.\n"}],"source":{"kind":"skill-catalog","form":"catalog","entries":[{"name":"wecomcli-calendar","description":"企业微信日程管理。当用户需要预约日程、预订会议室、查看/更新/取消日程或查忙闲时触发。本技能负责『日程』——即不含在线会议链接的安排(也涵盖纯线下面对面碰头);若用户要的是『在线会议』(含会议号/入会链接、可远程或视频参会),改用 wecomcli-meeting 技能。用户仅说'开会/约个会/某会'等、未明确要创建的是日程还是在线会议时,必须先读取本技能并按其中的消歧流程向用户追问确认后再处理,不可臆断直接创建。"},{"name":"wecomcli-contact","description":"使用 wecom-cli 按姓名、拼音、英文名或别名搜索企业微信通讯录中的人员,并查询匹配人员的 userid、部门和职务。适用于查找联系人、区分同名人员、获取用户 userid,以及列出全部同名人员。"},{"name":"wecomcli-disk","description":"企业微信微盘(Disk / 网盘)文件操作技能。承接\"微盘 / 网盘\"里的文件列出、搜索、读取元信息、上传、下载、重命名、新建文件夹操作。用户明确提到\"微盘\"/\"网盘\"/\"共享空间\"时必须先读取本技能获取完整指引,不得凭记忆处理。用户说\"上传到微盘\"、\"帮我在微盘里搜一下 xxx\"、\"微盘那个 PPT 在哪\"、\"下载微盘那个文件\"、\"把微盘那个文件重命名成 xxx\"、或直接给出 `https://drive.weixin.qq.com/s?k=...` 形式的微盘文件链接时使用本技能。与 `wecomcli-doc` / `wecomcli-sheet` / `wecomcli-smartsheet` / `wecomcli-smartpage` 的区别:本技能处理微盘里所有文件(含在线文档)的搜索/列表/基础信息/位置/路径/重命名等文件级操作;在线文档(`doc/sheet/smartsheet/smartpage` 类型)的内容读写走对应文档技能,不由本技能接管。当用户问「这个文档在微盘哪里」或问某文件在微盘的位置时,由本技能用 get 返回空间名/文件夹名/路径等元信息。"},{"name":"wecomcli-doc","description":"企业微信在线 doc 文档技能。能够新建 doc、导入本地 .doc/.docx/.txt 为 doc、读取 doc 内容、向 doc 追加或覆盖写入。仅当用户明确出现「doc」「docx」「word」「在线文档」「office 文档」等强类型词,或提供 https://doc.weixin.qq.com/doc/xxx 链接时才使用本技能。用户说\"文档\"\"新建文档\"\"写文档\"\"整理成文档\"\"输出到文档\"等未指定类型的泛化表达,一律使用 wecomcli-smartpage。"},{"name":"wecomcli-doc-manage","description":"企业微信文档公共管理:搜索文档(最近浏览/创建)、文档改名、添加文档成员权限、设置文档加入规则。适用于所有文档类型(doc文档 / 在线表格 / 智能表格 / 智能文档)。新建或导入doc文档请使用 wecomcli-doc;新建或导入在线表格请使用 wecomcli-sheet;智能表格内容 CRUD 请使用 wecomcli-smartsheet;生成智能文档请使用 wecomcli-smartpage。\"看过哪些文档/浏览历史\"类需求走本技能,不要走 wecom_get_user_memory。"},{"name":"wecomcli-email","description":"企业微信邮件:发送/回复/转发邮件、搜索邮件列表、获取邮件详情(正文、附件、内嵌图片解析),支持通过邮件发送日程邀约和会议预定。当用户涉及内部邮件收发、邮件查询、邮件管理等需求时使用。注意:日程和会议有单独的技能,仅当用户明确提到\"邮箱\"或\"邮件\"时(如\"通过邮箱发送会议邀请\"、\"发封会议邮件\"),才使用本技能处理会议日程邮件。"},{"name":"wecomcli-media","description":"企业微信媒体文件上传/下载技能。承接基于 media_id 下载媒体文件到本地,以及上传本地文件获取 media_id 两类操作。当其他技能(微盘、邮件等)返回了 media_id 需要落地为本地文件,或已有本地文件需要转换为 media_id 供其他技能使用时,必须先读取本技能获取完整指引,不得凭记忆处理。本技能不解析/识别文件内容,仅负责文件本身的搬运。"},{"name":"wecomcli-meeting","description":"企业微信会议管理。本技能负责『在线会议』——即含在线会议链接(含会议号/入会链接、可远程或视频参会)的会议的创建、查询、搜索、获取详情(含会议信息、纪要、待办)、查询会议转写原文(逐字发言记录)、更新、取消等全部操作;若用户要的是不含在线会议链接的『日程』(也涵盖纯线下面对面碰头),改用 wecomcli-calendar 技能。用户仅说'开会/约个会/某会/某会议'等、未明确要创建的是日程还是在线会议时,必须先读取本技能并按其中的消歧流程向用户追问确认后再处理,不可臆断直接创建。"},{"name":"wecomcli-message","description":"查询当前可以发送消息的聊天会话范围,并向会话列表中的单聊或群聊发送文本、Markdown、图片、文件、语音、视频消息。用户要求“给某人发消息”“在某个群里通知”“给最近会话发消息”或“把图片/文件/语音/视频发到企业微信”时使用。"},{"name":"wecomcli-pptx","description":"企业微信 PPT 技能。三类能力:(1) 生成 PPT——根据主题、大纲、文档或参考材料创建在线演示文稿;(2) 编辑在线 PPT;(3) 导入 PPT——把本地 .ppt/.pptx 导入为企微在线文档。生成与编辑一律作用于企微在线 slide 文档,交付形态为在线文档链接。当用户提到'做个PPT'、'生成演示文稿'、'写份汇报PPT'、'把这份文档转成PPT'、'照着这个模板做几页'、'改第3页标题'、'把这页图表数据换掉'、'加一页总结'、'封面换个配色'、'导入PPT'等表述,或提供本地 .ppt/.pptx 要求导入时触发。用户在本会话里已生成过 PPT 后追加的任何页面级改动('第二页再加张图'、'这几页顺序调一下')同样走本技能。若只读取/解析本地 PPT 文件内容(不编辑)请改用 wecomcli-media。"},{"name":"wecomcli-shared","description":"wecom-cli 业务技能的公共前置检查、获取机器人及授权真人身份,以及通用输出约束。任何 wecomcli-* 技能首次准备执行 wecom-cli 命令前,都必须同时读取本技能,检查企业微信凭证是否已授权;未授权时引导用户在企业微信插件页面扫码授权。本技能还定义所有技能通用的 ID 类字段禁止外露约束。本技能不处理具体业务请求。"},{"name":"wecomcli-sheet","description":"企业微信在线表格文档管理:新建在线表格、导入 CSV/Excel 为在线表格、读取表格信息与数据、修改表格内容、追加行数据、子表管理。当用户提到'表格'、'在线表格'、'excel表格'这些关键词触发,或链接形如 https://doc.weixin.qq.com/sheet/xxx 时触发。文档公共操作请使用 wecomcli-doc-manage;doc文档操作请使用 wecomcli-doc;智能表格内容 CRUD 请使用 wecomcli-smartsheet。"},{"name":"wecomcli-smartpage","description":"企业微信智能文档(smartpage)操作技能。能够新建文档、导入 .md 为文档、读取文档内容、修改文档内容(整页重写、局部编辑、增删子页面)、上传附件到文档,以及搭建带看板/图表的数据系统页面和信息收集表单页面。当用户提及文档,智能文档,智能主页、提供 https://doc.weixin.qq.com/smartpage/xxx 或 https://page.weixin.qq.com/smartpage/xxx 链接、要求整理成文档,或表达\"新建文档\"\"把 md 导入成文档\"等未指定文档类型的需求时,也应使用本技能。"},{"name":"wecomcli-smartsheet","description":"企业微信智能表格内容操作技能——专注于智能表格(smartsheet)的数据、结构与样式管理:读取表结构与记录、管理子表/字段/记录/视图/图表,以及修改行列样式(填色/高亮);记录新增或更新遇到 851003 / no authority 时通过 Webhook 兜底写入。触发条件:用户提到智能表格、企微表格、smartsheet 的内容操作或样式修改,或链接形如 https://doc.weixin.qq.com/smartsheet/s3_xxx。企业微信表格分为「智能表格」和「在线表格」两种类型,本文档介绍的是智能表格的相关技能。智能表格包含子表(sheet)、视图(view)、字段/列(field),每条记录(record)以 `record_id` 作为主键,结构类似关系型数据库。当用户未明确说明使用「在线表格」时,一律默认使用功能更强大的智能表格(本技能)。"},{"name":"wecomcli-todo","description":"管理企业微信待办,支持创建、删除或退出、完成、查询和筛选,以及修改标题、描述、参与人名单和截止时间。"}]},"role":"user","id":"{{message:4}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"\nA skill is a reusable set of task-specific instructions. The following skills are available in this session:\n\n\n- `wecom`: 企业微信插件:通过 wecom-cli 使用企业微信的通讯录、消息、日程、在线会议、待办、邮件、微盘、文档、在线表格、智能表格、智能文档和 PPT。用户提到企业微信或这些功能,或给出 doc.weixin.qq.com、drive.weixin.qq.com 链接时,先加载本技能,再按索引读取对应子指南。\n\n\nIf the user names a skill, or the task clearly matches a skill's description, call the `skill` tool with the exact skill name before taking task actions. Load all applicable skills, then follow their full instructions. This catalog contains summaries only; do not infer or follow a skill's instructions until it has been loaded.\nA user may also invoke a skill directly; its block then appears in this conversation. Follow it, and do not call the `skill` tool again for that skill.\n"}],"source":{"kind":"skill-catalog","form":"catalog","entries":[{"name":"wecom","description":"企业微信插件:通过 wecom-cli 使用企业微信的通讯录、消息、日程、在线会议、待办、邮件、微盘、文档、在线表格、智能表格、智能文档和 PPT。用户提到企业微信或这些功能,或给出 doc.weixin.qq.com、drive.weixin.qq.com 链接时,先加载本技能,再按索引读取对应子指南。"}]},"role":"user","id":"{{message:4}}"},"surfaceOp":"append"} {"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}} {"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}} {"type":"session/title","data":{"title":"Check the WeCom authorization with","messageSeqs":[8],"source":{"kind":"fallback"}}}