@sideboard-ai/core 0.1.43 → 0.1.44

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.
@@ -21,7 +21,7 @@ import {
21
21
  opencodeAdapter,
22
22
  permissionMode,
23
23
  resolveCursorModelId
24
- } from "./chunk-VC7NORFX.js";
24
+ } from "./chunk-XX26NCB6.js";
25
25
  import "./chunk-ILQK4P5R.js";
26
26
  import {
27
27
  cursorSdkMessageToEvents,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureGlobalCoordinatorCwd
3
- } from "./chunk-Z2BQMXVM.js";
3
+ } from "./chunk-JM2TVGNW.js";
4
4
  import {
5
5
  allocateTeamName,
6
6
  takenSlugsFromThread,
@@ -54,8 +54,9 @@ var COORDINATOR_TOOL_PLAYBOOK = [
54
54
  "Setup / run:",
55
55
  "- run_setup \u2014 re-run worktree setup",
56
56
  "- list_run_scripts / run_dev_script / stop_dev_script \u2014 start/stop named run scripts",
57
- "Inspect / PRs:",
57
+ "Inspect / review / PRs:",
58
58
  "- get_diff \u2014 compact diff summary",
59
+ "- request_review \u2014 open a Review chat tab on a worktree thread (merge-readiness recommendation); then wait_for_turn / get_turn_result on the returned id",
59
60
  "- Ask the worktree agent via send_to_thread to open a draft PR with `gh pr create --draft -R <origin-owner/name>` (workspace `github:` slug / that worktree's origin \u2014 never upstream). Do not open PRs from the orchestrator yourself.",
60
61
  "Human-only (do not attempt): merge, ready-for-review land, purge_thread.",
61
62
  "Thread links in replies: when mentioning a chat/thread for the user, include a markdown link `[Title](sideboard://thread/<id>)` using the full id (or the link field from create_thread / list_threads). Sideboard renders these as clickable opens.",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isGlobalRepoPath
3
- } from "./chunk-X6P2QVRJ.js";
3
+ } from "./chunk-I3PKMLFW.js";
4
4
  import {
5
5
  ensureGhPreferOrigin,
6
6
  resolveRepoRoot
@@ -3,7 +3,7 @@ import {
3
3
  ensureWorkspace,
4
4
  removeWorkspace,
5
5
  syncWorkspacesFromThreads
6
- } from "./chunk-FUCEOJFO.js";
6
+ } from "./chunk-TXFJEXFB.js";
7
7
  import {
8
8
  GLOBAL_WORKSPACE_ID,
9
9
  createGlobalChat,
@@ -13,19 +13,19 @@ import {
13
13
  isGlobalThread,
14
14
  isOrchestratorThread,
15
15
  orchestratorSessionPoisonedByBuiltins
16
- } from "./chunk-X6P2QVRJ.js";
16
+ } from "./chunk-I3PKMLFW.js";
17
17
  import {
18
18
  coordinatorSystemPrompt,
19
19
  coordinatorTurnReminder,
20
20
  enrichWorkspacesWithGithub,
21
21
  ensureGlobalCoordinatorCwd
22
- } from "./chunk-Z2BQMXVM.js";
22
+ } from "./chunk-JM2TVGNW.js";
23
23
  import {
24
24
  PLAN_MODE_INSTRUCTION,
25
25
  allAdapters,
26
26
  getAdapter,
27
27
  parseBrightsyCliLine
28
- } from "./chunk-VC7NORFX.js";
28
+ } from "./chunk-XX26NCB6.js";
29
29
  import {
30
30
  fallbackTurnFailDetail,
31
31
  formatTurnExitError,
@@ -459,9 +459,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
459
459
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
460
460
  );
461
461
  }
462
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-SNN45OCN.js");
462
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-FU6UIPDY.js");
463
463
  if (isGlobalThread2(thread)) {
464
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-BHXBQRPM.js");
464
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-I5YNS27B.js");
465
465
  ensureGlobalCoordinatorCwd2();
466
466
  }
467
467
  const adapter = getAdapter(thread.agent);
@@ -2640,7 +2640,7 @@ async function createThread(input, onSetupLine) {
2640
2640
  return readThread(thread.id) ?? thread;
2641
2641
  }
2642
2642
  async function listLinearIssues(agent, repoPath) {
2643
- const { getAdapter: getAdapter2 } = await import("./agents-T3EA7GZV.js");
2643
+ const { getAdapter: getAdapter2 } = await import("./agents-PP3URTSF.js");
2644
2644
  await requireAgent(agent, { requireLinear: true });
2645
2645
  const adapter = getAdapter2(agent);
2646
2646
  if (!adapter.listLinearIssues) {
@@ -2862,7 +2862,7 @@ async function adoptThread(input) {
2862
2862
  messages: input.messages ?? []
2863
2863
  });
2864
2864
  writeThread(thread);
2865
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-AUYIJ64Z.js");
2865
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-RSEDTBGJ.js");
2866
2866
  await ensureWorkspace2(repoPath);
2867
2867
  return thread;
2868
2868
  }
@@ -3289,9 +3289,59 @@ async function cloneRepoIntoSideboard(opts) {
3289
3289
  return { repoPath, workspace };
3290
3290
  }
3291
3291
 
3292
+ // src/review/request-review.ts
3293
+ import { randomUUID as randomUUID3 } from "crypto";
3294
+ import { readFileSync as readFileSync8, existsSync as existsSync11 } from "fs";
3295
+ import { join as join10 } from "path";
3296
+ var REVIEW_REQUEST_PATH = ".sideboard/attachments/Review request.md";
3297
+ var REVIEW_REQUEST_NAME = "Review request.md";
3298
+ var REVIEW_REQUEST_PREFILL = `Please review the changes in this workspace and recommend whether they are ready to merge.
3299
+
3300
+ Start with a **Recommendation**: Approve, Approve with nits, Request changes, or Needs more information \u2014 and say why in 1\u20133 sentences. Then list blocking findings vs nits (findings may be empty).`;
3301
+ function buildReviewRequestAttachment(content) {
3302
+ return {
3303
+ id: randomUUID3(),
3304
+ name: REVIEW_REQUEST_NAME,
3305
+ kind: "file",
3306
+ path: REVIEW_REQUEST_PATH,
3307
+ content
3308
+ };
3309
+ }
3310
+ function readExistingReviewRequestFile(worktreePath) {
3311
+ const abs = join10(worktreePath, REVIEW_REQUEST_PATH);
3312
+ if (!existsSync11(abs)) return null;
3313
+ try {
3314
+ const content = readFileSync8(abs, "utf8");
3315
+ return content.trim() ? content : null;
3316
+ } catch {
3317
+ return null;
3318
+ }
3319
+ }
3320
+ async function requestReview(threadRef, send) {
3321
+ const from = findThreadByRef(threadRef);
3322
+ if (!from) throw new Error(`Thread not found: ${threadRef}`);
3323
+ if (isOrchestratorThread(from)) {
3324
+ throw new Error(
3325
+ "request_review targets a worktree agent thread (not the orchestrator). Pass a child/worktree thread ref."
3326
+ );
3327
+ }
3328
+ if (from.status === "archived") {
3329
+ throw new Error(`Thread is archived: ${from.id}`);
3330
+ }
3331
+ const existing = readExistingReviewRequestFile(from.worktreePath);
3332
+ const attachments = existing ? [buildReviewRequestAttachment(existing)] : [];
3333
+ const tab = createChatTab({
3334
+ fromThreadId: from.id,
3335
+ title: "Review",
3336
+ attachments
3337
+ });
3338
+ const started = await send(tab.id, REVIEW_REQUEST_PREFILL);
3339
+ return { tab: started, from };
3340
+ }
3341
+
3292
3342
  // src/orchestrator/orchestrator.ts
3293
3343
  import { EventEmitter } from "events";
3294
- import { existsSync as existsSync11 } from "fs";
3344
+ import { existsSync as existsSync12 } from "fs";
3295
3345
 
3296
3346
  // src/threads/sync-branch.ts
3297
3347
  async function syncThreadBranchFromGit(threadId) {
@@ -3402,7 +3452,7 @@ var Orchestrator = class {
3402
3452
  }
3403
3453
  continue;
3404
3454
  }
3405
- if (!existsSync11(thread.worktreePath)) {
3455
+ if (!existsSync12(thread.worktreePath)) {
3406
3456
  setStatus(thread.id, "broken", "Worktree missing on disk");
3407
3457
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
3408
3458
  continue;
@@ -4300,6 +4350,15 @@ var Orchestrator = class {
4300
4350
  setAutonomy(threadRef, autonomy) {
4301
4351
  return this.setThreadOptions(threadRef, { autonomy });
4302
4352
  }
4353
+ /**
4354
+ * Open a Review chat tab on a worktree thread (same as the desktop Review button)
4355
+ * and send the merge-readiness prefill.
4356
+ */
4357
+ async requestReview(threadRef) {
4358
+ const { tab } = await requestReview(threadRef, (ref, prompt) => this.send(ref, prompt));
4359
+ this.emit({ type: "status_changed", threadId: tab.id, status: tab.status });
4360
+ return tab;
4361
+ }
4303
4362
  setThreadOptions(threadRef, patch) {
4304
4363
  const thread = this.requireThread(threadRef);
4305
4364
  const next = {};
@@ -4424,7 +4483,7 @@ var Orchestrator = class {
4424
4483
  updateThread(thread.id, { worktreePath: globalAgentCwd() });
4425
4484
  return setStatus(thread.id, "idle");
4426
4485
  }
4427
- if (!existsSync11(thread.worktreePath)) {
4486
+ if (!existsSync12(thread.worktreePath)) {
4428
4487
  const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-N4PRV4V3.js");
4429
4488
  const { execa: execa6 } = await import("execa");
4430
4489
  const slug = thread.worktreePath.split("/").pop();
@@ -4923,6 +4982,34 @@ async function startMcpServer() {
4923
4982
  };
4924
4983
  }
4925
4984
  );
4985
+ server.tool(
4986
+ "request_review",
4987
+ "Start a merge-readiness Review on a worktree agent thread (same as the desktop Review button). Opens a new Review chat tab, optionally attaches .sideboard/attachments/Review request.md when present, and asks for Approve / Approve with nits / Request changes / Needs more information. Pass a worktree thread ref \u2014 not the orchestrator. Then wait_for_turn / get_turn_result on the returned review tab id.",
4988
+ { ref: z.string().describe("Worktree thread id/ref to review") },
4989
+ async ({ ref }) => {
4990
+ try {
4991
+ const tab = await orch.requestReview(ref);
4992
+ const from = orch.getThread(ref);
4993
+ return {
4994
+ content: [
4995
+ {
4996
+ type: "text",
4997
+ text: JSON.stringify({
4998
+ id: tab.id,
4999
+ title: tab.title,
5000
+ status: tab.status,
5001
+ fromThreadId: from?.id ?? ref,
5002
+ link: `sideboard://thread/${tab.id}`
5003
+ })
5004
+ }
5005
+ ]
5006
+ };
5007
+ } catch (err) {
5008
+ const message = err instanceof Error ? err.message : String(err);
5009
+ return { content: [{ type: "text", text: message }], isError: true };
5010
+ }
5011
+ }
5012
+ );
4926
5013
  server.tool(
4927
5014
  "run_dev_script",
4928
5015
  "Start a .sideboard/.conductor run script for a thread (default script if name omitted); returns port",
@@ -5203,6 +5290,12 @@ export {
5203
5290
  worktreeCleanupSettings,
5204
5291
  applyThreadIntoMain,
5205
5292
  cloneRepoIntoSideboard,
5293
+ REVIEW_REQUEST_PATH,
5294
+ REVIEW_REQUEST_NAME,
5295
+ REVIEW_REQUEST_PREFILL,
5296
+ buildReviewRequestAttachment,
5297
+ readExistingReviewRequestFile,
5298
+ requestReview,
5206
5299
  isPidAlive,
5207
5300
  Orchestrator,
5208
5301
  getOrchestrator,
@@ -798,7 +798,7 @@ var claudeAdapter = {
798
798
  );
799
799
  }
800
800
  const mode = permissionMode(thread);
801
- const { isOrchestratorThread } = await import("./global-workspace-SNN45OCN.js");
801
+ const { isOrchestratorThread } = await import("./global-workspace-FU6UIPDY.js");
802
802
  const isOrchestrator = isOrchestratorThread(thread);
803
803
  const injectedServers = await buildInjectedMcpServers({
804
804
  includeSideboard: true,
@@ -6,7 +6,7 @@ import {
6
6
  enrichWorkspacesWithGithub,
7
7
  ensureGlobalCoordinatorCwd,
8
8
  formatWorkspaceInventory
9
- } from "./chunk-Z2BQMXVM.js";
9
+ } from "./chunk-JM2TVGNW.js";
10
10
  import "./chunk-7PCTK4WO.js";
11
11
  import "./chunk-ENSD62HW.js";
12
12
  import "./chunk-77WWLBCI.js";
@@ -11,8 +11,8 @@ import {
11
11
  orchestrationTitleNeedsSoccerNickname,
12
12
  orchestratorSessionPoisonedByBuiltins,
13
13
  takenTeamSlugsForOrchestration
14
- } from "./chunk-X6P2QVRJ.js";
15
- import "./chunk-Z2BQMXVM.js";
14
+ } from "./chunk-I3PKMLFW.js";
15
+ import "./chunk-JM2TVGNW.js";
16
16
  import "./chunk-7PCTK4WO.js";
17
17
  import "./chunk-ENSD62HW.js";
18
18
  import "./chunk-77WWLBCI.js";
package/dist/index.cjs CHANGED
@@ -3196,8 +3196,9 @@ var init_coordinator_prompt = __esm({
3196
3196
  "Setup / run:",
3197
3197
  "- run_setup \u2014 re-run worktree setup",
3198
3198
  "- list_run_scripts / run_dev_script / stop_dev_script \u2014 start/stop named run scripts",
3199
- "Inspect / PRs:",
3199
+ "Inspect / review / PRs:",
3200
3200
  "- get_diff \u2014 compact diff summary",
3201
+ "- request_review \u2014 open a Review chat tab on a worktree thread (merge-readiness recommendation); then wait_for_turn / get_turn_result on the returned id",
3201
3202
  "- Ask the worktree agent via send_to_thread to open a draft PR with `gh pr create --draft -R <origin-owner/name>` (workspace `github:` slug / that worktree's origin \u2014 never upstream). Do not open PRs from the orchestrator yourself.",
3202
3203
  "Human-only (do not attempt): merge, ready-for-review land, purge_thread.",
3203
3204
  "Thread links in replies: when mentioning a chat/thread for the user, include a markdown link `[Title](sideboard://thread/<id>)` using the full id (or the link field from create_thread / list_threads). Sideboard renders these as clickable opens.",
@@ -5958,10 +5959,10 @@ __export(cursor_recover_exports, {
5958
5959
  function recoverFinishedCursorRun(opts) {
5959
5960
  const agentId = opts.agentId.trim();
5960
5961
  if (!agentId) return null;
5961
- const runsPath = (0, import_node_path23.join)(appDataDir(), "cursor-sdk-store", "runs.ndjson");
5962
- if (!(0, import_node_fs24.existsSync)(runsPath)) return null;
5962
+ const runsPath = (0, import_node_path24.join)(appDataDir(), "cursor-sdk-store", "runs.ndjson");
5963
+ if (!(0, import_node_fs25.existsSync)(runsPath)) return null;
5963
5964
  try {
5964
- const lines = (0, import_node_fs24.readFileSync)(runsPath, "utf8").split("\n");
5965
+ const lines = (0, import_node_fs25.readFileSync)(runsPath, "utf8").split("\n");
5965
5966
  let best = null;
5966
5967
  for (const line of lines) {
5967
5968
  const trimmed = line.trim();
@@ -5987,12 +5988,12 @@ function recoverFinishedCursorRun(opts) {
5987
5988
  return null;
5988
5989
  }
5989
5990
  }
5990
- var import_node_fs24, import_node_path23;
5991
+ var import_node_fs25, import_node_path24;
5991
5992
  var init_cursor_recover = __esm({
5992
5993
  "src/agents/cursor-recover.ts"() {
5993
5994
  "use strict";
5994
- import_node_fs24 = require("fs");
5995
- import_node_path23 = require("path");
5995
+ import_node_fs25 = require("fs");
5996
+ import_node_path24 = require("path");
5996
5997
  init_paths();
5997
5998
  }
5998
5999
  });
@@ -6050,6 +6051,9 @@ __export(index_exports, {
6050
6051
  PASTE_ATTACH_MIN_CHARS: () => PASTE_ATTACH_MIN_CHARS,
6051
6052
  PASTE_ATTACH_MIN_LINES: () => PASTE_ATTACH_MIN_LINES,
6052
6053
  PLAN_MODE_INSTRUCTION: () => PLAN_MODE_INSTRUCTION,
6054
+ REVIEW_REQUEST_NAME: () => REVIEW_REQUEST_NAME,
6055
+ REVIEW_REQUEST_PATH: () => REVIEW_REQUEST_PATH,
6056
+ REVIEW_REQUEST_PREFILL: () => REVIEW_REQUEST_PREFILL,
6053
6057
  SIDEBOARD_FORCE_STOP: () => SIDEBOARD_FORCE_STOP,
6054
6058
  SIDEBOARD_MCP_ALLOWED_TOOLS: () => SIDEBOARD_MCP_ALLOWED_TOOLS,
6055
6059
  THINKING_EFFORTS: () => THINKING_EFFORTS,
@@ -6085,6 +6089,7 @@ __export(index_exports, {
6085
6089
  buildDiffCommentAttachment: () => buildDiffCommentAttachment,
6086
6090
  buildForkTranscriptAttachment: () => buildForkTranscriptAttachment,
6087
6091
  buildPastedTextAttachment: () => buildPastedTextAttachment,
6092
+ buildReviewRequestAttachment: () => buildReviewRequestAttachment,
6088
6093
  buildSessionSeed: () => buildSessionSeed,
6089
6094
  buildWorkspaceScriptEnv: () => buildWorkspaceScriptEnv,
6090
6095
  caffeinateWhileCloudConnectEnabled: () => caffeinateWhileCloudConnectEnabled,
@@ -6263,6 +6268,7 @@ __export(index_exports, {
6263
6268
  permissionMode: () => permissionMode,
6264
6269
  previewLand: () => previewLand,
6265
6270
  pushBranch: () => pushBranch,
6271
+ readExistingReviewRequestFile: () => readExistingReviewRequestFile,
6266
6272
  readSkillBody: () => readSkillBody,
6267
6273
  readThread: () => readThread,
6268
6274
  readWorktreeFile: () => readWorktreeFile,
@@ -6272,6 +6278,7 @@ __export(index_exports, {
6272
6278
  removeWorkspace: () => removeWorkspace,
6273
6279
  removeWorktree: () => removeWorktree,
6274
6280
  repoSlug: () => repoSlug,
6281
+ requestReview: () => requestReview,
6275
6282
  requireAgent: () => requireAgent,
6276
6283
  resolveClaudeExecutable: () => resolveClaudeExecutable,
6277
6284
  resolveConductorCursorAgentId: () => resolveConductorCursorAgentId,
@@ -9491,7 +9498,7 @@ async function importConductorWorkspaceAsync(workspaceId) {
9491
9498
 
9492
9499
  // src/orchestrator/orchestrator.ts
9493
9500
  var import_node_events = require("events");
9494
- var import_node_fs25 = require("fs");
9501
+ var import_node_fs26 = require("fs");
9495
9502
  init_error_detail();
9496
9503
  init_agents();
9497
9504
  init_worktree();
@@ -9735,6 +9742,60 @@ async function cloneRepoIntoSideboard(opts) {
9735
9742
 
9736
9743
  // src/orchestrator/orchestrator.ts
9737
9744
  init_thread_store();
9745
+
9746
+ // src/review/request-review.ts
9747
+ var import_node_crypto5 = require("crypto");
9748
+ var import_node_fs24 = require("fs");
9749
+ var import_node_path23 = require("path");
9750
+ init_global_workspace();
9751
+ init_thread_store();
9752
+ var REVIEW_REQUEST_PATH = ".sideboard/attachments/Review request.md";
9753
+ var REVIEW_REQUEST_NAME = "Review request.md";
9754
+ var REVIEW_REQUEST_PREFILL = `Please review the changes in this workspace and recommend whether they are ready to merge.
9755
+
9756
+ Start with a **Recommendation**: Approve, Approve with nits, Request changes, or Needs more information \u2014 and say why in 1\u20133 sentences. Then list blocking findings vs nits (findings may be empty).`;
9757
+ function buildReviewRequestAttachment(content) {
9758
+ return {
9759
+ id: (0, import_node_crypto5.randomUUID)(),
9760
+ name: REVIEW_REQUEST_NAME,
9761
+ kind: "file",
9762
+ path: REVIEW_REQUEST_PATH,
9763
+ content
9764
+ };
9765
+ }
9766
+ function readExistingReviewRequestFile(worktreePath) {
9767
+ const abs = (0, import_node_path23.join)(worktreePath, REVIEW_REQUEST_PATH);
9768
+ if (!(0, import_node_fs24.existsSync)(abs)) return null;
9769
+ try {
9770
+ const content = (0, import_node_fs24.readFileSync)(abs, "utf8");
9771
+ return content.trim() ? content : null;
9772
+ } catch {
9773
+ return null;
9774
+ }
9775
+ }
9776
+ async function requestReview(threadRef, send) {
9777
+ const from = findThreadByRef(threadRef);
9778
+ if (!from) throw new Error(`Thread not found: ${threadRef}`);
9779
+ if (isOrchestratorThread(from)) {
9780
+ throw new Error(
9781
+ "request_review targets a worktree agent thread (not the orchestrator). Pass a child/worktree thread ref."
9782
+ );
9783
+ }
9784
+ if (from.status === "archived") {
9785
+ throw new Error(`Thread is archived: ${from.id}`);
9786
+ }
9787
+ const existing = readExistingReviewRequestFile(from.worktreePath);
9788
+ const attachments = existing ? [buildReviewRequestAttachment(existing)] : [];
9789
+ const tab = createChatTab({
9790
+ fromThreadId: from.id,
9791
+ title: "Review",
9792
+ attachments
9793
+ });
9794
+ const started = await send(tab.id, REVIEW_REQUEST_PREFILL);
9795
+ return { tab: started, from };
9796
+ }
9797
+
9798
+ // src/orchestrator/orchestrator.ts
9738
9799
  init_types();
9739
9800
  init_settings();
9740
9801
 
@@ -9853,7 +9914,7 @@ var Orchestrator = class {
9853
9914
  }
9854
9915
  continue;
9855
9916
  }
9856
- if (!(0, import_node_fs25.existsSync)(thread.worktreePath)) {
9917
+ if (!(0, import_node_fs26.existsSync)(thread.worktreePath)) {
9857
9918
  setStatus(thread.id, "broken", "Worktree missing on disk");
9858
9919
  this.emit({ type: "status_changed", threadId: thread.id, status: "broken" });
9859
9920
  continue;
@@ -10751,6 +10812,15 @@ var Orchestrator = class {
10751
10812
  setAutonomy(threadRef, autonomy) {
10752
10813
  return this.setThreadOptions(threadRef, { autonomy });
10753
10814
  }
10815
+ /**
10816
+ * Open a Review chat tab on a worktree thread (same as the desktop Review button)
10817
+ * and send the merge-readiness prefill.
10818
+ */
10819
+ async requestReview(threadRef) {
10820
+ const { tab } = await requestReview(threadRef, (ref, prompt) => this.send(ref, prompt));
10821
+ this.emit({ type: "status_changed", threadId: tab.id, status: tab.status });
10822
+ return tab;
10823
+ }
10754
10824
  setThreadOptions(threadRef, patch) {
10755
10825
  const thread = this.requireThread(threadRef);
10756
10826
  const next = {};
@@ -10875,7 +10945,7 @@ var Orchestrator = class {
10875
10945
  updateThread(thread.id, { worktreePath: globalAgentCwd2() });
10876
10946
  return setStatus(thread.id, "idle");
10877
10947
  }
10878
- if (!(0, import_node_fs25.existsSync)(thread.worktreePath)) {
10948
+ if (!(0, import_node_fs26.existsSync)(thread.worktreePath)) {
10879
10949
  const { createThreadWorktree: createThreadWorktree2 } = await Promise.resolve().then(() => (init_worktree(), worktree_exports));
10880
10950
  const { execa: execa7 } = await import("execa");
10881
10951
  const slug = thread.worktreePath.split("/").pop();
@@ -10989,7 +11059,7 @@ init_coordinator_prompt();
10989
11059
  var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
10990
11060
  var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
10991
11061
  var import_zod = require("zod");
10992
- var import_node_path24 = require("path");
11062
+ var import_node_path25 = require("path");
10993
11063
  init_worktree();
10994
11064
  init_global_workspace();
10995
11065
 
@@ -11037,7 +11107,7 @@ async function startMcpServer() {
11037
11107
  async () => {
11038
11108
  const threads = orch.getThreads(true);
11039
11109
  const lines = threads.map((t) => {
11040
- const repo = t.repoPath === GLOBAL_WORKSPACE_ID ? "Orchestration" : (0, import_node_path24.basename)(t.repoPath) || t.repoPath;
11110
+ const repo = t.repoPath === GLOBAL_WORKSPACE_ID ? "Orchestration" : (0, import_node_path25.basename)(t.repoPath) || t.repoPath;
11041
11111
  return `${t.id.slice(0, 8)} ${t.status.padEnd(9)} ${t.agent.padEnd(8)} ${repo} ${t.sourceType}:${t.sourceRef} ${t.title} sideboard://thread/${t.id}${t.devPort ? ` http://localhost:${t.devPort}` : ""}`;
11042
11112
  });
11043
11113
  return {
@@ -11380,6 +11450,34 @@ async function startMcpServer() {
11380
11450
  };
11381
11451
  }
11382
11452
  );
11453
+ server.tool(
11454
+ "request_review",
11455
+ "Start a merge-readiness Review on a worktree agent thread (same as the desktop Review button). Opens a new Review chat tab, optionally attaches .sideboard/attachments/Review request.md when present, and asks for Approve / Approve with nits / Request changes / Needs more information. Pass a worktree thread ref \u2014 not the orchestrator. Then wait_for_turn / get_turn_result on the returned review tab id.",
11456
+ { ref: import_zod.z.string().describe("Worktree thread id/ref to review") },
11457
+ async ({ ref }) => {
11458
+ try {
11459
+ const tab = await orch.requestReview(ref);
11460
+ const from = orch.getThread(ref);
11461
+ return {
11462
+ content: [
11463
+ {
11464
+ type: "text",
11465
+ text: JSON.stringify({
11466
+ id: tab.id,
11467
+ title: tab.title,
11468
+ status: tab.status,
11469
+ fromThreadId: from?.id ?? ref,
11470
+ link: `sideboard://thread/${tab.id}`
11471
+ })
11472
+ }
11473
+ ]
11474
+ };
11475
+ } catch (err) {
11476
+ const message = err instanceof Error ? err.message : String(err);
11477
+ return { content: [{ type: "text", text: message }], isError: true };
11478
+ }
11479
+ }
11480
+ );
11383
11481
  server.tool(
11384
11482
  "run_dev_script",
11385
11483
  "Start a .sideboard/.conductor run script for a thread (default script if name omitted); returns port",
@@ -11923,6 +12021,9 @@ init_injected_mcp();
11923
12021
  PASTE_ATTACH_MIN_CHARS,
11924
12022
  PASTE_ATTACH_MIN_LINES,
11925
12023
  PLAN_MODE_INSTRUCTION,
12024
+ REVIEW_REQUEST_NAME,
12025
+ REVIEW_REQUEST_PATH,
12026
+ REVIEW_REQUEST_PREFILL,
11926
12027
  SIDEBOARD_FORCE_STOP,
11927
12028
  SIDEBOARD_MCP_ALLOWED_TOOLS,
11928
12029
  THINKING_EFFORTS,
@@ -11958,6 +12059,7 @@ init_injected_mcp();
11958
12059
  buildDiffCommentAttachment,
11959
12060
  buildForkTranscriptAttachment,
11960
12061
  buildPastedTextAttachment,
12062
+ buildReviewRequestAttachment,
11961
12063
  buildSessionSeed,
11962
12064
  buildWorkspaceScriptEnv,
11963
12065
  caffeinateWhileCloudConnectEnabled,
@@ -12136,6 +12238,7 @@ init_injected_mcp();
12136
12238
  permissionMode,
12137
12239
  previewLand,
12138
12240
  pushBranch,
12241
+ readExistingReviewRequestFile,
12139
12242
  readSkillBody,
12140
12243
  readThread,
12141
12244
  readWorktreeFile,
@@ -12145,6 +12248,7 @@ init_injected_mcp();
12145
12248
  removeWorkspace,
12146
12249
  removeWorktree,
12147
12250
  repoSlug,
12251
+ requestReview,
12148
12252
  requireAgent,
12149
12253
  resolveClaudeExecutable,
12150
12254
  resolveConductorCursorAgentId,
package/dist/index.d.cts CHANGED
@@ -2056,6 +2056,11 @@ declare class Orchestrator {
2056
2056
  getPrMeta(threadRef: string): Promise<PrMeta | null>;
2057
2057
  getPrDetails(threadRef: string): Promise<PrDetails | null>;
2058
2058
  setAutonomy(threadRef: string, autonomy: Autonomy): Thread;
2059
+ /**
2060
+ * Open a Review chat tab on a worktree thread (same as the desktop Review button)
2061
+ * and send the merge-readiness prefill.
2062
+ */
2063
+ requestReview(threadRef: string): Promise<Thread>;
2059
2064
  setThreadOptions(threadRef: string, patch: ThreadOptionsPatch): Thread;
2060
2065
  createChatTab(input: {
2061
2066
  fromThreadId: string;
@@ -2115,6 +2120,30 @@ declare function startOrchestration(opts: {
2115
2120
  attachments?: Thread['attachments'];
2116
2121
  }): Promise<Thread>;
2117
2122
 
2123
+ /** Worktree-relative path for the editable review prompt (Conductor-style). */
2124
+ declare const REVIEW_REQUEST_PATH = ".sideboard/attachments/Review request.md";
2125
+ declare const REVIEW_REQUEST_NAME = "Review request.md";
2126
+ declare const REVIEW_REQUEST_PREFILL = "Please review the changes in this workspace and recommend whether they are ready to merge.\n\nStart with a **Recommendation**: Approve, Approve with nits, Request changes, or Needs more information \u2014 and say why in 1\u20133 sentences. Then list blocking findings vs nits (findings may be empty).";
2127
+ declare function buildReviewRequestAttachment(content: string): ThreadAttachment;
2128
+ /**
2129
+ * Read an existing custom Review request.md from the worktree if present.
2130
+ * Does not create the file (matches desktop Review button behavior).
2131
+ */
2132
+ declare function readExistingReviewRequestFile(worktreePath: string): string | null;
2133
+ interface RequestReviewResult {
2134
+ /** New Review chat tab. */
2135
+ tab: Thread;
2136
+ /** Worktree thread that was reviewed (source of the tab). */
2137
+ from: Thread;
2138
+ }
2139
+ type SendFn = (threadRef: string, prompt: string) => Promise<Thread>;
2140
+ /**
2141
+ * Mirror the desktop sidebar Review action: open a fresh "Review" chat tab on
2142
+ * the same worktree and send the merge-readiness prefill (attach custom
2143
+ * guidelines file when present).
2144
+ */
2145
+ declare function requestReview(threadRef: string, send: SendFn): Promise<RequestReviewResult>;
2146
+
2118
2147
  type WorkspaceInventoryEntry = Workspace & {
2119
2148
  /** Best-effort GitHub `owner/repo` from remote / gh. */
2120
2149
  githubSlug?: string | null;
@@ -2346,6 +2375,8 @@ interface IpcApi {
2346
2375
  sendQueuedMessageNow(threadRef: string, index: number): Promise<Thread>;
2347
2376
  setAutonomy(threadRef: string, autonomy: Autonomy): Promise<Thread>;
2348
2377
  setThreadOptions(threadRef: string, patch: ThreadOptionsPatch): Promise<Thread>;
2378
+ /** Open a Review chat tab on a worktree thread (merge-readiness). */
2379
+ requestReview(threadRef: string): Promise<Thread>;
2349
2380
  fanOut(threadRefs: string[], prompt: string): Promise<Thread[]>;
2350
2381
  startOrchestration(opts: {
2351
2382
  goal: string;
@@ -2746,4 +2777,4 @@ declare function writeInjectedMcpConfig(opts: {
2746
2777
  includeBrightsy?: boolean;
2747
2778
  }): Promise<string | null>;
2748
2779
 
2749
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
2780
+ export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isThinkingEffort, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, pastedTextStats, permissionMode, previewLand, pushBranch, readExistingReviewRequestFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requestReview, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveThreadDefaults, resolveThreadEffort, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };