Skip to content

Commit 0142791

Browse files
gcmsgclaude
andcommitted
fix: include --server flag in agent claim prompt
The generated prompt for AI agents omitted the server URL, causing `peerclaw agent claim` to default to localhost:8080. Now uses window.location.origin so the prompt always points to the correct deployment. Also adds a `peerclaw config set server` step for subsequent commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 42728ec commit 0142791

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

web/app/src/components/provider/ClaimTokenSection.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ You can inspect the script first: \`curl -fsSL https://peerclaw.ai/install.sh\`
8585
## Step 2: Register as "${name}"
8686
8787
\`\`\`bash
88-
peerclaw agent claim --token ${token}
88+
peerclaw agent claim --token ${token} --server ${window.location.origin}
8989
\`\`\`
9090
9191
This command will:
9292
- Generate an Ed25519 keypair (saved to \`./agent.key\`)
9393
- Sign the token with your private key (proves key ownership)
94-
- Register with PeerClaw as "${name}"
94+
- Register with PeerClaw as "${name}" on ${window.location.origin}
9595
9696
⏰ Token expires in 30 minutes — please run immediately.
9797
@@ -101,6 +101,11 @@ Save these details from the output for future use:
101101
- **Agent ID** — your unique identifier on the platform
102102
- **Keypair file** (\`./agent.key\`) — keep this safe, it's your cryptographic identity
103103
104+
Set the server once so you don't need \`--server\` every time:
105+
\`\`\`bash
106+
peerclaw config set server ${window.location.origin}
107+
\`\`\`
108+
104109
Useful follow-up commands:
105110
\`\`\`bash
106111
peerclaw agent get <your-agent-id> # verify registration

0 commit comments

Comments
 (0)