@sideboard-ai/core 0.1.50 → 0.1.52

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 (46) hide show
  1. package/dist/{agents-LUB3Q773.js → agents-ON6RKKND.js} +3 -3
  2. package/dist/{agents-3P4N6KHC.js → agents-YKSS6VBO.js} +3 -3
  3. package/dist/{chunk-RQI4TOXK.js → chunk-6QTZVJ7A.js} +7 -5
  4. package/dist/{chunk-AJ6ROGD7.js → chunk-7LNGIP3X.js} +20 -2
  5. package/dist/chunk-B3SJXYIJ.js +24 -0
  6. package/dist/{chunk-ILQK4P5R.js → chunk-BXJ76RHF.js} +4 -4
  7. package/dist/{chunk-SS34TVSY.js → chunk-D3METLRW.js} +7 -5
  8. package/dist/{chunk-FV6FN6V5.js → chunk-DZFH2KLT.js} +340 -22
  9. package/dist/chunk-FKOIHGKV.js +21 -0
  10. package/dist/{chunk-3NAS4MWH.js → chunk-GNML24AW.js} +2 -2
  11. package/dist/{chunk-E35APBHV.js → chunk-H6GGDLYS.js} +1 -1
  12. package/dist/{chunk-EOYDCKQC.js → chunk-HLEX5AQ6.js} +4 -0
  13. package/dist/{chunk-ZQCQIWIP.js → chunk-LRLKJM3O.js} +2 -1
  14. package/dist/chunk-N5PM7HGQ.js +103 -0
  15. package/dist/chunk-QTUESPAW.js +101 -0
  16. package/dist/{chunk-O6W3P7V3.js → chunk-TSRXOSVD.js} +4 -0
  17. package/dist/{chunk-GZXBYHJC.js → chunk-UEAHMGHW.js} +2 -1
  18. package/dist/{chunk-ZVV5EEQN.js → chunk-XOU6HNQJ.js} +305 -22
  19. package/dist/{chunk-5WYEJ3F3.js → chunk-XX5BB7NV.js} +3 -3
  20. package/dist/{chunk-V4JRXYYU.js → chunk-YDXQ72MD.js} +2 -2
  21. package/dist/{chunk-DF5VQQKA.js → chunk-YOWIYAVA.js} +3 -3
  22. package/dist/{chunk-ISY4EGF6.js → chunk-ZNM4MAN4.js} +20 -2
  23. package/dist/{connected-teams-UBXHZGO4.js → connected-teams-2ANNZCP5.js} +2 -2
  24. package/dist/{connected-teams-GF52Q7LB.js → connected-teams-ONC4666A.js} +2 -2
  25. package/dist/{coordinator-prompt-VG4BZ5JL.js → coordinator-prompt-6FXVTSFN.js} +5 -4
  26. package/dist/{coordinator-prompt-SPGDT7J5.js → coordinator-prompt-S6JZD5EF.js} +5 -4
  27. package/dist/{global-workspace-OJF4ENH4.js → global-workspace-EV4G2WMQ.js} +6 -5
  28. package/dist/{global-workspace-KSR3E63K.js → global-workspace-MSX2K27Y.js} +6 -5
  29. package/dist/index.cjs +1369 -155
  30. package/dist/index.d.cts +397 -14
  31. package/dist/index.d.ts +397 -14
  32. package/dist/index.js +811 -90
  33. package/dist/mcp/run-stdio.cjs +1136 -147
  34. package/dist/mcp/run-stdio.js +635 -79
  35. package/dist/plan-file-6O7G4VPQ.js +23 -0
  36. package/dist/plan-file-PHVKUAEE.js +25 -0
  37. package/dist/{run-HMRSRG3U.js → run-H3IMNOYN.js} +3 -1
  38. package/dist/run-ZJKYHXGN.js +12 -0
  39. package/dist/{thread-store-XICUWFNM.js → thread-store-GHOADGL2.js} +1 -1
  40. package/dist/{thread-store-OV2X6PYO.js → thread-store-UJIGMI5J.js} +1 -1
  41. package/dist/{workspaces-OZE7LRDO.js → workspaces-3RQQZQRO.js} +7 -6
  42. package/dist/{workspaces-UJX7JIGH.js → workspaces-AYTBR6KQ.js} +7 -6
  43. package/dist/{worktree-XG5PCLZY.js → worktree-5KEQWSAF.js} +8 -3
  44. package/dist/{worktree-TEDAJ57S.js → worktree-RWGL7FUV.js} +8 -3
  45. package/package.json +1 -1
  46. package/dist/run-LF6E5IKL.js +0 -10
@@ -30,8 +30,8 @@ import {
30
30
  permissionMode,
31
31
  resolveCursorModelId,
32
32
  resolveQuotaFallbackAgent
33
- } from "./chunk-RQI4TOXK.js";
34
- import "./chunk-E35APBHV.js";
33
+ } from "./chunk-6QTZVJ7A.js";
34
+ import "./chunk-H6GGDLYS.js";
35
35
  import "./chunk-HBJSHRY2.js";
36
36
  import {
37
37
  ORCHESTRATOR_AGENT_KINDS,
@@ -41,7 +41,7 @@ import {
41
41
  } from "./chunk-S2LL5HA4.js";
42
42
  import {
43
43
  ensureAgentPath
44
- } from "./chunk-ISY4EGF6.js";
44
+ } from "./chunk-ZNM4MAN4.js";
45
45
  import "./chunk-KGZBYWZ3.js";
46
46
  import "./chunk-7MV3RXSC.js";
47
47
  export {
@@ -26,14 +26,14 @@ import {
26
26
  permissionMode,
27
27
  resolveCursorModelId,
28
28
  resolveQuotaFallbackAgent
29
- } from "./chunk-SS34TVSY.js";
29
+ } from "./chunk-D3METLRW.js";
30
30
  import {
31
31
  ORCHESTRATOR_AGENT_KINDS,
32
32
  assertOrchestratorCapableAgent,
33
33
  coerceOrchestratorAgent,
34
34
  isOrchestratorCapableAgent
35
35
  } from "./chunk-GI7E5733.js";
36
- import "./chunk-ILQK4P5R.js";
36
+ import "./chunk-BXJ76RHF.js";
37
37
  import {
38
38
  cursorSdkMessageToEvents,
39
39
  parseCursorRunnerLine
@@ -43,7 +43,7 @@ import "./chunk-77WWLBCI.js";
43
43
  import "./chunk-M37RITA6.js";
44
44
  import {
45
45
  ensureAgentPath
46
- } from "./chunk-AJ6ROGD7.js";
46
+ } from "./chunk-7LNGIP3X.js";
47
47
  export {
48
48
  CLAUDE_MODEL_CATALOG,
49
49
  ORCHESTRATOR_AGENT_KINDS,
@@ -6,7 +6,7 @@ import {
6
6
  ensureCliTeamTracked,
7
7
  ensureConnectedBrightsyTeamTokens,
8
8
  loadBrightsyConfig
9
- } from "./chunk-E35APBHV.js";
9
+ } from "./chunk-H6GGDLYS.js";
10
10
  import {
11
11
  claudeChromeEnabled,
12
12
  loadAppSettings,
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  ensureAgentPath,
17
17
  run
18
- } from "./chunk-ISY4EGF6.js";
18
+ } from "./chunk-ZNM4MAN4.js";
19
19
 
20
20
  // src/agents/brightsy-targets.ts
21
21
  function encodeBrightsyTarget(type, id, accountId) {
@@ -534,7 +534,9 @@ var SIDEBOARD_MCP_ALLOWED_TOOLS = [
534
534
  var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
535
535
  "mcp__sideboard__present_artifact",
536
536
  "mcp__sideboard__present_schema",
537
- "mcp__sideboard__present_files"
537
+ "mcp__sideboard__present_files",
538
+ "mcp__sideboard__ask_user",
539
+ "mcp__sideboard__present_plan"
538
540
  ];
539
541
  var brightsyMcpCommandCache = null;
540
542
  async function resolveBrightsyMcpCommand() {
@@ -718,7 +720,7 @@ function writeMcpServersConfig(servers) {
718
720
  }
719
721
 
720
722
  // src/agents/types.ts
721
- var PLAN_MODE_INSTRUCTION = "Plan mode is active and must remain active until the user turns Plan mode off in the UI (or explicitly asks you to implement). Analyze the codebase, search and read files as needed, and produce or refine a clear implementation plan. Do not modify, create, or delete any files. Do not exit plan mode on your own.";
723
+ var PLAN_MODE_INSTRUCTION = "Plan mode is active and must remain active until the user turns Plan mode off in the UI (or Approves / Hands off the plan). Analyze the codebase, search and read files as needed, and produce or refine a clear implementation plan. Do not modify, create, or delete any project files except via Sideboard MCP present_plan (writes .context/attachments/plan.md). When you need a clarifying decision (approach forks, auth choice, scope): (1) first write a short chat message that explains the decision and what each option means (tradeoffs, when to pick it) \u2014 do not leave the user staring at bare labels; (2) then call Sideboard MCP ask_user with the same options, including a description on every option. Sideboard shows questions in the composer and mirrors them in chat. After ask_user, wait for the user's next message with their answers before finalizing the plan. When the plan is ready for approval: (1) call present_plan with the full markdown plan (title + content) so Sideboard saves .context/attachments/plan.md and shows it in chat for Approve / Hand off / Copy; (2) Claude should also call ExitPlanMode after present_plan. Do not skip present_plan \u2014 the plan must be a markdown file, not only chat prose.";
722
724
  function permissionMode(thread) {
723
725
  if (thread.planMode) {
724
726
  return {
@@ -899,7 +901,7 @@ var claudeAdapter = {
899
901
  );
900
902
  }
901
903
  const mode = permissionMode(thread);
902
- const { isOrchestratorThread } = await import("./global-workspace-OJF4ENH4.js");
904
+ const { isOrchestratorThread } = await import("./global-workspace-EV4G2WMQ.js");
903
905
  const isOrchestrator = isOrchestratorThread(thread);
904
906
  const injectedServers = await buildInjectedMcpServers({
905
907
  includeSideboard: true,
@@ -60,15 +60,33 @@ async function run(file, args, opts) {
60
60
  }
61
61
  }
62
62
  async function git(args, cwd, opts) {
63
- return run("git", args, { cwd, reject: opts?.reject });
63
+ const prefix = [];
64
+ if (opts?.config) {
65
+ for (const [key, value] of Object.entries(opts.config)) {
66
+ if (!key) continue;
67
+ prefix.push("-c", `${key}=${value}`);
68
+ }
69
+ }
70
+ return run("git", [...prefix, ...args], {
71
+ cwd,
72
+ reject: opts?.reject,
73
+ env: opts?.env
74
+ });
64
75
  }
65
76
  async function gh(args, cwd, opts) {
66
77
  return run("gh", args, { cwd, reject: opts?.reject });
67
78
  }
79
+ async function resolveGhAuthToken(cwd) {
80
+ const result = await gh(["auth", "token"], cwd, { reject: false });
81
+ if (result.exitCode !== 0) return null;
82
+ const token = result.stdout.trim();
83
+ return token || null;
84
+ }
68
85
 
69
86
  export {
70
87
  ensureAgentPath,
71
88
  run,
72
89
  git,
73
- gh
90
+ gh,
91
+ resolveGhAuthToken
74
92
  };
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+
3
+
4
+ // src/paths/workspace-scratch.ts
5
+ var ATTACHMENTS_DIR = ".context/attachments";
6
+ var LEGACY_ATTACHMENTS_DIR = ".sideboard/attachments";
7
+ var ATTACHMENTS_GITIGNORE = `# Sideboard / workspace attachments (local only)
8
+ *
9
+ !.gitignore
10
+ `;
11
+ function attachmentsGitignoreBody() {
12
+ return ATTACHMENTS_GITIGNORE;
13
+ }
14
+ function isWorkspaceScratchPath(relativePath) {
15
+ const p = relativePath.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/$/, "");
16
+ return p === ATTACHMENTS_DIR || p.startsWith(`${ATTACHMENTS_DIR}/`) || p === LEGACY_ATTACHMENTS_DIR || p.startsWith(`${LEGACY_ATTACHMENTS_DIR}/`) || p === ".context" || p.startsWith(".context/");
17
+ }
18
+
19
+ export {
20
+ ATTACHMENTS_DIR,
21
+ LEGACY_ATTACHMENTS_DIR,
22
+ attachmentsGitignoreBody,
23
+ isWorkspaceScratchPath
24
+ };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-M37RITA6.js";
4
4
  import {
5
5
  run
6
- } from "./chunk-AJ6ROGD7.js";
6
+ } from "./chunk-7LNGIP3X.js";
7
7
 
8
8
  // src/brightsy/connected-teams.ts
9
9
  import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
@@ -36,7 +36,7 @@ function saveBrightsyConfig(cfg) {
36
36
 
37
37
  // src/brightsy/accounts.ts
38
38
  async function loadConnectedTeams() {
39
- const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-GF52Q7LB.js");
39
+ const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-ONC4666A.js");
40
40
  return listConnectedBrightsyTeams2();
41
41
  }
42
42
  async function runBrightsyTeamsJson(args) {
@@ -68,7 +68,7 @@ async function getBrightsySession() {
68
68
  const data = await runBrightsyTeamsJson([]);
69
69
  const accounts = Array.isArray(data.teams) ? data.teams : [];
70
70
  const active = data.active ?? accounts.find((a) => a.active) ?? null;
71
- const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-GF52Q7LB.js");
71
+ const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-ONC4666A.js");
72
72
  const connectedTeams = ensureCliTeamTracked2(
73
73
  active ? { id: active.id, slug: active.slug, name: active.name } : void 0
74
74
  );
@@ -108,7 +108,7 @@ async function performBrightsyAccountSwitch(accountIdOrSlug) {
108
108
  return { cfg, target: data.active };
109
109
  }
110
110
  async function switchBrightsyAccount(accountIdOrSlug) {
111
- const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-GF52Q7LB.js");
111
+ const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-ONC4666A.js");
112
112
  await connectBrightsyTeam2(accountIdOrSlug);
113
113
  return getBrightsySession();
114
114
  }
@@ -4,7 +4,7 @@ import {
4
4
  ensureCliTeamTracked,
5
5
  ensureConnectedBrightsyTeamTokens,
6
6
  loadBrightsyConfig
7
- } from "./chunk-ILQK4P5R.js";
7
+ } from "./chunk-BXJ76RHF.js";
8
8
  import {
9
9
  extractJsonErrorMessage,
10
10
  formatUnknownDetail,
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  ensureAgentPath,
21
21
  run
22
- } from "./chunk-AJ6ROGD7.js";
22
+ } from "./chunk-7LNGIP3X.js";
23
23
 
24
24
  // src/agents/brightsy-targets.ts
25
25
  function encodeBrightsyTarget(type, id, accountId) {
@@ -465,7 +465,9 @@ var SIDEBOARD_MCP_ALLOWED_TOOLS = [
465
465
  var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
466
466
  "mcp__sideboard__present_artifact",
467
467
  "mcp__sideboard__present_schema",
468
- "mcp__sideboard__present_files"
468
+ "mcp__sideboard__present_files",
469
+ "mcp__sideboard__ask_user",
470
+ "mcp__sideboard__present_plan"
469
471
  ];
470
472
  var BRIGHTSY_MCP_ALLOWED_TOOLS = [
471
473
  "mcp__brightsy",
@@ -656,7 +658,7 @@ async function writeInjectedMcpConfig(opts) {
656
658
  }
657
659
 
658
660
  // src/agents/types.ts
659
- var PLAN_MODE_INSTRUCTION = "Plan mode is active and must remain active until the user turns Plan mode off in the UI (or explicitly asks you to implement). Analyze the codebase, search and read files as needed, and produce or refine a clear implementation plan. Do not modify, create, or delete any files. Do not exit plan mode on your own.";
661
+ var PLAN_MODE_INSTRUCTION = "Plan mode is active and must remain active until the user turns Plan mode off in the UI (or Approves / Hands off the plan). Analyze the codebase, search and read files as needed, and produce or refine a clear implementation plan. Do not modify, create, or delete any project files except via Sideboard MCP present_plan (writes .context/attachments/plan.md). When you need a clarifying decision (approach forks, auth choice, scope): (1) first write a short chat message that explains the decision and what each option means (tradeoffs, when to pick it) \u2014 do not leave the user staring at bare labels; (2) then call Sideboard MCP ask_user with the same options, including a description on every option. Sideboard shows questions in the composer and mirrors them in chat. After ask_user, wait for the user's next message with their answers before finalizing the plan. When the plan is ready for approval: (1) call present_plan with the full markdown plan (title + content) so Sideboard saves .context/attachments/plan.md and shows it in chat for Approve / Hand off / Copy; (2) Claude should also call ExitPlanMode after present_plan. Do not skip present_plan \u2014 the plan must be a markdown file, not only chat prose.";
660
662
  function permissionMode(thread) {
661
663
  if (thread.planMode) {
662
664
  return {
@@ -837,7 +839,7 @@ var claudeAdapter = {
837
839
  );
838
840
  }
839
841
  const mode = permissionMode(thread);
840
- const { isOrchestratorThread } = await import("./global-workspace-KSR3E63K.js");
842
+ const { isOrchestratorThread } = await import("./global-workspace-MSX2K27Y.js");
841
843
  const isOrchestrator = isOrchestratorThread(thread);
842
844
  const injectedServers = await buildInjectedMcpServers({
843
845
  includeSideboard: true,