{
  "$defs": {
    "ActiveExecution": {
      "additionalProperties": false,
      "description": "One currently active graph-leaf execution.\n\n`execution` is the stable selector used by logs and attach. `node` is the graph-visible\nidentity that makes multiple simultaneous verifier executions obvious to a client.",
      "properties": {
        "execution": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "mapIndices": {
          "description": "Zero-based map indices, outermost first; empty outside maps.",
          "items": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "type": "array"
        },
        "node": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        },
        "startedAt": {
          "description": "Ledger recording time of this execution's `NodeStarted`, in Unix milliseconds.\nOmitted when unknown; not a precise provider start measurement.",
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "execution",
        "node"
      ],
      "type": "object"
    },
    "AgentAttachEvent": {
      "description": "The closed public agent-attach progress algebra. This is the only representable shape:\nreasoning, tools, provider frames, usage, and session identifiers have no variant. `Working`\nand `Settled` are empty struct variants rather than bare units: serde's internally tagged enum\ndeserialization silently ignores unknown fields on a unit variant regardless of\n`deny_unknown_fields`, which would otherwise let an unrepresentable field ride along\nundetected on either of these two variants.",
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "type": {
              "const": "working",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "text": {
              "maxLength": 16384,
              "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]*$",
              "type": "string"
            },
            "type": {
              "const": "output",
              "type": "string"
            }
          },
          "required": [
            "type",
            "text"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "type": {
              "const": "settled",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      ]
    },
    "ControllerObservation": {
      "additionalProperties": false,
      "description": "Availability observed by a reader, separate from the run's durable status.",
      "properties": {
        "observedAt": {
          "description": "Time of this check, not the time the controller stopped.",
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "state": {
          "$ref": "#/$defs/ControllerState"
        }
      },
      "required": [
        "state",
        "observedAt"
      ],
      "type": "object"
    },
    "ControllerState": {
      "enum": [
        "lost",
        "unknown"
      ],
      "type": "string"
    },
    "DomainErrorData": {
      "properties": {
        "code": {
          "type": "string"
        },
        "details": true
      },
      "required": [
        "code"
      ],
      "type": "object"
    },
    "ExhaustedLoop": {
      "additionalProperties": false,
      "description": "One completed exhausted loop visit, counted by the reducer rather than worker attempts.",
      "properties": {
        "completedIterations": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "mapIndices": {
          "items": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "type": "array"
        },
        "node": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        }
      },
      "required": [
        "node",
        "completedIterations"
      ],
      "type": "object"
    },
    "FailureContext": {
      "additionalProperties": false,
      "description": "The known runtime cause and recent recorded node failures are deliberately separate.\nRecorded failures are evidence; retries or parallel branches may have recovered from them.",
      "properties": {
        "exhaustedLoops": {
          "description": "Latest exhausted visit per loop node and map path.",
          "items": {
            "$ref": "#/$defs/ExhaustedLoop"
          },
          "maxItems": 5,
          "type": "array"
        },
        "incomplete": {
          "default": false,
          "type": "boolean"
        },
        "primary": {
          "anyOf": [
            {
              "$ref": "#/$defs/FailureDiagnostic"
            },
            {
              "type": "null"
            }
          ]
        },
        "recorded": {
          "default": [],
          "items": {
            "$ref": "#/$defs/FailureDiagnostic"
          },
          "maxItems": 5,
          "type": "array"
        },
        "verifiers": {
          "description": "Latest recorded result per verifier node and map path, oldest first.",
          "items": {
            "$ref": "#/$defs/FailureDiagnostic"
          },
          "maxItems": 5,
          "type": "array"
        }
      },
      "type": "object"
    },
    "FailureDiagnostic": {
      "additionalProperties": false,
      "description": "One recorded explanation, with an optional execution selector and retained log cursor.\nA missing cursor means there is no reference into the available durable history.",
      "properties": {
        "cursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "execution": {
          "anyOf": [
            {
              "$ref": "#/$defs/ActiveExecution"
            },
            {
              "type": "null"
            }
          ]
        },
        "message": {
          "maxLength": 16384,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]*$",
          "type": "string"
        }
      },
      "required": [
        "message"
      ],
      "type": "object"
    },
    "InboxEntry": {
      "additionalProperties": false,
      "description": "A bounded inbox row; text, shape and answers are available only through show.",
      "properties": {
        "createdAt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "expiresAt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "node": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        },
        "runId": {
          "$ref": "#/$defs/VectorId"
        },
        "state": {
          "$ref": "#/$defs/RequestState"
        }
      },
      "required": [
        "runId",
        "node",
        "createdAt",
        "expiresAt",
        "state"
      ],
      "type": "object"
    },
    "InboxListParams": {
      "additionalProperties": false,
      "description": "Lists requests still holding their own run suspended, in run ID order.",
      "properties": {
        "after": {
          "type": [
            "string",
            "null"
          ]
        },
        "limit": {
          "format": "uint32",
          "maximum": 100,
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "InboxListResult": {
      "additionalProperties": false,
      "properties": {
        "nextAfter": {
          "type": [
            "string",
            "null"
          ]
        },
        "requests": {
          "items": {
            "$ref": "#/$defs/InboxEntry"
          },
          "maxItems": 100,
          "type": "array"
        }
      },
      "required": [
        "requests"
      ],
      "type": "object"
    },
    "InboxShowResult": {
      "additionalProperties": false,
      "description": "The request made by this run, including its current disposition and continuation.",
      "properties": {
        "createdAt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "node": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        },
        "request": {
          "$ref": "#/$defs/RunRequest"
        },
        "runId": {
          "type": "string"
        },
        "state": {
          "$ref": "#/$defs/RequestState"
        },
        "successorRunId": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "runId",
        "node",
        "createdAt",
        "request",
        "state"
      ],
      "type": "object"
    },
    "JsonRpcError": {
      "properties": {
        "code": {
          "format": "int64",
          "type": "integer"
        },
        "data": {
          "anyOf": [
            {
              "$ref": "#/$defs/DomainErrorData"
            },
            {
              "type": "null"
            }
          ]
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "JsonRpcErrorResponse": {
      "properties": {
        "error": {
          "$ref": "#/$defs/JsonRpcError"
        },
        "id": {
          "anyOf": [
            {
              "$ref": "#/$defs/RequestId"
            },
            {
              "type": "null"
            }
          ]
        },
        "jsonrpc": {
          "type": "string"
        }
      },
      "required": [
        "jsonrpc",
        "error"
      ],
      "type": "object"
    },
    "JsonRpcNotification": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunWatchEventNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification2": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunLogEventNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification3": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunAttachEventNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunStatusParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest2": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunWatchParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest3": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunLogsParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest4": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunAttachParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest5": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/InboxListParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest6": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunVectorsParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest7": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunVectorParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest8": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunForceParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcResponse": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse2": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess2"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse3": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess3"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse4": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess4"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse5": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess5"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse6": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess6"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse7": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess7"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse8": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess8"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse9": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess9"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcSuccess": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunStatusResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess2": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunWatchResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess3": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunLogsResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess4": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunAttachResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess5": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/InboxListResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess6": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/InboxShowResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess7": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunVectorsResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess8": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunVector"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess9": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunForceResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "LogLevel": {
      "enum": [
        "trace",
        "debug",
        "info",
        "warn",
        "error"
      ],
      "type": "string"
    },
    "LogRecord": {
      "additionalProperties": false,
      "description": "The closed public log record shape: a level, a bounded target, and a bounded (possibly\nredacted) message. No raw bytes, reasoning, tools, credentials, env, or provider/session IDs\nare representable.",
      "properties": {
        "level": {
          "$ref": "#/$defs/LogLevel"
        },
        "message": {
          "maxLength": 16384,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]*$",
          "type": "string"
        },
        "target": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "level",
        "target",
        "message"
      ],
      "type": "object"
    },
    "NetworkSteer": {
      "additionalProperties": false,
      "properties": {
        "networks": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
            "type": "string"
          },
          "minItems": 1,
          "type": "array"
        },
        "origin": {
          "$ref": "#/$defs/SteerOrigin"
        }
      },
      "required": [
        "networks",
        "origin"
      ],
      "type": "object"
    },
    "NodeInstructions": {
      "maxLength": 262144,
      "minLength": 1,
      "pattern": "^[^\\u0000]*[^\\s\\u0000][^\\u0000]*$",
      "type": "string"
    },
    "PayloadType": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "null",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "boolean",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "integer",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "number",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "string",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "fields": {
              "additionalProperties": {
                "$ref": "#/$defs/RecordField"
              },
              "propertyNames": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "type": "object"
            },
            "kind": {
              "const": "record",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "fields"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "items": {
              "$ref": "#/$defs/PayloadType"
            },
            "kind": {
              "const": "array",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "items"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "enum",
              "type": "string"
            },
            "values": {
              "items": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "maxItems": 4096,
              "minItems": 1,
              "type": "array",
              "uniqueItems": true
            }
          },
          "required": [
            "kind",
            "values"
          ],
          "type": "object"
        }
      ]
    },
    "RecordField": {
      "additionalProperties": false,
      "properties": {
        "required": {
          "type": "boolean"
        },
        "type": {
          "$ref": "#/$defs/PayloadType"
        }
      },
      "required": [
        "type",
        "required"
      ],
      "type": "object"
    },
    "RequestAnswer": {
      "additionalProperties": false,
      "description": "A person's complete verifier result; diagnostics and artifacts remain host-owned.",
      "properties": {
        "output": true,
        "signals": {
          "additionalProperties": false,
          "patternProperties": {
            "^[A-Za-z_][A-Za-z0-9_.-]*$": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "required": [
        "signals",
        "output"
      ],
      "type": "object"
    },
    "RequestId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "format": "int64",
          "type": "integer"
        }
      ]
    },
    "RequestState": {
      "enum": [
        "pending",
        "answered",
        "expired",
        "stopped"
      ],
      "type": "string"
    },
    "ResolvedGitRemote": {
      "additionalProperties": false,
      "description": "Credential-free Git locator. Git effects use this transport; forge operations use `forge`.",
      "properties": {
        "connection": {
          "description": "Explicit source-only connection authority; omitted for public or native local Git.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": [
            "string",
            "null"
          ]
        },
        "forge": {
          "anyOf": [
            {
              "$ref": "#/$defs/SourceForgeIdentity"
            },
            {
              "type": "null"
            }
          ]
        },
        "url": {
          "allOf": [
            {
              "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$"
            },
            {
              "if": {
                "pattern": "://"
              },
              "then": {
                "pattern": "^(https|ssh)://"
              }
            }
          ],
          "maxLength": 2048,
          "minLength": 1,
          "not": {
            "pattern": "^[A-Za-z]:"
          },
          "pattern": "^(?:https://(?:\\[[A-Za-z0-9%:._-]+\\]|[^/@:?#\\\\\\s-][^/@:?#\\\\\\s]*)(?::[0-9]+)?(?:/[^?#\\\\\\s]*)?|ssh://(?:[^/@:?#\\\\\\s]+@)?(?:\\[[A-Za-z0-9%:._-]+\\]|[^/@:?#\\\\\\s-][^/@:?#\\\\\\s]*)(?::[0-9]+)?(?:/[^?#\\\\\\s]*)?|(?:[^/@:?#\\\\\\s]+@)?(?:\\[[A-Za-z0-9%:._-]+\\]|[^/@:?#\\\\\\s-][^/@:?#\\\\\\s]*):(?:[^/:?#\\\\\\s][^?#\\\\\\s]*|/(?:[^/?#\\\\\\s][^?#\\\\\\s]*)?))$",
          "type": "string"
        }
      },
      "required": [
        "url"
      ],
      "type": "object"
    },
    "ResolvedSource": {
      "allOf": [
        {
          "$ref": "#/$defs/ResolvedSourceWire"
        },
        {
          "else": {
            "properties": {
              "repository": {
                "pattern": "^[A-Za-z0-9._-]{1,100}/[A-Za-z0-9._-]{1,100}$"
              }
            }
          },
          "if": {
            "properties": {
              "remote": {
                "type": "object"
              }
            },
            "required": [
              "remote"
            ]
          }
        }
      ]
    },
    "ResolvedSourceWire": {
      "additionalProperties": false,
      "properties": {
        "branch": {
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "remote": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResolvedGitRemote"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "repository": {
          "maxLength": 255,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "revision": {
          "pattern": "^([0-9a-f]{40}|[0-9a-f]{64})$",
          "type": "string"
        }
      },
      "required": [
        "repository",
        "branch",
        "revision"
      ],
      "type": "object"
    },
    "RunAttachEventNotification": {
      "additionalProperties": false,
      "description": "One live read-only attach event. Carrying both identities prevents events from simultaneous\nverifier attachments being confused on a multiplexed transport.",
      "properties": {
        "event": {
          "$ref": "#/$defs/AgentAttachEvent"
        },
        "execution": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "runId": {
          "type": "string"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "runId",
        "execution",
        "event"
      ],
      "type": "object"
    },
    "RunAttachParams": {
      "additionalProperties": false,
      "description": "Establishes a live, read-only view of exactly one execution.\n\nAttach has no cursor and no replay. Historical output is available through [`RunLogsParams`].\nNo client-to-execution input message exists in this contract.",
      "properties": {
        "execution": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "runId",
        "execution"
      ],
      "type": "object"
    },
    "RunAttachResult": {
      "additionalProperties": false,
      "properties": {
        "execution": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "runId": {
          "type": "string"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "runId",
        "execution"
      ],
      "type": "object"
    },
    "RunForceParams": {
      "additionalProperties": false,
      "description": "Requests the MVP's only stop mode: force. Repeated requests are idempotent at the run ledger.",
      "properties": {
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "runId"
      ],
      "type": "object"
    },
    "RunForceResult": {
      "additionalProperties": false,
      "description": "The durable run status after recording the force request.",
      "properties": {
        "atCursor": {
          "description": "Durable cursor after the force request was recorded.",
          "type": "string"
        },
        "contextSources": {
          "items": {
            "$ref": "#/$defs/ResolvedSource"
          },
          "type": "array"
        },
        "controller": {
          "anyOf": [
            {
              "$ref": "#/$defs/ControllerObservation"
            },
            {
              "type": "null"
            }
          ],
          "description": "Omitted for responding controllers and finished runs. Never durable run state."
        },
        "omittedSteers": {
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "runId": {
          "description": "Public identity of the run whose force request was recorded.",
          "type": "string"
        },
        "size": {
          "description": "Immutable execution size selected for the run.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "source": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResolvedSource"
            },
            {
              "type": "null"
            }
          ],
          "description": "Immutable repository snapshot captured when the run was admitted."
        },
        "status": {
          "$ref": "#/$defs/RunStatus",
          "description": "Public phase projected after the force request was recorded."
        },
        "steers": {
          "items": {
            "$ref": "#/$defs/RunSteer"
          },
          "type": "array"
        },
        "title": {
          "description": "Immutable title captured when the run was admitted.",
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "workspaceRecovery": {
          "$ref": "#/$defs/WorkspaceRecovery"
        }
      },
      "required": [
        "runId",
        "title",
        "size",
        "atCursor",
        "status"
      ],
      "type": "object"
    },
    "RunLogEventNotification": {
      "additionalProperties": false,
      "description": "One durable, reconnectable safe log record. Run-wide system records have no execution;\nexecution output carries the stable opaque selector used by status and attach.",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "execution": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": [
            "string",
            "null"
          ]
        },
        "mapIndices": {
          "description": "Zero-based map indices of the associated execution; empty outside maps.",
          "items": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "type": "array"
        },
        "record": {
          "$ref": "#/$defs/LogRecord"
        },
        "runId": {
          "type": "string"
        },
        "subscriptionId": {
          "type": "string"
        },
        "timestamp": {
          "description": "Producer-captured Unix epoch milliseconds, preserved unchanged by durable replay.",
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "subscriptionId",
        "runId",
        "cursor",
        "timestamp",
        "record"
      ],
      "type": "object"
    },
    "RunLogsParams": {
      "additionalProperties": false,
      "description": "Establishes durable run log replay followed by live delivery.\n\nAn optional execution filter selects one active or settled execution using the exact opaque\nreference advertised by status. `fromCursor` is exclusive, with the same reconnect semantics\nas [`RunWatchParams`]. Omitting both fields after `runId` replays the run's complete retained\nsafe log history.",
      "properties": {
        "execution": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": [
            "string",
            "null"
          ]
        },
        "fromCursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "runId"
      ],
      "type": "object"
    },
    "RunLogsResult": {
      "additionalProperties": false,
      "properties": {
        "atCursor": {
          "type": "string"
        },
        "runId": {
          "type": "string"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "runId",
        "atCursor"
      ],
      "type": "object"
    },
    "RunMetadata": {
      "additionalProperties": false,
      "description": "Runtime-owned metadata accompanying terminal status and retained run history.",
      "properties": {
        "deliveryReceipt": {
          "description": "Confirmed native delivery evidence, independent of the graph's terminal output."
        },
        "tokenUsage": {
          "anyOf": [
            {
              "$ref": "#/$defs/TokenUsage"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    },
    "RunRequest": {
      "additionalProperties": false,
      "description": "The question and result shape declared by a host-run request verifier.",
      "properties": {
        "expiresAt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "id": {
          "$ref": "#/$defs/VectorId"
        },
        "output": {
          "$ref": "#/$defs/PayloadType"
        },
        "signals": {
          "additionalProperties": false,
          "patternProperties": {
            "^[A-Za-z_][A-Za-z0-9_.-]*$": {
              "items": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "maxItems": 4096,
              "minItems": 1,
              "type": "array",
              "uniqueItems": true
            }
          },
          "type": "object"
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "text",
        "signals",
        "output",
        "expiresAt"
      ],
      "type": "object"
    },
    "RunStatus": {
      "description": "Public run state. The closed phase variants make impossible combinations unrepresentable:\nadmitted runs have no execution, stopping means force was requested, and finished runs have\nexactly one terminal result and no active execution. Running/stopping report every active\nexecution rather than a single \"current worker\" slot.",
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "phase": {
              "const": "admitted",
              "type": "string"
            }
          },
          "required": [
            "phase"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "activeExecutions": {
              "items": {
                "$ref": "#/$defs/ActiveExecution"
              },
              "type": "array"
            },
            "graphResult": {
              "anyOf": [
                {
                  "$ref": "#/$defs/TerminalResult"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Recorded graph outcome while postmortem and finalization are still pending.\nOnly `Finished.terminalResult` determines the final run outcome."
            },
            "phase": {
              "const": "running",
              "type": "string"
            },
            "suspendRequested": {
              "type": "boolean"
            }
          },
          "required": [
            "phase",
            "activeExecutions"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "activeExecutions": {
              "items": {
                "$ref": "#/$defs/ActiveExecution"
              },
              "type": "array"
            },
            "graphResult": {
              "anyOf": [
                {
                  "$ref": "#/$defs/TerminalResult"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Recorded graph outcome retained while stopping finalization."
            },
            "phase": {
              "const": "stopping",
              "type": "string"
            }
          },
          "required": [
            "phase",
            "activeExecutions"
          ],
          "type": "object"
        },
        {
          "description": "Durable end of an attempt whose graph can continue in a successor.",
          "oneOf": [
            {
              "properties": {
                "createdAt": {
                  "maximum": 9007199254740991,
                  "minimum": 1,
                  "type": "integer"
                },
                "node": {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                  "type": "string"
                },
                "reason": {
                  "const": "request",
                  "type": "string"
                },
                "request": {
                  "$ref": "#/$defs/RunRequest"
                }
              },
              "required": [
                "reason",
                "node",
                "createdAt",
                "request"
              ],
              "type": "object"
            },
            {
              "properties": {
                "createdAt": {
                  "maximum": 9007199254740991,
                  "minimum": 1,
                  "type": "integer"
                },
                "node": {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                  "type": "string"
                },
                "reason": {
                  "const": "command",
                  "type": "string"
                }
              },
              "required": [
                "reason",
                "node",
                "createdAt"
              ],
              "type": "object"
            },
            {
              "properties": {
                "createdAt": {
                  "maximum": 9007199254740991,
                  "minimum": 1,
                  "type": "integer"
                },
                "node": {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                  "type": "string"
                },
                "reason": {
                  "const": "wait",
                  "type": "string"
                },
                "wait": {
                  "$ref": "#/$defs/RunWait"
                }
              },
              "required": [
                "reason",
                "node",
                "createdAt",
                "wait"
              ],
              "type": "object"
            }
          ],
          "properties": {
            "metadata": {
              "$ref": "#/$defs/RunMetadata",
              "default": {}
            },
            "phase": {
              "const": "suspended",
              "type": "string"
            }
          },
          "required": [
            "phase"
          ],
          "type": "object",
          "unevaluatedProperties": false
        },
        {
          "additionalProperties": false,
          "properties": {
            "metadata": {
              "$ref": "#/$defs/RunMetadata",
              "default": {}
            },
            "phase": {
              "const": "finished",
              "type": "string"
            },
            "terminalResult": {
              "$ref": "#/$defs/TerminalResult"
            }
          },
          "required": [
            "phase",
            "terminalResult"
          ],
          "type": "object"
        }
      ]
    },
    "RunStatusParams": {
      "additionalProperties": false,
      "properties": {
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "runId"
      ],
      "type": "object"
    },
    "RunStatusResult": {
      "additionalProperties": false,
      "properties": {
        "atCursor": {
          "type": "string"
        },
        "contextSources": {
          "items": {
            "$ref": "#/$defs/ResolvedSource"
          },
          "type": "array"
        },
        "controller": {
          "anyOf": [
            {
              "$ref": "#/$defs/ControllerObservation"
            },
            {
              "type": "null"
            }
          ],
          "description": "Omitted for responding controllers and finished runs. Never durable run state."
        },
        "omittedSteers": {
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "runId": {
          "type": "string"
        },
        "size": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "source": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResolvedSource"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "$ref": "#/$defs/RunStatus"
        },
        "steers": {
          "items": {
            "$ref": "#/$defs/RunSteer"
          },
          "type": "array"
        },
        "title": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "workspaceRecovery": {
          "$ref": "#/$defs/WorkspaceRecovery"
        }
      },
      "required": [
        "runId",
        "title",
        "size",
        "atCursor",
        "status"
      ],
      "type": "object"
    },
    "RunSteer": {
      "additionalProperties": false,
      "properties": {
        "createdAt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "excerpt": {
          "type": "string"
        },
        "executions": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
            "type": "string"
          },
          "type": "array"
        },
        "executionsOmitted": {
          "type": "boolean"
        },
        "id": {
          "$ref": "#/$defs/VectorId"
        },
        "mode": {
          "$ref": "#/$defs/SteeringMode",
          "default": "standing"
        },
        "network": {
          "anyOf": [
            {
              "$ref": "#/$defs/NetworkSteer"
            },
            {
              "type": "null"
            }
          ]
        },
        "receivedExecutions": {
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "textBytes": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "id",
        "createdAt",
        "textBytes",
        "excerpt",
        "receivedExecutions",
        "executions"
      ],
      "type": "object"
    },
    "RunVector": {
      "oneOf": [
        {
          "properties": {
            "kind": {
              "const": "steer",
              "type": "string"
            },
            "mode": {
              "$ref": "#/$defs/SteeringMode",
              "default": "standing"
            },
            "network": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NetworkSteer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "text": {
              "$ref": "#/$defs/NodeInstructions"
            }
          },
          "required": [
            "kind",
            "text"
          ],
          "type": "object"
        },
        {
          "properties": {
            "conversation": {
              "type": "string"
            },
            "execution": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
              "type": "string"
            },
            "kind": {
              "const": "steer_receipt",
              "type": "string"
            },
            "nodeInstance": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "steerId": {
              "$ref": "#/$defs/VectorId"
            }
          },
          "required": [
            "kind",
            "steerId",
            "conversation",
            "execution",
            "nodeInstance"
          ],
          "type": "object"
        },
        {
          "properties": {
            "expiresAt": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "kind": {
              "const": "request",
              "type": "string"
            },
            "node": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "output": {
              "$ref": "#/$defs/PayloadType"
            },
            "signals": {
              "additionalProperties": false,
              "patternProperties": {
                "^[A-Za-z_][A-Za-z0-9_.-]*$": {
                  "items": {
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                    "type": "string"
                  },
                  "maxItems": 4096,
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true
                }
              },
              "type": "object"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "node",
            "text",
            "signals",
            "output",
            "expiresAt"
          ],
          "type": "object"
        },
        {
          "properties": {
            "answer": {
              "$ref": "#/$defs/RequestAnswer"
            },
            "kind": {
              "const": "answer",
              "type": "string"
            },
            "requestId": {
              "$ref": "#/$defs/VectorId"
            }
          },
          "required": [
            "kind",
            "requestId",
            "answer"
          ],
          "type": "object"
        },
        {
          "properties": {
            "kind": {
              "const": "expiry",
              "type": "string"
            },
            "requestId": {
              "$ref": "#/$defs/VectorId"
            }
          },
          "required": [
            "kind",
            "requestId"
          ],
          "type": "object"
        },
        {
          "properties": {
            "kind": {
              "const": "suspend_request",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "properties": {
            "kind": {
              "const": "suspension",
              "type": "string"
            },
            "node": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "reason": {
              "$ref": "#/$defs/VectorSuspensionReason"
            }
          },
          "required": [
            "kind",
            "reason",
            "node"
          ],
          "type": "object"
        },
        {
          "properties": {
            "kind": {
              "const": "continuation",
              "type": "string"
            },
            "resumedFrom": {
              "$ref": "#/$defs/VectorId"
            }
          },
          "required": [
            "kind",
            "resumedFrom"
          ],
          "type": "object"
        },
        {
          "properties": {
            "dueAt": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "kind": {
              "const": "wait",
              "type": "string"
            },
            "node": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "node",
            "dueAt"
          ],
          "type": "object"
        }
      ],
      "properties": {
        "createdAt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "id": {
          "$ref": "#/$defs/VectorId"
        },
        "runId": {
          "$ref": "#/$defs/VectorId"
        }
      },
      "required": [
        "id",
        "runId",
        "createdAt"
      ],
      "type": "object"
    },
    "RunVectorParams": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "$ref": "#/$defs/VectorId"
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "runId",
        "id"
      ],
      "type": "object"
    },
    "RunVectorSummary": {
      "description": "Bounded list projection. Full text, schemas and answers require run/vector.",
      "oneOf": [
        {
          "properties": {
            "kind": {
              "const": "steer",
              "type": "string"
            },
            "mode": {
              "$ref": "#/$defs/SteeringMode",
              "default": "standing"
            },
            "network": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NetworkSteer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "textBytes": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "kind",
            "textBytes"
          ],
          "type": "object"
        },
        {
          "properties": {
            "execution": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
              "type": "string"
            },
            "kind": {
              "const": "steer_receipt",
              "type": "string"
            },
            "steerId": {
              "$ref": "#/$defs/VectorId"
            }
          },
          "required": [
            "kind",
            "steerId",
            "execution"
          ],
          "type": "object"
        },
        {
          "properties": {
            "kind": {
              "const": "suspend_request",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "properties": {
            "kind": {
              "const": "suspension",
              "type": "string"
            },
            "node": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "reason": {
              "$ref": "#/$defs/VectorSuspensionReason"
            }
          },
          "required": [
            "kind",
            "reason",
            "node"
          ],
          "type": "object"
        },
        {
          "properties": {
            "kind": {
              "const": "continuation",
              "type": "string"
            },
            "resumedFrom": {
              "$ref": "#/$defs/VectorId"
            }
          },
          "required": [
            "kind",
            "resumedFrom"
          ],
          "type": "object"
        },
        {
          "properties": {
            "dueAt": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "kind": {
              "const": "wait",
              "type": "string"
            },
            "node": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "node",
            "dueAt"
          ],
          "type": "object"
        },
        {
          "properties": {
            "expiresAt": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "kind": {
              "const": "request",
              "type": "string"
            },
            "node": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "node",
            "expiresAt"
          ],
          "type": "object"
        },
        {
          "properties": {
            "kind": {
              "const": "answer",
              "type": "string"
            },
            "requestId": {
              "$ref": "#/$defs/VectorId"
            }
          },
          "required": [
            "kind",
            "requestId"
          ],
          "type": "object"
        },
        {
          "properties": {
            "kind": {
              "const": "expiry",
              "type": "string"
            },
            "requestId": {
              "$ref": "#/$defs/VectorId"
            }
          },
          "required": [
            "kind",
            "requestId"
          ],
          "type": "object"
        }
      ],
      "properties": {
        "createdAt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "id": {
          "$ref": "#/$defs/VectorId"
        },
        "runId": {
          "$ref": "#/$defs/VectorId"
        }
      },
      "required": [
        "id",
        "runId",
        "createdAt"
      ],
      "type": "object"
    },
    "RunVectorsParams": {
      "additionalProperties": false,
      "properties": {
        "after": {
          "anyOf": [
            {
              "$ref": "#/$defs/VectorId"
            },
            {
              "type": "null"
            }
          ]
        },
        "limit": {
          "format": "uint32",
          "maximum": 100,
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "runId"
      ],
      "type": "object"
    },
    "RunVectorsResult": {
      "additionalProperties": false,
      "properties": {
        "nextAfter": {
          "anyOf": [
            {
              "$ref": "#/$defs/VectorId"
            },
            {
              "type": "null"
            }
          ]
        },
        "runId": {
          "type": "string"
        },
        "vectors": {
          "items": {
            "$ref": "#/$defs/RunVectorSummary"
          },
          "maxItems": 100,
          "type": "array"
        }
      },
      "required": [
        "runId",
        "vectors"
      ],
      "type": "object"
    },
    "RunWait": {
      "additionalProperties": false,
      "description": "Absolute wall-clock deadline of a wait.",
      "properties": {
        "dueAt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "dueAt"
      ],
      "type": "object"
    },
    "RunWatchEventNotification": {
      "additionalProperties": false,
      "description": "One durable public status projection. `cursor` is stable run history, not a connection-local\nsequence; clients resume strictly after it.",
      "properties": {
        "contextSources": {
          "items": {
            "$ref": "#/$defs/ResolvedSource"
          },
          "type": "array"
        },
        "cursor": {
          "type": "string"
        },
        "recordedAt": {
          "description": "Ledger recording time of the event producing this projection, in Unix milliseconds.\nCursor alone defines ordering. Imported history carries its import time; old times\nremain unknown rather than estimated.",
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "runId": {
          "type": "string"
        },
        "size": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "source": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResolvedSource"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "$ref": "#/$defs/RunStatus"
        },
        "subscriptionId": {
          "type": "string"
        },
        "title": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "runId",
        "title",
        "size",
        "cursor",
        "status"
      ],
      "type": "object"
    },
    "RunWatchParams": {
      "additionalProperties": false,
      "description": "Establishes a durable run watch.\n\n`fromCursor` is exclusive. Reconnecting with the last delivered cursor therefore returns each\nlater watch record once, with no replayed boundary record and no skipped later record.",
      "properties": {
        "fromCursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "runId"
      ],
      "type": "object"
    },
    "RunWatchResult": {
      "additionalProperties": false,
      "properties": {
        "atCursor": {
          "type": "string"
        },
        "runId": {
          "type": "string"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "runId",
        "atCursor"
      ],
      "type": "object"
    },
    "SourceForgeIdentity": {
      "additionalProperties": false,
      "description": "Optional forge identity selects one registered source-code adapter.",
      "properties": {
        "baseUrl": {
          "description": "Canonical web base, including an optional installation path prefix.\nOmission selects the adapter's public service default when one exists.",
          "maxLength": 2048,
          "minLength": 8,
          "pattern": "^https://[^\\s?#@]+$",
          "type": [
            "string",
            "null"
          ]
        },
        "provider": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "repository": {
          "maxLength": 255,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "provider",
        "repository"
      ],
      "type": "object"
    },
    "SteerOrigin": {
      "additionalProperties": false,
      "properties": {
        "execution": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "node": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        },
        "nodeInstance": {
          "format": "uint64",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "node",
        "nodeInstance",
        "execution"
      ],
      "type": "object"
    },
    "SteeringMode": {
      "enum": [
        "once",
        "standing"
      ],
      "type": "string"
    },
    "TerminalResult": {
      "description": "Authoritative terminal value for backends that can durably reconstruct a completed graph.\n\nThis is additive to [`GetResult`]: backends that do not yet expose terminal values leave the\noptional field absent, including when their status is already `finished`.",
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "output": true,
            "status": {
              "const": "succeeded",
              "type": "string"
            }
          },
          "required": [
            "status",
            "output"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "context": {
              "anyOf": [
                {
                  "$ref": "#/$defs/FailureContext"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reason": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "status": {
              "const": "failed",
              "type": "string"
            }
          },
          "required": [
            "status",
            "reason"
          ],
          "type": "object"
        }
      ]
    },
    "TokenUsage": {
      "additionalProperties": false,
      "description": "Run-wide sum of provider-reported usage for every launched agent invocation.\n\n`complete` is false when at least one invocation did not report usable counters. Cache\ncounters are omitted when the provider does not expose them consistently.",
      "properties": {
        "cacheCreationInputTokens": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "cacheReadInputTokens": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "complete": {
          "type": "boolean"
        },
        "inputTokens": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "outputTokens": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "inputTokens",
        "outputTokens",
        "complete"
      ],
      "type": "object"
    },
    "VectorId": {
      "maxLength": 64,
      "minLength": 1,
      "pattern": "^[A-Za-z0-9_.:-]+$",
      "type": "string"
    },
    "VectorSuspensionReason": {
      "enum": [
        "command",
        "wait",
        "request"
      ],
      "type": "string"
    },
    "WorkspaceRecovery": {
      "additionalProperties": false,
      "description": "Public recovery state. It never contains credentials, workspace paths, or checkpoint bytes.",
      "properties": {
        "connectionRequirements": {
          "additionalProperties": false,
          "description": "Exact connection fields that the successor must resolve again.",
          "patternProperties": {
            "^[^\\u0000-\\u001f\\u007f-\\u009f]+$": {
              "items": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "recoverable": {
          "description": "Whether this run can admit a successor from retained workspace state.",
          "type": "boolean"
        },
        "resumedFrom": {
          "description": "Immediate predecessor when this run is itself a recovery successor.",
          "type": [
            "string",
            "null"
          ]
        },
        "successorRunId": {
          "description": "Successor already admitted from this run, if one exists.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "recoverable"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "attach_event_notification": {
      "$ref": "#/$defs/JsonRpcNotification3"
    },
    "attach_request": {
      "$ref": "#/$defs/JsonRpcRequest4"
    },
    "attach_response": {
      "$ref": "#/$defs/JsonRpcResponse4"
    },
    "force_request": {
      "$ref": "#/$defs/JsonRpcRequest8"
    },
    "force_response": {
      "$ref": "#/$defs/JsonRpcResponse9"
    },
    "inbox_list_request": {
      "$ref": "#/$defs/JsonRpcRequest5"
    },
    "inbox_list_response": {
      "$ref": "#/$defs/JsonRpcResponse5"
    },
    "inbox_show_request": {
      "$ref": "#/$defs/JsonRpcRequest"
    },
    "inbox_show_response": {
      "$ref": "#/$defs/JsonRpcResponse6"
    },
    "log_event_notification": {
      "$ref": "#/$defs/JsonRpcNotification2"
    },
    "logs_request": {
      "$ref": "#/$defs/JsonRpcRequest3"
    },
    "logs_response": {
      "$ref": "#/$defs/JsonRpcResponse3"
    },
    "status_request": {
      "$ref": "#/$defs/JsonRpcRequest"
    },
    "status_response": {
      "$ref": "#/$defs/JsonRpcResponse"
    },
    "suspend_request": {
      "$ref": "#/$defs/JsonRpcRequest"
    },
    "suspend_response": {
      "$ref": "#/$defs/JsonRpcResponse"
    },
    "vector_request": {
      "$ref": "#/$defs/JsonRpcRequest7"
    },
    "vector_response": {
      "$ref": "#/$defs/JsonRpcResponse8"
    },
    "vectors_request": {
      "$ref": "#/$defs/JsonRpcRequest6"
    },
    "vectors_response": {
      "$ref": "#/$defs/JsonRpcResponse7"
    },
    "watch_event_notification": {
      "$ref": "#/$defs/JsonRpcNotification"
    },
    "watch_request": {
      "$ref": "#/$defs/JsonRpcRequest2"
    },
    "watch_response": {
      "$ref": "#/$defs/JsonRpcResponse2"
    }
  },
  "required": [
    "status_request",
    "status_response",
    "watch_request",
    "watch_response",
    "watch_event_notification",
    "logs_request",
    "logs_response",
    "log_event_notification",
    "attach_request",
    "attach_response",
    "attach_event_notification",
    "suspend_request",
    "suspend_response",
    "inbox_list_request",
    "inbox_list_response",
    "inbox_show_request",
    "inbox_show_response",
    "vectors_request",
    "vectors_response",
    "vector_request",
    "vector_response",
    "force_request",
    "force_response"
  ],
  "title": "NativeV2ObservationSchema",
  "type": "object"
}
