Add ACP serve provider runtime#14
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a844e87. Configure here.
|
|
||
| const USDC_ADDRESSES: Record<number, Address> = { | ||
| [baseSepolia.id]: "0xB270EDc833056001f11a7828DFdAC9D4ac2b8344", | ||
| [base.id]: "0x833589fCD6E08f4c7C32D4f71b54bdA02913", |
There was a problem hiding this comment.
Truncated USDC address for Base mainnet
High Severity
The USDC address for Base mainnet is truncated to 36 hex digits instead of the required 40. The value "0x833589fCD6E08f4c7C32D4f71b54bdA02913" is missing the eDb6 segment — the correct address is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. This invalid address will cause all x402/MPP payment operations on Base mainnet (chain 8453) to fail or interact with the wrong contract.
Reviewed by Cursor Bugbot for commit a844e87. Configure here.
| process.env.ACP_SIGNER_PRIVATE_KEY || | ||
| "acp-local-mpp-secret" | ||
| ); | ||
| } |
There was a problem hiding this comment.
Private key reused as MPP HMAC secret
Medium Severity
getSecretKey() falls back to ACP_SIGNER_PRIVATE_KEY — the provider's on-chain settlement private key — as the HMAC secretKey for MPP challenge generation. Reusing a blockchain signing key as a symmetric secret for a different cryptographic protocol increases key exposure and violates key separation principles. A hardcoded fallback "acp-local-mpp-secret" also exists, which is predictable in production if no env vars are set.
Reviewed by Cursor Bugbot for commit a844e87. Configure here.


Summary
Verification
Notes
Note
High Risk
Adds a new provider runtime that verifies and settles x402/MPP payments and introduces deploy-signer key handling, which is security- and funds-sensitive despite being largely additive. Also refactors agent signer setup and offering creation flows, which could impact onboarding and publishing behavior if misconfigured.
Overview
Introduces
acp serveto scaffold, run, and deploy offering-backed provider runtimes that execute a developerhandler.tsand optionallybudget.ts, supporting ACP-native jobs plus BE-mediated x402/MPP service jobs over a Socket.IO relay.Adds payment verification/settlement helpers for x402 (EIP-3009) and MPP, a sandboxed handler execution mode (worker thread with empty env), and deploy bundling/providers (Railway end-to-end, Cloudflare placeholder) that package a runnable bundle and optionally drive the Railway CLI.
Updates CLI/docs to reflect buyer/seller terminology and new env vars, adds offering privacy +
offering create --from-file(writing back assigned IDs), and changes agent signer setup to generate/store P256 keys in keychain and enable automatic signer setup gated byACP_PRIVY_APP_ID.Reviewed by Cursor Bugbot for commit a844e87. Bugbot is set up for automated code reviews on this repo. Configure here.