deepline 0.3.538 → 0.3.540
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/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +8 -4
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +8 -1
- package/dist/bundling-sources/shared_libs/play-runtime/baked-runner-image.ts +66 -4
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +0 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +14 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +136 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-execution-queries.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +20 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +30 -11
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -1
- package/dist/cli/{auth-KYH7N7RQ.mjs → auth-32TURPHH.mjs} +5 -5
- package/dist/cli/auth-XA3K5LH2.js +43 -0
- package/dist/cli/{billing-4KTUVZ4S.js → billing-6433M4BX.js} +105 -94
- package/dist/cli/{billing-WK346KAI.mjs → billing-NSH3NOHV.mjs} +21 -10
- package/dist/cli/{chunk-KCUQNH4K.js → chunk-2U4VACUA.js} +2 -2
- package/dist/cli/{chunk-6JG3MRTM.mjs → chunk-37VFUQMU.mjs} +2 -2
- package/dist/cli/chunk-3GVIVIER.js +54 -0
- package/dist/cli/{chunk-M3NCXGNN.mjs → chunk-AB6DFHGL.mjs} +2 -2
- package/dist/cli/{chunk-LPTBHNGB.js → chunk-AJVK4XC5.js} +4 -4
- package/dist/cli/{chunk-B2BTBHX2.js → chunk-AOYW62XO.js} +3 -3
- package/dist/cli/{chunk-UE7JHAZ2.mjs → chunk-B6UZUQ2O.mjs} +1 -1
- package/dist/cli/{chunk-JTOV5RUA.mjs → chunk-BD3VAPB4.mjs} +1 -1
- package/dist/cli/{chunk-ESX3H7Q7.js → chunk-BGBRA2S6.js} +22 -22
- package/dist/cli/{chunk-25RGHJQL.js → chunk-BNNGM2E5.js} +15 -15
- package/dist/cli/{chunk-VCHV4LS3.mjs → chunk-BZVVSUE2.mjs} +1 -1
- package/dist/cli/{chunk-YQURGSRB.js → chunk-DV3ESQ4X.js} +1 -1
- package/dist/cli/{chunk-ICTA5ICE.mjs → chunk-DWE2VE5I.mjs} +1 -1
- package/dist/cli/{chunk-34PLG5OE.js → chunk-EXAXDEIF.js} +13 -13
- package/dist/cli/chunk-FANIRW74.mjs +9 -0
- package/dist/cli/{chunk-JPEBKN3K.mjs → chunk-FR3AII3W.mjs} +2 -2
- package/dist/cli/chunk-GWHA4DAC.js +9 -0
- package/dist/cli/{chunk-VIFLWQXS.js → chunk-H6IA6XRE.js} +2 -2
- package/dist/cli/{chunk-JCLRSMUP.js → chunk-HKWJD45V.js} +5 -5
- package/dist/cli/{chunk-7XDJKIM2.mjs → chunk-HLHDCFKL.mjs} +4 -4
- package/dist/cli/{chunk-E7D37PLM.mjs → chunk-IDDKNMFX.mjs} +36 -0
- package/dist/cli/{chunk-35OCRH5C.mjs → chunk-IYQZVEV4.mjs} +5 -5
- package/dist/cli/{chunk-6SLQLWWL.js → chunk-J3TAEPFA.js} +26 -26
- package/dist/cli/{chunk-FJ5KPGCS.mjs → chunk-JGFGWWOF.mjs} +10 -10
- package/dist/cli/{chunk-4NEOGPKD.mjs → chunk-JPU5YLQG.mjs} +1 -1
- package/dist/cli/{chunk-4KZF6OYY.mjs → chunk-KFAJYK2N.mjs} +3 -3
- package/dist/cli/chunk-KN6ELDPL.mjs +54 -0
- package/dist/cli/{chunk-UEZNIPFO.js → chunk-LPMI4CYW.js} +107 -107
- package/dist/cli/{chunk-BBS2BLPV.js → chunk-LXLCQP4A.js} +16 -16
- package/dist/cli/{chunk-MYSPQUAO.js → chunk-M4DB6BBP.js} +44 -44
- package/dist/cli/{chunk-ZDLDCXY3.mjs → chunk-MH22LQKZ.mjs} +2 -2
- package/dist/cli/{chunk-OOLBE6FR.js → chunk-MLDLN6WG.js} +53 -53
- package/dist/cli/{chunk-IMLFB66A.js → chunk-MVIVF4BW.js} +3 -3
- package/dist/cli/{chunk-MNBIGX6O.js → chunk-N6DMKVKO.js} +10 -10
- package/dist/cli/{chunk-TWWYCJJW.mjs → chunk-PJOMRUFP.mjs} +5 -5
- package/dist/cli/{chunk-KNIYEZVV.mjs → chunk-S3ULSGFH.mjs} +2 -2
- package/dist/cli/{chunk-FWE37N2P.mjs → chunk-SGMDRYAD.mjs} +1 -1
- package/dist/cli/{chunk-ZU6JBRV5.mjs → chunk-SINNEITW.mjs} +4 -4
- package/dist/cli/{chunk-ALARRSMZ.mjs → chunk-SXVYFOBG.mjs} +3 -3
- package/dist/cli/{chunk-5VSPRRTI.js → chunk-TNUM4DFA.js} +7 -7
- package/dist/cli/{chunk-T6GPTJ5F.mjs → chunk-TZVW5JH3.mjs} +1 -1
- package/dist/cli/{chunk-N5HSG4OV.js → chunk-UJYX4VLX.js} +5 -5
- package/dist/cli/{chunk-XTYHZEJ2.js → chunk-V4EYJKGJ.js} +36 -0
- package/dist/cli/{chunk-PQKD5DMT.js → chunk-VAOGM5VS.js} +19 -19
- package/dist/cli/{chunk-A6E7TCK2.mjs → chunk-WCM64BRH.mjs} +5 -5
- package/dist/cli/{chunk-P3DP56HB.js → chunk-WDHHQEWQ.js} +41 -41
- package/dist/cli/{chunk-ADLDU2QG.js → chunk-WHYNYL3M.js} +6 -6
- package/dist/cli/{chunk-3I5TU5XE.js → chunk-XIIQNSWA.js} +8 -8
- package/dist/cli/{chunk-YZ2ZPHWR.js → chunk-XL3CEPZA.js} +9 -9
- package/dist/cli/{chunk-CLO562KG.mjs → chunk-XYM3SQZN.mjs} +1 -1
- package/dist/cli/{chunk-IP3XJTWA.mjs → chunk-Y6647AIY.mjs} +2 -2
- package/dist/cli/{chunk-4WQR4DG4.mjs → chunk-Z2OYTXLK.mjs} +1 -1
- package/dist/cli/{chunk-N2BCPZVR.mjs → chunk-ZJFU2COM.mjs} +5 -5
- package/dist/cli/{chunk-O765M4LT.js → chunk-ZTJQKHLM.js} +2 -2
- package/dist/cli/command-docs.js +3 -2
- package/dist/cli/command-docs.mjs +2 -1
- package/dist/cli/concurrent-runs-help-DU5STFGB.mjs +21 -0
- package/dist/cli/concurrent-runs-help-HIPM5BBV.js +21 -0
- package/dist/cli/{csv-LM7FBECI.js → csv-FBNS6SM3.js} +13 -13
- package/dist/cli/{csv-2YKLUKDR.mjs → csv-OJCMBODT.mjs} +4 -4
- package/dist/cli/{db-234UBWJH.mjs → db-43RQRF64.mjs} +6 -6
- package/dist/cli/{db-5PMA4IVW.js → db-XRGJJ2KA.js} +27 -27
- package/dist/cli/{describe-W26LW5O7.mjs → describe-I42Y3PWR.mjs} +17 -17
- package/dist/cli/describe-LWZCGAXU.js +49 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-3S736GXX.js → executions-LH46O4PG.js} +8 -8
- package/dist/cli/{executions-GD7GXTJM.mjs → executions-QXGVQHQF.mjs} +6 -6
- package/dist/cli/{feedback-GBV5HJJZ.mjs → feedback-ELFINGTM.mjs} +6 -6
- package/dist/cli/{feedback-BUWTDY4R.js → feedback-ERYIV6MT.js} +14 -14
- package/dist/cli/git-OV2TGYVE.js +25 -0
- package/dist/cli/{git-YXJGTDQL.mjs → git-V2XWB6LN.mjs} +5 -5
- package/dist/cli/index.js +153 -143
- package/dist/cli/index.mjs +53 -43
- package/dist/cli/{legacy-noops-UJM6GBNP.mjs → legacy-noops-ULL2EA37.mjs} +6 -6
- package/dist/cli/{legacy-noops-ZSF64V2U.js → legacy-noops-Y3OKNVWH.js} +9 -9
- package/dist/cli/{monitors-XQ2GNH6D.js → monitors-DNQXCRJZ.js} +100 -100
- package/dist/cli/{monitors-UERUQ6CT.mjs → monitors-L34NROM3.mjs} +7 -7
- package/dist/cli/{org-IF6MPVNR.js → org-JETA62CO.js} +86 -86
- package/dist/cli/{org-CP4VLH6M.mjs → org-L3HTEEXL.mjs} +6 -6
- package/dist/cli/{play-2NHQO5MO.js → play-GTGJRNWI.js} +473 -455
- package/dist/cli/{play-ZWDYYVPI.mjs → play-JHGLSSJP.mjs} +35 -17
- package/dist/cli/{providers-LOPXQN56.js → providers-7VH7PH2Q.js} +9 -9
- package/dist/cli/{providers-2CVIATU4.mjs → providers-IQVHZJ27.mjs} +6 -6
- package/dist/cli/{quickstart-N4WDEQZY.js → quickstart-M25JNU3O.js} +6 -6
- package/dist/cli/{quickstart-KVCFXLID.mjs → quickstart-ZDBC45PM.mjs} +4 -4
- package/dist/cli/{run-BDT5LK3I.js → run-MPZGX3YD.js} +42 -42
- package/dist/cli/{run-RUXHYWLF.mjs → run-NEEWZBTX.mjs} +22 -22
- package/dist/cli/search-HUN2YRQE.js +32 -0
- package/dist/cli/{search-BFUTNPA5.mjs → search-YXAFB4QQ.mjs} +7 -7
- package/dist/cli/{search-output-CTXI2QZU.js → search-output-4PH5HSJC.js} +6 -6
- package/dist/cli/{search-output-WUGH4PZA.mjs → search-output-67BBIXIZ.mjs} +4 -4
- package/dist/cli/{secrets-Z4XQVTC6.mjs → secrets-445FER3C.mjs} +6 -6
- package/dist/cli/{secrets-BZJZYFOU.js → secrets-HLUBDN3H.js} +15 -15
- package/dist/cli/{sessions-VZXR3MQZ.mjs → sessions-CCKXJNWT.mjs} +6 -6
- package/dist/cli/sessions-T2RNWC6B.js +22 -0
- package/dist/cli/{settings-VYEZFR4L.mjs → settings-3XCZGGVF.mjs} +12 -12
- package/dist/cli/{settings-WBYA4JMM.js → settings-WXJIQS5J.js} +85 -85
- package/dist/cli/{setup-FS2RMSS2.js → setup-CKETRFFN.js} +49 -49
- package/dist/cli/{setup-H7KCI4SO.mjs → setup-TOSX6NER.mjs} +9 -9
- package/dist/cli/skills-FXM2RHHO.js +36 -0
- package/dist/cli/{skills-YQNSJUUG.mjs → skills-Q7NLCIJJ.mjs} +7 -7
- package/dist/cli/{tools-ZF6SVEGW.mjs → tools-GY6QMYTZ.mjs} +16 -16
- package/dist/cli/tools-XLVDZTWQ.js +56 -0
- package/dist/cli/{update-RKQNNJM4.mjs → update-A7JRUN4S.mjs} +9 -9
- package/dist/cli/update-AZINHILP.js +34 -0
- package/dist/cli/{views-KN7FEDGT.js → views-GUWC4SNI.js} +21 -21
- package/dist/cli/{views-JHHOTWDU.mjs → views-JG7FDEJR.mjs} +6 -6
- package/dist/cli/{workflow-2WHSKTTV.js → workflow-CXNW7ICH.js} +17 -17
- package/dist/cli/{workflow-AAYLCLWA.mjs → workflow-QZCYSQ5G.mjs} +7 -7
- package/dist/{client-DZTnAv4B.d.ts → client-B1fixtK1.d.ts} +1 -1
- package/dist/{client-D0uDBybG.d.mts → client-CE4QBVbp.d.mts} +1 -1
- package/dist/{client-core-BhWf8Y1b.d.mts → client-core-2BkNBgrx.d.mts} +3 -1
- package/dist/{client-core-og3AP1LL.d.ts → client-core-C-3FVlVq.d.ts} +3 -1
- package/dist/{compiler-manifest-Bes3OVA3.d.mts → compiler-manifest-Cys06iYg.d.mts} +14 -0
- package/dist/{compiler-manifest-Bes3OVA3.d.ts → compiler-manifest-Cys06iYg.d.ts} +14 -0
- package/dist/{errors-Dc5r42ks.d.mts → errors-B6eMjKcr.d.mts} +1 -1
- package/dist/{errors-BJm4lLWc.d.ts → errors-rdOUqcU2.d.ts} +1 -1
- package/dist/{index-DTkiz_Ur.d.mts → index-CZdYO81A.d.mts} +1 -1
- package/dist/{index-BfV7mRPF.d.ts → index-ejWadAL5.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +119 -112
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/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-4WEVLYK4.js +0 -43
- package/dist/cli/describe-C7GOSGYB.js +0 -49
- package/dist/cli/git-YG36MROC.js +0 -25
- package/dist/cli/search-ATDDVADT.js +0 -32
- package/dist/cli/sessions-HNU35AFM.js +0 -22
- package/dist/cli/skills-VPIURCAZ.js +0 -36
- package/dist/cli/tools-273GS5HU.js +0 -56
- package/dist/cli/update-TOD3XY55.js +0 -34
|
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
|
|
|
205
205
|
// getters keep their established compatibility behavior.
|
|
206
206
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
207
207
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
208
|
-
version: '0.3.
|
|
208
|
+
version: '0.3.540',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|
|
@@ -59,6 +59,16 @@ export type BillingEntitlements = {
|
|
|
59
59
|
expiresAt?: number;
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* `play.concurrent_runs`: Plays this workspace runs at once. A run over the
|
|
64
|
+
* limit waits and starts when another finishes. Older servers omit it.
|
|
65
|
+
*/
|
|
66
|
+
concurrent_runs?: {
|
|
67
|
+
limit: number;
|
|
68
|
+
source: 'override' | 'plan' | 'default';
|
|
69
|
+
/** Each self-serve plan's limit, in plan order. */
|
|
70
|
+
plans: Array<{ sku: string; name: string; limit: number }>;
|
|
71
|
+
};
|
|
62
72
|
/** Rate provenance is separate from the inclusion flag. */
|
|
63
73
|
effective_limits: {
|
|
64
74
|
quickenrichUnlimited?: {
|
|
@@ -52,6 +52,8 @@ export type PlayActivityTarget =
|
|
|
52
52
|
* observations written before it existed and on other capacity pools.
|
|
53
53
|
*/
|
|
54
54
|
limit?: number;
|
|
55
|
+
/** Whether this limit was pinned at launch or read from workspace policy. */
|
|
56
|
+
limitSource?: 'admission' | 'workspace';
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
export type PlayActivityProgress = {
|
|
@@ -332,11 +334,13 @@ export function sandboxCapacityLimit(
|
|
|
332
334
|
|
|
333
335
|
function sandboxCapacitySummary(target: PlayActivityTarget): string {
|
|
334
336
|
const limit = sandboxCapacityLimit(target);
|
|
335
|
-
const
|
|
337
|
+
const capacity =
|
|
336
338
|
limit === null
|
|
337
|
-
? '
|
|
338
|
-
:
|
|
339
|
-
|
|
339
|
+
? 'workspace concurrency capacity'
|
|
340
|
+
: `workspace concurrency capacity (limit ${limit.toLocaleString('en-US')} simultaneous Play ${limit === 1 ? 'run' : 'runs'})`;
|
|
341
|
+
const pinned =
|
|
342
|
+
target.kind === 'capacity' && target.limitSource === 'admission';
|
|
343
|
+
return `Queued for ${capacity}. This run is waiting for a slot, not executing; scheduling retries automatically. No start time is guaranteed.${pinned ? ' This limit was recorded at admission; a plan change applies to new launches and does not update this run’s recorded limit.' : ''}`;
|
|
340
344
|
}
|
|
341
345
|
|
|
342
346
|
export function summarizePlayActivity(
|
|
@@ -3116,10 +3116,17 @@ export async function applyRowUpdatesViaAppRuntime(
|
|
|
3116
3116
|
? Omit<T & { action: 'apply_row_updates' }, 'action'>
|
|
3117
3117
|
: never,
|
|
3118
3118
|
): Promise<void> {
|
|
3119
|
+
// The receiver reads `contractSnapshot` only to derive a sheet contract when
|
|
3120
|
+
// none is sent. With `sheetContract` present it is dead weight, and a
|
|
3121
|
+
// hydrated pipeline that inlines prebuilt Plays can alone exceed the ingress
|
|
3122
|
+
// budget, failing every checkpoint whatever the row size.
|
|
3123
|
+
const envelope = input.sheetContract
|
|
3124
|
+
? { ...input, contractSnapshot: undefined }
|
|
3125
|
+
: input;
|
|
3119
3126
|
const requestForUpdates = (updates: typeof input.updates) =>
|
|
3120
3127
|
({
|
|
3121
3128
|
action: 'apply_row_updates',
|
|
3122
|
-
...
|
|
3129
|
+
...envelope,
|
|
3123
3130
|
updates,
|
|
3124
3131
|
}) as Extract<RuntimeApiRequest, { action: 'apply_row_updates' }>;
|
|
3125
3132
|
if (input.updates.length === 0) {
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* the launcher upload only the per-run config and Play artifact.
|
|
8
8
|
*
|
|
9
9
|
* Trust model: nothing here is assumed. The launcher only plans a baked run
|
|
10
|
-
* when an operator
|
|
11
|
-
* of the bundle this very launcher would
|
|
10
|
+
* when the expected hash (an operator pin, or in self mode the hash of this
|
|
11
|
+
* worker's own bundle) equals the hash of the bundle this very launcher would
|
|
12
|
+
* otherwise upload, and Modal resolved the image named after it. It verifies,
|
|
12
13
|
* inside the acquired sandbox and before any command that could start the
|
|
13
14
|
* runner, that the file exists and hashes to that value. Any other outcome
|
|
14
15
|
* (unset, stale, absent file, mismatched bytes, probe failure) keeps the
|
|
@@ -18,8 +19,27 @@
|
|
|
18
19
|
import { createHash } from 'node:crypto';
|
|
19
20
|
import { gzipSync } from 'node:zlib';
|
|
20
21
|
|
|
21
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Worker setting. Values:
|
|
24
|
+
* - a 64-hex SHA-256: exact pin (the original operator opt-in, unchanged);
|
|
25
|
+
* - `self`: look up the image named after this worker's own bundle hash;
|
|
26
|
+
* - `off`: disabled, whatever the default below says (the kill switch);
|
|
27
|
+
* - unset: `self` when `BAKED_RUNNER_SELF_VERSIONED` is true, else disabled.
|
|
28
|
+
* Anything else enables nothing.
|
|
29
|
+
*/
|
|
22
30
|
export const BAKED_RUNNER_HASH_ENV = 'DEEPLINE_BAKED_RUNNER_HASH';
|
|
31
|
+
export const BAKED_RUNNER_SELF_MODE = 'self';
|
|
32
|
+
export const BAKED_RUNNER_OFF_MODE = 'off';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Release-owned enable for self-versioned baked runner images. While false, an
|
|
36
|
+
* unset worker setting keeps today's full upload, and the Production release
|
|
37
|
+
* and Preview `runtime up` do not publish. Flipping it to true makes, in the
|
|
38
|
+
* same release, the release publish `deepline-play-runner:<own bundle hash>`
|
|
39
|
+
* before its workers roll and those workers look that image up. Read by
|
|
40
|
+
* `.github/workflows/production-release.yml` and `scripts/runtime-target.ts`.
|
|
41
|
+
*/
|
|
42
|
+
export const BAKED_RUNNER_SELF_VERSIONED: boolean = false;
|
|
23
43
|
export const BAKED_RUNNER_ROOT = '/opt/deepline/runner';
|
|
24
44
|
export const BAKED_RUNNER_FILE_NAME = 'play-runner.cjs';
|
|
25
45
|
|
|
@@ -85,6 +105,48 @@ export function configuredBakedRunnerHash(
|
|
|
85
105
|
return SHA256_HEX.test(configured) ? configured : null;
|
|
86
106
|
}
|
|
87
107
|
|
|
108
|
+
export type BakedRunnerMode =
|
|
109
|
+
| { kind: 'disabled' }
|
|
110
|
+
| { kind: 'pin'; hash: string }
|
|
111
|
+
| { kind: 'self' };
|
|
112
|
+
|
|
113
|
+
/** How this worker chooses its baked runner image (see BAKED_RUNNER_HASH_ENV). */
|
|
114
|
+
export function bakedRunnerMode(
|
|
115
|
+
env: NodeJS.ProcessEnv = process.env,
|
|
116
|
+
selfVersionedByDefault: boolean = BAKED_RUNNER_SELF_VERSIONED,
|
|
117
|
+
): BakedRunnerMode {
|
|
118
|
+
const configured = env[BAKED_RUNNER_HASH_ENV]?.trim().toLowerCase() ?? '';
|
|
119
|
+
if (configured === BAKED_RUNNER_OFF_MODE) return { kind: 'disabled' };
|
|
120
|
+
if (configured === BAKED_RUNNER_SELF_MODE) return { kind: 'self' };
|
|
121
|
+
if (SHA256_HEX.test(configured)) return { kind: 'pin', hash: configured };
|
|
122
|
+
if (!configured && selfVersionedByDefault) return { kind: 'self' };
|
|
123
|
+
return { kind: 'disabled' };
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The hash whose published image this launch should look up, or null for
|
|
128
|
+
* today's path. Disabled and pinned modes never wait on the bundle; self mode
|
|
129
|
+
* hashes this worker's own bundle, so its image can never be stale. A bundle
|
|
130
|
+
* that cannot be read yields null here: the launch then takes today's path and
|
|
131
|
+
* the build failure still surfaces where the payload is staged.
|
|
132
|
+
*/
|
|
133
|
+
export async function bakedRunnerLookupHash(input: {
|
|
134
|
+
/** Called only in self mode, so a disabled or pinned launch reads nothing. */
|
|
135
|
+
bundle: () => Promise<string>;
|
|
136
|
+
mode?: BakedRunnerMode;
|
|
137
|
+
}): Promise<string | null> {
|
|
138
|
+
const mode = input.mode ?? bakedRunnerMode();
|
|
139
|
+
if (mode.kind === 'disabled') return null;
|
|
140
|
+
if (mode.kind === 'pin') return mode.hash;
|
|
141
|
+
let bundle: string;
|
|
142
|
+
try {
|
|
143
|
+
bundle = await input.bundle();
|
|
144
|
+
} catch {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
return bundle.length > 0 ? runnerBundleSha256Memoized(bundle) : null;
|
|
148
|
+
}
|
|
149
|
+
|
|
88
150
|
const MODAL_IMAGE_PRESENT_TTL_MS = 10 * 60_000;
|
|
89
151
|
const MODAL_IMAGE_ABSENT_TTL_MS = 30_000;
|
|
90
152
|
|
|
@@ -316,7 +378,7 @@ export async function bakedRunnerPlanForLaunch(input: {
|
|
|
316
378
|
}): Promise<{ hash: string; path: string } | undefined> {
|
|
317
379
|
const configuredHash =
|
|
318
380
|
input.configuredHash === undefined
|
|
319
|
-
?
|
|
381
|
+
? await bakedRunnerLookupHash({ bundle: () => input.bundlePromise })
|
|
320
382
|
: input.configuredHash;
|
|
321
383
|
if (!configuredHash) return undefined;
|
|
322
384
|
const plan = planBakedRunner({
|
|
@@ -97,6 +97,8 @@ export const PLAY_LAUNCH_ENVELOPE_FIELD_ROLES: {
|
|
|
97
97
|
runtimeTestFaultHeader: 'detail',
|
|
98
98
|
testPolicyOverrides: 'detail',
|
|
99
99
|
experimentSwitchOverrides: 'detail',
|
|
100
|
+
// Attribution only; the profile's switch map is experimentSwitchOverrides.
|
|
101
|
+
runtimeSpeedProfile: 'detail',
|
|
100
102
|
earlySandboxClaimOwner: 'detail',
|
|
101
103
|
submittedAtMs: 'detail',
|
|
102
104
|
concurrentRunsLimit: 'detail',
|
|
@@ -3171,10 +3171,6 @@ async function run(
|
|
|
3171
3171
|
playName,
|
|
3172
3172
|
tableNamespace,
|
|
3173
3173
|
sheetContract,
|
|
3174
|
-
contractSnapshot: {
|
|
3175
|
-
staticPipeline:
|
|
3176
|
-
input.staticPipeline ?? config.context.staticPipeline ?? null,
|
|
3177
|
-
},
|
|
3178
3174
|
runId,
|
|
3179
3175
|
userEmail,
|
|
3180
3176
|
updates: checkpointUpdates,
|
|
@@ -28,8 +28,9 @@ import {
|
|
|
28
28
|
} from '../../modal-runtime-config';
|
|
29
29
|
import type { PlaySandboxRuntimeLimits } from '../../../plays/sandbox-runtime-limits';
|
|
30
30
|
import {
|
|
31
|
+
bakedRunnerLookupHash,
|
|
32
|
+
bakedRunnerMode,
|
|
31
33
|
bakedRunnerPlanForLaunch,
|
|
32
|
-
configuredBakedRunnerHash,
|
|
33
34
|
bakedVerdictRequiresFallback,
|
|
34
35
|
parseBakedRunnerVerdict,
|
|
35
36
|
type BakedRunnerVerdict,
|
|
@@ -1886,7 +1887,9 @@ export function startEarlyModalSandbox(input: {
|
|
|
1886
1887
|
});
|
|
1887
1888
|
const runnerImage = await resolveModalRunnerImage({
|
|
1888
1889
|
client: modalConfig.client,
|
|
1889
|
-
configuredHash:
|
|
1890
|
+
configuredHash: await bakedRunnerLookupHash({
|
|
1891
|
+
bundle: buildPlayRunnerBundle,
|
|
1892
|
+
}),
|
|
1890
1893
|
explicitImage: modalConfig.imageExplicit === true,
|
|
1891
1894
|
defaultImage: () =>
|
|
1892
1895
|
modalConfig.client.images.fromRegistry(modalConfig.image),
|
|
@@ -2420,12 +2423,17 @@ export const modalPlayRunnerBackend: PlayRunnerBackend = {
|
|
|
2420
2423
|
modalAppId: app.appId,
|
|
2421
2424
|
elapsedMs: Date.now() - startedAt,
|
|
2422
2425
|
});
|
|
2423
|
-
// Unchanged (no lookup, no
|
|
2424
|
-
//
|
|
2426
|
+
// Unchanged (no lookup, no bundle wait) unless the baked runner is
|
|
2427
|
+
// enabled: an operator pin, or self mode, which names the image after
|
|
2428
|
+
// this worker's own bundle hash. The published image is used only when
|
|
2425
2429
|
// Modal resolves it, and its runner file is still verified before use.
|
|
2430
|
+
const bakedMode = bakedRunnerMode();
|
|
2426
2431
|
const runnerImage = await resolveModalRunnerImage({
|
|
2427
2432
|
client: modalConfig.client,
|
|
2428
|
-
configuredHash:
|
|
2433
|
+
configuredHash: await bakedRunnerLookupHash({
|
|
2434
|
+
bundle: () => bundlePromise,
|
|
2435
|
+
mode: bakedMode,
|
|
2436
|
+
}),
|
|
2429
2437
|
explicitImage: modalConfig.imageExplicit === true,
|
|
2430
2438
|
defaultImage: () =>
|
|
2431
2439
|
modalConfig.client.images.fromRegistry(modalConfig.image),
|
|
@@ -2440,6 +2448,7 @@ export const modalPlayRunnerBackend: PlayRunnerBackend = {
|
|
|
2440
2448
|
emitModalStage(config.context, 'create:image', {
|
|
2441
2449
|
baked: runnerImage.baked,
|
|
2442
2450
|
bakedImageRef: runnerImage.ref,
|
|
2451
|
+
bakedMode: bakedMode.kind,
|
|
2443
2452
|
});
|
|
2444
2453
|
}
|
|
2445
2454
|
const baseImage = runnerImage.image;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime speed profiles: a named, frozen set of per-run experiment switch
|
|
3
|
+
* values that admission stamps on a run.
|
|
4
|
+
*
|
|
5
|
+
* A profile is decided once, at admission, from the `runtime-fast-launch`
|
|
6
|
+
* feature rollout (an organization override beats the percentage) or, outside
|
|
7
|
+
* Production, from the `x-deepline-runtime-speed-profile` header authorized by
|
|
8
|
+
* the `play_run.runtime_speed_profile` internal capability. Admission writes
|
|
9
|
+
* the profile's switch map into the launch's existing optional
|
|
10
|
+
* `experimentSwitchOverrides` field, which Production workers, the
|
|
11
|
+
* executor-token route and the Modal backend already read. The profile id is
|
|
12
|
+
* also stamped as `runtimeSpeedProfile`, for attribution only: no reader
|
|
13
|
+
* branches on it.
|
|
14
|
+
*
|
|
15
|
+
* Every claim, resume and recovery re-reads the durable launch, never the
|
|
16
|
+
* rollout, so a run keeps the switch values it was admitted with. A worker
|
|
17
|
+
* that does not know a switch id drops it (`readCarriedExperimentSwitchOverrides`)
|
|
18
|
+
* and keeps that switch's static default.
|
|
19
|
+
*
|
|
20
|
+
* Rules for this registry:
|
|
21
|
+
* - An id's content is frozen once it has shipped. New content gets a new id
|
|
22
|
+
* (`fast_launch@2`), the same way placement policy ids work.
|
|
23
|
+
* - Each map is explicit: `true` turns a switch on, `false` pins it off, so a
|
|
24
|
+
* later change to a static default cannot change an admitted run.
|
|
25
|
+
* - Promoting a switch's static default to `true` while a profile pins it off
|
|
26
|
+
* would leave that profile's cohort slower than everyone else. Do it with a
|
|
27
|
+
* new profile id that turns it on; the registry test fails otherwise.
|
|
28
|
+
* - Only `perRun: true` switches can appear (the type enforces it), so E4/F1
|
|
29
|
+
* and every worker-process switch are impossible here.
|
|
30
|
+
* - S1 (the supervisor sidecar) is pinned off, and no profile may exist while
|
|
31
|
+
* `modalSupervisorSidecar` is on. `tests/lib/plays/runtime-speed-profile.test.ts`
|
|
32
|
+
* enforces both.
|
|
33
|
+
* - Placement and CPU are not part of any profile yet. A profile changes switch
|
|
34
|
+
* values only; the run's sandbox placement policy is chosen exactly as it is
|
|
35
|
+
* without one.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
import type {
|
|
39
|
+
ExperimentSwitchOverrides,
|
|
40
|
+
PerRunExperimentSwitchId,
|
|
41
|
+
} from './experiment-switches';
|
|
42
|
+
|
|
43
|
+
/** Requests a profile for one run: `fast_launch@1`, or `off` for none. */
|
|
44
|
+
export const RUNTIME_SPEED_PROFILE_HEADER = 'x-deepline-runtime-speed-profile';
|
|
45
|
+
|
|
46
|
+
/** The header value that asks for no profile, even when the rollout grants one. */
|
|
47
|
+
export const RUNTIME_SPEED_PROFILE_OFF = 'off';
|
|
48
|
+
|
|
49
|
+
type RuntimeSpeedProfileDefinition = {
|
|
50
|
+
readonly summary: string;
|
|
51
|
+
readonly switches: Readonly<Partial<Record<PerRunExperimentSwitchId, boolean>>>;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const RUNTIME_SPEED_PROFILES = {
|
|
55
|
+
'fast_launch@1': {
|
|
56
|
+
summary:
|
|
57
|
+
'The per-run admission and launch switches certified for fast launch: B, H1, P1, P2 and V3. Early start (E2 and everything built on it) and the sidecar stay off.',
|
|
58
|
+
switches: {
|
|
59
|
+
B: true,
|
|
60
|
+
H1: true,
|
|
61
|
+
P1: true,
|
|
62
|
+
P2: true,
|
|
63
|
+
V3: true,
|
|
64
|
+
// Early start and its dependants: not in @1.
|
|
65
|
+
E2: false,
|
|
66
|
+
PB: false,
|
|
67
|
+
CA: false,
|
|
68
|
+
A1: false,
|
|
69
|
+
// The supervisor sidecar: blocked for security.
|
|
70
|
+
S1: false,
|
|
71
|
+
// Never screened, or Preview-only.
|
|
72
|
+
PWM: false,
|
|
73
|
+
PWT: false,
|
|
74
|
+
PWV: false,
|
|
75
|
+
PI: false,
|
|
76
|
+
F3: false,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
} as const satisfies Record<string, RuntimeSpeedProfileDefinition>;
|
|
80
|
+
|
|
81
|
+
export type RuntimeSpeedProfileId = keyof typeof RUNTIME_SPEED_PROFILES;
|
|
82
|
+
|
|
83
|
+
/** The profile the `runtime-fast-launch` rollout grants. */
|
|
84
|
+
export const RUNTIME_FAST_LAUNCH_PROFILE: RuntimeSpeedProfileId =
|
|
85
|
+
'fast_launch@1';
|
|
86
|
+
|
|
87
|
+
export function isRuntimeSpeedProfileId(
|
|
88
|
+
value: unknown,
|
|
89
|
+
): value is RuntimeSpeedProfileId {
|
|
90
|
+
return (
|
|
91
|
+
typeof value === 'string' &&
|
|
92
|
+
Object.prototype.hasOwnProperty.call(RUNTIME_SPEED_PROFILES, value)
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export class RuntimeSpeedProfileHeaderError extends Error {
|
|
97
|
+
constructor(message: string) {
|
|
98
|
+
super(message);
|
|
99
|
+
this.name = 'RuntimeSpeedProfileHeaderError';
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Strict parser for the request header. Returns the profile id, or null for
|
|
105
|
+
* `off`. Anything else throws, so a request is never silently run without the
|
|
106
|
+
* profile it asked for.
|
|
107
|
+
*/
|
|
108
|
+
export function parseRuntimeSpeedProfileHeader(
|
|
109
|
+
value: string,
|
|
110
|
+
): RuntimeSpeedProfileId | null {
|
|
111
|
+
const trimmed = value.trim();
|
|
112
|
+
if (trimmed === RUNTIME_SPEED_PROFILE_OFF) return null;
|
|
113
|
+
if (isRuntimeSpeedProfileId(trimmed)) return trimmed;
|
|
114
|
+
throw new RuntimeSpeedProfileHeaderError(
|
|
115
|
+
`Unknown runtime speed profile "${trimmed}" in ${RUNTIME_SPEED_PROFILE_HEADER}. Known: ${[
|
|
116
|
+
...Object.keys(RUNTIME_SPEED_PROFILES),
|
|
117
|
+
RUNTIME_SPEED_PROFILE_OFF,
|
|
118
|
+
].join(', ')}.`,
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The switch overrides a run is admitted with: the profile's frozen map, with
|
|
124
|
+
* any explicitly requested per-run override winning for its own id. With no
|
|
125
|
+
* profile, the explicit overrides are returned unchanged.
|
|
126
|
+
*/
|
|
127
|
+
export function applyRuntimeSpeedProfile(
|
|
128
|
+
profileId: RuntimeSpeedProfileId | null,
|
|
129
|
+
explicitOverrides: ExperimentSwitchOverrides | null,
|
|
130
|
+
): ExperimentSwitchOverrides | null {
|
|
131
|
+
if (!profileId) return explicitOverrides;
|
|
132
|
+
return {
|
|
133
|
+
...RUNTIME_SPEED_PROFILES[profileId].switches,
|
|
134
|
+
...(explicitOverrides ?? {}),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
@@ -266,6 +266,13 @@ export type PlaySchedulerSubmitInput = RetainedPipelineCarrier & {
|
|
|
266
266
|
* its static default, so old launches and old workers are unaffected.
|
|
267
267
|
*/
|
|
268
268
|
experimentSwitchOverrides?: ExperimentSwitchOverrides | null;
|
|
269
|
+
/**
|
|
270
|
+
* The runtime speed profile (`runtime-speed-profile.ts`) the run was
|
|
271
|
+
* admitted with, such as `fast_launch@1`. Attribution only: its switch map
|
|
272
|
+
* is already in `experimentSwitchOverrides`, and no reader branches on this
|
|
273
|
+
* id. Absent on every run admitted without a profile.
|
|
274
|
+
*/
|
|
275
|
+
runtimeSpeedProfile?: string | null;
|
|
269
276
|
/**
|
|
270
277
|
* EXPERIMENT CA: the worker that started this run's early sandbox, as named
|
|
271
278
|
* in its hint reply. Copied onto the run's task params, where other workers'
|
|
@@ -36,7 +36,7 @@ export function optimizeAbsurdFairClaimSql(noCapClaim: string): string {
|
|
|
36
36
|
select r.*
|
|
37
37
|
${eligibility}
|
|
38
38
|
and r.org_key = o.org_key
|
|
39
|
-
order by r.priority desc, r.
|
|
39
|
+
order by r.priority desc, r.created_at, r.available_at, r.run_id
|
|
40
40
|
limit $2
|
|
41
41
|
) head
|
|
42
42
|
union all
|
|
@@ -44,7 +44,7 @@ ${eligibility}
|
|
|
44
44
|
select r.*
|
|
45
45
|
${eligibility}
|
|
46
46
|
and r.org_key is null
|
|
47
|
-
order by r.priority desc, r.
|
|
47
|
+
order by r.priority desc, r.created_at, r.available_at, r.run_id
|
|
48
48
|
limit $2
|
|
49
49
|
) null_head
|
|
50
50
|
), inflight as (`;
|
|
@@ -100,9 +100,10 @@ export function absurdQueryableForRuntimeScheduler(
|
|
|
100
100
|
client,
|
|
101
101
|
gate: claimGate,
|
|
102
102
|
run: async () => {
|
|
103
|
-
const queried = await client.query<
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
const queried = await client.query<Row & Record<string, unknown>>(
|
|
104
|
+
sql,
|
|
105
|
+
params,
|
|
106
|
+
);
|
|
106
107
|
return { rows: queried.rows as Row[] };
|
|
107
108
|
},
|
|
108
109
|
});
|
|
@@ -243,10 +244,22 @@ export function readAbsurdSchemaUncappedClaimSql(): string {
|
|
|
243
244
|
}
|
|
244
245
|
// The installed v4 claim function has the identical signature and result
|
|
245
246
|
// type. Replacing only its body is safe for old and new processes alike.
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
// available_at determines eligibility, not a new place in line. Capacity
|
|
248
|
+
// deferral must not put an older, already-due run behind fresh arrivals.
|
|
249
|
+
// Retain priorities, per-org fair ranks, future-wake and cancellation fences.
|
|
250
|
+
return noCapClaim
|
|
251
|
+
.replace(
|
|
252
|
+
'create function absurd.claim_task',
|
|
253
|
+
'create or replace function absurd.claim_task',
|
|
254
|
+
)
|
|
255
|
+
.replaceAll(
|
|
256
|
+
'r.priority desc, r.available_at, r.created_at, r.run_id',
|
|
257
|
+
'r.priority desc, r.created_at, r.available_at, r.run_id',
|
|
258
|
+
)
|
|
259
|
+
.replaceAll(
|
|
260
|
+
'fair_rank asc, priority desc, available_at asc, created_at asc, run_id asc',
|
|
261
|
+
'fair_rank asc, priority desc, created_at asc, available_at asc, run_id asc',
|
|
262
|
+
);
|
|
250
263
|
}
|
|
251
264
|
|
|
252
265
|
export function readAbsurdSchemaNoSchedulerOrgCapCompatibilitySql(): string {
|
|
@@ -9367,9 +9367,9 @@ export async function deferPostgresSchedulerAttemptForCapacity(
|
|
|
9367
9367
|
/**
|
|
9368
9368
|
* Set only when the workspace's live-sandbox cap is full. The first
|
|
9369
9369
|
* deferral of an unbroken streak publishes a queued activity carrying the
|
|
9370
|
-
* limit, atomically with the requeue; later deferrals publish
|
|
9371
|
-
*
|
|
9372
|
-
* projection every retry.
|
|
9370
|
+
* limit, atomically with the requeue; later deferrals publish only when
|
|
9371
|
+
* the observed limit changes or an attempt records a sandbox. A long
|
|
9372
|
+
* unchanged wait does not rewrite the projection every retry.
|
|
9373
9373
|
*/
|
|
9374
9374
|
sandboxCapacity?: { limit: number; nowMs: number };
|
|
9375
9375
|
},
|
|
@@ -9415,7 +9415,7 @@ export async function deferPostgresSchedulerAttemptForCapacity(
|
|
|
9415
9415
|
${causalOutboxCreatedAt('requeued_run.run_id', options)}
|
|
9416
9416
|
FROM requeued_run
|
|
9417
9417
|
WHERE $5::integer IS NOT NULL
|
|
9418
|
-
AND NOT ${outstandingSandboxCapacityWaitSql('requeued_run.run_id', '$2::integer', options)}
|
|
9418
|
+
AND NOT ${outstandingSandboxCapacityWaitSql('requeued_run.run_id', '$2::integer', options, '$5::integer')}
|
|
9419
9419
|
ON CONFLICT (event_id) DO NOTHING
|
|
9420
9420
|
RETURNING event_id
|
|
9421
9421
|
)
|
|
@@ -9428,7 +9428,12 @@ export async function deferPostgresSchedulerAttemptForCapacity(
|
|
|
9428
9428
|
stringifyPostgresJson({
|
|
9429
9429
|
kind: 'scheduler_capacity',
|
|
9430
9430
|
message: input.reason,
|
|
9431
|
-
...(sandboxCapacity
|
|
9431
|
+
...(sandboxCapacity
|
|
9432
|
+
? {
|
|
9433
|
+
sandboxCapacity: true,
|
|
9434
|
+
sandboxCapacityLimit: sandboxCapacity.limit,
|
|
9435
|
+
}
|
|
9436
|
+
: {}),
|
|
9432
9437
|
}),
|
|
9433
9438
|
sandboxCapacity?.limit ?? null,
|
|
9434
9439
|
sandboxCapacity?.nowMs ?? null,
|
|
@@ -9448,15 +9453,26 @@ function outstandingSandboxCapacityWaitSql(
|
|
|
9448
9453
|
runIdSql: string,
|
|
9449
9454
|
attemptSql: string,
|
|
9450
9455
|
options?: Pick<PostgresSchedulerOptions, 'schema'>,
|
|
9456
|
+
currentLimitSql?: string,
|
|
9451
9457
|
): string {
|
|
9452
9458
|
return `EXISTS (
|
|
9453
|
-
SELECT 1 FROM
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9459
|
+
SELECT 1 FROM (
|
|
9460
|
+
SELECT attempt, error_json
|
|
9461
|
+
FROM ${tableName('attempts', options)} AS prior_wait
|
|
9462
|
+
WHERE prior_wait.run_id = ${runIdSql}
|
|
9463
|
+
AND prior_wait.attempt < ${attemptSql}
|
|
9464
|
+
AND prior_wait.error_json->>'sandboxCapacity' = 'true'
|
|
9465
|
+
ORDER BY prior_wait.attempt DESC LIMIT 1
|
|
9466
|
+
) AS waited
|
|
9467
|
+
WHERE true
|
|
9468
|
+
${
|
|
9469
|
+
currentLimitSql
|
|
9470
|
+
? `AND waited.error_json->'sandboxCapacityLimit' = to_jsonb(${currentLimitSql})`
|
|
9471
|
+
: ''
|
|
9472
|
+
}
|
|
9457
9473
|
AND NOT EXISTS (
|
|
9458
9474
|
SELECT 1 FROM ${tableName('attempts', options)} AS started
|
|
9459
|
-
WHERE started.run_id =
|
|
9475
|
+
WHERE started.run_id = ${runIdSql}
|
|
9460
9476
|
AND started.attempt > waited.attempt
|
|
9461
9477
|
AND started.attempt < ${attemptSql}
|
|
9462
9478
|
AND jsonb_path_exists(started.resource_json, '$[*].sandboxId')
|
|
@@ -9483,7 +9499,10 @@ function sandboxCapacityActivityEventSql(
|
|
|
9483
9499
|
'activityId', ${escapeLiteral(SANDBOX_CAPACITY_ACTIVITY_ID)},
|
|
9484
9500
|
'target', jsonb_strip_nulls(jsonb_build_object(
|
|
9485
9501
|
'kind', 'capacity', 'pool', 'runner',
|
|
9486
|
-
'label', 'a concurrency slot', 'limit', ${limitSql}
|
|
9502
|
+
'label', 'a concurrency slot', 'limit', ${limitSql},
|
|
9503
|
+
'limitSource', CASE WHEN ${limitSql} IS NULL THEN NULL
|
|
9504
|
+
WHEN requeued_run.launch_json->'concurrentRunsLimit' = to_jsonb(${limitSql})
|
|
9505
|
+
THEN 'admission' ELSE 'workspace' END
|
|
9487
9506
|
)),
|
|
9488
9507
|
'state', ${stateSql},
|
|
9489
9508
|
'observedAt', ${nowSql}
|
|
@@ -3628,7 +3628,7 @@ export const PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
3628
3628
|
'};',
|
|
3629
3629
|
'export type PlayReferenceLike<TInput extends Record<string, unknown> = Record<string, unknown>> = ({ readonly playName: string; readonly name?: string } | { readonly name: string; readonly playName?: string }) & { readonly __inputType?: TInput };',
|
|
3630
3630
|
'export type BillingBenefitValues = { quickenrichUnlimited: { enabled: boolean; requestsPerMinute: number }; peopleSearch: { enabled: boolean; requestsPerMinute: number; profilesPerMonth: number; overageCreditsPerProfile?: number } };',
|
|
3631
|
-
"export type BillingEntitlements = { org_id: string; as_of: number; plan: { sku: string; name: string; catalog_revision: string | null; included_credits: number; interval: 'month' | 'year' | null } | null; benefits: { quickenrichUnlimited?: { status: 'active' | 'past_due'; value: BillingBenefitValues['quickenrichUnlimited']; expiresAt?: number }; peopleSearch?: { status: 'active'; value: BillingBenefitValues['peopleSearch']; expiresAt?: number; usage: { month: string; periodStartsAt?: number; resetsAt?: number; resetsOn?: 'calendar_month' | 'billing_cycle'; limit: number; consumed: number; remaining: number } }; includedStorage?: { status: 'active'; usage: { limit: number; consumed: number; remaining: number; measuredDay: string; overageCharged: boolean } } }; effective_limits: { quickenrichUnlimited?: { baseline: number; effective: number; source: 'plan' | 'override'; override_expires_at?: number } } };",
|
|
3631
|
+
"export type BillingEntitlements = { org_id: string; as_of: number; plan: { sku: string; name: string; catalog_revision: string | null; included_credits: number; interval: 'month' | 'year' | null } | null; benefits: { quickenrichUnlimited?: { status: 'active' | 'past_due'; value: BillingBenefitValues['quickenrichUnlimited']; expiresAt?: number }; peopleSearch?: { status: 'active'; value: BillingBenefitValues['peopleSearch']; expiresAt?: number; usage: { month: string; periodStartsAt?: number; resetsAt?: number; resetsOn?: 'calendar_month' | 'billing_cycle'; limit: number; consumed: number; remaining: number } }; includedStorage?: { status: 'active'; usage: { limit: number; consumed: number; remaining: number; measuredDay: string; overageCharged: boolean } } }; concurrent_runs?: { limit: number; source: 'override' | 'plan' | 'default'; plans: Array<{ sku: string; name: string; limit: number }> }; effective_limits: { quickenrichUnlimited?: { baseline: number; effective: number; source: 'plan' | 'override'; override_expires_at?: number } } };",
|
|
3632
3632
|
'export interface DeeplinePlayRuntimeContext {',
|
|
3633
3633
|
' billing: { entitlements(): Promise<BillingEntitlements> };',
|
|
3634
3634
|
" views: { list(): Promise<Array<{ id: string; name: string; url: string; runUrl: string; access: 'workspace' | 'public' }>> };",
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
reportSetupCompleted,
|
|
15
15
|
resolvePendingAuthClaimForResume,
|
|
16
16
|
statusBannerLine
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-SXVYFOBG.mjs";
|
|
18
|
+
import "./chunk-37VFUQMU.mjs";
|
|
19
|
+
import "./chunk-DWE2VE5I.mjs";
|
|
20
|
+
import "./chunk-XYM3SQZN.mjs";
|
|
21
21
|
import "./chunk-CQBIO6HW.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
23
|
import "./chunk-JL2OTMSG.mjs";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-TZVW5JH3.mjs";
|
|
25
25
|
import "./chunk-WZYKRD7T.mjs";
|
|
26
26
|
import "./chunk-KRD6H754.mjs";
|
|
27
27
|
export {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkMLDLN6WGjs = require('./chunk-MLDLN6WG.js');
|
|
18
|
+
require('./chunk-VAOGM5VS.js');
|
|
19
|
+
require('./chunk-MVIVF4BW.js');
|
|
20
|
+
require('./chunk-AJVK4XC5.js');
|
|
21
|
+
require('./chunk-2GJZLIKW.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-BBTKAASQ.js');
|
|
24
|
+
require('./chunk-DV3ESQ4X.js');
|
|
25
|
+
require('./chunk-OG64RBAC.js');
|
|
26
|
+
require('./chunk-COGTRVWW.js');
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkMLDLN6WGjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkMLDLN6WGjs.authStatusLine; exports.clearPendingClaim = _chunkMLDLN6WGjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkMLDLN6WGjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkMLDLN6WGjs.handleRegister; exports.handleStatus = _chunkMLDLN6WGjs.handleStatus; exports.handleWait = _chunkMLDLN6WGjs.handleWait; exports.httpJson = _chunkMLDLN6WGjs.httpJson; exports.readPendingAuthClaim = _chunkMLDLN6WGjs.readPendingAuthClaim; exports.readStatusBanner = _chunkMLDLN6WGjs.readStatusBanner; exports.registerAuthCommands = _chunkMLDLN6WGjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkMLDLN6WGjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkMLDLN6WGjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkMLDLN6WGjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkMLDLN6WGjs.statusBannerLine;
|