@sideboard-ai/core 0.1.312 → 0.1.314

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 (40) hide show
  1. package/dist/{agents-XDI6QHBA.js → agents-KIC6CNXF.js} +4 -4
  2. package/dist/{agents-IOJRGGK3.js → agents-S7VBS5JL.js} +4 -4
  3. package/dist/{chunk-ZW7RSQHY.js → chunk-5QYCCXXQ.js} +2 -2
  4. package/dist/{chunk-VIVXKN5N.js → chunk-6EGQPMSR.js} +11 -11
  5. package/dist/{chunk-4FZUUH6W.js → chunk-7DBL5AF4.js} +119 -55
  6. package/dist/{chunk-QC2TQMPJ.js → chunk-7UP4D5XI.js} +2 -2
  7. package/dist/{chunk-2P2HYXA2.js → chunk-A45QMSVB.js} +119 -55
  8. package/dist/{chunk-PXMLMBMI.js → chunk-E63AM3PW.js} +29 -6
  9. package/dist/{chunk-VEVFHO6K.js → chunk-HH3VVTEC.js} +43 -11
  10. package/dist/{chunk-WRZRX4Q7.js → chunk-NMPQ7GIS.js} +3 -3
  11. package/dist/{chunk-33KDPEK4.js → chunk-RSA47QYR.js} +29 -6
  12. package/dist/{chunk-X3FSWWW2.js → chunk-S3KYDK6W.js} +4 -4
  13. package/dist/{chunk-62ESCTJ4.js → chunk-TO5UL7VN.js} +3 -3
  14. package/dist/{chunk-42JGPPVS.js → chunk-V5BTGQ6M.js} +38 -6
  15. package/dist/{chunk-LLTWP4PK.js → chunk-YK77HB3W.js} +10 -10
  16. package/dist/{chunk-RU6DTCCV.js → chunk-ZQLZ2A3I.js} +1 -1
  17. package/dist/{chunk-5QX2NYXL.js → chunk-ZSVKUOFH.js} +4 -4
  18. package/dist/{conductor-CTWR6NH4.js → conductor-G6TKCMIW.js} +2 -2
  19. package/dist/{conductor-YOBSYPLT.js → conductor-IIDQ2U24.js} +2 -2
  20. package/dist/{connected-teams-WLWIVYGD.js → connected-teams-IFW3NQ6G.js} +4 -2
  21. package/dist/{connected-teams-BBNYTR3I.js → connected-teams-IHK2WXUI.js} +4 -2
  22. package/dist/{coordinator-prompt-YAZRQ4BI.js → coordinator-prompt-5USNNCG6.js} +1 -1
  23. package/dist/{coordinator-prompt-GZCWQAAV.js → coordinator-prompt-EXJSULAR.js} +1 -1
  24. package/dist/{global-workspace-H6X32IJZ.js → global-workspace-UDRTONQE.js} +1 -1
  25. package/dist/{global-workspace-BZAVBOH3.js → global-workspace-ZGPIGJ6J.js} +1 -1
  26. package/dist/index.cjs +194 -67
  27. package/dist/index.d.cts +13 -8
  28. package/dist/index.d.ts +13 -8
  29. package/dist/index.js +11 -11
  30. package/dist/mcp/run-stdio.cjs +193 -67
  31. package/dist/mcp/run-stdio.js +7 -7
  32. package/dist/{oauth-WCUZ6Z5G.js → oauth-CI3U5ZAA.js} +1 -1
  33. package/dist/{oauth-DP4ZV2M2.js → oauth-CR5FY4CJ.js} +1 -1
  34. package/dist/{optional-cli-QDIT57VD.js → optional-cli-MLZSE6KW.js} +1 -1
  35. package/dist/{optional-cli-QY6V5S5N.js → optional-cli-SI4BCPRH.js} +2 -2
  36. package/dist/{orchestrator-S44BMNN7.js → orchestrator-AM7VT2BD.js} +7 -7
  37. package/dist/{orchestrator-BYTSILLH.js → orchestrator-V6NLIPLH.js} +7 -7
  38. package/dist/{workspaces-BQUDYTBX.js → workspaces-3TTODHKN.js} +1 -1
  39. package/dist/{workspaces-AGOLRBYZ.js → workspaces-TATO466L.js} +1 -1
  40. package/package.json +1 -1
@@ -46,7 +46,7 @@ import {
46
46
  resolveCursorSdkRoot,
47
47
  resolveQuotaFallbackAgent,
48
48
  turnCostUsdFromCursorUsage
49
- } from "./chunk-2P2HYXA2.js";
49
+ } from "./chunk-A45QMSVB.js";
50
50
  import {
51
51
  getAgentSetupInfo,
52
52
  installAgent,
@@ -59,11 +59,11 @@ import {
59
59
  resolveLoginCommand,
60
60
  whichOnPath
61
61
  } from "./chunk-EGTCXNQM.js";
62
- import "./chunk-42JGPPVS.js";
63
- import "./chunk-PXMLMBMI.js";
62
+ import "./chunk-V5BTGQ6M.js";
63
+ import "./chunk-E63AM3PW.js";
64
64
  import "./chunk-2GPQZZLY.js";
65
65
  import "./chunk-I5TESHDN.js";
66
- import "./chunk-X3FSWWW2.js";
66
+ import "./chunk-S3KYDK6W.js";
67
67
  import "./chunk-DLGGLV2M.js";
68
68
  import "./chunk-N2WW62LF.js";
69
69
  import "./chunk-DD67JWTN.js";
@@ -37,8 +37,8 @@ import {
37
37
  planModeTurnInstruction,
38
38
  resolveCursorModelId,
39
39
  resolveQuotaFallbackAgent
40
- } from "./chunk-4FZUUH6W.js";
41
- import "./chunk-VEVFHO6K.js";
40
+ } from "./chunk-7DBL5AF4.js";
41
+ import "./chunk-HH3VVTEC.js";
42
42
  import "./chunk-7Q327QF2.js";
43
43
  import {
44
44
  getAgentSetupInfo,
@@ -52,11 +52,11 @@ import {
52
52
  resolveLoginCommand,
53
53
  whichOnPath
54
54
  } from "./chunk-U4WACWBC.js";
55
- import "./chunk-5QX2NYXL.js";
55
+ import "./chunk-ZSVKUOFH.js";
56
56
  import "./chunk-BIPXOHZI.js";
57
57
  import "./chunk-HG25AYBV.js";
58
58
  import "./chunk-2P4XKWV2.js";
59
- import "./chunk-33KDPEK4.js";
59
+ import "./chunk-RSA47QYR.js";
60
60
  import "./chunk-JAT3JFOS.js";
61
61
  import "./chunk-F2PVRF3B.js";
62
62
  import {
@@ -11,7 +11,7 @@ import {
11
11
  isGlobalThread,
12
12
  isOrchestratorThread,
13
13
  isSlackCoordinatorThread
14
- } from "./chunk-X3FSWWW2.js";
14
+ } from "./chunk-S3KYDK6W.js";
15
15
  import {
16
16
  mergeAgentGitAuthEnv,
17
17
  resolveAgentGitAuthEnv
@@ -1702,7 +1702,7 @@ var PORT_RANGE_SIZE = 10;
1702
1702
  var RECLAIM_RETRY_DELAY_MS = 40;
1703
1703
  var RECLAIM_TRIES = 8;
1704
1704
  async function killReclaimable(ports, worktreePath, signal) {
1705
- const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-CTWR6NH4.js");
1705
+ const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-G6TKCMIW.js");
1706
1706
  if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
1707
1707
  else killListenersOnPorts2(ports);
1708
1708
  }
@@ -14,7 +14,7 @@ import {
14
14
  parseSessionQuotaResetAt,
15
15
  planModeTurnInstruction,
16
16
  resolveQuotaFallbackAgent
17
- } from "./chunk-4FZUUH6W.js";
17
+ } from "./chunk-7DBL5AF4.js";
18
18
  import {
19
19
  REVIEW_TAB_TITLE,
20
20
  applyWorktreePkgCacheEnv,
@@ -56,7 +56,7 @@ import {
56
56
  worktreeDevProcessKey,
57
57
  worktreeRunProcessKey,
58
58
  worktreeSetupProcessKey
59
- } from "./chunk-QC2TQMPJ.js";
59
+ } from "./chunk-7UP4D5XI.js";
60
60
  import {
61
61
  applyAgentEvent,
62
62
  clipAgentEventForPaint,
@@ -78,7 +78,7 @@ import {
78
78
  import {
79
79
  formatOptionalServicesDirectiveForTurn,
80
80
  formatOptionalServicesReminderForTurn
81
- } from "./chunk-WRZRX4Q7.js";
81
+ } from "./chunk-NMPQ7GIS.js";
82
82
  import {
83
83
  SLACK_REPLY_FORMATTING,
84
84
  addWorkspace,
@@ -103,7 +103,7 @@ import {
103
103
  stageAbsolutePathsAsAttachments,
104
104
  stageBuffersAsAttachments,
105
105
  syncWorkspacesFromThreads
106
- } from "./chunk-5QX2NYXL.js";
106
+ } from "./chunk-ZSVKUOFH.js";
107
107
  import {
108
108
  addPrStackLayer,
109
109
  allocateTeamSlug,
@@ -460,9 +460,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
460
460
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
461
461
  );
462
462
  }
463
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-BZAVBOH3.js");
463
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-ZGPIGJ6J.js");
464
464
  if (isGlobalThread2(thread)) {
465
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-YAZRQ4BI.js");
465
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-5USNNCG6.js");
466
466
  ensureGlobalCoordinatorCwd2(
467
467
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
468
468
  );
@@ -3080,7 +3080,7 @@ async function createThread(input, _onSetupLine) {
3080
3080
  return readThread(thread.id) ?? thread;
3081
3081
  }
3082
3082
  async function listLinearIssues(agent, repoPath) {
3083
- const { getAdapter: getAdapter2 } = await import("./agents-IOJRGGK3.js");
3083
+ const { getAdapter: getAdapter2 } = await import("./agents-S7VBS5JL.js");
3084
3084
  await requireAgent(agent, { requireLinear: true });
3085
3085
  const adapter = getAdapter2(agent);
3086
3086
  if (!adapter.listLinearIssues) {
@@ -3857,7 +3857,7 @@ async function adoptThread(input) {
3857
3857
  messages: input.messages ?? []
3858
3858
  });
3859
3859
  writeThread(thread);
3860
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-BQUDYTBX.js");
3860
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-3TTODHKN.js");
3861
3861
  await addWorkspace2(repoPath);
3862
3862
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-RXZPTCNH.js");
3863
3863
  await ensureWorktreeSideboardIgnored(input.worktreePath);
@@ -5958,7 +5958,7 @@ function formatIssueToolsDirective(opts) {
5958
5958
  if (!opts.linear && !opts.abletime && !github) return null;
5959
5959
  const lines = [
5960
5960
  "Issue tracking (Settings \u2192 Issues / Git \u2014 already signed in):",
5961
- "- Use Sideboard `linear_*` / `github_*` / `abletime_*` tools. Do not call Claude Linear MCP, vendor GitHub MCP, or any other vendor issue MCP \u2014 those need a separate login and hang. If a vendor namespace shows needsAuth, ignore it and keep going with Sideboard tools."
5961
+ "- Use Sideboard `linear_*` / `github_*` / `abletime_*` when that Account connection is set and the call works. If it is not set, or the Sideboard call fails because the connection is down, use the Claude connector for that service. Do not mention a Claude connector that failed to start (for example `mcp_github_github` or `plugin:github:github`) when the Sideboard connection is working. A vendor issue MCP that only needsAuth is noise \u2014 do not sign in to it while Sideboard covers that service."
5962
5962
  ];
5963
5963
  if (opts.linear) {
5964
5964
  lines.push(
@@ -6007,7 +6007,7 @@ function formatIssueToolsReminder(opts) {
6007
6007
  ].filter(Boolean);
6008
6008
  const ticket = opts.ticketId?.trim();
6009
6009
  const ticketBit = ticket ? ` This ticket: ${ticket}${opts.ticketProvider ? ` (${opts.ticketProvider})` : ""} \u2014 get; comment/update review findings only after they ask. Spin-offs use parent=.` : " get/comment/update/create (parent= for spin-offs).";
6010
- return `Issues: Sideboard ${names.join(" / ")} (Account). Ignore vendor issue MCP auth.${ticketBit} Review stays in chat \u2014 do not ask_user after it; they type next steps. Authors see comments immediately.`;
6010
+ return `Issues: Sideboard ${names.join(" / ")} when that Account connection works. If it is not set or the call fails, use the Claude connector. Do not mention a Claude connector startup failure when Sideboard covers it.${ticketBit} Review stays in chat \u2014 do not ask_user after it; they type next steps. Authors see comments immediately.`;
6011
6011
  }
6012
6012
  function formatLinearReminder(opts) {
6013
6013
  return formatIssueToolsReminder({
@@ -6795,7 +6795,7 @@ function formatScheduledPrompt(name, prompt) {
6795
6795
  ${prompt}`;
6796
6796
  }
6797
6797
  async function defaultDeps() {
6798
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-BYTSILLH.js");
6798
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-V6NLIPLH.js");
6799
6799
  const orch = getOrchestrator2();
6800
6800
  return {
6801
6801
  findThread: (id) => findThreadByRef(id),
@@ -3,7 +3,7 @@ import {
3
3
  brightsyMcpServerName,
4
4
  ensureCliTeamTracked,
5
5
  ensureConnectedBrightsyTeamTokens
6
- } from "./chunk-VEVFHO6K.js";
6
+ } from "./chunk-HH3VVTEC.js";
7
7
  import {
8
8
  looksLikeConversationSummary,
9
9
  looksLikeSkillBody,
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-7Q327QF2.js";
13
13
  import {
14
14
  isOrchestratorThread
15
- } from "./chunk-5QX2NYXL.js";
15
+ } from "./chunk-ZSVKUOFH.js";
16
16
  import {
17
17
  codexUnattendedGitConfigArgs,
18
18
  mergeAgentGitAuthEnv,
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-BIPXOHZI.js";
22
22
  import {
23
23
  loadBrightsyConfig
24
- } from "./chunk-33KDPEK4.js";
24
+ } from "./chunk-RSA47QYR.js";
25
25
  import {
26
26
  httpFetch
27
27
  } from "./chunk-JAT3JFOS.js";
@@ -53,6 +53,7 @@ import {
53
53
  looksLikeBrightsyEmptyCompletion
54
54
  } from "./chunk-5XNT6BCG.js";
55
55
  import {
56
+ githubAgentAuthReady,
56
57
  run
57
58
  } from "./chunk-QVN2WOKJ.js";
58
59
  import {
@@ -514,6 +515,119 @@ var brightsyAdapter = {
514
515
  // src/agents/claude.ts
515
516
  import { existsSync as existsSync7 } from "fs";
516
517
 
518
+ // src/agents/claude-mcp-status.ts
519
+ var SIDEBOARD_CONNECTOR_SERVICES = [
520
+ "github",
521
+ "linear",
522
+ "posthog",
523
+ "vercel",
524
+ "supabase",
525
+ "sentry"
526
+ ];
527
+ function mcpStatusThinkingFromClaudeInit(obj) {
528
+ const raw = obj.mcp_servers ?? obj.mcpServers;
529
+ const servers = [];
530
+ if (Array.isArray(raw)) {
531
+ for (const item of raw) {
532
+ if (!item || typeof item !== "object" || Array.isArray(item)) continue;
533
+ const rec = item;
534
+ const name = typeof rec.name === "string" && rec.name.trim() || typeof rec.server === "string" && rec.server.trim() || "";
535
+ const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "";
536
+ if (name) servers.push({ name, status: status || "unknown" });
537
+ }
538
+ } else if (raw && typeof raw === "object") {
539
+ for (const [name, value] of Object.entries(raw)) {
540
+ if (!name.trim()) continue;
541
+ if (typeof value === "string" && value.trim()) {
542
+ servers.push({ name, status: value.trim() });
543
+ continue;
544
+ }
545
+ if (value && typeof value === "object" && !Array.isArray(value)) {
546
+ const rec = value;
547
+ const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "unknown";
548
+ servers.push({ name, status });
549
+ }
550
+ }
551
+ }
552
+ const coverage = claudeConnectorCoverage();
553
+ const sideboardOk = sideboardMcpOk(servers);
554
+ const notable = servers.filter(
555
+ (server) => isNotableMcpInitStatus(server, sideboardOk, coverage)
556
+ );
557
+ if (notable.length === 0) return null;
558
+ return `MCP: ${notable.map((s) => `${s.name} ${s.status}`).join(", ")}`;
559
+ }
560
+ function isCleanMcpConnect(status) {
561
+ return /^(connected|ok|ready|success)$/i.test(status.trim());
562
+ }
563
+ function isMcpAuthStatus(status) {
564
+ return /needs[_-]?auth|needs authentication|unauthorized|not authenticated|authrequired/i.test(
565
+ status
566
+ );
567
+ }
568
+ function isSideboardMcpName(name) {
569
+ return /^sideboard$/i.test(name.trim()) || /^mcp__sideboard$/i.test(name.trim());
570
+ }
571
+ function isVendorClaudeAiMcpName(name) {
572
+ return /^claude\.ai\b/i.test(name.trim()) || /^mcp__claude_ai_/i.test(name.trim());
573
+ }
574
+ function sideboardMcpOk(servers) {
575
+ const row = servers.find((server) => isSideboardMcpName(server.name));
576
+ return Boolean(row && isCleanMcpConnect(row.status));
577
+ }
578
+ function sideboardServiceForClaudeConnector(name) {
579
+ const raw = name.trim();
580
+ if (!raw || isSideboardMcpName(raw)) return null;
581
+ const pluginLike = /^(?:plugin[:_]|mcp__plugin_|claude\.ai\s|(?:mcp__)?claude_ai_)/i.test(raw);
582
+ const doubled = raw.match(/^mcp_([a-z0-9]+)_([a-z0-9]+)$/i);
583
+ if (!pluginLike && !(doubled && doubled[1].toLowerCase() === doubled[2].toLowerCase())) {
584
+ return null;
585
+ }
586
+ let body = raw;
587
+ if (/^claude\.ai\s+/i.test(body)) body = body.replace(/^claude\.ai\s+/i, "");
588
+ else if (/^(?:mcp__)?claude_ai_/i.test(body)) body = body.replace(/^(?:mcp__)?claude_ai_/i, "");
589
+ else if (/^mcp__plugin_/i.test(body)) body = body.slice("mcp__plugin_".length);
590
+ else if (/^plugin_/i.test(body)) body = body.slice("plugin_".length);
591
+ else if (/^plugin:/i.test(body)) body = body.slice("plugin:".length);
592
+ else if (/^mcp_/i.test(body)) body = body.slice("mcp_".length);
593
+ const head = body.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)[0];
594
+ if (!head || !SIDEBOARD_CONNECTOR_SERVICES.includes(head)) return null;
595
+ return head;
596
+ }
597
+ function claudeConnectorCoverage() {
598
+ let github = false;
599
+ try {
600
+ github = githubAgentAuthReady();
601
+ } catch {
602
+ github = false;
603
+ }
604
+ let linear = false;
605
+ let posthog = false;
606
+ let vercel = false;
607
+ let supabase = false;
608
+ let sentry = false;
609
+ try {
610
+ linear = isLinearConnected();
611
+ posthog = isPosthogConnected();
612
+ const integrations = loadAppSettings().integrations ?? {};
613
+ if (integrations.githubPat?.trim()) github = true;
614
+ vercel = Boolean(integrations.vercelToken?.trim());
615
+ supabase = Boolean(integrations.supabaseAccessToken?.trim());
616
+ sentry = Boolean(integrations.sentryAuthToken?.trim());
617
+ } catch {
618
+ }
619
+ return { github, linear, posthog, vercel, supabase, sentry };
620
+ }
621
+ function isNotableMcpInitStatus(server, sideboardOk, coverage) {
622
+ if (isCleanMcpConnect(server.status)) return false;
623
+ if (isSideboardMcpName(server.name)) return true;
624
+ if (isMcpAuthStatus(server.status)) return false;
625
+ const service = sideboardServiceForClaudeConnector(server.name);
626
+ if (service) return !(sideboardOk && coverage[service]);
627
+ if (isVendorClaudeAiMcpName(server.name)) return false;
628
+ return true;
629
+ }
630
+
517
631
  // src/mcp-ui/host.ts
518
632
  import { createHash } from "crypto";
519
633
  import { homedir as homedir4 } from "os";
@@ -2326,56 +2440,6 @@ function claudeString(obj, key) {
2326
2440
  const v = obj[key];
2327
2441
  return typeof v === "string" && v.trim() ? v.trim() : void 0;
2328
2442
  }
2329
- function mcpStatusThinkingFromClaudeInit(obj) {
2330
- const raw = obj.mcp_servers ?? obj.mcpServers;
2331
- const servers = [];
2332
- if (Array.isArray(raw)) {
2333
- for (const item of raw) {
2334
- if (!item || typeof item !== "object" || Array.isArray(item)) continue;
2335
- const rec = item;
2336
- const name = typeof rec.name === "string" && rec.name.trim() || typeof rec.server === "string" && rec.server.trim() || "";
2337
- const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "";
2338
- if (name) servers.push({ name, status: status || "unknown" });
2339
- }
2340
- } else if (raw && typeof raw === "object") {
2341
- for (const [name, value] of Object.entries(raw)) {
2342
- if (!name.trim()) continue;
2343
- if (typeof value === "string" && value.trim()) {
2344
- servers.push({ name, status: value.trim() });
2345
- continue;
2346
- }
2347
- if (value && typeof value === "object" && !Array.isArray(value)) {
2348
- const rec = value;
2349
- const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "unknown";
2350
- servers.push({ name, status });
2351
- }
2352
- }
2353
- }
2354
- const notable = servers.filter(isNotableMcpInitStatus);
2355
- if (notable.length === 0) return null;
2356
- return `MCP: ${notable.map((s) => `${s.name} ${s.status}`).join(", ")}`;
2357
- }
2358
- function isCleanMcpConnect(status) {
2359
- return /^(connected|ok|ready|success)$/i.test(status.trim());
2360
- }
2361
- function isMcpAuthStatus(status) {
2362
- return /needs[_-]?auth|needs authentication|unauthorized|not authenticated|authrequired/i.test(
2363
- status
2364
- );
2365
- }
2366
- function isSideboardMcpName(name) {
2367
- return /^sideboard$/i.test(name.trim()) || /^mcp__sideboard$/i.test(name.trim());
2368
- }
2369
- function isVendorClaudeAiMcpName(name) {
2370
- return /^claude\.ai\b/i.test(name.trim()) || /^mcp__claude_ai_/i.test(name.trim());
2371
- }
2372
- function isNotableMcpInitStatus(server) {
2373
- if (isCleanMcpConnect(server.status)) return false;
2374
- if (isSideboardMcpName(server.name)) return true;
2375
- if (isVendorClaudeAiMcpName(server.name)) return false;
2376
- if (isMcpAuthStatus(server.status)) return false;
2377
- return true;
2378
- }
2379
2443
  function eventsFromClaudeSystem(obj) {
2380
2444
  const subtype = claudeString(obj, "subtype") ?? "";
2381
2445
  const parentId = claudeParentToolUseId(obj);
@@ -2545,7 +2609,7 @@ var claudeAdapter = {
2545
2609
  );
2546
2610
  }
2547
2611
  const mode = permissionMode(thread);
2548
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-BZAVBOH3.js");
2612
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-ZGPIGJ6J.js");
2549
2613
  const isOrchestrator = isOrchestratorThread2(thread);
2550
2614
  const rpc = worktreeAgentRpc(isOrchestrator);
2551
2615
  const injectedServers = await buildInjectedMcpServers({
@@ -4472,6 +4536,7 @@ export {
4472
4536
  adjustBrightsyTurnExit,
4473
4537
  listBrightsyChatTargets,
4474
4538
  brightsyAdapter,
4539
+ mcpStatusThinkingFromClaudeInit,
4475
4540
  mcpUiContentSecurityPolicy,
4476
4541
  SIDEBOARD_MCP_PROFILE_ENV,
4477
4542
  SIDEBOARD_THREAD_ID_ENV,
@@ -4502,7 +4567,6 @@ export {
4502
4567
  PLAN_MODE_OFF_INSTRUCTION,
4503
4568
  planModeTurnInstruction,
4504
4569
  permissionMode,
4505
- mcpStatusThinkingFromClaudeInit,
4506
4570
  claudeAdapter,
4507
4571
  listCodexModels,
4508
4572
  codexAdapter,
@@ -8,7 +8,7 @@ import {
8
8
  isGlobalThread,
9
9
  isOrchestratorThread,
10
10
  isSlackCoordinatorThread
11
- } from "./chunk-5QX2NYXL.js";
11
+ } from "./chunk-ZSVKUOFH.js";
12
12
  import {
13
13
  mergeAgentGitAuthEnv,
14
14
  resolveAgentGitAuthEnv
@@ -1832,7 +1832,7 @@ var PORT_RANGE_SIZE = 10;
1832
1832
  var RECLAIM_RETRY_DELAY_MS = 40;
1833
1833
  var RECLAIM_TRIES = 8;
1834
1834
  async function killReclaimable(ports, worktreePath, signal) {
1835
- const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-YOBSYPLT.js");
1835
+ const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-IIDQ2U24.js");
1836
1836
  if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
1837
1837
  else killListenersOnPorts2(ports);
1838
1838
  }
@@ -5,10 +5,10 @@ import {
5
5
  brightsyMcpServerName,
6
6
  ensureCliTeamTracked,
7
7
  ensureConnectedBrightsyTeamTokens
8
- } from "./chunk-42JGPPVS.js";
8
+ } from "./chunk-V5BTGQ6M.js";
9
9
  import {
10
10
  loadBrightsyConfig
11
- } from "./chunk-PXMLMBMI.js";
11
+ } from "./chunk-E63AM3PW.js";
12
12
  import {
13
13
  httpFetch
14
14
  } from "./chunk-2GPQZZLY.js";
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-I5TESHDN.js";
25
25
  import {
26
26
  isOrchestratorThread
27
- } from "./chunk-X3FSWWW2.js";
27
+ } from "./chunk-S3KYDK6W.js";
28
28
  import {
29
29
  codexUnattendedGitConfigArgs,
30
30
  mergeAgentGitAuthEnv,
@@ -32,6 +32,7 @@ import {
32
32
  resolveCodexGitWritableRoots
33
33
  } from "./chunk-DLGGLV2M.js";
34
34
  import {
35
+ githubAgentAuthReady,
35
36
  npmGlobalNodeModules,
36
37
  run
37
38
  } from "./chunk-2UG25RMK.js";
@@ -448,6 +449,119 @@ var brightsyAdapter = {
448
449
  // src/agents/claude.ts
449
450
  import { existsSync as existsSync11 } from "fs";
450
451
 
452
+ // src/agents/claude-mcp-status.ts
453
+ var SIDEBOARD_CONNECTOR_SERVICES = [
454
+ "github",
455
+ "linear",
456
+ "posthog",
457
+ "vercel",
458
+ "supabase",
459
+ "sentry"
460
+ ];
461
+ function mcpStatusThinkingFromClaudeInit(obj) {
462
+ const raw = obj.mcp_servers ?? obj.mcpServers;
463
+ const servers = [];
464
+ if (Array.isArray(raw)) {
465
+ for (const item of raw) {
466
+ if (!item || typeof item !== "object" || Array.isArray(item)) continue;
467
+ const rec = item;
468
+ const name = typeof rec.name === "string" && rec.name.trim() || typeof rec.server === "string" && rec.server.trim() || "";
469
+ const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "";
470
+ if (name) servers.push({ name, status: status || "unknown" });
471
+ }
472
+ } else if (raw && typeof raw === "object") {
473
+ for (const [name, value] of Object.entries(raw)) {
474
+ if (!name.trim()) continue;
475
+ if (typeof value === "string" && value.trim()) {
476
+ servers.push({ name, status: value.trim() });
477
+ continue;
478
+ }
479
+ if (value && typeof value === "object" && !Array.isArray(value)) {
480
+ const rec = value;
481
+ const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "unknown";
482
+ servers.push({ name, status });
483
+ }
484
+ }
485
+ }
486
+ const coverage = claudeConnectorCoverage();
487
+ const sideboardOk = sideboardMcpOk(servers);
488
+ const notable = servers.filter(
489
+ (server) => isNotableMcpInitStatus(server, sideboardOk, coverage)
490
+ );
491
+ if (notable.length === 0) return null;
492
+ return `MCP: ${notable.map((s) => `${s.name} ${s.status}`).join(", ")}`;
493
+ }
494
+ function isCleanMcpConnect(status) {
495
+ return /^(connected|ok|ready|success)$/i.test(status.trim());
496
+ }
497
+ function isMcpAuthStatus(status) {
498
+ return /needs[_-]?auth|needs authentication|unauthorized|not authenticated|authrequired/i.test(
499
+ status
500
+ );
501
+ }
502
+ function isSideboardMcpName(name) {
503
+ return /^sideboard$/i.test(name.trim()) || /^mcp__sideboard$/i.test(name.trim());
504
+ }
505
+ function isVendorClaudeAiMcpName(name) {
506
+ return /^claude\.ai\b/i.test(name.trim()) || /^mcp__claude_ai_/i.test(name.trim());
507
+ }
508
+ function sideboardMcpOk(servers) {
509
+ const row = servers.find((server) => isSideboardMcpName(server.name));
510
+ return Boolean(row && isCleanMcpConnect(row.status));
511
+ }
512
+ function sideboardServiceForClaudeConnector(name) {
513
+ const raw = name.trim();
514
+ if (!raw || isSideboardMcpName(raw)) return null;
515
+ const pluginLike = /^(?:plugin[:_]|mcp__plugin_|claude\.ai\s|(?:mcp__)?claude_ai_)/i.test(raw);
516
+ const doubled = raw.match(/^mcp_([a-z0-9]+)_([a-z0-9]+)$/i);
517
+ if (!pluginLike && !(doubled && doubled[1].toLowerCase() === doubled[2].toLowerCase())) {
518
+ return null;
519
+ }
520
+ let body = raw;
521
+ if (/^claude\.ai\s+/i.test(body)) body = body.replace(/^claude\.ai\s+/i, "");
522
+ else if (/^(?:mcp__)?claude_ai_/i.test(body)) body = body.replace(/^(?:mcp__)?claude_ai_/i, "");
523
+ else if (/^mcp__plugin_/i.test(body)) body = body.slice("mcp__plugin_".length);
524
+ else if (/^plugin_/i.test(body)) body = body.slice("plugin_".length);
525
+ else if (/^plugin:/i.test(body)) body = body.slice("plugin:".length);
526
+ else if (/^mcp_/i.test(body)) body = body.slice("mcp_".length);
527
+ const head = body.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)[0];
528
+ if (!head || !SIDEBOARD_CONNECTOR_SERVICES.includes(head)) return null;
529
+ return head;
530
+ }
531
+ function claudeConnectorCoverage() {
532
+ let github = false;
533
+ try {
534
+ github = githubAgentAuthReady();
535
+ } catch {
536
+ github = false;
537
+ }
538
+ let linear = false;
539
+ let posthog = false;
540
+ let vercel = false;
541
+ let supabase = false;
542
+ let sentry = false;
543
+ try {
544
+ linear = isLinearConnected();
545
+ posthog = isPosthogConnected();
546
+ const integrations = loadAppSettings().integrations ?? {};
547
+ if (integrations.githubPat?.trim()) github = true;
548
+ vercel = Boolean(integrations.vercelToken?.trim());
549
+ supabase = Boolean(integrations.supabaseAccessToken?.trim());
550
+ sentry = Boolean(integrations.sentryAuthToken?.trim());
551
+ } catch {
552
+ }
553
+ return { github, linear, posthog, vercel, supabase, sentry };
554
+ }
555
+ function isNotableMcpInitStatus(server, sideboardOk, coverage) {
556
+ if (isCleanMcpConnect(server.status)) return false;
557
+ if (isSideboardMcpName(server.name)) return true;
558
+ if (isMcpAuthStatus(server.status)) return false;
559
+ const service = sideboardServiceForClaudeConnector(server.name);
560
+ if (service) return !(sideboardOk && coverage[service]);
561
+ if (isVendorClaudeAiMcpName(server.name)) return false;
562
+ return true;
563
+ }
564
+
451
565
  // src/mcp-ui/host.ts
452
566
  import { createHash } from "crypto";
453
567
  import { homedir as homedir5 } from "os";
@@ -2633,56 +2747,6 @@ function claudeString(obj, key) {
2633
2747
  const v = obj[key];
2634
2748
  return typeof v === "string" && v.trim() ? v.trim() : void 0;
2635
2749
  }
2636
- function mcpStatusThinkingFromClaudeInit(obj) {
2637
- const raw = obj.mcp_servers ?? obj.mcpServers;
2638
- const servers = [];
2639
- if (Array.isArray(raw)) {
2640
- for (const item of raw) {
2641
- if (!item || typeof item !== "object" || Array.isArray(item)) continue;
2642
- const rec = item;
2643
- const name = typeof rec.name === "string" && rec.name.trim() || typeof rec.server === "string" && rec.server.trim() || "";
2644
- const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "";
2645
- if (name) servers.push({ name, status: status || "unknown" });
2646
- }
2647
- } else if (raw && typeof raw === "object") {
2648
- for (const [name, value] of Object.entries(raw)) {
2649
- if (!name.trim()) continue;
2650
- if (typeof value === "string" && value.trim()) {
2651
- servers.push({ name, status: value.trim() });
2652
- continue;
2653
- }
2654
- if (value && typeof value === "object" && !Array.isArray(value)) {
2655
- const rec = value;
2656
- const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "unknown";
2657
- servers.push({ name, status });
2658
- }
2659
- }
2660
- }
2661
- const notable = servers.filter(isNotableMcpInitStatus);
2662
- if (notable.length === 0) return null;
2663
- return `MCP: ${notable.map((s) => `${s.name} ${s.status}`).join(", ")}`;
2664
- }
2665
- function isCleanMcpConnect(status) {
2666
- return /^(connected|ok|ready|success)$/i.test(status.trim());
2667
- }
2668
- function isMcpAuthStatus(status) {
2669
- return /needs[_-]?auth|needs authentication|unauthorized|not authenticated|authrequired/i.test(
2670
- status
2671
- );
2672
- }
2673
- function isSideboardMcpName(name) {
2674
- return /^sideboard$/i.test(name.trim()) || /^mcp__sideboard$/i.test(name.trim());
2675
- }
2676
- function isVendorClaudeAiMcpName(name) {
2677
- return /^claude\.ai\b/i.test(name.trim()) || /^mcp__claude_ai_/i.test(name.trim());
2678
- }
2679
- function isNotableMcpInitStatus(server) {
2680
- if (isCleanMcpConnect(server.status)) return false;
2681
- if (isSideboardMcpName(server.name)) return true;
2682
- if (isVendorClaudeAiMcpName(server.name)) return false;
2683
- if (isMcpAuthStatus(server.status)) return false;
2684
- return true;
2685
- }
2686
2750
  function eventsFromClaudeSystem(obj) {
2687
2751
  const subtype = claudeString(obj, "subtype") ?? "";
2688
2752
  const parentId = claudeParentToolUseId(obj);
@@ -2852,7 +2916,7 @@ var claudeAdapter = {
2852
2916
  );
2853
2917
  }
2854
2918
  const mode = permissionMode(thread);
2855
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-H6X32IJZ.js");
2919
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-UDRTONQE.js");
2856
2920
  const isOrchestrator = isOrchestratorThread2(thread);
2857
2921
  const rpc = worktreeAgentRpc(isOrchestrator);
2858
2922
  const injectedServers = await buildInjectedMcpServers({
@@ -5154,6 +5218,7 @@ export {
5154
5218
  adjustBrightsyTurnExit,
5155
5219
  listBrightsyChatTargets,
5156
5220
  brightsyAdapter,
5221
+ mcpStatusThinkingFromClaudeInit,
5157
5222
  SIDEBOARD_THREAD_ID_ENV,
5158
5223
  shouldRegisterMcpWaitForTurn,
5159
5224
  worktreeMcpToolNames,
@@ -5164,7 +5229,6 @@ export {
5164
5229
  PLAN_MODE_OFF_INSTRUCTION,
5165
5230
  planModeTurnInstruction,
5166
5231
  permissionMode,
5167
- mcpStatusThinkingFromClaudeInit,
5168
5232
  claudeAdapter,
5169
5233
  listCodexModels,
5170
5234
  codexAdapter,