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
56 lines
1.5 KiB
JSON
56 lines
1.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://opencontextprotocol.org/schemas/v0.1/capabilities.schema.json",
|
|
"title": "OCP Part 2 — Capability grant set and check result",
|
|
"oneOf": [
|
|
{ "$ref": "#/$defs/grantSet" },
|
|
{ "$ref": "#/$defs/checkResult" }
|
|
],
|
|
"$defs": {
|
|
"capability": {
|
|
"type": "string",
|
|
"oneOf": [
|
|
{
|
|
"enum": [
|
|
"fs:read", "fs:write", "fs:delete",
|
|
"net:outbound",
|
|
"exec:sandbox", "exec:unrestricted",
|
|
"knowledge:read", "knowledge:write",
|
|
"cross_project",
|
|
"config:write",
|
|
"agent:manage"
|
|
]
|
|
},
|
|
{ "pattern": "^x-[a-z][a-z0-9_]*(:[a-z][a-z0-9_]*)?$" }
|
|
]
|
|
},
|
|
"grantSet": {
|
|
"type": "object",
|
|
"required": ["subject", "capabilities"],
|
|
"properties": {
|
|
"subject": { "type": "string", "minLength": 1 },
|
|
"capabilities": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/capability" },
|
|
"uniqueItems": true
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"checkResult": {
|
|
"type": "object",
|
|
"required": ["allowed", "missing"],
|
|
"properties": {
|
|
"allowed": { "type": "boolean" },
|
|
"missing": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/capability" }
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"if": { "properties": { "allowed": { "const": true } } },
|
|
"then": { "properties": { "missing": { "maxItems": 0 } } }
|
|
}
|
|
}
|
|
}
|