@dvmkit/dvm-cli 0.1.5 → 0.2.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 +14 -0
- package/dist/{chunk-3W2M46WM.js → chunk-N7MGIK2U.js} +309 -43
- package/dist/dvm.js +420 -146
- package/dist/{internal-QFQ7MJ5V.js → internal-JDG52DJH.js} +3 -1
- package/dist/{pocket-refill-PQ5ZVSBY.js → pocket-refill-QJMMD6QN.js} +4 -1
- package/package.json +2 -2
- package/skills/dvm/SKILL.md +2 -1
|
@@ -200,6 +200,7 @@ import {
|
|
|
200
200
|
issueRouterFeedbackClaim,
|
|
201
201
|
issueUpfrontChallenges,
|
|
202
202
|
jobCredentialGate,
|
|
203
|
+
listTransactions,
|
|
203
204
|
loadAgentWallet,
|
|
204
205
|
loadAllJobs,
|
|
205
206
|
loadConfiguredMints,
|
|
@@ -364,7 +365,7 @@ import {
|
|
|
364
365
|
x402ReservationRelease,
|
|
365
366
|
x402SettledShare,
|
|
366
367
|
x402VoucherPendingRefusal
|
|
367
|
-
} from "./chunk-
|
|
368
|
+
} from "./chunk-N7MGIK2U.js";
|
|
368
369
|
import {
|
|
369
370
|
DvmX402ChannelStorage,
|
|
370
371
|
X402_BATCH_SETTLEMENT_SCHEME,
|
|
@@ -948,6 +949,7 @@ export {
|
|
|
948
949
|
listResumableX402ExactFundings,
|
|
949
950
|
listResumableX402Fundings,
|
|
950
951
|
listTempoChannelAssociations,
|
|
952
|
+
listTransactions,
|
|
951
953
|
listX402Channels,
|
|
952
954
|
loadAgentWallet,
|
|
953
955
|
loadAllJobs,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
recordFloatSpend,
|
|
19
19
|
resolveFundMint,
|
|
20
20
|
sweepPendingMints
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-N7MGIK2U.js";
|
|
22
22
|
import {
|
|
23
23
|
tryResolveBtcUsdRate
|
|
24
24
|
} from "./chunk-G5C6E6PJ.js";
|
|
@@ -112,6 +112,9 @@ async function refill(opts) {
|
|
|
112
112
|
recordFloatSpend({
|
|
113
113
|
principalMsats: payment.principalMsats,
|
|
114
114
|
routingFeeMsats: payment.routingFeeMsats,
|
|
115
|
+
totalWalletFeeMsats: payment.totalWalletFeeMsats,
|
|
116
|
+
unitemizedWalletFeeMsats: payment.unitemizedWalletFeeMsats,
|
|
117
|
+
walletDebitMsats: payment.walletDebitMsats,
|
|
115
118
|
btcRate,
|
|
116
119
|
reference: quoteId ?? `float:${mintUrl}`,
|
|
117
120
|
counterparty: mintUrl,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvmkit/dvm-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "CLI for Digital Vending Machines — discover, pay, and use DVMs from the terminal",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@cashu/cashu-ts": "4.2.1",
|
|
54
|
-
"@dvmkit/sdk": "0.1.
|
|
54
|
+
"@dvmkit/sdk": "0.1.1-rc.7",
|
|
55
55
|
"@x402/evm": "2.21.0",
|
|
56
56
|
"commander": "14.0.3",
|
|
57
57
|
"mppx": "0.8.15",
|
package/skills/dvm/SKILL.md
CHANGED
|
@@ -24,6 +24,7 @@ One funded wallet pays every provider — no accounts, no API keys to broker. Ev
|
|
|
24
24
|
## Money safety — absolute
|
|
25
25
|
|
|
26
26
|
- Never relay wallet secrets: the mnemonic (relay the `mnemonicFile` path instead), `lock_privkey`, a Tempo or x402 hex private key, an NWC connection string, or any `secrets` block (only present under explicit `--show-secret`-style flags). These are spending or recovery credentials; a leak loses funds. Payment *requests* (a BOLT11 `invoice`, a QR) are safe to relay.
|
|
27
|
+
- Treat a job token as a bearer credential: never relay it or place it in a command another person can see. For portable job access, prefer `DVM_JOB_TOKEN` over `--job-token`, and clear it when the follow-up command is done.
|
|
27
28
|
- A hex private key goes in off-argv: `--key-file <path>`, the `DVM_X402_KEY` / `DVM_TEMPO_KEY` env var, or piped stdin. Both stablecoin connect verbs take all three, and neither takes a key as an argument: `dvm wallet tempo-connect <key>` and `dvm wallet x402-connect <key>` are both refused, the value withheld from the error, and a key you already typed there has to be rotated — it is in the user's shell history and process list whatever the command does next. `dvm wallet tempo-connect --api-key <key>` is not the safe alternative it looks like: a flag value leaks exactly as a positional does, so it warns and needs the same rotation. Use it only against a runbook you cannot change, and never beside `--key-file` or `DVM_TEMPO_KEY` — that combination is refused (`conflicting_key_sources`), because the off-argv source would win silently and connect a different key than the one named. An NWC connection string is the same class of secret and arrives the same way: `printf '<nwc-uri>' | dvm wallet connect`, or `--file <path>`. Its positional still works so existing runbooks don't break, but it warns and leaks identically — never put one on argv, and prefer `dvm wallet pair` when the human is remote. A plain-string local `error.message` still needs checking for anything you passed in before relaying it; a marked message is provider-controlled even when it echoes user input.
|
|
28
29
|
- Never blind-retry after an error carrying `spend_committed: true` or `float_payment_unknown` — money may already have moved and a retry can pay twice. Relay `display`, then reconcile with `dvm wallet show` (it re-sends what it can and journals the rest).
|
|
29
30
|
- After `dvm pay <job-id>`, resume the same job with `dvm messages <job-id>` — never re-run `dvm request`. The job is still live; a fresh submit creates a duplicate job and a duplicate charge. Only re-submit when `dvm status` says `failed`.
|
|
@@ -43,7 +44,7 @@ Preflight when wallet state is uncertain: `dvm doctor` (exits 1 on failure, name
|
|
|
43
44
|
6. **Branch** on `next_action`: `respond` → decide or ask the user, then `dvm message <job-id> "<answer>" --type response --prompt-id <id>` (`--json` for schema'd prompts); `pay` → get approval, `dvm pay <job-id>`, then resume via `dvm messages <job-id>`; `poll` → `dvm status <job-id>` later.
|
|
44
45
|
7. **Deliver** — `payload_in` says where the work product is: `"summary"` → the `summary` string is the whole result; `"messages"` → you MUST run `dvm messages <job-id>` and read the `artifact` messages — relaying only the summary loses the actual output.
|
|
45
46
|
|
|
46
|
-
**Provider references:** default to `-d <identifier>` (the owner-qualified identifier discovery returns; resolves favorites, then maps `<handle>--<slug>` to `https://<handle>--<slug>.dvmkit.ai`). `--endpoint` is only for a literal URL the user supplied, or `@<alias>` for a favorite saved with `dvm fav add`. An unfavorited bare identifier rejects locally before network I/O: run `dvm search`, use its qualified identifier, pass an explicit endpoint, or save a favorite. Never pass a bare identifier to `--endpoint` either — it is not a URL. `-d` and `--endpoint` are mutually exclusive
|
|
47
|
+
**Provider references:** default to `-d <identifier>` (the owner-qualified identifier discovery returns; resolves favorites, then maps `<handle>--<slug>` to `https://<handle>--<slug>.dvmkit.ai`). `--endpoint` is only for a literal URL the user supplied, or `@<alias>` for a favorite saved with `dvm fav add`. An unfavorited bare identifier rejects locally before network I/O: run `dvm search`, use its qualified identifier, pass an explicit endpoint, or save a favorite. Never pass a bare identifier to `--endpoint` either — it is not a URL. `-d` and `--endpoint` are mutually exclusive. Follow-up commands normally use the local job record; on another machine, `status`, `messages`, `message`, and `cancel` require both `DVM_JOB_ENDPOINT` and `DVM_JOB_TOKEN` (or the equivalent flags). `pay` may override those values but still requires the original local pending request and spending policy.
|
|
47
48
|
|
|
48
49
|
**Cold start:** providers scale to zero; the first call after idle can take ~10s (heavier DVMs longer). A timeout or 502/504 on first contact is usually the wake, not an outage — retry the same command once before telling the user the provider is down.
|
|
49
50
|
|