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
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PLAY_SANDBOX_SIZE_INPUTS
|
|
3
|
+
} from "./chunk-7I4B6V2S.mjs";
|
|
1
4
|
import {
|
|
2
5
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2FTUPGTN.mjs";
|
|
4
7
|
import {
|
|
5
8
|
iterateCursorPages,
|
|
6
9
|
requireBillingIdempotencyKey
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-S7UEKKOX.mjs";
|
|
8
11
|
import "./chunk-L2VKAASU.mjs";
|
|
9
12
|
import "./chunk-NELMCOWK.mjs";
|
|
10
13
|
import "./chunk-S3A4IXBQ.mjs";
|
|
@@ -15,9 +18,9 @@ import {
|
|
|
15
18
|
openInBrowser,
|
|
16
19
|
printCommandEnvelope,
|
|
17
20
|
shouldEmitJson
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-7HTWT3Z4.mjs";
|
|
22
|
+
import "./chunk-75DAGCEX.mjs";
|
|
23
|
+
import "./chunk-M5USVQ33.mjs";
|
|
21
24
|
import {
|
|
22
25
|
AuthError,
|
|
23
26
|
ConfigError
|
|
@@ -26,7 +29,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
26
29
|
import {
|
|
27
30
|
DeeplineError
|
|
28
31
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
29
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-645RNF2Y.mjs";
|
|
30
33
|
import "./chunk-WZYKRD7T.mjs";
|
|
31
34
|
import "./chunk-KRD6H754.mjs";
|
|
32
35
|
|
|
@@ -476,6 +479,17 @@ async function handleUsageEvents(options) {
|
|
|
476
479
|
);
|
|
477
480
|
}
|
|
478
481
|
async function handleUsage(options) {
|
|
482
|
+
if (options.events && options.recentOnly) {
|
|
483
|
+
reportBillingFailure(
|
|
484
|
+
{
|
|
485
|
+
exitCode: 2,
|
|
486
|
+
code: "CONFLICTING_USAGE_FILTERS",
|
|
487
|
+
message: "--recent-only cannot be combined with --events."
|
|
488
|
+
},
|
|
489
|
+
options
|
|
490
|
+
);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
479
493
|
if (options.events) return handleUsageEvents(options);
|
|
480
494
|
const { http } = getAuthedHttpClient();
|
|
481
495
|
const params = new URLSearchParams();
|
|
@@ -505,6 +519,7 @@ async function handleUsage(options) {
|
|
|
505
519
|
}
|
|
506
520
|
params.set("request_id", requestId);
|
|
507
521
|
} else {
|
|
522
|
+
if (options.recentOnly) params.set("recent_only", "true");
|
|
508
523
|
if (options.limit) params.set("recent_limit", options.limit);
|
|
509
524
|
if (options.offset) params.set("recent_offset", options.offset);
|
|
510
525
|
if (options.cursor) params.set("recent_cursor", options.cursor);
|
|
@@ -536,18 +551,20 @@ async function handleUsage(options) {
|
|
|
536
551
|
const recent = payload.recent ?? {};
|
|
537
552
|
const last30Usage = usage.last_30_days_usage_credits ?? usage.month_spent_credits;
|
|
538
553
|
const temporaryHolds = Number(usage.temporary_hold_credits ?? 0);
|
|
539
|
-
const nextPage = typeof recent.next_cursor === "string" && recent.next_cursor.length > 0 ? `deepline billing usage --cursor ${quoteShellArgument(recent.next_cursor)}${options.limit ? ` --limit ${options.limit}` : ""}${options.runId ? ` --run-id ${quoteShellArgument(options.runId)}` : ""}` : null;
|
|
554
|
+
const nextPage = typeof recent.next_cursor === "string" && recent.next_cursor.length > 0 ? `deepline billing usage${options.recentOnly ? " --recent-only" : ""} --cursor ${quoteShellArgument(recent.next_cursor)}${options.limit ? ` --limit ${options.limit}` : ""}${options.runId ? ` --run-id ${quoteShellArgument(options.runId)}` : ""}` : null;
|
|
540
555
|
const recentLines = recentUsageLines(
|
|
541
556
|
Array.isArray(recent.entries) ? recent.entries : []
|
|
542
557
|
);
|
|
543
558
|
const matchingActivity = typeof recent.total === "number" && Number.isFinite(recent.total) && recent.total >= 0 && typeof recent.total_is_exact === "boolean" ? recent.total_is_exact ? `Matching activity: ${recent.total}` : typeof recent.total_lower_bound === "number" && Number.isFinite(recent.total_lower_bound) && recent.total_lower_bound >= 0 ? `Matching activity: at least ${recent.total_lower_bound}` : `Matching activity: count not exact (reported ${recent.total})` : null;
|
|
544
559
|
const lines = options.requestId ? [`Charge lookup: ${options.requestId}`, ...recentLines] : [
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
560
|
+
...!options.recentOnly ? [
|
|
561
|
+
`Balance: ${payload.balance ?? "(unknown)"}`,
|
|
562
|
+
`Last 30 days usage: ${last30Usage ?? "(unknown)"}`,
|
|
563
|
+
...Number.isFinite(temporaryHolds) && temporaryHolds > 0 ? [`Temporary holds: ${temporaryHolds}`] : [],
|
|
564
|
+
`Monthly usage cap: ${quota.enabled ? quota.monthly_credits_limit ?? "(unknown)" : "off"}`,
|
|
565
|
+
...options.runId && recent.run_id ? [
|
|
566
|
+
`Run spend: ${(payload.run ?? {}).spent_credits ?? "(unknown)"} Deepline Credits`
|
|
567
|
+
] : []
|
|
551
568
|
] : [],
|
|
552
569
|
...matchingActivity ? [matchingActivity] : [],
|
|
553
570
|
...recentLines,
|
|
@@ -1595,7 +1612,7 @@ Examples:
|
|
|
1595
1612
|
"--sandbox-timeout <duration>",
|
|
1596
1613
|
"Runtime timeout, such as 30m or 2h"
|
|
1597
1614
|
).addOption(
|
|
1598
|
-
new Option("--sandbox-size <size>", "Runtime memory profile").choices([
|
|
1615
|
+
new Option("--sandbox-size <size>", "Runtime memory profile").choices([...PLAY_SANDBOX_SIZE_INPUTS]).default("standard")
|
|
1599
1616
|
).option("--quantity <sessions>", "Number of sandbox sessions", "1").option("--json", "Emit the bounded component quotation as JSON").action(
|
|
1600
1617
|
async (options) => {
|
|
1601
1618
|
const quantity = Number(options.quantity);
|
|
@@ -1660,6 +1677,9 @@ Examples:
|
|
|
1660
1677
|
).option(
|
|
1661
1678
|
"--events",
|
|
1662
1679
|
"Read a raw usage-event page instead of the billing summary"
|
|
1680
|
+
).option(
|
|
1681
|
+
"--recent-only",
|
|
1682
|
+
"Read recent billing activity without spend totals"
|
|
1663
1683
|
).option("--limit <n>", "Page size (1\u2013500 with --events)").option("--offset <n>", "Recent-call offset").option(
|
|
1664
1684
|
"--cursor <cursor>",
|
|
1665
1685
|
"Recent-call cursor from the previous response"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S7UEKKOX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-75DAGCEX.mjs";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
10
|
var DeeplineClient2 = class extends DeeplineClient {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JH775FF6.mjs";
|
|
5
5
|
import {
|
|
6
6
|
runSkillsCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3LTLQAU4.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveShellSpawn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4C3TMIF3.mjs";
|
|
11
11
|
import {
|
|
12
12
|
printCommandEnvelope
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7HTWT3Z4.mjs";
|
|
14
14
|
import {
|
|
15
15
|
autoDetectBaseUrl
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-75DAGCEX.mjs";
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -26,7 +26,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkKBBZXWXFjs = require('./chunk-KBBZXWXF.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -647,7 +647,7 @@ var ToolCalls = class {
|
|
|
647
647
|
idempotencyKey,
|
|
648
648
|
onResponse: (response2) => {
|
|
649
649
|
lastResponse = null;
|
|
650
|
-
atomicToolsSupported = response2.headers.get(
|
|
650
|
+
atomicToolsSupported = response2.headers.get(_chunkKBBZXWXFjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
651
651
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
652
652
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
|
|
653
653
|
try {
|
|
@@ -1026,8 +1026,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
const receivers = _optionalChain([env, 'access', _52 => _52.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
|
|
1028
1028
|
return {
|
|
1029
|
-
[
|
|
1030
|
-
...receivers ? { [
|
|
1029
|
+
[_chunkKBBZXWXFjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1030
|
+
...receivers ? { [_chunkKBBZXWXFjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1031
1031
|
};
|
|
1032
1032
|
}
|
|
1033
1033
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1098,7 +1098,7 @@ var PlayClient = class {
|
|
|
1098
1098
|
return _chunkJDMR33HSjs.startPlayRun.call(void 0,
|
|
1099
1099
|
this.http,
|
|
1100
1100
|
resolved.request,
|
|
1101
|
-
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1101
|
+
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkKBBZXWXFjs.SDK_API_MAJOR) } : headers,
|
|
1102
1102
|
options
|
|
1103
1103
|
);
|
|
1104
1104
|
}
|
|
@@ -3175,7 +3175,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3175
3175
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3176
3176
|
);
|
|
3177
3177
|
}
|
|
3178
|
-
return { [
|
|
3178
|
+
return { [_chunkKBBZXWXFjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3179
3179
|
}
|
|
3180
3180
|
function sleep(ms) {
|
|
3181
3181
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -6033,6 +6033,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6033
6033
|
}
|
|
6034
6034
|
params.set("request_id", requestId);
|
|
6035
6035
|
} else {
|
|
6036
|
+
if (options.recentOnly) params.set("recent_only", "true");
|
|
6036
6037
|
if (options.limit !== void 0) {
|
|
6037
6038
|
params.set("recent_limit", String(options.limit));
|
|
6038
6039
|
}
|
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
skillsInstallLeasePath,
|
|
12
12
|
skillsSourceUrl,
|
|
13
13
|
syncSdkSkillsIfNeeded
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4C3TMIF3.mjs";
|
|
15
15
|
import {
|
|
16
16
|
printCommandEnvelope
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7HTWT3Z4.mjs";
|
|
18
18
|
import {
|
|
19
19
|
autoDetectBaseUrl,
|
|
20
20
|
ensureProjectPrivatePathsIgnored,
|
|
21
21
|
resolveProjectPinTarget,
|
|
22
22
|
sdkCliStateDirPath
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-75DAGCEX.mjs";
|
|
24
24
|
import {
|
|
25
25
|
SDK_VERSION,
|
|
26
26
|
detectAgentRuntime
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-M5USVQ33.mjs";
|
|
28
28
|
|
|
29
29
|
// src/cli/commands/skills.ts
|
|
30
30
|
import { spawn } from "child_process";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PlayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S7UEKKOX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-75DAGCEX.mjs";
|
|
8
8
|
|
|
9
9
|
// src/plays/local-play-execution.ts
|
|
10
10
|
function importedNodes(graph) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getActiveCliProgress
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PLJV6SX4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_SKILL_AGENTS,
|
|
6
6
|
KNOWN_SKILL_AGENTS,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
sdkCliStateDirPath,
|
|
13
13
|
skillsAgentPathSegment,
|
|
14
14
|
writeSdkSkillsLocalVersion
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-75DAGCEX.mjs";
|
|
16
16
|
import {
|
|
17
17
|
SDK_API_CONTRACT,
|
|
18
18
|
SDK_API_MAJOR,
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
agentSessionIdFromEnvironment,
|
|
21
21
|
deploymentProtectionHeaders,
|
|
22
22
|
detectAgentRuntime
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-M5USVQ33.mjs";
|
|
24
24
|
import {
|
|
25
25
|
DeeplineError
|
|
26
26
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
27
27
|
import {
|
|
28
28
|
SDK_RELEASE
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-645RNF2Y.mjs";
|
|
30
30
|
|
|
31
31
|
// src/compat.ts
|
|
32
32
|
import { randomUUID } from "crypto";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
traceCliSpan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F44O4PEP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
checkSdkCompatibility,
|
|
6
6
|
enforceSdkCompatibilityResponse,
|
|
7
7
|
flushDeferredSkillsSyncNotices
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4C3TMIF3.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/play-run-admission.ts
|
|
11
11
|
function usesInlinePlayAdmission(command, args) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkTW3TTKW5js = require('./chunk-TW3TTKW5.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkKBBZXWXFjs = require('./chunk-KBBZXWXF.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -290,8 +290,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
290
290
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
291
291
|
var defaultBrowserCommandRunner = childProcess;
|
|
292
292
|
function getAuthedHttpClient() {
|
|
293
|
-
const config =
|
|
294
|
-
return { config, http: new (0,
|
|
293
|
+
const config = _chunkTW3TTKW5js.resolveConfig.call(void 0, );
|
|
294
|
+
return { config, http: new (0, _chunkTW3TTKW5js.HttpClient)(config) };
|
|
295
295
|
}
|
|
296
296
|
function stableOsUserId() {
|
|
297
297
|
try {
|
|
@@ -631,7 +631,7 @@ function collectLocalEnvInfo() {
|
|
|
631
631
|
os: `${process.platform} ${process.arch}`,
|
|
632
632
|
node_version: process.version,
|
|
633
633
|
home_dir: homeDir,
|
|
634
|
-
agent_runtime:
|
|
634
|
+
agent_runtime: _chunkKBBZXWXFjs.detectAgentRuntime.call(void 0, )
|
|
635
635
|
};
|
|
636
636
|
const env = process.env;
|
|
637
637
|
const optional = {
|
|
@@ -878,9 +878,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
878
878
|
}
|
|
879
879
|
function withAgentCommandContext(value) {
|
|
880
880
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
881
|
-
return
|
|
881
|
+
return _chunkKBBZXWXFjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
882
882
|
...valueRecord,
|
|
883
|
-
command_context:
|
|
883
|
+
command_context: _chunkTW3TTKW5js.resolveCliCommandContext.call(void 0, )
|
|
884
884
|
} : value;
|
|
885
885
|
}
|
|
886
886
|
function printJson(value, fields) {
|
|
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.478",
|
|
53
53
|
updateSummary: {
|
|
54
54
|
introducedIn: "0.3.90",
|
|
55
55
|
summary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release."
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
var _chunkZM2YPJQJjs = require('./chunk-ZM2YPJQJ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkHMUBLAT4js = require('./chunk-HMUBLAT4.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk4RV7U3RPjs = require('./chunk-4RV7U3RP.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkTW3TTKW5js = require('./chunk-TW3TTKW5.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -5713,7 +5713,7 @@ var _fs = require('fs');
|
|
|
5713
5713
|
var _path = require('path');
|
|
5714
5714
|
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
5715
5715
|
function lastSearchPath() {
|
|
5716
|
-
return _path.join.call(void 0,
|
|
5716
|
+
return _path.join.call(void 0, _chunkTW3TTKW5js.sdkCliStateDirPath.call(void 0, _chunkTW3TTKW5js.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
5717
5717
|
}
|
|
5718
5718
|
function rememberSearchRef(searchRef) {
|
|
5719
5719
|
try {
|
|
@@ -5877,7 +5877,7 @@ var OPTIONAL_COLUMNS = [
|
|
|
5877
5877
|
];
|
|
5878
5878
|
function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
|
|
5879
5879
|
if (result.results.length === 0)
|
|
5880
|
-
return
|
|
5880
|
+
return _chunk4RV7U3RPjs.renderCommandEnvelopeText.call(void 0, result);
|
|
5881
5881
|
const rows = result.results.map((item) => searchRow(item, summaryWidth));
|
|
5882
5882
|
const kinds = new Set(rows.map((row) => row.kind));
|
|
5883
5883
|
const onlyTools = kinds.size === 1 && kinds.has("tool");
|
|
@@ -5902,7 +5902,7 @@ function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
|
|
|
5902
5902
|
actions: _optionalChain([render, 'optionalAccess', _12 => _12.actions])
|
|
5903
5903
|
};
|
|
5904
5904
|
const followUps = _optionalChain([remaining, 'access', _13 => _13.sections, 'optionalAccess', _14 => _14.length]) || _optionalChain([remaining, 'access', _15 => _15.actions, 'optionalAccess', _16 => _16.length]) ? `
|
|
5905
|
-
${
|
|
5905
|
+
${_chunk4RV7U3RPjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
|
|
5906
5906
|
const notes = rows.flatMap(
|
|
5907
5907
|
(row) => row.notes.map((note) => ` ${row.id}: ${note}`)
|
|
5908
5908
|
);
|
|
@@ -5997,7 +5997,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
5997
5997
|
console.error("--summary-width must be an integer of at least 2.");
|
|
5998
5998
|
return 1;
|
|
5999
5999
|
}
|
|
6000
|
-
const { search_ref: searchRef, ...result } = await new (0,
|
|
6000
|
+
const { search_ref: searchRef, ...result } = await new (0, _chunkHMUBLAT4js.DeeplineClient)().search({
|
|
6001
6001
|
query,
|
|
6002
6002
|
types,
|
|
6003
6003
|
exclude,
|
|
@@ -6011,7 +6011,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
6011
6011
|
});
|
|
6012
6012
|
if (searchRef) rememberSearchRef(searchRef);
|
|
6013
6013
|
pointAtDescribe(result);
|
|
6014
|
-
|
|
6014
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, result, {
|
|
6015
6015
|
json: options.json === true,
|
|
6016
6016
|
text: renderSearchResults(result, summaryWidth)
|
|
6017
6017
|
});
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
HttpClient,
|
|
3
3
|
resolveCliCommandContext,
|
|
4
4
|
resolveConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-75DAGCEX.mjs";
|
|
6
6
|
import {
|
|
7
7
|
detectAgentRuntime
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-M5USVQ33.mjs";
|
|
9
9
|
import {
|
|
10
10
|
DeeplineError,
|
|
11
11
|
serializeToolExecutionFailure
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// ../plays/sandbox-runtime-limits.ts
|
|
2
|
+
var PLAY_SANDBOX_SIZE_LIMITS = {
|
|
3
|
+
standard: {
|
|
4
|
+
memoryGiB: 1,
|
|
5
|
+
cpu: 1,
|
|
6
|
+
diskGiB: 3
|
|
7
|
+
},
|
|
8
|
+
large: {
|
|
9
|
+
memoryGiB: 4,
|
|
10
|
+
cpu: 2,
|
|
11
|
+
diskGiB: 8
|
|
12
|
+
},
|
|
13
|
+
xlarge: {
|
|
14
|
+
memoryGiB: 8,
|
|
15
|
+
cpu: 4,
|
|
16
|
+
diskGiB: 10
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var PLAY_SANDBOX_SIZE_ALIASES = {
|
|
20
|
+
"1gb": "standard",
|
|
21
|
+
"4gb": "large",
|
|
22
|
+
"8gb": "xlarge"
|
|
23
|
+
};
|
|
24
|
+
var PLAY_SANDBOX_SIZE_INPUTS = [
|
|
25
|
+
...Object.keys(PLAY_SANDBOX_SIZE_LIMITS),
|
|
26
|
+
...Object.keys(
|
|
27
|
+
PLAY_SANDBOX_SIZE_ALIASES
|
|
28
|
+
)
|
|
29
|
+
];
|
|
30
|
+
var STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS = {
|
|
31
|
+
timeoutSeconds: 30 * 60,
|
|
32
|
+
...PLAY_SANDBOX_SIZE_LIMITS.standard
|
|
33
|
+
};
|
|
34
|
+
var MAX_PLAY_SANDBOX_RUNTIME_LIMITS = {
|
|
35
|
+
timeoutSeconds: 4 * 60 * 60,
|
|
36
|
+
...PLAY_SANDBOX_SIZE_LIMITS.xlarge
|
|
37
|
+
};
|
|
38
|
+
function modalSandboxMemoryLimitGiBForPlay(input) {
|
|
39
|
+
if (!Object.values(PLAY_SANDBOX_SIZE_LIMITS).some(
|
|
40
|
+
(profile) => profile.memoryGiB === input.memoryGiB
|
|
41
|
+
)) {
|
|
42
|
+
throw new Error(
|
|
43
|
+
`Unsupported Modal memory reservation: ${input.memoryGiB} GiB.`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return Math.min(
|
|
47
|
+
Math.max(4, input.memoryGiB * 2),
|
|
48
|
+
MAX_PLAY_SANDBOX_RUNTIME_LIMITS.memoryGiB
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function playSandboxSizeForLimits(limits) {
|
|
52
|
+
return Object.entries(PLAY_SANDBOX_SIZE_LIMITS).find(
|
|
53
|
+
([, profile]) => profile.memoryGiB === limits.memoryGiB && profile.cpu === limits.cpu && profile.diskGiB === limits.diskGiB
|
|
54
|
+
)?.[0] ?? null;
|
|
55
|
+
}
|
|
56
|
+
var SUPPORTED_PLAY_SANDBOX_SIZES = PLAY_SANDBOX_SIZE_INPUTS.join(", ");
|
|
57
|
+
function normalizePlaySandboxSize(value) {
|
|
58
|
+
if (typeof value !== "string") return null;
|
|
59
|
+
if (Object.hasOwn(PLAY_SANDBOX_SIZE_LIMITS, value)) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return Object.hasOwn(PLAY_SANDBOX_SIZE_ALIASES, value) ? PLAY_SANDBOX_SIZE_ALIASES[value] : null;
|
|
63
|
+
}
|
|
64
|
+
function parseTimeout(value) {
|
|
65
|
+
const match = /^(\d+)\s*([mh])$/i.exec(value.trim());
|
|
66
|
+
if (!match) return null;
|
|
67
|
+
const amount = Number(match[1]);
|
|
68
|
+
if (!Number.isSafeInteger(amount) || amount <= 0) return null;
|
|
69
|
+
return amount * (match[2].toLowerCase() === "h" ? 3600 : 60);
|
|
70
|
+
}
|
|
71
|
+
function validatePlaySandboxRuntimeLimits(value) {
|
|
72
|
+
if (!playSandboxSizeForLimits(value)) {
|
|
73
|
+
throw new Error(
|
|
74
|
+
`Unsupported runtime sandbox resources: cpu=${value.cpu} memoryGiB=${value.memoryGiB} diskGiB=${value.diskGiB}. Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
if (!Number.isSafeInteger(value.timeoutSeconds) || value.timeoutSeconds <= 0) {
|
|
78
|
+
throw new Error(
|
|
79
|
+
'Invalid runtime sandbox timeout. Use timeout like "90m" or "2h".'
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
if (value.timeoutSeconds > MAX_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds) {
|
|
83
|
+
throw new Error(
|
|
84
|
+
`Requested runtime timeoutSeconds=${value.timeoutSeconds} exceeds this organisation's maximum ${MAX_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds}.`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
return { ...value };
|
|
88
|
+
}
|
|
89
|
+
function resolvePlaySandboxRuntimeLimits(declaration) {
|
|
90
|
+
const base = STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS;
|
|
91
|
+
if (!declaration) return { ...base };
|
|
92
|
+
const unsupportedProperties = Object.keys(declaration).filter(
|
|
93
|
+
(key) => key !== "timeout" && key !== "size"
|
|
94
|
+
);
|
|
95
|
+
if (unsupportedProperties.length > 0) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"}: ${unsupportedProperties.join(", ")}. Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
const size = declaration.size === void 0 ? "standard" : normalizePlaySandboxSize(declaration.size);
|
|
101
|
+
if (!size) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
`Unsupported runtime sandbox size "${String(declaration.size)}". Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
const timeoutSeconds = declaration.timeout ? parseTimeout(declaration.timeout) : base.timeoutSeconds;
|
|
107
|
+
if (timeoutSeconds === null) {
|
|
108
|
+
throw new Error(
|
|
109
|
+
'Invalid runtime sandbox timeout. Use timeout like "90m" or "2h".'
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
return validatePlaySandboxRuntimeLimits({
|
|
113
|
+
timeoutSeconds,
|
|
114
|
+
...PLAY_SANDBOX_SIZE_LIMITS[size]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export {
|
|
119
|
+
PLAY_SANDBOX_SIZE_LIMITS,
|
|
120
|
+
PLAY_SANDBOX_SIZE_INPUTS,
|
|
121
|
+
STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS,
|
|
122
|
+
MAX_PLAY_SANDBOX_RUNTIME_LIMITS,
|
|
123
|
+
modalSandboxMemoryLimitGiBForPlay,
|
|
124
|
+
playSandboxSizeForLimits,
|
|
125
|
+
SUPPORTED_PLAY_SANDBOX_SIZES,
|
|
126
|
+
resolvePlaySandboxRuntimeLimits
|
|
127
|
+
};
|
|
@@ -7,6 +7,10 @@ var _chunk3KC45UVFjs = require('./chunk-3KC45UVF.js');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
|
|
11
15
|
|
|
12
16
|
|
|
@@ -1389,11 +1393,9 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
1389
1393
|
errorMessage: 'rateLimit.every must be a static duration from "10s" to "24h", such as "5m".'
|
|
1390
1394
|
},
|
|
1391
1395
|
"runtime.size": {
|
|
1392
|
-
schema: _typebox.Type.Union(
|
|
1393
|
-
_typebox.Type.Literal(
|
|
1394
|
-
|
|
1395
|
-
_typebox.Type.Literal("xlarge")
|
|
1396
|
-
]),
|
|
1396
|
+
schema: _typebox.Type.Union(
|
|
1397
|
+
_chunkYGCKMI5Pjs.PLAY_SANDBOX_SIZE_INPUTS.map((size) => _typebox.Type.Literal(size))
|
|
1398
|
+
),
|
|
1397
1399
|
fixtures: {
|
|
1398
1400
|
valid: "large",
|
|
1399
1401
|
invalid: "xxlarge",
|
|
@@ -1401,12 +1403,14 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
1401
1403
|
unresolved: { expression: "size" },
|
|
1402
1404
|
edition1: "standard"
|
|
1403
1405
|
},
|
|
1404
|
-
referenceType:
|
|
1406
|
+
referenceType: _chunkYGCKMI5Pjs.PLAY_SANDBOX_SIZE_INPUTS.map((size) => `'${size}'`).join(
|
|
1407
|
+
" | "
|
|
1408
|
+
),
|
|
1405
1409
|
required: false,
|
|
1406
1410
|
resolution: "static-required",
|
|
1407
1411
|
issueCode: "play_authoring_binding_invalid",
|
|
1408
|
-
description: "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.
|
|
1409
|
-
errorMessage: 'runtime.size must be the static literal "standard", "large", or "
|
|
1412
|
+
description: "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.",
|
|
1413
|
+
errorMessage: 'runtime.size must be the static literal "standard", "large", "xlarge", "1gb", "4gb", or "8gb".'
|
|
1410
1414
|
},
|
|
1411
1415
|
"ctx.customerDb.query.statement": {
|
|
1412
1416
|
schema: _typebox.Type.Union([
|
|
@@ -4472,7 +4476,7 @@ function sandboxRuntimeDeclarationFromOptions(node, context) {
|
|
|
4472
4476
|
) : [];
|
|
4473
4477
|
if (unsupportedProperties.length > 0) {
|
|
4474
4478
|
throw new Error(
|
|
4475
|
-
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"} "${unsupportedProperties.join('", "')}". Use runtime.size with a Deepline prebuilt sandbox. Supported sizes:
|
|
4479
|
+
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"} "${unsupportedProperties.join('", "')}". Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${_chunkYGCKMI5Pjs.SUPPORTED_PLAY_SANDBOX_SIZES}.`
|
|
4476
4480
|
);
|
|
4477
4481
|
}
|
|
4478
4482
|
const timeout = resolveStaticProperty(runtime.value, "timeout", context);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkV7I65ME7js = require('./chunk-V7I65ME7.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkIWYWZXCAjs = require('./chunk-IWYWZXCA.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/play-run-admission.ts
|
|
11
11
|
function usesInlinePlayAdmission(command, args) {
|
|
@@ -14,17 +14,17 @@ function usesInlinePlayAdmission(command, args) {
|
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
16
|
async function checkPlayRunCompatibility(baseUrl, maintenancePolicy = "configured") {
|
|
17
|
-
if (maintenancePolicy !== "off")
|
|
18
|
-
const compatibility = await
|
|
17
|
+
if (maintenancePolicy !== "off") _chunkIWYWZXCAjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
18
|
+
const compatibility = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
19
19
|
"cli.sdk_compatibility",
|
|
20
20
|
{ baseUrl, command: "plays run" },
|
|
21
|
-
() =>
|
|
21
|
+
() => _chunkIWYWZXCAjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
22
22
|
command: "plays run",
|
|
23
23
|
persistCache: maintenancePolicy !== "off"
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
26
|
if (compatibility.error) throw compatibility.error;
|
|
27
|
-
|
|
27
|
+
_chunkIWYWZXCAjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
28
28
|
quietAdvisory: true
|
|
29
29
|
});
|
|
30
30
|
}
|