@sideboard-ai/core 0.1.19 → 0.1.22
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/{agents-2XMZO3CY.js → agents-RYOW25YJ.js} +1 -1
- package/dist/{chunk-SNHWAARD.js → chunk-BMB7WCGF.js} +8 -10
- package/dist/{chunk-LIUV5ONW.js → chunk-PER4N6LS.js} +2 -2
- package/dist/{chunk-LXHSRNJJ.js → chunk-UFWEANLU.js} +373 -7
- package/dist/{chunk-WWBC56EL.js → chunk-ULFES3M5.js} +11 -50
- package/dist/{chunk-JQJZTL2Q.js → chunk-V54GKKCI.js} +21 -3
- package/dist/{chunk-5263JXQY.js → chunk-Y2EWQ4TL.js} +2 -2
- package/dist/{coordinator-prompt-QPTX6YCW.js → coordinator-prompt-QH35ES7Y.js} +2 -2
- package/dist/{global-workspace-IV6LIDTO.js → global-workspace-LM4AA4RO.js} +3 -3
- package/dist/index.cjs +460 -59
- package/dist/index.d.cts +27 -9
- package/dist/index.d.ts +27 -9
- package/dist/index.js +56 -6
- package/dist/mcp/run-stdio.cjs +409 -59
- package/dist/mcp/run-stdio.js +6 -6
- package/dist/{workspaces-JBWIRU55.js → workspaces-23GHLR7I.js} +4 -4
- package/dist/{worktree-TYI2SANE.js → worktree-RYTBDHHP.js} +3 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -49,7 +49,7 @@ interface ThreadMessage {
|
|
|
49
49
|
interface ThreadAttachment {
|
|
50
50
|
id: string;
|
|
51
51
|
name: string;
|
|
52
|
-
kind: 'transcript' | 'file' | 'issue' | 'workspace';
|
|
52
|
+
kind: 'transcript' | 'file' | 'issue' | 'workspace' | 'diff-comment';
|
|
53
53
|
content: string;
|
|
54
54
|
}
|
|
55
55
|
interface Thread {
|
|
@@ -707,16 +707,17 @@ declare function formatGhLandError(raw: string, opts?: FormatGhLandErrorOptions)
|
|
|
707
707
|
/** Strip Electron's IPC invoke wrapper, then humanize known gh failures. */
|
|
708
708
|
declare function formatIpcInvokeError(err: unknown): string;
|
|
709
709
|
|
|
710
|
-
/**
|
|
711
|
-
* Memorable worktree / thread labels (Conductor-style nicknames).
|
|
712
|
-
* Slug is the directory + `thread/<slug>` branch; `name` is the UI title.
|
|
713
|
-
*/
|
|
714
710
|
interface TeamName {
|
|
715
711
|
name: string;
|
|
716
712
|
slug: string;
|
|
713
|
+
/** City / region where the club is based. */
|
|
714
|
+
location: string;
|
|
715
|
+
/** Top competition the club plays in. */
|
|
716
|
+
league: string;
|
|
717
717
|
}
|
|
718
|
-
/** Famous soccer clubs — short, recognizable thread labels. */
|
|
719
718
|
declare const FAMOUS_SOCCER_TEAMS: readonly TeamName[];
|
|
719
|
+
/** Resolve toast-ready club info from a thread title or worktree slug. */
|
|
720
|
+
declare function lookupSoccerTeam(titleOrSlug: string): TeamName | null;
|
|
720
721
|
declare function allocateTeamName(taken: Iterable<string>, random?: () => number): TeamName;
|
|
721
722
|
|
|
722
723
|
/** Canonical worktree path for grouping tabs (browser-safe, no node:path). */
|
|
@@ -1479,6 +1480,23 @@ declare function expandComposerPrompt(worktreePath: string, prompt: string, opts
|
|
|
1479
1480
|
attachments?: ThreadAttachment[];
|
|
1480
1481
|
}): ExpandResult;
|
|
1481
1482
|
|
|
1483
|
+
interface DiffCommentLine {
|
|
1484
|
+
side: 'add' | 'del' | 'context';
|
|
1485
|
+
lineNo: number;
|
|
1486
|
+
text: string;
|
|
1487
|
+
}
|
|
1488
|
+
interface DiffCommentInput {
|
|
1489
|
+
path: string;
|
|
1490
|
+
comment: string;
|
|
1491
|
+
lines: DiffCommentLine[];
|
|
1492
|
+
id?: string;
|
|
1493
|
+
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Build a composer attachment from a Changes/diff line selection + reviewer note.
|
|
1496
|
+
* Expanded into agent context via `expandComposerPrompt` like other attachments.
|
|
1497
|
+
*/
|
|
1498
|
+
declare function buildDiffCommentAttachment(input: DiffCommentInput): ThreadAttachment;
|
|
1499
|
+
|
|
1482
1500
|
interface SummarizeResult {
|
|
1483
1501
|
summary: string;
|
|
1484
1502
|
method: 'claude' | 'extractive';
|
|
@@ -1861,8 +1879,8 @@ declare function cloneRepoIntoSideboard(opts: {
|
|
|
1861
1879
|
|
|
1862
1880
|
/**
|
|
1863
1881
|
* Sideboard MCP server — agent-facing judgment surface.
|
|
1864
|
-
* Deliberately excludes ready-for-review confirm_land and
|
|
1865
|
-
*
|
|
1882
|
+
* Deliberately excludes ready-for-review confirm_land, purge_thread, and
|
|
1883
|
+
* host-owned draft PR creation. Orchestrators ask worktree agents to open PRs.
|
|
1866
1884
|
*/
|
|
1867
1885
|
declare function startMcpServer(): Promise<void>;
|
|
1868
1886
|
|
|
@@ -2369,4 +2387,4 @@ declare function writeInjectedMcpConfig(opts: {
|
|
|
2369
2387
|
includeBrightsy?: boolean;
|
|
2370
2388
|
}): Promise<string | null>;
|
|
2371
2389
|
|
|
2372
|
-
export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listConductorWorkspaces, listConnectedBrightsyTeams, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
|
|
2390
|
+
export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listConductorWorkspaces, listConnectedBrightsyTeams, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ interface ThreadMessage {
|
|
|
49
49
|
interface ThreadAttachment {
|
|
50
50
|
id: string;
|
|
51
51
|
name: string;
|
|
52
|
-
kind: 'transcript' | 'file' | 'issue' | 'workspace';
|
|
52
|
+
kind: 'transcript' | 'file' | 'issue' | 'workspace' | 'diff-comment';
|
|
53
53
|
content: string;
|
|
54
54
|
}
|
|
55
55
|
interface Thread {
|
|
@@ -707,16 +707,17 @@ declare function formatGhLandError(raw: string, opts?: FormatGhLandErrorOptions)
|
|
|
707
707
|
/** Strip Electron's IPC invoke wrapper, then humanize known gh failures. */
|
|
708
708
|
declare function formatIpcInvokeError(err: unknown): string;
|
|
709
709
|
|
|
710
|
-
/**
|
|
711
|
-
* Memorable worktree / thread labels (Conductor-style nicknames).
|
|
712
|
-
* Slug is the directory + `thread/<slug>` branch; `name` is the UI title.
|
|
713
|
-
*/
|
|
714
710
|
interface TeamName {
|
|
715
711
|
name: string;
|
|
716
712
|
slug: string;
|
|
713
|
+
/** City / region where the club is based. */
|
|
714
|
+
location: string;
|
|
715
|
+
/** Top competition the club plays in. */
|
|
716
|
+
league: string;
|
|
717
717
|
}
|
|
718
|
-
/** Famous soccer clubs — short, recognizable thread labels. */
|
|
719
718
|
declare const FAMOUS_SOCCER_TEAMS: readonly TeamName[];
|
|
719
|
+
/** Resolve toast-ready club info from a thread title or worktree slug. */
|
|
720
|
+
declare function lookupSoccerTeam(titleOrSlug: string): TeamName | null;
|
|
720
721
|
declare function allocateTeamName(taken: Iterable<string>, random?: () => number): TeamName;
|
|
721
722
|
|
|
722
723
|
/** Canonical worktree path for grouping tabs (browser-safe, no node:path). */
|
|
@@ -1479,6 +1480,23 @@ declare function expandComposerPrompt(worktreePath: string, prompt: string, opts
|
|
|
1479
1480
|
attachments?: ThreadAttachment[];
|
|
1480
1481
|
}): ExpandResult;
|
|
1481
1482
|
|
|
1483
|
+
interface DiffCommentLine {
|
|
1484
|
+
side: 'add' | 'del' | 'context';
|
|
1485
|
+
lineNo: number;
|
|
1486
|
+
text: string;
|
|
1487
|
+
}
|
|
1488
|
+
interface DiffCommentInput {
|
|
1489
|
+
path: string;
|
|
1490
|
+
comment: string;
|
|
1491
|
+
lines: DiffCommentLine[];
|
|
1492
|
+
id?: string;
|
|
1493
|
+
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Build a composer attachment from a Changes/diff line selection + reviewer note.
|
|
1496
|
+
* Expanded into agent context via `expandComposerPrompt` like other attachments.
|
|
1497
|
+
*/
|
|
1498
|
+
declare function buildDiffCommentAttachment(input: DiffCommentInput): ThreadAttachment;
|
|
1499
|
+
|
|
1482
1500
|
interface SummarizeResult {
|
|
1483
1501
|
summary: string;
|
|
1484
1502
|
method: 'claude' | 'extractive';
|
|
@@ -1861,8 +1879,8 @@ declare function cloneRepoIntoSideboard(opts: {
|
|
|
1861
1879
|
|
|
1862
1880
|
/**
|
|
1863
1881
|
* Sideboard MCP server — agent-facing judgment surface.
|
|
1864
|
-
* Deliberately excludes ready-for-review confirm_land and
|
|
1865
|
-
*
|
|
1882
|
+
* Deliberately excludes ready-for-review confirm_land, purge_thread, and
|
|
1883
|
+
* host-owned draft PR creation. Orchestrators ask worktree agents to open PRs.
|
|
1866
1884
|
*/
|
|
1867
1885
|
declare function startMcpServer(): Promise<void>;
|
|
1868
1886
|
|
|
@@ -2369,4 +2387,4 @@ declare function writeInjectedMcpConfig(opts: {
|
|
|
2369
2387
|
includeBrightsy?: boolean;
|
|
2370
2388
|
}): Promise<string | null>;
|
|
2371
2389
|
|
|
2372
|
-
export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listConductorWorkspaces, listConnectedBrightsyTeams, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
|
|
2390
|
+
export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listConductorWorkspaces, listConnectedBrightsyTeams, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
|
package/dist/index.js
CHANGED
|
@@ -93,14 +93,14 @@ import {
|
|
|
93
93
|
withAgentInstructions,
|
|
94
94
|
worktreeCleanupSettings,
|
|
95
95
|
writeWorktreeFile
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-ULFES3M5.js";
|
|
97
97
|
import {
|
|
98
98
|
addWorkspace,
|
|
99
99
|
ensureWorkspace,
|
|
100
100
|
listWorkspaces,
|
|
101
101
|
removeWorkspace,
|
|
102
102
|
syncWorkspacesFromThreads
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-PER4N6LS.js";
|
|
104
104
|
import {
|
|
105
105
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
106
106
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
orchestratorSessionPoisonedByBuiltins,
|
|
121
121
|
parseForceStopMessage,
|
|
122
122
|
takenTeamSlugsForOrchestration
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-Y2EWQ4TL.js";
|
|
124
124
|
import {
|
|
125
125
|
COORDINATOR_TOOL_PLAYBOOK,
|
|
126
126
|
coordinatorSystemPrompt,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
enrichWorkspacesWithGithub,
|
|
129
129
|
ensureGlobalCoordinatorCwd,
|
|
130
130
|
formatWorkspaceInventory
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-BMB7WCGF.js";
|
|
132
132
|
import {
|
|
133
133
|
BRIGHTSY_MCP_ALLOWED_TOOLS,
|
|
134
134
|
MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
|
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
permissionMode,
|
|
159
159
|
sanitizeMcpServerName,
|
|
160
160
|
writeInjectedMcpConfig
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-V54GKKCI.js";
|
|
162
162
|
import {
|
|
163
163
|
brightsyConfigPath,
|
|
164
164
|
brightsyMcpServerName,
|
|
@@ -234,6 +234,7 @@ import {
|
|
|
234
234
|
listBranches,
|
|
235
235
|
listPrs,
|
|
236
236
|
listWorktrees,
|
|
237
|
+
lookupSoccerTeam,
|
|
237
238
|
mergePr,
|
|
238
239
|
normalizeWorktreePath,
|
|
239
240
|
originGhRepoEnv,
|
|
@@ -252,7 +253,7 @@ import {
|
|
|
252
253
|
worktreeDisplayLabel,
|
|
253
254
|
worktreeDisplayLabelForGroup,
|
|
254
255
|
worktreeNameFromPath
|
|
255
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-UFWEANLU.js";
|
|
256
257
|
import {
|
|
257
258
|
appendMessage,
|
|
258
259
|
createEmptyThread,
|
|
@@ -342,6 +343,53 @@ async function refreshGitHubAuth() {
|
|
|
342
343
|
return getGitHubStatus();
|
|
343
344
|
}
|
|
344
345
|
|
|
346
|
+
// src/composer/diff-comment.ts
|
|
347
|
+
function lineRangeLabel(lines) {
|
|
348
|
+
const nos = lines.map((l) => l.lineNo);
|
|
349
|
+
const start = Math.min(...nos);
|
|
350
|
+
const end = Math.max(...nos);
|
|
351
|
+
return start === end ? `L${start}` : `L${start}-${end}`;
|
|
352
|
+
}
|
|
353
|
+
function formatDiffBody(lines) {
|
|
354
|
+
return lines.map((l) => {
|
|
355
|
+
const prefix = l.side === "add" ? "+" : l.side === "del" ? "-" : " ";
|
|
356
|
+
return `${prefix}${l.text}`;
|
|
357
|
+
}).join("\n");
|
|
358
|
+
}
|
|
359
|
+
function buildDiffCommentAttachment(input) {
|
|
360
|
+
const comment = input.comment.trim();
|
|
361
|
+
if (!input.path.trim()) {
|
|
362
|
+
throw new Error("diff comment requires a file path");
|
|
363
|
+
}
|
|
364
|
+
if (!comment) {
|
|
365
|
+
throw new Error("diff comment requires a note");
|
|
366
|
+
}
|
|
367
|
+
if (input.lines.length === 0) {
|
|
368
|
+
throw new Error("diff comment requires at least one cited line");
|
|
369
|
+
}
|
|
370
|
+
const range = lineRangeLabel(input.lines);
|
|
371
|
+
const name = `${input.path}:${range}`;
|
|
372
|
+
const content = [
|
|
373
|
+
`Diff review comment on \`${input.path}\` (${range}).`,
|
|
374
|
+
"",
|
|
375
|
+
"Address this feedback on the cited lines. Prefer a precise fix over rewriting unrelated code.",
|
|
376
|
+
"",
|
|
377
|
+
"### Reviewer comment",
|
|
378
|
+
comment,
|
|
379
|
+
"",
|
|
380
|
+
"### Cited diff",
|
|
381
|
+
"```diff",
|
|
382
|
+
formatDiffBody(input.lines),
|
|
383
|
+
"```"
|
|
384
|
+
].join("\n");
|
|
385
|
+
return {
|
|
386
|
+
id: input.id ?? `diff-comment-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
387
|
+
name,
|
|
388
|
+
kind: "diff-comment",
|
|
389
|
+
content
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
|
|
345
393
|
// src/brightsy/api.ts
|
|
346
394
|
function formatBrightsyFetchError(err, url) {
|
|
347
395
|
if (!(err instanceof Error)) return `${String(err)} (${url})`;
|
|
@@ -714,6 +762,7 @@ export {
|
|
|
714
762
|
brightsyMcpServerName,
|
|
715
763
|
buildCachedUserContent,
|
|
716
764
|
buildClaudeStreamJsonUserMessage,
|
|
765
|
+
buildDiffCommentAttachment,
|
|
717
766
|
buildForkTranscriptAttachment,
|
|
718
767
|
buildSessionSeed,
|
|
719
768
|
buildWorkspaceScriptEnv,
|
|
@@ -849,6 +898,7 @@ export {
|
|
|
849
898
|
loadRepoSettings,
|
|
850
899
|
loadWorkspaceSettings,
|
|
851
900
|
locksDir,
|
|
901
|
+
lookupSoccerTeam,
|
|
852
902
|
maxConcurrentAgents,
|
|
853
903
|
maybeCompactContext,
|
|
854
904
|
mcpAllowTools,
|