@sideboard-ai/core 0.1.197 → 0.1.199

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 (38) hide show
  1. package/dist/{abletime-JINF5KJV.js → abletime-3CSCNAXU.js} +2 -2
  2. package/dist/{abletime-HR6P4GJH.js → abletime-H74RNIKV.js} +2 -2
  3. package/dist/agents/cursor-runner.cjs +49 -45
  4. package/dist/agents/cursor-runner.js +5 -3
  5. package/dist/{agents-IVDCAG7T.js → agents-AVH44CBS.js} +27 -5
  6. package/dist/{agents-BGT5DUGU.js → agents-BOYOK56K.js} +26 -4
  7. package/dist/{app-settings-J775CYOO.js → app-settings-FMTDH5RD.js} +3 -1
  8. package/dist/{app-settings-5KHVKJKO.js → app-settings-MMPLJHWF.js} +3 -1
  9. package/dist/{chunk-S5GLSRLP.js → chunk-2IQ6W47G.js} +10 -0
  10. package/dist/{chunk-HZTHWU6A.js → chunk-BLOKJY4U.js} +2 -2
  11. package/dist/{chunk-E37JHCO3.js → chunk-CA7PWMQ7.js} +1 -1
  12. package/dist/{chunk-NLHFAMC2.js → chunk-CQ5R3VPP.js} +15 -1
  13. package/dist/{chunk-ZG7RONNQ.js → chunk-CTABTALL.js} +22 -21
  14. package/dist/{chunk-PQBRCBIE.js → chunk-DU2ICKLA.js} +382 -6
  15. package/dist/{chunk-S4QCBBXS.js → chunk-DU4ID3DA.js} +1 -1
  16. package/dist/{chunk-AH6WIBLY.js → chunk-HQKGK4KO.js} +10 -0
  17. package/dist/{chunk-N5JBG3BF.js → chunk-KI4YI72Y.js} +371 -6
  18. package/dist/{chunk-SIIDQV2B.js → chunk-PPVN3APP.js} +24 -23
  19. package/dist/{chunk-KTHRWHA3.js → chunk-PTAMHXBT.js} +1 -1
  20. package/dist/{chunk-DP4TKAMZ.js → chunk-QFABSE3Q.js} +1 -1
  21. package/dist/{chunk-6YTI2HBG.js → chunk-S4EEYOSU.js} +2 -2
  22. package/dist/{coordinator-prompt-IX66YUJ2.js → coordinator-prompt-LB3GA3U4.js} +3 -3
  23. package/dist/{coordinator-prompt-LYKS3YNG.js → coordinator-prompt-ROWPLVQ3.js} +3 -3
  24. package/dist/{global-workspace-SNJ2Z6SL.js → global-workspace-C5XKWCRH.js} +3 -3
  25. package/dist/{global-workspace-4QX6UEOY.js → global-workspace-V2A4YKZ6.js} +3 -3
  26. package/dist/index.cjs +688 -262
  27. package/dist/index.d.cts +78 -1
  28. package/dist/index.d.ts +78 -1
  29. package/dist/index.js +33 -9
  30. package/dist/mcp/run-stdio.cjs +317 -258
  31. package/dist/mcp/run-stdio.js +8 -8
  32. package/dist/{orchestrator-SANGGLQV.js → orchestrator-AJGDZEAS.js} +5 -5
  33. package/dist/{orchestrator-HB4LZ2AA.js → orchestrator-NCGYNVYN.js} +6 -6
  34. package/dist/{workspaces-URMUVGAQ.js → workspaces-GWEKIS3B.js} +3 -3
  35. package/dist/{workspaces-UTOYGBYB.js → workspaces-WIRJQ6HA.js} +3 -3
  36. package/dist/{worktree-RM6UWNGZ.js → worktree-QA4J75FI.js} +2 -2
  37. package/dist/{worktree-R43JOR4V.js → worktree-UI5WJC3A.js} +2 -2
  38. package/package.json +1 -1
@@ -15,9 +15,9 @@ import {
15
15
  toAbleTimeIssueInfo,
16
16
  updateAbleTimeTask,
17
17
  verifyAbleTimeConnection
18
- } from "./chunk-E37JHCO3.js";
18
+ } from "./chunk-CA7PWMQ7.js";
19
19
  import "./chunk-N7WZ6NIN.js";
20
- import "./chunk-S5GLSRLP.js";
20
+ import "./chunk-2IQ6W47G.js";
21
21
  import "./chunk-4TR3HZFT.js";
22
22
  import "./chunk-WDRMZKVB.js";
23
23
  import "./chunk-JT7R45JB.js";
@@ -17,9 +17,9 @@ import {
17
17
  toAbleTimeIssueInfo,
18
18
  updateAbleTimeTask,
19
19
  verifyAbleTimeConnection
20
- } from "./chunk-KTHRWHA3.js";
20
+ } from "./chunk-PTAMHXBT.js";
21
21
  import "./chunk-VKQGAWHY.js";
22
- import "./chunk-AH6WIBLY.js";
22
+ import "./chunk-HQKGK4KO.js";
23
23
  import "./chunk-NSTQ6QKD.js";
24
24
  import "./chunk-KGZBYWZ3.js";
25
25
  import "./chunk-EQNRWDLN.js";
@@ -220,6 +220,53 @@ function sanitizeCursorStoreSegment(threadId) {
220
220
  return (threadId ?? "").trim().replace(/[^a-zA-Z0-9._-]/g, "_");
221
221
  }
222
222
 
223
+ // src/agents/error-detail.ts
224
+ function formatUnknownDetail(err) {
225
+ if (err == null) return "";
226
+ if (typeof err === "string") return err.trim();
227
+ if (err instanceof Error) {
228
+ const base = err.message.trim() || err.name;
229
+ const code = "code" in err && typeof err.code === "string" ? err.code.trim() : "";
230
+ return code && !base.includes(code) ? `${base} (${code})` : base;
231
+ }
232
+ if (typeof err === "object") {
233
+ const o = err;
234
+ const nested = o.error != null && typeof o.error === "object" ? formatUnknownDetail(o.error) : "";
235
+ const message = typeof o.message === "string" ? o.message.trim() : typeof o.error === "string" ? o.error.trim() : typeof o.result === "string" ? o.result.trim() : nested;
236
+ const code = typeof o.code === "string" ? o.code.trim() : "";
237
+ if (message) return code && !message.includes(code) ? `${message} (${code})` : message;
238
+ try {
239
+ const json = JSON.stringify(err);
240
+ if (json && json !== "{}" && json !== "null") return json;
241
+ } catch {
242
+ }
243
+ }
244
+ const fallback = String(err);
245
+ return fallback === "[object Object]" ? "" : fallback;
246
+ }
247
+ function extractJsonErrorMessage(obj) {
248
+ const nested = obj.error != null && typeof obj.error === "object" ? obj.error : null;
249
+ const candidates = [
250
+ typeof obj.message === "string" ? obj.message : null,
251
+ typeof obj.error === "string" ? obj.error : null,
252
+ nested && typeof nested.message === "string" ? nested.message : null,
253
+ typeof obj.result === "string" ? obj.result : null,
254
+ typeof obj.detail === "string" ? obj.detail : null
255
+ ];
256
+ for (const c of candidates) {
257
+ const t = c?.trim();
258
+ if (t) return t;
259
+ }
260
+ if (Array.isArray(obj.errors)) {
261
+ const parts = obj.errors.map((e) => formatUnknownDetail(e)).map((s) => s.trim()).filter(Boolean);
262
+ if (parts.length) return parts.join("; ");
263
+ }
264
+ return null;
265
+ }
266
+ function looksLikeCursorHttp2StreamClose(text) {
267
+ return /nghttp2/i.test(text.trim());
268
+ }
269
+
223
270
  // src/agents/cursor-session.ts
224
271
  function cursorErrorMessage(err) {
225
272
  if (err instanceof Error) return err.message.trim();
@@ -251,7 +298,8 @@ function isRetryableCursorTransportError(err) {
251
298
  if (err && typeof err === "object" && "isRetryable" in err && err.isRetryable === true) {
252
299
  return true;
253
300
  }
254
- return /network request failed/i.test(cursorErrorMessage(err));
301
+ const message = cursorErrorMessage(err);
302
+ return /network request failed/i.test(message) || looksLikeCursorHttp2StreamClose(message);
255
303
  }
256
304
  function looksLikeNonRetryableCursorFailure(message) {
257
305
  const lower = message.toLowerCase();
@@ -324,50 +372,6 @@ async function* iterateUntilIdle(iterable, idleMs, onIdle, activity) {
324
372
  }
325
373
  }
326
374
 
327
- // src/agents/error-detail.ts
328
- function formatUnknownDetail(err) {
329
- if (err == null) return "";
330
- if (typeof err === "string") return err.trim();
331
- if (err instanceof Error) {
332
- const base = err.message.trim() || err.name;
333
- const code = "code" in err && typeof err.code === "string" ? err.code.trim() : "";
334
- return code && !base.includes(code) ? `${base} (${code})` : base;
335
- }
336
- if (typeof err === "object") {
337
- const o = err;
338
- const nested = o.error != null && typeof o.error === "object" ? formatUnknownDetail(o.error) : "";
339
- const message = typeof o.message === "string" ? o.message.trim() : typeof o.error === "string" ? o.error.trim() : typeof o.result === "string" ? o.result.trim() : nested;
340
- const code = typeof o.code === "string" ? o.code.trim() : "";
341
- if (message) return code && !message.includes(code) ? `${message} (${code})` : message;
342
- try {
343
- const json = JSON.stringify(err);
344
- if (json && json !== "{}" && json !== "null") return json;
345
- } catch {
346
- }
347
- }
348
- const fallback = String(err);
349
- return fallback === "[object Object]" ? "" : fallback;
350
- }
351
- function extractJsonErrorMessage(obj) {
352
- const nested = obj.error != null && typeof obj.error === "object" ? obj.error : null;
353
- const candidates = [
354
- typeof obj.message === "string" ? obj.message : null,
355
- typeof obj.error === "string" ? obj.error : null,
356
- nested && typeof nested.message === "string" ? nested.message : null,
357
- typeof obj.result === "string" ? obj.result : null,
358
- typeof obj.detail === "string" ? obj.detail : null
359
- ];
360
- for (const c of candidates) {
361
- const t = c?.trim();
362
- if (t) return t;
363
- }
364
- if (Array.isArray(obj.errors)) {
365
- const parts = obj.errors.map((e) => formatUnknownDetail(e)).map((s) => s.trim()).filter(Boolean);
366
- if (parts.length) return parts.join("; ");
367
- }
368
- return null;
369
- }
370
-
371
375
  // src/agents/cursor-events.ts
372
376
  function usageFromCursor(usage) {
373
377
  if (!usage) return null;
@@ -11,8 +11,9 @@ import {
11
11
  cursorSdkMessageToEvents,
12
12
  ensureCursorRipgrepPath,
13
13
  fetchCursorTurnCostUsd,
14
- formatUnknownDetail
15
- } from "../chunk-NLHFAMC2.js";
14
+ formatUnknownDetail,
15
+ looksLikeCursorHttp2StreamClose
16
+ } from "../chunk-CQ5R3VPP.js";
16
17
  import {
17
18
  dropNestedElectronEnvFromProcess
18
19
  } from "../chunk-4TR3HZFT.js";
@@ -55,7 +56,8 @@ function isRetryableCursorTransportError(err) {
55
56
  if (err && typeof err === "object" && "isRetryable" in err && err.isRetryable === true) {
56
57
  return true;
57
58
  }
58
- return /network request failed/i.test(cursorErrorMessage(err));
59
+ const message = cursorErrorMessage(err);
60
+ return /network request failed/i.test(message) || looksLikeCursorHttp2StreamClose(message);
59
61
  }
60
62
  function looksLikeNonRetryableCursorFailure(message) {
61
63
  const lower = message.toLowerCase();
@@ -4,12 +4,22 @@ import {
4
4
  allAdapters,
5
5
  brightsyAdapter,
6
6
  claudeAdapter,
7
+ claudeUsageOverLimitWindows,
7
8
  codexAdapter,
8
9
  cursorAdapter,
9
10
  decodeBrightsyTarget,
10
11
  encodeBrightsyTarget,
12
+ formatClaudeExtraUsageDetail,
13
+ formatClaudeUsageCompact,
14
+ formatClaudeUsageFetchedAt,
15
+ formatClaudeUsageOverLimitConfirm,
16
+ formatClaudeUsageReset,
17
+ formatClaudeUsageResetClock,
18
+ formatClaudeUsageTooltip,
11
19
  getAdapter,
12
20
  getAgentSetupInfo,
21
+ getClaudePlanUsage,
22
+ hottestClaudeWindow,
13
23
  installAgent,
14
24
  installNpmGlobalPackage,
15
25
  isCursorApiKeyConfigured,
@@ -25,6 +35,7 @@ import {
25
35
  mcpStatusThinkingFromClaudeInit,
26
36
  openInSystemTerminal,
27
37
  opencodeAdapter,
38
+ parseClaudeUsagePayload,
28
39
  parseSessionQuotaResetAt,
29
40
  permissionMode,
30
41
  prepareTerminalCommand,
@@ -32,9 +43,9 @@ import {
32
43
  resolveLoginCommand,
33
44
  resolveQuotaFallbackAgent,
34
45
  whichOnPath
35
- } from "./chunk-N5JBG3BF.js";
36
- import "./chunk-HZTHWU6A.js";
37
- import "./chunk-S4QCBBXS.js";
46
+ } from "./chunk-KI4YI72Y.js";
47
+ import "./chunk-BLOKJY4U.js";
48
+ import "./chunk-DU4ID3DA.js";
38
49
  import "./chunk-6K64FJDD.js";
39
50
  import "./chunk-QQKDGPUI.js";
40
51
  import "./chunk-SALM35KD.js";
@@ -45,13 +56,13 @@ import {
45
56
  parseCursorRunnerLine,
46
57
  preferredCursorCostCents,
47
58
  turnCostUsdFromCursorUsage
48
- } from "./chunk-NLHFAMC2.js";
59
+ } from "./chunk-CQ5R3VPP.js";
49
60
  import {
50
61
  ORCHESTRATOR_AGENT_KINDS,
51
62
  assertOrchestratorCapableAgent,
52
63
  coerceOrchestratorAgent,
53
64
  isOrchestratorCapableAgent
54
- } from "./chunk-S5GLSRLP.js";
65
+ } from "./chunk-2IQ6W47G.js";
55
66
  import "./chunk-4TR3HZFT.js";
56
67
  import "./chunk-WDRMZKVB.js";
57
68
  import "./chunk-JT7R45JB.js";
@@ -75,6 +86,7 @@ export {
75
86
  assertOrchestratorCapableAgent,
76
87
  brightsyAdapter,
77
88
  claudeAdapter,
89
+ claudeUsageOverLimitWindows,
78
90
  codexAdapter,
79
91
  coerceOrchestratorAgent,
80
92
  conductorBundledBinDir,
@@ -84,8 +96,17 @@ export {
84
96
  encodeBrightsyTarget,
85
97
  enrichPathWithNpmGlobalBin,
86
98
  ensureAgentPath,
99
+ formatClaudeExtraUsageDetail,
100
+ formatClaudeUsageCompact,
101
+ formatClaudeUsageFetchedAt,
102
+ formatClaudeUsageOverLimitConfirm,
103
+ formatClaudeUsageReset,
104
+ formatClaudeUsageResetClock,
105
+ formatClaudeUsageTooltip,
87
106
  getAdapter,
88
107
  getAgentSetupInfo,
108
+ getClaudePlanUsage,
109
+ hottestClaudeWindow,
89
110
  installAgent,
90
111
  installNpmGlobalPackage,
91
112
  isConductorBundledCli,
@@ -103,6 +124,7 @@ export {
103
124
  mcpStatusThinkingFromClaudeInit,
104
125
  openInSystemTerminal,
105
126
  opencodeAdapter,
127
+ parseClaudeUsagePayload,
106
128
  parseCursorRunnerLine,
107
129
  parseSessionQuotaResetAt,
108
130
  permissionMode,
@@ -6,13 +6,23 @@ import {
6
6
  allAdapters,
7
7
  brightsyAdapter,
8
8
  claudeAdapter,
9
+ claudeUsageOverLimitWindows,
9
10
  codexAdapter,
10
11
  cursorAdapter,
11
12
  cursorSdkMessageToEvents,
12
13
  decodeBrightsyTarget,
13
14
  encodeBrightsyTarget,
15
+ formatClaudeExtraUsageDetail,
16
+ formatClaudeUsageCompact,
17
+ formatClaudeUsageFetchedAt,
18
+ formatClaudeUsageOverLimitConfirm,
19
+ formatClaudeUsageReset,
20
+ formatClaudeUsageResetClock,
21
+ formatClaudeUsageTooltip,
14
22
  getAdapter,
15
23
  getAgentSetupInfo,
24
+ getClaudePlanUsage,
25
+ hottestClaudeWindow,
16
26
  installAgent,
17
27
  installNpmGlobalPackage,
18
28
  isCursorApiKeyConfigured,
@@ -28,6 +38,7 @@ import {
28
38
  mcpStatusThinkingFromClaudeInit,
29
39
  openInSystemTerminal,
30
40
  opencodeAdapter,
41
+ parseClaudeUsagePayload,
31
42
  parseCursorRunnerLine,
32
43
  parseSessionQuotaResetAt,
33
44
  permissionMode,
@@ -38,12 +49,12 @@ import {
38
49
  resolveQuotaFallbackAgent,
39
50
  turnCostUsdFromCursorUsage,
40
51
  whichOnPath
41
- } from "./chunk-PQBRCBIE.js";
42
- import "./chunk-6YTI2HBG.js";
52
+ } from "./chunk-DU2ICKLA.js";
53
+ import "./chunk-S4EEYOSU.js";
43
54
  import "./chunk-3OHR73VK.js";
44
55
  import "./chunk-Y4MIXGPA.js";
45
56
  import "./chunk-VKQGAWHY.js";
46
- import "./chunk-DP4TKAMZ.js";
57
+ import "./chunk-QFABSE3Q.js";
47
58
  import "./chunk-D6JWYJ4P.js";
48
59
  import "./chunk-CJFBSQIB.js";
49
60
  import "./chunk-SYFVUF2C.js";
@@ -61,7 +72,7 @@ import {
61
72
  assertOrchestratorCapableAgent,
62
73
  coerceOrchestratorAgent,
63
74
  isOrchestratorCapableAgent
64
- } from "./chunk-AH6WIBLY.js";
75
+ } from "./chunk-HQKGK4KO.js";
65
76
  import "./chunk-NSTQ6QKD.js";
66
77
  import "./chunk-KGZBYWZ3.js";
67
78
  import "./chunk-EQNRWDLN.js";
@@ -74,6 +85,7 @@ export {
74
85
  assertOrchestratorCapableAgent,
75
86
  brightsyAdapter,
76
87
  claudeAdapter,
88
+ claudeUsageOverLimitWindows,
77
89
  codexAdapter,
78
90
  coerceOrchestratorAgent,
79
91
  conductorBundledBinDir,
@@ -83,8 +95,17 @@ export {
83
95
  encodeBrightsyTarget,
84
96
  enrichPathWithNpmGlobalBin,
85
97
  ensureAgentPath,
98
+ formatClaudeExtraUsageDetail,
99
+ formatClaudeUsageCompact,
100
+ formatClaudeUsageFetchedAt,
101
+ formatClaudeUsageOverLimitConfirm,
102
+ formatClaudeUsageReset,
103
+ formatClaudeUsageResetClock,
104
+ formatClaudeUsageTooltip,
86
105
  getAdapter,
87
106
  getAgentSetupInfo,
107
+ getClaudePlanUsage,
108
+ hottestClaudeWindow,
88
109
  installAgent,
89
110
  installNpmGlobalPackage,
90
111
  isConductorBundledCli,
@@ -102,6 +123,7 @@ export {
102
123
  mcpStatusThinkingFromClaudeInit,
103
124
  openInSystemTerminal,
104
125
  opencodeAdapter,
126
+ parseClaudeUsagePayload,
105
127
  parseCursorRunnerLine,
106
128
  parseSessionQuotaResetAt,
107
129
  permissionMode,
@@ -22,6 +22,7 @@ import {
22
22
  childEnvWithAppSettings,
23
23
  claudeChromeEnabled,
24
24
  claudeUserSettingsPath,
25
+ confirmClaudeUsageOverLimitEnabled,
25
26
  cowboyModeEnabled,
26
27
  deleteBranchOnPurgeEnabled,
27
28
  disconnectAbleTimeConnection,
@@ -86,7 +87,7 @@ import {
86
87
  updateOpencodeSettings,
87
88
  updateProjectProfileSettings,
88
89
  writeViewerContext
89
- } from "./chunk-AH6WIBLY.js";
90
+ } from "./chunk-HQKGK4KO.js";
90
91
  import "./chunk-NSTQ6QKD.js";
91
92
  import "./chunk-KGZBYWZ3.js";
92
93
  import "./chunk-EQNRWDLN.js";
@@ -113,6 +114,7 @@ export {
113
114
  childEnvWithAppSettings,
114
115
  claudeChromeEnabled,
115
116
  claudeUserSettingsPath,
117
+ confirmClaudeUsageOverLimitEnabled,
116
118
  cowboyModeEnabled,
117
119
  deleteBranchOnPurgeEnabled,
118
120
  disconnectAbleTimeConnection,
@@ -20,6 +20,7 @@ import {
20
20
  childEnvWithAppSettings,
21
21
  claudeChromeEnabled,
22
22
  claudeUserSettingsPath,
23
+ confirmClaudeUsageOverLimitEnabled,
23
24
  cowboyModeEnabled,
24
25
  deleteBranchOnPurgeEnabled,
25
26
  disconnectAbleTimeConnection,
@@ -84,7 +85,7 @@ import {
84
85
  updateOpencodeSettings,
85
86
  updateProjectProfileSettings,
86
87
  writeViewerContext
87
- } from "./chunk-S5GLSRLP.js";
88
+ } from "./chunk-2IQ6W47G.js";
88
89
  import "./chunk-4TR3HZFT.js";
89
90
  import "./chunk-WDRMZKVB.js";
90
91
  import "./chunk-JT7R45JB.js";
@@ -112,6 +113,7 @@ export {
112
113
  childEnvWithAppSettings,
113
114
  claudeChromeEnabled,
114
115
  claudeUserSettingsPath,
116
+ confirmClaudeUsageOverLimitEnabled,
115
117
  cowboyModeEnabled,
116
118
  deleteBranchOnPurgeEnabled,
117
119
  disconnectAbleTimeConnection,
@@ -753,6 +753,9 @@ function normalizeAdvanced(raw) {
753
753
  if (typeof source.showCost === "boolean") {
754
754
  out.showCost = source.showCost;
755
755
  }
756
+ if (typeof source.confirmClaudeUsageOverLimit === "boolean") {
757
+ out.confirmClaudeUsageOverLimit = source.confirmClaudeUsageOverLimit;
758
+ }
756
759
  if (typeof source.autoArchiveOnMerge === "boolean") {
757
760
  out.autoArchiveOnMerge = source.autoArchiveOnMerge;
758
761
  }
@@ -1628,6 +1631,9 @@ function updateAdvancedSettings(patch) {
1628
1631
  if (typeof patch.showCost === "boolean") {
1629
1632
  advanced.showCost = patch.showCost;
1630
1633
  }
1634
+ if (typeof patch.confirmClaudeUsageOverLimit === "boolean") {
1635
+ advanced.confirmClaudeUsageOverLimit = patch.confirmClaudeUsageOverLimit;
1636
+ }
1631
1637
  if (typeof patch.autoArchiveOnMerge === "boolean") {
1632
1638
  advanced.autoArchiveOnMerge = patch.autoArchiveOnMerge;
1633
1639
  }
@@ -1690,6 +1696,9 @@ function cowboyModeEnabled(settings = loadAppSettings()) {
1690
1696
  function showCostEnabled(settings = loadAppSettings()) {
1691
1697
  return Boolean(settings.advanced.showCost);
1692
1698
  }
1699
+ function confirmClaudeUsageOverLimitEnabled(settings = loadAppSettings()) {
1700
+ return Boolean(settings.advanced.confirmClaudeUsageOverLimit);
1701
+ }
1693
1702
  function autoArchiveOnMergeEnabled(settings = loadAppSettings()) {
1694
1703
  return Boolean(settings.advanced.autoArchiveOnMerge);
1695
1704
  }
@@ -1888,6 +1897,7 @@ export {
1888
1897
  deleteBranchOnPurgeEnabled,
1889
1898
  cowboyModeEnabled,
1890
1899
  showCostEnabled,
1900
+ confirmClaudeUsageOverLimitEnabled,
1891
1901
  autoArchiveOnMergeEnabled,
1892
1902
  autoCleanupOrphansEnabled,
1893
1903
  orchestrationQuotaOnLimit,
@@ -5,7 +5,7 @@ import {
5
5
  resolveRepoRoot,
6
6
  takenSlugsFromThread,
7
7
  teamSlugFromName
8
- } from "./chunk-S4QCBBXS.js";
8
+ } from "./chunk-DU4ID3DA.js";
9
9
  import {
10
10
  ATTACHMENTS_DIR,
11
11
  attachmentsGitignoreBody
@@ -22,7 +22,7 @@ import {
22
22
  resolveThreadDefaults,
23
23
  resolveViewerProfile,
24
24
  resolveViewerProfileForRepo
25
- } from "./chunk-S5GLSRLP.js";
25
+ } from "./chunk-2IQ6W47G.js";
26
26
  import {
27
27
  createEmptyThread,
28
28
  listThreads,
@@ -6,7 +6,7 @@ import {
6
6
  getAbleTimeHost,
7
7
  isAbleTimeConnected,
8
8
  saveAbleTimeConnection
9
- } from "./chunk-S5GLSRLP.js";
9
+ } from "./chunk-2IQ6W47G.js";
10
10
 
11
11
  // src/integrations/abletime-mcp.ts
12
12
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -207,11 +207,20 @@ function looksLikeInvalidAgentSession(text) {
207
207
  if (!lower) return false;
208
208
  return /session not found/.test(lower) || /no conversation found/.test(lower) || /conversation .+ not found/.test(lower) || /thread .+ not found/.test(lower) || /unknown session/.test(lower) || /invalid session/.test(lower) || /session .+ (missing|expired|deleted|gone)/.test(lower) || /cannot resume/.test(lower) || /failed to (load|resume|open) session/.test(lower) || /corrupt local agent checkpoint/.test(lower) || /missing root blob/.test(lower) || /\bagent\b.{0,120}\bnot found\b/.test(lower) || /\brun\b.{0,80}\bnot found for agent\b/.test(lower);
209
209
  }
210
+ function looksLikeCursorHttp2StreamClose(text) {
211
+ return /nghttp2/i.test(text.trim());
212
+ }
213
+ function looksLikeBrightsyEmptyCompletion(text) {
214
+ const core = text.trim().replace(/^exit\s*\d+:\s*/i, "").replace(/^error:\s*/i, "").trim();
215
+ return /^i did not receive a valid model response\. please try again\.$/i.test(core);
216
+ }
210
217
  function looksLikeRetryableRunnerCrash(text) {
211
218
  if (looksLikeAgentFailureMessage(text)) return false;
212
219
  if (looksLikeInvalidAgentSession(text)) return false;
213
220
  if (looksLikeV8Oom(text)) return false;
214
221
  if (looksLikeHugeToolResultDump(text)) return true;
222
+ if (looksLikeCursorHttp2StreamClose(text)) return true;
223
+ if (looksLikeBrightsyEmptyCompletion(text)) return true;
215
224
  const lower = text.trim().toLowerCase();
216
225
  if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
217
226
  if (!lower) return true;
@@ -284,9 +293,12 @@ function humanizeAgentFailDetail(detail) {
284
293
  if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
285
294
  return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
286
295
  }
287
- if (/connection stalled/.test(lower)) {
296
+ if (/connection stalled/.test(lower) || looksLikeCursorHttp2StreamClose(raw)) {
288
297
  return /retry the turn/i.test(raw) ? raw : `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
289
298
  }
299
+ if (looksLikeBrightsyEmptyCompletion(raw)) {
300
+ return /retry the turn/i.test(raw) ? raw : `${raw} \u2014 retry the turn (Brightsy returned an empty model completion).`;
301
+ }
290
302
  if (/network request failed|cursor startup failed:.+\(retryable\)/.test(lower)) {
291
303
  return /retry the turn/i.test(raw) ? raw : `${raw} \u2014 retry the turn (a transient Cursor SDK network error).`;
292
304
  }
@@ -1098,6 +1110,8 @@ export {
1098
1110
  looksLikeV8Oom,
1099
1111
  summarizeTurnStderr,
1100
1112
  looksLikeInvalidAgentSession,
1113
+ looksLikeCursorHttp2StreamClose,
1114
+ looksLikeBrightsyEmptyCompletion,
1101
1115
  shouldRetryFailedAgentTurn,
1102
1116
  looksLikeAgentFailureMessage,
1103
1117
  fallbackTurnFailDetail,