@sideboard-ai/core 0.1.145 → 0.1.147
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-4WOO4WN4.js → agents-N3KMRQUZ.js} +4 -4
- package/dist/{agents-VFBNZHI4.js → agents-YVETHB2R.js} +4 -4
- package/dist/{chunk-TTJ6EYZC.js → chunk-4RYRNJPN.js} +3 -3
- package/dist/{chunk-2C5RE7K4.js → chunk-67K3FRKR.js} +1 -1
- package/dist/{chunk-G3KLNP2B.js → chunk-IHSR7EVK.js} +2 -2
- package/dist/{chunk-3UD2LW4P.js → chunk-JHZ6HGRI.js} +2 -2
- package/dist/{chunk-QS5JJ2IM.js → chunk-JTPDWTWJ.js} +117 -34
- package/dist/{chunk-LWRNRMYY.js → chunk-JW436RTA.js} +2 -2
- package/dist/{chunk-XUYIJY6D.js → chunk-KNE3FZ46.js} +2 -2
- package/dist/{chunk-335KQKWX.js → chunk-KZG47SZP.js} +18 -14
- package/dist/{chunk-DN7UA3UT.js → chunk-SXPTL222.js} +1 -1
- package/dist/{chunk-UJWGZM4K.js → chunk-WWH4NNBH.js} +3 -3
- package/dist/{chunk-JSYIBLBK.js → chunk-YP3CSOZ6.js} +117 -34
- package/dist/{chunk-3EMJ5LVV.js → chunk-ZZBN2MR7.js} +18 -14
- package/dist/{coordinator-prompt-JSX22ULD.js → coordinator-prompt-2EOR35TP.js} +2 -2
- package/dist/{coordinator-prompt-J2WBXGLP.js → coordinator-prompt-6EPVHVGJ.js} +2 -2
- package/dist/{global-workspace-6WR7OGMI.js → global-workspace-EZVQPMWT.js} +3 -3
- package/dist/{global-workspace-AQESFS7I.js → global-workspace-PANZGRUS.js} +3 -3
- package/dist/index.cjs +226 -34
- package/dist/index.d.cts +61 -2
- package/dist/index.d.ts +61 -2
- package/dist/index.js +109 -6
- package/dist/mcp/run-stdio.cjs +119 -34
- package/dist/mcp/run-stdio.js +6 -6
- package/dist/{orchestrator-XPGJV7JK.js → orchestrator-KWV2PPML.js} +6 -6
- package/dist/{orchestrator-WWQBBIPP.js → orchestrator-T35BJZWY.js} +6 -6
- package/dist/{workspaces-V3RNE5ZX.js → workspaces-DWERPUQJ.js} +4 -4
- package/dist/{workspaces-WALT3MJB.js → workspaces-ZJATBC4A.js} +4 -4
- package/dist/{worktree-3NLPMA7K.js → worktree-RZRJNHYL.js} +7 -1
- package/dist/{worktree-TUZX7F7P.js → worktree-UCWWTVLS.js} +7 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ interface ThreadMessage {
|
|
|
92
92
|
interface ThreadAttachment {
|
|
93
93
|
id: string;
|
|
94
94
|
name: string;
|
|
95
|
-
kind: 'transcript' | 'file' | 'issue' | 'workspace' | 'diff-comment';
|
|
95
|
+
kind: 'transcript' | 'file' | 'issue' | 'workspace' | 'diff-comment' | 'code-ref';
|
|
96
96
|
content: string;
|
|
97
97
|
/** Worktree-relative path when this attachment is a real file that can be opened in a tab. */
|
|
98
98
|
path?: string;
|
|
@@ -1653,6 +1653,28 @@ interface CreateWorktreeResult {
|
|
|
1653
1653
|
* Local-only refs (e.g. fetched PR heads, existing thread branches) stay local.
|
|
1654
1654
|
*/
|
|
1655
1655
|
declare function resolveWorktreeStartPoint(repoPath: string, sourceRef: string): Promise<string>;
|
|
1656
|
+
/** Branch name to `git fetch origin <name>` — never a pull/checkout of the main tree. */
|
|
1657
|
+
declare function originFetchBranch(sourceRef: string): string | null;
|
|
1658
|
+
/**
|
|
1659
|
+
* Refresh `origin/<branch>` remote-tracking refs before `git worktree add`.
|
|
1660
|
+
* Does **not** pull, merge, checkout, or reset the main repo working tree —
|
|
1661
|
+
* new worktrees start from the remote tip; the project folder stays untouched.
|
|
1662
|
+
*/
|
|
1663
|
+
declare function fetchOriginForWorktree(repoPath: string, sourceRef: string, opts?: {
|
|
1664
|
+
timeoutMs?: number;
|
|
1665
|
+
}): Promise<boolean>;
|
|
1666
|
+
type FastForwardMainResult = {
|
|
1667
|
+
updated: boolean;
|
|
1668
|
+
reason: 'updated' | 'already-current' | 'not-on-default' | 'dirty' | 'diverged' | 'no-origin-tip' | 'ff-failed';
|
|
1669
|
+
};
|
|
1670
|
+
/**
|
|
1671
|
+
* Fast-forward the project-folder checkout to `origin/<default>` when that is
|
|
1672
|
+
* safe: already on the default branch, clean, and a strict ancestor of the
|
|
1673
|
+
* remote tip. Never checkout, reset, or merge if it would not fast-forward.
|
|
1674
|
+
*/
|
|
1675
|
+
declare function fastForwardMainCheckoutIfSafe(repoPath: string, opts?: {
|
|
1676
|
+
branch?: string;
|
|
1677
|
+
}): Promise<FastForwardMainResult>;
|
|
1656
1678
|
declare function createThreadWorktree(opts: {
|
|
1657
1679
|
repoPath: string;
|
|
1658
1680
|
sourceRef: string;
|
|
@@ -3096,6 +3118,43 @@ interface DiffCommentInput {
|
|
|
3096
3118
|
*/
|
|
3097
3119
|
declare function buildDiffCommentAttachment(input: DiffCommentInput): ThreadAttachment;
|
|
3098
3120
|
|
|
3121
|
+
interface CodeRefInput {
|
|
3122
|
+
path: string;
|
|
3123
|
+
startLine: number;
|
|
3124
|
+
endLine: number;
|
|
3125
|
+
text: string;
|
|
3126
|
+
language?: string;
|
|
3127
|
+
id?: string;
|
|
3128
|
+
}
|
|
3129
|
+
interface CodeLineRange {
|
|
3130
|
+
startLine: number;
|
|
3131
|
+
endLine: number;
|
|
3132
|
+
}
|
|
3133
|
+
/** Inclusive 1-based line label, matching diff-comment chips (`L10` / `L10-20`). */
|
|
3134
|
+
declare function codeRefRangeLabel(startLine: number, endLine: number): string;
|
|
3135
|
+
/**
|
|
3136
|
+
* Normalize a Monaco-style selection to an inclusive line range.
|
|
3137
|
+
* Selecting down to column 1 of the next line does not include that line.
|
|
3138
|
+
*/
|
|
3139
|
+
declare function normalizeCodeSelection(startLine: number, startColumn: number, endLine: number, endColumn: number): CodeLineRange | null;
|
|
3140
|
+
/**
|
|
3141
|
+
* Build a composer attachment from a code-file selection.
|
|
3142
|
+
* Expanded into agent context via `expandComposerPrompt` like other attachments.
|
|
3143
|
+
*/
|
|
3144
|
+
declare function buildCodeRefAttachment(input: CodeRefInput): ThreadAttachment;
|
|
3145
|
+
interface PathRefInput {
|
|
3146
|
+
path: string;
|
|
3147
|
+
entry: 'file' | 'dir';
|
|
3148
|
+
/** Tracked files under a folder (shown as a short listing). */
|
|
3149
|
+
childPaths?: string[];
|
|
3150
|
+
id?: string;
|
|
3151
|
+
}
|
|
3152
|
+
/**
|
|
3153
|
+
* Build a composer attachment from a file-tree file or folder.
|
|
3154
|
+
* Folder chips use a trailing slash so they are not opened as files.
|
|
3155
|
+
*/
|
|
3156
|
+
declare function buildPathRefAttachment(input: PathRefInput): ThreadAttachment;
|
|
3157
|
+
|
|
3099
3158
|
declare function isImageFilePath(filePath: string): boolean;
|
|
3100
3159
|
/**
|
|
3101
3160
|
* Build a composer attachment from an absolute filesystem path (no copy).
|
|
@@ -5465,4 +5524,4 @@ declare function pollSlackOutboundWatches(opts?: {
|
|
|
5465
5524
|
now?: number;
|
|
5466
5525
|
}): Promise<void>;
|
|
5467
5526
|
|
|
5468
|
-
export { ABLETIME_MCP_PATH, AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, ATTACHMENTS_DIR, type AbleTimeAssignedIssuesResult, type AbleTimeMcpToolName, type AbleTimeOrientation, type AbleTimeProject, type AbleTimeTask, type AbleTimeViewer, type ActiveRun, type AddBoardPinInput, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, 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, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, BRIGHTSY_SUMMARIZE_CONTEXT_TOOL, BUNDLED_LONG_RUNNING_PATH, BUNDLED_SKILL_PREFIX, type BoardPin, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CHARS_PER_CONTEXT_TOKEN, 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, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, DEFAULT_ABLETIME_HOST, DEFAULT_WORKTREE_SORT, 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, GITHUB_GIT_AUTH_MODES, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, HOME_BOARD_CACHE_TTL_MS, type HarnessId, type HomeBoardLoaded, type HomeBoardRemoteData, ISSUE_SOURCE_LABELS, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueCycleInfo, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, LONG_RUNNING_SKILL_COMMAND, type LandPreview, type LandResult, type LinearAssignedIssuesResult, type LinearComment, type LinearIssue, LinearOAuthCancelledError, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, OPTIONAL_SERVICES, OPTIONAL_SERVICE_IDS, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OptionalServiceCliStatus, type OptionalServiceId, type OptionalServiceSpec, 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, PLAN_QUESTION_ANSWERS_PREFIX, 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, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SetupRunResult, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackWorkspaceInfo, 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 UpdateScheduledTaskPatch, type UsageScope, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, type WorktreeSortMode, abletimeMcpRequest, abletimeMcpUrl, ackSlackInboundSeen, addBoardPin, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyForwardOccupancy, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAccessTokenNeedsRefresh, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildBrightsySessionSeed, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, callAbleTimeTool, canonicalizeRepoPath, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, classifyWorktreeColumn, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, clearBoardPins, clearHomeBoardCache, cloneRepoIntoSideboard, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, connectOptionalService, connectSlackToken, connectedOptionalServices, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, countUnpushedVsOrigin, cowboyModeEnabled, createAbleTimeTask, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, detectOptionalServiceClis, disconnectAbleTimeConnection, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectOptionalService, disconnectSlackWorkspace, discoverSkills, dropCachedPrefixOnResume, emptyPublicIntegrations, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAbleTimeTask, ensureAgentPath, ensureBrightsyLocalConfigFresh, ensureCloudCoordinator, ensureConnectedBrightsyTeamTokens, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateOccupancyTokens, estimateThreadChars, expandComposerPrompt, extractBrightsyContextSummary, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findConventionSetup, findInvalidCacheControlTtlOrder, findLastBrightsyContextSummary, findLiveThreadForCreate, findOrphanWorktrees, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatDetachedJobInvoke, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatLongRunningDirective, formatLongRunningReminder, formatMergePrError, formatMessagesAsTranscript, formatOptionalServicesDirective, formatOptionalServicesReminder, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatProcessGuideDirective, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, formatTranscriptMarkdown, formatUiReminder, formatWorkspaceInventory, formatWorktreeDirective, formatWorktreeReminder, forwardContextUsage, forwardOccupancyTokens, fromInclusiveInputUsage, getAbleTimeAccessToken, getAbleTimeHost, getAbleTimeOrientation, getAbleTimeTask, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getHomeBoardInputs, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, gh, ghHeadRef, ghRepoSelectArgs, git, githubAgentGitEnv, globalAgentCwd, groupHomeBoardWorktrees, handleSlackInbound, harnessEnvKey, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, installNpmGlobalPackage, installOptionalServiceCli, interruptSlackCoordinatorForInbound, invalidateThreadListCache, isAbleTimeConnected, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isHomeBoardThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isIssueSourceConnected, isLinearConnected, isLinearOAuthCancelled, isOptionalServiceId, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPlanQuestionAnswersMessage, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSessionQuotaLimit, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isWorkspaceScratchPath, issueAttachmentForAbleTimeTask, issueSourceLabel, lastRequestOccupancy, latestPendingPlanQuestions, linearAuthorizationHeader, linearCycleIsActive, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, listAbleTimeAssignedIssues, listAbleTimeProjects, listAbleTimeTasks, listAgentSetupInfo, listBoardPins, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearAssignedIssues, listLinearIssues, listLinearIssuesDirect, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadHomeBoardInputs, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, mapAbleTimeTask, markPrReady, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, messagesSinceLastBrightsyContextSummary, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeAbleTimeHost, normalizeParseResult, normalizeServiceOrigin, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, optionalServiceConnected, optionalServiceSpec, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, packagedDetachedJobPath, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permissionMode, persistPendingFileAttachments, persistVaultKeyInKeychain, planFileAbs, planQuestionsSignature, pollSlackOutboundWatches, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshBrightsyAccessToken, refreshGitHubAuth, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeBoardPin, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDetachedJobScript, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitDirsForLockRecovery, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveVaultKey, resolveWorktreeStartPoint, rewriteAbleTimeError, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeMcpServerName, saveAbleTimeConnection, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, searchAbleTimeTasks, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunWorktreeCleanup, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, taskUrl, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadHasCompactedContext, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toAbleTimeIssueInfo, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, turnCostUsdFromCursorUsage, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateSchedule, updateThread, userClaudeMcpConfigPath, userCursorMcpConfigPath, validateLinearApiKey, verifyAbleTimeConnection, verifyOptionalService, visibleToolRowDetail, waitForPidExit, warmGithubAgentAuth, whichOnPath, withAgentInstructions, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeBoardStatus, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
|
|
5527
|
+
export { ABLETIME_MCP_PATH, AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, ATTACHMENTS_DIR, type AbleTimeAssignedIssuesResult, type AbleTimeMcpToolName, type AbleTimeOrientation, type AbleTimeProject, type AbleTimeTask, type AbleTimeViewer, type ActiveRun, type AddBoardPinInput, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, 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, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, BRIGHTSY_SUMMARIZE_CONTEXT_TOOL, BUNDLED_LONG_RUNNING_PATH, BUNDLED_SKILL_PREFIX, type BoardPin, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CHARS_PER_CONTEXT_TOKEN, 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, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CodeLineRange, type CodeRefInput, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, DEFAULT_ABLETIME_HOST, DEFAULT_WORKTREE_SORT, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type FastForwardMainResult, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GITHUB_GIT_AUTH_MODES, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, HOME_BOARD_CACHE_TTL_MS, type HarnessId, type HomeBoardLoaded, type HomeBoardRemoteData, ISSUE_SOURCE_LABELS, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueCycleInfo, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, LONG_RUNNING_SKILL_COMMAND, type LandPreview, type LandResult, type LinearAssignedIssuesResult, type LinearComment, type LinearIssue, LinearOAuthCancelledError, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, OPTIONAL_SERVICES, OPTIONAL_SERVICE_IDS, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OptionalServiceCliStatus, type OptionalServiceId, type OptionalServiceSpec, 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, PLAN_QUESTION_ANSWERS_PREFIX, type PathRefInput, 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, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SetupRunResult, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackWorkspaceInfo, 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 UpdateScheduledTaskPatch, type UsageScope, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, type WorktreeSortMode, abletimeMcpRequest, abletimeMcpUrl, ackSlackInboundSeen, addBoardPin, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyForwardOccupancy, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAccessTokenNeedsRefresh, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildBrightsySessionSeed, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildCodeRefAttachment, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildPathRefAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, callAbleTimeTool, canonicalizeRepoPath, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, classifyWorktreeColumn, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, clearBoardPins, clearHomeBoardCache, cloneRepoIntoSideboard, codeRefRangeLabel, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, connectOptionalService, connectSlackToken, connectedOptionalServices, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, countUnpushedVsOrigin, cowboyModeEnabled, createAbleTimeTask, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, detectOptionalServiceClis, disconnectAbleTimeConnection, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectOptionalService, disconnectSlackWorkspace, discoverSkills, dropCachedPrefixOnResume, emptyPublicIntegrations, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAbleTimeTask, ensureAgentPath, ensureBrightsyLocalConfigFresh, ensureCloudCoordinator, ensureConnectedBrightsyTeamTokens, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateOccupancyTokens, estimateThreadChars, expandComposerPrompt, extractBrightsyContextSummary, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fastForwardMainCheckoutIfSafe, fetchOriginForWorktree, fetchPrHead, finalizeParts, findConventionSetup, findInvalidCacheControlTtlOrder, findLastBrightsyContextSummary, findLiveThreadForCreate, findOrphanWorktrees, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatDetachedJobInvoke, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatLongRunningDirective, formatLongRunningReminder, formatMergePrError, formatMessagesAsTranscript, formatOptionalServicesDirective, formatOptionalServicesReminder, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatProcessGuideDirective, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, formatTranscriptMarkdown, formatUiReminder, formatWorkspaceInventory, formatWorktreeDirective, formatWorktreeReminder, forwardContextUsage, forwardOccupancyTokens, fromInclusiveInputUsage, getAbleTimeAccessToken, getAbleTimeHost, getAbleTimeOrientation, getAbleTimeTask, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getHomeBoardInputs, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, gh, ghHeadRef, ghRepoSelectArgs, git, githubAgentGitEnv, globalAgentCwd, groupHomeBoardWorktrees, handleSlackInbound, harnessEnvKey, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, installNpmGlobalPackage, installOptionalServiceCli, interruptSlackCoordinatorForInbound, invalidateThreadListCache, isAbleTimeConnected, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isHomeBoardThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isIssueSourceConnected, isLinearConnected, isLinearOAuthCancelled, isOptionalServiceId, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPlanQuestionAnswersMessage, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSessionQuotaLimit, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isWorkspaceScratchPath, issueAttachmentForAbleTimeTask, issueSourceLabel, lastRequestOccupancy, latestPendingPlanQuestions, linearAuthorizationHeader, linearCycleIsActive, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, listAbleTimeAssignedIssues, listAbleTimeProjects, listAbleTimeTasks, listAgentSetupInfo, listBoardPins, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearAssignedIssues, listLinearIssues, listLinearIssuesDirect, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadHomeBoardInputs, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, mapAbleTimeTask, markPrReady, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, messagesSinceLastBrightsyContextSummary, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeAbleTimeHost, normalizeCodeSelection, normalizeParseResult, normalizeServiceOrigin, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, optionalServiceConnected, optionalServiceSpec, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originFetchBranch, originGhRepoEnv, packagedDetachedJobPath, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permissionMode, persistPendingFileAttachments, persistVaultKeyInKeychain, planFileAbs, planQuestionsSignature, pollSlackOutboundWatches, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshBrightsyAccessToken, refreshGitHubAuth, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeBoardPin, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDetachedJobScript, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitDirsForLockRecovery, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveVaultKey, resolveWorktreeStartPoint, rewriteAbleTimeError, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeMcpServerName, saveAbleTimeConnection, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, searchAbleTimeTasks, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunWorktreeCleanup, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, taskUrl, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadHasCompactedContext, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toAbleTimeIssueInfo, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, turnCostUsdFromCursorUsage, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateSchedule, updateThread, userClaudeMcpConfigPath, userCursorMcpConfigPath, validateLinearApiKey, verifyAbleTimeConnection, verifyOptionalService, visibleToolRowDetail, waitForPidExit, warmGithubAgentAuth, whichOnPath, withAgentInstructions, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeBoardStatus, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
|
package/dist/index.js
CHANGED
|
@@ -212,7 +212,7 @@ import {
|
|
|
212
212
|
worktreeCleanupSettings,
|
|
213
213
|
wrapReviewSkillMarkdown,
|
|
214
214
|
writeWorktreeFile
|
|
215
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-ZZBN2MR7.js";
|
|
216
216
|
import {
|
|
217
217
|
BRIGHTSY_MCP_ALLOWED_TOOLS,
|
|
218
218
|
CLAUDE_MODEL_CATALOG,
|
|
@@ -294,7 +294,7 @@ import {
|
|
|
294
294
|
withEventParentId,
|
|
295
295
|
withEventsParentId,
|
|
296
296
|
writeInjectedMcpConfig
|
|
297
|
-
} from "./chunk-
|
|
297
|
+
} from "./chunk-WWH4NNBH.js";
|
|
298
298
|
import {
|
|
299
299
|
brightsyMcpServerName,
|
|
300
300
|
connectBrightsyTeam,
|
|
@@ -319,7 +319,7 @@ import {
|
|
|
319
319
|
listWorkspaces,
|
|
320
320
|
removeWorkspace,
|
|
321
321
|
syncWorkspacesFromThreads
|
|
322
|
-
} from "./chunk-
|
|
322
|
+
} from "./chunk-JHZ6HGRI.js";
|
|
323
323
|
import {
|
|
324
324
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
325
325
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
@@ -354,7 +354,7 @@ import {
|
|
|
354
354
|
stageAbsolutePathsAsAttachments,
|
|
355
355
|
stageBuffersAsAttachments,
|
|
356
356
|
takenTeamSlugsForOrchestration
|
|
357
|
-
} from "./chunk-
|
|
357
|
+
} from "./chunk-IHSR7EVK.js";
|
|
358
358
|
import {
|
|
359
359
|
COORDINATOR_TOOL_PLAYBOOK,
|
|
360
360
|
SLACK_REPLY_FORMATTING,
|
|
@@ -363,7 +363,7 @@ import {
|
|
|
363
363
|
enrichWorkspacesWithGithub,
|
|
364
364
|
ensureGlobalCoordinatorCwd,
|
|
365
365
|
formatWorkspaceInventory
|
|
366
|
-
} from "./chunk-
|
|
366
|
+
} from "./chunk-SXPTL222.js";
|
|
367
367
|
import {
|
|
368
368
|
ABLETIME_MCP_PATH,
|
|
369
369
|
DEFAULT_ABLETIME_HOST,
|
|
@@ -442,6 +442,8 @@ import {
|
|
|
442
442
|
detectLocalMergeConflicts,
|
|
443
443
|
ensureGhPreferOrigin,
|
|
444
444
|
extractGhErrorDetail,
|
|
445
|
+
fastForwardMainCheckoutIfSafe,
|
|
446
|
+
fetchOriginForWorktree,
|
|
445
447
|
fetchPrHead,
|
|
446
448
|
formatGhLandError,
|
|
447
449
|
formatGitAuthModeDirective,
|
|
@@ -475,6 +477,7 @@ import {
|
|
|
475
477
|
mergePrStack,
|
|
476
478
|
nonInteractiveGitProcessEnv,
|
|
477
479
|
normalizeWorktreePath,
|
|
480
|
+
originFetchBranch,
|
|
478
481
|
originGhRepoEnv,
|
|
479
482
|
parseGhStackViewJson,
|
|
480
483
|
parseGithubSlugFromRemoteUrl,
|
|
@@ -502,7 +505,7 @@ import {
|
|
|
502
505
|
worktreeDisplayLabel,
|
|
503
506
|
worktreeDisplayLabelForGroup,
|
|
504
507
|
worktreeNameFromPath
|
|
505
|
-
} from "./chunk-
|
|
508
|
+
} from "./chunk-YP3CSOZ6.js";
|
|
506
509
|
import {
|
|
507
510
|
ATTACHMENTS_DIR,
|
|
508
511
|
LEGACY_ATTACHMENTS_DIR,
|
|
@@ -1508,6 +1511,99 @@ function buildDiffCommentAttachment(input) {
|
|
|
1508
1511
|
};
|
|
1509
1512
|
}
|
|
1510
1513
|
|
|
1514
|
+
// src/composer/code-ref.ts
|
|
1515
|
+
function codeRefRangeLabel(startLine, endLine) {
|
|
1516
|
+
return startLine === endLine ? `L${startLine}` : `L${startLine}-${endLine}`;
|
|
1517
|
+
}
|
|
1518
|
+
function normalizeCodeSelection(startLine, startColumn, endLine, endColumn) {
|
|
1519
|
+
if (startLine < 1 || endLine < 1) return null;
|
|
1520
|
+
let sl = startLine;
|
|
1521
|
+
let sc = startColumn;
|
|
1522
|
+
let el = endLine;
|
|
1523
|
+
let ec = endColumn;
|
|
1524
|
+
if (el < sl || el === sl && ec < sc) {
|
|
1525
|
+
sl = endLine;
|
|
1526
|
+
sc = endColumn;
|
|
1527
|
+
el = startLine;
|
|
1528
|
+
ec = startColumn;
|
|
1529
|
+
}
|
|
1530
|
+
if (sl === el && sc === ec) return null;
|
|
1531
|
+
if (ec <= 1 && el > sl) el -= 1;
|
|
1532
|
+
return { startLine: sl, endLine: el };
|
|
1533
|
+
}
|
|
1534
|
+
function fenceLanguage(path2, language) {
|
|
1535
|
+
if (language && language !== "plaintext") return language;
|
|
1536
|
+
const base = path2.split(/[/\\]/).pop()?.toLowerCase() ?? "";
|
|
1537
|
+
const ext = base.includes(".") ? base.split(".").pop() ?? "" : "";
|
|
1538
|
+
return ext;
|
|
1539
|
+
}
|
|
1540
|
+
function buildCodeRefAttachment(input) {
|
|
1541
|
+
const path2 = input.path.trim();
|
|
1542
|
+
const text5 = input.text.replace(/\n$/, "");
|
|
1543
|
+
if (!path2) {
|
|
1544
|
+
throw new Error("code reference requires a file path");
|
|
1545
|
+
}
|
|
1546
|
+
if (!text5.trim()) {
|
|
1547
|
+
throw new Error("code reference requires selected text");
|
|
1548
|
+
}
|
|
1549
|
+
if (input.startLine < 1 || input.endLine < 1 || input.endLine < input.startLine) {
|
|
1550
|
+
throw new Error("code reference requires a valid line range");
|
|
1551
|
+
}
|
|
1552
|
+
const range = codeRefRangeLabel(input.startLine, input.endLine);
|
|
1553
|
+
const lang = fenceLanguage(path2, input.language);
|
|
1554
|
+
const fence = lang ? "```" + lang : "```";
|
|
1555
|
+
const content = [
|
|
1556
|
+
`Referenced code from \`${path2}\` (${range}).`,
|
|
1557
|
+
"",
|
|
1558
|
+
fence,
|
|
1559
|
+
text5,
|
|
1560
|
+
"```"
|
|
1561
|
+
].join("\n");
|
|
1562
|
+
return {
|
|
1563
|
+
id: input.id ?? `code-ref-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
1564
|
+
name: `${path2}:${range}`,
|
|
1565
|
+
kind: "code-ref",
|
|
1566
|
+
path: path2,
|
|
1567
|
+
content
|
|
1568
|
+
};
|
|
1569
|
+
}
|
|
1570
|
+
var FOLDER_LISTING_CAP = 40;
|
|
1571
|
+
function formatFolderListing(childPaths) {
|
|
1572
|
+
if (childPaths.length === 0) return ["(no tracked files in this folder)"];
|
|
1573
|
+
const shown = childPaths.slice(0, FOLDER_LISTING_CAP);
|
|
1574
|
+
const lines = ["Tracked files:", ...shown.map((p) => `- \`${p}\``)];
|
|
1575
|
+
if (childPaths.length > FOLDER_LISTING_CAP) {
|
|
1576
|
+
lines.push(`(and ${childPaths.length - FOLDER_LISTING_CAP} more)`);
|
|
1577
|
+
}
|
|
1578
|
+
return lines;
|
|
1579
|
+
}
|
|
1580
|
+
function buildPathRefAttachment(input) {
|
|
1581
|
+
const path2 = input.path.trim().replace(/\\/g, "/").replace(/\/+$/, "");
|
|
1582
|
+
if (!path2) {
|
|
1583
|
+
throw new Error("path reference requires a file or folder path");
|
|
1584
|
+
}
|
|
1585
|
+
const isDir = input.entry === "dir";
|
|
1586
|
+
const name = isDir ? `${path2}/` : path2;
|
|
1587
|
+
const content = isDir ? [
|
|
1588
|
+
`Referenced folder \`${path2}/\`.`,
|
|
1589
|
+
"",
|
|
1590
|
+
"Use Glob, Grep, and Read under this directory when you need files in it.",
|
|
1591
|
+
"",
|
|
1592
|
+
...formatFolderListing(input.childPaths ?? [])
|
|
1593
|
+
].join("\n") : [
|
|
1594
|
+
`Referenced file \`${path2}\`.`,
|
|
1595
|
+
"",
|
|
1596
|
+
`Use the Read tool on \`${path2}\` when you need the contents.`
|
|
1597
|
+
].join("\n");
|
|
1598
|
+
return {
|
|
1599
|
+
id: input.id ?? `path-ref-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
1600
|
+
name,
|
|
1601
|
+
kind: "code-ref",
|
|
1602
|
+
path: name,
|
|
1603
|
+
content
|
|
1604
|
+
};
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1511
1607
|
// src/composer/pasted-text.ts
|
|
1512
1608
|
import { randomUUID } from "crypto";
|
|
1513
1609
|
var PASTE_ATTACH_MIN_CHARS = 1200;
|
|
@@ -6519,9 +6615,11 @@ export {
|
|
|
6519
6615
|
buildBrightsySessionSeed,
|
|
6520
6616
|
buildCachedUserContent,
|
|
6521
6617
|
buildClaudeStreamJsonUserMessage,
|
|
6618
|
+
buildCodeRefAttachment,
|
|
6522
6619
|
buildDiffCommentAttachment,
|
|
6523
6620
|
buildForkTranscriptAttachment,
|
|
6524
6621
|
buildPastedTextAttachment,
|
|
6622
|
+
buildPathRefAttachment,
|
|
6525
6623
|
buildReviewRequestAttachment,
|
|
6526
6624
|
buildSessionSeed,
|
|
6527
6625
|
buildWorkspaceScriptEnv,
|
|
@@ -6545,6 +6643,7 @@ export {
|
|
|
6545
6643
|
clearBoardPins,
|
|
6546
6644
|
clearHomeBoardCache,
|
|
6547
6645
|
cloneRepoIntoSideboard,
|
|
6646
|
+
codeRefRangeLabel,
|
|
6548
6647
|
codexAdapter,
|
|
6549
6648
|
codexSandboxWritableRootsArgs,
|
|
6550
6649
|
codexUnattendedGitConfigArgs,
|
|
@@ -6625,6 +6724,8 @@ export {
|
|
|
6625
6724
|
extractPendingPlanQuestions,
|
|
6626
6725
|
extractPresentedPlan,
|
|
6627
6726
|
extractiveSummary,
|
|
6727
|
+
fastForwardMainCheckoutIfSafe,
|
|
6728
|
+
fetchOriginForWorktree,
|
|
6628
6729
|
fetchPrHead,
|
|
6629
6730
|
finalizeParts,
|
|
6630
6731
|
findConventionSetup,
|
|
@@ -6851,6 +6952,7 @@ export {
|
|
|
6851
6952
|
nextThinkingEffort,
|
|
6852
6953
|
nonInteractiveGitProcessEnv,
|
|
6853
6954
|
normalizeAbleTimeHost,
|
|
6955
|
+
normalizeCodeSelection,
|
|
6854
6956
|
normalizeParseResult,
|
|
6855
6957
|
normalizeServiceOrigin,
|
|
6856
6958
|
normalizeThinkingEffort,
|
|
@@ -6867,6 +6969,7 @@ export {
|
|
|
6867
6969
|
orchestrationQuotaOnLimit,
|
|
6868
6970
|
orchestrationTitleNeedsSoccerNickname,
|
|
6869
6971
|
orchestratorSessionPoisonedByBuiltins,
|
|
6972
|
+
originFetchBranch,
|
|
6870
6973
|
originGhRepoEnv,
|
|
6871
6974
|
packagedDetachedJobPath,
|
|
6872
6975
|
parseCursorRunnerLine,
|
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -4791,6 +4791,8 @@ __export(worktree_exports, {
|
|
|
4791
4791
|
currentBranch: () => currentBranch,
|
|
4792
4792
|
detectLocalMergeConflicts: () => detectLocalMergeConflicts,
|
|
4793
4793
|
ensureGhPreferOrigin: () => ensureGhPreferOrigin,
|
|
4794
|
+
fastForwardMainCheckoutIfSafe: () => fastForwardMainCheckoutIfSafe,
|
|
4795
|
+
fetchOriginForWorktree: () => fetchOriginForWorktree,
|
|
4794
4796
|
fetchPrHead: () => fetchPrHead,
|
|
4795
4797
|
getPr: () => getPr,
|
|
4796
4798
|
getPrChecks: () => getPrChecks,
|
|
@@ -4811,6 +4813,7 @@ __export(worktree_exports, {
|
|
|
4811
4813
|
markPrReady: () => markPrReady,
|
|
4812
4814
|
mergePr: () => mergePr,
|
|
4813
4815
|
normalizeWorktreePath: () => normalizeWorktreePath,
|
|
4816
|
+
originFetchBranch: () => originFetchBranch,
|
|
4814
4817
|
originGhRepoEnv: () => originGhRepoEnv,
|
|
4815
4818
|
parseGithubSlugFromRemoteUrl: () => parseGithubSlugFromRemoteUrl,
|
|
4816
4819
|
pushBranch: () => pushBranch,
|
|
@@ -5589,45 +5592,128 @@ async function resolveWorktreeStartPoint(repoPath, sourceRef) {
|
|
|
5589
5592
|
function isLocalPrFetchBranch(ref) {
|
|
5590
5593
|
return /^sideboard-pr-\d+$/.test(ref.trim());
|
|
5591
5594
|
}
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
if (
|
|
5596
|
-
|
|
5595
|
+
function originFetchBranch(sourceRef) {
|
|
5596
|
+
const ref = sourceRef.trim();
|
|
5597
|
+
if (!ref || isLocalPrFetchBranch(ref)) return null;
|
|
5598
|
+
if (ref.startsWith("refs/remotes/origin/")) {
|
|
5599
|
+
return ref.slice("refs/remotes/origin/".length) || null;
|
|
5597
5600
|
}
|
|
5598
|
-
|
|
5599
|
-
|
|
5601
|
+
if (ref.startsWith("refs/heads/")) {
|
|
5602
|
+
return ref.slice("refs/heads/".length) || null;
|
|
5603
|
+
}
|
|
5604
|
+
if (ref.startsWith("refs/")) return null;
|
|
5605
|
+
if (ref.startsWith("origin/")) return ref.slice("origin/".length) || null;
|
|
5606
|
+
return ref;
|
|
5607
|
+
}
|
|
5608
|
+
async function fetchOriginWithAuth(repoPath, args, timeoutMs) {
|
|
5609
|
+
const first = await git(args, repoPath, { reject: false, timeoutMs });
|
|
5610
|
+
if (first.exitCode === 0) return true;
|
|
5611
|
+
let mode;
|
|
5600
5612
|
try {
|
|
5601
|
-
|
|
5613
|
+
mode = getGithubGitAuthMode();
|
|
5602
5614
|
} catch {
|
|
5603
|
-
|
|
5615
|
+
return false;
|
|
5604
5616
|
}
|
|
5605
|
-
if (
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5617
|
+
if (mode === "ssh") return false;
|
|
5618
|
+
const token = await resolveGithubAgentToken(mode, repoPath);
|
|
5619
|
+
if (!token) return false;
|
|
5620
|
+
const tryHttps = async (header) => git(args, repoPath, {
|
|
5621
|
+
reject: false,
|
|
5622
|
+
timeoutMs,
|
|
5623
|
+
env: { GIT_TERMINAL_PROMPT: "0" },
|
|
5624
|
+
config: {
|
|
5625
|
+
"url.https://github.com/.insteadOf": "git@github.com:",
|
|
5626
|
+
"http.extraHeader": header
|
|
5627
|
+
}
|
|
5628
|
+
});
|
|
5629
|
+
const bearer = await tryHttps(`AUTHORIZATION: bearer ${token}`);
|
|
5630
|
+
if (bearer.exitCode === 0) return true;
|
|
5631
|
+
const basic = Buffer.from(`x-access-token:${token}`, "utf8").toString("base64");
|
|
5632
|
+
const basicFetch = await tryHttps(`Authorization: Basic ${basic}`);
|
|
5633
|
+
return basicFetch.exitCode === 0;
|
|
5634
|
+
}
|
|
5635
|
+
async function fetchOriginForWorktree(repoPath, sourceRef, opts) {
|
|
5636
|
+
const timeoutMs = opts?.timeoutMs ?? 2e4;
|
|
5637
|
+
const branch = originFetchBranch(sourceRef);
|
|
5638
|
+
if (!branch) return false;
|
|
5639
|
+
const tipOk = await fetchOriginWithAuth(
|
|
5640
|
+
repoPath,
|
|
5641
|
+
["fetch", "origin", branch],
|
|
5642
|
+
timeoutMs
|
|
5643
|
+
);
|
|
5644
|
+
await fetchOriginWithAuth(repoPath, ["fetch", "origin", "--prune"], timeoutMs);
|
|
5645
|
+
return tipOk;
|
|
5646
|
+
}
|
|
5647
|
+
async function fastForwardMainCheckoutIfSafe(repoPath, opts) {
|
|
5648
|
+
try {
|
|
5649
|
+
const branch = opts?.branch?.trim() || await resolveDefaultBranch(repoPath, { network: false });
|
|
5650
|
+
const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], repoPath, {
|
|
5651
|
+
reject: false
|
|
5610
5652
|
});
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
timeoutMs: fetchTimeoutMs
|
|
5615
|
-
});
|
|
5653
|
+
const current = head.stdout.trim();
|
|
5654
|
+
if (head.exitCode !== 0 || !current || current === "HEAD" || current !== branch) {
|
|
5655
|
+
return { updated: false, reason: "not-on-default" };
|
|
5616
5656
|
}
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
opts.repoPath,
|
|
5620
|
-
opts.sourceRef
|
|
5621
|
-
);
|
|
5622
|
-
} catch (err) {
|
|
5623
|
-
if (!startPoint) throw err;
|
|
5657
|
+
if (await isDirty(repoPath)) {
|
|
5658
|
+
return { updated: false, reason: "dirty" };
|
|
5624
5659
|
}
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5660
|
+
const remote = `origin/${branch}`;
|
|
5661
|
+
const remoteOk = await git(["rev-parse", "--verify", remote], repoPath, {
|
|
5662
|
+
reject: false
|
|
5663
|
+
});
|
|
5664
|
+
if (remoteOk.exitCode !== 0) {
|
|
5665
|
+
return { updated: false, reason: "no-origin-tip" };
|
|
5666
|
+
}
|
|
5667
|
+
const ancestor = await git(
|
|
5668
|
+
["merge-base", "--is-ancestor", "HEAD", remote],
|
|
5669
|
+
repoPath,
|
|
5670
|
+
{ reject: false }
|
|
5629
5671
|
);
|
|
5672
|
+
if (ancestor.exitCode !== 0) {
|
|
5673
|
+
return { updated: false, reason: "diverged" };
|
|
5674
|
+
}
|
|
5675
|
+
const behind = await git(
|
|
5676
|
+
["rev-list", "--count", `HEAD..${remote}`],
|
|
5677
|
+
repoPath,
|
|
5678
|
+
{ reject: false }
|
|
5679
|
+
);
|
|
5680
|
+
const n = Number(behind.stdout.trim());
|
|
5681
|
+
if (behind.exitCode !== 0 || !Number.isFinite(n) || n <= 0) {
|
|
5682
|
+
return { updated: false, reason: "already-current" };
|
|
5683
|
+
}
|
|
5684
|
+
const ff = await git(["merge", "--ff-only", remote], repoPath, {
|
|
5685
|
+
reject: false
|
|
5686
|
+
});
|
|
5687
|
+
if (ff.exitCode !== 0) {
|
|
5688
|
+
return { updated: false, reason: "ff-failed" };
|
|
5689
|
+
}
|
|
5690
|
+
return { updated: true, reason: "updated" };
|
|
5691
|
+
} catch {
|
|
5692
|
+
return { updated: false, reason: "ff-failed" };
|
|
5693
|
+
}
|
|
5694
|
+
}
|
|
5695
|
+
async function refreshOriginAndMaybeFastForwardMain(repoPath, sourceRef) {
|
|
5696
|
+
if (!isLocalPrFetchBranch(sourceRef)) {
|
|
5697
|
+
await fetchOriginForWorktree(repoPath, sourceRef);
|
|
5630
5698
|
}
|
|
5699
|
+
const def = await resolveDefaultBranch(repoPath, { network: false });
|
|
5700
|
+
if (originFetchBranch(sourceRef) !== def) {
|
|
5701
|
+
await fetchOriginForWorktree(repoPath, def);
|
|
5702
|
+
}
|
|
5703
|
+
await fastForwardMainCheckoutIfSafe(repoPath, { branch: def });
|
|
5704
|
+
}
|
|
5705
|
+
async function createThreadWorktree(opts) {
|
|
5706
|
+
let branchName = `thread/${opts.slug}`;
|
|
5707
|
+
const worktreePath = (0, import_node_path17.join)(worktreesRoot(opts.repoPath), opts.slug);
|
|
5708
|
+
if ((0, import_node_fs14.existsSync)(worktreePath)) {
|
|
5709
|
+
throw new Error(`Worktree already exists at ${worktreePath}`);
|
|
5710
|
+
}
|
|
5711
|
+
await ensureGhPreferOrigin(opts.repoPath);
|
|
5712
|
+
await refreshOriginAndMaybeFastForwardMain(opts.repoPath, opts.sourceRef);
|
|
5713
|
+
const startPoint = await resolveWorktreeStartPoint(
|
|
5714
|
+
opts.repoPath,
|
|
5715
|
+
opts.sourceRef
|
|
5716
|
+
);
|
|
5631
5717
|
const added = await withRepoGitLock(opts.repoPath, async () => {
|
|
5632
5718
|
const add = await git(
|
|
5633
5719
|
["worktree", "add", "-b", branchName, worktreePath, startPoint],
|
|
@@ -5664,10 +5750,7 @@ async function createExistingBranchWorktree(opts) {
|
|
|
5664
5750
|
throw new Error(`Worktree already exists at ${worktreePath}`);
|
|
5665
5751
|
}
|
|
5666
5752
|
await ensureGhPreferOrigin(opts.repoPath);
|
|
5667
|
-
await
|
|
5668
|
-
if (!branchName.startsWith("origin/") && !branchName.startsWith("refs/")) {
|
|
5669
|
-
await git(["fetch", "origin", branchName], opts.repoPath, { reject: false });
|
|
5670
|
-
}
|
|
5753
|
+
await refreshOriginAndMaybeFastForwardMain(opts.repoPath, branchName);
|
|
5671
5754
|
const existing = await listWorktrees(opts.repoPath);
|
|
5672
5755
|
const already = existing.find((w) => w.branch === branchName);
|
|
5673
5756
|
if (already?.path) {
|
|
@@ -13943,6 +14026,8 @@ async function createThread(input, _onSetupLine) {
|
|
|
13943
14026
|
`Cowboy mode uses ${defaultBranch} in the project folder. Switch that checkout to ${defaultBranch} first (currently ${head}).`
|
|
13944
14027
|
);
|
|
13945
14028
|
}
|
|
14029
|
+
await fetchOriginForWorktree(repoPath, defaultBranch);
|
|
14030
|
+
await fastForwardMainCheckoutIfSafe(repoPath, { branch: defaultBranch });
|
|
13946
14031
|
const explicitTitle2 = input.title?.trim();
|
|
13947
14032
|
const thread2 = createEmptyThread({
|
|
13948
14033
|
title: explicitTitle2 || `Cowboy \xB7 ${head}`,
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -32,14 +32,14 @@ import {
|
|
|
32
32
|
slackTokenFor,
|
|
33
33
|
syncBoardPins,
|
|
34
34
|
updateSchedule
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-KZG47SZP.js";
|
|
36
36
|
import {
|
|
37
37
|
listModelsForAgent,
|
|
38
38
|
sideboardMcpProfile
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-4RYRNJPN.js";
|
|
40
40
|
import "../chunk-ED4UPEJX.js";
|
|
41
41
|
import "../chunk-S42XV45P.js";
|
|
42
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-JW436RTA.js";
|
|
43
43
|
import {
|
|
44
44
|
createAbleTimeTask,
|
|
45
45
|
ensureAbleTimeTask,
|
|
@@ -59,8 +59,8 @@ import "../chunk-KLBOWJ74.js";
|
|
|
59
59
|
import {
|
|
60
60
|
GLOBAL_WORKSPACE_ID,
|
|
61
61
|
isCloudCoordinatorThread
|
|
62
|
-
} from "../chunk-
|
|
63
|
-
import "../chunk-
|
|
62
|
+
} from "../chunk-KNE3FZ46.js";
|
|
63
|
+
import "../chunk-67K3FRKR.js";
|
|
64
64
|
import {
|
|
65
65
|
canonicalizeRepoPath,
|
|
66
66
|
listBranches,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
resolveGithubRepoSlug,
|
|
69
69
|
resolveRepoRoot,
|
|
70
70
|
warmGithubAgentAuth
|
|
71
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-JTPDWTWJ.js";
|
|
72
72
|
import "../chunk-B3SJXYIJ.js";
|
|
73
73
|
import "../chunk-EUXOHTUK.js";
|
|
74
74
|
import {
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
isPidAlive,
|
|
5
5
|
startOrchestration,
|
|
6
6
|
waitForPidExit
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-ZZBN2MR7.js";
|
|
8
|
+
import "./chunk-WWH4NNBH.js";
|
|
9
9
|
import "./chunk-KBWND62T.js";
|
|
10
10
|
import "./chunk-M267JPEA.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-JHZ6HGRI.js";
|
|
12
|
+
import "./chunk-IHSR7EVK.js";
|
|
13
|
+
import "./chunk-SXPTL222.js";
|
|
14
14
|
import "./chunk-ELBYOGVA.js";
|
|
15
15
|
import "./chunk-QTUESPAW.js";
|
|
16
16
|
import "./chunk-AXQ4ZWHK.js";
|
|
17
17
|
import "./chunk-WT5HSFOU.js";
|
|
18
18
|
import "./chunk-DCOZABNT.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-YP3CSOZ6.js";
|
|
20
20
|
import "./chunk-FKOIHGKV.js";
|
|
21
21
|
import "./chunk-I77RYPOH.js";
|
|
22
22
|
import "./chunk-4TR3HZFT.js";
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
isPidAlive,
|
|
7
7
|
startOrchestration,
|
|
8
8
|
waitForPidExit
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-KZG47SZP.js";
|
|
10
|
+
import "./chunk-4RYRNJPN.js";
|
|
11
11
|
import "./chunk-ED4UPEJX.js";
|
|
12
12
|
import "./chunk-S42XV45P.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-JW436RTA.js";
|
|
14
14
|
import "./chunk-6GN5WPYZ.js";
|
|
15
15
|
import "./chunk-N5PM7HGQ.js";
|
|
16
16
|
import "./chunk-KLBOWJ74.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-KNE3FZ46.js";
|
|
18
|
+
import "./chunk-67K3FRKR.js";
|
|
19
|
+
import "./chunk-JTPDWTWJ.js";
|
|
20
20
|
import "./chunk-B3SJXYIJ.js";
|
|
21
21
|
import "./chunk-EUXOHTUK.js";
|
|
22
22
|
import "./chunk-KPIYENTF.js";
|