@sideboard-ai/core 0.1.53 → 0.1.57
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/agents/cursor-runner.cjs +83 -7
- package/dist/agents/cursor-runner.js +1 -1
- package/dist/{agents-KYACODJ3.js → agents-2YYWW723.js} +3 -3
- package/dist/{agents-KP7UJEHJ.js → agents-AQFEFKBL.js} +2 -2
- package/dist/{app-settings-LZP632KI.js → app-settings-2LQNRTBE.js} +3 -1
- package/dist/{app-settings-7XVDQJ7F.js → app-settings-73DI4B6T.js} +3 -1
- package/dist/{chunk-VG22SETP.js → chunk-3WJAUKIL.js} +83 -7
- package/dist/{chunk-GNML24AW.js → chunk-5DMYULLC.js} +1 -1
- package/dist/{chunk-A6HVEMIB.js → chunk-7F454EE2.js} +86 -11
- package/dist/{chunk-BZST4HMJ.js → chunk-C3J4GDW4.js} +172 -21
- package/dist/{chunk-HBJSHRY2.js → chunk-C4BCC5X5.js} +17 -1
- package/dist/{chunk-T5QQVXK3.js → chunk-DIOF73S2.js} +17 -1
- package/dist/{chunk-UEAHMGHW.js → chunk-DQJ5D42H.js} +16 -2
- package/dist/{chunk-YOWIYAVA.js → chunk-EBWEKG52.js} +36 -11
- package/dist/{chunk-XX5BB7NV.js → chunk-S42XDFKF.js} +36 -11
- package/dist/{chunk-LRLKJM3O.js → chunk-UA5NDAHL.js} +16 -2
- package/dist/{chunk-YDXQ72MD.js → chunk-V2DUTUNC.js} +1 -1
- package/dist/{coordinator-prompt-S6JZD5EF.js → coordinator-prompt-ICF36NUQ.js} +2 -1
- package/dist/{coordinator-prompt-6FXVTSFN.js → coordinator-prompt-RBKUNRPR.js} +2 -1
- package/dist/{global-workspace-EV4G2WMQ.js → global-workspace-667XLBW6.js} +3 -2
- package/dist/{global-workspace-MSX2K27Y.js → global-workspace-S7VLWPWG.js} +3 -2
- package/dist/index.cjs +338 -55
- package/dist/index.d.cts +36 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.js +121 -40
- package/dist/mcp/run-stdio.cjs +332 -51
- package/dist/mcp/run-stdio.js +121 -41
- package/dist/{workspaces-AYTBR6KQ.js → workspaces-FPJJXXAE.js} +4 -3
- package/dist/{workspaces-3RQQZQRO.js → workspaces-LYIDE2VR.js} +4 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -712,6 +712,22 @@ declare function resolveThreadDefaults(settings?: AppSettings): {
|
|
|
712
712
|
effort: ThinkingEffort;
|
|
713
713
|
fast: boolean;
|
|
714
714
|
};
|
|
715
|
+
/**
|
|
716
|
+
* Resolve agent/model/effort/fast for a newly created thread.
|
|
717
|
+
* Omitted fields use Account defaults (Settings → Account).
|
|
718
|
+
* Pass `model: null` explicitly to force Auto / agent-default.
|
|
719
|
+
*/
|
|
720
|
+
declare function resolveNewThreadOptions(overrides?: {
|
|
721
|
+
agent?: AgentKind | null;
|
|
722
|
+
model?: string | null;
|
|
723
|
+
effort?: ThinkingEffort | 'normal' | null;
|
|
724
|
+
fast?: boolean | null;
|
|
725
|
+
}, settings?: AppSettings): {
|
|
726
|
+
agent: AgentKind;
|
|
727
|
+
model: string | null;
|
|
728
|
+
effort: ThinkingEffort;
|
|
729
|
+
fast: boolean;
|
|
730
|
+
};
|
|
715
731
|
/** True when Sideboard has a Linear API key stored. */
|
|
716
732
|
declare function isLinearConnected(settings?: AppSettings): boolean;
|
|
717
733
|
/** Preferred issue source (default GitHub). */
|
|
@@ -723,6 +739,12 @@ declare function getIssueSource(settings?: AppSettings): IssueSource;
|
|
|
723
739
|
declare function resolveEffectiveIssueSource(settings?: AppSettings): IssueSource;
|
|
724
740
|
declare function getLinearApiKey(settings?: AppSettings): string | null;
|
|
725
741
|
declare function brightsyCloudConnectEnabled(settings?: AppSettings): boolean;
|
|
742
|
+
/**
|
|
743
|
+
* Local agent for the Brightsy cloud coordinator.
|
|
744
|
+
* Prefer Account → Default agent when it can run orchestration (Claude / Cursor /
|
|
745
|
+
* Codex / OpenCode). `cloudConnectAgent` is only a fallback when the account
|
|
746
|
+
* default cannot orchestrate (e.g. Brightsy).
|
|
747
|
+
*/
|
|
726
748
|
declare function brightsyCloudConnectAgent(settings?: AppSettings): BrightsyCloudConnectAgent;
|
|
727
749
|
declare function updateAdvancedSettings(patch: Partial<AdvancedAppSettings>): AppSettings;
|
|
728
750
|
/** Conductor default: on. */
|
|
@@ -784,7 +806,7 @@ declare function addWorkspace(repoPath: string): Promise<Workspace>;
|
|
|
784
806
|
declare function removeWorkspace(repoPath: string): void;
|
|
785
807
|
/** Ensure a repo path is registered (e.g. after creating a thread). */
|
|
786
808
|
declare function ensureWorkspace(repoPath: string): Promise<Workspace>;
|
|
787
|
-
/** Merge in repo paths discovered from existing threads. */
|
|
809
|
+
/** Merge in repo paths discovered from existing threads (including archived). */
|
|
788
810
|
declare function syncWorkspacesFromThreads(repoPaths: string[]): Workspace[];
|
|
789
811
|
|
|
790
812
|
/** Sentinel repoPath for the home-less global orchestration workspace. */
|
|
@@ -2209,7 +2231,19 @@ declare class Orchestrator {
|
|
|
2209
2231
|
* real app/CLI startup recovery.
|
|
2210
2232
|
*/
|
|
2211
2233
|
reclaimStaleTurns?: boolean;
|
|
2234
|
+
/**
|
|
2235
|
+
* When false, skip draining persisted queues. MCP stdio boots must not
|
|
2236
|
+
* steal the whole fleet into a short-lived process (desktop adopts instead).
|
|
2237
|
+
* Default true for desktop/CLI.
|
|
2238
|
+
*/
|
|
2239
|
+
drainQueues?: boolean;
|
|
2212
2240
|
}): Promise<void>;
|
|
2241
|
+
/**
|
|
2242
|
+
* Adopt queues persisted by another process (MCP stdio / CLI) into this
|
|
2243
|
+
* orchestrator's drain loops. Desktop calls this on thread-store changes so
|
|
2244
|
+
* MCP-created review threads don't stay `queued` after the MCP child exits.
|
|
2245
|
+
*/
|
|
2246
|
+
adoptPersistedQueues(): void;
|
|
2213
2247
|
private clearQuotaResumeTimer;
|
|
2214
2248
|
/** Schedule (or fire) auto-retry after a provider session/usage limit reset. */
|
|
2215
2249
|
private scheduleQuotaResume;
|
|
@@ -3294,4 +3328,4 @@ declare function writeInjectedMcpConfig(opts: {
|
|
|
3294
3328
|
includeBrightsy?: boolean;
|
|
3295
3329
|
}): Promise<string | null>;
|
|
3296
3330
|
|
|
3297
|
-
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, 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 };
|
|
3331
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -712,6 +712,22 @@ declare function resolveThreadDefaults(settings?: AppSettings): {
|
|
|
712
712
|
effort: ThinkingEffort;
|
|
713
713
|
fast: boolean;
|
|
714
714
|
};
|
|
715
|
+
/**
|
|
716
|
+
* Resolve agent/model/effort/fast for a newly created thread.
|
|
717
|
+
* Omitted fields use Account defaults (Settings → Account).
|
|
718
|
+
* Pass `model: null` explicitly to force Auto / agent-default.
|
|
719
|
+
*/
|
|
720
|
+
declare function resolveNewThreadOptions(overrides?: {
|
|
721
|
+
agent?: AgentKind | null;
|
|
722
|
+
model?: string | null;
|
|
723
|
+
effort?: ThinkingEffort | 'normal' | null;
|
|
724
|
+
fast?: boolean | null;
|
|
725
|
+
}, settings?: AppSettings): {
|
|
726
|
+
agent: AgentKind;
|
|
727
|
+
model: string | null;
|
|
728
|
+
effort: ThinkingEffort;
|
|
729
|
+
fast: boolean;
|
|
730
|
+
};
|
|
715
731
|
/** True when Sideboard has a Linear API key stored. */
|
|
716
732
|
declare function isLinearConnected(settings?: AppSettings): boolean;
|
|
717
733
|
/** Preferred issue source (default GitHub). */
|
|
@@ -723,6 +739,12 @@ declare function getIssueSource(settings?: AppSettings): IssueSource;
|
|
|
723
739
|
declare function resolveEffectiveIssueSource(settings?: AppSettings): IssueSource;
|
|
724
740
|
declare function getLinearApiKey(settings?: AppSettings): string | null;
|
|
725
741
|
declare function brightsyCloudConnectEnabled(settings?: AppSettings): boolean;
|
|
742
|
+
/**
|
|
743
|
+
* Local agent for the Brightsy cloud coordinator.
|
|
744
|
+
* Prefer Account → Default agent when it can run orchestration (Claude / Cursor /
|
|
745
|
+
* Codex / OpenCode). `cloudConnectAgent` is only a fallback when the account
|
|
746
|
+
* default cannot orchestrate (e.g. Brightsy).
|
|
747
|
+
*/
|
|
726
748
|
declare function brightsyCloudConnectAgent(settings?: AppSettings): BrightsyCloudConnectAgent;
|
|
727
749
|
declare function updateAdvancedSettings(patch: Partial<AdvancedAppSettings>): AppSettings;
|
|
728
750
|
/** Conductor default: on. */
|
|
@@ -784,7 +806,7 @@ declare function addWorkspace(repoPath: string): Promise<Workspace>;
|
|
|
784
806
|
declare function removeWorkspace(repoPath: string): void;
|
|
785
807
|
/** Ensure a repo path is registered (e.g. after creating a thread). */
|
|
786
808
|
declare function ensureWorkspace(repoPath: string): Promise<Workspace>;
|
|
787
|
-
/** Merge in repo paths discovered from existing threads. */
|
|
809
|
+
/** Merge in repo paths discovered from existing threads (including archived). */
|
|
788
810
|
declare function syncWorkspacesFromThreads(repoPaths: string[]): Workspace[];
|
|
789
811
|
|
|
790
812
|
/** Sentinel repoPath for the home-less global orchestration workspace. */
|
|
@@ -2209,7 +2231,19 @@ declare class Orchestrator {
|
|
|
2209
2231
|
* real app/CLI startup recovery.
|
|
2210
2232
|
*/
|
|
2211
2233
|
reclaimStaleTurns?: boolean;
|
|
2234
|
+
/**
|
|
2235
|
+
* When false, skip draining persisted queues. MCP stdio boots must not
|
|
2236
|
+
* steal the whole fleet into a short-lived process (desktop adopts instead).
|
|
2237
|
+
* Default true for desktop/CLI.
|
|
2238
|
+
*/
|
|
2239
|
+
drainQueues?: boolean;
|
|
2212
2240
|
}): Promise<void>;
|
|
2241
|
+
/**
|
|
2242
|
+
* Adopt queues persisted by another process (MCP stdio / CLI) into this
|
|
2243
|
+
* orchestrator's drain loops. Desktop calls this on thread-store changes so
|
|
2244
|
+
* MCP-created review threads don't stay `queued` after the MCP child exits.
|
|
2245
|
+
*/
|
|
2246
|
+
adoptPersistedQueues(): void;
|
|
2213
2247
|
private clearQuotaResumeTimer;
|
|
2214
2248
|
/** Schedule (or fire) auto-retry after a provider session/usage limit reset. */
|
|
2215
2249
|
private scheduleQuotaResume;
|
|
@@ -3294,4 +3328,4 @@ declare function writeInjectedMcpConfig(opts: {
|
|
|
3294
3328
|
includeBrightsy?: boolean;
|
|
3295
3329
|
}): Promise<string | null>;
|
|
3296
3330
|
|
|
3297
|
-
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, 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 };
|
|
3331
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
listWorkspaces,
|
|
5
5
|
removeWorkspace,
|
|
6
6
|
syncWorkspacesFromThreads
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5DMYULLC.js";
|
|
8
8
|
import {
|
|
9
9
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
10
10
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
orchestratorSessionPoisonedByBuiltins,
|
|
25
25
|
parseForceStopMessage,
|
|
26
26
|
takenTeamSlugsForOrchestration
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-S42XDFKF.js";
|
|
28
28
|
import {
|
|
29
29
|
BRIGHTSY_MCP_ALLOWED_TOOLS,
|
|
30
30
|
CLAUDE_MODEL_CATALOG,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
resolveQuotaFallbackAgent,
|
|
71
71
|
sanitizeMcpServerName,
|
|
72
72
|
writeInjectedMcpConfig
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-7F454EE2.js";
|
|
74
74
|
import {
|
|
75
75
|
ORCHESTRATOR_AGENT_KINDS,
|
|
76
76
|
assertOrchestratorCapableAgent,
|
|
@@ -110,7 +110,15 @@ import {
|
|
|
110
110
|
parseCursorRunnerLine,
|
|
111
111
|
pushTurnStderr,
|
|
112
112
|
summarizeTurnStderr
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-3WJAUKIL.js";
|
|
114
|
+
import {
|
|
115
|
+
COORDINATOR_TOOL_PLAYBOOK,
|
|
116
|
+
coordinatorSystemPrompt,
|
|
117
|
+
coordinatorTurnReminder,
|
|
118
|
+
enrichWorkspacesWithGithub,
|
|
119
|
+
ensureGlobalCoordinatorCwd,
|
|
120
|
+
formatWorkspaceInventory
|
|
121
|
+
} from "./chunk-UA5NDAHL.js";
|
|
114
122
|
import {
|
|
115
123
|
HARNESS_ENV_KEYS,
|
|
116
124
|
appSettingsPath,
|
|
@@ -140,6 +148,7 @@ import {
|
|
|
140
148
|
orchestrationQuotaOnLimit,
|
|
141
149
|
resolveClaudeExecutable,
|
|
142
150
|
resolveEffectiveIssueSource,
|
|
151
|
+
resolveNewThreadOptions,
|
|
143
152
|
resolveThreadDefaults,
|
|
144
153
|
saveAppSettings,
|
|
145
154
|
updateAdvancedSettings,
|
|
@@ -148,15 +157,7 @@ import {
|
|
|
148
157
|
updateClaudeSettings,
|
|
149
158
|
updateDefaultsSettings,
|
|
150
159
|
updateIntegrationsSettings
|
|
151
|
-
} from "./chunk-
|
|
152
|
-
import {
|
|
153
|
-
COORDINATOR_TOOL_PLAYBOOK,
|
|
154
|
-
coordinatorSystemPrompt,
|
|
155
|
-
coordinatorTurnReminder,
|
|
156
|
-
enrichWorkspacesWithGithub,
|
|
157
|
-
ensureGlobalCoordinatorCwd,
|
|
158
|
-
formatWorkspaceInventory
|
|
159
|
-
} from "./chunk-LRLKJM3O.js";
|
|
160
|
+
} from "./chunk-DIOF73S2.js";
|
|
160
161
|
import {
|
|
161
162
|
FAMOUS_SOCCER_TEAMS,
|
|
162
163
|
addPrStackLayer,
|
|
@@ -622,9 +623,25 @@ function applyAgentEvent(parts, event) {
|
|
|
622
623
|
];
|
|
623
624
|
}
|
|
624
625
|
if (event.type === "tool_result") {
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
|
|
626
|
+
const existing = parts.findIndex((p) => p.type === "tool" && p.id === event.id);
|
|
627
|
+
const fromResult = parseDiffStat(event.content);
|
|
628
|
+
if (existing < 0) {
|
|
629
|
+
return [
|
|
630
|
+
...parts,
|
|
631
|
+
{
|
|
632
|
+
type: "tool",
|
|
633
|
+
id: event.id,
|
|
634
|
+
name: "tool",
|
|
635
|
+
description: "tool",
|
|
636
|
+
status: event.isError ? "error" : "done",
|
|
637
|
+
result: event.content,
|
|
638
|
+
...fromResult.additions != null ? { additions: fromResult.additions } : {},
|
|
639
|
+
...fromResult.deletions != null ? { deletions: fromResult.deletions } : {}
|
|
640
|
+
}
|
|
641
|
+
];
|
|
642
|
+
}
|
|
643
|
+
return parts.map((p, i) => {
|
|
644
|
+
if (i !== existing || p.type !== "tool") return p;
|
|
628
645
|
return {
|
|
629
646
|
...p,
|
|
630
647
|
status: event.isError ? "error" : "done",
|
|
@@ -633,7 +650,6 @@ function applyAgentEvent(parts, event) {
|
|
|
633
650
|
...fromResult.deletions != null ? { deletions: fromResult.deletions } : {}
|
|
634
651
|
};
|
|
635
652
|
});
|
|
636
|
-
return next;
|
|
637
653
|
}
|
|
638
654
|
return parts;
|
|
639
655
|
}
|
|
@@ -690,9 +706,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
690
706
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
691
707
|
);
|
|
692
708
|
}
|
|
693
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
709
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-S7VLWPWG.js");
|
|
694
710
|
if (isGlobalThread2(thread)) {
|
|
695
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
711
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-ICF36NUQ.js");
|
|
696
712
|
ensureGlobalCoordinatorCwd2();
|
|
697
713
|
}
|
|
698
714
|
if (isOrchestratorThread(thread)) {
|
|
@@ -2882,7 +2898,13 @@ async function confirmLand(thread, opts) {
|
|
|
2882
2898
|
// src/threads/create.ts
|
|
2883
2899
|
import { existsSync as existsSync7 } from "fs";
|
|
2884
2900
|
async function createThread(input, _onSetupLine) {
|
|
2885
|
-
|
|
2901
|
+
const resolved = resolveNewThreadOptions({
|
|
2902
|
+
agent: input.agent,
|
|
2903
|
+
model: input.model,
|
|
2904
|
+
effort: input.effort,
|
|
2905
|
+
fast: input.fast
|
|
2906
|
+
});
|
|
2907
|
+
await requireAgent(resolved.agent);
|
|
2886
2908
|
const repoPath = await resolveRepoRoot(input.repoPath);
|
|
2887
2909
|
if (!existsSync7(repoPath)) {
|
|
2888
2910
|
throw new Error(`Repo not found: ${repoPath}`);
|
|
@@ -2925,11 +2947,11 @@ async function createThread(input, _onSetupLine) {
|
|
|
2925
2947
|
branchName,
|
|
2926
2948
|
worktreePath,
|
|
2927
2949
|
repoPath,
|
|
2928
|
-
agent:
|
|
2950
|
+
agent: resolved.agent,
|
|
2929
2951
|
autonomy: input.autonomy ?? "default",
|
|
2930
|
-
model:
|
|
2931
|
-
effort:
|
|
2932
|
-
fast:
|
|
2952
|
+
model: resolved.model,
|
|
2953
|
+
effort: resolved.effort,
|
|
2954
|
+
fast: resolved.fast,
|
|
2933
2955
|
planMode: Boolean(input.planMode),
|
|
2934
2956
|
attachments: input.attachments ?? [],
|
|
2935
2957
|
sourceIsFork,
|
|
@@ -2942,7 +2964,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
2942
2964
|
return readThread(thread.id) ?? thread;
|
|
2943
2965
|
}
|
|
2944
2966
|
async function listLinearIssues(agent, repoPath) {
|
|
2945
|
-
const { getAdapter: getAdapter2 } = await import("./agents-
|
|
2967
|
+
const { getAdapter: getAdapter2 } = await import("./agents-2YYWW723.js");
|
|
2946
2968
|
await requireAgent(agent, { requireLinear: true });
|
|
2947
2969
|
const adapter = getAdapter2(agent);
|
|
2948
2970
|
if (!adapter.listLinearIssues) {
|
|
@@ -3483,7 +3505,7 @@ async function adoptThread(input) {
|
|
|
3483
3505
|
messages: input.messages ?? []
|
|
3484
3506
|
});
|
|
3485
3507
|
writeThread(thread);
|
|
3486
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
3508
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-FPJJXXAE.js");
|
|
3487
3509
|
await ensureWorkspace2(repoPath);
|
|
3488
3510
|
return thread;
|
|
3489
3511
|
}
|
|
@@ -4379,6 +4401,7 @@ var Orchestrator = class {
|
|
|
4379
4401
|
}
|
|
4380
4402
|
async reconcile(repoPath, opts) {
|
|
4381
4403
|
const reclaimStaleTurns = opts?.reclaimStaleTurns === true;
|
|
4404
|
+
const drainQueues = opts?.drainQueues !== false;
|
|
4382
4405
|
healOrchestrationSoccerTitles();
|
|
4383
4406
|
for (const thread of listThreads({ includeArchived: true })) {
|
|
4384
4407
|
if (thread.status === "archived") continue;
|
|
@@ -4419,18 +4442,42 @@ var Orchestrator = class {
|
|
|
4419
4442
|
orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
|
|
4420
4443
|
});
|
|
4421
4444
|
}
|
|
4422
|
-
const { autoCleanupOrphansEnabled: autoCleanupOrphansEnabled2 } = await import("./app-settings-
|
|
4445
|
+
const { autoCleanupOrphansEnabled: autoCleanupOrphansEnabled2 } = await import("./app-settings-2LQNRTBE.js");
|
|
4423
4446
|
if (autoCleanupOrphansEnabled2() && shouldRunWorktreeCleanup() && orphans.length > 0) {
|
|
4424
4447
|
await cleanupOrphanWorktrees({ repoPaths });
|
|
4425
4448
|
}
|
|
4426
4449
|
} catch {
|
|
4427
4450
|
}
|
|
4451
|
+
if (drainQueues) {
|
|
4452
|
+
this.adoptPersistedQueues();
|
|
4453
|
+
}
|
|
4454
|
+
this.schedulePendingQuotaResumes();
|
|
4455
|
+
}
|
|
4456
|
+
/**
|
|
4457
|
+
* Adopt queues persisted by another process (MCP stdio / CLI) into this
|
|
4458
|
+
* orchestrator's drain loops. Desktop calls this on thread-store changes so
|
|
4459
|
+
* MCP-created review threads don't stay `queued` after the MCP child exits.
|
|
4460
|
+
*/
|
|
4461
|
+
adoptPersistedQueues() {
|
|
4428
4462
|
for (const thread of listThreads()) {
|
|
4429
|
-
if (thread.
|
|
4463
|
+
if (thread.status === "stopped" || thread.status === "archived") continue;
|
|
4464
|
+
const pid = thread.agentPid;
|
|
4465
|
+
const deadPid = typeof pid === "number" && pid > 0 && !isPidAlive(pid) ? true : false;
|
|
4466
|
+
if (deadPid) {
|
|
4467
|
+
updateThread(thread.id, { agentPid: null });
|
|
4468
|
+
}
|
|
4469
|
+
if (thread.status === "queued" && thread.queue.length === 0) {
|
|
4470
|
+
if (!this.activeTurns.has(thread.id) && !this.startingTurns.has(thread.id)) {
|
|
4471
|
+
setStatus(thread.id, "idle");
|
|
4472
|
+
this.emit({ type: "status_changed", threadId: thread.id, status: "idle" });
|
|
4473
|
+
}
|
|
4474
|
+
continue;
|
|
4475
|
+
}
|
|
4476
|
+
if (thread.queue.length > 0) {
|
|
4477
|
+
this.haltDrain.delete(thread.id);
|
|
4430
4478
|
void this.drainQueue(thread.id);
|
|
4431
4479
|
}
|
|
4432
4480
|
}
|
|
4433
|
-
this.schedulePendingQuotaResumes();
|
|
4434
4481
|
}
|
|
4435
4482
|
clearQuotaResumeTimer(threadId) {
|
|
4436
4483
|
const timer = this.quotaResumeTimers.get(threadId);
|
|
@@ -4552,7 +4599,7 @@ var Orchestrator = class {
|
|
|
4552
4599
|
}
|
|
4553
4600
|
async finishCreateThread(threadId, prompt) {
|
|
4554
4601
|
await this.runSetupAfterCreate(threadId);
|
|
4555
|
-
const { autoRunAfterSetupEnabled: autoRunAfterSetupEnabled2 } = await import("./app-settings-
|
|
4602
|
+
const { autoRunAfterSetupEnabled: autoRunAfterSetupEnabled2 } = await import("./app-settings-2LQNRTBE.js");
|
|
4556
4603
|
if (autoRunAfterSetupEnabled2()) {
|
|
4557
4604
|
try {
|
|
4558
4605
|
await this.startDev(threadId);
|
|
@@ -4584,7 +4631,7 @@ var Orchestrator = class {
|
|
|
4584
4631
|
}
|
|
4585
4632
|
}
|
|
4586
4633
|
listWorkspaces() {
|
|
4587
|
-
const fromThreads = listThreads({ includeArchived:
|
|
4634
|
+
const fromThreads = listThreads({ includeArchived: true }).map((t) => t.repoPath);
|
|
4588
4635
|
return syncWorkspacesFromThreads(fromThreads);
|
|
4589
4636
|
}
|
|
4590
4637
|
async addWorkspace(repoPath) {
|
|
@@ -4612,7 +4659,12 @@ var Orchestrator = class {
|
|
|
4612
4659
|
const current = this.requireThread(thread.id);
|
|
4613
4660
|
const queue = [...current.queue, prompt];
|
|
4614
4661
|
this.haltDrain.delete(thread.id);
|
|
4615
|
-
|
|
4662
|
+
const patch = { queue, status: "queued" };
|
|
4663
|
+
const pid = current.agentPid;
|
|
4664
|
+
if (typeof pid === "number" && pid > 0 && !isPidAlive(pid)) {
|
|
4665
|
+
patch.agentPid = null;
|
|
4666
|
+
}
|
|
4667
|
+
updateThread(thread.id, patch);
|
|
4616
4668
|
this.emit({ type: "queue_changed", threadId: thread.id, queue });
|
|
4617
4669
|
this.emit({ type: "status_changed", threadId: thread.id, status: "queued" });
|
|
4618
4670
|
void this.drainQueue(thread.id);
|
|
@@ -4818,7 +4870,7 @@ var Orchestrator = class {
|
|
|
4818
4870
|
});
|
|
4819
4871
|
const artifactDirective = isBrightsy ? null : formatArtifactDirective();
|
|
4820
4872
|
const settings = loadWorkspaceSettings(fresh.worktreePath, fresh.repoPath);
|
|
4821
|
-
const { autoRenameBranchEnabled: autoRenameBranchEnabled2 } = await import("./app-settings-
|
|
4873
|
+
const { autoRenameBranchEnabled: autoRenameBranchEnabled2 } = await import("./app-settings-2LQNRTBE.js");
|
|
4822
4874
|
const renameBranchDirective = !isBrightsy && !isOrchestration && autoRenameBranchEnabled2() ? formatRenameBranchDirective(fresh, {
|
|
4823
4875
|
customPrompt: settings?.prompts?.renameBranch
|
|
4824
4876
|
}) : null;
|
|
@@ -5684,7 +5736,15 @@ var Orchestrator = class {
|
|
|
5684
5736
|
}
|
|
5685
5737
|
await removeWorktree(thread.repoPath, thread.worktreePath);
|
|
5686
5738
|
}
|
|
5687
|
-
|
|
5739
|
+
const archived = setStatus(thread.id, "archived");
|
|
5740
|
+
if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
|
|
5741
|
+
try {
|
|
5742
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-FPJJXXAE.js");
|
|
5743
|
+
await ensureWorkspace2(thread.repoPath);
|
|
5744
|
+
} catch {
|
|
5745
|
+
}
|
|
5746
|
+
}
|
|
5747
|
+
return archived;
|
|
5688
5748
|
}
|
|
5689
5749
|
async purge(threadRef, opts) {
|
|
5690
5750
|
const thread = this.requireThread(threadRef);
|
|
@@ -5700,7 +5760,7 @@ var Orchestrator = class {
|
|
|
5700
5760
|
await runArchiveScript(thread.repoPath, thread.worktreePath);
|
|
5701
5761
|
} catch {
|
|
5702
5762
|
}
|
|
5703
|
-
const { deleteBranchOnPurgeEnabled: deleteBranchOnPurgeEnabled2 } = await import("./app-settings-
|
|
5763
|
+
const { deleteBranchOnPurgeEnabled: deleteBranchOnPurgeEnabled2 } = await import("./app-settings-2LQNRTBE.js");
|
|
5704
5764
|
const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled2();
|
|
5705
5765
|
await removeWorktree(thread.repoPath, thread.worktreePath, {
|
|
5706
5766
|
deleteBranch: deleteBranch ? thread.branchName : void 0
|
|
@@ -5941,7 +6001,12 @@ function mcpArchiveBlockedReason(thread) {
|
|
|
5941
6001
|
var MAX_ORCH_THREADS = 5;
|
|
5942
6002
|
async function startMcpServer() {
|
|
5943
6003
|
const orch = getOrchestrator();
|
|
5944
|
-
|
|
6004
|
+
try {
|
|
6005
|
+
const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-2LQNRTBE.js");
|
|
6006
|
+
orch.setMaxConcurrent(maxConcurrentAgents2());
|
|
6007
|
+
} catch {
|
|
6008
|
+
}
|
|
6009
|
+
await orch.reconcile(void 0, { reclaimStaleTurns: false, drainQueues: false });
|
|
5945
6010
|
const server = new McpServer({
|
|
5946
6011
|
name: "sideboard",
|
|
5947
6012
|
version: "0.1.0"
|
|
@@ -6141,13 +6206,19 @@ async function startMcpServer() {
|
|
|
6141
6206
|
return { content: [{ type: "text", text: JSON.stringify(payload) }] };
|
|
6142
6207
|
}
|
|
6143
6208
|
);
|
|
6209
|
+
const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-2LQNRTBE.js");
|
|
6210
|
+
const accountDefaults = resolveThreadDefaults2();
|
|
6211
|
+
const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
|
|
6144
6212
|
server.tool(
|
|
6145
6213
|
"create_thread",
|
|
6146
|
-
|
|
6214
|
+
`Create a new worktree thread (chat) from branch, pr, or ticket. Pass repoPath from list_workspaces and parentThreadId when spawning from an orchestrator. Prefer omitting agent/model so Sideboard applies ${accountDefaultsHint}. Then use send_to_thread to chat.`,
|
|
6147
6215
|
{
|
|
6148
6216
|
sourceType: z.enum(["branch", "pr", "ticket"]),
|
|
6149
6217
|
sourceRef: z.string(),
|
|
6150
|
-
agent: z.enum(["claude", "codex", "opencode", "brightsy", "cursor"]),
|
|
6218
|
+
agent: z.enum(["claude", "codex", "opencode", "brightsy", "cursor"]).optional().describe(`Omit to use Account default agent (${accountDefaults.agent})`),
|
|
6219
|
+
model: z.string().nullable().optional().describe(
|
|
6220
|
+
`Usually omit to use Account default model (${accountDefaults.model?.trim() || "Auto"}). Pass null only to force Auto / agent-default.`
|
|
6221
|
+
),
|
|
6151
6222
|
repoPath: z.string(),
|
|
6152
6223
|
title: z.string().optional(),
|
|
6153
6224
|
parentThreadId: z.string().optional()
|
|
@@ -6167,10 +6238,17 @@ async function startMcpServer() {
|
|
|
6167
6238
|
};
|
|
6168
6239
|
}
|
|
6169
6240
|
}
|
|
6241
|
+
const opts = resolveNewThreadOptions2({
|
|
6242
|
+
agent: args.agent,
|
|
6243
|
+
model: args.model
|
|
6244
|
+
});
|
|
6170
6245
|
const thread = await orch.createThread({
|
|
6171
6246
|
sourceType: args.sourceType,
|
|
6172
6247
|
sourceRef: args.sourceRef,
|
|
6173
|
-
agent:
|
|
6248
|
+
agent: opts.agent,
|
|
6249
|
+
model: opts.model,
|
|
6250
|
+
effort: opts.effort,
|
|
6251
|
+
fast: opts.fast,
|
|
6174
6252
|
repoPath: args.repoPath,
|
|
6175
6253
|
title: args.title,
|
|
6176
6254
|
parentThreadId: args.parentThreadId ?? null
|
|
@@ -6184,6 +6262,8 @@ async function startMcpServer() {
|
|
|
6184
6262
|
title: thread.title,
|
|
6185
6263
|
branchName: thread.branchName,
|
|
6186
6264
|
worktreePath: thread.worktreePath,
|
|
6265
|
+
agent: thread.agent,
|
|
6266
|
+
model: thread.model,
|
|
6187
6267
|
status: thread.status,
|
|
6188
6268
|
link: `sideboard://thread/${thread.id}`
|
|
6189
6269
|
})
|
|
@@ -6428,7 +6508,7 @@ async function startMcpServer() {
|
|
|
6428
6508
|
async ({ ref, through_index, agent, model, title }) => {
|
|
6429
6509
|
try {
|
|
6430
6510
|
const source = orch.getThread(ref);
|
|
6431
|
-
if (source) await orch.reconcile(source.repoPath);
|
|
6511
|
+
if (source) await orch.reconcile(source.repoPath, { drainQueues: false });
|
|
6432
6512
|
const thread = await orch.forkThreadWorktree({
|
|
6433
6513
|
threadId: ref,
|
|
6434
6514
|
throughIndex: through_index,
|
|
@@ -7442,6 +7522,7 @@ export {
|
|
|
7442
7522
|
resolveFilesToCopy,
|
|
7443
7523
|
resolveGhAuthToken,
|
|
7444
7524
|
resolveGithubRepoSlug,
|
|
7525
|
+
resolveNewThreadOptions,
|
|
7445
7526
|
resolvePlanMarkdown,
|
|
7446
7527
|
resolvePrSelector,
|
|
7447
7528
|
resolveQuotaFallbackAgent,
|