/** * Serialization * * Safe JSON serialization handling circular references, functions, and errors. * Also provides action sanitization to remove sensitive data before storage/exposure. */ import type { Action } from "@gizmo-ai/runtime"; /** * Check if a value can be serialized to JSON * * Returns false for values containing functions, which can't be sent over SSE. * Used to auto-filter slices that can't be broadcast (e.g., agent.tools with execute functions). */ export declare function isSerializable(value: unknown): boolean; /** * Safely serialize a value to JSON * * Handles: * - Circular references (replaced with "[Circular]") * - Functions (replaced with "[Function]") * - Error objects (serialized as { name, message, stack }) */ export declare function safeSerialize(value: unknown): string; /** * Remove sensitive data from actions before storing/exposing * * Recursively redacts known sensitive fields like passwords, API keys, tokens, etc. */ export declare function sanitizeAction(action: Action): Action; //# sourceMappingURL=serialization.d.ts.map