@dvmkit/dvm-cli 0.15.3 → 0.16.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.
Files changed (26) hide show
  1. package/dist/{chunk-I7ZBID4L.js → chunk-2TNH4ME5.js} +2 -2
  2. package/dist/{chunk-HXTASGHL.js → chunk-A2B7QDMS.js} +2 -2
  3. package/dist/{chunk-EZL4IVCU.js → chunk-CEBEPXQ7.js} +3 -3
  4. package/dist/{chunk-57PXJ56K.js → chunk-DGA5EFKU.js} +354 -186
  5. package/dist/{chunk-UWVMG4VG.js → chunk-H6WQ4S6K.js} +3 -3
  6. package/dist/{chunk-D5CGDS3V.js → chunk-IK7RI645.js} +2 -2
  7. package/dist/{chunk-DZHEYRS2.js → chunk-LDYMUQZE.js} +2782 -2606
  8. package/dist/{chunk-F45ETHDP.js → chunk-NSA2RJ2T.js} +14 -6
  9. package/dist/{chunk-YQJRKWNT.js → chunk-U2PODYIS.js} +24487 -22833
  10. package/dist/{chunk-UCCT5IKU.js → chunk-UFMAHF6T.js} +63 -1
  11. package/dist/{chunk-2MCZ4QOK.js → chunk-WRIXUSMR.js} +2 -2
  12. package/dist/{chunk-HJ2JYBTT.js → chunk-WSLZBJ52.js} +4 -4
  13. package/dist/{client-NBC2IDA2.js → client-S5PTHG25.js} +6 -6
  14. package/dist/dvm.js +159 -75
  15. package/dist/{internal-O7IQD6EQ.js → internal-3SIUYRWP.js} +5 -5
  16. package/dist/{lifecycle-MIJH3JE4.js → lifecycle-7NHL5ATK.js} +6 -6
  17. package/dist/{payout-reporter-Y6OW3FYD-K6MRWQXK.js → payout-reporter-F5LFV5W4-EJ7E5ALO.js} +2 -2
  18. package/dist/{pocket-refill-LCDXSC74.js → pocket-refill-3CA4PFXG.js} +10 -10
  19. package/dist/{revenue-reporter-CIG2MEDN-ZXMO6NWG.js → revenue-reporter-2U55YH2I-EUB6PBRN.js} +2 -2
  20. package/dist/{tempo-lifecycle-FMBCHD2M.js → tempo-lifecycle-GAM3DJ63.js} +8 -8
  21. package/dist/{tempo-wallet-U3WBWIIH.js → tempo-wallet-JTARPYLN.js} +7 -7
  22. package/dist/{wallet-Z3FDX43V.js → wallet-QKAKRLPI.js} +7 -7
  23. package/dist/{x402-ARXZQ5BD-H6PNJYYT.js → x402-G6C4N2BN-TAJEBQGU.js} +2 -2
  24. package/package.json +2 -2
  25. package/skills/dvm/calling.md +1 -1
  26. package/skills/dvm/wallets.md +9 -1
@@ -12,7 +12,7 @@ import {
12
12
  isSignableExactRequirement,
13
13
  maxAdvertisedMicro,
14
14
  withinAdvertisedTolerance
15
- } from "./chunk-YQJRKWNT.js";
15
+ } from "./chunk-U2PODYIS.js";
16
16
  import {
17
17
  DvmError,
18
18
  X402_V1_VERSION,
@@ -30,7 +30,7 @@ import {
30
30
  usdcToMsats,
31
31
  x402NetworkByCaip2,
32
32
  x402NetworkToCaip2
33
- } from "./chunk-57PXJ56K.js";
33
+ } from "./chunk-DGA5EFKU.js";
34
34
 
35
35
  // src/lib/x402/client.ts
36
36
  import { randomBytes } from "crypto";
@@ -53,11 +53,12 @@ function withJobPersistence(run, warn) {
53
53
  // src/lib/output.ts
54
54
  var warnings = new AsyncLocalStorage2();
55
55
  function withOutputWarnings(run, human) {
56
- return warnings.run([], () => withJobPersistence(run, () => {
56
+ return warnings.run([], () => withJobPersistence(run, ({ accessPreserved, accessUnpreserved }) => {
57
+ const hint = accessUnpreserved ? "Job access was not preserved. Supply --endpoint <url> and --job-token <hex>, or DVM_JOB_ENDPOINT and DVM_JOB_TOKEN, to read this job; do not submit or pay again." : "Refresh the job with dvm status <job_id> --messages before paying or submitting a replacement.";
57
58
  addOutputWarnings([{
58
59
  code: "local_job_state_unsaved",
59
- display: "The provider's outcome is unchanged, but local job state could not be saved and may lag. Automatic payments are paused for this command.",
60
- hint: "Once local storage is available, refresh the job with dvm status <job_id> --messages before paying or submitting a replacement."
60
+ display: "The provider's outcome is unchanged, but local job state could not be saved and may lag. Automatic payments are paused for this command." + (accessUnpreserved ? ` ${hint}` : accessPreserved ? ` Job access is preserved privately. ${hint}` : ""),
61
+ hint
61
62
  }], human);
62
63
  }));
63
64
  }
@@ -75,7 +76,14 @@ function addOutputWarnings(entries, human) {
75
76
  const pending = warnings.getStore();
76
77
  const added = [];
77
78
  for (const entry of entries) {
78
- if (pending?.some((prior) => sameWarning(prior, entry))) continue;
79
+ const index = pending?.findIndex((prior) => sameWarning(prior, entry)) ?? -1;
80
+ if (index !== -1) {
81
+ const prior = pending[index];
82
+ if (entry.code !== "local_job_state_unsaved" || JSON.stringify(prior) === JSON.stringify(entry)) continue;
83
+ pending[index] = entry;
84
+ if (human) info(`Warning: ${entry.display}`);
85
+ continue;
86
+ }
79
87
  pending?.push(entry);
80
88
  added.push(entry);
81
89
  if (human) info(`Warning: ${entry.display}`);