/** * REPLAY TOKEN — the auditor's time machine. When a regulated lab/bank gets audited, or a system behaves * unexpectedly, the worst words are "we can't reproduce how that decision was reached." Melete's engines are * fully DETERMINISTIC (seeded; no wall-clock, no randomness), so an analysis is exactly reproducible. The * Replay Token captures everything needed to re-derive a verdict — the measured inputs, the goal — plus a * per-step hash chain and an Ed25519 signature, in one self-contained, offline artifact. * * Hand the token to an auditor and they don't have to trust Melete (or you): they re-run it on their own * machine and get a BYTE-IDENTICAL verdict, step by step (DISCOVER → DECIDE → DIAGNOSE). If even one input * was altered, the signature fails; if the engine ever diverged, the replay names the exact step that * differs. "Here is cryptographic proof of exactly how this decision was reached, re-derivable by anyone, * forever, with no server." * * Honest by construction (DIAKRISIS): a Replay Token reproduces MELETE'S OWN analysis/decision from the * signed inputs — it is the audit trail of the reasoning, NOT a recording of the customer's production RAM / * network / environment (that is a different, kernel-level product). What it proves is real and exact: * provenance (these inputs, this result, unaltered) + reproducibility (re-derivable offline, step by step). */ import { type KeyObject } from "node:crypto"; import { type Space } from "./space.js"; import { type Observation, type Goal } from "./engine.js"; export interface ReplayStep { name: string; hash: string; } export interface ReplayToken { standard: "melete-replay-token/v1"; space: Space; goal: Goal; observations: Observation[]; steps: ReplayStep[]; verdictHash: string; signature: string; publicKeyPem: string; algo: "ed25519+sha256"; issuedAtMs: number; } /** Issue a self-contained, signed Replay Token for an analysis run. */ export declare function issueReplayToken(obs: ReadonlyArray, space: Space, goal?: Goal, opts?: { keys?: { privateKey: KeyObject; publicKey: KeyObject; }; issuedAtMs?: number; }): ReplayToken; export interface ReplayResult { signatureValid: boolean; reproduced: boolean; firstDivergingStep: string | null; reason: string; } /** Re-run a Replay Token OFFLINE: check its signature, then deterministically reproduce the verdict step-by-step. */ export declare function replayToken(token: ReplayToken): ReplayResult; export declare function replayGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; //# sourceMappingURL=replay.d.ts.map