Files
wehub-resource-sync 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
chore: import upstream snapshot with attribution
2026-07-13 12:35:30 +08:00

123 lines
4.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://opencontextprotocol.org/schemas/v0.1/event.schema.json",
"title": "OCP Part 5 — Governance event",
"type": "object",
"required": ["id", "timestamp", "kind"],
"properties": {
"id": { "type": "integer", "minimum": 0 },
"timestamp": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?([+-]\\d{2}:\\d{2}|Z)$"
},
"kind": { "$ref": "#/$defs/kind" }
},
"additionalProperties": false,
"$defs": {
"kind": {
"type": "object",
"required": ["type"],
"oneOf": [
{ "$ref": "#/$defs/toolCall" },
{ "$ref": "#/$defs/agentAction" },
{ "$ref": "#/$defs/knowledgeUpdate" },
{ "$ref": "#/$defs/budgetWarning" },
{ "$ref": "#/$defs/budgetExhausted" },
{ "$ref": "#/$defs/policyViolation" },
{ "$ref": "#/$defs/roleChanged" },
{ "$ref": "#/$defs/extension" }
]
},
"toolCall": {
"type": "object",
"required": ["type", "tool", "tokens_original", "tokens_saved", "duration_ms"],
"properties": {
"type": { "const": "tool_call" },
"tool": { "type": "string", "minLength": 1 },
"tokens_original": { "type": "integer", "minimum": 0 },
"tokens_saved": { "type": "integer", "minimum": 0 },
"mode": { "type": ["string", "null"] },
"duration_ms": { "type": "integer", "minimum": 0 },
"path": { "type": ["string", "null"] }
},
"additionalProperties": false
},
"agentAction": {
"type": "object",
"required": ["type", "agent_id", "action"],
"properties": {
"type": { "const": "agent_action" },
"agent_id": { "type": "string", "minLength": 1 },
"action": { "type": "string", "minLength": 1 },
"tool": { "type": ["string", "null"] }
},
"additionalProperties": false
},
"knowledgeUpdate": {
"type": "object",
"required": ["type", "category", "key", "action"],
"properties": {
"type": { "const": "knowledge_update" },
"category": { "type": "string", "minLength": 1 },
"key": { "type": "string" },
"action": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"budgetWarning": {
"type": "object",
"required": ["type", "role", "dimension", "used", "limit", "percent"],
"properties": {
"type": { "const": "budget_warning" },
"role": { "type": "string", "minLength": 1 },
"dimension": { "type": "string", "minLength": 1 },
"used": { "type": "string" },
"limit": { "type": "string" },
"percent": { "type": "integer", "minimum": 0, "maximum": 255 }
},
"additionalProperties": false
},
"budgetExhausted": {
"type": "object",
"required": ["type", "role", "dimension", "used", "limit"],
"properties": {
"type": { "const": "budget_exhausted" },
"role": { "type": "string", "minLength": 1 },
"dimension": { "type": "string", "minLength": 1 },
"used": { "type": "string" },
"limit": { "type": "string" }
},
"additionalProperties": false
},
"policyViolation": {
"type": "object",
"required": ["type", "role", "tool", "reason"],
"properties": {
"type": { "const": "policy_violation" },
"role": { "type": "string", "minLength": 1 },
"tool": { "type": "string", "minLength": 1 },
"reason": { "type": "string" }
},
"additionalProperties": false
},
"roleChanged": {
"type": "object",
"required": ["type", "from", "to"],
"properties": {
"type": { "const": "role_changed" },
"from": { "type": "string" },
"to": { "type": "string" }
},
"additionalProperties": false
},
"extension": {
"type": "object",
"required": ["type"],
"properties": {
"type": { "type": "string", "pattern": "^x-[a-z][a-z0-9_]*$" }
},
"additionalProperties": true
}
}
}