@sideboard-ai/core 0.1.66 → 0.1.68
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-EWFD765A.js → agents-JBD7IAGK.js} +10 -6
- package/dist/{agents-MD7SCFYX.js → agents-PE3RHQS5.js} +10 -6
- package/dist/{chunk-BBEH2CJE.js → chunk-47RBLBRK.js} +22 -7
- package/dist/{chunk-IFAU2DEY.js → chunk-6Q7H6SMX.js} +22 -7
- package/dist/{chunk-5AG5BUQN.js → chunk-AE5VBOFE.js} +14 -3
- package/dist/{chunk-DZYMNW2A.js → chunk-BTL7EMGT.js} +4 -4
- package/dist/{chunk-TXQ6K2GR.js → chunk-D4DPQ552.js} +14 -3
- package/dist/{chunk-PESJDZTB.js → chunk-DPDGMMGI.js} +2 -2
- package/dist/{chunk-R7GUDEPY.js → chunk-EEBDVLDK.js} +22 -20
- package/dist/{chunk-LRBRQFBU.js → chunk-N5LMEP65.js} +1 -1
- package/dist/{chunk-DNPP7QMK.js → chunk-OICHV4DH.js} +2 -2
- package/dist/{chunk-HTOTTJJX.js → chunk-QQC2D4MY.js} +2 -2
- package/dist/{chunk-I2KGRAXC.js → chunk-REKGFVUX.js} +22 -20
- package/dist/{chunk-YTNLOJPK.js → chunk-ROXEENBT.js} +2 -2
- package/dist/{chunk-EVD4KNKR.js → chunk-VROPG6QF.js} +1 -1
- package/dist/{chunk-AKPEXIKK.js → chunk-VX6ACNXS.js} +1 -1
- package/dist/{connected-teams-CHXO5FFA.js → connected-teams-35EIRJCP.js} +2 -2
- package/dist/{connected-teams-GJTESSTX.js → connected-teams-ZRS53OAT.js} +2 -2
- package/dist/{coordinator-prompt-ILSULI7C.js → coordinator-prompt-HD6IMCKS.js} +3 -3
- package/dist/{coordinator-prompt-E5UGSJES.js → coordinator-prompt-YZYZ5P6P.js} +3 -3
- package/dist/{global-workspace-44UG64NA.js → global-workspace-7P5NG3JZ.js} +4 -4
- package/dist/{global-workspace-5PM5LA6E.js → global-workspace-Z6GF7D2K.js} +4 -4
- package/dist/index.cjs +401 -163
- package/dist/index.d.cts +33 -3
- package/dist/index.d.ts +33 -3
- package/dist/index.js +368 -157
- package/dist/mcp/run-stdio.cjs +397 -163
- package/dist/mcp/run-stdio.js +363 -156
- package/dist/{run-74S2NZWB.js → run-A4RHY7HH.js} +1 -1
- package/dist/{run-JLN5JK7Q.js → run-V2WZUMJA.js} +1 -1
- package/dist/{workspaces-OVBCSS5Y.js → workspaces-BWJNGEE6.js} +5 -5
- package/dist/{workspaces-RXFXQRRF.js → workspaces-O6EZGKQK.js} +5 -5
- package/dist/{worktree-S2N63FLV.js → worktree-VDXLUOWR.js} +2 -2
- package/dist/{worktree-K2JB53R5.js → worktree-ZPSKEZFE.js} +2 -2
- package/package.json +1 -1
|
@@ -28,32 +28,34 @@ import {
|
|
|
28
28
|
resolveCursorModelId,
|
|
29
29
|
resolveLoginCommand,
|
|
30
30
|
resolveQuotaFallbackAgent
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-6Q7H6SMX.js";
|
|
32
32
|
import {
|
|
33
33
|
ORCHESTRATOR_AGENT_KINDS,
|
|
34
34
|
assertOrchestratorCapableAgent,
|
|
35
35
|
coerceOrchestratorAgent,
|
|
36
36
|
isOrchestratorCapableAgent
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-ROXEENBT.js";
|
|
38
|
+
import "./chunk-BTL7EMGT.js";
|
|
39
39
|
import {
|
|
40
40
|
cursorSdkMessageToEvents,
|
|
41
41
|
parseCursorRunnerLine
|
|
42
42
|
} from "./chunk-3WJAUKIL.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-VX6ACNXS.js";
|
|
44
44
|
import "./chunk-MHR4OGZ4.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-EEBDVLDK.js";
|
|
46
46
|
import "./chunk-FKOIHGKV.js";
|
|
47
47
|
import "./chunk-FWJYLBO6.js";
|
|
48
48
|
import "./chunk-77WWLBCI.js";
|
|
49
49
|
import "./chunk-M37RITA6.js";
|
|
50
50
|
import {
|
|
51
|
+
conductorBundledBinDir,
|
|
51
52
|
enrichPathWithNpmGlobalBin,
|
|
52
53
|
ensureAgentPath,
|
|
54
|
+
isConductorBundledCli,
|
|
53
55
|
posixShellSingleQuote,
|
|
54
56
|
resolveCommandBinarySync,
|
|
55
57
|
withExportedPath
|
|
56
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-D4DPQ552.js";
|
|
57
59
|
export {
|
|
58
60
|
CLAUDE_MODEL_CATALOG,
|
|
59
61
|
ORCHESTRATOR_AGENT_KINDS,
|
|
@@ -64,6 +66,7 @@ export {
|
|
|
64
66
|
claudeAdapter,
|
|
65
67
|
codexAdapter,
|
|
66
68
|
coerceOrchestratorAgent,
|
|
69
|
+
conductorBundledBinDir,
|
|
67
70
|
cursorAdapter,
|
|
68
71
|
cursorSdkMessageToEvents,
|
|
69
72
|
decodeBrightsyTarget,
|
|
@@ -73,6 +76,7 @@ export {
|
|
|
73
76
|
getAdapter,
|
|
74
77
|
getAgentSetupInfo,
|
|
75
78
|
installAgent,
|
|
79
|
+
isConductorBundledCli,
|
|
76
80
|
isCursorAutoModel,
|
|
77
81
|
isOrchestratorCapableAgent,
|
|
78
82
|
isSessionQuotaLimit,
|
|
@@ -32,25 +32,27 @@ import {
|
|
|
32
32
|
resolveCursorModelId,
|
|
33
33
|
resolveLoginCommand,
|
|
34
34
|
resolveQuotaFallbackAgent
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-47RBLBRK.js";
|
|
36
|
+
import "./chunk-VROPG6QF.js";
|
|
37
37
|
import {
|
|
38
38
|
ORCHESTRATOR_AGENT_KINDS,
|
|
39
39
|
assertOrchestratorCapableAgent,
|
|
40
40
|
coerceOrchestratorAgent,
|
|
41
41
|
isOrchestratorCapableAgent
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-OICHV4DH.js";
|
|
43
|
+
import "./chunk-N5LMEP65.js";
|
|
44
|
+
import "./chunk-REKGFVUX.js";
|
|
45
45
|
import "./chunk-B3SJXYIJ.js";
|
|
46
46
|
import "./chunk-7FD7COKE.js";
|
|
47
47
|
import {
|
|
48
|
+
conductorBundledBinDir,
|
|
48
49
|
enrichPathWithNpmGlobalBin,
|
|
49
50
|
ensureAgentPath,
|
|
51
|
+
isConductorBundledCli,
|
|
50
52
|
posixShellSingleQuote,
|
|
51
53
|
resolveCommandBinarySync,
|
|
52
54
|
withExportedPath
|
|
53
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-AE5VBOFE.js";
|
|
54
56
|
import "./chunk-BPOTVI5J.js";
|
|
55
57
|
import "./chunk-KGZBYWZ3.js";
|
|
56
58
|
import "./chunk-7MV3RXSC.js";
|
|
@@ -64,6 +66,7 @@ export {
|
|
|
64
66
|
claudeAdapter,
|
|
65
67
|
codexAdapter,
|
|
66
68
|
coerceOrchestratorAgent,
|
|
69
|
+
conductorBundledBinDir,
|
|
67
70
|
cursorAdapter,
|
|
68
71
|
cursorSdkMessageToEvents,
|
|
69
72
|
decodeBrightsyTarget,
|
|
@@ -73,6 +76,7 @@ export {
|
|
|
73
76
|
getAdapter,
|
|
74
77
|
getAgentSetupInfo,
|
|
75
78
|
installAgent,
|
|
79
|
+
isConductorBundledCli,
|
|
76
80
|
isCursorAutoModel,
|
|
77
81
|
isOrchestratorCapableAgent,
|
|
78
82
|
isSessionQuotaLimit,
|
|
@@ -6,16 +6,17 @@ import {
|
|
|
6
6
|
ensureCliTeamTracked,
|
|
7
7
|
ensureConnectedBrightsyTeamTokens,
|
|
8
8
|
loadBrightsyConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VROPG6QF.js";
|
|
10
10
|
import {
|
|
11
11
|
isOrchestratorThread
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OICHV4DH.js";
|
|
13
13
|
import {
|
|
14
14
|
enrichPathWithNpmGlobalBin,
|
|
15
|
+
isConductorBundledCli,
|
|
15
16
|
resolveCommandBinarySync,
|
|
16
17
|
run,
|
|
17
18
|
withExportedPath
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AE5VBOFE.js";
|
|
19
20
|
import {
|
|
20
21
|
claudeChromeEnabled,
|
|
21
22
|
loadAppSettings,
|
|
@@ -999,7 +1000,7 @@ var claudeAdapter = {
|
|
|
999
1000
|
);
|
|
1000
1001
|
}
|
|
1001
1002
|
const mode = permissionMode(thread);
|
|
1002
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
1003
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-Z6GF7D2K.js");
|
|
1003
1004
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
1004
1005
|
const injectedServers = await buildInjectedMcpServers({
|
|
1005
1006
|
includeSideboard: true,
|
|
@@ -2445,6 +2446,11 @@ async function openInSystemTerminal(command) {
|
|
|
2445
2446
|
`No terminal found to run: ${trimmed}. Install gnome-terminal (or similar), or run the command manually.`
|
|
2446
2447
|
);
|
|
2447
2448
|
}
|
|
2449
|
+
async function whichCli(bin) {
|
|
2450
|
+
const which = await run("which", [bin], { reject: false, timeoutMs: 3e3 });
|
|
2451
|
+
if (which.exitCode !== 0) return null;
|
|
2452
|
+
return which.stdout.trim().split(/\r?\n/).find(Boolean) ?? null;
|
|
2453
|
+
}
|
|
2448
2454
|
async function installAgent(agent) {
|
|
2449
2455
|
const info = getAgentSetupInfo(agent);
|
|
2450
2456
|
if (info.kind === "bundled-sdk" || info.kind === "api-key") {
|
|
@@ -2466,6 +2472,17 @@ async function installAgent(agent) {
|
|
|
2466
2472
|
};
|
|
2467
2473
|
}
|
|
2468
2474
|
enrichPathWithNpmGlobalBin();
|
|
2475
|
+
const cliBin = agent === "cursor" ? null : CLI_BIN[agent];
|
|
2476
|
+
if (cliBin) {
|
|
2477
|
+
const existing = await whichCli(cliBin);
|
|
2478
|
+
if (existing) {
|
|
2479
|
+
return {
|
|
2480
|
+
ok: true,
|
|
2481
|
+
command: existing,
|
|
2482
|
+
message: isConductorBundledCli(existing) ? `Using Conductor\u2019s ${cliBin} at ${existing}. No extra install \u2014 Log in only if auth is missing.` : `Already on PATH: ${existing}`
|
|
2483
|
+
};
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2469
2486
|
const result = await run("npm", ["install", "-g", info.npmPackage], { reject: false });
|
|
2470
2487
|
const ok = result.exitCode === 0;
|
|
2471
2488
|
if (!ok) {
|
|
@@ -2492,11 +2509,9 @@ async function installAgent(agent) {
|
|
|
2492
2509
|
}
|
|
2493
2510
|
}
|
|
2494
2511
|
enrichPathWithNpmGlobalBin();
|
|
2495
|
-
const cliBin = agent === "cursor" ? null : CLI_BIN[agent];
|
|
2496
2512
|
let binPath = null;
|
|
2497
2513
|
if (cliBin) {
|
|
2498
|
-
|
|
2499
|
-
binPath = which.exitCode === 0 ? which.stdout.trim().split(/\r?\n/).find(Boolean) ?? null : null;
|
|
2514
|
+
binPath = await whichCli(cliBin);
|
|
2500
2515
|
}
|
|
2501
2516
|
return {
|
|
2502
2517
|
ok: true,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isOrchestratorThread
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ROXEENBT.js";
|
|
4
4
|
import {
|
|
5
5
|
applyConnectedTeamToCli,
|
|
6
6
|
brightsyMcpServerName,
|
|
7
7
|
ensureCliTeamTracked,
|
|
8
8
|
ensureConnectedBrightsyTeamTokens,
|
|
9
9
|
loadBrightsyConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BTL7EMGT.js";
|
|
11
11
|
import {
|
|
12
12
|
extractJsonErrorMessage,
|
|
13
13
|
formatUnknownDetail,
|
|
@@ -25,10 +25,11 @@ import {
|
|
|
25
25
|
} from "./chunk-M37RITA6.js";
|
|
26
26
|
import {
|
|
27
27
|
enrichPathWithNpmGlobalBin,
|
|
28
|
+
isConductorBundledCli,
|
|
28
29
|
resolveCommandBinarySync,
|
|
29
30
|
run,
|
|
30
31
|
withExportedPath
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-D4DPQ552.js";
|
|
32
33
|
|
|
33
34
|
// src/agents/brightsy.ts
|
|
34
35
|
import { existsSync } from "fs";
|
|
@@ -939,7 +940,7 @@ var claudeAdapter = {
|
|
|
939
940
|
);
|
|
940
941
|
}
|
|
941
942
|
const mode = permissionMode(thread);
|
|
942
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
943
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-7P5NG3JZ.js");
|
|
943
944
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
944
945
|
const injectedServers = await buildInjectedMcpServers({
|
|
945
946
|
includeSideboard: true,
|
|
@@ -2214,6 +2215,11 @@ async function openInSystemTerminal(command) {
|
|
|
2214
2215
|
`No terminal found to run: ${trimmed}. Install gnome-terminal (or similar), or run the command manually.`
|
|
2215
2216
|
);
|
|
2216
2217
|
}
|
|
2218
|
+
async function whichCli(bin) {
|
|
2219
|
+
const which = await run("which", [bin], { reject: false, timeoutMs: 3e3 });
|
|
2220
|
+
if (which.exitCode !== 0) return null;
|
|
2221
|
+
return which.stdout.trim().split(/\r?\n/).find(Boolean) ?? null;
|
|
2222
|
+
}
|
|
2217
2223
|
async function installAgent(agent) {
|
|
2218
2224
|
const info = getAgentSetupInfo(agent);
|
|
2219
2225
|
if (info.kind === "bundled-sdk" || info.kind === "api-key") {
|
|
@@ -2235,6 +2241,17 @@ async function installAgent(agent) {
|
|
|
2235
2241
|
};
|
|
2236
2242
|
}
|
|
2237
2243
|
enrichPathWithNpmGlobalBin();
|
|
2244
|
+
const cliBin = agent === "cursor" ? null : CLI_BIN[agent];
|
|
2245
|
+
if (cliBin) {
|
|
2246
|
+
const existing = await whichCli(cliBin);
|
|
2247
|
+
if (existing) {
|
|
2248
|
+
return {
|
|
2249
|
+
ok: true,
|
|
2250
|
+
command: existing,
|
|
2251
|
+
message: isConductorBundledCli(existing) ? `Using Conductor\u2019s ${cliBin} at ${existing}. No extra install \u2014 Log in only if auth is missing.` : `Already on PATH: ${existing}`
|
|
2252
|
+
};
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2238
2255
|
const result = await run("npm", ["install", "-g", info.npmPackage], { reject: false });
|
|
2239
2256
|
const ok = result.exitCode === 0;
|
|
2240
2257
|
if (!ok) {
|
|
@@ -2261,11 +2278,9 @@ async function installAgent(agent) {
|
|
|
2261
2278
|
}
|
|
2262
2279
|
}
|
|
2263
2280
|
enrichPathWithNpmGlobalBin();
|
|
2264
|
-
const cliBin = agent === "cursor" ? null : CLI_BIN[agent];
|
|
2265
2281
|
let binPath = null;
|
|
2266
2282
|
if (cliBin) {
|
|
2267
|
-
|
|
2268
|
-
binPath = which.exitCode === 0 ? which.stdout.trim().split(/\r?\n/).find(Boolean) ?? null : null;
|
|
2283
|
+
binPath = await whichCli(cliBin);
|
|
2269
2284
|
}
|
|
2270
2285
|
return {
|
|
2271
2286
|
ok: true,
|
|
@@ -32,6 +32,13 @@ function prependPathDir(env, dir) {
|
|
|
32
32
|
}
|
|
33
33
|
env.PATH = [dir, ...parts].join(delimiter);
|
|
34
34
|
}
|
|
35
|
+
function conductorBundledBinDir(home = process.env.HOME || process.env.USERPROFILE || homedir()) {
|
|
36
|
+
return join(home, "Library", "Application Support", "com.conductor.app", "bin");
|
|
37
|
+
}
|
|
38
|
+
function isConductorBundledCli(filePath) {
|
|
39
|
+
const p = (filePath ?? "").replace(/\\/g, "/");
|
|
40
|
+
return p.includes("/com.conductor.app/bin/") || p.endsWith("/com.conductor.app/bin");
|
|
41
|
+
}
|
|
35
42
|
function ensureAgentPath(env = process.env) {
|
|
36
43
|
const home = env.HOME || env.USERPROFILE || homedir();
|
|
37
44
|
const current = env.PATH ?? "";
|
|
@@ -40,7 +47,9 @@ function ensureAgentPath(env = process.env) {
|
|
|
40
47
|
const extras = [
|
|
41
48
|
...EXTRA_BIN_DIRS.map((rel) => join(home, rel)),
|
|
42
49
|
"/opt/homebrew/bin",
|
|
43
|
-
"/usr/local/bin"
|
|
50
|
+
"/usr/local/bin",
|
|
51
|
+
// Keep after Homebrew/npm so a user-installed CLI still wins.
|
|
52
|
+
conductorBundledBinDir(home)
|
|
44
53
|
];
|
|
45
54
|
for (const dir of extras.reverse()) {
|
|
46
55
|
if (!dir || seen.has(dir) || !existsSync(dir)) continue;
|
|
@@ -87,7 +96,7 @@ function withExportedPath(command, pathValue) {
|
|
|
87
96
|
const trimmed = command.trim();
|
|
88
97
|
if (!trimmed) return trimmed;
|
|
89
98
|
if (/^(export\s+PATH=|PATH=)/.test(trimmed)) return trimmed;
|
|
90
|
-
return `export PATH=${posixShellSingleQuote(pathValue)}
|
|
99
|
+
return `export PATH=${posixShellSingleQuote(pathValue)} && ${trimmed}`;
|
|
91
100
|
}
|
|
92
101
|
|
|
93
102
|
// src/git/run.ts
|
|
@@ -125,7 +134,7 @@ async function git(args, cwd, opts) {
|
|
|
125
134
|
prefix.push("-c", `${key}=${value}`);
|
|
126
135
|
}
|
|
127
136
|
}
|
|
128
|
-
return run("git", [...prefix, ...args], {
|
|
137
|
+
return run("git", ["--no-pager", ...prefix, ...args], {
|
|
129
138
|
cwd,
|
|
130
139
|
reject: opts?.reject,
|
|
131
140
|
timeoutMs: opts?.timeoutMs,
|
|
@@ -153,6 +162,8 @@ async function resolveGhAuthToken(cwd) {
|
|
|
153
162
|
}
|
|
154
163
|
|
|
155
164
|
export {
|
|
165
|
+
conductorBundledBinDir,
|
|
166
|
+
isConductorBundledCli,
|
|
156
167
|
ensureAgentPath,
|
|
157
168
|
enrichPathWithNpmGlobalBin,
|
|
158
169
|
posixShellSingleQuote,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-M37RITA6.js";
|
|
4
4
|
import {
|
|
5
5
|
run
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D4DPQ552.js";
|
|
7
7
|
|
|
8
8
|
// src/brightsy/connected-teams.ts
|
|
9
9
|
import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
@@ -36,7 +36,7 @@ function saveBrightsyConfig(cfg) {
|
|
|
36
36
|
|
|
37
37
|
// src/brightsy/accounts.ts
|
|
38
38
|
async function loadConnectedTeams() {
|
|
39
|
-
const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-
|
|
39
|
+
const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-ZRS53OAT.js");
|
|
40
40
|
return listConnectedBrightsyTeams2();
|
|
41
41
|
}
|
|
42
42
|
async function runBrightsyTeamsJson(args) {
|
|
@@ -68,7 +68,7 @@ async function getBrightsySession() {
|
|
|
68
68
|
const data = await runBrightsyTeamsJson([]);
|
|
69
69
|
const accounts = Array.isArray(data.teams) ? data.teams : [];
|
|
70
70
|
const active = data.active ?? accounts.find((a) => a.active) ?? null;
|
|
71
|
-
const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-
|
|
71
|
+
const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-ZRS53OAT.js");
|
|
72
72
|
const connectedTeams = ensureCliTeamTracked2(
|
|
73
73
|
active ? { id: active.id, slug: active.slug, name: active.name } : void 0
|
|
74
74
|
);
|
|
@@ -108,7 +108,7 @@ async function performBrightsyAccountSwitch(accountIdOrSlug) {
|
|
|
108
108
|
return { cfg, target: data.active };
|
|
109
109
|
}
|
|
110
110
|
async function switchBrightsyAccount(accountIdOrSlug) {
|
|
111
|
-
const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-
|
|
111
|
+
const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-ZRS53OAT.js");
|
|
112
112
|
await connectBrightsyTeam2(accountIdOrSlug);
|
|
113
113
|
return getBrightsySession();
|
|
114
114
|
}
|
|
@@ -29,6 +29,13 @@ function prependPathDir(env, dir) {
|
|
|
29
29
|
}
|
|
30
30
|
env.PATH = [dir, ...parts].join(delimiter);
|
|
31
31
|
}
|
|
32
|
+
function conductorBundledBinDir(home = process.env.HOME || process.env.USERPROFILE || homedir()) {
|
|
33
|
+
return join(home, "Library", "Application Support", "com.conductor.app", "bin");
|
|
34
|
+
}
|
|
35
|
+
function isConductorBundledCli(filePath) {
|
|
36
|
+
const p = (filePath ?? "").replace(/\\/g, "/");
|
|
37
|
+
return p.includes("/com.conductor.app/bin/") || p.endsWith("/com.conductor.app/bin");
|
|
38
|
+
}
|
|
32
39
|
function ensureAgentPath(env = process.env) {
|
|
33
40
|
const home = env.HOME || env.USERPROFILE || homedir();
|
|
34
41
|
const current = env.PATH ?? "";
|
|
@@ -37,7 +44,9 @@ function ensureAgentPath(env = process.env) {
|
|
|
37
44
|
const extras = [
|
|
38
45
|
...EXTRA_BIN_DIRS.map((rel) => join(home, rel)),
|
|
39
46
|
"/opt/homebrew/bin",
|
|
40
|
-
"/usr/local/bin"
|
|
47
|
+
"/usr/local/bin",
|
|
48
|
+
// Keep after Homebrew/npm so a user-installed CLI still wins.
|
|
49
|
+
conductorBundledBinDir(home)
|
|
41
50
|
];
|
|
42
51
|
for (const dir of extras.reverse()) {
|
|
43
52
|
if (!dir || seen.has(dir) || !existsSync(dir)) continue;
|
|
@@ -84,7 +93,7 @@ function withExportedPath(command, pathValue) {
|
|
|
84
93
|
const trimmed = command.trim();
|
|
85
94
|
if (!trimmed) return trimmed;
|
|
86
95
|
if (/^(export\s+PATH=|PATH=)/.test(trimmed)) return trimmed;
|
|
87
|
-
return `export PATH=${posixShellSingleQuote(pathValue)}
|
|
96
|
+
return `export PATH=${posixShellSingleQuote(pathValue)} && ${trimmed}`;
|
|
88
97
|
}
|
|
89
98
|
|
|
90
99
|
// src/git/run.ts
|
|
@@ -122,7 +131,7 @@ async function git(args, cwd, opts) {
|
|
|
122
131
|
prefix.push("-c", `${key}=${value}`);
|
|
123
132
|
}
|
|
124
133
|
}
|
|
125
|
-
return run("git", [...prefix, ...args], {
|
|
134
|
+
return run("git", ["--no-pager", ...prefix, ...args], {
|
|
126
135
|
cwd,
|
|
127
136
|
reject: opts?.reject,
|
|
128
137
|
timeoutMs: opts?.timeoutMs,
|
|
@@ -150,6 +159,8 @@ async function resolveGhAuthToken(cwd) {
|
|
|
150
159
|
}
|
|
151
160
|
|
|
152
161
|
export {
|
|
162
|
+
conductorBundledBinDir,
|
|
163
|
+
isConductorBundledCli,
|
|
153
164
|
ensureAgentPath,
|
|
154
165
|
enrichPathWithNpmGlobalBin,
|
|
155
166
|
posixShellSingleQuote,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isGlobalRepoPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ROXEENBT.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureGhPreferOrigin,
|
|
6
6
|
resolveRepoRoot
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EEBDVLDK.js";
|
|
8
8
|
import {
|
|
9
9
|
appDataDir
|
|
10
10
|
} from "./chunk-M37RITA6.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
gh,
|
|
12
12
|
git,
|
|
13
13
|
resolveGhAuthToken
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D4DPQ552.js";
|
|
15
15
|
|
|
16
16
|
// src/git/worktree.ts
|
|
17
17
|
import { existsSync, readdirSync } from "fs";
|
|
@@ -1274,7 +1274,7 @@ async function originGhRepoEnv(cwd) {
|
|
|
1274
1274
|
const slug = await resolveGithubRepoSlug(cwd);
|
|
1275
1275
|
return slug ? { GH_REPO: slug } : {};
|
|
1276
1276
|
}
|
|
1277
|
-
async function resolveDefaultBranch(repoPath) {
|
|
1277
|
+
async function resolveDefaultBranch(repoPath, opts) {
|
|
1278
1278
|
const viaOrigin = await git(
|
|
1279
1279
|
["symbolic-ref", "refs/remotes/origin/HEAD"],
|
|
1280
1280
|
repoPath,
|
|
@@ -1283,22 +1283,24 @@ async function resolveDefaultBranch(repoPath) {
|
|
|
1283
1283
|
if (viaOrigin.exitCode === 0 && viaOrigin.stdout.trim()) {
|
|
1284
1284
|
return viaOrigin.stdout.trim().replace(/^refs\/remotes\/origin\//, "");
|
|
1285
1285
|
}
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1286
|
+
if (opts?.network !== false) {
|
|
1287
|
+
const slug = await resolveGithubRepoSlug(repoPath);
|
|
1288
|
+
const viaGh = await gh(
|
|
1289
|
+
[
|
|
1290
|
+
"repo",
|
|
1291
|
+
"view",
|
|
1292
|
+
...slug ? ["--repo", slug] : [],
|
|
1293
|
+
"--json",
|
|
1294
|
+
"defaultBranchRef",
|
|
1295
|
+
"--jq",
|
|
1296
|
+
".defaultBranchRef.name"
|
|
1297
|
+
],
|
|
1298
|
+
repoPath,
|
|
1299
|
+
{ reject: false, timeoutMs: 8e3 }
|
|
1300
|
+
);
|
|
1301
|
+
if (viaGh.exitCode === 0 && viaGh.stdout.trim()) {
|
|
1302
|
+
return viaGh.stdout.trim();
|
|
1303
|
+
}
|
|
1302
1304
|
}
|
|
1303
1305
|
for (const candidate of ["main", "master"]) {
|
|
1304
1306
|
const check = await git(
|
|
@@ -1950,11 +1952,11 @@ async function listWorktrees(repoPath) {
|
|
|
1950
1952
|
return entries;
|
|
1951
1953
|
}
|
|
1952
1954
|
async function isDirty(worktreePath) {
|
|
1953
|
-
const { stdout } = await git(["status", "--porcelain"
|
|
1955
|
+
const { stdout } = await git(["status", "--porcelain"], worktreePath);
|
|
1954
1956
|
for (const line of stdout.split("\n")) {
|
|
1955
1957
|
if (!line.trim()) continue;
|
|
1956
1958
|
const rel = porcelainStatusPath(line);
|
|
1957
|
-
if (!rel || isSideboardScratchPath(rel)) continue;
|
|
1959
|
+
if (!rel || isSideboardScratchPath(rel) || rel === ".sideboard") continue;
|
|
1958
1960
|
return true;
|
|
1959
1961
|
}
|
|
1960
1962
|
return false;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
ensureGlobalCoordinatorCwd
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-N5LMEP65.js";
|
|
6
6
|
import {
|
|
7
7
|
allocateTeamName,
|
|
8
8
|
takenSlugsFromThread,
|
|
9
9
|
teamSlugFromName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-REKGFVUX.js";
|
|
11
11
|
import {
|
|
12
12
|
createEmptyThread,
|
|
13
13
|
listThreads,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
isGlobalRepoPath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OICHV4DH.js";
|
|
6
6
|
import {
|
|
7
7
|
ensureGhPreferOrigin,
|
|
8
8
|
resolveRepoRoot
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-REKGFVUX.js";
|
|
10
10
|
import {
|
|
11
11
|
appDataDir
|
|
12
12
|
} from "./chunk-7MV3RXSC.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
gh,
|
|
11
11
|
git,
|
|
12
12
|
resolveGhAuthToken
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AE5VBOFE.js";
|
|
14
14
|
import {
|
|
15
15
|
worktreesRoot
|
|
16
16
|
} from "./chunk-7MV3RXSC.js";
|
|
@@ -1241,7 +1241,7 @@ async function originGhRepoEnv(cwd) {
|
|
|
1241
1241
|
const slug = await resolveGithubRepoSlug(cwd);
|
|
1242
1242
|
return slug ? { GH_REPO: slug } : {};
|
|
1243
1243
|
}
|
|
1244
|
-
async function resolveDefaultBranch(repoPath) {
|
|
1244
|
+
async function resolveDefaultBranch(repoPath, opts) {
|
|
1245
1245
|
const viaOrigin = await git(
|
|
1246
1246
|
["symbolic-ref", "refs/remotes/origin/HEAD"],
|
|
1247
1247
|
repoPath,
|
|
@@ -1250,22 +1250,24 @@ async function resolveDefaultBranch(repoPath) {
|
|
|
1250
1250
|
if (viaOrigin.exitCode === 0 && viaOrigin.stdout.trim()) {
|
|
1251
1251
|
return viaOrigin.stdout.trim().replace(/^refs\/remotes\/origin\//, "");
|
|
1252
1252
|
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1253
|
+
if (opts?.network !== false) {
|
|
1254
|
+
const slug = await resolveGithubRepoSlug(repoPath);
|
|
1255
|
+
const viaGh = await gh(
|
|
1256
|
+
[
|
|
1257
|
+
"repo",
|
|
1258
|
+
"view",
|
|
1259
|
+
...slug ? ["--repo", slug] : [],
|
|
1260
|
+
"--json",
|
|
1261
|
+
"defaultBranchRef",
|
|
1262
|
+
"--jq",
|
|
1263
|
+
".defaultBranchRef.name"
|
|
1264
|
+
],
|
|
1265
|
+
repoPath,
|
|
1266
|
+
{ reject: false, timeoutMs: 8e3 }
|
|
1267
|
+
);
|
|
1268
|
+
if (viaGh.exitCode === 0 && viaGh.stdout.trim()) {
|
|
1269
|
+
return viaGh.stdout.trim();
|
|
1270
|
+
}
|
|
1269
1271
|
}
|
|
1270
1272
|
for (const candidate of ["main", "master"]) {
|
|
1271
1273
|
const check = await git(
|
|
@@ -1917,11 +1919,11 @@ async function listWorktrees(repoPath) {
|
|
|
1917
1919
|
return entries;
|
|
1918
1920
|
}
|
|
1919
1921
|
async function isDirty(worktreePath) {
|
|
1920
|
-
const { stdout } = await git(["status", "--porcelain"
|
|
1922
|
+
const { stdout } = await git(["status", "--porcelain"], worktreePath);
|
|
1921
1923
|
for (const line of stdout.split("\n")) {
|
|
1922
1924
|
if (!line.trim()) continue;
|
|
1923
1925
|
const rel = porcelainStatusPath(line);
|
|
1924
|
-
if (!rel || isSideboardScratchPath(rel)) continue;
|
|
1926
|
+
if (!rel || isSideboardScratchPath(rel) || rel === ".sideboard") continue;
|
|
1925
1927
|
return true;
|
|
1926
1928
|
}
|
|
1927
1929
|
return false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureGlobalCoordinatorCwd
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VX6ACNXS.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveNewThreadOptions,
|
|
6
6
|
resolveThreadDefaults
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
allocateTeamName,
|
|
10
10
|
takenSlugsFromThread,
|
|
11
11
|
teamSlugFromName
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EEBDVLDK.js";
|
|
13
13
|
import {
|
|
14
14
|
createEmptyThread,
|
|
15
15
|
listThreads,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
ensureConnectedBrightsyTeamTokens,
|
|
10
10
|
getConnectedBrightsyTeamsRaw,
|
|
11
11
|
listConnectedBrightsyTeams
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-VROPG6QF.js";
|
|
13
|
+
import "./chunk-AE5VBOFE.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-BTL7EMGT.js";
|
|
11
11
|
import "./chunk-M37RITA6.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-D4DPQ552.js";
|
|
13
13
|
export {
|
|
14
14
|
applyConnectedTeamToCli,
|
|
15
15
|
brightsyMcpServerName,
|