@sideboard-ai/core 0.1.324 → 0.1.325
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/{abletime-5ZY3ZUUO.js → abletime-M7STTMZT.js} +6 -5
- package/dist/{abletime-CU2UPMJF.js → abletime-VL234MCP.js} +5 -4
- package/dist/{abletime-oauth-7EOSBEFM.js → abletime-oauth-LMMGMAPA.js} +3 -3
- package/dist/{abletime-oauth-4TTCR3CT.js → abletime-oauth-P4ZFBEAL.js} +3 -3
- package/dist/{abletime-rest-3TG4G7LW.js → abletime-rest-DLV7EIWS.js} +3 -3
- package/dist/{abletime-rest-KOKE7V4B.js → abletime-rest-GOI7HELR.js} +3 -3
- package/dist/agents/claude-runner.cjs +59 -22
- package/dist/agents/claude-runner.js +39 -16
- package/dist/agents/cursor-runner.cjs +96 -31
- package/dist/agents/cursor-runner.js +74 -24
- package/dist/{agents-YK65UDLT.js → agents-LDRM3BTY.js} +9 -8
- package/dist/{agents-LUSTCMDN.js → agents-MBIEAETM.js} +12 -11
- package/dist/{app-settings-I5HM5RMP.js → app-settings-E7DMMEKC.js} +1 -1
- package/dist/{app-settings-XIF4EC4K.js → app-settings-UQHUNOLV.js} +1 -1
- package/dist/{chunk-INBUV7HY.js → chunk-2UP3XD2D.js} +2 -2
- package/dist/{chunk-EQ52JR3Q.js → chunk-5MXLDDYF.js} +1 -1
- package/dist/{chunk-NCHOTN3C.js → chunk-5YCKATG6.js} +4 -3
- package/dist/{chunk-BYUCNIXK.js → chunk-7G27TB4M.js} +6 -6
- package/dist/chunk-7LUOLYFM.js +1445 -0
- package/dist/{chunk-Y3WREIPQ.js → chunk-A76MKMSF.js} +12 -210
- package/dist/{chunk-JE3JLHMO.js → chunk-APKUI4BP.js} +3 -3
- package/dist/{chunk-FR3SAYUL.js → chunk-AQEKPJWU.js} +5 -5
- package/dist/{chunk-QOS4465Y.js → chunk-BOFYI6LC.js} +1 -1
- package/dist/{chunk-FUFNMUNR.js → chunk-BTF3ATST.js} +7 -8
- package/dist/{chunk-OIHRC2ZJ.js → chunk-CI4M54LS.js} +22 -2
- package/dist/chunk-DBKHL7NC.js +214 -0
- package/dist/{chunk-ROOZDDFA.js → chunk-EO6ZFLG6.js} +7 -8
- package/dist/chunk-EZR6W4B3.js +1259 -0
- package/dist/{chunk-MZIZTSR2.js → chunk-F65JMKUR.js} +2 -2
- package/dist/chunk-F6GE7V3Q.js +216 -0
- package/dist/{chunk-7MQSYPAY.js → chunk-GNLKBS3U.js} +206 -188
- package/dist/{chunk-EKU7FQVG.js → chunk-H36GKGU2.js} +2 -2
- package/dist/{chunk-7D5QIU3N.js → chunk-HG6KS7OT.js} +294 -265
- package/dist/chunk-MBT6WDAB.js +28 -0
- package/dist/{chunk-JH5SMVM5.js → chunk-MFMDZAA6.js} +262 -233
- package/dist/{chunk-7PVT73H6.js → chunk-NWGINMEA.js} +12 -210
- package/dist/{chunk-QIC2JXHW.js → chunk-OOXRMTU6.js} +1 -1
- package/dist/{chunk-5XNT6BCG.js → chunk-OPXEJJBM.js} +1 -1
- package/dist/chunk-OYRN356W.js +80 -0
- package/dist/chunk-PPTJMBUY.js +25 -0
- package/dist/{chunk-B4CDSSRN.js → chunk-Q3FHTGIW.js} +2 -0
- package/dist/{chunk-EJ66LEKH.js → chunk-RZJTGBXY.js} +22 -2
- package/dist/{chunk-DF5BM5OY.js → chunk-SACHHTBJ.js} +207 -186
- package/dist/{chunk-5GDJSFCT.js → chunk-SK6NYGPD.js} +2 -2
- package/dist/{chunk-74OPNF7U.js → chunk-SQQBU7Z6.js} +2 -2
- package/dist/{chunk-Q3YJZPQI.js → chunk-SS6CYGLF.js} +3 -3
- package/dist/{chunk-YDUHLWI5.js → chunk-SUZOPJZC.js} +21 -7
- package/dist/{chunk-ZHGMRBSC.js → chunk-U5WO6MEB.js} +3 -3
- package/dist/{chunk-NXUN4U5P.js → chunk-VAFQS4D2.js} +2 -2
- package/dist/chunk-W3ZLE4PO.js +77 -0
- package/dist/{chunk-RR4WCGNB.js → chunk-WYEST76H.js} +7 -7
- package/dist/{chunk-ODH3XHMI.js → chunk-ZEUMWHOH.js} +5 -5
- package/dist/{chunk-ZIRQZUZY.js → chunk-ZHDXLDLA.js} +3 -3
- package/dist/{chunk-IFWGG2M2.js → chunk-ZSHS46V5.js} +2 -0
- package/dist/{conductor-JFABMXDA.js → conductor-D4KFZF54.js} +6 -6
- package/dist/{conductor-SPZOTC7W.js → conductor-KB7L7NQN.js} +7 -7
- package/dist/{coordinator-prompt-K66RGNWK.js → coordinator-prompt-OBXEC63K.js} +4 -4
- package/dist/{coordinator-prompt-Z6UFHFDH.js → coordinator-prompt-SUO4FRY3.js} +4 -4
- package/dist/{cursor-recover-TEBFKAZ4.js → cursor-recover-7F46PAJ5.js} +1 -1
- package/dist/{cursor-recover-OWPQUHFH.js → cursor-recover-BDIAZIE3.js} +1 -1
- package/dist/{global-workspace-A6UO6PJV.js → global-workspace-UHU2FXTY.js} +4 -4
- package/dist/{global-workspace-RHEO55B4.js → global-workspace-Z2SURNHA.js} +4 -4
- package/dist/index.cjs +21112 -20864
- package/dist/index.d.cts +25 -9
- package/dist/index.d.ts +25 -9
- package/dist/index.js +343 -1678
- package/dist/linear-HFUOUJ5H.js +67 -0
- package/dist/linear-SIHEBU3X.js +69 -0
- package/dist/linear-list-63I7QUC6.js +6 -0
- package/dist/linear-list-JFV3EES6.js +8 -0
- package/dist/mcp/run-stdio.cjs +15654 -15398
- package/dist/mcp/run-stdio.js +67 -1247
- package/dist/{optional-cli-RMMS5L6F.js → optional-cli-U2GUA2X6.js} +3 -3
- package/dist/{optional-cli-Y3Z3GIPZ.js → optional-cli-ULDP3O5S.js} +4 -4
- package/dist/{orchestrator-7VTAUY24.js → orchestrator-3H4KNGPN.js} +15 -13
- package/dist/{orchestrator-2O6OJQLX.js → orchestrator-6ROMEWBP.js} +14 -12
- package/dist/{thread-store-3F7GR64A.js → thread-store-4ZN3DS2W.js} +1 -1
- package/dist/{thread-store-JRSL4HQY.js → thread-store-IC4BQXDW.js} +1 -1
- package/dist/{workspaces-NRKEXOYR.js → workspaces-MG5JHRKW.js} +4 -4
- package/dist/{workspaces-42E6AGXD.js → workspaces-QJNKEGEM.js} +4 -4
- package/dist/{worktree-ZDA2UJ7C.js → worktree-KSJPTHGZ.js} +3 -3
- package/dist/{worktree-4NGXCCUO.js → worktree-MYJYUHZM.js} +3 -3
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
guardCursorCustomTool,
|
|
6
6
|
shouldReturnRunErrorToAgent,
|
|
7
7
|
sideboardCursorRpcTools
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-5YCKATG6.js";
|
|
9
9
|
import {
|
|
10
10
|
createAgentStreamCoalescer
|
|
11
11
|
} from "../chunk-AXQ4ZWHK.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
fetchCursorTurnCostUsd,
|
|
21
21
|
importCursorSdk,
|
|
22
22
|
resolveCursorSdkRoot
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-U5WO6MEB.js";
|
|
24
24
|
import {
|
|
25
25
|
TOOL_RESULT_STORE_MAX_CHARS,
|
|
26
26
|
createCursorStreamToolProgress,
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
isCursorIdleAfterCompletedTool,
|
|
30
30
|
looksLikeCursorStreamCutOff,
|
|
31
31
|
noteCursorAgentEvent
|
|
32
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-OPXEJJBM.js";
|
|
33
33
|
import "../chunk-6K64FJDD.js";
|
|
34
34
|
import {
|
|
35
35
|
cursorSdkStoreDir
|
|
36
36
|
} from "../chunk-LG6RJBIY.js";
|
|
37
37
|
import "../chunk-2TUE6JKQ.js";
|
|
38
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-SUZOPJZC.js";
|
|
39
39
|
import {
|
|
40
40
|
dropNestedElectronEnvFromProcess
|
|
41
41
|
} from "../chunk-4TR3HZFT.js";
|
|
@@ -66,10 +66,20 @@ async function acquireCursorCatalogLock(storeDir) {
|
|
|
66
66
|
try {
|
|
67
67
|
return await lockfile.lock(lockPath, {
|
|
68
68
|
retries: { retries: 40, minTimeout: 50, maxTimeout: 500 },
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
// Repair rewrites run_events.ndjson synchronously while holding the lock.
|
|
70
|
+
// A 5s stale window treats that stall as a dead owner and throws from a
|
|
71
|
+
// timer, which kills the runner mid-turn.
|
|
72
|
+
stale: 3e4,
|
|
73
|
+
update: 1e4,
|
|
74
|
+
onCompromised: (err) => {
|
|
75
|
+
console.error(`[sideboard] cursor catalog lock compromised: ${err.message}`);
|
|
76
|
+
}
|
|
71
77
|
});
|
|
72
|
-
} catch {
|
|
78
|
+
} catch (err) {
|
|
79
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
80
|
+
console.error(
|
|
81
|
+
`[sideboard] cursor catalog lock not acquired (${message}); continuing without the lock`
|
|
82
|
+
);
|
|
73
83
|
return async () => {
|
|
74
84
|
};
|
|
75
85
|
}
|
|
@@ -344,8 +354,8 @@ function isUnresumableCursorSession(err) {
|
|
|
344
354
|
if (name === "AgentNotFoundError") return true;
|
|
345
355
|
const lower = cursorErrorMessage(err).toLowerCase();
|
|
346
356
|
if (!lower) return false;
|
|
347
|
-
return /corrupt local agent checkpoint/.test(lower) || /missing root blob/.test(lower) || /\bagent\
|
|
348
|
-
/\brun\
|
|
357
|
+
return /corrupt local agent checkpoint/.test(lower) || /missing root blob/.test(lower) || /\bagent\s+agent-[\w-]+\s+not found\b/.test(lower) || // Shared JSONL last-write-wins: `Run run-… not found for agent agent-…`
|
|
358
|
+
/\brun\s+run-[\w-]+\s+not found for agent\b/.test(lower) || /cannot resume/.test(lower);
|
|
349
359
|
}
|
|
350
360
|
function cursorSessionRecoveryMessage(err, agentId) {
|
|
351
361
|
const detail = cursorErrorMessage(err) || "unresumable session";
|
|
@@ -386,13 +396,20 @@ async function retryOnceOnRetryableCursorError(fn, onRetry, delayMs = CURSOR_RET
|
|
|
386
396
|
return fn();
|
|
387
397
|
}
|
|
388
398
|
}
|
|
389
|
-
function cursorSendOptions(mcpServers) {
|
|
390
|
-
const opts = {
|
|
399
|
+
function cursorSendOptions(mcpServers, mode) {
|
|
400
|
+
const opts = {
|
|
401
|
+
local: { force: true }
|
|
402
|
+
};
|
|
403
|
+
if (mode) opts.mode = mode;
|
|
391
404
|
if (mcpServers && typeof mcpServers === "object" && Object.keys(mcpServers).length > 0) {
|
|
392
405
|
opts.mcpServers = mcpServers;
|
|
393
406
|
}
|
|
394
407
|
return opts;
|
|
395
408
|
}
|
|
409
|
+
function cursorDisallowedTools(planMode) {
|
|
410
|
+
if (planMode) return ["read", "shell", "edit", "write", "delete", "task"];
|
|
411
|
+
return ["read"];
|
|
412
|
+
}
|
|
396
413
|
function withCursorLocalHangGuards(local) {
|
|
397
414
|
return { ...local, enableAgentRetries: false };
|
|
398
415
|
}
|
|
@@ -433,6 +450,30 @@ async function* iterateUntilIdle(iterable, idleMs, onIdle, activity) {
|
|
|
433
450
|
throw err;
|
|
434
451
|
}
|
|
435
452
|
}
|
|
453
|
+
function exitWhenFlushed(code) {
|
|
454
|
+
let pending = 2;
|
|
455
|
+
let exited = false;
|
|
456
|
+
const finish = () => {
|
|
457
|
+
pending -= 1;
|
|
458
|
+
if (pending > 0 || exited) return;
|
|
459
|
+
exited = true;
|
|
460
|
+
process.exit(code);
|
|
461
|
+
};
|
|
462
|
+
const flush = (stream) => {
|
|
463
|
+
if (stream.writableEnded) {
|
|
464
|
+
finish();
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
stream.write("", finish);
|
|
468
|
+
};
|
|
469
|
+
flush(process.stdout);
|
|
470
|
+
flush(process.stderr);
|
|
471
|
+
setTimeout(() => {
|
|
472
|
+
if (exited) return;
|
|
473
|
+
exited = true;
|
|
474
|
+
process.exit(code);
|
|
475
|
+
}, 1e3).unref();
|
|
476
|
+
}
|
|
436
477
|
|
|
437
478
|
// src/agents/sliced-file-read.ts
|
|
438
479
|
import { readFileSync as readFileSync2, realpathSync, statSync } from "fs";
|
|
@@ -735,7 +776,7 @@ async function main() {
|
|
|
735
776
|
mode,
|
|
736
777
|
local,
|
|
737
778
|
name: "Sideboard",
|
|
738
|
-
disallowedTools:
|
|
779
|
+
disallowedTools: cursorDisallowedTools(req.planMode),
|
|
739
780
|
...mcpServers ? { mcpServers } : {}
|
|
740
781
|
};
|
|
741
782
|
const retryTransport = (fn) => retryOnceOnRetryableCursorError(fn, (err) => {
|
|
@@ -748,14 +789,18 @@ async function main() {
|
|
|
748
789
|
const { name: _name, ...opts } = createOpts;
|
|
749
790
|
return retryTransport(() => Agent.resume(agentId, opts));
|
|
750
791
|
}
|
|
792
|
+
function promptForNewSession() {
|
|
793
|
+
return req.freshPrompt?.trim() || req.prompt;
|
|
794
|
+
}
|
|
751
795
|
async function openAgent() {
|
|
752
796
|
try {
|
|
753
|
-
|
|
797
|
+
if (!req.agentId) return { agent: await createAgent(), fresh: true };
|
|
798
|
+
return { agent: await resumeAgent(req.agentId), fresh: false };
|
|
754
799
|
} catch (err) {
|
|
755
800
|
if (!isUnresumableCursorSession(err)) throw err;
|
|
756
801
|
if (repairCursorCatalogForResume(storeRoot, note) && req.agentId) {
|
|
757
802
|
try {
|
|
758
|
-
return await resumeAgent(req.agentId);
|
|
803
|
+
return { agent: await resumeAgent(req.agentId), fresh: false };
|
|
759
804
|
} catch (err2) {
|
|
760
805
|
if (!isUnresumableCursorSession(err2)) throw err2;
|
|
761
806
|
}
|
|
@@ -764,7 +809,7 @@ async function main() {
|
|
|
764
809
|
type: "stderr",
|
|
765
810
|
data: cursorSessionRecoveryMessage(err, req.agentId)
|
|
766
811
|
});
|
|
767
|
-
return createAgent();
|
|
812
|
+
return { agent: await createAgent(), fresh: true };
|
|
768
813
|
}
|
|
769
814
|
}
|
|
770
815
|
async function retryAfterBusy(agent) {
|
|
@@ -783,7 +828,7 @@ async function main() {
|
|
|
783
828
|
}
|
|
784
829
|
async function sendPrompt(agent, prompt, extra) {
|
|
785
830
|
const sendOpts = {
|
|
786
|
-
...cursorSendOptions(mcpServers),
|
|
831
|
+
...cursorSendOptions(mcpServers, mode),
|
|
787
832
|
...extra
|
|
788
833
|
};
|
|
789
834
|
try {
|
|
@@ -814,7 +859,7 @@ async function main() {
|
|
|
814
859
|
setTimeout(resolve2, 2e3);
|
|
815
860
|
})
|
|
816
861
|
]).finally(() => {
|
|
817
|
-
void closeCursorCatalogTurn().finally(() =>
|
|
862
|
+
void closeCursorCatalogTurn().finally(() => exitWhenFlushed(1));
|
|
818
863
|
});
|
|
819
864
|
};
|
|
820
865
|
process.once("SIGTERM", onSignal);
|
|
@@ -900,7 +945,10 @@ async function main() {
|
|
|
900
945
|
});
|
|
901
946
|
return 2;
|
|
902
947
|
}
|
|
903
|
-
if (result.status === "cancelled")
|
|
948
|
+
if (result.status === "cancelled") {
|
|
949
|
+
if (streamIdle) return 1;
|
|
950
|
+
return 0;
|
|
951
|
+
}
|
|
904
952
|
try {
|
|
905
953
|
const costUsd = await fetchCursorTurnCostUsd(
|
|
906
954
|
(opts) => agent.getUsage(opts),
|
|
@@ -919,14 +967,16 @@ async function main() {
|
|
|
919
967
|
}
|
|
920
968
|
}
|
|
921
969
|
try {
|
|
922
|
-
|
|
970
|
+
const opened = await openAgent();
|
|
971
|
+
let agent = opened.agent;
|
|
972
|
+
const prompt = opened.fresh ? promptForNewSession() : req.prompt;
|
|
923
973
|
try {
|
|
924
974
|
try {
|
|
925
|
-
return await runTurn(agent);
|
|
975
|
+
return await runTurn(agent, prompt);
|
|
926
976
|
} catch (err) {
|
|
927
977
|
if (isAgentBusyError(err)) {
|
|
928
978
|
await retryAfterBusy(agent);
|
|
929
|
-
return await runTurn(agent);
|
|
979
|
+
return await runTurn(agent, prompt);
|
|
930
980
|
}
|
|
931
981
|
if (!isUnresumableCursorSession(err)) throw err;
|
|
932
982
|
const agentId = agent.agentId;
|
|
@@ -945,7 +995,7 @@ async function main() {
|
|
|
945
995
|
data: cursorSessionRecoveryMessage(err, agentId)
|
|
946
996
|
});
|
|
947
997
|
agent = await createAgent();
|
|
948
|
-
return await runTurn(agent);
|
|
998
|
+
return await runTurn(agent, promptForNewSession());
|
|
949
999
|
}
|
|
950
1000
|
} finally {
|
|
951
1001
|
await agent[Symbol.asyncDispose]().catch(() => void 0);
|
|
@@ -966,9 +1016,9 @@ async function main() {
|
|
|
966
1016
|
}
|
|
967
1017
|
}
|
|
968
1018
|
main().then(
|
|
969
|
-
(code) =>
|
|
1019
|
+
(code) => exitWhenFlushed(code),
|
|
970
1020
|
(err) => {
|
|
971
1021
|
emit({ type: "stderr", data: err instanceof Error ? err.message : String(err) });
|
|
972
|
-
|
|
1022
|
+
exitWhenFlushed(1);
|
|
973
1023
|
}
|
|
974
1024
|
);
|
|
@@ -46,7 +46,8 @@ import {
|
|
|
46
46
|
resolveCursorSdkRoot,
|
|
47
47
|
resolveQuotaFallbackAgent,
|
|
48
48
|
turnCostUsdFromCursorUsage
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-HG6KS7OT.js";
|
|
50
|
+
import "./chunk-5MXLDDYF.js";
|
|
50
51
|
import {
|
|
51
52
|
getAgentSetupInfo,
|
|
52
53
|
installAgent,
|
|
@@ -58,14 +59,14 @@ import {
|
|
|
58
59
|
prepareTerminalCommand,
|
|
59
60
|
resolveLoginCommand,
|
|
60
61
|
whichOnPath
|
|
61
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-F65JMKUR.js";
|
|
63
|
+
import "./chunk-ZHDXLDLA.js";
|
|
64
|
+
import "./chunk-EO6ZFLG6.js";
|
|
62
65
|
import "./chunk-6U6QRUHY.js";
|
|
63
66
|
import "./chunk-E63AM3PW.js";
|
|
64
|
-
import "./chunk-2GPQZZLY.js";
|
|
65
|
-
import "./chunk-EQ52JR3Q.js";
|
|
66
|
-
import "./chunk-ZIRQZUZY.js";
|
|
67
|
-
import "./chunk-ROOZDDFA.js";
|
|
68
67
|
import "./chunk-N2WW62LF.js";
|
|
68
|
+
import "./chunk-2GPQZZLY.js";
|
|
69
|
+
import "./chunk-MBT6WDAB.js";
|
|
69
70
|
import "./chunk-4YXZOXMT.js";
|
|
70
71
|
import {
|
|
71
72
|
conductorBundledBinDir,
|
|
@@ -83,12 +84,12 @@ import {
|
|
|
83
84
|
assertOrchestratorCapableAgent,
|
|
84
85
|
coerceOrchestratorAgent,
|
|
85
86
|
isOrchestratorCapableAgent
|
|
86
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-CI4M54LS.js";
|
|
87
88
|
import "./chunk-NSTQ6QKD.js";
|
|
88
89
|
import "./chunk-WWUABK6B.js";
|
|
89
90
|
import "./chunk-FJZWM2ON.js";
|
|
90
91
|
import "./chunk-J2LNLI4S.js";
|
|
91
|
-
import "./chunk-
|
|
92
|
+
import "./chunk-Q3FHTGIW.js";
|
|
92
93
|
import "./chunk-WMZIANPV.js";
|
|
93
94
|
import "./chunk-KGZBYWZ3.js";
|
|
94
95
|
import "./chunk-WOU343SI.js";
|
|
@@ -37,9 +37,7 @@ import {
|
|
|
37
37
|
planModeTurnInstruction,
|
|
38
38
|
resolveCursorModelId,
|
|
39
39
|
resolveQuotaFallbackAgent
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-S5CJUIPY.js";
|
|
42
|
-
import "./chunk-QIC2JXHW.js";
|
|
40
|
+
} from "./chunk-MFMDZAA6.js";
|
|
43
41
|
import {
|
|
44
42
|
getAgentSetupInfo,
|
|
45
43
|
installAgent,
|
|
@@ -51,10 +49,13 @@ import {
|
|
|
51
49
|
prepareTerminalCommand,
|
|
52
50
|
resolveLoginCommand,
|
|
53
51
|
whichOnPath
|
|
54
|
-
} from "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
52
|
+
} from "./chunk-SK6NYGPD.js";
|
|
53
|
+
import "./chunk-S5CJUIPY.js";
|
|
54
|
+
import "./chunk-PPTJMBUY.js";
|
|
55
|
+
import "./chunk-OOXRMTU6.js";
|
|
56
|
+
import "./chunk-APKUI4BP.js";
|
|
57
|
+
import "./chunk-BTF3ATST.js";
|
|
58
|
+
import "./chunk-ZSHS46V5.js";
|
|
58
59
|
import "./chunk-QKHEVSB5.js";
|
|
59
60
|
import "./chunk-RSA47QYR.js";
|
|
60
61
|
import "./chunk-JAT3JFOS.js";
|
|
@@ -67,8 +68,8 @@ import {
|
|
|
67
68
|
preferredCursorCostCents,
|
|
68
69
|
resolveCursorSdkRoot,
|
|
69
70
|
turnCostUsdFromCursorUsage
|
|
70
|
-
} from "./chunk-
|
|
71
|
-
import "./chunk-
|
|
71
|
+
} from "./chunk-U5WO6MEB.js";
|
|
72
|
+
import "./chunk-OPXEJJBM.js";
|
|
72
73
|
import "./chunk-6K64FJDD.js";
|
|
73
74
|
import "./chunk-LG6RJBIY.js";
|
|
74
75
|
import {
|
|
@@ -82,13 +83,13 @@ import {
|
|
|
82
83
|
resolveCommandBinarySync,
|
|
83
84
|
withExportedPath
|
|
84
85
|
} from "./chunk-2TUE6JKQ.js";
|
|
85
|
-
import "./chunk-
|
|
86
|
+
import "./chunk-SUZOPJZC.js";
|
|
86
87
|
import {
|
|
87
88
|
ORCHESTRATOR_AGENT_KINDS,
|
|
88
89
|
assertOrchestratorCapableAgent,
|
|
89
90
|
coerceOrchestratorAgent,
|
|
90
91
|
isOrchestratorCapableAgent
|
|
91
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-RZJTGBXY.js";
|
|
92
93
|
import "./chunk-77WWLBCI.js";
|
|
93
94
|
import "./chunk-4TR3HZFT.js";
|
|
94
95
|
import "./chunk-WDRMZKVB.js";
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
updateProjectProfileSettings,
|
|
110
110
|
usageOnLimit,
|
|
111
111
|
writeViewerContext
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-CI4M54LS.js";
|
|
113
113
|
import "./chunk-NSTQ6QKD.js";
|
|
114
114
|
import "./chunk-WWUABK6B.js";
|
|
115
115
|
import "./chunk-FJZWM2ON.js";
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
updateProjectProfileSettings,
|
|
108
108
|
usageOnLimit,
|
|
109
109
|
writeViewerContext
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-RZJTGBXY.js";
|
|
111
111
|
import "./chunk-77WWLBCI.js";
|
|
112
112
|
import "./chunk-4TR3HZFT.js";
|
|
113
113
|
import "./chunk-WDRMZKVB.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
loadAppSettings,
|
|
6
6
|
saveAppSettings
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RZJTGBXY.js";
|
|
8
8
|
|
|
9
9
|
// src/integrations/optional-services.ts
|
|
10
10
|
var OPTIONAL_SERVICE_IDS = ["vercel", "supabase", "posthog", "sentry"];
|
|
@@ -273,7 +273,7 @@ async function connectedCliPresence(integrations) {
|
|
|
273
273
|
const ids = connectedOptionalServices(integrations).filter((spec) => spec.cli).map((spec) => spec.id);
|
|
274
274
|
if (ids.length === 0) return void 0;
|
|
275
275
|
try {
|
|
276
|
-
const { optionalCliPresence } = await import("./optional-cli-
|
|
276
|
+
const { optionalCliPresence } = await import("./optional-cli-ULDP3O5S.js");
|
|
277
277
|
return await optionalCliPresence(ids);
|
|
278
278
|
} catch {
|
|
279
279
|
return void 0;
|
|
@@ -55,7 +55,7 @@ function extractJsonErrorMessage(obj) {
|
|
|
55
55
|
const candidates = [
|
|
56
56
|
typeof obj.message === "string" ? obj.message : null,
|
|
57
57
|
typeof obj.error === "string" ? obj.error : null,
|
|
58
|
-
nested && typeof nested.message === "string" ? nested.message : null,
|
|
58
|
+
nested && typeof nested.message === "string" ? nested.message : typeof nested?.data?.message === "string" ? nested.data.message : null,
|
|
59
59
|
typeof obj.result === "string" ? obj.result : null,
|
|
60
60
|
typeof obj.detail === "string" ? obj.detail : null
|
|
61
61
|
];
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
formatUnknownDetail,
|
|
5
5
|
looksLikeCursorStreamCutOff,
|
|
6
6
|
looksLikeHugeToolResultDump
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OPXEJJBM.js";
|
|
8
8
|
import {
|
|
9
9
|
CLI_DIR
|
|
10
10
|
} from "./chunk-6K64FJDD.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
WAIT_FOR_TURN_DESCRIPTION,
|
|
15
15
|
WAIT_FOR_TURN_SCHEMA,
|
|
16
16
|
createPilotRpcExecutors
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SUZOPJZC.js";
|
|
18
18
|
|
|
19
19
|
// src/agents/tool-result-clip.ts
|
|
20
20
|
import { mkdirSync, writeFileSync } from "fs";
|
|
@@ -121,13 +121,14 @@ function guardCursorCustomTool(tool, opts) {
|
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
var NON_RECOVERABLE_RUN_ERROR = /invalid (?:user )?api key|not logged in|not authenticated|unauthorized|credit balance|out of credits|insufficient.?quota|usage limit|you've hit your|too many requests|rate.?limit/;
|
|
124
|
+
var RECOVERABLE_RUN_ERROR = /premature close|tool execution failed|stream (?:idle|cut ?off|closed)|custom tool|result too (?:large|long)|max(?:imum)? (?:tool )?result/;
|
|
124
125
|
function shouldReturnRunErrorToAgent(detail) {
|
|
125
126
|
const text = detail.trim();
|
|
126
127
|
if (!text) return false;
|
|
127
128
|
if (looksLikeHugeToolResultDump(text) || looksLikeCursorStreamCutOff(text)) return true;
|
|
128
129
|
const head = text.slice(0, 2e3).toLowerCase();
|
|
129
130
|
if (NON_RECOVERABLE_RUN_ERROR.test(head)) return false;
|
|
130
|
-
return
|
|
131
|
+
return RECOVERABLE_RUN_ERROR.test(head);
|
|
131
132
|
}
|
|
132
133
|
function cursorRunErrorRecoveryPrompt(detail) {
|
|
133
134
|
const summary = looksLikeHugeToolResultDump(detail) ? HUGE_TOOL_RESULT_SUMMARY : detail.replace(/\s+/g, " ").trim().slice(0, 400);
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
compactSummaryPart,
|
|
6
6
|
isInternalAgentStatusText,
|
|
7
7
|
lastAssistantMessageText
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5MXLDDYF.js";
|
|
9
9
|
import {
|
|
10
10
|
isCloudCoordinatorThread,
|
|
11
11
|
isGlobalThread,
|
|
12
12
|
isOrchestratorThread,
|
|
13
13
|
isSlackCoordinatorThread
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZHDXLDLA.js";
|
|
15
15
|
import {
|
|
16
16
|
mergeAgentGitAuthEnv,
|
|
17
17
|
resolveAgentGitAuthEnv
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EO6ZFLG6.js";
|
|
19
19
|
import {
|
|
20
20
|
ATTACHMENTS_DIR,
|
|
21
21
|
DETACHED_JOBS_DIR,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
assertOrchestratorCapableAgent,
|
|
34
34
|
contextTokens
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-CI4M54LS.js";
|
|
36
36
|
import {
|
|
37
37
|
stripNestedElectronEnv
|
|
38
38
|
} from "./chunk-WWUABK6B.js";
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
updateThread,
|
|
48
48
|
worktreeNameFromPath,
|
|
49
49
|
writeThread
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-Q3FHTGIW.js";
|
|
51
51
|
import {
|
|
52
52
|
findConventionSetup,
|
|
53
53
|
loadRepoSettings,
|
|
@@ -1678,7 +1678,7 @@ var PORT_RANGE_SIZE = 10;
|
|
|
1678
1678
|
var RECLAIM_RETRY_DELAY_MS = 40;
|
|
1679
1679
|
var RECLAIM_TRIES = 8;
|
|
1680
1680
|
async function killReclaimable(ports, worktreePath, signal) {
|
|
1681
|
-
const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-
|
|
1681
|
+
const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-D4KFZF54.js");
|
|
1682
1682
|
if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
|
|
1683
1683
|
else killListenersOnPorts2(ports);
|
|
1684
1684
|
}
|