@antseed/cli 0.1.148 → 0.1.150
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 +51 -17
- package/dist/cli/commands/buyer/activity.d.ts +3 -0
- package/dist/cli/commands/buyer/activity.d.ts.map +1 -0
- package/dist/cli/commands/buyer/activity.js +555 -0
- package/dist/cli/commands/buyer/activity.js.map +1 -0
- package/dist/cli/commands/buyer/daemon.d.ts +13 -0
- package/dist/cli/commands/buyer/daemon.d.ts.map +1 -0
- package/dist/cli/commands/buyer/daemon.js +39 -0
- package/dist/cli/commands/buyer/daemon.js.map +1 -0
- package/dist/cli/commands/buyer/deposit.d.ts +8 -0
- package/dist/cli/commands/buyer/deposit.d.ts.map +1 -1
- package/dist/cli/commands/buyer/deposit.js +338 -25
- package/dist/cli/commands/buyer/deposit.js.map +1 -1
- package/dist/cli/commands/buyer/index.d.ts.map +1 -1
- package/dist/cli/commands/buyer/index.js +2 -0
- package/dist/cli/commands/buyer/index.js.map +1 -1
- package/dist/cli/commands/buyer/start.d.ts +1 -0
- package/dist/cli/commands/buyer/start.d.ts.map +1 -1
- package/dist/cli/commands/buyer/start.js +53 -10
- package/dist/cli/commands/buyer/start.js.map +1 -1
- package/dist/cli/commands/buyer/start.test.js +30 -1
- package/dist/cli/commands/buyer/start.test.js.map +1 -1
- package/dist/cli/commands/buyer/sweep.d.ts.map +1 -1
- package/dist/cli/commands/buyer/sweep.js +17 -17
- package/dist/cli/commands/buyer/sweep.js.map +1 -1
- package/dist/cli/commands/network/browse.d.ts.map +1 -1
- package/dist/cli/commands/network/browse.js +65 -114
- package/dist/cli/commands/network/browse.js.map +1 -1
- package/dist/cli/commands/payments.d.ts.map +1 -1
- package/dist/cli/commands/payments.js +29 -34
- package/dist/cli/commands/payments.js.map +1 -1
- package/dist/cli/commands/seller/start.d.ts.map +1 -1
- package/dist/cli/commands/seller/start.js +4 -1
- package/dist/cli/commands/seller/start.js.map +1 -1
- package/dist/cli/commands/seller/start.test.js +15 -0
- package/dist/cli/commands/seller/start.test.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +7 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +41 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/config/loader.test.js +52 -0
- package/dist/config/loader.test.js.map +1 -1
- package/dist/config/types.d.ts +10 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/validation.d.ts.map +1 -1
- package/dist/config/validation.js +17 -0
- package/dist/config/validation.js.map +1 -1
- package/dist/generated/baked-defaults.d.ts +15 -0
- package/dist/generated/baked-defaults.d.ts.map +1 -0
- package/dist/generated/baked-defaults.js +15 -0
- package/dist/generated/baked-defaults.js.map +1 -0
- package/dist/plugins/manager.d.ts +1 -0
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/plugins/manager.js +15 -4
- package/dist/plugins/manager.js.map +1 -1
- package/dist/plugins/manager.test.d.ts +2 -0
- package/dist/plugins/manager.test.d.ts.map +1 -0
- package/dist/plugins/manager.test.js +15 -0
- package/dist/plugins/manager.test.js.map +1 -0
- package/dist/proxy/buyer-proxy.d.ts +31 -2
- package/dist/proxy/buyer-proxy.d.ts.map +1 -1
- package/dist/proxy/buyer-proxy.js +481 -59
- package/dist/proxy/buyer-proxy.js.map +1 -1
- package/dist/proxy/buyer-proxy.test.js +894 -56
- package/dist/proxy/buyer-proxy.test.js.map +1 -1
- package/dist/proxy/conversation-store.d.ts +6 -6
- package/dist/proxy/conversation-store.d.ts.map +1 -1
- package/dist/proxy/conversation-store.js +16 -0
- package/dist/proxy/conversation-store.js.map +1 -1
- package/dist/proxy/deposit-watcher.d.ts +125 -0
- package/dist/proxy/deposit-watcher.d.ts.map +1 -0
- package/dist/proxy/deposit-watcher.js +306 -0
- package/dist/proxy/deposit-watcher.js.map +1 -0
- package/dist/proxy/deposit-watcher.test.d.ts +2 -0
- package/dist/proxy/deposit-watcher.test.d.ts.map +1 -0
- package/dist/proxy/deposit-watcher.test.js +173 -0
- package/dist/proxy/deposit-watcher.test.js.map +1 -0
- package/dist/proxy/network-models.d.ts +76 -0
- package/dist/proxy/network-models.d.ts.map +1 -0
- package/dist/proxy/network-models.js +229 -0
- package/dist/proxy/network-models.js.map +1 -0
- package/dist/proxy/network-models.test.d.ts +2 -0
- package/dist/proxy/network-models.test.d.ts.map +1 -0
- package/dist/proxy/network-models.test.js +734 -0
- package/dist/proxy/network-models.test.js.map +1 -0
- package/dist/proxy/routing.d.ts +3 -1
- package/dist/proxy/routing.d.ts.map +1 -1
- package/dist/proxy/routing.js +69 -16
- package/dist/proxy/routing.js.map +1 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -19,11 +19,13 @@ Command-line interface and web dashboard for the AntSeed Network — a P2P netwo
|
|
|
19
19
|
| **Buying** | |
|
|
20
20
|
| `antseed buyer start` | Start the buyer proxy and connect to sellers |
|
|
21
21
|
| `antseed buyer start --router <name>` | Start the buyer proxy with a non-default router |
|
|
22
|
-
| `antseed buyer deposit
|
|
22
|
+
| `antseed buyer deposit` | Show your funding address + QR; incoming USDC deposits automatically (gasless) |
|
|
23
|
+
| `antseed buyer sweep` | Manually sweep hot-wallet USDC into deposits (gasless) |
|
|
24
|
+
| `antseed buyer activity` | Activity summary: tokens, spend history, savings, channels, claimable ANTS |
|
|
25
|
+
| `antseed buyer deposit --onchain <usdc>` | Direct on-chain deposit from the hot wallet (requires ETH for gas) |
|
|
23
26
|
| `antseed buyer withdraw <amount>` | Withdraw USDC from deposits |
|
|
24
27
|
| `antseed buyer balance` | Check wallet and deposit balance |
|
|
25
|
-
| `antseed network browse` | Browse
|
|
26
|
-
| `antseed payments` | Launch the payments portal |
|
|
28
|
+
| `antseed network browse` | Browse peers, models, and pricing (same catalog as `/v1/models`) |
|
|
27
29
|
| **Session** | |
|
|
28
30
|
| `antseed buyer connection get` | Show current session state (pinned service, peer) |
|
|
29
31
|
| `antseed buyer connection set` | Update service/peer overrides on a running proxy |
|
|
@@ -251,6 +253,8 @@ antseed config seller set maxUploadBodyBytes 134217728
|
|
|
251
253
|
antseed config buyer set maxPricing.defaults.inputUsdPerMillion 25
|
|
252
254
|
antseed config buyer set maxPricing.defaults.cachedInputUsdPerMillion 12
|
|
253
255
|
antseed config buyer set maxPricing.defaults.outputUsdPerMillion 75
|
|
256
|
+
antseed config buyer set routingPreferences.minTrustScore 60
|
|
257
|
+
antseed config buyer set routingPreferences.maxInputUsdPerMillion 25
|
|
254
258
|
antseed config buyer set peerRefreshIntervalMs 300000
|
|
255
259
|
antseed config buyer set metadataFetchTimeoutMs 1500
|
|
256
260
|
antseed config buyer set disableMetadataV2Services true
|
|
@@ -272,9 +276,39 @@ For production sellers, prefer a dedicated Base JSON-RPC endpoint over public de
|
|
|
272
276
|
|
|
273
277
|
This release announces metadata v12. Buyers supporting only older metadata versions drop v12 sellers from discovery, while updated buyers continue accepting older v10/v11 sellers. Upgrade buyer CLIs and desktop apps before upgrading sellers. Removing capability or unit-billing fields does not downgrade the metadata version; rollback requires running the older seller binary.
|
|
274
278
|
|
|
275
|
-
###
|
|
279
|
+
### Model-only routing and peer pinning
|
|
276
280
|
|
|
277
|
-
|
|
281
|
+
Pinning a peer is optional. A request that names only a model uses the shared
|
|
282
|
+
Price + Trust ranking configured under `buyer.routingPreferences`. The default
|
|
283
|
+
`minTrustScore` is `60` and acts as a hard eligibility gate; eligible offers are
|
|
284
|
+
ordered using trust, token or image price, cached-input pricing coverage, recent
|
|
285
|
+
failures, cooldowns, free-peer preference, and seller access rules. Model-only
|
|
286
|
+
requests can fail over on peer-attributed retryable errors.
|
|
287
|
+
|
|
288
|
+
Discover what the network serves without any pin:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# Every model on the network, aggregated across sellers (answered locally)
|
|
292
|
+
curl -s http://localhost:8377/v1/models | jq '.data[].id'
|
|
293
|
+
|
|
294
|
+
# Filter the list by modality, or inspect one unified model and its ranked offers
|
|
295
|
+
curl -s 'http://localhost:8377/v1/models?type=text'
|
|
296
|
+
curl -s 'http://localhost:8377/v1/models?type=images'
|
|
297
|
+
curl -s http://localhost:8377/v1/models/<model-id>
|
|
298
|
+
|
|
299
|
+
# Peers, pricing, protocols, capabilities, and reputation
|
|
300
|
+
antseed network browse
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
`GET /v1/models` is network-wide and groups compatible aliases. Duplicate
|
|
304
|
+
offers from one seller collapse to its cheapest matching service. For recognized
|
|
305
|
+
conversations, the first successful automatic route becomes a soft affinity:
|
|
306
|
+
later turns prefer the same seller and service while they remain healthy and
|
|
307
|
+
policy-eligible, but can still fail over. Explicit pins remain hard.
|
|
308
|
+
|
|
309
|
+
When you do want to force a specific seller, pin it. After `antseed buyer
|
|
310
|
+
start` is running, you can pin all subsequent requests to a peer without
|
|
311
|
+
restarting:
|
|
278
312
|
|
|
279
313
|
```bash
|
|
280
314
|
# Pin all requests to a specific peer (bypasses router for peer selection)
|
|
@@ -287,7 +321,7 @@ antseed buyer connection get
|
|
|
287
321
|
antseed buyer connection clear
|
|
288
322
|
```
|
|
289
323
|
|
|
290
|
-
Session peer pins are stored in `~/.antseed/buyer.state.json
|
|
324
|
+
Session peer pins are stored in `~/.antseed/buyer.state.json`, survive proxy restarts, and are picked up by the running proxy immediately via file-watching. The desktop app reads and writes the same file to expose explicit peer selection in its UI.
|
|
291
325
|
|
|
292
326
|
For tools that can only set a model name, use `<peerId>@<model>` as the model. The proxy strips the peer prefix before provider matching and forwards only `<model>` to the seller. If both this model prefix and `x-antseed-pin-peer` are sent, the header selects the peer and the model prefix is still stripped.
|
|
293
327
|
|
|
@@ -319,24 +353,23 @@ antseed seller start
|
|
|
319
353
|
# 1. Set your identity (secp256k1 private key)
|
|
320
354
|
export ANTSEED_IDENTITY_HEX=<your-private-key-hex>
|
|
321
355
|
|
|
322
|
-
# 2.
|
|
323
|
-
antseed payments
|
|
324
|
-
# Payments portal running at http://127.0.0.1:3118
|
|
325
|
-
|
|
326
|
-
# 3. In the portal, connect a funded wallet (e.g. MetaMask) and deposit USDC
|
|
327
|
-
# for your node. The contract's deposit(buyer, amount) pulls USDC from the
|
|
328
|
-
# connected wallet and credits your node — the identity key never holds funds.
|
|
329
|
-
|
|
330
|
-
# 4. Connect to the network
|
|
356
|
+
# 2. Connect to the network
|
|
331
357
|
antseed buyer start
|
|
332
358
|
# Proxy listening on http://localhost:8377
|
|
359
|
+
|
|
360
|
+
# 3. Fund your node: shows your address + a QR code, then deposits incoming
|
|
361
|
+
# USDC into your credits automatically (gasless — a relayer submits the
|
|
362
|
+
# transaction for a fixed ~$0.05 USDC fee)
|
|
363
|
+
antseed buyer deposit
|
|
333
364
|
```
|
|
334
365
|
|
|
335
366
|
Point your AI tools (Claude Code, Codex, etc.) at `http://localhost:8377` as the API base URL. The router handles peer selection and failover transparently.
|
|
336
367
|
|
|
337
|
-
###
|
|
368
|
+
### Depositing USDC
|
|
369
|
+
|
|
370
|
+
`antseed buyer deposit` prints your node's funding address and a QR code (an EIP-681 payment request any mobile wallet can scan). Send USDC on Base to that address from anywhere — an exchange withdrawal, another wallet, a card on-ramp. Incoming funds are swept into your deposits balance gaslessly: your node signs an EIP-3009 authorization and a permissionless relayer submits the transaction for a fixed ~$0.05 USDC fee, so the hot wallet never needs ETH. While watching, the command also serves the connected-wallet checkout page and prints its link (`http://127.0.0.1:3118?token=…`) for depositing from a browser-extension wallet instead.
|
|
338
371
|
|
|
339
|
-
|
|
372
|
+
While `antseed buyer start` is running, this sweeping happens automatically in the background (disable with `buyer.autoSweep: false` in your config). `antseed buyer sweep` triggers the same gasless sweep manually, and `antseed buyer deposit --onchain <usdc>` remains for direct on-chain deposits from a hot wallet that holds ETH. (The `antseed payments` web portal is retired.)
|
|
340
373
|
|
|
341
374
|
### Configuration
|
|
342
375
|
|
|
@@ -356,6 +389,7 @@ Use `base-sepolia` for testing with MockUSDC.
|
|
|
356
389
|
### Runtime Controls
|
|
357
390
|
|
|
358
391
|
- `ANTSEED_BASE_RPC_URL=<url>` — custom Base JSON-RPC endpoint for seller on-chain operations (recommended for production)
|
|
392
|
+
- `ANTSEED_COMPARABLE_PRICES_URL=<url>` — retail-prices models API for the `antseed buyer activity` Saved tile (OpenRouter-compatible schema, e.g. `https://openrouter.ai/api/v1/models`). Release builds ship with a baked-in default; set the variable to override it, or set it to an empty string to disable the savings baseline. Builds from source have no default
|
|
359
393
|
- `ANTSEED_BUYER_METADATA_FETCH_TIMEOUT_MS=<ms>` — runtime override for buyer peer-discovery metadata fetch timeout
|
|
360
394
|
- `ANTSEED_BUYER_DISABLE_METADATA_V2_SERVICES=true` — suppress buyer per-service metadata v2 attribution while keeping aggregate usage totals
|
|
361
395
|
- `ANTSEED_SETTLEMENT_IDLE_MS=600000` — idle time before settling a session (default: 10 minutes)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/buyer/activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAqbxC,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAmMpE"}
|