@dvmkit/dvm-cli 0.15.1 → 0.15.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvmkit/dvm-cli",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
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
|
@@ -47,7 +47,7 @@ A charge above the job's `--auto-pay-below` limit is never paid automatically. T
|
|
|
47
47
|
|
|
48
48
|
Every payment buys the next piece of work, and every ask is new money. However a job ends, it charges the pieces already finished.
|
|
49
49
|
|
|
50
|
-
- **Keep the finished work:** decline at the next ask with `dvm decline <job-id>` (optional `--reason`). The job ends at once and nothing further is bought. JSON returns `declined: true` and, when the receipt arrives, `settlement` with `charged_micro`, `held_micro`, `released_micro` and `currency`. Relay `display
|
|
50
|
+
- **Keep the finished work:** decline at the next ask with `dvm decline <job-id>` (optional `--reason`). The job ends at once and nothing further is bought. JSON returns `declined: true` and, when the receipt arrives, `settlement` with `charged_micro`, `held_micro`, `released_micro` and `currency`. Relay `display` and `next_step_hint`: finished artifacts stay with the job. Read them with `dvm messages <job-id> --no-stream`; `has_artifacts` and `artifact_count` say what the job holds when known. `no_open_ask` means nothing is waiting for an answer: wait for the next ask with `dvm messages <job-id> --wait` and decline then. `decline_unsupported` means the DVM predates decline and the job is still running.
|
|
51
51
|
- **Halt the work now:** `dvm cancel <job-id>` cancels immediately with no confirmation and spends no new money. It charges every paid piece, including the one in progress, and its `display` names that amount, e.g. "Stopped. The $0.36 USD paid for the work in progress is not refunded." Use it only when the work must stop before the next ask.
|
|
52
52
|
|
|
53
53
|
Both commands wait and resend automatically while the DVM is still verifying a payment. If they still return `payment_in_progress`, nothing changed: run the same command again in a few seconds and do not pay again.
|
package/skills/dvm/recovery.md
CHANGED
|
@@ -31,7 +31,7 @@ Preserve these identifiers exactly as opaque strings; do not rebuild them from p
|
|
|
31
31
|
|
|
32
32
|
| Surface | Promised recovery fields and meaning |
|
|
33
33
|
| --- | --- |
|
|
34
|
-
| Request submission and `request-result` / `request-resume` output | `request_id`, when a public request ID was supplied, identifies the original signed request. Recovered output has `request_id` and `jobId`; a live recovered job has a `poll` action with that same ID in `job_id`, and a terminal recovered job has `next_action: null`. Structured unknown-outcome errors retain `error.request_id` and `error.status: "unknown"` where emitted. |
|
|
34
|
+
| Request submission and `request-result` / `request-resume` output | `request_id`, when a public request ID was supplied, identifies the original signed request. Recovered output has `request_id` and `jobId`; a live recovered job has a `poll` action with that same ID in `job_id`, and a terminal recovered job has `next_action: null`. Structured unknown-outcome errors retain `error.request_id` and `error.status: "unknown"` where emitted. A `dvm request` the CLI refused before sending anything carries `error.submitted: false`; the lookup commands then fail with `error.code: "request_not_submitted"`, `error.status: "not_submitted"`, `error.submitted: false`, `error.refusal_code`, optional `error.refusal_reason`, and `error.refused_at` (ISO-8601). |
|
|
35
35
|
| `wallet submissions` entries in `pending_submissions` | `request_id` is the wallet journal's request UUID. Optional `public_request_id` is the signed request ID used by `request-result`; these IDs can differ. `state: "reclaimable"` means retries have stopped but a refund clause can return unredeemed funds; `reclaim_at` is its ISO-8601 eligibility time. `state: "reclaim_failed"` means reclaim was attempted unsuccessfully; `reclaim_error` is the string reason. Both states retain recoverable records and are excluded from `stranded_count`. Forgetting them requires explicit `--force` as well as confirmation. |
|
|
36
36
|
| Credit recovery records and notices | `credit_id` identifies the credit reported by the operation, `fund_id` is its reported funding idempotency key, and `drain_id` identifies the original refund where emitted. A reconciled credit ID can differ from the one requested: follow the returned ID. Deferred notices have the exception below. A returned `drain_command` is the command for that recorded reclaim, not permission to create another payment. The rest of funding output is outside this promise. |
|
|
37
37
|
| `wallet recover-submission` output | `request_id` is the exact wallet journal UUID; `recovery_attempts` is a number and `job_id` is a string or null. Its recovery action is `verify_receipt` with string `job_id` when a job was recovered, or `lookup_receipt` with string `request_id` when no job ID was established. These actions request verification/lookup, never a second payment. |
|
|
@@ -44,7 +44,7 @@ These command forms and safeguards are promised:
|
|
|
44
44
|
|
|
45
45
|
| Command or action | Prerequisites and effect |
|
|
46
46
|
| --- | --- |
|
|
47
|
-
| `dvm request-result <request-id>` | Requires the saved request intent and original signing identity. Reads the original accepted job without submitting a replacement or sending payment credentials. Missing state or not found leaves the payment outcome unknown. |
|
|
47
|
+
| `dvm request-result <request-id>` | Requires the saved request intent and original signing identity. Reads the original accepted job without submitting a replacement or sending payment credentials. Missing state or not found leaves the payment outcome unknown, except `request_not_submitted`: the CLI recorded refusing that request ID before sending it, so no job or payment exists and retrying the same approved request is safe. A saved intent always takes precedence over that record. |
|
|
48
48
|
| `dvm request-resume <request-id>` | First tries `request-result`; only a not-found result allows the dedicated resume route to finish a durably accepted request. Uses the original intent and signer without payment credentials, then reads the canonical result. |
|
|
49
49
|
| `next_action.type: "resubmit"` | Has string `command` and `hint`, and `requires_user_approval: true`. `command` is a shell-ready `dvm request …` preserving the original request and safety options with the stated adjustments. Run it only after the user approves and the prior outcome permits resubmission. There is no separate `request-resubmit` command. |
|
|
50
50
|
| `dvm wallet recover-submission <request-id> --binding-fingerprint <sha256>` | Requires the exact journal UUID and original binding fingerprint. Under the wallet lock it permits one recovery attempt using the same payment, records that attempt before I/O, and leaves unrelated submissions untouched. An unknown outcome consumes that attempt; verification or lookup must follow. |
|
|
@@ -60,7 +60,7 @@ Cold starts do not justify replaying an arbitrary command. The CLI already retri
|
|
|
60
60
|
| Known state | Next step |
|
|
61
61
|
| --- | --- |
|
|
62
62
|
| A job ID exists | Inspect `dvm status <job-id>` and its messages. Continue that job's requested action. After payment, resume messages rather than submit a replacement. |
|
|
63
|
-
| A request ID exists but the job outcome is unknown | Use `dvm request-result <request-id>` with the original caller state. Follow the returned recovery guidance, including `dvm request-resume <request-id>` when appropriate. Missing state or a not-found response does not authorize a new payment. |
|
|
63
|
+
| A request ID exists but the job outcome is unknown | Use `dvm request-result <request-id>` with the original caller state. Follow the returned recovery guidance, including `dvm request-resume <request-id>` when appropriate. Missing state or a not-found response does not authorize a new payment. A `request_not_submitted` response (or `submitted: false` on the refusal itself) means nothing was sent under that ID; fix the refusal reason and retry the same approved request. |
|
|
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. |
|