26382a7ac6
CI / Clippy (push) Failing after 15m13s
CI / Test (ubuntu-latest) (push) Failing after 16m1s
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (no embeddings / no ORT) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Cookbook (Node) (push) Has been cancelled
CI / Pi Extension (Node) (push) Has been cancelled
CI / Rust SDK (lean-ctx-client) (push) Has been cancelled
CI / Embed SDK (lean-ctx-sdk) (push) Has been cancelled
CI / Python SDK (leanctx) (push) Has been cancelled
CI / Hermes Plugin (Python) (push) Has been cancelled
CI / SDK Conformance Matrix (push) Has been cancelled
CI / Coverage (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
CI / Adversarial Safety (push) Has been cancelled
CI / Benchmarks (push) Has been cancelled
CI / Output-Quality Gate (eval A/B) (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / CI Green (push) Has been cancelled
JetBrains Plugin / Actionlint (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (rust) (push) Has been cancelled
JetBrains Plugin / Validation (push) Has been cancelled
JetBrains Plugin / Build (push) Has been cancelled
JetBrains Plugin / Test (push) Has been cancelled
Security Check / Security Scan (push) Has been cancelled
84 lines
2.9 KiB
JSON
84 lines
2.9 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://opencontextprotocol.org/schemas/v0.1/context-ir.schema.json",
|
|
"title": "OCP Part 1 — Context-IR document",
|
|
"type": "object",
|
|
"required": ["schema_version", "created_at", "updated_at", "next_seq", "totals", "items"],
|
|
"properties": {
|
|
"schema_version": { "const": 1 },
|
|
"created_at": { "$ref": "#/$defs/timestamp" },
|
|
"updated_at": { "$ref": "#/$defs/timestamp" },
|
|
"next_seq": { "type": "integer", "minimum": 1 },
|
|
"totals": {
|
|
"type": "object",
|
|
"required": ["items_recorded", "input_tokens", "output_tokens", "tokens_saved"],
|
|
"properties": {
|
|
"items_recorded": { "type": "integer", "minimum": 0 },
|
|
"input_tokens": { "type": "integer", "minimum": 0 },
|
|
"output_tokens": { "type": "integer", "minimum": 0 },
|
|
"tokens_saved": { "type": "integer", "minimum": 0 }
|
|
}
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"maxItems": 128,
|
|
"items": { "$ref": "#/$defs/item" }
|
|
}
|
|
},
|
|
"$defs": {
|
|
"timestamp": {
|
|
"type": "string",
|
|
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?([+-]\\d{2}:\\d{2}|Z)$"
|
|
},
|
|
"sourceKind": {
|
|
"type": "string",
|
|
"enum": ["read", "shell", "search", "provider", "other"]
|
|
},
|
|
"item": {
|
|
"type": "object",
|
|
"required": [
|
|
"seq", "created_at", "source", "input_tokens", "output_tokens",
|
|
"duration_us", "compression_ratio", "content_excerpt", "truncated",
|
|
"safety", "verification"
|
|
],
|
|
"properties": {
|
|
"seq": { "type": "integer", "minimum": 1 },
|
|
"created_at": { "$ref": "#/$defs/timestamp" },
|
|
"source": {
|
|
"type": "object",
|
|
"required": ["kind", "tool"],
|
|
"properties": {
|
|
"kind": { "$ref": "#/$defs/sourceKind" },
|
|
"tool": { "type": "string", "minLength": 1 },
|
|
"client_name": { "type": ["string", "null"] },
|
|
"agent_id": { "type": ["string", "null"] },
|
|
"path": { "type": ["string", "null"] },
|
|
"command": { "type": ["string", "null"] },
|
|
"pattern": { "type": ["string", "null"] }
|
|
}
|
|
},
|
|
"input_tokens": { "type": "integer", "minimum": 0 },
|
|
"output_tokens": { "type": "integer", "minimum": 0 },
|
|
"duration_us": { "type": "integer", "minimum": 0 },
|
|
"compression_ratio": { "type": "number", "minimum": 0 },
|
|
"content_excerpt": { "type": "string", "maxLength": 4096 },
|
|
"truncated": { "type": "boolean" },
|
|
"safety": {
|
|
"type": "object",
|
|
"required": ["redacted"],
|
|
"properties": {
|
|
"redacted": { "type": "boolean" },
|
|
"boundary_mode": { "type": ["string", "null"] }
|
|
}
|
|
},
|
|
"verification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content_md5": { "type": ["string", "null"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|