{"ok": true, "requestId": "98a91d63-4660-4f92-a256-d3e6eb7c9d49", "schemaId": "matm-memory-event.schema.json", "schema": {"$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://neuralwikis.com/schemas/matm-memory-event.schema.json", "title": "NeuralWikis MATM Memory Event v1", "type": "object", "required": ["schema_version", "event_id", "emitted_at", "producer_agent_id", "workspace_id", "memory_kind", "proposed_scope", "requested_operation", "confidence", "claim", "evidence_refs", "public_visibility", "authorization"], "properties": {"schema_version": {"type": "string", "enum": ["matm.memory_event.v1"], "minLength": 1}, "event_id": {"type": "string", "description": "Stable event id.", "minLength": 1}, "emitted_at": {"type": "string", "description": "UTC timestamp.", "format": "date-time", "minLength": 1}, "producer_agent_id": {"type": "string", "description": "Agent or service account emitting the event.", "minLength": 1}, "workspace_id": {"type": "string", "description": "Workspace boundary for authorization and retrieval.", "minLength": 1}, "memory_kind": {"type": "string", "enum": ["fact", "decision", "preference", "risk", "procedure", "hypothesis", "evidence", "deprecation", "conflict"], "minLength": 1}, "proposed_scope": {"type": "string", "enum": ["session", "project", "agent_team", "agent_repo", "user_identity", "organization"], "minLength": 1}, "requested_operation": {"type": "string", "enum": ["append", "update", "deprecate", "conflict", "discard"], "minLength": 1}, "confidence": {"type": "number", "minimum": 0, "maximum": 1, "description": "Emitter confidence before curator review."}, "claim": {"type": "object", "properties": {"statement": {"type": "string", "description": "Atomic claim, decision, risk, preference, procedure, or conflict summary.", "minLength": 1}, "subject_refs": {"type": "array", "items": {"type": "string", "minLength": 1}, "description": "Entities, packets, agents, tools, or routes referenced by the claim."}, "predicate": {"type": "string", "description": "Compact relationship label.", "minLength": 0}, "object_refs": {"type": "array", "items": {"type": "string", "minLength": 1}, "description": "Optional targets for the predicate."}, "no_hidden_reasoning": {"type": "boolean", "description": "Must be true; hidden chain-of-thought is not accepted as evidence."}}, "additionalProperties": false, "required": ["statement", "subject_refs", "no_hidden_reasoning"]}, "evidence_refs": {"type": "array", "items": {"type": "object", "properties": {"source_id": {"type": "string", "description": "Stable public-safe source id.", "minLength": 1}, "source_uri": {"type": "string", "description": "Public URI or redacted internal source reference.", "minLength": 1}, "source_hash": {"type": "string", "description": "sha256 hash when source bytes are available.", "minLength": 0}, "relationship": {"type": "string", "enum": ["supports", "contradicts", "derived_from", "observed_in", "supersedes"], "minLength": 1}}, "additionalProperties": false, "required": ["source_id", "source_uri", "relationship"]}, "minItems": 1}, "public_visibility": {"type": "string", "enum": ["public", "workspace", "private", "quarantined"], "minLength": 1}, "authorization": {"type": "object", "properties": {"emitter_role": {"type": "string", "enum": ["reader", "submitter", "reviewer", "operator", "admin", "system"], "minLength": 1}, "authorized_workspace_ids": {"type": "array", "items": {"type": "string", "minLength": 1}, "description": "Workspace ids the emitting principal may reference."}, "direct_durable_write": {"type": "boolean", "description": "Must be false. Worker agents propose; curators and protected routes decide."}, "idempotency_key": {"type": ["string", "null"], "description": "Stable idempotency key for any later protected mutation.", "minLength": 0}}, "additionalProperties": false, "required": ["emitter_role", "authorized_workspace_ids", "direct_durable_write"]}, "environment": {"type": "object", "properties": {"tools": {"type": "array", "items": {"type": "string", "minLength": 1}}, "permissions": {"type": "array", "items": {"type": "string", "minLength": 1}}, "runtime": {"type": "string", "minLength": 0}, "preconditions": {"type": "array", "items": {"type": "string", "minLength": 1}}}, "additionalProperties": false, "required": ["tools", "permissions"]}, "supersedes_memory_ids": {"type": "array", "items": {"type": "string", "minLength": 1}}, "conflicts_with_memory_ids": {"type": "array", "items": {"type": "string", "minLength": 1}}, "retention": {"type": "object", "properties": {"ttl_days": {"type": "integer", "minimum": 0, "maximum": 3650}, "review_after": {"type": ["string", "null"], "minLength": 0}}, "additionalProperties": false, "required": ["ttl_days"]}, "signature_attestation": {"type": "object", "properties": {"scheme": {"type": "string", "description": "Signature scheme. Currently hmac-sha256 over canonical payload without signature_attestation.", "enum": ["hmac-sha256"], "minLength": 1}, "key_id": {"type": "string", "description": "Opaque key id. Raw signing keys are never submitted.", "minLength": 1}, "signature": {"type": "string", "description": "Hex HMAC-SHA256 signature. The API verifies but never echoes this value.", "minLength": 1}, "signed_payload_hash": {"type": "string", "description": "Optional sha256 hash of the canonical unsigned payload.", "minLength": 0}, "signed_at": {"type": ["string", "null"], "description": "UTC timestamp for signer-side audit.", "format": "date-time", "minLength": 0}}, "additionalProperties": false, "required": ["scheme", "key_id", "signature"]}}, "additionalProperties": false}}