Circle wallet migration#16
Merged
Merged
Conversation
- 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>
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