Circle wallet migration#23
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
#15 — Fix stale Base Sepolia/BaseScan references (demo-blocker) - publish.js: chain label updated to ARC-TESTNET (Circle), no broken link - history.js: removed BaseScan URL, tx hash shown as plain text - README: fixed wallet section heading and receipt description #14 — Auto-retry with backoff on Circle transaction failures - payment.js: retryWithBackoff() helper (2 attempts, 5s linear backoff) - idempotencyKey (randomUUID) on createTransaction prevents double-spend on retry - Non-retryable errors (DENIED, INSUFFICIENT_FUNDS) bypass retry immediately - Emits shop3.payment.tx.retried metric #12 — Pre-flight wallet status banner at agent startup - payment.js: getWalletStatus() fetches USDC balance + spend today (non-fatal) - agent.js: 5-line banner printed before first tool call (wallet, balance, daily cap, spent today, network) #11 — Structured extraction schema in search middleware - server.js: accepts ?schema={"fields":["name","price","url",...]} param - Field whitelist enforced (name, price, url, rating, vendor, description) - Extraction batched into one claude-haiku-4-5 call per query - agent.js: search_web tool exposes optional schema field - search.js: passes schema through to middleware URL #10 — ClickHouse analytics schema + aggregation queries - memory.js: 4 new columns (nimble_results_count, total_latency_ms, tools_invoked Array(String), price_usd); ALTER TABLE IF NOT EXISTS is idempotent - agent.js: captures and writes all 4 new fields at log_to_database step - history.js: --stats mode runs 3 ClickHouse aggregations (top domains, tools distribution, 7-day spend summary); npm run history:stats #9 — Document spend guard direction - README: "Spend Guard" section documents Option A (ClickHouse-backed JS guard) with honest scope statement #8 — Harden 402 payment verification - server.js: verifyCirclePayment() now checks state, recipient address, amount (>= PAYMENT_PRICE), and chain — returns {ok, reason} not boolean - 402 response body distinguishes tx_not_found / not_confirmed / wrong_recipient / amount_too_low / wrong_chain / already_used #7 — Make x402 middleware always-on - search.js: SERVER_MODE branch removed; agent always routes through SEARCH_MIDDLEWARE_URL; fails fast if env var is unset - server.js: nimbleSearch() lives here only (agent never calls Nimble directly) - index.js: SEARCH_MIDDLEWARE_URL added to REQUIRED_ENV; NIMBLE_API_KEY removed - .env.example: NIMBLE_API_KEY annotated as server-only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Describe the changes introduced by this PR.
Related issues
Checklist