deepline 0.3.494 → 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.
Files changed (162) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +103 -1
  2. package/dist/bundling-sources/sdk/src/plays/run-request.ts +5 -19
  3. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  4. package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +79 -0
  5. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
  6. package/dist/bundling-sources/shared_libs/observability/scheduled-work-control.ts +19 -3
  7. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +7 -1
  8. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-gateway-drain.ts +110 -66
  9. package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +57 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +8 -3
  11. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +2 -2
  12. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +15 -0
  13. package/dist/bundling-sources/shared_libs/plays/docflow.ts +19 -10
  14. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +26 -6
  15. package/dist/bundling-sources/shared_libs/product-notifications/slack-payload.ts +4 -1
  16. package/dist/cli/{auth-6X5YXMFN.mjs → auth-EU4EFRDJ.mjs} +5 -5
  17. package/dist/cli/auth-SHWC5FMY.js +43 -0
  18. package/dist/cli/{billing-5F5PZB77.js → billing-4JJLTVK4.js} +80 -80
  19. package/dist/cli/{billing-IN74SDSC.mjs → billing-GMVH3RBX.mjs} +7 -7
  20. package/dist/cli/{chunk-H46X7YDU.mjs → chunk-2HCZHIMT.mjs} +20 -0
  21. package/dist/cli/{chunk-3KVFOKPR.js → chunk-3HIPDJWJ.js} +53 -53
  22. package/dist/cli/{chunk-QOEI42IU.mjs → chunk-3KA466RV.mjs} +1 -1
  23. package/dist/cli/{chunk-GNSGDIA4.mjs → chunk-4NKAM4GX.mjs} +2 -2
  24. package/dist/cli/{chunk-BU5Y7HOD.js → chunk-5GK6J7MH.js} +5 -5
  25. package/dist/cli/{chunk-J2HOVZOE.mjs → chunk-5M4PLPTR.mjs} +53 -3
  26. package/dist/cli/{chunk-CAWOSHEC.js → chunk-5YSIHOGV.js} +26 -26
  27. package/dist/cli/{chunk-RPFNIMUO.mjs → chunk-6QIAEXRH.mjs} +1 -1
  28. package/dist/cli/{chunk-4RWH4LRQ.mjs → chunk-6UUZM4FY.mjs} +5 -5
  29. package/dist/cli/{chunk-S3XQH7DW.js → chunk-73CBLBNP.js} +1 -1
  30. package/dist/cli/{chunk-KR2XEI5T.mjs → chunk-7NBDLK3N.mjs} +1 -1
  31. package/dist/cli/{chunk-MWZNMWR2.mjs → chunk-7Q7VPFPR.mjs} +2 -2
  32. package/dist/cli/{chunk-6XZR2642.mjs → chunk-7U6W3CKT.mjs} +4 -4
  33. package/dist/cli/{chunk-CK5MA6S6.js → chunk-AOBAVBSX.js} +115 -65
  34. package/dist/cli/{chunk-L4QPBQUX.mjs → chunk-CNMIYEB4.mjs} +3 -3
  35. package/dist/cli/{chunk-DVQHG6AM.mjs → chunk-CS2AEAD6.mjs} +63 -11
  36. package/dist/cli/{chunk-ODWTFVE4.mjs → chunk-DFW6P6ZN.mjs} +2 -2
  37. package/dist/cli/{chunk-L2P2XRPO.mjs → chunk-E3KXXJWR.mjs} +6 -6
  38. package/dist/cli/{chunk-PKV5CD3W.js → chunk-EQR5O2D2.js} +87 -35
  39. package/dist/cli/{chunk-L6KA4ENU.js → chunk-EX4JEFYI.js} +16 -16
  40. package/dist/cli/{chunk-IPWYDANJ.mjs → chunk-FXPICCUU.mjs} +1 -1
  41. package/dist/cli/{chunk-5WYH2LAP.js → chunk-GKZUGHDK.js} +6 -6
  42. package/dist/cli/{chunk-HINVMRGQ.js → chunk-GRIHMNYM.js} +4 -4
  43. package/dist/cli/{chunk-VMPM2FKT.js → chunk-HIAFBOYA.js} +8 -8
  44. package/dist/cli/{chunk-FAT6CUZK.mjs → chunk-IMWJRBV5.mjs} +1 -1
  45. package/dist/cli/{chunk-IZJSX3SZ.mjs → chunk-IXPZROZX.mjs} +2 -2
  46. package/dist/cli/{chunk-Y4GRL533.js → chunk-J55ZM5CK.js} +3 -3
  47. package/dist/cli/{chunk-X6HIIHQO.js → chunk-JEPNE4N5.js} +5 -5
  48. package/dist/cli/{chunk-QSRWBOPV.js → chunk-JU4LIA2T.js} +7 -7
  49. package/dist/cli/{chunk-GSCCDGGT.js → chunk-KKI5GWED.js} +94 -94
  50. package/dist/cli/{chunk-WP45PUPW.js → chunk-MWQ3WQ4Q.js} +41 -41
  51. package/dist/cli/{chunk-AARXOBVD.js → chunk-N3T3L3WW.js} +20 -0
  52. package/dist/cli/{chunk-TLQXN4ZZ.mjs → chunk-O36ZPHJG.mjs} +10 -10
  53. package/dist/cli/{chunk-7B7A36XZ.js → chunk-PHVRS56F.js} +14 -14
  54. package/dist/cli/{chunk-GDNQXLBM.js → chunk-QEBQIGXP.js} +2 -2
  55. package/dist/cli/{chunk-USWLB4KV.js → chunk-QN6IULFT.js} +53 -53
  56. package/dist/cli/{chunk-BLHQRETG.mjs → chunk-QYXUZX5N.mjs} +4 -4
  57. package/dist/cli/{chunk-J3UHNUWI.js → chunk-QZ7I4NZZ.js} +2 -2
  58. package/dist/cli/{chunk-KVCQL6SP.mjs → chunk-R4H5MCG4.mjs} +4 -4
  59. package/dist/cli/{chunk-L6L57RSG.mjs → chunk-SH6HOR25.mjs} +2 -2
  60. package/dist/cli/{chunk-EG3OSUBO.mjs → chunk-U6SE6757.mjs} +1 -1
  61. package/dist/cli/{chunk-65NMOP4T.mjs → chunk-UT3ORL35.mjs} +3 -3
  62. package/dist/cli/{chunk-4ZKZS43N.js → chunk-UTG3STCR.js} +3 -3
  63. package/dist/cli/{chunk-GLDBMKTV.js → chunk-W7DZ6UGP.js} +3 -3
  64. package/dist/cli/{chunk-DKKAJ3U2.mjs → chunk-WCBZHSC4.mjs} +5 -5
  65. package/dist/cli/{chunk-BNI653WN.js → chunk-WEGGJMNF.js} +21 -21
  66. package/dist/cli/{chunk-6DMLWM7L.mjs → chunk-WTZ7Y3IZ.mjs} +2 -2
  67. package/dist/cli/{chunk-WCZBIE5L.mjs → chunk-YHFW7MBT.mjs} +1 -1
  68. package/dist/cli/{chunk-4A5WXQJK.js → chunk-Z27R2BG7.js} +16 -16
  69. package/dist/cli/{chunk-ZZD245Z2.js → chunk-ZL4Q4T3G.js} +7 -7
  70. package/dist/cli/command-docs.js +2 -2
  71. package/dist/cli/command-docs.mjs +1 -1
  72. package/dist/cli/{csv-UBW4ID5D.mjs → csv-ET7ESAPM.mjs} +4 -4
  73. package/dist/cli/{csv-QD7JJGSP.js → csv-JWBLNEPC.js} +13 -13
  74. package/dist/cli/{db-AARR3WYD.js → db-3ZGQXWTQ.js} +28 -28
  75. package/dist/cli/{db-QFDXKIVD.mjs → db-4PIWQPR6.mjs} +7 -7
  76. package/dist/cli/describe-KO3OQBIR.js +50 -0
  77. package/dist/cli/{describe-OBVIAC2H.mjs → describe-OREUCFC2.mjs} +18 -18
  78. package/dist/cli/describe-core.d.mts +3 -3
  79. package/dist/cli/describe-core.d.ts +3 -3
  80. package/dist/cli/{executions-IZYUDYTZ.mjs → executions-HW6PMZOF.mjs} +7 -7
  81. package/dist/cli/{executions-KXY7KMZY.js → executions-YR545MRU.js} +9 -9
  82. package/dist/cli/{feedback-IVCVBERN.mjs → feedback-B2FJ6HPA.mjs} +4 -4
  83. package/dist/cli/{feedback-3334HBPD.js → feedback-FNVHJQEC.js} +8 -8
  84. package/dist/cli/{git-JHNVET5A.mjs → git-CCNPW3CA.mjs} +5 -5
  85. package/dist/cli/git-X2QJ2B5O.js +25 -0
  86. package/dist/cli/index.js +141 -141
  87. package/dist/cli/index.mjs +41 -41
  88. package/dist/cli/{legacy-noops-DBA32JCV.js → legacy-noops-2EBZS45D.js} +8 -8
  89. package/dist/cli/{legacy-noops-WGVBUOCC.mjs → legacy-noops-VJLCXTPB.mjs} +5 -5
  90. package/dist/cli/{monitors-ZGANC7JY.mjs → monitors-4AMETRW7.mjs} +190 -8
  91. package/dist/cli/{monitors-GHWZ5AZS.js → monitors-JNWKPCN5.js} +318 -136
  92. package/dist/cli/{org-S7JWP264.js → org-7FUHVFYU.js} +73 -73
  93. package/dist/cli/{org-CUS42N2T.mjs → org-LO6GSCCG.mjs} +7 -7
  94. package/dist/cli/{pages-IH56T6L6.mjs → pages-PJ32M2PU.mjs} +21 -7
  95. package/dist/cli/{pages-QXRZDEJW.js → pages-TT4TZOOV.js} +33 -19
  96. package/dist/cli/{play-Z65ZFOQH.mjs → play-QJEZAIZB.mjs} +19 -48
  97. package/dist/cli/{play-4C5PYS62.js → play-VN7DFYDP.js} +618 -647
  98. package/dist/cli/{providers-FSZSJX4Z.mjs → providers-24ER3SND.mjs} +7 -7
  99. package/dist/cli/{providers-XYQGYF3O.js → providers-IDFN2FCR.js} +10 -10
  100. package/dist/cli/{quickstart-ZA25RJT3.js → quickstart-AQDCRVUQ.js} +6 -6
  101. package/dist/cli/{quickstart-DHWVE32I.mjs → quickstart-FKENQU34.mjs} +4 -4
  102. package/dist/cli/{run-5MP6LEHM.js → run-HCASJQZY.js} +37 -37
  103. package/dist/cli/{run-WRPPEPLG.mjs → run-KXMRE5ZD.mjs} +23 -23
  104. package/dist/cli/{search-A6NVJPKX.mjs → search-3F2T33OE.mjs} +8 -8
  105. package/dist/cli/search-OGY6SQDJ.js +32 -0
  106. package/dist/cli/{search-output-YA6TXWGO.js → search-output-GFCEGNCJ.js} +6 -6
  107. package/dist/cli/{search-output-PAOUMVXY.mjs → search-output-U6PM5KAH.mjs} +4 -4
  108. package/dist/cli/{secrets-AZYOGH3I.js → secrets-KYVUP755.js} +16 -16
  109. package/dist/cli/{secrets-ZGF7JOBI.mjs → secrets-ZZSOVXOX.mjs} +7 -7
  110. package/dist/cli/{sessions-RNEAXZPV.mjs → sessions-4Z62CVHL.mjs} +5 -5
  111. package/dist/cli/{sessions-GCIN5VXT.js → sessions-7JFKTUQS.js} +6 -6
  112. package/dist/cli/{settings-NO5KXQJF.mjs → settings-OXG7IRVC.mjs} +12 -12
  113. package/dist/cli/{settings-LMEZNLBB.js → settings-X4PSK4EW.js} +79 -79
  114. package/dist/cli/{setup-XKTZPYYH.js → setup-NCJEDW4W.js} +49 -49
  115. package/dist/cli/{setup-GCYB4IFS.mjs → setup-RB7JE6KA.mjs} +9 -9
  116. package/dist/cli/{skills-TY4HHIKH.mjs → skills-D4BR2WU2.mjs} +7 -7
  117. package/dist/cli/skills-WWWFRDCA.js +36 -0
  118. package/dist/cli/{tools-RDTHHYJ3.mjs → tools-CEOD7VD5.mjs} +17 -17
  119. package/dist/cli/tools-QMSAA3LC.js +57 -0
  120. package/dist/cli/update-HTDFPN7L.js +34 -0
  121. package/dist/cli/{update-BRLLTTCS.mjs → update-UKUMQ6FC.mjs} +9 -9
  122. package/dist/cli/{workflow-F72EVZWM.mjs → workflow-EKKTTSCJ.mjs} +8 -8
  123. package/dist/cli/{workflow-YHA4WE3K.js → workflow-LFWQWZKS.js} +18 -18
  124. package/dist/{client-97yTcdLl.d.ts → client-Cj3UqrCZ.d.ts} +1 -1
  125. package/dist/{client-CFo9qalW.d.mts → client-DSCTVVRj.d.mts} +1 -1
  126. package/dist/{client-core-Dl6xgfLq.d.mts → client-core-B-8DTIN1.d.mts} +49 -3
  127. package/dist/{client-core-BRZrY13B.d.ts → client-core-dI4KTuWS.d.ts} +49 -3
  128. package/dist/{compiler-manifest-CPEF48NM.d.ts → compiler-manifest-DlXDyndN.d.mts} +2 -0
  129. package/dist/{compiler-manifest-CPEF48NM.d.mts → compiler-manifest-DlXDyndN.d.ts} +2 -0
  130. package/dist/{errors-BWbPzqwo.d.mts → errors-BtriA2ld.d.mts} +1 -1
  131. package/dist/{errors-B-PJXveg.d.ts → errors-DmcLykM7.d.ts} +1 -1
  132. package/dist/{index-CvVxPpE8.d.ts → index--Jw-slHY.d.ts} +1 -1
  133. package/dist/{index-BJ8AA1F9.d.mts → index-DI0sR_fX.d.mts} +1 -1
  134. package/dist/index.d.mts +7 -7
  135. package/dist/index.d.ts +7 -7
  136. package/dist/index.js +10 -10
  137. package/dist/index.mjs +7 -7
  138. package/dist/install-integrity.json +112 -112
  139. package/dist/plays/bundle-play-file.d.mts +3 -3
  140. package/dist/plays/bundle-play-file.d.ts +3 -3
  141. package/dist/plays/play-description.d.mts +2 -2
  142. package/dist/plays/play-description.d.ts +2 -2
  143. package/dist/plays/run-request.d.mts +2 -2
  144. package/dist/plays/run-request.d.ts +2 -2
  145. package/dist/plays/run-request.js +2 -2
  146. package/dist/plays/run-request.mjs +1 -1
  147. package/dist/release.d.mts +1 -1
  148. package/dist/release.d.ts +1 -1
  149. package/dist/release.js +2 -2
  150. package/dist/release.mjs +1 -1
  151. package/dist/server.d.mts +4 -4
  152. package/dist/server.d.ts +4 -4
  153. package/dist/server.js +6 -6
  154. package/dist/server.mjs +4 -4
  155. package/package.json +1 -1
  156. package/dist/cli/auth-RWLCLMDY.js +0 -43
  157. package/dist/cli/describe-RYJ6HDYD.js +0 -50
  158. package/dist/cli/git-4VLYFHNU.js +0 -25
  159. package/dist/cli/search-4SQFVNTB.js +0 -32
  160. package/dist/cli/skills-V4APQA2I.js +0 -36
  161. package/dist/cli/tools-HKQLQ7HT.js +0 -57
  162. package/dist/cli/update-Z4MUAHWM.js +0 -34
@@ -3,15 +3,15 @@ import {
3
3
  } from "./chunk-F6QV42MC.mjs";
4
4
  import {
5
5
  parseLogLevel
6
- } from "./chunk-J2HOVZOE.mjs";
6
+ } from "./chunk-5M4PLPTR.mjs";
7
7
  import {
8
8
  setDottedInputValue
9
- } from "./chunk-DVQHG6AM.mjs";
9
+ } from "./chunk-CS2AEAD6.mjs";
10
10
  import {
11
11
  argsWantJson,
12
12
  jsonFieldArgs,
13
13
  parseJsonFields
14
- } from "./chunk-6DMLWM7L.mjs";
14
+ } from "./chunk-WTZ7Y3IZ.mjs";
15
15
  import {
16
16
  DeeplineError
17
17
  } from "./chunk-HBL4PM5Q.mjs";
@@ -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
- const inputField = inputFieldFromCsvArg(
442
- staticPipeline.csvArg
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-6DMLWM7L.mjs";
4
+ } from "./chunk-WTZ7Y3IZ.mjs";
5
5
  import {
6
6
  agentSessionIdFromEnvironment
7
- } from "./chunk-FAT6CUZK.mjs";
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-TLQXN4ZZ.mjs";
3
+ } from "./chunk-O36ZPHJG.mjs";
4
4
  import {
5
5
  addDescribeOptions
6
- } from "./chunk-IPWYDANJ.mjs";
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-GNSGDIA4.mjs";
17
+ } from "./chunk-4NKAM4GX.mjs";
18
18
  import {
19
19
  failureReportHeaders,
20
20
  isFailureReportingDisabled
21
- } from "./chunk-BLHQRETG.mjs";
21
+ } from "./chunk-QYXUZX5N.mjs";
22
22
  import {
23
23
  printCommandEnvelope
24
- } from "./chunk-6DMLWM7L.mjs";
24
+ } from "./chunk-WTZ7Y3IZ.mjs";
25
25
  import {
26
26
  autoDetectBaseUrl,
27
27
  resolveApiKeyForBaseUrl
28
- } from "./chunk-KR2XEI5T.mjs";
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', _ => _.packagedFileUploads, 'optionalAccess', _2 => _2.length]) ? { packagedFileUploads: request.packagedFileUploads } : {},
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', _3 => _3.packagedFiles, 'optionalAccess', _4 => _4.length]) ? { packagedFiles: request.packagedFiles } : {},
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', _5 => _5.signal, 'optionalAccess', _6 => _6.throwIfAborted, 'call', _7 => _7()]);
166
- if (_optionalChain([options, 'optionalAccess', _8 => _8.deadlineAt]) !== void 0 && Date.now() >= options.deadlineAt) {
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', _9 => _9.callerIntentV2]) === true;
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', _10 => _10.admissionContract]) === "caller-intent-v1";
241
+ const supportsCallerIntent = callerIntentV2 || _optionalChain([capability, 'optionalAccess', _16 => _16.admissionContract]) === "caller-intent-v1";
183
242
  assertAdmissionActive();
184
- if (supportsCallerIntent && !callerIntentV2 && (!_optionalChain([capability, 'optionalAccess', _11 => _11.orgId]) || request.admissionOrgId && request.admissionOrgId !== capability.orgId)) {
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', _12 => _12.strictTotalBudget]) === "unbounded-v1") {
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', _13 => _13.strictTotalBudget]) !== "fail-closed-v1") {
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', _14 => _14.orgId])) {
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', _15 => _15.onSubmission]),
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', _16 => _16.callerIntentV2]) ? CLI_PLAY_RUN_CALLER_INTENT_V2_PATH : _optionalChain([options, 'optionalAccess', _17 => _17.cliAdmission]) ? CLI_PLAY_RUN_START_PATH : PLAY_RUN_START_PATH,
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', _18 => _18.signal]) ? { signal: options.signal } : {},
311
- ..._optionalChain([options, 'optionalAccess', _19 => _19.cliAdmission]) || _optionalChain([options, 'optionalAccess', _20 => _20.callerIntentV2]) ? {
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', _21 => _21.callerIntentV2]) && !callerIntentV2Supported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
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', _22 => _22.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
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', _23 => _23.callerIntentV2]) && !callerIntentV2Supported) {
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', _24 => _24.cliAdmission]) && (!started.workflowId || started.workflowId === "pending")) {
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', _25 => _25.run, 'optionalAccess', _26 => _26.id]) === "string"
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', _27 => _27[key]]);
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
- const inputField = inputFieldFromCsvArg(
442
- staticPipeline.csvArg
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', _29 => _29.headers, 'access', _30 => _30.get, 'call', _31 => _31("x-deny-reason"), 'optionalAccess', _32 => _32.trim, 'call', _33 => _33(), 'access', _34 => _34.toLowerCase, 'call', _35 => _35()]) === "host_not_allowed";
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', _36 => _36.onStaging, 'optionalCall', _37 => _37(localFiles.length)]);
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', _38 => _38.signal]) ? { signal: options.signal } : {}
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
- 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;
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 _chunkGSCCDGGTjs = require('./chunk-GSCCDGGT.js');
3
+ var _chunkKKI5GWEDjs = require('./chunk-KKI5GWED.js');
4
4
 
5
5
 
6
- var _chunk4ZKZS43Njs = require('./chunk-4ZKZS43N.js');
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 _chunkBU5Y7HODjs = require('./chunk-BU5Y7HOD.js');
17
+ var _chunk5GK6J7MHjs = require('./chunk-5GK6J7MH.js');
18
18
 
19
19
 
20
20
 
21
- var _chunkUSWLB4KVjs = require('./chunk-USWLB4KV.js');
21
+ var _chunkQN6IULFTjs = require('./chunk-QN6IULFT.js');
22
22
 
23
23
 
24
- var _chunkZZD245Z2js = require('./chunk-ZZD245Z2.js');
24
+ var _chunkZL4Q4T3Gjs = require('./chunk-ZL4Q4T3G.js');
25
25
 
26
26
 
27
27
 
28
- var _chunkY4GRL533js = require('./chunk-Y4GRL533.js');
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 (_chunkUSWLB4KVjs.isFailureReportingDisabled.call(void 0, )) return;
37
+ if (_chunkQN6IULFTjs.isFailureReportingDisabled.call(void 0, )) return;
38
38
  try {
39
- const baseUrl = _chunkY4GRL533js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
40
- const apiKey = _chunkY4GRL533js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
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: _chunkUSWLB4KVjs.failureReportHeaders.call(void 0, apiKey),
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, _chunkBU5Y7HODjs.DeeplineClient)()));
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, _chunkBU5Y7HODjs.DeeplineClient)();
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: _chunkGSCCDGGTjs.seedToolListScript
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
- _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
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
- _chunkZZD245Z2js.printCommandEnvelope.call(void 0, envelope, { json, text });
99
+ _chunkZL4Q4T3Gjs.printCommandEnvelope.call(void 0, envelope, { json, text });
100
100
  return 0;
101
101
  }
102
102
  function registerDescribeCommand(program) {
103
- _chunk4ZKZS43Njs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
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",
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  csvSafeJsonString,
8
8
  csvStringFromRows
9
- } from "./chunk-6DMLWM7L.mjs";
9
+ } from "./chunk-WTZ7Y3IZ.mjs";
10
10
 
11
11
  // src/cli/describe-options.ts
12
12
  function addDescribeOptions(command, options = {}) {
@@ -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 _chunkJ3UHNUWIjs = require('./chunk-J3UHNUWI.js');
3
+ var _chunkQZ7I4NZZjs = require('./chunk-QZ7I4NZZ.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunkUSWLB4KVjs = require('./chunk-USWLB4KV.js');
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") _chunkUSWLB4KVjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
22
- const compatibility = await _chunkJ3UHNUWIjs.traceCliSpan.call(void 0,
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
- () => _chunkUSWLB4KVjs.checkSdkCompatibility.call(void 0, baseUrl, {
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
- _chunkUSWLB4KVjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
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 _chunkS3XQH7DWjs = require('./chunk-S3XQH7DW.js');
19
+ var _chunk73CBLBNPjs = require('./chunk-73CBLBNP.js');
20
20
 
21
21
  // src/version.ts
22
- var SDK_VERSION = _chunkS3XQH7DWjs.SDK_RELEASE.version;
23
- var SDK_API_MAJOR = _chunkS3XQH7DWjs.SDK_RELEASE.contracts.api.currentMajor;
24
- var SDK_API_CONTRACT = _nullishCoalesce(_chunkS3XQH7DWjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
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');