{
  "schemas": {
    "pinata.tool-page-request.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048
        }
      },
      "required": ["cursor"],
      "additionalProperties": false
    },
    "pinata.tool-page.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "kind": {
          "type": "string",
          "const": "tool_output_page"
        },
        "encoding": {
          "type": "string",
          "const": "json-utf8"
        },
        "digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "totalBytes": {
          "$ref": "#/definitions/__schema0"
        },
        "offset": {
          "$ref": "#/definitions/__schema0"
        },
        "nextOffset": {
          "$ref": "#/definitions/__schema0"
        },
        "complete": {
          "type": "boolean"
        },
        "text": {
          "type": "string"
        },
        "nextCursor": {
          "type": "string",
          "maxLength": 2048
        },
        "readNext": {
          "type": "string",
          "const": "pinata_page"
        }
      },
      "required": [
        "schemaVersion",
        "kind",
        "encoding",
        "digest",
        "totalBytes",
        "offset",
        "nextOffset",
        "complete",
        "text"
      ],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      }
    },
    "pinata.tool-page-reply.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "kind": {
              "type": "string",
              "const": "tool_output_page"
            },
            "encoding": {
              "type": "string",
              "const": "json-utf8"
            },
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "totalBytes": {
              "$ref": "#/definitions/__schema0"
            },
            "offset": {
              "$ref": "#/definitions/__schema0"
            },
            "nextOffset": {
              "$ref": "#/definitions/__schema0"
            },
            "complete": {
              "type": "boolean"
            },
            "text": {
              "type": "string"
            },
            "nextCursor": {
              "type": "string",
              "maxLength": 2048
            },
            "readNext": {
              "type": "string",
              "const": "pinata_page"
            }
          },
          "required": [
            "schemaVersion",
            "kind",
            "encoding",
            "digest",
            "totalBytes",
            "offset",
            "nextOffset",
            "complete",
            "text"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "error"
            },
            "error": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "invalid_input",
                    "dependency_missing",
                    "capability_denied",
                    "unsupported",
                    "conflict",
                    "owner_unconfirmed",
                    "context_unavailable",
                    "commit_unknown"
                  ]
                },
                "message": {
                  "$ref": "#/definitions/__schema1"
                },
                "field": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                }
              },
              "required": ["code", "message"],
              "additionalProperties": false
            }
          },
          "required": ["status", "error"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.dependency-query.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "list"
            },
            "offset": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": ["kind"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "result"
            },
            "ref": {
              "type": "object",
              "properties": {
                "run": {
                  "type": "string",
                  "minLength": 1
                },
                "worker": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9-]{0,31}$"
                },
                "assignment": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": ["run", "worker", "assignment"],
              "additionalProperties": false
            },
            "offset": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": ["kind", "ref"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      }
    },
    "pinata.dependency-page.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "list"
            },
            "offset": {
              "$ref": "#/definitions/__schema0"
            },
            "total": {
              "$ref": "#/definitions/__schema0"
            },
            "entries": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "execution": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "phase": {
                            "type": "string",
                            "const": "queued"
                          }
                        },
                        "required": ["phase"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "phase": {
                            "type": "string",
                            "const": "preparing"
                          }
                        },
                        "required": ["phase"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "phase": {
                            "type": "string",
                            "const": "running"
                          }
                        },
                        "required": ["phase"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "phase": {
                            "type": "string",
                            "const": "stopping"
                          }
                        },
                        "required": ["phase"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "phase": {
                            "type": "string",
                            "const": "finalizing"
                          }
                        },
                        "required": ["phase"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "phase": {
                            "type": "string",
                            "const": "ended"
                          },
                          "reason": {
                            "type": "string",
                            "enum": ["completed", "failed", "cancelled", "interrupted"]
                          },
                          "cleanup": {
                            "type": "string",
                            "enum": ["confirmed", "unconfirmed"]
                          }
                        },
                        "required": ["phase", "reason", "cleanup"],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "summary": {
                    "type": "string"
                  },
                  "summaryComplete": {
                    "type": "boolean"
                  },
                  "artifact": {
                    "$ref": "#/definitions/__schema3"
                  }
                },
                "required": ["ref", "execution", "summary", "summaryComplete", "artifact"],
                "additionalProperties": false
              }
            },
            "next": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": ["kind", "offset", "total", "entries"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "result"
            },
            "ref": {
              "$ref": "#/definitions/__schema1"
            },
            "artifact": {
              "$ref": "#/definitions/__schema3"
            },
            "offset": {
              "$ref": "#/definitions/__schema0"
            },
            "total": {
              "$ref": "#/definitions/__schema0"
            },
            "text": {
              "type": "string"
            },
            "next": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": ["kind", "ref", "artifact", "offset", "total", "text"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "run": {
              "type": "string",
              "minLength": 1
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        }
      }
    },
    "pinata.ipc-limits.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "frameBytes": {
          "type": "integer",
          "minimum": 1024,
          "maximum": 1048576
        },
        "messageBytes": {
          "type": "integer",
          "minimum": 1024,
          "maximum": 134217728
        },
        "queuedEventBytes": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 16777216
        },
        "queuedEvents": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 4096
        },
        "pendingRequests": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 256
        }
      },
      "required": [
        "frameBytes",
        "messageBytes",
        "queuedEventBytes",
        "queuedEvents",
        "pendingRequests"
      ],
      "additionalProperties": false
    },
    "pinata.ipc-link.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "protocol": {
          "type": "number",
          "const": 1
        },
        "run": {
          "$ref": "#/definitions/__schema0"
        },
        "serverId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "ownerEpoch": {
          "$ref": "#/definitions/__schema0"
        },
        "endpoint": {
          "type": "object",
          "properties": {
            "host": {
              "type": "string",
              "const": "127.0.0.1"
            },
            "port": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            }
          },
          "required": ["host", "port"],
          "additionalProperties": false
        },
        "credentialFile": {
          "type": "string",
          "pattern": "^[a-f0-9-]{36}\\.credentials\\.json$"
        }
      },
      "required": [
        "schemaVersion",
        "protocol",
        "run",
        "serverId",
        "ownerEpoch",
        "endpoint",
        "credentialFile"
      ],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.ipc-credentials.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "run": {
          "$ref": "#/definitions/__schema0"
        },
        "serverId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "ownerEpoch": {
          "$ref": "#/definitions/__schema0"
        },
        "viewer": {
          "$ref": "#/definitions/__schema1"
        },
        "control": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        }
      },
      "required": ["schemaVersion", "run", "serverId", "ownerEpoch", "viewer"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      }
    },
    "pinata.ipc-hello.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "hello"
        },
        "versions": {
          "minItems": 1,
          "maxItems": 8,
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema0"
          }
        },
        "run": {
          "type": "string",
          "minLength": 1
        },
        "serverId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "role": {
          "type": "string",
          "enum": ["viewer", "control"]
        },
        "token": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "notices": {
          "type": "string",
          "const": "deduplicate-by-id"
        }
      },
      "required": ["type", "versions", "run", "serverId", "role", "token"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      }
    },
    "pinata.ipc-client-frame.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "hello"
            },
            "versions": {
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "run": {
              "$ref": "#/definitions/__schema1"
            },
            "serverId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "role": {
              "type": "string",
              "enum": ["viewer", "control"]
            },
            "token": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "notices": {
              "type": "string",
              "const": "deduplicate-by-id"
            }
          },
          "required": ["type", "versions", "run", "serverId", "role", "token"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "request"
            },
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "call": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "execute"
                    },
                    "input": {}
                  },
                  "required": ["method", "input"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "query"
                    },
                    "input": {}
                  },
                  "required": ["method", "input"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "wait"
                    },
                    "input": {}
                  },
                  "required": ["method", "input"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "recover"
                    },
                    "input": {}
                  },
                  "required": ["method", "input"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "deliver_notifications"
                    }
                  },
                  "required": ["method"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "consume_notification"
                    },
                    "id": {
                      "$ref": "#/definitions/__schema1"
                    },
                    "checkpoint": {
                      "type": "object",
                      "properties": {
                        "digest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "size": {
                          "$ref": "#/definitions/__schema3"
                        }
                      },
                      "required": ["digest", "size"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["method", "id", "checkpoint"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": ["type", "id", "call"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "subscribe"
            },
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "since": {
              "type": "object",
              "properties": {
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema1"
                },
                "revision": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["ownerEpoch", "revision"],
              "additionalProperties": false
            }
          },
          "required": ["type", "id"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "unsubscribe"
            },
            "id": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["type", "id"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "abort_wait"
            },
            "id": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["type", "id"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "event_ack"
            },
            "subscription": {
              "$ref": "#/definitions/__schema2"
            },
            "id": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["type", "subscription", "id"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "notification_receipt"
            },
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "noticeId": {
              "$ref": "#/definitions/__schema1"
            },
            "status": {
              "type": "string",
              "enum": ["delivered", "undelivered"]
            }
          },
          "required": ["type", "id", "noticeId", "status"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        },
        "__schema2": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9:/._-]+$"
        },
        "__schema3": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      }
    },
    "pinata.ipc-server-frame.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "welcome"
            },
            "version": {
              "type": "number",
              "const": 1
            },
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "serverId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema0"
            },
            "role": {
              "type": "string",
              "enum": ["viewer", "control"]
            },
            "capabilities": {
              "type": "object",
              "properties": {
                "live": {
                  "type": "boolean"
                },
                "control": {
                  "type": "boolean"
                },
                "wait": {
                  "type": "boolean"
                },
                "recover": {
                  "type": "boolean"
                },
                "notifications": {
                  "type": "boolean"
                },
                "snapshots": {
                  "type": "boolean",
                  "const": true
                }
              },
              "required": ["live", "control", "wait", "recover", "notifications", "snapshots"],
              "additionalProperties": false
            },
            "limits": {
              "type": "object",
              "properties": {
                "frameBytes": {
                  "type": "integer",
                  "minimum": 1024,
                  "maximum": 1048576
                },
                "messageBytes": {
                  "type": "integer",
                  "minimum": 1024,
                  "maximum": 134217728
                },
                "queuedEventBytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 16777216
                },
                "queuedEvents": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 4096
                },
                "pendingRequests": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 256
                }
              },
              "required": [
                "frameBytes",
                "messageBytes",
                "queuedEventBytes",
                "queuedEvents",
                "pendingRequests"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "type",
            "version",
            "run",
            "serverId",
            "ownerEpoch",
            "role",
            "capabilities",
            "limits"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "error"
            },
            "error": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_input",
                        "dependency_missing",
                        "capability_denied",
                        "unsupported",
                        "conflict",
                        "owner_unconfirmed",
                        "context_unavailable",
                        "commit_unknown"
                      ]
                    },
                    "message": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "field": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    }
                  },
                  "required": ["code", "message"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "internal_error",
                        "protocol_version",
                        "unauthenticated",
                        "transport_closed",
                        "transport_limit"
                      ]
                    },
                    "message": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "field": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    }
                  },
                  "required": ["code", "message"],
                  "additionalProperties": false
                }
              ]
            },
            "supportedVersions": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            }
          },
          "required": ["type", "error"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "part"
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9:/._-]+$"
            },
            "offset": {
              "$ref": "#/definitions/__schema1"
            },
            "total": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "data": {
              "type": "string",
              "pattern": "^[A-Za-z0-9+/]*={0,2}$"
            }
          },
          "required": ["type", "id", "offset", "total", "data"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      }
    },
    "pinata.ipc-server-message.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "reply"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "reply": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "ok"
                    },
                    "response": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "method": {
                              "type": "string",
                              "const": "execute"
                            },
                            "result": {
                              "$ref": "#/definitions/__schema1"
                            }
                          },
                          "required": ["method", "result"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "method": {
                              "type": "string",
                              "const": "query"
                            },
                            "result": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "config"
                                    },
                                    "config": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schemaVersion": {
                                              "default": 1,
                                              "type": "number",
                                              "const": 1
                                            },
                                            "workspace": {
                                              "default": "shared",
                                              "allOf": [
                                                {
                                                  "$ref": "#/definitions/__schema9"
                                                }
                                              ]
                                            },
                                            "models": {
                                              "default": {},
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {
                                                "$ref": "#/definitions/__schema10"
                                              }
                                            },
                                            "fallbacks": {
                                              "default": {},
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {
                                                "maxItems": 5,
                                                "type": "array",
                                                "items": {
                                                  "$ref": "#/definitions/__schema10"
                                                }
                                              }
                                            },
                                            "toolProviders": {
                                              "default": {},
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "extension": {
                                                    "$ref": "#/definitions/__schema3"
                                                  },
                                                  "tools": {
                                                    "type": "array",
                                                    "items": {
                                                      "$ref": "#/definitions/__schema3"
                                                    }
                                                  }
                                                },
                                                "required": ["extension", "tools"],
                                                "additionalProperties": false
                                              }
                                            },
                                            "passEnv": {
                                              "default": [],
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "pattern": "^[A-Z][A-Z0-9_]*$"
                                              }
                                            },
                                            "webExtension": {
                                              "allOf": [
                                                {
                                                  "$ref": "#/definitions/__schema3"
                                                }
                                              ]
                                            },
                                            "setup": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean",
                                                  "const": false
                                                },
                                                {
                                                  "$ref": "#/definitions/__schema3"
                                                }
                                              ]
                                            },
                                            "worktreeRoot": {
                                              "allOf": [
                                                {
                                                  "$ref": "#/definitions/__schema3"
                                                }
                                              ]
                                            },
                                            "codemode": {
                                              "default": true,
                                              "type": "boolean"
                                            },
                                            "includeUncommitted": {
                                              "default": true,
                                              "type": "boolean"
                                            },
                                            "mode": {
                                              "default": "lean",
                                              "type": "string",
                                              "enum": ["lean", "observe"]
                                            },
                                            "backend": {
                                              "default": "in-process",
                                              "allOf": [
                                                {
                                                  "$ref": "#/definitions/__schema12"
                                                }
                                              ]
                                            },
                                            "execution": {
                                              "default": {
                                                "maxConcurrent": null
                                              },
                                              "type": "object",
                                              "properties": {
                                                "maxConcurrent": {
                                                  "default": null,
                                                  "anyOf": [
                                                    {
                                                      "exclusiveMinimum": 0,
                                                      "allOf": [
                                                        {
                                                          "$ref": "#/definitions/__schema4"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "additionalProperties": false
                                            },
                                            "ui": {
                                              "default": {
                                                "palette": "inherit",
                                                "motion": "full",
                                                "keys": {}
                                              },
                                              "type": "object",
                                              "properties": {
                                                "palette": {
                                                  "default": "inherit",
                                                  "type": "string",
                                                  "enum": [
                                                    "inherit",
                                                    "pinata",
                                                    "catppuccin-mocha",
                                                    "catppuccin-latte",
                                                    "gruvbox-dark",
                                                    "gruvbox-light",
                                                    "tokyo-night-night",
                                                    "rose-pine-main",
                                                    "rose-pine-dawn",
                                                    "dracula",
                                                    "nord",
                                                    "one-dark",
                                                    "one-light",
                                                    "solarized-dark",
                                                    "solarized-light",
                                                    "terminal-default"
                                                  ]
                                                },
                                                "motion": {
                                                  "default": "full",
                                                  "type": "string",
                                                  "enum": ["full", "reduced", "off"]
                                                },
                                                "keys": {
                                                  "default": {},
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "$ref": "#/definitions/__schema3"
                                                  }
                                                }
                                              },
                                              "additionalProperties": false
                                            }
                                          },
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": ["kind", "config"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "changes"
                                    },
                                    "ref": {
                                      "$ref": "#/definitions/__schema7"
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": ["snapshot", "unavailable"]
                                    },
                                    "snapshot": {
                                      "allOf": [
                                        {
                                          "$ref": "#/definitions/__schema18"
                                        }
                                      ]
                                    },
                                    "mode": {
                                      "type": "string",
                                      "enum": ["shared", "worktree"]
                                    },
                                    "changes": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "path": {
                                            "$ref": "#/definitions/__schema3"
                                          },
                                          "before": {
                                            "anyOf": [
                                              {
                                                "$ref": "#/definitions/__schema24"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "after": {
                                            "anyOf": [
                                              {
                                                "$ref": "#/definitions/__schema24"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": ["path", "before", "after"],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": ["kind", "ref", "source", "changes"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "application"
                                    },
                                    "operation": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/definitions/__schema27"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": ["kind", "operation"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "wait"
                                    },
                                    "wait": {
                                      "$ref": "#/definitions/__schema32"
                                    }
                                  },
                                  "required": ["kind", "wait"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "status"
                                    },
                                    "state": {
                                      "$ref": "#/definitions/__schema40"
                                    }
                                  },
                                  "required": ["kind", "state"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "receipt"
                                    },
                                    "receipt": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/definitions/__schema1"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": ["kind", "receipt"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "result"
                                    },
                                    "result": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/definitions/__schema33"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "artifact": {
                                      "allOf": [
                                        {
                                          "$ref": "#/definitions/__schema18"
                                        }
                                      ]
                                    }
                                  },
                                  "required": ["kind", "result"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "conversation"
                                    },
                                    "ref": {
                                      "$ref": "#/definitions/__schema7"
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": ["assignment", "checkpoint", "unavailable"]
                                    },
                                    "entries": {
                                      "type": "array",
                                      "items": {
                                        "$ref": "#/definitions/__schema54"
                                      }
                                    },
                                    "artifact": {
                                      "allOf": [
                                        {
                                          "$ref": "#/definitions/__schema18"
                                        }
                                      ]
                                    },
                                    "cursor": {
                                      "allOf": [
                                        {
                                          "$ref": "#/definitions/__schema3"
                                        }
                                      ]
                                    },
                                    "complete": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": ["kind", "ref", "source", "entries", "complete"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "definitions"
                                    },
                                    "definitions": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "definition": {
                                            "type": "object",
                                            "properties": {
                                              "schemaVersion": {
                                                "type": "number",
                                                "const": 1
                                              },
                                              "name": {
                                                "$ref": "#/definitions/__schema6"
                                              },
                                              "instructions": {
                                                "type": "string"
                                              },
                                              "handoffDescription": {
                                                "$ref": "#/definitions/__schema3"
                                              },
                                              "model": {
                                                "type": "string",
                                                "pattern": "^[^/\\s]+\\/.+$"
                                              },
                                              "modelSettings": {
                                                "default": {},
                                                "type": "object",
                                                "properties": {
                                                  "reasoning": {
                                                    "type": "object",
                                                    "properties": {
                                                      "effort": {
                                                        "$ref": "#/definitions/__schema11"
                                                      }
                                                    },
                                                    "required": ["effort"],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "additionalProperties": false
                                              },
                                              "tools": {
                                                "default": [],
                                                "type": "array",
                                                "items": {
                                                  "$ref": "#/definitions/__schema3"
                                                }
                                              },
                                              "handoffs": {
                                                "default": [],
                                                "type": "array",
                                                "items": {
                                                  "$ref": "#/definitions/__schema6"
                                                }
                                              },
                                              "outputType": {
                                                "allOf": [
                                                  {
                                                    "$ref": "#/definitions/__schema3"
                                                  }
                                                ]
                                              },
                                              "pinata": {
                                                "default": {
                                                  "access": "read",
                                                  "workspace": "shared",
                                                  "skills": [],
                                                  "fallbacks": [],
                                                  "inheritContext": "none",
                                                  "memory": {
                                                    "scope": "none",
                                                    "access": "read"
                                                  },
                                                  "delegation": {
                                                    "maxDepth": 0
                                                  },
                                                  "checkpoint": "completion"
                                                },
                                                "type": "object",
                                                "properties": {
                                                  "access": {
                                                    "default": "read",
                                                    "allOf": [
                                                      {
                                                        "$ref": "#/definitions/__schema16"
                                                      }
                                                    ]
                                                  },
                                                  "workspace": {
                                                    "default": "shared",
                                                    "allOf": [
                                                      {
                                                        "$ref": "#/definitions/__schema9"
                                                      }
                                                    ]
                                                  },
                                                  "skills": {
                                                    "default": [],
                                                    "type": "array",
                                                    "items": {
                                                      "$ref": "#/definitions/__schema3"
                                                    }
                                                  },
                                                  "fallbacks": {
                                                    "default": [],
                                                    "maxItems": 5,
                                                    "type": "array",
                                                    "items": {
                                                      "$ref": "#/definitions/__schema10"
                                                    }
                                                  },
                                                  "color": {
                                                    "allOf": [
                                                      {
                                                        "$ref": "#/definitions/__schema20"
                                                      }
                                                    ]
                                                  },
                                                  "inheritContext": {
                                                    "default": "none",
                                                    "type": "string",
                                                    "enum": ["none", "parent"]
                                                  },
                                                  "memory": {
                                                    "default": {
                                                      "scope": "none",
                                                      "access": "read"
                                                    },
                                                    "allOf": [
                                                      {
                                                        "$ref": "#/definitions/__schema15"
                                                      }
                                                    ]
                                                  },
                                                  "delegation": {
                                                    "default": {
                                                      "maxDepth": 0
                                                    },
                                                    "type": "object",
                                                    "properties": {
                                                      "maxDepth": {
                                                        "$ref": "#/definitions/__schema4"
                                                      }
                                                    },
                                                    "required": ["maxDepth"],
                                                    "additionalProperties": false
                                                  },
                                                  "checkpoint": {
                                                    "default": "completion",
                                                    "type": "string",
                                                    "enum": ["completion", "none"]
                                                  }
                                                },
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "schemaVersion",
                                              "name",
                                              "instructions",
                                              "handoffDescription"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "path": {
                                            "$ref": "#/definitions/__schema3"
                                          },
                                          "digest": {
                                            "$ref": "#/definitions/__schema19"
                                          },
                                          "outputSchema": {
                                            "type": "object",
                                            "propertyNames": {
                                              "type": "string"
                                            },
                                            "additionalProperties": {}
                                          }
                                        },
                                        "required": ["definition", "path", "digest"],
                                        "additionalProperties": false
                                      }
                                    },
                                    "launch": {
                                      "type": "object",
                                      "properties": {
                                        "parentContextAvailable": {
                                          "type": "boolean"
                                        },
                                        "grants": {
                                          "$ref": "#/definitions/__schema21"
                                        },
                                        "backend": {
                                          "type": "string"
                                        },
                                        "workspace": {
                                          "type": "string"
                                        },
                                        "parentModel": {
                                          "allOf": [
                                            {
                                              "$ref": "#/definitions/__schema10"
                                            }
                                          ]
                                        },
                                        "models": {
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string"
                                          },
                                          "additionalProperties": {
                                            "$ref": "#/definitions/__schema10"
                                          }
                                        },
                                        "backends": {
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string"
                                          },
                                          "additionalProperties": {
                                            "type": "object",
                                            "properties": {
                                              "available": {
                                                "type": "boolean"
                                              },
                                              "reason": {
                                                "allOf": [
                                                  {
                                                    "$ref": "#/definitions/__schema3"
                                                  }
                                                ]
                                              },
                                              "steer": {
                                                "type": "boolean"
                                              },
                                              "continuation": {
                                                "type": "boolean"
                                              },
                                              "conversationSeed": {
                                                "type": "boolean"
                                              },
                                              "skills": {
                                                "type": "boolean"
                                              },
                                              "memory": {
                                                "type": "boolean"
                                              },
                                              "delegation": {
                                                "type": "boolean"
                                              },
                                              "fallbacks": {
                                                "type": "boolean"
                                              },
                                              "surviving": {
                                                "type": "boolean"
                                              },
                                              "cleanup": {
                                                "type": "string",
                                                "enum": ["confirmed", "unverified"]
                                              }
                                            },
                                            "required": [
                                              "available",
                                              "steer",
                                              "continuation",
                                              "conversationSeed",
                                              "surviving",
                                              "cleanup"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "parentContextAvailable",
                                        "grants",
                                        "backend",
                                        "workspace",
                                        "models",
                                        "backends"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": ["kind", "definitions"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "events"
                                    },
                                    "events": {
                                      "type": "array",
                                      "items": {
                                        "$ref": "#/definitions/__schema55"
                                      }
                                    },
                                    "cursor": {
                                      "$ref": "#/definitions/__schema4"
                                    }
                                  },
                                  "required": ["kind", "events", "cursor"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "schemas"
                                    },
                                    "schemas": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {
                                        "$ref": "#/definitions/__schema57"
                                      }
                                    }
                                  },
                                  "required": ["kind", "schemas"],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "required": ["method", "result"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "method": {
                              "type": "string",
                              "const": "wait"
                            },
                            "result": {
                              "$ref": "#/definitions/__schema32"
                            }
                          },
                          "required": ["method", "result"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "method": {
                              "type": "string",
                              "const": "recover"
                            },
                            "result": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "ref": {
                                    "$ref": "#/definitions/__schema7"
                                  },
                                  "attemptId": {
                                    "allOf": [
                                      {
                                        "$ref": "#/definitions/__schema3"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "reattached",
                                      "finalizing",
                                      "active",
                                      "unavailable",
                                      "uncertain"
                                    ]
                                  },
                                  "detail": {
                                    "allOf": [
                                      {
                                        "$ref": "#/definitions/__schema3"
                                      }
                                    ]
                                  }
                                },
                                "required": ["ref", "status"],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": ["method", "result"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "method": {
                              "type": "string",
                              "const": "deliver_notifications"
                            },
                            "result": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "$ref": "#/definitions/__schema3"
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": ["delivered", "consumed", "uncertain"]
                                  }
                                },
                                "required": ["id", "state"],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": ["method", "result"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "method": {
                              "type": "string",
                              "const": "consume_notification"
                            },
                            "result": {
                              "type": "null"
                            }
                          },
                          "required": ["method", "result"],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": ["status", "response"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "error"
                    },
                    "error": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/__schema23"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "internal_error",
                                "protocol_version",
                                "unauthenticated",
                                "transport_closed",
                                "transport_limit"
                              ]
                            },
                            "message": {
                              "$ref": "#/definitions/__schema3"
                            },
                            "field": {
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema3"
                                }
                              ]
                            }
                          },
                          "required": ["code", "message"],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": ["status", "error"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": ["type", "id", "reply"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "subscribed"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "cursor": {
              "type": "object",
              "properties": {
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema3"
                },
                "revision": {
                  "$ref": "#/definitions/__schema4"
                }
              },
              "required": ["ownerEpoch", "revision"],
              "additionalProperties": false
            },
            "reset": {
              "type": "boolean",
              "const": true
            }
          },
          "required": ["type", "id", "cursor", "reset"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "event"
            },
            "subscription": {
              "$ref": "#/definitions/__schema0"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "event": {
              "$ref": "#/definitions/__schema55"
            }
          },
          "required": ["type", "subscription", "id", "event"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "notice"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "notice": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema3"
                },
                "ref": {
                  "$ref": "#/definitions/__schema7"
                },
                "result": {
                  "$ref": "#/definitions/__schema33"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema18"
                }
              },
              "required": ["id", "ref", "result", "artifact"],
              "additionalProperties": false
            }
          },
          "required": ["type", "id", "notice"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9:/._-]+$"
        },
        "__schema1": {
          "oneOf": [
            {
              "$ref": "#/definitions/__schema2"
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "rejected"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema3"
                },
                "revision": {
                  "$ref": "#/definitions/__schema4"
                },
                "error": {
                  "$ref": "#/definitions/__schema23"
                }
              },
              "required": ["status", "requestId", "revision", "error"],
              "additionalProperties": false
            }
          ]
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema3"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "operationId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "schedules": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema5"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema7"
              }
            },
            "resolved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "workspace": {
                    "$ref": "#/definitions/__schema9"
                  },
                  "backend": {
                    "$ref": "#/definitions/__schema12"
                  },
                  "lifetime": {
                    "$ref": "#/definitions/__schema13"
                  },
                  "grants": {
                    "$ref": "#/definitions/__schema21"
                  }
                },
                "required": ["ref", "workspace", "backend", "lifetime", "grants"],
                "additionalProperties": false
              }
            }
          },
          "required": ["status", "requestId", "revision", "assignments", "resolved"],
          "additionalProperties": false
        },
        "__schema3": {
          "type": "string",
          "minLength": 1
        },
        "__schema4": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema5": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema6"
            },
            "sessionId": {
              "$ref": "#/definitions/__schema3"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "trigger": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "at"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": ["kind", "at"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "interval"
                    },
                    "milliseconds": {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema4"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "milliseconds"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "cron"
                    },
                    "expression": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "timezone": {
                      "$ref": "#/definitions/__schema3"
                    }
                  },
                  "required": ["kind", "expression", "timezone"],
                  "additionalProperties": false
                }
              ]
            },
            "overlap": {
              "type": "string",
              "enum": ["skip", "queue"]
            },
            "status": {
              "type": "string",
              "enum": ["paused", "active", "completed", "deleted", "closed"]
            },
            "target": {
              "type": "object",
              "properties": {
                "worker": {
                  "$ref": "#/definitions/__schema6"
                }
              },
              "required": ["worker"],
              "additionalProperties": false
            },
            "task": {
              "$ref": "#/definitions/__schema3"
            },
            "template": {
              "type": "object",
              "properties": {
                "request": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema6"
                    },
                    "agent": {
                      "$ref": "#/definitions/__schema6"
                    },
                    "task": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "origin": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema7"
                        }
                      ]
                    },
                    "messageId": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        }
                      ]
                    },
                    "after": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/__schema6"
                          },
                          {
                            "$ref": "#/definitions/__schema7"
                          }
                        ]
                      }
                    },
                    "inputs": {
                      "default": [],
                      "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema8"
                        }
                      ]
                    },
                    "workspace": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema9"
                        }
                      ]
                    },
                    "observeWorkspace": {
                      "type": "boolean"
                    },
                    "model": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema10"
                        }
                      ]
                    },
                    "backend": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema12"
                        }
                      ]
                    },
                    "lifetime": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema13"
                        }
                      ]
                    },
                    "context": {
                      "default": [],
                      "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema14"
                        }
                      ]
                    },
                    "inheritContext": {
                      "type": "string",
                      "enum": ["none", "parent"]
                    },
                    "memory": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema15"
                        }
                      ]
                    },
                    "delegation": {
                      "type": "object",
                      "properties": {
                        "maxDepth": {
                          "$ref": "#/definitions/__schema4"
                        }
                      },
                      "required": ["maxDepth"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["id", "agent", "task"],
                  "additionalProperties": false
                },
                "worker": {
                  "$ref": "#/definitions/__schema17"
                }
              },
              "required": ["request", "worker"],
              "additionalProperties": false
            },
            "nextAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastLocalKey": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "activatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "occurrences": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema22"
              }
            }
          },
          "required": [
            "id",
            "sessionId",
            "revision",
            "trigger",
            "overlap",
            "status",
            "target",
            "task",
            "nextAt",
            "occurrences"
          ],
          "additionalProperties": false
        },
        "__schema6": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema7": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema3"
            },
            "worker": {
              "$ref": "#/definitions/__schema6"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema8": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema7"
          }
        },
        "__schema9": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema10": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema3"
            },
            "id": {
              "$ref": "#/definitions/__schema3"
            },
            "thinking": {
              "$ref": "#/definitions/__schema11"
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema11": {
          "type": "string",
          "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
        },
        "__schema12": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema13": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "__schema14": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema15": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema16"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "__schema16": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema17": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema6"
            },
            "agent": {
              "$ref": "#/definitions/__schema6"
            },
            "definition": {
              "$ref": "#/definitions/__schema18"
            },
            "color": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema20"
                }
              ]
            },
            "loadout": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema10"
                }
              ]
            },
            "fallbacks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema10"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "access": {
              "$ref": "#/definitions/__schema16"
            },
            "workspace": {
              "$ref": "#/definitions/__schema9"
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "backend": {
              "$ref": "#/definitions/__schema12"
            },
            "lifetime": {
              "$ref": "#/definitions/__schema13"
            },
            "grants": {
              "$ref": "#/definitions/__schema21"
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "parentAssignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "depth": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "context": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "workspacePlan": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            }
          },
          "required": [
            "id",
            "agent",
            "definition",
            "fallbacks",
            "tools",
            "access",
            "workspace",
            "backend",
            "lifetime",
            "grants"
          ],
          "additionalProperties": false
        },
        "__schema18": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema19"
            },
            "size": {
              "$ref": "#/definitions/__schema4"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema19": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema20": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "accent.blue",
                "accent.cyan",
                "accent.green",
                "accent.yellow",
                "accent.orange",
                "accent.red",
                "accent.pink",
                "accent.purple"
              ]
            },
            {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$"
            }
          ]
        },
        "__schema21": {
          "type": "object",
          "properties": {
            "access": {
              "$ref": "#/definitions/__schema16"
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "workspaces": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema9"
              }
            },
            "inheritContext": {
              "type": "boolean"
            },
            "memory": {
              "$ref": "#/definitions/__schema15"
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema4"
                },
                "agents": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema6"
                  }
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema3"
                  }
                },
                "workspaces": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema9"
                  }
                }
              },
              "required": ["maxDepth", "agents", "tools", "workspaces"],
              "additionalProperties": false
            }
          },
          "required": ["access", "tools", "workspaces", "inheritContext", "memory", "delegation"],
          "additionalProperties": false
        },
        "__schema22": {
          "type": "object",
          "properties": {
            "scheduledAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "status": {
              "type": "string",
              "enum": ["accepted", "skipped", "missed"]
            },
            "ref": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "through": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": ["scheduledAt", "status"],
          "additionalProperties": false
        },
        "__schema23": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "invalid_input",
                "dependency_missing",
                "capability_denied",
                "unsupported",
                "conflict",
                "owner_unconfirmed",
                "context_unavailable",
                "commit_unknown"
              ]
            },
            "message": {
              "$ref": "#/definitions/__schema3"
            },
            "field": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            }
          },
          "required": ["code", "message"],
          "additionalProperties": false
        },
        "__schema24": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema3"
                },
                "blob": {
                  "$ref": "#/definitions/__schema18"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema25"
                },
                "mode": {
                  "type": "string",
                  "const": "100644"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema3"
                },
                "blob": {
                  "$ref": "#/definitions/__schema18"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema25"
                },
                "mode": {
                  "type": "string",
                  "const": "100755"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema3"
                },
                "blob": {
                  "$ref": "#/definitions/__schema18"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema25"
                },
                "mode": {
                  "type": "string",
                  "const": "120000"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema3"
                },
                "mode": {
                  "type": "string",
                  "const": "160000"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema26"
                }
              },
              "required": ["path", "mode", "objectId"],
              "additionalProperties": false
            }
          ]
        },
        "__schema25": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema26"
            }
          ]
        },
        "__schema26": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        },
        "__schema27": {
          "type": "object",
          "properties": {
            "intent": {
              "$ref": "#/definitions/__schema28"
            },
            "status": {
              "type": "string",
              "enum": ["pending", "completed", "failed", "uncertain"]
            },
            "receipt": {
              "$ref": "#/definitions/__schema29"
            },
            "error": {
              "$ref": "#/definitions/__schema30"
            },
            "evidence": {
              "$ref": "#/definitions/__schema31"
            }
          },
          "required": ["intent", "status"],
          "additionalProperties": false
        },
        "__schema28": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema3"
            },
            "requestId": {
              "$ref": "#/definitions/__schema3"
            },
            "command": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "apply"
                    },
                    "ref": {
                      "$ref": "#/definitions/__schema7"
                    },
                    "destination": {
                      "$ref": "#/definitions/__schema3"
                    }
                  },
                  "required": ["kind", "ref", "destination"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "rollback"
                    },
                    "operation": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "destination": {
                      "$ref": "#/definitions/__schema3"
                    }
                  },
                  "required": ["kind", "operation", "destination"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "reconcile"
                    },
                    "operation": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "owner": {
                      "$ref": "#/definitions/__schema3"
                    }
                  },
                  "required": ["kind", "operation", "owner"],
                  "additionalProperties": false
                }
              ]
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema3"
            },
            "destination": {
              "$ref": "#/definitions/__schema3"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "snapshot": {
              "$ref": "#/definitions/__schema18"
            },
            "targetOperation": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            }
          },
          "required": [
            "id",
            "requestId",
            "command",
            "ownerEpoch",
            "destination",
            "ref",
            "snapshot"
          ],
          "additionalProperties": false
        },
        "__schema29": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": ["applied", "rolled_back", "already_recorded"]
                },
                "operationId": {
                  "$ref": "#/definitions/__schema3"
                },
                "destination": {
                  "$ref": "#/definitions/__schema3"
                },
                "revision": {
                  "$ref": "#/definitions/__schema4"
                },
                "snapshot": {
                  "$ref": "#/definitions/__schema18"
                },
                "freshness": {
                  "type": "string",
                  "enum": ["matching", "changed", "unknown"]
                }
              },
              "required": [
                "status",
                "operationId",
                "destination",
                "revision",
                "snapshot",
                "freshness"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "__schema30": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema23"
            }
          ]
        },
        "__schema31": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema18"
            }
          ]
        },
        "__schema32": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": ["settled", "nothing_pending", "aborted"]
            },
            "targets": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema7"
              }
            },
            "results": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema33"
              }
            },
            "cursor": {
              "$ref": "#/definitions/__schema4"
            }
          },
          "required": ["status", "targets", "results", "cursor"],
          "additionalProperties": false
        },
        "__schema33": {
          "type": "object",
          "properties": {
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "summary": {
              "type": "string"
            },
            "execution": {
              "$ref": "#/definitions/__schema34"
            },
            "report": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "reportingError": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "finalizationErrors": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema18"
              }
            },
            "transcript": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "session": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "usage": {
              "$ref": "#/definitions/__schema35"
            }
          },
          "required": ["ref", "summary", "execution", "artifacts", "usage"],
          "additionalProperties": false
        },
        "__schema34": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "queued"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "preparing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "running"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "stopping"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "finalizing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "ended"
                },
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled", "interrupted"]
                },
                "cleanup": {
                  "type": "string",
                  "enum": ["confirmed", "unconfirmed"]
                }
              },
              "required": ["phase", "reason", "cleanup"],
              "additionalProperties": false
            }
          ]
        },
        "__schema35": {
          "type": "object",
          "properties": {
            "expectedAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "observations": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema36"
              }
            },
            "complete": {
              "type": "boolean"
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "total": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema37"
                },
                {
                  "type": "null"
                }
              ]
            },
            "observedTotal": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema37"
                },
                {
                  "type": "null"
                }
              ]
            },
            "missingAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            }
          },
          "required": ["expectedAttempts", "observations", "complete"],
          "additionalProperties": false
        },
        "__schema36": {
          "type": "object",
          "properties": {
            "attempt": {
              "$ref": "#/definitions/__schema3"
            },
            "source": {
              "$ref": "#/definitions/__schema3"
            },
            "usage": {
              "$ref": "#/definitions/__schema37"
            },
            "kind": {
              "$ref": "#/definitions/__schema38"
            },
            "responseId": {
              "$ref": "#/definitions/__schema39"
            }
          },
          "required": ["attempt", "source", "usage"],
          "additionalProperties": false
        },
        "__schema37": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema4"
            },
            "output": {
              "$ref": "#/definitions/__schema4"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema4"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema4"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema38": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema39": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema3"
            }
          ]
        },
        "__schema40": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema3"
            },
            "revision": {
              "$ref": "#/definitions/__schema4"
            },
            "nextSequence": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "workers": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema17"
              }
            },
            "assignments": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema41"
              }
            },
            "latest": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "exclusiveMinimum": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema4"
                  }
                ]
              }
            },
            "inbox": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema42"
              }
            },
            "receipts": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "payloadDigest": {
                    "$ref": "#/definitions/__schema19"
                  },
                  "receipt": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "required": ["payloadDigest", "receipt"],
                "additionalProperties": false
              }
            },
            "effects": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "effect": {
                    "$ref": "#/definitions/__schema43"
                  },
                  "status": {
                    "type": "string",
                    "enum": ["intent", "completed", "failed", "uncertain"]
                  },
                  "detail": {
                    "type": "string"
                  }
                },
                "required": ["effect", "status"],
                "additionalProperties": false
              }
            },
            "applications": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema27"
              }
            },
            "schedules": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema5"
              }
            },
            "attempts": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "attempt": {
                    "$ref": "#/definitions/__schema44"
                  },
                  "prepared": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema45"
                      }
                    ]
                  },
                  "capture": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema46"
                      }
                    ]
                  },
                  "identity": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema47"
                      }
                    ]
                  },
                  "enrollmentEvidence": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema18"
                    }
                  },
                  "outcome": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema48"
                      }
                    ]
                  },
                  "outcomeArtifact": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema18"
                      }
                    ]
                  },
                  "cleanup": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema51"
                      }
                    ]
                  },
                  "usageObservations": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema36"
                    }
                  },
                  "responses": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": ["started", "completed", "interrupted"]
                    }
                  }
                },
                "required": ["attempt", "enrollmentEvidence", "usageObservations", "responses"],
                "additionalProperties": false
              }
            },
            "sessions": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema49"
              }
            },
            "contextUsage": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema52"
              }
            },
            "cancelled": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "$ref": "#/definitions/__schema3"
                  }
                },
                "required": ["requestId"],
                "additionalProperties": false
              }
            },
            "attachment": {
              "type": "string",
              "enum": ["foreground", "background"]
            },
            "results": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "result": {
                    "$ref": "#/definitions/__schema33"
                  },
                  "artifact": {
                    "$ref": "#/definitions/__schema18"
                  }
                },
                "required": ["result", "artifact"],
                "additionalProperties": false
              }
            },
            "outbox": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "result": {
                    "$ref": "#/definitions/__schema18"
                  },
                  "state": {
                    "type": "string",
                    "enum": ["recorded", "dispatch_intent", "delivered", "consumed", "uncertain"]
                  },
                  "attempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "state": {
                          "$ref": "#/definitions/__schema53"
                        },
                        "checkpoint": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema18"
                            }
                          ]
                        }
                      },
                      "required": ["id", "state"],
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["ref", "result", "state", "attempts"],
                "additionalProperties": false
              }
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "history": {
              "type": "object",
              "properties": {
                "source": {
                  "$ref": "#/definitions/__schema18"
                },
                "quiescence": {
                  "$ref": "#/definitions/__schema18"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["source", "quiescence", "requestId"],
              "additionalProperties": false
            }
          },
          "required": [
            "run",
            "revision",
            "nextSequence",
            "workers",
            "assignments",
            "latest",
            "inbox",
            "receipts",
            "effects",
            "attempts",
            "sessions",
            "contextUsage",
            "cancelled",
            "attachment",
            "results",
            "outbox",
            "maxConcurrent"
          ],
          "additionalProperties": false
        },
        "__schema41": {
          "type": "object",
          "properties": {
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "sequence": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "task": {
              "$ref": "#/definitions/__schema3"
            },
            "after": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema7"
              }
            },
            "inputs": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema7"
              }
            },
            "context": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "execution": {
              "$ref": "#/definitions/__schema34"
            }
          },
          "required": ["ref", "sequence", "task", "after", "inputs", "context", "execution"],
          "additionalProperties": false
        },
        "__schema42": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema3"
            },
            "target": {
              "$ref": "#/definitions/__schema7"
            },
            "sender": {
              "$ref": "#/definitions/__schema3"
            },
            "kind": {
              "type": "string",
              "enum": ["initial", "follow_up", "steer", "notice"]
            },
            "text": {
              "$ref": "#/definitions/__schema3"
            },
            "state": {
              "type": "string",
              "enum": [
                "recorded",
                "dispatch_intent",
                "transport_queued",
                "transport_handled",
                "consumed",
                "uncertain"
              ]
            },
            "attempts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "dispatch_intent",
                      "transport_queued",
                      "transport_handled",
                      "consumed",
                      "uncertain"
                    ]
                  },
                  "checkpoint": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema18"
                      }
                    ]
                  }
                },
                "required": ["id", "state"],
                "additionalProperties": false
              }
            }
          },
          "required": ["id", "target", "sender", "kind", "text", "state", "attempts"],
          "additionalProperties": false
        },
        "__schema43": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema3"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "kind": {
              "type": "string",
              "enum": [
                "prepare",
                "launch",
                "steer",
                "cleanup",
                "checkpoint",
                "capture",
                "notification"
              ]
            },
            "input": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            }
          },
          "required": ["id", "ref", "kind"],
          "additionalProperties": false
        },
        "__schema44": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema3"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "ordinal": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "backend": {
              "$ref": "#/definitions/__schema12"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["id", "ref", "ordinal", "backend", "ownerEpoch"],
          "additionalProperties": false
        },
        "__schema45": {
          "type": "object",
          "properties": {
            "cwd": {
              "$ref": "#/definitions/__schema3"
            },
            "identity": {
              "$ref": "#/definitions/__schema3"
            },
            "lease": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema3"
                },
                "workspace": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["id", "workspace"],
              "additionalProperties": false
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema18"
              }
            }
          },
          "required": ["cwd", "identity", "artifacts"],
          "additionalProperties": false
        },
        "__schema46": {
          "type": "object",
          "properties": {
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema18"
              }
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "errors": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            }
          },
          "required": ["artifacts"],
          "additionalProperties": false
        },
        "__schema47": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema3"
            },
            "kind": {
              "$ref": "#/definitions/__schema12"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["id", "kind", "ownerEpoch"],
          "additionalProperties": false
        },
        "__schema48": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "enum": ["completed", "failed", "cancelled"]
            },
            "summary": {
              "type": "string"
            },
            "usage": {
              "$ref": "#/definitions/__schema35"
            },
            "report": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "reportingError": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "session": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema49"
                }
              ]
            },
            "transcript": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema18"
              }
            },
            "error": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            }
          },
          "required": ["reason", "summary", "usage", "artifacts"],
          "additionalProperties": false
        },
        "__schema49": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema3"
                },
                "worker": {
                  "$ref": "#/definitions/__schema3"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema18"
                },
                "branch": {
                  "$ref": "#/definitions/__schema3"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema50"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema3"
                },
                "worker": {
                  "$ref": "#/definitions/__schema3"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema18"
                },
                "branch": {
                  "$ref": "#/definitions/__schema3"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema50"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "__schema50": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema18"
            }
          ]
        },
        "__schema51": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "stopped"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema3"
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema3"
                  }
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema18"
                  }
                }
              },
              "required": ["status", "ownerEpoch", "identities", "evidence"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "unconfirmed"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema3"
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema3"
                  }
                },
                "reasons": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema3"
                  }
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema18"
                  }
                }
              },
              "required": ["status", "ownerEpoch", "identities", "reasons", "evidence"],
              "additionalProperties": false
            }
          ]
        },
        "__schema52": {
          "type": "object",
          "properties": {
            "tokens": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema4"
                },
                {
                  "type": "null"
                }
              ]
            },
            "window": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "percent": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "source": {
              "$ref": "#/definitions/__schema3"
            },
            "timestamp": {
              "$ref": "#/definitions/__schema4"
            }
          },
          "required": ["tokens", "window", "percent", "source", "timestamp"],
          "additionalProperties": false
        },
        "__schema53": {
          "type": "string",
          "enum": ["dispatch_intent", "delivered", "consumed", "uncertain"]
        },
        "__schema54": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema54"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema54"
              }
            }
          ]
        },
        "__schema55": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "kind": {
                  "type": "string",
                  "const": "committed"
                },
                "id": {
                  "$ref": "#/definitions/__schema3"
                },
                "revision": {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema3"
                },
                "transition": {
                  "oneOf": [
                    {
                      "$ref": "#/definitions/__schema56"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "schedule_changed"
                        },
                        "requestId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "payloadDigest": {
                          "$ref": "#/definitions/__schema19"
                        },
                        "receipt": {
                          "$ref": "#/definitions/__schema2"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "create",
                            "update",
                            "pause",
                            "resume",
                            "delete",
                            "close",
                            "recover",
                            "list"
                          ]
                        },
                        "schedule": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema5"
                            }
                          ]
                        }
                      },
                      "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "schedule_occurrence"
                        },
                        "requestId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "payloadDigest": {
                          "$ref": "#/definitions/__schema19"
                        },
                        "receipt": {
                          "$ref": "#/definitions/__schema2"
                        },
                        "scheduleId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "occurrence": {
                          "$ref": "#/definitions/__schema22"
                        },
                        "nextAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lastLocalKey": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema3"
                            }
                          ]
                        },
                        "acceptance": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema56"
                            }
                          ]
                        }
                      },
                      "required": [
                        "kind",
                        "requestId",
                        "payloadDigest",
                        "receipt",
                        "scheduleId",
                        "occurrence",
                        "nextAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "control_accepted"
                        },
                        "requestId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "payloadDigest": {
                          "$ref": "#/definitions/__schema19"
                        },
                        "receipt": {
                          "$ref": "#/definitions/__schema2"
                        },
                        "action": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "cancel"
                                },
                                "targets": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/definitions/__schema7"
                                  }
                                }
                              },
                              "required": ["kind", "targets"],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "background"
                                }
                              },
                              "required": ["kind"],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "capacity"
                                },
                                "maxConcurrent": {
                                  "anyOf": [
                                    {
                                      "exclusiveMinimum": 0,
                                      "allOf": [
                                        {
                                          "$ref": "#/definitions/__schema4"
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": ["kind", "maxConcurrent"],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "application_accepted"
                        },
                        "requestId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "payloadDigest": {
                          "$ref": "#/definitions/__schema19"
                        },
                        "receipt": {
                          "$ref": "#/definitions/__schema2"
                        },
                        "intent": {
                          "$ref": "#/definitions/__schema28"
                        }
                      },
                      "required": ["kind", "requestId", "payloadDigest", "receipt", "intent"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "application_observed"
                        },
                        "operationId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "observation": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": ["completed", "failed", "uncertain"]
                            },
                            "receipt": {
                              "$ref": "#/definitions/__schema29"
                            },
                            "error": {
                              "$ref": "#/definitions/__schema30"
                            },
                            "evidence": {
                              "$ref": "#/definitions/__schema31"
                            }
                          },
                          "required": ["status"],
                          "additionalProperties": false
                        }
                      },
                      "required": ["kind", "operationId", "observation"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "effect_intent"
                        },
                        "effect": {
                          "$ref": "#/definitions/__schema43"
                        }
                      },
                      "required": ["kind", "effect"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "effect_observed"
                        },
                        "effectId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "status": {
                          "type": "string",
                          "enum": ["completed", "failed", "uncertain"]
                        },
                        "detail": {
                          "type": "string"
                        }
                      },
                      "required": ["kind", "effectId", "status"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "assignment_state"
                        },
                        "ref": {
                          "$ref": "#/definitions/__schema7"
                        },
                        "execution": {
                          "$ref": "#/definitions/__schema34"
                        }
                      },
                      "required": ["kind", "ref", "execution"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "settled"
                        },
                        "result": {
                          "$ref": "#/definitions/__schema33"
                        },
                        "resultArtifact": {
                          "$ref": "#/definitions/__schema18"
                        },
                        "notificationId": {
                          "$ref": "#/definitions/__schema3"
                        }
                      },
                      "required": ["kind", "result", "resultArtifact", "notificationId"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "inbox_state"
                        },
                        "messageId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "dispatch_intent",
                            "transport_queued",
                            "transport_handled",
                            "consumed",
                            "uncertain"
                          ]
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "checkpoint": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema18"
                            }
                          ]
                        }
                      },
                      "required": ["kind", "messageId", "state", "attemptId"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "inbox_not_delivered"
                        },
                        "messageId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "receipt": {
                          "$ref": "#/definitions/__schema18"
                        }
                      },
                      "required": ["kind", "messageId", "attemptId", "receipt"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "capacity_changed"
                        },
                        "maxConcurrent": {
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema4"
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": ["kind", "maxConcurrent"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "attempt_started"
                        },
                        "attempt": {
                          "$ref": "#/definitions/__schema44"
                        }
                      },
                      "required": ["kind", "attempt"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "workspace_prepared"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "prepared": {
                          "$ref": "#/definitions/__schema45"
                        }
                      },
                      "required": ["kind", "attemptId", "prepared"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "workspace_captured"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "capture": {
                          "$ref": "#/definitions/__schema46"
                        }
                      },
                      "required": ["kind", "attemptId", "capture"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "workspace_recovered"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "prepared": {
                          "$ref": "#/definitions/__schema45"
                        },
                        "evidence": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema18"
                          }
                        }
                      },
                      "required": ["kind", "attemptId", "prepared", "evidence"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "backend_enrolled"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "identity": {
                          "$ref": "#/definitions/__schema47"
                        },
                        "evidence": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema18"
                          }
                        }
                      },
                      "required": ["kind", "attemptId", "identity", "evidence"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "attempt_outcome"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "outcome": {
                          "$ref": "#/definitions/__schema48"
                        },
                        "artifact": {
                          "$ref": "#/definitions/__schema18"
                        }
                      },
                      "required": ["kind", "attemptId", "outcome", "artifact"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "cleanup_observed"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "receipt": {
                          "$ref": "#/definitions/__schema51"
                        }
                      },
                      "required": ["kind", "attemptId", "receipt"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "session_checkpoint"
                        },
                        "worker": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "checkpoint": {
                          "$ref": "#/definitions/__schema49"
                        }
                      },
                      "required": ["kind", "worker", "checkpoint"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "usage_observed"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "observation": {
                          "$ref": "#/definitions/__schema36"
                        }
                      },
                      "required": ["kind", "attemptId", "observation"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "response_observed"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "responseId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "status": {
                          "type": "string",
                          "enum": ["started", "completed", "interrupted"]
                        }
                      },
                      "required": ["kind", "attemptId", "responseId", "status"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "context_observed"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "context": {
                          "$ref": "#/definitions/__schema52"
                        }
                      },
                      "required": ["kind", "attemptId", "context"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "outbox_state"
                        },
                        "notificationId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "attemptId": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "state": {
                          "$ref": "#/definitions/__schema53"
                        },
                        "checkpoint": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema18"
                            }
                          ]
                        }
                      },
                      "required": ["kind", "notificationId", "attemptId", "state"],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "required": ["schemaVersion", "kind", "id", "revision", "ownerEpoch", "transition"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "kind": {
                  "type": "string",
                  "const": "snapshot"
                },
                "id": {
                  "$ref": "#/definitions/__schema3"
                },
                "revision": {
                  "$ref": "#/definitions/__schema4"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema3"
                },
                "snapshot": {
                  "$ref": "#/definitions/__schema40"
                }
              },
              "required": ["schemaVersion", "kind", "id", "revision", "ownerEpoch", "snapshot"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "kind": {
                  "type": "string",
                  "const": "activity"
                },
                "source": {
                  "$ref": "#/definitions/__schema3"
                },
                "ordinal": {
                  "$ref": "#/definitions/__schema4"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema3"
                },
                "revision": {
                  "$ref": "#/definitions/__schema4"
                },
                "ref": {
                  "$ref": "#/definitions/__schema7"
                },
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "schemaVersion",
                "kind",
                "source",
                "ordinal",
                "ownerEpoch",
                "revision",
                "ref",
                "text"
              ],
              "additionalProperties": false
            }
          ]
        },
        "__schema56": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema3"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema19"
            },
            "receipt": {
              "$ref": "#/definitions/__schema2"
            },
            "workers": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema41"
              }
            },
            "messages": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema42"
              }
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema18"
                }
              ]
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "kind",
            "requestId",
            "payloadDigest",
            "receipt",
            "workers",
            "assignments",
            "messages"
          ],
          "additionalProperties": false
        },
        "__schema57": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema57"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema57"
              }
            }
          ]
        }
      }
    },
    "pinata.ipc-notice.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/definitions/__schema0"
        },
        "ref": {
          "$ref": "#/definitions/__schema1"
        },
        "result": {
          "type": "object",
          "properties": {
            "ref": {
              "$ref": "#/definitions/__schema1"
            },
            "summary": {
              "type": "string"
            },
            "execution": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "phase": {
                      "type": "string",
                      "const": "queued"
                    }
                  },
                  "required": ["phase"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "phase": {
                      "type": "string",
                      "const": "preparing"
                    }
                  },
                  "required": ["phase"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "phase": {
                      "type": "string",
                      "const": "running"
                    }
                  },
                  "required": ["phase"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "phase": {
                      "type": "string",
                      "const": "stopping"
                    }
                  },
                  "required": ["phase"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "phase": {
                      "type": "string",
                      "const": "finalizing"
                    }
                  },
                  "required": ["phase"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "phase": {
                      "type": "string",
                      "const": "ended"
                    },
                    "reason": {
                      "type": "string",
                      "enum": ["completed", "failed", "cancelled", "interrupted"]
                    },
                    "cleanup": {
                      "type": "string",
                      "enum": ["confirmed", "unconfirmed"]
                    }
                  },
                  "required": ["phase", "reason", "cleanup"],
                  "additionalProperties": false
                }
              ]
            },
            "report": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "reportingError": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "finalizationErrors": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "transcript": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "session": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "usage": {
              "type": "object",
              "properties": {
                "expectedAttempts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "observations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "attempt": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "source": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "usage": {
                        "$ref": "#/definitions/__schema4"
                      },
                      "kind": {
                        "$ref": "#/definitions/__schema5"
                      },
                      "responseId": {
                        "$ref": "#/definitions/__schema6"
                      }
                    },
                    "required": ["attempt", "source", "usage"],
                    "additionalProperties": false
                  }
                },
                "complete": {
                  "type": "boolean"
                },
                "reason": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema0"
                    }
                  ]
                },
                "total": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "observedTotal": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "missingAttempts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "issues": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                }
              },
              "required": ["expectedAttempts", "observations", "complete"],
              "additionalProperties": false
            }
          },
          "required": ["ref", "summary", "execution", "artifacts", "usage"],
          "additionalProperties": false
        },
        "artifact": {
          "$ref": "#/definitions/__schema3"
        }
      },
      "required": ["id", "ref", "result", "artifact"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema2"
            },
            "output": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema2"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema5": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema6": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        }
      }
    },
    "pinata.grants.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "access": {
          "$ref": "#/definitions/__schema0"
        },
        "tools": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema1"
          }
        },
        "workspaces": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema2"
          }
        },
        "inheritContext": {
          "type": "boolean"
        },
        "memory": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "delegation": {
          "type": "object",
          "properties": {
            "maxDepth": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "agents": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,31}$"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            },
            "workspaces": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            }
          },
          "required": ["maxDepth", "agents", "tools", "workspaces"],
          "additionalProperties": false
        }
      },
      "required": ["access", "tools", "workspaces", "inheritContext", "memory", "delegation"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        },
        "__schema2": {
          "type": "string",
          "enum": ["shared", "worktree"]
        }
      }
    },
    "pinata.error.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "dependency_missing",
            "capability_denied",
            "unsupported",
            "conflict",
            "owner_unconfirmed",
            "context_unavailable",
            "commit_unknown"
          ]
        },
        "message": {
          "$ref": "#/definitions/__schema0"
        },
        "field": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        }
      },
      "required": ["code", "message"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.schedule.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/definitions/__schema0"
        },
        "sessionId": {
          "$ref": "#/definitions/__schema1"
        },
        "revision": {
          "exclusiveMinimum": 0,
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "trigger": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "at"
                },
                "at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": ["kind", "at"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "interval"
                },
                "milliseconds": {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema2"
                    }
                  ]
                }
              },
              "required": ["kind", "milliseconds"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "cron"
                },
                "expression": {
                  "$ref": "#/definitions/__schema1"
                },
                "timezone": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["kind", "expression", "timezone"],
              "additionalProperties": false
            }
          ]
        },
        "overlap": {
          "type": "string",
          "enum": ["skip", "queue"]
        },
        "status": {
          "type": "string",
          "enum": ["paused", "active", "completed", "deleted", "closed"]
        },
        "target": {
          "type": "object",
          "properties": {
            "worker": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["worker"],
          "additionalProperties": false
        },
        "task": {
          "$ref": "#/definitions/__schema1"
        },
        "template": {
          "type": "object",
          "properties": {
            "request": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "agent": {
                  "$ref": "#/definitions/__schema0"
                },
                "task": {
                  "$ref": "#/definitions/__schema1"
                },
                "origin": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                },
                "messageId": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                },
                "after": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      },
                      {
                        "$ref": "#/definitions/__schema3"
                      }
                    ]
                  }
                },
                "inputs": {
                  "default": [],
                  "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                },
                "workspace": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema5"
                    }
                  ]
                },
                "observeWorkspace": {
                  "type": "boolean"
                },
                "model": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema6"
                    }
                  ]
                },
                "backend": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema7"
                    }
                  ]
                },
                "lifetime": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema8"
                    }
                  ]
                },
                "context": {
                  "default": [],
                  "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema9"
                    }
                  ]
                },
                "inheritContext": {
                  "type": "string",
                  "enum": ["none", "parent"]
                },
                "memory": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema10"
                    }
                  ]
                },
                "delegation": {
                  "type": "object",
                  "properties": {
                    "maxDepth": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["maxDepth"],
                  "additionalProperties": false
                }
              },
              "required": ["id", "agent", "task"],
              "additionalProperties": false
            },
            "worker": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "agent": {
                  "$ref": "#/definitions/__schema0"
                },
                "definition": {
                  "$ref": "#/definitions/__schema12"
                },
                "color": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "accent.blue",
                        "accent.cyan",
                        "accent.green",
                        "accent.yellow",
                        "accent.orange",
                        "accent.red",
                        "accent.pink",
                        "accent.purple"
                      ]
                    },
                    {
                      "type": "string",
                      "pattern": "^#[0-9a-fA-F]{6}$"
                    }
                  ]
                },
                "loadout": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema12"
                    }
                  ]
                },
                "model": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema6"
                    }
                  ]
                },
                "fallbacks": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema6"
                  }
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "access": {
                  "$ref": "#/definitions/__schema11"
                },
                "workspace": {
                  "$ref": "#/definitions/__schema5"
                },
                "observeWorkspace": {
                  "type": "boolean"
                },
                "backend": {
                  "$ref": "#/definitions/__schema7"
                },
                "lifetime": {
                  "$ref": "#/definitions/__schema8"
                },
                "grants": {
                  "type": "object",
                  "properties": {
                    "access": {
                      "$ref": "#/definitions/__schema11"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema1"
                      }
                    },
                    "workspaces": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema5"
                      }
                    },
                    "inheritContext": {
                      "type": "boolean"
                    },
                    "memory": {
                      "$ref": "#/definitions/__schema10"
                    },
                    "delegation": {
                      "type": "object",
                      "properties": {
                        "maxDepth": {
                          "$ref": "#/definitions/__schema2"
                        },
                        "agents": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema0"
                          }
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema1"
                          }
                        },
                        "workspaces": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema5"
                          }
                        }
                      },
                      "required": ["maxDepth", "agents", "tools", "workspaces"],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "access",
                    "tools",
                    "workspaces",
                    "inheritContext",
                    "memory",
                    "delegation"
                  ],
                  "additionalProperties": false
                },
                "origin": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                },
                "parentAssignment": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                },
                "depth": {
                  "default": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema2"
                    }
                  ]
                },
                "config": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema12"
                    }
                  ]
                },
                "context": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema12"
                    }
                  ]
                },
                "workspacePlan": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema12"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "agent",
                "definition",
                "fallbacks",
                "tools",
                "access",
                "workspace",
                "backend",
                "lifetime",
                "grants"
              ],
              "additionalProperties": false
            }
          },
          "required": ["request", "worker"],
          "additionalProperties": false
        },
        "nextAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "lastLocalKey": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "activatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "occurrences": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "scheduledAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "status": {
                "type": "string",
                "enum": ["accepted", "skipped", "missed"]
              },
              "ref": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              },
              "reason": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema1"
                  }
                ]
              },
              "through": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": ["scheduledAt", "status"],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "id",
        "sessionId",
        "revision",
        "trigger",
        "overlap",
        "status",
        "target",
        "task",
        "nextAt",
        "occurrences"
      ],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema1"
            },
            "worker": {
              "$ref": "#/definitions/__schema0"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema3"
          }
        },
        "__schema5": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema6": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema1"
            },
            "id": {
              "$ref": "#/definitions/__schema1"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema7": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema8": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "__schema9": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema10": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema11"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "__schema11": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema12": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        }
      }
    },
    "pinata.schedule-occurrence.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "scheduledAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "status": {
          "type": "string",
          "enum": ["accepted", "skipped", "missed"]
        },
        "ref": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "reason": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        },
        "through": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": ["scheduledAt", "status"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.child-command.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "requestId": {
          "$ref": "#/definitions/__schema0"
        },
        "command": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "add"
                },
                "workers": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema1"
                  }
                }
              },
              "required": ["kind", "workers"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "follow_up"
                },
                "worker": {
                  "$ref": "#/definitions/__schema2"
                },
                "messageId": {
                  "$ref": "#/definitions/__schema0"
                },
                "text": {
                  "$ref": "#/definitions/__schema0"
                },
                "after": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      },
                      {
                        "$ref": "#/definitions/__schema5"
                      }
                    ]
                  }
                },
                "inputs": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema5"
                  }
                }
              },
              "required": ["kind", "worker", "messageId", "text"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "steer"
                },
                "worker": {
                  "$ref": "#/definitions/__schema2"
                },
                "messageId": {
                  "$ref": "#/definitions/__schema0"
                },
                "text": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["kind", "worker", "messageId", "text"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "cancel"
                },
                "scope": {
                  "type": "string",
                  "enum": ["assignment", "worker"]
                },
                "worker": {
                  "$ref": "#/definitions/__schema2"
                },
                "assignment": {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                },
                "descendants": {
                  "default": true,
                  "type": "boolean"
                }
              },
              "required": ["kind", "scope", "worker"],
              "additionalProperties": false
            }
          ]
        }
      },
      "required": ["requestId", "command"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "agent": {
              "$ref": "#/definitions/__schema2"
            },
            "task": {
              "$ref": "#/definitions/__schema0"
            },
            "messageId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "workspace": {
              "type": "string",
              "enum": ["shared", "worktree"]
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "model": {
              "type": "object",
              "properties": {
                "provider": {
                  "$ref": "#/definitions/__schema0"
                },
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "thinking": {
                  "type": "string",
                  "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
                }
              },
              "required": ["provider", "id", "thinking"],
              "additionalProperties": false
            },
            "backend": {
              "type": "string",
              "enum": ["in-process", "process", "herdr-pi"]
            },
            "lifetime": {
              "type": "string",
              "enum": ["attached", "surviving"]
            },
            "context": {
              "default": [],
              "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "inheritContext": {
              "type": "string",
              "enum": ["none", "parent"]
            },
            "memory": {
              "type": "object",
              "properties": {
                "scope": {
                  "type": "string",
                  "enum": ["none", "worker", "project-agent"]
                },
                "access": {
                  "type": "string",
                  "enum": ["read", "write"]
                }
              },
              "required": ["scope", "access"],
              "additionalProperties": false
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema4"
                }
              },
              "required": ["maxDepth"],
              "additionalProperties": false
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "after": {
              "default": [],
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/__schema2"
                  },
                  {
                    "$ref": "#/definitions/__schema5"
                  }
                ]
              }
            },
            "inputs": {
              "default": [],
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema5"
              }
            }
          },
          "required": ["id", "agent", "task"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema3": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema4": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema5": {
          "type": "object",
          "properties": {
            "worker": {
              "$ref": "#/definitions/__schema2"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            }
          },
          "required": ["worker", "assignment"],
          "additionalProperties": false
        }
      }
    },
    "pinata.child-query.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "status"
            }
          },
          "required": ["kind"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "result"
            },
            "ref": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["kind", "ref"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "changes"
            },
            "ref": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["kind", "ref"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "conversation"
            },
            "ref": {
              "$ref": "#/definitions/__schema0"
            },
            "cursor": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": ["kind", "ref"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "object",
          "properties": {
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["worker", "assignment"],
          "additionalProperties": false
        }
      }
    },
    "pinata.child-query-result.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "status"
            },
            "workers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "agent": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "definition": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "accent.blue",
                          "accent.cyan",
                          "accent.green",
                          "accent.yellow",
                          "accent.orange",
                          "accent.red",
                          "accent.pink",
                          "accent.purple"
                        ]
                      },
                      {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{6}$"
                      }
                    ]
                  },
                  "loadout": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  },
                  "model": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema3"
                      }
                    ]
                  },
                  "fallbacks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema3"
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema4"
                    }
                  },
                  "access": {
                    "$ref": "#/definitions/__schema5"
                  },
                  "workspace": {
                    "$ref": "#/definitions/__schema6"
                  },
                  "observeWorkspace": {
                    "type": "boolean"
                  },
                  "backend": {
                    "type": "string",
                    "enum": ["in-process", "process", "herdr-pi"]
                  },
                  "lifetime": {
                    "type": "string",
                    "enum": ["attached", "surviving"]
                  },
                  "grants": {
                    "type": "object",
                    "properties": {
                      "access": {
                        "$ref": "#/definitions/__schema5"
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema4"
                        }
                      },
                      "workspaces": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema6"
                        }
                      },
                      "inheritContext": {
                        "type": "boolean"
                      },
                      "memory": {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string",
                            "enum": ["none", "worker", "project-agent"]
                          },
                          "access": {
                            "$ref": "#/definitions/__schema5"
                          }
                        },
                        "required": ["scope", "access"],
                        "additionalProperties": false
                      },
                      "delegation": {
                        "type": "object",
                        "properties": {
                          "maxDepth": {
                            "$ref": "#/definitions/__schema2"
                          },
                          "agents": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema0"
                            }
                          },
                          "tools": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema4"
                            }
                          },
                          "workspaces": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema6"
                            }
                          }
                        },
                        "required": ["maxDepth", "agents", "tools", "workspaces"],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "access",
                      "tools",
                      "workspaces",
                      "inheritContext",
                      "memory",
                      "delegation"
                    ],
                    "additionalProperties": false
                  },
                  "origin": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema7"
                      }
                    ]
                  },
                  "parentAssignment": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema7"
                      }
                    ]
                  },
                  "depth": {
                    "default": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "config": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  },
                  "context": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  },
                  "workspacePlan": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "agent",
                  "definition",
                  "fallbacks",
                  "tools",
                  "access",
                  "workspace",
                  "backend",
                  "lifetime",
                  "grants"
                ],
                "additionalProperties": false
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "sequence": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "task": {
                    "$ref": "#/definitions/__schema4"
                  },
                  "after": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema7"
                    }
                  },
                  "inputs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema7"
                    }
                  },
                  "context": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "execution": {
                    "$ref": "#/definitions/__schema8"
                  }
                },
                "required": ["ref", "sequence", "task", "after", "inputs", "context", "execution"],
                "additionalProperties": false
              }
            },
            "notices": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema4"
                  },
                  "target": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "sender": {
                    "$ref": "#/definitions/__schema4"
                  },
                  "kind": {
                    "type": "string",
                    "enum": ["initial", "follow_up", "steer", "notice"]
                  },
                  "text": {
                    "$ref": "#/definitions/__schema4"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "recorded",
                      "dispatch_intent",
                      "transport_queued",
                      "transport_handled",
                      "consumed",
                      "uncertain"
                    ]
                  },
                  "attempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/definitions/__schema4"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "dispatch_intent",
                            "transport_queued",
                            "transport_handled",
                            "consumed",
                            "uncertain"
                          ]
                        },
                        "checkpoint": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema1"
                            }
                          ]
                        }
                      },
                      "required": ["id", "state"],
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["id", "target", "sender", "kind", "text", "state", "attempts"],
                "additionalProperties": false
              }
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema2"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["kind", "workers", "assignments", "notices", "maxConcurrent"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "result"
            },
            "result": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "ref": {
                      "$ref": "#/definitions/__schema7"
                    },
                    "summary": {
                      "type": "string"
                    },
                    "execution": {
                      "$ref": "#/definitions/__schema8"
                    },
                    "report": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    },
                    "reportingError": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema4"
                        }
                      ]
                    },
                    "finalizationErrors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema4"
                      }
                    },
                    "artifacts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema1"
                      }
                    },
                    "transcript": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    },
                    "session": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    },
                    "snapshot": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "expectedAttempts": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema4"
                          }
                        },
                        "observations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "attempt": {
                                "$ref": "#/definitions/__schema4"
                              },
                              "source": {
                                "$ref": "#/definitions/__schema4"
                              },
                              "usage": {
                                "$ref": "#/definitions/__schema9"
                              },
                              "kind": {
                                "$ref": "#/definitions/__schema10"
                              },
                              "responseId": {
                                "$ref": "#/definitions/__schema11"
                              }
                            },
                            "required": ["attempt", "source", "usage"],
                            "additionalProperties": false
                          }
                        },
                        "complete": {
                          "type": "boolean"
                        },
                        "reason": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema4"
                            }
                          ]
                        },
                        "total": {
                          "anyOf": [
                            {
                              "$ref": "#/definitions/__schema9"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "observedTotal": {
                          "anyOf": [
                            {
                              "$ref": "#/definitions/__schema9"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "missingAttempts": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema4"
                          }
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema4"
                          }
                        }
                      },
                      "required": ["expectedAttempts", "observations", "complete"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["ref", "summary", "execution", "artifacts", "usage"],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "artifact": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            }
          },
          "required": ["kind", "result"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "changes"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "source": {
              "type": "string",
              "enum": ["snapshot", "unavailable"]
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "mode": {
              "type": "string",
              "enum": ["shared", "worktree"]
            },
            "changes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "$ref": "#/definitions/__schema4"
                  },
                  "before": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema12"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "after": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema12"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": ["path", "before", "after"],
                "additionalProperties": false
              }
            }
          },
          "required": ["kind", "ref", "source", "changes"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "conversation"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "source": {
              "type": "string",
              "enum": ["assignment", "checkpoint", "unavailable"]
            },
            "entries": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema15"
              }
            },
            "artifact": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "cursor": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "complete": {
              "type": "boolean"
            }
          },
          "required": ["kind", "ref", "source", "entries", "complete"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema4"
            },
            "id": {
              "$ref": "#/definitions/__schema4"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "string",
          "minLength": 1
        },
        "__schema5": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema6": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema7": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema4"
            },
            "worker": {
              "$ref": "#/definitions/__schema0"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema8": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "queued"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "preparing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "running"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "stopping"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "finalizing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "ended"
                },
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled", "interrupted"]
                },
                "cleanup": {
                  "type": "string",
                  "enum": ["confirmed", "unconfirmed"]
                }
              },
              "required": ["phase", "reason", "cleanup"],
              "additionalProperties": false
            }
          ]
        },
        "__schema9": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema2"
            },
            "output": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema2"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema10": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema11": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema4"
            }
          ]
        },
        "__schema12": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema4"
                },
                "blob": {
                  "$ref": "#/definitions/__schema1"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema13"
                },
                "mode": {
                  "type": "string",
                  "const": "100644"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema4"
                },
                "blob": {
                  "$ref": "#/definitions/__schema1"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema13"
                },
                "mode": {
                  "type": "string",
                  "const": "100755"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema4"
                },
                "blob": {
                  "$ref": "#/definitions/__schema1"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema13"
                },
                "mode": {
                  "type": "string",
                  "const": "120000"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema4"
                },
                "mode": {
                  "type": "string",
                  "const": "160000"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema14"
                }
              },
              "required": ["path", "mode", "objectId"],
              "additionalProperties": false
            }
          ]
        },
        "__schema13": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema14"
            }
          ]
        },
        "__schema14": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        },
        "__schema15": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema15"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema15"
              }
            }
          ]
        }
      }
    },
    "pinata.child-wait.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "workers": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,31}$"
          }
        },
        "next": {
          "default": false,
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "pinata.child-wait-result.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "settled",
            "nothing_pending",
            "aborted",
            "capacity_blocked",
            "dependency_blocked"
          ]
        },
        "targets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema0"
          }
        },
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "ref": {
                "$ref": "#/definitions/__schema0"
              },
              "summary": {
                "type": "string"
              },
              "execution": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "phase": {
                        "type": "string",
                        "const": "queued"
                      }
                    },
                    "required": ["phase"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "phase": {
                        "type": "string",
                        "const": "preparing"
                      }
                    },
                    "required": ["phase"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "phase": {
                        "type": "string",
                        "const": "running"
                      }
                    },
                    "required": ["phase"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "phase": {
                        "type": "string",
                        "const": "stopping"
                      }
                    },
                    "required": ["phase"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "phase": {
                        "type": "string",
                        "const": "finalizing"
                      }
                    },
                    "required": ["phase"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "phase": {
                        "type": "string",
                        "const": "ended"
                      },
                      "reason": {
                        "type": "string",
                        "enum": ["completed", "failed", "cancelled", "interrupted"]
                      },
                      "cleanup": {
                        "type": "string",
                        "enum": ["confirmed", "unconfirmed"]
                      }
                    },
                    "required": ["phase", "reason", "cleanup"],
                    "additionalProperties": false
                  }
                ]
              },
              "report": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              },
              "reportingError": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema1"
                  }
                ]
              },
              "finalizationErrors": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "artifacts": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "transcript": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              },
              "session": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              },
              "snapshot": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              },
              "usage": {
                "type": "object",
                "properties": {
                  "expectedAttempts": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema1"
                    }
                  },
                  "observations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "attempt": {
                          "$ref": "#/definitions/__schema1"
                        },
                        "source": {
                          "$ref": "#/definitions/__schema1"
                        },
                        "usage": {
                          "$ref": "#/definitions/__schema4"
                        },
                        "kind": {
                          "$ref": "#/definitions/__schema5"
                        },
                        "responseId": {
                          "$ref": "#/definitions/__schema6"
                        }
                      },
                      "required": ["attempt", "source", "usage"],
                      "additionalProperties": false
                    }
                  },
                  "complete": {
                    "type": "boolean"
                  },
                  "reason": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  },
                  "total": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema4"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "observedTotal": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema4"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "missingAttempts": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema1"
                    }
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema1"
                    }
                  }
                },
                "required": ["expectedAttempts", "observations", "complete"],
                "additionalProperties": false
              }
            },
            "required": ["ref", "summary", "execution", "artifacts", "usage"],
            "additionalProperties": false
          }
        },
        "cursor": {
          "$ref": "#/definitions/__schema2"
        },
        "guidance": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        }
      },
      "required": ["status", "targets", "results", "cursor"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema1"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema2"
            },
            "output": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema2"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema5": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema6": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        }
      }
    },
    "pinata.workspace-checkpoint.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "kind": {
          "type": "string",
          "const": "completion"
        },
        "status": {
          "type": "string",
          "enum": ["created", "unchanged"]
        },
        "assignment": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "tree": {
          "$ref": "#/definitions/__schema1"
        },
        "commit": {
          "$ref": "#/definitions/__schema1"
        },
        "ref": {
          "$ref": "#/definitions/__schema0"
        },
        "previous": {
          "type": "object",
          "properties": {
            "tree": {
              "$ref": "#/definitions/__schema1"
            },
            "commit": {
              "$ref": "#/definitions/__schema1"
            },
            "ref": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["tree", "commit", "ref"],
          "additionalProperties": false
        },
        "author": {
          "type": "object",
          "properties": {
            "name": {
              "$ref": "#/definitions/__schema0"
            },
            "email": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["name", "email"],
          "additionalProperties": false
        },
        "recordedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "schemaVersion",
        "kind",
        "status",
        "assignment",
        "tree",
        "commit",
        "ref",
        "previous",
        "author",
        "recordedAt"
      ],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        }
      }
    },
    "pinata.loadout.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "agent": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "definition": {
          "$ref": "#/definitions/__schema0"
        },
        "source": {
          "type": "object",
          "properties": {
            "path": {
              "$ref": "#/definitions/__schema2"
            },
            "artifact": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["path", "artifact"],
          "additionalProperties": false
        },
        "config": {
          "$ref": "#/definitions/__schema0"
        },
        "skills": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/definitions/__schema2"
              },
              "description": {
                "type": "string"
              },
              "sourcePath": {
                "$ref": "#/definitions/__schema2"
              },
              "entryPath": {
                "$ref": "#/definitions/__schema2"
              },
              "digest": {
                "$ref": "#/definitions/__schema1"
              },
              "files": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema3"
                }
              }
            },
            "required": ["name", "description", "sourcePath", "entryPath", "digest", "files"],
            "additionalProperties": false
          }
        },
        "providers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/definitions/__schema2"
              },
              "path": {
                "$ref": "#/definitions/__schema2"
              },
              "artifact": {
                "$ref": "#/definitions/__schema0"
              },
              "tools": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema2"
                }
              }
            },
            "required": ["name", "path", "artifact", "tools"],
            "additionalProperties": false
          }
        },
        "trusted": {
          "type": "object",
          "properties": {
            "outputSchema": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "color": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "accent.blue",
                "accent.cyan",
                "accent.green",
                "accent.yellow",
                "accent.orange",
                "accent.red",
                "accent.pink",
                "accent.purple"
              ]
            },
            {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$"
            }
          ]
        },
        "provenance": {
          "type": "object",
          "properties": {
            "model": {
              "$ref": "#/definitions/__schema2"
            },
            "workspace": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["model", "workspace"],
          "additionalProperties": false
        }
      },
      "required": [
        "schemaVersion",
        "agent",
        "definition",
        "source",
        "config",
        "skills",
        "providers",
        "provenance"
      ],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema1"
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema1": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema2": {
          "type": "string",
          "minLength": 1
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "path": {
              "$ref": "#/definitions/__schema2"
            },
            "artifact": {
              "$ref": "#/definitions/__schema0"
            },
            "executable": {
              "type": "boolean"
            }
          },
          "required": ["path", "artifact", "executable"],
          "additionalProperties": false
        }
      }
    },
    "pinata.conversation-seed.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "source": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema0"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema1"
                },
                "branch": {
                  "$ref": "#/definitions/__schema0"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema2"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema0"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema1"
                },
                "branch": {
                  "$ref": "#/definitions/__schema0"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema2"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema0"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "messages": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "const": "user"
                  },
                  "source": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "content": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        },
                        {
                          "$ref": "#/definitions/__schema4"
                        }
                      ]
                    }
                  }
                },
                "required": ["role", "source", "content"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "const": "assistant"
                  },
                  "source": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "content": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "toolCall"
                            },
                            "id": {
                              "$ref": "#/definitions/__schema0"
                            },
                            "name": {
                              "$ref": "#/definitions/__schema0"
                            },
                            "arguments": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "$ref": "#/definitions/__schema5"
                              }
                            }
                          },
                          "required": ["type", "id", "name", "arguments"],
                          "additionalProperties": false
                        }
                      ]
                    }
                  }
                },
                "required": ["role", "source", "content"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "const": "toolResult"
                  },
                  "source": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "toolCallId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "toolName": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "isError": {
                    "type": "boolean"
                  },
                  "content": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        },
                        {
                          "$ref": "#/definitions/__schema4"
                        }
                      ]
                    }
                  }
                },
                "required": ["role", "source", "toolCallId", "toolName", "isError", "content"],
                "additionalProperties": false
              }
            ]
          }
        },
        "summaries": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "$ref": "#/definitions/__schema0"
              },
              "kind": {
                "type": "string",
                "enum": ["compaction", "branch_summary"]
              }
            },
            "required": ["source", "kind"],
            "additionalProperties": false
          }
        },
        "omissions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "$ref": "#/definitions/__schema0"
              },
              "reason": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "required": ["source", "reason"],
            "additionalProperties": false
          }
        }
      },
      "required": ["schemaVersion", "source", "messages", "summaries", "omissions"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema2": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "text"
            },
            "text": {
              "type": "string"
            }
          },
          "required": ["type", "text"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "image"
            },
            "data": {
              "type": "string"
            },
            "mimeType": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["type", "data", "mimeType"],
          "additionalProperties": false
        },
        "__schema5": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema5"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema5"
              }
            }
          ]
        }
      }
    },
    "pinata.instruction-snapshot.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "cwd": {
          "$ref": "#/definitions/__schema0"
        },
        "candidates": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "$ref": "#/definitions/__schema0"
              },
              "state": {
                "type": "string",
                "enum": ["missing", "other", "file"]
              },
              "digest": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema1"
                  }
                ]
              }
            },
            "required": ["path", "state"],
            "additionalProperties": false
          }
        },
        "files": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "$ref": "#/definitions/__schema0"
              },
              "artifact": {
                "type": "object",
                "properties": {
                  "digest": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "size": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["digest", "size"],
                "additionalProperties": false
              }
            },
            "required": ["path", "artifact"],
            "additionalProperties": false
          }
        }
      },
      "required": ["schemaVersion", "cwd", "candidates", "files"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      }
    },
    "pinata.surface-call.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "const": "execute"
            },
            "input": {}
          },
          "required": ["method", "input"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "const": "query"
            },
            "input": {}
          },
          "required": ["method", "input"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "const": "wait"
            },
            "input": {}
          },
          "required": ["method", "input"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "const": "recover"
            },
            "input": {}
          },
          "required": ["method", "input"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "const": "deliver_notifications"
            }
          },
          "required": ["method"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "const": "consume_notification"
            },
            "id": {
              "type": "string",
              "minLength": 1
            },
            "checkpoint": {
              "type": "object",
              "properties": {
                "digest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "size": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": ["digest", "size"],
              "additionalProperties": false
            }
          },
          "required": ["method", "id", "checkpoint"],
          "additionalProperties": false
        }
      ]
    },
    "pinata.surface-reply.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "ok"
            },
            "response": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "execute"
                    },
                    "result": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "required": ["method", "result"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "query"
                    },
                    "result": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "config"
                            },
                            "config": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schemaVersion": {
                                      "default": 1,
                                      "type": "number",
                                      "const": 1
                                    },
                                    "workspace": {
                                      "default": "shared",
                                      "allOf": [
                                        {
                                          "$ref": "#/definitions/__schema8"
                                        }
                                      ]
                                    },
                                    "models": {
                                      "default": {},
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {
                                        "$ref": "#/definitions/__schema9"
                                      }
                                    },
                                    "fallbacks": {
                                      "default": {},
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {
                                        "maxItems": 5,
                                        "type": "array",
                                        "items": {
                                          "$ref": "#/definitions/__schema9"
                                        }
                                      }
                                    },
                                    "toolProviders": {
                                      "default": {},
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {
                                        "type": "object",
                                        "properties": {
                                          "extension": {
                                            "$ref": "#/definitions/__schema2"
                                          },
                                          "tools": {
                                            "type": "array",
                                            "items": {
                                              "$ref": "#/definitions/__schema2"
                                            }
                                          }
                                        },
                                        "required": ["extension", "tools"],
                                        "additionalProperties": false
                                      }
                                    },
                                    "passEnv": {
                                      "default": [],
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "pattern": "^[A-Z][A-Z0-9_]*$"
                                      }
                                    },
                                    "webExtension": {
                                      "allOf": [
                                        {
                                          "$ref": "#/definitions/__schema2"
                                        }
                                      ]
                                    },
                                    "setup": {
                                      "anyOf": [
                                        {
                                          "type": "boolean",
                                          "const": false
                                        },
                                        {
                                          "$ref": "#/definitions/__schema2"
                                        }
                                      ]
                                    },
                                    "worktreeRoot": {
                                      "allOf": [
                                        {
                                          "$ref": "#/definitions/__schema2"
                                        }
                                      ]
                                    },
                                    "codemode": {
                                      "default": true,
                                      "type": "boolean"
                                    },
                                    "includeUncommitted": {
                                      "default": true,
                                      "type": "boolean"
                                    },
                                    "mode": {
                                      "default": "lean",
                                      "type": "string",
                                      "enum": ["lean", "observe"]
                                    },
                                    "backend": {
                                      "default": "in-process",
                                      "allOf": [
                                        {
                                          "$ref": "#/definitions/__schema11"
                                        }
                                      ]
                                    },
                                    "execution": {
                                      "default": {
                                        "maxConcurrent": null
                                      },
                                      "type": "object",
                                      "properties": {
                                        "maxConcurrent": {
                                          "default": null,
                                          "anyOf": [
                                            {
                                              "exclusiveMinimum": 0,
                                              "allOf": [
                                                {
                                                  "$ref": "#/definitions/__schema3"
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "ui": {
                                      "default": {
                                        "palette": "inherit",
                                        "motion": "full",
                                        "keys": {}
                                      },
                                      "type": "object",
                                      "properties": {
                                        "palette": {
                                          "default": "inherit",
                                          "type": "string",
                                          "enum": [
                                            "inherit",
                                            "pinata",
                                            "catppuccin-mocha",
                                            "catppuccin-latte",
                                            "gruvbox-dark",
                                            "gruvbox-light",
                                            "tokyo-night-night",
                                            "rose-pine-main",
                                            "rose-pine-dawn",
                                            "dracula",
                                            "nord",
                                            "one-dark",
                                            "one-light",
                                            "solarized-dark",
                                            "solarized-light",
                                            "terminal-default"
                                          ]
                                        },
                                        "motion": {
                                          "default": "full",
                                          "type": "string",
                                          "enum": ["full", "reduced", "off"]
                                        },
                                        "keys": {
                                          "default": {},
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string"
                                          },
                                          "additionalProperties": {
                                            "$ref": "#/definitions/__schema2"
                                          }
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": ["kind", "config"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "changes"
                            },
                            "ref": {
                              "$ref": "#/definitions/__schema6"
                            },
                            "source": {
                              "type": "string",
                              "enum": ["snapshot", "unavailable"]
                            },
                            "snapshot": {
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema17"
                                }
                              ]
                            },
                            "mode": {
                              "type": "string",
                              "enum": ["shared", "worktree"]
                            },
                            "changes": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "path": {
                                    "$ref": "#/definitions/__schema2"
                                  },
                                  "before": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/definitions/__schema23"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "after": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/definitions/__schema23"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": ["path", "before", "after"],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": ["kind", "ref", "source", "changes"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "application"
                            },
                            "operation": {
                              "anyOf": [
                                {
                                  "$ref": "#/definitions/__schema26"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": ["kind", "operation"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "wait"
                            },
                            "wait": {
                              "$ref": "#/definitions/__schema31"
                            }
                          },
                          "required": ["kind", "wait"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "status"
                            },
                            "state": {
                              "$ref": "#/definitions/__schema39"
                            }
                          },
                          "required": ["kind", "state"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "receipt"
                            },
                            "receipt": {
                              "anyOf": [
                                {
                                  "$ref": "#/definitions/__schema0"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": ["kind", "receipt"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "result"
                            },
                            "result": {
                              "anyOf": [
                                {
                                  "$ref": "#/definitions/__schema32"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "artifact": {
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema17"
                                }
                              ]
                            }
                          },
                          "required": ["kind", "result"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "conversation"
                            },
                            "ref": {
                              "$ref": "#/definitions/__schema6"
                            },
                            "source": {
                              "type": "string",
                              "enum": ["assignment", "checkpoint", "unavailable"]
                            },
                            "entries": {
                              "type": "array",
                              "items": {
                                "$ref": "#/definitions/__schema53"
                              }
                            },
                            "artifact": {
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema17"
                                }
                              ]
                            },
                            "cursor": {
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema2"
                                }
                              ]
                            },
                            "complete": {
                              "type": "boolean"
                            }
                          },
                          "required": ["kind", "ref", "source", "entries", "complete"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "definitions"
                            },
                            "definitions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "object",
                                    "properties": {
                                      "schemaVersion": {
                                        "type": "number",
                                        "const": 1
                                      },
                                      "name": {
                                        "$ref": "#/definitions/__schema5"
                                      },
                                      "instructions": {
                                        "type": "string"
                                      },
                                      "handoffDescription": {
                                        "$ref": "#/definitions/__schema2"
                                      },
                                      "model": {
                                        "type": "string",
                                        "pattern": "^[^/\\s]+\\/.+$"
                                      },
                                      "modelSettings": {
                                        "default": {},
                                        "type": "object",
                                        "properties": {
                                          "reasoning": {
                                            "type": "object",
                                            "properties": {
                                              "effort": {
                                                "$ref": "#/definitions/__schema10"
                                              }
                                            },
                                            "required": ["effort"],
                                            "additionalProperties": false
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "tools": {
                                        "default": [],
                                        "type": "array",
                                        "items": {
                                          "$ref": "#/definitions/__schema2"
                                        }
                                      },
                                      "handoffs": {
                                        "default": [],
                                        "type": "array",
                                        "items": {
                                          "$ref": "#/definitions/__schema5"
                                        }
                                      },
                                      "outputType": {
                                        "allOf": [
                                          {
                                            "$ref": "#/definitions/__schema2"
                                          }
                                        ]
                                      },
                                      "pinata": {
                                        "default": {
                                          "access": "read",
                                          "workspace": "shared",
                                          "skills": [],
                                          "fallbacks": [],
                                          "inheritContext": "none",
                                          "memory": {
                                            "scope": "none",
                                            "access": "read"
                                          },
                                          "delegation": {
                                            "maxDepth": 0
                                          },
                                          "checkpoint": "completion"
                                        },
                                        "type": "object",
                                        "properties": {
                                          "access": {
                                            "default": "read",
                                            "allOf": [
                                              {
                                                "$ref": "#/definitions/__schema15"
                                              }
                                            ]
                                          },
                                          "workspace": {
                                            "default": "shared",
                                            "allOf": [
                                              {
                                                "$ref": "#/definitions/__schema8"
                                              }
                                            ]
                                          },
                                          "skills": {
                                            "default": [],
                                            "type": "array",
                                            "items": {
                                              "$ref": "#/definitions/__schema2"
                                            }
                                          },
                                          "fallbacks": {
                                            "default": [],
                                            "maxItems": 5,
                                            "type": "array",
                                            "items": {
                                              "$ref": "#/definitions/__schema9"
                                            }
                                          },
                                          "color": {
                                            "allOf": [
                                              {
                                                "$ref": "#/definitions/__schema19"
                                              }
                                            ]
                                          },
                                          "inheritContext": {
                                            "default": "none",
                                            "type": "string",
                                            "enum": ["none", "parent"]
                                          },
                                          "memory": {
                                            "default": {
                                              "scope": "none",
                                              "access": "read"
                                            },
                                            "allOf": [
                                              {
                                                "$ref": "#/definitions/__schema14"
                                              }
                                            ]
                                          },
                                          "delegation": {
                                            "default": {
                                              "maxDepth": 0
                                            },
                                            "type": "object",
                                            "properties": {
                                              "maxDepth": {
                                                "$ref": "#/definitions/__schema3"
                                              }
                                            },
                                            "required": ["maxDepth"],
                                            "additionalProperties": false
                                          },
                                          "checkpoint": {
                                            "default": "completion",
                                            "type": "string",
                                            "enum": ["completion", "none"]
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "schemaVersion",
                                      "name",
                                      "instructions",
                                      "handoffDescription"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "path": {
                                    "$ref": "#/definitions/__schema2"
                                  },
                                  "digest": {
                                    "$ref": "#/definitions/__schema18"
                                  },
                                  "outputSchema": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {}
                                  }
                                },
                                "required": ["definition", "path", "digest"],
                                "additionalProperties": false
                              }
                            },
                            "launch": {
                              "type": "object",
                              "properties": {
                                "parentContextAvailable": {
                                  "type": "boolean"
                                },
                                "grants": {
                                  "$ref": "#/definitions/__schema20"
                                },
                                "backend": {
                                  "type": "string"
                                },
                                "workspace": {
                                  "type": "string"
                                },
                                "parentModel": {
                                  "allOf": [
                                    {
                                      "$ref": "#/definitions/__schema9"
                                    }
                                  ]
                                },
                                "models": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "$ref": "#/definitions/__schema9"
                                  }
                                },
                                "backends": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "object",
                                    "properties": {
                                      "available": {
                                        "type": "boolean"
                                      },
                                      "reason": {
                                        "allOf": [
                                          {
                                            "$ref": "#/definitions/__schema2"
                                          }
                                        ]
                                      },
                                      "steer": {
                                        "type": "boolean"
                                      },
                                      "continuation": {
                                        "type": "boolean"
                                      },
                                      "conversationSeed": {
                                        "type": "boolean"
                                      },
                                      "skills": {
                                        "type": "boolean"
                                      },
                                      "memory": {
                                        "type": "boolean"
                                      },
                                      "delegation": {
                                        "type": "boolean"
                                      },
                                      "fallbacks": {
                                        "type": "boolean"
                                      },
                                      "surviving": {
                                        "type": "boolean"
                                      },
                                      "cleanup": {
                                        "type": "string",
                                        "enum": ["confirmed", "unverified"]
                                      }
                                    },
                                    "required": [
                                      "available",
                                      "steer",
                                      "continuation",
                                      "conversationSeed",
                                      "surviving",
                                      "cleanup"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "parentContextAvailable",
                                "grants",
                                "backend",
                                "workspace",
                                "models",
                                "backends"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": ["kind", "definitions"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "events"
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schemaVersion": {
                                        "type": "number",
                                        "const": 1
                                      },
                                      "kind": {
                                        "type": "string",
                                        "const": "committed"
                                      },
                                      "id": {
                                        "$ref": "#/definitions/__schema2"
                                      },
                                      "revision": {
                                        "exclusiveMinimum": 0,
                                        "allOf": [
                                          {
                                            "$ref": "#/definitions/__schema3"
                                          }
                                        ]
                                      },
                                      "ownerEpoch": {
                                        "$ref": "#/definitions/__schema2"
                                      },
                                      "transition": {
                                        "oneOf": [
                                          {
                                            "$ref": "#/definitions/__schema54"
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "schedule_changed"
                                              },
                                              "requestId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "payloadDigest": {
                                                "$ref": "#/definitions/__schema18"
                                              },
                                              "receipt": {
                                                "$ref": "#/definitions/__schema1"
                                              },
                                              "action": {
                                                "type": "string",
                                                "enum": [
                                                  "create",
                                                  "update",
                                                  "pause",
                                                  "resume",
                                                  "delete",
                                                  "close",
                                                  "recover",
                                                  "list"
                                                ]
                                              },
                                              "schedule": {
                                                "allOf": [
                                                  {
                                                    "$ref": "#/definitions/__schema4"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "requestId",
                                              "payloadDigest",
                                              "receipt",
                                              "action"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "schedule_occurrence"
                                              },
                                              "requestId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "payloadDigest": {
                                                "$ref": "#/definitions/__schema18"
                                              },
                                              "receipt": {
                                                "$ref": "#/definitions/__schema1"
                                              },
                                              "scheduleId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "occurrence": {
                                                "$ref": "#/definitions/__schema21"
                                              },
                                              "nextAt": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "lastLocalKey": {
                                                "allOf": [
                                                  {
                                                    "$ref": "#/definitions/__schema2"
                                                  }
                                                ]
                                              },
                                              "acceptance": {
                                                "allOf": [
                                                  {
                                                    "$ref": "#/definitions/__schema54"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "requestId",
                                              "payloadDigest",
                                              "receipt",
                                              "scheduleId",
                                              "occurrence",
                                              "nextAt"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "control_accepted"
                                              },
                                              "requestId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "payloadDigest": {
                                                "$ref": "#/definitions/__schema18"
                                              },
                                              "receipt": {
                                                "$ref": "#/definitions/__schema1"
                                              },
                                              "action": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "cancel"
                                                      },
                                                      "targets": {
                                                        "type": "array",
                                                        "items": {
                                                          "$ref": "#/definitions/__schema6"
                                                        }
                                                      }
                                                    },
                                                    "required": ["kind", "targets"],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "background"
                                                      }
                                                    },
                                                    "required": ["kind"],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "const": "capacity"
                                                      },
                                                      "maxConcurrent": {
                                                        "anyOf": [
                                                          {
                                                            "exclusiveMinimum": 0,
                                                            "allOf": [
                                                              {
                                                                "$ref": "#/definitions/__schema3"
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": ["kind", "maxConcurrent"],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "requestId",
                                              "payloadDigest",
                                              "receipt",
                                              "action"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "application_accepted"
                                              },
                                              "requestId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "payloadDigest": {
                                                "$ref": "#/definitions/__schema18"
                                              },
                                              "receipt": {
                                                "$ref": "#/definitions/__schema1"
                                              },
                                              "intent": {
                                                "$ref": "#/definitions/__schema27"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "requestId",
                                              "payloadDigest",
                                              "receipt",
                                              "intent"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "application_observed"
                                              },
                                              "operationId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "observation": {
                                                "type": "object",
                                                "properties": {
                                                  "status": {
                                                    "type": "string",
                                                    "enum": ["completed", "failed", "uncertain"]
                                                  },
                                                  "receipt": {
                                                    "$ref": "#/definitions/__schema28"
                                                  },
                                                  "error": {
                                                    "$ref": "#/definitions/__schema29"
                                                  },
                                                  "evidence": {
                                                    "$ref": "#/definitions/__schema30"
                                                  }
                                                },
                                                "required": ["status"],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": ["kind", "operationId", "observation"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "effect_intent"
                                              },
                                              "effect": {
                                                "$ref": "#/definitions/__schema42"
                                              }
                                            },
                                            "required": ["kind", "effect"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "effect_observed"
                                              },
                                              "effectId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "status": {
                                                "type": "string",
                                                "enum": ["completed", "failed", "uncertain"]
                                              },
                                              "detail": {
                                                "type": "string"
                                              }
                                            },
                                            "required": ["kind", "effectId", "status"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "assignment_state"
                                              },
                                              "ref": {
                                                "$ref": "#/definitions/__schema6"
                                              },
                                              "execution": {
                                                "$ref": "#/definitions/__schema33"
                                              }
                                            },
                                            "required": ["kind", "ref", "execution"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "settled"
                                              },
                                              "result": {
                                                "$ref": "#/definitions/__schema32"
                                              },
                                              "resultArtifact": {
                                                "$ref": "#/definitions/__schema17"
                                              },
                                              "notificationId": {
                                                "$ref": "#/definitions/__schema2"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "result",
                                              "resultArtifact",
                                              "notificationId"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "inbox_state"
                                              },
                                              "messageId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "dispatch_intent",
                                                  "transport_queued",
                                                  "transport_handled",
                                                  "consumed",
                                                  "uncertain"
                                                ]
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "checkpoint": {
                                                "allOf": [
                                                  {
                                                    "$ref": "#/definitions/__schema17"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": ["kind", "messageId", "state", "attemptId"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "inbox_not_delivered"
                                              },
                                              "messageId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "receipt": {
                                                "$ref": "#/definitions/__schema17"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "messageId",
                                              "attemptId",
                                              "receipt"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "capacity_changed"
                                              },
                                              "maxConcurrent": {
                                                "anyOf": [
                                                  {
                                                    "exclusiveMinimum": 0,
                                                    "allOf": [
                                                      {
                                                        "$ref": "#/definitions/__schema3"
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": ["kind", "maxConcurrent"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "attempt_started"
                                              },
                                              "attempt": {
                                                "$ref": "#/definitions/__schema43"
                                              }
                                            },
                                            "required": ["kind", "attempt"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "workspace_prepared"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "prepared": {
                                                "$ref": "#/definitions/__schema44"
                                              }
                                            },
                                            "required": ["kind", "attemptId", "prepared"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "workspace_captured"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "capture": {
                                                "$ref": "#/definitions/__schema45"
                                              }
                                            },
                                            "required": ["kind", "attemptId", "capture"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "workspace_recovered"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "prepared": {
                                                "$ref": "#/definitions/__schema44"
                                              },
                                              "evidence": {
                                                "minItems": 1,
                                                "type": "array",
                                                "items": {
                                                  "$ref": "#/definitions/__schema17"
                                                }
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "attemptId",
                                              "prepared",
                                              "evidence"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "backend_enrolled"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "identity": {
                                                "$ref": "#/definitions/__schema46"
                                              },
                                              "evidence": {
                                                "type": "array",
                                                "items": {
                                                  "$ref": "#/definitions/__schema17"
                                                }
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "attemptId",
                                              "identity",
                                              "evidence"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "attempt_outcome"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "outcome": {
                                                "$ref": "#/definitions/__schema47"
                                              },
                                              "artifact": {
                                                "$ref": "#/definitions/__schema17"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "attemptId",
                                              "outcome",
                                              "artifact"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "cleanup_observed"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "receipt": {
                                                "$ref": "#/definitions/__schema50"
                                              }
                                            },
                                            "required": ["kind", "attemptId", "receipt"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "session_checkpoint"
                                              },
                                              "worker": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "checkpoint": {
                                                "$ref": "#/definitions/__schema48"
                                              }
                                            },
                                            "required": ["kind", "worker", "checkpoint"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "usage_observed"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "observation": {
                                                "$ref": "#/definitions/__schema35"
                                              }
                                            },
                                            "required": ["kind", "attemptId", "observation"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "response_observed"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "responseId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "status": {
                                                "type": "string",
                                                "enum": ["started", "completed", "interrupted"]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "attemptId",
                                              "responseId",
                                              "status"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "context_observed"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "context": {
                                                "$ref": "#/definitions/__schema51"
                                              }
                                            },
                                            "required": ["kind", "attemptId", "context"],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "const": "outbox_state"
                                              },
                                              "notificationId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "attemptId": {
                                                "$ref": "#/definitions/__schema2"
                                              },
                                              "state": {
                                                "$ref": "#/definitions/__schema52"
                                              },
                                              "checkpoint": {
                                                "allOf": [
                                                  {
                                                    "$ref": "#/definitions/__schema17"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "notificationId",
                                              "attemptId",
                                              "state"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "schemaVersion",
                                      "kind",
                                      "id",
                                      "revision",
                                      "ownerEpoch",
                                      "transition"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schemaVersion": {
                                        "type": "number",
                                        "const": 1
                                      },
                                      "kind": {
                                        "type": "string",
                                        "const": "snapshot"
                                      },
                                      "id": {
                                        "$ref": "#/definitions/__schema2"
                                      },
                                      "revision": {
                                        "$ref": "#/definitions/__schema3"
                                      },
                                      "ownerEpoch": {
                                        "$ref": "#/definitions/__schema2"
                                      },
                                      "snapshot": {
                                        "$ref": "#/definitions/__schema39"
                                      }
                                    },
                                    "required": [
                                      "schemaVersion",
                                      "kind",
                                      "id",
                                      "revision",
                                      "ownerEpoch",
                                      "snapshot"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schemaVersion": {
                                        "type": "number",
                                        "const": 1
                                      },
                                      "kind": {
                                        "type": "string",
                                        "const": "activity"
                                      },
                                      "source": {
                                        "$ref": "#/definitions/__schema2"
                                      },
                                      "ordinal": {
                                        "$ref": "#/definitions/__schema3"
                                      },
                                      "ownerEpoch": {
                                        "$ref": "#/definitions/__schema2"
                                      },
                                      "revision": {
                                        "$ref": "#/definitions/__schema3"
                                      },
                                      "ref": {
                                        "$ref": "#/definitions/__schema6"
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "schemaVersion",
                                      "kind",
                                      "source",
                                      "ordinal",
                                      "ownerEpoch",
                                      "revision",
                                      "ref",
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "cursor": {
                              "$ref": "#/definitions/__schema3"
                            }
                          },
                          "required": ["kind", "events", "cursor"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "schemas"
                            },
                            "schemas": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "$ref": "#/definitions/__schema55"
                              }
                            }
                          },
                          "required": ["kind", "schemas"],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": ["method", "result"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "wait"
                    },
                    "result": {
                      "$ref": "#/definitions/__schema31"
                    }
                  },
                  "required": ["method", "result"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "recover"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ref": {
                            "$ref": "#/definitions/__schema6"
                          },
                          "attemptId": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema2"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "reattached",
                              "finalizing",
                              "active",
                              "unavailable",
                              "uncertain"
                            ]
                          },
                          "detail": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema2"
                              }
                            ]
                          }
                        },
                        "required": ["ref", "status"],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": ["method", "result"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "deliver_notifications"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "$ref": "#/definitions/__schema2"
                          },
                          "state": {
                            "type": "string",
                            "enum": ["delivered", "consumed", "uncertain"]
                          }
                        },
                        "required": ["id", "state"],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": ["method", "result"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "const": "consume_notification"
                    },
                    "result": {
                      "type": "null"
                    }
                  },
                  "required": ["method", "result"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": ["status", "response"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "error"
            },
            "error": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema22"
                },
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "internal_error",
                        "protocol_version",
                        "unauthenticated",
                        "transport_closed",
                        "transport_limit"
                      ]
                    },
                    "message": {
                      "$ref": "#/definitions/__schema2"
                    },
                    "field": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    }
                  },
                  "required": ["code", "message"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": ["status", "error"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "oneOf": [
            {
              "$ref": "#/definitions/__schema1"
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "rejected"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema2"
                },
                "revision": {
                  "$ref": "#/definitions/__schema3"
                },
                "error": {
                  "$ref": "#/definitions/__schema22"
                }
              },
              "required": ["status", "requestId", "revision", "error"],
              "additionalProperties": false
            }
          ]
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema2"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "operationId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "schedules": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema4"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema6"
              }
            },
            "resolved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema6"
                  },
                  "workspace": {
                    "$ref": "#/definitions/__schema8"
                  },
                  "backend": {
                    "$ref": "#/definitions/__schema11"
                  },
                  "lifetime": {
                    "$ref": "#/definitions/__schema12"
                  },
                  "grants": {
                    "$ref": "#/definitions/__schema20"
                  }
                },
                "required": ["ref", "workspace", "backend", "lifetime", "grants"],
                "additionalProperties": false
              }
            }
          },
          "required": ["status", "requestId", "revision", "assignments", "resolved"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "string",
          "minLength": 1
        },
        "__schema3": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema5"
            },
            "sessionId": {
              "$ref": "#/definitions/__schema2"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "trigger": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "at"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": ["kind", "at"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "interval"
                    },
                    "milliseconds": {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "milliseconds"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "cron"
                    },
                    "expression": {
                      "$ref": "#/definitions/__schema2"
                    },
                    "timezone": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["kind", "expression", "timezone"],
                  "additionalProperties": false
                }
              ]
            },
            "overlap": {
              "type": "string",
              "enum": ["skip", "queue"]
            },
            "status": {
              "type": "string",
              "enum": ["paused", "active", "completed", "deleted", "closed"]
            },
            "target": {
              "type": "object",
              "properties": {
                "worker": {
                  "$ref": "#/definitions/__schema5"
                }
              },
              "required": ["worker"],
              "additionalProperties": false
            },
            "task": {
              "$ref": "#/definitions/__schema2"
            },
            "template": {
              "type": "object",
              "properties": {
                "request": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema5"
                    },
                    "agent": {
                      "$ref": "#/definitions/__schema5"
                    },
                    "task": {
                      "$ref": "#/definitions/__schema2"
                    },
                    "origin": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema6"
                        }
                      ]
                    },
                    "messageId": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    },
                    "after": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/__schema5"
                          },
                          {
                            "$ref": "#/definitions/__schema6"
                          }
                        ]
                      }
                    },
                    "inputs": {
                      "default": [],
                      "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema7"
                        }
                      ]
                    },
                    "workspace": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema8"
                        }
                      ]
                    },
                    "observeWorkspace": {
                      "type": "boolean"
                    },
                    "model": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema9"
                        }
                      ]
                    },
                    "backend": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema11"
                        }
                      ]
                    },
                    "lifetime": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema12"
                        }
                      ]
                    },
                    "context": {
                      "default": [],
                      "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema13"
                        }
                      ]
                    },
                    "inheritContext": {
                      "type": "string",
                      "enum": ["none", "parent"]
                    },
                    "memory": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema14"
                        }
                      ]
                    },
                    "delegation": {
                      "type": "object",
                      "properties": {
                        "maxDepth": {
                          "$ref": "#/definitions/__schema3"
                        }
                      },
                      "required": ["maxDepth"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["id", "agent", "task"],
                  "additionalProperties": false
                },
                "worker": {
                  "$ref": "#/definitions/__schema16"
                }
              },
              "required": ["request", "worker"],
              "additionalProperties": false
            },
            "nextAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastLocalKey": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "activatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "occurrences": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema21"
              }
            }
          },
          "required": [
            "id",
            "sessionId",
            "revision",
            "trigger",
            "overlap",
            "status",
            "target",
            "task",
            "nextAt",
            "occurrences"
          ],
          "additionalProperties": false
        },
        "__schema5": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema6": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema2"
            },
            "worker": {
              "$ref": "#/definitions/__schema5"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema7": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema6"
          }
        },
        "__schema8": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema9": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema2"
            },
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "thinking": {
              "$ref": "#/definitions/__schema10"
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema10": {
          "type": "string",
          "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
        },
        "__schema11": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema12": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "__schema13": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema14": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema15"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "__schema15": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema16": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema5"
            },
            "agent": {
              "$ref": "#/definitions/__schema5"
            },
            "definition": {
              "$ref": "#/definitions/__schema17"
            },
            "color": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema19"
                }
              ]
            },
            "loadout": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema9"
                }
              ]
            },
            "fallbacks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema9"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "access": {
              "$ref": "#/definitions/__schema15"
            },
            "workspace": {
              "$ref": "#/definitions/__schema8"
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "backend": {
              "$ref": "#/definitions/__schema11"
            },
            "lifetime": {
              "$ref": "#/definitions/__schema12"
            },
            "grants": {
              "$ref": "#/definitions/__schema20"
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "parentAssignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "depth": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "context": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "workspacePlan": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            }
          },
          "required": [
            "id",
            "agent",
            "definition",
            "fallbacks",
            "tools",
            "access",
            "workspace",
            "backend",
            "lifetime",
            "grants"
          ],
          "additionalProperties": false
        },
        "__schema17": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema18"
            },
            "size": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema18": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema19": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "accent.blue",
                "accent.cyan",
                "accent.green",
                "accent.yellow",
                "accent.orange",
                "accent.red",
                "accent.pink",
                "accent.purple"
              ]
            },
            {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$"
            }
          ]
        },
        "__schema20": {
          "type": "object",
          "properties": {
            "access": {
              "$ref": "#/definitions/__schema15"
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "workspaces": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema8"
              }
            },
            "inheritContext": {
              "type": "boolean"
            },
            "memory": {
              "$ref": "#/definitions/__schema14"
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema3"
                },
                "agents": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema5"
                  }
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "workspaces": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema8"
                  }
                }
              },
              "required": ["maxDepth", "agents", "tools", "workspaces"],
              "additionalProperties": false
            }
          },
          "required": ["access", "tools", "workspaces", "inheritContext", "memory", "delegation"],
          "additionalProperties": false
        },
        "__schema21": {
          "type": "object",
          "properties": {
            "scheduledAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "status": {
              "type": "string",
              "enum": ["accepted", "skipped", "missed"]
            },
            "ref": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "through": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": ["scheduledAt", "status"],
          "additionalProperties": false
        },
        "__schema22": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "invalid_input",
                "dependency_missing",
                "capability_denied",
                "unsupported",
                "conflict",
                "owner_unconfirmed",
                "context_unavailable",
                "commit_unknown"
              ]
            },
            "message": {
              "$ref": "#/definitions/__schema2"
            },
            "field": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["code", "message"],
          "additionalProperties": false
        },
        "__schema23": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema2"
                },
                "blob": {
                  "$ref": "#/definitions/__schema17"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema24"
                },
                "mode": {
                  "type": "string",
                  "const": "100644"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema2"
                },
                "blob": {
                  "$ref": "#/definitions/__schema17"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema24"
                },
                "mode": {
                  "type": "string",
                  "const": "100755"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema2"
                },
                "blob": {
                  "$ref": "#/definitions/__schema17"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema24"
                },
                "mode": {
                  "type": "string",
                  "const": "120000"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema2"
                },
                "mode": {
                  "type": "string",
                  "const": "160000"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema25"
                }
              },
              "required": ["path", "mode", "objectId"],
              "additionalProperties": false
            }
          ]
        },
        "__schema24": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema25"
            }
          ]
        },
        "__schema25": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        },
        "__schema26": {
          "type": "object",
          "properties": {
            "intent": {
              "$ref": "#/definitions/__schema27"
            },
            "status": {
              "type": "string",
              "enum": ["pending", "completed", "failed", "uncertain"]
            },
            "receipt": {
              "$ref": "#/definitions/__schema28"
            },
            "error": {
              "$ref": "#/definitions/__schema29"
            },
            "evidence": {
              "$ref": "#/definitions/__schema30"
            }
          },
          "required": ["intent", "status"],
          "additionalProperties": false
        },
        "__schema27": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "requestId": {
              "$ref": "#/definitions/__schema2"
            },
            "command": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "apply"
                    },
                    "ref": {
                      "$ref": "#/definitions/__schema6"
                    },
                    "destination": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["kind", "ref", "destination"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "rollback"
                    },
                    "operation": {
                      "$ref": "#/definitions/__schema2"
                    },
                    "destination": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["kind", "operation", "destination"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "reconcile"
                    },
                    "operation": {
                      "$ref": "#/definitions/__schema2"
                    },
                    "owner": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["kind", "operation", "owner"],
                  "additionalProperties": false
                }
              ]
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema2"
            },
            "destination": {
              "$ref": "#/definitions/__schema2"
            },
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "snapshot": {
              "$ref": "#/definitions/__schema17"
            },
            "targetOperation": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": [
            "id",
            "requestId",
            "command",
            "ownerEpoch",
            "destination",
            "ref",
            "snapshot"
          ],
          "additionalProperties": false
        },
        "__schema28": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": ["applied", "rolled_back", "already_recorded"]
                },
                "operationId": {
                  "$ref": "#/definitions/__schema2"
                },
                "destination": {
                  "$ref": "#/definitions/__schema2"
                },
                "revision": {
                  "$ref": "#/definitions/__schema3"
                },
                "snapshot": {
                  "$ref": "#/definitions/__schema17"
                },
                "freshness": {
                  "type": "string",
                  "enum": ["matching", "changed", "unknown"]
                }
              },
              "required": [
                "status",
                "operationId",
                "destination",
                "revision",
                "snapshot",
                "freshness"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "__schema29": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema22"
            }
          ]
        },
        "__schema30": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema17"
            }
          ]
        },
        "__schema31": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": ["settled", "nothing_pending", "aborted"]
            },
            "targets": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema6"
              }
            },
            "results": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema32"
              }
            },
            "cursor": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["status", "targets", "results", "cursor"],
          "additionalProperties": false
        },
        "__schema32": {
          "type": "object",
          "properties": {
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "summary": {
              "type": "string"
            },
            "execution": {
              "$ref": "#/definitions/__schema33"
            },
            "report": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "reportingError": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "finalizationErrors": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            },
            "transcript": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "session": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "usage": {
              "$ref": "#/definitions/__schema34"
            }
          },
          "required": ["ref", "summary", "execution", "artifacts", "usage"],
          "additionalProperties": false
        },
        "__schema33": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "queued"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "preparing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "running"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "stopping"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "finalizing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "ended"
                },
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled", "interrupted"]
                },
                "cleanup": {
                  "type": "string",
                  "enum": ["confirmed", "unconfirmed"]
                }
              },
              "required": ["phase", "reason", "cleanup"],
              "additionalProperties": false
            }
          ]
        },
        "__schema34": {
          "type": "object",
          "properties": {
            "expectedAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "observations": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema35"
              }
            },
            "complete": {
              "type": "boolean"
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "total": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema36"
                },
                {
                  "type": "null"
                }
              ]
            },
            "observedTotal": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema36"
                },
                {
                  "type": "null"
                }
              ]
            },
            "missingAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            }
          },
          "required": ["expectedAttempts", "observations", "complete"],
          "additionalProperties": false
        },
        "__schema35": {
          "type": "object",
          "properties": {
            "attempt": {
              "$ref": "#/definitions/__schema2"
            },
            "source": {
              "$ref": "#/definitions/__schema2"
            },
            "usage": {
              "$ref": "#/definitions/__schema36"
            },
            "kind": {
              "$ref": "#/definitions/__schema37"
            },
            "responseId": {
              "$ref": "#/definitions/__schema38"
            }
          },
          "required": ["attempt", "source", "usage"],
          "additionalProperties": false
        },
        "__schema36": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema3"
            },
            "output": {
              "$ref": "#/definitions/__schema3"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema3"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema3"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema37": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema38": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "__schema39": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema2"
            },
            "revision": {
              "$ref": "#/definitions/__schema3"
            },
            "nextSequence": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "workers": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema16"
              }
            },
            "assignments": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema40"
              }
            },
            "latest": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "exclusiveMinimum": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              }
            },
            "inbox": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema41"
              }
            },
            "receipts": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "payloadDigest": {
                    "$ref": "#/definitions/__schema18"
                  },
                  "receipt": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "required": ["payloadDigest", "receipt"],
                "additionalProperties": false
              }
            },
            "effects": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "effect": {
                    "$ref": "#/definitions/__schema42"
                  },
                  "status": {
                    "type": "string",
                    "enum": ["intent", "completed", "failed", "uncertain"]
                  },
                  "detail": {
                    "type": "string"
                  }
                },
                "required": ["effect", "status"],
                "additionalProperties": false
              }
            },
            "applications": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema26"
              }
            },
            "schedules": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema4"
              }
            },
            "attempts": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "attempt": {
                    "$ref": "#/definitions/__schema43"
                  },
                  "prepared": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema44"
                      }
                    ]
                  },
                  "capture": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema45"
                      }
                    ]
                  },
                  "identity": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema46"
                      }
                    ]
                  },
                  "enrollmentEvidence": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema17"
                    }
                  },
                  "outcome": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema47"
                      }
                    ]
                  },
                  "outcomeArtifact": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema17"
                      }
                    ]
                  },
                  "cleanup": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema50"
                      }
                    ]
                  },
                  "usageObservations": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema35"
                    }
                  },
                  "responses": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": ["started", "completed", "interrupted"]
                    }
                  }
                },
                "required": ["attempt", "enrollmentEvidence", "usageObservations", "responses"],
                "additionalProperties": false
              }
            },
            "sessions": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema48"
              }
            },
            "contextUsage": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema51"
              }
            },
            "cancelled": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "required": ["requestId"],
                "additionalProperties": false
              }
            },
            "attachment": {
              "type": "string",
              "enum": ["foreground", "background"]
            },
            "results": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "result": {
                    "$ref": "#/definitions/__schema32"
                  },
                  "artifact": {
                    "$ref": "#/definitions/__schema17"
                  }
                },
                "required": ["result", "artifact"],
                "additionalProperties": false
              }
            },
            "outbox": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema6"
                  },
                  "result": {
                    "$ref": "#/definitions/__schema17"
                  },
                  "state": {
                    "type": "string",
                    "enum": ["recorded", "dispatch_intent", "delivered", "consumed", "uncertain"]
                  },
                  "attempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/definitions/__schema2"
                        },
                        "state": {
                          "$ref": "#/definitions/__schema52"
                        },
                        "checkpoint": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema17"
                            }
                          ]
                        }
                      },
                      "required": ["id", "state"],
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["ref", "result", "state", "attempts"],
                "additionalProperties": false
              }
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "history": {
              "type": "object",
              "properties": {
                "source": {
                  "$ref": "#/definitions/__schema17"
                },
                "quiescence": {
                  "$ref": "#/definitions/__schema17"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema2"
                }
              },
              "required": ["source", "quiescence", "requestId"],
              "additionalProperties": false
            }
          },
          "required": [
            "run",
            "revision",
            "nextSequence",
            "workers",
            "assignments",
            "latest",
            "inbox",
            "receipts",
            "effects",
            "attempts",
            "sessions",
            "contextUsage",
            "cancelled",
            "attachment",
            "results",
            "outbox",
            "maxConcurrent"
          ],
          "additionalProperties": false
        },
        "__schema40": {
          "type": "object",
          "properties": {
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "sequence": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "task": {
              "$ref": "#/definitions/__schema2"
            },
            "after": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema6"
              }
            },
            "inputs": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema6"
              }
            },
            "context": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "execution": {
              "$ref": "#/definitions/__schema33"
            }
          },
          "required": ["ref", "sequence", "task", "after", "inputs", "context", "execution"],
          "additionalProperties": false
        },
        "__schema41": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "target": {
              "$ref": "#/definitions/__schema6"
            },
            "sender": {
              "$ref": "#/definitions/__schema2"
            },
            "kind": {
              "type": "string",
              "enum": ["initial", "follow_up", "steer", "notice"]
            },
            "text": {
              "$ref": "#/definitions/__schema2"
            },
            "state": {
              "type": "string",
              "enum": [
                "recorded",
                "dispatch_intent",
                "transport_queued",
                "transport_handled",
                "consumed",
                "uncertain"
              ]
            },
            "attempts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "dispatch_intent",
                      "transport_queued",
                      "transport_handled",
                      "consumed",
                      "uncertain"
                    ]
                  },
                  "checkpoint": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema17"
                      }
                    ]
                  }
                },
                "required": ["id", "state"],
                "additionalProperties": false
              }
            }
          },
          "required": ["id", "target", "sender", "kind", "text", "state", "attempts"],
          "additionalProperties": false
        },
        "__schema42": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "kind": {
              "type": "string",
              "enum": [
                "prepare",
                "launch",
                "steer",
                "cleanup",
                "checkpoint",
                "capture",
                "notification"
              ]
            },
            "input": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            }
          },
          "required": ["id", "ref", "kind"],
          "additionalProperties": false
        },
        "__schema43": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "ordinal": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "backend": {
              "$ref": "#/definitions/__schema11"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["id", "ref", "ordinal", "backend", "ownerEpoch"],
          "additionalProperties": false
        },
        "__schema44": {
          "type": "object",
          "properties": {
            "cwd": {
              "$ref": "#/definitions/__schema2"
            },
            "identity": {
              "$ref": "#/definitions/__schema2"
            },
            "lease": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema2"
                },
                "workspace": {
                  "$ref": "#/definitions/__schema2"
                }
              },
              "required": ["id", "workspace"],
              "additionalProperties": false
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            }
          },
          "required": ["cwd", "identity", "artifacts"],
          "additionalProperties": false
        },
        "__schema45": {
          "type": "object",
          "properties": {
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "errors": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            }
          },
          "required": ["artifacts"],
          "additionalProperties": false
        },
        "__schema46": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "kind": {
              "$ref": "#/definitions/__schema11"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["id", "kind", "ownerEpoch"],
          "additionalProperties": false
        },
        "__schema47": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "enum": ["completed", "failed", "cancelled"]
            },
            "summary": {
              "type": "string"
            },
            "usage": {
              "$ref": "#/definitions/__schema34"
            },
            "report": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "reportingError": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "session": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema48"
                }
              ]
            },
            "transcript": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            },
            "error": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["reason", "summary", "usage", "artifacts"],
          "additionalProperties": false
        },
        "__schema48": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema2"
                },
                "worker": {
                  "$ref": "#/definitions/__schema2"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema17"
                },
                "branch": {
                  "$ref": "#/definitions/__schema2"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema49"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema2"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema2"
                },
                "worker": {
                  "$ref": "#/definitions/__schema2"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema17"
                },
                "branch": {
                  "$ref": "#/definitions/__schema2"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema49"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema2"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "__schema49": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema17"
            }
          ]
        },
        "__schema50": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "stopped"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema2"
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema17"
                  }
                }
              },
              "required": ["status", "ownerEpoch", "identities", "evidence"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "unconfirmed"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema2"
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "reasons": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema17"
                  }
                }
              },
              "required": ["status", "ownerEpoch", "identities", "reasons", "evidence"],
              "additionalProperties": false
            }
          ]
        },
        "__schema51": {
          "type": "object",
          "properties": {
            "tokens": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema3"
                },
                {
                  "type": "null"
                }
              ]
            },
            "window": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "percent": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "source": {
              "$ref": "#/definitions/__schema2"
            },
            "timestamp": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["tokens", "window", "percent", "source", "timestamp"],
          "additionalProperties": false
        },
        "__schema52": {
          "type": "string",
          "enum": ["dispatch_intent", "delivered", "consumed", "uncertain"]
        },
        "__schema53": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema53"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema53"
              }
            }
          ]
        },
        "__schema54": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema2"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema18"
            },
            "receipt": {
              "$ref": "#/definitions/__schema1"
            },
            "workers": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema16"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema40"
              }
            },
            "messages": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema41"
              }
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "kind",
            "requestId",
            "payloadDigest",
            "receipt",
            "workers",
            "assignments",
            "messages"
          ],
          "additionalProperties": false
        },
        "__schema55": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema55"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema55"
              }
            }
          ]
        }
      }
    },
    "pinata.surface-capabilities.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "live": {
          "type": "boolean"
        },
        "control": {
          "type": "boolean"
        },
        "wait": {
          "type": "boolean"
        },
        "recover": {
          "type": "boolean"
        },
        "notifications": {
          "type": "boolean"
        },
        "snapshots": {
          "type": "boolean",
          "const": true
        }
      },
      "required": ["live", "control", "wait", "recover", "notifications", "snapshots"],
      "additionalProperties": false
    },
    "pinata.application-journal.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "kind": {
          "type": "string",
          "const": "pinata-application-journal"
        },
        "destination": {
          "$ref": "#/definitions/__schema0"
        },
        "revision": {
          "$ref": "#/definitions/__schema1"
        },
        "cursors": {
          "$ref": "#/definitions/__schema2"
        },
        "operations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/definitions/__schema0"
              },
              "direction": {
                "type": "string",
                "enum": ["apply", "rollback"]
              },
              "mode": {
                "default": "delivery",
                "type": "string",
                "enum": ["delivery", "input"]
              },
              "phase": {
                "type": "string",
                "enum": ["pending", "applied", "rolled_back"]
              },
              "rollbackOf": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema0"
                  }
                ]
              },
              "destination": {
                "$ref": "#/definitions/__schema0"
              },
              "repository": {
                "type": "object",
                "properties": {
                  "root": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "commonDirectory": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "gitDirectory": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "objectFormat": {
                    "type": "string",
                    "enum": ["sha1", "sha256"]
                  },
                  "head": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema5"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "branch": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "indexDigest": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema4"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "root",
                  "commonDirectory",
                  "gitDirectory",
                  "objectFormat",
                  "head",
                  "branch",
                  "indexDigest"
                ],
                "additionalProperties": false
              },
              "snapshot": {
                "$ref": "#/definitions/__schema3"
              },
              "changes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "before": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/__schema6"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "after": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/__schema6"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["path", "before", "after"],
                  "additionalProperties": false
                }
              },
              "beforeCursors": {
                "$ref": "#/definitions/__schema2"
              },
              "afterCursors": {
                "$ref": "#/definitions/__schema2"
              },
              "lease": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "checkout": {
                    "type": "object",
                    "properties": {
                      "root": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "device": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "inode": {
                        "$ref": "#/definitions/__schema0"
                      }
                    },
                    "required": ["root", "device", "inode"],
                    "additionalProperties": false
                  },
                  "owner": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "host": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "pid": {
                        "exclusiveMinimum": 0,
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema1"
                          }
                        ]
                      },
                      "startIdentity": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "token": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "epoch": {
                        "$ref": "#/definitions/__schema0"
                      }
                    },
                    "required": ["schemaVersion", "host", "pid", "startIdentity", "token", "epoch"],
                    "additionalProperties": false
                  },
                  "ownerEpoch": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "kind": {
                    "type": "string",
                    "const": "exclusive"
                  },
                  "operationId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "purpose": {
                    "type": "string",
                    "enum": ["apply", "rollback", "recovery"]
                  }
                },
                "required": [
                  "schemaVersion",
                  "id",
                  "checkout",
                  "owner",
                  "ownerEpoch",
                  "kind",
                  "operationId",
                  "purpose"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "direction",
              "phase",
              "destination",
              "repository",
              "snapshot",
              "changes",
              "beforeCursors",
              "afterCursors",
              "lease"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": ["schemaVersion", "kind", "destination", "revision", "cursors", "operations"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema2": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "destination": {
                "$ref": "#/definitions/__schema0"
              },
              "ref": {
                "type": "object",
                "properties": {
                  "run": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "worker": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,31}$"
                  },
                  "assignment": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  }
                },
                "required": ["run", "worker", "assignment"],
                "additionalProperties": false
              },
              "snapshot": {
                "$ref": "#/definitions/__schema3"
              },
              "manifest": {
                "$ref": "#/definitions/__schema3"
              },
              "tree": {
                "$ref": "#/definitions/__schema5"
              },
              "operationId": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "required": ["destination", "ref", "snapshot", "manifest", "tree", "operationId"],
            "additionalProperties": false
          }
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema4"
            },
            "size": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema5": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        },
        "__schema6": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": ["100644", "100755"]
            },
            "blob": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["mode", "blob"],
          "additionalProperties": false
        }
      }
    },
    "pinata.application-cursor.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "destination": {
          "$ref": "#/definitions/__schema0"
        },
        "ref": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "snapshot": {
          "$ref": "#/definitions/__schema2"
        },
        "manifest": {
          "$ref": "#/definitions/__schema2"
        },
        "tree": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        },
        "operationId": {
          "$ref": "#/definitions/__schema0"
        }
      },
      "required": ["destination", "ref", "snapshot", "manifest", "tree", "operationId"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        }
      }
    },
    "pinata.application-receipt.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": ["applied", "rolled_back", "already_recorded"]
        },
        "operationId": {
          "$ref": "#/definitions/__schema0"
        },
        "destination": {
          "$ref": "#/definitions/__schema0"
        },
        "revision": {
          "$ref": "#/definitions/__schema1"
        },
        "snapshot": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "freshness": {
          "type": "string",
          "enum": ["matching", "changed", "unknown"]
        }
      },
      "required": ["status", "operationId", "destination", "revision", "snapshot", "freshness"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      }
    },
    "pinata.workspace-snapshot.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "$ref": "#/definitions/__schema0"
        },
        "kind": {
          "$ref": "#/definitions/__schema1"
        },
        "ref": {
          "$ref": "#/definitions/__schema2"
        },
        "mode": {
          "$ref": "#/definitions/__schema5"
        },
        "root": {
          "$ref": "#/definitions/__schema3"
        },
        "base": {
          "$ref": "#/definitions/__schema6"
        },
        "manifest": {
          "$ref": "#/definitions/__schema6"
        },
        "baseTree": {
          "$ref": "#/definitions/__schema7"
        },
        "tree": {
          "$ref": "#/definitions/__schema9"
        },
        "head": {
          "$ref": "#/definitions/__schema10"
        },
        "checkpoint": {
          "$ref": "#/definitions/__schema11"
        }
      },
      "required": ["schemaVersion", "kind", "ref", "mode", "root", "base", "manifest"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "number",
          "const": 1
        },
        "__schema1": {
          "type": "string",
          "const": "workspace-snapshot"
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema3"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema3": {
          "type": "string",
          "minLength": 1
        },
        "__schema4": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema5": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema6": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema4"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema7": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema8"
            }
          ]
        },
        "__schema8": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        },
        "__schema9": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema8"
            }
          ]
        },
        "__schema10": {
          "type": "object",
          "properties": {
            "commit": {
              "$ref": "#/definitions/__schema8"
            },
            "ref": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["commit", "ref"],
          "additionalProperties": false
        },
        "__schema11": {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "kind": {
              "type": "string",
              "const": "completion"
            },
            "status": {
              "type": "string",
              "enum": ["created", "unchanged"]
            },
            "assignment": {
              "$ref": "#/definitions/__schema2"
            },
            "tree": {
              "$ref": "#/definitions/__schema8"
            },
            "commit": {
              "$ref": "#/definitions/__schema8"
            },
            "ref": {
              "$ref": "#/definitions/__schema3"
            },
            "previous": {
              "type": "object",
              "properties": {
                "tree": {
                  "$ref": "#/definitions/__schema8"
                },
                "commit": {
                  "$ref": "#/definitions/__schema8"
                },
                "ref": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["tree", "commit", "ref"],
              "additionalProperties": false
            },
            "author": {
              "type": "object",
              "properties": {
                "name": {
                  "$ref": "#/definitions/__schema3"
                },
                "email": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["name", "email"],
              "additionalProperties": false
            },
            "recordedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "schemaVersion",
            "kind",
            "status",
            "assignment",
            "tree",
            "commit",
            "ref",
            "previous",
            "author",
            "recordedAt"
          ],
          "additionalProperties": false
        }
      }
    },
    "pinata.workspace-manifest.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "entries": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "path": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "blob": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "objectId": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "mode": {
                    "type": "string",
                    "const": "100644"
                  }
                },
                "required": ["path", "blob", "mode"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "path": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "blob": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "objectId": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "mode": {
                    "type": "string",
                    "const": "100755"
                  }
                },
                "required": ["path", "blob", "mode"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "path": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "blob": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "objectId": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "mode": {
                    "type": "string",
                    "const": "120000"
                  }
                },
                "required": ["path", "blob", "mode"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "path": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "mode": {
                    "type": "string",
                    "const": "160000"
                  },
                  "objectId": {
                    "$ref": "#/definitions/__schema4"
                  }
                },
                "required": ["path", "mode", "objectId"],
                "additionalProperties": false
              }
            ]
          }
        },
        "repository": {
          "type": "object",
          "properties": {
            "root": {
              "$ref": "#/definitions/__schema0"
            },
            "commonDirectory": {
              "$ref": "#/definitions/__schema0"
            },
            "gitDirectory": {
              "$ref": "#/definitions/__schema0"
            },
            "objectFormat": {
              "type": "string",
              "enum": ["sha1", "sha256"]
            },
            "head": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema4"
                },
                {
                  "type": "null"
                }
              ]
            },
            "branch": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema0"
                },
                {
                  "type": "null"
                }
              ]
            },
            "indexDigest": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema2"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "root",
            "commonDirectory",
            "gitDirectory",
            "objectFormat",
            "head",
            "branch",
            "indexDigest"
          ],
          "additionalProperties": false
        },
        "observation": {
          "type": "object",
          "properties": {
            "startedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "endedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "fingerprint": {
              "$ref": "#/definitions/__schema2"
            },
            "status": {
              "type": "string",
              "enum": ["stable", "unstable"]
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": ["startedAt", "endedAt", "fingerprint", "status", "scope"],
          "additionalProperties": false
        }
      },
      "required": ["schemaVersion", "entries", "observation"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema2"
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema3": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema4"
            }
          ]
        },
        "__schema4": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        }
      }
    },
    "pinata.workspace-plan.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "mode": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "source": {
          "$ref": "#/definitions/__schema0"
        },
        "destination": {
          "$ref": "#/definitions/__schema0"
        },
        "run": {
          "$ref": "#/definitions/__schema0"
        },
        "worker": {
          "$ref": "#/definitions/__schema0"
        },
        "base": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "baseTree": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema3"
            }
          ]
        },
        "repository": {
          "type": "object",
          "properties": {
            "root": {
              "$ref": "#/definitions/__schema0"
            },
            "commonDirectory": {
              "$ref": "#/definitions/__schema0"
            },
            "gitDirectory": {
              "$ref": "#/definitions/__schema0"
            },
            "objectFormat": {
              "type": "string",
              "enum": ["sha1", "sha256"]
            },
            "head": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema3"
                },
                {
                  "type": "null"
                }
              ]
            },
            "branch": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema0"
                },
                {
                  "type": "null"
                }
              ]
            },
            "indexDigest": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema2"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "root",
            "commonDirectory",
            "gitDirectory",
            "objectFormat",
            "head",
            "branch",
            "indexDigest"
          ],
          "additionalProperties": false
        },
        "includedFiles": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        }
      },
      "required": ["schemaVersion", "mode", "source", "destination", "run", "worker"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema2"
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema3": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        }
      }
    },
    "pinata.memory-snapshot.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "scope": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "worker"
                },
                "project": {
                  "$ref": "#/definitions/__schema0"
                },
                "run": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["kind", "project", "run", "worker"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "project-agent"
                },
                "project": {
                  "$ref": "#/definitions/__schema0"
                },
                "agent": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["kind", "project", "agent"],
              "additionalProperties": false
            }
          ]
        },
        "revision": {
          "$ref": "#/definitions/__schema2"
        },
        "value": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "data": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                }
              },
              "required": ["text"],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "record": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema4"
            }
          ]
        },
        "provenance": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "$ref": "#/definitions/__schema1"
            },
            "agent": {
              "$ref": "#/definitions/__schema1"
            },
            "definition": {
              "$ref": "#/definitions/__schema4"
            }
          },
          "required": ["run", "worker", "agent", "definition"],
          "additionalProperties": false
        }
      },
      "required": ["scope", "revision", "value"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema3"
              }
            }
          ]
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        }
      }
    },
    "pinata.memory-revision.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "scope": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "worker"
                },
                "project": {
                  "$ref": "#/definitions/__schema0"
                },
                "run": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["kind", "project", "run", "worker"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "project-agent"
                },
                "project": {
                  "$ref": "#/definitions/__schema0"
                },
                "agent": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["kind", "project", "agent"],
              "additionalProperties": false
            }
          ]
        },
        "revision": {
          "exclusiveMinimum": 0,
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "previous": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema3"
            }
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "data": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                }
              },
              "required": ["text"],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "provenance": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "$ref": "#/definitions/__schema1"
            },
            "agent": {
              "$ref": "#/definitions/__schema1"
            },
            "definition": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["run", "worker", "agent", "definition"],
          "additionalProperties": false
        }
      },
      "required": ["schemaVersion", "scope", "revision", "value", "provenance"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema4": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema4"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema4"
              }
            }
          ]
        }
      }
    },
    "pinata.memory-edit.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "expectedRevision": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "text": {
          "type": "string"
        },
        "data": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        }
      },
      "required": ["expectedRevision", "text"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema0"
              }
            }
          ]
        }
      }
    },
    "pinata.memory-clear.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "expectedRevision": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": ["expectedRevision"],
      "additionalProperties": false
    },
    "pinata.command.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "requestId": {
          "$ref": "#/definitions/__schema0"
        },
        "expectedRevision": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "command": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "create"
                },
                "workers": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "config": {
                  "type": "object",
                  "properties": {
                    "schemaVersion": {
                      "type": "number",
                      "const": 1
                    },
                    "workspace": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema6"
                        }
                      ]
                    },
                    "models": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "$ref": "#/definitions/__schema7"
                      }
                    },
                    "fallbacks": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema7"
                        }
                      }
                    },
                    "toolProviders": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "extension": {
                            "$ref": "#/definitions/__schema0"
                          },
                          "tools": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema0"
                            }
                          }
                        },
                        "required": ["extension", "tools"],
                        "additionalProperties": false
                      }
                    },
                    "passEnv": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Z0-9_]*$"
                      }
                    },
                    "webExtension": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    },
                    "setup": {
                      "anyOf": [
                        {
                          "type": "boolean",
                          "const": false
                        },
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    },
                    "worktreeRoot": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    },
                    "codemode": {
                      "type": "boolean"
                    },
                    "includeUncommitted": {
                      "type": "boolean"
                    },
                    "mode": {
                      "type": "string",
                      "enum": ["lean", "observe"]
                    },
                    "backend": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema8"
                        }
                      ]
                    },
                    "execution": {
                      "type": "object",
                      "properties": {
                        "maxConcurrent": {
                          "default": null,
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema1"
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "ui": {
                      "type": "object",
                      "properties": {
                        "palette": {
                          "default": "inherit",
                          "type": "string",
                          "enum": [
                            "inherit",
                            "pinata",
                            "catppuccin-mocha",
                            "catppuccin-latte",
                            "gruvbox-dark",
                            "gruvbox-light",
                            "tokyo-night-night",
                            "rose-pine-main",
                            "rose-pine-dawn",
                            "dracula",
                            "nord",
                            "one-dark",
                            "one-light",
                            "solarized-dark",
                            "solarized-light",
                            "terminal-default"
                          ]
                        },
                        "motion": {
                          "default": "full",
                          "type": "string",
                          "enum": ["full", "reduced", "off"]
                        },
                        "keys": {
                          "default": {},
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "$ref": "#/definitions/__schema0"
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": ["kind", "workers"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "add"
                },
                "workers": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                }
              },
              "required": ["kind", "workers"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "follow_up"
                },
                "worker": {
                  "$ref": "#/definitions/__schema3"
                },
                "messageId": {
                  "$ref": "#/definitions/__schema0"
                },
                "text": {
                  "$ref": "#/definitions/__schema0"
                },
                "after": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema3"
                      },
                      {
                        "$ref": "#/definitions/__schema4"
                      }
                    ]
                  }
                },
                "inputs": {
                  "default": [],
                  "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema10"
                    }
                  ]
                }
              },
              "required": ["kind", "worker", "messageId", "text"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "steer"
                },
                "worker": {
                  "$ref": "#/definitions/__schema3"
                },
                "messageId": {
                  "$ref": "#/definitions/__schema0"
                },
                "text": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["kind", "worker", "messageId", "text"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "cancel"
                },
                "scope": {
                  "type": "string",
                  "enum": ["assignment", "worker", "run"]
                },
                "worker": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                },
                "assignment": {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                },
                "descendants": {
                  "default": true,
                  "type": "boolean"
                }
              },
              "required": ["kind", "scope"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "background"
                }
              },
              "required": ["kind"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "continue"
                },
                "worker": {
                  "$ref": "#/definitions/__schema3"
                },
                "messageId": {
                  "$ref": "#/definitions/__schema0"
                },
                "text": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["kind", "worker", "messageId", "text"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "capacity"
                },
                "maxConcurrent": {
                  "anyOf": [
                    {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": ["kind", "maxConcurrent"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "schedule"
                },
                "schedule": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "const": "create"
                        },
                        "id": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "target": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "worker": {
                                  "$ref": "#/definitions/__schema3"
                                }
                              },
                              "required": ["worker"],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "template": {
                                  "$ref": "#/definitions/__schema2"
                                }
                              },
                              "required": ["template"],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "trigger": {
                          "$ref": "#/definitions/__schema11"
                        },
                        "overlap": {
                          "default": "skip",
                          "type": "string",
                          "enum": ["skip", "queue"]
                        }
                      },
                      "required": ["action", "id", "target", "trigger"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "const": "update"
                        },
                        "id": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "target": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "worker": {
                                  "$ref": "#/definitions/__schema3"
                                }
                              },
                              "required": ["worker"],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "template": {
                                  "$ref": "#/definitions/__schema2"
                                }
                              },
                              "required": ["template"],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "trigger": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema11"
                            }
                          ]
                        },
                        "overlap": {
                          "type": "string",
                          "enum": ["skip", "queue"]
                        }
                      },
                      "required": ["action", "id"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "const": "pause"
                        },
                        "id": {
                          "$ref": "#/definitions/__schema3"
                        }
                      },
                      "required": ["action", "id"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "const": "resume"
                        },
                        "id": {
                          "$ref": "#/definitions/__schema3"
                        }
                      },
                      "required": ["action", "id"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "const": "delete"
                        },
                        "id": {
                          "$ref": "#/definitions/__schema3"
                        }
                      },
                      "required": ["action", "id"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "const": "list"
                        }
                      },
                      "required": ["action"],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "required": ["kind", "schedule"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "apply"
                },
                "ref": {
                  "$ref": "#/definitions/__schema4"
                },
                "destination": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["kind", "ref", "destination"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "rollback"
                },
                "operation": {
                  "$ref": "#/definitions/__schema0"
                },
                "destination": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["kind", "operation", "destination"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "reconcile"
                },
                "operation": {
                  "$ref": "#/definitions/__schema0"
                },
                "owner": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["kind", "operation", "owner"],
              "additionalProperties": false
            }
          ]
        }
      },
      "required": ["requestId", "command"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema3"
            },
            "agent": {
              "$ref": "#/definitions/__schema3"
            },
            "task": {
              "$ref": "#/definitions/__schema0"
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "messageId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "after": {
              "default": [],
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  },
                  {
                    "$ref": "#/definitions/__schema4"
                  }
                ]
              }
            },
            "inputs": {
              "default": [],
              "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "workspace": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "backend": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "lifetime": {
              "type": "string",
              "enum": ["attached", "surviving"]
            },
            "context": {
              "default": [],
              "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
              "allOf": [
                {
                  "$ref": "#/definitions/__schema9"
                }
              ]
            },
            "inheritContext": {
              "type": "string",
              "enum": ["none", "parent"]
            },
            "memory": {
              "type": "object",
              "properties": {
                "scope": {
                  "type": "string",
                  "enum": ["none", "worker", "project-agent"]
                },
                "access": {
                  "type": "string",
                  "enum": ["read", "write"]
                }
              },
              "required": ["scope", "access"],
              "additionalProperties": false
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["maxDepth"],
              "additionalProperties": false
            }
          },
          "required": ["id", "agent", "task"],
          "additionalProperties": false
        },
        "__schema3": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "$ref": "#/definitions/__schema3"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema5": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema4"
          }
        },
        "__schema6": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema7": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema0"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema8": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema9": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema10": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema4"
          }
        },
        "__schema11": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "at"
                },
                "at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": ["kind", "at"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "interval"
                },
                "milliseconds": {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                }
              },
              "required": ["kind", "milliseconds"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "cron"
                },
                "expression": {
                  "$ref": "#/definitions/__schema0"
                },
                "timezone": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["kind", "expression", "timezone"],
              "additionalProperties": false
            }
          ]
        }
      }
    },
    "pinata.receipt.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema0"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "operationId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "schedules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "sessionId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "revision": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  },
                  "trigger": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "at"
                          },
                          "at": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": ["kind", "at"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "interval"
                          },
                          "milliseconds": {
                            "exclusiveMinimum": 0,
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema1"
                              }
                            ]
                          }
                        },
                        "required": ["kind", "milliseconds"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "cron"
                          },
                          "expression": {
                            "$ref": "#/definitions/__schema0"
                          },
                          "timezone": {
                            "$ref": "#/definitions/__schema0"
                          }
                        },
                        "required": ["kind", "expression", "timezone"],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "overlap": {
                    "type": "string",
                    "enum": ["skip", "queue"]
                  },
                  "status": {
                    "type": "string",
                    "enum": ["paused", "active", "completed", "deleted", "closed"]
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "worker": {
                        "$ref": "#/definitions/__schema2"
                      }
                    },
                    "required": ["worker"],
                    "additionalProperties": false
                  },
                  "task": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "request": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "$ref": "#/definitions/__schema2"
                          },
                          "agent": {
                            "$ref": "#/definitions/__schema2"
                          },
                          "task": {
                            "$ref": "#/definitions/__schema0"
                          },
                          "origin": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema3"
                              }
                            ]
                          },
                          "messageId": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema0"
                              }
                            ]
                          },
                          "after": {
                            "default": [],
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "$ref": "#/definitions/__schema2"
                                },
                                {
                                  "$ref": "#/definitions/__schema3"
                                }
                              ]
                            }
                          },
                          "inputs": {
                            "default": [],
                            "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema4"
                              }
                            ]
                          },
                          "workspace": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema5"
                              }
                            ]
                          },
                          "observeWorkspace": {
                            "type": "boolean"
                          },
                          "model": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema6"
                              }
                            ]
                          },
                          "backend": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema7"
                              }
                            ]
                          },
                          "lifetime": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema8"
                              }
                            ]
                          },
                          "context": {
                            "default": [],
                            "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema9"
                              }
                            ]
                          },
                          "inheritContext": {
                            "type": "string",
                            "enum": ["none", "parent"]
                          },
                          "memory": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema10"
                              }
                            ]
                          },
                          "delegation": {
                            "type": "object",
                            "properties": {
                              "maxDepth": {
                                "$ref": "#/definitions/__schema1"
                              }
                            },
                            "required": ["maxDepth"],
                            "additionalProperties": false
                          }
                        },
                        "required": ["id", "agent", "task"],
                        "additionalProperties": false
                      },
                      "worker": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "$ref": "#/definitions/__schema2"
                          },
                          "agent": {
                            "$ref": "#/definitions/__schema2"
                          },
                          "definition": {
                            "$ref": "#/definitions/__schema12"
                          },
                          "color": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "accent.blue",
                                  "accent.cyan",
                                  "accent.green",
                                  "accent.yellow",
                                  "accent.orange",
                                  "accent.red",
                                  "accent.pink",
                                  "accent.purple"
                                ]
                              },
                              {
                                "type": "string",
                                "pattern": "^#[0-9a-fA-F]{6}$"
                              }
                            ]
                          },
                          "loadout": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema12"
                              }
                            ]
                          },
                          "model": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema6"
                              }
                            ]
                          },
                          "fallbacks": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema6"
                            }
                          },
                          "tools": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema0"
                            }
                          },
                          "access": {
                            "$ref": "#/definitions/__schema11"
                          },
                          "workspace": {
                            "$ref": "#/definitions/__schema5"
                          },
                          "observeWorkspace": {
                            "type": "boolean"
                          },
                          "backend": {
                            "$ref": "#/definitions/__schema7"
                          },
                          "lifetime": {
                            "$ref": "#/definitions/__schema8"
                          },
                          "grants": {
                            "$ref": "#/definitions/__schema13"
                          },
                          "origin": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema3"
                              }
                            ]
                          },
                          "parentAssignment": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema3"
                              }
                            ]
                          },
                          "depth": {
                            "default": 0,
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema1"
                              }
                            ]
                          },
                          "config": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema12"
                              }
                            ]
                          },
                          "context": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema12"
                              }
                            ]
                          },
                          "workspacePlan": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema12"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "agent",
                          "definition",
                          "fallbacks",
                          "tools",
                          "access",
                          "workspace",
                          "backend",
                          "lifetime",
                          "grants"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": ["request", "worker"],
                    "additionalProperties": false
                  },
                  "nextAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lastLocalKey": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      }
                    ]
                  },
                  "activatedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "occurrences": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "scheduledAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "status": {
                          "type": "string",
                          "enum": ["accepted", "skipped", "missed"]
                        },
                        "ref": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema3"
                            }
                          ]
                        },
                        "reason": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema0"
                            }
                          ]
                        },
                        "through": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        }
                      },
                      "required": ["scheduledAt", "status"],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "sessionId",
                  "revision",
                  "trigger",
                  "overlap",
                  "status",
                  "target",
                  "task",
                  "nextAt",
                  "occurrences"
                ],
                "additionalProperties": false
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "resolved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "workspace": {
                    "$ref": "#/definitions/__schema5"
                  },
                  "backend": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "lifetime": {
                    "$ref": "#/definitions/__schema8"
                  },
                  "grants": {
                    "$ref": "#/definitions/__schema13"
                  }
                },
                "required": ["ref", "workspace", "backend", "lifetime", "grants"],
                "additionalProperties": false
              }
            }
          },
          "required": ["status", "requestId", "revision", "assignments", "resolved"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "rejected"
            },
            "requestId": {
              "$ref": "#/definitions/__schema0"
            },
            "revision": {
              "$ref": "#/definitions/__schema1"
            },
            "error": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "invalid_input",
                    "dependency_missing",
                    "capability_denied",
                    "unsupported",
                    "conflict",
                    "owner_unconfirmed",
                    "context_unavailable",
                    "commit_unknown"
                  ]
                },
                "message": {
                  "$ref": "#/definitions/__schema0"
                },
                "field": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema0"
                    }
                  ]
                }
              },
              "required": ["code", "message"],
              "additionalProperties": false
            }
          },
          "required": ["status", "requestId", "revision", "error"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema2": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "$ref": "#/definitions/__schema2"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema3"
          }
        },
        "__schema5": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema6": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema0"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema7": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema8": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "__schema9": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema10": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema11"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "__schema11": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema12": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema13": {
          "type": "object",
          "properties": {
            "access": {
              "$ref": "#/definitions/__schema11"
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "workspaces": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema5"
              }
            },
            "inheritContext": {
              "type": "boolean"
            },
            "memory": {
              "$ref": "#/definitions/__schema10"
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema1"
                },
                "agents": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "workspaces": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema5"
                  }
                }
              },
              "required": ["maxDepth", "agents", "tools", "workspaces"],
              "additionalProperties": false
            }
          },
          "required": ["access", "tools", "workspaces", "inheritContext", "memory", "delegation"],
          "additionalProperties": false
        }
      }
    },
    "pinata.job.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "workers": {
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema0"
          }
        },
        "config": {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "workspace": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "models": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema7"
              }
            },
            "fallbacks": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema7"
                }
              }
            },
            "toolProviders": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "extension": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema2"
                    }
                  }
                },
                "required": ["extension", "tools"],
                "additionalProperties": false
              }
            },
            "passEnv": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z][A-Z0-9_]*$"
              }
            },
            "webExtension": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "setup": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "worktreeRoot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "codemode": {
              "type": "boolean"
            },
            "includeUncommitted": {
              "type": "boolean"
            },
            "mode": {
              "type": "string",
              "enum": ["lean", "observe"]
            },
            "backend": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "execution": {
              "type": "object",
              "properties": {
                "maxConcurrent": {
                  "default": null,
                  "anyOf": [
                    {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema4"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false
            },
            "ui": {
              "type": "object",
              "properties": {
                "palette": {
                  "default": "inherit",
                  "type": "string",
                  "enum": [
                    "inherit",
                    "pinata",
                    "catppuccin-mocha",
                    "catppuccin-latte",
                    "gruvbox-dark",
                    "gruvbox-light",
                    "tokyo-night-night",
                    "rose-pine-main",
                    "rose-pine-dawn",
                    "dracula",
                    "nord",
                    "one-dark",
                    "one-light",
                    "solarized-dark",
                    "solarized-light",
                    "terminal-default"
                  ]
                },
                "motion": {
                  "default": "full",
                  "type": "string",
                  "enum": ["full", "reduced", "off"]
                },
                "keys": {
                  "default": {},
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/definitions/__schema2"
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        }
      },
      "required": ["schemaVersion", "workers"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema1"
            },
            "agent": {
              "$ref": "#/definitions/__schema1"
            },
            "task": {
              "$ref": "#/definitions/__schema2"
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "messageId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "after": {
              "default": [],
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/__schema1"
                  },
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              }
            },
            "inputs": {
              "default": [],
              "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "workspace": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "backend": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "lifetime": {
              "type": "string",
              "enum": ["attached", "surviving"]
            },
            "context": {
              "default": [],
              "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
              "allOf": [
                {
                  "$ref": "#/definitions/__schema9"
                }
              ]
            },
            "inheritContext": {
              "type": "string",
              "enum": ["none", "parent"]
            },
            "memory": {
              "type": "object",
              "properties": {
                "scope": {
                  "type": "string",
                  "enum": ["none", "worker", "project-agent"]
                },
                "access": {
                  "type": "string",
                  "enum": ["read", "write"]
                }
              },
              "required": ["scope", "access"],
              "additionalProperties": false
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema4"
                }
              },
              "required": ["maxDepth"],
              "additionalProperties": false
            }
          },
          "required": ["id", "agent", "task"],
          "additionalProperties": false
        },
        "__schema1": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema2": {
          "type": "string",
          "minLength": 1
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema2"
            },
            "worker": {
              "$ref": "#/definitions/__schema1"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema5": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema3"
          }
        },
        "__schema6": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema7": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema2"
            },
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema8": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema9": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "pinata.config.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "default": 1,
          "type": "number",
          "const": 1
        },
        "workspace": {
          "default": "shared",
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "models": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/definitions/__schema0"
          }
        },
        "fallbacks": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "$ref": "#/definitions/__schema0"
            }
          }
        },
        "toolProviders": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "extension": {
                "$ref": "#/definitions/__schema1"
              },
              "tools": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema1"
                }
              }
            },
            "required": ["extension", "tools"],
            "additionalProperties": false
          }
        },
        "passEnv": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9_]*$"
          }
        },
        "webExtension": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "setup": {
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "worktreeRoot": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "codemode": {
          "default": true,
          "type": "boolean"
        },
        "includeUncommitted": {
          "default": true,
          "type": "boolean"
        },
        "mode": {
          "default": "lean",
          "type": "string",
          "enum": ["lean", "observe"]
        },
        "backend": {
          "default": "in-process",
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "execution": {
          "default": {
            "maxConcurrent": null
          },
          "type": "object",
          "properties": {
            "maxConcurrent": {
              "default": null,
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "ui": {
          "default": {
            "palette": "inherit",
            "motion": "full",
            "keys": {}
          },
          "type": "object",
          "properties": {
            "palette": {
              "default": "inherit",
              "type": "string",
              "enum": [
                "inherit",
                "pinata",
                "catppuccin-mocha",
                "catppuccin-latte",
                "gruvbox-dark",
                "gruvbox-light",
                "tokyo-night-night",
                "rose-pine-main",
                "rose-pine-dawn",
                "dracula",
                "nord",
                "one-dark",
                "one-light",
                "solarized-dark",
                "solarized-light",
                "terminal-default"
              ]
            },
            "motion": {
              "default": "full",
              "type": "string",
              "enum": ["full", "reduced", "off"]
            },
            "keys": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema1"
              }
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema1"
            },
            "id": {
              "$ref": "#/definitions/__schema1"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.config-layer.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "workspace": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "models": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/definitions/__schema0"
          }
        },
        "fallbacks": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "$ref": "#/definitions/__schema0"
            }
          }
        },
        "toolProviders": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "extension": {
                "$ref": "#/definitions/__schema1"
              },
              "tools": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema1"
                }
              }
            },
            "required": ["extension", "tools"],
            "additionalProperties": false
          }
        },
        "passEnv": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9_]*$"
          }
        },
        "webExtension": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "setup": {
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "worktreeRoot": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "codemode": {
          "type": "boolean"
        },
        "includeUncommitted": {
          "type": "boolean"
        },
        "mode": {
          "type": "string",
          "enum": ["lean", "observe"]
        },
        "backend": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "execution": {
          "type": "object",
          "properties": {
            "maxConcurrent": {
              "default": null,
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "ui": {
          "type": "object",
          "properties": {
            "palette": {
              "default": "inherit",
              "type": "string",
              "enum": [
                "inherit",
                "pinata",
                "catppuccin-mocha",
                "catppuccin-latte",
                "gruvbox-dark",
                "gruvbox-light",
                "tokyo-night-night",
                "rose-pine-main",
                "rose-pine-dawn",
                "dracula",
                "nord",
                "one-dark",
                "one-light",
                "solarized-dark",
                "solarized-light",
                "terminal-default"
              ]
            },
            "motion": {
              "default": "full",
              "type": "string",
              "enum": ["full", "reduced", "off"]
            },
            "keys": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema1"
              }
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema1"
            },
            "id": {
              "$ref": "#/definitions/__schema1"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.definition.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "name": {
          "$ref": "#/definitions/__schema0"
        },
        "instructions": {
          "type": "string"
        },
        "handoffDescription": {
          "$ref": "#/definitions/__schema1"
        },
        "model": {
          "type": "string",
          "pattern": "^[^/\\s]+\\/.+$"
        },
        "modelSettings": {
          "default": {},
          "type": "object",
          "properties": {
            "reasoning": {
              "type": "object",
              "properties": {
                "effort": {
                  "$ref": "#/definitions/__schema2"
                }
              },
              "required": ["effort"],
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "tools": {
          "default": [],
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema1"
          }
        },
        "handoffs": {
          "default": [],
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema0"
          }
        },
        "outputType": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "pinata": {
          "default": {
            "access": "read",
            "workspace": "shared",
            "skills": [],
            "fallbacks": [],
            "inheritContext": "none",
            "memory": {
              "scope": "none",
              "access": "read"
            },
            "delegation": {
              "maxDepth": 0
            },
            "checkpoint": "completion"
          },
          "type": "object",
          "properties": {
            "access": {
              "default": "read",
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "workspace": {
              "default": "shared",
              "type": "string",
              "enum": ["shared", "worktree"]
            },
            "skills": {
              "default": [],
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            },
            "fallbacks": {
              "default": [],
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema4"
              }
            },
            "color": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "accent.blue",
                    "accent.cyan",
                    "accent.green",
                    "accent.yellow",
                    "accent.orange",
                    "accent.red",
                    "accent.pink",
                    "accent.purple"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                }
              ]
            },
            "inheritContext": {
              "default": "none",
              "type": "string",
              "enum": ["none", "parent"]
            },
            "memory": {
              "default": {
                "scope": "none",
                "access": "read"
              },
              "type": "object",
              "properties": {
                "scope": {
                  "type": "string",
                  "enum": ["none", "worker", "project-agent"]
                },
                "access": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["scope", "access"],
              "additionalProperties": false
            },
            "delegation": {
              "default": {
                "maxDepth": 0
              },
              "type": "object",
              "properties": {
                "maxDepth": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": ["maxDepth"],
              "additionalProperties": false
            },
            "checkpoint": {
              "default": "completion",
              "type": "string",
              "enum": ["completion", "none"]
            }
          },
          "additionalProperties": false
        }
      },
      "required": ["schemaVersion", "name", "instructions", "handoffDescription"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        },
        "__schema2": {
          "type": "string",
          "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
        },
        "__schema3": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema1"
            },
            "id": {
              "$ref": "#/definitions/__schema1"
            },
            "thinking": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        }
      }
    },
    "pinata.worker.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/definitions/__schema0"
        },
        "agent": {
          "$ref": "#/definitions/__schema0"
        },
        "task": {
          "$ref": "#/definitions/__schema1"
        },
        "origin": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "messageId": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "after": {
          "default": [],
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/definitions/__schema0"
              },
              {
                "$ref": "#/definitions/__schema2"
              }
            ]
          }
        },
        "inputs": {
          "default": [],
          "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
          "allOf": [
            {
              "$ref": "#/definitions/__schema4"
            }
          ]
        },
        "workspace": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "observeWorkspace": {
          "type": "boolean"
        },
        "model": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema1"
            },
            "id": {
              "$ref": "#/definitions/__schema1"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "backend": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "lifetime": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "context": {
          "default": [],
          "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
          "allOf": [
            {
              "$ref": "#/definitions/__schema5"
            }
          ]
        },
        "inheritContext": {
          "type": "string",
          "enum": ["none", "parent"]
        },
        "memory": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "type": "string",
              "enum": ["read", "write"]
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "delegation": {
          "type": "object",
          "properties": {
            "maxDepth": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["maxDepth"],
          "additionalProperties": false
        }
      },
      "required": ["id", "agent", "task"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema1"
            },
            "worker": {
              "$ref": "#/definitions/__schema0"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema3": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema4": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema2"
          }
        },
        "__schema5": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "pinata.result.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "summary": {
          "type": "string"
        },
        "data": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        },
        "assessment": {
          "type": "object",
          "properties": {
            "findings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "claimedChecks": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "blockers": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        }
      },
      "required": ["summary"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema0"
              }
            }
          ]
        }
      }
    },
    "pinata.report-tool-result.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "report": {
          "type": "object",
          "properties": {
            "summary": {
              "type": "string"
            },
            "data": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "assessment": {
              "type": "object",
              "properties": {
                "findings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "claimedChecks": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "blockers": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "required": ["summary"],
          "additionalProperties": false
        },
        "reportingError": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema0"
              }
            }
          ]
        }
      }
    },
    "pinata.assignment-result.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "ref": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "summary": {
          "type": "string"
        },
        "execution": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "queued"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "preparing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "running"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "stopping"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "finalizing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "ended"
                },
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled", "interrupted"]
                },
                "cleanup": {
                  "type": "string",
                  "enum": ["confirmed", "unconfirmed"]
                }
              },
              "required": ["phase", "reason", "cleanup"],
              "additionalProperties": false
            }
          ]
        },
        "report": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "reportingError": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        },
        "finalizationErrors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema0"
          }
        },
        "artifacts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema2"
          }
        },
        "transcript": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "session": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "snapshot": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "usage": {
          "type": "object",
          "properties": {
            "expectedAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "observations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "attempt": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "source": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "usage": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "kind": {
                    "$ref": "#/definitions/__schema4"
                  },
                  "responseId": {
                    "$ref": "#/definitions/__schema5"
                  }
                },
                "required": ["attempt", "source", "usage"],
                "additionalProperties": false
              }
            },
            "complete": {
              "type": "boolean"
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "total": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema3"
                },
                {
                  "type": "null"
                }
              ]
            },
            "observedTotal": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema3"
                },
                {
                  "type": "null"
                }
              ]
            },
            "missingAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            }
          },
          "required": ["expectedAttempts", "observations", "complete"],
          "additionalProperties": false
        }
      },
      "required": ["ref", "summary", "execution", "artifacts", "usage"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema1"
            },
            "output": {
              "$ref": "#/definitions/__schema1"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema1"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema1"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema5": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        }
      }
    },
    "pinata.inbox.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/definitions/__schema0"
        },
        "target": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "sender": {
          "$ref": "#/definitions/__schema0"
        },
        "kind": {
          "type": "string",
          "enum": ["initial", "follow_up", "steer", "notice"]
        },
        "text": {
          "$ref": "#/definitions/__schema0"
        },
        "state": {
          "type": "string",
          "enum": [
            "recorded",
            "dispatch_intent",
            "transport_queued",
            "transport_handled",
            "consumed",
            "uncertain"
          ]
        },
        "attempts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/definitions/__schema0"
              },
              "state": {
                "type": "string",
                "enum": [
                  "dispatch_intent",
                  "transport_queued",
                  "transport_handled",
                  "consumed",
                  "uncertain"
                ]
              },
              "checkpoint": {
                "type": "object",
                "properties": {
                  "digest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "size": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "required": ["digest", "size"],
                "additionalProperties": false
              }
            },
            "required": ["id", "state"],
            "additionalProperties": false
          }
        }
      },
      "required": ["id", "target", "sender", "kind", "text", "state", "attempts"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      }
    },
    "pinata.transition.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "$ref": "#/definitions/__schema0"
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "schedule_changed"
            },
            "requestId": {
              "$ref": "#/definitions/__schema1"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema2"
            },
            "receipt": {
              "$ref": "#/definitions/__schema3"
            },
            "action": {
              "type": "string",
              "enum": ["create", "update", "pause", "resume", "delete", "close", "recover", "list"]
            },
            "schedule": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            }
          },
          "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "schedule_occurrence"
            },
            "requestId": {
              "$ref": "#/definitions/__schema1"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema2"
            },
            "receipt": {
              "$ref": "#/definitions/__schema3"
            },
            "scheduleId": {
              "$ref": "#/definitions/__schema1"
            },
            "occurrence": {
              "$ref": "#/definitions/__schema19"
            },
            "nextAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastLocalKey": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "acceptance": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": [
            "kind",
            "requestId",
            "payloadDigest",
            "receipt",
            "scheduleId",
            "occurrence",
            "nextAt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "control_accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema1"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema2"
            },
            "receipt": {
              "$ref": "#/definitions/__schema3"
            },
            "action": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "cancel"
                    },
                    "targets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema7"
                      }
                    }
                  },
                  "required": ["kind", "targets"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "background"
                    }
                  },
                  "required": ["kind"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "capacity"
                    },
                    "maxConcurrent": {
                      "anyOf": [
                        {
                          "exclusiveMinimum": 0,
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema4"
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "maxConcurrent"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "application_accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema1"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema2"
            },
            "receipt": {
              "$ref": "#/definitions/__schema3"
            },
            "intent": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema1"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema1"
                },
                "command": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "apply"
                        },
                        "ref": {
                          "$ref": "#/definitions/__schema7"
                        },
                        "destination": {
                          "$ref": "#/definitions/__schema1"
                        }
                      },
                      "required": ["kind", "ref", "destination"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "rollback"
                        },
                        "operation": {
                          "$ref": "#/definitions/__schema1"
                        },
                        "destination": {
                          "$ref": "#/definitions/__schema1"
                        }
                      },
                      "required": ["kind", "operation", "destination"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "reconcile"
                        },
                        "operation": {
                          "$ref": "#/definitions/__schema1"
                        },
                        "owner": {
                          "$ref": "#/definitions/__schema1"
                        }
                      },
                      "required": ["kind", "operation", "owner"],
                      "additionalProperties": false
                    }
                  ]
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema1"
                },
                "destination": {
                  "$ref": "#/definitions/__schema1"
                },
                "ref": {
                  "$ref": "#/definitions/__schema7"
                },
                "snapshot": {
                  "$ref": "#/definitions/__schema17"
                },
                "targetOperation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "requestId",
                "command",
                "ownerEpoch",
                "destination",
                "ref",
                "snapshot"
              ],
              "additionalProperties": false
            }
          },
          "required": ["kind", "requestId", "payloadDigest", "receipt", "intent"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "application_observed"
            },
            "operationId": {
              "$ref": "#/definitions/__schema1"
            },
            "observation": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": ["completed", "failed", "uncertain"]
                },
                "receipt": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": ["applied", "rolled_back", "already_recorded"]
                        },
                        "operationId": {
                          "$ref": "#/definitions/__schema1"
                        },
                        "destination": {
                          "$ref": "#/definitions/__schema1"
                        },
                        "revision": {
                          "$ref": "#/definitions/__schema4"
                        },
                        "snapshot": {
                          "$ref": "#/definitions/__schema17"
                        },
                        "freshness": {
                          "type": "string",
                          "enum": ["matching", "changed", "unknown"]
                        }
                      },
                      "required": [
                        "status",
                        "operationId",
                        "destination",
                        "revision",
                        "snapshot",
                        "freshness"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_input",
                        "dependency_missing",
                        "capability_denied",
                        "unsupported",
                        "conflict",
                        "owner_unconfirmed",
                        "context_unavailable",
                        "commit_unknown"
                      ]
                    },
                    "message": {
                      "$ref": "#/definitions/__schema1"
                    },
                    "field": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    }
                  },
                  "required": ["code", "message"],
                  "additionalProperties": false
                },
                "evidence": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                }
              },
              "required": ["status"],
              "additionalProperties": false
            }
          },
          "required": ["kind", "operationId", "observation"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "effect_intent"
            },
            "effect": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema1"
                },
                "ref": {
                  "$ref": "#/definitions/__schema7"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "prepare",
                    "launch",
                    "steer",
                    "cleanup",
                    "checkpoint",
                    "capture",
                    "notification"
                  ]
                },
                "input": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                }
              },
              "required": ["id", "ref", "kind"],
              "additionalProperties": false
            }
          },
          "required": ["kind", "effect"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "effect_observed"
            },
            "effectId": {
              "$ref": "#/definitions/__schema1"
            },
            "status": {
              "type": "string",
              "enum": ["completed", "failed", "uncertain"]
            },
            "detail": {
              "type": "string"
            }
          },
          "required": ["kind", "effectId", "status"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "assignment_state"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "execution": {
              "$ref": "#/definitions/__schema20"
            }
          },
          "required": ["kind", "ref", "execution"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "settled"
            },
            "result": {
              "type": "object",
              "properties": {
                "ref": {
                  "$ref": "#/definitions/__schema7"
                },
                "summary": {
                  "type": "string"
                },
                "execution": {
                  "$ref": "#/definitions/__schema20"
                },
                "report": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                },
                "reportingError": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                },
                "finalizationErrors": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "artifacts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema17"
                  }
                },
                "transcript": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                },
                "session": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                },
                "snapshot": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                },
                "usage": {
                  "$ref": "#/definitions/__schema21"
                }
              },
              "required": ["ref", "summary", "execution", "artifacts", "usage"],
              "additionalProperties": false
            },
            "resultArtifact": {
              "$ref": "#/definitions/__schema17"
            },
            "notificationId": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": ["kind", "result", "resultArtifact", "notificationId"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "inbox_state"
            },
            "messageId": {
              "$ref": "#/definitions/__schema1"
            },
            "state": {
              "type": "string",
              "enum": [
                "dispatch_intent",
                "transport_queued",
                "transport_handled",
                "consumed",
                "uncertain"
              ]
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "checkpoint": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            }
          },
          "required": ["kind", "messageId", "state", "attemptId"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "inbox_not_delivered"
            },
            "messageId": {
              "$ref": "#/definitions/__schema1"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "receipt": {
              "$ref": "#/definitions/__schema17"
            }
          },
          "required": ["kind", "messageId", "attemptId", "receipt"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "capacity_changed"
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["kind", "maxConcurrent"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "attempt_started"
            },
            "attempt": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema1"
                },
                "ref": {
                  "$ref": "#/definitions/__schema7"
                },
                "ordinal": {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                },
                "backend": {
                  "$ref": "#/definitions/__schema11"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["id", "ref", "ordinal", "backend", "ownerEpoch"],
              "additionalProperties": false
            }
          },
          "required": ["kind", "attempt"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "workspace_prepared"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "prepared": {
              "$ref": "#/definitions/__schema26"
            }
          },
          "required": ["kind", "attemptId", "prepared"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "workspace_captured"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "capture": {
              "type": "object",
              "properties": {
                "artifacts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema17"
                  }
                },
                "snapshot": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema1"
                  }
                }
              },
              "required": ["artifacts"],
              "additionalProperties": false
            }
          },
          "required": ["kind", "attemptId", "capture"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "workspace_recovered"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "prepared": {
              "$ref": "#/definitions/__schema26"
            },
            "evidence": {
              "minItems": 1,
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            }
          },
          "required": ["kind", "attemptId", "prepared", "evidence"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "backend_enrolled"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "identity": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema1"
                },
                "kind": {
                  "$ref": "#/definitions/__schema11"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["id", "kind", "ownerEpoch"],
              "additionalProperties": false
            },
            "evidence": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            }
          },
          "required": ["kind", "attemptId", "identity", "evidence"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "attempt_outcome"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled"]
                },
                "summary": {
                  "type": "string"
                },
                "usage": {
                  "$ref": "#/definitions/__schema21"
                },
                "report": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                },
                "reportingError": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                },
                "session": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema27"
                    }
                  ]
                },
                "transcript": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                },
                "artifacts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema17"
                  }
                },
                "error": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                }
              },
              "required": ["reason", "summary", "usage", "artifacts"],
              "additionalProperties": false
            },
            "artifact": {
              "$ref": "#/definitions/__schema17"
            }
          },
          "required": ["kind", "attemptId", "outcome", "artifact"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "cleanup_observed"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "receipt": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "stopped"
                    },
                    "ownerEpoch": {
                      "$ref": "#/definitions/__schema1"
                    },
                    "identities": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema1"
                      }
                    },
                    "evidence": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema17"
                      }
                    }
                  },
                  "required": ["status", "ownerEpoch", "identities", "evidence"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "unconfirmed"
                    },
                    "ownerEpoch": {
                      "$ref": "#/definitions/__schema1"
                    },
                    "identities": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema1"
                      }
                    },
                    "reasons": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema1"
                      }
                    },
                    "evidence": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema17"
                      }
                    }
                  },
                  "required": ["status", "ownerEpoch", "identities", "reasons", "evidence"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": ["kind", "attemptId", "receipt"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "session_checkpoint"
            },
            "worker": {
              "$ref": "#/definitions/__schema1"
            },
            "checkpoint": {
              "$ref": "#/definitions/__schema27"
            }
          },
          "required": ["kind", "worker", "checkpoint"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "usage_observed"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "observation": {
              "$ref": "#/definitions/__schema22"
            }
          },
          "required": ["kind", "attemptId", "observation"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "response_observed"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "responseId": {
              "$ref": "#/definitions/__schema1"
            },
            "status": {
              "type": "string",
              "enum": ["started", "completed", "interrupted"]
            }
          },
          "required": ["kind", "attemptId", "responseId", "status"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "context_observed"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "context": {
              "type": "object",
              "properties": {
                "tokens": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "window": {
                  "anyOf": [
                    {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema4"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "percent": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "$ref": "#/definitions/__schema1"
                },
                "timestamp": {
                  "$ref": "#/definitions/__schema4"
                }
              },
              "required": ["tokens", "window", "percent", "source", "timestamp"],
              "additionalProperties": false
            }
          },
          "required": ["kind", "attemptId", "context"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "outbox_state"
            },
            "notificationId": {
              "$ref": "#/definitions/__schema1"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema1"
            },
            "state": {
              "type": "string",
              "enum": ["dispatch_intent", "delivered", "consumed", "uncertain"]
            },
            "checkpoint": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            }
          },
          "required": ["kind", "notificationId", "attemptId", "state"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema1"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema2"
            },
            "receipt": {
              "$ref": "#/definitions/__schema3"
            },
            "workers": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema16"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "sequence": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema4"
                      }
                    ]
                  },
                  "task": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "after": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema7"
                    }
                  },
                  "inputs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema7"
                    }
                  },
                  "context": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "execution": {
                    "$ref": "#/definitions/__schema20"
                  }
                },
                "required": ["ref", "sequence", "task", "after", "inputs", "context", "execution"],
                "additionalProperties": false
              }
            },
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "target": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "sender": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "kind": {
                    "type": "string",
                    "enum": ["initial", "follow_up", "steer", "notice"]
                  },
                  "text": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "recorded",
                      "dispatch_intent",
                      "transport_queued",
                      "transport_handled",
                      "consumed",
                      "uncertain"
                    ]
                  },
                  "attempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/definitions/__schema1"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "dispatch_intent",
                            "transport_queued",
                            "transport_handled",
                            "consumed",
                            "uncertain"
                          ]
                        },
                        "checkpoint": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema17"
                            }
                          ]
                        }
                      },
                      "required": ["id", "state"],
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["id", "target", "sender", "kind", "text", "state", "attempts"],
                "additionalProperties": false
              }
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema4"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "kind",
            "requestId",
            "payloadDigest",
            "receipt",
            "workers",
            "assignments",
            "messages"
          ],
          "additionalProperties": false
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        },
        "__schema2": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema1"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "operationId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "schedules": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema5"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema7"
              }
            },
            "resolved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "workspace": {
                    "$ref": "#/definitions/__schema9"
                  },
                  "backend": {
                    "$ref": "#/definitions/__schema11"
                  },
                  "lifetime": {
                    "$ref": "#/definitions/__schema12"
                  },
                  "grants": {
                    "$ref": "#/definitions/__schema18"
                  }
                },
                "required": ["ref", "workspace", "backend", "lifetime", "grants"],
                "additionalProperties": false
              }
            }
          },
          "required": ["status", "requestId", "revision", "assignments", "resolved"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema5": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema6"
            },
            "sessionId": {
              "$ref": "#/definitions/__schema1"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "trigger": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "at"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": ["kind", "at"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "interval"
                    },
                    "milliseconds": {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema4"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "milliseconds"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "cron"
                    },
                    "expression": {
                      "$ref": "#/definitions/__schema1"
                    },
                    "timezone": {
                      "$ref": "#/definitions/__schema1"
                    }
                  },
                  "required": ["kind", "expression", "timezone"],
                  "additionalProperties": false
                }
              ]
            },
            "overlap": {
              "type": "string",
              "enum": ["skip", "queue"]
            },
            "status": {
              "type": "string",
              "enum": ["paused", "active", "completed", "deleted", "closed"]
            },
            "target": {
              "type": "object",
              "properties": {
                "worker": {
                  "$ref": "#/definitions/__schema6"
                }
              },
              "required": ["worker"],
              "additionalProperties": false
            },
            "task": {
              "$ref": "#/definitions/__schema1"
            },
            "template": {
              "type": "object",
              "properties": {
                "request": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema6"
                    },
                    "agent": {
                      "$ref": "#/definitions/__schema6"
                    },
                    "task": {
                      "$ref": "#/definitions/__schema1"
                    },
                    "origin": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema7"
                        }
                      ]
                    },
                    "messageId": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    },
                    "after": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/__schema6"
                          },
                          {
                            "$ref": "#/definitions/__schema7"
                          }
                        ]
                      }
                    },
                    "inputs": {
                      "default": [],
                      "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema8"
                        }
                      ]
                    },
                    "workspace": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema9"
                        }
                      ]
                    },
                    "observeWorkspace": {
                      "type": "boolean"
                    },
                    "model": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema10"
                        }
                      ]
                    },
                    "backend": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema11"
                        }
                      ]
                    },
                    "lifetime": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema12"
                        }
                      ]
                    },
                    "context": {
                      "default": [],
                      "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema13"
                        }
                      ]
                    },
                    "inheritContext": {
                      "type": "string",
                      "enum": ["none", "parent"]
                    },
                    "memory": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema14"
                        }
                      ]
                    },
                    "delegation": {
                      "type": "object",
                      "properties": {
                        "maxDepth": {
                          "$ref": "#/definitions/__schema4"
                        }
                      },
                      "required": ["maxDepth"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["id", "agent", "task"],
                  "additionalProperties": false
                },
                "worker": {
                  "$ref": "#/definitions/__schema16"
                }
              },
              "required": ["request", "worker"],
              "additionalProperties": false
            },
            "nextAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastLocalKey": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "activatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "occurrences": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema19"
              }
            }
          },
          "required": [
            "id",
            "sessionId",
            "revision",
            "trigger",
            "overlap",
            "status",
            "target",
            "task",
            "nextAt",
            "occurrences"
          ],
          "additionalProperties": false
        },
        "__schema6": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema7": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema1"
            },
            "worker": {
              "$ref": "#/definitions/__schema6"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema8": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema7"
          }
        },
        "__schema9": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema10": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema1"
            },
            "id": {
              "$ref": "#/definitions/__schema1"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema11": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema12": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "__schema13": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema14": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema15"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "__schema15": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema16": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema6"
            },
            "agent": {
              "$ref": "#/definitions/__schema6"
            },
            "definition": {
              "$ref": "#/definitions/__schema17"
            },
            "color": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "accent.blue",
                    "accent.cyan",
                    "accent.green",
                    "accent.yellow",
                    "accent.orange",
                    "accent.red",
                    "accent.pink",
                    "accent.purple"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                }
              ]
            },
            "loadout": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema10"
                }
              ]
            },
            "fallbacks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema10"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            },
            "access": {
              "$ref": "#/definitions/__schema15"
            },
            "workspace": {
              "$ref": "#/definitions/__schema9"
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "backend": {
              "$ref": "#/definitions/__schema11"
            },
            "lifetime": {
              "$ref": "#/definitions/__schema12"
            },
            "grants": {
              "$ref": "#/definitions/__schema18"
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "parentAssignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "depth": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "context": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "workspacePlan": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            }
          },
          "required": [
            "id",
            "agent",
            "definition",
            "fallbacks",
            "tools",
            "access",
            "workspace",
            "backend",
            "lifetime",
            "grants"
          ],
          "additionalProperties": false
        },
        "__schema17": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema2"
            },
            "size": {
              "$ref": "#/definitions/__schema4"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema18": {
          "type": "object",
          "properties": {
            "access": {
              "$ref": "#/definitions/__schema15"
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            },
            "workspaces": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema9"
              }
            },
            "inheritContext": {
              "type": "boolean"
            },
            "memory": {
              "$ref": "#/definitions/__schema14"
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema4"
                },
                "agents": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema6"
                  }
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "workspaces": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema9"
                  }
                }
              },
              "required": ["maxDepth", "agents", "tools", "workspaces"],
              "additionalProperties": false
            }
          },
          "required": ["access", "tools", "workspaces", "inheritContext", "memory", "delegation"],
          "additionalProperties": false
        },
        "__schema19": {
          "type": "object",
          "properties": {
            "scheduledAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "status": {
              "type": "string",
              "enum": ["accepted", "skipped", "missed"]
            },
            "ref": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "through": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": ["scheduledAt", "status"],
          "additionalProperties": false
        },
        "__schema20": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "queued"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "preparing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "running"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "stopping"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "finalizing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "ended"
                },
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled", "interrupted"]
                },
                "cleanup": {
                  "type": "string",
                  "enum": ["confirmed", "unconfirmed"]
                }
              },
              "required": ["phase", "reason", "cleanup"],
              "additionalProperties": false
            }
          ]
        },
        "__schema21": {
          "type": "object",
          "properties": {
            "expectedAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            },
            "observations": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema22"
              }
            },
            "complete": {
              "type": "boolean"
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "total": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema23"
                },
                {
                  "type": "null"
                }
              ]
            },
            "observedTotal": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema23"
                },
                {
                  "type": "null"
                }
              ]
            },
            "missingAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            }
          },
          "required": ["expectedAttempts", "observations", "complete"],
          "additionalProperties": false
        },
        "__schema22": {
          "type": "object",
          "properties": {
            "attempt": {
              "$ref": "#/definitions/__schema1"
            },
            "source": {
              "$ref": "#/definitions/__schema1"
            },
            "usage": {
              "$ref": "#/definitions/__schema23"
            },
            "kind": {
              "$ref": "#/definitions/__schema24"
            },
            "responseId": {
              "$ref": "#/definitions/__schema25"
            }
          },
          "required": ["attempt", "source", "usage"],
          "additionalProperties": false
        },
        "__schema23": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema4"
            },
            "output": {
              "$ref": "#/definitions/__schema4"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema4"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema4"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema24": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema25": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "__schema26": {
          "type": "object",
          "properties": {
            "cwd": {
              "$ref": "#/definitions/__schema1"
            },
            "identity": {
              "$ref": "#/definitions/__schema1"
            },
            "lease": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema1"
                },
                "workspace": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["id", "workspace"],
              "additionalProperties": false
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            }
          },
          "required": ["cwd", "identity", "artifacts"],
          "additionalProperties": false
        },
        "__schema27": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema1"
                },
                "worker": {
                  "$ref": "#/definitions/__schema1"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema17"
                },
                "branch": {
                  "$ref": "#/definitions/__schema1"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema28"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema1"
                },
                "worker": {
                  "$ref": "#/definitions/__schema1"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema17"
                },
                "branch": {
                  "$ref": "#/definitions/__schema1"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema28"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "__schema28": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema17"
            }
          ]
        }
      }
    },
    "pinata.state.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "run": {
          "$ref": "#/definitions/__schema0"
        },
        "revision": {
          "$ref": "#/definitions/__schema1"
        },
        "nextSequence": {
          "exclusiveMinimum": 0,
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "config": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "workers": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/definitions/__schema4"
          }
        },
        "assignments": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "ref": {
                "$ref": "#/definitions/__schema13"
              },
              "sequence": {
                "exclusiveMinimum": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema1"
                  }
                ]
              },
              "task": {
                "$ref": "#/definitions/__schema0"
              },
              "after": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema13"
                }
              },
              "inputs": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema13"
                }
              },
              "context": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "execution": {
                "$ref": "#/definitions/__schema14"
              }
            },
            "required": ["ref", "sequence", "task", "after", "inputs", "context", "execution"],
            "additionalProperties": false
          }
        },
        "latest": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "exclusiveMinimum": 0,
            "allOf": [
              {
                "$ref": "#/definitions/__schema1"
              }
            ]
          }
        },
        "inbox": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/definitions/__schema0"
              },
              "target": {
                "$ref": "#/definitions/__schema13"
              },
              "sender": {
                "$ref": "#/definitions/__schema0"
              },
              "kind": {
                "type": "string",
                "enum": ["initial", "follow_up", "steer", "notice"]
              },
              "text": {
                "$ref": "#/definitions/__schema0"
              },
              "state": {
                "type": "string",
                "enum": [
                  "recorded",
                  "dispatch_intent",
                  "transport_queued",
                  "transport_handled",
                  "consumed",
                  "uncertain"
                ]
              },
              "attempts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "dispatch_intent",
                        "transport_queued",
                        "transport_handled",
                        "consumed",
                        "uncertain"
                      ]
                    },
                    "checkpoint": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    }
                  },
                  "required": ["id", "state"],
                  "additionalProperties": false
                }
              }
            },
            "required": ["id", "target", "sender", "kind", "text", "state", "attempts"],
            "additionalProperties": false
          }
        },
        "receipts": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "payloadDigest": {
                "$ref": "#/definitions/__schema3"
              },
              "receipt": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "const": "accepted"
                  },
                  "requestId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "revision": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  },
                  "operationId": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      }
                    ]
                  },
                  "schedules": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema15"
                    }
                  },
                  "assignments": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema13"
                    }
                  },
                  "resolved": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "$ref": "#/definitions/__schema13"
                        },
                        "workspace": {
                          "$ref": "#/definitions/__schema8"
                        },
                        "backend": {
                          "$ref": "#/definitions/__schema9"
                        },
                        "lifetime": {
                          "$ref": "#/definitions/__schema10"
                        },
                        "grants": {
                          "$ref": "#/definitions/__schema11"
                        }
                      },
                      "required": ["ref", "workspace", "backend", "lifetime", "grants"],
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["status", "requestId", "revision", "assignments", "resolved"],
                "additionalProperties": false
              }
            },
            "required": ["payloadDigest", "receipt"],
            "additionalProperties": false
          }
        },
        "effects": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "effect": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "ref": {
                    "$ref": "#/definitions/__schema13"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "prepare",
                      "launch",
                      "steer",
                      "cleanup",
                      "checkpoint",
                      "capture",
                      "notification"
                    ]
                  },
                  "input": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  }
                },
                "required": ["id", "ref", "kind"],
                "additionalProperties": false
              },
              "status": {
                "type": "string",
                "enum": ["intent", "completed", "failed", "uncertain"]
              },
              "detail": {
                "type": "string"
              }
            },
            "required": ["effect", "status"],
            "additionalProperties": false
          }
        },
        "applications": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "intent": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "requestId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "command": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "apply"
                          },
                          "ref": {
                            "$ref": "#/definitions/__schema13"
                          },
                          "destination": {
                            "$ref": "#/definitions/__schema0"
                          }
                        },
                        "required": ["kind", "ref", "destination"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "rollback"
                          },
                          "operation": {
                            "$ref": "#/definitions/__schema0"
                          },
                          "destination": {
                            "$ref": "#/definitions/__schema0"
                          }
                        },
                        "required": ["kind", "operation", "destination"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "reconcile"
                          },
                          "operation": {
                            "$ref": "#/definitions/__schema0"
                          },
                          "owner": {
                            "$ref": "#/definitions/__schema0"
                          }
                        },
                        "required": ["kind", "operation", "owner"],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "ownerEpoch": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "destination": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "ref": {
                    "$ref": "#/definitions/__schema13"
                  },
                  "snapshot": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "targetOperation": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "requestId",
                  "command",
                  "ownerEpoch",
                  "destination",
                  "ref",
                  "snapshot"
                ],
                "additionalProperties": false
              },
              "status": {
                "type": "string",
                "enum": ["pending", "completed", "failed", "uncertain"]
              },
              "receipt": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "string",
                        "enum": ["applied", "rolled_back", "already_recorded"]
                      },
                      "operationId": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "destination": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "revision": {
                        "$ref": "#/definitions/__schema1"
                      },
                      "snapshot": {
                        "$ref": "#/definitions/__schema2"
                      },
                      "freshness": {
                        "type": "string",
                        "enum": ["matching", "changed", "unknown"]
                      }
                    },
                    "required": [
                      "status",
                      "operationId",
                      "destination",
                      "revision",
                      "snapshot",
                      "freshness"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "invalid_input",
                      "dependency_missing",
                      "capability_denied",
                      "unsupported",
                      "conflict",
                      "owner_unconfirmed",
                      "context_unavailable",
                      "commit_unknown"
                    ]
                  },
                  "message": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "field": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      }
                    ]
                  }
                },
                "required": ["code", "message"],
                "additionalProperties": false
              },
              "evidence": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema2"
                  }
                ]
              }
            },
            "required": ["intent", "status"],
            "additionalProperties": false
          }
        },
        "schedules": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/definitions/__schema15"
          }
        },
        "attempts": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "attempt": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "ref": {
                    "$ref": "#/definitions/__schema13"
                  },
                  "ordinal": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  },
                  "backend": {
                    "$ref": "#/definitions/__schema9"
                  },
                  "ownerEpoch": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "required": ["id", "ref", "ordinal", "backend", "ownerEpoch"],
                "additionalProperties": false
              },
              "prepared": {
                "type": "object",
                "properties": {
                  "cwd": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "identity": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "lease": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "workspace": {
                        "$ref": "#/definitions/__schema0"
                      }
                    },
                    "required": ["id", "workspace"],
                    "additionalProperties": false
                  },
                  "artifacts": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema2"
                    }
                  }
                },
                "required": ["cwd", "identity", "artifacts"],
                "additionalProperties": false
              },
              "capture": {
                "type": "object",
                "properties": {
                  "artifacts": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "snapshot": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "errors": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  }
                },
                "required": ["artifacts"],
                "additionalProperties": false
              },
              "identity": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "kind": {
                    "$ref": "#/definitions/__schema9"
                  },
                  "ownerEpoch": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "required": ["id", "kind", "ownerEpoch"],
                "additionalProperties": false
              },
              "enrollmentEvidence": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema2"
                }
              },
              "outcome": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": ["completed", "failed", "cancelled"]
                  },
                  "summary": {
                    "type": "string"
                  },
                  "usage": {
                    "$ref": "#/definitions/__schema18"
                  },
                  "report": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "reportingError": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      }
                    ]
                  },
                  "session": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema23"
                      }
                    ]
                  },
                  "transcript": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "artifacts": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "error": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      }
                    ]
                  }
                },
                "required": ["reason", "summary", "usage", "artifacts"],
                "additionalProperties": false
              },
              "outcomeArtifact": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema2"
                  }
                ]
              },
              "cleanup": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "string",
                        "const": "stopped"
                      },
                      "ownerEpoch": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "identities": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        }
                      },
                      "evidence": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema2"
                        }
                      }
                    },
                    "required": ["status", "ownerEpoch", "identities", "evidence"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "string",
                        "const": "unconfirmed"
                      },
                      "ownerEpoch": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "identities": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        }
                      },
                      "reasons": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        }
                      },
                      "evidence": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema2"
                        }
                      }
                    },
                    "required": ["status", "ownerEpoch", "identities", "reasons", "evidence"],
                    "additionalProperties": false
                  }
                ]
              },
              "usageObservations": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema19"
                }
              },
              "responses": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string",
                  "enum": ["started", "completed", "interrupted"]
                }
              }
            },
            "required": ["attempt", "enrollmentEvidence", "usageObservations", "responses"],
            "additionalProperties": false
          }
        },
        "sessions": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/definitions/__schema23"
          }
        },
        "contextUsage": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "tokens": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/__schema1"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "window": {
                "anyOf": [
                  {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "percent": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "$ref": "#/definitions/__schema0"
              },
              "timestamp": {
                "$ref": "#/definitions/__schema1"
              }
            },
            "required": ["tokens", "window", "percent", "source", "timestamp"],
            "additionalProperties": false
          }
        },
        "cancelled": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "requestId": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "required": ["requestId"],
            "additionalProperties": false
          }
        },
        "attachment": {
          "type": "string",
          "enum": ["foreground", "background"]
        },
        "results": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "result": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema13"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "execution": {
                    "$ref": "#/definitions/__schema14"
                  },
                  "report": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "reportingError": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      }
                    ]
                  },
                  "finalizationErrors": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "artifacts": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "transcript": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "session": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "snapshot": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "usage": {
                    "$ref": "#/definitions/__schema18"
                  }
                },
                "required": ["ref", "summary", "execution", "artifacts", "usage"],
                "additionalProperties": false
              },
              "artifact": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "required": ["result", "artifact"],
            "additionalProperties": false
          }
        },
        "outbox": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "ref": {
                "$ref": "#/definitions/__schema13"
              },
              "result": {
                "$ref": "#/definitions/__schema2"
              },
              "state": {
                "type": "string",
                "enum": ["recorded", "dispatch_intent", "delivered", "consumed", "uncertain"]
              },
              "attempts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "state": {
                      "type": "string",
                      "enum": ["dispatch_intent", "delivered", "consumed", "uncertain"]
                    },
                    "checkpoint": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    }
                  },
                  "required": ["id", "state"],
                  "additionalProperties": false
                }
              }
            },
            "required": ["ref", "result", "state", "attempts"],
            "additionalProperties": false
          }
        },
        "maxConcurrent": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "history": {
          "type": "object",
          "properties": {
            "source": {
              "$ref": "#/definitions/__schema2"
            },
            "quiescence": {
              "$ref": "#/definitions/__schema2"
            },
            "requestId": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["source", "quiescence", "requestId"],
          "additionalProperties": false
        }
      },
      "required": [
        "run",
        "revision",
        "nextSequence",
        "workers",
        "assignments",
        "latest",
        "inbox",
        "receipts",
        "effects",
        "attempts",
        "sessions",
        "contextUsage",
        "cancelled",
        "attachment",
        "results",
        "outbox",
        "maxConcurrent"
      ],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema3"
            },
            "size": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema3": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema5"
            },
            "agent": {
              "$ref": "#/definitions/__schema5"
            },
            "definition": {
              "$ref": "#/definitions/__schema2"
            },
            "color": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "accent.blue",
                    "accent.cyan",
                    "accent.green",
                    "accent.yellow",
                    "accent.orange",
                    "accent.red",
                    "accent.pink",
                    "accent.purple"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                }
              ]
            },
            "loadout": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "fallbacks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema6"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "access": {
              "$ref": "#/definitions/__schema7"
            },
            "workspace": {
              "$ref": "#/definitions/__schema8"
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "backend": {
              "$ref": "#/definitions/__schema9"
            },
            "lifetime": {
              "$ref": "#/definitions/__schema10"
            },
            "grants": {
              "$ref": "#/definitions/__schema11"
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema13"
                }
              ]
            },
            "parentAssignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema13"
                }
              ]
            },
            "depth": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "context": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "workspacePlan": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": [
            "id",
            "agent",
            "definition",
            "fallbacks",
            "tools",
            "access",
            "workspace",
            "backend",
            "lifetime",
            "grants"
          ],
          "additionalProperties": false
        },
        "__schema5": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema6": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema0"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema7": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema8": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema9": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema10": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "__schema11": {
          "type": "object",
          "properties": {
            "access": {
              "$ref": "#/definitions/__schema7"
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "workspaces": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema8"
              }
            },
            "inheritContext": {
              "type": "boolean"
            },
            "memory": {
              "$ref": "#/definitions/__schema12"
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema1"
                },
                "agents": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema5"
                  }
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "workspaces": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema8"
                  }
                }
              },
              "required": ["maxDepth", "agents", "tools", "workspaces"],
              "additionalProperties": false
            }
          },
          "required": ["access", "tools", "workspaces", "inheritContext", "memory", "delegation"],
          "additionalProperties": false
        },
        "__schema12": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema7"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "__schema13": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "$ref": "#/definitions/__schema5"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema14": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "queued"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "preparing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "running"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "stopping"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "finalizing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "ended"
                },
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled", "interrupted"]
                },
                "cleanup": {
                  "type": "string",
                  "enum": ["confirmed", "unconfirmed"]
                }
              },
              "required": ["phase", "reason", "cleanup"],
              "additionalProperties": false
            }
          ]
        },
        "__schema15": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema5"
            },
            "sessionId": {
              "$ref": "#/definitions/__schema0"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "trigger": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "at"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": ["kind", "at"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "interval"
                    },
                    "milliseconds": {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "milliseconds"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "cron"
                    },
                    "expression": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "timezone": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "required": ["kind", "expression", "timezone"],
                  "additionalProperties": false
                }
              ]
            },
            "overlap": {
              "type": "string",
              "enum": ["skip", "queue"]
            },
            "status": {
              "type": "string",
              "enum": ["paused", "active", "completed", "deleted", "closed"]
            },
            "target": {
              "type": "object",
              "properties": {
                "worker": {
                  "$ref": "#/definitions/__schema5"
                }
              },
              "required": ["worker"],
              "additionalProperties": false
            },
            "task": {
              "$ref": "#/definitions/__schema0"
            },
            "template": {
              "type": "object",
              "properties": {
                "request": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema5"
                    },
                    "agent": {
                      "$ref": "#/definitions/__schema5"
                    },
                    "task": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "origin": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema13"
                        }
                      ]
                    },
                    "messageId": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    },
                    "after": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/__schema5"
                          },
                          {
                            "$ref": "#/definitions/__schema13"
                          }
                        ]
                      }
                    },
                    "inputs": {
                      "default": [],
                      "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema16"
                        }
                      ]
                    },
                    "workspace": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema8"
                        }
                      ]
                    },
                    "observeWorkspace": {
                      "type": "boolean"
                    },
                    "model": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema6"
                        }
                      ]
                    },
                    "backend": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema9"
                        }
                      ]
                    },
                    "lifetime": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema10"
                        }
                      ]
                    },
                    "context": {
                      "default": [],
                      "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema17"
                        }
                      ]
                    },
                    "inheritContext": {
                      "type": "string",
                      "enum": ["none", "parent"]
                    },
                    "memory": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema12"
                        }
                      ]
                    },
                    "delegation": {
                      "type": "object",
                      "properties": {
                        "maxDepth": {
                          "$ref": "#/definitions/__schema1"
                        }
                      },
                      "required": ["maxDepth"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["id", "agent", "task"],
                  "additionalProperties": false
                },
                "worker": {
                  "$ref": "#/definitions/__schema4"
                }
              },
              "required": ["request", "worker"],
              "additionalProperties": false
            },
            "nextAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastLocalKey": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "activatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "occurrences": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "scheduledAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "status": {
                    "type": "string",
                    "enum": ["accepted", "skipped", "missed"]
                  },
                  "ref": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema13"
                      }
                    ]
                  },
                  "reason": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema0"
                      }
                    ]
                  },
                  "through": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  }
                },
                "required": ["scheduledAt", "status"],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "id",
            "sessionId",
            "revision",
            "trigger",
            "overlap",
            "status",
            "target",
            "task",
            "nextAt",
            "occurrences"
          ],
          "additionalProperties": false
        },
        "__schema16": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema13"
          }
        },
        "__schema17": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema18": {
          "type": "object",
          "properties": {
            "expectedAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "observations": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema19"
              }
            },
            "complete": {
              "type": "boolean"
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "total": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema20"
                },
                {
                  "type": "null"
                }
              ]
            },
            "observedTotal": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema20"
                },
                {
                  "type": "null"
                }
              ]
            },
            "missingAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            }
          },
          "required": ["expectedAttempts", "observations", "complete"],
          "additionalProperties": false
        },
        "__schema19": {
          "type": "object",
          "properties": {
            "attempt": {
              "$ref": "#/definitions/__schema0"
            },
            "source": {
              "$ref": "#/definitions/__schema0"
            },
            "usage": {
              "$ref": "#/definitions/__schema20"
            },
            "kind": {
              "$ref": "#/definitions/__schema21"
            },
            "responseId": {
              "$ref": "#/definitions/__schema22"
            }
          },
          "required": ["attempt", "source", "usage"],
          "additionalProperties": false
        },
        "__schema20": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema1"
            },
            "output": {
              "$ref": "#/definitions/__schema1"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema1"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema1"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema21": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema22": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        },
        "__schema23": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema0"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema2"
                },
                "branch": {
                  "$ref": "#/definitions/__schema0"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema24"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema0"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema2"
                },
                "branch": {
                  "$ref": "#/definitions/__schema0"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema24"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema0"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "__schema24": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        }
      }
    },
    "pinata.event.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "kind": {
              "type": "string",
              "const": "committed"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema0"
            },
            "transition": {
              "oneOf": [
                {
                  "$ref": "#/definitions/__schema2"
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "schedule_changed"
                    },
                    "requestId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "payloadDigest": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "receipt": {
                      "$ref": "#/definitions/__schema4"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "create",
                        "update",
                        "pause",
                        "resume",
                        "delete",
                        "close",
                        "recover",
                        "list"
                      ]
                    },
                    "schedule": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema5"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "schedule_occurrence"
                    },
                    "requestId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "payloadDigest": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "receipt": {
                      "$ref": "#/definitions/__schema4"
                    },
                    "scheduleId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "occurrence": {
                      "$ref": "#/definitions/__schema19"
                    },
                    "nextAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastLocalKey": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    },
                    "acceptance": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "requestId",
                    "payloadDigest",
                    "receipt",
                    "scheduleId",
                    "occurrence",
                    "nextAt"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "control_accepted"
                    },
                    "requestId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "payloadDigest": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "receipt": {
                      "$ref": "#/definitions/__schema4"
                    },
                    "action": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "cancel"
                            },
                            "targets": {
                              "type": "array",
                              "items": {
                                "$ref": "#/definitions/__schema7"
                              }
                            }
                          },
                          "required": ["kind", "targets"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "background"
                            }
                          },
                          "required": ["kind"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "capacity"
                            },
                            "maxConcurrent": {
                              "anyOf": [
                                {
                                  "exclusiveMinimum": 0,
                                  "allOf": [
                                    {
                                      "$ref": "#/definitions/__schema1"
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": ["kind", "maxConcurrent"],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "application_accepted"
                    },
                    "requestId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "payloadDigest": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "receipt": {
                      "$ref": "#/definitions/__schema4"
                    },
                    "intent": {
                      "$ref": "#/definitions/__schema23"
                    }
                  },
                  "required": ["kind", "requestId", "payloadDigest", "receipt", "intent"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "application_observed"
                    },
                    "operationId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "observation": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": ["completed", "failed", "uncertain"]
                        },
                        "receipt": {
                          "$ref": "#/definitions/__schema24"
                        },
                        "error": {
                          "$ref": "#/definitions/__schema25"
                        },
                        "evidence": {
                          "$ref": "#/definitions/__schema26"
                        }
                      },
                      "required": ["status"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["kind", "operationId", "observation"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "effect_intent"
                    },
                    "effect": {
                      "$ref": "#/definitions/__schema27"
                    }
                  },
                  "required": ["kind", "effect"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "effect_observed"
                    },
                    "effectId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "status": {
                      "type": "string",
                      "enum": ["completed", "failed", "uncertain"]
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": ["kind", "effectId", "status"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "assignment_state"
                    },
                    "ref": {
                      "$ref": "#/definitions/__schema7"
                    },
                    "execution": {
                      "$ref": "#/definitions/__schema21"
                    }
                  },
                  "required": ["kind", "ref", "execution"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "settled"
                    },
                    "result": {
                      "$ref": "#/definitions/__schema28"
                    },
                    "resultArtifact": {
                      "$ref": "#/definitions/__schema17"
                    },
                    "notificationId": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "required": ["kind", "result", "resultArtifact", "notificationId"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "inbox_state"
                    },
                    "messageId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "dispatch_intent",
                        "transport_queued",
                        "transport_handled",
                        "consumed",
                        "uncertain"
                      ]
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "checkpoint": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema17"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "messageId", "state", "attemptId"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "inbox_not_delivered"
                    },
                    "messageId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "receipt": {
                      "$ref": "#/definitions/__schema17"
                    }
                  },
                  "required": ["kind", "messageId", "attemptId", "receipt"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "capacity_changed"
                    },
                    "maxConcurrent": {
                      "anyOf": [
                        {
                          "exclusiveMinimum": 0,
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema1"
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "maxConcurrent"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "attempt_started"
                    },
                    "attempt": {
                      "$ref": "#/definitions/__schema34"
                    }
                  },
                  "required": ["kind", "attempt"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "workspace_prepared"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "prepared": {
                      "$ref": "#/definitions/__schema35"
                    }
                  },
                  "required": ["kind", "attemptId", "prepared"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "workspace_captured"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "capture": {
                      "$ref": "#/definitions/__schema36"
                    }
                  },
                  "required": ["kind", "attemptId", "capture"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "workspace_recovered"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "prepared": {
                      "$ref": "#/definitions/__schema35"
                    },
                    "evidence": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema17"
                      }
                    }
                  },
                  "required": ["kind", "attemptId", "prepared", "evidence"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "backend_enrolled"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "identity": {
                      "$ref": "#/definitions/__schema37"
                    },
                    "evidence": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema17"
                      }
                    }
                  },
                  "required": ["kind", "attemptId", "identity", "evidence"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "attempt_outcome"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "outcome": {
                      "$ref": "#/definitions/__schema38"
                    },
                    "artifact": {
                      "$ref": "#/definitions/__schema17"
                    }
                  },
                  "required": ["kind", "attemptId", "outcome", "artifact"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "cleanup_observed"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "receipt": {
                      "$ref": "#/definitions/__schema41"
                    }
                  },
                  "required": ["kind", "attemptId", "receipt"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "session_checkpoint"
                    },
                    "worker": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "checkpoint": {
                      "$ref": "#/definitions/__schema39"
                    }
                  },
                  "required": ["kind", "worker", "checkpoint"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "usage_observed"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "observation": {
                      "$ref": "#/definitions/__schema30"
                    }
                  },
                  "required": ["kind", "attemptId", "observation"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "response_observed"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "responseId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "status": {
                      "type": "string",
                      "enum": ["started", "completed", "interrupted"]
                    }
                  },
                  "required": ["kind", "attemptId", "responseId", "status"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "context_observed"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "context": {
                      "$ref": "#/definitions/__schema42"
                    }
                  },
                  "required": ["kind", "attemptId", "context"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "outbox_state"
                    },
                    "notificationId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "attemptId": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "state": {
                      "$ref": "#/definitions/__schema43"
                    },
                    "checkpoint": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema17"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "notificationId", "attemptId", "state"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": ["schemaVersion", "kind", "id", "revision", "ownerEpoch", "transition"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "kind": {
              "type": "string",
              "const": "snapshot"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "revision": {
              "$ref": "#/definitions/__schema1"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema0"
            },
            "snapshot": {
              "type": "object",
              "properties": {
                "run": {
                  "$ref": "#/definitions/__schema0"
                },
                "revision": {
                  "$ref": "#/definitions/__schema1"
                },
                "nextSequence": {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                },
                "config": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema17"
                    }
                  ]
                },
                "workers": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/definitions/__schema16"
                  }
                },
                "assignments": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/definitions/__schema20"
                  }
                },
                "latest": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema1"
                      }
                    ]
                  }
                },
                "inbox": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/definitions/__schema22"
                  }
                },
                "receipts": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "payloadDigest": {
                        "$ref": "#/definitions/__schema3"
                      },
                      "receipt": {
                        "$ref": "#/definitions/__schema4"
                      }
                    },
                    "required": ["payloadDigest", "receipt"],
                    "additionalProperties": false
                  }
                },
                "effects": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "effect": {
                        "$ref": "#/definitions/__schema27"
                      },
                      "status": {
                        "type": "string",
                        "enum": ["intent", "completed", "failed", "uncertain"]
                      },
                      "detail": {
                        "type": "string"
                      }
                    },
                    "required": ["effect", "status"],
                    "additionalProperties": false
                  }
                },
                "applications": {
                  "default": {},
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "intent": {
                        "$ref": "#/definitions/__schema23"
                      },
                      "status": {
                        "type": "string",
                        "enum": ["pending", "completed", "failed", "uncertain"]
                      },
                      "receipt": {
                        "$ref": "#/definitions/__schema24"
                      },
                      "error": {
                        "$ref": "#/definitions/__schema25"
                      },
                      "evidence": {
                        "$ref": "#/definitions/__schema26"
                      }
                    },
                    "required": ["intent", "status"],
                    "additionalProperties": false
                  }
                },
                "schedules": {
                  "default": {},
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/definitions/__schema5"
                  }
                },
                "attempts": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "attempt": {
                        "$ref": "#/definitions/__schema34"
                      },
                      "prepared": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema35"
                          }
                        ]
                      },
                      "capture": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema36"
                          }
                        ]
                      },
                      "identity": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema37"
                          }
                        ]
                      },
                      "enrollmentEvidence": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema17"
                        }
                      },
                      "outcome": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema38"
                          }
                        ]
                      },
                      "outcomeArtifact": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema17"
                          }
                        ]
                      },
                      "cleanup": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema41"
                          }
                        ]
                      },
                      "usageObservations": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema30"
                        }
                      },
                      "responses": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["started", "completed", "interrupted"]
                        }
                      }
                    },
                    "required": ["attempt", "enrollmentEvidence", "usageObservations", "responses"],
                    "additionalProperties": false
                  }
                },
                "sessions": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/definitions/__schema39"
                  }
                },
                "contextUsage": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/definitions/__schema42"
                  }
                },
                "cancelled": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "requestId": {
                        "$ref": "#/definitions/__schema0"
                      }
                    },
                    "required": ["requestId"],
                    "additionalProperties": false
                  }
                },
                "attachment": {
                  "type": "string",
                  "enum": ["foreground", "background"]
                },
                "results": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "result": {
                        "$ref": "#/definitions/__schema28"
                      },
                      "artifact": {
                        "$ref": "#/definitions/__schema17"
                      }
                    },
                    "required": ["result", "artifact"],
                    "additionalProperties": false
                  }
                },
                "outbox": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "ref": {
                        "$ref": "#/definitions/__schema7"
                      },
                      "result": {
                        "$ref": "#/definitions/__schema17"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "recorded",
                          "dispatch_intent",
                          "delivered",
                          "consumed",
                          "uncertain"
                        ]
                      },
                      "attempts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/definitions/__schema0"
                            },
                            "state": {
                              "$ref": "#/definitions/__schema43"
                            },
                            "checkpoint": {
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema17"
                                }
                              ]
                            }
                          },
                          "required": ["id", "state"],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": ["ref", "result", "state", "attempts"],
                    "additionalProperties": false
                  }
                },
                "maxConcurrent": {
                  "anyOf": [
                    {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "history": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "$ref": "#/definitions/__schema17"
                    },
                    "quiescence": {
                      "$ref": "#/definitions/__schema17"
                    },
                    "requestId": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "required": ["source", "quiescence", "requestId"],
                  "additionalProperties": false
                }
              },
              "required": [
                "run",
                "revision",
                "nextSequence",
                "workers",
                "assignments",
                "latest",
                "inbox",
                "receipts",
                "effects",
                "attempts",
                "sessions",
                "contextUsage",
                "cancelled",
                "attachment",
                "results",
                "outbox",
                "maxConcurrent"
              ],
              "additionalProperties": false
            }
          },
          "required": ["schemaVersion", "kind", "id", "revision", "ownerEpoch", "snapshot"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "kind": {
              "type": "string",
              "const": "activity"
            },
            "source": {
              "$ref": "#/definitions/__schema0"
            },
            "ordinal": {
              "$ref": "#/definitions/__schema1"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema0"
            },
            "revision": {
              "$ref": "#/definitions/__schema1"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "schemaVersion",
            "kind",
            "source",
            "ordinal",
            "ownerEpoch",
            "revision",
            "ref",
            "text"
          ],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema2": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema0"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema3"
            },
            "receipt": {
              "$ref": "#/definitions/__schema4"
            },
            "workers": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema16"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema20"
              }
            },
            "messages": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema22"
              }
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "kind",
            "requestId",
            "payloadDigest",
            "receipt",
            "workers",
            "assignments",
            "messages"
          ],
          "additionalProperties": false
        },
        "__schema3": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema0"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "operationId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "schedules": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema5"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema7"
              }
            },
            "resolved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "workspace": {
                    "$ref": "#/definitions/__schema9"
                  },
                  "backend": {
                    "$ref": "#/definitions/__schema11"
                  },
                  "lifetime": {
                    "$ref": "#/definitions/__schema12"
                  },
                  "grants": {
                    "$ref": "#/definitions/__schema18"
                  }
                },
                "required": ["ref", "workspace", "backend", "lifetime", "grants"],
                "additionalProperties": false
              }
            }
          },
          "required": ["status", "requestId", "revision", "assignments", "resolved"],
          "additionalProperties": false
        },
        "__schema5": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema6"
            },
            "sessionId": {
              "$ref": "#/definitions/__schema0"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "trigger": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "at"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": ["kind", "at"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "interval"
                    },
                    "milliseconds": {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "milliseconds"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "cron"
                    },
                    "expression": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "timezone": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "required": ["kind", "expression", "timezone"],
                  "additionalProperties": false
                }
              ]
            },
            "overlap": {
              "type": "string",
              "enum": ["skip", "queue"]
            },
            "status": {
              "type": "string",
              "enum": ["paused", "active", "completed", "deleted", "closed"]
            },
            "target": {
              "type": "object",
              "properties": {
                "worker": {
                  "$ref": "#/definitions/__schema6"
                }
              },
              "required": ["worker"],
              "additionalProperties": false
            },
            "task": {
              "$ref": "#/definitions/__schema0"
            },
            "template": {
              "type": "object",
              "properties": {
                "request": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema6"
                    },
                    "agent": {
                      "$ref": "#/definitions/__schema6"
                    },
                    "task": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "origin": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema7"
                        }
                      ]
                    },
                    "messageId": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    },
                    "after": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/__schema6"
                          },
                          {
                            "$ref": "#/definitions/__schema7"
                          }
                        ]
                      }
                    },
                    "inputs": {
                      "default": [],
                      "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema8"
                        }
                      ]
                    },
                    "workspace": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema9"
                        }
                      ]
                    },
                    "observeWorkspace": {
                      "type": "boolean"
                    },
                    "model": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema10"
                        }
                      ]
                    },
                    "backend": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema11"
                        }
                      ]
                    },
                    "lifetime": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema12"
                        }
                      ]
                    },
                    "context": {
                      "default": [],
                      "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema13"
                        }
                      ]
                    },
                    "inheritContext": {
                      "type": "string",
                      "enum": ["none", "parent"]
                    },
                    "memory": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema14"
                        }
                      ]
                    },
                    "delegation": {
                      "type": "object",
                      "properties": {
                        "maxDepth": {
                          "$ref": "#/definitions/__schema1"
                        }
                      },
                      "required": ["maxDepth"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["id", "agent", "task"],
                  "additionalProperties": false
                },
                "worker": {
                  "$ref": "#/definitions/__schema16"
                }
              },
              "required": ["request", "worker"],
              "additionalProperties": false
            },
            "nextAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastLocalKey": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "activatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "occurrences": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema19"
              }
            }
          },
          "required": [
            "id",
            "sessionId",
            "revision",
            "trigger",
            "overlap",
            "status",
            "target",
            "task",
            "nextAt",
            "occurrences"
          ],
          "additionalProperties": false
        },
        "__schema6": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema7": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "$ref": "#/definitions/__schema6"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema8": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema7"
          }
        },
        "__schema9": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema10": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema0"
            },
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema11": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema12": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "__schema13": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema14": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema15"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "__schema15": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema16": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema6"
            },
            "agent": {
              "$ref": "#/definitions/__schema6"
            },
            "definition": {
              "$ref": "#/definitions/__schema17"
            },
            "color": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "accent.blue",
                    "accent.cyan",
                    "accent.green",
                    "accent.yellow",
                    "accent.orange",
                    "accent.red",
                    "accent.pink",
                    "accent.purple"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                }
              ]
            },
            "loadout": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema10"
                }
              ]
            },
            "fallbacks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema10"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "access": {
              "$ref": "#/definitions/__schema15"
            },
            "workspace": {
              "$ref": "#/definitions/__schema9"
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "backend": {
              "$ref": "#/definitions/__schema11"
            },
            "lifetime": {
              "$ref": "#/definitions/__schema12"
            },
            "grants": {
              "$ref": "#/definitions/__schema18"
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "parentAssignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "depth": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "context": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "workspacePlan": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            }
          },
          "required": [
            "id",
            "agent",
            "definition",
            "fallbacks",
            "tools",
            "access",
            "workspace",
            "backend",
            "lifetime",
            "grants"
          ],
          "additionalProperties": false
        },
        "__schema17": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema3"
            },
            "size": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema18": {
          "type": "object",
          "properties": {
            "access": {
              "$ref": "#/definitions/__schema15"
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "workspaces": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema9"
              }
            },
            "inheritContext": {
              "type": "boolean"
            },
            "memory": {
              "$ref": "#/definitions/__schema14"
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema1"
                },
                "agents": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema6"
                  }
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "workspaces": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema9"
                  }
                }
              },
              "required": ["maxDepth", "agents", "tools", "workspaces"],
              "additionalProperties": false
            }
          },
          "required": ["access", "tools", "workspaces", "inheritContext", "memory", "delegation"],
          "additionalProperties": false
        },
        "__schema19": {
          "type": "object",
          "properties": {
            "scheduledAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "status": {
              "type": "string",
              "enum": ["accepted", "skipped", "missed"]
            },
            "ref": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "through": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": ["scheduledAt", "status"],
          "additionalProperties": false
        },
        "__schema20": {
          "type": "object",
          "properties": {
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "sequence": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "task": {
              "$ref": "#/definitions/__schema0"
            },
            "after": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema7"
              }
            },
            "inputs": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema7"
              }
            },
            "context": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "execution": {
              "$ref": "#/definitions/__schema21"
            }
          },
          "required": ["ref", "sequence", "task", "after", "inputs", "context", "execution"],
          "additionalProperties": false
        },
        "__schema21": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "queued"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "preparing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "running"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "stopping"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "finalizing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "ended"
                },
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled", "interrupted"]
                },
                "cleanup": {
                  "type": "string",
                  "enum": ["confirmed", "unconfirmed"]
                }
              },
              "required": ["phase", "reason", "cleanup"],
              "additionalProperties": false
            }
          ]
        },
        "__schema22": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "target": {
              "$ref": "#/definitions/__schema7"
            },
            "sender": {
              "$ref": "#/definitions/__schema0"
            },
            "kind": {
              "type": "string",
              "enum": ["initial", "follow_up", "steer", "notice"]
            },
            "text": {
              "$ref": "#/definitions/__schema0"
            },
            "state": {
              "type": "string",
              "enum": [
                "recorded",
                "dispatch_intent",
                "transport_queued",
                "transport_handled",
                "consumed",
                "uncertain"
              ]
            },
            "attempts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "dispatch_intent",
                      "transport_queued",
                      "transport_handled",
                      "consumed",
                      "uncertain"
                    ]
                  },
                  "checkpoint": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema17"
                      }
                    ]
                  }
                },
                "required": ["id", "state"],
                "additionalProperties": false
              }
            }
          },
          "required": ["id", "target", "sender", "kind", "text", "state", "attempts"],
          "additionalProperties": false
        },
        "__schema23": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "requestId": {
              "$ref": "#/definitions/__schema0"
            },
            "command": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "apply"
                    },
                    "ref": {
                      "$ref": "#/definitions/__schema7"
                    },
                    "destination": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "required": ["kind", "ref", "destination"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "rollback"
                    },
                    "operation": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "destination": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "required": ["kind", "operation", "destination"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "reconcile"
                    },
                    "operation": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "owner": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "required": ["kind", "operation", "owner"],
                  "additionalProperties": false
                }
              ]
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema0"
            },
            "destination": {
              "$ref": "#/definitions/__schema0"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "snapshot": {
              "$ref": "#/definitions/__schema17"
            },
            "targetOperation": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": [
            "id",
            "requestId",
            "command",
            "ownerEpoch",
            "destination",
            "ref",
            "snapshot"
          ],
          "additionalProperties": false
        },
        "__schema24": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": ["applied", "rolled_back", "already_recorded"]
                },
                "operationId": {
                  "$ref": "#/definitions/__schema0"
                },
                "destination": {
                  "$ref": "#/definitions/__schema0"
                },
                "revision": {
                  "$ref": "#/definitions/__schema1"
                },
                "snapshot": {
                  "$ref": "#/definitions/__schema17"
                },
                "freshness": {
                  "type": "string",
                  "enum": ["matching", "changed", "unknown"]
                }
              },
              "required": [
                "status",
                "operationId",
                "destination",
                "revision",
                "snapshot",
                "freshness"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "__schema25": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "invalid_input",
                "dependency_missing",
                "capability_denied",
                "unsupported",
                "conflict",
                "owner_unconfirmed",
                "context_unavailable",
                "commit_unknown"
              ]
            },
            "message": {
              "$ref": "#/definitions/__schema0"
            },
            "field": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": ["code", "message"],
          "additionalProperties": false
        },
        "__schema26": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema17"
            }
          ]
        },
        "__schema27": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "kind": {
              "type": "string",
              "enum": [
                "prepare",
                "launch",
                "steer",
                "cleanup",
                "checkpoint",
                "capture",
                "notification"
              ]
            },
            "input": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            }
          },
          "required": ["id", "ref", "kind"],
          "additionalProperties": false
        },
        "__schema28": {
          "type": "object",
          "properties": {
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "summary": {
              "type": "string"
            },
            "execution": {
              "$ref": "#/definitions/__schema21"
            },
            "report": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "reportingError": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "finalizationErrors": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            },
            "transcript": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "session": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "usage": {
              "$ref": "#/definitions/__schema29"
            }
          },
          "required": ["ref", "summary", "execution", "artifacts", "usage"],
          "additionalProperties": false
        },
        "__schema29": {
          "type": "object",
          "properties": {
            "expectedAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "observations": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema30"
              }
            },
            "complete": {
              "type": "boolean"
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "total": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema31"
                },
                {
                  "type": "null"
                }
              ]
            },
            "observedTotal": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema31"
                },
                {
                  "type": "null"
                }
              ]
            },
            "missingAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            }
          },
          "required": ["expectedAttempts", "observations", "complete"],
          "additionalProperties": false
        },
        "__schema30": {
          "type": "object",
          "properties": {
            "attempt": {
              "$ref": "#/definitions/__schema0"
            },
            "source": {
              "$ref": "#/definitions/__schema0"
            },
            "usage": {
              "$ref": "#/definitions/__schema31"
            },
            "kind": {
              "$ref": "#/definitions/__schema32"
            },
            "responseId": {
              "$ref": "#/definitions/__schema33"
            }
          },
          "required": ["attempt", "source", "usage"],
          "additionalProperties": false
        },
        "__schema31": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema1"
            },
            "output": {
              "$ref": "#/definitions/__schema1"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema1"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema1"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema32": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema33": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        },
        "__schema34": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "ref": {
              "$ref": "#/definitions/__schema7"
            },
            "ordinal": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "backend": {
              "$ref": "#/definitions/__schema11"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["id", "ref", "ordinal", "backend", "ownerEpoch"],
          "additionalProperties": false
        },
        "__schema35": {
          "type": "object",
          "properties": {
            "cwd": {
              "$ref": "#/definitions/__schema0"
            },
            "identity": {
              "$ref": "#/definitions/__schema0"
            },
            "lease": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "workspace": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["id", "workspace"],
              "additionalProperties": false
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            }
          },
          "required": ["cwd", "identity", "artifacts"],
          "additionalProperties": false
        },
        "__schema36": {
          "type": "object",
          "properties": {
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "errors": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            }
          },
          "required": ["artifacts"],
          "additionalProperties": false
        },
        "__schema37": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "kind": {
              "$ref": "#/definitions/__schema11"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["id", "kind", "ownerEpoch"],
          "additionalProperties": false
        },
        "__schema38": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "enum": ["completed", "failed", "cancelled"]
            },
            "summary": {
              "type": "string"
            },
            "usage": {
              "$ref": "#/definitions/__schema29"
            },
            "report": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "reportingError": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "session": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema39"
                }
              ]
            },
            "transcript": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema17"
                }
              ]
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema17"
              }
            },
            "error": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": ["reason", "summary", "usage", "artifacts"],
          "additionalProperties": false
        },
        "__schema39": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema0"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema17"
                },
                "branch": {
                  "$ref": "#/definitions/__schema0"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema40"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema0"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema17"
                },
                "branch": {
                  "$ref": "#/definitions/__schema0"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema40"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema0"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "__schema40": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema17"
            }
          ]
        },
        "__schema41": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "stopped"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema0"
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema17"
                  }
                }
              },
              "required": ["status", "ownerEpoch", "identities", "evidence"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "unconfirmed"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema0"
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "reasons": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema17"
                  }
                }
              },
              "required": ["status", "ownerEpoch", "identities", "reasons", "evidence"],
              "additionalProperties": false
            }
          ]
        },
        "__schema42": {
          "type": "object",
          "properties": {
            "tokens": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema1"
                },
                {
                  "type": "null"
                }
              ]
            },
            "window": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "percent": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "source": {
              "$ref": "#/definitions/__schema0"
            },
            "timestamp": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": ["tokens", "window", "percent", "source", "timestamp"],
          "additionalProperties": false
        },
        "__schema43": {
          "type": "string",
          "enum": ["dispatch_intent", "delivered", "consumed", "uncertain"]
        }
      }
    },
    "pinata.query.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "wait"
            },
            "wait": {
              "type": "object",
              "properties": {
                "workers": {
                  "$ref": "#/definitions/__schema0"
                },
                "targets": {
                  "$ref": "#/definitions/__schema2"
                },
                "next": {
                  "$ref": "#/definitions/__schema6"
                }
              },
              "additionalProperties": false
            }
          },
          "required": ["kind", "wait"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "status"
            }
          },
          "required": ["kind"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "config"
            }
          },
          "required": ["kind"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "receipt"
            },
            "requestId": {
              "$ref": "#/definitions/__schema4"
            }
          },
          "required": ["kind", "requestId"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "result"
            },
            "ref": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["kind", "ref"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "events"
            },
            "since": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            }
          },
          "required": ["kind"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "schemas"
            },
            "name": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            }
          },
          "required": ["kind"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "definitions"
            }
          },
          "required": ["kind"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "conversation"
            },
            "ref": {
              "$ref": "#/definitions/__schema3"
            },
            "cursor": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            }
          },
          "required": ["kind", "ref"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "changes"
            },
            "ref": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["kind", "ref"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "application"
            },
            "operationId": {
              "$ref": "#/definitions/__schema4"
            }
          },
          "required": ["kind", "operationId"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema1"
          }
        },
        "__schema1": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema2": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema3"
          }
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema4"
            },
            "worker": {
              "$ref": "#/definitions/__schema1"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "string",
          "minLength": 1
        },
        "__schema5": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema6": {
          "default": false,
          "type": "boolean"
        }
      }
    },
    "pinata.query-result.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "config"
            },
            "config": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "schemaVersion": {
                      "default": 1,
                      "type": "number",
                      "const": 1
                    },
                    "workspace": {
                      "default": "shared",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    },
                    "models": {
                      "default": {},
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "$ref": "#/definitions/__schema1"
                      }
                    },
                    "fallbacks": {
                      "default": {},
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema1"
                        }
                      }
                    },
                    "toolProviders": {
                      "default": {},
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "extension": {
                            "$ref": "#/definitions/__schema2"
                          },
                          "tools": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema2"
                            }
                          }
                        },
                        "required": ["extension", "tools"],
                        "additionalProperties": false
                      }
                    },
                    "passEnv": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Z0-9_]*$"
                      }
                    },
                    "webExtension": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    },
                    "setup": {
                      "anyOf": [
                        {
                          "type": "boolean",
                          "const": false
                        },
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    },
                    "worktreeRoot": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    },
                    "codemode": {
                      "default": true,
                      "type": "boolean"
                    },
                    "includeUncommitted": {
                      "default": true,
                      "type": "boolean"
                    },
                    "mode": {
                      "default": "lean",
                      "type": "string",
                      "enum": ["lean", "observe"]
                    },
                    "backend": {
                      "default": "in-process",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema4"
                        }
                      ]
                    },
                    "execution": {
                      "default": {
                        "maxConcurrent": null
                      },
                      "type": "object",
                      "properties": {
                        "maxConcurrent": {
                          "default": null,
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema5"
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "ui": {
                      "default": {
                        "palette": "inherit",
                        "motion": "full",
                        "keys": {}
                      },
                      "type": "object",
                      "properties": {
                        "palette": {
                          "default": "inherit",
                          "type": "string",
                          "enum": [
                            "inherit",
                            "pinata",
                            "catppuccin-mocha",
                            "catppuccin-latte",
                            "gruvbox-dark",
                            "gruvbox-light",
                            "tokyo-night-night",
                            "rose-pine-main",
                            "rose-pine-dawn",
                            "dracula",
                            "nord",
                            "one-dark",
                            "one-light",
                            "solarized-dark",
                            "solarized-light",
                            "terminal-default"
                          ]
                        },
                        "motion": {
                          "default": "full",
                          "type": "string",
                          "enum": ["full", "reduced", "off"]
                        },
                        "keys": {
                          "default": {},
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "$ref": "#/definitions/__schema2"
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["kind", "config"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "changes"
            },
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "source": {
              "type": "string",
              "enum": ["snapshot", "unavailable"]
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "mode": {
              "type": "string",
              "enum": ["shared", "worktree"]
            },
            "changes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "before": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema10"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "after": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/__schema10"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": ["path", "before", "after"],
                "additionalProperties": false
              }
            }
          },
          "required": ["kind", "ref", "source", "changes"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "application"
            },
            "operation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema13"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["kind", "operation"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "wait"
            },
            "wait": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": ["settled", "nothing_pending", "aborted"]
                },
                "targets": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema6"
                  }
                },
                "results": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema19"
                  }
                },
                "cursor": {
                  "$ref": "#/definitions/__schema5"
                }
              },
              "required": ["status", "targets", "results", "cursor"],
              "additionalProperties": false
            }
          },
          "required": ["kind", "wait"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "status"
            },
            "state": {
              "$ref": "#/definitions/__schema26"
            }
          },
          "required": ["kind", "state"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "receipt"
            },
            "receipt": {
              "anyOf": [
                {
                  "oneOf": [
                    {
                      "$ref": "#/definitions/__schema35"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "rejected"
                        },
                        "requestId": {
                          "$ref": "#/definitions/__schema2"
                        },
                        "revision": {
                          "$ref": "#/definitions/__schema5"
                        },
                        "error": {
                          "$ref": "#/definitions/__schema17"
                        }
                      },
                      "required": ["status", "requestId", "revision", "error"],
                      "additionalProperties": false
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["kind", "receipt"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "result"
            },
            "result": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema19"
                },
                {
                  "type": "null"
                }
              ]
            },
            "artifact": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            }
          },
          "required": ["kind", "result"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "conversation"
            },
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "source": {
              "type": "string",
              "enum": ["assignment", "checkpoint", "unavailable"]
            },
            "entries": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema51"
              }
            },
            "artifact": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "cursor": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "complete": {
              "type": "boolean"
            }
          },
          "required": ["kind", "ref", "source", "entries", "complete"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "definitions"
            },
            "definitions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "definition": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "name": {
                        "$ref": "#/definitions/__schema7"
                      },
                      "instructions": {
                        "type": "string"
                      },
                      "handoffDescription": {
                        "$ref": "#/definitions/__schema2"
                      },
                      "model": {
                        "type": "string",
                        "pattern": "^[^/\\s]+\\/.+$"
                      },
                      "modelSettings": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "reasoning": {
                            "type": "object",
                            "properties": {
                              "effort": {
                                "$ref": "#/definitions/__schema3"
                              }
                            },
                            "required": ["effort"],
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false
                      },
                      "tools": {
                        "default": [],
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema2"
                        }
                      },
                      "handoffs": {
                        "default": [],
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema7"
                        }
                      },
                      "outputType": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema2"
                          }
                        ]
                      },
                      "pinata": {
                        "default": {
                          "access": "read",
                          "workspace": "shared",
                          "skills": [],
                          "fallbacks": [],
                          "inheritContext": "none",
                          "memory": {
                            "scope": "none",
                            "access": "read"
                          },
                          "delegation": {
                            "maxDepth": 0
                          },
                          "checkpoint": "completion"
                        },
                        "type": "object",
                        "properties": {
                          "access": {
                            "default": "read",
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema29"
                              }
                            ]
                          },
                          "workspace": {
                            "default": "shared",
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema0"
                              }
                            ]
                          },
                          "skills": {
                            "default": [],
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema2"
                            }
                          },
                          "fallbacks": {
                            "default": [],
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema1"
                            }
                          },
                          "color": {
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema28"
                              }
                            ]
                          },
                          "inheritContext": {
                            "default": "none",
                            "type": "string",
                            "enum": ["none", "parent"]
                          },
                          "memory": {
                            "default": {
                              "scope": "none",
                              "access": "read"
                            },
                            "allOf": [
                              {
                                "$ref": "#/definitions/__schema32"
                              }
                            ]
                          },
                          "delegation": {
                            "default": {
                              "maxDepth": 0
                            },
                            "type": "object",
                            "properties": {
                              "maxDepth": {
                                "$ref": "#/definitions/__schema5"
                              }
                            },
                            "required": ["maxDepth"],
                            "additionalProperties": false
                          },
                          "checkpoint": {
                            "default": "completion",
                            "type": "string",
                            "enum": ["completion", "none"]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": ["schemaVersion", "name", "instructions", "handoffDescription"],
                    "additionalProperties": false
                  },
                  "path": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "digest": {
                    "$ref": "#/definitions/__schema9"
                  },
                  "outputSchema": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "required": ["definition", "path", "digest"],
                "additionalProperties": false
              }
            },
            "launch": {
              "type": "object",
              "properties": {
                "parentContextAvailable": {
                  "type": "boolean"
                },
                "grants": {
                  "$ref": "#/definitions/__schema31"
                },
                "backend": {
                  "type": "string"
                },
                "workspace": {
                  "type": "string"
                },
                "parentModel": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                },
                "models": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "backends": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "available": {
                        "type": "boolean"
                      },
                      "reason": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema2"
                          }
                        ]
                      },
                      "steer": {
                        "type": "boolean"
                      },
                      "continuation": {
                        "type": "boolean"
                      },
                      "conversationSeed": {
                        "type": "boolean"
                      },
                      "skills": {
                        "type": "boolean"
                      },
                      "memory": {
                        "type": "boolean"
                      },
                      "delegation": {
                        "type": "boolean"
                      },
                      "fallbacks": {
                        "type": "boolean"
                      },
                      "surviving": {
                        "type": "boolean"
                      },
                      "cleanup": {
                        "type": "string",
                        "enum": ["confirmed", "unverified"]
                      }
                    },
                    "required": [
                      "available",
                      "steer",
                      "continuation",
                      "conversationSeed",
                      "surviving",
                      "cleanup"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "parentContextAvailable",
                "grants",
                "backend",
                "workspace",
                "models",
                "backends"
              ],
              "additionalProperties": false
            }
          },
          "required": ["kind", "definitions"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "events"
            },
            "events": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "kind": {
                        "type": "string",
                        "const": "committed"
                      },
                      "id": {
                        "$ref": "#/definitions/__schema2"
                      },
                      "revision": {
                        "exclusiveMinimum": 0,
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema5"
                          }
                        ]
                      },
                      "ownerEpoch": {
                        "$ref": "#/definitions/__schema2"
                      },
                      "transition": {
                        "oneOf": [
                          {
                            "$ref": "#/definitions/__schema52"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "schedule_changed"
                              },
                              "requestId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "payloadDigest": {
                                "$ref": "#/definitions/__schema9"
                              },
                              "receipt": {
                                "$ref": "#/definitions/__schema35"
                              },
                              "action": {
                                "type": "string",
                                "enum": [
                                  "create",
                                  "update",
                                  "pause",
                                  "resume",
                                  "delete",
                                  "close",
                                  "recover",
                                  "list"
                                ]
                              },
                              "schedule": {
                                "allOf": [
                                  {
                                    "$ref": "#/definitions/__schema36"
                                  }
                                ]
                              }
                            },
                            "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "schedule_occurrence"
                              },
                              "requestId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "payloadDigest": {
                                "$ref": "#/definitions/__schema9"
                              },
                              "receipt": {
                                "$ref": "#/definitions/__schema35"
                              },
                              "scheduleId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "occurrence": {
                                "$ref": "#/definitions/__schema39"
                              },
                              "nextAt": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lastLocalKey": {
                                "allOf": [
                                  {
                                    "$ref": "#/definitions/__schema2"
                                  }
                                ]
                              },
                              "acceptance": {
                                "allOf": [
                                  {
                                    "$ref": "#/definitions/__schema52"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "kind",
                              "requestId",
                              "payloadDigest",
                              "receipt",
                              "scheduleId",
                              "occurrence",
                              "nextAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "control_accepted"
                              },
                              "requestId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "payloadDigest": {
                                "$ref": "#/definitions/__schema9"
                              },
                              "receipt": {
                                "$ref": "#/definitions/__schema35"
                              },
                              "action": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "cancel"
                                      },
                                      "targets": {
                                        "type": "array",
                                        "items": {
                                          "$ref": "#/definitions/__schema6"
                                        }
                                      }
                                    },
                                    "required": ["kind", "targets"],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "background"
                                      }
                                    },
                                    "required": ["kind"],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "capacity"
                                      },
                                      "maxConcurrent": {
                                        "anyOf": [
                                          {
                                            "exclusiveMinimum": 0,
                                            "allOf": [
                                              {
                                                "$ref": "#/definitions/__schema5"
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": ["kind", "maxConcurrent"],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "application_accepted"
                              },
                              "requestId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "payloadDigest": {
                                "$ref": "#/definitions/__schema9"
                              },
                              "receipt": {
                                "$ref": "#/definitions/__schema35"
                              },
                              "intent": {
                                "$ref": "#/definitions/__schema14"
                              }
                            },
                            "required": ["kind", "requestId", "payloadDigest", "receipt", "intent"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "application_observed"
                              },
                              "operationId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "observation": {
                                "type": "object",
                                "properties": {
                                  "status": {
                                    "type": "string",
                                    "enum": ["completed", "failed", "uncertain"]
                                  },
                                  "receipt": {
                                    "$ref": "#/definitions/__schema15"
                                  },
                                  "error": {
                                    "$ref": "#/definitions/__schema16"
                                  },
                                  "evidence": {
                                    "$ref": "#/definitions/__schema18"
                                  }
                                },
                                "required": ["status"],
                                "additionalProperties": false
                              }
                            },
                            "required": ["kind", "operationId", "observation"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "effect_intent"
                              },
                              "effect": {
                                "$ref": "#/definitions/__schema40"
                              }
                            },
                            "required": ["kind", "effect"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "effect_observed"
                              },
                              "effectId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "status": {
                                "type": "string",
                                "enum": ["completed", "failed", "uncertain"]
                              },
                              "detail": {
                                "type": "string"
                              }
                            },
                            "required": ["kind", "effectId", "status"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "assignment_state"
                              },
                              "ref": {
                                "$ref": "#/definitions/__schema6"
                              },
                              "execution": {
                                "$ref": "#/definitions/__schema20"
                              }
                            },
                            "required": ["kind", "ref", "execution"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "settled"
                              },
                              "result": {
                                "$ref": "#/definitions/__schema19"
                              },
                              "resultArtifact": {
                                "$ref": "#/definitions/__schema8"
                              },
                              "notificationId": {
                                "$ref": "#/definitions/__schema2"
                              }
                            },
                            "required": ["kind", "result", "resultArtifact", "notificationId"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "inbox_state"
                              },
                              "messageId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "dispatch_intent",
                                  "transport_queued",
                                  "transport_handled",
                                  "consumed",
                                  "uncertain"
                                ]
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "checkpoint": {
                                "allOf": [
                                  {
                                    "$ref": "#/definitions/__schema8"
                                  }
                                ]
                              }
                            },
                            "required": ["kind", "messageId", "state", "attemptId"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "inbox_not_delivered"
                              },
                              "messageId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "receipt": {
                                "$ref": "#/definitions/__schema8"
                              }
                            },
                            "required": ["kind", "messageId", "attemptId", "receipt"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "capacity_changed"
                              },
                              "maxConcurrent": {
                                "anyOf": [
                                  {
                                    "exclusiveMinimum": 0,
                                    "allOf": [
                                      {
                                        "$ref": "#/definitions/__schema5"
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": ["kind", "maxConcurrent"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "attempt_started"
                              },
                              "attempt": {
                                "$ref": "#/definitions/__schema41"
                              }
                            },
                            "required": ["kind", "attempt"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "workspace_prepared"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "prepared": {
                                "$ref": "#/definitions/__schema42"
                              }
                            },
                            "required": ["kind", "attemptId", "prepared"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "workspace_captured"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "capture": {
                                "$ref": "#/definitions/__schema43"
                              }
                            },
                            "required": ["kind", "attemptId", "capture"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "workspace_recovered"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "prepared": {
                                "$ref": "#/definitions/__schema42"
                              },
                              "evidence": {
                                "minItems": 1,
                                "type": "array",
                                "items": {
                                  "$ref": "#/definitions/__schema8"
                                }
                              }
                            },
                            "required": ["kind", "attemptId", "prepared", "evidence"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "backend_enrolled"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "identity": {
                                "$ref": "#/definitions/__schema44"
                              },
                              "evidence": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/definitions/__schema8"
                                }
                              }
                            },
                            "required": ["kind", "attemptId", "identity", "evidence"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "attempt_outcome"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "outcome": {
                                "$ref": "#/definitions/__schema45"
                              },
                              "artifact": {
                                "$ref": "#/definitions/__schema8"
                              }
                            },
                            "required": ["kind", "attemptId", "outcome", "artifact"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "cleanup_observed"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "receipt": {
                                "$ref": "#/definitions/__schema48"
                              }
                            },
                            "required": ["kind", "attemptId", "receipt"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "session_checkpoint"
                              },
                              "worker": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "checkpoint": {
                                "$ref": "#/definitions/__schema46"
                              }
                            },
                            "required": ["kind", "worker", "checkpoint"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "usage_observed"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "observation": {
                                "$ref": "#/definitions/__schema22"
                              }
                            },
                            "required": ["kind", "attemptId", "observation"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "response_observed"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "responseId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "status": {
                                "type": "string",
                                "enum": ["started", "completed", "interrupted"]
                              }
                            },
                            "required": ["kind", "attemptId", "responseId", "status"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "context_observed"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "context": {
                                "$ref": "#/definitions/__schema49"
                              }
                            },
                            "required": ["kind", "attemptId", "context"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "outbox_state"
                              },
                              "notificationId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "attemptId": {
                                "$ref": "#/definitions/__schema2"
                              },
                              "state": {
                                "$ref": "#/definitions/__schema50"
                              },
                              "checkpoint": {
                                "allOf": [
                                  {
                                    "$ref": "#/definitions/__schema8"
                                  }
                                ]
                              }
                            },
                            "required": ["kind", "notificationId", "attemptId", "state"],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "kind",
                      "id",
                      "revision",
                      "ownerEpoch",
                      "transition"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "kind": {
                        "type": "string",
                        "const": "snapshot"
                      },
                      "id": {
                        "$ref": "#/definitions/__schema2"
                      },
                      "revision": {
                        "$ref": "#/definitions/__schema5"
                      },
                      "ownerEpoch": {
                        "$ref": "#/definitions/__schema2"
                      },
                      "snapshot": {
                        "$ref": "#/definitions/__schema26"
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "kind",
                      "id",
                      "revision",
                      "ownerEpoch",
                      "snapshot"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "kind": {
                        "type": "string",
                        "const": "activity"
                      },
                      "source": {
                        "$ref": "#/definitions/__schema2"
                      },
                      "ordinal": {
                        "$ref": "#/definitions/__schema5"
                      },
                      "ownerEpoch": {
                        "$ref": "#/definitions/__schema2"
                      },
                      "revision": {
                        "$ref": "#/definitions/__schema5"
                      },
                      "ref": {
                        "$ref": "#/definitions/__schema6"
                      },
                      "text": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "kind",
                      "source",
                      "ordinal",
                      "ownerEpoch",
                      "revision",
                      "ref",
                      "text"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "cursor": {
              "$ref": "#/definitions/__schema5"
            }
          },
          "required": ["kind", "events", "cursor"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "schemas"
            },
            "schemas": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema53"
              }
            }
          },
          "required": ["kind", "schemas"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema2"
            },
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "thinking": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "string",
          "minLength": 1
        },
        "__schema3": {
          "type": "string",
          "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
        },
        "__schema4": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema5": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema6": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema2"
            },
            "worker": {
              "$ref": "#/definitions/__schema7"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema7": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema8": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema9"
            },
            "size": {
              "$ref": "#/definitions/__schema5"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema9": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema10": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema2"
                },
                "blob": {
                  "$ref": "#/definitions/__schema8"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema11"
                },
                "mode": {
                  "type": "string",
                  "const": "100644"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema2"
                },
                "blob": {
                  "$ref": "#/definitions/__schema8"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema11"
                },
                "mode": {
                  "type": "string",
                  "const": "100755"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema2"
                },
                "blob": {
                  "$ref": "#/definitions/__schema8"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema11"
                },
                "mode": {
                  "type": "string",
                  "const": "120000"
                }
              },
              "required": ["path", "blob", "mode"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "$ref": "#/definitions/__schema2"
                },
                "mode": {
                  "type": "string",
                  "const": "160000"
                },
                "objectId": {
                  "$ref": "#/definitions/__schema12"
                }
              },
              "required": ["path", "mode", "objectId"],
              "additionalProperties": false
            }
          ]
        },
        "__schema11": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema12"
            }
          ]
        },
        "__schema12": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        },
        "__schema13": {
          "type": "object",
          "properties": {
            "intent": {
              "$ref": "#/definitions/__schema14"
            },
            "status": {
              "type": "string",
              "enum": ["pending", "completed", "failed", "uncertain"]
            },
            "receipt": {
              "$ref": "#/definitions/__schema15"
            },
            "error": {
              "$ref": "#/definitions/__schema16"
            },
            "evidence": {
              "$ref": "#/definitions/__schema18"
            }
          },
          "required": ["intent", "status"],
          "additionalProperties": false
        },
        "__schema14": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "requestId": {
              "$ref": "#/definitions/__schema2"
            },
            "command": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "apply"
                    },
                    "ref": {
                      "$ref": "#/definitions/__schema6"
                    },
                    "destination": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["kind", "ref", "destination"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "rollback"
                    },
                    "operation": {
                      "$ref": "#/definitions/__schema2"
                    },
                    "destination": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["kind", "operation", "destination"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "reconcile"
                    },
                    "operation": {
                      "$ref": "#/definitions/__schema2"
                    },
                    "owner": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["kind", "operation", "owner"],
                  "additionalProperties": false
                }
              ]
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema2"
            },
            "destination": {
              "$ref": "#/definitions/__schema2"
            },
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "snapshot": {
              "$ref": "#/definitions/__schema8"
            },
            "targetOperation": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": [
            "id",
            "requestId",
            "command",
            "ownerEpoch",
            "destination",
            "ref",
            "snapshot"
          ],
          "additionalProperties": false
        },
        "__schema15": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": ["applied", "rolled_back", "already_recorded"]
                },
                "operationId": {
                  "$ref": "#/definitions/__schema2"
                },
                "destination": {
                  "$ref": "#/definitions/__schema2"
                },
                "revision": {
                  "$ref": "#/definitions/__schema5"
                },
                "snapshot": {
                  "$ref": "#/definitions/__schema8"
                },
                "freshness": {
                  "type": "string",
                  "enum": ["matching", "changed", "unknown"]
                }
              },
              "required": [
                "status",
                "operationId",
                "destination",
                "revision",
                "snapshot",
                "freshness"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "__schema16": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema17"
            }
          ]
        },
        "__schema17": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "invalid_input",
                "dependency_missing",
                "capability_denied",
                "unsupported",
                "conflict",
                "owner_unconfirmed",
                "context_unavailable",
                "commit_unknown"
              ]
            },
            "message": {
              "$ref": "#/definitions/__schema2"
            },
            "field": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["code", "message"],
          "additionalProperties": false
        },
        "__schema18": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema8"
            }
          ]
        },
        "__schema19": {
          "type": "object",
          "properties": {
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "summary": {
              "type": "string"
            },
            "execution": {
              "$ref": "#/definitions/__schema20"
            },
            "report": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "reportingError": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "finalizationErrors": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema8"
              }
            },
            "transcript": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "session": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "usage": {
              "$ref": "#/definitions/__schema21"
            }
          },
          "required": ["ref", "summary", "execution", "artifacts", "usage"],
          "additionalProperties": false
        },
        "__schema20": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "queued"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "preparing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "running"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "stopping"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "finalizing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "ended"
                },
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled", "interrupted"]
                },
                "cleanup": {
                  "type": "string",
                  "enum": ["confirmed", "unconfirmed"]
                }
              },
              "required": ["phase", "reason", "cleanup"],
              "additionalProperties": false
            }
          ]
        },
        "__schema21": {
          "type": "object",
          "properties": {
            "expectedAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "observations": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema22"
              }
            },
            "complete": {
              "type": "boolean"
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "total": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema23"
                },
                {
                  "type": "null"
                }
              ]
            },
            "observedTotal": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema23"
                },
                {
                  "type": "null"
                }
              ]
            },
            "missingAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            }
          },
          "required": ["expectedAttempts", "observations", "complete"],
          "additionalProperties": false
        },
        "__schema22": {
          "type": "object",
          "properties": {
            "attempt": {
              "$ref": "#/definitions/__schema2"
            },
            "source": {
              "$ref": "#/definitions/__schema2"
            },
            "usage": {
              "$ref": "#/definitions/__schema23"
            },
            "kind": {
              "$ref": "#/definitions/__schema24"
            },
            "responseId": {
              "$ref": "#/definitions/__schema25"
            }
          },
          "required": ["attempt", "source", "usage"],
          "additionalProperties": false
        },
        "__schema23": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema5"
            },
            "output": {
              "$ref": "#/definitions/__schema5"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema5"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema5"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema24": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema25": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "__schema26": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema2"
            },
            "revision": {
              "$ref": "#/definitions/__schema5"
            },
            "nextSequence": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "workers": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema27"
              }
            },
            "assignments": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema33"
              }
            },
            "latest": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "exclusiveMinimum": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema5"
                  }
                ]
              }
            },
            "inbox": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema34"
              }
            },
            "receipts": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "payloadDigest": {
                    "$ref": "#/definitions/__schema9"
                  },
                  "receipt": {
                    "$ref": "#/definitions/__schema35"
                  }
                },
                "required": ["payloadDigest", "receipt"],
                "additionalProperties": false
              }
            },
            "effects": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "effect": {
                    "$ref": "#/definitions/__schema40"
                  },
                  "status": {
                    "type": "string",
                    "enum": ["intent", "completed", "failed", "uncertain"]
                  },
                  "detail": {
                    "type": "string"
                  }
                },
                "required": ["effect", "status"],
                "additionalProperties": false
              }
            },
            "applications": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema13"
              }
            },
            "schedules": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema36"
              }
            },
            "attempts": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "attempt": {
                    "$ref": "#/definitions/__schema41"
                  },
                  "prepared": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema42"
                      }
                    ]
                  },
                  "capture": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema43"
                      }
                    ]
                  },
                  "identity": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema44"
                      }
                    ]
                  },
                  "enrollmentEvidence": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema8"
                    }
                  },
                  "outcome": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema45"
                      }
                    ]
                  },
                  "outcomeArtifact": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema8"
                      }
                    ]
                  },
                  "cleanup": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema48"
                      }
                    ]
                  },
                  "usageObservations": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema22"
                    }
                  },
                  "responses": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": ["started", "completed", "interrupted"]
                    }
                  }
                },
                "required": ["attempt", "enrollmentEvidence", "usageObservations", "responses"],
                "additionalProperties": false
              }
            },
            "sessions": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema46"
              }
            },
            "contextUsage": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema49"
              }
            },
            "cancelled": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "required": ["requestId"],
                "additionalProperties": false
              }
            },
            "attachment": {
              "type": "string",
              "enum": ["foreground", "background"]
            },
            "results": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "result": {
                    "$ref": "#/definitions/__schema19"
                  },
                  "artifact": {
                    "$ref": "#/definitions/__schema8"
                  }
                },
                "required": ["result", "artifact"],
                "additionalProperties": false
              }
            },
            "outbox": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema6"
                  },
                  "result": {
                    "$ref": "#/definitions/__schema8"
                  },
                  "state": {
                    "type": "string",
                    "enum": ["recorded", "dispatch_intent", "delivered", "consumed", "uncertain"]
                  },
                  "attempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/definitions/__schema2"
                        },
                        "state": {
                          "$ref": "#/definitions/__schema50"
                        },
                        "checkpoint": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema8"
                            }
                          ]
                        }
                      },
                      "required": ["id", "state"],
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["ref", "result", "state", "attempts"],
                "additionalProperties": false
              }
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema5"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "history": {
              "type": "object",
              "properties": {
                "source": {
                  "$ref": "#/definitions/__schema8"
                },
                "quiescence": {
                  "$ref": "#/definitions/__schema8"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema2"
                }
              },
              "required": ["source", "quiescence", "requestId"],
              "additionalProperties": false
            }
          },
          "required": [
            "run",
            "revision",
            "nextSequence",
            "workers",
            "assignments",
            "latest",
            "inbox",
            "receipts",
            "effects",
            "attempts",
            "sessions",
            "contextUsage",
            "cancelled",
            "attachment",
            "results",
            "outbox",
            "maxConcurrent"
          ],
          "additionalProperties": false
        },
        "__schema27": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema7"
            },
            "agent": {
              "$ref": "#/definitions/__schema7"
            },
            "definition": {
              "$ref": "#/definitions/__schema8"
            },
            "color": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema28"
                }
              ]
            },
            "loadout": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "fallbacks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "access": {
              "$ref": "#/definitions/__schema29"
            },
            "workspace": {
              "$ref": "#/definitions/__schema0"
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "backend": {
              "$ref": "#/definitions/__schema4"
            },
            "lifetime": {
              "$ref": "#/definitions/__schema30"
            },
            "grants": {
              "$ref": "#/definitions/__schema31"
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "parentAssignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "depth": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "context": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "workspacePlan": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            }
          },
          "required": [
            "id",
            "agent",
            "definition",
            "fallbacks",
            "tools",
            "access",
            "workspace",
            "backend",
            "lifetime",
            "grants"
          ],
          "additionalProperties": false
        },
        "__schema28": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "accent.blue",
                "accent.cyan",
                "accent.green",
                "accent.yellow",
                "accent.orange",
                "accent.red",
                "accent.pink",
                "accent.purple"
              ]
            },
            {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$"
            }
          ]
        },
        "__schema29": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema30": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "__schema31": {
          "type": "object",
          "properties": {
            "access": {
              "$ref": "#/definitions/__schema29"
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            },
            "workspaces": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "inheritContext": {
              "type": "boolean"
            },
            "memory": {
              "$ref": "#/definitions/__schema32"
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema5"
                },
                "agents": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema7"
                  }
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "workspaces": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema0"
                  }
                }
              },
              "required": ["maxDepth", "agents", "tools", "workspaces"],
              "additionalProperties": false
            }
          },
          "required": ["access", "tools", "workspaces", "inheritContext", "memory", "delegation"],
          "additionalProperties": false
        },
        "__schema32": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema29"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "__schema33": {
          "type": "object",
          "properties": {
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "sequence": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "task": {
              "$ref": "#/definitions/__schema2"
            },
            "after": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema6"
              }
            },
            "inputs": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema6"
              }
            },
            "context": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "execution": {
              "$ref": "#/definitions/__schema20"
            }
          },
          "required": ["ref", "sequence", "task", "after", "inputs", "context", "execution"],
          "additionalProperties": false
        },
        "__schema34": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "target": {
              "$ref": "#/definitions/__schema6"
            },
            "sender": {
              "$ref": "#/definitions/__schema2"
            },
            "kind": {
              "type": "string",
              "enum": ["initial", "follow_up", "steer", "notice"]
            },
            "text": {
              "$ref": "#/definitions/__schema2"
            },
            "state": {
              "type": "string",
              "enum": [
                "recorded",
                "dispatch_intent",
                "transport_queued",
                "transport_handled",
                "consumed",
                "uncertain"
              ]
            },
            "attempts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "dispatch_intent",
                      "transport_queued",
                      "transport_handled",
                      "consumed",
                      "uncertain"
                    ]
                  },
                  "checkpoint": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema8"
                      }
                    ]
                  }
                },
                "required": ["id", "state"],
                "additionalProperties": false
              }
            }
          },
          "required": ["id", "target", "sender", "kind", "text", "state", "attempts"],
          "additionalProperties": false
        },
        "__schema35": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema2"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "operationId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "schedules": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema36"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema6"
              }
            },
            "resolved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema6"
                  },
                  "workspace": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "backend": {
                    "$ref": "#/definitions/__schema4"
                  },
                  "lifetime": {
                    "$ref": "#/definitions/__schema30"
                  },
                  "grants": {
                    "$ref": "#/definitions/__schema31"
                  }
                },
                "required": ["ref", "workspace", "backend", "lifetime", "grants"],
                "additionalProperties": false
              }
            }
          },
          "required": ["status", "requestId", "revision", "assignments", "resolved"],
          "additionalProperties": false
        },
        "__schema36": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema7"
            },
            "sessionId": {
              "$ref": "#/definitions/__schema2"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "trigger": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "at"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": ["kind", "at"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "interval"
                    },
                    "milliseconds": {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema5"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "milliseconds"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "cron"
                    },
                    "expression": {
                      "$ref": "#/definitions/__schema2"
                    },
                    "timezone": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["kind", "expression", "timezone"],
                  "additionalProperties": false
                }
              ]
            },
            "overlap": {
              "type": "string",
              "enum": ["skip", "queue"]
            },
            "status": {
              "type": "string",
              "enum": ["paused", "active", "completed", "deleted", "closed"]
            },
            "target": {
              "type": "object",
              "properties": {
                "worker": {
                  "$ref": "#/definitions/__schema7"
                }
              },
              "required": ["worker"],
              "additionalProperties": false
            },
            "task": {
              "$ref": "#/definitions/__schema2"
            },
            "template": {
              "type": "object",
              "properties": {
                "request": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema7"
                    },
                    "agent": {
                      "$ref": "#/definitions/__schema7"
                    },
                    "task": {
                      "$ref": "#/definitions/__schema2"
                    },
                    "origin": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema6"
                        }
                      ]
                    },
                    "messageId": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    },
                    "after": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/__schema7"
                          },
                          {
                            "$ref": "#/definitions/__schema6"
                          }
                        ]
                      }
                    },
                    "inputs": {
                      "default": [],
                      "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema37"
                        }
                      ]
                    },
                    "workspace": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema0"
                        }
                      ]
                    },
                    "observeWorkspace": {
                      "type": "boolean"
                    },
                    "model": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema1"
                        }
                      ]
                    },
                    "backend": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema4"
                        }
                      ]
                    },
                    "lifetime": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema30"
                        }
                      ]
                    },
                    "context": {
                      "default": [],
                      "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema38"
                        }
                      ]
                    },
                    "inheritContext": {
                      "type": "string",
                      "enum": ["none", "parent"]
                    },
                    "memory": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema32"
                        }
                      ]
                    },
                    "delegation": {
                      "type": "object",
                      "properties": {
                        "maxDepth": {
                          "$ref": "#/definitions/__schema5"
                        }
                      },
                      "required": ["maxDepth"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["id", "agent", "task"],
                  "additionalProperties": false
                },
                "worker": {
                  "$ref": "#/definitions/__schema27"
                }
              },
              "required": ["request", "worker"],
              "additionalProperties": false
            },
            "nextAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastLocalKey": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "activatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "occurrences": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema39"
              }
            }
          },
          "required": [
            "id",
            "sessionId",
            "revision",
            "trigger",
            "overlap",
            "status",
            "target",
            "task",
            "nextAt",
            "occurrences"
          ],
          "additionalProperties": false
        },
        "__schema37": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema6"
          }
        },
        "__schema38": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema39": {
          "type": "object",
          "properties": {
            "scheduledAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "status": {
              "type": "string",
              "enum": ["accepted", "skipped", "missed"]
            },
            "ref": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema6"
                }
              ]
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "through": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": ["scheduledAt", "status"],
          "additionalProperties": false
        },
        "__schema40": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "kind": {
              "type": "string",
              "enum": [
                "prepare",
                "launch",
                "steer",
                "cleanup",
                "checkpoint",
                "capture",
                "notification"
              ]
            },
            "input": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            }
          },
          "required": ["id", "ref", "kind"],
          "additionalProperties": false
        },
        "__schema41": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "ref": {
              "$ref": "#/definitions/__schema6"
            },
            "ordinal": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "backend": {
              "$ref": "#/definitions/__schema4"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["id", "ref", "ordinal", "backend", "ownerEpoch"],
          "additionalProperties": false
        },
        "__schema42": {
          "type": "object",
          "properties": {
            "cwd": {
              "$ref": "#/definitions/__schema2"
            },
            "identity": {
              "$ref": "#/definitions/__schema2"
            },
            "lease": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema2"
                },
                "workspace": {
                  "$ref": "#/definitions/__schema2"
                }
              },
              "required": ["id", "workspace"],
              "additionalProperties": false
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema8"
              }
            }
          },
          "required": ["cwd", "identity", "artifacts"],
          "additionalProperties": false
        },
        "__schema43": {
          "type": "object",
          "properties": {
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema8"
              }
            },
            "snapshot": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "errors": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema2"
              }
            }
          },
          "required": ["artifacts"],
          "additionalProperties": false
        },
        "__schema44": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "kind": {
              "$ref": "#/definitions/__schema4"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["id", "kind", "ownerEpoch"],
          "additionalProperties": false
        },
        "__schema45": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "enum": ["completed", "failed", "cancelled"]
            },
            "summary": {
              "type": "string"
            },
            "usage": {
              "$ref": "#/definitions/__schema21"
            },
            "report": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "reportingError": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "session": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema46"
                }
              ]
            },
            "transcript": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema8"
              }
            },
            "error": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["reason", "summary", "usage", "artifacts"],
          "additionalProperties": false
        },
        "__schema46": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema2"
                },
                "worker": {
                  "$ref": "#/definitions/__schema2"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema8"
                },
                "branch": {
                  "$ref": "#/definitions/__schema2"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema47"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema2"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema2"
                },
                "worker": {
                  "$ref": "#/definitions/__schema2"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema8"
                },
                "branch": {
                  "$ref": "#/definitions/__schema2"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema47"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema2"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "__schema47": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema8"
            }
          ]
        },
        "__schema48": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "stopped"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema2"
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema8"
                  }
                }
              },
              "required": ["status", "ownerEpoch", "identities", "evidence"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "unconfirmed"
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema2"
                },
                "identities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "reasons": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema8"
                  }
                }
              },
              "required": ["status", "ownerEpoch", "identities", "reasons", "evidence"],
              "additionalProperties": false
            }
          ]
        },
        "__schema49": {
          "type": "object",
          "properties": {
            "tokens": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema5"
                },
                {
                  "type": "null"
                }
              ]
            },
            "window": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema5"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "percent": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "source": {
              "$ref": "#/definitions/__schema2"
            },
            "timestamp": {
              "$ref": "#/definitions/__schema5"
            }
          },
          "required": ["tokens", "window", "percent", "source", "timestamp"],
          "additionalProperties": false
        },
        "__schema50": {
          "type": "string",
          "enum": ["dispatch_intent", "delivered", "consumed", "uncertain"]
        },
        "__schema51": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema51"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema51"
              }
            }
          ]
        },
        "__schema52": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema2"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema9"
            },
            "receipt": {
              "$ref": "#/definitions/__schema35"
            },
            "workers": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema27"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema33"
              }
            },
            "messages": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema34"
              }
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema8"
                }
              ]
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema5"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "kind",
            "requestId",
            "payloadDigest",
            "receipt",
            "workers",
            "assignments",
            "messages"
          ],
          "additionalProperties": false
        },
        "__schema53": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema53"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema53"
              }
            }
          ]
        }
      }
    },
    "pinata.subscription.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "since": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "pinata.recovery-request.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "targets": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "run": {
                "type": "string",
                "minLength": 1
              },
              "worker": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,31}$"
              },
              "assignment": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["run", "worker", "assignment"],
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "pinata.recovery-receipt.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "ref": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "attemptId": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": ["reattached", "finalizing", "active", "unavailable", "uncertain"]
        },
        "detail": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        }
      },
      "required": ["ref", "status"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.manifest.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "run": {
          "$ref": "#/definitions/__schema0"
        },
        "workspace": {
          "$ref": "#/definitions/__schema0"
        },
        "store": {
          "$ref": "#/definitions/__schema0"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        }
      },
      "required": ["schemaVersion", "run", "workspace", "store", "createdAt"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.journal.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "record": {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "$ref": "#/definitions/__schema0"
            },
            "revision": {
              "$ref": "#/definitions/__schema1"
            },
            "requestId": {
              "$ref": "#/definitions/__schema3"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema4"
            },
            "previousDigest": {
              "$ref": "#/definitions/__schema5"
            },
            "transition": {
              "$ref": "#/definitions/__schema6"
            },
            "artifacts": {
              "$ref": "#/definitions/__schema33"
            }
          },
          "required": [
            "schemaVersion",
            "revision",
            "requestId",
            "payloadDigest",
            "previousDigest",
            "transition"
          ],
          "additionalProperties": false
        },
        "digest": {
          "$ref": "#/definitions/__schema4"
        },
        "commit": {
          "type": "string",
          "const": "pinata.commit.v1"
        }
      },
      "required": ["record", "digest", "commit"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "number",
          "const": 1
        },
        "__schema1": {
          "exclusiveMinimum": 0,
          "allOf": [
            {
              "$ref": "#/definitions/__schema2"
            }
          ]
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "type": "string",
          "minLength": 1
        },
        "__schema4": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "__schema5": {
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "$ref": "#/definitions/__schema4"
            }
          ]
        },
        "__schema6": {
          "oneOf": [
            {
              "$ref": "#/definitions/__schema7"
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "schedule_changed"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema3"
                },
                "payloadDigest": {
                  "$ref": "#/definitions/__schema4"
                },
                "receipt": {
                  "$ref": "#/definitions/__schema8"
                },
                "action": {
                  "type": "string",
                  "enum": [
                    "create",
                    "update",
                    "pause",
                    "resume",
                    "delete",
                    "close",
                    "recover",
                    "list"
                  ]
                },
                "schedule": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema9"
                    }
                  ]
                }
              },
              "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "schedule_occurrence"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema3"
                },
                "payloadDigest": {
                  "$ref": "#/definitions/__schema4"
                },
                "receipt": {
                  "$ref": "#/definitions/__schema8"
                },
                "scheduleId": {
                  "$ref": "#/definitions/__schema3"
                },
                "occurrence": {
                  "$ref": "#/definitions/__schema23"
                },
                "nextAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lastLocalKey": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                },
                "acceptance": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema7"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "requestId",
                "payloadDigest",
                "receipt",
                "scheduleId",
                "occurrence",
                "nextAt"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "control_accepted"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema3"
                },
                "payloadDigest": {
                  "$ref": "#/definitions/__schema4"
                },
                "receipt": {
                  "$ref": "#/definitions/__schema8"
                },
                "action": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "cancel"
                        },
                        "targets": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema11"
                          }
                        }
                      },
                      "required": ["kind", "targets"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "background"
                        }
                      },
                      "required": ["kind"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "capacity"
                        },
                        "maxConcurrent": {
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "allOf": [
                                {
                                  "$ref": "#/definitions/__schema2"
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": ["kind", "maxConcurrent"],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "required": ["kind", "requestId", "payloadDigest", "receipt", "action"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "application_accepted"
                },
                "requestId": {
                  "$ref": "#/definitions/__schema3"
                },
                "payloadDigest": {
                  "$ref": "#/definitions/__schema4"
                },
                "receipt": {
                  "$ref": "#/definitions/__schema8"
                },
                "intent": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "requestId": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "command": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "apply"
                            },
                            "ref": {
                              "$ref": "#/definitions/__schema11"
                            },
                            "destination": {
                              "$ref": "#/definitions/__schema3"
                            }
                          },
                          "required": ["kind", "ref", "destination"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "rollback"
                            },
                            "operation": {
                              "$ref": "#/definitions/__schema3"
                            },
                            "destination": {
                              "$ref": "#/definitions/__schema3"
                            }
                          },
                          "required": ["kind", "operation", "destination"],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "reconcile"
                            },
                            "operation": {
                              "$ref": "#/definitions/__schema3"
                            },
                            "owner": {
                              "$ref": "#/definitions/__schema3"
                            }
                          },
                          "required": ["kind", "operation", "owner"],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "ownerEpoch": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "destination": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "ref": {
                      "$ref": "#/definitions/__schema11"
                    },
                    "snapshot": {
                      "$ref": "#/definitions/__schema21"
                    },
                    "targetOperation": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "requestId",
                    "command",
                    "ownerEpoch",
                    "destination",
                    "ref",
                    "snapshot"
                  ],
                  "additionalProperties": false
                }
              },
              "required": ["kind", "requestId", "payloadDigest", "receipt", "intent"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "application_observed"
                },
                "operationId": {
                  "$ref": "#/definitions/__schema3"
                },
                "observation": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": ["completed", "failed", "uncertain"]
                    },
                    "receipt": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": ["applied", "rolled_back", "already_recorded"]
                            },
                            "operationId": {
                              "$ref": "#/definitions/__schema3"
                            },
                            "destination": {
                              "$ref": "#/definitions/__schema3"
                            },
                            "revision": {
                              "$ref": "#/definitions/__schema2"
                            },
                            "snapshot": {
                              "$ref": "#/definitions/__schema21"
                            },
                            "freshness": {
                              "type": "string",
                              "enum": ["matching", "changed", "unknown"]
                            }
                          },
                          "required": [
                            "status",
                            "operationId",
                            "destination",
                            "revision",
                            "snapshot",
                            "freshness"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_input",
                            "dependency_missing",
                            "capability_denied",
                            "unsupported",
                            "conflict",
                            "owner_unconfirmed",
                            "context_unavailable",
                            "commit_unknown"
                          ]
                        },
                        "message": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "field": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema3"
                            }
                          ]
                        }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    },
                    "evidence": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema21"
                        }
                      ]
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": false
                }
              },
              "required": ["kind", "operationId", "observation"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "effect_intent"
                },
                "effect": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "ref": {
                      "$ref": "#/definitions/__schema11"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "prepare",
                        "launch",
                        "steer",
                        "cleanup",
                        "checkpoint",
                        "capture",
                        "notification"
                      ]
                    },
                    "input": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema21"
                        }
                      ]
                    }
                  },
                  "required": ["id", "ref", "kind"],
                  "additionalProperties": false
                }
              },
              "required": ["kind", "effect"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "effect_observed"
                },
                "effectId": {
                  "$ref": "#/definitions/__schema3"
                },
                "status": {
                  "type": "string",
                  "enum": ["completed", "failed", "uncertain"]
                },
                "detail": {
                  "type": "string"
                }
              },
              "required": ["kind", "effectId", "status"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "assignment_state"
                },
                "ref": {
                  "$ref": "#/definitions/__schema11"
                },
                "execution": {
                  "$ref": "#/definitions/__schema24"
                }
              },
              "required": ["kind", "ref", "execution"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "settled"
                },
                "result": {
                  "type": "object",
                  "properties": {
                    "ref": {
                      "$ref": "#/definitions/__schema11"
                    },
                    "summary": {
                      "type": "string"
                    },
                    "execution": {
                      "$ref": "#/definitions/__schema24"
                    },
                    "report": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema21"
                        }
                      ]
                    },
                    "reportingError": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        }
                      ]
                    },
                    "finalizationErrors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema3"
                      }
                    },
                    "artifacts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema21"
                      }
                    },
                    "transcript": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema21"
                        }
                      ]
                    },
                    "session": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema21"
                        }
                      ]
                    },
                    "snapshot": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema21"
                        }
                      ]
                    },
                    "usage": {
                      "$ref": "#/definitions/__schema25"
                    }
                  },
                  "required": ["ref", "summary", "execution", "artifacts", "usage"],
                  "additionalProperties": false
                },
                "resultArtifact": {
                  "$ref": "#/definitions/__schema21"
                },
                "notificationId": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["kind", "result", "resultArtifact", "notificationId"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "inbox_state"
                },
                "messageId": {
                  "$ref": "#/definitions/__schema3"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "dispatch_intent",
                    "transport_queued",
                    "transport_handled",
                    "consumed",
                    "uncertain"
                  ]
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "checkpoint": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema21"
                    }
                  ]
                }
              },
              "required": ["kind", "messageId", "state", "attemptId"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "inbox_not_delivered"
                },
                "messageId": {
                  "$ref": "#/definitions/__schema3"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "receipt": {
                  "$ref": "#/definitions/__schema21"
                }
              },
              "required": ["kind", "messageId", "attemptId", "receipt"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "capacity_changed"
                },
                "maxConcurrent": {
                  "anyOf": [
                    {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": ["kind", "maxConcurrent"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "attempt_started"
                },
                "attempt": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "ref": {
                      "$ref": "#/definitions/__schema11"
                    },
                    "ordinal": {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    },
                    "backend": {
                      "$ref": "#/definitions/__schema15"
                    },
                    "ownerEpoch": {
                      "$ref": "#/definitions/__schema3"
                    }
                  },
                  "required": ["id", "ref", "ordinal", "backend", "ownerEpoch"],
                  "additionalProperties": false
                }
              },
              "required": ["kind", "attempt"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "workspace_prepared"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "prepared": {
                  "$ref": "#/definitions/__schema30"
                }
              },
              "required": ["kind", "attemptId", "prepared"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "workspace_captured"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "capture": {
                  "type": "object",
                  "properties": {
                    "artifacts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema21"
                      }
                    },
                    "snapshot": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema21"
                        }
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema3"
                      }
                    }
                  },
                  "required": ["artifacts"],
                  "additionalProperties": false
                }
              },
              "required": ["kind", "attemptId", "capture"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "workspace_recovered"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "prepared": {
                  "$ref": "#/definitions/__schema30"
                },
                "evidence": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema21"
                  }
                }
              },
              "required": ["kind", "attemptId", "prepared", "evidence"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "backend_enrolled"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "identity": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "kind": {
                      "$ref": "#/definitions/__schema15"
                    },
                    "ownerEpoch": {
                      "$ref": "#/definitions/__schema3"
                    }
                  },
                  "required": ["id", "kind", "ownerEpoch"],
                  "additionalProperties": false
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema21"
                  }
                }
              },
              "required": ["kind", "attemptId", "identity", "evidence"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "attempt_outcome"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "outcome": {
                  "type": "object",
                  "properties": {
                    "reason": {
                      "type": "string",
                      "enum": ["completed", "failed", "cancelled"]
                    },
                    "summary": {
                      "type": "string"
                    },
                    "usage": {
                      "$ref": "#/definitions/__schema25"
                    },
                    "report": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema21"
                        }
                      ]
                    },
                    "reportingError": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        }
                      ]
                    },
                    "session": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema31"
                        }
                      ]
                    },
                    "transcript": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema21"
                        }
                      ]
                    },
                    "artifacts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema21"
                      }
                    },
                    "error": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        }
                      ]
                    }
                  },
                  "required": ["reason", "summary", "usage", "artifacts"],
                  "additionalProperties": false
                },
                "artifact": {
                  "$ref": "#/definitions/__schema21"
                }
              },
              "required": ["kind", "attemptId", "outcome", "artifact"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "cleanup_observed"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "receipt": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "stopped"
                        },
                        "ownerEpoch": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "identities": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema3"
                          }
                        },
                        "evidence": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema21"
                          }
                        }
                      },
                      "required": ["status", "ownerEpoch", "identities", "evidence"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "unconfirmed"
                        },
                        "ownerEpoch": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "identities": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema3"
                          }
                        },
                        "reasons": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema3"
                          }
                        },
                        "evidence": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema21"
                          }
                        }
                      },
                      "required": ["status", "ownerEpoch", "identities", "reasons", "evidence"],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "required": ["kind", "attemptId", "receipt"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "session_checkpoint"
                },
                "worker": {
                  "$ref": "#/definitions/__schema3"
                },
                "checkpoint": {
                  "$ref": "#/definitions/__schema31"
                }
              },
              "required": ["kind", "worker", "checkpoint"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "usage_observed"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "observation": {
                  "$ref": "#/definitions/__schema26"
                }
              },
              "required": ["kind", "attemptId", "observation"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "response_observed"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "responseId": {
                  "$ref": "#/definitions/__schema3"
                },
                "status": {
                  "type": "string",
                  "enum": ["started", "completed", "interrupted"]
                }
              },
              "required": ["kind", "attemptId", "responseId", "status"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "context_observed"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "context": {
                  "type": "object",
                  "properties": {
                    "tokens": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "window": {
                      "anyOf": [
                        {
                          "exclusiveMinimum": 0,
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema2"
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "percent": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "timestamp": {
                      "$ref": "#/definitions/__schema2"
                    }
                  },
                  "required": ["tokens", "window", "percent", "source", "timestamp"],
                  "additionalProperties": false
                }
              },
              "required": ["kind", "attemptId", "context"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "outbox_state"
                },
                "notificationId": {
                  "$ref": "#/definitions/__schema3"
                },
                "attemptId": {
                  "$ref": "#/definitions/__schema3"
                },
                "state": {
                  "type": "string",
                  "enum": ["dispatch_intent", "delivered", "consumed", "uncertain"]
                },
                "checkpoint": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema21"
                    }
                  ]
                }
              },
              "required": ["kind", "notificationId", "attemptId", "state"],
              "additionalProperties": false
            }
          ]
        },
        "__schema7": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema3"
            },
            "payloadDigest": {
              "$ref": "#/definitions/__schema4"
            },
            "receipt": {
              "$ref": "#/definitions/__schema8"
            },
            "workers": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema20"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema11"
                  },
                  "sequence": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema2"
                      }
                    ]
                  },
                  "task": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "after": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema11"
                    }
                  },
                  "inputs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema11"
                    }
                  },
                  "context": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "execution": {
                    "$ref": "#/definitions/__schema24"
                  }
                },
                "required": ["ref", "sequence", "task", "after", "inputs", "context", "execution"],
                "additionalProperties": false
              }
            },
            "messages": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "target": {
                    "$ref": "#/definitions/__schema11"
                  },
                  "sender": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "kind": {
                    "type": "string",
                    "enum": ["initial", "follow_up", "steer", "notice"]
                  },
                  "text": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "recorded",
                      "dispatch_intent",
                      "transport_queued",
                      "transport_handled",
                      "consumed",
                      "uncertain"
                    ]
                  },
                  "attempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/definitions/__schema3"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "dispatch_intent",
                            "transport_queued",
                            "transport_handled",
                            "consumed",
                            "uncertain"
                          ]
                        },
                        "checkpoint": {
                          "allOf": [
                            {
                              "$ref": "#/definitions/__schema21"
                            }
                          ]
                        }
                      },
                      "required": ["id", "state"],
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["id", "target", "sender", "kind", "text", "state", "attempts"],
                "additionalProperties": false
              }
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema21"
                }
              ]
            },
            "maxConcurrent": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema2"
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "kind",
            "requestId",
            "payloadDigest",
            "receipt",
            "workers",
            "assignments",
            "messages"
          ],
          "additionalProperties": false
        },
        "__schema8": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "accepted"
            },
            "requestId": {
              "$ref": "#/definitions/__schema3"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "operationId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "schedules": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema9"
              }
            },
            "assignments": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema11"
              }
            },
            "resolved": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "$ref": "#/definitions/__schema11"
                  },
                  "workspace": {
                    "$ref": "#/definitions/__schema13"
                  },
                  "backend": {
                    "$ref": "#/definitions/__schema15"
                  },
                  "lifetime": {
                    "$ref": "#/definitions/__schema16"
                  },
                  "grants": {
                    "$ref": "#/definitions/__schema22"
                  }
                },
                "required": ["ref", "workspace", "backend", "lifetime", "grants"],
                "additionalProperties": false
              }
            }
          },
          "required": ["status", "requestId", "revision", "assignments", "resolved"],
          "additionalProperties": false
        },
        "__schema9": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema10"
            },
            "sessionId": {
              "$ref": "#/definitions/__schema3"
            },
            "revision": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "trigger": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "at"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": ["kind", "at"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "interval"
                    },
                    "milliseconds": {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    }
                  },
                  "required": ["kind", "milliseconds"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "cron"
                    },
                    "expression": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "timezone": {
                      "$ref": "#/definitions/__schema3"
                    }
                  },
                  "required": ["kind", "expression", "timezone"],
                  "additionalProperties": false
                }
              ]
            },
            "overlap": {
              "type": "string",
              "enum": ["skip", "queue"]
            },
            "status": {
              "type": "string",
              "enum": ["paused", "active", "completed", "deleted", "closed"]
            },
            "target": {
              "type": "object",
              "properties": {
                "worker": {
                  "$ref": "#/definitions/__schema10"
                }
              },
              "required": ["worker"],
              "additionalProperties": false
            },
            "task": {
              "$ref": "#/definitions/__schema3"
            },
            "template": {
              "type": "object",
              "properties": {
                "request": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/definitions/__schema10"
                    },
                    "agent": {
                      "$ref": "#/definitions/__schema10"
                    },
                    "task": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "origin": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema11"
                        }
                      ]
                    },
                    "messageId": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema3"
                        }
                      ]
                    },
                    "after": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/__schema10"
                          },
                          {
                            "$ref": "#/definitions/__schema11"
                          }
                        ]
                      }
                    },
                    "inputs": {
                      "default": [],
                      "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema12"
                        }
                      ]
                    },
                    "workspace": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema13"
                        }
                      ]
                    },
                    "observeWorkspace": {
                      "type": "boolean"
                    },
                    "model": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema14"
                        }
                      ]
                    },
                    "backend": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema15"
                        }
                      ]
                    },
                    "lifetime": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema16"
                        }
                      ]
                    },
                    "context": {
                      "default": [],
                      "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema17"
                        }
                      ]
                    },
                    "inheritContext": {
                      "type": "string",
                      "enum": ["none", "parent"]
                    },
                    "memory": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema18"
                        }
                      ]
                    },
                    "delegation": {
                      "type": "object",
                      "properties": {
                        "maxDepth": {
                          "$ref": "#/definitions/__schema2"
                        }
                      },
                      "required": ["maxDepth"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["id", "agent", "task"],
                  "additionalProperties": false
                },
                "worker": {
                  "$ref": "#/definitions/__schema20"
                }
              },
              "required": ["request", "worker"],
              "additionalProperties": false
            },
            "nextAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastLocalKey": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "activatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "occurrences": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/definitions/__schema23"
              }
            }
          },
          "required": [
            "id",
            "sessionId",
            "revision",
            "trigger",
            "overlap",
            "status",
            "target",
            "task",
            "nextAt",
            "occurrences"
          ],
          "additionalProperties": false
        },
        "__schema10": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema11": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema3"
            },
            "worker": {
              "$ref": "#/definitions/__schema10"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema12": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema11"
          }
        },
        "__schema13": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema14": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema3"
            },
            "id": {
              "$ref": "#/definitions/__schema3"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema15": {
          "type": "string",
          "enum": ["in-process", "process", "herdr-pi"]
        },
        "__schema16": {
          "type": "string",
          "enum": ["attached", "surviving"]
        },
        "__schema17": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "__schema18": {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "enum": ["none", "worker", "project-agent"]
            },
            "access": {
              "$ref": "#/definitions/__schema19"
            }
          },
          "required": ["scope", "access"],
          "additionalProperties": false
        },
        "__schema19": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema20": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema10"
            },
            "agent": {
              "$ref": "#/definitions/__schema10"
            },
            "definition": {
              "$ref": "#/definitions/__schema21"
            },
            "color": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "accent.blue",
                    "accent.cyan",
                    "accent.green",
                    "accent.yellow",
                    "accent.orange",
                    "accent.red",
                    "accent.pink",
                    "accent.purple"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                }
              ]
            },
            "loadout": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema21"
                }
              ]
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema14"
                }
              ]
            },
            "fallbacks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema14"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "access": {
              "$ref": "#/definitions/__schema19"
            },
            "workspace": {
              "$ref": "#/definitions/__schema13"
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "backend": {
              "$ref": "#/definitions/__schema15"
            },
            "lifetime": {
              "$ref": "#/definitions/__schema16"
            },
            "grants": {
              "$ref": "#/definitions/__schema22"
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema11"
                }
              ]
            },
            "parentAssignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema11"
                }
              ]
            },
            "depth": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema21"
                }
              ]
            },
            "context": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema21"
                }
              ]
            },
            "workspacePlan": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema21"
                }
              ]
            }
          },
          "required": [
            "id",
            "agent",
            "definition",
            "fallbacks",
            "tools",
            "access",
            "workspace",
            "backend",
            "lifetime",
            "grants"
          ],
          "additionalProperties": false
        },
        "__schema21": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema4"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema22": {
          "type": "object",
          "properties": {
            "access": {
              "$ref": "#/definitions/__schema19"
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "workspaces": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema13"
              }
            },
            "inheritContext": {
              "type": "boolean"
            },
            "memory": {
              "$ref": "#/definitions/__schema18"
            },
            "delegation": {
              "type": "object",
              "properties": {
                "maxDepth": {
                  "$ref": "#/definitions/__schema2"
                },
                "agents": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema10"
                  }
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema3"
                  }
                },
                "workspaces": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema13"
                  }
                }
              },
              "required": ["maxDepth", "agents", "tools", "workspaces"],
              "additionalProperties": false
            }
          },
          "required": ["access", "tools", "workspaces", "inheritContext", "memory", "delegation"],
          "additionalProperties": false
        },
        "__schema23": {
          "type": "object",
          "properties": {
            "scheduledAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "status": {
              "type": "string",
              "enum": ["accepted", "skipped", "missed"]
            },
            "ref": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema11"
                }
              ]
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "through": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": ["scheduledAt", "status"],
          "additionalProperties": false
        },
        "__schema24": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "queued"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "preparing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "running"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "stopping"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "finalizing"
                }
              },
              "required": ["phase"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "const": "ended"
                },
                "reason": {
                  "type": "string",
                  "enum": ["completed", "failed", "cancelled", "interrupted"]
                },
                "cleanup": {
                  "type": "string",
                  "enum": ["confirmed", "unconfirmed"]
                }
              },
              "required": ["phase", "reason", "cleanup"],
              "additionalProperties": false
            }
          ]
        },
        "__schema25": {
          "type": "object",
          "properties": {
            "expectedAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "observations": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema26"
              }
            },
            "complete": {
              "type": "boolean"
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "total": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema27"
                },
                {
                  "type": "null"
                }
              ]
            },
            "observedTotal": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema27"
                },
                {
                  "type": "null"
                }
              ]
            },
            "missingAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema3"
              }
            }
          },
          "required": ["expectedAttempts", "observations", "complete"],
          "additionalProperties": false
        },
        "__schema26": {
          "type": "object",
          "properties": {
            "attempt": {
              "$ref": "#/definitions/__schema3"
            },
            "source": {
              "$ref": "#/definitions/__schema3"
            },
            "usage": {
              "$ref": "#/definitions/__schema27"
            },
            "kind": {
              "$ref": "#/definitions/__schema28"
            },
            "responseId": {
              "$ref": "#/definitions/__schema29"
            }
          },
          "required": ["attempt", "source", "usage"],
          "additionalProperties": false
        },
        "__schema27": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema2"
            },
            "output": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema2"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema28": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema29": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema3"
            }
          ]
        },
        "__schema30": {
          "type": "object",
          "properties": {
            "cwd": {
              "$ref": "#/definitions/__schema3"
            },
            "identity": {
              "$ref": "#/definitions/__schema3"
            },
            "lease": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema3"
                },
                "workspace": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["id", "workspace"],
              "additionalProperties": false
            },
            "artifacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema21"
              }
            }
          },
          "required": ["cwd", "identity", "artifacts"],
          "additionalProperties": false
        },
        "__schema31": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema3"
                },
                "worker": {
                  "$ref": "#/definitions/__schema3"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema21"
                },
                "branch": {
                  "$ref": "#/definitions/__schema3"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema32"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema3"
                },
                "worker": {
                  "$ref": "#/definitions/__schema3"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema21"
                },
                "branch": {
                  "$ref": "#/definitions/__schema3"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema32"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "__schema32": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema21"
            }
          ]
        },
        "__schema33": {
          "default": [],
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema21"
          }
        }
      }
    },
    "pinata.owner.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "host": {
          "$ref": "#/definitions/__schema0"
        },
        "pid": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "startIdentity": {
          "$ref": "#/definitions/__schema0"
        },
        "token": {
          "$ref": "#/definitions/__schema0"
        },
        "epoch": {
          "$ref": "#/definitions/__schema0"
        }
      },
      "required": ["schemaVersion", "host", "pid", "startIdentity", "token", "epoch"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.checkpoint.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "revision": {
          "$ref": "#/definitions/__schema0"
        },
        "digest": {
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        },
        "state": {
          "type": "object",
          "properties": {
            "digest": {
              "$ref": "#/definitions/__schema1"
            },
            "size": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        }
      },
      "required": ["schemaVersion", "revision", "digest"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema1": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      }
    },
    "pinata.backend-capabilities.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "available": {
          "type": "boolean"
        },
        "reason": {
          "type": "string",
          "minLength": 1
        },
        "steer": {
          "type": "boolean"
        },
        "continuation": {
          "type": "boolean"
        },
        "conversationSeed": {
          "type": "boolean"
        },
        "skills": {
          "type": "boolean"
        },
        "memory": {
          "type": "boolean"
        },
        "delegation": {
          "type": "boolean"
        },
        "fallbacks": {
          "type": "boolean"
        },
        "surviving": {
          "type": "boolean"
        },
        "cleanup": {
          "type": "string",
          "enum": ["confirmed", "unverified"]
        }
      },
      "required": [
        "available",
        "steer",
        "continuation",
        "conversationSeed",
        "surviving",
        "cleanup"
      ],
      "additionalProperties": false
    },
    "pinata.backend-launch.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "ref": {
          "$ref": "#/definitions/__schema0"
        },
        "attemptId": {
          "$ref": "#/definitions/__schema1"
        },
        "worker": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema2"
            },
            "agent": {
              "$ref": "#/definitions/__schema2"
            },
            "definition": {
              "$ref": "#/definitions/__schema4"
            },
            "color": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "accent.blue",
                    "accent.cyan",
                    "accent.green",
                    "accent.yellow",
                    "accent.orange",
                    "accent.red",
                    "accent.pink",
                    "accent.purple"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                }
              ]
            },
            "loadout": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "model": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema5"
                }
              ]
            },
            "fallbacks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema5"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            },
            "access": {
              "$ref": "#/definitions/__schema6"
            },
            "workspace": {
              "$ref": "#/definitions/__schema7"
            },
            "observeWorkspace": {
              "type": "boolean"
            },
            "backend": {
              "type": "string",
              "enum": ["in-process", "process", "herdr-pi"]
            },
            "lifetime": {
              "type": "string",
              "enum": ["attached", "surviving"]
            },
            "grants": {
              "type": "object",
              "properties": {
                "access": {
                  "$ref": "#/definitions/__schema6"
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "workspaces": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/__schema7"
                  }
                },
                "inheritContext": {
                  "type": "boolean"
                },
                "memory": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string",
                      "enum": ["none", "worker", "project-agent"]
                    },
                    "access": {
                      "$ref": "#/definitions/__schema6"
                    }
                  },
                  "required": ["scope", "access"],
                  "additionalProperties": false
                },
                "delegation": {
                  "type": "object",
                  "properties": {
                    "maxDepth": {
                      "$ref": "#/definitions/__schema3"
                    },
                    "agents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema2"
                      }
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema1"
                      }
                    },
                    "workspaces": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/__schema7"
                      }
                    }
                  },
                  "required": ["maxDepth", "agents", "tools", "workspaces"],
                  "additionalProperties": false
                }
              },
              "required": [
                "access",
                "tools",
                "workspaces",
                "inheritContext",
                "memory",
                "delegation"
              ],
              "additionalProperties": false
            },
            "origin": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "parentAssignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "depth": {
              "default": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            },
            "config": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "context": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            },
            "workspacePlan": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema4"
                }
              ]
            }
          },
          "required": [
            "id",
            "agent",
            "definition",
            "fallbacks",
            "tools",
            "access",
            "workspace",
            "backend",
            "lifetime",
            "grants"
          ],
          "additionalProperties": false
        },
        "cwd": {
          "$ref": "#/definitions/__schema1"
        },
        "initialMessages": {
          "$ref": "#/definitions/__schema4"
        },
        "brief": {
          "$ref": "#/definitions/__schema4"
        },
        "continuation": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema1"
                },
                "worker": {
                  "$ref": "#/definitions/__schema1"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema4"
                },
                "branch": {
                  "$ref": "#/definitions/__schema1"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema8"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema1"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema1"
                },
                "worker": {
                  "$ref": "#/definitions/__schema1"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema4"
                },
                "branch": {
                  "$ref": "#/definitions/__schema1"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema8"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema1"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "storeDirectory": {
          "$ref": "#/definitions/__schema1"
        },
        "ownerEpoch": {
          "$ref": "#/definitions/__schema1"
        }
      },
      "required": [
        "ref",
        "attemptId",
        "worker",
        "cwd",
        "initialMessages",
        "brief",
        "storeDirectory",
        "ownerEpoch"
      ],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema1"
            },
            "worker": {
              "$ref": "#/definitions/__schema2"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema3"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        },
        "__schema1": {
          "type": "string",
          "minLength": 1
        },
        "__schema2": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,31}$"
        },
        "__schema3": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema4": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema5": {
          "type": "object",
          "properties": {
            "provider": {
              "$ref": "#/definitions/__schema1"
            },
            "id": {
              "$ref": "#/definitions/__schema1"
            },
            "thinking": {
              "type": "string",
              "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
            }
          },
          "required": ["provider", "id", "thinking"],
          "additionalProperties": false
        },
        "__schema6": {
          "type": "string",
          "enum": ["read", "write"]
        },
        "__schema7": {
          "type": "string",
          "enum": ["shared", "worktree"]
        },
        "__schema8": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema4"
            }
          ]
        }
      }
    },
    "pinata.backend-observation.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "enrolled"
            },
            "identity": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "kind": {
                  "type": "string",
                  "enum": ["in-process", "process", "herdr-pi"]
                },
                "ownerEpoch": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["id", "kind", "ownerEpoch"],
              "additionalProperties": false
            },
            "evidence": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            }
          },
          "required": ["kind", "identity", "evidence"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "input_consumed"
            },
            "messageId": {
              "$ref": "#/definitions/__schema0"
            },
            "checkpoint": {
              "$ref": "#/definitions/__schema1"
            },
            "entryId": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": ["kind", "messageId", "checkpoint"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "usage"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema0"
            },
            "observation": {
              "type": "object",
              "properties": {
                "attempt": {
                  "$ref": "#/definitions/__schema0"
                },
                "source": {
                  "$ref": "#/definitions/__schema0"
                },
                "usage": {
                  "$ref": "#/definitions/__schema3"
                },
                "kind": {
                  "$ref": "#/definitions/__schema4"
                },
                "responseId": {
                  "$ref": "#/definitions/__schema5"
                }
              },
              "required": ["attempt", "source", "usage"],
              "additionalProperties": false
            }
          },
          "required": ["kind", "attemptId", "observation"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "response"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema0"
            },
            "responseId": {
              "$ref": "#/definitions/__schema0"
            },
            "status": {
              "type": "string",
              "enum": ["started", "completed", "interrupted"]
            }
          },
          "required": ["kind", "attemptId", "responseId", "status"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "context"
            },
            "attemptId": {
              "$ref": "#/definitions/__schema0"
            },
            "context": {
              "type": "object",
              "properties": {
                "tokens": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/__schema2"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "window": {
                  "anyOf": [
                    {
                      "exclusiveMinimum": 0,
                      "allOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "percent": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "$ref": "#/definitions/__schema0"
                },
                "timestamp": {
                  "$ref": "#/definitions/__schema2"
                }
              },
              "required": ["tokens", "window", "percent", "source", "timestamp"],
              "additionalProperties": false
            }
          },
          "required": ["kind", "attemptId", "context"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "activity"
            },
            "source": {
              "$ref": "#/definitions/__schema0"
            },
            "ordinal": {
              "$ref": "#/definitions/__schema2"
            },
            "text": {
              "type": "string"
            }
          },
          "required": ["kind", "source", "ordinal", "text"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema2"
            },
            "output": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema2"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema4": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema5": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        }
      }
    },
    "pinata.backend-outcome.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "reason": {
          "type": "string",
          "enum": ["completed", "failed", "cancelled"]
        },
        "summary": {
          "type": "string"
        },
        "usage": {
          "type": "object",
          "properties": {
            "expectedAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "observations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "attempt": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "source": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "usage": {
                    "$ref": "#/definitions/__schema1"
                  },
                  "kind": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "responseId": {
                    "$ref": "#/definitions/__schema4"
                  }
                },
                "required": ["attempt", "source", "usage"],
                "additionalProperties": false
              }
            },
            "complete": {
              "type": "boolean"
            },
            "reason": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            },
            "total": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema1"
                },
                {
                  "type": "null"
                }
              ]
            },
            "observedTotal": {
              "anyOf": [
                {
                  "$ref": "#/definitions/__schema1"
                },
                {
                  "type": "null"
                }
              ]
            },
            "missingAttempts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "issues": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            }
          },
          "required": ["expectedAttempts", "observations", "complete"],
          "additionalProperties": false
        },
        "report": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema5"
            }
          ]
        },
        "reportingError": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        },
        "session": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema0"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema5"
                },
                "branch": {
                  "$ref": "#/definitions/__schema0"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema6"
                },
                "format": {
                  "type": "string",
                  "const": "pi"
                },
                "producerVersion": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/definitions/__schema0"
                },
                "worker": {
                  "$ref": "#/definitions/__schema0"
                },
                "artifact": {
                  "$ref": "#/definitions/__schema5"
                },
                "branch": {
                  "$ref": "#/definitions/__schema0"
                },
                "transcript": {
                  "$ref": "#/definitions/__schema6"
                },
                "format": {
                  "type": "string",
                  "const": "scripted"
                },
                "producerVersion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/__schema0"
                    }
                  ]
                }
              },
              "required": ["id", "worker", "artifact", "branch", "format"],
              "additionalProperties": false
            }
          ]
        },
        "transcript": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema5"
            }
          ]
        },
        "artifacts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema5"
          }
        },
        "error": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        }
      },
      "required": ["reason", "summary", "usage", "artifacts"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "input": {
              "$ref": "#/definitions/__schema2"
            },
            "output": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheRead": {
              "$ref": "#/definitions/__schema2"
            },
            "cacheWrite": {
              "$ref": "#/definitions/__schema2"
            },
            "cost": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["input", "output", "cacheRead", "cacheWrite", "cost"],
          "additionalProperties": false
        },
        "__schema2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "__schema3": {
          "type": "string",
          "enum": ["attempt_total", "response"]
        },
        "__schema4": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema0"
            }
          ]
        },
        "__schema5": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "$ref": "#/definitions/__schema2"
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema6": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema5"
            }
          ]
        }
      }
    },
    "pinata.cleanup-receipt.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "stopped"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema0"
            },
            "identities": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "evidence": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            }
          },
          "required": ["status", "ownerEpoch", "identities", "evidence"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unconfirmed"
            },
            "ownerEpoch": {
              "$ref": "#/definitions/__schema0"
            },
            "identities": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "reasons": {
              "minItems": 1,
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "evidence": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema1"
              }
            }
          },
          "required": ["status", "ownerEpoch", "identities", "reasons", "evidence"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        }
      }
    },
    "pinata.session-checkpoint.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "$ref": "#/definitions/__schema0"
            },
            "artifact": {
              "$ref": "#/definitions/__schema1"
            },
            "branch": {
              "$ref": "#/definitions/__schema0"
            },
            "transcript": {
              "$ref": "#/definitions/__schema2"
            },
            "format": {
              "type": "string",
              "const": "pi"
            },
            "producerVersion": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["id", "worker", "artifact", "branch", "format", "producerVersion"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "$ref": "#/definitions/__schema0"
            },
            "artifact": {
              "$ref": "#/definitions/__schema1"
            },
            "branch": {
              "$ref": "#/definitions/__schema0"
            },
            "transcript": {
              "$ref": "#/definitions/__schema2"
            },
            "format": {
              "type": "string",
              "const": "scripted"
            },
            "producerVersion": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema0"
                }
              ]
            }
          },
          "required": ["id", "worker", "artifact", "branch", "format"],
          "additionalProperties": false
        }
      ],
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "object",
          "properties": {
            "digest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["digest", "size"],
          "additionalProperties": false
        },
        "__schema2": {
          "allOf": [
            {
              "$ref": "#/definitions/__schema1"
            }
          ]
        }
      }
    },
    "pinata.checkout-identity.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "root": {
          "$ref": "#/definitions/__schema0"
        },
        "device": {
          "$ref": "#/definitions/__schema0"
        },
        "inode": {
          "$ref": "#/definitions/__schema0"
        }
      },
      "required": ["root", "device", "inode"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.checkout-gate-manifest.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "checkout": {
          "type": "object",
          "properties": {
            "root": {
              "$ref": "#/definitions/__schema0"
            },
            "device": {
              "$ref": "#/definitions/__schema0"
            },
            "inode": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["root", "device", "inode"],
          "additionalProperties": false
        }
      },
      "required": ["schemaVersion", "checkout"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.checkout-directory-binding.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "checkout": {
          "type": "object",
          "properties": {
            "root": {
              "$ref": "#/definitions/__schema0"
            },
            "device": {
              "$ref": "#/definitions/__schema0"
            },
            "inode": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["root", "device", "inode"],
          "additionalProperties": false
        },
        "birthtimeNs": {
          "type": "string",
          "pattern": "^[1-9][0-9]*$"
        }
      },
      "required": ["schemaVersion", "checkout", "birthtimeNs"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "pinata.writer-lease.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "id": {
          "$ref": "#/definitions/__schema0"
        },
        "checkout": {
          "type": "object",
          "properties": {
            "root": {
              "$ref": "#/definitions/__schema0"
            },
            "device": {
              "$ref": "#/definitions/__schema0"
            },
            "inode": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["root", "device", "inode"],
          "additionalProperties": false
        },
        "owner": {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "host": {
              "$ref": "#/definitions/__schema0"
            },
            "pid": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "startIdentity": {
              "$ref": "#/definitions/__schema0"
            },
            "token": {
              "$ref": "#/definitions/__schema0"
            },
            "epoch": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["schemaVersion", "host", "pid", "startIdentity", "token", "epoch"],
          "additionalProperties": false
        },
        "ownerEpoch": {
          "$ref": "#/definitions/__schema0"
        },
        "kind": {
          "type": "string",
          "const": "writer"
        },
        "ref": {
          "type": "object",
          "properties": {
            "run": {
              "$ref": "#/definitions/__schema0"
            },
            "worker": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            },
            "assignment": {
              "exclusiveMinimum": 0,
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            }
          },
          "required": ["run", "worker", "assignment"],
          "additionalProperties": false
        }
      },
      "required": ["schemaVersion", "id", "checkout", "owner", "ownerEpoch", "kind", "ref"],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        },
        "__schema1": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      }
    },
    "pinata.exclusive-lease.v1": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "id": {
          "$ref": "#/definitions/__schema0"
        },
        "checkout": {
          "type": "object",
          "properties": {
            "root": {
              "$ref": "#/definitions/__schema0"
            },
            "device": {
              "$ref": "#/definitions/__schema0"
            },
            "inode": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["root", "device", "inode"],
          "additionalProperties": false
        },
        "owner": {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "host": {
              "$ref": "#/definitions/__schema0"
            },
            "pid": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "startIdentity": {
              "$ref": "#/definitions/__schema0"
            },
            "token": {
              "$ref": "#/definitions/__schema0"
            },
            "epoch": {
              "$ref": "#/definitions/__schema0"
            }
          },
          "required": ["schemaVersion", "host", "pid", "startIdentity", "token", "epoch"],
          "additionalProperties": false
        },
        "ownerEpoch": {
          "$ref": "#/definitions/__schema0"
        },
        "kind": {
          "type": "string",
          "const": "exclusive"
        },
        "operationId": {
          "$ref": "#/definitions/__schema0"
        },
        "purpose": {
          "type": "string",
          "enum": ["apply", "rollback", "recovery"]
        }
      },
      "required": [
        "schemaVersion",
        "id",
        "checkout",
        "owner",
        "ownerEpoch",
        "kind",
        "operationId",
        "purpose"
      ],
      "additionalProperties": false,
      "definitions": {
        "__schema0": {
          "type": "string",
          "minLength": 1
        }
      }
    }
  },
  "tools": {
    "pinata_page": {
      "description": "Read the next bounded fragment of an immutable tool reply using its nextCursor. Concatenate text fragments in offset order to recover the complete original JSON. Cursors expire when their host closes; re-query the original read operation for a fresh cursor.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          }
        },
        "required": ["cursor"],
        "additionalProperties": false
      },
      "output": "pinata.tool-page-reply.v1"
    },
    "pinata_run": {
      "description": "Create or extend a run, queue a follow-up, explicitly continue stopped work, change optional capacity, or release a foreground wait. Start with command: {kind: \"create\", workers: [{id: \"worker\", agent: \"builder\", task: \"Your assignment\"}]}. Put workspace, backend, lifetime, observeWorkspace and context in each worker entry; optional run configuration belongs in command.config. Omit inheritContext unless parent conversation import is explicitly granted; include needed context in task. Workers use frozen definitions and grants; the coordinator decides testing and acceptance.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "requestId": {
            "allOf": [
              {
                "$ref": "#/definitions/__schema0"
              }
            ]
          },
          "command": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "create"
                  },
                  "workers": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema1"
                    }
                  },
                  "config": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "workspace": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema6"
                          }
                        ]
                      },
                      "models": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "$ref": "#/definitions/__schema7"
                        }
                      },
                      "fallbacks": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/__schema7"
                          }
                        }
                      },
                      "toolProviders": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "extension": {
                              "$ref": "#/definitions/__schema0"
                            },
                            "tools": {
                              "type": "array",
                              "items": {
                                "$ref": "#/definitions/__schema0"
                              }
                            }
                          },
                          "required": ["extension", "tools"],
                          "additionalProperties": false
                        }
                      },
                      "passEnv": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Z0-9_]*$"
                        }
                      },
                      "webExtension": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema0"
                          }
                        ]
                      },
                      "setup": {
                        "anyOf": [
                          {
                            "type": "boolean",
                            "const": false
                          },
                          {
                            "$ref": "#/definitions/__schema0"
                          }
                        ]
                      },
                      "worktreeRoot": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema0"
                          }
                        ]
                      },
                      "codemode": {
                        "type": "boolean"
                      },
                      "includeUncommitted": {
                        "type": "boolean"
                      },
                      "mode": {
                        "type": "string",
                        "enum": ["lean", "observe"]
                      },
                      "backend": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema8"
                          }
                        ]
                      },
                      "execution": {
                        "type": "object",
                        "properties": {
                          "maxConcurrent": {
                            "default": null,
                            "anyOf": [
                              {
                                "exclusiveMinimum": 0,
                                "allOf": [
                                  {
                                    "$ref": "#/definitions/__schema4"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "ui": {
                        "type": "object",
                        "properties": {
                          "palette": {
                            "default": "inherit",
                            "type": "string",
                            "enum": [
                              "inherit",
                              "pinata",
                              "catppuccin-mocha",
                              "catppuccin-latte",
                              "gruvbox-dark",
                              "gruvbox-light",
                              "tokyo-night-night",
                              "rose-pine-main",
                              "rose-pine-dawn",
                              "dracula",
                              "nord",
                              "one-dark",
                              "one-light",
                              "solarized-dark",
                              "solarized-light",
                              "terminal-default"
                            ]
                          },
                          "motion": {
                            "default": "full",
                            "type": "string",
                            "enum": ["full", "reduced", "off"]
                          },
                          "keys": {
                            "default": {},
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "$ref": "#/definitions/__schema0"
                            }
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": ["kind", "workers"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "add"
                  },
                  "workers": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema1"
                    }
                  }
                },
                "required": ["kind", "workers"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "follow_up"
                  },
                  "worker": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "messageId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "text": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "after": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        },
                        {
                          "$ref": "#/definitions/__schema3"
                        }
                      ]
                    }
                  },
                  "inputs": {
                    "default": [],
                    "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema10"
                      }
                    ]
                  }
                },
                "required": ["kind", "worker", "messageId", "text"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "background"
                  }
                },
                "required": ["kind"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "continue"
                  },
                  "worker": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "messageId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "text": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "required": ["kind", "worker", "messageId", "text"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "capacity"
                  },
                  "maxConcurrent": {
                    "anyOf": [
                      {
                        "exclusiveMinimum": 0,
                        "allOf": [
                          {
                            "$ref": "#/definitions/__schema4"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": ["kind", "maxConcurrent"],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": ["command"],
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "type": "string",
            "minLength": 1
          },
          "__schema1": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/definitions/__schema2"
              },
              "agent": {
                "$ref": "#/definitions/__schema2"
              },
              "task": {
                "$ref": "#/definitions/__schema0"
              },
              "origin": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              },
              "messageId": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema0"
                  }
                ]
              },
              "after": {
                "default": [],
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/__schema2"
                    },
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                }
              },
              "inputs": {
                "default": [],
                "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema5"
                  }
                ]
              },
              "workspace": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema6"
                  }
                ]
              },
              "observeWorkspace": {
                "type": "boolean"
              },
              "model": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema7"
                  }
                ]
              },
              "backend": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema8"
                  }
                ]
              },
              "lifetime": {
                "type": "string",
                "enum": ["attached", "surviving"]
              },
              "context": {
                "default": [],
                "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema9"
                  }
                ]
              },
              "inheritContext": {
                "type": "string",
                "enum": ["none", "parent"]
              },
              "memory": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": ["none", "worker", "project-agent"]
                  },
                  "access": {
                    "type": "string",
                    "enum": ["read", "write"]
                  }
                },
                "required": ["scope", "access"],
                "additionalProperties": false
              },
              "delegation": {
                "type": "object",
                "properties": {
                  "maxDepth": {
                    "$ref": "#/definitions/__schema4"
                  }
                },
                "required": ["maxDepth"],
                "additionalProperties": false
              }
            },
            "required": ["id", "agent", "task"],
            "additionalProperties": false
          },
          "__schema2": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,31}$"
          },
          "__schema3": {
            "type": "object",
            "properties": {
              "run": {
                "$ref": "#/definitions/__schema0"
              },
              "worker": {
                "$ref": "#/definitions/__schema2"
              },
              "assignment": {
                "exclusiveMinimum": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema4"
                  }
                ]
              }
            },
            "required": ["run", "worker", "assignment"],
            "additionalProperties": false
          },
          "__schema4": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "__schema5": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "__schema6": {
            "type": "string",
            "enum": ["shared", "worktree"]
          },
          "__schema7": {
            "type": "object",
            "properties": {
              "provider": {
                "$ref": "#/definitions/__schema0"
              },
              "id": {
                "$ref": "#/definitions/__schema0"
              },
              "thinking": {
                "type": "string",
                "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
              }
            },
            "required": ["provider", "id", "thinking"],
            "additionalProperties": false
          },
          "__schema8": {
            "type": "string",
            "enum": ["in-process", "process", "herdr-pi"]
          },
          "__schema9": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "__schema10": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/__schema3"
            }
          }
        }
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_steer": {
      "description": "Record instructions for an active or queued assignment. The receipt distinguishes durable acceptance from transport and consumption.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "worker": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,31}$"
          },
          "messageId": {
            "$ref": "#/definitions/__schema0"
          },
          "text": {
            "$ref": "#/definitions/__schema0"
          },
          "requestId": {
            "allOf": [
              {
                "$ref": "#/definitions/__schema0"
              }
            ]
          }
        },
        "required": ["worker", "messageId", "text"],
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_cancel": {
      "description": "Cancel an assignment, worker or run. Partial output is retained; confirmed cleanup is reported separately.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "enum": ["assignment", "worker", "run"]
          },
          "worker": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,31}$"
          },
          "assignment": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "descendants": {
            "default": true,
            "type": "boolean"
          },
          "requestId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["scope"],
        "additionalProperties": false
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_integrate": {
      "description": "Explicitly apply a selected isolated snapshot with destination exclusion and conflict checks. This does not certify correctness. Inspect the application outcome using its operation ID.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "ref": {
            "type": "object",
            "properties": {
              "run": {
                "$ref": "#/definitions/__schema0"
              },
              "worker": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,31}$"
              },
              "assignment": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["run", "worker", "assignment"],
            "additionalProperties": false
          },
          "destination": {
            "$ref": "#/definitions/__schema0"
          },
          "requestId": {
            "allOf": [
              {
                "$ref": "#/definitions/__schema0"
              }
            ]
          }
        },
        "required": ["ref", "destination"],
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_rollback": {
      "description": "Roll back one journaled application if the destination still matches. Later edits are preserved or reported as conflicts.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "operation": {
            "$ref": "#/definitions/__schema0"
          },
          "destination": {
            "$ref": "#/definitions/__schema0"
          },
          "requestId": {
            "allOf": [
              {
                "$ref": "#/definitions/__schema0"
              }
            ]
          }
        },
        "required": ["operation", "destination"],
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_schedule": {
      "description": "Manage a session-owned one-shot, interval or cron trigger. Occurrences are ordinary assignments; closed sessions cannot fire.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "schedule": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "create"
                  },
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "target": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "worker": {
                            "$ref": "#/definitions/__schema0"
                          }
                        },
                        "required": ["worker"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "template": {
                            "$ref": "#/definitions/__schema1"
                          }
                        },
                        "required": ["template"],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "trigger": {
                    "$ref": "#/definitions/__schema7"
                  },
                  "overlap": {
                    "default": "skip",
                    "type": "string",
                    "enum": ["skip", "queue"]
                  }
                },
                "required": ["action", "id", "target", "trigger"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "update"
                  },
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "target": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "worker": {
                            "$ref": "#/definitions/__schema0"
                          }
                        },
                        "required": ["worker"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "template": {
                            "$ref": "#/definitions/__schema1"
                          }
                        },
                        "required": ["template"],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "trigger": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema7"
                      }
                    ]
                  },
                  "overlap": {
                    "type": "string",
                    "enum": ["skip", "queue"]
                  }
                },
                "required": ["action", "id"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "pause"
                  },
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "required": ["action", "id"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "resume"
                  },
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "required": ["action", "id"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "delete"
                  },
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "required": ["action", "id"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "list"
                  }
                },
                "required": ["action"],
                "additionalProperties": false
              }
            ]
          },
          "requestId": {
            "allOf": [
              {
                "$ref": "#/definitions/__schema2"
              }
            ]
          }
        },
        "required": ["schedule"],
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,31}$"
          },
          "__schema1": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/definitions/__schema0"
              },
              "agent": {
                "$ref": "#/definitions/__schema0"
              },
              "task": {
                "$ref": "#/definitions/__schema2"
              },
              "origin": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              },
              "messageId": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema2"
                  }
                ]
              },
              "after": {
                "default": [],
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/__schema0"
                    },
                    {
                      "$ref": "#/definitions/__schema3"
                    }
                  ]
                }
              },
              "inputs": {
                "default": [],
                "description": "Workspace snapshots to compose, NOT reports or conversation. For report synthesis use after for ordering, query result/conversation, and supply report text in context.",
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema5"
                  }
                ]
              },
              "workspace": {
                "type": "string",
                "enum": ["shared", "worktree"]
              },
              "observeWorkspace": {
                "type": "boolean"
              },
              "model": {
                "type": "object",
                "properties": {
                  "provider": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "id": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "thinking": {
                    "type": "string",
                    "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
                  }
                },
                "required": ["provider", "id", "thinking"],
                "additionalProperties": false
              },
              "backend": {
                "type": "string",
                "enum": ["in-process", "process", "herdr-pi"]
              },
              "lifetime": {
                "type": "string",
                "enum": ["attached", "surviving"]
              },
              "context": {
                "default": [],
                "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema6"
                  }
                ]
              },
              "inheritContext": {
                "type": "string",
                "enum": ["none", "parent"]
              },
              "memory": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": ["none", "worker", "project-agent"]
                  },
                  "access": {
                    "type": "string",
                    "enum": ["read", "write"]
                  }
                },
                "required": ["scope", "access"],
                "additionalProperties": false
              },
              "delegation": {
                "type": "object",
                "properties": {
                  "maxDepth": {
                    "$ref": "#/definitions/__schema4"
                  }
                },
                "required": ["maxDepth"],
                "additionalProperties": false
              }
            },
            "required": ["id", "agent", "task"],
            "additionalProperties": false
          },
          "__schema2": {
            "type": "string",
            "minLength": 1
          },
          "__schema3": {
            "type": "object",
            "properties": {
              "run": {
                "$ref": "#/definitions/__schema2"
              },
              "worker": {
                "$ref": "#/definitions/__schema0"
              },
              "assignment": {
                "exclusiveMinimum": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema4"
                  }
                ]
              }
            },
            "required": ["run", "worker", "assignment"],
            "additionalProperties": false
          },
          "__schema4": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "__schema5": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "__schema6": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "__schema7": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "at"
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": ["kind", "at"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "interval"
                  },
                  "milliseconds": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema4"
                      }
                    ]
                  }
                },
                "required": ["kind", "milliseconds"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "cron"
                  },
                  "expression": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "timezone": {
                    "$ref": "#/definitions/__schema2"
                  }
                },
                "required": ["kind", "expression", "timezone"],
                "additionalProperties": false
              }
            ]
          }
        }
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_wait": {
      "description": "Wait for exact assignments or the next pending completion. Aborting this wait leaves workers running.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "workers": {
            "$ref": "#/definitions/__schema0"
          },
          "targets": {
            "$ref": "#/definitions/__schema2"
          },
          "next": {
            "$ref": "#/definitions/__schema3"
          }
        },
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "__schema1": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,31}$"
          },
          "__schema2": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "run": {
                  "type": "string",
                  "minLength": 1
                },
                "worker": {
                  "$ref": "#/definitions/__schema1"
                },
                "assignment": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": ["run", "worker", "assignment"],
              "additionalProperties": false
            }
          },
          "__schema3": {
            "default": false,
            "type": "boolean"
          }
        }
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_status": {
      "description": "Inspect state, exact results, immutable conversation pages, schema discovery, receipts or an application outcome. Tool input schemas are already supplied: no schema query is needed before launching. For discovery use name: pinata.command.v1, or a tool name such as pinata_run; avoid fetching the entire registry. Results are execution observations, not acceptance decisions.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "query": {
            "default": {
              "kind": "status"
            },
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "wait"
                  },
                  "wait": {
                    "type": "object",
                    "properties": {
                      "workers": {
                        "$ref": "#/definitions/__schema0"
                      },
                      "targets": {
                        "$ref": "#/definitions/__schema2"
                      },
                      "next": {
                        "$ref": "#/definitions/__schema6"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": ["kind", "wait"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "status"
                  }
                },
                "required": ["kind"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "config"
                  }
                },
                "required": ["kind"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "receipt"
                  },
                  "requestId": {
                    "$ref": "#/definitions/__schema4"
                  }
                },
                "required": ["kind", "requestId"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "result"
                  },
                  "ref": {
                    "$ref": "#/definitions/__schema3"
                  }
                },
                "required": ["kind", "ref"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "events"
                  },
                  "since": {
                    "default": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema5"
                      }
                    ]
                  }
                },
                "required": ["kind"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "schemas"
                  },
                  "name": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema4"
                      }
                    ]
                  }
                },
                "required": ["kind"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "definitions"
                  }
                },
                "required": ["kind"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "conversation"
                  },
                  "ref": {
                    "$ref": "#/definitions/__schema3"
                  },
                  "cursor": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema4"
                      }
                    ]
                  }
                },
                "required": ["kind", "ref"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "changes"
                  },
                  "ref": {
                    "$ref": "#/definitions/__schema3"
                  }
                },
                "required": ["kind", "ref"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "application"
                  },
                  "operationId": {
                    "$ref": "#/definitions/__schema4"
                  }
                },
                "required": ["kind", "operationId"],
                "additionalProperties": false
              }
            ]
          }
        },
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "__schema1": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,31}$"
          },
          "__schema2": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "__schema3": {
            "type": "object",
            "properties": {
              "run": {
                "$ref": "#/definitions/__schema4"
              },
              "worker": {
                "$ref": "#/definitions/__schema1"
              },
              "assignment": {
                "exclusiveMinimum": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema5"
                  }
                ]
              }
            },
            "required": ["run", "worker", "assignment"],
            "additionalProperties": false
          },
          "__schema4": {
            "type": "string",
            "minLength": 1
          },
          "__schema5": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "__schema6": {
            "default": false,
            "type": "boolean"
          }
        }
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_agents": {
      "description": "Discover compact agent descriptions, defaults and effective launch grants. Full instructions remain available through pinata_status query kind definitions.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_changes": {
      "description": "Inspect a selected assignment's retained workspace snapshot, including failed or cancelled partial work.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "ref": {
            "type": "object",
            "properties": {
              "run": {
                "type": "string",
                "minLength": 1
              },
              "worker": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,31}$"
              },
              "assignment": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["run", "worker", "assignment"],
            "additionalProperties": false
          }
        },
        "required": ["ref"],
        "additionalProperties": false
      },
      "output": "pinata.surface-reply.v1"
    },
    "pinata_recover": {
      "description": "Explicitly reattach original owned attempts or reconcile stopped work from retained evidence. Recovery never blindly relaunches an uncertain attempt.",
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "targets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "run": {
                  "type": "string",
                  "minLength": 1
                },
                "worker": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9-]{0,31}$"
                },
                "assignment": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": ["run", "worker", "assignment"],
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "output": "pinata.surface-reply.v1"
    }
  },
  "workerTools": {
    "pinata_page": {
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          }
        },
        "required": ["cursor"],
        "additionalProperties": false
      },
      "output": "pinata.tool-page-reply.v1",
      "availability": "Only for previously returned child-tool output in this worker's current session; cursors do not grant arbitrary artifact access."
    },
    "pinata_dependency": {
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "list"
              },
              "offset": {
                "default": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema0"
                  }
                ]
              }
            },
            "required": ["kind"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "result"
              },
              "ref": {
                "type": "object",
                "properties": {
                  "run": {
                    "type": "string",
                    "minLength": 1
                  },
                  "worker": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,31}$"
                  },
                  "assignment": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["run", "worker", "assignment"],
                "additionalProperties": false
              },
              "offset": {
                "default": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema0"
                  }
                ]
              }
            },
            "required": ["kind", "ref"],
            "additionalProperties": false
          }
        ],
        "definitions": {
          "__schema0": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "output": "pinata.dependency-page.v1",
      "availability": "Only for immutable dependency results assigned to this worker; pages contain complete result JSON, not the contents of referenced report or transcript artifacts."
    },
    "submit_result": {
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "summary": {
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/definitions/__schema0"
              }
            ]
          },
          "assessment": {
            "type": "object",
            "properties": {
              "findings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "claimedChecks": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "blockers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          }
        },
        "required": ["summary"],
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/definitions/__schema0"
                }
              }
            ]
          }
        }
      },
      "output": "pinata.report-tool-result.v1",
      "availability": "Optional reporting; outputType may refine the data field."
    },
    "pinata_children": {
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "requestId": {
            "$ref": "#/definitions/__schema0"
          },
          "command": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "add"
                  },
                  "workers": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema1"
                    }
                  }
                },
                "required": ["kind", "workers"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "follow_up"
                  },
                  "worker": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "messageId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "text": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "after": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/__schema2"
                        },
                        {
                          "$ref": "#/definitions/__schema5"
                        }
                      ]
                    }
                  },
                  "inputs": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema5"
                    }
                  }
                },
                "required": ["kind", "worker", "messageId", "text"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "steer"
                  },
                  "worker": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "messageId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "text": {
                    "$ref": "#/definitions/__schema0"
                  }
                },
                "required": ["kind", "worker", "messageId", "text"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "cancel"
                  },
                  "scope": {
                    "type": "string",
                    "enum": ["assignment", "worker"]
                  },
                  "worker": {
                    "$ref": "#/definitions/__schema2"
                  },
                  "assignment": {
                    "exclusiveMinimum": 0,
                    "allOf": [
                      {
                        "$ref": "#/definitions/__schema4"
                      }
                    ]
                  },
                  "descendants": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": ["kind", "scope", "worker"],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": ["requestId", "command"],
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "type": "string",
            "minLength": 1
          },
          "__schema1": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/definitions/__schema2"
              },
              "agent": {
                "$ref": "#/definitions/__schema2"
              },
              "task": {
                "$ref": "#/definitions/__schema0"
              },
              "messageId": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema0"
                  }
                ]
              },
              "workspace": {
                "type": "string",
                "enum": ["shared", "worktree"]
              },
              "observeWorkspace": {
                "type": "boolean"
              },
              "model": {
                "type": "object",
                "properties": {
                  "provider": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "id": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "thinking": {
                    "type": "string",
                    "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"]
                  }
                },
                "required": ["provider", "id", "thinking"],
                "additionalProperties": false
              },
              "backend": {
                "type": "string",
                "enum": ["in-process", "process", "herdr-pi"]
              },
              "lifetime": {
                "type": "string",
                "enum": ["attached", "surviving"]
              },
              "context": {
                "default": [],
                "description": "Quoted context text, such as upstream report contents. Assignment references in inputs do not import reports.",
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema3"
                  }
                ]
              },
              "inheritContext": {
                "type": "string",
                "enum": ["none", "parent"]
              },
              "memory": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": ["none", "worker", "project-agent"]
                  },
                  "access": {
                    "type": "string",
                    "enum": ["read", "write"]
                  }
                },
                "required": ["scope", "access"],
                "additionalProperties": false
              },
              "delegation": {
                "type": "object",
                "properties": {
                  "maxDepth": {
                    "$ref": "#/definitions/__schema4"
                  }
                },
                "required": ["maxDepth"],
                "additionalProperties": false
              },
              "origin": {
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema5"
                  }
                ]
              },
              "after": {
                "default": [],
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/__schema2"
                    },
                    {
                      "$ref": "#/definitions/__schema5"
                    }
                  ]
                }
              },
              "inputs": {
                "default": [],
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema5"
                }
              }
            },
            "required": ["id", "agent", "task"],
            "additionalProperties": false
          },
          "__schema2": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,31}$"
          },
          "__schema3": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "__schema4": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "__schema5": {
            "type": "object",
            "properties": {
              "worker": {
                "$ref": "#/definitions/__schema2"
              },
              "assignment": {
                "exclusiveMinimum": 0,
                "allOf": [
                  {
                    "$ref": "#/definitions/__schema4"
                  }
                ]
              }
            },
            "required": ["worker", "assignment"],
            "additionalProperties": false
          }
        }
      },
      "output": "pinata.receipt.v1",
      "availability": "Only with an explicit scoped delegation grant."
    },
    "pinata_child_status": {
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "status"
              }
            },
            "required": ["kind"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "result"
              },
              "ref": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "required": ["kind", "ref"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "changes"
              },
              "ref": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "required": ["kind", "ref"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "conversation"
              },
              "ref": {
                "$ref": "#/definitions/__schema0"
              },
              "cursor": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["kind", "ref"],
            "additionalProperties": false
          }
        ],
        "definitions": {
          "__schema0": {
            "type": "object",
            "properties": {
              "worker": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,31}$"
              },
              "assignment": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["worker", "assignment"],
            "additionalProperties": false
          }
        }
      },
      "output": "pinata.child-query-result.v1",
      "availability": "Only with an explicit scoped delegation grant."
    },
    "pinata_child_wait": {
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "workers": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,31}$"
            }
          },
          "next": {
            "default": false,
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "output": "pinata.child-wait-result.v1",
      "availability": "Only with an explicit scoped delegation grant."
    },
    "pinata_memory_read": {
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "output": "pinata.memory-snapshot.v1",
      "availability": "Only with an explicit worker or project-agent memory grant."
    },
    "pinata_memory_edit": {
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "text": {
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/definitions/__schema0"
              }
            ]
          }
        },
        "required": ["expectedRevision", "text"],
        "additionalProperties": false,
        "definitions": {
          "__schema0": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/definitions/__schema0"
                }
              }
            ]
          }
        }
      },
      "output": "pinata.memory-snapshot.v1",
      "availability": "Only with an explicit scoped memory write grant; revision checked."
    },
    "pinata_memory_clear": {
      "input": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": ["expectedRevision"],
        "additionalProperties": false
      },
      "output": "pinata.memory-snapshot.v1",
      "availability": "Only with an explicit scoped memory write grant; revision checked."
    }
  },
  "versions": {
    "job": 1,
    "config": 1,
    "definition": 1,
    "manifest": 1,
    "journal": 1,
    "event": 1,
    "ipc": 1
  },
  "commands": [
    "create",
    "add",
    "follow_up",
    "steer",
    "cancel",
    "background",
    "continue",
    "capacity",
    "schedule",
    "apply",
    "rollback",
    "reconcile"
  ],
  "queries": [
    "wait",
    "status",
    "config",
    "receipt",
    "result",
    "events",
    "schemas",
    "definitions",
    "conversation",
    "changes",
    "application"
  ],
  "transitions": [
    "accepted",
    "schedule_changed",
    "schedule_occurrence",
    "control_accepted",
    "application_accepted",
    "application_observed",
    "effect_intent",
    "effect_observed",
    "assignment_state",
    "settled",
    "inbox_state",
    "inbox_not_delivered",
    "capacity_changed",
    "attempt_started",
    "workspace_prepared",
    "workspace_captured",
    "workspace_recovered",
    "backend_enrolled",
    "attempt_outcome",
    "cleanup_observed",
    "session_checkpoint",
    "usage_observed",
    "response_observed",
    "context_observed",
    "outbox_state"
  ],
  "errors": [
    "invalid_input",
    "dependency_missing",
    "capability_denied",
    "unsupported",
    "conflict",
    "owner_unconfirmed",
    "context_unavailable",
    "commit_unknown"
  ],
  "cliHelp": "Usage:\n  pinata run <job.json|-> [--json] [--watch]       run a finite schema-1 job\n  pinata serve [job.json] [--directory <run>]     own a runtime and serve authenticated control\n  pinata attach <run-directory> [--watch]         browse in a terminal; otherwise print status\n  pinata view <run-directory> [--control] [--palette name]  open the live/saved viewer\n  pinata request <run-directory> <request.json|-> [--control]\n  pinata execute <run-directory> <envelope.json|->\n  pinata query <run-directory> <query.json|->\n  pinata status|logs <run-directory> [--watch] [--json]\n  pinata result|conversation|changes <run-directory> <worker> [assignment]\n  pinata wait <run-directory> [worker ...] [--next]\n  pinata steer|follow-up|continue <run-directory> <worker> <message>\n  pinata cancel <run-directory> [--scope assignment|worker|run] [--worker id] [--assignment n]\n  pinata background|recover <run-directory>\n  pinata apply <run-directory> <worker> <assignment> --destination <checkout>\n  pinata rollback <run-directory> <operation> --destination <checkout>\n  pinata reconcile <run-directory> <operation> --owner <epoch>\n  pinata bind-checkout <checkout> <manifest.json> --reason <reason>\n  pinata schema [name] --json                    generated canonical JSON Schema\n  pinata agents [list|show <name>|validate]        discover Markdown definitions\n  pinata tools --json                            discover coordinator tool schemas\n\nHost options: --workspace, --directory, --run, --agent-dir, --definitions (repeatable),\n--config <json>, --grants <json>, --model <provider/id>, --thinking <level>, --bootstrap <module>.\n--factory <module> selects a trusted development host factory exporting openHost.\nControl commands attach to a live owning server. Saved runs remain read-only; start\nserve explicitly to claim one. Aborting an attached wait leaves work running.\nExit codes: 0 completed/observed, 1 execution or application failed/uncertain,\n2 invalid or rejected request, 3 cancelled. Completion does not certify correctness."
}
