@sideboard-ai/core 0.1.110 → 0.1.111
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.
- package/dist/agents/cursor-runner.cjs +3 -3
- package/dist/agents/cursor-runner.js +1 -1
- package/dist/{agents-MQDW3YXL.js → agents-GH3FWDW2.js} +1 -1
- package/dist/{agents-WK54VP7J.js → agents-NN22A4G5.js} +2 -2
- package/dist/{chunk-3UOKB6VQ.js → chunk-363Z34PY.js} +32 -12
- package/dist/{chunk-EAAB4EK5.js → chunk-DMJKOFTO.js} +9 -5
- package/dist/{chunk-XOZDAVOP.js → chunk-JTQQPJAU.js} +8 -4
- package/dist/{chunk-VOJSO3RM.js → chunk-KVFNTWFG.js} +34 -14
- package/dist/{chunk-RSIWPLRG.js → chunk-NC3U42ZP.js} +1 -1
- package/dist/index.cjs +44 -22
- package/dist/index.js +3 -3
- package/dist/mcp/run-stdio.cjs +44 -22
- package/dist/mcp/run-stdio.js +2 -2
- package/dist/{orchestrator-SCATSB3O.js → orchestrator-4T2SXDZ7.js} +2 -2
- package/dist/{orchestrator-FCZVCKBK.js → orchestrator-EP57AB5W.js} +3 -3
- package/package.json +1 -1
|
@@ -58,7 +58,6 @@ function appDataDir() {
|
|
|
58
58
|
var import_node_fs8 = require("fs");
|
|
59
59
|
var import_node_module = require("module");
|
|
60
60
|
var import_node_path9 = require("path");
|
|
61
|
-
var import_node_url = require("url");
|
|
62
61
|
|
|
63
62
|
// src/agents/node-launch.ts
|
|
64
63
|
var import_node_fs7 = require("fs");
|
|
@@ -111,7 +110,6 @@ function nodeReadableScriptPath(scriptPath) {
|
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
// src/agents/cursor-ripgrep.ts
|
|
114
|
-
var import_meta = {};
|
|
115
113
|
var RIPGREP_ENV = "CURSOR_RIPGREP_PATH";
|
|
116
114
|
function rgBinaryName() {
|
|
117
115
|
return process.platform === "win32" ? "rg.exe" : "rg";
|
|
@@ -158,7 +156,9 @@ function resolveCursorRipgrepPath(opts) {
|
|
|
158
156
|
packagedCursorRipgrepCandidate(platformRipgrepPackage(), rgBinaryName())
|
|
159
157
|
);
|
|
160
158
|
if (fromPackaged) return fromPackaged;
|
|
161
|
-
const start = opts?.startFile?.trim() || process.argv[1] ||
|
|
159
|
+
const start = opts?.startFile?.trim() || process.argv[1] || // CJS bundle only — ESM has no __filename; argv[1] is the running script.
|
|
160
|
+
// eslint-disable-next-line camelcase
|
|
161
|
+
(typeof __filename !== "undefined" ? __filename : "");
|
|
162
162
|
return walkForBundledRipgrep(start) ?? requireResolveBundledRipgrep(start);
|
|
163
163
|
}
|
|
164
164
|
function ensureCursorRipgrepPath(opts) {
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
resolveCursorModelId,
|
|
29
29
|
resolveLoginCommand,
|
|
30
30
|
resolveQuotaFallbackAgent
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NC3U42ZP.js";
|
|
32
32
|
import "./chunk-2GO3YKBA.js";
|
|
33
33
|
import {
|
|
34
34
|
ORCHESTRATOR_AGENT_KINDS,
|
|
@@ -40,7 +40,7 @@ import "./chunk-KQBI5HNT.js";
|
|
|
40
40
|
import {
|
|
41
41
|
cursorSdkMessageToEvents,
|
|
42
42
|
parseCursorRunnerLine
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-363Z34PY.js";
|
|
44
44
|
import "./chunk-C4KHDW3U.js";
|
|
45
45
|
import "./chunk-FKOIHGKV.js";
|
|
46
46
|
import "./chunk-4NR5FL46.js";
|
|
@@ -52,7 +52,7 @@ function extractJsonErrorMessage(obj) {
|
|
|
52
52
|
var NODE_VERSION_FOOTER = /^Node\.js v\d+/i;
|
|
53
53
|
function isPinnedStderrLine(line) {
|
|
54
54
|
if (/^\s*at\s/.test(line)) return false;
|
|
55
|
-
return /cannot find (?:package|module)|ERR_MODULE_NOT_FOUND|cursor startup failed
|
|
55
|
+
return /cannot find (?:package|module)|ERR_MODULE_NOT_FOUND|cursor startup failed:|FATAL ERROR|heap out of memory|javascript heap|OOMErrorHandler|FatalProcessOutOfMemory/i.test(
|
|
56
56
|
line
|
|
57
57
|
);
|
|
58
58
|
}
|
|
@@ -75,15 +75,22 @@ function looksLikeMinifiedJsDump(line) {
|
|
|
75
75
|
function looksLikeNestedElectronCrash(line) {
|
|
76
76
|
return /HasCustomHostObject|ElectronInitializeICUandStartNode/i.test(line);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
function looksLikeNativeEventLoopCrash(text) {
|
|
79
|
+
return /uv_run|uv__io_poll|SpinEventLoopInternal/i.test(text);
|
|
80
|
+
}
|
|
81
|
+
function looksLikeV8Oom(text) {
|
|
82
|
+
return /javascript heap|reached heap limit|OOMErrorHandler|FatalProcessOutOfMemory|Allocation failed - JavaScript heap/i.test(
|
|
83
|
+
text
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function looksLikeHomebrewLibuvCrash(text) {
|
|
87
|
+
if (!looksLikeNativeEventLoopCrash(text)) return false;
|
|
88
|
+
return /Cellar\/(?:libuv|node)|libuv\.\d+\.dylib/i.test(text);
|
|
84
89
|
}
|
|
85
90
|
var NESTED_ELECTRON_SUMMARY = "Cursor local agent crashed at Electron startup (nested Chromium / HasCustomHostObject)";
|
|
86
91
|
var HOMEBREW_LIBUV_SUMMARY = "Cursor runner crashed in Node (Homebrew Node + shared libuv). Install Node 22 LTS (`brew install node@22`) and retry.";
|
|
92
|
+
var BUNDLED_NODE_CRASH_SUMMARY = "Cursor runner crashed in Node. Retry the turn.";
|
|
93
|
+
var V8_OOM_SUMMARY = "Cursor runner ran out of memory (JavaScript heap). Retry; if it keeps happening, exclude large files from the project folder or start a new chat.";
|
|
87
94
|
var MINIFIED_DUMP_SUMMARY = "Cursor local agent crashed during startup (truncated crash dump)";
|
|
88
95
|
function clipStderr(text, maxChars) {
|
|
89
96
|
const trimmed = text.trim();
|
|
@@ -97,7 +104,12 @@ function summarizeTurnStderr(tail, maxChars = 500) {
|
|
|
97
104
|
const cursorRunFailed = [...tail].reverse().find((line) => /^cursor run failed\b/i.test(line.trim()));
|
|
98
105
|
if (cursorRunFailed) return clipStderr(cursorRunFailed, maxChars);
|
|
99
106
|
if (tail.some(looksLikeNestedElectronCrash)) return NESTED_ELECTRON_SUMMARY;
|
|
100
|
-
|
|
107
|
+
const blob = tail.join("\n");
|
|
108
|
+
if (looksLikeV8Oom(blob)) return V8_OOM_SUMMARY;
|
|
109
|
+
if (looksLikeHomebrewLibuvCrash(blob)) return HOMEBREW_LIBUV_SUMMARY;
|
|
110
|
+
if (looksLikeNativeEventLoopCrash(blob)) {
|
|
111
|
+
return BUNDLED_NODE_CRASH_SUMMARY;
|
|
112
|
+
}
|
|
101
113
|
if (tail.some(
|
|
102
114
|
(line) => /\[resource_exhausted\]|resource_exhausted/i.test(line) || /findFilesWithRipgrep/.test(line)
|
|
103
115
|
)) {
|
|
@@ -123,10 +135,11 @@ function looksLikeInvalidAgentSession(text) {
|
|
|
123
135
|
function looksLikeRetryableRunnerCrash(text) {
|
|
124
136
|
if (looksLikeAgentFailureMessage(text)) return false;
|
|
125
137
|
if (looksLikeInvalidAgentSession(text)) return false;
|
|
138
|
+
if (looksLikeV8Oom(text)) return false;
|
|
126
139
|
const lower = text.trim().toLowerCase();
|
|
127
140
|
if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
|
|
128
141
|
if (!lower) return true;
|
|
129
|
-
return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|connection stalled|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
|
|
142
|
+
return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|cursor runner crashed in node|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|connection stalled|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
|
|
130
143
|
lower
|
|
131
144
|
);
|
|
132
145
|
}
|
|
@@ -178,9 +191,15 @@ function humanizeAgentFailDetail(detail) {
|
|
|
178
191
|
if (/hascustomhostobject|electroninitializeicuandstartnode|nested chromium/i.test(lower)) {
|
|
179
192
|
return `${raw} \u2014 retry the turn; if it keeps failing, pick another agent.`;
|
|
180
193
|
}
|
|
181
|
-
if (/
|
|
194
|
+
if (looksLikeV8Oom(raw) || /javascript heap out of memory/i.test(lower)) {
|
|
195
|
+
return /ran out of memory/i.test(raw) ? raw : V8_OOM_SUMMARY;
|
|
196
|
+
}
|
|
197
|
+
if (/homebrew node \+ shared libuv|Cellar\/(?:libuv|node)|libuv\.\d+\.dylib/i.test(raw)) {
|
|
182
198
|
return /brew install node@22/i.test(raw) ? raw : `${raw} \u2014 install Node 22 LTS (\`brew install node@22\`) and retry.`;
|
|
183
199
|
}
|
|
200
|
+
if (/uv_run|spineventloopinternal|uv__io_poll|cursor runner crashed in node/i.test(lower)) {
|
|
201
|
+
return /retry the turn/i.test(raw) ? raw : BUNDLED_NODE_CRASH_SUMMARY;
|
|
202
|
+
}
|
|
184
203
|
if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
|
|
185
204
|
return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
|
|
186
205
|
}
|
|
@@ -423,7 +442,6 @@ function parseCursorRunnerLine(line) {
|
|
|
423
442
|
import { existsSync as existsSync3 } from "fs";
|
|
424
443
|
import { createRequire } from "module";
|
|
425
444
|
import { dirname, isAbsolute, join as join3, parse, resolve as resolvePath } from "path";
|
|
426
|
-
import { fileURLToPath } from "url";
|
|
427
445
|
|
|
428
446
|
// src/agents/node-launch.ts
|
|
429
447
|
import { existsSync as existsSync2, readdirSync, realpathSync } from "fs";
|
|
@@ -685,7 +703,9 @@ function resolveCursorRipgrepPath(opts) {
|
|
|
685
703
|
packagedCursorRipgrepCandidate(platformRipgrepPackage(), rgBinaryName())
|
|
686
704
|
);
|
|
687
705
|
if (fromPackaged) return fromPackaged;
|
|
688
|
-
const start = opts?.startFile?.trim() || process.argv[1] ||
|
|
706
|
+
const start = opts?.startFile?.trim() || process.argv[1] || // CJS bundle only — ESM has no __filename; argv[1] is the running script.
|
|
707
|
+
// eslint-disable-next-line camelcase
|
|
708
|
+
(typeof __filename !== "undefined" ? __filename : "");
|
|
689
709
|
return walkForBundledRipgrep(start) ?? requireResolveBundledRipgrep(start);
|
|
690
710
|
}
|
|
691
711
|
function cursorRipgrepEnv(opts) {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
resolveQuotaFallbackAgent,
|
|
16
16
|
stripBrightsyNdjsonNoise,
|
|
17
17
|
toolDescription
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NC3U42ZP.js";
|
|
19
19
|
import {
|
|
20
20
|
addWorkspace,
|
|
21
21
|
ensureWorkspace,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
shouldRetryFailedAgentTurn,
|
|
60
60
|
summarizeTurnStderr,
|
|
61
61
|
turnFailChatText
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-363Z34PY.js";
|
|
63
63
|
import {
|
|
64
64
|
releaseCaffeinateHoldForThread
|
|
65
65
|
} from "./chunk-DCOZABNT.js";
|
|
@@ -2448,7 +2448,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
2448
2448
|
return readThread(thread.id) ?? thread;
|
|
2449
2449
|
}
|
|
2450
2450
|
async function listLinearIssues(agent, repoPath) {
|
|
2451
|
-
const { getAdapter: getAdapter2 } = await import("./agents-
|
|
2451
|
+
const { getAdapter: getAdapter2 } = await import("./agents-NN22A4G5.js");
|
|
2452
2452
|
await requireAgent(agent, { requireLinear: true });
|
|
2453
2453
|
const adapter = getAdapter2(agent);
|
|
2454
2454
|
if (!adapter.listLinearIssues) {
|
|
@@ -2760,8 +2760,12 @@ var CONDUCTOR_APP_SUPPORT = join9(
|
|
|
2760
2760
|
);
|
|
2761
2761
|
var CONDUCTOR_DB = join9(CONDUCTOR_APP_SUPPORT, "conductor.db");
|
|
2762
2762
|
var CURSOR_SDK_STORE = join9(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
|
|
2763
|
+
function thisModuleFile() {
|
|
2764
|
+
const cjsFile = typeof __filename !== "undefined" ? __filename : "";
|
|
2765
|
+
return cjsFile || process.argv[1] || join9(process.cwd(), "package.json");
|
|
2766
|
+
}
|
|
2763
2767
|
function openReadonlySqlite(file) {
|
|
2764
|
-
const req = createRequire(
|
|
2768
|
+
const req = createRequire(thisModuleFile());
|
|
2765
2769
|
const Database = req("better-sqlite3");
|
|
2766
2770
|
return new Database(file, { readonly: true, fileMustExist: true });
|
|
2767
2771
|
}
|
|
@@ -5105,7 +5109,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
5105
5109
|
${prompt}`;
|
|
5106
5110
|
}
|
|
5107
5111
|
async function defaultDeps() {
|
|
5108
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
5112
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-EP57AB5W.js");
|
|
5109
5113
|
const orch = getOrchestrator2();
|
|
5110
5114
|
return {
|
|
5111
5115
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
summarizeTurnStderr,
|
|
25
25
|
toolDescription,
|
|
26
26
|
turnFailChatText
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KVFNTWFG.js";
|
|
28
28
|
import {
|
|
29
29
|
addWorkspace,
|
|
30
30
|
ensureWorkspace,
|
|
@@ -2398,7 +2398,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
2398
2398
|
return readThread(thread.id) ?? thread;
|
|
2399
2399
|
}
|
|
2400
2400
|
async function listLinearIssues(agent, repoPath) {
|
|
2401
|
-
const { getAdapter: getAdapter2 } = await import("./agents-
|
|
2401
|
+
const { getAdapter: getAdapter2 } = await import("./agents-GH3FWDW2.js");
|
|
2402
2402
|
await requireAgent(agent, { requireLinear: true });
|
|
2403
2403
|
const adapter = getAdapter2(agent);
|
|
2404
2404
|
if (!adapter.listLinearIssues) {
|
|
@@ -2710,8 +2710,12 @@ var CONDUCTOR_APP_SUPPORT = join9(
|
|
|
2710
2710
|
);
|
|
2711
2711
|
var CONDUCTOR_DB = join9(CONDUCTOR_APP_SUPPORT, "conductor.db");
|
|
2712
2712
|
var CURSOR_SDK_STORE = join9(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
|
|
2713
|
+
function thisModuleFile() {
|
|
2714
|
+
const cjsFile = typeof __filename !== "undefined" ? __filename : "";
|
|
2715
|
+
return cjsFile || process.argv[1] || join9(process.cwd(), "package.json");
|
|
2716
|
+
}
|
|
2713
2717
|
function openReadonlySqlite(file) {
|
|
2714
|
-
const req = createRequire(
|
|
2718
|
+
const req = createRequire(thisModuleFile());
|
|
2715
2719
|
const Database = req("better-sqlite3");
|
|
2716
2720
|
return new Database(file, { readonly: true, fileMustExist: true });
|
|
2717
2721
|
}
|
|
@@ -4929,7 +4933,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
4929
4933
|
${prompt}`;
|
|
4930
4934
|
}
|
|
4931
4935
|
async function defaultDeps() {
|
|
4932
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
4936
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-4T2SXDZ7.js");
|
|
4933
4937
|
const orch = getOrchestrator2();
|
|
4934
4938
|
return {
|
|
4935
4939
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -159,7 +159,7 @@ function extractJsonErrorMessage(obj) {
|
|
|
159
159
|
var NODE_VERSION_FOOTER = /^Node\.js v\d+/i;
|
|
160
160
|
function isPinnedStderrLine(line) {
|
|
161
161
|
if (/^\s*at\s/.test(line)) return false;
|
|
162
|
-
return /cannot find (?:package|module)|ERR_MODULE_NOT_FOUND|cursor startup failed
|
|
162
|
+
return /cannot find (?:package|module)|ERR_MODULE_NOT_FOUND|cursor startup failed:|FATAL ERROR|heap out of memory|javascript heap|OOMErrorHandler|FatalProcessOutOfMemory/i.test(
|
|
163
163
|
line
|
|
164
164
|
);
|
|
165
165
|
}
|
|
@@ -182,15 +182,22 @@ function looksLikeMinifiedJsDump(line) {
|
|
|
182
182
|
function looksLikeNestedElectronCrash(line) {
|
|
183
183
|
return /HasCustomHostObject|ElectronInitializeICUandStartNode/i.test(line);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
185
|
+
function looksLikeNativeEventLoopCrash(text) {
|
|
186
|
+
return /uv_run|uv__io_poll|SpinEventLoopInternal/i.test(text);
|
|
187
|
+
}
|
|
188
|
+
function looksLikeV8Oom(text) {
|
|
189
|
+
return /javascript heap|reached heap limit|OOMErrorHandler|FatalProcessOutOfMemory|Allocation failed - JavaScript heap/i.test(
|
|
190
|
+
text
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
function looksLikeHomebrewLibuvCrash(text) {
|
|
194
|
+
if (!looksLikeNativeEventLoopCrash(text)) return false;
|
|
195
|
+
return /Cellar\/(?:libuv|node)|libuv\.\d+\.dylib/i.test(text);
|
|
191
196
|
}
|
|
192
197
|
var NESTED_ELECTRON_SUMMARY = "Cursor local agent crashed at Electron startup (nested Chromium / HasCustomHostObject)";
|
|
193
198
|
var HOMEBREW_LIBUV_SUMMARY = "Cursor runner crashed in Node (Homebrew Node + shared libuv). Install Node 22 LTS (`brew install node@22`) and retry.";
|
|
199
|
+
var BUNDLED_NODE_CRASH_SUMMARY = "Cursor runner crashed in Node. Retry the turn.";
|
|
200
|
+
var V8_OOM_SUMMARY = "Cursor runner ran out of memory (JavaScript heap). Retry; if it keeps happening, exclude large files from the project folder or start a new chat.";
|
|
194
201
|
var MINIFIED_DUMP_SUMMARY = "Cursor local agent crashed during startup (truncated crash dump)";
|
|
195
202
|
function clipStderr(text, maxChars) {
|
|
196
203
|
const trimmed = text.trim();
|
|
@@ -204,7 +211,12 @@ function summarizeTurnStderr(tail, maxChars = 500) {
|
|
|
204
211
|
const cursorRunFailed = [...tail].reverse().find((line) => /^cursor run failed\b/i.test(line.trim()));
|
|
205
212
|
if (cursorRunFailed) return clipStderr(cursorRunFailed, maxChars);
|
|
206
213
|
if (tail.some(looksLikeNestedElectronCrash)) return NESTED_ELECTRON_SUMMARY;
|
|
207
|
-
|
|
214
|
+
const blob = tail.join("\n");
|
|
215
|
+
if (looksLikeV8Oom(blob)) return V8_OOM_SUMMARY;
|
|
216
|
+
if (looksLikeHomebrewLibuvCrash(blob)) return HOMEBREW_LIBUV_SUMMARY;
|
|
217
|
+
if (looksLikeNativeEventLoopCrash(blob)) {
|
|
218
|
+
return BUNDLED_NODE_CRASH_SUMMARY;
|
|
219
|
+
}
|
|
208
220
|
if (tail.some(
|
|
209
221
|
(line) => /\[resource_exhausted\]|resource_exhausted/i.test(line) || /findFilesWithRipgrep/.test(line)
|
|
210
222
|
)) {
|
|
@@ -230,10 +242,11 @@ function looksLikeInvalidAgentSession(text) {
|
|
|
230
242
|
function looksLikeRetryableRunnerCrash(text) {
|
|
231
243
|
if (looksLikeAgentFailureMessage(text)) return false;
|
|
232
244
|
if (looksLikeInvalidAgentSession(text)) return false;
|
|
245
|
+
if (looksLikeV8Oom(text)) return false;
|
|
233
246
|
const lower = text.trim().toLowerCase();
|
|
234
247
|
if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
|
|
235
248
|
if (!lower) return true;
|
|
236
|
-
return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|connection stalled|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
|
|
249
|
+
return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|cursor runner crashed in node|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|connection stalled|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
|
|
237
250
|
lower
|
|
238
251
|
);
|
|
239
252
|
}
|
|
@@ -285,9 +298,15 @@ function humanizeAgentFailDetail(detail) {
|
|
|
285
298
|
if (/hascustomhostobject|electroninitializeicuandstartnode|nested chromium/i.test(lower)) {
|
|
286
299
|
return `${raw} \u2014 retry the turn; if it keeps failing, pick another agent.`;
|
|
287
300
|
}
|
|
288
|
-
if (/
|
|
301
|
+
if (looksLikeV8Oom(raw) || /javascript heap out of memory/i.test(lower)) {
|
|
302
|
+
return /ran out of memory/i.test(raw) ? raw : V8_OOM_SUMMARY;
|
|
303
|
+
}
|
|
304
|
+
if (/homebrew node \+ shared libuv|Cellar\/(?:libuv|node)|libuv\.\d+\.dylib/i.test(raw)) {
|
|
289
305
|
return /brew install node@22/i.test(raw) ? raw : `${raw} \u2014 install Node 22 LTS (\`brew install node@22\`) and retry.`;
|
|
290
306
|
}
|
|
307
|
+
if (/uv_run|spineventloopinternal|uv__io_poll|cursor runner crashed in node/i.test(lower)) {
|
|
308
|
+
return /retry the turn/i.test(raw) ? raw : BUNDLED_NODE_CRASH_SUMMARY;
|
|
309
|
+
}
|
|
291
310
|
if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
|
|
292
311
|
return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
|
|
293
312
|
}
|
|
@@ -2244,7 +2263,7 @@ var codexAdapter = {
|
|
|
2244
2263
|
import { existsSync as existsSync8 } from "fs";
|
|
2245
2264
|
import { createRequire as createRequire3 } from "module";
|
|
2246
2265
|
import { dirname as dirname3, join as join6 } from "path";
|
|
2247
|
-
import { fileURLToPath as
|
|
2266
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
2248
2267
|
import { Cursor } from "@cursor/sdk";
|
|
2249
2268
|
|
|
2250
2269
|
// src/agents/cursor-events.ts
|
|
@@ -2420,7 +2439,6 @@ function parseCursorRunnerLine(line) {
|
|
|
2420
2439
|
import { existsSync as existsSync7 } from "fs";
|
|
2421
2440
|
import { createRequire as createRequire2 } from "module";
|
|
2422
2441
|
import { dirname as dirname2, isAbsolute, join as join5, parse, resolve as resolvePath } from "path";
|
|
2423
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
2424
2442
|
var RIPGREP_ENV = "CURSOR_RIPGREP_PATH";
|
|
2425
2443
|
function rgBinaryName() {
|
|
2426
2444
|
return process.platform === "win32" ? "rg.exe" : "rg";
|
|
@@ -2467,7 +2485,9 @@ function resolveCursorRipgrepPath(opts) {
|
|
|
2467
2485
|
packagedCursorRipgrepCandidate(platformRipgrepPackage(), rgBinaryName())
|
|
2468
2486
|
);
|
|
2469
2487
|
if (fromPackaged) return fromPackaged;
|
|
2470
|
-
const start = opts?.startFile?.trim() || process.argv[1] ||
|
|
2488
|
+
const start = opts?.startFile?.trim() || process.argv[1] || // CJS bundle only — ESM has no __filename; argv[1] is the running script.
|
|
2489
|
+
// eslint-disable-next-line camelcase
|
|
2490
|
+
(typeof __filename !== "undefined" ? __filename : "");
|
|
2471
2491
|
return walkForBundledRipgrep(start) ?? requireResolveBundledRipgrep(start);
|
|
2472
2492
|
}
|
|
2473
2493
|
function cursorRipgrepEnv(opts) {
|
|
@@ -2521,7 +2541,7 @@ function entryDir() {
|
|
|
2521
2541
|
const cjsDir = typeof __dirname !== "undefined" ? __dirname : "";
|
|
2522
2542
|
if (cjsDir) return cjsDir;
|
|
2523
2543
|
try {
|
|
2524
|
-
return dirname3(
|
|
2544
|
+
return dirname3(fileURLToPath2(import.meta.url));
|
|
2525
2545
|
} catch {
|
|
2526
2546
|
try {
|
|
2527
2547
|
const req = createRequire3(process.cwd() + "/");
|
package/dist/index.cjs
CHANGED
|
@@ -6547,7 +6547,7 @@ function extractJsonErrorMessage(obj) {
|
|
|
6547
6547
|
}
|
|
6548
6548
|
function isPinnedStderrLine(line) {
|
|
6549
6549
|
if (/^\s*at\s/.test(line)) return false;
|
|
6550
|
-
return /cannot find (?:package|module)|ERR_MODULE_NOT_FOUND|cursor startup failed
|
|
6550
|
+
return /cannot find (?:package|module)|ERR_MODULE_NOT_FOUND|cursor startup failed:|FATAL ERROR|heap out of memory|javascript heap|OOMErrorHandler|FatalProcessOutOfMemory/i.test(
|
|
6551
6551
|
line
|
|
6552
6552
|
);
|
|
6553
6553
|
}
|
|
@@ -6570,12 +6570,17 @@ function looksLikeMinifiedJsDump(line) {
|
|
|
6570
6570
|
function looksLikeNestedElectronCrash(line) {
|
|
6571
6571
|
return /HasCustomHostObject|ElectronInitializeICUandStartNode/i.test(line);
|
|
6572
6572
|
}
|
|
6573
|
-
function
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6573
|
+
function looksLikeNativeEventLoopCrash(text4) {
|
|
6574
|
+
return /uv_run|uv__io_poll|SpinEventLoopInternal/i.test(text4);
|
|
6575
|
+
}
|
|
6576
|
+
function looksLikeV8Oom(text4) {
|
|
6577
|
+
return /javascript heap|reached heap limit|OOMErrorHandler|FatalProcessOutOfMemory|Allocation failed - JavaScript heap/i.test(
|
|
6578
|
+
text4
|
|
6579
|
+
);
|
|
6580
|
+
}
|
|
6581
|
+
function looksLikeHomebrewLibuvCrash(text4) {
|
|
6582
|
+
if (!looksLikeNativeEventLoopCrash(text4)) return false;
|
|
6583
|
+
return /Cellar\/(?:libuv|node)|libuv\.\d+\.dylib/i.test(text4);
|
|
6579
6584
|
}
|
|
6580
6585
|
function clipStderr(text4, maxChars) {
|
|
6581
6586
|
const trimmed = text4.trim();
|
|
@@ -6589,7 +6594,12 @@ function summarizeTurnStderr(tail, maxChars = 500) {
|
|
|
6589
6594
|
const cursorRunFailed = [...tail].reverse().find((line) => /^cursor run failed\b/i.test(line.trim()));
|
|
6590
6595
|
if (cursorRunFailed) return clipStderr(cursorRunFailed, maxChars);
|
|
6591
6596
|
if (tail.some(looksLikeNestedElectronCrash)) return NESTED_ELECTRON_SUMMARY;
|
|
6592
|
-
|
|
6597
|
+
const blob = tail.join("\n");
|
|
6598
|
+
if (looksLikeV8Oom(blob)) return V8_OOM_SUMMARY;
|
|
6599
|
+
if (looksLikeHomebrewLibuvCrash(blob)) return HOMEBREW_LIBUV_SUMMARY;
|
|
6600
|
+
if (looksLikeNativeEventLoopCrash(blob)) {
|
|
6601
|
+
return BUNDLED_NODE_CRASH_SUMMARY;
|
|
6602
|
+
}
|
|
6593
6603
|
if (tail.some(
|
|
6594
6604
|
(line) => /\[resource_exhausted\]|resource_exhausted/i.test(line) || /findFilesWithRipgrep/.test(line)
|
|
6595
6605
|
)) {
|
|
@@ -6615,10 +6625,11 @@ function looksLikeInvalidAgentSession(text4) {
|
|
|
6615
6625
|
function looksLikeRetryableRunnerCrash(text4) {
|
|
6616
6626
|
if (looksLikeAgentFailureMessage(text4)) return false;
|
|
6617
6627
|
if (looksLikeInvalidAgentSession(text4)) return false;
|
|
6628
|
+
if (looksLikeV8Oom(text4)) return false;
|
|
6618
6629
|
const lower = text4.trim().toLowerCase();
|
|
6619
6630
|
if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
|
|
6620
6631
|
if (!lower) return true;
|
|
6621
|
-
return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|connection stalled|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
|
|
6632
|
+
return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|cursor runner crashed in node|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|connection stalled|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
|
|
6622
6633
|
lower
|
|
6623
6634
|
);
|
|
6624
6635
|
}
|
|
@@ -6670,9 +6681,15 @@ function humanizeAgentFailDetail(detail) {
|
|
|
6670
6681
|
if (/hascustomhostobject|electroninitializeicuandstartnode|nested chromium/i.test(lower)) {
|
|
6671
6682
|
return `${raw} \u2014 retry the turn; if it keeps failing, pick another agent.`;
|
|
6672
6683
|
}
|
|
6673
|
-
if (/
|
|
6684
|
+
if (looksLikeV8Oom(raw) || /javascript heap out of memory/i.test(lower)) {
|
|
6685
|
+
return /ran out of memory/i.test(raw) ? raw : V8_OOM_SUMMARY;
|
|
6686
|
+
}
|
|
6687
|
+
if (/homebrew node \+ shared libuv|Cellar\/(?:libuv|node)|libuv\.\d+\.dylib/i.test(raw)) {
|
|
6674
6688
|
return /brew install node@22/i.test(raw) ? raw : `${raw} \u2014 install Node 22 LTS (\`brew install node@22\`) and retry.`;
|
|
6675
6689
|
}
|
|
6690
|
+
if (/uv_run|spineventloopinternal|uv__io_poll|cursor runner crashed in node/i.test(lower)) {
|
|
6691
|
+
return /retry the turn/i.test(raw) ? raw : BUNDLED_NODE_CRASH_SUMMARY;
|
|
6692
|
+
}
|
|
6676
6693
|
if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
|
|
6677
6694
|
return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
|
|
6678
6695
|
}
|
|
@@ -6702,13 +6719,15 @@ function formatTurnExitError(exitCode, stderrSummary) {
|
|
|
6702
6719
|
if (looksLikeAgentFailureMessage(raw)) return detail;
|
|
6703
6720
|
return `exit ${code}: ${detail}`;
|
|
6704
6721
|
}
|
|
6705
|
-
var NODE_VERSION_FOOTER, NESTED_ELECTRON_SUMMARY, HOMEBREW_LIBUV_SUMMARY, MINIFIED_DUMP_SUMMARY;
|
|
6722
|
+
var NODE_VERSION_FOOTER, NESTED_ELECTRON_SUMMARY, HOMEBREW_LIBUV_SUMMARY, BUNDLED_NODE_CRASH_SUMMARY, V8_OOM_SUMMARY, MINIFIED_DUMP_SUMMARY;
|
|
6706
6723
|
var init_error_detail = __esm({
|
|
6707
6724
|
"src/agents/error-detail.ts"() {
|
|
6708
6725
|
"use strict";
|
|
6709
6726
|
NODE_VERSION_FOOTER = /^Node\.js v\d+/i;
|
|
6710
6727
|
NESTED_ELECTRON_SUMMARY = "Cursor local agent crashed at Electron startup (nested Chromium / HasCustomHostObject)";
|
|
6711
6728
|
HOMEBREW_LIBUV_SUMMARY = "Cursor runner crashed in Node (Homebrew Node + shared libuv). Install Node 22 LTS (`brew install node@22`) and retry.";
|
|
6729
|
+
BUNDLED_NODE_CRASH_SUMMARY = "Cursor runner crashed in Node. Retry the turn.";
|
|
6730
|
+
V8_OOM_SUMMARY = "Cursor runner ran out of memory (JavaScript heap). Retry; if it keeps happening, exclude large files from the project folder or start a new chat.";
|
|
6712
6731
|
MINIFIED_DUMP_SUMMARY = "Cursor local agent crashed during startup (truncated crash dump)";
|
|
6713
6732
|
}
|
|
6714
6733
|
});
|
|
@@ -9429,24 +9448,24 @@ function resolveCursorRipgrepPath(opts) {
|
|
|
9429
9448
|
packagedCursorRipgrepCandidate(platformRipgrepPackage(), rgBinaryName())
|
|
9430
9449
|
);
|
|
9431
9450
|
if (fromPackaged) return fromPackaged;
|
|
9432
|
-
const start = opts?.startFile?.trim() || process.argv[1] ||
|
|
9451
|
+
const start = opts?.startFile?.trim() || process.argv[1] || // CJS bundle only — ESM has no __filename; argv[1] is the running script.
|
|
9452
|
+
// eslint-disable-next-line camelcase
|
|
9453
|
+
(typeof __filename !== "undefined" ? __filename : "");
|
|
9433
9454
|
return walkForBundledRipgrep(start) ?? requireResolveBundledRipgrep(start);
|
|
9434
9455
|
}
|
|
9435
9456
|
function cursorRipgrepEnv(opts) {
|
|
9436
9457
|
const path2 = resolveCursorRipgrepPath(opts);
|
|
9437
9458
|
return path2 ? { [RIPGREP_ENV]: path2 } : {};
|
|
9438
9459
|
}
|
|
9439
|
-
var import_node_fs26, import_node_module2, import_node_path26,
|
|
9460
|
+
var import_node_fs26, import_node_module2, import_node_path26, RIPGREP_ENV;
|
|
9440
9461
|
var init_cursor_ripgrep = __esm({
|
|
9441
9462
|
"src/agents/cursor-ripgrep.ts"() {
|
|
9442
9463
|
"use strict";
|
|
9443
9464
|
import_node_fs26 = require("fs");
|
|
9444
9465
|
import_node_module2 = require("module");
|
|
9445
9466
|
import_node_path26 = require("path");
|
|
9446
|
-
import_node_url2 = require("url");
|
|
9447
9467
|
init_node_launch();
|
|
9448
9468
|
init_packaged_runtime();
|
|
9449
|
-
import_meta2 = {};
|
|
9450
9469
|
RIPGREP_ENV = "CURSOR_RIPGREP_PATH";
|
|
9451
9470
|
}
|
|
9452
9471
|
});
|
|
@@ -9490,7 +9509,7 @@ function entryDir() {
|
|
|
9490
9509
|
const cjsDir = typeof __dirname !== "undefined" ? __dirname : "";
|
|
9491
9510
|
if (cjsDir) return cjsDir;
|
|
9492
9511
|
try {
|
|
9493
|
-
return (0, import_node_path27.dirname)((0,
|
|
9512
|
+
return (0, import_node_path27.dirname)((0, import_node_url2.fileURLToPath)(import_meta2.url));
|
|
9494
9513
|
} catch {
|
|
9495
9514
|
try {
|
|
9496
9515
|
const req = (0, import_node_module3.createRequire)(process.cwd() + "/");
|
|
@@ -9519,14 +9538,14 @@ function cursorRunnerPath() {
|
|
|
9519
9538
|
}
|
|
9520
9539
|
return candidates[0];
|
|
9521
9540
|
}
|
|
9522
|
-
var import_node_fs27, import_node_module3, import_node_path27,
|
|
9541
|
+
var import_node_fs27, import_node_module3, import_node_path27, import_node_url2, import_sdk, import_meta2, FALLBACK_CURSOR_MODELS, cachedModels, MODEL_CACHE_MS, cursorAdapter;
|
|
9523
9542
|
var init_cursor = __esm({
|
|
9524
9543
|
"src/agents/cursor.ts"() {
|
|
9525
9544
|
"use strict";
|
|
9526
9545
|
import_node_fs27 = require("fs");
|
|
9527
9546
|
import_node_module3 = require("module");
|
|
9528
9547
|
import_node_path27 = require("path");
|
|
9529
|
-
|
|
9548
|
+
import_node_url2 = require("url");
|
|
9530
9549
|
import_sdk = require("@cursor/sdk");
|
|
9531
9550
|
init_run();
|
|
9532
9551
|
init_app_settings();
|
|
@@ -9538,7 +9557,7 @@ var init_cursor = __esm({
|
|
|
9538
9557
|
init_packaged_runtime();
|
|
9539
9558
|
init_turn_input();
|
|
9540
9559
|
init_cursor_events();
|
|
9541
|
-
|
|
9560
|
+
import_meta2 = {};
|
|
9542
9561
|
FALLBACK_CURSOR_MODELS = [
|
|
9543
9562
|
{ id: "default", displayName: "Auto" },
|
|
9544
9563
|
{ id: "composer-2.5", displayName: "Composer 2.5" },
|
|
@@ -12809,8 +12828,12 @@ var init_quota_failover = __esm({
|
|
|
12809
12828
|
});
|
|
12810
12829
|
|
|
12811
12830
|
// src/threads/adopt.ts
|
|
12831
|
+
function thisModuleFile() {
|
|
12832
|
+
const cjsFile = typeof __filename !== "undefined" ? __filename : "";
|
|
12833
|
+
return cjsFile || process.argv[1] || (0, import_node_path33.join)(process.cwd(), "package.json");
|
|
12834
|
+
}
|
|
12812
12835
|
function openReadonlySqlite(file) {
|
|
12813
|
-
const req = (0, import_node_module4.createRequire)(
|
|
12836
|
+
const req = (0, import_node_module4.createRequire)(thisModuleFile());
|
|
12814
12837
|
const Database = req("better-sqlite3");
|
|
12815
12838
|
return new Database(file, { readonly: true, fileMustExist: true });
|
|
12816
12839
|
}
|
|
@@ -13079,7 +13102,7 @@ function importConductorWorkspace(workspaceId) {
|
|
|
13079
13102
|
async function importConductorWorkspaceAsync(workspaceId) {
|
|
13080
13103
|
return importConductorWorkspace(workspaceId);
|
|
13081
13104
|
}
|
|
13082
|
-
var import_node_child_process4, import_node_fs36, import_node_os10, import_node_path33, import_node_module4,
|
|
13105
|
+
var import_node_child_process4, import_node_fs36, import_node_os10, import_node_path33, import_node_module4, CONDUCTOR_APP_SUPPORT, CONDUCTOR_DB, CURSOR_SDK_STORE;
|
|
13083
13106
|
var init_adopt = __esm({
|
|
13084
13107
|
"src/threads/adopt.ts"() {
|
|
13085
13108
|
"use strict";
|
|
@@ -13090,7 +13113,6 @@ var init_adopt = __esm({
|
|
|
13090
13113
|
import_node_module4 = require("module");
|
|
13091
13114
|
init_worktree();
|
|
13092
13115
|
init_thread_store();
|
|
13093
|
-
import_meta4 = {};
|
|
13094
13116
|
CONDUCTOR_APP_SUPPORT = (0, import_node_path33.join)(
|
|
13095
13117
|
process.env.HOME ?? "",
|
|
13096
13118
|
"Library",
|
package/dist/index.js
CHANGED
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
worktreeCleanupSettings,
|
|
171
171
|
wrapReviewSkillMarkdown,
|
|
172
172
|
writeWorktreeFile
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-DMJKOFTO.js";
|
|
174
174
|
import {
|
|
175
175
|
BRIGHTSY_MCP_ALLOWED_TOOLS,
|
|
176
176
|
CLAUDE_MODEL_CATALOG,
|
|
@@ -244,7 +244,7 @@ import {
|
|
|
244
244
|
withEventParentId,
|
|
245
245
|
withEventsParentId,
|
|
246
246
|
writeInjectedMcpConfig
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-NC3U42ZP.js";
|
|
248
248
|
import {
|
|
249
249
|
brightsyConfigPath,
|
|
250
250
|
brightsyMcpServerName,
|
|
@@ -316,7 +316,7 @@ import "./chunk-WIHKHR5R.js";
|
|
|
316
316
|
import {
|
|
317
317
|
cursorSdkMessageToEvents,
|
|
318
318
|
parseCursorRunnerLine
|
|
319
|
-
} from "./chunk-
|
|
319
|
+
} from "./chunk-363Z34PY.js";
|
|
320
320
|
import {
|
|
321
321
|
caffeinateHoldPath,
|
|
322
322
|
getCaffeinateHold,
|
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -1419,7 +1419,7 @@ function extractJsonErrorMessage(obj) {
|
|
|
1419
1419
|
}
|
|
1420
1420
|
function isPinnedStderrLine(line) {
|
|
1421
1421
|
if (/^\s*at\s/.test(line)) return false;
|
|
1422
|
-
return /cannot find (?:package|module)|ERR_MODULE_NOT_FOUND|cursor startup failed
|
|
1422
|
+
return /cannot find (?:package|module)|ERR_MODULE_NOT_FOUND|cursor startup failed:|FATAL ERROR|heap out of memory|javascript heap|OOMErrorHandler|FatalProcessOutOfMemory/i.test(
|
|
1423
1423
|
line
|
|
1424
1424
|
);
|
|
1425
1425
|
}
|
|
@@ -1442,12 +1442,17 @@ function looksLikeMinifiedJsDump(line) {
|
|
|
1442
1442
|
function looksLikeNestedElectronCrash(line) {
|
|
1443
1443
|
return /HasCustomHostObject|ElectronInitializeICUandStartNode/i.test(line);
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1445
|
+
function looksLikeNativeEventLoopCrash(text4) {
|
|
1446
|
+
return /uv_run|uv__io_poll|SpinEventLoopInternal/i.test(text4);
|
|
1447
|
+
}
|
|
1448
|
+
function looksLikeV8Oom(text4) {
|
|
1449
|
+
return /javascript heap|reached heap limit|OOMErrorHandler|FatalProcessOutOfMemory|Allocation failed - JavaScript heap/i.test(
|
|
1450
|
+
text4
|
|
1451
|
+
);
|
|
1452
|
+
}
|
|
1453
|
+
function looksLikeHomebrewLibuvCrash(text4) {
|
|
1454
|
+
if (!looksLikeNativeEventLoopCrash(text4)) return false;
|
|
1455
|
+
return /Cellar\/(?:libuv|node)|libuv\.\d+\.dylib/i.test(text4);
|
|
1451
1456
|
}
|
|
1452
1457
|
function clipStderr(text4, maxChars) {
|
|
1453
1458
|
const trimmed = text4.trim();
|
|
@@ -1461,7 +1466,12 @@ function summarizeTurnStderr(tail, maxChars = 500) {
|
|
|
1461
1466
|
const cursorRunFailed = [...tail].reverse().find((line) => /^cursor run failed\b/i.test(line.trim()));
|
|
1462
1467
|
if (cursorRunFailed) return clipStderr(cursorRunFailed, maxChars);
|
|
1463
1468
|
if (tail.some(looksLikeNestedElectronCrash)) return NESTED_ELECTRON_SUMMARY;
|
|
1464
|
-
|
|
1469
|
+
const blob = tail.join("\n");
|
|
1470
|
+
if (looksLikeV8Oom(blob)) return V8_OOM_SUMMARY;
|
|
1471
|
+
if (looksLikeHomebrewLibuvCrash(blob)) return HOMEBREW_LIBUV_SUMMARY;
|
|
1472
|
+
if (looksLikeNativeEventLoopCrash(blob)) {
|
|
1473
|
+
return BUNDLED_NODE_CRASH_SUMMARY;
|
|
1474
|
+
}
|
|
1465
1475
|
if (tail.some(
|
|
1466
1476
|
(line) => /\[resource_exhausted\]|resource_exhausted/i.test(line) || /findFilesWithRipgrep/.test(line)
|
|
1467
1477
|
)) {
|
|
@@ -1487,10 +1497,11 @@ function looksLikeInvalidAgentSession(text4) {
|
|
|
1487
1497
|
function looksLikeRetryableRunnerCrash(text4) {
|
|
1488
1498
|
if (looksLikeAgentFailureMessage(text4)) return false;
|
|
1489
1499
|
if (looksLikeInvalidAgentSession(text4)) return false;
|
|
1500
|
+
if (looksLikeV8Oom(text4)) return false;
|
|
1490
1501
|
const lower = text4.trim().toLowerCase();
|
|
1491
1502
|
if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
|
|
1492
1503
|
if (!lower) return true;
|
|
1493
|
-
return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|connection stalled|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
|
|
1504
|
+
return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|cursor runner crashed in node|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|connection stalled|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
|
|
1494
1505
|
lower
|
|
1495
1506
|
);
|
|
1496
1507
|
}
|
|
@@ -1542,9 +1553,15 @@ function humanizeAgentFailDetail(detail) {
|
|
|
1542
1553
|
if (/hascustomhostobject|electroninitializeicuandstartnode|nested chromium/i.test(lower)) {
|
|
1543
1554
|
return `${raw} \u2014 retry the turn; if it keeps failing, pick another agent.`;
|
|
1544
1555
|
}
|
|
1545
|
-
if (/
|
|
1556
|
+
if (looksLikeV8Oom(raw) || /javascript heap out of memory/i.test(lower)) {
|
|
1557
|
+
return /ran out of memory/i.test(raw) ? raw : V8_OOM_SUMMARY;
|
|
1558
|
+
}
|
|
1559
|
+
if (/homebrew node \+ shared libuv|Cellar\/(?:libuv|node)|libuv\.\d+\.dylib/i.test(raw)) {
|
|
1546
1560
|
return /brew install node@22/i.test(raw) ? raw : `${raw} \u2014 install Node 22 LTS (\`brew install node@22\`) and retry.`;
|
|
1547
1561
|
}
|
|
1562
|
+
if (/uv_run|spineventloopinternal|uv__io_poll|cursor runner crashed in node/i.test(lower)) {
|
|
1563
|
+
return /retry the turn/i.test(raw) ? raw : BUNDLED_NODE_CRASH_SUMMARY;
|
|
1564
|
+
}
|
|
1548
1565
|
if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
|
|
1549
1566
|
return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
|
|
1550
1567
|
}
|
|
@@ -1574,13 +1591,15 @@ function formatTurnExitError(exitCode, stderrSummary) {
|
|
|
1574
1591
|
if (looksLikeAgentFailureMessage(raw)) return detail;
|
|
1575
1592
|
return `exit ${code}: ${detail}`;
|
|
1576
1593
|
}
|
|
1577
|
-
var NODE_VERSION_FOOTER, NESTED_ELECTRON_SUMMARY, HOMEBREW_LIBUV_SUMMARY, MINIFIED_DUMP_SUMMARY;
|
|
1594
|
+
var NODE_VERSION_FOOTER, NESTED_ELECTRON_SUMMARY, HOMEBREW_LIBUV_SUMMARY, BUNDLED_NODE_CRASH_SUMMARY, V8_OOM_SUMMARY, MINIFIED_DUMP_SUMMARY;
|
|
1578
1595
|
var init_error_detail = __esm({
|
|
1579
1596
|
"src/agents/error-detail.ts"() {
|
|
1580
1597
|
"use strict";
|
|
1581
1598
|
NODE_VERSION_FOOTER = /^Node\.js v\d+/i;
|
|
1582
1599
|
NESTED_ELECTRON_SUMMARY = "Cursor local agent crashed at Electron startup (nested Chromium / HasCustomHostObject)";
|
|
1583
1600
|
HOMEBREW_LIBUV_SUMMARY = "Cursor runner crashed in Node (Homebrew Node + shared libuv). Install Node 22 LTS (`brew install node@22`) and retry.";
|
|
1601
|
+
BUNDLED_NODE_CRASH_SUMMARY = "Cursor runner crashed in Node. Retry the turn.";
|
|
1602
|
+
V8_OOM_SUMMARY = "Cursor runner ran out of memory (JavaScript heap). Retry; if it keeps happening, exclude large files from the project folder or start a new chat.";
|
|
1584
1603
|
MINIFIED_DUMP_SUMMARY = "Cursor local agent crashed during startup (truncated crash dump)";
|
|
1585
1604
|
}
|
|
1586
1605
|
});
|
|
@@ -8555,24 +8574,24 @@ function resolveCursorRipgrepPath(opts) {
|
|
|
8555
8574
|
packagedCursorRipgrepCandidate(platformRipgrepPackage(), rgBinaryName())
|
|
8556
8575
|
);
|
|
8557
8576
|
if (fromPackaged) return fromPackaged;
|
|
8558
|
-
const start = opts?.startFile?.trim() || process.argv[1] ||
|
|
8577
|
+
const start = opts?.startFile?.trim() || process.argv[1] || // CJS bundle only — ESM has no __filename; argv[1] is the running script.
|
|
8578
|
+
// eslint-disable-next-line camelcase
|
|
8579
|
+
(typeof __filename !== "undefined" ? __filename : "");
|
|
8559
8580
|
return walkForBundledRipgrep(start) ?? requireResolveBundledRipgrep(start);
|
|
8560
8581
|
}
|
|
8561
8582
|
function cursorRipgrepEnv(opts) {
|
|
8562
8583
|
const path = resolveCursorRipgrepPath(opts);
|
|
8563
8584
|
return path ? { [RIPGREP_ENV]: path } : {};
|
|
8564
8585
|
}
|
|
8565
|
-
var import_node_fs23, import_node_module2, import_node_path23,
|
|
8586
|
+
var import_node_fs23, import_node_module2, import_node_path23, RIPGREP_ENV;
|
|
8566
8587
|
var init_cursor_ripgrep = __esm({
|
|
8567
8588
|
"src/agents/cursor-ripgrep.ts"() {
|
|
8568
8589
|
"use strict";
|
|
8569
8590
|
import_node_fs23 = require("fs");
|
|
8570
8591
|
import_node_module2 = require("module");
|
|
8571
8592
|
import_node_path23 = require("path");
|
|
8572
|
-
import_node_url2 = require("url");
|
|
8573
8593
|
init_node_launch();
|
|
8574
8594
|
init_packaged_runtime();
|
|
8575
|
-
import_meta2 = {};
|
|
8576
8595
|
RIPGREP_ENV = "CURSOR_RIPGREP_PATH";
|
|
8577
8596
|
}
|
|
8578
8597
|
});
|
|
@@ -8616,7 +8635,7 @@ function entryDir() {
|
|
|
8616
8635
|
const cjsDir = typeof __dirname !== "undefined" ? __dirname : "";
|
|
8617
8636
|
if (cjsDir) return cjsDir;
|
|
8618
8637
|
try {
|
|
8619
|
-
return (0, import_node_path24.dirname)((0,
|
|
8638
|
+
return (0, import_node_path24.dirname)((0, import_node_url2.fileURLToPath)(import_meta2.url));
|
|
8620
8639
|
} catch {
|
|
8621
8640
|
try {
|
|
8622
8641
|
const req = (0, import_node_module3.createRequire)(process.cwd() + "/");
|
|
@@ -8645,14 +8664,14 @@ function cursorRunnerPath() {
|
|
|
8645
8664
|
}
|
|
8646
8665
|
return candidates[0];
|
|
8647
8666
|
}
|
|
8648
|
-
var import_node_fs24, import_node_module3, import_node_path24,
|
|
8667
|
+
var import_node_fs24, import_node_module3, import_node_path24, import_node_url2, import_sdk, import_meta2, FALLBACK_CURSOR_MODELS, cachedModels, MODEL_CACHE_MS, cursorAdapter;
|
|
8649
8668
|
var init_cursor = __esm({
|
|
8650
8669
|
"src/agents/cursor.ts"() {
|
|
8651
8670
|
"use strict";
|
|
8652
8671
|
import_node_fs24 = require("fs");
|
|
8653
8672
|
import_node_module3 = require("module");
|
|
8654
8673
|
import_node_path24 = require("path");
|
|
8655
|
-
|
|
8674
|
+
import_node_url2 = require("url");
|
|
8656
8675
|
import_sdk = require("@cursor/sdk");
|
|
8657
8676
|
init_run();
|
|
8658
8677
|
init_app_settings();
|
|
@@ -8664,7 +8683,7 @@ var init_cursor = __esm({
|
|
|
8664
8683
|
init_packaged_runtime();
|
|
8665
8684
|
init_turn_input();
|
|
8666
8685
|
init_cursor_events();
|
|
8667
|
-
|
|
8686
|
+
import_meta2 = {};
|
|
8668
8687
|
FALLBACK_CURSOR_MODELS = [
|
|
8669
8688
|
{ id: "default", displayName: "Auto" },
|
|
8670
8689
|
{ id: "composer-2.5", displayName: "Composer 2.5" },
|
|
@@ -11956,8 +11975,12 @@ var init_quota_failover = __esm({
|
|
|
11956
11975
|
});
|
|
11957
11976
|
|
|
11958
11977
|
// src/threads/adopt.ts
|
|
11978
|
+
function thisModuleFile() {
|
|
11979
|
+
const cjsFile = typeof __filename !== "undefined" ? __filename : "";
|
|
11980
|
+
return cjsFile || process.argv[1] || (0, import_node_path31.join)(process.cwd(), "package.json");
|
|
11981
|
+
}
|
|
11959
11982
|
function openReadonlySqlite(file) {
|
|
11960
|
-
const req = (0, import_node_module4.createRequire)(
|
|
11983
|
+
const req = (0, import_node_module4.createRequire)(thisModuleFile());
|
|
11961
11984
|
const Database = req("better-sqlite3");
|
|
11962
11985
|
return new Database(file, { readonly: true, fileMustExist: true });
|
|
11963
11986
|
}
|
|
@@ -12223,7 +12246,7 @@ function importConductorWorkspace(workspaceId) {
|
|
|
12223
12246
|
async function importConductorWorkspaceAsync(workspaceId) {
|
|
12224
12247
|
return importConductorWorkspace(workspaceId);
|
|
12225
12248
|
}
|
|
12226
|
-
var import_node_child_process3, import_node_fs34, import_node_os10, import_node_path31, import_node_module4,
|
|
12249
|
+
var import_node_child_process3, import_node_fs34, import_node_os10, import_node_path31, import_node_module4, CONDUCTOR_APP_SUPPORT, CONDUCTOR_DB, CURSOR_SDK_STORE;
|
|
12227
12250
|
var init_adopt = __esm({
|
|
12228
12251
|
"src/threads/adopt.ts"() {
|
|
12229
12252
|
"use strict";
|
|
@@ -12234,7 +12257,6 @@ var init_adopt = __esm({
|
|
|
12234
12257
|
import_node_module4 = require("module");
|
|
12235
12258
|
init_worktree();
|
|
12236
12259
|
init_thread_store();
|
|
12237
|
-
import_meta4 = {};
|
|
12238
12260
|
CONDUCTOR_APP_SUPPORT = (0, import_node_path31.join)(
|
|
12239
12261
|
process.env.HOME ?? "",
|
|
12240
12262
|
"Library",
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
slackApi,
|
|
20
20
|
slackTokenFor,
|
|
21
21
|
updateSchedule
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-JTQQPJAU.js";
|
|
23
23
|
import {
|
|
24
24
|
listModelsForAgent,
|
|
25
25
|
sideboardMcpProfile
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-KVFNTWFG.js";
|
|
27
27
|
import "../chunk-7YKXHBIW.js";
|
|
28
28
|
import "../chunk-YFAXVUY2.js";
|
|
29
29
|
import "../chunk-N5PM7HGQ.js";
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
isPidAlive,
|
|
7
7
|
startOrchestration,
|
|
8
8
|
waitForPidExit
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-JTQQPJAU.js";
|
|
10
|
+
import "./chunk-KVFNTWFG.js";
|
|
11
11
|
import "./chunk-7YKXHBIW.js";
|
|
12
12
|
import "./chunk-YFAXVUY2.js";
|
|
13
13
|
import "./chunk-N5PM7HGQ.js";
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
isPidAlive,
|
|
5
5
|
startOrchestration,
|
|
6
6
|
waitForPidExit
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-DMJKOFTO.js";
|
|
8
|
+
import "./chunk-NC3U42ZP.js";
|
|
9
9
|
import "./chunk-2GO3YKBA.js";
|
|
10
10
|
import "./chunk-7KWYXGIU.js";
|
|
11
11
|
import "./chunk-4EWPKYOU.js";
|
|
12
12
|
import "./chunk-KQBI5HNT.js";
|
|
13
13
|
import "./chunk-QTUESPAW.js";
|
|
14
14
|
import "./chunk-WIHKHR5R.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-363Z34PY.js";
|
|
16
16
|
import "./chunk-DCOZABNT.js";
|
|
17
17
|
import "./chunk-C4KHDW3U.js";
|
|
18
18
|
import "./chunk-FKOIHGKV.js";
|