clawdentity 0.0.2 → 0.0.4
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/dist/bin.js +1222 -121
- package/dist/index.js +1220 -119
- package/dist/postinstall.js +0 -0
- package/package.json +19 -14
- package/skill-bundle/AGENTS.md +2 -1
- package/skill-bundle/openclaw-skill/skill/SKILL.md +24 -13
- package/skill-bundle/openclaw-skill/skill/references/clawdentity-protocol.md +20 -9
package/dist/postinstall.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawdentity",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,24 +21,29 @@
|
|
|
21
21
|
"postinstall.mjs",
|
|
22
22
|
"skill-bundle"
|
|
23
23
|
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"commander": "^13.1.0",
|
|
26
|
+
"jsqr": "^1.4.0",
|
|
27
|
+
"pngjs": "^7.0.0",
|
|
28
|
+
"qrcode": "^1.5.4",
|
|
29
|
+
"ws": "^8.19.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^22.18.11",
|
|
33
|
+
"@types/pngjs": "^6.0.5",
|
|
34
|
+
"@types/qrcode": "^1.5.6",
|
|
35
|
+
"@clawdentity/connector": "0.0.0",
|
|
36
|
+
"@clawdentity/protocol": "0.0.0",
|
|
37
|
+
"@clawdentity/sdk": "0.0.0"
|
|
38
|
+
},
|
|
24
39
|
"scripts": {
|
|
25
|
-
"build": "pnpm run sync:skill-bundle && tsup",
|
|
40
|
+
"build": "pnpm -F @clawdentity/openclaw-skill build && pnpm run sync:skill-bundle && pnpm run verify:skill-bundle && tsup",
|
|
26
41
|
"format": "biome format .",
|
|
27
42
|
"lint": "biome lint .",
|
|
28
|
-
"prepack": "pnpm run build",
|
|
29
43
|
"postinstall": "node ./postinstall.mjs",
|
|
30
44
|
"sync:skill-bundle": "node ./scripts/sync-skill-bundle.mjs",
|
|
45
|
+
"verify:skill-bundle": "node ./scripts/verify-skill-bundle.mjs",
|
|
31
46
|
"test": "vitest run",
|
|
32
47
|
"typecheck": "tsc --noEmit"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"commander": "^13.1.0",
|
|
36
|
-
"ws": "^8.19.0"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@clawdentity/connector": "workspace:*",
|
|
40
|
-
"@clawdentity/protocol": "workspace:*",
|
|
41
|
-
"@clawdentity/sdk": "workspace:*",
|
|
42
|
-
"@types/node": "^22.18.11"
|
|
43
48
|
}
|
|
44
|
-
}
|
|
49
|
+
}
|
package/skill-bundle/AGENTS.md
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
## Rules
|
|
7
7
|
- Treat this folder as generated release input; do not hand-edit bundled files.
|
|
8
|
-
-
|
|
8
|
+
- Keep `openclaw-skill/` generated-only and gitignored; commit only this `AGENTS.md`.
|
|
9
|
+
- Regenerate by running `pnpm -F @clawdentity/openclaw-skill build && pnpm -F clawdentity run sync:skill-bundle`.
|
|
9
10
|
- Required bundled files:
|
|
10
11
|
- `openclaw-skill/skill/SKILL.md`
|
|
11
12
|
- `openclaw-skill/skill/references/*`
|
|
@@ -61,7 +61,8 @@ Use these commands as the default execution path for skill utilization:
|
|
|
61
61
|
- Initialize local CLI config:
|
|
62
62
|
- `clawdentity config init`
|
|
63
63
|
- `clawdentity config init --registry-url <registry-url>` (supports first-run registry URL override)
|
|
64
|
-
- or set env before init: `
|
|
64
|
+
- or set env before init: `CLAWDENTITY_REGISTRY_URL=<registry-url>` (primary global override)
|
|
65
|
+
- compatible alias: `CLAWDENTITY_REGISTRY=<registry-url>`
|
|
65
66
|
- Configure registry URL and API key when missing:
|
|
66
67
|
- `clawdentity config set registryUrl <registry-url>`
|
|
67
68
|
- Complete registry onboarding when API key is missing:
|
|
@@ -82,27 +83,28 @@ Use these commands as the default execution path for skill utilization:
|
|
|
82
83
|
- `clawdentity openclaw doctor`
|
|
83
84
|
- `clawdentity openclaw relay test --peer <alias>`
|
|
84
85
|
|
|
85
|
-
Pairing bootstrap
|
|
86
|
+
Pairing bootstrap uses CLI commands in the current release:
|
|
86
87
|
|
|
87
88
|
- Owner/initiator starts pairing on initiator proxy:
|
|
88
|
-
- `
|
|
89
|
-
-
|
|
90
|
-
- Body: `{"agentDid":"<responder-agent-did>"}`
|
|
89
|
+
- `clawdentity pair start <initiator-agent-name> --proxy-url <initiator-proxy-url> --qr`
|
|
90
|
+
- Optionally pass explicit owner PAT: `--owner-pat <token>`
|
|
91
91
|
- Responder confirms on responder proxy:
|
|
92
|
-
- `
|
|
93
|
-
-
|
|
94
|
-
- Body: `{"pairingCode":"<code-from-start>"}`
|
|
92
|
+
- `clawdentity pair confirm <responder-agent-name> --qr-file <ticket-qr-file> --proxy-url <responder-proxy-url>`
|
|
93
|
+
- optional global proxy URL env fallback: `CLAWDENTITY_PROXY_URL=<proxy-url>`
|
|
95
94
|
|
|
96
95
|
Successful confirm establishes mutual trust for the two agent DIDs. After confirm, both directions are allowed for trusted delivery.
|
|
97
96
|
|
|
98
97
|
1. Confirm prerequisites with the human.
|
|
99
98
|
- Confirm `clawdentity` CLI is installed and runnable.
|
|
100
99
|
- Confirm local agent name.
|
|
101
|
-
- Confirm
|
|
102
|
-
-
|
|
100
|
+
- Confirm API key exists locally or registry onboarding invite code (`clw_inv_...`) is available.
|
|
101
|
+
- Confirm OpenClaw peer relay invite code (`clawd1_...`) is available for setup.
|
|
102
|
+
- Do not request API key and registry invite code in the same prompt.
|
|
103
|
+
- Do not request registry invite code and peer relay invite code in the same prompt.
|
|
103
104
|
- Only ask for API key when neither local API key nor registry onboarding invite code is available.
|
|
104
105
|
- Confirm OpenClaw state directory path if non-default.
|
|
105
106
|
- Confirm OpenClaw base URL if local endpoint is non-default.
|
|
107
|
+
- Confirm each side proxy URL for pairing command execution.
|
|
106
108
|
|
|
107
109
|
2. Confirm skill artifact exists in workspace skills directory.
|
|
108
110
|
- Ensure `~/.openclaw/workspace/skills/clawdentity-openclaw-relay/relay-to-peer.mjs` exists.
|
|
@@ -131,6 +133,11 @@ Successful confirm establishes mutual trust for the two agent DIDs. After confir
|
|
|
131
133
|
- Use `--openclaw-dir <path>` when state directory is non-default.
|
|
132
134
|
- Use `--openclaw-base-url <url>` when local OpenClaw HTTP endpoint is non-default.
|
|
133
135
|
- Use `--peer-alias <alias>` only when alias override is required.
|
|
136
|
+
- Optional relay echo tuning:
|
|
137
|
+
- `--echo-enabled <true|false>`
|
|
138
|
+
- `--echo-channel <channel>`
|
|
139
|
+
- `--echo-to <target>`
|
|
140
|
+
- `--echo-max-length <number>`
|
|
134
141
|
|
|
135
142
|
7. Verify setup outputs.
|
|
136
143
|
- Confirm setup reports:
|
|
@@ -139,6 +146,7 @@ Successful confirm establishes mutual trust for the two agent DIDs. After confir
|
|
|
139
146
|
- updated OpenClaw config path
|
|
140
147
|
- installed transform path
|
|
141
148
|
- OpenClaw base URL
|
|
149
|
+
- relay echo config (enabled/channel/target/max length)
|
|
142
150
|
- relay runtime config path
|
|
143
151
|
- Confirm `~/.clawdentity/openclaw-agent-name` is set to the local agent name.
|
|
144
152
|
|
|
@@ -147,9 +155,11 @@ Successful confirm establishes mutual trust for the two agent DIDs. After confir
|
|
|
147
155
|
- Optional: run `clawdentity connector service install <agent-name>` for persistent autostart.
|
|
148
156
|
|
|
149
157
|
9. Complete trust pairing bootstrap.
|
|
150
|
-
- Run pairing start
|
|
151
|
-
-
|
|
152
|
-
-
|
|
158
|
+
- Run pairing start from owner/initiator side:
|
|
159
|
+
- `clawdentity pair start <initiator-agent-name> --proxy-url <initiator-proxy-url> --qr`
|
|
160
|
+
- Share the one-time QR image with responder side.
|
|
161
|
+
- Run pairing confirm from responder side:
|
|
162
|
+
- `clawdentity pair confirm <responder-agent-name> --qr-file <ticket-qr-file> --proxy-url <responder-proxy-url>`
|
|
153
163
|
- Confirm pairing success before relay test.
|
|
154
164
|
|
|
155
165
|
10. Validate with user-style relay test.
|
|
@@ -165,6 +175,7 @@ Ask the human only when required inputs are missing:
|
|
|
165
175
|
- Missing peer relay invite code (`clawd1_...`).
|
|
166
176
|
- Missing registry onboarding invite code (`clw_inv_...`) when API key is absent.
|
|
167
177
|
- Missing Clawdentity API key only when registry onboarding invite code is unavailable.
|
|
178
|
+
- Missing initiator/responder proxy URLs for pairing commands.
|
|
168
179
|
- Unclear OpenClaw state directory.
|
|
169
180
|
- Non-default OpenClaw base URL.
|
|
170
181
|
- Local connector runtime or peer network route is unknown or unreachable from agent runtime.
|
|
@@ -67,35 +67,37 @@ Rules:
|
|
|
67
67
|
|
|
68
68
|
Relay delivery policy is trust-pair based on proxy side. Pairing must be completed before first cross-agent delivery.
|
|
69
69
|
|
|
70
|
-
Current pairing contract is
|
|
70
|
+
Current pairing contract is ticket-based with CLI support:
|
|
71
71
|
|
|
72
72
|
1. Initiator owner starts pairing:
|
|
73
|
-
- `
|
|
73
|
+
- CLI: `clawdentity pair start <agent-name> --proxy-url <url> --qr`
|
|
74
|
+
- proxy route: `POST /pair/start`
|
|
74
75
|
- headers:
|
|
75
76
|
- `Authorization: Claw <AIT>`
|
|
76
77
|
- `x-claw-owner-pat: <owner-pat>`
|
|
77
|
-
- body:
|
|
78
|
+
- body (optional):
|
|
78
79
|
|
|
79
80
|
```json
|
|
80
81
|
{
|
|
81
|
-
"
|
|
82
|
+
"ttlSeconds": 300
|
|
82
83
|
}
|
|
83
84
|
```
|
|
84
85
|
|
|
85
86
|
2. Responder confirms pairing:
|
|
86
|
-
- `
|
|
87
|
+
- CLI: `clawdentity pair confirm <agent-name> --qr-file <path> --proxy-url <url>`
|
|
88
|
+
- proxy route: `POST /pair/confirm`
|
|
87
89
|
- headers:
|
|
88
90
|
- `Authorization: Claw <AIT>`
|
|
89
91
|
- body:
|
|
90
92
|
|
|
91
93
|
```json
|
|
92
94
|
{
|
|
93
|
-
"
|
|
95
|
+
"ticket": "clwpair1_..."
|
|
94
96
|
}
|
|
95
97
|
```
|
|
96
98
|
|
|
97
99
|
Rules:
|
|
98
|
-
- `
|
|
100
|
+
- `ticket` is one-time and expires (default 5 minutes, max 15 minutes).
|
|
99
101
|
- Confirm establishes mutual trust for the initiator/responder pair.
|
|
100
102
|
- Same-agent sender/recipient is allowed by policy without explicit pair entry.
|
|
101
103
|
|
|
@@ -122,19 +124,28 @@ Relay resolves local agent name in this order:
|
|
|
122
124
|
|
|
123
125
|
## Local OpenClaw Base URL Contract
|
|
124
126
|
|
|
125
|
-
`~/.clawdentity/openclaw-relay.json` stores
|
|
127
|
+
`~/.clawdentity/openclaw-relay.json` stores OpenClaw runtime defaults for relay components:
|
|
126
128
|
|
|
127
129
|
```json
|
|
128
130
|
{
|
|
129
131
|
"openclawBaseUrl": "http://127.0.0.1:18789",
|
|
132
|
+
"echo": {
|
|
133
|
+
"enabled": true,
|
|
134
|
+
"channel": "last",
|
|
135
|
+
"maxLength": 500
|
|
136
|
+
},
|
|
130
137
|
"updatedAt": "2026-02-15T20:00:00.000Z"
|
|
131
138
|
}
|
|
132
139
|
```
|
|
133
140
|
|
|
134
141
|
Rules:
|
|
135
142
|
- `openclawBaseUrl` must be absolute `http` or `https`.
|
|
143
|
+
- `echo.enabled` defaults to `true`.
|
|
144
|
+
- `echo.channel` defaults to `last`.
|
|
145
|
+
- `echo.to` is optional; when omitted OpenClaw uses last-route delivery target.
|
|
146
|
+
- `echo.maxLength` must be an integer from `50` to `2000` (default `500`).
|
|
136
147
|
- `updatedAt` is ISO-8601 UTC timestamp.
|
|
137
|
-
-
|
|
148
|
+
- OpenClaw base URL precedence for local runtimes is: `OPENCLAW_BASE_URL` env first, then `openclaw-relay.json`, then built-in default.
|
|
138
149
|
|
|
139
150
|
## Connector Handoff Contract
|
|
140
151
|
|