Merge pull request #8256 from deepseek-harness/refactor/llm-route-credential

refactor(llm): publish DeepSeek route credentials through ctx.llm
This commit is contained in:
LegGasai authored and GitHub committed 2026-11-17 11:09:59 +08:00
commit 58d8ccc11f
197 files changed
+3955 -1687

No files matched your search

@@ -9,11 +9,11 @@
en: 8d4d00e33af763b2
zh: 61977c82d66ae9bf
/agent-note-account-provider-and-active-request-cancellation/decision:
en: d5eb12a1644c6226
zh: 513d4f22ab74e039
en: 6f5463ecf88c1435
zh: 7c9e46f90c8ccffb
/agent-note-account-provider-and-active-request-cancellation/alternatives-considered:
en: a072026c1495a1ca
zh: bf053cc04fb33914
en: 7ed93136cf11074a
zh: 1ee997e271e919ad
/agent-note-account-provider-and-active-request-cancellation/consequences:
en: 8fd00b6d69b380c0
zh: 3830dc3a93d5de3c
@@ -14,11 +14,11 @@ Selecting credentials from login state changes the billing identity of an existi
Account cancellation reads each running Agent’s latest `Session.requestContext()` instead of maintaining another provider field. This logged value remains through tools and retries and follows the next bound request. Idle Agents are excluded. During a new turn’s first preparation it can still name the previous turn’s account route, so sign-out can also interrupt an API-key turn that has not bound its new request yet. A missing account credential rejects a first request without a previous context before transport.
Successful local sign-out publishes an account event. The platform account provider installs the account module’s listener, which enumerates the Agent registry and cancels matching account routes through `Agent.cancel`, preserving inboxes. The account controller shares its predicate for sign-out confirmation. Each registered child is classified independently; existing parent-owned cancellation still applies to children whose lifetime is attached to a cancelled parent. The existing HTTP signal carries cancellation to transport.
Successful local sign-out publishes an account event. The account route plugin installs a listener, which enumerates the Agent registry and cancels matching account routes through `Agent.cancel`, preserving inboxes. It registers the same predicate with the account service as the running-task report behind sign-out confirmation. Each registered child is classified independently; existing parent-owned cancellation still applies to children whose lifetime is attached to a cancelled parent. The existing HTTP signal carries cancellation to transport. Requests this listener cannot reach end through the withdrawal signal of their credential, which the [route credential decision](2026-11-10-llm-route-credential-seam.md) owns.
## Alternatives considered
A historical set of providers wrongly cancels a turn after it switches to an API-key route. Current settings misclassify an older in-flight request. A second provider field or module-global map duplicates information already recorded in request context. A login-level cancellation signal duplicates the existing Agent and HTTP cancellation chain.
A historical set of providers wrongly cancels a turn after it switches to an API-key route. Current settings misclassify an older in-flight request. A second provider field or module-global map duplicates information already recorded in request context. A login-level cancellation signal in place of this chain duplicates the existing Agent and HTTP cancellation; the credential's withdrawal signal only supplements it.
## Consequences
@@ -14,11 +14,11 @@ Status: implemented
账号取消读取运行中 Agent 最近的 `Session.requestContext()`,不维护额外提供方字段。该已记录值在工具和重试阶段保留,随下一次绑定请求更新;空闲 Agent 不计入。新轮次首次准备期间,它仍可能指向上一轮的账号路由,因此退登也可能打断尚未绑定新请求的 API key 轮次。没有历史上下文的首请求若缺少账号凭据,会在传输前失败。
本地退登成功后发布账号事件。Platform 账号提供方安装账号模块的监听器,遍历 Agent 注册表,通过 `Agent.cancel` 取消匹配的账号路由并保留收件箱。账号控制器的退登确认复用同一判断函数。每个已注册子代理独立分类;生命周期绑定到已取消父代理的子代理仍受现有父级取消规则约束。现有 HTTP 信号将取消传递到传输层。
本地退登成功后发布账号事件。账号路由插件安装监听器,遍历 Agent 注册表,通过 `Agent.cancel` 取消匹配的账号路由并保留收件箱。它把同一判断函数注册到账号服务,作为退登确认所依据的运行中任务报告。每个已注册子代理独立分类;生命周期绑定到已取消父代理的子代理仍受现有父级取消规则约束。现有 HTTP 信号将取消传递到传输层。该监听器到达不了的请求通过其凭据的撤回信号结束,这一信号由[路由凭据决策](2026-11-10-llm-route-credential-seam.zh.md)负责。
## Alternatives considered
历史提供方集合会在轮次切换到 API Key 路由后仍错误取消它。当前设置会误判更早的在途请求。额外的提供方字段或模块级全局映射重复保存请求上下文中已有的信息。登录级取消信号重复现有 Agent 与 HTTP 取消链路。
历史提供方集合会在轮次切换到 API Key 路由后仍错误取消它。当前设置会误判更早的在途请求。额外的提供方字段或模块级全局映射重复保存请求上下文中已有的信息。用登录级取消信号取代这条链路,会重复现有的 Agent 与 HTTP 取消;凭据的撤回信号只是对它的补充。
## Consequences
@@ -9,8 +9,8 @@
en: 32ba2b2b42e8deb5
zh: 6a6532561f81b8e2
/agent-note-offer-web-search-and-web-fetch-only-while-the-selected-provider-is-ready/decision:
en: 08a54b37e157da29
zh: 65f633055d9df242
en: 023c6db0af5f9424
zh: 7bdf40c49e381ee3
/agent-note-offer-web-search-and-web-fetch-only-while-the-selected-provider-is-ready/alternatives-considered:
en: 6da221f6b821ea44
zh: b15774011abed7ed
@@ -13,7 +13,7 @@ English | [中文](2026-09-27-web-search-offered-by-provider-readiness.zh.md)
Each role of the web capability seam owns one part of a per-step check:
- **Service Definition.** `WebSearchProvider` and `WebFetchProvider` have an optional `ready(llmProvider)` that answers whether an operation made for a model request on that chat route has a credential to send. It checks configuration only and makes no network calls. `ctx.web.searchReady(llmProvider?)` and `ctx.web.fetchReady(llmProvider?)` resolve the provider with the same rules as `search()` and `fetch()` and return its answer. A provider without `ready()` counts as ready, and a selection failure answers true because the operation reports that failure as a structured `WebError`.
- **Service Provider.** Each DeepSeek provider checks its credentials in the order its operation resolves them. `dsh-web-search-deepseek` checks, on the `deepseek-account` route, whether `ctx.deepseekAccount.resolveToken()` returns a token for its Messages endpoint, and then its literal `apiKey` or its `apiKeyEnv` reference. The Search and Fetch API providers of `dsh-web-deepseek-api` resolve the same plan as the operation ([credential resolution](2026-10-29-web-provider-selection.md)): a capability with its own YAML fields checks only the key under its `*ApiKeyEnv`; otherwise, on the account route with the account model route mounted, a token for that route's `/v1/tools` base counts, and then the key of the `deepseek-official` route, or `DEEPSEEK_API_KEY` without that route. A key counts when `ctx.credentials.describe()` reports its reference configured (without that service, when the launching environment carries it); the [shared credential helpers](../../../../packages/llm/llm-deepseek/src/credential.ts) perform these presence checks. A failed account-token or credential-store read answers false, because the operation fails on that read instead of trying the next credential. The providers name no tool or prompt section.
- **Service Provider.** Each DeepSeek provider checks its credentials in the order its operation resolves them. `dsh-web-search-deepseek` checks, on a route whose `ctx.llm.providerCredential()` publishes an account credential, whether that credential is configured for its Messages endpoint, and then its literal `apiKey` or its `apiKeyEnv` reference. The Search and Fetch API providers of `dsh-web-deepseek-api` resolve the same plan as the operation ([credential resolution](2026-10-29-web-provider-selection.md)): a capability with its own YAML fields checks only the key under its `*ApiKeyEnv`; otherwise, on the account route with the account model route mounted, that route's credential configured for its `/v1/tools` base counts, and then the key of the `deepseek-official` route, or `DEEPSEEK_API_KEY` without that route. A key counts when `ctx.credentials.describe()` reports its reference configured (without that service, when the launching environment carries it); the reference helpers of `dsh-credentials` and each route's own presence check perform these checks. A failed account-token or credential-store read answers false, because the operation fails on that read instead of trying the next credential. The providers name no tool or prompt section.
- **Consumer.** `dsh-tool-web` registers `web_search` and `web_fetch` with [step activation conditions](../../../../packages/core/tools/README.md#conditional-tools) that ask `ctx.web.searchReady()` and `ctx.web.fetchReady()` about the route of the step's model selection. The agent loop resolves conditions before it assembles the step, so the declared tools, the `tool:web_search` and `tool:web_fetch` prompt sections, PTC program bindings, and dispatch all read the same admitted set.
The route decides only whether the account token is checked before the API key, which happens on the `deepseek-account` route; an API key counts on every route, so a conversation on another provider's model is offered the DeepSeek web tools whenever a DeepSeek key is configured. A Search or Fetch API capability with its own YAML fields ignores the route and is ready exactly when its own key is configured.
@@ -13,7 +13,7 @@ Status: implemented
web 能力 seam 的每个角色各负责逐步骤检查的一部分:
- **Service Definition。** `WebSearchProvider` 与 `WebFetchProvider` 有一个可选的 `ready(llmProvider)`,回答为该对话路由上的模型请求发起的操作是否有可发送的凭据。它只检查配置,不发起网络调用。`ctx.web.searchReady(llmProvider?)` 与 `ctx.web.fetchReady(llmProvider?)` 按与 `search()`、`fetch()` 相同的规则解析提供方并返回其回答。没有 `ready()` 的提供方视为就绪;选择失败时回答 true,因为对应操作会把该失败报告为结构化 `WebError`。
- **Service Provider。** 每个 DeepSeek 提供方都按其操作解析凭据的顺序检查凭据。`dsh-web-search-deepseek` 在 `deepseek-account` 路由上检查 `ctx.deepseekAccount.resolveToken()` 是否为其 Messages 端点返回 token,然后检查其字面 `apiKey` 或 `apiKeyEnv` 引用。`dsh-web-deepseek-api` 的 Search 与 Fetch API 提供方解析与操作相同的方案([凭据解析](2026-10-29-web-provider-selection.zh.md)):在 YAML 中设置了单独字段的能力只检查其 `*ApiKeyEnv` 下的密钥;否则,在账号路由上且账号模型路由已挂载时,该路由 `/v1/tools` 基础地址的 token 算数,然后是 `deepseek-official` 路由的密钥,没有该路由时为 `DEEPSEEK_API_KEY`。`ctx.credentials.describe()` 报告其引用已配置时(没有该服务时,启动环境中存在该变量),密钥即算存在;这些存在性检查由[共享凭据函数](../../../../packages/llm/llm-deepseek/src/credential.ts)执行。读取账号 token 或凭据存储失败时回答 false,因为操作会在该次读取上失败,而不会尝试下一种凭据。提供方不点名任何工具或提示词段落。
- **Service Provider。** 每个 DeepSeek 提供方都按其操作解析凭据的顺序检查凭据。`dsh-web-search-deepseek` 在 `ctx.llm.providerCredential()` 发布账号凭据的路由上检查该凭据是否已为其 Messages 端点配置,然后检查其字面 `apiKey` 或 `apiKeyEnv` 引用。`dsh-web-deepseek-api` 的 Search 与 Fetch API 提供方解析与操作相同的方案([凭据解析](2026-10-29-web-provider-selection.zh.md)):在 YAML 中设置了单独字段的能力只检查其 `*ApiKeyEnv` 下的密钥;否则,在账号路由上且账号模型路由已挂载时,该路由为其 `/v1/tools` 基础地址配置的凭据算数,然后是 `deepseek-official` 路由的密钥,没有该路由时为 `DEEPSEEK_API_KEY`。`ctx.credentials.describe()` 报告其引用已配置时(没有该服务时,启动环境中存在该变量),密钥即算存在;这些存在性检查由 `dsh-credentials` 的引用函数和各路由自身的存在性检查执行。读取账号 token 或凭据存储失败时回答 false,因为操作会在该次读取上失败,而不会尝试下一种凭据。提供方不点名任何工具或提示词段落。
- **Consumer。** `dsh-tool-web` 注册 `web_search` 与 `web_fetch` 时各带一个[步骤激活条件](../../../../packages/core/tools/README.zh.md#conditional-tools),以该步骤模型选择的路由询问 `ctx.web.searchReady()` 与 `ctx.web.fetchReady()`。agent loop 在组装该步骤之前解析各条件,因此声明的工具、`tool:web_search` 与 `tool:web_fetch` 提示词段落、PTC 程序绑定与派发都读取同一个准入集合。
路由只决定是否先检查账号 token 再检查 API 密钥,这发生在 `deepseek-account` 路由上;API 密钥在每条路由上都算数,因此只要配置了 DeepSeek 密钥,使用其他提供方模型的对话也会获得 DeepSeek Web 工具。在 YAML 中设置了单独字段的 Search 或 Fetch API 能力不看路由,恰在其自身密钥已配置时就绪。
@@ -18,8 +18,8 @@
en: 9d68ffca5c8be681
zh: 36bb661f98de0ebb
/agent-note-web-provider-selection-independent-menus-over-registered-providers/decision/credential-resolution:
en: 15f6fb26c8605260
zh: 93467641a8ff0aad
en: aa5522b172d2c580
zh: 04561ffe78d69ff4
/agent-note-web-provider-selection-independent-menus-over-registered-providers/decision/defaults-and-stored-selections:
en: 5fcd3319fbceed1d
zh: 20771646b9c36fa6
@@ -30,11 +30,11 @@ The Search and Fetch APIs read one `web-deepseek-api` namespace, and each resolv
Each of Search and Fetch has a billing setting, `web-deepseek-api.searchBilling` or `fetchBilling`, which the settings page edits as a **Billing** menu under the selected API. The default, `auto`, follows the DeepSeek credential of the conversation; `account` sends only the signed-in account's token and `api-key` only the API key, without falling back to the other. The conversation's route is the `provider` of the initiating Session's latest request context, which account sign-out also reads; `ready()` uses the route of the model request being prepared, so readiness and execution resolve the same plan.
The account token is the one `ctx.deepseekAccount` releases for the dispatch endpoint under the origin of the active `@deepseek-ai/dsh-llm-deepseek-account` Loader entry at the entry root that the model provider directory lists, with `/v1/tools`; without that entry, the origin of that route's default base URL is used. An HTTP 401 invalidates that token. With `auto` billing on the `deepseek-account` route, the operation sends the account token when that entry exists and a token is released. Every other `auto` operation, including one in an account conversation without a sign-in or a token, sends the key under the `apiKeyEnv` of the active `@deepseek-ai/dsh-llm-deepseek-api-key` entry for `deepseek-official`, resolved with that package's own resolver (including `DEEPSEEK_BASE_URL`), to the origin of that route's base URL with `/v1/tools`; without that entry, `DEEPSEEK_API_KEY` goes to `https://api.deepseek.com/v1/tools`. With `auto` billing on a route other than the two DeepSeek routes, or outside a Session, an operation without a configured key sends the account token instead, so a signed-in user without a key keeps web tools in conversations on other model providers; on the `deepseek-official` route it never sends the token, because that conversation bills the API key. Sending the API key in a signed-out account conversation keeps web tools available there. A user with only `DEEPSEEK_API_KEY`, including every headless, SDK, and ACP run, therefore searches and fetches by default, and a gateway or internal deployment set through the model provider's base URL serves web access at the same origin. A missing credential makes the capability not ready, and an operation fails with `WEB_PROVIDER_CREDENTIAL_MISSING` and guidance for its billing that names the account sign-in, the Models page and the reference, and the billing field. A mounted route entry whose settings its resolver rejects is not treated as absent: an operation that needs that route is not ready and fails with `WEB_PROVIDER_MISCONFIGURED` before reading the credential that depends on that route, without trying later sources or sending the request, so a broken gateway setting never redirects requests to the official endpoint.
The account credential is the one `ctx.deepseekAccount` releases for the dispatch endpoint under the origin of the base URL the mounted `deepseek-account` route publishes through `ctx.llm.providerCredential()`, with `/v1/tools`; without that route, the origin `DEEPSEEK_BASE_URL` names is used. An HTTP 401 invalidates that credential. With `auto` billing on the `deepseek-account` route, the operation sends the account credential when that route is mounted and a credential is released. Every other `auto` operation, including one in an account conversation without a sign-in or a credential, sends the key the mounted `deepseek-official` route publishes, which the route resolves under its `apiKeyEnv` (its base URL includes `DEEPSEEK_BASE_URL`), to the origin of that route's base URL with `/v1/tools`; without that route, `DEEPSEEK_API_KEY` goes to `https://api.deepseek.com/v1/tools`. With `auto` billing on a route other than the two DeepSeek routes, or outside a Session, an operation without a configured key sends the account token instead, so a signed-in user without a key keeps web tools in conversations on other model providers; on the `deepseek-official` route it never sends the token, because that conversation bills the API key. Sending the API key in a signed-out account conversation keeps web tools available there. A user with only `DEEPSEEK_API_KEY`, including every headless, SDK, and ACP run, therefore searches and fetches by default, and a gateway or internal deployment set through the model provider's base URL serves web access at the same origin. A missing credential makes the capability not ready, and an operation fails with `WEB_PROVIDER_CREDENTIAL_MISSING` and guidance for its billing that names the account sign-in, the Models page and the reference, and the billing field. A mounted route whose configuration does not resolve is not treated as absent: an operation that needs that route is not ready and fails with `WEB_PROVIDER_MISCONFIGURED` before reading the credential that depends on that route, without trying later sources or sending the request, so a broken gateway setting never redirects requests to the official endpoint.
A capability whose YAML sets a non-empty `searchBaseURL` or `searchApiKeyEnv` (`fetchBaseURL` or `fetchApiKeyEnv` for Fetch) instead, whatever its billing, always sends the key under its `*ApiKeyEnv` (`DEEPSEEK_API_KEY` when unset) to its `*BaseURL` (the official base when unset) and never the account token, so an intranet or third-party endpoint receives only the key chosen for it. Each capability has its own fields because a deployment can serve search and fetch from different gateways. These fields are YAML-only, and an empty value counts as unset. Stored values of fields outside the schema, including `baseURL`, `apiKeyEnv`, and `apiKey`, load without schema errors and have no effect.
The [credential helpers](../../../../packages/llm/llm-deepseek/src/credential.ts) of `@deepseek-ai/dsh-llm-deepseek` read and validate API keys, check key presence, and release account tokens for the DeepSeek model routes, Messages search, and the Search and Fetch APIs, so every DeepSeek request reads the credential store the same way; the account model route, Messages search, and the Search and Fetch APIs also invalidate the token that an HTTP 401 rejects. Shipped profiles need no per-profile credential override, because the API-key path works wherever `DEEPSEEK_API_KEY` or the DeepSeek API-key route has a key.
The DeepSeek model routes publish the credential they send through `ctx.llm.providerCredential()` ([route credentials](2026-11-10-llm-route-credential-seam.md)): the API-key route its key under `apiKeyEnv`, the account route the credential `ctx.deepseekAccount` releases for a destination. Messages search and the Search and Fetch APIs read those publications instead of provider configuration, and read `DEEPSEEK_API_KEY` and own keys through the reference helpers of `dsh-credentials`, so every DeepSeek request reads the credential store the same way; a credential whose grant offers invalidation is invalidated after an HTTP 401. Shipped profiles need no per-profile credential override, because the API-key path works wherever `DEEPSEEK_API_KEY` or the DeepSeek API-key route has a key.
### Defaults and stored selections
@@ -30,11 +30,11 @@ Search 与 Fetch API 读取同一个 `web-deepseek-api` namespace,并各自解
Search 与 Fetch 各有一个计费方式设置 `web-deepseek-api.searchBilling` 或 `fetchBilling`,设置页在选中的 API 下方以**计费方式**下拉框编辑它。默认值 `auto` 跟随会话的 DeepSeek 凭据;`account` 只发送已登录账号的令牌,`api-key` 只发送 API 密钥,都不回退到另一种凭据。会话的路由是发起会话最近一次请求上下文的 `provider`,账号退出登录读取的也是它;`ready()` 使用正在准备的模型请求的路由,因此就绪判断与执行解析出相同的方案。
账号令牌是 `ctx.deepseekAccount` 为模型提供方目录列出的入口根部活动 `@deepseek-ai/dsh-llm-deepseek-account` Loader 条目的 origin 加 `/v1/tools` 下的请求端点给出的令牌;没有该条目时使用该路由默认基础地址的 origin。HTTP 401 会作废该令牌。`auto` 计费在 `deepseek-account` 路由上,若存在该条目且取得令牌,操作发送账号令牌。其他所有 `auto` 操作,包括账号会话中没有登录或没有令牌的操作,都把 `deepseek-official` 的活动 `@deepseek-ai/dsh-llm-deepseek-api-key` 条目的 `apiKeyEnv` 下的密钥(用该包自己的解析函数解析,包括 `DEEPSEEK_BASE_URL`)发往该路由基础地址的 origin 加 `/v1/tools`;没有该条目时,把 `DEEPSEEK_API_KEY` 发往 `https://api.deepseek.com/v1/tools`。`auto` 计费在两个 DeepSeek 路由之外的路由上或会话之外,没有配置密钥的操作改为发送账号令牌,因此已登录但没有密钥的用户在其他模型提供方的会话中仍可使用网页工具;在 `deepseek-official` 路由上从不发送令牌,因为该会话按 API 密钥计费。未登录的账号会话发送 API 密钥,网页工具因此在其中仍然可用。因此只有 `DEEPSEEK_API_KEY` 的用户(包括所有 headless、SDK 与 ACP 运行)默认即可搜索和抓取,通过模型提供方基础地址设置的网关或内部部署也在同一 origin 上提供 Web 访问。缺少凭据时,该能力未就绪,操作以 `WEB_PROVIDER_CREDENTIAL_MISSING` 失败,指引信息按计费方式点名账号登录、模型页面与该引用,以及计费方式字段。已挂载、但其解析函数拒绝其设置的路由条目不视为不存在:需要该路由的操作未就绪,并在读取依赖该路由的凭据前以 `WEB_PROVIDER_MISCONFIGURED` 失败,不再尝试后续来源,也不发送请求,因此网关设置出错时请求不会被改发到官方端点。
账号凭据是 `ctx.deepseekAccount` 为请求端点释放的凭据,端点位于已挂载的 `deepseek-account` 路由通过 `ctx.llm.providerCredential()` 发布的基础地址的 origin 加 `/v1/tools` 下;没有该路由时使用 `DEEPSEEK_BASE_URL` 所指的 origin。HTTP 401 会作废该凭据。`auto` 计费在 `deepseek-account` 路由上,若该路由已挂载且释放出凭据,操作发送账号凭据。其他所有 `auto` 操作,包括账号会话中没有登录或没有凭据的操作,都把已挂载的 `deepseek-official` 路由发布的密钥(由该路由按其 `apiKeyEnv` 解析,其基础地址包含 `DEEPSEEK_BASE_URL`)发往该路由基础地址的 origin 加 `/v1/tools`;没有该路由时,把 `DEEPSEEK_API_KEY` 发往 `https://api.deepseek.com/v1/tools`。`auto` 计费在两个 DeepSeek 路由之外的路由上或会话之外,没有配置密钥的操作改为发送账号令牌,因此已登录但没有密钥的用户在其他模型提供方的会话中仍可使用网页工具;在 `deepseek-official` 路由上从不发送令牌,因为该会话按 API 密钥计费。未登录的账号会话发送 API 密钥,网页工具因此在其中仍然可用。因此只有 `DEEPSEEK_API_KEY` 的用户(包括所有 headless、SDK 与 ACP 运行)默认即可搜索和抓取,通过模型提供方基础地址设置的网关或内部部署也在同一 origin 上提供 Web 访问。缺少凭据时,该能力未就绪,操作以 `WEB_PROVIDER_CREDENTIAL_MISSING` 失败,指引信息按计费方式点名账号登录、模型页面与该引用,以及计费方式字段。已挂载但配置无法解析的路由不视为不存在:需要该路由的操作未就绪,并在读取依赖该路由的凭据前以 `WEB_PROVIDER_MISCONFIGURED` 失败,不再尝试后续来源,也不发送请求,因此网关设置出错时请求不会被改发到官方端点。
在 YAML 中设置了非空 `searchBaseURL` 或 `searchApiKeyEnv`(Fetch 为 `fetchBaseURL` 或 `fetchApiKeyEnv`)的能力,则无论计费方式如何,始终把其 `*ApiKeyEnv`(未设置时为 `DEEPSEEK_API_KEY`)下的密钥发往其 `*BaseURL`(未设置时为官方基础地址),从不发送账号令牌,因此内网或第三方端点只收到为它选择的密钥。每个能力有自己的字段,因为一个部署可以由不同网关提供搜索和抓取。这些字段只能在 YAML 中设置,空值视为未设置。schema 之外字段的已保存值,包括 `baseURL`、`apiKeyEnv` 和 `apiKey`,可以加载而不产生 schema 错误,且不生效。
`@deepseek-ai/dsh-llm-deepseek` 的[凭据函数](../../../../packages/llm/llm-deepseek/src/credential.ts)为 DeepSeek 模型路由、Messages 搜索以及 Search 与 Fetch API 读取并校验 API 密钥、检查密钥是否存在、取得账号令牌,因此每个 DeepSeek 请求都以同一方式读取凭据库;账号模型路由、Messages 搜索以及 Search 与 Fetch API 还会作废被 HTTP 401 拒绝的令牌。内置配置不需要按 profile 覆盖凭据,因为只要 `DEEPSEEK_API_KEY` 或 DeepSeek API 密钥路由有密钥,API 密钥路径就能工作。
DeepSeek 模型路由通过 `ctx.llm.providerCredential()` 发布自己发送的凭据([路由凭据](2026-11-10-llm-route-credential-seam.zh.md)):API 密钥路由发布其 `apiKeyEnv` 下的密钥,账号路由发布 `ctx.deepseekAccount` 为目标地址释放的凭据。Messages 搜索以及 Search 与 Fetch API 读取这些发布的凭据而不读取提供方配置,并通过 `dsh-credentials` 的引用函数读取 `DEEPSEEK_API_KEY` 和单独配置的密钥,因此每个 DeepSeek 请求都以同一方式读取凭据库;授权提供失效操作的凭据会在 HTTP 401 后被作废。内置配置不需要按 profile 覆盖凭据,因为只要 `DEEPSEEK_API_KEY` 或 DeepSeek API 密钥路由有密钥,API 密钥路径就能工作。
### 默认值与已保存的选择
@@ -27,8 +27,8 @@
en: 0676f301d5aec364
zh: 0ef43eba7bfe2f01
/agent-note-authentication-provider-integration/testing:
en: c783cb006f9962a4
zh: 79bf36b25665e49c
en: 378fd2b4f826a453
zh: bf53037b7bdaa44e
/agent-note-authentication-provider-integration/alternatives-considered:
en: 868953274abd81e8
zh: 1b2890de876a6db6
@@ -118,7 +118,7 @@ Desktop's parent owns a fresh private credential per Host process and delivers i
| Provider registration | Only built-in BrowserAuth supplied network identity | Ordered independent verifiers select one live Peer; scope unload, verifier failure, and cancellation are covered by [authentication tests](../../../../packages/client/connection/tests/authentication.host.spec.ts) |
| HTTP and upgrade integration | Consumers called Connection admission | Route auth supplies the Peer once; real [Provider transport tests](../../../../packages/api/gateway/tests/authentication-provider.host.spec.ts) exercise both carriers |
| Server isolation | Route tables were per instance; index injection was root-wide | All five events use the WebServer subject; [server](../../../../packages/host/webserver/tests/event-isolation.host.spec.ts) and [application](../../../../packages/bundle/web-app/tests/event-isolation.host.spec.ts) tests cover ordinary and global listeners and a preserved external Host |
| Browser OAuth return | The callback validated state and PKCE | The scoped pre-route callback retains validation and accepts real cross-site navigation; [account tests](../../../../packages/credentials/deepseek-account/tests/account.spec.ts) retain wrong-Host and SSH-forwarding coverage, and [Chromium](../../../../apps/web/tests/account-login.e2e.ts) asserts the actual Fetch Metadata header |
| Browser OAuth return | The callback validated state and PKCE | The scoped pre-route callback retains validation and accepts real cross-site navigation; [account tests](../../../../packages/account/deepseek-account/tests/account.spec.ts) retain wrong-Host and SSH-forwarding coverage, and [Chromium](../../../../apps/web/tests/account-login.e2e.ts) asserts the actual Fetch Metadata header |
| Startup output | WebApp printed/opened one Connection-produced login URL | [Startup tests](../../../../packages/bundle/web-app/tests/startup.host.spec.ts) cover ordered entries, first eligible opening, empty lists, readiness and SSH suppression |
| Desktop runtime consumers | A tokenized ready URL was exchanged for a Cookie | [Runtime smoke tests](../../../../apps/desktop/tests/smoke-runtime.spec.ts) use the private Cookie on the HTTP probes; [built Remote tests](../../../../packages/api/remotes/tests/built-lib.e2e.ts) collect the current Provider's entry and pass the admitted Peer |
@@ -118,7 +118,7 @@ Desktop 父进程为每个 Host 进程持有新私有凭据,并在 ready 前
| Provider 注册 | 只有内置 BrowserAuth 提供网络身份 | 有序独立验证器选择一个存活 Peer;[认证测试](../../../../packages/client/connection/tests/authentication.host.spec.ts)覆盖作用域卸载、验证故障和取消 |
| HTTP 与 upgrade 接入 | 消费者调用 Connection 准入 | 路由 auth 一次提供 Peer;真实 [Provider 传输测试](../../../../packages/api/gateway/tests/authentication-provider.host.spec.ts)覆盖两种载体 |
| 服务器隔离 | 路由表按实例持有,index 注入覆盖 root | 五个事件均使用 WebServer subject;[服务器](../../../../packages/host/webserver/tests/event-isolation.host.spec.ts)和[应用](../../../../packages/bundle/web-app/tests/event-isolation.host.spec.ts)测试覆盖普通/global 监听器及保留的外部 Host |
| 浏览器 OAuth 返回 | 回调校验 state 与 PKCE | 有作用域的前置回调保留校验,并接受真实跨站导航;[账号测试](../../../../packages/credentials/deepseek-account/tests/account.spec.ts)保留错误 Host 和 SSH 转发覆盖,[Chromium](../../../../apps/web/tests/account-login.e2e.ts)断言实际 Fetch Metadata header |
| 浏览器 OAuth 返回 | 回调校验 state 与 PKCE | 有作用域的前置回调保留校验,并接受真实跨站导航;[账号测试](../../../../packages/account/deepseek-account/tests/account.spec.ts)保留错误 Host 和 SSH 转发覆盖,[Chromium](../../../../apps/web/tests/account-login.e2e.ts)断言实际 Fetch Metadata header |
| 启动输出 | WebApp 打印/打开一个 Connection 生成的登录 URL | [启动测试](../../../../packages/bundle/web-app/tests/startup.host.spec.ts)覆盖按序入口、首个可打开项、空列表、就绪和 SSH 抑制 |
| Desktop runtime 消费者 | 以带 Token 的 ready URL 交换 Cookie | [Runtime smoke 测试](../../../../apps/desktop/tests/smoke-runtime.spec.ts)在 HTTP 探针中使用私有 Cookie;[产物 Remote 测试](../../../../packages/api/remotes/tests/built-lib.e2e.ts)收集当前 Provider 入口,并传递准入 Peer |
@@ -0,0 +1,19 @@
# Bilingual-pair consistency record for 2026-11-10-llm-route-credential-seam.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-11-10-llm-route-credential-seam.md
/agent-note-route-credentials-deepseek-model-routes-publish-the-credential-consumers-reuse:
en: d11883f28d5cdd99
zh: 860795ae4d93c317
/agent-note-route-credentials-deepseek-model-routes-publish-the-credential-consumers-reuse/problem:
en: 9665e1879893fe76
zh: 9da30ad0be6fc38d
/agent-note-route-credentials-deepseek-model-routes-publish-the-credential-consumers-reuse/decision:
en: aaa2d2c7202408d4
zh: 134987da042fd07b
/agent-note-route-credentials-deepseek-model-routes-publish-the-credential-consumers-reuse/alternatives-considered:
en: d6b2de393add9887
zh: b5351f9a49387bd6
/agent-note-route-credentials-deepseek-model-routes-publish-the-credential-consumers-reuse/consequences:
en: df942606f0d31fa5
zh: cb1f21dd7f60ab7f
@@ -0,0 +1,47 @@
# Agent Note: Route credentials - DeepSeek model routes publish the credential consumers reuse
Status: implemented
English | [中文](2026-11-10-llm-route-credential-seam.zh.md)
## Problem
Several packages shared one DeepSeek credential without an owner. `@deepseek-ai/dsh-llm-deepseek`, the protocol transport, exported helpers that read `ctx.credentials`, the launch environment, and `ctx.deepseekAccount`, so the transport depended on both credential services although it only sends the headers a route gives it. The two route plugins resolved their credentials through those helpers and threw their own missing-credential failures from inside `resolveAuth`. The Search and Fetch API providers re-derived each route's base URL and key reference from the Loader entry of the route package with that package's own config resolver, and Messages search hard-coded the account route id, so both web packages depended on `llm-deepseek`, on both route plugins, and on the Loader. The account service, which sits below every consumer, owned Agent cancellation after sign-out and lived in the `credentials/` group beside the credential store it only uses. A change to how one route authenticates touched the transport, both web providers, and their tests.
## Decision
`@deepseek-ai/dsh-llm` owns the Service Definition. `LlmAdapter.providerCredential(provider)` publishes a `ProviderCredential`: the route's `kind` (merge-extensible, with `api-key` and `account` declared), its resolved `baseURL`, an optional credential `reference` for diagnostics, `configured(endpoint)` for presence checks that neither validate the credential nor contact the destination, and `resolve(endpoint, signal)` returning a `ProviderCredentialGrant` with the protocol `headers`, the bare `value` for destinations that render it differently, an optional `reject()` for HTTP 401, and an optional `revoked` signal that aborts when the owner withdraws the credential while requests carry it. `LlmRuntime.providerCredential(provider)` forwards to the owning adapter; an unregistered route answers `undefined`, and a route whose configuration does not resolve propagates the adapter's failure. The adapter reads one configuration generation per call, as it does per model request.
`@deepseek-ai/dsh-llm-deepseek` reads no credential. `DeepSeekAdapterOptions.resolveAuth(connection, endpoint)` returns the grant or `undefined`; `missingCredential(connection, provider)` names the failure of a request without one, `MISSING_CREDENTIAL` by default; `credential` declares the published kind, reference, and presence check. The transport runs each model request and its file operations under the grant's `revoked` signal and hands the resulting failure to the provider's failure callback, which names it. The listing cache scopes by endpoint and a hash of the credential headers.
The route plugins own credentials. `llm-deepseek-api-key` reads its key through `resolveCredentialRef` and `credentialRefConfigured`, new in `@deepseek-ai/dsh-credentials`, which treat a mounted credentials service as authoritative and read the launch environment only without one; it publishes kind `api-key` with the `apiKeyEnv` reference and releases the key only for destinations under the origin of its base URL. `llm-deepseek-account` reads `ctx.deepseekAccount.resolveRequestCredential(endpoint)`, maps HTTP 401 to `ACCOUNT_TOKEN_INVALID` and quota failures to `ACCOUNT_QUOTA`, fails without a credential as `ACCOUNT_SIGN_IN_REQUIRED`, publishes kind `account`, and owns the sign-out policy: it cancels its running Agents on `deepseek-account/signed-out` and registers a running-task report with the account service. A request in flight at sign-out ends with its grant's `revoked` signal and fails as `ACCOUNT_SIGN_IN_REQUIRED`, and its failure callback cancels the same Agents, so a request that outlives the plugin still ends its turn with the signed-out cause.
`@deepseek-ai/dsh-deepseek-account` releases request credentials. `resolveRequestCredential(url)` returns the `x-dsh-auth-token` header, the bare token, a `reject()` that removes the grant while it still matches and contains storage failures, and a `revoked` signal the service aborts at each sign-out after the `deepseek-account/signed-out` listeners have returned; `registerRunningTaskReport(report)` feeds `hasRunningAccountTasks()`. The service inspects no Agents and depends on neither `dsh-agent` nor `dsh-llm`. The package lives in the `packages/account/` group under its unchanged name.
The web providers consume publications. `web-deepseek-api` builds each operation's ordered sources from `ctx.llm.providerCredential('deepseek-official')` and `providerCredential('deepseek-account')`: a route source sends an `api-key` grant's value as a bearer token and any other kind's headers unchanged, and invalidates through the grant's `reject()`. Under each route id it accepts only the kind that route publishes, `api-key` as `deepseek-official` and `account` as `deepseek-account`, so billing by route id never sends the other kind. Without the API-key route it reads `DEEPSEEK_API_KEY` through the reference helpers; without the account route it asks the account service for the origin `DEEPSEEK_BASE_URL` names. `web-search-deepseek` uses the account credential of the initiating Session's route when that route publishes kind `account` and the search endpoint has the origin of the route's base URL, and the reference helpers otherwise; it does not request an account credential published for another origin. Both web consumers contain a failed `reject()`, so the HTTP rejection stays the reported error for every credential kind. Both run their request under the grant's `revoked` signal and report a request it ended as `WEB_PROVIDER_ERROR` with sign-in guidance, keeping `WEB_ABORTED` for the caller's cancellation. Neither web package depends on `llm-deepseek`, the route plugins, or the Loader, and `web-search-deepseek` no longer depends on the account service.
## Alternatives considered
**A `deepseek-auth` package holding the credential seam.** The seam needs a Service Definition only, no Cordis service, and that one Definition role belongs beside `LlmAdapter`; a package for an interface adds a dependency without an owner of behavior.
**A credential fingerprint in the published credential.** Consumers only send requests, so they need headers and a value; cache scoping by credential is the adapter's own concern, which the listing cache meets by hashing the headers it sends.
**A `credentials-env` provider instead of reference helpers.** A provider that reads the environment would change which composition is authoritative for every consumer; the helpers keep the launch-environment fallback local to the consumers that need it, so such a provider remains an independent option.
**The account service's inference origin for the web fallback without the account route.** Routing that fallback through `DEEPSEEK_BASE_URL` keeps the keyless billing snapshot and every documented deployment unchanged; the account service still refuses every origin but its own.
**Moving the account package into `identity/`.** That group defines anonymous, user-independent ids; a signed-in account is the opposite, so it gets a group of its own.
**Keeping the route plugin's sign-out listener until its tasks end.** Unloading the route then waits for a running turn: disabling the plugin blocks, and every other settings write queues behind that reload, for as long as the turn runs.
**Cancelling the route's tasks when the route unloads.** A configuration reload or a plugin update would stop turns that no sign-out touched.
**Returning the sign-out policy to the account service.** The service would again inspect Agents and know route ids, the dependencies this decision removes.
**Keeping the route's listener or report registered after its plugin unloads.** A registration that outlives the plugin that made it breaks the rule that registrations are effects of their owner, and leaves code of an unloaded plugin running in another scope for as long as the task runs.
## Consequences
Adding a credential kind, or a consumer of a route's credential, touches one route plugin or one consumer, not the transport. The transport, the web providers, and the account service lose their cross-dependencies, and `hasRunningAccountTasks()` depends on a registered report rather than on Agents the account service can see. Consumers that construct `DeepSeekRequestAuth` supply a `value`; the removed helpers and the route plugins' config exports are gone, and the [upgrade guide](../../../../docs/upgrade-guide/v0.2.2-rc.3/llm-route-credential/guide.md) lists the replacements. A route's configuration failure reaches web consumers through `providerCredential()` as a thrown error, which they report as `WEB_PROVIDER_MISCONFIGURED`.
A sign-out ends the in-flight model, Files, Search, and Fetch requests that carry the account token, including requests no Agent turn owns, such as a model request outside a turn or an account-billed web search; the account listing request keeps its own deadline. The signal supplements the Agent cancellation of the [account sign-out decision](2026-09-17-account-provider-signout.md), which rejected a login-level signal as a duplicate of that chain: the chain reaches a request only through a mounted listener and a running Agent turn. While the account route is disabled, a task it started that still runs is not reported to the sign-out confirmation, and a sign-out ends it only through a model request in flight. A credential released by an account service that has since been replaced is not withdrawn by the replacement's sign-out; the route plugin's listener still cancels Agent turns.
@@ -0,0 +1,47 @@
# Agent Note: Route credentials - DeepSeek model routes publish the credential consumers reuse
Status: implemented
[English](2026-11-10-llm-route-credential-seam.md) | 中文
## 问题
多个包共用同一份 DeepSeek 凭据,却没有所有者。协议传输层 `@deepseek-ai/dsh-llm-deepseek` 导出读取 `ctx.credentials`、启动环境和 `ctx.deepseekAccount` 的辅助函数,因此尽管传输层只发送路由交给它的请求头,它仍依赖两个凭据服务。两个路由插件通过这些函数解析凭据,并在 `resolveAuth` 内部抛出各自的凭据缺失错误。Search 与 Fetch API 提供方用路由包自己的配置解析函数,从路由包的 Loader 条目重新推导每条路由的基础地址和密钥引用,Messages 搜索则硬编码账号路由 id,因此两个 Web 包都依赖 `llm-deepseek`、两个路由插件和 Loader。位于所有消费方之下的账号服务拥有退登后的 Agent 取消逻辑,并和它仅仅使用的凭据库一起放在 `credentials/` 组。改变一条路由的鉴权方式要同时触及传输层、两个 Web 提供方及其测试。
## 决策
`@deepseek-ai/dsh-llm` 拥有 Service Definition。`LlmAdapter.providerCredential(provider)` 发布一个 `ProviderCredential`:路由的 `kind`(可合并扩展,已声明 `api-key` 与 `account`)、解析后的 `baseURL`、用于诊断的可选凭据 `reference`、不校验凭据、不联系目的地的存在性检查 `configured(endpoint)`,以及返回 `ProviderCredentialGrant` 的 `resolve(endpoint, signal)`;授权包含协议 `headers`、供以其他方式呈现凭据的目标使用的裸 `value`、可选的 HTTP 401 `reject()`,以及可选的 `revoked` 信号;所有者在请求仍携带凭据时撤回凭据,该信号即中止。`LlmRuntime.providerCredential(provider)` 转发给拥有该路由的适配器;未注册的路由回答 `undefined`,配置无法解析的路由则传播适配器的失败。适配器每次调用读取一代配置,与每次模型请求相同。
`@deepseek-ai/dsh-llm-deepseek` 不读取任何凭据。`DeepSeekAdapterOptions.resolveAuth(connection, endpoint)` 返回授权或 `undefined`;`missingCredential(connection, provider)` 命名没有凭据时请求的失败,默认为 `MISSING_CREDENTIAL`;`credential` 声明发布的种类、引用和存在性检查。传输层让每次模型请求及其文件操作受授权的 `revoked` 信号约束,并把由此产生的失败交给提供方的失败回调命名。列表缓存以端点和凭据请求头的哈希划分作用域。
路由插件拥有凭据。`llm-deepseek-api-key` 通过 `@deepseek-ai/dsh-credentials` 新增的 `resolveCredentialRef` 和 `credentialRefConfigured` 读取密钥,二者把已挂载的凭据服务视为权威,仅在没有该服务时读取启动环境;它发布种类 `api-key` 并附带 `apiKeyEnv` 引用,且只对其基础地址所在 origin 下的目的地释放密钥。`llm-deepseek-account` 读取 `ctx.deepseekAccount.resolveRequestCredential(endpoint)`,把 HTTP 401 映射为 `ACCOUNT_TOKEN_INVALID`、配额失败映射为 `ACCOUNT_QUOTA`,没有凭据时以 `ACCOUNT_SIGN_IN_REQUIRED` 失败,发布种类 `account`,并拥有退登策略:在 `deepseek-account/signed-out` 时取消其运行中的 Agent,并向账号服务注册运行中任务报告。退登时在途的请求随其授权的 `revoked` 信号结束,以 `ACCOUNT_SIGN_IN_REQUIRED` 失败;它的失败回调会取消同一批 Agent,因此比插件存活更久的请求仍会以退登原因结束其回合。
`@deepseek-ai/dsh-deepseek-account` 释放请求凭据。`resolveRequestCredential(url)` 返回 `x-dsh-auth-token` 请求头、裸 token、`reject()` 和 `revoked` 信号;`reject()` 仅在授权仍一致时删除它并隔离存储失败,`revoked` 由服务在每次退登时、`deepseek-account/signed-out` 的监听器返回之后中止。`registerRunningTaskReport(report)` 为 `hasRunningAccountTasks()` 提供答案。该服务不检查任何 Agent,也不依赖 `dsh-agent` 或 `dsh-llm`。包以不变的名字位于 `packages/account/` 组。
Web 提供方消费这些发布的凭据。`web-deepseek-api` 从 `ctx.llm.providerCredential('deepseek-official')` 和 `providerCredential('deepseek-account')` 构造每次操作的有序凭据来源:路由来源把 `api-key` 授权的值作为 Bearer 令牌发送,其他种类的请求头原样发送,并通过授权的 `reject()` 作废。每个路由 id 下只接受该路由发布的种类(`deepseek-official` 下为 `api-key`,`deepseek-account` 下为 `account`),因此按路由 id 计费不会发出另一种凭据。没有 API 密钥路由时,它通过引用函数读取 `DEEPSEEK_API_KEY`;没有账号路由时,它向账号服务索取发往 `DEEPSEEK_BASE_URL` 所指 origin 的凭据。`web-search-deepseek` 在发起会话的路由发布 `account` 种类且搜索端点与该路由的基础地址同源时使用其账号凭据,否则使用引用函数;为其他 origin 发布的账号凭据不会被索取。两个 Web 消费方都会隔离失败的 `reject()`,因此对任何凭据种类,报告的都是 HTTP 拒绝。二者都让请求受授权的 `revoked` 信号约束,把被它结束的请求报告为带登录指引的 `WEB_PROVIDER_ERROR`,`WEB_ABORTED` 仍只表示调用方取消。两个 Web 包都不再依赖 `llm-deepseek`、路由插件或 Loader,`web-search-deepseek` 也不再依赖账号服务。
## 考虑过的替代方案
**用一个 `deepseek-auth` 包承载凭据 seam。** 该 seam 只需要 Service Definition,不需要 Cordis 服务,而这一个 Definition 角色应与 `LlmAdapter` 放在一起;为一个接口建包只会增加一个没有行为所有者的依赖。
**在发布的凭据中加入凭据指纹。** 消费方只负责发送请求,因此只需要请求头和值;按凭据划分缓存作用域是适配器自己的事,列表缓存通过哈希它发送的请求头即可满足。
**用 `credentials-env` 提供方代替引用函数。** 读取环境的提供方会改变每个消费方眼中哪个组合具有权威性;引用函数把启动环境后备保留在需要它的消费方本地,使这样的提供方仍是独立的选项。
**没有账号路由时的 Web 后备使用账号服务的推理 origin。** 让该后备经由 `DEEPSEEK_BASE_URL` 可保持无密钥计费快照和所有已记录部署不变;账号服务仍拒绝除自身 origin 以外的一切来源。
**把账号包并入 `identity/`。** 该组定义匿名、不识别用户的 id;已登录账号与之相反,因此单独成组。
**让路由插件的退登监听保留到其任务结束。** 这样卸载路由要等待运行中的回合:停用插件会被阻塞,其他设置写入也排在这次重载之后,直到回合结束。
**路由卸载时取消其任务。** 配置重载或插件更新会停掉与退登无关的回合。
**把退登策略放回账号服务。** 账号服务将重新检查 Agent 并认识路由 id,而这正是本决策去掉的依赖。
**插件卸载后仍保留路由的监听或报告注册。** 比注册它的插件存活更久的注册违反“注册是其所有者的 effect”这一规则,并让已卸载插件的代码在任务运行期间留在其他作用域里。
## 后果
新增凭据种类或路由凭据的消费方只触及一个路由插件或一个消费方,而不是传输层。传输层、Web 提供方和账号服务之间的交叉依赖消失,`hasRunningAccountTasks()` 依赖注册的报告而非账号服务可见的 Agent。构造 `DeepSeekRequestAuth` 的消费方需提供 `value`;被移除的辅助函数和路由插件的配置导出不复存在,[升级指南](../../../../docs/upgrade-guide/v0.2.2-rc.3/llm-route-credential/guide.zh.md)列出了替代方案。路由的配置失败通过 `providerCredential()` 以抛出错误的形式到达 Web 消费方,它们将其报告为 `WEB_PROVIDER_MISCONFIGURED`。
退登会结束携带账号 token 的在途模型、Files、Search 与 Fetch 请求,包括不属于任何 Agent 回合的请求,例如回合之外的模型请求或按账号计费的 Web 搜索;账号列表请求仍只受自身期限约束。该信号是对[账号退登决策](2026-09-17-account-provider-signout.zh.md)中 Agent 取消链路的补充;那份决策以重复该链路为由否决了登录级信号,而该链路只能经由已挂载的监听和运行中的 Agent 回合到达请求。账号路由被停用期间,它此前启动且仍在运行的任务不会报告给退登确认,退登也只能通过在途的模型请求结束它。已被替换的账号服务释放的凭据不会被替换后服务的退登撤回;路由插件的监听仍会取消 Agent 回合。
@@ -27,8 +27,8 @@
en: 0dcc97d8105fab60
zh: d80d40ae3a0c601d
/agent-note-direct-deepseek-search-and-fetch-apis/alternatives-considered:
en: 907e0b8424943d43
zh: f45e583e7cb4eb63
en: 021a4b08ad534b36
zh: e98e1f65e50a568b
/agent-note-direct-deepseek-search-and-fetch-apis/consequences:
en: 7ec21c5b1124e5f8
zh: af769dbdb4face9f
@@ -52,7 +52,7 @@ The independent `dsh-web-search-deepseek` provider sends Messages search request
**Keep the APIs inside the Messages provider behind a provider-local switch.** A switch inside the Messages provider cannot change fetch routing, so `web_fetch` would stay on HTTP unless the user also edited `web.fetchProvider`; it also ties the APIs' lifecycle to Messages search. Separate registrations let the web service's existing selection choose each provider, without coupling either API to the Messages provider.
**Share one transport between Messages search and the new APIs.** A shared web transport would couple different request formats and failure mappings. Credential values instead come from the shared [`llm-deepseek` credential helpers](../../../../packages/llm/llm-deepseek/src/credential.ts); Messages search and the Search/Fetch API transports remain independent.
**Share one transport between Messages search and the new APIs.** A shared web transport would couple different request formats and failure mappings. Credential values instead come from the credentials the model routes publish through `ctx.llm.providerCredential()` and from the `dsh-credentials` reference helpers; Messages search and the Search/Fetch API transports remain independent.
**Split Search and Fetch into separate packages.** The guide serves both APIs from one base with one credential; separate packages would duplicate settings that address one deployment. Independent selection does not require separate packages, because each API registers its own provider id. Each operation lives in its own module, so either API can change without the other.
@@ -52,7 +52,7 @@ HTTP 提供方继续负责自身的 URL 校验和资源限制。选择 DeepSeek
**把两个 API 放在 Messages 提供方内部,由提供方自己的开关切换。** Messages 提供方内的开关无法改变抓取路由,因此除非用户另外修改 `web.fetchProvider`,`web_fetch` 仍会走 HTTP;它还会把两个 API 的生命周期绑在 Messages 搜索上。独立注册让 Web 服务通过现有的提供方选择机制选择各个提供方,不会把任一 API 与 Messages 提供方绑定。
**让 Messages 搜索与新 API 共用一套传输层。** 共享 Web 传输层会耦合不同的请求格式和失败映射。凭据值改为通过共享的 [`llm-deepseek` 凭据函数](../../../../packages/llm/llm-deepseek/src/credential.ts)获取;Messages 搜索与 Search/Fetch API 传输层保持独立。
**让 Messages 搜索与新 API 共用一套传输层。** 共享 Web 传输层会耦合不同的请求格式和失败映射。凭据值改为来自模型路由通过 `ctx.llm.providerCredential()` 发布的凭据以及 `dsh-credentials` 的引用函数;Messages 搜索与 Search/Fetch API 传输层保持独立。
**把 Search 和 Fetch 拆成两个包。** 指南从同一基础地址、以同一份凭据提供两个 API;拆成两个包会让指向同一部署的设置重复出现。分别选择不需要拆包,因为每个 API 注册自己的提供方 id。每种操作位于独立模块,任一 API 都可以单独修改。
@@ -21,8 +21,8 @@
en: 8a9578bbc700c0bf
zh: 8ee46e5ef1cf3972
/agent-note-keep-cleanup-dependencies-usable-until-consumers-finish/p0-findings/authorization-loses-required-observation-or-an-accepted-credential-write:
en: c6b0d746185d0d3b
zh: a228633ecdf42800
en: 0532e871788d6ef7
zh: 75131f43216bd05f
/agent-note-keep-cleanup-dependencies-usable-until-consumers-finish/p0-findings/ssh-disables-cleanup-requests-before-dependent-process-cleanup-finishes:
en: 85fb2b564bc40230
zh: 97c3e794124f8044
@@ -36,7 +36,7 @@ A focused in-memory experiment using the actual Cordis and storage-domain implem
### Authorization loses required observation or an accepted credential write
**Owners and evidence.** Authorization's [commit observer (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts) is a caller-owned `ctx.on` effect. Its [commit operation (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts) awaits credential storage, while [success requires the observed update (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts). The account service [leaves committing attempts un-aborted and awaits their completion (`DeepSeekAccount`)](../../../../packages/credentials/deepseek-account/src/index.ts).
**Owners and evidence.** Authorization's [commit observer (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts) is a caller-owned `ctx.on` effect. Its [commit operation (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts) awaits credential storage, while [success requires the observed update (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts). The account service [leaves committing attempts un-aborted and awaits their completion (`DeepSeekAccount`)](../../../../packages/account/deepseek-account/src/index.ts).
**Successful write, false failure.** Pause a credential write, dispose the account consumer, then complete the write and emit its update. The observer can auto-unsubscribe alongside the account's drain; Authorization then rejects with `NOT_COMMITTED` despite successful storage. Keep observation owned by the operation until its result settles, or acknowledge successful `session.commit` directly while giving legacy direct-write observation an explicit lifetime. A focused experiment using actual Cordis and Authorization with a deferred in-memory credential provider reproduced `NOT_COMMITTED` after the provider write succeeded; the complete browser sign-in path is source-traced.
@@ -36,7 +36,7 @@ Status: proposed
### Authorization 丢失必需的提交观察或已接受的凭据写入
**所有者与证据。** Authorization 的[提交观察器 (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts)是调用方拥有的 `ctx.on` effect。[提交操作 (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts)等待凭据存储,而[成功要求观察到更新 (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts)。账号服务[不会中止正在提交的尝试,并等待其完成 (`DeepSeekAccount`)](../../../../packages/credentials/deepseek-account/src/index.ts)。
**所有者与证据。** Authorization 的[提交观察器 (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts)是调用方拥有的 `ctx.on` effect。[提交操作 (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts)等待凭据存储,而[成功要求观察到更新 (`AuthorizationService.attempt`)](../../../../packages/credentials/authorization/src/index.ts)。账号服务[不会中止正在提交的尝试,并等待其完成 (`DeepSeekAccount`)](../../../../packages/account/deepseek-account/src/index.ts)。
**写入成功,却报告失败。** 暂停凭据写入,释放账号消费者,再完成写入并发出更新。观察器可以与账号的排空并发自动退订;随后 Authorization 即使存储成功也会以 `NOT_COMMITTED` 拒绝。应让操作拥有观察器直到结果确定,或直接确认成功的 `session.commit`,同时给旧式直接写入观察明确的生命周期。使用实际 Cordis 与 Authorization、配合延迟的内存凭据 provider 的实验,复现了 provider 写入成功后返回 `NOT_COMMITTED`;完整浏览器登录路径由源码追踪确认。
+1
View File
@@ -58,6 +58,7 @@ packages/ @deepseek-ai/dsh-<pkg> workspaces at packages/<group>/<pkg>/
identity/ anonymous identity
settings/ user settings
credentials/ credentials/authorization
account/ DeepSeek
acp/ automation-only ACP
interaction/ human interaction
boot/ application boot
@@ -9,7 +9,7 @@
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash","contextWindow":1000000}}}
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"say pong","messageSeqs":[8],"source":{"kind":"fallback"}}}}
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.\nIf the messages give little to name, still return a short best-effort title, such as Greeting, instead of explaining.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"say pong\"}]"}],"source":{"kind":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":4096,"reasoningEffort":"off"}}}
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/attempt","seq":14,"time":0,"data":{"turn":1,"step":1,"stream":[{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"error","failure":{"message":"llm-deepseek: the API key resolved from DEEPSEEK_API_KEY contains characters no HTTP header can carry; set DEEPSEEK_API_KEY to the raw key alone (the web Models page writes it)","code":"INVALID_CREDENTIAL"}}}}]}}}
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/attempt","seq":14,"time":0,"data":{"turn":1,"step":1,"stream":[{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"error","failure":{"message":"llm-deepseek-keyless: the API key resolved from DEEPSEEK_API_KEY contains characters no HTTP header can carry; set DEEPSEEK_API_KEY to the raw key alone (the web Models page writes it)","code":"INVALID_CREDENTIAL"}}}}]}}}
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/end","seq":15,"time":0,"data":{"turn":1,"step":1}}}
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/end","seq":16,"time":0,"data":{"turn":1,"reason":{"kind":"error","error":{"message":"llm-deepseek: the API key resolved from DEEPSEEK_API_KEY contains characters no HTTP header can carry; set DEEPSEEK_API_KEY to the raw key alone (the web Models page writes it)","code":"INVALID_CREDENTIAL"}}}}}
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/end","seq":16,"time":0,"data":{"turn":1,"reason":{"kind":"error","error":{"message":"llm-deepseek-keyless: the API key resolved from DEEPSEEK_API_KEY contains characters no HTTP header can carry; set DEEPSEEK_API_KEY to the raw key alone (the web Models page writes it)","code":"INVALID_CREDENTIAL"}}}}}
{"type":"result","sessionId":"{{sessionId}}","output":""}
+1 -1
View File
@@ -27,7 +27,7 @@
"path": "../../packages/host/webserver"
},
{
"path": "../../packages/credentials/deepseek-account"
"path": "../../packages/account/deepseek-account"
},
{
"path": "../../packages/boot/plugin-manager"
+2 -2
View File
@@ -15,8 +15,8 @@
en: 127ea90553cb6af7
zh: 7b1c5aec8558c684
/deepseek-harness-desktop/application-overview:
en: 8b2a35655a384403
zh: 8cb7c8138cae59db
en: 7414f87908fbffaf
zh: 8ff4fc1d83879c25
/deepseek-harness-desktop/terminal-command:
en: 5f2d25a1d8472647
zh: 2acb5c5d7d1917e2
+1 -1
View File
@@ -51,7 +51,7 @@ Desktop ships one pnpm distribution at `resources/runtime/primary-runtime/depend
Embedded Platform documents use a persistent WebContentsView partition keyed by a hash of the Platform origin and stable account ID. localStorage preferences, including dismissed notices, survive view closure and application restart; different accounts and origins use separate storage. The Host supplies the account ID from its latest successful profile read; while no ID is known, the document opens in a disposable partition that keeps no preference across opens. Opening a persistent partition clears cookies, filesystem, IndexedDB, Cache Storage, the HTTP and shader caches, service workers, and HTTP authentication before the document loads; a disposable partition clears all of its storage. Closing a view destroys the document, removes its request interceptors, and schedules the same cleanup, so authentication left by an unclean exit is cleared before the next document loads. The next open and application shutdown await that cleanup, and an update install waits for it before the installer takes over the exit. A failed cleanup rejects that open and blocks the same account until a later cleanup succeeds; other accounts keep opening. Sign-out destroys the document but retains account-scoped preferences for the next sign-in. A document already open in a disposable partition stays mounted when the account ID arrives for the same credential; the next open uses the account-scoped partition. The [storage decision](../../.agents/notes/implemented/architecture/2026-09-22-platform-browser-storage.md) describes the retention policy. Host sends account credentials through private Node IPC; account RPC and the Harness renderer receive no token. Before page scripts execute, the Platform preload performs one synchronous IPC to read the prepared main-process credential. It exposes displayMode, synchronous getAuthToken() and getLocale() getters, and onLocaleChange(listener), which returns an unsubscribe function. Both getters read preload memory without further IPC. The bootstrap includes the resolved Desktop language (`zh_CN` or `en_US`); Settings language changes update the preload cache and notify the open Platform document without reloading. Platform applies this language before its first render and does not persist it as a browser preference. The main-process handler performs only sender validation and an in-memory read; it never waits for Host, disk, or network. Trusted-page initialization failures retain embedded mode and make the getter throw, preventing browser-credential fallback. Only the owned Platform main frame on the configured issuer origin can initialize. Sign-out, credential replacement, Host shutdown, and view closure destroy the document. Cross-origin document navigation is blocked. HTTPS links requesting a new window open in the system browser without the embedded session or token; other schemes and URL credentials are rejected. Native views occupy the viewport below the Account feature’s return bar.
Desktop Host Platform API requests and update-policy requests identify the installed client with the same Platform client headers: platform, client version, locale, timezone offset in seconds, and a bundle id that is intentionally empty. Account operations take the calling UI's identity per call; the account provider owns [API-only header configuration](../../packages/credentials/deepseek-account/README.md#use-this-package). Update policy additionally reports architecture, update channel, and bundled runtime version. The native account-state decoder accepts `no-response` sign-in failures and preserves the error code in the UI-safe projection.
Desktop Host Platform API requests and update-policy requests identify the installed client with the same Platform client headers: platform, client version, locale, timezone offset in seconds, and a bundle id that is intentionally empty. Account operations take the calling UI's identity per call; the account provider owns [API-only header configuration](../../packages/account/deepseek-account/README.md#use-this-package). Update policy additionally reports architecture, update channel, and bundled runtime version. The native account-state decoder accepts `no-response` sign-in failures and preserves the error code in the UI-safe projection.
A server-expired account credential returns to Welcome when no official API key is configured; an available API key keeps the workspace open. Explicit sign-out follows the same rule. Both Welcome and the workspace display the localized expiry notice.
+1 -1
View File
@@ -51,7 +51,7 @@ Desktop 在 `resources/runtime/primary-runtime/dependencies/pnpm` 中携带一
Platform 内嵌文档使用持久化 WebContentsView 分区,分区名由 Platform 来源和稳定账号 ID 的哈希决定。localStorage 中的页面偏好(包括已关闭的通知)在关闭视图和重启应用后保留;不同账号和来源使用独立存储。账号 ID 来自 Host 最近一次成功的资料读取;尚无该 ID 时,文档在一次性分区中打开,该分区不跨次保留偏好。打开持久分区会先清理 Cookie、文件系统、IndexedDB、Cache Storage、HTTP 与着色器缓存、Service Worker 及 HTTP 认证状态;一次性分区则清理其全部存储。关闭视图会销毁文档、移除请求拦截器并安排相同的清理,因此异常退出遗留的认证会在下一个文档加载前被清除。下次打开和应用退出都会等待该清理完成,更新安装也会在安装器接管退出前等待。清理失败会使该次打开失败,并在后续清理成功前阻止同一账号打开;其他账号不受影响。退出登录会销毁文档,但保留账号偏好供下次登录使用。同一凭证下账号 ID 迟到时,已以一次性分区打开的文档保持挂载;下次打开使用账号分区。[存储决策](../../.agents/notes/implemented/architecture/2026-09-22-platform-browser-storage.zh.md)说明保留策略。Host 通过私有 Node IPC 发送账号凭证;账号 RPC 和 Harness 渲染进程不接收 token。Platform preload 在页面脚本执行前通过一次同步 IPC 读取主进程中已准备的凭证。它暴露 displayMode、同步的 getAuthToken() 和 getLocale() getter,以及返回取消订阅函数的 onLocaleChange(listener)。两个 getter 都只读取 preload 内存,不再调用 IPC。bootstrap 包含 Desktop 已解析的语言(`zh_CN` 或 `en_US`);Settings 语言变更会更新 preload 缓存并通知已打开的 Platform 文档,无需重载。Platform 在首屏渲染前应用该语言,且不将其持久化为浏览器偏好。主进程处理器仅校验调用来源并读取内存,不等待 Host、磁盘或网络。可信页面初始化失败时保留内嵌模式,由 getter 抛错,避免回退到浏览器凭证。只有受控 Platform 页面中、位于所配置签发来源的主 frame 能完成初始化。退登、凭证替换、Host 关闭及视图关闭都会销毁文档。跨来源文档导航被阻止。请求新窗口的 HTTPS 链接在系统浏览器中打开,不携带内嵌会话或 token;其他协议及带 URL 凭证的链接被拒绝。原生视图占据 Account 功能返回栏下方的视口。
Desktop Host 的 Platform API 请求与更新策略请求用相同的 Platform 客户端请求头标识已安装客户端:平台、客户端版本、语言、以秒为单位的时区偏移,以及有意保持为空的 bundle id。账号操作按调用逐次传入调用界面的身份;账号 provider 管理[仅 API 使用的请求头配置](../../packages/credentials/deepseek-account/README.zh.md#use-this-package)。更新策略额外上报架构、更新通道和内置运行时版本。 原生账号状态解析器接受 `no-response` 登录失败,并在供 UI 使用的安全投影中保留该错误码。
Desktop Host 的 Platform API 请求与更新策略请求用相同的 Platform 客户端请求头标识已安装客户端:平台、客户端版本、语言、以秒为单位的时区偏移,以及有意保持为空的 bundle id。账号操作按调用逐次传入调用界面的身份;账号 provider 管理[仅 API 使用的请求头配置](../../packages/account/deepseek-account/README.zh.md#use-this-package)。更新策略额外上报架构、更新通道和内置运行时版本。 原生账号状态解析器接受 `no-response` 登录失败,并在供 UI 使用的安全投影中保留该错误码。
账号凭据被服务端判定失效后,未配置官方 API key 时返回 Welcome;有可用 API key 时保持工作区打开。主动退出登录遵循相同规则。Welcome 和工作区均显示本地化的登录失效提示。
+1 -1
View File
@@ -14,7 +14,7 @@
"path": "../../packages/client/ui-primitives"
},
{
"path": "../../packages/credentials/deepseek-account"
"path": "../../packages/account/deepseek-account"
},
{
"path": "../../packages/client/product-analytics/tsconfig.client.json"
+1 -1
View File
@@ -18,7 +18,7 @@
"path": "../../packages/util/home-paths"
},
{
"path": "../../packages/credentials/deepseek-account"
"path": "../../packages/account/deepseek-account"
},
{
"path": "../../packages/api/gateway/tsconfig.host.json"
+6 -2
View File
@@ -142,8 +142,12 @@ it.skipIf(MODE === 'record')('reuses saved native Account Flash translations acr
const account = scaffold.ctx.get('deepseekAccount')
if (account === undefined) throw new Error('Shipped native Account service is absent')
// Only credential acquisition is nondeterministic; the Loader-owned native route and wire remain real.
const auth = vi.spyOn(account, 'resolveToken').mockImplementation(async (url: string) =>
new URL(url).origin === origin ? 'paid-browser-fixture-token' : undefined)
const credential = {
headers: { 'x-dsh-auth-token': 'paid-browser-fixture-token' }, value: 'paid-browser-fixture-token',
revoked: new AbortController().signal, reject: () => Promise.resolve(),
}
const auth = vi.spyOn(account, 'resolveRequestCredential').mockImplementation(async (url: string) =>
new URL(url).origin === origin ? credential : undefined)
resources.restoreAuth = () => { auth.mockRestore() }
scaffold.ctx.emit('llm/adapters-updated')
const owner = [...scaffold.ctx.loader.entries()].find(entry => entry.options.id === 'llm-deepseek-account')
+2 -2
View File
@@ -6,5 +6,5 @@
en: 41d772192075e133
zh: 5ef3da69b4de1d8a
/capability-seams-and-core-services:
en: 5b3db3a295148bda
zh: 602328f72f9c1437
en: 15d626593d746219
zh: 332d2135597249b8
+14 -7
View File
@@ -94,6 +94,8 @@ flowchart LR
pkg_llm_replay["llm-replay"]
pkg_agent_loop["agent-loop"]
pkg_compaction_basic["compaction-basic"]
pkg_web_deepseek_api["web-deepseek-api"]
pkg_web_search_deepseek["web-search-deepseek"]
pkg_session_log_deepseek["session-log-deepseek"]
svc_sessionLogDeepSeek["ctx.sessionLogDeepSeek<br/>Session-log upload policy"]
pkg_deepseek_llm_api_extensions["deepseek-llm-api-extensions"]
@@ -151,8 +153,10 @@ flowchart LR
pkg_credentials["credentials"]
svc_credentials["ctx.credentials<br/>Credential seam"]
pkg_credentials_local["credentials-local"]
pkg_llm_deepseek_api_key["llm-deepseek-api-key"]
pkg_deepseek_account["deepseek-account"]
svc_deepseekAccount["ctx.deepseekAccount<br/>DeepSeek account"]
pkg_llm_deepseek_account["llm-deepseek-account"]
pkg_authorization["authorization"]
svc_authorization["ctx.authorization<br/>Authorization flow registry"]
pkg_client_product_analytics["client-product-analytics"]
@@ -292,8 +296,6 @@ flowchart LR
pkg_tool_jobs["tool-jobs"]
pkg_web["web"]
svc_web["ctx.web<br/>Web access provider registry"]
pkg_web_search_deepseek["web-search-deepseek"]
pkg_web_deepseek_api["web-deepseek-api"]
pkg_web_fetch_http["web-fetch-http"]
pkg_spill["spill"]
svc_spillStore["ctx.spillStore<br/>Spill storage seam"]
@@ -530,11 +532,14 @@ flowchart LR
svc_connection_authentication --> pkg_client_connection
svc_cordisInspect --> pkg_tool_cordis
svc_credentials --> pkg_api_settings_controller
svc_credentials --> pkg_llm_deepseek
svc_credentials --> pkg_llm_deepseek_api_key
svc_credentials --> pkg_llm_pi_ai
svc_credentials --> pkg_web_deepseek_api
svc_credentials --> pkg_web_search_deepseek
svc_cuaAccess --> pkg_cua
svc_cuaPrograms --> pkg_cua_mcp
svc_deepseekAccount --> pkg_llm_deepseek
svc_deepseekAccount --> pkg_llm_deepseek_account
svc_deepseekAccount --> pkg_web_deepseek_api
svc_deepseekLlmApiExtensions --> pkg_llm_deepseek
svc_directoryPicker --> pkg_api_workspace_controller
svc_dynamicCordisRunner --> pkg_tool_cordis
@@ -553,6 +558,8 @@ flowchart LR
svc_jobs --> pkg_tool_terminal
svc_llm --> pkg_agent_loop
svc_llm --> pkg_compaction_basic
svc_llm --> pkg_web_deepseek_api
svc_llm --> pkg_web_search_deepseek
svc_lsp --> pkg_tool_lsp
svc_mcpResources --> pkg_mcp_resources
svc_officeKit --> pkg_client_ui_sidebar_documentpreview
@@ -697,7 +704,7 @@ flowchart LR
| `ctx.officeKit` | `core` | [`office-kit`](../packages/document/office-kit) | - | [`client-ui-sidebar-documentpreview`](../packages/client/ui-sidebar-documentpreview), [`tool-office`](../packages/document/tool-office) | - | Authorized Office bytes are rendered as PDFs or images, converted, or recalculated on the Host using the declared native target engine, or Node WASM when no native target is declared. |
| `ctx.attachments` | `seam` | [`attachment`](../packages/attachment/attachment) | [`attachment-local`](../packages/attachment/attachment-local) | [`api-session-controller`](../packages/api/session-controller), [`tool-fs`](../packages/fs/tool-fs), [`llm-pi-ai`](../packages/llm/llm-pi-ai), [`llm-deepseek`](../packages/llm/llm-deepseek) | - | The host commits accepted images before session events; provider adapters resolve authorized durable references into provider-native content. |
| `ctx.fileUploads` | `core` | [`client-file-upload`](../packages/client/file-upload) | - | [`api-session-controller`](../packages/api/session-controller) | - | Owns streaming intake, durable storage, and staged receipt lifetime; the Session controller binds receipts to accepted submissions. |
| `ctx.llm` | `seam` | [`llm`](../packages/llm/llm) | [`llm-deepseek`](../packages/llm/llm-deepseek), [`llm-pi-ai`](../packages/llm/llm-pi-ai), [`llm-replay`](../packages/test-support/llm-replay) | [`agent-loop`](../packages/core/agent-loop), [`compaction-basic`](../packages/compaction/compaction-basic) | - | Adapters register provider implementations; the loop and compaction call the provider-neutral stream service. |
| `ctx.llm` | `seam` | [`llm`](../packages/llm/llm) | [`llm-deepseek`](../packages/llm/llm-deepseek), [`llm-pi-ai`](../packages/llm/llm-pi-ai), [`llm-replay`](../packages/test-support/llm-replay) | [`agent-loop`](../packages/core/agent-loop), [`compaction-basic`](../packages/compaction/compaction-basic), [`web-deepseek-api`](../packages/web/web-deepseek-api), [`web-search-deepseek`](../packages/web/web-search-deepseek) | - | Adapters register provider implementations; the loop and compaction call the provider-neutral stream service, and the DeepSeek web providers read the credential a route publishes. |
| `ctx.sessionLogDeepSeek` | `core` | [`session-log-deepseek`](../packages/session/session-log-deepseek) | - | - | - | Plugins register caller-owned exclusions before the canonical Session-log request contribution is prepared; unmatched requests use normal upload eligibility. |
| `ctx.deepseekLlmApiExtensions` | `seam` | [`deepseek-llm-api-extensions`](../packages/llm/deepseek-llm-api-extensions) | [`session-log-deepseek`](../packages/session/session-log-deepseek), [`plugin-package-inventory-deepseek`](../packages/llm/plugin-package-inventory-deepseek) | [`llm-deepseek`](../packages/llm/llm-deepseek) | - | Plugins prepare independent top-level fields; the official adapter merges them and commits their delivery state after HTTP acceptance. |
| `ctx.tokenMeter` | `core` | [`token-meter`](../packages/llm/token-meter) | - | [`compaction-basic`](../packages/compaction/compaction-basic) | - | Owns isolated per-session replay folds; pressure consumers share immutable revisioned measurements. |
@@ -723,8 +730,8 @@ flowchart LR
| `ctx.configEditor` | `core` | [`config-editor`](../packages/boot/config-editor) | - | [`settings`](../packages/settings/settings), [`agent-default-model`](../packages/core/agent-default-model) | - | Persists profile config patches under the application file lock and HMR queue, then reconciles Loader entries. |
| `ctx.settings` | `core` | [`settings`](../packages/settings/settings) | - | [`api-settings-controller`](../packages/api/settings-controller) | - | Forms project volatile Config fields from active profile entries and delegate validated edits to config-editor. Plugins consume their own Config references. |
| `ctx.subagentModelSelection` | `core` | [`tool-subagent`](../packages/subagent/tool-subagent) | - | [`tool-subagent`](../packages/subagent/tool-subagent) | - | Owns the default-off settings namespace that Agent-scoped delegation tools sample when composing a new top-level Session. |
| `ctx.credentials` | `seam` | [`credentials`](../packages/credentials/credentials) | [`credentials-local`](../packages/credentials/credentials-local) | [`api-settings-controller`](../packages/api/settings-controller), [`llm-deepseek`](../packages/llm/llm-deepseek), [`llm-pi-ai`](../packages/llm/llm-pi-ai) | - | Configuration carries references to secrets; providers own the values. Consumers resolve per operation, so a rotated credential reaches the very next request; the settings controller exposes value-free views and write-only storage. |
| `ctx.deepseekAccount` | `service` | [`deepseek-account`](../packages/credentials/deepseek-account) | - | [`llm-deepseek`](../packages/llm/llm-deepseek) | - | The Host owns browser authorization and local credentials; UI consumers receive state without tokens. |
| `ctx.credentials` | `seam` | [`credentials`](../packages/credentials/credentials) | [`credentials-local`](../packages/credentials/credentials-local) | [`api-settings-controller`](../packages/api/settings-controller), [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key), [`llm-pi-ai`](../packages/llm/llm-pi-ai), [`web-deepseek-api`](../packages/web/web-deepseek-api), [`web-search-deepseek`](../packages/web/web-search-deepseek) | - | Configuration carries references to secrets; providers own the values. Consumers resolve per operation, so a rotated credential reaches the very next request; the settings controller exposes value-free views and write-only storage. |
| `ctx.deepseekAccount` | `service` | [`deepseek-account`](../packages/account/deepseek-account) | - | [`llm-deepseek-account`](../packages/llm/llm-deepseek-account), [`web-deepseek-api`](../packages/web/web-deepseek-api) | - | The Host owns browser authorization and local credentials and releases per-request credentials to the account model route and the web providers; UI consumers receive state without tokens. |
| `ctx.authorization` | `seam` | [`authorization`](../packages/credentials/authorization) | - | [`llm-pi-ai`](../packages/llm/llm-pi-ai) | - | Flows are registered by the plugin that knows how to obtain one credential and keyed by the record they write; the seam owns the conversation and the one-attempt-per-key lifecycle, never the protocol. |
| `ctx.productAnalytics` | `service` | [`client-product-analytics`](../packages/client/product-analytics) | - | - | - | Accepts selected Desktop events, enriches available login identity, and observes live compaction under the live Host collection policy. |
| `ctx.otel` | `service` | [`otel`](../packages/telemetry/otel) | - | [`host-product-telemetry-otel`](../packages/host/product-telemetry-otel), [`session-telemetry-otel`](../packages/session/session-telemetry-otel) | - | Product analytics and Session feedback adapters create independent reporting channels through one injected service. |
+14 -7
View File
@@ -96,6 +96,8 @@ flowchart LR
pkg_llm_replay["llm-replay"]
pkg_agent_loop["agent-loop"]
pkg_compaction_basic["compaction-basic"]
pkg_web_deepseek_api["web-deepseek-api"]
pkg_web_search_deepseek["web-search-deepseek"]
pkg_session_log_deepseek["session-log-deepseek"]
svc_sessionLogDeepSeek["ctx.sessionLogDeepSeek<br/>Session-log upload policy"]
pkg_deepseek_llm_api_extensions["deepseek-llm-api-extensions"]
@@ -153,8 +155,10 @@ flowchart LR
pkg_credentials["credentials"]
svc_credentials["ctx.credentials<br/>Credential seam"]
pkg_credentials_local["credentials-local"]
pkg_llm_deepseek_api_key["llm-deepseek-api-key"]
pkg_deepseek_account["deepseek-account"]
svc_deepseekAccount["ctx.deepseekAccount<br/>DeepSeek account"]
pkg_llm_deepseek_account["llm-deepseek-account"]
pkg_authorization["authorization"]
svc_authorization["ctx.authorization<br/>Authorization flow registry"]
pkg_client_product_analytics["client-product-analytics"]
@@ -294,8 +298,6 @@ flowchart LR
pkg_tool_jobs["tool-jobs"]
pkg_web["web"]
svc_web["ctx.web<br/>Web access provider registry"]
pkg_web_search_deepseek["web-search-deepseek"]
pkg_web_deepseek_api["web-deepseek-api"]
pkg_web_fetch_http["web-fetch-http"]
pkg_spill["spill"]
svc_spillStore["ctx.spillStore<br/>Spill storage seam"]
@@ -532,11 +534,14 @@ flowchart LR
svc_connection_authentication --> pkg_client_connection
svc_cordisInspect --> pkg_tool_cordis
svc_credentials --> pkg_api_settings_controller
svc_credentials --> pkg_llm_deepseek
svc_credentials --> pkg_llm_deepseek_api_key
svc_credentials --> pkg_llm_pi_ai
svc_credentials --> pkg_web_deepseek_api
svc_credentials --> pkg_web_search_deepseek
svc_cuaAccess --> pkg_cua
svc_cuaPrograms --> pkg_cua_mcp
svc_deepseekAccount --> pkg_llm_deepseek
svc_deepseekAccount --> pkg_llm_deepseek_account
svc_deepseekAccount --> pkg_web_deepseek_api
svc_deepseekLlmApiExtensions --> pkg_llm_deepseek
svc_directoryPicker --> pkg_api_workspace_controller
svc_dynamicCordisRunner --> pkg_tool_cordis
@@ -555,6 +560,8 @@ flowchart LR
svc_jobs --> pkg_tool_terminal
svc_llm --> pkg_agent_loop
svc_llm --> pkg_compaction_basic
svc_llm --> pkg_web_deepseek_api
svc_llm --> pkg_web_search_deepseek
svc_lsp --> pkg_tool_lsp
svc_mcpResources --> pkg_mcp_resources
svc_officeKit --> pkg_client_ui_sidebar_documentpreview
@@ -699,7 +706,7 @@ flowchart LR
| `ctx.officeKit` | `core` | [`office-kit`](../packages/document/office-kit) | - | [`client-ui-sidebar-documentpreview`](../packages/client/ui-sidebar-documentpreview), [`tool-office`](../packages/document/tool-office) | - | 已授权的 Office 字节在宿主上使用已声明的原生目标引擎渲染为 PDF 或图片、转换或重算;未声明原生目标时使用 Node WASM。 |
| `ctx.attachments` | `seam` | [`attachment`](../packages/attachment/attachment) | [`attachment-local`](../packages/attachment/attachment-local) | [`api-session-controller`](../packages/api/session-controller), [`tool-fs`](../packages/fs/tool-fs), [`llm-pi-ai`](../packages/llm/llm-pi-ai), [`llm-deepseek`](../packages/llm/llm-deepseek) | - | 宿主会在会话事件之前提交已接受的图片;提供方适配器将已授权的持久引用解析为提供方原生内容。 |
| `ctx.fileUploads` | `core` | [`client-file-upload`](../packages/client/file-upload) | - | [`api-session-controller`](../packages/api/session-controller) | - | 负责流式接收、持久存储和暂存回执生命周期;Session Controller 将回执绑定到已接受的提交。 |
| `ctx.llm` | `seam` | [`llm`](../packages/llm/llm) | [`llm-deepseek`](../packages/llm/llm-deepseek), [`llm-pi-ai`](../packages/llm/llm-pi-ai), [`llm-replay`](../packages/test-support/llm-replay) | [`agent-loop`](../packages/core/agent-loop), [`compaction-basic`](../packages/compaction/compaction-basic) | - | 适配器注册提供方实现;agent loop(智能体循环)与压缩功能调用提供方无关的流服务。 |
| `ctx.llm` | `seam` | [`llm`](../packages/llm/llm) | [`llm-deepseek`](../packages/llm/llm-deepseek), [`llm-pi-ai`](../packages/llm/llm-pi-ai), [`llm-replay`](../packages/test-support/llm-replay) | [`agent-loop`](../packages/core/agent-loop), [`compaction-basic`](../packages/compaction/compaction-basic), [`web-deepseek-api`](../packages/web/web-deepseek-api), [`web-search-deepseek`](../packages/web/web-search-deepseek) | - | 适配器注册提供方实现;agent loop(智能体循环)与压缩功能调用与提供方无关的流式服务,DeepSeek Web 提供方读取路由发布的凭据。 |
| `ctx.sessionLogDeepSeek` | `core` | [`session-log-deepseek`](../packages/session/session-log-deepseek) | - | - | - | 插件在准备权威 Session 日志请求贡献前注册归调用方所有的排除条件;没有条件匹配的请求应用普通上传资格判断。 |
| `ctx.deepseekLlmApiExtensions` | `seam` | [`deepseek-llm-api-extensions`](../packages/llm/deepseek-llm-api-extensions) | [`session-log-deepseek`](../packages/session/session-log-deepseek), [`plugin-package-inventory-deepseek`](../packages/llm/plugin-package-inventory-deepseek) | [`llm-deepseek`](../packages/llm/llm-deepseek) | - | 插件准备彼此独立的顶层字段;官方适配器会合并这些字段,并在 HTTP 接受后提交其交付状态。 |
| `ctx.tokenMeter` | `core` | [`token-meter`](../packages/llm/token-meter) | - | [`compaction-basic`](../packages/compaction/compaction-basic) | - | 拥有按会话隔离的回放折叠区;压力消费方共享不可变且带修订版本的测量结果。 |
@@ -725,8 +732,8 @@ flowchart LR
| `ctx.configEditor` | `core` | [`config-editor`](../packages/boot/config-editor) | - | [`settings`](../packages/settings/settings), [`agent-default-model`](../packages/core/agent-default-model) | - | Persists profile config patches under the application file lock and HMR queue, then reconciles Loader entries. |
| `ctx.settings` | `core` | [`settings`](../packages/settings/settings) | - | [`api-settings-controller`](../packages/api/settings-controller) | - | Forms project volatile Config fields from active profile entries and delegate validated edits to config-editor. Plugins consume their own Config references. |
| `ctx.subagentModelSelection` | `core` | [`tool-subagent`](../packages/subagent/tool-subagent) | - | [`tool-subagent`](../packages/subagent/tool-subagent) | - | 拥有默认关闭的设置命名空间;Agent 作用域的委派工具会在组合新顶层 Session 时读取它。 |
| `ctx.credentials` | `seam` | [`credentials`](../packages/credentials/credentials) | [`credentials-local`](../packages/credentials/credentials-local) | [`api-settings-controller`](../packages/api/settings-controller), [`llm-deepseek`](../packages/llm/llm-deepseek), [`llm-pi-ai`](../packages/llm/llm-pi-ai) | - | 配置携带对机密信息的引用;提供方拥有实际值。消费方按操作解析,因此轮换后的凭据会在紧接着的下一次请求中生效;settings controller 提供不含实际值的视图和只写存储。 |
| `ctx.deepseekAccount` | `service` | [`deepseek-account`](../packages/credentials/deepseek-account) | - | [`llm-deepseek`](../packages/llm/llm-deepseek) | - | Host 负责浏览器授权和本地凭证;UI 使用方只接收不含 token 的状态。 |
| `ctx.credentials` | `seam` | [`credentials`](../packages/credentials/credentials) | [`credentials-local`](../packages/credentials/credentials-local) | [`api-settings-controller`](../packages/api/settings-controller), [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key), [`llm-pi-ai`](../packages/llm/llm-pi-ai), [`web-deepseek-api`](../packages/web/web-deepseek-api), [`web-search-deepseek`](../packages/web/web-search-deepseek) | - | 配置携带对机密信息的引用;提供方拥有实际值。消费方按操作解析,因此轮换后的凭据会在紧接着的下一次请求中生效;settings controller 提供不含实际值的视图和只写存储。 |
| `ctx.deepseekAccount` | `service` | [`deepseek-account`](../packages/account/deepseek-account) | - | [`llm-deepseek-account`](../packages/llm/llm-deepseek-account), [`web-deepseek-api`](../packages/web/web-deepseek-api) | - | Host 负责浏览器授权和本地凭证,并向账号模型路由和 Web 提供方释放按请求的凭据;UI 使用方只接收不含 token 的状态。 |
| `ctx.authorization` | `seam` | [`authorization`](../packages/credentials/authorization) | - | [`llm-pi-ai`](../packages/llm/llm-pi-ai) | - | flow 由知道如何取得某份凭据的插件注册,并以其写入的记录为键;seam 拥有这段对话与"每个键同时只跑一次尝试"的生命周期,而非协议本身。 |
| `ctx.productAnalytics` | `service` | [`client-product-analytics`](../packages/client/product-analytics) | - | - | - | 根据 Host 动态采集策略接收指定桌面事件、补充可用登录身份并监听实时压缩。 |
| `ctx.otel` | `service` | [`otel`](../packages/telemetry/otel) | - | [`host-product-telemetry-otel`](../packages/host/product-telemetry-otel), [`session-telemetry-otel`](../packages/session/session-telemetry-otel) | - | 产品埋点和 Session 反馈适配器通过同一个注入服务创建独立上报通道。 |
+3 -3
View File
@@ -970,7 +970,7 @@ export interface Config extends CuaConfig {
## `@deepseek-ai/dsh-deepseek-account`
- `inject`: `credentials` · `authorization`
- `source`: [`packages/credentials/deepseek-account/src/index.ts:40`](../packages/credentials/deepseek-account/src/index.ts)
- `source`: [`packages/account/deepseek-account/src/index.ts:39`](../packages/account/deepseek-account/src/index.ts)
```ts config-catalog
/** Deployment-specific platform and request deadlines. */
@@ -5024,7 +5024,7 @@ export interface Config {
- `inject`: `web`
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
- `source`: [`packages/web/web-deepseek-api/src/index.ts:65`](../packages/web/web-deepseek-api/src/index.ts)
- `source`: [`packages/web/web-deepseek-api/src/index.ts:57`](../packages/web/web-deepseek-api/src/index.ts)
```ts config-catalog
/**
@@ -5102,7 +5102,7 @@ export interface Config {
- `inject`: `web`
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
- `source`: [`packages/web/web-search-deepseek/src/index.ts:54`](../packages/web/web-search-deepseek/src/index.ts)
- `source`: [`packages/web/web-search-deepseek/src/index.ts:53`](../packages/web/web-search-deepseek/src/index.ts)
```ts config-catalog
/** Plugin config (all optional — `apply` fills env-var and constant defaults). */
+3 -3
View File
@@ -972,7 +972,7 @@ export interface Config extends CuaConfig {
## `@deepseek-ai/dsh-deepseek-account`
- `inject`: `credentials` · `authorization`
- `source`: [`packages/credentials/deepseek-account/src/index.ts:40`](../packages/credentials/deepseek-account/src/index.ts)
- `source`: [`packages/account/deepseek-account/src/index.ts:39`](../packages/account/deepseek-account/src/index.ts)
```ts config-catalog
/** Deployment-specific platform and request deadlines. */
@@ -5026,7 +5026,7 @@ export interface Config {
- `inject`: `web`
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
- `source`: [`packages/web/web-deepseek-api/src/index.ts:65`](../packages/web/web-deepseek-api/src/index.ts)
- `source`: [`packages/web/web-deepseek-api/src/index.ts:57`](../packages/web/web-deepseek-api/src/index.ts)
```ts config-catalog
/**
@@ -5104,7 +5104,7 @@ export interface Config {
- `inject`: `web`
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
- `source`: [`packages/web/web-search-deepseek/src/index.ts:54`](../packages/web/web-search-deepseek/src/index.ts)
- `source`: [`packages/web/web-search-deepseek/src/index.ts:53`](../packages/web/web-search-deepseek/src/index.ts)
```ts config-catalog
/** Plugin config (all optional — `apply` fills env-var and constant defaults). */
+7 -7
View File
@@ -15,7 +15,7 @@ Application listeners are outside this package matrix. Desktop Host subscribes t
| `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), [`tool-subagent`](../packages/subagent/tool-subagent) |
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:300`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`action-cards`](../packages/experimental/action-cards), [`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/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), [`deepseek-account`](../packages/credentials/deepseek-account), [`goal-round-driver`](../packages/goal/goal-round-driver), [`headless`](../packages/bundle/headless), `server`, `session-controller`, [`session-telemetry`](../packages/session/session-telemetry), [`subagent`](../packages/subagent/subagent) |
| `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) |
| `agent/inbox/inserted` | `emit` | [`packages/core/agent/src/runtime-types.ts:318`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | `client-ui-forge`, [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`tool-jobs`](../packages/jobs/tool-jobs), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) |
@@ -40,11 +40,11 @@ Application listeners are outside this package matrix. Desktop Host subscribes t
| `cordis/inspect-query-resolved` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:401`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
| `cordis/request-run` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:371`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
| `cordis/request-run-resolved` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:377`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
| `credentials/record-updated` | `emit` | [`packages/credentials/credentials/src/types.ts:100`](../packages/credentials/credentials/src/types.ts) | [`credentials`](../packages/credentials/credentials) (`events.dispatch`) | [`authorization`](../packages/credentials/authorization), [`deepseek-account`](../packages/credentials/deepseek-account), `remotes` |
| `credentials/record-updated` | `emit` | [`packages/credentials/credentials/src/types.ts:100`](../packages/credentials/credentials/src/types.ts) | [`credentials`](../packages/credentials/credentials) (`events.dispatch`) | [`authorization`](../packages/credentials/authorization), [`deepseek-account`](../packages/account/deepseek-account), `remotes` |
| `credentials/reference-updated` | `emit` | [`packages/credentials/credentials/src/types.ts:88`](../packages/credentials/credentials/src/types.ts) | [`credentials`](../packages/credentials/credentials) (`events.dispatch`) | [`mcp-client`](../packages/mcp/mcp-client), `remotes` |
| `deepseek-account/model-sign-in-required` | `emit` | [`packages/credentials/deepseek-account/src/types.ts:110`](../packages/credentials/deepseek-account/src/types.ts) | [`deepseek-account`](../packages/credentials/deepseek-account) (`emit`) | `remotes` |
| `deepseek-account/session-expired` | `emit` | [`packages/credentials/deepseek-account/src/types.ts:106`](../packages/credentials/deepseek-account/src/types.ts) | [`deepseek-account`](../packages/credentials/deepseek-account) (`emit`) | [`deepseek-account`](../packages/credentials/deepseek-account), `remotes` |
| `deepseek-account/signed-out` | `emit` | [`packages/credentials/deepseek-account/src/index.ts:29`](../packages/credentials/deepseek-account/src/index.ts) | [`deepseek-account`](../packages/credentials/deepseek-account) (`emit`) | [`deepseek-account`](../packages/credentials/deepseek-account) |
| `deepseek-account/model-sign-in-required` | `emit` | [`packages/account/deepseek-account/src/types.ts:110`](../packages/account/deepseek-account/src/types.ts) | [`llm-deepseek-account`](../packages/llm/llm-deepseek-account) (`emit`) | `remotes` |
| `deepseek-account/session-expired` | `emit` | [`packages/account/deepseek-account/src/types.ts:106`](../packages/account/deepseek-account/src/types.ts) | [`deepseek-account`](../packages/account/deepseek-account) (`emit`) | [`deepseek-account`](../packages/account/deepseek-account), `remotes` |
| `deepseek-account/signed-out` | `emit` | [`packages/account/deepseek-account/src/index.ts:28`](../packages/account/deepseek-account/src/index.ts) | [`deepseek-account`](../packages/account/deepseek-account) (`emit`) | [`llm-deepseek-account`](../packages/llm/llm-deepseek-account) |
| `domain/changed` | `emit` | [`packages/storage/storage-domain/src/events.ts:46`](../packages/storage/storage-domain/src/events.ts) | [`storage-domain`](../packages/storage/storage-domain) (`emit`) | `workspace-controller` |
| `feedback/committed` | `parallel` | [`packages/feedback/message-feedback/src/index.ts:58`](../packages/feedback/message-feedback/src/index.ts) | [`message-feedback`](../packages/feedback/message-feedback) (`parallel`) | [`session-telemetry-otel`](../packages/session/session-telemetry-otel) |
| `forge/providers-changed` | `parallel` | [`packages/experimental/forge/src/index.ts:31`](../packages/experimental/forge/src/index.ts) | `forge` (`parallel`) | `forge-session` |
@@ -60,7 +60,7 @@ Application listeners are outside this package matrix. Desktop Host subscribes t
| `llm-pi-ai/request-headers` | `waterfall` | [`packages/llm/llm-pi-ai/src/index.ts:113`](../packages/llm/llm-pi-ai/src/index.ts) | [`llm-pi-ai`](../packages/llm/llm-pi-ai) (`waterfall`) | - |
| `llm/adapters-updated` | `emit` | [`packages/llm/llm/src/types.ts:24`](../packages/llm/llm/src/types.ts) | [`llm`](../packages/llm/llm) (`events.dispatch`) | [`acp`](../packages/acp/acp), `remotes` |
| `llm/models-updated` | `emit` | [`packages/llm/llm/src/types.ts:30`](../packages/llm/llm/src/types.ts) | [`llm-deepseek`](../packages/llm/llm-deepseek) (`emit`) | `remotes` |
| `llm/stream` | `waterfall` | [`packages/llm/llm/src/index.ts:80`](../packages/llm/llm/src/index.ts) | [`llm`](../packages/llm/llm) (`waterfall`) | [`llm-replay`](../packages/test-support/llm-replay), [`session-checkpoint-policy`](../packages/session/session-checkpoint-policy), [`session-title`](../packages/session/session-title), [`timeline`](../packages/experimental/timeline) |
| `llm/stream` | `waterfall` | [`packages/llm/llm/src/index.ts:81`](../packages/llm/llm/src/index.ts) | [`llm`](../packages/llm/llm) (`waterfall`) | [`llm-replay`](../packages/test-support/llm-replay), [`session-checkpoint-policy`](../packages/session/session-checkpoint-policy), [`session-title`](../packages/session/session-title), [`timeline`](../packages/experimental/timeline) |
| `mcp-manager/status` | `parallel` | [`packages/mcp/mcp-manager/src/types.ts:46`](../packages/mcp/mcp-manager/src/types.ts) | [`mcp-manager`](../packages/mcp/mcp-manager) (`parallel`) | - |
| `permission-presets/catalog-changed` | `emit` | [`packages/interaction/permission-presets/src/types.ts:62`](../packages/interaction/permission-presets/src/types.ts) | [`permission-presets`](../packages/interaction/permission-presets) (`events.dispatch`) | `remotes` |
| `plugin-manager/changed` | `emit` | [`packages/boot/plugin-manager/src/types.ts:455`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` |
@@ -96,7 +96,7 @@ Application listeners are outside this package matrix. Desktop Host subscribes t
| `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/request` | `waterfall` | [`packages/host/webserver/src/index.ts:68`](../packages/host/webserver/src/index.ts) | `webserver` (`waterfall`) | `authentication-token`, [`deepseek-account`](../packages/credentials/deepseek-account) |
| `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) |
| `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) |
| `workflow/agent-start` | `emit` | [`packages/workflow/workflow/src/index.ts:68`](../packages/workflow/workflow/src/index.ts) | [`workflow`](../packages/workflow/workflow) (`events.dispatch`) | [`tool-workflow`](../packages/workflow/tool-workflow) |
+7 -7
View File
@@ -17,7 +17,7 @@
| `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), [`tool-subagent`](../packages/subagent/tool-subagent) |
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:300`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`action-cards`](../packages/experimental/action-cards), [`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/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), [`deepseek-account`](../packages/credentials/deepseek-account), [`goal-round-driver`](../packages/goal/goal-round-driver), [`headless`](../packages/bundle/headless), `server`, `session-controller`, [`session-telemetry`](../packages/session/session-telemetry), [`subagent`](../packages/subagent/subagent) |
| `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) |
| `agent/inbox/inserted` | `emit` | [`packages/core/agent/src/runtime-types.ts:318`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | `client-ui-forge`, [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`tool-jobs`](../packages/jobs/tool-jobs), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) |
@@ -42,11 +42,11 @@
| `cordis/inspect-query-resolved` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:401`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
| `cordis/request-run` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:371`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
| `cordis/request-run-resolved` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:377`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` |
| `credentials/record-updated` | `emit` | [`packages/credentials/credentials/src/types.ts:100`](../packages/credentials/credentials/src/types.ts) | [`credentials`](../packages/credentials/credentials) (`events.dispatch`) | [`authorization`](../packages/credentials/authorization), [`deepseek-account`](../packages/credentials/deepseek-account), `remotes` |
| `credentials/record-updated` | `emit` | [`packages/credentials/credentials/src/types.ts:100`](../packages/credentials/credentials/src/types.ts) | [`credentials`](../packages/credentials/credentials) (`events.dispatch`) | [`authorization`](../packages/credentials/authorization), [`deepseek-account`](../packages/account/deepseek-account), `remotes` |
| `credentials/reference-updated` | `emit` | [`packages/credentials/credentials/src/types.ts:88`](../packages/credentials/credentials/src/types.ts) | [`credentials`](../packages/credentials/credentials) (`events.dispatch`) | [`mcp-client`](../packages/mcp/mcp-client), `remotes` |
| `deepseek-account/model-sign-in-required` | `emit` | [`packages/credentials/deepseek-account/src/types.ts:110`](../packages/credentials/deepseek-account/src/types.ts) | [`deepseek-account`](../packages/credentials/deepseek-account) (`emit`) | `remotes` |
| `deepseek-account/session-expired` | `emit` | [`packages/credentials/deepseek-account/src/types.ts:106`](../packages/credentials/deepseek-account/src/types.ts) | [`deepseek-account`](../packages/credentials/deepseek-account) (`emit`) | [`deepseek-account`](../packages/credentials/deepseek-account), `remotes` |
| `deepseek-account/signed-out` | `emit` | [`packages/credentials/deepseek-account/src/index.ts:29`](../packages/credentials/deepseek-account/src/index.ts) | [`deepseek-account`](../packages/credentials/deepseek-account) (`emit`) | [`deepseek-account`](../packages/credentials/deepseek-account) |
| `deepseek-account/model-sign-in-required` | `emit` | [`packages/account/deepseek-account/src/types.ts:110`](../packages/account/deepseek-account/src/types.ts) | [`llm-deepseek-account`](../packages/llm/llm-deepseek-account) (`emit`) | `remotes` |
| `deepseek-account/session-expired` | `emit` | [`packages/account/deepseek-account/src/types.ts:106`](../packages/account/deepseek-account/src/types.ts) | [`deepseek-account`](../packages/account/deepseek-account) (`emit`) | [`deepseek-account`](../packages/account/deepseek-account), `remotes` |
| `deepseek-account/signed-out` | `emit` | [`packages/account/deepseek-account/src/index.ts:28`](../packages/account/deepseek-account/src/index.ts) | [`deepseek-account`](../packages/account/deepseek-account) (`emit`) | [`llm-deepseek-account`](../packages/llm/llm-deepseek-account) |
| `domain/changed` | `emit` | [`packages/storage/storage-domain/src/events.ts:46`](../packages/storage/storage-domain/src/events.ts) | [`storage-domain`](../packages/storage/storage-domain) (`emit`) | `workspace-controller` |
| `feedback/committed` | `parallel` | [`packages/feedback/message-feedback/src/index.ts:58`](../packages/feedback/message-feedback/src/index.ts) | [`message-feedback`](../packages/feedback/message-feedback) (`parallel`) | [`session-telemetry-otel`](../packages/session/session-telemetry-otel) |
| `forge/providers-changed` | `parallel` | [`packages/experimental/forge/src/index.ts:31`](../packages/experimental/forge/src/index.ts) | `forge` (`parallel`) | `forge-session` |
@@ -62,7 +62,7 @@
| `llm-pi-ai/request-headers` | `waterfall` | [`packages/llm/llm-pi-ai/src/index.ts:113`](../packages/llm/llm-pi-ai/src/index.ts) | [`llm-pi-ai`](../packages/llm/llm-pi-ai) (`waterfall`) | - |
| `llm/adapters-updated` | `emit` | [`packages/llm/llm/src/types.ts:24`](../packages/llm/llm/src/types.ts) | [`llm`](../packages/llm/llm) (`events.dispatch`) | [`acp`](../packages/acp/acp), `remotes` |
| `llm/models-updated` | `emit` | [`packages/llm/llm/src/types.ts:30`](../packages/llm/llm/src/types.ts) | [`llm-deepseek`](../packages/llm/llm-deepseek) (`emit`) | `remotes` |
| `llm/stream` | `waterfall` | [`packages/llm/llm/src/index.ts:80`](../packages/llm/llm/src/index.ts) | [`llm`](../packages/llm/llm) (`waterfall`) | [`llm-replay`](../packages/test-support/llm-replay), [`session-checkpoint-policy`](../packages/session/session-checkpoint-policy), [`session-title`](../packages/session/session-title), [`timeline`](../packages/experimental/timeline) |
| `llm/stream` | `waterfall` | [`packages/llm/llm/src/index.ts:81`](../packages/llm/llm/src/index.ts) | [`llm`](../packages/llm/llm) (`waterfall`) | [`llm-replay`](../packages/test-support/llm-replay), [`session-checkpoint-policy`](../packages/session/session-checkpoint-policy), [`session-title`](../packages/session/session-title), [`timeline`](../packages/experimental/timeline) |
| `mcp-manager/status` | `parallel` | [`packages/mcp/mcp-manager/src/types.ts:46`](../packages/mcp/mcp-manager/src/types.ts) | [`mcp-manager`](../packages/mcp/mcp-manager) (`parallel`) | - |
| `permission-presets/catalog-changed` | `emit` | [`packages/interaction/permission-presets/src/types.ts:62`](../packages/interaction/permission-presets/src/types.ts) | [`permission-presets`](../packages/interaction/permission-presets) (`events.dispatch`) | `remotes` |
| `plugin-manager/changed` | `emit` | [`packages/boot/plugin-manager/src/types.ts:455`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` |
@@ -98,7 +98,7 @@
| `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/request` | `waterfall` | [`packages/host/webserver/src/index.ts:68`](../packages/host/webserver/src/index.ts) | `webserver` (`waterfall`) | `authentication-token`, [`deepseek-account`](../packages/credentials/deepseek-account) |
| `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) |
| `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) |
| `workflow/agent-start` | `emit` | [`packages/workflow/workflow/src/index.ts:68`](../packages/workflow/workflow/src/index.ts) | [`workflow`](../packages/workflow/workflow) (`events.dispatch`) | [`tool-workflow`](../packages/workflow/tool-workflow) |
+40 -42
View File
@@ -117,6 +117,9 @@ flowchart TD
subgraph group_acp["packages/acp"]
pkg_acp["acp"]
end
subgraph group_account["packages/account"]
pkg_deepseek_account["deepseek-account"]
end
subgraph group_api["packages/api"]
pkg_api_gateway["api-gateway"]
pkg_api_job_controller["api-job-controller"]
@@ -250,7 +253,6 @@ flowchart TD
pkg_authorization["authorization"]
pkg_credentials["credentials"]
pkg_credentials_local["credentials-local"]
pkg_deepseek_account["deepseek-account"]
end
subgraph group_deliverables["packages/deliverables"]
pkg_deliverable_file_references["deliverable-file-references"]
@@ -500,11 +502,13 @@ flowchart TD
pkg_atomic_write --> pkg_error
pkg_llm --> pkg_error
pkg_session --> pkg_scope
pkg_web --> pkg_error
pkg_api_remotes --> pkg_scope
pkg_attachment --> pkg_error
pkg_app_boot --> pkg_home_paths
pkg_app_boot --> pkg_launch_environment
pkg_client_connection --> pkg_scope
pkg_credentials --> pkg_launch_environment
pkg_experimental_computer_use_cua_driver_mcp --> pkg_computer_use
pkg_anonymous_user_id --> pkg_brand
pkg_anonymous_user_id --> pkg_home_paths
@@ -522,7 +526,8 @@ flowchart TD
pkg_skill --> pkg_error
pkg_skill --> pkg_llm
pkg_skill --> pkg_scope
pkg_web --> pkg_llm
pkg_web_fetch_http --> pkg_timeout
pkg_web_fetch_http --> pkg_web
pkg_spill --> pkg_llm
pkg_spill --> pkg_session
pkg_api_terminal_controller --> pkg_subprocess
@@ -531,7 +536,7 @@ flowchart TD
pkg_hmr --> pkg_app_boot
pkg_hmr --> pkg_cmdline
pkg_authorization --> pkg_credentials
pkg_authorization --> pkg_llm
pkg_authorization --> pkg_error
pkg_credentials_local --> pkg_atomic_write
pkg_credentials_local --> pkg_credentials
pkg_credentials_local --> pkg_home_paths
@@ -573,11 +578,15 @@ flowchart TD
pkg_fs --> pkg_llm
pkg_fs --> pkg_sandbox
pkg_skill_office --> pkg_skill
pkg_web_fetch_http --> pkg_timeout
pkg_web_fetch_http --> pkg_web
pkg_spill_local --> pkg_spill
pkg_session_log_export --> pkg_session
pkg_session_log_export --> pkg_session_persistence
pkg_deepseek_account --> pkg_authorization
pkg_deepseek_account --> pkg_brand
pkg_deepseek_account --> pkg_credentials
pkg_deepseek_account --> pkg_host_webserver
pkg_deepseek_account --> pkg_typert_protocol
pkg_deepseek_account --> pkg_util_values
pkg_config_editor --> pkg_app_boot
pkg_config_editor --> pkg_hmr
pkg_deliverable_file_references --> pkg_system_prompt
@@ -676,6 +685,11 @@ flowchart TD
pkg_pwsh_local --> pkg_shell
pkg_pwsh_local --> pkg_subprocess
pkg_pwsh_local --> pkg_timeout
pkg_llm_deepseek_account --> pkg_agent
pkg_llm_deepseek_account --> pkg_deepseek_account
pkg_llm_deepseek_account --> pkg_launch_environment
pkg_llm_deepseek_account --> pkg_llm
pkg_llm_deepseek_account --> pkg_llm_deepseek
pkg_llm_deepseek_api_key --> pkg_credentials
pkg_llm_deepseek_api_key --> pkg_launch_environment
pkg_llm_deepseek_api_key --> pkg_llm
@@ -693,6 +707,19 @@ flowchart TD
pkg_goal --> pkg_session
pkg_goal --> pkg_session_projection
pkg_goal --> pkg_typert_protocol
pkg_web_deepseek_api --> pkg_agent
pkg_web_deepseek_api --> pkg_credentials
pkg_web_deepseek_api --> pkg_deepseek_account
pkg_web_deepseek_api --> pkg_launch_environment
pkg_web_deepseek_api --> pkg_llm
pkg_web_deepseek_api --> pkg_session
pkg_web_deepseek_api --> pkg_web
pkg_web_search_deepseek --> pkg_agent
pkg_web_search_deepseek --> pkg_credentials
pkg_web_search_deepseek --> pkg_launch_environment
pkg_web_search_deepseek --> pkg_llm
pkg_web_search_deepseek --> pkg_session
pkg_web_search_deepseek --> pkg_web
pkg_file_reference --> pkg_agent
pkg_harness_dev_context --> pkg_agent
pkg_harness_dev_context --> pkg_session
@@ -707,14 +734,6 @@ flowchart TD
pkg_tmux_context --> pkg_session
pkg_tmux_context --> pkg_session_projection
pkg_tmux_context --> pkg_shell
pkg_deepseek_account --> pkg_agent
pkg_deepseek_account --> pkg_authorization
pkg_deepseek_account --> pkg_brand
pkg_deepseek_account --> pkg_credentials
pkg_deepseek_account --> pkg_host_webserver
pkg_deepseek_account --> pkg_llm
pkg_deepseek_account --> pkg_typert_protocol
pkg_deepseek_account --> pkg_util_values
pkg_commands --> pkg_agent
pkg_commands --> pkg_attachment
pkg_commands --> pkg_llm
@@ -764,10 +783,6 @@ flowchart TD
pkg_workflow --> pkg_agent
pkg_workflow --> pkg_llm
pkg_workflow --> pkg_session
pkg_llm_deepseek_account --> pkg_deepseek_account
pkg_llm_deepseek_account --> pkg_launch_environment
pkg_llm_deepseek_account --> pkg_llm
pkg_llm_deepseek_account --> pkg_llm_deepseek
pkg_tools --> pkg_agent
pkg_tools --> pkg_llm
pkg_tools --> pkg_scope
@@ -781,13 +796,6 @@ flowchart TD
pkg_fs_sandbox --> pkg_fs_local
pkg_fs_sandbox --> pkg_sandbox
pkg_fs_sandbox --> pkg_sandbox_policy
pkg_web_search_deepseek --> pkg_agent
pkg_web_search_deepseek --> pkg_credentials
pkg_web_search_deepseek --> pkg_deepseek_account
pkg_web_search_deepseek --> pkg_launch_environment
pkg_web_search_deepseek --> pkg_llm_deepseek
pkg_web_search_deepseek --> pkg_session
pkg_web_search_deepseek --> pkg_web
pkg_compaction --> pkg_commands
pkg_compaction --> pkg_llm
pkg_compaction --> pkg_session
@@ -896,16 +904,6 @@ flowchart TD
pkg_tool_web --> pkg_system_prompt
pkg_tool_web --> pkg_tools
pkg_tool_web --> pkg_web
pkg_web_deepseek_api --> pkg_agent
pkg_web_deepseek_api --> pkg_credentials
pkg_web_deepseek_api --> pkg_deepseek_account
pkg_web_deepseek_api --> pkg_launch_environment
pkg_web_deepseek_api --> pkg_llm
pkg_web_deepseek_api --> pkg_llm_deepseek
pkg_web_deepseek_api --> pkg_llm_deepseek_account
pkg_web_deepseek_api --> pkg_llm_deepseek_api_key
pkg_web_deepseek_api --> pkg_session
pkg_web_deepseek_api --> pkg_web
pkg_tool_todo --> pkg_agent
pkg_tool_todo --> pkg_session
pkg_tool_todo --> pkg_session_projection
@@ -1700,7 +1698,6 @@ flowchart TD
| [`client-ui-workspace`](../packages/client/ui-workspace) | `client` | — |
| [`client-web`](../packages/client/web) | `client` | — |
| [`computer-use`](../packages/computer-use/computer-use) | `computer-use` | — |
| [`credentials`](../packages/credentials/credentials) | `credentials` | — |
| [`office-kit`](../packages/document/office-kit) | `document` | — |
| [`client-ui-action-cards`](../packages/experimental/client-ui-action-cards) | `experimental` | — |
| [`client-ui-creation-recommendations`](../packages/experimental/client-ui-creation-recommendations) | `experimental` | — |
@@ -1746,10 +1743,12 @@ flowchart TD
| [`atomic-write`](../packages/util/atomic-write) | `util` | [`error`](../packages/util/error) |
| [`llm`](../packages/llm/llm) | `llm` | [`error`](../packages/util/error) |
| [`session`](../packages/core/session) | `core` | [`scope`](../packages/core/scope) |
| [`web`](../packages/web/web) | `web` | [`error`](../packages/util/error) |
| [`api-remotes`](../packages/api/remotes) | `api` | [`scope`](../packages/core/scope) |
| [`attachment`](../packages/attachment/attachment) | `attachment` | [`error`](../packages/util/error) |
| [`app-boot`](../packages/boot/app-boot) | `boot` | [`home-paths`](../packages/util/home-paths), [`launch-environment`](../packages/util/launch-environment) |
| [`client-connection`](../packages/client/connection) | `client` | [`scope`](../packages/core/scope) |
| [`credentials`](../packages/credentials/credentials) | `credentials` | [`launch-environment`](../packages/util/launch-environment) |
| [`experimental-computer-use-cua-driver-mcp`](../packages/experimental/computer-use-cua-driver-mcp) | `experimental` | [`computer-use`](../packages/computer-use/computer-use) |
| [`anonymous-user-id`](../packages/identity/anonymous-user-id) | `identity` | [`brand`](../packages/util/brand), [`home-paths`](../packages/util/home-paths) |
| [`storage-domain`](../packages/storage/storage-domain) | `storage` | [`storage`](../packages/storage/storage) |
@@ -1762,12 +1761,12 @@ flowchart TD
| [`util-ripgrep`](../packages/util/ripgrep) | `util` | [`subprocess`](../packages/subprocess/subprocess) |
| [`system-prompt`](../packages/core/system-prompt) | `core` | [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope) |
| [`skill`](../packages/skill/skill) | `skill` | [`error`](../packages/util/error), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope) |
| [`web`](../packages/web/web) | `web` | [`llm`](../packages/llm/llm) |
| [`web-fetch-http`](../packages/web/web-fetch-http) | `web` | [`timeout`](../packages/util/timeout), [`web`](../packages/web/web) |
| [`spill`](../packages/spill/spill) | `spill` | [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
| [`api-terminal-controller`](../packages/api/terminal-controller) | `api` | [`subprocess`](../packages/subprocess/subprocess) |
| [`attachment-local`](../packages/attachment/attachment-local) | `attachment` | [`attachment`](../packages/attachment/attachment), [`home-paths`](../packages/util/home-paths) |
| [`hmr`](../packages/boot/hmr) | `boot` | [`app-boot`](../packages/boot/app-boot), [`cmdline`](../packages/boot/cmdline) |
| [`authorization`](../packages/credentials/authorization) | `credentials` | [`credentials`](../packages/credentials/credentials), [`llm`](../packages/llm/llm) |
| [`authorization`](../packages/credentials/authorization) | `credentials` | [`credentials`](../packages/credentials/credentials), [`error`](../packages/util/error) |
| [`credentials-local`](../packages/credentials/credentials-local) | `credentials` | [`atomic-write`](../packages/util/atomic-write), [`credentials`](../packages/credentials/credentials), [`home-paths`](../packages/util/home-paths), [`launch-environment`](../packages/util/launch-environment) |
| [`cua-mcp`](../packages/experimental/cua-mcp) | `experimental` | [`app-boot`](../packages/boot/app-boot), [`attachment`](../packages/attachment/attachment) |
| [`experimental-webworker-runtime`](../packages/experimental/webworker-runtime) | `experimental` | [`client-connection`](../packages/client/connection), [`client-modules`](../packages/client/modules), [`host-webserver`](../packages/host/webserver) |
@@ -1788,9 +1787,9 @@ flowchart TD
| [`session-snapshot`](../packages/test-support/session-snapshot) | `test-support` | [`http-proxy`](../packages/util/http-proxy), [`session`](../packages/core/session) |
| [`fs`](../packages/fs/fs) | `fs` | [`llm`](../packages/llm/llm), [`sandbox`](../packages/sandbox/sandbox) |
| [`skill-office`](../packages/skill/skill-office) | `skill` | [`skill`](../packages/skill/skill) |
| [`web-fetch-http`](../packages/web/web-fetch-http) | `web` | [`timeout`](../packages/util/timeout), [`web`](../packages/web/web) |
| [`spill-local`](../packages/spill/spill-local) | `spill` | [`spill`](../packages/spill/spill) |
| [`session-log-export`](../packages/session-query/session-log-export) | `session-query` | [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence) |
| [`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) |
| [`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) |
@@ -1822,15 +1821,17 @@ flowchart TD
| [`lsp-stdio`](../packages/lsp/lsp-stdio) | `lsp` | [`error`](../packages/util/error), [`fs`](../packages/fs/fs), [`llm`](../packages/llm/llm), [`lsp`](../packages/lsp/lsp), [`subprocess`](../packages/subprocess/subprocess), [`timeout`](../packages/util/timeout) |
| [`bash-local`](../packages/shell/bash-local) | `shell` | [`shell`](../packages/shell/shell), [`subprocess`](../packages/subprocess/subprocess), [`timeout`](../packages/util/timeout) |
| [`pwsh-local`](../packages/shell/pwsh-local) | `shell` | [`shell`](../packages/shell/shell), [`subprocess`](../packages/subprocess/subprocess), [`timeout`](../packages/util/timeout) |
| [`llm-deepseek-account`](../packages/llm/llm-deepseek-account) | `llm` | [`agent`](../packages/core/agent), [`deepseek-account`](../packages/account/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`llm-deepseek`](../packages/llm/llm-deepseek) |
| [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key) | `llm` | [`credentials`](../packages/credentials/credentials), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`llm-deepseek`](../packages/llm/llm-deepseek) |
| [`llm-retry`](../packages/llm/llm-retry) | `llm` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`timeout`](../packages/util/timeout) |
| [`agent-default-model`](../packages/core/agent-default-model) | `core` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm) |
| [`goal`](../packages/goal/goal) | `goal` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`typert-protocol`](../packages/typert/protocol) |
| [`web-deepseek-api`](../packages/web/web-deepseek-api) | `web` | [`agent`](../packages/core/agent), [`credentials`](../packages/credentials/credentials), [`deepseek-account`](../packages/account/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`web`](../packages/web/web) |
| [`web-search-deepseek`](../packages/web/web-search-deepseek) | `web` | [`agent`](../packages/core/agent), [`credentials`](../packages/credentials/credentials), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`web`](../packages/web/web) |
| [`file-reference`](../packages/context/file-reference) | `context` | [`agent`](../packages/core/agent) |
| [`harness-dev-context`](../packages/context/harness-dev-context) | `context` | [`agent`](../packages/core/agent), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`system-prompt`](../packages/core/system-prompt) |
| [`time-context`](../packages/context/time-context) | `context` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`util-time`](../packages/util/time) |
| [`tmux-context`](../packages/context/tmux-context) | `context` | [`agent`](../packages/core/agent), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`shell`](../packages/shell/shell) |
| [`deepseek-account`](../packages/credentials/deepseek-account) | `credentials` | [`agent`](../packages/core/agent), [`authorization`](../packages/credentials/authorization), [`brand`](../packages/util/brand), [`credentials`](../packages/credentials/credentials), [`host-webserver`](../packages/host/webserver), [`llm`](../packages/llm/llm), [`typert-protocol`](../packages/typert/protocol), [`util-values`](../packages/util/values) |
| [`commands`](../packages/interaction/commands) | `interaction` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`typert-protocol`](../packages/typert/protocol) |
| [`user-approval`](../packages/interaction/user-approval) | `interaction` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`system-prompt`](../packages/core/system-prompt) |
| [`user-questions`](../packages/interaction/user-questions) | `interaction` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`typert-protocol`](../packages/typert/protocol) |
@@ -1842,11 +1843,9 @@ flowchart TD
| [`terminal`](../packages/terminal/terminal) | `terminal` | [`agent`](../packages/core/agent), [`error`](../packages/util/error) |
| [`loader-smoke`](../packages/test-support/loader-smoke) | `test-support` | [`agent`](../packages/core/agent), [`http-proxy`](../packages/util/http-proxy), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
| [`workflow`](../packages/workflow/workflow) | `workflow` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
| [`llm-deepseek-account`](../packages/llm/llm-deepseek-account) | `llm` | [`deepseek-account`](../packages/credentials/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`llm-deepseek`](../packages/llm/llm-deepseek) |
| [`tools`](../packages/core/tools) | `core` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`system-prompt`](../packages/core/system-prompt), [`user-approval`](../packages/interaction/user-approval) |
| [`command-goal`](../packages/goal/command-goal) | `goal` | [`commands`](../packages/interaction/commands), [`goal`](../packages/goal/goal), [`llm`](../packages/llm/llm) |
| [`fs-sandbox`](../packages/fs/fs-sandbox) | `fs` | [`fs`](../packages/fs/fs), [`fs-local`](../packages/fs/fs-local), [`sandbox`](../packages/sandbox/sandbox), [`sandbox-policy`](../packages/sandbox/sandbox-policy) |
| [`web-search-deepseek`](../packages/web/web-search-deepseek) | `web` | [`agent`](../packages/core/agent), [`credentials`](../packages/credentials/credentials), [`deepseek-account`](../packages/credentials/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm-deepseek`](../packages/llm/llm-deepseek), [`session`](../packages/core/session), [`web`](../packages/web/web) |
| [`compaction`](../packages/compaction/compaction) | `compaction` | [`commands`](../packages/interaction/commands), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
| [`command-feedback`](../packages/feedback/command-feedback) | `feedback` | [`anonymous-user-id`](../packages/identity/anonymous-user-id), [`commands`](../packages/interaction/commands), [`session`](../packages/core/session), [`typert-protocol`](../packages/typert/protocol) |
| [`permission-presets`](../packages/interaction/permission-presets) | `interaction` | [`agent`](../packages/core/agent), [`commands`](../packages/interaction/commands), [`sandbox`](../packages/sandbox/sandbox), [`sandbox-policy`](../packages/sandbox/sandbox-policy), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`shell`](../packages/shell/shell), [`typert-protocol`](../packages/typert/protocol), [`user-approval`](../packages/interaction/user-approval) |
@@ -1867,7 +1866,6 @@ flowchart TD
| [`tool-skill`](../packages/skill/tool-skill) | `skill` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`skill`](../packages/skill/skill), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
| [`tool-workspace-dependencies`](../packages/skill/tool-workspace-dependencies) | `skill` | [`error`](../packages/util/error), [`tools`](../packages/core/tools) |
| [`tool-web`](../packages/web/tool-web) | `web` | [`llm`](../packages/llm/llm), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`web`](../packages/web/web) |
| [`web-deepseek-api`](../packages/web/web-deepseek-api) | `web` | [`agent`](../packages/core/agent), [`credentials`](../packages/credentials/credentials), [`deepseek-account`](../packages/credentials/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`llm-deepseek`](../packages/llm/llm-deepseek), [`llm-deepseek-account`](../packages/llm/llm-deepseek-account), [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key), [`session`](../packages/core/session), [`web`](../packages/web/web) |
| [`tool-todo`](../packages/todo/tool-todo) | `todo` | [`agent`](../packages/core/agent), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`tools`](../packages/core/tools) |
| [`plan-mode`](../packages/plan/plan-mode) | `plan` | [`agent`](../packages/core/agent), [`commands`](../packages/interaction/commands), [`error`](../packages/util/error), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`user-questions`](../packages/interaction/user-questions) |
| [`command-compact`](../packages/compaction/command-compact) | `compaction` | [`commands`](../packages/interaction/commands), [`compaction`](../packages/compaction/compaction) |
+40 -42
View File
@@ -119,6 +119,9 @@ flowchart TD
subgraph group_acp["packages/acp"]
pkg_acp["acp"]
end
subgraph group_account["packages/account"]
pkg_deepseek_account["deepseek-account"]
end
subgraph group_api["packages/api"]
pkg_api_gateway["api-gateway"]
pkg_api_job_controller["api-job-controller"]
@@ -252,7 +255,6 @@ flowchart TD
pkg_authorization["authorization"]
pkg_credentials["credentials"]
pkg_credentials_local["credentials-local"]
pkg_deepseek_account["deepseek-account"]
end
subgraph group_deliverables["packages/deliverables"]
pkg_deliverable_file_references["deliverable-file-references"]
@@ -502,11 +504,13 @@ flowchart TD
pkg_atomic_write --> pkg_error
pkg_llm --> pkg_error
pkg_session --> pkg_scope
pkg_web --> pkg_error
pkg_api_remotes --> pkg_scope
pkg_attachment --> pkg_error
pkg_app_boot --> pkg_home_paths
pkg_app_boot --> pkg_launch_environment
pkg_client_connection --> pkg_scope
pkg_credentials --> pkg_launch_environment
pkg_experimental_computer_use_cua_driver_mcp --> pkg_computer_use
pkg_anonymous_user_id --> pkg_brand
pkg_anonymous_user_id --> pkg_home_paths
@@ -524,7 +528,8 @@ flowchart TD
pkg_skill --> pkg_error
pkg_skill --> pkg_llm
pkg_skill --> pkg_scope
pkg_web --> pkg_llm
pkg_web_fetch_http --> pkg_timeout
pkg_web_fetch_http --> pkg_web
pkg_spill --> pkg_llm
pkg_spill --> pkg_session
pkg_api_terminal_controller --> pkg_subprocess
@@ -533,7 +538,7 @@ flowchart TD
pkg_hmr --> pkg_app_boot
pkg_hmr --> pkg_cmdline
pkg_authorization --> pkg_credentials
pkg_authorization --> pkg_llm
pkg_authorization --> pkg_error
pkg_credentials_local --> pkg_atomic_write
pkg_credentials_local --> pkg_credentials
pkg_credentials_local --> pkg_home_paths
@@ -575,11 +580,15 @@ flowchart TD
pkg_fs --> pkg_llm
pkg_fs --> pkg_sandbox
pkg_skill_office --> pkg_skill
pkg_web_fetch_http --> pkg_timeout
pkg_web_fetch_http --> pkg_web
pkg_spill_local --> pkg_spill
pkg_session_log_export --> pkg_session
pkg_session_log_export --> pkg_session_persistence
pkg_deepseek_account --> pkg_authorization
pkg_deepseek_account --> pkg_brand
pkg_deepseek_account --> pkg_credentials
pkg_deepseek_account --> pkg_host_webserver
pkg_deepseek_account --> pkg_typert_protocol
pkg_deepseek_account --> pkg_util_values
pkg_config_editor --> pkg_app_boot
pkg_config_editor --> pkg_hmr
pkg_deliverable_file_references --> pkg_system_prompt
@@ -678,6 +687,11 @@ flowchart TD
pkg_pwsh_local --> pkg_shell
pkg_pwsh_local --> pkg_subprocess
pkg_pwsh_local --> pkg_timeout
pkg_llm_deepseek_account --> pkg_agent
pkg_llm_deepseek_account --> pkg_deepseek_account
pkg_llm_deepseek_account --> pkg_launch_environment
pkg_llm_deepseek_account --> pkg_llm
pkg_llm_deepseek_account --> pkg_llm_deepseek
pkg_llm_deepseek_api_key --> pkg_credentials
pkg_llm_deepseek_api_key --> pkg_launch_environment
pkg_llm_deepseek_api_key --> pkg_llm
@@ -695,6 +709,19 @@ flowchart TD
pkg_goal --> pkg_session
pkg_goal --> pkg_session_projection
pkg_goal --> pkg_typert_protocol
pkg_web_deepseek_api --> pkg_agent
pkg_web_deepseek_api --> pkg_credentials
pkg_web_deepseek_api --> pkg_deepseek_account
pkg_web_deepseek_api --> pkg_launch_environment
pkg_web_deepseek_api --> pkg_llm
pkg_web_deepseek_api --> pkg_session
pkg_web_deepseek_api --> pkg_web
pkg_web_search_deepseek --> pkg_agent
pkg_web_search_deepseek --> pkg_credentials
pkg_web_search_deepseek --> pkg_launch_environment
pkg_web_search_deepseek --> pkg_llm
pkg_web_search_deepseek --> pkg_session
pkg_web_search_deepseek --> pkg_web
pkg_file_reference --> pkg_agent
pkg_harness_dev_context --> pkg_agent
pkg_harness_dev_context --> pkg_session
@@ -709,14 +736,6 @@ flowchart TD
pkg_tmux_context --> pkg_session
pkg_tmux_context --> pkg_session_projection
pkg_tmux_context --> pkg_shell
pkg_deepseek_account --> pkg_agent
pkg_deepseek_account --> pkg_authorization
pkg_deepseek_account --> pkg_brand
pkg_deepseek_account --> pkg_credentials
pkg_deepseek_account --> pkg_host_webserver
pkg_deepseek_account --> pkg_llm
pkg_deepseek_account --> pkg_typert_protocol
pkg_deepseek_account --> pkg_util_values
pkg_commands --> pkg_agent
pkg_commands --> pkg_attachment
pkg_commands --> pkg_llm
@@ -766,10 +785,6 @@ flowchart TD
pkg_workflow --> pkg_agent
pkg_workflow --> pkg_llm
pkg_workflow --> pkg_session
pkg_llm_deepseek_account --> pkg_deepseek_account
pkg_llm_deepseek_account --> pkg_launch_environment
pkg_llm_deepseek_account --> pkg_llm
pkg_llm_deepseek_account --> pkg_llm_deepseek
pkg_tools --> pkg_agent
pkg_tools --> pkg_llm
pkg_tools --> pkg_scope
@@ -783,13 +798,6 @@ flowchart TD
pkg_fs_sandbox --> pkg_fs_local
pkg_fs_sandbox --> pkg_sandbox
pkg_fs_sandbox --> pkg_sandbox_policy
pkg_web_search_deepseek --> pkg_agent
pkg_web_search_deepseek --> pkg_credentials
pkg_web_search_deepseek --> pkg_deepseek_account
pkg_web_search_deepseek --> pkg_launch_environment
pkg_web_search_deepseek --> pkg_llm_deepseek
pkg_web_search_deepseek --> pkg_session
pkg_web_search_deepseek --> pkg_web
pkg_compaction --> pkg_commands
pkg_compaction --> pkg_llm
pkg_compaction --> pkg_session
@@ -898,16 +906,6 @@ flowchart TD
pkg_tool_web --> pkg_system_prompt
pkg_tool_web --> pkg_tools
pkg_tool_web --> pkg_web
pkg_web_deepseek_api --> pkg_agent
pkg_web_deepseek_api --> pkg_credentials
pkg_web_deepseek_api --> pkg_deepseek_account
pkg_web_deepseek_api --> pkg_launch_environment
pkg_web_deepseek_api --> pkg_llm
pkg_web_deepseek_api --> pkg_llm_deepseek
pkg_web_deepseek_api --> pkg_llm_deepseek_account
pkg_web_deepseek_api --> pkg_llm_deepseek_api_key
pkg_web_deepseek_api --> pkg_session
pkg_web_deepseek_api --> pkg_web
pkg_tool_todo --> pkg_agent
pkg_tool_todo --> pkg_session
pkg_tool_todo --> pkg_session_projection
@@ -1702,7 +1700,6 @@ flowchart TD
| [`client-ui-workspace`](../packages/client/ui-workspace) | `client` | — |
| [`client-web`](../packages/client/web) | `client` | — |
| [`computer-use`](../packages/computer-use/computer-use) | `computer-use` | — |
| [`credentials`](../packages/credentials/credentials) | `credentials` | — |
| [`office-kit`](../packages/document/office-kit) | `document` | — |
| [`client-ui-action-cards`](../packages/experimental/client-ui-action-cards) | `experimental` | — |
| [`client-ui-creation-recommendations`](../packages/experimental/client-ui-creation-recommendations) | `experimental` | — |
@@ -1748,10 +1745,12 @@ flowchart TD
| [`atomic-write`](../packages/util/atomic-write) | `util` | [`error`](../packages/util/error) |
| [`llm`](../packages/llm/llm) | `llm` | [`error`](../packages/util/error) |
| [`session`](../packages/core/session) | `core` | [`scope`](../packages/core/scope) |
| [`web`](../packages/web/web) | `web` | [`error`](../packages/util/error) |
| [`api-remotes`](../packages/api/remotes) | `api` | [`scope`](../packages/core/scope) |
| [`attachment`](../packages/attachment/attachment) | `attachment` | [`error`](../packages/util/error) |
| [`app-boot`](../packages/boot/app-boot) | `boot` | [`home-paths`](../packages/util/home-paths), [`launch-environment`](../packages/util/launch-environment) |
| [`client-connection`](../packages/client/connection) | `client` | [`scope`](../packages/core/scope) |
| [`credentials`](../packages/credentials/credentials) | `credentials` | [`launch-environment`](../packages/util/launch-environment) |
| [`experimental-computer-use-cua-driver-mcp`](../packages/experimental/computer-use-cua-driver-mcp) | `experimental` | [`computer-use`](../packages/computer-use/computer-use) |
| [`anonymous-user-id`](../packages/identity/anonymous-user-id) | `identity` | [`brand`](../packages/util/brand), [`home-paths`](../packages/util/home-paths) |
| [`storage-domain`](../packages/storage/storage-domain) | `storage` | [`storage`](../packages/storage/storage) |
@@ -1764,12 +1763,12 @@ flowchart TD
| [`util-ripgrep`](../packages/util/ripgrep) | `util` | [`subprocess`](../packages/subprocess/subprocess) |
| [`system-prompt`](../packages/core/system-prompt) | `core` | [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope) |
| [`skill`](../packages/skill/skill) | `skill` | [`error`](../packages/util/error), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope) |
| [`web`](../packages/web/web) | `web` | [`llm`](../packages/llm/llm) |
| [`web-fetch-http`](../packages/web/web-fetch-http) | `web` | [`timeout`](../packages/util/timeout), [`web`](../packages/web/web) |
| [`spill`](../packages/spill/spill) | `spill` | [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
| [`api-terminal-controller`](../packages/api/terminal-controller) | `api` | [`subprocess`](../packages/subprocess/subprocess) |
| [`attachment-local`](../packages/attachment/attachment-local) | `attachment` | [`attachment`](../packages/attachment/attachment), [`home-paths`](../packages/util/home-paths) |
| [`hmr`](../packages/boot/hmr) | `boot` | [`app-boot`](../packages/boot/app-boot), [`cmdline`](../packages/boot/cmdline) |
| [`authorization`](../packages/credentials/authorization) | `credentials` | [`credentials`](../packages/credentials/credentials), [`llm`](../packages/llm/llm) |
| [`authorization`](../packages/credentials/authorization) | `credentials` | [`credentials`](../packages/credentials/credentials), [`error`](../packages/util/error) |
| [`credentials-local`](../packages/credentials/credentials-local) | `credentials` | [`atomic-write`](../packages/util/atomic-write), [`credentials`](../packages/credentials/credentials), [`home-paths`](../packages/util/home-paths), [`launch-environment`](../packages/util/launch-environment) |
| [`cua-mcp`](../packages/experimental/cua-mcp) | `experimental` | [`app-boot`](../packages/boot/app-boot), [`attachment`](../packages/attachment/attachment) |
| [`experimental-webworker-runtime`](../packages/experimental/webworker-runtime) | `experimental` | [`client-connection`](../packages/client/connection), [`client-modules`](../packages/client/modules), [`host-webserver`](../packages/host/webserver) |
@@ -1790,9 +1789,9 @@ flowchart TD
| [`session-snapshot`](../packages/test-support/session-snapshot) | `test-support` | [`http-proxy`](../packages/util/http-proxy), [`session`](../packages/core/session) |
| [`fs`](../packages/fs/fs) | `fs` | [`llm`](../packages/llm/llm), [`sandbox`](../packages/sandbox/sandbox) |
| [`skill-office`](../packages/skill/skill-office) | `skill` | [`skill`](../packages/skill/skill) |
| [`web-fetch-http`](../packages/web/web-fetch-http) | `web` | [`timeout`](../packages/util/timeout), [`web`](../packages/web/web) |
| [`spill-local`](../packages/spill/spill-local) | `spill` | [`spill`](../packages/spill/spill) |
| [`session-log-export`](../packages/session-query/session-log-export) | `session-query` | [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence) |
| [`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) |
| [`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) |
@@ -1824,15 +1823,17 @@ flowchart TD
| [`lsp-stdio`](../packages/lsp/lsp-stdio) | `lsp` | [`error`](../packages/util/error), [`fs`](../packages/fs/fs), [`llm`](../packages/llm/llm), [`lsp`](../packages/lsp/lsp), [`subprocess`](../packages/subprocess/subprocess), [`timeout`](../packages/util/timeout) |
| [`bash-local`](../packages/shell/bash-local) | `shell` | [`shell`](../packages/shell/shell), [`subprocess`](../packages/subprocess/subprocess), [`timeout`](../packages/util/timeout) |
| [`pwsh-local`](../packages/shell/pwsh-local) | `shell` | [`shell`](../packages/shell/shell), [`subprocess`](../packages/subprocess/subprocess), [`timeout`](../packages/util/timeout) |
| [`llm-deepseek-account`](../packages/llm/llm-deepseek-account) | `llm` | [`agent`](../packages/core/agent), [`deepseek-account`](../packages/account/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`llm-deepseek`](../packages/llm/llm-deepseek) |
| [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key) | `llm` | [`credentials`](../packages/credentials/credentials), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`llm-deepseek`](../packages/llm/llm-deepseek) |
| [`llm-retry`](../packages/llm/llm-retry) | `llm` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`timeout`](../packages/util/timeout) |
| [`agent-default-model`](../packages/core/agent-default-model) | `core` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm) |
| [`goal`](../packages/goal/goal) | `goal` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`typert-protocol`](../packages/typert/protocol) |
| [`web-deepseek-api`](../packages/web/web-deepseek-api) | `web` | [`agent`](../packages/core/agent), [`credentials`](../packages/credentials/credentials), [`deepseek-account`](../packages/account/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`web`](../packages/web/web) |
| [`web-search-deepseek`](../packages/web/web-search-deepseek) | `web` | [`agent`](../packages/core/agent), [`credentials`](../packages/credentials/credentials), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`web`](../packages/web/web) |
| [`file-reference`](../packages/context/file-reference) | `context` | [`agent`](../packages/core/agent) |
| [`harness-dev-context`](../packages/context/harness-dev-context) | `context` | [`agent`](../packages/core/agent), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`system-prompt`](../packages/core/system-prompt) |
| [`time-context`](../packages/context/time-context) | `context` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`util-time`](../packages/util/time) |
| [`tmux-context`](../packages/context/tmux-context) | `context` | [`agent`](../packages/core/agent), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`shell`](../packages/shell/shell) |
| [`deepseek-account`](../packages/credentials/deepseek-account) | `credentials` | [`agent`](../packages/core/agent), [`authorization`](../packages/credentials/authorization), [`brand`](../packages/util/brand), [`credentials`](../packages/credentials/credentials), [`host-webserver`](../packages/host/webserver), [`llm`](../packages/llm/llm), [`typert-protocol`](../packages/typert/protocol), [`util-values`](../packages/util/values) |
| [`commands`](../packages/interaction/commands) | `interaction` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`typert-protocol`](../packages/typert/protocol) |
| [`user-approval`](../packages/interaction/user-approval) | `interaction` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`system-prompt`](../packages/core/system-prompt) |
| [`user-questions`](../packages/interaction/user-questions) | `interaction` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`typert-protocol`](../packages/typert/protocol) |
@@ -1844,11 +1845,9 @@ flowchart TD
| [`terminal`](../packages/terminal/terminal) | `terminal` | [`agent`](../packages/core/agent), [`error`](../packages/util/error) |
| [`loader-smoke`](../packages/test-support/loader-smoke) | `test-support` | [`agent`](../packages/core/agent), [`http-proxy`](../packages/util/http-proxy), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
| [`workflow`](../packages/workflow/workflow) | `workflow` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
| [`llm-deepseek-account`](../packages/llm/llm-deepseek-account) | `llm` | [`deepseek-account`](../packages/credentials/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`llm-deepseek`](../packages/llm/llm-deepseek) |
| [`tools`](../packages/core/tools) | `core` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`system-prompt`](../packages/core/system-prompt), [`user-approval`](../packages/interaction/user-approval) |
| [`command-goal`](../packages/goal/command-goal) | `goal` | [`commands`](../packages/interaction/commands), [`goal`](../packages/goal/goal), [`llm`](../packages/llm/llm) |
| [`fs-sandbox`](../packages/fs/fs-sandbox) | `fs` | [`fs`](../packages/fs/fs), [`fs-local`](../packages/fs/fs-local), [`sandbox`](../packages/sandbox/sandbox), [`sandbox-policy`](../packages/sandbox/sandbox-policy) |
| [`web-search-deepseek`](../packages/web/web-search-deepseek) | `web` | [`agent`](../packages/core/agent), [`credentials`](../packages/credentials/credentials), [`deepseek-account`](../packages/credentials/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm-deepseek`](../packages/llm/llm-deepseek), [`session`](../packages/core/session), [`web`](../packages/web/web) |
| [`compaction`](../packages/compaction/compaction) | `compaction` | [`commands`](../packages/interaction/commands), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
| [`command-feedback`](../packages/feedback/command-feedback) | `feedback` | [`anonymous-user-id`](../packages/identity/anonymous-user-id), [`commands`](../packages/interaction/commands), [`session`](../packages/core/session), [`typert-protocol`](../packages/typert/protocol) |
| [`permission-presets`](../packages/interaction/permission-presets) | `interaction` | [`agent`](../packages/core/agent), [`commands`](../packages/interaction/commands), [`sandbox`](../packages/sandbox/sandbox), [`sandbox-policy`](../packages/sandbox/sandbox-policy), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`shell`](../packages/shell/shell), [`typert-protocol`](../packages/typert/protocol), [`user-approval`](../packages/interaction/user-approval) |
@@ -1869,7 +1868,6 @@ flowchart TD
| [`tool-skill`](../packages/skill/tool-skill) | `skill` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`skill`](../packages/skill/skill), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
| [`tool-workspace-dependencies`](../packages/skill/tool-workspace-dependencies) | `skill` | [`error`](../packages/util/error), [`tools`](../packages/core/tools) |
| [`tool-web`](../packages/web/tool-web) | `web` | [`llm`](../packages/llm/llm), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`web`](../packages/web/web) |
| [`web-deepseek-api`](../packages/web/web-deepseek-api) | `web` | [`agent`](../packages/core/agent), [`credentials`](../packages/credentials/credentials), [`deepseek-account`](../packages/credentials/deepseek-account), [`launch-environment`](../packages/util/launch-environment), [`llm`](../packages/llm/llm), [`llm-deepseek`](../packages/llm/llm-deepseek), [`llm-deepseek-account`](../packages/llm/llm-deepseek-account), [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key), [`session`](../packages/core/session), [`web`](../packages/web/web) |
| [`tool-todo`](../packages/todo/tool-todo) | `todo` | [`agent`](../packages/core/agent), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`tools`](../packages/core/tools) |
| [`plan-mode`](../packages/plan/plan-mode) | `plan` | [`agent`](../packages/core/agent), [`commands`](../packages/interaction/commands), [`error`](../packages/util/error), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`user-questions`](../packages/interaction/user-questions) |
| [`command-compact`](../packages/compaction/command-compact) | `compaction` | [`commands`](../packages/interaction/commands), [`compaction`](../packages/compaction/compaction) |
+36 -36
View File
@@ -294,8 +294,8 @@
en: d278748103cf1640
zh: d278748103cf1640
/session-persistence-event-catalog/events/web/web-deepseek-search-llm-request-log-only:
en: a3e7718f295ba130
zh: e6435b44b42f0784
en: 52d1a5b0a68ac0a4
zh: 1df3a7a0da7f5fa0
/session-persistence-event-catalog/events/working-directory:
en: e8dd0cebbb930eb7
zh: e8dd0cebbb930eb7
@@ -558,8 +558,8 @@
en: 028791baa24a6a0a
zh: 028791baa24a6a0a
/session-persistence-event-catalog/resolved-persistence-types/in-history:
en: ad2f023eedbc2a7e
zh: 2124b8dedfbf8383
en: b952affc9dc40743
zh: dd5d0872283e3762
/session-persistence-event-catalog/resolved-persistence-types/in-progress:
en: 61de2b0c9de8c15b
zh: 61de2b0c9de8c15b
@@ -1029,8 +1029,8 @@
en: a6a2e38fdd6d127a
zh: 1fe82356d89f5769
/session-persistence-event-catalog/resolved-persistence-types/deepseeksearchllmrequest:
en: 75f2d0350f1916e7
zh: 959d0c49ddfb676a
en: c2b2df63604aa276
zh: ae73f57f53bb85a0
/session-persistence-event-catalog/resolved-persistence-types/developermessage:
en: a3f7241ba795de1e
zh: 084d2dd90601b2b3
@@ -1197,8 +1197,8 @@
en: 8d2873c634bf6405
zh: 91e92b5730462cf0
/session-persistence-event-catalog/resolved-persistence-types/replayenvelope:
en: 34cbedee7bc95921
zh: f7deeddb8d60152a
en: 293da0eae99bdbe8
zh: 244c9cfd281b9451
/session-persistence-event-catalog/resolved-persistence-types/requestcontext:
en: 544039047a28b6bb
zh: c691f0bb1e23db08
@@ -1248,8 +1248,8 @@
en: 29df35a8cc984e75
zh: 321b4e8bb0ad0850
/session-persistence-event-catalog/resolved-persistence-types/streamchunk:
en: 747e384b3176e0cb
zh: defbff408ea7c97c
en: 71d48d17e3763774
zh: 8cb0f1d92afa3236
/session-persistence-event-catalog/resolved-persistence-types/subagentcatalogevent:
en: 8a56ae8e701509b3
zh: caef4f0223f65470
@@ -1287,8 +1287,8 @@
en: b6bd8e9986773217
zh: ed177c2f090964af
/session-persistence-event-catalog/resolved-persistence-types/textblock:
en: 7ad0f4915397b511
zh: bcaa8bd449927989
en: e820b2d216671243
zh: a569cf66b82c57d7
/session-persistence-event-catalog/resolved-persistence-types/todoitem:
en: ee24f9407df530ac
zh: 310bedf3ac730d77
@@ -1317,8 +1317,8 @@
en: 49fcbb63c824347e
zh: 187486d676edfe0e
/session-persistence-event-catalog/resolved-persistence-types/toolschema:
en: afa1e3fd9ccdd95b
zh: 7af667e3ebac25e8
en: d9e99600cd0c02c3
zh: 9885b7337c349b41
/session-persistence-event-catalog/resolved-persistence-types/toolschema~2:
en: 12c14727bb7834e2
zh: b0f3c877873c36db
@@ -1938,8 +1938,8 @@
en: a36b909ecbd38156
zh: b02edb123e72fbb1
/session-persistence-event-catalog/resolved-persistence-types/max-tokens-messages-model-thinking:
en: 3216b23c131d0070
zh: 73ca171c6014f16e
en: efe43158304eaf7b
zh: 7a4b0d7f1a9f1c65
/session-persistence-event-catalog/resolved-persistence-types/member-teamid-version:
en: 33c28b8c72b73604
zh: 8b606ec7196176c8
@@ -1965,8 +1965,8 @@
en: b8d80b4b1e6441ad
zh: d5c52e1bfe560297
/session-persistence-event-catalog/resolved-persistence-types/role-user:
en: 04b34b8ffe7e7764
zh: a792d5371516fd9d
en: d05bb42138160fbd
zh: 9a17d062eefa48a3
/session-persistence-event-catalog/resolved-persistence-types/sessionformatversion-sessionid-throughseq:
en: 8063597183ef767f
zh: b064698c54089f07
@@ -2013,11 +2013,11 @@
en: bb507524bcc39c53
zh: 8314898562437473
/session-persistence-event-catalog/resolved-persistence-types/type-block-end:
en: 7513d6a33f4ad113
zh: 652201059a3de858
en: 13224de3736d2d48
zh: 6bf99a32b41f7165
/session-persistence-event-catalog/resolved-persistence-types/type-block-start:
en: 56230efa41e79869
zh: 9ca4b8990a28d4d9
en: 598ec19ec3abf6ed
zh: 84efc0177a9fd177
/session-persistence-event-catalog/resolved-persistence-types/type-chunk:
en: 4b0ed1fe2caa26fb
zh: 8fffdc4f8c3deb79
@@ -2046,8 +2046,8 @@
en: 5c0287505cfa913b
zh: 5e783b2e19464855
/session-persistence-event-catalog/resolved-persistence-types/type-disabled:
en: 585627a50ece4e5f
zh: 157837aee3da0ac3
en: 04db8a26a3befdd4
zh: 8b24a37ac00bac8a
/session-persistence-event-catalog/resolved-persistence-types/type-feedback-message-delete:
en: 204561e2311db97e
zh: 77264396bd5e25c4
@@ -2058,8 +2058,8 @@
en: 14e4b48d856bcf57
zh: 72ba176535dc7f3f
/session-persistence-event-catalog/resolved-persistence-types/type-finish:
en: 30f8f49d0755dc2d
zh: d8553c9590a0e9bf
en: e1b5a95753e1984b
zh: 3a04bd831ff9f12d
/session-persistence-event-catalog/resolved-persistence-types/type-goal-change:
en: aad2516b62d3ee83
zh: e7204c4dc4e8e408
@@ -2097,8 +2097,8 @@
en: 4bf62582902829c5
zh: c9da9d11402ee1c4
/session-persistence-event-catalog/resolved-persistence-types/type-reasoning-delta:
en: a3f08ffda3526201
zh: e599517be130ff99
en: a2952ab46acfed9d
zh: b4e68befe87800dd
/session-persistence-event-catalog/resolved-persistence-types/type-request-context:
en: f8addb1a01da9ca1
zh: 4ef11ebddd302c05
@@ -2160,8 +2160,8 @@
en: 28bab22053eabff2
zh: 54c0e424fcb99c05
/session-persistence-event-catalog/resolved-persistence-types/type-text-delta:
en: 5f30a603fab07135
zh: 3b7e2076351a1473
en: 9856f0f63d3b413c
zh: c3bae6ac9e949696
/session-persistence-event-catalog/resolved-persistence-types/type-todo-write:
en: 2fa7ba77598a95b4
zh: 50972b51d77e9155
@@ -2169,8 +2169,8 @@
en: 45ff4145d9e2c7d4
zh: 36a346ff729c4b84
/session-persistence-event-catalog/resolved-persistence-types/type-tool-call-delta:
en: 0e907728f330a8c7
zh: d9d1400d4c468ab2
en: 7c45dcb12f5fedb5
zh: eea8f79e052f2bf0
/session-persistence-event-catalog/resolved-persistence-types/type-tool-workflow-agent-end:
en: 8eb5e1eb95722bc7
zh: 8dd5980029600648
@@ -2202,8 +2202,8 @@
en: 1b045de96172be4b
zh: 8a15c6f35b576b37
/session-persistence-event-catalog/resolved-persistence-types/type-usage:
en: 0ce623d4c59f5a2f
zh: 2d830e6e1badb1ba
en: 2b86abaff8e6aaa8
zh: 4afeeb9af04b72f0
/session-persistence-event-catalog/resolved-persistence-types/type-user-message:
en: 6e4884da342f291a
zh: 454973316ff24910
@@ -2211,8 +2211,8 @@
en: 99c8837344178a47
zh: bf746f5678346596
/session-persistence-event-catalog/resolved-persistence-types/type-web-search-20250305:
en: e0071555851c7cee
zh: 1f368baf78a7d689
en: 557e9462b176c4a3
zh: 4dddcab9de61639f
/session-persistence-event-catalog/resolved-persistence-types/type-working-directory-change:
en: 2fcb09b83898ee18
zh: 44c7f987f0bf3588
+18 -18
View File
@@ -1313,7 +1313,7 @@ Source: [`packages/core/session/src/types.ts:315`](../packages/core/session/src/
'web/deepseek-search-llm-request': DeepSeekSearchLlmRequest
```
Source: [`packages/web/web-search-deepseek/src/provider.ts:89`](../packages/web/web-search-deepseek/src/provider.ts)
Source: [`packages/web/web-search-deepseek/src/provider.ts:90`](../packages/web/web-search-deepseek/src/provider.ts)
### `working-directory/*`
@@ -2018,7 +2018,7 @@ SHA-256: `ebb768d85ec87fb68e42fc14fd7d8535b5ac11791b14d04c6770180f0a719bf8`
SHA-256: `f311671e07bc7fa645a0b6597de9966b97147956565296ba76a36543801b66c5`
Sources: [`packages/llm/llm/src/types.ts:440`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:528`](../packages/llm/llm/src/types.ts)
`"in-history"`
@@ -3426,7 +3426,7 @@ Sources: [`packages/subagent/subagent/src/descriptor.ts:72`](../packages/subagen
SHA-256: `abd6ca62a5ab166553848324a23fef90eed7f59c8021bd63e7ea5bc6fd666b0c`
Sources: [`packages/web/web-search-deepseek/src/provider.ts:55`](../packages/web/web-search-deepseek/src/provider.ts)
Sources: [`packages/web/web-search-deepseek/src/provider.ts:56`](../packages/web/web-search-deepseek/src/provider.ts)
| Property | Presence | Type |
|---|---|---|
@@ -4573,7 +4573,7 @@ Sources: [`packages/llm/llm/src/types.ts:75`](../packages/llm/llm/src/types.ts)
SHA-256: `0acd94fe8794574c9ae72c7855ee16d29c546096d4af760d16d1225385764555`
Sources: [`packages/llm/llm/src/types.ts:474`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:562`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -4887,7 +4887,7 @@ Sources: [`packages/skill/skill/src/index.ts:149`](../packages/skill/skill/src/i
SHA-256: `47e9095591ae36e7c39ee62553097772f2bfa16304536a72dbbc3f691f605180`
Sources: [`packages/llm/llm/src/types.ts:496`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:584`](../packages/llm/llm/src/types.ts)
One of:
@@ -5144,7 +5144,7 @@ One of:
SHA-256: `4e887768586528565381dadbddee6cef555874148089f4579e0b4b1ad096fc9c`
Sources: [`packages/llm/llm/src/types.ts:69`](../packages/llm/llm/src/types.ts) · [`packages/web/web-search-deepseek/src/provider.ts:66`](../packages/web/web-search-deepseek/src/provider.ts)
Sources: [`packages/llm/llm/src/types.ts:69`](../packages/llm/llm/src/types.ts) · [`packages/web/web-search-deepseek/src/provider.ts:67`](../packages/web/web-search-deepseek/src/provider.ts)
| Property | Presence | Type |
|---|---|---|
@@ -5316,7 +5316,7 @@ Sources: [`packages/llm/llm/src/message.ts:172`](../packages/llm/llm/src/message
SHA-256: `66ba70f6f068da443f969a0b947a013c3addd776b9b60a0a393759c19825e9a2`
Sources: [`packages/llm/llm/src/types.ts:517`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:605`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -7982,7 +7982,7 @@ Sources: [`packages/session/working-directory/src/index.ts:49`](../packages/sess
SHA-256: `9c001ecb5e1d3c3894410db2a1e383842e5f8454fb52182338686158abc1b3ee`
Sources: [`packages/web/web-search-deepseek/src/provider.ts:61`](../packages/web/web-search-deepseek/src/provider.ts)
Sources: [`packages/web/web-search-deepseek/src/provider.ts:62`](../packages/web/web-search-deepseek/src/provider.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8106,7 +8106,7 @@ Sources: [`packages/core/session/src/types.ts:303`](../packages/core/session/src
SHA-256: `9a2a9029f8d7ede05336980d8342737557f487b913bfd28853d0ab5214600ab5`
Sources: [`packages/web/web-search-deepseek/src/provider.ts:64`](../packages/web/web-search-deepseek/src/provider.ts)
Sources: [`packages/web/web-search-deepseek/src/provider.ts:65`](../packages/web/web-search-deepseek/src/provider.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8337,7 +8337,7 @@ SHA-256: `1033093edd0db80ff410e00830b523405e00bb0c7684948e531ff65095799625`
SHA-256: `d4b739491689cc6bb13d07ffac1a32239875abda364c0d5edd8f74faf5e9c00d`
Sources: [`packages/llm/llm/src/types.ts:501`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:589`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8351,7 +8351,7 @@ Sources: [`packages/llm/llm/src/types.ts:501`](../packages/llm/llm/src/types.ts)
SHA-256: `3bec87f9e6ab3da03346f49923d3c51621debc0159df68605e543c3b2a026f90`
Sources: [`packages/llm/llm/src/types.ts:497`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:585`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8509,7 +8509,7 @@ SHA-256: `7ee5a828196d9e4b1672f94f977e68f37125da4297c23029dd682823c09e12fd`
SHA-256: `37ff65426bcf130f045d3a59ef2a4648eb170cd30280cbd024108a2e9b4401d1`
Sources: [`packages/web/web-search-deepseek/src/provider.ts:82`](../packages/web/web-search-deepseek/src/provider.ts)
Sources: [`packages/web/web-search-deepseek/src/provider.ts:83`](../packages/web/web-search-deepseek/src/provider.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8569,7 +8569,7 @@ SHA-256: `b54940ff095c17e874c5be03815f4c2145a256cf3a1d34dae4ab2f7769dfffe8`
SHA-256: `a2b49331716ba0a7078b026d145306a70eae64b7313c3e6204bd931e75ec3bb1`
Sources: [`packages/llm/llm/src/types.ts:503`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:591`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8775,7 +8775,7 @@ Sources: [`packages/llm/llm/src/assistant-stream.ts:27`](../packages/llm/llm/src
SHA-256: `2abb711460e6238d851c30f3e4bdd87a2aa1887ee70575b3d3b7b25610673095`
Sources: [`packages/llm/llm/src/types.ts:499`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:587`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -9111,7 +9111,7 @@ Sources: [`packages/llm/llm/src/assistant-stream.ts:20`](../packages/llm/llm/src
SHA-256: `95080295115fbd83544520ba247b68a03790131f6a2eac323d388758cb542f65`
Sources: [`packages/llm/llm/src/types.ts:498`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:586`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -9159,7 +9159,7 @@ Sources: [`packages/llm/llm/src/assistant-stream.ts:34`](../packages/llm/llm/src
SHA-256: `88a610b831be6d92612a464be5c7d0b88ec24d97bd299837bf74bf7672183c9a`
Sources: [`packages/llm/llm/src/types.ts:500`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:588`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -9337,7 +9337,7 @@ SHA-256: `aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8`
SHA-256: `f1a96afe7503ac1817de769cd0ba13d9b80111c7034c50106b3344ecc14cc515`
Sources: [`packages/llm/llm/src/types.ts:502`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:590`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -9384,7 +9384,7 @@ SHA-256: `0c556c9b9f2a96238a6b9bbb99e748206cbff2ed6203041c9571f04ae5802f52`
SHA-256: `2d11ca7b0d4493e244b74eba093227866b33249841e59a1e9bf56afed38604c3`
Sources: [`packages/web/web-search-deepseek/src/provider.ts:71`](../packages/web/web-search-deepseek/src/provider.ts)
Sources: [`packages/web/web-search-deepseek/src/provider.ts:72`](../packages/web/web-search-deepseek/src/provider.ts)
| Property | Presence | Type |
|---|---|---|
+18 -18
View File
@@ -1315,7 +1315,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
'web/deepseek-search-llm-request': DeepSeekSearchLlmRequest
```
来源:[`packages/web/web-search-deepseek/src/provider.ts:89`](../packages/web/web-search-deepseek/src/provider.ts)
来源:[`packages/web/web-search-deepseek/src/provider.ts:90`](../packages/web/web-search-deepseek/src/provider.ts)
### `working-directory/*`
@@ -2020,7 +2020,7 @@ SHA-256: `ebb768d85ec87fb68e42fc14fd7d8535b5ac11791b14d04c6770180f0a719bf8`
SHA-256: `f311671e07bc7fa645a0b6597de9966b97147956565296ba76a36543801b66c5`
来源:[`packages/llm/llm/src/types.ts:440`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:528`](../packages/llm/llm/src/types.ts)
`"in-history"`
@@ -3428,7 +3428,7 @@ SHA-256: `6487b10ba7542f3c447b1e41a1c6a590b7bfafe0b9b66b49f34028da85bb970f`
SHA-256: `abd6ca62a5ab166553848324a23fef90eed7f59c8021bd63e7ea5bc6fd666b0c`
来源:[`packages/web/web-search-deepseek/src/provider.ts:55`](../packages/web/web-search-deepseek/src/provider.ts)
来源:[`packages/web/web-search-deepseek/src/provider.ts:56`](../packages/web/web-search-deepseek/src/provider.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -4575,7 +4575,7 @@ SHA-256: `814d9434e1ddf9078612b3b34322f26e9363b469213335007f7e9ba7fee9464e`
SHA-256: `0acd94fe8794574c9ae72c7855ee16d29c546096d4af760d16d1225385764555`
来源:[`packages/llm/llm/src/types.ts:474`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:562`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -4889,7 +4889,7 @@ SHA-256: `672c4aa2a9b736e3d6e5da6346d2e2ed5e3573f2d0baafa18e7407c9f3fee3db`
SHA-256: `47e9095591ae36e7c39ee62553097772f2bfa16304536a72dbbc3f691f605180`
来源:[`packages/llm/llm/src/types.ts:496`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:584`](../packages/llm/llm/src/types.ts)
以下类型之一:
@@ -5146,7 +5146,7 @@ SHA-256: `b2d2a01e51341a3bfec809198952c8c830a7899f4cb6ecd3c1dc0b5d9a2af943`
SHA-256: `4e887768586528565381dadbddee6cef555874148089f4579e0b4b1ad096fc9c`
来源:[`packages/llm/llm/src/types.ts:69`](../packages/llm/llm/src/types.ts) · [`packages/web/web-search-deepseek/src/provider.ts:66`](../packages/web/web-search-deepseek/src/provider.ts)
来源:[`packages/llm/llm/src/types.ts:69`](../packages/llm/llm/src/types.ts) · [`packages/web/web-search-deepseek/src/provider.ts:67`](../packages/web/web-search-deepseek/src/provider.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -5318,7 +5318,7 @@ SHA-256: `4b259f7f8f0a44ad5e90b70a73553ced1df27012d126921d397ff403b6c86731`
SHA-256: `66ba70f6f068da443f969a0b947a013c3addd776b9b60a0a393759c19825e9a2`
来源:[`packages/llm/llm/src/types.ts:517`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:605`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -7984,7 +7984,7 @@ SHA-256: `2235d957bf4b7c6cf959231d480f0ba1f3a6d72d82981493fb6c7c963021d3d5`
SHA-256: `9c001ecb5e1d3c3894410db2a1e383842e5f8454fb52182338686158abc1b3ee`
来源:[`packages/web/web-search-deepseek/src/provider.ts:61`](../packages/web/web-search-deepseek/src/provider.ts)
来源:[`packages/web/web-search-deepseek/src/provider.ts:62`](../packages/web/web-search-deepseek/src/provider.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8108,7 +8108,7 @@ SHA-256: `e481c46af3813e0010558e93f578b2986acd658404cec2d1679e3ac2a6c48654`
SHA-256: `9a2a9029f8d7ede05336980d8342737557f487b913bfd28853d0ab5214600ab5`
来源:[`packages/web/web-search-deepseek/src/provider.ts:64`](../packages/web/web-search-deepseek/src/provider.ts)
来源:[`packages/web/web-search-deepseek/src/provider.ts:65`](../packages/web/web-search-deepseek/src/provider.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8339,7 +8339,7 @@ SHA-256: `1033093edd0db80ff410e00830b523405e00bb0c7684948e531ff65095799625`
SHA-256: `d4b739491689cc6bb13d07ffac1a32239875abda364c0d5edd8f74faf5e9c00d`
来源:[`packages/llm/llm/src/types.ts:501`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:589`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8353,7 +8353,7 @@ SHA-256: `d4b739491689cc6bb13d07ffac1a32239875abda364c0d5edd8f74faf5e9c00d`
SHA-256: `3bec87f9e6ab3da03346f49923d3c51621debc0159df68605e543c3b2a026f90`
来源:[`packages/llm/llm/src/types.ts:497`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:585`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8511,7 +8511,7 @@ SHA-256: `7ee5a828196d9e4b1672f94f977e68f37125da4297c23029dd682823c09e12fd`
SHA-256: `37ff65426bcf130f045d3a59ef2a4648eb170cd30280cbd024108a2e9b4401d1`
来源:[`packages/web/web-search-deepseek/src/provider.ts:82`](../packages/web/web-search-deepseek/src/provider.ts)
来源:[`packages/web/web-search-deepseek/src/provider.ts:83`](../packages/web/web-search-deepseek/src/provider.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8571,7 +8571,7 @@ SHA-256: `b54940ff095c17e874c5be03815f4c2145a256cf3a1d34dae4ab2f7769dfffe8`
SHA-256: `a2b49331716ba0a7078b026d145306a70eae64b7313c3e6204bd931e75ec3bb1`
来源:[`packages/llm/llm/src/types.ts:503`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:591`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8777,7 +8777,7 @@ SHA-256: `71bb3254ec8f1e491ce63b762a7b5f18709de23aa4e8abcc8b886f4b6ce051dd`
SHA-256: `2abb711460e6238d851c30f3e4bdd87a2aa1887ee70575b3d3b7b25610673095`
来源:[`packages/llm/llm/src/types.ts:499`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:587`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -9113,7 +9113,7 @@ SHA-256: `e72269f931559e901e5e8fe1cfcbd0669fb795f43cc038ff39fba62f60403c33`
SHA-256: `95080295115fbd83544520ba247b68a03790131f6a2eac323d388758cb542f65`
来源:[`packages/llm/llm/src/types.ts:498`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:586`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -9161,7 +9161,7 @@ SHA-256: `3860b4757d512a2869be833acb0faf834335b1b056bf3f83df5474dce95f8fa6`
SHA-256: `88a610b831be6d92612a464be5c7d0b88ec24d97bd299837bf74bf7672183c9a`
来源:[`packages/llm/llm/src/types.ts:500`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:588`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -9339,7 +9339,7 @@ SHA-256: `aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8`
SHA-256: `f1a96afe7503ac1817de769cd0ba13d9b80111c7034c50106b3344ecc14cc515`
来源:[`packages/llm/llm/src/types.ts:502`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:590`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -9386,7 +9386,7 @@ SHA-256: `0c556c9b9f2a96238a6b9bbb99e748206cbff2ed6203041c9571f04ae5802f52`
SHA-256: `2d11ca7b0d4493e244b74eba093227866b33249841e59a1e9bf56afed38604c3`
来源:[`packages/web/web-search-deepseek/src/provider.ts:71`](../packages/web/web-search-deepseek/src/provider.ts)
来源:[`packages/web/web-search-deepseek/src/provider.ts:72`](../packages/web/web-search-deepseek/src/provider.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
+17 -17
View File
@@ -89,7 +89,7 @@
{"digest":"0a8a062bc9c3c0d97fd97742262f2ea53dd32297f834e81114870d38ac3dc6da","names":[],"sources":[]},
{"digest":"0a92c5bdfa06c2e2615b777728f3aa95f408d43b9012e7b754568311251db623","names":[],"sources":["packages/experimental/liveshare/src/host/viewer-principal.ts:29"]},
{"digest":"0aa62ab51b36c0e64b134bd03ba8725d758744180a1a447da49beaad194f219f","names":[],"sources":[]},
{"digest":"0acd94fe8794574c9ae72c7855ee16d29c546096d4af760d16d1225385764555","names":["packages/llm/llm/src/types.ts#ReplayEnvelope"],"sources":["packages/llm/llm/src/types.ts:474"]},
{"digest":"0acd94fe8794574c9ae72c7855ee16d29c546096d4af760d16d1225385764555","names":["packages/llm/llm/src/types.ts#ReplayEnvelope"],"sources":["packages/llm/llm/src/types.ts:562"]},
{"digest":"0aed9f5c80e82b6e80e92eace5b9e23cd5e58c567d37b4321cd147d51342e212","names":["packages/llm/llm/src/message.ts#UserMessage"],"sources":["packages/llm/llm/src/message.ts:161"]},
{"digest":"0af3ecfb8c60d416fc40a7cc4fb2c4851a8e46608b2b38ab9e510670c971aa1f","names":[],"sources":[]},
{"digest":"0b6d718c693fdf7f06dcccb0bcbbabe78cc63514eafc62d6b2a3899735279d6f","names":["packages/goal/goal/src/types.ts#GoalRef"],"sources":["packages/goal/goal/src/types.ts:20"]},
@@ -182,11 +182,11 @@
{"digest":"297fbd8067d7815adae02b89790ec6ff5fb7c2cb0d0eb026e1746c24ec857761","names":[],"sources":[]},
{"digest":"2aad1179f957631477b582e57cd8f538cb82618fc3fb816bde1171154235b065","names":[],"sources":[]},
{"digest":"2ab12a0e345658f9342816d773fe610f049982bcad82631f43b9205abe43e5ee","names":[],"sources":[]},
{"digest":"2abb711460e6238d851c30f3e4bdd87a2aa1887ee70575b3d3b7b25610673095","names":[],"sources":["packages/llm/llm/src/types.ts:499"]},
{"digest":"2abb711460e6238d851c30f3e4bdd87a2aa1887ee70575b3d3b7b25610673095","names":[],"sources":["packages/llm/llm/src/types.ts:587"]},
{"digest":"2aed07493b1c65b6d00de5586da1e743cf501684b9ad43a1765fb4007d4ea456","names":[],"sources":[]},
{"digest":"2c4c21f19f426a58f2dac914e34313aa43f8408972de857a486d1f086d5adb6c","names":[],"sources":[]},
{"digest":"2c64d4bc7264fd3f8bed47e96ab8a593bce05a1e4e1c436dcd244a3b7e0c2a9d","names":[],"sources":[]},
{"digest":"2d11ca7b0d4493e244b74eba093227866b33249841e59a1e9bf56afed38604c3","names":[],"sources":["packages/web/web-search-deepseek/src/provider.ts:71"]},
{"digest":"2d11ca7b0d4493e244b74eba093227866b33249841e59a1e9bf56afed38604c3","names":[],"sources":["packages/web/web-search-deepseek/src/provider.ts:72"]},
{"digest":"2da725e554cd89301d829ed9dc45a572c3cd1b93b5e91d0d71f007976d8a0863","names":[],"sources":[]},
{"digest":"2e3523541e942ef6cc9fbc5b91f242e0ca4c6ada479b79b96025b797f6e41f3f","names":["packages/schedule/schedule/src/types.ts#ScheduleChange"],"sources":["packages/schedule/schedule/src/types.ts:232"]},
{"digest":"2e4debca12f2c449f96dc6574f3fbf2fb346193443114a241d01a236362ec48c","names":[],"sources":[]},
@@ -211,7 +211,7 @@
{"digest":"374fdd68aee5ff844e378c0cbdd961d247a0f22e4ade0bb03d800cd2a46a2b8b","names":[],"sources":["packages/llm/llm-retry/src/types.ts:30"]},
{"digest":"378f90f9f6022a0991928a1eaf7991094ea1920fe89a9248358a1da106e1a970","names":[],"sources":[]},
{"digest":"37cbc9cf06d494cfe5c67f078af1605eacb8e4c2c853e9e26455b73de0ee7ccf","names":[],"sources":[]},
{"digest":"37ff65426bcf130f045d3a59ef2a4648eb170cd30280cbd024108a2e9b4401d1","names":[],"sources":["packages/web/web-search-deepseek/src/provider.ts:82"]},
{"digest":"37ff65426bcf130f045d3a59ef2a4648eb170cd30280cbd024108a2e9b4401d1","names":[],"sources":["packages/web/web-search-deepseek/src/provider.ts:83"]},
{"digest":"383cf73ae4748e5beb281ae74857ba1ffb92ae01075b9fbf51af78b666007a8f","names":[],"sources":[]},
{"digest":"3860b4757d512a2869be833acb0faf834335b1b056bf3f83df5474dce95f8fa6","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:34"]},
{"digest":"390eed1028aba02774f14408647acec10ec5516e97d4f15ecde2b9989d5a69f2","names":["packages/feedback/message-feedback/src/types.ts#MessageFeedbackRating"],"sources":["packages/feedback/message-feedback/src/types.ts:17"]},
@@ -224,7 +224,7 @@
{"digest":"3bc287e765d58dc3a22672a0495a6cfd561220dd38fbaecef80aa95b96caed79","names":[],"sources":[]},
{"digest":"3bd652ebfa8726b3ce3937a4f1bd2759e02f86b3a08a20f9e41a8513656fbc5f","names":["packages/core/session/src/types.ts#OptionalSessionSeq"],"sources":["packages/core/session/src/types.ts:66"]},
{"digest":"3bdb8dc6989655b0d4ec361edafb8e2629bc263e1ea591819414fdafc1a413b3","names":[],"sources":[]},
{"digest":"3bec87f9e6ab3da03346f49923d3c51621debc0159df68605e543c3b2a026f90","names":[],"sources":["packages/llm/llm/src/types.ts:497"]},
{"digest":"3bec87f9e6ab3da03346f49923d3c51621debc0159df68605e543c3b2a026f90","names":[],"sources":["packages/llm/llm/src/types.ts:585"]},
{"digest":"3bfeb47b58606f4661904bc723da612782214c463d01e6d61cd6d6193d7374e1","names":[],"sources":[]},
{"digest":"3c2535ca0a2062f172f15344f8040755002b5ac506cf94fc4ebaa822b15feb8c","names":[],"sources":[]},
{"digest":"3cfc3a56502da1f8c6153c2c56657bab4b749056968634dd0991d325ec1c919f","names":["packages/core/tools/src/contracts.ts#ToolRestriction"],"sources":["packages/core/tools/src/contracts.ts:395"]},
@@ -249,7 +249,7 @@
{"digest":"45f2a07ea94573123b6ae14db787a40062dec3834f36d8be92c523d40ba28448","names":[],"sources":["packages/interaction/user-approval/src/types.ts:44"]},
{"digest":"477614bca595a9e7adb5a1870be446b9a8684f3ba8950259d6289f2d3b74f028","names":[],"sources":["packages/compaction/compaction-image-offload/src/projection.ts:25"]},
{"digest":"47e5d84f1a93450a78c7f3954b43990d0f629af7c034a56313e5deb63e772c1b","names":[],"sources":[]},
{"digest":"47e9095591ae36e7c39ee62553097772f2bfa16304536a72dbbc3f691f605180","names":["packages/llm/llm/src/types.ts#StreamChunk"],"sources":["packages/llm/llm/src/types.ts:496"]},
{"digest":"47e9095591ae36e7c39ee62553097772f2bfa16304536a72dbbc3f691f605180","names":["packages/llm/llm/src/types.ts#StreamChunk"],"sources":["packages/llm/llm/src/types.ts:584"]},
{"digest":"487b65c37bfedb8b72088c4107a0a90a6249701f6b26745f6d98f9b8a22b07c7","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:43"]},
{"digest":"48e5c9861f16ac07e78cb7b5ae9dabdf7bb85c58baed5a51b4ad275050ea58e3","names":[],"sources":[]},
{"digest":"48f9c19417a1abbedfa59f4667bba36b93ac2db407adf5e84cb3ba0de30942cb","names":[],"sources":[]},
@@ -267,7 +267,7 @@
{"digest":"4d60dddaa65d3da8d4cd014d85ce3d2c2875664dd0433e331d8e9d395289686b","names":["packages/experimental/liveshare/src/host/viewer-principal.ts#ShareViewerPrincipal"],"sources":["packages/experimental/liveshare/src/host/viewer-principal.ts:24"]},
{"digest":"4e011753f8263f436efaabfbb3b4db53a98fc55342c5ded2daf7208b217be159","names":[],"sources":[]},
{"digest":"4e44c9118152f6829634bfd508e47669ab0497caffa380c94b4be91f9390d35d","names":[],"sources":[]},
{"digest":"4e887768586528565381dadbddee6cef555874148089f4579e0b4b1ad096fc9c","names":["packages/llm/llm/src/types.ts#TextBlock"],"sources":["packages/llm/llm/src/types.ts:69","packages/web/web-search-deepseek/src/provider.ts:66"]},
{"digest":"4e887768586528565381dadbddee6cef555874148089f4579e0b4b1ad096fc9c","names":["packages/llm/llm/src/types.ts#TextBlock"],"sources":["packages/llm/llm/src/types.ts:69","packages/web/web-search-deepseek/src/provider.ts:67"]},
{"digest":"4edec1b770e8ec4ce1220bf42edc5ac46713a1b48d4caa778dcfc98bad1f28a3","names":[],"sources":[]},
{"digest":"4ee17e4219bd5fab6148ec0a8b3ec0fb939edb8f211374cf779bc8135ef9bed2","names":[],"sources":[]},
{"digest":"4f507598cf476214aa7646ce7841a7064a9dcb05d0a1eaaefaf79c2b738f160f","names":[],"sources":[]},
@@ -326,7 +326,7 @@
{"digest":"6598cd6da253948d6b207c6374a45335804c79b576866d6215649c2d1bc85e25","names":["packages/team/agent-team/src/types.ts#TeamMemberSnapshot"],"sources":["packages/team/agent-team/src/types.ts:50"]},
{"digest":"65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad","names":["packages/llm/llm/src/message.ts#SystemPromptMessageSource"],"sources":["packages/llm/llm/src/message.ts:34"]},
{"digest":"65d583e66518c5236015e0846470fb32efcf92375ed306aef14e50a9d2cd2099","names":["packages/skill/tool-skill/src/index.ts#SkillCatalogSource"],"sources":["packages/skill/tool-skill/src/index.ts:36"]},
{"digest":"66ba70f6f068da443f969a0b947a013c3addd776b9b60a0a393759c19825e9a2","names":["packages/llm/llm/src/types.ts#ToolSchema"],"sources":["packages/llm/llm/src/types.ts:517"]},
{"digest":"66ba70f6f068da443f969a0b947a013c3addd776b9b60a0a393759c19825e9a2","names":["packages/llm/llm/src/types.ts#ToolSchema"],"sources":["packages/llm/llm/src/types.ts:605"]},
{"digest":"672c4aa2a9b736e3d6e5da6346d2e2ed5e3573f2d0baafa18e7407c9f3fee3db","names":["packages/skill/skill/src/index.ts#SkillInvocationSource"],"sources":["packages/skill/skill/src/index.ts:149"]},
{"digest":"67d5f73ceae82f5265258142ad6cf172de2c1fef93ba551b7f0454e0a93bffe0","names":["packages/llm/llm/src/call-config.ts#LlmCallConfig"],"sources":["packages/llm/llm/src/call-config.ts:30"]},
{"digest":"68141cbe3994a5ffcd064c07c75996538437fd9dbf77ce8a2927e89ec577fabe","names":[],"sources":[]},
@@ -413,7 +413,7 @@
{"digest":"871bfd6f7bb91061246768d3377f3fd58d6b8ea7c31f44c714ae7ab215650d62","names":[],"sources":[]},
{"digest":"87b1a33564b9a4d63b00988a524c12259243953aebb9c9a05127d87b27464df9","names":[],"sources":[]},
{"digest":"88841202942c7683b3b7e5ea6a796047ec326b6701ac23e58cc236d85613b9fa","names":[],"sources":[]},
{"digest":"88a610b831be6d92612a464be5c7d0b88ec24d97bd299837bf74bf7672183c9a","names":[],"sources":["packages/llm/llm/src/types.ts:500"]},
{"digest":"88a610b831be6d92612a464be5c7d0b88ec24d97bd299837bf74bf7672183c9a","names":[],"sources":["packages/llm/llm/src/types.ts:588"]},
{"digest":"8a046b52331959aa3394680d6acbe09b8a5447c6b61375f263445bfcef19b7f1","names":[],"sources":[]},
{"digest":"8a6e1ec9e8db346b0e02f027db73c07a94f067a26d40c1aef1abd09c47ce7ba0","names":[],"sources":[]},
{"digest":"8a9c990773f798eac10ca8878e6bcc531ee080bc589cac956730e462cc6a09ad","names":[],"sources":["packages/interaction/permission-presets/src/index.ts:61"]},
@@ -441,7 +441,7 @@
{"digest":"93cbbc5a7fd0b1aa1ff1b9a6bb5ec52b073f48e5a5200365c45c0cd54059e1b9","names":[],"sources":["packages/interaction/user-approval/src/types.ts:55"]},
{"digest":"93d38436347f67c9022aacbc4472e283d722bcab8eb73fc376aaf7b6a6b9fb35","names":[],"sources":[]},
{"digest":"94c56aeb1564ad735eb773d88636b40761d063efa1610f1308004d32923f5378","names":[],"sources":[]},
{"digest":"95080295115fbd83544520ba247b68a03790131f6a2eac323d388758cb542f65","names":[],"sources":["packages/llm/llm/src/types.ts:498"]},
{"digest":"95080295115fbd83544520ba247b68a03790131f6a2eac323d388758cb542f65","names":[],"sources":["packages/llm/llm/src/types.ts:586"]},
{"digest":"95a3ffccbf3c8afcf9a2f3b355f724da8e07e98dc47ee741166dde7f9ea058bd","names":[],"sources":[]},
{"digest":"95c0e88fcf0bafb2087f912ad9e2369de6ae6530cc0c4c2772c96205b57f7f60","names":[],"sources":[]},
{"digest":"9645cf93769a6dfb227bd400bd6cb9fa7bab9140f4a851e4ae92514ade6e3114","names":[],"sources":[]},
@@ -453,13 +453,13 @@
{"digest":"998f22585a5d73ec005365e203f07fc3b3a029e82323fdda3fd7f13b0a9639d0","names":[],"sources":[]},
{"digest":"99e7e7d7fed55ae6a3a648b35192f16ab1248ddcb0179a0e275128ac1487d7c7","names":[],"sources":[]},
{"digest":"99f0e98184709ad10f27bfdeaafb4457d9d2b413f402331764798cdb7d3cbe4d","names":[],"sources":[]},
{"digest":"9a2a9029f8d7ede05336980d8342737557f487b913bfd28853d0ab5214600ab5","names":[],"sources":["packages/web/web-search-deepseek/src/provider.ts:64"]},
{"digest":"9a2a9029f8d7ede05336980d8342737557f487b913bfd28853d0ab5214600ab5","names":[],"sources":["packages/web/web-search-deepseek/src/provider.ts:65"]},
{"digest":"9a410ddf56792b2b7cd4a224a2e54dc4dee30a8e8e6b1c2b9a1d19992b217adc","names":["packages/workflow/tool-workflow/src/types.ts#ToolWorkflowAgentStartData"],"sources":["packages/workflow/tool-workflow/src/types.ts:20"]},
{"digest":"9a930283b91d493d6347146f2475bb107294b379415ca02162354f46a64164f7","names":["packages/core/session/src/types.ts#EpochHeader"],"sources":["packages/core/session/src/types.ts:246"]},
{"digest":"9ac52f0f84fec2eb9f71c2937e497d759db5ca0da4836d93a679d113684141f2","names":[],"sources":[]},
{"digest":"9acbe713f3f641921dd3333b240aa72e176d795327c24e8d9db9b68b16771b49","names":[],"sources":[]},
{"digest":"9b4fd974c124c83743efe030ba4e1250e087505f3f74588716a521fb8d453267","names":[],"sources":[]},
{"digest":"9c001ecb5e1d3c3894410db2a1e383842e5f8454fb52182338686158abc1b3ee","names":[],"sources":["packages/web/web-search-deepseek/src/provider.ts:61"]},
{"digest":"9c001ecb5e1d3c3894410db2a1e383842e5f8454fb52182338686158abc1b3ee","names":[],"sources":["packages/web/web-search-deepseek/src/provider.ts:62"]},
{"digest":"9d80129e13edfb6feb03ed327e6085c6ef60b97ad074244b2f5fd4667424a6a4","names":[],"sources":[]},
{"digest":"9e07693fd7cd9babe0688c22c986e4d519ae1c0e40eeea13b2dc583bed2abc86","names":[],"sources":[]},
{"digest":"9e2c06d8653585b33d72d5c1a80da79c8a24a88c284409bca15cc0f0ead5ebfb","names":[],"sources":[]},
@@ -475,7 +475,7 @@
{"digest":"a15a19ef63cf5d1b711db1d249821dab0cedcd3a9ad09137b47352c93841fd20","names":[],"sources":[]},
{"digest":"a16e567c8cd2c55cf1e911aed3c200c4e1f6febb1459ff2a9e7adf159afb68cb","names":[],"sources":[]},
{"digest":"a2066bd52f61218ba15b758def2641cc6a8bd3d4a594a488ee4c65be356d7e39","names":[],"sources":[]},
{"digest":"a2b49331716ba0a7078b026d145306a70eae64b7313c3e6204bd931e75ec3bb1","names":[],"sources":["packages/llm/llm/src/types.ts:503"]},
{"digest":"a2b49331716ba0a7078b026d145306a70eae64b7313c3e6204bd931e75ec3bb1","names":[],"sources":["packages/llm/llm/src/types.ts:591"]},
{"digest":"a2be0f0cb59f0d4a06557d45847d1938aced238baa77a6da416e590b8b958553","names":[],"sources":[]},
{"digest":"a3a259a1aa5401af786ce08c4a8419681d3000d73467991b5fc563389bc4ebd2","names":[],"sources":[]},
{"digest":"a3c6f1ea38e9a61d7a9706057ba65aabe02dfe6d9dd90d4736aa62325d874531","names":[],"sources":[]},
@@ -503,7 +503,7 @@
{"digest":"aae343bc3d663c83f2e8b5e1c7eea5d509dc7a5361bc8bd8b5ac3bb8d3b1ed56","names":[],"sources":[]},
{"digest":"ab7ec5f9eb2c6dfacca5da4c37cf7ba85d04172053ee6b1ebf1709ffcd99c1a7","names":[],"sources":["packages/core/session/src/types.ts:220","packages/llm/llm/src/types.ts:166"]},
{"digest":"aba175fb20ffc71112c55efe70458ff5d7dbfb83501892b4ba8d077f0ea5d7ba","names":[],"sources":[]},
{"digest":"abd6ca62a5ab166553848324a23fef90eed7f59c8021bd63e7ea5bc6fd666b0c","names":["packages/web/web-search-deepseek/src/provider.ts#DeepSeekSearchLlmRequest"],"sources":["packages/web/web-search-deepseek/src/provider.ts:55"]},
{"digest":"abd6ca62a5ab166553848324a23fef90eed7f59c8021bd63e7ea5bc6fd666b0c","names":["packages/web/web-search-deepseek/src/provider.ts#DeepSeekSearchLlmRequest"],"sources":["packages/web/web-search-deepseek/src/provider.ts:56"]},
{"digest":"ad0c38a0adb82a94c925456df41586d9b5f9202fca18593eae2213d4445b4585","names":[],"sources":["packages/core/session/src/types.ts:398"]},
{"digest":"ad22a5ca5bbaab2e1440779cd3648e85ddfc6f73b5207394eda699555cf31430","names":[],"sources":[]},
{"digest":"ad3b56aa2fc1ad4250e7399295d34a8eae592e1907e85852e2291b2e498a30bc","names":[],"sources":[]},
@@ -597,7 +597,7 @@
{"digest":"d215701afb7aafbfd63205a6bbb8803aed60810bd613e2dbbc43071c38b6c568","names":[],"sources":["packages/experimental/timeline/src/reminders.ts:14"]},
{"digest":"d28765f87d6b6ab408e0b2f3e7e297791b004b806d8e302c49903ebae815feb2","names":[],"sources":[]},
{"digest":"d49164d37eab0f0f70fa787c65d887abbea869c010ccb103d717fab3519c3a41","names":[],"sources":[]},
{"digest":"d4b739491689cc6bb13d07ffac1a32239875abda364c0d5edd8f74faf5e9c00d","names":[],"sources":["packages/llm/llm/src/types.ts:501"]},
{"digest":"d4b739491689cc6bb13d07ffac1a32239875abda364c0d5edd8f74faf5e9c00d","names":[],"sources":["packages/llm/llm/src/types.ts:589"]},
{"digest":"d4c799e3d51cae1040362ba4968efc484739e14416c9c1df20c2f108b4ef2eb5","names":[],"sources":[]},
{"digest":"d4e4d575abeb4b72d616dc65c17ac0eaa943cc135609395044c38d5afcb10e31","names":[],"sources":[]},
{"digest":"d63b8b8ffad9c02fd80c43a17df4f240c1fe8118ecca9de34f9d5871838ab5b9","names":[],"sources":[]},
@@ -671,11 +671,11 @@
{"digest":"f1687f982fa3d41ef29e159feed154ecd13af4dd209acaee16038f223f2e9402","names":["packages/core/session/src/types.ts#TurnEndReason"],"sources":["packages/core/session/src/types.ts:238"]},
{"digest":"f1996af2602e6f62b5ab179ca5c4af00d8753938b74cc6ef102de09e99e74a7e","names":[],"sources":[]},
{"digest":"f19bee84bf3d20904553cdcd57465232bc1c2a194f54c4d195292ba0487223a6","names":["packages/attachment/attachment/src/types.ts#FileAttachmentRef"],"sources":["packages/attachment/attachment/src/types.ts:39"]},
{"digest":"f1a96afe7503ac1817de769cd0ba13d9b80111c7034c50106b3344ecc14cc515","names":[],"sources":["packages/llm/llm/src/types.ts:502"]},
{"digest":"f1a96afe7503ac1817de769cd0ba13d9b80111c7034c50106b3344ecc14cc515","names":[],"sources":["packages/llm/llm/src/types.ts:590"]},
{"digest":"f230c0b583e23b25ee0a61dbe4c05e95c1e2ae44b27939501eb9e03696f0c278","names":[],"sources":[]},
{"digest":"f29d63336e8266d80dd7baeab219436db86341304f6be1cd0edb36f5134c4a47","names":[],"sources":[]},
{"digest":"f2da0f27c1e6add59982c37b15e4a4912c5b33466859cce3b13d503600e24aef","names":["packages/llm/llm/src/types.ts#FileBlock"],"sources":["packages/llm/llm/src/types.ts:105"]},
{"digest":"f311671e07bc7fa645a0b6597de9966b97147956565296ba76a36543801b66c5","names":["packages/llm/llm/src/types.ts#SystemPromptUpdate"],"sources":["packages/llm/llm/src/types.ts:440"]},
{"digest":"f311671e07bc7fa645a0b6597de9966b97147956565296ba76a36543801b66c5","names":["packages/llm/llm/src/types.ts#SystemPromptUpdate"],"sources":["packages/llm/llm/src/types.ts:528"]},
{"digest":"f4a66f654996c093aae700ea4c434ff2ee3569fea9c0e5813ccf6afdccabd163","names":[],"sources":[]},
{"digest":"f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1","names":[],"sources":[]},
{"digest":"f56c5b59ca0161310c338d31dd16cf14287ccd602ff4181058df178c1c286d7f","names":["packages/context/session-reference/src/types.ts#SessionReferenceSource"],"sources":["packages/context/session-reference/src/types.ts:13"]},
+2 -2
View File
@@ -3,5 +3,5 @@
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/subsystems/README.md
/subsystems:
en: 1a570deda3572868
zh: 4d256f68b7e39701
en: 8e833255afdc9a87
zh: 89c2af912ed35a49
+1
View File
@@ -24,6 +24,7 @@ One page per subsystem of the DeepSeek Harness: what it is, the data structures
| [persistence.md](persistence.md) | the durability seam: `SessionPersistence`, the JSONL provider, `session/flush`, crash recovery, `SessionHeader` |
| [settings.md](settings.md) | the user-settings seam: `SettingsNamespace` registration, layered resolution (defaults → composition `base` → user document), owner scopes, hot commits |
| [credentials.md](credentials.md) | the credential seam: `CredentialRef` references (never values) in configuration, per-operation resolution, UI-safe `CredentialInfo`, provider source layers |
| [account.md](account.md) | the DeepSeek account: browser sign-in state, the stored grant, Host-only request credentials for the account model route and the web providers, and the Platform session projection |
| [session-query.md](session-query.md) | logical records, bounded exact-event reads, relationship traces, semantic filters/documents, and full-text result pages |
| [feedback.md](feedback.md) | lifecycle-bound per-message feedback records, optimistic versions, sidecar persistence, and the Host Remote contract |
| [session-title.md](session-title.md) | durable title snapshots, cited source-message seqs, and the asynchronous provider contract |
+1
View File
@@ -24,6 +24,7 @@
| [persistence.md](persistence.zh.md) | 持久性 seam:`SessionPersistence`、JSONL 提供方、`session/flush`、崩溃恢复、`SessionHeader` |
| [settings.md](settings.zh.md) | 用户设置 seam:`SettingsNamespace` 注册、分层解析(默认值 → 组合 `base` → 用户文档)、owner scope、热提交 |
| [credentials.md](credentials.zh.md) | 凭据 seam:配置中的 `CredentialRef` 引用(绝不含值)、按操作解析、对 UI 安全的 `CredentialInfo`、提供方来源层 |
| [account.md](account.zh.md) | DeepSeek 账号:浏览器登录状态、已存授权、供账号模型路由与 Web 提供方使用的仅限 Host 的请求凭据,以及 Platform 会话投影 |
| [session-query.md](session-query.zh.md) | 逻辑记录、有界精确事件读取、关系追踪、语义筛选器/文档与全文检索结果页 |
| [feedback.md](feedback.zh.md) | 绑定生命周期的逐消息反馈记录、乐观版本、伴随记录持久化与 Host Remote 约定 |
| [session-title.md](session-title.zh.md) | 持久标题快照、被引用的来源消息 seq 与异步提供方约定 |
+16
View File
@@ -0,0 +1,16 @@
# Bilingual-pair consistency record for account.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/subsystems/account.md
/deepseek-account:
en: 2302e2999588bac3
zh: 5e0ac058b50036dc
/deepseek-account/request-credentials:
en: c5fb32307f841c66
zh: 8ed40c0c99884301
/deepseek-account/embedded-platform-credentials:
en: 9a651d70acbe83a6
zh: 4624b0299f5fdd8e
/deepseek-account/cordis-api/deepseek-account-events/deepseek-account-signed-out-emit:
en: 3065c17cb319f756
zh: e69c2692a109c38b
+222
View File
@@ -0,0 +1,222 @@
# DeepSeek Account
English | [中文](account.zh.md)
The account service of [dsh-deepseek-account](../../packages/account/deepseek-account) signs the user in through the system browser, stores the resulting grant as a credential record of the [credential seam](credentials.md), and releases per-request account credentials to Host consumers. Consumers name the destination of one request and receive the headers that request carries; they never read the stored token, choose its header, or decide which origin may receive it. Clients observe account state through the `account` Remote namespace, which carries no credential.
Source: [`packages/account/deepseek-account/src/index.ts`](../../packages/account/deepseek-account/src/index.ts)
## Request credentials
`resolveRequestCredential(url)` is Host-only. It answers `undefined` while signed out, during credential removal, and for any destination outside the configured `inferenceOrigin`; otherwise it returns an `AccountRequestCredential` whose `headers` carry the token as `x-dsh-auth-token`, whose `value` is the bare token, and whose `reject()` removes the stored grant only while it still matches that token, containing storage failures so the caller reports the destination's rejection. Its `revoked` signal aborts when the account signs out of the sign-in that token belongs to, by the user or after a rejection, once the `deepseek-account/signed-out` listeners have returned; the account model route and the DeepSeek web providers run each model, Files, Search, and Fetch request that carries the token under it, so a sign-out ends those requests even after the plugin that sent them has unloaded. The `deepseek-account` model route publishes this credential through `ctx.llm.providerCredential('deepseek-account')` ([LLM streaming](llm-streaming.md)); the DeepSeek web providers consume it there and, without that route, ask the account service directly. `reject()` runs on the account service mounted when it is called, so a reload between a request and the destination's answer still removes the grant; without a mounted service it leaves the grant for the next one to reject. A credential released by an account service that has since been replaced keeps an unaborted signal, because the replacement withdraws only the credentials it released.
Model routes that bill the account register a running-task report with `registerRunningTaskReport(report)` inside `ctx.effect()`; `hasRunningAccountTasks()` answers true while any report does, so the sign-out confirmation can warn about work the sign-out interrupts. The route plugin owns cancellation of that work after `deepseek-account/signed-out`; a request that outlives the plugin ends through its credential's `revoked` signal, and the plugin's failure callback for that request cancels the work.
## Embedded Platform credentials
PlatformSession is a Host-only snapshot from getPlatformSession: origin names the configured Platform issuer and token contains its stored account credential. userId repeats the stable account ID from the most recent successful getProfile, and is null until one succeeds or when that profile carries no ID. The snapshot reuses that ID without issuing a profile request of its own, so an unknown ID leaves userId null instead of delaying the caller; a profile read whose stable ID first becomes available or changes notifies only Host subscribers using `watch(signal, true)`, which lets identity consumers re-read the snapshot. Consumers key persistent browser storage by origin and userId and fall back to temporary storage for null. Signed-out accounts and credentials changed during the credential read return no snapshot; a mismatched issuer fails. Native consumers own document invalidation when credentials change. This snapshot is excluded from account Remote API, AccountView, and AccountDetails.
AccountDetails.balance projects recharge wallets in value and promotional wallets in bonusWallets, with independent currency and decimal balance strings. Failed queries contain no wallet arrays.
Notification queries return an AccountNotificationBatch with the server's nextPollAfterSeconds and its notifications in server order. Each AccountNotification carries an opaque id, createdAt, a nullable displayUntil, localized title and body, ordered actions, and optional JSON data, never credentials. getNotificationContent reads one notification by id, including consumed ones, and reportNotificationEvent reports displayed, cta_clicked, or dismissed for it. Notification operations use the initiating UI language through x-client-locale, without a language query parameter.
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
<a id="cordis-surface"></a>
## Cordis API
Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
<a id="ctxdeepseekaccount--deepseekaccount"></a>
### `ctx.deepseekAccount` — `DeepSeekAccount`
Account login, credentials, and client-safe Remote operations.
```ts cordis-catalog
/**
* Read stored-account presence and the latest login attempt.
* @returns a snapshot without credentials or PKCE secrets.
*/
@Remote async getState(): Promise<AccountView>
/**
* Query Platform profile independently of wallet balances.
* A ready result whose stable profile ID first becomes available or changes notifies identity-enabled watch
* consumers, so they re-read getPlatformSession; repeated IDs stay silent.
* @param client - identity of the requesting UI for this call.
* @returns profile outcome, or null if signed out or the grant changed during the query.
*/
@Remote async getProfile(client: AccountClientMetadata): Promise<AccountDetails['profile'] | null>
/**
* Query Platform recharge and bonus wallet balances independently of profile data.
* @param client - identity of the requesting UI for this call.
* @returns balance outcome, or null if signed out or the grant changed during the query.
*/
@Remote getBalance(client: AccountClientMetadata): Promise<AccountDetails['balance'] | null>
/**
* Query unconsumed account notifications in server order without reading profile data.
* @param client - identity of the requesting UI for this call; its language selects the server-authored message.
* @returns notifications with their next query delay, or null if signed out or the grant changed during the query.
*/
@Remote async getNotifications(client: AccountClientMetadata): Promise<AccountNotificationBatch | null>
/**
* Query localized content of a notification, including one already consumed.
* @param id - notification whose content is requested.
* @param client - identity of the requesting UI; its language selects the localized content.
* @returns content without changing consumption, or null if signed out or the grant changed.
*/
@Remote async getNotificationContent(id: AccountNotificationId, client: AccountClientMetadata): Promise<AccountNotification | null>
/**
* Report a notification interaction; the backend decides consumption.
* @param id - notification the user interacted with.
* @param event - displayed frame, non-dismiss action click, or explicit dismissal.
* @param client - identity of the requesting UI for this call.
* @returns true once the server accepts the event; false if signed out or credentials changed during the call.
*/
@Remote async reportNotificationEvent(id: AccountNotificationId, event: AccountNotificationEvent, client: AccountClientMetadata): Promise<boolean>
/**
* Read existing login identity without creating a device or returning credentials.
* @returns optional device/account identifiers and the provider's OS version string.
*/
async getDeviceIdentity(): Promise<{ deviceId?: string; userId?: AccountUserId; osVersion: string }>
/**
* Read credentials for the configured embedded-page origin, bound to their account environment, and
* pair them with the account ID from the last successful profile read; no profile request is made.
* @returns a Host-only snapshot, or null while signed out or when the credential changed during the read.
*/
async getPlatformSession(): Promise<PlatformSession | null>
/**
* Release the account credential for one request to `url` as the request
* carries it, together with its invalidation, which runs on the account
* service mounted when it is called, and the signal this service aborts
* when it signs out of that credential. Host-only.
* @param url - actual request destination or API base URL.
* @returns the request credential, or undefined for other origins or a signed-out account.
*/
async resolveRequestCredential(url: string): Promise<AccountRequestCredential | undefined>
/**
* Join an active attempt or start browser authorization.
* @param client - identity of the requesting UI; a new attempt captures it, and joining retains the original attempt's identity.
* @param callbackOrigin - browser-accessible loopback HTTP origin, including any SSH local port.
* @param loginSource - initiating UI, used to return from a failed exchange.
* @returns the initial snapshot without waiting for browser approval.
*/
@Remote async startSignIn(client: AccountClientMetadata, callbackOrigin: string, loginSource: 'web' | 'desktop'): Promise<AccountView>
/**
* Cancel only the named attempt; committing attempts settle before returning.
* @param attemptId - attempt identity from this Host.
* @returns state after cancellation or an already-started commit.
*/
@Remote async cancelSignIn(attemptId: SignInAttemptId): Promise<AccountView>
/**
* Remove the local grant while retaining API keys; the provider revokes it in the background.
* @param client - identity of the requesting UI, captured for the background revocation retries.
* @returns the signed-out state after local removal; remote failures never restore the grant.
*/
@Remote signOut(client: AccountClientMetadata): Promise<AccountView>
/**
* Register a report of running work that signing out would interrupt. The
* plugin billing the account to a model route registers one from within
* `ctx.effect()`; without any report nothing is known to be running.
* @param report - answers whether such work is running now.
* @returns the disposer removing the report.
*/
registerRunningTaskReport(report: () => boolean): () => void
/**
* Inspect running work before sign-out.
* @returns whether a registered report says a running task uses the account; false without reports.
*/
@Remote hasRunningAccountTasks(): boolean
/**
* Subscribe to live credential expiry without replay.
* @param signal - subscription lifetime; provider disposal also ends it.
* @returns expiry notifications emitted during the subscription.
*/
@Remote({ mode: 'stream' }) async *watchExpiry(signal: AbortSignal): AsyncIterable<'session-expired'>
/**
* Subscribe to ordered updates including a complete initial snapshot.
* @param signal - subscription lifetime; ending it never cancels login.
* @param includeIdentityChanges - also notify when cached Platform identity changes; defaults to false.
* @returns complete state with snapshot or credentials-changed event type; credential changes take priority when updates coalesce.
*/
watch(signal: AbortSignal, includeIdentityChanges: boolean = false): AsyncIterable<AccountUpdate>
/**
* Stream account state without the Host-only identity subscription option.
* @param signal - subscription lifetime.
* @returns initial state, login progress, and credential-change updates.
*/
@Remote({ name: 'watch', mode: 'stream' }) watchState(signal: AbortSignal): AsyncIterable<AccountUpdate>
```
Source: [`packages/account/deepseek-account/src/index.ts`](../../packages/account/deepseek-account/src/index.ts)
<a id="deepseek-account-events"></a>
### `deepseek-account/*` events
<a id="deepseek-accountmodel-sign-in-required--emit"></a>
#### `deepseek-account/model-sign-in-required` — emit
An account model request requires the user to sign in.
```ts cordis-catalog
/** An account model request requires the user to sign in.
* @mode emit
*/
'deepseek-account/model-sign-in-required'(): void
```
Source: [`packages/account/deepseek-account/src/types.ts`](../../packages/account/deepseek-account/src/types.ts)
<a id="deepseek-accountsession-expired--emit"></a>
#### `deepseek-account/session-expired` — emit
Server rejection removed the current account credential; this notification is not replayed.
```ts cordis-catalog
/** Server rejection removed the current account credential; this notification is not replayed.
* @mode emit
*/
'deepseek-account/session-expired'(): void
```
Source: [`packages/account/deepseek-account/src/types.ts`](../../packages/account/deepseek-account/src/types.ts)
<a id="deepseek-accountsigned-out--emit"></a>
#### `deepseek-account/signed-out` — emit
Local grant removal has completed. After the listeners return, the `revoked` signal of that grant's request credentials aborts.
```ts cordis-catalog
/** Local grant removal has completed. After the listeners return, the `revoked` signal of that grant's request credentials aborts.
* @mode emit
*/
'deepseek-account/signed-out'(): void
```
Source: [`packages/account/deepseek-account/src/index.ts`](../../packages/account/deepseek-account/src/index.ts)
<!-- END GENERATED cordis-surface -->
The account Service Definition exposes getState, getProfile, getBalance, getNotifications, getNotificationContent, reportNotificationEvent, startSignIn, cancelSignIn, signOut, watch, and Host-only resolveRequestCredential, registerRunningTaskReport, and getPlatformSession. The platform provider implements it with an AuthorizationFlow and a private GrantRecord. AccountView distinguishes stored presence from server validation; attempt IDs bind cancellation to one local flow. AccountUpdate carries a complete AccountView in state and a type of snapshot for initial or progress updates, or credentials-changed for credential writes and removal. Pending credential changes take priority over progress updates. See [the account package](../../packages/account/deepseek-account/README.md).
`AccountClientMetadata` carries `version` from the caller’s `DSH_CLIENT_VERSION`, its active UI `locale`, and `timezoneOffsetSeconds` sampled when the operation begins. The offset is local time minus UTC in seconds: UTC+8 is `28800`. It contains no credentials. Login attempts retain their initiating metadata through exchange and cancellation; sign-out retains its metadata for revocation retries.
+222
View File
@@ -0,0 +1,222 @@
# DeepSeek 账号
[English](account.md) | 中文
[dsh-deepseek-account](../../packages/account/deepseek-account) 的账号服务通过系统浏览器完成登录,把得到的授权作为[凭据 seam](credentials.zh.md) 的一条凭据记录保存,并向 Host 消费方释放按请求的账号凭据。消费方只说明一次请求的目标地址并取得该请求所携带的请求头;它们既不读取已存 token,也不选择其请求头,也不决定哪个来源可以接收它。客户端通过不携带凭据的 `account` Remote 命名空间观察账号状态。
来源:[`packages/account/deepseek-account/src/index.ts`](../../packages/account/deepseek-account/src/index.ts)
## 请求凭据
`resolveRequestCredential(url)` 仅限 Host。未登录、凭据删除进行中,以及目标地址不在配置的 `inferenceOrigin` 之内时,它回答 `undefined`;否则返回一个 `AccountRequestCredential`:`headers` 以 `x-dsh-auth-token` 携带 token,`value` 是裸 token,`reject()` 仅在已存授权仍与该 token 一致时删除它,并隔离存储失败,使调用方报告的是目标地址的拒绝。其 `revoked` 信号在账号退出该 token 所属的登录时中止,无论退登由用户发起还是由拒绝触发,且在 `deepseek-account/signed-out` 的监听器返回之后;账号模型路由和 DeepSeek Web 提供方让携带该 token 的每个模型、Files、Search 与 Fetch 请求受它约束,因此即使发出请求的插件已卸载,退登仍会结束这些请求。`deepseek-account` 模型路由通过 `ctx.llm.providerCredential('deepseek-account')`([LLM 流式](llm-streaming.zh.md))发布这份凭据;DeepSeek Web 提供方在那里消费它,没有该路由时直接询问账号服务。`reject()` 在被调用时挂载的账号服务上执行,因此请求与目的地应答之间发生的重载仍会移除授权;没有挂载的服务时,授权留给下一个挂载的服务处理。已被替换的账号服务释放的凭据,其信号保持未中止,因为替换后的服务只撤回自己释放的凭据。
按账号计费的模型路由在 `ctx.effect()` 内用 `registerRunningTaskReport(report)` 注册运行中任务报告;只要有报告回答 true,`hasRunningAccountTasks()` 就回答 true,使退登确认能够提醒退登将打断的工作。`deepseek-account/signed-out` 之后取消这些工作由路由插件负责;比插件存活更久的请求通过其凭据的 `revoked` 信号结束,插件为该请求提供的失败回调随后取消这些工作。
## 内嵌 Platform 凭证
PlatformSession 是 getPlatformSession 返回的仅限 Host 快照:origin 指定所配置的 Platform 签发来源,token 包含其已存账号凭证。userId 复制最近一次成功 getProfile 得到的稳定账号 ID;尚无一次成功读取或资料不含 ID 时为 null。快照复用该 ID,不自行发起资料请求,因此 ID 未知时只会让 userId 为 null,而不会延迟调用方;资料读取首次取得稳定 ID 或该 ID 变化时仅通知使用 `watch(signal, true)` 的 Host 订阅者,供标识使用方重新读取快照。使用方以 origin 和 userId 作为持久化浏览器存储的键,为 null 时退回临时存储。账号已退登或读取凭证期间凭证变化时不返回快照;签发来源不匹配时失败。原生使用方负责在凭证变化时使文档失效。账号 Remote API、AccountView 和 AccountDetails 均不包含此快照。
AccountDetails.balance 将充值钱包投影为 value、赠送钱包投影为 bonusWallets,分别保留币种和十进制余额字符串。查询失败不包含钱包数组。
通知查询返回 AccountNotificationBatch,包含服务端的 nextPollAfterSeconds 和按服务端顺序排列的通知。每条 AccountNotification 携带不透明 id、createdAt、可为 null 的 displayUntil、本地化的 title 与 body、有序 actions 以及可选的 JSON data,绝不包含凭证。getNotificationContent 按 id 读取一条通知,包括已消费的通知;reportNotificationEvent 为其上报 displayed、cta_clicked 或 dismissed。通知操作通过 x-client-locale 传递发起界面的语言,不使用语言查询参数。
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
<a id="cordis-surface"></a>
## Cordis API
Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
<a id="ctxdeepseekaccount--deepseekaccount"></a>
### `ctx.deepseekAccount` — `DeepSeekAccount`
Account login, credentials, and client-safe Remote operations.
```ts cordis-catalog
/**
* Read stored-account presence and the latest login attempt.
* @returns a snapshot without credentials or PKCE secrets.
*/
@Remote async getState(): Promise<AccountView>
/**
* Query Platform profile independently of wallet balances.
* A ready result whose stable profile ID first becomes available or changes notifies identity-enabled watch
* consumers, so they re-read getPlatformSession; repeated IDs stay silent.
* @param client - identity of the requesting UI for this call.
* @returns profile outcome, or null if signed out or the grant changed during the query.
*/
@Remote async getProfile(client: AccountClientMetadata): Promise<AccountDetails['profile'] | null>
/**
* Query Platform recharge and bonus wallet balances independently of profile data.
* @param client - identity of the requesting UI for this call.
* @returns balance outcome, or null if signed out or the grant changed during the query.
*/
@Remote getBalance(client: AccountClientMetadata): Promise<AccountDetails['balance'] | null>
/**
* Query unconsumed account notifications in server order without reading profile data.
* @param client - identity of the requesting UI for this call; its language selects the server-authored message.
* @returns notifications with their next query delay, or null if signed out or the grant changed during the query.
*/
@Remote async getNotifications(client: AccountClientMetadata): Promise<AccountNotificationBatch | null>
/**
* Query localized content of a notification, including one already consumed.
* @param id - notification whose content is requested.
* @param client - identity of the requesting UI; its language selects the localized content.
* @returns content without changing consumption, or null if signed out or the grant changed.
*/
@Remote async getNotificationContent(id: AccountNotificationId, client: AccountClientMetadata): Promise<AccountNotification | null>
/**
* Report a notification interaction; the backend decides consumption.
* @param id - notification the user interacted with.
* @param event - displayed frame, non-dismiss action click, or explicit dismissal.
* @param client - identity of the requesting UI for this call.
* @returns true once the server accepts the event; false if signed out or credentials changed during the call.
*/
@Remote async reportNotificationEvent(id: AccountNotificationId, event: AccountNotificationEvent, client: AccountClientMetadata): Promise<boolean>
/**
* Read existing login identity without creating a device or returning credentials.
* @returns optional device/account identifiers and the provider's OS version string.
*/
async getDeviceIdentity(): Promise<{ deviceId?: string; userId?: AccountUserId; osVersion: string }>
/**
* Read credentials for the configured embedded-page origin, bound to their account environment, and
* pair them with the account ID from the last successful profile read; no profile request is made.
* @returns a Host-only snapshot, or null while signed out or when the credential changed during the read.
*/
async getPlatformSession(): Promise<PlatformSession | null>
/**
* Release the account credential for one request to `url` as the request
* carries it, together with its invalidation, which runs on the account
* service mounted when it is called, and the signal this service aborts
* when it signs out of that credential. Host-only.
* @param url - actual request destination or API base URL.
* @returns the request credential, or undefined for other origins or a signed-out account.
*/
async resolveRequestCredential(url: string): Promise<AccountRequestCredential | undefined>
/**
* Join an active attempt or start browser authorization.
* @param client - identity of the requesting UI; a new attempt captures it, and joining retains the original attempt's identity.
* @param callbackOrigin - browser-accessible loopback HTTP origin, including any SSH local port.
* @param loginSource - initiating UI, used to return from a failed exchange.
* @returns the initial snapshot without waiting for browser approval.
*/
@Remote async startSignIn(client: AccountClientMetadata, callbackOrigin: string, loginSource: 'web' | 'desktop'): Promise<AccountView>
/**
* Cancel only the named attempt; committing attempts settle before returning.
* @param attemptId - attempt identity from this Host.
* @returns state after cancellation or an already-started commit.
*/
@Remote async cancelSignIn(attemptId: SignInAttemptId): Promise<AccountView>
/**
* Remove the local grant while retaining API keys; the provider revokes it in the background.
* @param client - identity of the requesting UI, captured for the background revocation retries.
* @returns the signed-out state after local removal; remote failures never restore the grant.
*/
@Remote signOut(client: AccountClientMetadata): Promise<AccountView>
/**
* Register a report of running work that signing out would interrupt. The
* plugin billing the account to a model route registers one from within
* `ctx.effect()`; without any report nothing is known to be running.
* @param report - answers whether such work is running now.
* @returns the disposer removing the report.
*/
registerRunningTaskReport(report: () => boolean): () => void
/**
* Inspect running work before sign-out.
* @returns whether a registered report says a running task uses the account; false without reports.
*/
@Remote hasRunningAccountTasks(): boolean
/**
* Subscribe to live credential expiry without replay.
* @param signal - subscription lifetime; provider disposal also ends it.
* @returns expiry notifications emitted during the subscription.
*/
@Remote({ mode: 'stream' }) async *watchExpiry(signal: AbortSignal): AsyncIterable<'session-expired'>
/**
* Subscribe to ordered updates including a complete initial snapshot.
* @param signal - subscription lifetime; ending it never cancels login.
* @param includeIdentityChanges - also notify when cached Platform identity changes; defaults to false.
* @returns complete state with snapshot or credentials-changed event type; credential changes take priority when updates coalesce.
*/
watch(signal: AbortSignal, includeIdentityChanges: boolean = false): AsyncIterable<AccountUpdate>
/**
* Stream account state without the Host-only identity subscription option.
* @param signal - subscription lifetime.
* @returns initial state, login progress, and credential-change updates.
*/
@Remote({ name: 'watch', mode: 'stream' }) watchState(signal: AbortSignal): AsyncIterable<AccountUpdate>
```
Source: [`packages/account/deepseek-account/src/index.ts`](../../packages/account/deepseek-account/src/index.ts)
<a id="deepseek-account-events"></a>
### `deepseek-account/*` events
<a id="deepseek-accountmodel-sign-in-required--emit"></a>
#### `deepseek-account/model-sign-in-required` — emit
An account model request requires the user to sign in.
```ts cordis-catalog
/** An account model request requires the user to sign in.
* @mode emit
*/
'deepseek-account/model-sign-in-required'(): void
```
Source: [`packages/account/deepseek-account/src/types.ts`](../../packages/account/deepseek-account/src/types.ts)
<a id="deepseek-accountsession-expired--emit"></a>
#### `deepseek-account/session-expired` — emit
Server rejection removed the current account credential; this notification is not replayed.
```ts cordis-catalog
/** Server rejection removed the current account credential; this notification is not replayed.
* @mode emit
*/
'deepseek-account/session-expired'(): void
```
Source: [`packages/account/deepseek-account/src/types.ts`](../../packages/account/deepseek-account/src/types.ts)
<a id="deepseek-accountsigned-out--emit"></a>
#### `deepseek-account/signed-out` — emit
Local grant removal has completed. After the listeners return, the `revoked` signal of that grant's request credentials aborts.
```ts cordis-catalog
/** Local grant removal has completed. After the listeners return, the `revoked` signal of that grant's request credentials aborts.
* @mode emit
*/
'deepseek-account/signed-out'(): void
```
Source: [`packages/account/deepseek-account/src/index.ts`](../../packages/account/deepseek-account/src/index.ts)
<!-- END GENERATED cordis-surface -->
账号服务定义提供 getState、getProfile、getBalance、getNotifications、getNotificationContent、reportNotificationEvent、startSignIn、cancelSignIn、signOut、watch 及仅限 Host 的 resolveRequestCredential、registerRunningTaskReport 和 getPlatformSession。平台提供者使用 AuthorizationFlow 和私有 GrantRecord 实现这些操作。AccountView 区分本地存在与服务器验证;尝试 ID 将取消绑定到单次本地流程。AccountUpdate 的 state 携带完整 AccountView,type 为 snapshot 时表示首次或进度更新,为 credentials-changed 时表示凭据写入或删除。待发送的凭据变化优先于进度更新。参见[账号包](../../packages/account/deepseek-account/README.zh.md)。
`AccountClientMetadata` 携带调用方 `DSH_CLIENT_VERSION` 提供的 `version`、当前界面 `locale`,以及操作发起时采样的 `timezoneOffsetSeconds`。偏移为本地时间减 UTC 的秒数:UTC+8 对应 `28800`。其中不含凭证。登录申请在兑换及取消期间保留发起时的元数据;退出操作为撤销重试保留其元数据。
+2 -8
View File
@@ -3,8 +3,8 @@
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/subsystems/credentials.md
/user-credentials:
en: 4589c745baf092c7
zh: 3a782e6a06825201
en: cdf4cba4b28c4d9b
zh: ca46998bc56d30e6
/user-credentials/identity:
en: 0083032b9d19467d
zh: 15d7a7520bac094e
@@ -17,9 +17,3 @@
/user-credentials/change-commits:
en: 464315a953330eb2
zh: d9815591f3abc2cb
/user-credentials/embedded-platform-credentials:
en: 6f80d44cdec8e05a
zh: 658e5e4958f9baa6
/user-credentials/cordis-api/deepseek-account-events/deepseek-account-signed-out-emit:
en: 664f0f89d89ac686
zh: 178263324ad76307
+2 -195
View File
@@ -6,6 +6,8 @@ The credential seam of [dsh-credentials](../../packages/credentials/credentials)
Source: [`packages/credentials/credentials/src/index.ts`](../../packages/credentials/credentials/src/index.ts)
The DeepSeek account grant is one such record; its sign-in, request credentials, and Platform session are documented in [account.md](account.md).
## Identity
A reference names one credential as a POSIX-style environment-variable name. The brand prevents callers from mixing credential references with other strings passed between packages or processes; construction validates the shell-identifier syntax.
@@ -55,14 +57,6 @@ interface CredentialInfo {
`credentials/reference-updated (ref)` fires after a committed change to a provider-managed source — a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Consumers do not need the event (they re-resolve per operation); it exists for configuration surfaces refreshing a "configured" badge.
## Embedded Platform credentials
PlatformSession is a Host-only snapshot from getPlatformSession: origin names the configured Platform issuer and token contains its stored account credential. userId repeats the stable account ID from the most recent successful getProfile, and is null until one succeeds or when that profile carries no ID. The snapshot reuses that ID without issuing a profile request of its own, so an unknown ID leaves userId null instead of delaying the caller; a profile read whose stable ID first becomes available or changes notifies only Host subscribers using `watch(signal, true)`, which lets identity consumers re-read the snapshot. Consumers key persistent browser storage by origin and userId and fall back to temporary storage for null. Signed-out accounts and credentials changed during the credential read return no snapshot; a mismatched issuer fails. Native consumers own document invalidation when credentials change. This snapshot is excluded from account Remote API, AccountView, and AccountDetails.
AccountDetails.balance projects recharge wallets in value and promotional wallets in bonusWallets, with independent currency and decimal balance strings. Failed queries contain no wallet arrays.
Bonus notification queries return an AccountBonusBatch with the current Platform account id and eligible orders in server order. AccountBonusNotification retains the server message and expiry without projecting credentials. Acknowledgment carries the expected account id and order id; the Host refuses it after an account change. Both notification operations use the initiating UI language through x-client-locale, without a language query parameter.
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
<a id="cordis-surface"></a>
@@ -262,140 +256,6 @@ Host service backing the generated `ctx.remote.credentials` namespace. It carrie
Source: [`packages/api/settings-controller/src/credentials.ts`](../../packages/api/settings-controller/src/credentials.ts)
<a id="ctxdeepseekaccount--deepseekaccount"></a>
### `ctx.deepseekAccount` — `DeepSeekAccount`
Account login, credentials, and client-safe Remote operations.
```ts cordis-catalog
/**
* Read stored-account presence and the latest login attempt.
* @returns a snapshot without credentials or PKCE secrets.
*/
@Remote async getState(): Promise<AccountView>
/**
* Query Platform profile independently of wallet balances.
* A ready result whose stable profile ID first becomes available or changes notifies identity-enabled watch
* consumers, so they re-read getPlatformSession; repeated IDs stay silent.
* @param client - identity of the requesting UI for this call.
* @returns profile outcome, or null if signed out or the grant changed during the query.
*/
@Remote async getProfile(client: AccountClientMetadata): Promise<AccountDetails['profile'] | null>
/**
* Query Platform recharge and bonus wallet balances independently of profile data.
* @param client - identity of the requesting UI for this call.
* @returns balance outcome, or null if signed out or the grant changed during the query.
*/
@Remote getBalance(client: AccountClientMetadata): Promise<AccountDetails['balance'] | null>
/**
* Query unconsumed account notifications in server order without reading profile data.
* @param client - identity of the requesting UI for this call; its language selects the server-authored message.
* @returns notifications with their next query delay, or null if signed out or the grant changed during the query.
*/
@Remote async getNotifications(client: AccountClientMetadata): Promise<AccountNotificationBatch | null>
/**
* Query localized content of a notification, including one already consumed.
* @param id - notification whose content is requested.
* @param client - identity of the requesting UI; its language selects the localized content.
* @returns content without changing consumption, or null if signed out or the grant changed.
*/
@Remote async getNotificationContent(id: AccountNotificationId, client: AccountClientMetadata): Promise<AccountNotification | null>
/**
* Report a notification interaction; the backend decides consumption.
* @param id - notification the user interacted with.
* @param event - displayed frame, non-dismiss action click, or explicit dismissal.
* @param client - identity of the requesting UI for this call.
* @returns true once the server accepts the event; false if signed out or credentials changed during the call.
*/
@Remote async reportNotificationEvent(id: AccountNotificationId, event: AccountNotificationEvent, client: AccountClientMetadata): Promise<boolean>
/**
* Remove an inference-rejected token only while it still matches the stored login.
* @param token - token captured by the rejected inference request.
* @returns after matching credentials are removed and the expiry notification is emitted.
*/
async rejectToken(token: string): Promise<void>
/**
* Read existing login identity without creating a device or returning credentials.
* @returns optional device/account identifiers and the provider's OS version string.
*/
async getDeviceIdentity(): Promise<{ deviceId?: string; userId?: AccountUserId; osVersion: string }>
/**
* Read credentials for the configured embedded-page origin, bound to their account environment, and
* pair them with the account ID from the last successful profile read; no profile request is made.
* @returns a Host-only snapshot, or null while signed out or when the credential changed during the read.
*/
async getPlatformSession(): Promise<PlatformSession | null>
/**
* Resolve a credential only for the inference origin allowed by the provider.
* @param url - actual request destination or API base URL.
* @returns stored token, or undefined for other origins or a signed-out account.
*/
async resolveToken(url: string): Promise<string | undefined>
/**
* Join an active attempt or start browser authorization.
* @param client - identity of the requesting UI; a new attempt captures it, and joining retains the original attempt's identity.
* @param callbackOrigin - browser-accessible loopback HTTP origin, including any SSH local port.
* @param loginSource - initiating UI, used to return from a failed exchange.
* @returns the initial snapshot without waiting for browser approval.
*/
@Remote async startSignIn(client: AccountClientMetadata, callbackOrigin: string, loginSource: 'web' | 'desktop'): Promise<AccountView>
/**
* Cancel only the named attempt; committing attempts settle before returning.
* @param attemptId - attempt identity from this Host.
* @returns state after cancellation or an already-started commit.
*/
@Remote async cancelSignIn(attemptId: SignInAttemptId): Promise<AccountView>
/**
* Remove the local grant while retaining API keys; the provider revokes it in the background.
* @param client - identity of the requesting UI, captured for the background revocation retries.
* @returns the signed-out state after local removal; remote failures never restore the grant.
*/
@Remote signOut(client: AccountClientMetadata): Promise<AccountView>
/**
* Inspect running work before sign-out.
* @returns whether a running task's latest request uses the account route; false when the optional agents service is absent.
*/
@Remote hasRunningAccountTasks(): boolean
/**
* Subscribe to live credential expiry without replay.
* @param signal - subscription lifetime; provider disposal also ends it.
* @returns expiry notifications emitted during the subscription.
*/
@Remote({ mode: 'stream' }) async *watchExpiry(signal: AbortSignal): AsyncIterable<'session-expired'>
/**
* Subscribe to ordered updates including a complete initial snapshot.
* @param signal - subscription lifetime; ending it never cancels login.
* @param includeIdentityChanges - also notify when cached Platform identity changes; defaults to false.
* @returns complete state with snapshot or credentials-changed event type; credential changes take priority when updates coalesce.
*/
watch(signal: AbortSignal, includeIdentityChanges: boolean = false): AsyncIterable<AccountUpdate>
/**
* Stream account state without the Host-only identity subscription option.
* @param signal - subscription lifetime.
* @returns initial state, login progress, and credential-change updates.
*/
@Remote({ name: 'watch', mode: 'stream' }) watchState(signal: AbortSignal): AsyncIterable<AccountUpdate>
```
Source: [`packages/credentials/deepseek-account/src/index.ts`](../../packages/credentials/deepseek-account/src/index.ts)
<a id="authorization-events"></a>
### `authorization/*` events
@@ -466,57 +326,4 @@ Committed change to a provider-managed credential source: a `set`, an `unset`, o
```
Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
<a id="deepseek-account-events"></a>
### `deepseek-account/*` events
<a id="deepseek-accountmodel-sign-in-required--emit"></a>
#### `deepseek-account/model-sign-in-required` — emit
An account model request requires the user to sign in.
```ts cordis-catalog
/** An account model request requires the user to sign in.
* @mode emit
*/
'deepseek-account/model-sign-in-required'(): void
```
Source: [`packages/credentials/deepseek-account/src/types.ts`](../../packages/credentials/deepseek-account/src/types.ts)
<a id="deepseek-accountsession-expired--emit"></a>
#### `deepseek-account/session-expired` — emit
Server rejection removed the current account credential; this notification is not replayed.
```ts cordis-catalog
/** Server rejection removed the current account credential; this notification is not replayed.
* @mode emit
*/
'deepseek-account/session-expired'(): void
```
Source: [`packages/credentials/deepseek-account/src/types.ts`](../../packages/credentials/deepseek-account/src/types.ts)
<a id="deepseek-accountsigned-out--emit"></a>
#### `deepseek-account/signed-out` — emit
Local grant removal has completed.
```ts cordis-catalog
/** Local grant removal has completed.
* @mode emit
*/
'deepseek-account/signed-out'(): void
```
Source: [`packages/credentials/deepseek-account/src/index.ts`](../../packages/credentials/deepseek-account/src/index.ts)
<!-- END GENERATED cordis-surface -->
The account Service Definition exposes getState, getProfile, getBalance, getNotifications, getNotificationContent, reportNotificationEvent, startSignIn, cancelSignIn, signOut, watch, and Host-only resolveToken and getPlatformSession. The platform provider implements it with an AuthorizationFlow and a private GrantRecord. AccountView distinguishes stored presence from server validation; attempt IDs bind cancellation to one local flow. AccountUpdate carries a complete AccountView in state and a type of snapshot for initial or progress updates, or credentials-changed for credential writes and removal. Pending credential changes take priority over progress updates. See [the account package](../../packages/credentials/deepseek-account/README.md).
`AccountClientMetadata` carries `version` from the caller’s `DSH_CLIENT_VERSION`, its active UI `locale`, and `timezoneOffsetSeconds` sampled when the operation begins. The offset is local time minus UTC in seconds: UTC+8 is `28800`. It contains no credentials. Login attempts retain their initiating metadata through exchange and cancellation; sign-out retains its metadata for revocation retries.
+2 -195
View File
@@ -6,6 +6,8 @@
来源:[`packages/credentials/credentials/src/index.ts`](../../packages/credentials/credentials/src/index.ts)
DeepSeek 账号授权是其中一条记录;其登录、请求凭据和 Platform 会话见 [account.zh.md](account.zh.md)。
## 标识
引用以 POSIX 风格环境变量名命名一条凭据。brand 防止调用方将凭据引用与在包或进程之间传递的其他字符串混用;构造时校验 shell 标识符语法。
@@ -55,14 +57,6 @@ interface CredentialInfo {
`credentials/reference-updated (ref)` 在提供方管理的来源发生已提交变更后发出——`set`、`unset` 或在存储中观察到的外部编辑。进程环境自身的变化不可观测,永不发出事件。消费方不需要该事件(它们按操作重新解析);它服务于配置界面刷新「已配置」徽标。
## 内嵌 Platform 凭证
PlatformSession 是 getPlatformSession 返回的仅限 Host 快照:origin 指定所配置的 Platform 签发来源,token 包含其已存账号凭证。userId 复制最近一次成功 getProfile 得到的稳定账号 ID;尚无一次成功读取或资料不含 ID 时为 null。快照复用该 ID,不自行发起资料请求,因此 ID 未知时只会让 userId 为 null,而不会延迟调用方;资料读取首次取得稳定 ID 或该 ID 变化时仅通知使用 `watch(signal, true)` 的 Host 订阅者,供标识使用方重新读取快照。使用方以 origin 和 userId 作为持久化浏览器存储的键,为 null 时退回临时存储。账号已退登或读取凭证期间凭证变化时不返回快照;签发来源不匹配时失败。原生使用方负责在凭证变化时使文档失效。账号 Remote API、AccountView 和 AccountDetails 均不包含此快照。
AccountDetails.balance 将充值钱包投影为 value、赠送钱包投影为 bonusWallets,分别保留币种和十进制余额字符串。查询失败不包含钱包数组。
赠金通知查询返回 AccountBonusBatch,包含当前 Platform 账号 id 和按服务端顺序排列的可通知订单。AccountBonusNotification 保留服务端消息与到期时间,不投影凭证。确认请求携带预期账号 id 和订单 id;账号变化后 Host 拒绝该请求。两项通知操作都通过 x-client-locale 传递发起界面的语言,不使用语言查询参数。
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
<a id="cordis-surface"></a>
@@ -262,140 +256,6 @@ Host service backing the generated `ctx.remote.credentials` namespace. It carrie
Source: [`packages/api/settings-controller/src/credentials.ts`](../../packages/api/settings-controller/src/credentials.ts)
<a id="ctxdeepseekaccount--deepseekaccount"></a>
### `ctx.deepseekAccount` — `DeepSeekAccount`
Account login, credentials, and client-safe Remote operations.
```ts cordis-catalog
/**
* Read stored-account presence and the latest login attempt.
* @returns a snapshot without credentials or PKCE secrets.
*/
@Remote async getState(): Promise<AccountView>
/**
* Query Platform profile independently of wallet balances.
* A ready result whose stable profile ID first becomes available or changes notifies identity-enabled watch
* consumers, so they re-read getPlatformSession; repeated IDs stay silent.
* @param client - identity of the requesting UI for this call.
* @returns profile outcome, or null if signed out or the grant changed during the query.
*/
@Remote async getProfile(client: AccountClientMetadata): Promise<AccountDetails['profile'] | null>
/**
* Query Platform recharge and bonus wallet balances independently of profile data.
* @param client - identity of the requesting UI for this call.
* @returns balance outcome, or null if signed out or the grant changed during the query.
*/
@Remote getBalance(client: AccountClientMetadata): Promise<AccountDetails['balance'] | null>
/**
* Query unconsumed account notifications in server order without reading profile data.
* @param client - identity of the requesting UI for this call; its language selects the server-authored message.
* @returns notifications with their next query delay, or null if signed out or the grant changed during the query.
*/
@Remote async getNotifications(client: AccountClientMetadata): Promise<AccountNotificationBatch | null>
/**
* Query localized content of a notification, including one already consumed.
* @param id - notification whose content is requested.
* @param client - identity of the requesting UI; its language selects the localized content.
* @returns content without changing consumption, or null if signed out or the grant changed.
*/
@Remote async getNotificationContent(id: AccountNotificationId, client: AccountClientMetadata): Promise<AccountNotification | null>
/**
* Report a notification interaction; the backend decides consumption.
* @param id - notification the user interacted with.
* @param event - displayed frame, non-dismiss action click, or explicit dismissal.
* @param client - identity of the requesting UI for this call.
* @returns true once the server accepts the event; false if signed out or credentials changed during the call.
*/
@Remote async reportNotificationEvent(id: AccountNotificationId, event: AccountNotificationEvent, client: AccountClientMetadata): Promise<boolean>
/**
* Remove an inference-rejected token only while it still matches the stored login.
* @param token - token captured by the rejected inference request.
* @returns after matching credentials are removed and the expiry notification is emitted.
*/
async rejectToken(token: string): Promise<void>
/**
* Read existing login identity without creating a device or returning credentials.
* @returns optional device/account identifiers and the provider's OS version string.
*/
async getDeviceIdentity(): Promise<{ deviceId?: string; userId?: AccountUserId; osVersion: string }>
/**
* Read credentials for the configured embedded-page origin, bound to their account environment, and
* pair them with the account ID from the last successful profile read; no profile request is made.
* @returns a Host-only snapshot, or null while signed out or when the credential changed during the read.
*/
async getPlatformSession(): Promise<PlatformSession | null>
/**
* Resolve a credential only for the inference origin allowed by the provider.
* @param url - actual request destination or API base URL.
* @returns stored token, or undefined for other origins or a signed-out account.
*/
async resolveToken(url: string): Promise<string | undefined>
/**
* Join an active attempt or start browser authorization.
* @param client - identity of the requesting UI; a new attempt captures it, and joining retains the original attempt's identity.
* @param callbackOrigin - browser-accessible loopback HTTP origin, including any SSH local port.
* @param loginSource - initiating UI, used to return from a failed exchange.
* @returns the initial snapshot without waiting for browser approval.
*/
@Remote async startSignIn(client: AccountClientMetadata, callbackOrigin: string, loginSource: 'web' | 'desktop'): Promise<AccountView>
/**
* Cancel only the named attempt; committing attempts settle before returning.
* @param attemptId - attempt identity from this Host.
* @returns state after cancellation or an already-started commit.
*/
@Remote async cancelSignIn(attemptId: SignInAttemptId): Promise<AccountView>
/**
* Remove the local grant while retaining API keys; the provider revokes it in the background.
* @param client - identity of the requesting UI, captured for the background revocation retries.
* @returns the signed-out state after local removal; remote failures never restore the grant.
*/
@Remote signOut(client: AccountClientMetadata): Promise<AccountView>
/**
* Inspect running work before sign-out.
* @returns whether a running task's latest request uses the account route; false when the optional agents service is absent.
*/
@Remote hasRunningAccountTasks(): boolean
/**
* Subscribe to live credential expiry without replay.
* @param signal - subscription lifetime; provider disposal also ends it.
* @returns expiry notifications emitted during the subscription.
*/
@Remote({ mode: 'stream' }) async *watchExpiry(signal: AbortSignal): AsyncIterable<'session-expired'>
/**
* Subscribe to ordered updates including a complete initial snapshot.
* @param signal - subscription lifetime; ending it never cancels login.
* @param includeIdentityChanges - also notify when cached Platform identity changes; defaults to false.
* @returns complete state with snapshot or credentials-changed event type; credential changes take priority when updates coalesce.
*/
watch(signal: AbortSignal, includeIdentityChanges: boolean = false): AsyncIterable<AccountUpdate>
/**
* Stream account state without the Host-only identity subscription option.
* @param signal - subscription lifetime.
* @returns initial state, login progress, and credential-change updates.
*/
@Remote({ name: 'watch', mode: 'stream' }) watchState(signal: AbortSignal): AsyncIterable<AccountUpdate>
```
Source: [`packages/credentials/deepseek-account/src/index.ts`](../../packages/credentials/deepseek-account/src/index.ts)
<a id="authorization-events"></a>
### `authorization/*` events
@@ -466,57 +326,4 @@ Committed change to a provider-managed credential source: a `set`, an `unset`, o
```
Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
<a id="deepseek-account-events"></a>
### `deepseek-account/*` events
<a id="deepseek-accountmodel-sign-in-required--emit"></a>
#### `deepseek-account/model-sign-in-required` — emit
An account model request requires the user to sign in.
```ts cordis-catalog
/** An account model request requires the user to sign in.
* @mode emit
*/
'deepseek-account/model-sign-in-required'(): void
```
Source: [`packages/credentials/deepseek-account/src/types.ts`](../../packages/credentials/deepseek-account/src/types.ts)
<a id="deepseek-accountsession-expired--emit"></a>
#### `deepseek-account/session-expired` — emit
Server rejection removed the current account credential; this notification is not replayed.
```ts cordis-catalog
/** Server rejection removed the current account credential; this notification is not replayed.
* @mode emit
*/
'deepseek-account/session-expired'(): void
```
Source: [`packages/credentials/deepseek-account/src/types.ts`](../../packages/credentials/deepseek-account/src/types.ts)
<a id="deepseek-accountsigned-out--emit"></a>
#### `deepseek-account/signed-out` — emit
Local grant removal has completed.
```ts cordis-catalog
/** Local grant removal has completed.
* @mode emit
*/
'deepseek-account/signed-out'(): void
```
Source: [`packages/credentials/deepseek-account/src/index.ts`](../../packages/credentials/deepseek-account/src/index.ts)
<!-- END GENERATED cordis-surface -->
账号服务定义提供 getState、getProfile、getBalance、getNotifications、getNotificationContent、reportNotificationEvent、startSignIn、cancelSignIn、signOut、watch 及仅限 Host 的 resolveToken 和 getPlatformSession。平台提供者使用 AuthorizationFlow 和私有 GrantRecord 实现这些操作。AccountView 区分本地存在与服务器验证;尝试 ID 将取消绑定到单次本地流程。AccountUpdate 的 state 携带完整 AccountView,type 为 snapshot 时表示首次或进度更新,为 credentials-changed 时表示凭据写入或删除。待发送的凭据变化优先于进度更新。参见[账号包](../../packages/credentials/deepseek-account/README.zh.md)。
`AccountClientMetadata` 携带调用方 `DSH_CLIENT_VERSION` 提供的 `version`、当前界面 `locale`,以及操作发起时采样的 `timezoneOffsetSeconds`。偏移为本地时间减 UTC 的秒数:UTC+8 对应 `28800`。其中不含凭证。登录申请在兑换及取消期间保留发起时的元数据;退出操作为撤销重试保留其元数据。
+4 -4
View File
@@ -36,8 +36,8 @@
en: 58dec2259b0b1c6f
zh: fc99fe965acaabf3
/llm-streaming/the-model-request:
en: 834d3d8d6b5871ab
zh: 393889ec6075f622
en: 61d4131601adbc32
zh: b83156c875d29b89
/llm-streaming/the-model-request/the-request-envelope-llmcallconfig-and-the-logged-header:
en: b0eb4620c6953646
zh: fabf51c7245a4855
@@ -48,5 +48,5 @@
en: 8c140f9c5a799f01
zh: f66b895594247e92
/llm-streaming/service-and-provider-contracts:
en: 8dc79d4cc82824c2
zh: 3ebabd3a117ad717
en: 81b4ede66c5e906d
zh: 2ad0ddb1a32e3167
+103
View File
@@ -527,6 +527,86 @@ interface LlmNativeAuth {
}
```
A route's adapter can also publish the credential the route currently sends, so consumers that call the same deployment outside the model request path, such as the DeepSeek web providers, reuse it through `ctx.llm.providerCredential(provider)` instead of reading provider configuration or choosing header names. A grant is Host-only and is held for one operation; `kind` is merge-extensible through `LlmCredentialKindMap`, whose declared members are `api-key` and `account`. A grant whose owner can withdraw the credential while requests carry it, as an account sign-out does, has a `revoked` signal: the consumer runs each request it authenticates under that signal and reports a request the signal ended as its own failure, not as the caller's cancellation.
```ts type-equiv
/**
* One credential released for one destination. Host-only: it carries the
* secret, so it never crosses a Remote boundary and never enters a log.
*/
interface ProviderCredentialGrant {
/**
* Request headers carrying the credential as the route's own protocol
* expects it, such as `x-api-key` for an API key. Consumers speaking that
* protocol send them unchanged.
*/
readonly headers: Readonly<Record<string, string>>
/**
* The bare credential value, for destinations whose protocol renders it
* differently from {@link headers}, such as `Authorization: Bearer`.
*/
readonly value: string
/**
* Invalidate this exact credential after the destination rejected it with
* HTTP 401 so no later request resends it. Absent for kinds without
* invalidation. The owner contains storage failures: the caller reports the
* destination's rejection, never a failure of this call.
* @returns settlement after the invalidation attempt.
*/
reject?(): Promise<void>
/**
* Aborts when the owner withdraws this credential while requests carrying it
* may be in flight, as an account sign-out does. A consumer ends each request
* it authenticated with this grant and reports that end as its own failure,
* not as the caller's cancellation. Absent for kinds that are never withdrawn.
*/
readonly revoked?: AbortSignal
}
```
```ts type-equiv
/**
* The credential one registered provider route currently sends, answered by
* the route's owning adapter so that consumers read no provider configuration
* and choose no header names. `ctx.llm.providerCredential()` resolves a new value
* per call from one configuration generation; a caller keeps it for one
* operation only.
*/
interface ProviderCredential {
/** Kind of credential the route sends. */
readonly kind: LlmCredentialKind
/**
* The route's current request base URL as its configuration resolves it,
* environment fallbacks included: the destination this credential is meant
* for. Consumers derive sibling endpoints of the same deployment from it.
*/
readonly baseURL: string
/**
* Credential reference the route resolves, for diagnostics that tell the user
* where to configure the credential; absent for kinds without a stored
* reference, such as sign-in grants.
*/
readonly reference?: string
/**
* Whether {@link resolve} would release a credential for `endpoint`, checked
* without validating the credential or contacting the destination; the owner
* may read its store to answer. Store failures reject.
* @param endpoint - absolute URL the credential would be sent to.
* @returns whether a credential is configured for that destination.
*/
configured(endpoint: string): Promise<boolean>
/**
* Release the credential for `endpoint`, or `undefined` when none is
* configured or the destination may not receive it. The caller chooses the
* failure it reports for `undefined`. Store and format failures reject.
* @param endpoint - absolute URL the credential will be sent to.
* @param signal - cancellation for the lookup.
* @returns the released credential, or `undefined`.
*/
resolve(endpoint: string, signal?: AbortSignal): Promise<ProviderCredentialGrant | undefined>
}
```
A catalog entry may carry a provider-authored `badge` that selectors show beside the model name. It is display data: `resolveModelInfo` omits it, and no model request carries it.
```ts type-equiv
@@ -870,6 +950,8 @@ The [wire reference](../deepseek-llm-api-wire-extensions.md) defines the exact r
`LlmAdapter` is the provider contract: subclass, implement `stream()`, and register one adapter instance with `ctx.llm.registerAdapter(providers, adapter)`. `GenerateOptions.provider` selects the registered adapter; `GenerateOptions.model` is passed to that adapter and need not be registered at lifecycle start. Duplicate provider routes fail atomically. Optional `providerRetryPolicy()` is captured per route with normal defaults, while `providerInfo()` and asynchronous `listModels()` feed `LlmRuntime.listProviders()` / `listModels()` with detached selector metadata. That catalog is advisory rather than a request whitelist: the adapter remains authoritative and may accept unlisted model ids. One asynchronous `resolveModel()` query returns exact model identity plus optional correctness-sensitive context capacity, an adapter-configured `defaultMaxTokens`, and ordered model-owned reasoning ids with an optional deployment default; absent fields mean unavailable metadata or provider-owned behavior, not invalid catalog membership. The resolver receives optional cancellation and must settle promptly after abort. `LlmRuntime.resolveModelInfo()` validates and detaches the aggregate. At the final adapter boundary, `resolveCallConfig()` materializes the output default only when `maxTokens` is absent and validates and materializes reasoning, so direct calls cannot bypass either configured behavior; direct dispatch captures one registration before awaiting that resolution. The agent loop instead uses `prepareCall()` to keep the same registration across model resolution, durable header logging, and dispatch, retain detached context metadata from that exact lookup, and report which config fields the adapter defaulted. Adapter lookup happens at the terminal continuation of the `llm/stream` waterfall, so a listener may short-circuit the call or route a mutable one-shot request before lookup. AgentLoop observes a request attempt once the outer waterfall returns a stream handle; that limited boundary does not prove a lazy terminal adapter was constructed or began provider I/O. The `block-start` / `block-end` `index` correlation and the assembler together mean an adapter only has to emit well-formed chunks — block reassembly is not each adapter's problem. [architecture.md](../architecture.md#turn-flow) shows where `ctx.llm.stream()` and the `llm/stream` waterfall sit in one turn.
Optional `providerCredential()` publishes the credential a route currently sends, with the route's base URL, its kind, and an optional credential reference. `LlmRuntime.providerCredential(provider)` forwards to the owning adapter: an unregistered route answers `undefined`, because callers ask about routes a conversation named earlier, and a registered route whose configuration does not resolve propagates the adapter's failure. The DeepSeek web providers read it to call the deployment of the conversation's route with that route's credential, so no consumer reads another plugin's configuration or chooses its header names.
```ts type-equiv
/** One model call whose config and adapter registration were resolved together. */
interface PreparedLlmCall {
@@ -937,6 +1019,16 @@ declare abstract class LlmAdapter {
* @returns the same target used by request serialization, before provider-internal processing.
*/
imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): ImageRequestTarget;
/**
* Describe the credential one owned route currently sends, for consumers that
* call the same deployment outside the model request path, such as web
* providers that share a route's credential and endpoint. The default
* publishes none. Implementations answer from one configuration generation
* per call and may throw when that configuration does not resolve.
* @param _provider - a route passed to `registerAdapter()` for this instance.
* @returns the route's current credential, or `undefined` when the route publishes none.
*/
providerCredential(_provider: string): ProviderCredential | undefined;
/**
* List models this adapter can currently advertise for one owned provider.
* Core routing accepts unlisted model ids; catalog-driven entry points such
@@ -1117,6 +1209,17 @@ imageRequestPricing(provider: string, model: string): LlmImageRequestPricing | u
*/
imageRequestTarget(provider: string, model: string, image: ImageAttachmentRef): ImageRequestTarget
/**
* Resolve the credential one registered route currently sends, through its
* owning adapter. An unregistered route answers `undefined` rather than
* throwing because callers ask about routes a conversation named earlier,
* which may no longer be mounted; a registered route whose configuration
* does not resolve propagates the adapter's failure.
* @param provider - provider route whose credential is wanted.
* @returns the route's credential, or `undefined` when the route is unregistered or publishes none.
*/
providerCredential(provider: string): ProviderCredential | undefined
/**
* Resolve the exact text one durable file occurrence contributes to every
* provider request in the current execution environment.
+103
View File
@@ -533,6 +533,86 @@ interface LlmNativeAuth {
}
```
路由的适配器还可以发布该路由当前发送的凭据,使在模型请求路径之外调用同一部署的消费方(如 DeepSeek Web 提供方)通过 `ctx.llm.providerCredential(provider)` 复用它,而不读取提供方配置或自行选择请求头名称。授权仅限 Host,且只在一次操作内持有;`kind` 通过 `LlmCredentialKindMap` 可合并扩展,已声明的成员为 `api-key` 和 `account`。所有者可能在请求仍携带凭据时撤回它(例如账号退登),这类授权带有 `revoked` 信号:消费方让它鉴权的每个请求都受该信号约束,并把被该信号结束的请求报告为自身的失败,而不是调用方的取消。
```ts type-equiv
/**
* One credential released for one destination. Host-only: it carries the
* secret, so it never crosses a Remote boundary and never enters a log.
*/
interface ProviderCredentialGrant {
/**
* Request headers carrying the credential as the route's own protocol
* expects it, such as `x-api-key` for an API key. Consumers speaking that
* protocol send them unchanged.
*/
readonly headers: Readonly<Record<string, string>>
/**
* The bare credential value, for destinations whose protocol renders it
* differently from {@link headers}, such as `Authorization: Bearer`.
*/
readonly value: string
/**
* Invalidate this exact credential after the destination rejected it with
* HTTP 401 so no later request resends it. Absent for kinds without
* invalidation. The owner contains storage failures: the caller reports the
* destination's rejection, never a failure of this call.
* @returns settlement after the invalidation attempt.
*/
reject?(): Promise<void>
/**
* Aborts when the owner withdraws this credential while requests carrying it
* may be in flight, as an account sign-out does. A consumer ends each request
* it authenticated with this grant and reports that end as its own failure,
* not as the caller's cancellation. Absent for kinds that are never withdrawn.
*/
readonly revoked?: AbortSignal
}
```
```ts type-equiv
/**
* The credential one registered provider route currently sends, answered by
* the route's owning adapter so that consumers read no provider configuration
* and choose no header names. `ctx.llm.providerCredential()` resolves a new value
* per call from one configuration generation; a caller keeps it for one
* operation only.
*/
interface ProviderCredential {
/** Kind of credential the route sends. */
readonly kind: LlmCredentialKind
/**
* The route's current request base URL as its configuration resolves it,
* environment fallbacks included: the destination this credential is meant
* for. Consumers derive sibling endpoints of the same deployment from it.
*/
readonly baseURL: string
/**
* Credential reference the route resolves, for diagnostics that tell the user
* where to configure the credential; absent for kinds without a stored
* reference, such as sign-in grants.
*/
readonly reference?: string
/**
* Whether {@link resolve} would release a credential for `endpoint`, checked
* without validating the credential or contacting the destination; the owner
* may read its store to answer. Store failures reject.
* @param endpoint - absolute URL the credential would be sent to.
* @returns whether a credential is configured for that destination.
*/
configured(endpoint: string): Promise<boolean>
/**
* Release the credential for `endpoint`, or `undefined` when none is
* configured or the destination may not receive it. The caller chooses the
* failure it reports for `undefined`. Store and format failures reject.
* @param endpoint - absolute URL the credential will be sent to.
* @param signal - cancellation for the lookup.
* @returns the released credential, or `undefined`.
*/
resolve(endpoint: string, signal?: AbortSignal): Promise<ProviderCredentialGrant | undefined>
}
```
目录条目可以携带提供方编写的 `badge`,供选择器显示在模型名称旁。它只是展示数据:`resolveModelInfo` 不返回它,模型请求也不携带它。
```ts type-equiv
@@ -876,6 +956,8 @@ interface LlmCallConfigAdapterDefaults {
`LlmAdapter` 是提供方约定:创建子类、实现 `stream()`,再用 `ctx.llm.registerAdapter(providers, adapter)` 注册一个适配器实例。`GenerateOptions.provider` 选择已注册适配器;`GenerateOptions.model` 会传给该适配器,无需在生命周期启动时注册。重复提供方路由会原子失败。可选的 `providerRetryPolicy()` 会按路由捕获并填入 normal 默认值,`providerInfo()` 与异步 `listModels()` 方法则为 `LlmRuntime.listProviders()` / `listModels()` 提供分离的 selector 元数据。该目录仅供参考,不是请求白名单:适配器仍是权威,并可接受未列出的模型 id。单次异步 `resolveModel()` 查询返回确切模型身份,以及可选的对正确性敏感的上下文容量、适配器配置的 `defaultMaxTokens`、由模型持有的有序推理强度 ID 和可选的部署默认值;字段缺失表示元数据不可用或保留提供方持有的行为,而不表示目录成员关系无效。解析器会接收可选的取消信号,并且必须在信号中止后迅速完成结算。`LlmRuntime.resolveModelInfo()` 会校验聚合结果并返回分离值。在最终适配器边界,`resolveCallConfig()` 仅在 `maxTokens` 缺失时填入输出默认值,并校验和填入推理强度,因此直接调用也无法绕过任何一项已配置行为;直接分派会在等待解析前捕获一项适配器注册。agent loop 则使用 `prepareCall()`,使模型解析、请求头持久记录和分派全程使用同一项注册,保留来自同一次查询的分离上下文元数据,并报告适配器填入的配置字段。适配器查找发生在 `llm/stream` waterfall 的终端 continuation,因此 listener 可以在查找前短路调用,或路由一个可变的一次性请求。AgentLoop 在外层 waterfall 返回流句柄时观察到一次请求尝试;这个有限边界不能证明惰性终端适配器已构造完成或开始提供方 I/O。`block-start` / `block-end` 的 `index` 关联与 assembler 共同意味着适配器只需 emit 格式正确的分片——块重组不是每个适配器各自的问题。`ctx.llm.stream()` 与 `llm/stream` waterfall 在一个轮次中的位置见 [architecture.md](../architecture.zh.md#turn-flow)。
可选的 `providerCredential()` 发布路由当前发送的凭据,连同路由的基础地址、凭据种类和可选的凭据引用。`LlmRuntime.providerCredential(provider)` 转发给拥有该路由的适配器:未注册的路由回答 `undefined`,因为调用方询问的是会话早先命名的路由;已注册但配置无法解析的路由则传播适配器的失败。DeepSeek Web 提供方据此用会话路由的凭据调用同一部署,因此没有消费方需要读取其他插件的配置或自行选择请求头名称。
```ts type-equiv
/** One model call whose config and adapter registration were resolved together. */
interface PreparedLlmCall {
@@ -943,6 +1025,16 @@ declare abstract class LlmAdapter {
* @returns the same target used by request serialization, before provider-internal processing.
*/
imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): ImageRequestTarget;
/**
* Describe the credential one owned route currently sends, for consumers that
* call the same deployment outside the model request path, such as web
* providers that share a route's credential and endpoint. The default
* publishes none. Implementations answer from one configuration generation
* per call and may throw when that configuration does not resolve.
* @param _provider - a route passed to `registerAdapter()` for this instance.
* @returns the route's current credential, or `undefined` when the route publishes none.
*/
providerCredential(_provider: string): ProviderCredential | undefined;
/**
* List models this adapter can currently advertise for one owned provider.
* Core routing accepts unlisted model ids; catalog-driven entry points such
@@ -1123,6 +1215,17 @@ imageRequestPricing(provider: string, model: string): LlmImageRequestPricing | u
*/
imageRequestTarget(provider: string, model: string, image: ImageAttachmentRef): ImageRequestTarget
/**
* Resolve the credential one registered route currently sends, through its
* owning adapter. An unregistered route answers `undefined` rather than
* throwing because callers ask about routes a conversation named earlier,
* which may no longer be mounted; a registered route whose configuration
* does not resolve propagates the adapter's failure.
* @param provider - provider route whose credential is wanted.
* @returns the route's credential, or `undefined` when the route is unregistered or publishes none.
*/
providerCredential(provider: string): ProviderCredential | undefined
/**
* Resolve the exact text one durable file occurrence contributes to every
* provider request in the current execution environment.
@@ -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/llm-route-credential/guide.md
/:
en: 56fc7afd90f0fcde
zh: 0b441fc159f25bcf
/deepseek-routes-publish-the-credential-web-consumers-reuse:
en: b5392bcd81f69488
zh: 68cd945f2dde46af
/deepseek-routes-publish-the-credential-web-consumers-reuse/change:
en: 7568433b72e2633b
zh: dcd4c6deb72da3a4
/deepseek-routes-publish-the-credential-web-consumers-reuse/migration:
en: 0632d7c9ffce1675
zh: a8b4d67f469eaee7
@@ -0,0 +1,29 @@
---
kind: upgrade-guide
description: "DeepSeek model routes publish their credential through ctx.llm.providerCredential(); the llm-deepseek credential helpers, the route plugins' config exports, and account Agent inspection are removed."
---
# DeepSeek routes publish the credential web consumers reuse
English | [中文](guide.zh.md)
## Change
`LlmAdapter.providerCredential(provider)` and `LlmRuntime.providerCredential(provider)` publish a route's current credential as a `ProviderCredential`: kind, resolved base URL, optional reference, a `configured(endpoint)` presence check, and `resolve(endpoint, signal)` returning a `ProviderCredentialGrant` with protocol headers, the bare value, an optional `reject()`, and an optional `revoked` withdrawal signal.
`@deepseek-ai/dsh-llm-deepseek` no longer exports `resolveDeepSeekApiKey`, `deepSeekApiKeyConfigured`, `resolveDeepSeekAccountToken`, or `rejectDeepSeekAccountToken`. `DeepSeekAdapterOptions.resolveAuth(connection, endpoint)` returns `DeepSeekRequestAuth | undefined`, and `DeepSeekRequestAuth` requires `value` beside `headers`; the new `missingCredential` and `credential` options name the missing-credential failure and the published credential. `createModelListingCache` takes `credential(url)` returning request headers, and its `load` is optional.
`@deepseek-ai/dsh-llm-deepseek-api-key` no longer exports `plainOptions` and `resolveAdapterOptions`; `@deepseek-ai/dsh-llm-deepseek-account` no longer exports `plainAccountOptions` and `resolveAccountOptions`. The account route plugin cancels its running Agents after sign-out and registers a running-task report.
`@deepseek-ai/dsh-deepseek-account` adds Host-only `resolveRequestCredential(url)` and `registerRunningTaskReport(report)` and makes `resolveToken(url)` and `rejectToken(token)` private; `hasRunningAccountTasks()` answers from registered reports and no longer reads `ctx.agents`. A sign-out aborts released credentials' `revoked` signal, ending in-flight account requests: model requests outside a turn fail with `ACCOUNT_SIGN_IN_REQUIRED`, Search and Fetch with `WEB_PROVIDER_ERROR`. The package drops its `dsh-agent` and `dsh-llm` peer dependencies and moves from `packages/credentials/` to `packages/account/` under its unchanged name. `@deepseek-ai/dsh-credentials` adds `resolveCredentialRef(ctx, ref)` and `credentialRefConfigured(ctx, ref)`.
`@deepseek-ai/dsh-web-deepseek-api` drops its peer dependencies on `dsh-llm-deepseek`, both route plugins, and `cordis-plugin-loader`; `@deepseek-ai/dsh-web-search-deepseek` drops `dsh-llm-deepseek` and `dsh-deepseek-account` and adds `dsh-llm`. Both read route credentials through `ctx.llm.providerCredential()`, so an adapter registered under a DeepSeek route id that publishes no credential, or a credential of the other kind, counts as no route. Without the account route, the Search and Fetch APIs send the account credential to the origin `DEEPSEEK_BASE_URL` names and reject a value that is not an HTTP(S) URL without embedded credentials. `DeepSeekSearchProviderOptions` replaces `resolveAccountToken` and `rejectAccountToken` with `resolveAccountCredential(endpoint)`.
## Migration
1. Replace the removed `llm-deepseek` helpers: read keys with `resolveCredentialRef` and `credentialRefConfigured` from `@deepseek-ai/dsh-credentials` and validate them with `assertUsableApiKey`; read account credentials with `ctx.deepseekAccount.resolveRequestCredential(url)` and invalidate through the returned `reject()`. To reuse a mounted route's credential and endpoint, call `ctx.llm.providerCredential(provider)`, and run each request under the grant's `revoked` signal.
2. In custom `DeepSeekAdapter` or `registerDeepSeekProvider` consumers, return `undefined` from `resolveAuth` when no credential exists, add `value` to every `DeepSeekRequestAuth`, supply `missingCredential` for a route-specific failure, and declare `credential` to publish the route's credential. Pass credential headers, not a token, to `createModelListingCache`.
3. Replace imports of the route plugins' config exports with the plugins' own `Config`, and read a route's endpoint from its published credential instead of its resolver.
4. Make `deepseekAccount` stand-ins used by the account route or the web providers implement `resolveRequestCredential`, returning a `revoked` signal; stand-ins that supplied `ctx.agents` for `hasRunningAccountTasks()` register a report instead.
5. Update workspace references to `packages/account/deepseek-account`; the npm package name, Remote namespace, and configuration keys are unchanged.
6. Replace `resolveAccountToken` and `rejectAccountToken` in `DeepSeekSearchProviderOptions` with `resolveAccountCredential` returning a `ProviderCredentialGrant`.
@@ -0,0 +1,29 @@
---
kind: upgrade-guide
description: "DeepSeek 模型路由通过 ctx.llm.providerCredential() 发布自己的凭据;移除 llm-deepseek 的凭据辅助函数、路由插件的配置导出和账号服务对 Agent 的检查。"
---
# DeepSeek 路由发布 Web 消费方复用的凭据
[English](guide.md) | 中文
## 变更
`LlmAdapter.providerCredential(provider)` 与 `LlmRuntime.providerCredential(provider)` 把路由当前的凭据发布为 `ProviderCredential`:种类、解析后的基础地址、可选引用、`configured(endpoint)` 存在性检查,以及返回 `ProviderCredentialGrant` 的 `resolve(endpoint, signal)`,授权包含协议请求头、裸值、可选的 `reject()`,以及可选的 `revoked` 撤回信号。
`@deepseek-ai/dsh-llm-deepseek` 不再导出 `resolveDeepSeekApiKey`、`deepSeekApiKeyConfigured`、`resolveDeepSeekAccountToken` 和 `rejectDeepSeekAccountToken`。`DeepSeekAdapterOptions.resolveAuth(connection, endpoint)` 返回 `DeepSeekRequestAuth | undefined`,且 `DeepSeekRequestAuth` 在 `headers` 之外要求 `value`;新增的 `missingCredential` 与 `credential` 选项分别命名凭据缺失的失败和发布的凭据。`createModelListingCache` 的 `credential(url)` 返回请求头,其 `load` 变为可选。
`@deepseek-ai/dsh-llm-deepseek-api-key` 不再导出 `plainOptions` 和 `resolveAdapterOptions`;`@deepseek-ai/dsh-llm-deepseek-account` 不再导出 `plainAccountOptions` 和 `resolveAccountOptions`。账号路由插件在退登后取消其运行中的 Agent,并注册运行中任务报告。
`@deepseek-ai/dsh-deepseek-account` 新增仅限 Host 的 `resolveRequestCredential(url)` 与 `registerRunningTaskReport(report)`,并将 `resolveToken(url)` 与 `rejectToken(token)` 改为私有;`hasRunningAccountTasks()` 根据注册的报告作答,不再读取 `ctx.agents`。退登会中止已释放凭据的 `revoked` 信号,从而结束在途的账号请求:回合之外的模型请求以 `ACCOUNT_SIGN_IN_REQUIRED` 失败,Search 与 Fetch 以 `WEB_PROVIDER_ERROR` 失败。该包移除 `dsh-agent` 与 `dsh-llm` peer 依赖,并以不变的名字从 `packages/credentials/` 移至 `packages/account/`。`@deepseek-ai/dsh-credentials` 新增 `resolveCredentialRef(ctx, ref)` 与 `credentialRefConfigured(ctx, ref)`。
`@deepseek-ai/dsh-web-deepseek-api` 移除对 `dsh-llm-deepseek`、两个路由插件和 `cordis-plugin-loader` 的 peer 依赖;`@deepseek-ai/dsh-web-search-deepseek` 移除 `dsh-llm-deepseek` 与 `dsh-deepseek-account`,新增 `dsh-llm`。两者都通过 `ctx.llm.providerCredential()` 读取路由凭据,因此以 DeepSeek 路由 id 注册但不发布凭据、或发布另一种凭据的适配器视为没有路由。没有账号路由时,Search 与 Fetch API 把账号凭据发往 `DEEPSEEK_BASE_URL` 所指的 origin,并拒绝不是不含内嵌凭据的 HTTP(S) URL 的值。`DeepSeekSearchProviderOptions` 用 `resolveAccountCredential(endpoint)` 替换 `resolveAccountToken` 与 `rejectAccountToken`。
## 迁移
1. 替换被移除的 `llm-deepseek` 辅助函数:用 `@deepseek-ai/dsh-credentials` 的 `resolveCredentialRef` 与 `credentialRefConfigured` 读取密钥并用 `assertUsableApiKey` 校验;用 `ctx.deepseekAccount.resolveRequestCredential(url)` 读取账号凭据并通过返回的 `reject()` 作废。要复用已挂载路由的凭据和端点,调用 `ctx.llm.providerCredential(provider)`,并让每个请求受授权的 `revoked` 信号约束。
2. 在自定义的 `DeepSeekAdapter` 或 `registerDeepSeekProvider` 消费方中,没有凭据时让 `resolveAuth` 返回 `undefined`,为每个 `DeepSeekRequestAuth` 加上 `value`,为路由专属的失败提供 `missingCredential`,并声明 `credential` 以发布路由凭据。向 `createModelListingCache` 传递凭据请求头而不是 token。
3. 用路由插件自身的 `Config` 替换对其配置导出的导入,并从路由发布的凭据而非其解析函数读取端点。
4. 让账号路由或 Web 提供方使用的 `deepseekAccount` 替身实现 `resolveRequestCredential` 并返回 `revoked` 信号;为 `hasRunningAccountTasks()` 提供 `ctx.agents` 的替身改为注册报告。
5. 把工作区引用更新为 `packages/account/deepseek-account`;npm 包名、Remote 命名空间和配置键均不变。
6. 把 `DeepSeekSearchProviderOptions` 中的 `resolveAccountToken` 与 `rejectAccountToken` 替换为返回 `ProviderCredentialGrant` 的 `resolveAccountCredential`。
+2 -2
View File
@@ -15,8 +15,8 @@
en: ffc55792d6e922e1
zh: 83bd759638857e2d
/packages/package-groups:
en: 704e948001e25580
zh: dcfbb1b483d2a95a
en: d9e9a1a89c88f2e1
zh: b48ff513befdad5b
/packages/release-expectations:
en: 236081c1659b25ab
zh: 809110adf003802e
+1
View File
@@ -71,6 +71,7 @@ Every package lives in exactly one group; new packages join existing groups, and
| [`session-query/`](session-query/README.md) | Session retrieval family: logical corpus, bounded reads, lineage, semantic filtering, SQLite full-text search |
| [`settings/`](settings/README.md) | User-settings seam + file-backed provider |
| [`credentials/`](credentials/README.md) | Credential-reference and credential-record seam + env-over-`.env` provider + authorization flows that ask a human |
| [`account/`](account/README.md) | DeepSeek account sign-in and Host-only request credentials |
| [`storage/`](storage/README.md) | Non-session storage hub + backends + domain form |
| [`workspace/`](workspace/README.md) | Workspace entity |
| [`sdk/`](sdk/README.md) | Out-of-process SDK: JSON-RPC protocol and TypeScript client/server |
+1
View File
@@ -71,6 +71,7 @@ harness 由 `packages/` 下的 npm 包组装而成,按能力系列分组:会
| [`session-query/`](session-query/README.zh.md) | 会话检索系列:逻辑语料库、有界读取、血缘、语义过滤、SQLite 全文搜索 |
| [`settings/`](settings/README.zh.md) | 用户设置 seam + 基于文件的提供方 |
| [`credentials/`](credentials/README.zh.md) | 凭据引用与凭据记录 seam + 环境变量优先于 `.env` 的提供方 + 需要向人询问的授权流程 |
| [`account/`](account/README.zh.md) | DeepSeek 账号登录与仅限 Host 的请求凭据 |
| [`storage/`](storage/README.zh.md) | 非会话存储中枢 + 后端 + 领域形式 |
| [`workspace/`](workspace/README.zh.md) | Workspace 实体 |
| [`sdk/`](sdk/README.zh.md) | 进程外 SDK:JSON-RPC 协议与 TypeScript 客户端/服务器 |
+25
View File
@@ -0,0 +1,25 @@
# Bilingual-pair consistency record for README.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 packages/account/README.md
/:
en: c603fc9f9990181e
zh: fc045770018269cd
/account-deepseek-account:
en: 15e52f323c5ffdba
zh: e32a4d077fd5ef98
/account-deepseek-account/summary:
en: b75f72f3404fcd85
zh: c24435d70528c5a4
/account-deepseek-account/table-of-contents:
en: 1eb35b015a6c423f
zh: a8a3dceee2c9e943
/account-deepseek-account/packages:
en: 4f342c1e06b8c9e2
zh: f36f298ef3bd1be2
/account-deepseek-account/related-documentation:
en: 6667d1a41ac182d1
zh: 065a196972782a34
/account-deepseek-account/dev-note:
en: 5de1d6304e00c58f
zh: 8d8225361cfa29e5
+51
View File
@@ -0,0 +1,51 @@
---
description: "Package map for the DeepSeek account family: browser sign-in, the stored account grant, and the Host-only request credentials released to the account model route and the DeepSeek web providers."
kind: "package-group"
---
# account/ — DeepSeek account
English | [中文](README.zh.md)
## Summary
The `account/` group signs the user in to DeepSeek through the system browser and keeps the account grant in the local credential store that [`credentials/`](../credentials/README.md) owns. Host consumers never read the token: the `deepseek-account` model route and the DeepSeek web providers ask `ctx.deepseekAccount` for the credential of one request destination and receive its request headers, the bare value, and an invalidation for an HTTP 401. Clients receive account state through the `account` Remote namespace without credentials.
## Table of Contents
- [Packages](#packages)
- [Related documentation](#related-documentation)
- [Dev Note](#dev-note)
-----
<a id="packages"></a>
## Packages
One package provides the account feature; its README covers day-to-day use, and the subsystem reference owns the exhaustive contracts.
| Package | Role | ctx key |
|---|---|---|
| [`deepseek-account/`](deepseek-account/README.md) | Browser sign-in, the stored grant, Platform profile, balance, and notification reads, and Host-only request credentials for allowed destinations | `ctx.deepseekAccount` |
-----
<a id="related-documentation"></a>
## Related documentation
Start with the subsystem reference for the account contracts, then the credential store the grant lives in.
- [Account subsystem reference](../../docs/subsystems/account.md) — sign-in state, request credentials, the Platform session projection, and the generated Cordis surface.
- [Credentials subsystem reference](../../docs/subsystems/credentials.md) — the credential records the grant is stored in.
- [Capability seams](../../docs/capability-seams.md) — the Service Definition / Service Provider / Consumer split this family follows.
- [Generated configuration catalog](../../docs/config-catalog.md#deepseek-aidsh-deepseek-account) — every accepted field of the account service.
<a id="dev-note"></a>
## Dev Note
<details>
<summary>Working context for maintainers — click to expand</summary>
None.
</details>
+51
View File
@@ -0,0 +1,51 @@
---
description: "DeepSeek 账号能力族的包映射:浏览器登录、已存账号授权,以及向账号模型路由和 DeepSeek Web 提供方释放的仅限 Host 的请求凭据。"
kind: "package-group"
---
# account/:DeepSeek 账号
[English](README.md) | 中文
## 概述
`account/` 组通过系统浏览器让用户登录 DeepSeek,并把账号授权保存在 [`credentials/`](../credentials/README.zh.md) 拥有的本地凭据库中。Host 消费方从不读取 token:`deepseek-account` 模型路由和 DeepSeek Web 提供方向 `ctx.deepseekAccount` 索取某个请求目标的凭据,取得其请求头、裸值以及用于 HTTP 401 的失效操作。客户端通过不携带凭据的 `account` Remote 命名空间获得账号状态。
## 目录
- [包](#packages)
- [相关文档](#related-documentation)
- [开发备注](#dev-note)
-----
<a id="packages"></a>
## 包
一个包提供账号功能;它的 README 覆盖日常使用,全部约定以子系统参考为准。
| 包 | 角色 | ctx 键 |
|---|---|---|
| [`deepseek-account/`](deepseek-account/README.zh.md) | 浏览器登录、已存授权、Platform 资料、余额与通知读取,以及面向允许目标的仅限 Host 的请求凭据 | `ctx.deepseekAccount` |
-----
<a id="related-documentation"></a>
## 相关文档
先从子系统参考了解账号约定,再看授权所在的凭据库。
- [账号子系统参考](../../docs/subsystems/account.zh.md)——登录状态、请求凭据、Platform 会话投影与生成的 Cordis 接口面。
- [凭据子系统参考](../../docs/subsystems/credentials.zh.md)——保存授权的凭据记录。
- [能力 seam](../../docs/capability-seams.zh.md)——本家族遵循的 Service Definition / Service Provider / Consumer 拆分。
- [生成配置目录](../../docs/config-catalog.zh.md#deepseek-aidsh-deepseek-account)——账号服务的每个受支持字段。
<a id="dev-note"></a>
## 开发备注
<details>
<summary>维护者的工作上下文——点击展开</summary>
无。
</details>
@@ -1,13 +1,13 @@
# Bilingual-pair consistency record for README.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 packages/credentials/deepseek-account/README.md
# pnpm run verify-translation-pairing --write packages/account/deepseek-account/README.md
/:
en: 9dbb9bc3960a11fe
zh: ed58987926489d3e
/deepseek-ai-dsh-deepseek-account:
en: 78e86576b7f38038
zh: 7ec9f58f21ce00bf
en: cc98cb1949c9fe0f
zh: bbb0b8fa319b9abc
/deepseek-ai-dsh-deepseek-account/summary:
en: 28bcca957bf6abf4
zh: 4a3fc8a59f2925bc
@@ -15,8 +15,8 @@
en: af856ba79fe31b8e
zh: 15b7d1a5d1856de2
/deepseek-ai-dsh-deepseek-account/use-this-package:
en: 1dcfc08cfb5df301
zh: c43c462711e40d4a
en: 2ca99e602440ac46
zh: dab473a3ee30e25e
/deepseek-ai-dsh-deepseek-account/understand-the-implementation:
en: 76d2da2dab100ac3
zh: 2c9404f27915daab
@@ -9,11 +9,11 @@ English | [中文](README.zh.md)
Every operation that reaches Platform takes the caller's `AccountClientMetadata`: the client version, the active UI language, and the UTC offset in seconds. The service derives the five Platform client headers from that metadata and the composition's platform, so each request reports the UI that made it instead of the last caller the Host saw. A new sign-in attempt captures the metadata for its initialization, exchange, and cancellation, and a joining caller never replaces it; sign-out captures the metadata for the revocation retries that outlive the request.
getPlatformSession exports the stored grant only when its issuer matches platformOrigin. This Host-only operation supports native Platform embedding without widening the model/file origin configured for resolveToken. Its userId repeats the stable account ID from the most recent successful getProfile, and is null until one succeeds or when that profile carries no ID; the snapshot issues no profile request of its own, so a slow or failed profile request never delays it, and an unknown ID leaves userId null, which consumers treat as temporary-storage mode. A credential change during the grant read discards the snapshot.
getPlatformSession exports the stored grant only when its issuer matches platformOrigin. This Host-only operation supports native Platform embedding without widening the inference origin that `resolveRequestCredential` enforces. Its userId repeats the stable account ID from the most recent successful getProfile, and is null until one succeeds or when that profile carries no ID; the snapshot issues no profile request of its own, so a slow or failed profile request never delays it, and an unknown ID leaves userId null, which consumers treat as temporary-storage mode. A credential change during the grant read discards the snapshot.
`desktopPlatform` defaults to `null`, which sends `x-client-platform: web`; the Desktop profile supplies `darwin` or `win32`, becoming `desktop-mac` or `desktop-win`. The service owns all five headers, so deployment configuration cannot override them; `x-client-bundle-id` is intentionally empty, and `x-client-locale` reduces the caller's language to `zh_CN` or `en_US`. PlatformSession carries deployment headers only, and the embedding client composes the same five headers for the Platform documents and API requests it opens, only at the configured origin.
Profile and balance HTTP 401 responses or top-level response code `40003` (invalid authorization) clear the rejected local grant and emit the live `deepseek-account/session-expired` notification. Concurrent responses share one removal; responses from an invalidated credential generation cannot clear its replacement. Other HTTP failures retain the grant. Host inference consumers can report a rejected request token through `rejectToken`; removal requires that it still matches the stored login.
Profile and balance HTTP 401 responses or top-level response code `40003` (invalid authorization) clear the rejected local grant and emit the live `deepseek-account/session-expired` notification. Concurrent responses share one removal; responses from an invalidated credential generation cannot clear its replacement. Other HTTP failures retain the grant. `resolveRequestCredential(url)` releases the credential for one allowed destination as the request headers, the bare token, a `reject()` that removes the stored grant after an HTTP 401 while it still matches that token, containing storage failures, and a `revoked` signal; the removal runs on the account service mounted when `reject()` is called, so a reload between the request and the destination's answer still removes the grant. The account model route and the DeepSeek web providers use it instead of composing headers themselves, and end the request that carries the token when `revoked` aborts.
## Summary
@@ -32,17 +32,17 @@ Device identity reads validate the existing login device record and expose only
<a id="use-this-package"></a>
## Use this package
The service exposes its client-safe operations through the `account` Remote namespace. The application loads its generated `./remote` contribution; no separate controller is needed. Login, profile, balance, notification, sign-out-impact, and expiry operations remain available through `ctx.remote.account`. Remote `watch` omits the Host-only identity subscription option. `resolveToken`, `rejectToken`, `getPlatformSession`, and `getDeviceIdentity` remain Host-only.
The service exposes its client-safe operations through the `account` Remote namespace. The application loads its generated `./remote` contribution; no separate controller is needed. Login, profile, balance, notification, sign-out-impact, and expiry operations remain available through `ctx.remote.account`. Remote `watch` omits the Host-only identity subscription option. `resolveRequestCredential`, `getPlatformSession`, and `getDeviceIdentity` remain Host-only.
`DeepSeekAccount` is the concrete service owning login, credentials, and Remote operations. The `/types` entry exposes types without loading the service implementation. `watch` returns complete state tagged as `snapshot` or `credentials-changed`; Host-only `watch(signal, true)` also receives profile-identity changes, while Remote subscriptions omit that option.
The `/client-metadata` entry provides pure Platform header and cookie helpers for Host consumers. The configuration schema is `DeepSeekAccount.Config`; the plugin entry exports no helper functions. Mounting the service installs account-task cancellation.
The `/client-metadata` entry provides pure Platform header and cookie helpers for Host consumers. The configuration schema is `DeepSeekAccount.Config`; the plugin entry exports no helper functions.
The `agents` service is optional. `hasRunningAccountTasks()` returns false when it is absent; when present, it checks running tasks for the account provider.
`hasRunningAccountTasks()` answers through the reports model routes register with `registerRunningTaskReport()` inside `ctx.effect()`; without a report, nothing is known to be running. The `llm-deepseek-account` route registers one and owns cancelling its running Agents after sign-out.
The profile projection maps `id_profile.picture` to `avatarUrl`, using null when no picture is configured.
Token resolution refuses requests while local sign-out is in progress. Successful local removal publishes `deepseek-account/signed-out` before returning the signed-out snapshot; remote revocation remains independent.
Token resolution refuses requests while local sign-out is in progress. Successful local removal publishes `deepseek-account/signed-out`, then aborts the `revoked` signal of the request credentials released for that sign-in, before returning the signed-out snapshot; a rejected token signs out the same way. Remote revocation remains independent.
getProfile / getBalance sends the stored grant in the x-dsh-auth-token header to GET /auth-api/v0/users/current and GET /api/v0/users/get_user_summary on platformOrigin. The grant issuer must match that origin. Host projects only the account UID, profile name, avatar URL, phone or email exactly as masked by Platform, and normal_wallets / bonus_wallets currency/balance strings; response tokens and other fields are discarded. A balance or bonus-amount string is accepted when it matches the numeric grammar Platform's Web client already passes to big.js, which allows an omitted integer or fraction part and a decimal exponent, so values such as 0E-16 and 5.0000000000000000 stay valid; the original string is retained and NaN, Infinity and malformed text are rejected. Bonus wallets remain separate from recharge balances. Credential changes and disposal invalidate in-flight queries.
@@ -9,11 +9,11 @@ kind: "package-reference"
每个到达 Platform 的操作都接收调用方的 `AccountClientMetadata`:客户端版本、当前界面语言和以秒为单位的 UTC 偏移。服务据此与组合出的平台推导五个 Platform 客户端请求头,因此每个请求报告的是发起它的界面,而不是 Host 上一次见到的调用方。新的登录申请会为该申请的初始化、兑换和取消捕获这份元数据,中途加入的调用方不会替换它;退登则为在请求之后继续进行的撤销重试捕获这份元数据。
getPlatformSession 仅在已存授权的 issuer 与 platformOrigin 一致时导出该授权。这个仅限 Host 的操作支持原生 Platform 内嵌,不扩大 resolveToken 配置的模型及文件请求来源。其 userId 复制最近一次成功 getProfile 得到的稳定账号 ID;尚无一次成功读取或资料不含 ID 时为 null。快照不自行发起资料请求,因此资料请求缓慢或失败都不会延迟它;ID 未知时 userId 为 null,使用方将其视为临时存储模式。读取授权期间凭证变化时丢弃快照。
getPlatformSession 仅在已存授权的 issuer 与 platformOrigin 一致时导出该授权。这个仅限 Host 的操作支持原生 Platform 内嵌,不扩大 `resolveRequestCredential` 限定的推理来源。其 userId 复制最近一次成功 getProfile 得到的稳定账号 ID;尚无一次成功读取或资料不含 ID 时为 null。快照不自行发起资料请求,因此资料请求缓慢或失败都不会延迟它;ID 未知时 userId 为 null,使用方将其视为临时存储模式。读取授权期间凭证变化时丢弃快照。
`desktopPlatform` 默认为 `null`,此时携带 `x-client-platform: web`;Desktop profile 提供 `darwin` 或 `win32`,改为 `desktop-mac` 或 `desktop-win`。五个请求头均由 provider 拥有,部署配置无法覆盖;`x-client-bundle-id` 有意保持为空,`x-client-locale` 将调用方语言归约为 `zh_CN` 或 `en_US`。PlatformSession 只携带部署请求头,内嵌客户端为自行打开的 Platform 文档和 API 请求组装同样的五个请求头,且仅在配置来源发送。
资料和余额接口返回 HTTP 401 或顶层响应码 `40003`(鉴权失效)时清除被拒绝的本地凭据,并发送实时 `deepseek-account/session-expired` 通知。并发响应共用一次清除操作;已失效凭据代次的响应不能清除替换后的凭据。其他 HTTP 错误保留凭据。Host 推理调用方可以通过 `rejectToken` 报告被拒绝的请求 token;仅当它仍匹配当前登录凭据时才执行清除。
资料和余额接口返回 HTTP 401 或顶层响应码 `40003`(鉴权失效)时清除被拒绝的本地凭据,并发送实时 `deepseek-account/session-expired` 通知。并发响应共用一次清除操作;已失效凭据代次的响应不能清除替换后的凭据。其他 HTTP 错误保留凭据。`resolveRequestCredential(url)` 把一个允许目标的凭据以请求头、裸 token、`reject()` 和 `revoked` 信号的形式释放;`reject()` 在 HTTP 401 后、且存储的授权仍匹配该 token 时清除它并隔离存储失败;清除在 `reject()` 被调用时挂载的账号服务上执行,因此请求与目的地应答之间发生的重载仍会清除授权。账号模型路由和 DeepSeek Web 提供方使用它,而不自行组装请求头,并在 `revoked` 中止时结束携带该 token 的请求。
## 概述
@@ -32,17 +32,17 @@ getPlatformSession 仅在已存授权的 issuer 与 platformOrigin 一致时导
<a id="use-this-package"></a>
## 使用此包
服务通过 `account` Remote 命名空间暴露可供客户端使用的操作。应用加载其生成的 `./remote` 贡献,无需单独的 controller。登录、资料、余额、通知、退出影响检查和凭据过期操作均通过 `ctx.remote.account` 调用。Remote `watch` 不接受仅供 Host 使用的身份订阅选项。`resolveToken`、`rejectToken`、`getPlatformSession` 和 `getDeviceIdentity` 仍仅供 Host 使用。
服务通过 `account` Remote 命名空间暴露可供客户端使用的操作。应用加载其生成的 `./remote` 贡献,无需单独的 controller。登录、资料、余额、通知、退出影响检查和凭据过期操作均通过 `ctx.remote.account` 调用。Remote `watch` 不接受仅供 Host 使用的身份订阅选项。`resolveRequestCredential`、`getPlatformSession` 和 `getDeviceIdentity` 仍仅供 Host 使用。
`DeepSeekAccount` 是具体服务,拥有登录、凭证和 Remote 操作。`/types` 提供不加载服务实现的类型出口。`watch` 返回完整状态与 `snapshot` 或 `credentials-changed` 类型;仅 Host 的 `watch(signal, true)` 还接收资料身份变化,Remote 订阅不启用该选项。
`/client-metadata` 为 Host 使用方提供纯函数形式的 Platform 请求头和 Cookie 辅助函数。配置 schema 为 `DeepSeekAccount.Config`;插件入口不导出辅助函数。挂载服务时会安装账号任务取消逻辑。
`/client-metadata` 为 Host 使用方提供纯函数形式的 Platform 请求头和 Cookie 辅助函数。配置 schema 为 `DeepSeekAccount.Config`;插件入口不导出辅助函数。
`agents` 服务为可选依赖。未提供时,`hasRunningAccountTasks()` 返回 false;提供时,检查使用账号服务的运行中任务。
`hasRunningAccountTasks()` 通过模型路由在 `ctx.effect()` 内用 `registerRunningTaskReport()` 注册的报告作答;没有报告时视为没有运行中的工作。`llm-deepseek-account` 路由注册一份报告,并负责在退登后取消其运行中的 Agent。
账号资料投影将 `id_profile.picture` 映射为 `avatarUrl`,没有配置头像时返回 null。
本地退出登录期间拒绝解析 token。本地授权成功删除后,先发布 `deepseek-account/signed-out`,再返回已退出的状态快照;远程撤销独立执行。
本地退出登录期间拒绝解析 token。本地授权成功删除后,先发布 `deepseek-account/signed-out`,接着中止为该次登录释放的请求凭据的 `revoked` 信号,再返回已退出的状态快照;token 被拒绝时的退登同样如此。远程撤销独立执行。
getProfile / getBalance 将保存的授权 token 通过 x-dsh-auth-token 请求头,向 platformOrigin 上的 GET /auth-api/v0/users/current 和 GET /api/v0/users/get_user_summary 发起请求。授权签发来源必须与该来源一致。Host 只投影账号 UID、资料名称、头像 URL、由 Platform 脱敏的手机号或邮箱(原样保留),以及 normal_wallets / bonus_wallets 的币种和余额字符串,丢弃响应 token 与其他字段。余额和赠金金额字符串只要符合 Platform Web 客户端交给 big.js 的数字文法即可通过,该文法和 big.js 一致,允许省略整数或小数部分以及十进制指数,因此 0E-16、5.0000000000000000 这类值仍然有效;原始字符串会保留,NaN、Infinity 和非法文本仍被拒绝。赠送钱包不计入充值余额。凭证变化和销毁会使进行中的查询失效。
@@ -8,7 +8,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
"directory": "packages/credentials/deepseek-account"
"directory": "packages/account/deepseek-account"
},
"type": "module",
"main": "lib/index.js",
@@ -56,8 +56,6 @@
"peerDependencies": {
"@deepseek-ai/cordis": "workspace:~",
"@deepseek-ai/dsh-brand": "workspace:*",
"@deepseek-ai/dsh-agent": "workspace:*",
"@deepseek-ai/dsh-llm": "workspace:*",
"@deepseek-ai/dsh-util-values": "workspace:*",
"@deepseek-ai/dsh-authorization": "workspace:*",
"@deepseek-ai/dsh-credentials": "workspace:*",
@@ -68,19 +66,12 @@
"@deepseek-ai/cordis": "workspace:~",
"@deepseek-ai/dsh-client-connection": "workspace:*",
"@deepseek-ai/dsh-brand": "workspace:*",
"@deepseek-ai/dsh-agent": "workspace:*",
"@deepseek-ai/dsh-llm": "workspace:*",
"@deepseek-ai/dsh-util-values": "workspace:*",
"@deepseek-ai/dsh-authorization": "workspace:*",
"@deepseek-ai/dsh-credentials": "workspace:*",
"@deepseek-ai/dsh-host-webserver": "workspace:*",
"@deepseek-ai/dsh-typert-protocol": "workspace:*"
},
"peerDependenciesMeta": {
"@deepseek-ai/dsh-agent": {
"optional": true
}
},
"dependencies": {
"@deepseek-ai/schemastery": "workspace:~",
"zod": "4.6.6"
@@ -8,22 +8,21 @@ import { Context, Service } from '@deepseek-ai/cordis'
import { Remote, TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol'
import Schema from '@deepseek-ai/schemastery'
import { z } from 'zod'
import { installAccountTaskCancellation, isRunningAccountTask } from './account-tasks.ts'
import { mergePlatformCookies, platformClientHeaders, platformWireLocale } from './client-metadata.ts'
import { type AccountNotification, type AccountNotificationBatch, type AccountNotificationEvent, type AccountNotificationId, type AccountClientMetadata, type AccountDetails, type AccountUserId, type AccountView, type AccountUpdate, type PlatformSession, type SignInAttemptId, type SignInAttemptView } from './types.ts'
import { type AccountNotification, type AccountNotificationBatch, type AccountNotificationEvent, type AccountNotificationId, type AccountClientMetadata, type AccountDetails, type AccountRequestCredential, type AccountUserId, type AccountView, type AccountUpdate, type PlatformSession, type SignInAttemptId, type SignInAttemptView } from './types.ts'
import { credentialKey } from '@deepseek-ai/dsh-credentials'
import type { AuthorizationSession } from '@deepseek-ai/dsh-authorization'
import { profile, readAccountDetail } from './details.ts'
import { readNotificationContent, readNotifications, sendNotificationEvent } from './notifications.ts'
import { revokeAccount, type LogoutRetryPolicy } from './logout.ts'
import { AccountUnauthorizedError, PlatformAuthError, platformHeaders, platformOrigin, browserUrl, requestPlatform, initialization, exchange, loginOrigin } from './protocol.ts'
import { ACCOUNT_TOKEN_HEADER, AccountUnauthorizedError, PlatformAuthError, platformHeaders, platformOrigin, browserUrl, requestPlatform, initialization, exchange, loginOrigin } from './protocol.ts'
export type * from './types.ts'
declare module '@deepseek-ai/cordis' {
interface Context { deepseekAccount: DeepSeekAccount }
interface Events {
/** Local grant removal has completed.
/** Local grant removal has completed. After the listeners return, the `revoked` signal of that grant's request credentials aborts.
* @mode emit
*/
'deepseek-account/signed-out'(): void
@@ -122,19 +121,21 @@ export class DeepSeekAccount extends TypertRemoteService {
private readonly revocations = new Set<Promise<void>>()
private attempt: Attempt | undefined
private readonly listeners = new Set<(kind: 'snapshot' | 'credentials-changed' | 'identity') => void>()
private readonly runningTaskReports = new Set<() => boolean>()
/**
* Latest ready profile read and the grant token it was read with. Binding the token keeps a
* cached identity from answering for a credential that has since changed.
*/
private lastProfile: { readonly token: string; readonly profile: Extract<AccountDetails['profile'], { status: 'ready' }> } | undefined
private detailsLifetime = new AbortController()
/** Aborted at the next sign-out; request credentials of the current sign-in carry its signal. */
private signedOut = new AbortController()
private closed = false
private removing: Promise<AccountView> | undefined
/** @param ctx - Host with authorization and credentials services. @param config - deployment options. */
constructor(ctx: Context, config: Config = {}) {
super(ctx, 'deepseekAccount', { namespace: 'account' })
installAccountTaskCancellation(ctx)
const resolved = Config(config)
this.embeddedPageDist = resolved.embeddedPageDist
this.origin = platformOrigin(resolved.platformOrigin, resolved.allowLoopbackHttp, 'platformOrigin')
@@ -374,7 +375,7 @@ export class DeepSeekAccount extends TypertRemoteService {
* @param token - token captured by the rejected inference request.
* @returns after matching credentials are removed and the expiry notification is emitted.
*/
async rejectToken(token: string): Promise<void> {
private async rejectToken(token: string): Promise<void> {
const lifetime = this.detailsLifetime
const stored = await this.readCurrentGrant(lifetime)
if (stored?.token !== token || this.detailsLifetime !== lifetime) return
@@ -391,7 +392,7 @@ export class DeepSeekAccount extends TypertRemoteService {
await this.ctx.credentials.deleteRecord(KEY)
this.ctx.emit('deepseek-account/session-expired')
this.attempt = undefined
this.ctx.emit('deepseek-account/signed-out')
this.publishSignedOut()
this.changed('snapshot')
return this.getState()
})().finally(() => { this.removing = undefined })
@@ -451,7 +452,7 @@ export class DeepSeekAccount extends TypertRemoteService {
* @param url - actual request destination or API base URL.
* @returns stored token, or undefined for other origins or a signed-out account.
*/
async resolveToken(url: string): Promise<string | undefined> {
private async resolveToken(url: string): Promise<string | undefined> {
if (this.closed || this.removing !== undefined) return undefined
const destination = new URL(url)
if (destination.origin !== this.inferenceOrigin || destination.username || destination.password) return undefined
@@ -469,6 +470,33 @@ export class DeepSeekAccount extends TypertRemoteService {
return result.data.token
}
/**
* Release the account credential for one request to `url` as the request
* carries it, together with its invalidation, which runs on the account
* service mounted when it is called, and the signal this service aborts
* when it signs out of that credential. Host-only.
* @param url - actual request destination or API base URL.
* @returns the request credential, or undefined for other origins or a signed-out account.
*/
async resolveRequestCredential(url: string): Promise<AccountRequestCredential | undefined> {
// Captured before the token is read, so a sign-out that completes during the read aborts this credential's signal.
const revoked = this.signedOut.signal
const token = await this.resolveToken(url)
if (token === undefined) return undefined
// The destination answers after a reload may have replaced this instance, so the rejection runs on the account
// service mounted at that time; without one, the grant stays for the next mounted service to reject.
const { ctx } = this
return {
headers: { [ACCOUNT_TOKEN_HEADER]: token },
value: token,
revoked,
reject: async () => {
try { await ctx.get('deepseekAccount')?.rejectToken(token) }
catch (_credentialRemovalFailed) { /* The destination's rejection is the failure to report; the next rejection retries. */ }
},
}
}
/**
* Join an active attempt or start browser authorization.
* @param client - identity of the requesting UI; a new attempt captures it, and joining retains the original attempt's identity.
@@ -563,20 +591,33 @@ export class DeepSeekAccount extends TypertRemoteService {
this.revoke(parsed.data.token, platformClientHeaders(this.platform, client))
}
this.attempt = undefined
this.ctx.emit('deepseek-account/signed-out')
this.publishSignedOut()
this.changed('snapshot')
return this.getState()
})().finally(() => { this.removing = undefined })
return this.removing
}
/**
* Register a report of running work that signing out would interrupt. The
* plugin billing the account to a model route registers one from within
* `ctx.effect()`; without any report nothing is known to be running.
* @param report - answers whether such work is running now.
* @returns the disposer removing the report.
*/
registerRunningTaskReport(report: () => boolean): () => void {
this.runningTaskReports.add(report)
return () => { this.runningTaskReports.delete(report) }
}
/**
* Inspect running work before sign-out.
* @returns whether a running task's latest request uses the account route; false when the optional agents service is absent.
* @returns whether a registered report says a running task uses the account; false without reports.
*/
@Remote
hasRunningAccountTasks(): boolean {
return this.ctx.get('agents')?.list().some(isRunningAccountTask) ?? false
for (const report of this.runningTaskReports) if (report()) return true
return false
}
/**
@@ -664,6 +705,17 @@ export class DeepSeekAccount extends TypertRemoteService {
this.revocations.add(revocation)
}
/**
* Announce a completed sign-out. Listeners run first, so a turn they cancel records that cause before the requests
* still carrying the signed-out token end. A listener that throws does not keep those requests open.
*/
private publishSignedOut(): void {
const signedOut = this.signedOut
this.signedOut = new AbortController()
try { this.ctx.emit('deepseek-account/signed-out') }
finally { signedOut.abort() }
}
private invalidateDetails(): void {
this.lastProfile = undefined
this.detailsLifetime.abort()
@@ -2,6 +2,9 @@
import { z } from 'zod'
import type { AccountNotificationEvent, AccountNotificationId, SignInErrorCode } from './types.ts'
/** Request header carrying the account token on every request the token authenticates. */
export const ACCOUNT_TOKEN_HEADER = 'x-dsh-auth-token'
/** Protocol errors expose a stable code, never a response body or authorization URL. */
export class PlatformAuthError extends Error {
/** @param code - safe error classification. */
@@ -66,7 +69,7 @@ export function platformHeaders(values: Record<string, string>): Record<string,
const names = new Set<string>()
for (const [name, value] of Object.entries(values)) {
const key = name.toLowerCase()
if (['authorization', 'x-dsh-auth-token', 'host', 'content-length', 'transfer-encoding', 'connection', 'content-type'].includes(key)
if (['authorization', ACCOUNT_TOKEN_HEADER, 'host', 'content-length', 'transfer-encoding', 'connection', 'content-type'].includes(key)
|| names.has(key)) throw new Error('account: requestHeaders contains a reserved or duplicate header')
names.add(key)
try { headers.set(name, value) }
@@ -163,7 +166,7 @@ export function requestNotificationEvent(origin: string, token: string, id: Acco
// The grant is provider-owned; deployment requestHeaders cannot override it or the client identity.
function accountHeaders(headers: Record<string, string>, token: string): Record<string, string> {
return { ...headers, 'x-dsh-auth-token': token }
return { ...headers, [ACCOUNT_TOKEN_HEADER]: token }
}
/**
@@ -177,7 +180,7 @@ function accountHeaders(headers: Record<string, string>, token: string): Record<
export async function logoutAccount(origin: string, token: string,
signal: AbortSignal, headers: Record<string, string>): Promise<void> {
await platformRequest(`${origin}/auth-api/v0/users/logout`, {
method: 'POST', headers: { ...headers, 'x-dsh-auth-token': token },
method: 'POST', headers: { ...headers, [ACCOUNT_TOKEN_HEADER]: token },
}, signal)
}
@@ -196,7 +199,7 @@ async function platformRequest(url: string, init: RequestInit, signal: AbortSign
if (!callerCancelled(signal)) console.error('[deepseek-account] request failed', { path, errorCode: 'no-response', aborted: signal.aborted })
throw new PlatformAuthError('no-response')
}
if (response.status === 401 && new Headers(init.headers).has('x-dsh-auth-token')) {
if (response.status === 401 && new Headers(init.headers).has(ACCOUNT_TOKEN_HEADER)) {
if (!callerCancelled(signal)) console.error('[deepseek-account] request failed', { path, status: response.status, errorCode: 'expired' })
await response.body?.cancel()
throw new AccountUnauthorizedError()
@@ -228,7 +231,7 @@ async function platformRequest(url: string, init: RequestInit, signal: AbortSign
const responseCodes = z.object({ code: z.number().int(), data: z.object({ biz_code: z.number().int() }).optional() }).safeParse(payload)
if (responseCodes.success) codes = responseCodes.data
const authorization = z.object({ code: z.literal(40003) }).safeParse(payload)
if (authorization.success && new Headers(init.headers).has('x-dsh-auth-token')) {
if (authorization.success && new Headers(init.headers).has(ACCOUNT_TOKEN_HEADER)) {
throw new AccountUnauthorizedError()
}
stage = 'envelope'
@@ -111,6 +111,33 @@ declare module '@deepseek-ai/cordis' {
}
}
/**
* The account credential released for one request destination, as the request
* carries it. Host-only: it holds the token and never crosses the Remote.
*/
export interface AccountRequestCredential {
/** Request headers carrying the account token. */
readonly headers: Readonly<Record<string, string>>
/** The bare token. */
readonly value: string
/**
* Remove the stored token after the destination rejected it, unless a newer
* sign-in replaced it. The removal runs on the account service mounted when
* this is called, so a reload between the request and the rejection does
* not keep the token; without a mounted service the token stays for the
* next one to reject. Storage failures are contained: the caller reports
* the destination's rejection, and the next rejection retries the removal.
* @returns settlement after the removal attempt.
*/
reject(): Promise<void>
/**
* Aborts when the account signs out of the sign-in this token belongs to, by the user or after a rejection, once
* `deepseek-account/signed-out` listeners have run. A consumer ends the request that carries the token. It stays
* unaborted when the account service that released it has been unloaded, because no sign-out reaches it then.
*/
readonly revoked: AbortSignal
}
/** Host-only credentials for an embedded Platform document; never expose through account RPC. */
export interface PlatformSession {
readonly origin: string
@@ -0,0 +1,39 @@
/** `deepseekAccount` stand-ins for consumers of the account's request credential. */
import type { DeepSeekAccount } from '../src/index.ts'
import { ACCOUNT_TOKEN_HEADER } from '../src/protocol.ts'
/** Token policy and rejection observer of one stand-in. */
export interface AccountStubOptions {
/** The token released for a destination; undefined or empty releases nothing, and a throw fails the read. */
readonly token: (url: string) => string | undefined | Promise<string | undefined>
/** Observes each rejected token; a throw is contained, as the service contains storage failures. */
readonly reject?: (token: string) => void | Promise<void>
/** The sign-out signal released credentials carry; without one they carry a signal that never aborts. */
readonly signedOut?: AbortSignal
}
/**
* An account service releasing request credentials as the real one does: the token header, the bare token, the
* sign-out signal, and an invalidation that reports no failure.
* @param options - token policy, rejection observer, and sign-out signal.
* @returns the stand-in, typed as the service for `ctx.provide`.
*/
export function accountStub(options: AccountStubOptions): DeepSeekAccount {
const signedOut = options.signedOut ?? new AbortController().signal
const stub: Pick<DeepSeekAccount, 'resolveRequestCredential'> = {
async resolveRequestCredential(url) {
const token = await options.token(url)
if (token === undefined || token.length === 0) return undefined
return {
headers: { [ACCOUNT_TOKEN_HEADER]: token },
value: token,
revoked: signedOut,
reject: async () => {
try { await options.reject?.(token) }
catch (_storageFailure) { /* The destination's rejection is the failure to report, as in the service. */ }
},
}
},
}
return stub as DeepSeekAccount
}
@@ -158,11 +158,12 @@ async function fixture(
const authorization = ctx.plugin(AuthorizationService)
await authorization
await beforeAccount?.(ctx, origin)
const provider = ctx.plugin(DeepSeekAccount, {
const accountConfig = {
platformOrigin: origin, inferenceOrigin, embeddedPageDist, desktopPlatform,
allowLoopbackHttp: true, requestHeaders, accountRequestHeaders,
rewriteBrowserOrigin, logoutRetryDelayMs: 1, balanceTimeoutMs,
})
}
let provider = ctx.plugin(DeepSeekAccount, accountConfig)
await provider
cleanups.push(async () => { await provider.dispose(); await authorization.dispose(); await credentials.dispose(); await web.dispose() })
const account = ctx.deepseekAccount
@@ -185,6 +186,13 @@ async function fixture(
invalidateSummary: () => { normalWallets = [{ currency: 'CNY', balance: 'not-a-decimal' }] },
normalWallets: (value: unknown) => { normalWallets = value },
dispose: () => provider.dispose(), exchanged, release,
/** Replace the account service as a settings reload does; the stored grant and the other services stay. */
remount: async () => {
await provider.dispose()
provider = ctx.plugin(DeepSeekAccount, accountConfig)
await provider
return ctx.deepseekAccount
},
redirect: () => { redirect = true },
hold: () => { hold = true },
initResponse: (value: Record<string, unknown>) => { initOverride = value },
@@ -328,7 +336,7 @@ it('stores a grant before redirecting, restores account presence, and signs out
await f.account.getProfile(clientMetadata())
expect(await f.account.getPlatformSession()).toEqual({ origin: f.origin, userId: 'test-user', token: 'dsh_mock_test',
requestHeaders: {} })
expect(await f.account.resolveToken('https://api.deepseek.com')).toBeUndefined()
expect(await f.account.resolveRequestCredential('https://api.deepseek.com')).toBeUndefined()
await f.account.signOut(clientMetadata())
expect((await f.account.getState()).status).toBe('signed-out')
expect(await f.account.getPlatformSession()).toBeNull()
@@ -361,12 +369,66 @@ it('allows real account credentials only on the exact official HTTPS origin', as
await f.ctx.credentials.modifyRecord(credentialKey('deepseek-account-platform', 'default'), () => Promise.resolve({
kind: 'grant', payload: { version: 1, issuer: 'https://platform.deepseek.com', token: 'test-account-token' },
}))
expect(await f.account.resolveToken('https://api.deepseek.com/v1')).toBe('test-account-token')
expect((await f.account.resolveRequestCredential('https://api.deepseek.com/v1'))?.value).toBe('test-account-token')
for (const url of ['http://api.deepseek.com', 'https://api.deepseek.com.evil.test', 'https://api.deepseek.com:8443', 'https://[email protected]']) {
expect(await f.account.resolveToken(url)).toBeUndefined()
expect(await f.account.resolveRequestCredential(url)).toBeUndefined()
}
})
it('releases the request credential for an allowed destination and removes the rejected token through it', async () => {
const f = await fixture(undefined, {}, false, {}, 'http://inference.example.test:8094')
f.exchangeResponse({ token: 'test-account-token' })
await f.account.startSignIn(clientMetadata(), f.callbackOrigin, 'desktop')
await f.wait('waiting-browser')
await fetch(f.callback(), { redirect: 'manual' })
await f.wait('succeeded')
const endpoint = 'http://inference.example.test:8094/v1/tools/search'
expect(await f.account.resolveRequestCredential('https://api.deepseek.com/v1/tools/search')).toBeUndefined()
const credential = await f.account.resolveRequestCredential(endpoint)
expect(credential).toMatchObject({ headers: { 'x-dsh-auth-token': 'test-account-token' }, value: 'test-account-token' })
await credential!.reject()
expect((await f.account.getState()).status).toBe('signed-out')
expect(await f.account.resolveRequestCredential(endpoint)).toBeUndefined()
})
it('contains a storage failure while removing a rejected token', async () => {
const f = await fixture(undefined, {}, false, {}, 'http://inference.example.test:8094')
f.exchangeResponse({ token: 'test-account-token' })
await f.account.startSignIn(clientMetadata(), f.callbackOrigin, 'desktop')
await f.wait('waiting-browser')
await fetch(f.callback(), { redirect: 'manual' })
await f.wait('succeeded')
const credential = await f.account.resolveRequestCredential('http://inference.example.test:8094/v1/tools/search')
await f.ctx.credentials.modifyRecord(credentialKey('deepseek-account-platform', 'default'), () => Promise.resolve({ kind: 'api-key', key: 'wrong-kind' }))
await expect(credential!.reject()).resolves.toBeUndefined()
// The contained failure is the store's: it still holds the unreadable record.
await expect(f.account.getState()).rejects.toThrow('account: storage')
})
it('invalidates a rejected token through the account service mounted when the rejection runs', async () => {
const f = await fixture(undefined, {}, false, {}, PRIVATE_INFERENCE)
await storeAccount(f)
const credential = await storedCredential(f)
// A settings reload replaces the service between the request's dispatch and the destination's answer.
const replacement = await f.remount()
const published: string[] = []
f.ctx.on('deepseek-account/signed-out', () => { published.push('signed-out') })
await credential.reject()
expect(published).toEqual(['signed-out'])
expect((await replacement.getState()).status).toBe('signed-out')
expect(await f.ctx.credentials.readRecord(credentialKey('deepseek-account-platform', 'default'))).toBeUndefined()
})
it('keeps a rejected token for the next mounted account service while none is mounted', async () => {
const f = await fixture(undefined, {}, false, {}, PRIVATE_INFERENCE)
await storeAccount(f)
const credential = await storedCredential(f)
await f.dispose()
await expect(credential.reject()).resolves.toBeUndefined()
expect(await f.ctx.credentials.readRecord(credentialKey('deepseek-account-platform', 'default')))
.toMatchObject({ kind: 'grant', payload: { token: 'test-platform-grant' } })
})
it('restricts platform destinations to the configured origin and route', () => {
expect(() => platformOrigin('http://localhost:8081', false, 'platformOrigin')).toThrow()
expect(platformOrigin('http://localhost:8081', true, 'platformOrigin')).toBe('http://localhost:8081')
@@ -456,6 +518,16 @@ async function storeAccount(f: Awaited<ReturnType<typeof fixture>>) {
}))
}
/** Inference origin a fixture allows a grant `storeAccount` wrote, which official inference refuses as development-issued. */
const PRIVATE_INFERENCE = 'http://inference.example.test:8094'
/** The request credential of the stored grant, released for the private inference origin. */
async function storedCredential(f: Awaited<ReturnType<typeof fixture>>) {
const credential = await f.account.resolveRequestCredential(`${PRIVATE_INFERENCE}/v1/messages`)
if (credential === undefined) throw new Error('missing stored credential')
return credential
}
it('queries Platform Web endpoints with the stored grant and projects only masked profile and separate recharge and bonus balances', async () => {
const f = await fixture()
expect(await readDetails(f.account)).toBeNull()
@@ -486,12 +558,73 @@ it('publishes sign-out only after local grant removal and refuses token resoluti
const observed: string[] = []
f.ctx.on('deepseek-account/signed-out', () => { observed.push('signed-out') })
const pending = f.account.signOut(clientMetadata())
expect(await f.account.resolveToken('https://api.deepseek.com')).toBeUndefined()
expect(await f.account.resolveRequestCredential('https://api.deepseek.com')).toBeUndefined()
await pending
expect(observed).toEqual(['signed-out'])
expect((await f.account.getState()).status).toBe('signed-out')
})
it.each(['user sign-out', 'rejected token'] as const)('withdraws released request credentials at a %s, after its listeners ran', async (cause) => {
const f = await fixture(undefined, {}, false, {}, PRIVATE_INFERENCE)
await storeAccount(f)
const credential = await storedCredential(f)
const observed: boolean[] = []
f.ctx.on('deepseek-account/signed-out', () => { observed.push(credential.revoked.aborted) })
expect(credential.revoked.aborted).toBe(false)
if (cause === 'user sign-out') await f.account.signOut(clientMetadata())
else await (await storedCredential(f)).reject()
expect(observed).toEqual([false])
expect(credential.revoked.aborted).toBe(true)
// The next sign-in releases its credentials on a signal of its own.
await storeAccount(f)
const next = await storedCredential(f)
expect(next.revoked).not.toBe(credential.revoked)
expect(next.revoked.aborted).toBe(false)
})
it('withdraws released request credentials when a sign-out listener throws', async () => {
const f = await fixture(undefined, {}, false, {}, PRIVATE_INFERENCE)
await storeAccount(f)
const credential = await storedCredential(f)
f.ctx.on('deepseek-account/signed-out', () => { throw new Error('listener failed') })
await expect(f.account.signOut(clientMetadata())).rejects.toThrow('listener failed')
expect(credential.revoked.aborted).toBe(true)
})
it('releases a withdrawn credential when sign-out completes while its token is being read', async () => {
const f = await fixture(undefined, {}, false, {}, PRIVATE_INFERENCE)
await storeAccount(f)
const original = f.ctx.credentials.readRecord.bind(f.ctx.credentials)
const reading = Promise.withResolvers<undefined>()
const release = Promise.withResolvers<undefined>()
const read = vi.spyOn(f.ctx.credentials, 'readRecord').mockImplementationOnce(async (requested) => {
const record = await original(requested)
reading.resolve(undefined)
await release.promise
return record
})
try {
const pending = f.account.resolveRequestCredential(`${PRIVATE_INFERENCE}/v1/messages`)
await reading.promise
await f.account.signOut(clientMetadata())
release.resolve(undefined)
// The token was read before the sign-out removed it, so the credential must not authenticate a request.
expect(await pending).toMatchObject({ value: 'test-platform-grant', revoked: { aborted: true } })
} finally { read.mockRestore() }
})
it('keeps released request credentials when the account service is replaced', async () => {
const f = await fixture(undefined, {}, false, {}, PRIVATE_INFERENCE)
await storeAccount(f)
const credential = await storedCredential(f)
const replacement = await f.remount()
expect(credential.revoked.aborted).toBe(false)
// The replacement withdraws only the credentials it released itself.
const current = await replacement.resolveRequestCredential(`${PRIVATE_INFERENCE}/v1/messages`)
await replacement.signOut(clientMetadata())
expect({ replaced: credential.revoked.aborted, current: current?.revoked.aborted }).toEqual({ replaced: false, current: true })
})
it('discards account details when sign-out races the Platform response', async () => {
const f = await fixture()
await storeAccount(f)
@@ -887,10 +1020,10 @@ it('sends a development grant only to its configured inference origin', async ()
await f.wait('waiting-browser')
await fetch(f.callback(), { redirect: 'manual' })
await f.wait('succeeded')
expect(await f.account.resolveToken('http://inference.example.test:8094/api')).toBe('test-account-token')
expect((await f.account.resolveRequestCredential('http://inference.example.test:8094/api'))?.value).toBe('test-account-token')
for (const url of ['https://api.deepseek.com', 'http://inference.example.test:8095/api',
'https://inference.example.test:8094/api', 'http://[email protected]:8094/api']) {
expect(await f.account.resolveToken(url)).toBeUndefined()
expect(await f.account.resolveRequestCredential(url)).toBeUndefined()
}
})
@@ -1149,14 +1282,14 @@ it.each([{ kind: 'api-key' as const, key: 'wrong-kind' }, { kind: 'grant' as con
await expect(f.account.getState()).rejects.toThrow('account: storage')
await expect(f.account.getProfile(clientMetadata())).rejects.toThrow('account: storage')
await expect(f.account.getPlatformSession()).rejects.toThrow('account: storage')
await expect(f.account.resolveToken('https://api.deepseek.com')).rejects.toThrow('account: storage')
await expect(f.account.resolveRequestCredential('https://api.deepseek.com')).rejects.toThrow('account: storage')
await expect(f.account.signOut(clientMetadata())).rejects.toThrow('account: storage')
},
)
it('returns no credentials when signed out or disposed', async () => {
const f = await fixture()
expect(await f.account.resolveToken('https://api.deepseek.com')).toBeUndefined()
expect(await f.account.resolveRequestCredential('https://api.deepseek.com')).toBeUndefined()
expect(await f.account.getPlatformSession()).toBeNull()
await f.account.cancelSignIn('missing' as import('@deepseek-ai/dsh-deepseek-account').SignInAttemptId)
await f.dispose()
@@ -1171,7 +1304,7 @@ it('rejects sign-out and inference grants issued by another environment', async
await f.ctx.credentials.modifyRecord(credentialKey('deepseek-account-platform', 'default'), () => Promise.resolve({
kind: 'grant', payload: { version: 1, token: 'real-token', issuer: 'https://other.example' },
}))
expect(await f.account.resolveToken('https://private.example')).toBeUndefined()
expect(await f.account.resolveRequestCredential('https://private.example')).toBeUndefined()
await expect(f.account.signOut(clientMetadata())).rejects.toThrow('account: protocol')
})
@@ -1180,7 +1313,7 @@ it('never sends a development issuer grant to official inference', async () => {
await f.ctx.credentials.modifyRecord(credentialKey('deepseek-account-platform', 'default'), () => Promise.resolve({
kind: 'grant', payload: { version: 1, token: 'real-token', issuer: f.origin },
}))
expect(await f.account.resolveToken('https://api.deepseek.com')).toBeUndefined()
expect(await f.account.resolveRequestCredential('https://api.deepseek.com')).toBeUndefined()
})
it('merges account cookies when there are no base cookies', async () => {
@@ -1671,13 +1804,14 @@ it('ignores a 401 whose response cleanup overlaps a credential replacement', asy
})
it('expires an inference-rejected token without another Platform request', async () => {
const f = await fixture()
const f = await fixture(undefined, {}, false, {}, PRIVATE_INFERENCE)
await storeAccount(f)
const credential = await storedCredential(f)
const published: string[] = []
f.ctx.on('deepseek-account/signed-out', () => { published.push('signed-out') })
f.ctx.on('deepseek-account/session-expired', () => { published.push('session-expired') })
await f.account.rejectToken('test-platform-grant')
await f.account.rejectToken('test-platform-grant')
await credential.reject()
await credential.reject()
const state = await f.account.getState()
expect({ status: state.status, published, detailRequests: f.detailRequests })
.toMatchInlineSnapshot(`
@@ -1693,17 +1827,24 @@ it('expires an inference-rejected token without another Platform request', async
})
it('retains a replacement login when inference rejects the previous token', async () => {
const f = await fixture()
const f = await fixture(undefined, {}, false, {}, PRIVATE_INFERENCE)
await f.ctx.credentials.modifyRecord(credentialKey('deepseek-account-platform', 'default'), () => Promise.resolve({
kind: 'grant', payload: { version: 1, issuer: f.origin, token: 'previous-platform-grant' },
}))
const previous = await storedCredential(f)
await storeAccount(f)
await f.account.rejectToken('previous-platform-grant')
await previous.reject()
expect(await f.account.getState()).toMatchObject({ status: 'credential-stored' })
expect(await f.ctx.credentials.readRecord(credentialKey('deepseek-account-platform', 'default')))
.toMatchObject({ kind: 'grant', payload: { token: 'test-platform-grant' } })
})
it('ignores an inference rejection while already signed out', async () => {
const f = await fixture()
await f.account.rejectToken('previous-platform-grant')
const f = await fixture(undefined, {}, false, {}, PRIVATE_INFERENCE)
await storeAccount(f)
const credential = await storedCredential(f)
await f.ctx.credentials.deleteRecord(credentialKey('deepseek-account-platform', 'default'))
await credential.reject()
expect(await f.account.getState()).toMatchObject({ status: 'signed-out' })
expect(await f.account.getState()).not.toHaveProperty('signOutReason')
})
@@ -3,7 +3,6 @@ import { mkdtemp, rm } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { Context } from '@deepseek-ai/cordis'
import type { Agent } from '@deepseek-ai/dsh-agent'
import AuthorizationService from '@deepseek-ai/dsh-authorization'
import { LocalCredentialProvider } from '@deepseek-ai/dsh-credentials-local'
import { credentialKey } from '@deepseek-ai/dsh-credentials'
@@ -70,18 +69,16 @@ it('delivers expiry only to current subscribers and stops on disconnect or provi
expect(await reopened).toEqual({ done: true, value: undefined })
})
it('reports running account requests and excludes absent, idle, and other-provider tasks', async () => {
const { ctx, account } = await fixture()
it('reports running account work through registered reports and forgets disposed ones', async () => {
const { account } = await fixture()
expect(account.hasRunningAccountTasks()).toBe(false)
const active: Array<Pick<Agent, 'status' | 'session'>> = []
const task = (status: Agent['status'], provider?: string): Pick<Agent, 'status' | 'session'> => ({
status, session: { requestContext: () => provider === undefined ? undefined : { provider, model: 'model' } } as Agent['session'],
})
ctx.provide('agents', { list: () => active } as Context['agents'])
active.push(task('running'), task('running', 'deepseek-official'), task('idle', 'deepseek-account'))
let running = false
const idle = account.registerRunningTaskReport(() => false)
const dispose = account.registerRunningTaskReport(() => running)
expect(account.hasRunningAccountTasks()).toBe(false)
active.push(task('running', 'deepseek-account'))
running = true
expect(account.hasRunningAccountTasks()).toBe(true)
active.pop()
dispose()
expect(account.hasRunningAccountTasks()).toBe(false)
idle()
})
@@ -18,16 +18,13 @@
"path": "../../util/brand"
},
{
"path": "../../core/agent"
"path": "../../util/values"
},
{
"path": "../../llm/llm"
"path": "../../credentials/authorization"
},
{
"path": "../authorization"
},
{
"path": "../credentials"
"path": "../../credentials/credentials"
},
{
"path": "../../../vendor/schemastery"
+1 -1
View File
@@ -113,7 +113,7 @@
"path": "../../document/office-kit"
},
{
"path": "../../credentials/deepseek-account"
"path": "../../account/deepseek-account"
},
{
"path": "../../web/web"
+1 -1
View File
@@ -90,7 +90,7 @@
"path": "../../host/plugin-inventory"
},
{
"path": "../../credentials/deepseek-account"
"path": "../../account/deepseek-account"
},
{
"path": "../../web/web"
@@ -28,7 +28,7 @@
"path": "../../credentials/credentials"
},
{
"path": "../../credentials/deepseek-account"
"path": "../../account/deepseek-account"
},
{
"path": "../../host/webserver"
@@ -30,7 +30,7 @@
"path": "../ui-settings-account"
},
{
"path": "../../credentials/deepseek-account"
"path": "../../account/deepseek-account"
},
{
"path": "../../host/webserver"
@@ -36,7 +36,7 @@
"path": "../ui-theme/tsconfig.client.json"
},
{
"path": "../../credentials/deepseek-account"
"path": "../../account/deepseek-account"
},
{
"path": "../ui-settings-models"
Loaded 100 of 197 files, more files were not shown because too many files have changed in this diff. Show more