deepline 0.3.440 → 0.3.442

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 (135) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +10 -1
  3. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +37 -15
  4. package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +17 -3
  5. package/dist/bundling-sources/shared_libs/tool-execution-error.ts +17 -3
  6. package/dist/cli/{auth-KBORTFO6.mjs → auth-CUZJMTNS.mjs} +6 -6
  7. package/dist/cli/auth-HAO2GLGH.js +40 -0
  8. package/dist/cli/{billing-VJSUCB5I.mjs → billing-SWH3WAMC.mjs} +7 -7
  9. package/dist/cli/{billing-RE5WN7IQ.js → billing-W2U5VKFI.js} +83 -83
  10. package/dist/cli/{chunk-VXQQZV4A.js → chunk-2GVUZA6C.js} +33 -33
  11. package/dist/cli/{chunk-R2P756BJ.js → chunk-2JHQ24IT.js} +16 -16
  12. package/dist/cli/{chunk-MAMVGOSC.mjs → chunk-4QF2K7TM.mjs} +1 -1
  13. package/dist/cli/{chunk-O7PC3VOI.mjs → chunk-5ZQEDZDQ.mjs} +1 -1
  14. package/dist/cli/{chunk-GWC7OBRD.mjs → chunk-6YWIRIOI.mjs} +2 -2
  15. package/dist/cli/{chunk-Z7SKBAOU.js → chunk-77DW6WSO.js} +93 -93
  16. package/dist/cli/{chunk-4RKPT6IE.js → chunk-7BH4ZOWE.js} +2 -2
  17. package/dist/cli/{chunk-N5D4EMIY.mjs → chunk-7DH2FD7Y.mjs} +1 -1
  18. package/dist/cli/{chunk-PCNOULRB.mjs → chunk-7ICMVQL5.mjs} +4 -4
  19. package/dist/cli/{chunk-WU4U6VSB.js → chunk-A6QCMBGL.js} +5 -5
  20. package/dist/cli/{chunk-NPBJI7RE.js → chunk-ALJJRZNJ.js} +8 -8
  21. package/dist/cli/{chunk-ZLD46RSR.mjs → chunk-AR5YQQF5.mjs} +2 -2
  22. package/dist/cli/{chunk-GFEWNYQ4.js → chunk-C4WXHMKN.js} +2 -2
  23. package/dist/cli/{chunk-KAJK6XVI.js → chunk-CFUTOWE4.js} +6 -6
  24. package/dist/cli/{chunk-M6WSQZHP.js → chunk-D5IOUCJS.js} +57 -57
  25. package/dist/cli/{chunk-ATTUUPIU.js → chunk-D7IDBZDR.js} +8 -8
  26. package/dist/cli/{chunk-PPDBRJRW.js → chunk-DIAWYWT5.js} +6 -1
  27. package/dist/cli/{chunk-42YHEY2R.mjs → chunk-DUUY2JKP.mjs} +2 -2
  28. package/dist/cli/{chunk-KCC3FKIW.mjs → chunk-FAG4DFUC.mjs} +1 -1
  29. package/dist/cli/{chunk-V74O7X2X.mjs → chunk-GEHYAQSI.mjs} +2 -2
  30. package/dist/cli/{chunk-RDIN3NKA.js → chunk-GEQOPXOS.js} +2 -2
  31. package/dist/cli/{chunk-E4IXDAZI.mjs → chunk-HBL4PM5Q.mjs} +6 -1
  32. package/dist/cli/{chunk-4GHEUG6W.js → chunk-HYJKJJUM.js} +20 -20
  33. package/dist/cli/{chunk-2H4EY7KH.js → chunk-JKVRBCZL.js} +26 -26
  34. package/dist/cli/{chunk-V2ZITVZA.js → chunk-K2DHO3IM.js} +26 -26
  35. package/dist/cli/{chunk-R7GGDUOM.mjs → chunk-KKTRHDLN.mjs} +3 -3
  36. package/dist/cli/{chunk-OX5JAD3D.mjs → chunk-L2FWEP4G.mjs} +4 -4
  37. package/dist/cli/{chunk-BBYGXP2I.js → chunk-L3JU24MF.js} +12 -12
  38. package/dist/cli/{chunk-OOVQITRM.js → chunk-LCT6MTYQ.js} +50 -50
  39. package/dist/cli/{chunk-GJI7C2OU.js → chunk-NBFXQCWM.js} +8 -8
  40. package/dist/cli/{chunk-CWFN7MUU.mjs → chunk-O765GAOA.mjs} +9 -9
  41. package/dist/cli/{chunk-T6XBX45B.mjs → chunk-ODWSTSRJ.mjs} +5 -5
  42. package/dist/cli/{chunk-NUX2QHNC.mjs → chunk-OZDT2CZW.mjs} +1 -1
  43. package/dist/cli/{chunk-XL4FJX7J.mjs → chunk-P4GMPKMW.mjs} +3 -3
  44. package/dist/cli/{chunk-CI56TXRS.js → chunk-RR2LZVRA.js} +35 -35
  45. package/dist/cli/{chunk-EPABMF45.js → chunk-RWK35AB3.js} +6 -6
  46. package/dist/cli/{chunk-DS7Y7X26.mjs → chunk-SKXQZUMX.mjs} +1 -1
  47. package/dist/cli/{chunk-RAJP44MZ.mjs → chunk-SMM2EKDC.mjs} +1 -1
  48. package/dist/cli/{chunk-FGTKAXRJ.js → chunk-SOCWFREM.js} +101 -101
  49. package/dist/cli/{chunk-HNMQSS7P.js → chunk-SZUU2WTZ.js} +1 -1
  50. package/dist/cli/{chunk-K23LXA4N.mjs → chunk-TP4TMEML.mjs} +2 -2
  51. package/dist/cli/{chunk-NIR2UK5V.mjs → chunk-VLQWLPQU.mjs} +1 -1
  52. package/dist/cli/{chunk-GOHOTLUV.mjs → chunk-WY4W6PRD.mjs} +4 -4
  53. package/dist/cli/{chunk-GRAEERVE.mjs → chunk-YGMUSZLV.mjs} +3 -3
  54. package/dist/cli/{csv-L64ECPD5.js → csv-C5Z4OZQN.js} +14 -14
  55. package/dist/cli/{csv-MP3WOYPE.mjs → csv-HSR32EPA.mjs} +5 -5
  56. package/dist/cli/{db-RZJK6LGN.js → db-AK4ZYYRP.js} +34 -34
  57. package/dist/cli/{db-FOV7GHXS.mjs → db-JJGI4J5I.mjs} +7 -7
  58. package/dist/cli/{describe-R2BEQHVZ.mjs → describe-C35MTKF4.mjs} +16 -16
  59. package/dist/cli/{describe-WWENJAG2.js → describe-JVSD6F2G.js} +22 -22
  60. package/dist/cli/describe-core.d.mts +2 -2
  61. package/dist/cli/describe-core.d.ts +2 -2
  62. package/dist/cli/describe-core.js +4 -4
  63. package/dist/cli/describe-core.mjs +3 -3
  64. package/dist/cli/{executions-3LFEK56I.js → executions-ZEA7O4PX.js} +9 -9
  65. package/dist/cli/{executions-C5WO6TGN.mjs → executions-ZECDB4NA.mjs} +7 -7
  66. package/dist/cli/{feedback-K6OAZUQ4.mjs → feedback-W7UL4V47.mjs} +5 -5
  67. package/dist/cli/{feedback-EMWUZ4LV.js → feedback-WQC4SX75.js} +9 -9
  68. package/dist/cli/git-E7CXCBZZ.js +24 -0
  69. package/dist/cli/{git-DJLL3OCZ.mjs → git-QBB7LEAV.mjs} +6 -6
  70. package/dist/cli/index.js +136 -136
  71. package/dist/cli/index.mjs +38 -38
  72. package/dist/cli/{legacy-noops-57SRSZ7M.js → legacy-noops-2QPJTEF4.js} +9 -9
  73. package/dist/cli/{legacy-noops-EAJG56KP.mjs → legacy-noops-E5NFHPKQ.mjs} +6 -6
  74. package/dist/cli/{monitors-FHTQ6227.mjs → monitors-E56RLT6N.mjs} +7 -7
  75. package/dist/cli/{monitors-OI57AAIG.js → monitors-MWBA46VZ.js} +93 -93
  76. package/dist/cli/{org-26EHPBKF.js → org-HGIWXACI.js} +69 -69
  77. package/dist/cli/{org-YGHFZTWJ.mjs → org-KE2DDK5A.mjs} +7 -7
  78. package/dist/cli/{play-KBKWTIXK.mjs → play-LGTF4IYG.mjs} +15 -15
  79. package/dist/cli/{play-PXGYS4DH.js → play-WO5UXBZM.js} +373 -373
  80. package/dist/cli/{providers-YPFEVK5C.mjs → providers-77KQS23B.mjs} +7 -7
  81. package/dist/cli/{providers-IZYBWI6M.js → providers-AIJPT54M.js} +10 -10
  82. package/dist/cli/{quickstart-RBCTFLI3.js → quickstart-CZQFBJVH.js} +7 -7
  83. package/dist/cli/{quickstart-SJ2M56CV.mjs → quickstart-EFMHLU4T.mjs} +5 -5
  84. package/dist/cli/{search-PSPZTTKR.mjs → search-U5KEPKNV.mjs} +8 -8
  85. package/dist/cli/search-XMNR7CYI.js +30 -0
  86. package/dist/cli/{secrets-XIWKYXGD.js → secrets-CBBR73U4.js} +16 -16
  87. package/dist/cli/{secrets-BCS4FE5D.mjs → secrets-JYHZIRO4.mjs} +7 -7
  88. package/dist/cli/{sessions-L3UEERFX.mjs → sessions-T74U74J7.mjs} +6 -6
  89. package/dist/cli/sessions-XA2EZDXD.js +16 -0
  90. package/dist/cli/{settings-SFFP7AR5.mjs → settings-C45BH4CU.mjs} +11 -11
  91. package/dist/cli/{settings-X2GMYBE7.js → settings-ND4437UB.js} +78 -78
  92. package/dist/cli/{setup-4ERUKDQ5.js → setup-FQ7JS4HM.js} +44 -44
  93. package/dist/cli/{setup-QIHAXFBL.mjs → setup-QDH6FAEZ.mjs} +9 -9
  94. package/dist/cli/skills-CSA2YFW6.js +29 -0
  95. package/dist/cli/{skills-BYNSDIKJ.mjs → skills-ZFSBA754.mjs} +7 -7
  96. package/dist/cli/tools-GUALRDI7.js +44 -0
  97. package/dist/cli/{tools-PQSMCIA7.mjs → tools-OVGOFORB.mjs} +15 -15
  98. package/dist/cli/{update-BI4E6UXI.mjs → update-BNU7VX5M.mjs} +9 -9
  99. package/dist/cli/update-K4WJSWDB.js +31 -0
  100. package/dist/cli/{workflow-PMRFMZVP.mjs → workflow-FX6GLQ3H.mjs} +8 -8
  101. package/dist/cli/{workflow-52P63K65.js → workflow-JSSXWU3T.js} +18 -18
  102. package/dist/{client-Doml68vC.d.mts → client-BCmnJaL9.d.mts} +1 -1
  103. package/dist/{client-9nH8tx4R.d.ts → client-BqQ7Rb11.d.ts} +1 -1
  104. package/dist/{compiler-manifest-CF2qngKr.d.ts → compiler-manifest-CWz_sNOQ.d.mts} +6 -2
  105. package/dist/{compiler-manifest-CF2qngKr.d.mts → compiler-manifest-CWz_sNOQ.d.ts} +6 -2
  106. package/dist/{index-Bq37k0sE.d.ts → index-4NPXDzlD.d.ts} +1 -1
  107. package/dist/{index-DTI-iNw8.d.mts → index-BF2JB_Ug.d.mts} +1 -1
  108. package/dist/index.d.mts +5 -5
  109. package/dist/index.d.ts +5 -5
  110. package/dist/index.js +10 -10
  111. package/dist/index.mjs +6 -6
  112. package/dist/install-integrity.json +96 -96
  113. package/dist/plays/bundle-play-file.d.mts +3 -3
  114. package/dist/plays/bundle-play-file.d.ts +3 -3
  115. package/dist/plays/bundle-play-file.mjs +2 -2
  116. package/dist/plays/csv-data-input.js +3 -3
  117. package/dist/plays/csv-data-input.mjs +2 -2
  118. package/dist/plays/play-description.d.mts +2 -2
  119. package/dist/plays/play-description.d.ts +2 -2
  120. package/dist/plays/run-request.d.mts +2 -2
  121. package/dist/plays/run-request.d.ts +2 -2
  122. package/dist/plays/run-request.js +3 -3
  123. package/dist/plays/run-request.mjs +2 -2
  124. package/dist/release.d.mts +1 -1
  125. package/dist/release.d.ts +1 -1
  126. package/dist/release.js +2 -2
  127. package/dist/release.mjs +1 -1
  128. package/package.json +1 -1
  129. package/dist/cli/auth-LXI5K7V6.js +0 -40
  130. package/dist/cli/git-2BW2UDK6.js +0 -24
  131. package/dist/cli/search-5CFJRSGN.js +0 -30
  132. package/dist/cli/sessions-YX2AJF5I.js +0 -16
  133. package/dist/cli/skills-EOPZVMJS.js +0 -29
  134. package/dist/cli/tools-UEZW4OD7.js +0 -44
  135. package/dist/cli/update-6TOZCQ4Y.js +0 -31
@@ -15,7 +15,7 @@ var _chunkE4CABWXLjs = require('./chunk-E4CABWXL.js');
15
15
 
16
16
 
17
17
 
18
- var _chunk2H4EY7KHjs = require('./chunk-2H4EY7KH.js');
18
+ var _chunkJKVRBCZLjs = require('./chunk-JKVRBCZL.js');
19
19
 
20
20
 
21
21
 
@@ -28,16 +28,16 @@ var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
28
28
 
29
29
 
30
30
 
31
- var _chunkVXQQZV4Ajs = require('./chunk-VXQQZV4A.js');
31
+ var _chunk2GVUZA6Cjs = require('./chunk-2GVUZA6C.js');
32
32
 
33
33
 
34
- var _chunkNPBJI7REjs = require('./chunk-NPBJI7RE.js');
34
+ var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
35
35
 
36
36
 
37
37
 
38
38
 
39
39
 
40
- var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
40
+ var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
41
41
 
42
42
  // src/pagination.ts
43
43
  async function* iterateCursorPages(fetchPage) {
@@ -71,7 +71,7 @@ function requireBillingIdempotencyKey(value) {
71
71
  }
72
72
  }
73
73
  if (!valid) {
74
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
74
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
75
75
  "Billing idempotencyKey must contain 1\u2013200 characters with no leading or trailing whitespace and be valid HTTP header text.",
76
76
  void 0,
77
77
  "INVALID_BILLING_IDEMPOTENCY_KEY"
@@ -83,23 +83,23 @@ function requireBillingIdempotencyKey(value) {
83
83
  // src/db/query.ts
84
84
  function planCustomerDbQuery(input, maxRetries = 3) {
85
85
  if (typeof input.sql !== "string" || !input.sql.trim())
86
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)("sql must not be empty.", 400, "INVALID_SQL");
86
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)("sql must not be empty.", 400, "INVALID_SQL");
87
87
  if (input.operationKey !== void 0 && typeof input.operationKey !== "string")
88
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
88
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
89
89
  "operationKey must be a string containing 1\u2013512 characters.",
90
90
  400,
91
91
  "INVALID_OPERATION_KEY"
92
92
  );
93
93
  const operationKey = input.operationKey;
94
94
  if (operationKey !== void 0 && (!operationKey.trim() || operationKey.length > 512)) {
95
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
95
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
96
96
  "operationKey must contain 1\u2013512 characters.",
97
97
  400,
98
98
  "INVALID_OPERATION_KEY"
99
99
  );
100
100
  }
101
101
  if (input.maxRows !== void 0 && (!Number.isSafeInteger(input.maxRows) || input.maxRows < 1 || input.maxRows > 1e3)) {
102
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
102
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
103
103
  "maxRows must be a whole number from 1 to 1000.",
104
104
  400,
105
105
  "INVALID_MAX_ROWS"
@@ -141,10 +141,10 @@ async function queryCustomerDatabase(http, input, maxRetries) {
141
141
  }
142
142
  );
143
143
  } catch (error) {
144
- if (error instanceof _chunkPPDBRJRWjs.DeeplineError && (_optionalChain([error, 'access', _ => _.code, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
144
+ if (error instanceof _chunkDIAWYWT5js.DeeplineError && (_optionalChain([error, 'access', _ => _.code, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
145
145
  // lost connections and explicitly unknown transaction resolution.
146
146
  /^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
147
- throw new (0, _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError)(
147
+ throw new (0, _chunkALJJRZNJjs.CustomerDbQueryOutcomeUnknownError)(
148
148
  error,
149
149
  plan.request.body.operation_key
150
150
  );
@@ -152,8 +152,8 @@ async function queryCustomerDatabase(http, input, maxRetries) {
152
152
  throw error;
153
153
  }
154
154
  if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
155
- throw new (0, _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError)(
156
- new (0, _chunkPPDBRJRWjs.DeeplineError)(
155
+ throw new (0, _chunkALJJRZNJjs.CustomerDbQueryOutcomeUnknownError)(
156
+ new (0, _chunkDIAWYWT5js.DeeplineError)(
157
157
  "The SQL response did not contain a valid result.",
158
158
  200,
159
159
  "CUSTOMER_DB_QUERY_RESPONSE_INVALID"
@@ -163,8 +163,8 @@ async function queryCustomerDatabase(http, input, maxRetries) {
163
163
  }
164
164
  const operation = result.operation;
165
165
  if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
166
- throw new (0, _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError)(
167
- new (0, _chunkPPDBRJRWjs.DeeplineError)(
166
+ throw new (0, _chunkALJJRZNJjs.CustomerDbQueryOutcomeUnknownError)(
167
+ new (0, _chunkDIAWYWT5js.DeeplineError)(
168
168
  "The server did not confirm the original atomic SQL operation.",
169
169
  200,
170
170
  "CUSTOMER_DB_OPERATION_ACK_INVALID"
@@ -421,7 +421,7 @@ function usesExtendedBetterContactLauncherBudget(toolId) {
421
421
  var CLI_INVOCATION_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
422
422
  function validateCliInvocationId(value) {
423
423
  if (!CLI_INVOCATION_ID_PATTERN.test(value)) {
424
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
424
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
425
425
  "CLI invocation IDs must be UUID v4 values.",
426
426
  void 0,
427
427
  "CLI_INVOCATION_ID_INVALID"
@@ -437,7 +437,7 @@ var RAW_V2_EXECUTE_RESPONSE_CONTRACT = _chunkE4CABWXLjs.RAW_V2_TOOL_RESPONSE_CON
437
437
  var DEFAULT_EXECUTION_RECOVERY_TIMEOUT_MS = 15 * 60 * 1e3;
438
438
  function validateExecutionIdempotencyKey(key) {
439
439
  if (typeof key !== "string" || key.length < 1 || key.length > 200 || !/^[A-Za-z0-9._:-]+$/.test(key)) {
440
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
440
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
441
441
  "Execution idempotency keys must be 1\u2013200 ASCII letters, digits, dots, underscores, colons, or hyphens.",
442
442
  void 0,
443
443
  "IDEMPOTENCY_KEY_INVALID"
@@ -450,20 +450,20 @@ function getExecutionRecoveryState(value) {
450
450
  return state === "running" || state === "completed" || state === "outcome_unknown" ? state : null;
451
451
  }
452
452
  function isRecoverableExecutionAttemptError(error) {
453
- if (error instanceof _chunkPPDBRJRWjs.ToolExecutionError) {
453
+ if (error instanceof _chunkDIAWYWT5js.ToolExecutionError) {
454
454
  return error.code === "EXECUTION_IN_PROGRESS" || error.origin === "deepline" && error.category === "network" && error.networkScope === "client_to_deepline";
455
455
  }
456
- return error instanceof _chunkPPDBRJRWjs.DeeplineError && (error.code === "EXECUTION_IN_PROGRESS" || _optionalChain([error, 'access', _9 => _9.code, 'optionalAccess', _10 => _10.startsWith, 'call', _11 => _11("NETWORK_")]) === true && error.statusCode === void 0);
456
+ return error instanceof _chunkDIAWYWT5js.DeeplineError && (error.code === "EXECUTION_IN_PROGRESS" || _optionalChain([error, 'access', _9 => _9.code, 'optionalAccess', _10 => _10.startsWith, 'call', _11 => _11("NETWORK_")]) === true && error.statusCode === void 0);
457
457
  }
458
458
  function isRecoverableExecutionLookupError(error) {
459
459
  if (isRecoverableExecutionAttemptError(error)) return true;
460
- return error instanceof _chunkPPDBRJRWjs.DeeplineError && (error.statusCode === 429 || error.statusCode !== void 0 && error.statusCode >= 500);
460
+ return error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 429 || error.statusCode !== void 0 && error.statusCode >= 500);
461
461
  }
462
462
  function timeoutWithinRecoveryBudget(requestTimeoutMs, defaultRequestTimeoutMs, remainingMs) {
463
463
  return Math.min(_nullishCoalesce(requestTimeoutMs, () => ( defaultRequestTimeoutMs)), remainingMs);
464
464
  }
465
465
  function executionRecoveryError(input) {
466
- return new (0, _chunkPPDBRJRWjs.ToolExecutionError)(input.message, {
466
+ return new (0, _chunkDIAWYWT5js.ToolExecutionError)(input.message, {
467
467
  toolId: input.toolId,
468
468
  provider: null,
469
469
  operation: input.toolId,
@@ -571,7 +571,7 @@ var ToolCalls = class {
571
571
  if (idempotencyKey !== void 0) {
572
572
  validateExecutionIdempotencyKey(idempotencyKey);
573
573
  if (_optionalChain([options, 'optionalAccess', _16 => _16.recoveryTimeoutMs]) !== void 0 && (!Number.isFinite(options.recoveryTimeoutMs) || options.recoveryTimeoutMs < 0)) {
574
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
574
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
575
575
  "recoveryTimeoutMs must be a finite, non-negative number.",
576
576
  void 0,
577
577
  "IDEMPOTENCY_KEY_INVALID"
@@ -588,8 +588,8 @@ var ToolCalls = class {
588
588
  const headers = {
589
589
  [EXECUTE_RESPONSE_CONTRACT_HEADER]: RAW_V2_EXECUTE_RESPONSE_CONTRACT,
590
590
  ...isApifySync ? { "X-Deepline-Apify-Sync-Response-Budget": "extended-v1" } : {},
591
- [_chunkPPDBRJRWjs.TOOL_EXECUTION_ERROR_SCHEMA_HEADER]: String(
592
- _chunkPPDBRJRWjs.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
591
+ [_chunkDIAWYWT5js.TOOL_EXECUTION_ERROR_SCHEMA_HEADER]: String(
592
+ _chunkDIAWYWT5js.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
593
593
  ),
594
594
  ..._optionalChain([options, 'optionalAccess', _20 => _20.includeToolMetadata]) ? { [INCLUDE_TOOL_METADATA_HEADER]: "true" } : {},
595
595
  [EXECUTE_RESPONSE_INTENT_HEADER]: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _21 => _21.responseIntent]), () => ( "raw")),
@@ -602,7 +602,7 @@ var ToolCalls = class {
602
602
  if (!lastResponse) return;
603
603
  if (failure) {
604
604
  const { error } = failure;
605
- if (isRecoverableExecutionAttemptError(error) || !(error instanceof _chunkPPDBRJRWjs.DeeplineError) || error.statusCode === void 0 || error.statusCode !== lastResponse.httpStatus || error.code === "EXECUTION_OUTCOME_UNKNOWN")
605
+ if (isRecoverableExecutionAttemptError(error) || !(error instanceof _chunkDIAWYWT5js.DeeplineError) || error.statusCode === void 0 || error.statusCode !== lastResponse.httpStatus || error.code === "EXECUTION_OUTCOME_UNKNOWN")
606
606
  return;
607
607
  }
608
608
  const body = lastResponse.body;
@@ -647,7 +647,7 @@ var ToolCalls = class {
647
647
  idempotencyKey,
648
648
  onResponse: (response2) => {
649
649
  lastResponse = null;
650
- atomicToolsSupported = response2.headers.get(_chunkVXQQZV4Ajs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
650
+ atomicToolsSupported = response2.headers.get(_chunk2GVUZA6Cjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
651
651
  recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
652
652
  if (_optionalChain([options, 'optionalAccess', _29 => _29.onServerTiming])) {
653
653
  try {
@@ -670,8 +670,8 @@ var ToolCalls = class {
670
670
  return await post();
671
671
  } catch (error) {
672
672
  if (atomicToolOnly) {
673
- if (!atomicToolsSupported && !recoverySupported && !(error instanceof _chunkPPDBRJRWjs.ToolExecutionError) && error instanceof _chunkPPDBRJRWjs.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
674
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
673
+ if (!atomicToolsSupported && !recoverySupported && !(error instanceof _chunkDIAWYWT5js.ToolExecutionError) && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
674
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
675
675
  "This server does not support atomic tool execution.",
676
676
  error.statusCode,
677
677
  "ATOMIC_TOOL_EXECUTE_UNSUPPORTED"
@@ -679,7 +679,7 @@ var ToolCalls = class {
679
679
  }
680
680
  throw error;
681
681
  }
682
- if (useLegacyEndpoint || recoverySupported || !(error instanceof _chunkPPDBRJRWjs.DeeplineError) || error.statusCode !== 404 && error.statusCode !== 405)
682
+ if (useLegacyEndpoint || recoverySupported || !(error instanceof _chunkDIAWYWT5js.DeeplineError) || error.statusCode !== 404 && error.statusCode !== 405)
683
683
  throw error;
684
684
  lastResponse = null;
685
685
  await this.lookupExecutionByKey(
@@ -768,7 +768,7 @@ var ToolCalls = class {
768
768
  recoveryDeadline = Date.now() + recoveryTimeoutMs;
769
769
  }
770
770
  } catch (error) {
771
- if (idempotencyKey && error instanceof _chunkPPDBRJRWjs.DeeplineError && error.code === "EXECUTION_OUTCOME_UNKNOWN") {
771
+ if (idempotencyKey && error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "EXECUTION_OUTCOME_UNKNOWN") {
772
772
  throw executionRecoveryError({
773
773
  toolId,
774
774
  idempotencyKey,
@@ -803,7 +803,7 @@ var ToolCalls = class {
803
803
  validateExecutionIdempotencyKey(idempotencyKey);
804
804
  const result = await this.lookupExecutionByKey(idempotencyKey);
805
805
  if (!result) {
806
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
806
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
807
807
  `No execution exists for idempotency key ${idempotencyKey}.`,
808
808
  404,
809
809
  "EXECUTION_NOT_FOUND"
@@ -829,7 +829,7 @@ var ToolCalls = class {
829
829
  }
830
830
  );
831
831
  if (!supported) {
832
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
832
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
833
833
  "This Deepline server does not support recoverable tool executions; no tool was dispatched.",
834
834
  422,
835
835
  "IDEMPOTENCY_NOT_SUPPORTED"
@@ -899,7 +899,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
899
899
  if (request.runtime !== void 0) {
900
900
  const runtime = normalizePlayRuntimeSelection(request.runtime);
901
901
  if (!runtime) {
902
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
902
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
903
903
  'runtime must be { environment: "preview", namespace, backend?: "daytona" | "modal", sandboxPlacementPolicy?: "policy_name@1" } with namespace matching ^[a-z][a-z0-9-]{0,30}$.',
904
904
  void 0,
905
905
  "INVALID_RUNTIME_SELECTION"
@@ -920,7 +920,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
920
920
  present.push("DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY");
921
921
  }
922
922
  const isPlural = present.length > 1;
923
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
923
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
924
924
  [
925
925
  `Incomplete play runtime selection: ${present.join(" and ")} ${isPlural ? "are" : "is"} set but DEEPLINE_RUNTIME_ENVIRONMENT is not.`,
926
926
  "Preview routing requires DEEPLINE_RUNTIME_ENVIRONMENT=preview together with DEEPLINE_RUNTIME_NAMESPACE; the token alone authorizes nothing.",
@@ -935,7 +935,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
935
935
  }
936
936
  const environment = normalizePlayRuntimeEnvironment(configured);
937
937
  if (!environment) {
938
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
938
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
939
939
  `DEEPLINE_RUNTIME_ENVIRONMENT supports only explicit preview selection. Received "${configured}". Omit it to use the app-native runtime.`,
940
940
  void 0,
941
941
  "INVALID_RUNTIME_ENVIRONMENT"
@@ -943,7 +943,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
943
943
  }
944
944
  const namespace = normalizePlayRuntimeNamespace(configuredNamespace);
945
945
  if (!namespace) {
946
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
946
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
947
947
  "DEEPLINE_RUNTIME_NAMESPACE is required for preview and must match ^[a-z][a-z0-9-]{0,30}$.",
948
948
  void 0,
949
949
  "INVALID_RUNTIME_NAMESPACE"
@@ -952,14 +952,14 @@ function resolvePlayRunRuntimeSelection(request, env) {
952
952
  const configuredBackendValue = _optionalChain([env, 'access', _45 => _45.DEEPLINE_PLAY_RUNNER_BACKEND, 'optionalAccess', _46 => _46.trim, 'call', _47 => _47()]);
953
953
  const configuredBackend = configuredBackendValue === "daytona" || configuredBackendValue === "modal" ? configuredBackendValue : void 0;
954
954
  if (configuredBackendValue && !configuredBackend) {
955
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
955
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
956
956
  `DEEPLINE_PLAY_RUNNER_BACKEND must be daytona or modal for preview runtime selection. Received "${configuredBackendValue}".`,
957
957
  void 0,
958
958
  "INVALID_RUNTIME_BACKEND"
959
959
  );
960
960
  }
961
961
  if (configuredPlacementPolicy && !normalizePlayRuntimeSandboxPlacementPolicy(configuredPlacementPolicy)) {
962
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
962
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
963
963
  `DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY must be a versioned placement policy id such as daytona_only@1. Received "${configuredPlacementPolicy}".`,
964
964
  void 0,
965
965
  "INVALID_RUNTIME_SANDBOX_PLACEMENT_POLICY"
@@ -989,7 +989,7 @@ function runtimeSelectionHeaders(runtime, env) {
989
989
  if (!runtime) return void 0;
990
990
  const token = _optionalChain([env, 'access', _48 => _48.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _49 => _49.trim, 'call', _50 => _50()]);
991
991
  if (!token) {
992
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
992
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
993
993
  "DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN is required for explicit preview runtime selection.",
994
994
  void 0,
995
995
  "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED"
@@ -997,15 +997,15 @@ function runtimeSelectionHeaders(runtime, env) {
997
997
  }
998
998
  const receivers = _optionalChain([env, 'access', _51 => _51.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _52 => _52.trim, 'call', _53 => _53()]);
999
999
  return {
1000
- [_chunkVXQQZV4Ajs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1001
- ...receivers ? { [_chunkVXQQZV4Ajs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1000
+ [_chunk2GVUZA6Cjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1001
+ ...receivers ? { [_chunk2GVUZA6Cjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1002
1002
  };
1003
1003
  }
1004
1004
  function normalizeTestPolicyOverrides(value, source) {
1005
1005
  if (value && typeof value === "object" && !Array.isArray(value)) {
1006
1006
  return value;
1007
1007
  }
1008
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
1008
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
1009
1009
  `${source} must be a JSON object.`,
1010
1010
  void 0,
1011
1011
  "INVALID_TEST_POLICY_OVERRIDES"
@@ -1020,7 +1020,7 @@ function parseEnvTestPolicyOverrides(env) {
1020
1020
  parsed = JSON.parse(trimmed);
1021
1021
  } catch (error) {
1022
1022
  const detail = error instanceof Error ? ` ${error.message}` : "";
1023
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
1023
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
1024
1024
  `DEEPLINE_TEST_POLICY_OVERRIDES must be valid JSON.${detail}`,
1025
1025
  void 0,
1026
1026
  "INVALID_TEST_POLICY_OVERRIDES"
@@ -1032,10 +1032,10 @@ function isRecord2(value) {
1032
1032
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
1033
1033
  }
1034
1034
  function normalizePlayStatus(raw) {
1035
- const runPackage = _chunk2H4EY7KHjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunk2H4EY7KHjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
1035
+ const runPackage = _chunkJKVRBCZLjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunkJKVRBCZLjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
1036
1036
  const packageRun = _optionalChain([runPackage, 'optionalAccess', _56 => _56.run]);
1037
1037
  const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess', _57 => _57.status]) === "string" ? packageRun.status : null;
1038
- const status = _chunk2H4EY7KHjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
1038
+ const status = _chunkJKVRBCZLjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
1039
1039
  if (!status) {
1040
1040
  throw new Error(
1041
1041
  `Invalid play run lifecycle status in API response: ${JSON.stringify(rawStatus)}.`
@@ -1066,10 +1066,10 @@ var PlayClient = class {
1066
1066
  async startPlayRun(request, options) {
1067
1067
  const resolved = resolveStartPlayRunRequest(request, this.environment);
1068
1068
  const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
1069
- return _chunk2H4EY7KHjs.startPlayRun.call(void 0,
1069
+ return _chunkJKVRBCZLjs.startPlayRun.call(void 0,
1070
1070
  this.http,
1071
1071
  resolved.request,
1072
- _optionalChain([options, 'optionalAccess', _61 => _61.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkVXQQZV4Ajs.SDK_API_MAJOR) } : headers,
1072
+ _optionalChain([options, 'optionalAccess', _61 => _61.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunk2GVUZA6Cjs.SDK_API_MAJOR) } : headers,
1073
1073
  options
1074
1074
  );
1075
1075
  }
@@ -1135,9 +1135,9 @@ var PlayClient = class {
1135
1135
  }
1136
1136
  };
1137
1137
  function createPlayClient(options) {
1138
- const config = _chunkVXQQZV4Ajs.resolveConfig.call(void 0, options);
1138
+ const config = _chunk2GVUZA6Cjs.resolveConfig.call(void 0, options);
1139
1139
  return new PlayClient(
1140
- new (0, _chunkVXQQZV4Ajs.HttpClient)(config),
1140
+ new (0, _chunk2GVUZA6Cjs.HttpClient)(config),
1141
1141
  _nullishCoalesce(config.environment, () => ( process.env))
1142
1142
  );
1143
1143
  }
@@ -1349,13 +1349,13 @@ function stripLeadingTimestamp(line) {
1349
1349
 
1350
1350
  // src/runs/read-errors.ts
1351
1351
  function isTransientPlayRunReadError(error) {
1352
- if (error instanceof _chunkPPDBRJRWjs.DeeplineError && error.code === "PLAY_START_OUTCOME_UNKNOWN") {
1352
+ if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_START_OUTCOME_UNKNOWN") {
1353
1353
  return false;
1354
1354
  }
1355
- if (error instanceof _chunkPPDBRJRWjs.DeeplineError && error.code === "PLAY_STREAM_NETWORK_ABORTED") {
1355
+ if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_STREAM_NETWORK_ABORTED") {
1356
1356
  return true;
1357
1357
  }
1358
- if (error instanceof _chunkPPDBRJRWjs.DeeplineError && typeof error.statusCode === "number") {
1358
+ if (error instanceof _chunkDIAWYWT5js.DeeplineError && typeof error.statusCode === "number") {
1359
1359
  return error.statusCode >= 500 && error.statusCode < 600;
1360
1360
  }
1361
1361
  const text = error instanceof Error ? error.message : String(error);
@@ -2639,7 +2639,7 @@ var TERMINAL_STATUS_BY_EVENT_TYPE = {
2639
2639
 
2640
2640
  // ../play-runtime/run-snapshot-stream.ts
2641
2641
  function isTerminalPlayRunLiveStatus(status) {
2642
- return _chunk2H4EY7KHjs.isTerminalPlayRunLifecycleStatus.call(void 0, status);
2642
+ return _chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, status);
2643
2643
  }
2644
2644
  function makeRunStreamEvent(input) {
2645
2645
  return {
@@ -3068,7 +3068,7 @@ async function* watchRunEvents(options) {
3068
3068
 
3069
3069
  // src/client.ts
3070
3070
  function invalidToolDiscoveryResponse() {
3071
- return new (0, _chunkPPDBRJRWjs.DeeplineError)(
3071
+ return new (0, _chunkDIAWYWT5js.DeeplineError)(
3072
3072
  "The server returned an invalid tool discovery response.",
3073
3073
  502,
3074
3074
  "INVALID_TOOL_DISCOVERY_RESPONSE"
@@ -3145,19 +3145,19 @@ function isolatedCiRuntimeEventReadHeaders(env) {
3145
3145
  }
3146
3146
  const token = _optionalChain([env, 'access', _130 => _130.DEEPLINE_INTERNAL_TOKEN, 'optionalAccess', _131 => _131.trim, 'call', _132 => _132()]);
3147
3147
  if (!token) {
3148
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
3148
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
3149
3149
  "DEEPLINE_INTERNAL_TOKEN is required for isolated CI runtime event reads.",
3150
3150
  void 0,
3151
3151
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
3152
3152
  );
3153
3153
  }
3154
- return { [_chunkVXQQZV4Ajs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3154
+ return { [_chunk2GVUZA6Cjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3155
3155
  }
3156
3156
  function sleep(ms) {
3157
3157
  return new Promise((resolve) => setTimeout(resolve, ms));
3158
3158
  }
3159
3159
  function isTransientCompileManifestError(error) {
3160
- if (error instanceof _chunkPPDBRJRWjs.DeeplineError && typeof error.statusCode === "number") {
3160
+ if (error instanceof _chunkDIAWYWT5js.DeeplineError && typeof error.statusCode === "number") {
3161
3161
  return error.statusCode === 408 || error.statusCode === 425 || error.statusCode === 499 || error.statusCode >= 500 && error.statusCode < 600;
3162
3162
  }
3163
3163
  const message = error instanceof Error ? error.message : String(error);
@@ -3168,7 +3168,7 @@ function isTransientCompileManifestError(error) {
3168
3168
  function requireCompileManifestResponse(response, playName) {
3169
3169
  const compilerManifest = _optionalChain([response, 'optionalAccess', _133 => _133.compilerManifest]);
3170
3170
  if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
3171
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
3171
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
3172
3172
  `Compile manifest response did not include compilerManifest for ${playName}.`,
3173
3173
  502,
3174
3174
  "API_RESPONSE_INVALID",
@@ -3282,7 +3282,7 @@ function playLiveRunStatus(event) {
3282
3282
  return null;
3283
3283
  }
3284
3284
  const payload = getPlayLiveEventPayload(event);
3285
- return _nullishCoalesce(_chunk2H4EY7KHjs.decodePlayRunPublicStatus.call(void 0, payload.status), () => ( (_chunk2H4EY7KHjs.isPlayRunPackage.call(void 0, payload) ? _chunk2H4EY7KHjs.decodePlayRunPublicStatus.call(void 0, payload.run.status) : null)));
3285
+ return _nullishCoalesce(_chunkJKVRBCZLjs.decodePlayRunPublicStatus.call(void 0, payload.status), () => ( (_chunkJKVRBCZLjs.isPlayRunPackage.call(void 0, payload) ? _chunkJKVRBCZLjs.decodePlayRunPublicStatus.call(void 0, payload.run.status) : null)));
3286
3286
  }
3287
3287
  function appendPlayLiveLogLines(state, payload) {
3288
3288
  const lines = readStringArray(payload.lines);
@@ -3314,7 +3314,7 @@ function updatePlayLiveStatusState(state, event) {
3314
3314
  if (event.type !== "play.run.snapshot" && event.type !== "play.run.status" && event.type !== "play.run.final_status") {
3315
3315
  return null;
3316
3316
  }
3317
- const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : _chunk2H4EY7KHjs.isPlayRunPackage.call(void 0, payload) ? payload.run.id : state.runId;
3317
+ const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : _chunkJKVRBCZLjs.isPlayRunPackage.call(void 0, payload) ? payload.run.id : state.runId;
3318
3318
  const status = _nullishCoalesce(playLiveRunStatus(event), () => ( state.status));
3319
3319
  const progressPayload = isRecord3(payload.progress) ? payload.progress : {};
3320
3320
  if (event.type === "play.run.final_status" && state.logs.length === 0 && state.lastLogSeq === 0) {
@@ -3327,7 +3327,7 @@ function updatePlayLiveStatusState(state, event) {
3327
3327
  }
3328
3328
  if ("result" in payload) {
3329
3329
  state.result = payload.result;
3330
- } else if (_chunk2H4EY7KHjs.isPlayRunPackage.call(void 0, payload)) {
3330
+ } else if (_chunkJKVRBCZLjs.isPlayRunPackage.call(void 0, payload)) {
3331
3331
  state.result = payload;
3332
3332
  }
3333
3333
  if (typeof payload.error === "string" && payload.error.trim()) {
@@ -3340,7 +3340,7 @@ function updatePlayLiveStatusState(state, event) {
3340
3340
  ...payload,
3341
3341
  runId,
3342
3342
  status,
3343
- ..._chunk2H4EY7KHjs.isPlayRunPackage.call(void 0, payload) ? { package: payload, outputs: payload.outputs } : {},
3343
+ ..._chunkJKVRBCZLjs.isPlayRunPackage.call(void 0, payload) ? { package: payload, outputs: payload.outputs } : {},
3344
3344
  progress: {
3345
3345
  ...progressRecord,
3346
3346
  status: typeof progressRecord.status === "string" ? progressRecord.status : status,
@@ -3389,9 +3389,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
3389
3389
  * @throws {@link ConfigError} if no API key can be resolved from any source.
3390
3390
  */
3391
3391
  constructor(options) {
3392
- this.config = _chunkVXQQZV4Ajs.resolveConfig.call(void 0, options);
3392
+ this.config = _chunk2GVUZA6Cjs.resolveConfig.call(void 0, options);
3393
3393
  this.environment = _nullishCoalesce(this.config.environment, () => ( process.env));
3394
- this.http = new (0, _chunkVXQQZV4Ajs.HttpClient)(this.config);
3394
+ this.http = new (0, _chunk2GVUZA6Cjs.HttpClient)(this.config);
3395
3395
  this.playClient = new PlayClient(this.http, this.environment);
3396
3396
  this.toolCalls = new ToolCalls(
3397
3397
  this.http,
@@ -3631,7 +3631,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3631
3631
  async listToolsInCategory(category, options) {
3632
3632
  const normalizedCategory = category.trim();
3633
3633
  if (!normalizedCategory || category.includes(",")) {
3634
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
3634
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
3635
3635
  "Provide one non-empty tool category.",
3636
3636
  400,
3637
3637
  "INVALID_TOOL_CATEGORY"
@@ -3865,7 +3865,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3865
3865
  */
3866
3866
  async preparePlayRunAdmission(request, options) {
3867
3867
  const resolved = resolveStartPlayRunRequest(request, this.environment);
3868
- const prepared = await _chunk2H4EY7KHjs.preparePlayRunAdmission.call(void 0,
3868
+ const prepared = await _chunkJKVRBCZLjs.preparePlayRunAdmission.call(void 0,
3869
3869
  this.http,
3870
3870
  resolved.request,
3871
3871
  _optionalChain([options, 'optionalAccess', _174 => _174.onSubmission])
@@ -3878,20 +3878,20 @@ var DeeplineClient = (_class = class _DeeplineClient {
3878
3878
  ...prepared,
3879
3879
  async *startStream(streamOptions) {
3880
3880
  if (submitted && !prepared.supportsCallerIntent) {
3881
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
3881
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
3882
3882
  "This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
3883
3883
  409,
3884
3884
  "PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
3885
3885
  );
3886
3886
  }
3887
3887
  if (submitted) {
3888
- await _chunk2H4EY7KHjs.preparePlayRunAdmission.call(void 0,
3888
+ await _chunkJKVRBCZLjs.preparePlayRunAdmission.call(void 0,
3889
3889
  http,
3890
3890
  JSON.parse(bodyJson)
3891
3891
  );
3892
3892
  }
3893
3893
  submitted = true;
3894
- const streamPath = _optionalChain([options, 'optionalAccess', _175 => _175.cliAdmission]) ? _chunk2H4EY7KHjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunk2H4EY7KHjs.PLAY_RUN_START_STREAM_PATH;
3894
+ const streamPath = _optionalChain([options, 'optionalAccess', _175 => _175.cliAdmission]) ? _chunkJKVRBCZLjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkJKVRBCZLjs.PLAY_RUN_START_STREAM_PATH;
3895
3895
  try {
3896
3896
  for await (const event of http.streamSse(streamPath, {
3897
3897
  method: "POST",
@@ -3903,8 +3903,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3903
3903
  if (event.scope === "play") yield event;
3904
3904
  }
3905
3905
  } catch (error) {
3906
- if (_optionalChain([options, 'optionalAccess', _177 => _177.cliAdmission]) && error instanceof _chunkPPDBRJRWjs.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
3907
- throw new (0, _chunk2H4EY7KHjs.CliPlayAdmissionUnsupportedError)(error.statusCode);
3906
+ if (_optionalChain([options, 'optionalAccess', _177 => _177.cliAdmission]) && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
3907
+ throw new (0, _chunkJKVRBCZLjs.CliPlayAdmissionUnsupportedError)(error.statusCode);
3908
3908
  }
3909
3909
  throw error;
3910
3910
  }
@@ -4183,7 +4183,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4183
4183
  * ```
4184
4184
  */
4185
4185
  async stagePlayFiles(files) {
4186
- return _chunk2H4EY7KHjs.stagePlayFiles.call(void 0, this.http, files);
4186
+ return _chunkJKVRBCZLjs.stagePlayFiles.call(void 0, this.http, files);
4187
4187
  }
4188
4188
  /**
4189
4189
  * Mint short-lived presigned upload targets for staged play files.
@@ -4192,7 +4192,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4192
4192
  * For other files, the server returns a presigned PUT URL. Upload the file body to that URL.
4193
4193
  */
4194
4194
  async mintStagedPlayFileUploads(files) {
4195
- return _chunk2H4EY7KHjs.mintStagedPlayFileUploads.call(void 0, this.http, files);
4195
+ return _chunkJKVRBCZLjs.mintStagedPlayFileUploads.call(void 0, this.http, files);
4196
4196
  }
4197
4197
  /**
4198
4198
  * Resolve staged play files by content hash without uploading bytes.
@@ -4303,18 +4303,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
4303
4303
  }
4304
4304
  })) {
4305
4305
  _optionalChain([options, 'optionalAccess', _215 => _215.onEvent, 'optionalCall', _216 => _216(event)]);
4306
- if (_chunk2H4EY7KHjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
4306
+ if (_chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
4307
4307
  terminalObserved = true;
4308
4308
  }
4309
4309
  }
4310
4310
  if (_optionalChain([options, 'optionalAccess', _217 => _217.signal, 'optionalAccess', _218 => _218.aborted])) {
4311
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
4311
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
4312
4312
  }
4313
4313
  const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
4314
- if (terminalObserved || _chunk2H4EY7KHjs.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
4314
+ if (terminalObserved || _chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
4315
4315
  return refreshed;
4316
4316
  }
4317
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
4317
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4318
4318
  `Run watch for ${runId} ended before a terminal status.`,
4319
4319
  void 0,
4320
4320
  "PLAY_WATCH_ENDED"
@@ -4488,7 +4488,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4488
4488
  { headers: { "x-deepline-run-status": "1" } }
4489
4489
  );
4490
4490
  if (_optionalChain([options, 'optionalAccess', _223 => _223.configuration]) === true && !Object.hasOwn(response, "contract")) {
4491
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
4491
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4492
4492
  "This server does not support recorded configuration reads.",
4493
4493
  void 0,
4494
4494
  "RUN_CONFIGURATION_UNAVAILABLE"
@@ -4539,14 +4539,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
4539
4539
  async getRunChildren(parentRunId, options) {
4540
4540
  const launchKey = options.launchKey.trim();
4541
4541
  if (!launchKey) {
4542
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
4542
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4543
4543
  "runs.children requires a nonempty launchKey.",
4544
4544
  void 0,
4545
4545
  "INVALID_CHILD_RUN_LAUNCH_KEY"
4546
4546
  );
4547
4547
  }
4548
4548
  if (options.limit !== void 0 && (!Number.isInteger(options.limit) || options.limit < 1 || options.limit > 50)) {
4549
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
4549
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4550
4550
  "runs.children limit must be an integer from 1 to 50.",
4551
4551
  void 0,
4552
4552
  "INVALID_CHILD_RUN_PAGE_LIMIT"
@@ -4695,7 +4695,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4695
4695
  async rerun(runId, options) {
4696
4696
  const idempotencyKey = _optionalChain([options, 'optionalAccess', _237 => _237.idempotencyKey, 'optionalAccess', _238 => _238.trim, 'call', _239 => _239()]);
4697
4697
  if (_optionalChain([options, 'optionalAccess', _240 => _240.idempotencyKey]) !== void 0 && !idempotencyKey) {
4698
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
4698
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4699
4699
  "runs.rerun idempotencyKey must not be empty.",
4700
4700
  void 0,
4701
4701
  "INVALID_IDEMPOTENCY_KEY"
@@ -4718,14 +4718,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
4718
4718
  */
4719
4719
  async getRunLogs(runId, options) {
4720
4720
  if (_optionalChain([options, 'optionalAccess', _242 => _242.all]) === true && options.failed === true) {
4721
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
4721
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4722
4722
  "runs.logs cannot combine all and failed views.",
4723
4723
  void 0,
4724
4724
  "INVALID_RUN_LOG_VIEW"
4725
4725
  );
4726
4726
  }
4727
4727
  if (_optionalChain([options, 'optionalAccess', _243 => _243.cursor]) !== void 0 && options.failed === true) {
4728
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
4728
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4729
4729
  "runs.logs cannot combine failed with cursor.",
4730
4730
  void 0,
4731
4731
  "INVALID_RUN_LOG_VIEW"
@@ -4875,7 +4875,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4875
4875
  if (selection !== void 0) {
4876
4876
  const runtime = normalizePlayRuntimeSelection(selection);
4877
4877
  if (!runtime) {
4878
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
4878
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4879
4879
  "Run event queries require a valid Preview runtime selection.",
4880
4880
  void 0,
4881
4881
  "INVALID_RUNTIME_SELECTION"
@@ -4932,7 +4932,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4932
4932
  if (options.runtime !== void 0) {
4933
4933
  const runtime = normalizePlayRuntimeSelection(options.runtime);
4934
4934
  if (!runtime) {
4935
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
4935
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4936
4936
  "runs.searchEvents runtime must be a valid Preview selection.",
4937
4937
  void 0,
4938
4938
  "INVALID_RUNTIME_SELECTION"
@@ -4998,7 +4998,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4998
4998
  )
4999
4999
  ];
5000
5000
  if (_optionalChain([result, 'access', _261 => _261.scope, 'optionalAccess', _262 => _262.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
5001
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
5001
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5002
5002
  `Run-scoped dataset export was not confirmed for ${requestedRunId}; no rows were returned to the caller. Update Deepline, then retry the same export command. Do not rerun the play.`,
5003
5003
  void 0,
5004
5004
  "RUN_EXPORT_SCOPE_MISMATCH",
@@ -5053,7 +5053,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5053
5053
  }
5054
5054
  );
5055
5055
  if (dryRun && !isStopAllPlayRunsDryRunResult(result)) {
5056
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
5056
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5057
5057
  "This Deepline server does not support runs stop-all --dry-run and performed a real stop-all. Update the server before using --dry-run.",
5058
5058
  void 0,
5059
5059
  "STOP_ALL_DRY_RUN_UNSUPPORTED"
@@ -5781,7 +5781,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5781
5781
  if (event.type !== "play.run.status" || status.status !== previousStatus) {
5782
5782
  _optionalChain([options, 'optionalAccess', _315 => _315.onProgress, 'optionalCall', _316 => _316(status)]);
5783
5783
  }
5784
- if (_chunk2H4EY7KHjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
5784
+ if (_chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
5785
5785
  terminalObserved = status;
5786
5786
  }
5787
5787
  }
@@ -5801,7 +5801,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5801
5801
  ).catch(() => terminalObserved);
5802
5802
  return playRunResultFromStatus(finalStatus, start, workflowId);
5803
5803
  }
5804
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
5804
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5805
5805
  `Run watch for ${workflowId} ended before the run reached a terminal state.`,
5806
5806
  void 0,
5807
5807
  "PLAY_RUN_STREAM_ENDED",
@@ -5829,7 +5829,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5829
5829
  async getBillingUsageEvent(requestId) {
5830
5830
  const normalizedRequestId = requestId.trim();
5831
5831
  if (normalizedRequestId.length === 0 || normalizedRequestId.length > 200 || normalizedRequestId !== requestId) {
5832
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
5832
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5833
5833
  "Usage request_id must contain 1\u2013200 characters with no leading or trailing whitespace.",
5834
5834
  void 0,
5835
5835
  "INVALID_USAGE_REQUEST_ID"
@@ -5840,7 +5840,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5840
5840
  );
5841
5841
  const event = _optionalChain([response, 'access', _319 => _319.entries, 'optionalAccess', _320 => _320[0]]);
5842
5842
  if (!event) {
5843
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
5843
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5844
5844
  "No usage event was found for this request_id.",
5845
5845
  void 0,
5846
5846
  "USAGE_EVENT_NOT_FOUND"
@@ -5869,14 +5869,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
5869
5869
  if (options.requestId !== void 0) {
5870
5870
  const requestId = options.requestId.trim();
5871
5871
  if (requestId.length === 0 || requestId.length > 200 || requestId !== options.requestId) {
5872
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
5872
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5873
5873
  "Usage request_id must contain 1\u2013200 characters with no leading or trailing whitespace.",
5874
5874
  void 0,
5875
5875
  "INVALID_USAGE_REQUEST_ID"
5876
5876
  );
5877
5877
  }
5878
5878
  if (options.runId !== void 0 || options.cursor !== void 0 || options.offset !== void 0) {
5879
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
5879
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5880
5880
  "requestId cannot be combined with runId, cursor, or offset.",
5881
5881
  void 0,
5882
5882
  "INVALID_USAGE_FILTERS"
@@ -6039,7 +6039,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6039
6039
  /** Recover only the original workspace, credit amount, and purchase key; never charge. */
6040
6040
  async recoverTargetBillingCreditPurchase(options) {
6041
6041
  if (typeof options.idempotencyKey !== "string") {
6042
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
6042
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6043
6043
  "The original billing idempotencyKey is required.",
6044
6044
  void 0,
6045
6045
  "INVALID_BILLING_IDEMPOTENCY_KEY"
@@ -6049,14 +6049,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
6049
6049
  options.idempotencyKey
6050
6050
  );
6051
6051
  if (!Number.isSafeInteger(options.credits) || options.credits <= 0) {
6052
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
6052
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6053
6053
  "credits must be a positive safe integer.",
6054
6054
  void 0,
6055
6055
  "INVALID_CREDITS"
6056
6056
  );
6057
6057
  }
6058
6058
  if (typeof options.orgId !== "string" || !options.orgId.trim() || options.orgId !== options.orgId.trim()) {
6059
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
6059
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6060
6060
  "The original orgId is required without surrounding whitespace.",
6061
6061
  void 0,
6062
6062
  "INVALID_ORG_ID"
@@ -6173,7 +6173,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6173
6173
  async submitMonitorBatch(options) {
6174
6174
  const idempotencyKey = options.idempotencyKey.trim();
6175
6175
  if (!idempotencyKey) {
6176
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
6176
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6177
6177
  "Monitor batch idempotencyKey is required.",
6178
6178
  void 0,
6179
6179
  "INVALID_MONITOR_BATCH_IDEMPOTENCY_KEY"
@@ -6181,7 +6181,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6181
6181
  }
6182
6182
  if (options.kind === "deploy") {
6183
6183
  if (!options.manifestNdjson.trim()) {
6184
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
6184
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6185
6185
  "Monitor batch deploy requires a non-empty NDJSON manifest.",
6186
6186
  void 0,
6187
6187
  "INVALID_MONITOR_BATCH_MANIFEST"
@@ -6227,7 +6227,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6227
6227
  async getMonitorBatch(operationId, options) {
6228
6228
  const runId = operationId.trim();
6229
6229
  if (!runId) {
6230
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
6230
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6231
6231
  "Monitor batch operation id is required.",
6232
6232
  void 0,
6233
6233
  "INVALID_MONITOR_BATCH_OPERATION_ID"
@@ -6336,7 +6336,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6336
6336
  }
6337
6337
  async testMonitorWebhook(key, payload, options) {
6338
6338
  if (_optionalChain([options, 'optionalAccess', _336 => _336.dispatch]) === true || _optionalChain([options, 'optionalAccess', _337 => _337.validationOnly]) === false) {
6339
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
6339
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6340
6340
  "Monitor tests are validation-only and cannot dispatch events.",
6341
6341
  void 0,
6342
6342
  "MONITOR_TEST_DISPATCH_NOT_SUPPORTED"
@@ -6391,7 +6391,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6391
6391
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6392
6392
  async deleteMonitor(key, options) {
6393
6393
  if (_optionalChain([options, 'optionalAccess', _338 => _338.localOnly]) === true) {
6394
- throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
6394
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6395
6395
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6396
6396
  void 0,
6397
6397
  "MONITOR_LOCAL_ONLY_DELETE_NOT_SUPPORTED"