@sideboard-ai/core 0.1.115 → 0.1.117
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 +96 -60
- package/dist/agents/cursor-runner.js +10 -9
- package/dist/{agents-3X3EFCQY.js → agents-GUEKGV7V.js} +6 -6
- package/dist/{agents-AHAFC6FR.js → agents-OCGAZCKT.js} +5 -5
- package/dist/{chunk-66XTXHR3.js → chunk-4CDCTYTM.js} +61 -11
- package/dist/{chunk-XOYQ7LNQ.js → chunk-4NAW5BAQ.js} +3 -3
- package/dist/{chunk-4OJMZ6P2.js → chunk-4WV7C7WP.js} +3 -3
- package/dist/{chunk-DCNR7NAL.js → chunk-5X7GRP5W.js} +49 -24
- package/dist/{chunk-MZ6HJ7VL.js → chunk-74YJHND6.js} +48 -23
- package/dist/{chunk-ZRCX43LS.js → chunk-BKVDZV7X.js} +2 -2
- package/dist/{chunk-A4VZXJEJ.js → chunk-HPAWHIZ3.js} +4 -1
- package/dist/{chunk-SLU5JVKD.js → chunk-NZBDVBCP.js} +23 -2
- package/dist/{chunk-KYOTBZ6S.js → chunk-RG737OWT.js} +4 -1
- package/dist/{chunk-K3TIQXOH.js → chunk-U3IVCVLH.js} +2 -2
- package/dist/{chunk-FZCIQYNQ.js → chunk-VGPLXQIH.js} +1 -1
- package/dist/chunk-VHX673DI.js +32 -0
- package/dist/{chunk-ZMROW673.js → chunk-WCU3FHEI.js} +1 -1
- package/dist/{chunk-7WC5UWEB.js → chunk-X3NIPGQT.js} +1 -1
- package/dist/{chunk-ZYEFCSZJ.js → chunk-XTZQL7OU.js} +1 -1
- package/dist/{chunk-C6OBY6IC.js → chunk-YJ2WV5TZ.js} +54 -10
- package/dist/{coordinator-prompt-4KCALEKD.js → coordinator-prompt-QMV6YEP5.js} +3 -3
- package/dist/{coordinator-prompt-FML4I5AR.js → coordinator-prompt-XCBHAOGE.js} +3 -3
- package/dist/cursor-recover-NOQYOFRF.js +76 -0
- package/dist/{cursor-recover-JBTIDARH.js → cursor-recover-QSLWEZNA.js} +12 -7
- package/dist/{global-workspace-CSWABOG5.js → global-workspace-SBKXKQFS.js} +4 -4
- package/dist/{global-workspace-H4YNASM6.js → global-workspace-Z37MNYU6.js} +4 -4
- package/dist/index.cjs +369 -240
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +14 -10
- package/dist/mcp/run-stdio.cjs +359 -237
- package/dist/mcp/run-stdio.js +9 -9
- package/dist/{orchestrator-GKLYKLRC.js → orchestrator-4PKR6AZJ.js} +7 -7
- package/dist/{orchestrator-TXASYNHT.js → orchestrator-MKTZYWTI.js} +8 -8
- package/dist/{thread-store-OEALWU7Y.js → thread-store-JR235AWK.js} +3 -1
- package/dist/{thread-store-LPTBVW5C.js → thread-store-PMH3BMB6.js} +3 -1
- package/dist/{workspaces-HJ3EVATC.js → workspaces-C3TJJFY3.js} +5 -5
- package/dist/{workspaces-QG6PGFQR.js → workspaces-M4OICPWF.js} +5 -5
- package/dist/{worktree-IW3BX26B.js → worktree-7AEKZSEX.js} +2 -2
- package/dist/{worktree-OTFQO2W7.js → worktree-MRSTQ32S.js} +2 -2
- package/package.json +1 -1
- package/dist/cursor-recover-ZUJG6XRQ.js +0 -42
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-EKIDHL2T.js";
|
|
8
8
|
import {
|
|
9
9
|
isOrchestratorThread
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4WV7C7WP.js";
|
|
11
11
|
import {
|
|
12
12
|
applyAgentRunnerHeapEnv,
|
|
13
13
|
applyNodeLaunch,
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
packagedMcpStdioPath,
|
|
21
21
|
parseCursorRunnerLine,
|
|
22
22
|
resolveNodeLaunch
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-NZBDVBCP.js";
|
|
24
24
|
import {
|
|
25
25
|
codexUnattendedGitConfigArgs,
|
|
26
26
|
mergeAgentGitAuthEnv,
|
|
27
27
|
resolveAgentGitAuthEnv,
|
|
28
28
|
resolveCodexGitWritableRoots
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VGPLXQIH.js";
|
|
30
30
|
import {
|
|
31
31
|
claudeChromeEnabled,
|
|
32
32
|
loadAppSettings,
|
|
@@ -669,6 +669,9 @@ function classifyTool(name) {
|
|
|
669
669
|
}
|
|
670
670
|
return "other";
|
|
671
671
|
}
|
|
672
|
+
function isShellToolName(name) {
|
|
673
|
+
return classifyTool(name ?? "") === "shell";
|
|
674
|
+
}
|
|
672
675
|
function toolActivityLine(parts) {
|
|
673
676
|
const tools = parts.filter((p) => {
|
|
674
677
|
if (p.type !== "tool" || p.parentId) return false;
|
|
@@ -916,6 +919,30 @@ function applyAgentEvent(parts, event) {
|
|
|
916
919
|
if (event.type === "tool_result") {
|
|
917
920
|
const existing = parts.findIndex((p) => p.type === "tool" && p.id === event.id);
|
|
918
921
|
const fromResult = parseDiffStat(event.content);
|
|
922
|
+
if (event.partial) {
|
|
923
|
+
if (existing < 0) {
|
|
924
|
+
return [
|
|
925
|
+
...parts,
|
|
926
|
+
{
|
|
927
|
+
type: "tool",
|
|
928
|
+
id: event.id,
|
|
929
|
+
name: "tool",
|
|
930
|
+
description: "tool",
|
|
931
|
+
status: event.isError ? "error" : "running",
|
|
932
|
+
result: event.content,
|
|
933
|
+
...event.parentId ? { parentId: event.parentId } : {}
|
|
934
|
+
}
|
|
935
|
+
];
|
|
936
|
+
}
|
|
937
|
+
return parts.map((p, i) => {
|
|
938
|
+
if (i !== existing || p.type !== "tool") return p;
|
|
939
|
+
if (p.status === "done" || p.status === "error") return p;
|
|
940
|
+
return {
|
|
941
|
+
...p,
|
|
942
|
+
result: event.content ?? p.result
|
|
943
|
+
};
|
|
944
|
+
});
|
|
945
|
+
}
|
|
919
946
|
if (existing < 0) {
|
|
920
947
|
return [
|
|
921
948
|
...parts,
|
|
@@ -1568,7 +1595,7 @@ var claudeAdapter = {
|
|
|
1568
1595
|
);
|
|
1569
1596
|
}
|
|
1570
1597
|
const mode = permissionMode(thread);
|
|
1571
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
1598
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-SBKXKQFS.js");
|
|
1572
1599
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
1573
1600
|
const injectedServers = await buildInjectedMcpServers({
|
|
1574
1601
|
includeSideboard: true,
|
|
@@ -2031,13 +2058,22 @@ var codexAdapter = {
|
|
|
2031
2058
|
const events = [
|
|
2032
2059
|
{ type: "tool_use", id: item.id, name: "Bash", input }
|
|
2033
2060
|
];
|
|
2034
|
-
|
|
2061
|
+
const finished = type === "item.completed" || item.status === "completed" || item.status === "failed";
|
|
2062
|
+
const output = typeof item.aggregated_output === "string" && item.aggregated_output ? item.aggregated_output : void 0;
|
|
2063
|
+
if (finished) {
|
|
2035
2064
|
events.push({
|
|
2036
2065
|
type: "tool_result",
|
|
2037
2066
|
id: item.id,
|
|
2038
|
-
content:
|
|
2067
|
+
content: output,
|
|
2039
2068
|
isError: item.status === "failed"
|
|
2040
2069
|
});
|
|
2070
|
+
} else if (output) {
|
|
2071
|
+
events.push({
|
|
2072
|
+
type: "tool_result",
|
|
2073
|
+
id: item.id,
|
|
2074
|
+
content: output,
|
|
2075
|
+
partial: true
|
|
2076
|
+
});
|
|
2041
2077
|
}
|
|
2042
2078
|
return events.length === 1 ? events[0] : events;
|
|
2043
2079
|
}
|
|
@@ -2259,6 +2295,7 @@ var cursorAdapter = {
|
|
|
2259
2295
|
const req = {
|
|
2260
2296
|
prompt,
|
|
2261
2297
|
cwd: thread.worktreePath,
|
|
2298
|
+
threadId: thread.id,
|
|
2262
2299
|
agentId,
|
|
2263
2300
|
model: thread.model,
|
|
2264
2301
|
effort: thread.effort,
|
|
@@ -2504,13 +2541,16 @@ var opencodeAdapter = {
|
|
|
2504
2541
|
);
|
|
2505
2542
|
const events = [{ type: "tool_use", id, name, input }];
|
|
2506
2543
|
const output = state?.output;
|
|
2507
|
-
|
|
2544
|
+
const finished = state?.status === "completed" || state?.status === "error" || state?.status === "failed";
|
|
2545
|
+
const running = state?.status === "running" || state?.status === "in_progress" || state?.status === "pending";
|
|
2546
|
+
if (output != null || finished) {
|
|
2508
2547
|
const content = typeof output === "string" ? output : output != null ? JSON.stringify(output) : formatUnknownDetail(state?.error) || void 0;
|
|
2509
2548
|
events.push({
|
|
2510
2549
|
type: "tool_result",
|
|
2511
2550
|
id,
|
|
2512
2551
|
content,
|
|
2513
|
-
isError: state?.status === "error" || state?.status === "failed"
|
|
2552
|
+
isError: state?.status === "error" || state?.status === "failed",
|
|
2553
|
+
...running && !finished ? { partial: true } : {}
|
|
2514
2554
|
});
|
|
2515
2555
|
}
|
|
2516
2556
|
return events.length === 1 ? events[0] : events;
|
|
@@ -2545,14 +2585,17 @@ var opencodeAdapter = {
|
|
|
2545
2585
|
withEventParentId({ type: "tool_use", id, name, input }, parentId)
|
|
2546
2586
|
];
|
|
2547
2587
|
const output = state?.output ?? part.output;
|
|
2548
|
-
|
|
2588
|
+
const finished = state?.status === "completed" || state?.status === "error" || state?.status === "failed";
|
|
2589
|
+
const running = state?.status === "running" || state?.status === "in_progress" || state?.status === "pending";
|
|
2590
|
+
if (output != null || finished) {
|
|
2549
2591
|
nested.push(
|
|
2550
2592
|
withEventParentId(
|
|
2551
2593
|
{
|
|
2552
2594
|
type: "tool_result",
|
|
2553
2595
|
id,
|
|
2554
2596
|
content: typeof output === "string" ? output : output != null ? JSON.stringify(output) : void 0,
|
|
2555
|
-
isError: state?.status === "error" || state?.status === "failed"
|
|
2597
|
+
isError: state?.status === "error" || state?.status === "failed",
|
|
2598
|
+
...running && !finished ? { partial: true } : {}
|
|
2556
2599
|
},
|
|
2557
2600
|
parentId
|
|
2558
2601
|
)
|
|
@@ -3107,6 +3150,7 @@ export {
|
|
|
3107
3150
|
toolDescription,
|
|
3108
3151
|
isSubagentToolName,
|
|
3109
3152
|
isPollWrapperToolName,
|
|
3153
|
+
isShellToolName,
|
|
3110
3154
|
toolActivityLine,
|
|
3111
3155
|
liveActivitySummary,
|
|
3112
3156
|
messagePartParentId,
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
enrichWorkspacesWithGithub,
|
|
8
8
|
ensureGlobalCoordinatorCwd,
|
|
9
9
|
formatWorkspaceInventory
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-X3NIPGQT.js";
|
|
11
|
+
import "./chunk-VGPLXQIH.js";
|
|
12
12
|
import "./chunk-FKOIHGKV.js";
|
|
13
13
|
import "./chunk-4NR5FL46.js";
|
|
14
14
|
import "./chunk-4TR3HZFT.js";
|
|
15
15
|
import "./chunk-JT7R45JB.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-HPAWHIZ3.js";
|
|
17
17
|
import "./chunk-77WWLBCI.js";
|
|
18
18
|
import "./chunk-QZQEXME2.js";
|
|
19
19
|
import "./chunk-DVM4ID64.js";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
enrichWorkspacesWithGithub,
|
|
10
10
|
ensureGlobalCoordinatorCwd,
|
|
11
11
|
formatWorkspaceInventory
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-XTZQL7OU.js";
|
|
13
|
+
import "./chunk-WCU3FHEI.js";
|
|
14
14
|
import "./chunk-B3SJXYIJ.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-RG737OWT.js";
|
|
16
16
|
import "./chunk-KPIYENTF.js";
|
|
17
17
|
import "./chunk-SGEVS5SY.js";
|
|
18
18
|
import "./chunk-NSTQ6QKD.js";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
appDataDir
|
|
5
|
+
} from "./chunk-BD2ICC4D.js";
|
|
6
|
+
|
|
7
|
+
// src/agents/cursor-recover.ts
|
|
8
|
+
import { existsSync, readFileSync } from "fs";
|
|
9
|
+
|
|
10
|
+
// src/agents/cursor-store.ts
|
|
11
|
+
import { join } from "path";
|
|
12
|
+
var CURSOR_SDK_STORE_DIR = "cursor-sdk-store";
|
|
13
|
+
function cursorSdkStoreDir(threadId) {
|
|
14
|
+
const root = join(appDataDir(), CURSOR_SDK_STORE_DIR);
|
|
15
|
+
const id = sanitizeCursorStoreSegment(threadId);
|
|
16
|
+
if (!id) return root;
|
|
17
|
+
return join(root, "threads", id);
|
|
18
|
+
}
|
|
19
|
+
function cursorSdkRunsNdjsonPath(threadId) {
|
|
20
|
+
return join(cursorSdkStoreDir(threadId), "runs.ndjson");
|
|
21
|
+
}
|
|
22
|
+
function cursorSdkRunsNdjsonSearchPaths(threadId) {
|
|
23
|
+
const scoped = cursorSdkRunsNdjsonPath(threadId);
|
|
24
|
+
const shared = cursorSdkRunsNdjsonPath(null);
|
|
25
|
+
if (!threadId || !sanitizeCursorStoreSegment(threadId) || scoped === shared) {
|
|
26
|
+
return [shared];
|
|
27
|
+
}
|
|
28
|
+
return [scoped, shared];
|
|
29
|
+
}
|
|
30
|
+
function sanitizeCursorStoreSegment(threadId) {
|
|
31
|
+
return (threadId ?? "").trim().replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// src/agents/cursor-recover.ts
|
|
35
|
+
function recoverFinishedCursorRun(opts) {
|
|
36
|
+
const agentId = opts.agentId.trim();
|
|
37
|
+
if (!agentId) return null;
|
|
38
|
+
let best = null;
|
|
39
|
+
for (const runsPath of cursorSdkRunsNdjsonSearchPaths(opts.threadId)) {
|
|
40
|
+
const hit = scanFinishedCursorRuns(runsPath, agentId, opts.startedAfterMs);
|
|
41
|
+
if (hit && (!best || hit.endedAt >= best.endedAt)) best = hit;
|
|
42
|
+
}
|
|
43
|
+
return best;
|
|
44
|
+
}
|
|
45
|
+
function scanFinishedCursorRuns(runsPath, agentId, startedAfterMs) {
|
|
46
|
+
if (!existsSync(runsPath)) return null;
|
|
47
|
+
try {
|
|
48
|
+
const lines = readFileSync(runsPath, "utf8").split("\n");
|
|
49
|
+
let best = null;
|
|
50
|
+
for (const line of lines) {
|
|
51
|
+
const trimmed = line.trim();
|
|
52
|
+
if (!trimmed) continue;
|
|
53
|
+
let row;
|
|
54
|
+
try {
|
|
55
|
+
row = JSON.parse(trimmed);
|
|
56
|
+
} catch {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (row.agentId !== agentId) continue;
|
|
60
|
+
if (row.status !== "finished") continue;
|
|
61
|
+
if (typeof row.result !== "string" || !row.result.trim()) continue;
|
|
62
|
+
const endedAt = typeof row.endedAt === "number" ? row.endedAt : 0;
|
|
63
|
+
const createdAt = typeof row.createdAt === "number" ? row.createdAt : 0;
|
|
64
|
+
if (createdAt < startedAfterMs && endedAt < startedAfterMs) continue;
|
|
65
|
+
if (!best || endedAt >= best.endedAt) {
|
|
66
|
+
best = { runId: row.runId || "", result: row.result.trim(), endedAt };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return best;
|
|
70
|
+
} catch {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
recoverFinishedCursorRun
|
|
76
|
+
};
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
2
|
+
cursorSdkRunsNdjsonSearchPaths
|
|
3
|
+
} from "./chunk-VHX673DI.js";
|
|
4
|
+
import "./chunk-QZQEXME2.js";
|
|
6
5
|
|
|
7
6
|
// src/agents/cursor-recover.ts
|
|
8
7
|
import { existsSync, readFileSync } from "fs";
|
|
9
|
-
import { join } from "path";
|
|
10
8
|
function recoverFinishedCursorRun(opts) {
|
|
11
9
|
const agentId = opts.agentId.trim();
|
|
12
10
|
if (!agentId) return null;
|
|
13
|
-
|
|
11
|
+
let best = null;
|
|
12
|
+
for (const runsPath of cursorSdkRunsNdjsonSearchPaths(opts.threadId)) {
|
|
13
|
+
const hit = scanFinishedCursorRuns(runsPath, agentId, opts.startedAfterMs);
|
|
14
|
+
if (hit && (!best || hit.endedAt >= best.endedAt)) best = hit;
|
|
15
|
+
}
|
|
16
|
+
return best;
|
|
17
|
+
}
|
|
18
|
+
function scanFinishedCursorRuns(runsPath, agentId, startedAfterMs) {
|
|
14
19
|
if (!existsSync(runsPath)) return null;
|
|
15
20
|
try {
|
|
16
21
|
const lines = readFileSync(runsPath, "utf8").split("\n");
|
|
@@ -29,7 +34,7 @@ function recoverFinishedCursorRun(opts) {
|
|
|
29
34
|
if (typeof row.result !== "string" || !row.result.trim()) continue;
|
|
30
35
|
const endedAt = typeof row.endedAt === "number" ? row.endedAt : 0;
|
|
31
36
|
const createdAt = typeof row.createdAt === "number" ? row.createdAt : 0;
|
|
32
|
-
if (createdAt <
|
|
37
|
+
if (createdAt < startedAfterMs && endedAt < startedAfterMs) continue;
|
|
33
38
|
if (!best || endedAt >= best.endedAt) {
|
|
34
39
|
best = { runId: row.runId || "", result: row.result.trim(), endedAt };
|
|
35
40
|
}
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
orchestratorSessionPoisonedByBuiltins,
|
|
16
16
|
slackCoordinatorSourceRef,
|
|
17
17
|
takenTeamSlugsForOrchestration
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-4WV7C7WP.js";
|
|
19
|
+
import "./chunk-X3NIPGQT.js";
|
|
20
|
+
import "./chunk-VGPLXQIH.js";
|
|
21
21
|
import "./chunk-FKOIHGKV.js";
|
|
22
22
|
import "./chunk-4NR5FL46.js";
|
|
23
23
|
import "./chunk-4TR3HZFT.js";
|
|
24
24
|
import "./chunk-JT7R45JB.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-HPAWHIZ3.js";
|
|
26
26
|
import "./chunk-77WWLBCI.js";
|
|
27
27
|
import {
|
|
28
28
|
globalAgentCwd
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
orchestratorSessionPoisonedByBuiltins,
|
|
18
18
|
slackCoordinatorSourceRef,
|
|
19
19
|
takenTeamSlugsForOrchestration
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-4NAW5BAQ.js";
|
|
21
|
+
import "./chunk-XTZQL7OU.js";
|
|
22
|
+
import "./chunk-WCU3FHEI.js";
|
|
23
23
|
import "./chunk-B3SJXYIJ.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-RG737OWT.js";
|
|
25
25
|
import "./chunk-KPIYENTF.js";
|
|
26
26
|
import "./chunk-SGEVS5SY.js";
|
|
27
27
|
import "./chunk-NSTQ6QKD.js";
|