Luca + AEON skills: ERC-4337 classification, agent read-order, Surplus inference & buy/sell#169
Merged
Merged
Conversation
…account management Adds the full Surplus buyer key flow so Luca can self-issue an inf_ key and have inference costs settle from its own wallet on-chain via USDC on Base. New endpoints (all v1Auth — same API key as all other Luca skills): - GET /api/v1/luca/surplus/challenge — Step 1: fetch SIWE challenge to sign - POST /api/v1/luca/surplus/buyer-key — Step 2: exchange signed message for inf_ key - GET /api/v1/luca/surplus/status — check USDC balance, allowance, active keys - GET /api/v1/luca/surplus/prices — current per-token pricing in USDC - GET /api/v1/luca/surplus/models — available Surplus models Updates: - /api/v1/luca/inference now prefers LUCA_SURPLUS_BUYER_KEY over SURPLUS_API_KEY so spend settles from Luca's wallet once the buyer key is set - Skills catalog updated with all 5 new Surplus endpoints - .env.example documents LUCA_SURPLUS_BUYER_KEY Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjpGP3kYKnQuQAUoK6RZky
|
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.
Summary
smart_accountaddress type (detected viavalidateUserOpselector) so smart-account operator wallets are no longer misclassified assmart_contractand blocked from books. Adds an admin endpoint (/api/admin/registry/update-wallet-type) to override wallet types manually./api/v1/luca/agent-read) instead of memory or stale stored report prose. Non-indexed agents get a clearly labeled observational fallback.POST /api/v1/luca/inference, authenticated with the same v1 API key Luca already uses for every other skill (previously the only proxy requiredZETTA_INTERNAL_SECRET, which Hermes doesn't have). Spend is logged automatically toinference_eventsandagent_economic_events.inf_buyer key via SIWE so inference settles in USDC from its own wallet on Base, making spend attributable on-chain:GET /api/v1/luca/surplus/challenge— fetch SIWE challenge to signPOST /api/v1/luca/surplus/buyer-key— exchange signed message forinf_keyGET /api/v1/luca/surplus/status— balance / allowance / active keysGET /api/v1/luca/surplus/prices— per-token USDC pricingGET /api/v1/luca/surplus/models— available models/api/v1/luca/inferencenow prefersLUCA_SURPLUS_BUYER_KEYover the sharedSURPLUS_API_KEYonce set/api/luca/skills) updated withagent-read,surplus-inference, and all 5 Surplus buy/sell endpoints.Test plan
/api/admin/registry/update-wallet-typecorrectly overrides a wallet'saddress_typeand thatagent_books_cacheinvalidation/regeneration reflects it/api/v1/luca/agent-readdata, not stale stored report figures/api/v1/luca/inferencesucceeds from Hermes using the standard v1 API key (noZETTA_INTERNAL_SECRETneeded)challenge→ sign →buyer-key) and confirm the returnedinf_key works against/api/v1/luca/surplus/statusLUCA_SURPLUS_BUYER_KEY, confirm inference spend settles from Luca's wallet on Base rather than the shared key🤖 Generated with Claude Code
Generated by Claude Code