feat: support Agent Window sizing (session start --width/--height, window resize) - #52
Open
BB-fat wants to merge 1 commit into
Open
feat: support Agent Window sizing (session start --width/--height, window resize)#52BB-fat wants to merge 1 commit into
BB-fat wants to merge 1 commit into
Conversation
- `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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
bsk session start --width <px> --height <px>— open the Agent Window with an explicit outer size (chrome.windows.create). Omitting both keeps the previous browser-default behavior.bsk window resize --session <id> --width <px> --height <px>— resize the session's Agent Window at runtime (chrome.windows.update).Dimensions are validated on all three layers (CLI / daemon / extension) as integers in
100..=7680CSS px;width/heightmust be given together.How
tool.window_resizemethod (classifiedBrowserMutationinMethod::effect()) withWindowResizeParams/WindowResizeResult; optionalwidth/heightontool.session_startparams; JSON schemas regenerated viadump-schema.CliSessionStartParamsforwards the optional size; mismatched pairs rejected withinvalid_params;tool.window_resizerouted through the per-session dispatch queue like other tab/window tools.AgentWindowApi.create(url, size?),SessionManager.start(sessionId, size?), newtools/window.tshandler with injectableWindowResizeApifor tests; chrome API failures surface asprotocol_error, bad params asinvalid_params.window_sizeclap value parser shared by both commands;skill/SKILL.mdcommand reference updated.Tests
cli_parse.rscases (valid size, out-of-range/missing rejection, resize requires both dimensions); protocol round-trip tests;Methodclassification assertions.cargo clippy --workspace --all-targetsclean,cargo test --workspacegreen (one pre-existing env-dependent failure inskill_install::sync::tests::sync_continues_on_partial_erroralso fails on unmodifiedmain).tools/__tests__/window.test.ts(15 tests: resize happy path, unknown/missing session, missing/out-of-range/non-integer dimensions, chrome failure mapping; session_start size passthrough + validation) and aSessionManager.startsize-forwarding test.vitest rungreen for touched files;biome checkclean;ext:buildsucceeds.Use case: deterministic viewport sizes for responsive-layout testing and reproducible screenshots.