Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

4.1 KB
Raw Blame
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://osmantic.com/pixel/schemas/work-capability-controller-policy-v1.schema.json",
  "title": "Pixel Deep Work capability controller policy v1",
  "type": "object", "additionalProperties": false,
  "required": ["$schema", "schemaVersion", "policyId", "createdAt", "expiresAt", "profiles", "packs", "limits", "watchdog", "authority", "boundary"],
  "properties": {
    "$schema": {"const": "https://osmantic.com/pixel/schemas/work-capability-controller-policy-v1.schema.json"},
    "schemaVersion": {"const": 1},
    "policyId": {"type": "string", "pattern": "^workcappolicy-[0-9]{13}-[a-f0-9]{12}$"},
    "createdAt": {"type": "string", "format": "date-time"},
    "expiresAt": {"type": "string", "format": "date-time"},
    "profiles": {"type": "array", "minItems": 1, "maxItems": 4, "uniqueItems": true, "items": {"enum": ["scout", "builder", "data-lab", "researcher"]}},
    "packs": {
      "type": "array", "minItems": 1, "maxItems": 32,
      "items": {
        "type": "object", "additionalProperties": false,
        "required": ["id", "version", "packSha256", "treeSha256", "tools", "classifications"],
        "properties": {
          "id": {"type": "string", "pattern": "^[a-z][a-z0-9-]{1,62}$"},
          "version": {"type": "string", "pattern": "^(?:0|[1-9][0-9]{0,8})\\.(?:0|[1-9][0-9]{0,8})\\.(?:0|[1-9][0-9]{0,8})$"},
          "packSha256": {"$ref": "#/$defs/sha256"},
          "treeSha256": {"$ref": "#/$defs/sha256"},
          "tools": {"type": "array", "minItems": 1, "maxItems": 16, "items": {"type": "object", "additionalProperties": false, "required": ["name", "effectClass"], "properties": {"name": {"$ref": "#/$defs/tool"}, "effectClass": {"enum": ["read-only", "workspace"]}}}},
          "classifications": {"type": "array", "minItems": 1, "maxItems": 4, "uniqueItems": true, "items": {"enum": ["public", "internal", "confidential", "restricted"]}}
        }
      }
    },
    "limits": {"$ref": "#/$defs/limits"},
    "watchdog": {"$ref": "#/$defs/watchdog"},
    "authority": {"const": {"grantsExecution": false, "grantsCredentials": false, "grantsNetwork": false, "grantsExternalEffects": false, "grantsScopeExpansion": false, "grantsCompletion": false}},
    "boundary": {"const": "Private controller allowlist for exact signed local capability packs. Policy alone grants no execution, credential, network, external-effect, scope-expansion, or completion authority."}
  },
  "$defs": {
    "sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
    "tool": {"type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,127}$"},
    "limits": {
      "type": "object", "additionalProperties": false,
      "required": ["maxSessionsPerLease", "maxGrantLifetimeMs", "maxInputBytes", "maxOutputBytes", "maxRuntimeMs", "maxMemoryMiB", "maxCpuCores", "maxPids", "maxWorkspaceBytes"],
      "properties": {
        "maxSessionsPerLease": {"type": "integer", "minimum": 1, "maximum": 4096},
        "maxGrantLifetimeMs": {"type": "integer", "minimum": 100, "maximum": 3600000},
        "maxInputBytes": {"type": "integer", "minimum": 1, "maximum": 1048576},
        "maxOutputBytes": {"type": "integer", "minimum": 1, "maximum": 16777216},
        "maxRuntimeMs": {"type": "integer", "minimum": 100, "maximum": 3600000},
        "maxMemoryMiB": {"type": "integer", "minimum": 64, "maximum": 8192},
        "maxCpuCores": {"type": "number", "minimum": 0.1, "maximum": 8},
        "maxPids": {"type": "integer", "minimum": 16, "maximum": 512},
        "maxWorkspaceBytes": {"type": "integer", "minimum": 0, "maximum": 34359738368}
      }
    },
    "watchdog": {
      "type": "object", "additionalProperties": false,
      "required": ["maxFailures", "maxRepeatedEquivalent", "maxRepeatedFailure", "maxEventsWithoutVerifiedProgress"],
      "properties": {
        "maxFailures": {"type": "integer", "minimum": 1, "maximum": 1000},
        "maxRepeatedEquivalent": {"type": "integer", "minimum": 2, "maximum": 100},
        "maxRepeatedFailure": {"type": "integer", "minimum": 1, "maximum": 100},
        "maxEventsWithoutVerifiedProgress": {"type": "integer", "minimum": 4, "maximum": 1000000}
      }
    }
  }
}