@sideboard-ai/core 0.1.62 → 0.1.67

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 (43) hide show
  1. package/dist/{agents-KF3J3C53.js → agents-OTBZVTZO.js} +27 -7
  2. package/dist/{agents-QLSFIQAO.js → agents-TS3EI2YI.js} +27 -7
  3. package/dist/{app-settings-LTSFG7QJ.js → app-settings-GJVZGU3M.js} +13 -3
  4. package/dist/{app-settings-HK4KAM4R.js → app-settings-ONKMFSEJ.js} +13 -3
  5. package/dist/{chunk-UGXSSBFJ.js → chunk-4BUCGNZS.js} +1 -1
  6. package/dist/chunk-4UIYN56C.js +173 -0
  7. package/dist/{chunk-NVU7EC2E.js → chunk-57WWNMFP.js} +2 -2
  8. package/dist/{chunk-A6FOKNOU.js → chunk-5HTTCYWA.js} +2 -2
  9. package/dist/{chunk-DXTGDXO2.js → chunk-7ZOQY4A7.js} +31 -6
  10. package/dist/{chunk-ZF5YJCXO.js → chunk-B4PRRKMA.js} +284 -93
  11. package/dist/{chunk-DDN3UF4R.js → chunk-BPOTVI5J.js} +115 -3
  12. package/dist/{chunk-MBAL5FE6.js → chunk-DB3I75FI.js} +4 -4
  13. package/dist/chunk-FGDJOJ2L.js +176 -0
  14. package/dist/{chunk-2FEA4LDA.js → chunk-JWZNK3CQ.js} +31 -6
  15. package/dist/{chunk-2MCNURQV.js → chunk-K7LM4CLD.js} +279 -93
  16. package/dist/{chunk-3KKNTHUC.js → chunk-LW5CMQGZ.js} +1 -1
  17. package/dist/{chunk-JB2H7E7V.js → chunk-M5V4QIWF.js} +1 -1
  18. package/dist/{chunk-6CUJQKTJ.js → chunk-MHR4OGZ4.js} +115 -3
  19. package/dist/{chunk-46KMKHSD.js → chunk-WAFIF22N.js} +2 -2
  20. package/dist/{chunk-27MAWNKY.js → chunk-ZRFAZVGL.js} +2 -2
  21. package/dist/{connected-teams-MKIYKOYA.js → connected-teams-OMDHTL6A.js} +2 -2
  22. package/dist/{connected-teams-RSL4VB3X.js → connected-teams-RUNMOCG5.js} +2 -2
  23. package/dist/{coordinator-prompt-N2R6FGZK.js → coordinator-prompt-3BSMKZL4.js} +4 -4
  24. package/dist/{coordinator-prompt-LKG3SHMI.js → coordinator-prompt-6HMTOX4G.js} +4 -4
  25. package/dist/{global-workspace-LALWQWRJ.js → global-workspace-QS7A23CB.js} +5 -6
  26. package/dist/{global-workspace-YOAUQCMA.js → global-workspace-YZ2NJVLL.js} +5 -6
  27. package/dist/index.cjs +1345 -933
  28. package/dist/index.d.cts +96 -1
  29. package/dist/index.d.ts +96 -1
  30. package/dist/index.js +750 -715
  31. package/dist/mcp/run-stdio.cjs +1293 -977
  32. package/dist/mcp/run-stdio.js +691 -748
  33. package/dist/{run-GPSVV5OH.js → run-JLD2Y52J.js} +1 -1
  34. package/dist/{run-HZTBWGQR.js → run-Y2MI3EVV.js} +1 -1
  35. package/dist/{workspaces-E75POJXP.js → workspaces-AIUYUXB7.js} +6 -7
  36. package/dist/{workspaces-VCAIHVIE.js → workspaces-EBFW7I7S.js} +6 -7
  37. package/dist/{worktree-MV4WRW6G.js → worktree-7NBPIVFZ.js} +2 -2
  38. package/dist/{worktree-LZEGVQSN.js → worktree-WMDJW2BL.js} +2 -2
  39. package/package.json +1 -1
  40. package/dist/chunk-73AT5K4A.js +0 -104
  41. package/dist/chunk-GI7E5733.js +0 -30
  42. package/dist/chunk-RIWUU7FO.js +0 -107
  43. package/dist/chunk-S2LL5HA4.js +0 -33
package/dist/index.d.cts CHANGED
@@ -593,14 +593,27 @@ interface ClaudeHarnessSettings {
593
593
  /** When true, pass `--chrome` on Claude turns. */
594
594
  chromeEnabled?: boolean;
595
595
  }
596
+ /** Optional absolute path override for a CLI agent binary. */
597
+ interface CliExecutableSettings {
598
+ /** Absolute path to the CLI. Empty/omitted = default name on PATH. */
599
+ executablePath?: string;
600
+ }
596
601
  /** Local agent that runs the Brightsy cloud coordinator. */
597
602
  type BrightsyCloudConnectAgent = 'claude' | 'codex' | 'opencode' | 'cursor';
598
603
  /** Brightsy cloud remote-orchestrator preferences (Slack / Discord / Teams). */
599
604
  interface BrightsyHarnessSettings {
605
+ /** Absolute path to the Brightsy CLI. Empty/omitted = `brightsy` on PATH. */
606
+ executablePath?: string;
600
607
  /** When true, desktop app polls Brightsy for Sideboard cloud tasks. */
601
608
  cloudConnectEnabled?: boolean;
602
609
  /** Local agent used for the cloud coordinator (not Brightsy itself). */
603
610
  cloudConnectAgent?: BrightsyCloudConnectAgent;
611
+ /**
612
+ * When true, inject Brightsy MCP on every worktree agent turn (Claude / Codex /
613
+ * Cursor / OpenCode) if logged in. Default off: only when the user asks
614
+ * (“use Brightsy…”) or the thread already used it. Orchestration always injects.
615
+ */
616
+ injectWorktreeMcp?: boolean;
604
617
  }
605
618
  /** Preferred issue tracker for Create-from / Link issue. */
606
619
  type IssueSource = 'linear' | 'github';
@@ -680,6 +693,10 @@ interface AppSettings {
680
693
  environment: Record<string, string>;
681
694
  /** Claude Code–specific harness settings. */
682
695
  claude: ClaudeHarnessSettings;
696
+ /** Codex CLI executable override. */
697
+ codex: CliExecutableSettings;
698
+ /** OpenCode CLI executable override. */
699
+ opencode: CliExecutableSettings;
683
700
  /** Brightsy cloud connect preferences (Slack / Discord / Teams). */
684
701
  brightsy: BrightsyHarnessSettings;
685
702
  /** GitHub / Linear connections and issue-source preference. */
@@ -700,8 +717,16 @@ declare function updateClaudeSettings(patch: {
700
717
  chromeEnabled?: boolean;
701
718
  }): AppSettings;
702
719
  declare function updateBrightsySettings(patch: {
720
+ executablePath?: string | null;
703
721
  cloudConnectEnabled?: boolean;
704
722
  cloudConnectAgent?: BrightsyCloudConnectAgent | null;
723
+ injectWorktreeMcp?: boolean;
724
+ }): AppSettings;
725
+ declare function updateCodexSettings(patch: {
726
+ executablePath?: string | null;
727
+ }): AppSettings;
728
+ declare function updateOpencodeSettings(patch: {
729
+ executablePath?: string | null;
705
730
  }): AppSettings;
706
731
  declare function updateIntegrationsSettings(patch: {
707
732
  linearApiKey?: string | null;
@@ -756,6 +781,8 @@ declare function getIssueSource(settings?: AppSettings): IssueSource;
756
781
  declare function resolveEffectiveIssueSource(settings?: AppSettings): IssueSource;
757
782
  declare function getLinearApiKey(settings?: AppSettings): string | null;
758
783
  declare function brightsyCloudConnectEnabled(settings?: AppSettings): boolean;
784
+ /** Default off — worktree agents only get Brightsy MCP on ask / prior use. */
785
+ declare function brightsyInjectWorktreeMcpEnabled(settings?: AppSettings): boolean;
759
786
  /**
760
787
  * Local agent for the Brightsy cloud coordinator.
761
788
  * Prefer Account → Default agent when it can run orchestration (Claude / Cursor /
@@ -780,6 +807,11 @@ declare function orchestrationQuotaFallbackAgent(settings?: AppSettings): AgentK
780
807
  declare function maxConcurrentAgents(settings?: AppSettings): number;
781
808
  /** Binary name or absolute path used to spawn Claude Code. */
782
809
  declare function resolveClaudeExecutable(settings?: AppSettings): string;
810
+ /** CLI agents that support a custom executable path override. */
811
+ type CliAgentKind = 'claude' | 'codex' | 'opencode' | 'brightsy';
812
+ /** Binary name or absolute path for a CLI agent (custom path when set). */
813
+ declare function resolveAgentExecutable(agent: CliAgentKind, settings?: AppSettings): string;
814
+ declare function updateAgentExecutable(agent: CliAgentKind, executablePath: string | null): AppSettings;
783
815
  declare function claudeChromeEnabled(settings?: AppSettings): boolean;
784
816
  /**
785
817
  * Apply Sideboard-managed environment onto a process env object.
@@ -1228,6 +1260,11 @@ interface AgentTurnInput {
1228
1260
  prompt: string;
1229
1261
  }
1230
1262
  declare function normalizeTurnInput(input: string | AgentTurnInput): Required<Pick<AgentTurnInput, 'prompt'>> & AgentTurnInput;
1263
+ /**
1264
+ * Resumed CLI sessions already hold history + first-turn prefix. Re-sending
1265
+ * cachedPrefix (worktree playbook, AGENTS.md, artifact docs) doubles tokens.
1266
+ */
1267
+ declare function dropCachedPrefixOnResume(input: string | AgentTurnInput, sessionId: string | null | undefined): AgentTurnInput;
1231
1268
  /**
1232
1269
  * Flatten to a single string for CLIs that don't accept cache_control blocks
1233
1270
  * (Codex today; OpenCode `run` is plain text — OpenCode applies provider caching
@@ -1488,12 +1525,31 @@ declare function assertOrchestratorCapableAgent(agent: AgentKind, context?: stri
1488
1525
  /** Prefer a capable agent; fall back to Claude when the choice is unsupported. */
1489
1526
  declare function coerceOrchestratorAgent(agent: AgentKind | null | undefined, fallback?: OrchestratorAgentKind): OrchestratorAgentKind;
1490
1527
 
1528
+ /** Conductor-bundled Claude/Codex live here (not on a typical GUI PATH). */
1529
+ declare function conductorBundledBinDir(home?: string): string;
1530
+ declare function isConductorBundledCli(filePath: string | null | undefined): boolean;
1491
1531
  /**
1492
1532
  * Electron / GUI apps often inherit a minimal PATH that omits Homebrew and
1493
1533
  * user bin dirs where `claude` / `codex` / `opencode` / `brightsy` live. Call
1494
1534
  * once at process start (and before agent spawns) so adapters can resolve CLIs.
1535
+ * Also includes Conductor’s bundled `bin` (Claude/Codex) as a fallback.
1495
1536
  */
1496
1537
  declare function ensureAgentPath(env?: NodeJS.ProcessEnv): string;
1538
+ /**
1539
+ * Prepend the active `npm prefix -g`/bin dir (where `npm i -g @openai/codex`
1540
+ * lands). Electron often finds this via ensureAgentPath heuristics, but a
1541
+ * fresh Terminal window may not — causing "codex: command not found" on login.
1542
+ */
1543
+ declare function enrichPathWithNpmGlobalBin(env?: NodeJS.ProcessEnv): string;
1544
+ /** Escape a value for use inside a POSIX single-quoted string. */
1545
+ declare function posixShellSingleQuote(value: string): string;
1546
+ /**
1547
+ * Rewrite `codex login` → `/abs/path/codex login` when `which` can see the bin
1548
+ * on the enriched Electron PATH.
1549
+ */
1550
+ declare function resolveCommandBinarySync(command: string, whichPath: string | null | undefined): string;
1551
+ /** `export PATH='…' && <command>` so Terminal inherits Electron’s enriched PATH. */
1552
+ declare function withExportedPath(command: string, pathValue: string): string;
1497
1553
 
1498
1554
  type AgentSetupKind = 'cli' | 'api-key' | 'bundled-sdk';
1499
1555
  interface AgentSetupInfo {
@@ -1521,6 +1577,14 @@ interface AgentSetupActionResult {
1521
1577
  }
1522
1578
  declare function getAgentSetupInfo(agent: AgentKind): AgentSetupInfo;
1523
1579
  declare function listAgentSetupInfo(): AgentSetupInfo[];
1580
+ /** Rewrite login command to honor a custom executable path override. */
1581
+ declare function resolveLoginCommand(agent: AgentKind): string | null;
1582
+ /**
1583
+ * Make a Terminal command resolve the same binaries Electron sees after
1584
+ * `npm i -g` (absolute path + exported PATH). Avoids "codex: command not found"
1585
+ * when Terminal’s login shell lacks the npm global bin.
1586
+ */
1587
+ declare function prepareTerminalCommand(command: string): Promise<string>;
1524
1588
  /**
1525
1589
  * Open an interactive shell command in the system terminal (macOS Terminal.app,
1526
1590
  * Linux gnome-terminal/x-terminal-emulator, Windows cmd).
@@ -1613,6 +1677,8 @@ declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | '
1613
1677
  * Tell agents how Sideboard renders Claude-style artifacts (side column).
1614
1678
  * Claude Code has no claude.ai `artifact` tool — fences / present_artifact instead.
1615
1679
  */
1680
+ /** Short isolation line on every worktree turn (survives CLI resume). */
1681
+ declare function formatWorktreeReminder(): string;
1616
1682
  declare function formatArtifactDirective(): string;
1617
1683
  interface AgentInstructionFile {
1618
1684
  relativePath: string;
@@ -2737,6 +2803,11 @@ declare function cloneRepoIntoSideboard(opts: {
2737
2803
  */
2738
2804
  declare function startMcpServer(): Promise<void>;
2739
2805
 
2806
+ /** Injected Sideboard MCP: worktree turns list UI tools only; orchestration gets the fleet. */
2807
+ type SideboardMcpProfile = 'worktree' | 'orchestration';
2808
+ declare const SIDEBOARD_MCP_PROFILE_ENV = "SIDEBOARD_MCP_PROFILE";
2809
+ declare function sideboardMcpProfile(env?: NodeJS.ProcessEnv): SideboardMcpProfile;
2810
+
2740
2811
  interface BrightsyLocalConfig {
2741
2812
  access_token: string;
2742
2813
  refresh_token?: string;
@@ -2808,10 +2879,16 @@ interface IpcApi {
2808
2879
  updateClaudeSettings(patch: Partial<ClaudeHarnessSettings> & {
2809
2880
  executablePath?: string | null;
2810
2881
  }): Promise<AppSettings>;
2882
+ /** Persist a custom executable path for Claude / Codex / OpenCode / Brightsy. */
2883
+ updateAgentExecutable(agent: CliAgentKind, executablePath: string | null): Promise<AppSettings>;
2811
2884
  /** Native file picker for a Claude Code executable override. */
2812
2885
  pickClaudeExecutable(): Promise<string | null>;
2886
+ /** Native file picker for a CLI agent executable override. */
2887
+ pickAgentExecutable(agent: CliAgentKind): Promise<string | null>;
2813
2888
  /** Absolute path for PATH `claude`, or null if missing. */
2814
2889
  resolveSystemClaudePath(): Promise<string | null>;
2890
+ /** Absolute path for PATH binary of a CLI agent, or null if missing. */
2891
+ resolveSystemAgentPath(agent: CliAgentKind): Promise<string | null>;
2815
2892
  /** Ensure `~/.claude/settings.json` exists and open it in the OS default app. */
2816
2893
  openClaudeUserSettings(): Promise<void>;
2817
2894
  listBrightsyChatTargets(): Promise<BrightsyChatTargets>;
@@ -3350,6 +3427,24 @@ declare const SIDEBOARD_MCP_ALLOWED_TOOLS: readonly ["mcp__sideboard", "mcp__sid
3350
3427
  declare const BRIGHTSY_MCP_ALLOWED_TOOLS: readonly ["mcp__brightsy", "mcp__brightsy__*"];
3351
3428
  /** True when ~/.brightsy/config.json has a usable login session. */
3352
3429
  declare function isBrightsyConnected(): boolean;
3430
+ /** True when the user explicitly named Brightsy (e.g. "use Brightsy to …"). */
3431
+ declare function promptMentionsBrightsy(text: string | null | undefined): boolean;
3432
+ /**
3433
+ * Worktree turns only inject Brightsy MCP when the user asked for it (or this
3434
+ * thread already used it). Do not scan the assembled agent prompt — the
3435
+ * artifact reminder always mentions Brightsy.
3436
+ */
3437
+ declare function threadRequestsBrightsyMcp(thread: Pick<Thread, 'messages'> | null | undefined): boolean;
3438
+ /**
3439
+ * Orchestration always gets Brightsy MCP when logged in. Worktree coding turns
3440
+ * get it when Settings → “Inject Brightsy MCP on worktree agents” is on, or
3441
+ * after “use Brightsy …” / a prior Brightsy tool / CMS pane.
3442
+ */
3443
+ declare function shouldInjectBrightsyMcp(thread: Pick<Thread, 'messages'> | null | undefined, opts?: {
3444
+ orchestrator?: boolean;
3445
+ connected?: boolean;
3446
+ alwaysOnWorktree?: boolean;
3447
+ }): boolean;
3353
3448
  /** Allow-tool patterns for one or more Brightsy MCP server names. */
3354
3449
  declare function brightsyMcpAllowedTools(serverNames: string[]): string[];
3355
3450
  /**
@@ -3361,4 +3456,4 @@ declare function writeInjectedMcpConfig(opts: {
3361
3456
  includeBrightsy?: boolean;
3362
3457
  }): Promise<string | null>;
3363
3458
 
3364
- export { ATTACHMENTS_DIR, type ActiveRun, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createOrUpdatePr, createPrStack, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, findThreadForStackLayer, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPresentPlanToolName, isSessionQuotaLimit, isSideboardScratchPath, isThinkingEffort, isWorkspaceScratchPath, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergePrStack, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, planFileAbs, previewLand, pushBranch, readExistingReviewRequestFile, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resetGhStackDetectCache, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubRepoSlug, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, submitPrStack, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
3459
+ export { ATTACHMENTS_DIR, type ActiveRun, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, type ScriptHandle, type SideboardMcpProfile, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, collectTakenTeamSlugs, commitAll, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createOrUpdatePr, createPrStack, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, dropCachedPrefixOnResume, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, findThreadForStackLayer, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, formatWorktreeReminder, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPresentPlanToolName, isSessionQuotaLimit, isSideboardScratchPath, isThinkingEffort, isWorkspaceScratchPath, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergePrStack, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, planFileAbs, posixShellSingleQuote, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resetGhStackDetectCache, resolveAgentExecutable, resolveClaudeExecutable, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubRepoSlug, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, submitPrStack, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateOpencodeSettings, updateThread, validateLinearApiKey, withAgentInstructions, withExportedPath, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
package/dist/index.d.ts CHANGED
@@ -593,14 +593,27 @@ interface ClaudeHarnessSettings {
593
593
  /** When true, pass `--chrome` on Claude turns. */
594
594
  chromeEnabled?: boolean;
595
595
  }
596
+ /** Optional absolute path override for a CLI agent binary. */
597
+ interface CliExecutableSettings {
598
+ /** Absolute path to the CLI. Empty/omitted = default name on PATH. */
599
+ executablePath?: string;
600
+ }
596
601
  /** Local agent that runs the Brightsy cloud coordinator. */
597
602
  type BrightsyCloudConnectAgent = 'claude' | 'codex' | 'opencode' | 'cursor';
598
603
  /** Brightsy cloud remote-orchestrator preferences (Slack / Discord / Teams). */
599
604
  interface BrightsyHarnessSettings {
605
+ /** Absolute path to the Brightsy CLI. Empty/omitted = `brightsy` on PATH. */
606
+ executablePath?: string;
600
607
  /** When true, desktop app polls Brightsy for Sideboard cloud tasks. */
601
608
  cloudConnectEnabled?: boolean;
602
609
  /** Local agent used for the cloud coordinator (not Brightsy itself). */
603
610
  cloudConnectAgent?: BrightsyCloudConnectAgent;
611
+ /**
612
+ * When true, inject Brightsy MCP on every worktree agent turn (Claude / Codex /
613
+ * Cursor / OpenCode) if logged in. Default off: only when the user asks
614
+ * (“use Brightsy…”) or the thread already used it. Orchestration always injects.
615
+ */
616
+ injectWorktreeMcp?: boolean;
604
617
  }
605
618
  /** Preferred issue tracker for Create-from / Link issue. */
606
619
  type IssueSource = 'linear' | 'github';
@@ -680,6 +693,10 @@ interface AppSettings {
680
693
  environment: Record<string, string>;
681
694
  /** Claude Code–specific harness settings. */
682
695
  claude: ClaudeHarnessSettings;
696
+ /** Codex CLI executable override. */
697
+ codex: CliExecutableSettings;
698
+ /** OpenCode CLI executable override. */
699
+ opencode: CliExecutableSettings;
683
700
  /** Brightsy cloud connect preferences (Slack / Discord / Teams). */
684
701
  brightsy: BrightsyHarnessSettings;
685
702
  /** GitHub / Linear connections and issue-source preference. */
@@ -700,8 +717,16 @@ declare function updateClaudeSettings(patch: {
700
717
  chromeEnabled?: boolean;
701
718
  }): AppSettings;
702
719
  declare function updateBrightsySettings(patch: {
720
+ executablePath?: string | null;
703
721
  cloudConnectEnabled?: boolean;
704
722
  cloudConnectAgent?: BrightsyCloudConnectAgent | null;
723
+ injectWorktreeMcp?: boolean;
724
+ }): AppSettings;
725
+ declare function updateCodexSettings(patch: {
726
+ executablePath?: string | null;
727
+ }): AppSettings;
728
+ declare function updateOpencodeSettings(patch: {
729
+ executablePath?: string | null;
705
730
  }): AppSettings;
706
731
  declare function updateIntegrationsSettings(patch: {
707
732
  linearApiKey?: string | null;
@@ -756,6 +781,8 @@ declare function getIssueSource(settings?: AppSettings): IssueSource;
756
781
  declare function resolveEffectiveIssueSource(settings?: AppSettings): IssueSource;
757
782
  declare function getLinearApiKey(settings?: AppSettings): string | null;
758
783
  declare function brightsyCloudConnectEnabled(settings?: AppSettings): boolean;
784
+ /** Default off — worktree agents only get Brightsy MCP on ask / prior use. */
785
+ declare function brightsyInjectWorktreeMcpEnabled(settings?: AppSettings): boolean;
759
786
  /**
760
787
  * Local agent for the Brightsy cloud coordinator.
761
788
  * Prefer Account → Default agent when it can run orchestration (Claude / Cursor /
@@ -780,6 +807,11 @@ declare function orchestrationQuotaFallbackAgent(settings?: AppSettings): AgentK
780
807
  declare function maxConcurrentAgents(settings?: AppSettings): number;
781
808
  /** Binary name or absolute path used to spawn Claude Code. */
782
809
  declare function resolveClaudeExecutable(settings?: AppSettings): string;
810
+ /** CLI agents that support a custom executable path override. */
811
+ type CliAgentKind = 'claude' | 'codex' | 'opencode' | 'brightsy';
812
+ /** Binary name or absolute path for a CLI agent (custom path when set). */
813
+ declare function resolveAgentExecutable(agent: CliAgentKind, settings?: AppSettings): string;
814
+ declare function updateAgentExecutable(agent: CliAgentKind, executablePath: string | null): AppSettings;
783
815
  declare function claudeChromeEnabled(settings?: AppSettings): boolean;
784
816
  /**
785
817
  * Apply Sideboard-managed environment onto a process env object.
@@ -1228,6 +1260,11 @@ interface AgentTurnInput {
1228
1260
  prompt: string;
1229
1261
  }
1230
1262
  declare function normalizeTurnInput(input: string | AgentTurnInput): Required<Pick<AgentTurnInput, 'prompt'>> & AgentTurnInput;
1263
+ /**
1264
+ * Resumed CLI sessions already hold history + first-turn prefix. Re-sending
1265
+ * cachedPrefix (worktree playbook, AGENTS.md, artifact docs) doubles tokens.
1266
+ */
1267
+ declare function dropCachedPrefixOnResume(input: string | AgentTurnInput, sessionId: string | null | undefined): AgentTurnInput;
1231
1268
  /**
1232
1269
  * Flatten to a single string for CLIs that don't accept cache_control blocks
1233
1270
  * (Codex today; OpenCode `run` is plain text — OpenCode applies provider caching
@@ -1488,12 +1525,31 @@ declare function assertOrchestratorCapableAgent(agent: AgentKind, context?: stri
1488
1525
  /** Prefer a capable agent; fall back to Claude when the choice is unsupported. */
1489
1526
  declare function coerceOrchestratorAgent(agent: AgentKind | null | undefined, fallback?: OrchestratorAgentKind): OrchestratorAgentKind;
1490
1527
 
1528
+ /** Conductor-bundled Claude/Codex live here (not on a typical GUI PATH). */
1529
+ declare function conductorBundledBinDir(home?: string): string;
1530
+ declare function isConductorBundledCli(filePath: string | null | undefined): boolean;
1491
1531
  /**
1492
1532
  * Electron / GUI apps often inherit a minimal PATH that omits Homebrew and
1493
1533
  * user bin dirs where `claude` / `codex` / `opencode` / `brightsy` live. Call
1494
1534
  * once at process start (and before agent spawns) so adapters can resolve CLIs.
1535
+ * Also includes Conductor’s bundled `bin` (Claude/Codex) as a fallback.
1495
1536
  */
1496
1537
  declare function ensureAgentPath(env?: NodeJS.ProcessEnv): string;
1538
+ /**
1539
+ * Prepend the active `npm prefix -g`/bin dir (where `npm i -g @openai/codex`
1540
+ * lands). Electron often finds this via ensureAgentPath heuristics, but a
1541
+ * fresh Terminal window may not — causing "codex: command not found" on login.
1542
+ */
1543
+ declare function enrichPathWithNpmGlobalBin(env?: NodeJS.ProcessEnv): string;
1544
+ /** Escape a value for use inside a POSIX single-quoted string. */
1545
+ declare function posixShellSingleQuote(value: string): string;
1546
+ /**
1547
+ * Rewrite `codex login` → `/abs/path/codex login` when `which` can see the bin
1548
+ * on the enriched Electron PATH.
1549
+ */
1550
+ declare function resolveCommandBinarySync(command: string, whichPath: string | null | undefined): string;
1551
+ /** `export PATH='…' && <command>` so Terminal inherits Electron’s enriched PATH. */
1552
+ declare function withExportedPath(command: string, pathValue: string): string;
1497
1553
 
1498
1554
  type AgentSetupKind = 'cli' | 'api-key' | 'bundled-sdk';
1499
1555
  interface AgentSetupInfo {
@@ -1521,6 +1577,14 @@ interface AgentSetupActionResult {
1521
1577
  }
1522
1578
  declare function getAgentSetupInfo(agent: AgentKind): AgentSetupInfo;
1523
1579
  declare function listAgentSetupInfo(): AgentSetupInfo[];
1580
+ /** Rewrite login command to honor a custom executable path override. */
1581
+ declare function resolveLoginCommand(agent: AgentKind): string | null;
1582
+ /**
1583
+ * Make a Terminal command resolve the same binaries Electron sees after
1584
+ * `npm i -g` (absolute path + exported PATH). Avoids "codex: command not found"
1585
+ * when Terminal’s login shell lacks the npm global bin.
1586
+ */
1587
+ declare function prepareTerminalCommand(command: string): Promise<string>;
1524
1588
  /**
1525
1589
  * Open an interactive shell command in the system terminal (macOS Terminal.app,
1526
1590
  * Linux gnome-terminal/x-terminal-emulator, Windows cmd).
@@ -1613,6 +1677,8 @@ declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | '
1613
1677
  * Tell agents how Sideboard renders Claude-style artifacts (side column).
1614
1678
  * Claude Code has no claude.ai `artifact` tool — fences / present_artifact instead.
1615
1679
  */
1680
+ /** Short isolation line on every worktree turn (survives CLI resume). */
1681
+ declare function formatWorktreeReminder(): string;
1616
1682
  declare function formatArtifactDirective(): string;
1617
1683
  interface AgentInstructionFile {
1618
1684
  relativePath: string;
@@ -2737,6 +2803,11 @@ declare function cloneRepoIntoSideboard(opts: {
2737
2803
  */
2738
2804
  declare function startMcpServer(): Promise<void>;
2739
2805
 
2806
+ /** Injected Sideboard MCP: worktree turns list UI tools only; orchestration gets the fleet. */
2807
+ type SideboardMcpProfile = 'worktree' | 'orchestration';
2808
+ declare const SIDEBOARD_MCP_PROFILE_ENV = "SIDEBOARD_MCP_PROFILE";
2809
+ declare function sideboardMcpProfile(env?: NodeJS.ProcessEnv): SideboardMcpProfile;
2810
+
2740
2811
  interface BrightsyLocalConfig {
2741
2812
  access_token: string;
2742
2813
  refresh_token?: string;
@@ -2808,10 +2879,16 @@ interface IpcApi {
2808
2879
  updateClaudeSettings(patch: Partial<ClaudeHarnessSettings> & {
2809
2880
  executablePath?: string | null;
2810
2881
  }): Promise<AppSettings>;
2882
+ /** Persist a custom executable path for Claude / Codex / OpenCode / Brightsy. */
2883
+ updateAgentExecutable(agent: CliAgentKind, executablePath: string | null): Promise<AppSettings>;
2811
2884
  /** Native file picker for a Claude Code executable override. */
2812
2885
  pickClaudeExecutable(): Promise<string | null>;
2886
+ /** Native file picker for a CLI agent executable override. */
2887
+ pickAgentExecutable(agent: CliAgentKind): Promise<string | null>;
2813
2888
  /** Absolute path for PATH `claude`, or null if missing. */
2814
2889
  resolveSystemClaudePath(): Promise<string | null>;
2890
+ /** Absolute path for PATH binary of a CLI agent, or null if missing. */
2891
+ resolveSystemAgentPath(agent: CliAgentKind): Promise<string | null>;
2815
2892
  /** Ensure `~/.claude/settings.json` exists and open it in the OS default app. */
2816
2893
  openClaudeUserSettings(): Promise<void>;
2817
2894
  listBrightsyChatTargets(): Promise<BrightsyChatTargets>;
@@ -3350,6 +3427,24 @@ declare const SIDEBOARD_MCP_ALLOWED_TOOLS: readonly ["mcp__sideboard", "mcp__sid
3350
3427
  declare const BRIGHTSY_MCP_ALLOWED_TOOLS: readonly ["mcp__brightsy", "mcp__brightsy__*"];
3351
3428
  /** True when ~/.brightsy/config.json has a usable login session. */
3352
3429
  declare function isBrightsyConnected(): boolean;
3430
+ /** True when the user explicitly named Brightsy (e.g. "use Brightsy to …"). */
3431
+ declare function promptMentionsBrightsy(text: string | null | undefined): boolean;
3432
+ /**
3433
+ * Worktree turns only inject Brightsy MCP when the user asked for it (or this
3434
+ * thread already used it). Do not scan the assembled agent prompt — the
3435
+ * artifact reminder always mentions Brightsy.
3436
+ */
3437
+ declare function threadRequestsBrightsyMcp(thread: Pick<Thread, 'messages'> | null | undefined): boolean;
3438
+ /**
3439
+ * Orchestration always gets Brightsy MCP when logged in. Worktree coding turns
3440
+ * get it when Settings → “Inject Brightsy MCP on worktree agents” is on, or
3441
+ * after “use Brightsy …” / a prior Brightsy tool / CMS pane.
3442
+ */
3443
+ declare function shouldInjectBrightsyMcp(thread: Pick<Thread, 'messages'> | null | undefined, opts?: {
3444
+ orchestrator?: boolean;
3445
+ connected?: boolean;
3446
+ alwaysOnWorktree?: boolean;
3447
+ }): boolean;
3353
3448
  /** Allow-tool patterns for one or more Brightsy MCP server names. */
3354
3449
  declare function brightsyMcpAllowedTools(serverNames: string[]): string[];
3355
3450
  /**
@@ -3361,4 +3456,4 @@ declare function writeInjectedMcpConfig(opts: {
3361
3456
  includeBrightsy?: boolean;
3362
3457
  }): Promise<string | null>;
3363
3458
 
3364
- export { ATTACHMENTS_DIR, type ActiveRun, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createOrUpdatePr, createPrStack, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, findThreadForStackLayer, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPresentPlanToolName, isSessionQuotaLimit, isSideboardScratchPath, isThinkingEffort, isWorkspaceScratchPath, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergePrStack, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, planFileAbs, previewLand, pushBranch, readExistingReviewRequestFile, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resetGhStackDetectCache, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubRepoSlug, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, submitPrStack, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
3459
+ export { ATTACHMENTS_DIR, type ActiveRun, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, type ScriptHandle, type SideboardMcpProfile, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, collectTakenTeamSlugs, commitAll, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createOrUpdatePr, createPrStack, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, dropCachedPrefixOnResume, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, findThreadForStackLayer, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, formatWorktreeReminder, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPresentPlanToolName, isSessionQuotaLimit, isSideboardScratchPath, isThinkingEffort, isWorkspaceScratchPath, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergePrStack, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, planFileAbs, posixShellSingleQuote, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resetGhStackDetectCache, resolveAgentExecutable, resolveClaudeExecutable, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubRepoSlug, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, submitPrStack, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateOpencodeSettings, updateThread, validateLinearApiKey, withAgentInstructions, withExportedPath, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };