@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
@@ -7,6 +7,7 @@ import {
7
7
  SIDEBOARD_THREAD_ID_ENV,
8
8
  adjustBrightsyTurnExit,
9
9
  applyAgentRunnerHeapEnv,
10
+ formatComputerUseHint,
10
11
  getAdapter,
11
12
  isSessionQuotaLimit,
12
13
  packagedMcpDir,
@@ -14,7 +15,7 @@ import {
14
15
  parseSessionQuotaResetAt,
15
16
  planModeTurnInstruction,
16
17
  resolveQuotaFallbackAgent
17
- } from "./chunk-5AHWUJRT.js";
18
+ } from "./chunk-PR5TOSRD.js";
18
19
  import {
19
20
  applyWorktreePkgCacheEnv,
20
21
  askBlockStillWaiting,
@@ -54,7 +55,7 @@ import {
54
55
  worktreeDevProcessKey,
55
56
  worktreeRunProcessKey,
56
57
  worktreeSetupProcessKey
57
- } from "./chunk-MANERA6F.js";
58
+ } from "./chunk-SWU5C3HQ.js";
58
59
  import {
59
60
  applyAgentEvent,
60
61
  clipAgentEventForPaint,
@@ -88,11 +89,11 @@ import {
88
89
  import {
89
90
  formatOptionalServicesDirectiveForTurn,
90
91
  formatOptionalServicesReminderForTurn
91
- } from "./chunk-WJURGCBR.js";
92
+ } from "./chunk-KSBJOWVO.js";
92
93
  import {
93
94
  defaultAcpHarness,
94
95
  detectAcpHarness
95
- } from "./chunk-BF6INES4.js";
96
+ } from "./chunk-X52SO3DM.js";
96
97
  import {
97
98
  extractPresentedPlan,
98
99
  isPresentPlanToolName,
@@ -125,7 +126,7 @@ import {
125
126
  stageAbsolutePathsAsAttachments,
126
127
  stageBuffersAsAttachments,
127
128
  syncWorkspacesFromThreads
128
- } from "./chunk-EZ2MUWNW.js";
129
+ } from "./chunk-WTT525MC.js";
129
130
  import {
130
131
  addPrStackLayer,
131
132
  allocateTeamSlug,
@@ -176,7 +177,7 @@ import {
176
177
  resolveRepoRoot,
177
178
  switchWorktreeBranch,
178
179
  withRepoGitLock
179
- } from "./chunk-VHQ6OG3U.js";
180
+ } from "./chunk-ZHYFRRPN.js";
180
181
  import {
181
182
  issueActivityKind
182
183
  } from "./chunk-OYRN356W.js";
@@ -223,7 +224,7 @@ import {
223
224
  worktreeNameFromPath,
224
225
  worktreeSlugForTicket,
225
226
  writeThread
226
- } from "./chunk-SMSD6U3N.js";
227
+ } from "./chunk-GA5MLYVG.js";
227
228
  import {
228
229
  HISTORY_CLEANUP_INTERVAL_HOURS_DEFAULT,
229
230
  applyTurnUsage,
@@ -232,6 +233,7 @@ import {
232
233
  autoCleanupHistoryEnabled,
233
234
  childEnvWithAppSettings,
234
235
  coerceOrchestratorAgent,
236
+ computerUseEnabled,
235
237
  followUpBehavior,
236
238
  formatViewerContextDirective,
237
239
  formatViewerContextReminder,
@@ -260,7 +262,7 @@ import {
260
262
  wakeOrchestratorOnGithubEdgesEnabled,
261
263
  withTurnScopedCost,
262
264
  writeViewerContext
263
- } from "./chunk-VL6F2KRE.js";
265
+ } from "./chunk-RMJXFABA.js";
264
266
  import {
265
267
  writePrivateFile
266
268
  } from "./chunk-NSTQ6QKD.js";
@@ -328,7 +330,7 @@ function formatInjectedNoticesForTurn(notices) {
328
330
 
329
331
  // src/orchestrator/orchestrator.ts
330
332
  import { randomUUID as randomUUID4 } from "crypto";
331
- import { existsSync as existsSync14 } from "fs";
333
+ import { existsSync as existsSync15 } from "fs";
332
334
 
333
335
  // src/agents/spawn.ts
334
336
  import { rmSync } from "fs";
@@ -579,9 +581,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
579
581
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
580
582
  );
581
583
  }
582
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-TG2TVLUF.js");
584
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-EPVNFQVC.js");
583
585
  if (isGlobalThread2(thread)) {
584
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-E736TJBS.js");
586
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-K3WT5UVS.js");
585
587
  ensureGlobalCoordinatorCwd2(
586
588
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
587
589
  );
@@ -871,6 +873,9 @@ async function removeWorktreeDroppingLeftovers(thread, deleteBranch) {
871
873
  }
872
874
 
873
875
  // src/git/agent-git-actions.ts
876
+ import { existsSync } from "fs";
877
+ import { join as join2 } from "path";
878
+ 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.";
874
879
  var AGENT_GIT_ACTIONS = [
875
880
  "commit-push",
876
881
  "create-draft",
@@ -1003,6 +1008,10 @@ function entireGitActionExpansion(action, base) {
1003
1008
  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`.";
1004
1009
  }
1005
1010
  }
1011
+ function worktreeHasAnnounceSkill(worktreePath) {
1012
+ const root = worktreePath?.trim();
1013
+ return !!root && existsSync(join2(root, ".claude/skills/announce-on-x/SKILL.md"));
1014
+ }
1006
1015
  function expandCanonicalGitRequest(prompt, opts) {
1007
1016
  const trimmed = prompt.trim();
1008
1017
  let action = null;
@@ -1036,6 +1045,9 @@ function expandCanonicalGitRequest(prompt, opts) {
1036
1045
  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.";
1037
1046
  }
1038
1047
  if (!expansion) return prompt;
1048
+ if (action === "merge" && (!base || isMainishPrBase(base)) && worktreeHasAnnounceSkill(opts?.worktreePath)) {
1049
+ expansion = `${expansion} ${ANNOUNCE_AFTER_MERGE}`;
1050
+ }
1039
1051
  if (expansionPushes(action, trimmed)) expansion = withPushReview(expansion);
1040
1052
  return `${trimmed}
1041
1053
 
@@ -1152,8 +1164,8 @@ function shouldAutoArchiveOnPrMerge(opts) {
1152
1164
 
1153
1165
  // src/store/setup-log.ts
1154
1166
  import { createHash } from "crypto";
1155
- import { existsSync, readFileSync, writeFileSync } from "fs";
1156
- import { join as join2 } from "path";
1167
+ import { existsSync as existsSync2, readFileSync, writeFileSync } from "fs";
1168
+ import { join as join3 } from "path";
1157
1169
  var EMPTY = {
1158
1170
  output: "",
1159
1171
  running: false,
@@ -1195,7 +1207,7 @@ function materialize(mem) {
1195
1207
  };
1196
1208
  }
1197
1209
  function setupLogPath(threadId) {
1198
- return join2(threadsDir(), `${threadId}.setup.log.json`);
1210
+ return join3(threadsDir(), `${threadId}.setup.log.json`);
1199
1211
  }
1200
1212
  function setupLogKeyForWorktree(worktreePath) {
1201
1213
  const norm = normalizeWorktreePath(worktreePath);
@@ -1235,7 +1247,7 @@ function schedulePersist(threadId) {
1235
1247
  }
1236
1248
  function loadFromDisk(threadId) {
1237
1249
  const path = setupLogPath(threadId);
1238
- if (!existsSync(path)) return null;
1250
+ if (!existsSync2(path)) return null;
1239
1251
  try {
1240
1252
  const raw = JSON.parse(readFileSync(path, "utf8"));
1241
1253
  return {
@@ -1296,8 +1308,8 @@ function finishSetupLog(threadId, exitCode, source) {
1296
1308
 
1297
1309
  // src/store/run-log.ts
1298
1310
  import { createHash as createHash2 } from "crypto";
1299
- import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
1300
- import { join as join3 } from "path";
1311
+ import { existsSync as existsSync3, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
1312
+ import { join as join4 } from "path";
1301
1313
  var EMPTY2 = {
1302
1314
  output: "",
1303
1315
  running: false,
@@ -1336,7 +1348,7 @@ function safeScriptToken(scriptName) {
1336
1348
  return token || "dev";
1337
1349
  }
1338
1350
  function runLogPath(key) {
1339
- return join3(threadsDir(), `${key}.run.log.json`);
1351
+ return join4(threadsDir(), `${key}.run.log.json`);
1340
1352
  }
1341
1353
  function runLogKeyForWorktree(worktreePath, scriptName) {
1342
1354
  const norm = normalizeWorktreePath(worktreePath);
@@ -1382,7 +1394,7 @@ function schedulePersist2(key) {
1382
1394
  }
1383
1395
  function loadFromDisk2(key) {
1384
1396
  const path = runLogPath(key);
1385
- if (!existsSync2(path)) return null;
1397
+ if (!existsSync3(path)) return null;
1386
1398
  try {
1387
1399
  const raw = JSON.parse(readFileSync2(path, "utf8"));
1388
1400
  return {
@@ -1444,8 +1456,8 @@ function flushRunLog(key) {
1444
1456
  }
1445
1457
 
1446
1458
  // src/git/orphan-cleanup.ts
1447
- import { existsSync as existsSync3, readdirSync, statSync } from "fs";
1448
- import { join as join4 } from "path";
1459
+ import { existsSync as existsSync4, readdirSync, statSync } from "fs";
1460
+ import { join as join5 } from "path";
1449
1461
  function isSideboardWorktreePath(path) {
1450
1462
  return path.includes("/.sideboard/worktrees/") || path.includes("/sideboard/workspaces/");
1451
1463
  }
@@ -1456,7 +1468,7 @@ async function findOrphanWorktrees(repoPaths) {
1456
1468
  repoPaths?.length ? repoPaths : threads.map((t) => t.repoPath).filter(Boolean)
1457
1469
  );
1458
1470
  const homeRoot = sideboardWorkspacesDir();
1459
- if (existsSync3(homeRoot)) {
1471
+ if (existsSync4(homeRoot)) {
1460
1472
  try {
1461
1473
  for (const entry of readdirSync(homeRoot, { withFileTypes: true })) {
1462
1474
  if (!entry.isDirectory()) continue;
@@ -1468,7 +1480,7 @@ async function findOrphanWorktrees(repoPaths) {
1468
1480
  const orphans = [];
1469
1481
  const seen = /* @__PURE__ */ new Set();
1470
1482
  for (const repoPath of repos) {
1471
- if (!repoPath || !existsSync3(repoPath)) continue;
1483
+ if (!repoPath || !existsSync4(repoPath)) continue;
1472
1484
  try {
1473
1485
  const wts = await listWorktrees(repoPath);
1474
1486
  for (const wt of wts) {
@@ -1489,12 +1501,12 @@ async function findOrphanWorktrees(repoPaths) {
1489
1501
  }
1490
1502
  try {
1491
1503
  const root = worktreesRoot(repoPath);
1492
- if (existsSync3(root)) {
1504
+ if (existsSync4(root)) {
1493
1505
  for (const entry of readdirSync(root, { withFileTypes: true })) {
1494
1506
  if (!entry.isDirectory()) continue;
1495
- const path = join4(root, entry.name).replace(/\/$/, "");
1507
+ const path = join5(root, entry.name).replace(/\/$/, "");
1496
1508
  if (known.has(path) || seen.has(path)) continue;
1497
- if (!existsSync3(join4(path, ".git"))) continue;
1509
+ if (!existsSync4(join5(path, ".git"))) continue;
1498
1510
  seen.add(path);
1499
1511
  let mtimeMs = 0;
1500
1512
  try {
@@ -1699,8 +1711,8 @@ async function applyThreadIntoMain(thread, opts) {
1699
1711
  }
1700
1712
 
1701
1713
  // src/git/clone-repo.ts
1702
- import { existsSync as existsSync4 } from "fs";
1703
- import { basename, join as join5 } from "path";
1714
+ import { existsSync as existsSync5 } from "fs";
1715
+ import { basename, join as join6 } from "path";
1704
1716
  import { execa as execa3 } from "execa";
1705
1717
  async function cloneRepoIntoSideboard(opts) {
1706
1718
  const url = opts.url.trim();
@@ -1711,8 +1723,8 @@ async function cloneRepoIntoSideboard(opts) {
1711
1723
  name = leaf || "repo";
1712
1724
  }
1713
1725
  name = name.replace(/[^a-zA-Z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "repo";
1714
- const dest = join5(sideboardReposDir(), name);
1715
- if (existsSync4(dest)) {
1726
+ const dest = join6(sideboardReposDir(), name);
1727
+ if (existsSync5(dest)) {
1716
1728
  const repoPath2 = await resolveRepoRoot(dest);
1717
1729
  const workspace2 = await addWorkspace(repoPath2);
1718
1730
  return { repoPath: repoPath2, workspace: workspace2 };
@@ -1735,9 +1747,9 @@ function isAdoptableRunScriptRequest(req) {
1735
1747
 
1736
1748
  // src/store/desktop-host.ts
1737
1749
  import { readFileSync as readFileSync3, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
1738
- import { join as join6 } from "path";
1750
+ import { join as join7 } from "path";
1739
1751
  function desktopHostPidPath() {
1740
- return join6(appDataDir(), "desktop-host.pid");
1752
+ return join7(appDataDir(), "desktop-host.pid");
1741
1753
  }
1742
1754
  function readDesktopHostPid() {
1743
1755
  try {
@@ -2450,7 +2462,7 @@ function agentPurposeStamp(input) {
2450
2462
  }
2451
2463
 
2452
2464
  // src/threads/create.ts
2453
- import { existsSync as existsSync5 } from "fs";
2465
+ import { existsSync as existsSync6 } from "fs";
2454
2466
 
2455
2467
  // src/detect/detect.ts
2456
2468
  var REQUIRE_AGENT_TIMEOUT_MS = 8e3;
@@ -3082,7 +3094,7 @@ function reuseLiveThread(input, repoPath, match) {
3082
3094
  }
3083
3095
  async function createThread(input, _onSetupLine) {
3084
3096
  const repoPath = await resolveRepoRoot(input.repoPath);
3085
- if (!existsSync5(repoPath)) {
3097
+ if (!existsSync6(repoPath)) {
3086
3098
  throw new Error(`Repo not found: ${repoPath}`);
3087
3099
  }
3088
3100
  if (isRemovedWorkspace(repoPath)) throw new Error(`Project was removed: ${repoPath}`);
@@ -3102,7 +3114,7 @@ async function createThread(input, _onSetupLine) {
3102
3114
  const acpHarness = resolved.agent === "acp" ? input.acpHarness === "gemini" || input.acpHarness === "copilot" ? input.acpHarness : defaultAcpHarness() : void 0;
3103
3115
  await requireAgent(resolved.agent, { acpHarness });
3104
3116
  if (input.cowboy) {
3105
- const { cowboyModeEnabled } = await import("./app-settings-XILTSD6L.js");
3117
+ const { cowboyModeEnabled } = await import("./app-settings-X3UFWRAF.js");
3106
3118
  if (!cowboyModeEnabled()) {
3107
3119
  throw new Error(
3108
3120
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -3162,7 +3174,7 @@ async function createThread(input, _onSetupLine) {
3162
3174
  let sourceIsFork = false;
3163
3175
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
3164
3176
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
3165
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-URSRZW7P.js");
3177
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-VUPUERE4.js");
3166
3178
  const task = await ensureAbleTimeTask({
3167
3179
  title: title?.trim() || "Untitled work",
3168
3180
  description: input.prompt?.trim() || void 0
@@ -3613,7 +3625,7 @@ function createLineCoalescer(onChunk, opts) {
3613
3625
 
3614
3626
  // src/store/turn-live.ts
3615
3627
  import {
3616
- existsSync as existsSync6,
3628
+ existsSync as existsSync7,
3617
3629
  renameSync,
3618
3630
  unlinkSync as unlinkSync2,
3619
3631
  writeFileSync as writeFileSync4,
@@ -3709,7 +3721,7 @@ function readTurnLiveParts(threadId) {
3709
3721
  }
3710
3722
  function readTurnLive(threadId) {
3711
3723
  const path = threadLivePath(threadId);
3712
- if (!existsSync6(path)) return null;
3724
+ if (!existsSync7(path)) return null;
3713
3725
  try {
3714
3726
  const raw = JSON.parse(readFileSync4(path, "utf8"));
3715
3727
  if (!raw || typeof raw.summary !== "string") return null;
@@ -3723,7 +3735,7 @@ function clearTurnLive(threadId) {
3723
3735
  if (buf?.timer) clearTimeout(buf.timer);
3724
3736
  buffers.delete(threadId);
3725
3737
  const path = threadLivePath(threadId);
3726
- if (!existsSync6(path)) return;
3738
+ if (!existsSync7(path)) return;
3727
3739
  try {
3728
3740
  unlinkSync2(path);
3729
3741
  } catch {
@@ -3974,26 +3986,26 @@ function createQuotaFailoverChat(from, fallbackAgent, limitText, opts) {
3974
3986
  import { execFileSync as execFileSync2 } from "child_process";
3975
3987
  import {
3976
3988
  copyFileSync,
3977
- existsSync as existsSync7,
3989
+ existsSync as existsSync8,
3978
3990
  mkdtempSync,
3979
3991
  readdirSync as readdirSync2,
3980
3992
  readFileSync as readFileSync5,
3981
3993
  rmSync as rmSync2
3982
3994
  } from "fs";
3983
3995
  import { tmpdir } from "os";
3984
- import { join as join7 } from "path";
3996
+ import { join as join8 } from "path";
3985
3997
  import { createRequire } from "module";
3986
- var CONDUCTOR_APP_SUPPORT = join7(
3998
+ var CONDUCTOR_APP_SUPPORT = join8(
3987
3999
  process.env.HOME ?? "",
3988
4000
  "Library",
3989
4001
  "Application Support",
3990
4002
  "com.conductor.app"
3991
4003
  );
3992
- var CONDUCTOR_DB = join7(CONDUCTOR_APP_SUPPORT, "conductor.db");
3993
- var CURSOR_SDK_STORE = join7(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
4004
+ var CONDUCTOR_DB = join8(CONDUCTOR_APP_SUPPORT, "conductor.db");
4005
+ var CURSOR_SDK_STORE = join8(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
3994
4006
  function thisModuleFile() {
3995
4007
  const cjsFile = typeof __filename !== "undefined" ? __filename : "";
3996
- return cjsFile || process.argv[1] || join7(process.cwd(), "package.json");
4008
+ return cjsFile || process.argv[1] || join8(process.cwd(), "package.json");
3997
4009
  }
3998
4010
  function openReadonlySqlite(file) {
3999
4011
  const req = createRequire(thisModuleFile());
@@ -4011,7 +4023,7 @@ function mapAgentType(raw) {
4011
4023
  return null;
4012
4024
  }
4013
4025
  function resolveConductorCursorAgentId(workspacePath) {
4014
- if (!workspacePath || !existsSync7(CURSOR_SDK_STORE)) return null;
4026
+ if (!workspacePath || !existsSync8(CURSOR_SDK_STORE)) return null;
4015
4027
  const normalized = workspacePath.replace(/\/$/, "");
4016
4028
  let best = null;
4017
4029
  let hashes;
@@ -4021,8 +4033,8 @@ function resolveConductorCursorAgentId(workspacePath) {
4021
4033
  return null;
4022
4034
  }
4023
4035
  for (const hash of hashes) {
4024
- const agentsFile = join7(CURSOR_SDK_STORE, hash, "agents.ndjson");
4025
- if (!existsSync7(agentsFile)) continue;
4036
+ const agentsFile = join8(CURSOR_SDK_STORE, hash, "agents.ndjson");
4037
+ if (!existsSync8(agentsFile)) continue;
4026
4038
  let text3;
4027
4039
  try {
4028
4040
  text3 = readFileSync5(agentsFile, "utf8");
@@ -4049,7 +4061,7 @@ function resolveConductorCursorAgentId(workspacePath) {
4049
4061
  return best?.agentId ?? null;
4050
4062
  }
4051
4063
  async function adoptThread(input) {
4052
- if (!existsSync7(input.worktreePath)) {
4064
+ if (!existsSync8(input.worktreePath)) {
4053
4065
  throw new Error(`Worktree not found: ${input.worktreePath}`);
4054
4066
  }
4055
4067
  const repoPath = await resolveRepoRoot(input.worktreePath);
@@ -4071,23 +4083,23 @@ async function adoptThread(input) {
4071
4083
  messages: input.messages ?? []
4072
4084
  });
4073
4085
  writeThread(thread);
4074
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-4PA24IX6.js");
4086
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-SQRR67HD.js");
4075
4087
  await addWorkspace2(repoPath);
4076
4088
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-KMZQXZKP.js");
4077
4089
  await ensureWorktreeSideboardIgnored(input.worktreePath);
4078
4090
  return thread;
4079
4091
  }
4080
4092
  function listConductorWorkspaces() {
4081
- if (!existsSync7(CONDUCTOR_DB)) {
4093
+ if (!existsSync8(CONDUCTOR_DB)) {
4082
4094
  throw new Error(`Conductor DB not found at ${CONDUCTOR_DB}`);
4083
4095
  }
4084
- const tmp = mkdtempSync(join7(tmpdir(), "sideboard-conductor-"));
4085
- const snapshot = join7(tmp, "conductor.db");
4096
+ const tmp = mkdtempSync(join8(tmpdir(), "sideboard-conductor-"));
4097
+ const snapshot = join8(tmp, "conductor.db");
4086
4098
  try {
4087
4099
  copyFileSync(CONDUCTOR_DB, snapshot);
4088
4100
  for (const suffix of ["-wal", "-shm"]) {
4089
4101
  const src = `${CONDUCTOR_DB}${suffix}`;
4090
- if (existsSync7(src)) {
4102
+ if (existsSync8(src)) {
4091
4103
  try {
4092
4104
  copyFileSync(src, `${snapshot}${suffix}`);
4093
4105
  } catch {
@@ -4169,16 +4181,16 @@ function listConductorWorkspaces() {
4169
4181
  }
4170
4182
  }
4171
4183
  function importConductorWorkspace(workspaceId) {
4172
- if (!existsSync7(CONDUCTOR_DB)) {
4184
+ if (!existsSync8(CONDUCTOR_DB)) {
4173
4185
  throw new Error(`Conductor DB not found at ${CONDUCTOR_DB}`);
4174
4186
  }
4175
- const tmp = mkdtempSync(join7(tmpdir(), "sideboard-conductor-"));
4176
- const snapshot = join7(tmp, "conductor.db");
4187
+ const tmp = mkdtempSync(join8(tmpdir(), "sideboard-conductor-"));
4188
+ const snapshot = join8(tmp, "conductor.db");
4177
4189
  try {
4178
4190
  copyFileSync(CONDUCTOR_DB, snapshot);
4179
4191
  for (const suffix of ["-wal", "-shm"]) {
4180
4192
  const src = `${CONDUCTOR_DB}${suffix}`;
4181
- if (existsSync7(src)) {
4193
+ if (existsSync8(src)) {
4182
4194
  try {
4183
4195
  copyFileSync(src, `${snapshot}${suffix}`);
4184
4196
  } catch {
@@ -4198,7 +4210,7 @@ function importConductorWorkspace(workspaceId) {
4198
4210
  ).get(workspaceId);
4199
4211
  if (!row) throw new Error(`Conductor workspace not found: ${workspaceId}`);
4200
4212
  const worktreePath = String(row.workspacePath);
4201
- if (!existsSync7(worktreePath)) {
4213
+ if (!existsSync8(worktreePath)) {
4202
4214
  throw new Error(`Conductor worktree missing on disk: ${worktreePath}`);
4203
4215
  }
4204
4216
  let sessionId = null;
@@ -4269,7 +4281,7 @@ async function importConductorWorkspaceAsync(workspaceId) {
4269
4281
  }
4270
4282
 
4271
4283
  // src/threads/stack-layers.ts
4272
- import { existsSync as existsSync8 } from "fs";
4284
+ import { existsSync as existsSync9 } from "fs";
4273
4285
  function stackIdFrom(stack) {
4274
4286
  if (stack.stackNumber != null) return `gh-stack-${stack.stackNumber}`;
4275
4287
  const key = stack.layers.map((l) => l.branchName).join("|");
@@ -4332,7 +4344,7 @@ async function openStackLayer(input, _onSetupLine) {
4332
4344
  let createdWorktree = false;
4333
4345
  const trees = await listWorktrees(repoPath);
4334
4346
  const checkedOut = trees.find((w) => w.branch === branchName);
4335
- if (checkedOut?.path && existsSync8(checkedOut.path)) {
4347
+ if (checkedOut?.path && existsSync9(checkedOut.path)) {
4336
4348
  if (input.reuseExistingWorktree !== false) {
4337
4349
  worktreePath = checkedOut.path;
4338
4350
  } else {
@@ -4474,7 +4486,7 @@ async function initStackFromThread(input, onSetupLine) {
4474
4486
  async function createPrStack(input, onSetupLine) {
4475
4487
  await requireAgent(input.agent);
4476
4488
  const repoPath = await resolveRepoRoot(input.repoPath);
4477
- if (!existsSync8(repoPath)) throw new Error(`Repo not found: ${repoPath}`);
4489
+ if (!existsSync9(repoPath)) throw new Error(`Repo not found: ${repoPath}`);
4478
4490
  if (!input.branches.length) throw new Error("At least one branch name required");
4479
4491
  const status = await detectGhStack(repoPath);
4480
4492
  if (!status.available) throw new Error(status.reason);
@@ -4541,7 +4553,7 @@ async function createPrStack(input, onSetupLine) {
4541
4553
  }
4542
4554
  }
4543
4555
  const claimed = new Set(threads.map((t) => t.worktreePath));
4544
- if (!claimed.has(bootstrap.worktreePath) && existsSync8(bootstrap.worktreePath)) {
4556
+ if (!claimed.has(bootstrap.worktreePath) && existsSync9(bootstrap.worktreePath)) {
4545
4557
  try {
4546
4558
  await removeWorktree(repoPath, bootstrap.worktreePath, {
4547
4559
  deleteBranch: bootstrap.branchName
@@ -4556,7 +4568,7 @@ async function createPrStack(input, onSetupLine) {
4556
4568
  import { randomBytes } from "crypto";
4557
4569
  import { unlinkSync as unlinkSync3, writeFileSync as writeFileSync5 } from "fs";
4558
4570
  import { tmpdir as tmpdir2 } from "os";
4559
- import { join as join8 } from "path";
4571
+ import { join as join9 } from "path";
4560
4572
  async function lookupGithubGraphqlReset(cwd) {
4561
4573
  const result = await gh(["api", "rate_limit"], cwd, { reject: false });
4562
4574
  if (result.exitCode !== 0 || !result.stdout.trim()) return void 0;
@@ -4584,7 +4596,7 @@ async function formatPrCreateFailure(raw, cwd, ctx) {
4584
4596
  }
4585
4597
  async function createCursorPullRequest(worktreePath, slug, opts) {
4586
4598
  const bodyText = (opts.body ?? opts.title).trim() || opts.title;
4587
- const bodyFile = join8(
4599
+ const bodyFile = join9(
4588
4600
  tmpdir2(),
4589
4601
  `sideboard-pr-body-${process.pid}-${randomBytes(6).toString("hex")}.md`
4590
4602
  );
@@ -4626,7 +4638,7 @@ async function createOrUpdatePr(worktreePath, opts) {
4626
4638
  const headRef = ghHeadRef(slug, opts.head);
4627
4639
  const branchOnly = opts.head.trim().replace(/^refs\/heads\//, "");
4628
4640
  const bodyText = clampGithubPrBody(opts.body ?? opts.title);
4629
- const bodyFile = join8(
4641
+ const bodyFile = join9(
4630
4642
  tmpdir2(),
4631
4643
  `sideboard-pr-body-${process.pid}-${randomBytes(6).toString("hex")}.md`
4632
4644
  );
@@ -4721,10 +4733,10 @@ async function createOrUpdatePrWithBodyFile(worktreePath, opts) {
4721
4733
  }
4722
4734
 
4723
4735
  // src/diff/diff.ts
4724
- import { existsSync as existsSync9, mkdirSync, readFileSync as readFileSync6, statSync as statSync2, writeFileSync as writeFileSync6 } from "fs";
4725
- import { dirname as dirname2, join as join9 } from "path";
4736
+ import { existsSync as existsSync10, mkdirSync, readFileSync as readFileSync6, statSync as statSync2, writeFileSync as writeFileSync6 } from "fs";
4737
+ import { dirname as dirname2, join as join10 } from "path";
4726
4738
  async function inspectGitWorktree(worktreePath) {
4727
- if (!worktreePath || !existsSync9(worktreePath)) return "missing_worktree";
4739
+ if (!worktreePath || !existsSync10(worktreePath)) return "missing_worktree";
4728
4740
  const check = await git(["rev-parse", "--is-inside-work-tree"], worktreePath, {
4729
4741
  reject: false
4730
4742
  });
@@ -4732,7 +4744,7 @@ async function inspectGitWorktree(worktreePath) {
4732
4744
  return "ok";
4733
4745
  }
4734
4746
  async function initializeGitRepository(worktreePath) {
4735
- if (!worktreePath || !existsSync9(worktreePath)) {
4747
+ if (!worktreePath || !existsSync10(worktreePath)) {
4736
4748
  throw new Error("Worktree not found");
4737
4749
  }
4738
4750
  const status = await inspectGitWorktree(worktreePath);
@@ -4868,7 +4880,7 @@ new file mode 100644
4868
4880
  };
4869
4881
  }
4870
4882
  async function untrackedPatch(worktreePath, path, maxHunk) {
4871
- const abs = join9(worktreePath, path);
4883
+ const abs = join10(worktreePath, path);
4872
4884
  try {
4873
4885
  const st = statSync2(abs);
4874
4886
  if (st.isFile() && st.size > maxHunk) {
@@ -5340,8 +5352,8 @@ async function getDiff(worktreePath, repoPath, opts) {
5340
5352
  }
5341
5353
  function statWorktreePath(worktreePath, relativePath) {
5342
5354
  assertSafeRelativePath(relativePath);
5343
- const abs = join9(worktreePath, relativePath);
5344
- if (!existsSync9(abs)) return "missing";
5355
+ const abs = join10(worktreePath, relativePath);
5356
+ if (!existsSync10(abs)) return "missing";
5345
5357
  const st = statSync2(abs);
5346
5358
  if (st.isDirectory()) return "dir";
5347
5359
  if (st.isFile()) return "file";
@@ -5382,7 +5394,7 @@ var DEFAULT_UPLOAD_MAX_BYTES = 5e7;
5382
5394
  function readWorktreeFileForUpload(worktreePath, relativePath, opts) {
5383
5395
  assertSafeRelativePath(relativePath);
5384
5396
  const maxBytes = opts?.maxBytes ?? DEFAULT_UPLOAD_MAX_BYTES;
5385
- const abs = join9(worktreePath, relativePath);
5397
+ const abs = join10(worktreePath, relativePath);
5386
5398
  const st = statSync2(abs);
5387
5399
  if (!st.isFile()) {
5388
5400
  throw new Error(`Not a file: ${relativePath}`);
@@ -5402,7 +5414,7 @@ function readWorktreeFileForUpload(worktreePath, relativePath, opts) {
5402
5414
  function readWorktreeFile(worktreePath, relativePath, opts) {
5403
5415
  assertSafeRelativePath(relativePath);
5404
5416
  const maxBytes = opts?.maxBytes ?? 2e5;
5405
- const abs = join9(worktreePath, relativePath);
5417
+ const abs = join10(worktreePath, relativePath);
5406
5418
  const st = statSync2(abs);
5407
5419
  if (!st.isFile()) {
5408
5420
  throw new Error(`Not a file: ${relativePath}`);
@@ -5450,7 +5462,7 @@ function assertSafeRelativePath(relativePath) {
5450
5462
  }
5451
5463
  function writeWorktreeFile(worktreePath, relativePath, content) {
5452
5464
  assertSafeRelativePath(relativePath);
5453
- const abs = join9(worktreePath, relativePath);
5465
+ const abs = join10(worktreePath, relativePath);
5454
5466
  mkdirSync(dirname2(abs), { recursive: true });
5455
5467
  writeFileSync6(abs, content, "utf8");
5456
5468
  return { path: relativePath };
@@ -5675,13 +5687,13 @@ async function confirmLand(thread, opts) {
5675
5687
 
5676
5688
  // src/diff/read-worktree-tail.ts
5677
5689
  import { closeSync, fstatSync, openSync, readSync } from "fs";
5678
- import { join as join10 } from "path";
5690
+ import { join as join11 } from "path";
5679
5691
  var WORKTREE_TAIL_BYTES = 2e5;
5680
5692
  function readWorktreeFileTail(worktreePath, relativePath, maxBytes = WORKTREE_TAIL_BYTES) {
5681
5693
  if (!relativePath || relativePath.includes("..") || relativePath.startsWith("/")) {
5682
5694
  throw new Error("Invalid path");
5683
5695
  }
5684
- const abs = join10(worktreePath, relativePath);
5696
+ const abs = join11(worktreePath, relativePath);
5685
5697
  const fd = openSync(abs, "r");
5686
5698
  try {
5687
5699
  const st = fstatSync(fd);
@@ -5713,9 +5725,9 @@ function readWorktreeFileTail(worktreePath, relativePath, maxBytes = WORKTREE_TA
5713
5725
  }
5714
5726
 
5715
5727
  // src/skills/discover.ts
5716
- import { existsSync as existsSync10, readdirSync as readdirSync3, readFileSync as readFileSync7, statSync as statSync3 } from "fs";
5728
+ import { existsSync as existsSync11, readdirSync as readdirSync3, readFileSync as readFileSync7, statSync as statSync3 } from "fs";
5717
5729
  import { homedir } from "os";
5718
- import { join as join11 } from "path";
5730
+ import { join as join12 } from "path";
5719
5731
 
5720
5732
  // src/skills/bundled/long-running.ts
5721
5733
  var LONG_RUNNING_SKILL_COMMAND = "long-running";
@@ -5875,7 +5887,7 @@ function readSkill(skillMd, source) {
5875
5887
  }
5876
5888
  }
5877
5889
  function scanSkillsDir(dir, source, out) {
5878
- if (!existsSync10(dir)) return;
5890
+ if (!existsSync11(dir)) return;
5879
5891
  let entries;
5880
5892
  try {
5881
5893
  entries = readdirSync3(dir);
@@ -5884,8 +5896,8 @@ function scanSkillsDir(dir, source, out) {
5884
5896
  }
5885
5897
  for (const entry of entries) {
5886
5898
  if (entry.startsWith(".")) continue;
5887
- const skillMd = join11(dir, entry, "SKILL.md");
5888
- if (!existsSync10(skillMd)) continue;
5899
+ const skillMd = join12(dir, entry, "SKILL.md");
5900
+ if (!existsSync11(skillMd)) continue;
5889
5901
  try {
5890
5902
  if (!statSync3(skillMd).isFile()) continue;
5891
5903
  } catch {
@@ -5896,7 +5908,7 @@ function scanSkillsDir(dir, source, out) {
5896
5908
  }
5897
5909
  }
5898
5910
  function scanClaudePluginSkills(pluginsRoot, out) {
5899
- if (!existsSync10(pluginsRoot)) return;
5911
+ if (!existsSync11(pluginsRoot)) return;
5900
5912
  const walk = (dir, depth, lookingForSkillsDir) => {
5901
5913
  if (depth > 7) return;
5902
5914
  let entries;
@@ -5906,12 +5918,12 @@ function scanClaudePluginSkills(pluginsRoot, out) {
5906
5918
  return;
5907
5919
  }
5908
5920
  if (lookingForSkillsDir && entries.includes("SKILL.md")) {
5909
- const skill = readSkill(join11(dir, "SKILL.md"), "cli");
5921
+ const skill = readSkill(join12(dir, "SKILL.md"), "cli");
5910
5922
  if (skill) out.push(skill);
5911
5923
  }
5912
5924
  for (const entry of entries) {
5913
5925
  if (entry === "node_modules" || entry === ".git") continue;
5914
- const full = join11(dir, entry);
5926
+ const full = join12(dir, entry);
5915
5927
  try {
5916
5928
  if (!statSync3(full).isDirectory()) continue;
5917
5929
  } catch {
@@ -5931,17 +5943,17 @@ function discoverSkills(worktreePath) {
5931
5943
  const home = homedir();
5932
5944
  const collected = [];
5933
5945
  for (const rel of [".claude/skills", ".cursor/skills", ".sideboard/skills", ".brightsy/skills", "skills"]) {
5934
- scanSkillsDir(join11(worktreePath, rel), "workspace", collected);
5946
+ scanSkillsDir(join12(worktreePath, rel), "workspace", collected);
5935
5947
  }
5936
5948
  for (const abs of [
5937
- join11(home, ".claude/skills"),
5938
- join11(home, ".cursor/skills"),
5939
- join11(home, ".sideboard/skills"),
5940
- join11(home, ".brightsy/skills")
5949
+ join12(home, ".claude/skills"),
5950
+ join12(home, ".cursor/skills"),
5951
+ join12(home, ".sideboard/skills"),
5952
+ join12(home, ".brightsy/skills")
5941
5953
  ]) {
5942
5954
  scanSkillsDir(abs, "user", collected);
5943
5955
  }
5944
- scanClaudePluginSkills(join11(home, ".claude/plugins"), collected);
5956
+ scanClaudePluginSkills(join12(home, ".claude/plugins"), collected);
5945
5957
  collected.push(...bundledSkills());
5946
5958
  const rank = {
5947
5959
  workspace: 0,
@@ -6243,7 +6255,10 @@ function promptForJoinedSteer(input) {
6243
6255
  }
6244
6256
  const { agentPrompt: expandedLatest } = expandComposerPrompt(
6245
6257
  input.worktreePath,
6246
- expandCanonicalGitRequest(input.latestPrompt, { forge: input.gitForge }),
6258
+ expandCanonicalGitRequest(input.latestPrompt, {
6259
+ forge: input.gitForge,
6260
+ worktreePath: input.worktreePath
6261
+ }),
6247
6262
  { attachments: latestAttachments }
6248
6263
  );
6249
6264
  return input.expandedPrompt && input.agentPrompt.endsWith(input.expandedPrompt) ? input.agentPrompt.slice(0, -input.expandedPrompt.length) + expandedLatest : `${input.agentPrompt}
@@ -6268,10 +6283,10 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6268
6283
  throw new Error(`Thread is archived: ${thread.id}`);
6269
6284
  }
6270
6285
  const requested = opts?.followUp;
6271
- const join15 = requested === "join";
6286
+ const join16 = requested === "join";
6272
6287
  const followUp = resolveSendFollowUp(
6273
6288
  current,
6274
- join15 ? "steer" : requested
6289
+ join16 ? "steer" : requested
6275
6290
  );
6276
6291
  const explicit = opts?.attachments;
6277
6292
  const consumed = explicit !== void 0 ? { attachments: current.attachments, consumed: explicit } : consumeComposerAttachments(current);
@@ -6280,7 +6295,7 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6280
6295
  const draft = host.openSteerPrompt.get(current.id);
6281
6296
  const queuedHead = !inFlightEarly && current.status === "queued" && current.queue.length > 0 ? current.queue[0] : null;
6282
6297
  const joinCanMerge = draft != null && !draft.spawned || !inFlightEarly && queuedHead != null;
6283
- const unanswered = followUp === "steer" && !agentHasRepliedEarly && (!join15 || joinCanMerge) ? draft?.text ?? (inFlightEarly ? trailingUnansweredUserText(current.messages) : queuedHead) : null;
6298
+ const unanswered = followUp === "steer" && !agentHasRepliedEarly && (!join16 || joinCanMerge) ? draft?.text ?? (inFlightEarly ? trailingUnansweredUserText(current.messages) : queuedHead) : null;
6284
6299
  if (unanswered != null && (draft ? !draft.spawned : queuedHead != null)) {
6285
6300
  clearSendBookkeeping(host, thread.id);
6286
6301
  const combined = joinSteerPrompt(unanswered, prompt);
@@ -6332,7 +6347,7 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6332
6347
  clearSendBookkeeping(host, thread.id);
6333
6348
  const inFlight = host.activeTurns.has(thread.id) || host.startingTurns.has(thread.id) || current.status === "running";
6334
6349
  shouldSteer = sendFollowUpInterrupts(
6335
- join15 ? "join" : followUp,
6350
+ join16 ? "join" : followUp,
6336
6351
  inFlight || current.queue.length > 0
6337
6352
  );
6338
6353
  const patch = queued;
@@ -6358,8 +6373,8 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6358
6373
  }
6359
6374
 
6360
6375
  // src/agents/instructions.ts
6361
- import { existsSync as existsSync12 } from "fs";
6362
- import { join as join13 } from "path";
6376
+ import { existsSync as existsSync13 } from "fs";
6377
+ import { join as join14 } from "path";
6363
6378
 
6364
6379
  // src/agents/forge-git-directives.ts
6365
6380
  function formatCursorGitDirective(slug) {
@@ -6384,8 +6399,8 @@ function formatEntireGitDirective(slug) {
6384
6399
  }
6385
6400
 
6386
6401
  // src/skills/detached-job-path.ts
6387
- import { existsSync as existsSync11 } from "fs";
6388
- import { dirname as dirname3, join as join12 } from "path";
6402
+ import { existsSync as existsSync12 } from "fs";
6403
+ import { dirname as dirname3, join as join13 } from "path";
6389
6404
  import { fileURLToPath } from "url";
6390
6405
  var DETACHED_JOB_FILENAMES = ["detached-job.cjs", "detached-job.js"];
6391
6406
  function compiledModuleDir() {
@@ -6402,8 +6417,8 @@ function compiledModuleDir() {
6402
6417
  }
6403
6418
  function detachedJobScriptIn(dir) {
6404
6419
  for (const name of DETACHED_JOB_FILENAMES) {
6405
- const script = join12(dir, "scripts", name);
6406
- if (existsSync11(script)) return script;
6420
+ const script = join13(dir, "scripts", name);
6421
+ if (existsSync12(script)) return script;
6407
6422
  }
6408
6423
  return null;
6409
6424
  }
@@ -6527,6 +6542,7 @@ function formatWorktreeDirective(thread, opts) {
6527
6542
  lines.push(
6528
6543
  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`)."
6529
6544
  );
6545
+ 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.");
6530
6546
  if (thread.prUrl) {
6531
6547
  lines.push(
6532
6548
  `- A PR already exists (${thread.prUrl}). Update it (push + edit title/body if the purpose drifted) instead of opening a duplicate.`
@@ -6553,6 +6569,7 @@ function formatWorktreeDirective(thread, opts) {
6553
6569
  );
6554
6570
  lines.push("");
6555
6571
  lines.push(formatDevAccessHint(opts?.activeRuns));
6572
+ lines.push(formatComputerUseHint(computerUseEnabled()));
6556
6573
  lines.push("");
6557
6574
  lines.push(
6558
6575
  "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."
@@ -6664,16 +6681,16 @@ function formatPrGateDirective() {
6664
6681
  }
6665
6682
  function formatProcessGuideDirective(opts) {
6666
6683
  const worktree = opts?.worktreePath?.trim();
6667
- const hasGraphSkill = !!worktree && existsSync12(join13(worktree, ".claude/skills/graph-engineering/SKILL.md"));
6668
- const hasReviewSkill = !!worktree && existsSync12(join13(worktree, ".claude/skills/review/SKILL.md"));
6669
- const hasInstallSkill = !!worktree && existsSync12(join13(worktree, ".claude/skills/worktree-install/SKILL.md"));
6684
+ const hasGraphSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/graph-engineering/SKILL.md"));
6685
+ const hasReviewSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/review/SKILL.md"));
6686
+ const hasInstallSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/worktree-install/SKILL.md"));
6670
6687
  return [
6671
6688
  "Process guides (recurring work only):",
6672
6689
  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,
6673
6690
  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,
6674
6691
  "- 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`.",
6675
6692
  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.",
6676
- !!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."
6693
+ !!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."
6677
6694
  ].filter(Boolean).join("\n");
6678
6695
  }
6679
6696
  function formatLongRunningDirective(opts) {
@@ -7101,8 +7118,8 @@ async function syncThreadBranchFromGit(threadId) {
7101
7118
  }
7102
7119
 
7103
7120
  // src/orchestrator/github-edge-watch.ts
7104
- import { existsSync as existsSync13, readFileSync as readFileSync8 } from "fs";
7105
- import { join as join14 } from "path";
7121
+ import { existsSync as existsSync14, readFileSync as readFileSync8 } from "fs";
7122
+ import { join as join15 } from "path";
7106
7123
 
7107
7124
  // src/orchestrator/github-edge.ts
7108
7125
  var GITHUB_EDGE_COOLDOWN_MS = 30 * 6e4;
@@ -7372,12 +7389,12 @@ var timer = null;
7372
7389
  var polling = false;
7373
7390
  var needsBaseline = true;
7374
7391
  function githubEdgeSnapshotPath() {
7375
- return join14(appDataDir(), "github-edge-watch.json");
7392
+ return join15(appDataDir(), "github-edge-watch.json");
7376
7393
  }
7377
7394
  function loadGithubEdgeSnapshot() {
7378
7395
  try {
7379
7396
  const path = githubEdgeSnapshotPath();
7380
- if (!existsSync13(path)) return emptyGithubEdgeSnapshot();
7397
+ if (!existsSync14(path)) return emptyGithubEdgeSnapshot();
7381
7398
  return coerceGithubEdgeSnapshot(JSON.parse(readFileSync8(path, "utf8")));
7382
7399
  } catch {
7383
7400
  return emptyGithubEdgeSnapshot();
@@ -7673,11 +7690,11 @@ function realDeps() {
7673
7690
  parentIdForThread,
7674
7691
  designatedId: designatedOrchestratorId,
7675
7692
  send: async (threadId, prompt) => {
7676
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-QDHZ56LA.js");
7693
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-5BCHUAFG.js");
7677
7694
  await getOrchestrator2().send(threadId, prompt, { followUp: "queue" });
7678
7695
  },
7679
7696
  startOrchestration: async (prompt) => {
7680
- const { startOrchestration: startOrchestration2 } = await import("./orchestrator-QDHZ56LA.js");
7697
+ const { startOrchestration: startOrchestration2 } = await import("./orchestrator-5BCHUAFG.js");
7681
7698
  const defaults = resolveOrchestratorDefaults();
7682
7699
  await startOrchestration2({
7683
7700
  goal: prompt,
@@ -7704,7 +7721,7 @@ function formatScheduledPrompt(name, prompt) {
7704
7721
  ${prompt}`;
7705
7722
  }
7706
7723
  async function defaultDeps() {
7707
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-QDHZ56LA.js");
7724
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-5BCHUAFG.js");
7708
7725
  const orch = getOrchestrator2();
7709
7726
  return {
7710
7727
  findThread: (id) => findThreadByRef(id),
@@ -7905,7 +7922,7 @@ ${item.prompt}`);
7905
7922
  }
7906
7923
  }
7907
7924
  async function defaultSend(id, prompt) {
7908
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-QDHZ56LA.js");
7925
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-5BCHUAFG.js");
7909
7926
  await getOrchestrator2().send(id, prompt, { followUp: "join" });
7910
7927
  }
7911
7928
  function armChatFollowUps() {
@@ -8062,7 +8079,7 @@ var Orchestrator = class {
8062
8079
  this.lightReconcileAt.set(repoPath, Date.now());
8063
8080
  for (const thread of listThreads()) {
8064
8081
  if (isGlobalThread(thread) || thread.repoPath !== repoPath) continue;
8065
- if (!existsSync14(thread.worktreePath)) {
8082
+ if (!existsSync15(thread.worktreePath)) {
8066
8083
  setStatus(thread.id, "broken", "Worktree missing on disk");
8067
8084
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
8068
8085
  }
@@ -8091,7 +8108,7 @@ var Orchestrator = class {
8091
8108
  }
8092
8109
  continue;
8093
8110
  }
8094
- if (!existsSync14(thread.worktreePath)) {
8111
+ if (!existsSync15(thread.worktreePath)) {
8095
8112
  setStatus(thread.id, "broken", "Worktree missing on disk");
8096
8113
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
8097
8114
  continue;
@@ -8130,7 +8147,7 @@ var Orchestrator = class {
8130
8147
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
8131
8148
  });
8132
8149
  }
8133
- const { autoCleanupOrphansEnabled } = await import("./app-settings-XILTSD6L.js");
8150
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-X3UFWRAF.js");
8134
8151
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
8135
8152
  await cleanupOrphanWorktrees({ repoPaths });
8136
8153
  }
@@ -8520,7 +8537,7 @@ var Orchestrator = class {
8520
8537
  }
8521
8538
  await setup;
8522
8539
  if (skipSetup) return;
8523
- const { autoRunAfterSetupEnabled } = await import("./app-settings-XILTSD6L.js");
8540
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-X3UFWRAF.js");
8524
8541
  if (autoRunAfterSetupEnabled()) {
8525
8542
  try {
8526
8543
  await this.startDev(threadId);
@@ -8819,7 +8836,10 @@ var Orchestrator = class {
8819
8836
  }
8820
8837
  thread = this.requireThread(threadId);
8821
8838
  const turnOrigin = thread.worktreePath?.trim() ? await resolveOriginRemote(thread.worktreePath).catch(() => null) : null;
8822
- const gitPrompt = expandCanonicalGitRequest(promptText, { forge: turnOrigin?.forge });
8839
+ const gitPrompt = expandCanonicalGitRequest(promptText, {
8840
+ forge: turnOrigin?.forge,
8841
+ worktreePath: thread.worktreePath
8842
+ });
8823
8843
  const expandedAttachments = openSteerTurnAttachments(this.openSteerPrompt.get(threadId), turnAttachments, autoContinue);
8824
8844
  const { agentPrompt: expandedPrompt } = expandComposerPrompt(
8825
8845
  thread.worktreePath,
@@ -8904,7 +8924,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
8904
8924
  }
8905
8925
  const isBrightsy = fresh.agent === "brightsy";
8906
8926
  const isOrchestration = isOrchestratorThread(fresh);
8907
- const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-XILTSD6L.js");
8927
+ const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-X3UFWRAF.js");
8908
8928
  const gitAuthMode = getGithubGitAuthMode();
8909
8929
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
8910
8930
  githubSlug: turnOrigin?.forge === "github" ? turnOrigin.slug : await withTimeout(resolveGithubRepoSlug(fresh.worktreePath), 8e3, "resolveGithubRepoSlug").catch(() => null),
@@ -10245,7 +10265,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10245
10265
  if (Object.keys(patch).length === 0) continue;
10246
10266
  updateThread(t.id, patch);
10247
10267
  }
10248
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-XILTSD6L.js");
10268
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-X3UFWRAF.js");
10249
10269
  const latest = this.requireThread(thread.id);
10250
10270
  if (!shouldAutoArchiveOnPrMerge({
10251
10271
  previousPrState: prevState || null,
@@ -10557,7 +10577,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10557
10577
  await runArchiveScript(thread.repoPath, thread.worktreePath);
10558
10578
  } catch {
10559
10579
  }
10560
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-XILTSD6L.js");
10580
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-X3UFWRAF.js");
10561
10581
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
10562
10582
  await removeWorktreeDroppingLeftovers(thread, deleteBranch ? thread.branchName : void 0);
10563
10583
  }
@@ -10577,7 +10597,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10577
10597
  this.emit({ type: "status_changed", threadId: restored2.id, status: restored2.status });
10578
10598
  return restored2;
10579
10599
  }
10580
- if (!existsSync14(thread.worktreePath)) {
10600
+ if (!existsSync15(thread.worktreePath)) {
10581
10601
  if (isCowboyThread(thread) || isPrimaryCheckoutThread(thread)) {
10582
10602
  throw new Error(
10583
10603
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
@@ -10694,7 +10714,7 @@ async function startOrchestration(opts) {
10694
10714
  sourceRef: "default",
10695
10715
  ...createOpts
10696
10716
  }).catch(async () => {
10697
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-4ATMCYIE.js");
10717
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-7KG5N2XL.js");
10698
10718
  const repo = await resolveRepoRoot2(repoPath);
10699
10719
  const def = await resolveDefaultBranch2(repo);
10700
10720
  return orch.createThread({
@@ -10704,7 +10724,7 @@ async function startOrchestration(opts) {
10704
10724
  repoPath: repo
10705
10725
  });
10706
10726
  });
10707
- const { updateThread: upd } = await import("./thread-store-LME2ICZP.js");
10727
+ const { updateThread: upd } = await import("./thread-store-TDGZEGS6.js");
10708
10728
  const updated = upd(thread.id, {
10709
10729
  sourceType: "orchestration",
10710
10730
  sourceRef: goal