@sideboard-ai/core 0.1.155 → 0.1.157

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 (29) hide show
  1. package/dist/{abletime-JSTJLXAW.js → abletime-BEIDJG7W.js} +5 -1
  2. package/dist/{abletime-H7LPGIP2.js → abletime-GWZE6OYM.js} +5 -1
  3. package/dist/agents/cursor-runner.cjs +6 -1
  4. package/dist/agents/cursor-runner.js +6 -1
  5. package/dist/{agents-V24DYZI4.js → agents-C55LAEUR.js} +4 -2
  6. package/dist/{agents-YVW75KBO.js → agents-LCDXN2B2.js} +4 -2
  7. package/dist/{chunk-RNC3GR6L.js → chunk-4I4VKAPZ.js} +5 -4
  8. package/dist/{chunk-2F63IMCL.js → chunk-CVR4RJ6G.js} +5 -4
  9. package/dist/{chunk-JOK4XWBG.js → chunk-DVJBO3M7.js} +87 -3
  10. package/dist/{chunk-J2OKVOBM.js → chunk-GWEEGE6L.js} +119 -10
  11. package/dist/{chunk-4THE3EY7.js → chunk-KQ4JOGUH.js} +214 -39
  12. package/dist/{chunk-FDCFXMDG.js → chunk-N27GVFZY.js} +87 -3
  13. package/dist/{chunk-46ZTBUVJ.js → chunk-SUCJAWV4.js} +90 -9
  14. package/dist/{chunk-QZEZXYVV.js → chunk-TIJ6QVX5.js} +305 -33
  15. package/dist/{coordinator-prompt-7FHKCWXB.js → coordinator-prompt-26IJU2AV.js} +1 -1
  16. package/dist/{coordinator-prompt-KX2FVVYT.js → coordinator-prompt-AM47SATF.js} +1 -1
  17. package/dist/{global-workspace-2BRRKSDN.js → global-workspace-5BIW26YR.js} +1 -1
  18. package/dist/{global-workspace-4LHCZ2DC.js → global-workspace-QV7CC7SK.js} +1 -1
  19. package/dist/index.cjs +1438 -695
  20. package/dist/index.d.cts +150 -3
  21. package/dist/index.d.ts +150 -3
  22. package/dist/index.js +600 -322
  23. package/dist/mcp/run-stdio.cjs +1223 -573
  24. package/dist/mcp/run-stdio.js +501 -199
  25. package/dist/{orchestrator-HC7XVGJB.js → orchestrator-BUH3LJLL.js} +3 -3
  26. package/dist/{orchestrator-3FWEKDAQ.js → orchestrator-KQO4MXBI.js} +3 -3
  27. package/dist/{workspaces-5UNDTN4G.js → workspaces-NYSM2EPX.js} +1 -1
  28. package/dist/{workspaces-MQYNZXUK.js → workspaces-Q2VCHIAS.js} +1 -1
  29. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isOrchestratorThread
3
- } from "./chunk-2F63IMCL.js";
3
+ } from "./chunk-CVR4RJ6G.js";
4
4
  import {
5
5
  codexUnattendedGitConfigArgs,
6
6
  mergeAgentGitAuthEnv,
@@ -31,6 +31,8 @@ import {
31
31
  } from "./chunk-HEII7W3Q.js";
32
32
  import {
33
33
  claudeChromeEnabled,
34
+ isAbleTimeConnected,
35
+ isLinearConnected,
34
36
  loadAppSettings,
35
37
  resolveAgentExecutable,
36
38
  resolveClaudeExecutable
@@ -1132,6 +1134,31 @@ var WORKTREE_MCP_TOOLS = [
1132
1134
  "present_schema",
1133
1135
  "present_files"
1134
1136
  ];
1137
+ var WORKTREE_GITHUB_MCP_TOOLS = [
1138
+ "github_get_issue",
1139
+ "github_comment",
1140
+ "github_update_issue",
1141
+ "github_create_issue"
1142
+ ];
1143
+ var WORKTREE_LINEAR_MCP_TOOLS = [
1144
+ "linear_list_teams",
1145
+ "linear_search_issues",
1146
+ "linear_get_issue",
1147
+ "linear_create_issue",
1148
+ "linear_update_issue",
1149
+ "linear_comment"
1150
+ ];
1151
+ var WORKTREE_ABLETIME_MCP_TOOLS = [
1152
+ "abletime_orientation",
1153
+ "abletime_list_projects",
1154
+ "abletime_list_tasks",
1155
+ "abletime_search_tasks",
1156
+ "abletime_get_task",
1157
+ "abletime_comment",
1158
+ "abletime_update_task",
1159
+ "abletime_create_task",
1160
+ "abletime_ensure_task"
1161
+ ];
1135
1162
  function sideboardMcpProfile(env = process.env) {
1136
1163
  return env[SIDEBOARD_MCP_PROFILE_ENV]?.trim().toLowerCase() === "worktree" ? "worktree" : "orchestration";
1137
1164
  }
@@ -1148,6 +1175,16 @@ var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
1148
1175
  "mcp__sideboard__ask_user",
1149
1176
  "mcp__sideboard__present_plan"
1150
1177
  ];
1178
+ var SIDEBOARD_GITHUB_MCP_ALLOWED_TOOLS = ["mcp__sideboard__github_*"];
1179
+ var SIDEBOARD_LINEAR_MCP_ALLOWED_TOOLS = ["mcp__sideboard__linear_*"];
1180
+ var SIDEBOARD_ABLETIME_MCP_ALLOWED_TOOLS = ["mcp__sideboard__abletime_*"];
1181
+ function sideboardWorktreeAllowedTools(opts) {
1182
+ const out = [...SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS];
1183
+ if (opts?.github !== false) out.push(...SIDEBOARD_GITHUB_MCP_ALLOWED_TOOLS);
1184
+ if (opts?.linear) out.push(...SIDEBOARD_LINEAR_MCP_ALLOWED_TOOLS);
1185
+ if (opts?.abletime) out.push(...SIDEBOARD_ABLETIME_MCP_ALLOWED_TOOLS);
1186
+ return out;
1187
+ }
1151
1188
  var BRIGHTSY_MCP_ALLOWED_TOOLS = [
1152
1189
  "mcp__brightsy",
1153
1190
  "mcp__brightsy__*"
@@ -1385,7 +1422,7 @@ function toCodexMcpConfigArgs(servers) {
1385
1422
  }
1386
1423
  return args;
1387
1424
  }
1388
- function toOpencodeMcpConfigContent(servers) {
1425
+ function toOpencodeMcpConfigContent(servers, opts) {
1389
1426
  const mcp = {};
1390
1427
  for (const s of servers) {
1391
1428
  const env = mcpSpawnEnv(s.env);
@@ -1396,6 +1433,11 @@ function toOpencodeMcpConfigContent(servers) {
1396
1433
  ...env ? { environment: env } : {}
1397
1434
  };
1398
1435
  }
1436
+ for (const name of opts?.disableNames ?? []) {
1437
+ const key = name.trim();
1438
+ if (!key || mcp[key]?.enabled === true) continue;
1439
+ mcp[key] = { ...mcp[key], enabled: false };
1440
+ }
1399
1441
  return JSON.stringify({ mcp });
1400
1442
  }
1401
1443
  function writeMcpServersConfig(servers) {
@@ -1614,13 +1656,50 @@ function claudeString(obj, key) {
1614
1656
  const v = obj[key];
1615
1657
  return typeof v === "string" && v.trim() ? v.trim() : void 0;
1616
1658
  }
1659
+ function mcpStatusThinkingFromClaudeInit(obj) {
1660
+ const raw = obj.mcp_servers ?? obj.mcpServers;
1661
+ const servers = [];
1662
+ if (Array.isArray(raw)) {
1663
+ for (const item of raw) {
1664
+ if (!item || typeof item !== "object" || Array.isArray(item)) continue;
1665
+ const rec = item;
1666
+ const name = typeof rec.name === "string" && rec.name.trim() || typeof rec.server === "string" && rec.server.trim() || "";
1667
+ const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "";
1668
+ if (name) servers.push({ name, status: status || "unknown" });
1669
+ }
1670
+ } else if (raw && typeof raw === "object") {
1671
+ for (const [name, value] of Object.entries(raw)) {
1672
+ if (!name.trim()) continue;
1673
+ if (typeof value === "string" && value.trim()) {
1674
+ servers.push({ name, status: value.trim() });
1675
+ continue;
1676
+ }
1677
+ if (value && typeof value === "object" && !Array.isArray(value)) {
1678
+ const rec = value;
1679
+ const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "unknown";
1680
+ servers.push({ name, status });
1681
+ }
1682
+ }
1683
+ }
1684
+ const notable = servers.filter((s) => !isCleanMcpConnect(s.status));
1685
+ if (notable.length === 0) return null;
1686
+ return `MCP: ${notable.map((s) => `${s.name} ${s.status}`).join(", ")}`;
1687
+ }
1688
+ function isCleanMcpConnect(status) {
1689
+ return /^(connected|ok|ready|success)$/i.test(status.trim());
1690
+ }
1617
1691
  function eventsFromClaudeSystem(obj) {
1618
1692
  const subtype = claudeString(obj, "subtype") ?? "";
1619
1693
  const parentId = claudeParentToolUseId(obj);
1620
1694
  if (subtype === "init") {
1621
1695
  if (parentId) return null;
1622
1696
  const sid = claudeString(obj, "session_id");
1623
- return sid ? { type: "session_id", data: sid } : null;
1697
+ const mcpNote = mcpStatusThinkingFromClaudeInit(obj);
1698
+ const events = [];
1699
+ if (sid) events.push({ type: "session_id", data: sid });
1700
+ if (mcpNote) events.push({ type: "thinking", data: mcpNote, replace: true });
1701
+ if (events.length === 0) return null;
1702
+ return events.length === 1 ? events[0] : events;
1624
1703
  }
1625
1704
  if (subtype === "task_started") {
1626
1705
  const id = claudeString(obj, "tool_use_id") ?? claudeString(obj, "task_id");
@@ -1777,7 +1856,7 @@ var claudeAdapter = {
1777
1856
  );
1778
1857
  }
1779
1858
  const mode = permissionMode(thread);
1780
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-2BRRKSDN.js");
1859
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-5BIW26YR.js");
1781
1860
  const isOrchestrator = isOrchestratorThread2(thread);
1782
1861
  const injectedServers = await buildInjectedMcpServers({
1783
1862
  includeSideboard: true,
@@ -1800,7 +1879,11 @@ var claudeAdapter = {
1800
1879
  allowedTools = [
1801
1880
  ...BASE_ALLOWED_TOOLS,
1802
1881
  ...mcpAllowTools(servers),
1803
- ...SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS,
1882
+ ...sideboardWorktreeAllowedTools({
1883
+ github: true,
1884
+ linear: isLinearConnected(),
1885
+ abletime: isAbleTimeConnected()
1886
+ }),
1804
1887
  ...brightsyMcpAllowedTools(injectedBrightsyNames)
1805
1888
  ];
1806
1889
  }
@@ -1820,6 +1903,9 @@ var claudeAdapter = {
1820
1903
  const mcpConfigPath = writeMcpServersConfig(injectedServers);
1821
1904
  if (mcpConfigPath) {
1822
1905
  args.push("--mcp-config", mcpConfigPath);
1906
+ if (isOrchestrator) {
1907
+ args.push("--strict-mcp-config");
1908
+ }
1823
1909
  }
1824
1910
  if (chromeOn) {
1825
1911
  args.push("--chrome");
@@ -1849,7 +1935,10 @@ var claudeAdapter = {
1849
1935
  // abandoned at Claude Code’s 10-minute default.
1850
1936
  env: {
1851
1937
  CLAUDE_CODE_FORWARD_SUBAGENT_TEXT: "1",
1852
- CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS: process.env.CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS ?? String(CLAUDE_PRINT_BG_WAIT_CEILING_MS)
1938
+ CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS: process.env.CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS ?? String(CLAUDE_PRINT_BG_WAIT_CEILING_MS),
1939
+ // `--strict-mcp-config` still fetches claude.ai connectors on some CLI
1940
+ // builds (anthropics/claude-code#60252). Coordinators do not need them.
1941
+ ...isOrchestrator ? { ENABLE_CLAUDEAI_MCP_SERVERS: "false" } : {}
1853
1942
  }
1854
1943
  };
1855
1944
  },
@@ -1997,9 +2086,170 @@ function parseIssuesJson(raw) {
1997
2086
  }
1998
2087
 
1999
2088
  // src/agents/codex.ts
2000
- import { existsSync as existsSync4, readFileSync, statSync } from "fs";
2089
+ import { existsSync as existsSync6, readFileSync as readFileSync3, statSync } from "fs";
2090
+ import { homedir as homedir3 } from "os";
2091
+ import { join as join4 } from "path";
2092
+
2093
+ // src/agents/orch-mcp-isolation.ts
2094
+ import { existsSync as existsSync5, readFileSync as readFileSync2 } from "fs";
2095
+ import { homedir as homedir2 } from "os";
2096
+ import { join as join3 } from "path";
2097
+ import { parse as parseToml } from "smol-toml";
2098
+
2099
+ // src/agents/user-mcp-config.ts
2100
+ import { existsSync as existsSync4, mkdirSync, readFileSync, writeFileSync as writeFileSync2 } from "fs";
2001
2101
  import { homedir } from "os";
2002
- import { join as join2 } from "path";
2102
+ import { dirname as dirname2, join as join2 } from "path";
2103
+ function userCursorMcpConfigPath() {
2104
+ return join2(homedir(), ".cursor", "mcp.json");
2105
+ }
2106
+ function userClaudeMcpConfigPath() {
2107
+ return join2(homedir(), ".claude.json");
2108
+ }
2109
+ function asObject(value) {
2110
+ if (!value || typeof value !== "object" || Array.isArray(value)) return {};
2111
+ return { ...value };
2112
+ }
2113
+ function stripElectronSpawnEnv(env) {
2114
+ if (!env) return void 0;
2115
+ const next = { ...env };
2116
+ delete next.ELECTRON_RUN_AS_NODE;
2117
+ delete next.ELECTRON_RUN_AS_NODE;
2118
+ return Object.keys(next).length > 0 ? next : void 0;
2119
+ }
2120
+ function mergeSideboardIntoMcpServersJson(existing, sideboard) {
2121
+ const root = asObject(existing);
2122
+ const servers = asObject(root.mcpServers);
2123
+ const env = stripElectronSpawnEnv(sideboard.env);
2124
+ servers.sideboard = {
2125
+ type: "stdio",
2126
+ command: sideboard.command,
2127
+ ...sideboard.args && sideboard.args.length > 0 ? { args: sideboard.args } : {},
2128
+ ...env ? { env } : {}
2129
+ };
2130
+ return { ...root, mcpServers: servers };
2131
+ }
2132
+ function writeMergedMcpServersJson(configPath, sideboard) {
2133
+ let existing = {};
2134
+ if (existsSync4(configPath)) {
2135
+ try {
2136
+ existing = JSON.parse(readFileSync(configPath, "utf8"));
2137
+ } catch {
2138
+ existing = {};
2139
+ }
2140
+ }
2141
+ const next = mergeSideboardIntoMcpServersJson(existing, sideboard);
2142
+ mkdirSync(dirname2(configPath), { recursive: true });
2143
+ writeFileSync2(configPath, `${JSON.stringify(next, null, 2)}
2144
+ `);
2145
+ }
2146
+ function launchFromResolved(server) {
2147
+ return {
2148
+ command: server.command,
2149
+ args: server.args,
2150
+ env: {
2151
+ ...server.env ?? {},
2152
+ SIDEBOARD_APP_DATA: appDataDir()
2153
+ }
2154
+ };
2155
+ }
2156
+ async function registerPackagedUserMcpClients() {
2157
+ const launch = launchFromResolved(await resolveSideboardMcpServer());
2158
+ const cursor = userCursorMcpConfigPath();
2159
+ writeMergedMcpServersJson(cursor, launch);
2160
+ const claude = userClaudeMcpConfigPath();
2161
+ if (existsSync4(claude)) {
2162
+ writeMergedMcpServersJson(claude, launch);
2163
+ return { cursor, claude };
2164
+ }
2165
+ return { cursor };
2166
+ }
2167
+
2168
+ // src/agents/orch-mcp-isolation.ts
2169
+ function isInjectedOrchMcpName(name) {
2170
+ const n = name.trim().toLowerCase();
2171
+ return n === "sideboard" || n === "brightsy" || n.startsWith("brightsy_");
2172
+ }
2173
+ function asObject2(value) {
2174
+ if (!value || typeof value !== "object" || Array.isArray(value)) return {};
2175
+ return value;
2176
+ }
2177
+ function listMcpNamesFromJsonMap(raw, key) {
2178
+ return Object.keys(asObject2(asObject2(raw)[key])).filter((n) => n.trim());
2179
+ }
2180
+ function listMcpNamesFromCodexToml(text) {
2181
+ try {
2182
+ const parsed = parseToml(text);
2183
+ return Object.keys(asObject2(parsed.mcp_servers)).filter((n) => n.trim());
2184
+ } catch {
2185
+ return [];
2186
+ }
2187
+ }
2188
+ function readJsonObject(path) {
2189
+ try {
2190
+ return JSON.parse(readFileSync2(path, "utf8"));
2191
+ } catch {
2192
+ return {};
2193
+ }
2194
+ }
2195
+ function readText(path) {
2196
+ try {
2197
+ return readFileSync2(path, "utf8");
2198
+ } catch {
2199
+ return "";
2200
+ }
2201
+ }
2202
+ function userCodexConfigPaths(home = homedir2()) {
2203
+ return [join3(home, ".codex", "config.toml"), join3(home, ".config", "codex", "config.toml")];
2204
+ }
2205
+ function userOpencodeConfigPaths(home = homedir2()) {
2206
+ return [
2207
+ join3(home, ".config", "opencode", "opencode.json"),
2208
+ join3(home, ".config", "opencode", "opencode.jsonc")
2209
+ ];
2210
+ }
2211
+ function userMcpNamesToDisable(opts) {
2212
+ const keep = new Set(
2213
+ [...opts.injectedNames ?? []].map((n) => n.trim().toLowerCase()).filter(Boolean)
2214
+ );
2215
+ const out = [];
2216
+ const seen = /* @__PURE__ */ new Set();
2217
+ for (const raw of opts.names) {
2218
+ const name = raw.trim();
2219
+ if (!name) continue;
2220
+ const key = name.toLowerCase();
2221
+ if (seen.has(key) || keep.has(key) || isInjectedOrchMcpName(name)) continue;
2222
+ seen.add(key);
2223
+ out.push(name);
2224
+ }
2225
+ return out;
2226
+ }
2227
+ function listUserCodexMcpNames(home = homedir2()) {
2228
+ const names = [];
2229
+ for (const path of userCodexConfigPaths(home)) {
2230
+ if (!existsSync5(path)) continue;
2231
+ names.push(...listMcpNamesFromCodexToml(readText(path)));
2232
+ }
2233
+ return names;
2234
+ }
2235
+ function listUserOpencodeMcpNames(home = homedir2()) {
2236
+ const names = [];
2237
+ for (const path of userOpencodeConfigPaths(home)) {
2238
+ if (!existsSync5(path)) continue;
2239
+ names.push(...listMcpNamesFromJsonMap(readJsonObject(path), "mcp"));
2240
+ }
2241
+ return names;
2242
+ }
2243
+ function toCodexDisableUserMcpArgs(names) {
2244
+ const args = [];
2245
+ for (const name of names) {
2246
+ if (!/^[A-Za-z0-9_-]+$/.test(name)) continue;
2247
+ args.push("-c", `mcp_servers.${name}.enabled=false`);
2248
+ }
2249
+ return args;
2250
+ }
2251
+
2252
+ // src/agents/codex.ts
2003
2253
  var CODEX_PROMPT_ARG_MAX = 2e5;
2004
2254
  var FALLBACK_CODEX_MODELS = [
2005
2255
  { id: "gpt-5.6-sol", displayName: "GPT-5.6 Sol" },
@@ -2019,7 +2269,7 @@ async function listCodexModels() {
2019
2269
  if (codex === "codex") {
2020
2270
  const which = await run("which", ["codex"], { reject: false });
2021
2271
  if (which.exitCode !== 0) return FALLBACK_CODEX_MODELS;
2022
- } else if (!existsSync4(codex)) {
2272
+ } else if (!existsSync6(codex)) {
2023
2273
  return FALLBACK_CODEX_MODELS;
2024
2274
  }
2025
2275
  const listed = await run(codex, ["debug", "models"], { reject: false });
@@ -2054,12 +2304,12 @@ function usageFromCodex(usage) {
2054
2304
  }
2055
2305
  function codexConfigHasNetworkAccess() {
2056
2306
  const candidates = [
2057
- join2(homedir(), ".codex", "config.toml"),
2058
- join2(homedir(), ".config", "codex", "config.toml")
2307
+ join4(homedir3(), ".codex", "config.toml"),
2308
+ join4(homedir3(), ".config", "codex", "config.toml")
2059
2309
  ];
2060
2310
  for (const path of candidates) {
2061
- if (!existsSync4(path)) continue;
2062
- const text = readFileSync(path, "utf8");
2311
+ if (!existsSync6(path)) continue;
2312
+ const text = readFileSync3(path, "utf8");
2063
2313
  if (/network_access\s*=\s*true/.test(text)) return true;
2064
2314
  }
2065
2315
  return false;
@@ -2091,8 +2341,8 @@ function asRecord2(value) {
2091
2341
  return void 0;
2092
2342
  }
2093
2343
  function codexLooksAuthenticated() {
2094
- const authPath = join2(homedir(), ".codex", "auth.json");
2095
- if (!existsSync4(authPath)) return false;
2344
+ const authPath = join4(homedir3(), ".codex", "auth.json");
2345
+ if (!existsSync6(authPath)) return false;
2096
2346
  try {
2097
2347
  return statSync(authPath).size > 2;
2098
2348
  } catch {
@@ -2104,7 +2354,7 @@ var codexAdapter = {
2104
2354
  async detect() {
2105
2355
  const codex = resolveAgentExecutable("codex");
2106
2356
  if (codex !== "codex") {
2107
- if (!existsSync4(codex)) {
2357
+ if (!existsSync6(codex)) {
2108
2358
  return {
2109
2359
  agent: "codex",
2110
2360
  installed: false,
@@ -2164,7 +2414,15 @@ var codexAdapter = {
2164
2414
  }),
2165
2415
  orchestratorThreadId: isOrchestrator ? thread.id : null
2166
2416
  });
2167
- const mcpOverrides = toCodexMcpConfigArgs(injected);
2417
+ const mcpOverrides = [
2418
+ ...toCodexMcpConfigArgs(injected),
2419
+ ...isOrchestrator ? toCodexDisableUserMcpArgs(
2420
+ userMcpNamesToDisable({
2421
+ injectedNames: injected.map((s) => s.name),
2422
+ names: listUserCodexMcpNames()
2423
+ })
2424
+ ) : []
2425
+ ];
2168
2426
  const execOpts = [
2169
2427
  // Global orchestration cwd is not a git repo; without this Codex ≥0.147
2170
2428
  // refuses to start ("Not inside a trusted directory").
@@ -2364,9 +2622,9 @@ var codexAdapter = {
2364
2622
  };
2365
2623
 
2366
2624
  // src/agents/cursor.ts
2367
- import { existsSync as existsSync5 } from "fs";
2625
+ import { existsSync as existsSync7 } from "fs";
2368
2626
  import { createRequire as createRequire2 } from "module";
2369
- import { dirname as dirname2, join as join3 } from "path";
2627
+ import { dirname as dirname3, join as join5 } from "path";
2370
2628
  import { fileURLToPath as fileURLToPath2 } from "url";
2371
2629
  import { Cursor } from "@cursor/sdk";
2372
2630
  var FALLBACK_CURSOR_MODELS = [
@@ -2414,11 +2672,11 @@ function entryDir() {
2414
2672
  const cjsDir = typeof __dirname !== "undefined" ? __dirname : "";
2415
2673
  if (cjsDir) return cjsDir;
2416
2674
  try {
2417
- return dirname2(fileURLToPath2(import.meta.url));
2675
+ return dirname3(fileURLToPath2(import.meta.url));
2418
2676
  } catch {
2419
2677
  try {
2420
2678
  const req = createRequire2(process.cwd() + "/");
2421
- return dirname2(req.resolve("@sideboard-ai/core"));
2679
+ return dirname3(req.resolve("@sideboard-ai/core"));
2422
2680
  } catch {
2423
2681
  return process.cwd();
2424
2682
  }
@@ -2429,17 +2687,17 @@ function cursorRunnerPath() {
2429
2687
  if (packaged) return packaged;
2430
2688
  const root = entryDir();
2431
2689
  const candidates = [
2432
- join3(root, "agents", "cursor-runner.js"),
2433
- join3(root, "agents", "cursor-runner.cjs"),
2690
+ join5(root, "agents", "cursor-runner.js"),
2691
+ join5(root, "agents", "cursor-runner.cjs"),
2434
2692
  // If somehow resolved from package root instead of dist/
2435
- join3(root, "dist", "agents", "cursor-runner.js"),
2436
- join3(root, "dist", "agents", "cursor-runner.cjs"),
2693
+ join5(root, "dist", "agents", "cursor-runner.js"),
2694
+ join5(root, "dist", "agents", "cursor-runner.cjs"),
2437
2695
  // Source tree (dev): packages/core/src/agents/cursor-runner.ts
2438
- join3(root, "cursor-runner.ts"),
2439
- join3(root, "src", "agents", "cursor-runner.ts")
2696
+ join5(root, "cursor-runner.ts"),
2697
+ join5(root, "src", "agents", "cursor-runner.ts")
2440
2698
  ];
2441
2699
  for (const candidate of candidates) {
2442
- if (existsSync5(candidate)) return candidate;
2700
+ if (existsSync7(candidate)) return candidate;
2443
2701
  }
2444
2702
  return candidates[0];
2445
2703
  }
@@ -2488,6 +2746,7 @@ var cursorAdapter = {
2488
2746
  fast: thread.fast,
2489
2747
  planMode: thread.planMode,
2490
2748
  apiKey,
2749
+ ...isOrchestrator ? { isolateAmbientMcp: true } : {},
2491
2750
  ...Object.keys(mcpServers).length > 0 ? { mcpServers } : {}
2492
2751
  };
2493
2752
  const runner = cursorRunnerPath();
@@ -2526,7 +2785,7 @@ var cursorAdapter = {
2526
2785
  };
2527
2786
 
2528
2787
  // src/agents/opencode.ts
2529
- import { existsSync as existsSync6 } from "fs";
2788
+ import { existsSync as existsSync8 } from "fs";
2530
2789
  var FALLBACK_OPENCODE_MODELS = [
2531
2790
  { id: "opencode/big-pickle", displayName: "opencode \xB7 big-pickle" },
2532
2791
  {
@@ -2585,7 +2844,7 @@ async function listOpencodeModels() {
2585
2844
  if (opencode === "opencode") {
2586
2845
  const which = await run("which", ["opencode"], { reject: false });
2587
2846
  if (which.exitCode !== 0) return FALLBACK_OPENCODE_MODELS;
2588
- } else if (!existsSync6(opencode)) {
2847
+ } else if (!existsSync8(opencode)) {
2589
2848
  return FALLBACK_OPENCODE_MODELS;
2590
2849
  }
2591
2850
  const listed = await run(opencode, ["models"], { reject: false });
@@ -2620,7 +2879,7 @@ var opencodeAdapter = {
2620
2879
  async detect() {
2621
2880
  const opencode = resolveAgentExecutable("opencode");
2622
2881
  if (opencode !== "opencode") {
2623
- if (!existsSync6(opencode)) {
2882
+ if (!existsSync8(opencode)) {
2624
2883
  return {
2625
2884
  agent: "opencode",
2626
2885
  installed: false,
@@ -2682,7 +2941,11 @@ var opencodeAdapter = {
2682
2941
  }),
2683
2942
  orchestratorThreadId: isOrchestrator ? thread.id : null
2684
2943
  });
2685
- const mcpContent = injected.length > 0 ? toOpencodeMcpConfigContent(injected) : null;
2944
+ const disableNames = isOrchestrator ? userMcpNamesToDisable({
2945
+ injectedNames: injected.map((s) => s.name),
2946
+ names: listUserOpencodeMcpNames()
2947
+ }) : [];
2948
+ const mcpContent = injected.length > 0 || disableNames.length > 0 ? toOpencodeMcpConfigContent(injected, { disableNames }) : null;
2686
2949
  return {
2687
2950
  file: resolveAgentExecutable("opencode"),
2688
2951
  args,
@@ -3366,6 +3629,9 @@ export {
3366
3629
  normalizeParseResult,
3367
3630
  SIDEBOARD_MCP_PROFILE_ENV,
3368
3631
  WORKTREE_MCP_TOOLS,
3632
+ WORKTREE_GITHUB_MCP_TOOLS,
3633
+ WORKTREE_LINEAR_MCP_TOOLS,
3634
+ WORKTREE_ABLETIME_MCP_TOOLS,
3369
3635
  sideboardMcpProfile,
3370
3636
  SIDEBOARD_MCP_ALLOWED_TOOLS,
3371
3637
  BRIGHTSY_MCP_ALLOWED_TOOLS,
@@ -3374,11 +3640,17 @@ export {
3374
3640
  threadRequestsBrightsyMcp,
3375
3641
  shouldInjectBrightsyMcp,
3376
3642
  brightsyMcpAllowedTools,
3377
- resolveSideboardMcpServer,
3378
3643
  writeInjectedMcpConfig,
3379
3644
  PLAN_MODE_INSTRUCTION,
3380
3645
  permissionMode,
3646
+ mcpStatusThinkingFromClaudeInit,
3381
3647
  claudeAdapter,
3648
+ userCursorMcpConfigPath,
3649
+ userClaudeMcpConfigPath,
3650
+ mergeSideboardIntoMcpServersJson,
3651
+ registerPackagedUserMcpClients,
3652
+ isInjectedOrchMcpName,
3653
+ userMcpNamesToDisable,
3382
3654
  listCodexModels,
3383
3655
  codexAdapter,
3384
3656
  isCursorAutoModel,
@@ -7,7 +7,7 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-2F63IMCL.js";
10
+ } from "./chunk-CVR4RJ6G.js";
11
11
  import "./chunk-LQMFCS54.js";
12
12
  import "./chunk-JRH62XC4.js";
13
13
  import "./chunk-3BWVOUQG.js";
@@ -9,7 +9,7 @@ import {
9
9
  enrichWorkspacesWithGithub,
10
10
  ensureGlobalCoordinatorCwd,
11
11
  formatWorkspaceInventory
12
- } from "./chunk-RNC3GR6L.js";
12
+ } from "./chunk-4I4VKAPZ.js";
13
13
  import "./chunk-CJQLPPEJ.js";
14
14
  import "./chunk-NVXVEGGM.js";
15
15
  import "./chunk-LZQULFIT.js";
@@ -15,7 +15,7 @@ import {
15
15
  orchestratorSessionPoisonedByBuiltins,
16
16
  slackCoordinatorSourceRef,
17
17
  takenTeamSlugsForOrchestration
18
- } from "./chunk-2F63IMCL.js";
18
+ } from "./chunk-CVR4RJ6G.js";
19
19
  import "./chunk-LQMFCS54.js";
20
20
  import "./chunk-JRH62XC4.js";
21
21
  import "./chunk-3BWVOUQG.js";
@@ -17,7 +17,7 @@ import {
17
17
  orchestratorSessionPoisonedByBuiltins,
18
18
  slackCoordinatorSourceRef,
19
19
  takenTeamSlugsForOrchestration
20
- } from "./chunk-RNC3GR6L.js";
20
+ } from "./chunk-4I4VKAPZ.js";
21
21
  import "./chunk-CJQLPPEJ.js";
22
22
  import "./chunk-NVXVEGGM.js";
23
23
  import "./chunk-LZQULFIT.js";