fix(pi): skip terminal permission-gate after island allow#287
Open
cat0825 wants to merge 1 commit into
Open
Conversation
Island Allow for dangerous bash currently returns undefined, so a co-installed permission-gate.ts still prompts in the TUI. Record toolCallId on globalThis when CodeIsland explicitly allows, bump pi extension to v3, and keep OMP version detection independent so a pi-only bump does not false-flag healthy OMP installs. Fixes wxtsky#286
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.
Summary
Fixes #286.
On pi, approving a dangerous bash command on the Dynamic Island still left a second Yes/No confirmation from a co-installed
permission-gate.ts.pi runs every extension
tool_callhandler; only{ block: true }short-circuits. Island allow previously returnedundefined, sopermission-gatealways re-prompted.Changes
1.
codeisland-pi.ts(v2→v3)allow, recordevent.toolCallIdonglobalThis.__codeislandAllowedToolCalls.permission-gate.ts.2. Installer version bump
piExtensionVersion:v2→v3so repair reinstalls the fixed resource.3. OMP version independence (regression guard)
isOmpExtensionInstalledpreviously reusedpiExtensionVersion.ompExtensionVersion = "v2"and check it directly.4. Tests
// version: v3and__codeislandAllowedToolCalls.v2.Coordination with user-managed
permission-gate.tsCodeIsland does not own
permission-gate.ts(user extension). The intended companion check is:Without that skip, the island still prompts once, but the terminal gate will still ask. With both sides, island Allow is sufficient for that tool call.
Degradation matrix
{ block: true }(unchanged)permission-gate.tsRelated
Verification
permission-gate.tsskip.v3marker content.swift testnot run in this environment (no local git checkout / Xcode build path for this fork via API-only push). Happy to iterate on CI.