// Memory audit event surface for the Governed Enterprise Memory Vault (Epic #204, Issue
// #214). Pure types only — no IO, no clock reads, no randomness. Leaf-package rule
// (ADR-0019 direction 1): no `@oscharko-dev/keiko-*` imports.
//
// `MemoryAuditEvent` is the AUDIT-LAYER projection of the vault's structural `MemoryEvent`
// (defined inside keiko-memory-vault). The vault emits low-level state-change events
// ("memory:inserted", "memory:updated", "memory:deleted", "memory:tombstoned", "edge:*",
// "embedding:upserted"); the audit bridge (`keiko-server/memory-audit-handler`) MAPS each
// structural event into one of the SEMANTIC kinds in this file by reading the new record's
// status, comparing against a previous-status cache, and classifying the transition.
//
// Two kinds — "memory:retrieved" and "memory:workflow-used" — are NOT emitted by the
// vault. They are surfaced here so the audit ledger has a single closed type for every
// memory-touching audit signal. The retrieval and workflow integration layers emit them
// directly via `recordMemoryAudit(...)` once those packages adopt the audit boundary (a
// follow-up issue tracks the wiring). They are listed in `MEMORY_AUDIT_EVENT_KINDS` so
// the closed enum is stable across schema versions.
//
// Audit invariant (mirrors `MemoryAuditRecord`): NEVER carry raw memory body or payload.
// `summary` is a short, REDACTED rationale (bounded length). `scope` and IDs are
// non-secret; scope-coordinate strings are run through the audit redactor at persist time
// in case a user-supplied identifier happens to match a credential shape.
// ─── Schema version ───────────────────────────────────────────────────────────
// Pinned to "1". A breaking change introduces a NEW literal member rather than mutating
// "1" — the same evolution rule as `MEMORY_SCHEMA_VERSION` and the other contract surfaces.
export const MEMORY_AUDIT_EVENT_SCHEMA_VERSION = "1";
// Maximum length for `summary`. Audit ledger summaries are dense human-readable strings,
// not bodies. The bound matches `MEMORY_SUMMARY_MAX_CHARS` (240 chars) used in the audit
// record validator so the two audit surfaces stay aligned at the boundary.
export const MEMORY_AUDIT_EVENT_SUMMARY_MAX_CHARS = 240;
export const MEMORY_AUDIT_EVENT_KINDS = [
    "memory:proposed",
    "memory:accepted",
    "memory:rejected",
    "memory:updated",
    "memory:superseded",
    "memory:pinned",
    "memory:unpinned",
    "memory:archived",
    "memory:forgotten",
    "memory:retrieved",
    "memory:workflow-used",
];
