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 files changed
+21091 -2838

No files matched your search

+6
View File
@@ -56,6 +56,7 @@ export type { SettingsApi, SettingsNamespaceView, SettingsPathOpView, SettingsSe
export type { CredentialsApi, CredentialView } from './credentials.ts'
export type { ConfigurableProviderView, DiscoveredModelView, LlmApi } from './llm.ts'
export type { ApprovalResponsePayload } from './approvals.ts'
export type { QuestionResponsePayload } from './questions.ts'
// ---- Message layer: narrow forms (domain-signature view) ----
@@ -74,6 +75,11 @@ export type {
// ---- Errors and ids ----
export { RpcId, transportError } from './rpc.ts'
export type { RpcError, RpcErrorCode, RpcErrorDetailsMap, RpcResult } from './rpc.ts'
export {
clientRequestSchema,
serverRequestSchema,
serverResponseSchema,
} from './rpc.schema.ts'
// ---- Fixed session-search product bounds ----
export {
@@ -16,6 +16,7 @@ export const configurableProviderViewSchema = z.object({
settingsNs: z.string(),
settingsPath: z.array(z.string()),
active: z.boolean(),
declared: z.boolean().optional(),
}) satisfies z.ZodType<Wire<ConfigurableProviderView>>
/** llm.providers request payload. */
+6
View File
@@ -22,6 +22,12 @@ export interface ConfigurableProviderView {
settingsPath: string[]
/** Whether the route is currently registered (its models are requestable). */
active: boolean
/**
* Whether the owning adapter knows this route only because configuration
* declared it. Absent when the adapter draws no such distinction, so a
* surface must treat absence as "unknown", not as "shipped".
*/
declared?: boolean
}
/** Llm-domain unary methods (the map keys llm.* of RpcMethodMap). */
@@ -227,6 +227,7 @@ export const sessionModelsRequestSchema = z.object({
/** session.models response value. */
export const sessionModelsValueSchema = z.object({
current: modelTargetSchema,
routable: z.boolean(),
groups: z.array(modelProviderGroupSchema),
failures: z.array(modelCatalogFailureSchema),
}) satisfies z.ZodType<Wire<ResponseValue<'session.models'>>>
@@ -117,6 +117,15 @@ export interface ModelCatalogFailure {
export interface SessionModels {
/** Target selected for the session's next assembled step. */
current: ModelTarget
/**
* Whether an adapter currently serves `current.provider`, and therefore
* whether this session can start a turn at all. Deliberately NOT derivable
* from `groups`: catalog membership is advisory, so a route serving a model
* it stopped advertising is absent from the groups yet perfectly usable,
* while a route whose adapter is gone can serve nothing. A surface that
* blocks input must read this rather than the groups.
*/
routable: boolean
/** Successfully loaded provider groups. */
groups: ModelProviderGroup[]
/** Provider-local failures; successful groups remain usable. */