Repository navigation
ADFA-7300: AI-Agent-MCP switch to let the Agent change app databases - #178
Open
davidschachterADFA wants to merge 1 commit into
Open
davidschachterADFA wants to merge 1 commit into
davidschachterADFA wants to merge 1 commit into
Conversation
Phase 2, P2-5 (ADFA-7131 comment 41476, decision D14). On #166 (sqlite-debugger/ADFA-7139 at 38b5268). Needs CodeOnTheGo P2-3 and P2-4 (execute, acknowledge_room) on the device. - The automatic SQLite debugger entry has no settings, so nothing could switch its execute on. David chose one switch (2026-11-25): "Let the Agent change app databases" at the top of the MCP servers screen, off by default, for every app (McpServerStore.allowDatabaseWrites). It tells the change listeners, so the Agent's tool list follows. - ReadOnlyTrust.WRITE_TOOLS ("execute") is offered only while it is on, and never declared read-only, whatever hint the server sends (isReadOnly). So AI-Core asks before every call and never offers Always Allow for it. - Tooltip entry and long-press wiring for the switch; README, ai-agent-mcp.html, the in-IDE help and the plugin tooltip updated. - Version 2.1.0 / versionCode 4 (MINOR, on #166's 2.0.0 / 3). With the switch on, each app offers five tools; in compact mode (4) AI-Core drops the first app's get_events (README). Tests: WriteToolTest (off by default even claiming the hint; on: asks and not read-only; off again; listeners told; a hand-added server's execute stays ordinary) and three ReadOnlyHintParsingTest cases. Not run here: no Android SDK or AndroidX (dl.google.com is blocked), so neither Gradle nor these tests ran. ReadOnlyTrust and McpTool were compiled alone with a scratch check of the same rules (8 checks pass; isReadOnly without the WRITE_TOOLS exclusion fails "execute never read-only"). The addons check passes. Not run: testDebugUnitTest, assemblePlugin, the device check, font scale 1.0 and 2.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAZ8yszEP4MqbR9PLba
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.
ADFA-7300
Phase 2, P2-5 of the SQLite debugger (ADFA-7131 comment 41476, decision D14): AI-Agent-MCP lets the Agent use the debugger's
executetool, behind one switch, with the user's approval on every call. Stacked on #166 (sqlite-debugger/ADFA-7139); merge it after #166. On the device it needs CodeOnTheGo P2-3 (#2312,execute) and P2-4 (#2313,acknowledge_room).What it does (
plugins/AI-Agent-MCP)executeon. David chose one switch (2026-11-25, ADFA-7300 comment 41560): "Let the Agent change app databases" at the top of the MCP servers screen, off by default, for every app (McpServerStore.allowDatabaseWrites). Changing it tells the change listeners, so the Agent's tool list follows.ReadOnlyTrust.WRITE_TOOLS(execute) is offered only while the switch is on, and is never declared read-only, whatever hint the server sends (isReadOnly). So AI-Core asks before every call and never offers Always Allow for it.ai-agent-mcp.html, the in-IDE help and the plugin tooltip are updated.get_events(README).Tests (local, at 7560587, unchanged from the cloud session's commit)
testDebugUnitTest: 358 tests in 69 classes, 0 failures. New:WriteToolTest(5: off by default even claiming the hint; on: offered, asks every time, not read-only; off again; listeners told; a hand-added server'sexecutestays an ordinary tool) and threeReadOnlyHintParsingTestcases (executeoff unless writes are allowed; never read-only; allowing writes switches on no other tool).WRITE_TOOLSexclusion inReadOnlyTrust.isReadOnly, two tests fail: "execute is never read-only, even claiming the hint" (assertFalse(ReadOnlyTrust.isReadOnly(...))) and "with the switch on execute is offered, asks every time and is not read-only" (assertTrue(execute.requiresApproval())).assemblePlugin:ai-agent-mcp.cgp, 10.3 MB, version 2.1.0. The addons check passes.Not done yet: the MCP servers screen at font scale 1.0 and 2.0, light and dark, and the device checks on the Note 20 (the switch hides and shows
execute; every call asks and Always Allow is never offered; the Room warning reaches the user): they need a Code on the Go build with P2-3 and P2-4, being prepared. Results will be added here and on ADFA-7300.No other screens changed.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn