deepline 0.3.583 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +79 -36
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/release.ts +7 -3
- package/dist/bundling-sources/sdk/src/types.ts +37 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +22 -3
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +94 -5
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +66 -12
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-tuple-recovery.ts +9 -3
- package/dist/bundling-sources/shared_libs/play-runtime/docflow-node-io.ts +86 -20
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +17 -6
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +22 -6
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +54 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/postgres-adapter.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/row-failure-summary.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +12 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +197 -19
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-writer.ts +25 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +73 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-wake-policy.ts +419 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +20 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +24 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +36 -19
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +380 -51
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +21 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +32 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +6 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -1
- package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +34 -4
- package/dist/bundling-sources/shared_libs/plays/docflow-recording-lint.ts +512 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-requirement.ts +346 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-rule-codes.ts +38 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-unreached-reason.ts +42 -2
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +223 -32
- package/dist/bundling-sources/shared_libs/plays/play-check-compact.ts +14 -1
- package/dist/bundling-sources/shared_libs/plays/run-result.ts +35 -0
- package/dist/cli/{agents-G344SPW2.mjs → agents-AHXB7N7Y.mjs} +4 -4
- package/dist/cli/{agents-ZPDXVPEE.js → agents-KBZ7OUZS.js} +33 -33
- package/dist/cli/{auth-V66RP2A6.mjs → auth-3CACO52T.mjs} +5 -5
- package/dist/cli/auth-UOHCO5K6.js +44 -0
- package/dist/cli/{billing-ROYUQF67.js → billing-5KXPGKMO.js} +105 -105
- package/dist/cli/{billing-BTMGZJCR.mjs → billing-TSTK63NB.mjs} +9 -9
- package/dist/cli/{chunk-ROWROMXD.mjs → chunk-2GWKBQJZ.mjs} +1 -1
- package/dist/cli/{chunk-VXEZKZU4.mjs → chunk-3DJMPID5.mjs} +11 -11
- package/dist/cli/{chunk-VH45GV3T.js → chunk-3ET6NRXP.js} +7 -3
- package/dist/cli/{chunk-43MKV6E4.mjs → chunk-3MWTAM3F.mjs} +3 -3
- package/dist/cli/{chunk-U6BTY4WS.mjs → chunk-4ANDW2OT.mjs} +1 -1
- package/dist/cli/{chunk-H4BYWEV5.js → chunk-4BSCSQ6I.js} +4 -4
- package/dist/cli/{chunk-ACS6BYE5.mjs → chunk-4UEXAMDU.mjs} +2 -2
- package/dist/cli/{chunk-QPN662ZP.js → chunk-5XGLDVSD.js} +100 -100
- package/dist/cli/{chunk-MFPHCUHK.js → chunk-7XXJJVSI.js} +5 -5
- package/dist/cli/{chunk-QGOHEJVJ.js → chunk-7ZCD7OPO.js} +5 -5
- package/dist/cli/{chunk-AXKFZIXC.mjs → chunk-AJJSKKH4.mjs} +2 -2
- package/dist/cli/{chunk-KSXBLXLV.mjs → chunk-BHF5UW34.mjs} +1 -1
- package/dist/cli/{chunk-AHQDUMDM.js → chunk-BO2TXH5Y.js} +20 -20
- package/dist/cli/{chunk-W5WLWRKL.mjs → chunk-BUC2TNF2.mjs} +2 -2
- package/dist/cli/{chunk-6GYGMWQV.js → chunk-BUUAFSSN.js} +68 -50
- package/dist/cli/{chunk-WUVDJSZE.js → chunk-C45E47KC.js} +23 -23
- package/dist/cli/{chunk-BUMCOVBP.js → chunk-D4R3AL4F.js} +5 -5
- package/dist/cli/{chunk-PVDP3AZY.mjs → chunk-DAZRIAXW.mjs} +4 -4
- package/dist/cli/{chunk-W3ECB7GC.js → chunk-DNOZQGJF.js} +3 -3
- package/dist/cli/{chunk-HYT5B2NL.js → chunk-DUL6UQ2T.js} +2 -2
- package/dist/cli/{chunk-P2YNTAGL.mjs → chunk-ES3S6UXR.mjs} +2 -2
- package/dist/cli/{chunk-K6GDSCFL.mjs → chunk-FDAYUP3M.mjs} +3 -3
- package/dist/cli/{chunk-23LYXVI4.js → chunk-FEVUIT2U.js} +6 -6
- package/dist/cli/{chunk-6S3OAJCJ.mjs → chunk-FSPEUU3V.mjs} +49 -6
- package/dist/cli/{chunk-2QIVGZKS.mjs → chunk-FZZMCVOS.mjs} +5 -5
- package/dist/cli/{chunk-73IZARR5.js → chunk-GHOB72U6.js} +13 -13
- package/dist/cli/{chunk-LVJAHM2I.mjs → chunk-GLYWRTEL.mjs} +3 -3
- package/dist/cli/{chunk-AXOQ2FMS.mjs → chunk-HNTIGYRT.mjs} +1 -1
- package/dist/cli/{chunk-C7UCDL2K.js → chunk-IGPHYKEJ.js} +41 -41
- package/dist/cli/{chunk-PULU5YGX.js → chunk-ISSYN3DJ.js} +20 -20
- package/dist/cli/{chunk-ZHIJA4MW.mjs → chunk-JKQPITEE.mjs} +54 -36
- package/dist/cli/{chunk-EHV52KUV.mjs → chunk-KMLACXI2.mjs} +7 -3
- package/dist/cli/{chunk-WAZR72D5.js → chunk-KQXACHYA.js} +26 -26
- package/dist/cli/{chunk-PGUK5VPC.js → chunk-LW2GKYZW.js} +2 -2
- package/dist/cli/{chunk-J54DMFV5.mjs → chunk-O2KSPI2M.mjs} +2 -2
- package/dist/cli/{chunk-CCC3NIYB.js → chunk-O6GT6JD7.js} +9 -9
- package/dist/cli/{chunk-DNYFNOWG.mjs → chunk-OCXWUWUI.mjs} +5 -5
- package/dist/cli/{chunk-MEAWK5G7.js → chunk-QKRDAJ3T.js} +53 -53
- package/dist/cli/{chunk-N5XRUZRS.js → chunk-QQESWF6D.js} +16 -16
- package/dist/cli/{chunk-2D5YISAL.js → chunk-REX5SUYU.js} +2 -2
- package/dist/cli/{chunk-RO2LTLJA.js → chunk-RXIQWG2N.js} +48 -48
- package/dist/cli/{chunk-VXDKL434.js → chunk-S33BN7GZ.js} +3 -3
- package/dist/cli/{chunk-72MEXMSH.mjs → chunk-SGRJJLNV.mjs} +1 -1
- package/dist/cli/{chunk-HOGRT5X6.mjs → chunk-TCNYSNVU.mjs} +1 -1
- package/dist/cli/{chunk-H7F3ROT3.mjs → chunk-TFPMVSGK.mjs} +2 -2
- package/dist/cli/{chunk-GFX6CDAB.mjs → chunk-V73WDQEA.mjs} +5 -5
- package/dist/cli/{chunk-LHD3HOYN.js → chunk-VYERVFGB.js} +49 -6
- package/dist/cli/{chunk-C233ZRNX.mjs → chunk-WBRSVML3.mjs} +4 -4
- package/dist/cli/{chunk-7AFTLM74.mjs → chunk-WW52ANX4.mjs} +2 -2
- package/dist/cli/{chunk-ZFJNIZHI.js → chunk-XZS35M3Y.js} +10 -10
- package/dist/cli/{chunk-YRNWA2IL.js → chunk-YNYHYL5C.js} +15 -15
- package/dist/cli/{chunk-JQT3SHXL.mjs → chunk-ZHE5E2WJ.mjs} +1 -1
- package/dist/cli/{chunk-N5RCXI3M.mjs → chunk-ZJ2H77VV.mjs} +5 -5
- package/dist/cli/{chunk-GQHZV7EQ.js → chunk-ZX6UVPGZ.js} +7 -7
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-H5SZUA5J.js +22 -0
- package/dist/cli/{concurrent-runs-help-A2Y33OQ5.mjs → concurrent-runs-help-IYELSCHB.mjs} +6 -6
- package/dist/cli/{csv-PS74WVXE.mjs → csv-ENEC3APZ.mjs} +4 -4
- package/dist/cli/{csv-TKSR2LFV.js → csv-X6CP57R4.js} +13 -13
- package/dist/cli/{db-R6GOM4VC.js → db-6HLRSE2M.js} +27 -27
- package/dist/cli/{db-EXLBRZ7K.mjs → db-YGKRFK4T.mjs} +6 -6
- package/dist/cli/{describe-JJBXFPVQ.mjs → describe-4SGQEX7K.mjs} +18 -18
- package/dist/cli/describe-Q2OYHDVZ.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-474U7R3Y.js → executions-IC55YJ67.js} +8 -8
- package/dist/cli/{executions-5PEODJQG.mjs → executions-PO2IOSZ7.mjs} +6 -6
- package/dist/cli/{feedback-QUQVRDBD.mjs → feedback-6BUD5F4I.mjs} +6 -6
- package/dist/cli/{feedback-URTCAOXP.js → feedback-BCGQLZ5T.js} +14 -14
- package/dist/cli/git-5X3MLBIP.js +26 -0
- package/dist/cli/{git-AQF23KKU.mjs → git-IN4IBL2K.mjs} +5 -5
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-NMFOOSS4.js → integrations-R2Z2MDO3.js} +29 -29
- package/dist/cli/{integrations-5POBI72U.mjs → integrations-ZMGB6NQA.mjs} +7 -7
- package/dist/cli/{legacy-noops-6YVCOSFO.mjs → legacy-noops-GIC5OZKP.mjs} +6 -6
- package/dist/cli/{legacy-noops-V75T5LHV.js → legacy-noops-X4JPRPTJ.js} +9 -9
- package/dist/cli/{mcp-7WEYQ5V7.mjs → mcp-G4IRJIKK.mjs} +4 -4
- package/dist/cli/{mcp-N6GYXCUQ.js → mcp-USZKTVL2.js} +24 -24
- package/dist/cli/{monitors-TAK4M5Y4.mjs → monitors-SNFZPSCY.mjs} +7 -7
- package/dist/cli/{monitors-HW4H4PE5.js → monitors-T7LRP7OB.js} +100 -100
- package/dist/cli/{org-FULXOXNE.js → org-2L2ZZL2P.js} +121 -121
- package/dist/cli/{org-3C2RN36N.mjs → org-YTXLKW52.mjs} +6 -6
- package/dist/cli/{outcomes-4KRZL6OL.mjs → outcomes-CJWBIFTA.mjs} +6 -6
- package/dist/cli/{outcomes-O3HDQWGN.js → outcomes-O63F57JF.js} +14 -14
- package/dist/cli/{play-ZTRWUODW.mjs → play-6UWPUHC6.mjs} +331 -70
- package/dist/cli/{play-HA4RGX7T.js → play-T353SULJ.js} +930 -669
- package/dist/cli/{providers-FAKWWJE2.mjs → providers-LZABK2UW.mjs} +6 -6
- package/dist/cli/{providers-DXMKWBZN.js → providers-XORJH2VW.js} +9 -9
- package/dist/cli/{quickstart-YWGBTW77.mjs → quickstart-O4RF7J55.mjs} +4 -4
- package/dist/cli/{quickstart-MA74UPNI.js → quickstart-QBNUNPZR.js} +6 -6
- package/dist/cli/{run-4DXSGXRB.js → run-2CPMFC6W.js} +44 -44
- package/dist/cli/{run-QHCYMSBP.mjs → run-GBRPFC6P.mjs} +23 -23
- package/dist/cli/{search-N4ZOK5XX.mjs → search-G7TS7OFB.mjs} +7 -7
- package/dist/cli/search-M3AHFCKQ.js +32 -0
- package/dist/cli/{search-output-F2OYLVK2.mjs → search-output-BIIJRUCP.mjs} +4 -4
- package/dist/cli/{search-output-D5VAC52B.js → search-output-NRKLNWSD.js} +6 -6
- package/dist/cli/{secrets-LD4FVAQI.mjs → secrets-DN3XEZNH.mjs} +6 -6
- package/dist/cli/{secrets-3KETOTDS.js → secrets-FUXYSEL5.js} +15 -15
- package/dist/cli/{sessions-LPLI4Z4O.mjs → sessions-PMUTPCTT.mjs} +6 -6
- package/dist/cli/sessions-VMBMBGVJ.js +23 -0
- package/dist/cli/{settings-NCGPJG3Z.mjs → settings-N6GNS2KA.mjs} +12 -12
- package/dist/cli/{settings-NFBTCOMB.js → settings-ZDTWCQ6B.js} +85 -85
- package/dist/cli/{setup-NH6MRYXZ.mjs → setup-LJ3KWPSA.mjs} +9 -9
- package/dist/cli/{setup-ATBSUSH4.js → setup-PN5TSSJE.js} +49 -49
- package/dist/cli/{skills-ITPBPIXD.mjs → skills-7J42K6VC.mjs} +7 -7
- package/dist/cli/skills-CXDENBLF.js +37 -0
- package/dist/cli/{tools-2XZPR65V.mjs → tools-M3S6D6DA.mjs} +17 -17
- package/dist/cli/tools-WY2GMOC7.js +57 -0
- package/dist/cli/{update-VFB22FWO.mjs → update-XTVFG74E.mjs} +9 -9
- package/dist/cli/update-ZB2IBGXG.js +37 -0
- package/dist/cli/{views-WJUZOQM2.js → views-B4X2FWTF.js} +21 -21
- package/dist/cli/{views-MRN3HWTG.mjs → views-UFYRDO4X.mjs} +6 -6
- package/dist/cli/{workflow-Q4JFBTVH.js → workflow-I2RM2J2J.js} +17 -17
- package/dist/cli/{workflow-A6P7YV5W.mjs → workflow-ZLMS3PDE.mjs} +7 -7
- package/dist/{client-QznpkWrk.d.ts → client-2QWMJInp.d.ts} +1 -1
- package/dist/{client-CmG8MT0x.d.mts → client-7H8TXmLa.d.mts} +1 -1
- package/dist/{client-core-CY0jNW0e.d.mts → client-core-BraEuxbg.d.mts} +67 -4
- package/dist/{client-core-CXDqfeiB.d.ts → client-core-DRglY5xa.d.ts} +67 -4
- 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 +125 -120
- package/dist/plays/bundle-play-file.mjs +5 -0
- 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 +3 -3
- package/dist/release.d.ts +3 -3
- 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-VU6VIPVY.js +0 -44
- package/dist/cli/concurrent-runs-help-6WUNDV77.js +0 -22
- package/dist/cli/describe-CA2FL2OS.js +0 -50
- package/dist/cli/git-WJ4V2B4T.js +0 -26
- package/dist/cli/search-V765JH2H.js +0 -32
- package/dist/cli/sessions-XC65OMDS.js +0 -23
- package/dist/cli/skills-4NQBTGOL.js +0 -37
- package/dist/cli/tools-ZVOFATX2.js +0 -57
- package/dist/cli/update-QME3KPOP.js +0 -37
|
@@ -1,26 +1,26 @@
|
|
|
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 _chunk7ZCD7OPOjs = require('./chunk-7ZCD7OPO.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkMOZDEYQCjs = require('./chunk-MOZDEYQC.js');
|
|
7
7
|
require('./chunk-BVXIGOBZ.js');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-QKRDAJ3T.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk7XXJJVSIjs = require('./chunk-7XXJJVSI.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkBUUAFSSNjs = require('./chunk-BUUAFSSN.js');
|
|
18
18
|
require('./chunk-4WAM6TLD.js');
|
|
19
19
|
require('./chunk-MJTVX4QK.js');
|
|
20
20
|
require('./chunk-PMH4GLMD.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkVYERVFGBjs = require('./chunk-VYERVFGB.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunkTJCENACZjs = require('./chunk-TJCENACZ.js');
|
|
@@ -37,12 +37,12 @@ var _chunk2M3VVGMZjs = require('./chunk-2M3VVGMZ.js');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkISSYN3DJjs = require('./chunk-ISSYN3DJ.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
45
|
-
require('./chunk-
|
|
44
|
+
var _chunkS33BN7GZjs = require('./chunk-S33BN7GZ.js');
|
|
45
|
+
require('./chunk-4BSCSQ6I.js');
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
@@ -52,7 +52,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
52
52
|
|
|
53
53
|
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
54
54
|
require('./chunk-CFJFUVX2.js');
|
|
55
|
-
require('./chunk-
|
|
55
|
+
require('./chunk-3ET6NRXP.js');
|
|
56
56
|
require('./chunk-OG64RBAC.js');
|
|
57
57
|
require('./chunk-COGTRVWW.js');
|
|
58
58
|
|
|
@@ -148,7 +148,7 @@ function reportBillingFailure(failure, options) {
|
|
|
148
148
|
if (failure.next) {
|
|
149
149
|
textLines.push(`Next: ${failure.next}`);
|
|
150
150
|
}
|
|
151
|
-
|
|
151
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
152
152
|
{
|
|
153
153
|
ok: false,
|
|
154
154
|
exitCode: failure.exitCode,
|
|
@@ -169,7 +169,7 @@ function parseTopUpCredits(raw) {
|
|
|
169
169
|
return parsed;
|
|
170
170
|
}
|
|
171
171
|
function topUpIdempotencyKey(raw) {
|
|
172
|
-
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` :
|
|
172
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkBUUAFSSNjs.requireBillingIdempotencyKey.call(void 0, raw);
|
|
173
173
|
}
|
|
174
174
|
function targetBillingIdempotencyKey(raw) {
|
|
175
175
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -390,7 +390,7 @@ function defaultLedgerExportPath() {
|
|
|
390
390
|
);
|
|
391
391
|
}
|
|
392
392
|
async function handleBalance(options) {
|
|
393
|
-
const { http } =
|
|
393
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
394
394
|
const payload = await http.get(
|
|
395
395
|
"/api/v2/billing/balance"
|
|
396
396
|
);
|
|
@@ -480,7 +480,7 @@ async function handleBalance(options) {
|
|
|
480
480
|
...options.verbose ? detail : [],
|
|
481
481
|
...lines.slice(1)
|
|
482
482
|
];
|
|
483
|
-
|
|
483
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
484
484
|
{
|
|
485
485
|
...payload,
|
|
486
486
|
...recovery ? { recovery } : {},
|
|
@@ -516,7 +516,7 @@ async function handleUsageEvents(options) {
|
|
|
516
516
|
);
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
|
-
const client = new (0,
|
|
519
|
+
const client = new (0, _chunk7XXJJVSIjs.DeeplineClient)();
|
|
520
520
|
let payload;
|
|
521
521
|
try {
|
|
522
522
|
payload = await client.billing.usageEvents({
|
|
@@ -547,7 +547,7 @@ async function handleUsageEvents(options) {
|
|
|
547
547
|
),
|
|
548
548
|
...nextPage ? [`Next page: ${nextPage}`] : []
|
|
549
549
|
];
|
|
550
|
-
|
|
550
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
551
551
|
{
|
|
552
552
|
...payload,
|
|
553
553
|
next: { page: nextPage },
|
|
@@ -569,7 +569,7 @@ async function handleUsage(options) {
|
|
|
569
569
|
return;
|
|
570
570
|
}
|
|
571
571
|
if (options.events) return handleUsageEvents(options);
|
|
572
|
-
const { http } =
|
|
572
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
573
573
|
const params = new URLSearchParams();
|
|
574
574
|
if (options.requestId !== void 0) {
|
|
575
575
|
const requestId = options.requestId.trim();
|
|
@@ -653,7 +653,7 @@ async function handleUsage(options) {
|
|
|
653
653
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
654
654
|
] : []
|
|
655
655
|
];
|
|
656
|
-
|
|
656
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
657
657
|
{
|
|
658
658
|
...payload,
|
|
659
659
|
recent: {
|
|
@@ -667,7 +667,7 @@ async function handleUsage(options) {
|
|
|
667
667
|
);
|
|
668
668
|
}
|
|
669
669
|
async function handleLimit(options) {
|
|
670
|
-
const { http } =
|
|
670
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
671
671
|
const payload = await http.get(
|
|
672
672
|
"/api/v2/billing/limit"
|
|
673
673
|
);
|
|
@@ -675,7 +675,7 @@ async function handleLimit(options) {
|
|
|
675
675
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
676
676
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
677
677
|
] : ["Monthly usage cap: off"];
|
|
678
|
-
|
|
678
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
679
679
|
{
|
|
680
680
|
...payload,
|
|
681
681
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -684,12 +684,12 @@ async function handleLimit(options) {
|
|
|
684
684
|
);
|
|
685
685
|
}
|
|
686
686
|
async function handleSetLimit(credits, options) {
|
|
687
|
-
const { http } =
|
|
687
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
688
688
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
689
689
|
method: "PUT",
|
|
690
690
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
691
691
|
});
|
|
692
|
-
|
|
692
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
693
693
|
{
|
|
694
694
|
...payload,
|
|
695
695
|
render: {
|
|
@@ -705,11 +705,11 @@ async function handleSetLimit(credits, options) {
|
|
|
705
705
|
);
|
|
706
706
|
}
|
|
707
707
|
async function handleLimitOff(options) {
|
|
708
|
-
const { http } =
|
|
708
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
709
709
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
710
710
|
method: "DELETE"
|
|
711
711
|
});
|
|
712
|
-
|
|
712
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
713
713
|
{
|
|
714
714
|
...payload,
|
|
715
715
|
render: {
|
|
@@ -729,7 +729,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
729
729
|
let initialized = false;
|
|
730
730
|
let pageNumber = 0;
|
|
731
731
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
732
|
-
for await (const entries of
|
|
732
|
+
for await (const entries of _chunkBUUAFSSNjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
733
733
|
pageNumber += 1;
|
|
734
734
|
console.error(
|
|
735
735
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -768,7 +768,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
768
768
|
return summary;
|
|
769
769
|
}
|
|
770
770
|
async function handleHistory(options) {
|
|
771
|
-
const { http } =
|
|
771
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
772
772
|
const windows = {
|
|
773
773
|
"1d": 86400,
|
|
774
774
|
"1w": 604800,
|
|
@@ -780,10 +780,10 @@ async function handleHistory(options) {
|
|
|
780
780
|
process.cwd(),
|
|
781
781
|
"deepline",
|
|
782
782
|
"data",
|
|
783
|
-
|
|
783
|
+
_chunkISSYN3DJjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
784
784
|
);
|
|
785
785
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
786
|
-
|
|
786
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
787
787
|
{
|
|
788
788
|
output_path: outputPath,
|
|
789
789
|
row_count: summary.row_count,
|
|
@@ -820,14 +820,14 @@ async function handleLedgerExportAll(options) {
|
|
|
820
820
|
);
|
|
821
821
|
return;
|
|
822
822
|
}
|
|
823
|
-
const { http } =
|
|
823
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
824
824
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
825
825
|
const summary = await exportLedger(http, outputPath, {
|
|
826
826
|
sinceAt,
|
|
827
827
|
runId: options.runId,
|
|
828
828
|
operation: options.operation
|
|
829
829
|
});
|
|
830
|
-
|
|
830
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
831
831
|
{
|
|
832
832
|
output_path: outputPath,
|
|
833
833
|
row_count: summary.row_count,
|
|
@@ -869,7 +869,7 @@ function targetPlanLine(plan) {
|
|
|
869
869
|
return `${_nullishCoalesce(plan.display_name, () => ( plan.name))} (${_nullishCoalesce(plan.public_sku, () => ( plan.sku))}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth}${bonus}${annual} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
870
870
|
}
|
|
871
871
|
async function handlePlans(options) {
|
|
872
|
-
const client = new (0,
|
|
872
|
+
const client = new (0, _chunk7XXJJVSIjs.DeeplineClient)();
|
|
873
873
|
const payload = await client.billing.targetPlans(
|
|
874
874
|
options.promoCode ? { promoCode: options.promoCode } : void 0
|
|
875
875
|
);
|
|
@@ -895,8 +895,8 @@ async function handlePlans(options) {
|
|
|
895
895
|
...plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...plans.map(targetPlanLine)],
|
|
896
896
|
_optionalChain([promo, 'optionalAccess', _15 => _15.status]) === "applied" ? `Change plan: deepline billing change-plan <plan_sku>, then enter promo code ${promo.code} in the browser` : "Change plan: deepline billing change-plan <plan_sku>"
|
|
897
897
|
];
|
|
898
|
-
const legacyPayload =
|
|
899
|
-
|
|
898
|
+
const legacyPayload = _chunkISSYN3DJjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
899
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
900
900
|
{
|
|
901
901
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
902
902
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -906,7 +906,7 @@ async function handlePlans(options) {
|
|
|
906
906
|
);
|
|
907
907
|
}
|
|
908
908
|
async function handleSubscribe(planVersionId, options) {
|
|
909
|
-
const { http } =
|
|
909
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
910
910
|
const payload = await http.request(
|
|
911
911
|
"/api/v2/billing/subscription/checkout",
|
|
912
912
|
{
|
|
@@ -915,8 +915,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
915
915
|
}
|
|
916
916
|
);
|
|
917
917
|
const url = String(payload.checkout_url || "");
|
|
918
|
-
if (!options.json && options.open !== false && url)
|
|
919
|
-
|
|
918
|
+
if (!options.json && options.open !== false && url) _chunkISSYN3DJjs.openInBrowser.call(void 0, url);
|
|
919
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
920
920
|
{
|
|
921
921
|
...payload,
|
|
922
922
|
render: {
|
|
@@ -932,7 +932,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
932
932
|
);
|
|
933
933
|
}
|
|
934
934
|
async function handleSubscriptionStatus(options) {
|
|
935
|
-
const client = new (0,
|
|
935
|
+
const client = new (0, _chunk7XXJJVSIjs.DeeplineClient)();
|
|
936
936
|
const payload = await client.billing.subscription.status();
|
|
937
937
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
938
938
|
const lines = [
|
|
@@ -952,7 +952,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
952
952
|
],
|
|
953
953
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
954
954
|
];
|
|
955
|
-
|
|
955
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
956
956
|
{
|
|
957
957
|
...payload,
|
|
958
958
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -961,7 +961,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
961
961
|
);
|
|
962
962
|
}
|
|
963
963
|
async function handleSubscriptionCancel(options) {
|
|
964
|
-
const client = new (0,
|
|
964
|
+
const client = new (0, _chunk7XXJJVSIjs.DeeplineClient)();
|
|
965
965
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
966
966
|
if (options.dryRun) {
|
|
967
967
|
const status = await client.billing.subscription.status();
|
|
@@ -978,7 +978,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
978
978
|
return;
|
|
979
979
|
}
|
|
980
980
|
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.";
|
|
981
|
-
|
|
981
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
982
982
|
{
|
|
983
983
|
ok: true,
|
|
984
984
|
dry_run: true,
|
|
@@ -1034,7 +1034,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
1034
1034
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
1035
1035
|
"Undo with: deepline billing subscription cancel --undo"
|
|
1036
1036
|
];
|
|
1037
|
-
|
|
1037
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1038
1038
|
{
|
|
1039
1039
|
ok: true,
|
|
1040
1040
|
...result,
|
|
@@ -1088,7 +1088,7 @@ async function handleInvoices(options) {
|
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
|
-
const client = new (0,
|
|
1091
|
+
const client = new (0, _chunk7XXJJVSIjs.DeeplineClient)();
|
|
1092
1092
|
let payload;
|
|
1093
1093
|
try {
|
|
1094
1094
|
payload = await client.billing.invoices.list(
|
|
@@ -1117,7 +1117,7 @@ async function handleInvoices(options) {
|
|
|
1117
1117
|
url: entry.url
|
|
1118
1118
|
}))
|
|
1119
1119
|
} : { ...payload, count: entries.length };
|
|
1120
|
-
|
|
1120
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1121
1121
|
{
|
|
1122
1122
|
...envelope,
|
|
1123
1123
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -1126,7 +1126,7 @@ async function handleInvoices(options) {
|
|
|
1126
1126
|
);
|
|
1127
1127
|
}
|
|
1128
1128
|
async function handleCheckout(options) {
|
|
1129
|
-
const { http } =
|
|
1129
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
1130
1130
|
const payload = await http.post(
|
|
1131
1131
|
"/api/v2/billing/checkout",
|
|
1132
1132
|
{
|
|
@@ -1136,8 +1136,8 @@ async function handleCheckout(options) {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
);
|
|
1138
1138
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1139
|
-
if (!options.json && !options.noOpen && url)
|
|
1140
|
-
|
|
1139
|
+
if (!options.json && !options.noOpen && url) _chunkISSYN3DJjs.openInBrowser.call(void 0, url);
|
|
1140
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1141
1141
|
{
|
|
1142
1142
|
...payload,
|
|
1143
1143
|
render: {
|
|
@@ -1182,7 +1182,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1182
1182
|
return;
|
|
1183
1183
|
}
|
|
1184
1184
|
if (options.dryRun) {
|
|
1185
|
-
|
|
1185
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1186
1186
|
{
|
|
1187
1187
|
ok: true,
|
|
1188
1188
|
dry_run: true,
|
|
@@ -1212,7 +1212,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1212
1212
|
);
|
|
1213
1213
|
return;
|
|
1214
1214
|
}
|
|
1215
|
-
const client = new (0,
|
|
1215
|
+
const client = new (0, _chunk7XXJJVSIjs.DeeplineClient)();
|
|
1216
1216
|
let payload;
|
|
1217
1217
|
try {
|
|
1218
1218
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1229,7 +1229,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1229
1229
|
return;
|
|
1230
1230
|
}
|
|
1231
1231
|
if (payload.status === "pending") {
|
|
1232
|
-
|
|
1232
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1233
1233
|
{
|
|
1234
1234
|
ok: true,
|
|
1235
1235
|
...payload,
|
|
@@ -1293,17 +1293,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1293
1293
|
]
|
|
1294
1294
|
}
|
|
1295
1295
|
};
|
|
1296
|
-
|
|
1296
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1297
1297
|
json: options.json
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
async function handleTargetStatus(options) {
|
|
1301
|
-
const client = new (0,
|
|
1301
|
+
const client = new (0, _chunk7XXJJVSIjs.DeeplineClient)();
|
|
1302
1302
|
const payload = await client.billing.targetStatus();
|
|
1303
1303
|
const balanceCommand = "deepline billing balance";
|
|
1304
1304
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1305
1305
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1306
|
-
|
|
1306
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1307
1307
|
{
|
|
1308
1308
|
ok: true,
|
|
1309
1309
|
...payload,
|
|
@@ -1341,13 +1341,13 @@ function formatComputeAmount(minutes, credits) {
|
|
|
1341
1341
|
return `${time} ${minutes === 1 ? "minute" : "minutes"} (${cost} ${credits === 1 ? "credit" : "credits"})`;
|
|
1342
1342
|
}
|
|
1343
1343
|
async function handleIncludedCompute(options) {
|
|
1344
|
-
const client = new (0,
|
|
1344
|
+
const client = new (0, _chunk7XXJJVSIjs.DeeplineClient)();
|
|
1345
1345
|
const payload = options.enable ? await client.billing.enableIncludedCompute({ includeOverage: true }) : await client.billing.includedCompute({ includeOverage: true });
|
|
1346
1346
|
const rate = _nullishCoalesce(payload.credits_per_minute, () => ( 0));
|
|
1347
1347
|
const includedCredits = _nullishCoalesce(payload.included_credits_used, () => ( payload.included_minutes_used * rate));
|
|
1348
1348
|
const includedMinutes = payload.included_credits_used !== void 0 && rate > 0 ? includedCredits / rate : payload.included_minutes_used;
|
|
1349
1349
|
const overage = payload.overage_credits;
|
|
1350
|
-
|
|
1350
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1351
1351
|
{
|
|
1352
1352
|
ok: true,
|
|
1353
1353
|
...payload,
|
|
@@ -1365,7 +1365,7 @@ async function handleIncludedCompute(options) {
|
|
|
1365
1365
|
] : [],
|
|
1366
1366
|
`Standard sandbox price: ${formatComputeAmount(60, Math.round(rate * 60))}`,
|
|
1367
1367
|
`Allowance resets: ${payload.period_end_at.slice(0, 10)} (UTC)`,
|
|
1368
|
-
|
|
1368
|
+
_chunkVYERVFGBjs.PLAY_RUNTIME_PRICING_NOTE,
|
|
1369
1369
|
_chunkTJCENACZjs.PRICING_PAGE_NOTE
|
|
1370
1370
|
] : payload.status === "off" ? [
|
|
1371
1371
|
..._optionalChain([payload, 'access', _21 => _21.database, 'optionalAccess', _22 => _22.enabled]) ? [
|
|
@@ -1374,7 +1374,7 @@ async function handleIncludedCompute(options) {
|
|
|
1374
1374
|
"Included compute: off; Play compute is billed at provider cost.",
|
|
1375
1375
|
`Allowance if enabled: ${formatComputeAmount(payload.plan.included_minutes, payload.plan.included_minutes * payload.plan.credits_per_minute)} per month`,
|
|
1376
1376
|
`Standard sandbox price if enabled: ${formatComputeAmount(60, Math.round(payload.plan.credits_per_minute * 60))}`,
|
|
1377
|
-
|
|
1377
|
+
_chunkVYERVFGBjs.PLAY_RUNTIME_PRICING_NOTE,
|
|
1378
1378
|
"Run deepline billing compute --enable to turn on included compute. It cannot be turned off again.",
|
|
1379
1379
|
_chunkTJCENACZjs.PRICING_PAGE_NOTE
|
|
1380
1380
|
] : ["Included compute is not available for this org yet."]
|
|
@@ -1386,8 +1386,8 @@ async function handleIncludedCompute(options) {
|
|
|
1386
1386
|
);
|
|
1387
1387
|
}
|
|
1388
1388
|
async function handleEntitlements(options) {
|
|
1389
|
-
const payload = await new (0,
|
|
1390
|
-
|
|
1389
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.entitlements();
|
|
1390
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1391
1391
|
{
|
|
1392
1392
|
ok: true,
|
|
1393
1393
|
...payload,
|
|
@@ -1397,7 +1397,7 @@ async function handleEntitlements(options) {
|
|
|
1397
1397
|
title: "billing entitlements",
|
|
1398
1398
|
lines: [
|
|
1399
1399
|
`Plan: ${_nullishCoalesce(_optionalChain([payload, 'access', _23 => _23.plan, 'optionalAccess', _24 => _24.name]), () => ( "Legacy billing"))}`,
|
|
1400
|
-
...
|
|
1400
|
+
..._chunk7ZCD7OPOjs.concurrentRunsLine.call(void 0, payload) ? [`Concurrent runs: ${_chunk7ZCD7OPOjs.concurrentRunsLine.call(void 0, payload)}`] : [],
|
|
1401
1401
|
...Object.entries(payload.benefits).flatMap(
|
|
1402
1402
|
([key, grant]) => "value" in grant ? [
|
|
1403
1403
|
`${key}: ${grant.status}, ${JSON.stringify(grant.value)}${grant.expiresAt === void 0 ? "" : `, expires ${new Date(grant.expiresAt).toISOString()}`}`
|
|
@@ -1422,7 +1422,7 @@ async function handleEntitlements(options) {
|
|
|
1422
1422
|
);
|
|
1423
1423
|
}
|
|
1424
1424
|
async function handleAutoRechargeStatus(options) {
|
|
1425
|
-
const payload = await new (0,
|
|
1425
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1426
1426
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1427
1427
|
const lines = [
|
|
1428
1428
|
`State: ${state}`,
|
|
@@ -1432,7 +1432,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1432
1432
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1433
1433
|
] : []
|
|
1434
1434
|
];
|
|
1435
|
-
|
|
1435
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1436
1436
|
{
|
|
1437
1437
|
ok: true,
|
|
1438
1438
|
...payload,
|
|
@@ -1481,7 +1481,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1483
1483
|
if (options.dryRun) {
|
|
1484
|
-
|
|
1484
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1485
1485
|
{
|
|
1486
1486
|
ok: true,
|
|
1487
1487
|
dry_run: true,
|
|
@@ -1502,7 +1502,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1502
1502
|
);
|
|
1503
1503
|
return;
|
|
1504
1504
|
}
|
|
1505
|
-
const payload = await new (0,
|
|
1505
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1506
1506
|
enabled: true,
|
|
1507
1507
|
thresholdCredits,
|
|
1508
1508
|
refillToCredits,
|
|
@@ -1510,7 +1510,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1510
1510
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1511
1511
|
idempotencyKey
|
|
1512
1512
|
});
|
|
1513
|
-
|
|
1513
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1514
1514
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1515
1515
|
{ json: options.json }
|
|
1516
1516
|
);
|
|
@@ -1518,7 +1518,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1518
1518
|
async function handleAutoRechargeOff(options) {
|
|
1519
1519
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1520
1520
|
if (options.dryRun) {
|
|
1521
|
-
|
|
1521
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1522
1522
|
{
|
|
1523
1523
|
ok: true,
|
|
1524
1524
|
dry_run: true,
|
|
@@ -1533,11 +1533,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1533
1533
|
);
|
|
1534
1534
|
return;
|
|
1535
1535
|
}
|
|
1536
|
-
const payload = await new (0,
|
|
1536
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1537
1537
|
enabled: false,
|
|
1538
1538
|
idempotencyKey
|
|
1539
1539
|
});
|
|
1540
|
-
|
|
1540
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1541
1541
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1542
1542
|
{ json: options.json }
|
|
1543
1543
|
);
|
|
@@ -1563,18 +1563,18 @@ function savedCardLines(cards, hasMore) {
|
|
|
1563
1563
|
async function handleCardsList(options) {
|
|
1564
1564
|
const limit = options.limit === void 0 ? void 0 : Number(options.limit);
|
|
1565
1565
|
if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1 || limit > 100)) {
|
|
1566
|
-
|
|
1566
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1567
1567
|
{ ok: false, error: "--limit must be a whole number from 1 to 100." },
|
|
1568
1568
|
{ json: options.json }
|
|
1569
1569
|
);
|
|
1570
1570
|
process.exitCode = 1;
|
|
1571
1571
|
return;
|
|
1572
1572
|
}
|
|
1573
|
-
const payload = await new (0,
|
|
1573
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.cards.list({
|
|
1574
1574
|
...limit !== void 0 ? { limit } : {},
|
|
1575
1575
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
1576
1576
|
});
|
|
1577
|
-
|
|
1577
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1578
1578
|
{
|
|
1579
1579
|
ok: true,
|
|
1580
1580
|
...payload,
|
|
@@ -1592,8 +1592,8 @@ async function handleCardsList(options) {
|
|
|
1592
1592
|
}
|
|
1593
1593
|
async function handleCardsAdd(options) {
|
|
1594
1594
|
const makeDefault = options.makeDefault === true;
|
|
1595
|
-
const payload = await new (0,
|
|
1596
|
-
|
|
1595
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.cards.add({ makeDefault });
|
|
1596
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1597
1597
|
{
|
|
1598
1598
|
ok: true,
|
|
1599
1599
|
make_default: makeDefault,
|
|
@@ -1618,7 +1618,7 @@ async function handleCardChange(action, cardId, options) {
|
|
|
1618
1618
|
const changeId = _nullishCoalesce(options.changeId, () => ( _crypto.randomUUID.call(void 0, )));
|
|
1619
1619
|
const path = `/api/v2/billing/payment-methods/${action}`;
|
|
1620
1620
|
if (options.dryRun) {
|
|
1621
|
-
|
|
1621
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1622
1622
|
{
|
|
1623
1623
|
ok: true,
|
|
1624
1624
|
dry_run: true,
|
|
@@ -1633,9 +1633,9 @@ async function handleCardChange(action, cardId, options) {
|
|
|
1633
1633
|
);
|
|
1634
1634
|
return;
|
|
1635
1635
|
}
|
|
1636
|
-
const cards = new (0,
|
|
1636
|
+
const cards = new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.cards;
|
|
1637
1637
|
const payload = action === "default" ? await cards.setDefault({ cardId, changeId }) : await cards.remove({ cardId, changeId });
|
|
1638
|
-
|
|
1638
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1639
1639
|
{
|
|
1640
1640
|
...payload,
|
|
1641
1641
|
render: {
|
|
@@ -1669,11 +1669,11 @@ async function handleBuyCredits(creditsRaw, 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, _chunk7XXJJVSIjs.DeeplineClient)().billing.purchaseCredits({
|
|
1673
1673
|
credits,
|
|
1674
1674
|
idempotencyKey
|
|
1675
1675
|
});
|
|
1676
|
-
|
|
1676
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1677
1677
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1678
1678
|
{ json: options.json }
|
|
1679
1679
|
);
|
|
@@ -1709,7 +1709,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1709
1709
|
return;
|
|
1710
1710
|
}
|
|
1711
1711
|
if (options.dryRun) {
|
|
1712
|
-
|
|
1712
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1713
1713
|
{
|
|
1714
1714
|
ok: true,
|
|
1715
1715
|
dry_run: true,
|
|
@@ -1722,18 +1722,18 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1722
1722
|
);
|
|
1723
1723
|
return;
|
|
1724
1724
|
}
|
|
1725
|
-
const payload = await new (0,
|
|
1725
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1726
1726
|
credits,
|
|
1727
1727
|
orgId: options.orgId,
|
|
1728
1728
|
idempotencyKey: options.idempotencyKey
|
|
1729
1729
|
});
|
|
1730
|
-
|
|
1730
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1731
1731
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1732
1732
|
{ json: options.json }
|
|
1733
1733
|
);
|
|
1734
1734
|
}
|
|
1735
1735
|
async function handleTargetPlan(planSku, options) {
|
|
1736
|
-
const targetPlanSku = planSku === void 0 ? void 0 : [...
|
|
1736
|
+
const targetPlanSku = planSku === void 0 ? void 0 : [..._chunkBUUAFSSNjs.PUBLIC_PLAN_SKUS, ...COMPATIBLE_PLAN_SKUS].find(
|
|
1737
1737
|
(sku) => sku === planSku
|
|
1738
1738
|
);
|
|
1739
1739
|
if (planSku !== void 0 && !targetPlanSku) {
|
|
@@ -1741,20 +1741,20 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1741
1741
|
{
|
|
1742
1742
|
exitCode: 2,
|
|
1743
1743
|
code: "INVALID_PLAN",
|
|
1744
|
-
message: `Plan must be one of ${
|
|
1744
|
+
message: `Plan must be one of ${_chunkBUUAFSSNjs.PUBLIC_PLAN_SKUS.join(", ")}. Run deepline billing plans to see workspace availability.`
|
|
1745
1745
|
},
|
|
1746
1746
|
options
|
|
1747
1747
|
);
|
|
1748
1748
|
return;
|
|
1749
1749
|
}
|
|
1750
|
-
const baseUrl =
|
|
1750
|
+
const baseUrl = _chunkS33BN7GZjs.resolveBaseUrlOnly.call(void 0, );
|
|
1751
1751
|
const link = _chunkMOZDEYQCjs.buildDashboardUrl.call(void 0,
|
|
1752
1752
|
baseUrl,
|
|
1753
|
-
targetPlanSku ? `/dashboard/billing?plan=${encodeURIComponent(
|
|
1754
|
-
|
|
1753
|
+
targetPlanSku ? `/dashboard/billing?plan=${encodeURIComponent(_chunkBUUAFSSNjs.resolvePublicPlanSku.call(void 0, targetPlanSku))}` : "/dashboard/billing?plan",
|
|
1754
|
+
_chunkS33BN7GZjs.resolveCliDashboardOrgId.call(void 0, baseUrl)
|
|
1755
1755
|
);
|
|
1756
|
-
if (!options.json && options.open !== false)
|
|
1757
|
-
|
|
1756
|
+
if (!options.json && options.open !== false) _chunkISSYN3DJjs.openInBrowser.call(void 0, link);
|
|
1757
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1758
1758
|
{
|
|
1759
1759
|
ok: true,
|
|
1760
1760
|
url: link,
|
|
@@ -1771,8 +1771,8 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1771
1771
|
);
|
|
1772
1772
|
}
|
|
1773
1773
|
async function handleBillingDetailsShow(options) {
|
|
1774
|
-
const payload = await new (0,
|
|
1775
|
-
|
|
1774
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.getDetails();
|
|
1775
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1776
1776
|
}
|
|
1777
1777
|
async function handleBillingDetailsSet(options) {
|
|
1778
1778
|
const separator = _nullishCoalesce(_optionalChain([options, 'access', _28 => _28.taxId, 'optionalAccess', _29 => _29.indexOf, 'call', _30 => _30(":")]), () => ( -1));
|
|
@@ -1789,7 +1789,7 @@ async function handleBillingDetailsSet(options) {
|
|
|
1789
1789
|
);
|
|
1790
1790
|
return;
|
|
1791
1791
|
}
|
|
1792
|
-
const payload = await new (0,
|
|
1792
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.setDetails({
|
|
1793
1793
|
...options.name !== void 0 ? { name: options.name } : {},
|
|
1794
1794
|
...options.line1 !== void 0 ? {
|
|
1795
1795
|
address: {
|
|
@@ -1808,28 +1808,28 @@ async function handleBillingDetailsSet(options) {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
} : {}
|
|
1810
1810
|
});
|
|
1811
|
-
|
|
1811
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1812
1812
|
}
|
|
1813
1813
|
async function handleTargetPlanCancellation(options) {
|
|
1814
1814
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1815
|
-
const payload = await new (0,
|
|
1815
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.transitionPlan({
|
|
1816
1816
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1817
1817
|
idempotencyKey
|
|
1818
1818
|
});
|
|
1819
|
-
|
|
1819
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1820
1820
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1821
1821
|
{ json: options.json }
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
1824
1824
|
async function handleTargetPortal(options) {
|
|
1825
|
-
const payload = await new (0,
|
|
1825
|
+
const payload = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.portalSession(
|
|
1826
1826
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1827
1827
|
);
|
|
1828
|
-
if (!options.json && !options.noOpen)
|
|
1829
|
-
|
|
1828
|
+
if (!options.json && !options.noOpen) _chunkISSYN3DJjs.openInBrowser.call(void 0, payload.url);
|
|
1829
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1830
1830
|
}
|
|
1831
1831
|
async function handleRedeemCode(code, options) {
|
|
1832
|
-
const { http } =
|
|
1832
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
1833
1833
|
const payload = await http.post(
|
|
1834
1834
|
"/api/v2/billing/checkout",
|
|
1835
1835
|
{
|
|
@@ -1837,8 +1837,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
);
|
|
1839
1839
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1840
|
-
if (!options.json && !options.noOpen && url)
|
|
1841
|
-
|
|
1840
|
+
if (!options.json && !options.noOpen && url) _chunkISSYN3DJjs.openInBrowser.call(void 0, url);
|
|
1841
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1842
1842
|
{
|
|
1843
1843
|
...payload,
|
|
1844
1844
|
render: {
|
|
@@ -1899,14 +1899,14 @@ Examples:
|
|
|
1899
1899
|
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1900
1900
|
throw new Error("--quantity must be a positive safe integer.");
|
|
1901
1901
|
}
|
|
1902
|
-
const quote = await new (0,
|
|
1902
|
+
const quote = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.quote({
|
|
1903
1903
|
quantity,
|
|
1904
1904
|
sandbox_runtime: {
|
|
1905
1905
|
timeout: options.sandboxTimeout,
|
|
1906
1906
|
size: options.sandboxSize
|
|
1907
1907
|
}
|
|
1908
1908
|
});
|
|
1909
|
-
|
|
1909
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0, quote, {
|
|
1910
1910
|
json: options.json,
|
|
1911
1911
|
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1912
1912
|
${quote.explanation}
|
|
@@ -1935,9 +1935,9 @@ Examples:
|
|
|
1935
1935
|
billing.command("reuse").description(
|
|
1936
1936
|
"Show recorded reused tool results for this org; no credit estimate."
|
|
1937
1937
|
).option("--json", "Return the org reuse summary as JSON").action(async (options) => {
|
|
1938
|
-
const { http } =
|
|
1938
|
+
const { http } = _chunkISSYN3DJjs.getAuthedHttpClient.call(void 0, );
|
|
1939
1939
|
const payload = await http.get("/api/v2/usage/reuse");
|
|
1940
|
-
|
|
1940
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1941
1941
|
{
|
|
1942
1942
|
status: "ok",
|
|
1943
1943
|
data: payload,
|
|
@@ -2178,8 +2178,8 @@ Examples:
|
|
|
2178
2178
|
new (0, _commander.Command)("trigger").description(
|
|
2179
2179
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
2180
2180
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
2181
|
-
const result = await new (0,
|
|
2182
|
-
|
|
2181
|
+
const result = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
2182
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
2183
2183
|
})
|
|
2184
2184
|
);
|
|
2185
2185
|
billing.command("cards").description("List, add, choose the default of, and remove saved cards.").addHelpText(
|
|
@@ -2228,7 +2228,7 @@ Examples:
|
|
|
2228
2228
|
`
|
|
2229
2229
|
).argument(
|
|
2230
2230
|
"[plan_sku]",
|
|
2231
|
-
`${
|
|
2231
|
+
`${_chunkBUUAFSSNjs.PUBLIC_PLAN_SKUS.join(", ")}. Opens that plan's confirmation; omit to open the plan picker.`
|
|
2232
2232
|
).option("--no-open", "Print the link without opening a browser").option("--json", "Emit JSON output").action(handleTargetPlan);
|
|
2233
2233
|
const details = billing.command("details").description(
|
|
2234
2234
|
"Show the company name, billing address and tax ID printed on invoices."
|