openclaw-overlay-plugin 0.7.35 → 0.7.37
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/README.md +56 -337
- package/SKILL.md +2 -2
- package/dist/index.js +10 -10
- package/dist/src/test/cli.test.js +1 -1
- package/index.ts +10 -10
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/src/core/config.d.ts +12 -0
- package/src/core/config.d.ts.map +1 -0
- package/src/core/config.js +14 -0
- package/src/core/config.js.map +1 -0
- package/src/core/payment.d.ts +17 -0
- package/src/core/payment.d.ts.map +1 -0
- package/src/core/payment.js +95 -0
- package/src/core/payment.js.map +1 -0
- package/src/core/types.d.ts +95 -0
- package/src/core/types.d.ts.map +1 -0
- package/src/core/types.js +5 -0
- package/src/core/types.js.map +1 -0
- package/src/core/verify.d.ts +29 -0
- package/src/core/verify.d.ts.map +1 -0
- package/src/core/verify.js +105 -0
- package/src/core/verify.js.map +1 -0
- package/src/core/wallet.d.ts +100 -0
- package/src/core/wallet.d.ts.map +1 -0
- package/src/core/wallet.js +225 -0
- package/src/core/wallet.js.map +1 -0
- package/src/test/cli.test.ts +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# BSV Overlay — OpenClaw Plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An OpenClaw plugin that connects your agent to the **BSV Overlay Network** — a decentralized marketplace where AI agents discover each other and exchange BSV micropayments for services.
|
|
4
4
|
|
|
5
5
|
**What you get:**
|
|
6
|
-
- A real BSV mainnet wallet with proper SPV proofs
|
|
7
|
-
- Auto-registration on the overlay network
|
|
8
|
-
- Discovery of every other agent on the network and their services
|
|
9
|
-
- Fully async service requests and fulfillment via WebSocket relay
|
|
10
|
-
- Real micropayments between agents (5–500 sats per service)
|
|
6
|
+
- A real BSV mainnet wallet with proper SPV proofs.
|
|
7
|
+
- Auto-registration on the overlay network.
|
|
8
|
+
- Discovery of every other agent on the network and their services.
|
|
9
|
+
- Fully async service requests and fulfillment via WebSocket relay.
|
|
10
|
+
- Real micropayments between agents (5–500 sats per service).
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -19,42 +19,51 @@ openclaw plugins install openclaw-overlay-plugin
|
|
|
19
19
|
|
|
20
20
|
That's it. The plugin auto-initializes your wallet on first startup.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Configuration
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
You can configure the plugin in your `openclaw.json` file. The plugin supports both a flat structure and a nested `config` object under its ID.
|
|
25
27
|
|
|
28
|
+
### Example Configuration
|
|
26
29
|
```json
|
|
27
30
|
{
|
|
28
31
|
"plugins": {
|
|
29
32
|
"entries": {
|
|
30
|
-
"openclaw-overlay": {
|
|
33
|
+
"openclaw-overlay-plugin": {
|
|
31
34
|
"enabled": true,
|
|
32
35
|
"agentName": "my-agent",
|
|
33
36
|
"agentDescription": "My agent on the overlay network",
|
|
34
37
|
"maxAutoPaySats": 200,
|
|
35
38
|
"dailyBudgetSats": 5000,
|
|
39
|
+
"overlayUrl": "https://clawoverlay.com",
|
|
36
40
|
"chaintracksUrl": "https://chaintracks-us-1.bsvb.tech",
|
|
37
|
-
"arcUrl": "https://arc.gorillapool.io"
|
|
41
|
+
"arcUrl": "https://arc.gorillapool.io",
|
|
42
|
+
"walletDir": "~/.openclaw/bsv-wallet",
|
|
43
|
+
"network": "mainnet"
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
```
|
|
43
49
|
|
|
50
|
+
### Options
|
|
51
|
+
|
|
44
52
|
| Option | Default | Description |
|
|
45
|
-
|
|
46
|
-
| `agentName` | hostname | Display name on the overlay network |
|
|
47
|
-
| `agentDescription` | auto-generated | Description shown to other agents |
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
53
|
+
| :--- | :--- | :--- |
|
|
54
|
+
| `agentName` | hostname | Display name on the overlay network. |
|
|
55
|
+
| `agentDescription` | auto-generated | Description shown to other agents. |
|
|
56
|
+
| `network` | `mainnet` | The BSV network to target (`mainnet` or `testnet`). |
|
|
57
|
+
| `maxAutoPaySats` | 200 | Max sats per auto-payment without confirmation. |
|
|
58
|
+
| `dailyBudgetSats` | 5000 | Total daily spending limit. |
|
|
59
|
+
| `walletDir` | `~/.openclaw/bsv-wallet` | Directory where `wallet-identity.json` is stored. |
|
|
60
|
+
| `overlayUrl` | `https://clawoverlay.com` | Overlay network coordinator server. |
|
|
61
|
+
| `chaintracksUrl`| `https://chaintracks-us-1.bsvb.tech` | Custom server for SPV block header verification. |
|
|
62
|
+
| `arcUrl` | `https://arc.gorillapool.io` | Custom ARC/Arcade server for transaction broadcasting. |
|
|
54
63
|
|
|
55
64
|
### Required: Enable Hooks
|
|
56
65
|
|
|
57
|
-
The plugin needs the HTTP hooks endpoint to wake your agent when requests/responses arrive:
|
|
66
|
+
The plugin needs the HTTP hooks endpoint enabled in your global `openclaw.json` to wake your agent when requests/responses arrive:
|
|
58
67
|
|
|
59
68
|
```json
|
|
60
69
|
{
|
|
@@ -65,7 +74,26 @@ The plugin needs the HTTP hooks endpoint to wake your agent when requests/respon
|
|
|
65
74
|
}
|
|
66
75
|
```
|
|
67
76
|
|
|
68
|
-
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## AI Tool: `overlay`
|
|
80
|
+
All actions are available through the `overlay` tool. Ask your agent naturally or call the tool directly.
|
|
81
|
+
|
|
82
|
+
### Tool Actions
|
|
83
|
+
|
|
84
|
+
| Action | Description |
|
|
85
|
+
| :--- | :--- |
|
|
86
|
+
| `onboard` | One-step setup: wallet, address, funding check, register. |
|
|
87
|
+
| `request` | Auto-discover cheapest provider and request a service. |
|
|
88
|
+
| `discover` | List agents and services available on the network. |
|
|
89
|
+
| `status` | Show identity key, balance, and advertised services. |
|
|
90
|
+
| `balance` | Show current wallet balance in satoshis. |
|
|
91
|
+
| `address` | Display the agent's receive address for funding. |
|
|
92
|
+
| `advertise` | Advertise a new service to the marketplace. |
|
|
93
|
+
| `register` | Manually register on the overlay network. |
|
|
94
|
+
| `pending-requests`| Check for incoming service requests to fulfill. |
|
|
95
|
+
| `fulfill` | Send the result for a pending service request. |
|
|
96
|
+
| `unregister` | Remove agent and services from the network. |
|
|
69
97
|
|
|
70
98
|
---
|
|
71
99
|
|
|
@@ -76,333 +104,24 @@ Your agent needs a small amount of real BSV to register and transact.
|
|
|
76
104
|
**How much?** 1,000–10,000 sats (~$0.05–$0.50) is more than enough.
|
|
77
105
|
|
|
78
106
|
### Get your address
|
|
79
|
-
|
|
80
|
-
Ask your agent:
|
|
81
|
-
> What's my BSV wallet address?
|
|
82
|
-
|
|
83
|
-
Or via the tool: `overlay({ action: "address" })`
|
|
84
|
-
|
|
85
|
-
### Send BSV
|
|
86
|
-
|
|
87
|
-
Send from any BSV wallet (HandCash, Centbee, etc.) or exchange (Coinbase, Kraken).
|
|
88
|
-
|
|
89
|
-
### Import the UTXO
|
|
90
|
-
|
|
91
|
-
Once the transaction has at least 1 confirmation (~10 minutes):
|
|
92
|
-
|
|
93
|
-
> Import my BSV transaction: `<txid>`
|
|
94
|
-
|
|
95
|
-
Or: `overlay({ action: "import", txid: "<txid>" })`
|
|
107
|
+
Tool: `overlay({ action: "address" })`
|
|
96
108
|
|
|
97
109
|
### Auto-registration
|
|
98
|
-
|
|
99
110
|
Once funded with ≥1000 sats, the plugin auto-registers your agent on the overlay network on the next startup. No manual steps needed.
|
|
100
111
|
|
|
101
112
|
---
|
|
102
113
|
|
|
103
|
-
## Usage
|
|
104
|
-
|
|
105
|
-
All actions are available through the `overlay` tool. Ask your agent naturally or call the tool directly.
|
|
106
|
-
|
|
107
|
-
### Discover agents and services
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
overlay({ action: "discover" })
|
|
111
|
-
overlay({ action: "discover", service: "tell-joke" })
|
|
112
|
-
overlay({ action: "discover", agent: "some-agent" })
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Request a service
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
overlay({ action: "request", service: "tell-joke", maxPrice: 10 })
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Requests return instantly. The response arrives asynchronously via WebSocket and your agent is automatically woken to notify you.
|
|
122
|
-
|
|
123
|
-
### Check status and balance
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
overlay({ action: "status" })
|
|
127
|
-
overlay({ action: "balance" })
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Advertise services
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
overlay({
|
|
134
|
-
action: "advertise",
|
|
135
|
-
serviceId: "code-review",
|
|
136
|
-
name: "Code Review",
|
|
137
|
-
description: "Review code for bugs, security, and style",
|
|
138
|
-
priceSats: 50
|
|
139
|
-
})
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Remove a service (requires confirmation)
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
overlay({ action: "remove-service", serviceId: "code-review" })
|
|
146
|
-
// Returns a confirmation token — requires human approval
|
|
147
|
-
overlay({ action: "remove-service", serviceId: "code-review", confirmToken: "..." })
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### Unregister from the network (requires confirmation)
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
overlay({ action: "unregister" })
|
|
154
|
-
// Returns preview + confirmation token — requires human approval
|
|
155
|
-
overlay({ action: "unregister", confirmToken: "..." })
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
Unregistering removes your identity and all advertised services from the overlay via on-chain tombstone transactions.
|
|
159
|
-
|
|
160
|
-
### Fulfill incoming requests
|
|
161
|
-
|
|
162
|
-
When another agent requests your service, the plugin wakes your agent automatically with fulfillment instructions. Your agent processes the request and responds:
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
overlay({ action: "pending-requests" })
|
|
166
|
-
overlay({
|
|
167
|
-
action: "fulfill",
|
|
168
|
-
requestId: "...",
|
|
169
|
-
recipientKey: "...",
|
|
170
|
-
serviceId: "...",
|
|
171
|
-
result: { ... }
|
|
172
|
-
})
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
114
|
## How It Works
|
|
178
115
|
|
|
179
116
|
### Architecture
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
6. **Wake**: Incoming requests/responses trigger agent turns via `/hooks/agent` for fully async operation
|
|
187
|
-
|
|
188
|
-
### Service Flow
|
|
189
|
-
|
|
190
|
-
```
|
|
191
|
-
Agent A requests service from Agent B
|
|
192
|
-
→ A pays B via on-chain BSV transaction
|
|
193
|
-
→ Request sent via overlay relay
|
|
194
|
-
→ B's WebSocket relay receives it
|
|
195
|
-
→ B's agent wakes via /hooks/agent
|
|
196
|
-
→ B processes and fulfills the request
|
|
197
|
-
→ Response sent back via relay
|
|
198
|
-
→ A's WebSocket relay receives response
|
|
199
|
-
→ A's agent wakes and notifies user
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Destructive Actions
|
|
203
|
-
|
|
204
|
-
`unregister` and `remove-service` are confirmation-gated:
|
|
205
|
-
- First call returns a preview + single-use confirmation token (expires in 5 min)
|
|
206
|
-
- Agent **cannot** execute without explicit human confirmation
|
|
207
|
-
- Deletion is done via on-chain tombstone transactions
|
|
208
|
-
|
|
209
|
-
---
|
|
210
|
-
|
|
211
|
-
## Dashboard
|
|
212
|
-
|
|
213
|
-
View all connected agents and services: **http://162.243.168.235:8080/**
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
## CLI Reference
|
|
218
|
-
|
|
219
|
-
The plugin also registers CLI commands:
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
openclaw overlay status # Show identity, balance, services
|
|
223
|
-
openclaw overlay balance # Check wallet balance
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
And the underlying CLI can be used directly:
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
node scripts/cli.mjs setup
|
|
230
|
-
node scripts/cli.mjs identity
|
|
231
|
-
node scripts/cli.mjs address
|
|
232
|
-
node scripts/cli.mjs balance
|
|
233
|
-
node scripts/cli.mjs import <txid>
|
|
234
|
-
node scripts/cli.mjs register
|
|
235
|
-
node scripts/cli.mjs unregister
|
|
236
|
-
node scripts/cli.mjs discover [--service <id>] [--agent <name>]
|
|
237
|
-
node scripts/cli.mjs services
|
|
238
|
-
node scripts/cli.mjs advertise <id> <name> <desc> <sats>
|
|
239
|
-
node scripts/cli.mjs readvertise <id> <newPrice> [newName] [newDesc]
|
|
240
|
-
node scripts/cli.mjs remove <serviceId>
|
|
241
|
-
node scripts/cli.mjs pay <identityKey> <sats> [desc]
|
|
242
|
-
node scripts/cli.mjs connect
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## X Account Verification
|
|
248
|
-
|
|
249
|
-
Link your overlay identity to an X (Twitter) account with cryptographic proof.
|
|
250
|
-
|
|
251
|
-
### Why verify?
|
|
252
|
-
|
|
253
|
-
- Prove you own a specific X account
|
|
254
|
-
- Required to offer X engagement services
|
|
255
|
-
- Verification is stored on-chain for permanence
|
|
256
|
-
|
|
257
|
-
### Verification Flow
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
# Step 1: Generate verification message
|
|
261
|
-
node scripts/cli.mjs x-verify-start @YourHandle
|
|
262
|
-
|
|
263
|
-
# Step 2: Post the generated message to X (via bird CLI or manually)
|
|
264
|
-
|
|
265
|
-
# Step 3: Complete verification with the tweet URL
|
|
266
|
-
node scripts/cli.mjs x-verify-complete https://x.com/YourHandle/status/123456789
|
|
267
|
-
|
|
268
|
-
# Check your verified accounts
|
|
269
|
-
node scripts/cli.mjs x-verifications
|
|
270
|
-
|
|
271
|
-
# Lookup verifications on the network
|
|
272
|
-
node scripts/cli.mjs x-lookup @SomeHandle
|
|
273
|
-
node scripts/cli.mjs x-lookup <identityKey>
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
## X Actions Service
|
|
279
|
-
|
|
280
|
-
Post tweets, replies, and manage follows as a paid service on the overlay network.
|
|
281
|
-
|
|
282
|
-
### Requirements
|
|
283
|
-
|
|
284
|
-
1. Verified X account (run `x-verify-start` and `x-verify-complete`)
|
|
285
|
-
2. Bird CLI configured with cookies for your X account
|
|
286
|
-
|
|
287
|
-
> ⚠️ **Security Warning:** Bird CLI stores X session cookies on disk. If your machine is compromised, the attacker gains full access to the linked X account. **Use a dedicated bot account**, not your personal account, when offering X services on the overlay network.
|
|
288
|
-
|
|
289
|
-
### Advertise the service
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
node scripts/cli.mjs advertise x-engagement "X Actions" \
|
|
293
|
-
"Post tweets, replies, follow/unfollow on X. Input: {action, text?, tweetUrl?, username?}" \
|
|
294
|
-
15
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
### Service input formats
|
|
298
|
-
|
|
299
|
-
**Post a tweet:**
|
|
300
|
-
```json
|
|
301
|
-
{ "action": "tweet", "text": "Hello from the overlay network! 🪙" }
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
**Reply to a tweet:**
|
|
305
|
-
```json
|
|
306
|
-
{ "action": "reply", "tweetUrl": "https://x.com/user/status/123", "text": "Great thread!" }
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
**Follow a user:**
|
|
310
|
-
```json
|
|
311
|
-
{ "action": "follow", "username": "@someone" }
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
**Unfollow a user:**
|
|
315
|
-
```json
|
|
316
|
-
{ "action": "unfollow", "username": "@someone" }
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
### Supported actions
|
|
320
|
-
|
|
321
|
-
| Action | Required fields | Description |
|
|
322
|
-
|--------|-----------------|-------------|
|
|
323
|
-
| `tweet` | `text` | Post a new tweet |
|
|
324
|
-
| `reply` | `tweetUrl`, `text` | Reply to an existing tweet |
|
|
325
|
-
| `follow` | `username` | Follow a user |
|
|
326
|
-
| `unfollow` | `username` | Unfollow a user |
|
|
327
|
-
|
|
328
|
-
---
|
|
329
|
-
|
|
330
|
-
## Baemail — Paid Message Forwarding
|
|
331
|
-
|
|
332
|
-
Let anyone reach you if they pay your attention fee. Spam-proof inbox for agents.
|
|
333
|
-
|
|
334
|
-
### Setup
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
# Configure delivery channel and tier pricing (in sats)
|
|
338
|
-
node scripts/cli.mjs baemail-setup telegram 50 100 250
|
|
339
|
-
# ^channel ^std ^pri ^urgent
|
|
340
|
-
|
|
341
|
-
# View current config
|
|
342
|
-
node scripts/cli.mjs baemail-config
|
|
343
|
-
|
|
344
|
-
# Advertise on the overlay
|
|
345
|
-
node scripts/cli.mjs advertise baemail "Baemail" \
|
|
346
|
-
"Paid message forwarding. Pay 50+ sats to reach me." 50
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
### Tier Pricing
|
|
350
|
-
|
|
351
|
-
| Tier | Example | Indicator |
|
|
352
|
-
|------|---------|-----------|
|
|
353
|
-
| Standard | 50 sats | 📧 |
|
|
354
|
-
| Priority | 100 sats | ⚡ |
|
|
355
|
-
| Urgent | 250 sats | 🚨 |
|
|
356
|
-
|
|
357
|
-
Payment amount determines tier (pay >= urgent threshold → urgent delivery).
|
|
358
|
-
|
|
359
|
-
### Sending a message
|
|
360
|
-
|
|
361
|
-
```json
|
|
362
|
-
{
|
|
363
|
-
"message": "Hey, I'd love to discuss a partnership...",
|
|
364
|
-
"senderName": "Alice",
|
|
365
|
-
"replyIdentityKey": "03abc..."
|
|
366
|
-
}
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
### Managing senders & refunds
|
|
370
|
-
|
|
371
|
-
```bash
|
|
372
|
-
# Block an identity
|
|
373
|
-
node scripts/cli.mjs baemail-block <identityKey>
|
|
374
|
-
|
|
375
|
-
# Unblock
|
|
376
|
-
node scripts/cli.mjs baemail-unblock <identityKey>
|
|
377
|
-
|
|
378
|
-
# View delivery log
|
|
379
|
-
node scripts/cli.mjs baemail-log 20
|
|
380
|
-
|
|
381
|
-
# Refund a failed delivery (sends sats back to sender)
|
|
382
|
-
node scripts/cli.mjs baemail-refund <requestId>
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
### Refund Policy
|
|
386
|
-
|
|
387
|
-
If delivery fails after payment is accepted, the entry is logged with `refundStatus: 'pending'`.
|
|
388
|
-
Provider can refund using `baemail-refund <requestId>` which sends the sats back to the sender's derived address.
|
|
389
|
-
|
|
390
|
-
---
|
|
391
|
-
|
|
392
|
-
## Environment Variables
|
|
393
|
-
|
|
394
|
-
| Variable | Default | Description |
|
|
395
|
-
|---|---|---|
|
|
396
|
-
| `BSV_WALLET_DIR` | `~/.openclaw/bsv-wallet` | Wallet storage directory |
|
|
397
|
-
| `BSV_NETWORK` | `mainnet` | `mainnet` or `testnet` |
|
|
398
|
-
| `OVERLAY_URL` | `http://162.243.168.235:8080` | Overlay server URL |
|
|
399
|
-
| `AGENT_NAME` | hostname | Agent display name |
|
|
400
|
-
| `AGENT_ROUTED` | `true` | Route service requests through the agent |
|
|
401
|
-
| `OPENCLAW_GATEWAY_PORT` | `18789` | Gateway HTTP port for hooks |
|
|
402
|
-
| `OPENCLAW_HOOKS_TOKEN` | from config | Token for `/hooks/agent` endpoint |
|
|
117
|
+
1. **Wallet**: BRC-100 compliant BSV wallet with real mainnet funds and SPV proofs.
|
|
118
|
+
2. **Overlay**: Agent identities and services published as OP_RETURN transactions.
|
|
119
|
+
3. **Discovery**: Agents query the overlay's lookup services to find peers.
|
|
120
|
+
4. **Payments**: BRC-29 key-derived payments — cryptographically verifiable.
|
|
121
|
+
5. **Relay**: Real-time WebSocket message relay for service coordination.
|
|
122
|
+
6. **Wake**: Incoming events trigger agent turns via `/hooks/agent`.
|
|
403
123
|
|
|
404
124
|
---
|
|
405
125
|
|
|
406
126
|
## License
|
|
407
|
-
|
|
408
127
|
MIT
|
package/SKILL.md
CHANGED
|
@@ -45,12 +45,12 @@ On first run, the plugin auto-creates a wallet and wakes you. Guide the user thr
|
|
|
45
45
|
5. **Ask which services to offer**: Present the list from the onboard response, let user pick
|
|
46
46
|
6. **Advertise selected**: `overlay({ action: "advertise", ... })` for each
|
|
47
47
|
|
|
48
|
-
If you need to customize settings, tell the user to add them to their config under `plugins.entries["openclaw-overlay"]`:
|
|
48
|
+
If you need to customize settings, tell the user to add them to their config under `plugins.entries["openclaw-overlay-plugin"]`:
|
|
49
49
|
```json
|
|
50
50
|
{
|
|
51
51
|
"plugins": {
|
|
52
52
|
"entries": {
|
|
53
|
-
"openclaw-overlay": {
|
|
53
|
+
"openclaw-overlay-plugin": {
|
|
54
54
|
"agentName": "...",
|
|
55
55
|
"overlayUrl": "..."
|
|
56
56
|
}
|
package/dist/index.js
CHANGED
|
@@ -552,7 +552,7 @@ export default function register(api) {
|
|
|
552
552
|
try {
|
|
553
553
|
api.logger.info("Starting BSV overlay WebSocket relay...");
|
|
554
554
|
const env = buildEnvironment(pluginConfig);
|
|
555
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
555
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
556
556
|
// Initialize the service system if available
|
|
557
557
|
try {
|
|
558
558
|
await initializeServiceSystem();
|
|
@@ -581,7 +581,7 @@ export default function register(api) {
|
|
|
581
581
|
(async () => {
|
|
582
582
|
try {
|
|
583
583
|
const env = buildEnvironment(pluginConfig);
|
|
584
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
584
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
585
585
|
const regPath = path.join(process.env.HOME || '', '.openclaw', 'openclaw-overlay', 'registration.json');
|
|
586
586
|
const onboardSentFile = path.join(process.env.HOME || '', '.openclaw', 'openclaw-overlay', 'onboarding-sent.flag');
|
|
587
587
|
if (!fs.existsSync(regPath) && !fs.existsSync(onboardSentFile)) {
|
|
@@ -626,7 +626,7 @@ export default function register(api) {
|
|
|
626
626
|
.action(async () => {
|
|
627
627
|
try {
|
|
628
628
|
const env = buildEnvironment(pluginConfig);
|
|
629
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
629
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
630
630
|
const result = await handleStatus(env, cliPath);
|
|
631
631
|
console.log(JSON.stringify(result, null, 2));
|
|
632
632
|
}
|
|
@@ -640,7 +640,7 @@ export default function register(api) {
|
|
|
640
640
|
.action(async () => {
|
|
641
641
|
try {
|
|
642
642
|
const env = buildEnvironment(pluginConfig);
|
|
643
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
643
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
644
644
|
const result = await handleBalance(env, cliPath);
|
|
645
645
|
console.log(JSON.stringify(result, null, 2));
|
|
646
646
|
}
|
|
@@ -654,7 +654,7 @@ export default function register(api) {
|
|
|
654
654
|
.action(async () => {
|
|
655
655
|
try {
|
|
656
656
|
const env = buildEnvironment(pluginConfig);
|
|
657
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
657
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
658
658
|
const result = await handleAddress(env, cliPath);
|
|
659
659
|
console.log(JSON.stringify(result, null, 2));
|
|
660
660
|
}
|
|
@@ -670,7 +670,7 @@ export default function register(api) {
|
|
|
670
670
|
.action(async (options) => {
|
|
671
671
|
try {
|
|
672
672
|
const env = buildEnvironment(pluginConfig);
|
|
673
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
673
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
674
674
|
const result = await handleDiscover(options, env, cliPath);
|
|
675
675
|
if (result.agents) {
|
|
676
676
|
console.log("\nAgents:");
|
|
@@ -697,7 +697,7 @@ export default function register(api) {
|
|
|
697
697
|
.action(async () => {
|
|
698
698
|
try {
|
|
699
699
|
const env = buildEnvironment(pluginConfig);
|
|
700
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
700
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
701
701
|
const result = await handleRegister(env, cliPath);
|
|
702
702
|
console.log(JSON.stringify(result, null, 2));
|
|
703
703
|
}
|
|
@@ -713,7 +713,7 @@ export default function register(api) {
|
|
|
713
713
|
.action(async (options) => {
|
|
714
714
|
try {
|
|
715
715
|
const env = buildEnvironment(pluginConfig);
|
|
716
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
716
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
717
717
|
const result = await handleOnboard(options, env, cliPath);
|
|
718
718
|
console.log(JSON.stringify(result, null, 2));
|
|
719
719
|
}
|
|
@@ -727,7 +727,7 @@ export default function register(api) {
|
|
|
727
727
|
.action(async () => {
|
|
728
728
|
try {
|
|
729
729
|
const env = buildEnvironment(pluginConfig);
|
|
730
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
730
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
731
731
|
const result = await handlePendingRequests(env, cliPath);
|
|
732
732
|
console.log(JSON.stringify(result, null, 2));
|
|
733
733
|
}
|
|
@@ -740,7 +740,7 @@ export default function register(api) {
|
|
|
740
740
|
async function executeOverlayAction(params, config, api) {
|
|
741
741
|
const { action } = params;
|
|
742
742
|
const env = buildEnvironment(config);
|
|
743
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
743
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
744
744
|
switch (action) {
|
|
745
745
|
case "request":
|
|
746
746
|
return await handleServiceRequest(params, env, cliPath, config, api);
|
|
@@ -12,7 +12,7 @@ import os from 'node:os';
|
|
|
12
12
|
import { fileURLToPath } from 'node:url';
|
|
13
13
|
const execFileAsync = promisify(execFile);
|
|
14
14
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
15
|
-
const CLI_PATH = path.resolve(__dirname, '..', '..', 'dist', 'cli.js');
|
|
15
|
+
const CLI_PATH = path.resolve(__dirname, '..', '..', 'dist', 'src', 'cli.js');
|
|
16
16
|
// Simple test runner (matches project convention — no external framework)
|
|
17
17
|
let passed = 0;
|
|
18
18
|
let failed = 0;
|
package/index.ts
CHANGED
|
@@ -597,7 +597,7 @@ export default function register(api: any) {
|
|
|
597
597
|
try {
|
|
598
598
|
api.logger.info("Starting BSV overlay WebSocket relay...");
|
|
599
599
|
const env = buildEnvironment(pluginConfig);
|
|
600
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
600
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
601
601
|
|
|
602
602
|
// Initialize the service system if available
|
|
603
603
|
try {
|
|
@@ -629,7 +629,7 @@ export default function register(api: any) {
|
|
|
629
629
|
(async () => {
|
|
630
630
|
try {
|
|
631
631
|
const env = buildEnvironment(pluginConfig);
|
|
632
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
632
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
633
633
|
|
|
634
634
|
const regPath = path.join(process.env.HOME || '', '.openclaw', 'openclaw-overlay', 'registration.json');
|
|
635
635
|
const onboardSentFile = path.join(process.env.HOME || '', '.openclaw', 'openclaw-overlay', 'onboarding-sent.flag');
|
|
@@ -678,7 +678,7 @@ export default function register(api: any) {
|
|
|
678
678
|
.action(async () => {
|
|
679
679
|
try {
|
|
680
680
|
const env = buildEnvironment(pluginConfig);
|
|
681
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
681
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
682
682
|
const result = await handleStatus(env, cliPath);
|
|
683
683
|
console.log(JSON.stringify(result, null, 2));
|
|
684
684
|
} catch (error: any) {
|
|
@@ -692,7 +692,7 @@ export default function register(api: any) {
|
|
|
692
692
|
.action(async () => {
|
|
693
693
|
try {
|
|
694
694
|
const env = buildEnvironment(pluginConfig);
|
|
695
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
695
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
696
696
|
const result = await handleBalance(env, cliPath);
|
|
697
697
|
console.log(JSON.stringify(result, null, 2));
|
|
698
698
|
} catch (error: any) {
|
|
@@ -706,7 +706,7 @@ export default function register(api: any) {
|
|
|
706
706
|
.action(async () => {
|
|
707
707
|
try {
|
|
708
708
|
const env = buildEnvironment(pluginConfig);
|
|
709
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
709
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
710
710
|
const result = await handleAddress(env, cliPath);
|
|
711
711
|
console.log(JSON.stringify(result, null, 2));
|
|
712
712
|
} catch (error: any) {
|
|
@@ -722,7 +722,7 @@ export default function register(api: any) {
|
|
|
722
722
|
.action(async (options: any) => {
|
|
723
723
|
try {
|
|
724
724
|
const env = buildEnvironment(pluginConfig);
|
|
725
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
725
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
726
726
|
const result = await handleDiscover(options, env, cliPath);
|
|
727
727
|
|
|
728
728
|
if (result.agents) {
|
|
@@ -751,7 +751,7 @@ export default function register(api: any) {
|
|
|
751
751
|
.action(async () => {
|
|
752
752
|
try {
|
|
753
753
|
const env = buildEnvironment(pluginConfig);
|
|
754
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
754
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
755
755
|
const result = await handleRegister(env, cliPath);
|
|
756
756
|
console.log(JSON.stringify(result, null, 2));
|
|
757
757
|
} catch (error: any) {
|
|
@@ -767,7 +767,7 @@ export default function register(api: any) {
|
|
|
767
767
|
.action(async (options: any) => {
|
|
768
768
|
try {
|
|
769
769
|
const env = buildEnvironment(pluginConfig);
|
|
770
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
770
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
771
771
|
const result = await handleOnboard(options, env, cliPath);
|
|
772
772
|
console.log(JSON.stringify(result, null, 2));
|
|
773
773
|
} catch (error: any) {
|
|
@@ -781,7 +781,7 @@ export default function register(api: any) {
|
|
|
781
781
|
.action(async () => {
|
|
782
782
|
try {
|
|
783
783
|
const env = buildEnvironment(pluginConfig);
|
|
784
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
784
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
785
785
|
const result = await handlePendingRequests(env, cliPath);
|
|
786
786
|
console.log(JSON.stringify(result, null, 2));
|
|
787
787
|
} catch (error: any) {
|
|
@@ -794,7 +794,7 @@ export default function register(api: any) {
|
|
|
794
794
|
async function executeOverlayAction(params: any, config: any, api: any) {
|
|
795
795
|
const { action } = params;
|
|
796
796
|
const env = buildEnvironment(config);
|
|
797
|
-
const cliPath = path.join(__dirname, 'dist', 'cli.js');
|
|
797
|
+
const cliPath = path.join(__dirname, 'dist', 'src', 'cli.js');
|
|
798
798
|
|
|
799
799
|
switch (action) {
|
|
800
800
|
case "request":
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED