Skip to content

Circle wallet migration#16

Merged
AaronUppal-AI merged 3 commits into
mainfrom
circle-wallet-migration
May 23, 2026
Merged

Circle wallet migration#16
AaronUppal-AI merged 3 commits into
mainfrom
circle-wallet-migration

Conversation

@AaronUppal-AI

@AaronUppal-AI AaronUppal-AI commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Describe the changes introduced by this PR.

Related issues

  • Fixes: #

Checklist

  • I updated the documentation if necessary
  • I added tests that prove my fix is effective or that my feature works
  • All new and existing tests pass

AaronUppal-AI and others added 3 commits May 23, 2026 14:24
- telemetry.js: new withLLMSpan() wraps Claude API calls with llm.provider,
  llm.model, and token usage tags so lapdog captures cost and cache metrics
- agent.js: agentic loop now uses withLLMSpan for every Claude call
- package.json: add lapdog and lapdog:server npm scripts
- README: document lapdog install + usage in Quick Start, update feature blurb

Run `npm run lapdog` to get a live dashboard at lapdog.datadoghq.com showing
token counts, cost, cache hit rates, and tool traces with no Datadog account.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
withSpan() now passes the span to the callback so callers can attach
dynamic results. payment.js uses this to tag every payment.transaction
span with: payment.status (confirmed/submit_failed/confirmation_failed),
payment.confirmation_ms, payment.circle_tx_id, payment.tx_hash, and
payment.daily_spend_usd — all visible in the lapdog trace dashboard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Safety:
- agent.js: max-turns guard (MAX_AGENT_TURNS, default 10) aborts runaway loops
- payment.js: wallet USDC balance check before submitting Circle transaction
- payment.js: MAX_DAILY_USD now read from env var (default 10)
- server.js: payment replay protection via in-memory usedTxHashes Set

Agent capabilities:
- agent.js: --dry-run mode skips payment and receipt, runs search/eval only
- agent.js: check_purchase_history tool lets agent avoid duplicate purchases
- agent.js: fix pay_for_purchase description (Base Sepolia -> ARC-TESTNET)
- agent.js: system prompt now says Shop3 (was Valution Agent)
- agent.js: notifyPurchase() called on every completed run

New files:
- notify.js: POST to WEBHOOK_URL on purchase complete (non-fatal if missing)
- scripts/schedule.js: run SCHEDULED_PROMPTS on SCHEDULE_INTERVAL_HOURS repeat

Cleanup:
- package.json: remove dead ZeroDev deps, add schedule and dry-run scripts
- index.js: fix name from Valution Agent to Shop3, wire --dry-run flag
- .env.example: document MAX_DAILY_USD, MAX_AGENT_TURNS, WEBHOOK_URL,
  SCHEDULED_PROMPTS, SCHEDULE_INTERVAL_HOURS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@AaronUppal-AI AaronUppal-AI merged commit 0847cd7 into main May 23, 2026
1 check failed
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