@sideboard-ai/core 0.1.9
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/LICENSE +190 -0
- package/dist/agents/cursor-runner.cjs +173 -0
- package/dist/agents/cursor-runner.d.cts +1 -0
- package/dist/agents/cursor-runner.d.ts +1 -0
- package/dist/agents/cursor-runner.js +102 -0
- package/dist/agents-OAX7XPKX.js +41 -0
- package/dist/app-settings-BDMLWCWI.js +61 -0
- package/dist/chunk-2M4OHXYX.js +198 -0
- package/dist/chunk-2R5VV4BA.js +143 -0
- package/dist/chunk-3DKGI32Q.js +92 -0
- package/dist/chunk-3WF3X46L.js +373 -0
- package/dist/chunk-AJ6ROGD7.js +74 -0
- package/dist/chunk-E4PWXO2C.js +4534 -0
- package/dist/chunk-HYRHI3QU.js +154 -0
- package/dist/chunk-ILQK4P5R.js +311 -0
- package/dist/chunk-LL7DTZ5B.js +1282 -0
- package/dist/chunk-M37RITA6.js +304 -0
- package/dist/chunk-TLJH3L2C.js +80 -0
- package/dist/chunk-WMCPLDW3.js +1413 -0
- package/dist/connected-teams-GF52Q7LB.js +22 -0
- package/dist/coordinator-prompt-6R2TX4WQ.js +22 -0
- package/dist/global-workspace-R44HGBU6.js +36 -0
- package/dist/index.cjs +9940 -0
- package/dist/index.d.cts +2284 -0
- package/dist/index.d.ts +2284 -0
- package/dist/index.js +929 -0
- package/dist/mcp/run-stdio.cjs +8654 -0
- package/dist/mcp/run-stdio.d.cts +2 -0
- package/dist/mcp/run-stdio.d.ts +2 -0
- package/dist/mcp/run-stdio.js +21 -0
- package/dist/paths-VPH3ITBK.js +26 -0
- package/dist/run-LF6E5IKL.js +10 -0
- package/dist/thread-store-UNPZNIFW.js +27 -0
- package/dist/title-4A2ATYNY.js +24 -0
- package/dist/workspaces-TCJFYI35.js +20 -0
- package/dist/worktree-NGFDN3J4.js +79 -0
- package/package.json +63 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,929 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CONTEXT_COMPACT_CHARS,
|
|
3
|
+
CONTEXT_KEEP_RECENT_CHARS,
|
|
4
|
+
CONTEXT_KEEP_RECENT_MESSAGES,
|
|
5
|
+
CONTEXT_MIN_MESSAGES,
|
|
6
|
+
Orchestrator,
|
|
7
|
+
adoptThread,
|
|
8
|
+
allocatePort,
|
|
9
|
+
allocatePortRange,
|
|
10
|
+
applyAgentEvent,
|
|
11
|
+
applyCompaction,
|
|
12
|
+
applyThreadIntoMain,
|
|
13
|
+
buildForkTranscriptAttachment,
|
|
14
|
+
buildSessionSeed,
|
|
15
|
+
buildWorkspaceScriptEnv,
|
|
16
|
+
captureLoginEnv,
|
|
17
|
+
captureTurnBaseline,
|
|
18
|
+
cleanupOrphanWorktrees,
|
|
19
|
+
cloneRepoIntoSideboard,
|
|
20
|
+
conductorDbPath,
|
|
21
|
+
confirmLand,
|
|
22
|
+
copyConfiguredFiles,
|
|
23
|
+
createChatTab,
|
|
24
|
+
createThread,
|
|
25
|
+
detectAgents,
|
|
26
|
+
discoverSkills,
|
|
27
|
+
estimateMessageChars,
|
|
28
|
+
estimateThreadChars,
|
|
29
|
+
expandComposerPrompt,
|
|
30
|
+
extractiveSummary,
|
|
31
|
+
finalizeParts,
|
|
32
|
+
findOrphanWorktrees,
|
|
33
|
+
forkChatTab,
|
|
34
|
+
forkMessageSlice,
|
|
35
|
+
forkThreadWorktree,
|
|
36
|
+
formatAgentInstructions,
|
|
37
|
+
formatMessagesAsTranscript,
|
|
38
|
+
formatRenameBranchDirective,
|
|
39
|
+
formatTranscriptMarkdown,
|
|
40
|
+
formatWorktreeDirective,
|
|
41
|
+
getDefaultRunScript,
|
|
42
|
+
getDiff,
|
|
43
|
+
getDiffSummary,
|
|
44
|
+
getOrchestrator,
|
|
45
|
+
getRunMode,
|
|
46
|
+
getRunScript,
|
|
47
|
+
hasCursorWorktreeSetup,
|
|
48
|
+
importConductorWorkspace,
|
|
49
|
+
importConductorWorkspaceAsync,
|
|
50
|
+
initializeGitRepository,
|
|
51
|
+
inspectGitWorktree,
|
|
52
|
+
isBrightsyNdjsonLine,
|
|
53
|
+
listBranchCommits,
|
|
54
|
+
listConductorWorkspaces,
|
|
55
|
+
listGitHubIssues,
|
|
56
|
+
listIssues,
|
|
57
|
+
listLinearIssues,
|
|
58
|
+
listLinearIssuesDirect,
|
|
59
|
+
listRunScripts,
|
|
60
|
+
listWorktreeFiles,
|
|
61
|
+
loadAgentInstructions,
|
|
62
|
+
maybeCompactContext,
|
|
63
|
+
mergeUsage,
|
|
64
|
+
normalizeParseResult,
|
|
65
|
+
partsToAssistantText,
|
|
66
|
+
previewLand,
|
|
67
|
+
readSkillBody,
|
|
68
|
+
readWorktreeFile,
|
|
69
|
+
readWorktreeInclude,
|
|
70
|
+
requireAgent,
|
|
71
|
+
resolveConductorCursorAgentId,
|
|
72
|
+
resolveFilesToCopy,
|
|
73
|
+
runArchiveScript,
|
|
74
|
+
runCursorWorktreeSetup,
|
|
75
|
+
runSetupScript,
|
|
76
|
+
sameWorktreePath,
|
|
77
|
+
shouldCompactContext,
|
|
78
|
+
shouldRunWorktreeCleanup,
|
|
79
|
+
spawnAgentTurn,
|
|
80
|
+
splitForCompaction,
|
|
81
|
+
startDevServer,
|
|
82
|
+
startMcpServer,
|
|
83
|
+
startOrchestration,
|
|
84
|
+
stripBrightsyNdjsonNoise,
|
|
85
|
+
summarizeConversation,
|
|
86
|
+
takenTeamSlugsForChatTab,
|
|
87
|
+
threadsSharingWorktree,
|
|
88
|
+
toolDescription,
|
|
89
|
+
toolDetail,
|
|
90
|
+
toolFilePath,
|
|
91
|
+
totalTokens,
|
|
92
|
+
validateLinearApiKey,
|
|
93
|
+
withAgentInstructions,
|
|
94
|
+
worktreeCleanupSettings,
|
|
95
|
+
writeWorktreeFile
|
|
96
|
+
} from "./chunk-E4PWXO2C.js";
|
|
97
|
+
import {
|
|
98
|
+
addWorkspace,
|
|
99
|
+
ensureWorkspace,
|
|
100
|
+
listWorkspaces,
|
|
101
|
+
removeWorkspace,
|
|
102
|
+
syncWorkspacesFromThreads
|
|
103
|
+
} from "./chunk-TLJH3L2C.js";
|
|
104
|
+
import {
|
|
105
|
+
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
106
|
+
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
107
|
+
CLOUD_COORDINATOR_TIMEOUT_REPLY,
|
|
108
|
+
CLOUD_ORCHESTRATOR_GOAL,
|
|
109
|
+
GLOBAL_WORKSPACE_ID,
|
|
110
|
+
SIDEBOARD_FORCE_STOP,
|
|
111
|
+
createGlobalChat,
|
|
112
|
+
ensureCloudCoordinator,
|
|
113
|
+
healOrchestrationSoccerTitles,
|
|
114
|
+
isCloudCoordinatorThread,
|
|
115
|
+
isGlobalRepoPath,
|
|
116
|
+
isGlobalThread,
|
|
117
|
+
isOrchestratorThread,
|
|
118
|
+
listGlobalThreads,
|
|
119
|
+
orchestrationTitleNeedsSoccerNickname,
|
|
120
|
+
orchestratorSessionPoisonedByBuiltins,
|
|
121
|
+
parseForceStopMessage,
|
|
122
|
+
takenTeamSlugsForOrchestration
|
|
123
|
+
} from "./chunk-2M4OHXYX.js";
|
|
124
|
+
import {
|
|
125
|
+
COORDINATOR_TOOL_PLAYBOOK,
|
|
126
|
+
coordinatorSystemPrompt,
|
|
127
|
+
coordinatorTurnReminder,
|
|
128
|
+
enrichWorkspacesWithGithub,
|
|
129
|
+
ensureGlobalCoordinatorCwd,
|
|
130
|
+
formatWorkspaceInventory
|
|
131
|
+
} from "./chunk-2R5VV4BA.js";
|
|
132
|
+
import {
|
|
133
|
+
BRIGHTSY_MCP_ALLOWED_TOOLS,
|
|
134
|
+
MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
|
|
135
|
+
PLAN_MODE_INSTRUCTION,
|
|
136
|
+
SIDEBOARD_MCP_ALLOWED_TOOLS,
|
|
137
|
+
allAdapters,
|
|
138
|
+
brightsyAdapter,
|
|
139
|
+
brightsyMcpAllowedTools,
|
|
140
|
+
buildCachedUserContent,
|
|
141
|
+
buildClaudeStreamJsonUserMessage,
|
|
142
|
+
claudeAdapter,
|
|
143
|
+
codexAdapter,
|
|
144
|
+
countCacheControlBlocks,
|
|
145
|
+
cursorAdapter,
|
|
146
|
+
decodeBrightsyTarget,
|
|
147
|
+
encodeBrightsyTarget,
|
|
148
|
+
findInvalidCacheControlTtlOrder,
|
|
149
|
+
flattenTurnInput,
|
|
150
|
+
getAdapter,
|
|
151
|
+
isBrightsyConnected,
|
|
152
|
+
listBrightsyChatTargets,
|
|
153
|
+
mcpAllowTools,
|
|
154
|
+
mcpAuthWarnings,
|
|
155
|
+
normalizeTurnInput,
|
|
156
|
+
opencodeAdapter,
|
|
157
|
+
parseMcpList,
|
|
158
|
+
permissionMode,
|
|
159
|
+
sanitizeMcpServerName,
|
|
160
|
+
writeInjectedMcpConfig
|
|
161
|
+
} from "./chunk-WMCPLDW3.js";
|
|
162
|
+
import {
|
|
163
|
+
brightsyConfigPath,
|
|
164
|
+
brightsyMcpServerName,
|
|
165
|
+
connectBrightsyTeam,
|
|
166
|
+
disconnectBrightsyTeam,
|
|
167
|
+
getBrightsySession,
|
|
168
|
+
listBrightsyAccounts,
|
|
169
|
+
listConnectedBrightsyTeams,
|
|
170
|
+
loadBrightsyConfig,
|
|
171
|
+
saveBrightsyConfig,
|
|
172
|
+
switchBrightsyAccount
|
|
173
|
+
} from "./chunk-ILQK4P5R.js";
|
|
174
|
+
import {
|
|
175
|
+
cursorSdkMessageToEvents,
|
|
176
|
+
parseCursorRunnerLine
|
|
177
|
+
} from "./chunk-3DKGI32Q.js";
|
|
178
|
+
import {
|
|
179
|
+
HARNESS_ENV_KEYS,
|
|
180
|
+
appSettingsPath,
|
|
181
|
+
applyAppEnvironment,
|
|
182
|
+
autoCleanupOrphansEnabled,
|
|
183
|
+
autoRenameBranchEnabled,
|
|
184
|
+
autoRunAfterSetupEnabled,
|
|
185
|
+
brightsyCloudConnectAgent,
|
|
186
|
+
brightsyCloudConnectEnabled,
|
|
187
|
+
caffeinateWhileCloudConnectEnabled,
|
|
188
|
+
caffeinateWhileRunningEnabled,
|
|
189
|
+
childEnvWithAppSettings,
|
|
190
|
+
claudeChromeEnabled,
|
|
191
|
+
claudeUserSettingsPath,
|
|
192
|
+
deleteBranchOnPurgeEnabled,
|
|
193
|
+
getIssueSource,
|
|
194
|
+
getLinearApiKey,
|
|
195
|
+
harnessEnvKey,
|
|
196
|
+
isLinearConnected,
|
|
197
|
+
loadAppSettings,
|
|
198
|
+
maxConcurrentAgents,
|
|
199
|
+
resolveClaudeExecutable,
|
|
200
|
+
resolveEffectiveIssueSource,
|
|
201
|
+
saveAppSettings,
|
|
202
|
+
updateAdvancedSettings,
|
|
203
|
+
updateAppEnvironment,
|
|
204
|
+
updateBrightsySettings,
|
|
205
|
+
updateClaudeSettings,
|
|
206
|
+
updateIntegrationsSettings
|
|
207
|
+
} from "./chunk-3WF3X46L.js";
|
|
208
|
+
import {
|
|
209
|
+
FAMOUS_SOCCER_TEAMS,
|
|
210
|
+
allocateTeamName,
|
|
211
|
+
allocateTeamSlug,
|
|
212
|
+
branchDisplayLabel,
|
|
213
|
+
collectTakenTeamSlugs,
|
|
214
|
+
commitAll,
|
|
215
|
+
createOrUpdatePr,
|
|
216
|
+
createThreadWorktree,
|
|
217
|
+
currentBranch,
|
|
218
|
+
detectLocalMergeConflicts,
|
|
219
|
+
fetchPrHead,
|
|
220
|
+
getPr,
|
|
221
|
+
getPrChecks,
|
|
222
|
+
getPrDetails,
|
|
223
|
+
isDirty,
|
|
224
|
+
isPlaceholderBranch,
|
|
225
|
+
listBranches,
|
|
226
|
+
listPrs,
|
|
227
|
+
listWorktrees,
|
|
228
|
+
mergePr,
|
|
229
|
+
normalizeWorktreePath,
|
|
230
|
+
parseGithubSlugFromRemoteUrl,
|
|
231
|
+
pushBranch,
|
|
232
|
+
removeWorktree,
|
|
233
|
+
resolveDefaultBranch,
|
|
234
|
+
resolveDiffBaseRef,
|
|
235
|
+
resolveGithubRepoSlug,
|
|
236
|
+
resolvePrSelector,
|
|
237
|
+
resolveRepoRoot,
|
|
238
|
+
resolveWorktreeStartPoint,
|
|
239
|
+
slugify,
|
|
240
|
+
suggestSlug,
|
|
241
|
+
threadDisplayLabel,
|
|
242
|
+
worktreeDisplayLabel,
|
|
243
|
+
worktreeDisplayLabelForGroup,
|
|
244
|
+
worktreeNameFromPath
|
|
245
|
+
} from "./chunk-LL7DTZ5B.js";
|
|
246
|
+
import {
|
|
247
|
+
appendMessage,
|
|
248
|
+
createEmptyThread,
|
|
249
|
+
deleteThreadRecord,
|
|
250
|
+
findThreadByRef,
|
|
251
|
+
listThreads,
|
|
252
|
+
normalizeThread,
|
|
253
|
+
readThread,
|
|
254
|
+
setStatus,
|
|
255
|
+
updateThread,
|
|
256
|
+
withThreadLock,
|
|
257
|
+
writeThread
|
|
258
|
+
} from "./chunk-HYRHI3QU.js";
|
|
259
|
+
import {
|
|
260
|
+
appDataDir,
|
|
261
|
+
getRepoSetupInfo,
|
|
262
|
+
globalAgentCwd,
|
|
263
|
+
hasConductorHook,
|
|
264
|
+
hasRepoHook,
|
|
265
|
+
hasWorkspaceHook,
|
|
266
|
+
loadConductorSettings,
|
|
267
|
+
loadRepoSettings,
|
|
268
|
+
loadWorkspaceSettings,
|
|
269
|
+
locksDir,
|
|
270
|
+
repoSlug,
|
|
271
|
+
settingsSourceLabel,
|
|
272
|
+
sideboardHomeDir,
|
|
273
|
+
sideboardReposDir,
|
|
274
|
+
sideboardWorkspacesDir,
|
|
275
|
+
threadFilePath,
|
|
276
|
+
threadLockPath,
|
|
277
|
+
threadsDir,
|
|
278
|
+
workspaceSettingsSourceLabel,
|
|
279
|
+
worktreesRoot
|
|
280
|
+
} from "./chunk-M37RITA6.js";
|
|
281
|
+
import {
|
|
282
|
+
ensureAgentPath,
|
|
283
|
+
gh,
|
|
284
|
+
git,
|
|
285
|
+
run
|
|
286
|
+
} from "./chunk-AJ6ROGD7.js";
|
|
287
|
+
|
|
288
|
+
// src/integrations/github.ts
|
|
289
|
+
async function getGitHubStatus() {
|
|
290
|
+
const which = await run("which", ["gh"], { reject: false });
|
|
291
|
+
if (which.exitCode !== 0 || !which.stdout.trim()) {
|
|
292
|
+
return {
|
|
293
|
+
connected: false,
|
|
294
|
+
login: null,
|
|
295
|
+
hosts: [],
|
|
296
|
+
reason: "gh CLI not found on PATH"
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
const loginResult = await run(
|
|
300
|
+
"gh",
|
|
301
|
+
["api", "user", "--jq", ".login"],
|
|
302
|
+
{ reject: false }
|
|
303
|
+
);
|
|
304
|
+
if (loginResult.exitCode === 0 && loginResult.stdout.trim()) {
|
|
305
|
+
return {
|
|
306
|
+
connected: true,
|
|
307
|
+
login: loginResult.stdout.trim(),
|
|
308
|
+
hosts: ["github.com"],
|
|
309
|
+
reason: null
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
const status = await run("gh", ["auth", "status"], { reject: false });
|
|
313
|
+
const text = `${status.stdout}
|
|
314
|
+
${status.stderr}`;
|
|
315
|
+
const loginMatch = text.match(/Logged in to ([^\s]+) account (\S+)/i) ?? text.match(/Logged in to ([^\s]+) as (\S+)/i);
|
|
316
|
+
if (loginMatch) {
|
|
317
|
+
return {
|
|
318
|
+
connected: true,
|
|
319
|
+
login: loginMatch[2].replace(/['"]/g, ""),
|
|
320
|
+
hosts: [loginMatch[1]],
|
|
321
|
+
reason: null
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
return {
|
|
325
|
+
connected: false,
|
|
326
|
+
login: null,
|
|
327
|
+
hosts: [],
|
|
328
|
+
reason: status.stderr.trim() || status.stdout.trim() || "Not logged in to GitHub (run: gh auth login)"
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
async function refreshGitHubAuth() {
|
|
332
|
+
return getGitHubStatus();
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// src/brightsy/api.ts
|
|
336
|
+
function formatBrightsyFetchError(err, url) {
|
|
337
|
+
if (!(err instanceof Error)) return `${String(err)} (${url})`;
|
|
338
|
+
const cause = err.cause;
|
|
339
|
+
let detail = "";
|
|
340
|
+
if (cause instanceof Error) {
|
|
341
|
+
const code = typeof cause.code === "string" ? cause.code : void 0;
|
|
342
|
+
detail = code ? ` [${code}: ${cause.message}]` : ` [${cause.message}]`;
|
|
343
|
+
} else if (cause != null) {
|
|
344
|
+
detail = ` [${String(cause)}]`;
|
|
345
|
+
}
|
|
346
|
+
return `${err.message}${detail} (${url})`;
|
|
347
|
+
}
|
|
348
|
+
var BrightsySideboardApi = class {
|
|
349
|
+
cfg;
|
|
350
|
+
fetchImpl;
|
|
351
|
+
constructor(cfgOrOpts) {
|
|
352
|
+
const isOpts = !!cfgOrOpts && typeof cfgOrOpts === "object" && ("fetchImpl" in cfgOrOpts || "cfg" in cfgOrOpts) && !("access_token" in cfgOrOpts);
|
|
353
|
+
if (isOpts) {
|
|
354
|
+
const opts = cfgOrOpts;
|
|
355
|
+
this.cfg = opts.cfg ?? loadBrightsyConfig();
|
|
356
|
+
this.fetchImpl = opts.fetchImpl ?? globalThis.fetch.bind(globalThis);
|
|
357
|
+
} else {
|
|
358
|
+
this.cfg = cfgOrOpts ?? loadBrightsyConfig();
|
|
359
|
+
this.fetchImpl = globalThis.fetch.bind(globalThis);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
get accountId() {
|
|
363
|
+
return this.cfg.account_id;
|
|
364
|
+
}
|
|
365
|
+
get endpoint() {
|
|
366
|
+
return (this.cfg.endpoint || "https://brightsy.ai").replace(/\/$/, "");
|
|
367
|
+
}
|
|
368
|
+
async request(path, init = {}) {
|
|
369
|
+
await this.refreshIfNeeded();
|
|
370
|
+
const url = `${this.endpoint}${path}`;
|
|
371
|
+
const headers = {
|
|
372
|
+
Authorization: `Bearer ${this.cfg.access_token}`,
|
|
373
|
+
Accept: "application/json"
|
|
374
|
+
};
|
|
375
|
+
if (init.body != null) headers["Content-Type"] = "application/json";
|
|
376
|
+
let res;
|
|
377
|
+
try {
|
|
378
|
+
res = await this.fetchImpl(url, {
|
|
379
|
+
method: init.method ?? "GET",
|
|
380
|
+
headers,
|
|
381
|
+
body: init.body != null ? JSON.stringify(init.body) : void 0
|
|
382
|
+
});
|
|
383
|
+
} catch (err) {
|
|
384
|
+
throw new Error(formatBrightsyFetchError(err, url));
|
|
385
|
+
}
|
|
386
|
+
if (!res.ok) {
|
|
387
|
+
const err = await res.json().catch(() => ({}));
|
|
388
|
+
throw new Error(err.error?.message ?? `${res.status} ${res.statusText} (${url})`);
|
|
389
|
+
}
|
|
390
|
+
return await res.json();
|
|
391
|
+
}
|
|
392
|
+
async refreshIfNeeded() {
|
|
393
|
+
const expiresAt = this.cfg.expires_at ?? 0;
|
|
394
|
+
if (!this.cfg.refresh_token || Date.now() < expiresAt - 6e4) return;
|
|
395
|
+
const clientId = this.cfg.oauth_client_id || "brightsy-cli";
|
|
396
|
+
const url = `${this.endpoint}/oauth/token`;
|
|
397
|
+
let res;
|
|
398
|
+
try {
|
|
399
|
+
res = await this.fetchImpl(url, {
|
|
400
|
+
method: "POST",
|
|
401
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
402
|
+
body: new URLSearchParams({
|
|
403
|
+
grant_type: "refresh_token",
|
|
404
|
+
refresh_token: this.cfg.refresh_token,
|
|
405
|
+
client_id: clientId
|
|
406
|
+
})
|
|
407
|
+
});
|
|
408
|
+
} catch (err) {
|
|
409
|
+
throw new Error(formatBrightsyFetchError(err, url));
|
|
410
|
+
}
|
|
411
|
+
if (!res.ok) return;
|
|
412
|
+
const data = await res.json();
|
|
413
|
+
if (!data.access_token) return;
|
|
414
|
+
this.cfg.access_token = data.access_token;
|
|
415
|
+
if (data.refresh_token) this.cfg.refresh_token = data.refresh_token;
|
|
416
|
+
if (data.expires_in) {
|
|
417
|
+
this.cfg.expires_at = Date.now() + data.expires_in * 1e3;
|
|
418
|
+
}
|
|
419
|
+
saveBrightsyConfig(this.cfg);
|
|
420
|
+
}
|
|
421
|
+
async getAccess() {
|
|
422
|
+
return this.request(
|
|
423
|
+
`/api/v1beta/desktop/access?accountId=${encodeURIComponent(this.accountId)}`
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
async setAccess(enabled, allow_always = false) {
|
|
427
|
+
return this.request("/api/v1beta/desktop/access", {
|
|
428
|
+
method: "PUT",
|
|
429
|
+
body: {
|
|
430
|
+
accountId: this.accountId,
|
|
431
|
+
enabled,
|
|
432
|
+
allow_always
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
async getTasks(status) {
|
|
437
|
+
const params = new URLSearchParams();
|
|
438
|
+
if (status) params.set("status", status);
|
|
439
|
+
params.set("accountId", this.accountId);
|
|
440
|
+
const q = `?${params.toString()}`;
|
|
441
|
+
const data = await this.request(
|
|
442
|
+
`/api/v1beta/desktop/tasks${q}`
|
|
443
|
+
);
|
|
444
|
+
return data.tasks ?? [];
|
|
445
|
+
}
|
|
446
|
+
async approveTask(taskId) {
|
|
447
|
+
await this.request(`/api/v1beta/desktop/tasks/${taskId}`, {
|
|
448
|
+
method: "PATCH",
|
|
449
|
+
body: { action: "approve" }
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
async markRunning(taskId) {
|
|
453
|
+
await this.request(`/api/v1beta/desktop/tasks/${taskId}`, {
|
|
454
|
+
method: "PATCH",
|
|
455
|
+
body: { task_status: "running" }
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
async submitResponse(taskId, response) {
|
|
459
|
+
await this.request(`/api/v1beta/desktop/tasks/${taskId}/response`, {
|
|
460
|
+
method: "POST",
|
|
461
|
+
body: { response }
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
function taskMessageText(task) {
|
|
466
|
+
const parts = task.message?.parts ?? [];
|
|
467
|
+
const text = parts.find((p) => p.kind === "text")?.text ?? "";
|
|
468
|
+
return text.trim();
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// src/brightsy/cloud-connect.ts
|
|
472
|
+
var POLL_MS = 5e3;
|
|
473
|
+
var handleTaskChain = Promise.resolve();
|
|
474
|
+
function enqueueHandleTask(fn) {
|
|
475
|
+
const run2 = handleTaskChain.then(fn, fn);
|
|
476
|
+
handleTaskChain = run2.then(
|
|
477
|
+
() => void 0,
|
|
478
|
+
() => void 0
|
|
479
|
+
);
|
|
480
|
+
return run2;
|
|
481
|
+
}
|
|
482
|
+
function refreshWorkspaces() {
|
|
483
|
+
const orch = getOrchestrator();
|
|
484
|
+
return orch.listWorkspaces();
|
|
485
|
+
}
|
|
486
|
+
async function handleTask(api, task, opts) {
|
|
487
|
+
const log = opts.onLog ?? (() => void 0);
|
|
488
|
+
let message = taskMessageText(task);
|
|
489
|
+
if (!message) {
|
|
490
|
+
log(`skip ${task.id.slice(0, 8)}: empty message`);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
if (task.task_status !== "pending" && task.task_status !== "running" && task.task_status !== "awaiting_confirmation") {
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
const workspaces = refreshWorkspaces();
|
|
497
|
+
for (const ws of workspaces) {
|
|
498
|
+
await getOrchestrator().reconcile(ws.path).catch(() => void 0);
|
|
499
|
+
}
|
|
500
|
+
const inventory = await enrichWorkspacesWithGithub(workspaces);
|
|
501
|
+
const coordinator = ensureCloudCoordinator(opts.agent);
|
|
502
|
+
let fresh = readThread(coordinator.id) ?? coordinator;
|
|
503
|
+
const parsed = parseForceStopMessage(message);
|
|
504
|
+
if (parsed.forceStop) {
|
|
505
|
+
try {
|
|
506
|
+
getOrchestrator().stop(fresh.id);
|
|
507
|
+
log(`force-stop ${task.id.slice(0, 8)} \u2192 coordinator ${fresh.id.slice(0, 8)}`);
|
|
508
|
+
} catch (err) {
|
|
509
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
510
|
+
log(`force-stop ${task.id.slice(0, 8)}: ${msg}`);
|
|
511
|
+
}
|
|
512
|
+
if (!parsed.remainder) {
|
|
513
|
+
if (task.task_status === "awaiting_confirmation") {
|
|
514
|
+
await api.approveTask(task.id).catch(() => void 0);
|
|
515
|
+
}
|
|
516
|
+
await api.markRunning(task.id).catch(() => void 0);
|
|
517
|
+
await api.submitResponse(task.id, CLOUD_COORDINATOR_STOPPED_REPLY);
|
|
518
|
+
log(`replied stopped ${task.id.slice(0, 8)}`);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
message = parsed.remainder;
|
|
522
|
+
fresh = readThread(coordinator.id) ?? ensureCloudCoordinator(opts.agent);
|
|
523
|
+
}
|
|
524
|
+
if (fresh.status === "running" || fresh.status === "queued") {
|
|
525
|
+
log(
|
|
526
|
+
`busy ${task.id.slice(0, 8)} \u2192 coordinator ${fresh.id.slice(0, 8)} (${fresh.status})`
|
|
527
|
+
);
|
|
528
|
+
if (task.task_status === "awaiting_confirmation") {
|
|
529
|
+
await api.approveTask(task.id).catch(() => void 0);
|
|
530
|
+
}
|
|
531
|
+
await api.markRunning(task.id).catch(() => void 0);
|
|
532
|
+
await api.submitResponse(task.id, CLOUD_COORDINATOR_BUSY_REPLY);
|
|
533
|
+
log(`replied busy ${task.id.slice(0, 8)}`);
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (task.task_status === "awaiting_confirmation") {
|
|
537
|
+
log(`approve ${task.id.slice(0, 8)}`);
|
|
538
|
+
await api.approveTask(task.id);
|
|
539
|
+
task = { ...task, task_status: "pending" };
|
|
540
|
+
}
|
|
541
|
+
log(
|
|
542
|
+
`run ${task.id.slice(0, 8)} \u2192 coordinator ${fresh.id.slice(0, 8)} (${inventory.length} workspace${inventory.length === 1 ? "" : "s"})`
|
|
543
|
+
);
|
|
544
|
+
await api.markRunning(task.id).catch(() => void 0);
|
|
545
|
+
const orch = getOrchestrator();
|
|
546
|
+
const prompt = [
|
|
547
|
+
coordinatorSystemPrompt({
|
|
548
|
+
goal: fresh.sourceRef || CLOUD_ORCHESTRATOR_GOAL,
|
|
549
|
+
parentId: fresh.id,
|
|
550
|
+
workspaces: inventory,
|
|
551
|
+
audience: "cloud"
|
|
552
|
+
}),
|
|
553
|
+
"",
|
|
554
|
+
"--- Cloud agent request ---",
|
|
555
|
+
message
|
|
556
|
+
].join("\n");
|
|
557
|
+
try {
|
|
558
|
+
await orch.send(fresh.id, prompt);
|
|
559
|
+
await orch.waitForTurn(fresh.id, 14 * 60 * 1e3);
|
|
560
|
+
const result = orch.getTurnResult(fresh.id);
|
|
561
|
+
const reply = result.text.trim() || `(coordinator finished with status ${result.status}, no text)`;
|
|
562
|
+
await api.submitResponse(task.id, reply);
|
|
563
|
+
log(`replied ${task.id.slice(0, 8)} (${reply.length} chars)`);
|
|
564
|
+
} catch (err) {
|
|
565
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
566
|
+
const timedOut = /timed out|timeout/i.test(msg);
|
|
567
|
+
const reply = timedOut ? CLOUD_COORDINATOR_TIMEOUT_REPLY : `Sideboard coordinator error: ${msg}`;
|
|
568
|
+
await api.submitResponse(task.id, reply).catch(() => void 0);
|
|
569
|
+
log(`replied error ${task.id.slice(0, 8)}: ${msg}`);
|
|
570
|
+
if (!timedOut) throw err;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
async function runCloudConnect(opts) {
|
|
574
|
+
const log = opts.onLog ?? console.log;
|
|
575
|
+
const api = opts.api ?? new BrightsySideboardApi(
|
|
576
|
+
opts.fetchImpl ? { fetchImpl: opts.fetchImpl } : void 0
|
|
577
|
+
);
|
|
578
|
+
const enableAccess = opts.enableAccess !== false;
|
|
579
|
+
const allowAlways = opts.allowAlways !== false;
|
|
580
|
+
const pollMs = opts.pollIntervalMs ?? POLL_MS;
|
|
581
|
+
const workspaces = refreshWorkspaces();
|
|
582
|
+
const coordinator = ensureCloudCoordinator(opts.agent);
|
|
583
|
+
const access = await api.getAccess();
|
|
584
|
+
if (!access.enabled) {
|
|
585
|
+
if (!enableAccess) {
|
|
586
|
+
throw new Error(
|
|
587
|
+
"Brightsy desktop access is disabled. Enable Cloud messages in Sideboard Settings \u2192 Brightsy, or Brightsy User Settings."
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
log("Enabling Brightsy desktop access\u2026");
|
|
591
|
+
await api.setAccess(true, allowAlways);
|
|
592
|
+
} else if (allowAlways && !access.allow_always) {
|
|
593
|
+
await api.setAccess(true, true);
|
|
594
|
+
}
|
|
595
|
+
log(
|
|
596
|
+
`Connected to Brightsy (${api.endpoint}). Polling desktop tasks every ${pollMs / 1e3}s\u2026`
|
|
597
|
+
);
|
|
598
|
+
log(
|
|
599
|
+
`Global coordinator: ${coordinator.id.slice(0, 8)} agent: ${opts.agent} global chats: ${listGlobalThreads().length}`
|
|
600
|
+
);
|
|
601
|
+
log(`Workspaces (${workspaces.length}):`);
|
|
602
|
+
for (const line of formatWorkspaceInventory(workspaces).split("\n")) {
|
|
603
|
+
log(` ${line}`);
|
|
604
|
+
}
|
|
605
|
+
const inFlight = /* @__PURE__ */ new Set();
|
|
606
|
+
let consecutivePollFailures = 0;
|
|
607
|
+
while (!opts.signal?.aborted) {
|
|
608
|
+
try {
|
|
609
|
+
const hadFailures = consecutivePollFailures > 0;
|
|
610
|
+
const [pending, awaiting, running] = await Promise.all([
|
|
611
|
+
api.getTasks("pending"),
|
|
612
|
+
api.getTasks("awaiting_confirmation"),
|
|
613
|
+
api.getTasks("running")
|
|
614
|
+
]);
|
|
615
|
+
consecutivePollFailures = 0;
|
|
616
|
+
if (hadFailures) log("poll recovered");
|
|
617
|
+
const tasks = [...awaiting, ...pending, ...running];
|
|
618
|
+
for (const task of tasks) {
|
|
619
|
+
if (inFlight.has(task.id)) continue;
|
|
620
|
+
if (task.task_status === "running") continue;
|
|
621
|
+
inFlight.add(task.id);
|
|
622
|
+
const message = taskMessageText(task);
|
|
623
|
+
if (message && parseForceStopMessage(message).forceStop) {
|
|
624
|
+
try {
|
|
625
|
+
getOrchestrator().stop(ensureCloudCoordinator(opts.agent).id);
|
|
626
|
+
log(
|
|
627
|
+
`force-stop interrupt ${task.id.slice(0, 8)} \u2192 coordinator`
|
|
628
|
+
);
|
|
629
|
+
} catch (err) {
|
|
630
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
631
|
+
log(`force-stop interrupt ${task.id.slice(0, 8)}: ${msg}`);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
void enqueueHandleTask(() => handleTask(api, task, opts)).catch((err) => {
|
|
635
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
636
|
+
log(`error ${task.id.slice(0, 8)}: ${msg}`);
|
|
637
|
+
}).finally(() => inFlight.delete(task.id));
|
|
638
|
+
}
|
|
639
|
+
} catch (err) {
|
|
640
|
+
consecutivePollFailures += 1;
|
|
641
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
642
|
+
if (consecutivePollFailures === 1) {
|
|
643
|
+
log(`poll retry: ${msg}`);
|
|
644
|
+
} else {
|
|
645
|
+
log(`poll error: ${msg}`);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
await new Promise((resolve) => {
|
|
649
|
+
const t = setTimeout(resolve, pollMs);
|
|
650
|
+
opts.signal?.addEventListener(
|
|
651
|
+
"abort",
|
|
652
|
+
() => {
|
|
653
|
+
clearTimeout(t);
|
|
654
|
+
resolve();
|
|
655
|
+
},
|
|
656
|
+
{ once: true }
|
|
657
|
+
);
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
export {
|
|
662
|
+
BRIGHTSY_MCP_ALLOWED_TOOLS,
|
|
663
|
+
BrightsySideboardApi,
|
|
664
|
+
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
665
|
+
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
666
|
+
CLOUD_COORDINATOR_TIMEOUT_REPLY,
|
|
667
|
+
CLOUD_ORCHESTRATOR_GOAL,
|
|
668
|
+
CONTEXT_COMPACT_CHARS,
|
|
669
|
+
CONTEXT_KEEP_RECENT_CHARS,
|
|
670
|
+
CONTEXT_KEEP_RECENT_MESSAGES,
|
|
671
|
+
CONTEXT_MIN_MESSAGES,
|
|
672
|
+
COORDINATOR_TOOL_PLAYBOOK,
|
|
673
|
+
FAMOUS_SOCCER_TEAMS,
|
|
674
|
+
GLOBAL_WORKSPACE_ID,
|
|
675
|
+
HARNESS_ENV_KEYS,
|
|
676
|
+
MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
|
|
677
|
+
Orchestrator,
|
|
678
|
+
PLAN_MODE_INSTRUCTION,
|
|
679
|
+
SIDEBOARD_FORCE_STOP,
|
|
680
|
+
SIDEBOARD_MCP_ALLOWED_TOOLS,
|
|
681
|
+
addWorkspace,
|
|
682
|
+
adoptThread,
|
|
683
|
+
allAdapters,
|
|
684
|
+
allocatePort,
|
|
685
|
+
allocatePortRange,
|
|
686
|
+
allocateTeamName,
|
|
687
|
+
allocateTeamSlug,
|
|
688
|
+
appDataDir,
|
|
689
|
+
appSettingsPath,
|
|
690
|
+
appendMessage,
|
|
691
|
+
applyAgentEvent,
|
|
692
|
+
applyAppEnvironment,
|
|
693
|
+
applyCompaction,
|
|
694
|
+
applyThreadIntoMain,
|
|
695
|
+
autoCleanupOrphansEnabled,
|
|
696
|
+
autoRenameBranchEnabled,
|
|
697
|
+
autoRunAfterSetupEnabled,
|
|
698
|
+
branchDisplayLabel,
|
|
699
|
+
brightsyAdapter,
|
|
700
|
+
brightsyCloudConnectAgent,
|
|
701
|
+
brightsyCloudConnectEnabled,
|
|
702
|
+
brightsyConfigPath,
|
|
703
|
+
brightsyMcpAllowedTools,
|
|
704
|
+
brightsyMcpServerName,
|
|
705
|
+
buildCachedUserContent,
|
|
706
|
+
buildClaudeStreamJsonUserMessage,
|
|
707
|
+
buildForkTranscriptAttachment,
|
|
708
|
+
buildSessionSeed,
|
|
709
|
+
buildWorkspaceScriptEnv,
|
|
710
|
+
caffeinateWhileCloudConnectEnabled,
|
|
711
|
+
caffeinateWhileRunningEnabled,
|
|
712
|
+
captureLoginEnv,
|
|
713
|
+
captureTurnBaseline,
|
|
714
|
+
childEnvWithAppSettings,
|
|
715
|
+
claudeAdapter,
|
|
716
|
+
claudeChromeEnabled,
|
|
717
|
+
claudeUserSettingsPath,
|
|
718
|
+
cleanupOrphanWorktrees,
|
|
719
|
+
cloneRepoIntoSideboard,
|
|
720
|
+
codexAdapter,
|
|
721
|
+
collectTakenTeamSlugs,
|
|
722
|
+
commitAll,
|
|
723
|
+
conductorDbPath,
|
|
724
|
+
confirmLand,
|
|
725
|
+
connectBrightsyTeam,
|
|
726
|
+
coordinatorSystemPrompt,
|
|
727
|
+
coordinatorTurnReminder,
|
|
728
|
+
copyConfiguredFiles,
|
|
729
|
+
countCacheControlBlocks,
|
|
730
|
+
createChatTab,
|
|
731
|
+
createEmptyThread,
|
|
732
|
+
createGlobalChat,
|
|
733
|
+
createOrUpdatePr,
|
|
734
|
+
createThread,
|
|
735
|
+
createThreadWorktree,
|
|
736
|
+
currentBranch,
|
|
737
|
+
cursorAdapter,
|
|
738
|
+
cursorSdkMessageToEvents,
|
|
739
|
+
decodeBrightsyTarget,
|
|
740
|
+
deleteBranchOnPurgeEnabled,
|
|
741
|
+
deleteThreadRecord,
|
|
742
|
+
detectAgents,
|
|
743
|
+
detectLocalMergeConflicts,
|
|
744
|
+
disconnectBrightsyTeam,
|
|
745
|
+
discoverSkills,
|
|
746
|
+
encodeBrightsyTarget,
|
|
747
|
+
enrichWorkspacesWithGithub,
|
|
748
|
+
ensureAgentPath,
|
|
749
|
+
ensureCloudCoordinator,
|
|
750
|
+
ensureGlobalCoordinatorCwd,
|
|
751
|
+
ensureWorkspace,
|
|
752
|
+
estimateMessageChars,
|
|
753
|
+
estimateThreadChars,
|
|
754
|
+
expandComposerPrompt,
|
|
755
|
+
extractiveSummary,
|
|
756
|
+
fetchPrHead,
|
|
757
|
+
finalizeParts,
|
|
758
|
+
findInvalidCacheControlTtlOrder,
|
|
759
|
+
findOrphanWorktrees,
|
|
760
|
+
findThreadByRef,
|
|
761
|
+
flattenTurnInput,
|
|
762
|
+
forkChatTab,
|
|
763
|
+
forkMessageSlice,
|
|
764
|
+
forkThreadWorktree,
|
|
765
|
+
formatAgentInstructions,
|
|
766
|
+
formatBrightsyFetchError,
|
|
767
|
+
formatMessagesAsTranscript,
|
|
768
|
+
formatRenameBranchDirective,
|
|
769
|
+
formatTranscriptMarkdown,
|
|
770
|
+
formatWorkspaceInventory,
|
|
771
|
+
formatWorktreeDirective,
|
|
772
|
+
getAdapter,
|
|
773
|
+
getBrightsySession,
|
|
774
|
+
getDefaultRunScript,
|
|
775
|
+
getDiff,
|
|
776
|
+
getDiffSummary,
|
|
777
|
+
getGitHubStatus,
|
|
778
|
+
getIssueSource,
|
|
779
|
+
getLinearApiKey,
|
|
780
|
+
getOrchestrator,
|
|
781
|
+
getPr,
|
|
782
|
+
getPrChecks,
|
|
783
|
+
getPrDetails,
|
|
784
|
+
getRepoSetupInfo,
|
|
785
|
+
getRunMode,
|
|
786
|
+
getRunScript,
|
|
787
|
+
gh,
|
|
788
|
+
git,
|
|
789
|
+
globalAgentCwd,
|
|
790
|
+
harnessEnvKey,
|
|
791
|
+
hasConductorHook,
|
|
792
|
+
hasCursorWorktreeSetup,
|
|
793
|
+
hasRepoHook,
|
|
794
|
+
hasWorkspaceHook,
|
|
795
|
+
healOrchestrationSoccerTitles,
|
|
796
|
+
importConductorWorkspace,
|
|
797
|
+
importConductorWorkspaceAsync,
|
|
798
|
+
initializeGitRepository,
|
|
799
|
+
inspectGitWorktree,
|
|
800
|
+
isBrightsyConnected,
|
|
801
|
+
isBrightsyNdjsonLine,
|
|
802
|
+
isCloudCoordinatorThread,
|
|
803
|
+
isDirty,
|
|
804
|
+
isGlobalRepoPath,
|
|
805
|
+
isGlobalThread,
|
|
806
|
+
isLinearConnected,
|
|
807
|
+
isOrchestratorThread,
|
|
808
|
+
isPlaceholderBranch,
|
|
809
|
+
listBranchCommits,
|
|
810
|
+
listBranches,
|
|
811
|
+
listBrightsyAccounts,
|
|
812
|
+
listBrightsyChatTargets,
|
|
813
|
+
listConductorWorkspaces,
|
|
814
|
+
listConnectedBrightsyTeams,
|
|
815
|
+
listGitHubIssues,
|
|
816
|
+
listGlobalThreads,
|
|
817
|
+
listIssues,
|
|
818
|
+
listLinearIssues,
|
|
819
|
+
listLinearIssuesDirect,
|
|
820
|
+
listPrs,
|
|
821
|
+
listRunScripts,
|
|
822
|
+
listThreads,
|
|
823
|
+
listWorkspaces,
|
|
824
|
+
listWorktreeFiles,
|
|
825
|
+
listWorktrees,
|
|
826
|
+
loadAgentInstructions,
|
|
827
|
+
loadAppSettings,
|
|
828
|
+
loadBrightsyConfig,
|
|
829
|
+
loadConductorSettings,
|
|
830
|
+
loadRepoSettings,
|
|
831
|
+
loadWorkspaceSettings,
|
|
832
|
+
locksDir,
|
|
833
|
+
maxConcurrentAgents,
|
|
834
|
+
maybeCompactContext,
|
|
835
|
+
mcpAllowTools,
|
|
836
|
+
mcpAuthWarnings,
|
|
837
|
+
mergePr,
|
|
838
|
+
mergeUsage,
|
|
839
|
+
normalizeParseResult,
|
|
840
|
+
normalizeThread,
|
|
841
|
+
normalizeTurnInput,
|
|
842
|
+
normalizeWorktreePath,
|
|
843
|
+
opencodeAdapter,
|
|
844
|
+
orchestrationTitleNeedsSoccerNickname,
|
|
845
|
+
orchestratorSessionPoisonedByBuiltins,
|
|
846
|
+
parseCursorRunnerLine,
|
|
847
|
+
parseForceStopMessage,
|
|
848
|
+
parseGithubSlugFromRemoteUrl,
|
|
849
|
+
parseMcpList,
|
|
850
|
+
partsToAssistantText,
|
|
851
|
+
permissionMode,
|
|
852
|
+
previewLand,
|
|
853
|
+
pushBranch,
|
|
854
|
+
readSkillBody,
|
|
855
|
+
readThread,
|
|
856
|
+
readWorktreeFile,
|
|
857
|
+
readWorktreeInclude,
|
|
858
|
+
refreshGitHubAuth,
|
|
859
|
+
removeWorkspace,
|
|
860
|
+
removeWorktree,
|
|
861
|
+
repoSlug,
|
|
862
|
+
requireAgent,
|
|
863
|
+
resolveClaudeExecutable,
|
|
864
|
+
resolveConductorCursorAgentId,
|
|
865
|
+
resolveDefaultBranch,
|
|
866
|
+
resolveDiffBaseRef,
|
|
867
|
+
resolveEffectiveIssueSource,
|
|
868
|
+
resolveFilesToCopy,
|
|
869
|
+
resolveGithubRepoSlug,
|
|
870
|
+
resolvePrSelector,
|
|
871
|
+
resolveRepoRoot,
|
|
872
|
+
resolveWorktreeStartPoint,
|
|
873
|
+
run,
|
|
874
|
+
runArchiveScript,
|
|
875
|
+
runCloudConnect,
|
|
876
|
+
runCursorWorktreeSetup,
|
|
877
|
+
runSetupScript,
|
|
878
|
+
sameWorktreePath,
|
|
879
|
+
sanitizeMcpServerName,
|
|
880
|
+
saveAppSettings,
|
|
881
|
+
setStatus,
|
|
882
|
+
settingsSourceLabel,
|
|
883
|
+
shouldCompactContext,
|
|
884
|
+
shouldRunWorktreeCleanup,
|
|
885
|
+
sideboardHomeDir,
|
|
886
|
+
sideboardReposDir,
|
|
887
|
+
sideboardWorkspacesDir,
|
|
888
|
+
slugify,
|
|
889
|
+
spawnAgentTurn,
|
|
890
|
+
splitForCompaction,
|
|
891
|
+
startDevServer,
|
|
892
|
+
startMcpServer,
|
|
893
|
+
startOrchestration,
|
|
894
|
+
stripBrightsyNdjsonNoise,
|
|
895
|
+
suggestSlug,
|
|
896
|
+
summarizeConversation,
|
|
897
|
+
switchBrightsyAccount,
|
|
898
|
+
syncWorkspacesFromThreads,
|
|
899
|
+
takenTeamSlugsForChatTab,
|
|
900
|
+
takenTeamSlugsForOrchestration,
|
|
901
|
+
taskMessageText,
|
|
902
|
+
threadDisplayLabel,
|
|
903
|
+
threadFilePath,
|
|
904
|
+
threadLockPath,
|
|
905
|
+
threadsDir,
|
|
906
|
+
threadsSharingWorktree,
|
|
907
|
+
toolDescription,
|
|
908
|
+
toolDetail,
|
|
909
|
+
toolFilePath,
|
|
910
|
+
totalTokens,
|
|
911
|
+
updateAdvancedSettings,
|
|
912
|
+
updateAppEnvironment,
|
|
913
|
+
updateBrightsySettings,
|
|
914
|
+
updateClaudeSettings,
|
|
915
|
+
updateIntegrationsSettings,
|
|
916
|
+
updateThread,
|
|
917
|
+
validateLinearApiKey,
|
|
918
|
+
withAgentInstructions,
|
|
919
|
+
withThreadLock,
|
|
920
|
+
workspaceSettingsSourceLabel,
|
|
921
|
+
worktreeCleanupSettings,
|
|
922
|
+
worktreeDisplayLabel,
|
|
923
|
+
worktreeDisplayLabelForGroup,
|
|
924
|
+
worktreeNameFromPath,
|
|
925
|
+
worktreesRoot,
|
|
926
|
+
writeInjectedMcpConfig,
|
|
927
|
+
writeThread,
|
|
928
|
+
writeWorktreeFile
|
|
929
|
+
};
|