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.

3.5 KB
Raw Blame
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://osmantic.com/pixel/schemas/work-capability-operational-runtime-request-v2.schema.json",
  "title": "Pixel Deep Work operational runtime request v2 (controller-compiled, private)",
  "type": "object",
  "additionalProperties": false,
  "required": ["$schema", "schemaVersion", "grantId", "operationId", "lane"],
  "properties": {
    "$schema": {"const": "https://osmantic.com/pixel/schemas/work-capability-operational-runtime-request-v2.schema.json"},
    "schemaVersion": {"const": 2},
    "grantId": {"type": "string", "pattern": "^workcapgrant-[0-9]{13}-[a-f0-9]{12}$"},
    "operationId": {"type": "string", "pattern": "^workcapv2-[0-9]{13}-[a-f0-9]{16}$"},
    "lane": {"enum": ["filesystem", "public-retrieval", "ssh-hostname"]},
    "binding": {"type": "object", "additionalProperties": false, "required": ["action", "scope", "relativePath", "contentSha256", "maxFileBytes"], "properties": {"action": {"const": "write"}, "scope": {"const": "job-workspace"}, "relativePath": {"type": "string", "minLength": 1, "maxLength": 1024}, "contentSha256": {"$ref": "#/$defs/sha256"}, "maxFileBytes": {"type": "integer", "minimum": 1, "maximum": 67108864}}},
    "content": {"type": "string"},
    "trustRoot": {"type": "string"},
    "retrievalBinding": {"type": "object", "additionalProperties": false, "required": ["querySha256", "sourceTypes", "domains", "maxResults", "maxSourcesToFetch", "maxSourceBytes"], "properties": {"querySha256": {"$ref": "#/$defs/sha256"}, "sourceTypes": {"type": "array", "minItems": 1, "maxItems": 4, "items": {"type": "string", "enum": ["web", "news", "academic", "forum"]}, "uniqueItems": true}, "domains": {"type": "array", "minItems": 0, "maxItems": 32, "items": {"type": "string"}, "uniqueItems": true}, "maxResults": {"type": "integer", "minimum": 1, "maximum": 20}, "maxSourcesToFetch": {"type": "integer", "minimum": 1, "maximum": 5}, "maxSourceBytes": {"type": "integer", "minimum": 1024, "maximum": 262144}}},
    "query": {"type": "string"},
    "approval": {"type": "object"},
    "approvalSignature": {"type": "string", "minLength": 32, "maxLength": 65536}
  },
  "if": {
    "properties": { "lane": { "const": "filesystem" } },
    "required": ["lane"]
  },
  "then": {
    "required": ["binding", "content", "trustRoot"],
    "properties": {
      "binding": {"properties": {"trustRoot": {"not": {}}}},
      "trustRoot": {"const": "workspace"},
      "retrievalBinding": {"not": {}},
      "query": {"not": {}},
      "approval": {"not": {}},
      "approvalSignature": {"not": {}}
    }
  },
  "else": {
    "if": {
      "properties": { "lane": { "const": "public-retrieval" } },
      "required": ["lane"]
    },
    "then": {
      "required": ["retrievalBinding", "query", "trustRoot"],
      "properties": {
        "trustRoot": {"const": "courier"},
        "binding": {"not": {}},
        "content": {"not": {}},
        "approval": {"not": {}},
        "approvalSignature": {"not": {}}
      }
    },
    "else": {
      "if": {
        "properties": { "lane": { "const": "ssh-hostname" } },
        "required": ["lane"]
      },
      "then": {
        "required": ["approval", "approvalSignature", "trustRoot"],
        "properties": {
          "trustRoot": {"const": "owner-signed-ssh"},
          "binding": {"not": {}},
          "content": {"not": {}},
          "retrievalBinding": {"not": {}},
          "query": {"not": {}}
        }
      },
      "else": {}
    }
  },
  "$defs": {"sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}}
}