@sideboard-ai/core 0.1.87 → 0.1.89

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 (33) hide show
  1. package/dist/agents/cursor-runner.cjs +47 -1
  2. package/dist/agents/cursor-runner.js +8 -2
  3. package/dist/{agents-W5446HSV.js → agents-LMUFTGKF.js} +5 -5
  4. package/dist/{agents-V6PVSQYH.js → agents-ODBP7J6E.js} +6 -6
  5. package/dist/{app-settings-HFINR3XG.js → app-settings-BRF7VKTQ.js} +2 -2
  6. package/dist/{app-settings-F36ISTCF.js → app-settings-ZXPAB3QN.js} +1 -1
  7. package/dist/{chunk-HBXQQ5TO.js → chunk-6EZRSCIT.js} +2 -2
  8. package/dist/{chunk-TC2KY5G7.js → chunk-6LFV4VFI.js} +14 -1
  9. package/dist/{chunk-L63LLCTX.js → chunk-7D27DD2X.js} +1 -1
  10. package/dist/{chunk-4PTN2LED.js → chunk-B2KIO2SD.js} +3 -3
  11. package/dist/{chunk-XY6XXMAK.js → chunk-FT2SQOL4.js} +1 -1
  12. package/dist/{chunk-QWNROSRB.js → chunk-JE75QW2I.js} +56 -22
  13. package/dist/chunk-MMI4RJ5I.js +46 -0
  14. package/dist/{chunk-3MA6JH6G.js → chunk-OB6IRIFV.js} +2 -2
  15. package/dist/{chunk-U4GZKLIV.js → chunk-RJLBSYUO.js} +57 -23
  16. package/dist/{chunk-5KLC2MWZ.js → chunk-TLPJHLLM.js} +14 -1
  17. package/dist/{chunk-UVNXLTFB.js → chunk-UHTNJKZX.js} +3 -3
  18. package/dist/{chunk-A7LONVNO.js → chunk-VZ2L4AEJ.js} +2 -2
  19. package/dist/{chunk-R2EOZNQI.js → chunk-WANQFU3S.js} +2 -2
  20. package/dist/{chunk-CY45C3GA.js → chunk-ZXYWWSHZ.js} +1 -1
  21. package/dist/{coordinator-prompt-PYRAXZN3.js → coordinator-prompt-CI5SHONJ.js} +3 -3
  22. package/dist/{coordinator-prompt-EC3KQLN3.js → coordinator-prompt-UK5LYFN5.js} +4 -4
  23. package/dist/{global-workspace-T5IAJF4R.js → global-workspace-2YZ2V4I5.js} +4 -4
  24. package/dist/{global-workspace-ICWOWUW6.js → global-workspace-JQQLPJM5.js} +5 -5
  25. package/dist/index.cjs +118 -24
  26. package/dist/index.js +36 -29
  27. package/dist/mcp/run-stdio.cjs +118 -24
  28. package/dist/mcp/run-stdio.js +74 -27
  29. package/dist/{workspaces-J4ULXOUH.js → workspaces-FDO5L4NI.js} +5 -5
  30. package/dist/{workspaces-AJCAFW64.js → workspaces-YWCC3WV4.js} +6 -6
  31. package/dist/{worktree-4Z2VSHAQ.js → worktree-4555QBQ7.js} +2 -2
  32. package/dist/{worktree-H57CCHWO.js → worktree-7YNSJ224.js} +3 -3
  33. package/package.json +1 -1
@@ -57,6 +57,18 @@ function wrapElectronAsNodeLaunch(file, args) {
57
57
  function isStrippedElectronLaunch(command, args) {
58
58
  return command === "/bin/sh" && Boolean(args?.[1]?.includes("ELECTRON_RUN_AS_NODE") && args[1].includes("unset"));
59
59
  }
60
+ function isElectronLikeCommand(command) {
61
+ const name = command.trim();
62
+ if (!name) return false;
63
+ if (process.versions.electron && name === process.execPath) return true;
64
+ return /(?:^|[/\\])Electron(?:\.exe)?$/i.test(name) || /Sideboard\.app[/\\]/i.test(name) || /Electron\.app[/\\]/i.test(name);
65
+ }
66
+ function unwrapStrippedElectronLaunch(command, args) {
67
+ if (!isStrippedElectronLaunch(command, args) || !args || args.length < 4) {
68
+ return null;
69
+ }
70
+ return { file: args[3], args: args.slice(4) };
71
+ }
60
72
  var NESTED_ELECTRON_ENV_PREFIXES, STRIP_NESTED_ELECTRON_THEN_EXEC;
61
73
  var init_nested_electron_env = __esm({
62
74
  "src/hook/nested-electron-env.ts"() {
@@ -6033,22 +6045,52 @@ async function buildInjectedMcpServers(opts) {
6033
6045
  }
6034
6046
  return servers;
6035
6047
  }
6048
+ function shSingleQuote(value) {
6049
+ return `'${value.replace(/'/g, `'\\''`)}'`;
6050
+ }
6051
+ function cursorSafeMcpLaunch(command, args) {
6052
+ if (process.platform === "win32") {
6053
+ return args && args.length > 0 ? { command, args } : { command };
6054
+ }
6055
+ const unwrapped = unwrapStrippedElectronLaunch(command, args);
6056
+ const file = unwrapped?.file ?? command;
6057
+ const fileArgs = unwrapped?.args ?? args ?? [];
6058
+ if (!isElectronLikeCommand(file)) {
6059
+ return fileArgs.length > 0 ? { command: file, args: fileArgs } : { command: file };
6060
+ }
6061
+ const dir = (0, import_node_path17.join)(appDataDir(), "mcp-launch");
6062
+ (0, import_node_fs17.mkdirSync)(dir, { recursive: true });
6063
+ const wrap = (0, import_node_path17.join)(dir, "cursor-electron-as-node.sh");
6064
+ const execLine = [file, ...fileArgs].map(shSingleQuote).join(" ");
6065
+ (0, import_node_fs17.writeFileSync)(
6066
+ wrap,
6067
+ [
6068
+ "#!/bin/sh",
6069
+ "vars=`printenv | awk -F= '/^(ELECTRON_|CHROME_)/{print $1}'`",
6070
+ '[ -n "$vars" ] && unset $vars',
6071
+ "export ELECTRON_RUN_AS_NODE=1",
6072
+ `exec ${execLine} "$@"`,
6073
+ ""
6074
+ ].join("\n"),
6075
+ { mode: 493 }
6076
+ );
6077
+ return { command: wrap };
6078
+ }
6079
+ function mcpSpawnEnv(env) {
6080
+ if (!env) return void 0;
6081
+ const out = { ...env };
6082
+ delete out.ELECTRON_RUN_AS_NODE;
6083
+ return Object.keys(out).length > 0 ? out : void 0;
6084
+ }
6036
6085
  function toCursorMcpServers(servers) {
6037
6086
  const out = {};
6038
6087
  for (const s of servers) {
6039
- const env = s.env ? { ...s.env } : void 0;
6040
- if (env) delete env.ELECTRON_RUN_AS_NODE;
6041
- let command = s.command;
6042
- let args = s.args;
6043
- if (process.platform !== "win32" && !isStrippedElectronLaunch(command, args)) {
6044
- const wrapped = wrapElectronAsNodeLaunch(command, args ?? []);
6045
- command = wrapped.file;
6046
- args = wrapped.args;
6047
- }
6088
+ const env = mcpSpawnEnv(s.env);
6089
+ const launch = cursorSafeMcpLaunch(s.command, s.args);
6048
6090
  out[s.name] = {
6049
- command,
6050
- ...args && args.length > 0 ? { args } : {},
6051
- ...env && Object.keys(env).length > 0 ? { env } : {}
6091
+ command: launch.command,
6092
+ ...launch.args && launch.args.length > 0 ? { args: launch.args } : {},
6093
+ ...env ? { env } : {}
6052
6094
  };
6053
6095
  }
6054
6096
  return out;
@@ -6061,8 +6103,9 @@ function toCodexMcpConfigArgs(servers) {
6061
6103
  if (s.args?.length) {
6062
6104
  args.push("-c", `${prefix}.args=${JSON.stringify(s.args)}`);
6063
6105
  }
6064
- if (s.env) {
6065
- for (const [key, value] of Object.entries(s.env)) {
6106
+ const env = mcpSpawnEnv(s.env);
6107
+ if (env) {
6108
+ for (const [key, value] of Object.entries(env)) {
6066
6109
  args.push("-c", `${prefix}.env.${key}=${JSON.stringify(value)}`);
6067
6110
  }
6068
6111
  }
@@ -6075,11 +6118,12 @@ function toCodexMcpConfigArgs(servers) {
6075
6118
  function toOpencodeMcpConfigContent(servers) {
6076
6119
  const mcp = {};
6077
6120
  for (const s of servers) {
6121
+ const env = mcpSpawnEnv(s.env);
6078
6122
  mcp[s.name] = {
6079
6123
  type: "local",
6080
6124
  command: [s.command, ...s.args ?? []],
6081
6125
  enabled: true,
6082
- ...s.env && Object.keys(s.env).length > 0 ? { environment: s.env } : {}
6126
+ ...env ? { environment: env } : {}
6083
6127
  };
6084
6128
  }
6085
6129
  return JSON.stringify({ mcp });
@@ -6088,10 +6132,11 @@ function writeMcpServersConfig(servers) {
6088
6132
  if (servers.length === 0) return null;
6089
6133
  const mcpServers = {};
6090
6134
  for (const s of servers) {
6135
+ const env = mcpSpawnEnv(s.env);
6091
6136
  mcpServers[s.name] = {
6092
6137
  command: s.command,
6093
6138
  ...s.args ? { args: s.args } : {},
6094
- ...s.env ? { env: s.env } : {}
6139
+ ...env ? { env } : {}
6095
6140
  };
6096
6141
  }
6097
6142
  const dir = (0, import_node_fs17.mkdtempSync)((0, import_node_path17.join)((0, import_node_os6.tmpdir)(), "sideboard-mcp-"));
@@ -9267,6 +9312,51 @@ function normalizeParseResult(parsed) {
9267
9312
  // src/agents/spawn.ts
9268
9313
  init_path();
9269
9314
  init_usage();
9315
+
9316
+ // src/agents/cursor-stream-coalesce.ts
9317
+ function isTextEvent(event) {
9318
+ return event.type === "stdout" || event.type === "thinking";
9319
+ }
9320
+ function createAgentStreamCoalescer(emit, opts) {
9321
+ const intervalMs = opts?.intervalMs ?? 32;
9322
+ let pending = null;
9323
+ let timer = null;
9324
+ const flush = () => {
9325
+ if (timer) {
9326
+ clearTimeout(timer);
9327
+ timer = null;
9328
+ }
9329
+ if (!pending) return;
9330
+ const event = pending;
9331
+ pending = null;
9332
+ emit({ type: event.type, data: event.data });
9333
+ };
9334
+ const schedule = () => {
9335
+ if (timer) return;
9336
+ timer = setTimeout(flush, intervalMs);
9337
+ timer.unref?.();
9338
+ };
9339
+ return {
9340
+ push(event) {
9341
+ if (!isTextEvent(event)) {
9342
+ flush();
9343
+ emit(event);
9344
+ return;
9345
+ }
9346
+ if (!event.data) return;
9347
+ if (pending && pending.type === event.type) {
9348
+ pending.data += event.data;
9349
+ } else {
9350
+ flush();
9351
+ pending = { type: event.type, data: event.data };
9352
+ }
9353
+ schedule();
9354
+ },
9355
+ flush
9356
+ };
9357
+ }
9358
+
9359
+ // src/agents/spawn.ts
9270
9360
  async function spawnAgentTurn(thread, input, onEvent) {
9271
9361
  ensureAgentPath();
9272
9362
  if (!thread.worktreePath?.trim()) {
@@ -9321,12 +9411,13 @@ async function spawnAgentTurn(thread, input, onEvent) {
9321
9411
  let assistantText = "";
9322
9412
  let parts = [];
9323
9413
  let usage = null;
9414
+ const outbound = createAgentStreamCoalescer(onEvent);
9324
9415
  const consume = (stream, kind) => {
9325
9416
  if (!stream) return;
9326
9417
  const rl = (0, import_node_readline2.createInterface)({ input: stream, crlfDelay: Infinity });
9327
9418
  rl.on("line", (line) => {
9328
9419
  if (kind === "stderr") {
9329
- onEvent({ type: "stderr", data: line });
9420
+ outbound.push({ type: "stderr", data: line });
9330
9421
  return;
9331
9422
  }
9332
9423
  let events = normalizeParseResult(adapter.parseEvent(line));
@@ -9341,12 +9432,12 @@ async function spawnAgentTurn(thread, input, onEvent) {
9341
9432
  for (const parsed of events) {
9342
9433
  if (parsed.type === "session_id") {
9343
9434
  sessionId = parsed.data;
9344
- onEvent(parsed);
9435
+ outbound.push(parsed);
9345
9436
  continue;
9346
9437
  }
9347
9438
  if (parsed.type === "usage") {
9348
9439
  usage = applyTurnUsage(usage, parsed.data, parsed.scope ?? "request");
9349
- onEvent(parsed);
9440
+ outbound.push(parsed);
9350
9441
  continue;
9351
9442
  }
9352
9443
  if (parsed.type === "stdout") {
@@ -9359,13 +9450,14 @@ async function spawnAgentTurn(thread, input, onEvent) {
9359
9450
  assistantText += parsed.data;
9360
9451
  }
9361
9452
  parts = applyAgentEvent(parts, parsed);
9362
- onEvent(parsed);
9453
+ outbound.push(parsed);
9363
9454
  }
9364
9455
  });
9365
9456
  };
9366
9457
  consume(child.stdout, "stdout");
9367
9458
  consume(child.stderr, "stderr");
9368
9459
  const done = child.then((result) => {
9460
+ outbound.flush();
9369
9461
  const exitCode = result.exitCode ?? null;
9370
9462
  onEvent({ type: "exit", data: exitCode });
9371
9463
  const finalized = finalizeParts(parts);
@@ -13579,10 +13671,12 @@ var Orchestrator = class {
13579
13671
  if (event.type === "stderr" && typeof event.data === "string") {
13580
13672
  pushTurnStderr(stderrTail, event.data);
13581
13673
  }
13582
- const live = readThread(threadId);
13583
- if (live?.lastError?.includes("reconciled on startup") && (this.activeTurns.has(threadId) || this.startingTurns.has(threadId))) {
13584
- setStatus(threadId, "running");
13585
- this.emit({ type: "status_changed", threadId, status: "running" });
13674
+ if (event.type !== "stdout" && event.type !== "thinking") {
13675
+ const live = readThread(threadId);
13676
+ if (live?.lastError?.includes("reconciled on startup") && (this.activeTurns.has(threadId) || this.startingTurns.has(threadId))) {
13677
+ setStatus(threadId, "running");
13678
+ this.emit({ type: "status_changed", threadId, status: "running" });
13679
+ }
13586
13680
  }
13587
13681
  }
13588
13682
  );
@@ -17,14 +17,14 @@ import {
17
17
  resolveQuotaFallbackAgent,
18
18
  sideboardMcpProfile,
19
19
  summarizeTurnStderr
20
- } from "../chunk-QWNROSRB.js";
20
+ } from "../chunk-JE75QW2I.js";
21
21
  import "../chunk-DKHGWYWR.js";
22
22
  import {
23
23
  addWorkspace,
24
24
  ensureWorkspace,
25
25
  removeWorkspace,
26
26
  syncWorkspacesFromThreads
27
- } from "../chunk-R2EOZNQI.js";
27
+ } from "../chunk-WANQFU3S.js";
28
28
  import {
29
29
  extractPresentedPlan,
30
30
  readPlanFile,
@@ -42,14 +42,14 @@ import {
42
42
  isGlobalThread,
43
43
  isOrchestratorThread,
44
44
  orchestratorSessionPoisonedByBuiltins
45
- } from "../chunk-UVNXLTFB.js";
45
+ } from "../chunk-UHTNJKZX.js";
46
46
  import {
47
47
  SLACK_REPLY_FORMATTING,
48
48
  coordinatorSystemPrompt,
49
49
  coordinatorTurnReminder,
50
50
  enrichWorkspacesWithGithub,
51
51
  ensureGlobalCoordinatorCwd
52
- } from "../chunk-3MA6JH6G.js";
52
+ } from "../chunk-OB6IRIFV.js";
53
53
  import {
54
54
  addPrStackLayer,
55
55
  allocateTeamName,
@@ -89,7 +89,7 @@ import {
89
89
  takenSlugsFromThread,
90
90
  threadDisplayLabel,
91
91
  worktreeNameFromPath
92
- } from "../chunk-CY45C3GA.js";
92
+ } from "../chunk-ZXYWWSHZ.js";
93
93
  import {
94
94
  ATTACHMENTS_DIR,
95
95
  LEGACY_ATTACHMENTS_DIR,
@@ -124,7 +124,7 @@ import {
124
124
  stripNestedElectronEnv,
125
125
  updateAdvancedSettings,
126
126
  writeSecureJson
127
- } from "../chunk-TC2KY5G7.js";
127
+ } from "../chunk-6LFV4VFI.js";
128
128
  import {
129
129
  writePrivateFile
130
130
  } from "../chunk-NSTQ6QKD.js";
@@ -888,6 +888,49 @@ function normalizeParseResult(parsed) {
888
888
  return Array.isArray(parsed) ? parsed : [parsed];
889
889
  }
890
890
 
891
+ // src/agents/cursor-stream-coalesce.ts
892
+ function isTextEvent(event) {
893
+ return event.type === "stdout" || event.type === "thinking";
894
+ }
895
+ function createAgentStreamCoalescer(emit, opts) {
896
+ const intervalMs = opts?.intervalMs ?? 32;
897
+ let pending = null;
898
+ let timer = null;
899
+ const flush = () => {
900
+ if (timer) {
901
+ clearTimeout(timer);
902
+ timer = null;
903
+ }
904
+ if (!pending) return;
905
+ const event = pending;
906
+ pending = null;
907
+ emit({ type: event.type, data: event.data });
908
+ };
909
+ const schedule = () => {
910
+ if (timer) return;
911
+ timer = setTimeout(flush, intervalMs);
912
+ timer.unref?.();
913
+ };
914
+ return {
915
+ push(event) {
916
+ if (!isTextEvent(event)) {
917
+ flush();
918
+ emit(event);
919
+ return;
920
+ }
921
+ if (!event.data) return;
922
+ if (pending && pending.type === event.type) {
923
+ pending.data += event.data;
924
+ } else {
925
+ flush();
926
+ pending = { type: event.type, data: event.data };
927
+ }
928
+ schedule();
929
+ },
930
+ flush
931
+ };
932
+ }
933
+
891
934
  // src/agents/spawn.ts
892
935
  async function spawnAgentTurn(thread, input, onEvent) {
893
936
  ensureAgentPath();
@@ -896,9 +939,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
896
939
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
897
940
  );
898
941
  }
899
- const { isGlobalThread: isGlobalThread2 } = await import("../global-workspace-T5IAJF4R.js");
942
+ const { isGlobalThread: isGlobalThread2 } = await import("../global-workspace-2YZ2V4I5.js");
900
943
  if (isGlobalThread2(thread)) {
901
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("../coordinator-prompt-PYRAXZN3.js");
944
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("../coordinator-prompt-CI5SHONJ.js");
902
945
  ensureGlobalCoordinatorCwd2(
903
946
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
904
947
  );
@@ -943,12 +986,13 @@ async function spawnAgentTurn(thread, input, onEvent) {
943
986
  let assistantText = "";
944
987
  let parts = [];
945
988
  let usage = null;
989
+ const outbound = createAgentStreamCoalescer(onEvent);
946
990
  const consume = (stream, kind) => {
947
991
  if (!stream) return;
948
992
  const rl = createInterface({ input: stream, crlfDelay: Infinity });
949
993
  rl.on("line", (line) => {
950
994
  if (kind === "stderr") {
951
- onEvent({ type: "stderr", data: line });
995
+ outbound.push({ type: "stderr", data: line });
952
996
  return;
953
997
  }
954
998
  let events = normalizeParseResult(adapter.parseEvent(line));
@@ -963,12 +1007,12 @@ async function spawnAgentTurn(thread, input, onEvent) {
963
1007
  for (const parsed of events) {
964
1008
  if (parsed.type === "session_id") {
965
1009
  sessionId = parsed.data;
966
- onEvent(parsed);
1010
+ outbound.push(parsed);
967
1011
  continue;
968
1012
  }
969
1013
  if (parsed.type === "usage") {
970
1014
  usage = applyTurnUsage(usage, parsed.data, parsed.scope ?? "request");
971
- onEvent(parsed);
1015
+ outbound.push(parsed);
972
1016
  continue;
973
1017
  }
974
1018
  if (parsed.type === "stdout") {
@@ -981,13 +1025,14 @@ async function spawnAgentTurn(thread, input, onEvent) {
981
1025
  assistantText += parsed.data;
982
1026
  }
983
1027
  parts = applyAgentEvent(parts, parsed);
984
- onEvent(parsed);
1028
+ outbound.push(parsed);
985
1029
  }
986
1030
  });
987
1031
  };
988
1032
  consume(child.stdout, "stdout");
989
1033
  consume(child.stderr, "stderr");
990
1034
  const done = child.then((result) => {
1035
+ outbound.flush();
991
1036
  const exitCode = result.exitCode ?? null;
992
1037
  onEvent({ type: "exit", data: exitCode });
993
1038
  const finalized = finalizeParts(parts);
@@ -1792,7 +1837,7 @@ async function createThread(input, _onSetupLine) {
1792
1837
  return readThread(thread.id) ?? thread;
1793
1838
  }
1794
1839
  async function listLinearIssues(agent, repoPath) {
1795
- const { getAdapter: getAdapter2 } = await import("../agents-W5446HSV.js");
1840
+ const { getAdapter: getAdapter2 } = await import("../agents-LMUFTGKF.js");
1796
1841
  await requireAgent(agent, { requireLinear: true });
1797
1842
  const adapter = getAdapter2(agent);
1798
1843
  if (!adapter.listLinearIssues) {
@@ -2660,7 +2705,7 @@ async function adoptThread(input) {
2660
2705
  messages: input.messages ?? []
2661
2706
  });
2662
2707
  writeThread(thread);
2663
- const { ensureWorkspace: ensureWorkspace2 } = await import("../workspaces-J4ULXOUH.js");
2708
+ const { ensureWorkspace: ensureWorkspace2 } = await import("../workspaces-FDO5L4NI.js");
2664
2709
  await ensureWorkspace2(repoPath);
2665
2710
  return thread;
2666
2711
  }
@@ -4652,7 +4697,7 @@ var Orchestrator = class {
4652
4697
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
4653
4698
  });
4654
4699
  }
4655
- const { autoCleanupOrphansEnabled } = await import("../app-settings-F36ISTCF.js");
4700
+ const { autoCleanupOrphansEnabled } = await import("../app-settings-ZXPAB3QN.js");
4656
4701
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
4657
4702
  await cleanupOrphanWorktrees({ repoPaths });
4658
4703
  }
@@ -4820,7 +4865,7 @@ var Orchestrator = class {
4820
4865
  }
4821
4866
  }
4822
4867
  await setup;
4823
- const { autoRunAfterSetupEnabled } = await import("../app-settings-F36ISTCF.js");
4868
+ const { autoRunAfterSetupEnabled } = await import("../app-settings-ZXPAB3QN.js");
4824
4869
  if (autoRunAfterSetupEnabled()) {
4825
4870
  try {
4826
4871
  await this.startDev(threadId);
@@ -5081,7 +5126,7 @@ var Orchestrator = class {
5081
5126
  }
5082
5127
  const isBrightsy = fresh.agent === "brightsy";
5083
5128
  const isOrchestration = isOrchestratorThread(fresh);
5084
- const { autoRenameBranchEnabled, getGithubGitAuthMode } = await import("../app-settings-F36ISTCF.js");
5129
+ const { autoRenameBranchEnabled, getGithubGitAuthMode } = await import("../app-settings-ZXPAB3QN.js");
5085
5130
  const gitAuthMode = getGithubGitAuthMode();
5086
5131
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
5087
5132
  githubSlug: await resolveGithubRepoSlug(fresh.worktreePath).catch(
@@ -5136,10 +5181,12 @@ var Orchestrator = class {
5136
5181
  if (event.type === "stderr" && typeof event.data === "string") {
5137
5182
  pushTurnStderr(stderrTail, event.data);
5138
5183
  }
5139
- const live = readThread(threadId);
5140
- if (live?.lastError?.includes("reconciled on startup") && (this.activeTurns.has(threadId) || this.startingTurns.has(threadId))) {
5141
- setStatus(threadId, "running");
5142
- this.emit({ type: "status_changed", threadId, status: "running" });
5184
+ if (event.type !== "stdout" && event.type !== "thinking") {
5185
+ const live = readThread(threadId);
5186
+ if (live?.lastError?.includes("reconciled on startup") && (this.activeTurns.has(threadId) || this.startingTurns.has(threadId))) {
5187
+ setStatus(threadId, "running");
5188
+ this.emit({ type: "status_changed", threadId, status: "running" });
5189
+ }
5143
5190
  }
5144
5191
  }
5145
5192
  );
@@ -5789,7 +5836,7 @@ var Orchestrator = class {
5789
5836
  updateThread(thread.id, { title: meta.title });
5790
5837
  }
5791
5838
  }
5792
- const { autoArchiveOnMergeEnabled } = await import("../app-settings-F36ISTCF.js");
5839
+ const { autoArchiveOnMergeEnabled } = await import("../app-settings-ZXPAB3QN.js");
5793
5840
  const latest = this.requireThread(thread.id);
5794
5841
  if (!shouldAutoArchiveOnPrMerge({
5795
5842
  previousPrState: prevState || null,
@@ -6077,7 +6124,7 @@ var Orchestrator = class {
6077
6124
  this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
6078
6125
  if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
6079
6126
  try {
6080
- const { ensureWorkspace: ensureWorkspace2 } = await import("../workspaces-J4ULXOUH.js");
6127
+ const { ensureWorkspace: ensureWorkspace2 } = await import("../workspaces-FDO5L4NI.js");
6081
6128
  await ensureWorkspace2(thread.repoPath);
6082
6129
  } catch {
6083
6130
  }
@@ -6099,7 +6146,7 @@ var Orchestrator = class {
6099
6146
  await runArchiveScript(thread.repoPath, thread.worktreePath);
6100
6147
  } catch {
6101
6148
  }
6102
- const { deleteBranchOnPurgeEnabled } = await import("../app-settings-F36ISTCF.js");
6149
+ const { deleteBranchOnPurgeEnabled } = await import("../app-settings-ZXPAB3QN.js");
6103
6150
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
6104
6151
  await removeWorktree(thread.repoPath, thread.worktreePath, {
6105
6152
  deleteBranch: deleteBranch ? thread.branchName : void 0
@@ -6120,7 +6167,7 @@ var Orchestrator = class {
6120
6167
  return restored2;
6121
6168
  }
6122
6169
  if (!existsSync14(thread.worktreePath)) {
6123
- const { createThreadWorktree: createThreadWorktree2 } = await import("../worktree-4Z2VSHAQ.js");
6170
+ const { createThreadWorktree: createThreadWorktree2 } = await import("../worktree-4555QBQ7.js");
6124
6171
  const { execa: execa5 } = await import("execa");
6125
6172
  const slug = thread.worktreePath.split("/").pop();
6126
6173
  const dest = thread.worktreePath;
@@ -7291,7 +7338,7 @@ function withTimeout(promise, ms, label) {
7291
7338
  async function startMcpServer() {
7292
7339
  const orch = getOrchestrator();
7293
7340
  try {
7294
- const { maxConcurrentAgents } = await import("../app-settings-F36ISTCF.js");
7341
+ const { maxConcurrentAgents } = await import("../app-settings-ZXPAB3QN.js");
7295
7342
  orch.setMaxConcurrent(maxConcurrentAgents());
7296
7343
  } catch {
7297
7344
  }
@@ -7501,7 +7548,7 @@ async function startMcpServer() {
7501
7548
  registerLinearTools(server);
7502
7549
  if (sideboardMcpProfile() !== "worktree") {
7503
7550
  const { getCaffeinateHold, setCaffeinateHold } = await import("../caffeinate-hold-U3QJBV67.js");
7504
- const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults } = await import("../app-settings-F36ISTCF.js");
7551
+ const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults } = await import("../app-settings-ZXPAB3QN.js");
7505
7552
  const accountDefaults = resolveThreadDefaults();
7506
7553
  const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
7507
7554
  server.tool(
@@ -6,13 +6,13 @@ import {
6
6
  listWorkspaces,
7
7
  removeWorkspace,
8
8
  syncWorkspacesFromThreads
9
- } from "./chunk-R2EOZNQI.js";
10
- import "./chunk-UVNXLTFB.js";
11
- import "./chunk-3MA6JH6G.js";
12
- import "./chunk-CY45C3GA.js";
9
+ } from "./chunk-WANQFU3S.js";
10
+ import "./chunk-UHTNJKZX.js";
11
+ import "./chunk-OB6IRIFV.js";
12
+ import "./chunk-ZXYWWSHZ.js";
13
13
  import "./chunk-B3SJXYIJ.js";
14
14
  import "./chunk-JOF3XIEM.js";
15
- import "./chunk-TC2KY5G7.js";
15
+ import "./chunk-6LFV4VFI.js";
16
16
  import "./chunk-NSTQ6QKD.js";
17
17
  import "./chunk-KGZBYWZ3.js";
18
18
  import "./chunk-JL4SJ6V7.js";
@@ -4,13 +4,13 @@ import {
4
4
  listWorkspaces,
5
5
  removeWorkspace,
6
6
  syncWorkspacesFromThreads
7
- } from "./chunk-HBXQQ5TO.js";
8
- import "./chunk-4PTN2LED.js";
9
- import "./chunk-A7LONVNO.js";
10
- import "./chunk-L63LLCTX.js";
7
+ } from "./chunk-6EZRSCIT.js";
8
+ import "./chunk-B2KIO2SD.js";
9
+ import "./chunk-VZ2L4AEJ.js";
10
+ import "./chunk-7D27DD2X.js";
11
11
  import "./chunk-FKOIHGKV.js";
12
- import "./chunk-XY6XXMAK.js";
13
- import "./chunk-5KLC2MWZ.js";
12
+ import "./chunk-FT2SQOL4.js";
13
+ import "./chunk-TLPJHLLM.js";
14
14
  import "./chunk-JT7R45JB.js";
15
15
  import "./chunk-3WA37BRI.js";
16
16
  import "./chunk-77WWLBCI.js";
@@ -46,10 +46,10 @@ import {
46
46
  worktreeDisplayLabel,
47
47
  worktreeDisplayLabelForGroup,
48
48
  worktreeNameFromPath
49
- } from "./chunk-CY45C3GA.js";
49
+ } from "./chunk-ZXYWWSHZ.js";
50
50
  import "./chunk-B3SJXYIJ.js";
51
51
  import "./chunk-JOF3XIEM.js";
52
- import "./chunk-TC2KY5G7.js";
52
+ import "./chunk-6LFV4VFI.js";
53
53
  import "./chunk-NSTQ6QKD.js";
54
54
  import "./chunk-KGZBYWZ3.js";
55
55
  import "./chunk-JL4SJ6V7.js";
@@ -44,10 +44,10 @@ import {
44
44
  worktreeDisplayLabel,
45
45
  worktreeDisplayLabelForGroup,
46
46
  worktreeNameFromPath
47
- } from "./chunk-L63LLCTX.js";
47
+ } from "./chunk-7D27DD2X.js";
48
48
  import "./chunk-FKOIHGKV.js";
49
- import "./chunk-XY6XXMAK.js";
50
- import "./chunk-5KLC2MWZ.js";
49
+ import "./chunk-FT2SQOL4.js";
50
+ import "./chunk-TLPJHLLM.js";
51
51
  import "./chunk-JT7R45JB.js";
52
52
  import "./chunk-3WA37BRI.js";
53
53
  import "./chunk-77WWLBCI.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideboard-ai/core",
3
- "version": "0.1.87",
3
+ "version": "0.1.89",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",