@sideboard-ai/core 0.1.227 → 0.1.229

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 (44) hide show
  1. package/dist/{abletime-D6773P33.js → abletime-BGVOCEOU.js} +4 -4
  2. package/dist/{abletime-BF253OZT.js → abletime-WZNDTRVL.js} +4 -4
  3. package/dist/{abletime-oauth-KQPVVBKA.js → abletime-oauth-6M5GWEPX.js} +3 -3
  4. package/dist/{abletime-oauth-H4672PRH.js → abletime-oauth-ZLU2EYRK.js} +3 -3
  5. package/dist/{abletime-rest-DAFPXZ7H.js → abletime-rest-F7XG5NGY.js} +3 -3
  6. package/dist/{abletime-rest-OPEVV3XC.js → abletime-rest-WNHIATB3.js} +3 -3
  7. package/dist/{agents-DV5UROWB.js → agents-B7G4BQTS.js} +4 -4
  8. package/dist/{agents-QQ77D7VT.js → agents-ZKP7QNXA.js} +4 -4
  9. package/dist/{app-settings-5RQMQKSB.js → app-settings-KBL2G7M4.js} +7 -1
  10. package/dist/{app-settings-V2BBCX2H.js → app-settings-UXWCPDEA.js} +7 -1
  11. package/dist/{chunk-FUDJ6NFM.js → chunk-6HKGCUDN.js} +117 -62
  12. package/dist/{chunk-N2VST3NL.js → chunk-7YKXBFQE.js} +2 -2
  13. package/dist/{chunk-KTZESHYH.js → chunk-AMMRFFB7.js} +1 -1
  14. package/dist/{chunk-HSYE5ID6.js → chunk-AS4UN7QL.js} +5 -5
  15. package/dist/{chunk-3NWUHXU3.js → chunk-C774RJJA.js} +3 -3
  16. package/dist/{chunk-NFWPDEN4.js → chunk-F3GT6DQW.js} +1 -1
  17. package/dist/{chunk-CLI5DVU4.js → chunk-GHRZNPBK.js} +2 -2
  18. package/dist/{chunk-EWHJNJHV.js → chunk-I5NC7DWO.js} +38 -0
  19. package/dist/{chunk-VUW3VKLW.js → chunk-LULHFLPU.js} +17 -4
  20. package/dist/{chunk-646I442S.js → chunk-MVLXDYN5.js} +5 -5
  21. package/dist/{chunk-P2EAAM3H.js → chunk-N7UXGM3Y.js} +2 -2
  22. package/dist/{chunk-RRW2XWAY.js → chunk-P6ZM5QJW.js} +2 -2
  23. package/dist/{chunk-THLVCXLF.js → chunk-RGNPPRZZ.js} +3 -3
  24. package/dist/{chunk-Y5JES2VV.js → chunk-RZTRWN2V.js} +38 -0
  25. package/dist/{chunk-SOGGKYFV.js → chunk-SWNEA5OZ.js} +3 -3
  26. package/dist/{chunk-SQHRPJ7P.js → chunk-T7Y5ULHM.js} +14 -4
  27. package/dist/{chunk-I2HOATRJ.js → chunk-UHT6OS7V.js} +129 -62
  28. package/dist/{coordinator-prompt-JLMQVORO.js → coordinator-prompt-DZMMCDRW.js} +3 -3
  29. package/dist/{coordinator-prompt-VZ7OSRLD.js → coordinator-prompt-RL3GKIAQ.js} +3 -3
  30. package/dist/{global-workspace-QPSJEXGR.js → global-workspace-G3QEVRGZ.js} +3 -3
  31. package/dist/{global-workspace-3FDAUNN2.js → global-workspace-QW4OXCLJ.js} +3 -3
  32. package/dist/index.cjs +927 -658
  33. package/dist/index.d.cts +89 -3
  34. package/dist/index.d.ts +89 -3
  35. package/dist/index.js +206 -67
  36. package/dist/mcp/run-stdio.cjs +224 -84
  37. package/dist/mcp/run-stdio.js +86 -50
  38. package/dist/{orchestrator-CWOSAYAE.js → orchestrator-GKAHLGXT.js} +5 -5
  39. package/dist/{orchestrator-VKPHI64Q.js → orchestrator-X4VFA5WW.js} +5 -5
  40. package/dist/{workspaces-76W7IEKR.js → workspaces-77C5XQEY.js} +3 -3
  41. package/dist/{workspaces-TDBA64II.js → workspaces-WXRPLT2N.js} +3 -3
  42. package/dist/{worktree-I573UOPD.js → worktree-L6FJXFUC.js} +2 -2
  43. package/dist/{worktree-7V67XTEO.js → worktree-P67WAJKH.js} +2 -2
  44. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  parseAbleTimeOAuthCallbackUrl,
21
21
  resolveAbleTimeOAuthHost,
22
22
  startAbleTimeOAuth
23
- } from "./chunk-3NWUHXU3.js";
23
+ } from "./chunk-C774RJJA.js";
24
24
  import {
25
25
  ableTimeDependencyTarget,
26
26
  commentAbleTimeTask,
@@ -38,8 +38,8 @@ import {
38
38
  toAbleTimeIssueInfo,
39
39
  updateAbleTimeTask,
40
40
  verifyAbleTimeConnection
41
- } from "./chunk-SOGGKYFV.js";
42
- import "./chunk-RRW2XWAY.js";
41
+ } from "./chunk-SWNEA5OZ.js";
42
+ import "./chunk-P6ZM5QJW.js";
43
43
  import {
44
44
  ABLETIME_MCP_PATH,
45
45
  ABLETIME_MCP_PM_PATH,
@@ -60,7 +60,7 @@ import {
60
60
  normalizeAbleTimeCredential,
61
61
  normalizeAbleTimeHost,
62
62
  rewriteAbleTimeError
63
- } from "./chunk-646I442S.js";
63
+ } from "./chunk-MVLXDYN5.js";
64
64
  import {
65
65
  AGENT_GIT_ACTIONS,
66
66
  BOARD_COLUMN_DEFS,
@@ -268,6 +268,8 @@ import {
268
268
  requestReview,
269
269
  requireAgent,
270
270
  requireSlackWorkspace,
271
+ reservePort,
272
+ reservePortRange,
271
273
  resolveConductorCursorAgentId,
272
274
  resolveCreateFirstPrompt,
273
275
  resolveDetachedJobScript,
@@ -319,7 +321,7 @@ import {
319
321
  worktreeCleanupSettings,
320
322
  wrapReviewSkillMarkdown,
321
323
  writeWorktreeFile
322
- } from "./chunk-I2HOATRJ.js";
324
+ } from "./chunk-UHT6OS7V.js";
323
325
  import {
324
326
  LEGACY_PLAN_FILE_REL,
325
327
  PLAN_FILE_NAME,
@@ -436,7 +438,7 @@ import {
436
438
  withEventParentId,
437
439
  withEventsParentId,
438
440
  writeInjectedMcpConfig
439
- } from "./chunk-VUW3VKLW.js";
441
+ } from "./chunk-LULHFLPU.js";
440
442
  import {
441
443
  CLOUD_COORDINATOR_BUSY_REPLY,
442
444
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -480,7 +482,7 @@ import {
480
482
  stageBuffersAsAttachments,
481
483
  syncWorkspacesFromThreads,
482
484
  takenTeamSlugsForOrchestration
483
- } from "./chunk-N2VST3NL.js";
485
+ } from "./chunk-7YKXBFQE.js";
484
486
  import {
485
487
  FAMOUS_SOCCER_TEAMS,
486
488
  GITHUB_PR_BODY_MAX_CHARS,
@@ -578,7 +580,7 @@ import {
578
580
  worktreeDisplayLabelForGroup,
579
581
  worktreeNameFromPath,
580
582
  worktreeSlugForTicket
581
- } from "./chunk-KTZESHYH.js";
583
+ } from "./chunk-AMMRFFB7.js";
582
584
  import {
583
585
  ATTACHMENTS_DIR,
584
586
  CLI_DIR,
@@ -631,6 +633,7 @@ import {
631
633
  withMaxOldSpaceSize
632
634
  } from "./chunk-TQBUXKIB.js";
633
635
  import {
636
+ AGENT_DONE_SOUNDS,
634
637
  FOLLOW_UP_BEHAVIORS,
635
638
  GITHUB_GIT_AUTH_MODES,
636
639
  HARNESS_ENV_KEYS,
@@ -644,6 +647,7 @@ import {
644
647
  ORCHESTRATOR_AGENT_KINDS,
645
648
  PROFILE_NOTES_MAX,
646
649
  USAGE_ON_LIMIT_VALUES,
650
+ agentDoneSound,
647
651
  appSettingsPath,
648
652
  applyAppEnvironment,
649
653
  applyTurnUsage,
@@ -698,6 +702,7 @@ import {
698
702
  historyMaxCount,
699
703
  historyMaxDays,
700
704
  isAbleTimeConnected,
705
+ isAgentDoneSound,
701
706
  isHistoryRetentionStub,
702
707
  isIssueSourceConnected,
703
708
  isLinearConnected,
@@ -751,7 +756,7 @@ import {
751
756
  updateProjectProfileSettings,
752
757
  usageOnLimit,
753
758
  writeViewerContext
754
- } from "./chunk-EWHJNJHV.js";
759
+ } from "./chunk-I5NC7DWO.js";
755
760
  import {
756
761
  examplePrefixedBranch,
757
762
  resolveGitBranchPrefix,
@@ -838,6 +843,92 @@ import {
838
843
  stripNestedElectronEnv
839
844
  } from "./chunk-4TR3HZFT.js";
840
845
 
846
+ // src/store/agent-done-sound.ts
847
+ import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, unlinkSync } from "fs";
848
+ import { basename, extname, join } from "path";
849
+ var AGENT_DONE_CUSTOM_SOUND_MAX_BYTES = 5 * 1024 * 1024;
850
+ var AUDIO_EXT_MIME = {
851
+ ".mp3": "audio/mpeg",
852
+ ".wav": "audio/wav",
853
+ ".ogg": "audio/ogg",
854
+ ".m4a": "audio/mp4",
855
+ ".aac": "audio/aac",
856
+ ".caf": "audio/x-caf",
857
+ ".flac": "audio/flac"
858
+ };
859
+ var AGENT_DONE_CUSTOM_SOUND_EXTENSIONS = Object.keys(AUDIO_EXT_MIME);
860
+ function agentDoneSoundsDir() {
861
+ const dir = join(appDataDir(), "sounds");
862
+ mkdirSync(dir, { recursive: true });
863
+ return dir;
864
+ }
865
+ function normalizeExt(ext) {
866
+ const e = ext.trim().toLowerCase();
867
+ return e.startsWith(".") ? e : `.${e}`;
868
+ }
869
+ function agentDoneCustomSoundMime(extOrPath) {
870
+ const ext = normalizeExt(extname(extOrPath) || extOrPath);
871
+ return AUDIO_EXT_MIME[ext] ?? null;
872
+ }
873
+ function findAgentDoneCustomSoundPath() {
874
+ const dir = agentDoneSoundsDir();
875
+ for (const name of readdirSync(dir)) {
876
+ if (!name.startsWith("agent-done.")) continue;
877
+ const full = join(dir, name);
878
+ if (existsSync(full) && agentDoneCustomSoundMime(name)) return full;
879
+ }
880
+ return null;
881
+ }
882
+ function clearAgentDoneCustomSoundFile() {
883
+ const dir = agentDoneSoundsDir();
884
+ for (const name of readdirSync(dir)) {
885
+ if (!name.startsWith("agent-done.")) continue;
886
+ try {
887
+ unlinkSync(join(dir, name));
888
+ } catch {
889
+ }
890
+ }
891
+ }
892
+ function importAgentDoneCustomSound(sourcePath) {
893
+ const trimmed = sourcePath.trim();
894
+ if (!trimmed || !existsSync(trimmed)) {
895
+ throw new Error("Sound file not found");
896
+ }
897
+ const ext = normalizeExt(extname(trimmed));
898
+ const mime = AUDIO_EXT_MIME[ext];
899
+ if (!mime) {
900
+ throw new Error(
901
+ `Unsupported audio type (use ${AGENT_DONE_CUSTOM_SOUND_EXTENSIONS.join(", ")})`
902
+ );
903
+ }
904
+ const data = readFileSync(trimmed);
905
+ if (data.byteLength === 0) throw new Error("Sound file is empty");
906
+ if (data.byteLength > AGENT_DONE_CUSTOM_SOUND_MAX_BYTES) {
907
+ throw new Error("Sound file is too large (max 5 MB)");
908
+ }
909
+ clearAgentDoneCustomSoundFile();
910
+ const dest = join(agentDoneSoundsDir(), `agent-done${ext}`);
911
+ copyFileSync(trimmed, dest);
912
+ return {
913
+ name: basename(trimmed),
914
+ path: dest,
915
+ mime
916
+ };
917
+ }
918
+ function readAgentDoneCustomSound(displayName) {
919
+ const path2 = findAgentDoneCustomSoundPath();
920
+ if (!path2) return null;
921
+ const mime = agentDoneCustomSoundMime(path2);
922
+ if (!mime) return null;
923
+ const data = readFileSync(path2);
924
+ if (data.byteLength === 0) return null;
925
+ return {
926
+ name: displayName?.trim() || basename(path2),
927
+ mime,
928
+ dataBase64: data.toString("base64")
929
+ };
930
+ }
931
+
841
932
  // src/store/thread-list.ts
842
933
  var LIST_PREVIEW_MAX = 480;
843
934
  function slimThreadForUiList(thread) {
@@ -3159,7 +3250,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3159
3250
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3160
3251
  import { z as z9 } from "zod";
3161
3252
  import { randomUUID as randomUUID3 } from "crypto";
3162
- import { basename } from "path";
3253
+ import { basename as basename2 } from "path";
3163
3254
 
3164
3255
  // src/mcp/archive-guard.ts
3165
3256
  function mcpArchiveBlockedReason(thread) {
@@ -3169,6 +3260,20 @@ function mcpArchiveBlockedReason(thread) {
3169
3260
  return null;
3170
3261
  }
3171
3262
 
3263
+ // src/mcp/run-script-ref.ts
3264
+ function resolveRunScriptThreadRef(ref) {
3265
+ const explicit = ref?.trim();
3266
+ if (explicit) return explicit;
3267
+ const siblings = threadsSharingWorktree(process.cwd());
3268
+ const thread = siblings[0];
3269
+ if (!thread) {
3270
+ throw new Error(
3271
+ "No Sideboard thread for this cwd. Pass ref (thread id), or call from a worktree chat."
3272
+ );
3273
+ }
3274
+ return thread.id;
3275
+ }
3276
+
3172
3277
  // src/mcp/thread-visibility.ts
3173
3278
  function lastMessagePreview(messages, max = 160) {
3174
3279
  if (!messages?.length) return null;
@@ -4840,23 +4945,23 @@ function registerScheduleTools(server) {
4840
4945
  }
4841
4946
 
4842
4947
  // src/board/load-home-board.ts
4843
- import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "fs";
4844
- import { join as join2 } from "path";
4948
+ import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, unlinkSync as unlinkSync3, writeFileSync as writeFileSync2 } from "fs";
4949
+ import { join as join3 } from "path";
4845
4950
 
4846
4951
  // src/board/board-pins.ts
4847
4952
  import { randomUUID as randomUUID2 } from "crypto";
4848
- import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "fs";
4849
- import { join } from "path";
4953
+ import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, unlinkSync as unlinkSync2, writeFileSync } from "fs";
4954
+ import { join as join2 } from "path";
4850
4955
  var FILE = "home-board-pins.json";
4851
4956
  var VERSION = 1;
4852
4957
  function pinsFile() {
4853
- return join(appDataDir(), FILE);
4958
+ return join2(appDataDir(), FILE);
4854
4959
  }
4855
4960
  function readDisk() {
4856
4961
  const path2 = pinsFile();
4857
- if (!existsSync(path2)) return [];
4962
+ if (!existsSync2(path2)) return [];
4858
4963
  try {
4859
- const raw = JSON.parse(readFileSync(path2, "utf8"));
4964
+ const raw = JSON.parse(readFileSync2(path2, "utf8"));
4860
4965
  if (raw?.version !== VERSION || !Array.isArray(raw.items)) return [];
4861
4966
  return raw.items.filter((item) => item?.id && item.kind && item.ref);
4862
4967
  } catch {
@@ -4864,7 +4969,7 @@ function readDisk() {
4864
4969
  }
4865
4970
  }
4866
4971
  function writeDisk(items) {
4867
- mkdirSync(appDataDir(), { recursive: true });
4972
+ mkdirSync2(appDataDir(), { recursive: true });
4868
4973
  writeFileSync(pinsFile(), JSON.stringify({ version: VERSION, items }, null, 2), "utf8");
4869
4974
  }
4870
4975
  function listBoardPins() {
@@ -4917,7 +5022,7 @@ function replaceBoardPins(items) {
4917
5022
  }
4918
5023
  function clearBoardPins() {
4919
5024
  try {
4920
- unlinkSync(pinsFile());
5025
+ unlinkSync2(pinsFile());
4921
5026
  } catch {
4922
5027
  }
4923
5028
  }
@@ -4933,7 +5038,7 @@ function homeBoardWorkspaceKey(workspaces) {
4933
5038
  return workspaces.map((w) => w.path).filter(Boolean).sort().join("\n");
4934
5039
  }
4935
5040
  function cacheFile() {
4936
- return join2(appDataDir(), "home-board-cache.json");
5041
+ return join3(appDataDir(), "home-board-cache.json");
4937
5042
  }
4938
5043
  function emptyInputs() {
4939
5044
  return {
@@ -4959,9 +5064,9 @@ function shouldCacheHomeBoardInputs(inputs) {
4959
5064
  }
4960
5065
  function readDiskCache() {
4961
5066
  const path2 = cacheFile();
4962
- if (!existsSync2(path2)) return null;
5067
+ if (!existsSync3(path2)) return null;
4963
5068
  try {
4964
- const raw = JSON.parse(readFileSync2(path2, "utf8"));
5069
+ const raw = JSON.parse(readFileSync3(path2, "utf8"));
4965
5070
  if (raw?.version !== CACHE_VERSION || typeof raw.fetchedAt !== "number") {
4966
5071
  return null;
4967
5072
  }
@@ -4975,14 +5080,14 @@ function readDiskCache() {
4975
5080
  }
4976
5081
  function writeDiskCache(entry) {
4977
5082
  try {
4978
- mkdirSync2(appDataDir(), { recursive: true });
5083
+ mkdirSync3(appDataDir(), { recursive: true });
4979
5084
  writeFileSync2(cacheFile(), JSON.stringify(entry), "utf8");
4980
5085
  } catch {
4981
5086
  }
4982
5087
  }
4983
5088
  function deleteDiskCache() {
4984
5089
  try {
4985
- unlinkSync2(cacheFile());
5090
+ unlinkSync3(cacheFile());
4986
5091
  } catch {
4987
5092
  }
4988
5093
  }
@@ -5273,7 +5378,7 @@ async function startMcpServer() {
5273
5378
  );
5274
5379
  }
5275
5380
  try {
5276
- const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-V2BBCX2H.js");
5381
+ const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-UXWCPDEA.js");
5277
5382
  orch.setMaxConcurrent(maxConcurrentAgents2());
5278
5383
  } catch {
5279
5384
  }
@@ -5328,7 +5433,7 @@ async function startMcpServer() {
5328
5433
  async () => {
5329
5434
  const threads = orch.getThreads(true);
5330
5435
  const lines = threads.map((t) => {
5331
- const repo = t.repoPath === GLOBAL_WORKSPACE_ID ? "Orchestration" : basename(t.repoPath) || t.repoPath;
5436
+ const repo = t.repoPath === GLOBAL_WORKSPACE_ID ? "Orchestration" : basename2(t.repoPath) || t.repoPath;
5332
5437
  const live = orch.threadLooksLive(t) ? readTurnLive(t.id) : null;
5333
5438
  const parent = t.parentThreadId ? ` parent:${t.parentThreadId.slice(0, 8)}` : "";
5334
5439
  const preview = lastMessagePreview(t.messages, 80);
@@ -5576,19 +5681,79 @@ async function startMcpServer() {
5576
5681
  "Stop a detached job you started with detached-job.cjs when it is hanging, producing no useful output, buffering forever, or doing the wrong thing (wrong project, infinite watch, huge dump). Do not stop a pack/test/deploy that is clearly making progress. The type=log pane updates to status=failed with the last delta. Then decide the next step.",
5577
5682
  {
5578
5683
  id: z9.string().describe("Detached job id (same kebab-case id passed to detached-job.cjs start)"),
5579
- reason: z9.string().optional().describe("Why you are stopping (hanging, no progress, wrong output, already have the error)")
5684
+ reason: z9.string().optional().describe("Why you are stopping (hanging, no progress, wrong output, already have the answer)")
5580
5685
  },
5581
5686
  async ({ id, reason }) => {
5582
5687
  const result = await stopDetachedJob(process.cwd(), id, { reason });
5583
5688
  return mcpJson(result);
5584
5689
  }
5585
5690
  );
5691
+ server.tool(
5692
+ "list_run_scripts",
5693
+ "List .sideboard/.conductor run scripts for this thread (same menu as the desktop Dev button) and which are active. Worktree turns may omit ref (uses cwd).",
5694
+ {
5695
+ ref: z9.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd).")
5696
+ },
5697
+ async ({ ref }) => {
5698
+ try {
5699
+ const threadRef = resolveRunScriptThreadRef(ref);
5700
+ const scripts = orch.listThreadRunScripts(threadRef);
5701
+ const active = orch.getActiveRuns(threadRef);
5702
+ return mcpJson({ scripts, active, ref: threadRef });
5703
+ } catch (err) {
5704
+ const message = err instanceof Error ? err.message : String(err);
5705
+ return { content: [{ type: "text", text: message }], isError: true };
5706
+ }
5707
+ }
5708
+ );
5709
+ server.tool(
5710
+ "run_dev_script",
5711
+ "Start a .sideboard/.conductor run script (same as the desktop Dev / play button). Logs and Stop appear in the thread UI \u2014 do not detached-job or shell-spawn the same command. Returns the allocated port. Worktree turns may omit ref (uses cwd). Omit name for the default script.",
5712
+ {
5713
+ ref: z9.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd)."),
5714
+ name: z9.string().optional().describe("Script name from list_run_scripts (default script if omitted).")
5715
+ },
5716
+ async ({ ref, name }) => {
5717
+ try {
5718
+ const threadRef = resolveRunScriptThreadRef(ref);
5719
+ const result = await orch.startDev(threadRef, name);
5720
+ return mcpJson({
5721
+ port: result.port,
5722
+ scriptName: result.scriptName,
5723
+ ports: result.ports,
5724
+ url: `http://localhost:${result.port}`,
5725
+ ref: threadRef
5726
+ });
5727
+ } catch (err) {
5728
+ const message = err instanceof Error ? err.message : String(err);
5729
+ return { content: [{ type: "text", text: message }], isError: true };
5730
+ }
5731
+ }
5732
+ );
5733
+ server.tool(
5734
+ "stop_dev_script",
5735
+ "Stop a run script started with run_dev_script or the desktop Dev button (same as UI Stop). Omit name to stop all scripts on this worktree. Worktree turns may omit ref (uses cwd).",
5736
+ {
5737
+ ref: z9.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd)."),
5738
+ name: z9.string().optional().describe("Script name to stop; omit to stop all active scripts.")
5739
+ },
5740
+ async ({ ref, name }) => {
5741
+ try {
5742
+ const threadRef = resolveRunScriptThreadRef(ref);
5743
+ orch.stopDev(threadRef, name);
5744
+ return mcpJson({ ok: true, ref: threadRef, stopped: name ?? "all" });
5745
+ } catch (err) {
5746
+ const message = err instanceof Error ? err.message : String(err);
5747
+ return { content: [{ type: "text", text: message }], isError: true };
5748
+ }
5749
+ }
5750
+ );
5586
5751
  if (!worktreeProfile) {
5587
5752
  registerSlackTools(server);
5588
5753
  registerConnectedIssueVendorTools(server);
5589
5754
  registerScheduleTools(server);
5590
5755
  const { getCaffeinateHold: getCaffeinateHold2, setCaffeinateHold: setCaffeinateHold2 } = await import("./caffeinate-hold-22VFDPSO.js");
5591
- const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-V2BBCX2H.js");
5756
+ const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-UXWCPDEA.js");
5592
5757
  const accountDefaults = resolveThreadDefaults2();
5593
5758
  const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
5594
5759
  server.tool(
@@ -6061,45 +6226,6 @@ async function startMcpServer() {
6061
6226
  }
6062
6227
  }
6063
6228
  );
6064
- server.tool(
6065
- "run_dev_script",
6066
- "Start a .sideboard/.conductor run script for a thread (default script if name omitted); returns port",
6067
- {
6068
- ref: z9.string(),
6069
- name: z9.string().optional()
6070
- },
6071
- async ({ ref, name }) => {
6072
- const result = await orch.startDev(ref, name);
6073
- return mcpJson({
6074
- port: result.port,
6075
- scriptName: result.scriptName,
6076
- ports: result.ports,
6077
- url: `http://localhost:${result.port}`
6078
- });
6079
- }
6080
- );
6081
- server.tool(
6082
- "list_run_scripts",
6083
- "List named run scripts available for a thread",
6084
- { ref: z9.string() },
6085
- async ({ ref }) => {
6086
- const scripts = orch.listThreadRunScripts(ref);
6087
- const active = orch.getActiveRuns(ref);
6088
- return mcpJson({ scripts, active });
6089
- }
6090
- );
6091
- server.tool(
6092
- "stop_dev_script",
6093
- "Stop a running script for a thread (all scripts if name omitted)",
6094
- {
6095
- ref: z9.string(),
6096
- name: z9.string().optional()
6097
- },
6098
- async ({ ref, name }) => {
6099
- orch.stopDev(ref, name);
6100
- return { content: [{ type: "text", text: "ok" }] };
6101
- }
6102
- );
6103
6229
  server.tool(
6104
6230
  "run_setup",
6105
6231
  "Re-run workspace setup (Sideboard/Conductor settings, .cursor/worktrees.json, or script/setup). New worktrees already run this automatically.",
@@ -8587,6 +8713,9 @@ export {
8587
8713
  ABLETIME_ORG_KEY_PREFIX,
8588
8714
  ABLETIME_PAT_PREFIX,
8589
8715
  ABLETIME_PM_TOOL_NAMES,
8716
+ AGENT_DONE_CUSTOM_SOUND_EXTENSIONS,
8717
+ AGENT_DONE_CUSTOM_SOUND_MAX_BYTES,
8718
+ AGENT_DONE_SOUNDS,
8590
8719
  AGENT_GIT_ACTIONS,
8591
8720
  AGENT_RUNNER_MAX_OLD_SPACE_MB,
8592
8721
  ATTACHMENTS_DIR,
@@ -8709,6 +8838,9 @@ export {
8709
8838
  addStackLayerFromThread,
8710
8839
  addWorkspace,
8711
8840
  adoptThread,
8841
+ agentDoneCustomSoundMime,
8842
+ agentDoneSound,
8843
+ agentDoneSoundsDir,
8712
8844
  agentGitPrompt,
8713
8845
  alignQueueAttachments,
8714
8846
  allAdapters,
@@ -8787,6 +8919,7 @@ export {
8787
8919
  claudeUserSettingsPath,
8788
8920
  cleanupArchivedHistory,
8789
8921
  cleanupOrphanWorktrees,
8922
+ clearAgentDoneCustomSoundFile,
8790
8923
  clearBoardPins,
8791
8924
  clearHomeBoardCache,
8792
8925
  clipAgentEventForPaint,
@@ -8889,6 +9022,7 @@ export {
8889
9022
  fetchOriginForWorktree,
8890
9023
  fetchPrHead,
8891
9024
  finalizeParts,
9025
+ findAgentDoneCustomSoundPath,
8892
9026
  findConventionSetup,
8893
9027
  findInvalidCacheControlTtlOrder,
8894
9028
  findLastBrightsyContextSummary,
@@ -9023,6 +9157,7 @@ export {
9023
9157
  historyMaxDays,
9024
9158
  hottestClaudeWindow,
9025
9159
  httpFetch,
9160
+ importAgentDoneCustomSound,
9026
9161
  importConductorWorkspace,
9027
9162
  importConductorWorkspaceAsync,
9028
9163
  initPrStack,
@@ -9038,6 +9173,7 @@ export {
9038
9173
  isAbleTimeConnected,
9039
9174
  isAbleTimeOAuthCancelled,
9040
9175
  isAbleTimeRejectedCredential,
9176
+ isAgentDoneSound,
9041
9177
  isAskUserToolName,
9042
9178
  isBrightsyConnected,
9043
9179
  isBrightsyNdjsonLine,
@@ -9229,6 +9365,7 @@ export {
9229
9365
  primaryCheckoutFromLinkedWorktree,
9230
9366
  promptMentionsBrightsy,
9231
9367
  pushBranch,
9368
+ readAgentDoneCustomSound,
9232
9369
  readExistingReviewRequestFile,
9233
9370
  readKeychainVaultKey,
9234
9371
  readPlanFile,
@@ -9255,6 +9392,8 @@ export {
9255
9392
  requestOccupancy,
9256
9393
  requestReview,
9257
9394
  requireAgent,
9395
+ reservePort,
9396
+ reservePortRange,
9258
9397
  resetGhStackDetectCache,
9259
9398
  resetGithubAgentTokenMemo,
9260
9399
  resolveAbleTimeOAuthHost,