Repository navigation
Add Allow writes per service and a shared send confirmation - #377
Conversation
|
Following up from #364, on why I'd like to leave out |
1014bee to
541bba9
Compare
|
@mattt Trimmed this down to the Allow writes switch and the shared confirmation window, and moved the |
|
Thanks for trimming this down, @oliverames. Two things before I merge:
|
One switch per service hides its write tools from clients and refuses direct calls to them. Deletes count as writes; read-only tools stay available. Services that already write default to on, so existing setups don't change.
A reusable window shows the client, the recipient, and the full text, waits 50 seconds, shows one request at a time, and has no "always allow". It is for tools that send something to another person.
f023a47 to
70fa96e
Compare
Mattt's mattt#377 review: a cancelled call could still send because approve ran perform immediately after the person approved. Add Task.checkCancellation() before perform, with a test where the caller is cancelled while the confirmation is still being decided.
|
Thanks @mattt. This is the two-commit cut you asked for now: the Allow writes switch with the test-target entries and README section in the first commit, and the shared confirmation window in the second. The approval modes are gone.
|
Cancelling the caller closes the window as declined, which surfaced as "The user declined". Check cancellation before acting on any answer.
|
@mattt One more small fix while this waits. When a caller was cancelled while the window was up, the window closed as declined, so the error said "The user declined" even though nobody did. |
This adds one "Allow writes" switch per service and a shared window that asks before an outbound send. It is cut directly from main as one change so it can merge on its own.
Why
Today a connected client can use every tool of an enabled service, writes included, and the only control is a switch per tool. People want to let a client read Calendar or Mail without letting it change them.
What changed
Allow writes (per service)
writesEnabledByDefault.Shared confirmation window
Review fixes
1014bee). The test target entries and the README section are in the first commit.approvecallstry Task.checkCancellation()before it acts on the answer, so a task cancelled while the confirmation is decided can't still send, and the cancellation is reported as a cancellation rather than as the person declining. Tests cover both.Testing
swift format lint --strict -r .is clean.iMCPscheme succeeds.imcp-serverTests: 215 tests run, 1 skipped (pre-existing, inHomeProxyTests), 0 failures. New tests are inServiceWritesTestsandOutboundConfirmationTests.Not verified
Replaces #342 and #354.