@sideboard-ai/core 0.1.100 → 0.1.103
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/cursor-runner.js +1 -1
- package/dist/{agents-CLP5BG4O.js → agents-UT5GCJH3.js} +8 -8
- package/dist/{agents-OXZDMPSE.js → agents-XZBAKBO2.js} +8 -8
- package/dist/{app-settings-BRF7VKTQ.js → app-settings-EKJM2344.js} +2 -2
- package/dist/{app-settings-ZXPAB3QN.js → app-settings-VDJK2BZ2.js} +2 -2
- package/dist/{caffeinate-hold-U3QJBV67.js → caffeinate-hold-NBRUWYXO.js} +2 -2
- package/dist/{caffeinate-hold-I7SG6UQR.js → caffeinate-hold-X3JNPR42.js} +2 -2
- package/dist/{chunk-MHJV4WS3.js → chunk-27MCESES.js} +3 -3
- package/dist/{chunk-QSLE4VEM.js → chunk-2GO3YKBA.js} +4 -4
- package/dist/{chunk-DKHGWYWR.js → chunk-7YKXHBIW.js} +1 -1
- package/dist/{chunk-JL4SJ6V7.js → chunk-BD2ICC4D.js} +4 -0
- package/dist/{chunk-NZPGMNFC.js → chunk-DCOZABNT.js} +1 -1
- package/dist/{chunk-CIRXAYWS.js → chunk-DHAGMJIK.js} +55 -28
- package/dist/{chunk-HYKZEP5A.js → chunk-ETMRBJKA.js} +11 -11
- package/dist/{chunk-OXC3MEFI.js → chunk-H6LP57EF.js} +6 -6
- package/dist/{chunk-GR4JKWR4.js → chunk-HHLZWO7U.js} +5 -5
- package/dist/{chunk-3WA37BRI.js → chunk-KGSVLZV6.js} +11 -4
- package/dist/{chunk-7KDBDMNC.js → chunk-KLBOWJ74.js} +1 -1
- package/dist/{chunk-EQPQTLW6.js → chunk-LANDJIAI.js} +6 -6
- package/dist/{chunk-MRBKGFTL.js → chunk-ND6AO7C5.js} +3 -3
- package/dist/{chunk-WQTTUC4N.js → chunk-OW34MVDN.js} +5 -5
- package/dist/{chunk-JOF3XIEM.js → chunk-P3BQ5DOL.js} +11 -4
- package/dist/{chunk-B4R2VB2A.js → chunk-QZQEXME2.js} +4 -0
- package/dist/{chunk-R7BQBSDT.js → chunk-WA3DVVWG.js} +55 -28
- package/dist/{chunk-6LFV4VFI.js → chunk-WSYCND2U.js} +1 -1
- package/dist/{chunk-FT2SQOL4.js → chunk-XHZJJWLI.js} +1 -1
- package/dist/{chunk-IFHKPZHA.js → chunk-YJADJH5U.js} +11 -11
- package/dist/{connected-teams-SWHJWK2A.js → connected-teams-J4I5AKMR.js} +2 -2
- package/dist/{connected-teams-TLVKZPJP.js → connected-teams-M5XNXRI5.js} +2 -2
- package/dist/{coordinator-prompt-OOBSQCWQ.js → coordinator-prompt-3DFZRMXE.js} +5 -5
- package/dist/{coordinator-prompt-HHRKQWCX.js → coordinator-prompt-UWHSD65V.js} +5 -5
- package/dist/{cursor-recover-S5ORPW34.js → cursor-recover-JBTIDARH.js} +1 -1
- package/dist/{cursor-recover-G34BYKL2.js → cursor-recover-ZUJG6XRQ.js} +1 -1
- package/dist/{global-workspace-YZWYHLQY.js → global-workspace-KJQS5S2C.js} +6 -6
- package/dist/{global-workspace-KYEBFWKB.js → global-workspace-UR4E3CCG.js} +6 -6
- package/dist/index.cjs +626 -153
- package/dist/index.d.cts +37 -5
- package/dist/index.d.ts +37 -5
- package/dist/index.js +545 -121
- package/dist/mcp/run-stdio.cjs +426 -177
- package/dist/mcp/run-stdio.js +330 -127
- package/dist/{paths-TZX4L5X7.js → paths-QCI3MTO5.js} +3 -1
- package/dist/{paths-JQM2XRAD.js → paths-UMEDHOS5.js} +3 -1
- package/dist/{thread-store-XAKWCV2E.js → thread-store-4OUEQ2DB.js} +2 -2
- package/dist/{thread-store-V7NOOXKE.js → thread-store-DQJGDKIJ.js} +2 -2
- package/dist/{workspaces-ENVUDK6C.js → workspaces-NTIVI6DI.js} +7 -7
- package/dist/{workspaces-NNPD7QVV.js → workspaces-TKJXPNV4.js} +7 -7
- package/dist/{worktree-EO5QAGJU.js → worktree-NKWN5ZTS.js} +4 -4
- package/dist/{worktree-DA4BOV7G.js → worktree-PEUPFAKL.js} +4 -4
- package/package.json +1 -1
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
ensureGlobalCoordinatorCwd
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YJADJH5U.js";
|
|
6
6
|
import {
|
|
7
7
|
allocateTeamName,
|
|
8
8
|
takenSlugsFromThread,
|
|
9
9
|
teamSlugFromName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WA3DVVWG.js";
|
|
11
11
|
import {
|
|
12
12
|
createEmptyThread,
|
|
13
13
|
listThreads,
|
|
14
14
|
updateThread,
|
|
15
15
|
writeThread
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-P3BQ5DOL.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveNewThreadOptions,
|
|
19
19
|
resolveThreadDefaults
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WSYCND2U.js";
|
|
21
21
|
import {
|
|
22
22
|
globalAgentCwd
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BD2ICC4D.js";
|
|
24
24
|
|
|
25
25
|
// src/brightsy/cloud-connect-constants.ts
|
|
26
26
|
var CLOUD_ORCHESTRATOR_GOAL = "Cloud-connected Sideboard orchestrator";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
threadFilePath,
|
|
8
8
|
threadLockPath,
|
|
9
9
|
threadsDir
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BD2ICC4D.js";
|
|
11
11
|
|
|
12
12
|
// src/store/thread-store.ts
|
|
13
13
|
import { randomUUID } from "crypto";
|
|
@@ -119,8 +119,11 @@ function writeThread(thread) {
|
|
|
119
119
|
function idPath(id) {
|
|
120
120
|
return id;
|
|
121
121
|
}
|
|
122
|
+
function isThreadRecordFile(name) {
|
|
123
|
+
return name.endsWith(".json") && !name.endsWith(".live.json");
|
|
124
|
+
}
|
|
122
125
|
function listThreads(opts) {
|
|
123
|
-
const files = readdirSync(threadsDir()).filter(
|
|
126
|
+
const files = readdirSync(threadsDir()).filter(isThreadRecordFile);
|
|
124
127
|
const threads = files.map((f) => {
|
|
125
128
|
try {
|
|
126
129
|
return normalizeThread(
|
|
@@ -129,7 +132,9 @@ function listThreads(opts) {
|
|
|
129
132
|
} catch {
|
|
130
133
|
return null;
|
|
131
134
|
}
|
|
132
|
-
}).filter(
|
|
135
|
+
}).filter(
|
|
136
|
+
(t) => t !== null && typeof t.id === "string" && t.id.length > 0
|
|
137
|
+
).sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
|
|
133
138
|
if (opts?.includeArchived) return threads;
|
|
134
139
|
return threads.filter((t) => t.status !== "archived");
|
|
135
140
|
}
|
|
@@ -161,7 +166,9 @@ function setStatus(id, status, lastError) {
|
|
|
161
166
|
}
|
|
162
167
|
function findThreadByRef(ref) {
|
|
163
168
|
const all = listThreads({ includeArchived: true });
|
|
164
|
-
return all.find(
|
|
169
|
+
return all.find(
|
|
170
|
+
(t) => t.id === ref || t.id.startsWith(ref) || t.branchName === ref || t.title === ref
|
|
171
|
+
) ?? null;
|
|
165
172
|
}
|
|
166
173
|
|
|
167
174
|
export {
|
|
@@ -400,6 +400,9 @@ function worktreesRoot(repoPath) {
|
|
|
400
400
|
function threadFilePath(id) {
|
|
401
401
|
return join4(threadsDir(), `${id}.json`);
|
|
402
402
|
}
|
|
403
|
+
function threadLivePath(id) {
|
|
404
|
+
return join4(threadsDir(), `${id}.live.json`);
|
|
405
|
+
}
|
|
403
406
|
function threadLockPath(id) {
|
|
404
407
|
return join4(locksDir(), `${id}.lock`);
|
|
405
408
|
}
|
|
@@ -433,6 +436,7 @@ export {
|
|
|
433
436
|
repoSlug,
|
|
434
437
|
worktreesRoot,
|
|
435
438
|
threadFilePath,
|
|
439
|
+
threadLivePath,
|
|
436
440
|
threadLockPath,
|
|
437
441
|
globalAgentCwd
|
|
438
442
|
};
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
} from "./chunk-B3SJXYIJ.js";
|
|
6
6
|
import {
|
|
7
7
|
listThreads
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-P3BQ5DOL.js";
|
|
9
9
|
import {
|
|
10
10
|
getGithubGitAuthMode,
|
|
11
11
|
getGithubPat
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WSYCND2U.js";
|
|
13
13
|
import {
|
|
14
14
|
worktreesRoot
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BD2ICC4D.js";
|
|
16
16
|
import {
|
|
17
17
|
gh,
|
|
18
18
|
git,
|
|
@@ -787,7 +787,7 @@ function allocateTeamName(taken, random = Math.random) {
|
|
|
787
787
|
|
|
788
788
|
// src/git/worktree-labels.ts
|
|
789
789
|
function normalizeWorktreePath(worktreePath) {
|
|
790
|
-
const trimmed = worktreePath.replace(/\/+$/, "") || "/";
|
|
790
|
+
const trimmed = (worktreePath ?? "").replace(/\/+$/, "") || "/";
|
|
791
791
|
const absolute = trimmed.startsWith("/");
|
|
792
792
|
const parts = trimmed.split("/").filter((p) => p && p !== ".");
|
|
793
793
|
const out = [];
|
|
@@ -1154,6 +1154,30 @@ function formatGitAuthModeDirective(mode) {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
|
+
// src/util/enqueue-by-key.ts
|
|
1158
|
+
var tails = /* @__PURE__ */ new Map();
|
|
1159
|
+
function enqueueByKey(key, fn) {
|
|
1160
|
+
const prev = tails.get(key) ?? Promise.resolve();
|
|
1161
|
+
const next = prev.then(fn, fn);
|
|
1162
|
+
tails.set(
|
|
1163
|
+
key,
|
|
1164
|
+
next.then(
|
|
1165
|
+
() => void 0,
|
|
1166
|
+
() => void 0
|
|
1167
|
+
)
|
|
1168
|
+
);
|
|
1169
|
+
return next;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
// src/git/repo-git-lock.ts
|
|
1173
|
+
function repoLockKey(repoPath) {
|
|
1174
|
+
const trimmed = repoPath.replace(/\/+$/, "");
|
|
1175
|
+
return `git-worktree:${trimmed || "/"}`;
|
|
1176
|
+
}
|
|
1177
|
+
function withRepoGitLock(repoPath, fn) {
|
|
1178
|
+
return enqueueByKey(repoLockKey(repoPath), fn);
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1157
1181
|
// src/git/pr-gates.ts
|
|
1158
1182
|
function prIsInMergeQueue(gate) {
|
|
1159
1183
|
if (gate.isInMergeQueue) return true;
|
|
@@ -2223,12 +2247,13 @@ async function createThreadWorktree(opts) {
|
|
|
2223
2247
|
`Invalid git reference: ${opts.sourceRef} (and fetch did not resolve it)`
|
|
2224
2248
|
);
|
|
2225
2249
|
}
|
|
2226
|
-
const
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2250
|
+
const added = await withRepoGitLock(opts.repoPath, async () => {
|
|
2251
|
+
const add = await git(
|
|
2252
|
+
["worktree", "add", "-b", branchName, worktreePath, startPoint],
|
|
2253
|
+
opts.repoPath,
|
|
2254
|
+
{ reject: false, timeoutMs: 6e4 }
|
|
2255
|
+
);
|
|
2256
|
+
if (add.exitCode === 0) return branchName;
|
|
2232
2257
|
const err = `${add.stderr}
|
|
2233
2258
|
${add.stdout}`;
|
|
2234
2259
|
if (/already used by worktree|already exists|checked out/i.test(err)) {
|
|
@@ -2239,17 +2264,14 @@ ${add.stdout}`;
|
|
|
2239
2264
|
opts.repoPath,
|
|
2240
2265
|
{ reject: false, timeoutMs: 6e4 }
|
|
2241
2266
|
);
|
|
2242
|
-
if (retry.exitCode === 0)
|
|
2243
|
-
branchName = alt;
|
|
2244
|
-
await ensureGhPreferOrigin(worktreePath);
|
|
2245
|
-
return { branchName, worktreePath };
|
|
2246
|
-
}
|
|
2267
|
+
if (retry.exitCode === 0) return alt;
|
|
2247
2268
|
}
|
|
2248
2269
|
}
|
|
2249
2270
|
throw new Error(
|
|
2250
2271
|
`Failed to create worktree: ${add.stderr.trim() || add.stdout.trim() || `exit ${add.exitCode}`}`
|
|
2251
2272
|
);
|
|
2252
|
-
}
|
|
2273
|
+
});
|
|
2274
|
+
branchName = added;
|
|
2253
2275
|
await ensureGhPreferOrigin(worktreePath);
|
|
2254
2276
|
return { branchName, worktreePath };
|
|
2255
2277
|
}
|
|
@@ -2273,12 +2295,13 @@ async function createExistingBranchWorktree(opts) {
|
|
|
2273
2295
|
);
|
|
2274
2296
|
}
|
|
2275
2297
|
const startPoint = await resolveWorktreeStartPoint(opts.repoPath, branchName);
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2298
|
+
await withRepoGitLock(opts.repoPath, async () => {
|
|
2299
|
+
const add = await git(
|
|
2300
|
+
["worktree", "add", worktreePath, startPoint],
|
|
2301
|
+
opts.repoPath,
|
|
2302
|
+
{ reject: false }
|
|
2303
|
+
);
|
|
2304
|
+
if (add.exitCode === 0) return;
|
|
2282
2305
|
const retry = await git(
|
|
2283
2306
|
["worktree", "add", worktreePath, branchName],
|
|
2284
2307
|
opts.repoPath,
|
|
@@ -2289,7 +2312,7 @@ async function createExistingBranchWorktree(opts) {
|
|
|
2289
2312
|
`Failed to create worktree for ${branchName}: ${retry.stderr.trim() || add.stderr.trim() || retry.stdout.trim() || add.stdout.trim() || `exit ${add.exitCode}`}`
|
|
2290
2313
|
);
|
|
2291
2314
|
}
|
|
2292
|
-
}
|
|
2315
|
+
});
|
|
2293
2316
|
const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
|
|
2294
2317
|
reject: false
|
|
2295
2318
|
});
|
|
@@ -2300,12 +2323,14 @@ async function createExistingBranchWorktree(opts) {
|
|
|
2300
2323
|
return { branchName, worktreePath };
|
|
2301
2324
|
}
|
|
2302
2325
|
async function removeWorktree(repoPath, worktreePath, opts) {
|
|
2303
|
-
await
|
|
2304
|
-
|
|
2326
|
+
await withRepoGitLock(repoPath, async () => {
|
|
2327
|
+
await git(["worktree", "remove", "--force", worktreePath], repoPath, {
|
|
2328
|
+
reject: false
|
|
2329
|
+
});
|
|
2330
|
+
if (opts?.deleteBranch) {
|
|
2331
|
+
await git(["branch", "-D", opts.deleteBranch], repoPath, { reject: false });
|
|
2332
|
+
}
|
|
2305
2333
|
});
|
|
2306
|
-
if (opts?.deleteBranch) {
|
|
2307
|
-
await git(["branch", "-D", opts.deleteBranch], repoPath, { reject: false });
|
|
2308
|
-
}
|
|
2309
2334
|
}
|
|
2310
2335
|
async function listWorktrees(repoPath) {
|
|
2311
2336
|
const { stdout } = await git(
|
|
@@ -2606,6 +2631,8 @@ export {
|
|
|
2606
2631
|
resolveCodexGitWritableRoots,
|
|
2607
2632
|
codexUnattendedGitConfigArgs,
|
|
2608
2633
|
formatGitAuthModeDirective,
|
|
2634
|
+
enqueueByKey,
|
|
2635
|
+
withRepoGitLock,
|
|
2609
2636
|
detectGhStack,
|
|
2610
2637
|
getPrStack,
|
|
2611
2638
|
initPrStack,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
resolveGithubRepoSlug
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WA3DVVWG.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveThreadDefaults
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WSYCND2U.js";
|
|
9
9
|
import {
|
|
10
10
|
globalAgentCwd,
|
|
11
11
|
sideboardReposDir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BD2ICC4D.js";
|
|
13
13
|
|
|
14
14
|
// src/orchestrator/coordinator-prompt.ts
|
|
15
15
|
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -36,7 +36,7 @@ function coordinatorGreenfieldPlaybook(reposDir) {
|
|
|
36
36
|
"- Examples:",
|
|
37
37
|
` - Clone: \`git clone <url> ${reposDir}/<name>\``,
|
|
38
38
|
` - New GitHub repo: \`gh repo create <owner>/<name> --private --clone -- ${reposDir}/<name>\` (or mkdir + git init + gh repo create + remote add + push)`,
|
|
39
|
-
"- Then: add_workspace with that absolute path \u2192 create_thread (repoPath + parentThreadId) \u2192 send_to_thread (build) \u2192 wait_for_turn \u2192 ask_git create-draft (or send_to_thread `gh pr create --draft -R <origin-owner/name>`).",
|
|
39
|
+
"- Then: add_workspace with that absolute path \u2192 create_thread (repoPath + parentThreadId) \u2192 send_to_thread (build) \u2192 wait_for_turn (loop while stillRunning) \u2192 ask_git create-draft (or send_to_thread `gh pr create --draft -R <origin-owner/name>`).",
|
|
40
40
|
"- Always target the child worktree's **origin** (`github:` slug from list_workspaces / `git remote get-url origin` in that worktree). Never open PRs against `upstream`.",
|
|
41
41
|
"- Do coding work in the child worktree thread, not by editing files in this home cwd."
|
|
42
42
|
].join("\n");
|
|
@@ -62,7 +62,7 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
62
62
|
"- fork_worktree \u2014 fork a worktree chat into a NEW git worktree + chat (transcript attached); optional agent; leave model unset (Auto) unless you have a reason. Not for orchestration chats.",
|
|
63
63
|
"- fork_chat \u2014 fork a worktree chat (same worktree tab) OR a Global orchestration chat (new orchestration tab); optional agent; leave model unset (Auto) unless you have a reason. Remote coordinators: use this to continue another orchestration chat on a different agent after session limits.",
|
|
64
64
|
"- send_to_thread \u2014 queue a prompt (start/continue a chat turn); pass force_stop: true to interrupt mid-turn / clear stale queued prompts before replacing with a new request",
|
|
65
|
-
"- wait_for_turn / get_turn_result \u2014 wait for and read the agent reply. On status error, lastError (and text) is the failure \u2014 switch agent, tell the user, or retry; do not treat empty text as success.",
|
|
65
|
+
"- wait_for_turn / get_turn_result \u2014 wait for and read the agent reply. wait_for_turn returns within ~45s even if the child is still working (MCP clients kill longer tool calls). If stillRunning is true, progress is a live snapshot of tools/thinking \u2014 call wait_for_turn again. Do not send \u201Care you stuck?\u201D or assume a hang while lastActivityAt is recent. On status error, lastError (and text) is the failure \u2014 switch agent, tell the user, or retry; do not treat empty text as success.",
|
|
66
66
|
"- stop_thread \u2014 force-stop: kill in-flight turn AND clear queued prompts (do not leave stale queue after an interrupt)",
|
|
67
67
|
"- archive_thread / restore_thread \u2014 archive (tears down worktree when last tab) or restore",
|
|
68
68
|
"Setup / run:",
|
|
@@ -70,8 +70,8 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
70
70
|
"- list_run_scripts / run_dev_script / stop_dev_script \u2014 start/stop named run scripts",
|
|
71
71
|
"Inspect / review / PRs:",
|
|
72
72
|
"- get_diff \u2014 compact diff summary",
|
|
73
|
-
'- request_review \u2014 open a Review chat tab on a worktree thread (attaches .sideboard/review.md when present, else local guidelines; sends "Review changes in this workspace."); then wait_for_turn / get_turn_result on the returned id',
|
|
74
|
-
"- ask_git \u2014 commit & push, open a draft PR, resolve conflicts, or merge. When the worktree is clean, Sideboard pushes / opens the PR itself. When dirty, it queues the worktree agent \u2014 then wait_for_turn. Prefer this over paraphrasing.",
|
|
73
|
+
'- request_review \u2014 open a Review chat tab on a worktree thread (attaches .sideboard/review.md when present, else local guidelines; sends "Review changes in this workspace."); then wait_for_turn (loop while stillRunning) / get_turn_result on the returned id',
|
|
74
|
+
"- ask_git \u2014 commit & push, open a draft PR, resolve conflicts, or merge. When the worktree is clean, Sideboard pushes / opens the PR itself. When dirty, it queues the worktree agent \u2014 then wait_for_turn (loop while stillRunning). Prefer this over paraphrasing.",
|
|
75
75
|
'- Merge (`ask_git` action=merge / send_to_thread "Merge PR.") only when the user explicitly asked to merge that PR. Do not merge because the work looks done, CI is green, or a typical flow includes it.',
|
|
76
76
|
'- Or send_to_thread with those exact phrases: "Commit and push.", "Commit, push, and open a draft PR.", "Merge the remote branch (main) into your branch and resolve conflicts. Then, commit and push your changes.", "Merge PR." (draft PRs: `gh pr create --draft -R <origin-owner/name>` using the workspace `github:` slug \u2014 never upstream). Never run git/gh from this orchestration cwd, and never merge the PR yourself.',
|
|
77
77
|
"Process guides:",
|
|
@@ -107,8 +107,8 @@ function coordinatorTurnReminder(opts) {
|
|
|
107
107
|
goal ? `- Goal / title: ${goal}` : null,
|
|
108
108
|
accountDefaultsPlaybookLine(),
|
|
109
109
|
`- For "what's going on": call list_threads (and list_workspaces if needed). Summarize fleet status \u2014 do not ls/git-status this synthetic home.`,
|
|
110
|
-
"- Existing repo: create_thread on a repoPath \u2192 send_to_thread \u2192 wait_for_turn. If status is error, lastError/text is the failure \u2014 adapt (switch agent, tell the user). Commit/push/draft PR with ask_git on the child, then wait_for_turn \u2014 never git/gh from this cwd. Call ask_git merge only if the user explicitly asked to merge.",
|
|
111
|
-
"- New repo: Bash (clone or gh repo create under ~/sideboard/repos/<name>) \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn \u2192 ask_git create-draft.",
|
|
110
|
+
"- Existing repo: create_thread on a repoPath \u2192 send_to_thread \u2192 wait_for_turn. If stillRunning, the child is working (progress is tools/thinking) \u2014 wait_for_turn again; do not ping it. If status is error, lastError/text is the failure \u2014 adapt (switch agent, tell the user). Commit/push/draft PR with ask_git on the child, then wait_for_turn \u2014 never git/gh from this cwd. Call ask_git merge only if the user explicitly asked to merge.",
|
|
111
|
+
"- New repo: Bash (clone or gh repo create under ~/sideboard/repos/<name>) \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn (loop while stillRunning) \u2192 ask_git create-draft.",
|
|
112
112
|
"- When naming threads for the user, link them as `[Title](sideboard://thread/<id>)`.",
|
|
113
113
|
"- If they will wait on Slack or leave the Mac, call set_caffeinate enabled=true. When they say they are done / wrapping up / going to sleep, call set_caffeinate enabled=false. Closing this chat also turns it off."
|
|
114
114
|
].filter(Boolean).join("\n");
|
|
@@ -161,8 +161,8 @@ function ensureGlobalCoordinatorCwd(opts) {
|
|
|
161
161
|
orchId ? `Pass parentThreadId="${orchId}" (or omit it). Never invent another parentThreadId.` : "Pass `parentThreadId` for children (this chat's id from the turn reminder).",
|
|
162
162
|
"Omit `agent` / `model` on `create_thread` unless you have a reason to override Account defaults.",
|
|
163
163
|
"Never pass `agent=codex` when you yourself are Codex \u2014 nested Codex deadlocks on shared ~/.codex locks. Omit agent (Account default) or use cursor/claude.",
|
|
164
|
-
"Typical flow (existing): list_workspaces \u2192 list_branches|list_prs|list_issues \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn \u2192 ask_git create-draft \u2192 wait_for_turn. Merge only if the user explicitly asked (`ask_git` merge).",
|
|
165
|
-
"Typical flow (new app): Bash create/clone under repos dir \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread (implement) \u2192 wait_for_turn \u2192 ask_git create-draft.",
|
|
164
|
+
"Typical flow (existing): list_workspaces \u2192 list_branches|list_prs|list_issues \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn (loop while stillRunning) \u2192 ask_git create-draft \u2192 wait_for_turn. Merge only if the user explicitly asked (`ask_git` merge).",
|
|
165
|
+
"Typical flow (new app): Bash create/clone under repos dir \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread (implement) \u2192 wait_for_turn (loop while stillRunning) \u2192 ask_git create-draft.",
|
|
166
166
|
"Always ask worktree agents to commit, push, and open draft PRs (`ask_git` / `send_to_thread`). Tell them to merge only when the user explicitly asked. The worktree agent runs git/gh; never merge from this orchestration cwd."
|
|
167
167
|
].join("\n");
|
|
168
168
|
try {
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
ensureConnectedBrightsyTeamTokens,
|
|
8
8
|
getConnectedBrightsyTeamsRaw,
|
|
9
9
|
listConnectedBrightsyTeams
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-2GO3YKBA.js";
|
|
11
|
+
import "./chunk-QZQEXME2.js";
|
|
12
12
|
import "./chunk-LGXBYZZA.js";
|
|
13
13
|
export {
|
|
14
14
|
applyConnectedTeamToCli,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
ensureConnectedBrightsyTeamTokens,
|
|
10
10
|
getConnectedBrightsyTeamsRaw,
|
|
11
11
|
listConnectedBrightsyTeams
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-7YKXHBIW.js";
|
|
13
|
+
import "./chunk-BD2ICC4D.js";
|
|
14
14
|
import "./chunk-3KETJKYA.js";
|
|
15
15
|
export {
|
|
16
16
|
applyConnectedTeamToCli,
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
enrichWorkspacesWithGithub,
|
|
10
10
|
ensureGlobalCoordinatorCwd,
|
|
11
11
|
formatWorkspaceInventory
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-YJADJH5U.js";
|
|
13
|
+
import "./chunk-WA3DVVWG.js";
|
|
14
14
|
import "./chunk-B3SJXYIJ.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-P3BQ5DOL.js";
|
|
16
|
+
import "./chunk-WSYCND2U.js";
|
|
17
17
|
import "./chunk-NSTQ6QKD.js";
|
|
18
18
|
import "./chunk-KGZBYWZ3.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-BD2ICC4D.js";
|
|
20
20
|
import "./chunk-3KETJKYA.js";
|
|
21
21
|
export {
|
|
22
22
|
COORDINATOR_TOOL_PLAYBOOK,
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
enrichWorkspacesWithGithub,
|
|
8
8
|
ensureGlobalCoordinatorCwd,
|
|
9
9
|
formatWorkspaceInventory
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ETMRBJKA.js";
|
|
11
|
+
import "./chunk-DHAGMJIK.js";
|
|
12
12
|
import "./chunk-FKOIHGKV.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-XHZJJWLI.js";
|
|
14
14
|
import "./chunk-TLPJHLLM.js";
|
|
15
15
|
import "./chunk-JT7R45JB.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-KGSVLZV6.js";
|
|
17
17
|
import "./chunk-77WWLBCI.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-QZQEXME2.js";
|
|
19
19
|
import "./chunk-LGXBYZZA.js";
|
|
20
20
|
export {
|
|
21
21
|
COORDINATOR_TOOL_PLAYBOOK,
|
|
@@ -17,17 +17,17 @@ import {
|
|
|
17
17
|
orchestratorSessionPoisonedByBuiltins,
|
|
18
18
|
slackCoordinatorSourceRef,
|
|
19
19
|
takenTeamSlugsForOrchestration
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-OW34MVDN.js";
|
|
21
|
+
import "./chunk-YJADJH5U.js";
|
|
22
|
+
import "./chunk-WA3DVVWG.js";
|
|
23
23
|
import "./chunk-B3SJXYIJ.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-P3BQ5DOL.js";
|
|
25
|
+
import "./chunk-WSYCND2U.js";
|
|
26
26
|
import "./chunk-NSTQ6QKD.js";
|
|
27
27
|
import "./chunk-KGZBYWZ3.js";
|
|
28
28
|
import {
|
|
29
29
|
globalAgentCwd
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-BD2ICC4D.js";
|
|
31
31
|
import "./chunk-3KETJKYA.js";
|
|
32
32
|
export {
|
|
33
33
|
GLOBAL_WORKSPACE_ID,
|
|
@@ -15,18 +15,18 @@ import {
|
|
|
15
15
|
orchestratorSessionPoisonedByBuiltins,
|
|
16
16
|
slackCoordinatorSourceRef,
|
|
17
17
|
takenTeamSlugsForOrchestration
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-HHLZWO7U.js";
|
|
19
|
+
import "./chunk-ETMRBJKA.js";
|
|
20
|
+
import "./chunk-DHAGMJIK.js";
|
|
21
21
|
import "./chunk-FKOIHGKV.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-XHZJJWLI.js";
|
|
23
23
|
import "./chunk-TLPJHLLM.js";
|
|
24
24
|
import "./chunk-JT7R45JB.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-KGSVLZV6.js";
|
|
26
26
|
import "./chunk-77WWLBCI.js";
|
|
27
27
|
import {
|
|
28
28
|
globalAgentCwd
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QZQEXME2.js";
|
|
30
30
|
import "./chunk-LGXBYZZA.js";
|
|
31
31
|
export {
|
|
32
32
|
GLOBAL_WORKSPACE_ID,
|