From 15cab964f3494b77159caaea289e17e1596e0720 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sat, 4 Jul 2026 15:31:14 +0300 Subject: feat: emit layout update events for runtime layout changes --- docs/next/api/herdr-api.schema.json | 176 +++++++++++++++++++++++++++++++++++- 1 file changed, 174 insertions(+), 2 deletions(-) (limited to 'docs/next/api/herdr-api.schema.json') 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" }, -- cgit v1.2.3