@sideboard-ai/core 0.1.87 → 0.1.88

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 (31) hide show
  1. package/dist/agents/cursor-runner.js +1 -1
  2. package/dist/{agents-W5446HSV.js → agents-LMUFTGKF.js} +5 -5
  3. package/dist/{agents-V6PVSQYH.js → agents-ODBP7J6E.js} +6 -6
  4. package/dist/{app-settings-HFINR3XG.js → app-settings-BRF7VKTQ.js} +2 -2
  5. package/dist/{app-settings-F36ISTCF.js → app-settings-ZXPAB3QN.js} +1 -1
  6. package/dist/{chunk-HBXQQ5TO.js → chunk-6EZRSCIT.js} +2 -2
  7. package/dist/{chunk-TC2KY5G7.js → chunk-6LFV4VFI.js} +14 -1
  8. package/dist/{chunk-L63LLCTX.js → chunk-7D27DD2X.js} +1 -1
  9. package/dist/{chunk-4PTN2LED.js → chunk-B2KIO2SD.js} +3 -3
  10. package/dist/{chunk-XY6XXMAK.js → chunk-FT2SQOL4.js} +1 -1
  11. package/dist/{chunk-QWNROSRB.js → chunk-JE75QW2I.js} +56 -22
  12. package/dist/{chunk-3MA6JH6G.js → chunk-OB6IRIFV.js} +2 -2
  13. package/dist/{chunk-U4GZKLIV.js → chunk-RJLBSYUO.js} +57 -23
  14. package/dist/{chunk-5KLC2MWZ.js → chunk-TLPJHLLM.js} +14 -1
  15. package/dist/{chunk-UVNXLTFB.js → chunk-UHTNJKZX.js} +3 -3
  16. package/dist/{chunk-A7LONVNO.js → chunk-VZ2L4AEJ.js} +2 -2
  17. package/dist/{chunk-R2EOZNQI.js → chunk-WANQFU3S.js} +2 -2
  18. package/dist/{chunk-CY45C3GA.js → chunk-ZXYWWSHZ.js} +1 -1
  19. package/dist/{coordinator-prompt-PYRAXZN3.js → coordinator-prompt-CI5SHONJ.js} +3 -3
  20. package/dist/{coordinator-prompt-EC3KQLN3.js → coordinator-prompt-UK5LYFN5.js} +4 -4
  21. package/dist/{global-workspace-T5IAJF4R.js → global-workspace-2YZ2V4I5.js} +4 -4
  22. package/dist/{global-workspace-ICWOWUW6.js → global-workspace-JQQLPJM5.js} +5 -5
  23. package/dist/index.cjs +61 -16
  24. package/dist/index.js +21 -21
  25. package/dist/mcp/run-stdio.cjs +61 -16
  26. package/dist/mcp/run-stdio.js +19 -19
  27. package/dist/{workspaces-J4ULXOUH.js → workspaces-FDO5L4NI.js} +5 -5
  28. package/dist/{workspaces-AJCAFW64.js → workspaces-YWCC3WV4.js} +6 -6
  29. package/dist/{worktree-4Z2VSHAQ.js → worktree-4555QBQ7.js} +2 -2
  30. package/dist/{worktree-H57CCHWO.js → worktree-7YNSJ224.js} +3 -3
  31. package/package.json +1 -1
@@ -5,7 +5,7 @@ import {
5
5
  } from "../chunk-CBJSPTBG.js";
6
6
  import {
7
7
  dropNestedElectronEnvFromProcess
8
- } from "../chunk-5KLC2MWZ.js";
8
+ } from "../chunk-TLPJHLLM.js";
9
9
  import {
10
10
  appDataDir
11
11
  } from "../chunk-B4R2VB2A.js";
@@ -32,19 +32,19 @@ import {
32
32
  resolveCursorModelId,
33
33
  resolveLoginCommand,
34
34
  resolveQuotaFallbackAgent
35
- } from "./chunk-QWNROSRB.js";
35
+ } from "./chunk-JE75QW2I.js";
36
36
  import "./chunk-DKHGWYWR.js";
37
37
  import {
38
38
  ORCHESTRATOR_AGENT_KINDS,
39
39
  assertOrchestratorCapableAgent,
40
40
  coerceOrchestratorAgent,
41
41
  isOrchestratorCapableAgent
42
- } from "./chunk-UVNXLTFB.js";
43
- import "./chunk-3MA6JH6G.js";
44
- import "./chunk-CY45C3GA.js";
42
+ } from "./chunk-UHTNJKZX.js";
43
+ import "./chunk-OB6IRIFV.js";
44
+ import "./chunk-ZXYWWSHZ.js";
45
45
  import "./chunk-B3SJXYIJ.js";
46
46
  import "./chunk-JOF3XIEM.js";
47
- import "./chunk-TC2KY5G7.js";
47
+ import "./chunk-6LFV4VFI.js";
48
48
  import "./chunk-NSTQ6QKD.js";
49
49
  import "./chunk-KGZBYWZ3.js";
50
50
  import "./chunk-JL4SJ6V7.js";
@@ -28,23 +28,23 @@ import {
28
28
  resolveCursorModelId,
29
29
  resolveLoginCommand,
30
30
  resolveQuotaFallbackAgent
31
- } from "./chunk-U4GZKLIV.js";
31
+ } from "./chunk-RJLBSYUO.js";
32
32
  import {
33
33
  ORCHESTRATOR_AGENT_KINDS,
34
34
  assertOrchestratorCapableAgent,
35
35
  coerceOrchestratorAgent,
36
36
  isOrchestratorCapableAgent
37
- } from "./chunk-4PTN2LED.js";
38
- import "./chunk-A7LONVNO.js";
37
+ } from "./chunk-B2KIO2SD.js";
38
+ import "./chunk-VZ2L4AEJ.js";
39
39
  import "./chunk-QSLE4VEM.js";
40
40
  import {
41
41
  cursorSdkMessageToEvents,
42
42
  parseCursorRunnerLine
43
43
  } from "./chunk-CBJSPTBG.js";
44
- import "./chunk-L63LLCTX.js";
44
+ import "./chunk-7D27DD2X.js";
45
45
  import "./chunk-FKOIHGKV.js";
46
- import "./chunk-XY6XXMAK.js";
47
- import "./chunk-5KLC2MWZ.js";
46
+ import "./chunk-FT2SQOL4.js";
47
+ import "./chunk-TLPJHLLM.js";
48
48
  import "./chunk-JT7R45JB.js";
49
49
  import "./chunk-3WA37BRI.js";
50
50
  import "./chunk-77WWLBCI.js";
@@ -52,8 +52,8 @@ import {
52
52
  updateDefaultsSettings,
53
53
  updateIntegrationsSettings,
54
54
  updateOpencodeSettings
55
- } from "./chunk-XY6XXMAK.js";
56
- import "./chunk-5KLC2MWZ.js";
55
+ } from "./chunk-FT2SQOL4.js";
56
+ import "./chunk-TLPJHLLM.js";
57
57
  import "./chunk-JT7R45JB.js";
58
58
  import "./chunk-77WWLBCI.js";
59
59
  import "./chunk-B4R2VB2A.js";
@@ -54,7 +54,7 @@ import {
54
54
  updateDefaultsSettings,
55
55
  updateIntegrationsSettings,
56
56
  updateOpencodeSettings
57
- } from "./chunk-TC2KY5G7.js";
57
+ } from "./chunk-6LFV4VFI.js";
58
58
  import "./chunk-NSTQ6QKD.js";
59
59
  import "./chunk-KGZBYWZ3.js";
60
60
  import "./chunk-JL4SJ6V7.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  isGlobalRepoPath
3
- } from "./chunk-4PTN2LED.js";
3
+ } from "./chunk-B2KIO2SD.js";
4
4
  import {
5
5
  ensureGhPreferOrigin,
6
6
  resolveRepoRoot
7
- } from "./chunk-L63LLCTX.js";
7
+ } from "./chunk-7D27DD2X.js";
8
8
  import {
9
9
  appDataDir
10
10
  } from "./chunk-B4R2VB2A.js";
@@ -50,6 +50,18 @@ function wrapElectronAsNodeLaunch(file, args) {
50
50
  function isStrippedElectronLaunch(command, args) {
51
51
  return command === "/bin/sh" && Boolean(args?.[1]?.includes("ELECTRON_RUN_AS_NODE") && args[1].includes("unset"));
52
52
  }
53
+ function isElectronLikeCommand(command) {
54
+ const name = command.trim();
55
+ if (!name) return false;
56
+ if (process.versions.electron && name === process.execPath) return true;
57
+ return /(?:^|[/\\])Electron(?:\.exe)?$/i.test(name) || /Sideboard\.app[/\\]/i.test(name) || /Electron\.app[/\\]/i.test(name);
58
+ }
59
+ function unwrapStrippedElectronLaunch(command, args) {
60
+ if (!isStrippedElectronLaunch(command, args) || !args || args.length < 4) {
61
+ return null;
62
+ }
63
+ return { file: args[3], args: args.slice(4) };
64
+ }
53
65
 
54
66
  // src/store/secret-vault.ts
55
67
  import { join } from "path";
@@ -1113,7 +1125,8 @@ export {
1113
1125
  stripNestedElectronEnv,
1114
1126
  dropNestedElectronEnvFromProcess,
1115
1127
  wrapElectronAsNodeLaunch,
1116
- isStrippedElectronLaunch,
1128
+ isElectronLikeCommand,
1129
+ unwrapStrippedElectronLaunch,
1117
1130
  resolveVaultKey,
1118
1131
  readSecureJson,
1119
1132
  writeSecureJson,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getGithubGitAuthMode,
6
6
  getGithubPat
7
- } from "./chunk-XY6XXMAK.js";
7
+ } from "./chunk-FT2SQOL4.js";
8
8
  import {
9
9
  listThreads
10
10
  } from "./chunk-3WA37BRI.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ensureGlobalCoordinatorCwd
3
- } from "./chunk-A7LONVNO.js";
3
+ } from "./chunk-VZ2L4AEJ.js";
4
4
  import {
5
5
  allocateTeamName,
6
6
  takenSlugsFromThread,
7
7
  teamSlugFromName
8
- } from "./chunk-L63LLCTX.js";
8
+ } from "./chunk-7D27DD2X.js";
9
9
  import {
10
10
  resolveNewThreadOptions,
11
11
  resolveThreadDefaults
12
- } from "./chunk-XY6XXMAK.js";
12
+ } from "./chunk-FT2SQOL4.js";
13
13
  import {
14
14
  createEmptyThread,
15
15
  listThreads,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  stripNestedElectronEnv
3
- } from "./chunk-5KLC2MWZ.js";
3
+ } from "./chunk-TLPJHLLM.js";
4
4
  import {
5
5
  chmodOwnerOnly,
6
6
  writePrivateFile
@@ -9,19 +9,20 @@ import {
9
9
  } from "./chunk-DKHGWYWR.js";
10
10
  import {
11
11
  isOrchestratorThread
12
- } from "./chunk-UVNXLTFB.js";
12
+ } from "./chunk-UHTNJKZX.js";
13
13
  import {
14
14
  codexUnattendedGitConfigArgs,
15
15
  resolveAgentGitAuthEnv
16
- } from "./chunk-CY45C3GA.js";
16
+ } from "./chunk-ZXYWWSHZ.js";
17
17
  import {
18
18
  claudeChromeEnabled,
19
- isStrippedElectronLaunch,
19
+ isElectronLikeCommand,
20
20
  loadAppSettings,
21
21
  resolveAgentExecutable,
22
22
  resolveClaudeExecutable,
23
+ unwrapStrippedElectronLaunch,
23
24
  wrapElectronAsNodeLaunch
24
- } from "./chunk-TC2KY5G7.js";
25
+ } from "./chunk-6LFV4VFI.js";
25
26
  import {
26
27
  appDataDir
27
28
  } from "./chunk-JL4SJ6V7.js";
@@ -602,7 +603,7 @@ function mcpAllowTools(servers) {
602
603
  }
603
604
 
604
605
  // src/agents/injected-mcp.ts
605
- import { existsSync as existsSync2, mkdtempSync, writeFileSync } from "fs";
606
+ import { existsSync as existsSync2, mkdirSync, mkdtempSync, writeFileSync } from "fs";
606
607
  import { createRequire } from "module";
607
608
  import { tmpdir } from "os";
608
609
  import { dirname, join } from "path";
@@ -841,22 +842,52 @@ async function buildInjectedMcpServers(opts) {
841
842
  }
842
843
  return servers;
843
844
  }
845
+ function shSingleQuote(value) {
846
+ return `'${value.replace(/'/g, `'\\''`)}'`;
847
+ }
848
+ function cursorSafeMcpLaunch(command, args) {
849
+ if (process.platform === "win32") {
850
+ return args && args.length > 0 ? { command, args } : { command };
851
+ }
852
+ const unwrapped = unwrapStrippedElectronLaunch(command, args);
853
+ const file = unwrapped?.file ?? command;
854
+ const fileArgs = unwrapped?.args ?? args ?? [];
855
+ if (!isElectronLikeCommand(file)) {
856
+ return fileArgs.length > 0 ? { command: file, args: fileArgs } : { command: file };
857
+ }
858
+ const dir = join(appDataDir(), "mcp-launch");
859
+ mkdirSync(dir, { recursive: true });
860
+ const wrap = join(dir, "cursor-electron-as-node.sh");
861
+ const execLine = [file, ...fileArgs].map(shSingleQuote).join(" ");
862
+ writeFileSync(
863
+ wrap,
864
+ [
865
+ "#!/bin/sh",
866
+ "vars=`printenv | awk -F= '/^(ELECTRON_|CHROME_)/{print $1}'`",
867
+ '[ -n "$vars" ] && unset $vars',
868
+ "export ELECTRON_RUN_AS_NODE=1",
869
+ `exec ${execLine} "$@"`,
870
+ ""
871
+ ].join("\n"),
872
+ { mode: 493 }
873
+ );
874
+ return { command: wrap };
875
+ }
876
+ function mcpSpawnEnv(env) {
877
+ if (!env) return void 0;
878
+ const out = { ...env };
879
+ delete out.ELECTRON_RUN_AS_NODE;
880
+ return Object.keys(out).length > 0 ? out : void 0;
881
+ }
844
882
  function toCursorMcpServers(servers) {
845
883
  const out = {};
846
884
  for (const s of servers) {
847
- const env = s.env ? { ...s.env } : void 0;
848
- if (env) delete env.ELECTRON_RUN_AS_NODE;
849
- let command = s.command;
850
- let args = s.args;
851
- if (process.platform !== "win32" && !isStrippedElectronLaunch(command, args)) {
852
- const wrapped = wrapElectronAsNodeLaunch(command, args ?? []);
853
- command = wrapped.file;
854
- args = wrapped.args;
855
- }
885
+ const env = mcpSpawnEnv(s.env);
886
+ const launch = cursorSafeMcpLaunch(s.command, s.args);
856
887
  out[s.name] = {
857
- command,
858
- ...args && args.length > 0 ? { args } : {},
859
- ...env && Object.keys(env).length > 0 ? { env } : {}
888
+ command: launch.command,
889
+ ...launch.args && launch.args.length > 0 ? { args: launch.args } : {},
890
+ ...env ? { env } : {}
860
891
  };
861
892
  }
862
893
  return out;
@@ -869,8 +900,9 @@ function toCodexMcpConfigArgs(servers) {
869
900
  if (s.args?.length) {
870
901
  args.push("-c", `${prefix}.args=${JSON.stringify(s.args)}`);
871
902
  }
872
- if (s.env) {
873
- for (const [key, value] of Object.entries(s.env)) {
903
+ const env = mcpSpawnEnv(s.env);
904
+ if (env) {
905
+ for (const [key, value] of Object.entries(env)) {
874
906
  args.push("-c", `${prefix}.env.${key}=${JSON.stringify(value)}`);
875
907
  }
876
908
  }
@@ -883,11 +915,12 @@ function toCodexMcpConfigArgs(servers) {
883
915
  function toOpencodeMcpConfigContent(servers) {
884
916
  const mcp = {};
885
917
  for (const s of servers) {
918
+ const env = mcpSpawnEnv(s.env);
886
919
  mcp[s.name] = {
887
920
  type: "local",
888
921
  command: [s.command, ...s.args ?? []],
889
922
  enabled: true,
890
- ...s.env && Object.keys(s.env).length > 0 ? { environment: s.env } : {}
923
+ ...env ? { environment: env } : {}
891
924
  };
892
925
  }
893
926
  return JSON.stringify({ mcp });
@@ -896,10 +929,11 @@ function writeMcpServersConfig(servers) {
896
929
  if (servers.length === 0) return null;
897
930
  const mcpServers = {};
898
931
  for (const s of servers) {
932
+ const env = mcpSpawnEnv(s.env);
899
933
  mcpServers[s.name] = {
900
934
  command: s.command,
901
935
  ...s.args ? { args: s.args } : {},
902
- ...s.env ? { env: s.env } : {}
936
+ ...env ? { env } : {}
903
937
  };
904
938
  }
905
939
  const dir = mkdtempSync(join(tmpdir(), "sideboard-mcp-"));
@@ -1100,7 +1134,7 @@ var claudeAdapter = {
1100
1134
  );
1101
1135
  }
1102
1136
  const mode = permissionMode(thread);
1103
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-T5IAJF4R.js");
1137
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-2YZ2V4I5.js");
1104
1138
  const isOrchestrator = isOrchestratorThread2(thread);
1105
1139
  const injectedServers = await buildInjectedMcpServers({
1106
1140
  includeSideboard: true,
@@ -2,10 +2,10 @@
2
2
 
3
3
  import {
4
4
  resolveGithubRepoSlug
5
- } from "./chunk-CY45C3GA.js";
5
+ } from "./chunk-ZXYWWSHZ.js";
6
6
  import {
7
7
  resolveThreadDefaults
8
- } from "./chunk-TC2KY5G7.js";
8
+ } from "./chunk-6LFV4VFI.js";
9
9
  import {
10
10
  globalAgentCwd,
11
11
  sideboardReposDir
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isOrchestratorThread
3
- } from "./chunk-4PTN2LED.js";
3
+ } from "./chunk-B2KIO2SD.js";
4
4
  import {
5
5
  applyConnectedTeamToCli,
6
6
  brightsyMcpServerName,
@@ -17,17 +17,18 @@ import {
17
17
  import {
18
18
  codexUnattendedGitConfigArgs,
19
19
  resolveAgentGitAuthEnv
20
- } from "./chunk-L63LLCTX.js";
20
+ } from "./chunk-7D27DD2X.js";
21
21
  import {
22
22
  claudeChromeEnabled,
23
23
  loadAppSettings,
24
24
  resolveAgentExecutable,
25
25
  resolveClaudeExecutable
26
- } from "./chunk-XY6XXMAK.js";
26
+ } from "./chunk-FT2SQOL4.js";
27
27
  import {
28
- isStrippedElectronLaunch,
28
+ isElectronLikeCommand,
29
+ unwrapStrippedElectronLaunch,
29
30
  wrapElectronAsNodeLaunch
30
- } from "./chunk-5KLC2MWZ.js";
31
+ } from "./chunk-TLPJHLLM.js";
31
32
  import {
32
33
  appDataDir
33
34
  } from "./chunk-B4R2VB2A.js";
@@ -520,7 +521,7 @@ function mcpAuthWarnings(servers) {
520
521
  }
521
522
 
522
523
  // src/agents/injected-mcp.ts
523
- import { existsSync as existsSync2, mkdtempSync, writeFileSync } from "fs";
524
+ import { existsSync as existsSync2, mkdirSync, mkdtempSync, writeFileSync } from "fs";
524
525
  import { createRequire } from "module";
525
526
  import { tmpdir } from "os";
526
527
  import { dirname, join } from "path";
@@ -763,22 +764,52 @@ async function buildInjectedMcpServers(opts) {
763
764
  }
764
765
  return servers;
765
766
  }
767
+ function shSingleQuote(value) {
768
+ return `'${value.replace(/'/g, `'\\''`)}'`;
769
+ }
770
+ function cursorSafeMcpLaunch(command, args) {
771
+ if (process.platform === "win32") {
772
+ return args && args.length > 0 ? { command, args } : { command };
773
+ }
774
+ const unwrapped = unwrapStrippedElectronLaunch(command, args);
775
+ const file = unwrapped?.file ?? command;
776
+ const fileArgs = unwrapped?.args ?? args ?? [];
777
+ if (!isElectronLikeCommand(file)) {
778
+ return fileArgs.length > 0 ? { command: file, args: fileArgs } : { command: file };
779
+ }
780
+ const dir = join(appDataDir(), "mcp-launch");
781
+ mkdirSync(dir, { recursive: true });
782
+ const wrap = join(dir, "cursor-electron-as-node.sh");
783
+ const execLine = [file, ...fileArgs].map(shSingleQuote).join(" ");
784
+ writeFileSync(
785
+ wrap,
786
+ [
787
+ "#!/bin/sh",
788
+ "vars=`printenv | awk -F= '/^(ELECTRON_|CHROME_)/{print $1}'`",
789
+ '[ -n "$vars" ] && unset $vars',
790
+ "export ELECTRON_RUN_AS_NODE=1",
791
+ `exec ${execLine} "$@"`,
792
+ ""
793
+ ].join("\n"),
794
+ { mode: 493 }
795
+ );
796
+ return { command: wrap };
797
+ }
798
+ function mcpSpawnEnv(env) {
799
+ if (!env) return void 0;
800
+ const out = { ...env };
801
+ delete out.ELECTRON_RUN_AS_NODE;
802
+ return Object.keys(out).length > 0 ? out : void 0;
803
+ }
766
804
  function toCursorMcpServers(servers) {
767
805
  const out = {};
768
806
  for (const s of servers) {
769
- const env = s.env ? { ...s.env } : void 0;
770
- if (env) delete env.ELECTRON_RUN_AS_NODE;
771
- let command = s.command;
772
- let args = s.args;
773
- if (process.platform !== "win32" && !isStrippedElectronLaunch(command, args)) {
774
- const wrapped = wrapElectronAsNodeLaunch(command, args ?? []);
775
- command = wrapped.file;
776
- args = wrapped.args;
777
- }
807
+ const env = mcpSpawnEnv(s.env);
808
+ const launch = cursorSafeMcpLaunch(s.command, s.args);
778
809
  out[s.name] = {
779
- command,
780
- ...args && args.length > 0 ? { args } : {},
781
- ...env && Object.keys(env).length > 0 ? { env } : {}
810
+ command: launch.command,
811
+ ...launch.args && launch.args.length > 0 ? { args: launch.args } : {},
812
+ ...env ? { env } : {}
782
813
  };
783
814
  }
784
815
  return out;
@@ -791,8 +822,9 @@ function toCodexMcpConfigArgs(servers) {
791
822
  if (s.args?.length) {
792
823
  args.push("-c", `${prefix}.args=${JSON.stringify(s.args)}`);
793
824
  }
794
- if (s.env) {
795
- for (const [key, value] of Object.entries(s.env)) {
825
+ const env = mcpSpawnEnv(s.env);
826
+ if (env) {
827
+ for (const [key, value] of Object.entries(env)) {
796
828
  args.push("-c", `${prefix}.env.${key}=${JSON.stringify(value)}`);
797
829
  }
798
830
  }
@@ -805,11 +837,12 @@ function toCodexMcpConfigArgs(servers) {
805
837
  function toOpencodeMcpConfigContent(servers) {
806
838
  const mcp = {};
807
839
  for (const s of servers) {
840
+ const env = mcpSpawnEnv(s.env);
808
841
  mcp[s.name] = {
809
842
  type: "local",
810
843
  command: [s.command, ...s.args ?? []],
811
844
  enabled: true,
812
- ...s.env && Object.keys(s.env).length > 0 ? { environment: s.env } : {}
845
+ ...env ? { environment: env } : {}
813
846
  };
814
847
  }
815
848
  return JSON.stringify({ mcp });
@@ -818,10 +851,11 @@ function writeMcpServersConfig(servers) {
818
851
  if (servers.length === 0) return null;
819
852
  const mcpServers = {};
820
853
  for (const s of servers) {
854
+ const env = mcpSpawnEnv(s.env);
821
855
  mcpServers[s.name] = {
822
856
  command: s.command,
823
857
  ...s.args ? { args: s.args } : {},
824
- ...s.env ? { env: s.env } : {}
858
+ ...env ? { env } : {}
825
859
  };
826
860
  }
827
861
  const dir = mkdtempSync(join(tmpdir(), "sideboard-mcp-"));
@@ -1025,7 +1059,7 @@ var claudeAdapter = {
1025
1059
  );
1026
1060
  }
1027
1061
  const mode = permissionMode(thread);
1028
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-ICWOWUW6.js");
1062
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-JQQLPJM5.js");
1029
1063
  const isOrchestrator = isOrchestratorThread2(thread);
1030
1064
  const injectedServers = await buildInjectedMcpServers({
1031
1065
  includeSideboard: true,
@@ -31,10 +31,23 @@ function wrapElectronAsNodeLaunch(file, args) {
31
31
  function isStrippedElectronLaunch(command, args) {
32
32
  return command === "/bin/sh" && Boolean(args?.[1]?.includes("ELECTRON_RUN_AS_NODE") && args[1].includes("unset"));
33
33
  }
34
+ function isElectronLikeCommand(command) {
35
+ const name = command.trim();
36
+ if (!name) return false;
37
+ if (process.versions.electron && name === process.execPath) return true;
38
+ return /(?:^|[/\\])Electron(?:\.exe)?$/i.test(name) || /Sideboard\.app[/\\]/i.test(name) || /Electron\.app[/\\]/i.test(name);
39
+ }
40
+ function unwrapStrippedElectronLaunch(command, args) {
41
+ if (!isStrippedElectronLaunch(command, args) || !args || args.length < 4) {
42
+ return null;
43
+ }
44
+ return { file: args[3], args: args.slice(4) };
45
+ }
34
46
 
35
47
  export {
36
48
  stripNestedElectronEnv,
37
49
  dropNestedElectronEnvFromProcess,
38
50
  wrapElectronAsNodeLaunch,
39
- isStrippedElectronLaunch
51
+ isElectronLikeCommand,
52
+ unwrapStrippedElectronLaunch
40
53
  };
@@ -2,12 +2,12 @@
2
2
 
3
3
  import {
4
4
  ensureGlobalCoordinatorCwd
5
- } from "./chunk-3MA6JH6G.js";
5
+ } from "./chunk-OB6IRIFV.js";
6
6
  import {
7
7
  allocateTeamName,
8
8
  takenSlugsFromThread,
9
9
  teamSlugFromName
10
- } from "./chunk-CY45C3GA.js";
10
+ } from "./chunk-ZXYWWSHZ.js";
11
11
  import {
12
12
  createEmptyThread,
13
13
  listThreads,
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  resolveNewThreadOptions,
19
19
  resolveThreadDefaults
20
- } from "./chunk-TC2KY5G7.js";
20
+ } from "./chunk-6LFV4VFI.js";
21
21
  import {
22
22
  globalAgentCwd
23
23
  } from "./chunk-JL4SJ6V7.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveGithubRepoSlug
3
- } from "./chunk-L63LLCTX.js";
3
+ } from "./chunk-7D27DD2X.js";
4
4
  import {
5
5
  resolveThreadDefaults
6
- } from "./chunk-XY6XXMAK.js";
6
+ } from "./chunk-FT2SQOL4.js";
7
7
  import {
8
8
  globalAgentCwd,
9
9
  sideboardReposDir
@@ -2,11 +2,11 @@
2
2
 
3
3
  import {
4
4
  isGlobalRepoPath
5
- } from "./chunk-UVNXLTFB.js";
5
+ } from "./chunk-UHTNJKZX.js";
6
6
  import {
7
7
  ensureGhPreferOrigin,
8
8
  resolveRepoRoot
9
- } from "./chunk-CY45C3GA.js";
9
+ } from "./chunk-ZXYWWSHZ.js";
10
10
  import {
11
11
  appDataDir
12
12
  } from "./chunk-JL4SJ6V7.js";
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  getGithubGitAuthMode,
11
11
  getGithubPat
12
- } from "./chunk-TC2KY5G7.js";
12
+ } from "./chunk-6LFV4VFI.js";
13
13
  import {
14
14
  worktreesRoot
15
15
  } from "./chunk-JL4SJ6V7.js";
@@ -9,11 +9,11 @@ import {
9
9
  enrichWorkspacesWithGithub,
10
10
  ensureGlobalCoordinatorCwd,
11
11
  formatWorkspaceInventory
12
- } from "./chunk-3MA6JH6G.js";
13
- import "./chunk-CY45C3GA.js";
12
+ } from "./chunk-OB6IRIFV.js";
13
+ import "./chunk-ZXYWWSHZ.js";
14
14
  import "./chunk-B3SJXYIJ.js";
15
15
  import "./chunk-JOF3XIEM.js";
16
- import "./chunk-TC2KY5G7.js";
16
+ import "./chunk-6LFV4VFI.js";
17
17
  import "./chunk-NSTQ6QKD.js";
18
18
  import "./chunk-KGZBYWZ3.js";
19
19
  import "./chunk-JL4SJ6V7.js";
@@ -7,11 +7,11 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-A7LONVNO.js";
11
- import "./chunk-L63LLCTX.js";
10
+ } from "./chunk-VZ2L4AEJ.js";
11
+ import "./chunk-7D27DD2X.js";
12
12
  import "./chunk-FKOIHGKV.js";
13
- import "./chunk-XY6XXMAK.js";
14
- import "./chunk-5KLC2MWZ.js";
13
+ import "./chunk-FT2SQOL4.js";
14
+ import "./chunk-TLPJHLLM.js";
15
15
  import "./chunk-JT7R45JB.js";
16
16
  import "./chunk-3WA37BRI.js";
17
17
  import "./chunk-77WWLBCI.js";
@@ -16,12 +16,12 @@ import {
16
16
  orchestratorSessionPoisonedByBuiltins,
17
17
  slackCoordinatorSourceRef,
18
18
  takenTeamSlugsForOrchestration
19
- } from "./chunk-UVNXLTFB.js";
20
- import "./chunk-3MA6JH6G.js";
21
- import "./chunk-CY45C3GA.js";
19
+ } from "./chunk-UHTNJKZX.js";
20
+ import "./chunk-OB6IRIFV.js";
21
+ import "./chunk-ZXYWWSHZ.js";
22
22
  import "./chunk-B3SJXYIJ.js";
23
23
  import "./chunk-JOF3XIEM.js";
24
- import "./chunk-TC2KY5G7.js";
24
+ import "./chunk-6LFV4VFI.js";
25
25
  import "./chunk-NSTQ6QKD.js";
26
26
  import "./chunk-KGZBYWZ3.js";
27
27
  import {
@@ -14,12 +14,12 @@ import {
14
14
  orchestratorSessionPoisonedByBuiltins,
15
15
  slackCoordinatorSourceRef,
16
16
  takenTeamSlugsForOrchestration
17
- } from "./chunk-4PTN2LED.js";
18
- import "./chunk-A7LONVNO.js";
19
- import "./chunk-L63LLCTX.js";
17
+ } from "./chunk-B2KIO2SD.js";
18
+ import "./chunk-VZ2L4AEJ.js";
19
+ import "./chunk-7D27DD2X.js";
20
20
  import "./chunk-FKOIHGKV.js";
21
- import "./chunk-XY6XXMAK.js";
22
- import "./chunk-5KLC2MWZ.js";
21
+ import "./chunk-FT2SQOL4.js";
22
+ import "./chunk-TLPJHLLM.js";
23
23
  import "./chunk-JT7R45JB.js";
24
24
  import "./chunk-3WA37BRI.js";
25
25
  import "./chunk-77WWLBCI.js";