{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://go-sip.local/contracts/current/task-discovery.schema.json", "title": "Project-local Dispatcher task list; external SaaS compatibility unverified", "oneOf": [{"$ref": "#/$defs/page"}, {"$ref": "#/$defs/error"}], "$defs": { "page": { "type": "object", "additionalProperties": false, "required": ["dispatcher_id", "cursor", "tasks"], "properties": { "dispatcher_id": {"type": "string", "format": "uuid"}, "cursor": {"type": "string", "minLength": 1}, "tasks": {"type": "array", "items": {"$ref": "#/$defs/task"}} }, "$comment": "A page containing zero tasks and a cursor ends enumeration. Non-empty short pages never end enumeration. Persist non-empty pages before using their returned cursor." }, "task": { "type": "object", "additionalProperties": false, "required": ["task_id", "tenant_id", "status", "task_revision"], "properties": { "task_id": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,128}$"}, "tenant_id": {"type": "integer", "minimum": 1}, "status": {"enum": ["running", "paused", "stopped"]}, "task_revision": {"type": "integer", "minimum": 1} } }, "error": { "type": "object", "additionalProperties": false, "required": ["resource", "error"], "properties": { "resource": {"const": "error"}, "error": {"type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": {"code": {"type": "string", "minLength": 1}, "message": {"type": "string", "minLength": 1}}} } } } }