feat(plaid): add the Plaid bank-data integration - #6749
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryHigh Risk Overview The new Plaid block is API-key auth with ten operations, operation-specific subblocks (including production/sandbox), canvas sentences, catalog templates, and agent skills. Docs and icon mappings register
A Reviewed by Cursor Bugbot for commit 97010a5. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryAdds a complete Plaid bank-data integration with ten tools, block and catalog registration, response normalization, error extraction, documentation, and tests. It also centralizes optional numeric and boolean block coercion shared with Brex.
Confidence Score: 4/5The PR appears safe to merge, with only a non-blocking TypeScript const-assertion issue in the Plaid block configuration. The Plaid operation IDs, registry entries, credential visibility, request mappings, and response transforms are consistently wired; the accepted concern only weakens compile-time typing for two operation lists. Files Needing Attention: apps/sim/blocks/blocks/plaid.ts
|
| Filename | Overview |
|---|---|
| apps/sim/blocks/blocks/plaid.ts | Defines the Plaid block, conditional fields, operation dispatch, templates, and skills; the two operation constants omit required const assertions. |
| apps/sim/tools/plaid/utils.ts | Provides environment selection, credential headers, wire-value normalization, and response mappers for shared Plaid behavior. |
| apps/sim/tools/plaid/sync_transactions.ts | Implements cursor-based transaction synchronization with optional request controls and normalized pagination output. |
| apps/sim/tools/plaid/get_auth.ts | Implements retrieval and normalization of ACH, EFT, BACS, and international account identifiers. |
| apps/sim/tools/error-extractors.ts | Adds extraction of Plaid developer messages and error codes from Plaid error envelopes. |
| apps/sim/tools/registry.ts | Registers all ten Plaid tools consistently with their block operation identifiers. |
| apps/sim/blocks/utils.ts | Centralizes optional finite-number and boolean coercion for Plaid and Brex block execution. |
Sequence Diagram
sequenceDiagram
participant User as Workflow or Agent
participant Block as Plaid Block
participant Tool as Selected Plaid Tool
participant API as Plaid API
User->>Block: Operation and inputs
Block->>Block: Select tool and coerce optionals
Block->>Tool: Credentials and operation parameters
Tool->>API: Environment-specific HTTPS request
API-->>Tool: Plaid response or error envelope
Tool->>Tool: Normalize response or extract error
Tool-->>User: Typed workflow output
Reviews (1): Last reviewed commit: "feat(plaid): add the Plaid bank-data int..." | Re-trigger Greptile
| const ACCESS_TOKEN_OPERATIONS = [ | ||
| 'sync_transactions', | ||
| 'get_accounts', | ||
| 'get_balances', | ||
| 'get_identity', | ||
| 'get_auth', | ||
| 'get_item', | ||
| ] | ||
|
|
||
| const ACCOUNT_FILTER_OPERATIONS = ['get_accounts', 'get_balances', 'get_identity', 'get_auth'] |
There was a problem hiding this comment.
Const operation arrays are widened
These operation groups directly control conditional visibility and required fields, but without const assertions their identifiers widen to string[], weakening compile-time protection against invalid operation values.
| const ACCESS_TOKEN_OPERATIONS = [ | |
| 'sync_transactions', | |
| 'get_accounts', | |
| 'get_balances', | |
| 'get_identity', | |
| 'get_auth', | |
| 'get_item', | |
| ] | |
| const ACCOUNT_FILTER_OPERATIONS = ['get_accounts', 'get_balances', 'get_identity', 'get_auth'] | |
| const ACCESS_TOKEN_OPERATIONS = [ | |
| 'sync_transactions', | |
| 'get_accounts', | |
| 'get_balances', | |
| 'get_identity', | |
| 'get_auth', | |
| 'get_item', | |
| ] as const | |
| const ACCOUNT_FILTER_OPERATIONS = [ | |
| 'get_accounts', | |
| 'get_balances', | |
| 'get_identity', | |
| 'get_auth', | |
| ] as const |
Context Used: TypeScript conventions and type safety (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 410d6f9. Configure here.
410d6f9 to
97010a5
Compare

Summary
tools/plaid/— transactions sync (cursor-based), accounts, real-time balances, identity, ACH/EFT/BACS/IBAN auth numbers, item health, institution search/get, public-token exchange, and a sandbox token creatorplaid-errorsextractor so failures surface as Plaid'serror_message (ERROR_CODE)instead of a generic HTTP errorblocks/utils.ts(brex and plaid now share one implementation)Known follow-up (not in this PR):
get_auth/get_identityoutputs persist to execution logs unredacted for workspaces without a PII redaction policy — same pre-existing gap as Brex cash accounts and Rippling worker data. The right fix is a tool-declared entity hook into the staged PII redaction pipeline (US_BANK_NUMBERandIBAN_CODEare already supported entity types).Type of Change
Testing
Checklist