@sideboard-ai/core 0.1.43 → 0.1.45

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.
package/dist/index.d.cts CHANGED
@@ -121,6 +121,16 @@ interface Thread {
121
121
  * Used so other processes (MCP) do not reclaim a live turn as dead.
122
122
  */
123
123
  agentPid?: number | null;
124
+ /**
125
+ * When set, host auto-retries this orchestration chat after a provider
126
+ * session/usage quota reset (ISO timestamp).
127
+ */
128
+ quotaResumeAt?: string | null;
129
+ /**
130
+ * Orchestration chat this one was auto-continued from after a session quota
131
+ * limit (prevents infinite agent-switch cascades).
132
+ */
133
+ quotaContinuedFromId?: string | null;
124
134
  }
125
135
  interface CreateChatTabInput {
126
136
  /** Existing thread in the worktree to clone workspace metadata from. */
@@ -140,6 +150,8 @@ interface ForkChatTabInput {
140
150
  /** Inclusive message index to fork through; default = all messages. */
141
151
  throughIndex?: number;
142
152
  agent?: AgentKind;
153
+ /** Model for the forked chat; omit to inherit or Auto when agent changes. */
154
+ model?: string | null;
143
155
  title?: string;
144
156
  }
145
157
  /** Fork a thread into a new git worktree (new branch + worktree dir). */
@@ -148,6 +160,8 @@ interface ForkThreadWorktreeInput {
148
160
  /** Inclusive message index to seed transcript through; default = all messages. */
149
161
  throughIndex?: number;
150
162
  agent?: AgentKind;
163
+ /** Model for the forked chat; omit to inherit or Auto when agent changes. */
164
+ model?: string | null;
151
165
  title?: string;
152
166
  }
153
167
  interface ThreadOptionsPatch {
@@ -365,6 +379,15 @@ type OrchestratorEvent = {
365
379
  threadId: string;
366
380
  olderCount: number;
367
381
  method: 'claude' | 'extractive';
382
+ } | {
383
+ type: 'quota_failover';
384
+ threadId: string;
385
+ action: 'switch_agent' | 'wait_reset';
386
+ message: string;
387
+ /** New orchestration chat when action is switch_agent. */
388
+ toThreadId?: string;
389
+ /** When action is wait_reset — ISO resume time. */
390
+ resumeAt?: string;
368
391
  } | {
369
392
  type: 'dev_server_started';
370
393
  threadId: string;
@@ -541,6 +564,7 @@ interface IntegrationsSettings {
541
564
  * Conductor-inspired power-user preferences (Settings → Advanced).
542
565
  * Defaults match Conductor where applicable (auto-rename on, others off).
543
566
  */
567
+ type OrchestrationQuotaOnLimit = 'switch_agent' | 'wait_reset';
544
568
  interface AdvancedAppSettings {
545
569
  /**
546
570
  * Ask the agent to rename the temporary `thread/<team>` branch on first send.
@@ -580,6 +604,14 @@ interface AdvancedAppSettings {
580
604
  worktreeLastCleanupAt?: string;
581
605
  /** When true, reconcile auto-removes excess orphan worktrees. */
582
606
  autoCleanupOrphans?: boolean;
607
+ /**
608
+ * When an orchestration chat hits a provider session/usage limit:
609
+ * - `switch_agent` (default): continue on {@link AdvancedAppSettings.orchestrationQuotaFallbackAgent} with Auto
610
+ * - `wait_reset`: schedule auto-retry when the limit message’s reset time arrives
611
+ */
612
+ orchestrationQuotaOnLimit?: OrchestrationQuotaOnLimit;
613
+ /** Agent to continue on after a session limit (default: cursor). Ignored when equal to the limited agent. */
614
+ orchestrationQuotaFallbackAgent?: AgentKind;
583
615
  }
584
616
  interface AppSettings {
585
617
  /** Environment variables injected into agent / hook processes (and process.env). */
@@ -655,6 +687,10 @@ declare function caffeinateWhileRunningEnabled(settings?: AppSettings): boolean;
655
687
  declare function caffeinateWhileCloudConnectEnabled(settings?: AppSettings): boolean;
656
688
  declare function deleteBranchOnPurgeEnabled(settings?: AppSettings): boolean;
657
689
  declare function autoCleanupOrphansEnabled(settings?: AppSettings): boolean;
690
+ /** Default: switch to another agent (Auto) when orchestration hits a session limit. */
691
+ declare function orchestrationQuotaOnLimit(settings?: AppSettings): OrchestrationQuotaOnLimit;
692
+ /** Default fallback agent for orchestration session-limit continue (cursor). */
693
+ declare function orchestrationQuotaFallbackAgent(settings?: AppSettings): AgentKind;
658
694
  declare function maxConcurrentAgents(settings?: AppSettings): number;
659
695
  /** Binary name or absolute path used to spawn Claude Code. */
660
696
  declare function resolveClaudeExecutable(settings?: AppSettings): string;
@@ -1250,6 +1286,28 @@ declare const cursorAdapter: AgentAdapter;
1250
1286
  declare function listOpencodeModels(): Promise<AgentModelInfo[]>;
1251
1287
  declare const opencodeAdapter: AgentAdapter;
1252
1288
 
1289
+ /** Claude Code aliases used by Sideboard (null = Auto / CLI default). */
1290
+ declare const CLAUDE_MODEL_CATALOG: AgentModelInfo[];
1291
+ type AgentModelCatalog = {
1292
+ agent: AgentKind;
1293
+ /** Omit / null model = Auto (provider default). Cursor uses id `default`. */
1294
+ auto: true;
1295
+ models: AgentModelInfo[];
1296
+ note?: string;
1297
+ };
1298
+ /** Models available for one agent (or all when agent omitted). */
1299
+ declare function listModelsForAgent(agent?: AgentKind): Promise<AgentModelCatalog[]>;
1300
+
1301
+ /**
1302
+ * Provider session/usage quota (Claude “session limit”, weekly/opus caps, etc.).
1303
+ * Not context-window overflow and not billing/credits.
1304
+ */
1305
+ declare function isSessionQuotaLimit(text: string): boolean;
1306
+ /** Best-effort parse of “resets 7:10pm (America/Los_Angeles)” / “resets in 2 hours”. */
1307
+ declare function parseSessionQuotaResetAt(text: string, now?: Date): Date | null;
1308
+ /** Pick a different agent for quota failover (preferred first, then stable order). */
1309
+ declare function resolveQuotaFallbackAgent(current: AgentKind, preferred?: AgentKind | null): AgentKind;
1310
+
1253
1311
  /**
1254
1312
  * Electron / GUI apps often inherit a minimal PATH that omits Homebrew and
1255
1313
  * user bin dirs where `claude` / `codex` / `opencode` / `brightsy` live. Call
@@ -1822,7 +1880,9 @@ declare function forkMessageSlice(from: Thread, throughIndex?: number): ThreadMe
1822
1880
  declare function buildForkTranscriptAttachment(baseTitle: string, messages: ThreadMessage[]): ThreadAttachment;
1823
1881
  /** New chat tab in the same worktree (no new git worktree). */
1824
1882
  declare function createChatTab(input: CreateChatTabInput): Thread;
1825
- /** Fork chat into a new tab with transcript attached in the composer. */
1883
+ /** Fork chat into a new tab with transcript attached in the composer.
1884
+ * Works for worktree agents and Global orchestration chats (same global home).
1885
+ */
1826
1886
  declare function forkChatTab(input: ForkChatTabInput): Thread;
1827
1887
 
1828
1888
  /** Fork into a new git worktree branched from the source thread's branch. */
@@ -1901,6 +1961,8 @@ declare class Orchestrator {
1901
1961
  private readonly haltDrain;
1902
1962
  /** WIP snapshot SHA at the start of the latest agent turn (per thread). */
1903
1963
  private readonly turnBaselines;
1964
+ /** Timers for orchestration session-quota auto-resume. */
1965
+ private readonly quotaResumeTimers;
1904
1966
  private maxConcurrent;
1905
1967
  private runningCount;
1906
1968
  constructor(opts?: {
@@ -1924,6 +1986,16 @@ declare class Orchestrator {
1924
1986
  */
1925
1987
  reclaimStaleTurns?: boolean;
1926
1988
  }): Promise<void>;
1989
+ private clearQuotaResumeTimer;
1990
+ /** Schedule (or fire) auto-retry after a provider session/usage limit reset. */
1991
+ private scheduleQuotaResume;
1992
+ private schedulePendingQuotaResumes;
1993
+ private resumeAfterQuotaWait;
1994
+ /**
1995
+ * Host-side continue when an orchestration chat hits a provider session/usage
1996
+ * limit (not context size): switch agent (Auto) or wait until reset.
1997
+ */
1998
+ private maybeHandleOrchestrationQuotaFailover;
1927
1999
  getThreads(includeArchived?: boolean): Thread[];
1928
2000
  getThread(idOrRef: string): Thread | null;
1929
2001
  createThread(input: CreateThreadInput): Promise<Thread>;
@@ -2056,6 +2128,11 @@ declare class Orchestrator {
2056
2128
  getPrMeta(threadRef: string): Promise<PrMeta | null>;
2057
2129
  getPrDetails(threadRef: string): Promise<PrDetails | null>;
2058
2130
  setAutonomy(threadRef: string, autonomy: Autonomy): Thread;
2131
+ /**
2132
+ * Open a Review chat tab on a worktree thread (same as the desktop Review button)
2133
+ * and send the merge-readiness prefill.
2134
+ */
2135
+ requestReview(threadRef: string): Promise<Thread>;
2059
2136
  setThreadOptions(threadRef: string, patch: ThreadOptionsPatch): Thread;
2060
2137
  createChatTab(input: {
2061
2138
  fromThreadId: string;
@@ -2071,12 +2148,14 @@ declare class Orchestrator {
2071
2148
  threadId: string;
2072
2149
  throughIndex?: number;
2073
2150
  agent?: Thread['agent'];
2151
+ model?: string | null;
2074
2152
  title?: string;
2075
2153
  }): Thread;
2076
2154
  forkThreadWorktree(input: {
2077
2155
  threadId: string;
2078
2156
  throughIndex?: number;
2079
2157
  agent?: Thread['agent'];
2158
+ model?: string | null;
2080
2159
  title?: string;
2081
2160
  }): Promise<Thread>;
2082
2161
  renameThread(threadRef: string, title: string): Thread;
@@ -2115,6 +2194,30 @@ declare function startOrchestration(opts: {
2115
2194
  attachments?: Thread['attachments'];
2116
2195
  }): Promise<Thread>;
2117
2196
 
2197
+ /** Worktree-relative path for the editable review prompt (Conductor-style). */
2198
+ declare const REVIEW_REQUEST_PATH = ".sideboard/attachments/Review request.md";
2199
+ declare const REVIEW_REQUEST_NAME = "Review request.md";
2200
+ declare const REVIEW_REQUEST_PREFILL = "Please review the changes in this workspace and recommend whether they are ready to merge.\n\nStart with a **Recommendation**: Approve, Approve with nits, Request changes, or Needs more information \u2014 and say why in 1\u20133 sentences. Then list blocking findings vs nits (findings may be empty).";
2201
+ declare function buildReviewRequestAttachment(content: string): ThreadAttachment;
2202
+ /**
2203
+ * Read an existing custom Review request.md from the worktree if present.
2204
+ * Does not create the file (matches desktop Review button behavior).
2205
+ */
2206
+ declare function readExistingReviewRequestFile(worktreePath: string): string | null;
2207
+ interface RequestReviewResult {
2208
+ /** New Review chat tab. */
2209
+ tab: Thread;
2210
+ /** Worktree thread that was reviewed (source of the tab). */
2211
+ from: Thread;
2212
+ }
2213
+ type SendFn = (threadRef: string, prompt: string) => Promise<Thread>;
2214
+ /**
2215
+ * Mirror the desktop sidebar Review action: open a fresh "Review" chat tab on
2216
+ * the same worktree and send the merge-readiness prefill (attach custom
2217
+ * guidelines file when present).
2218
+ */
2219
+ declare function requestReview(threadRef: string, send: SendFn): Promise<RequestReviewResult>;
2220
+
2118
2221
  type WorkspaceInventoryEntry = Workspace & {
2119
2222
  /** Best-effort GitHub `owner/repo` from remote / gh. */
2120
2223
  githubSlug?: string | null;
@@ -2346,6 +2449,8 @@ interface IpcApi {
2346
2449
  sendQueuedMessageNow(threadRef: string, index: number): Promise<Thread>;
2347
2450
  setAutonomy(threadRef: string, autonomy: Autonomy): Promise<Thread>;
2348
2451
  setThreadOptions(threadRef: string, patch: ThreadOptionsPatch): Promise<Thread>;
2452
+ /** Open a Review chat tab on a worktree thread (merge-readiness). */
2453
+ requestReview(threadRef: string): Promise<Thread>;
2349
2454
  fanOut(threadRefs: string[], prompt: string): Promise<Thread[]>;
2350
2455
  startOrchestration(opts: {
2351
2456
  goal: string;
@@ -2746,4 +2851,4 @@ declare function writeInjectedMcpConfig(opts: {
2746
2851
  includeBrightsy?: boolean;
2747
2852
  }): Promise<string | null>;
2748
2853
 
2749
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, 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, 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 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 GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, 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 TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, 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, writeThread, writeWorktreeFile };
2854
+ export { type ActiveRun, 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 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 GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, 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 TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isThinkingEffort, 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, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, 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, writeThread, writeWorktreeFile };
package/dist/index.d.ts CHANGED
@@ -121,6 +121,16 @@ interface Thread {
121
121
  * Used so other processes (MCP) do not reclaim a live turn as dead.
122
122
  */
123
123
  agentPid?: number | null;
124
+ /**
125
+ * When set, host auto-retries this orchestration chat after a provider
126
+ * session/usage quota reset (ISO timestamp).
127
+ */
128
+ quotaResumeAt?: string | null;
129
+ /**
130
+ * Orchestration chat this one was auto-continued from after a session quota
131
+ * limit (prevents infinite agent-switch cascades).
132
+ */
133
+ quotaContinuedFromId?: string | null;
124
134
  }
125
135
  interface CreateChatTabInput {
126
136
  /** Existing thread in the worktree to clone workspace metadata from. */
@@ -140,6 +150,8 @@ interface ForkChatTabInput {
140
150
  /** Inclusive message index to fork through; default = all messages. */
141
151
  throughIndex?: number;
142
152
  agent?: AgentKind;
153
+ /** Model for the forked chat; omit to inherit or Auto when agent changes. */
154
+ model?: string | null;
143
155
  title?: string;
144
156
  }
145
157
  /** Fork a thread into a new git worktree (new branch + worktree dir). */
@@ -148,6 +160,8 @@ interface ForkThreadWorktreeInput {
148
160
  /** Inclusive message index to seed transcript through; default = all messages. */
149
161
  throughIndex?: number;
150
162
  agent?: AgentKind;
163
+ /** Model for the forked chat; omit to inherit or Auto when agent changes. */
164
+ model?: string | null;
151
165
  title?: string;
152
166
  }
153
167
  interface ThreadOptionsPatch {
@@ -365,6 +379,15 @@ type OrchestratorEvent = {
365
379
  threadId: string;
366
380
  olderCount: number;
367
381
  method: 'claude' | 'extractive';
382
+ } | {
383
+ type: 'quota_failover';
384
+ threadId: string;
385
+ action: 'switch_agent' | 'wait_reset';
386
+ message: string;
387
+ /** New orchestration chat when action is switch_agent. */
388
+ toThreadId?: string;
389
+ /** When action is wait_reset — ISO resume time. */
390
+ resumeAt?: string;
368
391
  } | {
369
392
  type: 'dev_server_started';
370
393
  threadId: string;
@@ -541,6 +564,7 @@ interface IntegrationsSettings {
541
564
  * Conductor-inspired power-user preferences (Settings → Advanced).
542
565
  * Defaults match Conductor where applicable (auto-rename on, others off).
543
566
  */
567
+ type OrchestrationQuotaOnLimit = 'switch_agent' | 'wait_reset';
544
568
  interface AdvancedAppSettings {
545
569
  /**
546
570
  * Ask the agent to rename the temporary `thread/<team>` branch on first send.
@@ -580,6 +604,14 @@ interface AdvancedAppSettings {
580
604
  worktreeLastCleanupAt?: string;
581
605
  /** When true, reconcile auto-removes excess orphan worktrees. */
582
606
  autoCleanupOrphans?: boolean;
607
+ /**
608
+ * When an orchestration chat hits a provider session/usage limit:
609
+ * - `switch_agent` (default): continue on {@link AdvancedAppSettings.orchestrationQuotaFallbackAgent} with Auto
610
+ * - `wait_reset`: schedule auto-retry when the limit message’s reset time arrives
611
+ */
612
+ orchestrationQuotaOnLimit?: OrchestrationQuotaOnLimit;
613
+ /** Agent to continue on after a session limit (default: cursor). Ignored when equal to the limited agent. */
614
+ orchestrationQuotaFallbackAgent?: AgentKind;
583
615
  }
584
616
  interface AppSettings {
585
617
  /** Environment variables injected into agent / hook processes (and process.env). */
@@ -655,6 +687,10 @@ declare function caffeinateWhileRunningEnabled(settings?: AppSettings): boolean;
655
687
  declare function caffeinateWhileCloudConnectEnabled(settings?: AppSettings): boolean;
656
688
  declare function deleteBranchOnPurgeEnabled(settings?: AppSettings): boolean;
657
689
  declare function autoCleanupOrphansEnabled(settings?: AppSettings): boolean;
690
+ /** Default: switch to another agent (Auto) when orchestration hits a session limit. */
691
+ declare function orchestrationQuotaOnLimit(settings?: AppSettings): OrchestrationQuotaOnLimit;
692
+ /** Default fallback agent for orchestration session-limit continue (cursor). */
693
+ declare function orchestrationQuotaFallbackAgent(settings?: AppSettings): AgentKind;
658
694
  declare function maxConcurrentAgents(settings?: AppSettings): number;
659
695
  /** Binary name or absolute path used to spawn Claude Code. */
660
696
  declare function resolveClaudeExecutable(settings?: AppSettings): string;
@@ -1250,6 +1286,28 @@ declare const cursorAdapter: AgentAdapter;
1250
1286
  declare function listOpencodeModels(): Promise<AgentModelInfo[]>;
1251
1287
  declare const opencodeAdapter: AgentAdapter;
1252
1288
 
1289
+ /** Claude Code aliases used by Sideboard (null = Auto / CLI default). */
1290
+ declare const CLAUDE_MODEL_CATALOG: AgentModelInfo[];
1291
+ type AgentModelCatalog = {
1292
+ agent: AgentKind;
1293
+ /** Omit / null model = Auto (provider default). Cursor uses id `default`. */
1294
+ auto: true;
1295
+ models: AgentModelInfo[];
1296
+ note?: string;
1297
+ };
1298
+ /** Models available for one agent (or all when agent omitted). */
1299
+ declare function listModelsForAgent(agent?: AgentKind): Promise<AgentModelCatalog[]>;
1300
+
1301
+ /**
1302
+ * Provider session/usage quota (Claude “session limit”, weekly/opus caps, etc.).
1303
+ * Not context-window overflow and not billing/credits.
1304
+ */
1305
+ declare function isSessionQuotaLimit(text: string): boolean;
1306
+ /** Best-effort parse of “resets 7:10pm (America/Los_Angeles)” / “resets in 2 hours”. */
1307
+ declare function parseSessionQuotaResetAt(text: string, now?: Date): Date | null;
1308
+ /** Pick a different agent for quota failover (preferred first, then stable order). */
1309
+ declare function resolveQuotaFallbackAgent(current: AgentKind, preferred?: AgentKind | null): AgentKind;
1310
+
1253
1311
  /**
1254
1312
  * Electron / GUI apps often inherit a minimal PATH that omits Homebrew and
1255
1313
  * user bin dirs where `claude` / `codex` / `opencode` / `brightsy` live. Call
@@ -1822,7 +1880,9 @@ declare function forkMessageSlice(from: Thread, throughIndex?: number): ThreadMe
1822
1880
  declare function buildForkTranscriptAttachment(baseTitle: string, messages: ThreadMessage[]): ThreadAttachment;
1823
1881
  /** New chat tab in the same worktree (no new git worktree). */
1824
1882
  declare function createChatTab(input: CreateChatTabInput): Thread;
1825
- /** Fork chat into a new tab with transcript attached in the composer. */
1883
+ /** Fork chat into a new tab with transcript attached in the composer.
1884
+ * Works for worktree agents and Global orchestration chats (same global home).
1885
+ */
1826
1886
  declare function forkChatTab(input: ForkChatTabInput): Thread;
1827
1887
 
1828
1888
  /** Fork into a new git worktree branched from the source thread's branch. */
@@ -1901,6 +1961,8 @@ declare class Orchestrator {
1901
1961
  private readonly haltDrain;
1902
1962
  /** WIP snapshot SHA at the start of the latest agent turn (per thread). */
1903
1963
  private readonly turnBaselines;
1964
+ /** Timers for orchestration session-quota auto-resume. */
1965
+ private readonly quotaResumeTimers;
1904
1966
  private maxConcurrent;
1905
1967
  private runningCount;
1906
1968
  constructor(opts?: {
@@ -1924,6 +1986,16 @@ declare class Orchestrator {
1924
1986
  */
1925
1987
  reclaimStaleTurns?: boolean;
1926
1988
  }): Promise<void>;
1989
+ private clearQuotaResumeTimer;
1990
+ /** Schedule (or fire) auto-retry after a provider session/usage limit reset. */
1991
+ private scheduleQuotaResume;
1992
+ private schedulePendingQuotaResumes;
1993
+ private resumeAfterQuotaWait;
1994
+ /**
1995
+ * Host-side continue when an orchestration chat hits a provider session/usage
1996
+ * limit (not context size): switch agent (Auto) or wait until reset.
1997
+ */
1998
+ private maybeHandleOrchestrationQuotaFailover;
1927
1999
  getThreads(includeArchived?: boolean): Thread[];
1928
2000
  getThread(idOrRef: string): Thread | null;
1929
2001
  createThread(input: CreateThreadInput): Promise<Thread>;
@@ -2056,6 +2128,11 @@ declare class Orchestrator {
2056
2128
  getPrMeta(threadRef: string): Promise<PrMeta | null>;
2057
2129
  getPrDetails(threadRef: string): Promise<PrDetails | null>;
2058
2130
  setAutonomy(threadRef: string, autonomy: Autonomy): Thread;
2131
+ /**
2132
+ * Open a Review chat tab on a worktree thread (same as the desktop Review button)
2133
+ * and send the merge-readiness prefill.
2134
+ */
2135
+ requestReview(threadRef: string): Promise<Thread>;
2059
2136
  setThreadOptions(threadRef: string, patch: ThreadOptionsPatch): Thread;
2060
2137
  createChatTab(input: {
2061
2138
  fromThreadId: string;
@@ -2071,12 +2148,14 @@ declare class Orchestrator {
2071
2148
  threadId: string;
2072
2149
  throughIndex?: number;
2073
2150
  agent?: Thread['agent'];
2151
+ model?: string | null;
2074
2152
  title?: string;
2075
2153
  }): Thread;
2076
2154
  forkThreadWorktree(input: {
2077
2155
  threadId: string;
2078
2156
  throughIndex?: number;
2079
2157
  agent?: Thread['agent'];
2158
+ model?: string | null;
2080
2159
  title?: string;
2081
2160
  }): Promise<Thread>;
2082
2161
  renameThread(threadRef: string, title: string): Thread;
@@ -2115,6 +2194,30 @@ declare function startOrchestration(opts: {
2115
2194
  attachments?: Thread['attachments'];
2116
2195
  }): Promise<Thread>;
2117
2196
 
2197
+ /** Worktree-relative path for the editable review prompt (Conductor-style). */
2198
+ declare const REVIEW_REQUEST_PATH = ".sideboard/attachments/Review request.md";
2199
+ declare const REVIEW_REQUEST_NAME = "Review request.md";
2200
+ declare const REVIEW_REQUEST_PREFILL = "Please review the changes in this workspace and recommend whether they are ready to merge.\n\nStart with a **Recommendation**: Approve, Approve with nits, Request changes, or Needs more information \u2014 and say why in 1\u20133 sentences. Then list blocking findings vs nits (findings may be empty).";
2201
+ declare function buildReviewRequestAttachment(content: string): ThreadAttachment;
2202
+ /**
2203
+ * Read an existing custom Review request.md from the worktree if present.
2204
+ * Does not create the file (matches desktop Review button behavior).
2205
+ */
2206
+ declare function readExistingReviewRequestFile(worktreePath: string): string | null;
2207
+ interface RequestReviewResult {
2208
+ /** New Review chat tab. */
2209
+ tab: Thread;
2210
+ /** Worktree thread that was reviewed (source of the tab). */
2211
+ from: Thread;
2212
+ }
2213
+ type SendFn = (threadRef: string, prompt: string) => Promise<Thread>;
2214
+ /**
2215
+ * Mirror the desktop sidebar Review action: open a fresh "Review" chat tab on
2216
+ * the same worktree and send the merge-readiness prefill (attach custom
2217
+ * guidelines file when present).
2218
+ */
2219
+ declare function requestReview(threadRef: string, send: SendFn): Promise<RequestReviewResult>;
2220
+
2118
2221
  type WorkspaceInventoryEntry = Workspace & {
2119
2222
  /** Best-effort GitHub `owner/repo` from remote / gh. */
2120
2223
  githubSlug?: string | null;
@@ -2346,6 +2449,8 @@ interface IpcApi {
2346
2449
  sendQueuedMessageNow(threadRef: string, index: number): Promise<Thread>;
2347
2450
  setAutonomy(threadRef: string, autonomy: Autonomy): Promise<Thread>;
2348
2451
  setThreadOptions(threadRef: string, patch: ThreadOptionsPatch): Promise<Thread>;
2452
+ /** Open a Review chat tab on a worktree thread (merge-readiness). */
2453
+ requestReview(threadRef: string): Promise<Thread>;
2349
2454
  fanOut(threadRefs: string[], prompt: string): Promise<Thread[]>;
2350
2455
  startOrchestration(opts: {
2351
2456
  goal: string;
@@ -2746,4 +2851,4 @@ declare function writeInjectedMcpConfig(opts: {
2746
2851
  includeBrightsy?: boolean;
2747
2852
  }): Promise<string | null>;
2748
2853
 
2749
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, 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, 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 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 GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, 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 TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, 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, writeThread, writeWorktreeFile };
2854
+ export { type ActiveRun, 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 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 GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, 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 TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isThinkingEffort, 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, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, 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, writeThread, writeWorktreeFile };