You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add platform-aware agent registration with plugin install prompts
Add AI platform selector (OpenClaw/IronClaw/PicoClaw/nanobot) to the
claim token flow. The generated prompt now includes platform-specific
plugin installation instructions when a platform is selected.
- Add platform select dropdown to ClaimTokenSection
- Rename claim.prompt to claim.prompt_base in all 8 locales
- Add platform-specific prompt templates (en/zh with full content,
other 6 locales with UI labels only — technical prompts fallback to en)
- Platform is client-side only, no DB/API changes needed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: web/app/src/i18n/locales/en.json
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -245,7 +245,19 @@
245
245
"noTokens": "No tokens generated yet. Enter an agent name and click \"Generate Token\" to create a pairing code.",
246
246
"loadingTokens": "Loading tokens...",
247
247
"expired": "expired",
248
-
"prompt": "Please register me on PeerClaw ({{origin}}) — an open-source identity & trust platform for AI Agents.\n\n## Step 1: Install the PeerClaw CLI\n\n```bash\ncurl -fsSL https://peerclaw.ai/install.sh | sh\n```\n\nThis downloads the `peerclaw` binary from GitHub releases: https://github.com/peerclaw/peerclaw-cli/releases\nYou can inspect the script first: `curl -fsSL https://peerclaw.ai/install.sh`\n\n## Step 2: Register as \"{{name}}\"\n\n```bash\nmkdir -p ~/.peerclaw && peerclaw agent claim --token {{token}} --server {{origin}} --keypair ~/.peerclaw/agent.key\n```\n\nThis command will:\n- Generate an Ed25519 keypair (saved to `~/.peerclaw/agent.key`)\n- Sign the token with your private key (proves key ownership)\n- Register with PeerClaw as \"{{name}}\" on {{origin}}\n\n⏰ Token expires in 30 minutes — please run immediately.\n\n## Step 3: Secure your keypair\n\n```bash\nchmod 600 ~/.peerclaw/agent.key\n```\n\nThe claim command automatically saves your Agent ID, server URL, and keypair path to `~/.peerclaw/config.yaml`. Run `peerclaw config show` to verify.\n\n## Step 4: Stay online\n\nPeerClaw monitors agent liveness via heartbeats. Agents that go offline lose reputation score. Two options:\n\n**Option A (recommended):** Run as MCP server — heartbeats are sent automatically:\n```bash\npeerclaw mcp serve\n```\n\n**Option B:** Send heartbeats manually (e.g., via cron every 3 minutes):\n```bash\npeerclaw agent heartbeat <your-agent-id> --status active\n```\n\n## Step 5: Explore\n\n```bash\npeerclaw agent get <your-agent-id> # verify registration\npeerclaw invoke <other-agent-id> --message \"Hello\" # talk to other agents\n```\n\nFull documentation: https://github.com/peerclaw/peerclaw/blob/main/docs/GUIDE.md"
248
+
"platformLabel": "AI Platform",
249
+
"platformOptions": {
250
+
"cli": "CLI Only",
251
+
"openclaw": "OpenClaw",
252
+
"ironclaw": "IronClaw",
253
+
"picoclaw": "PicoClaw",
254
+
"nanobot": "nanobot"
255
+
},
256
+
"prompt_base": "Please register me on PeerClaw ({{origin}}) — an open-source identity & trust platform for AI Agents.\n\n## Step 1: Install the PeerClaw CLI\n\n```bash\ncurl -fsSL https://peerclaw.ai/install.sh | sh\n```\n\nThis downloads the `peerclaw` binary from GitHub releases: https://github.com/peerclaw/peerclaw-cli/releases\nYou can inspect the script first: `curl -fsSL https://peerclaw.ai/install.sh`\n\n## Step 2: Register as \"{{name}}\"\n\n```bash\nmkdir -p ~/.peerclaw && peerclaw agent claim --token {{token}} --server {{origin}} --keypair ~/.peerclaw/agent.key\n```\n\nThis command will:\n- Generate an Ed25519 keypair (saved to `~/.peerclaw/agent.key`)\n- Sign the token with your private key (proves key ownership)\n- Register with PeerClaw as \"{{name}}\" on {{origin}}\n\n⏰ Token expires in 30 minutes — please run immediately.\n\n## Step 3: Secure your keypair\n\n```bash\nchmod 600 ~/.peerclaw/agent.key\n```\n\nThe claim command automatically saves your Agent ID, server URL, and keypair path to `~/.peerclaw/config.yaml`. Run `peerclaw config show` to verify.\n\n## Step 4: Stay online\n\nPeerClaw monitors agent liveness via heartbeats. Agents that go offline lose reputation score. Two options:\n\n**Option A (recommended):** Run as MCP server — heartbeats are sent automatically:\n```bash\npeerclaw mcp serve\n```\n\n**Option B:** Send heartbeats manually (e.g., via cron every 3 minutes):\n```bash\npeerclaw agent heartbeat <your-agent-id> --status active\n```\n\n## Step 5: Explore\n\n```bash\npeerclaw agent get <your-agent-id> # verify registration\npeerclaw invoke <other-agent-id> --message \"Hello\" # talk to other agents\n```\n\nFull documentation: https://github.com/peerclaw/peerclaw/blob/main/docs/GUIDE.md",
257
+
"prompt_openclaw": "\n\n## Step 6: Connect to OpenClaw\n\nInstall the PeerClaw plugin for OpenClaw:\n\n```bash\nnpm install @peerclaw/openclaw-plugin\n```\n\nAdd to your OpenClaw `config.json`:\n```json\n{\n\"plugins\": [\n {\n\"name\": \"@peerclaw/openclaw-plugin\",\n\"config\": {\n\"peerclaw_server\": \"{{origin}}\",\n\"keypair_path\": \"~/.peerclaw/agent.key\"\n }\n }\n ]\n}\n```\n\nRestart OpenClaw to activate the plugin. Your agent will automatically connect to PeerClaw.\n\nPlugin docs: https://github.com/peerclaw/openclaw-plugin",
258
+
"prompt_ironclaw": "\n\n## Step 6: Connect to IronClaw\n\nAdd the PeerClaw component to your IronClaw project's `Cargo.toml`:\n\n```toml\n[dependencies]\npeerclaw-ironclaw = \"0.1\"\n```\n\nThe WASM component implements the `peerclaw:ironclaw/trust` WIT interface. Import it in your component and configure via environment variables:\n\n```bash\nexport PEERCLAW_SERVER=\"{{origin}}\"\nexport PEERCLAW_KEYPAIR=\"~/.peerclaw/agent.key\"\n```\n\nPlugin docs: https://github.com/peerclaw/ironclaw-plugin",
259
+
"prompt_picoclaw": "\n\n## Step 6: Connect to PicoClaw\n\nInstall the PeerClaw plugin for PicoClaw:\n\n```bash\ngo get github.com/peerclaw/picoclaw-plugin@latest\n```\n\nAdd a blank import in your PicoClaw agent's `main.go`:\n```go\nimport _ \"github.com/peerclaw/picoclaw-plugin\"\n```\n\nAdd to your PicoClaw `config.json`:\n```json\n{\n\"plugins\": [\"peerclaw\"],\n\"peerclaw\": {\n\"server\": \"{{origin}}\",\n\"keypair_path\": \"~/.peerclaw/agent.key\"\n }\n}\n```\n\nPlugin docs: https://github.com/peerclaw/picoclaw-plugin",
260
+
"prompt_nanobot": "\n\n## Step 6: Connect to nanobot\n\nInstall the PeerClaw plugin for nanobot:\n\n```bash\npip install git+https://github.com/peerclaw/nanobot-plugin.git\n```\n\nAdd to your nanobot `config.yaml`:\n```yaml\nplugins:\n peerclaw:\n server: \"{{origin}}\"\n keypair_path: \"~/.peerclaw/agent.key\"\n```\n\nRestart nanobot to activate the plugin.\n\nPlugin docs: https://github.com/peerclaw/nanobot-plugin"
249
261
},
250
262
"upgrade": {
251
263
"prompt": "Please upgrade the PeerClaw CLI for agent \"{{agent_name}}\" (ID: {{agent_id}}).\n\nCurrent version: {{current_version}}\nLatest version: {{latest_version}}\nServer: {{server_url}}\n\n## Step 1: Update the CLI\n\n```bash\ncurl -fsSL {{server_url}}/install.sh | sh\n```\n\nOr download directly from: https://github.com/peerclaw/peerclaw-cli/releases\n\n## Step 2: Verify the new version\n\n```bash\npeerclaw version\n```\n\nExpected output: `peerclaw version {{latest_version}}`\n\n## Step 3: Send a heartbeat to update the version on the server\n\n```bash\npeerclaw agent heartbeat {{agent_id}} --status online\n```\n\nThis will automatically report the new SDK version to the PeerClaw server.",
Copy file name to clipboardExpand all lines: web/app/src/i18n/locales/es.json
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -245,7 +245,15 @@
245
245
"noTokens": "Aún no se han generado tokens. Introduce un nombre de agente y haz clic en \"Generar token\" para crear un código de vinculación.",
246
246
"loadingTokens": "Cargando tokens...",
247
247
"expired": "expirado",
248
-
"prompt": "Por favor regístrame en PeerClaw ({{origin}}) — una plataforma de código abierto de identidad y confianza para agentes de IA.\n\n## Paso 1: Instalar el CLI de PeerClaw\n\n```bash\ncurl -fsSL https://peerclaw.ai/install.sh | sh\n```\n\nEsto descarga el binario `peerclaw` desde las releases de GitHub: https://github.com/peerclaw/peerclaw-cli/releases\nPuedes inspeccionar el script primero: `curl -fsSL https://peerclaw.ai/install.sh`\n\n## Paso 2: Registrarse como \"{{name}}\"\n\n```bash\nmkdir -p ~/.peerclaw && peerclaw agent claim --token {{token}} --server {{origin}} --keypair ~/.peerclaw/agent.key\n```\n\nEste comando:\n- Genera un par de claves Ed25519 (guardado en `~/.peerclaw/agent.key`)\n- Firma el token con tu clave privada (demuestra la propiedad de la clave)\n- Se registra en PeerClaw como \"{{name}}\" en {{origin}}\n\n\u23f0 El token expira en 30 minutos — por favor ejecútalo de inmediato.\n\n## Paso 3: Proteger tu par de claves\n\n```bash\nchmod 600 ~/.peerclaw/agent.key\n```\n\nEl comando de vinculación guarda automáticamente tu ID de agente, la URL del servidor y la ruta del par de claves en `~/.peerclaw/config.yaml`. Ejecuta `peerclaw config show` para verificar.\n\n## Paso 4: Mantente en línea\n\nPeerClaw monitorea la actividad del agente mediante latidos. Los agentes que se desconectan pierden puntuación de reputación. Dos opciones:\n\n**Opción A (recomendada):** Ejecutar como servidor MCP — los latidos se envían automáticamente:\n```bash\npeerclaw mcp serve\n```\n\n**Opción B:** Enviar latidos manualmente (ej., vía cron cada 3 minutos):\n```bash\npeerclaw agent heartbeat <your-agent-id> --status active\n```\n\n## Paso 5: Explorar\n\n```bash\npeerclaw agent get <your-agent-id> # verificar registro\npeerclaw invoke <other-agent-id> --message \"Hello\" # hablar con otros agentes\n```\n\nDocumentación completa: https://github.com/peerclaw/peerclaw/blob/main/docs/GUIDE.md"
248
+
"platformLabel": "Plataforma de IA",
249
+
"platformOptions": {
250
+
"cli": "Solo CLI",
251
+
"openclaw": "OpenClaw",
252
+
"ironclaw": "IronClaw",
253
+
"picoclaw": "PicoClaw",
254
+
"nanobot": "nanobot"
255
+
},
256
+
"prompt_base": "Por favor regístrame en PeerClaw ({{origin}}) — una plataforma de código abierto de identidad y confianza para agentes de IA.\n\n## Paso 1: Instalar el CLI de PeerClaw\n\n```bash\ncurl -fsSL https://peerclaw.ai/install.sh | sh\n```\n\nEsto descarga el binario `peerclaw` desde las releases de GitHub: https://github.com/peerclaw/peerclaw-cli/releases\nPuedes inspeccionar el script primero: `curl -fsSL https://peerclaw.ai/install.sh`\n\n## Paso 2: Registrarse como \"{{name}}\"\n\n```bash\nmkdir -p ~/.peerclaw && peerclaw agent claim --token {{token}} --server {{origin}} --keypair ~/.peerclaw/agent.key\n```\n\nEste comando:\n- Genera un par de claves Ed25519 (guardado en `~/.peerclaw/agent.key`)\n- Firma el token con tu clave privada (demuestra la propiedad de la clave)\n- Se registra en PeerClaw como \"{{name}}\" en {{origin}}\n\n⏰ El token expira en 30 minutos — por favor ejecútalo de inmediato.\n\n## Paso 3: Proteger tu par de claves\n\n```bash\nchmod 600 ~/.peerclaw/agent.key\n```\n\nEl comando de vinculación guarda automáticamente tu ID de agente, la URL del servidor y la ruta del par de claves en `~/.peerclaw/config.yaml`. Ejecuta `peerclaw config show` para verificar.\n\n## Paso 4: Mantente en línea\n\nPeerClaw monitorea la actividad del agente mediante latidos. Los agentes que se desconectan pierden puntuación de reputación. Dos opciones:\n\n**Opción A (recomendada):** Ejecutar como servidor MCP — los latidos se envían automáticamente:\n```bash\npeerclaw mcp serve\n```\n\n**Opción B:** Enviar latidos manualmente (ej., vía cron cada 3 minutos):\n```bash\npeerclaw agent heartbeat <your-agent-id> --status active\n```\n\n## Paso 5: Explorar\n\n```bash\npeerclaw agent get <your-agent-id> # verificar registro\npeerclaw invoke <other-agent-id> --message \"Hello\" # hablar con otros agentes\n```\n\nDocumentación completa: https://github.com/peerclaw/peerclaw/blob/main/docs/GUIDE.md"
249
257
},
250
258
"upgrade": {
251
259
"prompt": "Por favor, actualiza el CLI de PeerClaw para el agente \"{{agent_name}}\" (ID: {{agent_id}}).\n\nVersión actual: {{current_version}}\nÚltima versión: {{latest_version}}\nServidor: {{server_url}}\n\n## Paso 1: Actualizar el CLI\n\n```bash\ncurl -fsSL {{server_url}}/install.sh | sh\n```\n\nO descarga directamente desde: https://github.com/peerclaw/peerclaw-cli/releases\n\n## Paso 2: Verificar la nueva versión\n\n```bash\npeerclaw version\n```\n\nSalida esperada: `peerclaw version {{latest_version}}`\n\n## Paso 3: Enviar un heartbeat para actualizar la versión en el servidor\n\n```bash\npeerclaw agent heartbeat {{agent_id}} --status online\n```\n\nEsto reportará automáticamente la nueva versión del SDK al servidor PeerClaw.",
0 commit comments