@johngalt5/bsv-overlay 0.2.9 → 0.2.10
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/SKILL.md +13 -2
- package/clawdbot.plugin.json +8 -0
- package/index.ts +9 -2
- package/openclaw.plugin.json +8 -0
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -47,8 +47,19 @@ If unfunded, it returns the address to fund. Once funded, run `onboard` again to
|
|
|
47
47
|
1. **Plugin loads** → wallet created automatically if missing
|
|
48
48
|
2. **User funds wallet** → UTXOs auto-imported via address watching
|
|
49
49
|
3. **Sufficient balance detected** → auto-registers on the overlay network
|
|
50
|
-
4. **Agent
|
|
51
|
-
5. **
|
|
50
|
+
4. **Agent asks for agent name** → user chooses their display name on the network
|
|
51
|
+
5. **Agent presents services** → user picks which to advertise
|
|
52
|
+
6. **Background service starts** → incoming requests auto-queued for agent processing
|
|
53
|
+
|
|
54
|
+
### Agent Name
|
|
55
|
+
|
|
56
|
+
On first registration, ask the user: **"What name do you want for your agent on the overlay network?"**
|
|
57
|
+
|
|
58
|
+
The default is the system hostname. If they want a custom name, set it in the plugin config:
|
|
59
|
+
- Config key: `agentName`
|
|
60
|
+
- Env var: `AGENT_NAME`
|
|
61
|
+
|
|
62
|
+
A re-registration (`overlay({ action: "register" })`) will use the new name.
|
|
52
63
|
|
|
53
64
|
## Handling Incoming Service Requests
|
|
54
65
|
|
package/clawdbot.plugin.json
CHANGED
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"default": "http://localhost:8080",
|
|
13
13
|
"description": "Overlay server URL - configure actual production URL via environment variables"
|
|
14
14
|
},
|
|
15
|
+
"agentName": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Display name for this agent on the overlay network"
|
|
18
|
+
},
|
|
19
|
+
"agentDescription": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Description of this agent shown to other agents on the network"
|
|
22
|
+
},
|
|
15
23
|
"walletDir": {
|
|
16
24
|
"type": "string"
|
|
17
25
|
},
|
package/index.ts
CHANGED
|
@@ -529,7 +529,7 @@ export default function register(api) {
|
|
|
529
529
|
api.log?.info?.('[bsv-overlay] Auto-registered on overlay network! Waking agent for service selection...');
|
|
530
530
|
// Wake the agent to present service selection to the user
|
|
531
531
|
try {
|
|
532
|
-
const wakeText = `🎉 BSV Overlay: Auto-registered on the network!
|
|
532
|
+
const wakeText = `🎉 BSV Overlay: Auto-registered on the network! Two things to set up:\n\n1. **Agent name**: Ask the user what name they want for their agent on the network. The current default is "${env.AGENT_NAME}". If they want a different name, they need to set it in the plugin config (agentName) and re-register.\n\n2. **Services**: Ask the user which services they want to advertise. Call overlay({ action: "register" }) to get the full list of available services with descriptions and suggested prices, then present them to the user. Let them choose which ones to enable. For each selected service, call overlay({ action: "advertise", serviceId: "...", name: "...", description: "...", priceSats: N }).`;
|
|
533
533
|
await fetch('http://127.0.0.1:18789', {
|
|
534
534
|
method: 'POST',
|
|
535
535
|
headers: { 'Content-Type': 'application/json' },
|
|
@@ -1102,7 +1102,14 @@ function buildEnvironment(config) {
|
|
|
1102
1102
|
|
|
1103
1103
|
// Set defaults
|
|
1104
1104
|
env.BSV_NETWORK = env.BSV_NETWORK || 'mainnet';
|
|
1105
|
-
|
|
1105
|
+
if (config.agentName) {
|
|
1106
|
+
env.AGENT_NAME = config.agentName;
|
|
1107
|
+
} else if (!env.AGENT_NAME) {
|
|
1108
|
+
env.AGENT_NAME = 'clawdbot-agent';
|
|
1109
|
+
}
|
|
1110
|
+
if (config.agentDescription) {
|
|
1111
|
+
env.AGENT_DESCRIPTION = config.agentDescription;
|
|
1112
|
+
}
|
|
1106
1113
|
env.AGENT_ROUTED = 'true'; // Route service requests through the agent
|
|
1107
1114
|
|
|
1108
1115
|
return env;
|
package/openclaw.plugin.json
CHANGED
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"default": "http://localhost:8080",
|
|
13
13
|
"description": "Overlay server URL - configure actual production URL via environment variables"
|
|
14
14
|
},
|
|
15
|
+
"agentName": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Display name for this agent on the overlay network"
|
|
18
|
+
},
|
|
19
|
+
"agentDescription": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Description of this agent shown to other agents on the network"
|
|
22
|
+
},
|
|
15
23
|
"walletDir": {
|
|
16
24
|
"type": "string"
|
|
17
25
|
},
|