Repository navigation
fix(policy): an agent limited to chosen apps with none chosen can use no app - #130
Merged
Merged
Conversation
… no app An agent whose scope is "Only the apps I choose" with an empty list could use every app: the engine applied the scope only to a non-empty list, and the gateway handed the empty list over as it was. Settings › Agents said "Can use no app yet" of the same agent, and phone_apps and phone_logs already read the empty list as no app. policy.Input gets Scoped, which the gateway sets for an apps scope, so the engine's two scope checks hold for an empty list too. Settings › Agents no longer saves "Only the apps I choose" without an app, as the first-connection card does not approve it. Fixes DIYgod#129. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Merged and released in 2026.1115.1, thanks! Before merging I moved appIn's doc comment back above appIn; the rest went in as you wrote it. |
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.
Fixes #129.
What changes
An agent set to "Only the apps I choose" with no app listed could use every app, while Settings › Agents said "Can use no app yet".
policy.InputgetsScoped, which the gateway sets for an apps scope, so the engine's two scope checks (actions and app changes) hold for an empty list too. The home key and the home screen stay in reach.phone_appsandphone_logsalready read the empty list this way.needsApproveNoAppsinen.jsonchanges.Tests
New:
TestAgentScopeWithNoAppsininternal/policyand ininternal/gateway;TestGatewayAgentScopeinuinow also covers Save. All three fail without the fix.go build ./...,go vet ./...andgo test ./...pass on macOS 27.0 (arm64, Go 1.27.4), except three keychain tests ininternal/secretthat fail the same way onmainwhen run over ssh ("the person cancelled").iPhone 14 (iOS 27.0.1, USB), this branch run as
pinky daemon:scope_deniedscope_deniedSuggested release notes