feat: compute commands#22
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 ae12288. Configure here.
| return this.client.post<ComputeTopUpResponse>( | ||
| `/agents/${agentId}/compute/top-up`, | ||
| { amount, txnHash } | ||
| ); |
There was a problem hiding this comment.
agentAddress parameter silently dropped from API request body
High Severity
The computeTopUp method accepts an agentAddress parameter but never includes it in the POST body ({ amount, txnHash }). The caller in compute.ts explicitly fetches the wallet address via getWalletAddress() and passes it in, but the value is silently discarded. Other similar methods in the same file (e.g., getCoinbaseUrl, initCrossmintOrder) consistently include walletAddress in their request bodies, confirming this is an accidental omission.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ae12288. Configure here.
| "--chain-id <id>", | ||
| "Chain to send USDC on (defaults to the account's preferred billing chain)", | ||
| "8453" | ||
| ) |
There was a problem hiding this comment.
Option description claims dynamic default but uses hardcoded value
Low Severity
The --chain-id option description claims it "defaults to the account's preferred billing chain," but the actual default is the hardcoded string "8453". The ComputeAccount type defines a preferredBillingChainId field that is never read or used for this default. Users may omit --chain-id believing the CLI will auto-detect their preferred chain, potentially sending USDC on an unintended chain.
Reviewed by Cursor Bugbot for commit ae12288. Configure here.


Note
Medium Risk
Adds a new on-chain USDC transfer flow for
compute top-up, which increases risk due to chain/asset handling and fee calculation, but changes are localized to a new command and API wrapper methods.Overview
Adds a new
acp computecommand group withstatus(fetches compute balance/limit/usage) andtop-up(validates amount/chain, computes a fee, sends an on-chain USDCtransfer, then notifies the backend with the tx hash).Extends the Agent API client with compute types and endpoints (
/agents/:id/compute/account,/common/compute-fee,/agents/:id/compute/top-up), wires the command into the CLI entrypoint, and updatesREADME.md/SKILL.mddocs to include the new compute workflow.Reviewed by Cursor Bugbot for commit ae12288. Bugbot is set up for automated code reviews on this repo. Configure here.