@sideboard-ai/core 0.1.350 → 0.1.352

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.
Files changed (75) hide show
  1. package/dist/{abletime-TX7BTTR2.js → abletime-5LEOMLQE.js} +4 -4
  2. package/dist/{abletime-URSRZW7P.js → abletime-VUPUERE4.js} +4 -4
  3. package/dist/{abletime-oauth-QS3WPSCC.js → abletime-oauth-65LHLQ7P.js} +3 -3
  4. package/dist/{abletime-oauth-SL3NMNEC.js → abletime-oauth-JAINJBNY.js} +3 -3
  5. package/dist/{abletime-rest-JZU6JJCV.js → abletime-rest-4TCWPN7E.js} +3 -3
  6. package/dist/{abletime-rest-GGQLUO55.js → abletime-rest-HBIK234Y.js} +3 -3
  7. package/dist/agents/claude-runner.cjs +46 -19
  8. package/dist/agents/claude-runner.js +16 -1
  9. package/dist/agents/cursor-runner.cjs +50 -12
  10. package/dist/agents/cursor-runner.js +2 -2
  11. package/dist/{agents-RGAV5OHD.js → agents-4DQDWMSX.js} +9 -9
  12. package/dist/{agents-P5QIV24I.js → agents-IV454BNN.js} +8 -8
  13. package/dist/{app-settings-IA7ZZKWQ.js → app-settings-GM4MJD2E.js} +3 -1
  14. package/dist/{app-settings-XILTSD6L.js → app-settings-X3UFWRAF.js} +3 -1
  15. package/dist/{chunk-BZK62VPT.js → chunk-2S7EAUDI.js} +2 -2
  16. package/dist/{chunk-CCWQ65VD.js → chunk-2SFKLWU5.js} +2 -2
  17. package/dist/{chunk-WB3G2LQO.js → chunk-BCNPZ7H2.js} +1 -1
  18. package/dist/{chunk-W5GHFT7E.js → chunk-CQDJ4RX4.js} +149 -127
  19. package/dist/{chunk-SMSD6U3N.js → chunk-GA5MLYVG.js} +1 -1
  20. package/dist/{chunk-LFSTOECH.js → chunk-HBRP2SHA.js} +4 -4
  21. package/dist/{chunk-DL4OHDBV.js → chunk-I6BKWSCT.js} +3 -3
  22. package/dist/{chunk-WJURGCBR.js → chunk-KSBJOWVO.js} +1 -1
  23. package/dist/{chunk-J4EA5SHF.js → chunk-LZ3TAKNJ.js} +3 -3
  24. package/dist/{chunk-F4RFFE2H.js → chunk-M426EW7O.js} +3 -3
  25. package/dist/{chunk-ZBSEJIOV.js → chunk-MBQU6RE2.js} +6 -6
  26. package/dist/{chunk-TCEUNSLX.js → chunk-NRGT7RMO.js} +1 -1
  27. package/dist/{chunk-M45WGODR.js → chunk-OCCUD5CK.js} +2 -2
  28. package/dist/{chunk-5AHWUJRT.js → chunk-PR5TOSRD.js} +324 -70
  29. package/dist/{chunk-SUZOPJZC.js → chunk-PS6TD5MQ.js} +260 -2
  30. package/dist/{chunk-YE7Z5WH3.js → chunk-QKNOKO2P.js} +1 -1
  31. package/dist/{chunk-VL6F2KRE.js → chunk-RMJXFABA.js} +8 -6
  32. package/dist/{chunk-FQ3JYUKI.js → chunk-SBUR2WCP.js} +2 -2
  33. package/dist/{chunk-MANERA6F.js → chunk-SWU5C3HQ.js} +6 -6
  34. package/dist/{chunk-UFUAIVNV.js → chunk-TB7SYXXS.js} +8 -6
  35. package/dist/{chunk-7ZD4OK6G.js → chunk-TDWE7INS.js} +1 -1
  36. package/dist/{chunk-WFX4ZVSZ.js → chunk-TRUNDXCE.js} +1 -1
  37. package/dist/{chunk-NDEVAA34.js → chunk-UDTFOKVX.js} +28 -10
  38. package/dist/{chunk-PXSWVZIL.js → chunk-UPJB6TFI.js} +2 -2
  39. package/dist/{chunk-2MESZ5XR.js → chunk-US2PGV3X.js} +146 -126
  40. package/dist/{chunk-YVN7L4KG.js → chunk-V2G6AGWM.js} +6 -1
  41. package/dist/{chunk-37ZBEBP6.js → chunk-VZAICZHU.js} +3 -3
  42. package/dist/{chunk-FCKTBE26.js → chunk-WJQFWDGH.js} +1 -1
  43. package/dist/{chunk-EZ2MUWNW.js → chunk-WTT525MC.js} +4 -4
  44. package/dist/{chunk-BF6INES4.js → chunk-X52SO3DM.js} +1 -1
  45. package/dist/{chunk-B4EFQTMP.js → chunk-XB6NCBZK.js} +5 -5
  46. package/dist/{chunk-5TCMXEYL.js → chunk-YGXUIBIT.js} +3 -3
  47. package/dist/{chunk-VHQ6OG3U.js → chunk-ZHYFRRPN.js} +2 -2
  48. package/dist/{chunk-5WF54R3B.js → chunk-ZLPP66IP.js} +5 -5
  49. package/dist/{conductor-VGCXUUG6.js → conductor-2UOW2XBE.js} +6 -6
  50. package/dist/{conductor-HVOGBK63.js → conductor-6NYG2SZA.js} +6 -6
  51. package/dist/{coordinator-prompt-E736TJBS.js → coordinator-prompt-K3WT5UVS.js} +4 -4
  52. package/dist/{coordinator-prompt-DPO7L2JO.js → coordinator-prompt-ZP6AEETR.js} +4 -4
  53. package/dist/{global-workspace-4RDPAOTT.js → global-workspace-EFPSYP4N.js} +4 -4
  54. package/dist/{global-workspace-TG2TVLUF.js → global-workspace-EPVNFQVC.js} +4 -4
  55. package/dist/index.cjs +1342 -886
  56. package/dist/index.d.cts +27 -14
  57. package/dist/index.d.ts +27 -14
  58. package/dist/index.js +510 -335
  59. package/dist/{linear-WG23LBCX.js → linear-4ACCQCWM.js} +2 -2
  60. package/dist/{linear-E3BX5PX5.js → linear-Q2E6LKJW.js} +2 -2
  61. package/dist/{linear-list-VU47BNUV.js → linear-list-5A3BAWRZ.js} +1 -1
  62. package/dist/{linear-list-OINZWVV5.js → linear-list-V3A57XBR.js} +1 -1
  63. package/dist/mcp/run-stdio.cjs +1266 -823
  64. package/dist/mcp/run-stdio.js +491 -328
  65. package/dist/{optional-cli-K6HX2X5O.js → optional-cli-CKQPLY4Q.js} +4 -4
  66. package/dist/{optional-cli-SA3EQYML.js → optional-cli-WE3ULLFV.js} +5 -5
  67. package/dist/{orchestrator-QDHZ56LA.js → orchestrator-5BCHUAFG.js} +11 -11
  68. package/dist/{orchestrator-3I2FLEZL.js → orchestrator-EY6GCYQG.js} +12 -12
  69. package/dist/{thread-store-4YTOV2HL.js → thread-store-CDFHHRXB.js} +2 -2
  70. package/dist/{thread-store-LME2ICZP.js → thread-store-TDGZEGS6.js} +2 -2
  71. package/dist/{workspaces-6TMYV4N2.js → workspaces-KL4SZMJE.js} +4 -4
  72. package/dist/{workspaces-4PA24IX6.js → workspaces-SQRR67HD.js} +4 -4
  73. package/dist/{worktree-4ATMCYIE.js → worktree-7KG5N2XL.js} +3 -3
  74. package/dist/{worktree-DA6SKIU5.js → worktree-IDX7LMBC.js} +3 -3
  75. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatOptionalServicesDirectiveForTurn,
3
3
  formatOptionalServicesReminderForTurn
4
- } from "./chunk-BZK62VPT.js";
4
+ } from "./chunk-2S7EAUDI.js";
5
5
  import {
6
6
  extractPresentedPlan,
7
7
  isPresentPlanToolName,
@@ -21,7 +21,7 @@ import {
21
21
  parseSessionQuotaResetAt,
22
22
  planModeTurnInstruction,
23
23
  resolveQuotaFallbackAgent
24
- } from "./chunk-NDEVAA34.js";
24
+ } from "./chunk-UDTFOKVX.js";
25
25
  import {
26
26
  applyWorktreePkgCacheEnv,
27
27
  buildBrightsySessionSeed,
@@ -56,7 +56,7 @@ import {
56
56
  worktreeDevProcessKey,
57
57
  worktreeRunProcessKey,
58
58
  worktreeSetupProcessKey
59
- } from "./chunk-ZBSEJIOV.js";
59
+ } from "./chunk-MBQU6RE2.js";
60
60
  import {
61
61
  applyAgentEvent,
62
62
  clipAgentEventForPaint,
@@ -76,7 +76,7 @@ import {
76
76
  defaultAcpHarness,
77
77
  detectAcpHarness,
78
78
  detectAcpHarnesses
79
- } from "./chunk-YE7Z5WH3.js";
79
+ } from "./chunk-QKNOKO2P.js";
80
80
  import {
81
81
  titleFromPrompt
82
82
  } from "./chunk-7H655NEW.js";
@@ -109,7 +109,7 @@ import {
109
109
  stageAbsolutePathsAsAttachments,
110
110
  stageBuffersAsAttachments,
111
111
  syncWorkspacesFromThreads
112
- } from "./chunk-LFSTOECH.js";
112
+ } from "./chunk-HBRP2SHA.js";
113
113
  import {
114
114
  addPrStackLayer,
115
115
  allocateTeamSlug,
@@ -162,7 +162,7 @@ import {
162
162
  resolveRepoRoot,
163
163
  switchWorktreeBranch,
164
164
  withRepoGitLock
165
- } from "./chunk-FQ3JYUKI.js";
165
+ } from "./chunk-SBUR2WCP.js";
166
166
  import {
167
167
  REVIEW_TAB_TITLE,
168
168
  agentNicknameFromWorktreePath,
@@ -198,7 +198,7 @@ import {
198
198
  worktreeNameFromPath,
199
199
  worktreeSlugForTicket,
200
200
  writeThread
201
- } from "./chunk-TCEUNSLX.js";
201
+ } from "./chunk-NRGT7RMO.js";
202
202
  import {
203
203
  askBlockStillWaiting,
204
204
  extractPendingPlanQuestions,
@@ -240,6 +240,9 @@ import {
240
240
  git,
241
241
  resolveGitDirsForLockRecovery
242
242
  } from "./chunk-R4W4VQJZ.js";
243
+ import {
244
+ formatComputerUseHint
245
+ } from "./chunk-PS6TD5MQ.js";
243
246
  import {
244
247
  HISTORY_CLEANUP_INTERVAL_HOURS_DEFAULT,
245
248
  applyTurnUsage,
@@ -248,6 +251,7 @@ import {
248
251
  autoCleanupHistoryEnabled,
249
252
  childEnvWithAppSettings,
250
253
  coerceOrchestratorAgent,
254
+ computerUseEnabled,
251
255
  followUpBehavior,
252
256
  formatViewerContextDirective,
253
257
  formatViewerContextReminder,
@@ -276,7 +280,7 @@ import {
276
280
  wakeOrchestratorOnGithubEdgesEnabled,
277
281
  withTurnScopedCost,
278
282
  writeViewerContext
279
- } from "./chunk-UFUAIVNV.js";
283
+ } from "./chunk-TB7SYXXS.js";
280
284
  import {
281
285
  writePrivateFile
282
286
  } from "./chunk-JT7R45JB.js";
@@ -344,7 +348,7 @@ function formatInjectedNoticesForTurn(notices) {
344
348
 
345
349
  // src/orchestrator/orchestrator.ts
346
350
  import { randomUUID as randomUUID4 } from "crypto";
347
- import { existsSync as existsSync14 } from "fs";
351
+ import { existsSync as existsSync15 } from "fs";
348
352
 
349
353
  // src/agents/spawn.ts
350
354
  import { rmSync } from "fs";
@@ -536,9 +540,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
536
540
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
537
541
  );
538
542
  }
539
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-4RDPAOTT.js");
543
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-EFPSYP4N.js");
540
544
  if (isGlobalThread2(thread)) {
541
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-DPO7L2JO.js");
545
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-ZP6AEETR.js");
542
546
  ensureGlobalCoordinatorCwd2(
543
547
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
544
548
  );
@@ -828,6 +832,9 @@ async function removeWorktreeDroppingLeftovers(thread, deleteBranch) {
828
832
  }
829
833
 
830
834
  // src/git/agent-git-actions.ts
835
+ import { existsSync } from "fs";
836
+ import { join as join2 } from "path";
837
+ var ANNOUNCE_AFTER_MERGE = "After that merge to the default branch succeeds, follow `.claude/skills/announce-on-x/SKILL.md` (`/announce-on-x`) before the turn ends. Post or skip each pull request that merge landed on the default branch. Do not schedule a catch-up.";
831
838
  var AGENT_GIT_ACTIONS = [
832
839
  "commit-push",
833
840
  "create-draft",
@@ -960,6 +967,10 @@ function entireGitActionExpansion(action, base) {
960
967
  return "This phrase is the explicit ask to merge this thread's Trail change with `entire trail merge`. Do not force-push main/master or merge locally into the main checkout. Do not use `gh`.";
961
968
  }
962
969
  }
970
+ function worktreeHasAnnounceSkill(worktreePath) {
971
+ const root = worktreePath?.trim();
972
+ return !!root && existsSync(join2(root, ".claude/skills/announce-on-x/SKILL.md"));
973
+ }
963
974
  function expandCanonicalGitRequest(prompt, opts) {
964
975
  const trimmed = prompt.trim();
965
976
  let action = null;
@@ -993,6 +1004,9 @@ function expandCanonicalGitRequest(prompt, opts) {
993
1004
  expansion = forge === "cursor" ? "Investigate that failing check (`origin pr checks`, `origin pr watch`), fix it, commit, and push. Loop only if a goal to keep going until it passes was given. Do not use `gh run`." : forge === "entire" ? "Investigate the blocking gate (`entire trail merge --dry-run`, `entire trail finding list`, `entire trail watch`), fix it, commit, and push. Loop only if a goal to keep going until it passes was given. Do not use `gh run`." : "Investigate that failing check (`gh pr checks`, `gh run view --log-failed`), fix it, commit, and push. Loop only if a goal to keep going until it passes was given.";
994
1005
  }
995
1006
  if (!expansion) return prompt;
1007
+ if (action === "merge" && (!base || isMainishPrBase(base)) && worktreeHasAnnounceSkill(opts?.worktreePath)) {
1008
+ expansion = `${expansion} ${ANNOUNCE_AFTER_MERGE}`;
1009
+ }
996
1010
  if (expansionPushes(action, trimmed)) expansion = withPushReview(expansion);
997
1011
  return `${trimmed}
998
1012
 
@@ -1109,8 +1123,8 @@ function shouldAutoArchiveOnPrMerge(opts) {
1109
1123
 
1110
1124
  // src/store/setup-log.ts
1111
1125
  import { createHash } from "crypto";
1112
- import { existsSync, readFileSync, writeFileSync } from "fs";
1113
- import { join as join2 } from "path";
1126
+ import { existsSync as existsSync2, readFileSync, writeFileSync } from "fs";
1127
+ import { join as join3 } from "path";
1114
1128
  var EMPTY = {
1115
1129
  output: "",
1116
1130
  running: false,
@@ -1152,7 +1166,7 @@ function materialize(mem) {
1152
1166
  };
1153
1167
  }
1154
1168
  function setupLogPath(threadId) {
1155
- return join2(threadsDir(), `${threadId}.setup.log.json`);
1169
+ return join3(threadsDir(), `${threadId}.setup.log.json`);
1156
1170
  }
1157
1171
  function setupLogKeyForWorktree(worktreePath) {
1158
1172
  const norm = normalizeWorktreePath(worktreePath);
@@ -1200,7 +1214,7 @@ function schedulePersist(threadId) {
1200
1214
  }
1201
1215
  function loadFromDisk(threadId) {
1202
1216
  const path = setupLogPath(threadId);
1203
- if (!existsSync(path)) return null;
1217
+ if (!existsSync2(path)) return null;
1204
1218
  try {
1205
1219
  const raw = JSON.parse(readFileSync(path, "utf8"));
1206
1220
  return {
@@ -1261,8 +1275,8 @@ function finishSetupLog(threadId, exitCode, source) {
1261
1275
 
1262
1276
  // src/store/run-log.ts
1263
1277
  import { createHash as createHash2 } from "crypto";
1264
- import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
1265
- import { join as join3 } from "path";
1278
+ import { existsSync as existsSync3, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
1279
+ import { join as join4 } from "path";
1266
1280
  var EMPTY2 = {
1267
1281
  output: "",
1268
1282
  running: false,
@@ -1301,7 +1315,7 @@ function safeScriptToken(scriptName) {
1301
1315
  return token || "dev";
1302
1316
  }
1303
1317
  function runLogPath(key) {
1304
- return join3(threadsDir(), `${key}.run.log.json`);
1318
+ return join4(threadsDir(), `${key}.run.log.json`);
1305
1319
  }
1306
1320
  function runLogKeyForWorktree(worktreePath, scriptName) {
1307
1321
  const norm = normalizeWorktreePath(worktreePath);
@@ -1347,7 +1361,7 @@ function schedulePersist2(key) {
1347
1361
  }
1348
1362
  function loadFromDisk2(key) {
1349
1363
  const path = runLogPath(key);
1350
- if (!existsSync2(path)) return null;
1364
+ if (!existsSync3(path)) return null;
1351
1365
  try {
1352
1366
  const raw = JSON.parse(readFileSync2(path, "utf8"));
1353
1367
  return {
@@ -1409,8 +1423,8 @@ function flushRunLog(key) {
1409
1423
  }
1410
1424
 
1411
1425
  // src/git/orphan-cleanup.ts
1412
- import { existsSync as existsSync3, readdirSync, statSync } from "fs";
1413
- import { join as join4 } from "path";
1426
+ import { existsSync as existsSync4, readdirSync, statSync } from "fs";
1427
+ import { join as join5 } from "path";
1414
1428
  function isSideboardWorktreePath(path) {
1415
1429
  return path.includes("/.sideboard/worktrees/") || path.includes("/sideboard/workspaces/");
1416
1430
  }
@@ -1421,7 +1435,7 @@ async function findOrphanWorktrees(repoPaths) {
1421
1435
  repoPaths?.length ? repoPaths : threads.map((t) => t.repoPath).filter(Boolean)
1422
1436
  );
1423
1437
  const homeRoot = sideboardWorkspacesDir();
1424
- if (existsSync3(homeRoot)) {
1438
+ if (existsSync4(homeRoot)) {
1425
1439
  try {
1426
1440
  for (const entry of readdirSync(homeRoot, { withFileTypes: true })) {
1427
1441
  if (!entry.isDirectory()) continue;
@@ -1433,7 +1447,7 @@ async function findOrphanWorktrees(repoPaths) {
1433
1447
  const orphans = [];
1434
1448
  const seen = /* @__PURE__ */ new Set();
1435
1449
  for (const repoPath of repos) {
1436
- if (!repoPath || !existsSync3(repoPath)) continue;
1450
+ if (!repoPath || !existsSync4(repoPath)) continue;
1437
1451
  try {
1438
1452
  const wts = await listWorktrees(repoPath);
1439
1453
  for (const wt of wts) {
@@ -1454,12 +1468,12 @@ async function findOrphanWorktrees(repoPaths) {
1454
1468
  }
1455
1469
  try {
1456
1470
  const root = worktreesRoot(repoPath);
1457
- if (existsSync3(root)) {
1471
+ if (existsSync4(root)) {
1458
1472
  for (const entry of readdirSync(root, { withFileTypes: true })) {
1459
1473
  if (!entry.isDirectory()) continue;
1460
- const path = join4(root, entry.name).replace(/\/$/, "");
1474
+ const path = join5(root, entry.name).replace(/\/$/, "");
1461
1475
  if (known.has(path) || seen.has(path)) continue;
1462
- if (!existsSync3(join4(path, ".git"))) continue;
1476
+ if (!existsSync4(join5(path, ".git"))) continue;
1463
1477
  seen.add(path);
1464
1478
  let mtimeMs = 0;
1465
1479
  try {
@@ -1673,8 +1687,8 @@ async function applyThreadIntoMain(thread, opts) {
1673
1687
  }
1674
1688
 
1675
1689
  // src/git/clone-repo.ts
1676
- import { existsSync as existsSync4 } from "fs";
1677
- import { basename, join as join5 } from "path";
1690
+ import { existsSync as existsSync5 } from "fs";
1691
+ import { basename, join as join6 } from "path";
1678
1692
  import { execa as execa3 } from "execa";
1679
1693
  async function cloneRepoIntoSideboard(opts) {
1680
1694
  const url = opts.url.trim();
@@ -1685,8 +1699,8 @@ async function cloneRepoIntoSideboard(opts) {
1685
1699
  name = leaf || "repo";
1686
1700
  }
1687
1701
  name = name.replace(/[^a-zA-Z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "repo";
1688
- const dest = join5(sideboardReposDir(), name);
1689
- if (existsSync4(dest)) {
1702
+ const dest = join6(sideboardReposDir(), name);
1703
+ if (existsSync5(dest)) {
1690
1704
  const repoPath2 = await resolveRepoRoot(dest);
1691
1705
  const workspace2 = await addWorkspace(repoPath2);
1692
1706
  return { repoPath: repoPath2, workspace: workspace2 };
@@ -1712,9 +1726,9 @@ function isAdoptableRunScriptRequest(req) {
1712
1726
 
1713
1727
  // src/store/desktop-host.ts
1714
1728
  import { readFileSync as readFileSync3, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
1715
- import { join as join6 } from "path";
1729
+ import { join as join7 } from "path";
1716
1730
  function desktopHostPidPath() {
1717
- return join6(appDataDir(), "desktop-host.pid");
1731
+ return join7(appDataDir(), "desktop-host.pid");
1718
1732
  }
1719
1733
  function claimDesktopHost(pid = process.pid) {
1720
1734
  writeFileSync3(desktopHostPidPath(), `${pid}
@@ -2575,7 +2589,7 @@ function agentPurposeStamp(input) {
2575
2589
  }
2576
2590
 
2577
2591
  // src/threads/create.ts
2578
- import { existsSync as existsSync5 } from "fs";
2592
+ import { existsSync as existsSync6 } from "fs";
2579
2593
 
2580
2594
  // src/detect/detect.ts
2581
2595
  async function detectAgents() {
@@ -3388,7 +3402,7 @@ function reuseLiveThread(input, repoPath, match) {
3388
3402
  }
3389
3403
  async function createThread(input, _onSetupLine) {
3390
3404
  const repoPath = await resolveRepoRoot(input.repoPath);
3391
- if (!existsSync5(repoPath)) {
3405
+ if (!existsSync6(repoPath)) {
3392
3406
  throw new Error(`Repo not found: ${repoPath}`);
3393
3407
  }
3394
3408
  if (isRemovedWorkspace(repoPath)) throw new Error(`Project was removed: ${repoPath}`);
@@ -3408,7 +3422,7 @@ async function createThread(input, _onSetupLine) {
3408
3422
  const acpHarness = resolved.agent === "acp" ? input.acpHarness === "gemini" || input.acpHarness === "copilot" ? input.acpHarness : defaultAcpHarness() : void 0;
3409
3423
  await requireAgent(resolved.agent, { acpHarness });
3410
3424
  if (input.cowboy) {
3411
- const { cowboyModeEnabled } = await import("./app-settings-IA7ZZKWQ.js");
3425
+ const { cowboyModeEnabled } = await import("./app-settings-GM4MJD2E.js");
3412
3426
  if (!cowboyModeEnabled()) {
3413
3427
  throw new Error(
3414
3428
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -3468,7 +3482,7 @@ async function createThread(input, _onSetupLine) {
3468
3482
  let sourceIsFork = false;
3469
3483
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
3470
3484
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
3471
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-TX7BTTR2.js");
3485
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-5LEOMLQE.js");
3472
3486
  const task = await ensureAbleTimeTask({
3473
3487
  title: title?.trim() || "Untitled work",
3474
3488
  description: input.prompt?.trim() || void 0
@@ -3580,7 +3594,7 @@ async function createThread(input, _onSetupLine) {
3580
3594
  return readThread(thread.id) ?? thread;
3581
3595
  }
3582
3596
  async function listLinearIssues(agent, repoPath) {
3583
- const { getAdapter: getAdapter2 } = await import("./agents-RGAV5OHD.js");
3597
+ const { getAdapter: getAdapter2 } = await import("./agents-4DQDWMSX.js");
3584
3598
  await requireAgent(agent, { requireLinear: true });
3585
3599
  const adapter = getAdapter2(agent);
3586
3600
  if (!adapter.listLinearIssues) {
@@ -3928,7 +3942,7 @@ function createLineCoalescer(onChunk, opts) {
3928
3942
 
3929
3943
  // src/store/turn-live.ts
3930
3944
  import {
3931
- existsSync as existsSync6,
3945
+ existsSync as existsSync7,
3932
3946
  renameSync,
3933
3947
  unlinkSync as unlinkSync2,
3934
3948
  writeFileSync as writeFileSync4,
@@ -4024,7 +4038,7 @@ function readTurnLiveParts(threadId) {
4024
4038
  }
4025
4039
  function readTurnLive(threadId) {
4026
4040
  const path = threadLivePath(threadId);
4027
- if (!existsSync6(path)) return null;
4041
+ if (!existsSync7(path)) return null;
4028
4042
  try {
4029
4043
  const raw = JSON.parse(readFileSync4(path, "utf8"));
4030
4044
  if (!raw || typeof raw.summary !== "string") return null;
@@ -4038,7 +4052,7 @@ function clearTurnLive(threadId) {
4038
4052
  if (buf?.timer) clearTimeout(buf.timer);
4039
4053
  buffers.delete(threadId);
4040
4054
  const path = threadLivePath(threadId);
4041
- if (!existsSync6(path)) return;
4055
+ if (!existsSync7(path)) return;
4042
4056
  try {
4043
4057
  unlinkSync2(path);
4044
4058
  } catch {
@@ -4292,26 +4306,26 @@ function createQuotaFailoverChat(from, fallbackAgent, limitText, opts) {
4292
4306
  import { execFileSync as execFileSync2 } from "child_process";
4293
4307
  import {
4294
4308
  copyFileSync,
4295
- existsSync as existsSync7,
4309
+ existsSync as existsSync8,
4296
4310
  mkdtempSync,
4297
4311
  readdirSync as readdirSync2,
4298
4312
  readFileSync as readFileSync5,
4299
4313
  rmSync as rmSync2
4300
4314
  } from "fs";
4301
4315
  import { tmpdir } from "os";
4302
- import { join as join7 } from "path";
4316
+ import { join as join8 } from "path";
4303
4317
  import { createRequire } from "module";
4304
- var CONDUCTOR_APP_SUPPORT = join7(
4318
+ var CONDUCTOR_APP_SUPPORT = join8(
4305
4319
  process.env.HOME ?? "",
4306
4320
  "Library",
4307
4321
  "Application Support",
4308
4322
  "com.conductor.app"
4309
4323
  );
4310
- var CONDUCTOR_DB = join7(CONDUCTOR_APP_SUPPORT, "conductor.db");
4311
- var CURSOR_SDK_STORE = join7(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
4324
+ var CONDUCTOR_DB = join8(CONDUCTOR_APP_SUPPORT, "conductor.db");
4325
+ var CURSOR_SDK_STORE = join8(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
4312
4326
  function thisModuleFile() {
4313
4327
  const cjsFile = typeof __filename !== "undefined" ? __filename : "";
4314
- return cjsFile || process.argv[1] || join7(process.cwd(), "package.json");
4328
+ return cjsFile || process.argv[1] || join8(process.cwd(), "package.json");
4315
4329
  }
4316
4330
  function openReadonlySqlite(file) {
4317
4331
  const req = createRequire(thisModuleFile());
@@ -4329,7 +4343,7 @@ function mapAgentType(raw) {
4329
4343
  return null;
4330
4344
  }
4331
4345
  function resolveConductorCursorAgentId(workspacePath) {
4332
- if (!workspacePath || !existsSync7(CURSOR_SDK_STORE)) return null;
4346
+ if (!workspacePath || !existsSync8(CURSOR_SDK_STORE)) return null;
4333
4347
  const normalized = workspacePath.replace(/\/$/, "");
4334
4348
  let best = null;
4335
4349
  let hashes;
@@ -4339,8 +4353,8 @@ function resolveConductorCursorAgentId(workspacePath) {
4339
4353
  return null;
4340
4354
  }
4341
4355
  for (const hash of hashes) {
4342
- const agentsFile = join7(CURSOR_SDK_STORE, hash, "agents.ndjson");
4343
- if (!existsSync7(agentsFile)) continue;
4356
+ const agentsFile = join8(CURSOR_SDK_STORE, hash, "agents.ndjson");
4357
+ if (!existsSync8(agentsFile)) continue;
4344
4358
  let text3;
4345
4359
  try {
4346
4360
  text3 = readFileSync5(agentsFile, "utf8");
@@ -4367,7 +4381,7 @@ function resolveConductorCursorAgentId(workspacePath) {
4367
4381
  return best?.agentId ?? null;
4368
4382
  }
4369
4383
  async function adoptThread(input) {
4370
- if (!existsSync7(input.worktreePath)) {
4384
+ if (!existsSync8(input.worktreePath)) {
4371
4385
  throw new Error(`Worktree not found: ${input.worktreePath}`);
4372
4386
  }
4373
4387
  const repoPath = await resolveRepoRoot(input.worktreePath);
@@ -4389,7 +4403,7 @@ async function adoptThread(input) {
4389
4403
  messages: input.messages ?? []
4390
4404
  });
4391
4405
  writeThread(thread);
4392
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-6TMYV4N2.js");
4406
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-KL4SZMJE.js");
4393
4407
  await addWorkspace2(repoPath);
4394
4408
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-YQBN43QD.js");
4395
4409
  await ensureWorktreeSideboardIgnored(input.worktreePath);
@@ -4399,16 +4413,16 @@ function conductorDbPath() {
4399
4413
  return CONDUCTOR_DB;
4400
4414
  }
4401
4415
  function listConductorWorkspaces() {
4402
- if (!existsSync7(CONDUCTOR_DB)) {
4416
+ if (!existsSync8(CONDUCTOR_DB)) {
4403
4417
  throw new Error(`Conductor DB not found at ${CONDUCTOR_DB}`);
4404
4418
  }
4405
- const tmp = mkdtempSync(join7(tmpdir(), "sideboard-conductor-"));
4406
- const snapshot = join7(tmp, "conductor.db");
4419
+ const tmp = mkdtempSync(join8(tmpdir(), "sideboard-conductor-"));
4420
+ const snapshot = join8(tmp, "conductor.db");
4407
4421
  try {
4408
4422
  copyFileSync(CONDUCTOR_DB, snapshot);
4409
4423
  for (const suffix of ["-wal", "-shm"]) {
4410
4424
  const src = `${CONDUCTOR_DB}${suffix}`;
4411
- if (existsSync7(src)) {
4425
+ if (existsSync8(src)) {
4412
4426
  try {
4413
4427
  copyFileSync(src, `${snapshot}${suffix}`);
4414
4428
  } catch {
@@ -4490,16 +4504,16 @@ function listConductorWorkspaces() {
4490
4504
  }
4491
4505
  }
4492
4506
  function importConductorWorkspace(workspaceId) {
4493
- if (!existsSync7(CONDUCTOR_DB)) {
4507
+ if (!existsSync8(CONDUCTOR_DB)) {
4494
4508
  throw new Error(`Conductor DB not found at ${CONDUCTOR_DB}`);
4495
4509
  }
4496
- const tmp = mkdtempSync(join7(tmpdir(), "sideboard-conductor-"));
4497
- const snapshot = join7(tmp, "conductor.db");
4510
+ const tmp = mkdtempSync(join8(tmpdir(), "sideboard-conductor-"));
4511
+ const snapshot = join8(tmp, "conductor.db");
4498
4512
  try {
4499
4513
  copyFileSync(CONDUCTOR_DB, snapshot);
4500
4514
  for (const suffix of ["-wal", "-shm"]) {
4501
4515
  const src = `${CONDUCTOR_DB}${suffix}`;
4502
- if (existsSync7(src)) {
4516
+ if (existsSync8(src)) {
4503
4517
  try {
4504
4518
  copyFileSync(src, `${snapshot}${suffix}`);
4505
4519
  } catch {
@@ -4519,7 +4533,7 @@ function importConductorWorkspace(workspaceId) {
4519
4533
  ).get(workspaceId);
4520
4534
  if (!row) throw new Error(`Conductor workspace not found: ${workspaceId}`);
4521
4535
  const worktreePath = String(row.workspacePath);
4522
- if (!existsSync7(worktreePath)) {
4536
+ if (!existsSync8(worktreePath)) {
4523
4537
  throw new Error(`Conductor worktree missing on disk: ${worktreePath}`);
4524
4538
  }
4525
4539
  let sessionId = null;
@@ -4590,7 +4604,7 @@ async function importConductorWorkspaceAsync(workspaceId) {
4590
4604
  }
4591
4605
 
4592
4606
  // src/threads/stack-layers.ts
4593
- import { existsSync as existsSync8 } from "fs";
4607
+ import { existsSync as existsSync9 } from "fs";
4594
4608
  function stackIdFrom(stack) {
4595
4609
  if (stack.stackNumber != null) return `gh-stack-${stack.stackNumber}`;
4596
4610
  const key = stack.layers.map((l) => l.branchName).join("|");
@@ -4653,7 +4667,7 @@ async function openStackLayer(input, _onSetupLine) {
4653
4667
  let createdWorktree = false;
4654
4668
  const trees = await listWorktrees(repoPath);
4655
4669
  const checkedOut = trees.find((w) => w.branch === branchName);
4656
- if (checkedOut?.path && existsSync8(checkedOut.path)) {
4670
+ if (checkedOut?.path && existsSync9(checkedOut.path)) {
4657
4671
  if (input.reuseExistingWorktree !== false) {
4658
4672
  worktreePath = checkedOut.path;
4659
4673
  } else {
@@ -4795,7 +4809,7 @@ async function initStackFromThread(input, onSetupLine) {
4795
4809
  async function createPrStack(input, onSetupLine) {
4796
4810
  await requireAgent(input.agent);
4797
4811
  const repoPath = await resolveRepoRoot(input.repoPath);
4798
- if (!existsSync8(repoPath)) throw new Error(`Repo not found: ${repoPath}`);
4812
+ if (!existsSync9(repoPath)) throw new Error(`Repo not found: ${repoPath}`);
4799
4813
  if (!input.branches.length) throw new Error("At least one branch name required");
4800
4814
  const status = await detectGhStack(repoPath);
4801
4815
  if (!status.available) throw new Error(status.reason);
@@ -4862,7 +4876,7 @@ async function createPrStack(input, onSetupLine) {
4862
4876
  }
4863
4877
  }
4864
4878
  const claimed = new Set(threads.map((t) => t.worktreePath));
4865
- if (!claimed.has(bootstrap.worktreePath) && existsSync8(bootstrap.worktreePath)) {
4879
+ if (!claimed.has(bootstrap.worktreePath) && existsSync9(bootstrap.worktreePath)) {
4866
4880
  try {
4867
4881
  await removeWorktree(repoPath, bootstrap.worktreePath, {
4868
4882
  deleteBranch: bootstrap.branchName
@@ -4887,7 +4901,7 @@ function stackAgentDefaultsFrom(input) {
4887
4901
  import { randomBytes } from "crypto";
4888
4902
  import { unlinkSync as unlinkSync3, writeFileSync as writeFileSync5 } from "fs";
4889
4903
  import { tmpdir as tmpdir2 } from "os";
4890
- import { join as join8 } from "path";
4904
+ import { join as join9 } from "path";
4891
4905
  async function lookupGithubGraphqlReset(cwd) {
4892
4906
  const result = await gh(["api", "rate_limit"], cwd, { reject: false });
4893
4907
  if (result.exitCode !== 0 || !result.stdout.trim()) return void 0;
@@ -4915,7 +4929,7 @@ async function formatPrCreateFailure(raw, cwd, ctx) {
4915
4929
  }
4916
4930
  async function createCursorPullRequest(worktreePath, slug, opts) {
4917
4931
  const bodyText = (opts.body ?? opts.title).trim() || opts.title;
4918
- const bodyFile = join8(
4932
+ const bodyFile = join9(
4919
4933
  tmpdir2(),
4920
4934
  `sideboard-pr-body-${process.pid}-${randomBytes(6).toString("hex")}.md`
4921
4935
  );
@@ -4957,7 +4971,7 @@ async function createOrUpdatePr(worktreePath, opts) {
4957
4971
  const headRef = ghHeadRef(slug, opts.head);
4958
4972
  const branchOnly = opts.head.trim().replace(/^refs\/heads\//, "");
4959
4973
  const bodyText = clampGithubPrBody(opts.body ?? opts.title);
4960
- const bodyFile = join8(
4974
+ const bodyFile = join9(
4961
4975
  tmpdir2(),
4962
4976
  `sideboard-pr-body-${process.pid}-${randomBytes(6).toString("hex")}.md`
4963
4977
  );
@@ -5052,10 +5066,10 @@ async function createOrUpdatePrWithBodyFile(worktreePath, opts) {
5052
5066
  }
5053
5067
 
5054
5068
  // src/diff/diff.ts
5055
- import { existsSync as existsSync9, mkdirSync, readFileSync as readFileSync6, statSync as statSync2, writeFileSync as writeFileSync6 } from "fs";
5056
- import { dirname as dirname2, join as join9 } from "path";
5069
+ import { existsSync as existsSync10, mkdirSync, readFileSync as readFileSync6, statSync as statSync2, writeFileSync as writeFileSync6 } from "fs";
5070
+ import { dirname as dirname2, join as join10 } from "path";
5057
5071
  async function inspectGitWorktree(worktreePath) {
5058
- if (!worktreePath || !existsSync9(worktreePath)) return "missing_worktree";
5072
+ if (!worktreePath || !existsSync10(worktreePath)) return "missing_worktree";
5059
5073
  const check = await git(["rev-parse", "--is-inside-work-tree"], worktreePath, {
5060
5074
  reject: false
5061
5075
  });
@@ -5063,7 +5077,7 @@ async function inspectGitWorktree(worktreePath) {
5063
5077
  return "ok";
5064
5078
  }
5065
5079
  async function initializeGitRepository(worktreePath) {
5066
- if (!worktreePath || !existsSync9(worktreePath)) {
5080
+ if (!worktreePath || !existsSync10(worktreePath)) {
5067
5081
  throw new Error("Worktree not found");
5068
5082
  }
5069
5083
  const status = await inspectGitWorktree(worktreePath);
@@ -5199,7 +5213,7 @@ new file mode 100644
5199
5213
  };
5200
5214
  }
5201
5215
  async function untrackedPatch(worktreePath, path, maxHunk) {
5202
- const abs = join9(worktreePath, path);
5216
+ const abs = join10(worktreePath, path);
5203
5217
  try {
5204
5218
  const st = statSync2(abs);
5205
5219
  if (st.isFile() && st.size > maxHunk) {
@@ -5671,8 +5685,8 @@ async function getDiff(worktreePath, repoPath, opts) {
5671
5685
  }
5672
5686
  function statWorktreePath(worktreePath, relativePath) {
5673
5687
  assertSafeRelativePath(relativePath);
5674
- const abs = join9(worktreePath, relativePath);
5675
- if (!existsSync9(abs)) return "missing";
5688
+ const abs = join10(worktreePath, relativePath);
5689
+ if (!existsSync10(abs)) return "missing";
5676
5690
  const st = statSync2(abs);
5677
5691
  if (st.isDirectory()) return "dir";
5678
5692
  if (st.isFile()) return "file";
@@ -5713,7 +5727,7 @@ var DEFAULT_UPLOAD_MAX_BYTES = 5e7;
5713
5727
  function readWorktreeFileForUpload(worktreePath, relativePath, opts) {
5714
5728
  assertSafeRelativePath(relativePath);
5715
5729
  const maxBytes = opts?.maxBytes ?? DEFAULT_UPLOAD_MAX_BYTES;
5716
- const abs = join9(worktreePath, relativePath);
5730
+ const abs = join10(worktreePath, relativePath);
5717
5731
  const st = statSync2(abs);
5718
5732
  if (!st.isFile()) {
5719
5733
  throw new Error(`Not a file: ${relativePath}`);
@@ -5733,7 +5747,7 @@ function readWorktreeFileForUpload(worktreePath, relativePath, opts) {
5733
5747
  function readWorktreeFile(worktreePath, relativePath, opts) {
5734
5748
  assertSafeRelativePath(relativePath);
5735
5749
  const maxBytes = opts?.maxBytes ?? 2e5;
5736
- const abs = join9(worktreePath, relativePath);
5750
+ const abs = join10(worktreePath, relativePath);
5737
5751
  const st = statSync2(abs);
5738
5752
  if (!st.isFile()) {
5739
5753
  throw new Error(`Not a file: ${relativePath}`);
@@ -5781,7 +5795,7 @@ function assertSafeRelativePath(relativePath) {
5781
5795
  }
5782
5796
  function writeWorktreeFile(worktreePath, relativePath, content) {
5783
5797
  assertSafeRelativePath(relativePath);
5784
- const abs = join9(worktreePath, relativePath);
5798
+ const abs = join10(worktreePath, relativePath);
5785
5799
  mkdirSync(dirname2(abs), { recursive: true });
5786
5800
  writeFileSync6(abs, content, "utf8");
5787
5801
  return { path: relativePath };
@@ -6006,13 +6020,13 @@ async function confirmLand(thread, opts) {
6006
6020
 
6007
6021
  // src/diff/read-worktree-tail.ts
6008
6022
  import { closeSync, fstatSync, openSync, readSync } from "fs";
6009
- import { join as join10 } from "path";
6023
+ import { join as join11 } from "path";
6010
6024
  var WORKTREE_TAIL_BYTES = 2e5;
6011
6025
  function readWorktreeFileTail(worktreePath, relativePath, maxBytes = WORKTREE_TAIL_BYTES) {
6012
6026
  if (!relativePath || relativePath.includes("..") || relativePath.startsWith("/")) {
6013
6027
  throw new Error("Invalid path");
6014
6028
  }
6015
- const abs = join10(worktreePath, relativePath);
6029
+ const abs = join11(worktreePath, relativePath);
6016
6030
  const fd = openSync(abs, "r");
6017
6031
  try {
6018
6032
  const st = fstatSync(fd);
@@ -6044,9 +6058,9 @@ function readWorktreeFileTail(worktreePath, relativePath, maxBytes = WORKTREE_TA
6044
6058
  }
6045
6059
 
6046
6060
  // src/skills/discover.ts
6047
- import { existsSync as existsSync10, readdirSync as readdirSync3, readFileSync as readFileSync7, statSync as statSync3 } from "fs";
6061
+ import { existsSync as existsSync11, readdirSync as readdirSync3, readFileSync as readFileSync7, statSync as statSync3 } from "fs";
6048
6062
  import { homedir } from "os";
6049
- import { join as join11 } from "path";
6063
+ import { join as join12 } from "path";
6050
6064
 
6051
6065
  // src/skills/bundled/long-running.ts
6052
6066
  var LONG_RUNNING_SKILL_COMMAND = "long-running";
@@ -6206,7 +6220,7 @@ function readSkill(skillMd, source) {
6206
6220
  }
6207
6221
  }
6208
6222
  function scanSkillsDir(dir, source, out) {
6209
- if (!existsSync10(dir)) return;
6223
+ if (!existsSync11(dir)) return;
6210
6224
  let entries;
6211
6225
  try {
6212
6226
  entries = readdirSync3(dir);
@@ -6215,8 +6229,8 @@ function scanSkillsDir(dir, source, out) {
6215
6229
  }
6216
6230
  for (const entry of entries) {
6217
6231
  if (entry.startsWith(".")) continue;
6218
- const skillMd = join11(dir, entry, "SKILL.md");
6219
- if (!existsSync10(skillMd)) continue;
6232
+ const skillMd = join12(dir, entry, "SKILL.md");
6233
+ if (!existsSync11(skillMd)) continue;
6220
6234
  try {
6221
6235
  if (!statSync3(skillMd).isFile()) continue;
6222
6236
  } catch {
@@ -6227,7 +6241,7 @@ function scanSkillsDir(dir, source, out) {
6227
6241
  }
6228
6242
  }
6229
6243
  function scanClaudePluginSkills(pluginsRoot, out) {
6230
- if (!existsSync10(pluginsRoot)) return;
6244
+ if (!existsSync11(pluginsRoot)) return;
6231
6245
  const walk = (dir, depth, lookingForSkillsDir) => {
6232
6246
  if (depth > 7) return;
6233
6247
  let entries;
@@ -6237,12 +6251,12 @@ function scanClaudePluginSkills(pluginsRoot, out) {
6237
6251
  return;
6238
6252
  }
6239
6253
  if (lookingForSkillsDir && entries.includes("SKILL.md")) {
6240
- const skill = readSkill(join11(dir, "SKILL.md"), "cli");
6254
+ const skill = readSkill(join12(dir, "SKILL.md"), "cli");
6241
6255
  if (skill) out.push(skill);
6242
6256
  }
6243
6257
  for (const entry of entries) {
6244
6258
  if (entry === "node_modules" || entry === ".git") continue;
6245
- const full = join11(dir, entry);
6259
+ const full = join12(dir, entry);
6246
6260
  try {
6247
6261
  if (!statSync3(full).isDirectory()) continue;
6248
6262
  } catch {
@@ -6262,17 +6276,17 @@ function discoverSkills(worktreePath) {
6262
6276
  const home = homedir();
6263
6277
  const collected = [];
6264
6278
  for (const rel of [".claude/skills", ".cursor/skills", ".sideboard/skills", ".brightsy/skills", "skills"]) {
6265
- scanSkillsDir(join11(worktreePath, rel), "workspace", collected);
6279
+ scanSkillsDir(join12(worktreePath, rel), "workspace", collected);
6266
6280
  }
6267
6281
  for (const abs of [
6268
- join11(home, ".claude/skills"),
6269
- join11(home, ".cursor/skills"),
6270
- join11(home, ".sideboard/skills"),
6271
- join11(home, ".brightsy/skills")
6282
+ join12(home, ".claude/skills"),
6283
+ join12(home, ".cursor/skills"),
6284
+ join12(home, ".sideboard/skills"),
6285
+ join12(home, ".brightsy/skills")
6272
6286
  ]) {
6273
6287
  scanSkillsDir(abs, "user", collected);
6274
6288
  }
6275
- scanClaudePluginSkills(join11(home, ".claude/plugins"), collected);
6289
+ scanClaudePluginSkills(join12(home, ".claude/plugins"), collected);
6276
6290
  collected.push(...bundledSkills());
6277
6291
  const rank = {
6278
6292
  workspace: 0,
@@ -6574,7 +6588,10 @@ function promptForJoinedSteer(input) {
6574
6588
  }
6575
6589
  const { agentPrompt: expandedLatest } = expandComposerPrompt(
6576
6590
  input.worktreePath,
6577
- expandCanonicalGitRequest(input.latestPrompt, { forge: input.gitForge }),
6591
+ expandCanonicalGitRequest(input.latestPrompt, {
6592
+ forge: input.gitForge,
6593
+ worktreePath: input.worktreePath
6594
+ }),
6578
6595
  { attachments: latestAttachments }
6579
6596
  );
6580
6597
  return input.expandedPrompt && input.agentPrompt.endsWith(input.expandedPrompt) ? input.agentPrompt.slice(0, -input.expandedPrompt.length) + expandedLatest : `${input.agentPrompt}
@@ -6599,10 +6616,10 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6599
6616
  throw new Error(`Thread is archived: ${thread.id}`);
6600
6617
  }
6601
6618
  const requested = opts?.followUp;
6602
- const join15 = requested === "join";
6619
+ const join16 = requested === "join";
6603
6620
  const followUp = resolveSendFollowUp(
6604
6621
  current,
6605
- join15 ? "steer" : requested
6622
+ join16 ? "steer" : requested
6606
6623
  );
6607
6624
  const explicit = opts?.attachments;
6608
6625
  const consumed = explicit !== void 0 ? { attachments: current.attachments, consumed: explicit } : consumeComposerAttachments(current);
@@ -6611,7 +6628,7 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6611
6628
  const draft = host.openSteerPrompt.get(current.id);
6612
6629
  const queuedHead = !inFlightEarly && current.status === "queued" && current.queue.length > 0 ? current.queue[0] : null;
6613
6630
  const joinCanMerge = draft != null && !draft.spawned || !inFlightEarly && queuedHead != null;
6614
- const unanswered = followUp === "steer" && !agentHasRepliedEarly && (!join15 || joinCanMerge) ? draft?.text ?? (inFlightEarly ? trailingUnansweredUserText(current.messages) : queuedHead) : null;
6631
+ const unanswered = followUp === "steer" && !agentHasRepliedEarly && (!join16 || joinCanMerge) ? draft?.text ?? (inFlightEarly ? trailingUnansweredUserText(current.messages) : queuedHead) : null;
6615
6632
  if (unanswered != null && (draft ? !draft.spawned : queuedHead != null)) {
6616
6633
  clearSendBookkeeping(host, thread.id);
6617
6634
  const combined = joinSteerPrompt(unanswered, prompt);
@@ -6663,7 +6680,7 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6663
6680
  clearSendBookkeeping(host, thread.id);
6664
6681
  const inFlight = host.activeTurns.has(thread.id) || host.startingTurns.has(thread.id) || current.status === "running";
6665
6682
  shouldSteer = sendFollowUpInterrupts(
6666
- join15 ? "join" : followUp,
6683
+ join16 ? "join" : followUp,
6667
6684
  inFlight || current.queue.length > 0
6668
6685
  );
6669
6686
  const patch = queued;
@@ -6689,8 +6706,8 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6689
6706
  }
6690
6707
 
6691
6708
  // src/agents/instructions.ts
6692
- import { existsSync as existsSync12 } from "fs";
6693
- import { join as join13 } from "path";
6709
+ import { existsSync as existsSync13 } from "fs";
6710
+ import { join as join14 } from "path";
6694
6711
 
6695
6712
  // src/agents/forge-git-directives.ts
6696
6713
  function formatCursorGitDirective(slug) {
@@ -6715,8 +6732,8 @@ function formatEntireGitDirective(slug) {
6715
6732
  }
6716
6733
 
6717
6734
  // src/skills/detached-job-path.ts
6718
- import { existsSync as existsSync11 } from "fs";
6719
- import { dirname as dirname3, join as join12 } from "path";
6735
+ import { existsSync as existsSync12 } from "fs";
6736
+ import { dirname as dirname3, join as join13 } from "path";
6720
6737
  import { fileURLToPath } from "url";
6721
6738
  var DETACHED_JOB_FILENAMES = ["detached-job.cjs", "detached-job.js"];
6722
6739
  function compiledModuleDir() {
@@ -6733,8 +6750,8 @@ function compiledModuleDir() {
6733
6750
  }
6734
6751
  function detachedJobScriptIn(dir) {
6735
6752
  for (const name of DETACHED_JOB_FILENAMES) {
6736
- const script = join12(dir, "scripts", name);
6737
- if (existsSync11(script)) return script;
6753
+ const script = join13(dir, "scripts", name);
6754
+ if (existsSync12(script)) return script;
6738
6755
  }
6739
6756
  return null;
6740
6757
  }
@@ -6858,6 +6875,7 @@ function formatWorktreeDirective(thread, opts) {
6858
6875
  lines.push(
6859
6876
  cursorRepo ? "- Stay on this workspace branch. Never push to main/master or merge locally into the main checkout. Merge the PR only when this turn is a Merge PR request or the user explicitly asked \u2014 via Origin from this worktree (`origin pr merge` / `origin stack merge`)." : entireRepo ? "- Stay on this workspace branch. Never push to main/master or merge locally into the main checkout. Merge only when this turn is a Merge PR request or the user explicitly asked \u2014 via Entire from this worktree (`entire trail merge`)." : "- Stay on this workspace branch. Never push to main/master or merge locally into the main checkout. Merge the PR only when this turn is a Merge PR request or the user explicitly asked \u2014 via GitHub from this worktree (`gh pr merge` / `gh stack merge`)."
6860
6877
  );
6878
+ if (existsSync13(join14(worktree, ".claude/skills/announce-on-x/SKILL.md"))) lines.push("- After that merge to the default branch succeeds, follow `.claude/skills/announce-on-x/SKILL.md` (`/announce-on-x`) before the turn ends. Post or skip each pull request that merge landed on the default branch. Do not schedule a catch-up.");
6861
6879
  if (thread.prUrl) {
6862
6880
  lines.push(
6863
6881
  `- A PR already exists (${thread.prUrl}). Update it (push + edit title/body if the purpose drifted) instead of opening a duplicate.`
@@ -6884,6 +6902,7 @@ function formatWorktreeDirective(thread, opts) {
6884
6902
  );
6885
6903
  lines.push("");
6886
6904
  lines.push(formatDevAccessHint(opts?.activeRuns));
6905
+ lines.push(formatComputerUseHint(computerUseEnabled()));
6887
6906
  lines.push("");
6888
6907
  lines.push(
6889
6908
  "Automations (sidebar, after Board): `create_schedule` / `list_schedules` (`at` / `every` / `cron` / `time`+`days`). `archiveChat=false` keeps the new chat. `chatId=self` is removed when this chat is archived. Fires only while Sideboard.app is running. Future jobs turn on Caffeinate. `create_follow_up` (ci|at) waits behind this turn."
@@ -7017,16 +7036,16 @@ function formatPrGateDirective() {
7017
7036
  }
7018
7037
  function formatProcessGuideDirective(opts) {
7019
7038
  const worktree = opts?.worktreePath?.trim();
7020
- const hasGraphSkill = !!worktree && existsSync12(join13(worktree, ".claude/skills/graph-engineering/SKILL.md"));
7021
- const hasReviewSkill = !!worktree && existsSync12(join13(worktree, ".claude/skills/review/SKILL.md"));
7022
- const hasInstallSkill = !!worktree && existsSync12(join13(worktree, ".claude/skills/worktree-install/SKILL.md"));
7039
+ const hasGraphSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/graph-engineering/SKILL.md"));
7040
+ const hasReviewSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/review/SKILL.md"));
7041
+ const hasInstallSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/worktree-install/SKILL.md"));
7023
7042
  return [
7024
7043
  "Process guides (recurring work only):",
7025
7044
  hasGraphSkill ? "- Migrations, ports, batch fixes, and other fan-out: follow `.claude/skills/graph-engineering/SKILL.md` (`/graph-engineering`). Judge first; state on disk; grow the rulebook; do not patch around it." : null,
7026
7045
  hasInstallSkill ? "- After merge-from-main / lockfile change, or a hung `pnpm install`: follow `.claude/skills/worktree-install/SKILL.md` (`/worktree-install`). Use the worktree-local store Sideboard already set; do not share `~/.pnpm-store` across concurrent worktrees." : null,
7027
7046
  "- If this same shape of work will happen again, write `.claude/skills/<kebab-name>/SKILL.md` in this worktree (Claude Code project skill; Sideboard `/name`, Claude Code, and `attach` all load it). Not under `.sideboard/skills/`. Point Codex/OpenCode at it from `AGENTS.md`.",
7028
7047
  hasReviewSkill ? "- Merge-readiness notes go in `.claude/skills/review/SKILL.md` (edit it; do not create another review skill)." : "- Merge-readiness notes go in `.context/review.md` (copied from `.sideboard/review.md` when that file exists). Do not create a review skill.",
7029
- !!worktree && existsSync12(join13(worktree, ".claude/skills/skill-improver/SKILL.md")) ? "- Skip a guide for a one-off. If a matching skill exists, follow it. A miss that will recur (you made it twice, or a person told you the rule) \u2192 follow `.claude/skills/skill-improver/SKILL.md` (`/skill-improver`): one sentence in the skill that owns it, in this change. Do not patch around it." : "- Skip a guide for a one-off. If a matching skill exists, follow it. Same miss twice \u2192 edit the skill, do not patch around it."
7048
+ !!worktree && existsSync13(join14(worktree, ".claude/skills/skill-improver/SKILL.md")) ? "- Skip a guide for a one-off. If a matching skill exists, follow it. A miss that will recur (you made it twice, or a person told you the rule) \u2192 follow `.claude/skills/skill-improver/SKILL.md` (`/skill-improver`): one sentence in the skill that owns it, in this change. Do not patch around it." : "- Skip a guide for a one-off. If a matching skill exists, follow it. Same miss twice \u2192 edit the skill, do not patch around it."
7030
7049
  ].filter(Boolean).join("\n");
7031
7050
  }
7032
7051
  function formatLongRunningDirective(opts) {
@@ -7454,8 +7473,8 @@ async function syncThreadBranchFromGit(threadId) {
7454
7473
  }
7455
7474
 
7456
7475
  // src/orchestrator/github-edge-watch.ts
7457
- import { existsSync as existsSync13, readFileSync as readFileSync8 } from "fs";
7458
- import { join as join14 } from "path";
7476
+ import { existsSync as existsSync14, readFileSync as readFileSync8 } from "fs";
7477
+ import { join as join15 } from "path";
7459
7478
 
7460
7479
  // src/orchestrator/github-edge.ts
7461
7480
  var GITHUB_EDGE_COOLDOWN_MS = 30 * 6e4;
@@ -7725,12 +7744,12 @@ var timer = null;
7725
7744
  var polling = false;
7726
7745
  var needsBaseline = true;
7727
7746
  function githubEdgeSnapshotPath() {
7728
- return join14(appDataDir(), "github-edge-watch.json");
7747
+ return join15(appDataDir(), "github-edge-watch.json");
7729
7748
  }
7730
7749
  function loadGithubEdgeSnapshot() {
7731
7750
  try {
7732
7751
  const path = githubEdgeSnapshotPath();
7733
- if (!existsSync13(path)) return emptyGithubEdgeSnapshot();
7752
+ if (!existsSync14(path)) return emptyGithubEdgeSnapshot();
7734
7753
  return coerceGithubEdgeSnapshot(JSON.parse(readFileSync8(path, "utf8")));
7735
7754
  } catch {
7736
7755
  return emptyGithubEdgeSnapshot();
@@ -8026,11 +8045,11 @@ function realDeps() {
8026
8045
  parentIdForThread,
8027
8046
  designatedId: designatedOrchestratorId,
8028
8047
  send: async (threadId, prompt) => {
8029
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-3I2FLEZL.js");
8048
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-EY6GCYQG.js");
8030
8049
  await getOrchestrator2().send(threadId, prompt, { followUp: "queue" });
8031
8050
  },
8032
8051
  startOrchestration: async (prompt) => {
8033
- const { startOrchestration: startOrchestration2 } = await import("./orchestrator-3I2FLEZL.js");
8052
+ const { startOrchestration: startOrchestration2 } = await import("./orchestrator-EY6GCYQG.js");
8034
8053
  const defaults = resolveOrchestratorDefaults();
8035
8054
  await startOrchestration2({
8036
8055
  goal: prompt,
@@ -8057,7 +8076,7 @@ function formatScheduledPrompt(name, prompt) {
8057
8076
  ${prompt}`;
8058
8077
  }
8059
8078
  async function defaultDeps() {
8060
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-3I2FLEZL.js");
8079
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-EY6GCYQG.js");
8061
8080
  const orch = getOrchestrator2();
8062
8081
  return {
8063
8082
  findThread: (id) => findThreadByRef(id),
@@ -8258,7 +8277,7 @@ ${item.prompt}`);
8258
8277
  }
8259
8278
  }
8260
8279
  async function defaultSend(id, prompt) {
8261
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-3I2FLEZL.js");
8280
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-EY6GCYQG.js");
8262
8281
  await getOrchestrator2().send(id, prompt, { followUp: "join" });
8263
8282
  }
8264
8283
  function armChatFollowUps() {
@@ -8415,7 +8434,7 @@ var Orchestrator = class {
8415
8434
  this.lightReconcileAt.set(repoPath, Date.now());
8416
8435
  for (const thread of listThreads()) {
8417
8436
  if (isGlobalThread(thread) || thread.repoPath !== repoPath) continue;
8418
- if (!existsSync14(thread.worktreePath)) {
8437
+ if (!existsSync15(thread.worktreePath)) {
8419
8438
  setStatus(thread.id, "broken", "Worktree missing on disk");
8420
8439
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
8421
8440
  }
@@ -8444,7 +8463,7 @@ var Orchestrator = class {
8444
8463
  }
8445
8464
  continue;
8446
8465
  }
8447
- if (!existsSync14(thread.worktreePath)) {
8466
+ if (!existsSync15(thread.worktreePath)) {
8448
8467
  setStatus(thread.id, "broken", "Worktree missing on disk");
8449
8468
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
8450
8469
  continue;
@@ -8483,7 +8502,7 @@ var Orchestrator = class {
8483
8502
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
8484
8503
  });
8485
8504
  }
8486
- const { autoCleanupOrphansEnabled } = await import("./app-settings-IA7ZZKWQ.js");
8505
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-GM4MJD2E.js");
8487
8506
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
8488
8507
  await cleanupOrphanWorktrees({ repoPaths });
8489
8508
  }
@@ -8873,7 +8892,7 @@ var Orchestrator = class {
8873
8892
  }
8874
8893
  await setup;
8875
8894
  if (skipSetup) return;
8876
- const { autoRunAfterSetupEnabled } = await import("./app-settings-IA7ZZKWQ.js");
8895
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-GM4MJD2E.js");
8877
8896
  if (autoRunAfterSetupEnabled()) {
8878
8897
  try {
8879
8898
  await this.startDev(threadId);
@@ -9172,7 +9191,10 @@ var Orchestrator = class {
9172
9191
  }
9173
9192
  thread = this.requireThread(threadId);
9174
9193
  const turnOrigin = thread.worktreePath?.trim() ? await resolveOriginRemote(thread.worktreePath).catch(() => null) : null;
9175
- const gitPrompt = expandCanonicalGitRequest(promptText, { forge: turnOrigin?.forge });
9194
+ const gitPrompt = expandCanonicalGitRequest(promptText, {
9195
+ forge: turnOrigin?.forge,
9196
+ worktreePath: thread.worktreePath
9197
+ });
9176
9198
  const expandedAttachments = openSteerTurnAttachments(this.openSteerPrompt.get(threadId), turnAttachments, autoContinue);
9177
9199
  const { agentPrompt: expandedPrompt } = expandComposerPrompt(
9178
9200
  thread.worktreePath,
@@ -9257,7 +9279,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
9257
9279
  }
9258
9280
  const isBrightsy = fresh.agent === "brightsy";
9259
9281
  const isOrchestration = isOrchestratorThread(fresh);
9260
- const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-IA7ZZKWQ.js");
9282
+ const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-GM4MJD2E.js");
9261
9283
  const gitAuthMode = getGithubGitAuthMode();
9262
9284
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
9263
9285
  githubSlug: turnOrigin?.forge === "github" ? turnOrigin.slug : await withTimeout(resolveGithubRepoSlug(fresh.worktreePath), 8e3, "resolveGithubRepoSlug").catch(() => null),
@@ -10598,7 +10620,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10598
10620
  if (Object.keys(patch).length === 0) continue;
10599
10621
  updateThread(t.id, patch);
10600
10622
  }
10601
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-IA7ZZKWQ.js");
10623
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-GM4MJD2E.js");
10602
10624
  const latest = this.requireThread(thread.id);
10603
10625
  if (!shouldAutoArchiveOnPrMerge({
10604
10626
  previousPrState: prevState || null,
@@ -10910,7 +10932,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10910
10932
  await runArchiveScript(thread.repoPath, thread.worktreePath);
10911
10933
  } catch {
10912
10934
  }
10913
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-IA7ZZKWQ.js");
10935
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-GM4MJD2E.js");
10914
10936
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
10915
10937
  await removeWorktreeDroppingLeftovers(thread, deleteBranch ? thread.branchName : void 0);
10916
10938
  }
@@ -10930,7 +10952,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10930
10952
  this.emit({ type: "status_changed", threadId: restored2.id, status: restored2.status });
10931
10953
  return restored2;
10932
10954
  }
10933
- if (!existsSync14(thread.worktreePath)) {
10955
+ if (!existsSync15(thread.worktreePath)) {
10934
10956
  if (isCowboyThread(thread) || isPrimaryCheckoutThread(thread)) {
10935
10957
  throw new Error(
10936
10958
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
@@ -11047,7 +11069,7 @@ async function startOrchestration(opts) {
11047
11069
  sourceRef: "default",
11048
11070
  ...createOpts
11049
11071
  }).catch(async () => {
11050
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-DA6SKIU5.js");
11072
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-IDX7LMBC.js");
11051
11073
  const repo = await resolveRepoRoot2(repoPath);
11052
11074
  const def = await resolveDefaultBranch2(repo);
11053
11075
  return orch.createThread({
@@ -11057,7 +11079,7 @@ async function startOrchestration(opts) {
11057
11079
  repoPath: repo
11058
11080
  });
11059
11081
  });
11060
- const { updateThread: upd } = await import("./thread-store-4YTOV2HL.js");
11082
+ const { updateThread: upd } = await import("./thread-store-CDFHHRXB.js");
11061
11083
  const updated = upd(thread.id, {
11062
11084
  sourceType: "orchestration",
11063
11085
  sourceRef: goal