@sideboard-ai/core 0.1.229 → 0.1.230

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 (31) hide show
  1. package/dist/{agents-B7G4BQTS.js → agents-ENAQHQRZ.js} +4 -4
  2. package/dist/{agents-ZKP7QNXA.js → agents-TCTEAK6M.js} +4 -4
  3. package/dist/{chunk-F3GT6DQW.js → chunk-4CZ25DO2.js} +1 -1
  4. package/dist/{chunk-3IMSQNTS.js → chunk-4VGCG2HV.js} +17 -0
  5. package/dist/{chunk-T7Y5ULHM.js → chunk-6L25K7BE.js} +3 -3
  6. package/dist/{chunk-LULHFLPU.js → chunk-FA4CPYCY.js} +3 -3
  7. package/dist/{chunk-7YKXBFQE.js → chunk-HZFLKVGC.js} +2 -2
  8. package/dist/{chunk-UHT6OS7V.js → chunk-HZLZ34FK.js} +145 -15
  9. package/dist/{chunk-6HKGCUDN.js → chunk-JJRRLCCS.js} +143 -14
  10. package/dist/{chunk-AMMRFFB7.js → chunk-N5TX66CD.js} +1 -1
  11. package/dist/{chunk-N7UXGM3Y.js → chunk-UNTOZA3C.js} +2 -2
  12. package/dist/{chunk-HY2GFZ5S.js → chunk-XJETIO4K.js} +17 -0
  13. package/dist/{coordinator-prompt-DZMMCDRW.js → coordinator-prompt-DFXYTM6D.js} +3 -3
  14. package/dist/{coordinator-prompt-RL3GKIAQ.js → coordinator-prompt-YKLXQTWH.js} +3 -3
  15. package/dist/{global-workspace-QW4OXCLJ.js → global-workspace-4SPANNJT.js} +3 -3
  16. package/dist/{global-workspace-G3QEVRGZ.js → global-workspace-EYZKYHAO.js} +3 -3
  17. package/dist/index.cjs +174 -17
  18. package/dist/index.d.cts +53 -5
  19. package/dist/index.d.ts +53 -5
  20. package/dist/index.js +10 -6
  21. package/dist/mcp/run-stdio.cjs +159 -7
  22. package/dist/mcp/run-stdio.js +6 -6
  23. package/dist/{orchestrator-GKAHLGXT.js → orchestrator-HMJPNUN5.js} +7 -5
  24. package/dist/{orchestrator-X4VFA5WW.js → orchestrator-ZT3SJVKF.js} +7 -5
  25. package/dist/{thread-store-KDPPXJJ3.js → thread-store-FBK5SZ5P.js} +1 -1
  26. package/dist/{thread-store-N6WQIWZ4.js → thread-store-IKJD4EOK.js} +1 -1
  27. package/dist/{workspaces-77C5XQEY.js → workspaces-73Y7IJY2.js} +3 -3
  28. package/dist/{workspaces-WXRPLT2N.js → workspaces-FQCSCTNH.js} +3 -3
  29. package/dist/{worktree-P67WAJKH.js → worktree-36VEFUJN.js} +2 -2
  30. package/dist/{worktree-L6FJXFUC.js → worktree-DOPRKG7K.js} +2 -2
  31. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -144,6 +144,12 @@ interface Thread {
144
144
  devPort: number | null;
145
145
  /** Named run scripts currently tracked for this thread. */
146
146
  activeRuns?: ActiveRun[];
147
+ /**
148
+ * Cross-process run-script intent. Worktree MCP / CLI write this when the
149
+ * desktop host is alive instead of spawning; Electron main adopts and calls
150
+ * `startDev` / `stopDev` so Run-tab logs use renderer IPC.
151
+ */
152
+ runScriptRequest?: RunScriptRequest | null;
147
153
  prUrl: string | null;
148
154
  /** Cached PR title for Conductor-style sidebar labels (PR title > branch). */
149
155
  prTitle: string | null;
@@ -651,6 +657,22 @@ interface ActiveRun {
651
657
  ports: number[];
652
658
  startedAt: string;
653
659
  }
660
+ /**
661
+ * MCP/CLI → desktop run-script request (same path as `send_to_thread` queues).
662
+ * Desktop claims, runs `startDev`/`stopDev`, then fulfills or sets `error`.
663
+ */
664
+ interface RunScriptRequest {
665
+ op: 'start' | 'stop';
666
+ /** Omit/null = default script for start, every script for stop. */
667
+ scriptName?: string | null;
668
+ requestId: string;
669
+ requestedAt: string;
670
+ claimedAt?: string | null;
671
+ fulfilledAt?: string | null;
672
+ error?: string | null;
673
+ }
674
+ /** True when desktop should `startDev`/`stopDev` this persisted request. */
675
+ declare function isUnclaimedRunScriptRequest(req: RunScriptRequest | null | undefined): boolean;
654
676
  /** Live snapshot for the global orchestrator board. */
655
677
  interface OrchestratorRuntime {
656
678
  running: number;
@@ -1678,9 +1700,10 @@ declare function releaseDesktopHost(pid?: number): void;
1678
1700
  declare function isDesktopHostAlive(): boolean;
1679
1701
  declare function isThisProcessDesktopHost(): boolean;
1680
1702
  /**
1681
- * MCP/CLI must not spawn worktree turns when the board is running — those
1682
- * children have no renderer IPC, so the chat stays blank, and Stop/Send now
1683
- * in the desktop cannot see `activeTurns`. Desktop adopts persisted queues.
1703
+ * MCP/CLI must not spawn worktree turns or run scripts when the board is
1704
+ * running — those children have no renderer IPC, so the chat/Run tab stays
1705
+ * blank, and Stop cannot see in-memory handles. Desktop adopts persisted
1706
+ * queues and `runScriptRequest`.
1684
1707
  */
1685
1708
  declare function thisProcessShouldDrainAgentQueues(): boolean;
1686
1709
 
@@ -4743,6 +4766,8 @@ declare function applyThreadIntoMain(thread: Pick<Thread, 'repoPath' | 'worktree
4743
4766
 
4744
4767
  /** Status may be `running` for this long before `agentPid` is written. */
4745
4768
  declare const LIVE_TURN_SPAWN_GRACE_MS = 15000;
4769
+ /** MCP/CLI wait for desktop to adopt a run-script request (under the ~60s MCP kill). */
4770
+ declare const RUN_SCRIPT_DESKTOP_ADOPT_MS = 20000;
4746
4771
  /** True when `kill(pid, 0)` succeeds (process exists and is signalable). */
4747
4772
  declare function isPidAlive(pid: number): boolean;
4748
4773
  /** Wait until pid exits, or `timeoutMs` elapses. */
@@ -4798,6 +4823,11 @@ declare class Orchestrator {
4798
4823
  private readonly jobContinueNudged;
4799
4824
  /** In-flight startDev per worktree run key — agent MCP + UI Start must not double-spawn. */
4800
4825
  private readonly startingDev;
4826
+ /**
4827
+ * MCP/CLI poll budget while Electron main adopts `runScriptRequest`.
4828
+ * Tests shorten this so a missing desktop does not wait 20s.
4829
+ */
4830
+ runScriptAdoptTimeoutMs: number;
4801
4831
  private maxConcurrent;
4802
4832
  private runningCount;
4803
4833
  constructor(opts?: {
@@ -4851,6 +4881,18 @@ declare class Orchestrator {
4851
4881
  * MCP-created review threads don't stay `queued` after the MCP child exits.
4852
4882
  */
4853
4883
  adoptPersistedQueues(): void;
4884
+ /**
4885
+ * Adopt run-script start/stop persisted by MCP/CLI while this process owns
4886
+ * live children (desktop host). Spawning in stdio leaves the Run tab on
4887
+ * "Starting…" with no logs — `run_output` never reaches the renderer.
4888
+ */
4889
+ adoptPersistedRunScripts(): void;
4890
+ private applyRunScriptRequest;
4891
+ /**
4892
+ * Same rule as agent-queue drain: MCP stdio must not own Electron children
4893
+ * while Sideboard.app is alive.
4894
+ */
4895
+ shouldOwnRunScripts(): boolean;
4854
4896
  /**
4855
4897
  * Mid-session: a worktree can sit at `running` after the agent process dies
4856
4898
  * (Cursor/CLI crash, OOM) while wait_for_turn still reports stillRunning.
@@ -4930,7 +4972,13 @@ declare class Orchestrator {
4930
4972
  ports: number[];
4931
4973
  }>;
4932
4974
  private startDevUnlocked;
4933
- stopDev(threadRef: string, scriptName?: string): void;
4975
+ /**
4976
+ * Persist a run-script intent for the desktop host (MCP/CLI while the board
4977
+ * is alive). Polls until Electron main adopts and fulfills it.
4978
+ */
4979
+ private requestDesktopRunScript;
4980
+ private waitForDesktopRunScript;
4981
+ stopDev(threadRef: string, scriptName?: string): Promise<void>;
4934
4982
  /**
4935
4983
  * App quit: tear down every registered run/setup child and free persisted
4936
4984
  * ports so the next launch is not blocked by orphans.
@@ -7023,4 +7071,4 @@ declare function pollSlackOutboundWatches(opts?: {
7023
7071
  now?: number;
7024
7072
  }): Promise<void>;
7025
7073
 
7026
- export { ABLETIME_MCP_PATH, ABLETIME_MCP_PM_PATH, ABLETIME_OAUTH_CALLBACK_PATH, ABLETIME_OAUTH_CANCELLED, ABLETIME_OAUTH_LOCAL_CALLBACK, ABLETIME_OAUTH_PORT, ABLETIME_OAUTH_REDIRECT, ABLETIME_OAUTH_RESOURCE, ABLETIME_OAUTH_TOKEN_PREFIX, ABLETIME_ORG_KEY_PREFIX, ABLETIME_PAT_PREFIX, ABLETIME_PM_TOOL_NAMES, AGENT_DONE_CUSTOM_SOUND_EXTENSIONS, AGENT_DONE_CUSTOM_SOUND_MAX_BYTES, AGENT_DONE_SOUNDS, AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, ATTACHMENTS_DIR, type AbleTimeAssignedIssuesResult, type AbleTimeComment, type AbleTimeCredentialKind, type AbleTimeMcpToolName, AbleTimeOAuthCancelledError, type AbleTimeOrientation, type AbleTimePmToolName, type AbleTimeProject, type AbleTimeTask, type AbleTimeTaskRelationInput, type AbleTimeViewer, type AccountProfile, type ActiveRun, type AddBoardPinInput, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentDoneCustomSoundPayload, type AgentDoneSound, type AgentEvent, type AgentGitAction, 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_ABLETIME_OAUTH_CLIENT_ID, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, BRIGHTSY_OAUTH_CLIENT_ID, BRIGHTSY_OAUTH_REDIRECT, BRIGHTSY_SUMMARIZE_CONTEXT_TOOL, BUNDLED_LONG_RUNNING_PATH, BUNDLED_SKILL_PREFIX, type BoardPin, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CHARS_PER_CONTEXT_TOKEN, CLAUDE_MODEL_CATALOG, CLI_DIR, 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, CONTEXT_REVIEW_PATH, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeExtraUsage, type ClaudeHarnessSettings, type ClaudePlanUsage, type ClaudeUsageWindow, type ClaudeUsageWindowId, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CodeLineRange, type CodeRefInput, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, DEFAULT_ABLETIME_HOST, DEFAULT_WORKTREE_SORT, DETACHED_JOBS_DIR, type DefaultsAppSettings, type DefaultsSettingsPatch, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type EnsuredReviewGuidelines, type ExpandResult, FAMOUS_SOCCER_TEAMS, FOLLOW_UP_BEHAVIORS, type FastForwardMainResult, type FollowUpBehavior, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GITHUB_GIT_AUTH_MODES, GITHUB_PR_BODY_MAX_CHARS, GITHUB_PR_BODY_SAFE_CHARS, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubIssue, type GitHubIssueComment, type GitHubIssueRelationInput, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, HISTORY_DISCARDED_TEXT, HISTORY_MAX_COUNT_DEFAULT, HISTORY_MAX_COUNT_MAX, HISTORY_MAX_COUNT_MIN, HISTORY_MAX_DAYS_DEFAULT, HISTORY_MAX_DAYS_MAX, HOME_BOARD_CACHE_TTL_MS, type HarnessId, type HistoryCleanupResult, type HistoryRetentionPlan, type HomeBoardLoaded, type HomeBoardRemoteData, IMPLIED_TICKET_RESOLVE_PROMPT, ISSUE_SOURCE_LABELS, type ImportedAgentDoneSound, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueActivityComment, type IssueAssigneeFilter, type IssueCycleInfo, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_DETACHED_JOBS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LIGHT_RECONCILE_THROTTLE_MS, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, LIVE_TURN_SPAWN_GRACE_MS, LONG_RUNNING_SKILL_COMMAND, type LandPreview, type LandResult, type LinearAssignedIssuesResult, type LinearAssigneeFilter, type LinearComment, type LinearCycle, type LinearIssue, type LinearIssueAttachment, type LinearIssueComment, type LinearIssueRef, type LinearIssueRelation, type LinearIssueRelationInput, type LinearNamedRef, LinearOAuthCancelledError, type LinearProjectRef, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesOptions, type ListIssuesResult, type ListPrsOptions, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, OPTIONAL_SERVICES, OPTIONAL_SERVICE_IDS, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OptionalServiceCliStatus, type OptionalServiceId, type OptionalServiceSpec, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorDefaultsSettings, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, PLAN_QUESTION_ANSWERS_PREFIX, PROFILE_NOTES_MAX, PR_DETAILS_JSON_FIELDS, type PathRefInput, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PortReservation, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type ProjectProfileSettings, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedAccountProfile, type ResolvedReviewGuidelines, type ResolvedThreadDefaults, type ResolvedViewerProfile, type ReviewGuidelinesSource, type RunMode, type RunScript, SEED_FULL_TOOL_MESSAGES, SEED_MAX_CHARS, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, STDERR_EVENT_MAX_CHARS, STDOUT_EVENT_MAX_CHARS, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SessionSeedOptions, type SetupLogSnapshot, type SetupRunResult, type SidebarGitAction, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, THINKING_PART_MAX_CHARS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, USAGE_ON_LIMIT_VALUES, type UpdateScheduledTaskPatch, type UsageOnLimit, type UsageScope, type ViewerContextWriteResult, type ViewerProfile, WORKTREE_ABLETIME_MCP_TOOLS, WORKTREE_GITHUB_MCP_TOOLS, WORKTREE_LINEAR_MCP_TOOLS, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, type WorktreeDirtyStat, type WorktreeSortMode, type WorktreeStatKind, ableTimeCredentialKind, ableTimeDependencyTarget, ableTimeOAuthAuthorizeUrl, ableTimeOAuthBouncePage, ableTimeOAuthClientId, ableTimeOAuthLocalBounceUrl, ableTimeOAuthRedirectUri, ableTimeOAuthResource, ableTimeUsesRest, abletimeMcpRequest, abletimeMcpUrl, abletimeToolUsesPm, ackSlackInboundSeen, addBoardPin, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentDoneCustomSoundMime, agentDoneSound, agentDoneSoundsDir, agentGitPrompt, alignQueueAttachments, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, appendQueuedItem, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyForwardOccupancy, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applySystemCaEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, assertAbleTimeCredential, assertAbleTimeMcpCredential, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupHistoryEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAccessTokenNeedsRefresh, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildBrightsySessionSeed, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildCodeRefAttachment, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildLinearIssueFilter, buildPastedTextAttachment, buildPathRefAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, callAbleTimeTool, canonicalizeRepoPath, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, clampGithubPrBody, clampHistoryMaxCount, clampHistoryMaxDays, classifyWorktreeColumn, claudeAdapter, claudeChromeEnabled, claudeUsageOverLimitWindows, claudeUserSettingsPath, cleanupArchivedHistory, cleanupOrphanWorktrees, clearAgentDoneCustomSoundFile, clearBoardPins, clearHomeBoardCache, clipAgentEventForPaint, clipThinkingForStore, cloneRepoIntoSideboard, codeRefRangeLabel, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentAbleTimeTask, commentGitHubIssue, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmClaudeUsageOverLimitEnabled, confirmLand, connectBrightsyTeam, connectOptionalService, connectSlackToken, connectedOptionalServices, connectedPrSelectors, consumeComposerAttachments, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, countUnpushedVsOrigin, cowboyModeEnabled, createAbleTimePkce, createAbleTimeTask, createChatTab, createEmptyThread, createExistingBranchWorktree, createGitHubIssue, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, detectOptionalServiceClis, disconnectAbleTimeConnection, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectOptionalService, disconnectSlackWorkspace, discoverSkills, dropCachedPrefixOnResume, emptyPublicIntegrations, emptySetupLog, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAbleTimeAccessToken, ensureAbleTimeTask, ensureAgentPath, ensureBrightsyLocalConfigFresh, ensureBrightsyOAuthClientId, ensureCloudCoordinator, ensureConnectedBrightsyTeamTokens, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewGuidelinesFile, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateOccupancyTokens, estimateThreadChars, examplePrefixedBranch, expandComposerPrompt, extractBrightsyContextSummary, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fastForwardMainCheckoutIfSafe, fetchOriginForWorktree, fetchPrHead, finalizeParts, findAgentDoneCustomSoundPath, findConventionSetup, findInvalidCacheControlTtlOrder, findLastBrightsyContextSummary, findLiveThreadForCreate, findLiveThreadForCreateSource, findOrphanWorktrees, findProjectProfileKey, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, flipLinearRelationType, foldLegacyRolesIntoNotes, followUpBehavior, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAccountProfilePlaybookLine, formatArtifactDirective, formatBrightsyFetchError, formatClaudeExtraUsageDetail, formatClaudeUsageCompact, formatClaudeUsageFetchedAt, formatClaudeUsageOverLimitConfirm, formatClaudeUsageOverLimitWait, formatClaudeUsageReset, formatClaudeUsageResetClock, formatClaudeUsageTooltip, formatDetachedJobInvoke, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatIssueToolsDirective, formatIssueToolsReminder, formatLinearDirective, formatLinearReminder, formatLongRunningDirective, formatLongRunningReminder, formatMergePrError, formatMessagesAsTranscript, formatOptionalServicesDirective, formatOptionalServicesReminder, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatPrGateDirective, formatProcessGuideDirective, formatProjectProfilePlaybookLines, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, formatTranscriptMarkdown, formatUiReminder, formatViewerContextDirective, formatViewerContextReminder, formatWorkspaceInventory, formatWorkspaceProfileSuffix, formatWorktreeDirective, formatWorktreeReminder, forwardContextUsage, forwardOccupancyTokens, fromInclusiveInputUsage, getAbleTimeAccessToken, getAbleTimeHost, getAbleTimeOrientation, getAbleTimeTask, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getClaudePlanUsage, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubIssue, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getHomeBoardInputs, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, getWorktreeDirtyStat, gh, ghHeadRef, ghRepoSelectArgs, git, gitBranchPrefixSetting, githubAgentGitEnv, githubHttpsInsteadOfEntries, githubRelationEditFlag, globalAgentCwd, groupHomeBoardWorktrees, handleSlackInbound, harnessEnvKey, hasBakedAbleTimeOAuth, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, historyMaxCount, historyMaxDays, hottestClaudeWindow, httpFetch, importAgentDoneCustomSound, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, installNpmGlobalPackage, installOptionalServiceCli, interruptSlackCoordinatorForInbound, invalidateThreadListCache, invalidateThreadRecord, isAbleTimeConnected, isAbleTimeOAuthCancelled, isAbleTimeRejectedCredential, isAgentDoneSound, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorApiKeyConfigured, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhPrBodyTooLongError, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isHistoryRetentionStub, isHomeBoardThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isInjectedOrchMcpName, isInternalAgentStatusText, isIssueSourceConnected, isLinearConnected, isLinearNoneToken, isLinearOAuthCancelled, isOptionalServiceId, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPlanQuestionAnswersMessage, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSelfWrittenRecord, isSessionQuotaLimit, isSetupLastError, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isStaleLastErrorDuringTurn, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isUsageOnLimit, isWorkspaceScratchPath, issueAttachmentForAbleTimeTask, issueMatchesAssignee, issueSourceLabel, issueTicketFromThread, killListenersOnPorts, lastAssistantMessageText, lastRequestOccupancy, latestPendingPlanQuestions, linearAuthorizationHeader, linearCycleIsActive, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, linearRelationCreateInput, linearTicketIdFromThread, listAbleTimeAssignedIssues, listAbleTimeProjects, listAbleTimeTasks, listAgentSetupInfo, listBoardPins, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssueCommentsSince, listGitHubIssues, listGlobalThreads, listIssues, listLinearAssignedIssues, listLinearCommentsSince, listLinearIssues, listLinearIssuesDirect, listLinearIssuesFiltered, listLinearTeamCycles, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadHomeBoardInputs, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, mapAbleTimeTask, markPrReady, materializeSystemCaBundle, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAllowToolsFromNames, mcpAuthWarnings, mcpStatusThinkingFromClaudeInit, mentionsPrGoal, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSetupOutput, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, messagesSinceLastBrightsyContextSummary, moveQueuedItemToFront, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeAbleTimeCredential, normalizeAbleTimeHost, normalizeBrightsyEndpoint, normalizeCodeSelection, normalizeLinearRelationType, normalizeParseResult, normalizeServiceOrigin, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, optionalServiceConnected, optionalServiceSpec, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originFetchBranch, originGhRepoEnv, packagedDetachedJobPath, parseAbleTimeOAuthCallbackUrl, parseClaudeUsagePayload, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGitHubIssueNumber, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parsePrDetailsView, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permissionMode, persistPendingFileAttachments, persistVaultKeyInKeychain, planFileAbs, planHistoryAgePurge, planHistoryRetention, planQuestionsSignature, pollSlackOutboundWatches, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, prependQueuedItem, previewLand, primaryCheckoutFromLinkedWorktree, promptMentionsBrightsy, pushBranch, readAgentDoneCustomSound, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSetupLog, readSkillBody, readThread, readViewerContext, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshBrightsyAccessToken, refreshGitHubAuth, registerBrightsyOAuthClient, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeBoardPin, removeQueuedItem, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, reservePort, reservePortRange, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAbleTimeOAuthHost, resolveAccountProfile, resolveAccountProfileFromSettings, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCreateFirstPrompt, resolveCursorModelId, resolveDefaultBranch, resolveDetachedJobScript, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitBranchPrefix, resolveGitDirsForLockRecovery, resolveGitHubIssueRepo, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearCycle, resolveLinearLabel, resolveLinearProject, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewOrchestratorOptions, resolveNewThreadOptions, resolveOrchChildFollowUp, resolveOrchestratorDefaults, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSendFollowUp, resolveSidebarGitPrompt, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveUsageOnLimit, resolveVaultKey, resolveViewerProfile, resolveViewerProfileForRepo, resolveWorktreeStartPoint, rewriteAbleTimeError, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeGitBranchPrefix, sanitizeMcpServerName, saveAbleTimeConnection, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, searchAbleTimeTasks, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shiftQueuedItem, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunHistoryCleanup, shouldRunWorktreeCleanup, shouldStampSetupLastError, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slimMessagesForUiList, slimThreadForUiList, slugify, spawnAgentTurn, splitForCompaction, splitTurnInputForSystemPrompt, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startAbleTimeOAuth, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, statWorktreePath, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takePendingTurnAttachments, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, taskUrl, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadHasCompactedContext, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, ticketSlugForBranch, toAbleTimeIssueInfo, toGitHubIssueInfo, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, trustSystemCertificates, turnCostUsdFromCursorUsage, updateAbleTimeTask, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateGitHubIssue, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateProjectProfileSettings, updateSchedule, updateThread, usageOnLimit, userClaudeMcpConfigPath, userCursorMcpConfigPath, userMcpNamesToDisable, validateLinearApiKey, verifyAbleTimeConnection, verifyOptionalService, visibleToolRowDetail, waitForPidExit, warmGithubAgentAuth, whichOnPath, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeBoardStatus, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreeSlugForTicket, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeViewerContext, writeWorktreeFile };
7074
+ export { ABLETIME_MCP_PATH, ABLETIME_MCP_PM_PATH, ABLETIME_OAUTH_CALLBACK_PATH, ABLETIME_OAUTH_CANCELLED, ABLETIME_OAUTH_LOCAL_CALLBACK, ABLETIME_OAUTH_PORT, ABLETIME_OAUTH_REDIRECT, ABLETIME_OAUTH_RESOURCE, ABLETIME_OAUTH_TOKEN_PREFIX, ABLETIME_ORG_KEY_PREFIX, ABLETIME_PAT_PREFIX, ABLETIME_PM_TOOL_NAMES, AGENT_DONE_CUSTOM_SOUND_EXTENSIONS, AGENT_DONE_CUSTOM_SOUND_MAX_BYTES, AGENT_DONE_SOUNDS, AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, ATTACHMENTS_DIR, type AbleTimeAssignedIssuesResult, type AbleTimeComment, type AbleTimeCredentialKind, type AbleTimeMcpToolName, AbleTimeOAuthCancelledError, type AbleTimeOrientation, type AbleTimePmToolName, type AbleTimeProject, type AbleTimeTask, type AbleTimeTaskRelationInput, type AbleTimeViewer, type AccountProfile, type ActiveRun, type AddBoardPinInput, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentDoneCustomSoundPayload, type AgentDoneSound, type AgentEvent, type AgentGitAction, 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_ABLETIME_OAUTH_CLIENT_ID, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, BRIGHTSY_OAUTH_CLIENT_ID, BRIGHTSY_OAUTH_REDIRECT, BRIGHTSY_SUMMARIZE_CONTEXT_TOOL, BUNDLED_LONG_RUNNING_PATH, BUNDLED_SKILL_PREFIX, type BoardPin, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CHARS_PER_CONTEXT_TOKEN, CLAUDE_MODEL_CATALOG, CLI_DIR, 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, CONTEXT_REVIEW_PATH, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeExtraUsage, type ClaudeHarnessSettings, type ClaudePlanUsage, type ClaudeUsageWindow, type ClaudeUsageWindowId, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CodeLineRange, type CodeRefInput, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, DEFAULT_ABLETIME_HOST, DEFAULT_WORKTREE_SORT, DETACHED_JOBS_DIR, type DefaultsAppSettings, type DefaultsSettingsPatch, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type EnsuredReviewGuidelines, type ExpandResult, FAMOUS_SOCCER_TEAMS, FOLLOW_UP_BEHAVIORS, type FastForwardMainResult, type FollowUpBehavior, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GITHUB_GIT_AUTH_MODES, GITHUB_PR_BODY_MAX_CHARS, GITHUB_PR_BODY_SAFE_CHARS, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubIssue, type GitHubIssueComment, type GitHubIssueRelationInput, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, HISTORY_DISCARDED_TEXT, HISTORY_MAX_COUNT_DEFAULT, HISTORY_MAX_COUNT_MAX, HISTORY_MAX_COUNT_MIN, HISTORY_MAX_DAYS_DEFAULT, HISTORY_MAX_DAYS_MAX, HOME_BOARD_CACHE_TTL_MS, type HarnessId, type HistoryCleanupResult, type HistoryRetentionPlan, type HomeBoardLoaded, type HomeBoardRemoteData, IMPLIED_TICKET_RESOLVE_PROMPT, ISSUE_SOURCE_LABELS, type ImportedAgentDoneSound, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueActivityComment, type IssueAssigneeFilter, type IssueCycleInfo, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_DETACHED_JOBS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LIGHT_RECONCILE_THROTTLE_MS, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, LIVE_TURN_SPAWN_GRACE_MS, LONG_RUNNING_SKILL_COMMAND, type LandPreview, type LandResult, type LinearAssignedIssuesResult, type LinearAssigneeFilter, type LinearComment, type LinearCycle, type LinearIssue, type LinearIssueAttachment, type LinearIssueComment, type LinearIssueRef, type LinearIssueRelation, type LinearIssueRelationInput, type LinearNamedRef, LinearOAuthCancelledError, type LinearProjectRef, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesOptions, type ListIssuesResult, type ListPrsOptions, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, OPTIONAL_SERVICES, OPTIONAL_SERVICE_IDS, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OptionalServiceCliStatus, type OptionalServiceId, type OptionalServiceSpec, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorDefaultsSettings, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, PLAN_QUESTION_ANSWERS_PREFIX, PROFILE_NOTES_MAX, PR_DETAILS_JSON_FIELDS, type PathRefInput, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PortReservation, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type ProjectProfileSettings, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, RUN_SCRIPT_DESKTOP_ADOPT_MS, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedAccountProfile, type ResolvedReviewGuidelines, type ResolvedThreadDefaults, type ResolvedViewerProfile, type ReviewGuidelinesSource, type RunMode, type RunScript, type RunScriptRequest, SEED_FULL_TOOL_MESSAGES, SEED_MAX_CHARS, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, STDERR_EVENT_MAX_CHARS, STDOUT_EVENT_MAX_CHARS, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SessionSeedOptions, type SetupLogSnapshot, type SetupRunResult, type SidebarGitAction, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, THINKING_PART_MAX_CHARS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, USAGE_ON_LIMIT_VALUES, type UpdateScheduledTaskPatch, type UsageOnLimit, type UsageScope, type ViewerContextWriteResult, type ViewerProfile, WORKTREE_ABLETIME_MCP_TOOLS, WORKTREE_GITHUB_MCP_TOOLS, WORKTREE_LINEAR_MCP_TOOLS, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, type WorktreeDirtyStat, type WorktreeSortMode, type WorktreeStatKind, ableTimeCredentialKind, ableTimeDependencyTarget, ableTimeOAuthAuthorizeUrl, ableTimeOAuthBouncePage, ableTimeOAuthClientId, ableTimeOAuthLocalBounceUrl, ableTimeOAuthRedirectUri, ableTimeOAuthResource, ableTimeUsesRest, abletimeMcpRequest, abletimeMcpUrl, abletimeToolUsesPm, ackSlackInboundSeen, addBoardPin, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentDoneCustomSoundMime, agentDoneSound, agentDoneSoundsDir, agentGitPrompt, alignQueueAttachments, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, appendQueuedItem, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyForwardOccupancy, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applySystemCaEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, assertAbleTimeCredential, assertAbleTimeMcpCredential, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupHistoryEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAccessTokenNeedsRefresh, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildBrightsySessionSeed, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildCodeRefAttachment, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildLinearIssueFilter, buildPastedTextAttachment, buildPathRefAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, callAbleTimeTool, canonicalizeRepoPath, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, clampGithubPrBody, clampHistoryMaxCount, clampHistoryMaxDays, classifyWorktreeColumn, claudeAdapter, claudeChromeEnabled, claudeUsageOverLimitWindows, claudeUserSettingsPath, cleanupArchivedHistory, cleanupOrphanWorktrees, clearAgentDoneCustomSoundFile, clearBoardPins, clearHomeBoardCache, clipAgentEventForPaint, clipThinkingForStore, cloneRepoIntoSideboard, codeRefRangeLabel, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentAbleTimeTask, commentGitHubIssue, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmClaudeUsageOverLimitEnabled, confirmLand, connectBrightsyTeam, connectOptionalService, connectSlackToken, connectedOptionalServices, connectedPrSelectors, consumeComposerAttachments, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, countUnpushedVsOrigin, cowboyModeEnabled, createAbleTimePkce, createAbleTimeTask, createChatTab, createEmptyThread, createExistingBranchWorktree, createGitHubIssue, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, detectOptionalServiceClis, disconnectAbleTimeConnection, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectOptionalService, disconnectSlackWorkspace, discoverSkills, dropCachedPrefixOnResume, emptyPublicIntegrations, emptySetupLog, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAbleTimeAccessToken, ensureAbleTimeTask, ensureAgentPath, ensureBrightsyLocalConfigFresh, ensureBrightsyOAuthClientId, ensureCloudCoordinator, ensureConnectedBrightsyTeamTokens, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewGuidelinesFile, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateOccupancyTokens, estimateThreadChars, examplePrefixedBranch, expandComposerPrompt, extractBrightsyContextSummary, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fastForwardMainCheckoutIfSafe, fetchOriginForWorktree, fetchPrHead, finalizeParts, findAgentDoneCustomSoundPath, findConventionSetup, findInvalidCacheControlTtlOrder, findLastBrightsyContextSummary, findLiveThreadForCreate, findLiveThreadForCreateSource, findOrphanWorktrees, findProjectProfileKey, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, flipLinearRelationType, foldLegacyRolesIntoNotes, followUpBehavior, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAccountProfilePlaybookLine, formatArtifactDirective, formatBrightsyFetchError, formatClaudeExtraUsageDetail, formatClaudeUsageCompact, formatClaudeUsageFetchedAt, formatClaudeUsageOverLimitConfirm, formatClaudeUsageOverLimitWait, formatClaudeUsageReset, formatClaudeUsageResetClock, formatClaudeUsageTooltip, formatDetachedJobInvoke, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatIssueToolsDirective, formatIssueToolsReminder, formatLinearDirective, formatLinearReminder, formatLongRunningDirective, formatLongRunningReminder, formatMergePrError, formatMessagesAsTranscript, formatOptionalServicesDirective, formatOptionalServicesReminder, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatPrGateDirective, formatProcessGuideDirective, formatProjectProfilePlaybookLines, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, formatTranscriptMarkdown, formatUiReminder, formatViewerContextDirective, formatViewerContextReminder, formatWorkspaceInventory, formatWorkspaceProfileSuffix, formatWorktreeDirective, formatWorktreeReminder, forwardContextUsage, forwardOccupancyTokens, fromInclusiveInputUsage, getAbleTimeAccessToken, getAbleTimeHost, getAbleTimeOrientation, getAbleTimeTask, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getClaudePlanUsage, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubIssue, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getHomeBoardInputs, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, getWorktreeDirtyStat, gh, ghHeadRef, ghRepoSelectArgs, git, gitBranchPrefixSetting, githubAgentGitEnv, githubHttpsInsteadOfEntries, githubRelationEditFlag, globalAgentCwd, groupHomeBoardWorktrees, handleSlackInbound, harnessEnvKey, hasBakedAbleTimeOAuth, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, historyMaxCount, historyMaxDays, hottestClaudeWindow, httpFetch, importAgentDoneCustomSound, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, installNpmGlobalPackage, installOptionalServiceCli, interruptSlackCoordinatorForInbound, invalidateThreadListCache, invalidateThreadRecord, isAbleTimeConnected, isAbleTimeOAuthCancelled, isAbleTimeRejectedCredential, isAgentDoneSound, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorApiKeyConfigured, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhPrBodyTooLongError, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isHistoryRetentionStub, isHomeBoardThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isInjectedOrchMcpName, isInternalAgentStatusText, isIssueSourceConnected, isLinearConnected, isLinearNoneToken, isLinearOAuthCancelled, isOptionalServiceId, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPlanQuestionAnswersMessage, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSelfWrittenRecord, isSessionQuotaLimit, isSetupLastError, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isStaleLastErrorDuringTurn, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isUnclaimedRunScriptRequest, isUsageOnLimit, isWorkspaceScratchPath, issueAttachmentForAbleTimeTask, issueMatchesAssignee, issueSourceLabel, issueTicketFromThread, killListenersOnPorts, lastAssistantMessageText, lastRequestOccupancy, latestPendingPlanQuestions, linearAuthorizationHeader, linearCycleIsActive, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, linearRelationCreateInput, linearTicketIdFromThread, listAbleTimeAssignedIssues, listAbleTimeProjects, listAbleTimeTasks, listAgentSetupInfo, listBoardPins, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssueCommentsSince, listGitHubIssues, listGlobalThreads, listIssues, listLinearAssignedIssues, listLinearCommentsSince, listLinearIssues, listLinearIssuesDirect, listLinearIssuesFiltered, listLinearTeamCycles, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadHomeBoardInputs, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, mapAbleTimeTask, markPrReady, materializeSystemCaBundle, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAllowToolsFromNames, mcpAuthWarnings, mcpStatusThinkingFromClaudeInit, mentionsPrGoal, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSetupOutput, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, messagesSinceLastBrightsyContextSummary, moveQueuedItemToFront, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeAbleTimeCredential, normalizeAbleTimeHost, normalizeBrightsyEndpoint, normalizeCodeSelection, normalizeLinearRelationType, normalizeParseResult, normalizeServiceOrigin, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, optionalServiceConnected, optionalServiceSpec, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originFetchBranch, originGhRepoEnv, packagedDetachedJobPath, parseAbleTimeOAuthCallbackUrl, parseClaudeUsagePayload, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGitHubIssueNumber, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parsePrDetailsView, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permissionMode, persistPendingFileAttachments, persistVaultKeyInKeychain, planFileAbs, planHistoryAgePurge, planHistoryRetention, planQuestionsSignature, pollSlackOutboundWatches, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, prependQueuedItem, previewLand, primaryCheckoutFromLinkedWorktree, promptMentionsBrightsy, pushBranch, readAgentDoneCustomSound, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSetupLog, readSkillBody, readThread, readViewerContext, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshBrightsyAccessToken, refreshGitHubAuth, registerBrightsyOAuthClient, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeBoardPin, removeQueuedItem, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, reservePort, reservePortRange, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAbleTimeOAuthHost, resolveAccountProfile, resolveAccountProfileFromSettings, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCreateFirstPrompt, resolveCursorModelId, resolveDefaultBranch, resolveDetachedJobScript, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitBranchPrefix, resolveGitDirsForLockRecovery, resolveGitHubIssueRepo, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearCycle, resolveLinearLabel, resolveLinearProject, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewOrchestratorOptions, resolveNewThreadOptions, resolveOrchChildFollowUp, resolveOrchestratorDefaults, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSendFollowUp, resolveSidebarGitPrompt, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveUsageOnLimit, resolveVaultKey, resolveViewerProfile, resolveViewerProfileForRepo, resolveWorktreeStartPoint, rewriteAbleTimeError, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeGitBranchPrefix, sanitizeMcpServerName, saveAbleTimeConnection, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, searchAbleTimeTasks, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shiftQueuedItem, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunHistoryCleanup, shouldRunWorktreeCleanup, shouldStampSetupLastError, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slimMessagesForUiList, slimThreadForUiList, slugify, spawnAgentTurn, splitForCompaction, splitTurnInputForSystemPrompt, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startAbleTimeOAuth, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, statWorktreePath, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takePendingTurnAttachments, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, taskUrl, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadHasCompactedContext, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, ticketSlugForBranch, toAbleTimeIssueInfo, toGitHubIssueInfo, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, trustSystemCertificates, turnCostUsdFromCursorUsage, updateAbleTimeTask, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateGitHubIssue, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateProjectProfileSettings, updateSchedule, updateThread, usageOnLimit, userClaudeMcpConfigPath, userCursorMcpConfigPath, userMcpNamesToDisable, validateLinearApiKey, verifyAbleTimeConnection, verifyOptionalService, visibleToolRowDetail, waitForPidExit, warmGithubAgentAuth, whichOnPath, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeBoardStatus, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreeSlugForTicket, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeViewerContext, writeWorktreeFile };
package/dist/index.js CHANGED
@@ -92,6 +92,7 @@ import {
92
92
  REVIEW_REQUEST_TEMPLATE,
93
93
  REVIEW_SKILL_NAME,
94
94
  REVIEW_SKILL_PATH,
95
+ RUN_SCRIPT_DESKTOP_ADOPT_MS,
95
96
  SEED_FULL_TOOL_MESSAGES,
96
97
  SEED_MAX_CHARS,
97
98
  SESSION_RESET_OCCUPANCY_TOKENS,
@@ -218,6 +219,7 @@ import {
218
219
  isSlackExternalReplyPrompt,
219
220
  isStaleLastErrorDuringTurn,
220
221
  isThisProcessDesktopHost,
222
+ isUnclaimedRunScriptRequest,
221
223
  issueNeedsWorkspacePick,
222
224
  issueTicketFromThread,
223
225
  killListenersOnPorts,
@@ -321,7 +323,7 @@ import {
321
323
  worktreeCleanupSettings,
322
324
  wrapReviewSkillMarkdown,
323
325
  writeWorktreeFile
324
- } from "./chunk-UHT6OS7V.js";
326
+ } from "./chunk-HZLZ34FK.js";
325
327
  import {
326
328
  LEGACY_PLAN_FILE_REL,
327
329
  PLAN_FILE_NAME,
@@ -438,7 +440,7 @@ import {
438
440
  withEventParentId,
439
441
  withEventsParentId,
440
442
  writeInjectedMcpConfig
441
- } from "./chunk-LULHFLPU.js";
443
+ } from "./chunk-FA4CPYCY.js";
442
444
  import {
443
445
  CLOUD_COORDINATOR_BUSY_REPLY,
444
446
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -482,7 +484,7 @@ import {
482
484
  stageBuffersAsAttachments,
483
485
  syncWorkspacesFromThreads,
484
486
  takenTeamSlugsForOrchestration
485
- } from "./chunk-7YKXBFQE.js";
487
+ } from "./chunk-HZFLKVGC.js";
486
488
  import {
487
489
  FAMOUS_SOCCER_TEAMS,
488
490
  GITHUB_PR_BODY_MAX_CHARS,
@@ -580,7 +582,7 @@ import {
580
582
  worktreeDisplayLabelForGroup,
581
583
  worktreeNameFromPath,
582
584
  worktreeSlugForTicket
583
- } from "./chunk-AMMRFFB7.js";
585
+ } from "./chunk-N5TX66CD.js";
584
586
  import {
585
587
  ATTACHMENTS_DIR,
586
588
  CLI_DIR,
@@ -787,7 +789,7 @@ import {
787
789
  updateThread,
788
790
  withThreadLock,
789
791
  writeThread
790
- } from "./chunk-3IMSQNTS.js";
792
+ } from "./chunk-4VGCG2HV.js";
791
793
  import "./chunk-7J72QJOM.js";
792
794
  import {
793
795
  THINKING_EFFORTS,
@@ -5740,7 +5742,7 @@ async function startMcpServer() {
5740
5742
  async ({ ref, name }) => {
5741
5743
  try {
5742
5744
  const threadRef = resolveRunScriptThreadRef(ref);
5743
- orch.stopDev(threadRef, name);
5745
+ await orch.stopDev(threadRef, name);
5744
5746
  return mcpJson({ ok: true, ref: threadRef, stopped: name ?? "all" });
5745
5747
  } catch (err) {
5746
5748
  const message = err instanceof Error ? err.message : String(err);
@@ -8795,6 +8797,7 @@ export {
8795
8797
  REVIEW_REQUEST_TEMPLATE,
8796
8798
  REVIEW_SKILL_NAME,
8797
8799
  REVIEW_SKILL_PATH,
8800
+ RUN_SCRIPT_DESKTOP_ADOPT_MS,
8798
8801
  SEED_FULL_TOOL_MESSAGES,
8799
8802
  SEED_MAX_CHARS,
8800
8803
  SESSION_RESET_OCCUPANCY_TOKENS,
@@ -9224,6 +9227,7 @@ export {
9224
9227
  isThisProcessDesktopHost,
9225
9228
  isThreadCaffeinated,
9226
9229
  isThreadRecordFile,
9230
+ isUnclaimedRunScriptRequest,
9227
9231
  isUsageOnLimit,
9228
9232
  isWorkspaceScratchPath,
9229
9233
  issueAttachmentForAbleTimeTask,
@@ -861,6 +861,22 @@ function resolveThreadEffort(raw) {
861
861
  if (raw.fast) return "low";
862
862
  return "high";
863
863
  }
864
+ function normalizeRunScriptRequest(raw) {
865
+ if (!raw || typeof raw !== "object") return void 0;
866
+ const req = raw;
867
+ if (req.op !== "start" && req.op !== "stop") return void 0;
868
+ if (typeof req.requestId !== "string" || !req.requestId.trim()) return void 0;
869
+ if (typeof req.requestedAt !== "string" || !req.requestedAt.trim()) return void 0;
870
+ return {
871
+ op: req.op,
872
+ scriptName: req.scriptName ?? null,
873
+ requestId: req.requestId,
874
+ requestedAt: req.requestedAt,
875
+ claimedAt: req.claimedAt ?? null,
876
+ fulfilledAt: req.fulfilledAt ?? null,
877
+ error: req.error ?? null
878
+ };
879
+ }
864
880
  function normalizeThread(raw) {
865
881
  return {
866
882
  ...raw,
@@ -884,6 +900,7 @@ function normalizeThread(raw) {
884
900
  stackLayer: raw.stackLayer ?? null,
885
901
  userSetTitle: Boolean(raw.userSetTitle),
886
902
  activeRuns: Array.isArray(raw.activeRuns) ? raw.activeRuns : [],
903
+ runScriptRequest: normalizeRunScriptRequest(raw.runScriptRequest),
887
904
  quotaResumeAt: raw.quotaResumeAt ?? null,
888
905
  quotaContinuedFromId: raw.quotaContinuedFromId ?? null,
889
906
  archivedAt: typeof raw.archivedAt === "string" && raw.archivedAt.trim() ? raw.archivedAt.trim() : void 0
@@ -15259,6 +15276,16 @@ var init_clone_repo = __esm({
15259
15276
  }
15260
15277
  });
15261
15278
 
15279
+ // src/types/thread.ts
15280
+ function isUnclaimedRunScriptRequest(req) {
15281
+ return Boolean(req && !req.claimedAt && !req.fulfilledAt && !req.error);
15282
+ }
15283
+ var init_thread = __esm({
15284
+ "src/types/thread.ts"() {
15285
+ "use strict";
15286
+ }
15287
+ });
15288
+
15262
15289
  // src/store/desktop-host.ts
15263
15290
  function desktopHostPidPath() {
15264
15291
  return (0, import_node_path43.join)(appDataDir(), "desktop-host.pid");
@@ -21527,6 +21554,7 @@ __export(orchestrator_exports, {
21527
21554
  LIGHT_RECONCILE_THROTTLE_MS: () => LIGHT_RECONCILE_THROTTLE_MS,
21528
21555
  LIVE_TURN_SPAWN_GRACE_MS: () => LIVE_TURN_SPAWN_GRACE_MS,
21529
21556
  Orchestrator: () => Orchestrator,
21557
+ RUN_SCRIPT_DESKTOP_ADOPT_MS: () => RUN_SCRIPT_DESKTOP_ADOPT_MS,
21530
21558
  getOrchestrator: () => getOrchestrator,
21531
21559
  isPidAlive: () => isPidAlive,
21532
21560
  resolveOrchChildFollowUp: () => resolveOrchChildFollowUp,
@@ -21638,12 +21666,13 @@ async function startOrchestration(opts) {
21638
21666
  }
21639
21667
  return updated;
21640
21668
  }
21641
- var import_node_events, import_node_fs55, LIVE_TURN_SPAWN_GRACE_MS, STALE_AGENT_PID_WAIT_MS, LIGHT_RECONCILE_THROTTLE_MS, Orchestrator, singleton;
21669
+ var import_node_events, import_node_crypto12, import_node_fs55, LIVE_TURN_SPAWN_GRACE_MS, RUN_SCRIPT_DESKTOP_ADOPT_MS, STALE_AGENT_PID_WAIT_MS, LIGHT_RECONCILE_THROTTLE_MS, Orchestrator, singleton;
21642
21670
  var init_orchestrator = __esm({
21643
21671
  "src/orchestrator/orchestrator.ts"() {
21644
21672
  "use strict";
21645
21673
  import_node_events = require("events");
21646
21674
  init_outbound_watch();
21675
+ import_node_crypto12 = require("crypto");
21647
21676
  import_node_fs55 = require("fs");
21648
21677
  init_error_detail();
21649
21678
  init_run();
@@ -21661,6 +21690,7 @@ var init_orchestrator = __esm({
21661
21690
  init_history_cleanup();
21662
21691
  init_apply_into_main();
21663
21692
  init_clone_repo();
21693
+ init_thread();
21664
21694
  init_message_parts();
21665
21695
  init_usage();
21666
21696
  init_thread_store();
@@ -21706,6 +21736,7 @@ var init_orchestrator = __esm({
21706
21736
  init_schedule_runner();
21707
21737
  init_coordinator_prompt();
21708
21738
  LIVE_TURN_SPAWN_GRACE_MS = 15e3;
21739
+ RUN_SCRIPT_DESKTOP_ADOPT_MS = 2e4;
21709
21740
  STALE_AGENT_PID_WAIT_MS = 2500;
21710
21741
  LIGHT_RECONCILE_THROTTLE_MS = 1e4;
21711
21742
  Orchestrator = class {
@@ -21744,6 +21775,11 @@ var init_orchestrator = __esm({
21744
21775
  jobContinueNudged = /* @__PURE__ */ new Set();
21745
21776
  /** In-flight startDev per worktree run key — agent MCP + UI Start must not double-spawn. */
21746
21777
  startingDev = /* @__PURE__ */ new Map();
21778
+ /**
21779
+ * MCP/CLI poll budget while Electron main adopts `runScriptRequest`.
21780
+ * Tests shorten this so a missing desktop does not wait 20s.
21781
+ */
21782
+ runScriptAdoptTimeoutMs = RUN_SCRIPT_DESKTOP_ADOPT_MS;
21747
21783
  maxConcurrent;
21748
21784
  runningCount = 0;
21749
21785
  constructor(opts) {
@@ -21913,6 +21949,58 @@ var init_orchestrator = __esm({
21913
21949
  this.armDrain(thread.id);
21914
21950
  }
21915
21951
  }
21952
+ this.adoptPersistedRunScripts();
21953
+ }
21954
+ /**
21955
+ * Adopt run-script start/stop persisted by MCP/CLI while this process owns
21956
+ * live children (desktop host). Spawning in stdio leaves the Run tab on
21957
+ * "Starting…" with no logs — `run_output` never reaches the renderer.
21958
+ */
21959
+ adoptPersistedRunScripts() {
21960
+ if (!this.shouldOwnRunScripts()) return;
21961
+ for (const thread of listThreads()) {
21962
+ if (thread.status === "archived") continue;
21963
+ const req = thread.runScriptRequest;
21964
+ if (!isUnclaimedRunScriptRequest(req) || !req) continue;
21965
+ const claimedAt = (/* @__PURE__ */ new Date()).toISOString();
21966
+ const claimed = { ...req, claimedAt };
21967
+ updateThread(thread.id, { runScriptRequest: claimed });
21968
+ void this.applyRunScriptRequest(thread.id, claimed);
21969
+ }
21970
+ }
21971
+ async applyRunScriptRequest(threadId, req) {
21972
+ try {
21973
+ if (req.op === "start") {
21974
+ await this.startDev(threadId, req.scriptName ?? void 0);
21975
+ } else {
21976
+ await this.stopDev(threadId, req.scriptName ?? void 0);
21977
+ }
21978
+ const latest = readThread(threadId);
21979
+ const current = latest?.runScriptRequest;
21980
+ if (current?.requestId === req.requestId && !current.error) {
21981
+ updateThread(threadId, {
21982
+ runScriptRequest: {
21983
+ ...current,
21984
+ fulfilledAt: (/* @__PURE__ */ new Date()).toISOString()
21985
+ }
21986
+ });
21987
+ }
21988
+ } catch (err) {
21989
+ const message = err instanceof Error ? err.message : String(err);
21990
+ const latest = readThread(threadId);
21991
+ const current = latest?.runScriptRequest;
21992
+ if (!current || current.requestId !== req.requestId) return;
21993
+ updateThread(threadId, {
21994
+ runScriptRequest: { ...current, error: message }
21995
+ });
21996
+ }
21997
+ }
21998
+ /**
21999
+ * Same rule as agent-queue drain: MCP stdio must not own Electron children
22000
+ * while Sideboard.app is alive.
22001
+ */
22002
+ shouldOwnRunScripts() {
22003
+ return thisProcessShouldDrainAgentQueues();
21916
22004
  }
21917
22005
  /**
21918
22006
  * Mid-session: a worktree can sit at `running` after the agent process dies
@@ -22961,6 +23049,13 @@ var init_orchestrator = __esm({
22961
23049
  "No run script found for this worktree. Add [scripts.run.*] in the worktree\u2019s .sideboard/settings.toml or .conductor/settings.toml (or settings.local.toml on the main repo)."
22962
23050
  );
22963
23051
  }
23052
+ if (!this.shouldOwnRunScripts()) {
23053
+ const result = await this.requestDesktopRunScript(thread, "start", resolvedName);
23054
+ if (!result) {
23055
+ throw new Error("Desktop did not return a run script port.");
23056
+ }
23057
+ return result;
23058
+ }
22964
23059
  const runKey = worktreeRunProcessKey(thread.worktreePath, resolvedName);
22965
23060
  const inFlight = this.startingDev.get(runKey);
22966
23061
  if (inFlight) return inFlight;
@@ -23083,8 +23178,65 @@ var init_orchestrator = __esm({
23083
23178
  });
23084
23179
  return { port: handle.port, scriptName: resolvedName, ports: handle.ports };
23085
23180
  }
23086
- stopDev(threadRef, scriptName) {
23181
+ /**
23182
+ * Persist a run-script intent for the desktop host (MCP/CLI while the board
23183
+ * is alive). Polls until Electron main adopts and fulfills it.
23184
+ */
23185
+ async requestDesktopRunScript(thread, op, scriptName) {
23186
+ const latest = readThread(thread.id) ?? thread;
23187
+ const pending = latest.runScriptRequest;
23188
+ const claimedAt = pending?.claimedAt;
23189
+ const staleClaim = typeof claimedAt === "string" && Date.now() - Date.parse(claimedAt) > this.runScriptAdoptTimeoutMs;
23190
+ const sameIntent = pending && pending.op === op && (pending.scriptName ?? null) === (scriptName ?? null) && !pending.error && !pending.fulfilledAt && !staleClaim;
23191
+ const request = sameIntent ? pending : {
23192
+ op,
23193
+ scriptName: scriptName ?? null,
23194
+ requestId: (0, import_node_crypto12.randomUUID)(),
23195
+ requestedAt: (/* @__PURE__ */ new Date()).toISOString()
23196
+ };
23197
+ if (!sameIntent) {
23198
+ updateThread(thread.id, { runScriptRequest: request });
23199
+ }
23200
+ return this.waitForDesktopRunScript(thread.id, request, op, scriptName);
23201
+ }
23202
+ async waitForDesktopRunScript(threadId, request, op, scriptName) {
23203
+ const deadline = Date.now() + this.runScriptAdoptTimeoutMs;
23204
+ while (Date.now() < deadline) {
23205
+ const latest = readThread(threadId);
23206
+ if (!latest) {
23207
+ throw new Error("Thread disappeared while waiting for the desktop run script.");
23208
+ }
23209
+ const req = latest.runScriptRequest;
23210
+ if (req?.requestId === request.requestId && req.error) {
23211
+ throw new Error(req.error);
23212
+ }
23213
+ const shared = mergeWorktreeActiveRuns(threadsSharingWorktree(latest.worktreePath));
23214
+ const run2 = scriptName ? shared.activeRuns.find((r) => r.scriptName === scriptName) : shared.activeRuns[0];
23215
+ const fulfilled = req?.requestId === request.requestId && Boolean(req.fulfilledAt);
23216
+ const requestGone = !req || req.requestId !== request.requestId;
23217
+ if (op === "start") {
23218
+ if (run2 && (fulfilled || requestGone || run2.startedAt >= request.requestedAt)) {
23219
+ return { port: run2.port, scriptName: run2.scriptName, ports: run2.ports };
23220
+ }
23221
+ if (fulfilled && !run2) {
23222
+ throw new Error("Desktop reported the run script started, but it is not active.");
23223
+ }
23224
+ } else {
23225
+ const gone = scriptName ? !run2 : shared.activeRuns.length === 0;
23226
+ if (fulfilled || gone) return null;
23227
+ }
23228
+ await new Promise((r) => setTimeout(r, 40));
23229
+ }
23230
+ throw new Error(
23231
+ op === "start" ? "Desktop did not start the run script in time. Is Sideboard.app running this worktree?" : "Desktop did not stop the run script in time."
23232
+ );
23233
+ }
23234
+ async stopDev(threadRef, scriptName) {
23087
23235
  const thread = this.requireThread(threadRef);
23236
+ if (!this.shouldOwnRunScripts()) {
23237
+ await this.requestDesktopRunScript(thread, "stop", scriptName);
23238
+ return;
23239
+ }
23088
23240
  const siblings = threadsSharingWorktree(thread.worktreePath);
23089
23241
  const shared = mergeWorktreeActiveRuns(siblings);
23090
23242
  if (scriptName) {
@@ -24078,7 +24230,7 @@ init_system_ca();
24078
24230
  var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
24079
24231
  var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
24080
24232
  var import_zod9 = require("zod");
24081
- var import_node_crypto14 = require("crypto");
24233
+ var import_node_crypto15 = require("crypto");
24082
24234
  var import_node_path55 = require("path");
24083
24235
  init_orchestrator();
24084
24236
  init_worktree();
@@ -24505,7 +24657,7 @@ async function createGitHubIssue(input, opts) {
24505
24657
  init_fetch();
24506
24658
 
24507
24659
  // src/integrations/linear-oauth.ts
24508
- var import_node_crypto12 = require("crypto");
24660
+ var import_node_crypto13 = require("crypto");
24509
24661
  var import_node_http2 = require("http");
24510
24662
  init_app_settings();
24511
24663
  init_fetch();
@@ -27505,7 +27657,7 @@ init_worktree();
27505
27657
  init_paths();
27506
27658
 
27507
27659
  // src/board/board-pins.ts
27508
- var import_node_crypto13 = require("crypto");
27660
+ var import_node_crypto14 = require("crypto");
27509
27661
  var import_node_fs56 = require("fs");
27510
27662
  var import_node_path53 = require("path");
27511
27663
  init_paths();
@@ -28286,7 +28438,7 @@ async function startMcpServer() {
28286
28438
  async ({ ref, name }) => {
28287
28439
  try {
28288
28440
  const threadRef = resolveRunScriptThreadRef(ref);
28289
- orch.stopDev(threadRef, name);
28441
+ await orch.stopDev(threadRef, name);
28290
28442
  return mcpJson({ ok: true, ref: threadRef, stopped: name ?? "all" });
28291
28443
  } catch (err) {
28292
28444
  const message = err instanceof Error ? err.message : String(err);
@@ -28414,7 +28566,7 @@ async function startMcpServer() {
28414
28566
  const ident = issue?.identifier ?? ref.trim();
28415
28567
  const attachments = issue ? [
28416
28568
  {
28417
- id: (0, import_node_crypto14.randomUUID)(),
28569
+ id: (0, import_node_crypto15.randomUUID)(),
28418
28570
  name: issue.identifier,
28419
28571
  kind: "issue",
28420
28572
  content: [
@@ -51,7 +51,7 @@ import {
51
51
  threadsSharingWorktree,
52
52
  updateSchedule,
53
53
  waitForDetachedJob
54
- } from "../chunk-6HKGCUDN.js";
54
+ } from "../chunk-JJRRLCCS.js";
55
55
  import "../chunk-JFOPOMK7.js";
56
56
  import "../chunk-YWI3IBP2.js";
57
57
  import {
@@ -62,12 +62,12 @@ import {
62
62
  materializeSystemCaBundle,
63
63
  sideboardMcpProfile,
64
64
  trustSystemCertificates
65
- } from "../chunk-T7Y5ULHM.js";
65
+ } from "../chunk-6L25K7BE.js";
66
66
  import {
67
67
  GLOBAL_WORKSPACE_ID,
68
68
  isCloudCoordinatorThread,
69
69
  listWorkspaces
70
- } from "../chunk-N7UXGM3Y.js";
70
+ } from "../chunk-UNTOZA3C.js";
71
71
  import "../chunk-SXFRXNBM.js";
72
72
  import "../chunk-P2BSMNHB.js";
73
73
  import "../chunk-GHRZNPBK.js";
@@ -85,9 +85,9 @@ import {
85
85
  resolveListPrsOptions,
86
86
  resolveRepoRoot,
87
87
  warmGithubAgentAuth
88
- } from "../chunk-F3GT6DQW.js";
88
+ } from "../chunk-4CZ25DO2.js";
89
89
  import "../chunk-D6JWYJ4P.js";
90
- import "../chunk-HY2GFZ5S.js";
90
+ import "../chunk-XJETIO4K.js";
91
91
  import "../chunk-X5B3OS5I.js";
92
92
  import "../chunk-SZJZEFTY.js";
93
93
  import {
@@ -4260,7 +4260,7 @@ async function startMcpServer() {
4260
4260
  async ({ ref, name }) => {
4261
4261
  try {
4262
4262
  const threadRef = resolveRunScriptThreadRef(ref);
4263
- orch.stopDev(threadRef, name);
4263
+ await orch.stopDev(threadRef, name);
4264
4264
  return mcpJson({ ok: true, ref: threadRef, stopped: name ?? "all" });
4265
4265
  } catch (err) {
4266
4266
  const message = err instanceof Error ? err.message : String(err);
@@ -4,23 +4,24 @@ import {
4
4
  LIGHT_RECONCILE_THROTTLE_MS,
5
5
  LIVE_TURN_SPAWN_GRACE_MS,
6
6
  Orchestrator,
7
+ RUN_SCRIPT_DESKTOP_ADOPT_MS,
7
8
  getOrchestrator,
8
9
  isPidAlive,
9
10
  resolveOrchChildFollowUp,
10
11
  resolveSendFollowUp,
11
12
  startOrchestration,
12
13
  waitForPidExit
13
- } from "./chunk-6HKGCUDN.js";
14
+ } from "./chunk-JJRRLCCS.js";
14
15
  import "./chunk-JFOPOMK7.js";
15
16
  import "./chunk-YWI3IBP2.js";
16
- import "./chunk-T7Y5ULHM.js";
17
- import "./chunk-N7UXGM3Y.js";
17
+ import "./chunk-6L25K7BE.js";
18
+ import "./chunk-UNTOZA3C.js";
18
19
  import "./chunk-SXFRXNBM.js";
19
20
  import "./chunk-P2BSMNHB.js";
20
21
  import "./chunk-VKQGAWHY.js";
21
- import "./chunk-F3GT6DQW.js";
22
+ import "./chunk-4CZ25DO2.js";
22
23
  import "./chunk-D6JWYJ4P.js";
23
- import "./chunk-HY2GFZ5S.js";
24
+ import "./chunk-XJETIO4K.js";
24
25
  import "./chunk-X5B3OS5I.js";
25
26
  import "./chunk-SZJZEFTY.js";
26
27
  import "./chunk-ABOBTSO6.js";
@@ -34,6 +35,7 @@ export {
34
35
  LIGHT_RECONCILE_THROTTLE_MS,
35
36
  LIVE_TURN_SPAWN_GRACE_MS,
36
37
  Orchestrator,
38
+ RUN_SCRIPT_DESKTOP_ADOPT_MS,
37
39
  getOrchestrator,
38
40
  isPidAlive,
39
41
  resolveOrchChildFollowUp,