← Files TokenXARCHIVED FILE

schemas/agent-policy.schema.json

2.1 KB · Oct 2, 2026 · 00:29 UTC

↓ Download file

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:tokenx:schema:agent-policy:v2",
  "title": "TokenX Agent policy",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "decisionId",
    "allowed",
    "assignments",
    "dynamicEnabled",
    "model",
    "parentProfileKey",
    "reasoningEffort",
    "maxCalls",
    "denyNested"
  ],
  "properties": {
    "schemaVersion": { "const": 2 },
    "decisionId": {
      "type": "string",
      "pattern": "^tx_[a-f0-9]{24}$"
    },
    "allowed": {
      "type": "boolean"
    },
    "assignments": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": false,
        "required": ["model", "profileKey", "reasoningEffort", "role", "taskName", "objectiveKey", "evidenceKey"],
        "properties": {
          "model": { "type": "string", "minLength": 1 },
          "profileKey": { "enum": ["economy", "standard", "deep"] },
          "reasoningEffort": { "enum": ["low", "medium", "high", "xhigh", "max", "ultra"] },
          "role": { "enum": ["repo_reader", "repo_reviewer", "test_runner", "file_editor", "implementer"] },
          "taskName": { "type": "string", "maxLength": 64, "pattern": "^tx_a[1-9][0-9]*_[a-f0-9]{24}_[a-z0-9_]+$" },
          "objectiveKey": { "enum": ["repo_map", "independent_review", "focused_test", "scoped_file_edit", "implementation_slice"] },
          "evidenceKey": { "enum": ["facts_with_references", "ranked_findings", "command_results", "allowed_file_diff", "diff_and_verification"] }
        }
      }
    },
    "model": {
      "type": [
        "string",
        "null"
      ]
    },
    "reasoningEffort": {
      "enum": [
        null,
        "low",
        "medium",
        "high",
        "xhigh",
        "max",
        "ultra"
      ]
    },
    "maxCalls": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4
    },
    "denyNested": {
      "const": true
    },
    "dynamicEnabled": {
      "type": "boolean"
    },
    "parentProfileKey": {
      "enum": ["economy", "standard", "deep"]
    }
  }
}

SHA-256: 8ce4463b6b20edd027212b09ed5e5a9b5d4ada7068d420303110d4d82ec9baad