@sideboard-ai/core 0.1.45 → 0.1.46

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/index.cjs CHANGED
@@ -528,7 +528,7 @@ function normalizeAdvanced(raw) {
528
528
  if (source.orchestrationQuotaOnLimit === "switch_agent" || source.orchestrationQuotaOnLimit === "wait_reset") {
529
529
  out.orchestrationQuotaOnLimit = source.orchestrationQuotaOnLimit;
530
530
  }
531
- if (typeof source.orchestrationQuotaFallbackAgent === "string" && DEFAULT_AGENTS.has(source.orchestrationQuotaFallbackAgent)) {
531
+ if (typeof source.orchestrationQuotaFallbackAgent === "string" && DEFAULT_AGENTS.has(source.orchestrationQuotaFallbackAgent) && source.orchestrationQuotaFallbackAgent !== "brightsy") {
532
532
  out.orchestrationQuotaFallbackAgent = source.orchestrationQuotaFallbackAgent;
533
533
  }
534
534
  return out;
@@ -768,7 +768,7 @@ function updateAdvancedSettings(patch) {
768
768
  if (patch.orchestrationQuotaOnLimit === "switch_agent" || patch.orchestrationQuotaOnLimit === "wait_reset") {
769
769
  advanced.orchestrationQuotaOnLimit = patch.orchestrationQuotaOnLimit;
770
770
  }
771
- if (typeof patch.orchestrationQuotaFallbackAgent === "string" && DEFAULT_AGENTS.has(patch.orchestrationQuotaFallbackAgent)) {
771
+ if (typeof patch.orchestrationQuotaFallbackAgent === "string" && DEFAULT_AGENTS.has(patch.orchestrationQuotaFallbackAgent) && patch.orchestrationQuotaFallbackAgent !== "brightsy") {
772
772
  advanced.orchestrationQuotaFallbackAgent = patch.orchestrationQuotaFallbackAgent;
773
773
  }
774
774
  return saveAppSettings({ ...current, advanced });
@@ -796,7 +796,10 @@ function orchestrationQuotaOnLimit(settings = loadAppSettings()) {
796
796
  }
797
797
  function orchestrationQuotaFallbackAgent(settings = loadAppSettings()) {
798
798
  const preferred = settings.advanced.orchestrationQuotaFallbackAgent;
799
- return preferred && DEFAULT_AGENTS.has(preferred) ? preferred : "cursor";
799
+ if (preferred && DEFAULT_AGENTS.has(preferred) && preferred !== "brightsy") {
800
+ return preferred;
801
+ }
802
+ return "cursor";
800
803
  }
801
804
  function maxConcurrentAgents(settings = loadAppSettings()) {
802
805
  const n = settings.advanced.maxConcurrent;
@@ -1075,6 +1078,36 @@ var init_cloud_connect_constants = __esm({
1075
1078
  }
1076
1079
  });
1077
1080
 
1081
+ // src/agents/orchestrator-capable.ts
1082
+ function isOrchestratorCapableAgent(agent) {
1083
+ return Boolean(
1084
+ agent && ORCHESTRATOR_AGENT_KINDS.includes(agent)
1085
+ );
1086
+ }
1087
+ function assertOrchestratorCapableAgent(agent, context = "orchestration") {
1088
+ if (!isOrchestratorCapableAgent(agent)) {
1089
+ throw new Error(
1090
+ `${agent} cannot run ${context} \u2014 it does not support Sideboard MCP. Use Claude, Cursor, Codex, or OpenCode.`
1091
+ );
1092
+ }
1093
+ return agent;
1094
+ }
1095
+ function coerceOrchestratorAgent(agent, fallback = "claude") {
1096
+ return isOrchestratorCapableAgent(agent) ? agent : fallback;
1097
+ }
1098
+ var ORCHESTRATOR_AGENT_KINDS;
1099
+ var init_orchestrator_capable = __esm({
1100
+ "src/agents/orchestrator-capable.ts"() {
1101
+ "use strict";
1102
+ ORCHESTRATOR_AGENT_KINDS = [
1103
+ "claude",
1104
+ "codex",
1105
+ "opencode",
1106
+ "cursor"
1107
+ ];
1108
+ }
1109
+ });
1110
+
1078
1111
  // src/git/team-meta.ts
1079
1112
  var SOCCER_TEAM_META;
1080
1113
  var init_team_meta = __esm({
@@ -3312,6 +3345,7 @@ function createGlobalChat(opts) {
3312
3345
  const explicit = opts.title?.trim();
3313
3346
  const title = explicit && explicit !== CLOUD_ORCHESTRATOR_GOAL ? explicit : allocateTeamName(takenTeamSlugsForOrchestration()).name;
3314
3347
  const sourceRef = opts.sourceRef?.trim() || (isCloud ? CLOUD_ORCHESTRATOR_GOAL : title);
3348
+ const agent = assertOrchestratorCapableAgent(opts.agent);
3315
3349
  const thread = createEmptyThread({
3316
3350
  title,
3317
3351
  // Stick nicknames the same way chat tabs do (avoid later sync overwrites).
@@ -3321,7 +3355,7 @@ function createGlobalChat(opts) {
3321
3355
  branchName: "global",
3322
3356
  worktreePath: globalAgentCwd(),
3323
3357
  repoPath: GLOBAL_WORKSPACE_ID,
3324
- agent: opts.agent,
3358
+ agent,
3325
3359
  autonomy: opts.autonomy ?? "default",
3326
3360
  model: opts.model ?? null,
3327
3361
  effort: opts.effort ?? "high",
@@ -3383,6 +3417,7 @@ var init_global_workspace = __esm({
3383
3417
  "src/store/global-workspace.ts"() {
3384
3418
  "use strict";
3385
3419
  init_cloud_connect_constants();
3420
+ init_orchestrator_capable();
3386
3421
  init_teams();
3387
3422
  init_coordinator_prompt();
3388
3423
  init_paths();
@@ -4538,6 +4573,45 @@ async function buildInjectedMcpServers(opts) {
4538
4573
  }
4539
4574
  return servers;
4540
4575
  }
4576
+ function toCursorMcpServers(servers) {
4577
+ const out = {};
4578
+ for (const s of servers) {
4579
+ out[s.name] = {
4580
+ command: s.command,
4581
+ ...s.args ? { args: s.args } : {},
4582
+ ...s.env ? { env: s.env } : {}
4583
+ };
4584
+ }
4585
+ return out;
4586
+ }
4587
+ function toCodexMcpConfigArgs(servers) {
4588
+ const args = [];
4589
+ for (const s of servers) {
4590
+ const prefix = `mcp_servers.${s.name}`;
4591
+ args.push("-c", `${prefix}.command=${JSON.stringify(s.command)}`);
4592
+ if (s.args?.length) {
4593
+ args.push("-c", `${prefix}.args=${JSON.stringify(s.args)}`);
4594
+ }
4595
+ if (s.env) {
4596
+ for (const [key, value] of Object.entries(s.env)) {
4597
+ args.push("-c", `${prefix}.env.${key}=${JSON.stringify(value)}`);
4598
+ }
4599
+ }
4600
+ }
4601
+ return args;
4602
+ }
4603
+ function toOpencodeMcpConfigContent(servers) {
4604
+ const mcp = {};
4605
+ for (const s of servers) {
4606
+ mcp[s.name] = {
4607
+ type: "local",
4608
+ command: [s.command, ...s.args ?? []],
4609
+ enabled: true,
4610
+ ...s.env && Object.keys(s.env).length > 0 ? { environment: s.env } : {}
4611
+ };
4612
+ }
4613
+ return JSON.stringify({ mcp });
4614
+ }
4541
4615
  function writeMcpServersConfig(servers) {
4542
4616
  if (servers.length === 0) return null;
4543
4617
  const mcpServers = {};
@@ -5045,6 +5119,7 @@ var init_codex = __esm({
5045
5119
  import_node_path12 = require("path");
5046
5120
  init_run();
5047
5121
  init_error_detail();
5122
+ init_injected_mcp();
5048
5123
  init_turn_input();
5049
5124
  init_types();
5050
5125
  CODEX_PROMPT_ARG_MAX = 2e5;
@@ -5103,6 +5178,11 @@ var init_codex = __esm({
5103
5178
  }
5104
5179
  const mode = permissionMode(thread);
5105
5180
  const model = thread.model?.trim();
5181
+ const injected = await buildInjectedMcpServers({
5182
+ includeSideboard: true,
5183
+ includeBrightsy: isBrightsyConnected()
5184
+ });
5185
+ const mcpOverrides = toCodexMcpConfigArgs(injected);
5106
5186
  const args = [
5107
5187
  "exec",
5108
5188
  ...sessionId ? ["resume", sessionId] : [],
@@ -5114,7 +5194,8 @@ var init_codex = __esm({
5114
5194
  mode.codexSandbox,
5115
5195
  "--ask-for-approval",
5116
5196
  "never",
5117
- ...model ? ["--model", model] : []
5197
+ ...model ? ["--model", model] : [],
5198
+ ...mcpOverrides
5118
5199
  ];
5119
5200
  return {
5120
5201
  file: "codex",
@@ -5399,6 +5480,7 @@ var init_cursor = __esm({
5399
5480
  init_run();
5400
5481
  init_app_settings();
5401
5482
  init_cursor_events();
5483
+ init_injected_mcp();
5402
5484
  init_node_launch();
5403
5485
  init_turn_input();
5404
5486
  init_cursor_events();
@@ -5449,6 +5531,11 @@ var init_cursor = __esm({
5449
5531
  const prompt = flattenTurnInput(input);
5450
5532
  const agentId = await this.resolveSessionId(thread.worktreePath, thread.sessionId);
5451
5533
  const apiKey = resolveCursorApiKey() || void 0;
5534
+ const injected = await buildInjectedMcpServers({
5535
+ includeSideboard: true,
5536
+ includeBrightsy: isBrightsyConnected()
5537
+ });
5538
+ const mcpServers = toCursorMcpServers(injected);
5452
5539
  const req = {
5453
5540
  prompt,
5454
5541
  cwd: thread.worktreePath,
@@ -5457,7 +5544,8 @@ var init_cursor = __esm({
5457
5544
  effort: thread.effort,
5458
5545
  fast: thread.fast,
5459
5546
  planMode: thread.planMode,
5460
- apiKey
5547
+ apiKey,
5548
+ ...Object.keys(mcpServers).length > 0 ? { mcpServers } : {}
5461
5549
  };
5462
5550
  const runner = cursorRunnerPath();
5463
5551
  const isTs = runner.endsWith(".ts");
@@ -5551,6 +5639,7 @@ var init_opencode = __esm({
5551
5639
  "use strict";
5552
5640
  init_run();
5553
5641
  init_error_detail();
5642
+ init_injected_mcp();
5554
5643
  init_turn_input();
5555
5644
  init_types();
5556
5645
  FALLBACK_OPENCODE_MODELS = [
@@ -5611,6 +5700,11 @@ var init_opencode = __esm({
5611
5700
  if (model) {
5612
5701
  args.push("--model", model);
5613
5702
  }
5703
+ const injected = await buildInjectedMcpServers({
5704
+ includeSideboard: true,
5705
+ includeBrightsy: isBrightsyConnected()
5706
+ });
5707
+ const mcpContent = injected.length > 0 ? toOpencodeMcpConfigContent(injected) : null;
5614
5708
  return {
5615
5709
  file: "opencode",
5616
5710
  args,
@@ -5619,7 +5713,8 @@ var init_opencode = __esm({
5619
5713
  // message is given (see resolveRunInput in opencode's run.ts).
5620
5714
  stdin: prompt,
5621
5715
  env: {
5622
- OPENCODE_PERMISSION: mode.opencodePermission
5716
+ OPENCODE_PERMISSION: mode.opencodePermission,
5717
+ ...mcpContent ? { OPENCODE_CONFIG_CONTENT: mcpContent } : {}
5623
5718
  }
5624
5719
  };
5625
5720
  },
@@ -5915,7 +6010,10 @@ function zonedWallTimeToUtc(day, hour, minute, timeZone) {
5915
6010
  }
5916
6011
  }
5917
6012
  function resolveQuotaFallbackAgent(current, preferred) {
5918
- const ordered = preferred ? [preferred, ...FALLBACK_ORDER.filter((a) => a !== preferred)] : FALLBACK_ORDER;
6013
+ const ordered = [
6014
+ ...preferred && preferred !== "brightsy" ? [preferred] : [],
6015
+ ...FALLBACK_ORDER.filter((a) => a !== preferred)
6016
+ ];
5919
6017
  return ordered.find((a) => a !== current) ?? (current === "cursor" ? "codex" : "cursor");
5920
6018
  }
5921
6019
  var FALLBACK_ORDER;
@@ -5926,7 +6024,6 @@ var init_session_quota = __esm({
5926
6024
  "cursor",
5927
6025
  "codex",
5928
6026
  "opencode",
5929
- "brightsy",
5930
6027
  "claude"
5931
6028
  ];
5932
6029
  }
@@ -6113,11 +6210,14 @@ var init_install = __esm({
6113
6210
  var agents_exports = {};
6114
6211
  __export(agents_exports, {
6115
6212
  CLAUDE_MODEL_CATALOG: () => CLAUDE_MODEL_CATALOG,
6213
+ ORCHESTRATOR_AGENT_KINDS: () => ORCHESTRATOR_AGENT_KINDS,
6116
6214
  PLAN_MODE_INSTRUCTION: () => PLAN_MODE_INSTRUCTION,
6117
6215
  allAdapters: () => allAdapters,
6216
+ assertOrchestratorCapableAgent: () => assertOrchestratorCapableAgent,
6118
6217
  brightsyAdapter: () => brightsyAdapter,
6119
6218
  claudeAdapter: () => claudeAdapter,
6120
6219
  codexAdapter: () => codexAdapter,
6220
+ coerceOrchestratorAgent: () => coerceOrchestratorAgent,
6121
6221
  cursorAdapter: () => cursorAdapter,
6122
6222
  cursorSdkMessageToEvents: () => cursorSdkMessageToEvents,
6123
6223
  decodeBrightsyTarget: () => decodeBrightsyTarget,
@@ -6127,6 +6227,7 @@ __export(agents_exports, {
6127
6227
  getAgentSetupInfo: () => getAgentSetupInfo,
6128
6228
  installAgent: () => installAgent,
6129
6229
  isCursorAutoModel: () => isCursorAutoModel,
6230
+ isOrchestratorCapableAgent: () => isOrchestratorCapableAgent,
6130
6231
  isSessionQuotaLimit: () => isSessionQuotaLimit,
6131
6232
  listAgentSetupInfo: () => listAgentSetupInfo,
6132
6233
  listBrightsyChatTargets: () => listBrightsyChatTargets,
@@ -6169,6 +6270,7 @@ var init_agents = __esm({
6169
6270
  init_opencode();
6170
6271
  init_list_models();
6171
6272
  init_session_quota();
6273
+ init_orchestrator_capable();
6172
6274
  init_path();
6173
6275
  init_install();
6174
6276
  adapters = {
@@ -6278,6 +6380,7 @@ __export(index_exports, {
6278
6380
  GLOBAL_WORKSPACE_ID: () => GLOBAL_WORKSPACE_ID,
6279
6381
  HARNESS_ENV_KEYS: () => HARNESS_ENV_KEYS,
6280
6382
  MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS: () => MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
6383
+ ORCHESTRATOR_AGENT_KINDS: () => ORCHESTRATOR_AGENT_KINDS,
6281
6384
  Orchestrator: () => Orchestrator,
6282
6385
  PASTE_ATTACH_MIN_CHARS: () => PASTE_ATTACH_MIN_CHARS,
6283
6386
  PASTE_ATTACH_MIN_LINES: () => PASTE_ATTACH_MIN_LINES,
@@ -6302,6 +6405,7 @@ __export(index_exports, {
6302
6405
  applyAppEnvironment: () => applyAppEnvironment,
6303
6406
  applyCompaction: () => applyCompaction,
6304
6407
  applyThreadIntoMain: () => applyThreadIntoMain,
6408
+ assertOrchestratorCapableAgent: () => assertOrchestratorCapableAgent,
6305
6409
  attachmentFromAbsolutePath: () => attachmentFromAbsolutePath,
6306
6410
  attachmentsFromBuffers: () => attachmentsFromBuffers,
6307
6411
  attachmentsFromWorktreePaths: () => attachmentsFromWorktreePaths,
@@ -6334,6 +6438,7 @@ __export(index_exports, {
6334
6438
  cleanupOrphanWorktrees: () => cleanupOrphanWorktrees,
6335
6439
  cloneRepoIntoSideboard: () => cloneRepoIntoSideboard,
6336
6440
  codexAdapter: () => codexAdapter,
6441
+ coerceOrchestratorAgent: () => coerceOrchestratorAgent,
6337
6442
  collectTakenTeamSlugs: () => collectTakenTeamSlugs,
6338
6443
  commitAll: () => commitAll,
6339
6444
  conductorDbPath: () => conductorDbPath,
@@ -6438,6 +6543,7 @@ __export(index_exports, {
6438
6543
  isGlobalThread: () => isGlobalThread,
6439
6544
  isImageFilePath: () => isImageFilePath,
6440
6545
  isLinearConnected: () => isLinearConnected,
6546
+ isOrchestratorCapableAgent: () => isOrchestratorCapableAgent,
6441
6547
  isOrchestratorThread: () => isOrchestratorThread,
6442
6548
  isPidAlive: () => isPidAlive,
6443
6549
  isPlaceholderBranch: () => isPlaceholderBranch,
@@ -6790,6 +6896,7 @@ init_app_settings();
6790
6896
  init_global_workspace();
6791
6897
  init_brightsy();
6792
6898
  init_agents();
6899
+ init_orchestrator_capable();
6793
6900
 
6794
6901
  // src/agents/message-parts.ts
6795
6902
  function asRecord(input) {
@@ -7034,6 +7141,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
7034
7141
  const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await Promise.resolve().then(() => (init_coordinator_prompt(), coordinator_prompt_exports));
7035
7142
  ensureGlobalCoordinatorCwd2();
7036
7143
  }
7144
+ if (isOrchestratorThread(thread)) {
7145
+ assertOrchestratorCapableAgent(thread.agent);
7146
+ }
7037
7147
  const adapter = getAdapter(thread.agent);
7038
7148
  const cmd = await adapter.buildTurn(thread, input);
7039
7149
  if (cmd.cwd !== thread.worktreePath) {
@@ -9326,6 +9436,7 @@ var import_node_crypto4 = require("crypto");
9326
9436
  init_teams();
9327
9437
  init_worktree_labels();
9328
9438
  init_global_workspace();
9439
+ init_orchestrator_capable();
9329
9440
  init_thread_store();
9330
9441
  init_worktree_labels();
9331
9442
  function sameWorktreePath(a, b) {
@@ -9389,6 +9500,10 @@ function createChatTab(input) {
9389
9500
  const binding = worktreeBindingFrom(from);
9390
9501
  const explicitTitle = input.title?.trim();
9391
9502
  const title = explicitTitle || allocateTeamName(takenTeamSlugsForChatTab(binding.worktreePath)).name;
9503
+ const nextAgent = input.agent ?? from.agent;
9504
+ if (isOrchestratorThread(from) || binding.sourceType === "orchestration") {
9505
+ assertOrchestratorCapableAgent(nextAgent);
9506
+ }
9392
9507
  const thread = createEmptyThread({
9393
9508
  title,
9394
9509
  // Chat-tab nicknames (soccer team or explicit) must stick. Post-turn
@@ -9396,7 +9511,7 @@ function createChatTab(input) {
9396
9511
  // shared worktree folder name (e.g. fork "Arsenal" → "Monaco").
9397
9512
  userSetTitle: true,
9398
9513
  ...binding,
9399
- agent: input.agent ?? from.agent,
9514
+ agent: nextAgent,
9400
9515
  model: input.model !== void 0 ? input.model : input.agent && input.agent !== from.agent ? null : from.model,
9401
9516
  effort: input.effort !== void 0 ? input.effort : from.effort,
9402
9517
  fast: input.fast !== void 0 ? Boolean(input.fast) : from.fast,
@@ -9999,6 +10114,7 @@ async function cloneRepoIntoSideboard(opts) {
9999
10114
 
10000
10115
  // src/orchestrator/orchestrator.ts
10001
10116
  init_thread_store();
10117
+ init_orchestrator_capable();
10002
10118
 
10003
10119
  // src/review/request-review.ts
10004
10120
  var import_node_crypto5 = require("crypto");
@@ -11320,6 +11436,9 @@ var Orchestrator = class {
11320
11436
  `Cannot switch agent provider mid-chat (${thread.agent} \u2192 ${patch.agent}). Start a new chat tab instead.`
11321
11437
  );
11322
11438
  }
11439
+ if (isOrchestratorThread(thread)) {
11440
+ assertOrchestratorCapableAgent(patch.agent);
11441
+ }
11323
11442
  next.agent = patch.agent;
11324
11443
  if (patch.agent !== "claude" && patch.model === void 0) next.model = null;
11325
11444
  next.sessionId = null;
@@ -12029,7 +12148,7 @@ async function startMcpServer() {
12029
12148
  );
12030
12149
  server.tool(
12031
12150
  "fork_chat",
12032
- "Fork a chat into a NEW tab on the SAME workspace: worktree agent \u2192 same worktree tab; Global orchestration chat \u2192 new orchestration chat (same synthetic home). Seeds a transcript; optional agent override. Leave model unset for Auto unless you have a reason. Remote coordinators use this to continue an orchestration chat on another agent after session limits. Then send_to_thread / wait_for_turn on the returned id. Use fork_worktree only for worktree agents that need a new git worktree.",
12151
+ "Fork a chat into a NEW tab on the SAME workspace: worktree agent \u2192 same worktree tab; Global orchestration chat \u2192 new orchestration chat (same synthetic home). Seeds a transcript; optional agent override. Leave model unset for Auto unless you have a reason. Orchestration forks require an MCP-capable agent (claude, cursor, codex, opencode \u2014 not brightsy). Remote coordinators use this to continue an orchestration chat on another agent after session limits. Then send_to_thread / wait_for_turn on the returned id. Use fork_worktree only for worktree agents that need a new git worktree.",
12033
12152
  {
12034
12153
  ref: import_zod.z.string().describe("Thread id/ref to fork (worktree agent or orchestration chat)"),
12035
12154
  through_index: import_zod.z.number().optional().describe("Inclusive message index to include in the transcript (default: all)"),
@@ -12617,6 +12736,7 @@ init_injected_mcp();
12617
12736
  GLOBAL_WORKSPACE_ID,
12618
12737
  HARNESS_ENV_KEYS,
12619
12738
  MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
12739
+ ORCHESTRATOR_AGENT_KINDS,
12620
12740
  Orchestrator,
12621
12741
  PASTE_ATTACH_MIN_CHARS,
12622
12742
  PASTE_ATTACH_MIN_LINES,
@@ -12641,6 +12761,7 @@ init_injected_mcp();
12641
12761
  applyAppEnvironment,
12642
12762
  applyCompaction,
12643
12763
  applyThreadIntoMain,
12764
+ assertOrchestratorCapableAgent,
12644
12765
  attachmentFromAbsolutePath,
12645
12766
  attachmentsFromBuffers,
12646
12767
  attachmentsFromWorktreePaths,
@@ -12673,6 +12794,7 @@ init_injected_mcp();
12673
12794
  cleanupOrphanWorktrees,
12674
12795
  cloneRepoIntoSideboard,
12675
12796
  codexAdapter,
12797
+ coerceOrchestratorAgent,
12676
12798
  collectTakenTeamSlugs,
12677
12799
  commitAll,
12678
12800
  conductorDbPath,
@@ -12777,6 +12899,7 @@ init_injected_mcp();
12777
12899
  isGlobalThread,
12778
12900
  isImageFilePath,
12779
12901
  isLinearConnected,
12902
+ isOrchestratorCapableAgent,
12780
12903
  isOrchestratorThread,
12781
12904
  isPidAlive,
12782
12905
  isPlaceholderBranch,
package/dist/index.d.cts CHANGED
@@ -1231,6 +1231,15 @@ type CursorTurnRequest = {
1231
1231
  fast?: boolean;
1232
1232
  planMode?: boolean;
1233
1233
  apiKey?: string;
1234
+ /**
1235
+ * Inline MCP servers for this turn (Sideboard / Brightsy).
1236
+ * Must be passed on create and resume — Cursor does not persist them.
1237
+ */
1238
+ mcpServers?: Record<string, {
1239
+ command: string;
1240
+ args?: string[];
1241
+ env?: Record<string, string>;
1242
+ }>;
1234
1243
  };
1235
1244
  /** Subset of Cursor SDK stream messages we care about (keeps tests free of the SDK). */
1236
1245
  type CursorSdkStreamMessage = {
@@ -1305,9 +1314,20 @@ declare function listModelsForAgent(agent?: AgentKind): Promise<AgentModelCatalo
1305
1314
  declare function isSessionQuotaLimit(text: string): boolean;
1306
1315
  /** Best-effort parse of “resets 7:10pm (America/Los_Angeles)” / “resets in 2 hours”. */
1307
1316
  declare function parseSessionQuotaResetAt(text: string, now?: Date): Date | null;
1308
- /** Pick a different agent for quota failover (preferred first, then stable order). */
1317
+ /** Pick a different orchestrator-capable agent for quota failover. */
1309
1318
  declare function resolveQuotaFallbackAgent(current: AgentKind, preferred?: AgentKind | null): AgentKind;
1310
1319
 
1320
+ /**
1321
+ * Agents that Sideboard can inject Sideboard MCP into for fleet orchestration.
1322
+ * Brightsy CLI has no local MCP injection — it cannot be an orchestrator.
1323
+ */
1324
+ declare const ORCHESTRATOR_AGENT_KINDS: readonly ["claude", "codex", "opencode", "cursor"];
1325
+ type OrchestratorAgentKind = (typeof ORCHESTRATOR_AGENT_KINDS)[number];
1326
+ declare function isOrchestratorCapableAgent(agent: AgentKind | null | undefined): agent is OrchestratorAgentKind;
1327
+ declare function assertOrchestratorCapableAgent(agent: AgentKind, context?: string): OrchestratorAgentKind;
1328
+ /** Prefer a capable agent; fall back to Claude when the choice is unsupported. */
1329
+ declare function coerceOrchestratorAgent(agent: AgentKind | null | undefined, fallback?: OrchestratorAgentKind): OrchestratorAgentKind;
1330
+
1311
1331
  /**
1312
1332
  * Electron / GUI apps often inherit a minimal PATH that omits Homebrew and
1313
1333
  * user bin dirs where `claude` / `codex` / `opencode` / `brightsy` live. Call
@@ -2851,4 +2871,4 @@ declare function writeInjectedMcpConfig(opts: {
2851
2871
  includeBrightsy?: boolean;
2852
2872
  }): Promise<string | null>;
2853
2873
 
2854
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
2874
+ export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
package/dist/index.d.ts CHANGED
@@ -1231,6 +1231,15 @@ type CursorTurnRequest = {
1231
1231
  fast?: boolean;
1232
1232
  planMode?: boolean;
1233
1233
  apiKey?: string;
1234
+ /**
1235
+ * Inline MCP servers for this turn (Sideboard / Brightsy).
1236
+ * Must be passed on create and resume — Cursor does not persist them.
1237
+ */
1238
+ mcpServers?: Record<string, {
1239
+ command: string;
1240
+ args?: string[];
1241
+ env?: Record<string, string>;
1242
+ }>;
1234
1243
  };
1235
1244
  /** Subset of Cursor SDK stream messages we care about (keeps tests free of the SDK). */
1236
1245
  type CursorSdkStreamMessage = {
@@ -1305,9 +1314,20 @@ declare function listModelsForAgent(agent?: AgentKind): Promise<AgentModelCatalo
1305
1314
  declare function isSessionQuotaLimit(text: string): boolean;
1306
1315
  /** Best-effort parse of “resets 7:10pm (America/Los_Angeles)” / “resets in 2 hours”. */
1307
1316
  declare function parseSessionQuotaResetAt(text: string, now?: Date): Date | null;
1308
- /** Pick a different agent for quota failover (preferred first, then stable order). */
1317
+ /** Pick a different orchestrator-capable agent for quota failover. */
1309
1318
  declare function resolveQuotaFallbackAgent(current: AgentKind, preferred?: AgentKind | null): AgentKind;
1310
1319
 
1320
+ /**
1321
+ * Agents that Sideboard can inject Sideboard MCP into for fleet orchestration.
1322
+ * Brightsy CLI has no local MCP injection — it cannot be an orchestrator.
1323
+ */
1324
+ declare const ORCHESTRATOR_AGENT_KINDS: readonly ["claude", "codex", "opencode", "cursor"];
1325
+ type OrchestratorAgentKind = (typeof ORCHESTRATOR_AGENT_KINDS)[number];
1326
+ declare function isOrchestratorCapableAgent(agent: AgentKind | null | undefined): agent is OrchestratorAgentKind;
1327
+ declare function assertOrchestratorCapableAgent(agent: AgentKind, context?: string): OrchestratorAgentKind;
1328
+ /** Prefer a capable agent; fall back to Claude when the choice is unsupported. */
1329
+ declare function coerceOrchestratorAgent(agent: AgentKind | null | undefined, fallback?: OrchestratorAgentKind): OrchestratorAgentKind;
1330
+
1311
1331
  /**
1312
1332
  * Electron / GUI apps often inherit a minimal PATH that omits Homebrew and
1313
1333
  * user bin dirs where `claude` / `codex` / `opencode` / `brightsy` live. Call
@@ -2851,4 +2871,4 @@ declare function writeInjectedMcpConfig(opts: {
2851
2871
  includeBrightsy?: boolean;
2852
2872
  }): Promise<string | null>;
2853
2873
 
2854
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
2874
+ export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
package/dist/index.js CHANGED
@@ -108,14 +108,14 @@ import {
108
108
  withAgentInstructions,
109
109
  worktreeCleanupSettings,
110
110
  writeWorktreeFile
111
- } from "./chunk-I6QGZOOS.js";
111
+ } from "./chunk-7DTJFP4D.js";
112
112
  import {
113
113
  addWorkspace,
114
114
  ensureWorkspace,
115
115
  listWorkspaces,
116
116
  removeWorkspace,
117
117
  syncWorkspacesFromThreads
118
- } from "./chunk-U3EQKJHA.js";
118
+ } from "./chunk-SZAKJ4TR.js";
119
119
  import {
120
120
  CLOUD_COORDINATOR_BUSY_REPLY,
121
121
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -135,7 +135,7 @@ import {
135
135
  orchestratorSessionPoisonedByBuiltins,
136
136
  parseForceStopMessage,
137
137
  takenTeamSlugsForOrchestration
138
- } from "./chunk-ZNSM2DDD.js";
138
+ } from "./chunk-SPCU3MFY.js";
139
139
  import {
140
140
  COORDINATOR_TOOL_PLAYBOOK,
141
141
  coordinatorSystemPrompt,
@@ -188,7 +188,13 @@ import {
188
188
  resolveQuotaFallbackAgent,
189
189
  sanitizeMcpServerName,
190
190
  writeInjectedMcpConfig
191
- } from "./chunk-ANZ566Z5.js";
191
+ } from "./chunk-TQK2OYPU.js";
192
+ import {
193
+ ORCHESTRATOR_AGENT_KINDS,
194
+ assertOrchestratorCapableAgent,
195
+ coerceOrchestratorAgent,
196
+ isOrchestratorCapableAgent
197
+ } from "./chunk-GI7E5733.js";
192
198
  import {
193
199
  brightsyConfigPath,
194
200
  brightsyMcpServerName,
@@ -242,7 +248,7 @@ import {
242
248
  updateClaudeSettings,
243
249
  updateDefaultsSettings,
244
250
  updateIntegrationsSettings
245
- } from "./chunk-WYY3J7GR.js";
251
+ } from "./chunk-T5QQVXK3.js";
246
252
  import {
247
253
  FAMOUS_SOCCER_TEAMS,
248
254
  allocateTeamName,
@@ -817,6 +823,7 @@ export {
817
823
  GLOBAL_WORKSPACE_ID,
818
824
  HARNESS_ENV_KEYS,
819
825
  MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
826
+ ORCHESTRATOR_AGENT_KINDS,
820
827
  Orchestrator,
821
828
  PASTE_ATTACH_MIN_CHARS,
822
829
  PASTE_ATTACH_MIN_LINES,
@@ -841,6 +848,7 @@ export {
841
848
  applyAppEnvironment,
842
849
  applyCompaction,
843
850
  applyThreadIntoMain,
851
+ assertOrchestratorCapableAgent,
844
852
  attachmentFromAbsolutePath,
845
853
  attachmentsFromBuffers,
846
854
  attachmentsFromWorktreePaths,
@@ -873,6 +881,7 @@ export {
873
881
  cleanupOrphanWorktrees,
874
882
  cloneRepoIntoSideboard,
875
883
  codexAdapter,
884
+ coerceOrchestratorAgent,
876
885
  collectTakenTeamSlugs,
877
886
  commitAll,
878
887
  conductorDbPath,
@@ -977,6 +986,7 @@ export {
977
986
  isGlobalThread,
978
987
  isImageFilePath,
979
988
  isLinearConnected,
989
+ isOrchestratorCapableAgent,
980
990
  isOrchestratorThread,
981
991
  isPidAlive,
982
992
  isPlaceholderBranch,