feat: Luca Skills V1 + books integrity fixes + ERC-8004 Alchemy Free tier fix#129
Merged
Conversation
Adds GET /api/luca/skills (discovery manifest) and 6 POST skill routes: - wallet-audit: classify an address, report books-compatibility, stable balance - agent-books: full financial statement (revenue/expenses/net) for any agent slug - treasury-monitor: USDC+USDT balance per wallet with health signal (healthy/low/critical) - revenue-analysis: gross_inflow vs operating_revenue breakdown with recognition rate and quarantine detail - registry-check: look up agent by slug, name, or wallet address; returns attribution tier and wallet eligibility - luca-report: composite — registry + attribution + books + treasury + luca_summary in one call All skills use v1Auth (Bearer/X-API-Key). Data integrity rules enforced: ERC-8004 = identity only, manifest = attribution, eoa/treasury_contract = books-eligible types, gross_inflow_usd ≠ revenue. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RHDXdEbGQsn88zks713gye
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What this ships
Luca Skills V1 — 6 callable financial intelligence endpoints
The first external-facing skill layer. Builders and agents can call these directly.
GET /api/luca/skillsPOST /api/luca/skills/wallet-auditPOST /api/luca/skills/agent-booksPOST /api/luca/skills/treasury-monitorPOST /api/luca/skills/revenue-analysisPOST /api/luca/skills/registry-checkPOST /api/luca/skills/luca-reportAll skills use
v1Auth(Bearer/X-API-Key). Data integrity rules enforced at every layer.ERC-8004 contract scan — Alchemy Free tier fix
eth_getLogsis capped at 10-block ranges on Free tier. All 655 planned chunks were failing, returning 0 agents.Replaced with
alchemy_getAssetTransfers— no block-range restriction, works on Free tier, paginated at 1000/page. Diagnostic panel updated to show method, transfers_found, pages_fetched.Books eligibility integrity fixes
isBooksEligibleWallet()inwallet-eligibility.ts— allowlist ofeoa+treasury_contractonlyattribution_statusnow set byvalidForBooksCount > 0, not manifest wallet countunder_reviewconfidence label + smarter cache stale detection (compareswallets.analyzedvscurrentEligibleCount)DELETE /api/admin/books/snapshot?slug=aeonfinancials_under_reviewSQL migrations (run in Supabase)
migrations/2026-06-23_manifest-wallet-cleanup.sql— demotes manifest wallets with address_type NOT IN ('eoa', 'treasury_contract') to evidence_source='admin'migrations/2026-06-23_aeon-under-review.sql— deletes stale AEON books cache + sets under_review confidence labelTest plan
GET /api/luca/skillsreturns 6 skills with correct schemasPOST /api/luca/skills/wallet-auditwith a known EOA returnsbooks_compatible: truePOST /api/luca/skills/registry-checkwithquery: "aeon"returns attribution_tier and walletsPOST /api/luca/skills/luca-reportwithslug: "luca"returns composite reportfromBlock: 0xE4E1C0, confirmpages_fetched >= 1,rpc_errors: 0🤖 Generated with Claude Code
https://claude.ai/code/session_01RHDXdEbGQsn88zks713gye
Generated by Claude Code