deepline 0.3.495 → 0.3.497

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 (156) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +91 -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/scheduler-backends/postgres.ts +15 -0
  11. package/dist/bundling-sources/shared_libs/plays/docflow.ts +28 -12
  12. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +26 -6
  13. package/dist/bundling-sources/shared_libs/product-notifications/slack-payload.ts +4 -1
  14. package/dist/cli/auth-553ZBCPJ.js +43 -0
  15. package/dist/cli/{auth-B2YUNFQ6.mjs → auth-OAKBFUQD.mjs} +5 -5
  16. package/dist/cli/{billing-5TR7ZBZM.mjs → billing-AM6D2KN5.mjs} +7 -7
  17. package/dist/cli/{billing-2Q7TMNRE.js → billing-FUB6HQZ5.js} +80 -80
  18. package/dist/cli/{chunk-RBBOUPME.mjs → chunk-3DHPKENA.mjs} +1 -1
  19. package/dist/cli/{chunk-XR6RCBB3.mjs → chunk-3IVAGF4P.mjs} +10 -10
  20. package/dist/cli/{chunk-TUAEM76Y.js → chunk-3KG2FUU4.js} +108 -65
  21. package/dist/cli/{chunk-SC5GHGFD.mjs → chunk-4MR7LZXF.mjs} +2 -2
  22. package/dist/cli/{chunk-DFK5IJMT.mjs → chunk-5GXYXU45.mjs} +1 -1
  23. package/dist/cli/{chunk-H5L2Q2GI.mjs → chunk-5IBHSACU.mjs} +2 -2
  24. package/dist/cli/{chunk-CTFR52JC.js → chunk-6TA2H7CY.js} +26 -26
  25. package/dist/cli/{chunk-ZBQBH4IT.js → chunk-77IAUCTB.js} +3 -3
  26. package/dist/cli/{chunk-XAOLMEN5.js → chunk-7FFNSYMJ.js} +14 -14
  27. package/dist/cli/{chunk-XKYQR3QK.js → chunk-7RBIOOCQ.js} +3 -3
  28. package/dist/cli/{chunk-LQKZG5RN.js → chunk-A66Y2LCW.js} +53 -53
  29. package/dist/cli/{chunk-Z33PZUWG.js → chunk-B4Q3EBQX.js} +5 -5
  30. package/dist/cli/{chunk-T4PGA6UD.js → chunk-BBHGJE73.js} +1 -1
  31. package/dist/cli/{chunk-UDFO2MWA.js → chunk-BRUDMG56.js} +41 -41
  32. package/dist/cli/{chunk-DVQHG6AM.mjs → chunk-CS2AEAD6.mjs} +63 -11
  33. package/dist/cli/{chunk-Y2DUGUUU.js → chunk-DKSTMQ3F.js} +21 -21
  34. package/dist/cli/{chunk-PKV5CD3W.js → chunk-EQR5O2D2.js} +87 -35
  35. package/dist/cli/{chunk-L5ZXEYTQ.mjs → chunk-EWQ3KY5U.mjs} +6 -6
  36. package/dist/cli/{chunk-JRBQC6L4.mjs → chunk-FISH2MI2.mjs} +2 -2
  37. package/dist/cli/{chunk-PEIOQKTA.js → chunk-FVS5MJQ5.js} +3 -3
  38. package/dist/cli/{chunk-TSKVPEVZ.mjs → chunk-HRODQDTB.mjs} +46 -3
  39. package/dist/cli/{chunk-7YNZRALI.mjs → chunk-IURXJPGH.mjs} +3 -3
  40. package/dist/cli/{chunk-TCNILHMS.js → chunk-JDFYCHNV.js} +5 -5
  41. package/dist/cli/{chunk-TMO7W4P2.mjs → chunk-KFJV3BZX.mjs} +1 -1
  42. package/dist/cli/{chunk-S2QARJLX.mjs → chunk-KUX3HYJI.mjs} +1 -1
  43. package/dist/cli/{chunk-KG2FUYWB.mjs → chunk-LPCK5KK5.mjs} +3 -3
  44. package/dist/cli/{chunk-TFMV3NKL.mjs → chunk-M2WIEW2E.mjs} +1 -1
  45. package/dist/cli/{chunk-I66IWCY4.mjs → chunk-MBOAXLWC.mjs} +4 -4
  46. package/dist/cli/{chunk-CAWE3MS2.js → chunk-OEI6HXMK.js} +16 -16
  47. package/dist/cli/{chunk-UKGOZOTT.js → chunk-OWDK2PVH.js} +8 -8
  48. package/dist/cli/{chunk-7LLUJQM5.mjs → chunk-SJID5WMV.mjs} +4 -4
  49. package/dist/cli/{chunk-WVL5HGUG.js → chunk-SJM7MKOE.js} +2 -2
  50. package/dist/cli/{chunk-PHO53W67.js → chunk-SLS3HUVC.js} +4 -4
  51. package/dist/cli/{chunk-MG3WST3Z.mjs → chunk-TGAYN34A.mjs} +2 -2
  52. package/dist/cli/{chunk-SR6VS5PG.mjs → chunk-THD6KA67.mjs} +4 -4
  53. package/dist/cli/{chunk-OFBDI5S3.mjs → chunk-UETGYJYH.mjs} +2 -2
  54. package/dist/cli/{chunk-B3ROCZ5Y.js → chunk-UV7AT2D4.js} +2 -2
  55. package/dist/cli/{chunk-XX6PRYFI.js → chunk-V2EVSEUD.js} +16 -16
  56. package/dist/cli/{chunk-ZB6UYG5I.mjs → chunk-VMOVB2FN.mjs} +5 -5
  57. package/dist/cli/{chunk-UMFZQREB.js → chunk-WKCMARFR.js} +94 -94
  58. package/dist/cli/{chunk-ACVT5LPN.js → chunk-WXW7YJDO.js} +53 -53
  59. package/dist/cli/{chunk-FLJSK32S.mjs → chunk-WZ3A35ZD.mjs} +1 -1
  60. package/dist/cli/{chunk-MAMEKGLI.js → chunk-XLYJ7MJX.js} +7 -7
  61. package/dist/cli/{chunk-CKLJAQIV.mjs → chunk-XNLXHU6L.mjs} +5 -5
  62. package/dist/cli/{chunk-FC4JGTFC.mjs → chunk-XX7WLKOQ.mjs} +1 -1
  63. package/dist/cli/{chunk-HJ5LYO6U.mjs → chunk-YQ66NC4J.mjs} +2 -2
  64. package/dist/cli/{chunk-7OGADAAA.js → chunk-YUEFDOME.js} +6 -6
  65. package/dist/cli/{chunk-5OKQPDYJ.js → chunk-ZLYKN4AJ.js} +7 -7
  66. package/dist/cli/{csv-DZQ77T67.js → csv-PMBYKVUU.js} +13 -13
  67. package/dist/cli/{csv-5UQXKWLE.mjs → csv-U2GOFP3M.mjs} +4 -4
  68. package/dist/cli/{db-F62BVFTP.mjs → db-DKFOTZGZ.mjs} +7 -7
  69. package/dist/cli/{db-JIPLUHA6.js → db-GREVTMIR.js} +28 -28
  70. package/dist/cli/describe-BL5NNHV5.js +50 -0
  71. package/dist/cli/{describe-J7KYHONJ.mjs → describe-SWXA6L62.mjs} +18 -18
  72. package/dist/cli/describe-core.d.mts +3 -3
  73. package/dist/cli/describe-core.d.ts +3 -3
  74. package/dist/cli/{executions-XQ4FNJ27.js → executions-2RRAESQK.js} +9 -9
  75. package/dist/cli/{executions-XB4F2KZD.mjs → executions-EBRFC5JR.mjs} +7 -7
  76. package/dist/cli/{feedback-5CR4CJ6W.mjs → feedback-4A57QLX2.mjs} +4 -4
  77. package/dist/cli/{feedback-Q6JRCMDV.js → feedback-N6ML7IRH.js} +8 -8
  78. package/dist/cli/{git-P5WBBUT3.mjs → git-6D2WQPOS.mjs} +5 -5
  79. package/dist/cli/git-7TSX5V57.js +25 -0
  80. package/dist/cli/index.js +137 -137
  81. package/dist/cli/index.mjs +40 -40
  82. package/dist/cli/{legacy-noops-H5JJVYZ2.mjs → legacy-noops-CL5QWXGH.mjs} +5 -5
  83. package/dist/cli/{legacy-noops-EJAB6III.js → legacy-noops-DXRJARNC.js} +8 -8
  84. package/dist/cli/{monitors-QPFAT2J5.mjs → monitors-SGMEGGJO.mjs} +190 -8
  85. package/dist/cli/{monitors-7DOGM7RO.js → monitors-XWKDVHYL.js} +318 -136
  86. package/dist/cli/{org-BH7ATDIJ.mjs → org-55BI5RQF.mjs} +7 -7
  87. package/dist/cli/{org-QOBB4IN3.js → org-QKQ57PDN.js} +73 -73
  88. package/dist/cli/{pages-PLTE54KM.js → pages-FOIR5UH4.js} +19 -19
  89. package/dist/cli/{pages-PJH2TXZQ.mjs → pages-LM4QACOM.mjs} +7 -7
  90. package/dist/cli/{play-ULTJ3LPA.mjs → play-7VA26O6E.mjs} +36 -61
  91. package/dist/cli/{play-XZAPTF3T.js → play-S44FXGD7.js} +634 -659
  92. package/dist/cli/{providers-6NUTRVE4.mjs → providers-QAVIR5E2.mjs} +7 -7
  93. package/dist/cli/{providers-SKXLW7M3.js → providers-RDSHID7C.js} +10 -10
  94. package/dist/cli/{quickstart-JFCIIGII.js → quickstart-EREQPM3G.js} +6 -6
  95. package/dist/cli/{quickstart-5HMJMXVT.mjs → quickstart-IL4HQYE4.mjs} +4 -4
  96. package/dist/cli/{run-2BJZPY4K.mjs → run-4XZNJR7N.mjs} +23 -23
  97. package/dist/cli/{run-BRAXLCBC.js → run-TBUUV5EG.js} +37 -37
  98. package/dist/cli/search-GCANFVVZ.js +32 -0
  99. package/dist/cli/{search-IDXSB2CV.mjs → search-SYT5UT5G.mjs} +8 -8
  100. package/dist/cli/{search-output-CJ4TNYF7.js → search-output-5F3EEQ34.js} +6 -6
  101. package/dist/cli/{search-output-AATMH4QG.mjs → search-output-Y3IKZ3TX.mjs} +4 -4
  102. package/dist/cli/{secrets-UQNEJSNG.mjs → secrets-AKAU2N3K.mjs} +7 -7
  103. package/dist/cli/{secrets-6SMKTBFT.js → secrets-PZWJ2ES5.js} +16 -16
  104. package/dist/cli/{sessions-W3KU4Q4X.js → sessions-UMHA7K23.js} +6 -6
  105. package/dist/cli/{sessions-MHTUVPSR.mjs → sessions-Z5C26IS7.mjs} +5 -5
  106. package/dist/cli/{settings-KNYJ6GXK.mjs → settings-S5BM3SVI.mjs} +12 -12
  107. package/dist/cli/{settings-BA52NEU5.js → settings-WGJYWTJZ.js} +79 -79
  108. package/dist/cli/{setup-D5HCJAVU.js → setup-6K6ERKOH.js} +49 -49
  109. package/dist/cli/{setup-TLTZ2YCO.mjs → setup-E4HRXP2X.mjs} +9 -9
  110. package/dist/cli/{skills-DPLM4EGS.mjs → skills-HIZA7YAN.mjs} +7 -7
  111. package/dist/cli/skills-J3GQHHHL.js +36 -0
  112. package/dist/cli/{tools-I4ZOJV23.mjs → tools-FS5S6BT7.mjs} +17 -17
  113. package/dist/cli/tools-RZYKMOUX.js +57 -0
  114. package/dist/cli/{update-VIFS7IK5.mjs → update-4CJPTG3L.mjs} +9 -9
  115. package/dist/cli/update-CATZW7GA.js +34 -0
  116. package/dist/cli/{workflow-7REPOHXM.js → workflow-TYSZ5JWS.js} +18 -18
  117. package/dist/cli/{workflow-TAQBNDV7.mjs → workflow-UMSXOIOS.mjs} +8 -8
  118. package/dist/{client-CKVH6tmp.d.ts → client-Cj3UqrCZ.d.ts} +1 -1
  119. package/dist/{client-BDT_LwuM.d.mts → client-DSCTVVRj.d.mts} +1 -1
  120. package/dist/{client-core-CEixe_C0.d.mts → client-core-B-8DTIN1.d.mts} +44 -3
  121. package/dist/{client-core-RS-d-vtY.d.ts → client-core-dI4KTuWS.d.ts} +44 -3
  122. package/dist/{compiler-manifest-CPEF48NM.d.mts → compiler-manifest-DlXDyndN.d.mts} +2 -0
  123. package/dist/{compiler-manifest-CPEF48NM.d.ts → compiler-manifest-DlXDyndN.d.ts} +2 -0
  124. package/dist/{errors-BWbPzqwo.d.mts → errors-BtriA2ld.d.mts} +1 -1
  125. package/dist/{errors-B-PJXveg.d.ts → errors-DmcLykM7.d.ts} +1 -1
  126. package/dist/{index-CvVxPpE8.d.ts → index--Jw-slHY.d.ts} +1 -1
  127. package/dist/{index-BJ8AA1F9.d.mts → index-DI0sR_fX.d.mts} +1 -1
  128. package/dist/index.d.mts +7 -7
  129. package/dist/index.d.ts +7 -7
  130. package/dist/index.js +10 -10
  131. package/dist/index.mjs +7 -7
  132. package/dist/install-integrity.json +110 -110
  133. package/dist/plays/bundle-play-file.d.mts +3 -3
  134. package/dist/plays/bundle-play-file.d.ts +3 -3
  135. package/dist/plays/play-description.d.mts +2 -2
  136. package/dist/plays/play-description.d.ts +2 -2
  137. package/dist/plays/run-request.d.mts +2 -2
  138. package/dist/plays/run-request.d.ts +2 -2
  139. package/dist/plays/run-request.js +2 -2
  140. package/dist/plays/run-request.mjs +1 -1
  141. package/dist/release.d.mts +1 -1
  142. package/dist/release.d.ts +1 -1
  143. package/dist/release.js +2 -2
  144. package/dist/release.mjs +1 -1
  145. package/dist/server.d.mts +4 -4
  146. package/dist/server.d.ts +4 -4
  147. package/dist/server.js +6 -6
  148. package/dist/server.mjs +4 -4
  149. package/package.json +1 -1
  150. package/dist/cli/auth-GAOWVOK4.js +0 -43
  151. package/dist/cli/describe-BA4RAZ7J.js +0 -50
  152. package/dist/cli/git-EAO432S2.js +0 -25
  153. package/dist/cli/search-4MU2G6HV.js +0 -32
  154. package/dist/cli/skills-SVUWVXCE.js +0 -36
  155. package/dist/cli/tools-RJSP76HX.js +0 -57
  156. package/dist/cli/update-YT6JPIC6.js +0 -34
@@ -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
  import {
2
2
  seedToolListScript
3
- } from "./chunk-XR6RCBB3.mjs";
3
+ } from "./chunk-3IVAGF4P.mjs";
4
4
  import {
5
5
  addDescribeOptions
6
- } from "./chunk-S2QARJLX.mjs";
6
+ } from "./chunk-KUX3HYJI.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-SC5GHGFD.mjs";
17
+ } from "./chunk-4MR7LZXF.mjs";
18
18
  import {
19
19
  failureReportHeaders,
20
20
  isFailureReportingDisabled
21
- } from "./chunk-SR6VS5PG.mjs";
21
+ } from "./chunk-THD6KA67.mjs";
22
22
  import {
23
23
  printCommandEnvelope
24
- } from "./chunk-JRBQC6L4.mjs";
24
+ } from "./chunk-FISH2MI2.mjs";
25
25
  import {
26
26
  autoDetectBaseUrl,
27
27
  resolveApiKeyForBaseUrl
28
- } from "./chunk-FC4JGTFC.mjs";
28
+ } from "./chunk-XX7WLKOQ.mjs";
29
29
 
30
30
  // src/cli/commands/describe.ts
31
31
  import { writeFileSync } from "fs";
@@ -2,10 +2,10 @@ import {
2
2
  HttpClient,
3
3
  resolveCliCommandContext,
4
4
  resolveConfig
5
- } from "./chunk-FC4JGTFC.mjs";
5
+ } from "./chunk-XX7WLKOQ.mjs";
6
6
  import {
7
7
  detectAgentRuntime
8
- } from "./chunk-FLJSK32S.mjs";
8
+ } from "./chunk-WZ3A35ZD.mjs";
9
9
  import {
10
10
  DeeplineError,
11
11
  serializeToolExecutionFailure
@@ -6,7 +6,7 @@ var _chunkJO5FFSR7js = require('./chunk-JO5FFSR7.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkMAMEKGLIjs = require('./chunk-MAMEKGLI.js');
9
+ var _chunkXLYJ7MJXjs = require('./chunk-XLYJ7MJX.js');
10
10
 
11
11
  // src/cli/describe-options.ts
12
12
  function addDescribeOptions(command, options = {}) {
@@ -247,7 +247,7 @@ function projectRunDatasetCell(value) {
247
247
  const logicalValue = parseSerializedDatasetValue(value);
248
248
  if (logicalValue === null || logicalValue === void 0) return logicalValue;
249
249
  if (typeof logicalValue === "object") {
250
- return _chunkMAMEKGLIjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
250
+ return _chunkXLYJ7MJXjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
251
251
  }
252
252
  return logicalValue;
253
253
  }
@@ -642,7 +642,7 @@ function csvText(rows, columns = []) {
642
642
  rows: rows.map((row) => record(row) ? row : { value: row }),
643
643
  columns
644
644
  });
645
- return _chunkMAMEKGLIjs.csvStringFromRows.call(void 0, projection.rows, projection.columns);
645
+ return _chunkXLYJ7MJXjs.csvStringFromRows.call(void 0, projection.rows, projection.columns);
646
646
  }
647
647
  function writeExecutionOutput(result, options) {
648
648
  let temp;
@@ -20,7 +20,7 @@ import {
20
20
  stagePlayFiles,
21
21
  startPlayRun,
22
22
  submitPreparedPlayRunAdmission
23
- } from "./chunk-DVQHG6AM.mjs";
23
+ } from "./chunk-CS2AEAD6.mjs";
24
24
  import {
25
25
  describePlayDetail,
26
26
  describePlayListItem
@@ -31,7 +31,7 @@ import {
31
31
  RETAINED_PIPELINE_RECEIVERS_HEADER,
32
32
  RUNTIME_ENVIRONMENT_TOKEN_HEADER,
33
33
  SDK_API_MAJOR
34
- } from "./chunk-FLJSK32S.mjs";
34
+ } from "./chunk-WZ3A35ZD.mjs";
35
35
  import {
36
36
  CustomerDbQueryOutcomeUnknownError
37
37
  } from "./chunk-4QF2K7TM.mjs";
@@ -3541,6 +3541,9 @@ var DeeplineClient = class _DeeplineClient {
3541
3541
  deploy: (definition, options) => this.deployMonitor(definition, options),
3542
3542
  sync: (definition, options) => options?.dryRun ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options),
3543
3543
  list: (options) => this.listMonitors(options),
3544
+ ledger: (options) => this.listMonitorLedger(options),
3545
+ ledgerGet: (key) => this.getMonitorLedgerEntry(key),
3546
+ ledgerFindings: (key, options) => this.listMonitorLedgerFindings(key, options),
3544
3547
  get: (key) => this.getMonitor(key),
3545
3548
  test: (key, payload, options) => this.testMonitorWebhook(key, payload, options),
3546
3549
  validate: (key) => this.validateMonitor(key),
@@ -6617,6 +6620,41 @@ var DeeplineClient = class _DeeplineClient {
6617
6620
  { method: "GET" }
6618
6621
  );
6619
6622
  }
6623
+ /** The Monitors list. Prefer `client.monitors.ledger(...)`. */
6624
+ async listMonitorLedger(options) {
6625
+ const params = new URLSearchParams();
6626
+ if (options?.search) params.set("q", options.search);
6627
+ for (const state of options?.states ?? []) params.append("state", state);
6628
+ for (const signal of options?.signals ?? [])
6629
+ params.append("signal", signal);
6630
+ if (options?.play) params.set("play", options.play);
6631
+ if (options?.sort) params.set("sort", options.sort);
6632
+ if (options?.window) params.set("window", options.window);
6633
+ if (options?.limit !== void 0)
6634
+ params.set("limit", String(options.limit));
6635
+ if (options?.cursor) params.set("cursor", options.cursor);
6636
+ const query = params.toString();
6637
+ const suffix = query ? `?${query}` : "";
6638
+ return this.http.request(
6639
+ `/api/v2/monitors/ledger${suffix}`,
6640
+ { method: "GET" }
6641
+ );
6642
+ }
6643
+ /** One Monitors list entry. Prefer `client.monitors.ledgerGet(...)`. */
6644
+ async getMonitorLedgerEntry(key) {
6645
+ return this.http.request(
6646
+ `/api/v2/monitors/ledger/${encodeURIComponent(key)}`,
6647
+ { method: "GET" }
6648
+ );
6649
+ }
6650
+ /** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
6651
+ async listMonitorLedgerFindings(key, options) {
6652
+ const suffix = options?.cursor ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
6653
+ return this.http.request(
6654
+ `/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
6655
+ { method: "GET" }
6656
+ );
6657
+ }
6620
6658
  /** Fetch one deployed monitor by public key. Prefer `client.monitors.get(...)`. */
6621
6659
  async getMonitor(key) {
6622
6660
  return this.http.request(
@@ -6973,7 +7011,12 @@ var DeeplineClient = class _DeeplineClient {
6973
7011
  async waitForMonitorFleetConvergence(fleetId, options) {
6974
7012
  const timeoutMs = Math.max(1, options?.timeoutMs ?? 10 * 6e4);
6975
7013
  const pollIntervalMs = Math.max(1, options?.pollIntervalMs ?? 2e3);
6976
- const terminal = options?.until === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated", "billing_suspended"]);
7014
+ const terminal = options?.until === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
7015
+ "converged",
7016
+ "degraded",
7017
+ "deactivated",
7018
+ "billing_suspended"
7019
+ ]);
6977
7020
  const startedAt = Date.now();
6978
7021
  let latest = await this.getMonitorFleet(fleetId);
6979
7022
  while (true) {
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-JRBQC6L4.mjs";
5
+ } from "./chunk-FISH2MI2.mjs";
6
6
  import {
7
7
  ACTIVE_ORG_ID_ENV,
8
8
  ACTIVE_ORG_NAME_ENV,
@@ -22,14 +22,14 @@ import {
22
22
  saveHostEnvValues,
23
23
  saveProjectDeeplineEnvValues,
24
24
  storedHostApiKey
25
- } from "./chunk-FC4JGTFC.mjs";
25
+ } from "./chunk-XX7WLKOQ.mjs";
26
26
  import {
27
27
  SDK_API_CONTRACT,
28
28
  SDK_VERSION,
29
29
  connectionFailureMessage,
30
30
  detectAgentRuntime,
31
31
  networkCauseCode
32
- } from "./chunk-FLJSK32S.mjs";
32
+ } from "./chunk-WZ3A35ZD.mjs";
33
33
  import {
34
34
  DeeplineError
35
35
  } from "./chunk-HBL4PM5Q.mjs";
@@ -1,10 +1,10 @@
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 _chunkTUAEM76Yjs = require('./chunk-TUAEM76Y.js');
3
+ var _chunk3KG2FUU4js = require('./chunk-3KG2FUU4.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkZBQBH4ITjs = require('./chunk-ZBQBH4IT.js');
7
+ var _chunk77IAUCTBjs = require('./chunk-77IAUCTB.js');
8
8
 
9
9
  // src/plays/local-play-execution.ts
10
10
  function importedNodes(graph) {
@@ -137,9 +137,9 @@ async function pinLocalPlayImports(client, graph) {
137
137
 
138
138
  // src/plays/client.ts
139
139
  function createPlayClient(options) {
140
- const config = _chunkZBQBH4ITjs.resolveConfig.call(void 0, options);
141
- return new (0, _chunkTUAEM76Yjs.PlayClient)(
142
- new (0, _chunkZBQBH4ITjs.HttpClient)(config),
140
+ const config = _chunk77IAUCTBjs.resolveConfig.call(void 0, options);
141
+ return new (0, _chunk3KG2FUU4js.PlayClient)(
142
+ new (0, _chunk77IAUCTBjs.HttpClient)(config),
143
143
  _nullishCoalesce(config.environment, () => ( process.env))
144
144
  );
145
145
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveShellSpawn
3
- } from "./chunk-SR6VS5PG.mjs";
3
+ } from "./chunk-THD6KA67.mjs";
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  import { spawnSync } from "child_process";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  csvSafeJsonString,
8
8
  csvStringFromRows
9
- } from "./chunk-JRBQC6L4.mjs";
9
+ } from "./chunk-FISH2MI2.mjs";
10
10
 
11
11
  // src/cli/describe-options.ts
12
12
  function addDescribeOptions(command, options = {}) {
@@ -3,15 +3,15 @@ import {
3
3
  } from "./chunk-F6QV42MC.mjs";
4
4
  import {
5
5
  parseLogLevel
6
- } from "./chunk-TSKVPEVZ.mjs";
6
+ } from "./chunk-HRODQDTB.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-JRBQC6L4.mjs";
14
+ } from "./chunk-FISH2MI2.mjs";
15
15
  import {
16
16
  DeeplineError
17
17
  } from "./chunk-HBL4PM5Q.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeRawStderr
3
- } from "./chunk-JRBQC6L4.mjs";
3
+ } from "./chunk-FISH2MI2.mjs";
4
4
 
5
5
  // src/cli/maintenance-policy.ts
6
6
  import { InvalidArgumentError } from "commander";
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-5AEDYVB6.mjs";
4
4
  import {
5
5
  DeeplineClient
6
- } from "./chunk-SC5GHGFD.mjs";
6
+ } from "./chunk-4MR7LZXF.mjs";
7
7
  import {
8
8
  printCommandEnvelope
9
- } from "./chunk-JRBQC6L4.mjs";
9
+ } from "./chunk-FISH2MI2.mjs";
10
10
  import {
11
11
  resolveConfig,
12
12
  sdkCliStateDirPath
13
- } from "./chunk-FC4JGTFC.mjs";
13
+ } from "./chunk-XX7WLKOQ.mjs";
14
14
 
15
15
  // src/cli/commands/search.ts
16
16
  import { Option } from "commander";
@@ -133,7 +133,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
133
133
  });
134
134
  if (searchRef) rememberSearchRef(searchRef);
135
135
  pointAtDescribe(result);
136
- const { renderSearchResults } = await import("./search-output-AATMH4QG.mjs");
136
+ const { renderSearchResults } = await import("./search-output-Y3IKZ3TX.mjs");
137
137
  printCommandEnvelope(result, {
138
138
  json: options.json === true,
139
139
  text: renderSearchResults(result, summaryWidth)