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.8 KB
Raw Blame
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://osmantic.com/pixel/schemas/work-capability-queue-request-v2.schema.json",
  "title": "Pixel Deep Work durable operational queue request v2 (controller-selected lane)",
  "type": "object", "additionalProperties": false,
  "required": ["$schema", "schemaVersion", "requestId", "jobId", "createdAt", "authorizationSha256", "planSha256", "leaseSha256", "checkpointSha256", "packSha256", "tool", "dataClassification", "authority", "boundary"],
  "properties": {
    "$schema": {"const": "https://osmantic.com/pixel/schemas/work-capability-queue-request-v2.schema.json"},
    "schemaVersion": {"const": 2},
    "requestId": {"type": "string", "pattern": "^workcaprequest-[0-9]{13}-[a-f0-9]{12}$"},
    "jobId": {"type": "string", "pattern": "^work-[0-9]{13}-[a-f0-9]{12}$"},
    "createdAt": {"type": "string", "format": "date-time"},
    "authorizationSha256": {"$ref": "#/$defs/sha256"},
    "planSha256": {"$ref": "#/$defs/sha256"},
    "leaseSha256": {"$ref": "#/$defs/sha256"},
    "checkpointSha256": {"$ref": "#/$defs/sha256"},
    "packSha256": {"$ref": "#/$defs/sha256"},
    "tool": {"type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,127}$"},
    "relativePath": {"type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^/\\\\\\u0000]+$"},
    "content": {"type": "string", "minLength": 1},
    "destinationAlias": {"type": "string", "pattern": "^[a-z][a-z0-9-]{1,62}$"},
    "commandId": {"const": "hostname"},
    "query": {"type": "string", "minLength": 3, "maxLength": 500},
    "sourceTypes": {"type": "array", "minItems": 1, "maxItems": 4, "uniqueItems": true, "items": {"enum": ["web", "news", "academic", "forum"]}},
    "domains": {"type": "array", "maxItems": 32, "uniqueItems": true, "items": {"type": "string", "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(?:\\.(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?))+$"}},
    "maxResults": {"type": "integer", "minimum": 1, "maximum": 20},
    "maxSourcesToFetch": {"type": "integer", "minimum": 1, "maximum": 5},
    "maxSourceBytes": {"type": "integer", "minimum": 1024, "maximum": 262144},
    "dataClassification": {"enum": ["public", "internal", "confidential", "restricted"]},
    "authority": {"const": {"directExecution": false, "credentials": false, "network": false, "externalEffects": false, "scopeExpansion": false, "completion": false}},
    "boundary": {"const": "Private untrusted durable v2 queue request for one exact controller-admitted operation. The caller may name only a signed-pack tool and its bounded input; it cannot select a runtime version, lane, pack, policy, adapter, grant, workspace root, state root, approval, signature, credentials, network, external effect, budget, authority expansion, completion, or security mode; v2 runtime is not enabled."}
  },
  "oneOf": [
    {
      "required": ["relativePath", "content"],
      "not": {"anyOf": [{"required": ["destinationAlias"]}, {"required": ["commandId"]}, {"required": ["query"]}, {"required": ["sourceTypes"]}, {"required": ["domains"]}, {"required": ["maxResults"]}, {"required": ["maxSourcesToFetch"]}, {"required": ["maxSourceBytes"]}]}
    },
    {
      "required": ["destinationAlias", "commandId"],
      "not": {"anyOf": [{"required": ["relativePath"]}, {"required": ["content"]}, {"required": ["query"]}, {"required": ["sourceTypes"]}, {"required": ["domains"]}, {"required": ["maxResults"]}, {"required": ["maxSourcesToFetch"]}, {"required": ["maxSourceBytes"]}]}
    },
    {
      "required": ["query", "sourceTypes", "domains", "maxResults", "maxSourcesToFetch", "maxSourceBytes"],
      "not": {"anyOf": [{"required": ["relativePath"]}, {"required": ["content"]}, {"required": ["destinationAlias"]}, {"required": ["commandId"]}]}
    }
  ],
  "$defs": {
    "sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
  }
}