import type { EvoComponentSelection } from "../types.ts"; export interface EvoAbiDefinition { id: string; surface: string; activationBoundary: "turn" | "session" | "process" | "invocation"; capabilityCeiling: readonly string[]; validateConfig(value: unknown): TConfig; validateInput(value: unknown): TInput; validateOutput(value: unknown): TOutput; } export declare class EvoAbiRegistry { private readonly definitions; register(definition: EvoAbiDefinition): void; get(id: string): EvoAbiDefinition | undefined; require(id: string): EvoAbiDefinition; list(): EvoAbiDefinition[]; validateSelection(surface: string, selection: EvoComponentSelection): unknown; } export interface CompactionV1Input { conversation: string; previousSummary?: string; firstKeptEntryId: string; tokensBefore: number; reason: "manual" | "threshold" | "overflow"; customInstructions?: string; } export interface CompactionV1Output { summary: string; firstKeptEntryId: string; details?: unknown; metrics?: { durationMs?: number; inputTokens?: number; outputTokens?: number; }; } export interface CompactionV1Config { maxSummaryTokens?: number; style?: "structured" | "narrative"; } export declare const COMPACTION_V1_ABI: EvoAbiDefinition; export interface ContextV1TransformInput { mode: "transform"; messages: unknown[]; tokenEstimate?: number; contextWindow?: number; model?: string; reason: "turn"; } export interface ContextV1CheckpointInput { mode: "checkpoint"; conversation: string; previousSummary?: string; firstKeptEntryId: string; tokensBefore: number; reason: "manual" | "threshold" | "overflow"; customInstructions?: string; } export type ContextV1Input = ContextV1TransformInput | ContextV1CheckpointInput; export interface ContextV1TransformOutput { messages: unknown[]; } export interface ContextV1CheckpointOutput { summary: string; firstKeptEntryId: string; details?: unknown; metrics?: { durationMs?: number; inputTokens?: number; outputTokens?: number; }; } export type ContextV1Output = ContextV1TransformOutput | ContextV1CheckpointOutput; export interface ContextV1Config { maxSummaryTokens?: number; style?: "structured" | "narrative"; } export declare const CONTEXT_V1_ABI: EvoAbiDefinition; export interface GuardV1BeforeInput { mode: "before"; toolCallId: string; toolName: string; args: Record; } export interface GuardV1AfterInput { mode: "after"; toolCallId: string; toolName: string; args: Record; content: unknown[]; details?: unknown; isError: boolean; } export type GuardV1Input = GuardV1BeforeInput | GuardV1AfterInput; export interface GuardV1BeforeOutput { mode: "before"; block?: boolean; reason?: string; args?: Record; } export interface GuardV1AfterOutput { mode: "after"; content?: unknown[]; details?: unknown; isError?: boolean; terminate?: boolean; } export type GuardV1Output = GuardV1BeforeOutput | GuardV1AfterOutput; export declare const GUARD_V1_ABI: EvoAbiDefinition>; export interface InstructionsV1Input { systemPrompt: string; options: Record; } export interface InstructionsV1Section { name?: string; content: string; } export type InstructionsV1Output = { systemPrompt: string; } | { sections: InstructionsV1Section[]; }; export declare const INSTRUCTIONS_V1_ABI: EvoAbiDefinition>; export interface GenerationV1Input { message: Record; } export interface GenerationV1Output { message?: Record; redo?: boolean; stopReason?: "stop" | "length" | "toolUse" | "error" | "aborted"; } export declare const GENERATION_V1_ABI: EvoAbiDefinition>; export interface ControlV1Usage { tokens: number | null; contextWindow: number; percent: number | null; } export interface ControlV1Input { turnIndex: number; message: Record; toolResults: Record[]; usage?: ControlV1Usage; model?: string; reasoning?: string; } export interface ControlV1Output { stop?: boolean; model?: string; reasoning?: string; memoryDeltas?: Record[]; } export declare const CONTROL_V1_ABI: EvoAbiDefinition>; export interface ToolV1Input { params: Record; } export type ToolV1Content = { type: "text"; text: string; textSignature?: string; } | { type: "image"; data: string; mimeType: string; }; export interface ToolV1Output { content: ToolV1Content[]; details: unknown; addedToolNames?: string[]; terminate?: boolean; } export declare const TOOL_V1_ABI: EvoAbiDefinition>; export interface MemoryV1RecallInput { mode: "recall"; query: string; } export interface MemoryV1EncodeInput { mode: "encode"; turnDigest: Record; } export interface MemoryV1ConsolidateInput { mode: "consolidate"; candidates: Record[]; } export type MemoryV1Input = MemoryV1RecallInput | MemoryV1EncodeInput | MemoryV1ConsolidateInput; export interface MemoryV1RecallOutput { mode: "recall"; fragments: Record[]; } export interface MemoryV1EncodeOutput { mode: "encode"; writes: Record[]; updates: Record[]; forgets: string[]; } export interface MemoryV1ConsolidateOutput { mode: "consolidate"; merged: Record[]; insights: Record[]; forget: string[]; } export type MemoryV1Output = MemoryV1RecallOutput | MemoryV1EncodeOutput | MemoryV1ConsolidateOutput; export declare const MEMORY_V1_ABI: EvoAbiDefinition>; export interface WorkflowV1Host { /** Default provider/model route for spawned child agents. */ model?: string; /** Tool names the spawn-agent grant allows. */ tools?: string[]; /** Per-call output token ceiling from the spawn-agent grant. */ maxOutputTokensPerCall?: number; } export interface WorkflowV1Input { trigger: string; args: Record; host?: WorkflowV1Host; } export interface WorkflowV1Output { result: unknown; } export declare const WORKFLOW_V1_ABI: EvoAbiDefinition>; export declare function createDefaultEvoAbiRegistry(): EvoAbiRegistry; //# sourceMappingURL=registry.d.ts.map