@dvmkit/dvm-cli 0.4.1 → 0.5.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 (32) hide show
  1. package/README.md +8 -0
  2. package/dist/{chunk-24VB7FR7.js → chunk-3YE43JJR.js} +4 -4
  3. package/dist/{chunk-SKKZ4OAA.js → chunk-4KINCBHL.js} +53 -56
  4. package/dist/{chunk-XN4YSEO6.js → chunk-EE2MREOM.js} +152 -93
  5. package/dist/chunk-ERJFRCJO.js +150 -0
  6. package/dist/chunk-FL2ICZW5.js +383 -0
  7. package/dist/chunk-FSYEZERJ.js +1667 -0
  8. package/dist/{chunk-V2BE4E5V.js → chunk-ID5G54HJ.js} +223 -73
  9. package/dist/{chunk-4NWEJTAW.js → chunk-MJ4X4BEW.js} +7953 -8036
  10. package/dist/{chunk-Z75N4GTG.js → chunk-QICJRKB7.js} +23557 -16012
  11. package/dist/{chunk-ECEM3ZAS.js → chunk-R55XNXAR.js} +53 -185
  12. package/dist/{chunk-R4MSO2GX.js → chunk-SHZMNEXE.js} +65 -24
  13. package/dist/chunk-TZWZTS37.js +1517 -0
  14. package/dist/{chunk-VY277ROG.js → chunk-VOO5IAK7.js} +600 -97
  15. package/dist/{chunk-2VVVWBQA.js → chunk-WTM2EICO.js} +2 -352
  16. package/dist/chunk-XHOFQ3OS.js +717 -0
  17. package/dist/{chunk-YLWATJ7F.js → chunk-Z4CZUMUT.js} +937 -1599
  18. package/dist/{client-OWIOFBKS.js → client-RYDA62DU.js} +11 -8
  19. package/dist/{dist-2G3QBGID.js → dist-GKCEIY2A.js} +7 -4
  20. package/dist/dvm.js +478 -70
  21. package/dist/{internal-OBEYRHMV.js → internal-INUTGTXQ.js} +56 -33
  22. package/dist/{payout-reporter-RG6XNGPI-KNY74HLM.js → payout-reporter-3Y2U55ZX-CMKACKA3.js} +2 -2
  23. package/dist/{pocket-refill-NXTJIVB5.js → pocket-refill-K5T4LZF6.js} +18 -14
  24. package/dist/{revenue-reporter-ASZ7SHHH-ISAMJDZQ.js → revenue-reporter-MAERPYGK-CCPZXGFA.js} +2 -2
  25. package/dist/tempo-AXTE4ZEA.js +34 -0
  26. package/dist/{tempo-lifecycle-DFIXQ54Q-LNXPKWK5.js → tempo-lifecycle-ZBBLFBMH-HWI4PLYP.js} +11 -7
  27. package/dist/{tempo-wallet-4QKSV65O-J6ZZQAD7.js → tempo-wallet-B5XXV3YH-SRQBMYFV.js} +2 -2
  28. package/dist/{x402-5H27DCBE-UEQQQ5UY.js → x402-R6HPBY5D-VMSW7Z32.js} +3 -3
  29. package/package.json +2 -2
  30. package/skills/dvm/calling.md +2 -0
  31. package/skills/dvm/credit.md +2 -0
  32. package/dist/chunk-3SWX5BQP.js +0 -66
package/README.md CHANGED
@@ -48,3 +48,11 @@ Release automation is documented in [docs/releasing.md](docs/releasing.md). It p
48
48
  ## License
49
49
 
50
50
  Apache-2.0. See [LICENSE](./LICENSE) and [NOTICE](./NOTICE).
51
+
52
+ ### Provider content expiry
53
+
54
+ `dvm status`, `dvm status --messages`, `dvm messages`, and the reply from `dvm message` report `content_expires_at` (epoch milliseconds or `null` for no automatic expiry) and `content_available` when the provider supplies them. Missing legacy fields mean unknown. `content_metadata_known` is true only when both fields are known; `content_metadata_source` identifies a provider observation or `unknown`. These observations do not renew expiry. A passed deadline alone does not prove content is unavailable.
55
+
56
+ Terminal `dvm status` can replay a saved outcome and receipt offline (`source: "local"`), so its current content metadata is unknown. Use `dvm status --messages` for a fresh authenticated read. Message commands make a separate status read after retrieving messages, bounded to at most five seconds; a failed observation leaves metadata unknown and preserves the messages. Content can change between these reads.
57
+
58
+ Save output before automatic expiry with `dvm messages <job-id> --no-stream > messages.json`. For a portable job without a local record, retain the original `--endpoint` and `--job-token` options before the redirection, or keep `DVM_JOB_ENDPOINT` and `DVM_JOB_TOKEN` set. Never copy the token into shared output or logs. A job already saved in the local record can use the command without those overrides. `--human` retains the existing artifact saves to private temporary files at the printed paths. Unavailable provider content does not remove existing local saves or stored receipts; verify the latter offline with `dvm receipts verify <job-id>`. A no-expiry observation does not promise permanent availability.
@@ -10,9 +10,9 @@ import {
10
10
  resolveRpcHttpTransportOptions,
11
11
  resolveRpcOverride,
12
12
  updateConfig
13
- } from "./chunk-SKKZ4OAA.js";
13
+ } from "./chunk-4KINCBHL.js";
14
14
 
15
- // node_modules/@dvmkit/sdk/dist/chunk-2UUXIIOC.js
15
+ // node_modules/@dvmkit/sdk/dist/chunk-GFY5FRX3.js
16
16
  var TEMPO_USDC_MAINNET = "0x20C000000000000000000000b9537d11c60E8b50";
17
17
  var TEMPO_CHAIN_ID = 4217;
18
18
  var TEMPO_MODERATO_CHAIN_ID = 42431;
@@ -100,7 +100,7 @@ async function generateTempoKey(opts = {}) {
100
100
  );
101
101
  }
102
102
  if (existing && opts.force) {
103
- const { assertTempoWalletIdle } = await import("./tempo-lifecycle-DFIXQ54Q-LNXPKWK5.js");
103
+ const { assertTempoWalletIdle } = await import("./tempo-lifecycle-ZBBLFBMH-HWI4PLYP.js");
104
104
  await assertTempoWalletIdle("replace");
105
105
  }
106
106
  const { privateKeyToAccount, generatePrivateKey } = await import("./accounts-2WZE4N5F.js");
@@ -154,7 +154,7 @@ async function getTempoUsdcBalance(account) {
154
154
  usdc: Number(raw) / 1e6,
155
155
  tokenAddress,
156
156
  chainId: network.chainId,
157
- // internal-review: redacted here rather than at a display surface, so the clear
157
+ // redacted here rather than at a display surface, so the clear
158
158
  // endpoint never leaves this function on the success path either.
159
159
  rpcUrlRedacted: redactUrl(rpcUrl),
160
160
  rpcSource,
@@ -1592,55 +1592,10 @@ var require_proper_lockfile = __commonJS({
1592
1592
  }
1593
1593
  });
1594
1594
 
1595
- // node_modules/@dvmkit/sdk/dist/chunk-MKI6OVW4.js
1595
+ // node_modules/@dvmkit/sdk/dist/chunk-CZULM42S.js
1596
1596
  import { homedir } from "os";
1597
1597
  import { join } from "path";
1598
1598
  import { chmodSync, mkdirSync, statSync } from "fs";
1599
- var DvmError = class extends Error {
1600
- constructor(code, message, hint, data, display, proseSources) {
1601
- super(message);
1602
- this.code = code;
1603
- this.hint = hint;
1604
- this.data = data;
1605
- this.display = display;
1606
- this.proseSources = proseSources;
1607
- this.name = "DvmError";
1608
- }
1609
- code;
1610
- hint;
1611
- data;
1612
- display;
1613
- proseSources;
1614
- };
1615
- function providerProseSources(...sources) {
1616
- const provenance = {};
1617
- for (const source of sources) {
1618
- if (!source) continue;
1619
- for (const field of ["message", "hint", "display"]) {
1620
- if (typeof source[field] === "string") provenance[field] = "provider";
1621
- }
1622
- }
1623
- return Object.keys(provenance).length > 0 ? provenance : void 0;
1624
- }
1625
- function isAbortError(err) {
1626
- return err instanceof Error && (err.name === "AbortError" || err.name === "TimeoutError");
1627
- }
1628
- function transportErrorCode(err) {
1629
- let current = err;
1630
- const seen = /* @__PURE__ */ new Set();
1631
- for (let depth = 0; depth < 5 && isErrorLike(current) && !seen.has(current); depth++) {
1632
- seen.add(current);
1633
- const code = current.code;
1634
- if (typeof code === "string" && /^(?:E[A-Z0-9_]{1,63}|UND_ERR_[A-Z0-9_]{1,63})$/.test(code)) {
1635
- return code;
1636
- }
1637
- current = current.cause;
1638
- }
1639
- return void 0;
1640
- }
1641
- function isErrorLike(value) {
1642
- return (typeof value === "object" || typeof value === "function") && value !== null;
1643
- }
1644
1599
  var CONFIG_DIR = process.env.DVM_CONFIG_DIR ?? join(homedir(), ".dvm");
1645
1600
  var CONFIG_FILE = join(CONFIG_DIR, "config.json");
1646
1601
  var CONFIG_BACKUP_FILE = join(CONFIG_DIR, "config.json.bak");
@@ -1745,6 +1700,53 @@ function resolveRpcHttpTransportOptions(source, envValue) {
1745
1700
  return { fetchOptions: { headers } };
1746
1701
  }
1747
1702
 
1703
+ // node_modules/@dvmkit/sdk/dist/chunk-LIRAHP7B.js
1704
+ var DvmError = class extends Error {
1705
+ constructor(code, message, hint, data, display, proseSources) {
1706
+ super(message);
1707
+ this.code = code;
1708
+ this.hint = hint;
1709
+ this.data = data;
1710
+ this.display = display;
1711
+ this.proseSources = proseSources;
1712
+ this.name = "DvmError";
1713
+ }
1714
+ code;
1715
+ hint;
1716
+ data;
1717
+ display;
1718
+ proseSources;
1719
+ };
1720
+ function providerProseSources(...sources) {
1721
+ const provenance = {};
1722
+ for (const source of sources) {
1723
+ if (!source) continue;
1724
+ for (const field of ["message", "hint", "display"]) {
1725
+ if (typeof source[field] === "string") provenance[field] = "provider";
1726
+ }
1727
+ }
1728
+ return Object.keys(provenance).length > 0 ? provenance : void 0;
1729
+ }
1730
+ function isAbortError(err) {
1731
+ return err instanceof Error && (err.name === "AbortError" || err.name === "TimeoutError");
1732
+ }
1733
+ function transportErrorCode(err) {
1734
+ let current = err;
1735
+ const seen = /* @__PURE__ */ new Set();
1736
+ for (let depth = 0; depth < 5 && isErrorLike(current) && !seen.has(current); depth++) {
1737
+ seen.add(current);
1738
+ const code = current.code;
1739
+ if (typeof code === "string" && /^(?:E[A-Z0-9_]{1,63}|UND_ERR_[A-Z0-9_]{1,63})$/.test(code)) {
1740
+ return code;
1741
+ }
1742
+ current = current.cause;
1743
+ }
1744
+ return void 0;
1745
+ }
1746
+ function isErrorLike(value) {
1747
+ return (typeof value === "object" || typeof value === "function") && value !== null;
1748
+ }
1749
+
1748
1750
  // node_modules/@noble/hashes/utils.js
1749
1751
  function isBytes(a) {
1750
1752
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
@@ -4279,7 +4281,7 @@ var schnorr = /* @__PURE__ */ (() => {
4279
4281
  };
4280
4282
  })();
4281
4283
 
4282
- // node_modules/@dvmkit/sdk/dist/chunk-CGKZDODG.js
4284
+ // node_modules/@dvmkit/sdk/dist/chunk-MZRJR2CW.js
4283
4285
  var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
4284
4286
  import {
4285
4287
  appendFileSync,
@@ -4299,7 +4301,6 @@ var PROTECTED_CONFIG_FIELDS = ["nwcUri", "defaultIdentity", "tempo", "x402"];
4299
4301
  var ProtectedFieldAuthorization = class {
4300
4302
  /** Targets this authorization covers. A field also covers its own leaves. */
4301
4303
  targets;
4302
- /** Prefer {@link authorizeProtectedRemoval}; this exists for it to call. */
4303
4304
  constructor(targets) {
4304
4305
  this.targets = [...targets];
4305
4306
  }
@@ -4573,11 +4574,7 @@ function protectedRemovalError(targets, reason) {
4573
4574
  }
4574
4575
  var PROTECTED_FIELDS = {
4575
4576
  nwcUri: { aliases: [], credentialLeaves: [], secret: true, hexCredential: false },
4576
- // A pointer at a key, not a key: worth protecting from removal, and never
4577
- // worth stripping out of a stored copy — that is recovery lost for nothing.
4578
4577
  defaultIdentity: { aliases: [], credentialLeaves: [], secret: false, hexCredential: false },
4579
- // `mpp` is the pre-internal-review name; a caller who has not run a mutating command
4580
- // since the rename still has their private key under it.
4581
4578
  tempo: { aliases: ["mpp"], credentialLeaves: ["apiKey"], secret: true, hexCredential: true },
4582
4579
  x402: { aliases: [], credentialLeaves: ["privateKey"], secret: true, hexCredential: true }
4583
4580
  };
@@ -5073,10 +5070,6 @@ function isOpaqueToken(segment) {
5073
5070
  }
5074
5071
 
5075
5072
  export {
5076
- DvmError,
5077
- providerProseSources,
5078
- isAbortError,
5079
- transportErrorCode,
5080
5073
  CONFIG_DIR,
5081
5074
  CONFIG_FILE,
5082
5075
  CONFIG_BACKUP_FILE,
@@ -5106,6 +5099,10 @@ export {
5106
5099
  repairConfigDirMode,
5107
5100
  resolveRpcOverride,
5108
5101
  resolveRpcHttpTransportOptions,
5102
+ DvmError,
5103
+ providerProseSources,
5104
+ isAbortError,
5105
+ transportErrorCode,
5109
5106
  anumber,
5110
5107
  abytes,
5111
5108
  ahash,