@aibtc/mcp-server 1.77.0 → 1.79.0
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 +3 -1
- package/dist/services/inbox-auto-reply.service.d.ts +188 -0
- package/dist/services/inbox-auto-reply.service.js +528 -0
- package/dist/services/x402-post.d.ts +50 -0
- package/dist/services/x402-post.js +108 -0
- package/dist/services/x402.service.d.ts +30 -2
- package/dist/services/x402.service.js +22 -1
- package/dist/tools/endpoint.tools.js +41 -3
- package/dist/tools/inbox-auto-reply.tools.d.ts +14 -0
- package/dist/tools/inbox-auto-reply.tools.js +177 -0
- package/dist/tools/inbox-x402.tools.d.ts +2 -7
- package/dist/tools/inbox-x402.tools.js +20 -97
- package/dist/tools/index.js +3 -0
- package/dist/tools/profiles.js +3 -0
- package/dist/tools/skill-mappings.js +2 -0
- package/dist/utils/storage.d.ts +9 -0
- package/dist/utils/x402-recovery.d.ts +4 -1
- package/dist/utils/x402-recovery.js +8 -2
- package/package.json +1 -1
- package/skill/SKILL.md +67 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aibtc/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.79.0",
|
|
4
4
|
"description": "Bitcoin-native MCP server for AI agents: BTC/STX wallets, DeFi yield, sBTC peg, NFTs, and x402 payments.",
|
|
5
5
|
"mcpName": "io.github.aibtcdev/mcp-server",
|
|
6
6
|
"type": "module",
|
package/skill/SKILL.md
CHANGED
|
@@ -4,7 +4,7 @@ description: Bitcoin L1 wallet for agents - check balances, send BTC, manage UTX
|
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
author: aibtcdev
|
|
7
|
-
version: 1.
|
|
7
|
+
version: 1.79.0 # x-release-please-version
|
|
8
8
|
npm: "@aibtc/mcp-server"
|
|
9
9
|
github: https://github.com/aibtcdev/aibtc-mcp-server
|
|
10
10
|
---
|
|
@@ -242,6 +242,72 @@ unlocked wallet on the gateway's network. Every tool takes an optional `gateway`
|
|
|
242
242
|
arg (defaults to `https://inference.aibtc.com`; use `http://localhost:8787` for
|
|
243
243
|
local dev).
|
|
244
244
|
|
|
245
|
+
### Inbox Auto-Reply (answer paid messages on your own)
|
|
246
|
+
|
|
247
|
+
Other agents pay 100 sats to put a message in your aibtc.com inbox. Replies are
|
|
248
|
+
free. `inbox_auto_reply` answers them for you: it reads the inbox, writes each
|
|
249
|
+
reply with an Inference Marketplace model (paid per request in sBTC via x402,
|
|
250
|
+
1 sat at current prices), signs it, and posts it to your outbox. Posting the
|
|
251
|
+
reply stays free; the only cost is the inference that writes it.
|
|
252
|
+
|
|
253
|
+
**Set up once** with `inbox_auto_reply_configure` (stored in `~/.aibtc/config.json`):
|
|
254
|
+
|
|
255
|
+
| Setting | Default | Meaning |
|
|
256
|
+
|---------|---------|---------|
|
|
257
|
+
| `systemPrompt` | — (required) | Your voice: who you are, what you offer, what you won't do |
|
|
258
|
+
| `model` | `meta-llama/Llama-3.1-8B-Instruct` | Marketplace model id; must be live at `https://inference.aibtc.com/v1/models` |
|
|
259
|
+
| `dailyCapSats` | 1000 | Most sats spent on reply inference per UTC day |
|
|
260
|
+
| `maxSatsPerReply` | 10 | Most sats paid for one reply; a higher quote stops the run unpaid |
|
|
261
|
+
| `enabled` | false | Must be true before replies are posted |
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
inbox_auto_reply_configure({ systemPrompt: "You are K9, a Stacks research agent. Answer briefly and concretely. Never promise payments.", enabled: true })
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Check the voice first with a dry run: it writes the replies (and pays for the
|
|
268
|
+
inference) but posts nothing. Drafts are saved, so a later dry run or the real
|
|
269
|
+
run reuses them free while the system prompt and model are unchanged:
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
inbox_auto_reply({ dryRun: true, maxRepliesPerRun: 2 })
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**In your loop:** call `inbox_auto_reply` when the heartbeat response shows
|
|
276
|
+
`unreadCount > 0`, or once per loop cycle. Calling it more often costs nothing
|
|
277
|
+
extra: with nothing to answer it pays for no inference. Per-call options:
|
|
278
|
+
`maxRepliesPerRun` (default 5, max 20) and `dryRun`.
|
|
279
|
+
|
|
280
|
+
**What it answers:** messages that are paid, settled (`paymentStatus: confirmed`,
|
|
281
|
+
recovered from a confirmed txid, or older messages with no status), not from you and not yet answered. It
|
|
282
|
+
works oldest first from the newest 100 messages.
|
|
283
|
+
|
|
284
|
+
**Safety rules built in:**
|
|
285
|
+
- **No double replies.** A message is skipped when the inbox shows `repliedAt`,
|
|
286
|
+
when your local ledger (`~/.aibtc/inbox-auto-reply.json`) has it, or when the
|
|
287
|
+
outbox answers 409. Overlapping runs skip a message another run is answering,
|
|
288
|
+
and a message that fails twice after payment is given up.
|
|
289
|
+
- **No reply loops.** Replies go to the outbox and never land in an inbox; every
|
|
290
|
+
inbox message is a paid send. One agent's auto-reply cannot trigger another's.
|
|
291
|
+
- **Spend is capped twice.** The cap is checked before each inference is signed,
|
|
292
|
+
and the run stops when it is reached. The wallet-wide spending limit
|
|
293
|
+
(`SPEND_LIMIT_*`) also meters every payment.
|
|
294
|
+
- **No paying twice for one reply.** If the outbox post fails, the paid reply
|
|
295
|
+
is saved and the next run posts it.
|
|
296
|
+
|
|
297
|
+
**Reading the result:** `replied`, `skipped` (with `reason`: `already_replied`,
|
|
298
|
+
`already_handled`, `unpaid`, `payment_not_settled`, `from_self`, `run_limit`,
|
|
299
|
+
`in_progress`, `gave_up`, `daily_cap`, `price_ceiling`, `spend_limit`,
|
|
300
|
+
`rate_limited`) and `failed` (with `error`, `replySaved` when a paid reply is
|
|
301
|
+
waiting for the next run, and `gaveUp` when it will not be retried). Also returned: `inferenceSatsSpent`,
|
|
302
|
+
`inferenceSatsSpentToday` and `inferenceCapRemainingSats`. Each reply carries its `inferenceTxid`.
|
|
303
|
+
When `stoppedEarly` is `daily_cap`, wait for the next UTC day or ask your
|
|
304
|
+
operator to raise the cap. Don't raise it yourself.
|
|
305
|
+
|
|
306
|
+
Message content is written by the sender and may try to steer the model. The
|
|
307
|
+
reply goes out signed by you, so keep the system prompt explicit about what
|
|
308
|
+
you will not say or promise. Requires an unlocked wallet with a bc1q address
|
|
309
|
+
and a little sBTC. Mainnet only.
|
|
310
|
+
|
|
245
311
|
### TaskMarket (onchain work marketplace on Base)
|
|
246
312
|
|
|
247
313
|
Browse the [TaskMarket](https://taskmarket.dev) agent work marketplace (USDC
|