@sideboard-ai/core 0.1.308 → 0.1.310

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.
@@ -638,6 +638,33 @@ var CURSOR_STREAM_CUTOFF = /nghttp2|premature close|\[unavailable\]\s+error\b|ht
638
638
  function looksLikeCursorStreamCutOff(text) {
639
639
  return CURSOR_STREAM_CUTOFF.test(text.trim());
640
640
  }
641
+ function cursorModelDisplayName(model) {
642
+ const raw = (model ?? "").trim();
643
+ if (!raw || /^(auto|default)$/i.test(raw)) return "";
644
+ if (/^grok-/i.test(raw)) return raw.replace(/^grok-/i, "Grok ");
645
+ return raw;
646
+ }
647
+ function formatCursorStreamIdleAfterToolsError(model) {
648
+ const label = cursorModelDisplayName(model);
649
+ return label ? `Cursor stopped responding after a tool call (${label})` : "Cursor stopped responding after a tool call";
650
+ }
651
+ function createCursorStreamToolProgress() {
652
+ return { completedTool: false, assistantAfterTool: false };
653
+ }
654
+ function noteCursorAgentEvent(state, event) {
655
+ if (event.type === "tool_result" && event.partial !== true) {
656
+ state.completedTool = true;
657
+ state.assistantAfterTool = false;
658
+ return;
659
+ }
660
+ if (event.type === "stdout" && !event.parentId) {
661
+ const text = typeof event.data === "string" ? event.data.trim() : "";
662
+ if (state.completedTool && text) state.assistantAfterTool = true;
663
+ }
664
+ }
665
+ function isCursorIdleAfterCompletedTool(state) {
666
+ return state.completedTool && !state.assistantAfterTool;
667
+ }
641
668
 
642
669
  // src/agents/error-detail.ts
643
670
  function formatUnknownDetail(err) {
@@ -2081,25 +2108,29 @@ async function main() {
2081
2108
  } catch {
2082
2109
  }
2083
2110
  let lastUsageRunId;
2111
+ const toolProgress = createCursorStreamToolProgress();
2084
2112
  const run2 = await sendPrompt(agent, prompt, {
2085
2113
  onDelta: ({ update }) => {
2086
2114
  bump();
2087
2115
  for (const event of cursorDeltaToEvents(update)) {
2116
+ noteCursorAgentEvent(toolProgress, event);
2088
2117
  stream.push(event);
2089
2118
  }
2090
2119
  }
2091
2120
  });
2092
2121
  liveRun = run2;
2093
2122
  let streamIdle = false;
2123
+ let streamIdleAfterTools = false;
2094
2124
  try {
2095
2125
  for await (const msg of iterateUntilIdle(
2096
2126
  run2.stream(),
2097
2127
  CURSOR_STREAM_IDLE_MS,
2098
2128
  () => {
2099
2129
  streamIdle = true;
2130
+ streamIdleAfterTools = isCursorIdleAfterCompletedTool(toolProgress);
2100
2131
  emit({
2101
2132
  type: "stderr",
2102
- data: "Cursor stream idle \u2014 finishing the turn (SDK stream did not close)"
2133
+ data: streamIdleAfterTools ? `Cursor run failed: ${formatCursorStreamIdleAfterToolsError(req.model)}` : "Cursor stream idle \u2014 finishing the turn (SDK stream did not close)"
2103
2134
  });
2104
2135
  void cancelLiveRun();
2105
2136
  },
@@ -2111,6 +2142,7 @@ async function main() {
2111
2142
  lastUsageRunId = sdkMsg.run_id.trim();
2112
2143
  }
2113
2144
  for (const event of cursorSdkMessageToEvents(msg)) {
2145
+ noteCursorAgentEvent(toolProgress, event);
2114
2146
  stream.push(event);
2115
2147
  }
2116
2148
  }
@@ -2121,6 +2153,9 @@ async function main() {
2121
2153
  setTimeout(() => resolve2({ status: "cancelled" }), 5e3);
2122
2154
  })
2123
2155
  ]) : await run2.wait();
2156
+ if (streamIdleAfterTools) {
2157
+ return 2;
2158
+ }
2124
2159
  if (result.status === "error") {
2125
2160
  const detail = formatUnknownDetail(result.error);
2126
2161
  if (isAgentBusyError(detail)) {
@@ -5,7 +5,7 @@ import {
5
5
  guardCursorCustomTool,
6
6
  shouldReturnRunErrorToAgent,
7
7
  sideboardCursorRpcTools
8
- } from "../chunk-YJBUYGPN.js";
8
+ } from "../chunk-NCHOTN3C.js";
9
9
  import {
10
10
  createAgentStreamCoalescer
11
11
  } from "../chunk-AXQ4ZWHK.js";
@@ -20,12 +20,16 @@ import {
20
20
  fetchCursorTurnCostUsd,
21
21
  importCursorSdk,
22
22
  resolveCursorSdkRoot
23
- } from "../chunk-MMVMQ34G.js";
23
+ } from "../chunk-Y3Y7SZBZ.js";
24
24
  import {
25
25
  TOOL_RESULT_STORE_MAX_CHARS,
26
+ createCursorStreamToolProgress,
27
+ formatCursorStreamIdleAfterToolsError,
26
28
  formatUnknownDetail,
27
- looksLikeCursorStreamCutOff
28
- } from "../chunk-HO5R3ZRH.js";
29
+ isCursorIdleAfterCompletedTool,
30
+ looksLikeCursorStreamCutOff,
31
+ noteCursorAgentEvent
32
+ } from "../chunk-5XNT6BCG.js";
29
33
  import "../chunk-6K64FJDD.js";
30
34
  import {
31
35
  cursorSdkStoreDir
@@ -829,25 +833,29 @@ async function main() {
829
833
  } catch {
830
834
  }
831
835
  let lastUsageRunId;
836
+ const toolProgress = createCursorStreamToolProgress();
832
837
  const run = await sendPrompt(agent, prompt, {
833
838
  onDelta: ({ update }) => {
834
839
  bump();
835
840
  for (const event of cursorDeltaToEvents(update)) {
841
+ noteCursorAgentEvent(toolProgress, event);
836
842
  stream.push(event);
837
843
  }
838
844
  }
839
845
  });
840
846
  liveRun = run;
841
847
  let streamIdle = false;
848
+ let streamIdleAfterTools = false;
842
849
  try {
843
850
  for await (const msg of iterateUntilIdle(
844
851
  run.stream(),
845
852
  CURSOR_STREAM_IDLE_MS,
846
853
  () => {
847
854
  streamIdle = true;
855
+ streamIdleAfterTools = isCursorIdleAfterCompletedTool(toolProgress);
848
856
  emit({
849
857
  type: "stderr",
850
- data: "Cursor stream idle \u2014 finishing the turn (SDK stream did not close)"
858
+ data: streamIdleAfterTools ? `Cursor run failed: ${formatCursorStreamIdleAfterToolsError(req.model)}` : "Cursor stream idle \u2014 finishing the turn (SDK stream did not close)"
851
859
  });
852
860
  void cancelLiveRun();
853
861
  },
@@ -859,6 +867,7 @@ async function main() {
859
867
  lastUsageRunId = sdkMsg.run_id.trim();
860
868
  }
861
869
  for (const event of cursorSdkMessageToEvents(msg)) {
870
+ noteCursorAgentEvent(toolProgress, event);
862
871
  stream.push(event);
863
872
  }
864
873
  }
@@ -869,6 +878,9 @@ async function main() {
869
878
  setTimeout(() => resolve2({ status: "cancelled" }), 5e3);
870
879
  })
871
880
  ]) : await run.wait();
881
+ if (streamIdleAfterTools) {
882
+ return 2;
883
+ }
872
884
  if (result.status === "error") {
873
885
  const detail = formatUnknownDetail(result.error);
874
886
  if (isAgentBusyError(detail)) {
@@ -46,7 +46,7 @@ import {
46
46
  resolveCursorSdkRoot,
47
47
  resolveQuotaFallbackAgent,
48
48
  turnCostUsdFromCursorUsage
49
- } from "./chunk-EZYZGDWU.js";
49
+ } from "./chunk-GQJOLTZU.js";
50
50
  import {
51
51
  getAgentSetupInfo,
52
52
  installAgent,
@@ -62,7 +62,7 @@ import {
62
62
  import "./chunk-42JGPPVS.js";
63
63
  import "./chunk-PXMLMBMI.js";
64
64
  import "./chunk-2GPQZZLY.js";
65
- import "./chunk-5XQ43YZU.js";
65
+ import "./chunk-I5TESHDN.js";
66
66
  import "./chunk-X3FSWWW2.js";
67
67
  import "./chunk-DLGGLV2M.js";
68
68
  import "./chunk-N2WW62LF.js";
@@ -37,9 +37,9 @@ import {
37
37
  planModeTurnInstruction,
38
38
  resolveCursorModelId,
39
39
  resolveQuotaFallbackAgent
40
- } from "./chunk-G2L3CR3A.js";
40
+ } from "./chunk-4YBQBVYL.js";
41
41
  import "./chunk-VEVFHO6K.js";
42
- import "./chunk-F36QRDM4.js";
42
+ import "./chunk-7Q327QF2.js";
43
43
  import {
44
44
  getAgentSetupInfo,
45
45
  installAgent,
@@ -67,8 +67,8 @@ import {
67
67
  preferredCursorCostCents,
68
68
  resolveCursorSdkRoot,
69
69
  turnCostUsdFromCursorUsage
70
- } from "./chunk-MMVMQ34G.js";
71
- import "./chunk-HO5R3ZRH.js";
70
+ } from "./chunk-Y3Y7SZBZ.js";
71
+ import "./chunk-5XNT6BCG.js";
72
72
  import "./chunk-6K64FJDD.js";
73
73
  import "./chunk-LG6RJBIY.js";
74
74
  import {
@@ -9,7 +9,7 @@ import {
9
9
  looksLikeSkillBody,
10
10
  skillCommandFromBody,
11
11
  withEventParentId
12
- } from "./chunk-F36QRDM4.js";
12
+ } from "./chunk-7Q327QF2.js";
13
13
  import {
14
14
  isOrchestratorThread
15
15
  } from "./chunk-5QX2NYXL.js";
@@ -45,13 +45,13 @@ import {
45
45
  packagedMcpStdioPath,
46
46
  parseCursorRunnerLine,
47
47
  resolveNodeLaunch
48
- } from "./chunk-MMVMQ34G.js";
48
+ } from "./chunk-Y3Y7SZBZ.js";
49
49
  import {
50
50
  extractJsonErrorMessage,
51
51
  formatUnknownDetail,
52
52
  looksLikeAgentFailureMessage,
53
53
  looksLikeBrightsyEmptyCompletion
54
- } from "./chunk-HO5R3ZRH.js";
54
+ } from "./chunk-5XNT6BCG.js";
55
55
  import {
56
56
  run
57
57
  } from "./chunk-QVN2WOKJ.js";
@@ -1,9 +1,16 @@
1
1
  // src/agents/cursor-stream-cutoff.ts
2
2
  var CURSOR_STREAM_CUTOFF = /nghttp2|premature close|\[unavailable\]\s+error\b|http\/2 stream closed|\bcancel \(0x8\)|error code cancel\b/i;
3
+ var CURSOR_STREAM_IDLE_AFTER_TOOLS = /stopped responding after a tool call/i;
3
4
  var CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT = 3;
4
5
  function looksLikeCursorStreamCutOff(text) {
5
6
  return CURSOR_STREAM_CUTOFF.test(text.trim());
6
7
  }
8
+ function looksLikeCursorStreamIdleAfterTools(text) {
9
+ return CURSOR_STREAM_IDLE_AFTER_TOOLS.test(text.trim());
10
+ }
11
+ function looksLikeCursorStreamFailure(text) {
12
+ return looksLikeCursorStreamCutOff(text) || looksLikeCursorStreamIdleAfterTools(text);
13
+ }
7
14
  function cursorStreamCutOffContinueLimit(detail) {
8
15
  if (looksLikeCursorStreamCutOff(detail) || /connection stalled/i.test(detail)) {
9
16
  return CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT;
@@ -15,6 +22,33 @@ function nextCrashContinueCount(detail, used) {
15
22
  if (used >= limit) return null;
16
23
  return used + 1;
17
24
  }
25
+ function cursorModelDisplayName(model) {
26
+ const raw = (model ?? "").trim();
27
+ if (!raw || /^(auto|default)$/i.test(raw)) return "";
28
+ if (/^grok-/i.test(raw)) return raw.replace(/^grok-/i, "Grok ");
29
+ return raw;
30
+ }
31
+ function formatCursorStreamIdleAfterToolsError(model) {
32
+ const label = cursorModelDisplayName(model);
33
+ return label ? `Cursor stopped responding after a tool call (${label})` : "Cursor stopped responding after a tool call";
34
+ }
35
+ function createCursorStreamToolProgress() {
36
+ return { completedTool: false, assistantAfterTool: false };
37
+ }
38
+ function noteCursorAgentEvent(state, event) {
39
+ if (event.type === "tool_result" && event.partial !== true) {
40
+ state.completedTool = true;
41
+ state.assistantAfterTool = false;
42
+ return;
43
+ }
44
+ if (event.type === "stdout" && !event.parentId) {
45
+ const text = typeof event.data === "string" ? event.data.trim() : "";
46
+ if (state.completedTool && text) state.assistantAfterTool = true;
47
+ }
48
+ }
49
+ function isCursorIdleAfterCompletedTool(state) {
50
+ return state.completedTool && !state.assistantAfterTool;
51
+ }
18
52
 
19
53
  // src/agents/error-detail.ts
20
54
  function formatUnknownDetail(err) {
@@ -223,7 +257,7 @@ function looksLikeRetryableRunnerCrash(text) {
223
257
  if (looksLikeInvalidAgentSession(text)) return false;
224
258
  if (looksLikeV8Oom(text)) return false;
225
259
  if (looksLikeHugeToolResultDump(text)) return true;
226
- if (looksLikeCursorStreamCutOff(text)) return true;
260
+ if (looksLikeCursorStreamFailure(text)) return true;
227
261
  if (looksLikeBrightsyEmptyCompletion(text)) return true;
228
262
  const lower = text.trim().toLowerCase();
229
263
  if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
@@ -300,7 +334,7 @@ function humanizeAgentFailDetail(detail) {
300
334
  if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
301
335
  return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
302
336
  }
303
- if (/connection stalled/.test(lower) || looksLikeCursorStreamCutOff(raw)) {
337
+ if (/connection stalled/.test(lower) || looksLikeCursorStreamFailure(raw)) {
304
338
  return /retry the turn/i.test(raw) ? raw : `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
305
339
  }
306
340
  if (looksLikeBrightsyEmptyCompletion(raw)) {
@@ -387,6 +421,10 @@ function formatTurnExitError(exitCode, stderrSummary) {
387
421
  export {
388
422
  looksLikeCursorStreamCutOff,
389
423
  nextCrashContinueCount,
424
+ formatCursorStreamIdleAfterToolsError,
425
+ createCursorStreamToolProgress,
426
+ noteCursorAgentEvent,
427
+ isCursorIdleAfterCompletedTool,
390
428
  formatUnknownDetail,
391
429
  extractJsonErrorMessage,
392
430
  pushTurnStderr,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clipToolResultForStore
3
- } from "./chunk-HO5R3ZRH.js";
3
+ } from "./chunk-5XNT6BCG.js";
4
4
 
5
5
  // src/agents/message-parts.ts
6
6
  function asRecord(input) {
@@ -5,7 +5,7 @@ import {
5
5
  compactSummaryPart,
6
6
  isInternalAgentStatusText,
7
7
  lastAssistantMessageText
8
- } from "./chunk-5XQ43YZU.js";
8
+ } from "./chunk-I5TESHDN.js";
9
9
  import {
10
10
  isCloudCoordinatorThread,
11
11
  isGlobalThread,
@@ -1687,7 +1687,7 @@ var PORT_RANGE_SIZE = 10;
1687
1687
  var RECLAIM_RETRY_DELAY_MS = 40;
1688
1688
  var RECLAIM_TRIES = 8;
1689
1689
  async function killReclaimable(ports, worktreePath, signal) {
1690
- const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-E6M3BATZ.js");
1690
+ const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-AMZ5SKG2.js");
1691
1691
  if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
1692
1692
  else killListenersOnPorts2(ports);
1693
1693
  }
@@ -21,7 +21,7 @@ import {
21
21
  looksLikeSkillBody,
22
22
  skillCommandFromBody,
23
23
  withEventParentId
24
- } from "./chunk-5XQ43YZU.js";
24
+ } from "./chunk-I5TESHDN.js";
25
25
  import {
26
26
  isOrchestratorThread
27
27
  } from "./chunk-X3FSWWW2.js";
@@ -881,31 +881,55 @@ function applySystemCaEnv(env) {
881
881
  const inherited = process.env.NODE_EXTRA_CA_CERTS?.trim();
882
882
  if (inherited) env[NODE_EXTRA_CA_CERTS] = inherited;
883
883
  }
884
- function extraCertsFromBundle() {
884
+ function extraCertsFromBundle(io = {}) {
885
885
  const path = process.env.NODE_EXTRA_CA_CERTS?.trim();
886
886
  if (path) return splitPemCertificates(readExistingFile(path));
887
- const dest = systemCaBundlePath();
888
- return splitPemCertificates(readExistingFile(dest));
887
+ return splitPemCertificates(readExistingFile(systemCaBundlePath(io)));
888
+ }
889
+ function extraSystemCaPems(io = {}) {
890
+ const fromBundle = extraCertsFromBundle(io);
891
+ if (fromBundle.length > 0) return fromBundle;
892
+ return splitPemCertificates(collectSystemCaPem(io));
893
+ }
894
+ function mergeSystemCaIntoTlsOptions(options, extra, roots = tls.rootCertificates) {
895
+ const existing = options?.ca;
896
+ const base = existing == null ? [...roots] : Array.isArray(existing) ? [...existing] : [existing];
897
+ return { ...options, ca: [...base, ...extra] };
898
+ }
899
+ function installCreateSecureContextCaPatch(api, extra) {
900
+ if (api.__sideboardSystemCaPatched) return true;
901
+ if (typeof api.createSecureContext !== "function") return false;
902
+ const orig = api.createSecureContext;
903
+ const roots = api.rootCertificates ?? tls.rootCertificates;
904
+ api.createSecureContext = ((options) => orig(mergeSystemCaIntoTlsOptions(options, extra, roots)));
905
+ api.__sideboardSystemCaPatched = true;
906
+ return true;
889
907
  }
890
908
  function trustSystemCertificates(io = {}) {
891
909
  try {
892
- const api = tls;
893
- if (typeof api.getCACertificates !== "function" || typeof api.setDefaultCACertificates !== "function") {
894
- return false;
895
- }
896
- const current = api.getCACertificates("default");
897
- const system = api.getCACertificates("system");
898
- let extra = extraCertsFromBundle();
899
- if (system.length === 0 && extra.length === 0) {
900
- extra = splitPemCertificates(collectSystemCaPem(io));
910
+ const extra = extraSystemCaPems(io);
911
+ const api = io.tls ?? tls;
912
+ if (typeof api.getCACertificates === "function" && typeof api.setDefaultCACertificates === "function") {
913
+ const current = api.getCACertificates("default");
914
+ const system = api.getCACertificates("system");
915
+ if (system.length === 0 && extra.length === 0) return false;
916
+ api.setDefaultCACertificates([...current, ...system, ...extra]);
917
+ return true;
901
918
  }
902
- if (system.length === 0 && extra.length === 0) return false;
903
- api.setDefaultCACertificates([...current, ...system, ...extra]);
904
- return true;
919
+ if (extra.length === 0) return false;
920
+ return installCreateSecureContextCaPatch(api, extra);
905
921
  } catch {
906
922
  return false;
907
923
  }
908
924
  }
925
+ function bootstrapSystemCa(io = {}) {
926
+ const systemCaBundle = materializeSystemCaBundle(io);
927
+ if (systemCaBundle && !process.env.NODE_EXTRA_CA_CERTS?.trim()) {
928
+ process.env.NODE_EXTRA_CA_CERTS = systemCaBundle;
929
+ }
930
+ applySystemCaEnv(process.env);
931
+ trustSystemCertificates(io);
932
+ }
909
933
 
910
934
  // src/agents/packaged-runtime.ts
911
935
  import { existsSync as existsSync4 } from "fs";
@@ -4521,9 +4545,7 @@ function allAdapters() {
4521
4545
  }
4522
4546
 
4523
4547
  export {
4524
- materializeSystemCaBundle,
4525
- applySystemCaEnv,
4526
- trustSystemCertificates,
4548
+ bootstrapSystemCa,
4527
4549
  encodeBrightsyTarget,
4528
4550
  decodeBrightsyTarget,
4529
4551
  parseBrightsyCliLine,
@@ -3,10 +3,17 @@
3
3
 
4
4
  // src/agents/cursor-stream-cutoff.ts
5
5
  var CURSOR_STREAM_CUTOFF = /nghttp2|premature close|\[unavailable\]\s+error\b|http\/2 stream closed|\bcancel \(0x8\)|error code cancel\b/i;
6
+ var CURSOR_STREAM_IDLE_AFTER_TOOLS = /stopped responding after a tool call/i;
6
7
  var CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT = 3;
7
8
  function looksLikeCursorStreamCutOff(text) {
8
9
  return CURSOR_STREAM_CUTOFF.test(text.trim());
9
10
  }
11
+ function looksLikeCursorStreamIdleAfterTools(text) {
12
+ return CURSOR_STREAM_IDLE_AFTER_TOOLS.test(text.trim());
13
+ }
14
+ function looksLikeCursorStreamFailure(text) {
15
+ return looksLikeCursorStreamCutOff(text) || looksLikeCursorStreamIdleAfterTools(text);
16
+ }
10
17
  function cursorStreamCutOffContinueLimit(detail) {
11
18
  if (looksLikeCursorStreamCutOff(detail) || /connection stalled/i.test(detail)) {
12
19
  return CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT;
@@ -226,7 +233,7 @@ function looksLikeRetryableRunnerCrash(text) {
226
233
  if (looksLikeInvalidAgentSession(text)) return false;
227
234
  if (looksLikeV8Oom(text)) return false;
228
235
  if (looksLikeHugeToolResultDump(text)) return true;
229
- if (looksLikeCursorStreamCutOff(text)) return true;
236
+ if (looksLikeCursorStreamFailure(text)) return true;
230
237
  if (looksLikeBrightsyEmptyCompletion(text)) return true;
231
238
  const lower = text.trim().toLowerCase();
232
239
  if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
@@ -303,7 +310,7 @@ function humanizeAgentFailDetail(detail) {
303
310
  if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
304
311
  return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
305
312
  }
306
- if (/connection stalled/.test(lower) || looksLikeCursorStreamCutOff(raw)) {
313
+ if (/connection stalled/.test(lower) || looksLikeCursorStreamFailure(raw)) {
307
314
  return /retry the turn/i.test(raw) ? raw : `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
308
315
  }
309
316
  if (looksLikeBrightsyEmptyCompletion(raw)) {
@@ -14,7 +14,7 @@ import {
14
14
  parseSessionQuotaResetAt,
15
15
  planModeTurnInstruction,
16
16
  resolveQuotaFallbackAgent
17
- } from "./chunk-G2L3CR3A.js";
17
+ } from "./chunk-4YBQBVYL.js";
18
18
  import {
19
19
  REVIEW_TAB_TITLE,
20
20
  applyWorktreePkgCacheEnv,
@@ -55,7 +55,7 @@ import {
55
55
  worktreeDevProcessKey,
56
56
  worktreeRunProcessKey,
57
57
  worktreeSetupProcessKey
58
- } from "./chunk-CTFBZZGZ.js";
58
+ } from "./chunk-VBVSJUM2.js";
59
59
  import {
60
60
  applyAgentEvent,
61
61
  clipAgentEventForPaint,
@@ -70,7 +70,7 @@ import {
70
70
  partsToAssistantText,
71
71
  stripBrightsyNdjsonNoise,
72
72
  toolDescription
73
- } from "./chunk-F36QRDM4.js";
73
+ } from "./chunk-7Q327QF2.js";
74
74
  import {
75
75
  titleFromPrompt
76
76
  } from "./chunk-7H655NEW.js";
@@ -181,7 +181,7 @@ import {
181
181
  import {
182
182
  applyAgentRunnerHeapEnv,
183
183
  packagedMcpDir
184
- } from "./chunk-MMVMQ34G.js";
184
+ } from "./chunk-Y3Y7SZBZ.js";
185
185
  import {
186
186
  fallbackTurnFailDetail,
187
187
  formatAgentErrorContinuePrompt,
@@ -196,7 +196,7 @@ import {
196
196
  shouldRetryFailedAgentTurn,
197
197
  summarizeTurnStderr,
198
198
  turnFailChatText
199
- } from "./chunk-HO5R3ZRH.js";
199
+ } from "./chunk-5XNT6BCG.js";
200
200
  import {
201
201
  clearStaleIndexLocks,
202
202
  enrichPathWithNpmGlobalBin,
@@ -3027,7 +3027,7 @@ async function createThread(input, _onSetupLine) {
3027
3027
  return readThread(thread.id) ?? thread;
3028
3028
  }
3029
3029
  async function listLinearIssues(agent, repoPath) {
3030
- const { getAdapter: getAdapter2 } = await import("./agents-IWNQOQOU.js");
3030
+ const { getAdapter: getAdapter2 } = await import("./agents-XXXRQJJO.js");
3031
3031
  await requireAgent(agent, { requireLinear: true });
3032
3032
  const adapter = getAdapter2(agent);
3033
3033
  if (!adapter.listLinearIssues) {
@@ -5869,7 +5869,7 @@ function formatWorktreeReminder() {
5869
5869
  return "Sideboard workspace: stay in this cwd for all file and git work. Push and open PRs against origin, never upstream. Do not edit the main repo checkout. If a goal is given (Greptile 5/5, CI green), watch-fix-push until it lands \u2014 do not watch after every push. Schedules: create_schedule (at / every / cron; chatId=self for this chat). set_workspace_tags updates labels on this workspace (omit ref).";
5870
5870
  }
5871
5871
  function formatClaudeSubagentReminder() {
5872
- return 'Claude subagents: if Task/Agent workers will edit files, write a short plan in this chat and continue in the same turn. Do not ask the user whether to isolate, and do not set worktree.bgIsolation to none. One writer may edit this workspace. Every other writer is an Agent with isolation "worktree" and a disjoint file list (read-only explore agents may overlap). While those agents run, leave their files alone. Merge each returned branch into this workspace, then remove the temporary worktree. You stay in this cwd. If Claude says another write-capable agent is in this directory, or that writes to the shared checkout are blocked, re-spawn that agent with isolation "worktree" or make the edit yourself.';
5872
+ return 'Claude subagents: if Task/Agent workers will edit files, write a short plan in this chat and continue in the same turn. Do not ask the user whether to isolate, and do not set worktree.bgIsolation to none. One writer may edit this workspace. Every other writer is an Agent with isolation "worktree" and a disjoint file list (read-only explore agents may overlap). While those agents run, leave their files alone. Merge each returned branch into this workspace, then remove the temporary worktree. You stay in this cwd. If Claude says another write-capable agent is in this directory, or that writes to the shared checkout are blocked, re-spawn that agent with isolation "worktree" or make the edit yourself. That note is another worker in this chat, or a worker Claude still has marked running. Do not mention it to the user.';
5873
5873
  }
5874
5874
  function claudeSubagentTurnReminder(thread) {
5875
5875
  if (thread.agent !== "claude" || thread.planMode || isOrchestratorThread(thread)) {
@@ -6741,7 +6741,7 @@ function formatScheduledPrompt(name, prompt) {
6741
6741
  ${prompt}`;
6742
6742
  }
6743
6743
  async function defaultDeps() {
6744
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-SJU5LYAO.js");
6744
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-XFE3U3RP.js");
6745
6745
  const orch = getOrchestrator2();
6746
6746
  return {
6747
6747
  findThread: (id) => findThreadByRef(id),
@@ -27,7 +27,7 @@ import {
27
27
  parseSessionQuotaResetAt,
28
28
  planModeTurnInstruction,
29
29
  resolveQuotaFallbackAgent
30
- } from "./chunk-EZYZGDWU.js";
30
+ } from "./chunk-GQJOLTZU.js";
31
31
  import {
32
32
  REVIEW_TAB_TITLE,
33
33
  applyWorktreePkgCacheEnv,
@@ -68,7 +68,7 @@ import {
68
68
  worktreeDevProcessKey,
69
69
  worktreeRunProcessKey,
70
70
  worktreeSetupProcessKey
71
- } from "./chunk-HRPSFU4Q.js";
71
+ } from "./chunk-AILQRQ26.js";
72
72
  import {
73
73
  applyAgentEvent,
74
74
  clipAgentEventForPaint,
@@ -95,7 +95,7 @@ import {
95
95
  summarizeTurnStderr,
96
96
  toolDescription,
97
97
  turnFailChatText
98
- } from "./chunk-5XQ43YZU.js";
98
+ } from "./chunk-I5TESHDN.js";
99
99
  import {
100
100
  SLACK_REPLY_FORMATTING,
101
101
  addWorkspace,
@@ -5548,7 +5548,7 @@ function formatWorktreeReminder() {
5548
5548
  return "Sideboard workspace: stay in this cwd for all file and git work. Push and open PRs against origin, never upstream. Do not edit the main repo checkout. If a goal is given (Greptile 5/5, CI green), watch-fix-push until it lands \u2014 do not watch after every push. Schedules: create_schedule (at / every / cron; chatId=self for this chat). set_workspace_tags updates labels on this workspace (omit ref).";
5549
5549
  }
5550
5550
  function formatClaudeSubagentReminder() {
5551
- return 'Claude subagents: if Task/Agent workers will edit files, write a short plan in this chat and continue in the same turn. Do not ask the user whether to isolate, and do not set worktree.bgIsolation to none. One writer may edit this workspace. Every other writer is an Agent with isolation "worktree" and a disjoint file list (read-only explore agents may overlap). While those agents run, leave their files alone. Merge each returned branch into this workspace, then remove the temporary worktree. You stay in this cwd. If Claude says another write-capable agent is in this directory, or that writes to the shared checkout are blocked, re-spawn that agent with isolation "worktree" or make the edit yourself.';
5551
+ return 'Claude subagents: if Task/Agent workers will edit files, write a short plan in this chat and continue in the same turn. Do not ask the user whether to isolate, and do not set worktree.bgIsolation to none. One writer may edit this workspace. Every other writer is an Agent with isolation "worktree" and a disjoint file list (read-only explore agents may overlap). While those agents run, leave their files alone. Merge each returned branch into this workspace, then remove the temporary worktree. You stay in this cwd. If Claude says another write-capable agent is in this directory, or that writes to the shared checkout are blocked, re-spawn that agent with isolation "worktree" or make the edit yourself. That note is another worker in this chat, or a worker Claude still has marked running. Do not mention it to the user.';
5552
5552
  }
5553
5553
  function claudeSubagentTurnReminder(thread) {
5554
5554
  if (thread.agent !== "claude" || thread.planMode || isOrchestratorThread(thread)) {
@@ -6389,7 +6389,7 @@ function formatScheduledPrompt(name, prompt) {
6389
6389
  ${prompt}`;
6390
6390
  }
6391
6391
  async function defaultDeps() {
6392
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-JTDQ47H7.js");
6392
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-7374OI7T.js");
6393
6393
  const orch = getOrchestrator2();
6394
6394
  return {
6395
6395
  findThread: (id) => findThreadByRef(id),
@@ -4,7 +4,7 @@ import {
4
4
  formatUnknownDetail,
5
5
  looksLikeCursorStreamCutOff,
6
6
  looksLikeHugeToolResultDump
7
- } from "./chunk-HO5R3ZRH.js";
7
+ } from "./chunk-5XNT6BCG.js";
8
8
  import {
9
9
  CLI_DIR
10
10
  } from "./chunk-6K64FJDD.js";
@@ -2,7 +2,7 @@ import {
2
2
  compactSummaryPart,
3
3
  isInternalAgentStatusText,
4
4
  lastAssistantMessageText
5
- } from "./chunk-F36QRDM4.js";
5
+ } from "./chunk-7Q327QF2.js";
6
6
  import {
7
7
  isCloudCoordinatorThread,
8
8
  isGlobalThread,
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-2P4XKWV2.js";
30
30
  import {
31
31
  clipToolResultForStore
32
- } from "./chunk-HO5R3ZRH.js";
32
+ } from "./chunk-5XNT6BCG.js";
33
33
  import {
34
34
  ATTACHMENTS_DIR,
35
35
  DETACHED_JOBS_DIR,
@@ -1823,7 +1823,7 @@ var PORT_RANGE_SIZE = 10;
1823
1823
  var RECLAIM_RETRY_DELAY_MS = 40;
1824
1824
  var RECLAIM_TRIES = 8;
1825
1825
  async function killReclaimable(ports, worktreePath, signal) {
1826
- const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-IPIMGUR4.js");
1826
+ const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-OFXA5BST.js");
1827
1827
  if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
1828
1828
  else killListenersOnPorts2(ports);
1829
1829
  }