deepline 0.3.392 → 0.3.393
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/bundling-sources/sdk/src/client.ts +156 -24
- package/dist/bundling-sources/sdk/src/compat.ts +9 -0
- package/dist/bundling-sources/sdk/src/http.ts +5 -1
- package/dist/bundling-sources/sdk/src/index.ts +5 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +182 -6
- package/dist/bundling-sources/sdk/src/release.ts +4 -1
- package/dist/bundling-sources/sdk/src/types.ts +13 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/request-warnings.ts +64 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +315 -0
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +41 -8
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +418 -44
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +36 -3
- package/dist/bundling-sources/shared_libs/play-runtime/durable-invocation-fence.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +11 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +19 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +158 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +235 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +92 -58
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +30 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1161 -316
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +28 -15
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +24 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +31 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -4
- package/dist/bundling-sources/shared_libs/plays/dataset.ts +172 -79
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +173 -1
- package/dist/cli/{auth-6JSA2ZCW.mjs → auth-5PXHA232.mjs} +4 -4
- package/dist/cli/auth-P3MVDTXM.js +39 -0
- package/dist/cli/{billing-Q5BLQHIU.js → billing-JFB2XLSO.js} +101 -74
- package/dist/cli/{billing-MRRO643H.mjs → billing-Z2N7ZAGM.mjs} +32 -5
- package/dist/cli/{chunk-CVLM3WMJ.js → chunk-2HAD745V.js} +242 -183
- package/dist/cli/{chunk-HGYBEAQP.mjs → chunk-2LGC4EFT.mjs} +3 -3
- package/dist/cli/{chunk-A3APGZFP.mjs → chunk-4PT2VA3A.mjs} +2 -2
- package/dist/cli/{chunk-6DBOU7UH.js → chunk-4XX6443T.js} +176 -87
- package/dist/cli/{chunk-2QLML6G4.mjs → chunk-5KWKZIQR.mjs} +4 -4
- package/dist/cli/{chunk-2G7DXFHI.mjs → chunk-5PRVMXKB.mjs} +27 -2
- package/dist/cli/{chunk-DSWSEHRX.mjs → chunk-6I73X254.mjs} +1 -1
- package/dist/cli/{chunk-ZTACINO5.mjs → chunk-7HR7BGZL.mjs} +13 -3
- package/dist/cli/{chunk-BB3FNYFY.js → chunk-AARX5L4B.js} +2 -2
- package/dist/cli/{chunk-WMS5U6YB.js → chunk-CDFH2DYL.js} +20 -19
- package/dist/cli/{chunk-R3O2CZ4H.mjs → chunk-FQ6VHPW4.mjs} +2 -2
- package/dist/cli/{chunk-MU6M3URX.mjs → chunk-HLEESTCH.mjs} +1 -1
- package/dist/cli/{chunk-Q6EOHNRH.mjs → chunk-JI2B4RZP.mjs} +119 -6
- package/dist/cli/{chunk-2Q3GEFL4.mjs → chunk-KIYU2TGL.mjs} +2 -2
- package/dist/cli/{chunk-Y6VOGHF2.mjs → chunk-KZZC33PY.mjs} +0 -181
- package/dist/cli/{chunk-UCKJQG25.js → chunk-L2SYLGRP.js} +8 -8
- package/dist/cli/{chunk-2GAHHSLB.mjs → chunk-LMMEAMA7.mjs} +3 -2
- package/dist/cli/{chunk-YAZCDBXX.mjs → chunk-LZPCDB7U.mjs} +3 -2
- package/dist/cli/{chunk-RV6ALZIX.js → chunk-M7Y7JYZX.js} +32 -7
- package/dist/cli/{chunk-QGKPTBRR.js → chunk-MS6GUPBB.js} +3 -3
- package/dist/cli/{chunk-4SFPVW7A.js → chunk-OXNOAD6Y.js} +26 -26
- package/dist/cli/{chunk-JOFPQGXW.js → chunk-PTDECJGP.js} +50 -50
- package/dist/cli/{chunk-5O4B6AUN.js → chunk-PWSWAN7Q.js} +25 -2
- package/dist/cli/{chunk-YN6YA7ZZ.mjs → chunk-Q26LUSQ2.mjs} +79 -20
- package/dist/cli/{chunk-3VN4FTE3.js → chunk-RDXFGPJU.js} +1 -182
- package/dist/cli/{chunk-7E66A24V.mjs → chunk-RKMB3N7K.mjs} +25 -2
- package/dist/cli/{chunk-JSLPHFP7.js → chunk-RWHWF5ZJ.js} +3 -2
- package/dist/cli/{chunk-3FV4GBRK.mjs → chunk-STNYIMIV.mjs} +97 -8
- package/dist/cli/chunk-UBKA33KY.mjs +310 -0
- package/dist/cli/{chunk-PAIMOGCM.js → chunk-UHNDVD3P.js} +125 -12
- package/dist/cli/{chunk-24VEN5PQ.mjs → chunk-UOGZUA24.mjs} +179 -17
- package/dist/cli/{chunk-T7OKJ2T6.js → chunk-VIQJIX2P.js} +73 -63
- package/dist/cli/{chunk-RIV2GS5E.js → chunk-VIWE6WRK.js} +627 -465
- package/dist/cli/{chunk-EY7RFC6A.js → chunk-W4WOMXR3.js} +15 -15
- package/dist/cli/chunk-XDVT3GOM.js +310 -0
- package/dist/cli/{chunk-2FQG2HU4.js → chunk-Z3OOZM5L.js} +8 -8
- package/dist/cli/{csv-E4QGUIGI.mjs → csv-KJWZHKCH.mjs} +3 -3
- package/dist/cli/{csv-26U5T24Z.js → csv-P3Z3YE7H.js} +12 -12
- package/dist/cli/{db-JTRJIAQW.mjs → db-NCM4CQIS.mjs} +6 -5
- package/dist/cli/{db-QHBFLMVL.js → db-NUZGJNQC.js} +31 -30
- package/dist/cli/{describe-E3DE3ZK3.mjs → describe-WT6MM2GO.mjs} +17 -16
- package/dist/cli/{describe-FDV2V74F.js → describe-YGSEN5WC.js} +24 -23
- package/dist/cli/{executions-VZYOGVQY.js → executions-PCOLHN7Q.js} +8 -7
- package/dist/cli/{executions-B3GTNPRE.mjs → executions-XS2IPJ4W.mjs} +6 -5
- package/dist/cli/{feedback-CR55FJA2.js → feedback-4MSH7TFU.js} +7 -7
- package/dist/cli/{feedback-4CEBR3OV.mjs → feedback-CCLTS5SV.mjs} +3 -3
- package/dist/cli/{git-NM2PHHZ4.mjs → git-K2DHPMPC.mjs} +4 -4
- package/dist/cli/git-RNM45FX4.js +23 -0
- package/dist/cli/index.js +96 -92
- package/dist/cli/index.mjs +46 -42
- package/dist/cli/{legacy-noops-A7MSW5ND.mjs → legacy-noops-B5S4AR3P.mjs} +4 -4
- package/dist/cli/{legacy-noops-ZUA4YFIH.js → legacy-noops-GPNOPFXV.js} +7 -7
- package/dist/cli/{monitors-NVPRQYP3.mjs → monitors-JLMAIPRG.mjs} +6 -5
- package/dist/cli/{monitors-ZE3TLZ4H.js → monitors-ZAWD7NSN.js} +87 -86
- package/dist/cli/{org-U7A6DV5D.js → org-P2KN4CES.js} +66 -65
- package/dist/cli/{org-KUBILNQV.mjs → org-T3JTHP4G.mjs} +6 -5
- package/dist/cli/{play-HRDXQ4QE.mjs → play-NK6BLRGL.mjs} +11 -10
- package/dist/cli/play-PDXR6JFB.js +158 -0
- package/dist/cli/{providers-OHIWI453.mjs → providers-3NQRA7IT.mjs} +6 -5
- package/dist/cli/{providers-VD6YTVQZ.js → providers-5QRZN3DT.js} +9 -8
- package/dist/cli/{quickstart-UBV2FONF.mjs → quickstart-PIA2JGPV.mjs} +3 -3
- package/dist/cli/{quickstart-ETTCWPA4.js → quickstart-R7NUZGNW.js} +5 -5
- package/dist/cli/run-identity-G257GQED.js +25 -0
- package/dist/cli/run-identity-MRNCEGV2.mjs +25 -0
- package/dist/cli/{search-F44IZRT7.mjs → search-AIDIIGLY.mjs} +7 -6
- package/dist/cli/search-QRWL7MFM.js +27 -0
- package/dist/cli/{secrets-CAEMRORF.js → secrets-BT3PGMWN.js} +15 -14
- package/dist/cli/{secrets-R6XOJZKU.mjs → secrets-OQNHL45O.mjs} +6 -5
- package/dist/cli/{sessions-6GC7OFTT.js → sessions-EYXWOSWK.js} +5 -5
- package/dist/cli/{sessions-RLN6UQS3.mjs → sessions-SF7WJPJP.mjs} +4 -4
- package/dist/cli/{settings-DPNVUAV2.js → settings-BA3GHBOD.js} +76 -75
- package/dist/cli/{settings-KIPAMRPP.mjs → settings-Y57JTFDD.mjs} +9 -8
- package/dist/cli/{setup-TU2F7PU5.mjs → setup-7GR5GBHA.mjs} +6 -6
- package/dist/cli/{setup-DTL3L5SG.js → setup-RERXYC66.js} +41 -41
- package/dist/cli/{skills-UV5MYJ46.mjs → skills-SJWIQAV5.mjs} +4 -4
- package/dist/cli/skills-V7EY75HB.js +28 -0
- package/dist/cli/tools-H5HLBCHH.js +41 -0
- package/dist/cli/{tools-QRRNDCQ7.mjs → tools-ZF3JXPNL.mjs} +10 -9
- package/dist/cli/update-472HA3LT.js +28 -0
- package/dist/cli/{update-4426TF35.mjs → update-FFFYQAOJ.mjs} +6 -6
- package/dist/cli/{workflow-HNLOVISB.js → workflow-SZJVQH4T.js} +17 -16
- package/dist/cli/{workflow-N4U5VLZ3.mjs → workflow-XVFEEGAS.mjs} +7 -6
- package/dist/{client-e6Qh5ZIg.d.mts → client-DU5dtHDy.d.mts} +153 -4
- package/dist/{client-Uxuy-xQ2.d.ts → client-mCE88hC4.d.ts} +153 -4
- package/dist/{compiler-manifest-CY2v8ab0.d.ts → compiler-manifest-DE4RdAiY.d.mts} +61 -1
- package/dist/{compiler-manifest-CY2v8ab0.d.mts → compiler-manifest-DE4RdAiY.d.ts} +61 -1
- package/dist/{index-B9fBZH1g.d.mts → index-BI6nWgaV.d.mts} +1 -1
- package/dist/{index-BZ6uzZJl.d.ts → index-Bi-f7HFT.d.ts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +120 -29
- package/dist/index.mjs +111 -20
- package/dist/install-integrity.json +91 -86
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +5 -2
- package/dist/plays/run-request.mjs +4 -1
- package/dist/release.d.mts +4 -1
- package/dist/release.d.ts +4 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-67TAELQL.js +0 -39
- package/dist/cli/git-I5JTK6YU.js +0 -23
- package/dist/cli/play-A2V7YDU7.js +0 -157
- package/dist/cli/search-WWXMBVPH.js +0 -26
- package/dist/cli/skills-SWOSEZLB.js +0 -28
- package/dist/cli/tools-IL2YCDQ6.js +0 -40
- package/dist/cli/update-BERDPEYR.js +0 -28
|
@@ -2,25 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk2HAD745Vjs = require('./chunk-2HAD745V.js');
|
|
6
6
|
require('./chunk-S6R3OX7B.js');
|
|
7
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-UHNDVD3P.js');
|
|
8
|
+
require('./chunk-XDVT3GOM.js');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
var
|
|
15
|
+
var _chunkM7Y7JYZXjs = require('./chunk-M7Y7JYZX.js');
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
18
|
-
var
|
|
19
|
+
var _chunkCDFH2DYLjs = require('./chunk-CDFH2DYL.js');
|
|
19
20
|
require('./chunk-XNYIZMNQ.js');
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
23
|
-
require('./chunk-
|
|
24
|
+
require('./chunk-RWHWF5ZJ.js');
|
|
24
25
|
require('./chunk-OG64RBAC.js');
|
|
25
26
|
require('./chunk-COGTRVWW.js');
|
|
26
27
|
|
|
@@ -35,7 +36,7 @@ var SUBSCRIPTION_CANCEL_PATH = "/api/v2/billing/subscription/cancel";
|
|
|
35
36
|
var BILLING_TOP_UP_PATH = "/api/v2/billing/top-up";
|
|
36
37
|
var DEFAULT_BALANCE_RECOVERY_CREDITS = 100;
|
|
37
38
|
function billingFailureFromError(error, options) {
|
|
38
|
-
if (error instanceof
|
|
39
|
+
if (error instanceof _chunkCDFH2DYLjs.AuthError) {
|
|
39
40
|
return {
|
|
40
41
|
exitCode: 3,
|
|
41
42
|
code: "AUTH_ERROR",
|
|
@@ -69,7 +70,7 @@ function reportBillingFailure(failure, options) {
|
|
|
69
70
|
if (failure.next) {
|
|
70
71
|
textLines.push(`Next: ${failure.next}`);
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
73
74
|
{
|
|
74
75
|
ok: false,
|
|
75
76
|
exitCode: failure.exitCode,
|
|
@@ -90,7 +91,7 @@ function parseTopUpCredits(raw) {
|
|
|
90
91
|
return parsed;
|
|
91
92
|
}
|
|
92
93
|
function topUpIdempotencyKey(raw) {
|
|
93
|
-
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` :
|
|
94
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunk2HAD745Vjs.requireBillingIdempotencyKey.call(void 0, raw);
|
|
94
95
|
}
|
|
95
96
|
function targetBillingIdempotencyKey(raw) {
|
|
96
97
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -127,7 +128,7 @@ function apiErrorCode(error) {
|
|
|
127
128
|
return _nullishCoalesce(error.code, () => ( "BILLING_API_ERROR"));
|
|
128
129
|
}
|
|
129
130
|
function billingTopUpFailureFromError(error, input) {
|
|
130
|
-
if (error instanceof
|
|
131
|
+
if (error instanceof _chunkCDFH2DYLjs.AuthError || error instanceof _chunkCDFH2DYLjs.ConfigError) {
|
|
131
132
|
return {
|
|
132
133
|
exitCode: 3,
|
|
133
134
|
code: "AUTH_ERROR",
|
|
@@ -296,7 +297,7 @@ function defaultLedgerExportPath() {
|
|
|
296
297
|
);
|
|
297
298
|
}
|
|
298
299
|
async function handleBalance(options) {
|
|
299
|
-
const { http } =
|
|
300
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
300
301
|
const payload = await http.get(
|
|
301
302
|
"/api/v2/billing/balance"
|
|
302
303
|
);
|
|
@@ -364,7 +365,7 @@ async function handleBalance(options) {
|
|
|
364
365
|
...options.verbose ? detail : [],
|
|
365
366
|
...lines.slice(1)
|
|
366
367
|
];
|
|
367
|
-
|
|
368
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
368
369
|
{
|
|
369
370
|
...payload,
|
|
370
371
|
...recovery ? { recovery } : {},
|
|
@@ -388,7 +389,7 @@ function quoteShellArgument(value) {
|
|
|
388
389
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
389
390
|
}
|
|
390
391
|
async function handleUsage(options) {
|
|
391
|
-
const { http } =
|
|
392
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
392
393
|
const params = new URLSearchParams();
|
|
393
394
|
if (options.requestId !== void 0) {
|
|
394
395
|
const requestId = options.requestId.trim();
|
|
@@ -469,7 +470,7 @@ async function handleUsage(options) {
|
|
|
469
470
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
470
471
|
] : []
|
|
471
472
|
];
|
|
472
|
-
|
|
473
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
473
474
|
{
|
|
474
475
|
...payload,
|
|
475
476
|
recent: {
|
|
@@ -483,7 +484,7 @@ async function handleUsage(options) {
|
|
|
483
484
|
);
|
|
484
485
|
}
|
|
485
486
|
async function handleLimit(options) {
|
|
486
|
-
const { http } =
|
|
487
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
487
488
|
const payload = await http.get(
|
|
488
489
|
"/api/v2/billing/limit"
|
|
489
490
|
);
|
|
@@ -491,7 +492,7 @@ async function handleLimit(options) {
|
|
|
491
492
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
492
493
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
493
494
|
] : ["Monthly usage cap: off"];
|
|
494
|
-
|
|
495
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
495
496
|
{
|
|
496
497
|
...payload,
|
|
497
498
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -500,12 +501,12 @@ async function handleLimit(options) {
|
|
|
500
501
|
);
|
|
501
502
|
}
|
|
502
503
|
async function handleSetLimit(credits, options) {
|
|
503
|
-
const { http } =
|
|
504
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
504
505
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
505
506
|
method: "PUT",
|
|
506
507
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
507
508
|
});
|
|
508
|
-
|
|
509
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
509
510
|
{
|
|
510
511
|
...payload,
|
|
511
512
|
render: {
|
|
@@ -521,11 +522,11 @@ async function handleSetLimit(credits, options) {
|
|
|
521
522
|
);
|
|
522
523
|
}
|
|
523
524
|
async function handleLimitOff(options) {
|
|
524
|
-
const { http } =
|
|
525
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
525
526
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
526
527
|
method: "DELETE"
|
|
527
528
|
});
|
|
528
|
-
|
|
529
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
529
530
|
{
|
|
530
531
|
...payload,
|
|
531
532
|
render: {
|
|
@@ -545,7 +546,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
545
546
|
let initialized = false;
|
|
546
547
|
let pageNumber = 0;
|
|
547
548
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
548
|
-
for await (const entries of
|
|
549
|
+
for await (const entries of _chunk2HAD745Vjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
549
550
|
pageNumber += 1;
|
|
550
551
|
console.error(
|
|
551
552
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -584,7 +585,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
584
585
|
return summary;
|
|
585
586
|
}
|
|
586
587
|
async function handleHistory(options) {
|
|
587
|
-
const { http } =
|
|
588
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
588
589
|
const windows = {
|
|
589
590
|
"1d": 86400,
|
|
590
591
|
"1w": 604800,
|
|
@@ -596,10 +597,10 @@ async function handleHistory(options) {
|
|
|
596
597
|
process.cwd(),
|
|
597
598
|
"deepline",
|
|
598
599
|
"data",
|
|
599
|
-
|
|
600
|
+
_chunkM7Y7JYZXjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
600
601
|
);
|
|
601
602
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
602
|
-
|
|
603
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
603
604
|
{
|
|
604
605
|
output_path: outputPath,
|
|
605
606
|
row_count: summary.row_count,
|
|
@@ -636,14 +637,14 @@ async function handleLedgerExportAll(options) {
|
|
|
636
637
|
);
|
|
637
638
|
return;
|
|
638
639
|
}
|
|
639
|
-
const { http } =
|
|
640
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
640
641
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
641
642
|
const summary = await exportLedger(http, outputPath, {
|
|
642
643
|
sinceAt,
|
|
643
644
|
runId: options.runId,
|
|
644
645
|
operation: options.operation
|
|
645
646
|
});
|
|
646
|
-
|
|
647
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
647
648
|
{
|
|
648
649
|
output_path: outputPath,
|
|
649
650
|
row_count: summary.row_count,
|
|
@@ -682,7 +683,7 @@ function targetPlanLine(plan) {
|
|
|
682
683
|
return `${plan.name} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
683
684
|
}
|
|
684
685
|
async function handlePlans(options) {
|
|
685
|
-
const client = new (0,
|
|
686
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
686
687
|
const payload = await client.billing.targetPlans();
|
|
687
688
|
const listedCurrentPlan = payload.plans.find(
|
|
688
689
|
(plan) => plan.sku === payload.current_plan_sku
|
|
@@ -695,8 +696,8 @@ async function handlePlans(options) {
|
|
|
695
696
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
696
697
|
"Change plan: deepline billing change-plan <plan_sku>"
|
|
697
698
|
];
|
|
698
|
-
const legacyPayload =
|
|
699
|
-
|
|
699
|
+
const legacyPayload = _chunkM7Y7JYZXjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
700
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
700
701
|
{
|
|
701
702
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
702
703
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -706,7 +707,7 @@ async function handlePlans(options) {
|
|
|
706
707
|
);
|
|
707
708
|
}
|
|
708
709
|
async function handleSubscribe(planVersionId, options) {
|
|
709
|
-
const { http } =
|
|
710
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
710
711
|
const payload = await http.request(
|
|
711
712
|
"/api/v2/billing/subscription/checkout",
|
|
712
713
|
{
|
|
@@ -715,8 +716,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
715
716
|
}
|
|
716
717
|
);
|
|
717
718
|
const url = String(payload.checkout_url || "");
|
|
718
|
-
if (!options.json && options.open !== false && url)
|
|
719
|
-
|
|
719
|
+
if (!options.json && options.open !== false && url) _chunkM7Y7JYZXjs.openInBrowser.call(void 0, url);
|
|
720
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
720
721
|
{
|
|
721
722
|
...payload,
|
|
722
723
|
render: {
|
|
@@ -732,7 +733,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
732
733
|
);
|
|
733
734
|
}
|
|
734
735
|
async function handleSubscriptionStatus(options) {
|
|
735
|
-
const client = new (0,
|
|
736
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
736
737
|
const payload = await client.billing.subscription.status();
|
|
737
738
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
738
739
|
const lines = [
|
|
@@ -752,7 +753,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
752
753
|
],
|
|
753
754
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
754
755
|
];
|
|
755
|
-
|
|
756
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
756
757
|
{
|
|
757
758
|
...payload,
|
|
758
759
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -761,7 +762,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
761
762
|
);
|
|
762
763
|
}
|
|
763
764
|
async function handleSubscriptionCancel(options) {
|
|
764
|
-
const client = new (0,
|
|
765
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
765
766
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
766
767
|
if (options.dryRun) {
|
|
767
768
|
const status = await client.billing.subscription.status();
|
|
@@ -778,7 +779,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
778
779
|
return;
|
|
779
780
|
}
|
|
780
781
|
const consequence = action === "cancel" ? `Would schedule cancellation at period end${status.current_period_end ? ` (${status.current_period_end})` : ""}. The subscription stays active until then and remaining credits are kept.` : "Would reverse the pending cancellation; the subscription would renew normally.";
|
|
781
|
-
|
|
782
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
782
783
|
{
|
|
783
784
|
ok: true,
|
|
784
785
|
dry_run: true,
|
|
@@ -833,7 +834,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
833
834
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
834
835
|
"Undo with: deepline billing subscription cancel --undo"
|
|
835
836
|
];
|
|
836
|
-
|
|
837
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
837
838
|
{
|
|
838
839
|
ok: true,
|
|
839
840
|
...result,
|
|
@@ -887,7 +888,7 @@ async function handleInvoices(options) {
|
|
|
887
888
|
return;
|
|
888
889
|
}
|
|
889
890
|
}
|
|
890
|
-
const client = new (0,
|
|
891
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
891
892
|
let payload;
|
|
892
893
|
try {
|
|
893
894
|
payload = await client.billing.invoices.list(
|
|
@@ -916,7 +917,7 @@ async function handleInvoices(options) {
|
|
|
916
917
|
url: entry.url
|
|
917
918
|
}))
|
|
918
919
|
} : { ...payload, count: entries.length };
|
|
919
|
-
|
|
920
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
920
921
|
{
|
|
921
922
|
...envelope,
|
|
922
923
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -925,7 +926,7 @@ async function handleInvoices(options) {
|
|
|
925
926
|
);
|
|
926
927
|
}
|
|
927
928
|
async function handleCheckout(options) {
|
|
928
|
-
const { http } =
|
|
929
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
929
930
|
const payload = await http.post(
|
|
930
931
|
"/api/v2/billing/checkout",
|
|
931
932
|
{
|
|
@@ -935,8 +936,8 @@ async function handleCheckout(options) {
|
|
|
935
936
|
}
|
|
936
937
|
);
|
|
937
938
|
const url = String(payload.url || payload.checkout_url || "");
|
|
938
|
-
if (!options.json && !options.noOpen && url)
|
|
939
|
-
|
|
939
|
+
if (!options.json && !options.noOpen && url) _chunkM7Y7JYZXjs.openInBrowser.call(void 0, url);
|
|
940
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
940
941
|
{
|
|
941
942
|
...payload,
|
|
942
943
|
render: {
|
|
@@ -981,7 +982,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
981
982
|
return;
|
|
982
983
|
}
|
|
983
984
|
if (options.dryRun) {
|
|
984
|
-
|
|
985
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
985
986
|
{
|
|
986
987
|
ok: true,
|
|
987
988
|
dry_run: true,
|
|
@@ -1011,7 +1012,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1011
1012
|
);
|
|
1012
1013
|
return;
|
|
1013
1014
|
}
|
|
1014
|
-
const client = new (0,
|
|
1015
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
1015
1016
|
let payload;
|
|
1016
1017
|
try {
|
|
1017
1018
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1028,7 +1029,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1028
1029
|
return;
|
|
1029
1030
|
}
|
|
1030
1031
|
if (payload.status === "pending") {
|
|
1031
|
-
|
|
1032
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1032
1033
|
{
|
|
1033
1034
|
ok: true,
|
|
1034
1035
|
...payload,
|
|
@@ -1092,17 +1093,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1092
1093
|
]
|
|
1093
1094
|
}
|
|
1094
1095
|
};
|
|
1095
|
-
|
|
1096
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1096
1097
|
json: options.json
|
|
1097
1098
|
});
|
|
1098
1099
|
}
|
|
1099
1100
|
async function handleTargetStatus(options) {
|
|
1100
|
-
const client = new (0,
|
|
1101
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
1101
1102
|
const payload = await client.billing.targetStatus();
|
|
1102
1103
|
const balanceCommand = "deepline billing balance";
|
|
1103
1104
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1104
1105
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1105
|
-
|
|
1106
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1106
1107
|
{
|
|
1107
1108
|
ok: true,
|
|
1108
1109
|
...payload,
|
|
@@ -1132,8 +1133,8 @@ async function handleTargetStatus(options) {
|
|
|
1132
1133
|
);
|
|
1133
1134
|
}
|
|
1134
1135
|
async function handleEntitlements(options) {
|
|
1135
|
-
const payload = await new (0,
|
|
1136
|
-
|
|
1136
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.entitlements();
|
|
1137
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1137
1138
|
{
|
|
1138
1139
|
ok: true,
|
|
1139
1140
|
...payload,
|
|
@@ -1158,7 +1159,7 @@ async function handleEntitlements(options) {
|
|
|
1158
1159
|
);
|
|
1159
1160
|
}
|
|
1160
1161
|
async function handleAutoRechargeStatus(options) {
|
|
1161
|
-
const payload = await new (0,
|
|
1162
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1162
1163
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1163
1164
|
const lines = [
|
|
1164
1165
|
`State: ${state}`,
|
|
@@ -1168,7 +1169,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1168
1169
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1169
1170
|
] : []
|
|
1170
1171
|
];
|
|
1171
|
-
|
|
1172
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1172
1173
|
{
|
|
1173
1174
|
ok: true,
|
|
1174
1175
|
...payload,
|
|
@@ -1217,7 +1218,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1217
1218
|
}
|
|
1218
1219
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1219
1220
|
if (options.dryRun) {
|
|
1220
|
-
|
|
1221
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1221
1222
|
{
|
|
1222
1223
|
ok: true,
|
|
1223
1224
|
dry_run: true,
|
|
@@ -1238,7 +1239,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1238
1239
|
);
|
|
1239
1240
|
return;
|
|
1240
1241
|
}
|
|
1241
|
-
const payload = await new (0,
|
|
1242
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1242
1243
|
enabled: true,
|
|
1243
1244
|
thresholdCredits,
|
|
1244
1245
|
refillToCredits,
|
|
@@ -1246,7 +1247,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1246
1247
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1247
1248
|
idempotencyKey
|
|
1248
1249
|
});
|
|
1249
|
-
|
|
1250
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1250
1251
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1251
1252
|
{ json: options.json }
|
|
1252
1253
|
);
|
|
@@ -1254,7 +1255,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1254
1255
|
async function handleAutoRechargeOff(options) {
|
|
1255
1256
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1256
1257
|
if (options.dryRun) {
|
|
1257
|
-
|
|
1258
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1258
1259
|
{
|
|
1259
1260
|
ok: true,
|
|
1260
1261
|
dry_run: true,
|
|
@@ -1269,11 +1270,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1269
1270
|
);
|
|
1270
1271
|
return;
|
|
1271
1272
|
}
|
|
1272
|
-
const payload = await new (0,
|
|
1273
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1273
1274
|
enabled: false,
|
|
1274
1275
|
idempotencyKey
|
|
1275
1276
|
});
|
|
1276
|
-
|
|
1277
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1277
1278
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1278
1279
|
{ json: options.json }
|
|
1279
1280
|
);
|
|
@@ -1292,11 +1293,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1292
1293
|
return;
|
|
1293
1294
|
}
|
|
1294
1295
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1295
|
-
const payload = await new (0,
|
|
1296
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.purchaseCredits({
|
|
1296
1297
|
credits,
|
|
1297
1298
|
idempotencyKey
|
|
1298
1299
|
});
|
|
1299
|
-
|
|
1300
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1300
1301
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1301
1302
|
{ json: options.json }
|
|
1302
1303
|
);
|
|
@@ -1332,7 +1333,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1332
1333
|
return;
|
|
1333
1334
|
}
|
|
1334
1335
|
if (options.dryRun) {
|
|
1335
|
-
|
|
1336
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1336
1337
|
{
|
|
1337
1338
|
ok: true,
|
|
1338
1339
|
dry_run: true,
|
|
@@ -1345,12 +1346,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1345
1346
|
);
|
|
1346
1347
|
return;
|
|
1347
1348
|
}
|
|
1348
|
-
const payload = await new (0,
|
|
1349
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1349
1350
|
credits,
|
|
1350
1351
|
orgId: options.orgId,
|
|
1351
1352
|
idempotencyKey: options.idempotencyKey
|
|
1352
1353
|
});
|
|
1353
|
-
|
|
1354
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1354
1355
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1355
1356
|
{ json: options.json }
|
|
1356
1357
|
);
|
|
@@ -1370,37 +1371,37 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1370
1371
|
return;
|
|
1371
1372
|
}
|
|
1372
1373
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1373
|
-
const payload = await new (0,
|
|
1374
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.transitionPlan({
|
|
1374
1375
|
action: "start_or_change",
|
|
1375
1376
|
targetPlanSku: planSku,
|
|
1376
1377
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1377
1378
|
idempotencyKey
|
|
1378
1379
|
});
|
|
1379
|
-
|
|
1380
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1380
1381
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1381
1382
|
{ json: options.json }
|
|
1382
1383
|
);
|
|
1383
1384
|
}
|
|
1384
1385
|
async function handleTargetPlanCancellation(options) {
|
|
1385
1386
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1386
|
-
const payload = await new (0,
|
|
1387
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.transitionPlan({
|
|
1387
1388
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1388
1389
|
idempotencyKey
|
|
1389
1390
|
});
|
|
1390
|
-
|
|
1391
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1391
1392
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1392
1393
|
{ json: options.json }
|
|
1393
1394
|
);
|
|
1394
1395
|
}
|
|
1395
1396
|
async function handleTargetPortal(options) {
|
|
1396
|
-
const payload = await new (0,
|
|
1397
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.portalSession(
|
|
1397
1398
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1398
1399
|
);
|
|
1399
|
-
if (!options.json && !options.noOpen)
|
|
1400
|
-
|
|
1400
|
+
if (!options.json && !options.noOpen) _chunkM7Y7JYZXjs.openInBrowser.call(void 0, payload.url);
|
|
1401
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1401
1402
|
}
|
|
1402
1403
|
async function handleRedeemCode(code, options) {
|
|
1403
|
-
const { http } =
|
|
1404
|
+
const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
|
|
1404
1405
|
const payload = await http.post(
|
|
1405
1406
|
"/api/v2/billing/checkout",
|
|
1406
1407
|
{
|
|
@@ -1408,8 +1409,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1408
1409
|
}
|
|
1409
1410
|
);
|
|
1410
1411
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1411
|
-
if (!options.json && !options.noOpen && url)
|
|
1412
|
-
|
|
1412
|
+
if (!options.json && !options.noOpen && url) _chunkM7Y7JYZXjs.openInBrowser.call(void 0, url);
|
|
1413
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1413
1414
|
{
|
|
1414
1415
|
...payload,
|
|
1415
1416
|
render: {
|
|
@@ -1456,6 +1457,32 @@ Examples:
|
|
|
1456
1457
|
deepline billing ledger export all
|
|
1457
1458
|
`
|
|
1458
1459
|
);
|
|
1460
|
+
billing.command("quote").description(
|
|
1461
|
+
"Quote a sandbox session in Deepline credits; excludes provider tools and Customer DB compute."
|
|
1462
|
+
).requiredOption(
|
|
1463
|
+
"--sandbox-timeout <duration>",
|
|
1464
|
+
"Runtime timeout, such as 30m or 2h"
|
|
1465
|
+
).option("--quantity <sessions>", "Number of sandbox sessions", "1").option("--json", "Emit the bounded component quotation as JSON").action(
|
|
1466
|
+
async (options) => {
|
|
1467
|
+
const quantity = Number(options.quantity);
|
|
1468
|
+
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1469
|
+
throw new Error("--quantity must be a positive safe integer.");
|
|
1470
|
+
}
|
|
1471
|
+
const quote = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.quote({
|
|
1472
|
+
quantity,
|
|
1473
|
+
sandbox_runtime: {
|
|
1474
|
+
timeout: options.sandboxTimeout,
|
|
1475
|
+
size: "standard"
|
|
1476
|
+
}
|
|
1477
|
+
});
|
|
1478
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, quote, {
|
|
1479
|
+
json: options.json,
|
|
1480
|
+
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1481
|
+
${quote.explanation}
|
|
1482
|
+
`
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
);
|
|
1459
1486
|
billing.command("balance").description("Show current billing balance.").addHelpText(
|
|
1460
1487
|
"after",
|
|
1461
1488
|
`
|
|
@@ -1679,8 +1706,8 @@ Examples:
|
|
|
1679
1706
|
new (0, _commander.Command)("trigger").description(
|
|
1680
1707
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
1681
1708
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
1682
|
-
const result = await new (0,
|
|
1683
|
-
|
|
1709
|
+
const result = await new (0, _chunk2HAD745Vjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
1710
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
1684
1711
|
})
|
|
1685
1712
|
);
|
|
1686
1713
|
billing.command("change-plan").description("Start or change the target billing plan.").argument("<plan_sku>", "payg-v1, builder-v1, growth-v1, or team-v1").option(
|
|
@@ -2,25 +2,26 @@ import {
|
|
|
2
2
|
DeeplineClient,
|
|
3
3
|
iterateCursorPages,
|
|
4
4
|
requireBillingIdempotencyKey
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q26LUSQ2.mjs";
|
|
6
6
|
import "./chunk-6IKARAYD.mjs";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-JI2B4RZP.mjs";
|
|
8
|
+
import "./chunk-UBKA33KY.mjs";
|
|
8
9
|
import {
|
|
9
10
|
createTimestampedName,
|
|
10
11
|
getAuthedHttpClient,
|
|
11
12
|
openInBrowser,
|
|
12
13
|
printCommandEnvelope,
|
|
13
14
|
shouldEmitJson
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5PRVMXKB.mjs";
|
|
15
16
|
import {
|
|
16
17
|
AuthError,
|
|
17
18
|
ConfigError
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-LMMEAMA7.mjs";
|
|
19
20
|
import "./chunk-DLIRSHV6.mjs";
|
|
20
21
|
import {
|
|
21
22
|
DeeplineError
|
|
22
23
|
} from "./chunk-NXGCO4JB.mjs";
|
|
23
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-LZPCDB7U.mjs";
|
|
24
25
|
import "./chunk-WZYKRD7T.mjs";
|
|
25
26
|
import "./chunk-KRD6H754.mjs";
|
|
26
27
|
|
|
@@ -1456,6 +1457,32 @@ Examples:
|
|
|
1456
1457
|
deepline billing ledger export all
|
|
1457
1458
|
`
|
|
1458
1459
|
);
|
|
1460
|
+
billing.command("quote").description(
|
|
1461
|
+
"Quote a sandbox session in Deepline credits; excludes provider tools and Customer DB compute."
|
|
1462
|
+
).requiredOption(
|
|
1463
|
+
"--sandbox-timeout <duration>",
|
|
1464
|
+
"Runtime timeout, such as 30m or 2h"
|
|
1465
|
+
).option("--quantity <sessions>", "Number of sandbox sessions", "1").option("--json", "Emit the bounded component quotation as JSON").action(
|
|
1466
|
+
async (options) => {
|
|
1467
|
+
const quantity = Number(options.quantity);
|
|
1468
|
+
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1469
|
+
throw new Error("--quantity must be a positive safe integer.");
|
|
1470
|
+
}
|
|
1471
|
+
const quote = await new DeeplineClient().billing.quote({
|
|
1472
|
+
quantity,
|
|
1473
|
+
sandbox_runtime: {
|
|
1474
|
+
timeout: options.sandboxTimeout,
|
|
1475
|
+
size: "standard"
|
|
1476
|
+
}
|
|
1477
|
+
});
|
|
1478
|
+
printCommandEnvelope(quote, {
|
|
1479
|
+
json: options.json,
|
|
1480
|
+
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1481
|
+
${quote.explanation}
|
|
1482
|
+
`
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
);
|
|
1459
1486
|
billing.command("balance").description("Show current billing balance.").addHelpText(
|
|
1460
1487
|
"after",
|
|
1461
1488
|
`
|