{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "product_version": "0.2.18",
  "protocol": 12,
  "schema_version": 1,
  "schemas": {
    "error_response": {
      "$defs": {
        "ErrorBody": {
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object"
        }
      },
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "error": {
          "$ref": "#/$defs/ErrorBody"
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "error"
      ],
      "title": "ErrorResponse",
      "type": "object"
    },
    "event": {
      "$defs": {
        "AgentSessionInfo": {
          "properties": {
            "agent": {
              "type": "string"
            },
            "kind": {
              "$ref": "#/$defs/AgentSessionRefKind"
            },
            "source": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          },
          "required": [
            "source",
            "agent",
            "kind",
            "value"
          ],
          "type": "object"
        },
        "AgentSessionRefKind": {
          "enum": [
            "id",
            "path"
          ],
          "type": "string"
        },
        "AgentStatus": {
          "enum": [
            "idle",
            "working",
            "blocked",
            "done",
            "unknown"
          ],
          "type": "string"
        },
        "EventData": {
          "oneOf": [
            {
              "properties": {
                "type": {
                  "const": "workspace_created",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                }
              },
              "required": [
                "type",
                "workspace"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace_updated",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                }
              },
              "required": [
                "type",
                "workspace"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace_closed",
                  "type": "string"
                },
                "workspace": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/WorkspaceInfo"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "label": {
                  "type": "string"
                },
                "type": {
                  "const": "workspace_renamed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "workspace_id",
                "label"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace_focused",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "worktree_created",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                },
                "worktree": {
                  "$ref": "#/$defs/WorktreeInfo"
                }
              },
              "required": [
                "type",
                "workspace",
                "worktree"
              ],
              "type": "object"
            },
            {
              "properties": {
                "already_open": {
                  "type": "boolean"
                },
                "type": {
                  "const": "worktree_opened",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                },
                "worktree": {
                  "$ref": "#/$defs/WorktreeInfo"
                }
              },
              "required": [
                "type",
                "workspace",
                "worktree",
                "already_open"
              ],
              "type": "object"
            },
            {
              "properties": {
                "forced": {
                  "type": "boolean"
                },
                "type": {
                  "const": "worktree_removed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                },
                "worktree": {
                  "$ref": "#/$defs/WorktreeInfo"
                }
              },
              "required": [
                "type",
                "workspace_id",
                "worktree",
                "forced"
              ],
              "type": "object"
            },
            {
              "properties": {
                "tab": {
                  "$ref": "#/$defs/TabInfo"
                },
                "type": {
                  "const": "tab_created",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab"
              ],
              "type": "object"
            },
            {
              "properties": {
                "tab_id": {
                  "type": "string"
                },
                "type": {
                  "const": "tab_closed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "label": {
                  "type": "string"
                },
                "tab_id": {
                  "type": "string"
                },
                "type": {
                  "const": "tab_renamed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab_id",
                "workspace_id",
                "label"
              ],
              "type": "object"
            },
            {
              "properties": {
                "tab_id": {
                  "type": "string"
                },
                "type": {
                  "const": "tab_focused",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "type": {
                  "const": "pane_created",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_closed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_focused",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "closed_tab_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_workspace_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_tab": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/TabInfo"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_workspace": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/WorkspaceInfo"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "previous_pane_id": {
                  "type": "string"
                },
                "previous_tab_id": {
                  "type": "string"
                },
                "previous_workspace_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_moved",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "previous_pane_id",
                "previous_workspace_id",
                "previous_tab_id",
                "pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "revision": {
                  "format": "uint64",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": {
                  "const": "pane_output_changed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id",
                "revision"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_exited",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_agent_detected",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "agent_status": {
                  "$ref": "#/$defs/AgentStatus"
                },
                "custom_status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "display_agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pane_id": {
                  "type": "string"
                },
                "state_labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tokens": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": {
                  "const": "pane_agent_status_changed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id",
                "agent_status"
              ],
              "type": "object"
            },
            {
              "properties": {
                "layout": {
                  "$ref": "#/$defs/PaneLayoutSnapshot"
                },
                "type": {
                  "const": "layout_updated",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "layout"
              ],
              "type": "object"
            }
          ]
        },
        "EventKind": {
          "enum": [
            "workspace_created",
            "workspace_updated",
            "workspace_closed",
            "workspace_renamed",
            "workspace_focused",
            "worktree_created",
            "worktree_opened",
            "worktree_removed",
            "tab_created",
            "tab_closed",
            "tab_renamed",
            "tab_focused",
            "pane_created",
            "pane_closed",
            "pane_focused",
            "pane_moved",
            "pane_output_changed",
            "pane_exited",
            "pane_agent_detected",
            "pane_agent_status_changed",
            "layout_updated"
          ],
          "type": "string"
        },
        "PaneInfo": {
          "properties": {
            "agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "agent_session": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentSessionInfo"
                },
                {
                  "type": "null"
                }
              ]
            },
            "agent_status": {
              "$ref": "#/$defs/AgentStatus"
            },
            "custom_status": {
              "type": [
                "string",
                "null"
              ]
            },
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused": {
              "type": "boolean"
            },
            "foreground_cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            },
            "revision": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "scroll": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PaneScrollInfo"
                },
                {
                  "type": "null"
                }
              ]
            },
            "state_labels": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "tab_id": {
              "type": "string"
            },
            "terminal_id": {
              "type": "string"
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            },
            "tokens": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "terminal_id",
            "workspace_id",
            "tab_id",
            "focused",
            "agent_status",
            "revision"
          ],
          "type": "object"
        },
        "PaneLayoutPane": {
          "properties": {
            "focused": {
              "type": "boolean"
            },
            "pane_id": {
              "type": "string"
            },
            "rect": {
              "$ref": "#/$defs/PaneLayoutRect"
            }
          },
          "required": [
            "pane_id",
            "focused",
            "rect"
          ],
          "type": "object"
        },
        "PaneLayoutRect": {
          "properties": {
            "height": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            },
            "width": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            },
            "x": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            },
            "y": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "x",
            "y",
            "width",
            "height"
          ],
          "type": "object"
        },
        "PaneLayoutSnapshot": {
          "properties": {
            "area": {
              "$ref": "#/$defs/PaneLayoutRect"
            },
            "focused_pane_id": {
              "type": "string"
            },
            "panes": {
              "items": {
                "$ref": "#/$defs/PaneLayoutPane"
              },
              "type": "array"
            },
            "splits": {
              "items": {
                "$ref": "#/$defs/PaneLayoutSplit"
              },
              "type": "array"
            },
            "tab_id": {
              "type": "string"
            },
            "workspace_id": {
              "type": "string"
            },
            "zoomed": {
              "type": "boolean"
            }
          },
          "required": [
            "workspace_id",
            "tab_id",
            "zoomed",
            "area",
            "focused_pane_id",
            "panes",
            "splits"
          ],
          "type": "object"
        },
        "PaneLayoutSplit": {
          "properties": {
            "direction": {
              "$ref": "#/$defs/SplitDirection"
            },
            "id": {
              "type": "string"
            },
            "ratio": {
              "format": "float",
              "type": "number"
            },
            "rect": {
              "$ref": "#/$defs/PaneLayoutRect"
            }
          },
          "required": [
            "id",
            "direction",
            "ratio",
            "rect"
          ],
          "type": "object"
        },
        "PaneScrollInfo": {
          "properties": {
            "max_offset_from_bottom": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "offset_from_bottom": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "viewport_rows": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "offset_from_bottom",
            "max_offset_from_bottom",
            "viewport_rows"
          ],
          "type": "object"
        },
        "SplitDirection": {
          "enum": [
            "right",
            "down"
          ],
          "type": "string"
        },
        "TabInfo": {
          "properties": {
            "agent_status": {
              "$ref": "#/$defs/AgentStatus"
            },
            "focused": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "number": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "pane_count": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "tab_id": {
              "type": "string"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "tab_id",
            "workspace_id",
            "number",
            "label",
            "focused",
            "pane_count",
            "agent_status"
          ],
          "type": "object"
        },
        "WorkspaceInfo": {
          "properties": {
            "active_tab_id": {
              "type": "string"
            },
            "agent_status": {
              "$ref": "#/$defs/AgentStatus"
            },
            "focused": {
              "type": "boolean"
            },
            "group_id": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "number": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "pane_count": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "tab_count": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "workspace_id": {
              "type": "string"
            },
            "worktree": {
              "anyOf": [
                {
                  "$ref": "#/$defs/WorkspaceWorktreeInfo"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "workspace_id",
            "group_id",
            "number",
            "label",
            "focused",
            "pane_count",
            "tab_count",
            "active_tab_id",
            "agent_status"
          ],
          "type": "object"
        },
        "WorkspaceWorktreeInfo": {
          "properties": {
            "checkout_path": {
              "type": "string"
            },
            "is_linked_worktree": {
              "type": "boolean"
            },
            "repo_key": {
              "type": "string"
            },
            "repo_name": {
              "type": "string"
            },
            "repo_root": {
              "type": "string"
            }
          },
          "required": [
            "repo_key",
            "repo_name",
            "repo_root",
            "checkout_path",
            "is_linked_worktree"
          ],
          "type": "object"
        },
        "WorktreeInfo": {
          "properties": {
            "branch": {
              "type": [
                "string",
                "null"
              ]
            },
            "is_bare": {
              "type": "boolean"
            },
            "is_detached": {
              "type": "boolean"
            },
            "is_linked_worktree": {
              "type": "boolean"
            },
            "is_prunable": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "open_workspace_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "path": {
              "type": "string"
            }
          },
          "required": [
            "path",
            "is_bare",
            "is_detached",
            "is_prunable",
            "is_linked_worktree",
            "label"
          ],
          "type": "object"
        }
      },
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "data": {
          "$ref": "#/$defs/EventData"
        },
        "event": {
          "$ref": "#/$defs/EventKind"
        }
      },
      "required": [
        "event",
        "data"
      ],
      "title": "EventEnvelope",
      "type": "object"
    },
    "request": {
      "$defs": {
        "AgentReadParams": {
          "properties": {
            "format": {
              "$ref": "#/$defs/ReadFormat",
              "default": "text"
            },
            "lines": {
              "format": "uint32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "source": {
              "$ref": "#/$defs/ReadSource"
            },
            "strip_ansi": {
              "default": true,
              "type": "boolean"
            },
            "target": {
              "type": "string"
            }
          },
          "required": [
            "target",
            "source"
          ],
          "type": "object"
        },
        "AgentRenameParams": {
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "target": {
              "type": "string"
            }
          },
          "required": [
            "target"
          ],
          "type": "object"
        },
        "AgentSendParams": {
          "properties": {
            "target": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "target",
            "text"
          ],
          "type": "object"
        },
        "AgentStartParams": {
          "properties": {
            "argv": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "env": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "focus": {
              "default": false,
              "type": "boolean"
            },
            "name": {
              "type": "string"
            },
            "split": {
              "anyOf": [
                {
                  "$ref": "#/$defs/SplitDirection"
                },
                {
                  "type": "null"
                }
              ]
            },
            "tab_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "name",
            "argv"
          ],
          "type": "object"
        },
        "AgentStatus": {
          "enum": [
            "idle",
            "working",
            "blocked",
            "done",
            "unknown"
          ],
          "type": "string"
        },
        "AgentTarget": {
          "properties": {
            "target": {
              "type": "string"
            }
          },
          "required": [
            "target"
          ],
          "type": "object"
        },
        "ClientWindowTitleSetParams": {
          "properties": {
            "title": {
              "type": "string"
            }
          },
          "required": [
            "title"
          ],
          "type": "object"
        },
        "EmptyParams": {
          "type": "object"
        },
        "EventMatch": {
          "oneOf": [
            {
              "properties": {
                "event": {
                  "const": "workspace_created",
                  "type": "string"
                },
                "workspace_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "event"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "workspace_updated",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "workspace_closed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "workspace_renamed",
                  "type": "string"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "workspace_focused",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "tab_created",
                  "type": "string"
                },
                "tab_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "workspace_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "event"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "tab_closed",
                  "type": "string"
                },
                "tab_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "tab_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "tab_renamed",
                  "type": "string"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tab_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "tab_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "tab_focused",
                  "type": "string"
                },
                "tab_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "tab_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "pane_created",
                  "type": "string"
                },
                "pane_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "workspace_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "event"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "pane_closed",
                  "type": "string"
                },
                "pane_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "pane_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "pane_focused",
                  "type": "string"
                },
                "pane_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "pane_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "pane_moved",
                  "type": "string"
                },
                "pane_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "pane_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "pane_output_changed",
                  "type": "string"
                },
                "min_revision": {
                  "format": "uint64",
                  "minimum": 0,
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pane_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "pane_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "const": "pane_exited",
                  "type": "string"
                },
                "pane_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "pane_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "event": {
                  "const": "pane_agent_detected",
                  "type": "string"
                },
                "pane_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "pane_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agent_status": {
                  "$ref": "#/$defs/AgentStatus"
                },
                "event": {
                  "const": "pane_agent_status_changed",
                  "type": "string"
                },
                "pane_id": {
                  "type": "string"
                }
              },
              "required": [
                "event",
                "pane_id",
                "agent_status"
              ],
              "type": "object"
            }
          ]
        },
        "EventsSubscribeParams": {
          "properties": {
            "subscriptions": {
              "items": {
                "$ref": "#/$defs/Subscription"
              },
              "type": "array"
            }
          },
          "required": [
            "subscriptions"
          ],
          "type": "object"
        },
        "EventsWaitParams": {
          "properties": {
            "match_event": {
              "$ref": "#/$defs/EventMatch"
            },
            "timeout_ms": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "match_event"
          ],
          "type": "object"
        },
        "GroupCreateParams": {
          "properties": {
            "name": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        },
        "GroupRenameParams": {
          "properties": {
            "group_id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "group_id",
            "name"
          ],
          "type": "object"
        },
        "GroupTarget": {
          "properties": {
            "group_id": {
              "type": "string"
            }
          },
          "required": [
            "group_id"
          ],
          "type": "object"
        },
        "IntegrationInstallParams": {
          "properties": {
            "target": {
              "$ref": "#/$defs/IntegrationTarget"
            }
          },
          "required": [
            "target"
          ],
          "type": "object"
        },
        "IntegrationTarget": {
          "enum": [
            "pi",
            "omp",
            "claude",
            "codex",
            "copilot",
            "devin",
            "kimi",
            "droid",
            "opencode",
            "hermes",
            "qodercli",
            "cursor",
            "grok"
          ],
          "type": "string"
        },
        "IntegrationUninstallParams": {
          "properties": {
            "target": {
              "$ref": "#/$defs/IntegrationTarget"
            }
          },
          "required": [
            "target"
          ],
          "type": "object"
        },
        "LayoutApplyParams": {
          "properties": {
            "focus": {
              "default": false,
              "type": "boolean"
            },
            "root": {
              "$ref": "#/$defs/LayoutNode"
            },
            "tab_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "tab_label": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "root"
          ],
          "type": "object"
        },
        "LayoutExportParams": {
          "properties": {
            "pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "tab_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "LayoutNode": {
          "oneOf": [
            {
              "properties": {
                "command": {
                  "items": {
                    "type": "string"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                },
                "cwd": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "env": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pane_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "const": "pane",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "direction": {
                  "$ref": "#/$defs/SplitDirection"
                },
                "first": {
                  "$ref": "#/$defs/LayoutNode"
                },
                "ratio": {
                  "format": "float",
                  "type": "number"
                },
                "second": {
                  "$ref": "#/$defs/LayoutNode"
                },
                "type": {
                  "const": "split",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "direction",
                "ratio",
                "first",
                "second"
              ],
              "type": "object"
            }
          ]
        },
        "NotificationShowParams": {
          "properties": {
            "body": {
              "type": [
                "string",
                "null"
              ]
            },
            "position": {
              "anyOf": [
                {
                  "$ref": "#/$defs/ToastOmhPosition"
                },
                {
                  "type": "null"
                }
              ]
            },
            "sound": {
              "$ref": "#/$defs/NotificationShowSound"
            },
            "title": {
              "type": "string"
            }
          },
          "required": [
            "title"
          ],
          "type": "object"
        },
        "NotificationShowSound": {
          "enum": [
            "none",
            "done",
            "request"
          ],
          "type": "string"
        },
        "OutputMatch": {
          "oneOf": [
            {
              "properties": {
                "type": {
                  "const": "substring",
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "value"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "regex",
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "value"
              ],
              "type": "object"
            }
          ]
        },
        "PaneAgentState": {
          "enum": [
            "idle",
            "working",
            "blocked",
            "unknown"
          ],
          "type": "string"
        },
        "PaneClearAgentAuthorityParams": {
          "properties": {
            "pane_id": {
              "type": "string"
            },
            "seq": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "source": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "pane_id"
          ],
          "type": "object"
        },
        "PaneCurrentParams": {
          "properties": {
            "caller_pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PaneDirection": {
          "enum": [
            "left",
            "right",
            "up",
            "down"
          ],
          "type": "string"
        },
        "PaneEdgesParams": {
          "properties": {
            "pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PaneFocusDirectionParams": {
          "properties": {
            "direction": {
              "$ref": "#/$defs/PaneDirection"
            },
            "pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "direction"
          ],
          "type": "object"
        },
        "PaneLayoutParams": {
          "properties": {
            "pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PaneListParams": {
          "properties": {
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PaneMoveDestination": {
          "oneOf": [
            {
              "properties": {
                "ratio": {
                  "format": "float",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "split": {
                  "$ref": "#/$defs/SplitDirection"
                },
                "tab_id": {
                  "type": "string"
                },
                "target_pane_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "const": "tab",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab_id",
                "split"
              ],
              "type": "object"
            },
            {
              "properties": {
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "const": "new_tab",
                  "type": "string"
                },
                "workspace_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tab_label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "const": "new_workspace",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          ]
        },
        "PaneMoveParams": {
          "properties": {
            "destination": {
              "$ref": "#/$defs/PaneMoveDestination"
            },
            "focus": {
              "default": false,
              "type": "boolean"
            },
            "pane_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "destination"
          ],
          "type": "object"
        },
        "PaneNeighborParams": {
          "properties": {
            "direction": {
              "$ref": "#/$defs/PaneDirection"
            },
            "pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "direction"
          ],
          "type": "object"
        },
        "PaneProcessInfoParams": {
          "properties": {
            "pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PaneReadParams": {
          "properties": {
            "format": {
              "$ref": "#/$defs/ReadFormat",
              "default": "text"
            },
            "lines": {
              "format": "uint32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            },
            "source": {
              "$ref": "#/$defs/ReadSource"
            },
            "strip_ansi": {
              "default": true,
              "type": "boolean"
            }
          },
          "required": [
            "pane_id",
            "source"
          ],
          "type": "object"
        },
        "PaneReleaseAgentParams": {
          "properties": {
            "agent": {
              "type": "string"
            },
            "agent_session_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "agent_session_path": {
              "type": [
                "string",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            },
            "seq": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "source": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "source",
            "agent"
          ],
          "type": "object"
        },
        "PaneRenameParams": {
          "properties": {
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id"
          ],
          "type": "object"
        },
        "PaneReportAgentParams": {
          "properties": {
            "agent": {
              "type": "string"
            },
            "agent_session_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "agent_session_path": {
              "type": [
                "string",
                "null"
              ]
            },
            "custom_status": {
              "type": [
                "string",
                "null"
              ]
            },
            "launch_env": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "message": {
              "type": [
                "string",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            },
            "seq": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "source": {
              "type": "string"
            },
            "state": {
              "$ref": "#/$defs/PaneAgentState"
            }
          },
          "required": [
            "pane_id",
            "source",
            "agent",
            "state"
          ],
          "type": "object"
        },
        "PaneReportAgentSessionParams": {
          "properties": {
            "agent": {
              "type": "string"
            },
            "agent_session_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "agent_session_path": {
              "type": [
                "string",
                "null"
              ]
            },
            "launch_env": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "pane_id": {
              "type": "string"
            },
            "seq": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "session_start_source": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "source",
            "agent"
          ],
          "type": "object"
        },
        "PaneReportMetadataParams": {
          "properties": {
            "agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "applies_to_source": {
              "type": [
                "string",
                "null"
              ]
            },
            "clear_custom_status": {
              "default": false,
              "type": "boolean"
            },
            "clear_display_agent": {
              "default": false,
              "type": "boolean"
            },
            "clear_state_labels": {
              "default": false,
              "type": "boolean"
            },
            "clear_title": {
              "default": false,
              "type": "boolean"
            },
            "custom_status": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            },
            "seq": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "source": {
              "type": "string"
            },
            "state_labels": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            },
            "tokens": {
              "additionalProperties": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": "object"
            },
            "ttl_ms": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "pane_id",
            "source"
          ],
          "type": "object"
        },
        "PaneResizeParams": {
          "properties": {
            "amount": {
              "format": "float",
              "type": [
                "number",
                "null"
              ]
            },
            "direction": {
              "$ref": "#/$defs/PaneDirection"
            },
            "pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "direction"
          ],
          "type": "object"
        },
        "PaneSendInputParams": {
          "properties": {
            "keys": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "pane_id": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "pane_id"
          ],
          "type": "object"
        },
        "PaneSendKeysParams": {
          "properties": {
            "keys": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "pane_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "keys"
          ],
          "type": "object"
        },
        "PaneSendTextParams": {
          "properties": {
            "pane_id": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "text"
          ],
          "type": "object"
        },
        "PaneSplitParams": {
          "properties": {
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "direction": {
              "$ref": "#/$defs/SplitDirection"
            },
            "env": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "focus": {
              "default": false,
              "type": "boolean"
            },
            "ratio": {
              "format": "float",
              "type": [
                "number",
                "null"
              ]
            },
            "target_pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "direction"
          ],
          "type": "object"
        },
        "PaneSwapParams": {
          "properties": {
            "direction": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PaneDirection"
                },
                {
                  "type": "null"
                }
              ]
            },
            "pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "target_pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PaneTarget": {
          "properties": {
            "pane_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id"
          ],
          "type": "object"
        },
        "PaneWaitForOutputParams": {
          "properties": {
            "lines": {
              "format": "uint32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "match": {
              "$ref": "#/$defs/OutputMatch"
            },
            "pane_id": {
              "type": "string"
            },
            "source": {
              "$ref": "#/$defs/ReadSource"
            },
            "strip_ansi": {
              "default": true,
              "type": "boolean"
            },
            "timeout_ms": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "pane_id",
            "source",
            "match"
          ],
          "type": "object"
        },
        "PaneZoomMode": {
          "enum": [
            "toggle",
            "on",
            "off"
          ],
          "type": "string"
        },
        "PaneZoomParams": {
          "properties": {
            "mode": {
              "$ref": "#/$defs/PaneZoomMode",
              "default": "toggle"
            },
            "pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PingParams": {
          "type": "object"
        },
        "PluginActionInvokeParams": {
          "properties": {
            "action_id": {
              "type": "string"
            },
            "context": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PluginInvocationContext"
                },
                {
                  "type": "null"
                }
              ]
            },
            "plugin_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "action_id"
          ],
          "type": "object"
        },
        "PluginActionListParams": {
          "properties": {
            "plugin_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PluginInvocationContext": {
          "properties": {
            "clicked_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "correlation_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_pane_agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_pane_cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_pane_status": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "invocation_source": {
              "type": [
                "string",
                "null"
              ]
            },
            "link_handler_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "selected_text": {
              "type": [
                "string",
                "null"
              ]
            },
            "tab_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "tab_label": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_label": {
              "type": [
                "string",
                "null"
              ]
            },
            "worktree": {
              "anyOf": [
                {
                  "$ref": "#/$defs/WorkspaceWorktreeInfo"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "type": "object"
        },
        "PluginLinkParams": {
          "properties": {
            "enabled": {
              "default": true,
              "type": "boolean"
            },
            "path": {
              "type": "string"
            },
            "source": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PluginSourceInfo"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "path"
          ],
          "type": "object"
        },
        "PluginListParams": {
          "properties": {
            "plugin_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PluginLogListParams": {
          "properties": {
            "limit": {
              "format": "uint",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "plugin_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PluginPaneCloseParams": {
          "properties": {
            "pane_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id"
          ],
          "type": "object"
        },
        "PluginPaneFocusParams": {
          "properties": {
            "pane_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id"
          ],
          "type": "object"
        },
        "PluginPaneOpenParams": {
          "properties": {
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "direction": {
              "anyOf": [
                {
                  "$ref": "#/$defs/SplitDirection"
                },
                {
                  "type": "null"
                }
              ]
            },
            "entrypoint": {
              "type": "string"
            },
            "env": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "focus": {
              "default": false,
              "type": "boolean"
            },
            "placement": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PluginPanePlacement"
                },
                {
                  "type": "null"
                }
              ]
            },
            "plugin_id": {
              "type": "string"
            },
            "target_pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "plugin_id",
            "entrypoint"
          ],
          "type": "object"
        },
        "PluginPanePlacement": {
          "enum": [
            "overlay",
            "split",
            "tab",
            "zoomed"
          ],
          "type": "string"
        },
        "PluginSetEnabledParams": {
          "properties": {
            "plugin_id": {
              "type": "string"
            }
          },
          "required": [
            "plugin_id"
          ],
          "type": "object"
        },
        "PluginSourceInfo": {
          "properties": {
            "installed_unix_ms": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "kind": {
              "$ref": "#/$defs/PluginSourceKind",
              "default": "local"
            },
            "managed_path": {
              "type": [
                "string",
                "null"
              ]
            },
            "owner": {
              "type": [
                "string",
                "null"
              ]
            },
            "repo": {
              "type": [
                "string",
                "null"
              ]
            },
            "requested_ref": {
              "type": [
                "string",
                "null"
              ]
            },
            "resolved_commit": {
              "type": [
                "string",
                "null"
              ]
            },
            "subdir": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PluginSourceKind": {
          "enum": [
            "local",
            "github"
          ],
          "type": "string"
        },
        "PluginUnlinkParams": {
          "properties": {
            "plugin_id": {
              "type": "string"
            }
          },
          "required": [
            "plugin_id"
          ],
          "type": "object"
        },
        "ReadFormat": {
          "enum": [
            "text",
            "ansi"
          ],
          "type": "string"
        },
        "ReadSource": {
          "enum": [
            "visible",
            "recent",
            "recent_unwrapped",
            "detection"
          ],
          "type": "string"
        },
        "ServerLiveHandoffParams": {
          "properties": {
            "expected_protocol": {
              "format": "uint32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "expected_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "import_exe": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "SplitDirection": {
          "enum": [
            "right",
            "down"
          ],
          "type": "string"
        },
        "Subscription": {
          "oneOf": [
            {
              "properties": {
                "type": {
                  "const": "workspace.created",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace.updated",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace.renamed",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace.closed",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace.focused",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "worktree.created",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "worktree.opened",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "worktree.removed",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "tab.created",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "tab.closed",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "tab.focused",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "tab.renamed",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "pane.created",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "pane.closed",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "pane.focused",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "pane.moved",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "pane.exited",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "pane.agent_detected",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "lines": {
                  "format": "uint32",
                  "minimum": 0,
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "match": {
                  "$ref": "#/$defs/OutputMatch"
                },
                "pane_id": {
                  "type": "string"
                },
                "source": {
                  "$ref": "#/$defs/ReadSource"
                },
                "strip_ansi": {
                  "default": true,
                  "type": "boolean"
                },
                "type": {
                  "const": "pane.output_matched",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "source",
                "match"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agent_status": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/AgentStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane.agent_status_changed",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane.scroll_changed",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "layout.updated",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          ]
        },
        "TabCreateParams": {
          "properties": {
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "env": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "focus": {
              "default": false,
              "type": "boolean"
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "TabListParams": {
          "properties": {
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "TabRenameParams": {
          "properties": {
            "label": {
              "type": "string"
            },
            "tab_id": {
              "type": "string"
            }
          },
          "required": [
            "tab_id",
            "label"
          ],
          "type": "object"
        },
        "TabTarget": {
          "properties": {
            "tab_id": {
              "type": "string"
            }
          },
          "required": [
            "tab_id"
          ],
          "type": "object"
        },
        "ToastOmhPosition": {
          "enum": [
            "top-left",
            "top-right",
            "bottom-left",
            "bottom-right"
          ],
          "type": "string"
        },
        "WorkspaceCreateParams": {
          "properties": {
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "env": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "focus": {
              "default": false,
              "type": "boolean"
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "WorkspaceMoveToGroupParams": {
          "properties": {
            "group_id": {
              "type": "string"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "workspace_id",
            "group_id"
          ],
          "type": "object"
        },
        "WorkspaceRenameParams": {
          "properties": {
            "label": {
              "type": "string"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "workspace_id",
            "label"
          ],
          "type": "object"
        },
        "WorkspaceTarget": {
          "properties": {
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "workspace_id"
          ],
          "type": "object"
        },
        "WorkspaceWorktreeInfo": {
          "properties": {
            "checkout_path": {
              "type": "string"
            },
            "is_linked_worktree": {
              "type": "boolean"
            },
            "repo_key": {
              "type": "string"
            },
            "repo_name": {
              "type": "string"
            },
            "repo_root": {
              "type": "string"
            }
          },
          "required": [
            "repo_key",
            "repo_name",
            "repo_root",
            "checkout_path",
            "is_linked_worktree"
          ],
          "type": "object"
        },
        "WorktreeCreateParams": {
          "properties": {
            "base": {
              "type": [
                "string",
                "null"
              ]
            },
            "branch": {
              "type": [
                "string",
                "null"
              ]
            },
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "focus": {
              "default": false,
              "type": "boolean"
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "path": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "WorktreeListParams": {
          "properties": {
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "WorktreeOpenParams": {
          "properties": {
            "branch": {
              "type": [
                "string",
                "null"
              ]
            },
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "focus": {
              "default": false,
              "type": "boolean"
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "path": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "WorktreeRemoveParams": {
          "properties": {
            "force": {
              "default": false,
              "type": "boolean"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "workspace_id"
          ],
          "type": "object"
        }
      },
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "oneOf": [
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "ping",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PingParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "server.stop",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EmptyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "server.live_handoff",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/ServerLiveHandoffParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "server.reload_config",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EmptyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "server.agent_manifests",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EmptyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "server.reload_agent_manifests",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EmptyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "notification.show",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/NotificationShowParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "group.create",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/GroupCreateParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "group.list",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EmptyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "group.focus",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/GroupTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "group.rename",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/GroupRenameParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "group.delete",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/GroupTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "client.window_title.set",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/ClientWindowTitleSetParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "client.window_title.clear",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EmptyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "session.snapshot",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EmptyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "workspace.create",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorkspaceCreateParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "workspace.list",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EmptyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "workspace.get",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorkspaceTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "workspace.focus",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorkspaceTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "workspace.rename",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorkspaceRenameParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "workspace.close",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorkspaceTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "workspace.move_to_group",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorkspaceMoveToGroupParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "worktree.list",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorktreeListParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "worktree.create",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorktreeCreateParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "worktree.open",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorktreeOpenParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "worktree.remove",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/WorktreeRemoveParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "tab.create",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/TabCreateParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "tab.list",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/TabListParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "tab.get",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/TabTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "tab.focus",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/TabTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "tab.rename",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/TabRenameParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "tab.close",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/TabTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "agent.list",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EmptyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "agent.get",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/AgentTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "agent.read",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/AgentReadParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "agent.explain",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/AgentTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "agent.send",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/AgentSendParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "agent.rename",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/AgentRenameParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "agent.focus",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/AgentTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "agent.start",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/AgentStartParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.split",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneSplitParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.focus",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.swap",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneSwapParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.move",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneMoveParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.zoom",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneZoomParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.layout",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneLayoutParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.process_info",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneProcessInfoParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "layout.export",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/LayoutExportParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "layout.apply",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/LayoutApplyParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.neighbor",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneNeighborParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.edges",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneEdgesParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.focus_direction",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneFocusDirectionParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.resize",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneResizeParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.list",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneListParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.current",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneCurrentParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.get",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.rename",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneRenameParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.send_text",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneSendTextParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.send_keys",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneSendKeysParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.send_input",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneSendInputParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.read",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneReadParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.report_agent",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneReportAgentParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.report_agent_session",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneReportAgentSessionParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.report_metadata",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneReportMetadataParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.clear_agent_authority",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneClearAgentAuthorityParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.release_agent",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneReleaseAgentParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.close",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneTarget"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "events.subscribe",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EventsSubscribeParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "events.wait",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/EventsWaitParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "pane.wait_for_output",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PaneWaitForOutputParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "integration.install",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/IntegrationInstallParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "integration.uninstall",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/IntegrationUninstallParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.link",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginLinkParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.list",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginListParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.unlink",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginUnlinkParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.enable",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginSetEnabledParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.disable",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginSetEnabledParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.action.list",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginActionListParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.action.invoke",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginActionInvokeParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.log.list",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginLogListParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.pane.open",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginPaneOpenParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.pane.focus",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginPaneFocusParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        },
        {
          "properties": {
            "id": {
              "description": "Caller-provided identifier echoed by the response.",
              "type": "string"
            },
            "method": {
              "const": "plugin.pane.close",
              "type": "string"
            },
            "params": {
              "$ref": "#/$defs/PluginPaneCloseParams"
            }
          },
          "required": [
            "id",
            "method",
            "params"
          ],
          "type": "object"
        }
      ],
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "required": [
        "id"
      ],
      "title": "Request",
      "type": "object"
    },
    "response": {
      "$defs": {
        "AgentInfo": {
          "properties": {
            "agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "agent_session": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentSessionInfo"
                },
                {
                  "type": "null"
                }
              ]
            },
            "agent_status": {
              "$ref": "#/$defs/AgentStatus"
            },
            "custom_status": {
              "type": [
                "string",
                "null"
              ]
            },
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused": {
              "type": "boolean"
            },
            "foreground_cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            },
            "revision": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "screen_detection_skipped": {
              "type": "boolean"
            },
            "state_labels": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "tab_id": {
              "type": "string"
            },
            "terminal_id": {
              "type": "string"
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            },
            "tokens": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "terminal_id",
            "agent_status",
            "workspace_id",
            "tab_id",
            "pane_id",
            "focused",
            "revision"
          ],
          "type": "object"
        },
        "AgentManifestInfo": {
          "properties": {
            "active_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "agent": {
              "type": "string"
            },
            "cached_remote_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "local_override_shadowing_remote": {
              "type": "boolean"
            },
            "remote_last_checked_unix": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "remote_update_error": {
              "type": [
                "string",
                "null"
              ]
            },
            "remote_update_result": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "type": "string"
            },
            "source_kind": {
              "type": "string"
            },
            "warning": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "agent",
            "source",
            "source_kind",
            "local_override_shadowing_remote"
          ],
          "type": "object"
        },
        "AgentSessionInfo": {
          "properties": {
            "agent": {
              "type": "string"
            },
            "kind": {
              "$ref": "#/$defs/AgentSessionRefKind"
            },
            "source": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          },
          "required": [
            "source",
            "agent",
            "kind",
            "value"
          ],
          "type": "object"
        },
        "AgentSessionRefKind": {
          "enum": [
            "id",
            "path"
          ],
          "type": "string"
        },
        "AgentStatus": {
          "enum": [
            "idle",
            "working",
            "blocked",
            "done",
            "unknown"
          ],
          "type": "string"
        },
        "ClientWindowTitleReason": {
          "enum": [
            "set",
            "cleared",
            "no_foreground_client"
          ],
          "type": "string"
        },
        "ConfigReloadStatus": {
          "enum": [
            "applied",
            "partial",
            "failed"
          ],
          "type": "string"
        },
        "EventData": {
          "oneOf": [
            {
              "properties": {
                "type": {
                  "const": "workspace_created",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                }
              },
              "required": [
                "type",
                "workspace"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace_updated",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                }
              },
              "required": [
                "type",
                "workspace"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace_closed",
                  "type": "string"
                },
                "workspace": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/WorkspaceInfo"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "label": {
                  "type": "string"
                },
                "type": {
                  "const": "workspace_renamed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "workspace_id",
                "label"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace_focused",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "worktree_created",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                },
                "worktree": {
                  "$ref": "#/$defs/WorktreeInfo"
                }
              },
              "required": [
                "type",
                "workspace",
                "worktree"
              ],
              "type": "object"
            },
            {
              "properties": {
                "already_open": {
                  "type": "boolean"
                },
                "type": {
                  "const": "worktree_opened",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                },
                "worktree": {
                  "$ref": "#/$defs/WorktreeInfo"
                }
              },
              "required": [
                "type",
                "workspace",
                "worktree",
                "already_open"
              ],
              "type": "object"
            },
            {
              "properties": {
                "forced": {
                  "type": "boolean"
                },
                "type": {
                  "const": "worktree_removed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                },
                "worktree": {
                  "$ref": "#/$defs/WorktreeInfo"
                }
              },
              "required": [
                "type",
                "workspace_id",
                "worktree",
                "forced"
              ],
              "type": "object"
            },
            {
              "properties": {
                "tab": {
                  "$ref": "#/$defs/TabInfo"
                },
                "type": {
                  "const": "tab_created",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab"
              ],
              "type": "object"
            },
            {
              "properties": {
                "tab_id": {
                  "type": "string"
                },
                "type": {
                  "const": "tab_closed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "label": {
                  "type": "string"
                },
                "tab_id": {
                  "type": "string"
                },
                "type": {
                  "const": "tab_renamed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab_id",
                "workspace_id",
                "label"
              ],
              "type": "object"
            },
            {
              "properties": {
                "tab_id": {
                  "type": "string"
                },
                "type": {
                  "const": "tab_focused",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "type": {
                  "const": "pane_created",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_closed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_focused",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "closed_tab_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_workspace_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_tab": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/TabInfo"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_workspace": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/WorkspaceInfo"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "previous_pane_id": {
                  "type": "string"
                },
                "previous_tab_id": {
                  "type": "string"
                },
                "previous_workspace_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_moved",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "previous_pane_id",
                "previous_workspace_id",
                "previous_tab_id",
                "pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "revision": {
                  "format": "uint64",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": {
                  "const": "pane_output_changed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id",
                "revision"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_exited",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "pane_agent_detected",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "agent_status": {
                  "$ref": "#/$defs/AgentStatus"
                },
                "custom_status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "display_agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pane_id": {
                  "type": "string"
                },
                "state_labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tokens": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": {
                  "const": "pane_agent_status_changed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "workspace_id",
                "agent_status"
              ],
              "type": "object"
            },
            {
              "properties": {
                "layout": {
                  "$ref": "#/$defs/PaneLayoutSnapshot"
                },
                "type": {
                  "const": "layout_updated",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "layout"
              ],
              "type": "object"
            }
          ]
        },
        "EventEnvelope": {
          "properties": {
            "data": {
              "$ref": "#/$defs/EventData"
            },
            "event": {
              "$ref": "#/$defs/EventKind"
            }
          },
          "required": [
            "event",
            "data"
          ],
          "type": "object"
        },
        "EventKind": {
          "enum": [
            "workspace_created",
            "workspace_updated",
            "workspace_closed",
            "workspace_renamed",
            "workspace_focused",
            "worktree_created",
            "worktree_opened",
            "worktree_removed",
            "tab_created",
            "tab_closed",
            "tab_renamed",
            "tab_focused",
            "pane_created",
            "pane_closed",
            "pane_focused",
            "pane_moved",
            "pane_output_changed",
            "pane_exited",
            "pane_agent_detected",
            "pane_agent_status_changed",
            "layout_updated"
          ],
          "type": "string"
        },
        "GroupInfo": {
          "properties": {
            "focused": {
              "type": "boolean"
            },
            "group_id": {
              "type": "string"
            },
            "icon": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "number": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "workspace_count": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "group_id",
            "number",
            "name",
            "icon",
            "focused",
            "workspace_count"
          ],
          "type": "object"
        },
        "InstalledPluginInfo": {
          "properties": {
            "actions": {
              "items": {
                "$ref": "#/$defs/PluginManifestAction"
              },
              "type": "array"
            },
            "build": {
              "items": {
                "$ref": "#/$defs/PluginManifestBuild"
              },
              "type": "array"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "enabled": {
              "type": "boolean"
            },
            "events": {
              "items": {
                "$ref": "#/$defs/PluginManifestEventHook"
              },
              "type": "array"
            },
            "link_handlers": {
              "items": {
                "$ref": "#/$defs/PluginManifestLinkHandler"
              },
              "type": "array"
            },
            "manifest_path": {
              "type": "string"
            },
            "min_omh_version": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "panes": {
              "items": {
                "$ref": "#/$defs/PluginManifestPane"
              },
              "type": "array"
            },
            "platforms": {
              "items": {
                "$ref": "#/$defs/PluginPlatform"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "plugin_id": {
              "type": "string"
            },
            "plugin_root": {
              "type": "string"
            },
            "source": {
              "$ref": "#/$defs/PluginSourceInfo",
              "default": {
                "kind": "local"
              }
            },
            "version": {
              "type": "string"
            },
            "warnings": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "plugin_id",
            "name",
            "version",
            "min_omh_version",
            "manifest_path",
            "plugin_root",
            "enabled"
          ],
          "type": "object"
        },
        "IntegrationInstallResult": {
          "properties": {
            "messages": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "messages"
          ],
          "type": "object"
        },
        "IntegrationTarget": {
          "enum": [
            "pi",
            "omp",
            "claude",
            "codex",
            "copilot",
            "devin",
            "kimi",
            "droid",
            "opencode",
            "hermes",
            "qodercli",
            "cursor",
            "grok"
          ],
          "type": "string"
        },
        "IntegrationUninstallResult": {
          "properties": {
            "messages": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "messages"
          ],
          "type": "object"
        },
        "LayoutDescription": {
          "properties": {
            "focused_pane_id": {
              "type": "string"
            },
            "root": {
              "$ref": "#/$defs/LayoutNode"
            },
            "tab_id": {
              "type": "string"
            },
            "workspace_id": {
              "type": "string"
            },
            "zoomed": {
              "type": "boolean"
            }
          },
          "required": [
            "workspace_id",
            "tab_id",
            "zoomed",
            "focused_pane_id",
            "root"
          ],
          "type": "object"
        },
        "LayoutNode": {
          "oneOf": [
            {
              "properties": {
                "command": {
                  "items": {
                    "type": "string"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                },
                "cwd": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "env": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pane_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "const": "pane",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "direction": {
                  "$ref": "#/$defs/SplitDirection"
                },
                "first": {
                  "$ref": "#/$defs/LayoutNode"
                },
                "ratio": {
                  "format": "float",
                  "type": "number"
                },
                "second": {
                  "$ref": "#/$defs/LayoutNode"
                },
                "type": {
                  "const": "split",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "direction",
                "ratio",
                "first",
                "second"
              ],
              "type": "object"
            }
          ]
        },
        "NotificationShowReason": {
          "enum": [
            "shown",
            "disabled",
            "rate_limited",
            "no_foreground_client",
            "busy"
          ],
          "type": "string"
        },
        "PaneDirection": {
          "enum": [
            "left",
            "right",
            "up",
            "down"
          ],
          "type": "string"
        },
        "PaneEdgesResult": {
          "properties": {
            "down": {
              "type": "boolean"
            },
            "layout": {
              "$ref": "#/$defs/PaneLayoutSnapshot"
            },
            "left": {
              "type": "boolean"
            },
            "pane_id": {
              "type": "string"
            },
            "right": {
              "type": "boolean"
            },
            "up": {
              "type": "boolean"
            }
          },
          "required": [
            "pane_id",
            "left",
            "right",
            "up",
            "down",
            "layout"
          ],
          "type": "object"
        },
        "PaneFocusDirectionReason": {
          "enum": [
            "no_neighbor"
          ],
          "type": "string"
        },
        "PaneFocusDirectionResult": {
          "properties": {
            "changed": {
              "type": "boolean"
            },
            "focused_pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "layout": {
              "$ref": "#/$defs/PaneLayoutSnapshot"
            },
            "reason": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PaneFocusDirectionReason"
                },
                {
                  "type": "null"
                }
              ]
            },
            "source_pane_id": {
              "type": "string"
            }
          },
          "required": [
            "changed",
            "source_pane_id",
            "layout"
          ],
          "type": "object"
        },
        "PaneInfo": {
          "properties": {
            "agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "agent_session": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentSessionInfo"
                },
                {
                  "type": "null"
                }
              ]
            },
            "agent_status": {
              "$ref": "#/$defs/AgentStatus"
            },
            "custom_status": {
              "type": [
                "string",
                "null"
              ]
            },
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused": {
              "type": "boolean"
            },
            "foreground_cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            },
            "revision": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "scroll": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PaneScrollInfo"
                },
                {
                  "type": "null"
                }
              ]
            },
            "state_labels": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "tab_id": {
              "type": "string"
            },
            "terminal_id": {
              "type": "string"
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            },
            "tokens": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "terminal_id",
            "workspace_id",
            "tab_id",
            "focused",
            "agent_status",
            "revision"
          ],
          "type": "object"
        },
        "PaneLayoutPane": {
          "properties": {
            "focused": {
              "type": "boolean"
            },
            "pane_id": {
              "type": "string"
            },
            "rect": {
              "$ref": "#/$defs/PaneLayoutRect"
            }
          },
          "required": [
            "pane_id",
            "focused",
            "rect"
          ],
          "type": "object"
        },
        "PaneLayoutRect": {
          "properties": {
            "height": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            },
            "width": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            },
            "x": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            },
            "y": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "x",
            "y",
            "width",
            "height"
          ],
          "type": "object"
        },
        "PaneLayoutSnapshot": {
          "properties": {
            "area": {
              "$ref": "#/$defs/PaneLayoutRect"
            },
            "focused_pane_id": {
              "type": "string"
            },
            "panes": {
              "items": {
                "$ref": "#/$defs/PaneLayoutPane"
              },
              "type": "array"
            },
            "splits": {
              "items": {
                "$ref": "#/$defs/PaneLayoutSplit"
              },
              "type": "array"
            },
            "tab_id": {
              "type": "string"
            },
            "workspace_id": {
              "type": "string"
            },
            "zoomed": {
              "type": "boolean"
            }
          },
          "required": [
            "workspace_id",
            "tab_id",
            "zoomed",
            "area",
            "focused_pane_id",
            "panes",
            "splits"
          ],
          "type": "object"
        },
        "PaneLayoutSplit": {
          "properties": {
            "direction": {
              "$ref": "#/$defs/SplitDirection"
            },
            "id": {
              "type": "string"
            },
            "ratio": {
              "format": "float",
              "type": "number"
            },
            "rect": {
              "$ref": "#/$defs/PaneLayoutRect"
            }
          },
          "required": [
            "id",
            "direction",
            "ratio",
            "rect"
          ],
          "type": "object"
        },
        "PaneMoveReason": {
          "enum": [
            "same_tab",
            "zoomed_tab"
          ],
          "type": "string"
        },
        "PaneMoveResult": {
          "properties": {
            "changed": {
              "type": "boolean"
            },
            "closed_tab_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "closed_workspace_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "created_tab": {
              "anyOf": [
                {
                  "$ref": "#/$defs/TabInfo"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_workspace": {
              "anyOf": [
                {
                  "$ref": "#/$defs/WorkspaceInfo"
                },
                {
                  "type": "null"
                }
              ]
            },
            "focused_pane_id": {
              "type": "string"
            },
            "pane": {
              "$ref": "#/$defs/PaneInfo"
            },
            "previous_pane_id": {
              "type": "string"
            },
            "previous_tab_id": {
              "type": "string"
            },
            "previous_workspace_id": {
              "type": "string"
            },
            "reason": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PaneMoveReason"
                },
                {
                  "type": "null"
                }
              ]
            },
            "source_layout": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PaneLayoutSnapshot"
                },
                {
                  "type": "null"
                }
              ]
            },
            "target_layout": {
              "$ref": "#/$defs/PaneLayoutSnapshot"
            }
          },
          "required": [
            "changed",
            "previous_pane_id",
            "previous_workspace_id",
            "previous_tab_id",
            "pane",
            "target_layout",
            "focused_pane_id"
          ],
          "type": "object"
        },
        "PaneNeighborResult": {
          "properties": {
            "direction": {
              "$ref": "#/$defs/PaneDirection"
            },
            "layout": {
              "$ref": "#/$defs/PaneLayoutSnapshot"
            },
            "neighbor_pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "direction",
            "layout"
          ],
          "type": "object"
        },
        "PaneProcessInfo": {
          "properties": {
            "foreground_process_group_id": {
              "format": "uint32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "foreground_processes": {
              "items": {
                "$ref": "#/$defs/PaneProcessInfoProcess"
              },
              "type": "array"
            },
            "pane_id": {
              "type": "string"
            },
            "shell_pid": {
              "format": "uint32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "tty": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "pane_id"
          ],
          "type": "object"
        },
        "PaneProcessInfoProcess": {
          "properties": {
            "argv": {
              "items": {
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "argv0": {
              "type": [
                "string",
                "null"
              ]
            },
            "cmdline": {
              "type": [
                "string",
                "null"
              ]
            },
            "cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "type": "string"
            },
            "pid": {
              "format": "uint32",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "pid",
            "name"
          ],
          "type": "object"
        },
        "PaneReadResult": {
          "properties": {
            "format": {
              "$ref": "#/$defs/ReadFormat"
            },
            "pane_id": {
              "type": "string"
            },
            "revision": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "source": {
              "$ref": "#/$defs/ReadSource"
            },
            "tab_id": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "truncated": {
              "type": "boolean"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "workspace_id",
            "tab_id",
            "source",
            "format",
            "text",
            "revision",
            "truncated"
          ],
          "type": "object"
        },
        "PaneResizeReason": {
          "enum": [
            "unchanged"
          ],
          "type": "string"
        },
        "PaneResizeResult": {
          "properties": {
            "changed": {
              "type": "boolean"
            },
            "focused_pane_id": {
              "type": "string"
            },
            "layout": {
              "$ref": "#/$defs/PaneLayoutSnapshot"
            },
            "pane_id": {
              "type": "string"
            },
            "reason": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PaneResizeReason"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "changed",
            "pane_id",
            "focused_pane_id",
            "layout"
          ],
          "type": "object"
        },
        "PaneScrollInfo": {
          "properties": {
            "max_offset_from_bottom": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "offset_from_bottom": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "viewport_rows": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "offset_from_bottom",
            "max_offset_from_bottom",
            "viewport_rows"
          ],
          "type": "object"
        },
        "PaneSwapReason": {
          "enum": [
            "no_neighbor",
            "same_pane",
            "not_found",
            "cross_tab"
          ],
          "type": "string"
        },
        "PaneSwapResult": {
          "properties": {
            "changed": {
              "type": "boolean"
            },
            "focused_pane_id": {
              "type": "string"
            },
            "layout": {
              "$ref": "#/$defs/PaneLayoutSnapshot"
            },
            "reason": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PaneSwapReason"
                },
                {
                  "type": "null"
                }
              ]
            },
            "source_pane_id": {
              "type": "string"
            },
            "target_pane_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "changed",
            "source_pane_id",
            "focused_pane_id",
            "layout"
          ],
          "type": "object"
        },
        "PaneZoomReason": {
          "enum": [
            "single_pane",
            "already_zoomed",
            "already_unzoomed"
          ],
          "type": "string"
        },
        "PaneZoomResult": {
          "properties": {
            "changed": {
              "type": "boolean"
            },
            "focus_changed": {
              "type": "boolean"
            },
            "focused_pane_id": {
              "type": "string"
            },
            "layout": {
              "$ref": "#/$defs/PaneLayoutSnapshot"
            },
            "pane_id": {
              "type": "string"
            },
            "reason": {
              "anyOf": [
                {
                  "$ref": "#/$defs/PaneZoomReason"
                },
                {
                  "type": "null"
                }
              ]
            },
            "zoom_changed": {
              "type": "boolean"
            },
            "zoomed": {
              "type": "boolean"
            }
          },
          "required": [
            "changed",
            "zoom_changed",
            "focus_changed",
            "pane_id",
            "focused_pane_id",
            "zoomed",
            "layout"
          ],
          "type": "object"
        },
        "PluginActionContext": {
          "enum": [
            "global",
            "workspace",
            "tab",
            "pane",
            "selection"
          ],
          "type": "string"
        },
        "PluginActionInfo": {
          "properties": {
            "action_id": {
              "type": "string"
            },
            "command": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "contexts": {
              "items": {
                "$ref": "#/$defs/PluginActionContext"
              },
              "type": "array"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "platforms": {
              "items": {
                "$ref": "#/$defs/PluginPlatform"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "plugin_id": {
              "type": "string"
            },
            "title": {
              "type": "string"
            }
          },
          "required": [
            "plugin_id",
            "action_id",
            "title",
            "command"
          ],
          "type": "object"
        },
        "PluginCommandLogInfo": {
          "properties": {
            "action_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "command": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "error": {
              "type": [
                "string",
                "null"
              ]
            },
            "event": {
              "type": [
                "string",
                "null"
              ]
            },
            "exit_code": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "finished_unix_ms": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "log_id": {
              "type": "string"
            },
            "plugin_id": {
              "type": "string"
            },
            "started_unix_ms": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "status": {
              "$ref": "#/$defs/PluginCommandStatus"
            },
            "stderr": {
              "type": [
                "string",
                "null"
              ]
            },
            "stdout": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "log_id",
            "plugin_id",
            "command",
            "status",
            "started_unix_ms"
          ],
          "type": "object"
        },
        "PluginCommandStatus": {
          "enum": [
            "running",
            "succeeded",
            "failed"
          ],
          "type": "string"
        },
        "PluginInvocationContext": {
          "properties": {
            "clicked_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "correlation_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_pane_agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_pane_cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_pane_status": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "invocation_source": {
              "type": [
                "string",
                "null"
              ]
            },
            "link_handler_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "selected_text": {
              "type": [
                "string",
                "null"
              ]
            },
            "tab_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "tab_label": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_cwd": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "workspace_label": {
              "type": [
                "string",
                "null"
              ]
            },
            "worktree": {
              "anyOf": [
                {
                  "$ref": "#/$defs/WorkspaceWorktreeInfo"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "type": "object"
        },
        "PluginManifestAction": {
          "properties": {
            "command": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "contexts": {
              "items": {
                "$ref": "#/$defs/PluginActionContext"
              },
              "type": "array"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "type": "string"
            },
            "platforms": {
              "items": {
                "$ref": "#/$defs/PluginPlatform"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "title": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "title",
            "command"
          ],
          "type": "object"
        },
        "PluginManifestBuild": {
          "properties": {
            "command": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "platforms": {
              "items": {
                "$ref": "#/$defs/PluginPlatform"
              },
              "type": [
                "array",
                "null"
              ]
            }
          },
          "required": [
            "command"
          ],
          "type": "object"
        },
        "PluginManifestEventHook": {
          "properties": {
            "command": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "on": {
              "type": "string"
            },
            "platforms": {
              "items": {
                "$ref": "#/$defs/PluginPlatform"
              },
              "type": [
                "array",
                "null"
              ]
            }
          },
          "required": [
            "on",
            "command"
          ],
          "type": "object"
        },
        "PluginManifestLinkHandler": {
          "properties": {
            "action": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "pattern": {
              "type": "string"
            },
            "platforms": {
              "items": {
                "$ref": "#/$defs/PluginPlatform"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "title": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "title",
            "pattern",
            "action"
          ],
          "type": "object"
        },
        "PluginManifestPane": {
          "properties": {
            "command": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "type": "string"
            },
            "placement": {
              "$ref": "#/$defs/PluginPanePlacement",
              "default": "overlay"
            },
            "platforms": {
              "items": {
                "$ref": "#/$defs/PluginPlatform"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "title": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "title",
            "command"
          ],
          "type": "object"
        },
        "PluginPaneInfo": {
          "properties": {
            "entrypoint": {
              "type": "string"
            },
            "pane": {
              "$ref": "#/$defs/PaneInfo"
            },
            "plugin_id": {
              "type": "string"
            }
          },
          "required": [
            "plugin_id",
            "entrypoint",
            "pane"
          ],
          "type": "object"
        },
        "PluginPanePlacement": {
          "enum": [
            "overlay",
            "split",
            "tab",
            "zoomed"
          ],
          "type": "string"
        },
        "PluginPlatform": {
          "enum": [
            "linux",
            "macos",
            "windows"
          ],
          "type": "string"
        },
        "PluginSourceInfo": {
          "properties": {
            "installed_unix_ms": {
              "format": "uint64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "kind": {
              "$ref": "#/$defs/PluginSourceKind",
              "default": "local"
            },
            "managed_path": {
              "type": [
                "string",
                "null"
              ]
            },
            "owner": {
              "type": [
                "string",
                "null"
              ]
            },
            "repo": {
              "type": [
                "string",
                "null"
              ]
            },
            "requested_ref": {
              "type": [
                "string",
                "null"
              ]
            },
            "resolved_commit": {
              "type": [
                "string",
                "null"
              ]
            },
            "subdir": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "PluginSourceKind": {
          "enum": [
            "local",
            "github"
          ],
          "type": "string"
        },
        "ReadFormat": {
          "enum": [
            "text",
            "ansi"
          ],
          "type": "string"
        },
        "ReadSource": {
          "enum": [
            "visible",
            "recent",
            "recent_unwrapped",
            "detection"
          ],
          "type": "string"
        },
        "ResponseResult": {
          "oneOf": [
            {
              "properties": {
                "capabilities": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/ServerCapabilities"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "protocol": {
                  "format": "uint32",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": {
                  "const": "pong",
                  "type": "string"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "version",
                "protocol"
              ],
              "type": "object"
            },
            {
              "properties": {
                "snapshot": {
                  "$ref": "#/$defs/SessionSnapshot"
                },
                "type": {
                  "const": "session_snapshot",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "snapshot"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace_info",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                }
              },
              "required": [
                "type",
                "workspace"
              ],
              "type": "object"
            },
            {
              "properties": {
                "root_pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "tab": {
                  "$ref": "#/$defs/TabInfo"
                },
                "type": {
                  "const": "workspace_created",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                }
              },
              "required": [
                "type",
                "workspace",
                "tab",
                "root_pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "workspace_list",
                  "type": "string"
                },
                "workspaces": {
                  "items": {
                    "$ref": "#/$defs/WorkspaceInfo"
                  },
                  "type": "array"
                }
              },
              "required": [
                "type",
                "workspaces"
              ],
              "type": "object"
            },
            {
              "properties": {
                "source": {
                  "$ref": "#/$defs/WorktreeSourceInfo"
                },
                "type": {
                  "const": "worktree_list",
                  "type": "string"
                },
                "worktrees": {
                  "items": {
                    "$ref": "#/$defs/WorktreeInfo"
                  },
                  "type": "array"
                }
              },
              "required": [
                "type",
                "source",
                "worktrees"
              ],
              "type": "object"
            },
            {
              "properties": {
                "root_pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "tab": {
                  "$ref": "#/$defs/TabInfo"
                },
                "type": {
                  "const": "worktree_created",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                },
                "worktree": {
                  "$ref": "#/$defs/WorktreeInfo"
                }
              },
              "required": [
                "type",
                "workspace",
                "tab",
                "root_pane",
                "worktree"
              ],
              "type": "object"
            },
            {
              "properties": {
                "already_open": {
                  "type": "boolean"
                },
                "root_pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "tab": {
                  "$ref": "#/$defs/TabInfo"
                },
                "type": {
                  "const": "worktree_opened",
                  "type": "string"
                },
                "workspace": {
                  "$ref": "#/$defs/WorkspaceInfo"
                },
                "worktree": {
                  "$ref": "#/$defs/WorktreeInfo"
                }
              },
              "required": [
                "type",
                "workspace",
                "tab",
                "root_pane",
                "worktree",
                "already_open"
              ],
              "type": "object"
            },
            {
              "properties": {
                "forced": {
                  "type": "boolean"
                },
                "path": {
                  "type": "string"
                },
                "type": {
                  "const": "worktree_removed",
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "workspace_id",
                "path",
                "forced"
              ],
              "type": "object"
            },
            {
              "properties": {
                "group": {
                  "$ref": "#/$defs/GroupInfo"
                },
                "type": {
                  "const": "group_info",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "group"
              ],
              "type": "object"
            },
            {
              "properties": {
                "groups": {
                  "items": {
                    "$ref": "#/$defs/GroupInfo"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "group_list",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "groups"
              ],
              "type": "object"
            },
            {
              "properties": {
                "tab": {
                  "$ref": "#/$defs/TabInfo"
                },
                "type": {
                  "const": "tab_info",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab"
              ],
              "type": "object"
            },
            {
              "properties": {
                "root_pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "tab": {
                  "$ref": "#/$defs/TabInfo"
                },
                "type": {
                  "const": "tab_created",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tab",
                "root_pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "tabs": {
                  "items": {
                    "$ref": "#/$defs/TabInfo"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "tab_list",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "tabs"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agent": {
                  "$ref": "#/$defs/AgentInfo"
                },
                "type": {
                  "const": "agent_info",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "agent"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agent": {
                  "$ref": "#/$defs/AgentInfo"
                },
                "argv": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "agent_started",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "agent",
                "argv"
              ],
              "type": "object"
            },
            {
              "properties": {
                "agents": {
                  "items": {
                    "$ref": "#/$defs/AgentInfo"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "agent_list",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "agents"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "type": {
                  "const": "pane_info",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "panes": {
                  "items": {
                    "$ref": "#/$defs/PaneInfo"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "pane_list",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "panes"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane": {
                  "$ref": "#/$defs/PaneInfo"
                },
                "type": {
                  "const": "pane_current",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "swap": {
                  "$ref": "#/$defs/PaneSwapResult"
                },
                "type": {
                  "const": "pane_swap",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "swap"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "pane_zoom",
                  "type": "string"
                },
                "zoom": {
                  "$ref": "#/$defs/PaneZoomResult"
                }
              },
              "required": [
                "type",
                "zoom"
              ],
              "type": "object"
            },
            {
              "properties": {
                "layout": {
                  "$ref": "#/$defs/PaneLayoutSnapshot"
                },
                "type": {
                  "const": "pane_layout",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "layout"
              ],
              "type": "object"
            },
            {
              "properties": {
                "process_info": {
                  "$ref": "#/$defs/PaneProcessInfo"
                },
                "type": {
                  "const": "pane_process_info",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "process_info"
              ],
              "type": "object"
            },
            {
              "properties": {
                "layout": {
                  "$ref": "#/$defs/LayoutDescription"
                },
                "type": {
                  "const": "layout_export",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "layout"
              ],
              "type": "object"
            },
            {
              "properties": {
                "layout": {
                  "$ref": "#/$defs/LayoutDescription"
                },
                "type": {
                  "const": "layout_apply",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "layout"
              ],
              "type": "object"
            },
            {
              "properties": {
                "neighbor": {
                  "$ref": "#/$defs/PaneNeighborResult"
                },
                "type": {
                  "const": "pane_neighbor",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "neighbor"
              ],
              "type": "object"
            },
            {
              "properties": {
                "edges": {
                  "$ref": "#/$defs/PaneEdgesResult"
                },
                "type": {
                  "const": "pane_edges",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "edges"
              ],
              "type": "object"
            },
            {
              "properties": {
                "focus": {
                  "$ref": "#/$defs/PaneFocusDirectionResult"
                },
                "type": {
                  "const": "pane_focus_direction",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "focus"
              ],
              "type": "object"
            },
            {
              "properties": {
                "resize": {
                  "$ref": "#/$defs/PaneResizeResult"
                },
                "type": {
                  "const": "pane_resize",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "resize"
              ],
              "type": "object"
            },
            {
              "properties": {
                "move_result": {
                  "$ref": "#/$defs/PaneMoveResult"
                },
                "type": {
                  "const": "pane_move",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "move_result"
              ],
              "type": "object"
            },
            {
              "properties": {
                "read": {
                  "$ref": "#/$defs/PaneReadResult"
                },
                "type": {
                  "const": "pane_read",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "read"
              ],
              "type": "object"
            },
            {
              "properties": {
                "explain": true,
                "type": {
                  "const": "agent_explain",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "explain"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "subscription_started",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            },
            {
              "properties": {
                "event": {
                  "$ref": "#/$defs/EventEnvelope"
                },
                "type": {
                  "const": "wait_matched",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "event"
              ],
              "type": "object"
            },
            {
              "properties": {
                "matched_line": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pane_id": {
                  "type": "string"
                },
                "read": {
                  "$ref": "#/$defs/PaneReadResult"
                },
                "revision": {
                  "format": "uint64",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": {
                  "const": "output_matched",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id",
                "revision",
                "read"
              ],
              "type": "object"
            },
            {
              "properties": {
                "reason": {
                  "$ref": "#/$defs/NotificationShowReason"
                },
                "shown": {
                  "type": "boolean"
                },
                "type": {
                  "const": "notification_show",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "shown",
                "reason"
              ],
              "type": "object"
            },
            {
              "properties": {
                "changed": {
                  "type": "boolean"
                },
                "reason": {
                  "$ref": "#/$defs/ClientWindowTitleReason"
                },
                "type": {
                  "const": "client_window_title",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "changed",
                "reason"
              ],
              "type": "object"
            },
            {
              "properties": {
                "details": {
                  "$ref": "#/$defs/IntegrationInstallResult"
                },
                "target": {
                  "$ref": "#/$defs/IntegrationTarget"
                },
                "type": {
                  "const": "integration_install",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "target",
                "details"
              ],
              "type": "object"
            },
            {
              "properties": {
                "details": {
                  "$ref": "#/$defs/IntegrationUninstallResult"
                },
                "target": {
                  "$ref": "#/$defs/IntegrationTarget"
                },
                "type": {
                  "const": "integration_uninstall",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "target",
                "details"
              ],
              "type": "object"
            },
            {
              "properties": {
                "manifests": {
                  "items": {
                    "$ref": "#/$defs/AgentManifestInfo"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "agent_manifest_reload",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "manifests"
              ],
              "type": "object"
            },
            {
              "properties": {
                "last_check_unix": {
                  "format": "uint64",
                  "minimum": 0,
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "last_result": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "manifests": {
                  "items": {
                    "$ref": "#/$defs/AgentManifestInfo"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "agent_manifest_status",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "manifests"
              ],
              "type": "object"
            },
            {
              "properties": {
                "plugin": {
                  "$ref": "#/$defs/InstalledPluginInfo"
                },
                "type": {
                  "const": "plugin_linked",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "plugin"
              ],
              "type": "object"
            },
            {
              "properties": {
                "plugins": {
                  "items": {
                    "$ref": "#/$defs/InstalledPluginInfo"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "plugin_list",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "plugins"
              ],
              "type": "object"
            },
            {
              "properties": {
                "plugin_id": {
                  "type": "string"
                },
                "removed": {
                  "type": "boolean"
                },
                "type": {
                  "const": "plugin_unlinked",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "plugin_id",
                "removed"
              ],
              "type": "object"
            },
            {
              "properties": {
                "plugin": {
                  "$ref": "#/$defs/InstalledPluginInfo"
                },
                "type": {
                  "const": "plugin_enabled",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "plugin"
              ],
              "type": "object"
            },
            {
              "properties": {
                "plugin": {
                  "$ref": "#/$defs/InstalledPluginInfo"
                },
                "type": {
                  "const": "plugin_disabled",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "plugin"
              ],
              "type": "object"
            },
            {
              "properties": {
                "actions": {
                  "items": {
                    "$ref": "#/$defs/PluginActionInfo"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "plugin_action_list",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "actions"
              ],
              "type": "object"
            },
            {
              "properties": {
                "action": {
                  "$ref": "#/$defs/PluginActionInfo"
                },
                "context": {
                  "$ref": "#/$defs/PluginInvocationContext"
                },
                "log": {
                  "$ref": "#/$defs/PluginCommandLogInfo"
                },
                "type": {
                  "const": "plugin_action_invoked",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "action",
                "context",
                "log"
              ],
              "type": "object"
            },
            {
              "properties": {
                "logs": {
                  "items": {
                    "$ref": "#/$defs/PluginCommandLogInfo"
                  },
                  "type": "array"
                },
                "type": {
                  "const": "plugin_log_list",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "logs"
              ],
              "type": "object"
            },
            {
              "properties": {
                "plugin_pane": {
                  "$ref": "#/$defs/PluginPaneInfo"
                },
                "type": {
                  "const": "plugin_pane_opened",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "plugin_pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "plugin_pane": {
                  "$ref": "#/$defs/PluginPaneInfo"
                },
                "type": {
                  "const": "plugin_pane_focused",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "plugin_pane"
              ],
              "type": "object"
            },
            {
              "properties": {
                "pane_id": {
                  "type": "string"
                },
                "type": {
                  "const": "plugin_pane_closed",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "pane_id"
              ],
              "type": "object"
            },
            {
              "properties": {
                "diagnostics": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "status": {
                  "$ref": "#/$defs/ConfigReloadStatus"
                },
                "type": {
                  "const": "config_reload",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "status",
                "diagnostics"
              ],
              "type": "object"
            },
            {
              "properties": {
                "type": {
                  "const": "ok",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          ]
        },
        "ServerCapabilities": {
          "properties": {
            "live_handoff": {
              "type": "boolean"
            }
          },
          "required": [
            "live_handoff"
          ],
          "type": "object"
        },
        "SessionSnapshot": {
          "properties": {
            "agents": {
              "items": {
                "$ref": "#/$defs/AgentInfo"
              },
              "type": "array"
            },
            "focused_pane_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_tab_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "focused_workspace_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "layouts": {
              "items": {
                "$ref": "#/$defs/PaneLayoutSnapshot"
              },
              "type": "array"
            },
            "panes": {
              "items": {
                "$ref": "#/$defs/PaneInfo"
              },
              "type": "array"
            },
            "protocol": {
              "format": "uint32",
              "minimum": 0,
              "type": "integer"
            },
            "tabs": {
              "items": {
                "$ref": "#/$defs/TabInfo"
              },
              "type": "array"
            },
            "version": {
              "type": "string"
            },
            "workspaces": {
              "items": {
                "$ref": "#/$defs/WorkspaceInfo"
              },
              "type": "array"
            }
          },
          "required": [
            "version",
            "protocol",
            "workspaces",
            "tabs",
            "panes",
            "layouts",
            "agents"
          ],
          "type": "object"
        },
        "SplitDirection": {
          "enum": [
            "right",
            "down"
          ],
          "type": "string"
        },
        "TabInfo": {
          "properties": {
            "agent_status": {
              "$ref": "#/$defs/AgentStatus"
            },
            "focused": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "number": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "pane_count": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "tab_id": {
              "type": "string"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "tab_id",
            "workspace_id",
            "number",
            "label",
            "focused",
            "pane_count",
            "agent_status"
          ],
          "type": "object"
        },
        "WorkspaceInfo": {
          "properties": {
            "active_tab_id": {
              "type": "string"
            },
            "agent_status": {
              "$ref": "#/$defs/AgentStatus"
            },
            "focused": {
              "type": "boolean"
            },
            "group_id": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "number": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "pane_count": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "tab_count": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "workspace_id": {
              "type": "string"
            },
            "worktree": {
              "anyOf": [
                {
                  "$ref": "#/$defs/WorkspaceWorktreeInfo"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "workspace_id",
            "group_id",
            "number",
            "label",
            "focused",
            "pane_count",
            "tab_count",
            "active_tab_id",
            "agent_status"
          ],
          "type": "object"
        },
        "WorkspaceWorktreeInfo": {
          "properties": {
            "checkout_path": {
              "type": "string"
            },
            "is_linked_worktree": {
              "type": "boolean"
            },
            "repo_key": {
              "type": "string"
            },
            "repo_name": {
              "type": "string"
            },
            "repo_root": {
              "type": "string"
            }
          },
          "required": [
            "repo_key",
            "repo_name",
            "repo_root",
            "checkout_path",
            "is_linked_worktree"
          ],
          "type": "object"
        },
        "WorktreeInfo": {
          "properties": {
            "branch": {
              "type": [
                "string",
                "null"
              ]
            },
            "is_bare": {
              "type": "boolean"
            },
            "is_detached": {
              "type": "boolean"
            },
            "is_linked_worktree": {
              "type": "boolean"
            },
            "is_prunable": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "open_workspace_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "path": {
              "type": "string"
            }
          },
          "required": [
            "path",
            "is_bare",
            "is_detached",
            "is_prunable",
            "is_linked_worktree",
            "label"
          ],
          "type": "object"
        },
        "WorktreeSourceInfo": {
          "properties": {
            "repo_key": {
              "type": "string"
            },
            "repo_name": {
              "type": "string"
            },
            "repo_root": {
              "type": "string"
            },
            "source_checkout_path": {
              "type": "string"
            },
            "source_workspace_id": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "repo_key",
            "repo_name",
            "repo_root",
            "source_checkout_path"
          ],
          "type": "object"
        }
      },
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "id": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/ResponseResult"
        }
      },
      "required": [
        "id",
        "result"
      ],
      "title": "SuccessResponse",
      "type": "object"
    },
    "subscription_event": {
      "$defs": {
        "AgentStatus": {
          "enum": [
            "idle",
            "working",
            "blocked",
            "done",
            "unknown"
          ],
          "type": "string"
        },
        "PaneAgentStatusChangedEvent": {
          "properties": {
            "agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "agent_status": {
              "$ref": "#/$defs/AgentStatus"
            },
            "custom_status": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_agent": {
              "type": [
                "string",
                "null"
              ]
            },
            "pane_id": {
              "type": "string"
            },
            "state_labels": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            },
            "tokens": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "workspace_id",
            "agent_status"
          ],
          "type": "object"
        },
        "PaneOutputMatchedEvent": {
          "properties": {
            "matched_line": {
              "type": "string"
            },
            "pane_id": {
              "type": "string"
            },
            "read": {
              "$ref": "#/$defs/PaneReadResult"
            }
          },
          "required": [
            "pane_id",
            "matched_line",
            "read"
          ],
          "type": "object"
        },
        "PaneReadResult": {
          "properties": {
            "format": {
              "$ref": "#/$defs/ReadFormat"
            },
            "pane_id": {
              "type": "string"
            },
            "revision": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "source": {
              "$ref": "#/$defs/ReadSource"
            },
            "tab_id": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "truncated": {
              "type": "boolean"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "workspace_id",
            "tab_id",
            "source",
            "format",
            "text",
            "revision",
            "truncated"
          ],
          "type": "object"
        },
        "PaneScrollChangedEvent": {
          "properties": {
            "pane_id": {
              "type": "string"
            },
            "scroll": {
              "$ref": "#/$defs/PaneScrollInfo"
            },
            "workspace_id": {
              "type": "string"
            }
          },
          "required": [
            "pane_id",
            "workspace_id",
            "scroll"
          ],
          "type": "object"
        },
        "PaneScrollInfo": {
          "properties": {
            "max_offset_from_bottom": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "offset_from_bottom": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "viewport_rows": {
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "offset_from_bottom",
            "max_offset_from_bottom",
            "viewport_rows"
          ],
          "type": "object"
        },
        "ReadFormat": {
          "enum": [
            "text",
            "ansi"
          ],
          "type": "string"
        },
        "ReadSource": {
          "enum": [
            "visible",
            "recent",
            "recent_unwrapped",
            "detection"
          ],
          "type": "string"
        },
        "SubscriptionEventData": {
          "anyOf": [
            {
              "$ref": "#/$defs/PaneOutputMatchedEvent"
            },
            {
              "$ref": "#/$defs/PaneAgentStatusChangedEvent"
            },
            {
              "$ref": "#/$defs/PaneScrollChangedEvent"
            }
          ]
        },
        "SubscriptionEventKind": {
          "enum": [
            "pane.output_matched",
            "pane.agent_status_changed",
            "pane.scroll_changed"
          ],
          "type": "string"
        }
      },
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "data": {
          "$ref": "#/$defs/SubscriptionEventData"
        },
        "event": {
          "$ref": "#/$defs/SubscriptionEventKind"
        }
      },
      "required": [
        "event",
        "data"
      ],
      "title": "SubscriptionEventEnvelope",
      "type": "object"
    }
  }
}
