@sideboard-ai/core 0.1.227 → 0.1.228
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/{chunk-I2HOATRJ.js → chunk-72XUASTH.js} +107 -41
- package/dist/{chunk-FUDJ6NFM.js → chunk-WHYJL7CP.js} +95 -42
- package/dist/index.cjs +107 -39
- package/dist/index.d.cts +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.js +5 -1
- package/dist/mcp/run-stdio.cjs +93 -40
- package/dist/mcp/run-stdio.js +1 -1
- package/dist/{orchestrator-CWOSAYAE.js → orchestrator-6XEWQWSM.js} +1 -1
- package/dist/{orchestrator-VKPHI64Q.js → orchestrator-QUJORSTA.js} +1 -1
- package/package.json +1 -1
|
@@ -482,7 +482,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
482
482
|
await continueOnReply(threadId, prompt);
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
485
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-QUJORSTA.js");
|
|
486
486
|
await getOrchestrator2().send(threadId, prompt);
|
|
487
487
|
} catch {
|
|
488
488
|
}
|
|
@@ -2437,61 +2437,103 @@ function getRunScript(worktreePath, repoPath, name) {
|
|
|
2437
2437
|
function getRunMode(worktreePath, repoPath) {
|
|
2438
2438
|
return loadWorkspaceSettings(worktreePath, repoPath)?.runMode ?? "concurrent";
|
|
2439
2439
|
}
|
|
2440
|
-
async function
|
|
2440
|
+
async function reservePort() {
|
|
2441
2441
|
return new Promise((resolve, reject) => {
|
|
2442
2442
|
const server = createServer();
|
|
2443
|
+
let released = false;
|
|
2444
|
+
const release = () => new Promise((res) => {
|
|
2445
|
+
if (released) {
|
|
2446
|
+
res();
|
|
2447
|
+
return;
|
|
2448
|
+
}
|
|
2449
|
+
released = true;
|
|
2450
|
+
server.close(() => res());
|
|
2451
|
+
});
|
|
2443
2452
|
server.listen(0, "127.0.0.1", () => {
|
|
2444
2453
|
const addr = server.address();
|
|
2445
2454
|
if (!addr || typeof addr === "string") {
|
|
2446
|
-
|
|
2447
|
-
reject(new Error("Failed to allocate port"));
|
|
2455
|
+
void release().then(() => reject(new Error("Failed to allocate port")));
|
|
2448
2456
|
return;
|
|
2449
2457
|
}
|
|
2450
|
-
|
|
2451
|
-
server.close((err) => err ? reject(err) : resolve(port));
|
|
2458
|
+
resolve({ port: addr.port, release });
|
|
2452
2459
|
});
|
|
2453
2460
|
server.on("error", reject);
|
|
2454
2461
|
});
|
|
2455
2462
|
}
|
|
2456
|
-
async function
|
|
2457
|
-
const
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2463
|
+
async function allocatePort() {
|
|
2464
|
+
const held = await reservePort();
|
|
2465
|
+
await held.release();
|
|
2466
|
+
return held.port;
|
|
2467
|
+
}
|
|
2468
|
+
async function tryReservePort(port) {
|
|
2469
|
+
return new Promise((resolve) => {
|
|
2470
|
+
const server = createServer();
|
|
2471
|
+
let released = false;
|
|
2472
|
+
const release = () => new Promise((res) => {
|
|
2473
|
+
if (released) {
|
|
2474
|
+
res();
|
|
2475
|
+
return;
|
|
2476
|
+
}
|
|
2477
|
+
released = true;
|
|
2478
|
+
server.close(() => res());
|
|
2467
2479
|
});
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2480
|
+
server.once("error", () => resolve(null));
|
|
2481
|
+
server.listen(port, "127.0.0.1", () => {
|
|
2482
|
+
resolve({ port, release });
|
|
2483
|
+
});
|
|
2484
|
+
});
|
|
2485
|
+
}
|
|
2486
|
+
async function reservePortRange(size = PORT_RANGE_SIZE) {
|
|
2487
|
+
const held = [await reservePort()];
|
|
2488
|
+
const base = held[0].port;
|
|
2489
|
+
try {
|
|
2490
|
+
for (let i = 1; i < size; i++) {
|
|
2491
|
+
const candidate = base + i;
|
|
2492
|
+
const next = await tryReservePort(candidate);
|
|
2493
|
+
if (next) {
|
|
2494
|
+
held.push(next);
|
|
2495
|
+
} else {
|
|
2496
|
+
held.push(await reservePort());
|
|
2497
|
+
}
|
|
2472
2498
|
}
|
|
2499
|
+
return held;
|
|
2500
|
+
} catch (err) {
|
|
2501
|
+
await Promise.all(held.map((h) => h.release()));
|
|
2502
|
+
throw err;
|
|
2473
2503
|
}
|
|
2504
|
+
}
|
|
2505
|
+
async function allocatePortRange(size = PORT_RANGE_SIZE) {
|
|
2506
|
+
const held = await reservePortRange(size);
|
|
2507
|
+
const ports = held.map((h) => h.port);
|
|
2508
|
+
await Promise.all(held.map((h) => h.release()));
|
|
2474
2509
|
return ports;
|
|
2475
2510
|
}
|
|
2476
2511
|
async function startDevServer(repoPath, worktreePath, onLine, opts) {
|
|
2477
2512
|
const script = getRunScript(worktreePath, repoPath, opts?.scriptName);
|
|
2478
2513
|
if (!script) return null;
|
|
2479
|
-
const
|
|
2480
|
-
const
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2514
|
+
const held = await reservePortRange(PORT_RANGE_SIZE);
|
|
2515
|
+
const ports = held.map((h) => h.port);
|
|
2516
|
+
try {
|
|
2517
|
+
await Promise.all(held.map((h) => h.release()));
|
|
2518
|
+
const handle = await spawnWorkspaceScript(script.command, {
|
|
2519
|
+
worktreePath,
|
|
2520
|
+
repoPath,
|
|
2521
|
+
ports,
|
|
2522
|
+
defaultBranch: opts?.defaultBranch,
|
|
2523
|
+
onLine
|
|
2524
|
+
});
|
|
2525
|
+
return {
|
|
2526
|
+
pid: handle.pid,
|
|
2527
|
+
port: ports[0],
|
|
2528
|
+
ports,
|
|
2529
|
+
scriptName: script.name,
|
|
2530
|
+
kill: handle.kill,
|
|
2531
|
+
done: handle.done
|
|
2532
|
+
};
|
|
2533
|
+
} catch (err) {
|
|
2534
|
+
await Promise.all(held.map((h) => h.release()));
|
|
2535
|
+
throw err;
|
|
2536
|
+
}
|
|
2495
2537
|
}
|
|
2496
2538
|
|
|
2497
2539
|
// src/store/setup-log.ts
|
|
@@ -7358,7 +7400,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
7358
7400
|
${prompt}`;
|
|
7359
7401
|
}
|
|
7360
7402
|
async function defaultDeps() {
|
|
7361
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
7403
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-QUJORSTA.js");
|
|
7362
7404
|
const orch = getOrchestrator2();
|
|
7363
7405
|
return {
|
|
7364
7406
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -7539,6 +7581,8 @@ var Orchestrator = class {
|
|
|
7539
7581
|
/** Auto-continues after a worktree turn ended while a detached job still runs. */
|
|
7540
7582
|
jobContinueCount = /* @__PURE__ */ new Map();
|
|
7541
7583
|
jobContinueNudged = /* @__PURE__ */ new Set();
|
|
7584
|
+
/** In-flight startDev per worktree run key — agent MCP + UI Start must not double-spawn. */
|
|
7585
|
+
startingDev = /* @__PURE__ */ new Map();
|
|
7542
7586
|
maxConcurrent;
|
|
7543
7587
|
runningCount = 0;
|
|
7544
7588
|
constructor(opts) {
|
|
@@ -8756,9 +8800,20 @@ var Orchestrator = class {
|
|
|
8756
8800
|
"No run script found for this worktree. Add [scripts.run.*] in the worktree\u2019s .sideboard/settings.toml or .conductor/settings.toml (or settings.local.toml on the main repo)."
|
|
8757
8801
|
);
|
|
8758
8802
|
}
|
|
8803
|
+
const runKey = worktreeRunProcessKey(thread.worktreePath, resolvedName);
|
|
8804
|
+
const inFlight = this.startingDev.get(runKey);
|
|
8805
|
+
if (inFlight) return inFlight;
|
|
8806
|
+
const start = this.startDevUnlocked(thread, resolvedName, scriptName, scripts, runKey);
|
|
8807
|
+
this.startingDev.set(runKey, start);
|
|
8808
|
+
try {
|
|
8809
|
+
return await start;
|
|
8810
|
+
} finally {
|
|
8811
|
+
this.startingDev.delete(runKey);
|
|
8812
|
+
}
|
|
8813
|
+
}
|
|
8814
|
+
async startDevUnlocked(thread, resolvedName, scriptName, scripts, runKey) {
|
|
8759
8815
|
const siblings = threadsSharingWorktree(thread.worktreePath);
|
|
8760
8816
|
const shared = mergeWorktreeActiveRuns(siblings);
|
|
8761
|
-
const runKey = worktreeRunProcessKey(thread.worktreePath, resolvedName);
|
|
8762
8817
|
const existing = this.processes.get(runKey) ?? siblings.map((t) => this.processes.get(`${t.id}:run:${resolvedName}`)).find(Boolean);
|
|
8763
8818
|
const active = shared.activeRuns.find((r) => r.scriptName === resolvedName);
|
|
8764
8819
|
if (existing && active) {
|
|
@@ -8770,6 +8825,14 @@ var Orchestrator = class {
|
|
|
8770
8825
|
return { port: shared.devPort, scriptName: resolvedName, ports: [shared.devPort] };
|
|
8771
8826
|
}
|
|
8772
8827
|
}
|
|
8828
|
+
if (active && !existing) {
|
|
8829
|
+
killListenersOnPorts(collectActiveRunPorts([active]));
|
|
8830
|
+
this.syncWorktreeRuns(
|
|
8831
|
+
thread.worktreePath,
|
|
8832
|
+
shared.activeRuns.filter((r) => r.scriptName !== resolvedName),
|
|
8833
|
+
shared.devPort === active.port ? null : shared.devPort
|
|
8834
|
+
);
|
|
8835
|
+
}
|
|
8773
8836
|
const mode = getRunMode(thread.worktreePath, thread.repoPath);
|
|
8774
8837
|
if (mode === "nonconcurrent") {
|
|
8775
8838
|
const here = normalizeWorktreePath(thread.worktreePath);
|
|
@@ -8818,6 +8881,7 @@ var Orchestrator = class {
|
|
|
8818
8881
|
kill: handle.kill
|
|
8819
8882
|
});
|
|
8820
8883
|
}
|
|
8884
|
+
const latestShared = mergeWorktreeActiveRuns(threadsSharingWorktree(thread.worktreePath));
|
|
8821
8885
|
const run2 = {
|
|
8822
8886
|
scriptName: resolvedName,
|
|
8823
8887
|
port: handle.port,
|
|
@@ -8825,13 +8889,13 @@ var Orchestrator = class {
|
|
|
8825
8889
|
startedAt
|
|
8826
8890
|
};
|
|
8827
8891
|
const nextRuns = [
|
|
8828
|
-
...
|
|
8892
|
+
...latestShared.activeRuns.filter((r) => r.scriptName !== resolvedName),
|
|
8829
8893
|
run2
|
|
8830
8894
|
];
|
|
8831
8895
|
this.syncWorktreeRuns(
|
|
8832
8896
|
thread.worktreePath,
|
|
8833
8897
|
nextRuns,
|
|
8834
|
-
isDefault ? handle.port :
|
|
8898
|
+
isDefault ? handle.port : latestShared.devPort
|
|
8835
8899
|
);
|
|
8836
8900
|
this.emit({
|
|
8837
8901
|
type: "dev_server_started",
|
|
@@ -10049,7 +10113,9 @@ export {
|
|
|
10049
10113
|
getDefaultRunScript,
|
|
10050
10114
|
getRunScript,
|
|
10051
10115
|
getRunMode,
|
|
10116
|
+
reservePort,
|
|
10052
10117
|
allocatePort,
|
|
10118
|
+
reservePortRange,
|
|
10053
10119
|
allocatePortRange,
|
|
10054
10120
|
startDevServer,
|
|
10055
10121
|
findOrphanWorktrees,
|
|
@@ -418,7 +418,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
418
418
|
await continueOnReply(threadId, prompt);
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
421
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-6XEWQWSM.js");
|
|
422
422
|
await getOrchestrator2().send(threadId, prompt);
|
|
423
423
|
} catch {
|
|
424
424
|
}
|
|
@@ -2379,61 +2379,92 @@ function getRunScript(worktreePath, repoPath, name) {
|
|
|
2379
2379
|
function getRunMode(worktreePath, repoPath) {
|
|
2380
2380
|
return loadWorkspaceSettings(worktreePath, repoPath)?.runMode ?? "concurrent";
|
|
2381
2381
|
}
|
|
2382
|
-
async function
|
|
2382
|
+
async function reservePort() {
|
|
2383
2383
|
return new Promise((resolve, reject) => {
|
|
2384
2384
|
const server = createServer();
|
|
2385
|
+
let released = false;
|
|
2386
|
+
const release = () => new Promise((res) => {
|
|
2387
|
+
if (released) {
|
|
2388
|
+
res();
|
|
2389
|
+
return;
|
|
2390
|
+
}
|
|
2391
|
+
released = true;
|
|
2392
|
+
server.close(() => res());
|
|
2393
|
+
});
|
|
2385
2394
|
server.listen(0, "127.0.0.1", () => {
|
|
2386
2395
|
const addr = server.address();
|
|
2387
2396
|
if (!addr || typeof addr === "string") {
|
|
2388
|
-
|
|
2389
|
-
reject(new Error("Failed to allocate port"));
|
|
2397
|
+
void release().then(() => reject(new Error("Failed to allocate port")));
|
|
2390
2398
|
return;
|
|
2391
2399
|
}
|
|
2392
|
-
|
|
2393
|
-
server.close((err) => err ? reject(err) : resolve(port));
|
|
2400
|
+
resolve({ port: addr.port, release });
|
|
2394
2401
|
});
|
|
2395
2402
|
server.on("error", reject);
|
|
2396
2403
|
});
|
|
2397
2404
|
}
|
|
2398
|
-
async function
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
const
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2405
|
+
async function tryReservePort(port) {
|
|
2406
|
+
return new Promise((resolve) => {
|
|
2407
|
+
const server = createServer();
|
|
2408
|
+
let released = false;
|
|
2409
|
+
const release = () => new Promise((res) => {
|
|
2410
|
+
if (released) {
|
|
2411
|
+
res();
|
|
2412
|
+
return;
|
|
2413
|
+
}
|
|
2414
|
+
released = true;
|
|
2415
|
+
server.close(() => res());
|
|
2409
2416
|
});
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2417
|
+
server.once("error", () => resolve(null));
|
|
2418
|
+
server.listen(port, "127.0.0.1", () => {
|
|
2419
|
+
resolve({ port, release });
|
|
2420
|
+
});
|
|
2421
|
+
});
|
|
2422
|
+
}
|
|
2423
|
+
async function reservePortRange(size = PORT_RANGE_SIZE) {
|
|
2424
|
+
const held = [await reservePort()];
|
|
2425
|
+
const base = held[0].port;
|
|
2426
|
+
try {
|
|
2427
|
+
for (let i = 1; i < size; i++) {
|
|
2428
|
+
const candidate = base + i;
|
|
2429
|
+
const next = await tryReservePort(candidate);
|
|
2430
|
+
if (next) {
|
|
2431
|
+
held.push(next);
|
|
2432
|
+
} else {
|
|
2433
|
+
held.push(await reservePort());
|
|
2434
|
+
}
|
|
2414
2435
|
}
|
|
2436
|
+
return held;
|
|
2437
|
+
} catch (err) {
|
|
2438
|
+
await Promise.all(held.map((h) => h.release()));
|
|
2439
|
+
throw err;
|
|
2415
2440
|
}
|
|
2416
|
-
return ports;
|
|
2417
2441
|
}
|
|
2418
2442
|
async function startDevServer(repoPath, worktreePath, onLine, opts) {
|
|
2419
2443
|
const script = getRunScript(worktreePath, repoPath, opts?.scriptName);
|
|
2420
2444
|
if (!script) return null;
|
|
2421
|
-
const
|
|
2422
|
-
const
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2445
|
+
const held = await reservePortRange(PORT_RANGE_SIZE);
|
|
2446
|
+
const ports = held.map((h) => h.port);
|
|
2447
|
+
try {
|
|
2448
|
+
await Promise.all(held.map((h) => h.release()));
|
|
2449
|
+
const handle = await spawnWorkspaceScript(script.command, {
|
|
2450
|
+
worktreePath,
|
|
2451
|
+
repoPath,
|
|
2452
|
+
ports,
|
|
2453
|
+
defaultBranch: opts?.defaultBranch,
|
|
2454
|
+
onLine
|
|
2455
|
+
});
|
|
2456
|
+
return {
|
|
2457
|
+
pid: handle.pid,
|
|
2458
|
+
port: ports[0],
|
|
2459
|
+
ports,
|
|
2460
|
+
scriptName: script.name,
|
|
2461
|
+
kill: handle.kill,
|
|
2462
|
+
done: handle.done
|
|
2463
|
+
};
|
|
2464
|
+
} catch (err) {
|
|
2465
|
+
await Promise.all(held.map((h) => h.release()));
|
|
2466
|
+
throw err;
|
|
2467
|
+
}
|
|
2437
2468
|
}
|
|
2438
2469
|
|
|
2439
2470
|
// src/store/setup-log.ts
|
|
@@ -6983,7 +7014,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6983
7014
|
${prompt}`;
|
|
6984
7015
|
}
|
|
6985
7016
|
async function defaultDeps() {
|
|
6986
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
7017
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-6XEWQWSM.js");
|
|
6987
7018
|
const orch = getOrchestrator2();
|
|
6988
7019
|
return {
|
|
6989
7020
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -7164,6 +7195,8 @@ var Orchestrator = class {
|
|
|
7164
7195
|
/** Auto-continues after a worktree turn ended while a detached job still runs. */
|
|
7165
7196
|
jobContinueCount = /* @__PURE__ */ new Map();
|
|
7166
7197
|
jobContinueNudged = /* @__PURE__ */ new Set();
|
|
7198
|
+
/** In-flight startDev per worktree run key — agent MCP + UI Start must not double-spawn. */
|
|
7199
|
+
startingDev = /* @__PURE__ */ new Map();
|
|
7167
7200
|
maxConcurrent;
|
|
7168
7201
|
runningCount = 0;
|
|
7169
7202
|
constructor(opts) {
|
|
@@ -8381,9 +8414,20 @@ var Orchestrator = class {
|
|
|
8381
8414
|
"No run script found for this worktree. Add [scripts.run.*] in the worktree\u2019s .sideboard/settings.toml or .conductor/settings.toml (or settings.local.toml on the main repo)."
|
|
8382
8415
|
);
|
|
8383
8416
|
}
|
|
8417
|
+
const runKey = worktreeRunProcessKey(thread.worktreePath, resolvedName);
|
|
8418
|
+
const inFlight = this.startingDev.get(runKey);
|
|
8419
|
+
if (inFlight) return inFlight;
|
|
8420
|
+
const start = this.startDevUnlocked(thread, resolvedName, scriptName, scripts, runKey);
|
|
8421
|
+
this.startingDev.set(runKey, start);
|
|
8422
|
+
try {
|
|
8423
|
+
return await start;
|
|
8424
|
+
} finally {
|
|
8425
|
+
this.startingDev.delete(runKey);
|
|
8426
|
+
}
|
|
8427
|
+
}
|
|
8428
|
+
async startDevUnlocked(thread, resolvedName, scriptName, scripts, runKey) {
|
|
8384
8429
|
const siblings = threadsSharingWorktree(thread.worktreePath);
|
|
8385
8430
|
const shared = mergeWorktreeActiveRuns(siblings);
|
|
8386
|
-
const runKey = worktreeRunProcessKey(thread.worktreePath, resolvedName);
|
|
8387
8431
|
const existing = this.processes.get(runKey) ?? siblings.map((t) => this.processes.get(`${t.id}:run:${resolvedName}`)).find(Boolean);
|
|
8388
8432
|
const active = shared.activeRuns.find((r) => r.scriptName === resolvedName);
|
|
8389
8433
|
if (existing && active) {
|
|
@@ -8395,6 +8439,14 @@ var Orchestrator = class {
|
|
|
8395
8439
|
return { port: shared.devPort, scriptName: resolvedName, ports: [shared.devPort] };
|
|
8396
8440
|
}
|
|
8397
8441
|
}
|
|
8442
|
+
if (active && !existing) {
|
|
8443
|
+
killListenersOnPorts(collectActiveRunPorts([active]));
|
|
8444
|
+
this.syncWorktreeRuns(
|
|
8445
|
+
thread.worktreePath,
|
|
8446
|
+
shared.activeRuns.filter((r) => r.scriptName !== resolvedName),
|
|
8447
|
+
shared.devPort === active.port ? null : shared.devPort
|
|
8448
|
+
);
|
|
8449
|
+
}
|
|
8398
8450
|
const mode = getRunMode(thread.worktreePath, thread.repoPath);
|
|
8399
8451
|
if (mode === "nonconcurrent") {
|
|
8400
8452
|
const here = normalizeWorktreePath(thread.worktreePath);
|
|
@@ -8443,6 +8495,7 @@ var Orchestrator = class {
|
|
|
8443
8495
|
kill: handle.kill
|
|
8444
8496
|
});
|
|
8445
8497
|
}
|
|
8498
|
+
const latestShared = mergeWorktreeActiveRuns(threadsSharingWorktree(thread.worktreePath));
|
|
8446
8499
|
const run2 = {
|
|
8447
8500
|
scriptName: resolvedName,
|
|
8448
8501
|
port: handle.port,
|
|
@@ -8450,13 +8503,13 @@ var Orchestrator = class {
|
|
|
8450
8503
|
startedAt
|
|
8451
8504
|
};
|
|
8452
8505
|
const nextRuns = [
|
|
8453
|
-
...
|
|
8506
|
+
...latestShared.activeRuns.filter((r) => r.scriptName !== resolvedName),
|
|
8454
8507
|
run2
|
|
8455
8508
|
];
|
|
8456
8509
|
this.syncWorktreeRuns(
|
|
8457
8510
|
thread.worktreePath,
|
|
8458
8511
|
nextRuns,
|
|
8459
|
-
isDefault ? handle.port :
|
|
8512
|
+
isDefault ? handle.port : latestShared.devPort
|
|
8460
8513
|
);
|
|
8461
8514
|
this.emit({
|
|
8462
8515
|
type: "dev_server_started",
|
package/dist/index.cjs
CHANGED
|
@@ -17421,61 +17421,103 @@ function getRunScript(worktreePath, repoPath, name) {
|
|
|
17421
17421
|
function getRunMode(worktreePath, repoPath) {
|
|
17422
17422
|
return loadWorkspaceSettings(worktreePath, repoPath)?.runMode ?? "concurrent";
|
|
17423
17423
|
}
|
|
17424
|
-
async function
|
|
17424
|
+
async function reservePort() {
|
|
17425
17425
|
return new Promise((resolve, reject) => {
|
|
17426
17426
|
const server = (0, import_node_net.createServer)();
|
|
17427
|
+
let released = false;
|
|
17428
|
+
const release = () => new Promise((res) => {
|
|
17429
|
+
if (released) {
|
|
17430
|
+
res();
|
|
17431
|
+
return;
|
|
17432
|
+
}
|
|
17433
|
+
released = true;
|
|
17434
|
+
server.close(() => res());
|
|
17435
|
+
});
|
|
17427
17436
|
server.listen(0, "127.0.0.1", () => {
|
|
17428
17437
|
const addr = server.address();
|
|
17429
17438
|
if (!addr || typeof addr === "string") {
|
|
17430
|
-
|
|
17431
|
-
reject(new Error("Failed to allocate port"));
|
|
17439
|
+
void release().then(() => reject(new Error("Failed to allocate port")));
|
|
17432
17440
|
return;
|
|
17433
17441
|
}
|
|
17434
|
-
|
|
17435
|
-
server.close((err) => err ? reject(err) : resolve(port));
|
|
17442
|
+
resolve({ port: addr.port, release });
|
|
17436
17443
|
});
|
|
17437
17444
|
server.on("error", reject);
|
|
17438
17445
|
});
|
|
17439
17446
|
}
|
|
17440
|
-
async function
|
|
17441
|
-
const
|
|
17442
|
-
|
|
17443
|
-
|
|
17444
|
-
|
|
17445
|
-
|
|
17446
|
-
|
|
17447
|
-
|
|
17448
|
-
|
|
17449
|
-
|
|
17450
|
-
|
|
17447
|
+
async function allocatePort() {
|
|
17448
|
+
const held = await reservePort();
|
|
17449
|
+
await held.release();
|
|
17450
|
+
return held.port;
|
|
17451
|
+
}
|
|
17452
|
+
async function tryReservePort(port) {
|
|
17453
|
+
return new Promise((resolve) => {
|
|
17454
|
+
const server = (0, import_node_net.createServer)();
|
|
17455
|
+
let released = false;
|
|
17456
|
+
const release = () => new Promise((res) => {
|
|
17457
|
+
if (released) {
|
|
17458
|
+
res();
|
|
17459
|
+
return;
|
|
17460
|
+
}
|
|
17461
|
+
released = true;
|
|
17462
|
+
server.close(() => res());
|
|
17451
17463
|
});
|
|
17452
|
-
|
|
17453
|
-
|
|
17454
|
-
|
|
17455
|
-
|
|
17464
|
+
server.once("error", () => resolve(null));
|
|
17465
|
+
server.listen(port, "127.0.0.1", () => {
|
|
17466
|
+
resolve({ port, release });
|
|
17467
|
+
});
|
|
17468
|
+
});
|
|
17469
|
+
}
|
|
17470
|
+
async function reservePortRange(size = PORT_RANGE_SIZE) {
|
|
17471
|
+
const held = [await reservePort()];
|
|
17472
|
+
const base = held[0].port;
|
|
17473
|
+
try {
|
|
17474
|
+
for (let i = 1; i < size; i++) {
|
|
17475
|
+
const candidate = base + i;
|
|
17476
|
+
const next = await tryReservePort(candidate);
|
|
17477
|
+
if (next) {
|
|
17478
|
+
held.push(next);
|
|
17479
|
+
} else {
|
|
17480
|
+
held.push(await reservePort());
|
|
17481
|
+
}
|
|
17456
17482
|
}
|
|
17483
|
+
return held;
|
|
17484
|
+
} catch (err) {
|
|
17485
|
+
await Promise.all(held.map((h) => h.release()));
|
|
17486
|
+
throw err;
|
|
17457
17487
|
}
|
|
17488
|
+
}
|
|
17489
|
+
async function allocatePortRange(size = PORT_RANGE_SIZE) {
|
|
17490
|
+
const held = await reservePortRange(size);
|
|
17491
|
+
const ports = held.map((h) => h.port);
|
|
17492
|
+
await Promise.all(held.map((h) => h.release()));
|
|
17458
17493
|
return ports;
|
|
17459
17494
|
}
|
|
17460
17495
|
async function startDevServer(repoPath, worktreePath, onLine, opts) {
|
|
17461
17496
|
const script = getRunScript(worktreePath, repoPath, opts?.scriptName);
|
|
17462
17497
|
if (!script) return null;
|
|
17463
|
-
const
|
|
17464
|
-
const
|
|
17465
|
-
|
|
17466
|
-
|
|
17467
|
-
|
|
17468
|
-
|
|
17469
|
-
|
|
17470
|
-
|
|
17471
|
-
|
|
17472
|
-
|
|
17473
|
-
|
|
17474
|
-
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
|
|
17478
|
-
|
|
17498
|
+
const held = await reservePortRange(PORT_RANGE_SIZE);
|
|
17499
|
+
const ports = held.map((h) => h.port);
|
|
17500
|
+
try {
|
|
17501
|
+
await Promise.all(held.map((h) => h.release()));
|
|
17502
|
+
const handle = await spawnWorkspaceScript(script.command, {
|
|
17503
|
+
worktreePath,
|
|
17504
|
+
repoPath,
|
|
17505
|
+
ports,
|
|
17506
|
+
defaultBranch: opts?.defaultBranch,
|
|
17507
|
+
onLine
|
|
17508
|
+
});
|
|
17509
|
+
return {
|
|
17510
|
+
pid: handle.pid,
|
|
17511
|
+
port: ports[0],
|
|
17512
|
+
ports,
|
|
17513
|
+
scriptName: script.name,
|
|
17514
|
+
kill: handle.kill,
|
|
17515
|
+
done: handle.done
|
|
17516
|
+
};
|
|
17517
|
+
} catch (err) {
|
|
17518
|
+
await Promise.all(held.map((h) => h.release()));
|
|
17519
|
+
throw err;
|
|
17520
|
+
}
|
|
17479
17521
|
}
|
|
17480
17522
|
var import_node_fs41, import_node_child_process5, import_node_net, import_node_path43, import_execa4, import_node_readline3, PORT_RANGE_SIZE, cachedLoginEnv;
|
|
17481
17523
|
var init_conductor = __esm({
|
|
@@ -23455,6 +23497,8 @@ var init_orchestrator = __esm({
|
|
|
23455
23497
|
/** Auto-continues after a worktree turn ended while a detached job still runs. */
|
|
23456
23498
|
jobContinueCount = /* @__PURE__ */ new Map();
|
|
23457
23499
|
jobContinueNudged = /* @__PURE__ */ new Set();
|
|
23500
|
+
/** In-flight startDev per worktree run key — agent MCP + UI Start must not double-spawn. */
|
|
23501
|
+
startingDev = /* @__PURE__ */ new Map();
|
|
23458
23502
|
maxConcurrent;
|
|
23459
23503
|
runningCount = 0;
|
|
23460
23504
|
constructor(opts) {
|
|
@@ -24672,9 +24716,20 @@ var init_orchestrator = __esm({
|
|
|
24672
24716
|
"No run script found for this worktree. Add [scripts.run.*] in the worktree\u2019s .sideboard/settings.toml or .conductor/settings.toml (or settings.local.toml on the main repo)."
|
|
24673
24717
|
);
|
|
24674
24718
|
}
|
|
24719
|
+
const runKey = worktreeRunProcessKey(thread.worktreePath, resolvedName);
|
|
24720
|
+
const inFlight = this.startingDev.get(runKey);
|
|
24721
|
+
if (inFlight) return inFlight;
|
|
24722
|
+
const start = this.startDevUnlocked(thread, resolvedName, scriptName, scripts, runKey);
|
|
24723
|
+
this.startingDev.set(runKey, start);
|
|
24724
|
+
try {
|
|
24725
|
+
return await start;
|
|
24726
|
+
} finally {
|
|
24727
|
+
this.startingDev.delete(runKey);
|
|
24728
|
+
}
|
|
24729
|
+
}
|
|
24730
|
+
async startDevUnlocked(thread, resolvedName, scriptName, scripts, runKey) {
|
|
24675
24731
|
const siblings = threadsSharingWorktree(thread.worktreePath);
|
|
24676
24732
|
const shared = mergeWorktreeActiveRuns(siblings);
|
|
24677
|
-
const runKey = worktreeRunProcessKey(thread.worktreePath, resolvedName);
|
|
24678
24733
|
const existing = this.processes.get(runKey) ?? siblings.map((t) => this.processes.get(`${t.id}:run:${resolvedName}`)).find(Boolean);
|
|
24679
24734
|
const active = shared.activeRuns.find((r) => r.scriptName === resolvedName);
|
|
24680
24735
|
if (existing && active) {
|
|
@@ -24686,6 +24741,14 @@ var init_orchestrator = __esm({
|
|
|
24686
24741
|
return { port: shared.devPort, scriptName: resolvedName, ports: [shared.devPort] };
|
|
24687
24742
|
}
|
|
24688
24743
|
}
|
|
24744
|
+
if (active && !existing) {
|
|
24745
|
+
killListenersOnPorts(collectActiveRunPorts([active]));
|
|
24746
|
+
this.syncWorktreeRuns(
|
|
24747
|
+
thread.worktreePath,
|
|
24748
|
+
shared.activeRuns.filter((r) => r.scriptName !== resolvedName),
|
|
24749
|
+
shared.devPort === active.port ? null : shared.devPort
|
|
24750
|
+
);
|
|
24751
|
+
}
|
|
24689
24752
|
const mode = getRunMode(thread.worktreePath, thread.repoPath);
|
|
24690
24753
|
if (mode === "nonconcurrent") {
|
|
24691
24754
|
const here = normalizeWorktreePath(thread.worktreePath);
|
|
@@ -24734,6 +24797,7 @@ var init_orchestrator = __esm({
|
|
|
24734
24797
|
kill: handle.kill
|
|
24735
24798
|
});
|
|
24736
24799
|
}
|
|
24800
|
+
const latestShared = mergeWorktreeActiveRuns(threadsSharingWorktree(thread.worktreePath));
|
|
24737
24801
|
const run2 = {
|
|
24738
24802
|
scriptName: resolvedName,
|
|
24739
24803
|
port: handle.port,
|
|
@@ -24741,13 +24805,13 @@ var init_orchestrator = __esm({
|
|
|
24741
24805
|
startedAt
|
|
24742
24806
|
};
|
|
24743
24807
|
const nextRuns = [
|
|
24744
|
-
...
|
|
24808
|
+
...latestShared.activeRuns.filter((r) => r.scriptName !== resolvedName),
|
|
24745
24809
|
run2
|
|
24746
24810
|
];
|
|
24747
24811
|
this.syncWorktreeRuns(
|
|
24748
24812
|
thread.worktreePath,
|
|
24749
24813
|
nextRuns,
|
|
24750
|
-
isDefault ? handle.port :
|
|
24814
|
+
isDefault ? handle.port : latestShared.devPort
|
|
24751
24815
|
);
|
|
24752
24816
|
this.emit({
|
|
24753
24817
|
type: "dev_server_started",
|
|
@@ -26569,6 +26633,8 @@ __export(index_exports, {
|
|
|
26569
26633
|
requestOccupancy: () => requestOccupancy,
|
|
26570
26634
|
requestReview: () => requestReview,
|
|
26571
26635
|
requireAgent: () => requireAgent,
|
|
26636
|
+
reservePort: () => reservePort,
|
|
26637
|
+
reservePortRange: () => reservePortRange,
|
|
26572
26638
|
resetGhStackDetectCache: () => resetGhStackDetectCache,
|
|
26573
26639
|
resetGithubAgentTokenMemo: () => resetGithubAgentTokenMemo,
|
|
26574
26640
|
resolveAbleTimeOAuthHost: () => resolveAbleTimeOAuthHost,
|
|
@@ -35380,6 +35446,8 @@ init_outbound_watch();
|
|
|
35380
35446
|
requestOccupancy,
|
|
35381
35447
|
requestReview,
|
|
35382
35448
|
requireAgent,
|
|
35449
|
+
reservePort,
|
|
35450
|
+
reservePortRange,
|
|
35383
35451
|
resetGhStackDetectCache,
|
|
35384
35452
|
resetGithubAgentTokenMemo,
|
|
35385
35453
|
resolveAbleTimeOAuthHost,
|
package/dist/index.d.cts
CHANGED
|
@@ -3929,8 +3929,25 @@ declare function listRunScripts(worktreePath: string, repoPath?: string | null):
|
|
|
3929
3929
|
declare function getDefaultRunScript(worktreePath: string, repoPath?: string | null): RunScript | null;
|
|
3930
3930
|
declare function getRunScript(worktreePath: string, repoPath: string | null | undefined, name?: string | null): RunScript | null;
|
|
3931
3931
|
declare function getRunMode(worktreePath: string, repoPath?: string | null): 'concurrent' | 'nonconcurrent';
|
|
3932
|
+
type PortReservation = {
|
|
3933
|
+
port: number;
|
|
3934
|
+
/** Stop holding the port so a child can bind it. Idempotent. */
|
|
3935
|
+
release: () => Promise<void>;
|
|
3936
|
+
};
|
|
3937
|
+
/**
|
|
3938
|
+
* Bind an ephemeral port and keep the socket open until `release()`.
|
|
3939
|
+
* Closing then rebinding races other worktrees / agents (TOCTOU) — especially
|
|
3940
|
+
* with Vite `strictPort: true`, which fails Start instead of falling back.
|
|
3941
|
+
*/
|
|
3942
|
+
declare function reservePort(): Promise<PortReservation>;
|
|
3943
|
+
/** @deprecated Prefer reservePort — releasing immediately reopens the race. */
|
|
3932
3944
|
declare function allocatePort(): Promise<number>;
|
|
3933
|
-
/**
|
|
3945
|
+
/**
|
|
3946
|
+
* Hold a block of ports (Conductor: CONDUCTOR_PORT … +9) until release.
|
|
3947
|
+
* Callers must `release()` immediately before spawning the child that binds them.
|
|
3948
|
+
*/
|
|
3949
|
+
declare function reservePortRange(size?: number): Promise<PortReservation[]>;
|
|
3950
|
+
/** Allocate a contiguous block, releasing holds immediately (legacy / tests). */
|
|
3934
3951
|
declare function allocatePortRange(size?: number): Promise<number[]>;
|
|
3935
3952
|
interface DevServerHandle {
|
|
3936
3953
|
pid: number | undefined;
|
|
@@ -4726,6 +4743,8 @@ declare class Orchestrator {
|
|
|
4726
4743
|
/** Auto-continues after a worktree turn ended while a detached job still runs. */
|
|
4727
4744
|
private readonly jobContinueCount;
|
|
4728
4745
|
private readonly jobContinueNudged;
|
|
4746
|
+
/** In-flight startDev per worktree run key — agent MCP + UI Start must not double-spawn. */
|
|
4747
|
+
private readonly startingDev;
|
|
4729
4748
|
private maxConcurrent;
|
|
4730
4749
|
private runningCount;
|
|
4731
4750
|
constructor(opts?: {
|
|
@@ -4857,6 +4876,7 @@ declare class Orchestrator {
|
|
|
4857
4876
|
scriptName: string;
|
|
4858
4877
|
ports: number[];
|
|
4859
4878
|
}>;
|
|
4879
|
+
private startDevUnlocked;
|
|
4860
4880
|
stopDev(threadRef: string, scriptName?: string): void;
|
|
4861
4881
|
/**
|
|
4862
4882
|
* App quit: tear down every registered run/setup child and free persisted
|
|
@@ -6937,4 +6957,4 @@ declare function pollSlackOutboundWatches(opts?: {
|
|
|
6937
6957
|
now?: number;
|
|
6938
6958
|
}): Promise<void>;
|
|
6939
6959
|
|
|
6940
|
-
export { ABLETIME_MCP_PATH, ABLETIME_MCP_PM_PATH, ABLETIME_OAUTH_CALLBACK_PATH, ABLETIME_OAUTH_CANCELLED, ABLETIME_OAUTH_LOCAL_CALLBACK, ABLETIME_OAUTH_PORT, ABLETIME_OAUTH_REDIRECT, ABLETIME_OAUTH_RESOURCE, ABLETIME_OAUTH_TOKEN_PREFIX, ABLETIME_ORG_KEY_PREFIX, ABLETIME_PAT_PREFIX, ABLETIME_PM_TOOL_NAMES, AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, ATTACHMENTS_DIR, type AbleTimeAssignedIssuesResult, type AbleTimeComment, type AbleTimeCredentialKind, type AbleTimeMcpToolName, AbleTimeOAuthCancelledError, type AbleTimeOrientation, type AbleTimePmToolName, type AbleTimeProject, type AbleTimeTask, type AbleTimeTaskRelationInput, type AbleTimeViewer, type AccountProfile, type ActiveRun, type AddBoardPinInput, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BAKED_ABLETIME_OAUTH_CLIENT_ID, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, BRIGHTSY_OAUTH_CLIENT_ID, BRIGHTSY_OAUTH_REDIRECT, BRIGHTSY_SUMMARIZE_CONTEXT_TOOL, BUNDLED_LONG_RUNNING_PATH, BUNDLED_SKILL_PREFIX, type BoardPin, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CHARS_PER_CONTEXT_TOKEN, CLAUDE_MODEL_CATALOG, CLI_DIR, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, CONTEXT_REVIEW_PATH, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeExtraUsage, type ClaudeHarnessSettings, type ClaudePlanUsage, type ClaudeUsageWindow, type ClaudeUsageWindowId, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CodeLineRange, type CodeRefInput, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, DEFAULT_ABLETIME_HOST, DEFAULT_WORKTREE_SORT, DETACHED_JOBS_DIR, type DefaultsAppSettings, type DefaultsSettingsPatch, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type EnsuredReviewGuidelines, type ExpandResult, FAMOUS_SOCCER_TEAMS, FOLLOW_UP_BEHAVIORS, type FastForwardMainResult, type FollowUpBehavior, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GITHUB_GIT_AUTH_MODES, GITHUB_PR_BODY_MAX_CHARS, GITHUB_PR_BODY_SAFE_CHARS, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubIssue, type GitHubIssueComment, type GitHubIssueRelationInput, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, HISTORY_DISCARDED_TEXT, HISTORY_MAX_COUNT_DEFAULT, HISTORY_MAX_COUNT_MAX, HISTORY_MAX_COUNT_MIN, HISTORY_MAX_DAYS_DEFAULT, HISTORY_MAX_DAYS_MAX, HOME_BOARD_CACHE_TTL_MS, type HarnessId, type HistoryCleanupResult, type HistoryRetentionPlan, type HomeBoardLoaded, type HomeBoardRemoteData, IMPLIED_TICKET_RESOLVE_PROMPT, ISSUE_SOURCE_LABELS, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueActivityComment, type IssueAssigneeFilter, type IssueCycleInfo, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_DETACHED_JOBS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LIGHT_RECONCILE_THROTTLE_MS, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, LIVE_TURN_SPAWN_GRACE_MS, LONG_RUNNING_SKILL_COMMAND, type LandPreview, type LandResult, type LinearAssignedIssuesResult, type LinearAssigneeFilter, type LinearComment, type LinearCycle, type LinearIssue, type LinearIssueAttachment, type LinearIssueComment, type LinearIssueRef, type LinearIssueRelation, type LinearIssueRelationInput, type LinearNamedRef, LinearOAuthCancelledError, type LinearProjectRef, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesOptions, type ListIssuesResult, type ListPrsOptions, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, OPTIONAL_SERVICES, OPTIONAL_SERVICE_IDS, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OptionalServiceCliStatus, type OptionalServiceId, type OptionalServiceSpec, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorDefaultsSettings, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, PLAN_QUESTION_ANSWERS_PREFIX, PROFILE_NOTES_MAX, PR_DETAILS_JSON_FIELDS, type PathRefInput, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type ProjectProfileSettings, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedAccountProfile, type ResolvedReviewGuidelines, type ResolvedThreadDefaults, type ResolvedViewerProfile, type ReviewGuidelinesSource, type RunMode, type RunScript, SEED_FULL_TOOL_MESSAGES, SEED_MAX_CHARS, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, STDERR_EVENT_MAX_CHARS, STDOUT_EVENT_MAX_CHARS, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SessionSeedOptions, type SetupLogSnapshot, type SetupRunResult, type SidebarGitAction, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, THINKING_PART_MAX_CHARS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, USAGE_ON_LIMIT_VALUES, type UpdateScheduledTaskPatch, type UsageOnLimit, type UsageScope, type ViewerContextWriteResult, type ViewerProfile, WORKTREE_ABLETIME_MCP_TOOLS, WORKTREE_GITHUB_MCP_TOOLS, WORKTREE_LINEAR_MCP_TOOLS, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, type WorktreeDirtyStat, type WorktreeSortMode, type WorktreeStatKind, ableTimeCredentialKind, ableTimeDependencyTarget, ableTimeOAuthAuthorizeUrl, ableTimeOAuthBouncePage, ableTimeOAuthClientId, ableTimeOAuthLocalBounceUrl, ableTimeOAuthRedirectUri, ableTimeOAuthResource, ableTimeUsesRest, abletimeMcpRequest, abletimeMcpUrl, abletimeToolUsesPm, ackSlackInboundSeen, addBoardPin, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, alignQueueAttachments, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, appendQueuedItem, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyForwardOccupancy, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applySystemCaEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, assertAbleTimeCredential, assertAbleTimeMcpCredential, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupHistoryEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAccessTokenNeedsRefresh, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildBrightsySessionSeed, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildCodeRefAttachment, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildLinearIssueFilter, buildPastedTextAttachment, buildPathRefAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, callAbleTimeTool, canonicalizeRepoPath, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, clampGithubPrBody, clampHistoryMaxCount, clampHistoryMaxDays, classifyWorktreeColumn, claudeAdapter, claudeChromeEnabled, claudeUsageOverLimitWindows, claudeUserSettingsPath, cleanupArchivedHistory, cleanupOrphanWorktrees, clearBoardPins, clearHomeBoardCache, clipAgentEventForPaint, clipThinkingForStore, cloneRepoIntoSideboard, codeRefRangeLabel, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentAbleTimeTask, commentGitHubIssue, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmClaudeUsageOverLimitEnabled, confirmLand, connectBrightsyTeam, connectOptionalService, connectSlackToken, connectedOptionalServices, connectedPrSelectors, consumeComposerAttachments, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, countUnpushedVsOrigin, cowboyModeEnabled, createAbleTimePkce, createAbleTimeTask, createChatTab, createEmptyThread, createExistingBranchWorktree, createGitHubIssue, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, detectOptionalServiceClis, disconnectAbleTimeConnection, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectOptionalService, disconnectSlackWorkspace, discoverSkills, dropCachedPrefixOnResume, emptyPublicIntegrations, emptySetupLog, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAbleTimeAccessToken, ensureAbleTimeTask, ensureAgentPath, ensureBrightsyLocalConfigFresh, ensureBrightsyOAuthClientId, ensureCloudCoordinator, ensureConnectedBrightsyTeamTokens, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewGuidelinesFile, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateOccupancyTokens, estimateThreadChars, examplePrefixedBranch, expandComposerPrompt, extractBrightsyContextSummary, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fastForwardMainCheckoutIfSafe, fetchOriginForWorktree, fetchPrHead, finalizeParts, findConventionSetup, findInvalidCacheControlTtlOrder, findLastBrightsyContextSummary, findLiveThreadForCreate, findLiveThreadForCreateSource, findOrphanWorktrees, findProjectProfileKey, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, flipLinearRelationType, foldLegacyRolesIntoNotes, followUpBehavior, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAccountProfilePlaybookLine, formatArtifactDirective, formatBrightsyFetchError, formatClaudeExtraUsageDetail, formatClaudeUsageCompact, formatClaudeUsageFetchedAt, formatClaudeUsageOverLimitConfirm, formatClaudeUsageOverLimitWait, formatClaudeUsageReset, formatClaudeUsageResetClock, formatClaudeUsageTooltip, formatDetachedJobInvoke, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatIssueToolsDirective, formatIssueToolsReminder, formatLinearDirective, formatLinearReminder, formatLongRunningDirective, formatLongRunningReminder, formatMergePrError, formatMessagesAsTranscript, formatOptionalServicesDirective, formatOptionalServicesReminder, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatPrGateDirective, formatProcessGuideDirective, formatProjectProfilePlaybookLines, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, formatTranscriptMarkdown, formatUiReminder, formatViewerContextDirective, formatViewerContextReminder, formatWorkspaceInventory, formatWorkspaceProfileSuffix, formatWorktreeDirective, formatWorktreeReminder, forwardContextUsage, forwardOccupancyTokens, fromInclusiveInputUsage, getAbleTimeAccessToken, getAbleTimeHost, getAbleTimeOrientation, getAbleTimeTask, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getClaudePlanUsage, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubIssue, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getHomeBoardInputs, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, getWorktreeDirtyStat, gh, ghHeadRef, ghRepoSelectArgs, git, gitBranchPrefixSetting, githubAgentGitEnv, githubHttpsInsteadOfEntries, githubRelationEditFlag, globalAgentCwd, groupHomeBoardWorktrees, handleSlackInbound, harnessEnvKey, hasBakedAbleTimeOAuth, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, historyMaxCount, historyMaxDays, hottestClaudeWindow, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, installNpmGlobalPackage, installOptionalServiceCli, interruptSlackCoordinatorForInbound, invalidateThreadListCache, invalidateThreadRecord, isAbleTimeConnected, isAbleTimeOAuthCancelled, isAbleTimeRejectedCredential, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorApiKeyConfigured, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhPrBodyTooLongError, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isHistoryRetentionStub, isHomeBoardThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isInjectedOrchMcpName, isInternalAgentStatusText, isIssueSourceConnected, isLinearConnected, isLinearNoneToken, isLinearOAuthCancelled, isOptionalServiceId, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPlanQuestionAnswersMessage, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSelfWrittenRecord, isSessionQuotaLimit, isSetupLastError, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isStaleLastErrorDuringTurn, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isUsageOnLimit, isWorkspaceScratchPath, issueAttachmentForAbleTimeTask, issueMatchesAssignee, issueSourceLabel, issueTicketFromThread, killListenersOnPorts, lastAssistantMessageText, lastRequestOccupancy, latestPendingPlanQuestions, linearAuthorizationHeader, linearCycleIsActive, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, linearRelationCreateInput, linearTicketIdFromThread, listAbleTimeAssignedIssues, listAbleTimeProjects, listAbleTimeTasks, listAgentSetupInfo, listBoardPins, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssueCommentsSince, listGitHubIssues, listGlobalThreads, listIssues, listLinearAssignedIssues, listLinearCommentsSince, listLinearIssues, listLinearIssuesDirect, listLinearIssuesFiltered, listLinearTeamCycles, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadHomeBoardInputs, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, mapAbleTimeTask, markPrReady, materializeSystemCaBundle, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAllowToolsFromNames, mcpAuthWarnings, mcpStatusThinkingFromClaudeInit, mentionsPrGoal, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSetupOutput, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, messagesSinceLastBrightsyContextSummary, moveQueuedItemToFront, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeAbleTimeCredential, normalizeAbleTimeHost, normalizeBrightsyEndpoint, normalizeCodeSelection, normalizeLinearRelationType, normalizeParseResult, normalizeServiceOrigin, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, optionalServiceConnected, optionalServiceSpec, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originFetchBranch, originGhRepoEnv, packagedDetachedJobPath, parseAbleTimeOAuthCallbackUrl, parseClaudeUsagePayload, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGitHubIssueNumber, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parsePrDetailsView, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permissionMode, persistPendingFileAttachments, persistVaultKeyInKeychain, planFileAbs, planHistoryAgePurge, planHistoryRetention, planQuestionsSignature, pollSlackOutboundWatches, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, prependQueuedItem, previewLand, primaryCheckoutFromLinkedWorktree, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSetupLog, readSkillBody, readThread, readViewerContext, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshBrightsyAccessToken, refreshGitHubAuth, registerBrightsyOAuthClient, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeBoardPin, removeQueuedItem, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAbleTimeOAuthHost, resolveAccountProfile, resolveAccountProfileFromSettings, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCreateFirstPrompt, resolveCursorModelId, resolveDefaultBranch, resolveDetachedJobScript, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitBranchPrefix, resolveGitDirsForLockRecovery, resolveGitHubIssueRepo, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearCycle, resolveLinearLabel, resolveLinearProject, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewOrchestratorOptions, resolveNewThreadOptions, resolveOrchChildFollowUp, resolveOrchestratorDefaults, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSendFollowUp, resolveSidebarGitPrompt, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveUsageOnLimit, resolveVaultKey, resolveViewerProfile, resolveViewerProfileForRepo, resolveWorktreeStartPoint, rewriteAbleTimeError, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeGitBranchPrefix, sanitizeMcpServerName, saveAbleTimeConnection, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, searchAbleTimeTasks, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shiftQueuedItem, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunHistoryCleanup, shouldRunWorktreeCleanup, shouldStampSetupLastError, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slimMessagesForUiList, slimThreadForUiList, slugify, spawnAgentTurn, splitForCompaction, splitTurnInputForSystemPrompt, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startAbleTimeOAuth, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, statWorktreePath, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takePendingTurnAttachments, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, taskUrl, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadHasCompactedContext, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, ticketSlugForBranch, toAbleTimeIssueInfo, toGitHubIssueInfo, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, trustSystemCertificates, turnCostUsdFromCursorUsage, updateAbleTimeTask, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateGitHubIssue, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateProjectProfileSettings, updateSchedule, updateThread, usageOnLimit, userClaudeMcpConfigPath, userCursorMcpConfigPath, userMcpNamesToDisable, validateLinearApiKey, verifyAbleTimeConnection, verifyOptionalService, visibleToolRowDetail, waitForPidExit, warmGithubAgentAuth, whichOnPath, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeBoardStatus, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreeSlugForTicket, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeViewerContext, writeWorktreeFile };
|
|
6960
|
+
export { ABLETIME_MCP_PATH, ABLETIME_MCP_PM_PATH, ABLETIME_OAUTH_CALLBACK_PATH, ABLETIME_OAUTH_CANCELLED, ABLETIME_OAUTH_LOCAL_CALLBACK, ABLETIME_OAUTH_PORT, ABLETIME_OAUTH_REDIRECT, ABLETIME_OAUTH_RESOURCE, ABLETIME_OAUTH_TOKEN_PREFIX, ABLETIME_ORG_KEY_PREFIX, ABLETIME_PAT_PREFIX, ABLETIME_PM_TOOL_NAMES, AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, ATTACHMENTS_DIR, type AbleTimeAssignedIssuesResult, type AbleTimeComment, type AbleTimeCredentialKind, type AbleTimeMcpToolName, AbleTimeOAuthCancelledError, type AbleTimeOrientation, type AbleTimePmToolName, type AbleTimeProject, type AbleTimeTask, type AbleTimeTaskRelationInput, type AbleTimeViewer, type AccountProfile, type ActiveRun, type AddBoardPinInput, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BAKED_ABLETIME_OAUTH_CLIENT_ID, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, BRIGHTSY_OAUTH_CLIENT_ID, BRIGHTSY_OAUTH_REDIRECT, BRIGHTSY_SUMMARIZE_CONTEXT_TOOL, BUNDLED_LONG_RUNNING_PATH, BUNDLED_SKILL_PREFIX, type BoardPin, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CHARS_PER_CONTEXT_TOKEN, CLAUDE_MODEL_CATALOG, CLI_DIR, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, CONTEXT_REVIEW_PATH, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeExtraUsage, type ClaudeHarnessSettings, type ClaudePlanUsage, type ClaudeUsageWindow, type ClaudeUsageWindowId, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CodeLineRange, type CodeRefInput, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, DEFAULT_ABLETIME_HOST, DEFAULT_WORKTREE_SORT, DETACHED_JOBS_DIR, type DefaultsAppSettings, type DefaultsSettingsPatch, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type EnsuredReviewGuidelines, type ExpandResult, FAMOUS_SOCCER_TEAMS, FOLLOW_UP_BEHAVIORS, type FastForwardMainResult, type FollowUpBehavior, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GITHUB_GIT_AUTH_MODES, GITHUB_PR_BODY_MAX_CHARS, GITHUB_PR_BODY_SAFE_CHARS, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubIssue, type GitHubIssueComment, type GitHubIssueRelationInput, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, HISTORY_DISCARDED_TEXT, HISTORY_MAX_COUNT_DEFAULT, HISTORY_MAX_COUNT_MAX, HISTORY_MAX_COUNT_MIN, HISTORY_MAX_DAYS_DEFAULT, HISTORY_MAX_DAYS_MAX, HOME_BOARD_CACHE_TTL_MS, type HarnessId, type HistoryCleanupResult, type HistoryRetentionPlan, type HomeBoardLoaded, type HomeBoardRemoteData, IMPLIED_TICKET_RESOLVE_PROMPT, ISSUE_SOURCE_LABELS, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueActivityComment, type IssueAssigneeFilter, type IssueCycleInfo, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_DETACHED_JOBS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LIGHT_RECONCILE_THROTTLE_MS, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, LIVE_TURN_SPAWN_GRACE_MS, LONG_RUNNING_SKILL_COMMAND, type LandPreview, type LandResult, type LinearAssignedIssuesResult, type LinearAssigneeFilter, type LinearComment, type LinearCycle, type LinearIssue, type LinearIssueAttachment, type LinearIssueComment, type LinearIssueRef, type LinearIssueRelation, type LinearIssueRelationInput, type LinearNamedRef, LinearOAuthCancelledError, type LinearProjectRef, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesOptions, type ListIssuesResult, type ListPrsOptions, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, OPTIONAL_SERVICES, OPTIONAL_SERVICE_IDS, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OptionalServiceCliStatus, type OptionalServiceId, type OptionalServiceSpec, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorDefaultsSettings, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, PLAN_QUESTION_ANSWERS_PREFIX, PROFILE_NOTES_MAX, PR_DETAILS_JSON_FIELDS, type PathRefInput, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PortReservation, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type ProjectProfileSettings, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedAccountProfile, type ResolvedReviewGuidelines, type ResolvedThreadDefaults, type ResolvedViewerProfile, type ReviewGuidelinesSource, type RunMode, type RunScript, SEED_FULL_TOOL_MESSAGES, SEED_MAX_CHARS, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, STDERR_EVENT_MAX_CHARS, STDOUT_EVENT_MAX_CHARS, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SessionSeedOptions, type SetupLogSnapshot, type SetupRunResult, type SidebarGitAction, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, THINKING_PART_MAX_CHARS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, USAGE_ON_LIMIT_VALUES, type UpdateScheduledTaskPatch, type UsageOnLimit, type UsageScope, type ViewerContextWriteResult, type ViewerProfile, WORKTREE_ABLETIME_MCP_TOOLS, WORKTREE_GITHUB_MCP_TOOLS, WORKTREE_LINEAR_MCP_TOOLS, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, type WorktreeDirtyStat, type WorktreeSortMode, type WorktreeStatKind, ableTimeCredentialKind, ableTimeDependencyTarget, ableTimeOAuthAuthorizeUrl, ableTimeOAuthBouncePage, ableTimeOAuthClientId, ableTimeOAuthLocalBounceUrl, ableTimeOAuthRedirectUri, ableTimeOAuthResource, ableTimeUsesRest, abletimeMcpRequest, abletimeMcpUrl, abletimeToolUsesPm, ackSlackInboundSeen, addBoardPin, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, alignQueueAttachments, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, appendQueuedItem, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyForwardOccupancy, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applySystemCaEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, assertAbleTimeCredential, assertAbleTimeMcpCredential, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupHistoryEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAccessTokenNeedsRefresh, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildBrightsySessionSeed, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildCodeRefAttachment, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildLinearIssueFilter, buildPastedTextAttachment, buildPathRefAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, callAbleTimeTool, canonicalizeRepoPath, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, clampGithubPrBody, clampHistoryMaxCount, clampHistoryMaxDays, classifyWorktreeColumn, claudeAdapter, claudeChromeEnabled, claudeUsageOverLimitWindows, claudeUserSettingsPath, cleanupArchivedHistory, cleanupOrphanWorktrees, clearBoardPins, clearHomeBoardCache, clipAgentEventForPaint, clipThinkingForStore, cloneRepoIntoSideboard, codeRefRangeLabel, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentAbleTimeTask, commentGitHubIssue, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmClaudeUsageOverLimitEnabled, confirmLand, connectBrightsyTeam, connectOptionalService, connectSlackToken, connectedOptionalServices, connectedPrSelectors, consumeComposerAttachments, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, countUnpushedVsOrigin, cowboyModeEnabled, createAbleTimePkce, createAbleTimeTask, createChatTab, createEmptyThread, createExistingBranchWorktree, createGitHubIssue, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, detectOptionalServiceClis, disconnectAbleTimeConnection, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectOptionalService, disconnectSlackWorkspace, discoverSkills, dropCachedPrefixOnResume, emptyPublicIntegrations, emptySetupLog, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAbleTimeAccessToken, ensureAbleTimeTask, ensureAgentPath, ensureBrightsyLocalConfigFresh, ensureBrightsyOAuthClientId, ensureCloudCoordinator, ensureConnectedBrightsyTeamTokens, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewGuidelinesFile, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateOccupancyTokens, estimateThreadChars, examplePrefixedBranch, expandComposerPrompt, extractBrightsyContextSummary, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fastForwardMainCheckoutIfSafe, fetchOriginForWorktree, fetchPrHead, finalizeParts, findConventionSetup, findInvalidCacheControlTtlOrder, findLastBrightsyContextSummary, findLiveThreadForCreate, findLiveThreadForCreateSource, findOrphanWorktrees, findProjectProfileKey, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, flipLinearRelationType, foldLegacyRolesIntoNotes, followUpBehavior, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAccountProfilePlaybookLine, formatArtifactDirective, formatBrightsyFetchError, formatClaudeExtraUsageDetail, formatClaudeUsageCompact, formatClaudeUsageFetchedAt, formatClaudeUsageOverLimitConfirm, formatClaudeUsageOverLimitWait, formatClaudeUsageReset, formatClaudeUsageResetClock, formatClaudeUsageTooltip, formatDetachedJobInvoke, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatIssueToolsDirective, formatIssueToolsReminder, formatLinearDirective, formatLinearReminder, formatLongRunningDirective, formatLongRunningReminder, formatMergePrError, formatMessagesAsTranscript, formatOptionalServicesDirective, formatOptionalServicesReminder, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatPrGateDirective, formatProcessGuideDirective, formatProjectProfilePlaybookLines, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, formatTranscriptMarkdown, formatUiReminder, formatViewerContextDirective, formatViewerContextReminder, formatWorkspaceInventory, formatWorkspaceProfileSuffix, formatWorktreeDirective, formatWorktreeReminder, forwardContextUsage, forwardOccupancyTokens, fromInclusiveInputUsage, getAbleTimeAccessToken, getAbleTimeHost, getAbleTimeOrientation, getAbleTimeTask, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getClaudePlanUsage, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubIssue, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getHomeBoardInputs, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, getWorktreeDirtyStat, gh, ghHeadRef, ghRepoSelectArgs, git, gitBranchPrefixSetting, githubAgentGitEnv, githubHttpsInsteadOfEntries, githubRelationEditFlag, globalAgentCwd, groupHomeBoardWorktrees, handleSlackInbound, harnessEnvKey, hasBakedAbleTimeOAuth, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, historyMaxCount, historyMaxDays, hottestClaudeWindow, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, installNpmGlobalPackage, installOptionalServiceCli, interruptSlackCoordinatorForInbound, invalidateThreadListCache, invalidateThreadRecord, isAbleTimeConnected, isAbleTimeOAuthCancelled, isAbleTimeRejectedCredential, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorApiKeyConfigured, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhPrBodyTooLongError, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isHistoryRetentionStub, isHomeBoardThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isInjectedOrchMcpName, isInternalAgentStatusText, isIssueSourceConnected, isLinearConnected, isLinearNoneToken, isLinearOAuthCancelled, isOptionalServiceId, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPlanQuestionAnswersMessage, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSelfWrittenRecord, isSessionQuotaLimit, isSetupLastError, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isStaleLastErrorDuringTurn, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isUsageOnLimit, isWorkspaceScratchPath, issueAttachmentForAbleTimeTask, issueMatchesAssignee, issueSourceLabel, issueTicketFromThread, killListenersOnPorts, lastAssistantMessageText, lastRequestOccupancy, latestPendingPlanQuestions, linearAuthorizationHeader, linearCycleIsActive, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, linearRelationCreateInput, linearTicketIdFromThread, listAbleTimeAssignedIssues, listAbleTimeProjects, listAbleTimeTasks, listAgentSetupInfo, listBoardPins, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssueCommentsSince, listGitHubIssues, listGlobalThreads, listIssues, listLinearAssignedIssues, listLinearCommentsSince, listLinearIssues, listLinearIssuesDirect, listLinearIssuesFiltered, listLinearTeamCycles, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadHomeBoardInputs, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, mapAbleTimeTask, markPrReady, materializeSystemCaBundle, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAllowToolsFromNames, mcpAuthWarnings, mcpStatusThinkingFromClaudeInit, mentionsPrGoal, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSetupOutput, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, messagesSinceLastBrightsyContextSummary, moveQueuedItemToFront, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeAbleTimeCredential, normalizeAbleTimeHost, normalizeBrightsyEndpoint, normalizeCodeSelection, normalizeLinearRelationType, normalizeParseResult, normalizeServiceOrigin, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, optionalServiceConnected, optionalServiceSpec, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originFetchBranch, originGhRepoEnv, packagedDetachedJobPath, parseAbleTimeOAuthCallbackUrl, parseClaudeUsagePayload, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGitHubIssueNumber, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parsePrDetailsView, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permissionMode, persistPendingFileAttachments, persistVaultKeyInKeychain, planFileAbs, planHistoryAgePurge, planHistoryRetention, planQuestionsSignature, pollSlackOutboundWatches, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, prependQueuedItem, previewLand, primaryCheckoutFromLinkedWorktree, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSetupLog, readSkillBody, readThread, readViewerContext, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshBrightsyAccessToken, refreshGitHubAuth, registerBrightsyOAuthClient, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeBoardPin, removeQueuedItem, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, reservePort, reservePortRange, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAbleTimeOAuthHost, resolveAccountProfile, resolveAccountProfileFromSettings, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCreateFirstPrompt, resolveCursorModelId, resolveDefaultBranch, resolveDetachedJobScript, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitBranchPrefix, resolveGitDirsForLockRecovery, resolveGitHubIssueRepo, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearCycle, resolveLinearLabel, resolveLinearProject, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewOrchestratorOptions, resolveNewThreadOptions, resolveOrchChildFollowUp, resolveOrchestratorDefaults, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSendFollowUp, resolveSidebarGitPrompt, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveUsageOnLimit, resolveVaultKey, resolveViewerProfile, resolveViewerProfileForRepo, resolveWorktreeStartPoint, rewriteAbleTimeError, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeGitBranchPrefix, sanitizeMcpServerName, saveAbleTimeConnection, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, searchAbleTimeTasks, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shiftQueuedItem, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunHistoryCleanup, shouldRunWorktreeCleanup, shouldStampSetupLastError, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slimMessagesForUiList, slimThreadForUiList, slugify, spawnAgentTurn, splitForCompaction, splitTurnInputForSystemPrompt, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startAbleTimeOAuth, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, statWorktreePath, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takePendingTurnAttachments, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, taskUrl, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadHasCompactedContext, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, ticketSlugForBranch, toAbleTimeIssueInfo, toGitHubIssueInfo, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, trustSystemCertificates, turnCostUsdFromCursorUsage, updateAbleTimeTask, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateGitHubIssue, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateProjectProfileSettings, updateSchedule, updateThread, usageOnLimit, userClaudeMcpConfigPath, userCursorMcpConfigPath, userMcpNamesToDisable, validateLinearApiKey, verifyAbleTimeConnection, verifyOptionalService, visibleToolRowDetail, waitForPidExit, warmGithubAgentAuth, whichOnPath, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeBoardStatus, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreeSlugForTicket, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeViewerContext, writeWorktreeFile };
|
package/dist/index.d.ts
CHANGED
|
@@ -3929,8 +3929,25 @@ declare function listRunScripts(worktreePath: string, repoPath?: string | null):
|
|
|
3929
3929
|
declare function getDefaultRunScript(worktreePath: string, repoPath?: string | null): RunScript | null;
|
|
3930
3930
|
declare function getRunScript(worktreePath: string, repoPath: string | null | undefined, name?: string | null): RunScript | null;
|
|
3931
3931
|
declare function getRunMode(worktreePath: string, repoPath?: string | null): 'concurrent' | 'nonconcurrent';
|
|
3932
|
+
type PortReservation = {
|
|
3933
|
+
port: number;
|
|
3934
|
+
/** Stop holding the port so a child can bind it. Idempotent. */
|
|
3935
|
+
release: () => Promise<void>;
|
|
3936
|
+
};
|
|
3937
|
+
/**
|
|
3938
|
+
* Bind an ephemeral port and keep the socket open until `release()`.
|
|
3939
|
+
* Closing then rebinding races other worktrees / agents (TOCTOU) — especially
|
|
3940
|
+
* with Vite `strictPort: true`, which fails Start instead of falling back.
|
|
3941
|
+
*/
|
|
3942
|
+
declare function reservePort(): Promise<PortReservation>;
|
|
3943
|
+
/** @deprecated Prefer reservePort — releasing immediately reopens the race. */
|
|
3932
3944
|
declare function allocatePort(): Promise<number>;
|
|
3933
|
-
/**
|
|
3945
|
+
/**
|
|
3946
|
+
* Hold a block of ports (Conductor: CONDUCTOR_PORT … +9) until release.
|
|
3947
|
+
* Callers must `release()` immediately before spawning the child that binds them.
|
|
3948
|
+
*/
|
|
3949
|
+
declare function reservePortRange(size?: number): Promise<PortReservation[]>;
|
|
3950
|
+
/** Allocate a contiguous block, releasing holds immediately (legacy / tests). */
|
|
3934
3951
|
declare function allocatePortRange(size?: number): Promise<number[]>;
|
|
3935
3952
|
interface DevServerHandle {
|
|
3936
3953
|
pid: number | undefined;
|
|
@@ -4726,6 +4743,8 @@ declare class Orchestrator {
|
|
|
4726
4743
|
/** Auto-continues after a worktree turn ended while a detached job still runs. */
|
|
4727
4744
|
private readonly jobContinueCount;
|
|
4728
4745
|
private readonly jobContinueNudged;
|
|
4746
|
+
/** In-flight startDev per worktree run key — agent MCP + UI Start must not double-spawn. */
|
|
4747
|
+
private readonly startingDev;
|
|
4729
4748
|
private maxConcurrent;
|
|
4730
4749
|
private runningCount;
|
|
4731
4750
|
constructor(opts?: {
|
|
@@ -4857,6 +4876,7 @@ declare class Orchestrator {
|
|
|
4857
4876
|
scriptName: string;
|
|
4858
4877
|
ports: number[];
|
|
4859
4878
|
}>;
|
|
4879
|
+
private startDevUnlocked;
|
|
4860
4880
|
stopDev(threadRef: string, scriptName?: string): void;
|
|
4861
4881
|
/**
|
|
4862
4882
|
* App quit: tear down every registered run/setup child and free persisted
|
|
@@ -6937,4 +6957,4 @@ declare function pollSlackOutboundWatches(opts?: {
|
|
|
6937
6957
|
now?: number;
|
|
6938
6958
|
}): Promise<void>;
|
|
6939
6959
|
|
|
6940
|
-
export { ABLETIME_MCP_PATH, ABLETIME_MCP_PM_PATH, ABLETIME_OAUTH_CALLBACK_PATH, ABLETIME_OAUTH_CANCELLED, ABLETIME_OAUTH_LOCAL_CALLBACK, ABLETIME_OAUTH_PORT, ABLETIME_OAUTH_REDIRECT, ABLETIME_OAUTH_RESOURCE, ABLETIME_OAUTH_TOKEN_PREFIX, ABLETIME_ORG_KEY_PREFIX, ABLETIME_PAT_PREFIX, ABLETIME_PM_TOOL_NAMES, AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, ATTACHMENTS_DIR, type AbleTimeAssignedIssuesResult, type AbleTimeComment, type AbleTimeCredentialKind, type AbleTimeMcpToolName, AbleTimeOAuthCancelledError, type AbleTimeOrientation, type AbleTimePmToolName, type AbleTimeProject, type AbleTimeTask, type AbleTimeTaskRelationInput, type AbleTimeViewer, type AccountProfile, type ActiveRun, type AddBoardPinInput, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BAKED_ABLETIME_OAUTH_CLIENT_ID, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, BRIGHTSY_OAUTH_CLIENT_ID, BRIGHTSY_OAUTH_REDIRECT, BRIGHTSY_SUMMARIZE_CONTEXT_TOOL, BUNDLED_LONG_RUNNING_PATH, BUNDLED_SKILL_PREFIX, type BoardPin, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CHARS_PER_CONTEXT_TOKEN, CLAUDE_MODEL_CATALOG, CLI_DIR, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, CONTEXT_REVIEW_PATH, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeExtraUsage, type ClaudeHarnessSettings, type ClaudePlanUsage, type ClaudeUsageWindow, type ClaudeUsageWindowId, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CodeLineRange, type CodeRefInput, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, DEFAULT_ABLETIME_HOST, DEFAULT_WORKTREE_SORT, DETACHED_JOBS_DIR, type DefaultsAppSettings, type DefaultsSettingsPatch, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type EnsuredReviewGuidelines, type ExpandResult, FAMOUS_SOCCER_TEAMS, FOLLOW_UP_BEHAVIORS, type FastForwardMainResult, type FollowUpBehavior, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GITHUB_GIT_AUTH_MODES, GITHUB_PR_BODY_MAX_CHARS, GITHUB_PR_BODY_SAFE_CHARS, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubIssue, type GitHubIssueComment, type GitHubIssueRelationInput, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, HISTORY_DISCARDED_TEXT, HISTORY_MAX_COUNT_DEFAULT, HISTORY_MAX_COUNT_MAX, HISTORY_MAX_COUNT_MIN, HISTORY_MAX_DAYS_DEFAULT, HISTORY_MAX_DAYS_MAX, HOME_BOARD_CACHE_TTL_MS, type HarnessId, type HistoryCleanupResult, type HistoryRetentionPlan, type HomeBoardLoaded, type HomeBoardRemoteData, IMPLIED_TICKET_RESOLVE_PROMPT, ISSUE_SOURCE_LABELS, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueActivityComment, type IssueAssigneeFilter, type IssueCycleInfo, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_DETACHED_JOBS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LIGHT_RECONCILE_THROTTLE_MS, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, LIVE_TURN_SPAWN_GRACE_MS, LONG_RUNNING_SKILL_COMMAND, type LandPreview, type LandResult, type LinearAssignedIssuesResult, type LinearAssigneeFilter, type LinearComment, type LinearCycle, type LinearIssue, type LinearIssueAttachment, type LinearIssueComment, type LinearIssueRef, type LinearIssueRelation, type LinearIssueRelationInput, type LinearNamedRef, LinearOAuthCancelledError, type LinearProjectRef, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesOptions, type ListIssuesResult, type ListPrsOptions, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, OPTIONAL_SERVICES, OPTIONAL_SERVICE_IDS, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OptionalServiceCliStatus, type OptionalServiceId, type OptionalServiceSpec, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorDefaultsSettings, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, PLAN_QUESTION_ANSWERS_PREFIX, PROFILE_NOTES_MAX, PR_DETAILS_JSON_FIELDS, type PathRefInput, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type ProjectProfileSettings, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedAccountProfile, type ResolvedReviewGuidelines, type ResolvedThreadDefaults, type ResolvedViewerProfile, type ReviewGuidelinesSource, type RunMode, type RunScript, SEED_FULL_TOOL_MESSAGES, SEED_MAX_CHARS, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, STDERR_EVENT_MAX_CHARS, STDOUT_EVENT_MAX_CHARS, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SessionSeedOptions, type SetupLogSnapshot, type SetupRunResult, type SidebarGitAction, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, THINKING_PART_MAX_CHARS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, USAGE_ON_LIMIT_VALUES, type UpdateScheduledTaskPatch, type UsageOnLimit, type UsageScope, type ViewerContextWriteResult, type ViewerProfile, WORKTREE_ABLETIME_MCP_TOOLS, WORKTREE_GITHUB_MCP_TOOLS, WORKTREE_LINEAR_MCP_TOOLS, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, type WorktreeDirtyStat, type WorktreeSortMode, type WorktreeStatKind, ableTimeCredentialKind, ableTimeDependencyTarget, ableTimeOAuthAuthorizeUrl, ableTimeOAuthBouncePage, ableTimeOAuthClientId, ableTimeOAuthLocalBounceUrl, ableTimeOAuthRedirectUri, ableTimeOAuthResource, ableTimeUsesRest, abletimeMcpRequest, abletimeMcpUrl, abletimeToolUsesPm, ackSlackInboundSeen, addBoardPin, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, alignQueueAttachments, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, appendQueuedItem, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyForwardOccupancy, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applySystemCaEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, assertAbleTimeCredential, assertAbleTimeMcpCredential, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupHistoryEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAccessTokenNeedsRefresh, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildBrightsySessionSeed, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildCodeRefAttachment, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildLinearIssueFilter, buildPastedTextAttachment, buildPathRefAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, callAbleTimeTool, canonicalizeRepoPath, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, clampGithubPrBody, clampHistoryMaxCount, clampHistoryMaxDays, classifyWorktreeColumn, claudeAdapter, claudeChromeEnabled, claudeUsageOverLimitWindows, claudeUserSettingsPath, cleanupArchivedHistory, cleanupOrphanWorktrees, clearBoardPins, clearHomeBoardCache, clipAgentEventForPaint, clipThinkingForStore, cloneRepoIntoSideboard, codeRefRangeLabel, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentAbleTimeTask, commentGitHubIssue, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmClaudeUsageOverLimitEnabled, confirmLand, connectBrightsyTeam, connectOptionalService, connectSlackToken, connectedOptionalServices, connectedPrSelectors, consumeComposerAttachments, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, countUnpushedVsOrigin, cowboyModeEnabled, createAbleTimePkce, createAbleTimeTask, createChatTab, createEmptyThread, createExistingBranchWorktree, createGitHubIssue, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, detectOptionalServiceClis, disconnectAbleTimeConnection, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectOptionalService, disconnectSlackWorkspace, discoverSkills, dropCachedPrefixOnResume, emptyPublicIntegrations, emptySetupLog, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAbleTimeAccessToken, ensureAbleTimeTask, ensureAgentPath, ensureBrightsyLocalConfigFresh, ensureBrightsyOAuthClientId, ensureCloudCoordinator, ensureConnectedBrightsyTeamTokens, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewGuidelinesFile, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateOccupancyTokens, estimateThreadChars, examplePrefixedBranch, expandComposerPrompt, extractBrightsyContextSummary, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fastForwardMainCheckoutIfSafe, fetchOriginForWorktree, fetchPrHead, finalizeParts, findConventionSetup, findInvalidCacheControlTtlOrder, findLastBrightsyContextSummary, findLiveThreadForCreate, findLiveThreadForCreateSource, findOrphanWorktrees, findProjectProfileKey, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, flipLinearRelationType, foldLegacyRolesIntoNotes, followUpBehavior, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAccountProfilePlaybookLine, formatArtifactDirective, formatBrightsyFetchError, formatClaudeExtraUsageDetail, formatClaudeUsageCompact, formatClaudeUsageFetchedAt, formatClaudeUsageOverLimitConfirm, formatClaudeUsageOverLimitWait, formatClaudeUsageReset, formatClaudeUsageResetClock, formatClaudeUsageTooltip, formatDetachedJobInvoke, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatIssueToolsDirective, formatIssueToolsReminder, formatLinearDirective, formatLinearReminder, formatLongRunningDirective, formatLongRunningReminder, formatMergePrError, formatMessagesAsTranscript, formatOptionalServicesDirective, formatOptionalServicesReminder, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatPrGateDirective, formatProcessGuideDirective, formatProjectProfilePlaybookLines, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, formatTranscriptMarkdown, formatUiReminder, formatViewerContextDirective, formatViewerContextReminder, formatWorkspaceInventory, formatWorkspaceProfileSuffix, formatWorktreeDirective, formatWorktreeReminder, forwardContextUsage, forwardOccupancyTokens, fromInclusiveInputUsage, getAbleTimeAccessToken, getAbleTimeHost, getAbleTimeOrientation, getAbleTimeTask, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getClaudePlanUsage, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubIssue, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getHomeBoardInputs, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, getWorktreeDirtyStat, gh, ghHeadRef, ghRepoSelectArgs, git, gitBranchPrefixSetting, githubAgentGitEnv, githubHttpsInsteadOfEntries, githubRelationEditFlag, globalAgentCwd, groupHomeBoardWorktrees, handleSlackInbound, harnessEnvKey, hasBakedAbleTimeOAuth, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, historyMaxCount, historyMaxDays, hottestClaudeWindow, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, installNpmGlobalPackage, installOptionalServiceCli, interruptSlackCoordinatorForInbound, invalidateThreadListCache, invalidateThreadRecord, isAbleTimeConnected, isAbleTimeOAuthCancelled, isAbleTimeRejectedCredential, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorApiKeyConfigured, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhPrBodyTooLongError, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isHistoryRetentionStub, isHomeBoardThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isInjectedOrchMcpName, isInternalAgentStatusText, isIssueSourceConnected, isLinearConnected, isLinearNoneToken, isLinearOAuthCancelled, isOptionalServiceId, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPlanQuestionAnswersMessage, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSelfWrittenRecord, isSessionQuotaLimit, isSetupLastError, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isStaleLastErrorDuringTurn, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isUsageOnLimit, isWorkspaceScratchPath, issueAttachmentForAbleTimeTask, issueMatchesAssignee, issueSourceLabel, issueTicketFromThread, killListenersOnPorts, lastAssistantMessageText, lastRequestOccupancy, latestPendingPlanQuestions, linearAuthorizationHeader, linearCycleIsActive, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, linearRelationCreateInput, linearTicketIdFromThread, listAbleTimeAssignedIssues, listAbleTimeProjects, listAbleTimeTasks, listAgentSetupInfo, listBoardPins, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssueCommentsSince, listGitHubIssues, listGlobalThreads, listIssues, listLinearAssignedIssues, listLinearCommentsSince, listLinearIssues, listLinearIssuesDirect, listLinearIssuesFiltered, listLinearTeamCycles, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadHomeBoardInputs, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, mapAbleTimeTask, markPrReady, materializeSystemCaBundle, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAllowToolsFromNames, mcpAuthWarnings, mcpStatusThinkingFromClaudeInit, mentionsPrGoal, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSetupOutput, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, messagesSinceLastBrightsyContextSummary, moveQueuedItemToFront, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeAbleTimeCredential, normalizeAbleTimeHost, normalizeBrightsyEndpoint, normalizeCodeSelection, normalizeLinearRelationType, normalizeParseResult, normalizeServiceOrigin, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, optionalServiceConnected, optionalServiceSpec, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originFetchBranch, originGhRepoEnv, packagedDetachedJobPath, parseAbleTimeOAuthCallbackUrl, parseClaudeUsagePayload, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGitHubIssueNumber, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parsePrDetailsView, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permissionMode, persistPendingFileAttachments, persistVaultKeyInKeychain, planFileAbs, planHistoryAgePurge, planHistoryRetention, planQuestionsSignature, pollSlackOutboundWatches, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, prependQueuedItem, previewLand, primaryCheckoutFromLinkedWorktree, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSetupLog, readSkillBody, readThread, readViewerContext, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshBrightsyAccessToken, refreshGitHubAuth, registerBrightsyOAuthClient, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeBoardPin, removeQueuedItem, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAbleTimeOAuthHost, resolveAccountProfile, resolveAccountProfileFromSettings, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCreateFirstPrompt, resolveCursorModelId, resolveDefaultBranch, resolveDetachedJobScript, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitBranchPrefix, resolveGitDirsForLockRecovery, resolveGitHubIssueRepo, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearCycle, resolveLinearLabel, resolveLinearProject, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewOrchestratorOptions, resolveNewThreadOptions, resolveOrchChildFollowUp, resolveOrchestratorDefaults, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSendFollowUp, resolveSidebarGitPrompt, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveUsageOnLimit, resolveVaultKey, resolveViewerProfile, resolveViewerProfileForRepo, resolveWorktreeStartPoint, rewriteAbleTimeError, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeGitBranchPrefix, sanitizeMcpServerName, saveAbleTimeConnection, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, searchAbleTimeTasks, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shiftQueuedItem, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunHistoryCleanup, shouldRunWorktreeCleanup, shouldStampSetupLastError, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slimMessagesForUiList, slimThreadForUiList, slugify, spawnAgentTurn, splitForCompaction, splitTurnInputForSystemPrompt, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startAbleTimeOAuth, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, statWorktreePath, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takePendingTurnAttachments, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, taskUrl, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadHasCompactedContext, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, ticketSlugForBranch, toAbleTimeIssueInfo, toGitHubIssueInfo, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, trustSystemCertificates, turnCostUsdFromCursorUsage, updateAbleTimeTask, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateGitHubIssue, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateProjectProfileSettings, updateSchedule, updateThread, usageOnLimit, userClaudeMcpConfigPath, userCursorMcpConfigPath, userMcpNamesToDisable, validateLinearApiKey, verifyAbleTimeConnection, verifyOptionalService, visibleToolRowDetail, waitForPidExit, warmGithubAgentAuth, whichOnPath, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeBoardStatus, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreeSlugForTicket, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeViewerContext, writeWorktreeFile };
|
|
6960
|
+
export { ABLETIME_MCP_PATH, ABLETIME_MCP_PM_PATH, ABLETIME_OAUTH_CALLBACK_PATH, ABLETIME_OAUTH_CANCELLED, ABLETIME_OAUTH_LOCAL_CALLBACK, ABLETIME_OAUTH_PORT, ABLETIME_OAUTH_REDIRECT, ABLETIME_OAUTH_RESOURCE, ABLETIME_OAUTH_TOKEN_PREFIX, ABLETIME_ORG_KEY_PREFIX, ABLETIME_PAT_PREFIX, ABLETIME_PM_TOOL_NAMES, AGENT_GIT_ACTIONS, AGENT_RUNNER_MAX_OLD_SPACE_MB, ATTACHMENTS_DIR, type AbleTimeAssignedIssuesResult, type AbleTimeComment, type AbleTimeCredentialKind, type AbleTimeMcpToolName, AbleTimeOAuthCancelledError, type AbleTimeOrientation, type AbleTimePmToolName, type AbleTimeProject, type AbleTimeTask, type AbleTimeTaskRelationInput, type AbleTimeViewer, type AccountProfile, type ActiveRun, type AddBoardPinInput, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BAKED_ABLETIME_OAUTH_CLIENT_ID, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, BRIGHTSY_OAUTH_CLIENT_ID, BRIGHTSY_OAUTH_REDIRECT, BRIGHTSY_SUMMARIZE_CONTEXT_TOOL, BUNDLED_LONG_RUNNING_PATH, BUNDLED_SKILL_PREFIX, type BoardPin, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CHARS_PER_CONTEXT_TOKEN, CLAUDE_MODEL_CATALOG, CLI_DIR, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, CONTEXT_REVIEW_PATH, CONVENTION_SETUP_RELPATHS, COORDINATOR_TOOL_PLAYBOOK, type CaffeinateHoldState, type ClaudeExtraUsage, type ClaudeHarnessSettings, type ClaudePlanUsage, type ClaudeUsageWindow, type ClaudeUsageWindowId, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CodeLineRange, type CodeRefInput, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type ConventionSetupFile, type CowboyThreadFields, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateScheduledTaskInput, type CreateStackInput, type CreateThreadInput, type CreateWorktreeResult, type CursorAgentUsageSnapshot, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorUsageCost, type CursorWorktreesConfig, DEFAULT_ABLETIME_HOST, DEFAULT_WORKTREE_SORT, DETACHED_JOBS_DIR, type DefaultsAppSettings, type DefaultsSettingsPatch, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type EnsuredReviewGuidelines, type ExpandResult, FAMOUS_SOCCER_TEAMS, FOLLOW_UP_BEHAVIORS, type FastForwardMainResult, type FollowUpBehavior, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GITHUB_GIT_AUTH_MODES, GITHUB_PR_BODY_MAX_CHARS, GITHUB_PR_BODY_SAFE_CHARS, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubIssue, type GitHubIssueComment, type GitHubIssueRelationInput, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, HISTORY_DISCARDED_TEXT, HISTORY_MAX_COUNT_DEFAULT, HISTORY_MAX_COUNT_MAX, HISTORY_MAX_COUNT_MIN, HISTORY_MAX_DAYS_DEFAULT, HISTORY_MAX_DAYS_MAX, HOME_BOARD_CACHE_TTL_MS, type HarnessId, type HistoryCleanupResult, type HistoryRetentionPlan, type HomeBoardLoaded, type HomeBoardRemoteData, IMPLIED_TICKET_RESOLVE_PROMPT, ISSUE_SOURCE_LABELS, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueActivityComment, type IssueAssigneeFilter, type IssueCycleInfo, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_DETACHED_JOBS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LIGHT_RECONCILE_THROTTLE_MS, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, LIVE_TURN_SPAWN_GRACE_MS, LONG_RUNNING_SKILL_COMMAND, type LandPreview, type LandResult, type LinearAssignedIssuesResult, type LinearAssigneeFilter, type LinearComment, type LinearCycle, type LinearIssue, type LinearIssueAttachment, type LinearIssueComment, type LinearIssueRef, type LinearIssueRelation, type LinearIssueRelationInput, type LinearNamedRef, LinearOAuthCancelledError, type LinearProjectRef, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesOptions, type ListIssuesResult, type ListPrsOptions, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, OPTIONAL_SERVICES, OPTIONAL_SERVICE_IDS, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OptionalServiceCliStatus, type OptionalServiceId, type OptionalServiceSpec, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorDefaultsSettings, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, PLAN_QUESTION_ANSWERS_PREFIX, PROFILE_NOTES_MAX, PR_DETAILS_JSON_FIELDS, type PathRefInput, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PortReservation, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type ProjectProfileSettings, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, REVIEW_REQUEST_TEMPLATE, REVIEW_SKILL_NAME, REVIEW_SKILL_PATH, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedAccountProfile, type ResolvedReviewGuidelines, type ResolvedThreadDefaults, type ResolvedViewerProfile, type ReviewGuidelinesSource, type RunMode, type RunScript, SEED_FULL_TOOL_MESSAGES, SEED_MAX_CHARS, SESSION_RESET_OCCUPANCY_TOKENS, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_PROGRESS_DELAY_MS, SLACK_PROGRESS_EDIT_MS, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, STDERR_EVENT_MAX_CHARS, STDOUT_EVENT_MAX_CHARS, type ScheduleCreatedBy, type ScheduleWhen, type ScheduledTask, type ScriptHandle, type SessionSeedOptions, type SetupLogSnapshot, type SetupRunResult, type SidebarGitAction, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, THINKING_PART_MAX_CHARS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, USAGE_ON_LIMIT_VALUES, type UpdateScheduledTaskPatch, type UsageOnLimit, type UsageScope, type ViewerContextWriteResult, type ViewerProfile, WORKTREE_ABLETIME_MCP_TOOLS, WORKTREE_GITHUB_MCP_TOOLS, WORKTREE_LINEAR_MCP_TOOLS, WORKTREE_MCP_TOOLS, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, type WorktreeDirtyStat, type WorktreeSortMode, type WorktreeStatKind, ableTimeCredentialKind, ableTimeDependencyTarget, ableTimeOAuthAuthorizeUrl, ableTimeOAuthBouncePage, ableTimeOAuthClientId, ableTimeOAuthLocalBounceUrl, ableTimeOAuthRedirectUri, ableTimeOAuthResource, ableTimeUsesRest, abletimeMcpRequest, abletimeMcpUrl, abletimeToolUsesPm, ackSlackInboundSeen, addBoardPin, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, alignQueueAttachments, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, appendQueuedItem, applyAgentEvent, applyAgentRunnerHeapEnv, applyAppEnvironment, applyCompaction, applyForwardOccupancy, applyGithubGitAuthEnv, applyPromptCacheTtlEnv, applySystemCaEnv, applyThreadIntoMain, applyTurnUsage, armSchedules, assertAbleTimeCredential, assertAbleTimeMcpCredential, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupHistoryEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAccessTokenNeedsRefresh, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildBrightsySessionSeed, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildCodeRefAttachment, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildLinearIssueFilter, buildPastedTextAttachment, buildPathRefAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSchedulesEnabled, caffeinateWhileSlackListenEnabled, callAbleTimeTool, canonicalizeRepoPath, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claimDesktopHost, clampGithubPrBody, clampHistoryMaxCount, clampHistoryMaxDays, classifyWorktreeColumn, claudeAdapter, claudeChromeEnabled, claudeUsageOverLimitWindows, claudeUserSettingsPath, cleanupArchivedHistory, cleanupOrphanWorktrees, clearBoardPins, clearHomeBoardCache, clipAgentEventForPaint, clipThinkingForStore, cloneRepoIntoSideboard, codeRefRangeLabel, codexAdapter, codexSandboxWritableRootsArgs, codexUnattendedGitConfigArgs, coerceOrchestratorAgent, collectTakenTeamSlugs, commentAbleTimeTask, commentGitHubIssue, commentLinearIssue, commitAll, computeNextRunAt, conductorBundledBinDir, conductorDbPath, confirmClaudeUsageOverLimitEnabled, confirmLand, connectBrightsyTeam, connectOptionalService, connectSlackToken, connectedOptionalServices, connectedPrSelectors, consumeComposerAttachments, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, countUnpushedVsOrigin, cowboyModeEnabled, createAbleTimePkce, createAbleTimeTask, createChatTab, createEmptyThread, createExistingBranchWorktree, createGitHubIssue, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createSchedule, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, defaultScheduleName, deleteBranchOnPurgeEnabled, deleteSchedule, deleteThreadRecord, desktopHostPidPath, detectAgents, detectGhStack, detectLocalMergeConflicts, detectOptionalServiceClis, disconnectAbleTimeConnection, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectOptionalService, disconnectSlackWorkspace, discoverSkills, dropCachedPrefixOnResume, emptyPublicIntegrations, emptySetupLog, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAbleTimeAccessToken, ensureAbleTimeTask, ensureAgentPath, ensureBrightsyLocalConfigFresh, ensureBrightsyOAuthClientId, ensureCloudCoordinator, ensureConnectedBrightsyTeamTokens, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewGuidelinesFile, ensureReviewRequestFile, ensureReviewSkillFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateOccupancyTokens, estimateThreadChars, examplePrefixedBranch, expandComposerPrompt, extractBrightsyContextSummary, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fastForwardMainCheckoutIfSafe, fetchOriginForWorktree, fetchPrHead, finalizeParts, findConventionSetup, findInvalidCacheControlTtlOrder, findLastBrightsyContextSummary, findLiveThreadForCreate, findLiveThreadForCreateSource, findOrphanWorktrees, findProjectProfileKey, findSlackCoordinator, findThreadByRef, findThreadForStackLayer, fireSchedule, flattenTurnInput, flipLinearRelationType, foldLegacyRolesIntoNotes, followUpBehavior, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAccountProfilePlaybookLine, formatArtifactDirective, formatBrightsyFetchError, formatClaudeExtraUsageDetail, formatClaudeUsageCompact, formatClaudeUsageFetchedAt, formatClaudeUsageOverLimitConfirm, formatClaudeUsageOverLimitWait, formatClaudeUsageReset, formatClaudeUsageResetClock, formatClaudeUsageTooltip, formatDetachedJobInvoke, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatIssueToolsDirective, formatIssueToolsReminder, formatLinearDirective, formatLinearReminder, formatLongRunningDirective, formatLongRunningReminder, formatMergePrError, formatMessagesAsTranscript, formatOptionalServicesDirective, formatOptionalServicesReminder, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatPrGateDirective, formatProcessGuideDirective, formatProjectProfilePlaybookLines, formatRateLimitResetHint, formatRenameBranchDirective, formatScheduleWhen, formatScheduledPrompt, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackReplyContinuePrompt, formatSlackSignedReply, formatSlackWorkingText, formatTranscriptMarkdown, formatUiReminder, formatViewerContextDirective, formatViewerContextReminder, formatWorkspaceInventory, formatWorkspaceProfileSuffix, formatWorktreeDirective, formatWorktreeReminder, forwardContextUsage, forwardOccupancyTokens, fromInclusiveInputUsage, getAbleTimeAccessToken, getAbleTimeHost, getAbleTimeOrientation, getAbleTimeTask, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getClaudePlanUsage, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubIssue, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getHomeBoardInputs, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrForHeadBranch, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSchedule, getSlackWorkspace, getWorktreeDirtyStat, gh, ghHeadRef, ghRepoSelectArgs, git, gitBranchPrefixSetting, githubAgentGitEnv, githubHttpsInsteadOfEntries, githubRelationEditFlag, globalAgentCwd, groupHomeBoardWorktrees, handleSlackInbound, harnessEnvKey, hasBakedAbleTimeOAuth, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasConventionSetup, hasCursorWorktreeSetup, hasEnabledSchedules, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, historyMaxCount, historyMaxDays, hottestClaudeWindow, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, installNpmGlobalPackage, installOptionalServiceCli, interruptSlackCoordinatorForInbound, invalidateThreadListCache, invalidateThreadRecord, isAbleTimeConnected, isAbleTimeOAuthCancelled, isAbleTimeRejectedCredential, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCowboyThread, isCursorApiKeyConfigured, isCursorAutoModel, isDefaultishSourceRef, isDesktopHostAlive, isDirty, isGhPrBodyTooLongError, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isHistoryRetentionStub, isHomeBoardThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isInjectedOrchMcpName, isInternalAgentStatusText, isIssueSourceConnected, isLinearConnected, isLinearNoneToken, isLinearOAuthCancelled, isOptionalServiceId, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPlanQuestionAnswersMessage, isPollWrapperToolName, isPrNotMergeableError, isPresentPlanToolName, isPrimaryCheckoutThread, isSelfWrittenRecord, isSessionQuotaLimit, isSetupLastError, isShellToolName, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isStaleLastErrorDuringTurn, isSubagentToolName, isThinkingEffort, isThisProcessDesktopHost, isThreadCaffeinated, isThreadRecordFile, isUsageOnLimit, isWorkspaceScratchPath, issueAttachmentForAbleTimeTask, issueMatchesAssignee, issueSourceLabel, issueTicketFromThread, killListenersOnPorts, lastAssistantMessageText, lastRequestOccupancy, latestPendingPlanQuestions, linearAuthorizationHeader, linearCycleIsActive, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, linearRelationCreateInput, linearTicketIdFromThread, listAbleTimeAssignedIssues, listAbleTimeProjects, listAbleTimeTasks, listAgentSetupInfo, listBoardPins, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssueCommentsSince, listGitHubIssues, listGlobalThreads, listIssues, listLinearAssignedIssues, listLinearCommentsSince, listLinearIssues, listLinearIssuesDirect, listLinearIssuesFiltered, listLinearTeamCycles, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSchedules, listSlackOutboundWatches, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, liveActivitySummary, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadHomeBoardInputs, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, mapAbleTimeTask, markPrReady, materializeSystemCaBundle, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAllowToolsFromNames, mcpAuthWarnings, mcpStatusThinkingFromClaudeInit, mentionsPrGoal, mergeAgentGitAuthEnv, mergePr, mergePrStack, mergeSetupOutput, mergeSideboardIntoMcpServersJson, mergeUsage, messagePartParentId, messagesSinceLastBrightsyContextSummary, moveQueuedItemToFront, nextPastedTextName, nextThinkingEffort, nonInteractiveGitProcessEnv, normalizeAbleTimeCredential, normalizeAbleTimeHost, normalizeBrightsyEndpoint, normalizeCodeSelection, normalizeLinearRelationType, normalizeParseResult, normalizeServiceOrigin, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, optionalServiceConnected, optionalServiceSpec, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originFetchBranch, originGhRepoEnv, packagedDetachedJobPath, parseAbleTimeOAuthCallbackUrl, parseClaudeUsagePayload, parseCursorRunnerLine, parseDurationMs, parseForceStopMessage, parseGhStackViewJson, parseGitHubIssueNumber, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parsePrDetailsView, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permissionMode, persistPendingFileAttachments, persistVaultKeyInKeychain, planFileAbs, planHistoryAgePurge, planHistoryRetention, planQuestionsSignature, pollSlackOutboundWatches, posixShellSingleQuote, preferredCursorCostCents, prepareTerminalCommand, prependQueuedItem, previewLand, primaryCheckoutFromLinkedWorktree, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSetupLog, readSkillBody, readThread, readViewerContext, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordScheduleRun, recordSlackOutboundWatch, refreshBrightsyAccessToken, refreshGitHubAuth, registerBrightsyOAuthClient, registerPackagedUserMcpClients, releaseCaffeinateHoldForThread, releaseDesktopHost, removeBoardPin, removeQueuedItem, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, reservePort, reservePortRange, resetGhStackDetectCache, resetGithubAgentTokenMemo, resolveAbleTimeOAuthHost, resolveAccountProfile, resolveAccountProfileFromSettings, resolveAgentExecutable, resolveAgentGitAuthEnv, resolveClaudeExecutable, resolveCodexGitWritableRoots, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCreateFirstPrompt, resolveCursorModelId, resolveDefaultBranch, resolveDetachedJobScript, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGitBranchPrefix, resolveGitDirsForLockRecovery, resolveGitHubIssueRepo, resolveGithubAgentToken, resolveGithubRepoSlug, resolveLinearCycle, resolveLinearLabel, resolveLinearProject, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewOrchestratorOptions, resolveNewThreadOptions, resolveOrchChildFollowUp, resolveOrchestratorDefaults, resolvePlanMarkdown, resolvePrSelector, resolvePrSelectors, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveScheduleThreadId, resolveSendFollowUp, resolveSidebarGitPrompt, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveUsageOnLimit, resolveVaultKey, resolveViewerProfile, resolveViewerProfileForRepo, resolveWorktreeStartPoint, rewriteAbleTimeError, rewriteLinearError, run, runArchiveScript, runCloudConnect, runConventionSetup, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, runWorkspaceSetup, sameWorktreePath, sanitizeGitBranchPrefix, sanitizeMcpServerName, saveAbleTimeConnection, saveAppSettings, saveLinearOAuth, schedulesPath, scrubGithubTokensFromChildEnv, searchAbleTimeTasks, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shiftQueuedItem, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRemoveWorktreeOnTeardown, shouldResetSessionForOccupancy, shouldRunHistoryCleanup, shouldRunWorktreeCleanup, shouldStampSetupLastError, showCostEnabled, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slimMessagesForUiList, slimThreadForUiList, slugify, spawnAgentTurn, splitForCompaction, splitTurnInputForSystemPrompt, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startAbleTimeOAuth, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, statWorktreePath, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, sumUsageList, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takePendingTurnAttachments, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, taskUrl, thinkingEffortBars, thinkingEffortLabel, thisProcessShouldDrainAgentQueues, threadDisplayLabel, threadFilePath, threadHasCompactedContext, threadLivePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, ticketSlugForBranch, toAbleTimeIssueInfo, toGitHubIssueInfo, toPublicAppSettings, toolActivityLine, toolDescription, toolDetail, toolFilePath, totalTokens, trustSystemCertificates, turnCostUsdFromCursorUsage, updateAbleTimeTask, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateGitHubIssue, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateProjectProfileSettings, updateSchedule, updateThread, usageOnLimit, userClaudeMcpConfigPath, userCursorMcpConfigPath, userMcpNamesToDisable, validateLinearApiKey, verifyAbleTimeConnection, verifyOptionalService, visibleToolRowDetail, waitForPidExit, warmGithubAgentAuth, whichOnPath, withEventParentId, withEventsParentId, withExportedPath, withMaxOldSpaceSize, withThreadLock, workspaceSettingsSourceLabel, worktreeBoardStatus, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreeSlugForTicket, worktreesRoot, wrapReviewSkillMarkdown, writeInjectedMcpConfig, writePlanFile, writeThread, writeViewerContext, writeWorktreeFile };
|
package/dist/index.js
CHANGED
|
@@ -268,6 +268,8 @@ import {
|
|
|
268
268
|
requestReview,
|
|
269
269
|
requireAgent,
|
|
270
270
|
requireSlackWorkspace,
|
|
271
|
+
reservePort,
|
|
272
|
+
reservePortRange,
|
|
271
273
|
resolveConductorCursorAgentId,
|
|
272
274
|
resolveCreateFirstPrompt,
|
|
273
275
|
resolveDetachedJobScript,
|
|
@@ -319,7 +321,7 @@ import {
|
|
|
319
321
|
worktreeCleanupSettings,
|
|
320
322
|
wrapReviewSkillMarkdown,
|
|
321
323
|
writeWorktreeFile
|
|
322
|
-
} from "./chunk-
|
|
324
|
+
} from "./chunk-72XUASTH.js";
|
|
323
325
|
import {
|
|
324
326
|
LEGACY_PLAN_FILE_REL,
|
|
325
327
|
PLAN_FILE_NAME,
|
|
@@ -9255,6 +9257,8 @@ export {
|
|
|
9255
9257
|
requestOccupancy,
|
|
9256
9258
|
requestReview,
|
|
9257
9259
|
requireAgent,
|
|
9260
|
+
reservePort,
|
|
9261
|
+
reservePortRange,
|
|
9258
9262
|
resetGhStackDetectCache,
|
|
9259
9263
|
resetGithubAgentTokenMemo,
|
|
9260
9264
|
resolveAbleTimeOAuthHost,
|
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -14630,61 +14630,92 @@ function getRunScript(worktreePath, repoPath, name) {
|
|
|
14630
14630
|
function getRunMode(worktreePath, repoPath) {
|
|
14631
14631
|
return loadWorkspaceSettings(worktreePath, repoPath)?.runMode ?? "concurrent";
|
|
14632
14632
|
}
|
|
14633
|
-
async function
|
|
14633
|
+
async function reservePort() {
|
|
14634
14634
|
return new Promise((resolve, reject) => {
|
|
14635
14635
|
const server = (0, import_node_net.createServer)();
|
|
14636
|
+
let released = false;
|
|
14637
|
+
const release = () => new Promise((res) => {
|
|
14638
|
+
if (released) {
|
|
14639
|
+
res();
|
|
14640
|
+
return;
|
|
14641
|
+
}
|
|
14642
|
+
released = true;
|
|
14643
|
+
server.close(() => res());
|
|
14644
|
+
});
|
|
14636
14645
|
server.listen(0, "127.0.0.1", () => {
|
|
14637
14646
|
const addr = server.address();
|
|
14638
14647
|
if (!addr || typeof addr === "string") {
|
|
14639
|
-
|
|
14640
|
-
reject(new Error("Failed to allocate port"));
|
|
14648
|
+
void release().then(() => reject(new Error("Failed to allocate port")));
|
|
14641
14649
|
return;
|
|
14642
14650
|
}
|
|
14643
|
-
|
|
14644
|
-
server.close((err) => err ? reject(err) : resolve(port));
|
|
14651
|
+
resolve({ port: addr.port, release });
|
|
14645
14652
|
});
|
|
14646
14653
|
server.on("error", reject);
|
|
14647
14654
|
});
|
|
14648
14655
|
}
|
|
14649
|
-
async function
|
|
14650
|
-
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
const
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14656
|
+
async function tryReservePort(port) {
|
|
14657
|
+
return new Promise((resolve) => {
|
|
14658
|
+
const server = (0, import_node_net.createServer)();
|
|
14659
|
+
let released = false;
|
|
14660
|
+
const release = () => new Promise((res) => {
|
|
14661
|
+
if (released) {
|
|
14662
|
+
res();
|
|
14663
|
+
return;
|
|
14664
|
+
}
|
|
14665
|
+
released = true;
|
|
14666
|
+
server.close(() => res());
|
|
14660
14667
|
});
|
|
14661
|
-
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14668
|
+
server.once("error", () => resolve(null));
|
|
14669
|
+
server.listen(port, "127.0.0.1", () => {
|
|
14670
|
+
resolve({ port, release });
|
|
14671
|
+
});
|
|
14672
|
+
});
|
|
14673
|
+
}
|
|
14674
|
+
async function reservePortRange(size = PORT_RANGE_SIZE) {
|
|
14675
|
+
const held = [await reservePort()];
|
|
14676
|
+
const base = held[0].port;
|
|
14677
|
+
try {
|
|
14678
|
+
for (let i = 1; i < size; i++) {
|
|
14679
|
+
const candidate = base + i;
|
|
14680
|
+
const next = await tryReservePort(candidate);
|
|
14681
|
+
if (next) {
|
|
14682
|
+
held.push(next);
|
|
14683
|
+
} else {
|
|
14684
|
+
held.push(await reservePort());
|
|
14685
|
+
}
|
|
14665
14686
|
}
|
|
14687
|
+
return held;
|
|
14688
|
+
} catch (err) {
|
|
14689
|
+
await Promise.all(held.map((h) => h.release()));
|
|
14690
|
+
throw err;
|
|
14666
14691
|
}
|
|
14667
|
-
return ports;
|
|
14668
14692
|
}
|
|
14669
14693
|
async function startDevServer(repoPath, worktreePath, onLine, opts) {
|
|
14670
14694
|
const script = getRunScript(worktreePath, repoPath, opts?.scriptName);
|
|
14671
14695
|
if (!script) return null;
|
|
14672
|
-
const
|
|
14673
|
-
const
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
|
|
14696
|
+
const held = await reservePortRange(PORT_RANGE_SIZE);
|
|
14697
|
+
const ports = held.map((h) => h.port);
|
|
14698
|
+
try {
|
|
14699
|
+
await Promise.all(held.map((h) => h.release()));
|
|
14700
|
+
const handle = await spawnWorkspaceScript(script.command, {
|
|
14701
|
+
worktreePath,
|
|
14702
|
+
repoPath,
|
|
14703
|
+
ports,
|
|
14704
|
+
defaultBranch: opts?.defaultBranch,
|
|
14705
|
+
onLine
|
|
14706
|
+
});
|
|
14707
|
+
return {
|
|
14708
|
+
pid: handle.pid,
|
|
14709
|
+
port: ports[0],
|
|
14710
|
+
ports,
|
|
14711
|
+
scriptName: script.name,
|
|
14712
|
+
kill: handle.kill,
|
|
14713
|
+
done: handle.done
|
|
14714
|
+
};
|
|
14715
|
+
} catch (err) {
|
|
14716
|
+
await Promise.all(held.map((h) => h.release()));
|
|
14717
|
+
throw err;
|
|
14718
|
+
}
|
|
14688
14719
|
}
|
|
14689
14720
|
var import_node_fs37, import_node_child_process4, import_node_net, import_node_path39, import_execa4, import_node_readline3, PORT_RANGE_SIZE, cachedLoginEnv;
|
|
14690
14721
|
var init_conductor = __esm({
|
|
@@ -21662,6 +21693,8 @@ var init_orchestrator = __esm({
|
|
|
21662
21693
|
/** Auto-continues after a worktree turn ended while a detached job still runs. */
|
|
21663
21694
|
jobContinueCount = /* @__PURE__ */ new Map();
|
|
21664
21695
|
jobContinueNudged = /* @__PURE__ */ new Set();
|
|
21696
|
+
/** In-flight startDev per worktree run key — agent MCP + UI Start must not double-spawn. */
|
|
21697
|
+
startingDev = /* @__PURE__ */ new Map();
|
|
21665
21698
|
maxConcurrent;
|
|
21666
21699
|
runningCount = 0;
|
|
21667
21700
|
constructor(opts) {
|
|
@@ -22879,9 +22912,20 @@ var init_orchestrator = __esm({
|
|
|
22879
22912
|
"No run script found for this worktree. Add [scripts.run.*] in the worktree\u2019s .sideboard/settings.toml or .conductor/settings.toml (or settings.local.toml on the main repo)."
|
|
22880
22913
|
);
|
|
22881
22914
|
}
|
|
22915
|
+
const runKey = worktreeRunProcessKey(thread.worktreePath, resolvedName);
|
|
22916
|
+
const inFlight = this.startingDev.get(runKey);
|
|
22917
|
+
if (inFlight) return inFlight;
|
|
22918
|
+
const start = this.startDevUnlocked(thread, resolvedName, scriptName, scripts, runKey);
|
|
22919
|
+
this.startingDev.set(runKey, start);
|
|
22920
|
+
try {
|
|
22921
|
+
return await start;
|
|
22922
|
+
} finally {
|
|
22923
|
+
this.startingDev.delete(runKey);
|
|
22924
|
+
}
|
|
22925
|
+
}
|
|
22926
|
+
async startDevUnlocked(thread, resolvedName, scriptName, scripts, runKey) {
|
|
22882
22927
|
const siblings = threadsSharingWorktree(thread.worktreePath);
|
|
22883
22928
|
const shared = mergeWorktreeActiveRuns(siblings);
|
|
22884
|
-
const runKey = worktreeRunProcessKey(thread.worktreePath, resolvedName);
|
|
22885
22929
|
const existing = this.processes.get(runKey) ?? siblings.map((t) => this.processes.get(`${t.id}:run:${resolvedName}`)).find(Boolean);
|
|
22886
22930
|
const active = shared.activeRuns.find((r) => r.scriptName === resolvedName);
|
|
22887
22931
|
if (existing && active) {
|
|
@@ -22893,6 +22937,14 @@ var init_orchestrator = __esm({
|
|
|
22893
22937
|
return { port: shared.devPort, scriptName: resolvedName, ports: [shared.devPort] };
|
|
22894
22938
|
}
|
|
22895
22939
|
}
|
|
22940
|
+
if (active && !existing) {
|
|
22941
|
+
killListenersOnPorts(collectActiveRunPorts([active]));
|
|
22942
|
+
this.syncWorktreeRuns(
|
|
22943
|
+
thread.worktreePath,
|
|
22944
|
+
shared.activeRuns.filter((r) => r.scriptName !== resolvedName),
|
|
22945
|
+
shared.devPort === active.port ? null : shared.devPort
|
|
22946
|
+
);
|
|
22947
|
+
}
|
|
22896
22948
|
const mode = getRunMode(thread.worktreePath, thread.repoPath);
|
|
22897
22949
|
if (mode === "nonconcurrent") {
|
|
22898
22950
|
const here = normalizeWorktreePath(thread.worktreePath);
|
|
@@ -22941,6 +22993,7 @@ var init_orchestrator = __esm({
|
|
|
22941
22993
|
kill: handle.kill
|
|
22942
22994
|
});
|
|
22943
22995
|
}
|
|
22996
|
+
const latestShared = mergeWorktreeActiveRuns(threadsSharingWorktree(thread.worktreePath));
|
|
22944
22997
|
const run2 = {
|
|
22945
22998
|
scriptName: resolvedName,
|
|
22946
22999
|
port: handle.port,
|
|
@@ -22948,13 +23001,13 @@ var init_orchestrator = __esm({
|
|
|
22948
23001
|
startedAt
|
|
22949
23002
|
};
|
|
22950
23003
|
const nextRuns = [
|
|
22951
|
-
...
|
|
23004
|
+
...latestShared.activeRuns.filter((r) => r.scriptName !== resolvedName),
|
|
22952
23005
|
run2
|
|
22953
23006
|
];
|
|
22954
23007
|
this.syncWorktreeRuns(
|
|
22955
23008
|
thread.worktreePath,
|
|
22956
23009
|
nextRuns,
|
|
22957
|
-
isDefault ? handle.port :
|
|
23010
|
+
isDefault ? handle.port : latestShared.devPort
|
|
22958
23011
|
);
|
|
22959
23012
|
this.emit({
|
|
22960
23013
|
type: "dev_server_started",
|
package/dist/mcp/run-stdio.js
CHANGED