clawdentity 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,7 @@ version: 0.3.0
|
|
|
9
9
|
This skill prepares a local OpenClaw agent in a strict sequence:
|
|
10
10
|
1. finish registry onboarding by redeeming an invite (`clw_inv_...`) and store API key
|
|
11
11
|
2. create local agent identity
|
|
12
|
-
3.
|
|
12
|
+
3. run `clawdentity openclaw setup <agent-name>` (config + runtime + readiness)
|
|
13
13
|
4. become ready to start or accept QR pairing
|
|
14
14
|
|
|
15
15
|
After setup, this skill also covers lifecycle operations: token refresh, API key rotation, agent revocation, service teardown, and token verification.
|
|
@@ -115,7 +115,7 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
|
|
|
115
115
|
- `clawdentity openclaw relay test --peer <alias> --hook-token <token> --json`
|
|
116
116
|
- `clawdentity openclaw relay test --session-id <id> --message <text>`
|
|
117
117
|
|
|
118
|
-
### Connector runtime
|
|
118
|
+
### Connector runtime (advanced/manual only)
|
|
119
119
|
- `clawdentity connector start <agent-name>`
|
|
120
120
|
- `clawdentity connector start <agent-name> --proxy-ws-url <url>`
|
|
121
121
|
- `clawdentity connector start <agent-name> --openclaw-hook-token <token>`
|
|
@@ -127,7 +127,7 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
|
|
|
127
127
|
### Pairing
|
|
128
128
|
- `clawdentity pair start <agent-name> --qr`
|
|
129
129
|
- `clawdentity pair start <agent-name> --qr --qr-output <path>`
|
|
130
|
-
- `clawdentity pair start <agent-name> --qr --
|
|
130
|
+
- `clawdentity pair start <agent-name> --qr --ttl-seconds <seconds>`
|
|
131
131
|
- `clawdentity pair confirm <agent-name> --qr-file <path>`
|
|
132
132
|
- `clawdentity pair confirm <agent-name> --ticket <clwpair1_...>`
|
|
133
133
|
|
|
@@ -184,15 +184,13 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
|
|
|
184
184
|
- `--openclaw-dir <path>`
|
|
185
185
|
- `--openclaw-base-url <url>`
|
|
186
186
|
- `--transform-source <path>` (custom relay transform location)
|
|
187
|
-
- Verify output contains
|
|
187
|
+
- Verify output contains:
|
|
188
|
+
- self-setup completion
|
|
189
|
+
- OpenClaw config path and relay runtime path
|
|
190
|
+
- runtime mode/status
|
|
191
|
+
- websocket status `connected`
|
|
188
192
|
|
|
189
|
-
7.
|
|
190
|
-
- Run `clawdentity connector start <agent-name>`.
|
|
191
|
-
- For non-default proxy: add `--proxy-ws-url <url>`.
|
|
192
|
-
- Connector auto-loads hook token from `openclaw-relay.json` when `--openclaw-hook-token` is not provided.
|
|
193
|
-
- Optional persistent mode: `clawdentity connector service install <agent-name>`.
|
|
194
|
-
|
|
195
|
-
8. Validate readiness.
|
|
193
|
+
7. Validate readiness.
|
|
196
194
|
- Run `clawdentity openclaw doctor`.
|
|
197
195
|
- Use `--json` for machine-readable output.
|
|
198
196
|
- Use `--peer <alias>` to validate a specific peer exists after pairing.
|
|
@@ -208,13 +206,13 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
|
|
|
208
206
|
| `state.hookMapping` | `send-to-peer` hook mapping in OpenClaw config | `clawdentity openclaw setup <agent-name>` |
|
|
209
207
|
| `state.hookToken` | Hooks enabled with token in OpenClaw config | `clawdentity openclaw setup <agent-name>` then restart OpenClaw |
|
|
210
208
|
| `state.openclawBaseUrl` | OpenClaw base URL resolvable | `clawdentity openclaw setup <agent-name> --openclaw-base-url <url>` |
|
|
209
|
+
| `state.connectorRuntime` | Local connector runtime reachable and websocket-connected | `clawdentity openclaw setup <agent-name>` |
|
|
211
210
|
|
|
212
211
|
- At this point the agent is ready to start pairing or accept pairing.
|
|
213
212
|
|
|
214
|
-
|
|
213
|
+
8. Pairing phase (separate from onboarding).
|
|
215
214
|
- Initiator: `clawdentity pair start <agent-name> --qr`
|
|
216
|
-
- Optional overrides: `--
|
|
217
|
-
- Owner PAT defaults to configured API key when `--owner-pat` is omitted.
|
|
215
|
+
- Optional overrides: `--ttl-seconds <seconds>`, `--qr-output <path>`
|
|
218
216
|
- Responder (two mutually exclusive paths):
|
|
219
217
|
- QR path: `clawdentity pair confirm <agent-name> --qr-file <path>`
|
|
220
218
|
- Inline ticket path: `clawdentity pair confirm <agent-name> --ticket <clwpair1_...>`
|
|
@@ -222,7 +220,7 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
|
|
|
222
220
|
- Pair confirm auto-saves peer DID/proxy mapping locally from QR ticket metadata.
|
|
223
221
|
- Confirm pairing success, then run `clawdentity openclaw relay test`.
|
|
224
222
|
|
|
225
|
-
|
|
223
|
+
9. Post-pairing verification.
|
|
226
224
|
- Run `clawdentity verify <path-to-ait.jwt>` to confirm the local agent token is valid.
|
|
227
225
|
- Verify output shows token status, expiry, and no revocation.
|
|
228
226
|
- Run `clawdentity openclaw doctor --peer <alias>` to confirm the new peer is visible.
|
|
@@ -233,8 +231,9 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
|
|
|
233
231
|
|
|
234
232
|
### Token expiry recovery
|
|
235
233
|
1. Run `clawdentity agent auth refresh <agent-name>`.
|
|
236
|
-
2.
|
|
237
|
-
3.
|
|
234
|
+
2. Reconcile runtime with `clawdentity openclaw setup <agent-name>`.
|
|
235
|
+
3. If manual runtime mode is required, run `clawdentity connector start <agent-name>`.
|
|
236
|
+
4. Verify with `clawdentity agent inspect <agent-name>` to confirm new expiry.
|
|
238
237
|
|
|
239
238
|
### API key rotation
|
|
240
239
|
1. Create new key: `clawdentity api-key create`.
|
|
@@ -274,13 +273,13 @@ Do not suggest switching endpoints unless user explicitly asks for endpoint chan
|
|
|
274
273
|
## Failure Handling
|
|
275
274
|
|
|
276
275
|
### Connector errors
|
|
277
|
-
- `404` on outbound endpoint: connector not
|
|
278
|
-
- `409` on outbound: peer snapshot stale. Rerun `clawdentity openclaw setup <agent-name
|
|
276
|
+
- `404` on outbound endpoint: connector runtime is not available. Rerun `clawdentity openclaw setup <agent-name>`.
|
|
277
|
+
- `409` on outbound: peer snapshot stale. Rerun `clawdentity openclaw setup <agent-name>`.
|
|
279
278
|
- `CLI_CONNECTOR_MISSING_AGENT_MATERIAL`: agent credentials missing. Rerun `clawdentity agent create <agent-name>` or `clawdentity agent auth refresh <agent-name>`.
|
|
280
279
|
|
|
281
280
|
### Pairing errors
|
|
282
|
-
- `pair start`
|
|
283
|
-
- `pair start`
|
|
281
|
+
- `pair start` 403 (`PROXY_PAIR_OWNERSHIP_FORBIDDEN`): initiator ownership check failed. Recreate/refresh the local agent identity.
|
|
282
|
+
- `pair start` 503 (`PROXY_PAIR_OWNERSHIP_UNAVAILABLE`): registry ownership validation is unavailable. Check proxy/registry service auth configuration.
|
|
284
283
|
- `pair confirm` 404 (`PROXY_PAIR_TICKET_NOT_FOUND`): ticket is invalid or expired. Request a new ticket from initiator.
|
|
285
284
|
- `pair confirm` 410 (`PROXY_PAIR_TICKET_EXPIRED`): ticket has expired. Request a new ticket.
|
|
286
285
|
- `CLI_PAIR_CONFIRM_INPUT_CONFLICT`: cannot provide both `--ticket` and `--qr-file`. Use one path only.
|
|
@@ -291,13 +290,13 @@ Do not suggest switching endpoints unless user explicitly asks for endpoint chan
|
|
|
291
290
|
- `CLI_OPENCLAW_MISSING_AGENT_CREDENTIALS` or `CLI_OPENCLAW_EMPTY_AGENT_CREDENTIALS`: agent credentials missing or empty. Rerun `agent create` or `agent auth refresh`.
|
|
292
291
|
|
|
293
292
|
### Credential expiry
|
|
294
|
-
- Agent AIT expired: run `clawdentity agent auth refresh <agent-name
|
|
293
|
+
- Agent AIT expired: run `clawdentity agent auth refresh <agent-name>`, then rerun `clawdentity openclaw setup <agent-name>`.
|
|
295
294
|
- API key invalid (401 on registry calls): rotate with `api-key create` then `config set apiKey`.
|
|
296
295
|
|
|
297
296
|
### General recovery
|
|
298
297
|
- Report exact missing file/value.
|
|
299
298
|
- Fix only failing input/config.
|
|
300
|
-
-
|
|
299
|
+
- Prefer `openclaw setup` as the single runtime reconciliation command.
|
|
301
300
|
- Re-run `openclaw doctor`, then `openclaw relay test`.
|
|
302
301
|
|
|
303
302
|
## Bundled Resources
|
|
@@ -39,6 +39,7 @@ Define the exact runtime contract used by `relay-to-peer.mjs`.
|
|
|
39
39
|
Rules:
|
|
40
40
|
- setup must succeed without any peer metadata
|
|
41
41
|
- peers config snapshot still exists and may be empty until pairing is completed
|
|
42
|
+
- setup is expected to bring connector runtime to a websocket-connected state (unless explicitly disabled by advanced flags)
|
|
42
43
|
|
|
43
44
|
## Peer Map Schema
|
|
44
45
|
|
|
@@ -73,7 +74,7 @@ Current pairing contract is ticket-based with CLI support:
|
|
|
73
74
|
- proxy route: `POST /pair/start`
|
|
74
75
|
- headers:
|
|
75
76
|
- `Authorization: Claw <AIT>`
|
|
76
|
-
-
|
|
77
|
+
- ownership validation is handled internally by proxy-to-registry service auth
|
|
77
78
|
- body (optional):
|
|
78
79
|
|
|
79
80
|
```json
|
|
@@ -148,7 +149,8 @@ The transform does not send directly to the peer proxy. It posts to the local co
|
|
|
148
149
|
- Runtime may also use:
|
|
149
150
|
- `CLAWDENTITY_CONNECTOR_BASE_URL`
|
|
150
151
|
- `CLAWDENTITY_CONNECTOR_OUTBOUND_PATH`
|
|
151
|
-
- `
|
|
152
|
+
- `openclaw setup <agentName>` is the primary self-setup path and should leave runtime healthy.
|
|
153
|
+
- `connector start <agentName>` is advanced/manual recovery; it resolves bind URL from `~/.clawdentity/openclaw-connectors.json` when explicit env override is absent.
|
|
152
154
|
|
|
153
155
|
Outbound JSON body sent by transform:
|
|
154
156
|
|
|
@@ -184,27 +186,23 @@ Error messages should include file/path context but never print secret content.
|
|
|
184
186
|
|
|
185
187
|
CLI resolves proxy URL in this order (first non-empty wins):
|
|
186
188
|
|
|
187
|
-
1.
|
|
188
|
-
2. `
|
|
189
|
-
3.
|
|
190
|
-
4.
|
|
191
|
-
5. Error: `CLI_PAIR_PROXY_URL_REQUIRED`
|
|
189
|
+
1. `CLAWDENTITY_PROXY_URL` environment variable
|
|
190
|
+
2. `proxyUrl` from `~/.clawdentity/config.json`
|
|
191
|
+
3. Registry metadata from `GET /v1/metadata`
|
|
192
|
+
4. Error when configured proxy does not match metadata (`CLI_PAIR_PROXY_URL_MISMATCH`) or metadata lookup fails
|
|
192
193
|
|
|
193
|
-
###
|
|
194
|
+
### Metadata expectation
|
|
194
195
|
|
|
195
|
-
|
|
196
|
-
|-------------------|---------------|
|
|
197
|
-
| `registry.clawdentity.com` | `proxy.clawdentity.com` |
|
|
198
|
-
| `dev.registry.clawdentity.com` | `dev.proxy.clawdentity.com` |
|
|
199
|
-
| `dev.registry.<domain>` | `dev.proxy.<domain>` |
|
|
200
|
-
| `registry.<domain>` | `proxy.<domain>` |
|
|
201
|
-
| `localhost:8788` | `localhost:8787` |
|
|
202
|
-
| `127.0.0.1:8788` | `127.0.0.1:8787` |
|
|
203
|
-
| `host.docker.internal:8788` | `host.docker.internal:8787` |
|
|
196
|
+
Registry metadata (`/v1/metadata`) should return a valid `proxyUrl`.
|
|
204
197
|
|
|
205
|
-
|
|
198
|
+
Known defaults:
|
|
206
199
|
|
|
207
|
-
|
|
200
|
+
| Registry URL | Metadata proxy URL |
|
|
201
|
+
|-------------|--------------------|
|
|
202
|
+
| `https://registry.clawdentity.com` | `https://proxy.clawdentity.com` |
|
|
203
|
+
| `https://dev.registry.clawdentity.com` | `https://dev.proxy.clawdentity.com` |
|
|
204
|
+
|
|
205
|
+
Recovery: rerun onboarding (`clawdentity invite redeem <clw_inv_...>`) so local config aligns to registry metadata.
|
|
208
206
|
|
|
209
207
|
## Pairing Error Codes
|
|
210
208
|
|
|
@@ -212,10 +210,9 @@ Recovery: `clawdentity config set proxyUrl <url>`.
|
|
|
212
210
|
|
|
213
211
|
| HTTP Status | Error Code | Meaning |
|
|
214
212
|
|-------------|-----------|---------|
|
|
215
|
-
|
|
|
216
|
-
|
|
|
213
|
+
| 403 | `PROXY_PAIR_OWNERSHIP_FORBIDDEN` | Initiator ownership check failed |
|
|
214
|
+
| 503 | `PROXY_PAIR_OWNERSHIP_UNAVAILABLE` | Registry ownership lookup unavailable |
|
|
217
215
|
| — | `CLI_PAIR_AGENT_NOT_FOUND` | Agent ait.jwt or secret.key missing/empty |
|
|
218
|
-
| — | `CLI_PAIR_START_OWNER_PAT_REQUIRED` | Owner PAT not provided and no API key configured |
|
|
219
216
|
| — | `CLI_PAIR_PROXY_URL_REQUIRED` | Proxy URL could not be resolved |
|
|
220
217
|
| — | `CLI_PAIR_START_INVALID_TTL` | ttlSeconds must be a positive integer |
|
|
221
218
|
| — | `CLI_PAIR_INVALID_PROXY_URL` | Proxy URL is invalid |
|