metal-kompanion/resources/memory/kom.memory.v1/episodic.json

105 lines
3.5 KiB
JSON

{
"resource": "kom.memory.v1.episodic",
"description": "Short-lived episodic memory entries captured per interaction window before crystallization into semantic memory.",
"version": 1,
"primary_key": ["id"],
"fields": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique id for the episodic event."
},
"namespace": {
"type": "string",
"description": "Logical scope (e.g., project:user:thread) aligned with DAL namespaces."
},
"thread_id": {
"type": ["string", "null"],
"description": "Conversation or task thread identifier (optional)."
},
"speaker": {
"type": ["string", "null"],
"description": "Free-form actor label (e.g., human handle, agent codename)."
},
"role": {
"type": "string",
"enum": ["human", "agent", "tool", "system"],
"description": "High-level origin role used for policy decisions."
},
"content_type": {
"type": "string",
"enum": ["text", "snapshot", "tool_output", "command", "observation"],
"description": "Payload type; snapshots reference stored artifacts."
},
"content": {
"type": ["object", "string"],
"description": "Canonical content. Strings hold raw text; objects provide structured payloads (e.g., tool JSON)."
},
"sensitivity": {
"type": "string",
"enum": ["normal", "private", "secret"],
"default": "normal",
"description": "Embeddings and sync rules consult this flag (secret never leaves episodic store)."
},
"embeddable": {
"type": "boolean",
"default": true,
"description": "Explicit override for embedding eligibility (set false for high-entropy or binary blobs)."
},
"embedding_status": {
"type": "string",
"enum": ["pending", "processing", "done", "skipped"],
"default": "pending",
"description": "Lifecycle marker for DAL sync jobs."
},
"resonance_links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"target_id": {"type": "string"},
"strength": {"type": "number"},
"kind": {
"type": "string",
"enum": ["pattern", "identity", "artifact"]
}
},
"required": ["target_id", "strength"]
},
"description": "Optional resonance references inspired by Ξlope librarian flows."
},
"tags": {
"type": "array",
"items": {"type": "string"},
"description": "Free-form labels to support scoped retrieval."
},
"snapshot_ref": {
"type": ["string", "null"],
"description": "Pointer to persistent artifact (e.g., blob path) when content_type = snapshot."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Event timestamp in UTC."
},
"expires_at": {
"type": ["string", "null"],
"format": "date-time",
"description": "Optional TTL boundary; items past expiry are candidates for purge."
},
"origin_metadata": {
"type": "object",
"description": "Transport-specific metadata (tool invocation ids, host info, etc.)."
}
},
"indexes": [
["namespace", "thread_id", "created_at"],
["namespace", "embedding_status"]
],
"notes": [
"Episodic events remain append-only; updates are limited to status flags.",
"Events marked sensitivity=secret never emit embeddings or leave the episodic store.",
"Snapshots reference durable artifacts; DAL sync can downsample text representations while preserving provenance."
]
}