@sideboard-ai/core 0.1.107 → 0.1.109

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 (38) hide show
  1. package/dist/agents/cursor-runner.js +2 -2
  2. package/dist/{agents-T4RHL5UX.js → agents-XB332VUJ.js} +5 -5
  3. package/dist/{agents-4XQANGFO.js → agents-YIMHDI46.js} +7 -7
  4. package/dist/{app-settings-2WH6DVOW.js → app-settings-EBCVMFF6.js} +1 -1
  5. package/dist/{app-settings-6AXBWM3K.js → app-settings-IYSSVZHH.js} +2 -2
  6. package/dist/{chunk-7ZTQHC2Q.js → chunk-4LKD3PGO.js} +1 -1
  7. package/dist/{chunk-TLPJHLLM.js → chunk-4TR3HZFT.js} +1 -1
  8. package/dist/{chunk-SMWVSSE5.js → chunk-756EO4GK.js} +3 -3
  9. package/dist/{chunk-XOYH3OMI.js → chunk-AY2EQI2P.js} +16 -13
  10. package/dist/{chunk-PZVA2VDF.js → chunk-EW7COXYE.js} +1 -1
  11. package/dist/{chunk-VTTTV2LM.js → chunk-FBV6NK62.js} +2 -2
  12. package/dist/{chunk-GYFNFU62.js → chunk-I2OJ2YSP.js} +8 -16
  13. package/dist/{chunk-6JJTMI7G.js → chunk-JVIW55KT.js} +1 -1
  14. package/dist/{chunk-6HRR4T4P.js → chunk-KKHDPV45.js} +15 -14
  15. package/dist/{chunk-XEFHG6VG.js → chunk-LTPX5N6K.js} +1310 -1265
  16. package/dist/{chunk-EX4NZN3O.js → chunk-NE4TOOKS.js} +1 -1
  17. package/dist/{chunk-LRO7YVLJ.js → chunk-OQDIYVDD.js} +2 -2
  18. package/dist/{chunk-3SIFRHJ3.js → chunk-Q6B3NRCT.js} +1457 -1431
  19. package/dist/{chunk-THXSFETX.js → chunk-TROJ3PVH.js} +3 -3
  20. package/dist/{chunk-5XUKY2JY.js → chunk-VRTKGKUW.js} +8 -16
  21. package/dist/{chunk-HUKCGRAT.js → chunk-WD2TARQS.js} +7 -2
  22. package/dist/{coordinator-prompt-4TUQUEHY.js → coordinator-prompt-JKOU6BWV.js} +4 -4
  23. package/dist/{coordinator-prompt-YQWRXCPX.js → coordinator-prompt-V66BYTUV.js} +3 -3
  24. package/dist/{global-workspace-V6TMECDU.js → global-workspace-NCTBE7G7.js} +5 -5
  25. package/dist/{global-workspace-H37LFFXI.js → global-workspace-WBQWQQQY.js} +4 -4
  26. package/dist/index.cjs +1697 -1661
  27. package/dist/index.d.cts +65 -24
  28. package/dist/index.d.ts +65 -24
  29. package/dist/index.js +107 -85
  30. package/dist/mcp/run-stdio.cjs +1660 -1619
  31. package/dist/mcp/run-stdio.js +82 -79
  32. package/dist/{orchestrator-DEHSKERK.js → orchestrator-6W7EKSPO.js} +9 -9
  33. package/dist/{orchestrator-2P7DX44Q.js → orchestrator-JVGVPKLI.js} +7 -7
  34. package/dist/{workspaces-JU3P6FHB.js → workspaces-I3554R3F.js} +5 -5
  35. package/dist/{workspaces-UPEVANU4.js → workspaces-SUBEDSGB.js} +6 -6
  36. package/dist/{worktree-NR5YJG2E.js → worktree-2UWO7VEK.js} +3 -3
  37. package/dist/{worktree-6MFKE465.js → worktree-7H6HB6GW.js} +2 -2
  38. package/package.json +1 -1
@@ -6,10 +6,10 @@ import {
6
6
  cursorSdkMessageToEvents,
7
7
  ensureCursorRipgrepPath,
8
8
  formatUnknownDetail
9
- } from "../chunk-HUKCGRAT.js";
9
+ } from "../chunk-WD2TARQS.js";
10
10
  import {
11
11
  dropNestedElectronEnvFromProcess
12
- } from "../chunk-TLPJHLLM.js";
12
+ } from "../chunk-4TR3HZFT.js";
13
13
  import {
14
14
  appDataDir
15
15
  } from "../chunk-QZQEXME2.js";
@@ -32,19 +32,19 @@ import {
32
32
  resolveCursorModelId,
33
33
  resolveLoginCommand,
34
34
  resolveQuotaFallbackAgent
35
- } from "./chunk-XOYH3OMI.js";
35
+ } from "./chunk-AY2EQI2P.js";
36
36
  import "./chunk-7YKXHBIW.js";
37
37
  import {
38
38
  ORCHESTRATOR_AGENT_KINDS,
39
39
  assertOrchestratorCapableAgent,
40
40
  coerceOrchestratorAgent,
41
41
  isOrchestratorCapableAgent
42
- } from "./chunk-THXSFETX.js";
43
- import "./chunk-5XUKY2JY.js";
44
- import "./chunk-6JJTMI7G.js";
42
+ } from "./chunk-TROJ3PVH.js";
43
+ import "./chunk-VRTKGKUW.js";
44
+ import "./chunk-JVIW55KT.js";
45
45
  import "./chunk-B3SJXYIJ.js";
46
46
  import "./chunk-P3BQ5DOL.js";
47
- import "./chunk-EX4NZN3O.js";
47
+ import "./chunk-NE4TOOKS.js";
48
48
  import "./chunk-NSTQ6QKD.js";
49
49
  import "./chunk-KGZBYWZ3.js";
50
50
  import "./chunk-BD2ICC4D.js";
@@ -28,23 +28,23 @@ import {
28
28
  resolveCursorModelId,
29
29
  resolveLoginCommand,
30
30
  resolveQuotaFallbackAgent
31
- } from "./chunk-6HRR4T4P.js";
31
+ } from "./chunk-KKHDPV45.js";
32
32
  import "./chunk-2GO3YKBA.js";
33
33
  import {
34
34
  ORCHESTRATOR_AGENT_KINDS,
35
35
  assertOrchestratorCapableAgent,
36
36
  coerceOrchestratorAgent,
37
37
  isOrchestratorCapableAgent
38
- } from "./chunk-SMWVSSE5.js";
39
- import "./chunk-GYFNFU62.js";
38
+ } from "./chunk-756EO4GK.js";
39
+ import "./chunk-I2OJ2YSP.js";
40
40
  import {
41
41
  cursorSdkMessageToEvents,
42
42
  parseCursorRunnerLine
43
- } from "./chunk-HUKCGRAT.js";
44
- import "./chunk-PZVA2VDF.js";
43
+ } from "./chunk-WD2TARQS.js";
44
+ import "./chunk-EW7COXYE.js";
45
45
  import "./chunk-FKOIHGKV.js";
46
- import "./chunk-7ZTQHC2Q.js";
47
- import "./chunk-TLPJHLLM.js";
46
+ import "./chunk-4LKD3PGO.js";
47
+ import "./chunk-4TR3HZFT.js";
48
48
  import "./chunk-JT7R45JB.js";
49
49
  import "./chunk-KGSVLZV6.js";
50
50
  import "./chunk-77WWLBCI.js";
@@ -55,7 +55,7 @@ import {
55
55
  updateDefaultsSettings,
56
56
  updateIntegrationsSettings,
57
57
  updateOpencodeSettings
58
- } from "./chunk-EX4NZN3O.js";
58
+ } from "./chunk-NE4TOOKS.js";
59
59
  import "./chunk-NSTQ6QKD.js";
60
60
  import "./chunk-KGZBYWZ3.js";
61
61
  import "./chunk-BD2ICC4D.js";
@@ -53,8 +53,8 @@ import {
53
53
  updateDefaultsSettings,
54
54
  updateIntegrationsSettings,
55
55
  updateOpencodeSettings
56
- } from "./chunk-7ZTQHC2Q.js";
57
- import "./chunk-TLPJHLLM.js";
56
+ } from "./chunk-4LKD3PGO.js";
57
+ import "./chunk-4TR3HZFT.js";
58
58
  import "./chunk-JT7R45JB.js";
59
59
  import "./chunk-77WWLBCI.js";
60
60
  import "./chunk-QZQEXME2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  stripNestedElectronEnv
3
- } from "./chunk-TLPJHLLM.js";
3
+ } from "./chunk-4TR3HZFT.js";
4
4
  import {
5
5
  chmodOwnerOnly,
6
6
  writePrivateFile
@@ -35,7 +35,7 @@ function isElectronLikeCommand(command) {
35
35
  const name = command.trim();
36
36
  if (!name) return false;
37
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);
38
+ return /(?:^|[/\\])Electron(?:\.exe)?$/i.test(name) || /(?:^|[/\\])Sideboard(?:\.exe)?$/i.test(name) || /(?:Sideboard|Electron)\.app[/\\]Contents[/\\]MacOS[/\\]/i.test(name);
39
39
  }
40
40
  function unwrapStrippedElectronLaunch(command, args) {
41
41
  if (!isStrippedElectronLaunch(command, args) || !args || args.length < 4) {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ensureGlobalCoordinatorCwd
3
- } from "./chunk-GYFNFU62.js";
3
+ } from "./chunk-I2OJ2YSP.js";
4
4
  import {
5
5
  allocateTeamName,
6
6
  takenSlugsFromThread,
7
7
  teamSlugFromName
8
- } from "./chunk-PZVA2VDF.js";
8
+ } from "./chunk-EW7COXYE.js";
9
9
  import {
10
10
  resolveNewThreadOptions,
11
11
  resolveThreadDefaults
12
- } from "./chunk-7ZTQHC2Q.js";
12
+ } from "./chunk-4LKD3PGO.js";
13
13
  import {
14
14
  createEmptyThread,
15
15
  listThreads,
@@ -9,13 +9,13 @@ import {
9
9
  } from "./chunk-7YKXHBIW.js";
10
10
  import {
11
11
  isOrchestratorThread
12
- } from "./chunk-THXSFETX.js";
12
+ } from "./chunk-TROJ3PVH.js";
13
13
  import {
14
14
  codexUnattendedGitConfigArgs,
15
15
  mergeAgentGitAuthEnv,
16
16
  resolveAgentGitAuthEnv,
17
17
  resolveCodexGitWritableRoots
18
- } from "./chunk-6JJTMI7G.js";
18
+ } from "./chunk-JVIW55KT.js";
19
19
  import {
20
20
  claudeChromeEnabled,
21
21
  isElectronLikeCommand,
@@ -24,7 +24,7 @@ import {
24
24
  resolveClaudeExecutable,
25
25
  unwrapStrippedElectronLaunch,
26
26
  wrapElectronAsNodeLaunch
27
- } from "./chunk-EX4NZN3O.js";
27
+ } from "./chunk-NE4TOOKS.js";
28
28
  import {
29
29
  appDataDir
30
30
  } from "./chunk-BD2ICC4D.js";
@@ -78,6 +78,10 @@ function applyTurnUsage(current, incoming, scope = "request") {
78
78
  const merged = mergeUsage(current, incoming);
79
79
  return { ...merged, lastRequestTokens: requestOccupancy(incoming) };
80
80
  }
81
+ function contextTokens(u) {
82
+ if (u.lastRequestTokens != null && u.lastRequestTokens > 0) return u.lastRequestTokens;
83
+ return requestOccupancy(u);
84
+ }
81
85
 
82
86
  // src/agents/brightsy-targets.ts
83
87
  function encodeBrightsyTarget(type, id, accountId) {
@@ -197,6 +201,8 @@ function summarizeTurnStderr(tail, maxChars = 500) {
197
201
  if (tail.length === 0) return "";
198
202
  const cursorStartup = [...tail].reverse().find((line) => /cursor startup failed:/i.test(line));
199
203
  if (cursorStartup) return clipStderr(cursorStartup, maxChars);
204
+ const cursorRunFailed = [...tail].reverse().find((line) => /^cursor run failed\b/i.test(line.trim()));
205
+ if (cursorRunFailed) return clipStderr(cursorRunFailed, maxChars);
200
206
  if (tail.some(looksLikeNestedElectronCrash)) return NESTED_ELECTRON_SUMMARY;
201
207
  if (tail.some(looksLikeHomebrewLibuvCrash)) return HOMEBREW_LIBUV_SUMMARY;
202
208
  if (tail.some(
@@ -227,7 +233,7 @@ function looksLikeRetryableRunnerCrash(text) {
227
233
  const lower = text.trim().toLowerCase();
228
234
  if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
229
235
  if (!lower) return true;
230
- return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
236
+ return /uv_run|spineventloopinternal|libuv|homebrew node \+ shared libuv|hascustomhostobject|electroninitializeicuandstartnode|nested chromium|truncated crash dump|connection stalled|sig(?:segv|abrt|ill)|segmentation fault|illegal instruction|fatal error/.test(
231
237
  lower
232
238
  );
233
239
  }
@@ -285,6 +291,9 @@ function humanizeAgentFailDetail(detail) {
285
291
  if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
286
292
  return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
287
293
  }
294
+ if (/connection stalled/.test(lower)) {
295
+ return /retry the turn/i.test(raw) ? raw : `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
296
+ }
288
297
  return raw;
289
298
  }
290
299
  function turnFailChatText(opts) {
@@ -895,14 +904,7 @@ var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
895
904
  "mcp__sideboard__present_schema",
896
905
  "mcp__sideboard__present_files",
897
906
  "mcp__sideboard__ask_user",
898
- "mcp__sideboard__present_plan",
899
- "mcp__sideboard__list_teams",
900
- "mcp__sideboard__slack_list_channels",
901
- "mcp__sideboard__slack_list_users",
902
- "mcp__sideboard__slack_search",
903
- "mcp__sideboard__slack_read",
904
- "mcp__sideboard__slack_post",
905
- "mcp__sideboard__slack_replies"
907
+ "mcp__sideboard__present_plan"
906
908
  ];
907
909
  var brightsyMcpCommandCache = null;
908
910
  async function resolveBrightsyMcpCommand() {
@@ -1357,7 +1359,7 @@ var claudeAdapter = {
1357
1359
  );
1358
1360
  }
1359
1361
  const mode = permissionMode(thread);
1360
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-H37LFFXI.js");
1362
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-WBQWQQQY.js");
1361
1363
  const isOrchestrator = isOrchestratorThread2(thread);
1362
1364
  const injectedServers = await buildInjectedMcpServers({
1363
1365
  includeSideboard: true,
@@ -2996,6 +2998,7 @@ export {
2996
2998
  turnFailChatText,
2997
2999
  formatTurnExitError,
2998
3000
  applyTurnUsage,
3001
+ contextTokens,
2999
3002
  encodeBrightsyTarget,
3000
3003
  decodeBrightsyTarget,
3001
3004
  parseBrightsyCliLine,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getGithubGitAuthMode,
6
6
  getGithubPat
7
- } from "./chunk-7ZTQHC2Q.js";
7
+ } from "./chunk-4LKD3PGO.js";
8
8
  import {
9
9
  listThreads
10
10
  } from "./chunk-KGSVLZV6.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  isGlobalRepoPath
3
- } from "./chunk-SMWVSSE5.js";
3
+ } from "./chunk-756EO4GK.js";
4
4
  import {
5
5
  ensureGhPreferOrigin,
6
6
  resolveRepoRoot
7
- } from "./chunk-PZVA2VDF.js";
7
+ } from "./chunk-EW7COXYE.js";
8
8
  import {
9
9
  appDataDir
10
10
  } from "./chunk-QZQEXME2.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveGithubRepoSlug
3
- } from "./chunk-PZVA2VDF.js";
3
+ } from "./chunk-EW7COXYE.js";
4
4
  import {
5
5
  resolveThreadDefaults
6
- } from "./chunk-7ZTQHC2Q.js";
6
+ } from "./chunk-4LKD3PGO.js";
7
7
  import {
8
8
  globalAgentCwd,
9
9
  sideboardReposDir
@@ -69,14 +69,14 @@ var COORDINATOR_TOOL_PLAYBOOK = [
69
69
  "- list_run_scripts / run_dev_script / stop_dev_script \u2014 start/stop named run scripts",
70
70
  "Inspect / review / PRs:",
71
71
  "- get_diff \u2014 compact diff summary",
72
- '- request_review \u2014 open a Review chat tab on a worktree thread (attaches .sideboard/review.md when present, else local guidelines; sends "Review changes in this workspace."); then wait_for_turn (loop while stillRunning) / get_turn_result on the returned id',
72
+ '- request_review \u2014 open a Review chat tab on a worktree thread (attaches .claude/skills/review/SKILL.md when present, else seeds that skill / local guidelines; sends "Review changes in this workspace."); then wait_for_turn (loop while stillRunning) / get_turn_result on the returned id',
73
73
  "- ask_git \u2014 commit & push, open a draft PR, resolve conflicts, or merge. When the worktree is clean, Sideboard pushes / opens the PR itself. When dirty, it queues the worktree agent \u2014 then wait_for_turn (loop while stillRunning). Prefer this over paraphrasing.",
74
74
  '- Merge (`ask_git` action=merge / send_to_thread "Merge PR.") only when the user explicitly asked to merge that PR. Do not merge because the work looks done, CI is green, or a typical flow includes it.',
75
75
  '- Or send_to_thread with those exact phrases: "Commit and push.", "Commit, push, and open a draft PR.", "Merge the remote branch (main) into your branch and resolve conflicts. Then, commit and push your changes.", "Merge PR." (draft PRs: `gh pr create --draft -R <origin-owner/name>` using the workspace `github:` slug \u2014 never upstream). Never run git/gh from this orchestration cwd, and never merge the PR yourself.',
76
76
  "Process guides:",
77
77
  "- Recurring multi-item / fan-out: if the child worktree has `.claude/skills/graph-engineering/SKILL.md`, tell the worker to follow it (`/graph-engineering`). Judge first; state on disk; grow the rulebook; do not patch three threads.",
78
- "- Recurring shapes: have the worktree agent write `.claude/skills/<kebab-name>/SKILL.md` (commit it) so later threads and native Claude Code / attach see it. Do not use `.sideboard/skills` for new guides. Codex/OpenCode: one line in AGENTS.md pointing at that file.",
79
- "- One-offs: no guide. Same miss across threads: edit the skill or `.sideboard/review.md`, then rerun the batch \u2014 do not patch three threads.",
78
+ "- Recurring shapes: have the worktree agent write `.claude/skills/<kebab-name>/SKILL.md` (commit it) so later threads and native Claude Code / attach see it. Merge-review sentences go in `.claude/skills/review/SKILL.md` (create it \u2014 that is allowed). Do not use `.sideboard/skills/` (that folder only). Codex/OpenCode: one line in AGENTS.md pointing at that file.",
79
+ "- One-offs: no guide. Same miss across threads: edit the skill or `.claude/skills/review/SKILL.md`, then rerun the batch \u2014 do not patch three threads.",
80
80
  "Human-only (do not attempt): ready-for-review land (confirm_land), purge_thread.",
81
81
  "Thread links in replies: when mentioning a chat/thread for the user, include a markdown link `[Title](sideboard://thread/<id>)` using the full id (or the link field from create_thread / list_threads). Sideboard renders these as clickable opens.",
82
82
  "Bash / Read / etc: allowed for (1) inspecting target worktrees / registered repo paths from MCP, and (2) greenfield setup under ~/sideboard/repos (git clone, gh repo create, git init+remote). Never git init/clone *inside* this synthetic home cwd \u2014 emptiness here is expected, not a bug."
@@ -97,19 +97,11 @@ function coordinatorTurnReminder(opts) {
97
97
  const goal = opts.goal?.trim();
98
98
  return [
99
99
  "Sideboard Orchestration (mandatory):",
100
- "- You oversee Sideboard worktree agents. You are not yourself checked out in a project worktree.",
101
- "- This cwd is a synthetic empty home (not a git repo). Emptiness here is expected \u2014 it is not a problem to fix.",
102
- "- Registered workspaces / child threads are the fleet you manage via Sideboard MCP.",
103
- `- YOUR orchestration thread id is ${opts.parentId}`,
104
- `- Always pass parentThreadId="${opts.parentId}" on create_thread (never invent or reuse another uuid).`,
105
- `- Or omit parentThreadId \u2014 Sideboard MCP already binds children to ${opts.parentId}.`,
100
+ "- You oversee worktree agents from a synthetic empty cwd (not a git repo). Follow AGENTS.md / CLAUDE.md.",
101
+ `- YOUR orchestration thread id is ${opts.parentId} \u2014 pass parentThreadId="${opts.parentId}" on create_thread, or omit it.`,
106
102
  goal ? `- Goal / title: ${goal}` : null,
107
103
  accountDefaultsPlaybookLine(),
108
- `- For "what's going on": call list_threads (and list_workspaces if needed). Summarize fleet status \u2014 do not ls/git-status this synthetic home.`,
109
- "- Existing repo: create_thread on a repoPath \u2192 send_to_thread \u2192 wait_for_turn. If stillRunning, the child is working (progress is tools/thinking) \u2014 wait_for_turn again; do not ping it. If status is error, lastError/text is the failure \u2014 adapt (switch agent, tell the user). Commit/push/draft PR with ask_git on the child, then wait_for_turn \u2014 never git/gh from this cwd. Call ask_git merge only if the user explicitly asked to merge.",
110
- "- New repo: Bash (clone or gh repo create under ~/sideboard/repos/<name>) \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn (loop while stillRunning) \u2192 ask_git create-draft.",
111
- "- When naming threads for the user, link them as `[Title](sideboard://thread/<id>)`.",
112
- "- If they will wait on Slack, leave the Mac, or rely on overnight schedules, call set_caffeinate enabled=true (or they can enable Settings \u2192 Advanced \u2192 Caffeinate while schedules are enabled). When they say they are done / wrapping up / going to sleep, call set_caffeinate enabled=false. Closing this chat also turns it off."
104
+ "- Status: list_threads. Link chats as `[Title](sideboard://thread/<id>)`. Merge only if the user asked."
113
105
  ].filter(Boolean).join("\n");
114
106
  }
115
107
  function ensureGlobalCoordinatorCwd(opts) {
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  getGithubGitAuthMode,
11
11
  getGithubPat
12
- } from "./chunk-EX4NZN3O.js";
12
+ } from "./chunk-NE4TOOKS.js";
13
13
  import {
14
14
  worktreesRoot
15
15
  } from "./chunk-BD2ICC4D.js";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-2GO3YKBA.js";
8
8
  import {
9
9
  isOrchestratorThread
10
- } from "./chunk-SMWVSSE5.js";
10
+ } from "./chunk-756EO4GK.js";
11
11
  import {
12
12
  applyNodeLaunch,
13
13
  cursorRipgrepEnv,
@@ -19,23 +19,23 @@ import {
19
19
  packagedMcpStdioPath,
20
20
  parseCursorRunnerLine,
21
21
  resolveNodeLaunch
22
- } from "./chunk-HUKCGRAT.js";
22
+ } from "./chunk-WD2TARQS.js";
23
23
  import {
24
24
  codexUnattendedGitConfigArgs,
25
25
  mergeAgentGitAuthEnv,
26
26
  resolveAgentGitAuthEnv,
27
27
  resolveCodexGitWritableRoots
28
- } from "./chunk-PZVA2VDF.js";
28
+ } from "./chunk-EW7COXYE.js";
29
29
  import {
30
30
  claudeChromeEnabled,
31
31
  loadAppSettings,
32
32
  resolveAgentExecutable,
33
33
  resolveClaudeExecutable
34
- } from "./chunk-7ZTQHC2Q.js";
34
+ } from "./chunk-4LKD3PGO.js";
35
35
  import {
36
36
  isElectronLikeCommand,
37
37
  unwrapStrippedElectronLaunch
38
- } from "./chunk-TLPJHLLM.js";
38
+ } from "./chunk-4TR3HZFT.js";
39
39
  import {
40
40
  appDataDir
41
41
  } from "./chunk-QZQEXME2.js";
@@ -536,6 +536,13 @@ import { fileURLToPath } from "url";
536
536
 
537
537
  // src/mcp/profile.ts
538
538
  var SIDEBOARD_MCP_PROFILE_ENV = "SIDEBOARD_MCP_PROFILE";
539
+ var WORKTREE_MCP_TOOLS = [
540
+ "present_artifact",
541
+ "ask_user",
542
+ "present_plan",
543
+ "present_schema",
544
+ "present_files"
545
+ ];
539
546
  function sideboardMcpProfile(env = process.env) {
540
547
  return env[SIDEBOARD_MCP_PROFILE_ENV]?.trim().toLowerCase() === "worktree" ? "worktree" : "orchestration";
541
548
  }
@@ -550,14 +557,7 @@ var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
550
557
  "mcp__sideboard__present_schema",
551
558
  "mcp__sideboard__present_files",
552
559
  "mcp__sideboard__ask_user",
553
- "mcp__sideboard__present_plan",
554
- "mcp__sideboard__list_teams",
555
- "mcp__sideboard__slack_list_channels",
556
- "mcp__sideboard__slack_list_users",
557
- "mcp__sideboard__slack_search",
558
- "mcp__sideboard__slack_read",
559
- "mcp__sideboard__slack_post",
560
- "mcp__sideboard__slack_replies"
560
+ "mcp__sideboard__present_plan"
561
561
  ];
562
562
  var BRIGHTSY_MCP_ALLOWED_TOOLS = [
563
563
  "mcp__brightsy",
@@ -1019,7 +1019,7 @@ var claudeAdapter = {
1019
1019
  );
1020
1020
  }
1021
1021
  const mode = permissionMode(thread);
1022
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-V6TMECDU.js");
1022
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-NCTBE7G7.js");
1023
1023
  const isOrchestrator = isOrchestratorThread2(thread);
1024
1024
  const injectedServers = await buildInjectedMcpServers({
1025
1025
  includeSideboard: true,
@@ -2443,6 +2443,7 @@ export {
2443
2443
  mcpAllowTools,
2444
2444
  mcpAuthWarnings,
2445
2445
  SIDEBOARD_MCP_PROFILE_ENV,
2446
+ WORKTREE_MCP_TOOLS,
2446
2447
  sideboardMcpProfile,
2447
2448
  SIDEBOARD_MCP_ALLOWED_TOOLS,
2448
2449
  BRIGHTSY_MCP_ALLOWED_TOOLS,