feat(mcp): add branch cost confirmation elicitation - #394
Open
barryroodt wants to merge 4 commits into
Open
Conversation
commit: |
barryroodt
force-pushed
the
feat/branch-cost-elicitation
branch
from
August 31, 2026 08:15
24535f1 to
c06b135
Compare
Coverage Report for CI Build 33491960331Warning No base build found for commit Coverage: 96.034%Details
Uncovered Changes
Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
barryroodt
force-pushed
the
feat/branch-cost-elicitation
branch
from
September 1, 2026 08:42
c06b135 to
bb4f0a7
Compare
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.
Stacked on #391. Review that first. This is part of AI-1091.
What kind of change does this PR introduce?
Feature: add form-mode cost confirmation to
create_branch.What is the current behavior?
#391 provides the shared confirmation codec/verifier,
ServerContext, result passthrough, and project flow. Branch creation still uses the existing hash validation.What is the new behavior?
Modern form clients can call
create_branchwithoutconfirm_cost_id. They receive an action-only, property-less prompt for $0.01344/hr (about $9.68 over 30 days).Acceptance creates the branch from signed arguments. Missing responses and changed costs re-prompt. A wrong-tool state or changed arguments fail. Decline and cancel create no branch.
Capability-free and URL-only clients keep hash validation. A supplied legacy ID cannot bypass the capable-client flow. Project-scoped injection works, and existing output fields such as
with_dataremain.How to Review
Server and shared state
packages/mcp-server-supabase/src/server.tspackages/mcp-server-supabase/src/tools/cost-confirmation.tsBranch handler and pricing
packages/mcp-server-supabase/src/tools/branching-tools.tspackages/mcp-server-supabase/src/pricing.tsBehavioral coverage
packages/mcp-server-supabase/src/server.test.tscreate_branchenabled only through the intended server path?BranchCost?Verification
pnpm --filter @supabase/mcp-server-supabase test src/server.test.ts -t "create_(project|branch) cost confirmation via elicitation"(17 passed)pnpm --filter @supabase/mcp-server-supabase build(typecheck + build passed)pnpm test:packed-platform-consumer(3 assertions passed)pnpm exec biome ci .(passed)Additional context
Commit
24535f1 chore: refresh management API typesadds two generated lines topackages/mcp-server-supabase/src/management-api/types.tsbecause the CI generation gate detected upstream schema drift. Feature behavior and verification remain unchanged.This does not change
create_project,mcp-utils, platform adapters, stdio, pricing values, manifests, or docs.Known limits: confirmations are not single-use, legacy IDs remain precomputable, and the branch rate remains the existing package constant.
AI-assisted; human review required.