{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.nylorun.com/schemas/harness-api/v5.json",
  "title": "Nylorun Harness API 5",
  "$defs": {
    "ArtifactMeta": {
      "type": "object",
      "properties": {
        "artifactId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "kind": {
          "type": "string",
          "enum": [
            "file",
            "folder"
          ]
        },
        "name": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "contentType": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "tenantWide": {
          "type": "boolean"
        }
      },
      "required": [
        "artifactId",
        "kind",
        "name",
        "version",
        "contentType",
        "size",
        "sha256",
        "tenantWide"
      ],
      "additionalProperties": false
    },
    "EffectIntent": {
      "type": "object",
      "properties": {
        "effectId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "sessionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "turnId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "agentId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "manifestHash": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "model",
            "tool",
            "delegation",
            "agent"
          ]
        },
        "agent": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "delegationId": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "path"
          ],
          "additionalProperties": false
        },
        "toolName": {
          "type": "string"
        },
        "target": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "mcp"
                },
                "server": {
                  "type": "string",
                  "minLength": 1
                },
                "tool": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "kind",
                "server",
                "tool"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "http"
                },
                "tool": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "kind",
                "tool"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "sandbox"
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "harness"
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "runtime"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "schedule_wake",
                    "memory"
                  ]
                }
              },
              "required": [
                "kind",
                "operation"
              ],
              "additionalProperties": false
            }
          ]
        },
        "skill": {
          "type": "string",
          "minLength": 1
        },
        "purpose": {
          "type": "string",
          "const": "summary"
        },
        "path": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "iterations": {
          "type": "string"
        },
        "input": {},
        "context": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "effectId",
        "sessionId",
        "turnId",
        "agentId",
        "manifestHash",
        "kind",
        "context"
      ],
      "additionalProperties": false
    },
    "Frame": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "t": {
              "type": "string",
              "const": "req"
            },
            "id": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "m": {
              "type": "string",
              "minLength": 1
            },
            "p": {}
          },
          "required": [
            "t",
            "id",
            "m",
            "p"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "t": {
              "type": "string",
              "const": "res"
            },
            "id": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "ok": {
              "type": "boolean",
              "const": true
            },
            "r": {}
          },
          "required": [
            "t",
            "id",
            "ok",
            "r"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "t": {
              "type": "string",
              "const": "res"
            },
            "id": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "ok": {
              "type": "boolean",
              "const": false
            },
            "e": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "run_not_held",
                    "turn_cancelled",
                    "ownership_lost",
                    "effect_drift",
                    "invalid",
                    "unavailable",
                    "internal",
                    "not_found",
                    "limit_exceeded"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "message"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "t",
            "id",
            "ok",
            "e"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "t": {
              "type": "string",
              "const": "msg"
            },
            "m": {
              "type": "string",
              "minLength": 1
            },
            "p": {}
          },
          "required": [
            "t",
            "m",
            "p"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "t": {
              "type": "string",
              "const": "abort"
            },
            "id": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "t",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "t": {
              "type": "string",
              "const": "ping"
            }
          },
          "required": [
            "t"
          ],
          "additionalProperties": false
        }
      ]
    },
    "HarnessCheckpoint": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "turnId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "segment": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "manifestHash": {
          "type": "string"
        },
        "input": {},
        "state": {}
      },
      "required": [
        "sessionId",
        "turnId",
        "segment",
        "manifestHash"
      ],
      "additionalProperties": {}
    },
    "IntentAnswer": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "completed"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "value": {},
                "statePatch": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "value"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "status",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "pending",
                "uncertain"
              ]
            }
          },
          "required": [
            "status"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "execute"
            },
            "rejoin": {
              "type": "boolean",
              "const": true
            },
            "traceparent": {
              "type": "string",
              "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"
            }
          },
          "required": [
            "status"
          ],
          "additionalProperties": false
        }
      ]
    },
    "ModelDescriptor": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "minLength": 1
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "inputs": {
          "minItems": 1,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "pdf",
              "office",
              "audio",
              "video"
            ]
          }
        },
        "contextWindow": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "maxOutputTokens": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "reasoning": {
          "type": "boolean"
        }
      },
      "required": [
        "provider",
        "id",
        "inputs",
        "contextWindow",
        "maxOutputTokens"
      ],
      "additionalProperties": false
    },
    "EffectTarget": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "mcp"
            },
            "server": {
              "type": "string",
              "minLength": 1
            },
            "tool": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "server",
            "tool"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "http"
            },
            "tool": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "tool"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "sandbox"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "harness"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "runtime"
            },
            "operation": {
              "type": "string",
              "enum": [
                "schedule_wake",
                "memory"
              ]
            }
          },
          "required": [
            "kind",
            "operation"
          ],
          "additionalProperties": false
        }
      ]
    },
    "TurnAgent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "kind": {
          "type": "string",
          "enum": [
            "virtual",
            "pod",
            "none"
          ]
        },
        "sandbox": {
          "type": "object",
          "properties": {
            "workspace": {
              "type": "string",
              "pattern": "^\\/"
            }
          },
          "required": [
            "workspace"
          ],
          "additionalProperties": false
        },
        "selfWake": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "kind"
      ],
      "additionalProperties": false
    },
    "OutcomeAnswer": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "completed"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "value": {},
                "statePatch": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "value"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "status",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "uncertain"
            }
          },
          "required": [
            "status"
          ],
          "additionalProperties": false
        }
      ]
    },
    "RecordedOutcome": {
      "type": "object",
      "properties": {
        "effectId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "requestHash": {
          "type": "string"
        },
        "outcome": {
          "type": "object",
          "properties": {
            "value": {},
            "statePatch": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "effectId",
        "requestHash",
        "outcome"
      ],
      "additionalProperties": false
    },
    "RunGrant": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "sessionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "turnId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "epoch": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "token": {
          "type": "string"
        },
        "tokenExpiresAt": {
          "type": "string"
        }
      },
      "required": [
        "runId",
        "sessionId",
        "turnId",
        "epoch"
      ],
      "additionalProperties": false
    },
    "RunRouting": {
      "type": "object",
      "properties": {
        "rootManifest": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "sandbox": {
          "type": "object",
          "properties": {
            "ownerId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "environmentId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "spec": {},
            "environment": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "required": [
            "ownerId"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "rootManifest"
      ],
      "additionalProperties": false
    },
    "TraceContext": {
      "type": "object",
      "properties": {
        "traceparent": {
          "type": "string",
          "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"
        },
        "tracestate": {
          "type": "string",
          "maxLength": 512
        }
      },
      "required": [
        "traceparent"
      ],
      "additionalProperties": false
    },
    "TranscriptUpdate": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "keep": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "entries": {
              "type": "array",
              "items": {}
            },
            "length": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "keep",
            "entries",
            "length"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "compaction"
            },
            "keep": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "entries": {
              "type": "array",
              "items": {}
            },
            "length": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "compaction": {
              "type": "object",
              "properties": {
                "trigger": {
                  "type": "string",
                  "enum": [
                    "threshold",
                    "overflow"
                  ]
                },
                "tokensBefore": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "tokensAfter": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "summaryEffectIds": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                }
              },
              "required": [
                "trigger",
                "tokensBefore",
                "tokensAfter",
                "summaryEffectIds"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "kind",
            "keep",
            "entries",
            "length",
            "compaction"
          ],
          "additionalProperties": false
        }
      ]
    },
    "TurnOutput": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "status": {
          "type": "string",
          "enum": [
            "completed",
            "paused",
            "yielded",
            "waiting",
            "uncertain",
            "failed",
            "cancelled"
          ]
        },
        "state": {},
        "output": {},
        "pending": {},
        "error": {},
        "effectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cancelEffectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "transcript": {
          "readOnly": true,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "keep",
                  "entries",
                  "length"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "compaction"
                  },
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "compaction": {
                    "type": "object",
                    "properties": {
                      "trigger": {
                        "type": "string",
                        "enum": [
                          "threshold",
                          "overflow"
                        ]
                      },
                      "tokensBefore": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "tokensAfter": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "summaryEffectIds": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        }
                      }
                    },
                    "required": [
                      "trigger",
                      "tokensBefore",
                      "tokensAfter",
                      "summaryEffectIds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "keep",
                  "entries",
                  "length",
                  "compaction"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "thrown": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "runId"
      ],
      "additionalProperties": false
    },
    "TurnStart": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "turn.start",
            "approval.answer"
          ]
        },
        "engine": {
          "type": "string",
          "enum": [
            "agent",
            "flow"
          ]
        },
        "manifest": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "definition": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "name",
            "version"
          ],
          "additionalProperties": false
        },
        "loop": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "memory": {
          "type": "object",
          "properties": {
            "access": {
              "type": "string",
              "enum": [
                "read_write",
                "read_only"
              ]
            },
            "instructions": {
              "type": "string"
            },
            "index": {
              "type": "string"
            },
            "truncated": {
              "type": "boolean"
            }
          },
          "required": [
            "access",
            "index",
            "truncated"
          ],
          "additionalProperties": false
        },
        "checkpoint": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "mcp": {
          "type": "object",
          "properties": {
            "servers": {
              "readOnly": true,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "instructions": {
                    "type": "string"
                  },
                  "tools": {
                    "readOnly": true,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string"
                        },
                        "inputSchema": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "outputSchema": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "annotations": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "deferred": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "inputSchema",
                        "enabled"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "tools"
                ]
              }
            }
          },
          "required": [
            "servers"
          ]
        },
        "outcomes": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "effectId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "requestHash": {
                "type": "string"
              },
              "outcome": {
                "type": "object",
                "properties": {
                  "value": {},
                  "statePatch": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "value"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "effectId",
              "requestHash",
              "outcome"
            ],
            "additionalProperties": false
          }
        },
        "transcript": {
          "type": "object",
          "properties": {
            "cursor": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "cursor"
          ],
          "additionalProperties": false
        },
        "options": {
          "type": "object",
          "properties": {
            "yieldAfter": {
              "type": "object",
              "properties": {
                "steps": {
                  "type": "number"
                },
                "ms": {
                  "type": "number"
                }
              },
              "additionalProperties": false
            },
            "flowLimits": {},
            "fixtureModel": {
              "type": "boolean"
            }
          },
          "required": [
            "fixtureModel"
          ],
          "additionalProperties": false
        },
        "routing": {
          "type": "object",
          "properties": {
            "rootManifest": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "sandbox": {
              "type": "object",
              "properties": {
                "ownerId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "environmentId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "spec": {},
                "environment": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "ownerId"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "rootManifest"
          ],
          "additionalProperties": false
        },
        "trace": {
          "type": "object",
          "properties": {
            "traceparent": {
              "type": "string",
              "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"
            },
            "tracestate": {
              "type": "string",
              "maxLength": 512
            }
          },
          "required": [
            "traceparent"
          ],
          "additionalProperties": false
        },
        "limits": {
          "type": "object",
          "properties": {
            "recordEntryBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "modelCallBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "modelFileBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "toolAnswerBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "harnessStateBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "chunkBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "folderEntries": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "recordEntryBytes",
            "modelCallBytes",
            "modelFileBytes",
            "toolAnswerBytes",
            "harnessStateBytes",
            "chunkBytes",
            "folderEntries"
          ]
        },
        "model": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string",
              "minLength": 1
            },
            "id": {
              "type": "string",
              "minLength": 1
            },
            "inputs": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "text",
                  "image",
                  "pdf",
                  "office",
                  "audio",
                  "video"
                ]
              }
            },
            "contextWindow": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxOutputTokens": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "reasoning": {
              "type": "boolean"
            }
          },
          "required": [
            "provider",
            "id",
            "inputs",
            "contextWindow",
            "maxOutputTokens"
          ],
          "additionalProperties": false
        },
        "agent": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "kind": {
              "type": "string",
              "enum": [
                "virtual",
                "pod",
                "none"
              ]
            },
            "sandbox": {
              "type": "object",
              "properties": {
                "workspace": {
                  "type": "string",
                  "pattern": "^\\/"
                }
              },
              "required": [
                "workspace"
              ],
              "additionalProperties": false
            },
            "selfWake": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "kind"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "type",
        "engine",
        "manifest",
        "checkpoint",
        "outcomes",
        "transcript",
        "options",
        "routing",
        "limits"
      ],
      "additionalProperties": false
    },
    "GateErrorBody": {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "gate_unauthorized",
                "gate_forbidden",
                "run_stale",
                "invalid_request",
                "gate_conflict",
                "key_required",
                "effect_not_journaled"
              ]
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error"
      ],
      "additionalProperties": false
    },
    "HttpCallBody": {
      "type": "object",
      "properties": {
        "tool": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "sessionId": {
                  "type": "string",
                  "minLength": 1
                },
                "agentId": {
                  "type": "string",
                  "minLength": 1
                },
                "toolName": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "toolName"
              ]
            },
            {
              "type": "object",
              "properties": {
                "sessionId": {
                  "type": "string",
                  "minLength": 1
                },
                "stage": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "stage"
              ]
            }
          ]
        },
        "effectId": {
          "type": "string",
          "minLength": 1
        },
        "turnId": {
          "type": "string",
          "minLength": 1
        },
        "input": {}
      },
      "required": [
        "tool",
        "effectId",
        "turnId",
        "input"
      ]
    },
    "McpListBody": {
      "type": "object",
      "properties": {
        "server": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "minLength": 1
            },
            "agentId": {
              "type": "string",
              "minLength": 1
            },
            "serverName": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "serverName"
          ]
        },
        "cursor": {
          "type": "string"
        }
      },
      "required": [
        "server"
      ]
    },
    "McpServerBody": {
      "type": "object",
      "properties": {
        "server": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "minLength": 1
            },
            "agentId": {
              "type": "string",
              "minLength": 1
            },
            "serverName": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "serverName"
          ]
        }
      },
      "required": [
        "server"
      ]
    },
    "McpServerRef": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "serverName": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "serverName"
      ]
    },
    "ModelCallBody": {
      "type": "object",
      "properties": {
        "effectId": {
          "type": "string",
          "minLength": 1
        },
        "invocationId": {
          "type": "string",
          "minLength": 1
        },
        "call": {
          "type": "object",
          "properties": {
            "prompt": {
              "type": "array",
              "items": {}
            },
            "tools": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": {}
              }
            }
          },
          "required": [
            "prompt",
            "tools"
          ],
          "additionalProperties": {}
        }
      },
      "required": [
        "effectId",
        "invocationId",
        "call"
      ],
      "additionalProperties": false
    },
    "ToolCallBody": {
      "type": "object",
      "properties": {
        "server": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "minLength": 1
            },
            "agentId": {
              "type": "string",
              "minLength": 1
            },
            "serverName": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "serverName"
          ]
        },
        "effectId": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "arguments": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "server",
        "effectId",
        "name",
        "arguments"
      ]
    },
    "McpFacts": {
      "type": "object",
      "properties": {
        "servers": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "agentId": {
                "type": "string"
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "instructions": {
                "type": "string"
              },
              "tools": {
                "readOnly": true,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": {
                      "type": "string"
                    },
                    "inputSchema": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "outputSchema": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "annotations": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "deferred": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name",
                    "inputSchema",
                    "enabled"
                  ]
                }
              }
            },
            "required": [
              "name",
              "tools"
            ]
          }
        }
      },
      "required": [
        "servers"
      ]
    },
    "McpServerFact": {
      "type": "object",
      "properties": {
        "agentId": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "instructions": {
          "type": "string"
        },
        "tools": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "description": {
                "type": "string"
              },
              "inputSchema": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "outputSchema": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "annotations": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "enabled": {
                "type": "boolean"
              },
              "deferred": {
                "type": "boolean"
              }
            },
            "required": [
              "name",
              "inputSchema",
              "enabled"
            ]
          }
        }
      },
      "required": [
        "name",
        "tools"
      ]
    },
    "McpServerRecord": {
      "type": "object",
      "properties": {
        "agentId": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "instructions": {
          "type": "string"
        },
        "tools": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "description": {
                "type": "string"
              },
              "inputSchema": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "outputSchema": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "annotations": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "required": [
              "name",
              "inputSchema"
            ]
          }
        }
      },
      "required": [
        "name",
        "tools"
      ]
    },
    "McpSnapshot": {
      "type": "object",
      "properties": {
        "snapshotSchemaVersion": {
          "type": "number",
          "const": 2
        },
        "manifestHash": {
          "type": "string"
        },
        "servers": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "agentId": {
                "type": "string"
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "instructions": {
                "type": "string"
              },
              "tools": {
                "readOnly": true,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": {
                      "type": "string"
                    },
                    "inputSchema": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "outputSchema": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "annotations": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "name",
                    "inputSchema"
                  ]
                }
              }
            },
            "required": [
              "name",
              "tools"
            ]
          }
        }
      },
      "required": [
        "snapshotSchemaVersion",
        "manifestHash",
        "servers"
      ]
    },
    "McpToolFact": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string"
        },
        "inputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "outputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "annotations": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "enabled": {
          "type": "boolean"
        },
        "deferred": {
          "type": "boolean"
        }
      },
      "required": [
        "name",
        "inputSchema",
        "enabled"
      ]
    },
    "McpToolRecord": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string"
        },
        "inputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "outputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "annotations": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "name",
        "inputSchema"
      ]
    },
    "InputEvent": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "user-message",
                "interrupt"
              ]
            },
            "text": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "kind",
            "text"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "user-message",
                "interrupt"
              ]
            },
            "content": {
              "type": "array",
              "items": {}
            },
            "metadata": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "kind",
            "content"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "approve"
            },
            "interactionId": {
              "type": "string"
            },
            "approved": {
              "type": "boolean"
            }
          },
          "required": [
            "kind",
            "interactionId",
            "approved"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "respond"
            },
            "interactionId": {
              "type": "string"
            },
            "value": {}
          },
          "required": [
            "kind",
            "interactionId",
            "value"
          ]
        }
      ]
    },
    "ModelCandidate": {
      "type": "object",
      "properties": {
        "output": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "text"
                  },
                  "text": {
                    "type": "string"
                  },
                  "providerMetadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "type",
                  "text"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "reasoning"
                  },
                  "text": {
                    "type": "string"
                  },
                  "providerMetadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "type",
                  "text"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "json"
                  },
                  "value": {}
                },
                "required": [
                  "type",
                  "value"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "tool-call"
                  },
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "args": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "raw": {
                    "type": "string"
                  },
                  "providerMetadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "type",
                  "id",
                  "name",
                  "args"
                ]
              }
            ]
          }
        },
        "finishReason": {
          "type": "string",
          "enum": [
            "stop",
            "length",
            "tool-calls",
            "content-filter",
            "other"
          ]
        },
        "usage": {
          "type": "object",
          "properties": {
            "inputTokens": {
              "type": "number"
            },
            "outputTokens": {
              "type": "number"
            },
            "totalTokens": {
              "type": "number"
            },
            "cachedTokens": {
              "type": "number"
            },
            "cacheWriteTokens": {
              "type": "number"
            },
            "reasoningTokens": {
              "type": "number"
            },
            "costUsd": {
              "type": "number"
            }
          }
        },
        "evidence": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "output"
      ]
    },
    "ModelOutputBlock": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "text"
            },
            "text": {
              "type": "string"
            },
            "providerMetadata": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "type",
            "text"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "reasoning"
            },
            "text": {
              "type": "string"
            },
            "providerMetadata": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "type",
            "text"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "json"
            },
            "value": {}
          },
          "required": [
            "type",
            "value"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "tool-call"
            },
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "args": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "raw": {
              "type": "string"
            },
            "providerMetadata": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "type",
            "id",
            "name",
            "args"
          ]
        }
      ]
    },
    "ToolResult": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "callId": {
              "type": "string"
            },
            "toolName": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "const": "completed"
            },
            "output": {},
            "files": {
              "type": "array",
              "items": {}
            }
          },
          "required": [
            "callId",
            "toolName",
            "kind",
            "output"
          ]
        },
        {
          "type": "object",
          "properties": {
            "callId": {
              "type": "string"
            },
            "toolName": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "const": "denied"
            },
            "reason": {
              "type": "string"
            }
          },
          "required": [
            "callId",
            "toolName",
            "kind",
            "reason"
          ]
        },
        {
          "type": "object",
          "properties": {
            "callId": {
              "type": "string"
            },
            "toolName": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "const": "failed"
            },
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {},
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "callId",
            "toolName",
            "kind",
            "code",
            "message"
          ]
        }
      ]
    },
    "TranscriptEntry": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "input"
            },
            "turnId": {
              "type": "string"
            },
            "event": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "user-message",
                        "interrupt"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "kind",
                    "text"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "user-message",
                        "interrupt"
                      ]
                    },
                    "content": {
                      "type": "array",
                      "items": {}
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "kind",
                    "content"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "approve"
                    },
                    "interactionId": {
                      "type": "string"
                    },
                    "approved": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind",
                    "interactionId",
                    "approved"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "respond"
                    },
                    "interactionId": {
                      "type": "string"
                    },
                    "value": {}
                  },
                  "required": [
                    "kind",
                    "interactionId",
                    "value"
                  ]
                }
              ]
            }
          },
          "required": [
            "kind",
            "turnId",
            "event"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "candidate"
            },
            "turnId": {
              "type": "string"
            },
            "stepId": {
              "type": "string"
            },
            "candidate": {
              "type": "object",
              "properties": {
                "output": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "text"
                          },
                          "text": {
                            "type": "string"
                          },
                          "providerMetadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "reasoning"
                          },
                          "text": {
                            "type": "string"
                          },
                          "providerMetadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "json"
                          },
                          "value": {}
                        },
                        "required": [
                          "type",
                          "value"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "tool-call"
                          },
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "args": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "raw": {
                            "type": "string"
                          },
                          "providerMetadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "name",
                          "args"
                        ]
                      }
                    ]
                  }
                },
                "finishReason": {
                  "type": "string",
                  "enum": [
                    "stop",
                    "length",
                    "tool-calls",
                    "content-filter",
                    "other"
                  ]
                },
                "usage": {
                  "type": "object",
                  "properties": {
                    "inputTokens": {
                      "type": "number"
                    },
                    "outputTokens": {
                      "type": "number"
                    },
                    "totalTokens": {
                      "type": "number"
                    },
                    "cachedTokens": {
                      "type": "number"
                    },
                    "cacheWriteTokens": {
                      "type": "number"
                    },
                    "reasoningTokens": {
                      "type": "number"
                    },
                    "costUsd": {
                      "type": "number"
                    }
                  }
                },
                "evidence": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "output"
              ]
            }
          },
          "required": [
            "kind",
            "turnId",
            "stepId",
            "candidate"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "tool-results"
            },
            "turnId": {
              "type": "string"
            },
            "stepId": {
              "type": "string"
            },
            "results": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "callId": {
                        "type": "string"
                      },
                      "toolName": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "const": "completed"
                      },
                      "output": {},
                      "files": {
                        "type": "array",
                        "items": {}
                      }
                    },
                    "required": [
                      "callId",
                      "toolName",
                      "kind",
                      "output"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "callId": {
                        "type": "string"
                      },
                      "toolName": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "const": "denied"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "callId",
                      "toolName",
                      "kind",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "callId": {
                        "type": "string"
                      },
                      "toolName": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "const": "failed"
                      },
                      "code": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "details": {},
                      "retryable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "callId",
                      "toolName",
                      "kind",
                      "code",
                      "message"
                    ]
                  }
                ]
              }
            }
          },
          "required": [
            "kind",
            "turnId",
            "stepId",
            "results"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "final"
            },
            "turnId": {
              "type": "string"
            },
            "stepId": {
              "type": "string"
            },
            "output": {}
          },
          "required": [
            "kind",
            "turnId",
            "stepId",
            "output"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "compaction"
            },
            "turnId": {
              "type": "string"
            },
            "stepId": {
              "type": "string"
            },
            "summary": {
              "type": "string"
            },
            "trigger": {
              "type": "string",
              "enum": [
                "threshold",
                "overflow"
              ]
            },
            "tokensBefore": {
              "type": "number"
            },
            "tokensAfter": {
              "type": "number"
            },
            "files": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "kind",
            "turnId",
            "stepId",
            "summary",
            "trigger",
            "tokensBefore",
            "tokensAfter"
          ]
        }
      ]
    },
    "HostJoinAnswer": {
      "type": "object",
      "properties": {
        "hostToken": {
          "type": "string"
        },
        "egressToken": {
          "type": "string"
        },
        "sandboxId": {
          "type": "string"
        },
        "epoch": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "expiresAt": {
          "type": "string"
        },
        "caCertificate": {
          "type": "string"
        },
        "setup": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "seeded": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "hostToken",
        "egressToken",
        "sandboxId",
        "epoch",
        "expiresAt",
        "caCertificate"
      ],
      "additionalProperties": false
    },
    "HostJoinRequest": {
      "type": "object",
      "properties": {
        "sandboxId": {
          "type": "string",
          "minLength": 1
        },
        "podUid": {
          "type": "string",
          "pattern": "^[A-Za-z0-9-]{1,64}$"
        },
        "joinToken": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "volumeId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9-]{1,64}$"
        }
      },
      "required": [
        "sandboxId",
        "podUid",
        "joinToken"
      ],
      "additionalProperties": false
    },
    "hello.params": {
      "type": "object",
      "properties": {
        "api": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "features": {
          "type": "object",
          "properties": {
            "workspace": {}
          },
          "additionalProperties": false
        }
      },
      "required": [
        "api",
        "name",
        "version",
        "features"
      ],
      "additionalProperties": false
    },
    "hello.result": {
      "type": "object",
      "properties": {
        "api": {
          "type": "number",
          "const": 5
        },
        "tenantId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "sandbox": {
          "type": "object",
          "properties": {
            "backend": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "backend"
          ],
          "additionalProperties": false
        },
        "renewEveryMs": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "api",
        "tenantId",
        "sandbox",
        "renewEveryMs"
      ],
      "additionalProperties": false
    },
    "lease.params": {
      "type": "object",
      "properties": {
        "slots": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "lease.result": {
      "type": "object",
      "properties": {
        "run": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "sessionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "turnId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "epoch": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "token": {
              "type": "string"
            },
            "tokenExpiresAt": {
              "type": "string"
            }
          },
          "required": [
            "runId",
            "sessionId",
            "turnId",
            "epoch"
          ],
          "additionalProperties": false
        },
        "input": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "turn.start",
                "approval.answer"
              ]
            },
            "engine": {
              "type": "string",
              "enum": [
                "agent",
                "flow"
              ]
            },
            "manifest": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "definition": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "name",
                "version"
              ],
              "additionalProperties": false
            },
            "loop": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "memory": {
              "type": "object",
              "properties": {
                "access": {
                  "type": "string",
                  "enum": [
                    "read_write",
                    "read_only"
                  ]
                },
                "instructions": {
                  "type": "string"
                },
                "index": {
                  "type": "string"
                },
                "truncated": {
                  "type": "boolean"
                }
              },
              "required": [
                "access",
                "index",
                "truncated"
              ],
              "additionalProperties": false
            },
            "checkpoint": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "mcp": {
              "type": "object",
              "properties": {
                "servers": {
                  "readOnly": true,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "agentId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "instructions": {
                        "type": "string"
                      },
                      "tools": {
                        "readOnly": true,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "description": {
                              "type": "string"
                            },
                            "inputSchema": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            "outputSchema": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            "annotations": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            "enabled": {
                              "type": "boolean"
                            },
                            "deferred": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "inputSchema",
                            "enabled"
                          ]
                        }
                      }
                    },
                    "required": [
                      "name",
                      "tools"
                    ]
                  }
                }
              },
              "required": [
                "servers"
              ]
            },
            "outcomes": {
              "readOnly": true,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "effectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "requestHash": {
                    "type": "string"
                  },
                  "outcome": {
                    "type": "object",
                    "properties": {
                      "value": {},
                      "statePatch": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "effectId",
                  "requestHash",
                  "outcome"
                ],
                "additionalProperties": false
              }
            },
            "transcript": {
              "type": "object",
              "properties": {
                "cursor": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "cursor"
              ],
              "additionalProperties": false
            },
            "options": {
              "type": "object",
              "properties": {
                "yieldAfter": {
                  "type": "object",
                  "properties": {
                    "steps": {
                      "type": "number"
                    },
                    "ms": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                },
                "flowLimits": {},
                "fixtureModel": {
                  "type": "boolean"
                }
              },
              "required": [
                "fixtureModel"
              ],
              "additionalProperties": false
            },
            "routing": {
              "type": "object",
              "properties": {
                "rootManifest": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "sandbox": {
                  "type": "object",
                  "properties": {
                    "ownerId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    "environmentId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    "spec": {},
                    "environment": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "ownerId"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "rootManifest"
              ],
              "additionalProperties": false
            },
            "trace": {
              "type": "object",
              "properties": {
                "traceparent": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"
                },
                "tracestate": {
                  "type": "string",
                  "maxLength": 512
                }
              },
              "required": [
                "traceparent"
              ],
              "additionalProperties": false
            },
            "limits": {
              "type": "object",
              "properties": {
                "recordEntryBytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "modelCallBytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "modelFileBytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "toolAnswerBytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "harnessStateBytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "chunkBytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "folderEntries": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "recordEntryBytes",
                "modelCallBytes",
                "modelFileBytes",
                "toolAnswerBytes",
                "harnessStateBytes",
                "chunkBytes",
                "folderEntries"
              ]
            },
            "model": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string",
                  "minLength": 1
                },
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "inputs": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf",
                      "office",
                      "audio",
                      "video"
                    ]
                  }
                },
                "contextWindow": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "maxOutputTokens": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "reasoning": {
                  "type": "boolean"
                }
              },
              "required": [
                "provider",
                "id",
                "inputs",
                "contextWindow",
                "maxOutputTokens"
              ],
              "additionalProperties": false
            },
            "agent": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "virtual",
                    "pod",
                    "none"
                  ]
                },
                "sandbox": {
                  "type": "object",
                  "properties": {
                    "workspace": {
                      "type": "string",
                      "pattern": "^\\/"
                    }
                  },
                  "required": [
                    "workspace"
                  ],
                  "additionalProperties": false
                },
                "selfWake": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "kind"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "type",
            "engine",
            "manifest",
            "checkpoint",
            "outcomes",
            "transcript",
            "options",
            "routing",
            "limits"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "run",
        "input"
      ],
      "additionalProperties": false
    },
    "lease.renew.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        }
      },
      "required": [
        "runId"
      ],
      "additionalProperties": false
    },
    "lease.renew.result": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean",
              "const": true
            },
            "token": {
              "type": "string"
            },
            "tokenExpiresAt": {
              "type": "string"
            }
          },
          "required": [
            "ok"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean",
              "const": false
            }
          },
          "required": [
            "ok"
          ],
          "additionalProperties": false
        }
      ]
    },
    "lease.release.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "reason": {
          "type": "string",
          "enum": [
            "shutdown",
            "ownership.lost",
            "connection.lost"
          ]
        }
      },
      "required": [
        "runId",
        "reason"
      ],
      "additionalProperties": false
    },
    "lease.release.result": {
      "type": "object",
      "properties": {},
      "additionalProperties": false
    },
    "effect.intent.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "effect": {
          "type": "object",
          "properties": {
            "effectId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "sessionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "turnId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "agentId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "manifestHash": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "model",
                "tool",
                "delegation",
                "agent"
              ]
            },
            "agent": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "delegationId": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "path"
              ],
              "additionalProperties": false
            },
            "toolName": {
              "type": "string"
            },
            "target": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "mcp"
                    },
                    "server": {
                      "type": "string",
                      "minLength": 1
                    },
                    "tool": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "kind",
                    "server",
                    "tool"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "http"
                    },
                    "tool": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "kind",
                    "tool"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "sandbox"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "harness"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "runtime"
                    },
                    "operation": {
                      "type": "string",
                      "enum": [
                        "schedule_wake",
                        "memory"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "operation"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "skill": {
              "type": "string",
              "minLength": 1
            },
            "purpose": {
              "type": "string",
              "const": "summary"
            },
            "path": {
              "type": "string"
            },
            "key": {
              "type": "string"
            },
            "iterations": {
              "type": "string"
            },
            "input": {},
            "context": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "effectId",
            "sessionId",
            "turnId",
            "agentId",
            "manifestHash",
            "kind",
            "context"
          ],
          "additionalProperties": false
        },
        "requestHash": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        }
      },
      "required": [
        "runId",
        "effect",
        "requestHash"
      ],
      "additionalProperties": false
    },
    "effect.intent.result": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "completed"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "value": {},
                "statePatch": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "value"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "status",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "pending",
                "uncertain"
              ]
            }
          },
          "required": [
            "status"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "execute"
            },
            "rejoin": {
              "type": "boolean",
              "const": true
            },
            "traceparent": {
              "type": "string",
              "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"
            }
          },
          "required": [
            "status"
          ],
          "additionalProperties": false
        }
      ]
    },
    "effect.outcome.params": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "effectId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "value": {}
          },
          "required": [
            "runId",
            "effectId",
            "value"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "effectId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "error": {
              "type": "string"
            }
          },
          "required": [
            "runId",
            "effectId",
            "error"
          ],
          "additionalProperties": false
        }
      ]
    },
    "effect.outcome.result": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "completed"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "value": {},
                "statePatch": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "value"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "status",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "uncertain"
            }
          },
          "required": [
            "status"
          ],
          "additionalProperties": false
        }
      ]
    },
    "transcript.read.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        }
      },
      "required": [
        "runId"
      ],
      "additionalProperties": false
    },
    "transcript.read.result": {
      "type": "object",
      "properties": {
        "cursor": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "entries": {
          "type": "array",
          "items": {}
        }
      },
      "required": [
        "cursor",
        "entries"
      ],
      "additionalProperties": false
    },
    "event.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "sessionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "turnId": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            {
              "type": "null"
            }
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "environment.state",
            "environment.exec",
            "artifact.export.skipped",
            "artifact.export.failed"
          ]
        },
        "payload": {},
        "record": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "sessionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "environmentId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "backend": {
              "type": "string"
            },
            "image": {
              "type": "string"
            },
            "state": {
              "type": "string",
              "enum": [
                "creating",
                "running",
                "stopped"
              ]
            },
            "createdAt": {
              "type": "string"
            },
            "updatedAt": {
              "type": "string"
            }
          },
          "required": [
            "key",
            "sessionId",
            "backend",
            "image",
            "state",
            "createdAt",
            "updatedAt"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "sessionId",
        "turnId",
        "type",
        "payload"
      ],
      "additionalProperties": false
    },
    "event.result": {
      "type": "object",
      "properties": {},
      "additionalProperties": false
    },
    "session.mcp.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "snapshot": {
          "type": "object",
          "properties": {
            "snapshotSchemaVersion": {
              "type": "number",
              "const": 2
            },
            "manifestHash": {
              "type": "string"
            },
            "servers": {
              "readOnly": true,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "instructions": {
                    "type": "string"
                  },
                  "tools": {
                    "readOnly": true,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string"
                        },
                        "inputSchema": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "outputSchema": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "annotations": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "name",
                        "inputSchema"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "tools"
                ]
              }
            }
          },
          "required": [
            "snapshotSchemaVersion",
            "manifestHash",
            "servers"
          ]
        },
        "diagnostics": {
          "type": "array",
          "items": {}
        }
      },
      "required": [
        "runId",
        "diagnostics"
      ],
      "additionalProperties": false
    },
    "session.mcp.result": {
      "type": "object",
      "properties": {
        "mcp": {
          "type": "object",
          "properties": {
            "servers": {
              "readOnly": true,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "instructions": {
                    "type": "string"
                  },
                  "tools": {
                    "readOnly": true,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string"
                        },
                        "inputSchema": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "outputSchema": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "annotations": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "deferred": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "inputSchema",
                        "enabled"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "tools"
                ]
              }
            }
          },
          "required": [
            "servers"
          ]
        }
      },
      "additionalProperties": false
    },
    "definition.file.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "sha256": {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$"
        },
        "offset": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "length": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 50266112
        }
      },
      "required": [
        "runId",
        "sha256"
      ],
      "additionalProperties": false
    },
    "definition.file.result": {
      "type": "object",
      "properties": {
        "base64": {
          "type": "string"
        }
      },
      "required": [
        "base64"
      ],
      "additionalProperties": false
    },
    "artifact.read.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "artifactId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "version": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "offset": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "length": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "runId",
        "artifactId"
      ],
      "additionalProperties": false
    },
    "artifact.read.result": {
      "type": "object",
      "properties": {
        "artifact": {
          "type": "object",
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "kind": {
              "type": "string",
              "enum": [
                "file",
                "folder"
              ]
            },
            "name": {
              "type": "string"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "contentType": {
              "type": "string"
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "sha256": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "tenantWide": {
              "type": "boolean"
            }
          },
          "required": [
            "artifactId",
            "kind",
            "name",
            "version",
            "contentType",
            "size",
            "sha256",
            "tenantWide"
          ],
          "additionalProperties": false
        },
        "offset": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "base64": {
          "type": "string"
        },
        "eof": {
          "type": "boolean"
        }
      },
      "required": [
        "artifact",
        "offset",
        "base64",
        "eof"
      ],
      "additionalProperties": false
    },
    "artifact.write.params": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "op": {
              "type": "string",
              "const": "begin"
            },
            "key": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "artifactId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "effectId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "base64": {
              "type": "string"
            }
          },
          "required": [
            "runId",
            "op",
            "key"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "op": {
              "type": "string",
              "const": "begin"
            },
            "kind": {
              "type": "string",
              "const": "folder"
            },
            "key": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "artifactId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "sameName": {
              "type": "boolean",
              "const": true
            }
          },
          "required": [
            "runId",
            "op",
            "kind",
            "key",
            "name"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "op": {
              "type": "string",
              "const": "file"
            },
            "uploadId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "path": {
              "type": "string",
              "minLength": 1
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "sha256": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "base64": {
              "type": "string"
            }
          },
          "required": [
            "runId",
            "op",
            "uploadId",
            "path",
            "size",
            "sha256"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "op": {
              "type": "string",
              "const": "chunk"
            },
            "uploadId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "sha256": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "offset": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "base64": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "runId",
            "op",
            "uploadId",
            "offset",
            "base64"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "op": {
              "type": "string",
              "const": "commit"
            },
            "uploadId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          "required": [
            "runId",
            "op",
            "uploadId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "op": {
              "type": "string",
              "const": "abort"
            },
            "uploadId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          "required": [
            "runId",
            "op",
            "uploadId"
          ],
          "additionalProperties": false
        }
      ]
    },
    "artifact.write.result": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "open"
            },
            "uploadId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "maxBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "maxFileBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "maxEntries": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "received": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "status",
            "uploadId",
            "maxBytes",
            "received"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "written"
            },
            "artifact": {
              "type": "object",
              "properties": {
                "artifactId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "file",
                    "folder"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "version": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "contentType": {
                  "type": "string"
                },
                "size": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "tenantWide": {
                  "type": "boolean"
                }
              },
              "required": [
                "artifactId",
                "kind",
                "name",
                "version",
                "contentType",
                "size",
                "sha256",
                "tenantWide"
              ],
              "additionalProperties": false
            },
            "created": {
              "type": "boolean"
            },
            "unchanged": {
              "type": "boolean",
              "const": true
            }
          },
          "required": [
            "status",
            "artifact",
            "created"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "refused"
            },
            "reason": {
              "type": "string",
              "enum": [
                "tenant_total",
                "environment_total"
              ]
            },
            "message": {
              "type": "string"
            },
            "limit": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "status",
            "reason",
            "message",
            "limit"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "aborted"
            }
          },
          "required": [
            "status"
          ],
          "additionalProperties": false
        }
      ]
    },
    "turn.completed.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "status": {
          "type": "string",
          "enum": [
            "completed",
            "paused",
            "yielded",
            "waiting",
            "uncertain",
            "failed",
            "cancelled"
          ]
        },
        "state": {},
        "output": {},
        "pending": {},
        "error": {},
        "effectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cancelEffectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "transcript": {
          "readOnly": true,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "keep",
                  "entries",
                  "length"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "compaction"
                  },
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "compaction": {
                    "type": "object",
                    "properties": {
                      "trigger": {
                        "type": "string",
                        "enum": [
                          "threshold",
                          "overflow"
                        ]
                      },
                      "tokensBefore": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "tokensAfter": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "summaryEffectIds": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        }
                      }
                    },
                    "required": [
                      "trigger",
                      "tokensBefore",
                      "tokensAfter",
                      "summaryEffectIds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "keep",
                  "entries",
                  "length",
                  "compaction"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "thrown": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "runId"
      ],
      "additionalProperties": false
    },
    "turn.completed.result": {
      "type": "object",
      "properties": {
        "cursor": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "turn.paused.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "status": {
          "type": "string",
          "enum": [
            "completed",
            "paused",
            "yielded",
            "waiting",
            "uncertain",
            "failed",
            "cancelled"
          ]
        },
        "state": {},
        "output": {},
        "pending": {},
        "error": {},
        "effectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cancelEffectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "transcript": {
          "readOnly": true,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "keep",
                  "entries",
                  "length"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "compaction"
                  },
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "compaction": {
                    "type": "object",
                    "properties": {
                      "trigger": {
                        "type": "string",
                        "enum": [
                          "threshold",
                          "overflow"
                        ]
                      },
                      "tokensBefore": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "tokensAfter": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "summaryEffectIds": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        }
                      }
                    },
                    "required": [
                      "trigger",
                      "tokensBefore",
                      "tokensAfter",
                      "summaryEffectIds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "keep",
                  "entries",
                  "length",
                  "compaction"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "thrown": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "runId"
      ],
      "additionalProperties": false
    },
    "turn.paused.result": {
      "type": "object",
      "properties": {
        "cursor": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "turn.waiting.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "status": {
          "type": "string",
          "enum": [
            "completed",
            "paused",
            "yielded",
            "waiting",
            "uncertain",
            "failed",
            "cancelled"
          ]
        },
        "state": {},
        "output": {},
        "pending": {},
        "error": {},
        "effectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cancelEffectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "transcript": {
          "readOnly": true,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "keep",
                  "entries",
                  "length"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "compaction"
                  },
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "compaction": {
                    "type": "object",
                    "properties": {
                      "trigger": {
                        "type": "string",
                        "enum": [
                          "threshold",
                          "overflow"
                        ]
                      },
                      "tokensBefore": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "tokensAfter": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "summaryEffectIds": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        }
                      }
                    },
                    "required": [
                      "trigger",
                      "tokensBefore",
                      "tokensAfter",
                      "summaryEffectIds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "keep",
                  "entries",
                  "length",
                  "compaction"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "thrown": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "runId"
      ],
      "additionalProperties": false
    },
    "turn.waiting.result": {
      "type": "object",
      "properties": {
        "cursor": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "turn.failed.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "status": {
          "type": "string",
          "enum": [
            "completed",
            "paused",
            "yielded",
            "waiting",
            "uncertain",
            "failed",
            "cancelled"
          ]
        },
        "state": {},
        "output": {},
        "pending": {},
        "error": {},
        "effectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cancelEffectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "transcript": {
          "readOnly": true,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "keep",
                  "entries",
                  "length"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "compaction"
                  },
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "compaction": {
                    "type": "object",
                    "properties": {
                      "trigger": {
                        "type": "string",
                        "enum": [
                          "threshold",
                          "overflow"
                        ]
                      },
                      "tokensBefore": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "tokensAfter": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "summaryEffectIds": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        }
                      }
                    },
                    "required": [
                      "trigger",
                      "tokensBefore",
                      "tokensAfter",
                      "summaryEffectIds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "keep",
                  "entries",
                  "length",
                  "compaction"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "thrown": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "runId"
      ],
      "additionalProperties": false
    },
    "turn.failed.result": {
      "type": "object",
      "properties": {
        "cursor": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "checkpoint.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "status": {
          "type": "string",
          "enum": [
            "completed",
            "paused",
            "yielded",
            "waiting",
            "uncertain",
            "failed",
            "cancelled"
          ]
        },
        "state": {},
        "output": {},
        "pending": {},
        "error": {},
        "effectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cancelEffectIds": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "transcript": {
          "readOnly": true,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "keep",
                  "entries",
                  "length"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "compaction"
                  },
                  "keep": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "array",
                    "items": {}
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "compaction": {
                    "type": "object",
                    "properties": {
                      "trigger": {
                        "type": "string",
                        "enum": [
                          "threshold",
                          "overflow"
                        ]
                      },
                      "tokensBefore": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "tokensAfter": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "summaryEffectIds": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        }
                      }
                    },
                    "required": [
                      "trigger",
                      "tokensBefore",
                      "tokensAfter",
                      "summaryEffectIds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "keep",
                  "entries",
                  "length",
                  "compaction"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "thrown": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "runId"
      ],
      "additionalProperties": false
    },
    "checkpoint.result": {
      "type": "object",
      "properties": {
        "cursor": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "workspace.read.params": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "ownerId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "environmentId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "activeTurnId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "ownerId",
                "activeTurnId"
              ],
              "additionalProperties": false
            },
            "spec": {},
            "tool": {
              "type": "string",
              "enum": [
                "bash",
                "read",
                "write",
                "edit",
                "grep",
                "glob"
              ]
            },
            "input": {}
          },
          "required": [
            "session",
            "spec",
            "tool",
            "input"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "ownerId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "environmentId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "activeTurnId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "ownerId",
                "activeTurnId"
              ],
              "additionalProperties": false
            },
            "spec": {},
            "disk": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "list": {
                      "type": "object",
                      "properties": {
                        "maxEntries": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "maxEntries"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "list"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "read": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1
                        },
                        "offset": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "length": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 50266112
                        }
                      },
                      "required": [
                        "path",
                        "offset",
                        "length"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "read"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "clear": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "clear"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "put": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string",
                            "minLength": 1
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "file",
                              "dir",
                              "link"
                            ]
                          },
                          "mode": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "mtimeMs": {
                            "type": "number",
                            "minimum": 0
                          },
                          "base64": {
                            "type": "string"
                          },
                          "append": {
                            "type": "boolean"
                          },
                          "target": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "type"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "put"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": [
            "session",
            "spec",
            "disk"
          ],
          "additionalProperties": false
        }
      ]
    },
    "workspace.read.result": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "workspace.write.params": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "ownerId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "environmentId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "activeTurnId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "ownerId",
                "activeTurnId"
              ],
              "additionalProperties": false
            },
            "spec": {},
            "tool": {
              "type": "string",
              "enum": [
                "bash",
                "read",
                "write",
                "edit",
                "grep",
                "glob"
              ]
            },
            "input": {}
          },
          "required": [
            "session",
            "spec",
            "tool",
            "input"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "session": {
              "type": "object",
              "properties": {
                "ownerId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "environmentId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "activeTurnId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "ownerId",
                "activeTurnId"
              ],
              "additionalProperties": false
            },
            "spec": {},
            "disk": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "list": {
                      "type": "object",
                      "properties": {
                        "maxEntries": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "maxEntries"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "list"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "read": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1
                        },
                        "offset": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "length": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 50266112
                        }
                      },
                      "required": [
                        "path",
                        "offset",
                        "length"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "read"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "clear": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "clear"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "put": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string",
                            "minLength": 1
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "file",
                              "dir",
                              "link"
                            ]
                          },
                          "mode": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "mtimeMs": {
                            "type": "number",
                            "minimum": 0
                          },
                          "base64": {
                            "type": "string"
                          },
                          "append": {
                            "type": "boolean"
                          },
                          "target": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "type"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "put"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": [
            "session",
            "spec",
            "disk"
          ],
          "additionalProperties": false
        }
      ]
    },
    "workspace.write.result": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "workspace.exec.params": {
      "type": "object",
      "properties": {
        "session": {
          "type": "object",
          "properties": {
            "ownerId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "environmentId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "activeTurnId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "ownerId",
            "activeTurnId"
          ],
          "additionalProperties": false
        },
        "spec": {},
        "tool": {
          "type": "string",
          "enum": [
            "bash",
            "read",
            "write",
            "edit",
            "grep",
            "glob"
          ]
        },
        "input": {}
      },
      "required": [
        "session",
        "spec",
        "tool",
        "input"
      ],
      "additionalProperties": false
    },
    "workspace.exec.result": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "workspace.report.params": {
      "type": "object",
      "properties": {},
      "additionalProperties": false
    },
    "workspace.report.result": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "workspace.sweep.params": {
      "type": "object",
      "properties": {
        "now": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "workspace.sweep.result": {
      "type": "object",
      "properties": {
        "workspaces": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "sessionId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "environmentId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "backend": {
                "type": "string"
              },
              "image": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "creating",
                  "running",
                  "stopped"
                ]
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              }
            },
            "required": [
              "key",
              "sessionId",
              "backend",
              "image",
              "state",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "workspaces"
      ],
      "additionalProperties": false
    },
    "workspace.remove.params": {
      "type": "object",
      "properties": {
        "keys": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "environmentIds": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        },
        "all": {
          "type": "boolean",
          "const": true
        }
      },
      "additionalProperties": false
    },
    "workspace.remove.result": {
      "type": "object",
      "properties": {},
      "additionalProperties": false
    },
    "cancel.params": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "reason": {
          "type": "string",
          "enum": [
            "cancel",
            "shutdown",
            "deadline",
            "ownership.lost"
          ]
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "runId",
        "reason"
      ],
      "additionalProperties": false
    }
  }
}
