@dvmkit/dvm-cli 0.11.3 → 0.12.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-BPWZNIMS.js → chunk-RMYEB2WG.js} +21 -0
- package/dist/{chunk-MIYOOJRL.js → chunk-WPTJM5A7.js} +720 -42
- package/dist/{client-DS4QJ346.js → client-V7KAPCAG.js} +1 -1
- package/dist/dvm.js +769 -876
- package/dist/{pocket-refill-JYYODE6X.js → pocket-refill-Z4YT7CHW.js} +2 -2
- package/package.json +1 -1
- package/skills/dvm/calling.md +5 -1
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
recordFloatSpend,
|
|
14
14
|
resolveFundMint,
|
|
15
15
|
sweepPendingMints
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WPTJM5A7.js";
|
|
17
17
|
import "./chunk-7N3HQJKE.js";
|
|
18
18
|
import {
|
|
19
19
|
info,
|
|
20
20
|
tryResolveBtcUsdRate
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RMYEB2WG.js";
|
|
22
22
|
import "./chunk-GEZVSJDM.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.
|
|
3
|
+
"version": "0.12.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
|
@@ -8,6 +8,8 @@ Reuse an endpoint or favourite the user already chose. Run `dvm fav list` when t
|
|
|
8
8
|
|
|
9
9
|
Use the qualified `identifier` returned by discovery with `-d`. Use `--endpoint` for an actual URL or a saved `@alias`; never invent a URL from an unqualified name. Confirm that the selected capability accepts the input and provides the result the user needs.
|
|
10
10
|
|
|
11
|
+
For a service URL the user already has, including an unlisted service, inspect it directly with `dvm describe https://example.com`. Select a capability by appending its advertised name: `dvm quote --endpoint https://example.com/ask --input "your question"`, then use the same URL with `dvm request`. `dvm describe https://example.com/ask` also accepts this form. A working base path takes precedence: the final segment is treated as a capability only when that URL's `/v1/info` returns 404 and its immediate parent advertises capabilities. An unknown name returns `unknown_capability`; a base URL with several choices returns `ambiguous_capability`. Both errors list `available_capabilities` and give a direct retry without discovery. `not_a_dvm_endpoint` means `/v1/info` returned 404; check the service base URL.
|
|
12
|
+
|
|
11
13
|
To remember a chosen service, save its verified endpoint:
|
|
12
14
|
|
|
13
15
|
```bash
|
|
@@ -23,6 +25,8 @@ Check the existing mapping before replacing an alias. Reuse it with `dvm request
|
|
|
23
25
|
2. Quote the selected service with the same input you intend to submit. Relay its amount, currency, and pricing description. For metered work, establish an authorized ceiling. Explain any cost/quality choice that affects the requested result; do not silently downgrade it to fit a budget.
|
|
24
26
|
3. Check `dvm budget status` when the planned spend may approach a cap. Obtain approval only for choices not already authorized. If a wallet or funding is needed, continue through [wallets](wallets.md). If repeat work warrants prepayment, use [credit](credit.md).
|
|
25
27
|
|
|
28
|
+
For metered DVMs, size `--auto-pay-below` for the largest authorized charge (the default is 20% of `--budget`); relay quote `warnings` and use the suggested value only within approved limits, including with `--credit-only`.
|
|
29
|
+
|
|
26
30
|
## Run and deliver
|
|
27
31
|
|
|
28
32
|
Submit once with `dvm request`, preserving the approved input and spending limits. Save the returned request and job identifiers. A long job can use `--no-stream` and be followed through its recorded job.
|
|
@@ -41,7 +45,7 @@ When a respond or pay action includes `expires_at_ms` (Unix milliseconds), relay
|
|
|
41
45
|
|
|
42
46
|
Read `payload_in`: when it points to messages, retrieve them and obtain the artifact rather than reporting only the summary. Check the result against the user's request. Keep receipt verification separate from result quality and job completion.
|
|
43
47
|
|
|
44
|
-
`dvm status <job-id>` includes `spend` for locally recorded jobs. Relay its `display` to show the total paid, charge count, approved budget, and refund count. `charges` lists conversation payments in sequence order with fiat-first `display`, `rail`, provider-wrapped `reason`, and `approval` (`auto`, `explicit`, or `unknown` for older records). `payments` includes upfront payments; `max_payments` is the stored cap on all payments, including the upfront payment. `total_msats` comes from the stored running total, which already includes the upfront rail payment (falling back to the completion cost for older records). `upfront_display` identifies the difference between that total and the conversation charges; the initial payment has no conversation message. When every payment has a recorded price in one fiat currency, the total sums those prices and the budget uses the resulting aggregate fiat/msat ratio. An upfront payment without a recorded fiat price keeps the existing amount display. Jobs paid from prepaid credit say so; their upfront draw amount is not recorded locally, and `upfront_display` is omitted. Refunds (including change) are listed separately and do not reduce the gross paid total. `log_mismatch` flags inconsistent local payment amounts or counts only after a job is terminal, including when the total minus conversation charges differs from a recorded completion cost; an active log may still be behind. A job that started free records no completion cost, so a missing mid-job payment message there shows as an upfront amount rather than a mismatch. When a receipt is available, `receipt_total_display` shows its signed total. `receipt_mismatch` is true when
|
|
48
|
+
`dvm status <job-id>` includes `spend` for locally recorded jobs. Relay its `display` to show the total paid, charge count, approved budget, and refund count. `charges` lists conversation payments in sequence order with fiat-first `display`, `rail`, provider-wrapped `reason`, and `approval` (`auto`, `explicit`, or `unknown` for older records). `payments` includes upfront payments; `max_payments` is the stored cap on all payments, including the upfront payment. `total_msats` comes from the stored running total, which already includes the upfront rail payment (falling back to the completion cost for older records). `upfront_display` identifies the difference between that total and the conversation charges; the initial payment has no conversation message. When every payment has a recorded price in one fiat currency, the total sums those prices and the budget uses the resulting aggregate fiat/msat ratio. An upfront payment without a recorded fiat price keeps the existing amount display. Jobs paid from prepaid credit say so; their upfront draw amount is not recorded locally, and `upfront_display` is omitted. Refunds (including change) are listed separately and do not reduce the gross paid total. `log_mismatch` flags inconsistent local payment amounts or counts only after a job is terminal, including when the total minus conversation charges differs from a recorded completion cost; an active log may still be behind. A job that started free records no completion cost, so a missing mid-job payment message there shows as an upfront amount rather than a mismatch. When a receipt is available, `receipt_total_display` shows its signed total. `receipt_mismatch` is true when comparable Bitcoin-native signed and local totals differ in either direction, and false when they agree. The display states both amounts neutrally: mint fees, returned change, or a payment not recorded locally can explain the difference. If the receipt, upfront record, or any conversation charge identifies Tempo/x402, the aggregate BTC totals are exchange-rate valuations. Their displays are labeled `BTC valuation`; `receipt_mismatch` is omitted even when the converted totals happen to agree. The display explicitly says the comparison is unknown because local records lack comparable native settlement amounts. Converted BTC differences do not establish a difference in token principal or fees, including on mixed-rail jobs. For jobs paid from prepaid credit, the comparison is unknown and `receipt_mismatch` is omitted because the local record does not hold the credit draw amount; the receipt total includes that draw. Check `receipt_verified` separately before trusting the signature. Human status prints the bill and charge list before `Next:`. Jobs accessed without a local record omit `spend`.
|
|
45
49
|
|
|
46
50
|
Check `content_metadata_source` and `content_metadata_known` before reporting content availability or expiry. `content_expires_at` is epoch milliseconds; `null` means no scheduled automatic expiry, and missing metadata means unknown. Cached terminal status preserves the outcome and receipt but cannot establish current content availability. Use `dvm status <job-id> --messages` for a fresh read. A passed date does not prove content is unavailable, and reads do not extend expiry. Save useful output with `dvm messages <job-id> --no-stream > messages.json`. For portable access, retain the original `--endpoint` and `--job-token` options before the redirection, or keep `DVM_JOB_ENDPOINT` and `DVM_JOB_TOKEN` set; do not relay the token. Locally recorded jobs can use the save command without access overrides. `--human` saves artifacts to private temporary files at the printed paths. Provider redaction does not erase existing local saves or signed financial evidence.
|
|
47
51
|
|