feat: support Agent Window sizing (session start --width/--height, window resize) (#52)

- `bsk session start --width <px> --height <px>` opens the Agent Window
  with the given outer size (chrome.windows.create)
- new `bsk window resize --session <id> --width <px> --height <px>`
  resizes the Agent Window at runtime (chrome.windows.update)
- both validated on CLI, daemon and extension sides (100..=7680 CSS px)
- protocol: new tool.window_resize method (BrowserMutation) and
  optional width/height on tool.session_start params; schemas regenerated
This commit is contained in:
BB-fat authored and GitHub committed 2026-08-05 11:19:10 +08:00
1 parent d7f0f1e78c
commit 49378d70de
25 files changed
+725 -10

No files matched your search

+4
View File
@@ -71,6 +71,7 @@ import {
type TabSelectParams,
} from "./tabs";
import { handleWaitForNavigation } from "./waits";
import { handleWindowResize, type WindowResizeParams } from "./window";
type DispatcherCdpRunner = CdpRunner &
NetworkCdpRunner & {
@@ -286,6 +287,8 @@ export class ToolDispatcher {
});
case "tool.tab_return":
return handleTabReturn(this.sessions, req.params as TabReturnParams);
case "tool.window_resize":
return handleWindowResize(this.sessions, req.params as WindowResizeParams);
case "tool.screenshot":
return handleScreenshot(
this.sessions,
@@ -478,6 +481,7 @@ function sessionIdForBrowserControlMethod(req: RequestFrame): string | null {
case "tool.tab_select":
case "tool.tab_borrow":
case "tool.tab_return":
case "tool.window_resize":
case "tool.navigate":
case "tool.navigate_back":
case "tool.navigate_forward":