@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
@@ -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-UXAKH4AW.js";
18
+ } from "./chunk-MX2XU4BS.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-AEEOYLVK.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-SZY23KGS.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-CGB5CY4U.js");
584
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-EPVNFQVC.js");
583
585
  if (isGlobalThread2(thread)) {
584
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-J57Q4Z4W.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,7 @@ async function removeWorktreeDroppingLeftovers(thread, deleteBranch) {
871
873
  }
872
874
 
873
875
  // src/git/agent-git-actions.ts
876
+ 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
877
  var AGENT_GIT_ACTIONS = [
875
878
  "commit-push",
876
879
  "create-draft",
@@ -1036,6 +1039,9 @@ function expandCanonicalGitRequest(prompt, opts) {
1036
1039
  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
1040
  }
1038
1041
  if (!expansion) return prompt;
1042
+ if (action === "merge" && (!base || isMainishPrBase(base)) && opts?.hasAnnounceSkill) {
1043
+ expansion = `${expansion} ${ANNOUNCE_AFTER_MERGE}`;
1044
+ }
1039
1045
  if (expansionPushes(action, trimmed)) expansion = withPushReview(expansion);
1040
1046
  return `${trimmed}
1041
1047
 
@@ -1055,6 +1061,14 @@ function expansionPushes(action, prompt) {
1055
1061
  return prompt === "Address review comments." || FIX_CI_RE.test(prompt);
1056
1062
  }
1057
1063
 
1064
+ // src/git/announce-skill.ts
1065
+ import { existsSync } from "fs";
1066
+ import { join as join2 } from "path";
1067
+ function announceSkillPresent(worktreePath) {
1068
+ const root = worktreePath?.trim();
1069
+ return !!root && existsSync(join2(root, ".claude/skills/announce-on-x/SKILL.md"));
1070
+ }
1071
+
1058
1072
  // src/git/pr-merge-archive.ts
1059
1073
  function normalizePrState(state) {
1060
1074
  return (state ?? "").trim().toUpperCase();
@@ -1152,8 +1166,8 @@ function shouldAutoArchiveOnPrMerge(opts) {
1152
1166
 
1153
1167
  // src/store/setup-log.ts
1154
1168
  import { createHash } from "crypto";
1155
- import { existsSync, readFileSync, writeFileSync } from "fs";
1156
- import { join as join2 } from "path";
1169
+ import { existsSync as existsSync2, readFileSync, writeFileSync } from "fs";
1170
+ import { join as join3 } from "path";
1157
1171
  var EMPTY = {
1158
1172
  output: "",
1159
1173
  running: false,
@@ -1195,7 +1209,7 @@ function materialize(mem) {
1195
1209
  };
1196
1210
  }
1197
1211
  function setupLogPath(threadId) {
1198
- return join2(threadsDir(), `${threadId}.setup.log.json`);
1212
+ return join3(threadsDir(), `${threadId}.setup.log.json`);
1199
1213
  }
1200
1214
  function setupLogKeyForWorktree(worktreePath) {
1201
1215
  const norm = normalizeWorktreePath(worktreePath);
@@ -1235,7 +1249,7 @@ function schedulePersist(threadId) {
1235
1249
  }
1236
1250
  function loadFromDisk(threadId) {
1237
1251
  const path = setupLogPath(threadId);
1238
- if (!existsSync(path)) return null;
1252
+ if (!existsSync2(path)) return null;
1239
1253
  try {
1240
1254
  const raw = JSON.parse(readFileSync(path, "utf8"));
1241
1255
  return {
@@ -1296,8 +1310,8 @@ function finishSetupLog(threadId, exitCode, source) {
1296
1310
 
1297
1311
  // src/store/run-log.ts
1298
1312
  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";
1313
+ import { existsSync as existsSync3, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
1314
+ import { join as join4 } from "path";
1301
1315
  var EMPTY2 = {
1302
1316
  output: "",
1303
1317
  running: false,
@@ -1336,7 +1350,7 @@ function safeScriptToken(scriptName) {
1336
1350
  return token || "dev";
1337
1351
  }
1338
1352
  function runLogPath(key) {
1339
- return join3(threadsDir(), `${key}.run.log.json`);
1353
+ return join4(threadsDir(), `${key}.run.log.json`);
1340
1354
  }
1341
1355
  function runLogKeyForWorktree(worktreePath, scriptName) {
1342
1356
  const norm = normalizeWorktreePath(worktreePath);
@@ -1382,7 +1396,7 @@ function schedulePersist2(key) {
1382
1396
  }
1383
1397
  function loadFromDisk2(key) {
1384
1398
  const path = runLogPath(key);
1385
- if (!existsSync2(path)) return null;
1399
+ if (!existsSync3(path)) return null;
1386
1400
  try {
1387
1401
  const raw = JSON.parse(readFileSync2(path, "utf8"));
1388
1402
  return {
@@ -1444,8 +1458,8 @@ function flushRunLog(key) {
1444
1458
  }
1445
1459
 
1446
1460
  // src/git/orphan-cleanup.ts
1447
- import { existsSync as existsSync3, readdirSync, statSync } from "fs";
1448
- import { join as join4 } from "path";
1461
+ import { existsSync as existsSync4, readdirSync, statSync } from "fs";
1462
+ import { join as join5 } from "path";
1449
1463
  function isSideboardWorktreePath(path) {
1450
1464
  return path.includes("/.sideboard/worktrees/") || path.includes("/sideboard/workspaces/");
1451
1465
  }
@@ -1456,7 +1470,7 @@ async function findOrphanWorktrees(repoPaths) {
1456
1470
  repoPaths?.length ? repoPaths : threads.map((t) => t.repoPath).filter(Boolean)
1457
1471
  );
1458
1472
  const homeRoot = sideboardWorkspacesDir();
1459
- if (existsSync3(homeRoot)) {
1473
+ if (existsSync4(homeRoot)) {
1460
1474
  try {
1461
1475
  for (const entry of readdirSync(homeRoot, { withFileTypes: true })) {
1462
1476
  if (!entry.isDirectory()) continue;
@@ -1468,7 +1482,7 @@ async function findOrphanWorktrees(repoPaths) {
1468
1482
  const orphans = [];
1469
1483
  const seen = /* @__PURE__ */ new Set();
1470
1484
  for (const repoPath of repos) {
1471
- if (!repoPath || !existsSync3(repoPath)) continue;
1485
+ if (!repoPath || !existsSync4(repoPath)) continue;
1472
1486
  try {
1473
1487
  const wts = await listWorktrees(repoPath);
1474
1488
  for (const wt of wts) {
@@ -1489,12 +1503,12 @@ async function findOrphanWorktrees(repoPaths) {
1489
1503
  }
1490
1504
  try {
1491
1505
  const root = worktreesRoot(repoPath);
1492
- if (existsSync3(root)) {
1506
+ if (existsSync4(root)) {
1493
1507
  for (const entry of readdirSync(root, { withFileTypes: true })) {
1494
1508
  if (!entry.isDirectory()) continue;
1495
- const path = join4(root, entry.name).replace(/\/$/, "");
1509
+ const path = join5(root, entry.name).replace(/\/$/, "");
1496
1510
  if (known.has(path) || seen.has(path)) continue;
1497
- if (!existsSync3(join4(path, ".git"))) continue;
1511
+ if (!existsSync4(join5(path, ".git"))) continue;
1498
1512
  seen.add(path);
1499
1513
  let mtimeMs = 0;
1500
1514
  try {
@@ -1699,8 +1713,8 @@ async function applyThreadIntoMain(thread, opts) {
1699
1713
  }
1700
1714
 
1701
1715
  // src/git/clone-repo.ts
1702
- import { existsSync as existsSync4 } from "fs";
1703
- import { basename, join as join5 } from "path";
1716
+ import { existsSync as existsSync5 } from "fs";
1717
+ import { basename, join as join6 } from "path";
1704
1718
  import { execa as execa3 } from "execa";
1705
1719
  async function cloneRepoIntoSideboard(opts) {
1706
1720
  const url = opts.url.trim();
@@ -1711,8 +1725,8 @@ async function cloneRepoIntoSideboard(opts) {
1711
1725
  name = leaf || "repo";
1712
1726
  }
1713
1727
  name = name.replace(/[^a-zA-Z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "repo";
1714
- const dest = join5(sideboardReposDir(), name);
1715
- if (existsSync4(dest)) {
1728
+ const dest = join6(sideboardReposDir(), name);
1729
+ if (existsSync5(dest)) {
1716
1730
  const repoPath2 = await resolveRepoRoot(dest);
1717
1731
  const workspace2 = await addWorkspace(repoPath2);
1718
1732
  return { repoPath: repoPath2, workspace: workspace2 };
@@ -1735,9 +1749,9 @@ function isAdoptableRunScriptRequest(req) {
1735
1749
 
1736
1750
  // src/store/desktop-host.ts
1737
1751
  import { readFileSync as readFileSync3, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
1738
- import { join as join6 } from "path";
1752
+ import { join as join7 } from "path";
1739
1753
  function desktopHostPidPath() {
1740
- return join6(appDataDir(), "desktop-host.pid");
1754
+ return join7(appDataDir(), "desktop-host.pid");
1741
1755
  }
1742
1756
  function readDesktopHostPid() {
1743
1757
  try {
@@ -2450,7 +2464,7 @@ function agentPurposeStamp(input) {
2450
2464
  }
2451
2465
 
2452
2466
  // src/threads/create.ts
2453
- import { existsSync as existsSync5 } from "fs";
2467
+ import { existsSync as existsSync6 } from "fs";
2454
2468
 
2455
2469
  // src/detect/detect.ts
2456
2470
  var REQUIRE_AGENT_TIMEOUT_MS = 8e3;
@@ -3082,7 +3096,7 @@ function reuseLiveThread(input, repoPath, match) {
3082
3096
  }
3083
3097
  async function createThread(input, _onSetupLine) {
3084
3098
  const repoPath = await resolveRepoRoot(input.repoPath);
3085
- if (!existsSync5(repoPath)) {
3099
+ if (!existsSync6(repoPath)) {
3086
3100
  throw new Error(`Repo not found: ${repoPath}`);
3087
3101
  }
3088
3102
  if (isRemovedWorkspace(repoPath)) throw new Error(`Project was removed: ${repoPath}`);
@@ -3102,7 +3116,7 @@ async function createThread(input, _onSetupLine) {
3102
3116
  const acpHarness = resolved.agent === "acp" ? input.acpHarness === "gemini" || input.acpHarness === "copilot" ? input.acpHarness : defaultAcpHarness() : void 0;
3103
3117
  await requireAgent(resolved.agent, { acpHarness });
3104
3118
  if (input.cowboy) {
3105
- const { cowboyModeEnabled } = await import("./app-settings-XILTSD6L.js");
3119
+ const { cowboyModeEnabled } = await import("./app-settings-X3UFWRAF.js");
3106
3120
  if (!cowboyModeEnabled()) {
3107
3121
  throw new Error(
3108
3122
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -3162,7 +3176,7 @@ async function createThread(input, _onSetupLine) {
3162
3176
  let sourceIsFork = false;
3163
3177
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
3164
3178
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
3165
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-URSRZW7P.js");
3179
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-VUPUERE4.js");
3166
3180
  const task = await ensureAbleTimeTask({
3167
3181
  title: title?.trim() || "Untitled work",
3168
3182
  description: input.prompt?.trim() || void 0
@@ -3613,7 +3627,7 @@ function createLineCoalescer(onChunk, opts) {
3613
3627
 
3614
3628
  // src/store/turn-live.ts
3615
3629
  import {
3616
- existsSync as existsSync6,
3630
+ existsSync as existsSync7,
3617
3631
  renameSync,
3618
3632
  unlinkSync as unlinkSync2,
3619
3633
  writeFileSync as writeFileSync4,
@@ -3709,7 +3723,7 @@ function readTurnLiveParts(threadId) {
3709
3723
  }
3710
3724
  function readTurnLive(threadId) {
3711
3725
  const path = threadLivePath(threadId);
3712
- if (!existsSync6(path)) return null;
3726
+ if (!existsSync7(path)) return null;
3713
3727
  try {
3714
3728
  const raw = JSON.parse(readFileSync4(path, "utf8"));
3715
3729
  if (!raw || typeof raw.summary !== "string") return null;
@@ -3723,7 +3737,7 @@ function clearTurnLive(threadId) {
3723
3737
  if (buf?.timer) clearTimeout(buf.timer);
3724
3738
  buffers.delete(threadId);
3725
3739
  const path = threadLivePath(threadId);
3726
- if (!existsSync6(path)) return;
3740
+ if (!existsSync7(path)) return;
3727
3741
  try {
3728
3742
  unlinkSync2(path);
3729
3743
  } catch {
@@ -3974,26 +3988,26 @@ function createQuotaFailoverChat(from, fallbackAgent, limitText, opts) {
3974
3988
  import { execFileSync as execFileSync2 } from "child_process";
3975
3989
  import {
3976
3990
  copyFileSync,
3977
- existsSync as existsSync7,
3991
+ existsSync as existsSync8,
3978
3992
  mkdtempSync,
3979
3993
  readdirSync as readdirSync2,
3980
3994
  readFileSync as readFileSync5,
3981
3995
  rmSync as rmSync2
3982
3996
  } from "fs";
3983
3997
  import { tmpdir } from "os";
3984
- import { join as join7 } from "path";
3998
+ import { join as join8 } from "path";
3985
3999
  import { createRequire } from "module";
3986
- var CONDUCTOR_APP_SUPPORT = join7(
4000
+ var CONDUCTOR_APP_SUPPORT = join8(
3987
4001
  process.env.HOME ?? "",
3988
4002
  "Library",
3989
4003
  "Application Support",
3990
4004
  "com.conductor.app"
3991
4005
  );
3992
- var CONDUCTOR_DB = join7(CONDUCTOR_APP_SUPPORT, "conductor.db");
3993
- var CURSOR_SDK_STORE = join7(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
4006
+ var CONDUCTOR_DB = join8(CONDUCTOR_APP_SUPPORT, "conductor.db");
4007
+ var CURSOR_SDK_STORE = join8(CONDUCTOR_APP_SUPPORT, "cursor-sdk-store");
3994
4008
  function thisModuleFile() {
3995
4009
  const cjsFile = typeof __filename !== "undefined" ? __filename : "";
3996
- return cjsFile || process.argv[1] || join7(process.cwd(), "package.json");
4010
+ return cjsFile || process.argv[1] || join8(process.cwd(), "package.json");
3997
4011
  }
3998
4012
  function openReadonlySqlite(file) {
3999
4013
  const req = createRequire(thisModuleFile());
@@ -4011,7 +4025,7 @@ function mapAgentType(raw) {
4011
4025
  return null;
4012
4026
  }
4013
4027
  function resolveConductorCursorAgentId(workspacePath) {
4014
- if (!workspacePath || !existsSync7(CURSOR_SDK_STORE)) return null;
4028
+ if (!workspacePath || !existsSync8(CURSOR_SDK_STORE)) return null;
4015
4029
  const normalized = workspacePath.replace(/\/$/, "");
4016
4030
  let best = null;
4017
4031
  let hashes;
@@ -4021,8 +4035,8 @@ function resolveConductorCursorAgentId(workspacePath) {
4021
4035
  return null;
4022
4036
  }
4023
4037
  for (const hash of hashes) {
4024
- const agentsFile = join7(CURSOR_SDK_STORE, hash, "agents.ndjson");
4025
- if (!existsSync7(agentsFile)) continue;
4038
+ const agentsFile = join8(CURSOR_SDK_STORE, hash, "agents.ndjson");
4039
+ if (!existsSync8(agentsFile)) continue;
4026
4040
  let text3;
4027
4041
  try {
4028
4042
  text3 = readFileSync5(agentsFile, "utf8");
@@ -4049,7 +4063,7 @@ function resolveConductorCursorAgentId(workspacePath) {
4049
4063
  return best?.agentId ?? null;
4050
4064
  }
4051
4065
  async function adoptThread(input) {
4052
- if (!existsSync7(input.worktreePath)) {
4066
+ if (!existsSync8(input.worktreePath)) {
4053
4067
  throw new Error(`Worktree not found: ${input.worktreePath}`);
4054
4068
  }
4055
4069
  const repoPath = await resolveRepoRoot(input.worktreePath);
@@ -4071,23 +4085,23 @@ async function adoptThread(input) {
4071
4085
  messages: input.messages ?? []
4072
4086
  });
4073
4087
  writeThread(thread);
4074
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-7DPHDXNY.js");
4088
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-SQRR67HD.js");
4075
4089
  await addWorkspace2(repoPath);
4076
4090
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-KMZQXZKP.js");
4077
4091
  await ensureWorktreeSideboardIgnored(input.worktreePath);
4078
4092
  return thread;
4079
4093
  }
4080
4094
  function listConductorWorkspaces() {
4081
- if (!existsSync7(CONDUCTOR_DB)) {
4095
+ if (!existsSync8(CONDUCTOR_DB)) {
4082
4096
  throw new Error(`Conductor DB not found at ${CONDUCTOR_DB}`);
4083
4097
  }
4084
- const tmp = mkdtempSync(join7(tmpdir(), "sideboard-conductor-"));
4085
- const snapshot = join7(tmp, "conductor.db");
4098
+ const tmp = mkdtempSync(join8(tmpdir(), "sideboard-conductor-"));
4099
+ const snapshot = join8(tmp, "conductor.db");
4086
4100
  try {
4087
4101
  copyFileSync(CONDUCTOR_DB, snapshot);
4088
4102
  for (const suffix of ["-wal", "-shm"]) {
4089
4103
  const src = `${CONDUCTOR_DB}${suffix}`;
4090
- if (existsSync7(src)) {
4104
+ if (existsSync8(src)) {
4091
4105
  try {
4092
4106
  copyFileSync(src, `${snapshot}${suffix}`);
4093
4107
  } catch {
@@ -4169,16 +4183,16 @@ function listConductorWorkspaces() {
4169
4183
  }
4170
4184
  }
4171
4185
  function importConductorWorkspace(workspaceId) {
4172
- if (!existsSync7(CONDUCTOR_DB)) {
4186
+ if (!existsSync8(CONDUCTOR_DB)) {
4173
4187
  throw new Error(`Conductor DB not found at ${CONDUCTOR_DB}`);
4174
4188
  }
4175
- const tmp = mkdtempSync(join7(tmpdir(), "sideboard-conductor-"));
4176
- const snapshot = join7(tmp, "conductor.db");
4189
+ const tmp = mkdtempSync(join8(tmpdir(), "sideboard-conductor-"));
4190
+ const snapshot = join8(tmp, "conductor.db");
4177
4191
  try {
4178
4192
  copyFileSync(CONDUCTOR_DB, snapshot);
4179
4193
  for (const suffix of ["-wal", "-shm"]) {
4180
4194
  const src = `${CONDUCTOR_DB}${suffix}`;
4181
- if (existsSync7(src)) {
4195
+ if (existsSync8(src)) {
4182
4196
  try {
4183
4197
  copyFileSync(src, `${snapshot}${suffix}`);
4184
4198
  } catch {
@@ -4198,7 +4212,7 @@ function importConductorWorkspace(workspaceId) {
4198
4212
  ).get(workspaceId);
4199
4213
  if (!row) throw new Error(`Conductor workspace not found: ${workspaceId}`);
4200
4214
  const worktreePath = String(row.workspacePath);
4201
- if (!existsSync7(worktreePath)) {
4215
+ if (!existsSync8(worktreePath)) {
4202
4216
  throw new Error(`Conductor worktree missing on disk: ${worktreePath}`);
4203
4217
  }
4204
4218
  let sessionId = null;
@@ -4269,7 +4283,7 @@ async function importConductorWorkspaceAsync(workspaceId) {
4269
4283
  }
4270
4284
 
4271
4285
  // src/threads/stack-layers.ts
4272
- import { existsSync as existsSync8 } from "fs";
4286
+ import { existsSync as existsSync9 } from "fs";
4273
4287
  function stackIdFrom(stack) {
4274
4288
  if (stack.stackNumber != null) return `gh-stack-${stack.stackNumber}`;
4275
4289
  const key = stack.layers.map((l) => l.branchName).join("|");
@@ -4332,7 +4346,7 @@ async function openStackLayer(input, _onSetupLine) {
4332
4346
  let createdWorktree = false;
4333
4347
  const trees = await listWorktrees(repoPath);
4334
4348
  const checkedOut = trees.find((w) => w.branch === branchName);
4335
- if (checkedOut?.path && existsSync8(checkedOut.path)) {
4349
+ if (checkedOut?.path && existsSync9(checkedOut.path)) {
4336
4350
  if (input.reuseExistingWorktree !== false) {
4337
4351
  worktreePath = checkedOut.path;
4338
4352
  } else {
@@ -4474,7 +4488,7 @@ async function initStackFromThread(input, onSetupLine) {
4474
4488
  async function createPrStack(input, onSetupLine) {
4475
4489
  await requireAgent(input.agent);
4476
4490
  const repoPath = await resolveRepoRoot(input.repoPath);
4477
- if (!existsSync8(repoPath)) throw new Error(`Repo not found: ${repoPath}`);
4491
+ if (!existsSync9(repoPath)) throw new Error(`Repo not found: ${repoPath}`);
4478
4492
  if (!input.branches.length) throw new Error("At least one branch name required");
4479
4493
  const status = await detectGhStack(repoPath);
4480
4494
  if (!status.available) throw new Error(status.reason);
@@ -4541,7 +4555,7 @@ async function createPrStack(input, onSetupLine) {
4541
4555
  }
4542
4556
  }
4543
4557
  const claimed = new Set(threads.map((t) => t.worktreePath));
4544
- if (!claimed.has(bootstrap.worktreePath) && existsSync8(bootstrap.worktreePath)) {
4558
+ if (!claimed.has(bootstrap.worktreePath) && existsSync9(bootstrap.worktreePath)) {
4545
4559
  try {
4546
4560
  await removeWorktree(repoPath, bootstrap.worktreePath, {
4547
4561
  deleteBranch: bootstrap.branchName
@@ -4556,7 +4570,7 @@ async function createPrStack(input, onSetupLine) {
4556
4570
  import { randomBytes } from "crypto";
4557
4571
  import { unlinkSync as unlinkSync3, writeFileSync as writeFileSync5 } from "fs";
4558
4572
  import { tmpdir as tmpdir2 } from "os";
4559
- import { join as join8 } from "path";
4573
+ import { join as join9 } from "path";
4560
4574
  async function lookupGithubGraphqlReset(cwd) {
4561
4575
  const result = await gh(["api", "rate_limit"], cwd, { reject: false });
4562
4576
  if (result.exitCode !== 0 || !result.stdout.trim()) return void 0;
@@ -4584,7 +4598,7 @@ async function formatPrCreateFailure(raw, cwd, ctx) {
4584
4598
  }
4585
4599
  async function createCursorPullRequest(worktreePath, slug, opts) {
4586
4600
  const bodyText = (opts.body ?? opts.title).trim() || opts.title;
4587
- const bodyFile = join8(
4601
+ const bodyFile = join9(
4588
4602
  tmpdir2(),
4589
4603
  `sideboard-pr-body-${process.pid}-${randomBytes(6).toString("hex")}.md`
4590
4604
  );
@@ -4626,7 +4640,7 @@ async function createOrUpdatePr(worktreePath, opts) {
4626
4640
  const headRef = ghHeadRef(slug, opts.head);
4627
4641
  const branchOnly = opts.head.trim().replace(/^refs\/heads\//, "");
4628
4642
  const bodyText = clampGithubPrBody(opts.body ?? opts.title);
4629
- const bodyFile = join8(
4643
+ const bodyFile = join9(
4630
4644
  tmpdir2(),
4631
4645
  `sideboard-pr-body-${process.pid}-${randomBytes(6).toString("hex")}.md`
4632
4646
  );
@@ -4721,10 +4735,10 @@ async function createOrUpdatePrWithBodyFile(worktreePath, opts) {
4721
4735
  }
4722
4736
 
4723
4737
  // 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";
4738
+ import { existsSync as existsSync10, mkdirSync, readFileSync as readFileSync6, statSync as statSync2, writeFileSync as writeFileSync6 } from "fs";
4739
+ import { dirname as dirname2, join as join10 } from "path";
4726
4740
  async function inspectGitWorktree(worktreePath) {
4727
- if (!worktreePath || !existsSync9(worktreePath)) return "missing_worktree";
4741
+ if (!worktreePath || !existsSync10(worktreePath)) return "missing_worktree";
4728
4742
  const check = await git(["rev-parse", "--is-inside-work-tree"], worktreePath, {
4729
4743
  reject: false
4730
4744
  });
@@ -4732,7 +4746,7 @@ async function inspectGitWorktree(worktreePath) {
4732
4746
  return "ok";
4733
4747
  }
4734
4748
  async function initializeGitRepository(worktreePath) {
4735
- if (!worktreePath || !existsSync9(worktreePath)) {
4749
+ if (!worktreePath || !existsSync10(worktreePath)) {
4736
4750
  throw new Error("Worktree not found");
4737
4751
  }
4738
4752
  const status = await inspectGitWorktree(worktreePath);
@@ -4868,7 +4882,7 @@ new file mode 100644
4868
4882
  };
4869
4883
  }
4870
4884
  async function untrackedPatch(worktreePath, path, maxHunk) {
4871
- const abs = join9(worktreePath, path);
4885
+ const abs = join10(worktreePath, path);
4872
4886
  try {
4873
4887
  const st = statSync2(abs);
4874
4888
  if (st.isFile() && st.size > maxHunk) {
@@ -5340,8 +5354,8 @@ async function getDiff(worktreePath, repoPath, opts) {
5340
5354
  }
5341
5355
  function statWorktreePath(worktreePath, relativePath) {
5342
5356
  assertSafeRelativePath(relativePath);
5343
- const abs = join9(worktreePath, relativePath);
5344
- if (!existsSync9(abs)) return "missing";
5357
+ const abs = join10(worktreePath, relativePath);
5358
+ if (!existsSync10(abs)) return "missing";
5345
5359
  const st = statSync2(abs);
5346
5360
  if (st.isDirectory()) return "dir";
5347
5361
  if (st.isFile()) return "file";
@@ -5382,7 +5396,7 @@ var DEFAULT_UPLOAD_MAX_BYTES = 5e7;
5382
5396
  function readWorktreeFileForUpload(worktreePath, relativePath, opts) {
5383
5397
  assertSafeRelativePath(relativePath);
5384
5398
  const maxBytes = opts?.maxBytes ?? DEFAULT_UPLOAD_MAX_BYTES;
5385
- const abs = join9(worktreePath, relativePath);
5399
+ const abs = join10(worktreePath, relativePath);
5386
5400
  const st = statSync2(abs);
5387
5401
  if (!st.isFile()) {
5388
5402
  throw new Error(`Not a file: ${relativePath}`);
@@ -5402,7 +5416,7 @@ function readWorktreeFileForUpload(worktreePath, relativePath, opts) {
5402
5416
  function readWorktreeFile(worktreePath, relativePath, opts) {
5403
5417
  assertSafeRelativePath(relativePath);
5404
5418
  const maxBytes = opts?.maxBytes ?? 2e5;
5405
- const abs = join9(worktreePath, relativePath);
5419
+ const abs = join10(worktreePath, relativePath);
5406
5420
  const st = statSync2(abs);
5407
5421
  if (!st.isFile()) {
5408
5422
  throw new Error(`Not a file: ${relativePath}`);
@@ -5450,7 +5464,7 @@ function assertSafeRelativePath(relativePath) {
5450
5464
  }
5451
5465
  function writeWorktreeFile(worktreePath, relativePath, content) {
5452
5466
  assertSafeRelativePath(relativePath);
5453
- const abs = join9(worktreePath, relativePath);
5467
+ const abs = join10(worktreePath, relativePath);
5454
5468
  mkdirSync(dirname2(abs), { recursive: true });
5455
5469
  writeFileSync6(abs, content, "utf8");
5456
5470
  return { path: relativePath };
@@ -5675,13 +5689,13 @@ async function confirmLand(thread, opts) {
5675
5689
 
5676
5690
  // src/diff/read-worktree-tail.ts
5677
5691
  import { closeSync, fstatSync, openSync, readSync } from "fs";
5678
- import { join as join10 } from "path";
5692
+ import { join as join11 } from "path";
5679
5693
  var WORKTREE_TAIL_BYTES = 2e5;
5680
5694
  function readWorktreeFileTail(worktreePath, relativePath, maxBytes = WORKTREE_TAIL_BYTES) {
5681
5695
  if (!relativePath || relativePath.includes("..") || relativePath.startsWith("/")) {
5682
5696
  throw new Error("Invalid path");
5683
5697
  }
5684
- const abs = join10(worktreePath, relativePath);
5698
+ const abs = join11(worktreePath, relativePath);
5685
5699
  const fd = openSync(abs, "r");
5686
5700
  try {
5687
5701
  const st = fstatSync(fd);
@@ -5713,9 +5727,9 @@ function readWorktreeFileTail(worktreePath, relativePath, maxBytes = WORKTREE_TA
5713
5727
  }
5714
5728
 
5715
5729
  // src/skills/discover.ts
5716
- import { existsSync as existsSync10, readdirSync as readdirSync3, readFileSync as readFileSync7, statSync as statSync3 } from "fs";
5730
+ import { existsSync as existsSync11, readdirSync as readdirSync3, readFileSync as readFileSync7, statSync as statSync3 } from "fs";
5717
5731
  import { homedir } from "os";
5718
- import { join as join11 } from "path";
5732
+ import { join as join12 } from "path";
5719
5733
 
5720
5734
  // src/skills/bundled/long-running.ts
5721
5735
  var LONG_RUNNING_SKILL_COMMAND = "long-running";
@@ -5875,7 +5889,7 @@ function readSkill(skillMd, source) {
5875
5889
  }
5876
5890
  }
5877
5891
  function scanSkillsDir(dir, source, out) {
5878
- if (!existsSync10(dir)) return;
5892
+ if (!existsSync11(dir)) return;
5879
5893
  let entries;
5880
5894
  try {
5881
5895
  entries = readdirSync3(dir);
@@ -5884,8 +5898,8 @@ function scanSkillsDir(dir, source, out) {
5884
5898
  }
5885
5899
  for (const entry of entries) {
5886
5900
  if (entry.startsWith(".")) continue;
5887
- const skillMd = join11(dir, entry, "SKILL.md");
5888
- if (!existsSync10(skillMd)) continue;
5901
+ const skillMd = join12(dir, entry, "SKILL.md");
5902
+ if (!existsSync11(skillMd)) continue;
5889
5903
  try {
5890
5904
  if (!statSync3(skillMd).isFile()) continue;
5891
5905
  } catch {
@@ -5896,7 +5910,7 @@ function scanSkillsDir(dir, source, out) {
5896
5910
  }
5897
5911
  }
5898
5912
  function scanClaudePluginSkills(pluginsRoot, out) {
5899
- if (!existsSync10(pluginsRoot)) return;
5913
+ if (!existsSync11(pluginsRoot)) return;
5900
5914
  const walk = (dir, depth, lookingForSkillsDir) => {
5901
5915
  if (depth > 7) return;
5902
5916
  let entries;
@@ -5906,12 +5920,12 @@ function scanClaudePluginSkills(pluginsRoot, out) {
5906
5920
  return;
5907
5921
  }
5908
5922
  if (lookingForSkillsDir && entries.includes("SKILL.md")) {
5909
- const skill = readSkill(join11(dir, "SKILL.md"), "cli");
5923
+ const skill = readSkill(join12(dir, "SKILL.md"), "cli");
5910
5924
  if (skill) out.push(skill);
5911
5925
  }
5912
5926
  for (const entry of entries) {
5913
5927
  if (entry === "node_modules" || entry === ".git") continue;
5914
- const full = join11(dir, entry);
5928
+ const full = join12(dir, entry);
5915
5929
  try {
5916
5930
  if (!statSync3(full).isDirectory()) continue;
5917
5931
  } catch {
@@ -5931,17 +5945,17 @@ function discoverSkills(worktreePath) {
5931
5945
  const home = homedir();
5932
5946
  const collected = [];
5933
5947
  for (const rel of [".claude/skills", ".cursor/skills", ".sideboard/skills", ".brightsy/skills", "skills"]) {
5934
- scanSkillsDir(join11(worktreePath, rel), "workspace", collected);
5948
+ scanSkillsDir(join12(worktreePath, rel), "workspace", collected);
5935
5949
  }
5936
5950
  for (const abs of [
5937
- join11(home, ".claude/skills"),
5938
- join11(home, ".cursor/skills"),
5939
- join11(home, ".sideboard/skills"),
5940
- join11(home, ".brightsy/skills")
5951
+ join12(home, ".claude/skills"),
5952
+ join12(home, ".cursor/skills"),
5953
+ join12(home, ".sideboard/skills"),
5954
+ join12(home, ".brightsy/skills")
5941
5955
  ]) {
5942
5956
  scanSkillsDir(abs, "user", collected);
5943
5957
  }
5944
- scanClaudePluginSkills(join11(home, ".claude/plugins"), collected);
5958
+ scanClaudePluginSkills(join12(home, ".claude/plugins"), collected);
5945
5959
  collected.push(...bundledSkills());
5946
5960
  const rank = {
5947
5961
  workspace: 0,
@@ -6243,7 +6257,11 @@ function promptForJoinedSteer(input) {
6243
6257
  }
6244
6258
  const { agentPrompt: expandedLatest } = expandComposerPrompt(
6245
6259
  input.worktreePath,
6246
- expandCanonicalGitRequest(input.latestPrompt, { forge: input.gitForge }),
6260
+ expandCanonicalGitRequest(input.latestPrompt, {
6261
+ forge: input.gitForge,
6262
+ worktreePath: input.worktreePath,
6263
+ hasAnnounceSkill: announceSkillPresent(input.worktreePath)
6264
+ }),
6247
6265
  { attachments: latestAttachments }
6248
6266
  );
6249
6267
  return input.expandedPrompt && input.agentPrompt.endsWith(input.expandedPrompt) ? input.agentPrompt.slice(0, -input.expandedPrompt.length) + expandedLatest : `${input.agentPrompt}
@@ -6268,10 +6286,10 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6268
6286
  throw new Error(`Thread is archived: ${thread.id}`);
6269
6287
  }
6270
6288
  const requested = opts?.followUp;
6271
- const join15 = requested === "join";
6289
+ const join16 = requested === "join";
6272
6290
  const followUp = resolveSendFollowUp(
6273
6291
  current,
6274
- join15 ? "steer" : requested
6292
+ join16 ? "steer" : requested
6275
6293
  );
6276
6294
  const explicit = opts?.attachments;
6277
6295
  const consumed = explicit !== void 0 ? { attachments: current.attachments, consumed: explicit } : consumeComposerAttachments(current);
@@ -6280,7 +6298,7 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6280
6298
  const draft = host.openSteerPrompt.get(current.id);
6281
6299
  const queuedHead = !inFlightEarly && current.status === "queued" && current.queue.length > 0 ? current.queue[0] : null;
6282
6300
  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;
6301
+ const unanswered = followUp === "steer" && !agentHasRepliedEarly && (!join16 || joinCanMerge) ? draft?.text ?? (inFlightEarly ? trailingUnansweredUserText(current.messages) : queuedHead) : null;
6284
6302
  if (unanswered != null && (draft ? !draft.spawned : queuedHead != null)) {
6285
6303
  clearSendBookkeeping(host, thread.id);
6286
6304
  const combined = joinSteerPrompt(unanswered, prompt);
@@ -6332,7 +6350,7 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6332
6350
  clearSendBookkeeping(host, thread.id);
6333
6351
  const inFlight = host.activeTurns.has(thread.id) || host.startingTurns.has(thread.id) || current.status === "running";
6334
6352
  shouldSteer = sendFollowUpInterrupts(
6335
- join15 ? "join" : followUp,
6353
+ join16 ? "join" : followUp,
6336
6354
  inFlight || current.queue.length > 0
6337
6355
  );
6338
6356
  const patch = queued;
@@ -6358,8 +6376,8 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6358
6376
  }
6359
6377
 
6360
6378
  // src/agents/instructions.ts
6361
- import { existsSync as existsSync12 } from "fs";
6362
- import { join as join13 } from "path";
6379
+ import { existsSync as existsSync13 } from "fs";
6380
+ import { join as join14 } from "path";
6363
6381
 
6364
6382
  // src/agents/forge-git-directives.ts
6365
6383
  function formatCursorGitDirective(slug) {
@@ -6384,8 +6402,8 @@ function formatEntireGitDirective(slug) {
6384
6402
  }
6385
6403
 
6386
6404
  // src/skills/detached-job-path.ts
6387
- import { existsSync as existsSync11 } from "fs";
6388
- import { dirname as dirname3, join as join12 } from "path";
6405
+ import { existsSync as existsSync12 } from "fs";
6406
+ import { dirname as dirname3, join as join13 } from "path";
6389
6407
  import { fileURLToPath } from "url";
6390
6408
  var DETACHED_JOB_FILENAMES = ["detached-job.cjs", "detached-job.js"];
6391
6409
  function compiledModuleDir() {
@@ -6402,8 +6420,8 @@ function compiledModuleDir() {
6402
6420
  }
6403
6421
  function detachedJobScriptIn(dir) {
6404
6422
  for (const name of DETACHED_JOB_FILENAMES) {
6405
- const script = join12(dir, "scripts", name);
6406
- if (existsSync11(script)) return script;
6423
+ const script = join13(dir, "scripts", name);
6424
+ if (existsSync12(script)) return script;
6407
6425
  }
6408
6426
  return null;
6409
6427
  }
@@ -6527,6 +6545,7 @@ function formatWorktreeDirective(thread, opts) {
6527
6545
  lines.push(
6528
6546
  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
6547
  );
6548
+ 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
6549
  if (thread.prUrl) {
6531
6550
  lines.push(
6532
6551
  `- A PR already exists (${thread.prUrl}). Update it (push + edit title/body if the purpose drifted) instead of opening a duplicate.`
@@ -6553,6 +6572,7 @@ function formatWorktreeDirective(thread, opts) {
6553
6572
  );
6554
6573
  lines.push("");
6555
6574
  lines.push(formatDevAccessHint(opts?.activeRuns));
6575
+ lines.push(formatComputerUseHint(computerUseEnabled()));
6556
6576
  lines.push("");
6557
6577
  lines.push(
6558
6578
  "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 +6684,16 @@ function formatPrGateDirective() {
6664
6684
  }
6665
6685
  function formatProcessGuideDirective(opts) {
6666
6686
  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"));
6687
+ const hasGraphSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/graph-engineering/SKILL.md"));
6688
+ const hasReviewSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/review/SKILL.md"));
6689
+ const hasInstallSkill = !!worktree && existsSync13(join14(worktree, ".claude/skills/worktree-install/SKILL.md"));
6670
6690
  return [
6671
6691
  "Process guides (recurring work only):",
6672
6692
  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
6693
  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
6694
  "- 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
6695
  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."
6696
+ !!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
6697
  ].filter(Boolean).join("\n");
6678
6698
  }
6679
6699
  function formatLongRunningDirective(opts) {
@@ -7101,8 +7121,8 @@ async function syncThreadBranchFromGit(threadId) {
7101
7121
  }
7102
7122
 
7103
7123
  // src/orchestrator/github-edge-watch.ts
7104
- import { existsSync as existsSync13, readFileSync as readFileSync8 } from "fs";
7105
- import { join as join14 } from "path";
7124
+ import { existsSync as existsSync14, readFileSync as readFileSync8 } from "fs";
7125
+ import { join as join15 } from "path";
7106
7126
 
7107
7127
  // src/orchestrator/github-edge.ts
7108
7128
  var GITHUB_EDGE_COOLDOWN_MS = 30 * 6e4;
@@ -7372,12 +7392,12 @@ var timer = null;
7372
7392
  var polling = false;
7373
7393
  var needsBaseline = true;
7374
7394
  function githubEdgeSnapshotPath() {
7375
- return join14(appDataDir(), "github-edge-watch.json");
7395
+ return join15(appDataDir(), "github-edge-watch.json");
7376
7396
  }
7377
7397
  function loadGithubEdgeSnapshot() {
7378
7398
  try {
7379
7399
  const path = githubEdgeSnapshotPath();
7380
- if (!existsSync13(path)) return emptyGithubEdgeSnapshot();
7400
+ if (!existsSync14(path)) return emptyGithubEdgeSnapshot();
7381
7401
  return coerceGithubEdgeSnapshot(JSON.parse(readFileSync8(path, "utf8")));
7382
7402
  } catch {
7383
7403
  return emptyGithubEdgeSnapshot();
@@ -7673,11 +7693,11 @@ function realDeps() {
7673
7693
  parentIdForThread,
7674
7694
  designatedId: designatedOrchestratorId,
7675
7695
  send: async (threadId, prompt) => {
7676
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-DMEE7CEW.js");
7696
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-YCGWSIHF.js");
7677
7697
  await getOrchestrator2().send(threadId, prompt, { followUp: "queue" });
7678
7698
  },
7679
7699
  startOrchestration: async (prompt) => {
7680
- const { startOrchestration: startOrchestration2 } = await import("./orchestrator-DMEE7CEW.js");
7700
+ const { startOrchestration: startOrchestration2 } = await import("./orchestrator-YCGWSIHF.js");
7681
7701
  const defaults = resolveOrchestratorDefaults();
7682
7702
  await startOrchestration2({
7683
7703
  goal: prompt,
@@ -7704,7 +7724,7 @@ function formatScheduledPrompt(name, prompt) {
7704
7724
  ${prompt}`;
7705
7725
  }
7706
7726
  async function defaultDeps() {
7707
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-DMEE7CEW.js");
7727
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-YCGWSIHF.js");
7708
7728
  const orch = getOrchestrator2();
7709
7729
  return {
7710
7730
  findThread: (id) => findThreadByRef(id),
@@ -7905,7 +7925,7 @@ ${item.prompt}`);
7905
7925
  }
7906
7926
  }
7907
7927
  async function defaultSend(id, prompt) {
7908
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-DMEE7CEW.js");
7928
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-YCGWSIHF.js");
7909
7929
  await getOrchestrator2().send(id, prompt, { followUp: "join" });
7910
7930
  }
7911
7931
  function armChatFollowUps() {
@@ -8062,7 +8082,7 @@ var Orchestrator = class {
8062
8082
  this.lightReconcileAt.set(repoPath, Date.now());
8063
8083
  for (const thread of listThreads()) {
8064
8084
  if (isGlobalThread(thread) || thread.repoPath !== repoPath) continue;
8065
- if (!existsSync14(thread.worktreePath)) {
8085
+ if (!existsSync15(thread.worktreePath)) {
8066
8086
  setStatus(thread.id, "broken", "Worktree missing on disk");
8067
8087
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
8068
8088
  }
@@ -8091,7 +8111,7 @@ var Orchestrator = class {
8091
8111
  }
8092
8112
  continue;
8093
8113
  }
8094
- if (!existsSync14(thread.worktreePath)) {
8114
+ if (!existsSync15(thread.worktreePath)) {
8095
8115
  setStatus(thread.id, "broken", "Worktree missing on disk");
8096
8116
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
8097
8117
  continue;
@@ -8130,7 +8150,7 @@ var Orchestrator = class {
8130
8150
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
8131
8151
  });
8132
8152
  }
8133
- const { autoCleanupOrphansEnabled } = await import("./app-settings-XILTSD6L.js");
8153
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-X3UFWRAF.js");
8134
8154
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
8135
8155
  await cleanupOrphanWorktrees({ repoPaths });
8136
8156
  }
@@ -8520,7 +8540,7 @@ var Orchestrator = class {
8520
8540
  }
8521
8541
  await setup;
8522
8542
  if (skipSetup) return;
8523
- const { autoRunAfterSetupEnabled } = await import("./app-settings-XILTSD6L.js");
8543
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-X3UFWRAF.js");
8524
8544
  if (autoRunAfterSetupEnabled()) {
8525
8545
  try {
8526
8546
  await this.startDev(threadId);
@@ -8819,7 +8839,11 @@ var Orchestrator = class {
8819
8839
  }
8820
8840
  thread = this.requireThread(threadId);
8821
8841
  const turnOrigin = thread.worktreePath?.trim() ? await resolveOriginRemote(thread.worktreePath).catch(() => null) : null;
8822
- const gitPrompt = expandCanonicalGitRequest(promptText, { forge: turnOrigin?.forge });
8842
+ const gitPrompt = expandCanonicalGitRequest(promptText, {
8843
+ forge: turnOrigin?.forge,
8844
+ worktreePath: thread.worktreePath,
8845
+ hasAnnounceSkill: announceSkillPresent(thread.worktreePath)
8846
+ });
8823
8847
  const expandedAttachments = openSteerTurnAttachments(this.openSteerPrompt.get(threadId), turnAttachments, autoContinue);
8824
8848
  const { agentPrompt: expandedPrompt } = expandComposerPrompt(
8825
8849
  thread.worktreePath,
@@ -8904,7 +8928,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
8904
8928
  }
8905
8929
  const isBrightsy = fresh.agent === "brightsy";
8906
8930
  const isOrchestration = isOrchestratorThread(fresh);
8907
- const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-XILTSD6L.js");
8931
+ const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-X3UFWRAF.js");
8908
8932
  const gitAuthMode = getGithubGitAuthMode();
8909
8933
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
8910
8934
  githubSlug: turnOrigin?.forge === "github" ? turnOrigin.slug : await withTimeout(resolveGithubRepoSlug(fresh.worktreePath), 8e3, "resolveGithubRepoSlug").catch(() => null),
@@ -10245,7 +10269,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10245
10269
  if (Object.keys(patch).length === 0) continue;
10246
10270
  updateThread(t.id, patch);
10247
10271
  }
10248
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-XILTSD6L.js");
10272
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-X3UFWRAF.js");
10249
10273
  const latest = this.requireThread(thread.id);
10250
10274
  if (!shouldAutoArchiveOnPrMerge({
10251
10275
  previousPrState: prevState || null,
@@ -10557,7 +10581,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10557
10581
  await runArchiveScript(thread.repoPath, thread.worktreePath);
10558
10582
  } catch {
10559
10583
  }
10560
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-XILTSD6L.js");
10584
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-X3UFWRAF.js");
10561
10585
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
10562
10586
  await removeWorktreeDroppingLeftovers(thread, deleteBranch ? thread.branchName : void 0);
10563
10587
  }
@@ -10577,7 +10601,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10577
10601
  this.emit({ type: "status_changed", threadId: restored2.id, status: restored2.status });
10578
10602
  return restored2;
10579
10603
  }
10580
- if (!existsSync14(thread.worktreePath)) {
10604
+ if (!existsSync15(thread.worktreePath)) {
10581
10605
  if (isCowboyThread(thread) || isPrimaryCheckoutThread(thread)) {
10582
10606
  throw new Error(
10583
10607
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
@@ -10694,7 +10718,7 @@ async function startOrchestration(opts) {
10694
10718
  sourceRef: "default",
10695
10719
  ...createOpts
10696
10720
  }).catch(async () => {
10697
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-4ATMCYIE.js");
10721
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-7KG5N2XL.js");
10698
10722
  const repo = await resolveRepoRoot2(repoPath);
10699
10723
  const def = await resolveDefaultBranch2(repo);
10700
10724
  return orch.createThread({
@@ -10704,7 +10728,7 @@ async function startOrchestration(opts) {
10704
10728
  repoPath: repo
10705
10729
  });
10706
10730
  });
10707
- const { updateThread: upd } = await import("./thread-store-LME2ICZP.js");
10731
+ const { updateThread: upd } = await import("./thread-store-TDGZEGS6.js");
10708
10732
  const updated = upd(thread.id, {
10709
10733
  sourceType: "orchestration",
10710
10734
  sourceRef: goal