/**
 * Per-tool contract for `switch_mode` — host-mediated user-gesture tool.
 *
 * The contract owns transition validation (against `getCurrentMode()`) and
 * the host-tool dispatch. Side effects on resolution (mode swap, next-turn
 * kick-off, stream resume on rejection) and tool-list gating (omitting
 * `switch_mode` when `autoPlan === false`) are the composition root's job.
 */
import { type HostToolRequest, type HostToolRuntimeHandoff, type ToolContract, type ToolLlmOptionsBase } from '../../../contracts/host-tool.js';
export declare const SWITCH_MODE_KIND: "switchMode";
export type SwitchModeKind = typeof SWITCH_MODE_KIND;
/** Modes the agent can be in. Mirrors AgentExecuteCodeMode at the type level. */
export type AgentMode = 'action' | 'plan' | 'ask' | 'manage' | 'shorty' | 'review';
/**
 * Modes the agent can switch *to* via this tool. `ask`, `manage`, `shorty`, and
 * `review` are sinks — the agent cannot transition out of them, and they are never the
 * target of a switch_mode call (only user UI gestures can land you there).
 */
export type SwitchableMode = 'action' | 'plan';
export type SwitchModeStatus = 'SUCCESS' | 'REJECTED';
export interface SwitchModeParams {
    readonly target_mode: SwitchableMode;
    readonly reason: string;
}
/** Adapter's result once the user resolves the gesture. */
export interface SwitchModeResolution {
    readonly status: SwitchModeStatus;
    readonly detail?: string;
}
/** Final artifact recorded in history. */
export interface SwitchModeDetails {
    readonly accepted: boolean;
    readonly switch_status: SwitchModeStatus;
    readonly target_mode: SwitchableMode;
    readonly reason: string;
    readonly detail?: string;
}
export type SwitchModeRequest = HostToolRequest & {
    readonly kind: SwitchModeKind;
    readonly params: SwitchModeParams;
};
/**
 * `getCurrentMode` is read fresh per `execute(...)` so mid-session UI mode
 * changes are reflected without rebuilding the tool definition.
 */
export interface SwitchModeLlmOptions extends ToolLlmOptionsBase {
    readonly getCurrentMode: () => AgentMode;
    readonly applyRuntimeHandoff?: (handoff: HostToolRuntimeHandoff) => void | Promise<void>;
}
export declare const SWITCH_MODE_TARGET_MODE_DESCRIPTION = "The mode to switch to: 'plan' or 'action'";
export declare const SWITCH_MODE_REASON_DESCRIPTION = "\nThe content to pass to the new mode. This becomes the user's message to start the new session.\n\nCRITICAL: Write this in FIRST PERSON from the user's perspective, as if the user is saying it directly.\n- WRONG: \"The user wants to fix the formula errors in Sheet1\"\n- RIGHT: \"Fix the formula errors in Sheet1\"\n\nKeep it actionable and direct. For plan\u2192action transitions, include the implementation plan.\n";
/** Compose the description per the agent's *current* mode. */
export declare function buildSwitchModeDescription(currentMode: AgentMode): string;
/**
 * Static fallback used by tool catalogs that snapshot tools at boot. Real
 * agent flows read the dynamic description through createLlmTool, which
 * recomputes it per build using getCurrentMode().
 */
export declare const SWITCH_MODE_TOOL_DESCRIPTION: string;
export declare const switchModeContract: ToolContract<SwitchModeParams, SwitchModeDetails, SwitchModeLlmOptions>;
//# sourceMappingURL=contract.d.ts.map