@sideboard-ai/core 0.1.62 → 0.1.66

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.
Files changed (41) hide show
  1. package/dist/{agents-QLSFIQAO.js → agents-EWFD765A.js} +23 -7
  2. package/dist/{agents-KF3J3C53.js → agents-MD7SCFYX.js} +23 -7
  3. package/dist/{app-settings-LTSFG7QJ.js → app-settings-GJVZGU3M.js} +13 -3
  4. package/dist/{app-settings-HK4KAM4R.js → app-settings-ONKMFSEJ.js} +13 -3
  5. package/dist/{chunk-RIWUU7FO.js → chunk-5AG5BUQN.js} +61 -3
  6. package/dist/{chunk-27MAWNKY.js → chunk-AKPEXIKK.js} +2 -2
  7. package/dist/{chunk-2MCNURQV.js → chunk-BBEH2CJE.js} +264 -93
  8. package/dist/{chunk-DDN3UF4R.js → chunk-BPOTVI5J.js} +115 -3
  9. package/dist/{chunk-2FEA4LDA.js → chunk-DNPP7QMK.js} +31 -6
  10. package/dist/{chunk-MBAL5FE6.js → chunk-DZYMNW2A.js} +4 -4
  11. package/dist/{chunk-JB2H7E7V.js → chunk-EVD4KNKR.js} +1 -1
  12. package/dist/{chunk-A6FOKNOU.js → chunk-HTOTTJJX.js} +2 -2
  13. package/dist/{chunk-3KKNTHUC.js → chunk-I2KGRAXC.js} +1 -1
  14. package/dist/{chunk-ZF5YJCXO.js → chunk-IFAU2DEY.js} +269 -93
  15. package/dist/{chunk-NVU7EC2E.js → chunk-LRBRQFBU.js} +2 -2
  16. package/dist/{chunk-6CUJQKTJ.js → chunk-MHR4OGZ4.js} +115 -3
  17. package/dist/{chunk-46KMKHSD.js → chunk-PESJDZTB.js} +2 -2
  18. package/dist/{chunk-UGXSSBFJ.js → chunk-R7GUDEPY.js} +1 -1
  19. package/dist/{chunk-73AT5K4A.js → chunk-TXQ6K2GR.js} +61 -3
  20. package/dist/{chunk-DXTGDXO2.js → chunk-YTNLOJPK.js} +31 -6
  21. package/dist/{connected-teams-RSL4VB3X.js → connected-teams-CHXO5FFA.js} +2 -2
  22. package/dist/{connected-teams-MKIYKOYA.js → connected-teams-GJTESSTX.js} +2 -2
  23. package/dist/{coordinator-prompt-LKG3SHMI.js → coordinator-prompt-E5UGSJES.js} +4 -4
  24. package/dist/{coordinator-prompt-N2R6FGZK.js → coordinator-prompt-ILSULI7C.js} +4 -4
  25. package/dist/{global-workspace-LALWQWRJ.js → global-workspace-44UG64NA.js} +5 -6
  26. package/dist/{global-workspace-YOAUQCMA.js → global-workspace-5PM5LA6E.js} +5 -6
  27. package/dist/index.cjs +1308 -925
  28. package/dist/index.d.cts +92 -1
  29. package/dist/index.d.ts +92 -1
  30. package/dist/index.js +746 -715
  31. package/dist/mcp/run-stdio.cjs +1267 -976
  32. package/dist/mcp/run-stdio.js +691 -748
  33. package/dist/{run-HZTBWGQR.js → run-74S2NZWB.js} +1 -1
  34. package/dist/{run-GPSVV5OH.js → run-JLN5JK7Q.js} +1 -1
  35. package/dist/{workspaces-VCAIHVIE.js → workspaces-OVBCSS5Y.js} +6 -7
  36. package/dist/{workspaces-E75POJXP.js → workspaces-RXFXQRRF.js} +6 -7
  37. package/dist/{worktree-MV4WRW6G.js → worktree-K2JB53R5.js} +2 -2
  38. package/dist/{worktree-LZEGVQSN.js → worktree-S2N63FLV.js} +2 -2
  39. package/package.json +1 -1
  40. package/dist/chunk-GI7E5733.js +0 -30
  41. package/dist/chunk-S2LL5HA4.js +0 -33
@@ -50,16 +50,33 @@ var CLOUD_CONNECT_AGENTS = /* @__PURE__ */ new Set([
50
50
  "opencode",
51
51
  "cursor"
52
52
  ]);
53
+ function normalizeCliExecutable(raw) {
54
+ if (!raw || typeof raw !== "object") return {};
55
+ const source = raw;
56
+ const out = {};
57
+ if (typeof source.executablePath === "string") {
58
+ const path = source.executablePath.trim();
59
+ if (path) out.executablePath = path;
60
+ }
61
+ return out;
62
+ }
53
63
  function normalizeBrightsy(raw) {
54
64
  if (!raw || typeof raw !== "object") return {};
55
65
  const source = raw;
56
66
  const out = {};
67
+ if (typeof source.executablePath === "string") {
68
+ const path = source.executablePath.trim();
69
+ if (path) out.executablePath = path;
70
+ }
57
71
  if (typeof source.cloudConnectEnabled === "boolean") {
58
72
  out.cloudConnectEnabled = source.cloudConnectEnabled;
59
73
  }
60
74
  if (typeof source.cloudConnectAgent === "string" && CLOUD_CONNECT_AGENTS.has(source.cloudConnectAgent)) {
61
75
  out.cloudConnectAgent = source.cloudConnectAgent;
62
76
  }
77
+ if (typeof source.injectWorktreeMcp === "boolean") {
78
+ out.injectWorktreeMcp = source.injectWorktreeMcp;
79
+ }
63
80
  return out;
64
81
  }
65
82
  var ISSUE_SOURCES = /* @__PURE__ */ new Set(["linear", "github"]);
@@ -146,6 +163,8 @@ function normalizeAdvanced(raw) {
146
163
  function normalizeSettings(raw) {
147
164
  const env = {};
148
165
  let claude = {};
166
+ let codex = {};
167
+ let opencode = {};
149
168
  let brightsy = {};
150
169
  let integrations = {};
151
170
  let defaults = {};
@@ -164,6 +183,12 @@ function normalizeSettings(raw) {
164
183
  if ("claude" in raw) {
165
184
  claude = normalizeClaude(raw.claude);
166
185
  }
186
+ if ("codex" in raw) {
187
+ codex = normalizeCliExecutable(raw.codex);
188
+ }
189
+ if ("opencode" in raw) {
190
+ opencode = normalizeCliExecutable(raw.opencode);
191
+ }
167
192
  if ("brightsy" in raw) {
168
193
  brightsy = normalizeBrightsy(raw.brightsy);
169
194
  }
@@ -179,11 +204,22 @@ function normalizeSettings(raw) {
179
204
  advanced = normalizeAdvanced(raw.advanced);
180
205
  }
181
206
  }
182
- return { environment: env, claude, brightsy, integrations, defaults, advanced };
207
+ return {
208
+ environment: env,
209
+ claude,
210
+ codex,
211
+ opencode,
212
+ brightsy,
213
+ integrations,
214
+ defaults,
215
+ advanced
216
+ };
183
217
  }
184
218
  var EMPTY_SETTINGS = {
185
219
  environment: {},
186
220
  claude: {},
221
+ codex: {},
222
+ opencode: {},
187
223
  brightsy: {},
188
224
  integrations: {},
189
225
  defaults: {},
@@ -240,6 +276,13 @@ function updateClaudeSettings(patch) {
240
276
  function updateBrightsySettings(patch) {
241
277
  const current = loadAppSettings();
242
278
  const brightsy = { ...current.brightsy };
279
+ if ("executablePath" in patch) {
280
+ if (patch.executablePath == null || patch.executablePath.trim() === "") {
281
+ delete brightsy.executablePath;
282
+ } else {
283
+ brightsy.executablePath = patch.executablePath.trim();
284
+ }
285
+ }
243
286
  if (typeof patch.cloudConnectEnabled === "boolean") {
244
287
  brightsy.cloudConnectEnabled = patch.cloudConnectEnabled;
245
288
  }
@@ -250,8 +293,35 @@ function updateBrightsySettings(patch) {
250
293
  brightsy.cloudConnectAgent = patch.cloudConnectAgent;
251
294
  }
252
295
  }
296
+ if (typeof patch.injectWorktreeMcp === "boolean") {
297
+ brightsy.injectWorktreeMcp = patch.injectWorktreeMcp;
298
+ }
253
299
  return saveAppSettings({ ...current, brightsy });
254
300
  }
301
+ function updateCodexSettings(patch) {
302
+ const current = loadAppSettings();
303
+ const codex = { ...current.codex };
304
+ if ("executablePath" in patch) {
305
+ if (patch.executablePath == null || patch.executablePath.trim() === "") {
306
+ delete codex.executablePath;
307
+ } else {
308
+ codex.executablePath = patch.executablePath.trim();
309
+ }
310
+ }
311
+ return saveAppSettings({ ...current, codex });
312
+ }
313
+ function updateOpencodeSettings(patch) {
314
+ const current = loadAppSettings();
315
+ const opencode = { ...current.opencode };
316
+ if ("executablePath" in patch) {
317
+ if (patch.executablePath == null || patch.executablePath.trim() === "") {
318
+ delete opencode.executablePath;
319
+ } else {
320
+ opencode.executablePath = patch.executablePath.trim();
321
+ }
322
+ }
323
+ return saveAppSettings({ ...current, opencode });
324
+ }
255
325
  function updateIntegrationsSettings(patch) {
256
326
  const current = loadAppSettings();
257
327
  const integrations = { ...current.integrations };
@@ -359,6 +429,9 @@ function getLinearApiKey(settings = loadAppSettings()) {
359
429
  function brightsyCloudConnectEnabled(settings = loadAppSettings()) {
360
430
  return Boolean(settings.brightsy.cloudConnectEnabled);
361
431
  }
432
+ function brightsyInjectWorktreeMcpEnabled(settings = loadAppSettings()) {
433
+ return Boolean(settings.brightsy.injectWorktreeMcp);
434
+ }
362
435
  function brightsyCloudConnectAgent(settings = loadAppSettings()) {
363
436
  const fallback = settings.brightsy.cloudConnectAgent && CLOUD_CONNECT_AGENTS.has(settings.brightsy.cloudConnectAgent) ? settings.brightsy.cloudConnectAgent : "claude";
364
437
  const preferred = getDefaultAgent(settings);
@@ -453,8 +526,42 @@ function maxConcurrentAgents(settings = loadAppSettings()) {
453
526
  return 3;
454
527
  }
455
528
  function resolveClaudeExecutable(settings = loadAppSettings()) {
456
- const override = settings.claude.executablePath?.trim();
457
- return override || "claude";
529
+ return resolveAgentExecutable("claude", settings);
530
+ }
531
+ var DEFAULT_CLI_BIN = {
532
+ claude: "claude",
533
+ codex: "codex",
534
+ opencode: "opencode",
535
+ brightsy: "brightsy"
536
+ };
537
+ function resolveAgentExecutable(agent, settings = loadAppSettings()) {
538
+ const fallback = DEFAULT_CLI_BIN[agent];
539
+ if (agent === "claude") {
540
+ const override2 = settings.claude.executablePath?.trim();
541
+ return override2 || fallback;
542
+ }
543
+ if (agent === "codex") {
544
+ const override2 = settings.codex.executablePath?.trim();
545
+ return override2 || fallback;
546
+ }
547
+ if (agent === "opencode") {
548
+ const override2 = settings.opencode.executablePath?.trim();
549
+ return override2 || fallback;
550
+ }
551
+ const override = settings.brightsy.executablePath?.trim();
552
+ return override || fallback;
553
+ }
554
+ function updateAgentExecutable(agent, executablePath) {
555
+ if (agent === "claude") {
556
+ return updateClaudeSettings({ executablePath });
557
+ }
558
+ if (agent === "codex") {
559
+ return updateCodexSettings({ executablePath });
560
+ }
561
+ if (agent === "opencode") {
562
+ return updateOpencodeSettings({ executablePath });
563
+ }
564
+ return updateBrightsySettings({ executablePath });
458
565
  }
459
566
  function claudeChromeEnabled(settings = loadAppSettings()) {
460
567
  return Boolean(settings.claude.chromeEnabled);
@@ -492,6 +599,8 @@ export {
492
599
  updateAppEnvironment,
493
600
  updateClaudeSettings,
494
601
  updateBrightsySettings,
602
+ updateCodexSettings,
603
+ updateOpencodeSettings,
495
604
  updateIntegrationsSettings,
496
605
  updateDefaultsSettings,
497
606
  getDefaultAgent,
@@ -505,6 +614,7 @@ export {
505
614
  resolveEffectiveIssueSource,
506
615
  getLinearApiKey,
507
616
  brightsyCloudConnectEnabled,
617
+ brightsyInjectWorktreeMcpEnabled,
508
618
  brightsyCloudConnectAgent,
509
619
  updateAdvancedSettings,
510
620
  autoRenameBranchEnabled,
@@ -518,6 +628,8 @@ export {
518
628
  orchestrationQuotaFallbackAgent,
519
629
  maxConcurrentAgents,
520
630
  resolveClaudeExecutable,
631
+ resolveAgentExecutable,
632
+ updateAgentExecutable,
521
633
  claudeChromeEnabled,
522
634
  applyAppEnvironment,
523
635
  childEnvWithAppSettings,
@@ -1,16 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import {
4
- assertOrchestratorCapableAgent
5
- } from "./chunk-S2LL5HA4.js";
6
3
  import {
7
4
  ensureGlobalCoordinatorCwd
8
- } from "./chunk-NVU7EC2E.js";
5
+ } from "./chunk-LRBRQFBU.js";
9
6
  import {
10
7
  allocateTeamName,
11
8
  takenSlugsFromThread,
12
9
  teamSlugFromName
13
- } from "./chunk-3KKNTHUC.js";
10
+ } from "./chunk-I2KGRAXC.js";
14
11
  import {
15
12
  createEmptyThread,
16
13
  listThreads,
@@ -20,7 +17,7 @@ import {
20
17
  import {
21
18
  resolveNewThreadOptions,
22
19
  resolveThreadDefaults
23
- } from "./chunk-DDN3UF4R.js";
20
+ } from "./chunk-BPOTVI5J.js";
24
21
  import {
25
22
  globalAgentCwd
26
23
  } from "./chunk-7MV3RXSC.js";
@@ -47,6 +44,30 @@ var CLOUD_COORDINATOR_TIMEOUT_REPLY = [
47
44
  "What do you want me to do? (retry later, wait, force-stop, rephrase, or cancel)"
48
45
  ].join(" ");
49
46
 
47
+ // src/agents/orchestrator-capable.ts
48
+ var ORCHESTRATOR_AGENT_KINDS = [
49
+ "claude",
50
+ "codex",
51
+ "opencode",
52
+ "cursor"
53
+ ];
54
+ function isOrchestratorCapableAgent(agent) {
55
+ return Boolean(
56
+ agent && ORCHESTRATOR_AGENT_KINDS.includes(agent)
57
+ );
58
+ }
59
+ function assertOrchestratorCapableAgent(agent, context = "orchestration") {
60
+ if (!isOrchestratorCapableAgent(agent)) {
61
+ throw new Error(
62
+ `${agent} cannot run ${context} \u2014 it does not support Sideboard MCP. Use Claude, Cursor, Codex, or OpenCode.`
63
+ );
64
+ }
65
+ return agent;
66
+ }
67
+ function coerceOrchestratorAgent(agent, fallback = "claude") {
68
+ return isOrchestratorCapableAgent(agent) ? agent : fallback;
69
+ }
70
+
50
71
  // src/store/global-workspace.ts
51
72
  var GLOBAL_WORKSPACE_ID = "__global__";
52
73
  function isGlobalThread(thread) {
@@ -201,6 +222,10 @@ function ensureCloudCoordinator(agent) {
201
222
  }
202
223
 
203
224
  export {
225
+ ORCHESTRATOR_AGENT_KINDS,
226
+ isOrchestratorCapableAgent,
227
+ assertOrchestratorCapableAgent,
228
+ coerceOrchestratorAgent,
204
229
  GLOBAL_WORKSPACE_ID,
205
230
  isGlobalThread,
206
231
  isGlobalRepoPath,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-M37RITA6.js";
4
4
  import {
5
5
  run
6
- } from "./chunk-73AT5K4A.js";
6
+ } from "./chunk-TXQ6K2GR.js";
7
7
 
8
8
  // src/brightsy/connected-teams.ts
9
9
  import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
@@ -36,7 +36,7 @@ function saveBrightsyConfig(cfg) {
36
36
 
37
37
  // src/brightsy/accounts.ts
38
38
  async function loadConnectedTeams() {
39
- const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-MKIYKOYA.js");
39
+ const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-GJTESSTX.js");
40
40
  return listConnectedBrightsyTeams2();
41
41
  }
42
42
  async function runBrightsyTeamsJson(args) {
@@ -68,7 +68,7 @@ async function getBrightsySession() {
68
68
  const data = await runBrightsyTeamsJson([]);
69
69
  const accounts = Array.isArray(data.teams) ? data.teams : [];
70
70
  const active = data.active ?? accounts.find((a) => a.active) ?? null;
71
- const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-MKIYKOYA.js");
71
+ const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-GJTESSTX.js");
72
72
  const connectedTeams = ensureCliTeamTracked2(
73
73
  active ? { id: active.id, slug: active.slug, name: active.name } : void 0
74
74
  );
@@ -108,7 +108,7 @@ async function performBrightsyAccountSwitch(accountIdOrSlug) {
108
108
  return { cfg, target: data.active };
109
109
  }
110
110
  async function switchBrightsyAccount(accountIdOrSlug) {
111
- const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-MKIYKOYA.js");
111
+ const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-GJTESSTX.js");
112
112
  await connectBrightsyTeam2(accountIdOrSlug);
113
113
  return getBrightsySession();
114
114
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  run
5
- } from "./chunk-RIWUU7FO.js";
5
+ } from "./chunk-5AG5BUQN.js";
6
6
  import {
7
7
  appDataDir
8
8
  } from "./chunk-7MV3RXSC.js";
@@ -2,11 +2,11 @@
2
2
 
3
3
  import {
4
4
  isGlobalRepoPath
5
- } from "./chunk-2FEA4LDA.js";
5
+ } from "./chunk-DNPP7QMK.js";
6
6
  import {
7
7
  ensureGhPreferOrigin,
8
8
  resolveRepoRoot
9
- } from "./chunk-3KKNTHUC.js";
9
+ } from "./chunk-I2KGRAXC.js";
10
10
  import {
11
11
  appDataDir
12
12
  } from "./chunk-7MV3RXSC.js";
@@ -10,7 +10,7 @@ import {
10
10
  gh,
11
11
  git,
12
12
  resolveGhAuthToken
13
- } from "./chunk-RIWUU7FO.js";
13
+ } from "./chunk-5AG5BUQN.js";
14
14
  import {
15
15
  worktreesRoot
16
16
  } from "./chunk-7MV3RXSC.js";