Merge commit '65056bc614a' into worktree/forge-m7-review-page-ee17bf
This commit is contained in:
commit
a86c488ba1
589 files changed
+5706
-1050
No files matched your search
+2
-2
@@ -9,8 +9,8 @@
|
||||
en: 8578b584bda3abdc
|
||||
zh: 85dcf44aab2cfd51
|
||||
/agent-note-desktop-welcome-window-material/decision:
|
||||
en: 1affa7f1fccc945f
|
||||
zh: e5aea959e7886a59
|
||||
en: 307d17b576022b26
|
||||
zh: 2992ab7d8abde284
|
||||
/agent-note-desktop-welcome-window-material/alternatives-considered:
|
||||
en: cf42e200b1d0f00a
|
||||
zh: de96b5647f5ffb23
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ The desktop welcome design blurs the desktop behind its entire window. Chromium
|
||||
|
||||
The [Electron welcome window](../../../../apps/desktop/src/welcome-window.ts) owns native material and window controls. Its independently bundled React renderer supplies the entry, account sign-in states and API-key form. It shares the `StateDot` loading component with the Web UI without booting the Web plugin graph. The Desktop build emits local JavaScript and CSS under `lib/welcome`, included in packaged applications; the document keeps its network-denying content security policy. A narrow preload supplies typed shell copy, a write-only key operation, and a skip operation; IPC rejects other windows and subframes. Each sandboxed preload is bundled independently because Electron’s restricted require cannot load sibling chunks. The Electron main process authenticates through the shared Web launch URL and resolves the official provider's reference through the existing settings and credential RPC methods. The [thin Web wrapper](2026-09-10-desktop-web-wrapper.md) owns the HTTP server; onboarding adds no Host endpoint or child IPC operation. Responses contain metadata or a safe outcome, never a key or private provider diagnostics.
|
||||
|
||||
Cold startup opens the entry when neither an account credential nor a model API key is configured. Saving enters the workspace after persistence succeeds; skipping enters without saving a draft or a credential-entry completion flag. The next process launch checks credentials again. The Desktop preload marker suppresses the automatic Web credential step and welcome notice; settings and explicit API-key editing remain available. The [Desktop onboarding reference](../../../../packages/client/ui-settings-account/README.md) owns the separate device-local introduction after account login. Other native shells can disable only the credential step through the Models Host plugin's `credentialOnboarding` page-injection value. The module graph carries package identities rather than arbitrary Host config, so a Host row alone does not configure its Client half. The [account provider](2026-09-14-deepseek-account-login.md) supplies login and sign-out state while preserving independently stored API keys.
|
||||
Cold startup opens the entry when neither an account credential nor a model API key is configured. Saving enters the workspace after persistence succeeds; skipping enters without saving a draft or a credential-entry completion flag. The next process launch checks credentials again. The Desktop preload marker suppresses the automatic Web credential step and welcome notice; settings and explicit API-key editing remain available. The [Desktop onboarding reference](../../../../packages/client/ui-settings-account/README.md) owns the separate device-local introduction after account login. Other native shells can disable only the credential step through the Models plugin's synced `credentialOnboarding` Config field. The module graph carries package identities rather than arbitrary Host config, so a Host row alone does not configure its Client half. The [account provider](2026-09-14-deepseek-account-login.md) supplies login and sign-out state while preserving independently stored API keys.
|
||||
|
||||
The generated project follows declared workspace dependencies because pnpm’s hoist index alone can omit configured plugins.
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ Status: implemented
|
||||
|
||||
[Electron 欢迎窗口](../../../../apps/desktop/src/welcome-window.ts)负责原生材质和窗口控件。独立打包的 React 渲染器提供入口、账号登录状态和 API Key 表单。它与 Web UI 共用 `StateDot` 加载组件,不启动 Web 插件图。Desktop 构建将本地 JavaScript 和 CSS 输出到 `lib/welcome`,并纳入应用安装包;文档继续使用禁止网络访问的内容安全策略。窄接口 preload 提供强类型桌面文案、仅写密钥操作和跳过操作;IPC 拒绝其他窗口和子 frame。每个沙箱 preload 都独立打包,因为 Electron 受限的 require 无法加载同目录中的拆分模块。Electron 主进程通过共享 Web 启动 URL 认证,并通过现有设置和凭证 RPC 方法解析官方提供方的引用。[Web 薄壳](2026-09-10-desktop-web-wrapper.zh.md)负责 HTTP 服务;引导不增加 Host 端点或子进程 IPC 操作。响应只包含元数据或安全结果,不包含密钥或提供方的私有诊断。
|
||||
|
||||
冷启动在账号凭证与模型 API Key 均未配置时打开入口。保存会在持久化成功后进入工作区;跳过会直接进入,不保存草稿或凭证入口完成标记。下次进程启动时会重新检查凭证。Desktop preload 标记抑制自动 Web 凭证步骤和欢迎须知;设置与显式 API Key 编辑仍然可用。[Desktop 引导参考](../../../../packages/client/ui-settings-account/README.zh.md)负责账号登录后独立的设备本地介绍流程。其他原生壳可以通过 Models Host 插件注入页面的 `credentialOnboarding` 值仅禁用凭证步骤。模块图传递的是包标识,而不是任意 Host 配置,因此单独配置 Host 行不会配置其 Client 半部。[账号提供方](2026-09-14-deepseek-account-login.zh.md)提供登录与退出登录状态,同时保留独立存储的 API Key。
|
||||
冷启动在账号凭证与模型 API Key 均未配置时打开入口。保存会在持久化成功后进入工作区;跳过会直接进入,不保存草稿或凭证入口完成标记。下次进程启动时会重新检查凭证。Desktop preload 标记抑制自动 Web 凭证步骤和欢迎须知;设置与显式 API Key 编辑仍然可用。[Desktop 引导参考](../../../../packages/client/ui-settings-account/README.zh.md)负责账号登录后独立的设备本地介绍流程。其他原生壳可以通过 Models 插件同步到浏览器的 `credentialOnboarding` Config 字段仅禁用凭证步骤。模块图传递的是包标识,而不是任意 Host 配置,因此单独配置 Host 行不会配置其 Client 半部。[账号提供方](2026-09-14-deepseek-account-login.zh.md)提供登录与退出登录状态,同时保留独立存储的 API Key。
|
||||
|
||||
生成的开发项目沿已声明的 workspace 依赖建立链接,因为单独依赖 pnpm 的提升索引会漏掉配置插件。
|
||||
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# Bilingual-pair consistency record for 2026-10-28-upstream-skills-runtime-download.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-10-28-upstream-skills-runtime-download.md
|
||||
/agent-note-runtime-download-of-upstream-skills:
|
||||
en: aa22dd6b2e4a7dd5
|
||||
zh: 19e36747a2ae6310
|
||||
/agent-note-runtime-download-of-upstream-skills/problem:
|
||||
en: 755fe8a192cfebe1
|
||||
zh: 855ad2920b33e364
|
||||
/agent-note-runtime-download-of-upstream-skills/decision:
|
||||
en: e601879f83a17cba
|
||||
zh: a5ab03a7804787fc
|
||||
/agent-note-runtime-download-of-upstream-skills/alternatives-considered:
|
||||
en: 3828cc141c037db6
|
||||
zh: 3a164d7a5886cbd2
|
||||
/agent-note-runtime-download-of-upstream-skills/consequences:
|
||||
en: 124556ff88e9e014
|
||||
zh: d25070f79bb2c726
|
||||
@@ -0,0 +1,31 @@
|
||||
# Agent Note: Runtime download of upstream skills
|
||||
|
||||
Status: implemented
|
||||
|
||||
English | [中文](2026-10-28-upstream-skills-runtime-download.zh.md)
|
||||
|
||||
## Problem
|
||||
|
||||
The WeCom and Tencent Meeting plugins index guides that their vendors publish only in their GitHub repositories: 180 files, about 1.75 MB, for WeCom and 11 for Tencent Meeting. A copy in this repository dominates each plugin's diff and every upstream update, and the plugins' npm packages would publish DeepSeek's copy of another company's content. DeepSeek does not publish such copies.
|
||||
|
||||
## Decision
|
||||
|
||||
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
|
||||
|
||||
**A copy in this repository.** It was the earlier approach. Byte-identical copies dominate review and upstream updates, and the plugins' npm packages republish them.
|
||||
|
||||
**A DSH-published package of the upstream files.** It moves the copy out of this repository, but it is still DeepSeek's own publication of another company's content.
|
||||
|
||||
**The vendors' npm packages.** Neither `@wecom/cli` nor `@tencentcloud/tmeet` ships the skills.
|
||||
|
||||
**jsDelivr or one request per file.** A CDN adds a third party between the vendor and the user. Per-file downloads need the file list in the pin and one request per file, while one archive per commit needs one request and lets the digest cover exactly what is kept.
|
||||
|
||||
**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 register with this Service, and DingTalk keeps its own downloader.
|
||||
|
||||
## Consequences
|
||||
|
||||
The repository and the plugins' npm packages carry only the entry skills. The first load after a new pin needs GitHub or a configured mirror; until a download succeeds, the entry skill is not listed and the plugin shows the failure, which its next check retries. Tests, recorded Sessions, and Web end-to-end tests set `skillsDir` to fixture files and make no network requests. Published directories are never pruned. Updating a pin is a code change: `scripts/upstream-skills-digest.ts` prints the new pin, and the entry's guide index and a real-model run follow it.
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# Agent Note:运行时下载上游技能
|
||||
|
||||
Status: implemented
|
||||
|
||||
[English](2026-10-28-upstream-skills-runtime-download.md) | 中文
|
||||
|
||||
## 问题
|
||||
|
||||
企业微信和腾讯会议插件索引的子指南,厂商只在自己的 GitHub 仓库里发布:企业微信 180 个文件,约 1.75 MB;腾讯会议 11 个。把它们复制进本仓库,会让副本占据每个插件的 diff 和每次上游更新,插件的 npm 包也会发布 DeepSeek 复制的其他公司内容。DeepSeek 不发布这类副本。
|
||||
|
||||
## 决策
|
||||
|
||||
这些插件只保留 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` 为所有插件替换归档主机。
|
||||
|
||||
## 考虑过的替代方案
|
||||
|
||||
**在本仓库中保留副本。** 这是之前的做法。逐字节相同的副本占据评审和上游更新,插件的 npm 包还会再次发布它们。
|
||||
|
||||
**由 DSH 发布上游文件的包。** 它把副本移出本仓库,但仍是 DeepSeek 自己发布其他公司的内容。
|
||||
|
||||
**厂商的 npm 包。** `@wecom/cli` 和 `@tencentcloud/tmeet` 都不包含这些技能。
|
||||
|
||||
**jsDelivr 或逐个文件请求。** CDN 在厂商和用户之间多了一个第三方。逐个文件下载需要在固定信息中列出文件,每个文件一次请求;每个提交一个归档只需一次请求,摘要也正好覆盖保留的文件。
|
||||
|
||||
**对归档字节做摘要。** 提交归档中的文件是稳定的,但 GitHub 不保证压缩后的字节稳定,因此摘要覆盖保留文件的路径和内容。
|
||||
|
||||
**钉钉的下载器。** 钉钉把带校验和的发布资产和可执行文件一起下载。企业微信和腾讯会议没有发布资产,CLI 从 npm 安装,因此只有这两个插件注册到这个 Service,钉钉保留自己的下载器。
|
||||
|
||||
## 影响
|
||||
|
||||
仓库和插件的 npm 包里只有入口技能。换用新的固定提交后,首次加载需要能访问 GitHub 或配置的镜像;下载成功之前,入口技能不会列出,插件显示失败,下一次检查会重试。测试、录制的 Session 和 Web 端到端测试都把 `skillsDir` 设为夹具文件,不发起网络请求。已发布的目录从不清理。更新固定提交需要改代码:`scripts/upstream-skills-digest.ts` 输出新的固定信息,随后更新入口的子指南索引,并用真实模型运行一次。
|
||||
@@ -0,0 +1,22 @@
|
||||
# Bilingual-pair consistency record for 2026-10-08-mcp-on-demand-tool-loading.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write .agents/notes/implemented/feature/2026-10-08-mcp-on-demand-tool-loading.md
|
||||
/agent-note-on-demand-mcp-tool-loading:
|
||||
en: f3ae8820249277c7
|
||||
zh: e93dfdb03fbf1788
|
||||
/agent-note-on-demand-mcp-tool-loading/problem:
|
||||
en: 8b6051ee3006e42d
|
||||
zh: b54399f1a65c6751
|
||||
/agent-note-on-demand-mcp-tool-loading/decision:
|
||||
en: d6ad94daf6a36798
|
||||
zh: c243547d88d752be
|
||||
/agent-note-on-demand-mcp-tool-loading/alternatives-considered:
|
||||
en: eb073fc5dfd6692d
|
||||
zh: 51e842eae3fe7c61
|
||||
/agent-note-on-demand-mcp-tool-loading/testing:
|
||||
en: 22966b6f3a05d7bd
|
||||
zh: 1bf76080026d447f
|
||||
/agent-note-on-demand-mcp-tool-loading/consequences:
|
||||
en: 2a4e348e3e43fe78
|
||||
zh: c7fdb56494f2bef3
|
||||
@@ -0,0 +1,53 @@
|
||||
# Agent Note: On-demand MCP tool loading
|
||||
|
||||
Status: implemented
|
||||
|
||||
English | [中文](2026-10-08-mcp-on-demand-tool-loading.zh.md)
|
||||
|
||||
## Problem
|
||||
|
||||
A connected MCP server sends every tool definition with every request. Notion's hosted server advertises 46 tools whose definitions total about 214,500 characters; one tool's input schema alone is about 83,000 characters. A Notion plugin that only registers the server therefore costs that context on every request, before the model uses a single Notion tool.
|
||||
|
||||
The existing `ToolSchema.deferLoading` marker does not solve this. Only routes that declare `toolUpdate` honor it, and the default `deepseek-flash` entry is the only catalog route that does. The marker keeps a prefix reusable; it does not reduce context.
|
||||
|
||||
## Decision
|
||||
|
||||
An mcp-client entry with `toolLoading: on-demand` keeps the server's tools out of the tool registry. The behavior lives in mcp-client; no session event, message type, or other package changes, and mcp-manager only passes the field to its instances.
|
||||
|
||||
**One loader per server.** The server registers `mcp__<serverName>__load_tools` where an eager server registers its tools, and withdraws it where an eager server removes them, so outages and reconnects follow the eager lifecycle. A server tool named `load_tools` is left out of the catalog with a logged warning.
|
||||
|
||||
**The catalog is a system prompt section.** The `mcp:<serverName>:tools` section lists each tool's raw name with the first line of its description, capped by `catalogDescriptionMaxLength`, and renders only for an agent that sees the loader. The session log already records the system prompt, so the catalog needs no new message type, and it changes only when the server's tool list does.
|
||||
|
||||
**Loading registers in the agent's own scope.** The loader validates every requested raw name before registering any, then registers the definitions in a scope the plugin creates for that agent. The plugin releases the scope on `agent/disposed`, and plugin unload disposes it. The next request header carries the definitions, and the agent loop records the addition. Subagents, forks, and resumed sessions start with no loaded tools.
|
||||
|
||||
**Each published generation carries loaded tools forward.** A tool definition calls the client of the generation that built it, so a reconnect must replace loaded definitions. Each published generation re-registers every agent's loaded names that it still offers and drops the rest. A failed re-registration drops only that agent's tool and logs the failure.
|
||||
|
||||
**The loader decides access.** Tool restrictions filter only inherited tools, so seeing the loader permits loading any listed tool, as seeing `skill` permits loading any listed skill. Execution guards and permissions still apply.
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
**A shared `load_mcp_tools` tool in mcp-resources with a session catalog message.** Rejected after implementation: it needed a cross-package catalog interface, a Host-wide-only restriction, an `agent/pre-step` listener that scanned session history on every step of every agent, and a persisted message type.
|
||||
|
||||
**The catalog in the loader's tool description.** Rejected: OpenAI and Azure OpenAI Chat Completions reject tool descriptions longer than 1024 characters, pi-ai routes pass descriptions through unchanged, and a catalog of a dozen tools exceeds that limit.
|
||||
|
||||
**A static `includeTools` list per entry.** Rejected: each plugin must choose its tools ahead of time, and the model cannot use the other tools during a session.
|
||||
|
||||
**A proxy tool `call_mcp_tool(server, tool, args)`.** Rejected: the tool list never changes, but the model loses each tool's argument schema, and permissions, presentation, and guards that match tool names would need forwarding.
|
||||
|
||||
**Mark MCP tools with `deferLoading`.** Rejected: it saves no context and works only on routes that declare `toolUpdate`.
|
||||
|
||||
**Global registration hidden per agent with `tools.restrict({ deny })`.** Rejected: every agent needs a restriction scope, and every tool change rescans the registry and copies every schema.
|
||||
|
||||
**Restore loaded tools on resume.** Rejected: it needs a durable record of loaded names, which is a session format change. The agent loop already records which tools a resumed session lost.
|
||||
|
||||
## Testing
|
||||
|
||||
mcp-client specs cover the loader-only registration and the prompt catalog, catalog omission for agents that cannot see the loader, loading into one agent's scope, invalid loads, carrying loaded tools across generations, withdrawal and restoration, agent release, a contained re-registration failure, the excluded `load_tools` server tool, a loader-name conflict, and the plugin path from load through call to unload. A manager spec mounts an on-demand entry. The `mcp-tool-loading` session snapshot pins the catalog section, the loader schema, the tool-addition record, and a call after loading.
|
||||
|
||||
## Consequences
|
||||
|
||||
- An on-demand server costs the loader definition and one catalog line per tool until an agent loads tools.
|
||||
- Each load changes the next request's tool list. Routes declaring tool updates keep the earlier prefix; other routes start a new request series once per load.
|
||||
- The model needs one extra tool call before using a server's tools.
|
||||
- Agent tool restrictions do not filter loaded tools; `tools.guard` denies a loadable tool by name.
|
||||
- A PTC program sees a tool loaded inside `run_code` only from the next program.
|
||||
@@ -0,0 +1,53 @@
|
||||
# Agent Note: On-demand MCP tool loading
|
||||
|
||||
Status: implemented
|
||||
|
||||
[English](2026-10-08-mcp-on-demand-tool-loading.md) | 中文
|
||||
|
||||
## Problem
|
||||
|
||||
已连接的 MCP 服务器会在每次请求中发送全部工具定义。Notion 托管服务器提供 46 个工具,定义合计约 214,500 字符;其中一个工具的输入 schema 就约有 83,000 字符。因此,只注册服务器的 Notion 插件在模型使用任何 Notion 工具之前,就会让每次请求都承担这部分上下文。
|
||||
|
||||
现有的 `ToolSchema.deferLoading` 标记解决不了这个问题。只有声明了 `toolUpdate` 的路由才会遵循它,而目录中只有默认的 `deepseek-flash` 条目声明了。该标记能保留可复用的前缀,但不会减少上下文。
|
||||
|
||||
## Decision
|
||||
|
||||
配置 `toolLoading: on-demand` 的 mcp-client 条目不把服务器的工具注册到工具注册表。该行为位于 mcp-client 内部;不改动会话事件、消息类型或其他包,mcp-manager 只把该字段传给它的实例。
|
||||
|
||||
**每个服务器一个加载器。** 服务器在 eager 服务器注册工具的位置注册 `mcp__<serverName>__load_tools`,并在 eager 服务器移除工具的位置撤下它,因此断线与重连遵循 eager 的生命周期。服务器自己名为 `load_tools` 的工具不列入目录,并记录一条警告。
|
||||
|
||||
**目录是一个系统提示词段落。** `mcp:<serverName>:tools` 段落列出每个工具的原始名称及其描述的第一行,长度以 `catalogDescriptionMaxLength` 为上限,并且只对能看到加载器的 agent 渲染。会话日志本来就记录系统提示词,所以目录不需要新的消息类型;只有服务器的工具列表变化时目录才会变化。
|
||||
|
||||
**加载注册到 agent 自己的作用域。** 加载器先校验所有请求的原始名称,再注册任何工具;随后把这些定义注册到插件为该 agent 创建的作用域中。插件在 `agent/disposed` 时释放该作用域,插件卸载时也会释放它。下一次请求头带上这些定义,agent loop 记录这次添加。子 agent、fork 和恢复的会话开始时都没有已加载的工具。
|
||||
|
||||
**每个发布的注册代都会延续已加载的工具。** 工具定义调用的是构建它的那一代连接的 client,因此重连后必须替换已加载的定义。每次发布注册代时,会为每个 agent 重新注册该代仍提供的已加载名称,并丢弃其余名称。重新注册失败只丢弃该 agent 的这个工具,并记录失败。
|
||||
|
||||
**加载器决定访问权限。** 工具限制只过滤继承的工具,因此能看到加载器就能加载目录中的任何工具,就像能看到 `skill` 就能加载目录中的任何 skill。执行 guard 与权限检查照常生效。
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
**在 mcp-resources 中放一个共享的 `load_mcp_tools` 工具,并发布会话目录消息。** 实现后否决:它需要跨包的目录接口、只支持 Host 级服务器的限制、在每个 agent 的每一步都扫描会话历史的 `agent/pre-step` 监听器,以及一种持久化消息类型。
|
||||
|
||||
**把目录放进加载器的工具描述。** 否决:OpenAI 与 Azure OpenAI 的 Chat Completions 会拒绝超过 1024 字符的工具描述,pi-ai 路由原样传递描述,而十几个工具的目录就会超过这个上限。
|
||||
|
||||
**每个条目一个静态 `includeTools` 列表。** 否决:每个插件都必须预先选定工具,会话中模型无法使用其他工具。
|
||||
|
||||
**代理工具 `call_mcp_tool(server, tool, args)`。** 否决:工具列表从不变化,但模型失去每个工具的参数 schema,按工具名匹配的权限、展示与 guard 都需要转发。
|
||||
|
||||
**给 MCP 工具加 `deferLoading` 标记。** 否决:它不节省上下文,且只在声明 `toolUpdate` 的路由上生效。
|
||||
|
||||
**全局注册,再用 `tools.restrict({ deny })` 按 agent 隐藏。** 否决:每个 agent 都需要一个限制作用域,每次工具变化都会重新扫描注册表并复制每个 schema。
|
||||
|
||||
**恢复会话时恢复已加载的工具。** 否决:这需要持久记录已加载的名称,也就是改动会话格式。agent loop 已经会记录恢复的会话失去了哪些工具。
|
||||
|
||||
## Testing
|
||||
|
||||
mcp-client 规格覆盖:只注册加载器与提示词目录、看不到加载器的 agent 不渲染目录、加载到单个 agent 的作用域、无效加载、跨注册代延续已加载工具、撤下与恢复、释放 agent、限定在单个 agent 的重新注册失败、被排除的 `load_tools` 服务器工具、加载器名称冲突,以及从加载、调用到卸载的插件路径。一个 manager 规格挂载按需条目。`mcp-tool-loading` 会话快照固定目录段落、加载器 schema、工具添加记录,以及加载后的一次调用。
|
||||
|
||||
## Consequences
|
||||
|
||||
- 在 agent 加载工具之前,按需服务器的开销是加载器定义加每个工具一行目录。
|
||||
- 每次加载都会改变下一次请求的工具列表。声明了工具更新的路由保留之前的前缀;其他路由每次加载开始一个新的请求序列。
|
||||
- 模型在使用服务器的工具之前需要多一次工具调用。
|
||||
- agent 的工具限制不过滤已加载的工具;用 `tools.guard` 可按名称禁止可加载的工具。
|
||||
- PTC 程序要到下一个程序才能看到在 `run_code` 内加载的工具。
|
||||
@@ -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` |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh",
|
||||
"description": "dsh CLI: profile launch, plugin management, and configuration inspection",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-desktop-host",
|
||||
"description": "Private Node-mode host process for the Electron desktop application",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-desktop-publisher",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"description": "Private Desktop release metadata, rollout and website publisher",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-desktop",
|
||||
"description": "Electron desktop shell for a bundled dsh runtime and external plugins",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-plugin-market-generator",
|
||||
"description": "Reference generator of plugin market index files from a list of npm packages and Git repositories",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-web-frontend",
|
||||
"description": "Web application entry: vite build over the @deepseek-ai/dsh-client-web shell library; dist/ served by apps/cli's dsh web",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
en: 41d772192075e133
|
||||
zh: 5ef3da69b4de1d8a
|
||||
/capability-seams-and-core-services:
|
||||
en: f27ea1887527a8db
|
||||
zh: 51ec833addcaba6e
|
||||
en: b8a43c17719d548b
|
||||
zh: 3335f8c8fa696bae
|
||||
@@ -221,6 +221,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"]
|
||||
@@ -501,6 +503,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
|
||||
@@ -771,6 +774,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. |
|
||||
|
||||
@@ -223,6 +223,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"]
|
||||
@@ -503,6 +505,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
|
||||
@@ -773,6 +776,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 的事件和服务,而不依赖此包。 |
|
||||
|
||||
+113
-42
@@ -504,13 +504,14 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-client-connection`
|
||||
|
||||
- `source`: [`packages/client/connection/src/index.ts:92`](../packages/client/connection/src/index.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/connection/src/types.ts:6`](../packages/client/connection/src/types.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Browser authentication, request limits, and connection recovery configuration. */
|
||||
export interface ConnectionConfig {
|
||||
/** Browser recovery timing, injected into each served page. */
|
||||
recovery?: ConnectionRecoveryConfig
|
||||
/** Browser recovery timing; the browser receives it through its synced Config and reads it once when the plugin activates. */
|
||||
recovery?: Volatile<ConnectionRecoveryConfig>
|
||||
/**
|
||||
* Authorities this deployment serves beyond loopback: exact `host:port`, or
|
||||
* port-less `host` matching any port. The fence accepts loopback and the
|
||||
@@ -587,13 +588,17 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-client-shortcuts`
|
||||
|
||||
- `source`: [`packages/client/shortcuts/src/config.ts:5`](../packages/client/shortcuts/src/config.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/shortcuts/src/index.ts:7`](../packages/client/shortcuts/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Fixed shortcut sequence settings. */
|
||||
export interface Config {
|
||||
/** Fixed shortcut sequence timing; the browser receives it through its synced Config. */
|
||||
export type Config = ShortcutsConfig
|
||||
|
||||
/** Fixed shortcut sequence timing; the browser receives it through its synced Config. */
|
||||
export interface ShortcutsConfig {
|
||||
/** Maximum interval between independent Escape presses for stopping a reply, in milliseconds. */
|
||||
stopSequenceMs: number
|
||||
stopSequenceMs: Volatile<number>
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-shortcuts -->
|
||||
@@ -603,17 +608,41 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-client-ui-account-notifications`
|
||||
|
||||
- `source`: [`packages/client/ui-account-notifications/src/config.ts:5`](../packages/client/ui-account-notifications/src/config.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/ui-account-notifications/src/index.ts:7`](../packages/client/ui-account-notifications/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Initial polling interval before the server supplies its next delay. */
|
||||
export interface Config {
|
||||
/** Initial polling interval; the browser receives it through its synced Config. */
|
||||
export type Config = AccountNotificationsConfig
|
||||
|
||||
/** Initial polling interval; the browser receives it through its synced Config. */
|
||||
export interface AccountNotificationsConfig {
|
||||
/** Initial query delay in milliseconds, replaced by each successful server response. */
|
||||
notificationPollIntervalMs: number
|
||||
notificationPollIntervalMs: Volatile<number>
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-ui-account-notifications -->
|
||||
|
||||
<!-- BEGIN GENERATED config-catalog:@deepseek-ai/dsh-client-ui-context-menu -->
|
||||
<a id="deepseek-aidsh-client-ui-context-menu"></a>
|
||||
|
||||
## `@deepseek-ai/dsh-client-ui-context-menu`
|
||||
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/ui-context-menu/src/index.ts:7`](../packages/client/ui-context-menu/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Live preparation budget; the browser receives it through its synced Config. */
|
||||
export type Config = ContextMenuConfig
|
||||
|
||||
/** Live preparation budget; the browser receives it through its synced Config. */
|
||||
export interface ContextMenuConfig {
|
||||
/** Maximum time in milliseconds to prepare each contribution before omitting its pending actions. */
|
||||
resolutionTimeoutMs: Volatile<number>
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-ui-context-menu -->
|
||||
|
||||
<!-- BEGIN GENERATED config-catalog:@deepseek-ai/dsh-client-ui-plugin-manager -->
|
||||
<a id="deepseek-aidsh-client-ui-plugin-manager"></a>
|
||||
|
||||
@@ -685,13 +714,17 @@ export type OnboardingProcess = 'compact' | 'standard' | 'detailed'
|
||||
|
||||
## `@deepseek-ai/dsh-client-ui-settings-models`
|
||||
|
||||
- `source`: [`packages/client/ui-settings-models/src/onboarding-config.ts:6`](../packages/client/ui-settings-models/src/onboarding-config.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/ui-settings-models/src/index.ts:7`](../packages/client/ui-settings-models/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Onboarding options after schema defaults are applied. */
|
||||
export interface Config {
|
||||
/** Offer the browser API-key step when no native shell owns credential onboarding. */
|
||||
credentialOnboarding: boolean
|
||||
/** Credential-onboarding choice synced to the browser. */
|
||||
export type Config = ModelsConfig
|
||||
|
||||
/** Credential-onboarding choice; the browser receives it through its synced Config. */
|
||||
export interface ModelsConfig {
|
||||
/** Offer the browser API-key step automatically when no native shell owns credential onboarding. */
|
||||
credentialOnboarding: Volatile<boolean>
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-ui-settings-models -->
|
||||
@@ -701,31 +734,41 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-client-ui-sidebar-documentpreview`
|
||||
|
||||
- `source`: [`packages/client/ui-sidebar-documentpreview/src/config.ts:5`](../packages/client/ui-sidebar-documentpreview/src/config.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/ui-sidebar-documentpreview/src/index.ts:8`](../packages/client/ui-sidebar-documentpreview/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Transient Office conversion reuse within one Client connection. */
|
||||
export interface Config {
|
||||
/** Retained PDF limits; pending conversions share cancellation by reader lifetime. */
|
||||
office: {
|
||||
/** Maximum retained completed PDFs. */
|
||||
maxCachedEntries: number
|
||||
/** Maximum retained PDF bytes, counted by each binary buffer's byteLength. */
|
||||
maxCachedBytes: number
|
||||
/** Maximum unsettled Host conversion RPCs, including cancellation teardown. */
|
||||
maxPending: number
|
||||
/** Maximum readers including source and renderer metadata lookups. */
|
||||
maxReaders: number
|
||||
}
|
||||
/** Browser spreadsheet parser and dense cell allocation limits. */
|
||||
excel: {
|
||||
/** Maximum source file bytes. */
|
||||
maxBytes: number
|
||||
/** Maximum combined rectangular cell area across worksheets. */
|
||||
maxCells: number
|
||||
/** Maximum parser Worker lifetime in milliseconds. */
|
||||
timeoutMs: number
|
||||
}
|
||||
/** Preview limits synced to the browser. */
|
||||
export type Config = DocumentPreviewConfig
|
||||
|
||||
/** Preview limits; the browser receives each object through its synced Config and reads it once when the plugin activates. */
|
||||
export interface DocumentPreviewConfig {
|
||||
/** Transient Office conversion reuse within one Client connection. */
|
||||
office: Volatile<OfficeLimits>
|
||||
/** Browser spreadsheet parser limits. */
|
||||
excel: Volatile<ExcelLimits>
|
||||
}
|
||||
|
||||
/** Retained PDF limits; pending conversions share cancellation by reader lifetime. */
|
||||
export interface OfficeLimits {
|
||||
/** Maximum retained completed PDFs. */
|
||||
maxCachedEntries: number
|
||||
/** Maximum retained PDF bytes, counted by each binary buffer's byteLength. */
|
||||
maxCachedBytes: number
|
||||
/** Maximum unsettled Host conversion RPCs, including cancellation teardown. */
|
||||
maxPending: number
|
||||
/** Maximum readers including source and renderer metadata lookups. */
|
||||
maxReaders: number
|
||||
}
|
||||
|
||||
/** Browser spreadsheet parser and dense cell allocation limits. */
|
||||
export interface ExcelLimits {
|
||||
/** Maximum source file bytes. */
|
||||
maxBytes: number
|
||||
/** Maximum combined rectangular cell area across worksheets. */
|
||||
maxCells: number
|
||||
/** Maximum parser Worker lifetime in milliseconds. */
|
||||
timeoutMs: number
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-ui-sidebar-documentpreview -->
|
||||
@@ -2540,7 +2583,7 @@ export interface LspLocalServerConfig {
|
||||
## `@deepseek-ai/dsh-mcp-client`
|
||||
|
||||
- `inject`: `tools`
|
||||
- `source`: [`packages/mcp/mcp-client/src/index.ts:128`](../packages/mcp/mcp-client/src/index.ts)
|
||||
- `source`: [`packages/mcp/mcp-client/src/index.ts:136`](../packages/mcp/mcp-client/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Configuration for one stdio or Streamable HTTP MCP server. */
|
||||
@@ -2578,6 +2621,10 @@ export interface StdioConfig {
|
||||
maxInstructionBytes?: number
|
||||
/** Automatic reconnect policy after a lost connection; omission uses the defaults. */
|
||||
reconnect?: ReconnectConfig
|
||||
/** `on-demand` lists the server's tools for agents to load instead of registering them (default `eager`). */
|
||||
toolLoading: 'eager' | 'on-demand'
|
||||
/** Maximum characters of each tool's summary in an on-demand server's prompt catalog (default 160). */
|
||||
catalogDescriptionMaxLength: number
|
||||
}
|
||||
|
||||
/** Config for connecting to an MCP server over Streamable HTTP (SSE). */
|
||||
@@ -2610,6 +2657,10 @@ export interface StreamableHttpConfig {
|
||||
maxInstructionBytes?: number
|
||||
/** Automatic reconnect policy after a lost connection; omission uses the defaults. */
|
||||
reconnect?: ReconnectConfig
|
||||
/** `on-demand` lists the server's tools for agents to load instead of registering them (default `eager`). */
|
||||
toolLoading: 'eager' | 'on-demand'
|
||||
/** Maximum characters of each tool's summary in an on-demand server's prompt catalog (default 160). */
|
||||
catalogDescriptionMaxLength: number
|
||||
}
|
||||
|
||||
/** Automatic reconnect policy for one MCP server connection. */
|
||||
@@ -2647,7 +2698,7 @@ export interface McpOAuthConfig {
|
||||
|
||||
- `inject`: `tools`
|
||||
- `refs`: [`McpOAuthConfigInput`](../packages/mcp/mcp-client/src/index.ts) · [`ReconnectConfig`](../packages/mcp/mcp-client/src/index.ts) · `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/mcp/mcp-manager/src/index.ts:75`](../packages/mcp/mcp-manager/src/index.ts)
|
||||
- `source`: [`packages/mcp/mcp-manager/src/index.ts:77`](../packages/mcp/mcp-manager/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Manager configuration with live server entries. */
|
||||
@@ -2689,6 +2740,8 @@ export interface McpManagedServerEntry {
|
||||
closeTimeoutMs?: number
|
||||
/** Reconnect policy; the MCP client host validates it, and omission uses the mcp-client defaults. */
|
||||
reconnect?: ReconnectConfig
|
||||
/** `on-demand` keeps the server's tools out of every tool list until an agent loads them; default `eager`. */
|
||||
toolLoading: 'eager' | 'on-demand'
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-mcp-manager -->
|
||||
@@ -4981,6 +5034,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>
|
||||
|
||||
@@ -5304,7 +5376,6 @@ These load from a `cordis.yml` entry with no `config:` block; they declare no co
|
||||
| `@deepseek-ai/dsh-client-ui-chat` | — | [`packages/client/ui-chat/src/index.ts`](../packages/client/ui-chat/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-commands` | — | [`packages/client/ui-commands/src/index.ts`](../packages/client/ui-commands/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-connector-account` | — | [`packages/client/ui-connector-account/src/index.ts`](../packages/client/ui-connector-account/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-context-menu` | — | [`packages/client/ui-context-menu/src/index.ts`](../packages/client/ui-context-menu/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-conversation` | — | [`packages/client/ui-conversation/src/index.ts`](../packages/client/ui-conversation/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-cordis` | — | [`packages/extensions/ui-cordis/src/index.ts`](../packages/extensions/ui-cordis/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-creation-recommendations` | — | [`packages/experimental/client-ui-creation-recommendations/src/index.ts`](../packages/experimental/client-ui-creation-recommendations/src/index.ts) |
|
||||
|
||||
+113
-42
@@ -506,13 +506,14 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-client-connection`
|
||||
|
||||
- `source`: [`packages/client/connection/src/index.ts:92`](../packages/client/connection/src/index.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/connection/src/types.ts:6`](../packages/client/connection/src/types.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Browser authentication, request limits, and connection recovery configuration. */
|
||||
export interface ConnectionConfig {
|
||||
/** Browser recovery timing, injected into each served page. */
|
||||
recovery?: ConnectionRecoveryConfig
|
||||
/** Browser recovery timing; the browser receives it through its synced Config and reads it once when the plugin activates. */
|
||||
recovery?: Volatile<ConnectionRecoveryConfig>
|
||||
/**
|
||||
* Authorities this deployment serves beyond loopback: exact `host:port`, or
|
||||
* port-less `host` matching any port. The fence accepts loopback and the
|
||||
@@ -589,13 +590,17 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-client-shortcuts`
|
||||
|
||||
- `source`: [`packages/client/shortcuts/src/config.ts:5`](../packages/client/shortcuts/src/config.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/shortcuts/src/index.ts:7`](../packages/client/shortcuts/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Fixed shortcut sequence settings. */
|
||||
export interface Config {
|
||||
/** Fixed shortcut sequence timing; the browser receives it through its synced Config. */
|
||||
export type Config = ShortcutsConfig
|
||||
|
||||
/** Fixed shortcut sequence timing; the browser receives it through its synced Config. */
|
||||
export interface ShortcutsConfig {
|
||||
/** Maximum interval between independent Escape presses for stopping a reply, in milliseconds. */
|
||||
stopSequenceMs: number
|
||||
stopSequenceMs: Volatile<number>
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-shortcuts -->
|
||||
@@ -605,17 +610,41 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-client-ui-account-notifications`
|
||||
|
||||
- `source`: [`packages/client/ui-account-notifications/src/config.ts:5`](../packages/client/ui-account-notifications/src/config.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/ui-account-notifications/src/index.ts:7`](../packages/client/ui-account-notifications/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Initial polling interval before the server supplies its next delay. */
|
||||
export interface Config {
|
||||
/** Initial polling interval; the browser receives it through its synced Config. */
|
||||
export type Config = AccountNotificationsConfig
|
||||
|
||||
/** Initial polling interval; the browser receives it through its synced Config. */
|
||||
export interface AccountNotificationsConfig {
|
||||
/** Initial query delay in milliseconds, replaced by each successful server response. */
|
||||
notificationPollIntervalMs: number
|
||||
notificationPollIntervalMs: Volatile<number>
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-ui-account-notifications -->
|
||||
|
||||
<!-- BEGIN GENERATED config-catalog:@deepseek-ai/dsh-client-ui-context-menu -->
|
||||
<a id="deepseek-aidsh-client-ui-context-menu"></a>
|
||||
|
||||
## `@deepseek-ai/dsh-client-ui-context-menu`
|
||||
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/ui-context-menu/src/index.ts:7`](../packages/client/ui-context-menu/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Live preparation budget; the browser receives it through its synced Config. */
|
||||
export type Config = ContextMenuConfig
|
||||
|
||||
/** Live preparation budget; the browser receives it through its synced Config. */
|
||||
export interface ContextMenuConfig {
|
||||
/** Maximum time in milliseconds to prepare each contribution before omitting its pending actions. */
|
||||
resolutionTimeoutMs: Volatile<number>
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-ui-context-menu -->
|
||||
|
||||
<!-- BEGIN GENERATED config-catalog:@deepseek-ai/dsh-client-ui-plugin-manager -->
|
||||
<a id="deepseek-aidsh-client-ui-plugin-manager"></a>
|
||||
|
||||
@@ -687,13 +716,17 @@ export type OnboardingProcess = 'compact' | 'standard' | 'detailed'
|
||||
|
||||
## `@deepseek-ai/dsh-client-ui-settings-models`
|
||||
|
||||
- `source`: [`packages/client/ui-settings-models/src/onboarding-config.ts:6`](../packages/client/ui-settings-models/src/onboarding-config.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/ui-settings-models/src/index.ts:7`](../packages/client/ui-settings-models/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Onboarding options after schema defaults are applied. */
|
||||
export interface Config {
|
||||
/** Offer the browser API-key step when no native shell owns credential onboarding. */
|
||||
credentialOnboarding: boolean
|
||||
/** Credential-onboarding choice synced to the browser. */
|
||||
export type Config = ModelsConfig
|
||||
|
||||
/** Credential-onboarding choice; the browser receives it through its synced Config. */
|
||||
export interface ModelsConfig {
|
||||
/** Offer the browser API-key step automatically when no native shell owns credential onboarding. */
|
||||
credentialOnboarding: Volatile<boolean>
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-ui-settings-models -->
|
||||
@@ -703,31 +736,41 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-client-ui-sidebar-documentpreview`
|
||||
|
||||
- `source`: [`packages/client/ui-sidebar-documentpreview/src/config.ts:5`](../packages/client/ui-sidebar-documentpreview/src/config.ts)
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/client/ui-sidebar-documentpreview/src/index.ts:8`](../packages/client/ui-sidebar-documentpreview/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Transient Office conversion reuse within one Client connection. */
|
||||
export interface Config {
|
||||
/** Retained PDF limits; pending conversions share cancellation by reader lifetime. */
|
||||
office: {
|
||||
/** Maximum retained completed PDFs. */
|
||||
maxCachedEntries: number
|
||||
/** Maximum retained PDF bytes, counted by each binary buffer's byteLength. */
|
||||
maxCachedBytes: number
|
||||
/** Maximum unsettled Host conversion RPCs, including cancellation teardown. */
|
||||
maxPending: number
|
||||
/** Maximum readers including source and renderer metadata lookups. */
|
||||
maxReaders: number
|
||||
}
|
||||
/** Browser spreadsheet parser and dense cell allocation limits. */
|
||||
excel: {
|
||||
/** Maximum source file bytes. */
|
||||
maxBytes: number
|
||||
/** Maximum combined rectangular cell area across worksheets. */
|
||||
maxCells: number
|
||||
/** Maximum parser Worker lifetime in milliseconds. */
|
||||
timeoutMs: number
|
||||
}
|
||||
/** Preview limits synced to the browser. */
|
||||
export type Config = DocumentPreviewConfig
|
||||
|
||||
/** Preview limits; the browser receives each object through its synced Config and reads it once when the plugin activates. */
|
||||
export interface DocumentPreviewConfig {
|
||||
/** Transient Office conversion reuse within one Client connection. */
|
||||
office: Volatile<OfficeLimits>
|
||||
/** Browser spreadsheet parser limits. */
|
||||
excel: Volatile<ExcelLimits>
|
||||
}
|
||||
|
||||
/** Retained PDF limits; pending conversions share cancellation by reader lifetime. */
|
||||
export interface OfficeLimits {
|
||||
/** Maximum retained completed PDFs. */
|
||||
maxCachedEntries: number
|
||||
/** Maximum retained PDF bytes, counted by each binary buffer's byteLength. */
|
||||
maxCachedBytes: number
|
||||
/** Maximum unsettled Host conversion RPCs, including cancellation teardown. */
|
||||
maxPending: number
|
||||
/** Maximum readers including source and renderer metadata lookups. */
|
||||
maxReaders: number
|
||||
}
|
||||
|
||||
/** Browser spreadsheet parser and dense cell allocation limits. */
|
||||
export interface ExcelLimits {
|
||||
/** Maximum source file bytes. */
|
||||
maxBytes: number
|
||||
/** Maximum combined rectangular cell area across worksheets. */
|
||||
maxCells: number
|
||||
/** Maximum parser Worker lifetime in milliseconds. */
|
||||
timeoutMs: number
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-client-ui-sidebar-documentpreview -->
|
||||
@@ -2542,7 +2585,7 @@ export interface LspLocalServerConfig {
|
||||
## `@deepseek-ai/dsh-mcp-client`
|
||||
|
||||
- `inject`: `tools`
|
||||
- `source`: [`packages/mcp/mcp-client/src/index.ts:128`](../packages/mcp/mcp-client/src/index.ts)
|
||||
- `source`: [`packages/mcp/mcp-client/src/index.ts:136`](../packages/mcp/mcp-client/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Configuration for one stdio or Streamable HTTP MCP server. */
|
||||
@@ -2580,6 +2623,10 @@ export interface StdioConfig {
|
||||
maxInstructionBytes?: number
|
||||
/** Automatic reconnect policy after a lost connection; omission uses the defaults. */
|
||||
reconnect?: ReconnectConfig
|
||||
/** `on-demand` lists the server's tools for agents to load instead of registering them (default `eager`). */
|
||||
toolLoading: 'eager' | 'on-demand'
|
||||
/** Maximum characters of each tool's summary in an on-demand server's prompt catalog (default 160). */
|
||||
catalogDescriptionMaxLength: number
|
||||
}
|
||||
|
||||
/** Config for connecting to an MCP server over Streamable HTTP (SSE). */
|
||||
@@ -2612,6 +2659,10 @@ export interface StreamableHttpConfig {
|
||||
maxInstructionBytes?: number
|
||||
/** Automatic reconnect policy after a lost connection; omission uses the defaults. */
|
||||
reconnect?: ReconnectConfig
|
||||
/** `on-demand` lists the server's tools for agents to load instead of registering them (default `eager`). */
|
||||
toolLoading: 'eager' | 'on-demand'
|
||||
/** Maximum characters of each tool's summary in an on-demand server's prompt catalog (default 160). */
|
||||
catalogDescriptionMaxLength: number
|
||||
}
|
||||
|
||||
/** Automatic reconnect policy for one MCP server connection. */
|
||||
@@ -2649,7 +2700,7 @@ export interface McpOAuthConfig {
|
||||
|
||||
- `inject`: `tools`
|
||||
- `refs`: [`McpOAuthConfigInput`](../packages/mcp/mcp-client/src/index.ts) · [`ReconnectConfig`](../packages/mcp/mcp-client/src/index.ts) · `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/mcp/mcp-manager/src/index.ts:75`](../packages/mcp/mcp-manager/src/index.ts)
|
||||
- `source`: [`packages/mcp/mcp-manager/src/index.ts:77`](../packages/mcp/mcp-manager/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Manager configuration with live server entries. */
|
||||
@@ -2691,6 +2742,8 @@ export interface McpManagedServerEntry {
|
||||
closeTimeoutMs?: number
|
||||
/** Reconnect policy; the MCP client host validates it, and omission uses the mcp-client defaults. */
|
||||
reconnect?: ReconnectConfig
|
||||
/** `on-demand` keeps the server's tools out of every tool list until an agent loads them; default `eager`. */
|
||||
toolLoading: 'eager' | 'on-demand'
|
||||
}
|
||||
```
|
||||
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-mcp-manager -->
|
||||
@@ -4983,6 +5036,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>
|
||||
|
||||
@@ -5306,7 +5378,6 @@ export interface Config {
|
||||
| `@deepseek-ai/dsh-client-ui-chat` | — | [`packages/client/ui-chat/src/index.ts`](../packages/client/ui-chat/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-commands` | — | [`packages/client/ui-commands/src/index.ts`](../packages/client/ui-commands/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-connector-account` | — | [`packages/client/ui-connector-account/src/index.ts`](../packages/client/ui-connector-account/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-context-menu` | — | [`packages/client/ui-context-menu/src/index.ts`](../packages/client/ui-context-menu/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-conversation` | — | [`packages/client/ui-conversation/src/index.ts`](../packages/client/ui-conversation/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-cordis` | — | [`packages/extensions/ui-cordis/src/index.ts`](../packages/extensions/ui-cordis/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-client-ui-creation-recommendations` | — | [`packages/experimental/client-ui-creation-recommendations/src/index.ts`](../packages/experimental/client-ui-creation-recommendations/src/index.ts) |
|
||||
|
||||
@@ -14,7 +14,7 @@ Application listeners are outside this package matrix. Desktop Host subscribes t
|
||||
| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:90`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | [`cua`](../packages/experimental/cua), `remotes` |
|
||||
| `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:400`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:291`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | [`agent-team`](../packages/team/agent-team), `browser-use-runtime`, `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`cua`](../packages/experimental/cua), [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/experimental/hooks-claude-code), [`hooks-codex`](../packages/experimental/hooks-codex), `liveshare`, [`loader-smoke`](../packages/test-support/loader-smoke), [`permission-presets`](../packages/interaction/permission-presets), `session-controller`, [`timeline`](../packages/experimental/timeline) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:300`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), `server`, `session-controller`, [`subagent`](../packages/subagent/subagent), [`timeline`](../packages/experimental/timeline), [`tool-office`](../packages/document/tool-office), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:300`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), [`mcp-client`](../packages/mcp/mcp-client), `server`, `session-controller`, [`subagent`](../packages/subagent/subagent), [`timeline`](../packages/experimental/timeline), [`tool-office`](../packages/document/tool-office), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) |
|
||||
| `agent/error` | `emit` | [`packages/core/agent/src/runtime-types.ts:430`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`goal-round-driver`](../packages/goal/goal-round-driver), [`headless`](../packages/bundle/headless), [`llm-deepseek-account`](../packages/llm/llm-deepseek-account), `server`, `session-controller`, [`session-telemetry`](../packages/session/session-telemetry), [`subagent`](../packages/subagent/subagent) |
|
||||
| `agent/inbox/claimed` | `emit` | [`packages/core/agent/src/runtime-types.ts:329`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`tool-jobs`](../packages/jobs/tool-jobs), [`user-questions`](../packages/interaction/user-questions) |
|
||||
| `agent/inbox/discarded` | `emit` | [`packages/core/agent/src/runtime-types.ts:337`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`user-questions`](../packages/interaction/user-questions) |
|
||||
@@ -33,7 +33,7 @@ Application listeners are outside this package matrix. Desktop Host subscribes t
|
||||
| `authorization/settled` | `emit` | [`packages/credentials/authorization/src/index.ts:57`](../packages/credentials/authorization/src/index.ts) | [`authorization`](../packages/credentials/authorization) (`events.dispatch`) | - |
|
||||
| `commands/change` | `emit` | [`packages/interaction/commands/src/types.ts:89`](../packages/interaction/commands/src/types.ts) | [`commands`](../packages/interaction/commands) (`events.dispatch`) | `remotes` |
|
||||
| `compaction/summary-error` | `waterfall` | [`packages/compaction/compaction/src/index.ts:106`](../packages/compaction/compaction/src/index.ts) | [`compaction-basic`](../packages/compaction/compaction-basic) (`waterfall`) | [`compaction-image-offload`](../packages/compaction/compaction-image-offload) |
|
||||
| `connection/request` | `waterfall` | [`packages/client/connection/src/index.ts:67`](../packages/client/connection/src/index.ts) | `connection` (`waterfall`) | - |
|
||||
| `connection/request` | `waterfall` | [`packages/client/connection/src/index.ts:68`](../packages/client/connection/src/index.ts) | `connection` (`waterfall`) | - |
|
||||
| `cordis/dynamic-package` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:383`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
|
||||
| `cordis/dynamic-retract` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:389`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
|
||||
| `cordis/inspect-query` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:395`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
|
||||
@@ -95,7 +95,7 @@ Application listeners are outside this package matrix. Desktop Host subscribes t
|
||||
| `web/providers-changed` | `emit` | [`packages/web/web/src/types.ts:21`](../packages/web/web/src/types.ts) | [`web`](../packages/web/web) (`events.dispatch`) | `remotes` |
|
||||
| `webserver/authorize` | `bail` | [`packages/host/webserver/src/index.ts:60`](../packages/host/webserver/src/index.ts) | `webserver` (`bail`) | `connection` |
|
||||
| `webserver/entry-url` | `emit` | [`packages/host/webserver/src/index.ts:53`](../packages/host/webserver/src/index.ts) | [`web-app`](../packages/bundle/web-app) (`emit`) | `authentication-token` |
|
||||
| `webserver/index-inject` | `emit` | [`packages/host/webserver/src/index.ts:90`](../packages/host/webserver/src/index.ts) | `webserver` (`emit`) | `connection`, `inspector`, `modules`, `remote-access`, `shortcuts`, `ui-sidebar-documentpreview`, `ui-theme` |
|
||||
| `webserver/index-inject` | `emit` | [`packages/host/webserver/src/index.ts:90`](../packages/host/webserver/src/index.ts) | `webserver` (`emit`) | `inspector`, `modules`, `remote-access`, `ui-theme` |
|
||||
| `webserver/request` | `waterfall` | [`packages/host/webserver/src/index.ts:68`](../packages/host/webserver/src/index.ts) | `webserver` (`waterfall`) | `authentication-token`, [`deepseek-account`](../packages/account/deepseek-account), [`mcp-client`](../packages/mcp/mcp-client) |
|
||||
| `webserver/upgrade` | `waterfall` | [`packages/host/webserver/src/index.ts:78`](../packages/host/webserver/src/index.ts) | `webserver` (`waterfall`) | `authentication-token` |
|
||||
| `workflow/agent-end` | `emit` | [`packages/workflow/workflow/src/index.ts:79`](../packages/workflow/workflow/src/index.ts) | [`workflow`](../packages/workflow/workflow) (`events.dispatch`) | [`tool-workflow`](../packages/workflow/tool-workflow) |
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:90`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | [`cua`](../packages/experimental/cua), `remotes` |
|
||||
| `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:400`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:291`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | [`agent-team`](../packages/team/agent-team), `browser-use-runtime`, `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`cua`](../packages/experimental/cua), [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/experimental/hooks-claude-code), [`hooks-codex`](../packages/experimental/hooks-codex), `liveshare`, [`loader-smoke`](../packages/test-support/loader-smoke), [`permission-presets`](../packages/interaction/permission-presets), `session-controller`, [`timeline`](../packages/experimental/timeline) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:300`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), `server`, `session-controller`, [`subagent`](../packages/subagent/subagent), [`timeline`](../packages/experimental/timeline), [`tool-office`](../packages/document/tool-office), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:300`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), [`mcp-client`](../packages/mcp/mcp-client), `server`, `session-controller`, [`subagent`](../packages/subagent/subagent), [`timeline`](../packages/experimental/timeline), [`tool-office`](../packages/document/tool-office), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) |
|
||||
| `agent/error` | `emit` | [`packages/core/agent/src/runtime-types.ts:430`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`goal-round-driver`](../packages/goal/goal-round-driver), [`headless`](../packages/bundle/headless), [`llm-deepseek-account`](../packages/llm/llm-deepseek-account), `server`, `session-controller`, [`session-telemetry`](../packages/session/session-telemetry), [`subagent`](../packages/subagent/subagent) |
|
||||
| `agent/inbox/claimed` | `emit` | [`packages/core/agent/src/runtime-types.ts:329`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`tool-jobs`](../packages/jobs/tool-jobs), [`user-questions`](../packages/interaction/user-questions) |
|
||||
| `agent/inbox/discarded` | `emit` | [`packages/core/agent/src/runtime-types.ts:337`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`user-questions`](../packages/interaction/user-questions) |
|
||||
@@ -35,7 +35,7 @@
|
||||
| `authorization/settled` | `emit` | [`packages/credentials/authorization/src/index.ts:57`](../packages/credentials/authorization/src/index.ts) | [`authorization`](../packages/credentials/authorization) (`events.dispatch`) | - |
|
||||
| `commands/change` | `emit` | [`packages/interaction/commands/src/types.ts:89`](../packages/interaction/commands/src/types.ts) | [`commands`](../packages/interaction/commands) (`events.dispatch`) | `remotes` |
|
||||
| `compaction/summary-error` | `waterfall` | [`packages/compaction/compaction/src/index.ts:106`](../packages/compaction/compaction/src/index.ts) | [`compaction-basic`](../packages/compaction/compaction-basic) (`waterfall`) | [`compaction-image-offload`](../packages/compaction/compaction-image-offload) |
|
||||
| `connection/request` | `waterfall` | [`packages/client/connection/src/index.ts:67`](../packages/client/connection/src/index.ts) | `connection` (`waterfall`) | - |
|
||||
| `connection/request` | `waterfall` | [`packages/client/connection/src/index.ts:68`](../packages/client/connection/src/index.ts) | `connection` (`waterfall`) | - |
|
||||
| `cordis/dynamic-package` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:383`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
|
||||
| `cordis/dynamic-retract` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:389`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
|
||||
| `cordis/inspect-query` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:395`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
|
||||
@@ -97,7 +97,7 @@
|
||||
| `web/providers-changed` | `emit` | [`packages/web/web/src/types.ts:21`](../packages/web/web/src/types.ts) | [`web`](../packages/web/web) (`events.dispatch`) | `remotes` |
|
||||
| `webserver/authorize` | `bail` | [`packages/host/webserver/src/index.ts:60`](../packages/host/webserver/src/index.ts) | `webserver` (`bail`) | `connection` |
|
||||
| `webserver/entry-url` | `emit` | [`packages/host/webserver/src/index.ts:53`](../packages/host/webserver/src/index.ts) | [`web-app`](../packages/bundle/web-app) (`emit`) | `authentication-token` |
|
||||
| `webserver/index-inject` | `emit` | [`packages/host/webserver/src/index.ts:90`](../packages/host/webserver/src/index.ts) | `webserver` (`emit`) | `connection`, `inspector`, `modules`, `remote-access`, `shortcuts`, `ui-sidebar-documentpreview`, `ui-theme` |
|
||||
| `webserver/index-inject` | `emit` | [`packages/host/webserver/src/index.ts:90`](../packages/host/webserver/src/index.ts) | `webserver` (`emit`) | `inspector`, `modules`, `remote-access`, `ui-theme` |
|
||||
| `webserver/request` | `waterfall` | [`packages/host/webserver/src/index.ts:68`](../packages/host/webserver/src/index.ts) | `webserver` (`waterfall`) | `authentication-token`, [`deepseek-account`](../packages/account/deepseek-account), [`mcp-client`](../packages/mcp/mcp-client) |
|
||||
| `webserver/upgrade` | `waterfall` | [`packages/host/webserver/src/index.ts:78`](../packages/host/webserver/src/index.ts) | `webserver` (`waterfall`) | `authentication-token` |
|
||||
| `workflow/agent-end` | `emit` | [`packages/workflow/workflow/src/index.ts:79`](../packages/workflow/workflow/src/index.ts) | [`workflow`](../packages/workflow/workflow) (`events.dispatch`) | [`tool-workflow`](../packages/workflow/tool-workflow) |
|
||||
|
||||
@@ -244,6 +244,7 @@ flowchart TD
|
||||
end
|
||||
subgraph group_connector["packages/connector"]
|
||||
pkg_cli_account["cli-account"]
|
||||
pkg_upstream_skills["upstream-skills"]
|
||||
end
|
||||
subgraph group_context["packages/context"]
|
||||
pkg_agent_instructions["agent-instructions"]
|
||||
@@ -600,6 +601,7 @@ flowchart TD
|
||||
pkg_config_editor --> pkg_hmr
|
||||
pkg_cli_account --> pkg_subprocess
|
||||
pkg_cli_account --> pkg_system_prompt
|
||||
pkg_upstream_skills --> pkg_skill
|
||||
pkg_deliverable_file_references --> pkg_system_prompt
|
||||
pkg_experimental_speech_to_text --> pkg_settings
|
||||
pkg_experimental_translator --> pkg_credentials
|
||||
@@ -1187,6 +1189,7 @@ flowchart TD
|
||||
pkg_host_plugin_inventory --> pkg_agent_preset_registry
|
||||
pkg_host_plugin_inventory --> pkg_brand
|
||||
pkg_host_plugin_inventory --> pkg_typert_protocol
|
||||
pkg_mcp_client --> pkg_agent
|
||||
pkg_mcp_client --> pkg_attachment
|
||||
pkg_mcp_client --> pkg_authorization
|
||||
pkg_mcp_client --> pkg_credentials
|
||||
@@ -1194,6 +1197,7 @@ flowchart TD
|
||||
pkg_mcp_client --> pkg_host_webserver
|
||||
pkg_mcp_client --> pkg_llm
|
||||
pkg_mcp_client --> pkg_mcp_resources
|
||||
pkg_mcp_client --> pkg_output_retention
|
||||
pkg_mcp_client --> pkg_scope
|
||||
pkg_mcp_client --> pkg_subprocess
|
||||
pkg_mcp_client --> pkg_system_prompt
|
||||
@@ -1810,6 +1814,7 @@ flowchart TD
|
||||
| [`deepseek-account`](../packages/account/deepseek-account) | `account` | [`authorization`](../packages/credentials/authorization), [`brand`](../packages/util/brand), [`credentials`](../packages/credentials/credentials), [`host-webserver`](../packages/host/webserver), [`typert-protocol`](../packages/typert/protocol), [`util-values`](../packages/util/values) |
|
||||
| [`config-editor`](../packages/boot/config-editor) | `boot` | [`app-boot`](../packages/boot/app-boot), [`hmr`](../packages/boot/hmr) |
|
||||
| [`cli-account`](../packages/connector/cli-account) | `connector` | [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt) |
|
||||
| [`upstream-skills`](../packages/connector/upstream-skills) | `connector` | [`skill`](../packages/skill/skill) |
|
||||
| [`deliverable-file-references`](../packages/deliverables/deliverable-file-references) | `deliverables` | [`system-prompt`](../packages/core/system-prompt) |
|
||||
| [`experimental-speech-to-text`](../packages/experimental/speech-to-text) | `experimental` | [`settings`](../packages/settings/settings) |
|
||||
| [`experimental-translator`](../packages/experimental/translator) | `experimental` | [`credentials`](../packages/credentials/credentials), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence), [`timeout`](../packages/util/timeout), [`util-values`](../packages/util/values) |
|
||||
@@ -1938,7 +1943,7 @@ flowchart TD
|
||||
| [`webhook`](../packages/experimental/webhook) | `experimental` | [`agent`](../packages/core/agent), [`agent-default-model`](../packages/core/agent-default-model), [`agent-preset-registry`](../packages/preset/agent-preset-registry), [`llm`](../packages/llm/llm), [`permission-presets`](../packages/interaction/permission-presets), [`session`](../packages/core/session), [`session-title`](../packages/session/session-title), [`workspace`](../packages/workspace/workspace) |
|
||||
| [`tool-cordis`](../packages/extensions/tool-cordis) | `extensions` | [`agent`](../packages/core/agent), [`app-boot`](../packages/boot/app-boot), [`cordis-host-runner`](../packages/extensions/cordis-host-runner), [`tools`](../packages/core/tools) |
|
||||
| [`host-plugin-inventory`](../packages/host/plugin-inventory) | `host` | [`agent-preset-registry`](../packages/preset/agent-preset-registry), [`brand`](../packages/util/brand), [`typert-protocol`](../packages/typert/protocol) |
|
||||
| [`mcp-client`](../packages/mcp/mcp-client) | `mcp` | [`attachment`](../packages/attachment/attachment), [`authorization`](../packages/credentials/authorization), [`credentials`](../packages/credentials/credentials), [`error`](../packages/util/error), [`host-webserver`](../packages/host/webserver), [`llm`](../packages/llm/llm), [`mcp-resources`](../packages/mcp/mcp-resources), [`scope`](../packages/core/scope), [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt), [`timeout`](../packages/util/timeout), [`tools`](../packages/core/tools) |
|
||||
| [`mcp-client`](../packages/mcp/mcp-client) | `mcp` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`authorization`](../packages/credentials/authorization), [`credentials`](../packages/credentials/credentials), [`error`](../packages/util/error), [`host-webserver`](../packages/host/webserver), [`llm`](../packages/llm/llm), [`mcp-resources`](../packages/mcp/mcp-resources), [`output-retention`](../packages/util/output-retention), [`scope`](../packages/core/scope), [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt), [`timeout`](../packages/util/timeout), [`tools`](../packages/core/tools) |
|
||||
| [`agent-preset`](../packages/preset/agent-preset) | `preset` | [`agent-preset-registry`](../packages/preset/agent-preset-registry) |
|
||||
| [`session-telemetry-otel`](../packages/session/session-telemetry-otel) | `session` | [`anonymous-user-id`](../packages/identity/anonymous-user-id), [`command-feedback`](../packages/feedback/command-feedback), [`llm`](../packages/llm/llm), [`message-feedback`](../packages/feedback/message-feedback), [`otel`](../packages/telemetry/otel), [`session`](../packages/core/session), [`session-telemetry`](../packages/session/session-telemetry) |
|
||||
| [`tool-bash`](../packages/shell/tool-bash) | `shell` | [`agent`](../packages/core/agent), [`jobs`](../packages/jobs/jobs), [`llm`](../packages/llm/llm), [`sandbox`](../packages/sandbox/sandbox), [`sandbox-policy`](../packages/sandbox/sandbox-policy), [`shell`](../packages/shell/shell), [`shell-env`](../packages/shell/shell-env), [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`user-approval`](../packages/interaction/user-approval), [`working-directory`](../packages/session/working-directory) |
|
||||
|
||||
@@ -246,6 +246,7 @@ flowchart TD
|
||||
end
|
||||
subgraph group_connector["packages/connector"]
|
||||
pkg_cli_account["cli-account"]
|
||||
pkg_upstream_skills["upstream-skills"]
|
||||
end
|
||||
subgraph group_context["packages/context"]
|
||||
pkg_agent_instructions["agent-instructions"]
|
||||
@@ -602,6 +603,7 @@ flowchart TD
|
||||
pkg_config_editor --> pkg_hmr
|
||||
pkg_cli_account --> pkg_subprocess
|
||||
pkg_cli_account --> pkg_system_prompt
|
||||
pkg_upstream_skills --> pkg_skill
|
||||
pkg_deliverable_file_references --> pkg_system_prompt
|
||||
pkg_experimental_speech_to_text --> pkg_settings
|
||||
pkg_experimental_translator --> pkg_credentials
|
||||
@@ -1189,6 +1191,7 @@ flowchart TD
|
||||
pkg_host_plugin_inventory --> pkg_agent_preset_registry
|
||||
pkg_host_plugin_inventory --> pkg_brand
|
||||
pkg_host_plugin_inventory --> pkg_typert_protocol
|
||||
pkg_mcp_client --> pkg_agent
|
||||
pkg_mcp_client --> pkg_attachment
|
||||
pkg_mcp_client --> pkg_authorization
|
||||
pkg_mcp_client --> pkg_credentials
|
||||
@@ -1196,6 +1199,7 @@ flowchart TD
|
||||
pkg_mcp_client --> pkg_host_webserver
|
||||
pkg_mcp_client --> pkg_llm
|
||||
pkg_mcp_client --> pkg_mcp_resources
|
||||
pkg_mcp_client --> pkg_output_retention
|
||||
pkg_mcp_client --> pkg_scope
|
||||
pkg_mcp_client --> pkg_subprocess
|
||||
pkg_mcp_client --> pkg_system_prompt
|
||||
@@ -1812,6 +1816,7 @@ flowchart TD
|
||||
| [`deepseek-account`](../packages/account/deepseek-account) | `account` | [`authorization`](../packages/credentials/authorization), [`brand`](../packages/util/brand), [`credentials`](../packages/credentials/credentials), [`host-webserver`](../packages/host/webserver), [`typert-protocol`](../packages/typert/protocol), [`util-values`](../packages/util/values) |
|
||||
| [`config-editor`](../packages/boot/config-editor) | `boot` | [`app-boot`](../packages/boot/app-boot), [`hmr`](../packages/boot/hmr) |
|
||||
| [`cli-account`](../packages/connector/cli-account) | `connector` | [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt) |
|
||||
| [`upstream-skills`](../packages/connector/upstream-skills) | `connector` | [`skill`](../packages/skill/skill) |
|
||||
| [`deliverable-file-references`](../packages/deliverables/deliverable-file-references) | `deliverables` | [`system-prompt`](../packages/core/system-prompt) |
|
||||
| [`experimental-speech-to-text`](../packages/experimental/speech-to-text) | `experimental` | [`settings`](../packages/settings/settings) |
|
||||
| [`experimental-translator`](../packages/experimental/translator) | `experimental` | [`credentials`](../packages/credentials/credentials), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence), [`timeout`](../packages/util/timeout), [`util-values`](../packages/util/values) |
|
||||
@@ -1940,7 +1945,7 @@ flowchart TD
|
||||
| [`webhook`](../packages/experimental/webhook) | `experimental` | [`agent`](../packages/core/agent), [`agent-default-model`](../packages/core/agent-default-model), [`agent-preset-registry`](../packages/preset/agent-preset-registry), [`llm`](../packages/llm/llm), [`permission-presets`](../packages/interaction/permission-presets), [`session`](../packages/core/session), [`session-title`](../packages/session/session-title), [`workspace`](../packages/workspace/workspace) |
|
||||
| [`tool-cordis`](../packages/extensions/tool-cordis) | `extensions` | [`agent`](../packages/core/agent), [`app-boot`](../packages/boot/app-boot), [`cordis-host-runner`](../packages/extensions/cordis-host-runner), [`tools`](../packages/core/tools) |
|
||||
| [`host-plugin-inventory`](../packages/host/plugin-inventory) | `host` | [`agent-preset-registry`](../packages/preset/agent-preset-registry), [`brand`](../packages/util/brand), [`typert-protocol`](../packages/typert/protocol) |
|
||||
| [`mcp-client`](../packages/mcp/mcp-client) | `mcp` | [`attachment`](../packages/attachment/attachment), [`authorization`](../packages/credentials/authorization), [`credentials`](../packages/credentials/credentials), [`error`](../packages/util/error), [`host-webserver`](../packages/host/webserver), [`llm`](../packages/llm/llm), [`mcp-resources`](../packages/mcp/mcp-resources), [`scope`](../packages/core/scope), [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt), [`timeout`](../packages/util/timeout), [`tools`](../packages/core/tools) |
|
||||
| [`mcp-client`](../packages/mcp/mcp-client) | `mcp` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`authorization`](../packages/credentials/authorization), [`credentials`](../packages/credentials/credentials), [`error`](../packages/util/error), [`host-webserver`](../packages/host/webserver), [`llm`](../packages/llm/llm), [`mcp-resources`](../packages/mcp/mcp-resources), [`output-retention`](../packages/util/output-retention), [`scope`](../packages/core/scope), [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt), [`timeout`](../packages/util/timeout), [`tools`](../packages/core/tools) |
|
||||
| [`agent-preset`](../packages/preset/agent-preset) | `preset` | [`agent-preset-registry`](../packages/preset/agent-preset-registry) |
|
||||
| [`session-telemetry-otel`](../packages/session/session-telemetry-otel) | `session` | [`anonymous-user-id`](../packages/identity/anonymous-user-id), [`command-feedback`](../packages/feedback/command-feedback), [`llm`](../packages/llm/llm), [`message-feedback`](../packages/feedback/message-feedback), [`otel`](../packages/telemetry/otel), [`session`](../packages/core/session), [`session-telemetry`](../packages/session/session-telemetry) |
|
||||
| [`tool-bash`](../packages/shell/tool-bash) | `shell` | [`agent`](../packages/core/agent), [`jobs`](../packages/jobs/jobs), [`llm`](../packages/llm/llm), [`sandbox`](../packages/sandbox/sandbox), [`sandbox-policy`](../packages/sandbox/sandbox-policy), [`shell`](../packages/shell/shell), [`shell-env`](../packages/shell/shell-env), [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`user-approval`](../packages/interaction/user-approval), [`working-directory`](../packages/session/working-directory) |
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
en: 2cd6093e448761ba
|
||||
zh: 66910abc17effed8
|
||||
/plugin-events-stream-and-synced-browser-configuration/change:
|
||||
en: 691f405846b33bbe
|
||||
zh: b413c6be43ff2ee1
|
||||
en: e80cac04584ccb64
|
||||
zh: 4a5df915c8c20574
|
||||
/plugin-events-stream-and-synced-browser-configuration/migration:
|
||||
en: a8c0674e9b91d83c
|
||||
zh: 557341db53da1025
|
||||
@@ -9,11 +9,11 @@ English | [中文](guide.zh.md)
|
||||
|
||||
## Change
|
||||
|
||||
`@deepseek-ai/dsh-client-hmr` no longer registers the anonymous Server-Sent Events route `GET /plugins/events` and no longer exports `EVENTS_ENDPOINT`. Graph and rebuilt frames travel on the authenticated Typert Remote stream `pluginEvents/follow`: each stream generation opens with a `baseline` frame holding the full graph, followed by `graph` and `rebuilt` frames. Frame types come from `@deepseek-ai/dsh-client-hmr/types`. The browser face opens the stream over Connection and the API Gateway Client face while `remoteAccess` allows `pluginEvents/follow`; it no longer reads `window.__DSH_TRANSPORT__.fetch` or uses `EventSource`. A Peer whose Remote access does not allow `pluginEvents/follow`, such as a live-share viewer, no longer receives live graph or rebuilt updates.
|
||||
`@deepseek-ai/dsh-client-hmr` no longer registers the anonymous Server-Sent Events route `GET /plugins/events` and no longer exports `EVENTS_ENDPOINT`. Graph and rebuilt frames travel on the authenticated Typert Remote stream `pluginEvents/follow`: each stream generation opens with a `baseline` frame holding the full graph, followed by `graph` and `rebuilt` frames. Frame types come from `@deepseek-ai/dsh-client-hmr/types`. The browser face opens the stream over Connection and the API Gateway Client face while `remoteAccess` allows `pluginEvents/follow`; it no longer reads `window.__DSH_TRANSPORT__.fetch` or uses `EventSource`. A Peer whose Remote access does not allow `pluginEvents/follow` no longer receives live graph or rebuilt updates. A live-share viewer is granted the action and follows the graph; like every non-owner Peer it receives each plugin's schema defaults in place of the configured values.
|
||||
|
||||
Each graph row carries the plugin's [synced configuration](../../../../packages/client/modules/README.md#synced-plugin-configuration). A browser plugin whose Client face exports no `Config` schema receives a `SyncedConfig` object in `apply`, empty when its Host face declares no volatile fields, where it previously received `undefined`. A Client face that exports its own `Config` schema fails to activate when its graph row also carries synced values.
|
||||
|
||||
Affected: custom shells, scripts, and tests that read `/plugins/events` or import `EVENTS_ENDPOINT`; shells that supplied the plugin-events transport through `__DSH_TRANSPORT__.fetch`; deployments relying on viewer Peers following plugin changes; browser plugins that test their `apply` config for `undefined` or export a Client `Config` alongside volatile Host fields.
|
||||
Affected: custom shells, scripts, and tests that read `/plugins/events` or import `EVENTS_ENDPOINT`; shells that supplied the plugin-events transport through `__DSH_TRANSPORT__.fetch`; deployments whose non-owner Peers follow plugin changes without a `pluginEvents/follow` grant; browser plugins that test their `apply` config for `undefined` or export a Client `Config` alongside volatile Host fields.
|
||||
|
||||
## Migration
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ description: "`@deepseek-ai/dsh-client-hmr` 删除 `GET /plugins/events` 和 `EV
|
||||
|
||||
## 变更
|
||||
|
||||
`@deepseek-ai/dsh-client-hmr` 不再注册匿名 Server-Sent Events 路由 `GET /plugins/events`,也不再导出 `EVENTS_ENDPOINT`。图帧与重建帧改由经过鉴权的 Typert Remote 流 `pluginEvents/follow` 传递:每一代流先发一个包含完整图的 `baseline` 帧,之后发送 `graph` 与 `rebuilt` 帧。帧类型来自 `@deepseek-ai/dsh-client-hmr/types`。浏览器半侧在 `remoteAccess` 允许 `pluginEvents/follow` 时,经 Connection 与 API Gateway Client 半侧打开这条流;它不再读取 `window.__DSH_TRANSPORT__.fetch`,也不再使用 `EventSource`。Remote access 不允许 `pluginEvents/follow` 的 Peer(例如 live share 观看者)不再收到实时的图更新与重建更新。
|
||||
`@deepseek-ai/dsh-client-hmr` 不再注册匿名 Server-Sent Events 路由 `GET /plugins/events`,也不再导出 `EVENTS_ENDPOINT`。图帧与重建帧改由经过鉴权的 Typert Remote 流 `pluginEvents/follow` 传递:每一代流先发一个包含完整图的 `baseline` 帧,之后发送 `graph` 与 `rebuilt` 帧。帧类型来自 `@deepseek-ai/dsh-client-hmr/types`。浏览器半侧在 `remoteAccess` 允许 `pluginEvents/follow` 时,经 Connection 与 API Gateway Client 半侧打开这条流;它不再读取 `window.__DSH_TRANSPORT__.fetch`,也不再使用 `EventSource`。Remote access 不允许 `pluginEvents/follow` 的 Peer 不再收到实时的图更新与重建更新。live share 观看者被授予了该动作,可以跟随插件图;与所有非 owner Peer 一样,它收到的是各插件的 schema 默认值,而不是实际配置的值。
|
||||
|
||||
图的每一行携带该插件的[同步配置](../../../../packages/client/modules/README.zh.md#synced-plugin-configuration)。Client 半侧未导出 `Config` schema 的浏览器插件在 `apply` 中接收一个 `SyncedConfig` 对象,Host 半侧未声明 volatile 字段时该对象为空,此前接收的是 `undefined`。Client 半侧导出自己 `Config` schema 的插件,若其图行同时携带同步值,则激活失败。
|
||||
|
||||
受影响者:读取 `/plugins/events` 或导入 `EVENTS_ENDPOINT` 的自定义 shell、脚本和测试;通过 `__DSH_TRANSPORT__.fetch` 提供插件事件传输的 shell;依赖观看者 Peer 跟随插件变更的部署;检查 `apply` 配置是否为 `undefined`,或在 Host volatile 字段之外还导出 Client `Config` 的浏览器插件。
|
||||
受影响者:读取 `/plugins/events` 或导入 `EVENTS_ENDPOINT` 的自定义 shell、脚本和测试;通过 `__DSH_TRANSPORT__.fetch` 提供插件事件传输的 shell;非 owner Peer 未获 `pluginEvents/follow` 授权却需要跟随插件变更的部署;检查 `apply` 配置是否为 `undefined`,或在 Host volatile 字段之外还导出 Client `Config` 的浏览器插件。
|
||||
|
||||
## 迁移
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.3/deepseek-refusal-code/guide.md
|
||||
/:
|
||||
en: ea05c828e180ff14
|
||||
zh: 76d2429bea249a88
|
||||
/deepseek-content-refusal-error-code:
|
||||
en: 71d03f718bffbd33
|
||||
zh: dff0e61a7a9b879d
|
||||
/deepseek-content-refusal-error-code/change:
|
||||
en: 30e71dd3987129f3
|
||||
zh: d6825a5a23b3563f
|
||||
/deepseek-content-refusal-error-code/migration:
|
||||
en: 3ff56b094c294f34
|
||||
zh: e8ce9baca41700bf
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
kind: upgrade-guide
|
||||
description: "The DeepSeek streamed content refusal code changes from MALFORMED_RESPONSE to CONTENT_REFUSED."
|
||||
---
|
||||
|
||||
# DeepSeek content refusal error code
|
||||
|
||||
English | [中文](guide.zh.md)
|
||||
|
||||
## Change
|
||||
|
||||
When DeepSeek ends a model stream with `stop_reason: "refusal"`, DSH reports `CONTENT_REFUSED` in the LLM error finish and in the failed turn's `turn/end` error. Previously, the adapter reported `MALFORMED_RESPONSE` for this stop reason.
|
||||
|
||||
## Migration
|
||||
|
||||
1. Handle `CONTENT_REFUSED` in code that classifies LLM error finishes or `turn/end` errors. Tell the user that the provider refused the request.
|
||||
2. Replay a Messages stream ending in `refusal` and check that your handler takes the refusal path.
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
kind: upgrade-guide
|
||||
description: "DeepSeek 流式内容拒答的错误码从 MALFORMED_RESPONSE 改为 CONTENT_REFUSED。"
|
||||
---
|
||||
|
||||
# DeepSeek 内容拒答错误码
|
||||
|
||||
[English](guide.md) | 中文
|
||||
|
||||
## 变更
|
||||
|
||||
当 DeepSeek 以 `stop_reason: "refusal"` 结束模型流时,DSH 在 LLM 的错误终止块和失败轮次的 `turn/end` 错误中报告 `CONTENT_REFUSED`。此前,适配器对这一停止原因报告 `MALFORMED_RESPONSE`。
|
||||
|
||||
## 迁移
|
||||
|
||||
1. 在对 LLM 错误终止块或 `turn/end` 错误分类的代码中处理 `CONTENT_REFUSED`,向用户说明提供方已拒绝该请求。
|
||||
2. 回放一条以 `refusal` 结束的 Messages 流,确认处理程序进入拒答分支。
|
||||
@@ -0,0 +1,16 @@
|
||||
# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.3/upstream-skills-base-row/guide.md
|
||||
/:
|
||||
en: 62b593db84b9aeb3
|
||||
zh: a123967f44729460
|
||||
/upstream-skills-base-row:
|
||||
en: f81c9166611d2ccc
|
||||
zh: 2c8379f0001aa023
|
||||
/upstream-skills-base-row/change:
|
||||
en: 641c127c87d2cfa0
|
||||
zh: 8d53da688212988e
|
||||
/upstream-skills-base-row/migration:
|
||||
en: 0e9fa28c1a33f7ac
|
||||
zh: 912c6765b601fa72
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
kind: upgrade-guide
|
||||
description: "The base profile bundle gains the `upstream-skills` row, which stays pending and adds a boot warning in a composition that disables the `skill` row."
|
||||
---
|
||||
|
||||
# Upstream skills base row
|
||||
|
||||
English | [中文](guide.zh.md)
|
||||
|
||||
## Change
|
||||
|
||||
The base profile bundle gains the row `upstream-skills` (`@deepseek-ai/dsh-upstream-skills`), a Host Service that injects `skills`. A composition that keeps the `skill` row is not affected. A `cordis.yml`, patch, or overlay that disables the `skill` row and leaves `upstream-skills` enabled keeps the new row pending, and every boot prints two more lines on stderr:
|
||||
|
||||
```text
|
||||
dsh: warning: 1 entry did not activate
|
||||
upstream-skills (@deepseek-ai/dsh-upstream-skills): pending (waiting for service: skills)
|
||||
```
|
||||
|
||||
A composition that already reports entries that did not activate counts one more and lists this row with them.
|
||||
|
||||
## Migration
|
||||
|
||||
1. In each `cordis.yml`, patch, or overlay that disables the `skill` row, disable the new row next to it:
|
||||
|
||||
```yaml
|
||||
- id: upstream-skills
|
||||
name: '@deepseek-ai/dsh-upstream-skills'
|
||||
disabled: true
|
||||
```
|
||||
|
||||
2. Boot the profile and confirm that stderr no longer names `upstream-skills`.
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
kind: upgrade-guide
|
||||
description: "基础 profile bundle 新增 `upstream-skills` 行;禁用了 `skill` 行的组合中,该行保持等待状态,启动时多出一条警告。"
|
||||
---
|
||||
|
||||
# 上游技能基础行
|
||||
|
||||
[English](guide.md) | 中文
|
||||
|
||||
## 变更
|
||||
|
||||
基础 profile bundle 新增 `upstream-skills` 行(`@deepseek-ai/dsh-upstream-skills`),它是注入 `skills` 的 Host 服务。保留 `skill` 行的组合不受影响。禁用了 `skill` 行、又没有禁用 `upstream-skills` 的 `cordis.yml`、patch 或 overlay 会让新行一直处于等待状态,每次启动在 stderr 多输出两行:
|
||||
|
||||
```text
|
||||
dsh: warning: 1 entry did not activate
|
||||
upstream-skills (@deepseek-ai/dsh-upstream-skills): pending (waiting for service: skills)
|
||||
```
|
||||
|
||||
原本已经报告未激活条目的组合,条目数加一,并把这一行与其他条目一起列出。
|
||||
|
||||
## 迁移
|
||||
|
||||
1. 在每个禁用了 `skill` 行的 `cordis.yml`、patch 或 overlay 中,紧挨着它禁用新行:
|
||||
|
||||
```yaml
|
||||
- id: upstream-skills
|
||||
name: '@deepseek-ai/dsh-upstream-skills'
|
||||
disabled: true
|
||||
```
|
||||
|
||||
2. 启动该 profile,确认 stderr 不再出现 `upstream-skills`。
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-root",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-deepseek-account",
|
||||
"description": "Sign in to DeepSeek and manage account credentials and notifications",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-deepseek-auth",
|
||||
"description": "DeepSeek request authentication (ctx.deepseekAuth): choose between the API key and the account sign-in for one DeepSeek API request and release its headers",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-acp",
|
||||
"description": "Automation-only Agent Client Protocol server for driving DeepSeek Harness agents over JSON-RPC stdio",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-api-gateway",
|
||||
"description": "Typert Remote Host dispatcher and Client API endpoint",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -37,6 +37,12 @@ import { parseRemoteStreamClientMessage } from '../src/stream-protocol.ts'
|
||||
|
||||
type FixtureApprovalOutcome = 'allowed' | 'unavailable'
|
||||
const fixtureContextTag = Symbol('fixture-context-tag')
|
||||
|
||||
/** Connection's synced Config with fixed recovery timing; omission models a value the Host did not send. */
|
||||
type ConnectionSyncedConfig = Parameters<typeof applyConnection>[1]
|
||||
function connectionConfig(recovery?: ReturnType<ConnectionSyncedConfig['recovery']['get']>): ConnectionSyncedConfig {
|
||||
return { recovery: { get: () => recovery, getSnapshot: () => recovery, subscribe: () => () => {} } }
|
||||
}
|
||||
type AgentWireId = TypertContextWire<TypertContextMap['agent']>
|
||||
const agentId = (value: string): AgentWireId => value as AgentWireId
|
||||
|
||||
@@ -655,9 +661,6 @@ describe('Client Remote transport readiness', () => {
|
||||
it.each([false, true])('replaces a stalled carrier and restores events (socket opened: %s)', async (autoOpen) => {
|
||||
await withFakeWebSocket('https://harness.example', async () => {
|
||||
vi.useFakeTimers()
|
||||
vi.stubGlobal('__DSH_CONNECTION_RECOVERY__', {
|
||||
backoffBaseMs: 10, backoffMaxMs: 10, generationReadyTimeoutMs: 100,
|
||||
})
|
||||
Object.assign(globalThis.location, { hostname: 'harness.example', search: '' })
|
||||
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => undefined)
|
||||
FakeWebSocket.autoOpen = autoOpen
|
||||
@@ -666,7 +669,9 @@ describe('Client Remote transport readiness', () => {
|
||||
ctx.on('connection/reset', reset)
|
||||
try {
|
||||
await ctx.plugin(TypertRegistry)
|
||||
await ctx.plugin({ inject: [], apply: applyConnection })
|
||||
await ctx.plugin({ inject: [], apply: applyConnection }, connectionConfig({
|
||||
backoffBaseMs: 10, backoffMaxMs: 10, generationReadyTimeoutMs: 100,
|
||||
}))
|
||||
await ctx.plugin({ inject, apply })
|
||||
await vi.advanceTimersByTimeAsync(0)
|
||||
const connection = ctx.get('connection') as ConnectionHandle
|
||||
@@ -2116,7 +2121,7 @@ describe('Client Typert API', () => {
|
||||
const ctx = new Context()
|
||||
try {
|
||||
await ctx.plugin(TypertRegistry)
|
||||
await ctx.plugin({ inject: [], apply: applyConnection })
|
||||
await ctx.plugin({ inject: [], apply: applyConnection }, connectionConfig())
|
||||
await ctx.plugin({ inject, apply })
|
||||
const connection = ctx.get('connection') as ConnectionHandle | undefined
|
||||
if (connection === undefined) throw new Error('injected Connection service is unavailable')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-api-job-controller",
|
||||
"description": "Job Remote observation stream and the reference-counted client job-output service",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-api-remote-access",
|
||||
"description": "Method-level Remote access control for non-owner Peers and the per-Peer access snapshot",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-api-remotes",
|
||||
"description": "Remote BFF assembly for application-selected Host capabilities",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -195,7 +195,9 @@ describe.skipIf(!requiredArtifacts)('Goal Remote built LIB chain', () => {
|
||||
'@deepseek-ai/dsh-api-remotes',
|
||||
]) {
|
||||
const plugin = instantiate(id)
|
||||
await client.plugin({ inject: plugin.inject, apply: plugin.apply })
|
||||
// The connection Client face reads its recovery timing from its synced Config; an absent value uses the defaults.
|
||||
const config = id === '@deepseek-ai/dsh-client-connection' ? { recovery: { get: () => undefined } } : undefined
|
||||
await client.plugin({ inject: plugin.inject, apply: plugin.apply }, config)
|
||||
}
|
||||
client.typert.contexts.registerClient('agent', {
|
||||
identity: candidate => 'builtAgentId' in candidate ? candidate.builtAgentId : undefined,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-api-session-controller",
|
||||
"description": "Session Remote commands, cold reads, and live control transport",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-api-settings-controller",
|
||||
"description": "Remote owner for the configuration surfaces over the settings-domain seams",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-api-terminal-controller",
|
||||
"description": "Session-owned interactive terminals with shell discovery, screen recovery and typed Remote control",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-api-workspace-controller",
|
||||
"description": "Workspace Remote commands and reconnect-safe state transport",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-api-workspace-files",
|
||||
"description": "Workspace file service and Client resource provider: bounded reads, directory listing, and live metadata over the workspaceFiles Remote namespace",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-attachment-local",
|
||||
"description": "Private content-addressed DSH_HOME attachment storage",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-attachment",
|
||||
"description": "Durable immutable attachment storage seam for the DeepSeek Harness",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-app-boot",
|
||||
"description": "Shared boot glue for the app bins: .env loading, fail-loud Loader guards, snapshot-aware config resolution, and the Loader boot sequence",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-cmdline",
|
||||
"description": "Immutable command-line handoff from a dsh launcher to any app plugin that injects cmdlineArgs",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-config-editor",
|
||||
"description": "Persist plugin configuration through profile patches and Loader reconciliation",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-hmr",
|
||||
"description": "Coordinated module and profile configuration hot reload",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-plugin-manager",
|
||||
"description": "Current-profile plugin and bundle management shared by dsh CLI, Web and agent tools",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-plugin-market",
|
||||
"description": "Configured plugin market indexes for the Web Discover page and the plugin_market agent tool",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-browser-use",
|
||||
"description": "Exclusive named browser-use provider registration",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-acp-app",
|
||||
"description": "The dsh ACP profile bundle: automation-only JSON-RPC stdio and process lifecycle over dsh-base",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -324,6 +324,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,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-base",
|
||||
"description": "The shared dsh core as a profile bundle: the first patch layer of base-backed profiles, inserting core rows over the empty profile root",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
@@ -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:*",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-headless",
|
||||
"description": "The dsh one-shot bundle: a direct core Agent/Session runner over dsh-base with no Host, HTTP, or browser layer",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-sdk-app",
|
||||
"description": "The dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-base",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-sdk-minimal",
|
||||
"description": "The standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessions",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-web-app",
|
||||
"description": "The dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, bash runtime variables, URL line)",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -10,7 +10,6 @@ import { loadOverlayPatches } from '@deepseek-ai/dsh-app-boot'
|
||||
import WorkspaceFiles, { type WorkspaceFileScope } from '@deepseek-ai/dsh-api-workspace-files'
|
||||
import OfficeKit from '@deepseek-ai/dsh-office-kit'
|
||||
import * as DocumentPreview from '@deepseek-ai/dsh-client-ui-sidebar-documentpreview'
|
||||
import type { IndexInjection, WebServer } from '@deepseek-ai/dsh-host-webserver'
|
||||
import SessionStore, { type SessionId } from '@deepseek-ai/dsh-session'
|
||||
import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection'
|
||||
import SandboxPolicyService from '@deepseek-ai/dsh-sandbox-policy'
|
||||
@@ -21,9 +20,6 @@ import type { Converter, ConverterOptions } from '@deepseek-ai/libreoffice-kit'
|
||||
import { expect, it, onTestFinished, vi } from 'vitest'
|
||||
import { brandString } from '@deepseek-ai/dsh-brand'
|
||||
|
||||
/** The Peer an index render speaks for; this listener reads no field of it. */
|
||||
const PAGE_PEER = { principal: { kind: 'owner' } } as Parameters<WebServer['renderIndex']>[1]
|
||||
|
||||
const kit = vi.hoisted(() => ({ create: vi.fn<(options?: ConverterOptions) => Promise<Converter>>() }))
|
||||
vi.mock('@deepseek-ai/libreoffice-kit', () => ({ createConverter: kit.create }))
|
||||
|
||||
@@ -48,7 +44,7 @@ it('loads the shipped Office rows with separately patched settings and authorize
|
||||
.flatMap(patch => patch.insert ?? []).filter(row => row.id !== undefined && Object.hasOwn(expectedRows, row.id))
|
||||
expect(rows.map(row => [row.id, row.name])).toEqual(Object.entries(expectedRows))
|
||||
const providerConfig = { maxInputBytes: 4096, maxConcurrentConversions: 1, fontFallbacks: [['Missing Serif', 'Available Serif']], outputDirectory }
|
||||
const clientConfig = DocumentPreview.Config({ office: { maxCachedEntries: 3, maxCachedBytes: 8192 } })
|
||||
const clientConfig = { office: { maxCachedEntries: 3, maxCachedBytes: 8192 } }
|
||||
const configured = applyEntryPatches(rows, [
|
||||
{ id: 'office-kit', config: providerConfig },
|
||||
{ id: 'ui-sidebar-documentpreview', config: clientConfig },
|
||||
@@ -101,11 +97,8 @@ it('loads the shipped Office rows with separately patched settings and authorize
|
||||
const entries = new Map([...ctx.loader.entries()].map(entry => [entry.options.id, entry]))
|
||||
for (const row of configured) await entries.get(row.id)!.fiber!.await()
|
||||
expect(ctx.officeKit.outputDirectory).toBe(outputDirectory)
|
||||
const injections: IndexInjection[] = []
|
||||
ctx.emit('webserver/index-inject', injections, PAGE_PEER)
|
||||
expect(injections).toEqual([
|
||||
{ kind: 'global', name: '__DSH_DOCUMENT_PREVIEW_CONFIG__', value: clientConfig },
|
||||
])
|
||||
const preview = entries.get('ui-sidebar-documentpreview')!.fiber!.effectiveConfig as DocumentPreview.Config
|
||||
expect(preview.office.get()).toEqual({ maxCachedEntries: 3, maxCachedBytes: 8192, maxPending: 8, maxReaders: 32 })
|
||||
|
||||
const id = brandString<SessionId>('office-loader')
|
||||
const session = ctx.sessions.create(id, { meta: { cwd: directory } })
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-config",
|
||||
"description": "Types of browser-synced plugin configuration",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
en: 18792bf2fb4f8030
|
||||
zh: 84c63acc7e0099ae
|
||||
/deepseek-ai-dsh-client-connection/use-this-package:
|
||||
en: 3dc9527a0e2c958b
|
||||
zh: 7411a438013111af
|
||||
en: f8c22736fe2eb9df
|
||||
zh: b2d7a4ab8a6cd280
|
||||
/deepseek-ai-dsh-client-connection/browser-authentication-and-request-trust:
|
||||
en: 22e629db9745aae9
|
||||
zh: 7004b8b10f2f031d
|
||||
/deepseek-ai-dsh-client-connection/connection-generation:
|
||||
en: d9fe48c025ace7ce
|
||||
zh: 0e23b299fbf25ae6
|
||||
en: d23cf1cd3830e886
|
||||
zh: ef8f899080e638d6
|
||||
/deepseek-ai-dsh-client-connection/model-experience:
|
||||
en: 88bbc33fe9ae9df8
|
||||
zh: bfbab6d51b4abd40
|
||||
|
||||
@@ -31,7 +31,7 @@ A static desktop page can provide `__DSH_TRANSPORT__.streamBaseUrl` for the HTTP
|
||||
|
||||
Unary RPC requests use JSON. A Host handler may return byte attachments that it has already separated from the JSON-compatible result value, with each attachment naming its result-relative path. Connection writes these values as multipart parts. The JSON `metadata` part contains the RPC response envelope with `null` placeholders and an attachment table recording each path, codec, and part identifier. Paths use string keys and numeric array indices; no business field name is reserved. The Client validates the envelope, `rpcId`, attachment table, and parts, then restores each byte value as an `ArrayBuffer`-backed view. Results without attachments, including base64 strings, and failures remain JSON. Logical RPC carriers return decoded native values directly. Connection does not discover binary fields or depend on Typert; the handler that owns a result protocol performs any type-directed or runtime projection before returning. Binary parameters, events, and streamed binary results are unsupported.
|
||||
|
||||
The browser uses HTTP POST for Remote unary calls. API Gateway owns the `/api/remote.mux` WebSocket and its logical streams; shell-owned compositions provide equivalent Remote streams, including a stream's uplink, through `connection.rpc.open` without opening a WebSocket. The browser plugin reads the page transport, recovery settings, and location, then delegates to `installConnection(ctx, options)`. A composition that owns its carrier may call the same installer directly; the whole-client test tier does so. Non-page carriers supply `ClientTransportHooks.createWebSocket` with the same authenticated Cookie as HTTP and a `streamBaseUrl`; `ConnectionHandle.openWebSocket()` resolves the Mux path against that base and invokes the selected factory. Each invocation creates one Context-owned service, so several Client trees can use different carriers in one realm. The Host half always provides the carrier-neutral RPC and exact `GET`/`HEAD`/`POST` route registries. When a Web carrier is present it also owns the sole `/api` route, Fetch bridge and Host/Origin checks, delegating credential verification to ConnectionAuthentication; a shell-owned carrier dispatches the shared Fetch handler directly. Each exact route declares buffered or streaming request-body handling before the bridge reads any bytes. Typert Gateway claims generated Remote endpoints, feature packages register non-JSON responses such as Session-log downloads and raw file uploads, and unclaimed requests return 404. Loopback hostname classification remains package-internal to the browser-facing Client state. Browser raw-body transfer is provided by [`dsh-client-file-upload`](../file-upload/README.md).
|
||||
The browser uses HTTP POST for Remote unary calls. API Gateway owns the `/api/remote.mux` WebSocket and its logical streams; shell-owned compositions provide equivalent Remote streams, including a stream's uplink, through `connection.rpc.open` without opening a WebSocket. The browser plugin reads the page transport, its synced recovery settings, and location, then delegates to `installConnection(ctx, options)`. A composition that owns its carrier may call the same installer directly; the whole-client test tier does so. Non-page carriers supply `ClientTransportHooks.createWebSocket` with the same authenticated Cookie as HTTP and a `streamBaseUrl`; `ConnectionHandle.openWebSocket()` resolves the Mux path against that base and invokes the selected factory. Each invocation creates one Context-owned service, so several Client trees can use different carriers in one realm. The Host half always provides the carrier-neutral RPC and exact `GET`/`HEAD`/`POST` route registries. When a Web carrier is present it also owns the sole `/api` route, Fetch bridge and Host/Origin checks, delegating credential verification to ConnectionAuthentication; a shell-owned carrier dispatches the shared Fetch handler directly. Each exact route declares buffered or streaming request-body handling before the bridge reads any bytes. Typert Gateway claims generated Remote endpoints, feature packages register non-JSON responses such as Session-log downloads and raw file uploads, and unclaimed requests return 404. Loopback hostname classification remains package-internal to the browser-facing Client state. Browser raw-body transfer is provided by [`dsh-client-file-upload`](../file-upload/README.md).
|
||||
|
||||
-----
|
||||
|
||||
@@ -63,7 +63,7 @@ An ended `$events` stream, a Remote stream error, a non-ready opening item, or a
|
||||
|
||||
`ctx.connection.reconnect()` interrupts active work, resets the sequence, and starts retry 1 immediately. Browser `offline` aborts active work, publishes `disconnected`, and suspends automatic attempts; the next `online` transition resets the sequence and starts at the 500ms tier. Only a ready item publishes `connected`. Gateway mux owns no independent retry schedule.
|
||||
|
||||
Set the Host Connection row's `config.recovery` to override retry caps, the growth factor, or handshake warning and cancellation times; the [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-client-connection) lists accepted fields. The Host validates these values and injects them into each served page. The Client validates the bootstrap data before providing Connection and uses those defaults when Gateway starts its loop; explicit `start()` timing overrides take precedence. The growth factor must be finite and at least one. Readiness, failure, cancellation, or a hard deadline that occurs before the warning cancels that warning. Reload the page after changing Host recovery configuration.
|
||||
Set the Host Connection row's `config.recovery` to override retry caps, the growth factor, or handshake warning and cancellation times; the [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-client-connection) lists accepted fields. `recovery` reaches the browser through the plugin's [synced Config](../modules/README.md#synced-plugin-configuration). The Host validates the values when the plugin loads. The Client reads them once when its plugin activates, validates them before providing Connection, and uses them as defaults when Gateway starts its loop; a page that receives no value uses the built-in timing above, and explicit `start()` timing overrides take precedence. The growth factor must be finite and at least one. Readiness, failure, cancellation, or a hard deadline that occurs before the warning cancels that warning. A change takes effect on the next page load or plugin reactivation.
|
||||
|
||||
|
||||
<a id="model-experience"></a>
|
||||
|
||||
@@ -31,7 +31,7 @@ kind: "package-reference"
|
||||
|
||||
一元 RPC 请求使用 JSON。Host handler 可以返回已经从 JSON 兼容结果值中分离的字节附件,每个附件标明其相对于结果的路径。Connection 将这些值写为 multipart 部分。JSON `metadata` 部分包含带 `null` 占位值的 RPC 响应信封,以及记录各路径、codec 和部分标识符的附件表。路径使用字符串键与数字数组下标,不保留任何业务字段名。Client 校验信封、`rpcId`、附件表和各部分,再将每个字节值恢复为以 `ArrayBuffer` 为底层缓冲区的视图。没有附件的结果(包括 base64 字符串)与失败仍使用 JSON。逻辑 RPC 载体直接返回解码后的原生值。Connection 不识别二进制字段,也不依赖 Typert;拥有结果协议的 handler 在返回前执行按类型或按运行时值的投影。不支持二进制参数、事件和二进制流式结果。
|
||||
|
||||
浏览器通过 HTTP POST 执行 Remote 一元调用;API Gateway 自己拥有 `/api/remote.mux` WebSocket 及其逻辑流。由 shell 持有的组合通过 `connection.rpc.open` 提供等价的 Remote 流(包括流的上行),不打开 WebSocket。浏览器插件读取页面 transport、恢复设置与 location,再委托 `installConnection(ctx, options)`。持有自身载体的组合可以直接调用同一个安装函数;整机客户端测试档就是这一消费者。非页面载体通过 `ClientTransportHooks.createWebSocket` 使用与 HTTP 相同的认证 Cookie,并提供 `streamBaseUrl`;`ConnectionHandle.openWebSocket()` 根据该 base 解析 Mux 路径,再调用所选工厂。每次调用都会创建一个归所属 Context 的服务,因此同一 realm 中的多棵 Client 树可以使用不同载体。Host half 始终提供与载体无关的 RPC 注册表和精确 `GET`/`HEAD`/`POST` 路由注册表。存在 Web 载体时,它还持有唯一 `/api` route、Fetch bridge 与 Host/Origin 校验,并委托 ConnectionAuthentication 验证凭据;由 shell 持有的载体则直接分派共享 Fetch handler。每条精确路由会在 bridge 读取任何字节前声明缓冲或流式请求体处理方式。Typert Gateway 认领生成的 Remote endpoint,功能包注册 Session 日志下载、原始文件上传等非 JSON 响应,未认领的请求返回 404。Loopback hostname 判定只供浏览器侧当前页面状态使用,留在包内。浏览器原始请求体传输由 [`dsh-client-file-upload`](../file-upload/README.zh.md) 提供。
|
||||
浏览器通过 HTTP POST 执行 Remote 一元调用;API Gateway 自己拥有 `/api/remote.mux` WebSocket 及其逻辑流。由 shell 持有的组合通过 `connection.rpc.open` 提供等价的 Remote 流(包括流的上行),不打开 WebSocket。浏览器插件读取页面 transport、同步的恢复设置与 location,再委托 `installConnection(ctx, options)`。持有自身载体的组合可以直接调用同一个安装函数;整机客户端测试档就是这一消费者。非页面载体通过 `ClientTransportHooks.createWebSocket` 使用与 HTTP 相同的认证 Cookie,并提供 `streamBaseUrl`;`ConnectionHandle.openWebSocket()` 根据该 base 解析 Mux 路径,再调用所选工厂。每次调用都会创建一个归所属 Context 的服务,因此同一 realm 中的多棵 Client 树可以使用不同载体。Host half 始终提供与载体无关的 RPC 注册表和精确 `GET`/`HEAD`/`POST` 路由注册表。存在 Web 载体时,它还持有唯一 `/api` route、Fetch bridge 与 Host/Origin 校验,并委托 ConnectionAuthentication 验证凭据;由 shell 持有的载体则直接分派共享 Fetch handler。每条精确路由会在 bridge 读取任何字节前声明缓冲或流式请求体处理方式。Typert Gateway 认领生成的 Remote endpoint,功能包注册 Session 日志下载、原始文件上传等非 JSON 响应,未认领的请求返回 404。Loopback hostname 判定只供浏览器侧当前页面状态使用,留在包内。浏览器原始请求体传输由 [`dsh-client-file-upload`](../file-upload/README.zh.md) 提供。
|
||||
|
||||
-----
|
||||
|
||||
@@ -63,7 +63,7 @@ Token 插件拥有供 API 调用方使用的 `GET /connect?token=...&interaction
|
||||
|
||||
`ctx.connection.reconnect()` 会中断活动工作、重置序列,并立即开始 retry 1。浏览器 `offline` 会中断活动工作、发布 `disconnected` 并暂停自动尝试;下一次 `online` 转换会重置序列并从 500ms 档开始。只有 ready 项会发布 `connected`。Gateway mux 不拥有独立重试调度。
|
||||
|
||||
可通过 Host Connection 行的 `config.recovery` 覆盖重试上限、增长因子或握手告警与取消时间;[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-client-connection)列出接受的字段。Host 校验这些值,并将其注入所提供的每个页面。Client 在提供 Connection 前校验启动数据,并在 Gateway 启动循环时采用这些默认值;显式传给 `start()` 的时序覆盖优先。增长因子必须是至少为一的有限数。若就绪、失败、取消或硬期限先于告警发生,该告警会被取消。修改 Host 恢复配置后需重新加载页面。
|
||||
可通过 Host Connection 行的 `config.recovery` 覆盖重试上限、增长因子或握手告警与取消时间;[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-client-connection)列出接受的字段。`recovery` 通过插件的[同步配置](../modules/README.zh.md#synced-plugin-configuration)送达浏览器。Host 在插件加载时校验这些值。Client 在其插件激活时读取一次,在提供 Connection 前校验,并在 Gateway 启动循环时将其作为默认值;未收到值的页面使用上述内置时序,显式传给 `start()` 的时序覆盖优先。增长因子必须是至少为一的有限数。若就绪、失败、取消或硬期限先于告警发生,该告警会被取消。修改在下次页面加载或插件重新激活时生效。
|
||||
|
||||
|
||||
<a id="model-experience"></a>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-connection",
|
||||
"description": "Authenticated RPC transport and generation lifecycle",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
@@ -64,6 +64,7 @@
|
||||
"@deepseek-ai/dsh-llm": "workspace:*",
|
||||
"@deepseek-ai/dsh-scope": "workspace:*",
|
||||
"@deepseek-ai/dsh-session": "workspace:*",
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*"
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-config": "workspace:*"
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ import { createWebConnectionRpc, type RpcFetch, type RpcStreamOpen } from './rpc
|
||||
import { isLoopbackHostname } from '../loopback-hostname.ts'
|
||||
import type { ClientConnectionRpc } from '../rpc.ts'
|
||||
import { resolveConnectionConfig } from '../recovery-config.ts'
|
||||
import type { SyncedConfig } from '@deepseek-ai/dsh-client-config/types'
|
||||
import type { ConnectionConfig } from '../types.ts'
|
||||
import type { ConnectionInteractions } from '../connect-protocol.ts'
|
||||
import { openConnectionWebSocket, type ConnectionWebSocket, type ConnectionWebSocketFactory } from './socket.ts'
|
||||
|
||||
@@ -122,7 +124,6 @@ export interface ClientTransportHooks {
|
||||
/** Page global carrying {@link ClientTransportHooks}; absent in the served web app. */
|
||||
interface ClientTransportGlobal {
|
||||
__DSH_TRANSPORT__?: ClientTransportHooks
|
||||
__DSH_CONNECTION_RECOVERY__?: unknown
|
||||
}
|
||||
|
||||
/** Browser location fields used to classify loopback authority. */
|
||||
@@ -339,14 +340,15 @@ export function installConnection(ctx: Context, options: ConnectionInstallOption
|
||||
/**
|
||||
* Client plugin body: read the page composition and install its Connection service.
|
||||
* @param ctx - client Cordis context.
|
||||
* @param config - Host-synced recovery timing, read once here; an absent value uses the recovery defaults.
|
||||
*/
|
||||
export function apply(ctx: Context): void {
|
||||
export function apply(ctx: Context, config: SyncedConfig<ConnectionConfig>): void {
|
||||
const globals = globalThis as ClientTransportGlobal
|
||||
const pageLocation = typeof location === 'undefined' ? undefined : location
|
||||
const transport = globals.__DSH_TRANSPORT__
|
||||
installConnection(ctx, {
|
||||
...(transport === undefined ? {} : { transport }),
|
||||
recovery: resolveConnectionConfig(globals.__DSH_CONNECTION_RECOVERY__),
|
||||
recovery: resolveConnectionConfig(config.recovery.get()),
|
||||
...(pageLocation === undefined ? {} : { location: pageLocation }),
|
||||
})
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import { assertTrustedAuthority } from './api-request-trust.ts'
|
||||
import { HostConnectionService } from './rpc-host.ts'
|
||||
import { ConnectionAuthentication } from './authentication.ts'
|
||||
import { ConnectionRecoveryConfigSchema, resolveConnectionConfig, type ConnectionRecoveryConfig } from './recovery-config.ts'
|
||||
import type { ConnectionConfig } from './types.ts'
|
||||
|
||||
export type {
|
||||
AuthenticationProvider,
|
||||
@@ -88,23 +89,11 @@ function assertImageBodyCapacity(ctx: Context, maxRequestBodyBytes: number): voi
|
||||
/** Services required before providing Connection. */
|
||||
export const inject: string[] = []
|
||||
|
||||
/** Browser authentication, request limits, and connection recovery configuration. */
|
||||
export interface ConnectionConfig {
|
||||
/** Browser recovery timing, injected into each served page. */
|
||||
recovery?: ConnectionRecoveryConfig
|
||||
/**
|
||||
* Authorities this deployment serves beyond loopback: exact `host:port`, or
|
||||
* port-less `host` matching any port. The fence accepts loopback and the
|
||||
* listener's own bind IP independently; other remote authorities require
|
||||
* an entry here. A non-canonical or non-bare authority fails plugin load.
|
||||
*/
|
||||
trustedHosts?: string[]
|
||||
/** Maximum buffered JSON body for every `/api` request. Default: 300 MiB. */
|
||||
maxRequestBodyBytes?: number
|
||||
}
|
||||
export type { ConnectionConfig } from './types.ts'
|
||||
|
||||
export const Config: z<ConnectionConfig> = z.object({
|
||||
recovery: ConnectionRecoveryConfigSchema.default({}),
|
||||
/** Host request limits and trusted authorities; `recovery` is synced to the browser. */
|
||||
export const Config: z<Omit<ConnectionConfig, 'recovery'> & { recovery?: ConnectionRecoveryConfig }, ConnectionConfig> = z.object({
|
||||
recovery: ConnectionRecoveryConfigSchema.default({}).volatile(),
|
||||
trustedHosts: z.array(String).default([]),
|
||||
maxRequestBodyBytes: z.natural().min(1).default(DEFAULT_MAX_REQUEST_BODY_BYTES),
|
||||
})
|
||||
@@ -117,7 +106,9 @@ export const Config: z<ConnectionConfig> = z.object({
|
||||
* @param config - resolved plugin config (schema defaults applied).
|
||||
*/
|
||||
export function apply(ctx: Context, config?: ConnectionConfig): void {
|
||||
const recovery = resolveConnectionConfig(config?.recovery)
|
||||
// Config boundary: the schema admits a NaN backoff factor, which the synced Config projection cannot carry as lossless
|
||||
// JSON; rejecting it at load keeps a row with an unprojectable recovery value off the graph.
|
||||
resolveConnectionConfig(config?.recovery?.get())
|
||||
// The Loader resolves schema defaults; hand-built test contexts may pass none.
|
||||
const trustedHosts = config?.trustedHosts ?? []
|
||||
const maxRequestBodyBytes = config?.maxRequestBodyBytes ?? DEFAULT_MAX_REQUEST_BODY_BYTES
|
||||
@@ -130,9 +121,6 @@ export function apply(ctx: Context, config?: ConnectionConfig): void {
|
||||
const connection = new HostConnectionService(connectionCtx, trustedHosts)
|
||||
connectionCtx.inject(['webServer'], (webCtx) => {
|
||||
assertImageBodyCapacity(webCtx, maxRequestBodyBytes)
|
||||
webCtx.on('webserver/index-inject', (table) => {
|
||||
table.push({ kind: 'global', name: '__DSH_CONNECTION_RECOVERY__', value: recovery })
|
||||
})
|
||||
const fetchHandler = connection.createSharedFetchHandler(API_PATH)
|
||||
const route: WebRoute = {
|
||||
kind: 'prefix',
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/** Connection plugin configuration shared by the Host and Client faces; types only. */
|
||||
import type { Volatile } from '@deepseek-ai/cordis'
|
||||
import type { ConnectionRecoveryConfig } from './recovery-config.ts'
|
||||
|
||||
/** Browser authentication, request limits, and connection recovery configuration. */
|
||||
export interface ConnectionConfig {
|
||||
/** Browser recovery timing; the browser receives it through its synced Config and reads it once when the plugin activates. */
|
||||
recovery?: Volatile<ConnectionRecoveryConfig>
|
||||
/**
|
||||
* Authorities this deployment serves beyond loopback: exact `host:port`, or
|
||||
* port-less `host` matching any port. The fence accepts loopback and the
|
||||
* listener's own bind IP independently; other remote authorities require
|
||||
* an entry here. A non-canonical or non-bare authority fails plugin load.
|
||||
*/
|
||||
trustedHosts?: string[]
|
||||
/** Maximum buffered JSON body for every `/api` request. Default: 300 MiB. */
|
||||
maxRequestBodyBytes?: number
|
||||
}
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
type ConnectionHandle,
|
||||
type ConnectionState,
|
||||
} from '../src/client/index.ts'
|
||||
import type { ConnectionRecoveryConfig } from '../src/recovery-config.ts'
|
||||
import { syncedConnectionConfig as synced } from './synced-config.client.ts'
|
||||
|
||||
type Win = {
|
||||
location?: { hostname: string; origin?: string }
|
||||
@@ -64,22 +66,19 @@ function installGeneration(handle: ConnectionHandle): GenerationProbe {
|
||||
return probe
|
||||
}
|
||||
|
||||
async function mount(): Promise<ConnectionHandle> {
|
||||
async function mount(recovery?: ConnectionRecoveryConfig): Promise<ConnectionHandle> {
|
||||
const ctx = new Context()
|
||||
await ctx.plugin({ apply, inject: [] })
|
||||
await ctx.plugin({ apply, inject: [] }, synced(recovery))
|
||||
const handle = ctx.get('connection') as ConnectionHandle | undefined
|
||||
if (handle === undefined) throw new Error('ctx.connection not provided')
|
||||
return handle
|
||||
}
|
||||
|
||||
describe('connection client apply', () => {
|
||||
it('uses Host bootstrap timing when Gateway starts without overrides', async () => {
|
||||
it('uses Host-synced timing when Gateway starts without overrides', async () => {
|
||||
vi.useFakeTimers()
|
||||
vi.stubGlobal('__DSH_CONNECTION_RECOVERY__', {
|
||||
backoffBaseMs: 10, backoffMaxMs: 10, generationReadyTimeoutMs: 20,
|
||||
})
|
||||
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => undefined)
|
||||
const handle = await mount()
|
||||
const handle = await mount({ backoffBaseMs: 10, backoffMaxMs: 10, generationReadyTimeoutMs: 20 })
|
||||
const signals: AbortSignal[] = []
|
||||
handle.registerGenerationSource(signal => new Promise<void>((resolve) => {
|
||||
signals.push(signal)
|
||||
@@ -99,10 +98,9 @@ describe('connection client apply', () => {
|
||||
}
|
||||
})
|
||||
|
||||
it.each([{ generationReadyTimeoutMs: 0 }, { backoffFactor: NaN }])('rejects malformed bootstrap recovery before publishing the service: %j', (recovery) => {
|
||||
vi.stubGlobal('__DSH_CONNECTION_RECOVERY__', recovery)
|
||||
it.each([{ generationReadyTimeoutMs: 0 }, { backoffFactor: NaN }])('rejects malformed synced recovery before publishing the service: %j', (recovery) => {
|
||||
const ctx = new Context()
|
||||
expect(() => { apply(ctx) }).toThrow()
|
||||
expect(() => { apply(ctx, synced(recovery)) }).toThrow()
|
||||
expect(ctx.get('connection')).toBeUndefined()
|
||||
})
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
type ConnectionGenerationSource,
|
||||
type ConnectionHandle,
|
||||
} from '../src/client/index.ts'
|
||||
import { syncedConnectionConfig } from './synced-config.client.ts'
|
||||
|
||||
type BrowserGlobal = {
|
||||
location?: { hostname: string }
|
||||
@@ -23,7 +24,7 @@ async function mount(): Promise<ConnectionHandle> {
|
||||
;(globalThis as BrowserGlobal).location = { hostname: 'localhost' }
|
||||
const ctx = new Context()
|
||||
contexts.add(ctx)
|
||||
await ctx.plugin({ apply, inject: [] })
|
||||
await ctx.plugin({ apply, inject: [] }, syncedConnectionConfig())
|
||||
const connection = ctx.get('connection') as ConnectionHandle | undefined
|
||||
if (connection === undefined) throw new Error('plugin did not provide Connection')
|
||||
return connection
|
||||
|
||||
@@ -12,6 +12,7 @@ import type { CredentialProvider } from '@deepseek-ai/dsh-credentials'
|
||||
import type { IndexInjection, WebServer, WebRoute, WebUpgradeRoute } from '@deepseek-ai/dsh-host-webserver'
|
||||
import {
|
||||
API_PATH,
|
||||
Config,
|
||||
type RpcId,
|
||||
apply,
|
||||
inject,
|
||||
@@ -360,21 +361,16 @@ describe('connection node half', () => {
|
||||
}
|
||||
})
|
||||
|
||||
it('injects validated browser recovery timing and withdraws it on disposal', async () => {
|
||||
const { ctx, dispose } = await mounted({ recovery: { generationReadyTimeoutMs: 25_000 } })
|
||||
it('declares browser recovery timing as a synced field and injects nothing into served pages', async () => {
|
||||
expect(Config({ recovery: { generationReadyTimeoutMs: 25_000 } }).recovery?.get()).toEqual({
|
||||
backoffBaseMs: 500, backoffFactor: 2, backoffMaxMs: 10_000,
|
||||
generationReadyWarnMs: 3_000, generationReadyTimeoutMs: 25_000,
|
||||
})
|
||||
const { ctx, dispose } = await mounted(Config({ recovery: { generationReadyTimeoutMs: 25_000 } }))
|
||||
try {
|
||||
const rows: IndexInjection[] = []
|
||||
ctx.emit('webserver/index-inject', rows, PAGE_PEER)
|
||||
expect(rows).toEqual([{
|
||||
kind: 'global', name: '__DSH_CONNECTION_RECOVERY__', value: {
|
||||
backoffBaseMs: 500, backoffFactor: 2, backoffMaxMs: 10_000,
|
||||
generationReadyWarnMs: 3_000, generationReadyTimeoutMs: 25_000,
|
||||
},
|
||||
}])
|
||||
await dispose()
|
||||
const after: IndexInjection[] = []
|
||||
ctx.emit('webserver/index-inject', after, PAGE_PEER)
|
||||
expect(after).toEqual([])
|
||||
expect(rows).toEqual([])
|
||||
} finally {
|
||||
await dispose()
|
||||
}
|
||||
@@ -385,7 +381,7 @@ describe('connection node half', () => {
|
||||
{ recovery: { backoffFactor: NaN }, error: /backoffFactor.*finite/ },
|
||||
])('rejects invalid recovery timing before acquiring Host resources: $recovery', ({ recovery, error }) => {
|
||||
const ctx = new Context()
|
||||
expect(() => { apply(ctx, { recovery }) }).toThrow(error)
|
||||
expect(() => { apply(ctx, Config({ recovery })) }).toThrow(error)
|
||||
expect(ctx.get('connection')).toBeUndefined()
|
||||
})
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/** Synced Config objects for Connection Client specs; this package cannot depend on the test runtime that depends on it. */
|
||||
import type { SyncedConfig } from '@deepseek-ai/dsh-client-config/types'
|
||||
import type { ConnectionRecoveryConfig } from '../src/recovery-config.ts'
|
||||
import type { ConnectionConfig } from '../src/types.ts'
|
||||
|
||||
/**
|
||||
* Build the activation's synced Config holding a fixed recovery value.
|
||||
* @param recovery - synced recovery timing; omission models a value the Host did not send.
|
||||
* @returns the object a Client activation receives as its `apply` config.
|
||||
*/
|
||||
export function syncedConnectionConfig(recovery?: ConnectionRecoveryConfig): SyncedConfig<ConnectionConfig> {
|
||||
return { recovery: { get: () => recovery, getSnapshot: () => recovery, subscribe: () => () => {} } }
|
||||
}
|
||||
@@ -16,9 +16,13 @@
|
||||
"src/connect-protocol.ts",
|
||||
"src/loopback-hostname.ts",
|
||||
"src/recovery-config.ts",
|
||||
"src/rpc.ts"
|
||||
"src/rpc.ts",
|
||||
"src/types.ts"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../config"
|
||||
},
|
||||
{
|
||||
"path": "../../../vendor/cordis"
|
||||
},
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
"src/recovery-config.ts",
|
||||
"src/rpc-host.ts",
|
||||
"src/rpc-schema.ts",
|
||||
"src/rpc.ts"
|
||||
"src/rpc.ts",
|
||||
"src/types.ts"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-file-upload",
|
||||
"description": "Agent-scoped browser file upload, streaming intake, and staged receipt service",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-hmr",
|
||||
"description": "Web client graph and rebuilt-bundle delivery over an authenticated Remote stream",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-locale",
|
||||
"description": "Locale plugin: Host-backed preference, extensible language catalog, browser fallback, and typed built-in dictionaries",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-modules",
|
||||
"description": "Client module system, dual-face: node half composes the __DSH_BOOT__ entry graph (incremental dsh.client scan, bundle route, index tap, webPlugins service); browser half is the lazy-CJS module table the vendored cordis Loader consumes as its internal seam",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -132,11 +132,23 @@ export class SyncedConfigPublisher {
|
||||
? runtimeSchema as z
|
||||
: undefined
|
||||
this.defaults.set(id, schema === undefined ? undefined : this.defaultValues(schema, fiber, id))
|
||||
let effective = fiber.effectiveConfig
|
||||
if (schema !== undefined && effective === undefined) {
|
||||
try {
|
||||
// Before activation there is no effective Config; resolving the raw config with the instance's own schema gives
|
||||
// the object activation will receive.
|
||||
effective = fiber.resolveConfig(fiber.rawConfig)
|
||||
} catch (error) {
|
||||
// A config expression may read an injection the pending plugin is still waiting for. The row carries no values
|
||||
// until the plugin activates, when its status change republishes them; a Config the schema rejects fails the
|
||||
// activation itself.
|
||||
this.ctx.logger.debug(error)
|
||||
effective = undefined
|
||||
}
|
||||
}
|
||||
let values: SyncedConfigValues | undefined
|
||||
try {
|
||||
// Before activation there is no effective Config; resolving the raw config with the instance's own schema gives
|
||||
// the object activation will receive.
|
||||
values = schema === undefined ? undefined : syncedValues(schema, fiber.effectiveConfig ?? fiber.resolveConfig(fiber.rawConfig), id)
|
||||
values = schema === undefined || effective === undefined ? undefined : syncedValues(schema, effective, id)
|
||||
} catch (error) {
|
||||
// Containment: one plugin's unsyncable value keeps its last published values and leaves the other rows intact.
|
||||
this.ctx.logger.error(error)
|
||||
|
||||
@@ -128,6 +128,21 @@ it('publishes values its own schema resolves for a plugin that has not activated
|
||||
expect(h.config('@fixture/waiting')).toEqual(initial)
|
||||
})
|
||||
|
||||
it('publishes no values while a pending plugin\'s config expression reads an injection it awaits, then the activated values', async () => {
|
||||
const Waiting = z.object({ size: z.natural().default(1).volatile(), hosts: z.array(String).default([]) })
|
||||
const h = await harness({ '@fixture/pkg': { Config: Schema, apply: () => {} } }, { '@fixture/pkg': { size: 3 } })
|
||||
const errors = vi.spyOn(h.ctx.logger, 'error')
|
||||
writePackage('@fixture/waiting')
|
||||
h.plugins['@fixture/waiting'] = { inject: ['absent'], Config: Waiting, apply: () => {} }
|
||||
await h.ctx.loader.create({ name: '@fixture/waiting', config: { size: 3, hosts: { __jsExpr: 'ctx.absent.hosts' } } })
|
||||
await vi.waitFor(() => { expect(h.service.graph().entries.some(row => row.id === '@fixture/waiting')).toBe(true) })
|
||||
expect(h.config('@fixture/waiting')).toBeUndefined()
|
||||
h.ctx.provide('absent', { hosts: ['a'] } as never)
|
||||
await h.ctx.loader.await()
|
||||
await vi.waitFor(() => { expect(h.config('@fixture/waiting')).toEqual({ size: 3 }) })
|
||||
expect(errors).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('publishes values for an entry created after startup that has not activated yet', async () => {
|
||||
const h = await harness({ '@fixture/pkg': { Config: Schema, apply: () => {} } }, { '@fixture/pkg': { size: 3 } })
|
||||
writePackage('@fixture/late')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-product-analytics",
|
||||
"description": "Desktop product event collection and authenticated Host reporting",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-resources",
|
||||
"description": "Unified client resource model: protocol-registered providers turn URL addresses into live values, consumed through the useResource global standard hook",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-script-realm-iframe",
|
||||
"description": "Optional iframe ScriptRealm provider",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-script-realm",
|
||||
"description": "Direct-reference script environments and Cordis-owned provider registration",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
en: d152484eb41ac6b4
|
||||
zh: 0cd57b7b8d8c9b59
|
||||
/deepseek-ai-dsh-client-shortcuts/use-this-package:
|
||||
en: 8df3db7ca8cc6110
|
||||
zh: e872f6333ead59c4
|
||||
en: 7a3323a3404cc2cd
|
||||
zh: 6367a8009a486d68
|
||||
/deepseek-ai-dsh-client-shortcuts/understand-the-implementation:
|
||||
en: adfd258f490cacb1
|
||||
zh: 44c080babc54c6a9
|
||||
|
||||
@@ -29,7 +29,7 @@ Windows uses ` + ` between modifiers and the first ordinary key. Two simultaneou
|
||||
|
||||
The Web app bundle mounts this package automatically. Feature plugins register commands through `ctx.shortcuts` inside `ctx.effect()`. Each command declares defaults for explicit `desktop:macos`, `desktop:windows`, `desktop:linux`, `web:macos`, `web:windows`, and `web:linux` profiles; an omitted profile is unbound. The service accepts physical `code` values, expands `primary` to the device modifier, and rejects duplicate ids and overlapping default combinations across supported profiles. Labels, keycaps, modified flags, and binding conflicts share one observable catalog. Command owners resolve the current target before executing an action.
|
||||
|
||||
Feature plugins contribute read-only sequences through `registerFixed()` and observe locally arbitrated input through `observeFixedInput()`. Fixed rows follow the owning registration and locale; owners may use the `application` display group without making the action editable. Each action declares at least one physical combination and has no saved overrides. These combinations participate in conflict checks and cannot be assigned to editable commands. The Host's `stopSequenceMs` setting controls the maximum double-Escape interval, defaults to 500 milliseconds, and accepts integers from 1 to 2,147,483,646 so expiry stays within the browser timer limit; pages adopt the validated value on load.
|
||||
Feature plugins contribute read-only sequences through `registerFixed()` and observe locally arbitrated input through `observeFixedInput()`. Fixed rows follow the owning registration and locale; owners may use the `application` display group without making the action editable. Each action declares at least one physical combination and has no saved overrides. These combinations participate in conflict checks and cannot be assigned to editable commands. The Host's `stopSequenceMs` setting controls the maximum double-Escape interval, defaults to 500 milliseconds, and accepts integers from 1 to 2,147,483,646 so expiry stays within the browser timer limit. It is a volatile field of the Host entry's Config, so the service's `stopSequenceMs` returns the latest value from `cordis.yml` on open pages without remounting the plugin; the Conversation stop shortcut reads it at each first Escape press, so a change applies to the next stop sequence.
|
||||
|
||||
Preferences store only overrides: a missing command inherits its default, `null` clears its binding, and restoring a default removes its override. Restore All affects only the current runtime/platform profile. Web uses origin-local `dsh.keybindings.v1` storage; Desktop uses Electron's device-local `userData/keybindings.json`, independently of Harness home and workspace settings. The schema version is independent of Session data. macOS and Windows Desktop read version 1 without rewriting it and save version 2 on the next successful edit; version 2 adds optional `secondCode`. Web and Linux retain their existing binding restrictions.
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Windows 在修饰键之间及第一个普通键之前使用 ` + `。Windows 和
|
||||
|
||||
Web 应用 bundle 自动挂载此包。功能插件在 `ctx.effect()` 中通过 `ctx.shortcuts` 注册命令。每个命令为 `desktop:macos`、`desktop:windows`、`desktop:linux`、`web:macos`、`web:windows` 和 `web:linux` 显式声明默认值;省略的配置不绑定按键。服务接收物理 `code`,按设备展开 `primary`,并拒绝重复 ID 和任一支持配置中重叠的默认键位。同一可观察目录提供名称、键帽、已修改标记和键位冲突。命令 owner 在执行操作前解析当前目标。
|
||||
|
||||
功能插件通过 `registerFixed()` 贡献只读序列,通过 `observeFixedInput()` 观察局部控件处理后的输入。固定操作行随所属注册和语言变化;owner 可使用 `application` 展示分组,操作仍不可编辑。每个操作至少声明一个物理按键组合,不保存覆盖配置。这些组合参与冲突校验,不能分配给可编辑命令。Host 的 `stopSequenceMs` 配置控制连续两次 Esc 的最大间隔,默认为 500 毫秒,只接受 1 至 2,147,483,646 的整数,确保过期计时不超过浏览器定时器上限;页面加载时采用已校验的值。
|
||||
功能插件通过 `registerFixed()` 贡献只读序列,通过 `observeFixedInput()` 观察局部控件处理后的输入。固定操作行随所属注册和语言变化;owner 可使用 `application` 展示分组,操作仍不可编辑。每个操作至少声明一个物理按键组合,不保存覆盖配置。这些组合参与冲突校验,不能分配给可编辑命令。Host 的 `stopSequenceMs` 配置控制连续两次 Esc 的最大间隔,默认为 500 毫秒,只接受 1 至 2,147,483,646 的整数,确保过期计时不超过浏览器定时器上限。它是 Host 条目 Config 中的 volatile 字段,因此在 `cordis.yml` 中修改后,已打开页面上服务的 `stopSequenceMs` 无需重新挂载插件即返回最新值;Conversation 的停止快捷键在每次第一下 Escape 时读取,因此修改从下一次停止序列开始生效。
|
||||
|
||||
偏好只保存覆盖:缺少命令表示继承默认,`null` 表示清除绑定,恢复默认则删除覆盖。全部恢复只影响当前运行端/平台配置。Web 使用同 origin 的 `dsh.keybindings.v1` 存储;Desktop 使用 Electron 设备本地的 `userData/keybindings.json`,与 Harness home 和工作区设置独立。其 schema 版本与 Session 数据无关。 macOS 和 Windows Desktop 读取版本 1 时不重写,在下次成功编辑时保存为版本 2;版本 2 增加可选的 `secondCode`。Web 和 Linux 保留原有绑定限制。
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-client-shortcuts",
|
||||
"description": "Application keyboard command registry and physical-key routing",
|
||||
"version": "0.2.2-rc.3",
|
||||
"version": "0.2.2-rc.4",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
@@ -53,7 +53,7 @@
|
||||
"@deepseek-ai/dsh-client-ui-primitives": "workspace:*",
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-test-runtime": "workspace:*",
|
||||
"@deepseek-ai/dsh-host-webserver": "workspace:*"
|
||||
"@deepseek-ai/dsh-client-config": "workspace:*"
|
||||
},
|
||||
"files": [
|
||||
"locale/*.json",
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
import { Service } from '@deepseek-ai/cordis'
|
||||
import type { Context } from '@deepseek-ai/cordis'
|
||||
import type {} from '@deepseek-ai/dsh-client-locale/client'
|
||||
import type { SyncedConfig, SyncedConfigRef } from '@deepseek-ai/dsh-client-config/types'
|
||||
import type { ShortcutsConfig } from '../types.ts'
|
||||
import { ShortcutRegistry } from './registry.ts'
|
||||
import { detectEnvironment, installKeyboard } from './dom.ts'
|
||||
import { bindingIssue, initialShortcutConfig, normalizeBinding, overlappingBindings, presentBinding } from '../protocol.ts'
|
||||
@@ -10,7 +12,6 @@ import { desktopShortcutStorage, webShortcutStorage } from './storage.ts'
|
||||
import type { Shortcuts } from './types.ts'
|
||||
import type { ShortcutFixedInput } from './types.ts'
|
||||
import { installNativeKeyboard } from './native.ts'
|
||||
import { Config } from '../config.ts'
|
||||
|
||||
export type { ShortcutCatalogEntry, ShortcutCommand, ShortcutContext, ShortcutGesture, Shortcuts } from './types.ts'
|
||||
export type { ShortcutFixedInput, ShortcutFixedCommand, ShortcutFixedCatalogEntry } from './types.ts'
|
||||
@@ -23,6 +24,9 @@ declare module '@deepseek-ai/cordis' {
|
||||
}
|
||||
}
|
||||
|
||||
/** Double-Escape interval while the Host sends none; equals the Host schema default. */
|
||||
const ABSENT_STOP_SEQUENCE_MS = 500
|
||||
|
||||
/** Cordis keyboard provider; Desktop startup requires its native keyboard bridge. */
|
||||
export default class ShortcutsService extends Service implements Shortcuts {
|
||||
static inject = ['locale']
|
||||
@@ -31,7 +35,7 @@ export default class ShortcutsService extends Service implements Shortcuts {
|
||||
readonly catalog: Shortcuts['catalog']
|
||||
readonly config: Shortcuts['config']
|
||||
readonly fixedCatalog: Shortcuts['fixedCatalog']
|
||||
readonly stopSequenceMs: number
|
||||
private readonly stopSequence: SyncedConfigRef<number | undefined>
|
||||
private readonly fixedListeners = new Set<(input: ShortcutFixedInput) => void>()
|
||||
private readonly adapter: DesktopShortcutsApi | undefined
|
||||
private readonly keyboard: DesktopKeyboardApi | undefined
|
||||
@@ -39,7 +43,11 @@ export default class ShortcutsService extends Service implements Shortcuts {
|
||||
private connected = false
|
||||
private readonly registry: ShortcutRegistry
|
||||
|
||||
constructor(ctx: Context) {
|
||||
/**
|
||||
* @param ctx - plugin-owned Client context.
|
||||
* @param config - Host-synced sequence timing, read whenever `stopSequenceMs` is read.
|
||||
*/
|
||||
constructor(ctx: Context, config: SyncedConfig<ShortcutsConfig>) {
|
||||
const environment = detectEnvironment(document, navigator)
|
||||
const keyboard = environment.runtime === 'desktop'
|
||||
? (window as Window & { dshDesktop?: { keyboard?: DesktopKeyboardApi } }).dshDesktop?.keyboard : undefined
|
||||
@@ -48,8 +56,7 @@ export default class ShortcutsService extends Service implements Shortcuts {
|
||||
this.keyboard = keyboard
|
||||
this.runtime = environment.runtime
|
||||
this.platform = environment.platform
|
||||
const config = Config((globalThis as { __DSH_SHORTCUTS_CONFIG__?: unknown }).__DSH_SHORTCUTS_CONFIG__ ?? {})
|
||||
this.stopSequenceMs = config.stopSequenceMs
|
||||
this.stopSequence = config.stopSequenceMs
|
||||
this.registry = new ShortcutRegistry(this.runtime, this.platform, initialShortcutConfig())
|
||||
this.catalog = this.registry.catalog
|
||||
this.config = this.registry.config
|
||||
@@ -74,6 +81,10 @@ export default class ShortcutsService extends Service implements Shortcuts {
|
||||
ctx.effect(() => ctx.locale.subscribe(() => { this.registry.refreshLabels() }), 'shortcuts: locale')
|
||||
}
|
||||
|
||||
get stopSequenceMs(): number {
|
||||
return this.stopSequence.get() ?? ABSENT_STOP_SEQUENCE_MS
|
||||
}
|
||||
|
||||
register(command: Parameters<Shortcuts['register']>[0]): () => void {
|
||||
const off = this.registry.register(command)
|
||||
this.syncDefinitions()
|
||||
|
||||
@@ -86,6 +86,10 @@ export interface Shortcuts {
|
||||
readonly catalog: ObservableSnapshot<readonly ShortcutCatalogEntry[]>
|
||||
readonly config: ObservableSnapshot<ShortcutConfigSnapshot>
|
||||
readonly fixedCatalog: ObservableSnapshot<readonly ShortcutFixedCatalogEntry[]>
|
||||
/**
|
||||
* Host-configured maximum interval between the two Escape presses of a stop sequence, in milliseconds;
|
||||
* each read returns the latest synced value.
|
||||
*/
|
||||
readonly stopSequenceMs: number
|
||||
/**
|
||||
* Contribute one fixed action and reserve its keys against editable bindings.
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/** Window-local timing accepted by the Host and browser keyboard service. */
|
||||
import z from '@deepseek-ai/schemastery'
|
||||
|
||||
/** Fixed shortcut sequence settings. */
|
||||
export interface Config {
|
||||
/** Maximum interval between independent Escape presses for stopping a reply, in milliseconds. */
|
||||
stopSequenceMs: number
|
||||
}
|
||||
|
||||
/** Validated deployment settings for fixed keyboard sequences. */
|
||||
export const Config: z<Partial<Config>, Config> = z.object({
|
||||
stopSequenceMs: z.natural().min(1).max(2_147_483_646).default(500),
|
||||
})
|
||||
@@ -1,20 +1,20 @@
|
||||
/** Host configuration for window-local keyboard sequences. */
|
||||
// Host configuration injection stays with each plugin's validated Config and browser global.
|
||||
/* jscpd:ignore-start */
|
||||
/** Host Loader entry declaring window-local keyboard sequence timing; the keyboard service belongs to the Client. */
|
||||
import type { Context } from '@deepseek-ai/cordis'
|
||||
import type {} from '@deepseek-ai/dsh-host-webserver'
|
||||
import type { Config } from './config.ts'
|
||||
import z from '@deepseek-ai/schemastery'
|
||||
import type { ShortcutsConfig } from './types.ts'
|
||||
|
||||
export { Config } from './config.ts'
|
||||
/** Fixed shortcut sequence timing; the browser receives it through its synced Config. */
|
||||
export type Config = ShortcutsConfig
|
||||
|
||||
/** Sequence timing synced to the browser; the upper bound keeps expiry within the browser timer limit. */
|
||||
export const Config = z.object({
|
||||
stopSequenceMs: z.natural().min(1).max(2_147_483_646).default(500).volatile(),
|
||||
})
|
||||
|
||||
/**
|
||||
* Embed validated keyboard settings in product pages.
|
||||
* @param ctx - Host context serving browser pages.
|
||||
* @param config - sequence timing adopted when the page loads.
|
||||
* Register the browser plugin without Host behavior; the Loader validates the entry's Config, and the browser face
|
||||
* receives its volatile fields.
|
||||
* @param _ctx - Host context; unused.
|
||||
* @param _config - validated Config; unused on the Host.
|
||||
*/
|
||||
export function apply(ctx: Context, config: Config): void {
|
||||
ctx.on('webserver/index-inject', (table) => {
|
||||
table.push({ kind: 'global', name: '__DSH_SHORTCUTS_CONFIG__', value: config })
|
||||
})
|
||||
}
|
||||
/* jscpd:ignore-end */
|
||||
export function apply(_ctx: Context, _config: Config): void {}
|
||||
Loaded 100 of 589 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user