fix(agent-presets): declare the selected event on the unified session types entrypoint

The persistence catalog recognizes augmentations of
'@deepseek-ai/dsh-session/types' alone, so the old root-specifier
declaration compiled but silently vanished from the generated catalog; the
Agent Note also drops its internal repository link for the public-links
gate, and the persistence catalog pair re-records with the restored
agent-preset section.
This commit is contained in:
Yichen Jiang
2026-08-09 23:18:05 +08:00
parent d5af34b022
commit feac8ab1ac
4 changed files with 5 additions and 5 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-08-09-layered-skill-registry.md
2026-08-09-layered-skill-registry.md: d621bb3066a7347d562a439012c0f34aab63e9fe
2026-08-09-layered-skill-registry.zh.md: 3b324d537f3d010c894ba0375ba20272e40f5fe8
2026-08-09-layered-skill-registry.md: 3f092cfb4b722e3dd51fa4dc46c620259eaffa39
2026-08-09-layered-skill-registry.zh.md: 38b17329c8d46ee9bbd0863f3fae7cf6be39aa75

View File

@@ -6,7 +6,7 @@ English | [中文](2026-08-09-layered-skill-registry.zh.md)
## Problem
The agent-preset stack moved the whole skill capability — registry, local provider, and the `skill` tool — into each preset's `isolate` realm, because "which skills an agent has" is an agent-plane choice. That framing conflated two different questions: which skills a *deployment* supplies, and whether an *agent* consumes them. A repository plugin's prepared wrapper declares `inject: ['skills']` and mounts its skill root as a host-plane provider; with no host registry composed in the web and headless profiles, that wrapper waited forever and the repository-plugin e2e hung, which [was bypassed by dropping the fixture's skill root](https://github.com/deepseek-harness/deepseek-harness/pull/1538). A per-preset realm registry also made the gateway's skill listing depend on a live agent — a cold session's `/` popup had no registry to read at all.
The agent-preset stack moved the whole skill capability — registry, local provider, and the `skill` tool — into each preset's `isolate` realm, because "which skills an agent has" is an agent-plane choice. That framing conflated two different questions: which skills a *deployment* supplies, and whether an *agent* consumes them. A repository plugin's prepared wrapper declares `inject: ['skills']` and mounts its skill root as a host-plane provider; with no host registry composed in the web and headless profiles, that wrapper waited forever and the repository-plugin e2e hung, which was bypassed at the time by dropping the fixture's skill root. A per-preset realm registry also made the gateway's skill listing depend on a live agent — a cold session's `/` popup had no registry to read at all.
The tools registry never had this problem: it is one host singleton layered per scope over `dsh-scope`, so deployment-level tools (MCP servers, plugin entries) register globally while a preset's rows register into that preset's layer.

View File

@@ -6,7 +6,7 @@ Status: implemented
## 问题
agent-preset stack 曾把整个 skill 能力——注册表、本地提供方和 `skill` 工具——搬进每个 preset 的 `isolate` realm理由是"agent 拥有哪些 skill"属于 agent 平面的选择。这一框架混淆了两个不同的问题:*部署*供给哪些 skill与*agent*是否消费它们。repository 插件的 prepared wrapper 声明 `inject: ['skills']` 并把它的 skill 根目录挂载为宿主平面的提供方web 与 headless profile 不再组合宿主注册表后,该 wrapper 永远等待repository-plugin e2e 因而挂死,[当时通过删掉 fixture 的 skill 根目录绕过](https://github.com/deepseek-harness/deepseek-harness/pull/1538)。按 preset 的 realm 注册表还让网关的 skill 列表依赖存活 agent——冷会话的 `/` 弹窗根本没有注册表可读。
agent-preset stack 曾把整个 skill 能力——注册表、本地提供方和 `skill` 工具——搬进每个 preset 的 `isolate` realm理由是"agent 拥有哪些 skill"属于 agent 平面的选择。这一框架混淆了两个不同的问题:*部署*供给哪些 skill与*agent*是否消费它们。repository 插件的 prepared wrapper 声明 `inject: ['skills']` 并把它的 skill 根目录挂载为宿主平面的提供方web 与 headless profile 不再组合宿主注册表后,该 wrapper 永远等待repository-plugin e2e 因而挂死,当时通过删掉 fixture 的 skill 根目录绕过。按 preset 的 realm 注册表还让网关的 skill 列表依赖存活 agent——冷会话的 `/` 弹窗根本没有注册表可读。
工具注册表从未有过这个问题:它是一个宿主单例,基于 `dsh-scope` 按 scope 分层因此部署级工具MCP 服务器、插件 entry注册进全局层preset 的行注册进该 preset 的层。

View File

@@ -15,7 +15,7 @@
import type { SessionEvent, SessionHeader } from '@deepseek-ai/dsh-session'
declare module '@deepseek-ai/dsh-session' {
declare module '@deepseek-ai/dsh-session/types' {
interface SessionEventMap {
/**
* The session's agent preset was chosen after creation, while the session