import type { Rule } from "./v2/types"; export type V2AgentMode = "subagent" | "primary" | "all"; /** * The v2 `Agent.Info` subset corvus contributes. Every field is optional: the * registrar assigns only what is present, leaving the host's `Info.default` * baseline (and its `external_directory` allows) intact. */ export interface V2AgentFields { readonly description?: string; readonly mode?: V2AgentMode; readonly color?: string; /** v1 `prompt` (the markdown body) under its v2 name. */ readonly system?: string; /** * Values to assign INTO `request.body` key by key. Never assign this object * wholesale onto the draft: that would drop whatever the host already put * there. */ readonly request?: { readonly body: { readonly temperature: number; }; }; /** * Ordered rules to APPEND to `permissions`, never to assign — assigning would * wipe the host baseline. Order is precedence (last match wins). */ readonly permissions?: readonly Rule[]; } /** One parsed v1 agent file, as `loadAgents` returns it. */ export interface V1AgentSource { /** Agent id — the `loadAgents` record key (filename without `.md`). */ readonly name: string; /** The `loadAgents` entry: frontmatter keys plus the synthesized `prompt`. */ readonly config: Readonly>; /** Label used in warnings and errors. Defaults to `.md`. */ readonly file?: string; } export interface V2AgentTranslation { readonly fields: V2AgentFields; /** Human-readable notices for the registrar to log. Empty on a clean file. */ readonly warnings: readonly string[]; } /** * Translate one v1 agent into its v2 field set. * * Unknown frontmatter keys are dropped, each one reported as a `:` * warning. Everything else is VALIDATED FIRST: an invalid `mode`, `color`, * `temperature`, `description`, `system`, or `permission` shape throws before any * field set is produced, so the caller either gets a fully valid translation or * an error — never a half-translated agent. The registrar decides whether to * isolate the offending agent or abort the whole load. * * @throws Error prefixed with the file label, describing the offending key. */ export declare function toV2Agent({ name, config, file }: V1AgentSource): V2AgentTranslation; //# sourceMappingURL=to-v2-agent.d.ts.map