deepline 0.3.548 → 0.3.549
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-core.ts +93 -11
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/plays/check-local-play-graph.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +203 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +20 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +33 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +19 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-failure-codes.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +36 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +93 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +9 -1
- package/dist/bundling-sources/shared_libs/plays/play-check-compact.ts +636 -0
- package/dist/cli/auth-UVEZIP3H.js +43 -0
- package/dist/cli/{auth-YOOVLLUL.mjs → auth-YENF525S.mjs} +5 -5
- package/dist/cli/{billing-HETIOUD6.js → billing-52GAHIDZ.js} +95 -95
- package/dist/cli/{billing-2NCNX6L2.mjs → billing-XPXB27G7.mjs} +9 -9
- package/dist/cli/{chunk-IIWXBRDK.js → chunk-3IUQNHIG.js} +3 -3
- package/dist/cli/{chunk-HIMZ57QD.mjs → chunk-4AUV5QJF.mjs} +5 -5
- package/dist/cli/{chunk-PVE3A2BO.js → chunk-4DJNXAPH.js} +75 -37
- package/dist/cli/{chunk-WIHQAZPV.js → chunk-4HSSPT73.js} +6 -6
- package/dist/cli/{chunk-OGDQFVCP.mjs → chunk-4QUWXUUJ.mjs} +35 -6
- package/dist/cli/{chunk-CXZLHBNK.js → chunk-5622PYAP.js} +4 -4
- package/dist/cli/{chunk-F4ON5COB.mjs → chunk-5CXE22BI.mjs} +2 -2
- package/dist/cli/{chunk-HU3DDLGD.mjs → chunk-5T37KQNG.mjs} +5 -5
- package/dist/cli/{chunk-T3RDWG5J.js → chunk-7FY7AHR6.js} +2 -2
- package/dist/cli/{chunk-PVQCX6KQ.js → chunk-ADWMIZCB.js} +67 -9
- package/dist/cli/{chunk-OQCYSLML.mjs → chunk-ANOTB6V3.mjs} +4 -4
- package/dist/cli/{chunk-XKEBQVCP.mjs → chunk-AZSVDAXT.mjs} +5 -5
- package/dist/cli/{chunk-NFMX7BRF.mjs → chunk-BDOLPGHD.mjs} +2 -2
- package/dist/cli/{chunk-VK2GSTRN.js → chunk-BDUZJX4V.js} +26 -26
- package/dist/cli/{chunk-7H6TQ6W2.js → chunk-BPBPY42E.js} +5 -5
- package/dist/cli/{chunk-3QRU6RY7.mjs → chunk-CX4KGWCH.mjs} +3 -3
- package/dist/cli/{chunk-HTZIJORU.js → chunk-CXFOYRI4.js} +99 -99
- package/dist/cli/{chunk-U35ZLVBA.mjs → chunk-DCTEH6N5.mjs} +2 -2
- package/dist/cli/{chunk-LAVPP6WD.js → chunk-DIRLEJJX.js} +41 -41
- package/dist/cli/{chunk-7JIOJLTS.js → chunk-ETLEPHLT.js} +7 -7
- package/dist/cli/{chunk-6GIZNOXQ.js → chunk-HPSCRVTM.js} +12 -12
- package/dist/cli/{chunk-BDBEEV6X.js → chunk-HWCIU3KY.js} +22 -22
- package/dist/cli/{chunk-TKGFHRHE.mjs → chunk-J6FINSAK.mjs} +49 -11
- package/dist/cli/{chunk-JQWX377P.js → chunk-KBMBNUUW.js} +5 -5
- package/dist/cli/{chunk-WI4MCR7M.js → chunk-KTZ3VU6S.js} +5 -5
- package/dist/cli/{chunk-7AJ5V3BK.mjs → chunk-L6UMWAAY.mjs} +1 -1
- package/dist/cli/{chunk-FUUYWEF4.mjs → chunk-LMFTDDAM.mjs} +2 -2
- package/dist/cli/{chunk-MWQ4WWZF.mjs → chunk-LP2VNGG3.mjs} +2 -2
- package/dist/cli/{chunk-RMCCB3XY.mjs → chunk-MAE3AKDR.mjs} +67 -9
- package/dist/cli/{chunk-BWJZ4NQJ.js → chunk-NVALIJQS.js} +15 -15
- package/dist/cli/{chunk-5XFJBIQT.js → chunk-OWX4AAJ4.js} +13 -13
- package/dist/cli/{chunk-FMQA7UZZ.mjs → chunk-PLAJ6HPD.mjs} +2 -2
- package/dist/cli/{chunk-GCEGQ7TQ.mjs → chunk-PLJCY35C.mjs} +1 -1
- package/dist/cli/{chunk-ATTURFOV.mjs → chunk-PQX4WTBY.mjs} +1 -1
- package/dist/cli/{chunk-I2JIWKCQ.js → chunk-QGKX2WBZ.js} +52 -23
- package/dist/cli/{chunk-UBQQR56I.mjs → chunk-QIZBUY2N.mjs} +4 -4
- package/dist/cli/{chunk-5XXPP3PR.js → chunk-QUELC3B2.js} +10 -10
- package/dist/cli/{chunk-HDLMX7SG.js → chunk-RMKRZJOS.js} +16 -16
- package/dist/cli/{chunk-7UJZWI5Z.js → chunk-SVNAP2QI.js} +9 -9
- package/dist/cli/{chunk-GUIYFOG2.js → chunk-TYOAOSDL.js} +3 -3
- package/dist/cli/{chunk-QZ74ZC55.mjs → chunk-U6KHWIAO.mjs} +1 -1
- package/dist/cli/{chunk-MQSKSISW.mjs → chunk-UGVXHT62.mjs} +1 -1
- package/dist/cli/{chunk-VSACOMIA.mjs → chunk-V5WPYOAE.mjs} +5 -5
- package/dist/cli/{chunk-2OG2KBYJ.js → chunk-V7WMNX4R.js} +1 -1
- package/dist/cli/{chunk-M2OZORIH.js → chunk-VLAJGF27.js} +2 -2
- package/dist/cli/{chunk-QQBRXMZM.mjs → chunk-W77LBYF3.mjs} +11 -11
- package/dist/cli/{chunk-53QLWPZK.mjs → chunk-X4RGDE4J.mjs} +1 -1
- package/dist/cli/{chunk-5OJOFUMO.js → chunk-XPYCNA43.js} +44 -44
- package/dist/cli/{chunk-XU3D2KFR.mjs → chunk-XS72HELO.mjs} +1 -1
- package/dist/cli/{chunk-AUYBBFPT.js → chunk-Y5MDCPWA.js} +53 -53
- package/dist/cli/{chunk-IQBXX54G.mjs → chunk-Y5SKYU5X.mjs} +3 -3
- package/dist/cli/{chunk-64BFUBXX.mjs → chunk-YX7BX2FA.mjs} +2 -2
- package/dist/cli/{chunk-U7HJXE6Y.js → chunk-YZTS3XA7.js} +2 -2
- package/dist/cli/{chunk-WVZF4DU7.mjs → chunk-Z3DKJOUL.mjs} +1 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-74AFW3BD.js +21 -0
- package/dist/cli/{concurrent-runs-help-FDCCZ45D.mjs → concurrent-runs-help-OYSLW55L.mjs} +6 -6
- package/dist/cli/{csv-OCEQWZO3.js → csv-FRO3UFMQ.js} +13 -13
- package/dist/cli/{csv-GJYLQ52D.mjs → csv-TFCTUYF2.mjs} +4 -4
- package/dist/cli/{db-5MA2UUHQ.mjs → db-NHVZBT2H.mjs} +6 -6
- package/dist/cli/{db-G5QGXFAX.js → db-SNFNRVZJ.js} +27 -27
- package/dist/cli/describe-2JCOC4AK.js +50 -0
- package/dist/cli/{describe-4DOJ4DHA.mjs → describe-OVFPRJJL.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-C7SMBHHB.mjs → executions-HWMH2LTC.mjs} +6 -6
- package/dist/cli/{executions-IYEVUPJI.js → executions-RZLKKPZV.js} +8 -8
- package/dist/cli/{feedback-GYAF46GA.js → feedback-3D5OROCI.js} +14 -14
- package/dist/cli/{feedback-XUU2UKM6.mjs → feedback-WD4JVF77.mjs} +6 -6
- package/dist/cli/git-GCCPCUWJ.js +25 -0
- package/dist/cli/{git-WVCMK5AH.mjs → git-RYUKBCUZ.mjs} +5 -5
- package/dist/cli/index.js +146 -146
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{integrations-FXADGAX2.mjs → integrations-KJPFCEXL.mjs} +7 -7
- package/dist/cli/{integrations-YYBJJFVX.js → integrations-Y7OK23DW.js} +15 -15
- package/dist/cli/{legacy-noops-LJY7LDUE.mjs → legacy-noops-2PU2ZVEP.mjs} +6 -6
- package/dist/cli/{legacy-noops-REZCYES2.js → legacy-noops-G7ZY7K3K.js} +9 -9
- package/dist/cli/{mcp-XSB3ZJFR.mjs → mcp-D7F2RSOI.mjs} +4 -4
- package/dist/cli/{mcp-L5PURE5S.js → mcp-GILBYX72.js} +24 -24
- package/dist/cli/{monitors-UBPF2OLO.mjs → monitors-IK5KXY2H.mjs} +32 -8
- package/dist/cli/{monitors-I5EIHSGV.js → monitors-OXNHOT3C.js} +125 -101
- package/dist/cli/{org-PHHIN2ER.mjs → org-L5D7EISU.mjs} +6 -6
- package/dist/cli/{org-SGSTGGUD.js → org-OYM3UNTP.js} +88 -88
- package/dist/cli/{play-LEJNJLWY.mjs → play-PK6QO3WX.mjs} +837 -290
- package/dist/cli/{play-WQEKMANL.js → play-YK22QPYO.js} +1423 -876
- package/dist/cli/{providers-RSDXBXIS.js → providers-5CYP7P4N.js} +9 -9
- package/dist/cli/{providers-3W26ZDAV.mjs → providers-Z6MNJDCG.mjs} +6 -6
- package/dist/cli/{quickstart-LGJD2M36.mjs → quickstart-2I73XQXB.mjs} +4 -4
- package/dist/cli/{quickstart-U3QX4EMI.js → quickstart-2YKETYJY.js} +6 -6
- package/dist/cli/{run-YWZ3W5HK.mjs → run-KGQ6TUBB.mjs} +23 -23
- package/dist/cli/{run-F2UPZUJS.js → run-YVSEAVE5.js} +43 -43
- package/dist/cli/{search-O2OJH3PY.mjs → search-V2HPN6FU.mjs} +7 -7
- package/dist/cli/search-YG3UIZ6A.js +32 -0
- package/dist/cli/{search-output-W7OCBYBU.js → search-output-BUSANFRN.js} +6 -6
- package/dist/cli/{search-output-H5BF6SJ3.mjs → search-output-OCTOSDEO.mjs} +4 -4
- package/dist/cli/{secrets-BN4GYVRI.js → secrets-VDKTHCVB.js} +15 -15
- package/dist/cli/{secrets-65XCAA7U.mjs → secrets-WZGRBWI5.mjs} +6 -6
- package/dist/cli/{sessions-SVEVESCQ.mjs → sessions-5DTN55DZ.mjs} +6 -6
- package/dist/cli/sessions-NSPT6LHT.js +22 -0
- package/dist/cli/{settings-7YMDAFCN.js → settings-A7VSNOLI.js} +85 -85
- package/dist/cli/{settings-HAU2NP2H.mjs → settings-BK5FPQ3X.mjs} +12 -12
- package/dist/cli/{setup-5RXHZ6YI.mjs → setup-LLQVPZTP.mjs} +9 -9
- package/dist/cli/{setup-G37QXQGM.js → setup-NV27CYQ5.js} +49 -49
- package/dist/cli/{skills-Q7A3XFAU.mjs → skills-IV6HK4XA.mjs} +7 -7
- package/dist/cli/skills-UA5E4DA3.js +36 -0
- package/dist/cli/{tools-ZG4NYRGB.mjs → tools-4FKPCRD7.mjs} +17 -17
- package/dist/cli/tools-NJVPAG37.js +57 -0
- package/dist/cli/update-DKX27XZB.js +34 -0
- package/dist/cli/{update-2CMZTZCL.mjs → update-MH5M746E.mjs} +9 -9
- package/dist/cli/{views-XUMDMDIE.js → views-JW44TCGL.js} +21 -21
- package/dist/cli/{views-A6IIY4OQ.mjs → views-KXC4JDT7.mjs} +6 -6
- package/dist/cli/{workflow-4EEW6MCD.js → workflow-F5AHL2ET.js} +17 -17
- package/dist/cli/{workflow-74MYISHU.mjs → workflow-FI4DL7ZI.mjs} +7 -7
- package/dist/{client-D1uWA2Vc.d.mts → client-BEJqhQAj.d.mts} +1 -1
- package/dist/{client-Hz7SsBXs.d.ts → client-Ceo295L2.d.ts} +1 -1
- package/dist/{client-core-D3Ad7Flt.d.ts → client-core-BPYuWfBC.d.ts} +49 -1
- package/dist/{client-core-Db_e63Hb.d.mts → client-core-BqetRxx-.d.mts} +49 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +118 -116
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-7UJFY5BY.js +0 -43
- package/dist/cli/concurrent-runs-help-A2IQVZRJ.js +0 -21
- package/dist/cli/describe-SD7DRTBW.js +0 -50
- package/dist/cli/git-7YYVMY6L.js +0 -25
- package/dist/cli/search-K6ANAXLF.js +0 -32
- package/dist/cli/sessions-M52QWLA6.js +0 -22
- package/dist/cli/skills-ZK4D5BJW.js +0 -36
- package/dist/cli/tools-DBZTLYFM.js +0 -57
- package/dist/cli/update-LC5HGEEH.js +0 -34
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkBPBPY42Ejs = require('./chunk-BPBPY42E.js');
|
|
4
|
+
require('./chunk-Y5MDCPWA.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkKBMBNUUWjs = require('./chunk-KBMBNUUW.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk4DJNXAPHjs = require('./chunk-4DJNXAPH.js');
|
|
12
12
|
require('./chunk-4WAM6TLD.js');
|
|
13
13
|
require('./chunk-SL6MYJYM.js');
|
|
14
14
|
require('./chunk-PMH4GLMD.js');
|
|
15
15
|
require('./chunk-XDVT3GOM.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkADWMIZCBjs = require('./chunk-ADWMIZCB.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunkUV4RU2TEjs = require('./chunk-UV4RU2TE.js');
|
|
@@ -29,9 +29,9 @@ var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
33
|
-
require('./chunk-
|
|
34
|
-
require('./chunk-
|
|
32
|
+
var _chunkQGKX2WBZjs = require('./chunk-QGKX2WBZ.js');
|
|
33
|
+
require('./chunk-3IUQNHIG.js');
|
|
34
|
+
require('./chunk-5622PYAP.js');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -40,7 +40,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
|
|
43
|
-
require('./chunk-
|
|
43
|
+
require('./chunk-V7WMNX4R.js');
|
|
44
44
|
require('./chunk-OG64RBAC.js');
|
|
45
45
|
require('./chunk-COGTRVWW.js');
|
|
46
46
|
|
|
@@ -89,7 +89,7 @@ function reportBillingFailure(failure, options) {
|
|
|
89
89
|
if (failure.next) {
|
|
90
90
|
textLines.push(`Next: ${failure.next}`);
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
93
93
|
{
|
|
94
94
|
ok: false,
|
|
95
95
|
exitCode: failure.exitCode,
|
|
@@ -110,7 +110,7 @@ function parseTopUpCredits(raw) {
|
|
|
110
110
|
return parsed;
|
|
111
111
|
}
|
|
112
112
|
function topUpIdempotencyKey(raw) {
|
|
113
|
-
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` :
|
|
113
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunk4DJNXAPHjs.requireBillingIdempotencyKey.call(void 0, raw);
|
|
114
114
|
}
|
|
115
115
|
function targetBillingIdempotencyKey(raw) {
|
|
116
116
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -329,7 +329,7 @@ function defaultLedgerExportPath() {
|
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
331
|
async function handleBalance(options) {
|
|
332
|
-
const { http } =
|
|
332
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
333
333
|
const payload = await http.get(
|
|
334
334
|
"/api/v2/billing/balance"
|
|
335
335
|
);
|
|
@@ -413,7 +413,7 @@ async function handleBalance(options) {
|
|
|
413
413
|
...options.verbose ? detail : [],
|
|
414
414
|
...lines.slice(1)
|
|
415
415
|
];
|
|
416
|
-
|
|
416
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
417
417
|
{
|
|
418
418
|
...payload,
|
|
419
419
|
...recovery ? { recovery } : {},
|
|
@@ -449,7 +449,7 @@ async function handleUsageEvents(options) {
|
|
|
449
449
|
);
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
452
|
-
const client = new (0,
|
|
452
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
453
453
|
let payload;
|
|
454
454
|
try {
|
|
455
455
|
payload = await client.billing.usageEvents({
|
|
@@ -480,7 +480,7 @@ async function handleUsageEvents(options) {
|
|
|
480
480
|
),
|
|
481
481
|
...nextPage ? [`Next page: ${nextPage}`] : []
|
|
482
482
|
];
|
|
483
|
-
|
|
483
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
484
484
|
{
|
|
485
485
|
...payload,
|
|
486
486
|
next: { page: nextPage },
|
|
@@ -502,7 +502,7 @@ async function handleUsage(options) {
|
|
|
502
502
|
return;
|
|
503
503
|
}
|
|
504
504
|
if (options.events) return handleUsageEvents(options);
|
|
505
|
-
const { http } =
|
|
505
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
506
506
|
const params = new URLSearchParams();
|
|
507
507
|
if (options.requestId !== void 0) {
|
|
508
508
|
const requestId = options.requestId.trim();
|
|
@@ -586,7 +586,7 @@ async function handleUsage(options) {
|
|
|
586
586
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
587
587
|
] : []
|
|
588
588
|
];
|
|
589
|
-
|
|
589
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
590
590
|
{
|
|
591
591
|
...payload,
|
|
592
592
|
recent: {
|
|
@@ -600,7 +600,7 @@ async function handleUsage(options) {
|
|
|
600
600
|
);
|
|
601
601
|
}
|
|
602
602
|
async function handleLimit(options) {
|
|
603
|
-
const { http } =
|
|
603
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
604
604
|
const payload = await http.get(
|
|
605
605
|
"/api/v2/billing/limit"
|
|
606
606
|
);
|
|
@@ -608,7 +608,7 @@ async function handleLimit(options) {
|
|
|
608
608
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
609
609
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
610
610
|
] : ["Monthly usage cap: off"];
|
|
611
|
-
|
|
611
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
612
612
|
{
|
|
613
613
|
...payload,
|
|
614
614
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -617,12 +617,12 @@ async function handleLimit(options) {
|
|
|
617
617
|
);
|
|
618
618
|
}
|
|
619
619
|
async function handleSetLimit(credits, options) {
|
|
620
|
-
const { http } =
|
|
620
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
621
621
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
622
622
|
method: "PUT",
|
|
623
623
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
624
624
|
});
|
|
625
|
-
|
|
625
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
626
626
|
{
|
|
627
627
|
...payload,
|
|
628
628
|
render: {
|
|
@@ -638,11 +638,11 @@ async function handleSetLimit(credits, options) {
|
|
|
638
638
|
);
|
|
639
639
|
}
|
|
640
640
|
async function handleLimitOff(options) {
|
|
641
|
-
const { http } =
|
|
641
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
642
642
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
643
643
|
method: "DELETE"
|
|
644
644
|
});
|
|
645
|
-
|
|
645
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
646
646
|
{
|
|
647
647
|
...payload,
|
|
648
648
|
render: {
|
|
@@ -662,7 +662,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
662
662
|
let initialized = false;
|
|
663
663
|
let pageNumber = 0;
|
|
664
664
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
665
|
-
for await (const entries of
|
|
665
|
+
for await (const entries of _chunk4DJNXAPHjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
666
666
|
pageNumber += 1;
|
|
667
667
|
console.error(
|
|
668
668
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -701,7 +701,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
701
701
|
return summary;
|
|
702
702
|
}
|
|
703
703
|
async function handleHistory(options) {
|
|
704
|
-
const { http } =
|
|
704
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
705
705
|
const windows = {
|
|
706
706
|
"1d": 86400,
|
|
707
707
|
"1w": 604800,
|
|
@@ -713,10 +713,10 @@ async function handleHistory(options) {
|
|
|
713
713
|
process.cwd(),
|
|
714
714
|
"deepline",
|
|
715
715
|
"data",
|
|
716
|
-
|
|
716
|
+
_chunkQGKX2WBZjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
717
717
|
);
|
|
718
718
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
719
|
-
|
|
719
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
720
720
|
{
|
|
721
721
|
output_path: outputPath,
|
|
722
722
|
row_count: summary.row_count,
|
|
@@ -753,14 +753,14 @@ async function handleLedgerExportAll(options) {
|
|
|
753
753
|
);
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
|
-
const { http } =
|
|
756
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
757
757
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
758
758
|
const summary = await exportLedger(http, outputPath, {
|
|
759
759
|
sinceAt,
|
|
760
760
|
runId: options.runId,
|
|
761
761
|
operation: options.operation
|
|
762
762
|
});
|
|
763
|
-
|
|
763
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
764
764
|
{
|
|
765
765
|
output_path: outputPath,
|
|
766
766
|
row_count: summary.row_count,
|
|
@@ -801,7 +801,7 @@ function targetPlanLine(plan) {
|
|
|
801
801
|
return `${_nullishCoalesce(plan.display_name, () => ( plan.name))} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth}${bonus} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
802
802
|
}
|
|
803
803
|
async function handlePlans(options) {
|
|
804
|
-
const client = new (0,
|
|
804
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
805
805
|
const payload = await client.billing.targetPlans(
|
|
806
806
|
options.promoCode ? { promoCode: options.promoCode } : void 0
|
|
807
807
|
);
|
|
@@ -821,8 +821,8 @@ async function handlePlans(options) {
|
|
|
821
821
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
822
822
|
_optionalChain([promo, 'optionalAccess', _8 => _8.status]) === "applied" ? `Change plan: deepline billing change-plan <plan_sku> --promo-code ${promo.code}` : "Change plan: deepline billing change-plan <plan_sku>"
|
|
823
823
|
];
|
|
824
|
-
const legacyPayload =
|
|
825
|
-
|
|
824
|
+
const legacyPayload = _chunkQGKX2WBZjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
825
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
826
826
|
{
|
|
827
827
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
828
828
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -832,7 +832,7 @@ async function handlePlans(options) {
|
|
|
832
832
|
);
|
|
833
833
|
}
|
|
834
834
|
async function handleSubscribe(planVersionId, options) {
|
|
835
|
-
const { http } =
|
|
835
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
836
836
|
const payload = await http.request(
|
|
837
837
|
"/api/v2/billing/subscription/checkout",
|
|
838
838
|
{
|
|
@@ -841,8 +841,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
841
841
|
}
|
|
842
842
|
);
|
|
843
843
|
const url = String(payload.checkout_url || "");
|
|
844
|
-
if (!options.json && options.open !== false && url)
|
|
845
|
-
|
|
844
|
+
if (!options.json && options.open !== false && url) _chunkQGKX2WBZjs.openInBrowser.call(void 0, url);
|
|
845
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
846
846
|
{
|
|
847
847
|
...payload,
|
|
848
848
|
render: {
|
|
@@ -858,7 +858,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
858
858
|
);
|
|
859
859
|
}
|
|
860
860
|
async function handleSubscriptionStatus(options) {
|
|
861
|
-
const client = new (0,
|
|
861
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
862
862
|
const payload = await client.billing.subscription.status();
|
|
863
863
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
864
864
|
const lines = [
|
|
@@ -878,7 +878,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
878
878
|
],
|
|
879
879
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
880
880
|
];
|
|
881
|
-
|
|
881
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
882
882
|
{
|
|
883
883
|
...payload,
|
|
884
884
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -887,7 +887,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
887
887
|
);
|
|
888
888
|
}
|
|
889
889
|
async function handleSubscriptionCancel(options) {
|
|
890
|
-
const client = new (0,
|
|
890
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
891
891
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
892
892
|
if (options.dryRun) {
|
|
893
893
|
const status = await client.billing.subscription.status();
|
|
@@ -904,7 +904,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
904
904
|
return;
|
|
905
905
|
}
|
|
906
906
|
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.";
|
|
907
|
-
|
|
907
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
908
908
|
{
|
|
909
909
|
ok: true,
|
|
910
910
|
dry_run: true,
|
|
@@ -960,7 +960,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
960
960
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
961
961
|
"Undo with: deepline billing subscription cancel --undo"
|
|
962
962
|
];
|
|
963
|
-
|
|
963
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
964
964
|
{
|
|
965
965
|
ok: true,
|
|
966
966
|
...result,
|
|
@@ -1014,7 +1014,7 @@ async function handleInvoices(options) {
|
|
|
1014
1014
|
return;
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
const client = new (0,
|
|
1017
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
1018
1018
|
let payload;
|
|
1019
1019
|
try {
|
|
1020
1020
|
payload = await client.billing.invoices.list(
|
|
@@ -1043,7 +1043,7 @@ async function handleInvoices(options) {
|
|
|
1043
1043
|
url: entry.url
|
|
1044
1044
|
}))
|
|
1045
1045
|
} : { ...payload, count: entries.length };
|
|
1046
|
-
|
|
1046
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1047
1047
|
{
|
|
1048
1048
|
...envelope,
|
|
1049
1049
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -1052,7 +1052,7 @@ async function handleInvoices(options) {
|
|
|
1052
1052
|
);
|
|
1053
1053
|
}
|
|
1054
1054
|
async function handleCheckout(options) {
|
|
1055
|
-
const { http } =
|
|
1055
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
1056
1056
|
const payload = await http.post(
|
|
1057
1057
|
"/api/v2/billing/checkout",
|
|
1058
1058
|
{
|
|
@@ -1062,8 +1062,8 @@ async function handleCheckout(options) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
);
|
|
1064
1064
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1065
|
-
if (!options.json && !options.noOpen && url)
|
|
1066
|
-
|
|
1065
|
+
if (!options.json && !options.noOpen && url) _chunkQGKX2WBZjs.openInBrowser.call(void 0, url);
|
|
1066
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1067
1067
|
{
|
|
1068
1068
|
...payload,
|
|
1069
1069
|
render: {
|
|
@@ -1108,7 +1108,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
1110
|
if (options.dryRun) {
|
|
1111
|
-
|
|
1111
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1112
1112
|
{
|
|
1113
1113
|
ok: true,
|
|
1114
1114
|
dry_run: true,
|
|
@@ -1138,7 +1138,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1138
1138
|
);
|
|
1139
1139
|
return;
|
|
1140
1140
|
}
|
|
1141
|
-
const client = new (0,
|
|
1141
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
1142
1142
|
let payload;
|
|
1143
1143
|
try {
|
|
1144
1144
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1155,7 +1155,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
1157
|
if (payload.status === "pending") {
|
|
1158
|
-
|
|
1158
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1159
1159
|
{
|
|
1160
1160
|
ok: true,
|
|
1161
1161
|
...payload,
|
|
@@ -1219,17 +1219,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1219
1219
|
]
|
|
1220
1220
|
}
|
|
1221
1221
|
};
|
|
1222
|
-
|
|
1222
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1223
1223
|
json: options.json
|
|
1224
1224
|
});
|
|
1225
1225
|
}
|
|
1226
1226
|
async function handleTargetStatus(options) {
|
|
1227
|
-
const client = new (0,
|
|
1227
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
1228
1228
|
const payload = await client.billing.targetStatus();
|
|
1229
1229
|
const balanceCommand = "deepline billing balance";
|
|
1230
1230
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1231
1231
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1232
|
-
|
|
1232
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1233
1233
|
{
|
|
1234
1234
|
ok: true,
|
|
1235
1235
|
...payload,
|
|
@@ -1267,13 +1267,13 @@ function formatComputeAmount(minutes, credits) {
|
|
|
1267
1267
|
return `${time} ${minutes === 1 ? "minute" : "minutes"} (${cost} ${credits === 1 ? "credit" : "credits"})`;
|
|
1268
1268
|
}
|
|
1269
1269
|
async function handleIncludedCompute(options) {
|
|
1270
|
-
const client = new (0,
|
|
1270
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
1271
1271
|
const payload = options.enable ? await client.billing.enableIncludedCompute({ includeOverage: true }) : await client.billing.includedCompute({ includeOverage: true });
|
|
1272
1272
|
const rate = _nullishCoalesce(payload.credits_per_minute, () => ( 0));
|
|
1273
1273
|
const includedCredits = _nullishCoalesce(payload.included_credits_used, () => ( payload.included_minutes_used * rate));
|
|
1274
1274
|
const includedMinutes = payload.included_credits_used !== void 0 && rate > 0 ? includedCredits / rate : payload.included_minutes_used;
|
|
1275
1275
|
const overage = payload.overage_credits;
|
|
1276
|
-
|
|
1276
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1277
1277
|
{
|
|
1278
1278
|
ok: true,
|
|
1279
1279
|
...payload,
|
|
@@ -1288,13 +1288,13 @@ async function handleIncludedCompute(options) {
|
|
|
1288
1288
|
] : [],
|
|
1289
1289
|
`Standard sandbox price: ${formatComputeAmount(60, Math.round(rate * 60))}`,
|
|
1290
1290
|
`Allowance resets: ${payload.period_end_at.slice(0, 10)} (UTC)`,
|
|
1291
|
-
|
|
1291
|
+
_chunkADWMIZCBjs.PLAY_RUNTIME_PRICING_NOTE,
|
|
1292
1292
|
_chunkUV4RU2TEjs.PRICING_PAGE_NOTE
|
|
1293
1293
|
] : payload.status === "off" ? [
|
|
1294
1294
|
"Included compute: off; Play compute is billed at provider cost.",
|
|
1295
1295
|
`Allowance if enabled: ${formatComputeAmount(payload.plan.included_minutes, payload.plan.included_minutes * payload.plan.credits_per_minute)} per month`,
|
|
1296
1296
|
`Standard sandbox price if enabled: ${formatComputeAmount(60, Math.round(payload.plan.credits_per_minute * 60))}`,
|
|
1297
|
-
|
|
1297
|
+
_chunkADWMIZCBjs.PLAY_RUNTIME_PRICING_NOTE,
|
|
1298
1298
|
"Run deepline billing compute --enable to turn on included compute. It cannot be turned off again.",
|
|
1299
1299
|
_chunkUV4RU2TEjs.PRICING_PAGE_NOTE
|
|
1300
1300
|
] : [
|
|
@@ -1308,8 +1308,8 @@ async function handleIncludedCompute(options) {
|
|
|
1308
1308
|
);
|
|
1309
1309
|
}
|
|
1310
1310
|
async function handleEntitlements(options) {
|
|
1311
|
-
const payload = await new (0,
|
|
1312
|
-
|
|
1311
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.entitlements();
|
|
1312
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1313
1313
|
{
|
|
1314
1314
|
ok: true,
|
|
1315
1315
|
...payload,
|
|
@@ -1319,7 +1319,7 @@ async function handleEntitlements(options) {
|
|
|
1319
1319
|
title: "billing entitlements",
|
|
1320
1320
|
lines: [
|
|
1321
1321
|
`Plan: ${_nullishCoalesce(_optionalChain([payload, 'access', _12 => _12.plan, 'optionalAccess', _13 => _13.name]), () => ( "Legacy billing"))}`,
|
|
1322
|
-
...
|
|
1322
|
+
..._chunkBPBPY42Ejs.concurrentRunsLine.call(void 0, payload) ? [`Concurrent runs: ${_chunkBPBPY42Ejs.concurrentRunsLine.call(void 0, payload)}`] : [],
|
|
1323
1323
|
...Object.entries(payload.benefits).flatMap(
|
|
1324
1324
|
([key, grant]) => "value" in grant ? [
|
|
1325
1325
|
`${key}: ${grant.status}, ${JSON.stringify(grant.value)}${grant.expiresAt === void 0 ? "" : `, expires ${new Date(grant.expiresAt).toISOString()}`}`
|
|
@@ -1344,7 +1344,7 @@ async function handleEntitlements(options) {
|
|
|
1344
1344
|
);
|
|
1345
1345
|
}
|
|
1346
1346
|
async function handleAutoRechargeStatus(options) {
|
|
1347
|
-
const payload = await new (0,
|
|
1347
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1348
1348
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1349
1349
|
const lines = [
|
|
1350
1350
|
`State: ${state}`,
|
|
@@ -1354,7 +1354,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1354
1354
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1355
1355
|
] : []
|
|
1356
1356
|
];
|
|
1357
|
-
|
|
1357
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1358
1358
|
{
|
|
1359
1359
|
ok: true,
|
|
1360
1360
|
...payload,
|
|
@@ -1403,7 +1403,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1405
1405
|
if (options.dryRun) {
|
|
1406
|
-
|
|
1406
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1407
1407
|
{
|
|
1408
1408
|
ok: true,
|
|
1409
1409
|
dry_run: true,
|
|
@@ -1424,7 +1424,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1424
1424
|
);
|
|
1425
1425
|
return;
|
|
1426
1426
|
}
|
|
1427
|
-
const payload = await new (0,
|
|
1427
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1428
1428
|
enabled: true,
|
|
1429
1429
|
thresholdCredits,
|
|
1430
1430
|
refillToCredits,
|
|
@@ -1432,7 +1432,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1432
1432
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1433
1433
|
idempotencyKey
|
|
1434
1434
|
});
|
|
1435
|
-
|
|
1435
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1436
1436
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1437
1437
|
{ json: options.json }
|
|
1438
1438
|
);
|
|
@@ -1440,7 +1440,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1440
1440
|
async function handleAutoRechargeOff(options) {
|
|
1441
1441
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1442
1442
|
if (options.dryRun) {
|
|
1443
|
-
|
|
1443
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1444
1444
|
{
|
|
1445
1445
|
ok: true,
|
|
1446
1446
|
dry_run: true,
|
|
@@ -1455,11 +1455,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1455
1455
|
);
|
|
1456
1456
|
return;
|
|
1457
1457
|
}
|
|
1458
|
-
const payload = await new (0,
|
|
1458
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1459
1459
|
enabled: false,
|
|
1460
1460
|
idempotencyKey
|
|
1461
1461
|
});
|
|
1462
|
-
|
|
1462
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1463
1463
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1464
1464
|
{ json: options.json }
|
|
1465
1465
|
);
|
|
@@ -1485,18 +1485,18 @@ function savedCardLines(cards, hasMore) {
|
|
|
1485
1485
|
async function handleCardsList(options) {
|
|
1486
1486
|
const limit = options.limit === void 0 ? void 0 : Number(options.limit);
|
|
1487
1487
|
if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1 || limit > 100)) {
|
|
1488
|
-
|
|
1488
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1489
1489
|
{ ok: false, error: "--limit must be a whole number from 1 to 100." },
|
|
1490
1490
|
{ json: options.json }
|
|
1491
1491
|
);
|
|
1492
1492
|
process.exitCode = 1;
|
|
1493
1493
|
return;
|
|
1494
1494
|
}
|
|
1495
|
-
const payload = await new (0,
|
|
1495
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.cards.list({
|
|
1496
1496
|
...limit !== void 0 ? { limit } : {},
|
|
1497
1497
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
1498
1498
|
});
|
|
1499
|
-
|
|
1499
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1500
1500
|
{
|
|
1501
1501
|
ok: true,
|
|
1502
1502
|
...payload,
|
|
@@ -1514,8 +1514,8 @@ async function handleCardsList(options) {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
async function handleCardsAdd(options) {
|
|
1516
1516
|
const makeDefault = options.makeDefault === true;
|
|
1517
|
-
const payload = await new (0,
|
|
1518
|
-
|
|
1517
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.cards.add({ makeDefault });
|
|
1518
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1519
1519
|
{
|
|
1520
1520
|
ok: true,
|
|
1521
1521
|
make_default: makeDefault,
|
|
@@ -1540,7 +1540,7 @@ async function handleCardChange(action, cardId, options) {
|
|
|
1540
1540
|
const changeId = _nullishCoalesce(options.changeId, () => ( _crypto.randomUUID.call(void 0, )));
|
|
1541
1541
|
const path = `/api/v2/billing/payment-methods/${action}`;
|
|
1542
1542
|
if (options.dryRun) {
|
|
1543
|
-
|
|
1543
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1544
1544
|
{
|
|
1545
1545
|
ok: true,
|
|
1546
1546
|
dry_run: true,
|
|
@@ -1555,9 +1555,9 @@ async function handleCardChange(action, cardId, options) {
|
|
|
1555
1555
|
);
|
|
1556
1556
|
return;
|
|
1557
1557
|
}
|
|
1558
|
-
const cards = new (0,
|
|
1558
|
+
const cards = new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.cards;
|
|
1559
1559
|
const payload = action === "default" ? await cards.setDefault({ cardId, changeId }) : await cards.remove({ cardId, changeId });
|
|
1560
|
-
|
|
1560
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1561
1561
|
{
|
|
1562
1562
|
...payload,
|
|
1563
1563
|
render: {
|
|
@@ -1591,11 +1591,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1591
1591
|
return;
|
|
1592
1592
|
}
|
|
1593
1593
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1594
|
-
const payload = await new (0,
|
|
1594
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.purchaseCredits({
|
|
1595
1595
|
credits,
|
|
1596
1596
|
idempotencyKey
|
|
1597
1597
|
});
|
|
1598
|
-
|
|
1598
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1599
1599
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1600
1600
|
{ json: options.json }
|
|
1601
1601
|
);
|
|
@@ -1631,7 +1631,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1631
1631
|
return;
|
|
1632
1632
|
}
|
|
1633
1633
|
if (options.dryRun) {
|
|
1634
|
-
|
|
1634
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1635
1635
|
{
|
|
1636
1636
|
ok: true,
|
|
1637
1637
|
dry_run: true,
|
|
@@ -1644,12 +1644,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1644
1644
|
);
|
|
1645
1645
|
return;
|
|
1646
1646
|
}
|
|
1647
|
-
const payload = await new (0,
|
|
1647
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1648
1648
|
credits,
|
|
1649
1649
|
orgId: options.orgId,
|
|
1650
1650
|
idempotencyKey: options.idempotencyKey
|
|
1651
1651
|
});
|
|
1652
|
-
|
|
1652
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1653
1653
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1654
1654
|
{ json: options.json }
|
|
1655
1655
|
);
|
|
@@ -1669,38 +1669,38 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1669
1669
|
return;
|
|
1670
1670
|
}
|
|
1671
1671
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1672
|
-
const payload = await new (0,
|
|
1672
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.transitionPlan({
|
|
1673
1673
|
action: "start_or_change",
|
|
1674
1674
|
targetPlanSku: planSku,
|
|
1675
1675
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1676
1676
|
...options.promoCode ? { promoCode: options.promoCode } : {},
|
|
1677
1677
|
idempotencyKey
|
|
1678
1678
|
});
|
|
1679
|
-
|
|
1679
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1680
1680
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1681
1681
|
{ json: options.json }
|
|
1682
1682
|
);
|
|
1683
1683
|
}
|
|
1684
1684
|
async function handleTargetPlanCancellation(options) {
|
|
1685
1685
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1686
|
-
const payload = await new (0,
|
|
1686
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.transitionPlan({
|
|
1687
1687
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1688
1688
|
idempotencyKey
|
|
1689
1689
|
});
|
|
1690
|
-
|
|
1690
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1691
1691
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1692
1692
|
{ json: options.json }
|
|
1693
1693
|
);
|
|
1694
1694
|
}
|
|
1695
1695
|
async function handleTargetPortal(options) {
|
|
1696
|
-
const payload = await new (0,
|
|
1696
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.portalSession(
|
|
1697
1697
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1698
1698
|
);
|
|
1699
|
-
if (!options.json && !options.noOpen)
|
|
1700
|
-
|
|
1699
|
+
if (!options.json && !options.noOpen) _chunkQGKX2WBZjs.openInBrowser.call(void 0, payload.url);
|
|
1700
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1701
1701
|
}
|
|
1702
1702
|
async function handleRedeemCode(code, options) {
|
|
1703
|
-
const { http } =
|
|
1703
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
1704
1704
|
const payload = await http.post(
|
|
1705
1705
|
"/api/v2/billing/checkout",
|
|
1706
1706
|
{
|
|
@@ -1708,8 +1708,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
);
|
|
1710
1710
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1711
|
-
if (!options.json && !options.noOpen && url)
|
|
1712
|
-
|
|
1711
|
+
if (!options.json && !options.noOpen && url) _chunkQGKX2WBZjs.openInBrowser.call(void 0, url);
|
|
1712
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1713
1713
|
{
|
|
1714
1714
|
...payload,
|
|
1715
1715
|
render: {
|
|
@@ -1770,14 +1770,14 @@ Examples:
|
|
|
1770
1770
|
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1771
1771
|
throw new Error("--quantity must be a positive safe integer.");
|
|
1772
1772
|
}
|
|
1773
|
-
const quote = await new (0,
|
|
1773
|
+
const quote = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.quote({
|
|
1774
1774
|
quantity,
|
|
1775
1775
|
sandbox_runtime: {
|
|
1776
1776
|
timeout: options.sandboxTimeout,
|
|
1777
1777
|
size: options.sandboxSize
|
|
1778
1778
|
}
|
|
1779
1779
|
});
|
|
1780
|
-
|
|
1780
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, quote, {
|
|
1781
1781
|
json: options.json,
|
|
1782
1782
|
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1783
1783
|
${quote.explanation}
|
|
@@ -1806,9 +1806,9 @@ Examples:
|
|
|
1806
1806
|
billing.command("reuse").description(
|
|
1807
1807
|
"Show recorded reused tool results for this workspace; no credit estimate."
|
|
1808
1808
|
).option("--json", "Return the workspace reuse summary as JSON").action(async (options) => {
|
|
1809
|
-
const { http } =
|
|
1809
|
+
const { http } = _chunkQGKX2WBZjs.getAuthedHttpClient.call(void 0, );
|
|
1810
1810
|
const payload = await http.get("/api/v2/usage/reuse");
|
|
1811
|
-
|
|
1811
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1812
1812
|
{
|
|
1813
1813
|
status: "ok",
|
|
1814
1814
|
data: payload,
|
|
@@ -2049,8 +2049,8 @@ Examples:
|
|
|
2049
2049
|
new (0, _commander.Command)("trigger").description(
|
|
2050
2050
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
2051
2051
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
2052
|
-
const result = await new (0,
|
|
2053
|
-
|
|
2052
|
+
const result = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
2053
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
2054
2054
|
})
|
|
2055
2055
|
);
|
|
2056
2056
|
billing.command("cards").description("List, add, choose the default of, and remove saved cards.").addHelpText(
|