Repository navigation
Add four global approval modes for tool calls - #354
Closed
oliverames wants to merge 26 commits into
Closed
oliverames wants to merge 26 commits into
oliverames wants to merge 26 commits into
Conversation
The Notes service is about to create notes and folders through Notes' scripting interface, which the sandbox permits only for apps listed in the apple-events exception.
A script built by interpolating text into its source can be changed by that text. Calling a handler of a fixed script sends each argument as a typed Apple event descriptor, so no value can alter the script.
Both tools create only. They run handlers of a fixed script in Notes and pass every value as a parameter. Notes lists them, and runs them, only while "Allow iMCP to create notes and folders" is on in Notes settings, which is off by default. Markdown converts to the HTML that Notes keeps.
The README said iMCP never changes notes. Say what the opt-in tools do and which formatting Notes loses when a note is created through scripting.
Replaces the Notes-only setting. Write tools (readOnlyHint not true) are hidden from tools/list and refused at call time while a service's setting is off. notesWritesEnabled migrates to writesEnabled.NotesService.
Brings in messages_send from upstream PR 305 and puts it on this branch's Allow writes setting and OutboundConfirming window: - Messages writes start off, and each send is confirmed with no always-allow. - The confirmation names the client from ToolCallContext, the exact recipient handles, the service, and the full text. - The send script is called as an Apple event subroutine with typed parameters through NSAppleScript.Subroutine, which gains an enum code parameter and a beforeSending check. - PR 305's own confirmation view, window controller, gate, and answer type are removed in favor of OutboundConfirmation.
This was referenced Nov 18, 2026
oliverames
marked this pull request as ready for review
November 18, 2026 18:26
Contributor
Author
|
Replaced by #377, the same change cut from main as one PR so it can merge on its own. |
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.
This adds four global approval modes in General settings and enforces them in one place,
CallTool, so every tool call goes through the same gate. To try it, pick a mode under General settings and call a read and a write tool from a client.Stacked on #342 (Allow writes) and #344 (Messages send). The diff includes their commits; only one commit is new. Merge #342 and #344 first, then review that commit.
The modes
askEverything): prompts in iMCP before every read and write tool call.askWritesOnly): prompts before write tool calls (readOnlyHint != true) and runs read-only calls immediately.agentManaged): full read and write access inside iMCP without iMCP pop-ups, and shows setup instructions for Claude Desktop, Claude Code,claude.ai, Duet and Muse.allowEverything): full read and write access inside iMCP without individual approvals, and explains how to permit all iMCP tools in those five clients.What else changed
ToolConfirmationQueue, so parallel tool calls wait their turn instead of failing with.busy.ToolCallContext.alreadyConfirmedByGlobalGatestopsmessages_sendfrom prompting twice after the global gate has confirmed it.MacOutboundConfirmerpop-ups.Testing
swift format lint --strict --recursive .is clean, and a full Debug build ofiMCPsucceeds.xcodebuild test -scheme imcp-serverTests: 290 tests run, 1 skipped (pre-existing, inHomeProxyTests), 0 failures, including 12 new tests inApprovalModeTests.Not verified