@sideboard-ai/core 0.1.122 → 0.1.125

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -987,7 +987,7 @@ declare function caffeinateWhileCloudConnectEnabled(settings?: AppSettings): boo
987
987
  declare function deleteBranchOnPurgeEnabled(settings?: AppSettings): boolean;
988
988
  /** Default off. When on, create may use the project checkout on the default branch. */
989
989
  declare function cowboyModeEnabled(settings?: AppSettings): boolean;
990
- /** Settings → Advanced → Show cost (default off). */
990
+ /** Settings → Advanced → Show cost (when available) (default off). */
991
991
  declare function showCostEnabled(settings?: AppSettings): boolean;
992
992
  /** Conductor-style opt-in — default off. */
993
993
  declare function autoArchiveOnMergeEnabled(settings?: AppSettings): boolean;
@@ -2060,6 +2060,7 @@ type CursorSdkStreamMessage = {
2060
2060
  cacheReadTokens?: number;
2061
2061
  cacheWriteTokens?: number;
2062
2062
  };
2063
+ run_id?: string;
2063
2064
  };
2064
2065
  /** Cursor SDK `UsageCost` — dollar amounts in float cents. */
2065
2066
  type CursorUsageCost = {
@@ -3705,95 +3706,6 @@ declare function getBrightsySession(): Promise<BrightsySession>;
3705
3706
  */
3706
3707
  declare function switchBrightsyAccount(accountIdOrSlug: string): Promise<BrightsySession>;
3707
3708
 
3708
- interface SlackOutboundReply {
3709
- userId: string;
3710
- userName: string;
3711
- ts: string;
3712
- text: string;
3713
- }
3714
- interface SlackOutboundWatch {
3715
- id: string;
3716
- teamId: string;
3717
- channelId: string;
3718
- /** Posted message ts. */
3719
- ts: string;
3720
- /** Parent thread ts (same as `ts` for top-level posts). */
3721
- threadTs: string;
3722
- kind: 'dm' | 'channel';
3723
- toUserId?: string;
3724
- toLabel: string;
3725
- ownerUserId?: string;
3726
- /** Sideboard orchestration thread that called slack_post. */
3727
- sourceThreadId?: string;
3728
- postedAt: string;
3729
- lastSeenTs: string;
3730
- unread: boolean;
3731
- replyUserId?: string;
3732
- replyUserName?: string;
3733
- replyTs?: string;
3734
- replyPreview?: string;
3735
- permalink?: string;
3736
- /** Reply timestamps already copied into the source thread (not commands). */
3737
- injectedReplyTs?: string[];
3738
- replies?: SlackOutboundReply[];
3739
- }
3740
- interface SlackReplyBadge {
3741
- id: string;
3742
- userId: string;
3743
- userName: string;
3744
- initials: string;
3745
- hue: number;
3746
- permalink: string;
3747
- label: string;
3748
- preview?: string;
3749
- repliedAt: string;
3750
- }
3751
- declare function slackArchiveUrl(channelId: string, ts: string): string;
3752
- declare function formatSlackExternalReplyPrompt(input: {
3753
- userName: string;
3754
- kind: 'dm' | 'channel';
3755
- toLabel: string;
3756
- text: string;
3757
- permalink?: string;
3758
- }): string;
3759
- declare function isSlackExternalReplyPrompt(text: string): boolean;
3760
- /**
3761
- * Slack replies appended after the last agent turn and before the current user
3762
- * prompt. CLI --resume does not see Sideboard-injected messages, so the next
3763
- * turn must include these in `prompt` (not cachedPrefix).
3764
- */
3765
- declare function pendingSlackExternalReplies(messages: Array<{
3766
- role: string;
3767
- text: string;
3768
- }>): string[];
3769
- declare function formatSlackRepliesForTurn(replies: string[]): string | null;
3770
- declare function formatSlackReplyContinuePrompt(input: {
3771
- userName: string;
3772
- kind: 'dm' | 'channel';
3773
- toLabel: string;
3774
- count: number;
3775
- }): string;
3776
- declare function listSlackOutboundWatches(): SlackOutboundWatch[];
3777
- declare function recordSlackOutboundWatch(input: {
3778
- teamId: string;
3779
- channelId: string;
3780
- ts: string;
3781
- threadTs?: string;
3782
- kind: 'dm' | 'channel';
3783
- toUserId?: string;
3784
- toLabel: string;
3785
- ownerUserId?: string;
3786
- sourceThreadId?: string;
3787
- }): SlackOutboundWatch | null;
3788
- declare function listSlackReplyBadges(): SlackReplyBadge[];
3789
- declare function dismissSlackReplyBadge(badgeKey: string): SlackReplyBadge[];
3790
- declare function permalinkForSlackReplyBadge(badgeKey: string): string | null;
3791
- declare function refreshSlackReplyBadges(opts?: {
3792
- fetchImpl?: typeof fetch;
3793
- force?: boolean;
3794
- now?: number;
3795
- }): Promise<SlackReplyBadge[]>;
3796
-
3797
3709
  interface SlackWorkspace {
3798
3710
  team_id: string;
3799
3711
  team_name: string;
@@ -3955,10 +3867,6 @@ interface IpcApi {
3955
3867
  onCaffeinateHoldChanged(listener: (state: CaffeinateHoldState & {
3956
3868
  appCaffeinated: boolean;
3957
3869
  }) => void): () => void;
3958
- /** Unread Slack replies to messages this Mac posted (relayed as info; queues a follow-up turn, not a Listen interrupt). */
3959
- getSlackReplyBadges(): Promise<SlackReplyBadge[]>;
3960
- /** Open the Slack thread in the browser/app and clear that user's badge. */
3961
- openSlackReply(badgeId: string): Promise<SlackReplyBadge[]>;
3962
3870
  /**
3963
3871
  * Unified issues for Create-from / Link issue (Linear API or GitHub Issues,
3964
3872
  * based on Account preference with Linear→GitHub fallback).
@@ -4810,4 +4718,74 @@ interface SlackRelayClientOptions {
4810
4718
  */
4811
4719
  declare function runSlackRelayClient(opts: SlackRelayClientOptions): Promise<void>;
4812
4720
 
4813
- export { AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, 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, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, 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, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SetupRunResult, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type 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 UpdateScheduledTaskPatch, type UsageScope, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, ackSlackInboundSeen, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, 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, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, connectSlackToken, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, cowboyModeEnabled, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectSlackWorkspace, discoverSkills, dismissSlackReplyBadge, dropCachedPrefixOnResume, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findConventionSetup, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatMergePrError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatProcessGuideDirective, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, 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, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, gh, ghHeadRef, ghRepoSelectArgs, git, githubAgentGitEnv, globalAgentCwd, handleSlackInbound, harnessEnvKey, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, interruptSlackCoordinatorForInbound, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isLinearConnected, isLinearOAuthCancelled, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSessionQuotaLimit, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isWorkspaceScratchPath, lastRequestOccupancy, linearAuthorizationHeader, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackReplyBadges, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permalinkForSlackReplyBadge, permissionMode, persistVaultKeyInKeychain, planFileAbs, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshGitHubAuth, refreshSlackReplyBadges, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitDirsForLockRecovery, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveVaultKey, resolveWorktreeStartPoint, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunWorktreeCleanup, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, turnCostUsdFromCursorUsage, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateSchedule, updateThread, userClaudeMcpConfigPath, userCursorMcpConfigPath, validateLinearApiKey, waitForPidExit, warmGithubAgentAuth, withAgentInstructions, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
4721
+ interface SlackOutboundReply {
4722
+ userId: string;
4723
+ userName: string;
4724
+ ts: string;
4725
+ text: string;
4726
+ }
4727
+ interface SlackOutboundWatch {
4728
+ id: string;
4729
+ teamId: string;
4730
+ channelId: string;
4731
+ /** Posted message ts. */
4732
+ ts: string;
4733
+ /** Parent thread ts (same as `ts` for top-level posts). */
4734
+ threadTs: string;
4735
+ kind: 'dm' | 'channel';
4736
+ toUserId?: string;
4737
+ toLabel: string;
4738
+ ownerUserId?: string;
4739
+ /** Sideboard orchestration thread that called slack_post. */
4740
+ sourceThreadId?: string;
4741
+ postedAt: string;
4742
+ lastSeenTs: string;
4743
+ permalink?: string;
4744
+ /** Reply timestamps already copied into the source thread (not commands). */
4745
+ injectedReplyTs?: string[];
4746
+ replies?: SlackOutboundReply[];
4747
+ }
4748
+ declare function slackArchiveUrl(channelId: string, ts: string): string;
4749
+ declare function formatSlackExternalReplyPrompt(input: {
4750
+ userName: string;
4751
+ kind: 'dm' | 'channel';
4752
+ toLabel: string;
4753
+ text: string;
4754
+ permalink?: string;
4755
+ }): string;
4756
+ declare function isSlackExternalReplyPrompt(text: string): boolean;
4757
+ /**
4758
+ * Slack replies appended after the last agent turn and before the current user
4759
+ * prompt. CLI --resume does not see Sideboard-injected messages, so the next
4760
+ * turn must include these in `prompt` (not cachedPrefix).
4761
+ */
4762
+ declare function pendingSlackExternalReplies(messages: Array<{
4763
+ role: string;
4764
+ text: string;
4765
+ }>): string[];
4766
+ declare function formatSlackRepliesForTurn(replies: string[]): string | null;
4767
+ declare function formatSlackReplyContinuePrompt(input: {
4768
+ userName: string;
4769
+ kind: 'dm' | 'channel';
4770
+ toLabel: string;
4771
+ count: number;
4772
+ }): string;
4773
+ declare function listSlackOutboundWatches(): SlackOutboundWatch[];
4774
+ declare function recordSlackOutboundWatch(input: {
4775
+ teamId: string;
4776
+ channelId: string;
4777
+ ts: string;
4778
+ threadTs?: string;
4779
+ kind: 'dm' | 'channel';
4780
+ toUserId?: string;
4781
+ toLabel: string;
4782
+ ownerUserId?: string;
4783
+ sourceThreadId?: string;
4784
+ }): SlackOutboundWatch | null;
4785
+ declare function pollSlackOutboundWatches(opts?: {
4786
+ fetchImpl?: typeof fetch;
4787
+ force?: boolean;
4788
+ now?: number;
4789
+ }): Promise<void>;
4790
+
4791
+ export { AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, 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, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, 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, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SetupRunResult, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, type UpdateScheduledTaskPatch, type UsageScope, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, ackSlackInboundSeen, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, 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, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, connectSlackToken, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, cowboyModeEnabled, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectSlackWorkspace, discoverSkills, dropCachedPrefixOnResume, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findConventionSetup, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatMergePrError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatProcessGuideDirective, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, 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, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, gh, ghHeadRef, ghRepoSelectArgs, git, githubAgentGitEnv, globalAgentCwd, handleSlackInbound, harnessEnvKey, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, interruptSlackCoordinatorForInbound, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isLinearConnected, isLinearOAuthCancelled, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSessionQuotaLimit, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isWorkspaceScratchPath, lastRequestOccupancy, linearAuthorizationHeader, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permissionMode, persistVaultKeyInKeychain, planFileAbs, pollSlackOutboundWatches, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshGitHubAuth, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitDirsForLockRecovery, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveVaultKey, resolveWorktreeStartPoint, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunWorktreeCleanup, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, turnCostUsdFromCursorUsage, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateSchedule, updateThread, userClaudeMcpConfigPath, userCursorMcpConfigPath, validateLinearApiKey, waitForPidExit, warmGithubAgentAuth, withAgentInstructions, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
package/dist/index.js CHANGED
@@ -52,7 +52,6 @@ import {
52
52
  detectAgents,
53
53
  disconnectSlackWorkspace,
54
54
  discoverSkills,
55
- dismissSlackReplyBadge,
56
55
  ensureReviewRequestFile,
57
56
  ensureReviewSkillFile,
58
57
  estimateMessageChars,
@@ -108,7 +107,6 @@ import {
108
107
  listRunScripts,
109
108
  listSchedules,
110
109
  listSlackOutboundWatches,
111
- listSlackReplyBadges,
112
110
  listSlackWorkspaces,
113
111
  listSlackWorkspacesRaw,
114
112
  listWorktreeFiles,
@@ -118,7 +116,7 @@ import {
118
116
  openStackLayer,
119
117
  parseDurationMs,
120
118
  pendingSlackExternalReplies,
121
- permalinkForSlackReplyBadge,
119
+ pollSlackOutboundWatches,
122
120
  previewLand,
123
121
  readExistingReviewRequestFile,
124
122
  readSkillBody,
@@ -128,7 +126,6 @@ import {
128
126
  readWorktreeInclude,
129
127
  recordScheduleRun,
130
128
  recordSlackOutboundWatch,
131
- refreshSlackReplyBadges,
132
129
  releaseDesktopHost,
133
130
  requestReview,
134
131
  requireAgent,
@@ -171,7 +168,7 @@ import {
171
168
  worktreeCleanupSettings,
172
169
  wrapReviewSkillMarkdown,
173
170
  writeWorktreeFile
174
- } from "./chunk-EQHXMN7O.js";
171
+ } from "./chunk-ED27HCPV.js";
175
172
  import {
176
173
  BRIGHTSY_MCP_ALLOWED_TOOLS,
177
174
  CLAUDE_MODEL_CATALOG,
@@ -250,7 +247,7 @@ import {
250
247
  withEventParentId,
251
248
  withEventsParentId,
252
249
  writeInjectedMcpConfig
253
- } from "./chunk-QHST4DZQ.js";
250
+ } from "./chunk-7Y3AYQWT.js";
254
251
  import {
255
252
  brightsyConfigPath,
256
253
  brightsyMcpServerName,
@@ -327,7 +324,7 @@ import {
327
324
  preferredCursorCostCents,
328
325
  turnCostUsdFromCursorUsage,
329
326
  withMaxOldSpaceSize
330
- } from "./chunk-3M5CVKHK.js";
327
+ } from "./chunk-IUJOI7KK.js";
331
328
  import {
332
329
  caffeinateHoldPath,
333
330
  getCaffeinateHold,
@@ -1941,7 +1938,7 @@ function registerSlackTools(server) {
1941
1938
  },
1942
1939
  async ({ team_id }) => {
1943
1940
  try {
1944
- await refreshSlackReplyBadges({ force: true });
1941
+ await pollSlackOutboundWatches({ force: true });
1945
1942
  const team = team_id?.trim();
1946
1943
  const watches = listSlackOutboundWatches().filter(
1947
1944
  (w) => !team || w.teamId === team
@@ -5771,7 +5768,6 @@ export {
5771
5768
  disconnectLinearConnection,
5772
5769
  disconnectSlackWorkspace,
5773
5770
  discoverSkills,
5774
- dismissSlackReplyBadge,
5775
5771
  dropCachedPrefixOnResume,
5776
5772
  encodeBrightsyTarget,
5777
5773
  enrichPathWithNpmGlobalBin,
@@ -5953,7 +5949,6 @@ export {
5953
5949
  listRunScripts,
5954
5950
  listSchedules,
5955
5951
  listSlackOutboundWatches,
5956
- listSlackReplyBadges,
5957
5952
  listSlackWorkspaces,
5958
5953
  listThreads,
5959
5954
  listWorkspaces,
@@ -6009,10 +6004,10 @@ export {
6009
6004
  partsToAssistantText,
6010
6005
  pastedTextStats,
6011
6006
  pendingSlackExternalReplies,
6012
- permalinkForSlackReplyBadge,
6013
6007
  permissionMode,
6014
6008
  persistVaultKeyInKeychain,
6015
6009
  planFileAbs,
6010
+ pollSlackOutboundWatches,
6016
6011
  posixShellSingleQuote,
6017
6012
  preferredCursorCostCents,
6018
6013
  prepareTerminalCommand,
@@ -6030,7 +6025,6 @@ export {
6030
6025
  recordScheduleRun,
6031
6026
  recordSlackOutboundWatch,
6032
6027
  refreshGitHubAuth,
6033
- refreshSlackReplyBadges,
6034
6028
  registerPackagedUserMcpClients,
6035
6029
  releaseCaffeinateHoldForThread,
6036
6030
  releaseDesktopHost,
@@ -998,26 +998,9 @@ function storePath3() {
998
998
  function watchId(teamId, channelId, ts) {
999
999
  return `${teamId}:${channelId}:${ts}`;
1000
1000
  }
1001
- function badgeId(teamId, userId) {
1002
- return `${teamId}:${userId}`;
1003
- }
1004
1001
  function slackArchiveUrl(channelId, ts) {
1005
1002
  return `https://slack.com/archives/${channelId}/p${ts.replace(".", "")}`;
1006
1003
  }
1007
- function initialsFromName(name) {
1008
- const parts = name.trim().split(/\s+/).filter(Boolean);
1009
- if (parts.length === 0) return "?";
1010
- if (parts.length === 1) {
1011
- const w = parts[0];
1012
- return (w.slice(0, 2) || "?").toUpperCase();
1013
- }
1014
- return `${parts[0][0] ?? ""}${parts[parts.length - 1][0] ?? ""}`.toUpperCase();
1015
- }
1016
- function hueFromId(id) {
1017
- let h = 0;
1018
- for (const c of id) h = h * 31 + c.charCodeAt(0) >>> 0;
1019
- return h % 360;
1020
- }
1021
1004
  function tsNewer(a, b) {
1022
1005
  return Number(a) > Number(b);
1023
1006
  }
@@ -1173,7 +1156,6 @@ function recordSlackOutboundWatch(input) {
1173
1156
  sourceThreadId: input.sourceThreadId?.trim() || void 0,
1174
1157
  postedAt: (/* @__PURE__ */ new Date()).toISOString(),
1175
1158
  lastSeenTs: ts,
1176
- unread: false,
1177
1159
  permalink: slackArchiveUrl(channelId, ts),
1178
1160
  injectedReplyTs: [],
1179
1161
  replies: []
@@ -1260,36 +1242,9 @@ async function fetchMessages(token, watch, fetchImpl) {
1260
1242
  }
1261
1243
  return out;
1262
1244
  }
1263
- function listSlackReplyBadges() {
1264
- const unread = readStore3().filter((w) => w.unread && w.replyUserId && w.permalink);
1265
- const byUser = /* @__PURE__ */ new Map();
1266
- for (const w of unread) {
1267
- const id = badgeId(w.teamId, w.replyUserId);
1268
- const prev = byUser.get(id);
1269
- if (!prev || tsNewer(w.replyTs || "", prev.replyTs || "")) {
1270
- byUser.set(id, w);
1271
- }
1272
- }
1273
- return [...byUser.entries()].map(([id, w]) => {
1274
- const userName = w.replyUserName || w.toLabel || "Slack";
1275
- return {
1276
- id,
1277
- userId: w.replyUserId,
1278
- userName,
1279
- initials: initialsFromName(userName),
1280
- hue: hueFromId(w.replyUserId),
1281
- permalink: w.permalink || slackArchiveUrl(w.channelId, w.replyTs || w.ts),
1282
- label: w.toLabel,
1283
- preview: w.replyPreview,
1284
- repliedAt: w.replyTs || w.postedAt
1285
- };
1286
- }).sort((a, b) => b.repliedAt.localeCompare(a.repliedAt));
1287
- }
1288
- async function refreshSlackReplyBadges(opts) {
1245
+ async function pollSlackOutboundWatches(opts) {
1289
1246
  const now = opts?.now ?? Date.now();
1290
- if (!opts?.force && now - lastPollMs < POLL_INTERVAL_MS) {
1291
- return listSlackReplyBadges();
1292
- }
1247
+ if (!opts?.force && now - lastPollMs < POLL_INTERVAL_MS) return;
1293
1248
  lastPollMs = now;
1294
1249
  const existing = readStore3();
1295
1250
  let watches = pruneWatches(existing, now);
@@ -1300,7 +1255,7 @@ async function refreshSlackReplyBadges(opts) {
1300
1255
  if (!ws) continue;
1301
1256
  let token;
1302
1257
  try {
1303
- token = slackTokenFor(ws, "read");
1258
+ token = slackTokenFor(ws, "write");
1304
1259
  } catch {
1305
1260
  continue;
1306
1261
  }
@@ -1310,9 +1265,7 @@ async function refreshSlackReplyBadges(opts) {
1310
1265
  const injected2 = new Set(watch.injectedReplyTs ?? []);
1311
1266
  const collected = [...watch.replies ?? []];
1312
1267
  let lastSeenTs = watch.lastSeenTs;
1313
- let latestUser;
1314
1268
  let latestName;
1315
- let latestText = "";
1316
1269
  let latestPermalink = watch.permalink;
1317
1270
  let newlyInjected = 0;
1318
1271
  for (const msg of replies) {
@@ -1338,9 +1291,7 @@ async function refreshSlackReplyBadges(opts) {
1338
1291
  text: msg.text ?? ""
1339
1292
  };
1340
1293
  if (!collected.some((r) => r.ts === ts)) collected.push(reply);
1341
- latestUser = user;
1342
1294
  latestName = replyUserName;
1343
- latestText = reply.text;
1344
1295
  latestPermalink = permalink;
1345
1296
  if (injected2.has(ts)) {
1346
1297
  lastSeenTs = ts;
@@ -1371,11 +1322,6 @@ async function refreshSlackReplyBadges(opts) {
1371
1322
  watches[i] = {
1372
1323
  ...watch,
1373
1324
  lastSeenTs,
1374
- unread: true,
1375
- replyUserId: latestUser,
1376
- replyUserName: latestName,
1377
- replyTs: lastSeenTs,
1378
- replyPreview: latestText.slice(0, 140),
1379
1325
  permalink: latestPermalink,
1380
1326
  injectedReplyTs: [...injected2],
1381
1327
  replies: collected.slice(-MAX_REPLIES_PER_WATCH)
@@ -1383,7 +1329,6 @@ async function refreshSlackReplyBadges(opts) {
1383
1329
  changed = true;
1384
1330
  }
1385
1331
  if (changed) writeStore(watches);
1386
- return listSlackReplyBadges();
1387
1332
  }
1388
1333
  var import_node_fs9, import_node_path10, MAX_WATCHES, MAX_REPLIES_PER_WATCH, WATCH_TTL_MS, POLL_INTERVAL_MS, lastPollMs, nameCache, continueOnReply;
1389
1334
  var init_outbound_watch = __esm({
@@ -18229,7 +18174,7 @@ function registerSlackTools(server) {
18229
18174
  },
18230
18175
  async ({ team_id }) => {
18231
18176
  try {
18232
- await refreshSlackReplyBadges({ force: true });
18177
+ await pollSlackOutboundWatches({ force: true });
18233
18178
  const team = team_id?.trim();
18234
18179
  const watches = listSlackOutboundWatches().filter(
18235
18180
  (w) => !team || w.teamId === team
@@ -11,19 +11,19 @@ import {
11
11
  listSchedules,
12
12
  listSlackOutboundWatches,
13
13
  listSlackWorkspaces,
14
+ pollSlackOutboundWatches,
14
15
  readTurnLive,
15
16
  recordSlackOutboundWatch,
16
- refreshSlackReplyBadges,
17
17
  requireSlackWorkspace,
18
18
  resolveScheduleThreadId,
19
19
  slackApi,
20
20
  slackTokenFor,
21
21
  updateSchedule
22
- } from "../chunk-KRM3A5UK.js";
22
+ } from "../chunk-GKY2GR2J.js";
23
23
  import {
24
24
  listModelsForAgent,
25
25
  sideboardMcpProfile
26
- } from "../chunk-OEBYW4TO.js";
26
+ } from "../chunk-JNAIKICO.js";
27
27
  import "../chunk-YMRT2DU6.js";
28
28
  import "../chunk-RBVVWBVB.js";
29
29
  import "../chunk-N5PM7HGQ.js";
@@ -1027,7 +1027,7 @@ function registerSlackTools(server) {
1027
1027
  },
1028
1028
  async ({ team_id }) => {
1029
1029
  try {
1030
- await refreshSlackReplyBadges({ force: true });
1030
+ await pollSlackOutboundWatches({ force: true });
1031
1031
  const team = team_id?.trim();
1032
1032
  const watches = listSlackOutboundWatches().filter(
1033
1033
  (w) => !team || w.teamId === team
@@ -6,8 +6,8 @@ import {
6
6
  isPidAlive,
7
7
  startOrchestration,
8
8
  waitForPidExit
9
- } from "./chunk-KRM3A5UK.js";
10
- import "./chunk-OEBYW4TO.js";
9
+ } from "./chunk-GKY2GR2J.js";
10
+ import "./chunk-JNAIKICO.js";
11
11
  import "./chunk-YMRT2DU6.js";
12
12
  import "./chunk-RBVVWBVB.js";
13
13
  import "./chunk-N5PM7HGQ.js";
@@ -4,15 +4,15 @@ import {
4
4
  isPidAlive,
5
5
  startOrchestration,
6
6
  waitForPidExit
7
- } from "./chunk-EQHXMN7O.js";
8
- import "./chunk-QHST4DZQ.js";
7
+ } from "./chunk-ED27HCPV.js";
8
+ import "./chunk-7Y3AYQWT.js";
9
9
  import "./chunk-EKIDHL2T.js";
10
10
  import "./chunk-HZLE6LJJ.js";
11
11
  import "./chunk-KWGP6RZM.js";
12
12
  import "./chunk-2X7I6MDW.js";
13
13
  import "./chunk-QTUESPAW.js";
14
14
  import "./chunk-AXQ4ZWHK.js";
15
- import "./chunk-3M5CVKHK.js";
15
+ import "./chunk-IUJOI7KK.js";
16
16
  import "./chunk-DCOZABNT.js";
17
17
  import "./chunk-UAVZ2JSO.js";
18
18
  import "./chunk-FKOIHGKV.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideboard-ai/core",
3
- "version": "0.1.122",
3
+ "version": "0.1.125",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
File without changes