/** * set-agent-engine — validates and writes the default model (the * `agent-engine` setting) for the caller's organization. */ import { type ActionRunContext } from "../../action.js"; import { type DefaultAgentEngineChangeMeta, type DefaultAgentEngineContext } from "../../agent/default-agent-engine.js"; import { type AgentEngineStatusResult } from "../../agent/engine-status.js"; import type { ActionTool } from "../../agent/types.js"; export declare const tool: ActionTool; export declare const DEFAULT_MODEL_ADMIN_REQUIRED_ERROR_CODE = "default_model_admin_required"; export type SelectDefaultAgentEngineResult = { status: "selected"; engine: string; model: string; requestedModel: string; label: string; scope: "org" | "user"; appId?: string; effective: Pick & { source?: "configuration" | "app-default" | "org" | "user" | "legacy" | "app_secrets" | "env"; }; } | { status: "refused"; message: string; } | { status: "invalid"; message: string; } | { status: "missing-credentials"; message: string; } | { status: "unavailable"; message: string; }; export declare function resolveDefaultModelEffective(ctx: DefaultAgentEngineContext, appId: string | null, planned?: { sharedDefault?: { engine: string; model: string; }; appDefault?: { engine: string; model: string; } | null; }): Promise["effective"]>; export declare function effectiveConfigurationMessage(effective: Extract["effective"], messages: { configurationOverride: string; configurationUnavailable: string; }): string; /** * Validate an engine/model pair and save it as the default for the caller's * scope. Shared by the `set` action and the provider-key save route so both * apply the same role check, validation, and audit record. */ export declare function selectDefaultAgentEngine(input: { engine?: string; model?: string; appId?: string; }, meta: DefaultAgentEngineChangeMeta, ctx?: DefaultAgentEngineContext): Promise; export declare function run(args: Record, context?: ActionRunContext): Promise;