/** Agent-preset policy kept independent from the Ink surface. */ import type { Context } from '@deepseek-ai/cordis'; import type { Agent } from '@deepseek-ai/dsh-agent'; import type { AgentPreset, AgentPresets } from '@deepseek-ai/dsh-agent-presets'; import type { Session, SessionEvent } from '@deepseek-ai/dsh-session'; /** One discoverable agent composition. */ export type PresetRow = AgentPreset; /** Public compatibility alias for the official upstream service type. */ export type AgentPresetsService = AgentPresets; /** Read an optional Cordis service without requiring its package at build time. */ export declare function agentPresetsFrom(ctx: Context): AgentPresetsService | undefined; /** A preset may change only before the first durable turn begins. */ export declare function isBlankSession(events: readonly SessionEvent[]): boolean; /** Translate a preset id recorded before an upstream rename to its current id. */ export declare function normalizePresetId(id: string): string; export declare function normalizePresetId(id: string | undefined): string | undefined; /** Latest logged selection wins; legacy sessions deliberately fall back to standard. */ export declare function resolvePreset(session: Pick): string; /** Resolve a pre-session choice, or recompose an active blank Agent. */ export declare function selectPreset(service: AgentPresetsService, agent: Agent | undefined, presetId: string): Promise; /** Recompose atomically from the caller's perspective, logging only success. */ export declare function switchPreset(service: AgentPresetsService, agent: Agent, presetId: string): Promise;