feat: register-agent command (#5 sub-task)#26
Merged
anajuliabit merged 1 commit intomainfrom May 6, 2026
Merged
Conversation
Register a new agent identity on the Reppo platform via POST https://reppo.ai/api/v1/agents/register (no auth required). Returns id + accessToken + funded Base wallet address. - src/commands/register-agent.ts: thin POST wrapper, hardcoded endpoint (the agents API lives at reppo.ai/api/v1, separate host from REPPO_API_URL which points at api.reppo.xyz). Uses Node 20+ built-in fetch. Surfaces network errors as PLATFORM_API_UNREACHABLE and non-2xx responses as PLATFORM_API_ERROR with the platform's error message. - src/bin.ts: register; trim TODO list to 3. - README + status line. - src/__tests__/command-error-paths.test.ts: 2 cases (INVALID_NAME, INVALID_DESCRIPTION). Output emits warnings about saving credentials and funding the new wallet — re-registration creates a NEW identity with a NEW walletAddress; previous pods stay attributed to the prior wallet. Note on #5 progress: this also surfaces a finding from the docs search — `create-datanet` requires Privy session cookies (browser auth), so it's intentionally not an agent-API surface. Documented in bin.ts TODO and tracking issue #5. Remaining 3: query emissions-due, create-datanet (browser-only), swap. Pipeline: lint, typecheck, test (92/92), build all green.
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.
Branched off main. Adds the 11th #5 sub-task. No auth required — `POST https://reppo.ai/api/v1/agents/register\` is the bootstrap endpoint that mints a new agent identity (id + accessToken + Base wallet).
Summary
`reppo register-agent --name
--description` — register a new agent on the Reppo platform. Returns:```jsonc
{ "id": "...", // persistent agent id
"accessToken": "...", // bearer token for /api/v1/agents/* calls
"walletAddress": "0x..." } // funded Base wallet provisioned by Reppo
```
The platform API is two separate auth surfaces:
Pre-flight
Endpoint quirk: hardcoded URL
`reppo.ai/api/v1/agents/register` is on a different host than `REPPO_API_URL` (which defaults to `api.reppo.xyz`). For now the URL is hardcoded with a comment that this might unify later. We can add a `REPPO_AGENTS_API_URL` env var if needed.
Updated #5 status
Smoke tests (local)
End-to-end registration against the live platform was NOT exercised in this PR — that would create real agent identities. Will be covered when the integration harness (PR #8 successor) gets a way to mock the platform API.
🤖 Generated with Claude Code