@sideboard-ai/core 0.1.62 → 0.1.66

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 (41) hide show
  1. package/dist/{agents-QLSFIQAO.js → agents-EWFD765A.js} +23 -7
  2. package/dist/{agents-KF3J3C53.js → agents-MD7SCFYX.js} +23 -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-RIWUU7FO.js → chunk-5AG5BUQN.js} +61 -3
  6. package/dist/{chunk-27MAWNKY.js → chunk-AKPEXIKK.js} +2 -2
  7. package/dist/{chunk-2MCNURQV.js → chunk-BBEH2CJE.js} +264 -93
  8. package/dist/{chunk-DDN3UF4R.js → chunk-BPOTVI5J.js} +115 -3
  9. package/dist/{chunk-2FEA4LDA.js → chunk-DNPP7QMK.js} +31 -6
  10. package/dist/{chunk-MBAL5FE6.js → chunk-DZYMNW2A.js} +4 -4
  11. package/dist/{chunk-JB2H7E7V.js → chunk-EVD4KNKR.js} +1 -1
  12. package/dist/{chunk-A6FOKNOU.js → chunk-HTOTTJJX.js} +2 -2
  13. package/dist/{chunk-3KKNTHUC.js → chunk-I2KGRAXC.js} +1 -1
  14. package/dist/{chunk-ZF5YJCXO.js → chunk-IFAU2DEY.js} +269 -93
  15. package/dist/{chunk-NVU7EC2E.js → chunk-LRBRQFBU.js} +2 -2
  16. package/dist/{chunk-6CUJQKTJ.js → chunk-MHR4OGZ4.js} +115 -3
  17. package/dist/{chunk-46KMKHSD.js → chunk-PESJDZTB.js} +2 -2
  18. package/dist/{chunk-UGXSSBFJ.js → chunk-R7GUDEPY.js} +1 -1
  19. package/dist/{chunk-73AT5K4A.js → chunk-TXQ6K2GR.js} +61 -3
  20. package/dist/{chunk-DXTGDXO2.js → chunk-YTNLOJPK.js} +31 -6
  21. package/dist/{connected-teams-RSL4VB3X.js → connected-teams-CHXO5FFA.js} +2 -2
  22. package/dist/{connected-teams-MKIYKOYA.js → connected-teams-GJTESSTX.js} +2 -2
  23. package/dist/{coordinator-prompt-LKG3SHMI.js → coordinator-prompt-E5UGSJES.js} +4 -4
  24. package/dist/{coordinator-prompt-N2R6FGZK.js → coordinator-prompt-ILSULI7C.js} +4 -4
  25. package/dist/{global-workspace-LALWQWRJ.js → global-workspace-44UG64NA.js} +5 -6
  26. package/dist/{global-workspace-YOAUQCMA.js → global-workspace-5PM5LA6E.js} +5 -6
  27. package/dist/index.cjs +1308 -925
  28. package/dist/index.d.cts +92 -1
  29. package/dist/index.d.ts +92 -1
  30. package/dist/index.js +746 -715
  31. package/dist/mcp/run-stdio.cjs +1267 -976
  32. package/dist/mcp/run-stdio.js +691 -748
  33. package/dist/{run-HZTBWGQR.js → run-74S2NZWB.js} +1 -1
  34. package/dist/{run-GPSVV5OH.js → run-JLN5JK7Q.js} +1 -1
  35. package/dist/{workspaces-VCAIHVIE.js → workspaces-OVBCSS5Y.js} +6 -7
  36. package/dist/{workspaces-E75POJXP.js → workspaces-RXFXQRRF.js} +6 -7
  37. package/dist/{worktree-MV4WRW6G.js → worktree-K2JB53R5.js} +2 -2
  38. package/dist/{worktree-LZEGVQSN.js → worktree-S2N63FLV.js} +2 -2
  39. package/package.json +1 -1
  40. package/dist/chunk-GI7E5733.js +0 -30
  41. 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
@@ -1494,6 +1531,21 @@ declare function coerceOrchestratorAgent(agent: AgentKind | null | undefined, fa
1494
1531
  * once at process start (and before agent spawns) so adapters can resolve CLIs.
1495
1532
  */
1496
1533
  declare function ensureAgentPath(env?: NodeJS.ProcessEnv): string;
1534
+ /**
1535
+ * Prepend the active `npm prefix -g`/bin dir (where `npm i -g @openai/codex`
1536
+ * lands). Electron often finds this via ensureAgentPath heuristics, but a
1537
+ * fresh Terminal window may not — causing "codex: command not found" on login.
1538
+ */
1539
+ declare function enrichPathWithNpmGlobalBin(env?: NodeJS.ProcessEnv): string;
1540
+ /** Escape a value for use inside a POSIX single-quoted string. */
1541
+ declare function posixShellSingleQuote(value: string): string;
1542
+ /**
1543
+ * Rewrite `codex login` → `/abs/path/codex login` when `which` can see the bin
1544
+ * on the enriched Electron PATH.
1545
+ */
1546
+ declare function resolveCommandBinarySync(command: string, whichPath: string | null | undefined): string;
1547
+ /** `export PATH='…'; <command>` so Terminal inherits Electron’s enriched PATH. */
1548
+ declare function withExportedPath(command: string, pathValue: string): string;
1497
1549
 
1498
1550
  type AgentSetupKind = 'cli' | 'api-key' | 'bundled-sdk';
1499
1551
  interface AgentSetupInfo {
@@ -1521,6 +1573,14 @@ interface AgentSetupActionResult {
1521
1573
  }
1522
1574
  declare function getAgentSetupInfo(agent: AgentKind): AgentSetupInfo;
1523
1575
  declare function listAgentSetupInfo(): AgentSetupInfo[];
1576
+ /** Rewrite login command to honor a custom executable path override. */
1577
+ declare function resolveLoginCommand(agent: AgentKind): string | null;
1578
+ /**
1579
+ * Make a Terminal command resolve the same binaries Electron sees after
1580
+ * `npm i -g` (absolute path + exported PATH). Avoids "codex: command not found"
1581
+ * when Terminal’s login shell lacks the npm global bin.
1582
+ */
1583
+ declare function prepareTerminalCommand(command: string): Promise<string>;
1524
1584
  /**
1525
1585
  * Open an interactive shell command in the system terminal (macOS Terminal.app,
1526
1586
  * Linux gnome-terminal/x-terminal-emulator, Windows cmd).
@@ -1613,6 +1673,8 @@ declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | '
1613
1673
  * Tell agents how Sideboard renders Claude-style artifacts (side column).
1614
1674
  * Claude Code has no claude.ai `artifact` tool — fences / present_artifact instead.
1615
1675
  */
1676
+ /** Short isolation line on every worktree turn (survives CLI resume). */
1677
+ declare function formatWorktreeReminder(): string;
1616
1678
  declare function formatArtifactDirective(): string;
1617
1679
  interface AgentInstructionFile {
1618
1680
  relativePath: string;
@@ -2737,6 +2799,11 @@ declare function cloneRepoIntoSideboard(opts: {
2737
2799
  */
2738
2800
  declare function startMcpServer(): Promise<void>;
2739
2801
 
2802
+ /** Injected Sideboard MCP: worktree turns list UI tools only; orchestration gets the fleet. */
2803
+ type SideboardMcpProfile = 'worktree' | 'orchestration';
2804
+ declare const SIDEBOARD_MCP_PROFILE_ENV = "SIDEBOARD_MCP_PROFILE";
2805
+ declare function sideboardMcpProfile(env?: NodeJS.ProcessEnv): SideboardMcpProfile;
2806
+
2740
2807
  interface BrightsyLocalConfig {
2741
2808
  access_token: string;
2742
2809
  refresh_token?: string;
@@ -2808,10 +2875,16 @@ interface IpcApi {
2808
2875
  updateClaudeSettings(patch: Partial<ClaudeHarnessSettings> & {
2809
2876
  executablePath?: string | null;
2810
2877
  }): Promise<AppSettings>;
2878
+ /** Persist a custom executable path for Claude / Codex / OpenCode / Brightsy. */
2879
+ updateAgentExecutable(agent: CliAgentKind, executablePath: string | null): Promise<AppSettings>;
2811
2880
  /** Native file picker for a Claude Code executable override. */
2812
2881
  pickClaudeExecutable(): Promise<string | null>;
2882
+ /** Native file picker for a CLI agent executable override. */
2883
+ pickAgentExecutable(agent: CliAgentKind): Promise<string | null>;
2813
2884
  /** Absolute path for PATH `claude`, or null if missing. */
2814
2885
  resolveSystemClaudePath(): Promise<string | null>;
2886
+ /** Absolute path for PATH binary of a CLI agent, or null if missing. */
2887
+ resolveSystemAgentPath(agent: CliAgentKind): Promise<string | null>;
2815
2888
  /** Ensure `~/.claude/settings.json` exists and open it in the OS default app. */
2816
2889
  openClaudeUserSettings(): Promise<void>;
2817
2890
  listBrightsyChatTargets(): Promise<BrightsyChatTargets>;
@@ -3350,6 +3423,24 @@ declare const SIDEBOARD_MCP_ALLOWED_TOOLS: readonly ["mcp__sideboard", "mcp__sid
3350
3423
  declare const BRIGHTSY_MCP_ALLOWED_TOOLS: readonly ["mcp__brightsy", "mcp__brightsy__*"];
3351
3424
  /** True when ~/.brightsy/config.json has a usable login session. */
3352
3425
  declare function isBrightsyConnected(): boolean;
3426
+ /** True when the user explicitly named Brightsy (e.g. "use Brightsy to …"). */
3427
+ declare function promptMentionsBrightsy(text: string | null | undefined): boolean;
3428
+ /**
3429
+ * Worktree turns only inject Brightsy MCP when the user asked for it (or this
3430
+ * thread already used it). Do not scan the assembled agent prompt — the
3431
+ * artifact reminder always mentions Brightsy.
3432
+ */
3433
+ declare function threadRequestsBrightsyMcp(thread: Pick<Thread, 'messages'> | null | undefined): boolean;
3434
+ /**
3435
+ * Orchestration always gets Brightsy MCP when logged in. Worktree coding turns
3436
+ * get it when Settings → “Inject Brightsy MCP on worktree agents” is on, or
3437
+ * after “use Brightsy …” / a prior Brightsy tool / CMS pane.
3438
+ */
3439
+ declare function shouldInjectBrightsyMcp(thread: Pick<Thread, 'messages'> | null | undefined, opts?: {
3440
+ orchestrator?: boolean;
3441
+ connected?: boolean;
3442
+ alwaysOnWorktree?: boolean;
3443
+ }): boolean;
3353
3444
  /** Allow-tool patterns for one or more Brightsy MCP server names. */
3354
3445
  declare function brightsyMcpAllowedTools(serverNames: string[]): string[];
3355
3446
  /**
@@ -3361,4 +3452,4 @@ declare function writeInjectedMcpConfig(opts: {
3361
3452
  includeBrightsy?: boolean;
3362
3453
  }): Promise<string | null>;
3363
3454
 
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 };
3455
+ 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, 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, 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
@@ -1494,6 +1531,21 @@ declare function coerceOrchestratorAgent(agent: AgentKind | null | undefined, fa
1494
1531
  * once at process start (and before agent spawns) so adapters can resolve CLIs.
1495
1532
  */
1496
1533
  declare function ensureAgentPath(env?: NodeJS.ProcessEnv): string;
1534
+ /**
1535
+ * Prepend the active `npm prefix -g`/bin dir (where `npm i -g @openai/codex`
1536
+ * lands). Electron often finds this via ensureAgentPath heuristics, but a
1537
+ * fresh Terminal window may not — causing "codex: command not found" on login.
1538
+ */
1539
+ declare function enrichPathWithNpmGlobalBin(env?: NodeJS.ProcessEnv): string;
1540
+ /** Escape a value for use inside a POSIX single-quoted string. */
1541
+ declare function posixShellSingleQuote(value: string): string;
1542
+ /**
1543
+ * Rewrite `codex login` → `/abs/path/codex login` when `which` can see the bin
1544
+ * on the enriched Electron PATH.
1545
+ */
1546
+ declare function resolveCommandBinarySync(command: string, whichPath: string | null | undefined): string;
1547
+ /** `export PATH='…'; <command>` so Terminal inherits Electron’s enriched PATH. */
1548
+ declare function withExportedPath(command: string, pathValue: string): string;
1497
1549
 
1498
1550
  type AgentSetupKind = 'cli' | 'api-key' | 'bundled-sdk';
1499
1551
  interface AgentSetupInfo {
@@ -1521,6 +1573,14 @@ interface AgentSetupActionResult {
1521
1573
  }
1522
1574
  declare function getAgentSetupInfo(agent: AgentKind): AgentSetupInfo;
1523
1575
  declare function listAgentSetupInfo(): AgentSetupInfo[];
1576
+ /** Rewrite login command to honor a custom executable path override. */
1577
+ declare function resolveLoginCommand(agent: AgentKind): string | null;
1578
+ /**
1579
+ * Make a Terminal command resolve the same binaries Electron sees after
1580
+ * `npm i -g` (absolute path + exported PATH). Avoids "codex: command not found"
1581
+ * when Terminal’s login shell lacks the npm global bin.
1582
+ */
1583
+ declare function prepareTerminalCommand(command: string): Promise<string>;
1524
1584
  /**
1525
1585
  * Open an interactive shell command in the system terminal (macOS Terminal.app,
1526
1586
  * Linux gnome-terminal/x-terminal-emulator, Windows cmd).
@@ -1613,6 +1673,8 @@ declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | '
1613
1673
  * Tell agents how Sideboard renders Claude-style artifacts (side column).
1614
1674
  * Claude Code has no claude.ai `artifact` tool — fences / present_artifact instead.
1615
1675
  */
1676
+ /** Short isolation line on every worktree turn (survives CLI resume). */
1677
+ declare function formatWorktreeReminder(): string;
1616
1678
  declare function formatArtifactDirective(): string;
1617
1679
  interface AgentInstructionFile {
1618
1680
  relativePath: string;
@@ -2737,6 +2799,11 @@ declare function cloneRepoIntoSideboard(opts: {
2737
2799
  */
2738
2800
  declare function startMcpServer(): Promise<void>;
2739
2801
 
2802
+ /** Injected Sideboard MCP: worktree turns list UI tools only; orchestration gets the fleet. */
2803
+ type SideboardMcpProfile = 'worktree' | 'orchestration';
2804
+ declare const SIDEBOARD_MCP_PROFILE_ENV = "SIDEBOARD_MCP_PROFILE";
2805
+ declare function sideboardMcpProfile(env?: NodeJS.ProcessEnv): SideboardMcpProfile;
2806
+
2740
2807
  interface BrightsyLocalConfig {
2741
2808
  access_token: string;
2742
2809
  refresh_token?: string;
@@ -2808,10 +2875,16 @@ interface IpcApi {
2808
2875
  updateClaudeSettings(patch: Partial<ClaudeHarnessSettings> & {
2809
2876
  executablePath?: string | null;
2810
2877
  }): Promise<AppSettings>;
2878
+ /** Persist a custom executable path for Claude / Codex / OpenCode / Brightsy. */
2879
+ updateAgentExecutable(agent: CliAgentKind, executablePath: string | null): Promise<AppSettings>;
2811
2880
  /** Native file picker for a Claude Code executable override. */
2812
2881
  pickClaudeExecutable(): Promise<string | null>;
2882
+ /** Native file picker for a CLI agent executable override. */
2883
+ pickAgentExecutable(agent: CliAgentKind): Promise<string | null>;
2813
2884
  /** Absolute path for PATH `claude`, or null if missing. */
2814
2885
  resolveSystemClaudePath(): Promise<string | null>;
2886
+ /** Absolute path for PATH binary of a CLI agent, or null if missing. */
2887
+ resolveSystemAgentPath(agent: CliAgentKind): Promise<string | null>;
2815
2888
  /** Ensure `~/.claude/settings.json` exists and open it in the OS default app. */
2816
2889
  openClaudeUserSettings(): Promise<void>;
2817
2890
  listBrightsyChatTargets(): Promise<BrightsyChatTargets>;
@@ -3350,6 +3423,24 @@ declare const SIDEBOARD_MCP_ALLOWED_TOOLS: readonly ["mcp__sideboard", "mcp__sid
3350
3423
  declare const BRIGHTSY_MCP_ALLOWED_TOOLS: readonly ["mcp__brightsy", "mcp__brightsy__*"];
3351
3424
  /** True when ~/.brightsy/config.json has a usable login session. */
3352
3425
  declare function isBrightsyConnected(): boolean;
3426
+ /** True when the user explicitly named Brightsy (e.g. "use Brightsy to …"). */
3427
+ declare function promptMentionsBrightsy(text: string | null | undefined): boolean;
3428
+ /**
3429
+ * Worktree turns only inject Brightsy MCP when the user asked for it (or this
3430
+ * thread already used it). Do not scan the assembled agent prompt — the
3431
+ * artifact reminder always mentions Brightsy.
3432
+ */
3433
+ declare function threadRequestsBrightsyMcp(thread: Pick<Thread, 'messages'> | null | undefined): boolean;
3434
+ /**
3435
+ * Orchestration always gets Brightsy MCP when logged in. Worktree coding turns
3436
+ * get it when Settings → “Inject Brightsy MCP on worktree agents” is on, or
3437
+ * after “use Brightsy …” / a prior Brightsy tool / CMS pane.
3438
+ */
3439
+ declare function shouldInjectBrightsyMcp(thread: Pick<Thread, 'messages'> | null | undefined, opts?: {
3440
+ orchestrator?: boolean;
3441
+ connected?: boolean;
3442
+ alwaysOnWorktree?: boolean;
3443
+ }): boolean;
3353
3444
  /** Allow-tool patterns for one or more Brightsy MCP server names. */
3354
3445
  declare function brightsyMcpAllowedTools(serverNames: string[]): string[];
3355
3446
  /**
@@ -3361,4 +3452,4 @@ declare function writeInjectedMcpConfig(opts: {
3361
3452
  includeBrightsy?: boolean;
3362
3453
  }): Promise<string | null>;
3363
3454
 
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 };
3455
+ 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, 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, 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 };