@dvmkit/dvm-cli 0.16.0 → 0.18.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-WRIXUSMR.js → chunk-ESQ6DCS3.js} +3 -3
- package/dist/{chunk-WSLZBJ52.js → chunk-OEWENVJ7.js} +4 -4
- package/dist/{chunk-2TNH4ME5.js → chunk-REIUNZQX.js} +1 -1
- package/dist/{chunk-NSA2RJ2T.js → chunk-RYFCHR6Z.js} +8 -4
- package/dist/{chunk-U2PODYIS.js → chunk-THTPKBZX.js} +1 -0
- package/dist/{chunk-H6WQ4S6K.js → chunk-VLD7OKSH.js} +5 -5
- package/dist/{chunk-LDYMUQZE.js → chunk-VSOIBYBF.js} +2378 -2102
- package/dist/{chunk-CEBEPXQ7.js → chunk-ZGBCVQF2.js} +2 -2
- package/dist/{client-S5PTHG25.js → client-PVRLAMI3.js} +2 -2
- package/dist/dvm.js +967 -378
- package/dist/{internal-3SIUYRWP.js → internal-L362ZUWL.js} +1 -1
- package/dist/{lifecycle-7NHL5ATK.js → lifecycle-BH4OA5I3.js} +2 -2
- package/dist/{pocket-refill-3CA4PFXG.js → pocket-refill-6UL6CHD5.js} +8 -8
- package/dist/{tempo-lifecycle-GAM3DJ63.js → tempo-lifecycle-WGTX6MJR.js} +4 -4
- package/dist/{tempo-wallet-JTARPYLN.js → tempo-wallet-OTB2YSWE.js} +3 -3
- package/dist/{wallet-QKAKRLPI.js → wallet-73EJBUSO.js} +3 -3
- package/package.json +2 -1
- package/skills/dvm/calling.md +15 -2
- package/skills/dvm/credit.md +1 -1
- package/skills/dvm/recovery.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,7 +8,7 @@ import {
|
|
|
8
8
|
CONFIG_PINNED_FILE,
|
|
9
9
|
ensureConfigDir,
|
|
10
10
|
require_proper_lockfile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-THTPKBZX.js";
|
|
12
12
|
import {
|
|
13
13
|
DvmError
|
|
14
14
|
} from "./chunk-DGA5EFKU.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: {},
|
|
@@ -4,11 +4,11 @@ const require = __dvmCreateRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
loadConfig,
|
|
6
6
|
updateConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ESQ6DCS3.js";
|
|
8
8
|
import {
|
|
9
9
|
tempoAccountFromConfig,
|
|
10
10
|
tryResolveTempoAsset
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-THTPKBZX.js";
|
|
12
12
|
import {
|
|
13
13
|
DvmError
|
|
14
14
|
} from "./chunk-DGA5EFKU.js";
|
|
@@ -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-
|
|
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-
|
|
15
|
+
} from "./chunk-THTPKBZX.js";
|
|
16
16
|
import {
|
|
17
17
|
DvmError,
|
|
18
18
|
X402_V1_VERSION,
|
|
@@ -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
|
};
|
|
@@ -96817,6 +96817,7 @@ export {
|
|
|
96817
96817
|
u64Lengths,
|
|
96818
96818
|
copyBytes,
|
|
96819
96819
|
base64,
|
|
96820
|
+
bech32,
|
|
96820
96821
|
X402_SELF_RELAY_KEY,
|
|
96821
96822
|
X402_RECEIVER_AUTHORIZER_KEY,
|
|
96822
96823
|
X402_BATCH_SETTLEMENT_KEY,
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
authorizeProtectedRemoval,
|
|
6
6
|
loadConfig,
|
|
7
7
|
updateConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ESQ6DCS3.js";
|
|
9
9
|
import {
|
|
10
10
|
withX402ChannelLock,
|
|
11
11
|
x402WalletFromConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-THTPKBZX.js";
|
|
13
13
|
import {
|
|
14
14
|
DvmError,
|
|
15
15
|
X402_DEFAULT_NETWORK,
|
|
@@ -58,7 +58,7 @@ async function repinX402WalletNetwork(network) {
|
|
|
58
58
|
const privateKey = current.x402?.privateKey;
|
|
59
59
|
if (privateKey === void 0) throw x402WalletMissingError();
|
|
60
60
|
if (!isValidEvmPrivateKey(privateKey)) throw invalidX402PrivateKey();
|
|
61
|
-
return { set: { x402: { privateKey, network } } };
|
|
61
|
+
return { set: { x402: { privateKey, network, ...current.x402?.generated === true ? { generated: true } : {} } } };
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
const stored = previous?.x402;
|
|
@@ -72,7 +72,7 @@ async function repinX402WalletNetwork(network) {
|
|
|
72
72
|
};
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
async function saveX402Wallet(privateKey, network) {
|
|
75
|
+
async function saveX402Wallet(privateKey, network, generated = false) {
|
|
76
76
|
if (network !== void 0) assertSupportedX402Network(network);
|
|
77
77
|
if (!isValidEvmPrivateKey(privateKey)) throw invalidX402PrivateKey();
|
|
78
78
|
const { privateKeyToAccount } = await import("./accounts-2WZE4N5F.js");
|
|
@@ -83,7 +83,7 @@ async function saveX402Wallet(privateKey, network) {
|
|
|
83
83
|
patch: (current) => {
|
|
84
84
|
resolved = network ?? current?.x402?.network;
|
|
85
85
|
return {
|
|
86
|
-
set: { x402: resolved === void 0 ? {
|
|
86
|
+
set: { x402: { privateKey, ...resolved === void 0 ? {} : { network: resolved }, ...generated ? { generated: true } : {} } }
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
});
|