@sideboard-ai/core 0.1.103 → 0.1.109
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.js +2 -2
- package/dist/{agents-UT5GCJH3.js → agents-XB332VUJ.js} +5 -5
- package/dist/{agents-XZBAKBO2.js → agents-YIMHDI46.js} +8 -8
- package/dist/{app-settings-VDJK2BZ2.js → app-settings-EBCVMFF6.js} +3 -1
- package/dist/{app-settings-EKJM2344.js → app-settings-IYSSVZHH.js} +4 -2
- package/dist/{chunk-XHZJJWLI.js → chunk-4LKD3PGO.js} +11 -1
- package/dist/{chunk-TLPJHLLM.js → chunk-4TR3HZFT.js} +1 -1
- package/dist/{chunk-HHLZWO7U.js → chunk-756EO4GK.js} +7 -7
- package/dist/{chunk-LANDJIAI.js → chunk-AY2EQI2P.js} +16 -13
- package/dist/{chunk-DHAGMJIK.js → chunk-EW7COXYE.js} +1 -1
- package/dist/{chunk-27MCESES.js → chunk-FBV6NK62.js} +2 -2
- package/dist/{chunk-ETMRBJKA.js → chunk-I2OJ2YSP.js} +10 -17
- package/dist/{chunk-WA3DVVWG.js → chunk-JVIW55KT.js} +1 -1
- package/dist/{chunk-H6LP57EF.js → chunk-KKHDPV45.js} +17 -16
- package/dist/chunk-LTPX5N6K.js +6991 -0
- package/dist/{chunk-WSYCND2U.js → chunk-NE4TOOKS.js} +11 -1
- package/dist/{chunk-ND6AO7C5.js → chunk-OQDIYVDD.js} +2 -2
- package/dist/chunk-Q6B3NRCT.js +7335 -0
- package/dist/{chunk-OW34MVDN.js → chunk-TROJ3PVH.js} +3 -3
- package/dist/{chunk-YJADJH5U.js → chunk-VRTKGKUW.js} +10 -17
- package/dist/{chunk-HUKCGRAT.js → chunk-WD2TARQS.js} +7 -2
- package/dist/{coordinator-prompt-UWHSD65V.js → coordinator-prompt-JKOU6BWV.js} +4 -4
- package/dist/{coordinator-prompt-3DFZRMXE.js → coordinator-prompt-V66BYTUV.js} +3 -3
- package/dist/{global-workspace-UR4E3CCG.js → global-workspace-NCTBE7G7.js} +5 -5
- package/dist/{global-workspace-KJQS5S2C.js → global-workspace-WBQWQQQY.js} +4 -4
- package/dist/index.cjs +11716 -10808
- package/dist/index.d.cts +162 -35
- package/dist/index.d.ts +162 -35
- package/dist/index.js +774 -7046
- package/dist/mcp/run-stdio.cjs +14582 -13657
- package/dist/mcp/run-stdio.js +400 -6706
- package/dist/orchestrator-6W7EKSPO.js +32 -0
- package/dist/orchestrator-JVGVPKLI.js +31 -0
- package/dist/{workspaces-NTIVI6DI.js → workspaces-I3554R3F.js} +5 -5
- package/dist/{workspaces-TKJXPNV4.js → workspaces-SUBEDSGB.js} +6 -6
- package/dist/{worktree-PEUPFAKL.js → worktree-2UWO7VEK.js} +3 -3
- package/dist/{worktree-NKWN5ZTS.js → worktree-7H6HB6GW.js} +2 -2
- package/package.json +2 -1
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
cursorSdkMessageToEvents,
|
|
7
7
|
ensureCursorRipgrepPath,
|
|
8
8
|
formatUnknownDetail
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-WD2TARQS.js";
|
|
10
10
|
import {
|
|
11
11
|
dropNestedElectronEnvFromProcess
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-4TR3HZFT.js";
|
|
13
13
|
import {
|
|
14
14
|
appDataDir
|
|
15
15
|
} from "../chunk-QZQEXME2.js";
|
|
@@ -32,19 +32,19 @@ import {
|
|
|
32
32
|
resolveCursorModelId,
|
|
33
33
|
resolveLoginCommand,
|
|
34
34
|
resolveQuotaFallbackAgent
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-AY2EQI2P.js";
|
|
36
36
|
import "./chunk-7YKXHBIW.js";
|
|
37
37
|
import {
|
|
38
38
|
ORCHESTRATOR_AGENT_KINDS,
|
|
39
39
|
assertOrchestratorCapableAgent,
|
|
40
40
|
coerceOrchestratorAgent,
|
|
41
41
|
isOrchestratorCapableAgent
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-TROJ3PVH.js";
|
|
43
|
+
import "./chunk-VRTKGKUW.js";
|
|
44
|
+
import "./chunk-JVIW55KT.js";
|
|
45
45
|
import "./chunk-B3SJXYIJ.js";
|
|
46
46
|
import "./chunk-P3BQ5DOL.js";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-NE4TOOKS.js";
|
|
48
48
|
import "./chunk-NSTQ6QKD.js";
|
|
49
49
|
import "./chunk-KGZBYWZ3.js";
|
|
50
50
|
import "./chunk-BD2ICC4D.js";
|
|
@@ -28,23 +28,23 @@ import {
|
|
|
28
28
|
resolveCursorModelId,
|
|
29
29
|
resolveLoginCommand,
|
|
30
30
|
resolveQuotaFallbackAgent
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KKHDPV45.js";
|
|
32
|
+
import "./chunk-2GO3YKBA.js";
|
|
32
33
|
import {
|
|
33
34
|
ORCHESTRATOR_AGENT_KINDS,
|
|
34
35
|
assertOrchestratorCapableAgent,
|
|
35
36
|
coerceOrchestratorAgent,
|
|
36
37
|
isOrchestratorCapableAgent
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-2GO3YKBA.js";
|
|
38
|
+
} from "./chunk-756EO4GK.js";
|
|
39
|
+
import "./chunk-I2OJ2YSP.js";
|
|
40
40
|
import {
|
|
41
41
|
cursorSdkMessageToEvents,
|
|
42
42
|
parseCursorRunnerLine
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-WD2TARQS.js";
|
|
44
|
+
import "./chunk-EW7COXYE.js";
|
|
45
45
|
import "./chunk-FKOIHGKV.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-4LKD3PGO.js";
|
|
47
|
+
import "./chunk-4TR3HZFT.js";
|
|
48
48
|
import "./chunk-JT7R45JB.js";
|
|
49
49
|
import "./chunk-KGSVLZV6.js";
|
|
50
50
|
import "./chunk-77WWLBCI.js";
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
brightsyInjectWorktreeMcpEnabled,
|
|
15
15
|
caffeinateWhileCloudConnectEnabled,
|
|
16
16
|
caffeinateWhileRunningEnabled,
|
|
17
|
+
caffeinateWhileSchedulesEnabled,
|
|
17
18
|
caffeinateWhileSlackListenEnabled,
|
|
18
19
|
childEnvWithAppSettings,
|
|
19
20
|
claudeChromeEnabled,
|
|
@@ -54,7 +55,7 @@ import {
|
|
|
54
55
|
updateDefaultsSettings,
|
|
55
56
|
updateIntegrationsSettings,
|
|
56
57
|
updateOpencodeSettings
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-NE4TOOKS.js";
|
|
58
59
|
import "./chunk-NSTQ6QKD.js";
|
|
59
60
|
import "./chunk-KGZBYWZ3.js";
|
|
60
61
|
import "./chunk-BD2ICC4D.js";
|
|
@@ -72,6 +73,7 @@ export {
|
|
|
72
73
|
brightsyInjectWorktreeMcpEnabled,
|
|
73
74
|
caffeinateWhileCloudConnectEnabled,
|
|
74
75
|
caffeinateWhileRunningEnabled,
|
|
76
|
+
caffeinateWhileSchedulesEnabled,
|
|
75
77
|
caffeinateWhileSlackListenEnabled,
|
|
76
78
|
childEnvWithAppSettings,
|
|
77
79
|
claudeChromeEnabled,
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
brightsyInjectWorktreeMcpEnabled,
|
|
13
13
|
caffeinateWhileCloudConnectEnabled,
|
|
14
14
|
caffeinateWhileRunningEnabled,
|
|
15
|
+
caffeinateWhileSchedulesEnabled,
|
|
15
16
|
caffeinateWhileSlackListenEnabled,
|
|
16
17
|
childEnvWithAppSettings,
|
|
17
18
|
claudeChromeEnabled,
|
|
@@ -52,8 +53,8 @@ import {
|
|
|
52
53
|
updateDefaultsSettings,
|
|
53
54
|
updateIntegrationsSettings,
|
|
54
55
|
updateOpencodeSettings
|
|
55
|
-
} from "./chunk-
|
|
56
|
-
import "./chunk-
|
|
56
|
+
} from "./chunk-4LKD3PGO.js";
|
|
57
|
+
import "./chunk-4TR3HZFT.js";
|
|
57
58
|
import "./chunk-JT7R45JB.js";
|
|
58
59
|
import "./chunk-77WWLBCI.js";
|
|
59
60
|
import "./chunk-QZQEXME2.js";
|
|
@@ -71,6 +72,7 @@ export {
|
|
|
71
72
|
brightsyInjectWorktreeMcpEnabled,
|
|
72
73
|
caffeinateWhileCloudConnectEnabled,
|
|
73
74
|
caffeinateWhileRunningEnabled,
|
|
75
|
+
caffeinateWhileSchedulesEnabled,
|
|
74
76
|
caffeinateWhileSlackListenEnabled,
|
|
75
77
|
childEnvWithAppSettings,
|
|
76
78
|
claudeChromeEnabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
stripNestedElectronEnv
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4TR3HZFT.js";
|
|
4
4
|
import {
|
|
5
5
|
chmodOwnerOnly,
|
|
6
6
|
writePrivateFile
|
|
@@ -424,6 +424,9 @@ function normalizeAdvanced(raw) {
|
|
|
424
424
|
} else if (typeof source.caffeinateWhileCloudConnect === "boolean") {
|
|
425
425
|
out.caffeinateWhileSlackListen = source.caffeinateWhileCloudConnect;
|
|
426
426
|
}
|
|
427
|
+
if (typeof source.caffeinateWhileSchedules === "boolean") {
|
|
428
|
+
out.caffeinateWhileSchedules = source.caffeinateWhileSchedules;
|
|
429
|
+
}
|
|
427
430
|
if (typeof source.deleteBranchOnPurge === "boolean") {
|
|
428
431
|
out.deleteBranchOnPurge = source.deleteBranchOnPurge;
|
|
429
432
|
}
|
|
@@ -955,6 +958,9 @@ function updateAdvancedSettings(patch) {
|
|
|
955
958
|
advanced.caffeinateWhileSlackListen = patch.caffeinateWhileCloudConnect;
|
|
956
959
|
delete advanced.caffeinateWhileCloudConnect;
|
|
957
960
|
}
|
|
961
|
+
if (typeof patch.caffeinateWhileSchedules === "boolean") {
|
|
962
|
+
advanced.caffeinateWhileSchedules = patch.caffeinateWhileSchedules;
|
|
963
|
+
}
|
|
958
964
|
if (typeof patch.deleteBranchOnPurge === "boolean") {
|
|
959
965
|
advanced.deleteBranchOnPurge = patch.deleteBranchOnPurge;
|
|
960
966
|
}
|
|
@@ -999,6 +1005,9 @@ function caffeinateWhileRunningEnabled(settings = loadAppSettings()) {
|
|
|
999
1005
|
function caffeinateWhileSlackListenEnabled(settings = loadAppSettings()) {
|
|
1000
1006
|
return Boolean(settings.advanced.caffeinateWhileSlackListen);
|
|
1001
1007
|
}
|
|
1008
|
+
function caffeinateWhileSchedulesEnabled(settings = loadAppSettings()) {
|
|
1009
|
+
return Boolean(settings.advanced.caffeinateWhileSchedules);
|
|
1010
|
+
}
|
|
1002
1011
|
function caffeinateWhileCloudConnectEnabled(settings = loadAppSettings()) {
|
|
1003
1012
|
return caffeinateWhileSlackListenEnabled(settings);
|
|
1004
1013
|
}
|
|
@@ -1141,6 +1150,7 @@ export {
|
|
|
1141
1150
|
autoRunAfterSetupEnabled,
|
|
1142
1151
|
caffeinateWhileRunningEnabled,
|
|
1143
1152
|
caffeinateWhileSlackListenEnabled,
|
|
1153
|
+
caffeinateWhileSchedulesEnabled,
|
|
1144
1154
|
caffeinateWhileCloudConnectEnabled,
|
|
1145
1155
|
deleteBranchOnPurgeEnabled,
|
|
1146
1156
|
autoArchiveOnMergeEnabled,
|
|
@@ -35,7 +35,7 @@ function isElectronLikeCommand(command) {
|
|
|
35
35
|
const name = command.trim();
|
|
36
36
|
if (!name) return false;
|
|
37
37
|
if (process.versions.electron && name === process.execPath) return true;
|
|
38
|
-
return /(?:^|[/\\])Electron(?:\.exe)?$/i.test(name) || /
|
|
38
|
+
return /(?:^|[/\\])Electron(?:\.exe)?$/i.test(name) || /(?:^|[/\\])Sideboard(?:\.exe)?$/i.test(name) || /(?:Sideboard|Electron)\.app[/\\]Contents[/\\]MacOS[/\\]/i.test(name);
|
|
39
39
|
}
|
|
40
40
|
function unwrapStrippedElectronLaunch(command, args) {
|
|
41
41
|
if (!isStrippedElectronLaunch(command, args) || !args || args.length < 4) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureGlobalCoordinatorCwd
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I2OJ2YSP.js";
|
|
4
4
|
import {
|
|
5
5
|
allocateTeamName,
|
|
6
6
|
takenSlugsFromThread,
|
|
7
7
|
teamSlugFromName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EW7COXYE.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveNewThreadOptions,
|
|
11
11
|
resolveThreadDefaults
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4LKD3PGO.js";
|
|
13
13
|
import {
|
|
14
14
|
createEmptyThread,
|
|
15
15
|
listThreads,
|
|
@@ -282,16 +282,16 @@ function ensureCloudCoordinator(agent) {
|
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
export {
|
|
285
|
+
ORCHESTRATOR_AGENT_KINDS,
|
|
286
|
+
isOrchestratorCapableAgent,
|
|
287
|
+
assertOrchestratorCapableAgent,
|
|
288
|
+
coerceOrchestratorAgent,
|
|
285
289
|
CLOUD_ORCHESTRATOR_GOAL,
|
|
286
290
|
SIDEBOARD_FORCE_STOP,
|
|
287
291
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
288
292
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
289
293
|
CLOUD_COORDINATOR_TIMEOUT_REPLY,
|
|
290
294
|
parseForceStopMessage,
|
|
291
|
-
ORCHESTRATOR_AGENT_KINDS,
|
|
292
|
-
isOrchestratorCapableAgent,
|
|
293
|
-
assertOrchestratorCapableAgent,
|
|
294
|
-
coerceOrchestratorAgent,
|
|
295
295
|
GLOBAL_WORKSPACE_ID,
|
|
296
296
|
isGlobalThread,
|
|
297
297
|
isGlobalRepoPath,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-7YKXHBIW.js";
|
|
10
10
|
import {
|
|
11
11
|
isOrchestratorThread
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TROJ3PVH.js";
|
|
13
13
|
import {
|
|
14
14
|
codexUnattendedGitConfigArgs,
|
|
15
15
|
mergeAgentGitAuthEnv,
|
|
16
16
|
resolveAgentGitAuthEnv,
|
|
17
17
|
resolveCodexGitWritableRoots
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JVIW55KT.js";
|
|
19
19
|
import {
|
|
20
20
|
claudeChromeEnabled,
|
|
21
21
|
isElectronLikeCommand,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
resolveClaudeExecutable,
|
|
25
25
|
unwrapStrippedElectronLaunch,
|
|
26
26
|
wrapElectronAsNodeLaunch
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-NE4TOOKS.js";
|
|
28
28
|
import {
|
|
29
29
|
appDataDir
|
|
30
30
|
} from "./chunk-BD2ICC4D.js";
|
|
@@ -78,6 +78,10 @@ function applyTurnUsage(current, incoming, scope = "request") {
|
|
|
78
78
|
const merged = mergeUsage(current, incoming);
|
|
79
79
|
return { ...merged, lastRequestTokens: requestOccupancy(incoming) };
|
|
80
80
|
}
|
|
81
|
+
function contextTokens(u) {
|
|
82
|
+
if (u.lastRequestTokens != null && u.lastRequestTokens > 0) return u.lastRequestTokens;
|
|
83
|
+
return requestOccupancy(u);
|
|
84
|
+
}
|
|
81
85
|
|
|
82
86
|
// src/agents/brightsy-targets.ts
|
|
83
87
|
function encodeBrightsyTarget(type, id, accountId) {
|
|
@@ -197,6 +201,8 @@ function summarizeTurnStderr(tail, maxChars = 500) {
|
|
|
197
201
|
if (tail.length === 0) return "";
|
|
198
202
|
const cursorStartup = [...tail].reverse().find((line) => /cursor startup failed:/i.test(line));
|
|
199
203
|
if (cursorStartup) return clipStderr(cursorStartup, maxChars);
|
|
204
|
+
const cursorRunFailed = [...tail].reverse().find((line) => /^cursor run failed\b/i.test(line.trim()));
|
|
205
|
+
if (cursorRunFailed) return clipStderr(cursorRunFailed, maxChars);
|
|
200
206
|
if (tail.some(looksLikeNestedElectronCrash)) return NESTED_ELECTRON_SUMMARY;
|
|
201
207
|
if (tail.some(looksLikeHomebrewLibuvCrash)) return HOMEBREW_LIBUV_SUMMARY;
|
|
202
208
|
if (tail.some(
|
|
@@ -227,7 +233,7 @@ function looksLikeRetryableRunnerCrash(text) {
|
|
|
227
233
|
const lower = text.trim().toLowerCase();
|
|
228
234
|
if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
|
|
229
235
|
if (!lower) return true;
|
|
230
|
-
return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
|
|
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(
|
|
231
237
|
lower
|
|
232
238
|
);
|
|
233
239
|
}
|
|
@@ -285,6 +291,9 @@ function humanizeAgentFailDetail(detail) {
|
|
|
285
291
|
if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
|
|
286
292
|
return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
|
|
287
293
|
}
|
|
294
|
+
if (/connection stalled/.test(lower)) {
|
|
295
|
+
return /retry the turn/i.test(raw) ? raw : `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
|
|
296
|
+
}
|
|
288
297
|
return raw;
|
|
289
298
|
}
|
|
290
299
|
function turnFailChatText(opts) {
|
|
@@ -895,14 +904,7 @@ var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
|
|
|
895
904
|
"mcp__sideboard__present_schema",
|
|
896
905
|
"mcp__sideboard__present_files",
|
|
897
906
|
"mcp__sideboard__ask_user",
|
|
898
|
-
"mcp__sideboard__present_plan"
|
|
899
|
-
"mcp__sideboard__list_teams",
|
|
900
|
-
"mcp__sideboard__slack_list_channels",
|
|
901
|
-
"mcp__sideboard__slack_list_users",
|
|
902
|
-
"mcp__sideboard__slack_search",
|
|
903
|
-
"mcp__sideboard__slack_read",
|
|
904
|
-
"mcp__sideboard__slack_post",
|
|
905
|
-
"mcp__sideboard__slack_replies"
|
|
907
|
+
"mcp__sideboard__present_plan"
|
|
906
908
|
];
|
|
907
909
|
var brightsyMcpCommandCache = null;
|
|
908
910
|
async function resolveBrightsyMcpCommand() {
|
|
@@ -1357,7 +1359,7 @@ var claudeAdapter = {
|
|
|
1357
1359
|
);
|
|
1358
1360
|
}
|
|
1359
1361
|
const mode = permissionMode(thread);
|
|
1360
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
1362
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-WBQWQQQY.js");
|
|
1361
1363
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
1362
1364
|
const injectedServers = await buildInjectedMcpServers({
|
|
1363
1365
|
includeSideboard: true,
|
|
@@ -2996,6 +2998,7 @@ export {
|
|
|
2996
2998
|
turnFailChatText,
|
|
2997
2999
|
formatTurnExitError,
|
|
2998
3000
|
applyTurnUsage,
|
|
3001
|
+
contextTokens,
|
|
2999
3002
|
encodeBrightsyTarget,
|
|
3000
3003
|
decodeBrightsyTarget,
|
|
3001
3004
|
parseBrightsyCliLine,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isGlobalRepoPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-756EO4GK.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureGhPreferOrigin,
|
|
6
6
|
resolveRepoRoot
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EW7COXYE.js";
|
|
8
8
|
import {
|
|
9
9
|
appDataDir
|
|
10
10
|
} from "./chunk-QZQEXME2.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveGithubRepoSlug
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EW7COXYE.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveThreadDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4LKD3PGO.js";
|
|
7
7
|
import {
|
|
8
8
|
globalAgentCwd,
|
|
9
9
|
sideboardReposDir
|
|
@@ -52,7 +52,8 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
52
52
|
"- list_models \u2014 only when you need a specific model (rare); otherwise omit model so Account defaults apply",
|
|
53
53
|
"- list_threads / get_thread \u2014 fleet status (what is going on)",
|
|
54
54
|
"- ask_user \u2014 composer multiple-choice only when blocked on a concrete choice (approach fork, which API). Never for hellos, check-ins, or invented \u201Cwhat should we do?\u201D menus \u2014 reply in chat. Explain options first, description on every option, then wait.",
|
|
55
|
-
"- set_caffeinate \u2014 keep this Mac awake across turns (macOS caffeinate). Turn on for Slack / away-from-keyboard work
|
|
55
|
+
"- set_caffeinate \u2014 keep this Mac awake across turns (macOS caffeinate). Turn on for Slack / away-from-keyboard work, overnight schedules, or when the user will be away. Turn OFF when they say they are done, wrapping up, going to sleep, or no longer need the machine awake. Closing this chat also releases it.",
|
|
56
|
+
"- list_schedules / create_schedule / update_schedule / delete_schedule / run_schedule \u2014 local jobs that send a prompt to an orchestration chat (threadId or self) or start a new Global chat (omit threadId). One-shot `at`, interval `every` (15m/1h/6h/1d), or 5-field `cron`. Recurring jobs without threadId open a new chat each run. Jobs fire only while Sideboard.app is running; sleep skips until wake. Overnight/unattended runs: ask the user to enable Settings \u2192 Advanced \u2192 Caffeinate while schedules are enabled, or call set_caffeinate.",
|
|
56
57
|
"Workspaces:",
|
|
57
58
|
"- add_workspace / remove_workspace \u2014 register or unregister a git repo",
|
|
58
59
|
"Worktree threads (chats):",
|
|
@@ -68,14 +69,14 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
68
69
|
"- list_run_scripts / run_dev_script / stop_dev_script \u2014 start/stop named run scripts",
|
|
69
70
|
"Inspect / review / PRs:",
|
|
70
71
|
"- get_diff \u2014 compact diff summary",
|
|
71
|
-
'- request_review \u2014 open a Review chat tab on a worktree thread (attaches .
|
|
72
|
+
'- request_review \u2014 open a Review chat tab on a worktree thread (attaches .claude/skills/review/SKILL.md when present, else seeds that skill / local guidelines; sends "Review changes in this workspace."); then wait_for_turn (loop while stillRunning) / get_turn_result on the returned id',
|
|
72
73
|
"- ask_git \u2014 commit & push, open a draft PR, resolve conflicts, or merge. When the worktree is clean, Sideboard pushes / opens the PR itself. When dirty, it queues the worktree agent \u2014 then wait_for_turn (loop while stillRunning). Prefer this over paraphrasing.",
|
|
73
74
|
'- Merge (`ask_git` action=merge / send_to_thread "Merge PR.") only when the user explicitly asked to merge that PR. Do not merge because the work looks done, CI is green, or a typical flow includes it.',
|
|
74
75
|
'- Or send_to_thread with those exact phrases: "Commit and push.", "Commit, push, and open a draft PR.", "Merge the remote branch (main) into your branch and resolve conflicts. Then, commit and push your changes.", "Merge PR." (draft PRs: `gh pr create --draft -R <origin-owner/name>` using the workspace `github:` slug \u2014 never upstream). Never run git/gh from this orchestration cwd, and never merge the PR yourself.',
|
|
75
76
|
"Process guides:",
|
|
76
77
|
"- Recurring multi-item / fan-out: if the child worktree has `.claude/skills/graph-engineering/SKILL.md`, tell the worker to follow it (`/graph-engineering`). Judge first; state on disk; grow the rulebook; do not patch three threads.",
|
|
77
|
-
"- Recurring shapes: have the worktree agent write `.claude/skills/<kebab-name>/SKILL.md` (commit it) so later threads and native Claude Code / attach see it. Do not use `.sideboard/skills
|
|
78
|
-
"- One-offs: no guide. Same miss across threads: edit the skill or `.
|
|
78
|
+
"- Recurring shapes: have the worktree agent write `.claude/skills/<kebab-name>/SKILL.md` (commit it) so later threads and native Claude Code / attach see it. Merge-review sentences go in `.claude/skills/review/SKILL.md` (create it \u2014 that is allowed). Do not use `.sideboard/skills/` (that folder only). Codex/OpenCode: one line in AGENTS.md pointing at that file.",
|
|
79
|
+
"- One-offs: no guide. Same miss across threads: edit the skill or `.claude/skills/review/SKILL.md`, then rerun the batch \u2014 do not patch three threads.",
|
|
79
80
|
"Human-only (do not attempt): ready-for-review land (confirm_land), purge_thread.",
|
|
80
81
|
"Thread links in replies: when mentioning a chat/thread for the user, include a markdown link `[Title](sideboard://thread/<id>)` using the full id (or the link field from create_thread / list_threads). Sideboard renders these as clickable opens.",
|
|
81
82
|
"Bash / Read / etc: allowed for (1) inspecting target worktrees / registered repo paths from MCP, and (2) greenfield setup under ~/sideboard/repos (git clone, gh repo create, git init+remote). Never git init/clone *inside* this synthetic home cwd \u2014 emptiness here is expected, not a bug."
|
|
@@ -96,19 +97,11 @@ function coordinatorTurnReminder(opts) {
|
|
|
96
97
|
const goal = opts.goal?.trim();
|
|
97
98
|
return [
|
|
98
99
|
"Sideboard Orchestration (mandatory):",
|
|
99
|
-
"- You oversee
|
|
100
|
-
|
|
101
|
-
"- Registered workspaces / child threads are the fleet you manage via Sideboard MCP.",
|
|
102
|
-
`- YOUR orchestration thread id is ${opts.parentId}`,
|
|
103
|
-
`- Always pass parentThreadId="${opts.parentId}" on create_thread (never invent or reuse another uuid).`,
|
|
104
|
-
`- Or omit parentThreadId \u2014 Sideboard MCP already binds children to ${opts.parentId}.`,
|
|
100
|
+
"- You oversee worktree agents from a synthetic empty cwd (not a git repo). Follow AGENTS.md / CLAUDE.md.",
|
|
101
|
+
`- YOUR orchestration thread id is ${opts.parentId} \u2014 pass parentThreadId="${opts.parentId}" on create_thread, or omit it.`,
|
|
105
102
|
goal ? `- Goal / title: ${goal}` : null,
|
|
106
103
|
accountDefaultsPlaybookLine(),
|
|
107
|
-
|
|
108
|
-
"- Existing repo: create_thread on a repoPath \u2192 send_to_thread \u2192 wait_for_turn. If stillRunning, the child is working (progress is tools/thinking) \u2014 wait_for_turn again; do not ping it. If status is error, lastError/text is the failure \u2014 adapt (switch agent, tell the user). Commit/push/draft PR with ask_git on the child, then wait_for_turn \u2014 never git/gh from this cwd. Call ask_git merge only if the user explicitly asked to merge.",
|
|
109
|
-
"- New repo: Bash (clone or gh repo create under ~/sideboard/repos/<name>) \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn (loop while stillRunning) \u2192 ask_git create-draft.",
|
|
110
|
-
"- When naming threads for the user, link them as `[Title](sideboard://thread/<id>)`.",
|
|
111
|
-
"- If they will wait on Slack or leave the Mac, call set_caffeinate enabled=true. When they say they are done / wrapping up / going to sleep, call set_caffeinate enabled=false. Closing this chat also turns it off."
|
|
104
|
+
"- Status: list_threads. Link chats as `[Title](sideboard://thread/<id>)`. Merge only if the user asked."
|
|
112
105
|
].filter(Boolean).join("\n");
|
|
113
106
|
}
|
|
114
107
|
function ensureGlobalCoordinatorCwd(opts) {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isOrchestratorThread
|
|
3
|
-
} from "./chunk-HHLZWO7U.js";
|
|
4
1
|
import {
|
|
5
2
|
applyConnectedTeamToCli,
|
|
6
3
|
brightsyMcpServerName,
|
|
@@ -8,6 +5,9 @@ import {
|
|
|
8
5
|
ensureConnectedBrightsyTeamTokens,
|
|
9
6
|
loadBrightsyConfig
|
|
10
7
|
} from "./chunk-2GO3YKBA.js";
|
|
8
|
+
import {
|
|
9
|
+
isOrchestratorThread
|
|
10
|
+
} from "./chunk-756EO4GK.js";
|
|
11
11
|
import {
|
|
12
12
|
applyNodeLaunch,
|
|
13
13
|
cursorRipgrepEnv,
|
|
@@ -19,23 +19,23 @@ import {
|
|
|
19
19
|
packagedMcpStdioPath,
|
|
20
20
|
parseCursorRunnerLine,
|
|
21
21
|
resolveNodeLaunch
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WD2TARQS.js";
|
|
23
23
|
import {
|
|
24
24
|
codexUnattendedGitConfigArgs,
|
|
25
25
|
mergeAgentGitAuthEnv,
|
|
26
26
|
resolveAgentGitAuthEnv,
|
|
27
27
|
resolveCodexGitWritableRoots
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-EW7COXYE.js";
|
|
29
29
|
import {
|
|
30
30
|
claudeChromeEnabled,
|
|
31
31
|
loadAppSettings,
|
|
32
32
|
resolveAgentExecutable,
|
|
33
33
|
resolveClaudeExecutable
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4LKD3PGO.js";
|
|
35
35
|
import {
|
|
36
36
|
isElectronLikeCommand,
|
|
37
37
|
unwrapStrippedElectronLaunch
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-4TR3HZFT.js";
|
|
39
39
|
import {
|
|
40
40
|
appDataDir
|
|
41
41
|
} from "./chunk-QZQEXME2.js";
|
|
@@ -536,6 +536,13 @@ import { fileURLToPath } from "url";
|
|
|
536
536
|
|
|
537
537
|
// src/mcp/profile.ts
|
|
538
538
|
var SIDEBOARD_MCP_PROFILE_ENV = "SIDEBOARD_MCP_PROFILE";
|
|
539
|
+
var WORKTREE_MCP_TOOLS = [
|
|
540
|
+
"present_artifact",
|
|
541
|
+
"ask_user",
|
|
542
|
+
"present_plan",
|
|
543
|
+
"present_schema",
|
|
544
|
+
"present_files"
|
|
545
|
+
];
|
|
539
546
|
function sideboardMcpProfile(env = process.env) {
|
|
540
547
|
return env[SIDEBOARD_MCP_PROFILE_ENV]?.trim().toLowerCase() === "worktree" ? "worktree" : "orchestration";
|
|
541
548
|
}
|
|
@@ -550,14 +557,7 @@ var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
|
|
|
550
557
|
"mcp__sideboard__present_schema",
|
|
551
558
|
"mcp__sideboard__present_files",
|
|
552
559
|
"mcp__sideboard__ask_user",
|
|
553
|
-
"mcp__sideboard__present_plan"
|
|
554
|
-
"mcp__sideboard__list_teams",
|
|
555
|
-
"mcp__sideboard__slack_list_channels",
|
|
556
|
-
"mcp__sideboard__slack_list_users",
|
|
557
|
-
"mcp__sideboard__slack_search",
|
|
558
|
-
"mcp__sideboard__slack_read",
|
|
559
|
-
"mcp__sideboard__slack_post",
|
|
560
|
-
"mcp__sideboard__slack_replies"
|
|
560
|
+
"mcp__sideboard__present_plan"
|
|
561
561
|
];
|
|
562
562
|
var BRIGHTSY_MCP_ALLOWED_TOOLS = [
|
|
563
563
|
"mcp__brightsy",
|
|
@@ -1019,7 +1019,7 @@ var claudeAdapter = {
|
|
|
1019
1019
|
);
|
|
1020
1020
|
}
|
|
1021
1021
|
const mode = permissionMode(thread);
|
|
1022
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
1022
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-NCTBE7G7.js");
|
|
1023
1023
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
1024
1024
|
const injectedServers = await buildInjectedMcpServers({
|
|
1025
1025
|
includeSideboard: true,
|
|
@@ -2443,6 +2443,7 @@ export {
|
|
|
2443
2443
|
mcpAllowTools,
|
|
2444
2444
|
mcpAuthWarnings,
|
|
2445
2445
|
SIDEBOARD_MCP_PROFILE_ENV,
|
|
2446
|
+
WORKTREE_MCP_TOOLS,
|
|
2446
2447
|
sideboardMcpProfile,
|
|
2447
2448
|
SIDEBOARD_MCP_ALLOWED_TOOLS,
|
|
2448
2449
|
BRIGHTSY_MCP_ALLOWED_TOOLS,
|