/**
 * Roll-up drift catalogs across pack layers (Task 5.4).
 *
 * Per `docs/opensquid-real-design.md` §"Phases 2–7 summary" Phase 5: every
 * pack writes its own `drift-catalog.jsonl` under
 * `~/.opensquid/packs/<id>/state/`, and the session writes a session-level
 * `drift-catalog.jsonl` under `~/.opensquid/sessions/<id>/state/`. The
 * runtime exposes the AGGREGATED view; pack-level catalogs are the
 * source-of-truth on disk, never mutated by the reader.
 *
 * `readAllDriftCatalogs` is the read-side companion. It walks every
 * supplied pack id + the session catalog, parses JSONL line-by-line,
 * decorates each event with its `pack` provenance, and chronologically
 * sorts the merged list by `timestamp`. Missing files are silently OK
 * (ENOENT swallowed): not every pack has emitted a drift event, and a
 * brand-new session has no session catalog yet.
 *
 * Provenance: the `pack` field in the returned `DriftEvent` always reflects
 * the FILE the event was read from (the pack id passed to `readAllDriftCatalogs`,
 * or `<session>` for the session-level catalog). Any `pack` field present
 * in the raw JSONL is OVERWRITTEN — the on-disk catalog can lie about its
 * pack origin, but the aggregator pins provenance to the actual file
 * location it found. This matters for audit + supports the MCP tool that
 * surfaces the aggregated view to humans.
 *
 * JSONL parsing: `.filter(Boolean)` discards the empty string after a
 * trailing newline (standard JSONL convention) and any blank line. A
 * malformed line throws synchronously inside the `for` loop; the caller
 * wraps the call so the MCP tool surface can degrade gracefully. Future
 * hardening could try/catch per line and surface counts of parse failures.
 *
 * Imports from: node:fs/promises, runtime/paths.ts.
 * Imported by: src/mcp/tools/list-drift-events.ts.
 */
export interface DriftEvent {
    /** ISO-8601 timestamp; sort key. */
    timestamp: string;
    /** Pack id that produced this event, or `<session>` for the session catalog. */
    pack: string;
    /** Rule id that produced the event. */
    ruleId: string;
    /** Verdict level — `block` / `warn` / `surface`. Loose-typed at the aggregator. */
    level: string;
    /** Human-readable verdict message. */
    message: string;
}
export interface DriftEventWithProvenance extends DriftEvent {
    subagentId?: string;
    professionPack?: string;
}
export interface SubagentSdkDrift {
    timestamp?: string;
    pack?: string;
    ruleId?: string;
    level?: string;
    message?: string;
}
export declare function readAllDriftCatalogs(packIds: string[], sessionId: string): Promise<DriftEvent[]>;
/**
 * Append a single drift event to a session's drift catalog
 * (`sessions/<sessionId>/state/drift-catalog.jsonl`). Used by the
 * compression orchestrator (CMP.4) to surface a recall-replay-gate
 * failure / engine error so the user sees "Mc kept alongside its
 * predecessors; nothing deleted" via `list_drift_events`. Best-effort:
 * the caller owns whether a write failure should propagate.
 */
export declare function appendSessionDriftEvent(sessionId: string, event: DriftEvent): Promise<void>;
export declare function recordSubagentDrifts(parentSessionId: string, subagentId: string, professionPack: string, drifts: SubagentSdkDrift[]): Promise<void>;
//# sourceMappingURL=drift_catalog.d.ts.map