clawdentity 0.0.17 → 0.0.19

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawdentity",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -56,11 +56,11 @@ function parseProxyUrl(value) {
56
56
  throw new Error("proxyUrl must be a valid URL");
57
57
  }
58
58
  }
59
- function parsePeerName(value) {
59
+ function parseProfileName(value, label) {
60
60
  if (value === void 0) {
61
61
  return void 0;
62
62
  }
63
- return parseNonEmptyString(value, "name");
63
+ return parseNonEmptyString(value, label);
64
64
  }
65
65
  function parsePeerEntry(value) {
66
66
  if (!isRecord(value)) {
@@ -68,11 +68,12 @@ function parsePeerEntry(value) {
68
68
  }
69
69
  const did = parseDid(value.did);
70
70
  const proxyUrl = parseProxyUrl(value.proxyUrl);
71
- const name = parsePeerName(value.name);
72
- if (name === void 0) {
71
+ const agentName = parseProfileName(value.agentName, "agentName");
72
+ const humanName = parseProfileName(value.humanName, "humanName");
73
+ if (agentName === void 0 && humanName === void 0) {
73
74
  return { did, proxyUrl };
74
75
  }
75
- return { did, proxyUrl, name };
76
+ return { did, proxyUrl, agentName, humanName };
76
77
  }
77
78
  function parsePeersConfig(value, source) {
78
79
  if (!isRecord(value)) {
@@ -57,6 +57,7 @@ Relay invite codes are not part of this flow.
57
57
  Required for onboarding:
58
58
  - Registry onboarding invite code: `clw_inv_...` (default onboarding path)
59
59
  - Local agent name
60
+ - Human display name (used by invite redeem and pairing profile metadata)
60
61
 
61
62
  Optional only for recovery/advanced operator flows:
62
63
  - Existing API key (only when user explicitly says no invite is available)
@@ -84,8 +85,8 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
84
85
  - `clawdentity config show`
85
86
 
86
87
  ### Invite management
87
- - `clawdentity invite redeem <registry-invite-code>`
88
- - `clawdentity invite redeem <registry-invite-code> --registry-url <registry-url>`
88
+ - `clawdentity invite redeem <registry-invite-code> --display-name <human-name>`
89
+ - `clawdentity invite redeem <registry-invite-code> --display-name <human-name> --registry-url <registry-url>`
89
90
  - `clawdentity invite create` (admin only, see registry reference)
90
91
  - `clawdentity invite create --expires-at <iso-8601>` (admin only)
91
92
 
@@ -152,6 +153,7 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
152
153
  - If `--invite-code` appears, treat CLI as outdated and upgrade before continuing:
153
154
  - `npm install -g clawdentity@latest`
154
155
  - Confirm local agent name.
156
+ - Confirm local human display name for onboarding.
155
157
  - Check local API key status with `clawdentity config get apiKey`.
156
158
  - If API key is missing, ask for onboarding invite `clw_inv_...` and continue with invite redeem.
157
159
  - Do not ask for raw API key unless the user explicitly says invite is unavailable.
@@ -167,13 +169,14 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
167
169
  - If needed, run with `--registry-url`.
168
170
 
169
171
  4. Finish onboarding and generate API key.
170
- - Preferred path: run `clawdentity invite redeem <clw_inv_...>`.
172
+ - Preferred path: run `clawdentity invite redeem <clw_inv_...> --display-name <human-name>`.
171
173
  - If local API key already exists and user explicitly wants to reuse it, continue without redeem.
172
174
  - Use `config set apiKey` only as a manual recovery path when user cannot provide invite.
173
175
  - Confirm output shows:
174
176
  - `Invite redeemed`
175
177
  - API key token printed once
176
178
  - `API key saved to local config`
179
+ - `Human name: <human-name>`
177
180
  - Stop and fix if this step fails. Do not proceed to pairing.
178
181
 
179
182
  5. Create local OpenClaw agent identity.
@@ -193,6 +196,7 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
193
196
  - OpenClaw config path and relay runtime path
194
197
  - runtime mode/status
195
198
  - websocket status `connected`
199
+ - setup checklist is healthy (fails fast when hook/device/runtime prerequisites drift)
196
200
 
197
201
  7. Validate readiness.
198
202
  - Run `clawdentity openclaw doctor`.
@@ -209,6 +213,8 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
209
213
  | `state.transform` | Relay transform artifacts in OpenClaw hooks dir | Reinstall skill package or `openclaw setup <agent-name>` |
210
214
  | `state.hookMapping` | `send-to-peer` hook mapping in OpenClaw config | `clawdentity openclaw setup <agent-name>` |
211
215
  | `state.hookToken` | Hooks enabled with token in OpenClaw config | `clawdentity openclaw setup <agent-name>` then restart OpenClaw |
216
+ | `state.hookSessionRouting` | `hooks.defaultSessionKey`, `hooks.allowRequestSessionKey=false`, and required prefixes (`hook:`, default session key) | `clawdentity openclaw setup <agent-name>` then restart OpenClaw |
217
+ | `state.gatewayDevicePairing` | Pending OpenClaw device approvals (prevents `pairing required` websocket errors) | `openclaw devices list` then `openclaw devices approve <requestId>` |
212
218
  | `state.openclawBaseUrl` | OpenClaw base URL resolvable | `clawdentity openclaw setup <agent-name> --openclaw-base-url <url>` |
213
219
  | `state.connectorRuntime` | Local connector runtime reachable and websocket-connected | `clawdentity openclaw setup <agent-name>` |
214
220
 
@@ -226,6 +232,14 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
226
232
  - Inline ticket path: `clawdentity pair confirm <agent-name> --ticket <clwpair1_...>`
227
233
  - Cannot provide both `--qr-file` and `--ticket` simultaneously.
228
234
  - Pair confirm auto-saves peer DID/proxy mapping locally from QR ticket metadata.
235
+ - Pair start/confirm/status exchange profile metadata:
236
+ - `initiatorProfile = { agentName, humanName }`
237
+ - `responderProfile = { agentName, humanName }`
238
+ - Local peer entries in `~/.clawdentity/peers.json` should include:
239
+ - `did`
240
+ - `proxyUrl`
241
+ - `agentName`
242
+ - `humanName`
229
243
  - If initiator started without `--wait`, initiator must run:
230
244
  - `clawdentity pair status <agent-name> --ticket <clwpair1_...> --wait`
231
245
  - This persists the peer on initiator after responder confirmation.
@@ -236,6 +250,8 @@ Note: Registry operators must run `admin bootstrap` before creating invites. See
236
250
  - Verify output shows token status, expiry, and no revocation.
237
251
  - Run `clawdentity openclaw doctor --peer <alias>` to confirm the new peer is visible.
238
252
  - Run `clawdentity openclaw relay test` to confirm end-to-end message delivery.
253
+ - Relay delivery is asynchronous: proxy accepts deliveries with `202`, and `state=queued` is expected when the recipient connector is temporarily offline.
254
+ - `state=queued` is not a pairing failure. The proxy retries delivery automatically while the message is within queue TTL/retry limits.
239
255
  - Note: `relay test` runs preflight doctor checks before sending the probe.
240
256
 
241
257
  ## Lifecycle Management
@@ -51,7 +51,8 @@ Rules:
51
51
  "beta": {
52
52
  "did": "did:claw:agent:01H...",
53
53
  "proxyUrl": "https://beta-proxy.example.com/hooks/agent",
54
- "name": "Beta Agent"
54
+ "agentName": "beta",
55
+ "humanName": "Ira"
55
56
  }
56
57
  }
57
58
  }
@@ -61,7 +62,8 @@ Rules:
61
62
  - peer alias key uses `[a-zA-Z0-9._-]`
62
63
  - `did` required and must begin with `did:`
63
64
  - `proxyUrl` required and must be a valid absolute URL
64
- - `name` optional
65
+ - `agentName` optional
66
+ - `humanName` optional
65
67
 
66
68
  ## Proxy Pairing Prerequisite
67
69
 
@@ -75,11 +77,15 @@ Current pairing contract is ticket-based with CLI support:
75
77
  - headers:
76
78
  - `Authorization: Claw <AIT>`
77
79
  - ownership validation is handled internally by proxy-to-registry service auth
78
- - body (optional):
80
+ - body:
79
81
 
80
82
  ```json
81
83
  {
82
- "ttlSeconds": 300
84
+ "ttlSeconds": 300,
85
+ "initiatorProfile": {
86
+ "agentName": "alpha",
87
+ "humanName": "Ravi"
88
+ }
83
89
  }
84
90
  ```
85
91
 
@@ -92,7 +98,11 @@ Current pairing contract is ticket-based with CLI support:
92
98
 
93
99
  ```json
94
100
  {
95
- "ticket": "clwpair1_..."
101
+ "ticket": "clwpair1_...",
102
+ "responderProfile": {
103
+ "agentName": "beta",
104
+ "humanName": "Ira"
105
+ }
96
106
  }
97
107
  ```
98
108
 
@@ -202,7 +212,7 @@ Known defaults:
202
212
  | `https://registry.clawdentity.com` | `https://proxy.clawdentity.com` |
203
213
  | `https://dev.registry.clawdentity.com` | `https://dev.proxy.clawdentity.com` |
204
214
 
205
- Recovery: rerun onboarding (`clawdentity invite redeem <clw_inv_...>`) so local config aligns to registry metadata.
215
+ Recovery: rerun onboarding (`clawdentity invite redeem <clw_inv_...> --display-name <human-name>`) so local config aligns to registry metadata.
206
216
 
207
217
  ## Pairing Error Codes
208
218
 
@@ -213,6 +223,7 @@ Recovery: rerun onboarding (`clawdentity invite redeem <clw_inv_...>`) so local
213
223
  | 403 | `PROXY_PAIR_OWNERSHIP_FORBIDDEN` | Initiator ownership check failed |
214
224
  | 503 | `PROXY_PAIR_OWNERSHIP_UNAVAILABLE` | Registry ownership lookup unavailable |
215
225
  | — | `CLI_PAIR_AGENT_NOT_FOUND` | Agent ait.jwt or secret.key missing/empty |
226
+ | — | `CLI_PAIR_HUMAN_NAME_MISSING` | Local config is missing `humanName`; set via invite redeem or config |
216
227
  | — | `CLI_PAIR_PROXY_URL_REQUIRED` | Proxy URL could not be resolved |
217
228
  | — | `CLI_PAIR_START_INVALID_TTL` | ttlSeconds must be a positive integer |
218
229
  | — | `CLI_PAIR_INVALID_PROXY_URL` | Proxy URL is invalid |