@sideboard-ai/core 0.1.61 → 0.1.66

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 (45) hide show
  1. package/dist/{agents-B2723EOF.js → agents-EWFD765A.js} +23 -7
  2. package/dist/{agents-EADRAAPG.js → agents-MD7SCFYX.js} +23 -7
  3. package/dist/{app-settings-YBNZ4XSR.js → app-settings-GJVZGU3M.js} +15 -3
  4. package/dist/{app-settings-TBHTJWLQ.js → app-settings-ONKMFSEJ.js} +15 -3
  5. package/dist/{chunk-RIWUU7FO.js → chunk-5AG5BUQN.js} +61 -3
  6. package/dist/{chunk-HLEX5AQ6.js → chunk-7FD7COKE.js} +4 -0
  7. package/dist/{chunk-XWPKLRB3.js → chunk-AKPEXIKK.js} +2 -2
  8. package/dist/{chunk-MX7UH5AT.js → chunk-BBEH2CJE.js} +264 -93
  9. package/dist/{chunk-FGNBTFRD.js → chunk-BPOTVI5J.js} +125 -3
  10. package/dist/{chunk-CHGOMFTA.js → chunk-DNPP7QMK.js} +32 -7
  11. package/dist/{chunk-MBAL5FE6.js → chunk-DZYMNW2A.js} +4 -4
  12. package/dist/{chunk-JB2H7E7V.js → chunk-EVD4KNKR.js} +1 -1
  13. package/dist/{chunk-TSRXOSVD.js → chunk-FWJYLBO6.js} +4 -0
  14. package/dist/{chunk-QJBC4BRK.js → chunk-HTOTTJJX.js} +2 -2
  15. package/dist/{chunk-MFGGIRUA.js → chunk-I2KGRAXC.js} +2 -2
  16. package/dist/{chunk-ZXDOI6IH.js → chunk-IFAU2DEY.js} +269 -93
  17. package/dist/{chunk-NTYRBRE7.js → chunk-LRBRQFBU.js} +2 -2
  18. package/dist/{chunk-75QR74KM.js → chunk-MHR4OGZ4.js} +125 -3
  19. package/dist/{chunk-2P2UK7E7.js → chunk-PESJDZTB.js} +2 -2
  20. package/dist/{chunk-P7EQUFB6.js → chunk-R7GUDEPY.js} +2 -2
  21. package/dist/{chunk-73AT5K4A.js → chunk-TXQ6K2GR.js} +61 -3
  22. package/dist/{chunk-MLAST5BB.js → chunk-YTNLOJPK.js} +32 -7
  23. package/dist/{connected-teams-RSL4VB3X.js → connected-teams-CHXO5FFA.js} +2 -2
  24. package/dist/{connected-teams-MKIYKOYA.js → connected-teams-GJTESSTX.js} +2 -2
  25. package/dist/{coordinator-prompt-4P23VVFC.js → coordinator-prompt-E5UGSJES.js} +5 -5
  26. package/dist/{coordinator-prompt-LNWHZ64D.js → coordinator-prompt-ILSULI7C.js} +5 -5
  27. package/dist/{global-workspace-TMMAVRVW.js → global-workspace-44UG64NA.js} +6 -7
  28. package/dist/{global-workspace-BHT4XUAA.js → global-workspace-5PM5LA6E.js} +6 -7
  29. package/dist/index.cjs +1433 -944
  30. package/dist/index.d.cts +117 -2
  31. package/dist/index.d.ts +117 -2
  32. package/dist/index.js +859 -736
  33. package/dist/mcp/run-stdio.cjs +1388 -993
  34. package/dist/mcp/run-stdio.js +798 -765
  35. package/dist/{run-HZTBWGQR.js → run-74S2NZWB.js} +1 -1
  36. package/dist/{run-GPSVV5OH.js → run-JLN5JK7Q.js} +1 -1
  37. package/dist/{thread-store-GHOADGL2.js → thread-store-BUBR24YA.js} +1 -1
  38. package/dist/{thread-store-UJIGMI5J.js → thread-store-XTPFCJAI.js} +1 -1
  39. package/dist/{workspaces-3GO3EDQG.js → workspaces-OVBCSS5Y.js} +7 -8
  40. package/dist/{workspaces-GFPGDGCS.js → workspaces-RXFXQRRF.js} +7 -8
  41. package/dist/{worktree-GBLHEFHR.js → worktree-K2JB53R5.js} +3 -3
  42. package/dist/{worktree-3L2G6PCM.js → worktree-S2N63FLV.js} +3 -3
  43. package/package.json +1 -1
  44. package/dist/chunk-GI7E5733.js +0 -30
  45. package/dist/chunk-S2LL5HA4.js +0 -33
@@ -24,26 +24,36 @@ import {
24
24
  opencodeAdapter,
25
25
  parseSessionQuotaResetAt,
26
26
  permissionMode,
27
+ prepareTerminalCommand,
27
28
  resolveCursorModelId,
29
+ resolveLoginCommand,
28
30
  resolveQuotaFallbackAgent
29
- } from "./chunk-ZXDOI6IH.js";
31
+ } from "./chunk-IFAU2DEY.js";
30
32
  import {
31
33
  ORCHESTRATOR_AGENT_KINDS,
32
34
  assertOrchestratorCapableAgent,
33
35
  coerceOrchestratorAgent,
34
36
  isOrchestratorCapableAgent
35
- } from "./chunk-GI7E5733.js";
36
- import "./chunk-MBAL5FE6.js";
37
+ } from "./chunk-YTNLOJPK.js";
38
+ import "./chunk-DZYMNW2A.js";
37
39
  import {
38
40
  cursorSdkMessageToEvents,
39
41
  parseCursorRunnerLine
40
42
  } from "./chunk-3WJAUKIL.js";
41
- import "./chunk-75QR74KM.js";
43
+ import "./chunk-AKPEXIKK.js";
44
+ import "./chunk-MHR4OGZ4.js";
45
+ import "./chunk-R7GUDEPY.js";
46
+ import "./chunk-FKOIHGKV.js";
47
+ import "./chunk-FWJYLBO6.js";
42
48
  import "./chunk-77WWLBCI.js";
43
49
  import "./chunk-M37RITA6.js";
44
50
  import {
45
- ensureAgentPath
46
- } from "./chunk-73AT5K4A.js";
51
+ enrichPathWithNpmGlobalBin,
52
+ ensureAgentPath,
53
+ posixShellSingleQuote,
54
+ resolveCommandBinarySync,
55
+ withExportedPath
56
+ } from "./chunk-TXQ6K2GR.js";
47
57
  export {
48
58
  CLAUDE_MODEL_CATALOG,
49
59
  ORCHESTRATOR_AGENT_KINDS,
@@ -58,6 +68,7 @@ export {
58
68
  cursorSdkMessageToEvents,
59
69
  decodeBrightsyTarget,
60
70
  encodeBrightsyTarget,
71
+ enrichPathWithNpmGlobalBin,
61
72
  ensureAgentPath,
62
73
  getAdapter,
63
74
  getAgentSetupInfo,
@@ -77,6 +88,11 @@ export {
77
88
  parseCursorRunnerLine,
78
89
  parseSessionQuotaResetAt,
79
90
  permissionMode,
91
+ posixShellSingleQuote,
92
+ prepareTerminalCommand,
93
+ resolveCommandBinarySync,
80
94
  resolveCursorModelId,
81
- resolveQuotaFallbackAgent
95
+ resolveLoginCommand,
96
+ resolveQuotaFallbackAgent,
97
+ withExportedPath
82
98
  };
@@ -28,20 +28,30 @@ import {
28
28
  parseCursorRunnerLine,
29
29
  parseSessionQuotaResetAt,
30
30
  permissionMode,
31
+ prepareTerminalCommand,
31
32
  resolveCursorModelId,
33
+ resolveLoginCommand,
32
34
  resolveQuotaFallbackAgent
33
- } from "./chunk-MX7UH5AT.js";
34
- import "./chunk-JB2H7E7V.js";
35
+ } from "./chunk-BBEH2CJE.js";
36
+ import "./chunk-EVD4KNKR.js";
35
37
  import {
36
38
  ORCHESTRATOR_AGENT_KINDS,
37
39
  assertOrchestratorCapableAgent,
38
40
  coerceOrchestratorAgent,
39
41
  isOrchestratorCapableAgent
40
- } from "./chunk-S2LL5HA4.js";
42
+ } from "./chunk-DNPP7QMK.js";
43
+ import "./chunk-LRBRQFBU.js";
44
+ import "./chunk-I2KGRAXC.js";
45
+ import "./chunk-B3SJXYIJ.js";
46
+ import "./chunk-7FD7COKE.js";
41
47
  import {
42
- ensureAgentPath
43
- } from "./chunk-RIWUU7FO.js";
44
- import "./chunk-FGNBTFRD.js";
48
+ enrichPathWithNpmGlobalBin,
49
+ ensureAgentPath,
50
+ posixShellSingleQuote,
51
+ resolveCommandBinarySync,
52
+ withExportedPath
53
+ } from "./chunk-5AG5BUQN.js";
54
+ import "./chunk-BPOTVI5J.js";
45
55
  import "./chunk-KGZBYWZ3.js";
46
56
  import "./chunk-7MV3RXSC.js";
47
57
  export {
@@ -58,6 +68,7 @@ export {
58
68
  cursorSdkMessageToEvents,
59
69
  decodeBrightsyTarget,
60
70
  encodeBrightsyTarget,
71
+ enrichPathWithNpmGlobalBin,
61
72
  ensureAgentPath,
62
73
  getAdapter,
63
74
  getAgentSetupInfo,
@@ -77,6 +88,11 @@ export {
77
88
  parseCursorRunnerLine,
78
89
  parseSessionQuotaResetAt,
79
90
  permissionMode,
91
+ posixShellSingleQuote,
92
+ prepareTerminalCommand,
93
+ resolveCommandBinarySync,
80
94
  resolveCursorModelId,
81
- resolveQuotaFallbackAgent
95
+ resolveLoginCommand,
96
+ resolveQuotaFallbackAgent,
97
+ withExportedPath
82
98
  };
@@ -4,11 +4,13 @@ import {
4
4
  HARNESS_ENV_KEYS,
5
5
  appSettingsPath,
6
6
  applyAppEnvironment,
7
+ autoArchiveOnMergeEnabled,
7
8
  autoCleanupOrphansEnabled,
8
9
  autoRenameBranchEnabled,
9
10
  autoRunAfterSetupEnabled,
10
11
  brightsyCloudConnectAgent,
11
12
  brightsyCloudConnectEnabled,
13
+ brightsyInjectWorktreeMcpEnabled,
12
14
  caffeinateWhileCloudConnectEnabled,
13
15
  caffeinateWhileRunningEnabled,
14
16
  childEnvWithAppSettings,
@@ -27,29 +29,35 @@ import {
27
29
  maxConcurrentAgents,
28
30
  orchestrationQuotaFallbackAgent,
29
31
  orchestrationQuotaOnLimit,
32
+ resolveAgentExecutable,
30
33
  resolveClaudeExecutable,
31
34
  resolveEffectiveIssueSource,
32
35
  resolveNewThreadOptions,
33
36
  resolveThreadDefaults,
34
37
  saveAppSettings,
35
38
  updateAdvancedSettings,
39
+ updateAgentExecutable,
36
40
  updateAppEnvironment,
37
41
  updateBrightsySettings,
38
42
  updateClaudeSettings,
43
+ updateCodexSettings,
39
44
  updateDefaultsSettings,
40
- updateIntegrationsSettings
41
- } from "./chunk-FGNBTFRD.js";
45
+ updateIntegrationsSettings,
46
+ updateOpencodeSettings
47
+ } from "./chunk-BPOTVI5J.js";
42
48
  import "./chunk-KGZBYWZ3.js";
43
49
  import "./chunk-7MV3RXSC.js";
44
50
  export {
45
51
  HARNESS_ENV_KEYS,
46
52
  appSettingsPath,
47
53
  applyAppEnvironment,
54
+ autoArchiveOnMergeEnabled,
48
55
  autoCleanupOrphansEnabled,
49
56
  autoRenameBranchEnabled,
50
57
  autoRunAfterSetupEnabled,
51
58
  brightsyCloudConnectAgent,
52
59
  brightsyCloudConnectEnabled,
60
+ brightsyInjectWorktreeMcpEnabled,
53
61
  caffeinateWhileCloudConnectEnabled,
54
62
  caffeinateWhileRunningEnabled,
55
63
  childEnvWithAppSettings,
@@ -68,15 +76,19 @@ export {
68
76
  maxConcurrentAgents,
69
77
  orchestrationQuotaFallbackAgent,
70
78
  orchestrationQuotaOnLimit,
79
+ resolveAgentExecutable,
71
80
  resolveClaudeExecutable,
72
81
  resolveEffectiveIssueSource,
73
82
  resolveNewThreadOptions,
74
83
  resolveThreadDefaults,
75
84
  saveAppSettings,
76
85
  updateAdvancedSettings,
86
+ updateAgentExecutable,
77
87
  updateAppEnvironment,
78
88
  updateBrightsySettings,
79
89
  updateClaudeSettings,
90
+ updateCodexSettings,
80
91
  updateDefaultsSettings,
81
- updateIntegrationsSettings
92
+ updateIntegrationsSettings,
93
+ updateOpencodeSettings
82
94
  };
@@ -2,11 +2,13 @@ import {
2
2
  HARNESS_ENV_KEYS,
3
3
  appSettingsPath,
4
4
  applyAppEnvironment,
5
+ autoArchiveOnMergeEnabled,
5
6
  autoCleanupOrphansEnabled,
6
7
  autoRenameBranchEnabled,
7
8
  autoRunAfterSetupEnabled,
8
9
  brightsyCloudConnectAgent,
9
10
  brightsyCloudConnectEnabled,
11
+ brightsyInjectWorktreeMcpEnabled,
10
12
  caffeinateWhileCloudConnectEnabled,
11
13
  caffeinateWhileRunningEnabled,
12
14
  childEnvWithAppSettings,
@@ -25,29 +27,35 @@ import {
25
27
  maxConcurrentAgents,
26
28
  orchestrationQuotaFallbackAgent,
27
29
  orchestrationQuotaOnLimit,
30
+ resolveAgentExecutable,
28
31
  resolveClaudeExecutable,
29
32
  resolveEffectiveIssueSource,
30
33
  resolveNewThreadOptions,
31
34
  resolveThreadDefaults,
32
35
  saveAppSettings,
33
36
  updateAdvancedSettings,
37
+ updateAgentExecutable,
34
38
  updateAppEnvironment,
35
39
  updateBrightsySettings,
36
40
  updateClaudeSettings,
41
+ updateCodexSettings,
37
42
  updateDefaultsSettings,
38
- updateIntegrationsSettings
39
- } from "./chunk-75QR74KM.js";
43
+ updateIntegrationsSettings,
44
+ updateOpencodeSettings
45
+ } from "./chunk-MHR4OGZ4.js";
40
46
  import "./chunk-77WWLBCI.js";
41
47
  import "./chunk-M37RITA6.js";
42
48
  export {
43
49
  HARNESS_ENV_KEYS,
44
50
  appSettingsPath,
45
51
  applyAppEnvironment,
52
+ autoArchiveOnMergeEnabled,
46
53
  autoCleanupOrphansEnabled,
47
54
  autoRenameBranchEnabled,
48
55
  autoRunAfterSetupEnabled,
49
56
  brightsyCloudConnectAgent,
50
57
  brightsyCloudConnectEnabled,
58
+ brightsyInjectWorktreeMcpEnabled,
51
59
  caffeinateWhileCloudConnectEnabled,
52
60
  caffeinateWhileRunningEnabled,
53
61
  childEnvWithAppSettings,
@@ -66,15 +74,19 @@ export {
66
74
  maxConcurrentAgents,
67
75
  orchestrationQuotaFallbackAgent,
68
76
  orchestrationQuotaOnLimit,
77
+ resolveAgentExecutable,
69
78
  resolveClaudeExecutable,
70
79
  resolveEffectiveIssueSource,
71
80
  resolveNewThreadOptions,
72
81
  resolveThreadDefaults,
73
82
  saveAppSettings,
74
83
  updateAdvancedSettings,
84
+ updateAgentExecutable,
75
85
  updateAppEnvironment,
76
86
  updateBrightsySettings,
77
87
  updateClaudeSettings,
88
+ updateCodexSettings,
78
89
  updateDefaultsSettings,
79
- updateIntegrationsSettings
90
+ updateIntegrationsSettings,
91
+ updateOpencodeSettings
80
92
  };
@@ -5,29 +5,45 @@
5
5
  import { execa } from "execa";
6
6
 
7
7
  // src/agents/path.ts
8
+ import { existsSync } from "fs";
9
+ import { execFileSync } from "child_process";
8
10
  import { homedir } from "os";
9
- import { delimiter } from "path";
11
+ import { delimiter, join } from "path";
10
12
  var EXTRA_BIN_DIRS = [
11
13
  ".local/bin",
12
14
  ".cargo/bin",
13
15
  ".nvm/current/bin",
14
16
  ".asdf/shims",
17
+ ".volta/bin",
18
+ ".npm-global/bin",
19
+ // fnm default alias (common when shell init is skipped)
20
+ ".local/share/fnm/aliases/default/bin",
15
21
  // pnpm / npm global bins (where `@brightsy/cli` typically lands)
16
22
  "Library/pnpm",
17
23
  ".pnpm"
18
24
  ];
25
+ function prependPathDir(env, dir) {
26
+ if (!dir || !existsSync(dir)) return;
27
+ const current = env.PATH ?? "";
28
+ const parts = current.split(delimiter).filter(Boolean);
29
+ if (parts.includes(dir)) {
30
+ env.PATH = current;
31
+ return;
32
+ }
33
+ env.PATH = [dir, ...parts].join(delimiter);
34
+ }
19
35
  function ensureAgentPath(env = process.env) {
20
36
  const home = env.HOME || env.USERPROFILE || homedir();
21
37
  const current = env.PATH ?? "";
22
38
  const parts = current.split(delimiter).filter(Boolean);
23
39
  const seen = new Set(parts);
24
40
  const extras = [
25
- ...EXTRA_BIN_DIRS.map((rel) => `${home}/${rel}`),
41
+ ...EXTRA_BIN_DIRS.map((rel) => join(home, rel)),
26
42
  "/opt/homebrew/bin",
27
43
  "/usr/local/bin"
28
44
  ];
29
45
  for (const dir of extras.reverse()) {
30
- if (!dir || seen.has(dir)) continue;
46
+ if (!dir || seen.has(dir) || !existsSync(dir)) continue;
31
47
  parts.unshift(dir);
32
48
  seen.add(dir);
33
49
  }
@@ -35,6 +51,44 @@ function ensureAgentPath(env = process.env) {
35
51
  env.PATH = next;
36
52
  return next;
37
53
  }
54
+ function enrichPathWithNpmGlobalBin(env = process.env) {
55
+ ensureAgentPath(env);
56
+ try {
57
+ const prefix = execFileSync("npm", ["prefix", "-g"], {
58
+ encoding: "utf8",
59
+ env: { ...process.env, ...env },
60
+ timeout: 8e3,
61
+ stdio: ["ignore", "pipe", "ignore"]
62
+ }).trim().split(/\r?\n/).find(Boolean);
63
+ if (prefix) {
64
+ const binDir = process.platform === "win32" ? prefix : join(prefix, "bin");
65
+ prependPathDir(env, binDir);
66
+ }
67
+ } catch {
68
+ }
69
+ return env.PATH ?? "";
70
+ }
71
+ function posixShellSingleQuote(value) {
72
+ return `'${value.replace(/'/g, `'\\''`)}'`;
73
+ }
74
+ function resolveCommandBinarySync(command, whichPath) {
75
+ const trimmed = command.trim();
76
+ if (!trimmed) return trimmed;
77
+ const match = /^(\S+)(\s[\s\S]*)?$/.exec(trimmed);
78
+ if (!match) return trimmed;
79
+ const bin = match[1];
80
+ const rest = match[2] ?? "";
81
+ if (bin.includes("/") || bin.includes("\\")) return trimmed;
82
+ const abs = whichPath?.trim().split(/\r?\n/).find(Boolean);
83
+ if (!abs) return trimmed;
84
+ return `${abs}${rest}`;
85
+ }
86
+ function withExportedPath(command, pathValue) {
87
+ const trimmed = command.trim();
88
+ if (!trimmed) return trimmed;
89
+ if (/^(export\s+PATH=|PATH=)/.test(trimmed)) return trimmed;
90
+ return `export PATH=${posixShellSingleQuote(pathValue)}; ${trimmed}`;
91
+ }
38
92
 
39
93
  // src/git/run.ts
40
94
  async function run(file, args, opts) {
@@ -100,6 +154,10 @@ async function resolveGhAuthToken(cwd) {
100
154
 
101
155
  export {
102
156
  ensureAgentPath,
157
+ enrichPathWithNpmGlobalBin,
158
+ posixShellSingleQuote,
159
+ resolveCommandBinarySync,
160
+ withExportedPath,
103
161
  run,
104
162
  git,
105
163
  gh,
@@ -41,6 +41,8 @@ function normalizeThread(raw) {
41
41
  agentPid: raw.agentPid ?? null,
42
42
  attachments: Array.isArray(raw.attachments) ? raw.attachments : [],
43
43
  prTitle: raw.prTitle ?? null,
44
+ prState: raw.prState ?? null,
45
+ skipAutoArchiveOnMerge: Boolean(raw.skipAutoArchiveOnMerge),
44
46
  stackId: raw.stackId ?? null,
45
47
  stackLayer: raw.stackLayer ?? null,
46
48
  userSetTitle: Boolean(raw.userSetTitle),
@@ -67,6 +69,8 @@ function createEmptyThread(partial) {
67
69
  activeRuns: partial.activeRuns ?? [],
68
70
  prUrl: partial.prUrl ?? null,
69
71
  prTitle: partial.prTitle ?? null,
72
+ prState: partial.prState ?? null,
73
+ skipAutoArchiveOnMerge: partial.skipAutoArchiveOnMerge ?? false,
70
74
  stackId: partial.stackId ?? null,
71
75
  stackLayer: partial.stackLayer ?? null,
72
76
  userSetTitle: partial.userSetTitle ?? false,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveThreadDefaults
3
- } from "./chunk-75QR74KM.js";
3
+ } from "./chunk-MHR4OGZ4.js";
4
4
  import {
5
5
  resolveGithubRepoSlug
6
- } from "./chunk-P7EQUFB6.js";
6
+ } from "./chunk-R7GUDEPY.js";
7
7
  import {
8
8
  globalAgentCwd,
9
9
  sideboardReposDir