@dvmkit/dvm-cli 0.19.2 → 0.21.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-OCVRCWBL.js → chunk-7UGJALAX.js} +3 -3
- package/dist/{chunk-3NXAIRFF.js → chunk-BU5E7IDF.js} +2 -2
- package/dist/{chunk-X6BETQ7V.js → chunk-CMIEPFKP.js} +8327 -27312
- package/dist/{chunk-ZZCYSYXR.js → chunk-EA6RU4OR.js} +10 -10
- package/dist/{chunk-WCX4PNEF.js → chunk-GEG2YAIB.js} +19 -1
- package/dist/{chunk-5ZY5IKS2.js → chunk-GWISSHP6.js} +684 -170
- package/dist/{chunk-MM646MFM.js → chunk-L3PHIA5L.js} +4 -4
- package/dist/{chunk-NKD4NEUF.js → chunk-M4Q3DBQO.js} +3 -3
- package/dist/chunk-MP63OWTD.js +27343 -0
- package/dist/{chunk-W4ADV3HW.js → chunk-NSHMTEFJ.js} +27 -17
- package/dist/{chunk-B5KW2TPR.js → chunk-QVX7KPLS.js} +2 -2
- package/dist/{chunk-7HJ5ZR3D.js → chunk-YRLRHJ6O.js} +2 -2
- package/dist/{client-PY4T2DOA.js → client-MJZL7XTD.js} +6 -6
- package/dist/dvm.js +6219 -773
- package/dist/{internal-WAQ3LZN4.js → internal-TUEXUURQ.js} +5 -5
- package/dist/{lifecycle-NOK3MKL4.js → lifecycle-7PSR5CYB.js} +6 -6
- package/dist/{payout-reporter-5PH53T44-7IA4NGIN.js → payout-reporter-O4OLJXKQ-7N2HPPPY.js} +2 -2
- package/dist/{pocket-refill-ETV6QWO6.js → pocket-refill-OX3WXUZ4.js} +10 -10
- package/dist/{revenue-reporter-4XV3OO5O-RYHS3M34.js → revenue-reporter-RMK4HFEW-7HGJQOXL.js} +2 -2
- package/dist/{tempo-lifecycle-QGJ4JEHN.js → tempo-lifecycle-BOW6OFSI.js} +8 -8
- package/dist/{tempo-wallet-GDDZZP5S.js → tempo-wallet-D424H37T.js} +7 -7
- package/dist/{wallet-2M3H75UP.js → wallet-CZV4TOJ3.js} +7 -7
- package/dist/{x402-FHHB3V4V-CM6OMLHE.js → x402-JCKCGEM3-NFTGP54F.js} +2 -2
- package/package.json +2 -2
- package/skills/dvm/SKILL.md +1 -1
- package/skills/dvm/calling.md +26 -4
- package/skills/dvm/credit.md +10 -2
- package/skills/dvm/recovery.md +6 -0
- package/skills/dvm/wallets.md +4 -0
- package/dist/chunk-DF2OWCRY.js +0 -11127
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
} from "./chunk-R2DSAZBO.js";
|
|
7
7
|
import {
|
|
8
8
|
diagnosticConsole
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GEG2YAIB.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
11
|
+
// node_modules/@dvmkit/sdk/dist/chunk-TFMY2QUI.js
|
|
12
12
|
import { randomUUID } from "crypto";
|
|
13
13
|
var ENDPOINTS = {
|
|
14
14
|
job_terminal: "/_internal/job-terminal",
|
|
@@ -579,7 +579,7 @@ var RevenueReporter = class _RevenueReporter {
|
|
|
579
579
|
await q.query(
|
|
580
580
|
`INSERT INTO ${PENDING_DVM_REPORTS_TABLE} (id, payload, created_at, kind)
|
|
581
581
|
VALUES ($1, $2, $3, $4)`,
|
|
582
|
-
[id, JSON.stringify(payload), Date.now(), kind]
|
|
582
|
+
[id, JSON.stringify(withoutSentinelCaller(payload)), Date.now(), kind]
|
|
583
583
|
);
|
|
584
584
|
return id;
|
|
585
585
|
}
|
|
@@ -596,7 +596,7 @@ var RevenueReporter = class _RevenueReporter {
|
|
|
596
596
|
"Content-Type": "application/json",
|
|
597
597
|
Authorization: `Bearer ${this.platformToken}`
|
|
598
598
|
},
|
|
599
|
-
body: JSON.stringify(payload),
|
|
599
|
+
body: JSON.stringify(withoutSentinelCaller(payload)),
|
|
600
600
|
signal: AbortSignal.timeout(1e4)
|
|
601
601
|
});
|
|
602
602
|
} catch (err) {
|
|
@@ -633,16 +633,12 @@ var RevenueReporter = class _RevenueReporter {
|
|
|
633
633
|
}
|
|
634
634
|
if (res.status === 401) {
|
|
635
635
|
await this.markStale(id, "token_rotated");
|
|
636
|
-
diagnosticConsole.warn(
|
|
637
|
-
`[revenue-reporter] Report ${id} got 401 \u2014 marking stale (token likely rotated)`
|
|
638
|
-
);
|
|
636
|
+
diagnosticConsole.warn({ event: "platform_report_rejected", report_kind: kind, status_code: res.status });
|
|
639
637
|
return;
|
|
640
638
|
}
|
|
641
639
|
if (res.status >= 400 && res.status < 500) {
|
|
642
640
|
await this.markStale(id, `client_error:${res.status}`);
|
|
643
|
-
diagnosticConsole.warn(
|
|
644
|
-
`[revenue-reporter] Report ${id} got HTTP ${res.status} \u2014 marking stale (permanent client error, will not retry)`
|
|
645
|
-
);
|
|
641
|
+
diagnosticConsole.warn({ event: "platform_report_rejected", report_kind: kind, status_code: res.status });
|
|
646
642
|
return;
|
|
647
643
|
}
|
|
648
644
|
diagnosticConsole.warn(`[revenue-reporter] delivery failed for ${id}: HTTP ${res.status} \u2014 will retry`);
|
|
@@ -655,6 +651,10 @@ var RevenueReporter = class _RevenueReporter {
|
|
|
655
651
|
);
|
|
656
652
|
}
|
|
657
653
|
};
|
|
654
|
+
function withoutSentinelCaller(payload) {
|
|
655
|
+
const caller = payload.callerPubkey;
|
|
656
|
+
return caller === "anonymous" || caller === "dev-anonymous" ? { ...payload, callerPubkey: null } : payload;
|
|
657
|
+
}
|
|
658
658
|
|
|
659
659
|
export {
|
|
660
660
|
RevenueReporter
|
|
@@ -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-UAHC43ZB.js
|
|
6
6
|
import { isIP } from "net";
|
|
7
7
|
var diagnostic_catalogue_v1_default = {
|
|
8
8
|
version: 1,
|
|
@@ -257,6 +257,9 @@ var diagnostic_catalogue_v1_default = {
|
|
|
257
257
|
"lightning_settlement_check_failed",
|
|
258
258
|
"lock_pubkey_grace_seconds_invalid",
|
|
259
259
|
"log",
|
|
260
|
+
"mandate_ask_resume_failed",
|
|
261
|
+
"mandate_ask_sweep_failed",
|
|
262
|
+
"mandate_payment_skipped",
|
|
260
263
|
"melter_previous_run_read_failed",
|
|
261
264
|
"melter_report_unconfigured",
|
|
262
265
|
"melter_run_report",
|
|
@@ -326,6 +329,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
326
329
|
"platform_db_health_endpoint_failed",
|
|
327
330
|
"platform_db_health_recovery_failed",
|
|
328
331
|
"platform_hosted_test_mint_allowed",
|
|
332
|
+
"platform_report_rejected",
|
|
329
333
|
"postgres_client_error",
|
|
330
334
|
"postgres_pool_error",
|
|
331
335
|
"postgres_transport_recovery",
|
|
@@ -494,6 +498,8 @@ var diagnostic_catalogue_v1_default = {
|
|
|
494
498
|
"x402.verify_payment.result",
|
|
495
499
|
"x402.verify_with_facilitator",
|
|
496
500
|
"x402.verify_with_facilitator.result",
|
|
501
|
+
"x402_channel_lock_in_process",
|
|
502
|
+
"x402_channel_lock_release_failed",
|
|
497
503
|
"x402_claim_ceiling_unbound",
|
|
498
504
|
"x402_claim_ceiling_unresolved",
|
|
499
505
|
"x402_credential_rejected",
|
|
@@ -908,6 +914,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
908
914
|
"insecure_scheme",
|
|
909
915
|
"internal_error",
|
|
910
916
|
"invalid_input",
|
|
917
|
+
"invalid_mandate",
|
|
911
918
|
"invalid_menu",
|
|
912
919
|
"invalid_payment",
|
|
913
920
|
"invalid_quote_data",
|
|
@@ -1166,6 +1173,14 @@ var diagnostic_catalogue_v1_default = {
|
|
|
1166
1173
|
"denomination_unavailable",
|
|
1167
1174
|
"topup_cap_unavailable",
|
|
1168
1175
|
"topup_cap_currency_mismatch",
|
|
1176
|
+
"mandate_expired",
|
|
1177
|
+
"mandate_ask_cap",
|
|
1178
|
+
"mandate_total_cap",
|
|
1179
|
+
"mandate_balance",
|
|
1180
|
+
"mandate_currency",
|
|
1181
|
+
"mandate_draw_owned_elsewhere",
|
|
1182
|
+
"mandate_ask_unpriced",
|
|
1183
|
+
"mandate_credit_unavailable",
|
|
1169
1184
|
"unknown"
|
|
1170
1185
|
],
|
|
1171
1186
|
denominationCauses: [
|
|
@@ -1495,6 +1510,9 @@ function projectFields(input, dataset, authority, identityAuthority, eventName)
|
|
|
1495
1510
|
return output;
|
|
1496
1511
|
}
|
|
1497
1512
|
function projectField(key, value, dataset, authority, identityAuthority, eventName) {
|
|
1513
|
+
if (eventName === "platform_report_rejected" && key === "report_kind") {
|
|
1514
|
+
return typeof value === "string" && ["job_terminal", "revenue", "cost", "deposit", "refund", "release", "drain", "payout", "expiry_release"].includes(value) ? value : void 0;
|
|
1515
|
+
}
|
|
1498
1516
|
if (eventName === "x402_shutdown_claim_incomplete") {
|
|
1499
1517
|
if (key === "unclaimed_channels") return value === null || isNonnegativeSafeInteger(value) ? value : void 0;
|
|
1500
1518
|
if (key === "unclaimed_amount_native") return value === null || typeof value === "string" && DECIMAL_RE.test(value) ? value : void 0;
|