@sideboard-ai/core 0.1.84 → 0.1.86

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 (37) hide show
  1. package/dist/agents/cursor-runner.cjs +54 -16
  2. package/dist/agents/cursor-runner.js +54 -16
  3. package/dist/{agents-JFXM66QA.js → agents-HJ3Y2JN5.js} +6 -6
  4. package/dist/{agents-OPTHS4IX.js → agents-NDHD3VOL.js} +10 -10
  5. package/dist/{chunk-AE5VBOFE.js → chunk-3KETJKYA.js} +9 -2
  6. package/dist/{chunk-UN3LVQB2.js → chunk-45U4RQ74.js} +2 -2
  7. package/dist/{chunk-R753UFSX.js → chunk-4Y745GLN.js} +14 -4
  8. package/dist/{chunk-VROPG6QF.js → chunk-6K5VAPVR.js} +3 -3
  9. package/dist/{chunk-CKBIQ54F.js → chunk-6ZGTM2E7.js} +88 -20
  10. package/dist/{chunk-WJ5TINR6.js → chunk-EWKHP6DD.js} +2 -2
  11. package/dist/{chunk-NW7MEJHO.js → chunk-HA2QTIWN.js} +1 -1
  12. package/dist/{chunk-BTL7EMGT.js → chunk-HHTHF5BQ.js} +4 -4
  13. package/dist/{chunk-ODZ2ZOA4.js → chunk-IGEL6M4G.js} +2 -2
  14. package/dist/{chunk-BBQ6HXKS.js → chunk-KE6QLNTJ.js} +19 -9
  15. package/dist/{chunk-D4DPQ552.js → chunk-LGXBYZZA.js} +9 -2
  16. package/dist/{chunk-XW47PL6A.js → chunk-OBHZKT2T.js} +86 -16
  17. package/dist/{chunk-OIEFHOP7.js → chunk-U4RZ3IQI.js} +2 -2
  18. package/dist/{chunk-JPHG2KCC.js → chunk-ZN4NDAHV.js} +1 -1
  19. package/dist/{connected-teams-ZRS53OAT.js → connected-teams-BNBM7OIC.js} +2 -2
  20. package/dist/{connected-teams-35EIRJCP.js → connected-teams-LSQ5TAZP.js} +2 -2
  21. package/dist/{coordinator-prompt-RCTIIZ6C.js → coordinator-prompt-HOMHBR2L.js} +3 -3
  22. package/dist/{coordinator-prompt-DOIOSLUN.js → coordinator-prompt-L65MIGCV.js} +3 -3
  23. package/dist/{global-workspace-33BIG7KK.js → global-workspace-MXOLTUAR.js} +4 -4
  24. package/dist/{global-workspace-73OAKD3C.js → global-workspace-VGKPYFE2.js} +4 -4
  25. package/dist/index.cjs +181 -82
  26. package/dist/index.d.cts +32 -6
  27. package/dist/index.d.ts +32 -6
  28. package/dist/index.js +36 -22
  29. package/dist/mcp/run-stdio.cjs +361 -270
  30. package/dist/mcp/run-stdio.js +34 -27
  31. package/dist/{run-V2WZUMJA.js → run-CFKZPY7F.js} +1 -1
  32. package/dist/{run-A4RHY7HH.js → run-XKTAJRWF.js} +1 -1
  33. package/dist/{workspaces-SRITISKA.js → workspaces-2GZ2VNNU.js} +5 -5
  34. package/dist/{workspaces-WDLY34MX.js → workspaces-VWQ5YSND.js} +5 -5
  35. package/dist/{worktree-TUAO74SI.js → worktree-RFCCG23P.js} +2 -2
  36. package/dist/{worktree-SGZVAWOQ.js → worktree-WZJ3CFEN.js} +2 -2
  37. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -638,9 +638,9 @@ type IssueSource = 'linear' | 'github';
638
638
  * How Sideboard and worktree agents authenticate GitHub git operations.
639
639
  * A declared mode so the app and injected prompts agree. Sideboard never
640
640
  * uses a third-party GitHub App (including Conductor.build) for git auth.
641
- * - `auto` (default): keep remotes as-is (SSH first); prompt HTTPS/`gh` fallback
642
- * - `gh`: rewrite SSH remotes to HTTPS; `gh auth git-credential`
643
- * - `ssh`: keep `git@` remotes; use this Mac’s SSH agent
641
+ * - `auto` (default): HTTPS in the agent process with `gh`’s token (no Keychain prompts)
642
+ * - `gh`: same HTTPS rewrite; `GH_TOKEN` from `gh auth token`
643
+ * - `ssh`: keep `git@` remotes; batch-mode SSH (no Keychain dialog — fails if agent locked)
644
644
  * - `token`: stored PAT + HTTPS rewrite; `GH_TOKEN` in the agent env
645
645
  */
646
646
  type GithubGitAuthMode = 'auto' | 'gh' | 'ssh' | 'token';
@@ -1145,6 +1145,11 @@ declare function formatMergePrError(raw: string): string;
1145
1145
  declare function formatIpcInvokeError(err: unknown): string;
1146
1146
 
1147
1147
  type EnvLike = NodeJS.ProcessEnv | Record<string, string | undefined>;
1148
+ /**
1149
+ * Fail closed instead of a macOS Keychain / SSH passphrase dialog.
1150
+ * Orchestrator parents (desktop Global, MCP, Slack) cannot click those prompts.
1151
+ */
1152
+ declare function nonInteractiveGitProcessEnv(): Record<string, string>;
1148
1153
  /**
1149
1154
  * Append `GIT_CONFIG_KEY_n` / `VALUE_n` entries without clobbering inherited
1150
1155
  * command-scoped git config (enterprise insteadOf, custom certs, …).
@@ -1154,18 +1159,39 @@ declare function appendIndexedGitConfig(existing: EnvLike | undefined, entries:
1154
1159
  value: string;
1155
1160
  }>): Record<string, string>;
1156
1161
  /**
1157
- * Rewrite GitHub SSH remotes to HTTPS and let `gh` supply credentials.
1158
- * GUI / agent shells often have no ssh-agent; `gh` keyring still works.
1162
+ * Rewrite GitHub SSH remotes to HTTPS for this process only (does not edit
1163
+ * the stored remote). Credential helper is cleared so osxkeychain cannot prompt.
1159
1164
  */
1160
1165
  declare function githubAgentGitEnv(existing?: EnvLike): Record<string, string>;
1161
1166
  /**
1162
1167
  * Extra env for a worktree agent given Account → GitHub git-auth mode.
1163
1168
  * Does not set `GH_REPO` (caller adds that after resolving origin).
1169
+ *
1170
+ * `auto` and `gh` rewrite to HTTPS in-process and inject `GH_TOKEN` when
1171
+ * provided so unattended agents never talk to the login keychain.
1164
1172
  */
1165
1173
  declare function applyGithubGitAuthEnv(existing: EnvLike | undefined, opts: {
1166
1174
  mode: GithubGitAuthMode;
1167
1175
  token?: string | null;
1168
1176
  }): Record<string, string>;
1177
+ /** PAT or `gh auth token`, resolved in the Sideboard parent (not the agent). */
1178
+ declare function resolveGithubAgentToken(mode: GithubGitAuthMode, cwd: string): Promise<string | null>;
1179
+ /**
1180
+ * Non-interactive GitHub env for agent / MCP children (HTTPS + token when
1181
+ * possible). Safe to call without a git checkout (`cwd` only needed for `gh`).
1182
+ * Always returns at least {@link nonInteractiveGitProcessEnv} — settings/vault
1183
+ * failures must not skip Keychain suppression.
1184
+ */
1185
+ declare function resolveAgentGitAuthEnv(existing?: EnvLike, opts?: {
1186
+ cwd?: string;
1187
+ mode?: GithubGitAuthMode;
1188
+ }): Promise<Record<string, string>>;
1189
+ /**
1190
+ * Codex `exec -c` so sandboxed shells keep Sideboard’s git env.
1191
+ * Default `shell_environment_policy` drops `*TOKEN*` / `*KEY*` and
1192
+ * `workspace-write` has no network — both force `gh`/git onto Keychain or a hang.
1193
+ */
1194
+ declare function codexUnattendedGitConfigArgs(sandbox: 'read-only' | 'workspace-write' | 'danger-full-access' | string): string[];
1169
1195
  /** Injected prompt block so agents use the same git path as Sideboard. */
1170
1196
  declare function formatGitAuthModeDirective(mode: GithubGitAuthMode): string;
1171
1197
 
@@ -4332,4 +4358,4 @@ interface SlackRelayClientOptions {
4332
4358
  */
4333
4359
  declare function runSlackRelayClient(opts: SlackRelayClientOptions): Promise<void>;
4334
4360
 
4335
- export { AGENT_GIT_ACTIONS, ATTACHMENTS_DIR, type ActiveRun, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, 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 CaffeinateHoldState, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GITHUB_GIT_AUTH_MODES, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, type HarnessId, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, type LandPreview, type LandResult, type LinearComment, type LinearIssue, LinearOAuthCancelledError, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_BUSY_REPLY, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, type ScriptHandle, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackReplyBadge, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, type UsageScope, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, ackSlackInboundSeen, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyGithubGitAuthEnv, applyThreadIntoMain, applyTurnUsage, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSlackListenEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, collectTakenTeamSlugs, commentLinearIssue, commitAll, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, connectSlackToken, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectSlackWorkspace, discoverSkills, dismissSlackReplyBadge, dropCachedPrefixOnResume, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, findThreadForStackLayer, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatMergePrError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatProcessGuideDirective, formatRateLimitResetHint, formatRenameBranchDirective, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackSignedReply, formatTranscriptMarkdown, formatUiReminder, formatWorkspaceInventory, formatWorktreeDirective, formatWorktreeReminder, fromInclusiveInputUsage, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSlackWorkspace, gh, ghHeadRef, ghRepoSelectArgs, git, githubAgentGitEnv, globalAgentCwd, handleSlackInbound, harnessEnvKey, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isLinearConnected, isLinearOAuthCancelled, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPrNotMergeableError, isPresentPlanToolName, isSessionQuotaLimit, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isThinkingEffort, isThreadCaffeinated, isWorkspaceScratchPath, linearAuthorizationHeader, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSlackOutboundWatches, listSlackReplyBadges, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergePrStack, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permalinkForSlackReplyBadge, permissionMode, persistVaultKeyInKeychain, planFileAbs, posixShellSingleQuote, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordSlackOutboundWatch, refreshGitHubAuth, refreshSlackReplyBadges, releaseCaffeinateHoldForThread, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resolveAgentExecutable, resolveClaudeExecutable, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubRepoSlug, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveVaultKey, resolveWorktreeStartPoint, rewriteLinearError, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, saveLinearOAuth, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toPublicAppSettings, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateThread, validateLinearApiKey, withAgentInstructions, withExportedPath, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
4361
+ export { AGENT_GIT_ACTIONS, ATTACHMENTS_DIR, type ActiveRun, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, 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 CaffeinateHoldState, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GITHUB_GIT_AUTH_MODES, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, type HarnessId, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, type LandPreview, type LandResult, type LinearComment, type LinearIssue, LinearOAuthCancelledError, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_BUSY_REPLY, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, type ScriptHandle, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackReplyBadge, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, type UsageScope, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, ackSlackInboundSeen, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyGithubGitAuthEnv, applyThreadIntoMain, applyTurnUsage, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSlackListenEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentLinearIssue, commitAll, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, connectSlackToken, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectSlackWorkspace, discoverSkills, dismissSlackReplyBadge, dropCachedPrefixOnResume, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, findThreadForStackLayer, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatMergePrError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatProcessGuideDirective, formatRateLimitResetHint, formatRenameBranchDirective, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackSignedReply, formatTranscriptMarkdown, formatUiReminder, formatWorkspaceInventory, formatWorktreeDirective, formatWorktreeReminder, fromInclusiveInputUsage, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSlackWorkspace, gh, ghHeadRef, ghRepoSelectArgs, git, githubAgentGitEnv, globalAgentCwd, handleSlackInbound, harnessEnvKey, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isLinearConnected, isLinearOAuthCancelled, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPrNotMergeableError, isPresentPlanToolName, isSessionQuotaLimit, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isThinkingEffort, isThreadCaffeinated, isWorkspaceScratchPath, linearAuthorizationHeader, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSlackOutboundWatches, listSlackReplyBadges, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergePrStack, mergeUsage, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permalinkForSlackReplyBadge, permissionMode, persistVaultKeyInKeychain, planFileAbs, posixShellSingleQuote, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordSlackOutboundWatch, refreshGitHubAuth, refreshSlackReplyBadges, releaseCaffeinateHoldForThread, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveVaultKey, resolveWorktreeStartPoint, rewriteLinearError, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, saveLinearOAuth, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toPublicAppSettings, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateThread, validateLinearApiKey, withAgentInstructions, withExportedPath, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  listWorkspaces,
5
5
  removeWorkspace,
6
6
  syncWorkspacesFromThreads
7
- } from "./chunk-ODZ2ZOA4.js";
7
+ } from "./chunk-IGEL6M4G.js";
8
8
  import {
9
9
  BRIGHTSY_MCP_ALLOWED_TOOLS,
10
10
  CLAUDE_MODEL_CATALOG,
@@ -64,7 +64,7 @@ import {
64
64
  threadRequestsBrightsyMcp,
65
65
  totalTokens,
66
66
  writeInjectedMcpConfig
67
- } from "./chunk-R753UFSX.js";
67
+ } from "./chunk-4Y745GLN.js";
68
68
  import {
69
69
  CLOUD_COORDINATOR_BUSY_REPLY,
70
70
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -91,7 +91,7 @@ import {
91
91
  parseForceStopMessage,
92
92
  slackCoordinatorSourceRef,
93
93
  takenTeamSlugsForOrchestration
94
- } from "./chunk-OIEFHOP7.js";
94
+ } from "./chunk-U4RZ3IQI.js";
95
95
  import {
96
96
  COORDINATOR_TOOL_PLAYBOOK,
97
97
  SLACK_REPLY_FORMATTING,
@@ -100,7 +100,7 @@ import {
100
100
  enrichWorkspacesWithGithub,
101
101
  ensureGlobalCoordinatorCwd,
102
102
  formatWorkspaceInventory
103
- } from "./chunk-JPHG2KCC.js";
103
+ } from "./chunk-ZN4NDAHV.js";
104
104
  import {
105
105
  brightsyConfigPath,
106
106
  brightsyMcpServerName,
@@ -112,7 +112,7 @@ import {
112
112
  loadBrightsyConfig,
113
113
  saveBrightsyConfig,
114
114
  switchBrightsyAccount
115
- } from "./chunk-BTL7EMGT.js";
115
+ } from "./chunk-HHTHF5BQ.js";
116
116
  import {
117
117
  LEGACY_PLAN_FILE_REL,
118
118
  PLAN_FILE_NAME,
@@ -151,6 +151,7 @@ import {
151
151
  applyGithubGitAuthEnv,
152
152
  branchDisplayLabel,
153
153
  checkoutPrStackLayer,
154
+ codexUnattendedGitConfigArgs,
154
155
  collectTakenTeamSlugs,
155
156
  commitAll,
156
157
  createExistingBranchWorktree,
@@ -188,6 +189,7 @@ import {
188
189
  lookupSoccerTeam,
189
190
  mergePr,
190
191
  mergePrStack,
192
+ nonInteractiveGitProcessEnv,
191
193
  normalizeWorktreePath,
192
194
  originGhRepoEnv,
193
195
  parseGhStackViewJson,
@@ -195,8 +197,10 @@ import {
195
197
  pushBranch,
196
198
  removeWorktree,
197
199
  resetGhStackDetectCache,
200
+ resolveAgentGitAuthEnv,
198
201
  resolveDefaultBranch,
199
202
  resolveDiffBaseRef,
203
+ resolveGithubAgentToken,
200
204
  resolveGithubRepoSlug,
201
205
  resolvePrSelector,
202
206
  resolveRepoRoot,
@@ -210,7 +214,7 @@ import {
210
214
  worktreeDisplayLabel,
211
215
  worktreeDisplayLabelForGroup,
212
216
  worktreeNameFromPath
213
- } from "./chunk-XW47PL6A.js";
217
+ } from "./chunk-OBHZKT2T.js";
214
218
  import {
215
219
  ATTACHMENTS_DIR,
216
220
  LEGACY_ATTACHMENTS_DIR,
@@ -342,7 +346,7 @@ import {
342
346
  resolveGhAuthToken,
343
347
  run,
344
348
  withExportedPath
345
- } from "./chunk-D4DPQ552.js";
349
+ } from "./chunk-LGXBYZZA.js";
346
350
 
347
351
  // src/git/agent-git-actions.ts
348
352
  var AGENT_GIT_ACTIONS = [
@@ -1316,9 +1320,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
1316
1320
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
1317
1321
  );
1318
1322
  }
1319
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-73OAKD3C.js");
1323
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-VGKPYFE2.js");
1320
1324
  if (isGlobalThread2(thread)) {
1321
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-RCTIIZ6C.js");
1325
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-HOMHBR2L.js");
1322
1326
  ensureGlobalCoordinatorCwd2(
1323
1327
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
1324
1328
  );
@@ -1334,14 +1338,16 @@ async function spawnAgentTurn(thread, input, onEvent) {
1334
1338
  );
1335
1339
  }
1336
1340
  const env = childEnvWithAppSettings(cmd.env);
1337
- if (!isOrchestratorThread(thread)) {
1338
- try {
1341
+ try {
1342
+ if (isOrchestratorThread(thread)) {
1343
+ Object.assign(env, await resolveAgentGitAuthEnv(env));
1344
+ } else {
1339
1345
  const originEnv = await originGhRepoEnv(thread.worktreePath, { env });
1340
1346
  Object.assign(env, originEnv);
1341
- } catch (err) {
1342
- const detail = err instanceof Error ? err.message : String(err);
1343
- console.warn(`[sideboard] originGhRepoEnv failed (${thread.worktreePath}): ${detail}`);
1344
1347
  }
1348
+ } catch (err) {
1349
+ const detail = err instanceof Error ? err.message : String(err);
1350
+ console.warn(`[sideboard] git auth env failed (${thread.worktreePath}): ${detail}`);
1345
1351
  }
1346
1352
  const child = execa(cmd.file, cmd.args, {
1347
1353
  cwd: cmd.cwd,
@@ -1857,6 +1863,10 @@ async function spawnWorkspaceScript(command, opts) {
1857
1863
  },
1858
1864
  loginEnv
1859
1865
  );
1866
+ try {
1867
+ Object.assign(env, await resolveAgentGitAuthEnv(env, { cwd: opts.worktreePath }));
1868
+ } catch {
1869
+ }
1860
1870
  const shell = process.platform === "darwin" ? "zsh" : "bash";
1861
1871
  const child = execa2(shell, ["-lc", command], {
1862
1872
  cwd: opts.worktreePath,
@@ -3696,7 +3706,7 @@ async function previewLand(thread) {
3696
3706
  const target = await resolveDefaultBranch(thread.repoPath);
3697
3707
  if (thread.branchName === target || thread.branchName === "main" || thread.branchName === "master") {
3698
3708
  }
3699
- const { stdout: head } = await import("./run-V2WZUMJA.js").then(
3709
+ const { stdout: head } = await import("./run-CFKZPY7F.js").then(
3700
3710
  ({ git: git2 }) => git2(["rev-parse", "--abbrev-ref", "HEAD"], thread.worktreePath)
3701
3711
  );
3702
3712
  const current = head.trim();
@@ -3735,7 +3745,7 @@ async function confirmLand(thread, opts) {
3735
3745
  if (preview.dirty) {
3736
3746
  committed = await commitAll(thread.worktreePath, meta.commitMessage);
3737
3747
  }
3738
- const { git: git2 } = await import("./run-V2WZUMJA.js");
3748
+ const { git: git2 } = await import("./run-CFKZPY7F.js");
3739
3749
  const { stdout: headOut } = await git2(
3740
3750
  ["rev-parse", "--abbrev-ref", "HEAD"],
3741
3751
  thread.worktreePath,
@@ -3833,7 +3843,7 @@ async function createThread(input, _onSetupLine) {
3833
3843
  return readThread(thread.id) ?? thread;
3834
3844
  }
3835
3845
  async function listLinearIssues(agent, repoPath) {
3836
- const { getAdapter: getAdapter2 } = await import("./agents-JFXM66QA.js");
3846
+ const { getAdapter: getAdapter2 } = await import("./agents-HJ3Y2JN5.js");
3837
3847
  await requireAgent(agent, { requireLinear: true });
3838
3848
  const adapter = getAdapter2(agent);
3839
3849
  if (!adapter.listLinearIssues) {
@@ -4361,7 +4371,7 @@ async function adoptThread(input) {
4361
4371
  throw new Error(`Worktree not found: ${input.worktreePath}`);
4362
4372
  }
4363
4373
  const repoPath = await resolveRepoRoot(input.worktreePath);
4364
- const { stdout: branch } = await import("./run-V2WZUMJA.js").then(
4374
+ const { stdout: branch } = await import("./run-CFKZPY7F.js").then(
4365
4375
  ({ git: git2 }) => git2(["rev-parse", "--abbrev-ref", "HEAD"], input.worktreePath)
4366
4376
  );
4367
4377
  const thread = createEmptyThread({
@@ -4376,7 +4386,7 @@ async function adoptThread(input) {
4376
4386
  messages: input.messages ?? []
4377
4387
  });
4378
4388
  writeThread(thread);
4379
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-SRITISKA.js");
4389
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-2GZ2VNNU.js");
4380
4390
  await ensureWorkspace2(repoPath);
4381
4391
  return thread;
4382
4392
  }
@@ -7330,7 +7340,7 @@ var Orchestrator = class {
7330
7340
  this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
7331
7341
  if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
7332
7342
  try {
7333
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-SRITISKA.js");
7343
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-2GZ2VNNU.js");
7334
7344
  await ensureWorkspace2(thread.repoPath);
7335
7345
  } catch {
7336
7346
  }
@@ -7373,7 +7383,7 @@ var Orchestrator = class {
7373
7383
  return restored2;
7374
7384
  }
7375
7385
  if (!existsSync15(thread.worktreePath)) {
7376
- const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-SGZVAWOQ.js");
7386
+ const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-WZJ3CFEN.js");
7377
7387
  const { execa: execa6 } = await import("execa");
7378
7388
  const slug = thread.worktreePath.split("/").pop();
7379
7389
  const dest = thread.worktreePath;
@@ -7482,7 +7492,7 @@ async function startOrchestration(opts) {
7482
7492
  sourceRef: "default",
7483
7493
  ...createOpts
7484
7494
  }).catch(async () => {
7485
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-SGZVAWOQ.js");
7495
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-WZJ3CFEN.js");
7486
7496
  const repo = await resolveRepoRoot2(repoPath);
7487
7497
  const def = await resolveDefaultBranch2(repo);
7488
7498
  return createThread({
@@ -11265,6 +11275,7 @@ export {
11265
11275
  cleanupOrphanWorktrees,
11266
11276
  cloneRepoIntoSideboard,
11267
11277
  codexAdapter,
11278
+ codexUnattendedGitConfigArgs,
11268
11279
  coerceOrchestratorAgent,
11269
11280
  collectTakenTeamSlugs,
11270
11281
  commentLinearIssue,
@@ -11485,6 +11496,7 @@ export {
11485
11496
  mergeUsage,
11486
11497
  nextPastedTextName,
11487
11498
  nextThinkingEffort,
11499
+ nonInteractiveGitProcessEnv,
11488
11500
  normalizeParseResult,
11489
11501
  normalizeThinkingEffort,
11490
11502
  normalizeThread,
@@ -11540,6 +11552,7 @@ export {
11540
11552
  requireAgent,
11541
11553
  resetGhStackDetectCache,
11542
11554
  resolveAgentExecutable,
11555
+ resolveAgentGitAuthEnv,
11543
11556
  resolveClaudeExecutable,
11544
11557
  resolveCommandBinarySync,
11545
11558
  resolveConductorCursorAgentId,
@@ -11549,6 +11562,7 @@ export {
11549
11562
  resolveEffectiveIssueSource,
11550
11563
  resolveFilesToCopy,
11551
11564
  resolveGhAuthToken,
11565
+ resolveGithubAgentToken,
11552
11566
  resolveGithubRepoSlug,
11553
11567
  resolveLinearState,
11554
11568
  resolveLinearTeam,