@sideboard-ai/core 0.1.349 → 0.1.350

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 (78) hide show
  1. package/dist/{abletime-CGFJZB7L.js → abletime-TX7BTTR2.js} +5 -5
  2. package/dist/{abletime-3HRWLQZJ.js → abletime-URSRZW7P.js} +4 -4
  3. package/dist/{abletime-oauth-QNJQLHR4.js → abletime-oauth-QS3WPSCC.js} +3 -3
  4. package/dist/{abletime-oauth-JQDSH5OL.js → abletime-oauth-SL3NMNEC.js} +4 -4
  5. package/dist/{abletime-rest-TANL5TMY.js → abletime-rest-GGQLUO55.js} +3 -3
  6. package/dist/{abletime-rest-UQA2CRZN.js → abletime-rest-JZU6JJCV.js} +4 -4
  7. package/dist/agents/acp-runner.cjs +491 -0
  8. package/dist/agents/acp-runner.d.cts +46 -0
  9. package/dist/agents/acp-runner.d.ts +46 -0
  10. package/dist/agents/acp-runner.js +323 -0
  11. package/dist/{agents-DMPBFF3F.js → agents-P5QIV24I.js} +37 -7
  12. package/dist/{agents-AZ2PV6XP.js → agents-RGAV5OHD.js} +42 -11
  13. package/dist/{app-settings-SNOPJ7P5.js → app-settings-IA7ZZKWQ.js} +2 -2
  14. package/dist/{app-settings-PPIMYJKS.js → app-settings-XILTSD6L.js} +1 -1
  15. package/dist/{chunk-Q4I6KDOL.js → chunk-2MESZ5XR.js} +60 -39
  16. package/dist/{chunk-RUIHNWRV.js → chunk-37ZBEBP6.js} +6 -6
  17. package/dist/{chunk-WHMLMCPU.js → chunk-5AHWUJRT.js} +1925 -1722
  18. package/dist/{chunk-7B2OUQON.js → chunk-5TCMXEYL.js} +48 -3
  19. package/dist/{chunk-FDYMVJFU.js → chunk-5WF54R3B.js} +5 -5
  20. package/dist/{chunk-PVCECFJK.js → chunk-7ZD4OK6G.js} +1 -1
  21. package/dist/{chunk-RYPD7XWV.js → chunk-B4EFQTMP.js} +5 -5
  22. package/dist/chunk-BF6INES4.js +144 -0
  23. package/dist/{chunk-IVRWRYTH.js → chunk-BZK62VPT.js} +2 -2
  24. package/dist/{chunk-AJMERXZP.js → chunk-CCWQ65VD.js} +2 -2
  25. package/dist/{chunk-62ALWH3T.js → chunk-DL4OHDBV.js} +3 -3
  26. package/dist/{chunk-CATTIFSP.js → chunk-EZ2MUWNW.js} +3 -3
  27. package/dist/{chunk-4NXGVJA6.js → chunk-F4RFFE2H.js} +48 -3
  28. package/dist/{chunk-E77SRVVO.js → chunk-FCKTBE26.js} +1 -1
  29. package/dist/{chunk-3DBL2C45.js → chunk-FQ3JYUKI.js} +2 -2
  30. package/dist/{chunk-CEQ4Z32M.js → chunk-J4EA5SHF.js} +3 -3
  31. package/dist/{chunk-MHSBF3SO.js → chunk-LFSTOECH.js} +3 -3
  32. package/dist/{chunk-OHUAAX3O.js → chunk-M45WGODR.js} +2 -2
  33. package/dist/{chunk-MVFFLU5V.js → chunk-MANERA6F.js} +12 -5
  34. package/dist/{chunk-ZXI5DR5S.js → chunk-NDEVAA34.js} +1624 -1487
  35. package/dist/{chunk-UJMCTGV7.js → chunk-PXSWVZIL.js} +2 -2
  36. package/dist/{chunk-6RIPZ73M.js → chunk-SMSD6U3N.js} +3 -1
  37. package/dist/{chunk-RPHH4FNK.js → chunk-TCEUNSLX.js} +3 -1
  38. package/dist/chunk-TRMPDDVL.js +232 -0
  39. package/dist/{chunk-6WMNIX2U.js → chunk-UFUAIVNV.js} +9 -5
  40. package/dist/{chunk-QHXZKHUL.js → chunk-VHQ6OG3U.js} +2 -2
  41. package/dist/{chunk-WWU4SYZR.js → chunk-VL6F2KRE.js} +5 -1
  42. package/dist/{chunk-IRFBD6GU.js → chunk-W5GHFT7E.js} +71 -47
  43. package/dist/{chunk-5FUAOU3G.js → chunk-WB3G2LQO.js} +1 -1
  44. package/dist/{chunk-JCYGQKER.js → chunk-WFX4ZVSZ.js} +1 -1
  45. package/dist/{chunk-F7WP2U5I.js → chunk-WJURGCBR.js} +1 -1
  46. package/dist/chunk-YE7Z5WH3.js +142 -0
  47. package/dist/{chunk-ROXM6QZV.js → chunk-ZBSEJIOV.js} +12 -5
  48. package/dist/{conductor-NHC6X74J.js → conductor-HVOGBK63.js} +6 -5
  49. package/dist/{conductor-65VPUPOW.js → conductor-VGCXUUG6.js} +7 -6
  50. package/dist/connected-teams-2YDE2EZ2.js +1 -1
  51. package/dist/{coordinator-prompt-5GZWIVSY.js → coordinator-prompt-DPO7L2JO.js} +5 -5
  52. package/dist/{coordinator-prompt-R2PURZL3.js → coordinator-prompt-E736TJBS.js} +4 -4
  53. package/dist/{global-workspace-64KC7PST.js → global-workspace-4RDPAOTT.js} +5 -5
  54. package/dist/{global-workspace-UEECLWSX.js → global-workspace-TG2TVLUF.js} +4 -4
  55. package/dist/index.cjs +1600 -929
  56. package/dist/index.d.cts +132 -891
  57. package/dist/index.d.ts +132 -891
  58. package/dist/index.js +433 -207
  59. package/dist/{linear-PKYJH4WK.js → linear-E3BX5PX5.js} +2 -2
  60. package/dist/{linear-MIJO6DCV.js → linear-WG23LBCX.js} +3 -3
  61. package/dist/{linear-list-JPQ27RXG.js → linear-list-OINZWVV5.js} +1 -1
  62. package/dist/{linear-list-N57PR6JM.js → linear-list-VU47BNUV.js} +1 -1
  63. package/dist/mcp/run-stdio.cjs +1097 -720
  64. package/dist/mcp/run-stdio.js +32 -24
  65. package/dist/{optional-cli-4GTEDEYJ.js → optional-cli-K6HX2X5O.js} +4 -3
  66. package/dist/{optional-cli-RPJIQBDX.js → optional-cli-SA3EQYML.js} +6 -5
  67. package/dist/{orchestrator-Y5PYSMR6.js → orchestrator-3I2FLEZL.js} +17 -15
  68. package/dist/{orchestrator-I5G5A5BV.js → orchestrator-QDHZ56LA.js} +11 -10
  69. package/dist/thread-CJRchYLj.d.cts +856 -0
  70. package/dist/thread-CJRchYLj.d.ts +856 -0
  71. package/dist/{thread-store-HZ4U4OXB.js → thread-store-4YTOV2HL.js} +3 -3
  72. package/dist/{thread-store-QKNU5CHM.js → thread-store-LME2ICZP.js} +2 -2
  73. package/dist/{workspaces-6TIM2TM2.js → workspaces-4PA24IX6.js} +4 -4
  74. package/dist/{workspaces-I2EHNTFE.js → workspaces-6TMYV4N2.js} +5 -5
  75. package/dist/{worktree-7JFYDNUX.js → worktree-4ATMCYIE.js} +3 -3
  76. package/dist/{worktree-M2GJGK2P.js → worktree-DA6SKIU5.js} +4 -4
  77. package/package.json +3 -3
  78. /package/dist/{chunk-XOEKCE6L.js → chunk-OHXNGBC4.js} +0 -0
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import {
4
+ ACP_HARNESSES,
5
+ isAcpHarnessId
6
+ } from "./chunk-BF6INES4.js";
3
7
  import {
4
8
  enrichPathWithNpmGlobalBin,
5
9
  isConductorBundledCli,
@@ -9,7 +13,7 @@ import {
9
13
  } from "./chunk-TL2HK6LZ.js";
10
14
  import {
11
15
  resolveAgentExecutable
12
- } from "./chunk-WWU4SYZR.js";
16
+ } from "./chunk-VL6F2KRE.js";
13
17
 
14
18
  // src/agents/install.ts
15
19
  import { chmodSync, existsSync } from "fs";
@@ -133,6 +137,14 @@ var SETUP = {
133
137
  installCommand: "npm install -g @brightsy/cli",
134
138
  loginCommand: "brightsy login",
135
139
  npmPackage: "@brightsy/cli"
140
+ },
141
+ acp: {
142
+ agent: "acp",
143
+ kind: "cli",
144
+ summary: "One adapter for every ACP harness. Install Gemini CLI or Copilot CLI from Settings \u2014 there is no separate ACP binary, and no interactive attach.",
145
+ docsUrl: "https://agentclientprotocol.com",
146
+ installCommand: null,
147
+ loginCommand: null
136
148
  }
137
149
  };
138
150
  var CLI_BIN = {
@@ -288,7 +300,7 @@ async function resolveCliAfterNpmInstall(cliBin) {
288
300
  return whichOnPath(cliBin);
289
301
  }
290
302
  async function resolveExistingCli(agent) {
291
- if (agent === "cursor") return null;
303
+ if (agent === "cursor" || agent === "acp") return null;
292
304
  const exe = resolveAgentExecutable(agent);
293
305
  if ((exe.includes("/") || exe.includes("\\")) && existsSync(exe)) return exe;
294
306
  enrichPathWithNpmGlobalBin();
@@ -314,7 +326,33 @@ async function runVendorUpdate(existing, updateArgs) {
314
326
  function isCurlInstaller(command) {
315
327
  return /curl\s| \|\s*bash/.test(command);
316
328
  }
329
+ async function installAcpHarness(id) {
330
+ const spec = ACP_HARNESSES[id];
331
+ return installNpmGlobalPackage({
332
+ npmPackage: spec.npmPackage,
333
+ installCommand: spec.installCommand,
334
+ cliBin: spec.bin
335
+ });
336
+ }
337
+ async function loginAcpHarness(id) {
338
+ const spec = ACP_HARNESSES[id];
339
+ const prepared = await prepareTerminalCommand(spec.loginCommand);
340
+ await openInSystemTerminal(prepared);
341
+ return {
342
+ ok: true,
343
+ openedTerminal: true,
344
+ command: prepared,
345
+ message: `Opened Terminal to run: ${prepared}`
346
+ };
347
+ }
317
348
  async function installAgent(agent) {
349
+ if (isAcpHarnessId(agent)) return installAcpHarness(agent);
350
+ if (agent === "acp") {
351
+ return {
352
+ ok: false,
353
+ message: "Install Gemini CLI or Copilot CLI from Settings \u2192 Agents. ACP is the adapter, not a binary."
354
+ };
355
+ }
318
356
  const info = getAgentSetupInfo(agent);
319
357
  if (info.kind === "bundled-sdk" || info.kind === "api-key") {
320
358
  return {
@@ -348,6 +386,13 @@ async function installAgent(agent) {
348
386
  };
349
387
  }
350
388
  async function loginAgent(agent) {
389
+ if (isAcpHarnessId(agent)) return loginAcpHarness(agent);
390
+ if (agent === "acp") {
391
+ return {
392
+ ok: false,
393
+ message: "Log in to Gemini CLI or Copilot CLI from Settings \u2192 Agents."
394
+ };
395
+ }
351
396
  const info = getAgentSetupInfo(agent);
352
397
  const loginCommand = resolveLoginCommand(agent);
353
398
  if (!loginCommand) {
@@ -366,7 +411,7 @@ async function loginAgent(agent) {
366
411
  };
367
412
  }
368
413
  async function loginManagedAccount(accountId) {
369
- const { loadAppSettings } = await import("./app-settings-PPIMYJKS.js");
414
+ const { loadAppSettings } = await import("./app-settings-XILTSD6L.js");
370
415
  const { loginEnvPrefix } = await import("./managed-accounts-PITLFLKU.js");
371
416
  const account = loadAppSettings().accounts.accounts.find((a) => a.id === accountId);
372
417
  if (!account) {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getAbleTimeHost,
6
6
  isAbleTimeConnected
7
- } from "./chunk-6WMNIX2U.js";
7
+ } from "./chunk-UFUAIVNV.js";
8
8
 
9
9
  // src/integrations/abletime-mcp.ts
10
10
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -153,7 +153,7 @@ function textsFromUnknown(value) {
153
153
  return "";
154
154
  }
155
155
  async function abletimeMcpRequest(method, params, opts) {
156
- const rawToken = opts?.token ?? await import("./abletime-oauth-JQDSH5OL.js").then((m) => m.ensureAbleTimeAccessToken());
156
+ const rawToken = opts?.token ?? await import("./abletime-oauth-SL3NMNEC.js").then((m) => m.ensureAbleTimeAccessToken());
157
157
  if (!rawToken?.trim()) {
158
158
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
159
159
  }
@@ -224,9 +224,9 @@ async function callAbleTimeTool(name, args = {}, opts) {
224
224
  if (!opts?.token && !isAbleTimeConnected()) {
225
225
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
226
226
  }
227
- const rawToken = opts?.token ?? await import("./abletime-oauth-JQDSH5OL.js").then((m) => m.ensureAbleTimeAccessToken());
227
+ const rawToken = opts?.token ?? await import("./abletime-oauth-SL3NMNEC.js").then((m) => m.ensureAbleTimeAccessToken());
228
228
  if (rawToken && ableTimeUsesRest(rawToken)) {
229
- const { callAbleTimeRestTool } = await import("./abletime-rest-UQA2CRZN.js");
229
+ const { callAbleTimeRestTool } = await import("./abletime-rest-JZU6JJCV.js");
230
230
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
231
231
  }
232
232
  const requestOpts = { ...opts, pm: opts?.pm ?? abletimeToolUsesPm(name) };
@@ -242,7 +242,7 @@ async function callAbleTimeTool(name, args = {}, opts) {
242
242
  return await call();
243
243
  }
244
244
  if (rawToken && ableTimeUsesRest(rawToken) && isAbleTimeRejectedCredential(message)) {
245
- const { callAbleTimeRestTool } = await import("./abletime-rest-UQA2CRZN.js");
245
+ const { callAbleTimeRestTool } = await import("./abletime-rest-JZU6JJCV.js");
246
246
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
247
247
  }
248
248
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -16,7 +16,7 @@ import {
16
16
  disconnectLinearConnection,
17
17
  loadAppSettings,
18
18
  saveLinearOAuth
19
- } from "./chunk-6WMNIX2U.js";
19
+ } from "./chunk-UFUAIVNV.js";
20
20
 
21
21
  // src/integrations/linear-oauth.ts
22
22
  import { createHash, randomBytes } from "crypto";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  getAbleTimeHost,
8
8
  isAbleTimeConnected
9
- } from "./chunk-WWU4SYZR.js";
9
+ } from "./chunk-VL6F2KRE.js";
10
10
 
11
11
  // src/integrations/abletime-mcp.ts
12
12
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -155,7 +155,7 @@ function textsFromUnknown(value) {
155
155
  return "";
156
156
  }
157
157
  async function abletimeMcpRequest(method, params, opts) {
158
- const rawToken = opts?.token ?? await import("./abletime-oauth-QNJQLHR4.js").then((m) => m.ensureAbleTimeAccessToken());
158
+ const rawToken = opts?.token ?? await import("./abletime-oauth-QS3WPSCC.js").then((m) => m.ensureAbleTimeAccessToken());
159
159
  if (!rawToken?.trim()) {
160
160
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
161
161
  }
@@ -226,9 +226,9 @@ async function callAbleTimeTool(name, args = {}, opts) {
226
226
  if (!opts?.token && !isAbleTimeConnected()) {
227
227
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
228
228
  }
229
- const rawToken = opts?.token ?? await import("./abletime-oauth-QNJQLHR4.js").then((m) => m.ensureAbleTimeAccessToken());
229
+ const rawToken = opts?.token ?? await import("./abletime-oauth-QS3WPSCC.js").then((m) => m.ensureAbleTimeAccessToken());
230
230
  if (rawToken && ableTimeUsesRest(rawToken)) {
231
- const { callAbleTimeRestTool } = await import("./abletime-rest-TANL5TMY.js");
231
+ const { callAbleTimeRestTool } = await import("./abletime-rest-GGQLUO55.js");
232
232
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
233
233
  }
234
234
  const requestOpts = { ...opts, pm: opts?.pm ?? abletimeToolUsesPm(name) };
@@ -244,7 +244,7 @@ async function callAbleTimeTool(name, args = {}, opts) {
244
244
  return await call();
245
245
  }
246
246
  if (rawToken && ableTimeUsesRest(rawToken) && isAbleTimeRejectedCredential(message)) {
247
- const { callAbleTimeRestTool } = await import("./abletime-rest-TANL5TMY.js");
247
+ const { callAbleTimeRestTool } = await import("./abletime-rest-GGQLUO55.js");
248
248
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
249
249
  }
250
250
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {
4
+ run
5
+ } from "./chunk-TL2HK6LZ.js";
6
+ import {
7
+ loadAppSettings
8
+ } from "./chunk-VL6F2KRE.js";
9
+
10
+ // src/agents/acp-harness.ts
11
+ import { existsSync, readFileSync } from "fs";
12
+ import { homedir } from "os";
13
+ import { join } from "path";
14
+ var ACP_HARNESSES = {
15
+ gemini: {
16
+ id: "gemini",
17
+ label: "Gemini CLI",
18
+ bin: "gemini",
19
+ args: ["--acp"],
20
+ npmPackage: "@google/gemini-cli",
21
+ installCommand: "npm install -g @google/gemini-cli",
22
+ loginCommand: "gemini",
23
+ docsUrl: "https://geminicli.com/docs/cli/acp-mode/",
24
+ authHint: "Gemini CLI is on PATH but no API key or ~/.gemini login was found. Set GEMINI_API_KEY or run `gemini` once to sign in."
25
+ },
26
+ copilot: {
27
+ id: "copilot",
28
+ label: "Copilot CLI",
29
+ bin: "copilot",
30
+ args: ["--acp", "--stdio"],
31
+ npmPackage: "@github/copilot",
32
+ installCommand: "npm install -g @github/copilot",
33
+ loginCommand: "copilot",
34
+ docsUrl: "https://docs.github.com/en/copilot/reference/copilot-cli-reference/acp-server",
35
+ authHint: "Copilot CLI is on PATH but no GitHub login was found. Run `gh auth login` or `copilot`, or set GH_TOKEN."
36
+ }
37
+ };
38
+ var ACP_HARNESS_IDS = Object.keys(ACP_HARNESSES);
39
+ function isAcpHarnessId(value) {
40
+ return value === "gemini" || value === "copilot";
41
+ }
42
+ function acpHarnessLabel(id) {
43
+ if (isAcpHarnessId(id)) return ACP_HARNESSES[id].label;
44
+ return "ACP";
45
+ }
46
+ function defaultAcpHarness() {
47
+ const stored = loadAppSettings().defaults?.acpHarness;
48
+ return isAcpHarnessId(stored) ? stored : "gemini";
49
+ }
50
+ function agentSupportsAttach(agent) {
51
+ return agent !== "acp";
52
+ }
53
+ var AUTH_READ_MAX = 64e3;
54
+ function envSet(env, ...keys) {
55
+ return keys.some((key) => Boolean(env[key]?.trim()));
56
+ }
57
+ function fileMentionsCredential(path) {
58
+ try {
59
+ if (!existsSync(path)) return false;
60
+ const text = readFileSync(path, "utf8").slice(0, AUTH_READ_MAX);
61
+ return /"(access_token|refresh_token|oauth_token|api_key|apiKey)"\s*:/i.test(text) || /oauth_token\s*:/i.test(text);
62
+ } catch {
63
+ return false;
64
+ }
65
+ }
66
+ function acpHarnessLooksAuthenticated(id, env = process.env, home = homedir(), opts) {
67
+ if (id === "gemini") {
68
+ if (envSet(env, "GEMINI_API_KEY", "GOOGLE_API_KEY", "GOOGLE_GENAI_API_KEY")) return true;
69
+ return fileMentionsCredential(join(home, ".gemini", "oauth_creds.json")) || fileMentionsCredential(join(home, ".gemini", "google_accounts.json"));
70
+ }
71
+ if (envSet(env, "COPILOT_GITHUB_TOKEN", "GH_TOKEN", "GITHUB_TOKEN")) return true;
72
+ if (fileMentionsCredential(join(home, ".copilot", "config.json")) || fileMentionsCredential(join(home, ".config", "gh", "hosts.yml"))) {
73
+ return true;
74
+ }
75
+ return opts?.ghLoggedIn === true;
76
+ }
77
+ async function copilotGhLoggedIn() {
78
+ const status = await run("gh", ["auth", "status"], { reject: false, timeoutMs: 5e3 });
79
+ return status.exitCode === 0;
80
+ }
81
+ function acpHarnessStatus(input) {
82
+ const spec = ACP_HARNESSES[input.id];
83
+ if (!input.binPath) {
84
+ return {
85
+ agent: "acp",
86
+ acpHarness: input.id,
87
+ label: spec.label,
88
+ installed: false,
89
+ authenticated: false,
90
+ linearMcp: false,
91
+ warnings: [],
92
+ reason: `${spec.label} is not on PATH (\`${spec.bin}\`). ${spec.installCommand}`
93
+ };
94
+ }
95
+ const authenticated = acpHarnessLooksAuthenticated(
96
+ input.id,
97
+ input.env ?? process.env,
98
+ input.home ?? homedir(),
99
+ { ghLoggedIn: input.ghLoggedIn }
100
+ );
101
+ return {
102
+ agent: "acp",
103
+ acpHarness: input.id,
104
+ label: spec.label,
105
+ installed: true,
106
+ authenticated,
107
+ linearMcp: false,
108
+ warnings: [],
109
+ ...authenticated ? {} : { reason: spec.authHint }
110
+ };
111
+ }
112
+ async function resolveAcpHarnessCommand(id) {
113
+ const spec = ACP_HARNESSES[id];
114
+ const which = await run("which", [spec.bin], { reject: false, timeoutMs: 3e3 });
115
+ const file = which.exitCode === 0 ? which.stdout.trim().split("\n")[0]?.trim() ?? "" : "";
116
+ if (!file) {
117
+ throw new Error(`${spec.label} is not on PATH. ${spec.installCommand}`);
118
+ }
119
+ return { file, args: [...spec.args] };
120
+ }
121
+ async function detectAcpHarness(id) {
122
+ const spec = ACP_HARNESSES[id];
123
+ const which = await run("which", [spec.bin], { reject: false, timeoutMs: 3e3 });
124
+ const file = which.exitCode === 0 ? which.stdout.trim().split("\n")[0]?.trim() ?? "" : "";
125
+ const ghLoggedIn = id === "copilot" && file && !acpHarnessLooksAuthenticated(id) ? await copilotGhLoggedIn() : false;
126
+ return acpHarnessStatus({ id, binPath: file || null, ghLoggedIn });
127
+ }
128
+ async function detectAcpHarnesses() {
129
+ return Promise.all(ACP_HARNESS_IDS.map((id) => detectAcpHarness(id)));
130
+ }
131
+
132
+ export {
133
+ ACP_HARNESSES,
134
+ ACP_HARNESS_IDS,
135
+ isAcpHarnessId,
136
+ acpHarnessLabel,
137
+ defaultAcpHarness,
138
+ agentSupportsAttach,
139
+ acpHarnessLooksAuthenticated,
140
+ acpHarnessStatus,
141
+ resolveAcpHarnessCommand,
142
+ detectAcpHarness,
143
+ detectAcpHarnesses
144
+ };
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  loadAppSettings,
6
6
  saveAppSettings
7
- } from "./chunk-6WMNIX2U.js";
7
+ } from "./chunk-UFUAIVNV.js";
8
8
 
9
9
  // src/integrations/optional-services.ts
10
10
  var OPTIONAL_SERVICE_IDS = ["vercel", "supabase", "posthog", "sentry"];
@@ -282,7 +282,7 @@ async function connectedCliPresence(integrations) {
282
282
  const ids = connectedOptionalServices(integrations).filter((spec) => spec.cli).map((spec) => spec.id);
283
283
  if (ids.length === 0) return void 0;
284
284
  try {
285
- const { optionalCliPresence } = await import("./optional-cli-RPJIQBDX.js");
285
+ const { optionalCliPresence } = await import("./optional-cli-SA3EQYML.js");
286
286
  return await optionalCliPresence(ids);
287
287
  } catch {
288
288
  return void 0;
@@ -4,14 +4,14 @@ import {
4
4
  normalizeAbleTimeCredential,
5
5
  normalizeAbleTimeHost,
6
6
  rewriteAbleTimeError
7
- } from "./chunk-FDYMVJFU.js";
7
+ } from "./chunk-5WF54R3B.js";
8
8
  import {
9
9
  httpFetch
10
10
  } from "./chunk-JAT3JFOS.js";
11
11
  import {
12
12
  getAbleTimeAccessToken,
13
13
  getAbleTimeHost
14
- } from "./chunk-6WMNIX2U.js";
14
+ } from "./chunk-UFUAIVNV.js";
15
15
 
16
16
  // src/integrations/abletime-rest.ts
17
17
  var ABLETIME_REST_PREFIX = "/api/public/v2";
@@ -3,13 +3,13 @@
3
3
  import {
4
4
  abletimeRestUrl,
5
5
  textFromAbleTimeDoc
6
- } from "./chunk-OHUAAX3O.js";
6
+ } from "./chunk-M45WGODR.js";
7
7
  import {
8
8
  assertAbleTimeCredential,
9
9
  callAbleTimeTool,
10
10
  normalizeAbleTimeHost,
11
11
  rewriteAbleTimeError
12
- } from "./chunk-RYPD7XWV.js";
12
+ } from "./chunk-B4EFQTMP.js";
13
13
  import {
14
14
  downloadAuthenticatedFile,
15
15
  extractHttpUrls,
@@ -27,7 +27,7 @@ import {
27
27
  getAbleTimeHost,
28
28
  isAbleTimeConnected,
29
29
  saveAbleTimeConnection
30
- } from "./chunk-WWU4SYZR.js";
30
+ } from "./chunk-VL6F2KRE.js";
31
31
 
32
32
  // src/integrations/abletime-attachments.ts
33
33
  function asRecord(value) {
@@ -7,7 +7,7 @@ import {
7
7
  resolveGithubRepoSlug,
8
8
  resolveOriginRemote,
9
9
  resolveRepoRoot
10
- } from "./chunk-QHXZKHUL.js";
10
+ } from "./chunk-VHQ6OG3U.js";
11
11
  import {
12
12
  ATTACHMENTS_DIR,
13
13
  attachmentsGitignoreBody
@@ -20,7 +20,7 @@ import {
20
20
  teamSlugFromName,
21
21
  updateThread,
22
22
  writeThread
23
- } from "./chunk-6RIPZ73M.js";
23
+ } from "./chunk-SMSD6U3N.js";
24
24
  import {
25
25
  assertOrchestratorCapableAgent,
26
26
  formatAccountProfilePlaybookLine,
@@ -33,7 +33,7 @@ import {
33
33
  resolveThreadDefaults,
34
34
  resolveViewerProfile,
35
35
  resolveViewerProfileForRepo
36
- } from "./chunk-WWU4SYZR.js";
36
+ } from "./chunk-VL6F2KRE.js";
37
37
  import {
38
38
  appDataDir,
39
39
  globalAgentCwd,
@@ -1,3 +1,7 @@
1
+ import {
2
+ ACP_HARNESSES,
3
+ isAcpHarnessId
4
+ } from "./chunk-YE7Z5WH3.js";
1
5
  import {
2
6
  enrichPathWithNpmGlobalBin,
3
7
  isConductorBundledCli,
@@ -7,7 +11,7 @@ import {
7
11
  } from "./chunk-R4W4VQJZ.js";
8
12
  import {
9
13
  resolveAgentExecutable
10
- } from "./chunk-6WMNIX2U.js";
14
+ } from "./chunk-UFUAIVNV.js";
11
15
 
12
16
  // src/agents/install.ts
13
17
  import { chmodSync, existsSync } from "fs";
@@ -131,6 +135,14 @@ var SETUP = {
131
135
  installCommand: "npm install -g @brightsy/cli",
132
136
  loginCommand: "brightsy login",
133
137
  npmPackage: "@brightsy/cli"
138
+ },
139
+ acp: {
140
+ agent: "acp",
141
+ kind: "cli",
142
+ summary: "One adapter for every ACP harness. Install Gemini CLI or Copilot CLI from Settings \u2014 there is no separate ACP binary, and no interactive attach.",
143
+ docsUrl: "https://agentclientprotocol.com",
144
+ installCommand: null,
145
+ loginCommand: null
134
146
  }
135
147
  };
136
148
  var CLI_BIN = {
@@ -286,7 +298,7 @@ async function resolveCliAfterNpmInstall(cliBin) {
286
298
  return whichOnPath(cliBin);
287
299
  }
288
300
  async function resolveExistingCli(agent) {
289
- if (agent === "cursor") return null;
301
+ if (agent === "cursor" || agent === "acp") return null;
290
302
  const exe = resolveAgentExecutable(agent);
291
303
  if ((exe.includes("/") || exe.includes("\\")) && existsSync(exe)) return exe;
292
304
  enrichPathWithNpmGlobalBin();
@@ -312,7 +324,33 @@ async function runVendorUpdate(existing, updateArgs) {
312
324
  function isCurlInstaller(command) {
313
325
  return /curl\s| \|\s*bash/.test(command);
314
326
  }
327
+ async function installAcpHarness(id) {
328
+ const spec = ACP_HARNESSES[id];
329
+ return installNpmGlobalPackage({
330
+ npmPackage: spec.npmPackage,
331
+ installCommand: spec.installCommand,
332
+ cliBin: spec.bin
333
+ });
334
+ }
335
+ async function loginAcpHarness(id) {
336
+ const spec = ACP_HARNESSES[id];
337
+ const prepared = await prepareTerminalCommand(spec.loginCommand);
338
+ await openInSystemTerminal(prepared);
339
+ return {
340
+ ok: true,
341
+ openedTerminal: true,
342
+ command: prepared,
343
+ message: `Opened Terminal to run: ${prepared}`
344
+ };
345
+ }
315
346
  async function installAgent(agent) {
347
+ if (isAcpHarnessId(agent)) return installAcpHarness(agent);
348
+ if (agent === "acp") {
349
+ return {
350
+ ok: false,
351
+ message: "Install Gemini CLI or Copilot CLI from Settings \u2192 Agents. ACP is the adapter, not a binary."
352
+ };
353
+ }
316
354
  const info = getAgentSetupInfo(agent);
317
355
  if (info.kind === "bundled-sdk" || info.kind === "api-key") {
318
356
  return {
@@ -346,6 +384,13 @@ async function installAgent(agent) {
346
384
  };
347
385
  }
348
386
  async function loginAgent(agent) {
387
+ if (isAcpHarnessId(agent)) return loginAcpHarness(agent);
388
+ if (agent === "acp") {
389
+ return {
390
+ ok: false,
391
+ message: "Log in to Gemini CLI or Copilot CLI from Settings \u2192 Agents."
392
+ };
393
+ }
349
394
  const info = getAgentSetupInfo(agent);
350
395
  const loginCommand = resolveLoginCommand(agent);
351
396
  if (!loginCommand) {
@@ -364,7 +409,7 @@ async function loginAgent(agent) {
364
409
  };
365
410
  }
366
411
  async function loginManagedAccount(accountId) {
367
- const { loadAppSettings } = await import("./app-settings-SNOPJ7P5.js");
412
+ const { loadAppSettings } = await import("./app-settings-IA7ZZKWQ.js");
368
413
  const { loginEnvPrefix } = await import("./managed-accounts-JJTAKHMG.js");
369
414
  const account = loadAppSettings().accounts.accounts.find((a) => a.id === accountId);
370
415
  if (!account) {
@@ -18,7 +18,7 @@ import {
18
18
  disconnectLinearConnection,
19
19
  loadAppSettings,
20
20
  saveLinearOAuth
21
- } from "./chunk-WWU4SYZR.js";
21
+ } from "./chunk-VL6F2KRE.js";
22
22
 
23
23
  // src/integrations/linear-oauth.ts
24
24
  import { createHash, randomBytes } from "crypto";
@@ -4,7 +4,7 @@ import {
4
4
  normalizeTakenSlug,
5
5
  normalizeWorktreePath,
6
6
  takenSlugsFromThread
7
- } from "./chunk-RPHH4FNK.js";
7
+ } from "./chunk-TCEUNSLX.js";
8
8
  import {
9
9
  ensureWorktreeSideboardIgnored
10
10
  } from "./chunk-BMRJNRQK.js";
@@ -25,7 +25,7 @@ import {
25
25
  import {
26
26
  getGithubGitAuthMode,
27
27
  getGithubPat
28
- } from "./chunk-6WMNIX2U.js";
28
+ } from "./chunk-UFUAIVNV.js";
29
29
  import {
30
30
  worktreesRoot
31
31
  } from "./chunk-H4UEFJRI.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_ABLETIME_HOST,
3
3
  normalizeAbleTimeHost
4
- } from "./chunk-FDYMVJFU.js";
4
+ } from "./chunk-5WF54R3B.js";
5
5
  import {
6
6
  httpFetch
7
7
  } from "./chunk-JAT3JFOS.js";
@@ -10,7 +10,7 @@ import {
10
10
  getAbleTimeHost,
11
11
  loadAppSettings,
12
12
  saveAbleTimeConnection
13
- } from "./chunk-6WMNIX2U.js";
13
+ } from "./chunk-UFUAIVNV.js";
14
14
 
15
15
  // src/integrations/abletime-oauth.ts
16
16
  import { createHash, randomBytes } from "crypto";
@@ -280,7 +280,7 @@ async function startAbleTimeOAuth(opts) {
280
280
  persistAbleTimeTokens(data, { host });
281
281
  const token = data.access_token.trim();
282
282
  try {
283
- const { getAbleTimeOrientation } = await import("./abletime-CGFJZB7L.js");
283
+ const { getAbleTimeOrientation } = await import("./abletime-TX7BTTR2.js");
284
284
  const orientation = await getAbleTimeOrientation({ token, host });
285
285
  return saveAbleTimeConnection({
286
286
  accessToken: token,
@@ -5,7 +5,7 @@ import {
5
5
  resolveGithubRepoSlug,
6
6
  resolveOriginRemote,
7
7
  resolveRepoRoot
8
- } from "./chunk-3DBL2C45.js";
8
+ } from "./chunk-FQ3JYUKI.js";
9
9
  import {
10
10
  allocateTeamName,
11
11
  createEmptyThread,
@@ -14,7 +14,7 @@ import {
14
14
  teamSlugFromName,
15
15
  updateThread,
16
16
  writeThread
17
- } from "./chunk-RPHH4FNK.js";
17
+ } from "./chunk-TCEUNSLX.js";
18
18
  import {
19
19
  ATTACHMENTS_DIR,
20
20
  attachmentsGitignoreBody
@@ -31,7 +31,7 @@ import {
31
31
  resolveThreadDefaults,
32
32
  resolveViewerProfile,
33
33
  resolveViewerProfileForRepo
34
- } from "./chunk-6WMNIX2U.js";
34
+ } from "./chunk-UFUAIVNV.js";
35
35
  import {
36
36
  appDataDir,
37
37
  globalAgentCwd,
@@ -6,14 +6,14 @@ import {
6
6
  normalizeAbleTimeCredential,
7
7
  normalizeAbleTimeHost,
8
8
  rewriteAbleTimeError
9
- } from "./chunk-RYPD7XWV.js";
9
+ } from "./chunk-B4EFQTMP.js";
10
10
  import {
11
11
  httpFetch
12
12
  } from "./chunk-2GPQZZLY.js";
13
13
  import {
14
14
  getAbleTimeAccessToken,
15
15
  getAbleTimeHost
16
- } from "./chunk-WWU4SYZR.js";
16
+ } from "./chunk-VL6F2KRE.js";
17
17
 
18
18
  // src/integrations/abletime-rest.ts
19
19
  var ABLETIME_REST_PREFIX = "/api/public/v2";