@sideboard-ai/core 0.1.173 → 0.1.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agents-CTWLBPCV.js → agents-LMPVUPOH.js} +3 -3
- package/dist/{agents-7UTRNLXQ.js → agents-ZWYRGFZB.js} +3 -3
- package/dist/{chunk-QYZYDO3F.js → chunk-7JIYKYLL.js} +26 -5
- package/dist/{chunk-PXNOT6NV.js → chunk-7O53GXTA.js} +26 -5
- package/dist/{chunk-3F7AXVIL.js → chunk-CUA4S537.js} +3 -3
- package/dist/{chunk-WE34LOLO.js → chunk-HJPGIETB.js} +19 -18
- package/dist/{chunk-6X6KMUI2.js → chunk-TPPZXZTA.js} +3 -3
- package/dist/{chunk-234EKD2F.js → chunk-VCVBICMZ.js} +1 -1
- package/dist/{chunk-SKKEJZEX.js → chunk-YEPVWJ3R.js} +18 -17
- package/dist/{chunk-2RM6BZQ2.js → chunk-ZY7K4T37.js} +1 -1
- package/dist/{coordinator-prompt-PM6MPYYB.js → coordinator-prompt-K3HXEPFD.js} +2 -2
- package/dist/{coordinator-prompt-7CTI6HRH.js → coordinator-prompt-LJKA2ODR.js} +2 -2
- package/dist/{global-workspace-CRJ6ZVIY.js → global-workspace-KA7T26F5.js} +2 -2
- package/dist/{global-workspace-CMYSFRCM.js → global-workspace-VDFSU3DD.js} +2 -2
- package/dist/index.cjs +35 -13
- package/dist/index.js +6 -6
- package/dist/mcp/run-stdio.cjs +33 -11
- package/dist/mcp/run-stdio.js +4 -4
- package/dist/{orchestrator-QBB2RELD.js → orchestrator-DMSSC4SV.js} +4 -4
- package/dist/{orchestrator-PEOUSLAY.js → orchestrator-VMUZJFTZ.js} +4 -4
- package/dist/{workspaces-L73MCDFA.js → workspaces-GOGBPATJ.js} +2 -2
- package/dist/{workspaces-UYSD2STS.js → workspaces-UR7YEFMZ.js} +2 -2
- package/dist/{worktree-SQD3DBYC.js → worktree-LC4VRWDM.js} +1 -1
- package/dist/{worktree-WVEDT3FM.js → worktree-UTDBQXSS.js} +1 -1
- package/package.json +1 -1
|
@@ -37,12 +37,12 @@ import {
|
|
|
37
37
|
resolveQuotaFallbackAgent,
|
|
38
38
|
turnCostUsdFromCursorUsage,
|
|
39
39
|
whichOnPath
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-TPPZXZTA.js";
|
|
41
41
|
import "./chunk-LZ6QMEQC.js";
|
|
42
42
|
import "./chunk-S42XV45P.js";
|
|
43
43
|
import "./chunk-6GN5WPYZ.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-VCVBICMZ.js";
|
|
45
|
+
import "./chunk-7O53GXTA.js";
|
|
46
46
|
import "./chunk-D6JWYJ4P.js";
|
|
47
47
|
import "./chunk-LZQULFIT.js";
|
|
48
48
|
import "./chunk-SYFVUF2C.js";
|
|
@@ -31,9 +31,9 @@ import {
|
|
|
31
31
|
resolveLoginCommand,
|
|
32
32
|
resolveQuotaFallbackAgent,
|
|
33
33
|
whichOnPath
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
34
|
+
} from "./chunk-CUA4S537.js";
|
|
35
|
+
import "./chunk-ZY7K4T37.js";
|
|
36
|
+
import "./chunk-7JIYKYLL.js";
|
|
37
37
|
import "./chunk-6K64FJDD.js";
|
|
38
38
|
import "./chunk-XD2BAANL.js";
|
|
39
39
|
import "./chunk-M267JPEA.js";
|
|
@@ -760,18 +760,35 @@ function teamSlugFromName(name) {
|
|
|
760
760
|
function normalizeTakenSlug(raw) {
|
|
761
761
|
return raw.toLowerCase().replace(/^thread\//, "").replace(/\/+$/, "");
|
|
762
762
|
}
|
|
763
|
+
function soccerTokenFromTakenSlug(raw) {
|
|
764
|
+
const normalized = normalizeTakenSlug(raw);
|
|
765
|
+
if (!normalized) return null;
|
|
766
|
+
const withoutTicket = normalized.replace(/^[a-z]{2,8}-\d{1,6}-/, "").replace(/^\d{1,8}-/, "");
|
|
767
|
+
const lookup = withoutTicket || normalized;
|
|
768
|
+
const suffixMatch = lookup.match(/^(.+)-(\d+)$/);
|
|
769
|
+
const base = suffixMatch?.[1] ?? lookup;
|
|
770
|
+
const team = FAMOUS_SOCCER_TEAM_SEEDS.find((t) => t.slug === base);
|
|
771
|
+
if (!team) return null;
|
|
772
|
+
return suffixMatch ? `${team.slug}-${suffixMatch[2]}` : team.slug;
|
|
773
|
+
}
|
|
774
|
+
function addTakenSlug(out, raw) {
|
|
775
|
+
const normalized = normalizeTakenSlug(raw);
|
|
776
|
+
if (!normalized) return;
|
|
777
|
+
out.add(normalized);
|
|
778
|
+
const token = soccerTokenFromTakenSlug(normalized);
|
|
779
|
+
if (token) out.add(token);
|
|
780
|
+
}
|
|
763
781
|
function takenSlugsFromThread(thread) {
|
|
764
782
|
const out = /* @__PURE__ */ new Set();
|
|
765
783
|
const titleSlug = thread.title ? teamSlugFromName(thread.title) : null;
|
|
766
784
|
if (titleSlug) out.add(normalizeTakenSlug(titleSlug));
|
|
767
785
|
if (thread.branchName?.trim()) {
|
|
768
|
-
|
|
769
|
-
if (branch) out.add(branch);
|
|
786
|
+
addTakenSlug(out, thread.branchName.trim());
|
|
770
787
|
}
|
|
771
788
|
if (thread.worktreePath) {
|
|
772
789
|
const parts = thread.worktreePath.replace(/\/+$/, "").split("/");
|
|
773
790
|
const dir = parts[parts.length - 1];
|
|
774
|
-
if (dir) out
|
|
791
|
+
if (dir) addTakenSlug(out, dir);
|
|
775
792
|
}
|
|
776
793
|
return [...out];
|
|
777
794
|
}
|
|
@@ -3191,12 +3208,16 @@ function collectTakenTeamSlugs(repoPath) {
|
|
|
3191
3208
|
if (existsSync(root)) {
|
|
3192
3209
|
for (const entry of readdirSync(root, { withFileTypes: true })) {
|
|
3193
3210
|
if (entry.isDirectory() && entry.name !== ".DS_Store") {
|
|
3194
|
-
|
|
3211
|
+
for (const slug of takenSlugsFromThread({ worktreePath: entry.name })) {
|
|
3212
|
+
taken.add(slug);
|
|
3213
|
+
}
|
|
3195
3214
|
}
|
|
3196
3215
|
}
|
|
3197
3216
|
}
|
|
3198
3217
|
for (const slug of listLocalThreadBranchSlugs(repoPath)) {
|
|
3199
|
-
|
|
3218
|
+
for (const token of takenSlugsFromThread({ branchName: slug })) {
|
|
3219
|
+
taken.add(token);
|
|
3220
|
+
}
|
|
3200
3221
|
}
|
|
3201
3222
|
for (const thread of listThreads({ includeArchived: true })) {
|
|
3202
3223
|
if (!sameRepoPath(thread.repoPath, repoPath)) continue;
|
|
@@ -762,18 +762,35 @@ function teamSlugFromName(name) {
|
|
|
762
762
|
function normalizeTakenSlug(raw) {
|
|
763
763
|
return raw.toLowerCase().replace(/^thread\//, "").replace(/\/+$/, "");
|
|
764
764
|
}
|
|
765
|
+
function soccerTokenFromTakenSlug(raw) {
|
|
766
|
+
const normalized = normalizeTakenSlug(raw);
|
|
767
|
+
if (!normalized) return null;
|
|
768
|
+
const withoutTicket = normalized.replace(/^[a-z]{2,8}-\d{1,6}-/, "").replace(/^\d{1,8}-/, "");
|
|
769
|
+
const lookup = withoutTicket || normalized;
|
|
770
|
+
const suffixMatch = lookup.match(/^(.+)-(\d+)$/);
|
|
771
|
+
const base = suffixMatch?.[1] ?? lookup;
|
|
772
|
+
const team = FAMOUS_SOCCER_TEAM_SEEDS.find((t) => t.slug === base);
|
|
773
|
+
if (!team) return null;
|
|
774
|
+
return suffixMatch ? `${team.slug}-${suffixMatch[2]}` : team.slug;
|
|
775
|
+
}
|
|
776
|
+
function addTakenSlug(out, raw) {
|
|
777
|
+
const normalized = normalizeTakenSlug(raw);
|
|
778
|
+
if (!normalized) return;
|
|
779
|
+
out.add(normalized);
|
|
780
|
+
const token = soccerTokenFromTakenSlug(normalized);
|
|
781
|
+
if (token) out.add(token);
|
|
782
|
+
}
|
|
765
783
|
function takenSlugsFromThread(thread) {
|
|
766
784
|
const out = /* @__PURE__ */ new Set();
|
|
767
785
|
const titleSlug = thread.title ? teamSlugFromName(thread.title) : null;
|
|
768
786
|
if (titleSlug) out.add(normalizeTakenSlug(titleSlug));
|
|
769
787
|
if (thread.branchName?.trim()) {
|
|
770
|
-
|
|
771
|
-
if (branch) out.add(branch);
|
|
788
|
+
addTakenSlug(out, thread.branchName.trim());
|
|
772
789
|
}
|
|
773
790
|
if (thread.worktreePath) {
|
|
774
791
|
const parts = thread.worktreePath.replace(/\/+$/, "").split("/");
|
|
775
792
|
const dir = parts[parts.length - 1];
|
|
776
|
-
if (dir) out
|
|
793
|
+
if (dir) addTakenSlug(out, dir);
|
|
777
794
|
}
|
|
778
795
|
return [...out];
|
|
779
796
|
}
|
|
@@ -3154,12 +3171,16 @@ function collectTakenTeamSlugs(repoPath) {
|
|
|
3154
3171
|
if (existsSync(root)) {
|
|
3155
3172
|
for (const entry of readdirSync(root, { withFileTypes: true })) {
|
|
3156
3173
|
if (entry.isDirectory() && entry.name !== ".DS_Store") {
|
|
3157
|
-
|
|
3174
|
+
for (const slug of takenSlugsFromThread({ worktreePath: entry.name })) {
|
|
3175
|
+
taken.add(slug);
|
|
3176
|
+
}
|
|
3158
3177
|
}
|
|
3159
3178
|
}
|
|
3160
3179
|
}
|
|
3161
3180
|
for (const slug of listLocalThreadBranchSlugs(repoPath)) {
|
|
3162
|
-
|
|
3181
|
+
for (const token of takenSlugsFromThread({ branchName: slug })) {
|
|
3182
|
+
taken.add(token);
|
|
3183
|
+
}
|
|
3163
3184
|
}
|
|
3164
3185
|
for (const thread of listThreads({ includeArchived: true })) {
|
|
3165
3186
|
if (!sameRepoPath(thread.repoPath, repoPath)) continue;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isOrchestratorThread
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZY7K4T37.js";
|
|
4
4
|
import {
|
|
5
5
|
codexUnattendedGitConfigArgs,
|
|
6
6
|
mergeAgentGitAuthEnv,
|
|
7
7
|
resolveAgentGitAuthEnv,
|
|
8
8
|
resolveCodexGitWritableRoots
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7JIYKYLL.js";
|
|
10
10
|
import {
|
|
11
11
|
applyConnectedTeamToCli,
|
|
12
12
|
brightsyMcpServerName,
|
|
@@ -1898,7 +1898,7 @@ var claudeAdapter = {
|
|
|
1898
1898
|
);
|
|
1899
1899
|
}
|
|
1900
1900
|
const mode = permissionMode(thread);
|
|
1901
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
1901
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-VDFSU3DD.js");
|
|
1902
1902
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
1903
1903
|
const injectedServers = await buildInjectedMcpServers({
|
|
1904
1904
|
includeSideboard: true,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
stripBrightsyNdjsonNoise,
|
|
25
25
|
sumUsageList,
|
|
26
26
|
toolDescription
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CUA4S537.js";
|
|
28
28
|
import {
|
|
29
29
|
SLACK_REPLY_FORMATTING,
|
|
30
30
|
addWorkspace,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
stageAbsolutePathsAsAttachments,
|
|
48
48
|
stageBuffersAsAttachments,
|
|
49
49
|
syncWorkspacesFromThreads
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-ZY7K4T37.js";
|
|
51
51
|
import {
|
|
52
52
|
addPrStackLayer,
|
|
53
53
|
allocateTeamName,
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
worktreeDisplayLabelForGroup,
|
|
98
98
|
worktreeNameFromPath,
|
|
99
99
|
worktreeSlugForTicket
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-7JIYKYLL.js";
|
|
101
101
|
import {
|
|
102
102
|
ATTACHMENTS_DIR,
|
|
103
103
|
DETACHED_JOBS_DIR,
|
|
@@ -466,7 +466,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
466
466
|
await continueOnReply(threadId, prompt);
|
|
467
467
|
return;
|
|
468
468
|
}
|
|
469
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
469
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-VMUZJFTZ.js");
|
|
470
470
|
await getOrchestrator2().send(threadId, prompt);
|
|
471
471
|
} catch {
|
|
472
472
|
}
|
|
@@ -800,9 +800,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
800
800
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
801
801
|
);
|
|
802
802
|
}
|
|
803
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
803
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-VDFSU3DD.js");
|
|
804
804
|
if (isGlobalThread2(thread)) {
|
|
805
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
805
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-LJKA2ODR.js");
|
|
806
806
|
ensureGlobalCoordinatorCwd2(
|
|
807
807
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
808
808
|
);
|
|
@@ -1381,7 +1381,7 @@ function buildSessionSeed(messages, opts) {
|
|
|
1381
1381
|
for (let i = blocks.length - 1; i >= 0; i--) {
|
|
1382
1382
|
if (keep[i]) continue;
|
|
1383
1383
|
const next = used + blocks[i].length + 2;
|
|
1384
|
-
if (next > maxChars && used > 0)
|
|
1384
|
+
if (next > maxChars && used > 0) continue;
|
|
1385
1385
|
keep[i] = true;
|
|
1386
1386
|
used = next;
|
|
1387
1387
|
}
|
|
@@ -2770,7 +2770,7 @@ function jobAlive(pid) {
|
|
|
2770
2770
|
}
|
|
2771
2771
|
function processGroupAlive(pgid) {
|
|
2772
2772
|
if (process.platform === "win32") return false;
|
|
2773
|
-
if (!Number.isInteger(pgid) || pgid <=
|
|
2773
|
+
if (!Number.isInteger(pgid) || pgid <= 1) return false;
|
|
2774
2774
|
try {
|
|
2775
2775
|
process.kill(-pgid, 0);
|
|
2776
2776
|
return true;
|
|
@@ -2813,7 +2813,7 @@ function listRunningDetachedJobs(worktreePath) {
|
|
|
2813
2813
|
for (const id of ids) {
|
|
2814
2814
|
const dir = resolveJobDir(root, id);
|
|
2815
2815
|
const pid = readIntFile(join11(dir, "pid"));
|
|
2816
|
-
if (
|
|
2816
|
+
if (jobTreeAlive(pid)) running.push(id);
|
|
2817
2817
|
}
|
|
2818
2818
|
return running.sort();
|
|
2819
2819
|
}
|
|
@@ -3782,7 +3782,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3782
3782
|
return readThread(thread.id) ?? thread;
|
|
3783
3783
|
}
|
|
3784
3784
|
async function listLinearIssues(agent, repoPath) {
|
|
3785
|
-
const { getAdapter: getAdapter2 } = await import("./agents-
|
|
3785
|
+
const { getAdapter: getAdapter2 } = await import("./agents-ZWYRGFZB.js");
|
|
3786
3786
|
await requireAgent(agent, { requireLinear: true });
|
|
3787
3787
|
const adapter = getAdapter2(agent);
|
|
3788
3788
|
if (!adapter.listLinearIssues) {
|
|
@@ -4204,7 +4204,7 @@ async function adoptThread(input) {
|
|
|
4204
4204
|
messages: input.messages ?? []
|
|
4205
4205
|
});
|
|
4206
4206
|
writeThread(thread);
|
|
4207
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
4207
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-UR7YEFMZ.js");
|
|
4208
4208
|
await ensureWorkspace2(repoPath);
|
|
4209
4209
|
const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-X54WSOXM.js");
|
|
4210
4210
|
await ensureWorktreeSideboardIgnored2(input.worktreePath);
|
|
@@ -6686,7 +6686,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6686
6686
|
${prompt}`;
|
|
6687
6687
|
}
|
|
6688
6688
|
async function defaultDeps() {
|
|
6689
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
6689
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-VMUZJFTZ.js");
|
|
6690
6690
|
const orch = getOrchestrator2();
|
|
6691
6691
|
return {
|
|
6692
6692
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -7474,9 +7474,10 @@ var Orchestrator = class {
|
|
|
7474
7474
|
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
7475
7475
|
});
|
|
7476
7476
|
thread = this.requireThread(threadId);
|
|
7477
|
+
const gitPrompt = expandCanonicalGitRequest(prompt);
|
|
7477
7478
|
const { agentPrompt: expandedPrompt } = expandComposerPrompt(
|
|
7478
7479
|
thread.worktreePath,
|
|
7479
|
-
|
|
7480
|
+
gitPrompt,
|
|
7480
7481
|
{
|
|
7481
7482
|
attachments: sentAttachments ?? thread.attachments
|
|
7482
7483
|
}
|
|
@@ -7518,13 +7519,13 @@ var Orchestrator = class {
|
|
|
7518
7519
|
artifactReminder,
|
|
7519
7520
|
longRunningReminder
|
|
7520
7521
|
].filter(Boolean).join("\n\n") || void 0;
|
|
7521
|
-
const prGateDirective = thread.agent !== "brightsy" && !isOrchestratorThread(thread) && mentionsPrGoal(
|
|
7522
|
+
const prGateDirective = thread.agent !== "brightsy" && !isOrchestratorThread(thread) && mentionsPrGoal(prompt) ? formatPrGateDirective() : null;
|
|
7522
7523
|
const agentPrompt = [
|
|
7523
7524
|
thread.planMode ? PLAN_MODE_INSTRUCTION : null,
|
|
7524
7525
|
orchestrationReminder,
|
|
7525
7526
|
prGateDirective,
|
|
7526
7527
|
slackReplyContext,
|
|
7527
|
-
|
|
7528
|
+
expandedPrompt
|
|
7528
7529
|
].filter(Boolean).join("\n\n");
|
|
7529
7530
|
if (thread.attachments.length > 0) {
|
|
7530
7531
|
updateThread(threadId, { attachments: [] });
|
|
@@ -8771,7 +8772,7 @@ var Orchestrator = class {
|
|
|
8771
8772
|
this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
|
|
8772
8773
|
if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
|
|
8773
8774
|
try {
|
|
8774
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
8775
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-UR7YEFMZ.js");
|
|
8775
8776
|
await ensureWorkspace2(thread.repoPath);
|
|
8776
8777
|
} catch {
|
|
8777
8778
|
}
|
|
@@ -8825,7 +8826,7 @@ var Orchestrator = class {
|
|
|
8825
8826
|
`Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
|
|
8826
8827
|
);
|
|
8827
8828
|
}
|
|
8828
|
-
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-
|
|
8829
|
+
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-UTDBQXSS.js");
|
|
8829
8830
|
const slug = thread.worktreePath.split("/").pop();
|
|
8830
8831
|
const dest = thread.worktreePath;
|
|
8831
8832
|
await withRepoGitLock(thread.repoPath, async () => {
|
|
@@ -8935,7 +8936,7 @@ async function startOrchestration(opts) {
|
|
|
8935
8936
|
sourceRef: "default",
|
|
8936
8937
|
...createOpts
|
|
8937
8938
|
}).catch(async () => {
|
|
8938
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
8939
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-UTDBQXSS.js");
|
|
8939
8940
|
const repo = await resolveRepoRoot2(repoPath);
|
|
8940
8941
|
const def = await resolveDefaultBranch2(repo);
|
|
8941
8942
|
return orch.createThread({
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
} from "./chunk-S42XV45P.js";
|
|
12
12
|
import {
|
|
13
13
|
isOrchestratorThread
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VCVBICMZ.js";
|
|
15
15
|
import {
|
|
16
16
|
codexUnattendedGitConfigArgs,
|
|
17
17
|
mergeAgentGitAuthEnv,
|
|
18
18
|
resolveAgentGitAuthEnv,
|
|
19
19
|
resolveCodexGitWritableRoots
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7O53GXTA.js";
|
|
21
21
|
import {
|
|
22
22
|
enrichPathWithNpmGlobalBin,
|
|
23
23
|
isConductorBundledCli,
|
|
@@ -2216,7 +2216,7 @@ var claudeAdapter = {
|
|
|
2216
2216
|
);
|
|
2217
2217
|
}
|
|
2218
2218
|
const mode = permissionMode(thread);
|
|
2219
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
2219
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-KA7T26F5.js");
|
|
2220
2220
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
2221
2221
|
const injectedServers = await buildInjectedMcpServers({
|
|
2222
2222
|
includeSideboard: true,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
summarizeTurnStderr,
|
|
34
34
|
toolDescription,
|
|
35
35
|
turnFailChatText
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TPPZXZTA.js";
|
|
37
37
|
import {
|
|
38
38
|
extractPresentedPlan,
|
|
39
39
|
readPlanFile,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
stageAbsolutePathsAsAttachments,
|
|
65
65
|
stageBuffersAsAttachments,
|
|
66
66
|
syncWorkspacesFromThreads
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-VCVBICMZ.js";
|
|
68
68
|
import {
|
|
69
69
|
addPrStackLayer,
|
|
70
70
|
allocateTeamName,
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
worktreeDisplayLabelForGroup,
|
|
115
115
|
worktreeNameFromPath,
|
|
116
116
|
worktreeSlugForTicket
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-7O53GXTA.js";
|
|
118
118
|
import {
|
|
119
119
|
ATTACHMENTS_DIR,
|
|
120
120
|
DETACHED_JOBS_DIR,
|
|
@@ -401,7 +401,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
401
401
|
await continueOnReply(threadId, prompt);
|
|
402
402
|
return;
|
|
403
403
|
}
|
|
404
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
404
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-DMSSC4SV.js");
|
|
405
405
|
await getOrchestrator2().send(threadId, prompt);
|
|
406
406
|
} catch {
|
|
407
407
|
}
|
|
@@ -794,9 +794,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
794
794
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
795
795
|
);
|
|
796
796
|
}
|
|
797
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
797
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-KA7T26F5.js");
|
|
798
798
|
if (isGlobalThread2(thread)) {
|
|
799
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
799
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-K3HXEPFD.js");
|
|
800
800
|
ensureGlobalCoordinatorCwd2(
|
|
801
801
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
802
802
|
);
|
|
@@ -1355,7 +1355,7 @@ function buildSessionSeed(messages, opts) {
|
|
|
1355
1355
|
for (let i = blocks.length - 1; i >= 0; i--) {
|
|
1356
1356
|
if (keep[i]) continue;
|
|
1357
1357
|
const next = used + blocks[i].length + 2;
|
|
1358
|
-
if (next > maxChars && used > 0)
|
|
1358
|
+
if (next > maxChars && used > 0) continue;
|
|
1359
1359
|
keep[i] = true;
|
|
1360
1360
|
used = next;
|
|
1361
1361
|
}
|
|
@@ -2683,7 +2683,7 @@ function jobAlive(pid) {
|
|
|
2683
2683
|
}
|
|
2684
2684
|
function processGroupAlive(pgid) {
|
|
2685
2685
|
if (process.platform === "win32") return false;
|
|
2686
|
-
if (!Number.isInteger(pgid) || pgid <=
|
|
2686
|
+
if (!Number.isInteger(pgid) || pgid <= 1) return false;
|
|
2687
2687
|
try {
|
|
2688
2688
|
process.kill(-pgid, 0);
|
|
2689
2689
|
return true;
|
|
@@ -2726,7 +2726,7 @@ function listRunningDetachedJobs(worktreePath) {
|
|
|
2726
2726
|
for (const id of ids) {
|
|
2727
2727
|
const dir = resolveJobDir(root, id);
|
|
2728
2728
|
const pid = readIntFile(join11(dir, "pid"));
|
|
2729
|
-
if (
|
|
2729
|
+
if (jobTreeAlive(pid)) running.push(id);
|
|
2730
2730
|
}
|
|
2731
2731
|
return running.sort();
|
|
2732
2732
|
}
|
|
@@ -4063,7 +4063,7 @@ async function adoptThread(input) {
|
|
|
4063
4063
|
messages: input.messages ?? []
|
|
4064
4064
|
});
|
|
4065
4065
|
writeThread(thread);
|
|
4066
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
4066
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-GOGBPATJ.js");
|
|
4067
4067
|
await ensureWorkspace2(repoPath);
|
|
4068
4068
|
const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-N5X5I422.js");
|
|
4069
4069
|
await ensureWorktreeSideboardIgnored2(input.worktreePath);
|
|
@@ -6339,7 +6339,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6339
6339
|
${prompt}`;
|
|
6340
6340
|
}
|
|
6341
6341
|
async function defaultDeps() {
|
|
6342
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
6342
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-DMSSC4SV.js");
|
|
6343
6343
|
const orch = getOrchestrator2();
|
|
6344
6344
|
return {
|
|
6345
6345
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -7127,9 +7127,10 @@ var Orchestrator = class {
|
|
|
7127
7127
|
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
7128
7128
|
});
|
|
7129
7129
|
thread = this.requireThread(threadId);
|
|
7130
|
+
const gitPrompt = expandCanonicalGitRequest(prompt);
|
|
7130
7131
|
const { agentPrompt: expandedPrompt } = expandComposerPrompt(
|
|
7131
7132
|
thread.worktreePath,
|
|
7132
|
-
|
|
7133
|
+
gitPrompt,
|
|
7133
7134
|
{
|
|
7134
7135
|
attachments: sentAttachments ?? thread.attachments
|
|
7135
7136
|
}
|
|
@@ -7171,13 +7172,13 @@ var Orchestrator = class {
|
|
|
7171
7172
|
artifactReminder,
|
|
7172
7173
|
longRunningReminder
|
|
7173
7174
|
].filter(Boolean).join("\n\n") || void 0;
|
|
7174
|
-
const prGateDirective = thread.agent !== "brightsy" && !isOrchestratorThread(thread) && mentionsPrGoal(
|
|
7175
|
+
const prGateDirective = thread.agent !== "brightsy" && !isOrchestratorThread(thread) && mentionsPrGoal(prompt) ? formatPrGateDirective() : null;
|
|
7175
7176
|
const agentPrompt = [
|
|
7176
7177
|
thread.planMode ? PLAN_MODE_INSTRUCTION : null,
|
|
7177
7178
|
orchestrationReminder,
|
|
7178
7179
|
prGateDirective,
|
|
7179
7180
|
slackReplyContext,
|
|
7180
|
-
|
|
7181
|
+
expandedPrompt
|
|
7181
7182
|
].filter(Boolean).join("\n\n");
|
|
7182
7183
|
if (thread.attachments.length > 0) {
|
|
7183
7184
|
updateThread(threadId, { attachments: [] });
|
|
@@ -8424,7 +8425,7 @@ var Orchestrator = class {
|
|
|
8424
8425
|
this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
|
|
8425
8426
|
if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
|
|
8426
8427
|
try {
|
|
8427
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
8428
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-GOGBPATJ.js");
|
|
8428
8429
|
await ensureWorkspace2(thread.repoPath);
|
|
8429
8430
|
} catch {
|
|
8430
8431
|
}
|
|
@@ -8478,7 +8479,7 @@ var Orchestrator = class {
|
|
|
8478
8479
|
`Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
|
|
8479
8480
|
);
|
|
8480
8481
|
}
|
|
8481
|
-
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-
|
|
8482
|
+
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-LC4VRWDM.js");
|
|
8482
8483
|
const slug = thread.worktreePath.split("/").pop();
|
|
8483
8484
|
const dest = thread.worktreePath;
|
|
8484
8485
|
await withRepoGitLock(thread.repoPath, async () => {
|
|
@@ -8588,7 +8589,7 @@ async function startOrchestration(opts) {
|
|
|
8588
8589
|
sourceRef: "default",
|
|
8589
8590
|
...createOpts
|
|
8590
8591
|
}).catch(async () => {
|
|
8591
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
8592
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-LC4VRWDM.js");
|
|
8592
8593
|
const repo = await resolveRepoRoot2(repoPath);
|
|
8593
8594
|
const def = await resolveDefaultBranch2(repo);
|
|
8594
8595
|
return orch.createThread({
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
enrichWorkspacesWithGithub,
|
|
10
10
|
ensureGlobalCoordinatorCwd,
|
|
11
11
|
formatWorkspaceInventory
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-VCVBICMZ.js";
|
|
13
|
+
import "./chunk-7O53GXTA.js";
|
|
14
14
|
import "./chunk-D6JWYJ4P.js";
|
|
15
15
|
import "./chunk-LZQULFIT.js";
|
|
16
16
|
import "./chunk-SYFVUF2C.js";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
enrichWorkspacesWithGithub,
|
|
8
8
|
ensureGlobalCoordinatorCwd,
|
|
9
9
|
formatWorkspaceInventory
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ZY7K4T37.js";
|
|
11
|
+
import "./chunk-7JIYKYLL.js";
|
|
12
12
|
import "./chunk-6K64FJDD.js";
|
|
13
13
|
import "./chunk-J7LQVLFQ.js";
|
|
14
14
|
import "./chunk-4TR3HZFT.js";
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
orchestratorSessionPoisonedByBuiltins,
|
|
18
18
|
slackCoordinatorSourceRef,
|
|
19
19
|
takenTeamSlugsForOrchestration
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-VCVBICMZ.js";
|
|
21
|
+
import "./chunk-7O53GXTA.js";
|
|
22
22
|
import "./chunk-D6JWYJ4P.js";
|
|
23
23
|
import "./chunk-LZQULFIT.js";
|
|
24
24
|
import "./chunk-SYFVUF2C.js";
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
orchestratorSessionPoisonedByBuiltins,
|
|
16
16
|
slackCoordinatorSourceRef,
|
|
17
17
|
takenTeamSlugsForOrchestration
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-ZY7K4T37.js";
|
|
19
|
+
import "./chunk-7JIYKYLL.js";
|
|
20
20
|
import "./chunk-6K64FJDD.js";
|
|
21
21
|
import "./chunk-J7LQVLFQ.js";
|
|
22
22
|
import "./chunk-4TR3HZFT.js";
|
package/dist/index.cjs
CHANGED
|
@@ -4054,18 +4054,35 @@ function teamSlugFromName(name) {
|
|
|
4054
4054
|
function normalizeTakenSlug(raw) {
|
|
4055
4055
|
return raw.toLowerCase().replace(/^thread\//, "").replace(/\/+$/, "");
|
|
4056
4056
|
}
|
|
4057
|
+
function soccerTokenFromTakenSlug(raw) {
|
|
4058
|
+
const normalized = normalizeTakenSlug(raw);
|
|
4059
|
+
if (!normalized) return null;
|
|
4060
|
+
const withoutTicket = normalized.replace(/^[a-z]{2,8}-\d{1,6}-/, "").replace(/^\d{1,8}-/, "");
|
|
4061
|
+
const lookup = withoutTicket || normalized;
|
|
4062
|
+
const suffixMatch = lookup.match(/^(.+)-(\d+)$/);
|
|
4063
|
+
const base = suffixMatch?.[1] ?? lookup;
|
|
4064
|
+
const team = FAMOUS_SOCCER_TEAM_SEEDS.find((t) => t.slug === base);
|
|
4065
|
+
if (!team) return null;
|
|
4066
|
+
return suffixMatch ? `${team.slug}-${suffixMatch[2]}` : team.slug;
|
|
4067
|
+
}
|
|
4068
|
+
function addTakenSlug(out, raw) {
|
|
4069
|
+
const normalized = normalizeTakenSlug(raw);
|
|
4070
|
+
if (!normalized) return;
|
|
4071
|
+
out.add(normalized);
|
|
4072
|
+
const token = soccerTokenFromTakenSlug(normalized);
|
|
4073
|
+
if (token) out.add(token);
|
|
4074
|
+
}
|
|
4057
4075
|
function takenSlugsFromThread(thread) {
|
|
4058
4076
|
const out = /* @__PURE__ */ new Set();
|
|
4059
4077
|
const titleSlug = thread.title ? teamSlugFromName(thread.title) : null;
|
|
4060
4078
|
if (titleSlug) out.add(normalizeTakenSlug(titleSlug));
|
|
4061
4079
|
if (thread.branchName?.trim()) {
|
|
4062
|
-
|
|
4063
|
-
if (branch) out.add(branch);
|
|
4080
|
+
addTakenSlug(out, thread.branchName.trim());
|
|
4064
4081
|
}
|
|
4065
4082
|
if (thread.worktreePath) {
|
|
4066
4083
|
const parts = thread.worktreePath.replace(/\/+$/, "").split("/");
|
|
4067
4084
|
const dir = parts[parts.length - 1];
|
|
4068
|
-
if (dir) out
|
|
4085
|
+
if (dir) addTakenSlug(out, dir);
|
|
4069
4086
|
}
|
|
4070
4087
|
return [...out];
|
|
4071
4088
|
}
|
|
@@ -7323,12 +7340,16 @@ function collectTakenTeamSlugs(repoPath) {
|
|
|
7323
7340
|
if ((0, import_node_fs18.existsSync)(root)) {
|
|
7324
7341
|
for (const entry of (0, import_node_fs18.readdirSync)(root, { withFileTypes: true })) {
|
|
7325
7342
|
if (entry.isDirectory() && entry.name !== ".DS_Store") {
|
|
7326
|
-
|
|
7343
|
+
for (const slug of takenSlugsFromThread({ worktreePath: entry.name })) {
|
|
7344
|
+
taken.add(slug);
|
|
7345
|
+
}
|
|
7327
7346
|
}
|
|
7328
7347
|
}
|
|
7329
7348
|
}
|
|
7330
7349
|
for (const slug of listLocalThreadBranchSlugs(repoPath)) {
|
|
7331
|
-
|
|
7350
|
+
for (const token of takenSlugsFromThread({ branchName: slug })) {
|
|
7351
|
+
taken.add(token);
|
|
7352
|
+
}
|
|
7332
7353
|
}
|
|
7333
7354
|
for (const thread of listThreads({ includeArchived: true })) {
|
|
7334
7355
|
if (!sameRepoPath(thread.repoPath, repoPath)) continue;
|
|
@@ -14418,7 +14439,7 @@ function buildSessionSeed(messages, opts) {
|
|
|
14418
14439
|
for (let i = blocks.length - 1; i >= 0; i--) {
|
|
14419
14440
|
if (keep[i]) continue;
|
|
14420
14441
|
const next = used + blocks[i].length + 2;
|
|
14421
|
-
if (next > maxChars && used > 0)
|
|
14442
|
+
if (next > maxChars && used > 0) continue;
|
|
14422
14443
|
keep[i] = true;
|
|
14423
14444
|
used = next;
|
|
14424
14445
|
}
|
|
@@ -15744,7 +15765,7 @@ function jobAlive(pid) {
|
|
|
15744
15765
|
}
|
|
15745
15766
|
function processGroupAlive(pgid) {
|
|
15746
15767
|
if (process.platform === "win32") return false;
|
|
15747
|
-
if (!Number.isInteger(pgid) || pgid <=
|
|
15768
|
+
if (!Number.isInteger(pgid) || pgid <= 1) return false;
|
|
15748
15769
|
try {
|
|
15749
15770
|
process.kill(-pgid, 0);
|
|
15750
15771
|
return true;
|
|
@@ -15787,7 +15808,7 @@ function listRunningDetachedJobs(worktreePath) {
|
|
|
15787
15808
|
for (const id of ids) {
|
|
15788
15809
|
const dir = resolveJobDir(root, id);
|
|
15789
15810
|
const pid = readIntFile((0, import_node_path41.join)(dir, "pid"));
|
|
15790
|
-
if (
|
|
15811
|
+
if (jobTreeAlive(pid)) running.push(id);
|
|
15791
15812
|
}
|
|
15792
15813
|
return running.sort();
|
|
15793
15814
|
}
|
|
@@ -21179,9 +21200,10 @@ var init_orchestrator = __esm({
|
|
|
21179
21200
|
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
21180
21201
|
});
|
|
21181
21202
|
thread = this.requireThread(threadId);
|
|
21203
|
+
const gitPrompt = expandCanonicalGitRequest(prompt);
|
|
21182
21204
|
const { agentPrompt: expandedPrompt } = expandComposerPrompt(
|
|
21183
21205
|
thread.worktreePath,
|
|
21184
|
-
|
|
21206
|
+
gitPrompt,
|
|
21185
21207
|
{
|
|
21186
21208
|
attachments: sentAttachments ?? thread.attachments
|
|
21187
21209
|
}
|
|
@@ -21223,13 +21245,13 @@ var init_orchestrator = __esm({
|
|
|
21223
21245
|
artifactReminder,
|
|
21224
21246
|
longRunningReminder
|
|
21225
21247
|
].filter(Boolean).join("\n\n") || void 0;
|
|
21226
|
-
const prGateDirective = thread.agent !== "brightsy" && !isOrchestratorThread(thread) && mentionsPrGoal(
|
|
21248
|
+
const prGateDirective = thread.agent !== "brightsy" && !isOrchestratorThread(thread) && mentionsPrGoal(prompt) ? formatPrGateDirective() : null;
|
|
21227
21249
|
const agentPrompt = [
|
|
21228
21250
|
thread.planMode ? PLAN_MODE_INSTRUCTION : null,
|
|
21229
21251
|
orchestrationReminder,
|
|
21230
21252
|
prGateDirective,
|
|
21231
21253
|
slackReplyContext,
|
|
21232
|
-
|
|
21254
|
+
expandedPrompt
|
|
21233
21255
|
].filter(Boolean).join("\n\n");
|
|
21234
21256
|
if (thread.attachments.length > 0) {
|
|
21235
21257
|
updateThread(threadId, { attachments: [] });
|
|
@@ -29695,7 +29717,7 @@ async function handleSlackInbound(msg, opts) {
|
|
|
29695
29717
|
log(`skip superseded ${msg.kind} ${msg.ts}`);
|
|
29696
29718
|
return;
|
|
29697
29719
|
}
|
|
29698
|
-
const agent = coerceOrchestratorAgent(opts.agent ??
|
|
29720
|
+
const agent = coerceOrchestratorAgent(opts.agent ?? resolveOrchestratorDefaults().agent);
|
|
29699
29721
|
const workspaces = refreshWorkspaces2();
|
|
29700
29722
|
for (const ws of workspaces) {
|
|
29701
29723
|
await getOrchestrator().reconcile(ws.path).catch(() => void 0);
|
|
@@ -29852,7 +29874,7 @@ async function runSlackListen(opts = {}) {
|
|
|
29852
29874
|
const log = opts.onLog ?? console.log;
|
|
29853
29875
|
const connected = listSlackWorkspacesRaw();
|
|
29854
29876
|
const orch = getOrchestrator();
|
|
29855
|
-
const agent = coerceOrchestratorAgent(opts.agent ??
|
|
29877
|
+
const agent = coerceOrchestratorAgent(opts.agent ?? resolveOrchestratorDefaults().agent);
|
|
29856
29878
|
let inboundGeneration = 0;
|
|
29857
29879
|
const off = orch.on((event) => {
|
|
29858
29880
|
if (event.type !== "turn_finished") return;
|
package/dist/index.js
CHANGED
|
@@ -237,7 +237,7 @@ import {
|
|
|
237
237
|
worktreeCleanupSettings,
|
|
238
238
|
wrapReviewSkillMarkdown,
|
|
239
239
|
writeWorktreeFile
|
|
240
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-HJPGIETB.js";
|
|
241
241
|
import {
|
|
242
242
|
LEGACY_PLAN_FILE_REL,
|
|
243
243
|
PLAN_FILE_NAME,
|
|
@@ -342,7 +342,7 @@ import {
|
|
|
342
342
|
withEventParentId,
|
|
343
343
|
withEventsParentId,
|
|
344
344
|
writeInjectedMcpConfig
|
|
345
|
-
} from "./chunk-
|
|
345
|
+
} from "./chunk-CUA4S537.js";
|
|
346
346
|
import {
|
|
347
347
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
348
348
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
@@ -385,7 +385,7 @@ import {
|
|
|
385
385
|
stageBuffersAsAttachments,
|
|
386
386
|
syncWorkspacesFromThreads,
|
|
387
387
|
takenTeamSlugsForOrchestration
|
|
388
|
-
} from "./chunk-
|
|
388
|
+
} from "./chunk-ZY7K4T37.js";
|
|
389
389
|
import {
|
|
390
390
|
FAMOUS_SOCCER_TEAMS,
|
|
391
391
|
GITHUB_PR_BODY_MAX_CHARS,
|
|
@@ -482,7 +482,7 @@ import {
|
|
|
482
482
|
worktreeDisplayLabelForGroup,
|
|
483
483
|
worktreeNameFromPath,
|
|
484
484
|
worktreeSlugForTicket
|
|
485
|
-
} from "./chunk-
|
|
485
|
+
} from "./chunk-7JIYKYLL.js";
|
|
486
486
|
import {
|
|
487
487
|
ATTACHMENTS_DIR,
|
|
488
488
|
CLI_DIR,
|
|
@@ -6755,7 +6755,7 @@ async function handleSlackInbound(msg, opts) {
|
|
|
6755
6755
|
log(`skip superseded ${msg.kind} ${msg.ts}`);
|
|
6756
6756
|
return;
|
|
6757
6757
|
}
|
|
6758
|
-
const agent = coerceOrchestratorAgent(opts.agent ??
|
|
6758
|
+
const agent = coerceOrchestratorAgent(opts.agent ?? resolveOrchestratorDefaults().agent);
|
|
6759
6759
|
const workspaces = refreshWorkspaces2();
|
|
6760
6760
|
for (const ws of workspaces) {
|
|
6761
6761
|
await getOrchestrator().reconcile(ws.path).catch(() => void 0);
|
|
@@ -6912,7 +6912,7 @@ async function runSlackListen(opts = {}) {
|
|
|
6912
6912
|
const log = opts.onLog ?? console.log;
|
|
6913
6913
|
const connected = listSlackWorkspacesRaw();
|
|
6914
6914
|
const orch = getOrchestrator();
|
|
6915
|
-
const agent = coerceOrchestratorAgent(opts.agent ??
|
|
6915
|
+
const agent = coerceOrchestratorAgent(opts.agent ?? resolveOrchestratorDefaults().agent);
|
|
6916
6916
|
let inboundGeneration = 0;
|
|
6917
6917
|
const off = orch.on((event) => {
|
|
6918
6918
|
if (event.type !== "turn_finished") return;
|
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -2406,18 +2406,35 @@ function teamSlugFromName(name) {
|
|
|
2406
2406
|
function normalizeTakenSlug(raw) {
|
|
2407
2407
|
return raw.toLowerCase().replace(/^thread\//, "").replace(/\/+$/, "");
|
|
2408
2408
|
}
|
|
2409
|
+
function soccerTokenFromTakenSlug(raw) {
|
|
2410
|
+
const normalized = normalizeTakenSlug(raw);
|
|
2411
|
+
if (!normalized) return null;
|
|
2412
|
+
const withoutTicket = normalized.replace(/^[a-z]{2,8}-\d{1,6}-/, "").replace(/^\d{1,8}-/, "");
|
|
2413
|
+
const lookup = withoutTicket || normalized;
|
|
2414
|
+
const suffixMatch = lookup.match(/^(.+)-(\d+)$/);
|
|
2415
|
+
const base = suffixMatch?.[1] ?? lookup;
|
|
2416
|
+
const team = FAMOUS_SOCCER_TEAM_SEEDS.find((t) => t.slug === base);
|
|
2417
|
+
if (!team) return null;
|
|
2418
|
+
return suffixMatch ? `${team.slug}-${suffixMatch[2]}` : team.slug;
|
|
2419
|
+
}
|
|
2420
|
+
function addTakenSlug(out, raw) {
|
|
2421
|
+
const normalized = normalizeTakenSlug(raw);
|
|
2422
|
+
if (!normalized) return;
|
|
2423
|
+
out.add(normalized);
|
|
2424
|
+
const token = soccerTokenFromTakenSlug(normalized);
|
|
2425
|
+
if (token) out.add(token);
|
|
2426
|
+
}
|
|
2409
2427
|
function takenSlugsFromThread(thread) {
|
|
2410
2428
|
const out = /* @__PURE__ */ new Set();
|
|
2411
2429
|
const titleSlug = thread.title ? teamSlugFromName(thread.title) : null;
|
|
2412
2430
|
if (titleSlug) out.add(normalizeTakenSlug(titleSlug));
|
|
2413
2431
|
if (thread.branchName?.trim()) {
|
|
2414
|
-
|
|
2415
|
-
if (branch) out.add(branch);
|
|
2432
|
+
addTakenSlug(out, thread.branchName.trim());
|
|
2416
2433
|
}
|
|
2417
2434
|
if (thread.worktreePath) {
|
|
2418
2435
|
const parts = thread.worktreePath.replace(/\/+$/, "").split("/");
|
|
2419
2436
|
const dir = parts[parts.length - 1];
|
|
2420
|
-
if (dir) out
|
|
2437
|
+
if (dir) addTakenSlug(out, dir);
|
|
2421
2438
|
}
|
|
2422
2439
|
return [...out];
|
|
2423
2440
|
}
|
|
@@ -7088,12 +7105,16 @@ function collectTakenTeamSlugs(repoPath) {
|
|
|
7088
7105
|
if ((0, import_node_fs15.existsSync)(root)) {
|
|
7089
7106
|
for (const entry of (0, import_node_fs15.readdirSync)(root, { withFileTypes: true })) {
|
|
7090
7107
|
if (entry.isDirectory() && entry.name !== ".DS_Store") {
|
|
7091
|
-
|
|
7108
|
+
for (const slug of takenSlugsFromThread({ worktreePath: entry.name })) {
|
|
7109
|
+
taken.add(slug);
|
|
7110
|
+
}
|
|
7092
7111
|
}
|
|
7093
7112
|
}
|
|
7094
7113
|
}
|
|
7095
7114
|
for (const slug of listLocalThreadBranchSlugs(repoPath)) {
|
|
7096
|
-
|
|
7115
|
+
for (const token of takenSlugsFromThread({ branchName: slug })) {
|
|
7116
|
+
taken.add(token);
|
|
7117
|
+
}
|
|
7097
7118
|
}
|
|
7098
7119
|
for (const thread of listThreads({ includeArchived: true })) {
|
|
7099
7120
|
if (!sameRepoPath(thread.repoPath, repoPath)) continue;
|
|
@@ -12658,7 +12679,7 @@ function buildSessionSeed(messages, opts) {
|
|
|
12658
12679
|
for (let i = blocks.length - 1; i >= 0; i--) {
|
|
12659
12680
|
if (keep[i]) continue;
|
|
12660
12681
|
const next = used + blocks[i].length + 2;
|
|
12661
|
-
if (next > maxChars && used > 0)
|
|
12682
|
+
if (next > maxChars && used > 0) continue;
|
|
12662
12683
|
keep[i] = true;
|
|
12663
12684
|
used = next;
|
|
12664
12685
|
}
|
|
@@ -14096,7 +14117,7 @@ function jobAlive(pid) {
|
|
|
14096
14117
|
}
|
|
14097
14118
|
function processGroupAlive(pgid) {
|
|
14098
14119
|
if (process.platform === "win32") return false;
|
|
14099
|
-
if (!Number.isInteger(pgid) || pgid <=
|
|
14120
|
+
if (!Number.isInteger(pgid) || pgid <= 1) return false;
|
|
14100
14121
|
try {
|
|
14101
14122
|
process.kill(-pgid, 0);
|
|
14102
14123
|
return true;
|
|
@@ -14139,7 +14160,7 @@ function listRunningDetachedJobs(worktreePath) {
|
|
|
14139
14160
|
for (const id of ids) {
|
|
14140
14161
|
const dir = resolveJobDir(root, id);
|
|
14141
14162
|
const pid = readIntFile((0, import_node_path39.join)(dir, "pid"));
|
|
14142
|
-
if (
|
|
14163
|
+
if (jobTreeAlive(pid)) running.push(id);
|
|
14143
14164
|
}
|
|
14144
14165
|
return running.sort();
|
|
14145
14166
|
}
|
|
@@ -19812,9 +19833,10 @@ var init_orchestrator = __esm({
|
|
|
19812
19833
|
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
19813
19834
|
});
|
|
19814
19835
|
thread = this.requireThread(threadId);
|
|
19836
|
+
const gitPrompt = expandCanonicalGitRequest(prompt);
|
|
19815
19837
|
const { agentPrompt: expandedPrompt } = expandComposerPrompt(
|
|
19816
19838
|
thread.worktreePath,
|
|
19817
|
-
|
|
19839
|
+
gitPrompt,
|
|
19818
19840
|
{
|
|
19819
19841
|
attachments: sentAttachments ?? thread.attachments
|
|
19820
19842
|
}
|
|
@@ -19856,13 +19878,13 @@ var init_orchestrator = __esm({
|
|
|
19856
19878
|
artifactReminder,
|
|
19857
19879
|
longRunningReminder
|
|
19858
19880
|
].filter(Boolean).join("\n\n") || void 0;
|
|
19859
|
-
const prGateDirective = thread.agent !== "brightsy" && !isOrchestratorThread(thread) && mentionsPrGoal(
|
|
19881
|
+
const prGateDirective = thread.agent !== "brightsy" && !isOrchestratorThread(thread) && mentionsPrGoal(prompt) ? formatPrGateDirective() : null;
|
|
19860
19882
|
const agentPrompt = [
|
|
19861
19883
|
thread.planMode ? PLAN_MODE_INSTRUCTION : null,
|
|
19862
19884
|
orchestrationReminder,
|
|
19863
19885
|
prGateDirective,
|
|
19864
19886
|
slackReplyContext,
|
|
19865
|
-
|
|
19887
|
+
expandedPrompt
|
|
19866
19888
|
].filter(Boolean).join("\n\n");
|
|
19867
19889
|
if (thread.attachments.length > 0) {
|
|
19868
19890
|
updateThread(threadId, { attachments: [] });
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -37,12 +37,12 @@ import {
|
|
|
37
37
|
syncBoardPins,
|
|
38
38
|
updateSchedule,
|
|
39
39
|
waitForDetachedJob
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-YEPVWJ3R.js";
|
|
41
41
|
import {
|
|
42
42
|
isInternalAgentStatusText,
|
|
43
43
|
listModelsForAgent,
|
|
44
44
|
sideboardMcpProfile
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-TPPZXZTA.js";
|
|
46
46
|
import "../chunk-LZ6QMEQC.js";
|
|
47
47
|
import "../chunk-S42XV45P.js";
|
|
48
48
|
import {
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
GLOBAL_WORKSPACE_ID,
|
|
68
68
|
isCloudCoordinatorThread,
|
|
69
69
|
listWorkspaces
|
|
70
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-VCVBICMZ.js";
|
|
71
71
|
import {
|
|
72
72
|
canonicalizeRepoPath,
|
|
73
73
|
formatGhLandError,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
resolveListPrsOptions,
|
|
79
79
|
resolveRepoRoot,
|
|
80
80
|
warmGithubAgentAuth
|
|
81
|
-
} from "../chunk-
|
|
81
|
+
} from "../chunk-7O53GXTA.js";
|
|
82
82
|
import "../chunk-D6JWYJ4P.js";
|
|
83
83
|
import "../chunk-LZQULFIT.js";
|
|
84
84
|
import "../chunk-SYFVUF2C.js";
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
isPidAlive,
|
|
8
8
|
startOrchestration,
|
|
9
9
|
waitForPidExit
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-YEPVWJ3R.js";
|
|
11
|
+
import "./chunk-TPPZXZTA.js";
|
|
12
12
|
import "./chunk-LZ6QMEQC.js";
|
|
13
13
|
import "./chunk-S42XV45P.js";
|
|
14
14
|
import "./chunk-6GN5WPYZ.js";
|
|
15
15
|
import "./chunk-JFOPOMK7.js";
|
|
16
16
|
import "./chunk-OCQPTUR7.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-VCVBICMZ.js";
|
|
18
|
+
import "./chunk-7O53GXTA.js";
|
|
19
19
|
import "./chunk-D6JWYJ4P.js";
|
|
20
20
|
import "./chunk-LZQULFIT.js";
|
|
21
21
|
import "./chunk-SYFVUF2C.js";
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
isPidAlive,
|
|
6
6
|
startOrchestration,
|
|
7
7
|
waitForPidExit
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HJPGIETB.js";
|
|
9
9
|
import "./chunk-DJU54RYW.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-CUA4S537.js";
|
|
11
|
+
import "./chunk-ZY7K4T37.js";
|
|
12
|
+
import "./chunk-7JIYKYLL.js";
|
|
13
13
|
import "./chunk-6K64FJDD.js";
|
|
14
14
|
import "./chunk-XD2BAANL.js";
|
|
15
15
|
import "./chunk-M267JPEA.js";
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
listWorkspaces,
|
|
7
7
|
removeWorkspace,
|
|
8
8
|
syncWorkspacesFromThreads
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-VCVBICMZ.js";
|
|
10
|
+
import "./chunk-7O53GXTA.js";
|
|
11
11
|
import "./chunk-D6JWYJ4P.js";
|
|
12
12
|
import "./chunk-LZQULFIT.js";
|
|
13
13
|
import "./chunk-SYFVUF2C.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
listWorkspaces,
|
|
5
5
|
removeWorkspace,
|
|
6
6
|
syncWorkspacesFromThreads
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-ZY7K4T37.js";
|
|
8
|
+
import "./chunk-7JIYKYLL.js";
|
|
9
9
|
import "./chunk-6K64FJDD.js";
|
|
10
10
|
import "./chunk-J7LQVLFQ.js";
|
|
11
11
|
import "./chunk-4TR3HZFT.js";
|