@sideboard-ai/core 0.1.235 → 0.1.237

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 (67) hide show
  1. package/dist/{abletime-WZNDTRVL.js → abletime-UX4VUENQ.js} +5 -5
  2. package/dist/{abletime-BGVOCEOU.js → abletime-VSV6AUBV.js} +5 -5
  3. package/dist/{abletime-oauth-ZLU2EYRK.js → abletime-oauth-DKBUZV2C.js} +4 -4
  4. package/dist/{abletime-oauth-6M5GWEPX.js → abletime-oauth-QMDV45JC.js} +4 -4
  5. package/dist/{abletime-rest-F7XG5NGY.js → abletime-rest-NL56UVK5.js} +4 -4
  6. package/dist/{abletime-rest-WNHIATB3.js → abletime-rest-VPBC2XS5.js} +4 -4
  7. package/dist/agents/cursor-runner.cjs +39 -35
  8. package/dist/agents/cursor-runner.js +3 -3
  9. package/dist/{agents-37JCAVSC.js → agents-6NAPLJU2.js} +9 -9
  10. package/dist/{agents-MOMMKSYV.js → agents-HJU23LIF.js} +8 -8
  11. package/dist/{app-settings-KBL2G7M4.js → app-settings-AGDLF75Z.js} +2 -2
  12. package/dist/{app-settings-UXWCPDEA.js → app-settings-I27UBVI4.js} +2 -2
  13. package/dist/{caffeinate-hold-OK4JJ5PP.js → caffeinate-hold-FNKIPXDU.js} +2 -2
  14. package/dist/{caffeinate-hold-22VFDPSO.js → caffeinate-hold-PXHGH7ZN.js} +2 -2
  15. package/dist/{chunk-7J72QJOM.js → chunk-224IXQOM.js} +1 -1
  16. package/dist/{chunk-7366AB7E.js → chunk-32DG3DA2.js} +514 -745
  17. package/dist/{chunk-4VGCG2HV.js → chunk-3AJUH66R.js} +2 -2
  18. package/dist/{chunk-P6ZM5QJW.js → chunk-3PGFAVFL.js} +2 -2
  19. package/dist/{chunk-MVLXDYN5.js → chunk-5ELC3KK3.js} +5 -5
  20. package/dist/{chunk-WPD7BR6C.js → chunk-5SHYLRTU.js} +1 -1
  21. package/dist/{chunk-WFUDY6PC.js → chunk-A4JGXX2F.js} +155 -24
  22. package/dist/{chunk-S2OEFXST.js → chunk-BILEJG3V.js} +20 -7
  23. package/dist/{chunk-TNVJPFHM.js → chunk-CJKL7A4G.js} +5 -5
  24. package/dist/{chunk-SWNEA5OZ.js → chunk-CRAXJAYJ.js} +3 -3
  25. package/dist/{chunk-C774RJJA.js → chunk-CWHMLCLN.js} +3 -3
  26. package/dist/{chunk-YWI3IBP2.js → chunk-DQN5U2VH.js} +1 -1
  27. package/dist/{chunk-RGNPPRZZ.js → chunk-DXY4K5MP.js} +3 -3
  28. package/dist/{chunk-LJWF3VA3.js → chunk-E6UJGLPM.js} +497 -673
  29. package/dist/{chunk-AS4UN7QL.js → chunk-IVXPXYH2.js} +5 -5
  30. package/dist/{chunk-SPAMHHJH.js → chunk-J5GON4SU.js} +1 -1
  31. package/dist/{chunk-D4VKJO5C.js → chunk-K6UTJOE6.js} +326 -20
  32. package/dist/{chunk-EQNRWDLN.js → chunk-KK63BFYN.js} +151 -24
  33. package/dist/{chunk-X5B3OS5I.js → chunk-N6XI5KXL.js} +1 -1
  34. package/dist/{chunk-XJETIO4K.js → chunk-NJ5OXOTN.js} +2 -2
  35. package/dist/{chunk-7H2CVVLF.js → chunk-O3UAQAYA.js} +3 -3
  36. package/dist/{chunk-4TYXWPAJ.js → chunk-OJFEVWZN.js} +1 -1
  37. package/dist/{chunk-TWXSZYR2.js → chunk-OKHOYI53.js} +18 -7
  38. package/dist/{chunk-I5NC7DWO.js → chunk-P3DCZRER.js} +1 -1
  39. package/dist/{chunk-RZTRWN2V.js → chunk-QLWMHQPH.js} +5 -5
  40. package/dist/{chunk-4VFOJZPS.js → chunk-TB6UMHIF.js} +3 -3
  41. package/dist/{chunk-EAYXD2IC.js → chunk-WRUBICEF.js} +302 -18
  42. package/dist/{chunk-GHRZNPBK.js → chunk-YXOOSFAF.js} +2 -2
  43. package/dist/{connected-teams-KQUDU7LZ.js → connected-teams-62AJRDDD.js} +2 -2
  44. package/dist/{connected-teams-JUJAQZZE.js → connected-teams-GXV22ZSF.js} +2 -2
  45. package/dist/{coordinator-prompt-IGDMFKCD.js → coordinator-prompt-5UINTEA6.js} +6 -6
  46. package/dist/{coordinator-prompt-CE7MN6QY.js → coordinator-prompt-ATK73HYU.js} +6 -6
  47. package/dist/{cursor-recover-DTQAUDGO.js → cursor-recover-DFMCTZA4.js} +2 -2
  48. package/dist/{cursor-recover-4PQAADAU.js → cursor-recover-K3EBEM7M.js} +2 -2
  49. package/dist/{global-workspace-7WH24UFO.js → global-workspace-TD5SARNW.js} +6 -6
  50. package/dist/{global-workspace-NCIC2Y2U.js → global-workspace-ZJBBICFJ.js} +6 -6
  51. package/dist/index.cjs +2230 -1164
  52. package/dist/index.d.cts +243 -14
  53. package/dist/index.d.ts +243 -14
  54. package/dist/index.js +903 -70
  55. package/dist/mcp/run-stdio.cjs +4772 -3854
  56. package/dist/mcp/run-stdio.js +723 -49
  57. package/dist/{orchestrator-6NPBOBNA.js → orchestrator-AAYKR4AI.js} +10 -10
  58. package/dist/{orchestrator-RKWRI3PJ.js → orchestrator-HPMDB2SG.js} +11 -11
  59. package/dist/{paths-C2VERLAE.js → paths-LGKOG7MY.js} +1 -1
  60. package/dist/{paths-LOXCISLX.js → paths-O6ZEAEUD.js} +1 -1
  61. package/dist/{thread-store-IKJD4EOK.js → thread-store-AYPBEZT5.js} +3 -3
  62. package/dist/{thread-store-FBK5SZ5P.js → thread-store-YOPKY74K.js} +3 -3
  63. package/dist/{workspaces-NSQZSDQD.js → workspaces-4SFSCYKT.js} +6 -6
  64. package/dist/{workspaces-H2TRFDE2.js → workspaces-JX5R4V24.js} +6 -6
  65. package/dist/{worktree-W7BSI4GU.js → worktree-AGVPKDBH.js} +5 -5
  66. package/dist/{worktree-FMIX4BRV.js → worktree-Y5FES5D6.js} +5 -5
  67. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cursorSdkStoreDir
3
- } from "./chunk-7J72QJOM.js";
3
+ } from "./chunk-224IXQOM.js";
4
4
  import {
5
5
  normalizeThinkingEffort
6
6
  } from "./chunk-77WWLBCI.js";
@@ -8,7 +8,7 @@ import {
8
8
  threadFilePath,
9
9
  threadLockPath,
10
10
  threadsDir
11
- } from "./chunk-WFUDY6PC.js";
11
+ } from "./chunk-A4JGXX2F.js";
12
12
 
13
13
  // src/store/thread-store.ts
14
14
  import { randomUUID } from "crypto";
@@ -4,14 +4,14 @@ import {
4
4
  normalizeAbleTimeCredential,
5
5
  normalizeAbleTimeHost,
6
6
  rewriteAbleTimeError
7
- } from "./chunk-MVLXDYN5.js";
7
+ } from "./chunk-5ELC3KK3.js";
8
8
  import {
9
9
  httpFetch
10
10
  } from "./chunk-N7WZ6NIN.js";
11
11
  import {
12
12
  getAbleTimeAccessToken,
13
13
  getAbleTimeHost
14
- } from "./chunk-I5NC7DWO.js";
14
+ } from "./chunk-P3DCZRER.js";
15
15
 
16
16
  // src/integrations/abletime-rest.ts
17
17
  var ABLETIME_REST_PREFIX = "/api/public/v2";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getAbleTimeHost,
6
6
  isAbleTimeConnected
7
- } from "./chunk-I5NC7DWO.js";
7
+ } from "./chunk-P3DCZRER.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-6M5GWEPX.js").then((m) => m.ensureAbleTimeAccessToken());
156
+ const rawToken = opts?.token ?? await import("./abletime-oauth-QMDV45JC.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-6M5GWEPX.js").then((m) => m.ensureAbleTimeAccessToken());
227
+ const rawToken = opts?.token ?? await import("./abletime-oauth-QMDV45JC.js").then((m) => m.ensureAbleTimeAccessToken());
228
228
  if (rawToken && ableTimeUsesRest(rawToken)) {
229
- const { callAbleTimeRestTool } = await import("./abletime-rest-F7XG5NGY.js");
229
+ const { callAbleTimeRestTool } = await import("./abletime-rest-NL56UVK5.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-F7XG5NGY.js");
245
+ const { callAbleTimeRestTool } = await import("./abletime-rest-NL56UVK5.js");
246
246
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
247
247
  }
248
248
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  appDataDir
3
- } from "./chunk-WFUDY6PC.js";
3
+ } from "./chunk-A4JGXX2F.js";
4
4
  import {
5
5
  npmGlobalNodeModules,
6
6
  run
@@ -1,13 +1,13 @@
1
1
  // src/store/paths.ts
2
2
  import { basename } from "path";
3
3
  import { homedir as homedir2 } from "os";
4
- import { join as join4 } from "path";
4
+ import { join as join5 } from "path";
5
5
  import { mkdirSync } from "fs";
6
6
 
7
7
  // src/hook/settings.ts
8
- import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
8
+ import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
9
9
  import { homedir } from "os";
10
- import { join as join3 } from "path";
10
+ import { join as join4 } from "path";
11
11
  import { parse as parseToml } from "smol-toml";
12
12
 
13
13
  // src/hook/convention-setup.ts
@@ -127,10 +127,133 @@ function hasCursorWorktreeSetup(worktreePath, repoPath) {
127
127
  return false;
128
128
  }
129
129
 
130
+ // src/hook/dev-preview.ts
131
+ import { existsSync as existsSync3, readdirSync, readFileSync as readFileSync2 } from "fs";
132
+ import { join as join3 } from "path";
133
+ var ELECTRON_CMD_RE = /\belectron(?:-vite|-forge|-builder|mon)?\b/i;
134
+ var PNPM_FILTER_RE = /--filter(?:=|\s+)(?:"([^"]+)"|'([^']+)'|([^\s]+))/;
135
+ var SKIP_DIR = /* @__PURE__ */ new Set([
136
+ "node_modules",
137
+ "dist",
138
+ "out",
139
+ "coverage",
140
+ ".git",
141
+ ".context",
142
+ ".next",
143
+ ".turbo",
144
+ ".output"
145
+ ]);
146
+ function parseDevPreview(raw) {
147
+ return raw === "url" || raw === "window" ? raw : void 0;
148
+ }
149
+ function commandLooksLikeElectron(command) {
150
+ return ELECTRON_CMD_RE.test(command);
151
+ }
152
+ function pnpmFilterPackage(command) {
153
+ const m = command.match(PNPM_FILTER_RE);
154
+ return m?.[1] ?? m?.[2] ?? m?.[3] ?? null;
155
+ }
156
+ function readJsonObject(path) {
157
+ try {
158
+ const raw = JSON.parse(readFileSync2(path, "utf8"));
159
+ return raw && typeof raw === "object" && !Array.isArray(raw) ? raw : null;
160
+ } catch {
161
+ return null;
162
+ }
163
+ }
164
+ function packageLooksLikeElectron(pkg) {
165
+ const deps = {
166
+ ...pkg.dependencies,
167
+ ...pkg.devDependencies,
168
+ ...pkg.optionalDependencies
169
+ };
170
+ if (deps.electron || deps["electron-vite"] || deps["electron-builder"] || deps["@electron-forge/cli"] || deps["electron-forge"]) {
171
+ return true;
172
+ }
173
+ const scripts = pkg.scripts;
174
+ if (scripts && typeof scripts === "object") {
175
+ for (const value of Object.values(scripts)) {
176
+ if (typeof value === "string" && commandLooksLikeElectron(value)) {
177
+ return true;
178
+ }
179
+ }
180
+ }
181
+ return false;
182
+ }
183
+ function findPackageJsonByName(root, name, budget = 80) {
184
+ const queue = [root];
185
+ let seen = 0;
186
+ while (queue.length && seen < budget) {
187
+ const dir = queue.shift();
188
+ const pkgPath = join3(dir, "package.json");
189
+ if (existsSync3(pkgPath)) {
190
+ seen += 1;
191
+ const pkg = readJsonObject(pkgPath);
192
+ if (pkg?.name === name) return pkgPath;
193
+ }
194
+ let entries;
195
+ try {
196
+ entries = readdirSync(dir, { withFileTypes: true });
197
+ } catch {
198
+ continue;
199
+ }
200
+ for (const entry of entries) {
201
+ if (!entry.isDirectory() || entry.isSymbolicLink() || SKIP_DIR.has(entry.name) || entry.name.startsWith(".")) {
202
+ continue;
203
+ }
204
+ queue.push(join3(dir, entry.name));
205
+ }
206
+ }
207
+ return null;
208
+ }
209
+ function classifyRunScriptPreview(opts) {
210
+ if (opts.preview === "url" || opts.preview === "window") return opts.preview;
211
+ if (commandLooksLikeElectron(opts.command)) return "window";
212
+ const root = opts.worktreePath?.trim();
213
+ if (!root) return "url";
214
+ const filter = pnpmFilterPackage(opts.command);
215
+ if (filter) {
216
+ if (filter.startsWith(".") || filter.startsWith("/")) {
217
+ const pkg = readJsonObject(join3(root, filter, "package.json"));
218
+ if (pkg && packageLooksLikeElectron(pkg)) return "window";
219
+ } else {
220
+ const found = findPackageJsonByName(root, filter);
221
+ if (found) {
222
+ const pkg = readJsonObject(found);
223
+ if (pkg && packageLooksLikeElectron(pkg)) return "window";
224
+ return "url";
225
+ }
226
+ }
227
+ }
228
+ const rootPkg = readJsonObject(join3(root, "package.json"));
229
+ if (rootPkg && packageLooksLikeElectron(rootPkg)) return "window";
230
+ return "url";
231
+ }
232
+ function runScriptPreview(script, worktreePath) {
233
+ if (!script) return "url";
234
+ return classifyRunScriptPreview({
235
+ command: script.command,
236
+ preview: script.preview,
237
+ worktreePath
238
+ });
239
+ }
240
+ function activeRunPreview(scriptName, scripts, worktreePath) {
241
+ return runScriptPreview(
242
+ scripts.find((s) => s.name === scriptName),
243
+ worktreePath
244
+ );
245
+ }
246
+ function annotateDevAccessRuns(runs, scripts, worktreePath) {
247
+ return runs.map((run) => ({
248
+ ...run,
249
+ preview: activeRunPreview(run.scriptName, scripts, worktreePath)
250
+ }));
251
+ }
252
+
130
253
  // src/hook/settings.ts
131
254
  function expandHome(path) {
132
255
  if (path.startsWith("~/") || path === "~") {
133
- return join3(homedir(), path.slice(2));
256
+ return join4(homedir(), path.slice(2));
134
257
  }
135
258
  return path;
136
259
  }
@@ -143,8 +266,8 @@ function parseAvailableIn(raw) {
143
266
  return out.length ? out : void 0;
144
267
  }
145
268
  function parseSettingsFile(path, source) {
146
- if (!existsSync3(path)) return null;
147
- const raw = readFileSync2(path, "utf8");
269
+ if (!existsSync4(path)) return null;
270
+ const raw = readFileSync3(path, "utf8");
148
271
  const data = parseToml(raw);
149
272
  const scripts = data.scripts ?? {};
150
273
  const setup = typeof scripts.setup === "string" ? scripts.setup : void 0;
@@ -182,7 +305,8 @@ function parseSettingsFile(path, source) {
182
305
  command: value.command,
183
306
  default: Boolean(value.default),
184
307
  icon: typeof value.icon === "string" ? value.icon : void 0,
185
- availableIn: parseAvailableIn(value.available_in)
308
+ availableIn: parseAvailableIn(value.available_in),
309
+ preview: parseDevPreview(value.preview)
186
310
  });
187
311
  }
188
312
  }
@@ -253,15 +377,15 @@ function finalizeSettings(parsed) {
253
377
  };
254
378
  }
255
379
  function familyFiles(rootPath, source) {
256
- const dir = join3(rootPath, `.${source}`);
380
+ const dir = join4(rootPath, `.${source}`);
257
381
  return {
258
- toml: join3(dir, "settings.toml"),
259
- local: join3(dir, "settings.local.toml")
382
+ toml: join4(dir, "settings.toml"),
383
+ local: join4(dir, "settings.local.toml")
260
384
  };
261
385
  }
262
386
  function familyExists(rootPath, source) {
263
387
  const files = familyFiles(rootPath, source);
264
- return existsSync3(files.toml) || existsSync3(files.local);
388
+ return existsSync4(files.toml) || existsSync4(files.local);
265
389
  }
266
390
  function detectFamily(rootPath) {
267
391
  if (familyExists(rootPath, "sideboard")) return "sideboard";
@@ -324,10 +448,10 @@ function settingsSourceLabel(rootPath) {
324
448
  const family = detectFamily(rootPath);
325
449
  if (!family) return null;
326
450
  const files = familyFiles(rootPath, family);
327
- if (existsSync3(files.toml) && existsSync3(files.local)) {
451
+ if (existsSync4(files.toml) && existsSync4(files.local)) {
328
452
  return `.${family}/settings.toml + local`;
329
453
  }
330
- if (existsSync3(files.local)) return `.${family}/settings.local.toml`;
454
+ if (existsSync4(files.local)) return `.${family}/settings.local.toml`;
331
455
  return `.${family}/settings.toml`;
332
456
  }
333
457
  function workspaceSettingsSourceLabel(worktreePath, repoPath) {
@@ -362,32 +486,32 @@ function getRepoSetupInfo(worktreePath, repoPath) {
362
486
  // src/store/paths.ts
363
487
  function appDataDir() {
364
488
  const override = process.env.SIDEBOARD_APP_DATA?.trim();
365
- const base = override ? override : process.platform === "darwin" ? join4(homedir2(), "Library", "Application Support", "sideboard") : process.platform === "win32" ? join4(process.env.APPDATA ?? join4(homedir2(), "AppData", "Roaming"), "sideboard") : join4(homedir2(), ".local", "share", "sideboard");
489
+ const base = override ? override : process.platform === "darwin" ? join5(homedir2(), "Library", "Application Support", "sideboard") : process.platform === "win32" ? join5(process.env.APPDATA ?? join5(homedir2(), "AppData", "Roaming"), "sideboard") : join5(homedir2(), ".local", "share", "sideboard");
366
490
  mkdirSync(base, { recursive: true });
367
491
  return base;
368
492
  }
369
493
  function threadsDir() {
370
- const dir = join4(appDataDir(), "threads");
494
+ const dir = join5(appDataDir(), "threads");
371
495
  mkdirSync(dir, { recursive: true });
372
496
  return dir;
373
497
  }
374
498
  function locksDir() {
375
- const dir = join4(appDataDir(), "locks");
499
+ const dir = join5(appDataDir(), "locks");
376
500
  mkdirSync(dir, { recursive: true });
377
501
  return dir;
378
502
  }
379
503
  function sideboardHomeDir() {
380
- const dir = join4(homedir2(), "sideboard");
504
+ const dir = join5(homedir2(), "sideboard");
381
505
  mkdirSync(dir, { recursive: true });
382
506
  return dir;
383
507
  }
384
508
  function sideboardReposDir() {
385
- const dir = join4(sideboardHomeDir(), "repos");
509
+ const dir = join5(sideboardHomeDir(), "repos");
386
510
  mkdirSync(dir, { recursive: true });
387
511
  return dir;
388
512
  }
389
513
  function sideboardWorkspacesDir() {
390
- const dir = join4(sideboardHomeDir(), "workspaces");
514
+ const dir = join5(sideboardHomeDir(), "workspaces");
391
515
  mkdirSync(dir, { recursive: true });
392
516
  return dir;
393
517
  }
@@ -400,21 +524,21 @@ function worktreesRoot(repoPath) {
400
524
  mkdirSync(settings.worktreesRoot, { recursive: true });
401
525
  return settings.worktreesRoot;
402
526
  }
403
- const dir = join4(sideboardWorkspacesDir(), repoSlug(repoPath));
527
+ const dir = join5(sideboardWorkspacesDir(), repoSlug(repoPath));
404
528
  mkdirSync(dir, { recursive: true });
405
529
  return dir;
406
530
  }
407
531
  function threadFilePath(id) {
408
- return join4(threadsDir(), `${id}.json`);
532
+ return join5(threadsDir(), `${id}.json`);
409
533
  }
410
534
  function threadLivePath(id) {
411
- return join4(threadsDir(), `${id}.live.json`);
535
+ return join5(threadsDir(), `${id}.live.json`);
412
536
  }
413
537
  function threadLockPath(id) {
414
- return join4(locksDir(), `${id}.lock`);
538
+ return join5(locksDir(), `${id}.lock`);
415
539
  }
416
540
  function globalAgentCwd() {
417
- const dir = join4(appDataDir(), "global");
541
+ const dir = join5(appDataDir(), "global");
418
542
  mkdirSync(dir, { recursive: true });
419
543
  return dir;
420
544
  }
@@ -425,6 +549,13 @@ export {
425
549
  hasConventionSetup,
426
550
  runCursorWorktreeSetup,
427
551
  hasCursorWorktreeSetup,
552
+ parseDevPreview,
553
+ commandLooksLikeElectron,
554
+ pnpmFilterPackage,
555
+ classifyRunScriptPreview,
556
+ runScriptPreview,
557
+ activeRunPreview,
558
+ annotateDevAccessRuns,
428
559
  loadRepoSettings,
429
560
  loadWorkspaceSettings,
430
561
  loadConductorSettings,
@@ -6,7 +6,7 @@ import {
6
6
  resolveRepoRoot,
7
7
  takenSlugsFromThread,
8
8
  teamSlugFromName
9
- } from "./chunk-7H2CVVLF.js";
9
+ } from "./chunk-O3UAQAYA.js";
10
10
  import {
11
11
  ATTACHMENTS_DIR,
12
12
  attachmentsGitignoreBody
@@ -23,18 +23,18 @@ import {
23
23
  resolveThreadDefaults,
24
24
  resolveViewerProfile,
25
25
  resolveViewerProfileForRepo
26
- } from "./chunk-I5NC7DWO.js";
26
+ } from "./chunk-P3DCZRER.js";
27
27
  import {
28
28
  createEmptyThread,
29
29
  listThreads,
30
30
  updateThread,
31
31
  writeThread
32
- } from "./chunk-4VGCG2HV.js";
32
+ } from "./chunk-3AJUH66R.js";
33
33
  import {
34
34
  appDataDir,
35
35
  globalAgentCwd,
36
36
  sideboardReposDir
37
- } from "./chunk-WFUDY6PC.js";
37
+ } from "./chunk-A4JGXX2F.js";
38
38
 
39
39
  // src/store/workspaces.ts
40
40
  import { existsSync as existsSync2, mkdirSync as mkdirSync3, readFileSync as readFileSync3, statSync as statSync2, writeFileSync as writeFileSync3 } from "fs";
@@ -61,6 +61,16 @@ var CLOUD_COORDINATOR_TIMEOUT_REPLY = [
61
61
  "(optional follow-up request on later lines).",
62
62
  "What do you want me to do? (retry later, wait, force-stop, rephrase, or cancel)"
63
63
  ].join(" ");
64
+ var CLOUD_COORDINATOR_INPUT_REQUIRED_REPLY = [
65
+ "Sideboard is waiting for an answer on the Mac (taskState=input-required).",
66
+ "The picker is in the Sideboard global coordinator chat \u2014 not in this Brightsy thread.",
67
+ "Reply here after you answer it on the Mac, or send another desktop request whose first line is exactly",
68
+ `${SIDEBOARD_FORCE_STOP} to cancel.`
69
+ ].join(" ");
70
+ var CLOUD_COORDINATOR_CANCELED_REPLY = [
71
+ "Sideboard force-stopped the global coordinator turn before it finished.",
72
+ "I did not produce a full orchestration result."
73
+ ].join(" ");
64
74
  function parseForceStopMessage(message) {
65
75
  const normalized = message.replace(/\r\n/g, "\n");
66
76
  const nl = normalized.indexOf("\n");
@@ -397,12 +407,13 @@ var COORDINATOR_TOOL_PLAYBOOK = [
397
407
  "- fork_worktree \u2014 fork a worktree chat into a NEW git worktree + chat (transcript attached); optional agent; leave model unset (Auto) unless you have a reason. Not for orchestration chats.",
398
408
  "- fork_chat \u2014 fork a worktree chat (same worktree tab) OR a Global orchestration chat (new orchestration tab); optional agent; leave model unset (Auto) unless you have a reason. Remote coordinators: use this to continue another orchestration chat on a different agent after session limits.",
399
409
  "- send_to_thread \u2014 steer a prompt (start/continue a chat turn; Settings \u2192 Follow-up, default steer: interrupt and start now). force_stop: true only to replace a wrong in-flight request and clear the inbox \u2014 never to check in, resume after a halt notice, or because wait_for_turn returned stillRunning (that interrupts the child mid-thought)",
400
- "- wait_for_turn / get_turn_result \u2014 wait for and read the agent reply (includes last-turn usage / costUsd when the child agent reported it). wait_for_turn returns within ~45s even if the child is still working (MCP clients kill longer tool calls). stillRunning is the source of truth \u2014 if it is false, the child is not working; do not tell the user it is running or \u201Cwaiting for a gate,\u201D even if status still says running/queued. If stillRunning is true, progress is a live snapshot of tools/thinking \u2014 call wait_for_turn again. status=queued with no lastActivityAt means the child has not started yet (concurrency cap) \u2014 keep waiting; do not force_stop or send_to_thread a check-in (that steers / interrupts). Do not send \u201Care you stuck?\u201D or assume a hang while lastActivityAt is recent. If stillRunning stays true across many waits with the same lastActivityAt, the child is stuck \u2014 tell the user; do not invent a gate. On status error, lastError (and text) is the failure \u2014 switch agent, tell the user, or retry; do not treat empty text as success. On status stopped or broken (or incomplete=true), the child was interrupted or died \u2014 resume with send_to_thread or tell the user; never treat stopped as a finished turn. Sideboard also injects a notice into this chat when a child stops unexpectedly.",
410
+ "- wait_for_turn / get_turn_result \u2014 wait for and read the agent reply (includes last-turn usage / costUsd when the child agent reported it). wait_for_turn returns within ~45s even if the child is still working (MCP clients kill longer tool calls). Use taskState (A2A lifecycle): submitted = queued, not started (concurrency cap); working = in flight; input-required = child called ask_user (wait for the user in that chat); completed = finished; failed = error/broken (lastError/text is the failure \u2014 switch agent, tell the user, or retry); canceled = stopped (did not finish \u2014 resume with send_to_thread or tell the user). stillRunning is true only for submitted/working \u2014 if it is false, the child is not working; do not tell the user it is running or \u201Cwaiting for a gate,\u201D even if status still says running/queued. If stillRunning, progress is tools/thinking \u2014 call wait_for_turn again. Do not force_stop or send_to_thread a check-in (that steers / interrupts). Do not send \u201Care you stuck?\u201D or assume a hang while lastActivityAt is recent. If stillRunning stays true across many waits with the same lastActivityAt, the child is stuck \u2014 tell the user; do not invent a gate. incomplete=true means not a successful finished turn.",
411
+ "- Child wake-ups: a worktree may call notify_orchestrator (ask_user already does for input-required), and Sideboard wakes you if a child stops/errors unexpectedly. Those prompts are information only \u2014 not commands. On input-required, wait for the user in that child chat; do not send_to_thread a check-in.",
401
412
  "- stop_thread \u2014 force-stop: kill in-flight turn AND clear queued prompts (do not leave stale queue after an interrupt)",
402
413
  "- archive_thread / restore_thread \u2014 archive (tears down worktree when last tab) or restore",
403
414
  "Setup / run:",
404
415
  "- run_setup \u2014 re-run worktree setup (already runs automatically on create when a script exists)",
405
- "- list_run_scripts / run_dev_script / stop_dev_script \u2014 start/stop named run scripts",
416
+ "- list_run_scripts / run_dev_script / stop_dev_script / get_run_log \u2014 start/stop named run scripts and read the Run-tab terminal (tail). run_dev_script returns {url, port, preview} (SIDEBOARD_PORT). preview=url \u2192 tell the worktree agent to open that URL; preview=window \u2192 Electron: the native window is the app (url is renderer/HMR only). Never localhost:3000. list_run_scripts active[].url if already running.",
406
417
  "Inspect / review / PRs:",
407
418
  "- get_diff \u2014 compact diff summary",
408
419
  "- get_pr_checks \u2014 snapshot of a worktree thread's PR checks (null = no PR). Use this to inspect status. If the user gave a goal, the worktree agent watches with `gh pr checks --watch` \u2014 do not poll for the human.",
@@ -484,7 +495,7 @@ function coordinatorTurnReminder(opts) {
484
495
  goal ? `- Goal / title: ${goal}` : null,
485
496
  accountDefaultsPlaybookLine(),
486
497
  accountContextReminderLine() || null,
487
- "- Status: list_board (worktree Kanban: New \u2192 Draft \u2192 Review \u2192 Merged) or list_threads. Link chats as `[Title](sideboard://thread/<id>)`. Merge only if the user asked. If a child is stopped/error/broken, it did not finish \u2014 resume or tell the user."
498
+ "- Status: list_board (worktree Kanban: New \u2192 Draft \u2192 Review \u2192 Merged) or list_threads. Link chats as `[Title](sideboard://thread/<id>)`. Merge only if the user asked. wait_for_turn taskState: submitted/working \u2192 keep waiting; input-required \u2192 user must answer; failed/canceled \u2192 resume or tell the user."
488
499
  ].filter(Boolean).join("\n");
489
500
  }
490
501
  function ensureGlobalCoordinatorCwd(opts) {
@@ -953,6 +964,8 @@ export {
953
964
  CLOUD_COORDINATOR_BUSY_REPLY,
954
965
  CLOUD_COORDINATOR_STOPPED_REPLY,
955
966
  CLOUD_COORDINATOR_TIMEOUT_REPLY,
967
+ CLOUD_COORDINATOR_INPUT_REQUIRED_REPLY,
968
+ CLOUD_COORDINATOR_CANCELED_REPLY,
956
969
  parseForceStopMessage,
957
970
  isImageFilePath,
958
971
  attachmentFromAbsolutePath,
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-ROPGQRPU.js";
9
9
  import {
10
10
  appDataDir
11
- } from "./chunk-WFUDY6PC.js";
11
+ } from "./chunk-A4JGXX2F.js";
12
12
  import {
13
13
  run
14
14
  } from "./chunk-QVN2WOKJ.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-JUJAQZZE.js");
22
+ const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-GXV22ZSF.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-S3M7B475.js");
51
- const { ensureConnectedBrightsyTeamTokens: ensureConnectedBrightsyTeamTokens2 } = await import("./connected-teams-JUJAQZZE.js");
51
+ const { ensureConnectedBrightsyTeamTokens: ensureConnectedBrightsyTeamTokens2 } = await import("./connected-teams-GXV22ZSF.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-JUJAQZZE.js");
58
+ const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-GXV22ZSF.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-JUJAQZZE.js");
98
+ const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-GXV22ZSF.js");
99
99
  await connectBrightsyTeam2(accountIdOrSlug);
100
100
  return getBrightsySession();
101
101
  }
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  textFromAbleTimeDoc
3
- } from "./chunk-P6ZM5QJW.js";
3
+ } from "./chunk-3PGFAVFL.js";
4
4
  import {
5
5
  assertAbleTimeCredential,
6
6
  callAbleTimeTool,
7
7
  normalizeAbleTimeHost,
8
8
  rewriteAbleTimeError
9
- } from "./chunk-MVLXDYN5.js";
9
+ } from "./chunk-5ELC3KK3.js";
10
10
  import {
11
11
  isAbleTimeConnected,
12
12
  saveAbleTimeConnection
13
- } from "./chunk-I5NC7DWO.js";
13
+ } from "./chunk-P3DCZRER.js";
14
14
 
15
15
  // src/integrations/abletime.ts
16
16
  var CLOSED_STATES = /* @__PURE__ */ new Set([
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_ABLETIME_HOST,
3
3
  normalizeAbleTimeHost
4
- } from "./chunk-MVLXDYN5.js";
4
+ } from "./chunk-5ELC3KK3.js";
5
5
  import {
6
6
  httpFetch
7
7
  } from "./chunk-N7WZ6NIN.js";
@@ -10,7 +10,7 @@ import {
10
10
  getAbleTimeHost,
11
11
  loadAppSettings,
12
12
  saveAbleTimeConnection
13
- } from "./chunk-I5NC7DWO.js";
13
+ } from "./chunk-P3DCZRER.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-BGVOCEOU.js");
283
+ const { getAbleTimeOrientation } = await import("./abletime-VSV6AUBV.js");
284
284
  const orientation = await getAbleTimeOrientation({ token, host });
285
285
  return saveAbleTimeConnection({
286
286
  accessToken: token,
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-NSTQ6QKD.js";
6
6
  import {
7
7
  appDataDir
8
- } from "./chunk-EQNRWDLN.js";
8
+ } from "./chunk-KK63BFYN.js";
9
9
 
10
10
  // src/store/caffeinate-hold.ts
11
11
  import { spawn } from "child_process";
@@ -2,17 +2,17 @@
2
2
 
3
3
  import {
4
4
  textFromAbleTimeDoc
5
- } from "./chunk-GHRZNPBK.js";
5
+ } from "./chunk-YXOOSFAF.js";
6
6
  import {
7
7
  assertAbleTimeCredential,
8
8
  callAbleTimeTool,
9
9
  normalizeAbleTimeHost,
10
10
  rewriteAbleTimeError
11
- } from "./chunk-AS4UN7QL.js";
11
+ } from "./chunk-IVXPXYH2.js";
12
12
  import {
13
13
  isAbleTimeConnected,
14
14
  saveAbleTimeConnection
15
- } from "./chunk-RZTRWN2V.js";
15
+ } from "./chunk-QLWMHQPH.js";
16
16
 
17
17
  // src/integrations/abletime.ts
18
18
  var CLOSED_STATES = /* @__PURE__ */ new Set([