Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-5-web-ui

The Client API carrier's `agentPresets` member was the one member of its class
without an `IApiClient[...]` annotation. Inferring it inlined `AgentPresetEntry`
into the emitted declaration by the specifier TS picks — the host `index.ts` —
dragging the whole gateway, and with it the host `Context` merges, into every
Client program importing the carrier. Annotated like its siblings.

`ApiRemoteAgentOptions.setup` now takes the inspected session rather than its
header alone: this layer resolves a resumed session's preset from the LOG,
because a session that switched while blank ran its turns under the newer
composition and the header is written once at creation.

Conflicts:
	apps/web/tests/snapshots/*/*.expected.md
	packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
	packages/host/apiproxy/src/api-proxy.ts
	scripts/doc-budgets.manifest.json
This commit is contained in:
Yichen Jiang
2026-08-08 15:00:31 +08:00
649 changed files with 21091 additions and 2838 deletions

View File

@@ -120,7 +120,7 @@ export interface IApiClient {
skills: {
list(payload: RequestPayload<'skill.list'>, signal?: AbortSignal): Promise<RpcResponse<ResponseValue<'skill.list'>>>
}
readonly agentPresets: {
agentPresets: {
list(payload: RequestPayload<'agentPreset.list'>, signal?: AbortSignal): Promise<RpcResponse<ResponseValue<'agentPreset.list'>>>
select(payload: RequestPayload<'agentPreset.select'>, signal?: AbortSignal): Promise<RpcResponse<ResponseValue<'agentPreset.select'>>>
}
@@ -450,11 +450,14 @@ export abstract class AbstractApiClient implements IApiClient {
list: (payload, signal) => this.callUnary('skill.list', payload, signal),
}
readonly agentPresets = {
list: (payload: RequestPayload<'agentPreset.list'>, signal?: AbortSignal) =>
this.callUnary('agentPreset.list', payload, signal),
select: (payload: RequestPayload<'agentPreset.select'>, signal?: AbortSignal) =>
this.callUnary('agentPreset.select', payload, signal),
// Annotated like every sibling, and load-bearing rather than cosmetic:
// inferring this member inlines `AgentPresetEntry` into the emitted
// declaration by the specifier TS picks — the host `index.ts` — which drags
// the whole gateway, and with it the host `Context` merges, into every
// Client program that imports this carrier.
readonly agentPresets: IApiClient['agentPresets'] = {
list: (payload, signal) => this.callUnary('agentPreset.list', payload, signal),
select: (payload, signal) => this.callUnary('agentPreset.select', payload, signal),
}
readonly goals: IApiClient['goals'] = {