@dvmkit/dvm-cli 0.12.1 → 0.14.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/dist/{chunk-MMXHV3KC.js → chunk-2MCZ4QOK.js} +2 -2
- package/dist/{chunk-GHNF2I5C.js → chunk-57PXJ56K.js} +56 -54
- package/dist/{chunk-RMYEB2WG.js → chunk-CO2TD5RO.js} +2 -2
- package/dist/{chunk-3R2GM6AD.js → chunk-D5CGDS3V.js} +2 -2
- package/dist/{chunk-WPTJM5A7.js → chunk-DU7YCGCQ.js} +1422 -100
- package/dist/{chunk-HWWW7JEM.js → chunk-EZL4IVCU.js} +3 -3
- package/dist/{chunk-7N3HQJKE.js → chunk-HJ2JYBTT.js} +4 -4
- package/dist/{chunk-K562SFVD.js → chunk-HXTASGHL.js} +2 -2
- package/dist/{chunk-6EYBCGGD.js → chunk-I7ZBID4L.js} +2 -2
- package/dist/{chunk-UVFFMKU4.js → chunk-UCCT5IKU.js} +76 -4
- package/dist/{chunk-GEZVSJDM.js → chunk-UWVMG4VG.js} +3 -3
- package/dist/{chunk-MBSCP52L.js → chunk-YQJRKWNT.js} +32838 -11936
- package/dist/{client-V7KAPCAG.js → client-DC7TVYNU.js} +6 -6
- package/dist/dvm.js +4651 -2091
- package/dist/{internal-ZZHCUKOM.js → internal-O7IQD6EQ.js} +5 -5
- package/dist/{lifecycle-XGNIMPTB.js → lifecycle-MIJH3JE4.js} +6 -6
- package/dist/{payout-reporter-DDQ7FGRC-OKICJCC2.js → payout-reporter-Y6OW3FYD-K6MRWQXK.js} +2 -2
- package/dist/{pocket-refill-Z4YT7CHW.js → pocket-refill-HEVLAMKN.js} +10 -10
- package/dist/{revenue-reporter-RIEHBKRA-75BDPVVX.js → revenue-reporter-CIG2MEDN-ZXMO6NWG.js} +2 -2
- package/dist/{tempo-lifecycle-LGGBDCKK.js → tempo-lifecycle-FMBCHD2M.js} +8 -8
- package/dist/{tempo-wallet-PLFC443A.js → tempo-wallet-U3WBWIIH.js} +7 -7
- package/dist/{wallet-UJ7EJNQA.js → wallet-Z3FDX43V.js} +7 -7
- package/dist/{x402-AY6P5KV4-SIZF7YNW.js → x402-ARXZQ5BD-H6PNJYYT.js} +2 -2
- package/package.json +2 -2
- package/skills/dvm/SKILL.md +2 -0
- package/skills/dvm/calling.md +12 -1
- package/skills/dvm/credit.md +8 -0
- package/skills/dvm/recovery.md +3 -0
|
@@ -3,7 +3,7 @@ import { createRequire as __dvmCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
connectedTempoAccount
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HJ2JYBTT.js";
|
|
7
7
|
import {
|
|
8
8
|
deriveIdentityFromPrivkey,
|
|
9
9
|
formatUsdcMicrounits,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
reconcileTempoChannelOnChain,
|
|
14
14
|
shellQuoteArg,
|
|
15
15
|
tempoChannelControlledBy
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YQJRKWNT.js";
|
|
17
17
|
import {
|
|
18
18
|
DvmError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-57PXJ56K.js";
|
|
20
20
|
|
|
21
21
|
// src/lib/cli-identity-resolve.ts
|
|
22
22
|
function resolveSigningIdentity(opts) {
|
|
@@ -4,14 +4,14 @@ const require = __dvmCreateRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
loadConfig,
|
|
6
6
|
updateConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2MCZ4QOK.js";
|
|
8
8
|
import {
|
|
9
9
|
tempoAccountFromConfig,
|
|
10
10
|
tryResolveTempoAsset
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YQJRKWNT.js";
|
|
12
12
|
import {
|
|
13
13
|
DvmError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-57PXJ56K.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-
|
|
49
|
+
const { assertTempoWalletIdle } = await import("./tempo-lifecycle-FMBCHD2M.js");
|
|
50
50
|
await assertTempoWalletIdle("replace");
|
|
51
51
|
}
|
|
52
52
|
const { privateKeyToAccount, generatePrivateKey } = await import("./accounts-2WZE4N5F.js");
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
} from "./chunk-R2DSAZBO.js";
|
|
7
7
|
import {
|
|
8
8
|
diagnosticConsole
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UCCT5IKU.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
11
|
+
// node_modules/@dvmkit/sdk/dist/chunk-PGQID4PR.js
|
|
12
12
|
import { randomUUID } from "crypto";
|
|
13
13
|
var ENDPOINTS = {
|
|
14
14
|
job_terminal: "/_internal/job-terminal",
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
formatUsdcMicrounits,
|
|
6
6
|
listX402Channels,
|
|
7
7
|
readX402ChannelGuardFacts
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YQJRKWNT.js";
|
|
9
9
|
import {
|
|
10
10
|
DvmError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-57PXJ56K.js";
|
|
12
12
|
|
|
13
13
|
// src/lib/x402/lifecycle.ts
|
|
14
14
|
async function assertX402WalletIdle(wallet, intent) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
|
|
5
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
5
|
+
// node_modules/@dvmkit/sdk/dist/chunk-3UACKFEK.js
|
|
6
6
|
import { isIP } from "net";
|
|
7
7
|
var diagnostic_catalogue_v1_default = {
|
|
8
8
|
version: 1,
|
|
@@ -71,6 +71,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
71
71
|
"cashu_mint_recovery_failed",
|
|
72
72
|
"cashu_mint_runtime_recovered",
|
|
73
73
|
"cashu_mint_runtime_sick",
|
|
74
|
+
"cashu_not_advertised",
|
|
74
75
|
"cashu_opts_env_ignored",
|
|
75
76
|
"cashu_refund_amount_unreported",
|
|
76
77
|
"ci_lane_report",
|
|
@@ -100,6 +101,8 @@ var diagnostic_catalogue_v1_default = {
|
|
|
100
101
|
"credit_resolve_failed",
|
|
101
102
|
"credit_resolve_state_mismatch",
|
|
102
103
|
"credit_topup_over_ask",
|
|
104
|
+
"credit_topup_redirected",
|
|
105
|
+
"credit_topup_refused",
|
|
103
106
|
"credit_topup_skipped",
|
|
104
107
|
"credit_topup_stale_rate",
|
|
105
108
|
"credit_topup_unbound",
|
|
@@ -205,6 +208,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
205
208
|
"job_heartbeat_failed",
|
|
206
209
|
"job_id",
|
|
207
210
|
"job_message_append_failed",
|
|
211
|
+
"piece_settlement_exceeds_hold",
|
|
208
212
|
"step_persist_failed",
|
|
209
213
|
"job_messages_listen_connect_failed",
|
|
210
214
|
"job_messages_listen_lost",
|
|
@@ -497,7 +501,15 @@ var diagnostic_catalogue_v1_default = {
|
|
|
497
501
|
"x402_settlement_reconciliation_chain_unreachable",
|
|
498
502
|
"x402_settlement_reconciliation_facilitator_unavailable",
|
|
499
503
|
"x402_settlement_submission_failed",
|
|
500
|
-
"x402_settlement_written_off"
|
|
504
|
+
"x402_settlement_written_off",
|
|
505
|
+
"card_charge_journal_failed",
|
|
506
|
+
"card_charge_stranded_refunded",
|
|
507
|
+
"card_charge_unsettled",
|
|
508
|
+
"card_refund_pending",
|
|
509
|
+
"card_refund_sweep",
|
|
510
|
+
"card_refund_expiry_failed",
|
|
511
|
+
"card_refund_sweep_failed",
|
|
512
|
+
"card_refund_sweep_step_failed"
|
|
501
513
|
],
|
|
502
514
|
routeTemplates: [
|
|
503
515
|
"/",
|
|
@@ -770,18 +782,31 @@ var diagnostic_catalogue_v1_default = {
|
|
|
770
782
|
"/v1/request-resume/:requestId"
|
|
771
783
|
],
|
|
772
784
|
errorCodes: [
|
|
785
|
+
"amount_too_large",
|
|
786
|
+
"api_error",
|
|
773
787
|
"app_shell_detected",
|
|
788
|
+
"ask_already_open",
|
|
789
|
+
"ask_expired",
|
|
774
790
|
"audio_source_required",
|
|
775
791
|
"auth_error",
|
|
776
792
|
"auth_required",
|
|
793
|
+
"authentication_error",
|
|
794
|
+
"balance_insufficient",
|
|
777
795
|
"bytes_cap",
|
|
778
796
|
"capability_required",
|
|
779
797
|
"captcha_unsolved",
|
|
798
|
+
"card_error",
|
|
799
|
+
"charge_already_refunded",
|
|
800
|
+
"charge_disputed",
|
|
801
|
+
"charge_expired_for_refund",
|
|
802
|
+
"charge_not_refundable",
|
|
803
|
+
"charges_exhausted",
|
|
780
804
|
"cloudflare_unsolved",
|
|
781
805
|
"content_rejected",
|
|
782
806
|
"cover_invalid",
|
|
783
807
|
"credit_fund_failed",
|
|
784
808
|
"css_selector_for_requested_content",
|
|
809
|
+
"decline_unavailable",
|
|
785
810
|
"decoder_failed",
|
|
786
811
|
"decoder_unavailable",
|
|
787
812
|
"diarise_failed",
|
|
@@ -794,6 +819,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
794
819
|
"extract_llm_failed",
|
|
795
820
|
"extract_schema_invalid",
|
|
796
821
|
"extract_validation_failed",
|
|
822
|
+
"fee_not_settled",
|
|
797
823
|
"feed_full",
|
|
798
824
|
"feed_not_found",
|
|
799
825
|
"feed_path_invalid",
|
|
@@ -808,6 +834,8 @@ var diagnostic_catalogue_v1_default = {
|
|
|
808
834
|
"head_status",
|
|
809
835
|
"hint",
|
|
810
836
|
"hosting_identity_revoke_failed",
|
|
837
|
+
"idempotency_error",
|
|
838
|
+
"idempotency_key_in_use",
|
|
811
839
|
"ingest_concurrency",
|
|
812
840
|
"ingest_global_concurrency",
|
|
813
841
|
"ingest_ip_concurrency",
|
|
@@ -818,6 +846,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
818
846
|
"invalid_menu",
|
|
819
847
|
"invalid_payment",
|
|
820
848
|
"invalid_quote_data",
|
|
849
|
+
"invalid_request_error",
|
|
821
850
|
"invalid_url",
|
|
822
851
|
"job_failed",
|
|
823
852
|
"job_timeout",
|
|
@@ -826,6 +855,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
826
855
|
"milliseconds",
|
|
827
856
|
"network_error",
|
|
828
857
|
"no_diariser",
|
|
858
|
+
"no_open_ask",
|
|
829
859
|
"no_premium_substrate",
|
|
830
860
|
"none",
|
|
831
861
|
"not_found",
|
|
@@ -838,6 +868,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
838
868
|
"payment_invalid",
|
|
839
869
|
"payment_required",
|
|
840
870
|
"paywall_detected",
|
|
871
|
+
"permission_error",
|
|
841
872
|
"polish_input_too_large",
|
|
842
873
|
"polish_llm_failed",
|
|
843
874
|
"presign_failed",
|
|
@@ -855,11 +886,14 @@ var diagnostic_catalogue_v1_default = {
|
|
|
855
886
|
"provider_timeout",
|
|
856
887
|
"provider_unavailable",
|
|
857
888
|
"quota_exceeded",
|
|
889
|
+
"rate_limit_error",
|
|
858
890
|
"rate_limited",
|
|
859
891
|
"rate_limited_by_target",
|
|
892
|
+
"refund_disputed_payment",
|
|
860
893
|
"region_unavailable",
|
|
861
894
|
"replay_detected",
|
|
862
895
|
"request_integrity_failed",
|
|
896
|
+
"resource_missing",
|
|
863
897
|
"retry_hardened",
|
|
864
898
|
"retry_with_bounded_wait",
|
|
865
899
|
"retry_with_content_selector",
|
|
@@ -868,10 +902,12 @@ var diagnostic_catalogue_v1_default = {
|
|
|
868
902
|
"server_error",
|
|
869
903
|
"sha256_mismatch",
|
|
870
904
|
"signature_invalid",
|
|
905
|
+
"signature_required",
|
|
871
906
|
"size_mismatch",
|
|
872
907
|
"source_unreachable",
|
|
873
908
|
"ssrf_blocked",
|
|
874
909
|
"string",
|
|
910
|
+
"stripe_unreachable",
|
|
875
911
|
"substrate_unavailable",
|
|
876
912
|
"timeout",
|
|
877
913
|
"timestamp_drift",
|
|
@@ -963,6 +999,10 @@ var diagnostic_catalogue_v1_default = {
|
|
|
963
999
|
"usdc"
|
|
964
1000
|
],
|
|
965
1001
|
booleanFields: [
|
|
1002
|
+
"cashu_explicitly_excluded",
|
|
1003
|
+
"cashu_lock_pubkey_missing",
|
|
1004
|
+
"cashu_mode_missing",
|
|
1005
|
+
"cashu_store_missing",
|
|
966
1006
|
"client.capabilities_valid",
|
|
967
1007
|
"client.protocol_version_valid",
|
|
968
1008
|
"client.version_valid",
|
|
@@ -1026,7 +1066,8 @@ var diagnostic_catalogue_v1_default = {
|
|
|
1026
1066
|
identityFields: [
|
|
1027
1067
|
"dvm_id",
|
|
1028
1068
|
"dvm_slug",
|
|
1029
|
-
"builder_id"
|
|
1069
|
+
"builder_id",
|
|
1070
|
+
"dvm_resolution"
|
|
1030
1071
|
],
|
|
1031
1072
|
capabilityFields: [
|
|
1032
1073
|
"capability"
|
|
@@ -1039,6 +1080,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
1039
1080
|
],
|
|
1040
1081
|
paymentSkipReasons: [
|
|
1041
1082
|
"credit_or_draw_missing",
|
|
1083
|
+
"credit_not_active",
|
|
1042
1084
|
"draw_not_pending",
|
|
1043
1085
|
"draw_job_mismatch",
|
|
1044
1086
|
"rail_mismatch",
|
|
@@ -1177,6 +1219,17 @@ var CAPABILITY_RE = /^[a-z][a-z0-9_-]{0,47}$/;
|
|
|
1177
1219
|
var CLIENT_VERSION_RE = /^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-rc\.(?:0|[1-9]\d*))?$/;
|
|
1178
1220
|
var HASH_RE = /^(?:[0-9a-f]{16}|[0-9a-f]{64})$/i;
|
|
1179
1221
|
var DECIMAL_RE = /^(?:0|[1-9]\d{0,77})$/;
|
|
1222
|
+
var CARD_REFUND_EVENTS = /* @__PURE__ */ new Set([
|
|
1223
|
+
"card_charge_stranded_refunded",
|
|
1224
|
+
"card_charge_unsettled",
|
|
1225
|
+
"card_refund_expiry_failed",
|
|
1226
|
+
"card_refund_pending",
|
|
1227
|
+
"card_refund_sweep",
|
|
1228
|
+
"card_refund_sweep_step_failed"
|
|
1229
|
+
]);
|
|
1230
|
+
var CARD_REFUND_COUNTS = /* @__PURE__ */ new Set(["frozen", "unfrozen", "expiry_refunds", "completed", "pending", "stranded_refunds"]);
|
|
1231
|
+
var CARD_REFUND_STAGES = /* @__PURE__ */ new Set(["plan", "refund", "disputes", "expiry", "retry", "stranded"]);
|
|
1232
|
+
var CARD_REFUND_STATUSES = /* @__PURE__ */ new Set(["planned", "pending", "requires_action", "succeeded", "failed", "canceled", "rejected"]);
|
|
1180
1233
|
var STRIPE_EVENT_RE = /^evt_[A-Za-z0-9]{1,64}$/;
|
|
1181
1234
|
var REDACTED_SEGMENT_RE = /^:(?:uuid|hex|n|b58|token)$/;
|
|
1182
1235
|
var SERVICE_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -1348,6 +1401,10 @@ function projectField(key, value, dataset, authority, identityAuthority, eventNa
|
|
|
1348
1401
|
const closedEnum = Object.hasOwn(PAYMENT_ENUMS, key) ? PAYMENT_ENUMS[key] : Object.hasOwn(ROUTER_ENUMS, key) ? ROUTER_ENUMS[key] : void 0;
|
|
1349
1402
|
if (closedEnum)
|
|
1350
1403
|
return typeof value === "string" && closedEnum.has(value) ? value : void 0;
|
|
1404
|
+
if (eventName !== void 0 && CARD_REFUND_EVENTS.has(eventName)) {
|
|
1405
|
+
const projected = projectCardRefundField(key, value);
|
|
1406
|
+
if (projected !== void 0) return projected;
|
|
1407
|
+
}
|
|
1351
1408
|
if (dataset === "tempo") {
|
|
1352
1409
|
if (key === "prior_status")
|
|
1353
1410
|
return typeof value === "string" && TEMPO_CLOSE_REPORT_PRIOR_STATUSES.has(value) ? value : void 0;
|
|
@@ -1429,6 +1486,18 @@ function projectField(key, value, dataset, authority, identityAuthority, eventNa
|
|
|
1429
1486
|
return typeof value === "string" && SANCTIONS_REGIONS.has(value) ? value : void 0;
|
|
1430
1487
|
return void 0;
|
|
1431
1488
|
}
|
|
1489
|
+
function projectCardRefundField(key, value) {
|
|
1490
|
+
if (key === "credit_id" || key === "drain_id" || key === "challenge_id")
|
|
1491
|
+
return typeof value === "string" && /^[a-zA-Z0-9_.:-]{1,512}$/.test(value) ? value : void 0;
|
|
1492
|
+
if (key === "payment_intent")
|
|
1493
|
+
return typeof value === "string" && /^pi_[A-Za-z0-9]{1,64}$/.test(value) ? value : void 0;
|
|
1494
|
+
if (key === "stage")
|
|
1495
|
+
return typeof value === "string" && CARD_REFUND_STAGES.has(value) ? value : void 0;
|
|
1496
|
+
if (key === "refund_status")
|
|
1497
|
+
return typeof value === "string" && CARD_REFUND_STATUSES.has(value) ? value : void 0;
|
|
1498
|
+
if (CARD_REFUND_COUNTS.has(key)) return isNonnegativeSafeInteger(value) ? value : void 0;
|
|
1499
|
+
return void 0;
|
|
1500
|
+
}
|
|
1432
1501
|
function projectService(value) {
|
|
1433
1502
|
if (typeof value !== "string") return "unknown";
|
|
1434
1503
|
if (SERVICE_NAMES.has(value)) return value;
|
|
@@ -1445,11 +1514,14 @@ function projectHost(value) {
|
|
|
1445
1514
|
}
|
|
1446
1515
|
function validateIdentity(key, value) {
|
|
1447
1516
|
if (typeof value !== "string") return void 0;
|
|
1517
|
+
if (key === "dvm_resolution") return value === "none" ? value : void 0;
|
|
1448
1518
|
if (key === "dvm_slug") return SLUG_RE.test(value) ? value : void 0;
|
|
1449
1519
|
return value.length <= 36 && UUID_RE.test(value) ? value : void 0;
|
|
1450
1520
|
}
|
|
1451
1521
|
function projectIdentity(key, authority) {
|
|
1452
|
-
|
|
1522
|
+
const identities = authority && AUTHORITY_IDENTITIES.get(authority);
|
|
1523
|
+
if (key === "dvm_resolution" && identities?.dvm_id) return void 0;
|
|
1524
|
+
return identities?.[key];
|
|
1453
1525
|
}
|
|
1454
1526
|
function projectCapability(value, authority) {
|
|
1455
1527
|
if (typeof value !== "string" || !CAPABILITY_RE.test(value)) return void 0;
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
authorizeProtectedRemoval,
|
|
6
6
|
loadConfig,
|
|
7
7
|
updateConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2MCZ4QOK.js";
|
|
9
9
|
import {
|
|
10
10
|
withX402ChannelLock,
|
|
11
11
|
x402WalletFromConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YQJRKWNT.js";
|
|
13
13
|
import {
|
|
14
14
|
DvmError,
|
|
15
15
|
X402_DEFAULT_NETWORK,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
ensureAddress,
|
|
18
18
|
isValidEvmPrivateKey,
|
|
19
19
|
x402NetworkByCaip2
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-57PXJ56K.js";
|
|
21
21
|
|
|
22
22
|
// src/lib/x402/networks.ts
|
|
23
23
|
function x402NetworkLabel(network) {
|