@dvmkit/dvm-cli 0.15.0 → 0.15.1
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/dist/{chunk-ZKC6KN36.js → chunk-BFYZO3BV.js} +2614 -2345
- package/dist/{client-RSHQFXCA.js → client-YIHI4AIC.js} +1 -1
- package/dist/dvm.js +370 -110
- package/dist/{pocket-refill-7Q6CR6I4.js → pocket-refill-KA37CF4N.js} +2 -2
- package/package.json +1 -1
- package/skills/dvm/calling.md +1 -1
- package/skills/dvm/recovery.md +1 -0
- package/dist/{chunk-LPILVPFG.js → chunk-5SHB3MZ7.js} +3 -3
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
recordFloatSpend,
|
|
14
14
|
resolveFundMint,
|
|
15
15
|
sweepPendingMints
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BFYZO3BV.js";
|
|
17
17
|
import "./chunk-HJ2JYBTT.js";
|
|
18
18
|
import {
|
|
19
19
|
info,
|
|
20
20
|
tryResolveBtcUsdRate
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5SHB3MZ7.js";
|
|
22
22
|
import "./chunk-UWVMG4VG.js";
|
|
23
23
|
import {
|
|
24
24
|
loadConfig
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvmkit/dvm-cli",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Command-line client and agent skill for Digital Vending Machines: pay-per-use HTTPS services AI agents can find, pay, and call with no account or API key",
|
|
5
5
|
"author": "DVM Technologies Ltd",
|
|
6
6
|
"keywords": [
|
package/skills/dvm/calling.md
CHANGED
|
@@ -35,7 +35,7 @@ Successful upfront Cashu fallback includes optional `mint_attempts`: an array of
|
|
|
35
35
|
|
|
36
36
|
For long jobs, run `dvm messages <job-id> --wait` in the background (default limit `12h`, override with `--until 30m`) and act on its `next_action`; it keeps paying charges authorised by the stored policy while attached. Silent stream reads reconnect after 60 seconds by default; use `--timeout <seconds>` to change that interval.
|
|
37
37
|
|
|
38
|
-
Follow the returned action: respond to a provider question only with authorized information; pay an existing job only within consent; poll when still processing. After `dvm pay <job-id>`, continue with `dvm messages <job-id>`, not a new request. If a `pay` action warns that a payment may already have been sent, run `dvm pay <job-id>` to resolve it: the command checks fresh provider history before spending. A send has a 60-second client timeout. A lost send waits 45 seconds after its failure before
|
|
38
|
+
Follow the returned action: respond to a provider question only with authorized information; pay an existing job only within consent; poll when still processing. After `dvm pay <job-id>`, continue with `dvm messages <job-id>`, not a new request. If a `pay` action warns that a payment may already have been sent, run `dvm pay <job-id>` to resolve it: the command checks fresh provider history before spending. A send has a 60-second client timeout. A lost send waits 45 seconds after its failure before it is sent again, and then only if history still shows the same unanswered charge and the job is `awaiting-input`. The retry re-delivers the payment already signed for that charge: the same Cashu token and request ID, or the same x402 or Tempo credential. No second payment is signed while the first is unconfirmed. It is booked as paid only on evidence that it was taken: the provider's acceptance or replay answer, a recorded payment in history that carries its Cashu request ID or exact credential, or Cashu proofs minted for this payment that the provider or the wallet sweep reports spent. It is released for a new payment when a newer ask replaces it, when the wallet confirms it reclaimed the token, or on a refusal whose code the provider's own `error` field names: `payment_invalid` (except for a re-sent x402 or Tempo credential, which a provider also answers that way when it already settled or used it; that one stays held), `lock_not_exclusive`, an invalid token, or a validation refusal. A short payment (`payment_insufficient`) is never released automatically: a provider keeps a short Cashu token, on credit where it has a ledger. Auto-pay stops, the hint names `dvm credit drain`, and only an explicit `dvm pay <job-id>` signs a new payment. Spent reserve proofs need the same explicit `dvm pay`. Transient, throttled (408, 425, 429), unrecognized or unstructured answers keep the payment held and re-sent; answers that would repeat on every re-send keep it held with `dvm decline` and `dvm cancel` as the ways out. Inside that window, `payment_settling` gives the retry time and command; `--wait` keeps checking automatically. Concurrent payment commands are serialized per job; another payer gets `payment_settling`, and `--wait` keeps watching. A later question does not invalidate a still-pending charge. Older local records without a send timestamp skip the delay but still require the same pending charge. `payment_unconfirmed` means nothing new was signed: the held payment cannot be re-sent here (a record from an older CLI, a wallet entry that is gone, or a different `--rail` or `--endpoint`). Follow its hint: re-send without the conflicting flag, keep watching with `dvm messages <job-id> --wait`, or end the job with `dvm decline <job-id>` (keeps finished work) or `dvm cancel <job-id>`. Recovery reads time out after 60 seconds by default; a failed or timed-out history read never authorizes a payment. If history cannot be read, retry once the provider is reachable or enter [recovery](recovery.md).
|
|
39
39
|
|
|
40
40
|
Answer with `dvm message <job-id> "<answer>" --type response --prompt-id <prompt-id>` (use `--json '<object matching schema>'` in place of `"<answer>"` for structured prompts); relay `next_action.display` and use exactly one of `next_action.options` unless the human chose otherwise.
|
|
41
41
|
|
package/skills/dvm/recovery.md
CHANGED
|
@@ -64,6 +64,7 @@ Cold starts do not justify replaying an arbitrary command. The CLI already retri
|
|
|
64
64
|
| The CLI reports committed or uncertain wallet spend, including `spend_committed` or `float_payment_unknown` | Run `dvm wallet show` to reconcile and inspect the result before any retry. |
|
|
65
65
|
| Credit funding or a refund remains pending | Preserve its funding or credit ID and follow the CLI's named reconcile action. Do not create a second funding while the first may settle. |
|
|
66
66
|
| A job is waiting on a charge nobody approved | Relay the `pay` action's `display`, including its deadline and what stopping costs. To stop and keep the finished work, run `dvm decline <job-id>`; run `dvm cancel <job-id>` only to halt the work now, which charges the work in progress. Do not cancel to get money back. |
|
|
67
|
+
| `dvm pay` returned `payment_unconfirmed`, or a held payment's hint names no `dvm pay` re-send | An earlier payment for that charge may still be accepted, and no new payment was signed. Follow the error's hint: watch with `dvm messages <job-id> --wait`, or end the job with `dvm decline <job-id>` or `dvm cancel <job-id>`. Do not pay the charge another way. Forgetting its wallet submission does not release the charge. |
|
|
67
68
|
| `cancel` or `decline` returned `payment_in_progress` | Nothing changed and a payment is still being verified. Run the same command again in a few seconds; do not pay again. |
|
|
68
69
|
| A receipt `settlement` shows `overcharged: true`, or the CLI warns of a credit balance mismatch | Keep the receipt (`dvm receipts show <job-id>`) and the credit record. Report the charge and the stated ceiling to the human. Do not pay further charges from that provider without new approval. |
|
|
69
70
|
|
|
@@ -427,6 +427,9 @@ export {
|
|
|
427
427
|
info,
|
|
428
428
|
raw,
|
|
429
429
|
progress,
|
|
430
|
+
resolveBtcUsdRate,
|
|
431
|
+
tryResolveBtcUsdRate,
|
|
432
|
+
staleRateNotice,
|
|
430
433
|
formatSats,
|
|
431
434
|
formatAmount,
|
|
432
435
|
formatPaymentAmount,
|
|
@@ -435,8 +438,5 @@ export {
|
|
|
435
438
|
parseBudget,
|
|
436
439
|
assertValidBudget,
|
|
437
440
|
formatAmountBestEffort,
|
|
438
|
-
resolveBtcUsdRate,
|
|
439
|
-
tryResolveBtcUsdRate,
|
|
440
|
-
staleRateNotice,
|
|
441
441
|
tryX402Payment
|
|
442
442
|
};
|