// Public type contracts for the Local Knowledge Connector surface (Epic #189, Issue #191).
// Pure types and pure validators only — no IO, no clock reads, no hashing, no randomness, no
// filesystem access. Leaf-package rule (ADR-0019 direction 1): no `@oscharko-dev/keiko-*`
// imports may appear in this module. The schemaVersion discriminant follows the same
// evolution rule as CONNECTED_CONTEXT_SCHEMA_VERSION (ADR-0010 D2): a breaking change
// introduces a NEW literal member rather than mutating "1".
//
// Foundry IQ composition (issue #191): KnowledgeSource, KnowledgeCapsule, and CapsuleSet are
// modelled as three separate concepts. Every document-derived record (DocumentRecord,
// ChunkRecord, VectorRecord, CitationReference, RetrievalReference) carries explicit
// capsuleId + sourceId + documentId lineage so a single global knowledge pool is
// unrepresentable in the type system.
//
// Browser safety: `ChunkRecord` carries `safeExcerptHash`, not raw extracted text, so the
// contract surface remains safe to send to a browser surface without re-redaction. Raw
// content lives only inside the local-knowledge runtime, never on the wire.
// ─── Schema version ───────────────────────────────────────────────────────────
export const LOCAL_KNOWLEDGE_SCHEMA_VERSION = "1";
export const EMBEDDING_VECTOR_METRICS = [
    "cosine",
    "euclidean",
    "dot",
];
export const KNOWLEDGE_SOURCE_SCOPE_KINDS = [
    "folder",
    "repository",
    "files",
];
export const CAPSULE_LIFECYCLE_STATES = [
    "draft",
    "indexing",
    "ready",
    "stale",
    "deleting",
    "error",
];
export const CAPSULE_RETRIEVAL_EFFORTS = [
    "minimal",
    "default",
    "deep",
];
export const CAPSULE_OUTPUT_MODES = [
    "answers",
    "snippets",
    "raw",
];
export const CAPSULE_ANSWER_GROUNDING_POLICIES = [
    "require-citations",
    "require-citations-or-state-no-evidence",
    "best-effort",
];
// ─── Capsule management wire types (Slice 4 / Issue #189) ─────────────────────
// Bounded limits matching the spec (≤16 keys, key ≤128, value ≤1024 chars).
export const CAPSULE_METADATA_MAX_KEYS = 16;
export const CAPSULE_METADATA_KEY_MAX_CHARS = 128;
export const CAPSULE_METADATA_VALUE_MAX_CHARS = 1024;
// Maximum members in a capsule set (non-destructive composition cap).
export const CAPSULE_SET_MAX_MEMBERS = 16;
export const CONNECTOR_NODE_KINDS = [
    "files-window",
    "local-knowledge",
    "conversation-center",
];
