import { CostBudget, AuthProfile } from '@agentproto/auth'; import { C as ContextContinuityPolicy, A as AdapterAuthDescriptor } from './spawn-defaults-B0Yi8_MN.js'; import { AcpMcpServer } from '@agentproto/acp'; /** * SessionConfig — the unified per-session config surface, decomposed into * orthogonal axes (SPEC §3.1, out-of-repo design doc * `agentproto-session-config-axes/SPEC.md`). Pure types + a `decomposeMode`/ * `composeMode` shim over the legacy AIP-45 `mode` string — no I/O, no runtime * wiring, no adapter behavior change. This is the additive type foundation * (SPEC §7.2 build step 1); the live spawn-path extraction (deleting gateway * modes, sourcing posture from the ACP registry) is a separate later step. * * Boundary note: this module deliberately does NOT import from * `@agentproto/auth`. `packages/runtime` intentionally has no dependency on * that package (`mcp-credential-deps.ts:1-9`), so the named-profile record it * owns — `AuthProfile` (`packages/auth/src/profile-types.ts:24`, shipped in * #470) — is referenced by citation, never redefined here: the `access` axis * only needs a `profileRef` string, and the profile record itself stays in * `@agentproto/auth`. The narrow `AuthMethod` *facet*, by contrast, is * structurally mirrored below (§3.1) — the descriptor's `accessProfile` echo * (§3.7) names it, and mirroring a two-value string union is cheaper than * taking a package dependency on `@agentproto/auth` for it, the same * structural-mirror rationale as `DeclaredAdapterMode` (below) and * `DeclaredAdapterOption` (`spawn-defaults.ts:447`). * * It DOES, however, import a VALUE — the legacy AIP-45 mode-id classification * (`inferLegacyModeKind`) — from `@agentproto/driver-agent-cli` (a lean, * acyclic runtime → driver edge; the driver never depends back on the runtime). * Unlike the type mirrors above (a mirror can't silently break — the compiler * still checks structural compatibility), the gateway/posture id SET is a value * list needed on BOTH sides of the driver/runtime boundary — here for * `decomposeMode` and in the driver's `composeSpawn` back-compat shim — so it * is single-sourced in the driver (its AIP-45 home) rather than copied, which * for a value list WOULD silently drift. Only the daemon-domain canonical- * posture VALUE mapping (`POSTURE_MODE_VALUES`) stays local. */ /** * Reasoning / compute budget label. * * SUPERSET ONLY — this flat union is the documented ceiling, NOT the valid set. * The real accepted values are a function of (adapter × model), resolved at * runtime (SPEC §3.9): the same label maps to a different compute budget across * models, and `"max"` / `"ultracode"` are session-only and model-gated (opus * offers `ultracode`, haiku does not — * `adapters/claude-code/src/index.ts:310-321`). Consumers must resolve the * offerable set per session/model, never treat this enum as authoritative. */ type EffortLevel = "low" | "medium" | "high" | "xhigh" | "max" | "ultracode"; /** * agentproto-canonical posture — a portable, normalized vocabulary for "what * the agent may DO" (SPEC §3.1/§3.4a). A canonical posture resolves to a * harness `SessionModeId` when the session's advertised `availableModes` has an * equivalent (native, enforced, live via `setSessionMode`); otherwise it is * applied as an injected system-prompt preamble (advisory, not a permission * boundary — SPEC risk Rw). */ type CanonicalPosture = "default" | "plan" | "accept-edits" | "bypass" | "read-only"; /** * The posture axis: either an agentproto-canonical posture OR a raw harness * mode id sourced directly from the harness's own ACP mode registry * (`SessionModeState.availableModes` — SDK `types.gen.d.ts:4227`). Postures are * NOT a manifest mode list going forward (SPEC §3.4a); the `{ harnessModeId }` * form carries a native mode the canonical vocabulary doesn't name. */ type Posture = CanonicalPosture | { harnessModeId: string; }; /** * Endpoint / billing rail — model/route config, NOT a mode (SPEC §3.4a). A * gateway is reached by resolving the model's `@route` against the catalog * (`packages/model-catalog/src/route-identity/index.ts:1-46`) and applying its * base_url + credential-scrub on the route apply-path; `access` (which profile * is eligible) is downstream of THIS axis (SPEC §1c). */ interface RouteSpec { /** Preset id ("anthropic"/direct, "moonshot", "openrouter", "requesty", * "deepseek") or a custom id paired with an explicit `baseUrl`. */ gateway: string; /** Resolved base URL; carried only for a custom gateway the catalog can't * resolve. The attached profile's credential is resolved separately (§1c), * never inlined here. */ baseUrl?: string; } /** * What enters context. `"lean"` is executor-specific: the claude-code adapter's * `lean` mode drops bundled skills (`CLAUDE_CODE_DISABLE_BUNDLED_SKILLS`) and * enables deferred tool schemas (`ENABLE_TOOL_SEARCH`); the opencode adapter's * `lean` mode disables the agentproto MCP server (`LEAN_INLINE_CONFIG`). `lean` * is only the built-in default for opencode executors * (`BUILTIN_EXECUTOR_CONTEXT_PROFILE`); `"full"` is the default otherwise. The * `(string & {})` arm keeps a future adapter-declared context profile from * being blocked while preserving literal autocompletion for the known values. */ type ContextProfile = "full" | "lean" | (string & {}); /** * How an attached auth profile authenticates — the narrow eligibility gate, * a *facet* of a named profile (SPEC §1c/§3.1), NOT a session-level enum. A * structural mirror of `@agentproto/auth`'s `AuthMethod` * (`packages/auth/src/profile-types.ts:21`, #470): `"api-key"` ↔ `tokenKind * "pat"`, `"oauth-bearer"` ↔ `tokenKind "oat"` (a subscription bearer). Kept * here — rather than imported — because `packages/runtime` has no dependency * on `@agentproto/auth` (see the boundary note above); only the descriptor's * `accessProfile` echo (§3.7) needs to name it. */ type AuthMethod = "oauth-bearer" | "api-key"; /** * The complete per-session config surface, decomposed into orthogonal axes * (SPEC §3.1). Every field optional; omission = "adapter default" for that * axis. The decomposed axes are the canonical form — persistence and transport * use these fields, never a recomposed legacy `mode` string (SPEC §3.8). */ interface SessionConfig { /** Route-identity ref: `[route:]vendor/product[:pin][@route]` * (`packages/model-catalog/src/route-identity/index.ts:1-46`). */ model?: string; effort?: EffortLevel; /** Attach a NAMED auth profile by id (SPEC §1c). The profile record — * `AuthProfile { id, endpoint, method, credentialRef, label? }` — lives in * `@agentproto/auth` (`packages/auth/src/profile-types.ts:24`, #470), NOT on * the session and NOT in `providers.json`. Omit ⇒ default profile. */ access?: { profileRef?: string; }; /** Endpoint / gateway rail; `access` is downstream of this (SPEC §1c). */ route?: RouteSpec; /** What the agent may DO. */ posture?: Posture; /** What enters context. */ contextProfile?: ContextProfile; /** Windowed cost-budget cap (SPEC §1c). A RESTART-only axis: it is read at * spawn time to auto-attach a governance policy that trips `policy:failed` * when the session's (or its profile's) ROLLING windowed spend crosses the * cap. DISTINCT from the scalar `maxCostUsd` session-kill — a `costBudget` * never kills the session, it only trips a policy. The record lives in * `@agentproto/auth` (`CostBudget { maxCostUsd, window, scope }`). Omit ⇒ no * windowed budget. */ costBudget?: CostBudget; /** Configurable context-continuity policy for this session — controls * warning/compact/continue-fresh thresholds and checkpoint sections. */ contextContinuity?: ContextContinuityPolicy; /** MCP servers mounted into the session. A RESTART-only axis (a restart * re-spawns the agent process, which is what re-mounts MCP servers) — the * same shape `agent_start.mcpServers` takes at spawn time * (`AcpMcpServer`). A restart override REPLACES the prior descriptor's * full list (never merges, same "present axis wins whole" convention as * `model`/`access`) — see `RestartOverrides` in `session-restart-core.ts`. * Omit ⇒ the prior list carries forward unchanged, as restarts always did. */ mcpServers?: AcpMcpServer[]; /** Adapter harness slug — the canonical name for the adapter that runs the * session (e.g. 'claude-code', 'hermes'). This is the same value historically * carried on the wire as `adapter` / `adapterSlug`; the `harness` field is the * canonical descriptor identity and remains optional for back-compat. */ harness?: string; } /** * Manifest-declared AIP-45 mode id + axis discriminant — the minimum * `decomposeMode`/`composeMode` need from `AgentCliMode` (driver `types.ts`). * Mirrors its `id`/`kind` fields structurally rather than importing the full * `AgentCliMode` TYPE surface from `@agentproto/driver-agent-cli` — the same * structural-mirror pattern as `DeclaredAdapterOption` (`spawn-defaults.ts:447`) * and `DeclaredAdapterPreset` (`preset-tools.ts`). (The module does take a * value-level import — `inferLegacyModeKind` — from that package; see the * boundary note at the top for why a shared value list is single-sourced, not * mirrored.) * * `kind` narrows to a single meaningful value going forward — `"context"` (the * one axis with no ACP-protocol home); routes come from the catalog and * postures from the harness's ACP registry (SPEC §3.4a). `"posture"`/`"route"` * remain accepted so `decomposeMode` can still classify a LEGACY tagged * manifest during migration. */ interface DeclaredAdapterMode { id: string; kind?: "posture" | "route" | "context"; } /** * Map ONE legacy `mode` id (AIP-45 `modes[]`) onto its orthogonal axis * (SPEC §3.5). Classification order: (1) the mode's own explicit `kind` tag; * (2) inference over well-known ids (gateway ids ⇒ route, known posture ids ⇒ * posture); (3) a truly-unknown id defaults to `contextProfile` — * least-privilege, since defaulting to `posture` or `route` could silently * grant elevated permissions or reroute billing (SPEC risk R4). * * Always yields a `CanonicalPosture` for the posture axis, never a * `{ harnessModeId }` — the shim speaks the portable vocabulary only; raw * harness modes come from the ACP registry, not a legacy `mode` id. */ declare function decomposeMode(modes: readonly DeclaredAdapterMode[], modeId: string): Partial; /** * The reverse of `decomposeMode` — picks the single legacy mode id whose * decomposition matches `cfg`. * * LOSSY / display-and-back-compat ONLY (SPEC §3.8). A single legacy `mode` * string cannot represent an orthogonal combination — `{ posture: "plan", * route: { gateway: "moonshot" } }` has no single legacy id — so `composeMode` * returns the FIRST declared mode whose axis matches and silently drops the * rest. It is NEVER a storage or transport form: the driver applies each axis's * env/argv patch directly, and anything that must persist/transmit config uses * the decomposed axes. Returns undefined when no declared mode matches. */ declare function composeMode(cfg: Partial, modes: readonly DeclaredAdapterMode[]): string | undefined; /** * The router routes the catalog widens over, and the router-prefixed id * normalization that goes with them. Kept in their own small module so the * session pricing path (`usage.ts`) can share them without importing * `catalog-models.ts`; internal to the package (not a published subpath). */ /** Routers the catalog probes to widen beyond any adapter's declared model * list (SPEC §5.1) — the same routes route-identity resolves from generated * tables (`route-identity/index.ts`'s imports). Exported so `model-wire.ts` * can reuse the SAME set when deciding whether a wire model needs a literal * router-prefix (never a second hand-maintained list). * * `opencode-go` / `opencode` (OpenCode Go and Zen) widen just like the other * three, but their tables are keyed `/` rather than * `/`, so a probe of `${vendor}/${product}@opencode-go` can * only ever hit when the vendor segment IS `opencode-go` — no other model can * pick up a spurious OpenCode route. What this buys: `serviceableModelRoutes` * answers `["opencode-go"]` for `opencode-go/glm-5.3` instead of `[]`, so the * Configuration Lab / VS Code pickers resolve its route (and don't flag it * unroutable), and `normalizeModelForWire` keeps the provider as the literal * leading wire segment opencode itself requires. */ declare const WIDENING_ROUTES: readonly ["openrouter", "requesty", "huggingface", "opencode-go", "opencode"]; /** * Read-only catalog/vendor endpoint (`agentproto-session-config-axes` * SPEC §5) — `GET /catalog/models` + `catalog_models` MCP tool wire into * {@link buildCatalogModels}, the pure join this module owns. * * Reuses three already-shipped pieces instead of rebuilding them: * - the vendor/product/route model + router widening (OpenRouter/ * Requesty/HuggingFace) from `@agentproto/model-catalog/route-identity` * (`resolveLlmModelRoute`, `route-identity/index.ts:396-511`) — this is * what keeps the catalog from being capped at any one adapter's * `models.allowed` list (SPEC §5.1); * - the profile eligibility predicate shipped in #470 * (`@agentproto/auth`'s `eligibleProfiles`, `packages/auth/src/ * eligibility.ts:81-89`) for the profile-aware `runnable` flag (SPEC * §5.3) — the old bare `hasKey` check (`packages/cli/src/commands/ * models.ts:113-117`) is the degenerate one-profile-per-provider case * this predicate subsumes; * - `AdapterAuthDescriptor` (`spawn-defaults.ts:226`), the SAME * provider/authSubscription projection `resolveAuthSpec` reads, as the * source for which auth methods an adapter can present on its direct * route (SPEC §3.4's derivable replacement for a hand-maintained * `authSubscription` boolean). * * A gateway/router route (anything where the resolved route differs from * the model's vendor — `openrouter`, `requesty`, `huggingface`, or an * adapter's own gateway mode id like `moonshot`) always bills against the * route's own id and is always reached with an api-key credential — never * oauth-bearer, since no third-party gateway has an Anthropic-style * subscription bearer path (SPEC §1c: "a moonshot profile, not the Claude * sub"). That structural rule is what lets this module compute * `runnable`/`eligibleProfiles` for the widened, non-curated rows without * per-adapter gateway-vendor tables. */ /** One model entry as declared in an adapter's `models.allowed` * (`AdapterModelInfo`, `packages/cli/src/registry/resolve.ts:134-142`) — * the subset this module needs. */ interface CatalogAdapterModelInput { /** Model id exactly as declared — bare (`"claude-opus-4-8"`) or * `vendor/product` form. */ id: string; /** The billing provider/route this model entry reaches on (` * AdapterModelInfo.provider`) — e.g. `"moonshot"` or `"openrouter"`. * Takes precedence over the id's own implied vendor route. */ provider?: string; /** The adapter mode id that must be applied to reach this model on a * non-direct route (`AdapterModelInfo.mode`) — e.g. `"moonshot"`. * Undefined ⇒ direct route (the model's own vendor, or `provider`). */ mode?: string; } /** One installed adapter's contribution to the catalog. */ interface CatalogAdapterInput { slug: string; models: readonly CatalogAdapterModelInput[]; /** This adapter's billing-auth capability on its DIRECT route — the same * projection `resolveAuthSpec` reads (`spawn-defaults.ts:226`). Omitted * ⇒ the adapter presents no auth method, so rows it curates are * discoverable but never runnable through it alone. */ authDescriptor?: AdapterAuthDescriptor; /** How this adapter's spawn ROUTE relates to the chosen model (AIP-45 * launch-menu drill-down). `"free"` = the adapter can route arbitrary * models through gateways (`base_url`). `"derived-from-model"` = the * endpoint falls out of the model id's vendor prefix. Absent/undefined * ⇒ fixed single-provider adapter; widened gateway routes are not * attached to it. */ routeSelection?: "free" | "derived-from-model"; } interface CatalogModelsQuery { /** Keep only routes reachable via this adapter slug. */ adapter?: string; /** Keep only this vendor's entry. */ vendor?: string; /** Keep only routes with this route id. */ route?: string; /** Drop every route with `runnable: false`. */ runnableOnly?: boolean; } interface CatalogPricing { inPer1M: number; outPer1M: number; } interface CatalogRoute { route: string; ref: string; baseUrl: string | null; pricing: CatalogPricing | null; /** Human-readable max input tokens (e.g. `"1M"`, `"200k"`), from the * live-synced CONTEXT_WINDOWS table (`resolveContextWindow`); null when * no synced provider carries this id. Consumers wanting the raw integer * can re-resolve via `resolveContextWindow(ref product)` or parse. */ contextWindow: string | null; /** Human-readable max output tokens (same source/format), null when the * source doesn't publish a completion cap for this id. */ maxOutput: string | null; runnable: boolean; eligibleProfiles: string[]; adapterModes: string[]; adapters: string[]; curated: boolean; /** * True when MORE THAN ONE distinct model is servable on this route across * the whole catalog join (AIP-45 launch-menu drill-down, SPEC §3/§5.3). * Derived from the model×route join, never a hand-maintained table: * `anthropic`/`openrouter`/`llm-endpoint` serve many models (`true`), * a single-model gateway like `moonshot` serves one (`false`). A * single-model route pins every model tier to its one model downstream, * and gates the custom-gateway A-vs-B promotion (SPEC D5). Independent of * the caller's query filters — this is the route's intrinsic capacity, so * the same route reports the same `multiModel` in a filtered response. */ multiModel: boolean; } /** * One route's servable-model index (SPEC §3.9) — the flat, per-route view * that lets a capability-derived UI derive tier pinning without re-walking * the vendor/product tree. `servableModels` is the set of `vendor/product` * model identities reachable on this route across the whole join; * `multiModel` is `servableModels.length > 1` (the same value carried on * every {@link CatalogRoute} with this id). Always the full, unfiltered * catalog capacity, independent of the query — a route's model-count is * intrinsic, not a view of the filtered result. */ interface CatalogRouteSummary { route: string; servableModels: string[]; multiModel: boolean; } interface CatalogProduct { product: string; routes: CatalogRoute[]; } interface CatalogVendor { vendor: string; products: CatalogProduct[]; } interface CatalogModelsResponse { vendors: CatalogVendor[]; /** * Flat servable-models-per-route index (SPEC §3.9), one entry per distinct * route id in the catalog, sorted by route. Exposes the same join the * nested `multiModel` flags derive from, so a capability layer can compute * tier pinning per route without re-walking the vendor tree. Always the * full, unfiltered catalog capacity (see {@link CatalogRouteSummary}). */ routes: CatalogRouteSummary[]; } interface BuildCatalogModelsInput { adapters: readonly CatalogAdapterInput[]; profiles: readonly AuthProfile[]; query?: CatalogModelsQuery; } /** The pure join (SPEC §5): adapter-declared models + router widening + * the #470 eligibility predicate → the vendor/product/route tree. No I/O — * callers (the HTTP route / MCP tool) own loading adapters + profiles. */ declare function buildCatalogModels(input: BuildCatalogModelsInput): CatalogModelsResponse; /** * Resolve the effective billing route for a session: a parseable model ref's * own route is authoritative, `routeGateway` is only consulted when the model * carries no explicit `@route` or is unparseable (including router-prefixed ids * like `openrouter/vendor/product`, which are normalized to the canonical * suffix form first). */ declare function resolveEffectiveRoute(model: string | undefined, routeGateway: string | undefined): string | undefined; /** Rewrite `model`'s `@route` suffix to `route`. Bare/unparseable ids are * returned unchanged because they have no suffix to rewrite. */ declare function modelWithRoute(model: string, route: string): string; /** * Reconcile independent `model` and `route` overrides so they never describe * two different billing endpoints. Returns the effective values; mutating * callers replace their effective model/route with these results. * * Rules: * - explicit `@route` on the model wins over a stale/conflicting route.gateway; * - a route-only override rewrites a parseable model string to match; * - a model-only override synthesizes a route field whenever the model's * resolved route differs from the previous route.gateway; * - passing BOTH overrides that contradict each other is a caller bug → throw. */ declare function reconcileModelRoute(input: { prevModel?: string; prevRoute?: RouteSpec; model?: string; route?: RouteSpec; }): { model?: string; route?: RouteSpec; }; /** * The billing routes that can service `model`, reusing the SAME route-identity * resolution this module's catalog join uses (SPEC §1c serviceability) — never * a parallel per-model provider table. A route R services the model iff: * - R is the model's catalog billing provider (`getModelProvider` — the native * vendor SDK for a bare/direct id, or the router for a gateway-only slash id * like `deepseek/deepseek-v4-pro` ⇒ `openrouter`), * - R is an explicit `@route` carried in the id (`…@openrouter`), or * - the model resolves on R as one of the {@link WIDENING_ROUTES} router routes * (catches requesty-only ids like `sference/…` that carry no pricing-catalog * `provider` for `getModelProvider` to return). * * Returns the DISTINCT serviceable routes; EMPTY when the model is unknown to * the catalog — a mismatch cannot then be positively proven, so a money-safety * caller MUST NOT reject on an empty result (only on a non-empty set that * excludes the resolved wallet). See {@link checkModelWalletEligibility}. */ declare function serviceableModelRoutes(model: string): string[]; /** * Closest known catalog model ids for a slug UNKNOWN to the local catalog — * the "did you mean" set behind the spawn-time model advisory (session-spawn.ts). * * Deliberately narrow to keep false positives near zero: a known id qualifies * ONLY when its {@link bareProduct} equals the input's while the full id * differs — i.e. the caller used the wrong-or-missing vendor/route prefix * (`deepseek-chat` → `deepseek/deepseek-chat`, `glm-5.2` → `z-ai/glm-5.2`, * `moonshot/kimi-k2` → `moonshotai/kimi-k2`). A genuinely-new model on a known * vendor (`qwen/qwen4-max` when only `qwen3-max` is catalogued) shares no bare * product and yields nothing — so a new / free-form slug never earns a spurious * suggestion, matching the money-safety guard's own never-reject-an-unknown- * model rule. Sourced from the catalog itself (`LLM_PRICING_CATALOG` + * `MODEL_ALIASES` keys), never a hand-maintained second list. */ declare function suggestModelSlugs(model: string): string[]; /** Verdict of the spawn-time money-safety guard ({@link checkModelWalletEligibility}). */ interface ModelWalletEligibility { ok: boolean; /** Serviceable routes for the model that DIFFER from the resolved wallet — * the actionable set to re-spawn onto. Empty when `ok`. */ suggestedRoutes: string[]; } /** * Money-safety spawn guard (SPEC §1c): can the resolved billing wallet * `walletRoute` (the gateway id when a `route.gateway` is set, else the resolved * billing provider) service `model`? Reuses {@link serviceableModelRoutes} — no * parallel table. Returns `ok:true` when the model is serviceable on the wallet, * OR when the model is unknown to the catalog (empty serviceable set — a mismatch * cannot be positively proven, so the guard must not reject a possibly-legitimate * new model). Returns `ok:false` with the serviceable alternative routes ONLY * when the model IS serviceable on some route but NOT the resolved wallet — the * exact 404-upstream case (`deepseek/deepseek-v4-pro` on the Anthropic sub). The * guard only REJECTS; it never substitutes a wallet the operator didn't name. */ declare function checkModelWalletEligibility(model: string, walletRoute: string): ModelWalletEligibility; /** Verdict of the spawn-time adapter-capability guard * ({@link checkModelAdapterEligibility}). */ interface ModelAdapterEligibility { ok: boolean; /** Other installed adapters whose catalog row already curates this exact * model on this exact route — the actionable set to re-spawn onto. Empty * when `ok`, or when NO installed adapter (this one included) curates the * combination — nobody has proven it reachable at all, so this guard has * nothing to reject on. */ compatibleAdapters: string[]; } /** * Adapter-capability spawn guard: the money-safety guard above * ({@link checkModelWalletEligibility}) proves the resolved ROUTE can bill * `model`; it says nothing about whether THIS adapter's own manifest can * actually reach it there. A fixed hand-curated client (claude-code's ACP * wrapper validates every model id against its own live selector and 404s on * anything it doesn't recognize) can be routeSelection:"free" — genuinely able * to reach several gateways — while still only supporting a small, explicitly * vetted model list on each one. A pass-through client (opencode/mastracode/ * hermes/jcode, routeSelection:"derived-from-model") instead auto-derives a * broad curated list straight from the pricing catalog, so it ends up * supporting far more of a gateway's models without needing a per-model * allowlist maintained by hand. * * Takes the SAME `CatalogModelsResponse` shape `buildCatalogModels` (and * therefore `catalog_models`) produces — reusing that exact join, never a * parallel per-adapter table — and looks up whether `adapterSlug` is among * the resolved (vendor, product, route) row's `adapters`. * * `ok:true` when EITHER no installed adapter's catalog row covers this exact * model+route (nobody has proven it servable at all — the same never-reject- * an-unknown-combination stance {@link checkModelWalletEligibility} takes), OR * `adapterSlug` is already among the row's adapters. `ok:false` only when the * row exists and excludes `adapterSlug` — a proven "wrong client for this * model" mismatch, with the row's other adapters (if any) as the actionable * alternative. */ declare function checkModelAdapterEligibility(catalog: CatalogModelsResponse, adapterSlug: string, model: string, route: string): ModelAdapterEligibility; /** * The actionable fail-fast message for {@link checkModelAdapterEligibility} — * names the adapters that DO already curate the model on this route (when any * do) so the operator can re-spawn without opening the catalog by hand. Never * auto-switches adapters for the operator; only rejects. */ declare function modelAdapterIncompatibleMessage(opts: { prefix: string; adapter: string; model: string; route: string; compatibleAdapters: string[]; }): string; /** * The actionable fail-fast message shared by both spawn paths (session-spawn + * session-restart-core) so they never drift. Names the wallet that couldn't * service the model AND the required route + api-key profile to re-spawn onto — * never a wallet the guard picked for the operator. */ declare function modelWalletIneligibleMessage(opts: { prefix: string; adapter: string; model: string; walletRoute: string; walletMode?: "subscription" | "api-key"; suggestedRoutes: string[]; }): string; export { type AuthMethod as A, type BuildCatalogModelsInput as B, type ContextProfile as C, type DeclaredAdapterMode as D, type EffortLevel as E, type ModelAdapterEligibility as M, type Posture as P, type RouteSpec as R, type SessionConfig as S, WIDENING_ROUTES as W, type CanonicalPosture as a, type CatalogAdapterInput as b, type CatalogAdapterModelInput as c, type CatalogModelsQuery as d, type CatalogModelsResponse as e, type CatalogPricing as f, type CatalogProduct as g, type CatalogRoute as h, type CatalogRouteSummary as i, type CatalogVendor as j, buildCatalogModels as k, composeMode as l, decomposeMode as m, type ModelWalletEligibility as n, checkModelAdapterEligibility as o, checkModelWalletEligibility as p, modelAdapterIncompatibleMessage as q, modelWalletIneligibleMessage as r, modelWithRoute as s, reconcileModelRoute as t, resolveEffectiveRoute as u, serviceableModelRoutes as v, suggestModelSlugs as w };