@sideboard-ai/core 0.1.168 → 0.1.170
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-BMS53RIZ.js → abletime-ESVTHTFH.js} +2 -2
- package/dist/{abletime-AGF54TNA.js → abletime-IC2V7CNB.js} +2 -2
- package/dist/{agents-TSO4MB3X.js → agents-GOBVOXFG.js} +9 -9
- package/dist/{agents-KWJXZAHB.js → agents-ZCIMZHXZ.js} +9 -9
- package/dist/{app-settings-BRLZQA7N.js → app-settings-LF3TS7XS.js} +5 -1
- package/dist/{app-settings-JJQDWPEK.js → app-settings-VMOTQORT.js} +5 -1
- package/dist/{chunk-74TWOSQP.js → chunk-3C4B52TS.js} +78 -42
- package/dist/{chunk-CVZ4KXVP.js → chunk-7IUO67CW.js} +122 -2
- package/dist/{chunk-HSGSQA42.js → chunk-DHPZW2EA.js} +8 -34
- package/dist/{chunk-KJFFQAMA.js → chunk-DKLGWRWC.js} +1 -1
- package/dist/{chunk-NYMFNUT5.js → chunk-GQHVICNT.js} +194 -147
- package/dist/{chunk-ILXKJ4ZD.js → chunk-NB7TEKCF.js} +1 -1
- package/dist/{chunk-RS756MKF.js → chunk-P2VCMIZU.js} +8 -34
- package/dist/{chunk-UIR4VDYA.js → chunk-SAZIRJR4.js} +30 -10
- package/dist/{chunk-UVLPL2FJ.js → chunk-TEI72FYD.js} +198 -216
- package/dist/{chunk-3A54S244.js → chunk-UDEWGTP6.js} +29 -10
- package/dist/{chunk-TW5A2HFY.js → chunk-Y7DJA3UW.js} +78 -42
- package/dist/{chunk-LTXS26K5.js → chunk-YMF5WCIA.js} +122 -2
- package/dist/{coordinator-prompt-75N74HAO.js → coordinator-prompt-JTDCEU74.js} +3 -3
- package/dist/{coordinator-prompt-Y372QRFE.js → coordinator-prompt-RRUU2OYO.js} +3 -3
- package/dist/{global-workspace-JNNFVSP7.js → global-workspace-4SI3CRRT.js} +3 -3
- package/dist/{global-workspace-TPE4LKVM.js → global-workspace-ZF6EJAM3.js} +3 -3
- package/dist/index.cjs +421 -278
- package/dist/index.d.cts +135 -37
- package/dist/index.d.ts +135 -37
- package/dist/index.js +33 -19
- package/dist/mcp/run-stdio.cjs +401 -207
- package/dist/mcp/run-stdio.js +8 -8
- package/dist/{orchestrator-XG3QCMOS.js → orchestrator-LE6L6MJC.js} +5 -5
- package/dist/{orchestrator-IIME6KXQ.js → orchestrator-UZSFTDKA.js} +5 -5
- package/dist/{workspaces-2IGQNFPL.js → workspaces-A7C3WA54.js} +3 -3
- package/dist/{workspaces-BWZSDSGG.js → workspaces-NOC2MWQV.js} +3 -3
- package/dist/{worktree-7X7XNSYL.js → worktree-GXO2VDQF.js} +12 -4
- package/dist/{worktree-5BFEK6PF.js → worktree-PODE23PD.js} +12 -4
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
resolveRepoRoot,
|
|
8
8
|
takenSlugsFromThread,
|
|
9
9
|
teamSlugFromName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y7DJA3UW.js";
|
|
11
11
|
import {
|
|
12
12
|
ATTACHMENTS_DIR,
|
|
13
13
|
attachmentsGitignoreBody
|
|
@@ -19,16 +19,18 @@ import {
|
|
|
19
19
|
writeThread
|
|
20
20
|
} from "./chunk-LZQULFIT.js";
|
|
21
21
|
import {
|
|
22
|
+
assertOrchestratorCapableAgent,
|
|
22
23
|
formatAccountProfilePlaybookLine,
|
|
23
24
|
formatProjectProfilePlaybookLines,
|
|
24
25
|
formatWorkspaceProfileSuffix,
|
|
25
26
|
loadAppSettings,
|
|
26
27
|
resolveAccountProfileFromSettings,
|
|
27
|
-
|
|
28
|
+
resolveNewOrchestratorOptions,
|
|
29
|
+
resolveOrchestratorDefaults,
|
|
28
30
|
resolveThreadDefaults,
|
|
29
31
|
resolveViewerProfile,
|
|
30
32
|
resolveViewerProfileForRepo
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YMF5WCIA.js";
|
|
32
34
|
import {
|
|
33
35
|
appDataDir,
|
|
34
36
|
globalAgentCwd,
|
|
@@ -288,30 +290,6 @@ function attachmentsFromWorktreePaths(worktreePath, relativePaths) {
|
|
|
288
290
|
return out;
|
|
289
291
|
}
|
|
290
292
|
|
|
291
|
-
// src/agents/orchestrator-capable.ts
|
|
292
|
-
var ORCHESTRATOR_AGENT_KINDS = [
|
|
293
|
-
"claude",
|
|
294
|
-
"codex",
|
|
295
|
-
"opencode",
|
|
296
|
-
"cursor"
|
|
297
|
-
];
|
|
298
|
-
function isOrchestratorCapableAgent(agent) {
|
|
299
|
-
return Boolean(
|
|
300
|
-
agent && ORCHESTRATOR_AGENT_KINDS.includes(agent)
|
|
301
|
-
);
|
|
302
|
-
}
|
|
303
|
-
function assertOrchestratorCapableAgent(agent, context = "orchestration") {
|
|
304
|
-
if (!isOrchestratorCapableAgent(agent)) {
|
|
305
|
-
throw new Error(
|
|
306
|
-
`${agent} cannot run ${context} \u2014 it does not support Sideboard MCP. Use Claude, Cursor, Codex, or OpenCode.`
|
|
307
|
-
);
|
|
308
|
-
}
|
|
309
|
-
return agent;
|
|
310
|
-
}
|
|
311
|
-
function coerceOrchestratorAgent(agent, fallback = "claude") {
|
|
312
|
-
return isOrchestratorCapableAgent(agent) ? agent : fallback;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
293
|
// src/orchestrator/coordinator-prompt.ts
|
|
316
294
|
import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
317
295
|
import { join as join2 } from "path";
|
|
@@ -617,7 +595,7 @@ function createGlobalChat(opts) {
|
|
|
617
595
|
const explicit = opts.title?.trim();
|
|
618
596
|
const title = explicit && explicit !== CLOUD_ORCHESTRATOR_GOAL ? explicit : allocateTeamName(takenTeamSlugsForOrchestration()).name;
|
|
619
597
|
const sourceRef = opts.sourceRef?.trim() || (isCloud ? CLOUD_ORCHESTRATOR_GOAL : title);
|
|
620
|
-
const resolved =
|
|
598
|
+
const resolved = resolveNewOrchestratorOptions({
|
|
621
599
|
agent: opts.agent,
|
|
622
600
|
model: opts.model,
|
|
623
601
|
effort: opts.effort,
|
|
@@ -693,7 +671,7 @@ function findSlackCoordinator(teamId, userId) {
|
|
|
693
671
|
);
|
|
694
672
|
}
|
|
695
673
|
function ensureSlackCoordinator(teamId, userId, agent, opts) {
|
|
696
|
-
const defaults =
|
|
674
|
+
const defaults = resolveOrchestratorDefaults();
|
|
697
675
|
const desired = assertOrchestratorCapableAgent(agent);
|
|
698
676
|
const ref = slackCoordinatorSourceRef(teamId, userId);
|
|
699
677
|
if (!opts?.forceNew) {
|
|
@@ -728,7 +706,7 @@ function ensureSlackCoordinator(teamId, userId, agent, opts) {
|
|
|
728
706
|
});
|
|
729
707
|
}
|
|
730
708
|
function ensureCloudCoordinator(agent) {
|
|
731
|
-
const defaults =
|
|
709
|
+
const defaults = resolveOrchestratorDefaults();
|
|
732
710
|
const desired = assertOrchestratorCapableAgent(agent);
|
|
733
711
|
const existing = findCloudCoordinator();
|
|
734
712
|
if (existing) {
|
|
@@ -869,10 +847,6 @@ export {
|
|
|
869
847
|
stageBuffersAsAttachments,
|
|
870
848
|
persistPendingFileAttachments,
|
|
871
849
|
attachmentsFromWorktreePaths,
|
|
872
|
-
ORCHESTRATOR_AGENT_KINDS,
|
|
873
|
-
isOrchestratorCapableAgent,
|
|
874
|
-
assertOrchestratorCapableAgent,
|
|
875
|
-
coerceOrchestratorAgent,
|
|
876
850
|
listWorkspaces,
|
|
877
851
|
addWorkspace,
|
|
878
852
|
removeWorkspace,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isOrchestratorThread
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DHPZW2EA.js";
|
|
4
4
|
import {
|
|
5
5
|
codexUnattendedGitConfigArgs,
|
|
6
6
|
mergeAgentGitAuthEnv,
|
|
7
7
|
resolveAgentGitAuthEnv,
|
|
8
8
|
resolveCodexGitWritableRoots
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3C4B52TS.js";
|
|
10
10
|
import {
|
|
11
11
|
applyConnectedTeamToCli,
|
|
12
12
|
brightsyMcpServerName,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
loadAppSettings,
|
|
38
38
|
resolveAgentExecutable,
|
|
39
39
|
resolveClaudeExecutable
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-7IUO67CW.js";
|
|
41
41
|
import {
|
|
42
42
|
isElectronLikeCommand,
|
|
43
43
|
unwrapStrippedElectronLaunch
|
|
@@ -171,22 +171,38 @@ function decodeBrightsyTarget(model) {
|
|
|
171
171
|
// src/agents/turn-input.ts
|
|
172
172
|
function normalizeTurnInput(input) {
|
|
173
173
|
if (typeof input === "string") return { prompt: input };
|
|
174
|
-
return {
|
|
174
|
+
return {
|
|
175
|
+
prompt: input.prompt,
|
|
176
|
+
cachedPrefix: input.cachedPrefix?.trim() || void 0,
|
|
177
|
+
systemPrompt: input.systemPrompt?.trim() || void 0
|
|
178
|
+
};
|
|
175
179
|
}
|
|
176
180
|
function dropCachedPrefixOnResume(input, sessionId) {
|
|
177
181
|
const turn = normalizeTurnInput(input);
|
|
178
|
-
if (sessionId)
|
|
182
|
+
if (sessionId) {
|
|
183
|
+
return turn.systemPrompt ? { prompt: turn.prompt, systemPrompt: turn.systemPrompt } : { prompt: turn.prompt };
|
|
184
|
+
}
|
|
179
185
|
return turn;
|
|
180
186
|
}
|
|
181
187
|
function flattenTurnInput(input) {
|
|
182
|
-
const { cachedPrefix, prompt } = normalizeTurnInput(input);
|
|
183
|
-
if (
|
|
184
|
-
return `${cachedPrefix}
|
|
188
|
+
const { cachedPrefix, prompt, systemPrompt } = normalizeTurnInput(input);
|
|
189
|
+
if (cachedPrefix) return `${cachedPrefix}
|
|
185
190
|
|
|
186
191
|
---
|
|
187
192
|
|
|
188
193
|
Current request:
|
|
189
194
|
${prompt}`;
|
|
195
|
+
if (systemPrompt) return `${systemPrompt}
|
|
196
|
+
|
|
197
|
+
${prompt}`;
|
|
198
|
+
return prompt;
|
|
199
|
+
}
|
|
200
|
+
function splitTurnInputForSystemPrompt(input) {
|
|
201
|
+
const turn = normalizeTurnInput(input);
|
|
202
|
+
return {
|
|
203
|
+
promptText: flattenTurnInput({ cachedPrefix: turn.cachedPrefix, prompt: turn.prompt }),
|
|
204
|
+
systemPrompt: turn.systemPrompt
|
|
205
|
+
};
|
|
190
206
|
}
|
|
191
207
|
function buildCachedUserContent(input) {
|
|
192
208
|
return [{ type: "text", text: flattenTurnInput(input) }];
|
|
@@ -1874,7 +1890,7 @@ var claudeAdapter = {
|
|
|
1874
1890
|
const claude = resolveClaudeExecutable();
|
|
1875
1891
|
const sessionId = await this.resolveSessionId(thread.worktreePath, thread.sessionId);
|
|
1876
1892
|
const effective = dropCachedPrefixOnResume(input, sessionId);
|
|
1877
|
-
const promptText =
|
|
1893
|
+
const { promptText, systemPrompt } = splitTurnInputForSystemPrompt(effective);
|
|
1878
1894
|
const useStdin = promptText.length > CLAUDE_PROMPT_ARG_MAX;
|
|
1879
1895
|
if (process.env.SIDEBOARD_DEBUG_CLAUDE_TURN === "1") {
|
|
1880
1896
|
console.error(
|
|
@@ -1882,7 +1898,7 @@ var claudeAdapter = {
|
|
|
1882
1898
|
);
|
|
1883
1899
|
}
|
|
1884
1900
|
const mode = permissionMode(thread);
|
|
1885
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
1901
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-ZF6EJAM3.js");
|
|
1886
1902
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
1887
1903
|
const injectedServers = await buildInjectedMcpServers({
|
|
1888
1904
|
includeSideboard: true,
|
|
@@ -1926,6 +1942,9 @@ var claudeAdapter = {
|
|
|
1926
1942
|
"--permission-mode",
|
|
1927
1943
|
mode.claude
|
|
1928
1944
|
];
|
|
1945
|
+
if (systemPrompt) {
|
|
1946
|
+
args.push("--append-system-prompt", systemPrompt);
|
|
1947
|
+
}
|
|
1929
1948
|
const mcpConfigPath = writeMcpServersConfig(injectedServers);
|
|
1930
1949
|
if (mcpConfigPath) {
|
|
1931
1950
|
args.push("--mcp-config", mcpConfigPath);
|
|
@@ -3622,6 +3641,7 @@ export {
|
|
|
3622
3641
|
normalizeTurnInput,
|
|
3623
3642
|
dropCachedPrefixOnResume,
|
|
3624
3643
|
flattenTurnInput,
|
|
3644
|
+
splitTurnInputForSystemPrompt,
|
|
3625
3645
|
buildCachedUserContent,
|
|
3626
3646
|
buildClaudeStreamJsonUserMessage,
|
|
3627
3647
|
findInvalidCacheControlTtlOrder,
|