aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-04 15:31:14 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-04 16:51:10 +0300
commit15cab964f3494b77159caaea289e17e1596e0720 (patch)
treed9614056c26b0d148771a464fc2eb0f0cabc60a2 /docs
parentb78a8a5c565e66e7e5ba9a06d9cb7f3a771fc4b0 (diff)
feat: emit layout update events for runtime layout changes
Diffstat (limited to 'docs')
-rw-r--r--docs/next/CHANGELOG.md1
-rw-r--r--docs/next/api/herdr-api.schema.json176
-rw-r--r--docs/next/website/src/content/docs/socket-api.mdx4
3 files changed, 179 insertions, 2 deletions
diff --git a/docs/next/CHANGELOG.md b/docs/next/CHANGELOG.md
index 310e1da1..c1b36fa4 100644
--- a/docs/next/CHANGELOG.md
+++ b/docs/next/CHANGELOG.md
@@ -7,6 +7,7 @@
- Added `herdr completion <shell>` / `herdr completions <shell>` to generate shell completion scripts for bash, elvish, fish, PowerShell, and zsh. (#435)
- Added `session.snapshot` to bootstrap client runtime state in one socket API response before subscribing to events.
- Added `herdr api schema` to inspect the bundled socket API schema, with `--json` for the full JSON Schema document and `--output PATH` for file output.
+- Added `layout.updated` socket events so protocol clients can keep tab layout snapshots current after pane split, resize, swap, move, zoom, and layout mutations.
- Added `herdr terminal session observe` for read-only live ANSI terminal streams that bridge processes can consume as newline-delimited JSON.
- Added `herdr terminal session control` for bridge processes that need live ANSI frames plus input, resize, scroll, release, and takeover authority.
- Added `ui.hide_tab_bar_when_single_tab` to hide the tab row when a workspace has one tab. (#448)
diff --git a/docs/next/api/herdr-api.schema.json b/docs/next/api/herdr-api.schema.json
index 7ee7bfd8..c061e482 100644
--- a/docs/next/api/herdr-api.schema.json
+++ b/docs/next/api/herdr-api.schema.json
@@ -636,6 +636,22 @@
"agent_status"
],
"type": "object"
+ },
+ {
+ "properties": {
+ "layout": {
+ "$ref": "#/schemas/event/$defs/PaneLayoutSnapshot"
+ },
+ "type": {
+ "const": "layout_updated",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "layout"
+ ],
+ "type": "object"
}
]
},
@@ -662,7 +678,8 @@
"pane_output_changed",
"pane_exited",
"pane_agent_detected",
- "pane_agent_status_changed"
+ "pane_agent_status_changed",
+ "layout_updated"
],
"type": "string"
},
@@ -761,6 +778,132 @@
],
"type": "object"
},
+ "PaneLayoutPane": {
+ "properties": {
+ "focused": {
+ "type": "boolean"
+ },
+ "pane_id": {
+ "type": "string"
+ },
+ "rect": {
+ "$ref": "#/schemas/event/$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/event/$defs/PaneLayoutRect"
+ },
+ "focused_pane_id": {
+ "type": "string"
+ },
+ "panes": {
+ "items": {
+ "$ref": "#/schemas/event/$defs/PaneLayoutPane"
+ },
+ "type": "array"
+ },
+ "splits": {
+ "items": {
+ "$ref": "#/schemas/event/$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/event/$defs/SplitDirection"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ratio": {
+ "format": "float",
+ "type": "number"
+ },
+ "rect": {
+ "$ref": "#/schemas/event/$defs/PaneLayoutRect"
+ }
+ },
+ "required": [
+ "id",
+ "direction",
+ "ratio",
+ "rect"
+ ],
+ "type": "object"
+ },
+ "SplitDirection": {
+ "enum": [
+ "right",
+ "down"
+ ],
+ "type": "string"
+ },
"TabInfo": {
"properties": {
"agent_status": {
@@ -3210,6 +3353,18 @@
"pane_id"
],
"type": "object"
+ },
+ {
+ "properties": {
+ "type": {
+ "const": "layout.updated",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
}
]
},
@@ -5762,6 +5917,22 @@
"agent_status"
],
"type": "object"
+ },
+ {
+ "properties": {
+ "layout": {
+ "$ref": "#/schemas/success_response/$defs/PaneLayoutSnapshot"
+ },
+ "type": {
+ "const": "layout_updated",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "layout"
+ ],
+ "type": "object"
}
]
},
@@ -5803,7 +5974,8 @@
"pane_output_changed",
"pane_exited",
"pane_agent_detected",
- "pane_agent_status_changed"
+ "pane_agent_status_changed",
+ "layout_updated"
],
"type": "string"
},
diff --git a/docs/next/website/src/content/docs/socket-api.mdx b/docs/next/website/src/content/docs/socket-api.mdx
index f84bd5e6..dcf32e0e 100644
--- a/docs/next/website/src/content/docs/socket-api.mdx
+++ b/docs/next/website/src/content/docs/socket-api.mdx
@@ -628,6 +628,10 @@ that workspace.
Pane event subscriptions include `pane.created`, `pane.closed`, `pane.focused`,
`pane.moved`, `pane.exited`, `pane.agent_detected`,
`pane.output_matched`, and `pane.agent_status_changed`.
+Layout event subscriptions include `layout.updated`. The event carries the
+updated `PaneLayoutSnapshot` for one tab. Clients that bootstrap with
+`session.snapshot` should replace the cached layout with the same
+`workspace_id` and `tab_id`.
Worktree event subscriptions include `worktree.created`, `worktree.opened`, and `worktree.removed`. Worktree events describe Git checkout lifecycle. `worktree.created` includes the opened `workspace` and created `worktree`. `worktree.opened` includes the target `workspace`, opened `worktree`, and `already_open`. `worktree.removed` includes the `workspace_id`, removed `worktree`, and `forced`.