Merge branch 'master' into feature/minimal-compact-image

This commit is contained in:
LogosVeritas committed 2026-10-13 10:32:01 +08:00
commit 00a007d833
734 files changed
+19749 -4630

No files matched your search

+24 -9
View File
@@ -182,7 +182,7 @@ export interface Config {
## `@deepseek-ai/dsh-api-gateway`
- `inject`: `typert`
- `source`: [`packages/api/gateway/src/index.ts:146`](../packages/api/gateway/src/index.ts)
- `source`: [`packages/api/gateway/src/index.ts:147`](../packages/api/gateway/src/index.ts)
```ts config-catalog
/** Gateway transport configuration. */
@@ -279,9 +279,9 @@ export interface Config {
readonly maxRows: number
/** Screen history rows retained for reconnecting clients. */
readonly scrollback: number
/** Maximum queued UTF-8 frame bytes per output follower before disconnection. */
/** Maximum queued UTF-8 frame bytes per output follower and in the Client input buffer. */
readonly maxBufferedBytes: number
/** Maximum UTF-8 bytes in one input request. */
/** Maximum raw UTF-8 bytes per input command and across unacknowledged Client input. */
readonly maxInputBytes: number
/** Provider process-termination grace period in milliseconds. */
readonly disposeGraceMs: number
@@ -773,7 +773,7 @@ export interface Config {
## `@deepseek-ai/dsh-credentials-local`
- `source`: [`packages/credentials/credentials-local/src/index.ts:64`](../packages/credentials/credentials-local/src/index.ts)
- `source`: [`packages/credentials/credentials-local/src/index.ts:63`](../packages/credentials/credentials-local/src/index.ts)
```ts config-catalog
/** Plugin config: file location and hot-reload behavior. */
@@ -1253,6 +1253,8 @@ export interface Config {
```ts config-catalog
/** Tool routing configuration. */
export interface Config {
/** Register `interrupt_agent` and its policy guidance. Defaults to true; false leaves the domain API available. */
readonly interrupt?: boolean
/** Continuable-subagent provider used for fresh teammates. */
readonly freshProvider?: string
/** Continuable-subagent provider used for completed-prefix fork teammates. */
@@ -1679,7 +1681,7 @@ export interface TlsConfig {
## `@deepseek-ai/dsh-jobs-local`
- `source`: [`packages/jobs/jobs-local/src/index.ts:45`](../packages/jobs/jobs-local/src/index.ts)
- `source`: [`packages/jobs/jobs-local/src/index.ts:46`](../packages/jobs/jobs-local/src/index.ts)
```ts config-catalog
/** Configuration for the process-local job registry. */
@@ -1709,12 +1711,25 @@ export interface Config {
## `@deepseek-ai/dsh-llm-deepseek-account`
- `inject`: `llm`
- `refs`: [`ProtocolConfig`](../packages/llm/llm-deepseek/src/index.ts)
- `source`: [`packages/llm/llm-deepseek-account/src/config.ts:5`](../packages/llm/llm-deepseek-account/src/config.ts)
- `refs`: [`DeepSeekCatalogModel`](../packages/llm/llm-deepseek/src/index.ts) · [`ProtocolConfig`](../packages/llm/llm-deepseek/src/index.ts) · `Volatile` (`@deepseek-ai/cordis`)
- `source`: [`packages/llm/llm-deepseek-account/src/config.ts:19`](../packages/llm/llm-deepseek-account/src/config.ts)
```ts config-catalog
/** Account route configuration; authentication comes exclusively from the account service. */
export type Config = ProtocolConfig
export interface Config extends Omit<ProtocolConfig, 'models'> {
/** Deadline of one listing request, which also bounds a first-use wait (default five seconds). */
modelsTimeoutMs: Volatile<number>
/**
* Listing age after which the next access refreshes it in the background;
* a failed load retries after the same age (default ten minutes).
*/
modelsMaxAgeMs: Volatile<number>
/** Field overrides by model id, layered over the account listing and the built-in catalog. */
modelOverrides: Volatile<Record<string, ModelOverride>>
}
/** Field overrides for one model; unset fields and empty lists inherit the underlying entry. */
export type ModelOverride = Omit<DeepSeekCatalogModel, 'id'>
```
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-llm-deepseek-account -->
@@ -3062,7 +3077,7 @@ export interface Config {
```ts config-catalog
/** Office skill resource location. */
export interface Config {
/** Absolute assets directory containing the three skill folders and shared scripts; defaults to packaged assets. */
/** Absolute assets directory containing skill folders; defaults to packaged assets. */
assetRoot?: string
/** Standalone Node executable; defaults to the current executable outside Electron and SEA. */
node?: string
+24 -9
View File
@@ -184,7 +184,7 @@ export interface Config {
## `@deepseek-ai/dsh-api-gateway`
- `inject`: `typert`
- `source`: [`packages/api/gateway/src/index.ts:146`](../packages/api/gateway/src/index.ts)
- `source`: [`packages/api/gateway/src/index.ts:147`](../packages/api/gateway/src/index.ts)
```ts config-catalog
/** Gateway transport configuration. */
@@ -281,9 +281,9 @@ export interface Config {
readonly maxRows: number
/** Screen history rows retained for reconnecting clients. */
readonly scrollback: number
/** Maximum queued UTF-8 frame bytes per output follower before disconnection. */
/** Maximum queued UTF-8 frame bytes per output follower and in the Client input buffer. */
readonly maxBufferedBytes: number
/** Maximum UTF-8 bytes in one input request. */
/** Maximum raw UTF-8 bytes per input command and across unacknowledged Client input. */
readonly maxInputBytes: number
/** Provider process-termination grace period in milliseconds. */
readonly disposeGraceMs: number
@@ -775,7 +775,7 @@ export interface Config {
## `@deepseek-ai/dsh-credentials-local`
- `source`: [`packages/credentials/credentials-local/src/index.ts:64`](../packages/credentials/credentials-local/src/index.ts)
- `source`: [`packages/credentials/credentials-local/src/index.ts:63`](../packages/credentials/credentials-local/src/index.ts)
```ts config-catalog
/** Plugin config: file location and hot-reload behavior. */
@@ -1255,6 +1255,8 @@ export interface Config {
```ts config-catalog
/** Tool routing configuration. */
export interface Config {
/** Register `interrupt_agent` and its policy guidance. Defaults to true; false leaves the domain API available. */
readonly interrupt?: boolean
/** Continuable-subagent provider used for fresh teammates. */
readonly freshProvider?: string
/** Continuable-subagent provider used for completed-prefix fork teammates. */
@@ -1681,7 +1683,7 @@ export interface TlsConfig {
## `@deepseek-ai/dsh-jobs-local`
- `source`: [`packages/jobs/jobs-local/src/index.ts:45`](../packages/jobs/jobs-local/src/index.ts)
- `source`: [`packages/jobs/jobs-local/src/index.ts:46`](../packages/jobs/jobs-local/src/index.ts)
```ts config-catalog
/** Configuration for the process-local job registry. */
@@ -1711,12 +1713,25 @@ export interface Config {
## `@deepseek-ai/dsh-llm-deepseek-account`
- `inject`: `llm`
- `refs`: [`ProtocolConfig`](../packages/llm/llm-deepseek/src/index.ts)
- `source`: [`packages/llm/llm-deepseek-account/src/config.ts:5`](../packages/llm/llm-deepseek-account/src/config.ts)
- `refs`: [`DeepSeekCatalogModel`](../packages/llm/llm-deepseek/src/index.ts) · [`ProtocolConfig`](../packages/llm/llm-deepseek/src/index.ts) · `Volatile` (`@deepseek-ai/cordis`)
- `source`: [`packages/llm/llm-deepseek-account/src/config.ts:19`](../packages/llm/llm-deepseek-account/src/config.ts)
```ts config-catalog
/** Account route configuration; authentication comes exclusively from the account service. */
export type Config = ProtocolConfig
export interface Config extends Omit<ProtocolConfig, 'models'> {
/** Deadline of one listing request, which also bounds a first-use wait (default five seconds). */
modelsTimeoutMs: Volatile<number>
/**
* Listing age after which the next access refreshes it in the background;
* a failed load retries after the same age (default ten minutes).
*/
modelsMaxAgeMs: Volatile<number>
/** Field overrides by model id, layered over the account listing and the built-in catalog. */
modelOverrides: Volatile<Record<string, ModelOverride>>
}
/** Field overrides for one model; unset fields and empty lists inherit the underlying entry. */
export type ModelOverride = Omit<DeepSeekCatalogModel, 'id'>
```
<!-- END GENERATED config-catalog:@deepseek-ai/dsh-llm-deepseek-account -->
@@ -3064,7 +3079,7 @@ export interface Config {
```ts config-catalog
/** Office skill resource location. */
export interface Config {
/** Absolute assets directory containing the three skill folders and shared scripts; defaults to packaged assets. */
/** Absolute assets directory containing skill folders; defaults to packaged assets. */
assetRoot?: string
/** Standalone Node executable; defaults to the current executable outside Electron and SEA. */
node?: string
+2 -1
View File
@@ -708,6 +708,7 @@ flowchart TD
pkg_llm_deepseek_account --> pkg_launch_environment
pkg_llm_deepseek_account --> pkg_llm
pkg_llm_deepseek_account --> pkg_llm_deepseek
pkg_llm_deepseek_account --> pkg_timeout
pkg_tools --> pkg_agent
pkg_tools --> pkg_llm
pkg_tools --> pkg_ptc_runtime
@@ -1654,7 +1655,7 @@ flowchart TD
| [`terminal`](../packages/terminal/terminal) | `terminal` | [`agent`](../packages/core/agent), [`brand`](../packages/util/brand) |
| [`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), [`brand`](../packages/util/brand), [`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) |
| [`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), [`timeout`](../packages/util/timeout) |
| [`tools`](../packages/core/tools) | `core` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`ptc-runtime`](../packages/ptc-runtime/ptc-runtime), [`sandbox`](../packages/sandbox/sandbox), [`sandbox-policy`](../packages/sandbox/sandbox-policy), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`system-prompt`](../packages/core/system-prompt), [`user-approval`](../packages/interaction/user-approval), [`working-directory`](../packages/session/working-directory) |
| [`command-goal`](../packages/goal/command-goal) | `goal` | [`commands`](../packages/interaction/commands), [`goal`](../packages/goal/goal), [`llm`](../packages/llm/llm) |
| [`goal-round-driver`](../packages/goal/goal-round-driver) | `goal` | [`agent`](../packages/core/agent), [`goal`](../packages/goal/goal), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
+2 -1
View File
@@ -710,6 +710,7 @@ flowchart TD
pkg_llm_deepseek_account --> pkg_launch_environment
pkg_llm_deepseek_account --> pkg_llm
pkg_llm_deepseek_account --> pkg_llm_deepseek
pkg_llm_deepseek_account --> pkg_timeout
pkg_tools --> pkg_agent
pkg_tools --> pkg_llm
pkg_tools --> pkg_ptc_runtime
@@ -1656,7 +1657,7 @@ flowchart TD
| [`terminal`](../packages/terminal/terminal) | `terminal` | [`agent`](../packages/core/agent), [`brand`](../packages/util/brand) |
| [`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), [`brand`](../packages/util/brand), [`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) |
| [`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), [`timeout`](../packages/util/timeout) |
| [`tools`](../packages/core/tools) | `core` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`ptc-runtime`](../packages/ptc-runtime/ptc-runtime), [`sandbox`](../packages/sandbox/sandbox), [`sandbox-policy`](../packages/sandbox/sandbox-policy), [`scope`](../packages/core/scope), [`session`](../packages/core/session), [`system-prompt`](../packages/core/system-prompt), [`user-approval`](../packages/interaction/user-approval), [`working-directory`](../packages/session/working-directory) |
| [`command-goal`](../packages/goal/command-goal) | `goal` | [`commands`](../packages/interaction/commands), [`goal`](../packages/goal/goal), [`llm`](../packages/llm/llm) |
| [`goal-round-driver`](../packages/goal/goal-round-driver) | `goal` | [`agent`](../packages/core/agent), [`goal`](../packages/goal/goal), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
+88 -40
View File
@@ -9,8 +9,8 @@
en: 1387c4505dde2faf
zh: 48570fa1c13d6910
/session-persistence-event-catalog/persistence-type-fingerprints:
en: d8542cb8987022e0
zh: 38e135021cb21f20
en: f6421cacbfe510db
zh: 6c24e981ac836d0c
/session-persistence-event-catalog/event-envelope:
en: 7ebb1a2e0dd1f916
zh: 8946f415dda5c1b8
@@ -119,6 +119,15 @@
/session-persistence-event-catalog/events/image/image-offload-log-only:
en: 5b3bba4fc4261208
zh: 6d5f536c3ca92710
/session-persistence-event-catalog/events/job:
en: 941358a5fef6a5b4
zh: 941358a5fef6a5b4
/session-persistence-event-catalog/events/job/job-registered-log-only:
en: 37ab7f962b199555
zh: af05a3274adbe530
/session-persistence-event-catalog/events/job/job-settled-log-only:
en: dde416e1c0d32dfb
zh: fa08197cad8acb9d
/session-persistence-event-catalog/events/llm:
en: 8a5c09e48ec0a6ae
zh: 8a5c09e48ec0a6ae
@@ -540,8 +549,8 @@
en: 028791baa24a6a0a
zh: 028791baa24a6a0a
/session-persistence-event-catalog/resolved-persistence-types/in-history:
en: 7ee8e3e9b3947c22
zh: 035ceca2d5031800
en: 8bda2ac68f50953b
zh: 190a69ddd097c445
/session-persistence-event-catalog/resolved-persistence-types/in-progress:
en: 61de2b0c9de8c15b
zh: 61de2b0c9de8c15b
@@ -555,8 +564,20 @@
en: 759b0bea643a3f2b
zh: 759b0bea643a3f2b
/session-persistence-event-catalog/resolved-persistence-types/interrupted:
en: 69a7a30a4e43ff35
zh: 69a7a30a4e43ff35
en: 9f4bd316342f65ef
zh: 9f4bd316342f65ef
/session-persistence-event-catalog/resolved-persistence-types/job-registered:
en: 19aa7833c2187c48
zh: 19aa7833c2187c48
/session-persistence-event-catalog/resolved-persistence-types/job-settled:
en: 0a0b96a87bf8ad25
zh: 0a0b96a87bf8ad25
/session-persistence-event-catalog/resolved-persistence-types/kill:
en: 0401f4463ce25ee0
zh: 0401f4463ce25ee0
/session-persistence-event-catalog/resolved-persistence-types/killed:
en: cf74df062715315c
zh: cf74df062715315c
/session-persistence-event-catalog/resolved-persistence-types/legacy:
en: 1fc6c6420d6eb307
zh: 1fc6c6420d6eb307
@@ -624,8 +645,11 @@
en: de774562ec890a6c
zh: de774562ec890a6c
/session-persistence-event-catalog/resolved-persistence-types/positive:
en: 2a01e347d9604ac6
zh: 2a01e347d9604ac6
en: e048b2b8f8165011
zh: e048b2b8f8165011
/session-persistence-event-catalog/resolved-persistence-types/producer:
en: b829f105842b826c
zh: b829f105842b826c
/session-persistence-event-catalog/resolved-persistence-types/product-interaction:
en: 05fe435810456683
zh: 05fe435810456683
@@ -783,8 +807,11 @@
en: d683235390472024
zh: d683235390472024
/session-persistence-event-catalog/resolved-persistence-types/team-task:
en: f8a5fe2380e1a4c4
zh: f8a5fe2380e1a4c4
en: 7aa9286372341561
zh: 7aa9286372341561
/session-persistence-event-catalog/resolved-persistence-types/teardown:
en: 301cd78f24fe13c5
zh: 301cd78f24fe13c5
/session-persistence-event-catalog/resolved-persistence-types/text:
en: 20b696e15c9cf906
zh: 20b696e15c9cf906
@@ -1041,8 +1068,20 @@
en: a3087ab7bebe9371
zh: abf6afc2f9f5b692
/session-persistence-event-catalog/resolved-persistence-types/inboxtarget:
en: 49855060f429f597
zh: 19d1db4ab892ba44
en: 938113c1b01efad1
zh: d6829dbe979e6819
/session-persistence-event-catalog/resolved-persistence-types/jobregistereddata:
en: f604eebb973fe2cf
zh: 0c0aba1e17ecf66e
/session-persistence-event-catalog/resolved-persistence-types/jobsettlecause:
en: 748a4269d86e007a
zh: 4ce04c4451bdcfe8
/session-persistence-event-catalog/resolved-persistence-types/jobsettleddata:
en: fc8caf270a7581f7
zh: b467e1d4191106eb
/session-persistence-event-catalog/resolved-persistence-types/jobtoolcall:
en: 7ffee3cc96604a88
zh: 026abfab0e46c21a
/session-persistence-event-catalog/resolved-persistence-types/jsonvalue:
en: c239aa9c90226c35
zh: 3561e77832c7c8b5
@@ -1128,8 +1167,8 @@
en: 07e04c3e336f880f
zh: 6f8986ede9994fa1
/session-persistence-event-catalog/resolved-persistence-types/replayenvelope:
en: 9a80b6f5eb08eaea
zh: 061c632b8f3e4d87
en: 3460f0c910a247fd
zh: 3990587ab01a1907
/session-persistence-event-catalog/resolved-persistence-types/requestcontext:
en: cc8bb7075d546941
zh: 77209abf30744be0
@@ -1176,8 +1215,8 @@
en: ecc15ebadb77afdf
zh: 97ac27d6a4175f6f
/session-persistence-event-catalog/resolved-persistence-types/streamchunk:
en: 0d571899222eb04f
zh: de28c6d67d1763c1
en: 12fe93a89508739b
zh: 03306c0f7b124f0d
/session-persistence-event-catalog/resolved-persistence-types/subagentcatalogevent:
en: 725539dcd5c335ed
zh: 5ca08d3667f84ff9
@@ -1245,8 +1284,8 @@
en: 2258683c3cfa4ce3
zh: 5663aa76c911761b
/session-persistence-event-catalog/resolved-persistence-types/toolschema:
en: 6e1e6ebc7c1c38c8
zh: e47a3ca80c4c3b71
en: eb76c5bd050ffccd
zh: cb24780d4b5f79ac
/session-persistence-event-catalog/resolved-persistence-types/toolschema~2:
en: 12c14727bb7834e2
zh: b0f3c877873c36db
@@ -1296,11 +1335,11 @@
en: 5e7d82a493a1d4d8
zh: d2d785891dd766fc
/session-persistence-event-catalog/resolved-persistence-types/number~2:
en: 386989934d1bb62e
zh: 69b8bc182a5acbd3
en: 2786fef560851bb4
zh: 5d787475356b2606
/session-persistence-event-catalog/resolved-persistence-types/string:
en: 52f664fd6203444e
zh: dbebfaccbc666386
en: 5fa180e9ba84fb2f
zh: ba6249510e691374
/session-persistence-event-catalog/resolved-persistence-types/string~2:
en: 0089620bf4638263
zh: 1922bef1713094bb
@@ -1329,9 +1368,12 @@
en: ab07ee7c506483d4
zh: 299e31a106d93dfe
/session-persistence-event-catalog/resolved-persistence-types/union-3-variants~2:
en: faa507a889e1c476
zh: b5f13f6f0590152f
en: 5095d352cbd90e21
zh: e0bfa5c90e3917b6
/session-persistence-event-catalog/resolved-persistence-types/union-3-variants~3:
en: 9e296094df7462ba
zh: e7e3255a3ada9279
/session-persistence-event-catalog/resolved-persistence-types/union-3-variants~4:
en: 5fc89a7ec1cecd78
zh: dc66aa8e4aae1847
/session-persistence-event-catalog/resolved-persistence-types/union-6-variants:
@@ -1890,11 +1932,11 @@
en: bb507524bcc39c53
zh: 8314898562437473
/session-persistence-event-catalog/resolved-persistence-types/type-block-end:
en: 8c5a05fa6adf3e70
zh: 66768b25d6fb3e07
en: c5acb63761d0cbb8
zh: 6caad01b80c6eb0d
/session-persistence-event-catalog/resolved-persistence-types/type-block-start:
en: 5caed426cab416ee
zh: 86f47f90f8c440f2
en: c52a22b7878bde2f
zh: 42f3fae52cf09ebb
/session-persistence-event-catalog/resolved-persistence-types/type-chunk:
en: 2186ede3e9917aea
zh: 0cfef64045dce95b
@@ -1932,8 +1974,8 @@
en: 14e4b48d856bcf57
zh: 72ba176535dc7f3f
/session-persistence-event-catalog/resolved-persistence-types/type-finish:
en: 21627e72a24990ff
zh: d71375de325ee9f8
en: 359385a004565fda
zh: 313f78d5906a3128
/session-persistence-event-catalog/resolved-persistence-types/type-goal-change:
en: aad2516b62d3ee83
zh: e7204c4dc4e8e408
@@ -1944,8 +1986,14 @@
en: 8b523e0be5327519
zh: 86ec891087b8bf24
/session-persistence-event-catalog/resolved-persistence-types/type-image-offload:
en: 06230b6290fa9826
zh: 11930bfa355b70fa
en: bf512693267d4262
zh: 805710898b4e913a
/session-persistence-event-catalog/resolved-persistence-types/type-job-registered:
en: 734d3bb283cc6f66
zh: 75bcb55f71673e34
/session-persistence-event-catalog/resolved-persistence-types/type-job-settled:
en: 742c3a1543414ecb
zh: e256fb92d72b8184
/session-persistence-event-catalog/resolved-persistence-types/type-llm-retry:
en: 6d026baeac30a0f1
zh: 55131683e3d5ed27
@@ -1965,8 +2013,8 @@
en: 34e5591d75322649
zh: a216839f305c9796
/session-persistence-event-catalog/resolved-persistence-types/type-reasoning-delta:
en: a18feb76be195fa0
zh: 3db7147ee4c5c963
en: 8b5e884e0c0ab11b
zh: 3b291d80028b6583
/session-persistence-event-catalog/resolved-persistence-types/type-request-context:
en: f8addb1a01da9ca1
zh: 4ef11ebddd302c05
@@ -2025,8 +2073,8 @@
en: 1484738718de5312
zh: 3e6fbe9c64068225
/session-persistence-event-catalog/resolved-persistence-types/type-text-delta:
en: 47ae2d57be710450
zh: b072753349ac505e
en: bac4775a1255bbbb
zh: 834b81d203e21b7c
/session-persistence-event-catalog/resolved-persistence-types/type-todo-write:
en: 2fa7ba77598a95b4
zh: 50972b51d77e9155
@@ -2034,8 +2082,8 @@
en: 32f732b97739e4d2
zh: f288e48e356969c0
/session-persistence-event-catalog/resolved-persistence-types/type-tool-call-delta:
en: 1df89f427ccac815
zh: 1bec3d025ea1f7e3
en: a172400ce8d6dbe7
zh: 1d6cba18564d0230
/session-persistence-event-catalog/resolved-persistence-types/type-tool-workflow-agent-end:
en: 8eb5e1eb95722bc7
zh: 8dd5980029600648
@@ -2067,8 +2115,8 @@
en: 1b045de96172be4b
zh: 8a15c6f35b576b37
/session-persistence-event-catalog/resolved-persistence-types/type-usage:
en: fa542ccb91698e56
zh: 7b725c813d69588d
en: a5579e3f96903381
zh: deac8bf4949cf17a
/session-persistence-event-catalog/resolved-persistence-types/type-user-message:
en: fb49c375aec5952c
zh: 19b80920c1068b86
+222 -12
View File
@@ -44,6 +44,8 @@ The [format references](persistence-changes/historical-formats/README.md) cover
| `event:hook/invoked` | event | `8a6e1ec9e8db346b0e02f027db73c07a94f067a26d40c1aef1abd09c47ce7ba0` | [`{ type: "hook/invoked" }`](#persistence-type-sha256-8a6e1ec9e8db346b0e02f027db73c07a94f067a26d40c1aef1abd09c47ce7ba0) |
| `event:hook/result` | event | `e75916628f3f10c2d50658bd143052a46285fbf1a9a700ba54947614603d26b4` | [`{ type: "hook/result" }`](#persistence-type-sha256-e75916628f3f10c2d50658bd143052a46285fbf1a9a700ba54947614603d26b4) |
| `event:image/offload` | event | `b222069eea2d768065161c1147b1f2c78c1b54328c84b3586ae5c8f91b8ed35e` | [`{ type: "image/offload" }`](#persistence-type-sha256-b222069eea2d768065161c1147b1f2c78c1b54328c84b3586ae5c8f91b8ed35e) |
| `event:job/registered` | event | `f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1` | [`{ type: "job/registered" }`](#persistence-type-sha256-f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1) |
| `event:job/settled` | event | `edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf` | [`{ type: "job/settled" }`](#persistence-type-sha256-edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf) |
| `event:llm/retry` | event | `525254db03b1d1e6b74cf55aced52817568331ac1f96c0818728910b6692e336` | [`{ type: "llm/retry" }`](#persistence-type-sha256-525254db03b1d1e6b74cf55aced52817568331ac1f96c0818728910b6692e336) |
| `event:llm/retry-started` | event | `48e5c9861f16ac07e78cb7b5ae9dabdf7bb85c58baed5a51b4ad275050ea58e3` | [`{ type: "llm/retry-started" }`](#persistence-type-sha256-48e5c9861f16ac07e78cb7b5ae9dabdf7bb85c58baed5a51b4ad275050ea58e3) |
| `event:model/selection` | event | `35203ba7ad5ef6f97d556b85df20ae98f04f09c65748cecdf8eefdb8b6405ffc` | [`{ type: "model/selection" }`](#persistence-type-sha256-35203ba7ad5ef6f97d556b85df20ae98f04f09c65748cecdf8eefdb8b6405ffc) |
@@ -627,6 +629,36 @@ Source: [`packages/experimental/hook-protocol/src/types.ts:31`](../packages/expe
Source: [`packages/compaction/compaction-image-offload/src/projection.ts:25`](../packages/compaction/compaction-image-offload/src/projection.ts)
### `job/*`
<a id="jobregistered--log-only"></a>
#### `job/registered` — log-only
```ts persistence-catalog
/**
* Log-only job registration; model output collection is not required.
* @param data - Execution identity, original owner, registration time, and creating tool call.
*/
'job/registered': JobRegisteredData
```
Source: [`packages/jobs/jobs/src/types.ts:59`](../packages/jobs/jobs/src/types.ts)
<a id="jobsettled--log-only"></a>
#### `job/settled` — log-only
```ts persistence-catalog
/**
* Log-only terminal record, paired by the same unique jobId used for live control.
* @param data - Registration facts plus settlement time, outcome, and producer acknowledgement.
*/
'job/settled': JobSettledData
```
Source: [`packages/jobs/jobs/src/types.ts:64`](../packages/jobs/jobs/src/types.ts)
### `llm/*`
<a id="llmretry--log-only"></a>
@@ -1954,7 +1986,7 @@ SHA-256: `ebb768d85ec87fb68e42fc14fd7d8535b5ac11791b14d04c6770180f0a719bf8`
SHA-256: `f311671e07bc7fa645a0b6597de9966b97147956565296ba76a36543801b66c5`
Sources: [`packages/llm/llm/src/types.ts:396`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:412`](../packages/llm/llm/src/types.ts)
`"in-history"`
@@ -1998,6 +2030,38 @@ SHA-256: `69d238a6e9b08d67f601b1825962963d8d3523cb69ebf6208c697dc5d058c199`
`"interrupted"`
<a id="persistence-type-sha256-24a8188c4d61b70a01af8cc576748765d36f132632ec55c0064f6fba482369fc"></a>
### `"job/registered"`
SHA-256: `24a8188c4d61b70a01af8cc576748765d36f132632ec55c0064f6fba482369fc`
`"job/registered"`
<a id="persistence-type-sha256-347de3380f2da308d0c74e08821f9e85559f55af4c5010795b110d00f7fc9dbd"></a>
### `"job/settled"`
SHA-256: `347de3380f2da308d0c74e08821f9e85559f55af4c5010795b110d00f7fc9dbd`
`"job/settled"`
<a id="persistence-type-sha256-bab68657940075483f086fffb711682a45bcc99c43d659fbe1c36af21ac05dd7"></a>
### `"kill"`
SHA-256: `bab68657940075483f086fffb711682a45bcc99c43d659fbe1c36af21ac05dd7`
`"kill"`
<a id="persistence-type-sha256-ef226a90ddac6cd8e631a3a337a3a3e27f9494be92befb7c718b404681d75e21"></a>
### `"killed"`
SHA-256: `ef226a90ddac6cd8e631a3a337a3a3e27f9494be92befb7c718b404681d75e21`
`"killed"`
<a id="persistence-type-sha256-ad3b56aa2fc1ad4250e7399295d34a8eae592e1907e85852e2291b2e498a30bc"></a>
### `"legacy"`
@@ -2182,6 +2246,14 @@ SHA-256: `df5d9709b7db2a72510dc52052a23f0c38f39730af1504bab8bccabc14fae528`
`"positive"`
<a id="persistence-type-sha256-6cf082d0fb6034dea61636787ff0ddf43b6e59aad71e644435a479bc9b83ad65"></a>
### `"producer"`
SHA-256: `6cf082d0fb6034dea61636787ff0ddf43b6e59aad71e644435a479bc9b83ad65`
`"producer"`
<a id="persistence-type-sha256-0341d4c3dfcd53253cdc1e789d9130d3cd848b6f8b0706bf92f313a68b39ff23"></a>
### `"product-interaction"`
@@ -2606,6 +2678,14 @@ SHA-256: `b57ae1b37e52bee0a21cbdace168dc6a15582bcda8c306dad962c5dcc8a8e28b`
`"team/task"`
<a id="persistence-type-sha256-5cb63db9fe57dc09c3a1c2b84c3edf73ff5b62960155d8436a2377a5c43ce32c"></a>
### `"teardown"`
SHA-256: `5cb63db9fe57dc09c3a1c2b84c3edf73ff5b62960155d8436a2377a5c43ce32c`
`"teardown"`
<a id="persistence-type-sha256-4e44c9118152f6829634bfd508e47669ab0497caffa380c94b4be91f9390d35d"></a>
### `"text"`
@@ -3696,6 +3776,88 @@ One of:
- `"next-step"`
- `"next-turn"`
<a id="persistence-type-sha256-e3056e0dda3a379e895386e368c3ce42131460ea65e410e1d091cca98a347305"></a>
<a id="persistence-type-jobregistereddata"></a>
<a id="persistence-type-packagesjobsjobssrctypestsjobregistereddata"></a>
### `JobRegisteredData`
SHA-256: `e3056e0dda3a379e895386e368c3ce42131460ea65e410e1d091cca98a347305`
Sources: [`packages/jobs/jobs/src/types.ts:24`](../packages/jobs/jobs/src/types.ts)
| Property | Presence | Type |
|---|---|---|
| `jobId` | required | `string` |
| `kind` | required | `string` |
| `label` | required | `string` |
| `owner` | required | `string` |
| `startedAt` | required | `number` |
| `toolCall` | optional | [`JobToolCall`](#persistence-type-sha256-39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f) |
<a id="persistence-type-sha256-750a2b129d67704df675c06823c20c80b65cbae89d5aaa914fd5a72e3df395b5"></a>
<a id="persistence-type-jobsettlecause"></a>
<a id="persistence-type-packagesjobsjobssrctypestsjobsettlecause"></a>
### `JobSettleCause`
SHA-256: `750a2b129d67704df675c06823c20c80b65cbae89d5aaa914fd5a72e3df395b5`
Sources: [`packages/jobs/jobs/src/types.ts:247`](../packages/jobs/jobs/src/types.ts)
One of:
- `"kill"`
- `"producer"`
- `"teardown"`
<a id="persistence-type-sha256-611d82d2dc50df706cf08a0fc04bc8eaf78083391fe6f10313de943e615dd2da"></a>
<a id="persistence-type-jobsettleddata"></a>
<a id="persistence-type-packagesjobsjobssrctypestsjobsettleddata"></a>
### `JobSettledData`
SHA-256: `611d82d2dc50df706cf08a0fc04bc8eaf78083391fe6f10313de943e615dd2da`
Sources: [`packages/jobs/jobs/src/types.ts:40`](../packages/jobs/jobs/src/types.ts)
| Property | Presence | Type |
|---|---|---|
| `cause` | required | [`JobSettleCause`](#persistence-type-sha256-750a2b129d67704df675c06823c20c80b65cbae89d5aaa914fd5a72e3df395b5) |
| `detail` | optional | `string` |
| `finishedAt` | required | `number` |
| `jobId` | required | `string` |
| `kind` | required | `string` |
| `label` | required | `string` |
| `owner` | required | `string` |
| `producerReported` | required | `boolean` |
| `startedAt` | required | `number` |
| `status` | required | [`union (3 variants)`](#persistence-type-sha256-c2f49004d9ae38a964e80850c87bc6849d6a872091a1d43e99eedf00c641e2a3) |
| `toolCall` | optional | [`JobToolCall`](#persistence-type-sha256-39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f) |
<a id="persistence-type-sha256-39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f"></a>
<a id="persistence-type-jobtoolcall"></a>
<a id="persistence-type-packagesjobsjobssrctypestsjobtoolcall"></a>
### `JobToolCall`
SHA-256: `39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f`
Sources: [`packages/jobs/jobs/src/types.ts:16`](../packages/jobs/jobs/src/types.ts)
| Property | Presence | Type |
|---|---|---|
| `callId` | required | `string` |
| `rootCallId` | required | `string` |
<a id="persistence-type-sha256-c592ce75aab73fcab19c1d7845684c72cf402b78d2e1f2833a58ecf9f3598ed6"></a>
<a id="persistence-type-jsonvalue"></a>
@@ -4314,7 +4476,7 @@ Sources: [`packages/llm/llm/src/types.ts:68`](../packages/llm/llm/src/types.ts)
SHA-256: `0acd94fe8794574c9ae72c7855ee16d29c546096d4af760d16d1225385764555`
Sources: [`packages/llm/llm/src/types.ts:430`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:446`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -4609,7 +4771,7 @@ Sources: [`packages/skill/skill/src/index.ts:146`](../packages/skill/skill/src/i
SHA-256: `47e9095591ae36e7c39ee62553097772f2bfa16304536a72dbbc3f691f605180`
Sources: [`packages/llm/llm/src/types.ts:452`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:468`](../packages/llm/llm/src/types.ts)
One of:
@@ -5034,7 +5196,7 @@ Sources: [`packages/llm/llm/src/message.ts:173`](../packages/llm/llm/src/message
SHA-256: `66ba70f6f068da443f969a0b947a013c3addd776b9b60a0a393759c19825e9a2`
Sources: [`packages/llm/llm/src/types.ts:473`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:489`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -5298,6 +5460,8 @@ Array of `number`.
<a id="persistence-type-goalid"></a>
<a id="persistence-type-jobid"></a>
<a id="persistence-type-messagefeedbackversion"></a>
<a id="persistence-type-messageid"></a>
@@ -5330,6 +5494,8 @@ Array of `number`.
<a id="persistence-type-packagesinteractionuser-approvalsrctypestsapprovalrequestid"></a>
<a id="persistence-type-packagesjobsjobssrcbrandtsjobid"></a>
<a id="persistence-type-packagesllmllm-retrysrcbrandtsretryid"></a>
<a id="persistence-type-packagesllmllmsrcbrandtsmessageid"></a>
@@ -5382,7 +5548,7 @@ Array of `number`.
SHA-256: `4cd48f3e5108bd6ebedf7301c3638839b8b2b9db8dbd493974177fbdeb91a01b`
Sources: [`packages/api/session-controller/src/types.ts:408`](../packages/api/session-controller/src/types.ts) · [`packages/attachment/attachment/src/brand.ts:6`](../packages/attachment/attachment/src/brand.ts) · [`packages/compaction/compaction/src/brand.ts:4`](../packages/compaction/compaction/src/brand.ts) · [`packages/core/session/src/types.ts:20`](../packages/core/session/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:21`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:33`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:9`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/webhook/src/brand.ts:12`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:6`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:9`](../packages/experimental/webhook/src/brand.ts) · [`packages/feedback/message-feedback/src/types.ts:14`](../packages/feedback/message-feedback/src/types.ts) · [`packages/goal/goal/src/types.ts:17`](../packages/goal/goal/src/types.ts) · [`packages/interaction/commands/src/brand.ts:31`](../packages/interaction/commands/src/brand.ts) · [`packages/interaction/user-approval/src/types.ts:17`](../packages/interaction/user-approval/src/types.ts) · [`packages/llm/llm-retry/src/brand.ts:4`](../packages/llm/llm-retry/src/brand.ts) · [`packages/llm/llm/src/brand.ts:16`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:31`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:43`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:67`](../packages/llm/llm/src/brand.ts) · [`packages/schedule/schedule/src/types.ts:14`](../packages/schedule/schedule/src/types.ts) · [`packages/session/session-title/src/index.ts:42`](../packages/session/session-title/src/index.ts) · [`packages/session/session-title/src/types.ts:17`](../packages/session/session-title/src/types.ts) · [`packages/workflow/workflow/src/types.ts:13`](../packages/workflow/workflow/src/types.ts)
Sources: [`packages/api/session-controller/src/types.ts:408`](../packages/api/session-controller/src/types.ts) · [`packages/attachment/attachment/src/brand.ts:6`](../packages/attachment/attachment/src/brand.ts) · [`packages/compaction/compaction/src/brand.ts:4`](../packages/compaction/compaction/src/brand.ts) · [`packages/core/session/src/types.ts:20`](../packages/core/session/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:21`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:33`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:9`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/webhook/src/brand.ts:12`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:6`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:9`](../packages/experimental/webhook/src/brand.ts) · [`packages/feedback/message-feedback/src/types.ts:14`](../packages/feedback/message-feedback/src/types.ts) · [`packages/goal/goal/src/types.ts:17`](../packages/goal/goal/src/types.ts) · [`packages/interaction/commands/src/brand.ts:31`](../packages/interaction/commands/src/brand.ts) · [`packages/interaction/user-approval/src/types.ts:17`](../packages/interaction/user-approval/src/types.ts) · [`packages/jobs/jobs/src/brand.ts:19`](../packages/jobs/jobs/src/brand.ts) · [`packages/llm/llm-retry/src/brand.ts:4`](../packages/llm/llm-retry/src/brand.ts) · [`packages/llm/llm/src/brand.ts:16`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:31`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:43`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:67`](../packages/llm/llm/src/brand.ts) · [`packages/schedule/schedule/src/types.ts:14`](../packages/schedule/schedule/src/types.ts) · [`packages/session/session-title/src/index.ts:42`](../packages/session/session-title/src/index.ts) · [`packages/session/session-title/src/types.ts:17`](../packages/session/session-title/src/types.ts) · [`packages/workflow/workflow/src/types.ts:13`](../packages/workflow/workflow/src/types.ts)
`string`
@@ -5491,6 +5657,18 @@ One of:
- `"replace"`
- `"set"`
<a id="persistence-type-sha256-c2f49004d9ae38a964e80850c87bc6849d6a872091a1d43e99eedf00c641e2a3"></a>
### `union (3 variants)`
SHA-256: `c2f49004d9ae38a964e80850c87bc6849d6a872091a1d43e99eedf00c641e2a3`
One of:
- `"completed"`
- `"failed"`
- `"killed"`
<a id="persistence-type-sha256-fd0d91a1f9dd2efb8959bdf5e07f8f0a98b1cdfa38ce8d4732ebde0b44c3abd4"></a>
### `union (3 variants)`
@@ -7831,7 +8009,7 @@ SHA-256: `1033093edd0db80ff410e00830b523405e00bb0c7684948e531ff65095799625`
SHA-256: `d4b739491689cc6bb13d07ffac1a32239875abda364c0d5edd8f74faf5e9c00d`
Sources: [`packages/llm/llm/src/types.ts:457`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:473`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -7845,7 +8023,7 @@ Sources: [`packages/llm/llm/src/types.ts:457`](../packages/llm/llm/src/types.ts)
SHA-256: `3bec87f9e6ab3da03346f49923d3c51621debc0159df68605e543c3b2a026f90`
Sources: [`packages/llm/llm/src/types.ts:453`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:469`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8051,7 +8229,7 @@ SHA-256: `b54940ff095c17e874c5be03815f4c2145a256cf3a1d34dae4ab2f7769dfffe8`
SHA-256: `a2b49331716ba0a7078b026d145306a70eae64b7313c3e6204bd931e75ec3bb1`
Sources: [`packages/llm/llm/src/types.ts:459`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:475`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8123,6 +8301,38 @@ SHA-256: `b222069eea2d768065161c1147b1f2c78c1b54328c84b3586ae5c8f91b8ed35e`
| `time` | required | `number` |
| `type` | required | `"image/offload"` |
<a id="persistence-type-sha256-f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1"></a>
<a id="persistence-type-eventjobregistered"></a>
### `{ type: "job/registered" }`
SHA-256: `f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1`
| Property | Presence | Type |
|---|---|---|
| `data` | required | [`JobRegisteredData`](#persistence-type-sha256-e3056e0dda3a379e895386e368c3ce42131460ea65e410e1d091cca98a347305) |
| `ignorable` | optional | `true` |
| `seq` | required | `number` |
| `time` | required | `number` |
| `type` | required | `"job/registered"` |
<a id="persistence-type-sha256-edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf"></a>
<a id="persistence-type-eventjobsettled"></a>
### `{ type: "job/settled" }`
SHA-256: `edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf`
| Property | Presence | Type |
|---|---|---|
| `data` | required | [`JobSettledData`](#persistence-type-sha256-611d82d2dc50df706cf08a0fc04bc8eaf78083391fe6f10313de943e615dd2da) |
| `ignorable` | optional | `true` |
| `seq` | required | `number` |
| `time` | required | `number` |
| `type` | required | `"job/settled"` |
<a id="persistence-type-sha256-525254db03b1d1e6b74cf55aced52817568331ac1f96c0818728910b6692e336"></a>
<a id="persistence-type-eventllmretry"></a>
@@ -8225,7 +8435,7 @@ Sources: [`packages/llm/llm/src/assistant-stream.ts:28`](../packages/llm/llm/src
SHA-256: `2abb711460e6238d851c30f3e4bdd87a2aa1887ee70575b3d3b7b25610673095`
Sources: [`packages/llm/llm/src/types.ts:455`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:471`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8545,7 +8755,7 @@ Sources: [`packages/llm/llm/src/assistant-stream.ts:21`](../packages/llm/llm/src
SHA-256: `95080295115fbd83544520ba247b68a03790131f6a2eac323d388758cb542f65`
Sources: [`packages/llm/llm/src/types.ts:454`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:470`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8593,7 +8803,7 @@ Sources: [`packages/llm/llm/src/assistant-stream.ts:35`](../packages/llm/llm/src
SHA-256: `88a610b831be6d92612a464be5c7d0b88ec24d97bd299837bf74bf7672183c9a`
Sources: [`packages/llm/llm/src/types.ts:456`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:472`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -8771,7 +8981,7 @@ SHA-256: `aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8`
SHA-256: `f1a96afe7503ac1817de769cd0ba13d9b80111c7034c50106b3344ecc14cc515`
Sources: [`packages/llm/llm/src/types.ts:458`](../packages/llm/llm/src/types.ts)
Sources: [`packages/llm/llm/src/types.ts:474`](../packages/llm/llm/src/types.ts)
| Property | Presence | Type |
|---|---|---|
+222 -12
View File
@@ -46,6 +46,8 @@
| `event:hook/invoked` | event | `8a6e1ec9e8db346b0e02f027db73c07a94f067a26d40c1aef1abd09c47ce7ba0` | [`{ type: "hook/invoked" }`](#persistence-type-sha256-8a6e1ec9e8db346b0e02f027db73c07a94f067a26d40c1aef1abd09c47ce7ba0) |
| `event:hook/result` | event | `e75916628f3f10c2d50658bd143052a46285fbf1a9a700ba54947614603d26b4` | [`{ type: "hook/result" }`](#persistence-type-sha256-e75916628f3f10c2d50658bd143052a46285fbf1a9a700ba54947614603d26b4) |
| `event:image/offload` | event | `b222069eea2d768065161c1147b1f2c78c1b54328c84b3586ae5c8f91b8ed35e` | [`{ type: "image/offload" }`](#persistence-type-sha256-b222069eea2d768065161c1147b1f2c78c1b54328c84b3586ae5c8f91b8ed35e) |
| `event:job/registered` | event | `f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1` | [`{ type: "job/registered" }`](#persistence-type-sha256-f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1) |
| `event:job/settled` | event | `edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf` | [`{ type: "job/settled" }`](#persistence-type-sha256-edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf) |
| `event:llm/retry` | event | `525254db03b1d1e6b74cf55aced52817568331ac1f96c0818728910b6692e336` | [`{ type: "llm/retry" }`](#persistence-type-sha256-525254db03b1d1e6b74cf55aced52817568331ac1f96c0818728910b6692e336) |
| `event:llm/retry-started` | event | `48e5c9861f16ac07e78cb7b5ae9dabdf7bb85c58baed5a51b4ad275050ea58e3` | [`{ type: "llm/retry-started" }`](#persistence-type-sha256-48e5c9861f16ac07e78cb7b5ae9dabdf7bb85c58baed5a51b4ad275050ea58e3) |
| `event:model/selection` | event | `35203ba7ad5ef6f97d556b85df20ae98f04f09c65748cecdf8eefdb8b6405ffc` | [`{ type: "model/selection" }`](#persistence-type-sha256-35203ba7ad5ef6f97d556b85df20ae98f04f09c65748cecdf8eefdb8b6405ffc) |
@@ -629,6 +631,36 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
来源:[`packages/compaction/compaction-image-offload/src/projection.ts:25`](../packages/compaction/compaction-image-offload/src/projection.ts)
### `job/*`
<a id="jobregistered--log-only"></a>
#### `job/registered` — log-only
```ts persistence-catalog
/**
* Log-only job registration; model output collection is not required.
* @param data - Execution identity, original owner, registration time, and creating tool call.
*/
'job/registered': JobRegisteredData
```
来源:[`packages/jobs/jobs/src/types.ts:59`](../packages/jobs/jobs/src/types.ts)
<a id="jobsettled--log-only"></a>
#### `job/settled` — log-only
```ts persistence-catalog
/**
* Log-only terminal record, paired by the same unique jobId used for live control.
* @param data - Registration facts plus settlement time, outcome, and producer acknowledgement.
*/
'job/settled': JobSettledData
```
来源:[`packages/jobs/jobs/src/types.ts:64`](../packages/jobs/jobs/src/types.ts)
### `llm/*`
<a id="llmretry--log-only"></a>
@@ -1956,7 +1988,7 @@ SHA-256: `ebb768d85ec87fb68e42fc14fd7d8535b5ac11791b14d04c6770180f0a719bf8`
SHA-256: `f311671e07bc7fa645a0b6597de9966b97147956565296ba76a36543801b66c5`
来源:[`packages/llm/llm/src/types.ts:396`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:412`](../packages/llm/llm/src/types.ts)
`"in-history"`
@@ -2000,6 +2032,38 @@ SHA-256: `69d238a6e9b08d67f601b1825962963d8d3523cb69ebf6208c697dc5d058c199`
`"interrupted"`
<a id="persistence-type-sha256-24a8188c4d61b70a01af8cc576748765d36f132632ec55c0064f6fba482369fc"></a>
### `"job/registered"`
SHA-256: `24a8188c4d61b70a01af8cc576748765d36f132632ec55c0064f6fba482369fc`
`"job/registered"`
<a id="persistence-type-sha256-347de3380f2da308d0c74e08821f9e85559f55af4c5010795b110d00f7fc9dbd"></a>
### `"job/settled"`
SHA-256: `347de3380f2da308d0c74e08821f9e85559f55af4c5010795b110d00f7fc9dbd`
`"job/settled"`
<a id="persistence-type-sha256-bab68657940075483f086fffb711682a45bcc99c43d659fbe1c36af21ac05dd7"></a>
### `"kill"`
SHA-256: `bab68657940075483f086fffb711682a45bcc99c43d659fbe1c36af21ac05dd7`
`"kill"`
<a id="persistence-type-sha256-ef226a90ddac6cd8e631a3a337a3a3e27f9494be92befb7c718b404681d75e21"></a>
### `"killed"`
SHA-256: `ef226a90ddac6cd8e631a3a337a3a3e27f9494be92befb7c718b404681d75e21`
`"killed"`
<a id="persistence-type-sha256-ad3b56aa2fc1ad4250e7399295d34a8eae592e1907e85852e2291b2e498a30bc"></a>
### `"legacy"`
@@ -2184,6 +2248,14 @@ SHA-256: `df5d9709b7db2a72510dc52052a23f0c38f39730af1504bab8bccabc14fae528`
`"positive"`
<a id="persistence-type-sha256-6cf082d0fb6034dea61636787ff0ddf43b6e59aad71e644435a479bc9b83ad65"></a>
### `"producer"`
SHA-256: `6cf082d0fb6034dea61636787ff0ddf43b6e59aad71e644435a479bc9b83ad65`
`"producer"`
<a id="persistence-type-sha256-0341d4c3dfcd53253cdc1e789d9130d3cd848b6f8b0706bf92f313a68b39ff23"></a>
### `"product-interaction"`
@@ -2608,6 +2680,14 @@ SHA-256: `b57ae1b37e52bee0a21cbdace168dc6a15582bcda8c306dad962c5dcc8a8e28b`
`"team/task"`
<a id="persistence-type-sha256-5cb63db9fe57dc09c3a1c2b84c3edf73ff5b62960155d8436a2377a5c43ce32c"></a>
### `"teardown"`
SHA-256: `5cb63db9fe57dc09c3a1c2b84c3edf73ff5b62960155d8436a2377a5c43ce32c`
`"teardown"`
<a id="persistence-type-sha256-4e44c9118152f6829634bfd508e47669ab0497caffa380c94b4be91f9390d35d"></a>
### `"text"`
@@ -3698,6 +3778,88 @@ SHA-256: `96f4a9c81fc0f940ef71528a8cc66731ae4cf1f40d79680c5fe3c39f96d7723c`
- `"next-step"`
- `"next-turn"`
<a id="persistence-type-sha256-e3056e0dda3a379e895386e368c3ce42131460ea65e410e1d091cca98a347305"></a>
<a id="persistence-type-jobregistereddata"></a>
<a id="persistence-type-packagesjobsjobssrctypestsjobregistereddata"></a>
### `JobRegisteredData`
SHA-256: `e3056e0dda3a379e895386e368c3ce42131460ea65e410e1d091cca98a347305`
来源:[`packages/jobs/jobs/src/types.ts:24`](../packages/jobs/jobs/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
| `jobId` | 必需 | `string` |
| `kind` | 必需 | `string` |
| `label` | 必需 | `string` |
| `owner` | 必需 | `string` |
| `startedAt` | 必需 | `number` |
| `toolCall` | 可选 | [`JobToolCall`](#persistence-type-sha256-39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f) |
<a id="persistence-type-sha256-750a2b129d67704df675c06823c20c80b65cbae89d5aaa914fd5a72e3df395b5"></a>
<a id="persistence-type-jobsettlecause"></a>
<a id="persistence-type-packagesjobsjobssrctypestsjobsettlecause"></a>
### `JobSettleCause`
SHA-256: `750a2b129d67704df675c06823c20c80b65cbae89d5aaa914fd5a72e3df395b5`
来源:[`packages/jobs/jobs/src/types.ts:247`](../packages/jobs/jobs/src/types.ts)
以下类型之一:
- `"kill"`
- `"producer"`
- `"teardown"`
<a id="persistence-type-sha256-611d82d2dc50df706cf08a0fc04bc8eaf78083391fe6f10313de943e615dd2da"></a>
<a id="persistence-type-jobsettleddata"></a>
<a id="persistence-type-packagesjobsjobssrctypestsjobsettleddata"></a>
### `JobSettledData`
SHA-256: `611d82d2dc50df706cf08a0fc04bc8eaf78083391fe6f10313de943e615dd2da`
来源:[`packages/jobs/jobs/src/types.ts:40`](../packages/jobs/jobs/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
| `cause` | 必需 | [`JobSettleCause`](#persistence-type-sha256-750a2b129d67704df675c06823c20c80b65cbae89d5aaa914fd5a72e3df395b5) |
| `detail` | 可选 | `string` |
| `finishedAt` | 必需 | `number` |
| `jobId` | 必需 | `string` |
| `kind` | 必需 | `string` |
| `label` | 必需 | `string` |
| `owner` | 必需 | `string` |
| `producerReported` | 必需 | `boolean` |
| `startedAt` | 必需 | `number` |
| `status` | 必需 | [`union (3 variants)`](#persistence-type-sha256-c2f49004d9ae38a964e80850c87bc6849d6a872091a1d43e99eedf00c641e2a3) |
| `toolCall` | 可选 | [`JobToolCall`](#persistence-type-sha256-39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f) |
<a id="persistence-type-sha256-39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f"></a>
<a id="persistence-type-jobtoolcall"></a>
<a id="persistence-type-packagesjobsjobssrctypestsjobtoolcall"></a>
### `JobToolCall`
SHA-256: `39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f`
来源:[`packages/jobs/jobs/src/types.ts:16`](../packages/jobs/jobs/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
| `callId` | 必需 | `string` |
| `rootCallId` | 必需 | `string` |
<a id="persistence-type-sha256-c592ce75aab73fcab19c1d7845684c72cf402b78d2e1f2833a58ecf9f3598ed6"></a>
<a id="persistence-type-jsonvalue"></a>
@@ -4316,7 +4478,7 @@ SHA-256: `814d9434e1ddf9078612b3b34322f26e9363b469213335007f7e9ba7fee9464e`
SHA-256: `0acd94fe8794574c9ae72c7855ee16d29c546096d4af760d16d1225385764555`
来源:[`packages/llm/llm/src/types.ts:430`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:446`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -4611,7 +4773,7 @@ SHA-256: `672c4aa2a9b736e3d6e5da6346d2e2ed5e3573f2d0baafa18e7407c9f3fee3db`
SHA-256: `47e9095591ae36e7c39ee62553097772f2bfa16304536a72dbbc3f691f605180`
来源:[`packages/llm/llm/src/types.ts:452`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:468`](../packages/llm/llm/src/types.ts)
以下类型之一:
@@ -5036,7 +5198,7 @@ SHA-256: `4b259f7f8f0a44ad5e90b70a73553ced1df27012d126921d397ff403b6c86731`
SHA-256: `66ba70f6f068da443f969a0b947a013c3addd776b9b60a0a393759c19825e9a2`
来源:[`packages/llm/llm/src/types.ts:473`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:489`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -5300,6 +5462,8 @@ SHA-256: `5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78`
<a id="persistence-type-goalid"></a>
<a id="persistence-type-jobid"></a>
<a id="persistence-type-messagefeedbackversion"></a>
<a id="persistence-type-messageid"></a>
@@ -5332,6 +5496,8 @@ SHA-256: `5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78`
<a id="persistence-type-packagesinteractionuser-approvalsrctypestsapprovalrequestid"></a>
<a id="persistence-type-packagesjobsjobssrcbrandtsjobid"></a>
<a id="persistence-type-packagesllmllm-retrysrcbrandtsretryid"></a>
<a id="persistence-type-packagesllmllmsrcbrandtsmessageid"></a>
@@ -5384,7 +5550,7 @@ SHA-256: `5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78`
SHA-256: `4cd48f3e5108bd6ebedf7301c3638839b8b2b9db8dbd493974177fbdeb91a01b`
来源:[`packages/api/session-controller/src/types.ts:408`](../packages/api/session-controller/src/types.ts) · [`packages/attachment/attachment/src/brand.ts:6`](../packages/attachment/attachment/src/brand.ts) · [`packages/compaction/compaction/src/brand.ts:4`](../packages/compaction/compaction/src/brand.ts) · [`packages/core/session/src/types.ts:20`](../packages/core/session/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:21`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:33`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:9`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/webhook/src/brand.ts:12`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:6`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:9`](../packages/experimental/webhook/src/brand.ts) · [`packages/feedback/message-feedback/src/types.ts:14`](../packages/feedback/message-feedback/src/types.ts) · [`packages/goal/goal/src/types.ts:17`](../packages/goal/goal/src/types.ts) · [`packages/interaction/commands/src/brand.ts:31`](../packages/interaction/commands/src/brand.ts) · [`packages/interaction/user-approval/src/types.ts:17`](../packages/interaction/user-approval/src/types.ts) · [`packages/llm/llm-retry/src/brand.ts:4`](../packages/llm/llm-retry/src/brand.ts) · [`packages/llm/llm/src/brand.ts:16`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:31`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:43`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:67`](../packages/llm/llm/src/brand.ts) · [`packages/schedule/schedule/src/types.ts:14`](../packages/schedule/schedule/src/types.ts) · [`packages/session/session-title/src/index.ts:42`](../packages/session/session-title/src/index.ts) · [`packages/session/session-title/src/types.ts:17`](../packages/session/session-title/src/types.ts) · [`packages/workflow/workflow/src/types.ts:13`](../packages/workflow/workflow/src/types.ts)
来源:[`packages/api/session-controller/src/types.ts:408`](../packages/api/session-controller/src/types.ts) · [`packages/attachment/attachment/src/brand.ts:6`](../packages/attachment/attachment/src/brand.ts) · [`packages/compaction/compaction/src/brand.ts:4`](../packages/compaction/compaction/src/brand.ts) · [`packages/core/session/src/types.ts:20`](../packages/core/session/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:21`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:33`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/agent-team/src/types.ts:9`](../packages/experimental/agent-team/src/types.ts) · [`packages/experimental/webhook/src/brand.ts:12`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:6`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:9`](../packages/experimental/webhook/src/brand.ts) · [`packages/feedback/message-feedback/src/types.ts:14`](../packages/feedback/message-feedback/src/types.ts) · [`packages/goal/goal/src/types.ts:17`](../packages/goal/goal/src/types.ts) · [`packages/interaction/commands/src/brand.ts:31`](../packages/interaction/commands/src/brand.ts) · [`packages/interaction/user-approval/src/types.ts:17`](../packages/interaction/user-approval/src/types.ts) · [`packages/jobs/jobs/src/brand.ts:19`](../packages/jobs/jobs/src/brand.ts) · [`packages/llm/llm-retry/src/brand.ts:4`](../packages/llm/llm-retry/src/brand.ts) · [`packages/llm/llm/src/brand.ts:16`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:31`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:43`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:67`](../packages/llm/llm/src/brand.ts) · [`packages/schedule/schedule/src/types.ts:14`](../packages/schedule/schedule/src/types.ts) · [`packages/session/session-title/src/index.ts:42`](../packages/session/session-title/src/index.ts) · [`packages/session/session-title/src/types.ts:17`](../packages/session/session-title/src/types.ts) · [`packages/workflow/workflow/src/types.ts:13`](../packages/workflow/workflow/src/types.ts)
`string`
@@ -5493,6 +5659,18 @@ SHA-256: `904bf499d98be4a3a5f836fcac533b6c4899569b018071e6604e1d32657d00fd`
- `"replace"`
- `"set"`
<a id="persistence-type-sha256-c2f49004d9ae38a964e80850c87bc6849d6a872091a1d43e99eedf00c641e2a3"></a>
### `union (3 variants)`
SHA-256: `c2f49004d9ae38a964e80850c87bc6849d6a872091a1d43e99eedf00c641e2a3`
以下类型之一:
- `"completed"`
- `"failed"`
- `"killed"`
<a id="persistence-type-sha256-fd0d91a1f9dd2efb8959bdf5e07f8f0a98b1cdfa38ce8d4732ebde0b44c3abd4"></a>
### `union (3 variants)`
@@ -7833,7 +8011,7 @@ SHA-256: `1033093edd0db80ff410e00830b523405e00bb0c7684948e531ff65095799625`
SHA-256: `d4b739491689cc6bb13d07ffac1a32239875abda364c0d5edd8f74faf5e9c00d`
来源:[`packages/llm/llm/src/types.ts:457`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:473`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -7847,7 +8025,7 @@ SHA-256: `d4b739491689cc6bb13d07ffac1a32239875abda364c0d5edd8f74faf5e9c00d`
SHA-256: `3bec87f9e6ab3da03346f49923d3c51621debc0159df68605e543c3b2a026f90`
来源:[`packages/llm/llm/src/types.ts:453`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:469`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8053,7 +8231,7 @@ SHA-256: `b54940ff095c17e874c5be03815f4c2145a256cf3a1d34dae4ab2f7769dfffe8`
SHA-256: `a2b49331716ba0a7078b026d145306a70eae64b7313c3e6204bd931e75ec3bb1`
来源:[`packages/llm/llm/src/types.ts:459`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:475`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8125,6 +8303,38 @@ SHA-256: `b222069eea2d768065161c1147b1f2c78c1b54328c84b3586ae5c8f91b8ed35e`
| `time` | 必需 | `number` |
| `type` | 必需 | `"image/offload"` |
<a id="persistence-type-sha256-f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1"></a>
<a id="persistence-type-eventjobregistered"></a>
### `{ type: "job/registered" }`
SHA-256: `f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1`
| 属性 | 存在性 | 类型 |
|---|---|---|
| `data` | 必需 | [`JobRegisteredData`](#persistence-type-sha256-e3056e0dda3a379e895386e368c3ce42131460ea65e410e1d091cca98a347305) |
| `ignorable` | 可选 | `true` |
| `seq` | 必需 | `number` |
| `time` | 必需 | `number` |
| `type` | 必需 | `"job/registered"` |
<a id="persistence-type-sha256-edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf"></a>
<a id="persistence-type-eventjobsettled"></a>
### `{ type: "job/settled" }`
SHA-256: `edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf`
| 属性 | 存在性 | 类型 |
|---|---|---|
| `data` | 必需 | [`JobSettledData`](#persistence-type-sha256-611d82d2dc50df706cf08a0fc04bc8eaf78083391fe6f10313de943e615dd2da) |
| `ignorable` | 可选 | `true` |
| `seq` | 必需 | `number` |
| `time` | 必需 | `number` |
| `type` | 必需 | `"job/settled"` |
<a id="persistence-type-sha256-525254db03b1d1e6b74cf55aced52817568331ac1f96c0818728910b6692e336"></a>
<a id="persistence-type-eventllmretry"></a>
@@ -8227,7 +8437,7 @@ SHA-256: `71bb3254ec8f1e491ce63b762a7b5f18709de23aa4e8abcc8b886f4b6ce051dd`
SHA-256: `2abb711460e6238d851c30f3e4bdd87a2aa1887ee70575b3d3b7b25610673095`
来源:[`packages/llm/llm/src/types.ts:455`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:471`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8547,7 +8757,7 @@ SHA-256: `e72269f931559e901e5e8fe1cfcbd0669fb795f43cc038ff39fba62f60403c33`
SHA-256: `95080295115fbd83544520ba247b68a03790131f6a2eac323d388758cb542f65`
来源:[`packages/llm/llm/src/types.ts:454`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:470`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8595,7 +8805,7 @@ SHA-256: `3860b4757d512a2869be833acb0faf834335b1b056bf3f83df5474dce95f8fa6`
SHA-256: `88a610b831be6d92612a464be5c7d0b88ec24d97bd299837bf74bf7672183c9a`
来源:[`packages/llm/llm/src/types.ts:456`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:472`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -8773,7 +8983,7 @@ SHA-256: `aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8`
SHA-256: `f1a96afe7503ac1817de769cd0ba13d9b80111c7034c50106b3344ecc14cc515`
来源:[`packages/llm/llm/src/types.ts:458`](../packages/llm/llm/src/types.ts)
来源:[`packages/llm/llm/src/types.ts:474`](../packages/llm/llm/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -0,0 +1,28 @@
# Bilingual-pair consistency record for 2026-09-30-job-session-lifecycle.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/persistence-changes/2026-09-30-job-session-lifecycle.md
/:
en: 3d5a424ae7d7e46b
zh: c22a8e4a62d8cc1a
/2026-09-30-job-session-lifecycle:
en: 9be8dc8cb5ce646a
zh: 6ce0040813c36e92
/2026-09-30-job-session-lifecycle/summary:
en: 7d98020db3395e2e
zh: abe692ef42327e49
/2026-09-30-job-session-lifecycle/table-of-contents:
en: 6cf314a069ceb451
zh: 9adff678e9ecab3b
/2026-09-30-job-session-lifecycle/declaration:
en: 6907136f28e48c90
zh: 02f8298485f3d8e7
/2026-09-30-job-session-lifecycle/compatibility:
en: 546fe003ad5293b6
zh: 86d78c9704a03718
/2026-09-30-job-session-lifecycle/verification:
en: e9660a31a43378fc
zh: e97fbe31ff47ea2e
/2026-09-30-job-session-lifecycle/dev-note:
en: b75c8458928b72b9
zh: 003ba4e17b4b5269
@@ -0,0 +1,52 @@
---
description: "Records a persistence type transition and its compatibility acknowledgement."
kind: persistence-change
---
# 2026-09-30-job-session-lifecycle
English | [中文](2026-09-30-job-session-lifecycle.zh.md)
## Summary
Records owned job registration and settlement with one unique JobId, original timestamps, creating tool calls, and producer completion reports.
## Table of Contents
- [Declaration](#declaration)
- [Compatibility](#compatibility)
- [Verification](#verification)
- [Dev Note](#dev-note)
<a id="declaration"></a>
## Declaration
```yaml persistence-change
schemaVersion: 1
id: 2026-09-30-job-session-lifecycle
baseline: false
changes:
- root: "event:job/registered"
previous: null
after: "f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1"
decision: same-version
- root: "event:job/settled"
previous: null
after: "edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf"
decision: same-version
```
<a id="compatibility"></a>
## Compatibility
Adds required job event kinds without changing the Session envelope. New JobIds use a kind-prefixed UUID for both live controls and durable pairing; historical sessions receive no fabricated job history. Older builds reject unknown required events. producerReported describes completion-promise fulfillment, not verified resource release.
<a id="verification"></a>
## Verification
Registry and snapshot-normalizer tests cover causal order and unique JobIds. CLI and SDK snapshots verify registration, settlement, and notices during execution; the [job lifecycle contract](../subsystems/jobs.md#session-lifecycle-records) allows incomplete terminal history during application teardown.
<a id="dev-note"></a>
## Dev Note
None.
@@ -0,0 +1,297 @@
{
"formatVersion": 2,
"roots": [
{
"key": "event:job/registered",
"kind": "event",
"event": "job/registered",
"surface": false,
"digest": "f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1",
"schema": {
"root": 0,
"nodes": [
{
"kind": "object",
"properties": [
{
"name": "data",
"type": 1,
"optional": false
},
{
"name": "ignorable",
"type": 5,
"optional": true
},
{
"name": "seq",
"type": 3,
"optional": false
},
{
"name": "time",
"type": 3,
"optional": false
},
{
"name": "type",
"type": 6,
"optional": false
}
],
"indices": []
},
{
"kind": "object",
"properties": [
{
"name": "jobId",
"type": 2,
"optional": false
},
{
"name": "kind",
"type": 2,
"optional": false
},
{
"name": "label",
"type": 2,
"optional": false
},
{
"name": "owner",
"type": 2,
"optional": false
},
{
"name": "startedAt",
"type": 3,
"optional": false
},
{
"name": "toolCall",
"type": 4,
"optional": true
}
],
"indices": []
},
{
"kind": "primitive",
"type": "string"
},
{
"kind": "primitive",
"type": "number"
},
{
"kind": "object",
"properties": [
{
"name": "callId",
"type": 2,
"optional": false
},
{
"name": "rootCallId",
"type": 2,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": true
},
{
"kind": "literal",
"value": "job/registered"
}
]
}
},
{
"key": "event:job/settled",
"kind": "event",
"event": "job/settled",
"surface": false,
"digest": "edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf",
"schema": {
"root": 0,
"nodes": [
{
"kind": "object",
"properties": [
{
"name": "data",
"type": 1,
"optional": false
},
{
"name": "ignorable",
"type": 14,
"optional": true
},
{
"name": "seq",
"type": 7,
"optional": false
},
{
"name": "time",
"type": 7,
"optional": false
},
{
"name": "type",
"type": 15,
"optional": false
}
],
"indices": []
},
{
"kind": "object",
"properties": [
{
"name": "cause",
"type": 2,
"optional": false
},
{
"name": "detail",
"type": 6,
"optional": true
},
{
"name": "finishedAt",
"type": 7,
"optional": false
},
{
"name": "jobId",
"type": 6,
"optional": false
},
{
"name": "kind",
"type": 6,
"optional": false
},
{
"name": "label",
"type": 6,
"optional": false
},
{
"name": "owner",
"type": 6,
"optional": false
},
{
"name": "producerReported",
"type": 8,
"optional": false
},
{
"name": "startedAt",
"type": 7,
"optional": false
},
{
"name": "status",
"type": 9,
"optional": false
},
{
"name": "toolCall",
"type": 13,
"optional": true
}
],
"indices": []
},
{
"kind": "union",
"types": [
3,
4,
5
]
},
{
"kind": "literal",
"value": "producer"
},
{
"kind": "literal",
"value": "teardown"
},
{
"kind": "literal",
"value": "kill"
},
{
"kind": "primitive",
"type": "string"
},
{
"kind": "primitive",
"type": "number"
},
{
"kind": "primitive",
"type": "boolean"
},
{
"kind": "union",
"types": [
10,
11,
12
]
},
{
"kind": "literal",
"value": "completed"
},
{
"kind": "literal",
"value": "failed"
},
{
"kind": "literal",
"value": "killed"
},
{
"kind": "object",
"properties": [
{
"name": "callId",
"type": 6,
"optional": false
},
{
"name": "rootCallId",
"type": 6,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": true
},
{
"kind": "literal",
"value": "job/settled"
}
]
}
}
],
"types": []
}
@@ -0,0 +1,52 @@
---
description: "记录持久化类型更改及其兼容性确认。"
kind: persistence-change
---
# 2026-09-30-job-session-lifecycle
[English](2026-09-30-job-session-lifecycle.md) | 中文
## 概述
以唯一 JobId 将有所有者 job 的注册与结算记录为 Session 事件,包含原始时间戳、创建工具调用和生产方完成报告。
## 目录
- [声明](#declaration)
- [兼容性](#compatibility)
- [验证](#verification)
- [开发备注](#dev-note)
<a id="declaration"></a>
## 声明
```yaml persistence-change
schemaVersion: 1
id: 2026-09-30-job-session-lifecycle
baseline: false
changes:
- root: "event:job/registered"
previous: null
after: "f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1"
decision: same-version
- root: "event:job/settled"
previous: null
after: "edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf"
decision: same-version
```
<a id="compatibility"></a>
## 兼容性
增加必需的 job 事件类型,不改变 Session 封装。新 JobId 用带 kind 前缀的 UUID 同时进行运行期控制与持久化配对;不为历史会话补造 job 事件。旧构建拒绝未知的必需事件。producerReported 表示完成 promise 兑现,不确认资源已释放。
<a id="verification"></a>
## 验证
注册表和快照归一化测试覆盖因果顺序与唯一 JobId。CLI 和 SDK 快照验证运行中的注册、结算和通知;[job 生命周期约定](../subsystems/jobs.zh.md#session-lifecycle-records)允许应用销毁时留下不完整的终态历史。
<a id="dev-note"></a>
## 开发备注
无。
@@ -15,8 +15,8 @@
en: 14c57f30e676f6e3
zh: b1a0ccf26fab3727
/session-persistence-formats/format-references:
en: 553fd4963cf19abe
zh: 7ca3cd5d0a88d35a
en: 73b4caa341293dda
zh: 305a83174f20c790
/session-persistence-formats/scope-and-evidence:
en: b220062139ddac1e
zh: 7c4c0efe05dafa9c
@@ -32,7 +32,7 @@ The index is generated from validated snapshots and the current writer constant.
| 1 | PR #3349 | [V1](v1.md) | [JSON](v1.schema.json) | 54 / 415 |
| 2 | `dsh-v0.1.3-alpha.2` | [V2](v2.md) | [JSON](v2.schema.json) | 56 / 435 |
| 3 | PR #4320 | [V3](v3.md) | [JSON](v3.schema.json) | 60 / 467 |
| 4 | Current checkout | [Current catalog](../../persistence-catalog.md) | [JSON](../../persistence-schema.json) | 63 / 597 |
| 4 | Current checkout | [Current catalog](../../persistence-catalog.md) | [JSON](../../persistence-schema.json) | 65 / 610 |
<!-- persistence-format-index:end -->
@@ -32,7 +32,7 @@ description: "查找从 V0 到工作区写入器版本的每个 Session 格式
| 1 | PR #3349 | [V1](v1.zh.md) | [JSON](v1.schema.json) | 54 / 415 |
| 2 | `dsh-v0.1.3-alpha.2` | [V2](v2.zh.md) | [JSON](v2.schema.json) | 56 / 435 |
| 3 | PR #4320 | [V3](v3.zh.md) | [JSON](v3.schema.json) | 60 / 467 |
| 4 | 当前工作树 | [当前目录](../../persistence-catalog.zh.md) | [JSON](../../persistence-schema.json) | 63 / 597 |
| 4 | 当前工作树 | [当前目录](../../persistence-catalog.zh.md) | [JSON](../../persistence-schema.json) | 65 / 610 |
<!-- persistence-format-index:end -->
+385 -11
View File
@@ -10339,6 +10339,297 @@
]
}
},
{
"key": "event:job/registered",
"kind": "event",
"event": "job/registered",
"surface": false,
"digest": "f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1",
"schema": {
"root": 0,
"nodes": [
{
"kind": "object",
"properties": [
{
"name": "data",
"type": 1,
"optional": false
},
{
"name": "ignorable",
"type": 5,
"optional": true
},
{
"name": "seq",
"type": 3,
"optional": false
},
{
"name": "time",
"type": 3,
"optional": false
},
{
"name": "type",
"type": 6,
"optional": false
}
],
"indices": []
},
{
"kind": "object",
"properties": [
{
"name": "jobId",
"type": 2,
"optional": false
},
{
"name": "kind",
"type": 2,
"optional": false
},
{
"name": "label",
"type": 2,
"optional": false
},
{
"name": "owner",
"type": 2,
"optional": false
},
{
"name": "startedAt",
"type": 3,
"optional": false
},
{
"name": "toolCall",
"type": 4,
"optional": true
}
],
"indices": []
},
{
"kind": "primitive",
"type": "string"
},
{
"kind": "primitive",
"type": "number"
},
{
"kind": "object",
"properties": [
{
"name": "callId",
"type": 2,
"optional": false
},
{
"name": "rootCallId",
"type": 2,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": true
},
{
"kind": "literal",
"value": "job/registered"
}
]
}
},
{
"key": "event:job/settled",
"kind": "event",
"event": "job/settled",
"surface": false,
"digest": "edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf",
"schema": {
"root": 0,
"nodes": [
{
"kind": "object",
"properties": [
{
"name": "data",
"type": 1,
"optional": false
},
{
"name": "ignorable",
"type": 14,
"optional": true
},
{
"name": "seq",
"type": 7,
"optional": false
},
{
"name": "time",
"type": 7,
"optional": false
},
{
"name": "type",
"type": 15,
"optional": false
}
],
"indices": []
},
{
"kind": "object",
"properties": [
{
"name": "cause",
"type": 2,
"optional": false
},
{
"name": "detail",
"type": 6,
"optional": true
},
{
"name": "finishedAt",
"type": 7,
"optional": false
},
{
"name": "jobId",
"type": 6,
"optional": false
},
{
"name": "kind",
"type": 6,
"optional": false
},
{
"name": "label",
"type": 6,
"optional": false
},
{
"name": "owner",
"type": 6,
"optional": false
},
{
"name": "producerReported",
"type": 8,
"optional": false
},
{
"name": "startedAt",
"type": 7,
"optional": false
},
{
"name": "status",
"type": 9,
"optional": false
},
{
"name": "toolCall",
"type": 13,
"optional": true
}
],
"indices": []
},
{
"kind": "union",
"types": [
3,
4,
5
]
},
{
"kind": "literal",
"value": "producer"
},
{
"kind": "literal",
"value": "teardown"
},
{
"kind": "literal",
"value": "kill"
},
{
"kind": "primitive",
"type": "string"
},
{
"kind": "primitive",
"type": "number"
},
{
"kind": "primitive",
"type": "boolean"
},
{
"kind": "union",
"types": [
10,
11,
12
]
},
{
"kind": "literal",
"value": "completed"
},
{
"kind": "literal",
"value": "failed"
},
{
"kind": "literal",
"value": "killed"
},
{
"kind": "object",
"properties": [
{
"name": "callId",
"type": 6,
"optional": false
},
{
"name": "rootCallId",
"type": 6,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": true
},
{
"kind": "literal",
"value": "job/settled"
}
]
}
},
{
"key": "event:llm/retry",
"kind": "event",
@@ -22131,7 +22422,7 @@
"packages/llm/llm/src/types.ts#ReplayEnvelope"
],
"sources": [
"packages/llm/llm/src/types.ts:430"
"packages/llm/llm/src/types.ts:446"
]
},
{
@@ -22567,6 +22858,11 @@
"names": [],
"sources": []
},
{
"digest": "24a8188c4d61b70a01af8cc576748765d36f132632ec55c0064f6fba482369fc",
"names": [],
"sources": []
},
{
"digest": "24b10f7cdae64928f89c49afc2eca0af9eb4a2f135e16f3416e6b8461fef1748",
"names": [],
@@ -22652,7 +22948,7 @@
"digest": "2abb711460e6238d851c30f3e4bdd87a2aa1887ee70575b3d3b7b25610673095",
"names": [],
"sources": [
"packages/llm/llm/src/types.ts:455"
"packages/llm/llm/src/types.ts:471"
]
},
{
@@ -22793,6 +23089,11 @@
"packages/core/session/src/types.ts:462"
]
},
{
"digest": "347de3380f2da308d0c74e08821f9e85559f55af4c5010795b110d00f7fc9dbd",
"names": [],
"sources": []
},
{
"digest": "34d1ab5c5df378186d6054b1a1beea9a41e41965d6f336f0bc0025c441a82e66",
"names": [],
@@ -22851,6 +23152,15 @@
"packages/feedback/message-feedback/src/types.ts:17"
]
},
{
"digest": "39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f",
"names": [
"packages/jobs/jobs/src/types.ts#JobToolCall"
],
"sources": [
"packages/jobs/jobs/src/types.ts:16"
]
},
{
"digest": "3b04790e08b35241ffa0d38f6d7e4f8788aa921341f6c0d7574a329397c59408",
"names": [],
@@ -22889,7 +23199,7 @@
"digest": "3bec87f9e6ab3da03346f49923d3c51621debc0159df68605e543c3b2a026f90",
"names": [],
"sources": [
"packages/llm/llm/src/types.ts:453"
"packages/llm/llm/src/types.ts:469"
]
},
{
@@ -23025,7 +23335,7 @@
"packages/llm/llm/src/types.ts#StreamChunk"
],
"sources": [
"packages/llm/llm/src/types.ts:452"
"packages/llm/llm/src/types.ts:468"
]
},
{
@@ -23126,6 +23436,7 @@
"packages/goal/goal/src/types.ts#GoalId",
"packages/interaction/commands/src/brand.ts#CommandId",
"packages/interaction/user-approval/src/types.ts#ApprovalRequestId",
"packages/jobs/jobs/src/brand.ts#JobId",
"packages/llm/llm-retry/src/brand.ts#RetryId",
"packages/llm/llm/src/brand.ts#MessageId",
"packages/llm/llm/src/brand.ts#ProviderRequestId",
@@ -23151,6 +23462,7 @@
"packages/goal/goal/src/types.ts:17",
"packages/interaction/commands/src/brand.ts:31",
"packages/interaction/user-approval/src/types.ts:17",
"packages/jobs/jobs/src/brand.ts:19",
"packages/llm/llm-retry/src/brand.ts:4",
"packages/llm/llm/src/brand.ts:16",
"packages/llm/llm/src/brand.ts:31",
@@ -23397,6 +23709,11 @@
"names": [],
"sources": []
},
{
"digest": "5cb63db9fe57dc09c3a1c2b84c3edf73ff5b62960155d8436a2377a5c43ce32c",
"names": [],
"sources": []
},
{
"digest": "5cdbf342b7748d152bc987b68f58e565e5bba4b227e076e2d2120d87662e45cd",
"names": [],
@@ -23472,6 +23789,15 @@
"names": [],
"sources": []
},
{
"digest": "611d82d2dc50df706cf08a0fc04bc8eaf78083391fe6f10313de943e615dd2da",
"names": [
"packages/jobs/jobs/src/types.ts#JobSettledData"
],
"sources": [
"packages/jobs/jobs/src/types.ts:40"
]
},
{
"digest": "616f93a5047de668e1c30d57b1786abd76beeb4123599637ec1dc5290320ede5",
"names": [],
@@ -23525,7 +23851,7 @@
"packages/llm/llm/src/types.ts#ToolSchema"
],
"sources": [
"packages/llm/llm/src/types.ts:473"
"packages/llm/llm/src/types.ts:489"
]
},
{
@@ -23640,6 +23966,11 @@
"names": [],
"sources": []
},
{
"digest": "6cf082d0fb6034dea61636787ff0ddf43b6e59aad71e644435a479bc9b83ad65",
"names": [],
"sources": []
},
{
"digest": "6e52dd55a1d48954ed5464ec46fe34d9eb65f709baabc9561e7a279910b0c406",
"names": [],
@@ -23731,6 +24062,15 @@
"names": [],
"sources": []
},
{
"digest": "750a2b129d67704df675c06823c20c80b65cbae89d5aaa914fd5a72e3df395b5",
"names": [
"packages/jobs/jobs/src/types.ts#JobSettleCause"
],
"sources": [
"packages/jobs/jobs/src/types.ts:247"
]
},
{
"digest": "7554565be416b0342053ee6a46256c9dab07c487349b4a5f10bab1edc151c619",
"names": [],
@@ -24035,7 +24375,7 @@
"digest": "88a610b831be6d92612a464be5c7d0b88ec24d97bd299837bf74bf7672183c9a",
"names": [],
"sources": [
"packages/llm/llm/src/types.ts:456"
"packages/llm/llm/src/types.ts:472"
]
},
{
@@ -24202,7 +24542,7 @@
"digest": "95080295115fbd83544520ba247b68a03790131f6a2eac323d388758cb542f65",
"names": [],
"sources": [
"packages/llm/llm/src/types.ts:454"
"packages/llm/llm/src/types.ts:470"
]
},
{
@@ -24390,7 +24730,7 @@
"digest": "a2b49331716ba0a7078b026d145306a70eae64b7313c3e6204bd931e75ec3bb1",
"names": [],
"sources": [
"packages/llm/llm/src/types.ts:459"
"packages/llm/llm/src/types.ts:475"
]
},
{
@@ -24851,6 +25191,11 @@
"names": [],
"sources": []
},
{
"digest": "bab68657940075483f086fffb711682a45bcc99c43d659fbe1c36af21ac05dd7",
"names": [],
"sources": []
},
{
"digest": "babf9ee4d1af62bf6c3a8103737f7a5e4e78ce179be835ce05a38803e15884b7",
"names": [],
@@ -24939,6 +25284,11 @@
"packages/workflow/workflow/src/types.ts:110"
]
},
{
"digest": "c2f49004d9ae38a964e80850c87bc6849d6a872091a1d43e99eedf00c641e2a3",
"names": [],
"sources": []
},
{
"digest": "c43b119ce579b3e9983a0d3adc4ba402ebb9ba773d89738a2dab01ecf5813943",
"names": [],
@@ -25076,7 +25426,7 @@
"digest": "d4b739491689cc6bb13d07ffac1a32239875abda364c0d5edd8f74faf5e9c00d",
"names": [],
"sources": [
"packages/llm/llm/src/types.ts:457"
"packages/llm/llm/src/types.ts:473"
]
},
{
@@ -25250,6 +25600,15 @@
"names": [],
"sources": []
},
{
"digest": "e3056e0dda3a379e895386e368c3ce42131460ea65e410e1d091cca98a347305",
"names": [
"packages/jobs/jobs/src/types.ts#JobRegisteredData"
],
"sources": [
"packages/jobs/jobs/src/types.ts:24"
]
},
{
"digest": "e308ccf867a5398e316e0af8cb6ce238a8d33a63b9b384c8250a686786285f72",
"names": [],
@@ -25391,6 +25750,11 @@
"names": [],
"sources": []
},
{
"digest": "edd37b1e4974af648633014435572089b1e8fb71910468a0767a7e28fdd22abf",
"names": [],
"sources": []
},
{
"digest": "ee577a0cc18664c9daee50e9455153321155604f8f1817362f8f4a4b6fb9e1ad",
"names": [],
@@ -25418,6 +25782,11 @@
"packages/core/session/src/types.ts:301"
]
},
{
"digest": "ef226a90ddac6cd8e631a3a337a3a3e27f9494be92befb7c718b404681d75e21",
"names": [],
"sources": []
},
{
"digest": "ef4f00923b9edbae15c7ef05320280bf61147ca17146cf59690359bfd5e5da45",
"names": [],
@@ -25464,7 +25833,7 @@
"digest": "f1a96afe7503ac1817de769cd0ba13d9b80111c7034c50106b3344ecc14cc515",
"names": [],
"sources": [
"packages/llm/llm/src/types.ts:458"
"packages/llm/llm/src/types.ts:474"
]
},
{
@@ -25492,7 +25861,7 @@
"packages/llm/llm/src/types.ts#SystemPromptUpdate"
],
"sources": [
"packages/llm/llm/src/types.ts:396"
"packages/llm/llm/src/types.ts:412"
]
},
{
@@ -25500,6 +25869,11 @@
"names": [],
"sources": []
},
{
"digest": "f5520c1d261ca86ea03735799c311a0a9ede8babb588cf0a65422576d2ee0ad1",
"names": [],
"sources": []
},
{
"digest": "f56c5b59ca0161310c338d31dd16cf14287ccd602ff4181058df178c1c286d7f",
"names": [
+2 -2
View File
@@ -18,8 +18,8 @@
en: c216e2df128b8cb9
zh: c039cf84b0d86ad8
/conversation-assembly/definition-and-typed-chat-payload:
en: 5f24557a050d1df0
zh: 47735627f802b6fa
en: d8f5e4773704c718
zh: f3db8c0d01080dba
/conversation-assembly/predecessor-reads:
en: da849b3b5da81da8
zh: 37a647a439bc24b1
+14
View File
@@ -247,10 +247,24 @@ export function apply(ctx: ClientContext): void {
`ConversationNodeDefinitionInput` accepts either this function or a read-only table from event type to matching function. Function-form registrations receive every event; table registrations receive only their listed types. The Registry copies table entries and precomputes ordered candidate Sets when registrations change, keeping candidate construction out of per-event dispatch. Replace a table by unregistering and registering again. Resolved `ConversationNodeDefinition` values retain a callable `match(event)` in both cases.
A match result with `exclusive: true` claims that event on the Definition's target. The assembler evaluates every match of the event before accepting any, so the outcome is independent of registration order: other Definitions of the claimed target build no Context for the event, and the target's unmatched-event fallback does not run. Definitions of other targets and Definitions without a target still receive it. Two claims on one target, or a claim from a Definition without a target, throw during dispatch; a claim returned by the fallback itself has no effect. A business Definition uses a claim to present one kind of message that a generic Definition of the same target would otherwise also present, such as a late question reply.
`buildLocationData(context, scope)` optionally publishes Definition-owned data onto an engine-owned Turn or Step. Use declaration merging to give each key a precise value type. Another Node in the same Location can consume that value through its constrained slot hook, such as `useTurnData(key)`, without receiving the Session or scanning `snapshot.chat.nodes`.
`target` and `buildViewNode(context)` declare one target-owned rendering contribution and must appear together. Preserve `context.key` as the React-facing identity, choose `anchorSeq` from the matched event ordering, and return only renderer-ready data. Once a target Node has been published, keep returning the same key; use `visibility: 'hidden'` when it must temporarily leave the visible flow rather than withdrawing it with `null`.
A Chat Node also chooses where its row stands through `groupTree`. Positions are ordered from the outermost inward, and a Node at a position also has the effect of every inner one. Chat process grouping, whole-Turn folding, and Turn-input detection read only this position; [group-tree.ts](../../packages/client/ui-chat/src/client/contract/group-tree.ts) holds the complete contract.
| The Node is | Declare |
|---|---|
| A person's input claimed in Step 1; its Turn opens an exchange | `exchange` |
| Another input of its Turn, such as later human input or a trigger notice; before the process it is the opening input, after it the whole Turn stays open | `input` |
| A Turn notice that stays outside whole-Turn folding, such as an error or the completed-turn footer | `turn` |
| An independent row that whole-Turn folding still hides, such as a model retry | `process` |
| Ordinary process content that joins the surrounding step run | omit `groupTree` |
The [Chat business rules](../../packages/client/ui-chat/src/client/conversation-nodes/README.md#process-grouping) list the positions the built-in Nodes declare. When a generic Definition of the same target also matches the event your Node presents, claim the event with `exclusive: true` as described above.
## Predecessor reads
Some Definitions need the latest earlier State of another business kind. `start` receives a `ConversationContextReader`; call `reader.previous<State>(kind)` there instead of accepting a Context collection or scanning events. The reader returns the nearest started Context before the current start `seq` as read-only data.
+14
View File
@@ -249,10 +249,24 @@ export function apply(ctx: ClientContext): void {
`ConversationNodeDefinitionInput` 接受上述函数,或事件类型到匹配函数的只读表。函数形式的注册接收所有事件;表形式只接收列出的类型。Registry 在注册关系变化时复制表条目并预计算有序候选 Set,不在逐事件分发时构造候选集合。替换表时先注销,再重新注册。两种形式解析后的 `ConversationNodeDefinition` 都保留可调用的 `match(event)`。
match 结果带 `exclusive: true` 时,即在该 Definition 的 target 上认领这个事件。Assembler 先求出该事件的全部 match,再逐个接收,因此结果与注册顺序无关:被认领 target 上的其他 Definition 不为该事件建立 Context,该 target 的未匹配事件 fallback 也不运行;其他 target 的 Definition 与没有 target 的 Definition 照常接收。同一 target 被认领两次,或没有 target 的 Definition 发起认领,都会在分发时抛错;fallback 自身返回的认领不起作用。业务 Definition 用认领来呈现某一类消息,而同一 target 上的通用 Definition 原本也会呈现它,例如迟到的问题回答。
`buildLocationData(context, scope)` 可以把 Definition 拥有的数据发布到引擎拥有的 Turn 或 Step 上。通过 declaration merging 为每个 key 指定精确 value 类型。同一 Location 内的另一个 Node 可以使用受限 slot hook(例如 `useTurnData(key)`)读取该值,无须取得 Session,也无须扫描 `snapshot.chat.nodes`。
`target` 与 `buildViewNode(context)` 必须同时声明一项由 target 拥有的渲染贡献。把 `context.key` 保留为 React 侧身份,根据持久排序证据选择 `anchorSeq`,并且只返回 renderer 可以直接使用的数据。某个 target Node 一旦发布,就要继续返回同一个 key;需要暂时离开可见流时使用 `visibility: 'hidden'`,不要改为返回 `null` 撤回它。
Chat Node 还通过 `groupTree` 选择所在行的位置。位置由外到内排列,站在某个位置的 Node 同时具有所有内层位置的效果。Chat 的过程分组、整轮折叠和轮次输入判断只读取这个位置;完整契约见 [group-tree.ts](../../packages/client/ui-chat/src/client/contract/group-tree.ts)。
| Node 是 | 声明 |
|---|---|
| Step 1 认领的人的输入,所在轮次开启一个交互段 | `exchange` |
| 所在轮次的其他输入,如之后的人的输入或触发通知;位于过程之前时是开场输入,之后出现时整个轮次保持展开 | `input` |
| 留在整轮折叠之外的轮次通知,如错误或已完成轮次页脚 | `turn` |
| 整轮折叠仍会隐藏的独立行,如模型重试 | `process` |
| 并入相邻步骤组的普通过程内容 | 不声明 `groupTree` |
各内置 Node 声明的位置见 [Chat 业务规则](../../packages/client/ui-chat/src/client/conversation-nodes/README.zh.md#process-grouping)。如果同一 target 的通用 Definition 也会匹配你的 Node 所呈现的事件,按上文用 `exclusive: true` 认领该事件。
## Predecessor read
有些 Definition 需要另一个业务 kind 在当前位置之前的最新 State。`start` 会收到 `ConversationContextReader`;应在这里调用 `reader.previous<State>(kind)`,不要接收 Context 集合或扫描事件。Reader 返回当前 start `seq` 之前最近一个已启动 Context 的只读数据。
+4 -4
View File
@@ -6,14 +6,14 @@
en: 4589c745baf092c7
zh: 3a782e6a06825201
/user-credentials/identity:
en: aba5a25c34e229cc
zh: 96493f925f60b533
en: 0083032b9d19467d
zh: 15d7a7520bac094e
/user-credentials/resolution:
en: baaab4bca76bea6b
zh: 54ccdc03ffd44f63
/user-credentials/description:
en: 17573160805d3014
zh: 36a058a96f45df23
en: f7b09588c0f34952
zh: 1b93d673c5bf6a80
/user-credentials/change-commits:
en: 464315a953330eb2
zh: d9815591f3abc2cb
+8 -8
View File
@@ -15,6 +15,7 @@ A reference names one credential as a POSIX-style environment-variable name. The
type CredentialRef = Branded<'CredentialRef'>
```
<a id="resolution"></a>
## Resolution
`resolve(ref)` returns the value with the provider-defined source layer that supplied it, or `undefined` while unconfigured. Consumers re-resolve at each operation and never cache across operations — that per-operation read is the hot-update mechanism.
@@ -31,7 +32,7 @@ interface ResolvedCredential {
## Description
`describe(ref)` answers configuration surfaces without ever exposing a value: whether the reference resolves, from which layer, and whether `set` would currently succeed. The local provider reports a reference supplied by the live process environment as `writable: false` — a write would appear to succeed while resolution kept returning the shadowing value, so the seam rejects it and the UI can render the reference read-only up front.
`describe(ref)` answers configuration surfaces without ever exposing a value: whether the reference resolves, from which layer, and whether `set` would currently succeed. The local provider ranks its managed file above the launch environment, so saving a value always creates the effective writable layer; removing it reveals the launch environment or `.env` fallback again.
```ts type-equiv
/**
@@ -136,7 +137,7 @@ Source: [`packages/credentials/authorization/src/index.ts`](../../packages/crede
Abstract credential service over two key spaces that answer two questions.
A CredentialRef answers "what is behind this environment-variable name", layered over the process environment, the provider-managed store, and `.env` files. One seam-wide rule binds that half: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
A CredentialRef answers "what is behind this environment-variable name": the provider-managed store first, then ambient fallbacks such as the process environment and `.env` files. One seam-wide rule binds that half: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
A CredentialKey answers "what credential does this plugin hold for this id". Nothing can layer here — an authorization grant has no environment to be read from — so presence of the record is the whole fact, and modifyRecord is the only write path because a correct write depends on the current value (a token refresh is read-decide-replace under one lock).
@@ -160,10 +161,9 @@ abstract resolve(ref: CredentialRef): Promise<ResolvedCredential | undefined>
abstract describe(ref: CredentialRef): Promise<CredentialInfo>
/**
* Durably store one value in the provider-managed writable source. Rejects
* while a read-only source shadows the reference — the write would appear
* to succeed while resolution keeps returning the shadowing value — and
* rejects an empty value (use {@link unset}).
* Durably store one value in the provider-managed writable source. The stored
* value takes precedence over ambient fallbacks, and empty values are
* rejected (use {@link unset}).
* @param ref - the reference to store.
* @param value - the non-empty secret value.
*/
@@ -171,8 +171,8 @@ abstract set(ref: CredentialRef, value: string): Promise<void>
/**
* Remove one reference from the provider-managed writable source; removing
* an absent reference is a no-op. Rejects while a read-only source shadows
* the reference, like {@link set}.
* an absent reference is a no-op. Ambient fallback layers may become
* effective again after removal.
* @param ref - the reference to remove.
*/
abstract unset(ref: CredentialRef): Promise<void>
+8 -8
View File
@@ -15,6 +15,7 @@
type CredentialRef = Branded<'CredentialRef'>
```
<a id="resolution"></a>
## 解析
`resolve(ref)` 返回值及提供该值的来源层(由提供方定义);未配置期间返回 `undefined`。消费方在每个操作中重新解析,绝不跨操作缓存——这种按操作进行的读取正是热更新机制。
@@ -31,7 +32,7 @@ interface ResolvedCredential {
## 描述
`describe(ref)` 在绝不暴露值的前提下回应配置界面:引用当前是否可解析、来自哪一层、`set` 当前能否成功。本地提供方把由当前进程环境供值的引用报告为 `writable: false`——那样的写入会表面成功而解析持续返回遮蔽值,因此 seam 直接拒绝,界面也得以提前把该引用渲染为只读。
`describe(ref)` 在绝不暴露值的前提下回应配置界面:引用当前是否可解析、来自哪一层、`set` 当前能否成功。本地提供方将其管理的文件排在启动环境之前,因此保存值总会成为生效且可写的那一层;移除后会重新使用启动环境或 `.env` 后备值。
```ts type-equiv
/**
@@ -136,7 +137,7 @@ Source: [`packages/credentials/authorization/src/index.ts`](../../packages/crede
Abstract credential service over two key spaces that answer two questions.
A CredentialRef answers "what is behind this environment-variable name", layered over the process environment, the provider-managed store, and `.env` files. One seam-wide rule binds that half: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
A CredentialRef answers "what is behind this environment-variable name": the provider-managed store first, then ambient fallbacks such as the process environment and `.env` files. One seam-wide rule binds that half: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
A CredentialKey answers "what credential does this plugin hold for this id". Nothing can layer here — an authorization grant has no environment to be read from — so presence of the record is the whole fact, and modifyRecord is the only write path because a correct write depends on the current value (a token refresh is read-decide-replace under one lock).
@@ -160,10 +161,9 @@ abstract resolve(ref: CredentialRef): Promise<ResolvedCredential | undefined>
abstract describe(ref: CredentialRef): Promise<CredentialInfo>
/**
* Durably store one value in the provider-managed writable source. Rejects
* while a read-only source shadows the reference — the write would appear
* to succeed while resolution keeps returning the shadowing value — and
* rejects an empty value (use {@link unset}).
* Durably store one value in the provider-managed writable source. The stored
* value takes precedence over ambient fallbacks, and empty values are
* rejected (use {@link unset}).
* @param ref - the reference to store.
* @param value - the non-empty secret value.
*/
@@ -171,8 +171,8 @@ abstract set(ref: CredentialRef, value: string): Promise<void>
/**
* Remove one reference from the provider-managed writable source; removing
* an absent reference is a no-op. Rejects while a read-only source shadows
* the reference, like {@link set}.
* an absent reference is a no-op. Ambient fallback layers may become
* effective again after removal.
* @param ref - the reference to remove.
*/
abstract unset(ref: CredentialRef): Promise<void>
+5 -2
View File
@@ -6,8 +6,11 @@
en: dd515d8548864a91
zh: 16a117d39989a373
/background-job-runtime/ids-and-status:
en: 529f401da4757a98
zh: 041ff5e86b5dd8db
en: 4b286c70e4a83b99
zh: 7edbf090e9cb6487
/background-job-runtime/session-lifecycle-records:
en: 5fb99886e0ab2718
zh: bdea51368c935895
/background-job-runtime/producer-contract:
en: af0be338a0ba5e60
zh: fc0eefb8c31f3a98
+60 -4
View File
@@ -6,7 +6,7 @@ Types shared by long-running producers, `ctx.jobs`, and job controls. The [seam
## Ids and status
`JobId` is a [branded id](core.md#branded-ids) generated as `<kind>-N`. Access control relies on owner authorization, not id secrecy. `JobKind` derives from a merge-extensible map; the registry treats kinds as opaque id namespaces.
`JobId` is a [branded id](core.md#branded-ids) generated as `<kind>-<short-uuid>` with 16 lowercase UUID hex characters after the kind. Access control relies on owner authorization, not id secrecy. `JobKind` derives from a merge-extensible map; the registry treats kinds as opaque id namespaces.
```ts type-equiv
/**
@@ -20,10 +20,64 @@ interface JobKindMap {
`JobStatus` is `'running' | 'stopping' | 'completed' | 'killed' | 'failed'`; producer-specific facts belong in `JobView.progress` while the job runs and in `JobView.detail` once it settled.
<a id="session-lifecycle-records"></a>
## Session lifecycle records
Owned jobs publish `job/registered` and `job/settled` in their original owner Session. The globally unique `jobId` pairs those records and controls the live job. The SDK forwards these log-only records through `session.event`, independently of output reads. Timestamps describe registry commits, not CPU time or exact OS process boundaries; a missing settlement remains incomplete. `producerReported` means the producer fulfilled `done` with a terminal outcome; it is false for forced teardown or rejection and does not independently certify resource release.
`job/settled` may follow `turn/end`. An SDK run result covers only its own observation window; consumers needing later settlements retain a Session subscription or read persisted history. Turn completion does not imply that every owned job stopped.
Application teardown can stop Session event routing or close its writer before an owned job's final settlement reaches storage. This includes normal one-shot completion and signal shutdown, as well as hard process loss. A missing `job/settled` remains incomplete even if the live registry reported termination; consumers must not invent a finish timestamp.
```ts type-equiv
/** Durable identity and registration time of one owned job execution. */
interface JobRegisteredData {
/** Unique execution id accepted by job controls and retained in Session history. */
readonly jobId: JobId
/** Original owner; copied history does not transfer execution ownership. */
readonly owner: SessionId
/** Producer kind. */
readonly kind: string
/** Producer-supplied label. */
readonly label: string
/** Unix epoch milliseconds when registration committed. */
readonly startedAt: number
/** Creating tool invocation, when the producer was called through a tool. */
readonly toolCall?: JobToolCall
}
```
```ts type-equiv
/** Registry settlement, including whether the producer reported a terminal outcome. */
interface JobSettledData extends JobRegisteredData {
/** Unix epoch milliseconds when the registry committed the terminal record. */
readonly finishedAt: number
/** Recorded terminal outcome. */
readonly status: JobOutcome['status']
/** Source of the termination request, or producer completion. */
readonly cause: JobSettleCause
/** True when done fulfilled; false for rejection or forced failure. Does not certify resource release. */
readonly producerReported: boolean
/** Terminal reason, including a recorded kill reason when applicable. */
readonly detail?: string
}
```
## Producer contract
A `JobSpec` declares identity, the owning session, optional pull `output` sources, and a starter. The runtime finishes preflight before calling `run()` with the job's `JobHandle` and commits without a later failable step. Producers own execution resources; the runtime owns identity, access, lifecycle state, and the output ring.
```ts type-equiv
/** Tool dispatch that created a job; nested calls retain their root invocation. */
interface JobToolCall {
/** Exact invocation, including a PTC sub-call when applicable. */
readonly callId: SessionEventMap['tool/call']['callId']
/** Root model-requested invocation owning this execution. */
readonly rootCallId: SessionEventMap['tool/call']['callId']
}
```
```ts type-equiv
/**
* Producer declaration passed to {@link JobRegistry.start}. The runtime
@@ -43,6 +97,8 @@ interface JobSpec {
* caller until service disposal.
*/
owner?: SessionId
/** Creating tool invocation, retained in the durable lifecycle records. */
toolCall?: JobToolCall
/**
* Optional UTF-8 byte cap for each complete model-facing completion notice or
* output read, including controller status metadata. Independent of ring
@@ -76,7 +132,7 @@ interface JobSpec {
* throwing, so a producer's trailing flush cannot break its own teardown path.
*/
interface JobHandle {
/** The registry-issued id (`<kind>-N`). */
/** The registry-issued id (`<kind>-<short-uuid>`). */
readonly id: JobId
/**
* Append one chunk to the output ring. Offsets advance by the chunk's UTF-8
@@ -219,7 +275,7 @@ interface JobOutputRead {
* stream all consume this one shape.
*/
interface JobView {
/** The registry-issued id (`<kind>-N`). */
/** The registry-issued id (`<kind>-<short-uuid>`). */
readonly id: JobId
/**
* The producer kind the job was registered with: a Host-registered
@@ -405,7 +461,7 @@ Implementations must honor these semantics:
* rejection leaves no job id or execution resource. A throwing starter
* leaves nothing registered; after it returns, registration cannot fail.
* @param spec - job identity, owner, output sources, and synchronous starter.
* @returns the registry-issued `<kind>-N` id.
* @returns the registry-issued `<kind>-<short-uuid>` id.
*/
abstract start(spec: JobSpec): JobId
+60 -4
View File
@@ -6,7 +6,7 @@
## ID 与状态
`JobId` 是按 `<kind>-N` 生成的[品牌化 id](core.zh.md#branded-ids)。访问控制依赖拥有者授权,而非 id 的保密性。`JobKind` 派生自可合并扩展的 map;注册表将各个 kind 视为不透明的 id 命名空间。
`JobId` 是按 `<kind>-<short-uuid>` 生成的[品牌化 id](core.zh.md#branded-ids),kind 后是 UUID 的 16 位小写十六进制字符。访问控制依赖拥有者授权,而非 id 的保密性。`JobKind` 派生自可合并扩展的 map;注册表将各个 kind 视为不透明的 id 命名空间。
```ts type-equiv
/**
@@ -20,10 +20,64 @@ interface JobKindMap {
`JobStatus` 为 `'running' | 'stopping' | 'completed' | 'killed' | 'failed'`;生产方特有的事实在运行期间归入 `JobView.progress`,结算后归入 `JobView.detail`。
<a id="session-lifecycle-records"></a>
## Session 生命周期记录
有所有者的 job 在原始所有者 Session 中发布 `job/registered` 与 `job/settled`。全局唯一的 `jobId` 同时配对这两条记录并控制运行中的 job。SDK 通过 `session.event` 转发这些仅日志记录,不依赖输出读取。时间戳描述注册表提交时刻,不是 CPU 时间或精确的 OS 进程边界;缺少结算时保持不完整。`producerReported` 表示生产方通过兑现 `done` 报告了终态;强制销毁或 promise 拒绝时为 false,不独立确认资源已释放。
`job/settled` 可能出现在 `turn/end` 之后。SDK run 结果只覆盖自身观测窗口;需要较晚结算的消费方应保留 Session 订阅或读取持久化历史。轮次完成不表示所有有主 job 都已停止。
应用销毁可能在有主 job 的最后一条结算写入存储前停止 Session 事件路由或关闭写句柄。正常的一次性运行结束、信号关停和进程硬退出都可能出现这种情况。即使运行期注册表报告了终止,缺少 `job/settled` 的区间仍不完整;消费方不得虚构结束时间戳。
```ts type-equiv
/** Durable identity and registration time of one owned job execution. */
interface JobRegisteredData {
/** Unique execution id accepted by job controls and retained in Session history. */
readonly jobId: JobId
/** Original owner; copied history does not transfer execution ownership. */
readonly owner: SessionId
/** Producer kind. */
readonly kind: string
/** Producer-supplied label. */
readonly label: string
/** Unix epoch milliseconds when registration committed. */
readonly startedAt: number
/** Creating tool invocation, when the producer was called through a tool. */
readonly toolCall?: JobToolCall
}
```
```ts type-equiv
/** Registry settlement, including whether the producer reported a terminal outcome. */
interface JobSettledData extends JobRegisteredData {
/** Unix epoch milliseconds when the registry committed the terminal record. */
readonly finishedAt: number
/** Recorded terminal outcome. */
readonly status: JobOutcome['status']
/** Source of the termination request, or producer completion. */
readonly cause: JobSettleCause
/** True when done fulfilled; false for rejection or forced failure. Does not certify resource release. */
readonly producerReported: boolean
/** Terminal reason, including a recorded kill reason when applicable. */
readonly detail?: string
}
```
## 生产方约定
`JobSpec` 声明身份、拥有者会话、可选的拉取式 `output` 源与启动器。运行时会在完成预检后携带该 job 的 `JobHandle` 调用 `run()`,随后提交注册,不再执行可能失败的步骤。生产方拥有执行资源;运行时拥有身份、访问、生命周期状态与输出环。
```ts type-equiv
/** Tool dispatch that created a job; nested calls retain their root invocation. */
interface JobToolCall {
/** Exact invocation, including a PTC sub-call when applicable. */
readonly callId: SessionEventMap['tool/call']['callId']
/** Root model-requested invocation owning this execution. */
readonly rootCallId: SessionEventMap['tool/call']['callId']
}
```
```ts type-equiv
/**
* Producer declaration passed to {@link JobRegistry.start}. The runtime
@@ -43,6 +97,8 @@ interface JobSpec {
* caller until service disposal.
*/
owner?: SessionId
/** Creating tool invocation, retained in the durable lifecycle records. */
toolCall?: JobToolCall
/**
* Optional UTF-8 byte cap for each complete model-facing completion notice or
* output read, including controller status metadata. Independent of ring
@@ -76,7 +132,7 @@ interface JobSpec {
* throwing, so a producer's trailing flush cannot break its own teardown path.
*/
interface JobHandle {
/** The registry-issued id (`<kind>-N`). */
/** The registry-issued id (`<kind>-<short-uuid>`). */
readonly id: JobId
/**
* Append one chunk to the output ring. Offsets advance by the chunk's UTF-8
@@ -219,7 +275,7 @@ interface JobOutputRead {
* stream all consume this one shape.
*/
interface JobView {
/** The registry-issued id (`<kind>-N`). */
/** The registry-issued id (`<kind>-<short-uuid>`). */
readonly id: JobId
/**
* The producer kind the job was registered with: a Host-registered
@@ -405,7 +461,7 @@ Implementations must honor these semantics:
* rejection leaves no job id or execution resource. A throwing starter
* leaves nothing registered; after it returns, registration cannot fail.
* @param spec - job identity, owner, output sources, and synchronous starter.
* @returns the registry-issued `<kind>-N` id.
* @returns the registry-issued `<kind>-<short-uuid>` id.
*/
abstract start(spec: JobSpec): JobId
+2 -2
View File
@@ -36,8 +36,8 @@
en: 58dec2259b0b1c6f
zh: fc99fe965acaabf3
/llm-streaming/the-model-request:
en: 824d18f76f990711
zh: 8a2895513652e528
en: 60c661bdcfec52dd
zh: c27a46f6c99efea1
/llm-streaming/the-model-request/the-request-envelope-llmcallconfig-and-the-logged-header:
en: f2e6932e211f179b
zh: 75112586a6f3f4aa
+20
View File
@@ -498,11 +498,31 @@ interface LlmConfigurableProvider {
* from outside.
*/
declared?: boolean
/**
* Route endpoint the adapter uses when the profile sets no `baseURL`; the
* adapter may still send an individual model to that model's own endpoint.
* Absent when the route has no fixed endpoint.
*/
defaultBaseURL?: string
/** Authentication the adapter performs when the profile names no credential reference; absent when it reports none. */
nativeAuth?: LlmNativeAuth
/** Configuration diagnostic for repair; unaffected models may remain serviceable. */
error?: string
}
```
A settings editor shows `defaultBaseURL` and `nativeAuth` for a profile that leaves the endpoint or the credential reference unset. `nativeAuth` lists environment variable names, never their values.
```ts type-equiv
/** Authentication a provider route performs without a credential reference in its profile. */
interface LlmNativeAuth {
/** Environment variables the route's authentication reads, in lookup order; empty when it reads none. */
env: readonly string[]
/** Whether a stored OAuth sign-in can authenticate the route. */
oauth: boolean
}
```
```ts type-equiv
/** One adapter-discovered model; catalog membership is advisory, not request validation. */
interface LlmModelInfo {
+20
View File
@@ -504,11 +504,31 @@ interface LlmConfigurableProvider {
* from outside.
*/
declared?: boolean
/**
* Route endpoint the adapter uses when the profile sets no `baseURL`; the
* adapter may still send an individual model to that model's own endpoint.
* Absent when the route has no fixed endpoint.
*/
defaultBaseURL?: string
/** Authentication the adapter performs when the profile names no credential reference; absent when it reports none. */
nativeAuth?: LlmNativeAuth
/** Configuration diagnostic for repair; unaffected models may remain serviceable. */
error?: string
}
```
设置编辑器在提供方配置未设置端点或凭据引用时显示 `defaultBaseURL` 和 `nativeAuth`。`nativeAuth` 只列出环境变量名,不包含变量值。
```ts type-equiv
/** Authentication a provider route performs without a credential reference in its profile. */
interface LlmNativeAuth {
/** Environment variables the route's authentication reads, in lookup order; empty when it reads none. */
env: readonly string[]
/** Whether a stored OAuth sign-in can authenticate the route. */
oauth: boolean
}
```
```ts type-equiv
/** One adapter-discovered model; catalog membership is advisory, not request validation. */
interface LlmModelInfo {
+2 -2
View File
@@ -9,8 +9,8 @@
en: 485abf6107c73e68
zh: 78a274d488274035
/text-translation/failures-and-data-handling:
en: cf92a1920650888c
zh: 3e8d3aa244cc8d46
en: 436e55e924e3ad1e
zh: c8548fda1e86b078
/text-translation/persistent-translations:
en: 40d175fbe66fd4cd
zh: bff18511a8d386e9
+1 -1
View File
@@ -14,7 +14,7 @@ The service exposes its configured `maxTextChars`, measured in UTF-16 code units
`TranslationError` carries a `TranslationErrorCode` distinguishing text limits, HTTP failures, invalid responses, response limits, owned deadlines, and request failures. `TRANSLATION_SESSION_REQUIRED` rejects a missing persistence backend or Session; `TRANSLATION_SESSION_INACTIVE` rejects an uncached inactive Session before provider dispatch; `TRANSLATION_STORAGE_ERROR` rejects invalid saved records or failed durability. Provider diagnostics omit submitted text and response bodies. Failed calls do not select another provider. Responses are validated as external JSON and redirects are rejected.
`TRANSLATION_UNAVAILABLE` rejects a missing active built-in owner or registered route, unconfigured credentials, absent exact `deepseek-flash` catalog membership, an owner/model-list/official credential-reference change before dispatch, provider withdrawal, or a prepared call whose reasoning effort is not `off`. A native `finish` with reason `error` maps to `TRANSLATION_REQUEST_FAILED`; a missing or other non-`stop` finish maps to `TRANSLATION_INVALID_RESPONSE`.
`TRANSLATION_UNAVAILABLE` rejects a missing active built-in owner or registered route, unconfigured credentials, absent exact `deepseek-flash` catalog membership, an owner, model-configuration (Official `models` or Account `modelOverrides`), or Official credential-reference change before dispatch, provider withdrawal, or a prepared call whose reasoning effort is not `off`. A native `finish` with reason `error` maps to `TRANSLATION_REQUEST_FAILED`; a missing or other non-`stop` finish maps to `TRANSLATION_INVALID_RESPONSE`.
Google receives source text in a form POST body; Bing receives it in a JSON POST body. Both are remote services. Their anonymous endpoints provide no supported developer availability or quota guarantee. Regional connectivity must be verified on the user's network.
+1 -1
View File
@@ -14,7 +14,7 @@
`TranslationError` 的 `TranslationErrorCode` 区分文本超限、HTTP 失败、无效响应、响应超限、服务自身超时与请求失败。`TRANSLATION_SESSION_REQUIRED` 拒绝缺失的持久化后端或 Session,`TRANSLATION_SESSION_INACTIVE` 在调用 Provider 前拒绝未激活且缓存未命中的 Session,`TRANSLATION_STORAGE_ERROR` 拒绝无效保存记录或持久化失败。Provider 错误信息省略提交的文本与响应体。失败时不选择其他 Provider。响应作为外部 JSON 校验,重定向被拒绝。
`TRANSLATION_UNAVAILABLE` 拒绝缺失的活跃内置所有者或已注册路由、未配置的凭据、目录中不存在精确的 `deepseek-flash`、派发前所有者/模型列表/官方凭据引用变化、提供方卸载,以及准备后的调用推理强度不是 `off` 的情况。原生 `finish` 的原因为 `error` 时映射为 `TRANSLATION_REQUEST_FAILED`;缺失 finish 或其他非 `stop` 原因映射为 `TRANSLATION_INVALID_RESPONSE`。
`TRANSLATION_UNAVAILABLE` 拒绝缺失的活跃内置所有者或已注册路由、未配置的凭据、目录中不存在精确的 `deepseek-flash`、派发前所有者、模型配置(官方路由的 `models` 或账号路由的 `modelOverrides`)或官方凭据引用变化、提供方卸载,以及准备后的调用推理强度不是 `off` 的情况。原生 `finish` 的原因为 `error` 时映射为 `TRANSLATION_REQUEST_FAILED`;缺失 finish 或其他非 `stop` 原因映射为 `TRANSLATION_INVALID_RESPONSE`。
Google 在 form POST 请求体中接收原文,Bing 在 JSON POST 请求体中接收原文。两者都是远端服务。免登录端点不保证开发者 API 的可用性或免费额度。区域连通性须在用户网络上验证。
+4 -4
View File
@@ -9,8 +9,8 @@
en: 8725fa62f36364d7
zh: 0f2ff4bdf13ff55b
/typert-remote-calls/invocation-descriptors:
en: 6417ffb792fd5385
zh: c012707075a0b21f
en: 21e88d68154c2c92
zh: 8c9e05c65ef0f34d
/typert-remote-calls/typert-registry:
en: 29f578ba733cfd5a
zh: c486ff4ac2d1e3b4
@@ -18,5 +18,5 @@
en: 90fab88fe51d17bb
zh: 2d4c3849cf2dc7d3
/typert-remote-calls/consumer-remote:
en: 4836f8f44fef8fd3
zh: 51f3ab2462a08ff4
en: 324386c600a5fdf5
zh: 7963501eb663e228
+30 -6
View File
@@ -40,27 +40,31 @@ interface TypertLookupDefinition {
An `InvocationDescriptor` is local reflection, not a wire message. Host and consumer builds generate corresponding descriptors; the request sends only the endpoint and named `args`. Strict codecs carry generated schema factories, while SRC codecs enforce JSON-safe inputs without structural type recovery. Unary result codecs can supply `encode()` for byte-containing subtrees and `decode()` for recursive native-byte validation; Client declarations narrow every `Uint8Array` to `ArrayBuffer` backing. Pure JSON results need neither byte detection nor Client decoding. Cancellation is an out-of-band carrier signal injected after business parameters and never enters `args`.
`createTypertRemoteInfo` returns a lazy class instance implementing `TypertRemoteInfo`, which extends the mountable `TypertRemoteContribution`. Its `methods` index aliases the direct objects in `descriptors`: each `TypertRemoteMethod` adds named `input(options?)` and `invoke`, retains documentation on the method and its parameters, and uses `result` as its only output codec. Unary `mode` is absent; stream `mode` is `'stream'`. Context-only receivers remain in descriptors and scoped declarations. Registry queries return base descriptors; `isTypertRemoteMethod` narrows generated direct capabilities without recovering endpoint-specific generics.
`TypertSchema` guarantees parsing, not arbitrary Zod operations, although the raw factory spec requires Zod factories. Missing documentation or an unsupported optional JSON Schema projection does not invalidate an ordinary method. The info index and each input-policy view, parser, and derived projection are independently lazy and cached; no metadata or schema access invokes the network. The [protocol reference](<../../packages/typert/protocol/README.md>) defines these APIs, and the [generator reference](<../../packages/typert/generator/README.md#ordinary-remote-metadata>) defines their separate Host `./typert`, consumer `./remote`, and Client `./client/typert` artifacts.
`TypertRemoteSpec` holds a package and endpoint-keyed `TypertRemoteMethodSpec` values. Each ordered `TypertRemoteParameterSpec` contains normal `codec` and `strictCodec` factories from the same checker-resolved type model; the runtime derives identities, wire-name defaults, and named-call views. `TypertRemoteInputOptions` has only `strict?: boolean`; `method.input(options?)` selects a cached `TypertRemoteValue<T>` with matching parsing and optional documentation/projection, without changing Host dispatch or `result`. `RemoteDecoded<T>` describes carrier-reconstructed unary results without narrowing arbitrary parser outputs.
```ts type-equiv
/** Codec attached to one invocation parameter or result. */
type TypertCodec =
| {
type TypertCodec<Value = unknown> =
| TypertRemoteValue<Value> & {
readonly mode: 'strict'
readonly typeSymbol: string
/** Materialize and return the process-realm schema on first boundary use. */
readonly create: () => TypertSchema
/**
* Decode a unary result whose fields require type-specific handling.
* @param value - result reconstructed by the RPC carrier.
* @returns the validated result, retaining native byte views.
*/
readonly decode?: (value: unknown) => unknown
readonly decode?: ((value: unknown) => unknown) | undefined
/**
* Project typed binary fields into RPC result attachments.
* @param value - native unary result.
* @param writeBytes - records a byte view at its result-relative path and returns its JSON placeholder.
* @returns JSON metadata with untouched JSON subtrees retained.
*/
readonly encode?: (value: unknown, writeBytes: (bytes: Uint8Array, path: readonly (string | number)[]) => null) => unknown
readonly encode?: ((value: unknown, writeBytes: (bytes: Uint8Array, path: readonly (string | number)[]) => null) => unknown) | undefined
}
| {
readonly mode: 'src-json'
@@ -72,6 +76,8 @@ type TypertCodec =
interface InvocationParameterDescriptor {
/** Source-level parameter name. */
readonly name: string
/** Source parameter documentation, independent of JSON Schema support. */
readonly description?: string
/** Required key in the wire `args` object. */
readonly wire: string
/** Whether the value is JSON or requires a registered Host lookup. */
@@ -135,6 +141,8 @@ interface InvocationDescriptor {
}
/** Codec for the unary result or each yielded stream item. */
readonly result: TypertCodec
/** Source-owned method documentation; ordinary methods need not have JSDoc. */
readonly description?: string
/** Source declaration used only for diagnostics. */
readonly sourceLocation?: InvocationSourceLocation
}
@@ -207,6 +215,16 @@ interface PeerScope {
}
```
```ts type-equiv
/** Carrier capacity for buffered uplink frames of one logical stream. */
interface RemoteUplinkWindow {
/** Maximum complete encoded frame bytes waiting for the Host consumer. */
readonly maxBytes: number
/** UTF-8 envelope bytes added to a compact JSON item with a present value field. */
readonly frameOverheadBytes: number
}
```
```ts type-equiv
/**
* The context of one Remote call, reachable inside the receiving method as
@@ -225,6 +243,8 @@ interface RemoteInvocation {
readonly peer: PeerScope
/** Carrier cancellation: Client cancel, socket close, or an uplink failure. */
readonly signal: AbortSignal
/** Carrier frame capacity; absent when the carrier imposes no encoded-frame inbox limit. */
readonly uplinkWindow?: RemoteUplinkWindow | undefined
/**
* The Client's uplink items for this call. Available once; a second call
* throws. With an uplink codec on the descriptor every item is decoded to
@@ -279,6 +299,8 @@ interface InvokeRemoteRequest {
* `invocation.uplink()`; absent means an immediately ended iterable.
*/
readonly uplink?: AsyncIterable<unknown>
/** Carrier-provided frame capacity; absent for carriers without an encoded-frame inbox limit. */
readonly uplinkWindow?: RemoteUplinkWindow | undefined
/** Peer the call speaks for; absent means an in-process carrier, answered as the operator. */
readonly peer?: PeerScope
/** Carrier or direct-caller cancellation injected only into cancellation-aware methods. */
@@ -350,6 +372,8 @@ interface TypertGateway {
`ctx.remote` exposes only namespaces contributed by imported `/remote` artifacts. `$mount()` installs generated descriptors and concrete methods as one fiber-owned operation. Each namespace is a traced `remote.<namespace>` Cordis child Service whose lifetime spans its mounted methods; no JavaScript Proxy or Host business Service type enters the consumer.
Metadata ownership is separate from connection ownership; the [registry reference](<../../packages/typert/registry/README.md>) covers offline registration and mount lifetimes.
```ts type-equiv
/** Client Remote capability implemented by the Gateway and consumed by Remote assemblies. */
interface TypertClientRemote extends TypertRemoteNamespaceMap {
+30 -6
View File
@@ -40,27 +40,31 @@ interface TypertLookupDefinition {
`InvocationDescriptor` 是本地反射信息,不是 wire message。Host 与消费方构建会生成彼此对应的 descriptor;请求只发送 endpoint 与具名 `args`。strict codec 携带生成的 schema factory,SRC codec 则在不恢复结构类型的前提下强制要求输入为 JSON 安全值。一元结果 codec 可提供 `encode()` 处理含字节的子树,并通过 `decode()` 递归校验原生字节;Client 声明将每个 `Uint8Array` 限定为以 `ArrayBuffer` 为底层缓冲区。纯 JSON 结果无需字节识别或 Client 解码。取消通过带外 carrier signal 表达:它在业务参数之后注入,绝不进入 `args`。
`createTypertRemoteInfo` 返回实现 `TypertRemoteInfo` 的惰性类实例,后者扩展可挂载的 `TypertRemoteContribution`。其 `methods` 索引引用 `descriptors` 中的直接方法对象:每个 `TypertRemoteMethod` 增加具名 `input(options?)` 和 `invoke`,在方法及参数上保留文档,并以 `result` 作为唯一输出 codec。一元 `mode` 缺省;流式 `mode` 为 `'stream'`。仅使用 Context 接收器的方法保留在描述符和作用域声明中。Registry 查询返回基础描述符;`isTypertRemoteMethod` 收窄生成的直接调用能力,但不会恢复各端点的精确泛型。
`TypertSchema` 保证解析能力,不保证任意 Zod 操作,尽管原始 factory spec 要求 Zod factory。缺少文档或不支持可选的 JSON Schema 投影,不会使普通方法失效。info 索引与每种输入策略的视图、解析器和派生投影都独立惰性求值并缓存;读取元数据或 schema 绝不发起网络调用。[协议参考](<../../packages/typert/protocol/README.zh.md>)定义这些 API,[生成器参考](<../../packages/typert/generator/README.zh.md#ordinary-remote-metadata>)定义它们彼此分离的 Host `./typert`、消费方 `./remote` 和 Client `./client/typert` 产物。
`TypertRemoteSpec` 保存包名与按端点键控的 `TypertRemoteMethodSpec`。每个有序 `TypertRemoteParameterSpec` 条目都包含从同一 checker 解析后类型模型生成的普通 `codec` 和 `strictCodec` factory;运行时派生标识、默认 wire 名称和具名调用视图。`TypertRemoteInputOptions` 仅包含 `strict?: boolean`;`method.input(options?)` 选择缓存的 `TypertRemoteValue<T>`,提供匹配的解析及可选文档/投影,而不改变 Host 分发或 `result`。`RemoteDecoded<T>` 则描述 carrier 重建的一元结果,不会收窄任意解析器输出。
```ts type-equiv
/** Codec attached to one invocation parameter or result. */
type TypertCodec =
| {
type TypertCodec<Value = unknown> =
| TypertRemoteValue<Value> & {
readonly mode: 'strict'
readonly typeSymbol: string
/** Materialize and return the process-realm schema on first boundary use. */
readonly create: () => TypertSchema
/**
* Decode a unary result whose fields require type-specific handling.
* @param value - result reconstructed by the RPC carrier.
* @returns the validated result, retaining native byte views.
*/
readonly decode?: (value: unknown) => unknown
readonly decode?: ((value: unknown) => unknown) | undefined
/**
* Project typed binary fields into RPC result attachments.
* @param value - native unary result.
* @param writeBytes - records a byte view at its result-relative path and returns its JSON placeholder.
* @returns JSON metadata with untouched JSON subtrees retained.
*/
readonly encode?: (value: unknown, writeBytes: (bytes: Uint8Array, path: readonly (string | number)[]) => null) => unknown
readonly encode?: ((value: unknown, writeBytes: (bytes: Uint8Array, path: readonly (string | number)[]) => null) => unknown) | undefined
}
| {
readonly mode: 'src-json'
@@ -72,6 +76,8 @@ type TypertCodec =
interface InvocationParameterDescriptor {
/** Source-level parameter name. */
readonly name: string
/** Source parameter documentation, independent of JSON Schema support. */
readonly description?: string
/** Required key in the wire `args` object. */
readonly wire: string
/** Whether the value is JSON or requires a registered Host lookup. */
@@ -135,6 +141,8 @@ interface InvocationDescriptor {
}
/** Codec for the unary result or each yielded stream item. */
readonly result: TypertCodec
/** Source-owned method documentation; ordinary methods need not have JSDoc. */
readonly description?: string
/** Source declaration used only for diagnostics. */
readonly sourceLocation?: InvocationSourceLocation
}
@@ -207,6 +215,16 @@ interface PeerScope {
}
```
```ts type-equiv
/** Carrier capacity for buffered uplink frames of one logical stream. */
interface RemoteUplinkWindow {
/** Maximum complete encoded frame bytes waiting for the Host consumer. */
readonly maxBytes: number
/** UTF-8 envelope bytes added to a compact JSON item with a present value field. */
readonly frameOverheadBytes: number
}
```
```ts type-equiv
/**
* The context of one Remote call, reachable inside the receiving method as
@@ -225,6 +243,8 @@ interface RemoteInvocation {
readonly peer: PeerScope
/** Carrier cancellation: Client cancel, socket close, or an uplink failure. */
readonly signal: AbortSignal
/** Carrier frame capacity; absent when the carrier imposes no encoded-frame inbox limit. */
readonly uplinkWindow?: RemoteUplinkWindow | undefined
/**
* The Client's uplink items for this call. Available once; a second call
* throws. With an uplink codec on the descriptor every item is decoded to
@@ -279,6 +299,8 @@ interface InvokeRemoteRequest {
* `invocation.uplink()`; absent means an immediately ended iterable.
*/
readonly uplink?: AsyncIterable<unknown>
/** Carrier-provided frame capacity; absent for carriers without an encoded-frame inbox limit. */
readonly uplinkWindow?: RemoteUplinkWindow | undefined
/** Peer the call speaks for; absent means an in-process carrier, answered as the operator. */
readonly peer?: PeerScope
/** Carrier or direct-caller cancellation injected only into cancellation-aware methods. */
@@ -350,6 +372,8 @@ interface TypertGateway {
`ctx.remote` 只暴露由已导入 `/remote` 产物贡献的 namespace。`$mount()` 会把生成的 descriptor 与具体方法作为一项由 fiber 持有的操作统一注册。每个 namespace 都是可追踪的 `remote.<namespace>` Cordis 子服务,其生命周期覆盖已挂载的方法;JavaScript Proxy 与 Host 业务服务类型都不会进入消费方。
元数据所有权与连接所有权相互独立;[注册表参考](<../../packages/typert/registry/README.zh.md>)说明离线注册与挂载生命周期。
```ts type-equiv
/** Client Remote capability implemented by the Gateway and consumed by Remote assemblies. */
interface TypertClientRemote extends TypertRemoteNamespaceMap {
+5 -27
View File
@@ -277,35 +277,13 @@ Typed Remote control of transient Session-owned terminal processes.
@Remote({ mode: 'stream' }) retain(sessionId: SessionId, id: WebTerminalId, signal: AbortSignal): AsyncIterable<TerminalRetentionFrame>
/**
* Attach to a terminal without binding its process lifetime to the transport.
* Attach terminal input and output to one physical Remote stream.
* @param agent - Session owner supplied by the Gateway.
* @param id - terminal identity.
* @param attachmentId - new exclusive input attachment.
* @param signal - physical stream cancellation.
* @returns screen recovery followed by output and metadata changes.
* @param signal - attachment cancellation; the process remains alive and input is never replayed.
* @returns screen recovery, output, writable state and provider-acceptance acknowledgements.
*/
@Remote({ mode: 'stream' }) follow(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, signal: AbortSignal): AsyncIterable<TerminalFrame>
/**
* Deliver raw input, including Tab completion and control characters.
* @param agent - Session owner supplied by the Gateway.
* @param id - terminal identity.
* @param attachmentId - current writable attachment.
* @param data - input bytes represented as UTF-8 text.
* @returns after provider input acceptance.
*/
@Remote async write(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, data: string): Promise<void>
/**
* Update the dimensions of the PTY and recovery screen.
* @param agent - Session owner supplied by the Gateway.
* @param id - terminal identity.
* @param attachmentId - current writable attachment.
* @param cols - column count.
* @param rows - row count.
* @returns after the resize completes.
*/
@Remote async resize(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, cols: number, rows: number): Promise<void>
@Remote({ mode: 'stream' }) attach(agent: Agent, id: WebTerminalId, signal: AbortSignal): RemoteStream<TerminalFrame, TerminalInput>
/**
* Rename a terminal without changing its shell.
@@ -324,7 +302,7 @@ Typed Remote control of transient Session-owned terminal processes.
@Remote async close(agent: Agent, id: WebTerminalId): Promise<void>
```
Types: [Agent](core.md) · [SessionId](core.md)
Types: [Agent](core.md) · [RemoteStream](typert.md) · [SessionId](core.md)
Source: [`packages/api/terminal-controller/src/index.ts`](../../packages/api/terminal-controller/src/index.ts)
+5 -27
View File
@@ -277,35 +277,13 @@ Typed Remote control of transient Session-owned terminal processes.
@Remote({ mode: 'stream' }) retain(sessionId: SessionId, id: WebTerminalId, signal: AbortSignal): AsyncIterable<TerminalRetentionFrame>
/**
* Attach to a terminal without binding its process lifetime to the transport.
* Attach terminal input and output to one physical Remote stream.
* @param agent - Session owner supplied by the Gateway.
* @param id - terminal identity.
* @param attachmentId - new exclusive input attachment.
* @param signal - physical stream cancellation.
* @returns screen recovery followed by output and metadata changes.
* @param signal - attachment cancellation; the process remains alive and input is never replayed.
* @returns screen recovery, output, writable state and provider-acceptance acknowledgements.
*/
@Remote({ mode: 'stream' }) follow(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, signal: AbortSignal): AsyncIterable<TerminalFrame>
/**
* Deliver raw input, including Tab completion and control characters.
* @param agent - Session owner supplied by the Gateway.
* @param id - terminal identity.
* @param attachmentId - current writable attachment.
* @param data - input bytes represented as UTF-8 text.
* @returns after provider input acceptance.
*/
@Remote async write(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, data: string): Promise<void>
/**
* Update the dimensions of the PTY and recovery screen.
* @param agent - Session owner supplied by the Gateway.
* @param id - terminal identity.
* @param attachmentId - current writable attachment.
* @param cols - column count.
* @param rows - row count.
* @returns after the resize completes.
*/
@Remote async resize(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, cols: number, rows: number): Promise<void>
@Remote({ mode: 'stream' }) attach(agent: Agent, id: WebTerminalId, signal: AbortSignal): RemoteStream<TerminalFrame, TerminalInput>
/**
* Rename a terminal without changing its shell.
@@ -324,7 +302,7 @@ Typed Remote control of transient Session-owned terminal processes.
@Remote async close(agent: Agent, id: WebTerminalId): Promise<void>
```
Types: [Agent](core.zh.md) · [SessionId](core.zh.md)
Types: [Agent](core.zh.md) · [RemoteStream](typert.zh.md) · [SessionId](core.zh.md)
Source: [`packages/api/terminal-controller/src/index.ts`](../../packages/api/terminal-controller/src/index.ts)
@@ -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.1-alpha.1/job-id-identity/guide.md
/:
en: d6fdce6b58c67691
zh: a103e5028f5442d0
/background-job-ids-identify-one-execution:
en: 9b06780be69e93f6
zh: c33945fd584c6a23
/background-job-ids-identify-one-execution/change:
en: 047ec9d0337bfc0b
zh: 1218472855e81189
/background-job-ids-identify-one-execution/migration:
en: 08921c9c25218c83
zh: 7ff1d3ac63ae40ef
@@ -0,0 +1,18 @@
---
kind: upgrade-guide
description: "JobId now identifies one background execution across registry lifetimes."
---
# Background job ids identify one execution
English | [中文](guide.zh.md)
## Change
The job registry returns `<kind>-<short-uuid>` instead of `<kind>-N`; the suffix is 16 lowercase UUID hex characters. The same `JobId` appears in live controls, `job/registered`, and `job/settled`; lifecycle records no longer carry `executionId`. The identifier remains owner-authorized. Existing Session histories remain unchanged and do not resume their jobs.
## Migration
1. Pass the exact id returned by a start result or `jobs.list()` to `job_output` and `job_kill`; use `job_output` with `wait: true` to wait. Remove code that constructs an id from the kind and an ordinal.
2. Pair SDK lifecycle events by `data.jobId`. Remove imports of `JobExecutionId` and code that maps it to a process-local `jobId`.
3. Verify a new job's registration and settlement contain the same `jobId`, and a later registry instance issues a different one.
@@ -0,0 +1,18 @@
---
kind: upgrade-guide
description: "JobId 现在跨注册表生命周期标识一次后台执行。"
---
# 后台 job id 标识一次执行
[English](guide.md) | 中文
## 变更
job 注册表返回 `<kind>-<short-uuid>`,不再返回 `<kind>-N`;后缀是 UUID 的 16 位小写十六进制字符。运行期控制、`job/registered` 和 `job/settled` 使用同一个 `JobId`;生命周期记录不再携带 `executionId`。访问仍按所有者授权。已有 Session 历史保持原样,不会恢复其中的 job。
## 迁移
1. 把启动结果或 `jobs.list()` 返回的原始 id 传给 `job_output` 和 `job_kill`;等待时为 `job_output` 设置 `wait: true`。移除按 kind 和序号构造 id 的代码。
2. 使用 `data.jobId` 配对 SDK 生命周期事件。移除 `JobExecutionId` 导入,以及将它映射为进程内 `jobId` 的代码。
3. 核对新 job 的注册与结算含有相同 `jobId`,后续注册表实例发放不同 id。
@@ -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.1-alpha.1/jsonl-persistence-plugin/guide.md
/:
en: eff30513d0de970b
zh: c16a32f374bd07e1
/mount-jsonl-persistence-through-its-plugin:
en: ae3ff407a497cf5c
zh: 1b71e651967b8255
/mount-jsonl-persistence-through-its-plugin/change:
en: ea5defddc1a9b989
zh: 97902f22a4196b12
/mount-jsonl-persistence-through-its-plugin/migration:
en: 93d9f202c59303e9
zh: c5ced26ed819d7c5
@@ -0,0 +1,18 @@
---
kind: upgrade-guide
description: "JSONL persistence uses a namespace plugin import; direct service-class construction and class type annotations must use the persistence service instead."
---
# Mount JSONL persistence through its plugin
English | [中文](guide.zh.md)
## Change
`@deepseek-ai/dsh-session-persistence-jsonl` exports a function plugin through named `name`, `Config`, and `apply` exports, with no default export. Default imports, direct construction, subclassing, `instanceof`, and class type annotations are affected. The plugin retains listeners and handles through the consumer unloads triggered by removing this provider; concurrent root disposal remains unordered. The `sessionPersistence` service API, YAML configuration, and stored files remain unchanged.
## Migration
1. Replace the default import with `import * as JsonlSessionPersistence from '@deepseek-ai/dsh-session-persistence-jsonl'`. Existing `ctx.plugin(JsonlSessionPersistence, config)` calls remain valid; replace direct construction with this mounting call. For dynamic imports, use the module namespace returned by `await import(...)` instead of its `.default`. Consumers declare `inject: ['sessionPersistence']` and access `ctx.sessionPersistence`.
2. Use the `SessionPersistence` type from `@deepseek-ai/dsh-session-persistence` for service annotations. Replace concrete-class `instanceof` checks and subclasses with consumers of that service; the concrete JSONL class is private.
3. Await plugin startup and confirm a session can be created, flushed, and reopened. Register asynchronous consumer cleanup in the scope that injects `sessionPersistence` so backend unloading waits for it.
@@ -0,0 +1,18 @@
---
kind: upgrade-guide
description: "JSONL 持久化使用插件命名空间导入;直接构造服务类和类类型标注需要改用持久化服务。"
---
# 通过插件挂载 JSONL 持久化
[English](guide.md) | 中文
## 变更
`@deepseek-ai/dsh-session-persistence-jsonl` 通过命名导出的 `name`、`Config` 和 `apply` 提供函数插件,没有默认导出。默认导入、直接构造、继承、`instanceof` 和类类型标注会受到影响。插件会保留监听器和句柄,直到移除该提供者所触发的消费者卸载完成;根作用域的并发卸载仍不保证顺序。`sessionPersistence` 服务 API、YAML 配置和存储文件保持不变。
## 迁移
1. 将默认导入替换为 `import * as JsonlSessionPersistence from '@deepseek-ai/dsh-session-persistence-jsonl'`。现有的 `ctx.plugin(JsonlSessionPersistence, config)` 调用仍然有效;将直接构造改为该挂载调用。动态导入直接使用 `await import(...)` 返回的模块命名空间,不再取其 `.default`。消费者声明 `inject: ['sessionPersistence']` 并访问 `ctx.sessionPersistence`。
2. 服务类型标注使用 `@deepseek-ai/dsh-session-persistence` 的 `SessionPersistence` 类型。将针对具体类的 `instanceof` 检查和子类改为消费该服务;具体 JSONL 类是私有的。
3. 等待插件启动完成,确认能够创建、flush 并重新打开会话。将消费者的异步清理注册到注入 `sessionPersistence` 的作用域中,以便后端卸载时等待它完成。
@@ -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.1-alpha.2/deepseek-account-model-catalog/guide.md
/:
en: 60a8441ae7ea6841
zh: 3715b44e11c5131b
/deepseek-account-models-come-from-the-account-listing:
en: 2208c82c24d75a53
zh: fa6c53c925aae6f2
/deepseek-account-models-come-from-the-account-listing/change:
en: bf4c84372b8b1316
zh: af1623701d19b62e
/deepseek-account-models-come-from-the-account-listing/migration:
en: 7ce26a5a1926b292
zh: 35dfc17997834e4d
@@ -0,0 +1,27 @@
---
kind: upgrade-guide
description: "The DeepSeek account route no longer accepts a models catalog; the account listing supplies its models and modelOverrides adjusts them."
---
# DeepSeek account models come from the account listing
English | [中文](guide.zh.md)
## Change
The `deepseek-account` route previously read its model catalog from the `models` field of the `llm-deepseek-account` entry, which the Models page could edit for the account. The route now lists models from the account's `GET /models` endpoint, serves the built-in catalog until a listing loads, and accepts per-model adjustments only through `modelOverrides`; the Models page no longer offers an editor for this route. A listed model can require a newer DeepSeek Harness; such a model is hidden, and a request for it fails with `CLIENT_UPGRADE_REQUIRED`. A `models` field left in the entry, including one saved by the earlier Models page editor, stops the plugin at load with `llm-deepseek-account: models is no longer configurable`, and Desktop and Web show no account models until the field is removed. Signed-in accounts without a saved catalog need no action.
## Migration
1. Open `$DSH_HOME/profiles/<profile>/cordis.patch.yml` and find the entry with `id: llm-deepseek-account`.
2. Delete its `models` field. For each model whose fields you changed, move only the changed fields under `modelOverrides.<model id>`:
```yaml
- id: llm-deepseek-account
config:
modelOverrides:
deepseek-flash:
maxTokens: 131072
```
3. Restart DeepSeek Harness, sign in to the DeepSeek account, and confirm that the model selector lists the account models and the Models page shows the account as signed in. An override the listed model rejects, or one that names an unknown model, appears as the account's diagnostic on the Models page.
@@ -0,0 +1,27 @@
---
kind: upgrade-guide
description: "DeepSeek 账号路由不再接受 models 目录;模型由账号的模型列表提供,单个模型通过 modelOverrides 调整。"
---
# DeepSeek 账号模型改由账号的模型列表提供
[English](guide.md) | 中文
## 变更
`deepseek-account` 路由此前从 `llm-deepseek-account` 条目的 `models` 字段读取模型目录,模型页可以为账号编辑这份目录。现在该路由从账号的 `GET /models` 端点列出模型,在列表加载之前使用内置目录,单个模型只能通过 `modelOverrides` 调整;模型页不再为该路由提供编辑器。列表中的模型可以要求更新版本的 DeepSeek Harness,这样的模型会被隐藏,请求它时以 `CLIENT_UPGRADE_REQUIRED` 失败。条目中遗留的 `models` 字段,包括早先模型页编辑器保存的,会让插件在加载时报 `llm-deepseek-account: models is no longer configurable` 并停止,删除该字段之前桌面端和 Web 都不显示账号模型。没有保存过账号目录的已登录账号无需操作。
## 迁移
1. 打开 `$DSH_HOME/profiles/<profile>/cordis.patch.yml`,找到 `id: llm-deepseek-account` 的条目。
2. 删除其中的 `models` 字段。对改过字段的模型,只把改过的字段移到 `modelOverrides.<模型 id>` 下:
```yaml
- id: llm-deepseek-account
config:
modelOverrides:
deepseek-flash:
maxTokens: 131072
```
3. 重启 DeepSeek Harness 并登录 DeepSeek 账号,确认模型选择器列出账号模型、模型页显示账号已登录。被列出的模型拒绝的覆盖,或指向未知模型的覆盖,会作为该账号的诊断信息显示在模型页上。
@@ -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.1-alpha.2/pi-ai-azure-provider/guide.md
/:
en: 51d5b5b4d2fb1b8a
zh: 4dc9af2458a8fcac
/azure-provider-route-rename:
en: 105c73820d057e28
zh: 91a7bfc5c282e164
/azure-provider-route-rename/change:
en: d5ce9089d8aa7119
zh: f337926f85b01bc1
/azure-provider-route-rename/migration:
en: 8fb23fbb8184fa00
zh: 8c44fb293a8dd70a
@@ -0,0 +1,19 @@
---
kind: upgrade-guide
description: "The pi-ai Azure provider route is renamed from azure-openai-responses to azure."
---
# Azure provider route rename
English | [中文](guide.zh.md)
## Change
The installed pi-ai catalog identifies the Azure provider as `azure` instead of `azure-openai-responses`. The `azure` route includes both Responses and Chat Completions models. The Responses API identifier remains `azure-openai-responses`, and the `AZURE_OPENAI_*` environment variables keep their names. Configurations and model selections that use the old provider key no longer resolve the Azure catalog.
## Migration
1. In the `llm-pi-ai` configuration in `$DSH_HOME/profiles/<profile>/cordis.patch.yml` or another supplying layer, rename `config.providers.azure-openai-responses` to `config.providers.azure`. Preserve its existing fields and any `apiKeyEnv` reference.
2. Use catalog model IDs under `models`; map a custom Azure deployment name with `AZURE_OPENAI_DEPLOYMENT_NAME_MAP`. The mixed catalog cannot infer a protocol for a model ID absent from the catalog. An explicit route-level `api` overrides every model on that route; it does not select the Azure provider.
3. Update explicit request/default provider selections to `azure`, and reselect an Azure model when continuing an existing Session. Configure the new Azure entry in Settings → Models if its key was stored for the old entry. Do not edit historical Session events.
4. Confirm that Settings → Models offers `azure` and lists the expected models, then send a short request using the configured deployment.
@@ -0,0 +1,19 @@
---
kind: upgrade-guide
description: "pi-ai 的 Azure 提供方路由从 azure-openai-responses 更名为 azure。"
---
# Azure 提供方路由更名
[English](guide.md) | 中文
## 变更
已安装的 pi-ai 目录使用 `azure` 标识 Azure 提供方,替代 `azure-openai-responses`。`azure` 路由同时包含 Responses 和 Chat Completions 模型。Responses API 标识仍为 `azure-openai-responses`,`AZURE_OPENAI_*` 环境变量名称也保持不变。使用旧提供方键的配置和模型选择无法再解析 Azure 目录。
## 迁移
1. 在 `$DSH_HOME/profiles/<profile>/cordis.patch.yml` 或其他提供配置的层中,找到 `llm-pi-ai` 配置,将 `config.providers.azure-openai-responses` 改为 `config.providers.azure`。保留原有字段及任何 `apiKeyEnv` 引用。
2. 在 `models` 中使用目录模型 ID;自定义 Azure 部署名称通过 `AZURE_OPENAI_DEPLOYMENT_NAME_MAP` 映射。混合协议目录无法为目录外的模型 ID 推断协议。显式设置路由级 `api` 会覆盖该路由所有模型的协议,并不表示选择 Azure 提供方。
3. 将显式请求及默认模型配置中的提供方改为 `azure`,继续现有 Session 时重新选择 Azure 模型。若密钥存储在旧条目下,请在“设置 → 模型”中配置新的 Azure 条目。不要修改历史 Session 事件。
4. 确认“设置 → 模型”提供 `azure` 且列出预期模型,再向所配置的部署发送一条简短请求。
@@ -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.1-alpha.2/pi-ai-model-discovery/guide.md
/:
en: 40afcce4dbdcb337
zh: 33c5647441bd1dcb
/pi-ai-model-visibility-without-a-credential:
en: 1bc74c0ce4085c3c
zh: 0a2be91b04c069c8
/pi-ai-model-visibility-without-a-credential/change:
en: f92005c2a3d4645c
zh: 5bfb1685cdf3437c
/pi-ai-model-visibility-without-a-credential/migration:
en: 26d72c82e5c60031
zh: 4b582d3e4d022dd8
@@ -0,0 +1,17 @@
---
kind: upgrade-guide
description: "pi-ai routes that name a credential hide their models until the credential is configured."
---
# pi-ai model visibility without a credential
English | [中文](guide.zh.md)
## Change
A pi-ai route that names a credential through `apiKeyEnv` previously listed its configured models while that credential was missing, and requests then failed with `MISSING_CREDENTIAL`. Model discovery now returns an empty catalog for such a route until the credential resolves, so Desktop and Web hide its group. Other credential errors, such as a malformed key, still fail model discovery. Routes that use the provider's native authentication or name no credential keep their configured catalog. A saved or default selection absent from the catalog displays “Select model” without changing the stored selection.
## Migration
1. To use such a route, configure its key in Settings → Models, or supply the reference its `apiKeyEnv` names through the launch environment.
2. Reopen the model selector and confirm that the route's group appears. Custom model discovery consumers must handle an empty catalog before the credential is configured; a listed catalog does not mean that the remote API accepts the key.
@@ -0,0 +1,17 @@
---
kind: upgrade-guide
description: "指定了凭据的 pi-ai 路由在凭据配置之前隐藏其模型。"
---
# pi-ai 路由缺少凭据时的模型可见性
[English](guide.md) | 中文
## 变更
通过 `apiKeyEnv` 指定凭据的 pi-ai 路由,此前在凭据缺失时也会列出配置的模型,请求随后以 `MISSING_CREDENTIAL` 失败。现在凭据解析到之前,模型发现对这样的路由返回空目录,因此桌面端和 Web 隐藏它的分组。其他凭据错误(例如密钥格式错误)仍会让模型发现失败。使用提供方原生认证或未指定凭据的路由保留配置的目录。已保存或默认的选择不在目录中时,界面显示“请选择模型”,保存的选择保持不变。
## 迁移
1. 要使用这样的路由,请在设置 → 模型中配置密钥,或通过启动环境提供 `apiKeyEnv` 指定的凭据引用。
2. 重新打开模型选择器,确认该路由的分组出现。自定义模型发现消费者必须处理配置凭据前的空目录;列出目录不代表远端 API 已接受密钥。
@@ -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.1-alpha.2/stored-credentials-precedence/guide.md
/:
en: 9fc8377bd2d6e38c
zh: b77fd76aeee0f592
/a-stored-key-takes-precedence-over-an-exported-variable:
en: 0d002196a3f19850
zh: 7dcbbb6a44216f01
/a-stored-key-takes-precedence-over-an-exported-variable/change:
en: 4ac6ffc5e782f765
zh: 51a69db953708bd3
/a-stored-key-takes-precedence-over-an-exported-variable/migration:
en: d4f534f82476b5e9
zh: 5371eaaae96a3759
@@ -0,0 +1,25 @@
---
kind: upgrade-guide
description: "Stored credentials now precede environment fallbacks when the store is mounted; the shipped headless profile omits stored authentication."
---
# A stored key takes precedence over an exported variable
English | [中文](guide.zh.md)
## Change
Earlier releases used an exported environment variable before the `refs` entry with the same name in `$DSH_HOME/.credentials.yaml` (`~/.dsh/.credentials.yaml` by default). This applied to `DEEPSEEK_API_KEY=… dsh`, a shell profile export, a CI secret, and a container `-e` value. While the name was exported, the Models page could not save a key for it.
Now the stored entry wins. The exported variable applies only while the file stores no value for that name, and `$cwd/.env` and `$DSH_HOME/.env` still apply only after both. The Models page can save and replace a key while the name is exported.
The shipped `headless` profile instead disables the credential store, authorization and DeepSeek account provider. It uses the launch environment, project `.env`, then Harness-home `.env`, and leaves `.credentials.yaml` untouched. Saved API keys and sign-ins no longer authenticate headless jobs by default. Web, SDK and ACP retain the store.
You are affected when a harness home stores a value under `refs` and the process that launches `dsh` exports the same name. This includes a container that mounts such a home. Requests now use the stored key instead of the exported one. A CI job or container that starts with a fresh harness home, without `.credentials.yaml`, is not affected. The [stored credential precedence](../../../../.agents/notes/implemented/architecture/2026-10-09-stored-credential-precedence.md) Agent Note records the reason.
## Migration
1. Compare the names under `refs` in `$DSH_HOME/.credentials.yaml` with the variables that your shell, CI job, or container exports. A name that appears in only one place needs no action.
2. For each name that appears in both places, keep the stored key if it is the account you want. Otherwise, delete the name's line under `refs`. A running harness reloads the file, so the next request reads the exported variable without a restart.
3. For a headless job, export the required key and run `dsh headless "<task>"`. To keep using a saved key or sign-in, apply the three-row [headless restoration patch](../../../../packages/bundle/headless/README.md#credentials); restored storage also restores saved-first precedence. Existing profile, home or command overlays can override the shipped rows, so inspect `dsh headless --dump-config` when checking the effective composition.
4. Confirm the intended request account and that the launching process exports a non-empty value where needed. Check names and presence without printing credential values. A headless run relying only on a saved credential now fails; restoring storage or supplying supported environment authentication resolves it.
@@ -0,0 +1,25 @@
---
kind: upgrade-guide
description: "挂载存储时,已保存凭据现在优先于环境后备;随附 headless profile 不挂载存储认证。"
---
# 存储的密钥优先于导出的变量
[English](guide.md) | 中文
## 变更
早期版本会先使用导出的环境变量,再使用 `$DSH_HOME/.credentials.yaml`(默认为 `~/.dsh/.credentials.yaml`)中同名的 `refs` 条目。这适用于 `DEEPSEEK_API_KEY=… dsh`、shell 配置文件中的导出、CI 机密和容器 `-e` 值。该名字被导出期间,Models 页面无法为其保存密钥。
现在存储的条目优先。只有当文件没有为该名字存储值时,导出的变量才会生效;`$cwd/.env` 和 `$DSH_HOME/.env` 仍排在两者之后。即使该名字已被导出,Models 页面也可以保存和替换密钥。
随附的 `headless` profile 则禁用凭据存储、authorization 和 DeepSeek account 提供方。它依次使用启动环境、项目 `.env` 和 Harness home `.env`,并保持 `.credentials.yaml` 原样。已保存 API 密钥和登录凭据默认不再为 headless 任务提供认证。Web、SDK 和 ACP 保留存储。
如果某个 harness home 在 `refs` 下存储了值,而启动 `dsh` 的进程导出了同名变量,你就会受到影响。挂载了这类 home 的容器也包括在内。请求现在使用存储的密钥,而不是导出的密钥。以全新 harness home 启动、没有 `.credentials.yaml` 的 CI 作业或容器不受影响。[存储凭据优先级](../../../../.agents/notes/implemented/architecture/2026-10-09-stored-credential-precedence.zh.md) Agent Note 记录了原因。
## 迁移
1. 将 `$DSH_HOME/.credentials.yaml` 中 `refs` 下的名字,与 shell、CI 作业或容器导出的变量进行比较。只出现在其中一处的名字无需处理。
2. 对同时出现在两处的名字,如果存储的密钥正是你要使用的账户,就保留它。否则,删除 `refs` 下该名字所在的行。运行中的 harness 会重新加载该文件,因此下一次请求无需重启即可读取导出的变量。
3. 对 headless 任务,导出所需密钥并运行 `dsh headless "<task>"`。要继续使用已保存密钥或登录凭据,请应用三行配置的 [headless 恢复 patch](../../../../packages/bundle/headless/README.zh.md#credentials);恢复存储也恢复已保存凭据优先。现有 profile、home 或命令覆盖可以覆盖随附行,因此核对有效组合时请查看 `dsh headless --dump-config`。
4. 确认请求使用预期账户,并在需要时确认启动进程导出了非空值。只检查名字和是否存在,不要打印凭据值。仅依赖已保存凭据的 headless 运行现在会失败;恢复存储或提供受支持的环境认证即可解决。
+5 -2
View File
@@ -9,8 +9,8 @@
en: 2c6b665adc256b4e
zh: 2240e4c1573ebe9c
/configure-models/add-a-third-party-provider:
en: 0fe5f88e692f618c
zh: 4f2e493818d8934f
en: 4b99a9b34d117eea
zh: dddeb5a08c0d3cc6
/configure-models/add-a-custom-model-api:
en: 17867305a3e1b52a
zh: 876fedf1f6f563e4
@@ -26,6 +26,9 @@
/configure-models/advanced-configuration/image-input:
en: 75350cb615da03a4
zh: 6f8b3510085e4ac4
/configure-models/advanced-configuration/deepseek-account-models:
en: fc09d02a89b211a7
zh: e0f23a8912a24178
/configure-models/advanced-configuration/reasoning-effort:
en: f7581a0760fdfd2c
zh: dc6eaa16f74a0e9f
+18 -1
View File
@@ -16,7 +16,9 @@ Keys are write-only. The page receives a redacted descriptor after saving, never
Choose **Add model provider**. The card opens on **Third-party model provider**: pick a provider dsh ships with — the list shows provider ids such as `anthropic`, `openai`, `moonshotai` for Kimi, or `zai` for GLM — enter its API key, and save. The installed catalog supplies the endpoint, protocol, and model list.
Providers that sign in with OAuth, such as Codex, are not supported here yet.
The authentication **?** explains saved-credential priority and the environment fallbacks displayed for a key field. Leaving the key blank preserves existing authentication. Providers without native key authentication, such as `openai-codex`, show no key field unless the profile explicitly names a credential reference.
For an existing profile that names a credential reference, **API key source** shows the layer currently supplying that reference: saved credentials, launch environment, `$cwd/.env`, or `$DSH_HOME/.env`. Native authentication without a named reference has no source label.
## Add a custom model API
@@ -108,6 +110,21 @@ In pi-ai configuration, every list must name at least one modality except a mode
Both fields state a claim about your endpoint rather than checking it. A model that declares images its endpoint does not serve is not caught here; the provider rejects the request instead.
### DeepSeek account models
A signed-in DeepSeek account lists its models from the account service, so the Models page offers no model editor for it. Adjust a single model with `modelOverrides` in `$DSH_HOME/profiles/<profile>/cordis.patch.yml`; the fields match a DeepSeek `models` entry, and unset fields keep the listed values:
```yaml
- id: llm-deepseek-account
config:
modelOverrides:
deepseek-flash:
contextWindow: 524288
maxTokens: 131072
```
A model that needs a newer DeepSeek Harness fails with `CLIENT_UPGRADE_REQUIRED`, which names the version to install. The [account provider reference](../../../packages/llm/llm-deepseek-account/README.md) owns the listing, fallback, and gating rules.
### Reasoning effort
The model picker offers an **Effort** menu for a model that declares reasoning levels. A built-in provider's models inherit their levels from the installed catalog. A model you enter by hand declares none, so the Effort entry does not appear in the menu and the endpoint's own default decides whether the model thinks. Declare the levels with `reasoningEfforts` in `$DSH_HOME/profiles/<profile>/cordis.patch.yml`:
+18 -1
View File
@@ -16,7 +16,9 @@
选择**添加模型提供商**。卡片默认打开在**第三方模型提供商**:选取 dsh 自带的提供商——列表显示的是提供商 id,例如 `anthropic`、`openai`、Kimi 对应的 `moonshotai`、GLM 对应的 `zai`——输入其 API 密钥并保存。已安装目录会提供端点、协议和模型列表。
通过 OAuth 登录的提供商(例如 Codex)暂不支持。
认证 **?** 说明已保存凭据的优先级,以及密钥字段所显示的环境后备。密钥留空会保留现有认证。没有原生密钥认证的提供商(例如 `openai-codex`)不显示密钥字段,除非 profile 显式指定了凭据引用。
已有 profile 指定凭据引用时,**API 密钥来源**显示当前为该引用供值的层:已保存凭据、启动环境、`$cwd/.env` 或 `$DSH_HOME/.env`。未指定引用的原生认证不显示来源标签。
## 添加自定义模型 API
@@ -108,6 +110,21 @@ DeepSeek 将省略的 `inputModalities` 视为纯文本,并拒绝空列表。
这两个字段都是对你端点的断言,而不是对它的检查。声明了端点并不提供的图片能力的模型不会在这里被拦下,改由提供商拒绝该请求。
### DeepSeek 账号的模型
已登录 DeepSeek 账号的模型列表来自账号服务,因此模型页不为它提供模型编辑器。要调整单个模型,在 `$DSH_HOME/profiles/<profile>/cordis.patch.yml` 中使用 `modelOverrides`;字段与 DeepSeek 的 `models` 条目相同,未设置的字段沿用列表中的值:
```yaml
- id: llm-deepseek-account
config:
modelOverrides:
deepseek-flash:
contextWindow: 524288
maxTokens: 131072
```
需要更新版 DeepSeek Harness 的模型会以 `CLIENT_UPGRADE_REQUIRED` 失败,并写明需要安装的版本。列表、兜底和门控规则见[账号提供方参考](../../../packages/llm/llm-deepseek-account/README.zh.md)。
### 推理等级
对于声明了推理等级的模型,模型选择器会提供**推理等级**菜单。内置提供商的模型从已安装目录继承其等级。手动录入的模型不声明任何等级,因此模型菜单里不会出现推理等级项,由端点自身的默认值决定模型是否思考。请在 `$DSH_HOME/profiles/<profile>/cordis.patch.yml` 中用 `reasoningEfforts` 声明等级: