deepline 0.3.476 → 0.3.478
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 -4
- package/dist/bundling-sources/sdk/src/http-core.ts +84 -3
- package/dist/bundling-sources/sdk/src/http.ts +2 -0
- package/dist/bundling-sources/sdk/src/play.ts +8 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +10 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +77 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +11 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +77 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +83 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +215 -22
- package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +42 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +13 -12
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +5 -2
- package/dist/bundling-sources/shared_libs/plays/sandbox-runtime-limits.ts +37 -12
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +1 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +29 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +15 -0
- package/dist/cli/{auth-A22724UX.mjs → auth-SA4DJCSO.mjs} +5 -5
- package/dist/cli/auth-U5SNVC5F.js +41 -0
- package/dist/cli/{billing-T5Q6OO6M.js → billing-462SAHWX.js} +107 -87
- package/dist/cli/{billing-IIBEZ6J7.mjs → billing-Z4D35MV5.mjs} +34 -14
- package/dist/cli/{chunk-NPNQCPFP.mjs → chunk-2FTUPGTN.mjs} +2 -2
- package/dist/cli/{chunk-2WEPQSA2.mjs → chunk-2JS5DNVX.mjs} +5 -5
- package/dist/cli/{chunk-L45IECBZ.js → chunk-2MSKG4ER.js} +7 -6
- package/dist/cli/{chunk-JU2KBLOR.mjs → chunk-3LTLQAU4.mjs} +4 -4
- package/dist/cli/{chunk-ZV4OWYLZ.mjs → chunk-3V7INABZ.mjs} +2 -2
- package/dist/cli/{chunk-VPAVNEDQ.mjs → chunk-4C3TMIF3.mjs} +4 -4
- package/dist/cli/{chunk-H3GOAZHV.mjs → chunk-4RJRGQ5Y.mjs} +2 -2
- package/dist/cli/{chunk-AS3VECCY.js → chunk-4RV7U3RP.js} +7 -7
- package/dist/cli/{chunk-UHTJWDYB.mjs → chunk-645RNF2Y.mjs} +1 -1
- package/dist/cli/{chunk-TEJSRJNH.js → chunk-6EEMW7YP.js} +8 -8
- package/dist/cli/{chunk-ZOXV6WFI.mjs → chunk-75DAGCEX.mjs} +1 -1
- package/dist/cli/{chunk-NTJDZURV.mjs → chunk-7HTWT3Z4.mjs} +2 -2
- package/dist/cli/chunk-7I4B6V2S.mjs +127 -0
- package/dist/cli/{chunk-MZSLFWOT.js → chunk-7UFFWPQ2.js} +13 -9
- package/dist/cli/{chunk-5FBCMLJW.js → chunk-A5LPDB6N.js} +6 -6
- package/dist/cli/{chunk-4YWYLHED.mjs → chunk-ABBP5ZCI.mjs} +3 -3
- package/dist/cli/{chunk-IC3BZJR7.js → chunk-AQYSZYNE.js} +8 -8
- package/dist/cli/{chunk-WTPRRKZA.js → chunk-AYW242XF.js} +37 -37
- package/dist/cli/{chunk-CFSCHLNQ.mjs → chunk-BLAZVZVD.mjs} +23 -5
- package/dist/cli/{chunk-KGLIDLJ2.js → chunk-D2LKEQKI.js} +5 -5
- package/dist/cli/{chunk-4WMIMSSI.mjs → chunk-F2SJYUBW.mjs} +5 -5
- package/dist/cli/{chunk-KCP6XNRR.mjs → chunk-F44O4PEP.mjs} +1 -1
- package/dist/cli/{chunk-EBWYNNTJ.js → chunk-HMUBLAT4.js} +5 -5
- package/dist/cli/{chunk-UYA7LJGC.mjs → chunk-IL5AF6AR.mjs} +4 -2
- package/dist/cli/{chunk-B7PEXXRW.js → chunk-IWYWZXCA.js} +53 -53
- package/dist/cli/{chunk-PGNLD6L6.js → chunk-J3ZYRN5L.js} +10 -10
- package/dist/cli/{chunk-VKBZLV2K.mjs → chunk-JH775FF6.mjs} +1 -1
- package/dist/cli/{chunk-5AEEINTU.js → chunk-KBBZXWXF.js} +63 -11
- package/dist/cli/{chunk-FVPT44IJ.mjs → chunk-M5USVQ33.mjs} +55 -3
- package/dist/cli/{chunk-2YHDNHRR.mjs → chunk-N573OK4W.mjs} +4 -4
- package/dist/cli/{chunk-WFVEMDQL.js → chunk-OKAZHDYN.js} +4 -2
- package/dist/cli/{chunk-J4FCTFQS.mjs → chunk-PHBOI24Y.mjs} +10 -10
- package/dist/cli/{chunk-D7EQ4PI5.mjs → chunk-PLJV6SX4.mjs} +1 -1
- package/dist/cli/{chunk-YQOWMQEW.mjs → chunk-PPHHPAQV.mjs} +1 -1
- package/dist/cli/{chunk-CBVCCXIY.js → chunk-PZHRNSMU.js} +21 -21
- package/dist/cli/{chunk-LJFIUT5R.mjs → chunk-QB3Q73LP.mjs} +2 -2
- package/dist/cli/{chunk-ULKGYVYP.js → chunk-QVZNUQAP.js} +2 -2
- package/dist/cli/{chunk-A6BETJ2A.js → chunk-S3BKOCVB.js} +1 -1
- package/dist/cli/{chunk-F5PYBZ2H.mjs → chunk-S7UEKKOX.mjs} +2 -1
- package/dist/cli/{chunk-W3BHZUPL.js → chunk-SCHE5QRN.js} +3 -3
- package/dist/cli/{chunk-YEJDFZJP.js → chunk-SXY4DOVA.js} +16 -16
- package/dist/cli/{chunk-LZCYDU6Q.mjs → chunk-TLF3KGWG.mjs} +2 -2
- package/dist/cli/{chunk-5PYSYW63.js → chunk-TQWI7LJX.js} +26 -26
- package/dist/cli/{chunk-7HAUVMRF.js → chunk-TW3TTKW5.js} +3 -3
- package/dist/cli/{chunk-FK7SBMSZ.js → chunk-UXQVSDFP.js} +3 -3
- package/dist/cli/{chunk-HSANVBVL.js → chunk-V7I65ME7.js} +2 -2
- package/dist/cli/{chunk-6YZYCKWD.js → chunk-VE25VUTE.js} +70 -52
- package/dist/cli/{chunk-VLYUFZUT.js → chunk-XFY3JOP2.js} +9 -9
- package/dist/cli/{chunk-MYYOCJZ2.js → chunk-XOORR6P3.js} +93 -93
- package/dist/cli/chunk-YGCKMI5P.js +127 -0
- package/dist/cli/{chunk-3A7TDUZV.mjs → chunk-ZBSUXXZS.mjs} +13 -9
- package/dist/cli/{chunk-NREO7TT4.mjs → chunk-ZSU3C4ST.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-GPVCETS2.mjs → csv-3SNWBO5F.mjs} +4 -4
- package/dist/cli/{csv-FXOQ2PBE.js → csv-LAYTDYIF.js} +13 -13
- package/dist/cli/{db-F5UJTBGP.mjs → db-72JKGQSK.mjs} +6 -6
- package/dist/cli/{db-LXYV4GPZ.js → db-OOUOSURL.js} +27 -27
- package/dist/cli/describe-7HYV44MO.js +48 -0
- package/dist/cli/{describe-GYWCI7I6.mjs → describe-KDPNOEUJ.mjs} +17 -17
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-6NL2YW76.mjs → executions-O6JS3UKX.mjs} +6 -6
- package/dist/cli/{executions-6SJKTY2L.js → executions-RJNMGJEE.js} +8 -8
- package/dist/cli/{feedback-E3HULSQD.js → feedback-FXB6NV3Y.js} +8 -8
- package/dist/cli/{feedback-7AMQCNTB.mjs → feedback-T3JH3CWC.mjs} +4 -4
- package/dist/cli/git-5LTKPXGN.js +25 -0
- package/dist/cli/{git-74IS2EFH.mjs → git-6KAQSH5J.mjs} +5 -5
- package/dist/cli/index.js +161 -142
- package/dist/cli/index.mjs +65 -46
- package/dist/cli/{legacy-noops-52FFRTRZ.mjs → legacy-noops-7HDGEGTK.mjs} +5 -5
- package/dist/cli/{legacy-noops-ALWUQPKS.js → legacy-noops-PAOGRKUK.js} +8 -8
- package/dist/cli/{monitors-Z4ADOGTY.js → monitors-KQFI7TVJ.js} +91 -91
- package/dist/cli/{monitors-VTJIWWW2.mjs → monitors-LE2AYK3Z.mjs} +7 -7
- package/dist/cli/{org-2BTEKDF5.js → org-J6XFHDJE.js} +72 -72
- package/dist/cli/{org-7GU6H7JL.mjs → org-Z4DMJ72I.mjs} +6 -6
- package/dist/cli/{pages-I6PFQGEU.mjs → pages-5LYS6Y4I.mjs} +6 -6
- package/dist/cli/{pages-MG36E7RY.js → pages-FIXBZQJG.js} +17 -17
- package/dist/cli/{play-VN52S3RV.js → play-D7WPXADH.js} +604 -680
- package/dist/cli/{play-7KFSLJX2.mjs → play-GILXXIN7.mjs} +45 -121
- package/dist/cli/{providers-W5XLII66.js → providers-KN7YACT6.js} +9 -9
- package/dist/cli/{providers-D46JDEL2.mjs → providers-OQWL4Q4W.mjs} +6 -6
- package/dist/cli/{quickstart-4GTXBZHY.mjs → quickstart-2LRIORFM.mjs} +4 -4
- package/dist/cli/{quickstart-TIZAC63S.js → quickstart-M2OBP3W3.js} +6 -6
- package/dist/cli/{run-FOVEMYYX.js → run-6YZZO7VM.js} +36 -36
- package/dist/cli/{run-LE3D4LVU.mjs → run-GYRBKQZT.mjs} +22 -22
- package/dist/cli/search-OVKWA4AV.js +32 -0
- package/dist/cli/{search-6YL6WJMQ.mjs → search-VUPK6BNU.mjs} +7 -7
- package/dist/cli/{secrets-CSTTTMZH.js → secrets-RE3UMZB7.js} +15 -15
- package/dist/cli/{secrets-D66U6RTT.mjs → secrets-ULRGU7NM.mjs} +6 -6
- package/dist/cli/{sessions-XIO3OUER.mjs → sessions-2ZZVJ3P2.mjs} +5 -5
- package/dist/cli/{sessions-45M2NRAA.js → sessions-T4UMHNDW.js} +6 -6
- package/dist/cli/{settings-N42CVKSK.js → settings-BRV6AYFM.js} +78 -78
- package/dist/cli/{settings-R33X2D5T.mjs → settings-PDY4TJU6.mjs} +11 -11
- package/dist/cli/{setup-CBBC4FQP.mjs → setup-CXL6C5Z5.mjs} +9 -9
- package/dist/cli/{setup-HREDVNF2.js → setup-JONYJYBK.js} +44 -44
- package/dist/cli/{skills-4X6WS2PT.mjs → skills-TOMVQD5O.mjs} +7 -7
- package/dist/cli/skills-UK5AK35I.js +33 -0
- package/dist/cli/{tools-YR46YFR2.mjs → tools-B2LJK4MM.mjs} +16 -16
- package/dist/cli/tools-HH6E5G7J.js +55 -0
- package/dist/cli/{update-5CYAZX5X.mjs → update-CD6T2REC.mjs} +9 -9
- package/dist/cli/update-EGXT3EIJ.js +33 -0
- package/dist/cli/{workflow-M7AA722W.js → workflow-PZML43E2.js} +17 -17
- package/dist/cli/{workflow-NKQ3CWPK.mjs → workflow-ZAOBP6I7.mjs} +7 -7
- package/dist/{client-AjmfA5nR.d.mts → client-B1s1yJdT.d.mts} +1 -1
- package/dist/{client-DMyY-QL8.d.ts → client-DqUseRzd.d.ts} +1 -1
- package/dist/{client-core-C705vFyV.d.ts → client-core-Bd7tP9Uz.d.ts} +45 -6
- package/dist/{client-core-CpBbvLEX.d.mts → client-core-BijQEQ70.d.mts} +45 -6
- package/dist/{compiler-manifest-hqIAukR0.d.mts → compiler-manifest-B1m5tRzz.d.mts} +23 -17
- package/dist/{compiler-manifest-hqIAukR0.d.ts → compiler-manifest-B1m5tRzz.d.ts} +23 -17
- package/dist/{errors-CRO2qQ6k.d.ts → errors-3g71OMXy.d.ts} +1 -1
- package/dist/{errors-DIHVetNY.d.mts → errors-QiC6am-q.d.mts} +1 -1
- package/dist/{index-DVZ_X4Gb.d.mts → index-Biz5toO4.d.mts} +1 -1
- package/dist/{index-B8DVoeYt.d.ts → index-CIBiwzhK.d.ts} +1 -1
- package/dist/index.d.mts +15 -9
- package/dist/index.d.ts +15 -9
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +112 -110
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -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/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-2ZY57Q7W.js +0 -41
- package/dist/cli/describe-IB7SUIUT.js +0 -48
- package/dist/cli/git-A2QIIMW5.js +0 -25
- package/dist/cli/search-HN6SVDQU.js +0 -32
- package/dist/cli/skills-QZ6HZX2T.js +0 -33
- package/dist/cli/tools-KFIH7UWB.js +0 -55
- package/dist/cli/update-VZLEJLWJ.js +0 -33
|
@@ -3,9 +3,10 @@ export type { BillingEntitlements } from '../integration-contracts/billing-entit
|
|
|
3
3
|
import { Type, type Static, type TSchema } from '@sinclair/typebox';
|
|
4
4
|
import { Value } from '@sinclair/typebox/value';
|
|
5
5
|
import type { PreviousCell } from './cell-staleness';
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import {
|
|
7
|
+
PLAY_SANDBOX_SIZE_INPUTS,
|
|
8
|
+
type PlaySandboxRuntimeLimits,
|
|
9
|
+
type PlaySandboxSizeInput,
|
|
9
10
|
} from './sandbox-runtime-limits';
|
|
10
11
|
import type {
|
|
11
12
|
BasicToolExecuteResult,
|
|
@@ -867,7 +868,7 @@ export type PlayAuthoringBindings<TInput = Record<string, unknown>> = {
|
|
|
867
868
|
*/
|
|
868
869
|
runtime?: {
|
|
869
870
|
timeout?: string;
|
|
870
|
-
size?:
|
|
871
|
+
size?: PlaySandboxSizeInput;
|
|
871
872
|
};
|
|
872
873
|
/**
|
|
873
874
|
* Start at most one run of this Play per window, whatever started it.
|
|
@@ -2971,11 +2972,9 @@ export const PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
2971
2972
|
'rateLimit.every must be a static duration from "10s" to "24h", such as "5m".',
|
|
2972
2973
|
},
|
|
2973
2974
|
'runtime.size': {
|
|
2974
|
-
schema: Type.Union(
|
|
2975
|
-
Type.Literal(
|
|
2976
|
-
|
|
2977
|
-
Type.Literal('xlarge'),
|
|
2978
|
-
]),
|
|
2975
|
+
schema: Type.Union(
|
|
2976
|
+
PLAY_SANDBOX_SIZE_INPUTS.map((size) => Type.Literal(size)),
|
|
2977
|
+
),
|
|
2979
2978
|
fixtures: {
|
|
2980
2979
|
valid: 'large',
|
|
2981
2980
|
invalid: 'xxlarge',
|
|
@@ -2983,14 +2982,16 @@ export const PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
2983
2982
|
unresolved: { expression: 'size' },
|
|
2984
2983
|
edition1: 'standard',
|
|
2985
2984
|
},
|
|
2986
|
-
referenceType:
|
|
2985
|
+
referenceType: PLAY_SANDBOX_SIZE_INPUTS.map((size) => `'${size}'`).join(
|
|
2986
|
+
' | ',
|
|
2987
|
+
),
|
|
2987
2988
|
required: false,
|
|
2988
2989
|
resolution: 'static-required',
|
|
2989
2990
|
issueCode: 'play_authoring_binding_invalid',
|
|
2990
2991
|
description:
|
|
2991
|
-
'Deepline-managed sandbox size: standard (1 GiB memory, 1 CPU), large (4 GiB, 2 CPU), or xlarge (8 GiB, 4 CPU). Standard is the default.
|
|
2992
|
+
'Deepline-managed sandbox size: standard or 1gb (1 GiB memory, 1 CPU), large or 4gb (4 GiB, 2 CPU), or xlarge or 8gb (8 GiB, 4 CPU). Standard is the default. Each alias selects the same resource profile and compute price as its named size.',
|
|
2992
2993
|
errorMessage:
|
|
2993
|
-
'runtime.size must be the static literal "standard", "large", or "
|
|
2994
|
+
'runtime.size must be the static literal "standard", "large", "xlarge", "1gb", "4gb", or "8gb".',
|
|
2994
2995
|
},
|
|
2995
2996
|
'ctx.customerDb.query.statement': {
|
|
2996
2997
|
schema: Type.Union([
|
|
@@ -57,7 +57,10 @@ export {
|
|
|
57
57
|
type DocflowSymbolResolution,
|
|
58
58
|
} from '../docflow-binding';
|
|
59
59
|
import type { ToolExecutionErrorSchemaVersion } from '../tool-execution-error';
|
|
60
|
-
import
|
|
60
|
+
import {
|
|
61
|
+
SUPPORTED_PLAY_SANDBOX_SIZES,
|
|
62
|
+
type PlaySandboxRuntimeDeclaration,
|
|
63
|
+
} from '../sandbox-runtime-limits';
|
|
61
64
|
import { validatePlaySourceFilesHaveNoInlineSecrets } from '../secret-guardrails';
|
|
62
65
|
import { MAX_PLAY_BUNDLE_BYTES } from './limits';
|
|
63
66
|
import {
|
|
@@ -1125,7 +1128,7 @@ function sandboxRuntimeDeclarationFromOptions(
|
|
|
1125
1128
|
if (unsupportedProperties.length > 0) {
|
|
1126
1129
|
throw new Error(
|
|
1127
1130
|
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? '' : 's'} "${unsupportedProperties.join('", "')}". ` +
|
|
1128
|
-
|
|
1131
|
+
`Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`,
|
|
1129
1132
|
);
|
|
1130
1133
|
}
|
|
1131
1134
|
const timeout = resolveStaticProperty(runtime.value, 'timeout', context);
|
|
@@ -28,6 +28,23 @@ export const PLAY_SANDBOX_SIZE_LIMITS = {
|
|
|
28
28
|
Omit<PlaySandboxRuntimeLimits, 'timeoutSeconds'>
|
|
29
29
|
>;
|
|
30
30
|
|
|
31
|
+
export const PLAY_SANDBOX_SIZE_ALIASES = {
|
|
32
|
+
'1gb': 'standard',
|
|
33
|
+
'4gb': 'large',
|
|
34
|
+
'8gb': 'xlarge',
|
|
35
|
+
} as const satisfies Record<string, PlaySandboxSize>;
|
|
36
|
+
|
|
37
|
+
export type PlaySandboxSizeInput =
|
|
38
|
+
| PlaySandboxSize
|
|
39
|
+
| keyof typeof PLAY_SANDBOX_SIZE_ALIASES;
|
|
40
|
+
|
|
41
|
+
export const PLAY_SANDBOX_SIZE_INPUTS: readonly PlaySandboxSizeInput[] = [
|
|
42
|
+
...(Object.keys(PLAY_SANDBOX_SIZE_LIMITS) as PlaySandboxSize[]),
|
|
43
|
+
...(Object.keys(
|
|
44
|
+
PLAY_SANDBOX_SIZE_ALIASES,
|
|
45
|
+
) as (keyof typeof PLAY_SANDBOX_SIZE_ALIASES)[]),
|
|
46
|
+
];
|
|
47
|
+
|
|
31
48
|
export const STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS: PlaySandboxRuntimeLimits = {
|
|
32
49
|
timeoutSeconds: 30 * 60,
|
|
33
50
|
...PLAY_SANDBOX_SIZE_LIMITS.standard,
|
|
@@ -77,15 +94,23 @@ export function playSandboxSizeForLimits(
|
|
|
77
94
|
);
|
|
78
95
|
}
|
|
79
96
|
|
|
80
|
-
const
|
|
81
|
-
', ',
|
|
82
|
-
);
|
|
97
|
+
export const SUPPORTED_PLAY_SANDBOX_SIZES = PLAY_SANDBOX_SIZE_INPUTS.join(', ');
|
|
83
98
|
|
|
84
99
|
export type PlaySandboxRuntimeDeclaration = {
|
|
85
100
|
timeout?: string;
|
|
86
|
-
size?:
|
|
101
|
+
size?: PlaySandboxSizeInput;
|
|
87
102
|
};
|
|
88
103
|
|
|
104
|
+
function normalizePlaySandboxSize(value: unknown): PlaySandboxSize | null {
|
|
105
|
+
if (typeof value !== 'string') return null;
|
|
106
|
+
if (Object.hasOwn(PLAY_SANDBOX_SIZE_LIMITS, value)) {
|
|
107
|
+
return value as PlaySandboxSize;
|
|
108
|
+
}
|
|
109
|
+
return Object.hasOwn(PLAY_SANDBOX_SIZE_ALIASES, value)
|
|
110
|
+
? PLAY_SANDBOX_SIZE_ALIASES[value as keyof typeof PLAY_SANDBOX_SIZE_ALIASES]
|
|
111
|
+
: null;
|
|
112
|
+
}
|
|
113
|
+
|
|
89
114
|
function parseTimeout(value: string): number | null {
|
|
90
115
|
const match = /^(\d+)\s*([mh])$/i.exec(value.trim());
|
|
91
116
|
if (!match) return null;
|
|
@@ -100,7 +125,7 @@ export function validatePlaySandboxRuntimeLimits(
|
|
|
100
125
|
if (!playSandboxSizeForLimits(value)) {
|
|
101
126
|
throw new Error(
|
|
102
127
|
`Unsupported runtime sandbox resources: cpu=${value.cpu} memoryGiB=${value.memoryGiB} diskGiB=${value.diskGiB}. ` +
|
|
103
|
-
`Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${
|
|
128
|
+
`Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`,
|
|
104
129
|
);
|
|
105
130
|
}
|
|
106
131
|
if (
|
|
@@ -130,15 +155,16 @@ export function resolvePlaySandboxRuntimeLimits(
|
|
|
130
155
|
if (unsupportedProperties.length > 0) {
|
|
131
156
|
throw new Error(
|
|
132
157
|
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? '' : 's'}: ${unsupportedProperties.join(', ')}. ` +
|
|
133
|
-
`Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${
|
|
158
|
+
`Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`,
|
|
134
159
|
);
|
|
135
160
|
}
|
|
136
|
-
|
|
137
|
-
declaration.size
|
|
138
|
-
|
|
139
|
-
|
|
161
|
+
const size =
|
|
162
|
+
declaration.size === undefined
|
|
163
|
+
? 'standard'
|
|
164
|
+
: normalizePlaySandboxSize(declaration.size);
|
|
165
|
+
if (!size) {
|
|
140
166
|
throw new Error(
|
|
141
|
-
`Unsupported runtime sandbox size "${String(declaration.size)}". Supported sizes: ${
|
|
167
|
+
`Unsupported runtime sandbox size "${String(declaration.size)}". Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`,
|
|
142
168
|
);
|
|
143
169
|
}
|
|
144
170
|
const timeoutSeconds = declaration.timeout
|
|
@@ -149,7 +175,6 @@ export function resolvePlaySandboxRuntimeLimits(
|
|
|
149
175
|
'Invalid runtime sandbox timeout. Use timeout like "90m" or "2h".',
|
|
150
176
|
);
|
|
151
177
|
}
|
|
152
|
-
const size = declaration.size ?? 'standard';
|
|
153
178
|
return validatePlaySandboxRuntimeLimits({
|
|
154
179
|
timeoutSeconds,
|
|
155
180
|
...PLAY_SANDBOX_SIZE_LIMITS[size],
|
|
@@ -1035,6 +1035,35 @@ const PRODUCT_NOTIFICATION_TYPE_REGISTRY = [
|
|
|
1035
1035
|
}),
|
|
1036
1036
|
},
|
|
1037
1037
|
},
|
|
1038
|
+
{
|
|
1039
|
+
id: 'internal.billing.allowance_exhausted',
|
|
1040
|
+
eventName: ProductNotificationEvent.BillingAllowanceExhausted,
|
|
1041
|
+
requiredFilter: {},
|
|
1042
|
+
allowedTriggers: ['each_match'],
|
|
1043
|
+
catalog: undefined,
|
|
1044
|
+
shadow: true,
|
|
1045
|
+
rule: {
|
|
1046
|
+
default: {
|
|
1047
|
+
ruleKey: 'internal.billing.allowance_exhausted',
|
|
1048
|
+
groupKey: BILLING_SALES_GROUP_KEY,
|
|
1049
|
+
},
|
|
1050
|
+
create: (_input, base) => ({
|
|
1051
|
+
...base,
|
|
1052
|
+
repeatMode: 'every_match',
|
|
1053
|
+
trigger: { kind: 'each_match' },
|
|
1054
|
+
}),
|
|
1055
|
+
present: ({ payload }) => ({
|
|
1056
|
+
title: `Free allowance reached · ${payload.allowance}`,
|
|
1057
|
+
summary: [{ workspace: true }, ` used its included ${payload.limit}.`],
|
|
1058
|
+
details: [
|
|
1059
|
+
`Allowance period ends ${new Date(Number(payload.resetsAt)).toISOString()} (UTC).`,
|
|
1060
|
+
],
|
|
1061
|
+
targetUrl: String(payload.targetUrl),
|
|
1062
|
+
subjectKind: 'workspace',
|
|
1063
|
+
subjectId: String(payload.accountId),
|
|
1064
|
+
}),
|
|
1065
|
+
},
|
|
1066
|
+
},
|
|
1038
1067
|
lateCreditDeliveryRegistration(
|
|
1039
1068
|
BILLING_PURCHASE_LATE_RULE_KEY,
|
|
1040
1069
|
ProductNotificationEvent.BillingPurchaseLate,
|
|
@@ -33,6 +33,7 @@ export const ProductNotificationEvent = {
|
|
|
33
33
|
BillingPurchaseLate: 'billing.purchase.late',
|
|
34
34
|
BillingRenewalLate: 'billing.renewal.late',
|
|
35
35
|
BillingUsageChargeObserved: 'billing.usage.charge_observed',
|
|
36
|
+
BillingAllowanceExhausted: 'billing.allowance.exhausted',
|
|
36
37
|
MonitorLifecycleChanged: 'monitor.lifecycle.changed',
|
|
37
38
|
PlayLifecycleChanged: 'play.lifecycle.changed',
|
|
38
39
|
PlayRunCompleted: 'play.run.completed',
|
|
@@ -78,6 +79,7 @@ export const PRODUCT_NOTIFICATION_EVENT_NAMES = [
|
|
|
78
79
|
ProductNotificationEvent.BillingPurchaseLate,
|
|
79
80
|
ProductNotificationEvent.BillingRenewalLate,
|
|
80
81
|
ProductNotificationEvent.BillingUsageChargeObserved,
|
|
82
|
+
ProductNotificationEvent.BillingAllowanceExhausted,
|
|
81
83
|
] as const;
|
|
82
84
|
|
|
83
85
|
export const PRODUCT_NOTIFICATION_COMPATIBILITY_EVENT_NAMES = [
|
|
@@ -283,6 +285,19 @@ export const PRODUCT_NOTIFICATION_EVENT_DEFINITIONS: readonly ProductNotificatio
|
|
|
283
285
|
orderingSubjectFact: 'chargeId',
|
|
284
286
|
allowedTriggers: ['each_match'],
|
|
285
287
|
},
|
|
288
|
+
{
|
|
289
|
+
eventName: ProductNotificationEvent.BillingAllowanceExhausted,
|
|
290
|
+
producerKey: ProductNotificationProducerKey.BillingUsage,
|
|
291
|
+
requiredFacts: {
|
|
292
|
+
accountId: 'string',
|
|
293
|
+
allowance: 'string',
|
|
294
|
+
limit: 'string',
|
|
295
|
+
resetsAt: 'number',
|
|
296
|
+
targetUrl: 'string',
|
|
297
|
+
},
|
|
298
|
+
orderingSubjectFact: 'accountId',
|
|
299
|
+
allowedTriggers: ['each_match'],
|
|
300
|
+
},
|
|
286
301
|
{
|
|
287
302
|
eventName: ProductNotificationEvent.BillingRenewalLate,
|
|
288
303
|
producerKey: ProductNotificationProducerKey.BillingPurchases,
|
|
@@ -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-BLAZVZVD.mjs";
|
|
17
|
+
import "./chunk-7HTWT3Z4.mjs";
|
|
18
|
+
import "./chunk-75DAGCEX.mjs";
|
|
19
|
+
import "./chunk-M5USVQ33.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-645RNF2Y.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 _chunkVE25VUTEjs = require('./chunk-VE25VUTE.js');
|
|
17
|
+
require('./chunk-4RV7U3RP.js');
|
|
18
|
+
require('./chunk-TW3TTKW5.js');
|
|
19
|
+
require('./chunk-KBBZXWXF.js');
|
|
20
|
+
require('./chunk-ALJJRZNJ.js');
|
|
21
|
+
require('./chunk-XNYIZMNQ.js');
|
|
22
|
+
require('./chunk-DIAWYWT5.js');
|
|
23
|
+
require('./chunk-S3BKOCVB.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 = _chunkVE25VUTEjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkVE25VUTEjs.authStatusLine; exports.clearPendingClaim = _chunkVE25VUTEjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkVE25VUTEjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkVE25VUTEjs.handleRegister; exports.handleStatus = _chunkVE25VUTEjs.handleStatus; exports.handleWait = _chunkVE25VUTEjs.handleWait; exports.httpJson = _chunkVE25VUTEjs.httpJson; exports.readPendingAuthClaim = _chunkVE25VUTEjs.readPendingAuthClaim; exports.readStatusBanner = _chunkVE25VUTEjs.readStatusBanner; exports.registerAuthCommands = _chunkVE25VUTEjs.registerAuthCommands; exports.reportSetupCompleted = _chunkVE25VUTEjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkVE25VUTEjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkVE25VUTEjs.statusBannerLine;
|