deepline 0.3.466 → 0.3.467
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 +41 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +325 -44
- package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +51 -6
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +37 -1
- package/dist/cli/{auth-HYIPYSKK.mjs → auth-7H62VDZD.mjs} +5 -5
- package/dist/cli/auth-EXW5E3DI.js +41 -0
- package/dist/cli/{billing-5S6SGBUP.mjs → billing-6TM3ZXDR.mjs} +44 -6
- package/dist/cli/{billing-NG62QGPT.js → billing-N5BNGGYN.js} +115 -77
- package/dist/cli/{chunk-7YDN6AEK.mjs → chunk-3RGWTKK3.mjs} +10 -0
- package/dist/cli/{chunk-A7MWUG5H.js → chunk-3ZGSR6X7.js} +1 -1
- package/dist/cli/{chunk-7IWYO475.js → chunk-42AW4SQR.js} +21 -21
- package/dist/cli/{chunk-7QITO7XO.mjs → chunk-4LTQYDZG.mjs} +4 -4
- package/dist/cli/{chunk-SQFBLBYC.mjs → chunk-5RXKAXFD.mjs} +2 -2
- package/dist/cli/{chunk-WKOWXTDR.mjs → chunk-6UZ4MRWN.mjs} +2 -2
- package/dist/cli/{chunk-RGRSUMN6.js → chunk-7Y53LJLE.js} +5 -5
- package/dist/cli/{chunk-B7BNWOG6.js → chunk-7ZZWOJTM.js} +3 -3
- package/dist/cli/{chunk-EOKUL6XS.js → chunk-AD5BZUAP.js} +5 -5
- package/dist/cli/{chunk-YHPUJI7G.mjs → chunk-AU4BWQTT.mjs} +5 -5
- package/dist/cli/{chunk-IEQPOBTK.mjs → chunk-AUVEQ3JX.mjs} +1 -1
- package/dist/cli/{chunk-QWMXP2IP.mjs → chunk-C4GBOGTW.mjs} +2 -2
- package/dist/cli/{chunk-3DVJ2IPG.js → chunk-C6EGT3LO.js} +183 -173
- package/dist/cli/{chunk-W4XWGNW4.mjs → chunk-CER3XHT3.mjs} +3 -3
- package/dist/cli/{chunk-VSEKVRAP.mjs → chunk-DCDTCG2D.mjs} +2 -2
- package/dist/cli/{chunk-R2SQN2CD.js → chunk-FFOAOQ77.js} +6 -6
- package/dist/cli/{chunk-6R36QIG4.mjs → chunk-FP3DH46P.mjs} +4 -4
- package/dist/cli/{chunk-RCMT6AZ5.mjs → chunk-FQIGRZ52.mjs} +1 -1
- package/dist/cli/{chunk-4QJ63YHC.js → chunk-FRY76AFK.js} +8 -8
- package/dist/cli/{chunk-VVCMP45C.js → chunk-FS55YDCW.js} +3 -3
- package/dist/cli/{chunk-HOFXQYRF.js → chunk-FVA6XLRA.js} +7 -7
- package/dist/cli/{chunk-OGCAGZXO.mjs → chunk-FVYAEBGO.mjs} +23 -2
- package/dist/cli/{chunk-RSXOGXGX.mjs → chunk-G35HNL6P.mjs} +1 -1
- package/dist/cli/{chunk-MTH7WIE3.js → chunk-H3QDLCRT.js} +53 -53
- package/dist/cli/{chunk-HIMV32ZX.js → chunk-HNP5V5BN.js} +23 -2
- package/dist/cli/{chunk-UHAKSLL2.mjs → chunk-HTXQUA3V.mjs} +11 -1
- package/dist/cli/{chunk-QTTYIPFY.mjs → chunk-I3LWDZRN.mjs} +1 -1
- package/dist/cli/{chunk-22BKA2QL.js → chunk-KMYCHMZF.js} +26 -26
- package/dist/cli/{chunk-F6H74EFB.mjs → chunk-KUCUHRLC.mjs} +2 -2
- package/dist/cli/{chunk-LDEJ4NUP.js → chunk-LAMHSZ74.js} +13 -13
- package/dist/cli/{chunk-CMXFOZVG.js → chunk-LKVOV7PX.js} +258 -258
- package/dist/cli/{chunk-OB5NON4G.js → chunk-MGUQGKHE.js} +8 -8
- package/dist/cli/{chunk-JLE5UYZV.mjs → chunk-MRBDFPJ7.mjs} +2 -2
- package/dist/cli/{chunk-JLZKF7EY.js → chunk-NPZBE64X.js} +11 -1
- package/dist/cli/{chunk-NJ6KQLMO.mjs → chunk-NU64F53H.mjs} +11 -11
- package/dist/cli/{chunk-V27TVT7P.mjs → chunk-OSKGEBE7.mjs} +1 -1
- package/dist/cli/{chunk-H5MYPDO2.mjs → chunk-R5ZJICJA.mjs} +1 -1
- package/dist/cli/{chunk-6CYRIFZ3.mjs → chunk-RH6DVPGW.mjs} +2 -2
- package/dist/cli/{chunk-NQH7E3F2.js → chunk-SHGBHP6J.js} +3 -3
- package/dist/cli/{chunk-5EUJKY3G.mjs → chunk-SYLR33PS.mjs} +3 -3
- package/dist/cli/{chunk-L3U44YVO.js → chunk-T5GRG37B.js} +5 -5
- package/dist/cli/{chunk-FWHRCZET.mjs → chunk-TNAXVJEG.mjs} +5 -5
- package/dist/cli/{chunk-6P4OYABU.js → chunk-V6OMS7E2.js} +6 -6
- package/dist/cli/{chunk-QMHBWFU5.mjs → chunk-VGWH3BFC.mjs} +1 -1
- package/dist/cli/{chunk-5BEKJUOK.js → chunk-VOPKDTJT.js} +2 -2
- package/dist/cli/{chunk-ZBWKWMSH.js → chunk-WBYC7AYC.js} +16 -16
- package/dist/cli/{chunk-RRCVAVM7.js → chunk-WGMNXDRZ.js} +2 -2
- package/dist/cli/{chunk-46YQQOTC.mjs → chunk-WISHPL5Q.mjs} +5 -5
- package/dist/cli/{chunk-QZKSG7XZ.js → chunk-WS2BY2ST.js} +36 -36
- package/dist/cli/{chunk-PEUWKPY4.js → chunk-WTVTCSPY.js} +4 -4
- package/dist/cli/{chunk-MUQAKLBP.mjs → chunk-X3RAGNNZ.mjs} +1 -1
- package/dist/cli/{chunk-I2TCWIW2.mjs → chunk-XSX6TJUA.mjs} +1 -1
- package/dist/cli/{chunk-NYNNNOJW.js → chunk-YIJS7ET7.js} +51 -51
- package/dist/cli/{chunk-SWUSDFG2.js → chunk-ZTA4JIAB.js} +9 -9
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-ZGZX2IIP.mjs → csv-435JAJ45.mjs} +4 -4
- package/dist/cli/{csv-AD2DLLLL.js → csv-BPZ4VLR6.js} +13 -13
- package/dist/cli/{db-NBY4LHAY.js → db-EBR2UQK3.js} +27 -27
- package/dist/cli/{db-LUFEKPEK.mjs → db-IEUTNOOC.mjs} +6 -6
- package/dist/cli/describe-EPT52IUE.js +48 -0
- package/dist/cli/{describe-MLXMC47U.mjs → describe-GM233O75.mjs} +20 -20
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-HDJMKNBR.js → executions-5SWPQTLB.js} +8 -8
- package/dist/cli/{executions-JKVWM3P4.mjs → executions-LDPBVSKZ.mjs} +6 -6
- package/dist/cli/{feedback-7E5Z4ZO5.mjs → feedback-JB7BBF64.mjs} +4 -4
- package/dist/cli/{feedback-VXMP7HDF.js → feedback-YFW5KT36.js} +8 -8
- package/dist/cli/git-7L7LKOKW.js +25 -0
- package/dist/cli/{git-UFMRAGMY.mjs → git-MCGUPO2W.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-BDULCVGD.mjs → legacy-noops-EHNXHQL7.mjs} +5 -5
- package/dist/cli/{legacy-noops-4QKREY4K.js → legacy-noops-LMGSIBWM.js} +8 -8
- package/dist/cli/{monitors-S6TDJYCK.mjs → monitors-355EWLGN.mjs} +7 -7
- package/dist/cli/{monitors-LNNSTELC.js → monitors-VRQ32EAA.js} +91 -91
- package/dist/cli/{org-EEEMWKQ2.mjs → org-MJ6XMAI4.mjs} +51 -10
- package/dist/cli/{org-OWM3IGOK.js → org-W3YZN65W.js} +113 -72
- package/dist/cli/{pages-ZYYMQUDX.mjs → pages-62QNUXV2.mjs} +6 -6
- package/dist/cli/{pages-7JF6AKDI.js → pages-JPK6UVMV.js} +17 -17
- package/dist/cli/{play-5Z3E7KL6.mjs → play-CKBPES6Q.mjs} +18 -18
- package/dist/cli/{play-WLAFXAHR.js → play-WPPJQBBS.js} +305 -305
- package/dist/cli/{providers-TTDFQQU2.js → providers-DH5JJ5HN.js} +9 -9
- package/dist/cli/{providers-JUT7IYD3.mjs → providers-LLPKHVXL.mjs} +6 -6
- package/dist/cli/{quickstart-P4TL4NWJ.mjs → quickstart-K5HVPO2L.mjs} +4 -4
- package/dist/cli/{quickstart-OZYEGICI.js → quickstart-NNEF37EG.js} +6 -6
- package/dist/cli/{run-BYGE4LUB.js → run-N2KY2VNQ.js} +40 -40
- package/dist/cli/{run-CM6OZUBR.mjs → run-SKIZFJ5O.mjs} +25 -25
- package/dist/cli/{search-RZRJ73YL.mjs → search-2WXJ3GID.mjs} +7 -7
- package/dist/cli/search-HO7ARG3H.js +32 -0
- package/dist/cli/{secrets-XLTN3SCL.js → secrets-5YVX7LK7.js} +15 -15
- package/dist/cli/{secrets-DHI6ZMKE.mjs → secrets-6GEQ75OU.mjs} +6 -6
- package/dist/cli/{sessions-MZD5WZBT.mjs → sessions-GOPZ3YRN.mjs} +5 -5
- package/dist/cli/{sessions-6NCQQXVK.js → sessions-H3QES7C2.js} +6 -6
- package/dist/cli/{settings-JJH72W5V.js → settings-62SU5ROV.js} +78 -78
- package/dist/cli/{settings-S6GQ4XFZ.mjs → settings-IP47HYC6.mjs} +11 -11
- package/dist/cli/{setup-ZJ4G54XN.mjs → setup-LCKXUSW5.mjs} +9 -9
- package/dist/cli/{setup-3BIOG6N2.js → setup-YCCU7TU4.js} +44 -44
- package/dist/cli/{skills-FBH4REPB.mjs → skills-3QAQI6X7.mjs} +7 -7
- package/dist/cli/skills-UVAIKQNC.js +31 -0
- package/dist/cli/{tools-J6YGZTD5.mjs → tools-HKD4G6HA.mjs} +18 -18
- package/dist/cli/tools-KAIUUBTD.js +55 -0
- package/dist/cli/{update-6CSRALIQ.mjs → update-2VYSBSDD.mjs} +9 -9
- package/dist/cli/update-Q3AMECAG.js +33 -0
- package/dist/cli/{workflow-3ATSB7HQ.mjs → workflow-EFRGY6JD.mjs} +7 -7
- package/dist/cli/{workflow-2ETKYSJV.js → workflow-MMWGUSGY.js} +17 -17
- package/dist/{client-BClp2yrq.d.ts → client-BOEAXwJj.d.ts} +1 -1
- package/dist/{client-ADFHNtFM.d.mts → client-DL0koOaP.d.mts} +1 -1
- package/dist/{client-core-BFU73Ttw.d.ts → client-core-BX_8khUY.d.ts} +23 -1
- package/dist/{client-core-DWLmmJWo.d.mts → client-core-CowyuxKu.d.mts} +23 -1
- package/dist/{compiler-manifest-Cs17yO-H.d.ts → compiler-manifest-D5dARg3M.d.mts} +64 -10
- package/dist/{compiler-manifest-Cs17yO-H.d.mts → compiler-manifest-D5dARg3M.d.ts} +64 -10
- package/dist/{errors-Dee-QpVS.d.ts → errors-BtHHzWL8.d.ts} +1 -1
- package/dist/{errors-qNfvQuRB.d.mts → errors-BveMVPwA.d.mts} +1 -1
- package/dist/{index-BTqNNXmC.d.mts → index-BboApDGD.d.mts} +1 -1
- package/dist/{index-DXTh1Lxe.d.ts → index-C6sovoYP.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +277 -76
- package/dist/index.mjs +239 -38
- package/dist/install-integrity.json +114 -114
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- 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/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 +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-Y3UTWD3W.js +0 -41
- package/dist/cli/describe-Z66CQESH.js +0 -48
- package/dist/cli/git-NNSJKW3V.js +0 -25
- package/dist/cli/search-RIG4LTCS.js +0 -32
- package/dist/cli/skills-ODISCL7S.js +0 -31
- package/dist/cli/tools-IHBHDI4P.js +0 -55
- package/dist/cli/update-5O3HDR5O.js +0 -33
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
export const BILLING_CREDIT_PURCHASE_GROUP_KEY =
|
|
2
|
+
'shadow.billing-sales.credit-purchases';
|
|
3
|
+
export const BILLING_CREDIT_PURCHASE_DESTINATION_KEY =
|
|
4
|
+
'shadow.billing-sales.credit-purchases.slack';
|
|
5
|
+
export const BILLING_CREDIT_PURCHASE_IMMEDIATE_LIMIT = 2;
|
|
6
|
+
export const BILLING_CREDIT_PURCHASE_CHANNEL_IMMEDIATE_LIMIT = 14;
|
|
7
|
+
// Internal notification namespace, never a customer workspace.
|
|
8
|
+
export const BILLING_CREDIT_PURCHASE_CHANNEL_SCOPE =
|
|
9
|
+
'platform:credit-purchase-alerts';
|
|
10
|
+
|
|
11
|
+
export function isBillingSalesDestinationKey(key: unknown): boolean {
|
|
12
|
+
return (
|
|
13
|
+
key === BILLING_SALES_DESTINATION_KEY ||
|
|
14
|
+
key === BILLING_CREDIT_PURCHASE_DESTINATION_KEY
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function isBillingSalesGroupKey(key: unknown): boolean {
|
|
19
|
+
return (
|
|
20
|
+
key === BILLING_SALES_GROUP_KEY || key === BILLING_CREDIT_PURCHASE_GROUP_KEY
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
1
24
|
export const BILLING_SALES_GROUP_KEY = 'shadow.billing-sales';
|
|
2
25
|
export const BILLING_SALES_DESTINATION_KEY = 'shadow.billing-sales.slack';
|
|
3
26
|
export const BILLING_SALES_SLACK_CHANNEL_ID = 'C0AGWVD2TNK';
|
|
@@ -16,5 +39,18 @@ export const BILLING_SALES_RULE_KEYS: readonly string[] = [
|
|
|
16
39
|
];
|
|
17
40
|
|
|
18
41
|
export function isPlatformNotificationGroup(groupKey: string): boolean {
|
|
19
|
-
return groupKey === 'shadow' || groupKey
|
|
42
|
+
return groupKey === 'shadow' || isBillingSalesGroupKey(groupKey);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Permit only the code-owned purchase-rule move while old deliveries drain. */
|
|
46
|
+
export function isLegacyCreditPurchaseGroup(
|
|
47
|
+
ruleKey: string,
|
|
48
|
+
currentGroupKey: string,
|
|
49
|
+
queuedGroupKey: string,
|
|
50
|
+
): boolean {
|
|
51
|
+
return (
|
|
52
|
+
ruleKey === 'internal.billing.credit_purchase' &&
|
|
53
|
+
currentGroupKey === BILLING_CREDIT_PURCHASE_GROUP_KEY &&
|
|
54
|
+
queuedGroupKey === BILLING_SALES_GROUP_KEY
|
|
55
|
+
);
|
|
20
56
|
}
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
reportSetupCompleted,
|
|
14
14
|
resolvePendingAuthClaimForResume,
|
|
15
15
|
statusBannerLine
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-CER3XHT3.mjs";
|
|
17
|
+
import "./chunk-RH6DVPGW.mjs";
|
|
18
|
+
import "./chunk-G35HNL6P.mjs";
|
|
19
|
+
import "./chunk-AUVEQ3JX.mjs";
|
|
20
20
|
import "./chunk-4QF2K7TM.mjs";
|
|
21
21
|
import "./chunk-DLIRSHV6.mjs";
|
|
22
22
|
import "./chunk-HBL4PM5Q.mjs";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-OSKGEBE7.mjs";
|
|
24
24
|
import "./chunk-WZYKRD7T.mjs";
|
|
25
25
|
import "./chunk-KRD6H754.mjs";
|
|
26
26
|
export {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkYIJS7ET7js = require('./chunk-YIJS7ET7.js');
|
|
17
|
+
require('./chunk-FVA6XLRA.js');
|
|
18
|
+
require('./chunk-SHGBHP6J.js');
|
|
19
|
+
require('./chunk-WTVTCSPY.js');
|
|
20
|
+
require('./chunk-ALJJRZNJ.js');
|
|
21
|
+
require('./chunk-XNYIZMNQ.js');
|
|
22
|
+
require('./chunk-DIAWYWT5.js');
|
|
23
|
+
require('./chunk-3ZGSR6X7.js');
|
|
24
|
+
require('./chunk-OG64RBAC.js');
|
|
25
|
+
require('./chunk-COGTRVWW.js');
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkYIJS7ET7js.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkYIJS7ET7js.authStatusLine; exports.clearPendingClaim = _chunkYIJS7ET7js.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkYIJS7ET7js.clearSatisfiedPendingClaim; exports.handleRegister = _chunkYIJS7ET7js.handleRegister; exports.handleStatus = _chunkYIJS7ET7js.handleStatus; exports.handleWait = _chunkYIJS7ET7js.handleWait; exports.httpJson = _chunkYIJS7ET7js.httpJson; exports.readPendingAuthClaim = _chunkYIJS7ET7js.readPendingAuthClaim; exports.readStatusBanner = _chunkYIJS7ET7js.readStatusBanner; exports.registerAuthCommands = _chunkYIJS7ET7js.registerAuthCommands; exports.reportSetupCompleted = _chunkYIJS7ET7js.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkYIJS7ET7js.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkYIJS7ET7js.statusBannerLine;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KUCUHRLC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
iterateCursorPages,
|
|
6
6
|
requireBillingIdempotencyKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HTXQUA3V.mjs";
|
|
8
8
|
import "./chunk-L2VKAASU.mjs";
|
|
9
9
|
import "./chunk-FAG4DFUC.mjs";
|
|
10
10
|
import "./chunk-S3A4IXBQ.mjs";
|
|
@@ -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-RH6DVPGW.mjs";
|
|
19
|
+
import "./chunk-G35HNL6P.mjs";
|
|
20
|
+
import "./chunk-AUVEQ3JX.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-OSKGEBE7.mjs";
|
|
30
30
|
import "./chunk-WZYKRD7T.mjs";
|
|
31
31
|
import "./chunk-KRD6H754.mjs";
|
|
32
32
|
|
|
@@ -1223,6 +1223,38 @@ async function handleTargetStatus(options) {
|
|
|
1223
1223
|
function formatAllowanceAmount(value) {
|
|
1224
1224
|
return Number(value.toFixed(2)).toLocaleString("en-US");
|
|
1225
1225
|
}
|
|
1226
|
+
function formatComputeMinutes(minutes) {
|
|
1227
|
+
return minutes < 120 ? `${Number(minutes.toFixed(1)).toLocaleString("en-US")} minutes` : `${Number((minutes / 60).toFixed(1)).toLocaleString("en-US")} hours`;
|
|
1228
|
+
}
|
|
1229
|
+
async function handleIncludedCompute(options) {
|
|
1230
|
+
const client = new DeeplineClient();
|
|
1231
|
+
const payload = options.enable ? await client.billing.enableIncludedCompute() : await client.billing.includedCompute();
|
|
1232
|
+
const plan = `${formatComputeMinutes(payload.plan.included_minutes)} included per month, then ${Math.round(payload.plan.credits_per_minute * 60)} credits/hour`;
|
|
1233
|
+
printCommandEnvelope(
|
|
1234
|
+
{
|
|
1235
|
+
ok: true,
|
|
1236
|
+
...payload,
|
|
1237
|
+
render: {
|
|
1238
|
+
sections: [
|
|
1239
|
+
{
|
|
1240
|
+
title: "billing compute",
|
|
1241
|
+
lines: payload.status === "on" ? [
|
|
1242
|
+
`Included compute: on, ${formatComputeMinutes(payload.included_minutes)} per month, then ${Math.round((payload.credits_per_minute ?? 0) * 60)} credits/hour`,
|
|
1243
|
+
`Used: ${formatComputeMinutes(payload.included_minutes_used)} included, ${formatComputeMinutes(payload.minutes_used)} total since ${payload.period_start_at.slice(0, 10)}`
|
|
1244
|
+
] : payload.status === "off" ? [
|
|
1245
|
+
"Included compute: off; Play compute is billed at provider cost.",
|
|
1246
|
+
`Used: ${formatComputeMinutes(payload.minutes_used)} since ${payload.period_start_at.slice(0, 10)}`,
|
|
1247
|
+
`Turning it on gives ${plan}. Run deepline billing compute --enable; it cannot be turned off again.`
|
|
1248
|
+
] : [
|
|
1249
|
+
"Included compute is not available for this workspace yet."
|
|
1250
|
+
]
|
|
1251
|
+
}
|
|
1252
|
+
]
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
{ json: options.json }
|
|
1256
|
+
);
|
|
1257
|
+
}
|
|
1226
1258
|
async function handleEntitlements(options) {
|
|
1227
1259
|
const payload = await new DeeplineClient().billing.entitlements();
|
|
1228
1260
|
printCommandEnvelope(
|
|
@@ -1777,6 +1809,12 @@ Examples:
|
|
|
1777
1809
|
billing.command("entitlements").description(
|
|
1778
1810
|
"Show workspace benefits, remaining people search profiles, and effective rate limits."
|
|
1779
1811
|
).option("--json", "Emit JSON output").action(handleEntitlements);
|
|
1812
|
+
billing.command("compute").description(
|
|
1813
|
+
"Show Play compute pricing and minutes used; --enable turns on included compute."
|
|
1814
|
+
).option(
|
|
1815
|
+
"--enable",
|
|
1816
|
+
"Turn on included compute for this workspace (cannot be undone)"
|
|
1817
|
+
).option("--json", "Emit JSON output").action(handleIncludedCompute);
|
|
1780
1818
|
billing.command("auto-recharge").description("Inspect and manage automatic Deepline credit recharge.").addHelpText(
|
|
1781
1819
|
"after",
|
|
1782
1820
|
`
|