/**
 * Session Journal Contract — types and Zod schema for `.cleo/session-journals/*.jsonl`.
 *
 * Session journals are append-only JSONL files (one JSON object per line) that
 * capture session lifecycle events as a training corpus for the meta-agent.
 * Each daily file is named `YYYY-MM-DD.jsonl` and lives under
 * `.cleo/session-journals/`. The directory is excluded from git via `.cleo/.gitignore`.
 *
 * **Privacy constraints**:
 * - `noteExcerpt` is capped at 200 characters.
 * - Task IDs only — task titles are never written.
 * - `doctorSummary` includes pattern names but not raw DB content.
 *
 * **Concurrency**: multiple sessions append to the same daily file using
 * Node.js `appendFile` which leverages O_APPEND atomicity for writes under
 * ~4 KB on Linux ext4/macOS APFS.
 *
 * **Retention** (enforced by `rotateSessionJournals`):
 * | Tier    | Age       | Disposition                          |
 * |---------|-----------|--------------------------------------|
 * | Hot     | 0–7 days  | All entries retained verbatim        |
 * | Warm    | 8–30 days | session_end entries only             |
 * | Archive | 31–90 days| Monthly rollup; individual files deleted |
 * | Purge   | >90 days  | Monthly rollups deleted              |
 *
 * @module session-journal
 * @task T1263
 * @epic T1075
 * @see packages/core/src/sessions/session-journal.ts
 * @see .cleo/adrs/ADR-013 §9 (runtime-data-safety)
 */
import { z } from 'zod';
/**
 * Current schema version for session journal entries.
 *
 * Increment when adding new required fields or changing field semantics.
 * Readers MUST treat unknown versions as forwards-compatible (new optional
 * fields only) and fall back gracefully.
 */
export declare const SESSION_JOURNAL_SCHEMA_VERSION: "1.0";
/**
 * Zod schema for a session journal doctor summary sub-object.
 *
 * Embeds a compact summary of the `cleo memory doctor` scan run at session-end.
 * Implements T1262 absorption into E6 session-journal integration.
 */
export declare const sessionJournalDoctorSummarySchema: z.ZodObject<{
    isClean: z.ZodBoolean;
    findingsCount: z.ZodNumber;
    patterns: z.ZodArray<z.ZodString>;
    totalScanned: z.ZodNumber;
}, z.core.$strip>;
/**
 * Zod schema for the debrief summary sub-object.
 *
 * Captures a compact excerpt from the session note and a count of completed tasks.
 */
export declare const sessionJournalDebriefSummarySchema: z.ZodObject<{
    noteExcerpt: z.ZodOptional<z.ZodString>;
    tasksCompletedCount: z.ZodNumber;
    tasksFocused: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
/**
 * Zod schema for a single session journal entry.
 *
 * All fields except the identity fields are optional to allow incremental
 * enrichment and forward-compatible schema evolution.
 */
export declare const sessionJournalEntrySchema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<"1.0">;
    timestamp: z.ZodString;
    sessionId: z.ZodString;
    eventType: z.ZodEnum<{
        error: "error";
        decision: "decision";
        observation: "observation";
        session_start: "session_start";
        session_end: "session_end";
    }>;
    agentIdentifier: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
    duration: z.ZodOptional<z.ZodNumber>;
    tasksCompleted: z.ZodOptional<z.ZodArray<z.ZodString>>;
    doctorSummary: z.ZodOptional<z.ZodObject<{
        isClean: z.ZodBoolean;
        findingsCount: z.ZodNumber;
        patterns: z.ZodArray<z.ZodString>;
        totalScanned: z.ZodNumber;
    }, z.core.$strip>>;
    debriefSummary: z.ZodOptional<z.ZodObject<{
        noteExcerpt: z.ZodOptional<z.ZodString>;
        tasksCompletedCount: z.ZodNumber;
        tasksFocused: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>;
    prevEntryHash: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Doctor summary embedded in session journal entries at session-end. */
export type SessionJournalDoctorSummary = z.infer<typeof sessionJournalDoctorSummarySchema>;
/** Debrief summary embedded in session journal entries at session-end. */
export type SessionJournalDebriefSummary = z.infer<typeof sessionJournalDebriefSummarySchema>;
/**
 * A single entry in a session journal JSONL file.
 *
 * One JSON object per line in `.cleo/session-journals/YYYY-MM-DD.jsonl`.
 * Lines are appended atomically via `appendFile` (O_APPEND).
 *
 * @example
 * ```json
 * {"schemaVersion":"1.0","timestamp":"2026-04-24T10:00:00.000Z","sessionId":"ses_xxx","eventType":"session_start","agentIdentifier":"claude-code","scope":"global"}
 * ```
 */
export type SessionJournalEntry = z.infer<typeof sessionJournalEntrySchema>;
//# sourceMappingURL=session-journal.d.ts.map