Skip to content

Add project-scoped vault payment tools - #181

Open
rgarcia wants to merge 2 commits into
mainfrom
hypeship/vault-payment-tools
Open

Add project-scoped vault payment tools#181
rgarcia wants to merge 2 commits into
mainfrom
hypeship/vault-payment-tools

Conversation

@rgarcia

@rgarcia rgarcia commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add manage_vaults using the existing action-based tool registration, project selection, Zod schemas, SDK calls, and JSON/error helpers. Cover vault selection/creation/deletion, Link and AgentCard wallet/card lifecycle, advertised authorization operations, funding-method expansion, and item events.
  • Add immutable vaults attachments to manage_browsers creation, with exactly one ID/name per reference and the API's 20-vault bound.
  • Document provider prerequisites, explicit Link authorization, AgentCard deployment-level sandbox/live mode, returned permitted domains, hosted approval/collection actions, non-secret checkout aliases, and outcome inspection. No rename, callback, raw-secret, implicit-authorization, or payment-retry surface.
  • Disable automatic retries on vault requests and vault-attached browser creation. Allowlist output fields and withhold arbitrary event payloads, metadata, unstructured authorization reasons, and raw provider errors while retaining useful state and error classification.

SDK preview

Use the compiled SDK from kernel/kernel-node-sdk-staging, preview branch stlc/preview/pr-3698, pinned at 768cea122220150aacc33074ea00a1c0afaf879e, not the released SDK. The generated package still reports version 0.98.0; the archive's commit and digest identify this preview.

The source-only preview requires private repository access and does not install directly with the project's Bun version. Vendor its unmodified build output so public CI and contributors can install without those credentials. vendor/README.md records provenance, SHA-256, and rebuild commands. Two builds produced byte-identical archives. Only the intended SDK entries in bun.lock change; other generated project files are untouched.

Validation

Run with Bun 1.3.3:

  • bun install --frozen-lockfile — passes, including a fresh temporary checkout with an empty dependency cache.
  • bunx tsc --noEmit --incremental false — passes, including the fresh checkout.
  • bun test — 330 passing tests; also passes in the fresh checkout.
  • bun test src/lib/mcp/tools/vaults.test.ts src/lib/mcp/tools/browser-vaults.test.ts src/lib/mcp/register.test.ts src/lib/mcp/responses.test.ts — 54 passing focused tests, including real preview-SDK requests with mocked HTTP responses.
  • bun run check:managed-auth-app and Prettier checks on every changed TS/JSON/Markdown file — pass. git diff main...HEAD --check passes.

Existing checks outside this change remain broken: bun run format:check reports only the pre-existing AGENTS.md formatting issue; bun run lint invokes next lint, which Next.js 16 removed. Neither unrelated issue is changed here.

Limitations

Requires the corresponding vault-enabled API. The preview has no writable permitted-domains field and no per-item AgentCard test flag; descriptions explicitly preserve those limitations. Event payloads and unstructured authorization reasons are deliberately omitted from MCP output. Replace the vendored preview once a released SDK supplies the same API.

No live provider calls, payments, manual deployments, or changes to either SDK repository or the API repository were performed. The repository's existing Vercel integration automatically generated a branch preview.

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
mcp Ready Ready Preview Sep 4, 2026 4:28am UTC

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a01031b. Configure here.

Comment thread src/lib/mcp/tools/vaults.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant