Repository navigation
feat: hub-wide peer-tools toggle in web Settings (stacked on #2052) #2056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
miuiadmin
wants to merge
14
commits into
tiann:main
Choose a base branch
from
miuiadmin:feat/peer-tools-web-toggle
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2613bd6
feat(cli): add HAPI_DISABLE_PEER_TOOLS to hide peer-session tools fro…
miuiadmin cf87c83
test(cli): cover peer-tool prompt steer and default bridge tool list
miuiadmin f40f008
test(cli): keep peer-tools env set through prompt assertions
miuiadmin c0d5ebf
feat(hub): persist disablePeerTools hub setting and serve it to CLI s…
miuiadmin 97ff853
feat(cli): apply hub disablePeerTools preference to the peer-tools gate
miuiadmin aafbe07
feat(cli): resolve peer-tools steer at call time so hub toggle applies
miuiadmin 2b79be5
feat(web): add hub-wide peer-tools opt-out toggle to Settings -> General
miuiadmin 18ea5e6
docs: hub-wide peer-tools web toggle with env as per-runner override
miuiadmin 966eca8
fix(cli): resolve peer-tools per session, carry it across child bound…
miuiadmin 9dadd36
fix(cli): satisfy excess-property check in session snapshot test
miuiadmin 912c873
fix(cli): env-resolve peer-tools snapshots and pin child-process env
miuiadmin a07e0e0
fix(cli): pin peer-tools env for Antigravity and legacy Cursor children
miuiadmin 8680f73
fix(cli): pin peer-tools env for local Copilot children
miuiadmin e62ca72
fix(cli): pin peer-tools env for local Kimi launches
miuiadmin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Minor] Capture the preference on session fetches too
getSession updates only the module global and omits peerToolsDisabled from its returned row. Consequently, bootstrapExistingSession creates an ApiSessionClient without a snapshot. Cold-resume shared Codex root A with tools enabled, enable the hub toggle, and create root B before A initializes its HTTP MCP connection: B changes the global, and A's first forwarded tool call creates an MCP server without peer tools. A's prompt and advertised bridge still expose those tools, violating new-session-only behavior.
Suggested fix
Return SessionBootstrapInfo from getSession and attach the preference as on the create path. Add coverage for a resumed shared root whose MCP connection initializes after another root bootstraps with the opposite preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 912c873 —
getSessionnow returnsSessionBootstrapInfoand spreadsdisablePeerToolswhen the hub sends it, sobootstrapExistingSession(cold resume) captures its own snapshot throughapi.sessionSyncClient(sessionInfo)instead of racing the process-wide module value. Covered by the capture-resolution tests inapiSession.test.ts.