Merge remote-tracking branch 'origin/master' into dshw/pr-2250

# Conflicts:
#	packages/client/connection/tests/fake-api.client.ts
#	packages/client/runtime/tests/manager.client.spec.ts
#	packages/client/runtime/tests/workspaces-service.client.spec.ts
#	packages/host/apiproxy/tests/rpc-schemas.spec.ts
This commit is contained in:
_Kerman
2026-08-12 04:22:58 +08:00
523 changed files with 4024 additions and 2331 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/subsystems/commands.md
commands.md: 843210ccfa967ed03cd704d2b4b93bc7a9323102
commands.zh.md: 9e60b160733c99841a7a26c6aa1809450a9b5ff5
commands.md: 715e4944926fd875fc101744d224af6b30a9fc00
commands.zh.md: d70ea19d274ada9e1016fa6b96bed7639a4a2e88

View File

@@ -127,7 +127,7 @@ register(definition: CommandDefinition): () => void
* @param agent - exact receiving agent and scoped-layer key.
* @returns name-sorted descriptors after scoped shadowing.
*/
list(agent: Agent): readonly CommandDescriptor[]
@Remote list(agent: Agent): readonly CommandDescriptor[]
/**
* Resolve one effective command definition.
@@ -156,12 +156,12 @@ find(agent: Agent, name: string): CommandDefinition | undefined
* @returns the settled execution (result + lifecycle pairing id), or
* `undefined` when syntax or name does not resolve.
*/
async execute( agent: Agent, line: string, signal: AbortSignal, ): Promise<CommandExecution | undefined>
@Remote async execute( agent: Agent, line: string, signal: AbortSignal, ): Promise<CommandExecution | undefined>
```
Types: [Agent](core.md)
Source: [`packages/interaction/commands/src/index.ts:257`](../../packages/interaction/commands/src/index.ts)
Source: [`packages/interaction/commands/src/index.ts:225`](../../packages/interaction/commands/src/index.ts)
<a id="commands-events"></a>
@@ -183,5 +183,5 @@ A command was registered or unregistered. This is an unfiltered registry notific
'commands/change'(): void
```
Source: [`packages/interaction/commands/src/types.ts:33`](../../packages/interaction/commands/src/types.ts)
Source: [`packages/interaction/commands/src/types.ts:72`](../../packages/interaction/commands/src/types.ts)
<!-- END GENERATED cordis-surface -->

View File

@@ -127,7 +127,7 @@ register(definition: CommandDefinition): () => void
* @param agent - exact receiving agent and scoped-layer key.
* @returns name-sorted descriptors after scoped shadowing.
*/
list(agent: Agent): readonly CommandDescriptor[]
@Remote list(agent: Agent): readonly CommandDescriptor[]
/**
* Resolve one effective command definition.
@@ -156,12 +156,12 @@ find(agent: Agent, name: string): CommandDefinition | undefined
* @returns the settled execution (result + lifecycle pairing id), or
* `undefined` when syntax or name does not resolve.
*/
async execute( agent: Agent, line: string, signal: AbortSignal, ): Promise<CommandExecution | undefined>
@Remote async execute( agent: Agent, line: string, signal: AbortSignal, ): Promise<CommandExecution | undefined>
```
Types: [Agent](core.md)
Source: [`packages/interaction/commands/src/index.ts:257`](../../packages/interaction/commands/src/index.ts)
Source: [`packages/interaction/commands/src/index.ts:225`](../../packages/interaction/commands/src/index.ts)
<a id="commands-events"></a>
@@ -183,5 +183,5 @@ A command was registered or unregistered. This is an unfiltered registry notific
'commands/change'(): void
```
Source: [`packages/interaction/commands/src/types.ts:33`](../../packages/interaction/commands/src/types.ts)
Source: [`packages/interaction/commands/src/types.ts:72`](../../packages/interaction/commands/src/types.ts)
<!-- END GENERATED cordis-surface -->

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/subsystems/tools.md
tools.md: 54d20de3b4d1f2ff6d03a8e89e9356eef403382a
tools.zh.md: f8a35ffa7121438b0623f2a0972f90df2923ac89
tools.md: 60f982e1934a37f80236382141ebc54fdef5d7b4
tools.zh.md: 07e5e5729bfb8329b2696c64c25b852cb8a91350

View File

@@ -156,14 +156,13 @@ Registration is a trusted same-process contract. The registry borrows the typed
```ts type-equiv
/**
* Per-scope filter over the tools a scope INHERITS — the global layer and
* every ancestor layer on its chain. Restrictions intersect, and do not affect
* the scope's own registrations or the reserved Code Mode transport.
* Per-scope filter over global tools. Restrictions intersect and do not affect
* scoped registrations or the reserved Code Mode transport.
*/
interface ToolRestriction {
/** Inherited tool names that stay visible; every other inherited one is removed. */
/** Global tool names that stay visible; everything else is removed. */
readonly allow?: readonly string[]
/** Inherited tool names removed from visibility. */
/** Global tool names removed from visibility. */
readonly deny?: readonly string[]
}
```
@@ -198,8 +197,12 @@ interface ToolExecutionInput {
/**
* Opaque token of the enclosing transport execution, when one exists. Code
* Mode sets this on SDK sub-dispatches so commit-style observers can wait for
* the outer `run_code` outcome without receiving its live mutable execution.
*/
* the outer `run_code` outcome without receiving its live mutable execution.
* The token also marks the call as a transport sub-dispatch rather than a
* model-direct call: under `mode: 'code'`, only calls WITH a parent may
* execute a native tool name — a model-direct call (no parent) is denied as
* `UNKNOWN_TOOL` before the policy pipeline. See {@link ToolRegistry.execute}.
*/
readonly parent?: ToolExecutionToken
/** Required caller-owned cancellation for this invocation. */
readonly signal: AbortSignal
@@ -568,7 +571,7 @@ async execute(exec: ToolExecutionInput): Promise<ToolExecutionResult>
Types: [ScopeKey](scope.md)
Source: [`packages/core/tools/src/index.ts:761`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:787`](../../packages/core/tools/src/index.ts)
<a id="tools-events"></a>
@@ -593,7 +596,7 @@ A tool was registered or unregistered, or a scoped restriction changed (the avai
'tools/change'(): void
```
Source: [`packages/core/tools/src/index.ts:193`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:207`](../../packages/core/tools/src/index.ts)
<a id="toolscode-dispatch-log--waterfall"></a>
@@ -620,7 +623,7 @@ Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` su
Types: [ContentBlock](llm-streaming.md) · [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:175`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:189`](../../packages/core/tools/src/index.ts)
<a id="toolsexecute--waterfall"></a>
@@ -644,7 +647,7 @@ Around-dispatch waterfall for timeout, retry, or metrics. `next()` returns a nor
Types: [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:149`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:163`](../../packages/core/tools/src/index.ts)
<a id="toolspost-execute--waterfall"></a>
@@ -669,7 +672,7 @@ Accept, replace, enrich, or block a normalized dispatch result. `next()` accepts
Types: [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:161`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:175`](../../packages/core/tools/src/index.ts)
<a id="toolspre-execute--waterfall"></a>
@@ -692,7 +695,7 @@ Allow, deny, or ask before dispatch. `next()` delegates to allow; missing approv
Types: [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:138`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:152`](../../packages/core/tools/src/index.ts)
<a id="toolsresult--emit"></a>
@@ -713,5 +716,5 @@ Observe the frozen, lossless-JSON final outcome. Listener failures are contained
Types: [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:183`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:197`](../../packages/core/tools/src/index.ts)
<!-- END GENERATED cordis-surface -->

View File

@@ -156,14 +156,13 @@ type InferArgs<S> = InferProperties<S, []>
```ts type-equiv
/**
* Per-scope filter over the tools a scope INHERITS — the global layer and
* every ancestor layer on its chain. Restrictions intersect, and do not affect
* the scope's own registrations or the reserved Code Mode transport.
* Per-scope filter over global tools. Restrictions intersect and do not affect
* scoped registrations or the reserved Code Mode transport.
*/
interface ToolRestriction {
/** Inherited tool names that stay visible; every other inherited one is removed. */
/** Global tool names that stay visible; everything else is removed. */
readonly allow?: readonly string[]
/** Inherited tool names removed from visibility. */
/** Global tool names removed from visibility. */
readonly deny?: readonly string[]
}
```
@@ -198,8 +197,12 @@ interface ToolExecutionInput {
/**
* Opaque token of the enclosing transport execution, when one exists. Code
* Mode sets this on SDK sub-dispatches so commit-style observers can wait for
* the outer `run_code` outcome without receiving its live mutable execution.
*/
* the outer `run_code` outcome without receiving its live mutable execution.
* The token also marks the call as a transport sub-dispatch rather than a
* model-direct call: under `mode: 'code'`, only calls WITH a parent may
* execute a native tool name — a model-direct call (no parent) is denied as
* `UNKNOWN_TOOL` before the policy pipeline. See {@link ToolRegistry.execute}.
*/
readonly parent?: ToolExecutionToken
/** Required caller-owned cancellation for this invocation. */
readonly signal: AbortSignal
@@ -568,7 +571,7 @@ async execute(exec: ToolExecutionInput): Promise<ToolExecutionResult>
Types: [ScopeKey](scope.md)
Source: [`packages/core/tools/src/index.ts:761`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:787`](../../packages/core/tools/src/index.ts)
<a id="tools-events"></a>
@@ -593,7 +596,7 @@ A tool was registered or unregistered, or a scoped restriction changed (the avai
'tools/change'(): void
```
Source: [`packages/core/tools/src/index.ts:193`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:207`](../../packages/core/tools/src/index.ts)
<a id="toolscode-dispatch-log--waterfall"></a>
@@ -620,7 +623,7 @@ Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` su
Types: [ContentBlock](llm-streaming.md) · [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:175`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:189`](../../packages/core/tools/src/index.ts)
<a id="toolsexecute--waterfall"></a>
@@ -644,7 +647,7 @@ Around-dispatch waterfall for timeout, retry, or metrics. `next()` returns a nor
Types: [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:149`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:163`](../../packages/core/tools/src/index.ts)
<a id="toolspost-execute--waterfall"></a>
@@ -669,7 +672,7 @@ Accept, replace, enrich, or block a normalized dispatch result. `next()` accepts
Types: [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:161`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:175`](../../packages/core/tools/src/index.ts)
<a id="toolspre-execute--waterfall"></a>
@@ -692,7 +695,7 @@ Allow, deny, or ask before dispatch. `next()` delegates to allow; missing approv
Types: [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:138`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:152`](../../packages/core/tools/src/index.ts)
<a id="toolsresult--emit"></a>
@@ -713,5 +716,5 @@ Observe the frozen, lossless-JSON final outcome. Listener failures are contained
Types: [Scoped](scope.md)
Source: [`packages/core/tools/src/index.ts:183`](../../packages/core/tools/src/index.ts)
Source: [`packages/core/tools/src/index.ts:197`](../../packages/core/tools/src/index.ts)
<!-- END GENERATED cordis-surface -->

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/subsystems/typert.md
typert.md: d279bcb1c0f20f75a82f89e8bfab731f82779729
typert.zh.md: 4153cf8b6ebec65e0f9391911f9a0e9e0f869a63
typert.md: da1ab1a7169dfa197aba129fd0bb266052784ffe
typert.zh.md: 051b6cdebcf7c62ce9b389d2022490f7970d19fd

View File

@@ -66,6 +66,8 @@ interface InvocationParameterDescriptor {
readonly lookup?: string
/** Boundary codec for the wire representation. */
readonly codec: TypeRTCodec
/** Missing wire fields decode to `undefined` only for an explicitly declared `T | undefined`. */
readonly acceptsUndefined?: true
}
```
@@ -313,5 +315,5 @@ Resolve strict generated definitions or conservative SRC markers against current
async invoke(request: InvokeRemoteRequest): Promise<unknown>
```
Source: [`packages/api/gateway/src/index.ts:78`](../../packages/api/gateway/src/index.ts)
Source: [`packages/api/gateway/src/index.ts:90`](../../packages/api/gateway/src/index.ts)
<!-- END GENERATED cordis-surface -->

View File

@@ -66,6 +66,8 @@ interface InvocationParameterDescriptor {
readonly lookup?: string
/** Boundary codec for the wire representation. */
readonly codec: TypeRTCodec
/** Missing wire fields decode to `undefined` only for an explicitly declared `T | undefined`. */
readonly acceptsUndefined?: true
}
```
@@ -313,5 +315,5 @@ Resolve strict generated definitions or conservative SRC markers against current
async invoke(request: InvokeRemoteRequest): Promise<unknown>
```
Source: [`packages/api/gateway/src/index.ts:78`](../../packages/api/gateway/src/index.ts)
Source: [`packages/api/gateway/src/index.ts:90`](../../packages/api/gateway/src/index.ts)
<!-- END GENERATED cordis-surface -->