@sideboard-ai/core 0.1.10 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -193,8 +193,20 @@ interface PrDetails {
193
193
  commits: PrCommitInfo[];
194
194
  comments: PrCommentInfo[];
195
195
  reviews: PrReviewInfo[];
196
+ /** Prefer `getPrChecks` — kept for callers; often empty to avoid nested GraphQL. */
196
197
  checks: PrCheckRun[];
197
198
  }
199
+ /** Lightweight PR fields for the sidebar pill (cheap GraphQL). */
200
+ interface PrMeta {
201
+ number: number;
202
+ title: string;
203
+ url: string;
204
+ state: string;
205
+ isDraft: boolean;
206
+ reviewDecision: string | null;
207
+ baseRefName: string;
208
+ headRefName: string;
209
+ }
198
210
  interface IssueInfo {
199
211
  id: string;
200
212
  identifier: string;
@@ -668,6 +680,33 @@ declare function gh(args: string[], cwd: string, opts?: {
668
680
  exitCode: number;
669
681
  }>;
670
682
 
683
+ /** Detect GitHub API / GraphQL rate-limit failures in gh CLI output. */
684
+ declare function isGhRateLimitError(text: string): boolean;
685
+ /** Relative wait hint from a Unix epoch reset timestamp (seconds). */
686
+ declare function formatRateLimitResetHint(resetEpochSec: number, nowMs?: number): string;
687
+ /**
688
+ * Prefer the trailing GraphQL/HTTP detail over the full `gh` command line
689
+ * (which can include a huge --body payload).
690
+ */
691
+ declare function extractGhErrorDetail(text: string): string;
692
+ type FormatGhLandErrorOptions = {
693
+ /** Unix epoch seconds when the GraphQL/core quota resets. */
694
+ resetAt?: number;
695
+ /** Land push already succeeded before PR create failed. Default true for PR-create path. */
696
+ pushed?: boolean;
697
+ nowMs?: number;
698
+ /** Repo Sideboard passed to `gh -R` (origin), when known. */
699
+ targetedRepo?: string;
700
+ /** Head ref passed to `gh pr create` (often `owner:branch`). */
701
+ headRef?: string;
702
+ };
703
+ /**
704
+ * Turn noisy `gh pr create` / Execa failures into a short notice for UI/CLI.
705
+ */
706
+ declare function formatGhLandError(raw: string, opts?: FormatGhLandErrorOptions): string;
707
+ /** Strip Electron's IPC invoke wrapper, then humanize known gh failures. */
708
+ declare function formatIpcInvokeError(err: unknown): string;
709
+
671
710
  /**
672
711
  * Memorable worktree / thread labels (Conductor-style nicknames).
673
712
  * Slug is the directory + `thread/<slug>` branch; `name` is the UI title.
@@ -722,7 +761,7 @@ declare function worktreeDisplayLabelForGroup(threads: {
722
761
  declare function slugify(input: string): string;
723
762
  declare function resolveRepoRoot(cwd: string): Promise<string>;
724
763
  /**
725
- * Parse `owner/name` from a git remote URL (SSH or HTTPS).
764
+ * Parse `owner/name` from a git remote URL (SSH, HTTPS, or SSH host aliases).
726
765
  */
727
766
  declare function parseGithubSlugFromRemoteUrl(url: string): string | null;
728
767
  /**
@@ -735,6 +774,21 @@ declare function parseGithubSlugFromRemoteUrl(url: string): string | null;
735
774
  * resolves to upstream — which lists the wrong open PRs in the create modal.
736
775
  */
737
776
  declare function resolveGithubRepoSlug(repoPath: string): Promise<string | null>;
777
+ /** Global `-R owner/repo` args so gh never targets upstream by accident. */
778
+ declare function ghRepoSelectArgs(slug: string): string[];
779
+ /** Same-repo head ref as `owner:branch` (required for reliable `-R` creates). */
780
+ declare function ghHeadRef(slug: string, branch: string): string;
781
+ /**
782
+ * On Makerkit-style checkouts (`origin` product + `upstream` template), `gh`
783
+ * prefers `upstream` → so bare `gh pr create` hits the wrong GitHub repo.
784
+ * Pin the CLI default to `origin` once per repo (shared by all worktrees).
785
+ */
786
+ declare function ensureGhPreferOrigin(cwd: string): Promise<void>;
787
+ /**
788
+ * Env pin so bare `gh` (and agents) target this checkout's **origin**, not
789
+ * Makerkit-style `upstream`. `GH_REPO` is the CLI's documented override.
790
+ */
791
+ declare function originGhRepoEnv(cwd: string): Promise<Record<string, string>>;
738
792
  declare function resolveDefaultBranch(repoPath: string): Promise<string>;
739
793
  /**
740
794
  * Prefer `origin/<branch>` for diff/merge-base so Changes / Land don't inflate
@@ -768,7 +822,9 @@ declare function detectLocalMergeConflicts(cwd: string, baseRefName: string | nu
768
822
  * Returns `null` when no PR exists for the selector (so UI can show “link a PR”
769
823
  * instead of “no checks yet”). Returns `[]` when a PR exists but has no checks. */
770
824
  declare function getPrChecks(cwd: string, selector: string): Promise<PrCheckRun[] | null>;
771
- /** PR description / commits / reviews (+ checks) for the Review tab. */
825
+ /** Lightweight PR fields for the sidebar pill avoids nested reviews/checks GraphQL. */
826
+ declare function getPrMeta(cwd: string, selector: string): Promise<PrMeta | null>;
827
+ /** PR description / reviews for the Review tab (no nested CI — use getPrChecks). */
772
828
  declare function getPrDetails(cwd: string, selector: string): Promise<PrDetails | null>;
773
829
  declare function fetchPrHead(repoPath: string, number: number, localBranch: string): Promise<void>;
774
830
  interface CreateWorktreeResult {
@@ -1152,7 +1208,9 @@ declare function formatRenameBranchDirective(thread: Pick<Thread, 'worktreePath'
1152
1208
  * Mandatory Sideboard isolation + landing guidance — agents must edit the thread
1153
1209
  * worktree and open PRs whose titles/bodies describe the *purpose of the changes*.
1154
1210
  */
1155
- declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | 'repoPath' | 'branchName'> & Partial<Pick<Thread, 'title' | 'prUrl'>>): string;
1211
+ declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | 'repoPath' | 'branchName'> & Partial<Pick<Thread, 'title' | 'prUrl'>>, opts?: {
1212
+ githubSlug?: string | null;
1213
+ }): string;
1156
1214
  interface AgentInstructionFile {
1157
1215
  relativePath: string;
1158
1216
  content: string;
@@ -1712,6 +1770,7 @@ declare class Orchestrator {
1712
1770
  /** Resolve PR selector and optionally persist `prUrl` when found. */
1713
1771
  private withPrSelector;
1714
1772
  getPrChecks(threadRef: string): Promise<PrCheckRun[] | null>;
1773
+ getPrMeta(threadRef: string): Promise<PrMeta | null>;
1715
1774
  getPrDetails(threadRef: string): Promise<PrDetails | null>;
1716
1775
  setAutonomy(threadRef: string, autonomy: Autonomy): Thread;
1717
1776
  setThreadOptions(threadRef: string, patch: ThreadOptionsPatch): Thread;
@@ -1967,7 +2026,9 @@ interface IpcApi {
1967
2026
  initializeGit(threadRef: string): Promise<void>;
1968
2027
  /** CI checks for the thread's linked PR (`gh pr checks`). `null` = no PR. */
1969
2028
  getPrChecks(threadRef: string): Promise<PrCheckRun[] | null>;
1970
- /** PR description / commits / reviews for the Review tab. */
2029
+ /** Lightweight PR fields for the sidebar pill (cheap GraphQL). */
2030
+ getPrMeta(threadRef: string): Promise<PrMeta | null>;
2031
+ /** PR description / reviews for the Review tab. */
1971
2032
  getPrDetails(threadRef: string): Promise<PrDetails | null>;
1972
2033
  listFiles(threadRef: string): Promise<string[]>;
1973
2034
  readFile(threadRef: string, relativePath: string): Promise<{
@@ -2112,6 +2173,33 @@ interface IpcApi {
2112
2173
  exitCode: number | null;
2113
2174
  }>;
2114
2175
  openExternal(url: string): Promise<void>;
2176
+ /**
2177
+ * In-app URL preview via BrowserView (top-level navigation — works for
2178
+ * sites that block iframes, e.g. GitHub).
2179
+ */
2180
+ urlPreview: {
2181
+ show(opts: {
2182
+ url: string;
2183
+ bounds: {
2184
+ x: number;
2185
+ y: number;
2186
+ width: number;
2187
+ height: number;
2188
+ };
2189
+ }): Promise<void>;
2190
+ setBounds(bounds: {
2191
+ x: number;
2192
+ y: number;
2193
+ width: number;
2194
+ height: number;
2195
+ }): Promise<void>;
2196
+ navigate(url: string): Promise<void>;
2197
+ reload(): Promise<void>;
2198
+ hide(): Promise<void>;
2199
+ onNavigated(listener: (payload: {
2200
+ url: string;
2201
+ }) => void): () => void;
2202
+ };
2115
2203
  /** Main-process tsserver for real import/type diagnostics in the file UI. */
2116
2204
  tsserver: {
2117
2205
  start(worktreePath?: string): Promise<{
@@ -2281,4 +2369,4 @@ declare function writeInjectedMcpConfig(opts: {
2281
2369
  includeBrightsy?: boolean;
2282
2370
  }): Promise<string | null>;
2283
2371
 
2284
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatBrightsyFetchError, formatMessagesAsTranscript, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getRepoSetupInfo, getRunMode, getRunScript, gh, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isDirty, isGlobalRepoPath, isGlobalThread, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listConductorWorkspaces, listConnectedBrightsyTeams, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
2372
+ export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listConductorWorkspaces, listConnectedBrightsyTeams, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
package/dist/index.d.ts CHANGED
@@ -193,8 +193,20 @@ interface PrDetails {
193
193
  commits: PrCommitInfo[];
194
194
  comments: PrCommentInfo[];
195
195
  reviews: PrReviewInfo[];
196
+ /** Prefer `getPrChecks` — kept for callers; often empty to avoid nested GraphQL. */
196
197
  checks: PrCheckRun[];
197
198
  }
199
+ /** Lightweight PR fields for the sidebar pill (cheap GraphQL). */
200
+ interface PrMeta {
201
+ number: number;
202
+ title: string;
203
+ url: string;
204
+ state: string;
205
+ isDraft: boolean;
206
+ reviewDecision: string | null;
207
+ baseRefName: string;
208
+ headRefName: string;
209
+ }
198
210
  interface IssueInfo {
199
211
  id: string;
200
212
  identifier: string;
@@ -668,6 +680,33 @@ declare function gh(args: string[], cwd: string, opts?: {
668
680
  exitCode: number;
669
681
  }>;
670
682
 
683
+ /** Detect GitHub API / GraphQL rate-limit failures in gh CLI output. */
684
+ declare function isGhRateLimitError(text: string): boolean;
685
+ /** Relative wait hint from a Unix epoch reset timestamp (seconds). */
686
+ declare function formatRateLimitResetHint(resetEpochSec: number, nowMs?: number): string;
687
+ /**
688
+ * Prefer the trailing GraphQL/HTTP detail over the full `gh` command line
689
+ * (which can include a huge --body payload).
690
+ */
691
+ declare function extractGhErrorDetail(text: string): string;
692
+ type FormatGhLandErrorOptions = {
693
+ /** Unix epoch seconds when the GraphQL/core quota resets. */
694
+ resetAt?: number;
695
+ /** Land push already succeeded before PR create failed. Default true for PR-create path. */
696
+ pushed?: boolean;
697
+ nowMs?: number;
698
+ /** Repo Sideboard passed to `gh -R` (origin), when known. */
699
+ targetedRepo?: string;
700
+ /** Head ref passed to `gh pr create` (often `owner:branch`). */
701
+ headRef?: string;
702
+ };
703
+ /**
704
+ * Turn noisy `gh pr create` / Execa failures into a short notice for UI/CLI.
705
+ */
706
+ declare function formatGhLandError(raw: string, opts?: FormatGhLandErrorOptions): string;
707
+ /** Strip Electron's IPC invoke wrapper, then humanize known gh failures. */
708
+ declare function formatIpcInvokeError(err: unknown): string;
709
+
671
710
  /**
672
711
  * Memorable worktree / thread labels (Conductor-style nicknames).
673
712
  * Slug is the directory + `thread/<slug>` branch; `name` is the UI title.
@@ -722,7 +761,7 @@ declare function worktreeDisplayLabelForGroup(threads: {
722
761
  declare function slugify(input: string): string;
723
762
  declare function resolveRepoRoot(cwd: string): Promise<string>;
724
763
  /**
725
- * Parse `owner/name` from a git remote URL (SSH or HTTPS).
764
+ * Parse `owner/name` from a git remote URL (SSH, HTTPS, or SSH host aliases).
726
765
  */
727
766
  declare function parseGithubSlugFromRemoteUrl(url: string): string | null;
728
767
  /**
@@ -735,6 +774,21 @@ declare function parseGithubSlugFromRemoteUrl(url: string): string | null;
735
774
  * resolves to upstream — which lists the wrong open PRs in the create modal.
736
775
  */
737
776
  declare function resolveGithubRepoSlug(repoPath: string): Promise<string | null>;
777
+ /** Global `-R owner/repo` args so gh never targets upstream by accident. */
778
+ declare function ghRepoSelectArgs(slug: string): string[];
779
+ /** Same-repo head ref as `owner:branch` (required for reliable `-R` creates). */
780
+ declare function ghHeadRef(slug: string, branch: string): string;
781
+ /**
782
+ * On Makerkit-style checkouts (`origin` product + `upstream` template), `gh`
783
+ * prefers `upstream` → so bare `gh pr create` hits the wrong GitHub repo.
784
+ * Pin the CLI default to `origin` once per repo (shared by all worktrees).
785
+ */
786
+ declare function ensureGhPreferOrigin(cwd: string): Promise<void>;
787
+ /**
788
+ * Env pin so bare `gh` (and agents) target this checkout's **origin**, not
789
+ * Makerkit-style `upstream`. `GH_REPO` is the CLI's documented override.
790
+ */
791
+ declare function originGhRepoEnv(cwd: string): Promise<Record<string, string>>;
738
792
  declare function resolveDefaultBranch(repoPath: string): Promise<string>;
739
793
  /**
740
794
  * Prefer `origin/<branch>` for diff/merge-base so Changes / Land don't inflate
@@ -768,7 +822,9 @@ declare function detectLocalMergeConflicts(cwd: string, baseRefName: string | nu
768
822
  * Returns `null` when no PR exists for the selector (so UI can show “link a PR”
769
823
  * instead of “no checks yet”). Returns `[]` when a PR exists but has no checks. */
770
824
  declare function getPrChecks(cwd: string, selector: string): Promise<PrCheckRun[] | null>;
771
- /** PR description / commits / reviews (+ checks) for the Review tab. */
825
+ /** Lightweight PR fields for the sidebar pill avoids nested reviews/checks GraphQL. */
826
+ declare function getPrMeta(cwd: string, selector: string): Promise<PrMeta | null>;
827
+ /** PR description / reviews for the Review tab (no nested CI — use getPrChecks). */
772
828
  declare function getPrDetails(cwd: string, selector: string): Promise<PrDetails | null>;
773
829
  declare function fetchPrHead(repoPath: string, number: number, localBranch: string): Promise<void>;
774
830
  interface CreateWorktreeResult {
@@ -1152,7 +1208,9 @@ declare function formatRenameBranchDirective(thread: Pick<Thread, 'worktreePath'
1152
1208
  * Mandatory Sideboard isolation + landing guidance — agents must edit the thread
1153
1209
  * worktree and open PRs whose titles/bodies describe the *purpose of the changes*.
1154
1210
  */
1155
- declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | 'repoPath' | 'branchName'> & Partial<Pick<Thread, 'title' | 'prUrl'>>): string;
1211
+ declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | 'repoPath' | 'branchName'> & Partial<Pick<Thread, 'title' | 'prUrl'>>, opts?: {
1212
+ githubSlug?: string | null;
1213
+ }): string;
1156
1214
  interface AgentInstructionFile {
1157
1215
  relativePath: string;
1158
1216
  content: string;
@@ -1712,6 +1770,7 @@ declare class Orchestrator {
1712
1770
  /** Resolve PR selector and optionally persist `prUrl` when found. */
1713
1771
  private withPrSelector;
1714
1772
  getPrChecks(threadRef: string): Promise<PrCheckRun[] | null>;
1773
+ getPrMeta(threadRef: string): Promise<PrMeta | null>;
1715
1774
  getPrDetails(threadRef: string): Promise<PrDetails | null>;
1716
1775
  setAutonomy(threadRef: string, autonomy: Autonomy): Thread;
1717
1776
  setThreadOptions(threadRef: string, patch: ThreadOptionsPatch): Thread;
@@ -1967,7 +2026,9 @@ interface IpcApi {
1967
2026
  initializeGit(threadRef: string): Promise<void>;
1968
2027
  /** CI checks for the thread's linked PR (`gh pr checks`). `null` = no PR. */
1969
2028
  getPrChecks(threadRef: string): Promise<PrCheckRun[] | null>;
1970
- /** PR description / commits / reviews for the Review tab. */
2029
+ /** Lightweight PR fields for the sidebar pill (cheap GraphQL). */
2030
+ getPrMeta(threadRef: string): Promise<PrMeta | null>;
2031
+ /** PR description / reviews for the Review tab. */
1971
2032
  getPrDetails(threadRef: string): Promise<PrDetails | null>;
1972
2033
  listFiles(threadRef: string): Promise<string[]>;
1973
2034
  readFile(threadRef: string, relativePath: string): Promise<{
@@ -2112,6 +2173,33 @@ interface IpcApi {
2112
2173
  exitCode: number | null;
2113
2174
  }>;
2114
2175
  openExternal(url: string): Promise<void>;
2176
+ /**
2177
+ * In-app URL preview via BrowserView (top-level navigation — works for
2178
+ * sites that block iframes, e.g. GitHub).
2179
+ */
2180
+ urlPreview: {
2181
+ show(opts: {
2182
+ url: string;
2183
+ bounds: {
2184
+ x: number;
2185
+ y: number;
2186
+ width: number;
2187
+ height: number;
2188
+ };
2189
+ }): Promise<void>;
2190
+ setBounds(bounds: {
2191
+ x: number;
2192
+ y: number;
2193
+ width: number;
2194
+ height: number;
2195
+ }): Promise<void>;
2196
+ navigate(url: string): Promise<void>;
2197
+ reload(): Promise<void>;
2198
+ hide(): Promise<void>;
2199
+ onNavigated(listener: (payload: {
2200
+ url: string;
2201
+ }) => void): () => void;
2202
+ };
2115
2203
  /** Main-process tsserver for real import/type diagnostics in the file UI. */
2116
2204
  tsserver: {
2117
2205
  start(worktreePath?: string): Promise<{
@@ -2281,4 +2369,4 @@ declare function writeInjectedMcpConfig(opts: {
2281
2369
  includeBrightsy?: boolean;
2282
2370
  }): Promise<string | null>;
2283
2371
 
2284
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatBrightsyFetchError, formatMessagesAsTranscript, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getRepoSetupInfo, getRunMode, getRunScript, gh, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isDirty, isGlobalRepoPath, isGlobalThread, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listConductorWorkspaces, listConnectedBrightsyTeams, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
2372
+ export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listConductorWorkspaces, listConnectedBrightsyTeams, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
package/dist/index.js CHANGED
@@ -93,14 +93,14 @@ import {
93
93
  withAgentInstructions,
94
94
  worktreeCleanupSettings,
95
95
  writeWorktreeFile
96
- } from "./chunk-E4PWXO2C.js";
96
+ } from "./chunk-WWBC56EL.js";
97
97
  import {
98
98
  addWorkspace,
99
99
  ensureWorkspace,
100
100
  listWorkspaces,
101
101
  removeWorkspace,
102
102
  syncWorkspacesFromThreads
103
- } from "./chunk-TLJH3L2C.js";
103
+ } from "./chunk-LIUV5ONW.js";
104
104
  import {
105
105
  CLOUD_COORDINATOR_BUSY_REPLY,
106
106
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -120,7 +120,7 @@ import {
120
120
  orchestratorSessionPoisonedByBuiltins,
121
121
  parseForceStopMessage,
122
122
  takenTeamSlugsForOrchestration
123
- } from "./chunk-2M4OHXYX.js";
123
+ } from "./chunk-5263JXQY.js";
124
124
  import {
125
125
  COORDINATOR_TOOL_PLAYBOOK,
126
126
  coordinatorSystemPrompt,
@@ -128,7 +128,7 @@ import {
128
128
  enrichWorkspacesWithGithub,
129
129
  ensureGlobalCoordinatorCwd,
130
130
  formatWorkspaceInventory
131
- } from "./chunk-2R5VV4BA.js";
131
+ } from "./chunk-SNHWAARD.js";
132
132
  import {
133
133
  BRIGHTSY_MCP_ALLOWED_TOOLS,
134
134
  MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
@@ -158,7 +158,7 @@ import {
158
158
  permissionMode,
159
159
  sanitizeMcpServerName,
160
160
  writeInjectedMcpConfig
161
- } from "./chunk-WMCPLDW3.js";
161
+ } from "./chunk-JQJZTL2Q.js";
162
162
  import {
163
163
  brightsyConfigPath,
164
164
  brightsyMcpServerName,
@@ -216,17 +216,27 @@ import {
216
216
  createThreadWorktree,
217
217
  currentBranch,
218
218
  detectLocalMergeConflicts,
219
+ ensureGhPreferOrigin,
220
+ extractGhErrorDetail,
219
221
  fetchPrHead,
222
+ formatGhLandError,
223
+ formatIpcInvokeError,
224
+ formatRateLimitResetHint,
220
225
  getPr,
221
226
  getPrChecks,
222
227
  getPrDetails,
228
+ getPrMeta,
229
+ ghHeadRef,
230
+ ghRepoSelectArgs,
223
231
  isDirty,
232
+ isGhRateLimitError,
224
233
  isPlaceholderBranch,
225
234
  listBranches,
226
235
  listPrs,
227
236
  listWorktrees,
228
237
  mergePr,
229
238
  normalizeWorktreePath,
239
+ originGhRepoEnv,
230
240
  parseGithubSlugFromRemoteUrl,
231
241
  pushBranch,
232
242
  removeWorktree,
@@ -242,7 +252,7 @@ import {
242
252
  worktreeDisplayLabel,
243
253
  worktreeDisplayLabelForGroup,
244
254
  worktreeNameFromPath
245
- } from "./chunk-LL7DTZ5B.js";
255
+ } from "./chunk-LXHSRNJJ.js";
246
256
  import {
247
257
  appendMessage,
248
258
  createEmptyThread,
@@ -747,11 +757,13 @@ export {
747
757
  enrichWorkspacesWithGithub,
748
758
  ensureAgentPath,
749
759
  ensureCloudCoordinator,
760
+ ensureGhPreferOrigin,
750
761
  ensureGlobalCoordinatorCwd,
751
762
  ensureWorkspace,
752
763
  estimateMessageChars,
753
764
  estimateThreadChars,
754
765
  expandComposerPrompt,
766
+ extractGhErrorDetail,
755
767
  extractiveSummary,
756
768
  fetchPrHead,
757
769
  finalizeParts,
@@ -764,7 +776,10 @@ export {
764
776
  forkThreadWorktree,
765
777
  formatAgentInstructions,
766
778
  formatBrightsyFetchError,
779
+ formatGhLandError,
780
+ formatIpcInvokeError,
767
781
  formatMessagesAsTranscript,
782
+ formatRateLimitResetHint,
768
783
  formatRenameBranchDirective,
769
784
  formatTranscriptMarkdown,
770
785
  formatWorkspaceInventory,
@@ -781,10 +796,13 @@ export {
781
796
  getPr,
782
797
  getPrChecks,
783
798
  getPrDetails,
799
+ getPrMeta,
784
800
  getRepoSetupInfo,
785
801
  getRunMode,
786
802
  getRunScript,
787
803
  gh,
804
+ ghHeadRef,
805
+ ghRepoSelectArgs,
788
806
  git,
789
807
  globalAgentCwd,
790
808
  harnessEnvKey,
@@ -801,6 +819,7 @@ export {
801
819
  isBrightsyNdjsonLine,
802
820
  isCloudCoordinatorThread,
803
821
  isDirty,
822
+ isGhRateLimitError,
804
823
  isGlobalRepoPath,
805
824
  isGlobalThread,
806
825
  isLinearConnected,
@@ -843,6 +862,7 @@ export {
843
862
  opencodeAdapter,
844
863
  orchestrationTitleNeedsSoccerNickname,
845
864
  orchestratorSessionPoisonedByBuiltins,
865
+ originGhRepoEnv,
846
866
  parseCursorRunnerLine,
847
867
  parseForceStopMessage,
848
868
  parseGithubSlugFromRemoteUrl,