{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://opencontextprotocol.org/schemas/v0.1/evidence-entry.schema.json", "title": "OCP Part 4 — Evidence chain entry", "type": "object", "required": [ "timestamp", "agent_id", "tool", "input_hash", "output_tokens", "role", "event_type", "prev_hash", "entry_hash" ], "properties": { "timestamp": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?([+-]\\d{2}:\\d{2}|Z)$" }, "agent_id": { "type": "string", "minLength": 1 }, "tool": { "type": "string", "minLength": 1 }, "action": { "type": ["string", "null"] }, "input_hash": { "$ref": "#/$defs/sha256hex" }, "output_tokens": { "type": "integer", "minimum": 0 }, "role": { "type": "string", "minLength": 1 }, "event_type": { "type": "string", "oneOf": [ { "enum": [ "tool_call", "tool_denied", "path_jail_violation", "budget_exceeded", "cross_project_access", "rate_limited", "security_violation", "role_changed", "secret_detected", "agent_registered", "agent_suspended", "agent_resumed", "agent_decommissioned" ] }, { "pattern": "^x-[a-z][a-z0-9_]*$" } ] }, "prev_hash": { "oneOf": [ { "const": "genesis" }, { "$ref": "#/$defs/sha256hex" } ] }, "entry_hash": { "$ref": "#/$defs/sha256hex" }, "signature": { "$ref": "#/$defs/ed25519hex" } }, "additionalProperties": false, "$defs": { "sha256hex": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "ed25519hex": { "type": "string", "pattern": "^[0-9a-f]{128}$" } } }