deepline 0.3.451 → 0.3.453

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 (117) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +65 -0
  2. package/dist/bundling-sources/sdk/src/http.ts +2 -1
  3. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +63 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +5 -1
  7. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +49 -11
  8. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +6 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +3 -1
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +17 -2
  12. package/dist/cli/{auth-YLBWEMRW.mjs → auth-6CXS55CN.mjs} +4 -4
  13. package/dist/cli/auth-AICIA232.js +40 -0
  14. package/dist/cli/{billing-GWG5D3P6.js → billing-QC52XTAD.js} +87 -74
  15. package/dist/cli/{billing-DUFOEOPT.mjs → billing-SWLTV6PV.mjs} +18 -5
  16. package/dist/cli/{chunk-37CPEQBE.mjs → chunk-2LDU5BMG.mjs} +3 -3
  17. package/dist/cli/{chunk-JUCEEIEC.mjs → chunk-43HOSM2F.mjs} +1 -1
  18. package/dist/cli/{chunk-E7V5CRA2.mjs → chunk-6CTVXF6X.mjs} +8 -8
  19. package/dist/cli/{chunk-BJOVX7EB.mjs → chunk-7557D4FM.mjs} +2 -2
  20. package/dist/cli/chunk-BX343KU7.mjs +155 -0
  21. package/dist/cli/{chunk-7VRWERTM.js → chunk-DMTAFWMS.js} +84 -50
  22. package/dist/cli/{chunk-XLOXUW5Y.mjs → chunk-FS2RMEJ7.mjs} +1 -1
  23. package/dist/cli/{chunk-EJ6YI46S.js → chunk-HUDUN4AR.js} +2 -2
  24. package/dist/cli/{chunk-OKTCLFKM.mjs → chunk-IFBLLSGH.mjs} +5 -5
  25. package/dist/cli/{chunk-33EM4SMH.mjs → chunk-IWFI6FTJ.mjs} +4 -153
  26. package/dist/cli/{chunk-ZPV7DMAA.mjs → chunk-IXVABCNA.mjs} +1 -1
  27. package/dist/cli/{chunk-O3KVUHCG.js → chunk-JOF3B22H.js} +20 -20
  28. package/dist/cli/{chunk-6TFACCXN.js → chunk-KFKM5J2N.js} +2 -2
  29. package/dist/cli/{chunk-WLVGRU5A.mjs → chunk-KQD6EFPD.mjs} +2 -2
  30. package/dist/cli/{chunk-HSKLAPMD.js → chunk-MP35NE55.js} +26 -26
  31. package/dist/cli/chunk-NOHA3SZJ.js +155 -0
  32. package/dist/cli/{chunk-Z3DBS4IB.js → chunk-NSQZUUYB.js} +81 -81
  33. package/dist/cli/{chunk-BQQLTSGC.mjs → chunk-P4UQCYKH.mjs} +4 -4
  34. package/dist/cli/{chunk-CH2WDSBC.js → chunk-PJWXEUUH.js} +8 -8
  35. package/dist/cli/{chunk-L2IUGWV5.js → chunk-RG644LJU.js} +1 -1
  36. package/dist/cli/{chunk-5DUMNKQG.js → chunk-RNCIPLU5.js} +50 -50
  37. package/dist/cli/{chunk-WDOWAOYB.js → chunk-RTR2KUU6.js} +10 -10
  38. package/dist/cli/{chunk-4C7HPD57.mjs → chunk-SQUJHT7O.mjs} +1 -1
  39. package/dist/cli/{chunk-ZNDE2BTH.js → chunk-V6AZQ4JH.js} +16 -16
  40. package/dist/cli/{chunk-F2DW7DFE.js → chunk-V7S2RUVE.js} +8 -8
  41. package/dist/cli/{chunk-C4NPWUZY.js → chunk-VG6WESY7.js} +73 -222
  42. package/dist/cli/{chunk-6G6KX7I7.js → chunk-WTTHH2K3.js} +6 -6
  43. package/dist/cli/{chunk-JRPNCMMN.js → chunk-WWZ4YJ6J.js} +35 -35
  44. package/dist/cli/{chunk-PJYTV24I.mjs → chunk-X2LUT22I.mjs} +2 -2
  45. package/dist/cli/{chunk-YXXIFMXI.mjs → chunk-XH4QC5ZX.mjs} +2 -2
  46. package/dist/cli/{chunk-3HT47QPJ.mjs → chunk-XNN3OTGT.mjs} +2 -2
  47. package/dist/cli/{chunk-LPPAJJJN.mjs → chunk-XV4463XW.mjs} +35 -1
  48. package/dist/cli/{chunk-TFCLUWDQ.js → chunk-YU6IE234.js} +6 -6
  49. package/dist/cli/{chunk-RFPP4Q66.mjs → chunk-ZVBLECZX.mjs} +3 -3
  50. package/dist/cli/{csv-RL7WQD6Y.mjs → csv-FON4ZQKC.mjs} +3 -3
  51. package/dist/cli/{csv-4CHXZQXO.js → csv-WIQB5XWZ.js} +12 -12
  52. package/dist/cli/{db-ZDBAWV7B.mjs → db-3KA62DOQ.mjs} +4 -4
  53. package/dist/cli/{db-MRI5IM2A.js → db-VMDDODCN.js} +25 -25
  54. package/dist/cli/{describe-RRQUUJQ3.mjs → describe-LGDK77QI.mjs} +13 -12
  55. package/dist/cli/{describe-2FYKXM5B.js → describe-NTAAHCCX.js} +17 -16
  56. package/dist/cli/describe-core.d.mts +1 -1
  57. package/dist/cli/describe-core.d.ts +1 -1
  58. package/dist/cli/{executions-KDBD47A5.js → executions-OT2KNJDO.js} +6 -6
  59. package/dist/cli/{executions-RJL76TJS.mjs → executions-TM6AMTQ7.mjs} +4 -4
  60. package/dist/cli/{feedback-2CE24NHD.js → feedback-4HQGY3TO.js} +7 -7
  61. package/dist/cli/{feedback-KOYLXHYE.mjs → feedback-HWLUVFE2.mjs} +3 -3
  62. package/dist/cli/git-QIZWO5BA.js +24 -0
  63. package/dist/cli/{git-RDUHU6L6.mjs → git-TDJVSPE6.mjs} +4 -4
  64. package/dist/cli/index.js +133 -131
  65. package/dist/cli/index.mjs +39 -37
  66. package/dist/cli/{legacy-noops-7FOMGBMN.js → legacy-noops-XH3FDLWT.js} +7 -7
  67. package/dist/cli/{legacy-noops-4HS2LYP6.mjs → legacy-noops-YB2PES43.mjs} +4 -4
  68. package/dist/cli/{monitors-IJXNK5BL.js → monitors-E3QFEJKF.js} +276 -124
  69. package/dist/cli/{monitors-JLBTNBVU.mjs → monitors-KQDDMSDR.mjs} +156 -4
  70. package/dist/cli/{org-OWP6K4AA.mjs → org-7X2C7YKA.mjs} +4 -4
  71. package/dist/cli/{org-JL7SW6VY.js → org-PMTLR7VP.js} +66 -66
  72. package/dist/cli/{play-FNOVKU74.mjs → play-7FNEPSVR.mjs} +11 -10
  73. package/dist/cli/{play-LLNZWHT6.js → play-RH22Z3D6.js} +284 -283
  74. package/dist/cli/{providers-WBOEOKE7.mjs → providers-HOEDJNUK.mjs} +4 -4
  75. package/dist/cli/{providers-E4XIEUC7.js → providers-X5NY5IQH.js} +7 -7
  76. package/dist/cli/{quickstart-3FUHKGEY.js → quickstart-FI4A6VTV.js} +5 -5
  77. package/dist/cli/{quickstart-6G5G3BVA.mjs → quickstart-NCL7P2US.mjs} +3 -3
  78. package/dist/cli/search-6FUMJBIY.js +30 -0
  79. package/dist/cli/{search-CNMB4Z6M.mjs → search-UHT7ZNPO.mjs} +5 -5
  80. package/dist/cli/{secrets-5FY5APVK.mjs → secrets-D4ZB5RKB.mjs} +4 -4
  81. package/dist/cli/{secrets-BDSWOYAT.js → secrets-TT6J3SZJ.js} +13 -13
  82. package/dist/cli/{sessions-PMIKVPQN.mjs → sessions-HRLJ6SLL.mjs} +4 -4
  83. package/dist/cli/{sessions-B7T2CHYK.js → sessions-SRQQZMM7.js} +5 -5
  84. package/dist/cli/{settings-RXQJRRLR.js → settings-EJIKXLC7.js} +76 -75
  85. package/dist/cli/{settings-4TAYLTPR.mjs → settings-PJJYPWU3.mjs} +9 -8
  86. package/dist/cli/{setup-ZTMETGSO.js → setup-3FL77Z33.js} +43 -42
  87. package/dist/cli/{setup-LVUISLVO.mjs → setup-DNI6ENFD.mjs} +8 -7
  88. package/dist/cli/skills-DEKOSL7F.js +30 -0
  89. package/dist/cli/{skills-NSJ43Z5Q.mjs → skills-FO7MY2OE.mjs} +6 -5
  90. package/dist/cli/tools-E6XRW6PW.js +45 -0
  91. package/dist/cli/{tools-CFCKIGDY.mjs → tools-F72WONN3.mjs} +13 -12
  92. package/dist/cli/update-6M3CAS4T.js +32 -0
  93. package/dist/cli/{update-HYOCBXJO.mjs → update-JZU33TC5.mjs} +8 -7
  94. package/dist/cli/{workflow-U6S4SWTF.js → workflow-BGKC73V2.js} +15 -15
  95. package/dist/cli/{workflow-RKX45RJ4.mjs → workflow-PQYQXQPH.mjs} +5 -5
  96. package/dist/{client-CPRaigLC.d.ts → client-D6XhrO0f.d.ts} +26 -1
  97. package/dist/{client-DstDI5TV.d.mts → client-mRA_esYI.d.mts} +26 -1
  98. package/dist/index.d.mts +2 -2
  99. package/dist/index.d.ts +2 -2
  100. package/dist/index.js +6 -6
  101. package/dist/index.mjs +3 -3
  102. package/dist/install-integrity.json +82 -80
  103. package/dist/plays/play-description.d.mts +1 -1
  104. package/dist/plays/play-description.d.ts +1 -1
  105. package/dist/plays/run-request.d.mts +1 -1
  106. package/dist/plays/run-request.d.ts +1 -1
  107. package/dist/release.d.mts +1 -1
  108. package/dist/release.d.ts +1 -1
  109. package/dist/release.js +2 -2
  110. package/dist/release.mjs +1 -1
  111. package/package.json +1 -1
  112. package/dist/cli/auth-WPQBEOES.js +0 -40
  113. package/dist/cli/git-DZ5GROPH.js +0 -24
  114. package/dist/cli/search-4ECC773X.js +0 -30
  115. package/dist/cli/skills-MIENPTOD.js +0 -29
  116. package/dist/cli/tools-CXJO5XSH.js +0 -44
  117. package/dist/cli/update-B2LQGEXF.js +0 -31
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  recentSearchRef,
7
7
  registerDeprecatedSearchCommand
8
- } from "./chunk-RFPP4Q66.mjs";
8
+ } from "./chunk-ZVBLECZX.mjs";
9
9
  import {
10
10
  arrayField,
11
11
  formatModelDescription,
@@ -48,7 +48,7 @@ import {
48
48
  import {
49
49
  DeeplineClient,
50
50
  validateExecutionIdempotencyKey
51
- } from "./chunk-LPPAJJJN.mjs";
51
+ } from "./chunk-XV4463XW.mjs";
52
52
  import {
53
53
  stableStringify
54
54
  } from "./chunk-UBKA33KY.mjs";
@@ -58,18 +58,18 @@ import {
58
58
  maybeAutoUpdateAndRelaunch,
59
59
  registerCompatibilityCatalog,
60
60
  runToolExecuteStage
61
- } from "./chunk-BQQLTSGC.mjs";
61
+ } from "./chunk-P4UQCYKH.mjs";
62
62
  import {
63
63
  isCliTraceEnabled,
64
64
  recordCliTrace,
65
65
  resolveCliMaintenancePolicy
66
- } from "./chunk-4C7HPD57.mjs";
66
+ } from "./chunk-SQUJHT7O.mjs";
67
67
  import {
68
68
  checkSdkCompatibility,
69
69
  enforceSdkCompatibilityResponse,
70
70
  flushDeferredSkillsSyncNotices,
71
71
  syncSdkSkillsIfNeeded
72
- } from "./chunk-33EM4SMH.mjs";
72
+ } from "./chunk-IWFI6FTJ.mjs";
73
73
  import {
74
74
  printCommandEnvelope,
75
75
  printCompactJson,
@@ -77,12 +77,12 @@ import {
77
77
  printJsonError,
78
78
  renderCommandEnvelopeText,
79
79
  shouldEmitJson
80
- } from "./chunk-XLOXUW5Y.mjs";
80
+ } from "./chunk-FS2RMEJ7.mjs";
81
81
  import {
82
82
  readSdkSkillsLocalVersion,
83
83
  resolveConfig,
84
84
  sdkCliStateDirPath
85
- } from "./chunk-PJYTV24I.mjs";
85
+ } from "./chunk-X2LUT22I.mjs";
86
86
  import {
87
87
  DeeplineError
88
88
  } from "./chunk-HBL4PM5Q.mjs";
@@ -971,7 +971,7 @@ Examples:
971
971
  process.exitCode = await narrowView();
972
972
  return;
973
973
  }
974
- const { describeAnything } = await import("./describe-RRQUUJQ3.mjs");
974
+ const { describeAnything } = await import("./describe-LGDK77QI.mjs");
975
975
  process.exitCode = await describeAnything(
976
976
  toolId,
977
977
  {
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-XLOXUW5Y.mjs";
5
+ } from "./chunk-FS2RMEJ7.mjs";
6
6
  import {
7
7
  ACTIVE_ORG_ID_ENV,
8
8
  ACTIVE_ORG_NAME_ENV,
@@ -25,7 +25,7 @@ import {
25
25
  saveHostEnvValues,
26
26
  saveProjectDeeplineEnvValues,
27
27
  storedHostApiKey
28
- } from "./chunk-PJYTV24I.mjs";
28
+ } from "./chunk-X2LUT22I.mjs";
29
29
 
30
30
  // src/cli/commands/auth.ts
31
31
  import {
@@ -0,0 +1,155 @@
1
+ import {
2
+ isJsonOutputMode
3
+ } from "./chunk-FS2RMEJ7.mjs";
4
+
5
+ // src/cli/progress.ts
6
+ import { Worker } from "worker_threads";
7
+ var CliProgress = class {
8
+ lastMessage = null;
9
+ interactive = Boolean(process.stderr.isTTY);
10
+ grey = "\x1B[90m";
11
+ cyan = "\x1B[36m";
12
+ dim = "\x1B[2m";
13
+ reset = "\x1B[0m";
14
+ worker = null;
15
+ enabled;
16
+ // --json output is one JSON document: progress never renders under it.
17
+ constructor(enabled) {
18
+ this.enabled = enabled && !isJsonOutputMode();
19
+ }
20
+ phase(message) {
21
+ if (!this.enabled || this.lastMessage === message) {
22
+ return;
23
+ }
24
+ if (this.interactive && this.lastMessage) {
25
+ this.settle("\u2713");
26
+ }
27
+ this.lastMessage = message;
28
+ if (!this.interactive) {
29
+ process.stderr.write(`${message}
30
+ `);
31
+ return;
32
+ }
33
+ this.ensureWorker();
34
+ this.worker?.postMessage({ type: "phase", message });
35
+ }
36
+ complete() {
37
+ this.settle("\u2713");
38
+ }
39
+ fail() {
40
+ this.settle("\u2717");
41
+ }
42
+ writeLogLine(line) {
43
+ if (isJsonOutputMode()) return;
44
+ if (!this.enabled) {
45
+ process.stderr.write(`${line}
46
+ `);
47
+ return;
48
+ }
49
+ const message = this.interactive ? `${this.cyan}[logs]${this.reset} ${this.dim}${line}${this.reset}` : `[logs] ${line}`;
50
+ if (!this.interactive) {
51
+ process.stderr.write(`${message}
52
+ `);
53
+ return;
54
+ }
55
+ const activeMessage = this.lastMessage;
56
+ this.worker?.terminate().catch(() => void 0);
57
+ this.worker = null;
58
+ process.stderr.write(`\r\x1B[2K${message}
59
+ `);
60
+ if (activeMessage) {
61
+ this.startWorker().postMessage({ type: "phase", message: activeMessage });
62
+ }
63
+ }
64
+ writeLine(line, stream = process.stderr) {
65
+ if (!this.enabled || !this.interactive) {
66
+ stream.write(`${line}
67
+ `);
68
+ return;
69
+ }
70
+ const activeMessage = this.lastMessage;
71
+ this.worker?.terminate().catch(() => void 0);
72
+ this.worker = null;
73
+ stream.write(`\r\x1B[2K${line}
74
+ `);
75
+ if (activeMessage) {
76
+ this.startWorker().postMessage({ type: "phase", message: activeMessage });
77
+ }
78
+ }
79
+ settle(mark) {
80
+ if (!this.enabled || !this.lastMessage) {
81
+ return;
82
+ }
83
+ if (this.interactive) {
84
+ this.worker?.terminate().catch(() => void 0);
85
+ this.worker = null;
86
+ process.stderr.write(
87
+ `\r\x1B[2K${this.grey}${mark} ${this.lastMessage}${this.reset}
88
+ `
89
+ );
90
+ }
91
+ this.lastMessage = null;
92
+ }
93
+ ensureWorker() {
94
+ this.startWorker();
95
+ }
96
+ startWorker() {
97
+ if (this.worker) {
98
+ return this.worker;
99
+ }
100
+ this.worker = new Worker(
101
+ `
102
+ const { parentPort } = require('node:worker_threads');
103
+ const { writeSync } = require('node:fs');
104
+ const frames = ['\u2014', '\\\\', '|', '/'];
105
+ const grey = '\\x1b[90m';
106
+ const reset = '\\x1b[0m';
107
+ let message = '';
108
+ let frameIndex = 0;
109
+ let timer = null;
110
+ function render() {
111
+ if (!message) return;
112
+ const frame = frames[frameIndex % frames.length] || '\u2014';
113
+ frameIndex += 1;
114
+ writeSync(2, '\\r\\x1b[2K' + grey + frame + ' ' + message + reset);
115
+ }
116
+ parentPort.on('message', (event) => {
117
+ if (event.type === 'phase') {
118
+ message = String(event.message || '');
119
+ frameIndex = 0;
120
+ render();
121
+ if (!timer) {
122
+ timer = setInterval(render, 120);
123
+ timer.unref && timer.unref();
124
+ }
125
+ }
126
+ if (event.type === 'stop') {
127
+ if (timer) clearInterval(timer);
128
+ timer = null;
129
+ writeSync(2, '\\r\\x1b[2K');
130
+ }
131
+ });
132
+ `,
133
+ { eval: true }
134
+ );
135
+ this.worker.unref();
136
+ return this.worker;
137
+ }
138
+ };
139
+ var activeProgress = null;
140
+ function setActiveCliProgress(progress) {
141
+ activeProgress = progress;
142
+ }
143
+ function getActiveCliProgress() {
144
+ return activeProgress;
145
+ }
146
+ function createCliProgress(enabled) {
147
+ const progress = new CliProgress(enabled);
148
+ setActiveCliProgress(progress);
149
+ return progress;
150
+ }
151
+
152
+ export {
153
+ getActiveCliProgress,
154
+ createCliProgress
155
+ };
@@ -28,7 +28,7 @@ var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
28
28
 
29
29
 
30
30
 
31
- var _chunkWDOWAOYBjs = require('./chunk-WDOWAOYB.js');
31
+ var _chunkRTR2KUU6js = require('./chunk-RTR2KUU6.js');
32
32
 
33
33
 
34
34
  var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
@@ -647,7 +647,7 @@ var ToolCalls = class {
647
647
  idempotencyKey,
648
648
  onResponse: (response2) => {
649
649
  lastResponse = null;
650
- atomicToolsSupported = response2.headers.get(_chunkWDOWAOYBjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
650
+ atomicToolsSupported = response2.headers.get(_chunkRTR2KUU6js.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 {
@@ -997,8 +997,8 @@ 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
- [_chunkWDOWAOYBjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1001
- ...receivers ? { [_chunkWDOWAOYBjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1000
+ [_chunkRTR2KUU6js.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1001
+ ...receivers ? { [_chunkRTR2KUU6js.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1002
1002
  };
1003
1003
  }
1004
1004
  function normalizeTestPolicyOverrides(value, source) {
@@ -1069,7 +1069,7 @@ var PlayClient = class {
1069
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(_chunkWDOWAOYBjs.SDK_API_MAJOR) } : headers,
1072
+ _optionalChain([options, 'optionalAccess', _61 => _61.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkRTR2KUU6js.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 = _chunkWDOWAOYBjs.resolveConfig.call(void 0, options);
1138
+ const config = _chunkRTR2KUU6js.resolveConfig.call(void 0, options);
1139
1139
  return new PlayClient(
1140
- new (0, _chunkWDOWAOYBjs.HttpClient)(config),
1140
+ new (0, _chunkRTR2KUU6js.HttpClient)(config),
1141
1141
  _nullishCoalesce(config.environment, () => ( process.env))
1142
1142
  );
1143
1143
  }
@@ -3151,7 +3151,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
3151
3151
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
3152
3152
  );
3153
3153
  }
3154
- return { [_chunkWDOWAOYBjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3154
+ return { [_chunkRTR2KUU6js.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3155
3155
  }
3156
3156
  function sleep(ms) {
3157
3157
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -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 = _chunkWDOWAOYBjs.resolveConfig.call(void 0, options);
3392
+ this.config = _chunkRTR2KUU6js.resolveConfig.call(void 0, options);
3393
3393
  this.environment = _nullishCoalesce(this.config.environment, () => ( process.env));
3394
- this.http = new (0, _chunkWDOWAOYBjs.HttpClient)(this.config);
3394
+ this.http = new (0, _chunkRTR2KUU6js.HttpClient)(this.config);
3395
3395
  this.playClient = new PlayClient(this.http, this.environment);
3396
3396
  this.toolCalls = new ToolCalls(
3397
3397
  this.http,
@@ -3477,6 +3477,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3477
3477
  status: () => this.getMonitorsAccess(),
3478
3478
  available: (toolIdOrOptions, options2) => this.getMonitorsAvailable(toolIdOrOptions, options2),
3479
3479
  check: (definition) => this.checkMonitor(definition),
3480
+ preview: (definition, options2) => this.previewMonitor(definition, options2),
3480
3481
  deploy: (definition, options2) => this.deployMonitor(definition, options2),
3481
3482
  sync: (definition, options2) => _optionalChain([options2, 'optionalAccess', _152 => _152.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options2),
3482
3483
  list: (options2) => this.listMonitors(options2),
@@ -6272,13 +6273,46 @@ var DeeplineClient = (_class = class _DeeplineClient {
6272
6273
  body: definition
6273
6274
  });
6274
6275
  }
6276
+ /**
6277
+ * Run one paid preview. Prefer `client.monitors.preview(...)`.
6278
+ *
6279
+ * The key is fixed before the request is sent and returned on the result
6280
+ * and on any error (`error.idempotencyKey`), so a caller that loses the
6281
+ * response can repeat the call with it and get the original result without
6282
+ * a second charge. The submission is never replayed automatically.
6283
+ */
6284
+ async previewMonitor(definition, options) {
6285
+ const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _330 => _330.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _331 => _331.crypto, 'optionalAccess', _332 => _332.randomUUID, 'optionalCall', _333 => _333()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
6286
+ try {
6287
+ const result = await this.http.request(
6288
+ "/api/v2/monitors/preview",
6289
+ {
6290
+ method: "POST",
6291
+ body: {
6292
+ ...definition,
6293
+ ..._optionalChain([options, 'optionalAccess', _334 => _334.limit]) === void 0 ? {} : { limit: options.limit }
6294
+ },
6295
+ headers: { "Idempotency-Key": idempotencyKey },
6296
+ maxRetries: 0,
6297
+ exactUrlOnly: true,
6298
+ preserveRateLimitResponse: true
6299
+ }
6300
+ );
6301
+ return { ...result, idempotency_key: idempotencyKey };
6302
+ } catch (error) {
6303
+ if (error && typeof error === "object") {
6304
+ Object.assign(error, { idempotencyKey });
6305
+ }
6306
+ throw error;
6307
+ }
6308
+ }
6275
6309
  /**
6276
6310
  * Deploy a monitor from a definition. `dryRun` validates via the check
6277
6311
  * endpoint and returns the plan without deploying. Prefer
6278
6312
  * `client.monitors.deploy(...)`.
6279
6313
  */
6280
6314
  async deployMonitor(definition, options) {
6281
- if (_optionalChain([options, 'optionalAccess', _330 => _330.dryRun])) {
6315
+ if (_optionalChain([options, 'optionalAccess', _335 => _335.dryRun])) {
6282
6316
  return this.http.request("/api/v2/monitors/check", {
6283
6317
  method: "POST",
6284
6318
  body: definition
@@ -6314,12 +6348,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6314
6348
  /** List deployed monitors. Prefer `client.monitors.list(...)`. */
6315
6349
  async listMonitors(options) {
6316
6350
  const params = new URLSearchParams();
6317
- if (_optionalChain([options, 'optionalAccess', _331 => _331.state])) params.set("state", options.state);
6318
- else if (_optionalChain([options, 'optionalAccess', _332 => _332.status])) params.set("status", options.status);
6319
- if (_optionalChain([options, 'optionalAccess', _333 => _333.limit]) !== void 0)
6351
+ if (_optionalChain([options, 'optionalAccess', _336 => _336.state])) params.set("state", options.state);
6352
+ else if (_optionalChain([options, 'optionalAccess', _337 => _337.status])) params.set("status", options.status);
6353
+ if (_optionalChain([options, 'optionalAccess', _338 => _338.limit]) !== void 0)
6320
6354
  params.set("limit", String(options.limit));
6321
- if (_optionalChain([options, 'optionalAccess', _334 => _334.cursor])) params.set("cursor", options.cursor);
6322
- if (_optionalChain([options, 'optionalAccess', _335 => _335.includeConsumers])) params.set("include_consumers", "true");
6355
+ if (_optionalChain([options, 'optionalAccess', _339 => _339.cursor])) params.set("cursor", options.cursor);
6356
+ if (_optionalChain([options, 'optionalAccess', _340 => _340.includeConsumers])) params.set("include_consumers", "true");
6323
6357
  const query = params.toString();
6324
6358
  const suffix = query ? `?${query}` : "";
6325
6359
  return this.http.request(
@@ -6335,7 +6369,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6335
6369
  );
6336
6370
  }
6337
6371
  async testMonitorWebhook(key, payload, options) {
6338
- if (_optionalChain([options, 'optionalAccess', _336 => _336.dispatch]) === true || _optionalChain([options, 'optionalAccess', _337 => _337.validationOnly]) === false) {
6372
+ if (_optionalChain([options, 'optionalAccess', _341 => _341.dispatch]) === true || _optionalChain([options, 'optionalAccess', _342 => _342.validationOnly]) === false) {
6339
6373
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6340
6374
  "Monitor tests are validation-only and cannot dispatch events.",
6341
6375
  void 0,
@@ -6390,7 +6424,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6390
6424
  }
6391
6425
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6392
6426
  async deleteMonitor(key, options) {
6393
- if (_optionalChain([options, 'optionalAccess', _338 => _338.localOnly]) === true) {
6427
+ if (_optionalChain([options, 'optionalAccess', _343 => _343.localOnly]) === true) {
6394
6428
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6395
6429
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6396
6430
  void 0,
@@ -6398,11 +6432,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6398
6432
  );
6399
6433
  }
6400
6434
  const params = new URLSearchParams();
6401
- if (_optionalChain([options, 'optionalAccess', _339 => _339.dryRun])) params.set("dry_run", "true");
6435
+ if (_optionalChain([options, 'optionalAccess', _344 => _344.dryRun])) params.set("dry_run", "true");
6402
6436
  const query = params.toString();
6403
6437
  return this.http.request(
6404
6438
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
6405
- _optionalChain([options, 'optionalAccess', _340 => _340.dryRun]) ? { method: "DELETE" } : {
6439
+ _optionalChain([options, 'optionalAccess', _345 => _345.dryRun]) ? { method: "DELETE" } : {
6406
6440
  method: "DELETE",
6407
6441
  // Deletion is a provider lifecycle operation. A timeout is an
6408
6442
  // unknown outcome, not authority to begin another delete attempt.
@@ -6415,10 +6449,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6415
6449
  * Prefer `client.monitors.reactivate(...)`.
6416
6450
  */
6417
6451
  async reactivateMonitor(key, options) {
6418
- const query = _optionalChain([options, 'optionalAccess', _341 => _341.dryRun]) ? "?dry_run=true" : "";
6452
+ const query = _optionalChain([options, 'optionalAccess', _346 => _346.dryRun]) ? "?dry_run=true" : "";
6419
6453
  return this.http.request(
6420
6454
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
6421
- _optionalChain([options, 'optionalAccess', _342 => _342.dryRun]) ? { method: "POST", body: {} } : {
6455
+ _optionalChain([options, 'optionalAccess', _347 => _347.dryRun]) ? { method: "POST", body: {} } : {
6422
6456
  method: "POST",
6423
6457
  body: {},
6424
6458
  // Reactivation can create an upstream resource, so it must not use
@@ -6432,7 +6466,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6432
6466
  // ——————————————————————————————————————————————————————————
6433
6467
  static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
6434
6468
  monitorJobIdempotencyKey(operation) {
6435
- const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _343 => _343.crypto, 'optionalAccess', _344 => _344.randomUUID, 'optionalCall', _345 => _345()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6469
+ const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _348 => _348.crypto, 'optionalAccess', _349 => _349.randomUUID, 'optionalCall', _350 => _350()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6436
6470
  const prefix = "monitor-job-";
6437
6471
  const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
6438
6472
  const maxOperationLength = Math.max(
@@ -6443,7 +6477,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6443
6477
  }
6444
6478
  monitorJobHeaders(operation, idempotencyKey) {
6445
6479
  return {
6446
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _346 => _346.trim, 'call', _347 => _347()]) || this.monitorJobIdempotencyKey(operation)
6480
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _351 => _351.trim, 'call', _352 => _352()]) || this.monitorJobIdempotencyKey(operation)
6447
6481
  };
6448
6482
  }
6449
6483
  async deployMonitorBatch(definitions, options) {
@@ -6454,7 +6488,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6454
6488
  body: { version: 1, kind: "batch", monitors: definitions },
6455
6489
  headers: this.monitorJobHeaders(
6456
6490
  "batch-deploy",
6457
- _optionalChain([options, 'optionalAccess', _348 => _348.idempotencyKey])
6491
+ _optionalChain([options, 'optionalAccess', _353 => _353.idempotencyKey])
6458
6492
  ),
6459
6493
  maxRetries: 0,
6460
6494
  exactUrlOnly: true
@@ -6473,11 +6507,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6473
6507
  version: 1,
6474
6508
  kind: "batch",
6475
6509
  monitors: definitions,
6476
- ..._optionalChain([options, 'optionalAccess', _349 => _349.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6510
+ ..._optionalChain([options, 'optionalAccess', _354 => _354.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6477
6511
  },
6478
6512
  headers: this.monitorJobHeaders(
6479
6513
  `batch-sync-${batchId}`,
6480
- _optionalChain([options, 'optionalAccess', _350 => _350.idempotencyKey])
6514
+ _optionalChain([options, 'optionalAccess', _355 => _355.idempotencyKey])
6481
6515
  ),
6482
6516
  maxRetries: 0,
6483
6517
  exactUrlOnly: true
@@ -6492,7 +6526,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6492
6526
  body: {},
6493
6527
  headers: this.monitorJobHeaders(
6494
6528
  `batch-start-${batchId}`,
6495
- _optionalChain([options, 'optionalAccess', _351 => _351.idempotencyKey])
6529
+ _optionalChain([options, 'optionalAccess', _356 => _356.idempotencyKey])
6496
6530
  ),
6497
6531
  maxRetries: 0,
6498
6532
  exactUrlOnly: true
@@ -6507,7 +6541,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6507
6541
  body: {},
6508
6542
  headers: this.monitorJobHeaders(
6509
6543
  `batch-stop-${batchId}`,
6510
- _optionalChain([options, 'optionalAccess', _352 => _352.idempotencyKey])
6544
+ _optionalChain([options, 'optionalAccess', _357 => _357.idempotencyKey])
6511
6545
  ),
6512
6546
  maxRetries: 0,
6513
6547
  exactUrlOnly: true
@@ -6528,7 +6562,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6528
6562
  body: {},
6529
6563
  headers: this.monitorJobHeaders(
6530
6564
  `${action}-${monitorKey}`,
6531
- _optionalChain([options, 'optionalAccess', _353 => _353.idempotencyKey])
6565
+ _optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
6532
6566
  ),
6533
6567
  maxRetries: 0,
6534
6568
  exactUrlOnly: true
@@ -6541,7 +6575,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6541
6575
  body: definition,
6542
6576
  headers: this.monitorJobHeaders(
6543
6577
  `sync-${definition.key}`,
6544
- _optionalChain([options, 'optionalAccess', _354 => _354.idempotencyKey])
6578
+ _optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey])
6545
6579
  ),
6546
6580
  maxRetries: 0,
6547
6581
  exactUrlOnly: true
@@ -6554,7 +6588,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6554
6588
  );
6555
6589
  }
6556
6590
  async getMonitorJobLogs(jobId, options) {
6557
- const query = _optionalChain([options, 'optionalAccess', _355 => _355.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6591
+ const query = _optionalChain([options, 'optionalAccess', _360 => _360.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6558
6592
  return this.http.request(
6559
6593
  `/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
6560
6594
  { method: "GET" }
@@ -6567,15 +6601,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6567
6601
  );
6568
6602
  }
6569
6603
  async waitForMonitorJob(jobId, options) {
6570
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _356 => _356.timeoutMs]), () => ( 10 * 6e4)));
6571
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _357 => _357.pollIntervalMs]), () => ( 2e3)));
6604
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _361 => _361.timeoutMs]), () => ( 10 * 6e4)));
6605
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _362 => _362.pollIntervalMs]), () => ( 2e3)));
6572
6606
  const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
6573
6607
  const startedAt = Date.now();
6574
6608
  let latest = await this.getMonitorJob(jobId);
6575
6609
  while (true) {
6576
- _optionalChain([options, 'optionalAccess', _358 => _358.onProgress, 'optionalCall', _359 => _359(latest)]);
6610
+ _optionalChain([options, 'optionalAccess', _363 => _363.onProgress, 'optionalCall', _364 => _364(latest)]);
6577
6611
  const job = latest.job;
6578
- const state = typeof _optionalChain([job, 'optionalAccess', _360 => _360.state]) === "string" ? job.state : void 0;
6612
+ const state = typeof _optionalChain([job, 'optionalAccess', _365 => _365.state]) === "string" ? job.state : void 0;
6579
6613
  if (state && terminal.has(state)) return latest;
6580
6614
  if (Date.now() - startedAt >= timeoutMs) return latest;
6581
6615
  await sleep(pollIntervalMs);
@@ -6586,12 +6620,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6586
6620
  // Monitor Fleets
6587
6621
  // ——————————————————————————————————————————————————————————
6588
6622
  monitorFleetIdempotencyKey(operation) {
6589
- const uuid = _optionalChain([globalThis, 'access', _361 => _361.crypto, 'optionalAccess', _362 => _362.randomUUID, 'optionalCall', _363 => _363()]);
6623
+ const uuid = _optionalChain([globalThis, 'access', _366 => _366.crypto, 'optionalAccess', _367 => _367.randomUUID, 'optionalCall', _368 => _368()]);
6590
6624
  return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
6591
6625
  }
6592
6626
  monitorFleetHeaders(operation, idempotencyKey) {
6593
6627
  return {
6594
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _364 => _364.trim, 'call', _365 => _365()]) || this.monitorFleetIdempotencyKey(operation)
6628
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _369 => _369.trim, 'call', _370 => _370()]) || this.monitorFleetIdempotencyKey(operation)
6595
6629
  };
6596
6630
  }
6597
6631
  monitorFleetPath(fleetId) {
@@ -6611,15 +6645,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6611
6645
  const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
6612
6646
  const body = {
6613
6647
  ...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
6614
- ..._optionalChain([options, 'optionalAccess', _366 => _366.dryRun]) ? { dry_run: true } : {},
6615
- ..._optionalChain([options, 'optionalAccess', _367 => _367.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6648
+ ..._optionalChain([options, 'optionalAccess', _371 => _371.dryRun]) ? { dry_run: true } : {},
6649
+ ..._optionalChain([options, 'optionalAccess', _372 => _372.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6616
6650
  };
6617
6651
  return this.http.request(
6618
6652
  this.monitorFleetPath(fleetId),
6619
6653
  {
6620
6654
  method: "PUT",
6621
6655
  body,
6622
- headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _368 => _368.idempotencyKey])),
6656
+ headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _373 => _373.idempotencyKey])),
6623
6657
  maxRetries: 0,
6624
6658
  exactUrlOnly: true
6625
6659
  }
@@ -6632,8 +6666,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6632
6666
  }
6633
6667
  async getMonitorFleet(fleetId, options) {
6634
6668
  const params = new URLSearchParams();
6635
- if (_optionalChain([options, 'optionalAccess', _369 => _369.drift])) params.set("drift", "1");
6636
- if (_optionalChain([options, 'optionalAccess', _370 => _370.limit]) !== void 0)
6669
+ if (_optionalChain([options, 'optionalAccess', _374 => _374.drift])) params.set("drift", "1");
6670
+ if (_optionalChain([options, 'optionalAccess', _375 => _375.limit]) !== void 0)
6637
6671
  params.set("limit", String(options.limit));
6638
6672
  const query = params.toString();
6639
6673
  return this.http.request(
@@ -6646,10 +6680,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6646
6680
  this.monitorFleetPath(fleetId),
6647
6681
  {
6648
6682
  method: "DELETE",
6649
- body: _optionalChain([options, 'optionalAccess', _371 => _371.dryRun]) ? { dry_run: true } : {},
6683
+ body: _optionalChain([options, 'optionalAccess', _376 => _376.dryRun]) ? { dry_run: true } : {},
6650
6684
  headers: this.monitorFleetHeaders(
6651
6685
  "deactivate",
6652
- _optionalChain([options, 'optionalAccess', _372 => _372.idempotencyKey])
6686
+ _optionalChain([options, 'optionalAccess', _377 => _377.idempotencyKey])
6653
6687
  ),
6654
6688
  maxRetries: 0,
6655
6689
  exactUrlOnly: true
@@ -6664,7 +6698,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6664
6698
  body: {},
6665
6699
  headers: this.monitorFleetHeaders(
6666
6700
  "reactivate",
6667
- _optionalChain([options, 'optionalAccess', _373 => _373.idempotencyKey])
6701
+ _optionalChain([options, 'optionalAccess', _378 => _378.idempotencyKey])
6668
6702
  ),
6669
6703
  maxRetries: 0,
6670
6704
  exactUrlOnly: true
@@ -6681,13 +6715,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
6681
6715
  * identical to "the request failed".
6682
6716
  */
6683
6717
  async waitForMonitorFleetConvergence(fleetId, options) {
6684
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _374 => _374.timeoutMs]), () => ( 10 * 6e4)));
6685
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _375 => _375.pollIntervalMs]), () => ( 2e3)));
6686
- const terminal = _optionalChain([options, 'optionalAccess', _376 => _376.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
6718
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _379 => _379.timeoutMs]), () => ( 10 * 6e4)));
6719
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _380 => _380.pollIntervalMs]), () => ( 2e3)));
6720
+ const terminal = _optionalChain([options, 'optionalAccess', _381 => _381.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
6687
6721
  const startedAt = Date.now();
6688
6722
  let latest = await this.getMonitorFleet(fleetId);
6689
6723
  while (true) {
6690
- _optionalChain([options, 'optionalAccess', _377 => _377.onProgress, 'optionalCall', _378 => _378(latest)]);
6724
+ _optionalChain([options, 'optionalAccess', _382 => _382.onProgress, 'optionalCall', _383 => _383(latest)]);
6691
6725
  const status = typeof latest.status === "string" ? latest.status : void 0;
6692
6726
  if (status && terminal.has(status)) return latest;
6693
6727
  if (Date.now() - startedAt >= timeoutMs) return latest;
@@ -3,7 +3,7 @@ import {
3
3
  detectAgentRuntime,
4
4
  resolveCliCommandContext,
5
5
  resolveConfig
6
- } from "./chunk-PJYTV24I.mjs";
6
+ } from "./chunk-X2LUT22I.mjs";
7
7
  import {
8
8
  DeeplineError,
9
9
  serializeToolExecutionFailure
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkC4NPWUZYjs = require('./chunk-C4NPWUZY.js');
3
+ var _chunkVG6WESY7js = require('./chunk-VG6WESY7.js');
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  var _child_process = require('child_process');
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
13
13
  }
14
14
  function readNpmVersion(env) {
15
15
  try {
16
- const plan = _chunkC4NPWUZYjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
16
+ const plan = _chunkVG6WESY7js.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
17
17
  const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
18
18
  encoding: "utf8",
19
19
  env,