@sideboard-ai/core 0.1.136 → 0.1.142
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/{abletime-VTP4JR63.js → abletime-DI55AJX3.js} +2 -2
- package/dist/{abletime-DDTV7WO3.js → abletime-QEVAE67D.js} +2 -2
- package/dist/agents/cursor-runner.cjs +0 -0
- package/dist/agents/cursor-runner.js +1 -1
- package/dist/{agents-QNTTLMG2.js → agents-E5AAMHDY.js} +12 -8
- package/dist/{agents-ELWR7A2T.js → agents-OEEOIKUB.js} +11 -7
- package/dist/{app-settings-U5RZKUXG.js → app-settings-WJDCJFSY.js} +3 -1
- package/dist/{app-settings-YQ7YX2CC.js → app-settings-ZCN632OJ.js} +3 -1
- package/dist/caffeinate-hold-NBRUWYXO.js +0 -0
- package/dist/{chunk-4XKUHP6G.js → chunk-4D4PEBGB.js} +2 -2
- package/dist/{chunk-QAV3HGVS.js → chunk-4Q45TLZ5.js} +8 -8
- package/dist/chunk-6GN5WPYZ.js +0 -0
- package/dist/chunk-B3SJXYIJ.js +0 -0
- package/dist/chunk-BD2ICC4D.js +0 -0
- package/dist/{chunk-GKKHXZCT.js → chunk-BGQBELGJ.js} +201 -2
- package/dist/{chunk-2XXAAIN3.js → chunk-BOD5V52W.js} +1 -1
- package/dist/{chunk-JPBRMUM6.js → chunk-CG25RYQQ.js} +87 -41
- package/dist/chunk-ED4UPEJX.js +0 -0
- package/dist/{chunk-J5IBSVB3.js → chunk-EUXOHTUK.js} +42 -25
- package/dist/{chunk-K5YT5GX2.js → chunk-FADNFPZO.js} +4 -4
- package/dist/{chunk-TIGKDMIA.js → chunk-FGOD5MQ4.js} +550 -69
- package/dist/{chunk-MDCKV2NF.js → chunk-HC5N3BDL.js} +2 -2
- package/dist/{chunk-GJBHOJCZ.js → chunk-I77RYPOH.js} +201 -2
- package/dist/{chunk-WS5LFFU3.js → chunk-JUWVAMRS.js} +333 -64
- package/dist/chunk-KGZBYWZ3.js +0 -0
- package/dist/chunk-KLBOWJ74.js +0 -0
- package/dist/chunk-KPIYENTF.js +0 -0
- package/dist/chunk-N5PM7HGQ.js +0 -0
- package/dist/chunk-NSTQ6QKD.js +0 -0
- package/dist/{chunk-HQQNLDVC.js → chunk-O3JEC2UJ.js} +8 -8
- package/dist/{chunk-TQ4S5AGJ.js → chunk-OHWN4JEL.js} +7 -5
- package/dist/{chunk-GSKRGF7B.js → chunk-R2W7A2UO.js} +4 -4
- package/dist/chunk-S42XV45P.js +0 -0
- package/dist/{chunk-PM3C2J6K.js → chunk-TUGKX5BD.js} +42 -25
- package/dist/{chunk-IFZ4MOTN.js → chunk-UG5N7ET3.js} +7 -5
- package/dist/{chunk-CYM5DCHI.js → chunk-VHTIHOHE.js} +87 -42
- package/dist/{chunk-AT346U23.js → chunk-VZJVKQHH.js} +1 -1
- package/dist/{chunk-FSCQXMGI.js → chunk-WT5HSFOU.js} +1 -0
- package/dist/connected-teams-IJUJQ7R6.js +0 -0
- package/dist/{coordinator-prompt-IPL4Z6SL.js → coordinator-prompt-2LD3C74O.js} +4 -4
- package/dist/{coordinator-prompt-2OWSUAUR.js → coordinator-prompt-FBX7Y4EM.js} +4 -4
- package/dist/cursor-recover-NOQYOFRF.js +0 -0
- package/dist/{global-workspace-NIKZAKOO.js → global-workspace-NG7SU3GV.js} +5 -5
- package/dist/{global-workspace-JDUCUL7S.js → global-workspace-OCV77UYF.js} +5 -5
- package/dist/index.cjs +1064 -187
- package/dist/index.d.cts +239 -62
- package/dist/index.d.ts +239 -62
- package/dist/index.js +144 -20
- package/dist/mcp/run-stdio.cjs +759 -170
- package/dist/mcp/run-stdio.js +46 -18
- package/dist/oauth-YJBAURIJ.js +0 -0
- package/dist/{orchestrator-KK3CUW37.js → orchestrator-4BEZJ2BU.js} +8 -8
- package/dist/{orchestrator-6I47JMU2.js → orchestrator-I2T44CRP.js} +9 -9
- package/dist/paths-QCI3MTO5.js +0 -0
- package/dist/plan-file-PHVKUAEE.js +0 -0
- package/dist/run-USF6FRKV.js +0 -0
- package/dist/{thread-store-FADXSMEJ.js → thread-store-57ZLHR3A.js} +1 -1
- package/dist/{thread-store-CRLQJ2HM.js → thread-store-WGASXXXR.js} +1 -1
- package/dist/title-4WAKWZRF.js +0 -0
- package/dist/{workspaces-5EWNNALF.js → workspaces-4FUQW5LD.js} +6 -6
- package/dist/{workspaces-KZA3TCEE.js → workspaces-PU5YHQ7Z.js} +6 -6
- package/dist/{worktree-MX7XBX6Z.js → worktree-GKLPPNWR.js} +3 -3
- package/dist/{worktree-BC6XDMQK.js → worktree-Z22HTSCU.js} +3 -3
- package/package.json +9 -8
- package/LICENSE +0 -190
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_GIT_ACTIONS,
|
|
3
3
|
BOARD_COLUMN_DEFS,
|
|
4
|
+
BUNDLED_LONG_RUNNING_PATH,
|
|
5
|
+
BUNDLED_SKILL_PREFIX,
|
|
6
|
+
CHARS_PER_CONTEXT_TOKEN,
|
|
4
7
|
CONTEXT_COMPACT_CHARS,
|
|
5
8
|
CONTEXT_KEEP_RECENT_CHARS,
|
|
6
9
|
CONTEXT_KEEP_RECENT_MESSAGES,
|
|
@@ -9,6 +12,9 @@ import {
|
|
|
9
12
|
HOME_BOARD_AGENT_HINT,
|
|
10
13
|
HOME_BOARD_CACHE_TTL_MS,
|
|
11
14
|
LEGACY_REVIEW_REQUEST_PATH,
|
|
15
|
+
LONG_RUNNING_SKILL_COMMAND,
|
|
16
|
+
OPTIONAL_SERVICES,
|
|
17
|
+
OPTIONAL_SERVICE_IDS,
|
|
12
18
|
Orchestrator,
|
|
13
19
|
REPO_REVIEW_NAME,
|
|
14
20
|
REPO_REVIEW_PATH,
|
|
@@ -26,6 +32,7 @@ import {
|
|
|
26
32
|
allocatePort,
|
|
27
33
|
allocatePortRange,
|
|
28
34
|
applyCompaction,
|
|
35
|
+
applyForwardOccupancy,
|
|
29
36
|
applyPromptCacheTtlEnv,
|
|
30
37
|
applyThreadIntoMain,
|
|
31
38
|
armSchedules,
|
|
@@ -44,7 +51,9 @@ import {
|
|
|
44
51
|
computeNextRunAt,
|
|
45
52
|
conductorDbPath,
|
|
46
53
|
confirmLand,
|
|
54
|
+
connectOptionalService,
|
|
47
55
|
connectSlackToken,
|
|
56
|
+
connectedOptionalServices,
|
|
48
57
|
copyConfiguredFiles,
|
|
49
58
|
createChatTab,
|
|
50
59
|
createPrStack,
|
|
@@ -56,11 +65,13 @@ import {
|
|
|
56
65
|
deleteSchedule,
|
|
57
66
|
desktopHostPidPath,
|
|
58
67
|
detectAgents,
|
|
68
|
+
disconnectOptionalService,
|
|
59
69
|
disconnectSlackWorkspace,
|
|
60
70
|
discoverSkills,
|
|
61
71
|
ensureReviewRequestFile,
|
|
62
72
|
ensureReviewSkillFile,
|
|
63
73
|
estimateMessageChars,
|
|
74
|
+
estimateOccupancyTokens,
|
|
64
75
|
estimateThreadChars,
|
|
65
76
|
expandComposerPrompt,
|
|
66
77
|
extractiveSummary,
|
|
@@ -76,7 +87,12 @@ import {
|
|
|
76
87
|
forkThreadWorktree,
|
|
77
88
|
formatAgentInstructions,
|
|
78
89
|
formatArtifactDirective,
|
|
90
|
+
formatDetachedJobInvoke,
|
|
91
|
+
formatLongRunningDirective,
|
|
92
|
+
formatLongRunningReminder,
|
|
79
93
|
formatMessagesAsTranscript,
|
|
94
|
+
formatOptionalServicesDirective,
|
|
95
|
+
formatOptionalServicesReminder,
|
|
80
96
|
formatProcessGuideDirective,
|
|
81
97
|
formatRenameBranchDirective,
|
|
82
98
|
formatScheduleWhen,
|
|
@@ -88,6 +104,8 @@ import {
|
|
|
88
104
|
formatUiReminder,
|
|
89
105
|
formatWorktreeDirective,
|
|
90
106
|
formatWorktreeReminder,
|
|
107
|
+
forwardContextUsage,
|
|
108
|
+
forwardOccupancyTokens,
|
|
91
109
|
getDefaultRunScript,
|
|
92
110
|
getDiff,
|
|
93
111
|
getDiffSummary,
|
|
@@ -108,6 +126,7 @@ import {
|
|
|
108
126
|
isCowboyThread,
|
|
109
127
|
isDesktopHostAlive,
|
|
110
128
|
isHomeBoardThread,
|
|
129
|
+
isOptionalServiceId,
|
|
111
130
|
isPidAlive,
|
|
112
131
|
isPrimaryCheckoutThread,
|
|
113
132
|
isSlackExternalReplyPrompt,
|
|
@@ -125,8 +144,12 @@ import {
|
|
|
125
144
|
listWorktreeFiles,
|
|
126
145
|
loadAgentInstructions,
|
|
127
146
|
maybeCompactContext,
|
|
147
|
+
normalizeServiceOrigin,
|
|
128
148
|
openPrStackLayers,
|
|
129
149
|
openStackLayer,
|
|
150
|
+
optionalServiceConnected,
|
|
151
|
+
optionalServiceSpec,
|
|
152
|
+
packagedDetachedJobPath,
|
|
130
153
|
parseDurationMs,
|
|
131
154
|
pendingSlackExternalReplies,
|
|
132
155
|
pollSlackOutboundWatches,
|
|
@@ -144,6 +167,7 @@ import {
|
|
|
144
167
|
requireAgent,
|
|
145
168
|
requireSlackWorkspace,
|
|
146
169
|
resolveConductorCursorAgentId,
|
|
170
|
+
resolveDetachedJobScript,
|
|
147
171
|
resolveFilesToCopy,
|
|
148
172
|
resolveReviewGuidelines,
|
|
149
173
|
resolveScheduleThreadId,
|
|
@@ -172,16 +196,18 @@ import {
|
|
|
172
196
|
syncBoardPins,
|
|
173
197
|
takenTeamSlugsForChatTab,
|
|
174
198
|
thisProcessShouldDrainAgentQueues,
|
|
199
|
+
threadHasCompactedContext,
|
|
175
200
|
threadsSharingWorktree,
|
|
176
201
|
updateSchedule,
|
|
177
202
|
upsertSlackWorkspace,
|
|
203
|
+
verifyOptionalService,
|
|
178
204
|
waitForPidExit,
|
|
179
205
|
withAgentInstructions,
|
|
180
206
|
worktreeBoardStatus,
|
|
181
207
|
worktreeCleanupSettings,
|
|
182
208
|
wrapReviewSkillMarkdown,
|
|
183
209
|
writeWorktreeFile
|
|
184
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-FGOD5MQ4.js";
|
|
185
211
|
import {
|
|
186
212
|
BRIGHTSY_MCP_ALLOWED_TOOLS,
|
|
187
213
|
CLAUDE_MODEL_CATALOG,
|
|
@@ -212,6 +238,7 @@ import {
|
|
|
212
238
|
getAdapter,
|
|
213
239
|
getAgentSetupInfo,
|
|
214
240
|
installAgent,
|
|
241
|
+
installNpmGlobalPackage,
|
|
215
242
|
isBrightsyConnected,
|
|
216
243
|
isBrightsyNdjsonLine,
|
|
217
244
|
isCursorAutoModel,
|
|
@@ -258,10 +285,11 @@ import {
|
|
|
258
285
|
toolFilePath,
|
|
259
286
|
totalTokens,
|
|
260
287
|
visibleToolRowDetail,
|
|
288
|
+
whichOnPath,
|
|
261
289
|
withEventParentId,
|
|
262
290
|
withEventsParentId,
|
|
263
291
|
writeInjectedMcpConfig
|
|
264
|
-
} from "./chunk-
|
|
292
|
+
} from "./chunk-VHTIHOHE.js";
|
|
265
293
|
import {
|
|
266
294
|
brightsyMcpServerName,
|
|
267
295
|
connectBrightsyTeam,
|
|
@@ -286,7 +314,7 @@ import {
|
|
|
286
314
|
listWorkspaces,
|
|
287
315
|
removeWorkspace,
|
|
288
316
|
syncWorkspacesFromThreads
|
|
289
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-HC5N3BDL.js";
|
|
290
318
|
import {
|
|
291
319
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
292
320
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
@@ -321,7 +349,7 @@ import {
|
|
|
321
349
|
stageAbsolutePathsAsAttachments,
|
|
322
350
|
stageBuffersAsAttachments,
|
|
323
351
|
takenTeamSlugsForOrchestration
|
|
324
|
-
} from "./chunk-
|
|
352
|
+
} from "./chunk-R2W7A2UO.js";
|
|
325
353
|
import {
|
|
326
354
|
COORDINATOR_TOOL_PLAYBOOK,
|
|
327
355
|
SLACK_REPLY_FORMATTING,
|
|
@@ -330,7 +358,7 @@ import {
|
|
|
330
358
|
enrichWorkspacesWithGithub,
|
|
331
359
|
ensureGlobalCoordinatorCwd,
|
|
332
360
|
formatWorkspaceInventory
|
|
333
|
-
} from "./chunk-
|
|
361
|
+
} from "./chunk-UG5N7ET3.js";
|
|
334
362
|
import {
|
|
335
363
|
ABLETIME_MCP_PATH,
|
|
336
364
|
DEFAULT_ABLETIME_HOST,
|
|
@@ -352,7 +380,7 @@ import {
|
|
|
352
380
|
taskUrl,
|
|
353
381
|
toAbleTimeIssueInfo,
|
|
354
382
|
verifyAbleTimeConnection
|
|
355
|
-
} from "./chunk-
|
|
383
|
+
} from "./chunk-VZJVKQHH.js";
|
|
356
384
|
import {
|
|
357
385
|
formatFetchError,
|
|
358
386
|
httpFetch,
|
|
@@ -378,7 +406,7 @@ import {
|
|
|
378
406
|
preferredCursorCostCents,
|
|
379
407
|
turnCostUsdFromCursorUsage,
|
|
380
408
|
withMaxOldSpaceSize
|
|
381
|
-
} from "./chunk-
|
|
409
|
+
} from "./chunk-WT5HSFOU.js";
|
|
382
410
|
import {
|
|
383
411
|
caffeinateHoldPath,
|
|
384
412
|
getCaffeinateHold,
|
|
@@ -467,7 +495,7 @@ import {
|
|
|
467
495
|
worktreeDisplayLabel,
|
|
468
496
|
worktreeDisplayLabelForGroup,
|
|
469
497
|
worktreeNameFromPath
|
|
470
|
-
} from "./chunk-
|
|
498
|
+
} from "./chunk-O3JEC2UJ.js";
|
|
471
499
|
import {
|
|
472
500
|
ATTACHMENTS_DIR,
|
|
473
501
|
LEGACY_ATTACHMENTS_DIR,
|
|
@@ -498,6 +526,7 @@ import {
|
|
|
498
526
|
deleteBranchOnPurgeEnabled,
|
|
499
527
|
disconnectAbleTimeConnection,
|
|
500
528
|
disconnectLinearConnection,
|
|
529
|
+
emptyPublicIntegrations,
|
|
501
530
|
ensureSlackDeviceIdentity,
|
|
502
531
|
getAbleTimeAccessToken,
|
|
503
532
|
getAbleTimeHost,
|
|
@@ -544,7 +573,7 @@ import {
|
|
|
544
573
|
updateDefaultsSettings,
|
|
545
574
|
updateIntegrationsSettings,
|
|
546
575
|
updateOpencodeSettings
|
|
547
|
-
} from "./chunk-
|
|
576
|
+
} from "./chunk-I77RYPOH.js";
|
|
548
577
|
import {
|
|
549
578
|
stripNestedElectronEnv
|
|
550
579
|
} from "./chunk-4TR3HZFT.js";
|
|
@@ -564,7 +593,7 @@ import {
|
|
|
564
593
|
updateThread,
|
|
565
594
|
withThreadLock,
|
|
566
595
|
writeThread
|
|
567
|
-
} from "./chunk-
|
|
596
|
+
} from "./chunk-TUGKX5BD.js";
|
|
568
597
|
import {
|
|
569
598
|
THINKING_EFFORTS,
|
|
570
599
|
isThinkingEffort,
|
|
@@ -1388,6 +1417,42 @@ async function listIssues(repoPath) {
|
|
|
1388
1417
|
};
|
|
1389
1418
|
}
|
|
1390
1419
|
|
|
1420
|
+
// src/integrations/optional-cli.ts
|
|
1421
|
+
async function detectOptionalServiceClis() {
|
|
1422
|
+
enrichPathWithNpmGlobalBin();
|
|
1423
|
+
return Promise.all(
|
|
1424
|
+
OPTIONAL_SERVICES.map(async (spec) => {
|
|
1425
|
+
if (!spec.cli) {
|
|
1426
|
+
return { id: spec.id, cli: null, installed: false, path: null };
|
|
1427
|
+
}
|
|
1428
|
+
const path2 = await whichOnPath(spec.cli);
|
|
1429
|
+
return {
|
|
1430
|
+
id: spec.id,
|
|
1431
|
+
cli: spec.cli,
|
|
1432
|
+
installed: Boolean(path2),
|
|
1433
|
+
path: path2
|
|
1434
|
+
};
|
|
1435
|
+
})
|
|
1436
|
+
);
|
|
1437
|
+
}
|
|
1438
|
+
async function installOptionalServiceCli(id) {
|
|
1439
|
+
if (!isOptionalServiceId(id)) {
|
|
1440
|
+
return { ok: false, message: "Unknown optional service" };
|
|
1441
|
+
}
|
|
1442
|
+
const spec = optionalServiceSpec(id);
|
|
1443
|
+
if (!spec.cli || !spec.npmPackage) {
|
|
1444
|
+
return {
|
|
1445
|
+
ok: false,
|
|
1446
|
+
message: `${spec.label} has no CLI to install. Use the HTTP API with the stored token.`
|
|
1447
|
+
};
|
|
1448
|
+
}
|
|
1449
|
+
return installNpmGlobalPackage({
|
|
1450
|
+
npmPackage: spec.npmPackage,
|
|
1451
|
+
installCommand: `npm install -g ${spec.npmPackage}`,
|
|
1452
|
+
cliBin: spec.cli
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1391
1456
|
// src/composer/diff-comment.ts
|
|
1392
1457
|
function lineRangeLabel(lines) {
|
|
1393
1458
|
const nos = lines.map((l) => l.lineNo);
|
|
@@ -1627,6 +1692,27 @@ function mcpWaitFinishedHint(status) {
|
|
|
1627
1692
|
return void 0;
|
|
1628
1693
|
}
|
|
1629
1694
|
|
|
1695
|
+
// src/mcp/thread-visibility.ts
|
|
1696
|
+
function lastMessagePreview(messages, max = 160) {
|
|
1697
|
+
if (!messages?.length) return null;
|
|
1698
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
1699
|
+
const text5 = messages[i]?.text?.trim();
|
|
1700
|
+
if (!text5) continue;
|
|
1701
|
+
const flat = text5.replace(/\s+/g, " ");
|
|
1702
|
+
return flat.length > max ? `${flat.slice(0, max)}\u2026` : flat;
|
|
1703
|
+
}
|
|
1704
|
+
return null;
|
|
1705
|
+
}
|
|
1706
|
+
function childThreadRefs(parentId, threads) {
|
|
1707
|
+
return threads.filter((t) => t.parentThreadId === parentId).map((t) => ({
|
|
1708
|
+
id: t.id,
|
|
1709
|
+
title: t.title,
|
|
1710
|
+
status: t.status,
|
|
1711
|
+
agent: t.agent,
|
|
1712
|
+
lastText: lastMessagePreview(t.messages, 120)
|
|
1713
|
+
}));
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1630
1716
|
// src/mcp/slack-tools.ts
|
|
1631
1717
|
import { z } from "zod";
|
|
1632
1718
|
|
|
@@ -1873,14 +1959,14 @@ function fail(err) {
|
|
|
1873
1959
|
function registerSlackTools(server) {
|
|
1874
1960
|
server.tool(
|
|
1875
1961
|
"list_teams",
|
|
1876
|
-
"List Slack workspaces connected in
|
|
1962
|
+
"List Slack workspaces connected in Settings \u2192 Remote. Each row is team_id + name. Pass team_id to slack_list_channels, slack_list_users, slack_search, slack_read, slack_post, and slack_replies.",
|
|
1877
1963
|
{},
|
|
1878
1964
|
async () => {
|
|
1879
1965
|
const teams = listSlackWorkspaces();
|
|
1880
1966
|
if (teams.length === 0) {
|
|
1881
1967
|
return text({
|
|
1882
1968
|
teams: [],
|
|
1883
|
-
hint: "No Slack workspaces connected. Add one in
|
|
1969
|
+
hint: "No Slack workspaces connected. Add one in Settings \u2192 Remote \u2192 Slack (paste xoxb-/xoxp- or browser sign-in)."
|
|
1884
1970
|
});
|
|
1885
1971
|
}
|
|
1886
1972
|
return text({
|
|
@@ -2901,7 +2987,7 @@ async function startMcpServer() {
|
|
|
2901
2987
|
);
|
|
2902
2988
|
}
|
|
2903
2989
|
try {
|
|
2904
|
-
const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-
|
|
2990
|
+
const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-WJDCJFSY.js");
|
|
2905
2991
|
orch.setMaxConcurrent(maxConcurrentAgents2());
|
|
2906
2992
|
} catch {
|
|
2907
2993
|
}
|
|
@@ -2940,15 +3026,19 @@ async function startMcpServer() {
|
|
|
2940
3026
|
);
|
|
2941
3027
|
server.tool(
|
|
2942
3028
|
"list_threads",
|
|
2943
|
-
"List Sideboard threads across all workspaces (one summary line each \u2014 token-frugal). Each line ends with sideboard://thread/<id> \u2014 use that URL in markdown links so the UI can open the chat.",
|
|
3029
|
+
"List Sideboard threads across all workspaces (one summary line each \u2014 token-frugal). Includes parent id, last message preview, and live progress so you can see worktree children. Each line ends with sideboard://thread/<id> \u2014 use that URL in markdown links so the UI can open the chat.",
|
|
2944
3030
|
{},
|
|
2945
3031
|
async () => {
|
|
2946
3032
|
const threads = orch.getThreads(true);
|
|
2947
3033
|
const lines = threads.map((t) => {
|
|
2948
3034
|
const repo = t.repoPath === GLOBAL_WORKSPACE_ID ? "Orchestration" : basename(t.repoPath) || t.repoPath;
|
|
2949
3035
|
const live = t.status === "running" || t.status === "queued" ? readTurnLive(t.id) : null;
|
|
3036
|
+
const parent = t.parentThreadId ? ` parent:${t.parentThreadId.slice(0, 8)}` : "";
|
|
3037
|
+
const preview = lastMessagePreview(t.messages, 80);
|
|
3038
|
+
const previewBit = preview ? ` ${preview}` : "";
|
|
3039
|
+
const err = t.lastError ? ` error:${t.lastError.replace(/\s+/g, " ").slice(0, 60)}` : "";
|
|
2950
3040
|
const progress = live?.summary ? ` ${live.summary}` : "";
|
|
2951
|
-
return `${t.id.slice(0, 8)} ${t.status.padEnd(9)} ${t.agent.padEnd(8)} ${repo} ${t.sourceType}:${t.sourceRef} ${t.title} sideboard://thread/${t.id}${t.devPort ? ` http://localhost:${t.devPort}` : ""}${progress}`;
|
|
3041
|
+
return `${t.id.slice(0, 8)} ${t.status.padEnd(9)} ${t.agent.padEnd(8)} ${repo} ${t.sourceType}:${t.sourceRef} ${t.title}${parent}${previewBit}${err} sideboard://thread/${t.id}${t.devPort ? ` http://localhost:${t.devPort}` : ""}${progress}`;
|
|
2952
3042
|
});
|
|
2953
3043
|
return {
|
|
2954
3044
|
content: [{ type: "text", text: lines.join("\n") || "(no threads)" }]
|
|
@@ -3002,7 +3092,7 @@ async function startMcpServer() {
|
|
|
3002
3092
|
);
|
|
3003
3093
|
server.tool(
|
|
3004
3094
|
"get_thread",
|
|
3005
|
-
"Get a compact thread summary by id/ref. While running, includes progress (last tool/thinking) and lastActivityAt. Includes usage (thread billed token + costUsd totals when providers reported cost) and lastTurnUsage.",
|
|
3095
|
+
"Get a compact thread summary by id/ref. Includes last message preview, parentThreadId, and child worktree threads (status + lastText). While running, includes progress (last tool/thinking) and lastActivityAt. Includes usage (thread billed token + costUsd totals when providers reported cost) and lastTurnUsage.",
|
|
3006
3096
|
{ ref: z5.string() },
|
|
3007
3097
|
async ({ ref }) => {
|
|
3008
3098
|
const t = orch.getThread(ref);
|
|
@@ -3021,8 +3111,11 @@ async function startMcpServer() {
|
|
|
3021
3111
|
branchName: t.branchName,
|
|
3022
3112
|
worktreePath: t.worktreePath,
|
|
3023
3113
|
sessionId: t.sessionId,
|
|
3114
|
+
parentThreadId: t.parentThreadId,
|
|
3115
|
+
children: childThreadRefs(t.id, orch.getThreads(false)),
|
|
3024
3116
|
queueLength: t.queue.length,
|
|
3025
3117
|
messageCount: t.messages.length,
|
|
3118
|
+
lastText: lastMessagePreview(t.messages, 240),
|
|
3026
3119
|
devPort: t.devPort,
|
|
3027
3120
|
prUrl: t.prUrl,
|
|
3028
3121
|
lastError: t.lastError ?? null,
|
|
@@ -3176,7 +3269,7 @@ async function startMcpServer() {
|
|
|
3176
3269
|
registerAbleTimeTools(server);
|
|
3177
3270
|
registerScheduleTools(server);
|
|
3178
3271
|
const { getCaffeinateHold: getCaffeinateHold2, setCaffeinateHold: setCaffeinateHold2 } = await import("./caffeinate-hold-X3JNPR42.js");
|
|
3179
|
-
const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-
|
|
3272
|
+
const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-WJDCJFSY.js");
|
|
3180
3273
|
const accountDefaults = resolveThreadDefaults2();
|
|
3181
3274
|
const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
|
|
3182
3275
|
server.tool(
|
|
@@ -3353,7 +3446,7 @@ async function startMcpServer() {
|
|
|
3353
3446
|
);
|
|
3354
3447
|
server.tool(
|
|
3355
3448
|
"send_to_thread",
|
|
3356
|
-
'Queue a prompt on a worktree thread chat (runs under concurrency cap). Use after create_thread to start or continue a conversation. For commit/push/PR, prefer ask_git (canonical desktop-button phrases). Send "Merge PR." / ask_git merge only when the user explicitly asked to merge.
|
|
3449
|
+
'Queue a prompt on a worktree thread chat (runs under concurrency cap). Use after create_thread to start or continue a conversation. For commit/push/PR, prefer ask_git (canonical desktop-button phrases). Send "Merge PR." / ask_git merge only when the user explicitly asked to merge. force_stop=true kills the in-flight turn and clears the queue before this prompt \u2014 only when the current request is wrong and must be replaced. Do not force_stop to check in, resume after a halt notice, or because wait_for_turn returned stillRunning; that stops the child mid-thought. Call wait_for_turn again instead.',
|
|
3357
3450
|
{
|
|
3358
3451
|
ref: z5.string(),
|
|
3359
3452
|
prompt: z5.string(),
|
|
@@ -3363,7 +3456,7 @@ async function startMcpServer() {
|
|
|
3363
3456
|
if (force_stop) {
|
|
3364
3457
|
const existing = orch.getThread(ref);
|
|
3365
3458
|
if (existing) {
|
|
3366
|
-
orch.stop(ref, { clearQueue: true });
|
|
3459
|
+
orch.stop(ref, { clearQueue: true, notifyParent: false });
|
|
3367
3460
|
}
|
|
3368
3461
|
}
|
|
3369
3462
|
const thread = await orch.send(ref, prompt);
|
|
@@ -4557,7 +4650,7 @@ function slackOAuthCredentials() {
|
|
|
4557
4650
|
const clientSecret = process.env.SIDEBOARD_SLACK_CLIENT_SECRET?.trim() || settings.integrations.slackClientSecret?.trim() || "";
|
|
4558
4651
|
if (!clientId) {
|
|
4559
4652
|
throw new Error(
|
|
4560
|
-
"Slack browser sign-in needs a Slack app Client ID (
|
|
4653
|
+
"Slack browser sign-in needs a Slack app Client ID (Settings \u2192 Remote \u2192 Slack, or SIDEBOARD_SLACK_CLIENT_ID). You can still paste an xoxb- or xoxp- token."
|
|
4561
4654
|
);
|
|
4562
4655
|
}
|
|
4563
4656
|
return { clientId, clientSecret: clientSecret || null };
|
|
@@ -6302,7 +6395,10 @@ export {
|
|
|
6302
6395
|
ATTACHMENTS_DIR,
|
|
6303
6396
|
BAKED_SLACK_RELAY_URL,
|
|
6304
6397
|
BRIGHTSY_MCP_ALLOWED_TOOLS,
|
|
6398
|
+
BUNDLED_LONG_RUNNING_PATH,
|
|
6399
|
+
BUNDLED_SKILL_PREFIX,
|
|
6305
6400
|
BrightsySideboardApi,
|
|
6401
|
+
CHARS_PER_CONTEXT_TOKEN,
|
|
6306
6402
|
CLAUDE_MODEL_CATALOG,
|
|
6307
6403
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
6308
6404
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
@@ -6329,8 +6425,11 @@ export {
|
|
|
6329
6425
|
LINEAR_OAUTH_PORT,
|
|
6330
6426
|
LINEAR_OAUTH_REDIRECT,
|
|
6331
6427
|
LINEAR_OAUTH_SCOPES,
|
|
6428
|
+
LONG_RUNNING_SKILL_COMMAND,
|
|
6332
6429
|
LinearOAuthCancelledError,
|
|
6333
6430
|
MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
|
|
6431
|
+
OPTIONAL_SERVICES,
|
|
6432
|
+
OPTIONAL_SERVICE_IDS,
|
|
6334
6433
|
ORCHESTRATOR_AGENT_KINDS,
|
|
6335
6434
|
Orchestrator,
|
|
6336
6435
|
PASTE_ATTACH_MIN_CHARS,
|
|
@@ -6385,6 +6484,7 @@ export {
|
|
|
6385
6484
|
applyAgentRunnerHeapEnv,
|
|
6386
6485
|
applyAppEnvironment,
|
|
6387
6486
|
applyCompaction,
|
|
6487
|
+
applyForwardOccupancy,
|
|
6388
6488
|
applyGithubGitAuthEnv,
|
|
6389
6489
|
applyPromptCacheTtlEnv,
|
|
6390
6490
|
applyThreadIntoMain,
|
|
@@ -6448,7 +6548,9 @@ export {
|
|
|
6448
6548
|
conductorDbPath,
|
|
6449
6549
|
confirmLand,
|
|
6450
6550
|
connectBrightsyTeam,
|
|
6551
|
+
connectOptionalService,
|
|
6451
6552
|
connectSlackToken,
|
|
6553
|
+
connectedOptionalServices,
|
|
6452
6554
|
contextTokens,
|
|
6453
6555
|
coordinatorSystemPrompt,
|
|
6454
6556
|
coordinatorTurnReminder,
|
|
@@ -6479,13 +6581,16 @@ export {
|
|
|
6479
6581
|
detectAgents,
|
|
6480
6582
|
detectGhStack,
|
|
6481
6583
|
detectLocalMergeConflicts,
|
|
6584
|
+
detectOptionalServiceClis,
|
|
6482
6585
|
disconnectAbleTimeConnection,
|
|
6483
6586
|
disconnectBrightsyTeam,
|
|
6484
6587
|
disconnectLinear,
|
|
6485
6588
|
disconnectLinearConnection,
|
|
6589
|
+
disconnectOptionalService,
|
|
6486
6590
|
disconnectSlackWorkspace,
|
|
6487
6591
|
discoverSkills,
|
|
6488
6592
|
dropCachedPrefixOnResume,
|
|
6593
|
+
emptyPublicIntegrations,
|
|
6489
6594
|
encodeBrightsyTarget,
|
|
6490
6595
|
enrichPathWithNpmGlobalBin,
|
|
6491
6596
|
enrichWorkspacesWithGithub,
|
|
@@ -6502,6 +6607,7 @@ export {
|
|
|
6502
6607
|
ensureSlackDeviceIdentity,
|
|
6503
6608
|
ensureWorkspace,
|
|
6504
6609
|
estimateMessageChars,
|
|
6610
|
+
estimateOccupancyTokens,
|
|
6505
6611
|
estimateThreadChars,
|
|
6506
6612
|
expandComposerPrompt,
|
|
6507
6613
|
extractGhErrorDetail,
|
|
@@ -6525,12 +6631,17 @@ export {
|
|
|
6525
6631
|
formatAgentInstructions,
|
|
6526
6632
|
formatArtifactDirective,
|
|
6527
6633
|
formatBrightsyFetchError,
|
|
6634
|
+
formatDetachedJobInvoke,
|
|
6528
6635
|
formatFetchError,
|
|
6529
6636
|
formatGhLandError,
|
|
6530
6637
|
formatGitAuthModeDirective,
|
|
6531
6638
|
formatIpcInvokeError,
|
|
6639
|
+
formatLongRunningDirective,
|
|
6640
|
+
formatLongRunningReminder,
|
|
6532
6641
|
formatMergePrError,
|
|
6533
6642
|
formatMessagesAsTranscript,
|
|
6643
|
+
formatOptionalServicesDirective,
|
|
6644
|
+
formatOptionalServicesReminder,
|
|
6534
6645
|
formatPlanQuestionAnswers,
|
|
6535
6646
|
formatPlanQuestionsForChat,
|
|
6536
6647
|
formatProcessGuideDirective,
|
|
@@ -6549,6 +6660,8 @@ export {
|
|
|
6549
6660
|
formatWorkspaceInventory,
|
|
6550
6661
|
formatWorktreeDirective,
|
|
6551
6662
|
formatWorktreeReminder,
|
|
6663
|
+
forwardContextUsage,
|
|
6664
|
+
forwardOccupancyTokens,
|
|
6552
6665
|
fromInclusiveInputUsage,
|
|
6553
6666
|
getAbleTimeAccessToken,
|
|
6554
6667
|
getAbleTimeHost,
|
|
@@ -6611,6 +6724,8 @@ export {
|
|
|
6611
6724
|
initializeGitRepository,
|
|
6612
6725
|
inspectGitWorktree,
|
|
6613
6726
|
installAgent,
|
|
6727
|
+
installNpmGlobalPackage,
|
|
6728
|
+
installOptionalServiceCli,
|
|
6614
6729
|
interruptSlackCoordinatorForInbound,
|
|
6615
6730
|
invalidateThreadListCache,
|
|
6616
6731
|
isAbleTimeConnected,
|
|
@@ -6634,6 +6749,7 @@ export {
|
|
|
6634
6749
|
isIssueSourceConnected,
|
|
6635
6750
|
isLinearConnected,
|
|
6636
6751
|
isLinearOAuthCancelled,
|
|
6752
|
+
isOptionalServiceId,
|
|
6637
6753
|
isOrchestratorCapableAgent,
|
|
6638
6754
|
isOrchestratorThread,
|
|
6639
6755
|
isPidAlive,
|
|
@@ -6722,6 +6838,7 @@ export {
|
|
|
6722
6838
|
nonInteractiveGitProcessEnv,
|
|
6723
6839
|
normalizeAbleTimeHost,
|
|
6724
6840
|
normalizeParseResult,
|
|
6841
|
+
normalizeServiceOrigin,
|
|
6725
6842
|
normalizeThinkingEffort,
|
|
6726
6843
|
normalizeThread,
|
|
6727
6844
|
normalizeTurnInput,
|
|
@@ -6730,11 +6847,14 @@ export {
|
|
|
6730
6847
|
openPrStackLayers,
|
|
6731
6848
|
openStackLayer,
|
|
6732
6849
|
opencodeAdapter,
|
|
6850
|
+
optionalServiceConnected,
|
|
6851
|
+
optionalServiceSpec,
|
|
6733
6852
|
orchestrationQuotaFallbackAgent,
|
|
6734
6853
|
orchestrationQuotaOnLimit,
|
|
6735
6854
|
orchestrationTitleNeedsSoccerNickname,
|
|
6736
6855
|
orchestratorSessionPoisonedByBuiltins,
|
|
6737
6856
|
originGhRepoEnv,
|
|
6857
|
+
packagedDetachedJobPath,
|
|
6738
6858
|
parseCursorRunnerLine,
|
|
6739
6859
|
parseDurationMs,
|
|
6740
6860
|
parseForceStopMessage,
|
|
@@ -6792,6 +6912,7 @@ export {
|
|
|
6792
6912
|
resolveConductorCursorAgentId,
|
|
6793
6913
|
resolveCursorModelId,
|
|
6794
6914
|
resolveDefaultBranch,
|
|
6915
|
+
resolveDetachedJobScript,
|
|
6795
6916
|
resolveDiffBaseRef,
|
|
6796
6917
|
resolveEffectiveIssueSource,
|
|
6797
6918
|
resolveFilesToCopy,
|
|
@@ -6890,6 +7011,7 @@ export {
|
|
|
6890
7011
|
thisProcessShouldDrainAgentQueues,
|
|
6891
7012
|
threadDisplayLabel,
|
|
6892
7013
|
threadFilePath,
|
|
7014
|
+
threadHasCompactedContext,
|
|
6893
7015
|
threadLivePath,
|
|
6894
7016
|
threadLockPath,
|
|
6895
7017
|
threadRequestsBrightsyMcp,
|
|
@@ -6919,9 +7041,11 @@ export {
|
|
|
6919
7041
|
userCursorMcpConfigPath,
|
|
6920
7042
|
validateLinearApiKey,
|
|
6921
7043
|
verifyAbleTimeConnection,
|
|
7044
|
+
verifyOptionalService,
|
|
6922
7045
|
visibleToolRowDetail,
|
|
6923
7046
|
waitForPidExit,
|
|
6924
7047
|
warmGithubAgentAuth,
|
|
7048
|
+
whichOnPath,
|
|
6925
7049
|
withAgentInstructions,
|
|
6926
7050
|
withEventParentId,
|
|
6927
7051
|
withEventsParentId,
|