clawdentity 0.0.7 → 0.0.9

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.7",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -10,7 +10,7 @@ This skill prepares a local OpenClaw agent in a strict sequence:
10
10
  1. finish registry onboarding and generate/store API key
11
11
  2. create local agent identity
12
12
  3. configure relay runtime
13
- 4. become ready to start or accept pairing
13
+ 4. become ready to start or accept QR pairing
14
14
 
15
15
  Relay invite codes are not part of this flow.
16
16
 
@@ -46,21 +46,14 @@ Required for onboarding:
46
46
  - Registry onboarding invite code: `clw_inv_...` (or existing local API key)
47
47
  - Local agent name
48
48
 
49
- Required for relay setup (after onboarding + agent create):
50
- - Peer alias
51
- - Peer DID
52
- - Peer proxy URL (`.../hooks/agent`)
53
- - Optional peer display name
54
-
55
49
  Required for pairing phase (after setup):
56
- - Initiator proxy URL
57
- - Responder proxy URL
50
+ - Pairing QR from the other side (`clwpair1_...` inside QR image)
58
51
 
59
52
  ## Tool Execution Contract (Agent)
60
53
 
61
54
  - Execute side effects directly with tools/CLI.
62
55
  - Do not ask humans to run commands that the agent can run.
63
- - Ask humans only for missing secrets or missing peer/proxy inputs.
56
+ - Ask humans only for missing secrets or missing required command inputs.
64
57
  - Keep status output concrete: created agent DID, generated API key status, written files.
65
58
 
66
59
  ## Command Utilization (required)
@@ -73,18 +66,23 @@ Required for pairing phase (after setup):
73
66
  - `clawdentity config set apiKey <api-key>` (fallback only when invite is unavailable)
74
67
  - `clawdentity agent create <agent-name> --framework openclaw`
75
68
  - `clawdentity agent inspect <agent-name>`
76
- - `clawdentity openclaw setup <agent-name> --peer-alias <alias> --peer-did <did> --peer-proxy-url <url>`
69
+ - `clawdentity openclaw setup <agent-name>`
77
70
  - `clawdentity connector start <agent-name>`
78
71
  - `clawdentity connector service install <agent-name>` (optional)
79
72
  - `clawdentity openclaw doctor`
80
- - `clawdentity openclaw relay test --peer <alias>`
81
- - `clawdentity pair start <agent-name> --proxy-url <initiator-proxy-url> --qr`
82
- - `clawdentity pair confirm <agent-name> --qr-file <path> --proxy-url <responder-proxy-url>`
73
+ - `clawdentity openclaw relay test` (auto-selects when one peer exists)
74
+ - `clawdentity pair start <agent-name> --qr`
75
+ - `clawdentity pair confirm <agent-name> --qr-file <path>`
83
76
 
84
77
  ## Journey (strict order)
85
78
 
86
79
  1. Validate prerequisites.
87
80
  - Confirm CLI is installed.
81
+ - Confirm CLI setup command is self-setup only:
82
+ - `clawdentity openclaw setup --help` must not include peer routing flags.
83
+ - it must **not** include `--invite-code`.
84
+ - If `--invite-code` appears, treat CLI as outdated and upgrade before continuing:
85
+ - `npm install -g clawdentity@latest`
88
86
  - Confirm local agent name.
89
87
  - Confirm either existing API key or `clw_inv_...`.
90
88
  - Confirm OpenClaw path/base URL only if non-default.
@@ -113,12 +111,11 @@ Required for pairing phase (after setup):
113
111
 
114
112
  6. Configure relay setup.
115
113
  - Run:
116
- `clawdentity openclaw setup <agent-name> --peer-alias <alias> --peer-did <did> --peer-proxy-url <url>`
114
+ `clawdentity openclaw setup <agent-name>`
117
115
  - Add optional:
118
- - `--peer-name <displayName>`
119
116
  - `--openclaw-dir <path>`
120
117
  - `--openclaw-base-url <url>`
121
- - Verify output contains peer alias, peer DID, peer proxy URL, OpenClaw config path, and relay runtime path.
118
+ - Verify output contains self-setup completion, OpenClaw config path, and relay runtime path.
122
119
 
123
120
  7. Start connector runtime.
124
121
  - Run `clawdentity connector start <agent-name>`.
@@ -126,24 +123,24 @@ Required for pairing phase (after setup):
126
123
 
127
124
  8. Validate readiness.
128
125
  - Run `clawdentity openclaw doctor`.
129
- - Run `clawdentity openclaw relay test --peer <alias>`.
130
126
  - At this point the agent is ready to start pairing or accept pairing.
131
127
 
132
128
  9. Pairing phase (separate from onboarding).
133
- - Initiator: `clawdentity pair start <agent-name> --proxy-url <initiator-proxy-url> --qr`
134
- - Responder: `clawdentity pair confirm <agent-name> --qr-file <path> --proxy-url <responder-proxy-url>`
135
- - Confirm pairing success before first real peer message.
129
+ - Initiator: `clawdentity pair start <agent-name> --qr`
130
+ - Responder: `clawdentity pair confirm <agent-name> --qr-file <path>`
131
+ - Pair confirm auto-saves peer DID/proxy mapping locally from QR ticket metadata.
132
+ - Confirm pairing success, then run `clawdentity openclaw relay test`.
136
133
 
137
134
  ## Required Question Policy
138
135
 
139
136
  Ask only when missing:
140
137
  - local agent name
141
138
  - onboarding invite (`clw_inv_...`) when API key is absent
142
- - peer alias/DID/proxy URL for setup
143
- - initiator/responder proxy URLs for pairing
144
139
  - non-default OpenClaw path/base URL
140
+ - pairing QR image path for confirm
145
141
 
146
142
  Do not ask for relay invite codes.
143
+ Do not ask for `clawd1_...` values.
147
144
 
148
145
  ## Failure Handling
149
146
 
@@ -28,17 +28,11 @@ Define the exact runtime contract used by `relay-to-peer.mjs`.
28
28
 
29
29
  ## Setup Input Contract
30
30
 
31
- `clawdentity openclaw setup` is configured with explicit peer routing fields:
32
-
33
- - `--peer-alias <alias>`
34
- - `--peer-did <did:claw:agent:...>`
35
- - `--peer-proxy-url <http(s)://.../hooks/agent>`
36
- - optional `--peer-name <display-name>`
31
+ `clawdentity openclaw setup` is self-setup only. It does not accept peer routing fields.
37
32
 
38
33
  Rules:
39
- - peer alias uses `[a-zA-Z0-9._-]`
40
- - peer DID must be a valid agent DID
41
- - peer proxy URL must be absolute `http` or `https`
34
+ - setup must succeed without any peer metadata
35
+ - peers config snapshot still exists and may be empty until pairing is completed
42
36
 
43
37
  ## Peer Map Schema
44
38
 
@@ -69,7 +63,7 @@ Relay delivery policy is trust-pair based on proxy side. Pairing must be complet
69
63
  Current pairing contract is ticket-based with CLI support:
70
64
 
71
65
  1. Initiator owner starts pairing:
72
- - CLI: `clawdentity pair start <agent-name> --proxy-url <url> --qr`
66
+ - CLI: `clawdentity pair start <agent-name> --qr`
73
67
  - proxy route: `POST /pair/start`
74
68
  - headers:
75
69
  - `Authorization: Claw <AIT>`
@@ -83,7 +77,7 @@ Current pairing contract is ticket-based with CLI support:
83
77
  ```
84
78
 
85
79
  2. Responder confirms pairing:
86
- - CLI: `clawdentity pair confirm <agent-name> --qr-file <path> --proxy-url <url>`
80
+ - CLI: `clawdentity pair confirm <agent-name> --qr-file <path>`
87
81
  - proxy route: `POST /pair/confirm`
88
82
  - headers:
89
83
  - `Authorization: Claw <AIT>`
@@ -98,6 +92,7 @@ Current pairing contract is ticket-based with CLI support:
98
92
  Rules:
99
93
  - `ticket` is one-time and expires (default 5 minutes, max 15 minutes).
100
94
  - Confirm establishes mutual trust for the initiator/responder pair.
95
+ - Confirm auto-persists peer DID/proxy mapping locally in `~/.clawdentity/peers.json` using ticket issuer metadata.
101
96
  - Same-agent sender/recipient is allowed by policy without explicit pair entry.
102
97
 
103
98
  ## Relay Input Contract