/**
 * Canonical JSON serialization for durable execution (DURABLE.1).
 *
 * Two requirements drive this module:
 *
 *   1. `run_id` derivation must be byte-stable across processes — JSON key
 *      order matters, so we sort keys recursively before stringifying.
 *
 *   2. Checkpoint outputs must round-trip through libsql `TEXT` storage and
 *      back into evaluator bindings. JavaScript values that `JSON.stringify`
 *      cannot losslessly handle (Date, Buffer / typed arrays) get tagged
 *      envelopes here and unwrapped on parse:
 *
 *        Date           → string  (ISO 8601)
 *        Buffer         → { __type: 'base64', data: '<base64>' }
 *        Uint8Array     → { __type: 'base64', data: '<base64>' }
 *
 * Anything `JSON.stringify` would normally drop (functions, symbols,
 * `undefined` values inside an object) is also dropped here, matching the
 * stdlib's behavior. Inside arrays, `undefined` becomes `null` — also
 * matching stdlib.
 *
 * Cycles raise a TypeError just like `JSON.stringify` would; primitive
 * authors must not return cyclic outputs.
 *
 * Imports from: nothing (Node stdlib only).
 * Imported by: ./run_id.ts, ./checkpoint_store.ts.
 */
/**
 * Canonical JSON: sorted keys, dates/buffers tagged, deterministic byte
 * output. Drop-in replacement for `JSON.stringify(x)` when stability is
 * required.
 */
export declare function canonicalJsonStringify(value: unknown): string;
/**
 * Inverse of `canonicalJsonStringify` for the tagged-envelope shapes.
 * Plain JSON shapes (string, number, boolean, null, object, array) pass
 * through unchanged.
 *
 * Date envelopes intentionally do NOT exist — we collapsed `Date` to its
 * ISO string on write because the consumer (binding lookup, downstream
 * primitive) can re-parse with `new Date(str)` if needed. Forcing every
 * string-looking ISO to a Date on the read side would mis-restore strings
 * that just happen to look like dates.
 */
export declare function canonicalJsonParse(text: string): unknown;
//# sourceMappingURL=canonical_json.d.ts.map