refactor(upstream-skills): register entry skills through the upstreamSkills Service

The package entry now default-exports the Host Service
`ctx.upstreamSkills` and exports only types. A CLI app plugin calls
`register` once with its entry skill and pinned upstream files; the
Service downloads the files, lists the entry skill through `ctx.skills`,
and withdraws both when the plugin unloads.

`skillsUrls` and `skillsTimeoutMs` are Service settings; `skillsDir`
stays a key of each plugin, passed in its registration. The base bundle
loads the Service, so the package gains locale metadata and leaves the
library and optional-package lists. Snapshot compositions that disable
the skill registry disable this row too.
This commit is contained in:
gengruilin committed 2026-11-17 14:08:45 +08:00
1 parent a9c1f67a0b
commit 88e5e057f0
49 files changed
+559 -210

No files matched your search

@@ -9,11 +9,11 @@
en: 755fe8a192cfebe1
zh: 855ad2920b33e364
/agent-note-runtime-download-of-upstream-skills/decision:
en: 05885c37338858df
zh: ad9ec50f3912f784
en: e601879f83a17cba
zh: a5ab03a7804787fc
/agent-note-runtime-download-of-upstream-skills/alternatives-considered:
en: 4fcfd7f7984220ea
zh: 8bd2b82fbe7e3c59
en: 3828cc141c037db6
zh: 3a164d7a5886cbd2
/agent-note-runtime-download-of-upstream-skills/consequences:
en: 124556ff88e9e014
zh: d25070f79bb2c726
@@ -10,7 +10,7 @@ The WeCom and Tencent Meeting plugins index guides that their vendors publish on
## Decision
Each of these plugins keeps only its DSH-authored entry `SKILL.md` and pins the upstream files by repository, commit, kept directory, exclusions, license file, total size, and a digest of the kept files. [`@deepseek-ai/dsh-upstream-skills`](../../../../packages/connector/upstream-skills/README.md) downloads the commit archive from GitHub when the plugin loads, keeps the directory and the license file, verifies them, publishes them in `$DSH_HOME/cache/<plugin>`, and lists the entry skill with that directory as its base directory. The plugin shows the download state beside the account state. Its check reads only the account and restarts a failed download without waiting for it: the CLI account runtime runs one operation at a time, so a check that waited for a slow GitHub download would also hold sign-in. Each archive source has `skillsTimeoutMs` to deliver the whole archive, and reading stops once the kept files exceed the pinned size. `skillsDir` points at prepared files for tests and offline installations, and `skillsUrls` replaces the archive host.
Each of these plugins keeps only its DSH-authored entry `SKILL.md`, pins the upstream files by repository, commit, kept directory, exclusions, license file, total size, and a digest of the kept files, and registers both with `ctx.upstreamSkills`, the Service of [`@deepseek-ai/dsh-upstream-skills`](../../../../packages/connector/upstream-skills/README.md). The Service downloads the commit archive from GitHub when the plugin loads, keeps the directory and the license file, verifies them, publishes them in `$DSH_HOME/cache/<plugin>`, and lists the entry skill with that directory as its base directory. The plugin shows the download state beside the account state. Its check reads only the account and restarts a failed download without waiting for it: the CLI account runtime runs one operation at a time, so a check that waited for a slow GitHub download would also hold sign-in. Each archive source has `skillsTimeoutMs` to deliver the whole archive, and reading stops once the kept files exceed the pinned size. A plugin's `skillsDir` points at prepared files for tests and offline installations, and the Service's `skillsUrls` replaces the archive host for every plugin.
## Alternatives considered
@@ -24,7 +24,7 @@ Each of these plugins keeps only its DSH-authored entry `SKILL.md` and pins the
**A digest of the archive bytes.** The files of a commit archive are stable, but GitHub does not keep its compressed bytes stable, so the digest covers the kept files' paths and contents instead.
**DingTalk's downloader.** DingTalk downloads checksummed release assets together with its executable. WeCom and Tencent Meeting publish no release assets and install their CLIs from npm, so only these two plugins share this library, and DingTalk keeps its own.
**DingTalk's downloader.** DingTalk downloads checksummed release assets together with its executable. WeCom and Tencent Meeting publish no release assets and install their CLIs from npm, so only these two plugins register with this Service, and DingTalk keeps its own downloader.
## Consequences
@@ -10,7 +10,7 @@ Status: implemented
## 决策
这些插件只保留 DSH 自己编写的入口 `SKILL.md`,并按仓库、提交、保留的目录、排除项、许可证文件、总大小和保留文件的摘要固定上游文件。插件加载时,[`@deepseek-ai/dsh-upstream-skills`](../../../../packages/connector/upstream-skills/README.zh.md) 从 GitHub 下载这个提交的归档,保留该目录和许可证文件,校验后发布到 `$DSH_HOME/cache/<插件>`,再列出入口技能,并把这个目录作为它的基础目录。插件在账号状态旁显示下载状态。它的检查只读取账号,并在不等待的情况下重新开始失败的下载:CLI 账号运行时一次只执行一个操作,检查若等待缓慢的 GitHub 下载,登录也会被占住。每个归档来源要在 `skillsTimeoutMs` 内送达完整归档,保留文件超过固定的大小时停止读取。`skillsDir` 为测试和离线安装指向准备好的文件,`skillsUrls` 替换归档主机。
这些插件只保留 DSH 自己编写的入口 `SKILL.md`,按仓库、提交、保留的目录、排除项、许可证文件、总大小和保留文件的摘要固定上游文件,并把两者注册到 `ctx.upstreamSkills`,即 [`@deepseek-ai/dsh-upstream-skills`](../../../../packages/connector/upstream-skills/README.zh.md) 的 Service。插件加载时,Service 从 GitHub 下载这个提交的归档,保留该目录和许可证文件,校验后发布到 `$DSH_HOME/cache/<插件>`,再列出入口技能,并把这个目录作为它的基础目录。插件在账号状态旁显示下载状态。它的检查只读取账号,并在不等待的情况下重新开始失败的下载:CLI 账号运行时一次只执行一个操作,检查若等待缓慢的 GitHub 下载,登录也会被占住。每个归档来源要在 `skillsTimeoutMs` 内送达完整归档,保留文件超过固定的大小时停止读取。插件的 `skillsDir` 为测试和离线安装指向准备好的文件,Service 的 `skillsUrls` 为所有插件替换归档主机。
## 考虑过的替代方案
@@ -24,7 +24,7 @@ Status: implemented
**对归档字节做摘要。** 提交归档中的文件是稳定的,但 GitHub 不保证压缩后的字节稳定,因此摘要覆盖保留文件的路径和内容。
**钉钉的下载器。** 钉钉把带校验和的发布资产和可执行文件一起下载。企业微信和腾讯会议没有发布资产,CLI 从 npm 安装,因此只有这两个插件共用这个库,钉钉保留自己的下载器。
**钉钉的下载器。** 钉钉把带校验和的发布资产和可执行文件一起下载。企业微信和腾讯会议没有发布资产,CLI 从 npm 安装,因此只有这两个插件注册到这个 Service,钉钉保留自己的下载器。
## 影响
+3
View File
@@ -122,6 +122,8 @@ flowchart LR
cfg --> plugin_dsh_base_skill_filesystem
plugin_dsh_base_tool_skill["tool-skill<br/>@deepseek-ai/dsh-tool-skill"]
cfg --> plugin_dsh_base_tool_skill
plugin_dsh_base_upstream_skills["upstream-skills<br/>@deepseek-ai/dsh-upstream-skills"]
cfg --> plugin_dsh_base_upstream_skills
plugin_dsh_base_commands["commands<br/>@deepseek-ai/dsh-commands"]
cfg --> plugin_dsh_base_commands
plugin_dsh_base_command_feedback["command-feedback<br/>@deepseek-ai/dsh-command-feedback"]
@@ -269,6 +271,7 @@ flowchart LR
| `skill` | `@deepseek-ai/dsh-skill` |
| `skill-filesystem` | `@deepseek-ai/dsh-skill-filesystem` |
| `tool-skill` | `@deepseek-ai/dsh-tool-skill` |
| `upstream-skills` | `@deepseek-ai/dsh-upstream-skills` |
| `commands` | `@deepseek-ai/dsh-commands` |
| `command-feedback` | `@deepseek-ai/dsh-command-feedback` |
| `goal` | `@deepseek-ai/dsh-goal` |
+2 -2
View File
@@ -6,5 +6,5 @@
en: 41d772192075e133
zh: 5ef3da69b4de1d8a
/capability-seams-and-core-services:
en: 26d63a422aa5b7b6
zh: bc4bac4b35b7caeb
en: 146bb469e86e42a1
zh: fed7e67ec1fef087
+4
View File
@@ -220,6 +220,8 @@ flowchart LR
pkg_skill_badge["skill-badge"]
pkg_skill_filesystem["skill-filesystem"]
pkg_skill_office["skill-office"]
pkg_upstream_skills["upstream-skills"]
svc_upstreamSkills["ctx.upstreamSkills<br/>Upstream skills of CLI app plugins"]
svc_agents["ctx.agents<br/>Agent service"]
pkg_acp["acp"]
svc_agentDefaultModel["ctx.agentDefaultModel<br/>Default Agent model selection"]
@@ -490,6 +492,7 @@ flowchart LR
pkg_tool_subagent --> svc_subagentModelSelection
pkg_tools --> svc_tools
pkg_typert_registry --> svc_typert
pkg_upstream_skills --> svc_upstreamSkills
pkg_user_approval --> svc_approval
pkg_user_questions --> svc_userQuestions
pkg_web --> svc_web
@@ -759,6 +762,7 @@ flowchart LR
| `ctx.sessionProjections` | `core` | [`session-projection`](../packages/session/session-projection) | - | [`api-session-controller`](../packages/api/session-controller), [`tool-todo`](../packages/todo/tool-todo), [`session-title`](../packages/session/session-title) | - | Domains register state-driven fold units; the eager drive keeps per-session watermark states and the Session controller serves baselines and pushes changed values. |
| `ctx.sessionProjectionCache` | `core` | [`session-projection-cache`](../packages/session/session-projection-cache) | - | [`api-session-controller`](../packages/api/session-controller), [`session-query`](../packages/session-query/session-query), [`session-reference`](../packages/context/session-reference) | - | Durably checkpoints projection unit states per session (throttled + turn/end/detach mandatory points), serves cached projection views, and accelerates prepared-Session projection hydration. |
| `ctx.skills` | `seam` | [`skill`](../packages/skill/skill) | [`sandbox-windows-acl`](../packages/sandbox/sandbox-windows-acl), [`skill-badge`](../packages/experimental/skill-badge), [`skill-filesystem`](../packages/skill/skill-filesystem), [`skill-office`](../packages/skill/skill-office) | [`tool-skill`](../packages/skill/tool-skill) | - | Merges provider skill catalogs; tool-skill renders the session-prefix catalog and loads complete skill bodies. |
| `ctx.upstreamSkills` | `service` | [`upstream-skills`](../packages/connector/upstream-skills) | - | - | - | Holds what each CLI app plugin registers: downloads the pinned upstream files its entry skill indexes from the vendor's GitHub repository, verifies and caches them, and lists the entry skill through `ctx.skills` once they are in place. |
| `ctx.agents` | `core` | [`agent`](../packages/core/agent) | - | [`agent-loop`](../packages/core/agent-loop), [`acp`](../packages/acp/acp), [`subagent`](../packages/subagent/subagent) | - | Owns live Agent handles, the create/resume factory seam, and process-local initiator propagation. |
| `ctx.agentDefaultModel` | `core` | [`agent-default-model`](../packages/core/agent-default-model) | - | [`api-session-controller`](../packages/api/session-controller), [`headless`](../packages/bundle/headless) | - | Reads the default ModelSelection from volatile Config and saves selections through the profile editor. |
| `ctx.agentLoop` | `bundle` | [`agent-loop`](../packages/core/agent-loop) | - | [`base`](../packages/bundle/base), [`sdk-minimal`](../packages/bundle/sdk-minimal) | - | The one concrete loop plugin; extension packages depend on dsh-agent events and services, not on this package. |
+4
View File
@@ -222,6 +222,8 @@ flowchart LR
pkg_skill_badge["skill-badge"]
pkg_skill_filesystem["skill-filesystem"]
pkg_skill_office["skill-office"]
pkg_upstream_skills["upstream-skills"]
svc_upstreamSkills["ctx.upstreamSkills<br/>Upstream skills of CLI app plugins"]
svc_agents["ctx.agents<br/>Agent service"]
pkg_acp["acp"]
svc_agentDefaultModel["ctx.agentDefaultModel<br/>Default Agent model selection"]
@@ -492,6 +494,7 @@ flowchart LR
pkg_tool_subagent --> svc_subagentModelSelection
pkg_tools --> svc_tools
pkg_typert_registry --> svc_typert
pkg_upstream_skills --> svc_upstreamSkills
pkg_user_approval --> svc_approval
pkg_user_questions --> svc_userQuestions
pkg_web --> svc_web
@@ -761,6 +764,7 @@ flowchart LR
| `ctx.sessionProjections` | `core` | [`session-projection`](../packages/session/session-projection) | - | [`api-session-controller`](../packages/api/session-controller), [`tool-todo`](../packages/todo/tool-todo), [`session-title`](../packages/session/session-title) | - | 各领域注册由状态驱动的折叠单元;主动驱动过程维护每个会话的水位状态,Session controller 提供 baseline 并推送发生变化的值。 |
| `ctx.sessionProjectionCache` | `core` | [`session-projection-cache`](../packages/session/session-projection-cache) | - | [`api-session-controller`](../packages/api/session-controller), [`session-query`](../packages/session-query/session-query), [`session-reference`](../packages/context/session-reference) | - | 按会话持久保存投影单元状态的检查点(节流检查点,以及轮次/结束/分离时的必选检查点),提供缓存投影视图,并加速 prepared Session 的投影恢复。 |
| `ctx.skills` | `seam` | [`skill`](../packages/skill/skill) | [`sandbox-windows-acl`](../packages/sandbox/sandbox-windows-acl), [`skill-badge`](../packages/experimental/skill-badge), [`skill-filesystem`](../packages/skill/skill-filesystem), [`skill-office`](../packages/skill/skill-office) | [`tool-skill`](../packages/skill/tool-skill) | - | 合并提供方的 skill(技能)目录;tool-skill 渲染会话前缀目录,并加载完整的 skill 正文。 |
| `ctx.upstreamSkills` | `service` | [`upstream-skills`](../packages/connector/upstream-skills) | - | - | - | 保存每个 CLI 应用插件注册的内容:从厂商 GitHub 仓库下载其入口技能索引的固定上游文件,校验并缓存,文件就位后通过 `ctx.skills` 列出入口技能。 |
| `ctx.agents` | `core` | [`agent`](../packages/core/agent) | - | [`agent-loop`](../packages/core/agent-loop), [`acp`](../packages/acp/acp), [`subagent`](../packages/subagent/subagent) | - | 拥有实时 Agent 句柄、创建/恢复工厂 seam,以及进程本地的发起方传播。 |
| `ctx.agentDefaultModel` | `core` | [`agent-default-model`](../packages/core/agent-default-model) | - | [`api-session-controller`](../packages/api/session-controller), [`headless`](../packages/bundle/headless) | - | Reads the default ModelSelection from volatile Config and saves selections through the profile editor. |
| `ctx.agentLoop` | `bundle` | [`agent-loop`](../packages/core/agent-loop) | - | [`base`](../packages/bundle/base), [`sdk-minimal`](../packages/bundle/sdk-minimal) | - | 唯一的具体循环插件;扩展包依赖 dsh-agent 的事件和服务,而不依赖此包。 |
+19 -1
View File
@@ -4942,6 +4942,25 @@ export interface Config {
```
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-typert-loader -->
<!-- BEGIN GENERATED config-catalog:@deepseek-ai/dsh-upstream-skills -->
<a id="deepseek-aidsh-upstream-skills"></a>
## `@deepseek-ai/dsh-upstream-skills`
- `inject`: `skills`
- `source`: [`packages/connector/upstream-skills/src/index.ts:32`](../packages/connector/upstream-skills/src/index.ts)
```ts config-catalog
/** Where every registered plugin's upstream files are downloaded from. */
export interface Config {
/** Archive download prefixes tried in order; each serves `<owner>/<repository>/tar.gz/<commit>`. */
skillsUrls: string[]
/** How long one prefix may take to deliver the whole archive before the next one is tried. */
skillsTimeoutMs: number
}
```
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-upstream-skills -->
<!-- BEGIN GENERATED config-catalog:@deepseek-ai/dsh-user-approval -->
<a id="deepseek-aidsh-user-approval"></a>
@@ -5466,7 +5485,6 @@ Imported as libraries by other packages; a `cordis.yml` cannot load them.
| `@deepseek-ai/dsh-typert-generator` | — | [`packages/typert/generator/src/index.ts`](../packages/typert/generator/src/index.ts) |
| `@deepseek-ai/dsh-typert-protocol` | — | [`packages/typert/protocol/src/index.ts`](../packages/typert/protocol/src/index.ts) |
| `@deepseek-ai/dsh-typert-registry` | — | [`packages/typert/registry/src/index.ts`](../packages/typert/registry/src/index.ts) |
| `@deepseek-ai/dsh-upstream-skills` | — | [`packages/connector/upstream-skills/src/index.ts`](../packages/connector/upstream-skills/src/index.ts) |
| `@deepseek-ai/dsh-util-code-language` | — | [`packages/util/code-language/src/index.ts`](../packages/util/code-language/src/index.ts) |
| `@deepseek-ai/dsh-util-crypto` | — | [`packages/util/crypto/src/index.ts`](../packages/util/crypto/src/index.ts) |
| `@deepseek-ai/dsh-util-file-drag` | — | [`packages/util/file-drag/src/index.ts`](../packages/util/file-drag/src/index.ts) |
+19 -1
View File
@@ -4944,6 +4944,25 @@ export interface Config {
```
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-typert-loader -->
<!-- BEGIN GENERATED config-catalog:@deepseek-ai/dsh-upstream-skills -->
<a id="deepseek-aidsh-upstream-skills"></a>
## `@deepseek-ai/dsh-upstream-skills`
- `inject`: `skills`
- `source`: [`packages/connector/upstream-skills/src/index.ts:32`](../packages/connector/upstream-skills/src/index.ts)
```ts config-catalog
/** Where every registered plugin's upstream files are downloaded from. */
export interface Config {
/** Archive download prefixes tried in order; each serves `<owner>/<repository>/tar.gz/<commit>`. */
skillsUrls: string[]
/** How long one prefix may take to deliver the whole archive before the next one is tried. */
skillsTimeoutMs: number
}
```
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-upstream-skills -->
<!-- BEGIN GENERATED config-catalog:@deepseek-ai/dsh-user-approval -->
<a id="deepseek-aidsh-user-approval"></a>
@@ -5468,7 +5487,6 @@ export interface Config {
| `@deepseek-ai/dsh-typert-generator` | — | [`packages/typert/generator/src/index.ts`](../packages/typert/generator/src/index.ts) |
| `@deepseek-ai/dsh-typert-protocol` | — | [`packages/typert/protocol/src/index.ts`](../packages/typert/protocol/src/index.ts) |
| `@deepseek-ai/dsh-typert-registry` | — | [`packages/typert/registry/src/index.ts`](../packages/typert/registry/src/index.ts) |
| `@deepseek-ai/dsh-upstream-skills` | — | [`packages/connector/upstream-skills/src/index.ts`](../packages/connector/upstream-skills/src/index.ts) |
| `@deepseek-ai/dsh-util-code-language` | — | [`packages/util/code-language/src/index.ts`](../packages/util/code-language/src/index.ts) |
| `@deepseek-ai/dsh-util-crypto` | — | [`packages/util/crypto/src/index.ts`](../packages/util/crypto/src/index.ts) |
| `@deepseek-ai/dsh-util-file-drag` | — | [`packages/util/file-drag/src/index.ts`](../packages/util/file-drag/src/index.ts) |
+22
View File
@@ -327,6 +327,28 @@ async get(name: string, options: SkillViewOptions = {}): Promise<SkillDefinition
Source: [`packages/skill/skill/src/index.ts`](../../packages/skill/skill/src/index.ts)
<a id="ctxupstreamskills--upstreamskills"></a>
### `ctx.upstreamSkills` — `UpstreamSkills`
Holds what CLI app plugins register: for each plugin, the entry skill and the download of the upstream files it indexes.
```ts cordis-catalog
/**
* Register the calling plugin's entry skill and start downloading the upstream files unless they are in place. The
* download starts at load so that a session without a client also gets the skill; a failure is logged as a warning
* and waits for `retry()`. The registration belongs to the calling plugin: unloading that plugin aborts the download
* and removes the entry skill.
* @param registration - the plugin's provider name, entry, pinned files, and optional skills directory.
* @returns the handle the plugin's view observes and its check retries.
* @throws when the entry has no skill name or description in its frontmatter, `skillsDir` is not a directory, or a
* skill provider named `name` is already registered.
*/
register(registration: UpstreamSkillsRegistration): UpstreamSkillsHandle
```
Source: [`packages/connector/upstream-skills/src/index.ts`](../../packages/connector/upstream-skills/src/index.ts)
<a id="skills-events"></a>
### `skills/*` events
+22
View File
@@ -327,6 +327,28 @@ async get(name: string, options: SkillViewOptions = {}): Promise<SkillDefinition
Source: [`packages/skill/skill/src/index.ts`](../../packages/skill/skill/src/index.ts)
<a id="ctxupstreamskills--upstreamskills"></a>
### `ctx.upstreamSkills` — `UpstreamSkills`
Holds what CLI app plugins register: for each plugin, the entry skill and the download of the upstream files it indexes.
```ts cordis-catalog
/**
* Register the calling plugin's entry skill and start downloading the upstream files unless they are in place. The
* download starts at load so that a session without a client also gets the skill; a failure is logged as a warning
* and waits for `retry()`. The registration belongs to the calling plugin: unloading that plugin aborts the download
* and removes the entry skill.
* @param registration - the plugin's provider name, entry, pinned files, and optional skills directory.
* @returns the handle the plugin's view observes and its check retries.
* @throws when the entry has no skill name or description in its frontmatter, `skillsDir` is not a directory, or a
* skill provider named `name` is already registered.
*/
register(registration: UpstreamSkillsRegistration): UpstreamSkillsHandle
```
Source: [`packages/connector/upstream-skills/src/index.ts`](../../packages/connector/upstream-skills/src/index.ts)
<a id="skills-events"></a>
### `skills/*` events
+5
View File
@@ -323,6 +323,11 @@
- id: tool-skill
name: '@deepseek-ai/dsh-tool-skill'
# CLI app plugins register their entry skill and its pinned upstream files
# with this Service, which downloads nothing until one registers.
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
- id: commands
name: '@deepseek-ai/dsh-commands'
+1
View File
@@ -129,6 +129,7 @@
"@deepseek-ai/dsh-tools": "workspace:*",
"@deepseek-ai/dsh-typert-loader": "workspace:*",
"@deepseek-ai/dsh-typert-registry": "workspace:*",
"@deepseek-ai/dsh-upstream-skills": "workspace:*",
"@deepseek-ai/dsh-user-approval": "workspace:*",
"@deepseek-ai/dsh-user-questions": "workspace:*",
"@deepseek-ai/dsh-web": "workspace:*",
+6 -6
View File
@@ -3,20 +3,20 @@
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/connector/README.md
/:
en: 347e05340c1ed35a
zh: efa9515f352e5366
en: 689ac98272d5e23e
zh: c33789dd190f3f43
/connector-application-plugins:
en: ef6d2dd74a9b63e0
zh: 2d1b1b1d6de9d5af
/connector-application-plugins/summary:
en: fe3c5f7004004a98
zh: 3ed30e2f2509b9f0
en: ef4e05f7ba8ec163
zh: 12251f9a81082730
/connector-application-plugins/table-of-contents:
en: 1eb35b015a6c423f
zh: a8a3dceee2c9e943
/connector-application-plugins/packages:
en: 3663143c47d8aa6a
zh: b777b78a4ae3b777
en: be89b1739795c9bf
zh: 629ccb00ed6d96f5
/connector-application-plugins/related-documentation:
en: 392c28cfa4bafb27
zh: c49329900f6f2fd0
+3 -3
View File
@@ -1,5 +1,5 @@
---
description: "The connector group map: application plugins that connect a third-party service to agents through existing Skill, Shell, and subprocess capabilities, the CLI account Service they register with, and the upstream skills library they share."
description: "The connector group map: application plugins that connect a third-party service to agents through existing Skill, Shell, and subprocess capabilities, and the CLI account and upstream skills Services they register with."
kind: "package-group"
---
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
## Summary
Each application plugin in this group is installed into a profile to use one third-party service in conversations. A plugin composes existing capabilities, such as skills, runtime context, and subprocesses, and keeps application-specific configuration and model guidance in its own package. Plugins whose vendor CLI keeps the user's account register that CLI and account with the CLI account Service, which runs their commands and account operations, and plugins whose upstream skills exist only in the vendor's GitHub repository download them through the upstream skills library.
Each application plugin in this group is installed into a profile to use one third-party service in conversations. A plugin composes existing capabilities, such as skills, runtime context, and subprocesses, and keeps application-specific configuration and model guidance in its own package. Plugins whose vendor CLI keeps the user's account register that CLI and account with the CLI account Service, which runs their commands and account operations, and plugins whose upstream skills exist only in the vendor's GitHub repository register their entry skill with the upstream skills Service, which downloads them.
## Table of Contents
@@ -25,7 +25,7 @@ Each application plugin in this group is installed into a profile to use one thi
| Package | Role | ctx key |
|---|---|---|
| [`cli-account/`](cli-account/README.md) | Holds the vendor CLIs and accounts CLI app plugins register: gives the model each CLI's absolute path in runtime context, runs each plugin's account operations one at a time, and shows the account on the Plugins page | `ctx.cliAccounts` |
| [`upstream-skills/`](upstream-skills/README.md) | Downloads the upstream files that a CLI app plugin's entry skill indexes from a pinned commit of the vendor's GitHub repository, verifies and caches them, and lists the entry skill over them | — |
| [`upstream-skills/`](upstream-skills/README.md) | Holds the entry skills CLI app plugins register: downloads the upstream files each entry indexes from a pinned commit of the vendor's GitHub repository, verifies and caches them, and lists the entry skill over them | `ctx.upstreamSkills` |
-----
+3 -3
View File
@@ -1,5 +1,5 @@
---
description: "connector 分组地图:通过现有 Skill、Shell 与 subprocess 能力把第三方服务接入 agent 的应用插件,它们注册到的 CLI 账号 Service,以及它们共用的上游技能库。"
description: "connector 分组地图:通过现有 Skill、Shell 与 subprocess 能力把第三方服务接入 agent 的应用插件,以及它们注册到的 CLI 账号 Service 和上游技能 Service。"
kind: "package-group"
---
@@ -9,7 +9,7 @@ kind: "package-group"
## 概述
本分组中的每个应用插件安装到 profile 后,即可在对话中使用一个第三方服务。插件组合 skill(技能)、运行时上下文和 subprocess 等现有能力,并把应用特有的配置和模型指引保留在自己的包内。由厂商 CLI 保管用户账号的插件,把这个 CLI 和账号注册到 CLI 账号 Service,由它执行插件的命令和账号操作;上游技能只存在于厂商 GitHub 仓库的插件,通过上游技能库下载它们。
本分组中的每个应用插件安装到 profile 后,即可在对话中使用一个第三方服务。插件组合 skill(技能)、运行时上下文和 subprocess 等现有能力,并把应用特有的配置和模型指引保留在自己的包内。由厂商 CLI 保管用户账号的插件,把这个 CLI 和账号注册到 CLI 账号 Service,由它执行插件的命令和账号操作;上游技能只存在于厂商 GitHub 仓库的插件,把入口技能注册到上游技能 Service,由它下载这些技能。
## 目录
@@ -25,7 +25,7 @@ kind: "package-group"
| 包 | 职责 | ctx 键 |
|---|---|---|
| [`cli-account/`](cli-account/README.zh.md) | 保存 CLI 应用插件注册的厂商 CLI 和账号:在运行时上下文中把每个 CLI 的绝对路径告诉模型,让每个插件的账号操作一次只执行一个,并在插件页显示账号 | `ctx.cliAccounts` |
| [`upstream-skills/`](upstream-skills/README.zh.md) | 从厂商 GitHub 仓库的固定提交下载 CLI 应用插件入口技能索引的上游文件,校验并缓存,再在这些文件之上列出入口技能 | — |
| [`upstream-skills/`](upstream-skills/README.zh.md) | 保存 CLI 应用插件注册的入口技能:从厂商 GitHub 仓库的固定提交下载每个入口索引的上游文件,校验并缓存,再在这些文件之上列出入口技能 | `ctx.upstreamSkills` |
-----
@@ -3,44 +3,44 @@
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/connector/upstream-skills/README.md
/:
en: a027a2cdcf7631e7
zh: 0bcc9c5ad299bb5c
en: 2901b7fe88b3d1e8
zh: 231b9b01a75b317f
/deepseek-ai-dsh-upstream-skills:
en: f3158e9291ae2f3d
zh: 58b89910c6fa6980
/deepseek-ai-dsh-upstream-skills/summary:
en: fbba750a184bcc37
zh: 8243965fcde1aa56
en: 985af9365ec4f322
zh: 62bf184310772f11
/deepseek-ai-dsh-upstream-skills/table-of-contents:
en: d152484eb41ac6b4
zh: 5b6bd00fce5371c3
/deepseek-ai-dsh-upstream-skills/use-this-package:
en: bbff250eba0f1b89
zh: b20a47f82d8ab6e0
/deepseek-ai-dsh-upstream-skills/use-this-package/when-to-use-it:
en: 572b474112a3b1d2
zh: ddca0ffabad5eaca
/deepseek-ai-dsh-upstream-skills/use-this-package/entry-point:
en: c3e1b60c8e4e023a
zh: e51792ead0b00e7f
en: 4fb803d56a5f4160
zh: a0746a984d3cb313
/deepseek-ai-dsh-upstream-skills/use-this-package/when-to-choose-it:
en: 864a01de5a4ba7aa
zh: 06db4091df86a934
/deepseek-ai-dsh-upstream-skills/use-this-package/minimal-configuration:
en: 2ac0be96902c0c7c
zh: a6412287a1ac4487
/deepseek-ai-dsh-upstream-skills/use-this-package/register-an-entry-skill:
en: a4adb17bd22ccf36
zh: 0afd5dbd5e6d4c11
/deepseek-ai-dsh-upstream-skills/use-this-package/kept-files-and-verification:
en: 49a8b6fe1e1df41a
zh: 4cff59da21ae3dcb
en: 0633b5470e6b4e6c
zh: 419916b5b305aa7d
/deepseek-ai-dsh-upstream-skills/use-this-package/pinning-a-commit:
en: 5c7edfe292e3ed4e
zh: 4f8fbac5a4ac9a71
/deepseek-ai-dsh-upstream-skills/use-this-package/shared-config:
en: 590e7c5cc0c2ceaf
zh: 09df0db0fc260a7e
en: ea5587081cc3b471
zh: e0993a154ae79dc1
/deepseek-ai-dsh-upstream-skills/understand-the-implementation:
en: 97bd13a3bb1c31d9
zh: cb827ed3fb450148
en: 620b702a4b6c162c
zh: 209f776f7c49ddd0
/deepseek-ai-dsh-upstream-skills/further-exploration:
en: 60965f68389a4cad
zh: dc8e251f38301b9f
en: 95c015940a49bef1
zh: d1d3c6162cd4fa68
/deepseek-ai-dsh-upstream-skills/model-experience:
en: c9e4d94bb8653482
zh: b07dbd392f17bab0
en: 330d735bd7263f89
zh: 26096e961db1acc5
/deepseek-ai-dsh-upstream-skills/model-experience/kv-cache-effect:
en: 2a09699bc1130758
zh: 972fc624936c8c2f
+55 -34
View File
@@ -1,6 +1,6 @@
---
description: "Download the upstream files that a CLI app plugin's entry skill indexes from one directory of the vendor's GitHub repository at a pinned commit, verify them, publish them in the DSH cache, and list the entry skill over them."
kind: "package-library"
description: "Register a CLI app plugin's entry skill with the Host Service `ctx.upstreamSkills`: it downloads the upstream files the entry indexes from one directory of the vendor's GitHub repository at a pinned commit, verifies them, publishes them in the DSH cache, and lists the entry skill over them."
kind: "package-reference"
---
# @deepseek-ai/dsh-upstream-skills
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
## Summary
CLI app plugins such as WeCom and Tencent Meeting use this library for guides that their vendor publishes only in its GitHub repository. The plugin keeps its own entry `SKILL.md` and pins one directory of that repository by commit, total size, and digest. `registerUpstreamSkills` downloads the commit's archive when the plugin loads, keeps the directory and the license file, verifies them, publishes them in the DSH cache, and then lists the entry skill with the published directory as its base directory. The repository and the plugins' npm packages carry no copy of the upstream files.
CLI app plugins such as WeCom and Tencent Meeting register with `ctx.upstreamSkills` for guides their vendor publishes only in its GitHub repository. The plugin keeps its own entry `SKILL.md` and pins one directory of that repository by commit, total size, and digest. The Service downloads the commit's archive when the plugin loads, verifies the kept files, publishes them in the DSH cache, and lists the entry skill with the published directory as its base directory. The repository and the plugins' npm packages carry no copy of those files. The base bundle loads the Service, which downloads nothing until one registers.
## Table of Contents
@@ -25,22 +25,36 @@ CLI app plugins such as WeCom and Tencent Meeting use this library for guides th
<a id="use-this-package"></a>
## Use this package
### When to use it
A CLI app plugin's Host row injects `upstreamSkills` and calls `register` once; the registration lasts until the plugin unloads or disposes the returned handle.
Use it in the Host row of a CLI app plugin whose upstream skills exist only in the vendor's GitHub repository, so that each user's computer downloads them from the vendor at run time. A plugin whose CLI embeds its guides reads them through the CLI, as Feishu does, and a plugin whose release ships a checksummed skills archive downloads it together with the executable, as DingTalk does.
### When to choose it
### Entry point
Register from the Host row of a CLI app plugin whose upstream skills exist only in the vendor's GitHub repository, so that each user's computer downloads them from the vendor at run time. A plugin whose CLI embeds its guides reads them through the CLI, as Feishu does, and a plugin whose release ships a checksummed skills archive downloads it together with the executable, as DingTalk does.
A plugin pins the upstream files, adds the shared config fields to its own `Config`, and registers its entry skill at load:
### Minimal configuration
The [base bundle](../../bundle/base/cordis.patch.yml) loads the Service in every profile built on it, after the `skills` registry it injects:
```yaml
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
```
| Field | Default | Meaning |
|---|---|---|
| `skillsUrls` | `['https://codeload.github.com']` | HTTPS archive download prefixes, without a query, fragment, or credentials, tried in order; they apply to every registered plugin |
| `skillsTimeoutMs` | `120000` | Whole milliseconds one prefix may take to deliver the whole archive before the next is tried; it applies to every registered plugin |
The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-upstream-skills) is the exhaustive source for every accepted field. An empty `skillsUrls`, a prefix that does not parse as such a URL, or a `skillsTimeoutMs` below 1 or above 2147483647 fails at load.
### Register an entry skill
The plugin's Host row lists `upstreamSkills` in `inject`, pins the upstream files, and registers from `apply`:
```ts
import { fileURLToPath } from 'node:url'
import type { Context } from '@deepseek-ai/cordis'
import { registerUpstreamSkills, type UpstreamSkillsConfig, type UpstreamSkillSet } from '@deepseek-ai/dsh-upstream-skills'
import type {} from '@deepseek-ai/dsh-skill'
declare const ctx: Context
declare const config: UpstreamSkillsConfig
import type { UpstreamSkillSet } from '@deepseek-ai/dsh-upstream-skills'
const VENDOR_SKILLS: UpstreamSkillSet = {
repository: 'vendor/vendor-cli',
@@ -52,32 +66,38 @@ const VENDOR_SKILLS: UpstreamSkillSet = {
sha256: 'c75045cc5297d5886c8a7ff01c993a782e50cbd4aa6f6559394b695157d52e10',
}
const skills = registerUpstreamSkills(ctx, {
name: 'vendor',
entry: fileURLToPath(new URL('../skills/vendor/SKILL.md', import.meta.url)),
set: VENDOR_SKILLS,
config,
})
export interface Config { skillsDir?: string }
export const inject = ['upstreamSkills']
export function apply(ctx: Context, config: Config): void {
const skills = ctx.upstreamSkills.register({
name: 'vendor',
entry: fileURLToPath(new URL('../skills/vendor/SKILL.md', import.meta.url)),
set: VENDOR_SKILLS,
skillsDir: config.skillsDir,
})
skills.watch((state) => { ctx.logger.info(`vendor: upstream skills ${state}`) })
}
```
`registerUpstreamSkills` reads the entry's name and description from its YAML frontmatter, registers a skill provider under `name`, and starts the download unless the files are already in place. `skills.directory` is `skillsDir`, or `$DSH_HOME/cache/<name>/skills-<first 16 digest digits>`. `skills.state` is `downloading` while a download runs, otherwise `installed` when that directory exists and `failed` when it does not. `skills.watch(listener)` reports each start and end of a download, and `skills.retry()` starts another download after a failure and returns at once. A plugin shows the state beside its account and calls `retry()` from its check without waiting, so a slow download never holds its account operations. A failed download is logged as a warning. Disposing the plugin aborts the download, removes the provider, and ends the notifications. The entry's body refers to the upstream files by their repository paths, such as `skills/<guide>/SKILL.md`. The contracts in [`src/index.ts`](src/index.ts) and [`src/types.ts`](src/types.ts) are authoritative.
`register` reads the entry's name and description from its YAML frontmatter, registers a skill provider under `name`, and starts the download unless the files are already in place. The registration belongs to the plugin whose `ctx` made the call: unloading that plugin aborts the download, removes the provider, and ends the notifications. A second registration under one `name` throws and leaves the first in place.
- `name` is the skill provider's name, the prefix of the plugin's errors and log records, and the directory under `$DSH_HOME/cache` that receives the download.
- `entry` is the absolute path of the packaged entry `SKILL.md`, whose body refers to the upstream files by their repository paths, such as `skills/<guide>/SKILL.md`.
- `set` is the pin that `scripts/upstream-skills-digest.ts` prints.
- `skillsDir` is the plugin's own optional config field: a directory that already holds the kept files at their repository paths. When it is set, nothing is downloaded, and a path that is not a directory makes `register` throw.
The returned handle serves the plugin's account view and check. `directory` is `skillsDir`, or `$DSH_HOME/cache/<name>/skills-<first 16 digest digits>`. `state` is `downloading` while a download runs, otherwise `installed` when that directory exists and `failed` when it does not. `watch(listener)` reports each start and end of a download, and `retry()` starts another download after a failure and returns at once. A plugin shows the state beside its account and calls `retry()` from its check without waiting, so a slow download never holds its account operations. A failed download is logged as a warning. `dispose()` withdraws the registration before the plugin unloads. The contracts in [`src/index.ts`](src/index.ts) and [`src/types.ts`](src/types.ts) are authoritative.
### Kept files and verification
The library downloads `<prefix>/<owner>/<repository>/tar.gz/<commit>` from each `skillsUrls` prefix in order. A prefix that answers with an error status or no body, does not deliver the whole archive within `skillsTimeoutMs`, sends a malformed archive, or sends files that differ from the pin is logged with the prefix, and the next prefix is tried; disposing the plugin stops at once. The library keeps every regular file under `directory` except the paths in `exclude`, plus `license`, at their repository paths. It refuses an archive with an empty, `.`, or `..` path segment or a backslash in any entry, entries outside its one top-level directory, a kept path that is a link or appears twice, kept files above `bytes`, or no license file. On Windows, node-tar turns backslashes into slashes before the library reads a path, so the segments they separate are checked instead. The digest hashes each kept file's path, byte length, and content in path order, because GitHub keeps the files of a commit archive stable but not its compressed bytes. Verified files are written to a sibling staging directory, which is then renamed to `skills.directory`; a directory that another process, such as Desktop beside Web, published first is kept.
The Service downloads `<prefix>/<owner>/<repository>/tar.gz/<commit>` from each `skillsUrls` prefix in order. A prefix that answers with an error status or no body, does not deliver the whole archive within `skillsTimeoutMs`, sends a malformed archive, or sends files that differ from the pin is logged with the prefix, and the next prefix is tried; unloading the plugin stops at once. The Service keeps every regular file under `directory` except the paths in `exclude`, plus `license`, at their repository paths. It refuses an archive with an empty, `.`, or `..` path segment or a backslash in any entry, entries outside its one top-level directory, a kept path that is a link or appears twice, kept files above `bytes`, or no license file. On Windows, node-tar turns backslashes into slashes before the Service reads a path, so the segments they separate are checked instead. The digest hashes each kept file's path, byte length, and content in path order, because GitHub keeps the files of a commit archive stable but not its compressed bytes. Verified files are written to a sibling staging directory, which is then renamed to the handle's `directory`; a directory that another process, such as Desktop beside Web, published first is kept.
### Pinning a commit
`pnpm exec tsx scripts/upstream-skills-digest.ts --repository <owner>/<repository> --commit <full id> --directory <path> [--exclude <path>]... [--license LICENSE] [--url <prefix>]` downloads the archive from the `--url` prefix, `https://codeload.github.com` by default, keeps the same files, prints the pin as JSON, and lists the kept `SKILL.md` paths on stderr.
### Shared config
| Field | Default | Meaning |
|---|---|---|
| `skillsDir` | none | Directory holding the kept files at their repository paths; when set, nothing is downloaded, and a path that is not a directory fails the load |
| `skillsUrls` | `['https://codeload.github.com']` | HTTPS archive download prefixes, without a query, fragment, or credentials, tried in order; a value that does not parse as a URL fails the configuration |
| `skillsTimeoutMs` | `120000` | Whole milliseconds one prefix may take to deliver the whole archive before the next is tried |
-----
<a id="understand-the-implementation"></a>
@@ -86,13 +106,13 @@ The library downloads `<prefix>/<owner>/<repository>/tar.gz/<commit>` from each
<details>
<summary>Implementation internals — click to expand</summary>
The provider lists the entry only while `skills.directory` exists, with source `bundled` at the bundled rank, so a project or user skill of the same name wins. It returns a complete, empty list before publishing, because an incomplete observation would make the whole skill catalog incomplete; publishing invalidates the catalog instead, as does a failed download that finds a directory another process published. One download runs at a time, and the provider registration's signal aborts it when the plugin is disposed. Kept files are held in memory, bounded by `bytes`, until they match the digest, so no unverified file reaches the disk; files outside the selection are read and dropped, so `skillsTimeoutMs` bounds the time spent on them.
`register` runs in the calling plugin's context, so the skill provider is an effect of that plugin and is removed with it. The provider lists the entry only while the handle's `directory` exists, with source `bundled` at the bundled rank, so a project or user skill of the same name wins. It returns a complete, empty list before publishing, because an incomplete observation would make the whole skill catalog incomplete; publishing invalidates the catalog instead, as does a failed download that finds a directory another process published. One download runs at a time, and the provider registration's signal aborts it when the plugin unloads. Kept files are held in memory, bounded by `bytes`, until they match the digest, so no unverified file reaches the disk; files outside the selection are read and dropped, so `skillsTimeoutMs` bounds the time spent on them.
| File | Role |
|---|---|
| [`src/index.ts`](src/index.ts) | Shared config fields, registration, the provider, and publishing |
| [`src/index.ts`](src/index.ts) | The `ctx.upstreamSkills` Service, its config, `register`, the provider, and publishing |
| [`src/archive.ts`](src/archive.ts) | Download, archive reading, path and size checks, the digest, and file writing |
| [`src/types.ts`](src/types.ts) | The pin and handle types |
| [`src/types.ts`](src/types.ts) | The pin, registration, and handle types |
</details>
@@ -101,17 +121,18 @@ The provider lists the entry only while `skills.directory` exists, with source `
<a id="further-exploration"></a>
## Further Exploration
- [Connector packages](../README.md) — the group this library and the CLI app plugins belong to.
- [Connector packages](../README.md) — the group this package and the CLI app plugins belong to.
- [Runtime download of upstream skills](../../../.agents/notes/implemented/architecture/2026-10-28-upstream-skills-runtime-download.md) — why the plugins download the files instead of carrying a copy.
- [Skill registry](../../skill/skill/README.md) — the provider and catalog API this library implements.
- [Skill registry](../../skill/skill/README.md) — the provider and catalog API the Service registers each entry skill with.
- [Skill subsystem reference](../../../docs/subsystems/skills.md) — how skills reach the model.
- [Base bundle](../../bundle/base/README.md) — the bundle that loads the Service, and how a profile overrides one of its rows.
-----
<a id="model-experience"></a>
## Model Experience
Indirectly, through `dsh-tool-skill`, which lists the entry skill in its catalog once the upstream files are published and returns the entry body with `skills.directory` as the skill's base directory.
Indirectly, through `dsh-tool-skill`, which lists the entry skill in its catalog once the upstream files are published and returns the entry body with the handle's `directory` as the skill's base directory. While no plugin is registered, the Service adds nothing to a model request.
#### KV Cache effect
+55 -34
View File
@@ -1,6 +1,6 @@
---
description: "为 CLI 应用插件的入口技能,从厂商 GitHub 仓库固定提交的一个目录下载它索引的上游文件,校验后发布到 DSH 缓存,再在这些文件之上列出入口技能。"
kind: "package-library"
description: "把 CLI 应用插件的入口技能注册到 Host Service `ctx.upstreamSkills`:它从厂商 GitHub 仓库固定提交的一个目录下载入口索引的上游文件,校验后发布到 DSH 缓存,再在这些文件之上列出入口技能。"
kind: "package-reference"
---
# @deepseek-ai/dsh-upstream-skills
@@ -9,7 +9,7 @@ kind: "package-library"
## 概述
企业微信、腾讯会议等 CLI 应用插件用这个库获取厂商只在自己 GitHub 仓库里发布的子指南。插件保留自己的入口 `SKILL.md`,并按提交、总大小和摘要固定该仓库的一个目录。插件加载时,`registerUpstreamSkills` 下载这个提交的归档,保留该目录和许可证文件,校验后发布到 DSH 缓存,再列出入口技能,并把发布目录作为它的基础目录。仓库和插件的 npm 包里都没有上游文件的副本。
企业微信、腾讯会议等 CLI 应用插件向 `ctx.upstreamSkills` 注册,以获取厂商只在自己 GitHub 仓库里发布的子指南。插件保留自己的入口 `SKILL.md`,并按提交、总大小和摘要固定该仓库的一个目录。插件加载时,Service 下载这个提交的归档,校验保留的文件,把它们发布到 DSH 缓存,并列出入口技能,把发布目录作为它的基础目录。仓库和插件的 npm 包里都没有这些文件的副本。Service 由基础组合包加载,在有插件注册之前不下载任何内容。
## 目录
@@ -25,22 +25,36 @@ kind: "package-library"
<a id="use-this-package"></a>
## 使用此包
### 何时使用
CLI 应用插件的 Host 行注入 `upstreamSkills` 并调用一次 `register`;注册持续到插件卸载,或插件释放返回的句柄。
上游技能只存在于厂商 GitHub 仓库的 CLI 应用插件,在 Host 一侧使用它,让每台用户电脑在运行时从厂商处下载这些技能。CLI 内嵌子指南的插件通过 CLI 读取它们,如飞书;发布包里附带带校验和的技能归档的插件,把它和可执行文件一起下载,如钉钉。
### 何时选用
### 入口
上游技能只存在于厂商 GitHub 仓库的 CLI 应用插件,在 Host 行中注册,让每台用户电脑在运行时从厂商处下载这些技能。CLI 内嵌子指南的插件通过 CLI 读取它们,如飞书;发布包里附带带校验和的技能归档的插件,把它和可执行文件一起下载,如钉钉。
插件固定上游文件,把共用配置字段加入自己的 `Config`,并在加载时注册入口技能:
### 最小配置
[基础组合包(base bundle)](../../bundle/base/cordis.patch.yml)在基于它的每个 profile 中加载这个 Service,位于它注入的 `skills` 注册表之后:
```yaml
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
```
| 字段 | 默认值 | 含义 |
|---|---|---|
| `skillsUrls` | `['https://codeload.github.com']` | 按顺序尝试的 HTTPS 归档下载前缀,不含查询串、片段或凭据;对每个已注册的插件生效 |
| `skillsTimeoutMs` | `120000` | 一个前缀送达完整归档的时限(整数毫秒),超时后尝试下一个;对每个已注册的插件生效 |
生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-upstream-skills)是每个可接受字段的完整来源。`skillsUrls` 为空、某个前缀无法解析为这样的 URL,或 `skillsTimeoutMs` 小于 1 或大于 2147483647,都在加载时失败。
### 注册入口技能
插件的 Host 行在 `inject` 中列出 `upstreamSkills`,固定上游文件,并在 `apply` 中注册:
```ts
import { fileURLToPath } from 'node:url'
import type { Context } from '@deepseek-ai/cordis'
import { registerUpstreamSkills, type UpstreamSkillsConfig, type UpstreamSkillSet } from '@deepseek-ai/dsh-upstream-skills'
import type {} from '@deepseek-ai/dsh-skill'
declare const ctx: Context
declare const config: UpstreamSkillsConfig
import type { UpstreamSkillSet } from '@deepseek-ai/dsh-upstream-skills'
const VENDOR_SKILLS: UpstreamSkillSet = {
repository: 'vendor/vendor-cli',
@@ -52,32 +66,38 @@ const VENDOR_SKILLS: UpstreamSkillSet = {
sha256: 'c75045cc5297d5886c8a7ff01c993a782e50cbd4aa6f6559394b695157d52e10',
}
const skills = registerUpstreamSkills(ctx, {
name: 'vendor',
entry: fileURLToPath(new URL('../skills/vendor/SKILL.md', import.meta.url)),
set: VENDOR_SKILLS,
config,
})
export interface Config { skillsDir?: string }
export const inject = ['upstreamSkills']
export function apply(ctx: Context, config: Config): void {
const skills = ctx.upstreamSkills.register({
name: 'vendor',
entry: fileURLToPath(new URL('../skills/vendor/SKILL.md', import.meta.url)),
set: VENDOR_SKILLS,
skillsDir: config.skillsDir,
})
skills.watch((state) => { ctx.logger.info(`vendor: upstream skills ${state}`) })
}
```
`registerUpstreamSkills` 从入口的 YAML frontmatter 读取名称和描述,以 `name` 注册一个技能提供方,文件不在位时开始下载。`skills.directory` 是 `skillsDir`,或 `$DSH_HOME/cache/<name>/skills-<摘要前 16 位>`。下载进行中时 `skills.state` 为 `downloading`,否则这个目录存在时为 `installed`,不存在时为 `failed`。`skills.watch(listener)` 报告每次下载的开始和结束;`skills.retry()` 在失败后开始新的下载,并立即返回。插件在账号旁显示这个状态,并在检查中调用 `retry()` 而不等待,因此下载再慢也不会占住账号操作。下载失败会记为警告。卸载插件会中止下载、移除提供方并停止通知。入口正文按仓库路径引用上游文件,例如 `skills/<子指南>/SKILL.md`。以 [`src/index.ts`](src/index.ts) 和 [`src/types.ts`](src/types.ts) 中的约定为准。
`register` 从入口的 YAML frontmatter 读取名称和描述,以 `name` 注册一个技能提供方,文件不在位时开始下载。注册属于用其 `ctx` 发起调用的插件:该插件卸载时,下载被中止,提供方被移除,通知停止。以同一个 `name` 再次注册会抛出异常,第一次注册保持不变。
- `name` 是技能提供方的名称、插件的错误和日志记录的前缀,也是 `$DSH_HOME/cache` 下接收下载内容的目录。
- `entry` 是随包发布的入口 `SKILL.md` 的绝对路径,其正文按仓库路径引用上游文件,例如 `skills/<子指南>/SKILL.md`。
- `set` 是 `scripts/upstream-skills-digest.ts` 输出的固定信息。
- `skillsDir` 是插件自己的可选配置字段:一个已按仓库路径存放保留文件的目录。设置后不下载,路径不是目录时 `register` 抛出异常。
返回的句柄供插件的账号视图和检查使用。`directory` 是 `skillsDir`,或 `$DSH_HOME/cache/<name>/skills-<摘要前 16 位>`。下载进行中时 `state` 为 `downloading`,否则这个目录存在时为 `installed`,不存在时为 `failed`。`watch(listener)` 报告每次下载的开始和结束;`retry()` 在失败后开始新的下载,并立即返回。插件在账号旁显示这个状态,并在检查中调用 `retry()` 而不等待,因此下载再慢也不会占住账号操作。下载失败会记为警告。`dispose()` 在插件卸载之前撤回注册。以 [`src/index.ts`](src/index.ts) 和 [`src/types.ts`](src/types.ts) 中的约定为准。
### 保留的文件与校验
库按顺序从每个 `skillsUrls` 前缀下载 `<前缀>/<owner>/<repository>/tar.gz/<commit>`。某个前缀返回错误状态或空响应体、没有在 `skillsTimeoutMs` 内送达完整归档、发来损坏的归档,或发来的文件与固定信息不符时,记录该前缀并尝试下一个;卸载插件则立即停止。库保留 `directory` 下除 `exclude` 列出的路径之外的所有普通文件,以及 `license`,并保持它们的仓库路径。以下归档会被拒绝:任一条目的路径含空段、`.`、`..` 或反斜杠;条目不在唯一的顶层目录下;保留的路径是链接或出现两次;保留的文件超过 `bytes`;没有许可证文件。Windows 上 node-tar 在库读取路径之前已把反斜杠转成 `/`,因此改为检查它分开的各段。摘要按路径顺序对每个保留文件的路径、字节长度和内容做哈希,因为 GitHub 保证提交归档里的文件不变,但不保证压缩后的字节不变。校验通过的文件先写入同级的暂存目录,再改名为 `skills.directory`;另一个进程(例如与 Web 同时运行的桌面端)先发布的目录会被保留。
Service 按顺序从每个 `skillsUrls` 前缀下载 `<前缀>/<owner>/<repository>/tar.gz/<commit>`。某个前缀返回错误状态或空响应体、没有在 `skillsTimeoutMs` 内送达完整归档、发来损坏的归档,或发来的文件与固定信息不符时,记录该前缀并尝试下一个;卸载插件则立即停止。Service 保留 `directory` 下除 `exclude` 列出的路径之外的所有普通文件,以及 `license`,并保持它们的仓库路径。以下归档会被拒绝:任一条目的路径含空段、`.`、`..` 或反斜杠;条目不在唯一的顶层目录下;保留的路径是链接或出现两次;保留的文件超过 `bytes`;没有许可证文件。Windows 上 node-tar 在 Service 读取路径之前已把反斜杠转成 `/`,因此改为检查它分开的各段。摘要按路径顺序对每个保留文件的路径、字节长度和内容做哈希,因为 GitHub 保证提交归档里的文件不变,但不保证压缩后的字节不变。校验通过的文件先写入同级的暂存目录,再改名为句柄的 `directory`;另一个进程(例如与 Web 同时运行的桌面端)先发布的目录会被保留。
### 固定提交
`pnpm exec tsx scripts/upstream-skills-digest.ts --repository <owner>/<repository> --commit <完整提交号> --directory <路径> [--exclude <路径>]... [--license LICENSE] [--url <前缀>]` 从 `--url` 前缀下载归档(默认是 `https://codeload.github.com`),按同样规则保留文件,以 JSON 输出固定信息,并在 stderr 列出保留的 `SKILL.md` 路径。
### 共用配置
| 字段 | 默认值 | 含义 |
|---|---|---|
| `skillsDir` | 无 | 按仓库路径存放保留文件的目录;设置后不下载,路径不是目录时加载失败 |
| `skillsUrls` | `['https://codeload.github.com']` | 按顺序尝试的 HTTPS 归档下载前缀,不含查询串、片段或凭据;无法解析为 URL 的值使配置校验失败 |
| `skillsTimeoutMs` | `120000` | 一个前缀送达完整归档的时限(整数毫秒),超时后尝试下一个 |
-----
<a id="understand-the-implementation"></a>
@@ -86,13 +106,13 @@ const skills = registerUpstreamSkills(ctx, {
<details>
<summary>实现内部细节——点击展开</summary>
提供方只在 `skills.directory` 存在时列出入口技能,来源为 `bundled`、使用内置技能的优先级,因此同名的项目或用户技能优先。发布前它返回完整的空列表,因为不完整的结果会让整个技能目录变成不完整;发布后改为使目录失效;下载失败但发现另一个进程已发布目录时也使目录失效。同一时间只运行一次下载,卸载插件时,提供方注册的信号会中止它。保留文件在与摘要一致之前只存在内存中,总量受 `bytes` 限制,因此未经校验的文件不会写入磁盘;选择范围之外的文件读取后即丢弃,花在它们上面的时间受 `skillsTimeoutMs` 限制。
`register` 在调用方插件的 context 中运行,因此技能提供方是该插件的 effect,随它一起移除。提供方只在句柄的 `directory` 存在时列出入口技能,来源为 `bundled`、使用内置技能的优先级,因此同名的项目或用户技能优先。发布前它返回完整的空列表,因为不完整的结果会让整个技能目录变成不完整;发布后改为使目录失效;下载失败但发现另一个进程已发布目录时也使目录失效。同一时间只运行一次下载,卸载插件时,提供方注册的信号会中止它。保留文件在与摘要一致之前只存在内存中,总量受 `bytes` 限制,因此未经校验的文件不会写入磁盘;选择范围之外的文件读取后即丢弃,花在它们上面的时间受 `skillsTimeoutMs` 限制。
| 文件 | 职责 |
|---|---|
| [`src/index.ts`](src/index.ts) | 共用配置字段、注册、提供方与发布 |
| [`src/index.ts`](src/index.ts) | `ctx.upstreamSkills` Service、其配置、`register`、提供方与发布 |
| [`src/archive.ts`](src/archive.ts) | 下载、读取归档、路径与大小检查、摘要和写入文件 |
| [`src/types.ts`](src/types.ts) | 固定信息与句柄的类型 |
| [`src/types.ts`](src/types.ts) | 固定信息、注册与句柄的类型 |
</details>
@@ -101,17 +121,18 @@ const skills = registerUpstreamSkills(ctx, {
<a id="further-exploration"></a>
## 延伸阅读
- [Connector 包](../README.zh.md)——这个库和 CLI 应用插件所属的分组。
- [Connector 包](../README.zh.md)——这个包和 CLI 应用插件所属的分组。
- [运行时下载上游技能](../../../.agents/notes/implemented/architecture/2026-10-28-upstream-skills-runtime-download.zh.md)——插件为什么下载这些文件,而不是携带副本。
- [Skill registry](../../skill/skill/README.zh.md)——这个库实现的提供方与目录 API。
- [Skill registry](../../skill/skill/README.zh.md)——Service 注册每个入口技能时使用的提供方与目录 API。
- [Skill 子系统参考](../../../docs/subsystems/skills.zh.md)——技能如何到达模型。
- [Base bundle](../../bundle/base/README.zh.md)——加载这个 Service 的组合包,以及 profile 如何覆盖它的某一行。
-----
<a id="model-experience"></a>
## 模型体验
间接影响:上游文件发布后,`dsh-tool-skill` 在目录中列出入口技能,并在返回入口正文时以 `skills.directory` 作为技能的基础目录。
间接影响:上游文件发布后,`dsh-tool-skill` 在目录中列出入口技能,并在返回入口正文时以句柄的 `directory` 作为技能的基础目录。没有插件注册时,Service 不向模型请求添加任何内容。
#### KV Cache 影响
@@ -0,0 +1,6 @@
{
"meta": {
"title": "Upstream-Fähigkeiten von CLI-Apps",
"description": "Lädt die Upstream-Fähigkeitsdateien, die jedes CLI-App-Plugin festlegt, aus dem GitHub-Repository des Anbieters herunter und listet die Einstiegsfähigkeit des Plugins auf, sobald sie vorliegen."
}
}
@@ -0,0 +1,6 @@
{
"meta": {
"title": "CLI app upstream skills",
"description": "Downloads the upstream skill files each CLI app plugin pins from the vendor's GitHub repository and lists the plugin's entry skill once they are in place."
}
}
@@ -0,0 +1,6 @@
{
"meta": {
"title": "Habilidades upstream de aplicaciones CLI",
"description": "Descarga del repositorio de GitHub del proveedor los archivos de habilidades upstream que fija cada complemento de aplicación CLI y muestra la habilidad de entrada del complemento cuando están disponibles."
}
}
@@ -0,0 +1,6 @@
{
"meta": {
"title": "Compétences amont des applications CLI",
"description": "Télécharge depuis le dépôt GitHub du fournisseur les fichiers de compétences amont que chaque plugin d’application CLI épingle, puis liste la compétence d’entrée du plugin une fois qu’ils sont en place."
}
}
@@ -0,0 +1,6 @@
{
"meta": {
"title": "CLI アプリの上流スキル",
"description": "各 CLI アプリプラグインが固定した上流のスキルファイルをベンダーの GitHub リポジトリからダウンロードし、ファイルが揃うとプラグインのエントリースキルを一覧に加えます。"
}
}
@@ -0,0 +1,6 @@
{
"meta": {
"title": "Habilidades upstream de aplicativos CLI",
"description": "Baixa do repositório GitHub do fornecedor os arquivos de habilidades upstream que cada plugin de aplicativo CLI fixa e lista a habilidade de entrada do plugin quando eles estão disponíveis."
}
}
@@ -0,0 +1,6 @@
{
"meta": {
"title": "Исходные навыки CLI-приложений",
"description": "Загружает из репозитория GitHub поставщика исходные файлы навыков, которые закрепляет каждый плагин CLI-приложения, и добавляет в список входной навык плагина, когда они готовы."
}
}
@@ -0,0 +1,6 @@
{
"meta": {
"title": "CLI 应用上游技能",
"description": "从厂商的 GitHub 仓库下载每个 CLI 应用插件固定的上游技能文件,文件就位后列出插件的入口技能。"
}
}
@@ -1,6 +1,6 @@
{
"name": "@deepseek-ai/dsh-upstream-skills",
"description": "Upstream skills of CLI app plugins: download a pinned directory of the vendor's GitHub repository into the DSH cache and list the plugin's entry skill over it",
"description": "Host Service of CLI app plugins: each plugin registers its entry skill and a pinned directory of the vendor's GitHub repository, and the Service downloads that directory into the DSH cache and lists the entry skill over it",
"version": "0.2.2-rc.3",
"publishConfig": {
"access": "public"
@@ -22,9 +22,11 @@
"types": "./lib/types/types.d.ts"
},
"./src/*": "./src/*",
"./package.json": "./package.json"
"./package.json": "./package.json",
"./locale/*.json": "./locale/*.json"
},
"files": [
"locale/*.json",
"lib/index.js",
"lib/types/**/*.d.ts",
"lib/types/**/*.d.ts.map",
+60 -50
View File
@@ -1,7 +1,7 @@
/**
* Upstream skills of CLI app plugins: download the files that a plugin's entry skill indexes from one directory of the
* vendor's GitHub repository at a pinned commit, verify them, publish them in the DSH cache, and list the entry skill
* over them once they are there.
* Upstream skills of CLI app plugins: the Host Service `ctx.upstreamSkills` downloads the files that a plugin's entry
* skill indexes from one directory of the vendor's GitHub repository at a pinned commit, verifies them, publishes them
* in the DSH cache, and lists the entry skill over them once they are there.
* @module @deepseek-ai/dsh-upstream-skills
*/
@@ -9,7 +9,7 @@ import { randomUUID } from 'node:crypto'
import { readFileSync, statSync } from 'node:fs'
import { mkdir, rename, rm } from 'node:fs/promises'
import { basename, dirname, join, resolve } from 'node:path'
import type { Context } from '@deepseek-ai/cordis'
import { Service, type Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
import { dshCachePath } from '@deepseek-ai/dsh-home-paths'
import { BUNDLED_SKILL_RANK, isSkillName } from '@deepseek-ai/dsh-skill'
@@ -17,14 +17,19 @@ import type { SkillCandidate, SkillDefinition, SkillProvider, SkillProviderContr
import { MAX_TIMER_DELAY_MS } from '@deepseek-ai/dsh-timeout'
import { parse as parseYaml } from 'yaml'
import { downloadSkillSet, writeFiles } from './archive.ts'
import type { UpstreamSkills, UpstreamSkillSet, UpstreamSkillsState } from './types.ts'
import type { UpstreamSkillsHandle, UpstreamSkillsRegistration, UpstreamSkillsState } from './types.ts'
export type * from './types.ts'
/** Where the upstream files come from; a plugin adds these fields to its own `Config`. */
export interface UpstreamSkillsConfig {
/** Directory holding the kept files at their repository paths; when set, nothing is downloaded. */
skillsDir?: string
declare module '@deepseek-ai/cordis' {
interface Context {
/** The upstream skills CLI app plugins register. */
upstreamSkills: UpstreamSkills
}
}
/** Where every registered plugin's upstream files are downloaded from. */
export interface Config {
/** Archive download prefixes tried in order; each serves `<owner>/<repository>/tar.gz/<commit>`. */
skillsUrls: string[]
/** How long one prefix may take to deliver the whole archive before the next one is tried. */
@@ -39,46 +44,50 @@ function skillsUrl(value: string): string {
return value
}
/** The shared fields' schema; `skillsUrls` defaults to GitHub's archive host. */
export const UpstreamSkillsConfig: z<Partial<UpstreamSkillsConfig>, UpstreamSkillsConfig> = z.object({
skillsDir: z.string().min(1),
skillsUrls: z.array(z.transform(z.string(), skillsUrl)).min(1).default(['https://codeload.github.com']),
skillsTimeoutMs: z.natural().min(1).max(MAX_TIMER_DELAY_MS).default(120_000),
})
/** Holds what CLI app plugins register: for each plugin, the entry skill and the download of the upstream files it indexes. */
export default class UpstreamSkills extends Service {
static inject = ['skills']
/** One plugin's packaged entry skill and the upstream files it indexes. */
export interface UpstreamSkillsOptions {
/** The skill provider's name, also the directory under `$DSH_HOME/cache` that receives the download. */
readonly name: string
/** Absolute path of the packaged entry `SKILL.md`, whose frontmatter gives the skill's name and description. */
readonly entry: string
/** The pinned upstream files. */
readonly set: UpstreamSkillSet
/** The plugin's `skillsDir`, `skillsUrls`, and `skillsTimeoutMs`. */
readonly config: UpstreamSkillsConfig
}
/**
* Register the entry skill's provider and start downloading the upstream files unless they are in place. The download
* starts at load so that a session without a client also gets the skill; a failure is logged as a warning and waits
* for `retry()`. Disposing the plugin aborts the download and removes the provider.
* @param ctx - Context carrying the skill registry and the logger.
* @param options - the provider name, entry, pinned files, and configured sources.
* @returns the handle the plugin's view observes and its check retries.
* @throws when the entry has no skill name or description in its frontmatter, or `skillsDir` is not a directory.
*/
export function registerUpstreamSkills(ctx: Context, options: UpstreamSkillsOptions): UpstreamSkills {
let skills!: UpstreamSkillProvider
ctx.skills.registerProvider((control) => {
skills = new UpstreamSkillProvider(options, control, ctx.logger)
return skills
/** `skillsUrls` defaults to GitHub's archive host. */
static Config: z<Partial<Config>, Config> = z.object({
skillsUrls: z.array(z.transform(z.string(), skillsUrl)).min(1).default(['https://codeload.github.com']),
skillsTimeoutMs: z.natural().min(1).max(MAX_TIMER_DELAY_MS).default(120_000),
})
skills.retry()
return skills
constructor(ctx: Context, private readonly config: Config) {
super(ctx, 'upstreamSkills')
}
/**
* Register the calling plugin's entry skill and start downloading the upstream files unless they are in place. The
* download starts at load so that a session without a client also gets the skill; a failure is logged as a warning
* and waits for `retry()`. The registration belongs to the calling plugin: unloading that plugin aborts the download
* and removes the entry skill.
* @param registration - the plugin's provider name, entry, pinned files, and optional skills directory.
* @returns the handle the plugin's view observes and its check retries.
* @throws when the entry has no skill name or description in its frontmatter, `skillsDir` is not a directory, or a
* skill provider named `name` is already registered.
*/
register(registration: UpstreamSkillsRegistration): UpstreamSkillsHandle {
const caller = this.ctx
let provider!: UpstreamSkillProvider
const withdraw = caller.skills.registerProvider((control) => {
provider = new UpstreamSkillProvider(registration, this.config, control, caller.logger)
return provider
})
provider.retry()
return {
directory: provider.directory,
get state() { return provider.state },
watch: listener => provider.watch(listener),
retry: () => { provider.retry() },
dispose: withdraw,
}
}
}
/** Lists the entry skill while its upstream files are in place, and owns their download. */
class UpstreamSkillProvider implements SkillProvider, UpstreamSkills {
class UpstreamSkillProvider implements SkillProvider {
readonly name: string
readonly directory: string
private readonly candidate: SkillCandidate
@@ -87,12 +96,13 @@ class UpstreamSkillProvider implements SkillProvider, UpstreamSkills {
private running = false
constructor(
private readonly options: UpstreamSkillsOptions,
private readonly options: UpstreamSkillsRegistration,
private readonly config: Config,
private readonly control: SkillProviderControl,
private readonly logger: Context['logger'],
) {
this.name = options.name
const { skillsDir } = options.config
const { skillsDir } = options
if (skillsDir === undefined) {
this.directory = dshCachePath(options.name, `skills-${options.set.sha256.slice(0, 16)}`)
} else {
@@ -137,7 +147,7 @@ class UpstreamSkillProvider implements SkillProvider, UpstreamSkills {
retry(): void {
const { signal } = this.control
if (this.state !== 'failed' || this.options.config.skillsDir !== undefined || signal.aborted) return
if (this.state !== 'failed' || this.options.skillsDir !== undefined || signal.aborted) return
this.running = true
this.notify()
void this.install(signal).then(
@@ -165,8 +175,8 @@ class UpstreamSkillProvider implements SkillProvider, UpstreamSkills {
/** Download and verify the files, then publish them by renaming a sibling staging directory. */
private async install(signal: AbortSignal): Promise<void> {
const { set, config } = this.options
const files = await downloadSkillSet(set, config.skillsUrls, config.skillsTimeoutMs, signal, (message, error) => {
const { skillsUrls, skillsTimeoutMs } = this.config
const files = await downloadSkillSet(this.options.set, skillsUrls, skillsTimeoutMs, signal, (message, error) => {
this.logger.warn(`${this.name}: ${message}`, error)
})
const staging = join(dirname(this.directory), `.${basename(this.directory)}-${randomUUID()}`)
@@ -183,7 +193,7 @@ class UpstreamSkillProvider implements SkillProvider, UpstreamSkills {
}
/** Read the entry's skill name and description from its YAML frontmatter, and its body after the frontmatter. */
function readEntry(options: UpstreamSkillsOptions): { name: string; description: string; content: string } {
function readEntry(options: UpstreamSkillsRegistration): { name: string; description: string; content: string } {
const raw = readFileSync(options.entry, 'utf8')
const frontmatter = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/u.exec(raw)
const metadata: unknown = frontmatter?.[1] === undefined ? undefined : parseYaml(frontmatter[1])
@@ -1,4 +1,4 @@
/** The pinned upstream files of an entry skill and the handle its plugin observes. */
/** The pinned upstream files of an entry skill, its registration, and the handle its plugin observes. */
/** Which files of a GitHub repository an upstream skill set keeps. */
export interface UpstreamSkillSelection {
@@ -25,8 +25,20 @@ export interface UpstreamSkillSet extends UpstreamSkillSelection {
/** Where an entry skill's upstream files stand: in place, being downloaded, or neither. */
export type UpstreamSkillsState = 'installed' | 'downloading' | 'failed'
/** One plugin's packaged entry skill and the upstream files it indexes. */
export interface UpstreamSkillsRegistration {
/** The skill provider's name, also the directory under `$DSH_HOME/cache` that receives the download. */
readonly name: string
/** Absolute path of the packaged entry `SKILL.md`, whose frontmatter gives the skill's name and description. */
readonly entry: string
/** The pinned upstream files. */
readonly set: UpstreamSkillSet
/** The plugin's configured directory holding the kept files at their repository paths; when set, nothing is downloaded. */
readonly skillsDir?: string | undefined
}
/** The upstream files of one registered entry skill, which the provider lists only while they are in `directory`. */
export interface UpstreamSkills {
export interface UpstreamSkillsHandle {
/** The directory the entry skill resolves relative paths against: `skillsDir`, or the published cache directory. */
readonly directory: string
/** `downloading` while a download runs, otherwise `installed` when `directory` exists and `failed` when it does not. */
@@ -37,6 +49,8 @@ export interface UpstreamSkills {
* @returns the disposer that removes the listener.
*/
watch(listener: (state: UpstreamSkillsState) => void): () => void
/** Start a download when the state is `failed`, unless `skillsDir` is configured or the plugin is disposed; return at once. */
/** Start a download when the state is `failed`, unless `skillsDir` is set or the registration is withdrawn; return at once. */
retry(): void
/** Withdraw the registration before the plugin unloads: abort a running download and remove the entry skill. */
dispose(): void
}
@@ -1,11 +1,11 @@
/** The entry skill over its upstream files: a configured directory, the load-time download, retries, publishing, and disposal. */
/** `ctx.upstreamSkills` lists a plugin's entry skill over its upstream files: a configured directory, downloads, retries, withdrawal. */
import { mkdir, mkdtemp, readdir, readFile, rm, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { Context } from '@deepseek-ai/cordis'
import SkillRegistry from '@deepseek-ai/dsh-skill'
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'
import { registerUpstreamSkills, UpstreamSkillsConfig, type UpstreamSkills, type UpstreamSkillSet, type UpstreamSkillsState } from '../src/index.ts'
import UpstreamSkills, { type Config, type UpstreamSkillsHandle, type UpstreamSkillSet, type UpstreamSkillsState } from '../src/index.ts'
import { KEPT, archivePath, pin, repository, serve, startHost, type ArchiveHost } from './harness.ts'
const renameHook = vi.hoisted(() => ({ before: undefined as ((from: string, to: string) => Promise<void>) | undefined }))
@@ -26,6 +26,8 @@ const ENTRY = '---\nname: vendor\ndescription: Vendor plugin guides.\n---\n\n# V
const BODY = '# Vendor\n\nOpen `skills/alpha/SKILL.md`.'
/** The logger level that exports warnings; the default level keeps only errors and information. */
const WARN_LEVEL = 2
/** The HTTPS prefix the Service downloads from; the tests send its requests to the local archive host. */
const BASE = 'https://skills.test'
let host: ArchiveHost
let fixtures: string
@@ -48,8 +50,11 @@ let home: string
let release: () => void
beforeEach(async () => {
const request = fetch
vi.stubGlobal('fetch', (url: string, init?: RequestInit) => request(url.replace(BASE, host.base), init))
ctx = new Context()
await ctx.plugin(SkillRegistry)
service = await load()
host.routes = {}
host.requests.length = 0
home = await mkdtemp(join(tmpdir(), 'dsh-upstream-skills-home-'))
@@ -60,6 +65,7 @@ beforeEach(async () => {
afterEach(async () => {
release()
vi.unstubAllEnvs()
vi.unstubAllGlobals()
renameHook.before = undefined
await ctx.fiber.dispose()
await rm(home, { recursive: true, force: true })
@@ -71,13 +77,19 @@ const published = () => join(cache(), `skills-${set.sha256.slice(0, 16)}`)
const warning = (message: unknown, error: unknown) => ({ message, error })
const logged = () => ctx.logger.buffer.filter(entry => entry.type === 'warn').map(entry => warning(entry.args[0], entry.args[1]))
const warnings = (): unknown[] => logged().map(({ message }) => message)
const options = (config: Partial<UpstreamSkillsConfig> = {}, pinned: UpstreamSkillSet = set, path = entry) => ({
name: 'vendor', entry: path, set: pinned, config: { skillsUrls: [host.base], skillsTimeoutMs: 10_000, ...config },
})
const register = (config: Partial<UpstreamSkillsConfig> = {}, pinned: UpstreamSkillSet = set, path = entry): UpstreamSkills =>
registerUpstreamSkills(ctx.intercept('logger', { level: WARN_LEVEL }), options(config, pinned, path))
/** Load the Service; `BASE` is its only source unless a test names others. */
const load = (config: Partial<Config> = {}) => ctx.plugin(UpstreamSkills, { skillsUrls: [BASE], skillsTimeoutMs: 10_000, ...config })
let service: Awaited<ReturnType<typeof load>>
/** Load the Service again with other sources. */
async function sources(config: Partial<Config>): Promise<void> {
await service.dispose()
service = await load(config)
}
const registration = (skillsDir?: string, pinned: UpstreamSkillSet = set, path = entry) => ({ name: 'vendor', entry: path, set: pinned, skillsDir })
const register = (skillsDir?: string, pinned: UpstreamSkillSet = set, path = entry): UpstreamSkillsHandle =>
ctx.intercept('logger', { level: WARN_LEVEL }).upstreamSkills.register(registration(skillsDir, pinned, path))
/** Resolve with the state once no download runs. */
const settled = (skills: UpstreamSkills) => new Promise<UpstreamSkillsState>((resolve) => {
const settled = (skills: UpstreamSkillsHandle) => new Promise<UpstreamSkillsState>((resolve) => {
if (skills.state !== 'downloading') {
resolve(skills.state)
return
@@ -101,27 +113,26 @@ const listed = (directory: string) => [{
source: 'bundled', provider: 'vendor', resourceBase: { kind: 'directory', path: directory },
}]
describe('UpstreamSkillsConfig', () => {
describe('Config', () => {
it('defaults to GitHub with a two-minute limit and accepts only HTTPS URL prefixes without a query, fragment, or credentials', () => {
expect(UpstreamSkillsConfig({})).toEqual({ skillsUrls: ['https://codeload.github.com'], skillsTimeoutMs: 120_000 })
expect(UpstreamSkillsConfig({ skillsDir: '/opt/skills', skillsUrls: ['https://mirror.example/github'], skillsTimeoutMs: 1 }))
.toEqual({ skillsDir: '/opt/skills', skillsUrls: ['https://mirror.example/github'], skillsTimeoutMs: 1 })
expect(UpstreamSkills.Config({})).toEqual({ skillsUrls: ['https://codeload.github.com'], skillsTimeoutMs: 120_000 })
expect(UpstreamSkills.Config({ skillsUrls: ['https://mirror.example/github'], skillsTimeoutMs: 1 }))
.toEqual({ skillsUrls: ['https://mirror.example/github'], skillsTimeoutMs: 1 })
for (const url of [
'http://codeload.github.com', 'https://mirror.example/?a=1', 'https://mirror.example/#a', 'https://user@mirror.example',
'https://mirror.example:bad', 'https://[', 'https://:',
]) {
expect(() => UpstreamSkillsConfig({ skillsUrls: [url] })).toThrow()
expect(() => UpstreamSkills.Config({ skillsUrls: [url] })).toThrow()
}
expect(() => UpstreamSkillsConfig({ skillsUrls: [] })).toThrow()
expect(() => UpstreamSkillsConfig({ skillsDir: '' })).toThrow()
expect(() => UpstreamSkillsConfig({ skillsTimeoutMs: 0 })).toThrow()
expect(() => UpstreamSkillsConfig({ skillsTimeoutMs: 1500.5 })).toThrow()
expect(() => UpstreamSkills.Config({ skillsUrls: [] })).toThrow()
expect(() => UpstreamSkills.Config({ skillsTimeoutMs: 0 })).toThrow()
expect(() => UpstreamSkills.Config({ skillsTimeoutMs: 1500.5 })).toThrow()
})
})
describe('registerUpstreamSkills', () => {
describe('register', () => {
it('lists the entry over a configured skills directory at once and downloads nothing', async () => {
const skills = register({ skillsDir: fixtures })
const skills = register(fixtures)
expect(skills.directory).toBe(fixtures)
expect(skills.state).toBe('installed')
skills.retry()
@@ -132,10 +143,10 @@ describe('registerUpstreamSkills', () => {
it('names a skills directory that is missing at load, and reports one removed later as failed without downloading', async () => {
const missing = join(home, 'missing')
expect(() => register({ skillsDir: missing }))
expect(() => register(missing))
.toThrow(`vendor: skillsDir ${missing} is not a directory; set it to a directory holding the files of skills at their repository paths`)
await mkdir(missing)
const skills = register({ skillsDir: missing })
const skills = register(missing)
expect(await ctx.skills.list()).toEqual(listed(missing))
await rm(missing, { recursive: true })
expect(await ctx.skills.get('vendor')).toBeUndefined()
@@ -155,7 +166,7 @@ describe('registerUpstreamSkills', () => {
] as const) {
const path = join(fixtures, file)
await writeFile(path, text)
expect(() => register({ skillsDir: fixtures }, set, path)).toThrow(`vendor: ${path} needs YAML frontmatter with a skill name and a description`)
expect(() => register(fixtures, set, path)).toThrow(`vendor: ${path} needs YAML frontmatter with a skill name and a description`)
}
})
@@ -179,19 +190,21 @@ describe('registerUpstreamSkills', () => {
it('tries the next skills URL after one fails and logs the failed prefix', async () => {
host.routes[archivePath(set, '/mirror')] = serve(repository())
const skills = register({ skillsUrls: [`${host.base}/missing`, `${host.base}/mirror/`] })
await sources({ skillsUrls: [`${BASE}/missing`, `${BASE}/mirror/`] })
const skills = register()
expect(await settled(skills)).toBe('installed')
expect(await ctx.skills.list()).toEqual(listed(published()))
expect(warnings()).toEqual([`vendor: downloading the upstream skills from ${host.base}/missing failed`])
expect(warnings()).toEqual([`vendor: downloading the upstream skills from ${BASE}/missing failed`])
})
it('moves on from a skills URL that does not deliver the whole archive within the time limit', async () => {
host.routes[archivePath(set, '/slow')] = (response) => { response.writeHead(200).write(repository().subarray(0, 64)) }
host.routes[archivePath(set, '/mirror')] = serve(repository())
// The limit applies to each URL, so it also bounds the mirror on a loaded machine.
const skills = register({ skillsUrls: [`${host.base}/slow`, `${host.base}/mirror`], skillsTimeoutMs: 3_000 })
await sources({ skillsUrls: [`${BASE}/slow`, `${BASE}/mirror`], skillsTimeoutMs: 3_000 })
const skills = register()
expect(await settled(skills)).toBe('installed')
expect(warnings()).toEqual([`vendor: downloading the upstream skills from ${host.base}/slow failed`])
expect(warnings()).toEqual([`vendor: downloading the upstream skills from ${BASE}/slow failed`])
// Depending on which stream observes the abort first, the time limit arrives as the TimeoutError or as its cause.
const timedOut = (error: unknown) => error instanceof Error && [error.name, error.cause instanceof Error ? error.cause.name : ''].includes('TimeoutError')
expect(logged()[0]?.error).toSatisfy(timedOut)
@@ -200,16 +213,17 @@ describe('registerUpstreamSkills', () => {
it('refuses every source whose files differ from the pin, publishes nothing, and logs the failure', async () => {
host.routes[archivePath(set, '/empty')] = (response) => { response.writeHead(204).end() }
host.routes[archivePath(set, '/changed')] = serve(repository({ ...KEPT, LICENSE: 'MIT-License\n' }))
const skills = register({ skillsUrls: [`${host.base}/empty`, `${host.base}/changed`] })
await sources({ skillsUrls: [`${BASE}/empty`, `${BASE}/changed`] })
const skills = register()
expect(await settled(skills)).toBe('failed')
expect(warnings()).toEqual([
`vendor: downloading the upstream skills from ${host.base}/empty failed`,
`vendor: downloading the upstream skills from ${host.base}/changed failed`,
`vendor: downloading the upstream skills from ${BASE}/empty failed`,
`vendor: downloading the upstream skills from ${BASE}/changed failed`,
'vendor: the upstream skills are not available',
])
expect(logged()[2]?.error).toMatchObject({
message: `could not download the upstream skills of vendor/skills-repo at ${set.commit} from any skills URL`,
cause: { message: `the kept files of ${host.base}/changed${archivePath(set)} do not match the pinned digest` },
cause: { message: `the kept files of ${BASE}/changed${archivePath(set)} do not match the pinned digest` },
})
expect(await readdir(home)).toEqual([])
expect(await ctx.skills.list()).toEqual([])
@@ -266,7 +280,7 @@ describe('registerUpstreamSkills', () => {
release()
expect(await settled(skills)).toBe('installed')
expect(await ctx.skills.list()).toEqual(listed(published()))
expect(warnings()).toEqual([`vendor: downloading the upstream skills from ${host.base} failed`])
expect(warnings()).toEqual([`vendor: downloading the upstream skills from ${BASE} failed`])
})
it('reports a publish that fails without another process publishing', async () => {
@@ -278,11 +292,17 @@ describe('registerUpstreamSkills', () => {
expect(await readdir(cache())).toEqual([])
})
it('removes the entry and aborts a running download without a warning or a state change when its plugin is disposed', async () => {
let skills!: UpstreamSkills
const apply = (inner: Context) => { skills = registerUpstreamSkills(inner, options()) }
it('refuses a second registration under one name and keeps the first', async () => {
register(fixtures)
expect(() => register(fixtures)).toThrow('a skill provider named "vendor" is already registered')
expect(await ctx.skills.list()).toEqual(listed(fixtures))
})
it('removes the entry and aborts a running download without a warning or a state change when the registering plugin unloads', async () => {
let skills!: UpstreamSkillsHandle
const app = Object.assign((inner: Context) => { skills = inner.upstreamSkills.register(registration()) }, { inject: ['upstreamSkills'] })
host.routes[archivePath(set)] = gated(repository())
const fiber = await ctx.intercept('logger', { level: WARN_LEVEL }).plugin({ name: 'vendor-upstream-skills', inject: ['skills'], apply })
const fiber = await ctx.intercept('logger', { level: WARN_LEVEL }).plugin(app)
const states: UpstreamSkillsState[] = []
skills.watch((state) => { states.push(state) })
await vi.waitFor(() => { expect(host.requests).toEqual([archivePath(set)]) })
@@ -294,9 +314,35 @@ describe('registerUpstreamSkills', () => {
expect(host.requests).toEqual([archivePath(set)])
await mkdir(published(), { recursive: true })
const loaded = await ctx.plugin({ name: 'vendor-upstream-skills', inject: ['skills'], apply })
const loaded = await ctx.plugin(app)
expect(await ctx.skills.list()).toEqual(listed(published()))
await loaded.dispose()
expect(await ctx.skills.list()).toEqual([])
})
it('withdraws only the unloading plugin\'s entry', async () => {
const other = join(fixtures, 'other.md')
await writeFile(other, ENTRY.replace('name: vendor', 'name: other'))
const app = (name: string, path: string) => Object.assign((inner: Context) => {
inner.upstreamSkills.register({ name, entry: path, set, skillsDir: fixtures })
}, { inject: ['upstreamSkills'] })
const first = await ctx.plugin(app('vendor', entry))
await ctx.plugin(app('other', other))
expect((await ctx.skills.list()).map(skill => skill.name).toSorted()).toEqual(['other', 'vendor'])
await first.dispose()
expect((await ctx.skills.list()).map(skill => skill.name)).toEqual(['other'])
})
it('withdraws the entry through the handle before the plugin unloads and aborts its download', async () => {
host.routes[archivePath(set)] = gated(repository())
const skills = register()
await vi.waitFor(() => { expect(host.requests).toEqual([archivePath(set)]) })
skills.dispose()
await vi.waitFor(() => { expect(skills.state).toBe('failed') })
skills.retry()
expect(host.requests).toEqual([archivePath(set)])
expect(warnings()).toEqual([])
await mkdir(published(), { recursive: true })
expect(await ctx.skills.list()).toEqual([])
})
})
@@ -4670,6 +4670,20 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
},
],
},
{
key: 'upstreamSkills',
summary: 'Holds what CLI app plugins register: for each plugin, the entry skill and the download of the upstream files it indexes.',
description: 'Holds what CLI app plugins register: for each plugin, the entry skill and the download of the upstream files it indexes.',
methods: [
{
signature: 'register(registration: UpstreamSkillsRegistration): UpstreamSkillsHandle',
description: 'Register the calling plugin\'s entry skill and start downloading the upstream files unless they are in place. The download starts at load so that a session without a client also gets the skill; a failure is logged as a warning and waits for `retry()`. The registration belongs to the calling plugin: unloading that plugin aborts the download and removes the entry skill.',
parameters: [{ name: 'registration', description: 'the plugin\'s provider name, entry, pinned files, and optional skills directory.' }],
returns: 'the handle the plugin\'s view observes and its check retries.',
throws: ['when the entry has no skill name or description in its frontmatter, `skillsDir` is not a directory, or a skill provider named `name` is already registered.'],
},
],
},
{
key: 'userQuestions',
summary: '`ctx.userQuestions`: validation plus the scoped answerer waterfall.',
@@ -10926,6 +10940,26 @@ export const TYPE_API: readonly TypeApiEntry[] = [
name: 'UpdateTeamTaskRequest',
declaration: 'export interface UpdateTeamTaskRequest {\n readonly taskId: TeamTaskId;\n readonly expectedRevision: number;\n readonly action: TeamTaskAction;\n readonly subject?: string;\n readonly description?: string;\n readonly blockedBy?: readonly TeamTaskId[];\n readonly writeScopes?: readonly string[];\n readonly owner?: SessionId;\n}',
},
{
name: 'UpstreamSkillSelection',
declaration: 'export interface UpstreamSkillSelection {\n readonly repository: string;\n readonly commit: string;\n readonly directory: string;\n readonly exclude: readonly string[];\n readonly license: string;\n}',
},
{
name: 'UpstreamSkillSet',
declaration: 'export interface UpstreamSkillSet extends UpstreamSkillSelection {\n readonly bytes: number;\n readonly sha256: string;\n}',
},
{
name: 'UpstreamSkillsHandle',
declaration: 'export interface UpstreamSkillsHandle {\n readonly directory: string;\n readonly state: UpstreamSkillsState;\n watch(listener: (state: UpstreamSkillsState) => void): () => void;\n retry(): void;\n dispose(): void;\n}',
},
{
name: 'UpstreamSkillsRegistration',
declaration: 'export interface UpstreamSkillsRegistration {\n readonly name: string;\n readonly entry: string;\n readonly set: UpstreamSkillSet;\n readonly skillsDir?: string | undefined;\n}',
},
{
name: 'UpstreamSkillsState',
declaration: 'export type UpstreamSkillsState = \'installed\' | \'downloading\' | \'failed\';',
},
{
name: 'UserMessage',
declaration: 'export interface UserMessage extends MessageBase {\n readonly role: \'user\';\n}',
@@ -154,6 +154,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
| Package | Config | Description |
|---|---|---|
| `@deepseek-ai/dsh-cli-account` | yes | Host Service of CLI app plugins: each plugin registers its third-party CLI and account, and the Service gives the model the CLI's absolute path, runs one account operation at a time, and shows the account on the Plugins page |
| `@deepseek-ai/dsh-upstream-skills` | yes | Host Service of CLI app plugins: each plugin registers its entry skill and a pinned directory of the vendor's GitHub repository, and the Service downloads that directory into the DSH cache and lists the entry skill over it |
## context
+3
View File
@@ -2791,6 +2791,9 @@ importers:
'@deepseek-ai/dsh-typert-registry':
specifier: workspace:*
version: link:../../typert/registry
'@deepseek-ai/dsh-upstream-skills':
specifier: workspace:*
version: link:../../connector/upstream-skills
'@deepseek-ai/dsh-user-approval':
specifier: workspace:*
version: link:../../interaction/user-approval
-1
View File
@@ -60,7 +60,6 @@ const PACKAGE_LIBRARIES: Readonly<Record<string, string>> = {
'packages/boot/app-boot': 'Boot library the app bins import; plain helper exports.',
'packages/boot/cmdline': 'Command-line library the app bins import; plain module exports.',
'packages/util/official-bundles': 'Bundle-list data library the launcher and plugin manager import; plain constant exports.',
'packages/connector/upstream-skills': 'Host library CLI app plugins import to download and list their upstream skills; plain function and schema exports.',
'packages/client/store': 'Browser-side state primitives; plain function/type exports.',
'packages/client/ui-primitives': 'Browser-side UI component library; plain component exports.',
'packages/client/ui-slots': 'Browser-side slot-map declarations; plain type exports.',
+3
View File
@@ -136,6 +136,7 @@ export const SERVICE_PAGE: Record<string, string> = {
settings: 'settings.md',
sessionTitle: 'session-title.md',
skills: 'skills.md',
upstreamSkills: 'skills.md',
spillStore: 'spill.md',
storage: 'storage.md',
storageDomain: 'storage.md',
@@ -1070,6 +1071,8 @@ export const TYPE_LINK_EXEMPTIONS: Readonly<Record<string, string>> = {
ConnectorOperationId: 'account operation id is owned by packages/client/ui-connector-account/README.md',
CliAccountRegistration: 'vendor CLI and account registration is owned by packages/connector/cli-account/README.md',
CliAccountHandle: 'registered account handle is owned by packages/connector/cli-account/README.md',
UpstreamSkillsRegistration: 'entry skill and pinned upstream files registration is owned by packages/connector/upstream-skills/README.md',
UpstreamSkillsHandle: 'registered upstream files handle is owned by packages/connector/upstream-skills/README.md',
ActionCardDecision: 'packages/experimental/action-cards/README.md',
ActionCardKind: 'packages/experimental/action-cards/README.md',
ActionCardResult: 'packages/experimental/action-cards/README.md',
+7
View File
@@ -724,6 +724,13 @@ const SERVICE_ROLES: ServiceRole[] = [
consumers: ['tool-skill'],
note: 'Merges provider skill catalogs; tool-skill renders the session-prefix catalog and loads complete skill bodies.',
},
{
key: 'upstreamSkills',
pkg: 'upstream-skills',
title: 'Upstream skills of CLI app plugins',
mode: 'service',
note: 'Holds what each CLI app plugin registers: downloads the pinned upstream files its entry skill indexes from the vendor\'s GitHub repository, verifies and caches them, and lists the entry skill through `ctx.skills` once they are in place.',
},
{
key: 'agents',
pkg: 'agent',
-1
View File
@@ -36,7 +36,6 @@ export const PRODUCT_PACKAGE_POLICY: Readonly<Record<string, ProductPackagePolic
'packages/subagent/subagent-claude-code': { category: 'optional', reason: 'Separately installed native Claude Code agent integration.' },
'packages/subagent/subagent-codex': { category: 'optional', reason: 'Separately installed native Codex agent integration.' },
'packages/subagent/subagent-dsh-sdk': { category: 'optional', reason: 'Requires an explicitly configured external DSH home.' },
'packages/connector/upstream-skills': { category: 'optional', reason: 'Host library imported by separately installed CLI app plugins.' },
'packages/context/tmux-context': { category: 'optional', reason: 'Context contribution requiring a tmux pane.' },
'packages/fs/tool-str-replace-editor': { category: 'optional', reason: 'Explicit alternative to the default filesystem editing tools.' },
'packages/fs/fs-observation-policy': { category: 'optional', reason: 'Read-before-mutation guard that a deployment enables on the disabled dsh-base row.' },
@@ -68,6 +68,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-jobs
name: '@deepseek-ai/dsh-tool-jobs'
disabled: true
@@ -73,6 +73,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-fs
- id: spill-local
@@ -61,6 +61,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-fs
- id: spill-local
@@ -69,6 +69,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-fs-search
name: '@deepseek-ai/dsh-tool-fs-search'
config:
@@ -61,6 +61,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-fs-search
name: '@deepseek-ai/dsh-tool-fs-search'
config:
@@ -83,6 +83,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-bash
name: '@deepseek-ai/dsh-tool-bash'
disabled: true
@@ -75,6 +75,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-bash
name: '@deepseek-ai/dsh-tool-bash'
disabled: true
@@ -86,6 +86,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-bash
name: '@deepseek-ai/dsh-tool-bash'
disabled: true
@@ -78,6 +78,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-bash
name: '@deepseek-ai/dsh-tool-bash'
disabled: true
@@ -76,6 +76,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-bash
name: '@deepseek-ai/dsh-tool-bash'
disabled: true
@@ -68,6 +68,10 @@
name: '@deepseek-ai/dsh-tool-skill'
disabled: true
- id: upstream-skills
name: '@deepseek-ai/dsh-upstream-skills'
disabled: true
- id: tool-bash
name: '@deepseek-ai/dsh-tool-bash'
disabled: true