@dvmkit/dvm-cli 0.17.0 → 0.19.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.
- package/README.md +1 -1
- package/dist/{chunk-ESQ6DCS3.js → chunk-3NXAIRFF.js} +2 -2
- package/dist/{chunk-REIUNZQX.js → chunk-B5KW2TPR.js} +2 -2
- package/dist/{chunk-DGA5EFKU.js → chunk-DF2OWCRY.js} +6 -6
- package/dist/{chunk-R6FZT6S2.js → chunk-DJDONOMG.js} +9 -5
- package/dist/{chunk-DE7TEOUR.js → chunk-J3HYNDMI.js} +424 -51
- package/dist/{chunk-OEWENVJ7.js → chunk-MM646MFM.js} +4 -4
- package/dist/{chunk-VLD7OKSH.js → chunk-NKD4NEUF.js} +3 -3
- package/dist/{chunk-ZGBCVQF2.js → chunk-OCVRCWBL.js} +3 -3
- package/dist/{chunk-IK7RI645.js → chunk-W4ADV3HW.js} +449 -5
- package/dist/{chunk-UFMAHF6T.js → chunk-WCX4PNEF.js} +127 -40
- package/dist/{chunk-THTPKBZX.js → chunk-X6BETQ7V.js} +1252 -737
- package/dist/{chunk-A2B7QDMS.js → chunk-ZZCYSYXR.js} +2 -2
- package/dist/{client-3JOMNAIQ.js → client-S3FEXAWD.js} +6 -6
- package/dist/dvm.js +687 -249
- package/dist/{internal-L362ZUWL.js → internal-WAQ3LZN4.js} +10 -8
- package/dist/{lifecycle-BH4OA5I3.js → lifecycle-NOK3MKL4.js} +6 -6
- package/dist/{payout-reporter-F5LFV5W4-EJ7E5ALO.js → payout-reporter-5PH53T44-7IA4NGIN.js} +2 -2
- package/dist/{pocket-refill-5BEM22UM.js → pocket-refill-KUBHM7MR.js} +10 -10
- package/dist/{revenue-reporter-2U55YH2I-EUB6PBRN.js → revenue-reporter-4XV3OO5O-RYHS3M34.js} +2 -2
- package/dist/{tempo-lifecycle-WGTX6MJR.js → tempo-lifecycle-QGJ4JEHN.js} +8 -8
- package/dist/{tempo-wallet-OTB2YSWE.js → tempo-wallet-GDDZZP5S.js} +7 -7
- package/dist/{wallet-73EJBUSO.js → wallet-2M3H75UP.js} +7 -7
- package/dist/{x402-G6C4N2BN-TAJEBQGU.js → x402-FHHB3V4V-CM6OMLHE.js} +2 -2
- package/package.json +2 -2
- package/skills/dvm/calling.md +13 -2
- package/skills/dvm/credit.md +5 -1
- package/skills/dvm/recovery.md +2 -0
- package/skills/dvm/wallets.md +2 -0
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Keep the skill and CLI on the same package version. After `npm update --global @
|
|
|
30
30
|
|
|
31
31
|
## First job
|
|
32
32
|
|
|
33
|
-
For a first job, ask your agent: "Load the dvm skill, find a service for my task, and show me its price before spending." The skill's calling procedure takes over from discovery through submitting a job and retrieving its result. If payment is needed, its wallet procedure explains the human steps for connecting or funding a wallet. Commands return structured JSON by default; use `--human` for direct terminal reading.
|
|
33
|
+
For a first job, ask your agent: "Load the dvm skill, find a service for my task, and show me its price before spending." The skill's calling procedure takes over from discovery through submitting a job and retrieving its result. If payment is needed, its wallet procedure explains the human steps for connecting or funding a wallet. Commands return structured JSON by default; use `--human` for direct terminal reading. `dvm messages <job-id> --wait` instead writes one JSON object per line as the job runs, ending with a `result` or `error` line; the [calling procedure](skills/dvm/calling.md#run-and-deliver) explains how to read it.
|
|
34
34
|
|
|
35
35
|
## What's in the package
|
|
36
36
|
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
CONFIG_PINNED_FILE,
|
|
9
9
|
ensureConfigDir,
|
|
10
10
|
require_proper_lockfile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-X6BETQ7V.js";
|
|
12
12
|
import {
|
|
13
13
|
DvmError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DF2OWCRY.js";
|
|
15
15
|
import {
|
|
16
16
|
__toESM
|
|
17
17
|
} from "./chunk-IYHTITNZ.js";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
formatUsdcMicrounits,
|
|
6
6
|
listX402Channels,
|
|
7
7
|
readX402ChannelGuardFacts
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-X6BETQ7V.js";
|
|
9
9
|
import {
|
|
10
10
|
DvmError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DF2OWCRY.js";
|
|
12
12
|
|
|
13
13
|
// src/lib/x402/lifecycle.ts
|
|
14
14
|
async function assertX402WalletIdle(wallet, intent) {
|
|
@@ -3,7 +3,7 @@ import { createRequire as __dvmCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
diagnosticConsole
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WCX4PNEF.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./chunk-IYHTITNZ.js";
|
|
@@ -120,7 +120,7 @@ function isOpaqueToken(segment) {
|
|
|
120
120
|
return false;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
123
|
+
// node_modules/@dvmkit/sdk/dist/chunk-LPGORCIO.js
|
|
124
124
|
var X402_DEFAULT_FACILITATOR = "https://x402.org/facilitator";
|
|
125
125
|
var DvmError = class extends Error {
|
|
126
126
|
constructor(code, message2, hint, data, display, proseSources) {
|
|
@@ -3063,7 +3063,7 @@ var schnorr = /* @__PURE__ */ (() => {
|
|
|
3063
3063
|
};
|
|
3064
3064
|
})();
|
|
3065
3065
|
|
|
3066
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
3066
|
+
// node_modules/@dvmkit/sdk/dist/chunk-B5ZJZ2PG.js
|
|
3067
3067
|
function resolveX402Asset(network = X402_DEFAULT_NETWORK) {
|
|
3068
3068
|
const spec = x402NetworkByCaip2(network);
|
|
3069
3069
|
if (!spec) return null;
|
|
@@ -3176,7 +3176,7 @@ function buildNoopLoggers() {
|
|
|
3176
3176
|
};
|
|
3177
3177
|
}
|
|
3178
3178
|
|
|
3179
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
3179
|
+
// node_modules/@dvmkit/sdk/dist/chunk-BU2MAVRZ.js
|
|
3180
3180
|
import { AsyncLocalStorage } from "async_hooks";
|
|
3181
3181
|
import { createPrivateKey, randomBytes as randomBytes2 } from "crypto";
|
|
3182
3182
|
|
|
@@ -10668,7 +10668,7 @@ var SignJWT = class {
|
|
|
10668
10668
|
}
|
|
10669
10669
|
};
|
|
10670
10670
|
|
|
10671
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
10671
|
+
// node_modules/@dvmkit/sdk/dist/chunk-BU2MAVRZ.js
|
|
10672
10672
|
var scopes = new AsyncLocalStorage();
|
|
10673
10673
|
function withPaymentDiagnostics(fn) {
|
|
10674
10674
|
return scopes.run({}, fn);
|
|
@@ -10931,7 +10931,7 @@ function logRejected(stage) {
|
|
|
10931
10931
|
});
|
|
10932
10932
|
}
|
|
10933
10933
|
|
|
10934
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
10934
|
+
// node_modules/@dvmkit/sdk/dist/chunk-4I7ALDKJ.js
|
|
10935
10935
|
async function verifyX402Payment(paymentHeader, config, requiredUsdcMicro, resource, btcUsdRate, exactVersions = { v1: true, v2: true }, declaration) {
|
|
10936
10936
|
return callerLoggers.x402.span(
|
|
10937
10937
|
"x402.verify_payment",
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
isSignableExactRequirement,
|
|
13
13
|
maxAdvertisedMicro,
|
|
14
14
|
withinAdvertisedTolerance
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-X6BETQ7V.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-
|
|
33
|
+
} from "./chunk-DF2OWCRY.js";
|
|
34
34
|
|
|
35
35
|
// src/lib/x402/client.ts
|
|
36
36
|
import { randomBytes } from "crypto";
|
|
@@ -106,6 +106,9 @@ function json(data) {
|
|
|
106
106
|
const out = _traceId !== null && typeof data === "object" && data !== null && !Array.isArray(data) && !("trace_id" in data) ? { trace_id: _traceId, ...data } : data;
|
|
107
107
|
writeAllSync(1, JSON.stringify(out) + "\n");
|
|
108
108
|
}
|
|
109
|
+
function jsonEvent(data) {
|
|
110
|
+
writeAllSync(1, JSON.stringify(data) + "\n");
|
|
111
|
+
}
|
|
109
112
|
function info(msg) {
|
|
110
113
|
writeAllSync(2, msg + "\n");
|
|
111
114
|
}
|
|
@@ -454,12 +457,10 @@ export {
|
|
|
454
457
|
setOutputTraceId,
|
|
455
458
|
getOutputTraceId,
|
|
456
459
|
json,
|
|
460
|
+
jsonEvent,
|
|
457
461
|
info,
|
|
458
462
|
raw,
|
|
459
463
|
progress,
|
|
460
|
-
resolveBtcUsdRate,
|
|
461
|
-
tryResolveBtcUsdRate,
|
|
462
|
-
staleRateNotice,
|
|
463
464
|
formatSats,
|
|
464
465
|
formatAmount,
|
|
465
466
|
formatPaymentAmount,
|
|
@@ -468,5 +469,8 @@ export {
|
|
|
468
469
|
parseBudget,
|
|
469
470
|
assertValidBudget,
|
|
470
471
|
formatAmountBestEffort,
|
|
472
|
+
resolveBtcUsdRate,
|
|
473
|
+
tryResolveBtcUsdRate,
|
|
474
|
+
staleRateNotice,
|
|
471
475
|
tryX402Payment
|
|
472
476
|
};
|