@dvmkit/dvm-cli 0.15.3 → 0.17.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-HXTASGHL.js → chunk-A2B7QDMS.js} +2 -2
  2. package/dist/{chunk-DZHEYRS2.js → chunk-DE7TEOUR.js} +3136 -2821
  3. package/dist/{chunk-57PXJ56K.js → chunk-DGA5EFKU.js} +354 -186
  4. package/dist/{chunk-2MCZ4QOK.js → chunk-ESQ6DCS3.js} +4 -4
  5. package/dist/{chunk-D5CGDS3V.js → chunk-IK7RI645.js} +2 -2
  6. package/dist/{chunk-HJ2JYBTT.js → chunk-OEWENVJ7.js} +5 -5
  7. package/dist/{chunk-F45ETHDP.js → chunk-R6FZT6S2.js} +14 -6
  8. package/dist/{chunk-I7ZBID4L.js → chunk-REIUNZQX.js} +2 -2
  9. package/dist/{chunk-YQJRKWNT.js → chunk-THTPKBZX.js} +24488 -22833
  10. package/dist/{chunk-UCCT5IKU.js → chunk-UFMAHF6T.js} +63 -1
  11. package/dist/{chunk-UWVMG4VG.js → chunk-VLD7OKSH.js} +6 -6
  12. package/dist/{chunk-EZL4IVCU.js → chunk-ZGBCVQF2.js} +3 -3
  13. package/dist/{client-NBC2IDA2.js → client-3JOMNAIQ.js} +6 -6
  14. package/dist/dvm.js +468 -217
  15. package/dist/{internal-O7IQD6EQ.js → internal-L362ZUWL.js} +5 -5
  16. package/dist/{lifecycle-MIJH3JE4.js → lifecycle-BH4OA5I3.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-5BEM22UM.js} +12 -12
  19. package/dist/{revenue-reporter-CIG2MEDN-ZXMO6NWG.js → revenue-reporter-2U55YH2I-EUB6PBRN.js} +2 -2
  20. package/dist/{tempo-lifecycle-FMBCHD2M.js → tempo-lifecycle-WGTX6MJR.js} +8 -8
  21. package/dist/{tempo-wallet-U3WBWIIH.js → tempo-wallet-OTB2YSWE.js} +7 -7
  22. package/dist/{wallet-Z3FDX43V.js → wallet-73EJBUSO.js} +7 -7
  23. package/dist/{x402-ARXZQ5BD-H6PNJYYT.js → x402-G6C4N2BN-TAJEBQGU.js} +2 -2
  24. package/package.json +3 -2
  25. package/skills/dvm/calling.md +3 -1
  26. package/skills/dvm/wallets.md +9 -1
@@ -8,10 +8,10 @@ import {
8
8
  CONFIG_PINNED_FILE,
9
9
  ensureConfigDir,
10
10
  require_proper_lockfile
11
- } from "./chunk-YQJRKWNT.js";
11
+ } from "./chunk-THTPKBZX.js";
12
12
  import {
13
13
  DvmError
14
- } from "./chunk-57PXJ56K.js";
14
+ } from "./chunk-DGA5EFKU.js";
15
15
  import {
16
16
  __toESM
17
17
  } from "./chunk-IYHTITNZ.js";
@@ -301,8 +301,8 @@ var PROTECTED_FIELDS = {
301
301
  };
302
302
  var CONFIG_PATH_SHAPE = {
303
303
  float: { statedBudget: {}, connectedAt: {}, alias: {}, methods: {} },
304
- x402: { privateKey: {}, network: {} },
305
- tempo: { method: {}, accountId: {}, apiKey: {}, network: {} },
304
+ x402: { privateKey: {}, network: {}, generated: {} },
305
+ tempo: { method: {}, accountId: {}, apiKey: {}, network: {}, generated: {} },
306
306
  credit: {
307
307
  targetJobs: {},
308
308
  posture: {},
@@ -6,9 +6,9 @@ import {
6
6
  } from "./chunk-R2DSAZBO.js";
7
7
  import {
8
8
  diagnosticConsole
9
- } from "./chunk-UCCT5IKU.js";
9
+ } from "./chunk-UFMAHF6T.js";
10
10
 
11
- // node_modules/@dvmkit/sdk/dist/chunk-PDWVERRC.js
11
+ // node_modules/@dvmkit/sdk/dist/chunk-YO6VWXWF.js
12
12
  import { createHash, randomUUID } from "crypto";
13
13
  async function x402EarnedCeiling(channel, earnedNative) {
14
14
  let earned;
@@ -4,14 +4,14 @@ const require = __dvmCreateRequire(import.meta.url);
4
4
  import {
5
5
  loadConfig,
6
6
  updateConfig
7
- } from "./chunk-2MCZ4QOK.js";
7
+ } from "./chunk-ESQ6DCS3.js";
8
8
  import {
9
9
  tempoAccountFromConfig,
10
10
  tryResolveTempoAsset
11
- } from "./chunk-YQJRKWNT.js";
11
+ } from "./chunk-THTPKBZX.js";
12
12
  import {
13
13
  DvmError
14
- } from "./chunk-57PXJ56K.js";
14
+ } from "./chunk-DGA5EFKU.js";
15
15
 
16
16
  // src/lib/payment-rails/tempo-wallet.ts
17
17
  function tempoBalanceCheckHint(token) {
@@ -46,7 +46,7 @@ async function generateTempoKey(opts = {}) {
46
46
  );
47
47
  }
48
48
  if (existing && opts.force) {
49
- const { assertTempoWalletIdle } = await import("./tempo-lifecycle-FMBCHD2M.js");
49
+ const { assertTempoWalletIdle } = await import("./tempo-lifecycle-WGTX6MJR.js");
50
50
  await assertTempoWalletIdle("replace");
51
51
  }
52
52
  const { privateKeyToAccount, generatePrivateKey } = await import("./accounts-2WZE4N5F.js");
@@ -62,7 +62,7 @@ async function generateTempoKey(opts = {}) {
62
62
  reason: "tempo_wallet_generate",
63
63
  patch: () => ({
64
64
  set: {
65
- tempo: { method: "tempo", apiKey: privateKey, network: generated.network }
65
+ tempo: { method: "tempo", apiKey: privateKey, network: generated.network, generated: true }
66
66
  }
67
67
  })
68
68
  });
@@ -12,7 +12,7 @@ import {
12
12
  isSignableExactRequirement,
13
13
  maxAdvertisedMicro,
14
14
  withinAdvertisedTolerance
15
- } from "./chunk-YQJRKWNT.js";
15
+ } from "./chunk-THTPKBZX.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}`);
@@ -5,10 +5,10 @@ import {
5
5
  formatUsdcMicrounits,
6
6
  listX402Channels,
7
7
  readX402ChannelGuardFacts
8
- } from "./chunk-YQJRKWNT.js";
8
+ } from "./chunk-THTPKBZX.js";
9
9
  import {
10
10
  DvmError
11
- } from "./chunk-57PXJ56K.js";
11
+ } from "./chunk-DGA5EFKU.js";
12
12
 
13
13
  // src/lib/x402/lifecycle.ts
14
14
  async function assertX402WalletIdle(wallet, intent) {