@sideboard-ai/core 0.1.61 → 0.1.66
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-B2723EOF.js → agents-EWFD765A.js} +23 -7
- package/dist/{agents-EADRAAPG.js → agents-MD7SCFYX.js} +23 -7
- package/dist/{app-settings-YBNZ4XSR.js → app-settings-GJVZGU3M.js} +15 -3
- package/dist/{app-settings-TBHTJWLQ.js → app-settings-ONKMFSEJ.js} +15 -3
- package/dist/{chunk-RIWUU7FO.js → chunk-5AG5BUQN.js} +61 -3
- package/dist/{chunk-HLEX5AQ6.js → chunk-7FD7COKE.js} +4 -0
- package/dist/{chunk-XWPKLRB3.js → chunk-AKPEXIKK.js} +2 -2
- package/dist/{chunk-MX7UH5AT.js → chunk-BBEH2CJE.js} +264 -93
- package/dist/{chunk-FGNBTFRD.js → chunk-BPOTVI5J.js} +125 -3
- package/dist/{chunk-CHGOMFTA.js → chunk-DNPP7QMK.js} +32 -7
- package/dist/{chunk-MBAL5FE6.js → chunk-DZYMNW2A.js} +4 -4
- package/dist/{chunk-JB2H7E7V.js → chunk-EVD4KNKR.js} +1 -1
- package/dist/{chunk-TSRXOSVD.js → chunk-FWJYLBO6.js} +4 -0
- package/dist/{chunk-QJBC4BRK.js → chunk-HTOTTJJX.js} +2 -2
- package/dist/{chunk-MFGGIRUA.js → chunk-I2KGRAXC.js} +2 -2
- package/dist/{chunk-ZXDOI6IH.js → chunk-IFAU2DEY.js} +269 -93
- package/dist/{chunk-NTYRBRE7.js → chunk-LRBRQFBU.js} +2 -2
- package/dist/{chunk-75QR74KM.js → chunk-MHR4OGZ4.js} +125 -3
- package/dist/{chunk-2P2UK7E7.js → chunk-PESJDZTB.js} +2 -2
- package/dist/{chunk-P7EQUFB6.js → chunk-R7GUDEPY.js} +2 -2
- package/dist/{chunk-73AT5K4A.js → chunk-TXQ6K2GR.js} +61 -3
- package/dist/{chunk-MLAST5BB.js → chunk-YTNLOJPK.js} +32 -7
- package/dist/{connected-teams-RSL4VB3X.js → connected-teams-CHXO5FFA.js} +2 -2
- package/dist/{connected-teams-MKIYKOYA.js → connected-teams-GJTESSTX.js} +2 -2
- package/dist/{coordinator-prompt-4P23VVFC.js → coordinator-prompt-E5UGSJES.js} +5 -5
- package/dist/{coordinator-prompt-LNWHZ64D.js → coordinator-prompt-ILSULI7C.js} +5 -5
- package/dist/{global-workspace-TMMAVRVW.js → global-workspace-44UG64NA.js} +6 -7
- package/dist/{global-workspace-BHT4XUAA.js → global-workspace-5PM5LA6E.js} +6 -7
- package/dist/index.cjs +1433 -944
- package/dist/index.d.cts +117 -2
- package/dist/index.d.ts +117 -2
- package/dist/index.js +859 -736
- package/dist/mcp/run-stdio.cjs +1388 -993
- package/dist/mcp/run-stdio.js +798 -765
- package/dist/{run-HZTBWGQR.js → run-74S2NZWB.js} +1 -1
- package/dist/{run-GPSVV5OH.js → run-JLN5JK7Q.js} +1 -1
- package/dist/{thread-store-GHOADGL2.js → thread-store-BUBR24YA.js} +1 -1
- package/dist/{thread-store-UJIGMI5J.js → thread-store-XTPFCJAI.js} +1 -1
- package/dist/{workspaces-3GO3EDQG.js → workspaces-OVBCSS5Y.js} +7 -8
- package/dist/{workspaces-GFPGDGCS.js → workspaces-RXFXQRRF.js} +7 -8
- package/dist/{worktree-GBLHEFHR.js → worktree-K2JB53R5.js} +3 -3
- package/dist/{worktree-3L2G6PCM.js → worktree-S2N63FLV.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-GI7E5733.js +0 -30
- package/dist/chunk-S2LL5HA4.js +0 -33
|
@@ -48,16 +48,33 @@ var CLOUD_CONNECT_AGENTS = /* @__PURE__ */ new Set([
|
|
|
48
48
|
"opencode",
|
|
49
49
|
"cursor"
|
|
50
50
|
]);
|
|
51
|
+
function normalizeCliExecutable(raw) {
|
|
52
|
+
if (!raw || typeof raw !== "object") return {};
|
|
53
|
+
const source = raw;
|
|
54
|
+
const out = {};
|
|
55
|
+
if (typeof source.executablePath === "string") {
|
|
56
|
+
const path = source.executablePath.trim();
|
|
57
|
+
if (path) out.executablePath = path;
|
|
58
|
+
}
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
51
61
|
function normalizeBrightsy(raw) {
|
|
52
62
|
if (!raw || typeof raw !== "object") return {};
|
|
53
63
|
const source = raw;
|
|
54
64
|
const out = {};
|
|
65
|
+
if (typeof source.executablePath === "string") {
|
|
66
|
+
const path = source.executablePath.trim();
|
|
67
|
+
if (path) out.executablePath = path;
|
|
68
|
+
}
|
|
55
69
|
if (typeof source.cloudConnectEnabled === "boolean") {
|
|
56
70
|
out.cloudConnectEnabled = source.cloudConnectEnabled;
|
|
57
71
|
}
|
|
58
72
|
if (typeof source.cloudConnectAgent === "string" && CLOUD_CONNECT_AGENTS.has(source.cloudConnectAgent)) {
|
|
59
73
|
out.cloudConnectAgent = source.cloudConnectAgent;
|
|
60
74
|
}
|
|
75
|
+
if (typeof source.injectWorktreeMcp === "boolean") {
|
|
76
|
+
out.injectWorktreeMcp = source.injectWorktreeMcp;
|
|
77
|
+
}
|
|
61
78
|
return out;
|
|
62
79
|
}
|
|
63
80
|
var ISSUE_SOURCES = /* @__PURE__ */ new Set(["linear", "github"]);
|
|
@@ -112,6 +129,9 @@ function normalizeAdvanced(raw) {
|
|
|
112
129
|
if (typeof source.deleteBranchOnPurge === "boolean") {
|
|
113
130
|
out.deleteBranchOnPurge = source.deleteBranchOnPurge;
|
|
114
131
|
}
|
|
132
|
+
if (typeof source.autoArchiveOnMerge === "boolean") {
|
|
133
|
+
out.autoArchiveOnMerge = source.autoArchiveOnMerge;
|
|
134
|
+
}
|
|
115
135
|
if (typeof source.maxConcurrent === "number" && Number.isFinite(source.maxConcurrent)) {
|
|
116
136
|
out.maxConcurrent = Math.max(1, Math.min(32, Math.floor(source.maxConcurrent)));
|
|
117
137
|
}
|
|
@@ -141,6 +161,8 @@ function normalizeAdvanced(raw) {
|
|
|
141
161
|
function normalizeSettings(raw) {
|
|
142
162
|
const env = {};
|
|
143
163
|
let claude = {};
|
|
164
|
+
let codex = {};
|
|
165
|
+
let opencode = {};
|
|
144
166
|
let brightsy = {};
|
|
145
167
|
let integrations = {};
|
|
146
168
|
let defaults = {};
|
|
@@ -159,6 +181,12 @@ function normalizeSettings(raw) {
|
|
|
159
181
|
if ("claude" in raw) {
|
|
160
182
|
claude = normalizeClaude(raw.claude);
|
|
161
183
|
}
|
|
184
|
+
if ("codex" in raw) {
|
|
185
|
+
codex = normalizeCliExecutable(raw.codex);
|
|
186
|
+
}
|
|
187
|
+
if ("opencode" in raw) {
|
|
188
|
+
opencode = normalizeCliExecutable(raw.opencode);
|
|
189
|
+
}
|
|
162
190
|
if ("brightsy" in raw) {
|
|
163
191
|
brightsy = normalizeBrightsy(raw.brightsy);
|
|
164
192
|
}
|
|
@@ -174,11 +202,22 @@ function normalizeSettings(raw) {
|
|
|
174
202
|
advanced = normalizeAdvanced(raw.advanced);
|
|
175
203
|
}
|
|
176
204
|
}
|
|
177
|
-
return {
|
|
205
|
+
return {
|
|
206
|
+
environment: env,
|
|
207
|
+
claude,
|
|
208
|
+
codex,
|
|
209
|
+
opencode,
|
|
210
|
+
brightsy,
|
|
211
|
+
integrations,
|
|
212
|
+
defaults,
|
|
213
|
+
advanced
|
|
214
|
+
};
|
|
178
215
|
}
|
|
179
216
|
var EMPTY_SETTINGS = {
|
|
180
217
|
environment: {},
|
|
181
218
|
claude: {},
|
|
219
|
+
codex: {},
|
|
220
|
+
opencode: {},
|
|
182
221
|
brightsy: {},
|
|
183
222
|
integrations: {},
|
|
184
223
|
defaults: {},
|
|
@@ -235,6 +274,13 @@ function updateClaudeSettings(patch) {
|
|
|
235
274
|
function updateBrightsySettings(patch) {
|
|
236
275
|
const current = loadAppSettings();
|
|
237
276
|
const brightsy = { ...current.brightsy };
|
|
277
|
+
if ("executablePath" in patch) {
|
|
278
|
+
if (patch.executablePath == null || patch.executablePath.trim() === "") {
|
|
279
|
+
delete brightsy.executablePath;
|
|
280
|
+
} else {
|
|
281
|
+
brightsy.executablePath = patch.executablePath.trim();
|
|
282
|
+
}
|
|
283
|
+
}
|
|
238
284
|
if (typeof patch.cloudConnectEnabled === "boolean") {
|
|
239
285
|
brightsy.cloudConnectEnabled = patch.cloudConnectEnabled;
|
|
240
286
|
}
|
|
@@ -245,8 +291,35 @@ function updateBrightsySettings(patch) {
|
|
|
245
291
|
brightsy.cloudConnectAgent = patch.cloudConnectAgent;
|
|
246
292
|
}
|
|
247
293
|
}
|
|
294
|
+
if (typeof patch.injectWorktreeMcp === "boolean") {
|
|
295
|
+
brightsy.injectWorktreeMcp = patch.injectWorktreeMcp;
|
|
296
|
+
}
|
|
248
297
|
return saveAppSettings({ ...current, brightsy });
|
|
249
298
|
}
|
|
299
|
+
function updateCodexSettings(patch) {
|
|
300
|
+
const current = loadAppSettings();
|
|
301
|
+
const codex = { ...current.codex };
|
|
302
|
+
if ("executablePath" in patch) {
|
|
303
|
+
if (patch.executablePath == null || patch.executablePath.trim() === "") {
|
|
304
|
+
delete codex.executablePath;
|
|
305
|
+
} else {
|
|
306
|
+
codex.executablePath = patch.executablePath.trim();
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return saveAppSettings({ ...current, codex });
|
|
310
|
+
}
|
|
311
|
+
function updateOpencodeSettings(patch) {
|
|
312
|
+
const current = loadAppSettings();
|
|
313
|
+
const opencode = { ...current.opencode };
|
|
314
|
+
if ("executablePath" in patch) {
|
|
315
|
+
if (patch.executablePath == null || patch.executablePath.trim() === "") {
|
|
316
|
+
delete opencode.executablePath;
|
|
317
|
+
} else {
|
|
318
|
+
opencode.executablePath = patch.executablePath.trim();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
return saveAppSettings({ ...current, opencode });
|
|
322
|
+
}
|
|
250
323
|
function updateIntegrationsSettings(patch) {
|
|
251
324
|
const current = loadAppSettings();
|
|
252
325
|
const integrations = { ...current.integrations };
|
|
@@ -354,6 +427,9 @@ function getLinearApiKey(settings = loadAppSettings()) {
|
|
|
354
427
|
function brightsyCloudConnectEnabled(settings = loadAppSettings()) {
|
|
355
428
|
return Boolean(settings.brightsy.cloudConnectEnabled);
|
|
356
429
|
}
|
|
430
|
+
function brightsyInjectWorktreeMcpEnabled(settings = loadAppSettings()) {
|
|
431
|
+
return Boolean(settings.brightsy.injectWorktreeMcp);
|
|
432
|
+
}
|
|
357
433
|
function brightsyCloudConnectAgent(settings = loadAppSettings()) {
|
|
358
434
|
const fallback = settings.brightsy.cloudConnectAgent && CLOUD_CONNECT_AGENTS.has(settings.brightsy.cloudConnectAgent) ? settings.brightsy.cloudConnectAgent : "claude";
|
|
359
435
|
const preferred = getDefaultAgent(settings);
|
|
@@ -380,6 +456,9 @@ function updateAdvancedSettings(patch) {
|
|
|
380
456
|
if (typeof patch.deleteBranchOnPurge === "boolean") {
|
|
381
457
|
advanced.deleteBranchOnPurge = patch.deleteBranchOnPurge;
|
|
382
458
|
}
|
|
459
|
+
if (typeof patch.autoArchiveOnMerge === "boolean") {
|
|
460
|
+
advanced.autoArchiveOnMerge = patch.autoArchiveOnMerge;
|
|
461
|
+
}
|
|
383
462
|
if (typeof patch.maxConcurrent === "number" && Number.isFinite(patch.maxConcurrent)) {
|
|
384
463
|
advanced.maxConcurrent = Math.max(1, Math.min(32, Math.floor(patch.maxConcurrent)));
|
|
385
464
|
}
|
|
@@ -421,6 +500,9 @@ function caffeinateWhileCloudConnectEnabled(settings = loadAppSettings()) {
|
|
|
421
500
|
function deleteBranchOnPurgeEnabled(settings = loadAppSettings()) {
|
|
422
501
|
return Boolean(settings.advanced.deleteBranchOnPurge);
|
|
423
502
|
}
|
|
503
|
+
function autoArchiveOnMergeEnabled(settings = loadAppSettings()) {
|
|
504
|
+
return Boolean(settings.advanced.autoArchiveOnMerge);
|
|
505
|
+
}
|
|
424
506
|
function autoCleanupOrphansEnabled(settings = loadAppSettings()) {
|
|
425
507
|
return Boolean(settings.advanced.autoCleanupOrphans);
|
|
426
508
|
}
|
|
@@ -442,8 +524,42 @@ function maxConcurrentAgents(settings = loadAppSettings()) {
|
|
|
442
524
|
return 3;
|
|
443
525
|
}
|
|
444
526
|
function resolveClaudeExecutable(settings = loadAppSettings()) {
|
|
445
|
-
|
|
446
|
-
|
|
527
|
+
return resolveAgentExecutable("claude", settings);
|
|
528
|
+
}
|
|
529
|
+
var DEFAULT_CLI_BIN = {
|
|
530
|
+
claude: "claude",
|
|
531
|
+
codex: "codex",
|
|
532
|
+
opencode: "opencode",
|
|
533
|
+
brightsy: "brightsy"
|
|
534
|
+
};
|
|
535
|
+
function resolveAgentExecutable(agent, settings = loadAppSettings()) {
|
|
536
|
+
const fallback = DEFAULT_CLI_BIN[agent];
|
|
537
|
+
if (agent === "claude") {
|
|
538
|
+
const override2 = settings.claude.executablePath?.trim();
|
|
539
|
+
return override2 || fallback;
|
|
540
|
+
}
|
|
541
|
+
if (agent === "codex") {
|
|
542
|
+
const override2 = settings.codex.executablePath?.trim();
|
|
543
|
+
return override2 || fallback;
|
|
544
|
+
}
|
|
545
|
+
if (agent === "opencode") {
|
|
546
|
+
const override2 = settings.opencode.executablePath?.trim();
|
|
547
|
+
return override2 || fallback;
|
|
548
|
+
}
|
|
549
|
+
const override = settings.brightsy.executablePath?.trim();
|
|
550
|
+
return override || fallback;
|
|
551
|
+
}
|
|
552
|
+
function updateAgentExecutable(agent, executablePath) {
|
|
553
|
+
if (agent === "claude") {
|
|
554
|
+
return updateClaudeSettings({ executablePath });
|
|
555
|
+
}
|
|
556
|
+
if (agent === "codex") {
|
|
557
|
+
return updateCodexSettings({ executablePath });
|
|
558
|
+
}
|
|
559
|
+
if (agent === "opencode") {
|
|
560
|
+
return updateOpencodeSettings({ executablePath });
|
|
561
|
+
}
|
|
562
|
+
return updateBrightsySettings({ executablePath });
|
|
447
563
|
}
|
|
448
564
|
function claudeChromeEnabled(settings = loadAppSettings()) {
|
|
449
565
|
return Boolean(settings.claude.chromeEnabled);
|
|
@@ -481,6 +597,8 @@ export {
|
|
|
481
597
|
updateAppEnvironment,
|
|
482
598
|
updateClaudeSettings,
|
|
483
599
|
updateBrightsySettings,
|
|
600
|
+
updateCodexSettings,
|
|
601
|
+
updateOpencodeSettings,
|
|
484
602
|
updateIntegrationsSettings,
|
|
485
603
|
updateDefaultsSettings,
|
|
486
604
|
getDefaultAgent,
|
|
@@ -494,6 +612,7 @@ export {
|
|
|
494
612
|
resolveEffectiveIssueSource,
|
|
495
613
|
getLinearApiKey,
|
|
496
614
|
brightsyCloudConnectEnabled,
|
|
615
|
+
brightsyInjectWorktreeMcpEnabled,
|
|
497
616
|
brightsyCloudConnectAgent,
|
|
498
617
|
updateAdvancedSettings,
|
|
499
618
|
autoRenameBranchEnabled,
|
|
@@ -501,11 +620,14 @@ export {
|
|
|
501
620
|
caffeinateWhileRunningEnabled,
|
|
502
621
|
caffeinateWhileCloudConnectEnabled,
|
|
503
622
|
deleteBranchOnPurgeEnabled,
|
|
623
|
+
autoArchiveOnMergeEnabled,
|
|
504
624
|
autoCleanupOrphansEnabled,
|
|
505
625
|
orchestrationQuotaOnLimit,
|
|
506
626
|
orchestrationQuotaFallbackAgent,
|
|
507
627
|
maxConcurrentAgents,
|
|
508
628
|
resolveClaudeExecutable,
|
|
629
|
+
resolveAgentExecutable,
|
|
630
|
+
updateAgentExecutable,
|
|
509
631
|
claudeChromeEnabled,
|
|
510
632
|
applyAppEnvironment,
|
|
511
633
|
childEnvWithAppSettings,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isGlobalRepoPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YTNLOJPK.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureGhPreferOrigin,
|
|
6
6
|
resolveRepoRoot
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R7GUDEPY.js";
|
|
8
8
|
import {
|
|
9
9
|
appDataDir
|
|
10
10
|
} from "./chunk-M37RITA6.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-FKOIHGKV.js";
|
|
4
4
|
import {
|
|
5
5
|
listThreads
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FWJYLBO6.js";
|
|
7
7
|
import {
|
|
8
8
|
worktreesRoot
|
|
9
9
|
} from "./chunk-M37RITA6.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
gh,
|
|
12
12
|
git,
|
|
13
13
|
resolveGhAuthToken
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TXQ6K2GR.js";
|
|
15
15
|
|
|
16
16
|
// src/git/worktree.ts
|
|
17
17
|
import { existsSync, readdirSync } from "fs";
|
|
@@ -2,29 +2,45 @@
|
|
|
2
2
|
import { execa } from "execa";
|
|
3
3
|
|
|
4
4
|
// src/agents/path.ts
|
|
5
|
+
import { existsSync } from "fs";
|
|
6
|
+
import { execFileSync } from "child_process";
|
|
5
7
|
import { homedir } from "os";
|
|
6
|
-
import { delimiter } from "path";
|
|
8
|
+
import { delimiter, join } from "path";
|
|
7
9
|
var EXTRA_BIN_DIRS = [
|
|
8
10
|
".local/bin",
|
|
9
11
|
".cargo/bin",
|
|
10
12
|
".nvm/current/bin",
|
|
11
13
|
".asdf/shims",
|
|
14
|
+
".volta/bin",
|
|
15
|
+
".npm-global/bin",
|
|
16
|
+
// fnm default alias (common when shell init is skipped)
|
|
17
|
+
".local/share/fnm/aliases/default/bin",
|
|
12
18
|
// pnpm / npm global bins (where `@brightsy/cli` typically lands)
|
|
13
19
|
"Library/pnpm",
|
|
14
20
|
".pnpm"
|
|
15
21
|
];
|
|
22
|
+
function prependPathDir(env, dir) {
|
|
23
|
+
if (!dir || !existsSync(dir)) return;
|
|
24
|
+
const current = env.PATH ?? "";
|
|
25
|
+
const parts = current.split(delimiter).filter(Boolean);
|
|
26
|
+
if (parts.includes(dir)) {
|
|
27
|
+
env.PATH = current;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
env.PATH = [dir, ...parts].join(delimiter);
|
|
31
|
+
}
|
|
16
32
|
function ensureAgentPath(env = process.env) {
|
|
17
33
|
const home = env.HOME || env.USERPROFILE || homedir();
|
|
18
34
|
const current = env.PATH ?? "";
|
|
19
35
|
const parts = current.split(delimiter).filter(Boolean);
|
|
20
36
|
const seen = new Set(parts);
|
|
21
37
|
const extras = [
|
|
22
|
-
...EXTRA_BIN_DIRS.map((rel) =>
|
|
38
|
+
...EXTRA_BIN_DIRS.map((rel) => join(home, rel)),
|
|
23
39
|
"/opt/homebrew/bin",
|
|
24
40
|
"/usr/local/bin"
|
|
25
41
|
];
|
|
26
42
|
for (const dir of extras.reverse()) {
|
|
27
|
-
if (!dir || seen.has(dir)) continue;
|
|
43
|
+
if (!dir || seen.has(dir) || !existsSync(dir)) continue;
|
|
28
44
|
parts.unshift(dir);
|
|
29
45
|
seen.add(dir);
|
|
30
46
|
}
|
|
@@ -32,6 +48,44 @@ function ensureAgentPath(env = process.env) {
|
|
|
32
48
|
env.PATH = next;
|
|
33
49
|
return next;
|
|
34
50
|
}
|
|
51
|
+
function enrichPathWithNpmGlobalBin(env = process.env) {
|
|
52
|
+
ensureAgentPath(env);
|
|
53
|
+
try {
|
|
54
|
+
const prefix = execFileSync("npm", ["prefix", "-g"], {
|
|
55
|
+
encoding: "utf8",
|
|
56
|
+
env: { ...process.env, ...env },
|
|
57
|
+
timeout: 8e3,
|
|
58
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
59
|
+
}).trim().split(/\r?\n/).find(Boolean);
|
|
60
|
+
if (prefix) {
|
|
61
|
+
const binDir = process.platform === "win32" ? prefix : join(prefix, "bin");
|
|
62
|
+
prependPathDir(env, binDir);
|
|
63
|
+
}
|
|
64
|
+
} catch {
|
|
65
|
+
}
|
|
66
|
+
return env.PATH ?? "";
|
|
67
|
+
}
|
|
68
|
+
function posixShellSingleQuote(value) {
|
|
69
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
70
|
+
}
|
|
71
|
+
function resolveCommandBinarySync(command, whichPath) {
|
|
72
|
+
const trimmed = command.trim();
|
|
73
|
+
if (!trimmed) return trimmed;
|
|
74
|
+
const match = /^(\S+)(\s[\s\S]*)?$/.exec(trimmed);
|
|
75
|
+
if (!match) return trimmed;
|
|
76
|
+
const bin = match[1];
|
|
77
|
+
const rest = match[2] ?? "";
|
|
78
|
+
if (bin.includes("/") || bin.includes("\\")) return trimmed;
|
|
79
|
+
const abs = whichPath?.trim().split(/\r?\n/).find(Boolean);
|
|
80
|
+
if (!abs) return trimmed;
|
|
81
|
+
return `${abs}${rest}`;
|
|
82
|
+
}
|
|
83
|
+
function withExportedPath(command, pathValue) {
|
|
84
|
+
const trimmed = command.trim();
|
|
85
|
+
if (!trimmed) return trimmed;
|
|
86
|
+
if (/^(export\s+PATH=|PATH=)/.test(trimmed)) return trimmed;
|
|
87
|
+
return `export PATH=${posixShellSingleQuote(pathValue)}; ${trimmed}`;
|
|
88
|
+
}
|
|
35
89
|
|
|
36
90
|
// src/git/run.ts
|
|
37
91
|
async function run(file, args, opts) {
|
|
@@ -97,6 +151,10 @@ async function resolveGhAuthToken(cwd) {
|
|
|
97
151
|
|
|
98
152
|
export {
|
|
99
153
|
ensureAgentPath,
|
|
154
|
+
enrichPathWithNpmGlobalBin,
|
|
155
|
+
posixShellSingleQuote,
|
|
156
|
+
resolveCommandBinarySync,
|
|
157
|
+
withExportedPath,
|
|
100
158
|
run,
|
|
101
159
|
git,
|
|
102
160
|
gh,
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assertOrchestratorCapableAgent
|
|
3
|
-
} from "./chunk-GI7E5733.js";
|
|
4
1
|
import {
|
|
5
2
|
ensureGlobalCoordinatorCwd
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AKPEXIKK.js";
|
|
7
4
|
import {
|
|
8
5
|
resolveNewThreadOptions,
|
|
9
6
|
resolveThreadDefaults
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MHR4OGZ4.js";
|
|
11
8
|
import {
|
|
12
9
|
allocateTeamName,
|
|
13
10
|
takenSlugsFromThread,
|
|
14
11
|
teamSlugFromName
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R7GUDEPY.js";
|
|
16
13
|
import {
|
|
17
14
|
createEmptyThread,
|
|
18
15
|
listThreads,
|
|
19
16
|
updateThread,
|
|
20
17
|
writeThread
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FWJYLBO6.js";
|
|
22
19
|
import {
|
|
23
20
|
globalAgentCwd
|
|
24
21
|
} from "./chunk-M37RITA6.js";
|
|
@@ -53,6 +50,30 @@ function parseForceStopMessage(message) {
|
|
|
53
50
|
return { forceStop, remainder: forceStop ? remainder : message };
|
|
54
51
|
}
|
|
55
52
|
|
|
53
|
+
// src/agents/orchestrator-capable.ts
|
|
54
|
+
var ORCHESTRATOR_AGENT_KINDS = [
|
|
55
|
+
"claude",
|
|
56
|
+
"codex",
|
|
57
|
+
"opencode",
|
|
58
|
+
"cursor"
|
|
59
|
+
];
|
|
60
|
+
function isOrchestratorCapableAgent(agent) {
|
|
61
|
+
return Boolean(
|
|
62
|
+
agent && ORCHESTRATOR_AGENT_KINDS.includes(agent)
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
function assertOrchestratorCapableAgent(agent, context = "orchestration") {
|
|
66
|
+
if (!isOrchestratorCapableAgent(agent)) {
|
|
67
|
+
throw new Error(
|
|
68
|
+
`${agent} cannot run ${context} \u2014 it does not support Sideboard MCP. Use Claude, Cursor, Codex, or OpenCode.`
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
return agent;
|
|
72
|
+
}
|
|
73
|
+
function coerceOrchestratorAgent(agent, fallback = "claude") {
|
|
74
|
+
return isOrchestratorCapableAgent(agent) ? agent : fallback;
|
|
75
|
+
}
|
|
76
|
+
|
|
56
77
|
// src/store/global-workspace.ts
|
|
57
78
|
var GLOBAL_WORKSPACE_ID = "__global__";
|
|
58
79
|
function isGlobalThread(thread) {
|
|
@@ -213,6 +234,10 @@ export {
|
|
|
213
234
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
214
235
|
CLOUD_COORDINATOR_TIMEOUT_REPLY,
|
|
215
236
|
parseForceStopMessage,
|
|
237
|
+
ORCHESTRATOR_AGENT_KINDS,
|
|
238
|
+
isOrchestratorCapableAgent,
|
|
239
|
+
assertOrchestratorCapableAgent,
|
|
240
|
+
coerceOrchestratorAgent,
|
|
216
241
|
GLOBAL_WORKSPACE_ID,
|
|
217
242
|
isGlobalThread,
|
|
218
243
|
isGlobalRepoPath,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
ensureConnectedBrightsyTeamTokens,
|
|
10
10
|
getConnectedBrightsyTeamsRaw,
|
|
11
11
|
listConnectedBrightsyTeams
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-EVD4KNKR.js";
|
|
13
|
+
import "./chunk-5AG5BUQN.js";
|
|
14
14
|
import "./chunk-7MV3RXSC.js";
|
|
15
15
|
export {
|
|
16
16
|
applyConnectedTeamToCli,
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
ensureConnectedBrightsyTeamTokens,
|
|
8
8
|
getConnectedBrightsyTeamsRaw,
|
|
9
9
|
listConnectedBrightsyTeams
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DZYMNW2A.js";
|
|
11
11
|
import "./chunk-M37RITA6.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-TXQ6K2GR.js";
|
|
13
13
|
export {
|
|
14
14
|
applyConnectedTeamToCli,
|
|
15
15
|
brightsyMcpServerName,
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
enrichWorkspacesWithGithub,
|
|
9
9
|
ensureGlobalCoordinatorCwd,
|
|
10
10
|
formatWorkspaceInventory
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-LRBRQFBU.js";
|
|
12
|
+
import "./chunk-I2KGRAXC.js";
|
|
13
13
|
import "./chunk-B3SJXYIJ.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-7FD7COKE.js";
|
|
15
|
+
import "./chunk-5AG5BUQN.js";
|
|
16
|
+
import "./chunk-BPOTVI5J.js";
|
|
17
17
|
import "./chunk-KGZBYWZ3.js";
|
|
18
18
|
import "./chunk-7MV3RXSC.js";
|
|
19
19
|
export {
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
enrichWorkspacesWithGithub,
|
|
7
7
|
ensureGlobalCoordinatorCwd,
|
|
8
8
|
formatWorkspaceInventory
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-AKPEXIKK.js";
|
|
10
|
+
import "./chunk-MHR4OGZ4.js";
|
|
11
|
+
import "./chunk-R7GUDEPY.js";
|
|
12
12
|
import "./chunk-FKOIHGKV.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-FWJYLBO6.js";
|
|
14
14
|
import "./chunk-77WWLBCI.js";
|
|
15
15
|
import "./chunk-M37RITA6.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-TXQ6K2GR.js";
|
|
17
17
|
export {
|
|
18
18
|
COORDINATOR_TOOL_PLAYBOOK,
|
|
19
19
|
coordinatorGreenfieldPlaybook,
|
|
@@ -11,18 +11,17 @@ import {
|
|
|
11
11
|
orchestrationTitleNeedsSoccerNickname,
|
|
12
12
|
orchestratorSessionPoisonedByBuiltins,
|
|
13
13
|
takenTeamSlugsForOrchestration
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-P7EQUFB6.js";
|
|
14
|
+
} from "./chunk-YTNLOJPK.js";
|
|
15
|
+
import "./chunk-AKPEXIKK.js";
|
|
16
|
+
import "./chunk-MHR4OGZ4.js";
|
|
17
|
+
import "./chunk-R7GUDEPY.js";
|
|
19
18
|
import "./chunk-FKOIHGKV.js";
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-FWJYLBO6.js";
|
|
21
20
|
import "./chunk-77WWLBCI.js";
|
|
22
21
|
import {
|
|
23
22
|
globalAgentCwd
|
|
24
23
|
} from "./chunk-M37RITA6.js";
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-TXQ6K2GR.js";
|
|
26
25
|
export {
|
|
27
26
|
GLOBAL_WORKSPACE_ID,
|
|
28
27
|
createGlobalChat,
|
|
@@ -13,14 +13,13 @@ import {
|
|
|
13
13
|
orchestrationTitleNeedsSoccerNickname,
|
|
14
14
|
orchestratorSessionPoisonedByBuiltins,
|
|
15
15
|
takenTeamSlugsForOrchestration
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-MFGGIRUA.js";
|
|
16
|
+
} from "./chunk-DNPP7QMK.js";
|
|
17
|
+
import "./chunk-LRBRQFBU.js";
|
|
18
|
+
import "./chunk-I2KGRAXC.js";
|
|
20
19
|
import "./chunk-B3SJXYIJ.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-7FD7COKE.js";
|
|
21
|
+
import "./chunk-5AG5BUQN.js";
|
|
22
|
+
import "./chunk-BPOTVI5J.js";
|
|
24
23
|
import "./chunk-KGZBYWZ3.js";
|
|
25
24
|
import {
|
|
26
25
|
globalAgentCwd
|