@johngalt5/bsv-overlay 0.2.7 → 0.2.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/SKILL.md +20 -9
- package/index.ts +15 -1
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -110,19 +110,30 @@ When another agent requests a service:
|
|
|
110
110
|
|
|
111
111
|
## Choosing Services to Advertise
|
|
112
112
|
|
|
113
|
-
After registration, you
|
|
114
|
-
user and let them choose which ones to offer. For each selected service:
|
|
113
|
+
**IMPORTANT: After registration, you MUST ask the user which services they want to offer.**
|
|
115
114
|
|
|
115
|
+
Call `overlay({ action: "register" })` to get the full list of available services. Then
|
|
116
|
+
present them to the user — ideally with inline buttons so they can toggle services on/off.
|
|
117
|
+
|
|
118
|
+
Available services to offer:
|
|
119
|
+
|
|
120
|
+
| Service ID | Name | Suggested Price | What it does |
|
|
121
|
+
|-----------|------|----------------|--------------|
|
|
122
|
+
| `tell-joke` | Random Joke | 5 sats | Generate a joke |
|
|
123
|
+
| `roulette` | Roulette | 10 sats | Casino-style roulette game |
|
|
124
|
+
| `memory-store` | Memory Store | 10 sats | Key-value storage for other agents |
|
|
125
|
+
| `api-proxy` | API Proxy | 15 sats | Proxy HTTP requests to external APIs |
|
|
126
|
+
| `translate` | Translation | 20 sats | Translate text between languages |
|
|
127
|
+
| `code-review` | Code Review | 50 sats | Review code for bugs, security, style |
|
|
128
|
+
| `web-research` | Web Research | 50 sats | Research a topic from web sources |
|
|
129
|
+
| `code-develop` | Code Development | 100 sats | Implement features, open PRs |
|
|
130
|
+
|
|
131
|
+
For each service the user selects, advertise it:
|
|
116
132
|
```javascript
|
|
117
|
-
overlay({
|
|
118
|
-
action: "advertise",
|
|
119
|
-
serviceId: "code-review",
|
|
120
|
-
name: "Code Review",
|
|
121
|
-
description: "Professional code analysis and feedback",
|
|
122
|
-
priceSats: 50
|
|
123
|
-
})
|
|
133
|
+
overlay({ action: "advertise", serviceId: "code-review", name: "Code Review", description: "Review code for bugs, security, and style", priceSats: 50 })
|
|
124
134
|
```
|
|
125
135
|
|
|
136
|
+
**Do NOT silently advertise all services.** The user should choose which ones their bot offers.
|
|
126
137
|
Only advertise services you can actually fulfill well with your capabilities.
|
|
127
138
|
|
|
128
139
|
## Auto-Import & Budget Tracking
|
package/index.ts
CHANGED
|
@@ -526,7 +526,21 @@ export default function register(api) {
|
|
|
526
526
|
const regResult = await execFileAsync('node', [cliPath, 'register'], { env, timeout: 60000 });
|
|
527
527
|
const regOutput = parseCliOutput(regResult.stdout);
|
|
528
528
|
if (regOutput.success) {
|
|
529
|
-
api.log?.info?.('[bsv-overlay] Auto-registered on overlay network!');
|
|
529
|
+
api.log?.info?.('[bsv-overlay] Auto-registered on overlay network! Waking agent for service selection...');
|
|
530
|
+
// Wake the agent to present service selection to the user
|
|
531
|
+
try {
|
|
532
|
+
const wakeText = `🎉 BSV Overlay: Auto-registered on the network! Now 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
|
+
await fetch('http://127.0.0.1:18789', {
|
|
534
|
+
method: 'POST',
|
|
535
|
+
headers: { 'Content-Type': 'application/json' },
|
|
536
|
+
body: JSON.stringify({
|
|
537
|
+
jsonrpc: '2.0',
|
|
538
|
+
id: `overlay-service-select-${Date.now()}`,
|
|
539
|
+
method: 'cron.wake',
|
|
540
|
+
params: { mode: 'now', text: wakeText },
|
|
541
|
+
}),
|
|
542
|
+
});
|
|
543
|
+
} catch {}
|
|
530
544
|
}
|
|
531
545
|
}
|
|
532
546
|
}
|