/** * Canonical wire contract for moving one personal Shared Todo snapshot into a * Dedicated agent. Both the Cloudflare cutover coordinator and the container * import boundary use this module so validation, bounds, ordering, and digest * verification cannot drift between the two runtimes. */ export declare const SHARED_TODO_CUTOVER_VERSION: 2; export declare const SHARED_TODO_MUTATION_WIRE_VERSION: 1; export declare const MAX_SHARED_TODO_CUTOVER_COUNT = 1000; export declare const MAX_SHARED_TODO_CUTOVER_MUTATION_COUNT = 4096; export declare const MAX_SHARED_TODO_CUTOVER_BYTES: number; export declare const TODO_CUTOVER_PROVENANCE_KEY = "__elizaSharedTodoImport"; export declare const SHARED_TODO_STATUSES: readonly ["pending", "in_progress", "completed", "cancelled"]; export type SharedTodoStatus = (typeof SHARED_TODO_STATUSES)[number]; export declare const SHARED_TODO_MUTATION_OPERATIONS: readonly ["create", "update", "complete", "cancel", "delete", "write", "clear"]; export type SharedTodoMutationOperation = (typeof SHARED_TODO_MUTATION_OPERATIONS)[number]; export type TodoCutoverJsonValue = null | boolean | number | string | TodoCutoverJsonValue[] | { [key: string]: TodoCutoverJsonValue; }; export interface SharedTodoCutoverRecord { sourceId: string; roomId: string | null; worldId: string | null; content: string; activeForm: string; status: SharedTodoStatus; parentSourceId: string | null; parentTrajectoryStepId: string | null; metadata: Record; createdAt: string; updatedAt: string; completedAt: string | null; } export interface SharedTodoMutationCutoverRecord { version: typeof SHARED_TODO_MUTATION_WIRE_VERSION; mutationId: string; idempotencyKey: string; requestDigest: string; operation: SharedTodoMutationOperation; applied: boolean; resultJson: unknown; committedAt: string; } export interface SharedTodoCutoverSnapshot { version: typeof SHARED_TODO_CUTOVER_VERSION; sourceAgentId: string; todos: SharedTodoCutoverRecord[]; mutations: SharedTodoMutationCutoverRecord[]; digest: string; } export declare class TodoCutoverContractError extends Error { readonly code: string; constructor(code: string, message: string); } /** Builds the exact bounded snapshot sent from Shared to Dedicated. */ export declare function createSharedTodoCutoverSnapshot(input: { sourceAgentId: string; todos: readonly unknown[]; mutations: readonly unknown[]; }): Promise; /** Parses and verifies an untrusted snapshot at the Dedicated HTTP boundary. */ export declare function parseSharedTodoCutoverSnapshot(value: unknown): Promise;