annotations.schema.json
impl/native-drive/annotations.schema.json · 36 line(s) · json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://sleela.dev/schema/native-process-policy-1.0.json",
"title": "SLeeLa Native Process Policy",
"description": "Validated metadata contract for future source annotations. This schema does not itself grant capabilities or enable annotations in the parser.",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "execution", "capabilities"],
"properties": {
"schema_version": { "const": "1.0" },
"execution": { "enum": ["in_process_trusted", "isolated_process"] },
"capabilities": {
"type": "array",
"uniqueItems": true,
"items": { "enum": ["process.spawn", "process.pipe", "filesystem.read", "filesystem.write", "network.client"] }
},
"stdin": { "enum": ["inherit", "null", "pipe", "file"] },
"stdout": { "enum": ["inherit", "discard", "pipe", "file"] },
"stderr": { "enum": ["inherit", "discard", "pipe", "file", "merge"] },
"timeout_ms": { "type": "integer", "minimum": 1, "maximum": 86400000 },
"working_directory": { "type": "string", "minLength": 1 },
"environment_allowlist": {
"type": "array",
"uniqueItems": true,
"items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" }
},
"max_output_bytes": { "type": "integer", "minimum": 1, "maximum": 1073741824 }
},
"allOf": [
{
"if": { "properties": { "execution": { "const": "in_process_trusted" } } },
"then": { "properties": { "capabilities": { "maxItems": 0 } } }
}
]
}