deepline 0.3.469 → 0.3.471
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 +5 -0
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +22 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-admission-outcome.ts +34 -8
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/postgres-adapter.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +173 -32
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +36 -1
- package/dist/cli/auth-2MMOFS3O.js +41 -0
- package/dist/cli/{auth-HHMOHWIF.mjs → auth-MUCIXHJF.mjs} +5 -5
- package/dist/cli/{billing-26PU55WM.js → billing-BQQNTCTV.js} +82 -81
- package/dist/cli/{billing-KQORGOK4.mjs → billing-QGCTDE2N.mjs} +9 -8
- package/dist/cli/{chunk-YCIQYY5F.mjs → chunk-2KBRY5CA.mjs} +3 -3
- package/dist/cli/{chunk-WFI46NX4.mjs → chunk-3PT2HJKC.mjs} +1 -1
- package/dist/cli/{chunk-PKCDG6W5.mjs → chunk-4OAA43RX.mjs} +3 -3
- package/dist/cli/{chunk-E55WWSW4.js → chunk-4PT2WZD2.js} +26 -26
- package/dist/cli/{chunk-GFHBE35X.js → chunk-5QWGL2QO.js} +93 -93
- package/dist/cli/{chunk-HNP5V5BN.js → chunk-6DTW6JND.js} +6 -2
- package/dist/cli/{chunk-E6O62X6Z.mjs → chunk-AMUSZHCE.mjs} +2 -2
- package/dist/cli/{chunk-I5ZF67WP.mjs → chunk-ATKFOOVD.mjs} +5 -5
- package/dist/cli/{chunk-RC7X6KBQ.js → chunk-CR2F3JZN.js} +51 -51
- package/dist/cli/{chunk-SNAPSOK7.js → chunk-DFMFYOML.js} +10 -10
- package/dist/cli/{chunk-ODOFLA34.js → chunk-DK5Y5BD3.js} +4 -4
- package/dist/cli/{chunk-GVRTIZJN.mjs → chunk-DV4V5IWI.mjs} +5 -5
- package/dist/cli/{chunk-5WQM5HAQ.mjs → chunk-E2SHDT7T.mjs} +2 -2
- package/dist/cli/{chunk-SXTMM4DA.js → chunk-E3WTQ3JI.js} +14 -14
- package/dist/cli/{chunk-D7DUKSFS.mjs → chunk-EHVVDHNU.mjs} +1 -1
- package/dist/cli/{chunk-WCKFCSRX.mjs → chunk-EYKMITTY.mjs} +4 -4
- package/dist/cli/{chunk-FA3G556U.mjs → chunk-FJBGBPYY.mjs} +2 -2
- package/dist/cli/{chunk-UI2UC3OD.mjs → chunk-FVGT5EBA.mjs} +1 -1
- package/dist/cli/{chunk-YSRQJ4M3.js → chunk-FX3QM6WN.js} +3 -3
- package/dist/cli/{chunk-KOBMP4ZD.js → chunk-G6RQXAJ2.js} +1 -1
- package/dist/cli/{chunk-LBG7M2UO.js → chunk-GPSVXVDZ.js} +8 -8
- package/dist/cli/{chunk-I7TGFUQJ.mjs → chunk-IE5KAVTI.mjs} +3 -3
- package/dist/cli/{chunk-RXG2KE3N.mjs → chunk-IPFUDUSY.mjs} +4 -4
- package/dist/cli/{chunk-L34QVDRW.js → chunk-J2NYCUTK.js} +24 -24
- package/dist/cli/{chunk-JKVRBCZL.js → chunk-JDMR33HS.js} +1 -0
- package/dist/cli/{chunk-HB2M7RWZ.mjs → chunk-K5USD25Z.mjs} +10 -10
- package/dist/cli/{chunk-6SZNOJSR.js → chunk-KSUGLTX3.js} +6 -6
- package/dist/cli/{chunk-3G4MRUY7.js → chunk-MLQJVAVS.js} +3 -3
- package/dist/cli/{chunk-URGJLSJX.mjs → chunk-MV6HL67R.mjs} +2 -2
- package/dist/cli/{chunk-ZZ3WOBZQ.js → chunk-NBPNYD54.js} +16 -16
- package/dist/cli/{chunk-FAG4DFUC.mjs → chunk-NELMCOWK.mjs} +1 -0
- package/dist/cli/{chunk-ZWZKQBJJ.js → chunk-NLT3CFVJ.js} +2 -2
- package/dist/cli/{chunk-KPFO7CQM.js → chunk-NPJY5QRC.js} +53 -53
- package/dist/cli/{chunk-PAY27R7P.mjs → chunk-OYHCMKZM.mjs} +3 -3
- package/dist/cli/{chunk-T3OOWRPX.mjs → chunk-PVEEGJFN.mjs} +1 -1
- package/dist/cli/{chunk-NWAFIAHT.js → chunk-RUWBAU6V.js} +8 -8
- package/dist/cli/{chunk-2BBBUZVW.js → chunk-RWCTGSD7.js} +3 -3
- package/dist/cli/{chunk-2OFJVQ7L.mjs → chunk-RYGJWMWL.mjs} +1 -1
- package/dist/cli/{chunk-D464JW3N.mjs → chunk-RZHUHL53.mjs} +19 -1
- package/dist/cli/{chunk-4CJLSC6I.mjs → chunk-SIQV6UYG.mjs} +4 -4
- package/dist/cli/{chunk-XXIAG42J.js → chunk-TWRK4NOU.js} +36 -36
- package/dist/cli/{chunk-N6QVWV5R.mjs → chunk-U5RGCQWJ.mjs} +2 -2
- package/dist/cli/{chunk-FVYAEBGO.mjs → chunk-V2WMJXU6.mjs} +6 -2
- package/dist/cli/{chunk-X7MME4NT.js → chunk-VDRGX2XL.js} +5 -5
- package/dist/cli/{chunk-TEYQKQAQ.js → chunk-VGIAOWCD.js} +5 -5
- package/dist/cli/{chunk-CUCH65D3.mjs → chunk-VVY3HGFM.mjs} +2 -2
- package/dist/cli/{chunk-7S33CZMU.js → chunk-WDXJUZCY.js} +2 -2
- package/dist/cli/{chunk-7JY5HB23.js → chunk-YRM5TPXL.js} +8 -8
- package/dist/cli/{chunk-WG3KGAII.js → chunk-Z52WEIBR.js} +19 -1
- package/dist/cli/{chunk-VERY76VG.mjs → chunk-ZAF54BQK.mjs} +1 -1
- package/dist/cli/{chunk-2GMJDL3C.js → chunk-ZHM7VCKH.js} +21 -21
- package/dist/cli/{chunk-DI3K3PJE.mjs → chunk-ZMJOSD7R.mjs} +1 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-DVAQAKEI.mjs → csv-Q6BSRCBJ.mjs} +4 -4
- package/dist/cli/{csv-RTWPHENL.js → csv-UE7RZDUV.js} +13 -13
- package/dist/cli/{db-OFAOD5AT.mjs → db-FI6XXB2H.mjs} +7 -7
- package/dist/cli/{db-BY4Y6CQ3.js → db-T7A7EE3D.js} +28 -28
- package/dist/cli/{describe-QOO27KPQ.mjs → describe-4GGU6NU3.mjs} +18 -18
- package/dist/cli/describe-UM2VGRY7.js +48 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-QHGGAQOE.js → executions-4I6F5RMS.js} +9 -9
- package/dist/cli/{executions-EUHFCB47.mjs → executions-S46XI7NX.mjs} +7 -7
- package/dist/cli/{feedback-47CCLALE.mjs → feedback-3LJ7NZE7.mjs} +4 -4
- package/dist/cli/{feedback-5G4CUZFN.js → feedback-VEGUNKSP.js} +8 -8
- package/dist/cli/git-EVWKNIUA.js +25 -0
- package/dist/cli/{git-5I2AXG4O.mjs → git-W7SFD7AA.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-5OBXYGLC.js → legacy-noops-3EMB5SJH.js} +8 -8
- package/dist/cli/{legacy-noops-AJYRHCWF.mjs → legacy-noops-FIR5PSHG.mjs} +5 -5
- package/dist/cli/{monitors-IWFCIY3H.mjs → monitors-4DKW25PV.mjs} +8 -8
- package/dist/cli/{monitors-5CWZZ7D7.js → monitors-53LPJH6R.js} +92 -92
- package/dist/cli/{org-7EP6FXX6.mjs → org-6ZV2DBGI.mjs} +7 -7
- package/dist/cli/{org-7HCL5RO7.js → org-CYLJFX4Q.js} +73 -73
- package/dist/cli/{pages-GTECAV7A.js → pages-42E3WIMH.js} +18 -18
- package/dist/cli/{pages-UJWA7YNZ.mjs → pages-V3LEXCRL.mjs} +7 -7
- package/dist/cli/{play-MMGWGTTZ.js → play-O3OY556F.js} +556 -516
- package/dist/cli/{play-X3SYW37L.mjs → play-X7REMNNG.mjs} +63 -23
- package/dist/cli/{providers-ZBCQLB5Y.mjs → providers-L2DJVAXN.mjs} +7 -7
- package/dist/cli/{providers-VQL4X4VL.js → providers-NZ7TISS3.js} +10 -10
- package/dist/cli/{quickstart-SIFBA4UU.js → quickstart-IKNGAQRO.js} +6 -6
- package/dist/cli/{quickstart-TIPHHFSA.mjs → quickstart-ROWMAUXQ.mjs} +4 -4
- package/dist/cli/{run-XKSIVFEN.js → run-JG6DLOYR.js} +37 -37
- package/dist/cli/{run-4L6ZW53Z.mjs → run-PJI577J2.mjs} +23 -23
- package/dist/cli/{search-6HLAN32O.mjs → search-DOVJ745X.mjs} +8 -8
- package/dist/cli/search-RHKW5GSR.js +32 -0
- package/dist/cli/{secrets-4HTY4MSI.mjs → secrets-OKDFNCRJ.mjs} +7 -7
- package/dist/cli/{secrets-KYRIVDA6.js → secrets-R5LWXIG6.js} +16 -16
- package/dist/cli/{sessions-JEV4COUF.mjs → sessions-KX4C2CKS.mjs} +5 -5
- package/dist/cli/{sessions-EVKRTCFM.js → sessions-L3DSAY2T.js} +6 -6
- package/dist/cli/{settings-WFZNZVHF.js → settings-NKTNNTAP.js} +79 -79
- package/dist/cli/{settings-QSABRUHQ.mjs → settings-W3SMDBYS.mjs} +12 -12
- package/dist/cli/{setup-JFEGYAMU.js → setup-5WZEXWQR.js} +44 -44
- package/dist/cli/{setup-KG22OTJO.mjs → setup-7KFKKW2W.mjs} +9 -9
- package/dist/cli/skills-UFAABPCQ.js +31 -0
- package/dist/cli/{skills-5XJM7UBQ.mjs → skills-X5TLATOL.mjs} +7 -7
- package/dist/cli/{tools-2AMQKFP4.mjs → tools-27J5EOKO.mjs} +17 -17
- package/dist/cli/tools-IVU3BCIY.js +55 -0
- package/dist/cli/{update-KEN737KZ.mjs → update-EWL477FJ.mjs} +9 -9
- package/dist/cli/update-G7HFHKPG.js +33 -0
- package/dist/cli/{workflow-T622YRL4.js → workflow-GFNGGHJE.js} +18 -18
- package/dist/cli/{workflow-L6Q5H3OO.mjs → workflow-YXR6YMT2.mjs} +8 -8
- package/dist/{client-B3tlWsw7.d.ts → client-DIpVmXcj.d.ts} +1 -1
- package/dist/{client-CdJR18SJ.d.mts → client-DitOgp8N.d.mts} +1 -1
- package/dist/{client-core-ByJD7QXj.d.mts → client-core-COZteOww.d.mts} +28 -2
- package/dist/{client-core-CxHBKfE5.d.ts → client-core-k543Fg6D.d.ts} +28 -2
- package/dist/{compiler-manifest-D5dARg3M.d.ts → compiler-manifest-Zwm9yqOA.d.mts} +39 -0
- package/dist/{compiler-manifest-D5dARg3M.d.mts → compiler-manifest-Zwm9yqOA.d.ts} +39 -0
- package/dist/{errors-BtHHzWL8.d.ts → errors-CsYwlpn4.d.ts} +1 -1
- package/dist/{errors-BveMVPwA.d.mts → errors-nEsqNLL8.d.mts} +1 -1
- package/dist/{index-C6sovoYP.d.ts → index-9pUZqkPH.d.ts} +1 -1
- package/dist/{index-BboApDGD.d.mts → index-CXF2jtza.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +112 -112
- 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 +1 -1
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +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 +2 -2
- package/dist/plays/run-request.mjs +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 +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-LEYK6ZW7.js +0 -41
- package/dist/cli/describe-FS5CSJTO.js +0 -48
- package/dist/cli/git-IWVY3SXC.js +0 -25
- package/dist/cli/search-2WGVKZ2E.js +0 -32
- package/dist/cli/skills-6DY62DEQ.js +0 -31
- package/dist/cli/tools-ENIGWVGY.js +0 -55
- package/dist/cli/update-XZBBPRDV.js +0 -33
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
3
|
+
var _chunkVDRGX2XLjs = require('./chunk-VDRGX2XL.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkJ2NYCUTKjs = require('./chunk-J2NYCUTK.js');
|
|
8
8
|
require('./chunk-E4CABWXL.js');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-JDMR33HS.js');
|
|
10
10
|
require('./chunk-NMU3VR5U.js');
|
|
11
11
|
require('./chunk-XDVT3GOM.js');
|
|
12
12
|
|
|
@@ -15,9 +15,9 @@ require('./chunk-XDVT3GOM.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
require('./chunk-
|
|
20
|
-
require('./chunk-
|
|
18
|
+
var _chunkYRM5TPXLjs = require('./chunk-YRM5TPXL.js');
|
|
19
|
+
require('./chunk-MLQJVAVS.js');
|
|
20
|
+
require('./chunk-DK5Y5BD3.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
29
|
-
require('./chunk-
|
|
29
|
+
require('./chunk-G6RQXAJ2.js');
|
|
30
30
|
require('./chunk-OG64RBAC.js');
|
|
31
31
|
require('./chunk-COGTRVWW.js');
|
|
32
32
|
|
|
@@ -75,7 +75,7 @@ function reportBillingFailure(failure, options) {
|
|
|
75
75
|
if (failure.next) {
|
|
76
76
|
textLines.push(`Next: ${failure.next}`);
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
79
79
|
{
|
|
80
80
|
ok: false,
|
|
81
81
|
exitCode: failure.exitCode,
|
|
@@ -96,7 +96,7 @@ function parseTopUpCredits(raw) {
|
|
|
96
96
|
return parsed;
|
|
97
97
|
}
|
|
98
98
|
function topUpIdempotencyKey(raw) {
|
|
99
|
-
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` :
|
|
99
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkJ2NYCUTKjs.requireBillingIdempotencyKey.call(void 0, raw);
|
|
100
100
|
}
|
|
101
101
|
function targetBillingIdempotencyKey(raw) {
|
|
102
102
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -315,7 +315,7 @@ function defaultLedgerExportPath() {
|
|
|
315
315
|
);
|
|
316
316
|
}
|
|
317
317
|
async function handleBalance(options) {
|
|
318
|
-
const { http } =
|
|
318
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
319
319
|
const payload = await http.get(
|
|
320
320
|
"/api/v2/billing/balance"
|
|
321
321
|
);
|
|
@@ -399,7 +399,7 @@ async function handleBalance(options) {
|
|
|
399
399
|
...options.verbose ? detail : [],
|
|
400
400
|
...lines.slice(1)
|
|
401
401
|
];
|
|
402
|
-
|
|
402
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
403
403
|
{
|
|
404
404
|
...payload,
|
|
405
405
|
...recovery ? { recovery } : {},
|
|
@@ -435,7 +435,7 @@ async function handleUsageEvents(options) {
|
|
|
435
435
|
);
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
|
-
const client = new (0,
|
|
438
|
+
const client = new (0, _chunkVDRGX2XLjs.DeeplineClient)();
|
|
439
439
|
let payload;
|
|
440
440
|
try {
|
|
441
441
|
payload = await client.billing.usageEvents({
|
|
@@ -466,7 +466,7 @@ async function handleUsageEvents(options) {
|
|
|
466
466
|
),
|
|
467
467
|
...nextPage ? [`Next page: ${nextPage}`] : []
|
|
468
468
|
];
|
|
469
|
-
|
|
469
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
470
470
|
{
|
|
471
471
|
...payload,
|
|
472
472
|
next: { page: nextPage },
|
|
@@ -477,7 +477,7 @@ async function handleUsageEvents(options) {
|
|
|
477
477
|
}
|
|
478
478
|
async function handleUsage(options) {
|
|
479
479
|
if (options.events) return handleUsageEvents(options);
|
|
480
|
-
const { http } =
|
|
480
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
481
481
|
const params = new URLSearchParams();
|
|
482
482
|
if (options.requestId !== void 0) {
|
|
483
483
|
const requestId = options.requestId.trim();
|
|
@@ -558,7 +558,7 @@ async function handleUsage(options) {
|
|
|
558
558
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
559
559
|
] : []
|
|
560
560
|
];
|
|
561
|
-
|
|
561
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
562
562
|
{
|
|
563
563
|
...payload,
|
|
564
564
|
recent: {
|
|
@@ -572,7 +572,7 @@ async function handleUsage(options) {
|
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
574
|
async function handleLimit(options) {
|
|
575
|
-
const { http } =
|
|
575
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
576
576
|
const payload = await http.get(
|
|
577
577
|
"/api/v2/billing/limit"
|
|
578
578
|
);
|
|
@@ -580,7 +580,7 @@ async function handleLimit(options) {
|
|
|
580
580
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
581
581
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
582
582
|
] : ["Monthly usage cap: off"];
|
|
583
|
-
|
|
583
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
584
584
|
{
|
|
585
585
|
...payload,
|
|
586
586
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -589,12 +589,12 @@ async function handleLimit(options) {
|
|
|
589
589
|
);
|
|
590
590
|
}
|
|
591
591
|
async function handleSetLimit(credits, options) {
|
|
592
|
-
const { http } =
|
|
592
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
593
593
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
594
594
|
method: "PUT",
|
|
595
595
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
596
596
|
});
|
|
597
|
-
|
|
597
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
598
598
|
{
|
|
599
599
|
...payload,
|
|
600
600
|
render: {
|
|
@@ -610,11 +610,11 @@ async function handleSetLimit(credits, options) {
|
|
|
610
610
|
);
|
|
611
611
|
}
|
|
612
612
|
async function handleLimitOff(options) {
|
|
613
|
-
const { http } =
|
|
613
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
614
614
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
615
615
|
method: "DELETE"
|
|
616
616
|
});
|
|
617
|
-
|
|
617
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
618
618
|
{
|
|
619
619
|
...payload,
|
|
620
620
|
render: {
|
|
@@ -634,7 +634,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
634
634
|
let initialized = false;
|
|
635
635
|
let pageNumber = 0;
|
|
636
636
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
637
|
-
for await (const entries of
|
|
637
|
+
for await (const entries of _chunkJ2NYCUTKjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
638
638
|
pageNumber += 1;
|
|
639
639
|
console.error(
|
|
640
640
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -673,7 +673,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
673
673
|
return summary;
|
|
674
674
|
}
|
|
675
675
|
async function handleHistory(options) {
|
|
676
|
-
const { http } =
|
|
676
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
677
677
|
const windows = {
|
|
678
678
|
"1d": 86400,
|
|
679
679
|
"1w": 604800,
|
|
@@ -685,10 +685,10 @@ async function handleHistory(options) {
|
|
|
685
685
|
process.cwd(),
|
|
686
686
|
"deepline",
|
|
687
687
|
"data",
|
|
688
|
-
|
|
688
|
+
_chunkYRM5TPXLjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
689
689
|
);
|
|
690
690
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
691
|
-
|
|
691
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
692
692
|
{
|
|
693
693
|
output_path: outputPath,
|
|
694
694
|
row_count: summary.row_count,
|
|
@@ -725,14 +725,14 @@ async function handleLedgerExportAll(options) {
|
|
|
725
725
|
);
|
|
726
726
|
return;
|
|
727
727
|
}
|
|
728
|
-
const { http } =
|
|
728
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
729
729
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
730
730
|
const summary = await exportLedger(http, outputPath, {
|
|
731
731
|
sinceAt,
|
|
732
732
|
runId: options.runId,
|
|
733
733
|
operation: options.operation
|
|
734
734
|
});
|
|
735
|
-
|
|
735
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
736
736
|
{
|
|
737
737
|
output_path: outputPath,
|
|
738
738
|
row_count: summary.row_count,
|
|
@@ -768,10 +768,11 @@ function planPriceText(priceUsd, priceInterval) {
|
|
|
768
768
|
return `$${priceUsd}${priceInterval ? `/${priceInterval}` : ""}`;
|
|
769
769
|
}
|
|
770
770
|
function targetPlanLine(plan) {
|
|
771
|
-
|
|
771
|
+
const firstMonth = plan.first_month_price_usd != null ? ` (first month $${plan.first_month_price_usd})` : "";
|
|
772
|
+
return `${plan.name} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
772
773
|
}
|
|
773
774
|
async function handlePlans(options) {
|
|
774
|
-
const client = new (0,
|
|
775
|
+
const client = new (0, _chunkVDRGX2XLjs.DeeplineClient)();
|
|
775
776
|
const payload = await client.billing.targetPlans();
|
|
776
777
|
const listedCurrentPlan = payload.plans.find(
|
|
777
778
|
(plan) => plan.sku === payload.current_plan_sku
|
|
@@ -784,8 +785,8 @@ async function handlePlans(options) {
|
|
|
784
785
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
785
786
|
"Change plan: deepline billing change-plan <plan_sku>"
|
|
786
787
|
];
|
|
787
|
-
const legacyPayload =
|
|
788
|
-
|
|
788
|
+
const legacyPayload = _chunkYRM5TPXLjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
789
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
789
790
|
{
|
|
790
791
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
791
792
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -795,7 +796,7 @@ async function handlePlans(options) {
|
|
|
795
796
|
);
|
|
796
797
|
}
|
|
797
798
|
async function handleSubscribe(planVersionId, options) {
|
|
798
|
-
const { http } =
|
|
799
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
799
800
|
const payload = await http.request(
|
|
800
801
|
"/api/v2/billing/subscription/checkout",
|
|
801
802
|
{
|
|
@@ -804,8 +805,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
804
805
|
}
|
|
805
806
|
);
|
|
806
807
|
const url = String(payload.checkout_url || "");
|
|
807
|
-
if (!options.json && options.open !== false && url)
|
|
808
|
-
|
|
808
|
+
if (!options.json && options.open !== false && url) _chunkYRM5TPXLjs.openInBrowser.call(void 0, url);
|
|
809
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
809
810
|
{
|
|
810
811
|
...payload,
|
|
811
812
|
render: {
|
|
@@ -821,7 +822,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
821
822
|
);
|
|
822
823
|
}
|
|
823
824
|
async function handleSubscriptionStatus(options) {
|
|
824
|
-
const client = new (0,
|
|
825
|
+
const client = new (0, _chunkVDRGX2XLjs.DeeplineClient)();
|
|
825
826
|
const payload = await client.billing.subscription.status();
|
|
826
827
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
827
828
|
const lines = [
|
|
@@ -841,7 +842,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
841
842
|
],
|
|
842
843
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
843
844
|
];
|
|
844
|
-
|
|
845
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
845
846
|
{
|
|
846
847
|
...payload,
|
|
847
848
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -850,7 +851,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
850
851
|
);
|
|
851
852
|
}
|
|
852
853
|
async function handleSubscriptionCancel(options) {
|
|
853
|
-
const client = new (0,
|
|
854
|
+
const client = new (0, _chunkVDRGX2XLjs.DeeplineClient)();
|
|
854
855
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
855
856
|
if (options.dryRun) {
|
|
856
857
|
const status = await client.billing.subscription.status();
|
|
@@ -867,7 +868,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
867
868
|
return;
|
|
868
869
|
}
|
|
869
870
|
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.";
|
|
870
|
-
|
|
871
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
871
872
|
{
|
|
872
873
|
ok: true,
|
|
873
874
|
dry_run: true,
|
|
@@ -922,7 +923,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
922
923
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
923
924
|
"Undo with: deepline billing subscription cancel --undo"
|
|
924
925
|
];
|
|
925
|
-
|
|
926
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
926
927
|
{
|
|
927
928
|
ok: true,
|
|
928
929
|
...result,
|
|
@@ -976,7 +977,7 @@ async function handleInvoices(options) {
|
|
|
976
977
|
return;
|
|
977
978
|
}
|
|
978
979
|
}
|
|
979
|
-
const client = new (0,
|
|
980
|
+
const client = new (0, _chunkVDRGX2XLjs.DeeplineClient)();
|
|
980
981
|
let payload;
|
|
981
982
|
try {
|
|
982
983
|
payload = await client.billing.invoices.list(
|
|
@@ -1005,7 +1006,7 @@ async function handleInvoices(options) {
|
|
|
1005
1006
|
url: entry.url
|
|
1006
1007
|
}))
|
|
1007
1008
|
} : { ...payload, count: entries.length };
|
|
1008
|
-
|
|
1009
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1009
1010
|
{
|
|
1010
1011
|
...envelope,
|
|
1011
1012
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -1014,7 +1015,7 @@ async function handleInvoices(options) {
|
|
|
1014
1015
|
);
|
|
1015
1016
|
}
|
|
1016
1017
|
async function handleCheckout(options) {
|
|
1017
|
-
const { http } =
|
|
1018
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
1018
1019
|
const payload = await http.post(
|
|
1019
1020
|
"/api/v2/billing/checkout",
|
|
1020
1021
|
{
|
|
@@ -1024,8 +1025,8 @@ async function handleCheckout(options) {
|
|
|
1024
1025
|
}
|
|
1025
1026
|
);
|
|
1026
1027
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1027
|
-
if (!options.json && !options.noOpen && url)
|
|
1028
|
-
|
|
1028
|
+
if (!options.json && !options.noOpen && url) _chunkYRM5TPXLjs.openInBrowser.call(void 0, url);
|
|
1029
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1029
1030
|
{
|
|
1030
1031
|
...payload,
|
|
1031
1032
|
render: {
|
|
@@ -1070,7 +1071,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1070
1071
|
return;
|
|
1071
1072
|
}
|
|
1072
1073
|
if (options.dryRun) {
|
|
1073
|
-
|
|
1074
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1074
1075
|
{
|
|
1075
1076
|
ok: true,
|
|
1076
1077
|
dry_run: true,
|
|
@@ -1100,7 +1101,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1100
1101
|
);
|
|
1101
1102
|
return;
|
|
1102
1103
|
}
|
|
1103
|
-
const client = new (0,
|
|
1104
|
+
const client = new (0, _chunkVDRGX2XLjs.DeeplineClient)();
|
|
1104
1105
|
let payload;
|
|
1105
1106
|
try {
|
|
1106
1107
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1117,7 +1118,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1117
1118
|
return;
|
|
1118
1119
|
}
|
|
1119
1120
|
if (payload.status === "pending") {
|
|
1120
|
-
|
|
1121
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1121
1122
|
{
|
|
1122
1123
|
ok: true,
|
|
1123
1124
|
...payload,
|
|
@@ -1181,17 +1182,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1181
1182
|
]
|
|
1182
1183
|
}
|
|
1183
1184
|
};
|
|
1184
|
-
|
|
1185
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1185
1186
|
json: options.json
|
|
1186
1187
|
});
|
|
1187
1188
|
}
|
|
1188
1189
|
async function handleTargetStatus(options) {
|
|
1189
|
-
const client = new (0,
|
|
1190
|
+
const client = new (0, _chunkVDRGX2XLjs.DeeplineClient)();
|
|
1190
1191
|
const payload = await client.billing.targetStatus();
|
|
1191
1192
|
const balanceCommand = "deepline billing balance";
|
|
1192
1193
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1193
1194
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1194
|
-
|
|
1195
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1195
1196
|
{
|
|
1196
1197
|
ok: true,
|
|
1197
1198
|
...payload,
|
|
@@ -1227,10 +1228,10 @@ function formatComputeMinutes(minutes) {
|
|
|
1227
1228
|
return minutes < 120 ? `${Number(minutes.toFixed(1)).toLocaleString("en-US")} minutes` : `${Number((minutes / 60).toFixed(1)).toLocaleString("en-US")} hours`;
|
|
1228
1229
|
}
|
|
1229
1230
|
async function handleIncludedCompute(options) {
|
|
1230
|
-
const client = new (0,
|
|
1231
|
+
const client = new (0, _chunkVDRGX2XLjs.DeeplineClient)();
|
|
1231
1232
|
const payload = options.enable ? await client.billing.enableIncludedCompute() : await client.billing.includedCompute();
|
|
1232
1233
|
const plan = `${formatComputeMinutes(payload.plan.included_minutes)} included per month, then ${Math.round(payload.plan.credits_per_minute * 60)} credits/hour`;
|
|
1233
|
-
|
|
1234
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1234
1235
|
{
|
|
1235
1236
|
ok: true,
|
|
1236
1237
|
...payload,
|
|
@@ -1256,8 +1257,8 @@ async function handleIncludedCompute(options) {
|
|
|
1256
1257
|
);
|
|
1257
1258
|
}
|
|
1258
1259
|
async function handleEntitlements(options) {
|
|
1259
|
-
const payload = await new (0,
|
|
1260
|
-
|
|
1260
|
+
const payload = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.entitlements();
|
|
1261
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1261
1262
|
{
|
|
1262
1263
|
ok: true,
|
|
1263
1264
|
...payload,
|
|
@@ -1290,7 +1291,7 @@ async function handleEntitlements(options) {
|
|
|
1290
1291
|
);
|
|
1291
1292
|
}
|
|
1292
1293
|
async function handleAutoRechargeStatus(options) {
|
|
1293
|
-
const payload = await new (0,
|
|
1294
|
+
const payload = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1294
1295
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1295
1296
|
const lines = [
|
|
1296
1297
|
`State: ${state}`,
|
|
@@ -1300,7 +1301,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1300
1301
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1301
1302
|
] : []
|
|
1302
1303
|
];
|
|
1303
|
-
|
|
1304
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1304
1305
|
{
|
|
1305
1306
|
ok: true,
|
|
1306
1307
|
...payload,
|
|
@@ -1349,7 +1350,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1349
1350
|
}
|
|
1350
1351
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1351
1352
|
if (options.dryRun) {
|
|
1352
|
-
|
|
1353
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1353
1354
|
{
|
|
1354
1355
|
ok: true,
|
|
1355
1356
|
dry_run: true,
|
|
@@ -1370,7 +1371,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1370
1371
|
);
|
|
1371
1372
|
return;
|
|
1372
1373
|
}
|
|
1373
|
-
const payload = await new (0,
|
|
1374
|
+
const payload = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1374
1375
|
enabled: true,
|
|
1375
1376
|
thresholdCredits,
|
|
1376
1377
|
refillToCredits,
|
|
@@ -1378,7 +1379,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1378
1379
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1379
1380
|
idempotencyKey
|
|
1380
1381
|
});
|
|
1381
|
-
|
|
1382
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1382
1383
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1383
1384
|
{ json: options.json }
|
|
1384
1385
|
);
|
|
@@ -1386,7 +1387,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1386
1387
|
async function handleAutoRechargeOff(options) {
|
|
1387
1388
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1388
1389
|
if (options.dryRun) {
|
|
1389
|
-
|
|
1390
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1390
1391
|
{
|
|
1391
1392
|
ok: true,
|
|
1392
1393
|
dry_run: true,
|
|
@@ -1401,11 +1402,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1401
1402
|
);
|
|
1402
1403
|
return;
|
|
1403
1404
|
}
|
|
1404
|
-
const payload = await new (0,
|
|
1405
|
+
const payload = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1405
1406
|
enabled: false,
|
|
1406
1407
|
idempotencyKey
|
|
1407
1408
|
});
|
|
1408
|
-
|
|
1409
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1409
1410
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1410
1411
|
{ json: options.json }
|
|
1411
1412
|
);
|
|
@@ -1424,11 +1425,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1424
1425
|
return;
|
|
1425
1426
|
}
|
|
1426
1427
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1427
|
-
const payload = await new (0,
|
|
1428
|
+
const payload = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.purchaseCredits({
|
|
1428
1429
|
credits,
|
|
1429
1430
|
idempotencyKey
|
|
1430
1431
|
});
|
|
1431
|
-
|
|
1432
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1432
1433
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1433
1434
|
{ json: options.json }
|
|
1434
1435
|
);
|
|
@@ -1464,7 +1465,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1464
1465
|
return;
|
|
1465
1466
|
}
|
|
1466
1467
|
if (options.dryRun) {
|
|
1467
|
-
|
|
1468
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1468
1469
|
{
|
|
1469
1470
|
ok: true,
|
|
1470
1471
|
dry_run: true,
|
|
@@ -1477,12 +1478,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1477
1478
|
);
|
|
1478
1479
|
return;
|
|
1479
1480
|
}
|
|
1480
|
-
const payload = await new (0,
|
|
1481
|
+
const payload = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1481
1482
|
credits,
|
|
1482
1483
|
orgId: options.orgId,
|
|
1483
1484
|
idempotencyKey: options.idempotencyKey
|
|
1484
1485
|
});
|
|
1485
|
-
|
|
1486
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1486
1487
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1487
1488
|
{ json: options.json }
|
|
1488
1489
|
);
|
|
@@ -1502,37 +1503,37 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1502
1503
|
return;
|
|
1503
1504
|
}
|
|
1504
1505
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1505
|
-
const payload = await new (0,
|
|
1506
|
+
const payload = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.transitionPlan({
|
|
1506
1507
|
action: "start_or_change",
|
|
1507
1508
|
targetPlanSku: planSku,
|
|
1508
1509
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1509
1510
|
idempotencyKey
|
|
1510
1511
|
});
|
|
1511
|
-
|
|
1512
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1512
1513
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1513
1514
|
{ json: options.json }
|
|
1514
1515
|
);
|
|
1515
1516
|
}
|
|
1516
1517
|
async function handleTargetPlanCancellation(options) {
|
|
1517
1518
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1518
|
-
const payload = await new (0,
|
|
1519
|
+
const payload = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.transitionPlan({
|
|
1519
1520
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1520
1521
|
idempotencyKey
|
|
1521
1522
|
});
|
|
1522
|
-
|
|
1523
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1523
1524
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1524
1525
|
{ json: options.json }
|
|
1525
1526
|
);
|
|
1526
1527
|
}
|
|
1527
1528
|
async function handleTargetPortal(options) {
|
|
1528
|
-
const payload = await new (0,
|
|
1529
|
+
const payload = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.portalSession(
|
|
1529
1530
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1530
1531
|
);
|
|
1531
|
-
if (!options.json && !options.noOpen)
|
|
1532
|
-
|
|
1532
|
+
if (!options.json && !options.noOpen) _chunkYRM5TPXLjs.openInBrowser.call(void 0, payload.url);
|
|
1533
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1533
1534
|
}
|
|
1534
1535
|
async function handleRedeemCode(code, options) {
|
|
1535
|
-
const { http } =
|
|
1536
|
+
const { http } = _chunkYRM5TPXLjs.getAuthedHttpClient.call(void 0, );
|
|
1536
1537
|
const payload = await http.post(
|
|
1537
1538
|
"/api/v2/billing/checkout",
|
|
1538
1539
|
{
|
|
@@ -1540,8 +1541,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1540
1541
|
}
|
|
1541
1542
|
);
|
|
1542
1543
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1543
|
-
if (!options.json && !options.noOpen && url)
|
|
1544
|
-
|
|
1544
|
+
if (!options.json && !options.noOpen && url) _chunkYRM5TPXLjs.openInBrowser.call(void 0, url);
|
|
1545
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
1545
1546
|
{
|
|
1546
1547
|
...payload,
|
|
1547
1548
|
render: {
|
|
@@ -1599,14 +1600,14 @@ Examples:
|
|
|
1599
1600
|
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1600
1601
|
throw new Error("--quantity must be a positive safe integer.");
|
|
1601
1602
|
}
|
|
1602
|
-
const quote = await new (0,
|
|
1603
|
+
const quote = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.quote({
|
|
1603
1604
|
quantity,
|
|
1604
1605
|
sandbox_runtime: {
|
|
1605
1606
|
timeout: options.sandboxTimeout,
|
|
1606
1607
|
size: "standard"
|
|
1607
1608
|
}
|
|
1608
1609
|
});
|
|
1609
|
-
|
|
1610
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0, quote, {
|
|
1610
1611
|
json: options.json,
|
|
1611
1612
|
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1612
1613
|
${quote.explanation}
|
|
@@ -1851,8 +1852,8 @@ Examples:
|
|
|
1851
1852
|
new (0, _commander.Command)("trigger").description(
|
|
1852
1853
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
1853
1854
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
1854
|
-
const result = await new (0,
|
|
1855
|
-
|
|
1855
|
+
const result = await new (0, _chunkVDRGX2XLjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
1856
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
1856
1857
|
})
|
|
1857
1858
|
);
|
|
1858
1859
|
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(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U5RGCQWJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
iterateCursorPages,
|
|
6
6
|
requireBillingIdempotencyKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MV6HL67R.mjs";
|
|
8
8
|
import "./chunk-L2VKAASU.mjs";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-NELMCOWK.mjs";
|
|
10
10
|
import "./chunk-S3A4IXBQ.mjs";
|
|
11
11
|
import "./chunk-UBKA33KY.mjs";
|
|
12
12
|
import {
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
openInBrowser,
|
|
16
16
|
printCommandEnvelope,
|
|
17
17
|
shouldEmitJson
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-OYHCMKZM.mjs";
|
|
19
|
+
import "./chunk-FVGT5EBA.mjs";
|
|
20
|
+
import "./chunk-ZMJOSD7R.mjs";
|
|
21
21
|
import {
|
|
22
22
|
AuthError,
|
|
23
23
|
ConfigError
|
|
@@ -26,7 +26,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
26
26
|
import {
|
|
27
27
|
DeeplineError
|
|
28
28
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-3PT2HJKC.mjs";
|
|
30
30
|
import "./chunk-WZYKRD7T.mjs";
|
|
31
31
|
import "./chunk-KRD6H754.mjs";
|
|
32
32
|
|
|
@@ -768,7 +768,8 @@ function planPriceText(priceUsd, priceInterval) {
|
|
|
768
768
|
return `$${priceUsd}${priceInterval ? `/${priceInterval}` : ""}`;
|
|
769
769
|
}
|
|
770
770
|
function targetPlanLine(plan) {
|
|
771
|
-
|
|
771
|
+
const firstMonth = plan.first_month_price_usd != null ? ` (first month $${plan.first_month_price_usd})` : "";
|
|
772
|
+
return `${plan.name} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
772
773
|
}
|
|
773
774
|
async function handlePlans(options) {
|
|
774
775
|
const client = new DeeplineClient();
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OYHCMKZM.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -22,12 +22,12 @@ import {
|
|
|
22
22
|
saveHostEnvValues,
|
|
23
23
|
saveProjectDeeplineEnvValues,
|
|
24
24
|
storedHostApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FVGT5EBA.mjs";
|
|
26
26
|
import {
|
|
27
27
|
SDK_API_CONTRACT,
|
|
28
28
|
SDK_VERSION,
|
|
29
29
|
detectAgentRuntime
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZMJOSD7R.mjs";
|
|
31
31
|
|
|
32
32
|
// src/cli/commands/auth.ts
|
|
33
33
|
import {
|
|
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.471",
|
|
53
53
|
updateSummary: {
|
|
54
54
|
introducedIn: "0.3.90",
|
|
55
55
|
summary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release."
|