feat: form-mode cost confirmation via MCP elicitations - #367
Open
barryroodt wants to merge 20 commits into
Open
Conversation
commit: |
barryroodt
marked this pull request as draft
August 19, 2026 10:00
barryroodt
force-pushed
the
barryroodt/ai-1044-dual-era-serving
branch
3 times, most recently
from
August 20, 2026 12:06
6a006fa to
ec9ebed
Compare
barryroodt
force-pushed
the
barryroodt/mcp-elicitations-form
branch
from
August 24, 2026 11:11
c5660c9 to
0aa1be8
Compare
barryroodt
changed the base branch from
barryroodt/ai-1044-dual-era-serving
to
main
August 24, 2026 11:11
barryroodt
marked this pull request as ready for review
August 24, 2026 11:14
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.
#358 has merged, so this PR now targets
maindirectly and the branch was rebased onto it. Merging this PR only opens a release PR. It does not ship the package.What changed
This adds Human Confirmation for
create_projectandcreate_branchthrough MCP form elicitations, replacing the bypassableconfirm_costpath on capable clients (AI-886).mcp-utilsowns the policy seam, signed Continuation State, replay protection, 120-second expiry, and handler plumbing. State keys must contain at least 32 bytes.--disable-elicitationsoption from AI-1045. The platform PR handlesdisable_elicitations.formDeliveryAvailabledistinguishes BASE legacy clients, form-capable legacy clients, and generic clients without changing the optionalTool.formatResultcontract.The cost payload includes the live rate, a continuous-run projection, and its assumption. The prose remains PLACEHOLDER-COPY behind Design/PM sign-off, so tests pin the facts rather than the wording.
The branch is 20 commits atop
main. The rebase dropped two management-API types-sync commits already upstream via #364/#369, and old review-thread SHAs from before the rebase are superseded.Behavior contracts
Clients without form support plus opted-out connections keep the existing
confirm_costbehavior. The complete BASEtools/listresponse contains 29 tools and hashes to SHA-2567327d077b6bdacccfa9f5853d489be6a81f2b2763ca0cc344e0bb4e8fd47371d. Exact legacy text assertions also preserveexecute_sqlas{result:string}and its untrusted-data boundary.On form-capable connections,
confirm_costis hidden from discovery but remains callable with migration guidance. Decline and cancel are structured terminal variants. Expiry returns recovery guidance. Tampered state, including an edited readableexp, remains an SDK-owned-32602.humanConfirmationEnabled === falsefails protected paid tools closed while ordinary tools continue working. The gate runs before replay consumption, so an in-flight confirmation can resume with the same state inside its TTL. Generic gate telemetry usesreason: gate; serving-path telemetry preserves the capability-specific reason.Legacy-era sessions take capabilities from the initialize handshake. Legacy-wire results project through the contextual output schema.
Verification
Final tree
0aa1be8b849a3e53fb53b2a8af039013e810f49c(rebased ontomainatfc54ea2):format:check: cleanbuild: all three packages typecheck and buildmcp-utils: 69/69mcp-server-supabase: 279/279 non-environmental tests (unit 258/258, stdio integration 21/21; the 258 include Supabase elicitations 26, cost policies 15, and the legacy server suite)@supabase/mcp-server-supabaseversion 0.11.0:54321environmental tests were not re-run this round; build/typecheck covers that package.Five Anthropic-key e2e tests were excluded locally because
ANTHROPIC_API_KEYwas missing. The real-Claude prompt-injection e2e passed 1/1 earlier in this branch's review, before the final local review. This verification does not claim a fresh pass at the current head.A five-lane review covered correctness/contracts, security, tests, spec compliance, and structural simplification. The initial verdict was NOT_READY; all nine synthesized findings and one post-fix telemetry issue were fixed. The final verdict is READY with no critical or important findings.
Notes for reviewers
The runtime owns minting and verification because SDK v1's
createRequestStateCodechard-readsDate.now()and does not expose typed failure causes. The implementation remains byte-compatible, with codec parity and replay boundaries covered independently. Request-state parsing, replay, codecs, and handlers now have separate responsibilities, and SDK input usesInputResponseView.A fresh
pnpm installbreaks under Corepack's floating pnpm 11.16. The repo uses pnpm 10.33.2 through mise; moving the build-script policy for pnpm 11 remains a follow-up.Please leave
release.ymland the release PR out of this change. Thepublish-previewlabel records the pkg.pr.new URL for the platform stack.Part of AI-1091