@sideboard-ai/core 0.1.19 → 0.1.23
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-LJJRPW4Y.js} +1 -1
- package/dist/{chunk-SNHWAARD.js → chunk-BMB7WCGF.js} +8 -10
- package/dist/{chunk-WWBC56EL.js → chunk-JNMLRJ3D.js} +160 -50
- package/dist/{chunk-LIUV5ONW.js → chunk-PER4N6LS.js} +2 -2
- package/dist/{chunk-LXHSRNJJ.js → chunk-UFWEANLU.js} +373 -7
- package/dist/{chunk-JQJZTL2Q.js → chunk-WK6AK7NK.js} +32 -8
- 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 +623 -65
- package/dist/index.d.cts +74 -10
- package/dist/index.d.ts +74 -10
- package/dist/index.js +60 -6
- package/dist/mcp/run-stdio.cjs +568 -65
- 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). */
|
|
@@ -1211,6 +1212,11 @@ declare function formatRenameBranchDirective(thread: Pick<Thread, 'worktreePath'
|
|
|
1211
1212
|
declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | 'repoPath' | 'branchName'> & Partial<Pick<Thread, 'title' | 'prUrl'>>, opts?: {
|
|
1212
1213
|
githubSlug?: string | null;
|
|
1213
1214
|
}): string;
|
|
1215
|
+
/**
|
|
1216
|
+
* Tell agents how Sideboard renders Claude-style artifacts (side column).
|
|
1217
|
+
* Claude Code has no claude.ai `artifact` tool — fences / present_artifact instead.
|
|
1218
|
+
*/
|
|
1219
|
+
declare function formatArtifactDirective(): string;
|
|
1214
1220
|
interface AgentInstructionFile {
|
|
1215
1221
|
relativePath: string;
|
|
1216
1222
|
content: string;
|
|
@@ -1416,6 +1422,17 @@ declare function getDiff(worktreePath: string, repoPath: string, opts?: GetDiffO
|
|
|
1416
1422
|
declare function listWorktreeFiles(worktreePath: string, opts?: {
|
|
1417
1423
|
maxFiles?: number;
|
|
1418
1424
|
}): Promise<string[]>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Read a worktree file as base64 for upload (any type, not the editor stub).
|
|
1427
|
+
* Rejects files larger than maxBytes.
|
|
1428
|
+
*/
|
|
1429
|
+
declare function readWorktreeFileForUpload(worktreePath: string, relativePath: string, opts?: {
|
|
1430
|
+
maxBytes?: number;
|
|
1431
|
+
}): {
|
|
1432
|
+
path: string;
|
|
1433
|
+
contentBase64: string;
|
|
1434
|
+
size: number;
|
|
1435
|
+
};
|
|
1419
1436
|
/** Read a text (or image) file from the worktree (capped). */
|
|
1420
1437
|
declare function readWorktreeFile(worktreePath: string, relativePath: string, opts?: {
|
|
1421
1438
|
maxBytes?: number;
|
|
@@ -1479,6 +1496,23 @@ declare function expandComposerPrompt(worktreePath: string, prompt: string, opts
|
|
|
1479
1496
|
attachments?: ThreadAttachment[];
|
|
1480
1497
|
}): ExpandResult;
|
|
1481
1498
|
|
|
1499
|
+
interface DiffCommentLine {
|
|
1500
|
+
side: 'add' | 'del' | 'context';
|
|
1501
|
+
lineNo: number;
|
|
1502
|
+
text: string;
|
|
1503
|
+
}
|
|
1504
|
+
interface DiffCommentInput {
|
|
1505
|
+
path: string;
|
|
1506
|
+
comment: string;
|
|
1507
|
+
lines: DiffCommentLine[];
|
|
1508
|
+
id?: string;
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* Build a composer attachment from a Changes/diff line selection + reviewer note.
|
|
1512
|
+
* Expanded into agent context via `expandComposerPrompt` like other attachments.
|
|
1513
|
+
*/
|
|
1514
|
+
declare function buildDiffCommentAttachment(input: DiffCommentInput): ThreadAttachment;
|
|
1515
|
+
|
|
1482
1516
|
interface SummarizeResult {
|
|
1483
1517
|
summary: string;
|
|
1484
1518
|
method: 'claude' | 'extractive';
|
|
@@ -1754,6 +1788,11 @@ declare class Orchestrator {
|
|
|
1754
1788
|
binary: boolean;
|
|
1755
1789
|
encoding: 'utf8' | 'base64';
|
|
1756
1790
|
}>;
|
|
1791
|
+
readFileForUpload(threadRef: string, relativePath: string): Promise<{
|
|
1792
|
+
path: string;
|
|
1793
|
+
contentBase64: string;
|
|
1794
|
+
size: number;
|
|
1795
|
+
}>;
|
|
1757
1796
|
writeFile(threadRef: string, relativePath: string, content: string): Promise<{
|
|
1758
1797
|
path: string;
|
|
1759
1798
|
}>;
|
|
@@ -1861,8 +1900,8 @@ declare function cloneRepoIntoSideboard(opts: {
|
|
|
1861
1900
|
|
|
1862
1901
|
/**
|
|
1863
1902
|
* Sideboard MCP server — agent-facing judgment surface.
|
|
1864
|
-
* Deliberately excludes ready-for-review confirm_land and
|
|
1865
|
-
*
|
|
1903
|
+
* Deliberately excludes ready-for-review confirm_land, purge_thread, and
|
|
1904
|
+
* host-owned draft PR creation. Orchestrators ask worktree agents to open PRs.
|
|
1866
1905
|
*/
|
|
1867
1906
|
declare function startMcpServer(): Promise<void>;
|
|
1868
1907
|
|
|
@@ -1940,6 +1979,17 @@ interface IpcApi {
|
|
|
1940
1979
|
listBrightsyChatTargets(): Promise<BrightsyChatTargets>;
|
|
1941
1980
|
/** Brightsy login + connected teams (shared by CLI, Brightsy agent, and Claude MCP). */
|
|
1942
1981
|
getBrightsySession(): Promise<BrightsySession>;
|
|
1982
|
+
/**
|
|
1983
|
+
* Auth for schema CMS pane (`@brightsy/client` in the renderer).
|
|
1984
|
+
* Returns null fields + reason when not logged in.
|
|
1985
|
+
*/
|
|
1986
|
+
getBrightsyCmsAuth(): Promise<{
|
|
1987
|
+
endpoint: string;
|
|
1988
|
+
accessToken: string | null;
|
|
1989
|
+
accountId: string | null;
|
|
1990
|
+
accountSlug: string | null;
|
|
1991
|
+
reason?: string;
|
|
1992
|
+
}>;
|
|
1943
1993
|
/** Connect/activate a team for CLI + MCP (same as connectBrightsyTeam). */
|
|
1944
1994
|
switchBrightsyAccount(accountIdOrSlug: string): Promise<BrightsySession>;
|
|
1945
1995
|
/** Connect a team for CLI + MCP; activates it as the CLI session. */
|
|
@@ -2038,6 +2088,12 @@ interface IpcApi {
|
|
|
2038
2088
|
binary: boolean;
|
|
2039
2089
|
encoding: 'utf8' | 'base64';
|
|
2040
2090
|
}>;
|
|
2091
|
+
/** Full file bytes (base64) for CMS / file-manager upload from worktree paths. */
|
|
2092
|
+
readFileForUpload(threadRef: string, relativePath: string): Promise<{
|
|
2093
|
+
path: string;
|
|
2094
|
+
contentBase64: string;
|
|
2095
|
+
size: number;
|
|
2096
|
+
}>;
|
|
2041
2097
|
writeFile(threadRef: string, relativePath: string, content: string): Promise<{
|
|
2042
2098
|
path: string;
|
|
2043
2099
|
}>;
|
|
@@ -2173,6 +2229,14 @@ interface IpcApi {
|
|
|
2173
2229
|
exitCode: number | null;
|
|
2174
2230
|
}>;
|
|
2175
2231
|
openExternal(url: string): Promise<void>;
|
|
2232
|
+
/**
|
|
2233
|
+
* Publish HTML for the artifact side-column iframe (custom protocol bypasses
|
|
2234
|
+
* renderer CSP so inline scripts can run).
|
|
2235
|
+
*/
|
|
2236
|
+
publishArtifactPreview(id: string, html: string): Promise<{
|
|
2237
|
+
url: string;
|
|
2238
|
+
}>;
|
|
2239
|
+
clearArtifactPreview(id: string): Promise<void>;
|
|
2176
2240
|
/**
|
|
2177
2241
|
* In-app URL preview via BrowserView (top-level navigation — works for
|
|
2178
2242
|
* sites that block iframes, e.g. GitHub).
|
|
@@ -2352,7 +2416,7 @@ declare function disconnectBrightsyTeam(accountIdOrSlug: string): Promise<Connec
|
|
|
2352
2416
|
/** Sanitize slug for Claude MCP server / tool name segments. */
|
|
2353
2417
|
declare function brightsyMcpServerName(slug: string): string;
|
|
2354
2418
|
|
|
2355
|
-
/** Claude --allowedTools entries for Sideboard MCP. */
|
|
2419
|
+
/** Claude --allowedTools entries for Sideboard MCP (full fleet). */
|
|
2356
2420
|
declare const SIDEBOARD_MCP_ALLOWED_TOOLS: readonly ["mcp__sideboard", "mcp__sideboard__*"];
|
|
2357
2421
|
/** Legacy single-server allow list (CLI ~/.brightsy fallback). */
|
|
2358
2422
|
declare const BRIGHTSY_MCP_ALLOWED_TOOLS: readonly ["mcp__brightsy", "mcp__brightsy__*"];
|
|
@@ -2369,4 +2433,4 @@ declare function writeInjectedMcpConfig(opts: {
|
|
|
2369
2433
|
includeBrightsy?: boolean;
|
|
2370
2434
|
}): Promise<string | null>;
|
|
2371
2435
|
|
|
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 };
|
|
2436
|
+
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, formatArtifactDirective, 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, readWorktreeFileForUpload, 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). */
|
|
@@ -1211,6 +1212,11 @@ declare function formatRenameBranchDirective(thread: Pick<Thread, 'worktreePath'
|
|
|
1211
1212
|
declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | 'repoPath' | 'branchName'> & Partial<Pick<Thread, 'title' | 'prUrl'>>, opts?: {
|
|
1212
1213
|
githubSlug?: string | null;
|
|
1213
1214
|
}): string;
|
|
1215
|
+
/**
|
|
1216
|
+
* Tell agents how Sideboard renders Claude-style artifacts (side column).
|
|
1217
|
+
* Claude Code has no claude.ai `artifact` tool — fences / present_artifact instead.
|
|
1218
|
+
*/
|
|
1219
|
+
declare function formatArtifactDirective(): string;
|
|
1214
1220
|
interface AgentInstructionFile {
|
|
1215
1221
|
relativePath: string;
|
|
1216
1222
|
content: string;
|
|
@@ -1416,6 +1422,17 @@ declare function getDiff(worktreePath: string, repoPath: string, opts?: GetDiffO
|
|
|
1416
1422
|
declare function listWorktreeFiles(worktreePath: string, opts?: {
|
|
1417
1423
|
maxFiles?: number;
|
|
1418
1424
|
}): Promise<string[]>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Read a worktree file as base64 for upload (any type, not the editor stub).
|
|
1427
|
+
* Rejects files larger than maxBytes.
|
|
1428
|
+
*/
|
|
1429
|
+
declare function readWorktreeFileForUpload(worktreePath: string, relativePath: string, opts?: {
|
|
1430
|
+
maxBytes?: number;
|
|
1431
|
+
}): {
|
|
1432
|
+
path: string;
|
|
1433
|
+
contentBase64: string;
|
|
1434
|
+
size: number;
|
|
1435
|
+
};
|
|
1419
1436
|
/** Read a text (or image) file from the worktree (capped). */
|
|
1420
1437
|
declare function readWorktreeFile(worktreePath: string, relativePath: string, opts?: {
|
|
1421
1438
|
maxBytes?: number;
|
|
@@ -1479,6 +1496,23 @@ declare function expandComposerPrompt(worktreePath: string, prompt: string, opts
|
|
|
1479
1496
|
attachments?: ThreadAttachment[];
|
|
1480
1497
|
}): ExpandResult;
|
|
1481
1498
|
|
|
1499
|
+
interface DiffCommentLine {
|
|
1500
|
+
side: 'add' | 'del' | 'context';
|
|
1501
|
+
lineNo: number;
|
|
1502
|
+
text: string;
|
|
1503
|
+
}
|
|
1504
|
+
interface DiffCommentInput {
|
|
1505
|
+
path: string;
|
|
1506
|
+
comment: string;
|
|
1507
|
+
lines: DiffCommentLine[];
|
|
1508
|
+
id?: string;
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* Build a composer attachment from a Changes/diff line selection + reviewer note.
|
|
1512
|
+
* Expanded into agent context via `expandComposerPrompt` like other attachments.
|
|
1513
|
+
*/
|
|
1514
|
+
declare function buildDiffCommentAttachment(input: DiffCommentInput): ThreadAttachment;
|
|
1515
|
+
|
|
1482
1516
|
interface SummarizeResult {
|
|
1483
1517
|
summary: string;
|
|
1484
1518
|
method: 'claude' | 'extractive';
|
|
@@ -1754,6 +1788,11 @@ declare class Orchestrator {
|
|
|
1754
1788
|
binary: boolean;
|
|
1755
1789
|
encoding: 'utf8' | 'base64';
|
|
1756
1790
|
}>;
|
|
1791
|
+
readFileForUpload(threadRef: string, relativePath: string): Promise<{
|
|
1792
|
+
path: string;
|
|
1793
|
+
contentBase64: string;
|
|
1794
|
+
size: number;
|
|
1795
|
+
}>;
|
|
1757
1796
|
writeFile(threadRef: string, relativePath: string, content: string): Promise<{
|
|
1758
1797
|
path: string;
|
|
1759
1798
|
}>;
|
|
@@ -1861,8 +1900,8 @@ declare function cloneRepoIntoSideboard(opts: {
|
|
|
1861
1900
|
|
|
1862
1901
|
/**
|
|
1863
1902
|
* Sideboard MCP server — agent-facing judgment surface.
|
|
1864
|
-
* Deliberately excludes ready-for-review confirm_land and
|
|
1865
|
-
*
|
|
1903
|
+
* Deliberately excludes ready-for-review confirm_land, purge_thread, and
|
|
1904
|
+
* host-owned draft PR creation. Orchestrators ask worktree agents to open PRs.
|
|
1866
1905
|
*/
|
|
1867
1906
|
declare function startMcpServer(): Promise<void>;
|
|
1868
1907
|
|
|
@@ -1940,6 +1979,17 @@ interface IpcApi {
|
|
|
1940
1979
|
listBrightsyChatTargets(): Promise<BrightsyChatTargets>;
|
|
1941
1980
|
/** Brightsy login + connected teams (shared by CLI, Brightsy agent, and Claude MCP). */
|
|
1942
1981
|
getBrightsySession(): Promise<BrightsySession>;
|
|
1982
|
+
/**
|
|
1983
|
+
* Auth for schema CMS pane (`@brightsy/client` in the renderer).
|
|
1984
|
+
* Returns null fields + reason when not logged in.
|
|
1985
|
+
*/
|
|
1986
|
+
getBrightsyCmsAuth(): Promise<{
|
|
1987
|
+
endpoint: string;
|
|
1988
|
+
accessToken: string | null;
|
|
1989
|
+
accountId: string | null;
|
|
1990
|
+
accountSlug: string | null;
|
|
1991
|
+
reason?: string;
|
|
1992
|
+
}>;
|
|
1943
1993
|
/** Connect/activate a team for CLI + MCP (same as connectBrightsyTeam). */
|
|
1944
1994
|
switchBrightsyAccount(accountIdOrSlug: string): Promise<BrightsySession>;
|
|
1945
1995
|
/** Connect a team for CLI + MCP; activates it as the CLI session. */
|
|
@@ -2038,6 +2088,12 @@ interface IpcApi {
|
|
|
2038
2088
|
binary: boolean;
|
|
2039
2089
|
encoding: 'utf8' | 'base64';
|
|
2040
2090
|
}>;
|
|
2091
|
+
/** Full file bytes (base64) for CMS / file-manager upload from worktree paths. */
|
|
2092
|
+
readFileForUpload(threadRef: string, relativePath: string): Promise<{
|
|
2093
|
+
path: string;
|
|
2094
|
+
contentBase64: string;
|
|
2095
|
+
size: number;
|
|
2096
|
+
}>;
|
|
2041
2097
|
writeFile(threadRef: string, relativePath: string, content: string): Promise<{
|
|
2042
2098
|
path: string;
|
|
2043
2099
|
}>;
|
|
@@ -2173,6 +2229,14 @@ interface IpcApi {
|
|
|
2173
2229
|
exitCode: number | null;
|
|
2174
2230
|
}>;
|
|
2175
2231
|
openExternal(url: string): Promise<void>;
|
|
2232
|
+
/**
|
|
2233
|
+
* Publish HTML for the artifact side-column iframe (custom protocol bypasses
|
|
2234
|
+
* renderer CSP so inline scripts can run).
|
|
2235
|
+
*/
|
|
2236
|
+
publishArtifactPreview(id: string, html: string): Promise<{
|
|
2237
|
+
url: string;
|
|
2238
|
+
}>;
|
|
2239
|
+
clearArtifactPreview(id: string): Promise<void>;
|
|
2176
2240
|
/**
|
|
2177
2241
|
* In-app URL preview via BrowserView (top-level navigation — works for
|
|
2178
2242
|
* sites that block iframes, e.g. GitHub).
|
|
@@ -2352,7 +2416,7 @@ declare function disconnectBrightsyTeam(accountIdOrSlug: string): Promise<Connec
|
|
|
2352
2416
|
/** Sanitize slug for Claude MCP server / tool name segments. */
|
|
2353
2417
|
declare function brightsyMcpServerName(slug: string): string;
|
|
2354
2418
|
|
|
2355
|
-
/** Claude --allowedTools entries for Sideboard MCP. */
|
|
2419
|
+
/** Claude --allowedTools entries for Sideboard MCP (full fleet). */
|
|
2356
2420
|
declare const SIDEBOARD_MCP_ALLOWED_TOOLS: readonly ["mcp__sideboard", "mcp__sideboard__*"];
|
|
2357
2421
|
/** Legacy single-server allow list (CLI ~/.brightsy fallback). */
|
|
2358
2422
|
declare const BRIGHTSY_MCP_ALLOWED_TOOLS: readonly ["mcp__brightsy", "mcp__brightsy__*"];
|
|
@@ -2369,4 +2433,4 @@ declare function writeInjectedMcpConfig(opts: {
|
|
|
2369
2433
|
includeBrightsy?: boolean;
|
|
2370
2434
|
}): Promise<string | null>;
|
|
2371
2435
|
|
|
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 };
|
|
2436
|
+
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, formatArtifactDirective, 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, readWorktreeFileForUpload, 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
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
forkMessageSlice,
|
|
35
35
|
forkThreadWorktree,
|
|
36
36
|
formatAgentInstructions,
|
|
37
|
+
formatArtifactDirective,
|
|
37
38
|
formatMessagesAsTranscript,
|
|
38
39
|
formatRenameBranchDirective,
|
|
39
40
|
formatTranscriptMarkdown,
|
|
@@ -66,6 +67,7 @@ import {
|
|
|
66
67
|
previewLand,
|
|
67
68
|
readSkillBody,
|
|
68
69
|
readWorktreeFile,
|
|
70
|
+
readWorktreeFileForUpload,
|
|
69
71
|
readWorktreeInclude,
|
|
70
72
|
requireAgent,
|
|
71
73
|
resolveConductorCursorAgentId,
|
|
@@ -93,14 +95,14 @@ import {
|
|
|
93
95
|
withAgentInstructions,
|
|
94
96
|
worktreeCleanupSettings,
|
|
95
97
|
writeWorktreeFile
|
|
96
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-JNMLRJ3D.js";
|
|
97
99
|
import {
|
|
98
100
|
addWorkspace,
|
|
99
101
|
ensureWorkspace,
|
|
100
102
|
listWorkspaces,
|
|
101
103
|
removeWorkspace,
|
|
102
104
|
syncWorkspacesFromThreads
|
|
103
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-PER4N6LS.js";
|
|
104
106
|
import {
|
|
105
107
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
106
108
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
@@ -120,7 +122,7 @@ import {
|
|
|
120
122
|
orchestratorSessionPoisonedByBuiltins,
|
|
121
123
|
parseForceStopMessage,
|
|
122
124
|
takenTeamSlugsForOrchestration
|
|
123
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-Y2EWQ4TL.js";
|
|
124
126
|
import {
|
|
125
127
|
COORDINATOR_TOOL_PLAYBOOK,
|
|
126
128
|
coordinatorSystemPrompt,
|
|
@@ -128,7 +130,7 @@ import {
|
|
|
128
130
|
enrichWorkspacesWithGithub,
|
|
129
131
|
ensureGlobalCoordinatorCwd,
|
|
130
132
|
formatWorkspaceInventory
|
|
131
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-BMB7WCGF.js";
|
|
132
134
|
import {
|
|
133
135
|
BRIGHTSY_MCP_ALLOWED_TOOLS,
|
|
134
136
|
MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
|
|
@@ -158,7 +160,7 @@ import {
|
|
|
158
160
|
permissionMode,
|
|
159
161
|
sanitizeMcpServerName,
|
|
160
162
|
writeInjectedMcpConfig
|
|
161
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-WK6AK7NK.js";
|
|
162
164
|
import {
|
|
163
165
|
brightsyConfigPath,
|
|
164
166
|
brightsyMcpServerName,
|
|
@@ -234,6 +236,7 @@ import {
|
|
|
234
236
|
listBranches,
|
|
235
237
|
listPrs,
|
|
236
238
|
listWorktrees,
|
|
239
|
+
lookupSoccerTeam,
|
|
237
240
|
mergePr,
|
|
238
241
|
normalizeWorktreePath,
|
|
239
242
|
originGhRepoEnv,
|
|
@@ -252,7 +255,7 @@ import {
|
|
|
252
255
|
worktreeDisplayLabel,
|
|
253
256
|
worktreeDisplayLabelForGroup,
|
|
254
257
|
worktreeNameFromPath
|
|
255
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-UFWEANLU.js";
|
|
256
259
|
import {
|
|
257
260
|
appendMessage,
|
|
258
261
|
createEmptyThread,
|
|
@@ -342,6 +345,53 @@ async function refreshGitHubAuth() {
|
|
|
342
345
|
return getGitHubStatus();
|
|
343
346
|
}
|
|
344
347
|
|
|
348
|
+
// src/composer/diff-comment.ts
|
|
349
|
+
function lineRangeLabel(lines) {
|
|
350
|
+
const nos = lines.map((l) => l.lineNo);
|
|
351
|
+
const start = Math.min(...nos);
|
|
352
|
+
const end = Math.max(...nos);
|
|
353
|
+
return start === end ? `L${start}` : `L${start}-${end}`;
|
|
354
|
+
}
|
|
355
|
+
function formatDiffBody(lines) {
|
|
356
|
+
return lines.map((l) => {
|
|
357
|
+
const prefix = l.side === "add" ? "+" : l.side === "del" ? "-" : " ";
|
|
358
|
+
return `${prefix}${l.text}`;
|
|
359
|
+
}).join("\n");
|
|
360
|
+
}
|
|
361
|
+
function buildDiffCommentAttachment(input) {
|
|
362
|
+
const comment = input.comment.trim();
|
|
363
|
+
if (!input.path.trim()) {
|
|
364
|
+
throw new Error("diff comment requires a file path");
|
|
365
|
+
}
|
|
366
|
+
if (!comment) {
|
|
367
|
+
throw new Error("diff comment requires a note");
|
|
368
|
+
}
|
|
369
|
+
if (input.lines.length === 0) {
|
|
370
|
+
throw new Error("diff comment requires at least one cited line");
|
|
371
|
+
}
|
|
372
|
+
const range = lineRangeLabel(input.lines);
|
|
373
|
+
const name = `${input.path}:${range}`;
|
|
374
|
+
const content = [
|
|
375
|
+
`Diff review comment on \`${input.path}\` (${range}).`,
|
|
376
|
+
"",
|
|
377
|
+
"Address this feedback on the cited lines. Prefer a precise fix over rewriting unrelated code.",
|
|
378
|
+
"",
|
|
379
|
+
"### Reviewer comment",
|
|
380
|
+
comment,
|
|
381
|
+
"",
|
|
382
|
+
"### Cited diff",
|
|
383
|
+
"```diff",
|
|
384
|
+
formatDiffBody(input.lines),
|
|
385
|
+
"```"
|
|
386
|
+
].join("\n");
|
|
387
|
+
return {
|
|
388
|
+
id: input.id ?? `diff-comment-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
389
|
+
name,
|
|
390
|
+
kind: "diff-comment",
|
|
391
|
+
content
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
|
|
345
395
|
// src/brightsy/api.ts
|
|
346
396
|
function formatBrightsyFetchError(err, url) {
|
|
347
397
|
if (!(err instanceof Error)) return `${String(err)} (${url})`;
|
|
@@ -714,6 +764,7 @@ export {
|
|
|
714
764
|
brightsyMcpServerName,
|
|
715
765
|
buildCachedUserContent,
|
|
716
766
|
buildClaudeStreamJsonUserMessage,
|
|
767
|
+
buildDiffCommentAttachment,
|
|
717
768
|
buildForkTranscriptAttachment,
|
|
718
769
|
buildSessionSeed,
|
|
719
770
|
buildWorkspaceScriptEnv,
|
|
@@ -775,6 +826,7 @@ export {
|
|
|
775
826
|
forkMessageSlice,
|
|
776
827
|
forkThreadWorktree,
|
|
777
828
|
formatAgentInstructions,
|
|
829
|
+
formatArtifactDirective,
|
|
778
830
|
formatBrightsyFetchError,
|
|
779
831
|
formatGhLandError,
|
|
780
832
|
formatIpcInvokeError,
|
|
@@ -849,6 +901,7 @@ export {
|
|
|
849
901
|
loadRepoSettings,
|
|
850
902
|
loadWorkspaceSettings,
|
|
851
903
|
locksDir,
|
|
904
|
+
lookupSoccerTeam,
|
|
852
905
|
maxConcurrentAgents,
|
|
853
906
|
maybeCompactContext,
|
|
854
907
|
mcpAllowTools,
|
|
@@ -874,6 +927,7 @@ export {
|
|
|
874
927
|
readSkillBody,
|
|
875
928
|
readThread,
|
|
876
929
|
readWorktreeFile,
|
|
930
|
+
readWorktreeFileForUpload,
|
|
877
931
|
readWorktreeInclude,
|
|
878
932
|
refreshGitHubAuth,
|
|
879
933
|
removeWorkspace,
|