feat(experimental): route capability questions to the official-plugin skill

The official-plugins catalog entry now also triggers when the user asks how
to do or use something in this app, asks whether it can do something, or says
a capability is missing, and names tools, automation, access, badges and
signatures besides the earlier categories. At 495 characters it stays within
the skill catalog's 500-character limit; the previous 535-character entry lost
its exclusions to truncation. The Web replay fixture records the new catalog
line.
This commit is contained in:
ZiyaZhang committed 2026-10-22 03:13:23 -07:00
1 parent a02bf55577
commit 0bc0e53173
7 files changed
+15 -12

No files matched your search

@@ -33,11 +33,11 @@
en: 79e932b35e50619a
zh: 821b4d95d6ce1d22
/deepseek-ai-dsh-experimental-plugin-recommendations/model-experience/official-plugin-recommendations/what-the-model-sees:
en: 43506f5fb12f271a
zh: 496cabedb2bbbc6e
en: 41179d43d288aaf4
zh: 75974cd8270410fd
/deepseek-ai-dsh-experimental-plugin-recommendations/model-experience/official-plugin-recommendations/token-effect:
en: 00a094d2bbed5a9b
zh: caba1f479a5c06c1
en: 6aedaa5e5956b24c
zh: 284d70285be785d7
/deepseek-ai-dsh-experimental-plugin-recommendations/model-experience/official-plugin-recommendations/kv-cache-effect:
en: 086a06d4732a88cc
zh: 610597117579cfa4
@@ -75,11 +75,11 @@ Concurrent actions on one card share an operation, and disposal stops local foll
#### What the model sees
The existing `skill` tool loads `official-plugins` when the user wants DSH itself to work differently or gain an ability, such as input methods, displayed thinking, past-session search, terminals, worktrees, agent teams, desktop control or approval prompts. The catalog entry tells the Agent to load it before reading files or source. Loading returns matching policy, the block format, six short examples and the current catalog with names, localized titles, descriptions and enabled state. An enabled match gets usage guidance without a card; a partial match states its limit. Ordinary tasks, quoted wishes, discussion-only and declined requests get no card. The block is the submission; nothing changes until the user clicks Enable. The next request after a click carries a status notice: a fact, not a request for more work, and enabling authorizes nothing beyond that plugin.
The existing `skill` tool loads `official-plugins` when the user asks how to do or use something in DSH, asks whether DSH can do something, or says a capability is missing or should change, such as tools, input, displayed thinking or titles, session search, terminals, worktrees, agent teams, desktop control, automation, access, approval prompts, output badges or signatures, and plugins or plugin sources. The catalog entry tells the Agent that such a question is not a request to develop DSH and to load the skill before reading files or source. Loading returns matching policy, the block format, six short examples and the current catalog with names, localized titles, descriptions and enabled state. An enabled match gets usage guidance without a card; a partial match states its limit. Ordinary tasks, quoted wishes, discussion-only and declined requests get no card. The block is the submission; nothing changes until the user clicks Enable. The next request after a click carries a status notice: a fact, not a request for more work, and enabling authorizes nothing beyond that plugin.
#### Token effect
While enabled, requests carry only the 535-character catalog entry; no tool schema or prompt section is added. A skill load appends about 10K characters: a 3.3K-character policy plus the catalog, which grows with the number of eligible plugins. A recommendation needs one skill load and no further model round trip: the block is part of the final answer. A changed card appends one short status notice to the next request.
While enabled, requests carry only the 495-character catalog entry, within the skill catalog's 500-character limit; no tool schema or prompt section is added. A skill load appends about 10K characters: a 3.3K-character policy plus the catalog, which grows with the number of eligible plugins. A recommendation needs one skill load and no further model round trip: the block is part of the final answer. A changed card appends one short status notice to the next request.
#### KV Cache effect
@@ -75,11 +75,11 @@ Host 入口是函数插件。它的 `apply` 通过 `ctx.plugin` 组装内部的
#### 模型可见内容
用户希望 DSH 本身换一种工作方式或增加一种能力时,例如输入方式、思考内容的显示、搜索历史会话、终端、工作树、多智能体协作、桌面操作或授权确认,现有的 `skill` 工具会加载 `official-plugins`。目录条目要求 Agent 在读取文件或源码之前先加载它。加载结果包含匹配规则、块格式、六个简短示例,以及当前目录中的名称、本地化标题、描述和启用状态。已启用的插件只说明用法、不出卡;只覆盖部分需求时说明限制。普通任务、引用中的愿望、只讨论和明确不要推荐的请求不出卡。写下块即提交;用户点击启用前什么都不会改变。点击后的下一次请求会带一条状态通知:它是事实,不是继续工作的要求,启用一个插件也不授权该插件之外的任何事。
用户问 DSH 里某件事怎么做或怎么用、DSH 能不能做某件事,或者说缺少某种能力、希望它换一种工作方式时,例如工具、输入方式、思考内容或标题的显示、搜索会话、终端、工作树、多智能体协作、桌面操作、自动化、访问权限、授权确认、输出徽章或签名、插件及插件源,现有的 `skill` 工具会加载 `official-plugins`。目录条目告诉 Agent 这类问题不是要开发 DSH,并要求在读取文件或源码之前先加载它。加载结果包含匹配规则、块格式、六个简短示例,以及当前目录中的名称、本地化标题、描述和启用状态。已启用的插件只说明用法、不出卡;只覆盖部分需求时说明限制。普通任务、引用中的愿望、只讨论和明确不要推荐的请求不出卡。写下块即提交;用户点击启用前什么都不会改变。点击后的下一次请求会带一条状态通知:它是事实,不是继续工作的要求,启用一个插件也不授权该插件之外的任何事。
#### Token 影响
启用期间,每次请求只多一条 535 字符的目录条目,不增加工具 schema 或 prompt 段。一次 skill 加载追加约 1 万字符:3.3K 字符的规则,加上随可推荐插件数量增长的目录。一次推荐只需加载一次 skill,不需要额外的模型往返:块就在最终回答里。状态变化的卡片会在下一次请求追加一条简短通知。
启用期间,每次请求只多一条 495 字符的目录条目(在 skill 目录 500 字符的上限内),不增加工具 schema 或 prompt 段。一次 skill 加载追加约 1 万字符:3.3K 字符的规则,加上随可推荐插件数量增长的目录。一次推荐只需加载一次 skill,不需要额外的模型往返:块就在最终回答里。状态变化的卡片会在下一次请求追加一条简短通知。
#### KV Cache 影响
@@ -19,7 +19,7 @@ export function eligible(bundle: BundleInfo): boolean {
export function registerOfficialPluginsSkill(ctx: Context): void {
const candidate: SkillCandidate = {
name: 'official-plugins',
description: 'Check DSH’s built-in optional plugins when the user wants this app itself to work differently or gain an ability, including adding plugins or plugin sources: input methods, how thinking or titles are shown, searching past sessions, persistent terminals, worktrees, agent teams, desktop control, output badges or fewer approval prompts. Such a wish is not a request to develop DSH, even when its source is in the workspace: load this before reading any files or source. Not for ordinary tasks, quoted wishes or declined recommendations.',
description: 'Check DSH’s optional plugins when the user asks how to do or use something in this app, whether it can, or says a capability is missing or should change: tools, input, thinking or title display, session search, terminals, worktrees, agent teams, desktop control, automation, access, approvals, badges or signatures, plugins or plugin sources. Not a request to develop DSH, even in its own repository: load before reading files or source. Not for ordinary tasks, quoted wishes or declined offers.',
provider: 'dsh-official-plugins', source: 'bundled', rank: BUNDLED_SKILL_RANK, locator: null,
invocation: { modelInvocable: true, userInvocable: false },
}
@@ -3,7 +3,7 @@
exports[`official recommendations > offers the live catalog through a skill, adds no tools, and withdraws it on unload > skill discovery 1`] = `
[
{
"description": "Check DSH’s built-in optional plugins when the user wants this app itself to work differently or gain an ability, including adding plugins or plugin sources: input methods, how thinking or titles are shown, searching past sessions, persistent terminals, worktrees, agent teams, desktop control, output badges or fewer approval prompts. Such a wish is not a request to develop DSH, even when its source is in the workspace: load this before reading any files or source. Not for ordinary tasks, quoted wishes or declined recommendations.",
"description": "Check DSH’s optional plugins when the user asks how to do or use something in this app, whether it can, or says a capability is missing or should change: tools, input, thinking or title display, session search, terminals, worktrees, agent teams, desktop control, automation, access, approvals, badges or signatures, plugins or plugin sources. Not a request to develop DSH, even in its own repository: load before reading files or source. Not for ordinary tasks, quoted wishes or declined offers.",
"invocation": {
"modelInvocable": true,
"userInvocable": false,
@@ -12,7 +12,10 @@ describe('official recommendations', () => {
const f = await fixture()
expect(f.ctx.tools.get('list_official_plugins')).toBeUndefined()
expect(f.ctx.tools.get('suggest_plugin')).toBeUndefined()
expect((await f.ctx.skills.list()).filter(skill => skill.name === 'official-plugins')).toMatchSnapshot('skill discovery')
const discovered = (await f.ctx.skills.list()).filter(skill => skill.name === 'official-plugins')
expect(discovered).toMatchSnapshot('skill discovery')
// The skill catalog cuts entries longer than its default 500 characters, which would drop the exclusions at the end.
expect(discovered[0]!.description.length).toBeLessThanOrEqual(500)
expect(f.manager.listBundles).not.toHaveBeenCalled()
const noMeta = { ...bundle }
delete noMeta.meta
@@ -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":"I want to dictate long requests instead of typing them."}],"source":{"kind":"user","rpcId":"{{rpc:1}}","clientTimeZone":"{{clientTimeZone}}"},"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: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed.\n\nCurrent DeepSeek Harness implementation checkout: \"{{sourceRoot}}\".\n\nCurrent DeepSeek Harness Web GUI URL: \"{{webUrl}}\"."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."},{"name":"harness:source","text":"Current DeepSeek Harness implementation checkout: \"{{sourceRoot}}\"."},{"name":"app:web-surface","text":"Current DeepSeek Harness Web GUI URL: \"{{webUrl}}\"."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"<system-reminder>\nA skill is a reusable set of task-specific instructions. The following skills are available in this session:\n\n<available_skills>\n- `official-plugins`: Check DSH’s built-in optional plugins when the user wants this app itself to work differently or gain an ability, including adding plugins or plugin sources: input methods, how thinking or titles are shown, searching past sessions, persistent terminals, worktrees, agent teams, desktop control, output badges or fewer approval prompts. Such a wish is not a request to develop DSH, even when its source is in the workspace: load this before reading any files or source. Not for ordinary tasks, quot...\n</available_skills>\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 <skill_content> block then appears in this conversation. Follow it, and do not call the `skill` tool again for that skill.\n</system-reminder>"}],"source":{"kind":"skill-catalog","form":"catalog","entries":[{"name":"official-plugins","description":"Check DSH’s built-in optional plugins when the user wants this app itself to work differently or gain an ability, including adding plugins or plugin sources: input methods, how thinking or titles are shown, searching past sessions, persistent terminals, worktrees, agent teams, desktop control, output badges or fewer approval prompts. Such a wish is not a request to develop DSH, even when its source is in the workspace: load this before reading any files or source. Not for ordinary tasks, quot..."}]},"role":"user","id":"{{message:4}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"<system-reminder>\nA skill is a reusable set of task-specific instructions. The following skills are available in this session:\n\n<available_skills>\n- `official-plugins`: Check DSH’s optional plugins when the user asks how to do or use something in this app, whether it can, or says a capability is missing or should change: tools, input, thinking or title display, session search, terminals, worktrees, agent teams, desktop control, automation, access, approvals, badges or signatures, plugins or plugin sources. Not a request to develop DSH, even in its own repository: load before reading files or source. Not for ordinary tasks, quoted wishes or declined offers.\n</available_skills>\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 <skill_content> block then appears in this conversation. Follow it, and do not call the `skill` tool again for that skill.\n</system-reminder>"}],"source":{"kind":"skill-catalog","form":"catalog","entries":[{"name":"official-plugins","description":"Check DSH’s optional plugins when the user asks how to do or use something in this app, whether it can, or says a capability is missing or should change: tools, input, thinking or title display, session search, terminals, worktrees, agent teams, desktop control, automation, access, approvals, badges or signatures, plugins or plugin sources. Not a request to develop DSH, even in its own repository: load before reading files or source. Not for ordinary tasks, quoted wishes or declined offers."}]},"role":"user","id":"{{message:4}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Time sampled while preparing turn 1, step 1: {{timeContextTimestamp}}\nBrowser time zone for this request: {{clientTimeZone}}. Interpret otherwise-unqualified dates and times in this zone.\nElapsed since the preceding model-visible message: {{elapsed}}"}],"source":{"kind":"time-context","form":"snapshot","sections":[{"name":"time-context","text":"Time sampled while preparing turn 1, step 1: {{timeContextTimestamp}}\nBrowser time zone for this request: {{clientTimeZone}}. Interpret otherwise-unqualified dates and times in this zone.\nElapsed since the preceding model-visible message: {{elapsed}}"}]},"role":"user","id":"{{message:5}}"},"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","contextWindow":128000}}