@sideboard-ai/core 0.1.331 → 0.1.333

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 (52) hide show
  1. package/dist/agents/cursor-runner.js +2 -2
  2. package/dist/{agents-JXQKHY7Q.js → agents-5NJ3FROS.js} +8 -8
  3. package/dist/{agents-JH4WV2ZH.js → agents-SRM6OVML.js} +7 -7
  4. package/dist/{chunk-NQHTYX35.js → chunk-25KXB7W6.js} +1 -1
  5. package/dist/{chunk-QHKNPN55.js → chunk-4J7R2BFU.js} +31 -18
  6. package/dist/{chunk-G45SGI57.js → chunk-6RUSADA7.js} +4 -4
  7. package/dist/{chunk-QKHEVSB5.js → chunk-BMRJNRQK.js} +1 -1
  8. package/dist/{chunk-JQWCZGSO.js → chunk-CS6LQUL6.js} +110 -11
  9. package/dist/{chunk-KUD24QYI.js → chunk-ELDJBZ52.js} +5 -5
  10. package/dist/{chunk-4YXZOXMT.js → chunk-GK7H3SY7.js} +1 -1
  11. package/dist/{chunk-6U6QRUHY.js → chunk-I6RGRUNY.js} +1 -1
  12. package/dist/{chunk-P4QRDXRY.js → chunk-JJRTVB7D.js} +2 -2
  13. package/dist/{chunk-O7JSWISN.js → chunk-LEUAYFSG.js} +4 -4
  14. package/dist/{chunk-U7EANR52.js → chunk-P7S3XGKL.js} +2 -2
  15. package/dist/{chunk-OOSAMSTE.js → chunk-QKJC725N.js} +29 -16
  16. package/dist/{chunk-XOIJJRAQ.js → chunk-QNKJCD7B.js} +110 -11
  17. package/dist/{chunk-2TUE6JKQ.js → chunk-R4W4VQJZ.js} +2 -0
  18. package/dist/{chunk-7L36GZA4.js → chunk-RCRDNOAT.js} +1 -1
  19. package/dist/{chunk-PZ5MVD27.js → chunk-RJT6JPNX.js} +5 -5
  20. package/dist/{chunk-YBTSZ2SW.js → chunk-TL2HK6LZ.js} +2 -0
  21. package/dist/{chunk-DFKLWWLY.js → chunk-TLL2K2MY.js} +6 -6
  22. package/dist/{chunk-NURZOXGN.js → chunk-UGUWFONI.js} +1 -1
  23. package/dist/{chunk-3DJQLQWU.js → chunk-UV33UCV6.js} +3 -3
  24. package/dist/{chunk-DBRQ5NNB.js → chunk-WXOJSFGO.js} +5 -5
  25. package/dist/{chunk-S5CJUIPY.js → chunk-XOEKCE6L.js} +5 -5
  26. package/dist/{conductor-FA27ZGCV.js → conductor-LUPB6RBH.js} +5 -5
  27. package/dist/{conductor-6DIR7A4N.js → conductor-XSP3SOS2.js} +5 -5
  28. package/dist/{connected-teams-H4LZOJDC.js → connected-teams-2YDE2EZ2.js} +2 -2
  29. package/dist/{connected-teams-XYRZMQO4.js → connected-teams-6756SMAW.js} +2 -2
  30. package/dist/{coordinator-prompt-B6RHGEJK.js → coordinator-prompt-EJJNJ5K7.js} +4 -4
  31. package/dist/{coordinator-prompt-KAZXK5FZ.js → coordinator-prompt-O75QUEHP.js} +4 -4
  32. package/dist/{global-workspace-IOKHZCXD.js → global-workspace-3IG44NAT.js} +4 -4
  33. package/dist/{global-workspace-JKINHUY3.js → global-workspace-Q4OURN7M.js} +4 -4
  34. package/dist/index.cjs +314 -174
  35. package/dist/index.d.cts +23 -3
  36. package/dist/index.d.ts +23 -3
  37. package/dist/index.js +36 -18
  38. package/dist/mcp/run-stdio.cjs +206 -154
  39. package/dist/mcp/run-stdio.js +12 -12
  40. package/dist/{optional-cli-FOSC4NVE.js → optional-cli-KWIII44P.js} +3 -3
  41. package/dist/{optional-cli-NSQZ2DYK.js → optional-cli-XJE4BELL.js} +4 -4
  42. package/dist/{orchestrator-EKG7FUFK.js → orchestrator-IYXIWNB5.js} +11 -11
  43. package/dist/{orchestrator-L44O3JPD.js → orchestrator-WHXHBNRS.js} +10 -10
  44. package/dist/{run-7QMRYP3F.js → run-ARDGUXUN.js} +1 -1
  45. package/dist/{run-UPNCCRCN.js → run-ZKK3VGO5.js} +1 -1
  46. package/dist/{workspaces-FJL3TL3K.js → workspaces-ALUHOCWK.js} +4 -4
  47. package/dist/{workspaces-OLONQF2C.js → workspaces-QGKSXA76.js} +4 -4
  48. package/dist/{worktree-TX4WXQZV.js → worktree-6WWUWH4K.js} +3 -3
  49. package/dist/{worktree-QSQJ2POO.js → worktree-N435EXSP.js} +3 -3
  50. package/dist/{worktree-exclude-P5NJODWP.js → worktree-exclude-KMZQXZKP.js} +2 -2
  51. package/dist/{worktree-exclude-INRDQFWV.js → worktree-exclude-YQBN43QD.js} +2 -2
  52. package/package.json +1 -1
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-N2WW62LF.js";
6
6
  import {
7
7
  ensureWorktreeSideboardIgnored
8
- } from "./chunk-4YXZOXMT.js";
8
+ } from "./chunk-GK7H3SY7.js";
9
9
  import {
10
10
  gh,
11
11
  git,
@@ -16,7 +16,7 @@ import {
16
16
  materializeGithubAgentAuth,
17
17
  originCli,
18
18
  resolveGhAuthToken
19
- } from "./chunk-YBTSZ2SW.js";
19
+ } from "./chunk-TL2HK6LZ.js";
20
20
  import {
21
21
  allocateTeamName,
22
22
  listThreads,
@@ -14,7 +14,7 @@ import {
14
14
  parseSessionQuotaResetAt,
15
15
  planModeTurnInstruction,
16
16
  resolveQuotaFallbackAgent
17
- } from "./chunk-DBRQ5NNB.js";
17
+ } from "./chunk-WXOJSFGO.js";
18
18
  import {
19
19
  applyWorktreePkgCacheEnv,
20
20
  askBlockStillWaiting,
@@ -53,7 +53,7 @@ import {
53
53
  worktreeDevProcessKey,
54
54
  worktreeRunProcessKey,
55
55
  worktreeSetupProcessKey
56
- } from "./chunk-PZ5MVD27.js";
56
+ } from "./chunk-RJT6JPNX.js";
57
57
  import {
58
58
  applyAgentEvent,
59
59
  clipAgentEventForPaint,
@@ -87,7 +87,7 @@ import {
87
87
  import {
88
88
  formatOptionalServicesDirectiveForTurn,
89
89
  formatOptionalServicesReminderForTurn
90
- } from "./chunk-NQHTYX35.js";
90
+ } from "./chunk-25KXB7W6.js";
91
91
  import {
92
92
  extractPresentedPlan,
93
93
  isPresentPlanToolName,
@@ -118,7 +118,7 @@ import {
118
118
  stageAbsolutePathsAsAttachments,
119
119
  stageBuffersAsAttachments,
120
120
  syncWorkspacesFromThreads
121
- } from "./chunk-G45SGI57.js";
121
+ } from "./chunk-6RUSADA7.js";
122
122
  import {
123
123
  addPrStackLayer,
124
124
  allocateTeamSlug,
@@ -167,7 +167,7 @@ import {
167
167
  resolveRepoRoot,
168
168
  switchWorktreeBranch,
169
169
  withRepoGitLock
170
- } from "./chunk-U7EANR52.js";
170
+ } from "./chunk-P7S3XGKL.js";
171
171
  import {
172
172
  issueActivityKind
173
173
  } from "./chunk-OYRN356W.js";
@@ -178,7 +178,7 @@ import {
178
178
  gh,
179
179
  git,
180
180
  resolveGitDirsForLockRecovery
181
- } from "./chunk-YBTSZ2SW.js";
181
+ } from "./chunk-TL2HK6LZ.js";
182
182
  import {
183
183
  REVIEW_TAB_TITLE,
184
184
  agentNicknameFromWorktreePath,
@@ -561,9 +561,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
561
561
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
562
562
  );
563
563
  }
564
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-IOKHZCXD.js");
564
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-3IG44NAT.js");
565
565
  if (isGlobalThread2(thread)) {
566
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-B6RHGEJK.js");
566
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-EJJNJ5K7.js");
567
567
  ensureGlobalCoordinatorCwd2(
568
568
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
569
569
  );
@@ -935,11 +935,24 @@ function expandCanonicalGitRequest(prompt, opts) {
935
935
  expansion = forge === "cursor" ? "Investigate that failing check (`origin pr checks`, `origin pr watch`), fix it, commit, and push. Loop only if a goal to keep going until it passes was given. Do not use `gh run`." : forge === "entire" ? "Investigate the blocking gate (`entire trail merge --dry-run`, `entire trail finding list`, `entire trail watch`), fix it, commit, and push. Loop only if a goal to keep going until it passes was given. Do not use `gh run`." : "Investigate that failing check (`gh pr checks`, `gh run view --log-failed`), fix it, commit, and push. Loop only if a goal to keep going until it passes was given.";
936
936
  }
937
937
  if (!expansion) return prompt;
938
+ if (expansionPushes(action, trimmed)) expansion = withPushReview(expansion);
938
939
  return `${trimmed}
939
940
 
940
941
  (Sideboard git request \u2014 do not ask for clarification: ${expansion})`;
941
942
  }
942
943
  var FIX_CI_RE = /^Fix CI: .+\.$/;
944
+ var PUSH_WAKES_REVIEW = "A push can start or refresh a third-party PR review (whichever bot this repo runs). If this chat already has a goal to keep going until CI or that review is clean, read the reviewer\u2019s latest comment and unresolved threads and address them. Do not start that loop on a plain push.";
945
+ var CHECKS_LOOP_UNLESS_GOAL = / ?Do not start a checks loop unless a goal was given\./g;
946
+ function withPushReview(expansion) {
947
+ const base = expansion.replace(CHECKS_LOOP_UNLESS_GOAL, "").trim();
948
+ if (base.includes("third-party PR review")) return base;
949
+ return `${base} ${PUSH_WAKES_REVIEW}`;
950
+ }
951
+ function expansionPushes(action, prompt) {
952
+ if (action === "ready-for-review" || action === "merge") return false;
953
+ if (action) return true;
954
+ return prompt === "Address review comments." || FIX_CI_RE.test(prompt);
955
+ }
943
956
 
944
957
  // src/git/pr-merge-archive.ts
945
958
  function normalizePrState(state) {
@@ -3836,7 +3849,7 @@ async function adoptThread(input) {
3836
3849
  throw new Error(`Worktree not found: ${input.worktreePath}`);
3837
3850
  }
3838
3851
  const repoPath = await resolveRepoRoot(input.worktreePath);
3839
- const { stdout: branch } = await import("./run-UPNCCRCN.js").then(
3852
+ const { stdout: branch } = await import("./run-ZKK3VGO5.js").then(
3840
3853
  ({ git: git2 }) => git2(["rev-parse", "--abbrev-ref", "HEAD"], input.worktreePath)
3841
3854
  );
3842
3855
  const thread = createEmptyThread({
@@ -3851,9 +3864,9 @@ async function adoptThread(input) {
3851
3864
  messages: input.messages ?? []
3852
3865
  });
3853
3866
  writeThread(thread);
3854
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-FJL3TL3K.js");
3867
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-ALUHOCWK.js");
3855
3868
  await addWorkspace2(repoPath);
3856
- const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-P5NJODWP.js");
3869
+ const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-KMZQXZKP.js");
3857
3870
  await ensureWorktreeSideboardIgnored(input.worktreePath);
3858
3871
  return thread;
3859
3872
  }
@@ -5424,7 +5437,7 @@ async function confirmLand(thread, opts) {
5424
5437
  if (preview.dirty) {
5425
5438
  committed = await commitAll(thread.worktreePath, meta.commitMessage);
5426
5439
  }
5427
- const { git: git2 } = await import("./run-UPNCCRCN.js");
5440
+ const { git: git2 } = await import("./run-ZKK3VGO5.js");
5428
5441
  const { stdout: headOut } = await git2(
5429
5442
  ["rev-parse", "--abbrev-ref", "HEAD"],
5430
5443
  thread.worktreePath,
@@ -6354,7 +6367,7 @@ function formatPrGateDirective() {
6354
6367
  "If a goal is given (not after every push):",
6355
6368
  "- Enter a watch-fix-push loop and stay in it until that goal is met or you are blocked (examples: \u201CGreptile 5/5\u201D, \u201CCI green\u201D, \u201Cuntil checks pass\u201D). Do not stop after one red run or one review cycle.",
6356
6369
  "- Wait with `/long-running`: detach `gh pr checks --watch` (add `-R <origin>` when needed), then loop `wait_for_job` until stillRunning is false. Do not end the turn \u2014 a native CLI Task or bash notify does not resume this chat. Do not ask the human to poll.",
6357
- "- Greptile 5/5: wait for the greptile check; read the latest `N/5` from the PR body or Greptile\u2019s most recently *updated* issue comment; also fetch unresolved review comments / the \u201CPrompt to fix all with AI\u201D block. Done = **5/5 and zero unresolved Greptile comments**. If Greptile is idle, comment `@greptile review`. Cap about 5 iterations, then report leftovers. Do not merge unless asked."
6370
+ "- A commit or push can start or refresh a third-party PR review (Greptile, CodeRabbit, Bugbot, Copilot, or another bot on the PR). Read that reviewer\u2019s latest comment and unresolved threads, including any score or fix-it block they posted. Acknowledge it: make the requested changes, push, and wait for the refreshed review. Done = the goal the user named, with that reviewer\u2019s unresolved comments addressed. Do not invent a vendor trigger. Cap about 5 iterations, then report leftovers. Do not merge unless asked."
6358
6371
  ].join("\n");
6359
6372
  }
6360
6373
  function formatProcessGuideDirective(opts) {
@@ -6805,7 +6818,7 @@ function formatScheduledPrompt(name, prompt) {
6805
6818
  ${prompt}`;
6806
6819
  }
6807
6820
  async function defaultDeps() {
6808
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-L44O3JPD.js");
6821
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-WHXHBNRS.js");
6809
6822
  const orch = getOrchestrator2();
6810
6823
  return {
6811
6824
  findThread: (id) => findThreadByRef(id),
@@ -9637,7 +9650,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
9637
9650
  await withRepoGitLock(thread.repoPath, async () => {
9638
9651
  await git(["worktree", "add", dest, thread.branchName], thread.repoPath);
9639
9652
  });
9640
- const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-P5NJODWP.js");
9653
+ const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-KMZQXZKP.js");
9641
9654
  await ensureWorktreeSideboardIgnored(dest);
9642
9655
  }
9643
9656
  const restorePatch = {};
@@ -9743,7 +9756,7 @@ async function startOrchestration(opts) {
9743
9756
  sourceRef: "default",
9744
9757
  ...createOpts
9745
9758
  }).catch(async () => {
9746
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-QSQJ2POO.js");
9759
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-N435EXSP.js");
9747
9760
  const repo = await resolveRepoRoot2(repoPath);
9748
9761
  const def = await resolveDefaultBranch2(repo);
9749
9762
  return orch.createThread({
@@ -4,22 +4,93 @@ import {
4
4
  resolveCommandBinarySync,
5
5
  run,
6
6
  withExportedPath
7
- } from "./chunk-2TUE6JKQ.js";
7
+ } from "./chunk-R4W4VQJZ.js";
8
8
  import {
9
9
  resolveAgentExecutable
10
10
  } from "./chunk-EY5BJAPV.js";
11
11
 
12
12
  // src/agents/install.ts
13
- import { existsSync } from "fs";
13
+ import { chmodSync, existsSync } from "fs";
14
+ import { join } from "path";
15
+
16
+ // src/agents/install-native.ts
17
+ var CLAUDE_NATIVE_INSTALL = "curl -fsSL https://claude.ai/install.sh | bash";
18
+ var OPENCODE_NATIVE_INSTALL = "curl -fsSL https://opencode.ai/install | bash";
19
+ async function installCurlScript(opts) {
20
+ const result = await run("bash", ["-c", opts.command], {
21
+ reject: false,
22
+ timeoutMs: 3e5
23
+ });
24
+ if (result.exitCode === 0) {
25
+ const binPath = await whichOnPath(opts.bin);
26
+ if (binPath) {
27
+ return {
28
+ ok: true,
29
+ command: opts.command,
30
+ exitCode: 0,
31
+ stdout: result.stdout,
32
+ stderr: result.stderr,
33
+ message: `Installed ${opts.label} \u2192 ${binPath}`
34
+ };
35
+ }
36
+ return {
37
+ ok: false,
38
+ command: opts.command,
39
+ exitCode: result.exitCode,
40
+ stdout: result.stdout,
41
+ stderr: result.stderr,
42
+ message: `${opts.label} installer finished, but \`${opts.bin}\` is not on PATH. Expected ${opts.expected}.`
43
+ };
44
+ }
45
+ const detail = result.stderr.trim() || result.stdout.trim();
46
+ try {
47
+ await openInSystemTerminal(opts.command);
48
+ return {
49
+ ok: false,
50
+ openedTerminal: true,
51
+ command: opts.command,
52
+ exitCode: result.exitCode,
53
+ stdout: result.stdout,
54
+ stderr: result.stderr,
55
+ message: `${opts.label} install failed (exit ${result.exitCode}). Opened Terminal with: ${opts.command}`
56
+ };
57
+ } catch {
58
+ return {
59
+ ok: false,
60
+ command: opts.command,
61
+ exitCode: result.exitCode,
62
+ stdout: result.stdout,
63
+ stderr: result.stderr,
64
+ message: detail ? `${opts.label} install failed (exit ${result.exitCode}). ${detail}` : `${opts.label} install failed (exit ${result.exitCode})`
65
+ };
66
+ }
67
+ }
68
+ function installClaudeNative() {
69
+ return installCurlScript({
70
+ command: CLAUDE_NATIVE_INSTALL,
71
+ bin: "claude",
72
+ label: "Claude Code",
73
+ expected: "~/.local/bin/claude"
74
+ });
75
+ }
76
+ function installOpenCodeNative() {
77
+ return installCurlScript({
78
+ command: OPENCODE_NATIVE_INSTALL,
79
+ bin: "opencode",
80
+ label: "OpenCode",
81
+ expected: "~/.opencode/bin/opencode"
82
+ });
83
+ }
84
+
85
+ // src/agents/install.ts
14
86
  var SETUP = {
15
87
  claude: {
16
88
  agent: "claude",
17
89
  kind: "cli",
18
- summary: "Install the Claude Code CLI, then complete login in a terminal.",
90
+ summary: "Install Claude Code, then complete login in a terminal.",
19
91
  docsUrl: "https://code.claude.com/docs/en/install",
20
- installCommand: "npm install -g @anthropic-ai/claude-code",
92
+ installCommand: CLAUDE_NATIVE_INSTALL,
21
93
  loginCommand: "claude auth login",
22
- npmPackage: "@anthropic-ai/claude-code",
23
94
  updateArgs: ["update"]
24
95
  },
25
96
  codex: {
@@ -35,12 +106,12 @@ var SETUP = {
35
106
  opencode: {
36
107
  agent: "opencode",
37
108
  kind: "cli",
38
- summary: "Install OpenCode (curl installer or npm), then authenticate providers.",
109
+ summary: "Install OpenCode, then authenticate providers.",
39
110
  docsUrl: "https://opencode.ai/docs",
40
- // Prefer the official installer; npm package name is opencode-ai.
41
- installCommand: "curl -fsSL https://opencode.ai/install | bash",
111
+ // npm package `opencode-ai` ships the same kind of non-executable native stub
112
+ // as Claude. The curl installer writes ~/.opencode/bin/opencode.
113
+ installCommand: OPENCODE_NATIVE_INSTALL,
42
114
  loginCommand: "opencode auth login",
43
- npmPackage: "opencode-ai@latest",
44
115
  updateArgs: ["upgrade"]
45
116
  },
46
117
  cursor: {
@@ -177,7 +248,17 @@ async function installNpmGlobalPackage(opts) {
177
248
  }
178
249
  }
179
250
  enrichPathWithNpmGlobalBin();
180
- const binPath = opts.cliBin ? await whichOnPath(opts.cliBin) : null;
251
+ const binPath = opts.cliBin ? await resolveCliAfterNpmInstall(opts.cliBin) : null;
252
+ if (opts.cliBin && !binPath) {
253
+ return {
254
+ ok: false,
255
+ command: opts.installCommand,
256
+ exitCode: 0,
257
+ stdout: result.stdout,
258
+ stderr: result.stderr,
259
+ message: `Installed ${opts.npmPackage}, but \`${opts.cliBin}\` is not on PATH.`
260
+ };
261
+ }
181
262
  return {
182
263
  ok: true,
183
264
  command: opts.installCommand,
@@ -185,9 +266,25 @@ async function installNpmGlobalPackage(opts) {
185
266
  stdout: result.stdout,
186
267
  stderr: result.stderr,
187
268
  // Library-only packages (`@cursor/sdk`) have no CLI to look for.
188
- message: !opts.cliBin ? `Installed ${opts.npmPackage}` : binPath ? `Installed ${opts.npmPackage} \u2192 ${binPath}` : `Installed ${opts.npmPackage} (CLI not yet on PATH)`
269
+ message: !opts.cliBin ? `Installed ${opts.npmPackage}` : `Installed ${opts.npmPackage} \u2192 ${binPath}`
189
270
  };
190
271
  }
272
+ async function resolveCliAfterNpmInstall(cliBin) {
273
+ const found = await whichOnPath(cliBin);
274
+ if (found) return found;
275
+ const prefix = await run("npm", ["prefix", "-g"], { reject: false, timeoutMs: 8e3 });
276
+ if (prefix.exitCode !== 0) return null;
277
+ const root = prefix.stdout.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.startsWith("/")).pop();
278
+ if (!root) return null;
279
+ const candidate = join(root, "bin", cliBin);
280
+ if (!existsSync(candidate)) return null;
281
+ try {
282
+ chmodSync(candidate, 493);
283
+ } catch {
284
+ }
285
+ enrichPathWithNpmGlobalBin();
286
+ return whichOnPath(cliBin);
287
+ }
191
288
  async function resolveExistingCli(agent) {
192
289
  if (agent === "cursor") return null;
193
290
  const exe = resolveAgentExecutable(agent);
@@ -230,6 +327,8 @@ async function installAgent(agent) {
230
327
  if (existing && info.updateArgs?.length) {
231
328
  return runVendorUpdate(existing, info.updateArgs);
232
329
  }
330
+ if (agent === "claude") return installClaudeNative();
331
+ if (agent === "opencode") return installOpenCodeNative();
233
332
  if (info.npmPackage && !isCurlInstaller(info.installCommand)) {
234
333
  const cliBin = agent === "cursor" ? null : CLI_BIN[agent];
235
334
  return installNpmGlobalPackage({
@@ -12,6 +12,8 @@ import { homedir } from "os";
12
12
  import { delimiter, join } from "path";
13
13
  var EXTRA_BIN_DIRS = [
14
14
  ".local/bin",
15
+ // Official OpenCode installer (`curl https://opencode.ai/install | bash`).
16
+ ".opencode/bin",
15
17
  ".cargo/bin",
16
18
  ".nvm/current/bin",
17
19
  ".asdf/shims",
@@ -273,7 +273,7 @@ async function connectedCliPresence(integrations) {
273
273
  const ids = connectedOptionalServices(integrations).filter((spec) => spec.cli).map((spec) => spec.id);
274
274
  if (ids.length === 0) return void 0;
275
275
  try {
276
- const { optionalCliPresence } = await import("./optional-cli-NSQZ2DYK.js");
276
+ const { optionalCliPresence } = await import("./optional-cli-XJE4BELL.js");
277
277
  return await optionalCliPresence(ids);
278
278
  } catch {
279
279
  return void 0;
@@ -11,11 +11,11 @@ import {
11
11
  isGlobalThread,
12
12
  isOrchestratorThread,
13
13
  isSlackCoordinatorThread
14
- } from "./chunk-G45SGI57.js";
14
+ } from "./chunk-6RUSADA7.js";
15
15
  import {
16
16
  mergeAgentGitAuthEnv,
17
17
  resolveAgentGitAuthEnv
18
- } from "./chunk-U7EANR52.js";
18
+ } from "./chunk-P7S3XGKL.js";
19
19
  import {
20
20
  ATTACHMENTS_DIR,
21
21
  DETACHED_JOBS_DIR,
@@ -24,11 +24,11 @@ import {
24
24
  } from "./chunk-N2WW62LF.js";
25
25
  import {
26
26
  ensureWorktreeSideboardIgnored
27
- } from "./chunk-4YXZOXMT.js";
27
+ } from "./chunk-GK7H3SY7.js";
28
28
  import {
29
29
  ensureAgentPath,
30
30
  run
31
- } from "./chunk-YBTSZ2SW.js";
31
+ } from "./chunk-TL2HK6LZ.js";
32
32
  import {
33
33
  REVIEW_TAB_TITLE,
34
34
  allocateTeamName,
@@ -1696,7 +1696,7 @@ var PORT_RANGE_SIZE = 10;
1696
1696
  var RECLAIM_RETRY_DELAY_MS = 40;
1697
1697
  var RECLAIM_TRIES = 8;
1698
1698
  async function killReclaimable(ports, worktreePath, signal) {
1699
- const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-6DIR7A4N.js");
1699
+ const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-XSP3SOS2.js");
1700
1700
  if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
1701
1701
  else killListenersOnPorts2(ports);
1702
1702
  }
@@ -14,6 +14,8 @@ import { homedir } from "os";
14
14
  import { delimiter, join } from "path";
15
15
  var EXTRA_BIN_DIRS = [
16
16
  ".local/bin",
17
+ // Official OpenCode installer (`curl https://opencode.ai/install | bash`).
18
+ ".opencode/bin",
17
19
  ".cargo/bin",
18
20
  ".nvm/current/bin",
19
21
  ".asdf/shims",
@@ -3,7 +3,7 @@ import {
3
3
  brightsyMcpServerName,
4
4
  ensureCliTeamTracked,
5
5
  ensureConnectedBrightsyTeamTokens
6
- } from "./chunk-S5CJUIPY.js";
6
+ } from "./chunk-XOEKCE6L.js";
7
7
  import {
8
8
  listAssignedLinearIssues
9
9
  } from "./chunk-ZT5YPYZE.js";
@@ -15,13 +15,13 @@ import {
15
15
  } from "./chunk-OOXRMTU6.js";
16
16
  import {
17
17
  isOrchestratorThread
18
- } from "./chunk-O7JSWISN.js";
18
+ } from "./chunk-LEUAYFSG.js";
19
19
  import {
20
20
  codexUnattendedGitConfigArgs,
21
21
  mergeAgentGitAuthEnv,
22
22
  resolveAgentGitAuthEnv,
23
23
  resolveCodexGitWritableRoots
24
- } from "./chunk-P4QRDXRY.js";
24
+ } from "./chunk-JJRTVB7D.js";
25
25
  import {
26
26
  loadBrightsyConfig
27
27
  } from "./chunk-RSA47QYR.js";
@@ -48,7 +48,7 @@ import {
48
48
  packagedMcpStdioPath,
49
49
  parseCursorRunnerLine,
50
50
  resolveNodeLaunch
51
- } from "./chunk-NURZOXGN.js";
51
+ } from "./chunk-UGUWFONI.js";
52
52
  import {
53
53
  extractJsonErrorMessage,
54
54
  formatUnknownDetail,
@@ -58,7 +58,7 @@ import {
58
58
  import {
59
59
  githubAgentAuthReady,
60
60
  run
61
- } from "./chunk-2TUE6JKQ.js";
61
+ } from "./chunk-R4W4VQJZ.js";
62
62
  import {
63
63
  AGENT_RPC_CLAUDE_SDK_SERVER,
64
64
  AGENT_RPC_CWD_ENV,
@@ -2659,7 +2659,7 @@ var claudeAdapter = {
2659
2659
  );
2660
2660
  }
2661
2661
  const mode = permissionMode(thread);
2662
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-JKINHUY3.js");
2662
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-Q4OURN7M.js");
2663
2663
  const isOrchestrator = isOrchestratorThread2(thread);
2664
2664
  const rpc = worktreeAgentRpc(isOrchestrator);
2665
2665
  const injectedServers = await buildInjectedMcpServers({
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  npmGlobalNodeModules,
7
7
  run
8
- } from "./chunk-2TUE6JKQ.js";
8
+ } from "./chunk-R4W4VQJZ.js";
9
9
  import {
10
10
  isElectronLikeCommand,
11
11
  wrapElectronAsNodeLaunch
@@ -2,14 +2,14 @@ import {
2
2
  OPTIONAL_SERVICES,
3
3
  isOptionalServiceId,
4
4
  optionalServiceSpec
5
- } from "./chunk-7L36GZA4.js";
5
+ } from "./chunk-RCRDNOAT.js";
6
6
  import {
7
7
  installNpmGlobalPackage,
8
8
  whichOnPath
9
- } from "./chunk-XOIJJRAQ.js";
9
+ } from "./chunk-QNKJCD7B.js";
10
10
  import {
11
11
  enrichPathWithNpmGlobalBin
12
- } from "./chunk-2TUE6JKQ.js";
12
+ } from "./chunk-R4W4VQJZ.js";
13
13
 
14
14
  // src/integrations/optional-cli.ts
15
15
  async function detectOptionalServiceClis() {
@@ -12,19 +12,19 @@ import {
12
12
  } from "./chunk-5MXLDDYF.js";
13
13
  import {
14
14
  isOrchestratorThread
15
- } from "./chunk-G45SGI57.js";
15
+ } from "./chunk-6RUSADA7.js";
16
16
  import {
17
17
  codexUnattendedGitConfigArgs,
18
18
  mergeAgentGitAuthEnv,
19
19
  resolveAgentGitAuthEnv,
20
20
  resolveCodexGitWritableRoots
21
- } from "./chunk-U7EANR52.js";
21
+ } from "./chunk-P7S3XGKL.js";
22
22
  import {
23
23
  applyConnectedTeamToCli,
24
24
  brightsyMcpServerName,
25
25
  ensureCliTeamTracked,
26
26
  ensureConnectedBrightsyTeamTokens
27
- } from "./chunk-6U6QRUHY.js";
27
+ } from "./chunk-I6RGRUNY.js";
28
28
  import {
29
29
  loadBrightsyConfig
30
30
  } from "./chunk-E63AM3PW.js";
@@ -38,7 +38,7 @@ import {
38
38
  githubAgentAuthReady,
39
39
  npmGlobalNodeModules,
40
40
  run
41
- } from "./chunk-YBTSZ2SW.js";
41
+ } from "./chunk-TL2HK6LZ.js";
42
42
  import {
43
43
  BASE_ALLOWED_TOOLS,
44
44
  CLAUDE_CHROME_ALLOWED_TOOLS,
@@ -2966,7 +2966,7 @@ var claudeAdapter = {
2966
2966
  );
2967
2967
  }
2968
2968
  const mode = permissionMode(thread);
2969
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-IOKHZCXD.js");
2969
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-3IG44NAT.js");
2970
2970
  const isOrchestrator = isOrchestratorThread2(thread);
2971
2971
  const rpc = worktreeAgentRpc(isOrchestrator);
2972
2972
  const injectedServers = await buildInjectedMcpServers({
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-RSA47QYR.js";
9
9
  import {
10
10
  run
11
- } from "./chunk-2TUE6JKQ.js";
11
+ } from "./chunk-R4W4VQJZ.js";
12
12
  import {
13
13
  appDataDir
14
14
  } from "./chunk-H4UEFJRI.js";
@@ -19,7 +19,7 @@ import { join } from "path";
19
19
 
20
20
  // src/brightsy/accounts.ts
21
21
  async function loadConnectedTeams() {
22
- const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-H4LZOJDC.js");
22
+ const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-2YDE2EZ2.js");
23
23
  return listConnectedBrightsyTeams2();
24
24
  }
25
25
  async function runBrightsyTeamsJson(args) {
@@ -48,14 +48,14 @@ async function listBrightsyAccounts() {
48
48
  async function getBrightsySession() {
49
49
  try {
50
50
  const { ensureBrightsyLocalConfigFresh: ensureBrightsyLocalConfigFresh2 } = await import("./oauth-CR5FY4CJ.js");
51
- const { ensureConnectedBrightsyTeamTokens: ensureConnectedBrightsyTeamTokens2 } = await import("./connected-teams-H4LZOJDC.js");
51
+ const { ensureConnectedBrightsyTeamTokens: ensureConnectedBrightsyTeamTokens2 } = await import("./connected-teams-2YDE2EZ2.js");
52
52
  await ensureBrightsyLocalConfigFresh2();
53
53
  await ensureConnectedBrightsyTeamTokens2();
54
54
  loadBrightsyConfig();
55
55
  const data = await runBrightsyTeamsJson([]);
56
56
  const accounts = Array.isArray(data.teams) ? data.teams : [];
57
57
  const active = data.active ?? accounts.find((a) => a.active) ?? null;
58
- const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-H4LZOJDC.js");
58
+ const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-2YDE2EZ2.js");
59
59
  const connectedTeams = ensureCliTeamTracked2(
60
60
  active ? { id: active.id, slug: active.slug, name: active.name } : void 0
61
61
  );
@@ -95,7 +95,7 @@ async function performBrightsyAccountSwitch(accountIdOrSlug) {
95
95
  return { cfg, target: data.active };
96
96
  }
97
97
  async function switchBrightsyAccount(accountIdOrSlug) {
98
- const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-H4LZOJDC.js");
98
+ const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-2YDE2EZ2.js");
99
99
  await connectBrightsyTeam2(accountIdOrSlug);
100
100
  return getBrightsySession();
101
101
  }
@@ -32,18 +32,18 @@ import {
32
32
  tryReservePort,
33
33
  tryReservePorts,
34
34
  worktreeRunPortsPath
35
- } from "./chunk-KUD24QYI.js";
35
+ } from "./chunk-ELDJBZ52.js";
36
36
  import "./chunk-OOXRMTU6.js";
37
- import "./chunk-O7JSWISN.js";
38
- import "./chunk-P4QRDXRY.js";
37
+ import "./chunk-LEUAYFSG.js";
38
+ import "./chunk-JJRTVB7D.js";
39
39
  import "./chunk-QVLDZWHZ.js";
40
- import "./chunk-QKHEVSB5.js";
40
+ import "./chunk-BMRJNRQK.js";
41
41
  import "./chunk-NJV5YEKI.js";
42
42
  import "./chunk-N6ZF3XRP.js";
43
43
  import "./chunk-OPXEJJBM.js";
44
44
  import "./chunk-6K64FJDD.js";
45
45
  import "./chunk-LG6RJBIY.js";
46
- import "./chunk-2TUE6JKQ.js";
46
+ import "./chunk-R4W4VQJZ.js";
47
47
  import "./chunk-EY5BJAPV.js";
48
48
  import {
49
49
  stripNestedElectronEnv
@@ -34,13 +34,13 @@ import {
34
34
  tryReservePort,
35
35
  tryReservePorts,
36
36
  worktreeRunPortsPath
37
- } from "./chunk-PZ5MVD27.js";
37
+ } from "./chunk-RJT6JPNX.js";
38
38
  import "./chunk-5MXLDDYF.js";
39
- import "./chunk-G45SGI57.js";
40
- import "./chunk-U7EANR52.js";
39
+ import "./chunk-6RUSADA7.js";
40
+ import "./chunk-P7S3XGKL.js";
41
41
  import "./chunk-N2WW62LF.js";
42
- import "./chunk-4YXZOXMT.js";
43
- import "./chunk-YBTSZ2SW.js";
42
+ import "./chunk-GK7H3SY7.js";
43
+ import "./chunk-TL2HK6LZ.js";
44
44
  import "./chunk-EW5D53VB.js";
45
45
  import "./chunk-WMZIANPV.js";
46
46
  import "./chunk-7BAS6DF7.js";
@@ -8,10 +8,10 @@ import {
8
8
  ensureConnectedBrightsyTeamTokens,
9
9
  getConnectedBrightsyTeamsRaw,
10
10
  listConnectedBrightsyTeams
11
- } from "./chunk-S5CJUIPY.js";
11
+ } from "./chunk-XOEKCE6L.js";
12
12
  import "./chunk-RSA47QYR.js";
13
13
  import "./chunk-JAT3JFOS.js";
14
- import "./chunk-2TUE6JKQ.js";
14
+ import "./chunk-R4W4VQJZ.js";
15
15
  import "./chunk-4TR3HZFT.js";
16
16
  import "./chunk-H4UEFJRI.js";
17
17
  export {
@@ -10,10 +10,10 @@ import {
10
10
  ensureConnectedBrightsyTeamTokens,
11
11
  getConnectedBrightsyTeamsRaw,
12
12
  listConnectedBrightsyTeams
13
- } from "./chunk-6U6QRUHY.js";
13
+ } from "./chunk-I6RGRUNY.js";
14
14
  import "./chunk-E63AM3PW.js";
15
15
  import "./chunk-2GPQZZLY.js";
16
- import "./chunk-YBTSZ2SW.js";
16
+ import "./chunk-TL2HK6LZ.js";
17
17
  import "./chunk-WWUABK6B.js";
18
18
  import "./chunk-WOU343SI.js";
19
19
  export {
@@ -9,11 +9,11 @@ import {
9
9
  enrichWorkspacesWithGithub,
10
10
  ensureGlobalCoordinatorCwd,
11
11
  formatWorkspaceInventory
12
- } from "./chunk-G45SGI57.js";
13
- import "./chunk-U7EANR52.js";
12
+ } from "./chunk-6RUSADA7.js";
13
+ import "./chunk-P7S3XGKL.js";
14
14
  import "./chunk-N2WW62LF.js";
15
- import "./chunk-4YXZOXMT.js";
16
- import "./chunk-YBTSZ2SW.js";
15
+ import "./chunk-GK7H3SY7.js";
16
+ import "./chunk-TL2HK6LZ.js";
17
17
  import "./chunk-EW5D53VB.js";
18
18
  import "./chunk-WMZIANPV.js";
19
19
  import "./chunk-7BAS6DF7.js";