{
  "$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"
        },
        "node": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        }
      },
      "required": [
        "execution",
        "node"
      ],
      "type": "object"
    },
    "AdmissionTransition": {
      "additionalProperties": false,
      "properties": {
        "runId": {
          "type": "string"
        },
        "seedInput": true,
        "spec": {
          "$ref": "#/$defs/GraphSpec"
        }
      },
      "required": [
        "runId",
        "spec",
        "seedInput"
      ],
      "type": "object"
    },
    "AgentAttachClosedNotification": {
      "additionalProperties": false,
      "description": "Wire body of the terminal `subscription/closed` server notification for an `agent/attach`\nsubscription. Deliberately carries no cursor field -- `agent/attach` gives a type-level\n\"cursorless\" guarantee, unlike [`crate::SubscriptionClosedNotification`].",
      "properties": {
        "reason": {
          "$ref": "#/$defs/SubscriptionCloseReason"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "reason"
      ],
      "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"
        }
      ]
    },
    "AgentAttachEventNotification": {
      "$ref": "#/$defs/AgentAttachEventNotificationWire"
    },
    "AgentAttachEventNotificationWire": {
      "additionalProperties": false,
      "properties": {
        "event": {
          "$ref": "#/$defs/AgentAttachEvent"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "event"
      ],
      "type": "object"
    },
    "AgentAttachParams": {
      "additionalProperties": false,
      "description": "`agent/attach` establishment parameters: the named `{execution}` request. Deliberately closed,\nrejecting any unknown field.",
      "properties": {
        "execution": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "execution"
      ],
      "type": "object"
    },
    "AgentAttachResult": {
      "additionalProperties": false,
      "description": "The `agent/attach` establishment result: only a `subscriptionId`. Deliberately carries no\n`runId` or `atCursor` -- `agent/attach` is not run-scoped and has no cursor.",
      "properties": {
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId"
      ],
      "type": "object"
    },
    "ApplyParams": {
      "additionalProperties": false,
      "properties": {
        "dryRun": {
          "default": false,
          "type": "boolean"
        },
        "graph": {
          "$ref": "#/$defs/GraphSpec"
        },
        "idempotencyKey": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "ifGeneration": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "input": true
      },
      "required": [
        "graph"
      ],
      "type": "object"
    },
    "ApplyResult": {
      "additionalProperties": false,
      "properties": {
        "deduped": {
          "type": "boolean"
        },
        "diff": {
          "anyOf": [
            {
              "$ref": "#/$defs/GraphDiff"
            },
            {
              "type": "null"
            }
          ]
        },
        "generation": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        },
        "runId": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "phase",
        "deduped"
      ],
      "type": "object"
    },
    "ArtifactLineage": {
      "additionalProperties": false,
      "properties": {
        "attempt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "generation": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "generation",
        "runId",
        "attempt"
      ],
      "type": "object"
    },
    "ArtifactProducer": {
      "additionalProperties": false,
      "properties": {
        "node": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        },
        "worker": {
          "maxLength": 256,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*@[1-9][0-9]*$",
          "type": "string"
        }
      },
      "required": [
        "node",
        "worker"
      ],
      "type": "object"
    },
    "ArtifactRef": {
      "additionalProperties": false,
      "properties": {
        "artifactId": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "byteLength": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "lineage": {
          "$ref": "#/$defs/ArtifactLineage"
        },
        "mediaType": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "producer": {
          "$ref": "#/$defs/ArtifactProducer"
        },
        "redaction": {
          "$ref": "#/$defs/RedactionClass"
        },
        "sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        "typeId": {
          "maxLength": 256,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*@[1-9][0-9]*$",
          "type": "string"
        }
      },
      "required": [
        "artifactId",
        "sha256",
        "byteLength",
        "mediaType",
        "typeId",
        "producer",
        "lineage",
        "redaction"
      ],
      "type": "object"
    },
    "BackendFault": {
      "$ref": "#/$defs/BackendFaultWire"
    },
    "BackendFaultWire": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "$ref": "#/$defs/FaultAction"
        },
        "code": {
          "$ref": "#/$defs/FaultCode"
        },
        "consequence": {
          "$ref": "#/$defs/FaultConsequence"
        },
        "eventId": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "executionRef": {
          "default": null,
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": [
            "string",
            "null"
          ]
        },
        "retry": {
          "$ref": "#/$defs/FaultRetryDisposition"
        },
        "severity": {
          "$ref": "#/$defs/FaultSeverity"
        },
        "source": {
          "items": {
            "$ref": "#/$defs/FaultSourceFrame"
          },
          "maxItems": 8,
          "type": "array"
        },
        "summary": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "eventId",
        "code",
        "consequence",
        "retry",
        "action",
        "severity",
        "summary",
        "source"
      ],
      "type": "object"
    },
    "CancelRequestParams": {
      "additionalProperties": false,
      "description": "Wire body of the `$/cancelRequest` client notification: best-effort cancellation of an\nin-flight unary request by its `RequestId`. Unknown or already-completed ids are a silent\nno-op; cancelling after the backend has committed leaves that committed state unchanged and\nemits no response or compensation.",
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        }
      },
      "required": [
        "id"
      ],
      "type": "object"
    },
    "ChoiceBranch": {
      "additionalProperties": false,
      "properties": {
        "node": {
          "$ref": "#/$defs/GraphNode"
        },
        "when": {
          "$ref": "#/$defs/Guard"
        }
      },
      "required": [
        "when",
        "node"
      ],
      "type": "object"
    },
    "ClaudeProvider": {
      "enum": [
        "anthropic",
        "openrouter",
        "bedrock"
      ],
      "type": "string"
    },
    "ClusterStatus": {
      "properties": {
        "atCursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "currentRunId": {
          "type": [
            "string",
            "null"
          ]
        },
        "observedGeneration": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "operational": {
          "anyOf": [
            {
              "$ref": "#/$defs/OperationalStatus"
            },
            {
              "type": "null"
            }
          ]
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        }
      },
      "required": [
        "phase"
      ],
      "type": "object"
    },
    "CodexProvider": {
      "enum": [
        "openai",
        "openrouter",
        "bedrock"
      ],
      "type": "string"
    },
    "ControlSelector": {
      "additionalProperties": false,
      "properties": {
        "field": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        },
        "source": {
          "$ref": "#/$defs/ControlSource"
        }
      },
      "required": [
        "name",
        "source"
      ],
      "type": "object"
    },
    "ControlSource": {
      "enum": [
        "signal",
        "error",
        "group"
      ],
      "type": "string"
    },
    "DataSelector": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "path": {
              "items": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 1,
              "type": "array"
            },
            "source": {
              "const": "state",
              "type": "string"
            }
          },
          "required": [
            "source",
            "path"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "path": {
              "items": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 1,
              "type": "array"
            },
            "source": {
              "const": "item",
              "type": "string"
            }
          },
          "required": [
            "source",
            "path"
          ],
          "type": "object"
        }
      ]
    },
    "DeclaredConnections": {
      "additionalProperties": {
        "$ref": "#/$defs/DeclaredEnvironment"
      },
      "maxProperties": 64,
      "type": "object"
    },
    "DeclaredEnvironment": {
      "items": {
        "maxLength": 128,
        "minLength": 1,
        "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
        "type": "string"
      },
      "maxItems": 64,
      "type": "array",
      "uniqueItems": true
    },
    "DeleteParams": {
      "additionalProperties": false,
      "properties": {
        "idempotencyKey": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "ifGeneration": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "ifRunId": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "ifGeneration",
        "idempotencyKey"
      ],
      "type": "object"
    },
    "DeleteResult": {
      "additionalProperties": false,
      "properties": {
        "atCursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "deduped": {
          "type": "boolean"
        },
        "deleted": {
          "type": "boolean"
        },
        "generation": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        },
        "runId": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "deleted",
        "phase",
        "deduped"
      ],
      "type": "object"
    },
    "DiagnosticPathSegment": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "field",
              "type": "string"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "index": {
              "format": "uint32",
              "maximum": 4294967295,
              "minimum": 0,
              "type": "integer"
            },
            "kind": {
              "const": "index",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "index"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "node",
              "type": "string"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name"
          ],
          "type": "object"
        }
      ]
    },
    "DiagnosticSeverity": {
      "enum": [
        "error",
        "warning",
        "info"
      ],
      "type": "string"
    },
    "DispatchState": {
      "enum": [
        "active",
        "suspended",
        "draining",
        "force_stopping",
        "stopped"
      ],
      "type": "string"
    },
    "DomainErrorData": {
      "properties": {
        "code": {
          "type": "string"
        },
        "details": true
      },
      "required": [
        "code"
      ],
      "type": "object"
    },
    "EventNotification": {
      "additionalProperties": false,
      "description": "Wire body of the generic `event` server notification.",
      "properties": {
        "cursor": {
          "type": "string"
        },
        "event": {
          "$ref": "#/$defs/WatchEvent"
        },
        "runId": {
          "type": "string"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "runId",
        "cursor",
        "event"
      ],
      "type": "object"
    },
    "FaultAction": {
      "description": "Descriptive only, like [`FaultRetryDisposition`]: naming `Retry` never itself retries or\nauthorizes a retry.",
      "enum": [
        "none",
        "retry",
        "wait",
        "escalate",
        "abort"
      ],
      "type": "string"
    },
    "FaultCode": {
      "enum": [
        "unavailable",
        "resource_exhausted",
        "deadline_exceeded",
        "permission_denied",
        "failed_precondition",
        "not_found",
        "aborted",
        "internal",
        "unknown"
      ],
      "type": "string"
    },
    "FaultConsequence": {
      "enum": [
        "turn_failed",
        "run_failed",
        "run_degraded",
        "no_observable_effect"
      ],
      "type": "string"
    },
    "FaultRetryDisposition": {
      "description": "Descriptive only: no `BackendFault` and no `fault` event ever performs or authorizes a retry.\nEvent ordering and emission never themselves change terminal semantics.",
      "enum": [
        "retryable",
        "retryable_after_backoff",
        "not_retryable",
        "indeterminate"
      ],
      "type": "string"
    },
    "FaultSeverity": {
      "enum": [
        "info",
        "warning",
        "error",
        "critical"
      ],
      "type": "string"
    },
    "FaultSourceFrame": {
      "additionalProperties": false,
      "properties": {
        "component": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "component"
      ],
      "type": "object"
    },
    "GetParams": {
      "additionalProperties": false,
      "properties": {
        "atCursor": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "GetResult": {
      "properties": {
        "atCursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "spec": {
          "anyOf": [
            {
              "$ref": "#/$defs/GraphSpec"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "$ref": "#/$defs/ClusterStatus"
        },
        "terminalResult": {
          "anyOf": [
            {
              "$ref": "#/$defs/TerminalResult"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "status"
      ],
      "type": "object"
    },
    "GraphDiagnostic": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "$ref": "#/$defs/GraphDiagnosticCode"
        },
        "message": {
          "type": "string"
        },
        "path": {
          "items": {
            "$ref": "#/$defs/DiagnosticPathSegment"
          },
          "type": "array"
        },
        "relatedNodes": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
            "type": "string"
          },
          "type": "array"
        },
        "severity": {
          "$ref": "#/$defs/DiagnosticSeverity"
        }
      },
      "required": [
        "severity",
        "code",
        "message",
        "path",
        "relatedNodes"
      ],
      "type": "object"
    },
    "GraphDiagnosticCode": {
      "enum": [
        "schema_safety",
        "reachability",
        "choice_exhaustiveness",
        "loop_exit_satisfiability",
        "missing_bound",
        "write_conflict",
        "ceiling_exceeded",
        "cyclic_reference",
        "undefined_read",
        "invalid_graph_shape"
      ],
      "type": "string"
    },
    "GraphDiff": {
      "additionalProperties": false,
      "properties": {
        "added": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
            "type": "string"
          },
          "type": "array"
        },
        "changed": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
            "type": "string"
          },
          "type": "array"
        },
        "removed": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "added",
        "removed",
        "changed"
      ],
      "type": "object"
    },
    "GraphNode": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "attempts": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "input": {
              "$ref": "#/$defs/PayloadType"
            },
            "inputBindings": {
              "items": {
                "$ref": "#/$defs/InputBinding"
              },
              "type": "array"
            },
            "instructions": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NodeInstructions"
                },
                {
                  "type": "null"
                }
              ]
            },
            "kind": {
              "const": "step",
              "type": "string"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "output": {
              "$ref": "#/$defs/PayloadType"
            },
            "timeoutMs": {
              "description": "Omit to run until completion or cancellation.",
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": [
                "integer",
                "null"
              ]
            },
            "worker": {
              "maxLength": 256,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*@[1-9][0-9]*$",
              "type": "string"
            },
            "writeBindings": {
              "items": {
                "$ref": "#/$defs/WriteBinding"
              },
              "type": "array"
            }
          },
          "required": [
            "kind",
            "name",
            "worker",
            "input",
            "output",
            "inputBindings",
            "writeBindings",
            "attempts"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "attempts": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "diagnostic": {
              "$ref": "#/$defs/PayloadType"
            },
            "input": {
              "$ref": "#/$defs/PayloadType"
            },
            "inputBindings": {
              "items": {
                "$ref": "#/$defs/InputBinding"
              },
              "type": "array"
            },
            "instructions": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NodeInstructions"
                },
                {
                  "type": "null"
                }
              ]
            },
            "kind": {
              "const": "verifier",
              "type": "string"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "output": {
              "$ref": "#/$defs/PayloadType"
            },
            "signals": {
              "additionalProperties": {
                "items": {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                  "type": "string"
                },
                "maxItems": 4096,
                "minItems": 1,
                "type": "array",
                "uniqueItems": true
              },
              "propertyNames": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "type": "object"
            },
            "timeoutMs": {
              "description": "Omit to run until completion or cancellation.",
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": [
                "integer",
                "null"
              ]
            },
            "worker": {
              "maxLength": 256,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*@[1-9][0-9]*$",
              "type": "string"
            },
            "writeBindings": {
              "items": {
                "$ref": "#/$defs/WriteBinding"
              },
              "type": "array"
            }
          },
          "required": [
            "kind",
            "name",
            "worker",
            "input",
            "output",
            "inputBindings",
            "writeBindings",
            "attempts",
            "signals",
            "diagnostic"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "children": {
              "$ref": "#/$defs/NonEmptyVec_of_GraphNode"
            },
            "kind": {
              "const": "seq",
              "type": "string"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "promotedStatePaths": {
              "items": {
                "items": {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                  "type": "string"
                },
                "maxItems": 64,
                "minItems": 1,
                "type": "array"
              },
              "type": "array"
            },
            "state": {
              "$ref": "#/$defs/PayloadType"
            }
          },
          "required": [
            "kind",
            "name",
            "state",
            "children",
            "promotedStatePaths"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "branches": {
              "$ref": "#/$defs/NonEmptyVec_of_ChoiceBranch"
            },
            "kind": {
              "const": "choice",
              "type": "string"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "otherwise": {
              "anyOf": [
                {
                  "$ref": "#/$defs/GraphNode"
                },
                {
                  "type": "null"
                }
              ]
            },
            "promotedStatePaths": {
              "items": {
                "items": {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                  "type": "string"
                },
                "maxItems": 64,
                "minItems": 1,
                "type": "array"
              },
              "type": "array"
            },
            "state": {
              "$ref": "#/$defs/PayloadType"
            }
          },
          "required": [
            "kind",
            "name",
            "state",
            "branches",
            "promotedStatePaths"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "branches": {
              "$ref": "#/$defs/NonEmptyVec_of_GraphNode"
            },
            "join": {
              "$ref": "#/$defs/Join"
            },
            "kind": {
              "const": "par",
              "type": "string"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "promotedStatePaths": {
              "items": {
                "items": {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                  "type": "string"
                },
                "maxItems": 64,
                "minItems": 1,
                "type": "array"
              },
              "type": "array"
            },
            "state": {
              "$ref": "#/$defs/PayloadType"
            }
          },
          "required": [
            "kind",
            "name",
            "state",
            "branches",
            "promotedStatePaths",
            "join"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "body": {
              "$ref": "#/$defs/GraphNode"
            },
            "kind": {
              "const": "loop",
              "type": "string"
            },
            "maxIterations": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "promotedStatePaths": {
              "items": {
                "items": {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                  "type": "string"
                },
                "maxItems": 64,
                "minItems": 1,
                "type": "array"
              },
              "type": "array"
            },
            "state": {
              "$ref": "#/$defs/PayloadType"
            },
            "until": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Guard"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "kind",
            "name",
            "state",
            "body",
            "maxIterations",
            "promotedStatePaths"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "body": {
              "$ref": "#/$defs/GraphNode"
            },
            "kind": {
              "const": "map",
              "type": "string"
            },
            "maxItems": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "over": {
              "$ref": "#/$defs/DataSelector"
            },
            "promotedStatePaths": {
              "items": {
                "items": {
                  "maxLength": 128,
                  "minLength": 1,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                  "type": "string"
                },
                "maxItems": 64,
                "minItems": 1,
                "type": "array"
              },
              "type": "array"
            },
            "state": {
              "$ref": "#/$defs/PayloadType"
            }
          },
          "required": [
            "kind",
            "name",
            "state",
            "body",
            "over",
            "maxItems",
            "promotedStatePaths"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "bindings": {
              "items": {
                "$ref": "#/$defs/InputBinding"
              },
              "type": "array"
            },
            "kind": {
              "const": "succeed",
              "type": "string"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "output": {
              "$ref": "#/$defs/PayloadType"
            }
          },
          "required": [
            "kind",
            "name",
            "output",
            "bindings"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "fail",
              "type": "string"
            },
            "name": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            },
            "reason": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^(?!(?:unhandled|runtime_failed|runtime_lost)$)[A-Za-z_][A-Za-z0-9_.-]*$",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name",
            "reason"
          ],
          "type": "object"
        }
      ]
    },
    "GraphProfile": {
      "enum": [
        "openengine.graph.full/v1",
        "openengine.graph.single-worker/v1"
      ],
      "type": "string"
    },
    "GraphSpec": {
      "additionalProperties": false,
      "properties": {
        "initialInput": {
          "$ref": "#/$defs/PayloadType"
        },
        "policy": {
          "$ref": "#/$defs/PolicyBinding"
        },
        "profile": {
          "$ref": "#/$defs/GraphProfile"
        },
        "root": {
          "$ref": "#/$defs/GraphNode"
        }
      },
      "required": [
        "profile",
        "initialInput",
        "policy",
        "root"
      ],
      "type": "object"
    },
    "Guard": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "in",
              "type": "string"
            },
            "labels": {
              "items": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "maxItems": 4096,
              "minItems": 1,
              "type": "array",
              "uniqueItems": true
            },
            "value": {
              "$ref": "#/$defs/ControlSelector"
            }
          },
          "required": [
            "kind",
            "value",
            "labels"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "guards": {
              "$ref": "#/$defs/NonEmptyVec_of_Guard"
            },
            "kind": {
              "const": "all",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "guards"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "guards": {
              "$ref": "#/$defs/NonEmptyVec_of_Guard"
            },
            "kind": {
              "const": "any",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "guards"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "guard": {
              "$ref": "#/$defs/Guard"
            },
            "kind": {
              "const": "not",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "guard"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "count": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "kind": {
              "const": "k_of_n",
              "type": "string"
            },
            "labels": {
              "items": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "maxItems": 4096,
              "minItems": 1,
              "type": "array",
              "uniqueItems": true
            },
            "values": {
              "$ref": "#/$defs/NonEmptyVec_of_ControlSelector"
            }
          },
          "required": [
            "kind",
            "count",
            "values",
            "labels"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "count": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "kind": {
              "const": "k_of_map",
              "type": "string"
            },
            "labels": {
              "items": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "maxItems": 4096,
              "minItems": 1,
              "type": "array",
              "uniqueItems": true
            },
            "value": {
              "$ref": "#/$defs/ControlSelector"
            }
          },
          "required": [
            "kind",
            "count",
            "value",
            "labels"
          ],
          "type": "object"
        }
      ]
    },
    "InitializeParams": {
      "additionalProperties": false,
      "properties": {
        "protocolVersion": {
          "const": "openengine.cluster/v1",
          "type": "string"
        }
      },
      "required": [
        "protocolVersion"
      ],
      "type": "object"
    },
    "InitializeResult": {
      "properties": {
        "capabilities": {
          "$ref": "#/$defs/ServerCapabilities"
        },
        "protocolVersion": {
          "const": "openengine.cluster/v1",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/ClusterStatus"
        }
      },
      "required": [
        "protocolVersion",
        "capabilities",
        "status"
      ],
      "type": "object"
    },
    "InputBinding": {
      "additionalProperties": false,
      "properties": {
        "target": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
            "type": "string"
          },
          "maxItems": 64,
          "minItems": 1,
          "type": "array"
        },
        "value": {
          "$ref": "#/$defs/DataSelector"
        }
      },
      "required": [
        "target",
        "value"
      ],
      "type": "object"
    },
    "Join": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "all",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "any",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "count": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "kind": {
              "const": "quorum",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "count"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "first",
              "type": "string"
            },
            "when": {
              "$ref": "#/$defs/Guard"
            }
          },
          "required": [
            "kind",
            "when"
          ],
          "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/EventNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification10": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunLogEventNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification11": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunAttachEventNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification2": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/SubscriptionCancelParams"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification3": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/SubscriptionClosedNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification4": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/CancelRequestParams"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification5": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/LogEventNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification6": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/LogsClosedNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification7": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/AgentAttachEventNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification8": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/AgentAttachClosedNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcNotification9": {
      "properties": {
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunWatchEventNotification"
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/InitializeParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest10": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/WatchParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest11": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/LogsParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest12": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/AgentAttachParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest13": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunSubmitParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest14": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunListParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest15": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunStatusParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest16": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunWatchParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest17": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunLogsParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest18": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunAttachParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest19": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RunForceParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest2": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/PlanParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest3": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/ApplyParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest4": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/GetParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest5": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/UpdateParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest6": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/StopParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest7": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/RetryParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest8": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/ResubmitParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcRequest9": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "$ref": "#/$defs/DeleteParams"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "method",
        "params"
      ],
      "type": "object"
    },
    "JsonRpcResponse": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse10": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess10"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse11": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess11"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse12": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess12"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse13": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess13"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse14": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess14"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse15": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess15"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse16": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess16"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse17": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess17"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse18": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess18"
        },
        {
          "$ref": "#/$defs/JsonRpcErrorResponse"
        }
      ]
    },
    "JsonRpcResponse19": {
      "anyOf": [
        {
          "$ref": "#/$defs/JsonRpcSuccess19"
        },
        {
          "$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/InitializeResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess10": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/WatchResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess11": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/LogsResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess12": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/AgentAttachResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess13": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunSubmitResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess14": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunListResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess15": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunStatusResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess16": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunWatchResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess17": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunLogsResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess18": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunAttachResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess19": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RunForceResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess2": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/PlanResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess3": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/ApplyResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess4": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/GetResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess5": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/UpdateResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess6": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/StopResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess7": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/RetryResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess8": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/ResubmitResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "JsonRpcSuccess9": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "jsonrpc": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/DeleteResult"
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "type": "object"
    },
    "Labels": {
      "additionalProperties": {
        "maxLength": 256,
        "minLength": 1,
        "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
        "type": "string"
      },
      "maxProperties": 64,
      "propertyNames": {
        "maxLength": 256,
        "minLength": 1,
        "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
        "type": "string"
      },
      "type": "object"
    },
    "LogEventNotification": {
      "$ref": "#/$defs/LogEventNotificationWire"
    },
    "LogEventNotificationWire": {
      "additionalProperties": false,
      "properties": {
        "record": {
          "$ref": "#/$defs/LogRecord"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "record"
      ],
      "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"
    },
    "LogsClosedNotification": {
      "additionalProperties": false,
      "description": "Wire body of the terminal `subscription/closed` server notification for a `logs` subscription.\nDeliberately carries no cursor field -- `logs` gives a type-level \"cursorless\" guarantee, unlike\n[`crate::SubscriptionClosedNotification`].",
      "properties": {
        "reason": {
          "$ref": "#/$defs/SubscriptionCloseReason"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "reason"
      ],
      "type": "object"
    },
    "LogsParams": {
      "additionalProperties": false,
      "description": "`logs` establishment parameters. v1 has zero caller filters: this is deliberately empty and\nclosed, rejecting any unknown field.",
      "type": "object"
    },
    "LogsResult": {
      "additionalProperties": false,
      "description": "The `logs` establishment result: only a `subscriptionId`. Deliberately carries no `runId` or\n`atCursor` -- `logs` is not run-scoped and has no cursor.",
      "properties": {
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId"
      ],
      "type": "object"
    },
    "NodeAddress": {
      "additionalProperties": false,
      "properties": {
        "attempt": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "node": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        }
      },
      "required": [
        "node",
        "attempt"
      ],
      "type": "object"
    },
    "NodeInstructions": {
      "maxLength": 16384,
      "minLength": 1,
      "pattern": "^[^\\u0000]*[^\\s\\u0000][^\\u0000]*$",
      "type": "string"
    },
    "NodeOutputChannel": {
      "enum": [
        "out",
        "signal",
        "diagnostic"
      ],
      "type": "string"
    },
    "NodeOutputSelector": {
      "additionalProperties": false,
      "properties": {
        "channel": {
          "$ref": "#/$defs/NodeOutputChannel"
        },
        "node": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        },
        "path": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
            "type": "string"
          },
          "maxItems": 64,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "node",
        "channel",
        "path"
      ],
      "type": "object"
    },
    "NodeRuntimeBinding": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "connections": {
              "$ref": "#/$defs/DeclaredConnections"
            },
            "effort": {
              "anyOf": [
                {
                  "$ref": "#/$defs/ReasoningEffort"
                },
                {
                  "type": "null"
                }
              ]
            },
            "kind": {
              "const": "agent",
              "type": "string"
            },
            "model": {
              "maxLength": 2048,
              "minLength": 1,
              "type": "string"
            },
            "sessionScope": {
              "$ref": "#/$defs/SessionScope"
            }
          },
          "required": [
            "kind",
            "model"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "connections": {
              "$ref": "#/$defs/DeclaredConnections"
            },
            "kind": {
              "const": "git_delivery",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        }
      ]
    },
    "NonEmptyVec_of_ChoiceBranch": {
      "items": {
        "$ref": "#/$defs/ChoiceBranch"
      },
      "maxItems": 4096,
      "minItems": 1,
      "type": "array"
    },
    "NonEmptyVec_of_ControlSelector": {
      "items": {
        "$ref": "#/$defs/ControlSelector"
      },
      "maxItems": 4096,
      "minItems": 1,
      "type": "array"
    },
    "NonEmptyVec_of_FieldPath": {
      "items": {
        "items": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
          "type": "string"
        },
        "maxItems": 64,
        "minItems": 1,
        "type": "array"
      },
      "maxItems": 4096,
      "minItems": 1,
      "type": "array"
    },
    "NonEmptyVec_of_GraphNode": {
      "items": {
        "$ref": "#/$defs/GraphNode"
      },
      "maxItems": 4096,
      "minItems": 1,
      "type": "array"
    },
    "NonEmptyVec_of_Guard": {
      "items": {
        "$ref": "#/$defs/Guard"
      },
      "maxItems": 4096,
      "minItems": 1,
      "type": "array"
    },
    "NonEmptyVec_of_NodeName": {
      "items": {
        "maxLength": 128,
        "minLength": 1,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
        "type": "string"
      },
      "maxItems": 4096,
      "minItems": 1,
      "type": "array"
    },
    "OperationalStatus": {
      "additionalProperties": false,
      "properties": {
        "dispatchState": {
          "$ref": "#/$defs/DispatchState"
        },
        "inFlight": {
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "labels": {
          "$ref": "#/$defs/Labels"
        },
        "logLevel": {
          "$ref": "#/$defs/LogLevel"
        },
        "stopMode": {
          "anyOf": [
            {
              "$ref": "#/$defs/StopMode"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "labels",
        "logLevel",
        "dispatchState",
        "inFlight"
      ],
      "type": "object"
    },
    "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"
        }
      ]
    },
    "Phase": {
      "enum": [
        "empty",
        "admitting",
        "running",
        "finished",
        "deleting"
      ],
      "type": "string"
    },
    "PlanParams": {
      "additionalProperties": false,
      "properties": {
        "graph": {
          "$ref": "#/$defs/GraphSpec"
        }
      },
      "required": [
        "graph"
      ],
      "type": "object"
    },
    "PlanResult": {
      "additionalProperties": false,
      "properties": {
        "bounds": {
          "anyOf": [
            {
              "$ref": "#/$defs/StructuralBounds"
            },
            {
              "type": "null"
            }
          ]
        },
        "diagnostics": {
          "items": {
            "$ref": "#/$defs/GraphDiagnostic"
          },
          "type": "array"
        },
        "ok": {
          "type": "boolean"
        }
      },
      "required": [
        "ok",
        "diagnostics"
      ],
      "type": "object"
    },
    "PolicyBinding": {
      "additionalProperties": false,
      "properties": {
        "default": {
          "$ref": "#/$defs/PolicyDefault"
        },
        "policy": {
          "maxLength": 256,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*@[1-9][0-9]*$",
          "type": "string"
        }
      },
      "required": [
        "policy",
        "default"
      ],
      "type": "object"
    },
    "PolicyDefault": {
      "enum": [
        "deny"
      ],
      "type": "string"
    },
    "ReasoningEffort": {
      "enum": [
        "low",
        "medium",
        "high",
        "xhigh",
        "max"
      ],
      "type": "string"
    },
    "RecordField": {
      "additionalProperties": false,
      "properties": {
        "required": {
          "type": "boolean"
        },
        "type": {
          "$ref": "#/$defs/PayloadType"
        }
      },
      "required": [
        "type",
        "required"
      ],
      "type": "object"
    },
    "RedactionClass": {
      "enum": [
        "public",
        "internal",
        "confidential",
        "restricted"
      ],
      "type": "string"
    },
    "RequestId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "format": "int64",
          "type": "integer"
        }
      ]
    },
    "ResolvedSource": {
      "additionalProperties": false,
      "properties": {
        "branch": {
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "repository": {
          "maxLength": 255,
          "minLength": 3,
          "pattern": "^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$",
          "type": "string"
        },
        "revision": {
          "pattern": "^[0-9a-f]{40}$",
          "type": "string"
        }
      },
      "required": [
        "repository",
        "branch",
        "revision"
      ],
      "type": "object"
    },
    "ResubmitParams": {
      "additionalProperties": false,
      "properties": {
        "idempotencyKey": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "ifGeneration": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "ifRunId": {
          "type": "string"
        },
        "replacementInput": true
      },
      "required": [
        "ifGeneration",
        "ifRunId",
        "idempotencyKey"
      ],
      "type": "object"
    },
    "ResubmitResult": {
      "additionalProperties": false,
      "properties": {
        "atCursor": {
          "type": "string"
        },
        "deduped": {
          "type": "boolean"
        },
        "generation": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "operational": {
          "$ref": "#/$defs/OperationalStatus"
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        },
        "priorRunId": {
          "type": "string"
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "generation",
        "priorRunId",
        "runId",
        "phase",
        "operational",
        "atCursor",
        "deduped"
      ],
      "type": "object"
    },
    "RetryParams": {
      "additionalProperties": false,
      "properties": {
        "idempotencyKey": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "ifGeneration": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "ifGeneration",
        "idempotencyKey"
      ],
      "type": "object"
    },
    "RetryResult": {
      "additionalProperties": false,
      "properties": {
        "atCursor": {
          "type": "string"
        },
        "deduped": {
          "type": "boolean"
        },
        "generation": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "operational": {
          "$ref": "#/$defs/OperationalStatus"
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        },
        "retriedTurnId": {
          "type": "string"
        },
        "retryTurnId": {
          "type": "string"
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "generation",
        "runId",
        "phase",
        "retriedTurnId",
        "retryTurnId",
        "operational",
        "atCursor",
        "deduped"
      ],
      "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"
        },
        "runId": {
          "description": "Public identity of the run whose force request was recorded.",
          "type": "string"
        },
        "size": {
          "$ref": "#/$defs/RunSize",
          "description": "Immutable execution size selected for the run."
        },
        "source": {
          "$ref": "#/$defs/ResolvedSource",
          "description": "Immutable repository snapshot captured when the run was admitted."
        },
        "status": {
          "$ref": "#/$defs/RunStatus",
          "description": "Public phase projected after the force request was recorded."
        },
        "title": {
          "description": "Immutable title captured when the run was admitted.",
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "runId",
        "title",
        "source",
        "size",
        "atCursor",
        "status"
      ],
      "type": "object"
    },
    "RunListParams": {
      "additionalProperties": false,
      "description": "The MVP inventory has no filters or pagination controls.",
      "type": "object"
    },
    "RunListResult": {
      "additionalProperties": false,
      "description": "Current durable projections for every retained run.",
      "properties": {
        "runs": {
          "items": {
            "$ref": "#/$defs/RunStatusResult"
          },
          "type": "array"
        }
      },
      "required": [
        "runs"
      ],
      "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"
          ]
        },
        "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": "Additive metadata emitted only with a terminal run projection.",
      "properties": {
        "tokenUsage": {
          "anyOf": [
            {
              "$ref": "#/$defs/TokenUsage"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    },
    "RunSize": {
      "enum": [
        "small",
        "medium",
        "large"
      ],
      "type": "string"
    },
    "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"
            },
            "phase": {
              "const": "running",
              "type": "string"
            }
          },
          "required": [
            "phase",
            "activeExecutions"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "activeExecutions": {
              "items": {
                "$ref": "#/$defs/ActiveExecution"
              },
              "type": "array"
            },
            "phase": {
              "const": "stopping",
              "type": "string"
            }
          },
          "required": [
            "phase",
            "activeExecutions"
          ],
          "type": "object"
        },
        {
          "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"
        },
        "runId": {
          "type": "string"
        },
        "size": {
          "$ref": "#/$defs/RunSize"
        },
        "source": {
          "$ref": "#/$defs/ResolvedSource"
        },
        "status": {
          "$ref": "#/$defs/RunStatus"
        },
        "title": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "runId",
        "title",
        "source",
        "size",
        "atCursor",
        "status"
      ],
      "type": "object"
    },
    "RunSubmission": {
      "additionalProperties": false,
      "description": "Immutable, secret-free native-v2 submission admitted by the selected target.",
      "properties": {
        "graph": {
          "$ref": "#/$defs/GraphSpec"
        },
        "initialInput": true,
        "runtime": {
          "$ref": "#/$defs/RuntimePlan"
        },
        "source": {
          "$ref": "#/$defs/ResolvedSource"
        },
        "submissionKey": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "title": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "title",
        "graph",
        "initialInput",
        "runtime",
        "source",
        "submissionKey"
      ],
      "type": "object"
    },
    "RunSubmitParams": {
      "additionalProperties": false,
      "description": "Trusted controller bootstrap admission. The host assigns the only public run identity before\ncontroller start; the immutable submission remains identity-neutral.",
      "properties": {
        "runId": {
          "type": "string"
        },
        "submission": {
          "$ref": "#/$defs/RunSubmission"
        }
      },
      "required": [
        "runId",
        "submission"
      ],
      "type": "object"
    },
    "RunSubmitResult": {
      "additionalProperties": false,
      "description": "A successful submission returns the one public identity used by every later run method.",
      "properties": {
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "runId"
      ],
      "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": {
        "cursor": {
          "type": "string"
        },
        "runId": {
          "type": "string"
        },
        "size": {
          "$ref": "#/$defs/RunSize"
        },
        "source": {
          "$ref": "#/$defs/ResolvedSource"
        },
        "status": {
          "$ref": "#/$defs/RunStatus"
        },
        "subscriptionId": {
          "type": "string"
        },
        "title": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "runId",
        "title",
        "source",
        "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"
    },
    "RuntimePlan": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "harness": {
              "const": "codex",
              "type": "string"
            },
            "nodes": {
              "additionalProperties": false,
              "patternProperties": {
                "^[A-Za-z_][A-Za-z0-9_.-]*$": {
                  "$ref": "#/$defs/NodeRuntimeBinding"
                }
              },
              "type": "object"
            },
            "provider": {
              "$ref": "#/$defs/CodexProvider"
            },
            "size": {
              "$ref": "#/$defs/RunSize"
            }
          },
          "required": [
            "harness",
            "provider",
            "size",
            "nodes"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "harness": {
              "const": "claude",
              "type": "string"
            },
            "nodes": {
              "additionalProperties": false,
              "patternProperties": {
                "^[A-Za-z_][A-Za-z0-9_.-]*$": {
                  "$ref": "#/$defs/NodeRuntimeBinding"
                }
              },
              "type": "object"
            },
            "provider": {
              "$ref": "#/$defs/ClaudeProvider"
            },
            "size": {
              "$ref": "#/$defs/RunSize"
            }
          },
          "required": [
            "harness",
            "provider",
            "size",
            "nodes"
          ],
          "type": "object"
        }
      ]
    },
    "ServerCapabilities": {
      "additionalProperties": false,
      "properties": {
        "agentAttach": {
          "default": false,
          "type": "boolean"
        },
        "graphProfiles": {
          "default": [],
          "items": {
            "$ref": "#/$defs/GraphProfile"
          },
          "maxItems": 2,
          "not": {
            "minItems": 2,
            "prefixItems": [
              {
                "const": "openengine.graph.single-worker/v1"
              },
              {
                "const": "openengine.graph.full/v1"
              }
            ]
          },
          "type": "array",
          "uniqueItems": true
        },
        "logs": {
          "default": false,
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "SessionScope": {
      "enum": [
        "execution",
        "node_instance"
      ],
      "type": "string"
    },
    "StopMode": {
      "enum": [
        "drain",
        "force"
      ],
      "type": "string"
    },
    "StopParams": {
      "additionalProperties": false,
      "properties": {
        "idempotencyKey": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "ifGeneration": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "mode": {
          "$ref": "#/$defs/StopMode"
        }
      },
      "required": [
        "mode",
        "ifGeneration",
        "idempotencyKey"
      ],
      "type": "object"
    },
    "StopResult": {
      "additionalProperties": false,
      "properties": {
        "acceptedMode": {
          "$ref": "#/$defs/StopMode"
        },
        "atCursor": {
          "type": "string"
        },
        "deduped": {
          "type": "boolean"
        },
        "effectiveMode": {
          "$ref": "#/$defs/StopMode"
        },
        "generation": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "operational": {
          "$ref": "#/$defs/OperationalStatus"
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "generation",
        "runId",
        "phase",
        "acceptedMode",
        "effectiveMode",
        "operational",
        "atCursor",
        "deduped"
      ],
      "type": "object"
    },
    "StructuralBounds": {
      "additionalProperties": false,
      "properties": {
        "attemptsPerNode": {
          "additionalProperties": {
            "maximum": 9007199254740991,
            "minimum": 1,
            "type": "integer"
          },
          "propertyNames": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
            "type": "string"
          },
          "type": "object"
        },
        "maxNodeExecutions": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "peakConcurrency": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "termination": {
          "$ref": "#/$defs/TerminationWitness"
        }
      },
      "required": [
        "termination",
        "maxNodeExecutions",
        "peakConcurrency",
        "attemptsPerNode"
      ],
      "type": "object"
    },
    "SubscriptionCancelParams": {
      "additionalProperties": false,
      "description": "Wire body of the generic `subscription/cancel` client notification.",
      "properties": {
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId"
      ],
      "type": "object"
    },
    "SubscriptionCloseReason": {
      "oneOf": [
        {
          "enum": [
            "done",
            "SLOW_CONSUMER"
          ],
          "type": "string"
        },
        {
          "const": "SOURCE_UNAVAILABLE",
          "description": "The source could not read the remaining history; delivered events are retained, but the\nstream is incomplete. This is not a successful end or a request to reconnect indefinitely.",
          "type": "string"
        }
      ]
    },
    "SubscriptionClosedNotification": {
      "additionalProperties": false,
      "description": "Wire body of the terminal `subscription/closed` server notification.",
      "properties": {
        "lastDeliveredCursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "reason": {
          "$ref": "#/$defs/SubscriptionCloseReason"
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId",
        "reason"
      ],
      "type": "object"
    },
    "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": {
            "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"
        }
      ]
    },
    "TerminationWitness": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "acyclic",
              "type": "string"
            },
            "order": {
              "$ref": "#/$defs/NonEmptyVec_of_NodeName"
            }
          },
          "required": [
            "kind",
            "order"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "bounded",
              "type": "string"
            },
            "maxIterations": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            },
            "ranking": {
              "$ref": "#/$defs/NonEmptyVec_of_FieldPath"
            }
          },
          "required": [
            "kind",
            "ranking",
            "maxIterations"
          ],
          "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"
    },
    "UpdateParams": {
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "labels"
          ]
        },
        {
          "required": [
            "logLevel"
          ]
        },
        {
          "required": [
            "suspended"
          ]
        }
      ],
      "properties": {
        "idempotencyKey": {
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "ifGeneration": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "labels": {
          "$ref": "#/$defs/Labels"
        },
        "logLevel": {
          "$ref": "#/$defs/LogLevel"
        },
        "suspended": {
          "type": "boolean"
        }
      },
      "required": [
        "ifGeneration",
        "idempotencyKey"
      ],
      "type": "object"
    },
    "UpdateResult": {
      "additionalProperties": false,
      "properties": {
        "atCursor": {
          "type": "string"
        },
        "deduped": {
          "type": "boolean"
        },
        "generation": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "operational": {
          "$ref": "#/$defs/OperationalStatus"
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        },
        "runId": {
          "type": "string"
        }
      },
      "required": [
        "generation",
        "runId",
        "phase",
        "operational",
        "atCursor",
        "deduped"
      ],
      "type": "object"
    },
    "WatchEvent": {
      "description": "The closed public event algebra. `Phase` folds the observable cluster status (admission\ncommit, update, suspend/resume, stop-request); `NodeBegin`/`NodeEnd` are a testkit-only\nsynthetic hook decoupled from the real dispatch/lease turn mechanism, since no native graph\nexecutor exists yet; `Bookmark` advances the cursor without changing folded public state;\n`Fault` carries a durable, backend-neutral projected `BackendFault`: it correlates to the\nenclosing `EventNotification.run_id` plus its own optional opaque `executionRef`, and its\nordering/emission never itself authorizes a retry or changes terminal semantics -- it folds to\nno public status change, exactly like `Bookmark`; `Finished` is always the last event for a\nrun.",
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "admission": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AdmissionTransition"
                },
                {
                  "type": "null"
                }
              ]
            },
            "status": {
              "$ref": "#/$defs/ClusterStatus"
            },
            "type": {
              "const": "phase",
              "type": "string"
            }
          },
          "required": [
            "type",
            "status"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "input": true,
            "node": {
              "$ref": "#/$defs/NodeAddress"
            },
            "type": {
              "const": "node_begin",
              "type": "string"
            }
          },
          "required": [
            "type",
            "node",
            "input"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "node": {
              "$ref": "#/$defs/NodeAddress"
            },
            "outcome": {
              "$ref": "#/$defs/WorkerOutcome"
            },
            "type": {
              "const": "node_end",
              "type": "string"
            }
          },
          "required": [
            "type",
            "node",
            "outcome"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "type": {
              "const": "bookmark",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "fault": {
              "$ref": "#/$defs/BackendFault"
            },
            "type": {
              "const": "fault",
              "type": "string"
            }
          },
          "required": [
            "type",
            "fault"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "final_status": {
              "$ref": "#/$defs/ClusterStatus"
            },
            "stop_mode": {
              "anyOf": [
                {
                  "$ref": "#/$defs/StopMode"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "finished",
              "type": "string"
            }
          },
          "required": [
            "type",
            "final_status"
          ],
          "type": "object"
        }
      ]
    },
    "WatchParams": {
      "additionalProperties": false,
      "properties": {
        "fromCursor": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "runId": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "WatchResult": {
      "properties": {
        "atCursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "runId": {
          "type": [
            "string",
            "null"
          ]
        },
        "subscriptionId": {
          "type": "string"
        }
      },
      "required": [
        "subscriptionId"
      ],
      "type": "object"
    },
    "WorkerErrorCode": {
      "enum": [
        "timeout",
        "crash",
        "malformed",
        "refusal"
      ],
      "type": "string"
    },
    "WorkerFailureReason": {
      "enum": [
        "declared_failure",
        "policy_denied",
        "interactive_input_required",
        "authentication_required",
        "malformed_result"
      ],
      "type": "string"
    },
    "WorkerOutcome": {
      "allOf": [
        {
          "$ref": "#/$defs/WorkerOutcomeWire"
        },
        {
          "if": {
            "properties": {
              "status": {
                "const": "error"
              }
            },
            "required": [
              "status"
            ]
          },
          "then": {
            "oneOf": [
              {
                "properties": {
                  "reason": {
                    "const": "declared_failure"
                  }
                },
                "required": [
                  "reason"
                ]
              },
              {
                "properties": {
                  "code": {
                    "const": "refusal"
                  },
                  "reason": {
                    "enum": [
                      "policy_denied",
                      "interactive_input_required",
                      "authentication_required"
                    ]
                  }
                },
                "required": [
                  "code",
                  "reason"
                ]
              },
              {
                "properties": {
                  "code": {
                    "const": "malformed"
                  },
                  "reason": {
                    "const": "malformed_result"
                  }
                },
                "required": [
                  "code",
                  "reason"
                ]
              }
            ]
          }
        }
      ]
    },
    "WorkerOutcomeWire": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "artifacts": {
              "items": {
                "$ref": "#/$defs/ArtifactRef"
              },
              "type": "array"
            },
            "output": true,
            "status": {
              "const": "verified",
              "type": "string"
            }
          },
          "required": [
            "status",
            "output",
            "artifacts"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "artifacts": {
              "items": {
                "$ref": "#/$defs/ArtifactRef"
              },
              "type": "array"
            },
            "diagnostic": true,
            "output": true,
            "signals": {
              "additionalProperties": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "propertyNames": {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              "type": "object"
            },
            "status": {
              "const": "verifier",
              "type": "string"
            }
          },
          "required": [
            "status",
            "output",
            "signals",
            "diagnostic",
            "artifacts"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "code": {
              "$ref": "#/$defs/WorkerErrorCode"
            },
            "reason": {
              "$ref": "#/$defs/WorkerFailureReason"
            },
            "status": {
              "const": "error",
              "type": "string"
            }
          },
          "required": [
            "status",
            "code",
            "reason"
          ],
          "type": "object"
        }
      ]
    },
    "WriteBinding": {
      "additionalProperties": false,
      "properties": {
        "target": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
            "type": "string"
          },
          "maxItems": 64,
          "minItems": 1,
          "type": "array"
        },
        "value": {
          "$ref": "#/$defs/NodeOutputSelector"
        }
      },
      "required": [
        "value",
        "target"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "agent_attach_closed_notification": {
      "$ref": "#/$defs/JsonRpcNotification8"
    },
    "agent_attach_event_notification": {
      "$ref": "#/$defs/JsonRpcNotification7"
    },
    "agent_attach_request": {
      "$ref": "#/$defs/JsonRpcRequest12"
    },
    "agent_attach_response": {
      "$ref": "#/$defs/JsonRpcResponse12"
    },
    "apply_request": {
      "$ref": "#/$defs/JsonRpcRequest3"
    },
    "apply_response": {
      "$ref": "#/$defs/JsonRpcResponse3"
    },
    "cancel_request_notification": {
      "$ref": "#/$defs/JsonRpcNotification4"
    },
    "delete_request": {
      "$ref": "#/$defs/JsonRpcRequest9"
    },
    "delete_response": {
      "$ref": "#/$defs/JsonRpcResponse9"
    },
    "event_notification": {
      "$ref": "#/$defs/JsonRpcNotification"
    },
    "get_request": {
      "$ref": "#/$defs/JsonRpcRequest4"
    },
    "get_response": {
      "$ref": "#/$defs/JsonRpcResponse4"
    },
    "initialize_request": {
      "$ref": "#/$defs/JsonRpcRequest"
    },
    "initialize_response": {
      "$ref": "#/$defs/JsonRpcResponse"
    },
    "log_event_notification": {
      "$ref": "#/$defs/JsonRpcNotification5"
    },
    "logs_closed_notification": {
      "$ref": "#/$defs/JsonRpcNotification6"
    },
    "logs_request": {
      "$ref": "#/$defs/JsonRpcRequest11"
    },
    "logs_response": {
      "$ref": "#/$defs/JsonRpcResponse11"
    },
    "plan_request": {
      "$ref": "#/$defs/JsonRpcRequest2"
    },
    "plan_response": {
      "$ref": "#/$defs/JsonRpcResponse2"
    },
    "resubmit_request": {
      "$ref": "#/$defs/JsonRpcRequest8"
    },
    "resubmit_response": {
      "$ref": "#/$defs/JsonRpcResponse8"
    },
    "retry_request": {
      "$ref": "#/$defs/JsonRpcRequest7"
    },
    "retry_response": {
      "$ref": "#/$defs/JsonRpcResponse7"
    },
    "run_attach_event_notification": {
      "$ref": "#/$defs/JsonRpcNotification11"
    },
    "run_attach_request": {
      "$ref": "#/$defs/JsonRpcRequest18"
    },
    "run_attach_response": {
      "$ref": "#/$defs/JsonRpcResponse18"
    },
    "run_force_request": {
      "$ref": "#/$defs/JsonRpcRequest19"
    },
    "run_force_response": {
      "$ref": "#/$defs/JsonRpcResponse19"
    },
    "run_list_request": {
      "$ref": "#/$defs/JsonRpcRequest14"
    },
    "run_list_response": {
      "$ref": "#/$defs/JsonRpcResponse14"
    },
    "run_log_event_notification": {
      "$ref": "#/$defs/JsonRpcNotification10"
    },
    "run_logs_request": {
      "$ref": "#/$defs/JsonRpcRequest17"
    },
    "run_logs_response": {
      "$ref": "#/$defs/JsonRpcResponse17"
    },
    "run_status_request": {
      "$ref": "#/$defs/JsonRpcRequest15"
    },
    "run_status_response": {
      "$ref": "#/$defs/JsonRpcResponse15"
    },
    "run_submit_request": {
      "$ref": "#/$defs/JsonRpcRequest13"
    },
    "run_submit_response": {
      "$ref": "#/$defs/JsonRpcResponse13"
    },
    "run_watch_event_notification": {
      "$ref": "#/$defs/JsonRpcNotification9"
    },
    "run_watch_request": {
      "$ref": "#/$defs/JsonRpcRequest16"
    },
    "run_watch_response": {
      "$ref": "#/$defs/JsonRpcResponse16"
    },
    "stop_request": {
      "$ref": "#/$defs/JsonRpcRequest6"
    },
    "stop_response": {
      "$ref": "#/$defs/JsonRpcResponse6"
    },
    "subscription_cancel_notification": {
      "$ref": "#/$defs/JsonRpcNotification2"
    },
    "subscription_closed_notification": {
      "$ref": "#/$defs/JsonRpcNotification3"
    },
    "update_request": {
      "$ref": "#/$defs/JsonRpcRequest5"
    },
    "update_response": {
      "$ref": "#/$defs/JsonRpcResponse5"
    },
    "watch_request": {
      "$ref": "#/$defs/JsonRpcRequest10"
    },
    "watch_response": {
      "$ref": "#/$defs/JsonRpcResponse10"
    }
  },
  "required": [
    "initialize_request",
    "initialize_response",
    "plan_request",
    "plan_response",
    "apply_request",
    "apply_response",
    "get_request",
    "get_response",
    "update_request",
    "update_response",
    "stop_request",
    "stop_response",
    "retry_request",
    "retry_response",
    "resubmit_request",
    "resubmit_response",
    "delete_request",
    "delete_response",
    "watch_request",
    "watch_response",
    "event_notification",
    "subscription_cancel_notification",
    "subscription_closed_notification",
    "cancel_request_notification",
    "logs_request",
    "logs_response",
    "log_event_notification",
    "logs_closed_notification",
    "agent_attach_request",
    "agent_attach_response",
    "agent_attach_event_notification",
    "agent_attach_closed_notification",
    "run_submit_request",
    "run_submit_response",
    "run_list_request",
    "run_list_response",
    "run_status_request",
    "run_status_response",
    "run_watch_request",
    "run_watch_response",
    "run_watch_event_notification",
    "run_logs_request",
    "run_logs_response",
    "run_log_event_notification",
    "run_attach_request",
    "run_attach_response",
    "run_attach_event_notification",
    "run_force_request",
    "run_force_response"
  ],
  "title": "ImplementedProtocolSchema",
  "type": "object"
}
