@sideboard-ai/core 0.1.169 → 0.1.171

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 (35) hide show
  1. package/dist/{abletime-IC2V7CNB.js → abletime-7VW4EGPT.js} +2 -2
  2. package/dist/{abletime-ESVTHTFH.js → abletime-PCLL36HW.js} +2 -2
  3. package/dist/{agents-V7CF33IK.js → agents-7UTRNLXQ.js} +4 -4
  4. package/dist/{agents-LNFEVU2F.js → agents-CTWLBPCV.js} +4 -4
  5. package/dist/{app-settings-VMOTQORT.js → app-settings-663VQWUV.js} +1 -1
  6. package/dist/{app-settings-LF3TS7XS.js → app-settings-74HBAAH7.js} +1 -1
  7. package/dist/{chunk-P2VCMIZU.js → chunk-234EKD2F.js} +2 -2
  8. package/dist/{chunk-DHPZW2EA.js → chunk-2RM6BZQ2.js} +2 -2
  9. package/dist/{chunk-QHCSYWEC.js → chunk-3F7AXVIL.js} +30 -10
  10. package/dist/{chunk-BLSTB2AD.js → chunk-6X6KMUI2.js} +29 -10
  11. package/dist/{chunk-DKLGWRWC.js → chunk-AQPVBVJE.js} +1 -1
  12. package/dist/{chunk-NB7TEKCF.js → chunk-CMJ2FBBV.js} +1 -1
  13. package/dist/{chunk-7IUO67CW.js → chunk-J7LQVLFQ.js} +15 -8
  14. package/dist/{chunk-YMF5WCIA.js → chunk-OKZFTOM2.js} +15 -8
  15. package/dist/{chunk-Y7DJA3UW.js → chunk-PXNOT6NV.js} +1 -1
  16. package/dist/{chunk-ISMGVHP4.js → chunk-QYJS7LYE.js} +181 -207
  17. package/dist/{chunk-3C4B52TS.js → chunk-QYZYDO3F.js} +1 -1
  18. package/dist/{chunk-M3OIQZRS.js → chunk-ZTVBIBLB.js} +177 -138
  19. package/dist/{coordinator-prompt-JTDCEU74.js → coordinator-prompt-7CTI6HRH.js} +3 -3
  20. package/dist/{coordinator-prompt-RRUU2OYO.js → coordinator-prompt-PM6MPYYB.js} +3 -3
  21. package/dist/{global-workspace-ZF6EJAM3.js → global-workspace-CMYSFRCM.js} +3 -3
  22. package/dist/{global-workspace-4SI3CRRT.js → global-workspace-CRJ6ZVIY.js} +3 -3
  23. package/dist/index.cjs +205 -203
  24. package/dist/index.d.cts +49 -21
  25. package/dist/index.d.ts +49 -21
  26. package/dist/index.js +16 -14
  27. package/dist/mcp/run-stdio.cjs +197 -132
  28. package/dist/mcp/run-stdio.js +8 -8
  29. package/dist/{orchestrator-67BPEJZL.js → orchestrator-RW4IVITI.js} +5 -5
  30. package/dist/{orchestrator-FCH2PFPX.js → orchestrator-VPT4SXXD.js} +5 -5
  31. package/dist/{workspaces-NOC2MWQV.js → workspaces-L73MCDFA.js} +3 -3
  32. package/dist/{workspaces-A7C3WA54.js → workspaces-UYSD2STS.js} +3 -3
  33. package/dist/{worktree-GXO2VDQF.js → worktree-SQD3DBYC.js} +2 -2
  34. package/dist/{worktree-PODE23PD.js → worktree-WVEDT3FM.js} +2 -2
  35. package/package.json +1 -1
@@ -14,9 +14,9 @@ import {
14
14
  toAbleTimeIssueInfo,
15
15
  updateAbleTimeTask,
16
16
  verifyAbleTimeConnection
17
- } from "./chunk-NB7TEKCF.js";
17
+ } from "./chunk-CMJ2FBBV.js";
18
18
  import "./chunk-ELBYOGVA.js";
19
- import "./chunk-7IUO67CW.js";
19
+ import "./chunk-J7LQVLFQ.js";
20
20
  import "./chunk-4TR3HZFT.js";
21
21
  import "./chunk-JT7R45JB.js";
22
22
  import "./chunk-77WWLBCI.js";
@@ -16,9 +16,9 @@ import {
16
16
  toAbleTimeIssueInfo,
17
17
  updateAbleTimeTask,
18
18
  verifyAbleTimeConnection
19
- } from "./chunk-DKLGWRWC.js";
19
+ } from "./chunk-AQPVBVJE.js";
20
20
  import "./chunk-6GN5WPYZ.js";
21
- import "./chunk-YMF5WCIA.js";
21
+ import "./chunk-OKZFTOM2.js";
22
22
  import "./chunk-NSTQ6QKD.js";
23
23
  import "./chunk-KGZBYWZ3.js";
24
24
  import "./chunk-JTJHOYCU.js";
@@ -31,9 +31,9 @@ import {
31
31
  resolveLoginCommand,
32
32
  resolveQuotaFallbackAgent,
33
33
  whichOnPath
34
- } from "./chunk-QHCSYWEC.js";
35
- import "./chunk-DHPZW2EA.js";
36
- import "./chunk-3C4B52TS.js";
34
+ } from "./chunk-3F7AXVIL.js";
35
+ import "./chunk-2RM6BZQ2.js";
36
+ import "./chunk-QYZYDO3F.js";
37
37
  import "./chunk-6K64FJDD.js";
38
38
  import "./chunk-XD2BAANL.js";
39
39
  import "./chunk-M267JPEA.js";
@@ -49,7 +49,7 @@ import {
49
49
  assertOrchestratorCapableAgent,
50
50
  coerceOrchestratorAgent,
51
51
  isOrchestratorCapableAgent
52
- } from "./chunk-7IUO67CW.js";
52
+ } from "./chunk-J7LQVLFQ.js";
53
53
  import "./chunk-4TR3HZFT.js";
54
54
  import "./chunk-JT7R45JB.js";
55
55
  import "./chunk-7UURXPKD.js";
@@ -37,12 +37,12 @@ import {
37
37
  resolveQuotaFallbackAgent,
38
38
  turnCostUsdFromCursorUsage,
39
39
  whichOnPath
40
- } from "./chunk-BLSTB2AD.js";
40
+ } from "./chunk-6X6KMUI2.js";
41
41
  import "./chunk-LZ6QMEQC.js";
42
42
  import "./chunk-S42XV45P.js";
43
43
  import "./chunk-6GN5WPYZ.js";
44
- import "./chunk-P2VCMIZU.js";
45
- import "./chunk-Y7DJA3UW.js";
44
+ import "./chunk-234EKD2F.js";
45
+ import "./chunk-PXNOT6NV.js";
46
46
  import "./chunk-D6JWYJ4P.js";
47
47
  import "./chunk-LZQULFIT.js";
48
48
  import "./chunk-SYFVUF2C.js";
@@ -60,7 +60,7 @@ import {
60
60
  assertOrchestratorCapableAgent,
61
61
  coerceOrchestratorAgent,
62
62
  isOrchestratorCapableAgent
63
- } from "./chunk-YMF5WCIA.js";
63
+ } from "./chunk-OKZFTOM2.js";
64
64
  import "./chunk-NSTQ6QKD.js";
65
65
  import "./chunk-KGZBYWZ3.js";
66
66
  import "./chunk-JTJHOYCU.js";
@@ -83,7 +83,7 @@ import {
83
83
  updateOpencodeSettings,
84
84
  updateProjectProfileSettings,
85
85
  writeViewerContext
86
- } from "./chunk-7IUO67CW.js";
86
+ } from "./chunk-J7LQVLFQ.js";
87
87
  import "./chunk-4TR3HZFT.js";
88
88
  import "./chunk-JT7R45JB.js";
89
89
  import "./chunk-77WWLBCI.js";
@@ -85,7 +85,7 @@ import {
85
85
  updateOpencodeSettings,
86
86
  updateProjectProfileSettings,
87
87
  writeViewerContext
88
- } from "./chunk-YMF5WCIA.js";
88
+ } from "./chunk-OKZFTOM2.js";
89
89
  import "./chunk-NSTQ6QKD.js";
90
90
  import "./chunk-KGZBYWZ3.js";
91
91
  import "./chunk-JTJHOYCU.js";
@@ -7,7 +7,7 @@ import {
7
7
  resolveRepoRoot,
8
8
  takenSlugsFromThread,
9
9
  teamSlugFromName
10
- } from "./chunk-Y7DJA3UW.js";
10
+ } from "./chunk-PXNOT6NV.js";
11
11
  import {
12
12
  ATTACHMENTS_DIR,
13
13
  attachmentsGitignoreBody
@@ -30,7 +30,7 @@ import {
30
30
  resolveThreadDefaults,
31
31
  resolveViewerProfile,
32
32
  resolveViewerProfileForRepo
33
- } from "./chunk-YMF5WCIA.js";
33
+ } from "./chunk-OKZFTOM2.js";
34
34
  import {
35
35
  appDataDir,
36
36
  globalAgentCwd,
@@ -5,7 +5,7 @@ import {
5
5
  resolveRepoRoot,
6
6
  takenSlugsFromThread,
7
7
  teamSlugFromName
8
- } from "./chunk-3C4B52TS.js";
8
+ } from "./chunk-QYZYDO3F.js";
9
9
  import {
10
10
  ATTACHMENTS_DIR,
11
11
  attachmentsGitignoreBody
@@ -22,7 +22,7 @@ import {
22
22
  resolveThreadDefaults,
23
23
  resolveViewerProfile,
24
24
  resolveViewerProfileForRepo
25
- } from "./chunk-7IUO67CW.js";
25
+ } from "./chunk-J7LQVLFQ.js";
26
26
  import {
27
27
  createEmptyThread,
28
28
  listThreads,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isOrchestratorThread
3
- } from "./chunk-DHPZW2EA.js";
3
+ } from "./chunk-2RM6BZQ2.js";
4
4
  import {
5
5
  codexUnattendedGitConfigArgs,
6
6
  mergeAgentGitAuthEnv,
7
7
  resolveAgentGitAuthEnv,
8
8
  resolveCodexGitWritableRoots
9
- } from "./chunk-3C4B52TS.js";
9
+ } from "./chunk-QYZYDO3F.js";
10
10
  import {
11
11
  applyConnectedTeamToCli,
12
12
  brightsyMcpServerName,
@@ -37,7 +37,7 @@ import {
37
37
  loadAppSettings,
38
38
  resolveAgentExecutable,
39
39
  resolveClaudeExecutable
40
- } from "./chunk-7IUO67CW.js";
40
+ } from "./chunk-J7LQVLFQ.js";
41
41
  import {
42
42
  isElectronLikeCommand,
43
43
  unwrapStrippedElectronLaunch
@@ -171,22 +171,38 @@ function decodeBrightsyTarget(model) {
171
171
  // src/agents/turn-input.ts
172
172
  function normalizeTurnInput(input) {
173
173
  if (typeof input === "string") return { prompt: input };
174
- return { prompt: input.prompt, cachedPrefix: input.cachedPrefix?.trim() || void 0 };
174
+ return {
175
+ prompt: input.prompt,
176
+ cachedPrefix: input.cachedPrefix?.trim() || void 0,
177
+ systemPrompt: input.systemPrompt?.trim() || void 0
178
+ };
175
179
  }
176
180
  function dropCachedPrefixOnResume(input, sessionId) {
177
181
  const turn = normalizeTurnInput(input);
178
- if (sessionId) return { prompt: turn.prompt };
182
+ if (sessionId) {
183
+ return turn.systemPrompt ? { prompt: turn.prompt, systemPrompt: turn.systemPrompt } : { prompt: turn.prompt };
184
+ }
179
185
  return turn;
180
186
  }
181
187
  function flattenTurnInput(input) {
182
- const { cachedPrefix, prompt } = normalizeTurnInput(input);
183
- if (!cachedPrefix) return prompt;
184
- return `${cachedPrefix}
188
+ const { cachedPrefix, prompt, systemPrompt } = normalizeTurnInput(input);
189
+ if (cachedPrefix) return `${cachedPrefix}
185
190
 
186
191
  ---
187
192
 
188
193
  Current request:
189
194
  ${prompt}`;
195
+ if (systemPrompt) return `${systemPrompt}
196
+
197
+ ${prompt}`;
198
+ return prompt;
199
+ }
200
+ function splitTurnInputForSystemPrompt(input) {
201
+ const turn = normalizeTurnInput(input);
202
+ return {
203
+ promptText: flattenTurnInput({ cachedPrefix: turn.cachedPrefix, prompt: turn.prompt }),
204
+ systemPrompt: turn.systemPrompt
205
+ };
190
206
  }
191
207
  function buildCachedUserContent(input) {
192
208
  return [{ type: "text", text: flattenTurnInput(input) }];
@@ -1874,7 +1890,7 @@ var claudeAdapter = {
1874
1890
  const claude = resolveClaudeExecutable();
1875
1891
  const sessionId = await this.resolveSessionId(thread.worktreePath, thread.sessionId);
1876
1892
  const effective = dropCachedPrefixOnResume(input, sessionId);
1877
- const promptText = flattenTurnInput(effective);
1893
+ const { promptText, systemPrompt } = splitTurnInputForSystemPrompt(effective);
1878
1894
  const useStdin = promptText.length > CLAUDE_PROMPT_ARG_MAX;
1879
1895
  if (process.env.SIDEBOARD_DEBUG_CLAUDE_TURN === "1") {
1880
1896
  console.error(
@@ -1882,7 +1898,7 @@ var claudeAdapter = {
1882
1898
  );
1883
1899
  }
1884
1900
  const mode = permissionMode(thread);
1885
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-ZF6EJAM3.js");
1901
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-CMYSFRCM.js");
1886
1902
  const isOrchestrator = isOrchestratorThread2(thread);
1887
1903
  const injectedServers = await buildInjectedMcpServers({
1888
1904
  includeSideboard: true,
@@ -1926,6 +1942,9 @@ var claudeAdapter = {
1926
1942
  "--permission-mode",
1927
1943
  mode.claude
1928
1944
  ];
1945
+ if (systemPrompt) {
1946
+ args.push("--append-system-prompt", systemPrompt);
1947
+ }
1929
1948
  const mcpConfigPath = writeMcpServersConfig(injectedServers);
1930
1949
  if (mcpConfigPath) {
1931
1950
  args.push("--mcp-config", mcpConfigPath);
@@ -3622,6 +3641,7 @@ export {
3622
3641
  normalizeTurnInput,
3623
3642
  dropCachedPrefixOnResume,
3624
3643
  flattenTurnInput,
3644
+ splitTurnInputForSystemPrompt,
3625
3645
  buildCachedUserContent,
3626
3646
  buildClaudeStreamJsonUserMessage,
3627
3647
  findInvalidCacheControlTtlOrder,
@@ -11,13 +11,13 @@ import {
11
11
  } from "./chunk-S42XV45P.js";
12
12
  import {
13
13
  isOrchestratorThread
14
- } from "./chunk-P2VCMIZU.js";
14
+ } from "./chunk-234EKD2F.js";
15
15
  import {
16
16
  codexUnattendedGitConfigArgs,
17
17
  mergeAgentGitAuthEnv,
18
18
  resolveAgentGitAuthEnv,
19
19
  resolveCodexGitWritableRoots
20
- } from "./chunk-Y7DJA3UW.js";
20
+ } from "./chunk-PXNOT6NV.js";
21
21
  import {
22
22
  enrichPathWithNpmGlobalBin,
23
23
  isConductorBundledCli,
@@ -35,7 +35,7 @@ import {
35
35
  resolveClaudeExecutable,
36
36
  unwrapStrippedElectronLaunch,
37
37
  wrapElectronAsNodeLaunch
38
- } from "./chunk-YMF5WCIA.js";
38
+ } from "./chunk-OKZFTOM2.js";
39
39
  import {
40
40
  appDataDir
41
41
  } from "./chunk-JTJHOYCU.js";
@@ -450,22 +450,38 @@ function formatTurnExitError(exitCode, stderrSummary) {
450
450
  // src/agents/turn-input.ts
451
451
  function normalizeTurnInput(input) {
452
452
  if (typeof input === "string") return { prompt: input };
453
- return { prompt: input.prompt, cachedPrefix: input.cachedPrefix?.trim() || void 0 };
453
+ return {
454
+ prompt: input.prompt,
455
+ cachedPrefix: input.cachedPrefix?.trim() || void 0,
456
+ systemPrompt: input.systemPrompt?.trim() || void 0
457
+ };
454
458
  }
455
459
  function dropCachedPrefixOnResume(input, sessionId) {
456
460
  const turn = normalizeTurnInput(input);
457
- if (sessionId) return { prompt: turn.prompt };
461
+ if (sessionId) {
462
+ return turn.systemPrompt ? { prompt: turn.prompt, systemPrompt: turn.systemPrompt } : { prompt: turn.prompt };
463
+ }
458
464
  return turn;
459
465
  }
460
466
  function flattenTurnInput(input) {
461
- const { cachedPrefix, prompt } = normalizeTurnInput(input);
462
- if (!cachedPrefix) return prompt;
463
- return `${cachedPrefix}
467
+ const { cachedPrefix, prompt, systemPrompt } = normalizeTurnInput(input);
468
+ if (cachedPrefix) return `${cachedPrefix}
464
469
 
465
470
  ---
466
471
 
467
472
  Current request:
468
473
  ${prompt}`;
474
+ if (systemPrompt) return `${systemPrompt}
475
+
476
+ ${prompt}`;
477
+ return prompt;
478
+ }
479
+ function splitTurnInputForSystemPrompt(input) {
480
+ const turn = normalizeTurnInput(input);
481
+ return {
482
+ promptText: flattenTurnInput({ cachedPrefix: turn.cachedPrefix, prompt: turn.prompt }),
483
+ systemPrompt: turn.systemPrompt
484
+ };
469
485
  }
470
486
 
471
487
  // src/agents/brightsy.ts
@@ -2192,7 +2208,7 @@ var claudeAdapter = {
2192
2208
  const claude = resolveClaudeExecutable();
2193
2209
  const sessionId = await this.resolveSessionId(thread.worktreePath, thread.sessionId);
2194
2210
  const effective = dropCachedPrefixOnResume(input, sessionId);
2195
- const promptText = flattenTurnInput(effective);
2211
+ const { promptText, systemPrompt } = splitTurnInputForSystemPrompt(effective);
2196
2212
  const useStdin = promptText.length > CLAUDE_PROMPT_ARG_MAX;
2197
2213
  if (process.env.SIDEBOARD_DEBUG_CLAUDE_TURN === "1") {
2198
2214
  console.error(
@@ -2200,7 +2216,7 @@ var claudeAdapter = {
2200
2216
  );
2201
2217
  }
2202
2218
  const mode = permissionMode(thread);
2203
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-4SI3CRRT.js");
2219
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-CRJ6ZVIY.js");
2204
2220
  const isOrchestrator = isOrchestratorThread2(thread);
2205
2221
  const injectedServers = await buildInjectedMcpServers({
2206
2222
  includeSideboard: true,
@@ -2244,6 +2260,9 @@ var claudeAdapter = {
2244
2260
  "--permission-mode",
2245
2261
  mode.claude
2246
2262
  ];
2263
+ if (systemPrompt) {
2264
+ args.push("--append-system-prompt", systemPrompt);
2265
+ }
2247
2266
  const mcpConfigPath = writeMcpServersConfig(injectedServers);
2248
2267
  if (mcpConfigPath) {
2249
2268
  args.push("--mcp-config", mcpConfigPath);
@@ -8,7 +8,7 @@ import {
8
8
  getAbleTimeHost,
9
9
  isAbleTimeConnected,
10
10
  saveAbleTimeConnection
11
- } from "./chunk-YMF5WCIA.js";
11
+ } from "./chunk-OKZFTOM2.js";
12
12
 
13
13
  // src/integrations/abletime-mcp.ts
14
14
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -6,7 +6,7 @@ import {
6
6
  getAbleTimeHost,
7
7
  isAbleTimeConnected,
8
8
  saveAbleTimeConnection
9
- } from "./chunk-7IUO67CW.js";
9
+ } from "./chunk-J7LQVLFQ.js";
10
10
 
11
11
  // src/integrations/abletime-mcp.ts
12
12
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -16,7 +16,7 @@ import {
16
16
  import { randomUUID } from "crypto";
17
17
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
18
18
  import { homedir, hostname } from "os";
19
- import { join as join2 } from "path";
19
+ import { isAbsolute, join as join2 } from "path";
20
20
 
21
21
  // src/agents/orchestrator-capable.ts
22
22
  var ORCHESTRATOR_AGENT_KINDS = [
@@ -458,7 +458,7 @@ function normalizeClaude(raw) {
458
458
  const out = {};
459
459
  if (typeof source.executablePath === "string") {
460
460
  const path = source.executablePath.trim();
461
- if (path) out.executablePath = path;
461
+ if (path && isAbsolute(path)) out.executablePath = path;
462
462
  }
463
463
  if (typeof source.chromeEnabled === "boolean") {
464
464
  out.chromeEnabled = source.chromeEnabled;
@@ -477,17 +477,24 @@ function normalizeCliExecutable(raw) {
477
477
  const out = {};
478
478
  if (typeof source.executablePath === "string") {
479
479
  const path = source.executablePath.trim();
480
- if (path) out.executablePath = path;
480
+ if (path && isAbsolute(path)) out.executablePath = path;
481
481
  }
482
482
  return out;
483
483
  }
484
+ function absoluteExecutablePath(value) {
485
+ const path = value.trim();
486
+ if (!isAbsolute(path)) {
487
+ throw new Error("Executable path must be absolute. Leave it empty to use the system CLI.");
488
+ }
489
+ return path;
490
+ }
484
491
  function normalizeBrightsy(raw) {
485
492
  if (!raw || typeof raw !== "object") return {};
486
493
  const source = raw;
487
494
  const out = {};
488
495
  if (typeof source.executablePath === "string") {
489
496
  const path = source.executablePath.trim();
490
- if (path) out.executablePath = path;
497
+ if (path && isAbsolute(path)) out.executablePath = path;
491
498
  }
492
499
  if (typeof source.cloudConnectEnabled === "boolean") {
493
500
  out.cloudConnectEnabled = source.cloudConnectEnabled;
@@ -979,7 +986,7 @@ function updateClaudeSettings(patch) {
979
986
  if (patch.executablePath == null || patch.executablePath.trim() === "") {
980
987
  delete claude.executablePath;
981
988
  } else {
982
- claude.executablePath = patch.executablePath.trim();
989
+ claude.executablePath = absoluteExecutablePath(patch.executablePath);
983
990
  }
984
991
  }
985
992
  if (typeof patch.chromeEnabled === "boolean") {
@@ -994,7 +1001,7 @@ function updateBrightsySettings(patch) {
994
1001
  if (patch.executablePath == null || patch.executablePath.trim() === "") {
995
1002
  delete brightsy.executablePath;
996
1003
  } else {
997
- brightsy.executablePath = patch.executablePath.trim();
1004
+ brightsy.executablePath = absoluteExecutablePath(patch.executablePath);
998
1005
  }
999
1006
  }
1000
1007
  if (typeof patch.cloudConnectEnabled === "boolean") {
@@ -1019,7 +1026,7 @@ function updateCodexSettings(patch) {
1019
1026
  if (patch.executablePath == null || patch.executablePath.trim() === "") {
1020
1027
  delete codex.executablePath;
1021
1028
  } else {
1022
- codex.executablePath = patch.executablePath.trim();
1029
+ codex.executablePath = absoluteExecutablePath(patch.executablePath);
1023
1030
  }
1024
1031
  }
1025
1032
  return saveAppSettings({ ...current, codex });
@@ -1031,7 +1038,7 @@ function updateOpencodeSettings(patch) {
1031
1038
  if (patch.executablePath == null || patch.executablePath.trim() === "") {
1032
1039
  delete opencode.executablePath;
1033
1040
  } else {
1034
- opencode.executablePath = patch.executablePath.trim();
1041
+ opencode.executablePath = absoluteExecutablePath(patch.executablePath);
1035
1042
  }
1036
1043
  }
1037
1044
  return saveAppSettings({ ...current, opencode });
@@ -15,7 +15,7 @@ import {
15
15
  import { randomUUID } from "crypto";
16
16
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
17
17
  import { homedir, hostname } from "os";
18
- import { join as join2 } from "path";
18
+ import { isAbsolute, join as join2 } from "path";
19
19
 
20
20
  // src/agents/orchestrator-capable.ts
21
21
  var ORCHESTRATOR_AGENT_KINDS = [
@@ -486,7 +486,7 @@ function normalizeClaude(raw) {
486
486
  const out = {};
487
487
  if (typeof source.executablePath === "string") {
488
488
  const path = source.executablePath.trim();
489
- if (path) out.executablePath = path;
489
+ if (path && isAbsolute(path)) out.executablePath = path;
490
490
  }
491
491
  if (typeof source.chromeEnabled === "boolean") {
492
492
  out.chromeEnabled = source.chromeEnabled;
@@ -505,17 +505,24 @@ function normalizeCliExecutable(raw) {
505
505
  const out = {};
506
506
  if (typeof source.executablePath === "string") {
507
507
  const path = source.executablePath.trim();
508
- if (path) out.executablePath = path;
508
+ if (path && isAbsolute(path)) out.executablePath = path;
509
509
  }
510
510
  return out;
511
511
  }
512
+ function absoluteExecutablePath(value) {
513
+ const path = value.trim();
514
+ if (!isAbsolute(path)) {
515
+ throw new Error("Executable path must be absolute. Leave it empty to use the system CLI.");
516
+ }
517
+ return path;
518
+ }
512
519
  function normalizeBrightsy(raw) {
513
520
  if (!raw || typeof raw !== "object") return {};
514
521
  const source = raw;
515
522
  const out = {};
516
523
  if (typeof source.executablePath === "string") {
517
524
  const path = source.executablePath.trim();
518
- if (path) out.executablePath = path;
525
+ if (path && isAbsolute(path)) out.executablePath = path;
519
526
  }
520
527
  if (typeof source.cloudConnectEnabled === "boolean") {
521
528
  out.cloudConnectEnabled = source.cloudConnectEnabled;
@@ -1007,7 +1014,7 @@ function updateClaudeSettings(patch) {
1007
1014
  if (patch.executablePath == null || patch.executablePath.trim() === "") {
1008
1015
  delete claude.executablePath;
1009
1016
  } else {
1010
- claude.executablePath = patch.executablePath.trim();
1017
+ claude.executablePath = absoluteExecutablePath(patch.executablePath);
1011
1018
  }
1012
1019
  }
1013
1020
  if (typeof patch.chromeEnabled === "boolean") {
@@ -1022,7 +1029,7 @@ function updateBrightsySettings(patch) {
1022
1029
  if (patch.executablePath == null || patch.executablePath.trim() === "") {
1023
1030
  delete brightsy.executablePath;
1024
1031
  } else {
1025
- brightsy.executablePath = patch.executablePath.trim();
1032
+ brightsy.executablePath = absoluteExecutablePath(patch.executablePath);
1026
1033
  }
1027
1034
  }
1028
1035
  if (typeof patch.cloudConnectEnabled === "boolean") {
@@ -1047,7 +1054,7 @@ function updateCodexSettings(patch) {
1047
1054
  if (patch.executablePath == null || patch.executablePath.trim() === "") {
1048
1055
  delete codex.executablePath;
1049
1056
  } else {
1050
- codex.executablePath = patch.executablePath.trim();
1057
+ codex.executablePath = absoluteExecutablePath(patch.executablePath);
1051
1058
  }
1052
1059
  }
1053
1060
  return saveAppSettings({ ...current, codex });
@@ -1059,7 +1066,7 @@ function updateOpencodeSettings(patch) {
1059
1066
  if (patch.executablePath == null || patch.executablePath.trim() === "") {
1060
1067
  delete opencode.executablePath;
1061
1068
  } else {
1062
- opencode.executablePath = patch.executablePath.trim();
1069
+ opencode.executablePath = absoluteExecutablePath(patch.executablePath);
1063
1070
  }
1064
1071
  }
1065
1072
  return saveAppSettings({ ...current, opencode });
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  getGithubGitAuthMode,
24
24
  getGithubPat
25
- } from "./chunk-YMF5WCIA.js";
25
+ } from "./chunk-OKZFTOM2.js";
26
26
  import {
27
27
  worktreesRoot
28
28
  } from "./chunk-JTJHOYCU.js";