aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-29 22:27:19 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-29 22:27:19 +0300
commit25aeaa46f6c807be686b710c5c3aa656969f07e5 (patch)
tree8b9b4d4abce5951c2d87ee22c38eacb544eff81a
parent9150ed6268874d1f2a314b1ddbf531b66df1e105 (diff)
feat: generate socket protocol schema
-rw-r--r--Cargo.lock63
-rw-r--r--Cargo.toml1
-rw-r--r--docs/next/api/herdr-api.schema.json8593
-rw-r--r--src/agent_resume.rs2
-rw-r--r--src/api/schema.rs4
-rw-r--r--src/api/schema/agents.rs12
-rw-r--r--src/api/schema/common.rs34
-rw-r--r--src/api/schema/events.rs28
-rw-r--r--src/api/schema/integrations.rs10
-rw-r--r--src/api/schema/panes.rs104
-rw-r--r--src/api/schema/plugins.rs56
-rw-r--r--src/api/schema/response.rs10
-rw-r--r--src/api/schema/server.rs6
-rw-r--r--src/api/schema/session.rs2
-rw-r--r--src/api/schema/tabs.rs10
-rw-r--r--src/api/schema/tests.rs98
-rw-r--r--src/api/schema/workspaces.rs10
-rw-r--r--src/api/schema/worktrees.rs12
-rw-r--r--src/config/model.rs6
19 files changed, 8914 insertions, 147 deletions
diff --git a/Cargo.lock b/Cargo.lock
index e8b9d6b7..ee370b2e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -374,6 +374,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
[[package]]
+name = "dyn-clone"
+version = "1.0.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
+
+[[package]]
name = "either"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -550,6 +556,7 @@ dependencies = [
"portable-pty",
"ratatui",
"regex",
+ "schemars",
"serde",
"serde_json",
"sha2",
@@ -1244,6 +1251,26 @@ dependencies = [
]
[[package]]
+name = "ref-cast"
+version = "1.0.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"
+dependencies = [
+ "ref-cast-impl",
+]
+
+[[package]]
+name = "ref-cast-impl"
+version = "1.0.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.117",
+]
+
+[[package]]
name = "regex"
version = "1.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1307,6 +1334,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
[[package]]
+name = "schemars"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc"
+dependencies = [
+ "dyn-clone",
+ "ref-cast",
+ "schemars_derive",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "schemars_derive"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 2.0.117",
+]
+
+[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1349,6 +1401,17 @@ dependencies = [
]
[[package]]
+name = "serde_derive_internals"
+version = "0.29.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.117",
+]
+
+[[package]]
name = "serde_json"
version = "1.0.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 440b3fe8..1e7f3112 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,6 +31,7 @@ toml = "0.8"
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
unicode-width = "0.2"
+schemars = { version = "1.2.1", features = ["derive"] }
[patch.crates-io]
portable-pty = { path = "vendor/portable-pty" }
diff --git a/docs/next/api/herdr-api.schema.json b/docs/next/api/herdr-api.schema.json
new file mode 100644
index 00000000..0c42c88a
--- /dev/null
+++ b/docs/next/api/herdr-api.schema.json
@@ -0,0 +1,8593 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "protocol": 15,
+ "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": "#/schemas/error_response/$defs/ErrorBody"
+ },
+ "id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "error"
+ ],
+ "title": "ErrorResponse",
+ "type": "object"
+ },
+ "event": {
+ "$defs": {
+ "AgentSessionInfo": {
+ "properties": {
+ "agent": {
+ "type": "string"
+ },
+ "kind": {
+ "$ref": "#/schemas/event/$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": "#/schemas/event/$defs/WorkspaceInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "type": {
+ "const": "workspace_updated",
+ "type": "string"
+ },
+ "workspace": {
+ "$ref": "#/schemas/event/$defs/WorkspaceInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "type": {
+ "const": "workspace_closed",
+ "type": "string"
+ },
+ "workspace": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/event/$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": {
+ "insert_index": {
+ "format": "uint",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "type": {
+ "const": "workspace_moved",
+ "type": "string"
+ },
+ "workspace_id": {
+ "type": "string"
+ },
+ "workspaces": {
+ "items": {
+ "$ref": "#/schemas/event/$defs/WorkspaceInfo"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "type",
+ "workspace_id",
+ "insert_index",
+ "workspaces"
+ ],
+ "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": "#/schemas/event/$defs/WorkspaceInfo"
+ },
+ "worktree": {
+ "$ref": "#/schemas/event/$defs/WorktreeInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace",
+ "worktree"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "already_open": {
+ "type": "boolean"
+ },
+ "type": {
+ "const": "worktree_opened",
+ "type": "string"
+ },
+ "workspace": {
+ "$ref": "#/schemas/event/$defs/WorkspaceInfo"
+ },
+ "worktree": {
+ "$ref": "#/schemas/event/$defs/WorktreeInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace",
+ "worktree",
+ "already_open"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "forced": {
+ "type": "boolean"
+ },
+ "type": {
+ "const": "worktree_removed",
+ "type": "string"
+ },
+ "workspace": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/event/$defs/WorkspaceInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "workspace_id": {
+ "type": "string"
+ },
+ "worktree": {
+ "$ref": "#/schemas/event/$defs/WorktreeInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace_id",
+ "worktree",
+ "forced"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tab": {
+ "$ref": "#/schemas/event/$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": {
+ "insert_index": {
+ "format": "uint",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "tab_id": {
+ "type": "string"
+ },
+ "tabs": {
+ "items": {
+ "$ref": "#/schemas/event/$defs/TabInfo"
+ },
+ "type": "array"
+ },
+ "type": {
+ "const": "tab_moved",
+ "type": "string"
+ },
+ "workspace_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "tab_id",
+ "workspace_id",
+ "insert_index",
+ "tabs"
+ ],
+ "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": "#/schemas/event/$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": "#/schemas/event/$defs/TabInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created_workspace": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/event/$defs/WorkspaceInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "pane": {
+ "$ref": "#/schemas/event/$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": "#/schemas/event/$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"
+ ]
+ },
+ "type": {
+ "const": "pane_agent_status_changed",
+ "type": "string"
+ },
+ "workspace_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "pane_id",
+ "workspace_id",
+ "agent_status"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "EventKind": {
+ "enum": [
+ "workspace_created",
+ "workspace_updated",
+ "workspace_closed",
+ "workspace_renamed",
+ "workspace_moved",
+ "workspace_focused",
+ "worktree_created",
+ "worktree_opened",
+ "worktree_removed",
+ "tab_created",
+ "tab_closed",
+ "tab_renamed",
+ "tab_moved",
+ "tab_focused",
+ "pane_created",
+ "pane_closed",
+ "pane_focused",
+ "pane_moved",
+ "pane_output_changed",
+ "pane_exited",
+ "pane_agent_detected",
+ "pane_agent_status_changed"
+ ],
+ "type": "string"
+ },
+ "PaneInfo": {
+ "properties": {
+ "agent": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "agent_session": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/event/$defs/AgentSessionInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "agent_status": {
+ "$ref": "#/schemas/event/$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"
+ },
+ "state_labels": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "tab_id": {
+ "type": "string"
+ },
+ "terminal_id": {
+ "type": "string"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "workspace_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "pane_id",
+ "terminal_id",
+ "workspace_id",
+ "tab_id",
+ "focused",
+ "agent_status",
+ "revision"
+ ],
+ "type": "object"
+ },
+ "TabInfo": {
+ "properties": {
+ "agent_status": {
+ "$ref": "#/schemas/event/$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": "#/schemas/event/$defs/AgentStatus"
+ },
+ "focused": {
+ "type": "boolean"
+ },
+ "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": "#/schemas/event/$defs/WorkspaceWorktreeInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "workspace_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": "#/schemas/event/$defs/EventData"
+ },
+ "event": {
+ "$ref": "#/schemas/event/$defs/EventKind"
+ }
+ },
+ "required": [
+ "event",
+ "data"
+ ],
+ "title": "EventEnvelope",
+ "type": "object"
+ },
+ "request": {
+ "$defs": {
+ "AgentReadParams": {
+ "properties": {
+ "format": {
+ "$ref": "#/schemas/request/$defs/ReadFormat",
+ "default": "text"
+ },
+ "lines": {
+ "format": "uint32",
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "source": {
+ "$ref": "#/schemas/request/$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": "#/schemas/request/$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_moved",
+ "type": "string"
+ },
+ "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_moved",
+ "type": "string"
+ },
+ "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": "#/schemas/request/$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": "#/schemas/request/$defs/Subscription"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "subscriptions"
+ ],
+ "type": "object"
+ },
+ "EventsWaitParams": {
+ "properties": {
+ "match_event": {
+ "$ref": "#/schemas/request/$defs/EventMatch"
+ },
+ "timeout_ms": {
+ "format": "uint64",
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "match_event"
+ ],
+ "type": "object"
+ },
+ "IntegrationInstallParams": {
+ "properties": {
+ "target": {
+ "$ref": "#/schemas/request/$defs/IntegrationTarget"
+ }
+ },
+ "required": [
+ "target"
+ ],
+ "type": "object"
+ },
+ "IntegrationTarget": {
+ "enum": [
+ "pi",
+ "omp",
+ "claude",
+ "codex",
+ "copilot",
+ "devin",
+ "droid",
+ "kimi",
+ "opencode",
+ "kilo",
+ "hermes",
+ "qodercli",
+ "cursor"
+ ],
+ "type": "string"
+ },
+ "IntegrationUninstallParams": {
+ "properties": {
+ "target": {
+ "$ref": "#/schemas/request/$defs/IntegrationTarget"
+ }
+ },
+ "required": [
+ "target"
+ ],
+ "type": "object"
+ },
+ "LayoutApplyParams": {
+ "properties": {
+ "focus": {
+ "default": false,
+ "type": "boolean"
+ },
+ "root": {
+ "$ref": "#/schemas/request/$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": "#/schemas/request/$defs/SplitDirection"
+ },
+ "first": {
+ "$ref": "#/schemas/request/$defs/LayoutNode"
+ },
+ "ratio": {
+ "format": "float",
+ "type": "number"
+ },
+ "second": {
+ "$ref": "#/schemas/request/$defs/LayoutNode"
+ },
+ "type": {
+ "const": "split",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "direction",
+ "ratio",
+ "first",
+ "second"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "LayoutSetSplitRatioParams": {
+ "properties": {
+ "pane_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "path": {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ "ratio": {
+ "format": "float",
+ "type": "number"
+ },
+ "tab_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "path",
+ "ratio"
+ ],
+ "type": "object"
+ },
+ "NotificationShowParams": {
+ "properties": {
+ "body": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "position": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/request/$defs/ToastHerdrPosition"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "sound": {
+ "$ref": "#/schemas/request/$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": "#/schemas/request/$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": "#/schemas/request/$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": "#/schemas/request/$defs/PaneMoveDestination"
+ },
+ "focus": {
+ "default": false,
+ "type": "boolean"
+ },
+ "pane_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "pane_id",
+ "destination"
+ ],
+ "type": "object"
+ },
+ "PaneNeighborParams": {
+ "properties": {
+ "direction": {
+ "$ref": "#/schemas/request/$defs/PaneDirection"
+ },
+ "pane_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "direction"
+ ],
+ "type": "object"
+ },
+ "PaneProcessInfoParams": {
+ "properties": {
+ "pane_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "PaneReadParams": {
+ "properties": {
+ "format": {
+ "$ref": "#/schemas/request/$defs/ReadFormat",
+ "default": "text"
+ },
+ "lines": {
+ "format": "uint32",
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "source": {
+ "$ref": "#/schemas/request/$defs/ReadSource"
+ },
+ "strip_ansi": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "pane_id",
+ "source"
+ ],
+ "type": "object"
+ },
+ "PaneReleaseAgentParams": {
+ "properties": {
+ "agent": {
+ "type": "string"
+ },
+ "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"
+ ]
+ },
+ "message": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "seq": {
+ "format": "uint64",
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "source": {
+ "type": "string"
+ },
+ "state": {
+ "$ref": "#/schemas/request/$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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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": "#/schemas/request/$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": "#/schemas/request/$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": "#/schemas/request/$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": "#/schemas/request/$defs/OutputMatch"
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "source": {
+ "$ref": "#/schemas/request/$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": "#/schemas/request/$defs/PaneZoomMode",
+ "default": "toggle"
+ },
+ "pane_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "PingParams": {
+ "type": "object"
+ },
+ "PluginActionInvokeParams": {
+ "properties": {
+ "action_id": {
+ "type": "string"
+ },
+ "context": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/request/$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": "#/schemas/request/$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": "#/schemas/request/$defs/WorkspaceWorktreeInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "PluginLinkParams": {
+ "properties": {
+ "enabled": {
+ "default": true,
+ "type": "boolean"
+ },
+ "path": {
+ "type": "string"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/request/$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": "#/schemas/request/$defs/SplitDirection"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "entrypoint": {
+ "type": "string"
+ },
+ "env": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "focus": {
+ "default": false,
+ "type": "boolean"
+ },
+ "placement": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/request/$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": "#/schemas/request/$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.moved",
+ "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": "tab.moved",
+ "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": "#/schemas/request/$defs/OutputMatch"
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "source": {
+ "$ref": "#/schemas/request/$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": "#/schemas/request/$defs/AgentStatus"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "type": {
+ "const": "pane.agent_status_changed",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "pane_id"
+ ],
+ "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"
+ },
+ "TabMoveParams": {
+ "properties": {
+ "insert_index": {
+ "format": "uint",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "tab_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "tab_id",
+ "insert_index"
+ ],
+ "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"
+ },
+ "ToastHerdrPosition": {
+ "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"
+ },
+ "WorkspaceMoveParams": {
+ "properties": {
+ "insert_index": {
+ "format": "uint",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "workspace_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "workspace_id",
+ "insert_index"
+ ],
+ "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": {
+ "method": {
+ "const": "ping",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PingParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "server.stop",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EmptyParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "server.live_handoff",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/ServerLiveHandoffParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "server.reload_config",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EmptyParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "server.agent_manifests",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EmptyParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "server.reload_agent_manifests",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EmptyParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "notification.show",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/NotificationShowParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "client.window_title.set",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/ClientWindowTitleSetParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "client.window_title.clear",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EmptyParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "session.snapshot",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EmptyParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "workspace.create",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorkspaceCreateParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "workspace.list",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EmptyParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "workspace.get",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorkspaceTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "workspace.focus",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorkspaceTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "workspace.rename",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorkspaceRenameParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "workspace.move",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorkspaceMoveParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "workspace.close",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorkspaceTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "worktree.list",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorktreeListParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "worktree.create",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorktreeCreateParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "worktree.open",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorktreeOpenParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "worktree.remove",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/WorktreeRemoveParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "tab.create",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/TabCreateParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "tab.list",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/TabListParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "tab.get",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/TabTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "tab.focus",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/TabTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "tab.rename",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/TabRenameParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "tab.move",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/TabMoveParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "tab.close",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/TabTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "agent.list",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EmptyParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "agent.get",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/AgentTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "agent.read",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/AgentReadParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "agent.explain",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/AgentTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "agent.send",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/AgentSendParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "agent.rename",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/AgentRenameParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "agent.focus",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/AgentTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "agent.start",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/AgentStartParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.split",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneSplitParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.swap",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneSwapParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.move",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneMoveParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.zoom",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneZoomParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.layout",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneLayoutParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.process_info",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneProcessInfoParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "layout.export",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/LayoutExportParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "layout.apply",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/LayoutApplyParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "layout.set_split_ratio",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/LayoutSetSplitRatioParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.neighbor",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneNeighborParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.edges",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneEdgesParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.focus_direction",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneFocusDirectionParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.resize",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneResizeParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.list",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneListParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.current",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneCurrentParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.get",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.focus",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.rename",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneRenameParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.send_text",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneSendTextParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.send_keys",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneSendKeysParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.send_input",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneSendInputParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.read",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneReadParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.report_agent",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneReportAgentParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.report_agent_session",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneReportAgentSessionParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.report_metadata",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneReportMetadataParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.clear_agent_authority",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneClearAgentAuthorityParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.release_agent",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneReleaseAgentParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.close",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneTarget"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "events.subscribe",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EventsSubscribeParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "events.wait",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/EventsWaitParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "pane.wait_for_output",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PaneWaitForOutputParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "integration.install",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/IntegrationInstallParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "integration.uninstall",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/IntegrationUninstallParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.link",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginLinkParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.list",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginListParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.unlink",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginUnlinkParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.enable",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginSetEnabledParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.disable",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginSetEnabledParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.action.list",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginActionListParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.action.invoke",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginActionInvokeParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.log.list",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginLogListParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.pane.open",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginPaneOpenParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.pane.focus",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginPaneFocusParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "method": {
+ "const": "plugin.pane.close",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/schemas/request/$defs/PluginPaneCloseParams"
+ }
+ },
+ "required": [
+ "method",
+ "params"
+ ],
+ "type": "object"
+ }
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "Request",
+ "type": "object"
+ },
+ "subscription_event": {
+ "$defs": {
+ "AgentStatus": {
+ "enum": [
+ "idle",
+ "working",
+ "blocked",
+ "done",
+ "unknown"
+ ],
+ "type": "string"
+ },
+ "PaneAgentStatusChangedEvent": {
+ "properties": {
+ "agent": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "agent_status": {
+ "$ref": "#/schemas/subscription_event/$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"
+ ]
+ },
+ "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": "#/schemas/subscription_event/$defs/PaneReadResult"
+ }
+ },
+ "required": [
+ "pane_id",
+ "matched_line",
+ "read"
+ ],
+ "type": "object"
+ },
+ "PaneReadResult": {
+ "properties": {
+ "format": {
+ "$ref": "#/schemas/subscription_event/$defs/ReadFormat"
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "revision": {
+ "format": "uint64",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "source": {
+ "$ref": "#/schemas/subscription_event/$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"
+ },
+ "ReadFormat": {
+ "enum": [
+ "text",
+ "ansi"
+ ],
+ "type": "string"
+ },
+ "ReadSource": {
+ "enum": [
+ "visible",
+ "recent",
+ "recent_unwrapped",
+ "detection"
+ ],
+ "type": "string"
+ },
+ "SubscriptionEventData": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/subscription_event/$defs/PaneOutputMatchedEvent"
+ },
+ {
+ "$ref": "#/schemas/subscription_event/$defs/PaneAgentStatusChangedEvent"
+ }
+ ]
+ },
+ "SubscriptionEventKind": {
+ "enum": [
+ "pane.output_matched",
+ "pane.agent_status_changed"
+ ],
+ "type": "string"
+ }
+ },
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "properties": {
+ "data": {
+ "$ref": "#/schemas/subscription_event/$defs/SubscriptionEventData"
+ },
+ "event": {
+ "$ref": "#/schemas/subscription_event/$defs/SubscriptionEventKind"
+ }
+ },
+ "required": [
+ "event",
+ "data"
+ ],
+ "title": "SubscriptionEventEnvelope",
+ "type": "object"
+ },
+ "success_response": {
+ "$defs": {
+ "AgentInfo": {
+ "properties": {
+ "agent": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "agent_session": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$defs/AgentSessionInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "agent_status": {
+ "$ref": "#/schemas/success_response/$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"
+ ]
+ },
+ "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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/WorkspaceInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "type": {
+ "const": "workspace_updated",
+ "type": "string"
+ },
+ "workspace": {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "type": {
+ "const": "workspace_closed",
+ "type": "string"
+ },
+ "workspace": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$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": {
+ "insert_index": {
+ "format": "uint",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "type": {
+ "const": "workspace_moved",
+ "type": "string"
+ },
+ "workspace_id": {
+ "type": "string"
+ },
+ "workspaces": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "type",
+ "workspace_id",
+ "insert_index",
+ "workspaces"
+ ],
+ "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": "#/schemas/success_response/$defs/WorkspaceInfo"
+ },
+ "worktree": {
+ "$ref": "#/schemas/success_response/$defs/WorktreeInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace",
+ "worktree"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "already_open": {
+ "type": "boolean"
+ },
+ "type": {
+ "const": "worktree_opened",
+ "type": "string"
+ },
+ "workspace": {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ },
+ "worktree": {
+ "$ref": "#/schemas/success_response/$defs/WorktreeInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace",
+ "worktree",
+ "already_open"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "forced": {
+ "type": "boolean"
+ },
+ "type": {
+ "const": "worktree_removed",
+ "type": "string"
+ },
+ "workspace": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "workspace_id": {
+ "type": "string"
+ },
+ "worktree": {
+ "$ref": "#/schemas/success_response/$defs/WorktreeInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace_id",
+ "worktree",
+ "forced"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tab": {
+ "$ref": "#/schemas/success_response/$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": {
+ "insert_index": {
+ "format": "uint",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "tab_id": {
+ "type": "string"
+ },
+ "tabs": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/TabInfo"
+ },
+ "type": "array"
+ },
+ "type": {
+ "const": "tab_moved",
+ "type": "string"
+ },
+ "workspace_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "tab_id",
+ "workspace_id",
+ "insert_index",
+ "tabs"
+ ],
+ "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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/TabInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created_workspace": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "pane": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$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"
+ ]
+ },
+ "type": {
+ "const": "pane_agent_status_changed",
+ "type": "string"
+ },
+ "workspace_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "pane_id",
+ "workspace_id",
+ "agent_status"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "EventEnvelope": {
+ "properties": {
+ "data": {
+ "$ref": "#/schemas/success_response/$defs/EventData"
+ },
+ "event": {
+ "$ref": "#/schemas/success_response/$defs/EventKind"
+ }
+ },
+ "required": [
+ "event",
+ "data"
+ ],
+ "type": "object"
+ },
+ "EventKind": {
+ "enum": [
+ "workspace_created",
+ "workspace_updated",
+ "workspace_closed",
+ "workspace_renamed",
+ "workspace_moved",
+ "workspace_focused",
+ "worktree_created",
+ "worktree_opened",
+ "worktree_removed",
+ "tab_created",
+ "tab_closed",
+ "tab_renamed",
+ "tab_moved",
+ "tab_focused",
+ "pane_created",
+ "pane_closed",
+ "pane_focused",
+ "pane_moved",
+ "pane_output_changed",
+ "pane_exited",
+ "pane_agent_detected",
+ "pane_agent_status_changed"
+ ],
+ "type": "string"
+ },
+ "InstalledPluginInfo": {
+ "properties": {
+ "actions": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginManifestAction"
+ },
+ "type": "array"
+ },
+ "build": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginManifestBuild"
+ },
+ "type": "array"
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "events": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginManifestEventHook"
+ },
+ "type": "array"
+ },
+ "link_handlers": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginManifestLinkHandler"
+ },
+ "type": "array"
+ },
+ "manifest_path": {
+ "type": "string"
+ },
+ "min_herdr_version": {
+ "default": "",
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "panes": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginManifestPane"
+ },
+ "type": "array"
+ },
+ "platforms": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginPlatform"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ },
+ "plugin_id": {
+ "type": "string"
+ },
+ "plugin_root": {
+ "type": "string"
+ },
+ "source": {
+ "$ref": "#/schemas/success_response/$defs/PluginSourceInfo",
+ "default": {
+ "kind": "local"
+ }
+ },
+ "version": {
+ "type": "string"
+ },
+ "warnings": {
+ "description": "Warnings collected at link time or on registry load (e.g. unknown event names,\nmissing manifest file). Non-fatal — the entry is kept and surfaced by plugin.list.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "plugin_id",
+ "name",
+ "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",
+ "droid",
+ "kimi",
+ "opencode",
+ "kilo",
+ "hermes",
+ "qodercli",
+ "cursor"
+ ],
+ "type": "string"
+ },
+ "IntegrationUninstallResult": {
+ "properties": {
+ "messages": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "messages"
+ ],
+ "type": "object"
+ },
+ "LayoutDescription": {
+ "properties": {
+ "focused_pane_id": {
+ "type": "string"
+ },
+ "root": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/SplitDirection"
+ },
+ "first": {
+ "$ref": "#/schemas/success_response/$defs/LayoutNode"
+ },
+ "ratio": {
+ "format": "float",
+ "type": "number"
+ },
+ "second": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/PaneLayoutSnapshot"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/AgentSessionInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "agent_status": {
+ "$ref": "#/schemas/success_response/$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"
+ },
+ "state_labels": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "tab_id": {
+ "type": "string"
+ },
+ "terminal_id": {
+ "type": "string"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/PaneLayoutRect"
+ },
+ "focused_pane_id": {
+ "type": "string"
+ },
+ "panes": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PaneLayoutPane"
+ },
+ "type": "array"
+ },
+ "splits": {
+ "items": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/SplitDirection"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ratio": {
+ "format": "float",
+ "type": "number"
+ },
+ "rect": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/TabInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created_workspace": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "focused_pane_id": {
+ "type": "string"
+ },
+ "pane": {
+ "$ref": "#/schemas/success_response/$defs/PaneInfo"
+ },
+ "previous_pane_id": {
+ "type": "string"
+ },
+ "previous_tab_id": {
+ "type": "string"
+ },
+ "previous_workspace_id": {
+ "type": "string"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$defs/PaneMoveReason"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "source_layout": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$defs/PaneLayoutSnapshot"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "target_layout": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/PaneDirection"
+ },
+ "layout": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/ReadFormat"
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "revision": {
+ "format": "uint64",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "source": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/PaneLayoutSnapshot"
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$defs/PaneResizeReason"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "changed",
+ "pane_id",
+ "focused_pane_id",
+ "layout"
+ ],
+ "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": "#/schemas/success_response/$defs/PaneLayoutSnapshot"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/PaneLayoutSnapshot"
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/PluginActionContext"
+ },
+ "type": "array"
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "platforms": {
+ "items": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/WorkspaceWorktreeInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "PluginManifestAction": {
+ "properties": {
+ "command": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "contexts": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginActionContext"
+ },
+ "type": "array"
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "id": {
+ "type": "string"
+ },
+ "platforms": {
+ "items": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/PluginPlatform"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "command"
+ ],
+ "type": "object"
+ },
+ "PluginManifestEventHook": {
+ "properties": {
+ "command": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "on": {
+ "type": "string"
+ },
+ "platforms": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginPlatform"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "on",
+ "command"
+ ],
+ "type": "object"
+ },
+ "PluginManifestLinkHandler": {
+ "properties": {
+ "action": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "pattern": {
+ "type": "string"
+ },
+ "platforms": {
+ "items": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/PluginPanePlacement",
+ "default": "overlay"
+ },
+ "platforms": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginPlatform"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ },
+ "title": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "command"
+ ],
+ "type": "object"
+ },
+ "PluginPaneInfo": {
+ "properties": {
+ "entrypoint": {
+ "type": "string"
+ },
+ "pane": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/SessionSnapshot"
+ },
+ "type": {
+ "const": "session_snapshot",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "snapshot"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "type": {
+ "const": "workspace_info",
+ "type": "string"
+ },
+ "workspace": {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "root_pane": {
+ "$ref": "#/schemas/success_response/$defs/PaneInfo"
+ },
+ "tab": {
+ "$ref": "#/schemas/success_response/$defs/TabInfo"
+ },
+ "type": {
+ "const": "workspace_created",
+ "type": "string"
+ },
+ "workspace": {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace",
+ "tab",
+ "root_pane"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "type": {
+ "const": "workspace_list",
+ "type": "string"
+ },
+ "workspaces": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "type",
+ "workspaces"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "source": {
+ "$ref": "#/schemas/success_response/$defs/WorktreeSourceInfo"
+ },
+ "type": {
+ "const": "worktree_list",
+ "type": "string"
+ },
+ "worktrees": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/WorktreeInfo"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "type",
+ "source",
+ "worktrees"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "root_pane": {
+ "$ref": "#/schemas/success_response/$defs/PaneInfo"
+ },
+ "tab": {
+ "$ref": "#/schemas/success_response/$defs/TabInfo"
+ },
+ "type": {
+ "const": "worktree_created",
+ "type": "string"
+ },
+ "workspace": {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ },
+ "worktree": {
+ "$ref": "#/schemas/success_response/$defs/WorktreeInfo"
+ }
+ },
+ "required": [
+ "type",
+ "workspace",
+ "tab",
+ "root_pane",
+ "worktree"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "already_open": {
+ "type": "boolean"
+ },
+ "root_pane": {
+ "$ref": "#/schemas/success_response/$defs/PaneInfo"
+ },
+ "tab": {
+ "$ref": "#/schemas/success_response/$defs/TabInfo"
+ },
+ "type": {
+ "const": "worktree_opened",
+ "type": "string"
+ },
+ "workspace": {
+ "$ref": "#/schemas/success_response/$defs/WorkspaceInfo"
+ },
+ "worktree": {
+ "$ref": "#/schemas/success_response/$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": {
+ "tab": {
+ "$ref": "#/schemas/success_response/$defs/TabInfo"
+ },
+ "type": {
+ "const": "tab_info",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "tab"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "root_pane": {
+ "$ref": "#/schemas/success_response/$defs/PaneInfo"
+ },
+ "tab": {
+ "$ref": "#/schemas/success_response/$defs/TabInfo"
+ },
+ "type": {
+ "const": "tab_created",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "tab",
+ "root_pane"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tabs": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/TabInfo"
+ },
+ "type": "array"
+ },
+ "type": {
+ "const": "tab_list",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "tabs"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "agent": {
+ "$ref": "#/schemas/success_response/$defs/AgentInfo"
+ },
+ "type": {
+ "const": "agent_info",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "agent"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "agent": {
+ "$ref": "#/schemas/success_response/$defs/AgentInfo"
+ },
+ "argv": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "type": {
+ "const": "agent_started",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "agent",
+ "argv"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "agents": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/AgentInfo"
+ },
+ "type": "array"
+ },
+ "type": {
+ "const": "agent_list",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "agents"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "pane": {
+ "$ref": "#/schemas/success_response/$defs/PaneInfo"
+ },
+ "type": {
+ "const": "pane_info",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "pane"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "panes": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PaneInfo"
+ },
+ "type": "array"
+ },
+ "type": {
+ "const": "pane_list",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "panes"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "pane": {
+ "$ref": "#/schemas/success_response/$defs/PaneInfo"
+ },
+ "type": {
+ "const": "pane_current",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "pane"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "swap": {
+ "$ref": "#/schemas/success_response/$defs/PaneSwapResult"
+ },
+ "type": {
+ "const": "pane_swap",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "swap"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "move_result": {
+ "$ref": "#/schemas/success_response/$defs/PaneMoveResult"
+ },
+ "type": {
+ "const": "pane_move",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "move_result"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "type": {
+ "const": "pane_zoom",
+ "type": "string"
+ },
+ "zoom": {
+ "$ref": "#/schemas/success_response/$defs/PaneZoomResult"
+ }
+ },
+ "required": [
+ "type",
+ "zoom"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "layout": {
+ "$ref": "#/schemas/success_response/$defs/PaneLayoutSnapshot"
+ },
+ "type": {
+ "const": "pane_layout",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "layout"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "process_info": {
+ "$ref": "#/schemas/success_response/$defs/PaneProcessInfo"
+ },
+ "type": {
+ "const": "pane_process_info",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "process_info"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "layout": {
+ "$ref": "#/schemas/success_response/$defs/LayoutDescription"
+ },
+ "type": {
+ "const": "layout_export",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "layout"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "layout": {
+ "$ref": "#/schemas/success_response/$defs/LayoutDescription"
+ },
+ "type": {
+ "const": "layout_apply",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "layout"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "layout": {
+ "$ref": "#/schemas/success_response/$defs/LayoutDescription"
+ },
+ "type": {
+ "const": "layout_split_ratio_set",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "layout"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "neighbor": {
+ "$ref": "#/schemas/success_response/$defs/PaneNeighborResult"
+ },
+ "type": {
+ "const": "pane_neighbor",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "neighbor"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "edges": {
+ "$ref": "#/schemas/success_response/$defs/PaneEdgesResult"
+ },
+ "type": {
+ "const": "pane_edges",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "edges"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "focus": {
+ "$ref": "#/schemas/success_response/$defs/PaneFocusDirectionResult"
+ },
+ "type": {
+ "const": "pane_focus_direction",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "focus"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "resize": {
+ "$ref": "#/schemas/success_response/$defs/PaneResizeResult"
+ },
+ "type": {
+ "const": "pane_resize",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "resize"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "read": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/NotificationShowReason"
+ },
+ "shown": {
+ "type": "boolean"
+ },
+ "type": {
+ "const": "notification_show",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "shown",
+ "reason"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "changed": {
+ "type": "boolean"
+ },
+ "reason": {
+ "$ref": "#/schemas/success_response/$defs/ClientWindowTitleReason"
+ },
+ "type": {
+ "const": "client_window_title",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "changed",
+ "reason"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "details": {
+ "$ref": "#/schemas/success_response/$defs/IntegrationInstallResult"
+ },
+ "target": {
+ "$ref": "#/schemas/success_response/$defs/IntegrationTarget"
+ },
+ "type": {
+ "const": "integration_install",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "target",
+ "details"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "details": {
+ "$ref": "#/schemas/success_response/$defs/IntegrationUninstallResult"
+ },
+ "target": {
+ "$ref": "#/schemas/success_response/$defs/IntegrationTarget"
+ },
+ "type": {
+ "const": "integration_uninstall",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "target",
+ "details"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "manifests": {
+ "items": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/AgentManifestInfo"
+ },
+ "type": "array"
+ },
+ "type": {
+ "const": "agent_manifest_status",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "manifests"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "plugin": {
+ "$ref": "#/schemas/success_response/$defs/InstalledPluginInfo"
+ },
+ "type": {
+ "const": "plugin_linked",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "plugin"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "plugins": {
+ "items": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/InstalledPluginInfo"
+ },
+ "type": {
+ "const": "plugin_enabled",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "plugin"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "plugin": {
+ "$ref": "#/schemas/success_response/$defs/InstalledPluginInfo"
+ },
+ "type": {
+ "const": "plugin_disabled",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "plugin"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "actions": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginActionInfo"
+ },
+ "type": "array"
+ },
+ "type": {
+ "const": "plugin_action_list",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "actions"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "action": {
+ "$ref": "#/schemas/success_response/$defs/PluginActionInfo"
+ },
+ "context": {
+ "$ref": "#/schemas/success_response/$defs/PluginInvocationContext"
+ },
+ "log": {
+ "$ref": "#/schemas/success_response/$defs/PluginCommandLogInfo"
+ },
+ "type": {
+ "const": "plugin_action_invoked",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "action",
+ "context",
+ "log"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "logs": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PluginCommandLogInfo"
+ },
+ "type": "array"
+ },
+ "type": {
+ "const": "plugin_log_list",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "logs"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "plugin_pane": {
+ "$ref": "#/schemas/success_response/$defs/PluginPaneInfo"
+ },
+ "type": {
+ "const": "plugin_pane_opened",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "plugin_pane"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "plugin_pane": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/PaneLayoutSnapshot"
+ },
+ "type": "array"
+ },
+ "panes": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/PaneInfo"
+ },
+ "type": "array"
+ },
+ "protocol": {
+ "format": "uint32",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "tabs": {
+ "items": {
+ "$ref": "#/schemas/success_response/$defs/TabInfo"
+ },
+ "type": "array"
+ },
+ "version": {
+ "type": "string"
+ },
+ "workspaces": {
+ "items": {
+ "$ref": "#/schemas/success_response/$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": "#/schemas/success_response/$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": "#/schemas/success_response/$defs/AgentStatus"
+ },
+ "focused": {
+ "type": "boolean"
+ },
+ "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": "#/schemas/success_response/$defs/WorkspaceWorktreeInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "workspace_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": "#/schemas/success_response/$defs/ResponseResult"
+ }
+ },
+ "required": [
+ "id",
+ "result"
+ ],
+ "title": "SuccessResponse",
+ "type": "object"
+ }
+ },
+ "title": "Herdr API"
+}
diff --git a/src/agent_resume.rs b/src/agent_resume.rs
index f23ff5e0..a157f06a 100644
--- a/src/agent_resume.rs
+++ b/src/agent_resume.rs
@@ -11,7 +11,7 @@ pub struct AgentSessionRef {
pub value: String,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum AgentSessionRefKind {
Id,
diff --git a/src/api/schema.rs b/src/api/schema.rs
index a404d56c..1a51dfbc 100644
--- a/src/api/schema.rs
+++ b/src/api/schema.rs
@@ -30,14 +30,14 @@ fn is_false(value: &bool) -> bool {
!*value
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct Request {
pub id: String,
#[serde(flatten)]
pub method: Method,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(tag = "method", content = "params")]
// Request enums are short-lived wire values; keeping variants direct preserves
// the simple serde shape and avoids boxing churn across every caller.
diff --git a/src/api/schema/agents.rs b/src/api/schema/agents.rs
index 644211d4..e5f319e0 100644
--- a/src/api/schema/agents.rs
+++ b/src/api/schema/agents.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
use super::common::{AgentStatus, ReadFormat, ReadSource, SplitDirection};
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct AgentReadParams {
pub target: String,
pub source: ReadSource,
@@ -16,20 +16,20 @@ pub struct AgentReadParams {
pub strip_ansi: bool,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct AgentSendParams {
pub target: String,
pub text: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct AgentRenameParams {
pub target: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct AgentStartParams {
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -47,7 +47,7 @@ pub struct AgentStartParams {
pub env: HashMap<String, String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct AgentInfo {
pub terminal_id: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -78,7 +78,7 @@ pub struct AgentInfo {
pub revision: u64,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct AgentSessionInfo {
pub source: String,
pub agent: String,
diff --git a/src/api/schema/common.rs b/src/api/schema/common.rs
index cb423683..3d8376ed 100644
--- a/src/api/schema/common.rs
+++ b/src/api/schema/common.rs
@@ -1,41 +1,41 @@
use serde::{Deserialize, Serialize};
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct EmptyParams {}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct WorkspaceTarget {
pub workspace_id: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneTarget {
pub pane_id: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct TabTarget {
pub tab_id: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct AgentTarget {
pub target: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct ClientWindowTitleSetParams {
pub title: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum SplitDirection {
Right,
Down,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ReadSource {
Visible,
@@ -44,7 +44,9 @@ pub enum ReadSource {
Detection,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(
+ Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default,
+)]
#[serde(rename_all = "snake_case")]
pub enum ReadFormat {
#[default]
@@ -52,7 +54,7 @@ pub enum ReadFormat {
Ansi,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct NotificationShowParams {
pub title: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -63,7 +65,9 @@ pub struct NotificationShowParams {
pub sound: NotificationShowSound,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(
+ Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default,
+)]
#[serde(rename_all = "snake_case")]
pub enum NotificationShowSound {
#[default]
@@ -86,7 +90,7 @@ impl NotificationShowSound {
}
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum NotificationShowReason {
Shown,
@@ -96,7 +100,7 @@ pub enum NotificationShowReason {
Busy,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ClientWindowTitleReason {
Set,
@@ -104,7 +108,7 @@ pub enum ClientWindowTitleReason {
NoForegroundClient,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PaneAgentState {
Idle,
@@ -113,7 +117,7 @@ pub enum PaneAgentState {
Unknown,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum AgentStatus {
Idle,
diff --git a/src/api/schema/events.rs b/src/api/schema/events.rs
index 014288b1..2fbce4d0 100644
--- a/src/api/schema/events.rs
+++ b/src/api/schema/events.rs
@@ -8,12 +8,12 @@ use super::tabs::TabInfo;
use super::workspaces::WorkspaceInfo;
use super::worktrees::WorktreeInfo;
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct EventsSubscribeParams {
pub subscriptions: Vec<Subscription>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(tag = "type")]
pub enum Subscription {
#[serde(rename = "workspace.created")]
@@ -74,14 +74,14 @@ pub enum Subscription {
},
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct EventsWaitParams {
pub match_event: EventMatch,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub timeout_ms: Option<u64>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneWaitForOutputParams {
pub pane_id: String,
pub source: ReadSource,
@@ -94,14 +94,14 @@ pub struct PaneWaitForOutputParams {
pub strip_ansi: bool,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum OutputMatch {
Substring { value: String },
Regex { value: String },
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(tag = "event", rename_all = "snake_case")]
pub enum EventMatch {
WorkspaceCreated {
@@ -179,7 +179,7 @@ pub enum EventMatch {
},
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum EventKind {
WorkspaceCreated,
@@ -332,13 +332,13 @@ mod known_event_name_tests {
}
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct EventEnvelope {
pub event: EventKind,
pub data: EventData,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub enum SubscriptionEventKind {
#[serde(rename = "pane.output_matched")]
PaneOutputMatched,
@@ -346,27 +346,27 @@ pub enum SubscriptionEventKind {
PaneAgentStatusChanged,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct SubscriptionEventEnvelope {
pub event: SubscriptionEventKind,
pub data: SubscriptionEventData,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(untagged)]
pub enum SubscriptionEventData {
PaneOutputMatched(PaneOutputMatchedEvent),
PaneAgentStatusChanged(PaneAgentStatusChangedEvent),
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneOutputMatchedEvent {
pub pane_id: String,
pub matched_line: String,
pub read: PaneReadResult,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneAgentStatusChangedEvent {
pub pane_id: String,
pub workspace_id: String,
@@ -383,7 +383,7 @@ pub struct PaneAgentStatusChangedEvent {
pub state_labels: HashMap<String, String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum EventData {
WorkspaceCreated {
diff --git a/src/api/schema/integrations.rs b/src/api/schema/integrations.rs
index bd4988f1..a6d808fc 100644
--- a/src/api/schema/integrations.rs
+++ b/src/api/schema/integrations.rs
@@ -1,16 +1,16 @@
use serde::{Deserialize, Serialize};
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct IntegrationInstallParams {
pub target: IntegrationTarget,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct IntegrationUninstallParams {
pub target: IntegrationTarget,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum IntegrationTarget {
Pi,
@@ -28,12 +28,12 @@ pub enum IntegrationTarget {
Cursor,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct IntegrationInstallResult {
pub messages: Vec<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct IntegrationUninstallResult {
pub messages: Vec<String>,
}
diff --git a/src/api/schema/panes.rs b/src/api/schema/panes.rs
index 55241131..ef45a7ca 100644
--- a/src/api/schema/panes.rs
+++ b/src/api/schema/panes.rs
@@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
use super::agents::AgentSessionInfo;
use super::common::{AgentStatus, PaneAgentState, ReadFormat, ReadSource, SplitDirection};
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneSplitParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
@@ -22,7 +22,7 @@ pub struct PaneSplitParams {
pub env: HashMap<String, String>,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PaneDirection {
Left,
@@ -31,7 +31,7 @@ pub enum PaneDirection {
Down,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PaneSwapParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pane_id: Option<String>,
@@ -43,7 +43,7 @@ pub struct PaneSwapParams {
pub target_pane_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneMoveParams {
pub pane_id: String,
pub destination: PaneMoveDestination,
@@ -51,7 +51,7 @@ pub struct PaneMoveParams {
pub focus: bool,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum PaneMoveDestination {
Tab {
@@ -76,7 +76,7 @@ pub enum PaneMoveDestination {
},
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PaneZoomParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pane_id: Option<String>,
@@ -84,7 +84,9 @@ pub struct PaneZoomParams {
pub mode: PaneZoomMode,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(
+ Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default,
+)]
#[serde(rename_all = "snake_case")]
pub enum PaneZoomMode {
#[default]
@@ -93,19 +95,19 @@ pub enum PaneZoomMode {
Off,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PaneLayoutParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pane_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PaneProcessInfoParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pane_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct LayoutExportParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tab_id: Option<String>,
@@ -113,7 +115,7 @@ pub struct LayoutExportParams {
pub pane_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct LayoutApplyParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
@@ -126,7 +128,7 @@ pub struct LayoutApplyParams {
pub root: LayoutNode,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct LayoutSetSplitRatioParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tab_id: Option<String>,
@@ -136,7 +138,7 @@ pub struct LayoutSetSplitRatioParams {
pub ratio: f32,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct LayoutDescription {
pub workspace_id: String,
pub tab_id: String,
@@ -145,7 +147,7 @@ pub struct LayoutDescription {
pub root: LayoutNode,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum LayoutNode {
Pane {
@@ -160,7 +162,7 @@ pub enum LayoutNode {
},
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct LayoutPane {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pane_id: Option<String>,
@@ -174,27 +176,27 @@ pub struct LayoutPane {
pub env: HashMap<String, String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneNeighborParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pane_id: Option<String>,
pub direction: PaneDirection,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PaneEdgesParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pane_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneFocusDirectionParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pane_id: Option<String>,
pub direction: PaneDirection,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneResizeParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pane_id: Option<String>,
@@ -203,38 +205,38 @@ pub struct PaneResizeParams {
pub amount: Option<f32>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PaneListParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PaneCurrentParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub caller_pane_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneRenameParams {
pub pane_id: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneSendTextParams {
pub pane_id: String,
pub text: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneSendKeysParams {
pub pane_id: String,
pub keys: Vec<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneSendInputParams {
pub pane_id: String,
#[serde(default, skip_serializing_if = "String::is_empty")]
@@ -243,7 +245,7 @@ pub struct PaneSendInputParams {
pub keys: Vec<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneReadParams {
pub pane_id: String,
pub source: ReadSource,
@@ -255,7 +257,7 @@ pub struct PaneReadParams {
pub strip_ansi: bool,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneReportAgentParams {
pub pane_id: String,
pub source: String,
@@ -273,7 +275,7 @@ pub struct PaneReportAgentParams {
pub agent_session_path: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneReportAgentSessionParams {
pub pane_id: String,
pub source: String,
@@ -288,7 +290,7 @@ pub struct PaneReportAgentSessionParams {
pub session_start_source: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneReportMetadataParams {
pub pane_id: String,
pub source: String,
@@ -318,7 +320,7 @@ pub struct PaneReportMetadataParams {
pub ttl_ms: Option<u64>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneClearAgentAuthorityParams {
pub pane_id: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -327,7 +329,7 @@ pub struct PaneClearAgentAuthorityParams {
pub seq: Option<u64>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneReleaseAgentParams {
pub pane_id: String,
pub source: String,
@@ -336,7 +338,7 @@ pub struct PaneReleaseAgentParams {
pub seq: Option<u64>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneInfo {
pub pane_id: String,
pub terminal_id: String,
@@ -365,7 +367,7 @@ pub struct PaneInfo {
pub revision: u64,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneProcessInfo {
pub pane_id: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -378,7 +380,7 @@ pub struct PaneProcessInfo {
pub foreground_processes: Vec<PaneProcessInfoProcess>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneProcessInfoProcess {
pub pid: u32,
pub name: String,
@@ -392,7 +394,7 @@ pub struct PaneProcessInfoProcess {
pub cwd: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneSwapResult {
pub changed: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -404,7 +406,7 @@ pub struct PaneSwapResult {
pub layout: PaneLayoutSnapshot,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PaneSwapReason {
NoNeighbor,
@@ -413,7 +415,7 @@ pub enum PaneSwapReason {
CrossTab,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneMoveResult {
pub changed: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -436,14 +438,14 @@ pub struct PaneMoveResult {
pub focused_pane_id: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PaneMoveReason {
SameTab,
ZoomedTab,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneZoomResult {
pub changed: bool,
pub zoom_changed: bool,
@@ -456,7 +458,7 @@ pub struct PaneZoomResult {
pub layout: PaneLayoutSnapshot,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PaneZoomReason {
SinglePane,
@@ -464,7 +466,7 @@ pub enum PaneZoomReason {
AlreadyUnzoomed,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneLayoutSnapshot {
pub workspace_id: String,
pub tab_id: String,
@@ -475,7 +477,7 @@ pub struct PaneLayoutSnapshot {
pub splits: Vec<PaneLayoutSplit>,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneLayoutRect {
pub x: u16,
pub y: u16,
@@ -483,14 +485,14 @@ pub struct PaneLayoutRect {
pub height: u16,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneLayoutPane {
pub pane_id: String,
pub focused: bool,
pub rect: PaneLayoutRect,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneLayoutSplit {
pub id: String,
pub direction: SplitDirection,
@@ -498,7 +500,7 @@ pub struct PaneLayoutSplit {
pub rect: PaneLayoutRect,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneNeighborResult {
pub pane_id: String,
pub direction: PaneDirection,
@@ -507,7 +509,7 @@ pub struct PaneNeighborResult {
pub layout: PaneLayoutSnapshot,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneEdgesResult {
pub pane_id: String,
pub left: bool,
@@ -517,7 +519,7 @@ pub struct PaneEdgesResult {
pub layout: PaneLayoutSnapshot,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneFocusDirectionResult {
pub changed: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -528,13 +530,13 @@ pub struct PaneFocusDirectionResult {
pub layout: PaneLayoutSnapshot,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PaneFocusDirectionReason {
NoNeighbor,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneResizeResult {
pub changed: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -544,13 +546,13 @@ pub struct PaneResizeResult {
pub layout: PaneLayoutSnapshot,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PaneResizeReason {
Unchanged,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PaneReadResult {
pub pane_id: String,
pub workspace_id: String,
diff --git a/src/api/schema/plugins.rs b/src/api/schema/plugins.rs
index c809be58..10e7d670 100644
--- a/src/api/schema/plugins.rs
+++ b/src/api/schema/plugins.rs
@@ -7,7 +7,7 @@ use super::common::SplitDirection;
use super::panes::PaneInfo;
use super::workspaces::WorkspaceWorktreeInfo;
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginLinkParams {
pub path: String,
#[serde(default = "super::common::default_true")]
@@ -16,23 +16,23 @@ pub struct PluginLinkParams {
pub source: Option<PluginSourceInfo>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PluginListParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub plugin_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginUnlinkParams {
pub plugin_id: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginSetEnabledParams {
pub plugin_id: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct InstalledPluginInfo {
pub plugin_id: String,
pub name: String,
@@ -64,7 +64,7 @@ pub struct InstalledPluginInfo {
pub warnings: Vec<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginSourceInfo {
#[serde(default)]
pub kind: PluginSourceKind,
@@ -99,7 +99,9 @@ impl Default for PluginSourceInfo {
}
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(
+ Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default,
+)]
#[serde(rename_all = "snake_case")]
pub enum PluginSourceKind {
#[default]
@@ -221,14 +223,14 @@ mod tests {
}
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginManifestBuild {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub platforms: Option<Vec<PluginPlatform>>,
pub command: Vec<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginManifestAction {
pub id: String,
pub title: String,
@@ -241,7 +243,7 @@ pub struct PluginManifestAction {
pub command: Vec<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginManifestEventHook {
pub on: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -249,7 +251,7 @@ pub struct PluginManifestEventHook {
pub command: Vec<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginManifestPane {
pub id: String,
pub title: String,
@@ -262,7 +264,7 @@ pub struct PluginManifestPane {
pub command: Vec<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginManifestLinkHandler {
pub id: String,
pub title: String,
@@ -272,13 +274,13 @@ pub struct PluginManifestLinkHandler {
pub platforms: Option<Vec<PluginPlatform>>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PluginActionListParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub plugin_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PluginLogListParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub plugin_id: Option<String>,
@@ -286,7 +288,7 @@ pub struct PluginLogListParams {
pub limit: Option<usize>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginActionInvokeParams {
pub action_id: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -295,7 +297,7 @@ pub struct PluginActionInvokeParams {
pub context: Option<PluginInvocationContext>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginCommandLogInfo {
pub log_id: String,
pub plugin_id: String,
@@ -318,7 +320,7 @@ pub struct PluginCommandLogInfo {
pub error: Option<String>,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PluginCommandStatus {
Running,
@@ -326,7 +328,7 @@ pub enum PluginCommandStatus {
Failed,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PluginPlatform {
Linux,
@@ -334,7 +336,7 @@ pub enum PluginPlatform {
Windows,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PluginActionContext {
Global,
@@ -344,7 +346,7 @@ pub enum PluginActionContext {
Selection,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginInvocationContext {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
@@ -378,7 +380,7 @@ pub struct PluginInvocationContext {
pub link_handler_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginActionInfo {
pub plugin_id: String,
pub action_id: String,
@@ -398,7 +400,7 @@ impl PluginActionInfo {
}
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginPaneOpenParams {
pub plugin_id: String,
pub entrypoint: String,
@@ -418,7 +420,9 @@ pub struct PluginPaneOpenParams {
pub env: HashMap<String, String>,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(
+ Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default,
+)]
#[serde(rename_all = "snake_case")]
pub enum PluginPanePlacement {
#[default]
@@ -428,17 +432,17 @@ pub enum PluginPanePlacement {
Zoomed,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginPaneFocusParams {
pub pane_id: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginPaneCloseParams {
pub pane_id: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct PluginPaneInfo {
pub plugin_id: String,
pub entrypoint: String,
diff --git a/src/api/schema/response.rs b/src/api/schema/response.rs
index 8ad41ec4..18a2635d 100644
--- a/src/api/schema/response.rs
+++ b/src/api/schema/response.rs
@@ -21,25 +21,25 @@ use super::tabs::TabInfo;
use super::workspaces::WorkspaceInfo;
use super::worktrees::{WorktreeInfo, WorktreeSourceInfo};
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct SuccessResponse {
pub id: String,
pub result: ResponseResult,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct ErrorResponse {
pub id: String,
pub error: ErrorBody,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct ErrorBody {
pub code: String,
pub message: String,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum ResponseResult {
Pong {
@@ -234,7 +234,7 @@ pub enum ResponseResult {
Ok {},
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct AgentManifestInfo {
pub agent: String,
pub source: String,
diff --git a/src/api/schema/server.rs b/src/api/schema/server.rs
index 59ce8686..8bace6e0 100644
--- a/src/api/schema/server.rs
+++ b/src/api/schema/server.rs
@@ -1,9 +1,9 @@
use serde::{Deserialize, Serialize};
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct PingParams {}
-#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct ServerLiveHandoffParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub import_exe: Option<String>,
@@ -13,7 +13,7 @@ pub struct ServerLiveHandoffParams {
pub expected_version: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct ServerCapabilities {
pub live_handoff: bool,
}
diff --git a/src/api/schema/session.rs b/src/api/schema/session.rs
index b51f6969..63fd8e09 100644
--- a/src/api/schema/session.rs
+++ b/src/api/schema/session.rs
@@ -5,7 +5,7 @@ use super::panes::{PaneInfo, PaneLayoutSnapshot};
use super::tabs::TabInfo;
use super::workspaces::WorkspaceInfo;
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct SessionSnapshot {
pub version: String,
pub protocol: u32,
diff --git a/src/api/schema/tabs.rs b/src/api/schema/tabs.rs
index 41af5c6b..236cebee 100644
--- a/src/api/schema/tabs.rs
+++ b/src/api/schema/tabs.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
use super::common::AgentStatus;
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct TabCreateParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
@@ -18,25 +18,25 @@ pub struct TabCreateParams {
pub env: HashMap<String, String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct TabListParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct TabRenameParams {
pub tab_id: String,
pub label: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct TabMoveParams {
pub tab_id: String,
pub insert_index: usize,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct TabInfo {
pub tab_id: String,
pub workspace_id: String,
diff --git a/src/api/schema/tests.rs b/src/api/schema/tests.rs
index 5d61e972..01ec9baa 100644
--- a/src/api/schema/tests.rs
+++ b/src/api/schema/tests.rs
@@ -2,6 +2,49 @@ use std::collections::HashMap;
use super::*;
+fn protocol_schema_entry<T: schemars::JsonSchema>(name: &str) -> serde_json::Value {
+ let mut schema = serde_json::to_value(schemars::schema_for!(T)).unwrap();
+ rewrite_schema_refs(&mut schema, name);
+ schema
+}
+
+fn rewrite_schema_refs(value: &mut serde_json::Value, schema_name: &str) {
+ match value {
+ serde_json::Value::Object(object) => {
+ if let Some(serde_json::Value::String(reference)) = object.get_mut("$ref") {
+ if let Some(path) = reference.strip_prefix("#/") {
+ *reference = format!("#/schemas/{schema_name}/{path}");
+ }
+ }
+ for child in object.values_mut() {
+ rewrite_schema_refs(child, schema_name);
+ }
+ }
+ serde_json::Value::Array(items) => {
+ for item in items {
+ rewrite_schema_refs(item, schema_name);
+ }
+ }
+ _ => {}
+ }
+}
+
+fn protocol_schema_document() -> serde_json::Value {
+ serde_json::json!({
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "Herdr API",
+ "schema_version": 1,
+ "protocol": crate::protocol::PROTOCOL_VERSION,
+ "schemas": {
+ "request": protocol_schema_entry::<Request>("request"),
+ "success_response": protocol_schema_entry::<SuccessResponse>("success_response"),
+ "error_response": protocol_schema_entry::<ErrorResponse>("error_response"),
+ "event": protocol_schema_entry::<EventEnvelope>("event"),
+ "subscription_event": protocol_schema_entry::<SubscriptionEventEnvelope>("subscription_event"),
+ },
+ })
+}
+
#[test]
fn request_uses_dot_method_names() {
let request = Request {
@@ -19,6 +62,61 @@ fn request_uses_dot_method_names() {
}
#[test]
+fn bundled_protocol_schema_refs_resolve_inside_bundle() {
+ fn assert_no_standalone_refs(value: &serde_json::Value) {
+ match value {
+ serde_json::Value::Object(object) => {
+ if let Some(serde_json::Value::String(reference)) = object.get("$ref") {
+ assert!(
+ !reference.starts_with("#/$defs/"),
+ "schema bundle contains standalone ref {reference}"
+ );
+ }
+ for child in object.values() {
+ assert_no_standalone_refs(child);
+ }
+ }
+ serde_json::Value::Array(items) => {
+ for item in items {
+ assert_no_standalone_refs(item);
+ }
+ }
+ _ => {}
+ }
+ }
+
+ assert_no_standalone_refs(&protocol_schema_document());
+}
+
+#[test]
+fn generated_protocol_schema_artifact_is_current() {
+ let actual = format!(
+ "{}\n",
+ serde_json::to_string_pretty(&protocol_schema_document()).unwrap()
+ );
+ let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
+ .join("docs/next/api/herdr-api.schema.json");
+
+ if std::env::var_os("HERDR_UPDATE_API_SCHEMA").is_some() {
+ std::fs::create_dir_all(path.parent().unwrap()).unwrap();
+ std::fs::write(&path, &actual).unwrap();
+ return;
+ }
+
+ let expected = std::fs::read_to_string(&path).unwrap_or_else(|err| {
+ panic!(
+ "failed to read {}; run `HERDR_UPDATE_API_SCHEMA=1 just test-one generated_protocol_schema_artifact_is_current`: {err}",
+ path.display()
+ )
+ });
+ assert_eq!(
+ expected,
+ actual,
+ "generated API schema artifact is stale; run `HERDR_UPDATE_API_SCHEMA=1 just test-one generated_protocol_schema_artifact_is_current`"
+ );
+}
+
+#[test]
fn request_round_trips_for_server_stop() {
let request = Request {
id: "req_stop".into(),
diff --git a/src/api/schema/workspaces.rs b/src/api/schema/workspaces.rs
index be5ef0b4..6934539c 100644
--- a/src/api/schema/workspaces.rs
+++ b/src/api/schema/workspaces.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
use super::common::AgentStatus;
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct WorkspaceCreateParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cwd: Option<String>,
@@ -16,19 +16,19 @@ pub struct WorkspaceCreateParams {
pub env: HashMap<String, String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct WorkspaceRenameParams {
pub workspace_id: String,
pub label: String,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct WorkspaceMoveParams {
pub workspace_id: String,
pub insert_index: usize,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct WorkspaceInfo {
pub workspace_id: String,
pub number: usize,
@@ -42,7 +42,7 @@ pub struct WorkspaceInfo {
pub worktree: Option<WorkspaceWorktreeInfo>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct WorkspaceWorktreeInfo {
pub repo_key: String,
pub repo_name: String,
diff --git a/src/api/schema/worktrees.rs b/src/api/schema/worktrees.rs
index f480edb1..dc35128e 100644
--- a/src/api/schema/worktrees.rs
+++ b/src/api/schema/worktrees.rs
@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct WorktreeListParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
@@ -8,7 +8,7 @@ pub struct WorktreeListParams {
pub cwd: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct WorktreeCreateParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
@@ -26,7 +26,7 @@ pub struct WorktreeCreateParams {
pub focus: bool,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema, Default)]
pub struct WorktreeOpenParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
@@ -42,14 +42,14 @@ pub struct WorktreeOpenParams {
pub focus: bool,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct WorktreeRemoveParams {
pub workspace_id: String,
#[serde(default)]
pub force: bool,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct WorktreeSourceInfo {
pub repo_key: String,
pub repo_name: String,
@@ -59,7 +59,7 @@ pub struct WorktreeSourceInfo {
pub source_workspace_id: Option<String>,
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct WorktreeInfo {
pub path: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
diff --git a/src/config/model.rs b/src/config/model.rs
index 51af278f..92192c26 100644
--- a/src/config/model.rs
+++ b/src/config/model.rs
@@ -64,7 +64,9 @@ pub enum ToastDelivery {
System,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize, Default)]
+#[derive(
+ Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize, schemars::JsonSchema, Default,
+)]
#[serde(rename_all = "kebab-case")]
pub enum ToastHerdrPosition {
TopLeft,
@@ -238,7 +240,7 @@ impl Default for SessionConfig {
}
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ConfigReloadStatus {
Applied,