Skip to content

fix(runner): auto-register ERC8004 provider identity and sync roster#553

Merged
riyannode merged 1 commit into
mainfrom
fix/identity-ensure-read-first
Jun 18, 2026
Merged

fix(runner): auto-register ERC8004 provider identity and sync roster#553
riyannode merged 1 commit into
mainfrom
fix/identity-ensure-read-first

Conversation

@riyannode

@riyannode riyannode commented Jun 18, 2026

Copy link
Copy Markdown
Owner

What

Read-first ERC-8004 identity ensure: scan on-chain before minting.

Changes

  • Read-first flow: balanceOf(wallet) + ownerOf scan from totalSupply before any mint attempt
  • Reuse existing: if wallet already has ERC-8004 identity, reuse tokenId (no duplicate mint)
  • Multiple identities: require explicit ARCLAYER_AGENT_ID selection
  • Second mint guard: require --confirm-second-mint flag
  • Console roster sync: POST /api/erc8004/register/sync after successful mint
  • UUID idempotency: ArcLayer internal key to UUID for Circle SDK compatibility
  • Enhanced metadata: schema: arclayer.agent/v1, capabilities, categories, autonomous, x402 fields
  • Console roster check: query erc8004_agents by controller address (optional)
  • syncToConsole() method on RunnerServices
  • --confirm-second-mint CLI flag

Files Changed

  • apps/arclayer-runner/src/identity-ensure.ts — read-first flow, on-chain scan, Console roster check, UUID mapping, enhanced metadata
  • apps/arclayer-runner/src/services.tssyncToConsole(), UUID idempotency mapping
  • apps/arclayer-runner/src/index.ts--confirm-second-mint flag, syncToConsoleFn wiring
  • apps/arclayer-runner/src/identity-ensure.test.ts — updated tests for new flow

Tests

  • Runner: 709/709 pass
  • LangChain adapter: 105/105 pass

Identity Flow

  1. Check local identity.json — confirmed? reuse
  2. Check pending registration — finalize or wait
  3. On-chain balanceOf — found? reuse tokenId
  4. Console roster check — found? reuse tokenId
  5. Multiple — require explicit ARCLAYER_AGENT_ID
  6. None + auto-register — mint via Circle wallet adapter
  7. Second mint — require confirm-second-mint
  8. After mint — sync to Console erc8004_agents

- Read-first identity ensure: scan on-chain balanceOf + ownerOf before minting
- Reuse existing ERC-8004 identity if wallet already has one (no duplicate mint)
- Multiple identities: require explicit ARCLAYER_AGENT_ID selection
- Second mint guard: require --confirm-second-mint flag
- Console roster sync: POST /api/erc8004/register/sync after successful mint
- UUID idempotency mapping: ArcLayer internal key -> UUID for Circle SDK
- Enhanced metadata: schema, capabilities, categories, autonomous, x402 fields
- Console roster check: query erc8004_agents by controller address
- Add syncToConsole method to RunnerServices
- Add --confirm-second-mint CLI option to identity ensure
- All 709 runner tests + 105 adapter tests pass
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arcwork Ready Ready Preview, Comment Jun 18, 2026 10:04am

Request Review

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for rainbow-macaron-5d0d9a ready!

Name Link
🔨 Latest commit 7409265
🔍 Latest deploy log https://app.netlify.com/projects/rainbow-macaron-5d0d9a/deploys/6a33c2404f156400089759e0
😎 Deploy Preview https://deploy-preview-553--rainbow-macaron-5d0d9a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@riyannode
riyannode merged commit 2a76a61 into main Jun 18, 2026
11 of 12 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7409265b09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/arclayer-runner/src/identity-ensure.ts
Comment thread apps/arclayer-runner/src/identity-ensure.ts
Comment thread apps/arclayer-runner/src/identity-ensure.ts
Comment thread apps/arclayer-runner/src/identity-ensure.ts
Comment thread apps/arclayer-runner/src/identity-ensure.ts
Comment thread apps/arclayer-runner/src/services.ts
Comment thread apps/arclayer-runner/src/identity-ensure.ts
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