@sideboard-ai/core 0.1.351 → 0.1.353

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 (76) 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 +37 -6
  8. package/dist/agents/claude-runner.js +16 -1
  9. package/dist/agents/cursor-runner.cjs +56 -12
  10. package/dist/agents/cursor-runner.js +2 -2
  11. package/dist/{agents-INTH7J3F.js → agents-5LFUHPSA.js} +9 -9
  12. package/dist/{agents-D5CL4CR4.js → agents-6B2HHICJ.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-YVN7L4KG.js → chunk-AF5K6GQU.js} +6 -1
  18. package/dist/{chunk-WB3G2LQO.js → chunk-BCNPZ7H2.js} +1 -1
  19. package/dist/chunk-EAV2ZF5S.js +858 -0
  20. package/dist/{chunk-SMSD6U3N.js → chunk-GA5MLYVG.js} +1 -1
  21. package/dist/{chunk-HISSQICH.js → chunk-HBRP2SHA.js} +3 -3
  22. package/dist/{chunk-7WPQAVS5.js → chunk-HMSXKV53.js} +150 -126
  23. package/dist/{chunk-DL4OHDBV.js → chunk-I6BKWSCT.js} +3 -3
  24. package/dist/{chunk-WJURGCBR.js → chunk-KSBJOWVO.js} +1 -1
  25. package/dist/{chunk-J4EA5SHF.js → chunk-LZ3TAKNJ.js} +3 -3
  26. package/dist/{chunk-F4RFFE2H.js → chunk-M426EW7O.js} +3 -3
  27. package/dist/{chunk-C3E2DGDF.js → chunk-MBQU6RE2.js} +6 -6
  28. package/dist/{chunk-UXAKH4AW.js → chunk-MX2XU4BS.js} +418 -71
  29. package/dist/{chunk-TCEUNSLX.js → chunk-NRGT7RMO.js} +1 -1
  30. package/dist/{chunk-M45WGODR.js → chunk-OCCUD5CK.js} +2 -2
  31. package/dist/{chunk-BDWVBEKN.js → chunk-PKH3DRA6.js} +153 -127
  32. package/dist/{chunk-YE7Z5WH3.js → chunk-QKNOKO2P.js} +1 -1
  33. package/dist/{chunk-VL6F2KRE.js → chunk-RMJXFABA.js} +8 -6
  34. package/dist/{chunk-FQ3JYUKI.js → chunk-SBUR2WCP.js} +2 -2
  35. package/dist/{chunk-AEEOYLVK.js → chunk-SWU5C3HQ.js} +6 -6
  36. package/dist/{chunk-UFUAIVNV.js → chunk-TB7SYXXS.js} +8 -6
  37. package/dist/{chunk-7ZD4OK6G.js → chunk-TDWE7INS.js} +1 -1
  38. package/dist/{chunk-WFX4ZVSZ.js → chunk-TRUNDXCE.js} +1 -1
  39. package/dist/{chunk-PXSWVZIL.js → chunk-UPJB6TFI.js} +2 -2
  40. package/dist/{chunk-37ZBEBP6.js → chunk-VZAICZHU.js} +3 -3
  41. package/dist/{chunk-FCKTBE26.js → chunk-WJQFWDGH.js} +1 -1
  42. package/dist/{chunk-SZY23KGS.js → chunk-WTT525MC.js} +3 -3
  43. package/dist/{chunk-BF6INES4.js → chunk-X52SO3DM.js} +1 -1
  44. package/dist/{chunk-B4EFQTMP.js → chunk-XB6NCBZK.js} +5 -5
  45. package/dist/{chunk-5TCMXEYL.js → chunk-YGXUIBIT.js} +3 -3
  46. package/dist/{chunk-AAKQU4UZ.js → chunk-Z3CGD5HC.js} +28 -10
  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-FWYWIHEW.js → conductor-2UOW2XBE.js} +6 -6
  50. package/dist/{conductor-W2X7QUKZ.js → conductor-6NYG2SZA.js} +6 -6
  51. package/dist/{coordinator-prompt-J57Q4Z4W.js → coordinator-prompt-K3WT5UVS.js} +4 -4
  52. package/dist/{coordinator-prompt-KIHNLENN.js → coordinator-prompt-ZP6AEETR.js} +4 -4
  53. package/dist/{global-workspace-WXDWFZAN.js → global-workspace-EFPSYP4N.js} +4 -4
  54. package/dist/{global-workspace-CGB5CY4U.js → global-workspace-EPVNFQVC.js} +4 -4
  55. package/dist/index.cjs +1414 -869
  56. package/dist/index.d.cts +116 -10
  57. package/dist/index.d.ts +116 -10
  58. package/dist/index.js +398 -315
  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 +1227 -802
  64. package/dist/mcp/run-stdio.js +342 -308
  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-MUD4FY7Q.js → orchestrator-UFHS2FOC.js} +12 -12
  68. package/dist/{orchestrator-DMEE7CEW.js → orchestrator-YCGWSIHF.js} +11 -11
  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-ZCTF4ECL.js → workspaces-KL4SZMJE.js} +4 -4
  72. package/dist/{workspaces-7DPHDXNY.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
  76. package/dist/chunk-SUZOPJZC.js +0 -430
@@ -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-AAKQU4UZ.js";
24
+ } from "./chunk-Z3CGD5HC.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-C3E2DGDF.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-HISSQICH.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-EAV2ZF5S.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-WXDWFZAN.js");
543
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-EFPSYP4N.js");
540
544
  if (isGlobalThread2(thread)) {
541
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-KIHNLENN.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,7 @@ async function removeWorktreeDroppingLeftovers(thread, deleteBranch) {
828
832
  }
829
833
 
830
834
  // src/git/agent-git-actions.ts
835
+ 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
836
  var AGENT_GIT_ACTIONS = [
832
837
  "commit-push",
833
838
  "create-draft",
@@ -993,6 +998,9 @@ function expandCanonicalGitRequest(prompt, opts) {
993
998
  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
999
  }
995
1000
  if (!expansion) return prompt;
1001
+ if (action === "merge" && (!base || isMainishPrBase(base)) && opts?.hasAnnounceSkill) {
1002
+ expansion = `${expansion} ${ANNOUNCE_AFTER_MERGE}`;
1003
+ }
996
1004
  if (expansionPushes(action, trimmed)) expansion = withPushReview(expansion);
997
1005
  return `${trimmed}
998
1006
 
@@ -1012,6 +1020,14 @@ function expansionPushes(action, prompt) {
1012
1020
  return prompt === "Address review comments." || FIX_CI_RE.test(prompt);
1013
1021
  }
1014
1022
 
1023
+ // src/git/announce-skill.ts
1024
+ import { existsSync } from "fs";
1025
+ import { join as join2 } from "path";
1026
+ function announceSkillPresent(worktreePath) {
1027
+ const root = worktreePath?.trim();
1028
+ return !!root && existsSync(join2(root, ".claude/skills/announce-on-x/SKILL.md"));
1029
+ }
1030
+
1015
1031
  // src/git/pr-merge-archive.ts
1016
1032
  function normalizePrState(state) {
1017
1033
  return (state ?? "").trim().toUpperCase();
@@ -1109,8 +1125,8 @@ function shouldAutoArchiveOnPrMerge(opts) {
1109
1125
 
1110
1126
  // src/store/setup-log.ts
1111
1127
  import { createHash } from "crypto";
1112
- import { existsSync, readFileSync, writeFileSync } from "fs";
1113
- import { join as join2 } from "path";
1128
+ import { existsSync as existsSync2, readFileSync, writeFileSync } from "fs";
1129
+ import { join as join3 } from "path";
1114
1130
  var EMPTY = {
1115
1131
  output: "",
1116
1132
  running: false,
@@ -1152,7 +1168,7 @@ function materialize(mem) {
1152
1168
  };
1153
1169
  }
1154
1170
  function setupLogPath(threadId) {
1155
- return join2(threadsDir(), `${threadId}.setup.log.json`);
1171
+ return join3(threadsDir(), `${threadId}.setup.log.json`);
1156
1172
  }
1157
1173
  function setupLogKeyForWorktree(worktreePath) {
1158
1174
  const norm = normalizeWorktreePath(worktreePath);
@@ -1200,7 +1216,7 @@ function schedulePersist(threadId) {
1200
1216
  }
1201
1217
  function loadFromDisk(threadId) {
1202
1218
  const path = setupLogPath(threadId);
1203
- if (!existsSync(path)) return null;
1219
+ if (!existsSync2(path)) return null;
1204
1220
  try {
1205
1221
  const raw = JSON.parse(readFileSync(path, "utf8"));
1206
1222
  return {
@@ -1261,8 +1277,8 @@ function finishSetupLog(threadId, exitCode, source) {
1261
1277
 
1262
1278
  // src/store/run-log.ts
1263
1279
  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";
1280
+ import { existsSync as existsSync3, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
1281
+ import { join as join4 } from "path";
1266
1282
  var EMPTY2 = {
1267
1283
  output: "",
1268
1284
  running: false,
@@ -1301,7 +1317,7 @@ function safeScriptToken(scriptName) {
1301
1317
  return token || "dev";
1302
1318
  }
1303
1319
  function runLogPath(key) {
1304
- return join3(threadsDir(), `${key}.run.log.json`);
1320
+ return join4(threadsDir(), `${key}.run.log.json`);
1305
1321
  }
1306
1322
  function runLogKeyForWorktree(worktreePath, scriptName) {
1307
1323
  const norm = normalizeWorktreePath(worktreePath);
@@ -1347,7 +1363,7 @@ function schedulePersist2(key) {
1347
1363
  }
1348
1364
  function loadFromDisk2(key) {
1349
1365
  const path = runLogPath(key);
1350
- if (!existsSync2(path)) return null;
1366
+ if (!existsSync3(path)) return null;
1351
1367
  try {
1352
1368
  const raw = JSON.parse(readFileSync2(path, "utf8"));
1353
1369
  return {
@@ -1409,8 +1425,8 @@ function flushRunLog(key) {
1409
1425
  }
1410
1426
 
1411
1427
  // src/git/orphan-cleanup.ts
1412
- import { existsSync as existsSync3, readdirSync, statSync } from "fs";
1413
- import { join as join4 } from "path";
1428
+ import { existsSync as existsSync4, readdirSync, statSync } from "fs";
1429
+ import { join as join5 } from "path";
1414
1430
  function isSideboardWorktreePath(path) {
1415
1431
  return path.includes("/.sideboard/worktrees/") || path.includes("/sideboard/workspaces/");
1416
1432
  }
@@ -1421,7 +1437,7 @@ async function findOrphanWorktrees(repoPaths) {
1421
1437
  repoPaths?.length ? repoPaths : threads.map((t) => t.repoPath).filter(Boolean)
1422
1438
  );
1423
1439
  const homeRoot = sideboardWorkspacesDir();
1424
- if (existsSync3(homeRoot)) {
1440
+ if (existsSync4(homeRoot)) {
1425
1441
  try {
1426
1442
  for (const entry of readdirSync(homeRoot, { withFileTypes: true })) {
1427
1443
  if (!entry.isDirectory()) continue;
@@ -1433,7 +1449,7 @@ async function findOrphanWorktrees(repoPaths) {
1433
1449
  const orphans = [];
1434
1450
  const seen = /* @__PURE__ */ new Set();
1435
1451
  for (const repoPath of repos) {
1436
- if (!repoPath || !existsSync3(repoPath)) continue;
1452
+ if (!repoPath || !existsSync4(repoPath)) continue;
1437
1453
  try {
1438
1454
  const wts = await listWorktrees(repoPath);
1439
1455
  for (const wt of wts) {
@@ -1454,12 +1470,12 @@ async function findOrphanWorktrees(repoPaths) {
1454
1470
  }
1455
1471
  try {
1456
1472
  const root = worktreesRoot(repoPath);
1457
- if (existsSync3(root)) {
1473
+ if (existsSync4(root)) {
1458
1474
  for (const entry of readdirSync(root, { withFileTypes: true })) {
1459
1475
  if (!entry.isDirectory()) continue;
1460
- const path = join4(root, entry.name).replace(/\/$/, "");
1476
+ const path = join5(root, entry.name).replace(/\/$/, "");
1461
1477
  if (known.has(path) || seen.has(path)) continue;
1462
- if (!existsSync3(join4(path, ".git"))) continue;
1478
+ if (!existsSync4(join5(path, ".git"))) continue;
1463
1479
  seen.add(path);
1464
1480
  let mtimeMs = 0;
1465
1481
  try {
@@ -1673,8 +1689,8 @@ async function applyThreadIntoMain(thread, opts) {
1673
1689
  }
1674
1690
 
1675
1691
  // src/git/clone-repo.ts
1676
- import { existsSync as existsSync4 } from "fs";
1677
- import { basename, join as join5 } from "path";
1692
+ import { existsSync as existsSync5 } from "fs";
1693
+ import { basename, join as join6 } from "path";
1678
1694
  import { execa as execa3 } from "execa";
1679
1695
  async function cloneRepoIntoSideboard(opts) {
1680
1696
  const url = opts.url.trim();
@@ -1685,8 +1701,8 @@ async function cloneRepoIntoSideboard(opts) {
1685
1701
  name = leaf || "repo";
1686
1702
  }
1687
1703
  name = name.replace(/[^a-zA-Z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "repo";
1688
- const dest = join5(sideboardReposDir(), name);
1689
- if (existsSync4(dest)) {
1704
+ const dest = join6(sideboardReposDir(), name);
1705
+ if (existsSync5(dest)) {
1690
1706
  const repoPath2 = await resolveRepoRoot(dest);
1691
1707
  const workspace2 = await addWorkspace(repoPath2);
1692
1708
  return { repoPath: repoPath2, workspace: workspace2 };
@@ -1712,9 +1728,9 @@ function isAdoptableRunScriptRequest(req) {
1712
1728
 
1713
1729
  // src/store/desktop-host.ts
1714
1730
  import { readFileSync as readFileSync3, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
1715
- import { join as join6 } from "path";
1731
+ import { join as join7 } from "path";
1716
1732
  function desktopHostPidPath() {
1717
- return join6(appDataDir(), "desktop-host.pid");
1733
+ return join7(appDataDir(), "desktop-host.pid");
1718
1734
  }
1719
1735
  function claimDesktopHost(pid = process.pid) {
1720
1736
  writeFileSync3(desktopHostPidPath(), `${pid}
@@ -2575,7 +2591,7 @@ function agentPurposeStamp(input) {
2575
2591
  }
2576
2592
 
2577
2593
  // src/threads/create.ts
2578
- import { existsSync as existsSync5 } from "fs";
2594
+ import { existsSync as existsSync6 } from "fs";
2579
2595
 
2580
2596
  // src/detect/detect.ts
2581
2597
  async function detectAgents() {
@@ -3388,7 +3404,7 @@ function reuseLiveThread(input, repoPath, match) {
3388
3404
  }
3389
3405
  async function createThread(input, _onSetupLine) {
3390
3406
  const repoPath = await resolveRepoRoot(input.repoPath);
3391
- if (!existsSync5(repoPath)) {
3407
+ if (!existsSync6(repoPath)) {
3392
3408
  throw new Error(`Repo not found: ${repoPath}`);
3393
3409
  }
3394
3410
  if (isRemovedWorkspace(repoPath)) throw new Error(`Project was removed: ${repoPath}`);
@@ -3408,7 +3424,7 @@ async function createThread(input, _onSetupLine) {
3408
3424
  const acpHarness = resolved.agent === "acp" ? input.acpHarness === "gemini" || input.acpHarness === "copilot" ? input.acpHarness : defaultAcpHarness() : void 0;
3409
3425
  await requireAgent(resolved.agent, { acpHarness });
3410
3426
  if (input.cowboy) {
3411
- const { cowboyModeEnabled } = await import("./app-settings-IA7ZZKWQ.js");
3427
+ const { cowboyModeEnabled } = await import("./app-settings-GM4MJD2E.js");
3412
3428
  if (!cowboyModeEnabled()) {
3413
3429
  throw new Error(
3414
3430
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -3468,7 +3484,7 @@ async function createThread(input, _onSetupLine) {
3468
3484
  let sourceIsFork = false;
3469
3485
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
3470
3486
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
3471
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-TX7BTTR2.js");
3487
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-5LEOMLQE.js");
3472
3488
  const task = await ensureAbleTimeTask({
3473
3489
  title: title?.trim() || "Untitled work",
3474
3490
  description: input.prompt?.trim() || void 0
@@ -3580,7 +3596,7 @@ async function createThread(input, _onSetupLine) {
3580
3596
  return readThread(thread.id) ?? thread;
3581
3597
  }
3582
3598
  async function listLinearIssues(agent, repoPath) {
3583
- const { getAdapter: getAdapter2 } = await import("./agents-INTH7J3F.js");
3599
+ const { getAdapter: getAdapter2 } = await import("./agents-5LFUHPSA.js");
3584
3600
  await requireAgent(agent, { requireLinear: true });
3585
3601
  const adapter = getAdapter2(agent);
3586
3602
  if (!adapter.listLinearIssues) {
@@ -3928,7 +3944,7 @@ function createLineCoalescer(onChunk, opts) {
3928
3944
 
3929
3945
  // src/store/turn-live.ts
3930
3946
  import {
3931
- existsSync as existsSync6,
3947
+ existsSync as existsSync7,
3932
3948
  renameSync,
3933
3949
  unlinkSync as unlinkSync2,
3934
3950
  writeFileSync as writeFileSync4,
@@ -4024,7 +4040,7 @@ function readTurnLiveParts(threadId) {
4024
4040
  }
4025
4041
  function readTurnLive(threadId) {
4026
4042
  const path = threadLivePath(threadId);
4027
- if (!existsSync6(path)) return null;
4043
+ if (!existsSync7(path)) return null;
4028
4044
  try {
4029
4045
  const raw = JSON.parse(readFileSync4(path, "utf8"));
4030
4046
  if (!raw || typeof raw.summary !== "string") return null;
@@ -4038,7 +4054,7 @@ function clearTurnLive(threadId) {
4038
4054
  if (buf?.timer) clearTimeout(buf.timer);
4039
4055
  buffers.delete(threadId);
4040
4056
  const path = threadLivePath(threadId);
4041
- if (!existsSync6(path)) return;
4057
+ if (!existsSync7(path)) return;
4042
4058
  try {
4043
4059
  unlinkSync2(path);
4044
4060
  } catch {
@@ -4292,26 +4308,26 @@ function createQuotaFailoverChat(from, fallbackAgent, limitText, opts) {
4292
4308
  import { execFileSync as execFileSync2 } from "child_process";
4293
4309
  import {
4294
4310
  copyFileSync,
4295
- existsSync as existsSync7,
4311
+ existsSync as existsSync8,
4296
4312
  mkdtempSync,
4297
4313
  readdirSync as readdirSync2,
4298
4314
  readFileSync as readFileSync5,
4299
4315
  rmSync as rmSync2
4300
4316
  } from "fs";
4301
4317
  import { tmpdir } from "os";
4302
- import { join as join7 } from "path";
4318
+ import { join as join8 } from "path";
4303
4319
  import { createRequire } from "module";
4304
- var CONDUCTOR_APP_SUPPORT = join7(
4320
+ var CONDUCTOR_APP_SUPPORT = join8(
4305
4321
  process.env.HOME ?? "",
4306
4322
  "Library",
4307
4323
  "Application Support",
4308
4324
  "com.conductor.app"
4309
4325
  );
4310
- var CONDUCTOR_DB = join7(CONDUCTOR_APP_SUPPORT, "conductor.db");
4311
- var CURSOR_SDK_STORE = join7(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
4326
+ var CONDUCTOR_DB = join8(CONDUCTOR_APP_SUPPORT, "conductor.db");
4327
+ var CURSOR_SDK_STORE = join8(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
4312
4328
  function thisModuleFile() {
4313
4329
  const cjsFile = typeof __filename !== "undefined" ? __filename : "";
4314
- return cjsFile || process.argv[1] || join7(process.cwd(), "package.json");
4330
+ return cjsFile || process.argv[1] || join8(process.cwd(), "package.json");
4315
4331
  }
4316
4332
  function openReadonlySqlite(file) {
4317
4333
  const req = createRequire(thisModuleFile());
@@ -4329,7 +4345,7 @@ function mapAgentType(raw) {
4329
4345
  return null;
4330
4346
  }
4331
4347
  function resolveConductorCursorAgentId(workspacePath) {
4332
- if (!workspacePath || !existsSync7(CURSOR_SDK_STORE)) return null;
4348
+ if (!workspacePath || !existsSync8(CURSOR_SDK_STORE)) return null;
4333
4349
  const normalized = workspacePath.replace(/\/$/, "");
4334
4350
  let best = null;
4335
4351
  let hashes;
@@ -4339,8 +4355,8 @@ function resolveConductorCursorAgentId(workspacePath) {
4339
4355
  return null;
4340
4356
  }
4341
4357
  for (const hash of hashes) {
4342
- const agentsFile = join7(CURSOR_SDK_STORE, hash, "agents.ndjson");
4343
- if (!existsSync7(agentsFile)) continue;
4358
+ const agentsFile = join8(CURSOR_SDK_STORE, hash, "agents.ndjson");
4359
+ if (!existsSync8(agentsFile)) continue;
4344
4360
  let text3;
4345
4361
  try {
4346
4362
  text3 = readFileSync5(agentsFile, "utf8");
@@ -4367,7 +4383,7 @@ function resolveConductorCursorAgentId(workspacePath) {
4367
4383
  return best?.agentId ?? null;
4368
4384
  }
4369
4385
  async function adoptThread(input) {
4370
- if (!existsSync7(input.worktreePath)) {
4386
+ if (!existsSync8(input.worktreePath)) {
4371
4387
  throw new Error(`Worktree not found: ${input.worktreePath}`);
4372
4388
  }
4373
4389
  const repoPath = await resolveRepoRoot(input.worktreePath);
@@ -4389,7 +4405,7 @@ async function adoptThread(input) {
4389
4405
  messages: input.messages ?? []
4390
4406
  });
4391
4407
  writeThread(thread);
4392
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-ZCTF4ECL.js");
4408
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-KL4SZMJE.js");
4393
4409
  await addWorkspace2(repoPath);
4394
4410
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-YQBN43QD.js");
4395
4411
  await ensureWorktreeSideboardIgnored(input.worktreePath);
@@ -4399,16 +4415,16 @@ function conductorDbPath() {
4399
4415
  return CONDUCTOR_DB;
4400
4416
  }
4401
4417
  function listConductorWorkspaces() {
4402
- if (!existsSync7(CONDUCTOR_DB)) {
4418
+ if (!existsSync8(CONDUCTOR_DB)) {
4403
4419
  throw new Error(`Conductor DB not found at ${CONDUCTOR_DB}`);
4404
4420
  }
4405
- const tmp = mkdtempSync(join7(tmpdir(), "sideboard-conductor-"));
4406
- const snapshot = join7(tmp, "conductor.db");
4421
+ const tmp = mkdtempSync(join8(tmpdir(), "sideboard-conductor-"));
4422
+ const snapshot = join8(tmp, "conductor.db");
4407
4423
  try {
4408
4424
  copyFileSync(CONDUCTOR_DB, snapshot);
4409
4425
  for (const suffix of ["-wal", "-shm"]) {
4410
4426
  const src = `${CONDUCTOR_DB}${suffix}`;
4411
- if (existsSync7(src)) {
4427
+ if (existsSync8(src)) {
4412
4428
  try {
4413
4429
  copyFileSync(src, `${snapshot}${suffix}`);
4414
4430
  } catch {
@@ -4490,16 +4506,16 @@ function listConductorWorkspaces() {
4490
4506
  }
4491
4507
  }
4492
4508
  function importConductorWorkspace(workspaceId) {
4493
- if (!existsSync7(CONDUCTOR_DB)) {
4509
+ if (!existsSync8(CONDUCTOR_DB)) {
4494
4510
  throw new Error(`Conductor DB not found at ${CONDUCTOR_DB}`);
4495
4511
  }
4496
- const tmp = mkdtempSync(join7(tmpdir(), "sideboard-conductor-"));
4497
- const snapshot = join7(tmp, "conductor.db");
4512
+ const tmp = mkdtempSync(join8(tmpdir(), "sideboard-conductor-"));
4513
+ const snapshot = join8(tmp, "conductor.db");
4498
4514
  try {
4499
4515
  copyFileSync(CONDUCTOR_DB, snapshot);
4500
4516
  for (const suffix of ["-wal", "-shm"]) {
4501
4517
  const src = `${CONDUCTOR_DB}${suffix}`;
4502
- if (existsSync7(src)) {
4518
+ if (existsSync8(src)) {
4503
4519
  try {
4504
4520
  copyFileSync(src, `${snapshot}${suffix}`);
4505
4521
  } catch {
@@ -4519,7 +4535,7 @@ function importConductorWorkspace(workspaceId) {
4519
4535
  ).get(workspaceId);
4520
4536
  if (!row) throw new Error(`Conductor workspace not found: ${workspaceId}`);
4521
4537
  const worktreePath = String(row.workspacePath);
4522
- if (!existsSync7(worktreePath)) {
4538
+ if (!existsSync8(worktreePath)) {
4523
4539
  throw new Error(`Conductor worktree missing on disk: ${worktreePath}`);
4524
4540
  }
4525
4541
  let sessionId = null;
@@ -4590,7 +4606,7 @@ async function importConductorWorkspaceAsync(workspaceId) {
4590
4606
  }
4591
4607
 
4592
4608
  // src/threads/stack-layers.ts
4593
- import { existsSync as existsSync8 } from "fs";
4609
+ import { existsSync as existsSync9 } from "fs";
4594
4610
  function stackIdFrom(stack) {
4595
4611
  if (stack.stackNumber != null) return `gh-stack-${stack.stackNumber}`;
4596
4612
  const key = stack.layers.map((l) => l.branchName).join("|");
@@ -4653,7 +4669,7 @@ async function openStackLayer(input, _onSetupLine) {
4653
4669
  let createdWorktree = false;
4654
4670
  const trees = await listWorktrees(repoPath);
4655
4671
  const checkedOut = trees.find((w) => w.branch === branchName);
4656
- if (checkedOut?.path && existsSync8(checkedOut.path)) {
4672
+ if (checkedOut?.path && existsSync9(checkedOut.path)) {
4657
4673
  if (input.reuseExistingWorktree !== false) {
4658
4674
  worktreePath = checkedOut.path;
4659
4675
  } else {
@@ -4795,7 +4811,7 @@ async function initStackFromThread(input, onSetupLine) {
4795
4811
  async function createPrStack(input, onSetupLine) {
4796
4812
  await requireAgent(input.agent);
4797
4813
  const repoPath = await resolveRepoRoot(input.repoPath);
4798
- if (!existsSync8(repoPath)) throw new Error(`Repo not found: ${repoPath}`);
4814
+ if (!existsSync9(repoPath)) throw new Error(`Repo not found: ${repoPath}`);
4799
4815
  if (!input.branches.length) throw new Error("At least one branch name required");
4800
4816
  const status = await detectGhStack(repoPath);
4801
4817
  if (!status.available) throw new Error(status.reason);
@@ -4862,7 +4878,7 @@ async function createPrStack(input, onSetupLine) {
4862
4878
  }
4863
4879
  }
4864
4880
  const claimed = new Set(threads.map((t) => t.worktreePath));
4865
- if (!claimed.has(bootstrap.worktreePath) && existsSync8(bootstrap.worktreePath)) {
4881
+ if (!claimed.has(bootstrap.worktreePath) && existsSync9(bootstrap.worktreePath)) {
4866
4882
  try {
4867
4883
  await removeWorktree(repoPath, bootstrap.worktreePath, {
4868
4884
  deleteBranch: bootstrap.branchName
@@ -4887,7 +4903,7 @@ function stackAgentDefaultsFrom(input) {
4887
4903
  import { randomBytes } from "crypto";
4888
4904
  import { unlinkSync as unlinkSync3, writeFileSync as writeFileSync5 } from "fs";
4889
4905
  import { tmpdir as tmpdir2 } from "os";
4890
- import { join as join8 } from "path";
4906
+ import { join as join9 } from "path";
4891
4907
  async function lookupGithubGraphqlReset(cwd) {
4892
4908
  const result = await gh(["api", "rate_limit"], cwd, { reject: false });
4893
4909
  if (result.exitCode !== 0 || !result.stdout.trim()) return void 0;
@@ -4915,7 +4931,7 @@ async function formatPrCreateFailure(raw, cwd, ctx) {
4915
4931
  }
4916
4932
  async function createCursorPullRequest(worktreePath, slug, opts) {
4917
4933
  const bodyText = (opts.body ?? opts.title).trim() || opts.title;
4918
- const bodyFile = join8(
4934
+ const bodyFile = join9(
4919
4935
  tmpdir2(),
4920
4936
  `sideboard-pr-body-${process.pid}-${randomBytes(6).toString("hex")}.md`
4921
4937
  );
@@ -4957,7 +4973,7 @@ async function createOrUpdatePr(worktreePath, opts) {
4957
4973
  const headRef = ghHeadRef(slug, opts.head);
4958
4974
  const branchOnly = opts.head.trim().replace(/^refs\/heads\//, "");
4959
4975
  const bodyText = clampGithubPrBody(opts.body ?? opts.title);
4960
- const bodyFile = join8(
4976
+ const bodyFile = join9(
4961
4977
  tmpdir2(),
4962
4978
  `sideboard-pr-body-${process.pid}-${randomBytes(6).toString("hex")}.md`
4963
4979
  );
@@ -5052,10 +5068,10 @@ async function createOrUpdatePrWithBodyFile(worktreePath, opts) {
5052
5068
  }
5053
5069
 
5054
5070
  // 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";
5071
+ import { existsSync as existsSync10, mkdirSync, readFileSync as readFileSync6, statSync as statSync2, writeFileSync as writeFileSync6 } from "fs";
5072
+ import { dirname as dirname2, join as join10 } from "path";
5057
5073
  async function inspectGitWorktree(worktreePath) {
5058
- if (!worktreePath || !existsSync9(worktreePath)) return "missing_worktree";
5074
+ if (!worktreePath || !existsSync10(worktreePath)) return "missing_worktree";
5059
5075
  const check = await git(["rev-parse", "--is-inside-work-tree"], worktreePath, {
5060
5076
  reject: false
5061
5077
  });
@@ -5063,7 +5079,7 @@ async function inspectGitWorktree(worktreePath) {
5063
5079
  return "ok";
5064
5080
  }
5065
5081
  async function initializeGitRepository(worktreePath) {
5066
- if (!worktreePath || !existsSync9(worktreePath)) {
5082
+ if (!worktreePath || !existsSync10(worktreePath)) {
5067
5083
  throw new Error("Worktree not found");
5068
5084
  }
5069
5085
  const status = await inspectGitWorktree(worktreePath);
@@ -5199,7 +5215,7 @@ new file mode 100644
5199
5215
  };
5200
5216
  }
5201
5217
  async function untrackedPatch(worktreePath, path, maxHunk) {
5202
- const abs = join9(worktreePath, path);
5218
+ const abs = join10(worktreePath, path);
5203
5219
  try {
5204
5220
  const st = statSync2(abs);
5205
5221
  if (st.isFile() && st.size > maxHunk) {
@@ -5671,8 +5687,8 @@ async function getDiff(worktreePath, repoPath, opts) {
5671
5687
  }
5672
5688
  function statWorktreePath(worktreePath, relativePath) {
5673
5689
  assertSafeRelativePath(relativePath);
5674
- const abs = join9(worktreePath, relativePath);
5675
- if (!existsSync9(abs)) return "missing";
5690
+ const abs = join10(worktreePath, relativePath);
5691
+ if (!existsSync10(abs)) return "missing";
5676
5692
  const st = statSync2(abs);
5677
5693
  if (st.isDirectory()) return "dir";
5678
5694
  if (st.isFile()) return "file";
@@ -5713,7 +5729,7 @@ var DEFAULT_UPLOAD_MAX_BYTES = 5e7;
5713
5729
  function readWorktreeFileForUpload(worktreePath, relativePath, opts) {
5714
5730
  assertSafeRelativePath(relativePath);
5715
5731
  const maxBytes = opts?.maxBytes ?? DEFAULT_UPLOAD_MAX_BYTES;
5716
- const abs = join9(worktreePath, relativePath);
5732
+ const abs = join10(worktreePath, relativePath);
5717
5733
  const st = statSync2(abs);
5718
5734
  if (!st.isFile()) {
5719
5735
  throw new Error(`Not a file: ${relativePath}`);
@@ -5733,7 +5749,7 @@ function readWorktreeFileForUpload(worktreePath, relativePath, opts) {
5733
5749
  function readWorktreeFile(worktreePath, relativePath, opts) {
5734
5750
  assertSafeRelativePath(relativePath);
5735
5751
  const maxBytes = opts?.maxBytes ?? 2e5;
5736
- const abs = join9(worktreePath, relativePath);
5752
+ const abs = join10(worktreePath, relativePath);
5737
5753
  const st = statSync2(abs);
5738
5754
  if (!st.isFile()) {
5739
5755
  throw new Error(`Not a file: ${relativePath}`);
@@ -5781,7 +5797,7 @@ function assertSafeRelativePath(relativePath) {
5781
5797
  }
5782
5798
  function writeWorktreeFile(worktreePath, relativePath, content) {
5783
5799
  assertSafeRelativePath(relativePath);
5784
- const abs = join9(worktreePath, relativePath);
5800
+ const abs = join10(worktreePath, relativePath);
5785
5801
  mkdirSync(dirname2(abs), { recursive: true });
5786
5802
  writeFileSync6(abs, content, "utf8");
5787
5803
  return { path: relativePath };
@@ -6006,13 +6022,13 @@ async function confirmLand(thread, opts) {
6006
6022
 
6007
6023
  // src/diff/read-worktree-tail.ts
6008
6024
  import { closeSync, fstatSync, openSync, readSync } from "fs";
6009
- import { join as join10 } from "path";
6025
+ import { join as join11 } from "path";
6010
6026
  var WORKTREE_TAIL_BYTES = 2e5;
6011
6027
  function readWorktreeFileTail(worktreePath, relativePath, maxBytes = WORKTREE_TAIL_BYTES) {
6012
6028
  if (!relativePath || relativePath.includes("..") || relativePath.startsWith("/")) {
6013
6029
  throw new Error("Invalid path");
6014
6030
  }
6015
- const abs = join10(worktreePath, relativePath);
6031
+ const abs = join11(worktreePath, relativePath);
6016
6032
  const fd = openSync(abs, "r");
6017
6033
  try {
6018
6034
  const st = fstatSync(fd);
@@ -6044,9 +6060,9 @@ function readWorktreeFileTail(worktreePath, relativePath, maxBytes = WORKTREE_TA
6044
6060
  }
6045
6061
 
6046
6062
  // src/skills/discover.ts
6047
- import { existsSync as existsSync10, readdirSync as readdirSync3, readFileSync as readFileSync7, statSync as statSync3 } from "fs";
6063
+ import { existsSync as existsSync11, readdirSync as readdirSync3, readFileSync as readFileSync7, statSync as statSync3 } from "fs";
6048
6064
  import { homedir } from "os";
6049
- import { join as join11 } from "path";
6065
+ import { join as join12 } from "path";
6050
6066
 
6051
6067
  // src/skills/bundled/long-running.ts
6052
6068
  var LONG_RUNNING_SKILL_COMMAND = "long-running";
@@ -6206,7 +6222,7 @@ function readSkill(skillMd, source) {
6206
6222
  }
6207
6223
  }
6208
6224
  function scanSkillsDir(dir, source, out) {
6209
- if (!existsSync10(dir)) return;
6225
+ if (!existsSync11(dir)) return;
6210
6226
  let entries;
6211
6227
  try {
6212
6228
  entries = readdirSync3(dir);
@@ -6215,8 +6231,8 @@ function scanSkillsDir(dir, source, out) {
6215
6231
  }
6216
6232
  for (const entry of entries) {
6217
6233
  if (entry.startsWith(".")) continue;
6218
- const skillMd = join11(dir, entry, "SKILL.md");
6219
- if (!existsSync10(skillMd)) continue;
6234
+ const skillMd = join12(dir, entry, "SKILL.md");
6235
+ if (!existsSync11(skillMd)) continue;
6220
6236
  try {
6221
6237
  if (!statSync3(skillMd).isFile()) continue;
6222
6238
  } catch {
@@ -6227,7 +6243,7 @@ function scanSkillsDir(dir, source, out) {
6227
6243
  }
6228
6244
  }
6229
6245
  function scanClaudePluginSkills(pluginsRoot, out) {
6230
- if (!existsSync10(pluginsRoot)) return;
6246
+ if (!existsSync11(pluginsRoot)) return;
6231
6247
  const walk = (dir, depth, lookingForSkillsDir) => {
6232
6248
  if (depth > 7) return;
6233
6249
  let entries;
@@ -6237,12 +6253,12 @@ function scanClaudePluginSkills(pluginsRoot, out) {
6237
6253
  return;
6238
6254
  }
6239
6255
  if (lookingForSkillsDir && entries.includes("SKILL.md")) {
6240
- const skill = readSkill(join11(dir, "SKILL.md"), "cli");
6256
+ const skill = readSkill(join12(dir, "SKILL.md"), "cli");
6241
6257
  if (skill) out.push(skill);
6242
6258
  }
6243
6259
  for (const entry of entries) {
6244
6260
  if (entry === "node_modules" || entry === ".git") continue;
6245
- const full = join11(dir, entry);
6261
+ const full = join12(dir, entry);
6246
6262
  try {
6247
6263
  if (!statSync3(full).isDirectory()) continue;
6248
6264
  } catch {
@@ -6262,17 +6278,17 @@ function discoverSkills(worktreePath) {
6262
6278
  const home = homedir();
6263
6279
  const collected = [];
6264
6280
  for (const rel of [".claude/skills", ".cursor/skills", ".sideboard/skills", ".brightsy/skills", "skills"]) {
6265
- scanSkillsDir(join11(worktreePath, rel), "workspace", collected);
6281
+ scanSkillsDir(join12(worktreePath, rel), "workspace", collected);
6266
6282
  }
6267
6283
  for (const abs of [
6268
- join11(home, ".claude/skills"),
6269
- join11(home, ".cursor/skills"),
6270
- join11(home, ".sideboard/skills"),
6271
- join11(home, ".brightsy/skills")
6284
+ join12(home, ".claude/skills"),
6285
+ join12(home, ".cursor/skills"),
6286
+ join12(home, ".sideboard/skills"),
6287
+ join12(home, ".brightsy/skills")
6272
6288
  ]) {
6273
6289
  scanSkillsDir(abs, "user", collected);
6274
6290
  }
6275
- scanClaudePluginSkills(join11(home, ".claude/plugins"), collected);
6291
+ scanClaudePluginSkills(join12(home, ".claude/plugins"), collected);
6276
6292
  collected.push(...bundledSkills());
6277
6293
  const rank = {
6278
6294
  workspace: 0,
@@ -6574,7 +6590,11 @@ function promptForJoinedSteer(input) {
6574
6590
  }
6575
6591
  const { agentPrompt: expandedLatest } = expandComposerPrompt(
6576
6592
  input.worktreePath,
6577
- expandCanonicalGitRequest(input.latestPrompt, { forge: input.gitForge }),
6593
+ expandCanonicalGitRequest(input.latestPrompt, {
6594
+ forge: input.gitForge,
6595
+ worktreePath: input.worktreePath,
6596
+ hasAnnounceSkill: announceSkillPresent(input.worktreePath)
6597
+ }),
6578
6598
  { attachments: latestAttachments }
6579
6599
  );
6580
6600
  return input.expandedPrompt && input.agentPrompt.endsWith(input.expandedPrompt) ? input.agentPrompt.slice(0, -input.expandedPrompt.length) + expandedLatest : `${input.agentPrompt}
@@ -6599,10 +6619,10 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6599
6619
  throw new Error(`Thread is archived: ${thread.id}`);
6600
6620
  }
6601
6621
  const requested = opts?.followUp;
6602
- const join15 = requested === "join";
6622
+ const join16 = requested === "join";
6603
6623
  const followUp = resolveSendFollowUp(
6604
6624
  current,
6605
- join15 ? "steer" : requested
6625
+ join16 ? "steer" : requested
6606
6626
  );
6607
6627
  const explicit = opts?.attachments;
6608
6628
  const consumed = explicit !== void 0 ? { attachments: current.attachments, consumed: explicit } : consumeComposerAttachments(current);
@@ -6611,7 +6631,7 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6611
6631
  const draft = host.openSteerPrompt.get(current.id);
6612
6632
  const queuedHead = !inFlightEarly && current.status === "queued" && current.queue.length > 0 ? current.queue[0] : null;
6613
6633
  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;
6634
+ const unanswered = followUp === "steer" && !agentHasRepliedEarly && (!join16 || joinCanMerge) ? draft?.text ?? (inFlightEarly ? trailingUnansweredUserText(current.messages) : queuedHead) : null;
6615
6635
  if (unanswered != null && (draft ? !draft.spawned : queuedHead != null)) {
6616
6636
  clearSendBookkeeping(host, thread.id);
6617
6637
  const combined = joinSteerPrompt(unanswered, prompt);
@@ -6663,7 +6683,7 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6663
6683
  clearSendBookkeeping(host, thread.id);
6664
6684
  const inFlight = host.activeTurns.has(thread.id) || host.startingTurns.has(thread.id) || current.status === "running";
6665
6685
  shouldSteer = sendFollowUpInterrupts(
6666
- join15 ? "join" : followUp,
6686
+ join16 ? "join" : followUp,
6667
6687
  inFlight || current.queue.length > 0
6668
6688
  );
6669
6689
  const patch = queued;
@@ -6689,8 +6709,8 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6689
6709
  }
6690
6710
 
6691
6711
  // src/agents/instructions.ts
6692
- import { existsSync as existsSync12 } from "fs";
6693
- import { join as join13 } from "path";
6712
+ import { existsSync as existsSync13 } from "fs";
6713
+ import { join as join14 } from "path";
6694
6714
 
6695
6715
  // src/agents/forge-git-directives.ts
6696
6716
  function formatCursorGitDirective(slug) {
@@ -6715,8 +6735,8 @@ function formatEntireGitDirective(slug) {
6715
6735
  }
6716
6736
 
6717
6737
  // src/skills/detached-job-path.ts
6718
- import { existsSync as existsSync11 } from "fs";
6719
- import { dirname as dirname3, join as join12 } from "path";
6738
+ import { existsSync as existsSync12 } from "fs";
6739
+ import { dirname as dirname3, join as join13 } from "path";
6720
6740
  import { fileURLToPath } from "url";
6721
6741
  var DETACHED_JOB_FILENAMES = ["detached-job.cjs", "detached-job.js"];
6722
6742
  function compiledModuleDir() {
@@ -6733,8 +6753,8 @@ function compiledModuleDir() {
6733
6753
  }
6734
6754
  function detachedJobScriptIn(dir) {
6735
6755
  for (const name of DETACHED_JOB_FILENAMES) {
6736
- const script = join12(dir, "scripts", name);
6737
- if (existsSync11(script)) return script;
6756
+ const script = join13(dir, "scripts", name);
6757
+ if (existsSync12(script)) return script;
6738
6758
  }
6739
6759
  return null;
6740
6760
  }
@@ -6858,6 +6878,7 @@ function formatWorktreeDirective(thread, opts) {
6858
6878
  lines.push(
6859
6879
  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
6880
  );
6881
+ 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
6882
  if (thread.prUrl) {
6862
6883
  lines.push(
6863
6884
  `- A PR already exists (${thread.prUrl}). Update it (push + edit title/body if the purpose drifted) instead of opening a duplicate.`
@@ -6884,6 +6905,7 @@ function formatWorktreeDirective(thread, opts) {
6884
6905
  );
6885
6906
  lines.push("");
6886
6907
  lines.push(formatDevAccessHint(opts?.activeRuns));
6908
+ lines.push(formatComputerUseHint(computerUseEnabled()));
6887
6909
  lines.push("");
6888
6910
  lines.push(
6889
6911
  "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 +7039,16 @@ function formatPrGateDirective() {
7017
7039
  }
7018
7040
  function formatProcessGuideDirective(opts) {
7019
7041
  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"));
7042
+ const hasGraphSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/graph-engineering/SKILL.md"));
7043
+ const hasReviewSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/review/SKILL.md"));
7044
+ const hasInstallSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/worktree-install/SKILL.md"));
7023
7045
  return [
7024
7046
  "Process guides (recurring work only):",
7025
7047
  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
7048
  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
7049
  "- 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
7050
  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."
7051
+ !!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
7052
  ].filter(Boolean).join("\n");
7031
7053
  }
7032
7054
  function formatLongRunningDirective(opts) {
@@ -7454,8 +7476,8 @@ async function syncThreadBranchFromGit(threadId) {
7454
7476
  }
7455
7477
 
7456
7478
  // src/orchestrator/github-edge-watch.ts
7457
- import { existsSync as existsSync13, readFileSync as readFileSync8 } from "fs";
7458
- import { join as join14 } from "path";
7479
+ import { existsSync as existsSync14, readFileSync as readFileSync8 } from "fs";
7480
+ import { join as join15 } from "path";
7459
7481
 
7460
7482
  // src/orchestrator/github-edge.ts
7461
7483
  var GITHUB_EDGE_COOLDOWN_MS = 30 * 6e4;
@@ -7725,12 +7747,12 @@ var timer = null;
7725
7747
  var polling = false;
7726
7748
  var needsBaseline = true;
7727
7749
  function githubEdgeSnapshotPath() {
7728
- return join14(appDataDir(), "github-edge-watch.json");
7750
+ return join15(appDataDir(), "github-edge-watch.json");
7729
7751
  }
7730
7752
  function loadGithubEdgeSnapshot() {
7731
7753
  try {
7732
7754
  const path = githubEdgeSnapshotPath();
7733
- if (!existsSync13(path)) return emptyGithubEdgeSnapshot();
7755
+ if (!existsSync14(path)) return emptyGithubEdgeSnapshot();
7734
7756
  return coerceGithubEdgeSnapshot(JSON.parse(readFileSync8(path, "utf8")));
7735
7757
  } catch {
7736
7758
  return emptyGithubEdgeSnapshot();
@@ -8026,11 +8048,11 @@ function realDeps() {
8026
8048
  parentIdForThread,
8027
8049
  designatedId: designatedOrchestratorId,
8028
8050
  send: async (threadId, prompt) => {
8029
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-MUD4FY7Q.js");
8051
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-UFHS2FOC.js");
8030
8052
  await getOrchestrator2().send(threadId, prompt, { followUp: "queue" });
8031
8053
  },
8032
8054
  startOrchestration: async (prompt) => {
8033
- const { startOrchestration: startOrchestration2 } = await import("./orchestrator-MUD4FY7Q.js");
8055
+ const { startOrchestration: startOrchestration2 } = await import("./orchestrator-UFHS2FOC.js");
8034
8056
  const defaults = resolveOrchestratorDefaults();
8035
8057
  await startOrchestration2({
8036
8058
  goal: prompt,
@@ -8057,7 +8079,7 @@ function formatScheduledPrompt(name, prompt) {
8057
8079
  ${prompt}`;
8058
8080
  }
8059
8081
  async function defaultDeps() {
8060
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-MUD4FY7Q.js");
8082
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-UFHS2FOC.js");
8061
8083
  const orch = getOrchestrator2();
8062
8084
  return {
8063
8085
  findThread: (id) => findThreadByRef(id),
@@ -8258,7 +8280,7 @@ ${item.prompt}`);
8258
8280
  }
8259
8281
  }
8260
8282
  async function defaultSend(id, prompt) {
8261
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-MUD4FY7Q.js");
8283
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-UFHS2FOC.js");
8262
8284
  await getOrchestrator2().send(id, prompt, { followUp: "join" });
8263
8285
  }
8264
8286
  function armChatFollowUps() {
@@ -8415,7 +8437,7 @@ var Orchestrator = class {
8415
8437
  this.lightReconcileAt.set(repoPath, Date.now());
8416
8438
  for (const thread of listThreads()) {
8417
8439
  if (isGlobalThread(thread) || thread.repoPath !== repoPath) continue;
8418
- if (!existsSync14(thread.worktreePath)) {
8440
+ if (!existsSync15(thread.worktreePath)) {
8419
8441
  setStatus(thread.id, "broken", "Worktree missing on disk");
8420
8442
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
8421
8443
  }
@@ -8444,7 +8466,7 @@ var Orchestrator = class {
8444
8466
  }
8445
8467
  continue;
8446
8468
  }
8447
- if (!existsSync14(thread.worktreePath)) {
8469
+ if (!existsSync15(thread.worktreePath)) {
8448
8470
  setStatus(thread.id, "broken", "Worktree missing on disk");
8449
8471
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
8450
8472
  continue;
@@ -8483,7 +8505,7 @@ var Orchestrator = class {
8483
8505
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
8484
8506
  });
8485
8507
  }
8486
- const { autoCleanupOrphansEnabled } = await import("./app-settings-IA7ZZKWQ.js");
8508
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-GM4MJD2E.js");
8487
8509
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
8488
8510
  await cleanupOrphanWorktrees({ repoPaths });
8489
8511
  }
@@ -8873,7 +8895,7 @@ var Orchestrator = class {
8873
8895
  }
8874
8896
  await setup;
8875
8897
  if (skipSetup) return;
8876
- const { autoRunAfterSetupEnabled } = await import("./app-settings-IA7ZZKWQ.js");
8898
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-GM4MJD2E.js");
8877
8899
  if (autoRunAfterSetupEnabled()) {
8878
8900
  try {
8879
8901
  await this.startDev(threadId);
@@ -9172,7 +9194,11 @@ var Orchestrator = class {
9172
9194
  }
9173
9195
  thread = this.requireThread(threadId);
9174
9196
  const turnOrigin = thread.worktreePath?.trim() ? await resolveOriginRemote(thread.worktreePath).catch(() => null) : null;
9175
- const gitPrompt = expandCanonicalGitRequest(promptText, { forge: turnOrigin?.forge });
9197
+ const gitPrompt = expandCanonicalGitRequest(promptText, {
9198
+ forge: turnOrigin?.forge,
9199
+ worktreePath: thread.worktreePath,
9200
+ hasAnnounceSkill: announceSkillPresent(thread.worktreePath)
9201
+ });
9176
9202
  const expandedAttachments = openSteerTurnAttachments(this.openSteerPrompt.get(threadId), turnAttachments, autoContinue);
9177
9203
  const { agentPrompt: expandedPrompt } = expandComposerPrompt(
9178
9204
  thread.worktreePath,
@@ -9257,7 +9283,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
9257
9283
  }
9258
9284
  const isBrightsy = fresh.agent === "brightsy";
9259
9285
  const isOrchestration = isOrchestratorThread(fresh);
9260
- const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-IA7ZZKWQ.js");
9286
+ const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-GM4MJD2E.js");
9261
9287
  const gitAuthMode = getGithubGitAuthMode();
9262
9288
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
9263
9289
  githubSlug: turnOrigin?.forge === "github" ? turnOrigin.slug : await withTimeout(resolveGithubRepoSlug(fresh.worktreePath), 8e3, "resolveGithubRepoSlug").catch(() => null),
@@ -10598,7 +10624,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10598
10624
  if (Object.keys(patch).length === 0) continue;
10599
10625
  updateThread(t.id, patch);
10600
10626
  }
10601
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-IA7ZZKWQ.js");
10627
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-GM4MJD2E.js");
10602
10628
  const latest = this.requireThread(thread.id);
10603
10629
  if (!shouldAutoArchiveOnPrMerge({
10604
10630
  previousPrState: prevState || null,
@@ -10910,7 +10936,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10910
10936
  await runArchiveScript(thread.repoPath, thread.worktreePath);
10911
10937
  } catch {
10912
10938
  }
10913
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-IA7ZZKWQ.js");
10939
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-GM4MJD2E.js");
10914
10940
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
10915
10941
  await removeWorktreeDroppingLeftovers(thread, deleteBranch ? thread.branchName : void 0);
10916
10942
  }
@@ -10930,7 +10956,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10930
10956
  this.emit({ type: "status_changed", threadId: restored2.id, status: restored2.status });
10931
10957
  return restored2;
10932
10958
  }
10933
- if (!existsSync14(thread.worktreePath)) {
10959
+ if (!existsSync15(thread.worktreePath)) {
10934
10960
  if (isCowboyThread(thread) || isPrimaryCheckoutThread(thread)) {
10935
10961
  throw new Error(
10936
10962
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
@@ -11047,7 +11073,7 @@ async function startOrchestration(opts) {
11047
11073
  sourceRef: "default",
11048
11074
  ...createOpts
11049
11075
  }).catch(async () => {
11050
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-DA6SKIU5.js");
11076
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-IDX7LMBC.js");
11051
11077
  const repo = await resolveRepoRoot2(repoPath);
11052
11078
  const def = await resolveDefaultBranch2(repo);
11053
11079
  return orch.createThread({
@@ -11057,7 +11083,7 @@ async function startOrchestration(opts) {
11057
11083
  repoPath: repo
11058
11084
  });
11059
11085
  });
11060
- const { updateThread: upd } = await import("./thread-store-4YTOV2HL.js");
11086
+ const { updateThread: upd } = await import("./thread-store-CDFHHRXB.js");
11061
11087
  const updated = upd(thread.id, {
11062
11088
  sourceType: "orchestration",
11063
11089
  sourceRef: goal