@sideboard-ai/core 0.1.49 → 0.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/{agents-3P4N6KHC.js → agents-5ROTZNCX.js} +3 -3
  2. package/dist/{agents-LUB3Q773.js → agents-HIEJL3UV.js} +3 -3
  3. package/dist/{chunk-SS34TVSY.js → chunk-5ZPSH7VI.js} +3 -3
  4. package/dist/{chunk-RQI4TOXK.js → chunk-7EUWSBWR.js} +3 -3
  5. package/dist/{chunk-AJ6ROGD7.js → chunk-7LNGIP3X.js} +20 -2
  6. package/dist/{chunk-ILQK4P5R.js → chunk-BXJ76RHF.js} +4 -4
  7. package/dist/{chunk-3NAS4MWH.js → chunk-E4VVEKAM.js} +2 -2
  8. package/dist/{chunk-GZXBYHJC.js → chunk-F4Q3IM6V.js} +1 -1
  9. package/dist/{chunk-E35APBHV.js → chunk-H6GGDLYS.js} +1 -1
  10. package/dist/{chunk-ZQCQIWIP.js → chunk-K3WMKGFY.js} +1 -1
  11. package/dist/{chunk-5WYEJ3F3.js → chunk-O5DOO7DP.js} +2 -2
  12. package/dist/{chunk-V4JRXYYU.js → chunk-QN7XNQAT.js} +2 -2
  13. package/dist/{chunk-ZVV5EEQN.js → chunk-XRSAGVRW.js} +62 -17
  14. package/dist/{chunk-DF5VQQKA.js → chunk-YFJ4FG2P.js} +2 -2
  15. package/dist/{chunk-FV6FN6V5.js → chunk-ZH5QZ4CR.js} +62 -17
  16. package/dist/{chunk-ISY4EGF6.js → chunk-ZNM4MAN4.js} +20 -2
  17. package/dist/{connected-teams-UBXHZGO4.js → connected-teams-2ANNZCP5.js} +2 -2
  18. package/dist/{connected-teams-GF52Q7LB.js → connected-teams-ONC4666A.js} +2 -2
  19. package/dist/{coordinator-prompt-VG4BZ5JL.js → coordinator-prompt-7HHJRO7B.js} +3 -3
  20. package/dist/{coordinator-prompt-SPGDT7J5.js → coordinator-prompt-WD7FAMA2.js} +3 -3
  21. package/dist/{global-workspace-KSR3E63K.js → global-workspace-ECYN2MKL.js} +4 -4
  22. package/dist/{global-workspace-OJF4ENH4.js → global-workspace-OJEPGDXA.js} +4 -4
  23. package/dist/index.cjs +92 -21
  24. package/dist/index.d.cts +11 -1
  25. package/dist/index.d.ts +11 -1
  26. package/dist/index.js +30 -21
  27. package/dist/mcp/run-stdio.cjs +88 -21
  28. package/dist/mcp/run-stdio.js +26 -20
  29. package/dist/{run-HMRSRG3U.js → run-H3IMNOYN.js} +3 -1
  30. package/dist/run-ZJKYHXGN.js +12 -0
  31. package/dist/{workspaces-OZE7LRDO.js → workspaces-MUU7RGVV.js} +5 -5
  32. package/dist/{workspaces-UJX7JIGH.js → workspaces-ZWOOFZUV.js} +5 -5
  33. package/dist/{worktree-XG5PCLZY.js → worktree-DVNDMWZ7.js} +4 -2
  34. package/dist/{worktree-TEDAJ57S.js → worktree-GDV56MX4.js} +4 -2
  35. package/package.json +1 -1
  36. package/dist/run-LF6E5IKL.js +0 -10
package/dist/index.cjs CHANGED
@@ -2044,6 +2044,7 @@ var run_exports = {};
2044
2044
  __export(run_exports, {
2045
2045
  gh: () => gh,
2046
2046
  git: () => git,
2047
+ resolveGhAuthToken: () => resolveGhAuthToken,
2047
2048
  run: () => run
2048
2049
  });
2049
2050
  async function run(file, args, opts) {
@@ -2072,11 +2073,28 @@ async function run(file, args, opts) {
2072
2073
  }
2073
2074
  }
2074
2075
  async function git(args, cwd, opts) {
2075
- return run("git", args, { cwd, reject: opts?.reject });
2076
+ const prefix = [];
2077
+ if (opts?.config) {
2078
+ for (const [key, value] of Object.entries(opts.config)) {
2079
+ if (!key) continue;
2080
+ prefix.push("-c", `${key}=${value}`);
2081
+ }
2082
+ }
2083
+ return run("git", [...prefix, ...args], {
2084
+ cwd,
2085
+ reject: opts?.reject,
2086
+ env: opts?.env
2087
+ });
2076
2088
  }
2077
2089
  async function gh(args, cwd, opts) {
2078
2090
  return run("gh", args, { cwd, reject: opts?.reject });
2079
2091
  }
2092
+ async function resolveGhAuthToken(cwd) {
2093
+ const result = await gh(["auth", "token"], cwd, { reject: false });
2094
+ if (result.exitCode !== 0) return null;
2095
+ const token = result.stdout.trim();
2096
+ return token || null;
2097
+ }
2080
2098
  var import_execa;
2081
2099
  var init_run = __esm({
2082
2100
  "src/git/run.ts"() {
@@ -2201,6 +2219,7 @@ __export(worktree_exports, {
2201
2219
  ghRepoSelectArgs: () => ghRepoSelectArgs,
2202
2220
  isDirty: () => isDirty,
2203
2221
  isPlaceholderBranch: () => isPlaceholderBranch,
2222
+ isSideboardScratchPath: () => isSideboardScratchPath,
2204
2223
  listBranches: () => listBranches,
2205
2224
  listPrs: () => listPrs,
2206
2225
  listWorktrees: () => listWorktrees,
@@ -2730,18 +2749,31 @@ async function fetchPrHead(repoPath, number, localBranch) {
2730
2749
  const slug = await resolveGithubRepoSlug(repoPath);
2731
2750
  const refspec = `+pull/${number}/head:${localBranch}`;
2732
2751
  const errors = [];
2733
- const tryFetch = async (remote) => {
2734
- const result = await git(["fetch", remote, refspec], repoPath, {
2735
- reject: false
2736
- });
2752
+ const httpsRemote = slug ? `https://github.com/${slug}.git` : null;
2753
+ const tryFetch = async (remote, opts) => {
2754
+ const label = opts?.ghAuth ? `${remote} (gh auth)` : remote;
2755
+ const gitOpts = { reject: false };
2756
+ if (opts?.ghAuth) {
2757
+ const token = await resolveGhAuthToken(repoPath);
2758
+ if (!token) {
2759
+ errors.push(`${label}: gh auth token unavailable`);
2760
+ return false;
2761
+ }
2762
+ gitOpts.env = { GIT_TERMINAL_PROMPT: "0" };
2763
+ gitOpts.config = {
2764
+ "http.extraHeader": `AUTHORIZATION: bearer ${token}`
2765
+ };
2766
+ }
2767
+ const result = await git(["fetch", remote, refspec], repoPath, gitOpts);
2737
2768
  if (result.exitCode === 0) return true;
2738
2769
  const detail = (result.stderr || result.stdout).trim();
2739
- if (detail) errors.push(`${remote}: ${detail}`);
2770
+ if (detail) errors.push(`${label}: ${detail}`);
2740
2771
  return false;
2741
2772
  };
2742
2773
  let fetched = await tryFetch("origin");
2743
- if (!fetched && slug) {
2744
- fetched = await tryFetch(`https://github.com/${slug}.git`);
2774
+ if (!fetched && httpsRemote) {
2775
+ fetched = await tryFetch(httpsRemote);
2776
+ if (!fetched) fetched = await tryFetch(httpsRemote, { ghAuth: true });
2745
2777
  }
2746
2778
  const localOk = async () => {
2747
2779
  const verify = await git(["rev-parse", "--verify", localBranch], repoPath, {
@@ -2770,18 +2802,28 @@ async function fetchPrHead(repoPath, number, localBranch) {
2770
2802
  }
2771
2803
  }
2772
2804
  if (oid) {
2773
- const ensureOid = async (remote) => {
2774
- const got = await git(["fetch", remote, oid], repoPath, {
2775
- reject: false
2776
- });
2805
+ const ensureOid = async (remote, opts) => {
2806
+ const gitOpts = { reject: false };
2807
+ if (opts?.ghAuth) {
2808
+ const token = await resolveGhAuthToken(repoPath);
2809
+ if (!token) return false;
2810
+ gitOpts.env = { GIT_TERMINAL_PROMPT: "0" };
2811
+ gitOpts.config = {
2812
+ "http.extraHeader": `AUTHORIZATION: bearer ${token}`
2813
+ };
2814
+ }
2815
+ const got = await git(["fetch", remote, oid], repoPath, gitOpts);
2777
2816
  return got.exitCode === 0;
2778
2817
  };
2779
2818
  let haveObject = (await git(["cat-file", "-e", `${oid}^{commit}`], repoPath, {
2780
2819
  reject: false
2781
2820
  })).exitCode === 0;
2782
2821
  if (!haveObject) haveObject = await ensureOid("origin");
2783
- if (!haveObject && slug) {
2784
- haveObject = await ensureOid(`https://github.com/${slug}.git`);
2822
+ if (!haveObject && httpsRemote) {
2823
+ haveObject = await ensureOid(httpsRemote);
2824
+ if (!haveObject) {
2825
+ haveObject = await ensureOid(httpsRemote, { ghAuth: true });
2826
+ }
2785
2827
  }
2786
2828
  if (haveObject) {
2787
2829
  const branched = await git(["branch", "-f", localBranch, oid], repoPath, {
@@ -2905,8 +2947,28 @@ async function listWorktrees(repoPath) {
2905
2947
  return entries;
2906
2948
  }
2907
2949
  async function isDirty(worktreePath) {
2908
- const { stdout } = await git(["status", "--porcelain"], worktreePath);
2909
- return stdout.trim().length > 0;
2950
+ const { stdout } = await git(["status", "--porcelain", "-uall"], worktreePath);
2951
+ for (const line of stdout.split("\n")) {
2952
+ if (!line.trim()) continue;
2953
+ const rel = porcelainStatusPath(line);
2954
+ if (!rel || isSideboardScratchPath(rel)) continue;
2955
+ return true;
2956
+ }
2957
+ return false;
2958
+ }
2959
+ function isSideboardScratchPath(relativePath) {
2960
+ const p = relativePath.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/$/, "");
2961
+ return p === ".sideboard/attachments" || p.startsWith(".sideboard/attachments/");
2962
+ }
2963
+ function porcelainStatusPath(line) {
2964
+ const rest = line.length >= 3 ? line.slice(3) : "";
2965
+ if (!rest) return "";
2966
+ const arrow = rest.lastIndexOf(" -> ");
2967
+ const raw = arrow >= 0 ? rest.slice(arrow + 4) : rest;
2968
+ if (raw.startsWith('"') && raw.endsWith('"')) {
2969
+ return raw.slice(1, -1).replace(/\\([\\"])/g, "$1");
2970
+ }
2971
+ return raw;
2910
2972
  }
2911
2973
  async function currentBranch(worktreePath) {
2912
2974
  const { stdout } = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath);
@@ -6551,6 +6613,7 @@ __export(index_exports, {
6551
6613
  isPidAlive: () => isPidAlive,
6552
6614
  isPlaceholderBranch: () => isPlaceholderBranch,
6553
6615
  isSessionQuotaLimit: () => isSessionQuotaLimit,
6616
+ isSideboardScratchPath: () => isSideboardScratchPath,
6554
6617
  isThinkingEffort: () => isThinkingEffort,
6555
6618
  listAgentSetupInfo: () => listAgentSetupInfo,
6556
6619
  listBranchCommits: () => listBranchCommits,
@@ -6632,6 +6695,7 @@ __export(index_exports, {
6632
6695
  resolveDiffBaseRef: () => resolveDiffBaseRef,
6633
6696
  resolveEffectiveIssueSource: () => resolveEffectiveIssueSource,
6634
6697
  resolveFilesToCopy: () => resolveFilesToCopy,
6698
+ resolveGhAuthToken: () => resolveGhAuthToken,
6635
6699
  resolveGithubRepoSlug: () => resolveGithubRepoSlug,
6636
6700
  resolvePrSelector: () => resolvePrSelector,
6637
6701
  resolveQuotaFallbackAgent: () => resolveQuotaFallbackAgent,
@@ -7927,6 +7991,15 @@ async function resolveMergeBase(worktreePath, base, repoPath) {
7927
7991
  return mb || baseRef;
7928
7992
  }
7929
7993
  async function countUnpushedCommits(worktreePath) {
7994
+ const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
7995
+ reject: false
7996
+ });
7997
+ const branch = head.stdout.trim();
7998
+ if (branch && branch !== "HEAD") {
7999
+ await git(["fetch", "origin", branch, "--quiet"], worktreePath, {
8000
+ reject: false
8001
+ });
8002
+ }
7930
8003
  const upstream = await git(
7931
8004
  ["rev-list", "--count", "@{upstream}..HEAD"],
7932
8005
  worktreePath,
@@ -7936,10 +8009,6 @@ async function countUnpushedCommits(worktreePath) {
7936
8009
  const n2 = Number(upstream.stdout.trim());
7937
8010
  return Number.isFinite(n2) ? n2 : 0;
7938
8011
  }
7939
- const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
7940
- reject: false
7941
- });
7942
- const branch = head.stdout.trim();
7943
8012
  if (!branch || branch === "HEAD") return 0;
7944
8013
  const remote = await git(
7945
8014
  ["rev-list", "--count", `origin/${branch}..HEAD`],
@@ -7985,7 +8054,7 @@ async function listUntrackedPaths(worktreePath) {
7985
8054
  worktreePath,
7986
8055
  { reject: false }
7987
8056
  );
7988
- return stdout.split("\0").filter(Boolean);
8057
+ return stdout.split("\0").filter(Boolean).filter((p) => !isSideboardScratchPath(p));
7989
8058
  }
7990
8059
  async function listUntrackedFiles(worktreePath, maxHunk) {
7991
8060
  const paths = await listUntrackedPaths(worktreePath);
@@ -13126,6 +13195,7 @@ init_injected_mcp();
13126
13195
  isPidAlive,
13127
13196
  isPlaceholderBranch,
13128
13197
  isSessionQuotaLimit,
13198
+ isSideboardScratchPath,
13129
13199
  isThinkingEffort,
13130
13200
  listAgentSetupInfo,
13131
13201
  listBranchCommits,
@@ -13207,6 +13277,7 @@ init_injected_mcp();
13207
13277
  resolveDiffBaseRef,
13208
13278
  resolveEffectiveIssueSource,
13209
13279
  resolveFilesToCopy,
13280
+ resolveGhAuthToken,
13210
13281
  resolveGithubRepoSlug,
13211
13282
  resolvePrSelector,
13212
13283
  resolveQuotaFallbackAgent,
package/dist/index.d.cts CHANGED
@@ -800,6 +800,9 @@ declare function run(file: string, args: string[], opts?: {
800
800
  }>;
801
801
  declare function git(args: string[], cwd: string, opts?: {
802
802
  reject?: boolean;
803
+ env?: Record<string, string>;
804
+ /** Passed as `git -c key=value` (e.g. authenticated HTTPS via http.extraHeader). */
805
+ config?: Record<string, string>;
803
806
  }): Promise<{
804
807
  stdout: string;
805
808
  stderr: string;
@@ -812,6 +815,8 @@ declare function gh(args: string[], cwd: string, opts?: {
812
815
  stderr: string;
813
816
  exitCode: number;
814
817
  }>;
818
+ /** GitHub CLI token for non-interactive HTTPS git (GUI apps often lack SSH agent). */
819
+ declare function resolveGhAuthToken(cwd: string): Promise<string | null>;
815
820
 
816
821
  /** Detect GitHub API / GraphQL rate-limit failures in gh CLI output. */
817
822
  declare function isGhRateLimitError(text: string): boolean;
@@ -984,6 +989,11 @@ declare function listWorktrees(repoPath: string): Promise<Array<{
984
989
  branch: string | null;
985
990
  }>>;
986
991
  declare function isDirty(worktreePath: string): Promise<boolean>;
992
+ /**
993
+ * Local Sideboard attachment scratch (review guidelines seed, composer drops).
994
+ * Must not force the right-sidebar primary action to "Commit & push".
995
+ */
996
+ declare function isSideboardScratchPath(relativePath: string): boolean;
987
997
  declare function currentBranch(worktreePath: string): Promise<string>;
988
998
  declare function commitAll(worktreePath: string, message: string): Promise<boolean>;
989
999
  declare function pushBranch(worktreePath: string, branchName: string): Promise<void>;
@@ -2910,4 +2920,4 @@ declare function writeInjectedMcpConfig(opts: {
2910
2920
  includeBrightsy?: boolean;
2911
2921
  }): Promise<string | null>;
2912
2922
 
2913
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, 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, ensureReviewRequestFile, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
2923
+ export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, 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, ensureReviewRequestFile, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isSideboardScratchPath, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
package/dist/index.d.ts CHANGED
@@ -800,6 +800,9 @@ declare function run(file: string, args: string[], opts?: {
800
800
  }>;
801
801
  declare function git(args: string[], cwd: string, opts?: {
802
802
  reject?: boolean;
803
+ env?: Record<string, string>;
804
+ /** Passed as `git -c key=value` (e.g. authenticated HTTPS via http.extraHeader). */
805
+ config?: Record<string, string>;
803
806
  }): Promise<{
804
807
  stdout: string;
805
808
  stderr: string;
@@ -812,6 +815,8 @@ declare function gh(args: string[], cwd: string, opts?: {
812
815
  stderr: string;
813
816
  exitCode: number;
814
817
  }>;
818
+ /** GitHub CLI token for non-interactive HTTPS git (GUI apps often lack SSH agent). */
819
+ declare function resolveGhAuthToken(cwd: string): Promise<string | null>;
815
820
 
816
821
  /** Detect GitHub API / GraphQL rate-limit failures in gh CLI output. */
817
822
  declare function isGhRateLimitError(text: string): boolean;
@@ -984,6 +989,11 @@ declare function listWorktrees(repoPath: string): Promise<Array<{
984
989
  branch: string | null;
985
990
  }>>;
986
991
  declare function isDirty(worktreePath: string): Promise<boolean>;
992
+ /**
993
+ * Local Sideboard attachment scratch (review guidelines seed, composer drops).
994
+ * Must not force the right-sidebar primary action to "Commit & push".
995
+ */
996
+ declare function isSideboardScratchPath(relativePath: string): boolean;
987
997
  declare function currentBranch(worktreePath: string): Promise<string>;
988
998
  declare function commitAll(worktreePath: string, message: string): Promise<boolean>;
989
999
  declare function pushBranch(worktreePath: string, branchName: string): Promise<void>;
@@ -2910,4 +2920,4 @@ declare function writeInjectedMcpConfig(opts: {
2910
2920
  includeBrightsy?: boolean;
2911
2921
  }): Promise<string | null>;
2912
2922
 
2913
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, 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, ensureReviewRequestFile, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
2923
+ export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, 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, ensureReviewRequestFile, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isSessionQuotaLimit, isSideboardScratchPath, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, parseSessionQuotaResetAt, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubRepoSlug, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  listWorkspaces,
5
5
  removeWorkspace,
6
6
  syncWorkspacesFromThreads
7
- } from "./chunk-3NAS4MWH.js";
7
+ } from "./chunk-E4VVEKAM.js";
8
8
  import {
9
9
  CLOUD_COORDINATOR_BUSY_REPLY,
10
10
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -24,7 +24,7 @@ import {
24
24
  orchestratorSessionPoisonedByBuiltins,
25
25
  parseForceStopMessage,
26
26
  takenTeamSlugsForOrchestration
27
- } from "./chunk-5WYEJ3F3.js";
27
+ } from "./chunk-O5DOO7DP.js";
28
28
  import {
29
29
  BRIGHTSY_MCP_ALLOWED_TOOLS,
30
30
  CLAUDE_MODEL_CATALOG,
@@ -70,7 +70,7 @@ import {
70
70
  resolveQuotaFallbackAgent,
71
71
  sanitizeMcpServerName,
72
72
  writeInjectedMcpConfig
73
- } from "./chunk-SS34TVSY.js";
73
+ } from "./chunk-5ZPSH7VI.js";
74
74
  import {
75
75
  ORCHESTRATOR_AGENT_KINDS,
76
76
  assertOrchestratorCapableAgent,
@@ -88,7 +88,7 @@ import {
88
88
  loadBrightsyConfig,
89
89
  saveBrightsyConfig,
90
90
  switchBrightsyAccount
91
- } from "./chunk-ILQK4P5R.js";
91
+ } from "./chunk-BXJ76RHF.js";
92
92
  import {
93
93
  cursorSdkMessageToEvents,
94
94
  fallbackTurnFailDetail,
@@ -144,7 +144,7 @@ import {
144
144
  enrichWorkspacesWithGithub,
145
145
  ensureGlobalCoordinatorCwd,
146
146
  formatWorkspaceInventory
147
- } from "./chunk-ZQCQIWIP.js";
147
+ } from "./chunk-K3WMKGFY.js";
148
148
  import {
149
149
  FAMOUS_SOCCER_TEAMS,
150
150
  allocateTeamName,
@@ -171,6 +171,7 @@ import {
171
171
  isDirty,
172
172
  isGhRateLimitError,
173
173
  isPlaceholderBranch,
174
+ isSideboardScratchPath,
174
175
  listBranches,
175
176
  listPrs,
176
177
  listWorktrees,
@@ -194,7 +195,7 @@ import {
194
195
  worktreeDisplayLabel,
195
196
  worktreeDisplayLabelForGroup,
196
197
  worktreeNameFromPath
197
- } from "./chunk-FV6FN6V5.js";
198
+ } from "./chunk-ZH5QZ4CR.js";
198
199
  import {
199
200
  appendMessage,
200
201
  createEmptyThread,
@@ -243,8 +244,9 @@ import {
243
244
  ensureAgentPath,
244
245
  gh,
245
246
  git,
247
+ resolveGhAuthToken,
246
248
  run
247
- } from "./chunk-AJ6ROGD7.js";
249
+ } from "./chunk-7LNGIP3X.js";
248
250
 
249
251
  // src/integrations/github.ts
250
252
  async function getGitHubStatus() {
@@ -655,9 +657,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
655
657
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
656
658
  );
657
659
  }
658
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-KSR3E63K.js");
660
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-ECYN2MKL.js");
659
661
  if (isGlobalThread2(thread)) {
660
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-SPGDT7J5.js");
662
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-WD7FAMA2.js");
661
663
  ensureGlobalCoordinatorCwd2();
662
664
  }
663
665
  if (isOrchestratorThread(thread)) {
@@ -1433,6 +1435,15 @@ async function resolveMergeBase(worktreePath, base, repoPath) {
1433
1435
  return mb || baseRef;
1434
1436
  }
1435
1437
  async function countUnpushedCommits(worktreePath) {
1438
+ const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
1439
+ reject: false
1440
+ });
1441
+ const branch = head.stdout.trim();
1442
+ if (branch && branch !== "HEAD") {
1443
+ await git(["fetch", "origin", branch, "--quiet"], worktreePath, {
1444
+ reject: false
1445
+ });
1446
+ }
1436
1447
  const upstream = await git(
1437
1448
  ["rev-list", "--count", "@{upstream}..HEAD"],
1438
1449
  worktreePath,
@@ -1442,10 +1453,6 @@ async function countUnpushedCommits(worktreePath) {
1442
1453
  const n2 = Number(upstream.stdout.trim());
1443
1454
  return Number.isFinite(n2) ? n2 : 0;
1444
1455
  }
1445
- const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
1446
- reject: false
1447
- });
1448
- const branch = head.stdout.trim();
1449
1456
  if (!branch || branch === "HEAD") return 0;
1450
1457
  const remote = await git(
1451
1458
  ["rev-list", "--count", `origin/${branch}..HEAD`],
@@ -1491,7 +1498,7 @@ async function listUntrackedPaths(worktreePath) {
1491
1498
  worktreePath,
1492
1499
  { reject: false }
1493
1500
  );
1494
- return stdout.split("\0").filter(Boolean);
1501
+ return stdout.split("\0").filter(Boolean).filter((p) => !isSideboardScratchPath(p));
1495
1502
  }
1496
1503
  async function listUntrackedFiles(worktreePath, maxHunk) {
1497
1504
  const paths = await listUntrackedPaths(worktreePath);
@@ -2776,7 +2783,7 @@ async function previewLand(thread) {
2776
2783
  const target = await resolveDefaultBranch(thread.repoPath);
2777
2784
  if (thread.branchName === target || thread.branchName === "main" || thread.branchName === "master") {
2778
2785
  }
2779
- const { stdout: head } = await import("./run-LF6E5IKL.js").then(
2786
+ const { stdout: head } = await import("./run-ZJKYHXGN.js").then(
2780
2787
  ({ git: git2 }) => git2(["rev-parse", "--abbrev-ref", "HEAD"], thread.worktreePath)
2781
2788
  );
2782
2789
  const current = head.trim();
@@ -2815,7 +2822,7 @@ async function confirmLand(thread, opts) {
2815
2822
  if (preview.dirty) {
2816
2823
  committed = await commitAll(thread.worktreePath, meta.commitMessage);
2817
2824
  }
2818
- const { git: git2 } = await import("./run-LF6E5IKL.js");
2825
+ const { git: git2 } = await import("./run-ZJKYHXGN.js");
2819
2826
  const { stdout: headOut } = await git2(
2820
2827
  ["rev-parse", "--abbrev-ref", "HEAD"],
2821
2828
  thread.worktreePath,
@@ -2923,7 +2930,7 @@ async function createThread(input, onSetupLine) {
2923
2930
  return readThread(thread.id) ?? thread;
2924
2931
  }
2925
2932
  async function listLinearIssues(agent, repoPath) {
2926
- const { getAdapter: getAdapter2 } = await import("./agents-3P4N6KHC.js");
2933
+ const { getAdapter: getAdapter2 } = await import("./agents-5ROTZNCX.js");
2927
2934
  await requireAgent(agent, { requireLinear: true });
2928
2935
  const adapter = getAdapter2(agent);
2929
2936
  if (!adapter.listLinearIssues) {
@@ -3153,7 +3160,7 @@ async function adoptThread(input) {
3153
3160
  throw new Error(`Worktree not found: ${input.worktreePath}`);
3154
3161
  }
3155
3162
  const repoPath = await resolveRepoRoot(input.worktreePath);
3156
- const { stdout: branch } = await import("./run-LF6E5IKL.js").then(
3163
+ const { stdout: branch } = await import("./run-ZJKYHXGN.js").then(
3157
3164
  ({ git: git2 }) => git2(["rev-parse", "--abbrev-ref", "HEAD"], input.worktreePath)
3158
3165
  );
3159
3166
  const thread = createEmptyThread({
@@ -3168,7 +3175,7 @@ async function adoptThread(input) {
3168
3175
  messages: input.messages ?? []
3169
3176
  });
3170
3177
  writeThread(thread);
3171
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-UJX7JIGH.js");
3178
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-ZWOOFZUV.js");
3172
3179
  await ensureWorkspace2(repoPath);
3173
3180
  return thread;
3174
3181
  }
@@ -5230,7 +5237,7 @@ var Orchestrator = class {
5230
5237
  return setStatus(thread.id, "idle");
5231
5238
  }
5232
5239
  if (!existsSync12(thread.worktreePath)) {
5233
- const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-TEDAJ57S.js");
5240
+ const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-GDV56MX4.js");
5234
5241
  const { execa: execa6 } = await import("execa");
5235
5242
  const slug = thread.worktreePath.split("/").pop();
5236
5243
  const dest = thread.worktreePath;
@@ -5315,7 +5322,7 @@ async function startOrchestration(opts) {
5315
5322
  sourceRef: "default",
5316
5323
  ...createOpts
5317
5324
  }).catch(async () => {
5318
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-TEDAJ57S.js");
5325
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-GDV56MX4.js");
5319
5326
  const repo = await resolveRepoRoot2(repoPath);
5320
5327
  const def = await resolveDefaultBranch2(repo);
5321
5328
  return createThread({
@@ -6565,6 +6572,7 @@ export {
6565
6572
  isPidAlive,
6566
6573
  isPlaceholderBranch,
6567
6574
  isSessionQuotaLimit,
6575
+ isSideboardScratchPath,
6568
6576
  isThinkingEffort,
6569
6577
  listAgentSetupInfo,
6570
6578
  listBranchCommits,
@@ -6646,6 +6654,7 @@ export {
6646
6654
  resolveDiffBaseRef,
6647
6655
  resolveEffectiveIssueSource,
6648
6656
  resolveFilesToCopy,
6657
+ resolveGhAuthToken,
6649
6658
  resolveGithubRepoSlug,
6650
6659
  resolvePrSelector,
6651
6660
  resolveQuotaFallbackAgent,