@sideboard-ai/core 0.1.61 → 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 (45) hide show
  1. package/dist/{agents-B2723EOF.js → agents-EWFD765A.js} +23 -7
  2. package/dist/{agents-EADRAAPG.js → agents-MD7SCFYX.js} +23 -7
  3. package/dist/{app-settings-YBNZ4XSR.js → app-settings-GJVZGU3M.js} +15 -3
  4. package/dist/{app-settings-TBHTJWLQ.js → app-settings-ONKMFSEJ.js} +15 -3
  5. package/dist/{chunk-RIWUU7FO.js → chunk-5AG5BUQN.js} +61 -3
  6. package/dist/{chunk-HLEX5AQ6.js → chunk-7FD7COKE.js} +4 -0
  7. package/dist/{chunk-XWPKLRB3.js → chunk-AKPEXIKK.js} +2 -2
  8. package/dist/{chunk-MX7UH5AT.js → chunk-BBEH2CJE.js} +264 -93
  9. package/dist/{chunk-FGNBTFRD.js → chunk-BPOTVI5J.js} +125 -3
  10. package/dist/{chunk-CHGOMFTA.js → chunk-DNPP7QMK.js} +32 -7
  11. package/dist/{chunk-MBAL5FE6.js → chunk-DZYMNW2A.js} +4 -4
  12. package/dist/{chunk-JB2H7E7V.js → chunk-EVD4KNKR.js} +1 -1
  13. package/dist/{chunk-TSRXOSVD.js → chunk-FWJYLBO6.js} +4 -0
  14. package/dist/{chunk-QJBC4BRK.js → chunk-HTOTTJJX.js} +2 -2
  15. package/dist/{chunk-MFGGIRUA.js → chunk-I2KGRAXC.js} +2 -2
  16. package/dist/{chunk-ZXDOI6IH.js → chunk-IFAU2DEY.js} +269 -93
  17. package/dist/{chunk-NTYRBRE7.js → chunk-LRBRQFBU.js} +2 -2
  18. package/dist/{chunk-75QR74KM.js → chunk-MHR4OGZ4.js} +125 -3
  19. package/dist/{chunk-2P2UK7E7.js → chunk-PESJDZTB.js} +2 -2
  20. package/dist/{chunk-P7EQUFB6.js → chunk-R7GUDEPY.js} +2 -2
  21. package/dist/{chunk-73AT5K4A.js → chunk-TXQ6K2GR.js} +61 -3
  22. package/dist/{chunk-MLAST5BB.js → chunk-YTNLOJPK.js} +32 -7
  23. package/dist/{connected-teams-RSL4VB3X.js → connected-teams-CHXO5FFA.js} +2 -2
  24. package/dist/{connected-teams-MKIYKOYA.js → connected-teams-GJTESSTX.js} +2 -2
  25. package/dist/{coordinator-prompt-4P23VVFC.js → coordinator-prompt-E5UGSJES.js} +5 -5
  26. package/dist/{coordinator-prompt-LNWHZ64D.js → coordinator-prompt-ILSULI7C.js} +5 -5
  27. package/dist/{global-workspace-TMMAVRVW.js → global-workspace-44UG64NA.js} +6 -7
  28. package/dist/{global-workspace-BHT4XUAA.js → global-workspace-5PM5LA6E.js} +6 -7
  29. package/dist/index.cjs +1433 -944
  30. package/dist/index.d.cts +117 -2
  31. package/dist/index.d.ts +117 -2
  32. package/dist/index.js +859 -736
  33. package/dist/mcp/run-stdio.cjs +1388 -993
  34. package/dist/mcp/run-stdio.js +798 -765
  35. package/dist/{run-HZTBWGQR.js → run-74S2NZWB.js} +1 -1
  36. package/dist/{run-GPSVV5OH.js → run-JLN5JK7Q.js} +1 -1
  37. package/dist/{thread-store-GHOADGL2.js → thread-store-BUBR24YA.js} +1 -1
  38. package/dist/{thread-store-UJIGMI5J.js → thread-store-XTPFCJAI.js} +1 -1
  39. package/dist/{workspaces-3GO3EDQG.js → workspaces-OVBCSS5Y.js} +7 -8
  40. package/dist/{workspaces-GFPGDGCS.js → workspaces-RXFXQRRF.js} +7 -8
  41. package/dist/{worktree-GBLHEFHR.js → worktree-K2JB53R5.js} +3 -3
  42. package/dist/{worktree-3L2G6PCM.js → worktree-S2N63FLV.js} +3 -3
  43. package/package.json +1 -1
  44. package/dist/chunk-GI7E5733.js +0 -30
  45. package/dist/chunk-S2LL5HA4.js +0 -33
package/dist/index.d.cts CHANGED
@@ -113,6 +113,18 @@ interface Thread {
113
113
  prUrl: string | null;
114
114
  /** Cached PR title for Conductor-style sidebar labels (PR title > branch). */
115
115
  prTitle: string | null;
116
+ /**
117
+ * Cached GitHub PR lifecycle from the last `getPrMeta` / merge
118
+ * (`OPEN` | `MERGED` | `CLOSED`, etc.). Used for purple “done” sidebar
119
+ * styling and Conductor-style auto-archive-on-merge.
120
+ */
121
+ prState: string | null;
122
+ /**
123
+ * When true, skip auto-archive if the PR is already MERGED (set on restore
124
+ * so unarchiving a merged workspace does not immediately re-archive).
125
+ * Cleared when `prState` becomes a non-merged open state again.
126
+ */
127
+ skipAutoArchiveOnMerge?: boolean;
116
128
  /**
117
129
  * Stable id for a GitHub PR stack this thread belongs to (shared across layer worktrees).
118
130
  * Null when not part of a stack.
@@ -581,14 +593,27 @@ interface ClaudeHarnessSettings {
581
593
  /** When true, pass `--chrome` on Claude turns. */
582
594
  chromeEnabled?: boolean;
583
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
+ }
584
601
  /** Local agent that runs the Brightsy cloud coordinator. */
585
602
  type BrightsyCloudConnectAgent = 'claude' | 'codex' | 'opencode' | 'cursor';
586
603
  /** Brightsy cloud remote-orchestrator preferences (Slack / Discord / Teams). */
587
604
  interface BrightsyHarnessSettings {
605
+ /** Absolute path to the Brightsy CLI. Empty/omitted = `brightsy` on PATH. */
606
+ executablePath?: string;
588
607
  /** When true, desktop app polls Brightsy for Sideboard cloud tasks. */
589
608
  cloudConnectEnabled?: boolean;
590
609
  /** Local agent used for the cloud coordinator (not Brightsy itself). */
591
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;
592
617
  }
593
618
  /** Preferred issue tracker for Create-from / Link issue. */
594
619
  type IssueSource = 'linear' | 'github';
@@ -636,6 +661,11 @@ interface AdvancedAppSettings {
636
661
  * Conductor: `git.delete_branch_on_archive` (default off).
637
662
  */
638
663
  deleteBranchOnPurge?: boolean;
664
+ /**
665
+ * When a linked PR becomes MERGED, archive the worktree’s chats.
666
+ * Conductor: auto-archive on merge (opt-in; default off).
667
+ */
668
+ autoArchiveOnMerge?: boolean;
639
669
  /** Max concurrent agent turns across the orchestrator (default 3). */
640
670
  maxConcurrent?: number;
641
671
  /**
@@ -663,6 +693,10 @@ interface AppSettings {
663
693
  environment: Record<string, string>;
664
694
  /** Claude Code–specific harness settings. */
665
695
  claude: ClaudeHarnessSettings;
696
+ /** Codex CLI executable override. */
697
+ codex: CliExecutableSettings;
698
+ /** OpenCode CLI executable override. */
699
+ opencode: CliExecutableSettings;
666
700
  /** Brightsy cloud connect preferences (Slack / Discord / Teams). */
667
701
  brightsy: BrightsyHarnessSettings;
668
702
  /** GitHub / Linear connections and issue-source preference. */
@@ -683,8 +717,16 @@ declare function updateClaudeSettings(patch: {
683
717
  chromeEnabled?: boolean;
684
718
  }): AppSettings;
685
719
  declare function updateBrightsySettings(patch: {
720
+ executablePath?: string | null;
686
721
  cloudConnectEnabled?: boolean;
687
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;
688
730
  }): AppSettings;
689
731
  declare function updateIntegrationsSettings(patch: {
690
732
  linearApiKey?: string | null;
@@ -739,6 +781,8 @@ declare function getIssueSource(settings?: AppSettings): IssueSource;
739
781
  declare function resolveEffectiveIssueSource(settings?: AppSettings): IssueSource;
740
782
  declare function getLinearApiKey(settings?: AppSettings): string | null;
741
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;
742
786
  /**
743
787
  * Local agent for the Brightsy cloud coordinator.
744
788
  * Prefer Account → Default agent when it can run orchestration (Claude / Cursor /
@@ -753,6 +797,8 @@ declare function autoRunAfterSetupEnabled(settings?: AppSettings): boolean;
753
797
  declare function caffeinateWhileRunningEnabled(settings?: AppSettings): boolean;
754
798
  declare function caffeinateWhileCloudConnectEnabled(settings?: AppSettings): boolean;
755
799
  declare function deleteBranchOnPurgeEnabled(settings?: AppSettings): boolean;
800
+ /** Conductor-style opt-in — default off. */
801
+ declare function autoArchiveOnMergeEnabled(settings?: AppSettings): boolean;
756
802
  declare function autoCleanupOrphansEnabled(settings?: AppSettings): boolean;
757
803
  /** Default: switch to another agent (Auto) when orchestration hits a session limit. */
758
804
  declare function orchestrationQuotaOnLimit(settings?: AppSettings): OrchestrationQuotaOnLimit;
@@ -761,6 +807,11 @@ declare function orchestrationQuotaFallbackAgent(settings?: AppSettings): AgentK
761
807
  declare function maxConcurrentAgents(settings?: AppSettings): number;
762
808
  /** Binary name or absolute path used to spawn Claude Code. */
763
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;
764
815
  declare function claudeChromeEnabled(settings?: AppSettings): boolean;
765
816
  /**
766
817
  * Apply Sideboard-managed environment onto a process env object.
@@ -783,7 +834,7 @@ declare function resolveThreadEffort(raw: {
783
834
  fast?: unknown;
784
835
  }): ThinkingEffort;
785
836
  declare function normalizeThread(raw: Thread): Thread;
786
- declare function createEmptyThread(partial: Omit<Thread, 'id' | 'createdAt' | 'updatedAt' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'attachments'> & Partial<Pick<Thread, 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'attachments'>>): Thread;
837
+ declare function createEmptyThread(partial: Omit<Thread, 'id' | 'createdAt' | 'updatedAt' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'skipAutoArchiveOnMerge' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'attachments'> & Partial<Pick<Thread, 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'skipAutoArchiveOnMerge' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'attachments'>>): Thread;
787
838
  declare function withThreadLock<T>(id: string, fn: () => Promise<T>): Promise<T>;
788
839
  declare function readThread(id: string): Thread | null;
789
840
  declare function writeThread(thread: Thread): void;
@@ -1209,6 +1260,11 @@ interface AgentTurnInput {
1209
1260
  prompt: string;
1210
1261
  }
1211
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;
1212
1268
  /**
1213
1269
  * Flatten to a single string for CLIs that don't accept cache_control blocks
1214
1270
  * (Codex today; OpenCode `run` is plain text — OpenCode applies provider caching
@@ -1475,6 +1531,21 @@ declare function coerceOrchestratorAgent(agent: AgentKind | null | undefined, fa
1475
1531
  * once at process start (and before agent spawns) so adapters can resolve CLIs.
1476
1532
  */
1477
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;
1478
1549
 
1479
1550
  type AgentSetupKind = 'cli' | 'api-key' | 'bundled-sdk';
1480
1551
  interface AgentSetupInfo {
@@ -1502,6 +1573,14 @@ interface AgentSetupActionResult {
1502
1573
  }
1503
1574
  declare function getAgentSetupInfo(agent: AgentKind): AgentSetupInfo;
1504
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>;
1505
1584
  /**
1506
1585
  * Open an interactive shell command in the system terminal (macOS Terminal.app,
1507
1586
  * Linux gnome-terminal/x-terminal-emulator, Windows cmd).
@@ -1594,6 +1673,8 @@ declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | '
1594
1673
  * Tell agents how Sideboard renders Claude-style artifacts (side column).
1595
1674
  * Claude Code has no claude.ai `artifact` tool — fences / present_artifact instead.
1596
1675
  */
1676
+ /** Short isolation line on every worktree turn (survives CLI resume). */
1677
+ declare function formatWorktreeReminder(): string;
1597
1678
  declare function formatArtifactDirective(): string;
1598
1679
  interface AgentInstructionFile {
1599
1680
  relativePath: string;
@@ -2392,6 +2473,11 @@ declare class Orchestrator {
2392
2473
  private withPrSelector;
2393
2474
  getPrChecks(threadRef: string): Promise<PrCheckRun[] | null>;
2394
2475
  getPrMeta(threadRef: string): Promise<PrMeta | null>;
2476
+ /**
2477
+ * Persist PR URL/title/state and Conductor-style auto-archive when the PR
2478
+ * first becomes MERGED.
2479
+ */
2480
+ private persistPrMetaAndMaybeArchive;
2395
2481
  getPrStack(threadRef: string): Promise<PrStack | null>;
2396
2482
  /** Open worktrees for all (or one) stack layers discovered from a thread. */
2397
2483
  openPrStackLayers(threadRef: string, opts?: {
@@ -2713,6 +2799,11 @@ declare function cloneRepoIntoSideboard(opts: {
2713
2799
  */
2714
2800
  declare function startMcpServer(): Promise<void>;
2715
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
+
2716
2807
  interface BrightsyLocalConfig {
2717
2808
  access_token: string;
2718
2809
  refresh_token?: string;
@@ -2784,10 +2875,16 @@ interface IpcApi {
2784
2875
  updateClaudeSettings(patch: Partial<ClaudeHarnessSettings> & {
2785
2876
  executablePath?: string | null;
2786
2877
  }): Promise<AppSettings>;
2878
+ /** Persist a custom executable path for Claude / Codex / OpenCode / Brightsy. */
2879
+ updateAgentExecutable(agent: CliAgentKind, executablePath: string | null): Promise<AppSettings>;
2787
2880
  /** Native file picker for a Claude Code executable override. */
2788
2881
  pickClaudeExecutable(): Promise<string | null>;
2882
+ /** Native file picker for a CLI agent executable override. */
2883
+ pickAgentExecutable(agent: CliAgentKind): Promise<string | null>;
2789
2884
  /** Absolute path for PATH `claude`, or null if missing. */
2790
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>;
2791
2888
  /** Ensure `~/.claude/settings.json` exists and open it in the OS default app. */
2792
2889
  openClaudeUserSettings(): Promise<void>;
2793
2890
  listBrightsyChatTargets(): Promise<BrightsyChatTargets>;
@@ -3326,6 +3423,24 @@ declare const SIDEBOARD_MCP_ALLOWED_TOOLS: readonly ["mcp__sideboard", "mcp__sid
3326
3423
  declare const BRIGHTSY_MCP_ALLOWED_TOOLS: readonly ["mcp__brightsy", "mcp__brightsy__*"];
3327
3424
  /** True when ~/.brightsy/config.json has a usable login session. */
3328
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;
3329
3444
  /** Allow-tool patterns for one or more Brightsy MCP server names. */
3330
3445
  declare function brightsyMcpAllowedTools(serverNames: string[]): string[];
3331
3446
  /**
@@ -3337,4 +3452,4 @@ declare function writeInjectedMcpConfig(opts: {
3337
3452
  includeBrightsy?: boolean;
3338
3453
  }): Promise<string | null>;
3339
3454
 
3340
- 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, 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
@@ -113,6 +113,18 @@ interface Thread {
113
113
  prUrl: string | null;
114
114
  /** Cached PR title for Conductor-style sidebar labels (PR title > branch). */
115
115
  prTitle: string | null;
116
+ /**
117
+ * Cached GitHub PR lifecycle from the last `getPrMeta` / merge
118
+ * (`OPEN` | `MERGED` | `CLOSED`, etc.). Used for purple “done” sidebar
119
+ * styling and Conductor-style auto-archive-on-merge.
120
+ */
121
+ prState: string | null;
122
+ /**
123
+ * When true, skip auto-archive if the PR is already MERGED (set on restore
124
+ * so unarchiving a merged workspace does not immediately re-archive).
125
+ * Cleared when `prState` becomes a non-merged open state again.
126
+ */
127
+ skipAutoArchiveOnMerge?: boolean;
116
128
  /**
117
129
  * Stable id for a GitHub PR stack this thread belongs to (shared across layer worktrees).
118
130
  * Null when not part of a stack.
@@ -581,14 +593,27 @@ interface ClaudeHarnessSettings {
581
593
  /** When true, pass `--chrome` on Claude turns. */
582
594
  chromeEnabled?: boolean;
583
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
+ }
584
601
  /** Local agent that runs the Brightsy cloud coordinator. */
585
602
  type BrightsyCloudConnectAgent = 'claude' | 'codex' | 'opencode' | 'cursor';
586
603
  /** Brightsy cloud remote-orchestrator preferences (Slack / Discord / Teams). */
587
604
  interface BrightsyHarnessSettings {
605
+ /** Absolute path to the Brightsy CLI. Empty/omitted = `brightsy` on PATH. */
606
+ executablePath?: string;
588
607
  /** When true, desktop app polls Brightsy for Sideboard cloud tasks. */
589
608
  cloudConnectEnabled?: boolean;
590
609
  /** Local agent used for the cloud coordinator (not Brightsy itself). */
591
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;
592
617
  }
593
618
  /** Preferred issue tracker for Create-from / Link issue. */
594
619
  type IssueSource = 'linear' | 'github';
@@ -636,6 +661,11 @@ interface AdvancedAppSettings {
636
661
  * Conductor: `git.delete_branch_on_archive` (default off).
637
662
  */
638
663
  deleteBranchOnPurge?: boolean;
664
+ /**
665
+ * When a linked PR becomes MERGED, archive the worktree’s chats.
666
+ * Conductor: auto-archive on merge (opt-in; default off).
667
+ */
668
+ autoArchiveOnMerge?: boolean;
639
669
  /** Max concurrent agent turns across the orchestrator (default 3). */
640
670
  maxConcurrent?: number;
641
671
  /**
@@ -663,6 +693,10 @@ interface AppSettings {
663
693
  environment: Record<string, string>;
664
694
  /** Claude Code–specific harness settings. */
665
695
  claude: ClaudeHarnessSettings;
696
+ /** Codex CLI executable override. */
697
+ codex: CliExecutableSettings;
698
+ /** OpenCode CLI executable override. */
699
+ opencode: CliExecutableSettings;
666
700
  /** Brightsy cloud connect preferences (Slack / Discord / Teams). */
667
701
  brightsy: BrightsyHarnessSettings;
668
702
  /** GitHub / Linear connections and issue-source preference. */
@@ -683,8 +717,16 @@ declare function updateClaudeSettings(patch: {
683
717
  chromeEnabled?: boolean;
684
718
  }): AppSettings;
685
719
  declare function updateBrightsySettings(patch: {
720
+ executablePath?: string | null;
686
721
  cloudConnectEnabled?: boolean;
687
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;
688
730
  }): AppSettings;
689
731
  declare function updateIntegrationsSettings(patch: {
690
732
  linearApiKey?: string | null;
@@ -739,6 +781,8 @@ declare function getIssueSource(settings?: AppSettings): IssueSource;
739
781
  declare function resolveEffectiveIssueSource(settings?: AppSettings): IssueSource;
740
782
  declare function getLinearApiKey(settings?: AppSettings): string | null;
741
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;
742
786
  /**
743
787
  * Local agent for the Brightsy cloud coordinator.
744
788
  * Prefer Account → Default agent when it can run orchestration (Claude / Cursor /
@@ -753,6 +797,8 @@ declare function autoRunAfterSetupEnabled(settings?: AppSettings): boolean;
753
797
  declare function caffeinateWhileRunningEnabled(settings?: AppSettings): boolean;
754
798
  declare function caffeinateWhileCloudConnectEnabled(settings?: AppSettings): boolean;
755
799
  declare function deleteBranchOnPurgeEnabled(settings?: AppSettings): boolean;
800
+ /** Conductor-style opt-in — default off. */
801
+ declare function autoArchiveOnMergeEnabled(settings?: AppSettings): boolean;
756
802
  declare function autoCleanupOrphansEnabled(settings?: AppSettings): boolean;
757
803
  /** Default: switch to another agent (Auto) when orchestration hits a session limit. */
758
804
  declare function orchestrationQuotaOnLimit(settings?: AppSettings): OrchestrationQuotaOnLimit;
@@ -761,6 +807,11 @@ declare function orchestrationQuotaFallbackAgent(settings?: AppSettings): AgentK
761
807
  declare function maxConcurrentAgents(settings?: AppSettings): number;
762
808
  /** Binary name or absolute path used to spawn Claude Code. */
763
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;
764
815
  declare function claudeChromeEnabled(settings?: AppSettings): boolean;
765
816
  /**
766
817
  * Apply Sideboard-managed environment onto a process env object.
@@ -783,7 +834,7 @@ declare function resolveThreadEffort(raw: {
783
834
  fast?: unknown;
784
835
  }): ThinkingEffort;
785
836
  declare function normalizeThread(raw: Thread): Thread;
786
- declare function createEmptyThread(partial: Omit<Thread, 'id' | 'createdAt' | 'updatedAt' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'attachments'> & Partial<Pick<Thread, 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'attachments'>>): Thread;
837
+ declare function createEmptyThread(partial: Omit<Thread, 'id' | 'createdAt' | 'updatedAt' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'skipAutoArchiveOnMerge' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'attachments'> & Partial<Pick<Thread, 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'skipAutoArchiveOnMerge' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'attachments'>>): Thread;
787
838
  declare function withThreadLock<T>(id: string, fn: () => Promise<T>): Promise<T>;
788
839
  declare function readThread(id: string): Thread | null;
789
840
  declare function writeThread(thread: Thread): void;
@@ -1209,6 +1260,11 @@ interface AgentTurnInput {
1209
1260
  prompt: string;
1210
1261
  }
1211
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;
1212
1268
  /**
1213
1269
  * Flatten to a single string for CLIs that don't accept cache_control blocks
1214
1270
  * (Codex today; OpenCode `run` is plain text — OpenCode applies provider caching
@@ -1475,6 +1531,21 @@ declare function coerceOrchestratorAgent(agent: AgentKind | null | undefined, fa
1475
1531
  * once at process start (and before agent spawns) so adapters can resolve CLIs.
1476
1532
  */
1477
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;
1478
1549
 
1479
1550
  type AgentSetupKind = 'cli' | 'api-key' | 'bundled-sdk';
1480
1551
  interface AgentSetupInfo {
@@ -1502,6 +1573,14 @@ interface AgentSetupActionResult {
1502
1573
  }
1503
1574
  declare function getAgentSetupInfo(agent: AgentKind): AgentSetupInfo;
1504
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>;
1505
1584
  /**
1506
1585
  * Open an interactive shell command in the system terminal (macOS Terminal.app,
1507
1586
  * Linux gnome-terminal/x-terminal-emulator, Windows cmd).
@@ -1594,6 +1673,8 @@ declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | '
1594
1673
  * Tell agents how Sideboard renders Claude-style artifacts (side column).
1595
1674
  * Claude Code has no claude.ai `artifact` tool — fences / present_artifact instead.
1596
1675
  */
1676
+ /** Short isolation line on every worktree turn (survives CLI resume). */
1677
+ declare function formatWorktreeReminder(): string;
1597
1678
  declare function formatArtifactDirective(): string;
1598
1679
  interface AgentInstructionFile {
1599
1680
  relativePath: string;
@@ -2392,6 +2473,11 @@ declare class Orchestrator {
2392
2473
  private withPrSelector;
2393
2474
  getPrChecks(threadRef: string): Promise<PrCheckRun[] | null>;
2394
2475
  getPrMeta(threadRef: string): Promise<PrMeta | null>;
2476
+ /**
2477
+ * Persist PR URL/title/state and Conductor-style auto-archive when the PR
2478
+ * first becomes MERGED.
2479
+ */
2480
+ private persistPrMetaAndMaybeArchive;
2395
2481
  getPrStack(threadRef: string): Promise<PrStack | null>;
2396
2482
  /** Open worktrees for all (or one) stack layers discovered from a thread. */
2397
2483
  openPrStackLayers(threadRef: string, opts?: {
@@ -2713,6 +2799,11 @@ declare function cloneRepoIntoSideboard(opts: {
2713
2799
  */
2714
2800
  declare function startMcpServer(): Promise<void>;
2715
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
+
2716
2807
  interface BrightsyLocalConfig {
2717
2808
  access_token: string;
2718
2809
  refresh_token?: string;
@@ -2784,10 +2875,16 @@ interface IpcApi {
2784
2875
  updateClaudeSettings(patch: Partial<ClaudeHarnessSettings> & {
2785
2876
  executablePath?: string | null;
2786
2877
  }): Promise<AppSettings>;
2878
+ /** Persist a custom executable path for Claude / Codex / OpenCode / Brightsy. */
2879
+ updateAgentExecutable(agent: CliAgentKind, executablePath: string | null): Promise<AppSettings>;
2787
2880
  /** Native file picker for a Claude Code executable override. */
2788
2881
  pickClaudeExecutable(): Promise<string | null>;
2882
+ /** Native file picker for a CLI agent executable override. */
2883
+ pickAgentExecutable(agent: CliAgentKind): Promise<string | null>;
2789
2884
  /** Absolute path for PATH `claude`, or null if missing. */
2790
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>;
2791
2888
  /** Ensure `~/.claude/settings.json` exists and open it in the OS default app. */
2792
2889
  openClaudeUserSettings(): Promise<void>;
2793
2890
  listBrightsyChatTargets(): Promise<BrightsyChatTargets>;
@@ -3326,6 +3423,24 @@ declare const SIDEBOARD_MCP_ALLOWED_TOOLS: readonly ["mcp__sideboard", "mcp__sid
3326
3423
  declare const BRIGHTSY_MCP_ALLOWED_TOOLS: readonly ["mcp__brightsy", "mcp__brightsy__*"];
3327
3424
  /** True when ~/.brightsy/config.json has a usable login session. */
3328
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;
3329
3444
  /** Allow-tool patterns for one or more Brightsy MCP server names. */
3330
3445
  declare function brightsyMcpAllowedTools(serverNames: string[]): string[];
3331
3446
  /**
@@ -3337,4 +3452,4 @@ declare function writeInjectedMcpConfig(opts: {
3337
3452
  includeBrightsy?: boolean;
3338
3453
  }): Promise<string | null>;
3339
3454
 
3340
- 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, 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 };