Repository navigation
feat: support opt-in incognito Agent Windows - #467
Merged
Merged
Conversation
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.
Sessions currently always use the profile's ordinary website state. Add
bsk session start --incognitoand the equivalent per-sessionincognito: trueextension parameter so temporary tasks can use Chrome's incognito browsing session. The default remains a normal Agent Window.The existing window and tab lifecycle handles both modes. Creation checks Allow in incognito before opening a window and verifies the browser returned the requested mode. CLI and daemon compatibility checks require protocol 1.4 for incognito starts, preventing older peers from silently ignoring the option. Ordinary sessions keep their existing compatibility floor.
Incognito sessions cannot borrow tabs, and normal sessions cannot borrow incognito tabs. Stop preserves user-created tabs and protected popups as before. All incognito windows within a profile share site state, which lasts until the last incognito window closes; the docs explain these boundaries.
If a borrowed tab's original window has closed, both explicit tab return and session stop exclude incognito windows from fallback selection and explicitly create a normal window when needed. A focused incognito user window, including one released by a completed task, cannot block return of an ordinary tab.
Validation:
cargo test --workspace --locked -- --test-threads=1; final parameter changes also verified withcargo test --workspace --locked incognito.cargo clippy --workspace --all-targets --locked -- -D warningsand Rust formatting checks.pnpm ext:test: 2,673 passed on the initial feature commit. After the fallback correction, all 108 tab-return/session-stop suite tests and the extension type check pass, including original-window reuse, normal/incognito fallback selection, cancellation, and cleanup failures.pnpm lint, including 538 plugin tests.apps/extensionwithBSK_INCOGNITO_CHROME=/path/to/chrome pnpm exec vitest run src/session-manager/__tests__/incognito.browser.test.ts.git diff --check.Validation limitation: an additional local
Page.captureScreenshotprobe stalled for both ordinary and incognito windows. Screenshots are therefore not covered by the new browser regression; the screenshot implementation is unchanged.Refs #466.