deepline 0.3.495 → 0.3.496
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 +91 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +5 -19
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +79 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-control.ts +19 -3
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-gateway-drain.ts +110 -66
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +57 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +19 -10
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +26 -6
- package/dist/bundling-sources/shared_libs/product-notifications/slack-payload.ts +4 -1
- package/dist/cli/{auth-B2YUNFQ6.mjs → auth-EU4EFRDJ.mjs} +5 -5
- package/dist/cli/auth-SHWC5FMY.js +43 -0
- package/dist/cli/{billing-2Q7TMNRE.js → billing-4JJLTVK4.js} +80 -80
- package/dist/cli/{billing-5TR7ZBZM.mjs → billing-GMVH3RBX.mjs} +7 -7
- package/dist/cli/{chunk-ACVT5LPN.js → chunk-3HIPDJWJ.js} +53 -53
- package/dist/cli/{chunk-DFK5IJMT.mjs → chunk-3KA466RV.mjs} +1 -1
- package/dist/cli/{chunk-SC5GHGFD.mjs → chunk-4NKAM4GX.mjs} +2 -2
- package/dist/cli/{chunk-Z33PZUWG.js → chunk-5GK6J7MH.js} +5 -5
- package/dist/cli/{chunk-TSKVPEVZ.mjs → chunk-5M4PLPTR.mjs} +46 -3
- package/dist/cli/{chunk-CTFR52JC.js → chunk-5YSIHOGV.js} +26 -26
- package/dist/cli/{chunk-RBBOUPME.mjs → chunk-6QIAEXRH.mjs} +1 -1
- package/dist/cli/{chunk-CKLJAQIV.mjs → chunk-6UUZM4FY.mjs} +5 -5
- package/dist/cli/{chunk-T4PGA6UD.js → chunk-73CBLBNP.js} +1 -1
- package/dist/cli/{chunk-FC4JGTFC.mjs → chunk-7NBDLK3N.mjs} +1 -1
- package/dist/cli/{chunk-HJ5LYO6U.mjs → chunk-7Q7VPFPR.mjs} +2 -2
- package/dist/cli/{chunk-I66IWCY4.mjs → chunk-7U6W3CKT.mjs} +4 -4
- package/dist/cli/{chunk-TUAEM76Y.js → chunk-AOBAVBSX.js} +108 -65
- package/dist/cli/{chunk-KG2FUYWB.mjs → chunk-CNMIYEB4.mjs} +3 -3
- package/dist/cli/{chunk-DVQHG6AM.mjs → chunk-CS2AEAD6.mjs} +63 -11
- package/dist/cli/{chunk-MG3WST3Z.mjs → chunk-DFW6P6ZN.mjs} +2 -2
- package/dist/cli/{chunk-L5ZXEYTQ.mjs → chunk-E3KXXJWR.mjs} +6 -6
- package/dist/cli/{chunk-PKV5CD3W.js → chunk-EQR5O2D2.js} +87 -35
- package/dist/cli/{chunk-CAWE3MS2.js → chunk-EX4JEFYI.js} +16 -16
- package/dist/cli/{chunk-S2QARJLX.mjs → chunk-FXPICCUU.mjs} +1 -1
- package/dist/cli/{chunk-7OGADAAA.js → chunk-GKZUGHDK.js} +6 -6
- package/dist/cli/{chunk-PHO53W67.js → chunk-GRIHMNYM.js} +4 -4
- package/dist/cli/{chunk-UKGOZOTT.js → chunk-HIAFBOYA.js} +8 -8
- package/dist/cli/{chunk-FLJSK32S.mjs → chunk-IMWJRBV5.mjs} +1 -1
- package/dist/cli/{chunk-OFBDI5S3.mjs → chunk-IXPZROZX.mjs} +2 -2
- package/dist/cli/{chunk-ZBQBH4IT.js → chunk-J55ZM5CK.js} +3 -3
- package/dist/cli/{chunk-TCNILHMS.js → chunk-JEPNE4N5.js} +5 -5
- package/dist/cli/{chunk-5OKQPDYJ.js → chunk-JU4LIA2T.js} +7 -7
- package/dist/cli/{chunk-UMFZQREB.js → chunk-KKI5GWED.js} +94 -94
- package/dist/cli/{chunk-UDFO2MWA.js → chunk-MWQ3WQ4Q.js} +41 -41
- package/dist/cli/{chunk-XR6RCBB3.mjs → chunk-O36ZPHJG.mjs} +10 -10
- package/dist/cli/{chunk-XAOLMEN5.js → chunk-PHVRS56F.js} +14 -14
- package/dist/cli/{chunk-WVL5HGUG.js → chunk-QEBQIGXP.js} +2 -2
- package/dist/cli/{chunk-LQKZG5RN.js → chunk-QN6IULFT.js} +53 -53
- package/dist/cli/{chunk-SR6VS5PG.mjs → chunk-QYXUZX5N.mjs} +4 -4
- package/dist/cli/{chunk-B3ROCZ5Y.js → chunk-QZ7I4NZZ.js} +2 -2
- package/dist/cli/{chunk-7LLUJQM5.mjs → chunk-R4H5MCG4.mjs} +4 -4
- package/dist/cli/{chunk-H5L2Q2GI.mjs → chunk-SH6HOR25.mjs} +2 -2
- package/dist/cli/{chunk-TMO7W4P2.mjs → chunk-U6SE6757.mjs} +1 -1
- package/dist/cli/{chunk-7YNZRALI.mjs → chunk-UT3ORL35.mjs} +3 -3
- package/dist/cli/{chunk-PEIOQKTA.js → chunk-UTG3STCR.js} +3 -3
- package/dist/cli/{chunk-XKYQR3QK.js → chunk-W7DZ6UGP.js} +3 -3
- package/dist/cli/{chunk-ZB6UYG5I.mjs → chunk-WCBZHSC4.mjs} +5 -5
- package/dist/cli/{chunk-Y2DUGUUU.js → chunk-WEGGJMNF.js} +21 -21
- package/dist/cli/{chunk-JRBQC6L4.mjs → chunk-WTZ7Y3IZ.mjs} +2 -2
- package/dist/cli/{chunk-TFMV3NKL.mjs → chunk-YHFW7MBT.mjs} +1 -1
- package/dist/cli/{chunk-XX6PRYFI.js → chunk-Z27R2BG7.js} +16 -16
- package/dist/cli/{chunk-MAMEKGLI.js → chunk-ZL4Q4T3G.js} +7 -7
- package/dist/cli/{csv-5UQXKWLE.mjs → csv-ET7ESAPM.mjs} +4 -4
- package/dist/cli/{csv-DZQ77T67.js → csv-JWBLNEPC.js} +13 -13
- package/dist/cli/{db-JIPLUHA6.js → db-3ZGQXWTQ.js} +28 -28
- package/dist/cli/{db-F62BVFTP.mjs → db-4PIWQPR6.mjs} +7 -7
- package/dist/cli/describe-KO3OQBIR.js +50 -0
- package/dist/cli/{describe-J7KYHONJ.mjs → describe-OREUCFC2.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-XB4F2KZD.mjs → executions-HW6PMZOF.mjs} +7 -7
- package/dist/cli/{executions-XQ4FNJ27.js → executions-YR545MRU.js} +9 -9
- package/dist/cli/{feedback-5CR4CJ6W.mjs → feedback-B2FJ6HPA.mjs} +4 -4
- package/dist/cli/{feedback-Q6JRCMDV.js → feedback-FNVHJQEC.js} +8 -8
- package/dist/cli/{git-P5WBBUT3.mjs → git-CCNPW3CA.mjs} +5 -5
- package/dist/cli/git-X2QJ2B5O.js +25 -0
- package/dist/cli/index.js +137 -137
- package/dist/cli/index.mjs +40 -40
- package/dist/cli/{legacy-noops-EJAB6III.js → legacy-noops-2EBZS45D.js} +8 -8
- package/dist/cli/{legacy-noops-H5JJVYZ2.mjs → legacy-noops-VJLCXTPB.mjs} +5 -5
- package/dist/cli/{monitors-QPFAT2J5.mjs → monitors-4AMETRW7.mjs} +190 -8
- package/dist/cli/{monitors-7DOGM7RO.js → monitors-JNWKPCN5.js} +318 -136
- package/dist/cli/{org-QOBB4IN3.js → org-7FUHVFYU.js} +73 -73
- package/dist/cli/{org-BH7ATDIJ.mjs → org-LO6GSCCG.mjs} +7 -7
- package/dist/cli/{pages-PJH2TXZQ.mjs → pages-PJ32M2PU.mjs} +7 -7
- package/dist/cli/{pages-PLTE54KM.js → pages-TT4TZOOV.js} +19 -19
- package/dist/cli/{play-ULTJ3LPA.mjs → play-QJEZAIZB.mjs} +19 -48
- package/dist/cli/{play-XZAPTF3T.js → play-VN7DFYDP.js} +618 -647
- package/dist/cli/{providers-6NUTRVE4.mjs → providers-24ER3SND.mjs} +7 -7
- package/dist/cli/{providers-SKXLW7M3.js → providers-IDFN2FCR.js} +10 -10
- package/dist/cli/{quickstart-JFCIIGII.js → quickstart-AQDCRVUQ.js} +6 -6
- package/dist/cli/{quickstart-5HMJMXVT.mjs → quickstart-FKENQU34.mjs} +4 -4
- package/dist/cli/{run-BRAXLCBC.js → run-HCASJQZY.js} +37 -37
- package/dist/cli/{run-2BJZPY4K.mjs → run-KXMRE5ZD.mjs} +23 -23
- package/dist/cli/{search-IDXSB2CV.mjs → search-3F2T33OE.mjs} +8 -8
- package/dist/cli/search-OGY6SQDJ.js +32 -0
- package/dist/cli/{search-output-CJ4TNYF7.js → search-output-GFCEGNCJ.js} +6 -6
- package/dist/cli/{search-output-AATMH4QG.mjs → search-output-U6PM5KAH.mjs} +4 -4
- package/dist/cli/{secrets-6SMKTBFT.js → secrets-KYVUP755.js} +16 -16
- package/dist/cli/{secrets-UQNEJSNG.mjs → secrets-ZZSOVXOX.mjs} +7 -7
- package/dist/cli/{sessions-MHTUVPSR.mjs → sessions-4Z62CVHL.mjs} +5 -5
- package/dist/cli/{sessions-W3KU4Q4X.js → sessions-7JFKTUQS.js} +6 -6
- package/dist/cli/{settings-KNYJ6GXK.mjs → settings-OXG7IRVC.mjs} +12 -12
- package/dist/cli/{settings-BA52NEU5.js → settings-X4PSK4EW.js} +79 -79
- package/dist/cli/{setup-D5HCJAVU.js → setup-NCJEDW4W.js} +49 -49
- package/dist/cli/{setup-TLTZ2YCO.mjs → setup-RB7JE6KA.mjs} +9 -9
- package/dist/cli/{skills-DPLM4EGS.mjs → skills-D4BR2WU2.mjs} +7 -7
- package/dist/cli/skills-WWWFRDCA.js +36 -0
- package/dist/cli/{tools-I4ZOJV23.mjs → tools-CEOD7VD5.mjs} +17 -17
- package/dist/cli/tools-QMSAA3LC.js +57 -0
- package/dist/cli/update-HTDFPN7L.js +34 -0
- package/dist/cli/{update-VIFS7IK5.mjs → update-UKUMQ6FC.mjs} +9 -9
- package/dist/cli/{workflow-TAQBNDV7.mjs → workflow-EKKTTSCJ.mjs} +8 -8
- package/dist/cli/{workflow-7REPOHXM.js → workflow-LFWQWZKS.js} +18 -18
- package/dist/{client-CKVH6tmp.d.ts → client-Cj3UqrCZ.d.ts} +1 -1
- package/dist/{client-BDT_LwuM.d.mts → client-DSCTVVRj.d.mts} +1 -1
- package/dist/{client-core-CEixe_C0.d.mts → client-core-B-8DTIN1.d.mts} +44 -3
- package/dist/{client-core-RS-d-vtY.d.ts → client-core-dI4KTuWS.d.ts} +44 -3
- package/dist/{compiler-manifest-CPEF48NM.d.mts → compiler-manifest-DlXDyndN.d.mts} +2 -0
- package/dist/{compiler-manifest-CPEF48NM.d.ts → compiler-manifest-DlXDyndN.d.ts} +2 -0
- package/dist/{errors-BWbPzqwo.d.mts → errors-BtriA2ld.d.mts} +1 -1
- package/dist/{errors-B-PJXveg.d.ts → errors-DmcLykM7.d.ts} +1 -1
- package/dist/{index-CvVxPpE8.d.ts → index--Jw-slHY.d.ts} +1 -1
- package/dist/{index-BJ8AA1F9.d.mts → index-DI0sR_fX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +110 -110
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +2 -2
- package/dist/plays/run-request.mjs +1 -1
- 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 +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-GAOWVOK4.js +0 -43
- package/dist/cli/describe-BA4RAZ7J.js +0 -50
- package/dist/cli/git-EAO432S2.js +0 -25
- package/dist/cli/search-4MU2G6HV.js +0 -32
- package/dist/cli/skills-SVUWVXCE.js +0 -36
- package/dist/cli/tools-RJSP76HX.js +0 -57
- package/dist/cli/update-YT6JPIC6.js +0 -34
|
@@ -10,6 +10,65 @@ import {
|
|
|
10
10
|
DeeplineError
|
|
11
11
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
12
12
|
|
|
13
|
+
// ../play-data-plane/column-names.ts
|
|
14
|
+
var POSTGRES_IDENTIFIER_MAX_BYTES = 63;
|
|
15
|
+
var HASH_SUFFIX_LENGTH = 10;
|
|
16
|
+
function normalizePlayColumnName(id, preserveAuthoredPrefix = true) {
|
|
17
|
+
const prefix = preserveAuthoredPrefix ? id.trim().match(/^_+/)?.[0] ?? "" : "";
|
|
18
|
+
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
19
|
+
const safe = `${prefix}${normalized || "column"}`;
|
|
20
|
+
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
21
|
+
}
|
|
22
|
+
function stableHexSuffix(value) {
|
|
23
|
+
let primary = 2166136261;
|
|
24
|
+
let secondary = 2166136261 ^ value.length;
|
|
25
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
26
|
+
const code = value.charCodeAt(index);
|
|
27
|
+
primary = Math.imul(primary ^ code, 16777619) >>> 0;
|
|
28
|
+
secondary = Math.imul(secondary ^ code + index, 16777619) >>> 0;
|
|
29
|
+
}
|
|
30
|
+
return `${primary.toString(16).padStart(8, "0")}${secondary.toString(16).padStart(8, "0")}`.slice(0, HASH_SUFFIX_LENGTH);
|
|
31
|
+
}
|
|
32
|
+
function sqlSafePlayColumnName(id) {
|
|
33
|
+
const prefixed = normalizePlayColumnName(id);
|
|
34
|
+
if (prefixed.length <= POSTGRES_IDENTIFIER_MAX_BYTES) {
|
|
35
|
+
return prefixed;
|
|
36
|
+
}
|
|
37
|
+
const hash = stableHexSuffix(prefixed);
|
|
38
|
+
const maxPrefixLength = POSTGRES_IDENTIFIER_MAX_BYTES - HASH_SUFFIX_LENGTH - 1;
|
|
39
|
+
const prefix = prefixed.slice(0, maxPrefixLength).replace(/_+$/g, "").slice(0, maxPrefixLength);
|
|
40
|
+
return `${prefix}_${hash}`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ../plays/static-pipeline.ts
|
|
44
|
+
function dedupeStaticFieldNames(fields) {
|
|
45
|
+
const seen = /* @__PURE__ */ new Set();
|
|
46
|
+
const out = [];
|
|
47
|
+
for (const field of fields) {
|
|
48
|
+
const trimmed = typeof field === "string" ? field.trim() : "";
|
|
49
|
+
if (!trimmed || seen.has(trimmed)) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
seen.add(trimmed);
|
|
53
|
+
out.push(trimmed);
|
|
54
|
+
}
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
function inputFieldFromStaticCsvArg(csvArg) {
|
|
58
|
+
if (typeof csvArg !== "string") return null;
|
|
59
|
+
const match = /^\(?\s*input\.([A-Za-z_$][\w$]*)\s*\)?(?:\s*\?\?[\s\S]+)?$/.exec(
|
|
60
|
+
csvArg.trim()
|
|
61
|
+
);
|
|
62
|
+
return match?.[1] ?? null;
|
|
63
|
+
}
|
|
64
|
+
function inputFieldsFromStaticCsvArgs(pipeline) {
|
|
65
|
+
const args = [
|
|
66
|
+
pipeline.csvArg,
|
|
67
|
+
...Array.isArray(pipeline.csvArgs) ? pipeline.csvArgs : []
|
|
68
|
+
];
|
|
69
|
+
return dedupeStaticFieldNames(args.map(inputFieldFromStaticCsvArg));
|
|
70
|
+
}
|
|
71
|
+
|
|
13
72
|
// ../play-runtime/run-lifecycle-policy.ts
|
|
14
73
|
var TERMINAL_PLAY_RUN_STATUSES = /* @__PURE__ */ new Set([
|
|
15
74
|
"completed",
|
|
@@ -418,13 +477,6 @@ function stringMetadata(metadata, key) {
|
|
|
418
477
|
const value = metadata?.[key];
|
|
419
478
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
420
479
|
}
|
|
421
|
-
function inputFieldFromCsvArg(csvArg) {
|
|
422
|
-
if (typeof csvArg !== "string") return null;
|
|
423
|
-
const match = /^\(?\s*input\.([A-Za-z_$][\w$]*)\s*\)?(?:\s*\?\?[\s\S]+)?$/.exec(
|
|
424
|
-
csvArg.trim()
|
|
425
|
-
);
|
|
426
|
-
return match?.[1] ?? null;
|
|
427
|
-
}
|
|
428
480
|
function fileInputBindingsFromPlaySchema(inputSchema) {
|
|
429
481
|
const csvInput = schemaMetadata(inputSchema, "csvInput");
|
|
430
482
|
if (!csvInput) return [];
|
|
@@ -438,10 +490,9 @@ function fileInputBindingsFromStaticPipeline(staticPipeline) {
|
|
|
438
490
|
if (!staticPipeline || typeof staticPipeline !== "object" || Array.isArray(staticPipeline)) {
|
|
439
491
|
return [];
|
|
440
492
|
}
|
|
441
|
-
|
|
442
|
-
staticPipeline
|
|
443
|
-
);
|
|
444
|
-
return inputField ? [{ inputPath: inputField }] : [];
|
|
493
|
+
return inputFieldsFromStaticCsvArgs(
|
|
494
|
+
staticPipeline
|
|
495
|
+
).map((inputPath) => ({ inputPath }));
|
|
445
496
|
}
|
|
446
497
|
function playRunFileInputBindings(play) {
|
|
447
498
|
return [
|
|
@@ -794,6 +845,7 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
|
|
|
794
845
|
}
|
|
795
846
|
|
|
796
847
|
export {
|
|
848
|
+
sqlSafePlayColumnName,
|
|
797
849
|
isTerminalPlayRunLifecycleStatus,
|
|
798
850
|
decodePlayRunPublicStatus,
|
|
799
851
|
PLAY_RUN_START_PATH,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
printCommandEnvelope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WTZ7Y3IZ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
agentSessionIdFromEnvironment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IMWJRBV5.mjs";
|
|
8
8
|
|
|
9
9
|
// src/cli/commands/sessions.ts
|
|
10
10
|
import {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seedToolListScript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O36ZPHJG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
addDescribeOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FXPICCUU.mjs";
|
|
7
7
|
import {
|
|
8
8
|
describeLookupsFor,
|
|
9
9
|
describeName,
|
|
@@ -14,18 +14,18 @@ import {
|
|
|
14
14
|
} from "./chunk-SAW3FBCA.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeeplineClient
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4NKAM4GX.mjs";
|
|
18
18
|
import {
|
|
19
19
|
failureReportHeaders,
|
|
20
20
|
isFailureReportingDisabled
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QYXUZX5N.mjs";
|
|
22
22
|
import {
|
|
23
23
|
printCommandEnvelope
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WTZ7Y3IZ.mjs";
|
|
25
25
|
import {
|
|
26
26
|
autoDetectBaseUrl,
|
|
27
27
|
resolveApiKeyForBaseUrl
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-7NBDLK3N.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/describe.ts
|
|
31
31
|
import { writeFileSync } from "fs";
|
|
@@ -10,6 +10,65 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
10
10
|
|
|
11
11
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
12
12
|
|
|
13
|
+
// ../play-data-plane/column-names.ts
|
|
14
|
+
var POSTGRES_IDENTIFIER_MAX_BYTES = 63;
|
|
15
|
+
var HASH_SUFFIX_LENGTH = 10;
|
|
16
|
+
function normalizePlayColumnName(id, preserveAuthoredPrefix = true) {
|
|
17
|
+
const prefix = preserveAuthoredPrefix ? _nullishCoalesce(_optionalChain([id, 'access', _ => _.trim, 'call', _2 => _2(), 'access', _3 => _3.match, 'call', _4 => _4(/^_+/), 'optionalAccess', _5 => _5[0]]), () => ( "")) : "";
|
|
18
|
+
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
19
|
+
const safe = `${prefix}${normalized || "column"}`;
|
|
20
|
+
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
21
|
+
}
|
|
22
|
+
function stableHexSuffix(value) {
|
|
23
|
+
let primary = 2166136261;
|
|
24
|
+
let secondary = 2166136261 ^ value.length;
|
|
25
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
26
|
+
const code = value.charCodeAt(index);
|
|
27
|
+
primary = Math.imul(primary ^ code, 16777619) >>> 0;
|
|
28
|
+
secondary = Math.imul(secondary ^ code + index, 16777619) >>> 0;
|
|
29
|
+
}
|
|
30
|
+
return `${primary.toString(16).padStart(8, "0")}${secondary.toString(16).padStart(8, "0")}`.slice(0, HASH_SUFFIX_LENGTH);
|
|
31
|
+
}
|
|
32
|
+
function sqlSafePlayColumnName(id) {
|
|
33
|
+
const prefixed = normalizePlayColumnName(id);
|
|
34
|
+
if (prefixed.length <= POSTGRES_IDENTIFIER_MAX_BYTES) {
|
|
35
|
+
return prefixed;
|
|
36
|
+
}
|
|
37
|
+
const hash = stableHexSuffix(prefixed);
|
|
38
|
+
const maxPrefixLength = POSTGRES_IDENTIFIER_MAX_BYTES - HASH_SUFFIX_LENGTH - 1;
|
|
39
|
+
const prefix = prefixed.slice(0, maxPrefixLength).replace(/_+$/g, "").slice(0, maxPrefixLength);
|
|
40
|
+
return `${prefix}_${hash}`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ../plays/static-pipeline.ts
|
|
44
|
+
function dedupeStaticFieldNames(fields) {
|
|
45
|
+
const seen = /* @__PURE__ */ new Set();
|
|
46
|
+
const out = [];
|
|
47
|
+
for (const field of fields) {
|
|
48
|
+
const trimmed = typeof field === "string" ? field.trim() : "";
|
|
49
|
+
if (!trimmed || seen.has(trimmed)) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
seen.add(trimmed);
|
|
53
|
+
out.push(trimmed);
|
|
54
|
+
}
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
function inputFieldFromStaticCsvArg(csvArg) {
|
|
58
|
+
if (typeof csvArg !== "string") return null;
|
|
59
|
+
const match = /^\(?\s*input\.([A-Za-z_$][\w$]*)\s*\)?(?:\s*\?\?[\s\S]+)?$/.exec(
|
|
60
|
+
csvArg.trim()
|
|
61
|
+
);
|
|
62
|
+
return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _6 => _6[1]]), () => ( null));
|
|
63
|
+
}
|
|
64
|
+
function inputFieldsFromStaticCsvArgs(pipeline) {
|
|
65
|
+
const args = [
|
|
66
|
+
pipeline.csvArg,
|
|
67
|
+
...Array.isArray(pipeline.csvArgs) ? pipeline.csvArgs : []
|
|
68
|
+
];
|
|
69
|
+
return dedupeStaticFieldNames(args.map(inputFieldFromStaticCsvArg));
|
|
70
|
+
}
|
|
71
|
+
|
|
13
72
|
// ../play-runtime/run-lifecycle-policy.ts
|
|
14
73
|
var TERMINAL_PLAY_RUN_STATUSES = /* @__PURE__ */ new Set([
|
|
15
74
|
"completed",
|
|
@@ -140,10 +199,10 @@ function buildPlayRunStartBody(request) {
|
|
|
140
199
|
...request.runtimeArtifact ? { runtimeArtifact: request.runtimeArtifact } : {},
|
|
141
200
|
...request.compilerManifest ? { compilerManifest: request.compilerManifest } : {},
|
|
142
201
|
...request.inputFileUpload ? { inputFileUpload: request.inputFileUpload } : {},
|
|
143
|
-
..._optionalChain([request, 'access',
|
|
202
|
+
..._optionalChain([request, 'access', _7 => _7.packagedFileUploads, 'optionalAccess', _8 => _8.length]) ? { packagedFileUploads: request.packagedFileUploads } : {},
|
|
144
203
|
...request.input ? { input: request.input } : {},
|
|
145
204
|
...request.inputFile ? { inputFile: request.inputFile } : {},
|
|
146
|
-
..._optionalChain([request, 'access',
|
|
205
|
+
..._optionalChain([request, 'access', _9 => _9.packagedFiles, 'optionalAccess', _10 => _10.length]) ? { packagedFiles: request.packagedFiles } : {},
|
|
147
206
|
...request.force ? { force: true } : {},
|
|
148
207
|
...request.forceToolRefresh === true ? { forceToolRefresh: true } : {},
|
|
149
208
|
...typeof request.maxConcurrentExternalCalls === "number" ? { maxConcurrentExternalCalls: request.maxConcurrentExternalCalls } : {},
|
|
@@ -162,14 +221,14 @@ function buildPlayRunStartBody(request) {
|
|
|
162
221
|
}
|
|
163
222
|
async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
164
223
|
const assertAdmissionActive = () => {
|
|
165
|
-
_optionalChain([options, 'optionalAccess',
|
|
166
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
224
|
+
_optionalChain([options, 'optionalAccess', _11 => _11.signal, 'optionalAccess', _12 => _12.throwIfAborted, 'call', _13 => _13()]);
|
|
225
|
+
if (_optionalChain([options, 'optionalAccess', _14 => _14.deadlineAt]) !== void 0 && Date.now() >= options.deadlineAt) {
|
|
167
226
|
const error = new Error("Play admission exceeded its wait deadline.");
|
|
168
227
|
error.name = "AbortError";
|
|
169
228
|
throw error;
|
|
170
229
|
}
|
|
171
230
|
};
|
|
172
|
-
const callerIntentV2 = _optionalChain([options, 'optionalAccess',
|
|
231
|
+
const callerIntentV2 = _optionalChain([options, 'optionalAccess', _15 => _15.callerIntentV2]) === true;
|
|
173
232
|
if (callerIntentV2 && (onSubmission || request.maxTotalCredits !== void 0)) {
|
|
174
233
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
175
234
|
"Versioned CLI Play admission requires a new, unjournaled run without a strict total budget.",
|
|
@@ -179,9 +238,9 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
179
238
|
}
|
|
180
239
|
assertAdmissionActive();
|
|
181
240
|
const capability = callerIntentV2 ? null : options && Object.hasOwn(options, "admissionCapability") ? await awaitWithAbort(options.admissionCapability, options.signal) : await readPlayRunAdmissionCapability(http, options);
|
|
182
|
-
const supportsCallerIntent = callerIntentV2 || _optionalChain([capability, 'optionalAccess',
|
|
241
|
+
const supportsCallerIntent = callerIntentV2 || _optionalChain([capability, 'optionalAccess', _16 => _16.admissionContract]) === "caller-intent-v1";
|
|
183
242
|
assertAdmissionActive();
|
|
184
|
-
if (supportsCallerIntent && !callerIntentV2 && (!_optionalChain([capability, 'optionalAccess',
|
|
243
|
+
if (supportsCallerIntent && !callerIntentV2 && (!_optionalChain([capability, 'optionalAccess', _17 => _17.orgId]) || request.admissionOrgId && request.admissionOrgId !== capability.orgId)) {
|
|
185
244
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
186
245
|
"The admission workspace could not be pinned to this request; execution was not submitted.",
|
|
187
246
|
409,
|
|
@@ -195,7 +254,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
195
254
|
"PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
|
|
196
255
|
);
|
|
197
256
|
}
|
|
198
|
-
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess',
|
|
257
|
+
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _18 => _18.strictTotalBudget]) === "unbounded-v1") {
|
|
199
258
|
if (request.maxTotalCredits === 0) {
|
|
200
259
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
201
260
|
"A zero-credit total budget cannot admit a Play: sandbox compute is billed even when provider tools are free.",
|
|
@@ -209,7 +268,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
209
268
|
"PLAY_TOTAL_BUDGET_UNBOUNDED"
|
|
210
269
|
);
|
|
211
270
|
}
|
|
212
|
-
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess',
|
|
271
|
+
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _19 => _19.strictTotalBudget]) !== "fail-closed-v1") {
|
|
213
272
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
214
273
|
"This server cannot honor a strict total Play budget. Execution was not submitted.",
|
|
215
274
|
409,
|
|
@@ -234,7 +293,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
234
293
|
);
|
|
235
294
|
}
|
|
236
295
|
if (onSubmission) {
|
|
237
|
-
if (!workflowId || !_optionalChain([capability, 'optionalAccess',
|
|
296
|
+
if (!workflowId || !_optionalChain([capability, 'optionalAccess', _20 => _20.orgId])) {
|
|
238
297
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
239
298
|
"This server cannot persist a recoverable submission intent. Execution was not submitted.",
|
|
240
299
|
409,
|
|
@@ -283,7 +342,7 @@ async function startPlayRun(http, request, headers, options) {
|
|
|
283
342
|
} = await preparePlayRunAdmission(
|
|
284
343
|
http,
|
|
285
344
|
request,
|
|
286
|
-
_optionalChain([options, 'optionalAccess',
|
|
345
|
+
_optionalChain([options, 'optionalAccess', _21 => _21.onSubmission]),
|
|
287
346
|
options
|
|
288
347
|
);
|
|
289
348
|
return submitPreparedPlayRunAdmission(
|
|
@@ -301,14 +360,14 @@ async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, s
|
|
|
301
360
|
let response;
|
|
302
361
|
try {
|
|
303
362
|
response = await http.post(
|
|
304
|
-
_optionalChain([options, 'optionalAccess',
|
|
363
|
+
_optionalChain([options, 'optionalAccess', _22 => _22.callerIntentV2]) ? CLI_PLAY_RUN_CALLER_INTENT_V2_PATH : _optionalChain([options, 'optionalAccess', _23 => _23.cliAdmission]) ? CLI_PLAY_RUN_START_PATH : PLAY_RUN_START_PATH,
|
|
305
364
|
submittedBody,
|
|
306
365
|
headers,
|
|
307
366
|
{
|
|
308
367
|
maxRetries: 0,
|
|
309
368
|
exactUrlOnly: true,
|
|
310
|
-
..._optionalChain([options, 'optionalAccess',
|
|
311
|
-
..._optionalChain([options, 'optionalAccess',
|
|
369
|
+
..._optionalChain([options, 'optionalAccess', _24 => _24.signal]) ? { signal: options.signal } : {},
|
|
370
|
+
..._optionalChain([options, 'optionalAccess', _25 => _25.cliAdmission]) || _optionalChain([options, 'optionalAccess', _26 => _26.callerIntentV2]) ? {
|
|
312
371
|
onResponse: (response2) => {
|
|
313
372
|
cliAdmissionSupported = response2.headers.get(CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
|
|
314
373
|
callerIntentV2Supported = response2.headers.get(
|
|
@@ -319,12 +378,12 @@ async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, s
|
|
|
319
378
|
}
|
|
320
379
|
);
|
|
321
380
|
} catch (error) {
|
|
322
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
381
|
+
if (_optionalChain([options, 'optionalAccess', _27 => _27.callerIntentV2]) && !callerIntentV2Supported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
323
382
|
throw new CliPlayAdmissionCallerIntentV2UnsupportedError(
|
|
324
383
|
error.statusCode
|
|
325
384
|
);
|
|
326
385
|
}
|
|
327
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
386
|
+
if (_optionalChain([options, 'optionalAccess', _28 => _28.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
328
387
|
throw new CliPlayAdmissionUnsupportedError(error.statusCode);
|
|
329
388
|
}
|
|
330
389
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && ["NETWORK_TIMEOUT", "NETWORK_ERROR", "FETCH_FAILED"].includes(
|
|
@@ -349,7 +408,7 @@ async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, s
|
|
|
349
408
|
}
|
|
350
409
|
throw error;
|
|
351
410
|
}
|
|
352
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
411
|
+
if (_optionalChain([options, 'optionalAccess', _29 => _29.callerIntentV2]) && !callerIntentV2Supported) {
|
|
353
412
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
354
413
|
"The versioned CLI Play admission response did not prove its contract. Inspect this run before submitting again.",
|
|
355
414
|
void 0,
|
|
@@ -362,7 +421,7 @@ async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, s
|
|
|
362
421
|
);
|
|
363
422
|
}
|
|
364
423
|
const started = normalizePlayRunStart(response);
|
|
365
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
424
|
+
if (_optionalChain([options, 'optionalAccess', _30 => _30.cliAdmission]) && (!started.workflowId || started.workflowId === "pending")) {
|
|
366
425
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
367
426
|
"Play admission returned no run id. Check recent runs before submitting again.",
|
|
368
427
|
void 0,
|
|
@@ -373,7 +432,7 @@ async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, s
|
|
|
373
432
|
}
|
|
374
433
|
function isPlayRunPackage(value) {
|
|
375
434
|
return Boolean(
|
|
376
|
-
value && typeof value === "object" && !Array.isArray(value) && value.kind === "play_run" && value.run && typeof _optionalChain([value, 'access',
|
|
435
|
+
value && typeof value === "object" && !Array.isArray(value) && value.kind === "play_run" && value.run && typeof _optionalChain([value, 'access', _31 => _31.run, 'optionalAccess', _32 => _32.id]) === "string"
|
|
377
436
|
);
|
|
378
437
|
}
|
|
379
438
|
function normalizePlayRunStart(raw) {
|
|
@@ -415,16 +474,9 @@ function schemaMetadata(schema, key) {
|
|
|
415
474
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
416
475
|
}
|
|
417
476
|
function stringMetadata(metadata, key) {
|
|
418
|
-
const value = _optionalChain([metadata, 'optionalAccess',
|
|
477
|
+
const value = _optionalChain([metadata, 'optionalAccess', _33 => _33[key]]);
|
|
419
478
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
420
479
|
}
|
|
421
|
-
function inputFieldFromCsvArg(csvArg) {
|
|
422
|
-
if (typeof csvArg !== "string") return null;
|
|
423
|
-
const match = /^\(?\s*input\.([A-Za-z_$][\w$]*)\s*\)?(?:\s*\?\?[\s\S]+)?$/.exec(
|
|
424
|
-
csvArg.trim()
|
|
425
|
-
);
|
|
426
|
-
return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _28 => _28[1]]), () => ( null));
|
|
427
|
-
}
|
|
428
480
|
function fileInputBindingsFromPlaySchema(inputSchema) {
|
|
429
481
|
const csvInput = schemaMetadata(inputSchema, "csvInput");
|
|
430
482
|
if (!csvInput) return [];
|
|
@@ -438,10 +490,9 @@ function fileInputBindingsFromStaticPipeline(staticPipeline) {
|
|
|
438
490
|
if (!staticPipeline || typeof staticPipeline !== "object" || Array.isArray(staticPipeline)) {
|
|
439
491
|
return [];
|
|
440
492
|
}
|
|
441
|
-
|
|
442
|
-
staticPipeline
|
|
443
|
-
);
|
|
444
|
-
return inputField ? [{ inputPath: inputField }] : [];
|
|
493
|
+
return inputFieldsFromStaticCsvArgs(
|
|
494
|
+
staticPipeline
|
|
495
|
+
).map((inputPath) => ({ inputPath }));
|
|
445
496
|
}
|
|
446
497
|
function playRunFileInputBindings(play) {
|
|
447
498
|
return [
|
|
@@ -554,7 +605,7 @@ async function uploadStagedFileToPresignedUrl(input) {
|
|
|
554
605
|
return;
|
|
555
606
|
}
|
|
556
607
|
const text = await response.text().catch(() => "");
|
|
557
|
-
const egressDenied = response.status === 403 && _optionalChain([response, 'access',
|
|
608
|
+
const egressDenied = response.status === 403 && _optionalChain([response, 'access', _34 => _34.headers, 'access', _35 => _35.get, 'call', _36 => _36("x-deny-reason"), 'optionalAccess', _37 => _37.trim, 'call', _38 => _38(), 'access', _39 => _39.toLowerCase, 'call', _40 => _40()]) === "host_not_allowed";
|
|
558
609
|
lastError = new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
559
610
|
`Direct storage upload of ${input.logicalPath} failed: ${response.status} ${text.slice(0, 200)}`,
|
|
560
611
|
response.status,
|
|
@@ -729,7 +780,7 @@ async function stageFileInputs(input) {
|
|
|
729
780
|
if (localFiles.length === 0) {
|
|
730
781
|
return { inputFile: null, packagedFiles: [] };
|
|
731
782
|
}
|
|
732
|
-
_optionalChain([input, 'access',
|
|
783
|
+
_optionalChain([input, 'access', _41 => _41.onStaging, 'optionalCall', _42 => _42(localFiles.length)]);
|
|
733
784
|
const uploads = await Promise.all(
|
|
734
785
|
localFiles.map(
|
|
735
786
|
async ({ file }) => createStagedFileUpload(file.logicalPath, await file.read(), input.codec)
|
|
@@ -784,7 +835,7 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
|
|
|
784
835
|
method: "POST",
|
|
785
836
|
headers: { "content-type": "application/json", ...headers },
|
|
786
837
|
body: JSON.stringify(body),
|
|
787
|
-
..._optionalChain([options, 'optionalAccess',
|
|
838
|
+
..._optionalChain([options, 'optionalAccess', _43 => _43.signal]) ? { signal: options.signal } : {}
|
|
788
839
|
}),
|
|
789
840
|
postFormData: (path, formData) => send(path, {
|
|
790
841
|
method: "POST",
|
|
@@ -830,4 +881,5 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
|
|
|
830
881
|
|
|
831
882
|
|
|
832
883
|
|
|
833
|
-
|
|
884
|
+
|
|
885
|
+
exports.sqlSafePlayColumnName = sqlSafePlayColumnName; exports.isTerminalPlayRunLifecycleStatus = isTerminalPlayRunLifecycleStatus; exports.decodePlayRunPublicStatus = decodePlayRunPublicStatus; exports.PLAY_RUN_START_PATH = PLAY_RUN_START_PATH; exports.CLI_PLAY_RUN_START_PATH = CLI_PLAY_RUN_START_PATH; exports.CLI_PLAY_RUN_CALLER_INTENT_V2_PATH = CLI_PLAY_RUN_CALLER_INTENT_V2_PATH; exports.CLI_PLAY_RUN_SUPPORTED_HEADER = CLI_PLAY_RUN_SUPPORTED_HEADER; exports.CLI_PLAY_RUN_CALLER_INTENT_V2_SUPPORTED_HEADER = CLI_PLAY_RUN_CALLER_INTENT_V2_SUPPORTED_HEADER; exports.PLAY_RUN_START_STREAM_PATH = PLAY_RUN_START_STREAM_PATH; exports.CLI_PLAY_RUN_START_STREAM_PATH = CLI_PLAY_RUN_START_STREAM_PATH; exports.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH = CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH; exports.PLAY_FILES_STAGE_PATH = PLAY_FILES_STAGE_PATH; exports.PLAY_FILES_STAGE_MINT_PATH = PLAY_FILES_STAGE_MINT_PATH; exports.CliPlayAdmissionUnsupportedError = CliPlayAdmissionUnsupportedError; exports.CliPlayAdmissionCallerIntentV2UnsupportedError = CliPlayAdmissionCallerIntentV2UnsupportedError; exports.buildPlayRunStartBody = buildPlayRunStartBody; exports.preparePlayRunAdmission = preparePlayRunAdmission; exports.readPlayRunAdmissionCapability = readPlayRunAdmissionCapability; exports.startPlayRun = startPlayRun; exports.submitPreparedPlayRunAdmission = submitPreparedPlayRunAdmission; exports.isPlayRunPackage = isPlayRunPackage; exports.normalizePlayRunStart = normalizePlayRunStart; exports.buildNamedPlayRunRequest = buildNamedPlayRunRequest; exports.CSV_DATA_INPUT_KEY = CSV_DATA_INPUT_KEY; exports.fileInputBindingsFromPlaySchema = fileInputBindingsFromPlaySchema; exports.fileInputBindingsFromStaticPipeline = fileInputBindingsFromStaticPipeline; exports.playRunFileInputBindings = playRunFileInputBindings; exports.getDottedInputValue = getDottedInputValue; exports.setDottedInputValue = setDottedInputValue; exports.webStagedFileCodec = webStagedFileCodec; exports.stagedFileContentType = stagedFileContentType; exports.createStagedFileUpload = createStagedFileUpload; exports.STAGE_LEGACY_MULTIPART_MAX_BYTES = STAGE_LEGACY_MULTIPART_MAX_BYTES; exports.mintStagedPlayFileUploads = mintStagedPlayFileUploads; exports.stagePlayFiles = stagePlayFiles; exports.stageFileInputs = stageFileInputs; exports.createSessionPlayRunHttp = createSessionPlayRunHttp;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKKI5GWEDjs = require('./chunk-KKI5GWED.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkUTG3STCRjs = require('./chunk-UTG3STCR.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,18 +14,18 @@ var _chunkI42EOZKQjs = require('./chunk-I42EOZKQ.js');
|
|
|
14
14
|
var _chunkJO5FFSR7js = require('./chunk-JO5FFSR7.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk5GK6J7MHjs = require('./chunk-5GK6J7MH.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkQN6IULFTjs = require('./chunk-QN6IULFT.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkZL4Q4T3Gjs = require('./chunk-ZL4Q4T3G.js');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkJ55ZM5CKjs = require('./chunk-J55ZM5CK.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/describe.ts
|
|
31
31
|
var _fs = require('fs');
|
|
@@ -34,14 +34,14 @@ var _path = require('path');
|
|
|
34
34
|
// src/cli/doc-read-reporting.ts
|
|
35
35
|
var REPORT_TIMEOUT_MS = 1e3;
|
|
36
36
|
async function reportDocRead(docId) {
|
|
37
|
-
if (
|
|
37
|
+
if (_chunkQN6IULFTjs.isFailureReportingDisabled.call(void 0, )) return;
|
|
38
38
|
try {
|
|
39
|
-
const baseUrl =
|
|
40
|
-
const apiKey =
|
|
39
|
+
const baseUrl = _chunkJ55ZM5CKjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
40
|
+
const apiKey = _chunkJ55ZM5CKjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
41
41
|
if (!apiKey) return;
|
|
42
42
|
await fetch(new URL("/api/v2/telemetry/doc-read", baseUrl), {
|
|
43
43
|
method: "POST",
|
|
44
|
-
headers:
|
|
44
|
+
headers: _chunkQN6IULFTjs.failureReportHeaders.call(void 0, apiKey),
|
|
45
45
|
body: JSON.stringify({ doc_id: docId }),
|
|
46
46
|
signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
|
|
47
47
|
});
|
|
@@ -54,16 +54,16 @@ function nothingNamed(name) {
|
|
|
54
54
|
return `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`;
|
|
55
55
|
}
|
|
56
56
|
function findNamed2(name, options) {
|
|
57
|
-
return _chunkI42EOZKQjs.findNamed.call(void 0, name, options, _chunkI42EOZKQjs.describeLookupsFor.call(void 0, new (0,
|
|
57
|
+
return _chunkI42EOZKQjs.findNamed.call(void 0, name, options, _chunkI42EOZKQjs.describeLookupsFor.call(void 0, new (0, _chunk5GK6J7MHjs.DeeplineClient)()));
|
|
58
58
|
}
|
|
59
59
|
async function describeAnything(name, options, onMissing) {
|
|
60
|
-
const client = new (0,
|
|
60
|
+
const client = new (0, _chunk5GK6J7MHjs.DeeplineClient)();
|
|
61
61
|
const lookups = _chunkI42EOZKQjs.describeLookupsFor.call(void 0, client);
|
|
62
62
|
const outcome = await _chunkI42EOZKQjs.describeName.call(void 0, name, options, {
|
|
63
63
|
...lookups,
|
|
64
64
|
// `tools describe` has already fetched the tool for its compatibility check.
|
|
65
65
|
tool: async (toolName) => _nullishCoalesce(options.fetchedTool, () => ( lookups.tool(toolName))),
|
|
66
|
-
seedStarterScript:
|
|
66
|
+
seedStarterScript: _chunkKKI5GWEDjs.seedToolListScript
|
|
67
67
|
});
|
|
68
68
|
if (outcome.status === "missing") {
|
|
69
69
|
if (onMissing) return onMissing();
|
|
@@ -89,18 +89,18 @@ function deliver(envelope, lines, { json, out }) {
|
|
|
89
89
|
` : text;
|
|
90
90
|
_fs.writeFileSync.call(void 0, path, content);
|
|
91
91
|
const bytes = Buffer.byteLength(content);
|
|
92
|
-
|
|
92
|
+
_chunkZL4Q4T3Gjs.printCommandEnvelope.call(void 0,
|
|
93
93
|
{ path, bytes },
|
|
94
94
|
{ json, text: `Wrote ${path} (${bytes} bytes)
|
|
95
95
|
` }
|
|
96
96
|
);
|
|
97
97
|
return 0;
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
_chunkZL4Q4T3Gjs.printCommandEnvelope.call(void 0, envelope, { json, text });
|
|
100
100
|
return 0;
|
|
101
101
|
}
|
|
102
102
|
function registerDescribeCommand(program) {
|
|
103
|
-
|
|
103
|
+
_chunkUTG3STCRjs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
|
|
104
104
|
"Describe anything search returns: a tool, monitor type, or play."
|
|
105
105
|
).addHelpText(
|
|
106
106
|
"after",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQZ7I4NZZjs = require('./chunk-QZ7I4NZZ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkQN6IULFTjs = require('./chunk-QN6IULFT.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/play-run-admission.ts
|
|
11
11
|
function usesInlinePlayAdmission(command, args) {
|
|
@@ -18,11 +18,11 @@ function usesCliPlayAdmission(command, args) {
|
|
|
18
18
|
}
|
|
19
19
|
async function checkPlayRunCompatibility(baseUrl, maintenancePolicy = "configured", signal) {
|
|
20
20
|
_optionalChain([signal, 'optionalAccess', _ => _.throwIfAborted, 'call', _2 => _2()]);
|
|
21
|
-
if (maintenancePolicy !== "off")
|
|
22
|
-
const compatibility = await
|
|
21
|
+
if (maintenancePolicy !== "off") _chunkQN6IULFTjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
22
|
+
const compatibility = await _chunkQZ7I4NZZjs.traceCliSpan.call(void 0,
|
|
23
23
|
"cli.sdk_compatibility",
|
|
24
24
|
{ baseUrl, command: "plays run" },
|
|
25
|
-
() =>
|
|
25
|
+
() => _chunkQN6IULFTjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
26
26
|
command: "plays run",
|
|
27
27
|
persistCache: maintenancePolicy !== "off",
|
|
28
28
|
signal
|
|
@@ -30,7 +30,7 @@ async function checkPlayRunCompatibility(baseUrl, maintenancePolicy = "configure
|
|
|
30
30
|
);
|
|
31
31
|
_optionalChain([signal, 'optionalAccess', _3 => _3.throwIfAborted, 'call', _4 => _4()]);
|
|
32
32
|
if (compatibility.error) throw compatibility.error;
|
|
33
|
-
|
|
33
|
+
_chunkQN6IULFTjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
34
34
|
quietAdvisory: true
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -16,12 +16,12 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
16
16
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunk73CBLBNPjs = require('./chunk-73CBLBNP.js');
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
|
-
var SDK_VERSION =
|
|
23
|
-
var SDK_API_MAJOR =
|
|
24
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
22
|
+
var SDK_VERSION = _chunk73CBLBNPjs.SDK_RELEASE.version;
|
|
23
|
+
var SDK_API_MAJOR = _chunk73CBLBNPjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
24
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunk73CBLBNPjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
25
25
|
|
|
26
26
|
// src/agent-runtime.ts
|
|
27
27
|
var _os = require('os');
|