@sideboard-ai/core 0.1.242 → 0.1.243

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/{abletime-VSV6AUBV.js → abletime-CWIJ7INC.js} +4 -4
  2. package/dist/{abletime-UX4VUENQ.js → abletime-OI6FNSXX.js} +4 -4
  3. package/dist/{abletime-oauth-DKBUZV2C.js → abletime-oauth-CHVTUZBR.js} +3 -3
  4. package/dist/{abletime-oauth-QMDV45JC.js → abletime-oauth-PUIPZTA4.js} +3 -3
  5. package/dist/{abletime-rest-NL56UVK5.js → abletime-rest-32NIVXAY.js} +3 -3
  6. package/dist/{abletime-rest-VPBC2XS5.js → abletime-rest-APJUKFKL.js} +3 -3
  7. package/dist/{agents-CDQCQVWU.js → agents-CPME6O2H.js} +9 -5
  8. package/dist/{agents-PBRIHUYM.js → agents-VKO5UZO6.js} +9 -5
  9. package/dist/{app-settings-AGDLF75Z.js → app-settings-652J57CX.js} +1 -1
  10. package/dist/{app-settings-I27UBVI4.js → app-settings-VOPXJMGV.js} +1 -1
  11. package/dist/{chunk-BILEJG3V.js → chunk-3P5OCI2X.js} +3 -3
  12. package/dist/{chunk-3PGFAVFL.js → chunk-43F44EKX.js} +2 -2
  13. package/dist/{chunk-3AJUH66R.js → chunk-6I5YQTNK.js} +2 -1
  14. package/dist/{chunk-NJ5OXOTN.js → chunk-7HOKP4GR.js} +2 -1
  15. package/dist/{chunk-TB6UMHIF.js → chunk-7UCZ4DRF.js} +2 -2
  16. package/dist/{chunk-DXY4K5MP.js → chunk-BL2UGKWU.js} +3 -3
  17. package/dist/{chunk-CWHMLCLN.js → chunk-C64YQAA6.js} +3 -3
  18. package/dist/{chunk-O3UAQAYA.js → chunk-CCD2QIFK.js} +2 -2
  19. package/dist/{chunk-LRMJ6V6U.js → chunk-DARSRQUE.js} +1503 -1462
  20. package/dist/{chunk-OKHOYI53.js → chunk-ECZTXNYR.js} +3 -3
  21. package/dist/{chunk-CRAXJAYJ.js → chunk-G45QP2ZD.js} +3 -3
  22. package/dist/{chunk-3Q4PVZ3U.js → chunk-HR4RNC73.js} +32 -5
  23. package/dist/{chunk-YXOOSFAF.js → chunk-IMO7AZI4.js} +2 -2
  24. package/dist/{chunk-QXYWLO6W.js → chunk-ISZERVDT.js} +28 -5
  25. package/dist/{chunk-R3YKDTVE.js → chunk-NEOAHPMK.js} +1569 -1526
  26. package/dist/{chunk-DJU54RYW.js → chunk-PGPSIEMW.js} +13 -0
  27. package/dist/{chunk-P3DCZRER.js → chunk-PPJ5JTWA.js} +1 -0
  28. package/dist/{chunk-5ELC3KK3.js → chunk-QNJXJIWJ.js} +5 -5
  29. package/dist/{chunk-JFOPOMK7.js → chunk-WDDUIGFK.js} +13 -0
  30. package/dist/{chunk-IVXPXYH2.js → chunk-WURF67ID.js} +5 -5
  31. package/dist/{chunk-QLWMHQPH.js → chunk-YLGBQVRK.js} +1 -0
  32. package/dist/{coordinator-prompt-5UINTEA6.js → coordinator-prompt-AJ3E6LBX.js} +4 -4
  33. package/dist/{coordinator-prompt-ATK73HYU.js → coordinator-prompt-PYIRQGU7.js} +4 -4
  34. package/dist/{global-workspace-TD5SARNW.js → global-workspace-GIQ6F6IJ.js} +4 -4
  35. package/dist/{global-workspace-ZJBBICFJ.js → global-workspace-GQM653DP.js} +4 -4
  36. package/dist/index.cjs +574 -464
  37. package/dist/index.d.cts +43 -3
  38. package/dist/index.d.ts +43 -3
  39. package/dist/index.js +70 -38
  40. package/dist/mcp/run-stdio.cjs +1633 -1544
  41. package/dist/mcp/run-stdio.js +50 -36
  42. package/dist/{orchestrator-66ZFQHW5.js → orchestrator-3IOISDFS.js} +7 -7
  43. package/dist/{orchestrator-VYNPNHY4.js → orchestrator-YDPDMXUY.js} +7 -7
  44. package/dist/{plan-file-UUKCZEYP.js → plan-file-7MMIPV7Y.js} +9 -1
  45. package/dist/{plan-file-2EPHYRX7.js → plan-file-CKXUFTQ2.js} +9 -1
  46. package/dist/{thread-store-YOPKY74K.js → thread-store-JQB7KZJR.js} +1 -1
  47. package/dist/{thread-store-AYPBEZT5.js → thread-store-SCV2IZYS.js} +1 -1
  48. package/dist/{workspaces-4SFSCYKT.js → workspaces-OIBSD5B6.js} +4 -4
  49. package/dist/{workspaces-JX5R4V24.js → workspaces-WYC5TLC3.js} +4 -4
  50. package/dist/{worktree-Y5FES5D6.js → worktree-5VRZVGP3.js} +3 -3
  51. package/dist/{worktree-AGVPKDBH.js → worktree-DGDM7LGV.js} +3 -3
  52. package/package.json +1 -1
@@ -8,7 +8,7 @@ import {
8
8
  resolveRepoRoot,
9
9
  takenSlugsFromThread,
10
10
  teamSlugFromName
11
- } from "./chunk-TB6UMHIF.js";
11
+ } from "./chunk-7UCZ4DRF.js";
12
12
  import {
13
13
  ATTACHMENTS_DIR,
14
14
  attachmentsGitignoreBody
@@ -18,7 +18,7 @@ import {
18
18
  listThreads,
19
19
  updateThread,
20
20
  writeThread
21
- } from "./chunk-NJ5OXOTN.js";
21
+ } from "./chunk-7HOKP4GR.js";
22
22
  import {
23
23
  assertOrchestratorCapableAgent,
24
24
  formatAccountProfilePlaybookLine,
@@ -31,7 +31,7 @@ import {
31
31
  resolveThreadDefaults,
32
32
  resolveViewerProfile,
33
33
  resolveViewerProfileForRepo
34
- } from "./chunk-QLWMHQPH.js";
34
+ } from "./chunk-YLGBQVRK.js";
35
35
  import {
36
36
  appDataDir,
37
37
  globalAgentCwd,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  textFromAbleTimeDoc
3
- } from "./chunk-3PGFAVFL.js";
3
+ } from "./chunk-43F44EKX.js";
4
4
  import {
5
5
  assertAbleTimeCredential,
6
6
  callAbleTimeTool,
7
7
  normalizeAbleTimeHost,
8
8
  rewriteAbleTimeError
9
- } from "./chunk-5ELC3KK3.js";
9
+ } from "./chunk-QNJXJIWJ.js";
10
10
  import {
11
11
  isAbleTimeConnected,
12
12
  saveAbleTimeConnection
13
- } from "./chunk-P3DCZRER.js";
13
+ } from "./chunk-PPJ5JTWA.js";
14
14
 
15
15
  // src/integrations/abletime.ts
16
16
  var CLOSED_STATES = /* @__PURE__ */ new Set([
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  isOrchestratorThread
5
- } from "./chunk-OKHOYI53.js";
5
+ } from "./chunk-ECZTXNYR.js";
6
6
  import {
7
7
  applyConnectedTeamToCli,
8
8
  brightsyMcpServerName,
@@ -20,7 +20,7 @@ import {
20
20
  mergeAgentGitAuthEnv,
21
21
  resolveAgentGitAuthEnv,
22
22
  resolveCodexGitWritableRoots
23
- } from "./chunk-TB6UMHIF.js";
23
+ } from "./chunk-7UCZ4DRF.js";
24
24
  import {
25
25
  enrichPathWithNpmGlobalBin,
26
26
  isConductorBundledCli,
@@ -37,7 +37,7 @@ import {
37
37
  loadAppSettings,
38
38
  resolveAgentExecutable,
39
39
  resolveClaudeExecutable
40
- } from "./chunk-QLWMHQPH.js";
40
+ } from "./chunk-YLGBQVRK.js";
41
41
  import {
42
42
  appDataDir
43
43
  } from "./chunk-KK63BFYN.js";
@@ -1247,6 +1247,10 @@ var SIDEBOARD_LINEAR_MCP_ALLOWED_TOOLS = ["mcp__sideboard__linear_*"];
1247
1247
  var SIDEBOARD_ABLETIME_MCP_ALLOWED_TOOLS = ["mcp__sideboard__abletime_*"];
1248
1248
  function sideboardWorktreeAllowedTools(opts) {
1249
1249
  const out = [...SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS];
1250
+ if (!opts?.planMode) {
1251
+ const idx = out.indexOf("mcp__sideboard__present_plan");
1252
+ if (idx >= 0) out.splice(idx, 1);
1253
+ }
1250
1254
  if (opts?.github !== false) out.push(...SIDEBOARD_GITHUB_MCP_ALLOWED_TOOLS);
1251
1255
  if (opts?.linear) out.push(...SIDEBOARD_LINEAR_MCP_ALLOWED_TOOLS);
1252
1256
  if (opts?.abletime) out.push(...SIDEBOARD_ABLETIME_MCP_ALLOWED_TOOLS);
@@ -2044,6 +2048,9 @@ function skillToolFromTextPart(part, id) {
2044
2048
  updatedAt: Date.now()
2045
2049
  };
2046
2050
  }
2051
+ function compactSummaryPart(text, id = "compact-summary") {
2052
+ return compactToolPart(text, id, { status: "done" });
2053
+ }
2047
2054
  function compactToolPart(text, id, opts) {
2048
2055
  const input = { trigger: opts?.trigger ?? "auto" };
2049
2056
  return withPartTimes(
@@ -2321,6 +2328,17 @@ function partsToAssistantText(parts) {
2321
2328
  (p) => p.type === "text" && !messagePartParentId(p)
2322
2329
  ).map((p) => p.text).join("").trim();
2323
2330
  }
2331
+ function lastAssistantMessageText(parts) {
2332
+ if (!parts?.length) return "";
2333
+ for (let i = parts.length - 1; i >= 0; i--) {
2334
+ const p = parts[i];
2335
+ if (!p || p.type !== "text" || messagePartParentId(p)) continue;
2336
+ const text = p.text.trim();
2337
+ if (!text || isInternalAgentStatusText(text)) continue;
2338
+ return text;
2339
+ }
2340
+ return "";
2341
+ }
2324
2342
  function stripBrightsyNdjsonNoise(text) {
2325
2343
  if (!text || !text.includes('"type"')) return text;
2326
2344
  let out = text;
@@ -2348,6 +2366,10 @@ function normalizeParseResult(parsed) {
2348
2366
 
2349
2367
  // src/agents/types.ts
2350
2368
  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) \u2014 not greetings, check-ins, or an invented task menu: (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. If one option is the obvious default, proceed without asking. 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.";
2369
+ var PLAN_MODE_OFF_INSTRUCTION = "Plan mode is off. Do not call present_plan or ExitPlanMode \u2014 those only work when the user turns Plan on in the composer. If you need to propose an approach, write it in chat.";
2370
+ function planModeTurnInstruction(planMode) {
2371
+ return planMode ? PLAN_MODE_INSTRUCTION : PLAN_MODE_OFF_INSTRUCTION;
2372
+ }
2351
2373
  function permissionMode(thread) {
2352
2374
  if (thread.sourceType === "orchestration") {
2353
2375
  return {
@@ -2830,7 +2852,7 @@ var claudeAdapter = {
2830
2852
  );
2831
2853
  }
2832
2854
  const mode = permissionMode(thread);
2833
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-TD5SARNW.js");
2855
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-GIQ6F6IJ.js");
2834
2856
  const isOrchestrator = isOrchestratorThread2(thread);
2835
2857
  const injectedServers = await buildInjectedMcpServers({
2836
2858
  includeSideboard: true,
@@ -2857,7 +2879,8 @@ var claudeAdapter = {
2857
2879
  ...sideboardWorktreeAllowedTools({
2858
2880
  github: true,
2859
2881
  linear: isLinearConnected(),
2860
- abletime: isAbleTimeConnected()
2882
+ abletime: isAbleTimeConnected(),
2883
+ planMode: thread.planMode
2861
2884
  }),
2862
2885
  ...brightsyMcpAllowedTools(injectedBrightsyNames)
2863
2886
  ];
@@ -5226,13 +5249,17 @@ export {
5226
5249
  isPollWrapperToolName,
5227
5250
  liveActivitySummary,
5228
5251
  clipAgentEventForPaint,
5252
+ compactSummaryPart,
5229
5253
  applyAgentEvent,
5230
5254
  partsToAssistantText,
5255
+ lastAssistantMessageText,
5231
5256
  stripBrightsyNdjsonNoise,
5232
5257
  isBrightsyNdjsonLine,
5233
5258
  finalizeParts,
5234
5259
  normalizeParseResult,
5235
5260
  PLAN_MODE_INSTRUCTION,
5261
+ PLAN_MODE_OFF_INSTRUCTION,
5262
+ planModeTurnInstruction,
5236
5263
  permissionMode,
5237
5264
  mcpStatusThinkingFromClaudeInit,
5238
5265
  claudeAdapter,
@@ -6,14 +6,14 @@ import {
6
6
  normalizeAbleTimeCredential,
7
7
  normalizeAbleTimeHost,
8
8
  rewriteAbleTimeError
9
- } from "./chunk-IVXPXYH2.js";
9
+ } from "./chunk-WURF67ID.js";
10
10
  import {
11
11
  httpFetch
12
12
  } from "./chunk-VKQGAWHY.js";
13
13
  import {
14
14
  getAbleTimeAccessToken,
15
15
  getAbleTimeHost
16
- } from "./chunk-QLWMHQPH.js";
16
+ } from "./chunk-YLGBQVRK.js";
17
17
 
18
18
  // src/integrations/abletime-rest.ts
19
19
  var ABLETIME_REST_PREFIX = "/api/public/v2";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isOrchestratorThread
3
- } from "./chunk-BILEJG3V.js";
3
+ } from "./chunk-3P5OCI2X.js";
4
4
  import {
5
5
  codexUnattendedGitConfigArgs,
6
6
  mergeAgentGitAuthEnv,
7
7
  resolveAgentGitAuthEnv,
8
8
  resolveCodexGitWritableRoots
9
- } from "./chunk-O3UAQAYA.js";
9
+ } from "./chunk-CCD2QIFK.js";
10
10
  import {
11
11
  applyConnectedTeamToCli,
12
12
  brightsyMcpServerName,
@@ -45,7 +45,7 @@ import {
45
45
  loadAppSettings,
46
46
  resolveAgentExecutable,
47
47
  resolveClaudeExecutable
48
- } from "./chunk-P3DCZRER.js";
48
+ } from "./chunk-PPJ5JTWA.js";
49
49
  import {
50
50
  appDataDir
51
51
  } from "./chunk-A4JGXX2F.js";
@@ -630,6 +630,10 @@ var SIDEBOARD_LINEAR_MCP_ALLOWED_TOOLS = ["mcp__sideboard__linear_*"];
630
630
  var SIDEBOARD_ABLETIME_MCP_ALLOWED_TOOLS = ["mcp__sideboard__abletime_*"];
631
631
  function sideboardWorktreeAllowedTools(opts) {
632
632
  const out = [...SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS];
633
+ if (!opts?.planMode) {
634
+ const idx = out.indexOf("mcp__sideboard__present_plan");
635
+ if (idx >= 0) out.splice(idx, 1);
636
+ }
633
637
  if (opts?.github !== false) out.push(...SIDEBOARD_GITHUB_MCP_ALLOWED_TOOLS);
634
638
  if (opts?.linear) out.push(...SIDEBOARD_LINEAR_MCP_ALLOWED_TOOLS);
635
639
  if (opts?.abletime) out.push(...SIDEBOARD_ABLETIME_MCP_ALLOWED_TOOLS);
@@ -1617,6 +1621,16 @@ function skillToolFromTextPart(part, id) {
1617
1621
  updatedAt: Date.now()
1618
1622
  };
1619
1623
  }
1624
+ function compactSummaryPart(text, id = "compact-summary") {
1625
+ return compactToolPart(text, id, { status: "done" });
1626
+ }
1627
+ function compactPartsForSummaryMessage(message) {
1628
+ const existing = (message.parts ?? []).filter(
1629
+ (p) => p.type === "tool" && isCompactToolName(p.name)
1630
+ );
1631
+ if (existing.length) return existing;
1632
+ return [compactSummaryPart(message.text ?? "")];
1633
+ }
1620
1634
  function compactToolPart(text, id, opts) {
1621
1635
  const input = { trigger: opts?.trigger ?? "auto" };
1622
1636
  return withPartTimes(
@@ -1932,6 +1946,10 @@ function normalizeParseResult(parsed) {
1932
1946
 
1933
1947
  // src/agents/types.ts
1934
1948
  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) \u2014 not greetings, check-ins, or an invented task menu: (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. If one option is the obvious default, proceed without asking. 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.";
1949
+ var PLAN_MODE_OFF_INSTRUCTION = "Plan mode is off. Do not call present_plan or ExitPlanMode \u2014 those only work when the user turns Plan on in the composer. If you need to propose an approach, write it in chat.";
1950
+ function planModeTurnInstruction(planMode) {
1951
+ return planMode ? PLAN_MODE_INSTRUCTION : PLAN_MODE_OFF_INSTRUCTION;
1952
+ }
1935
1953
  function permissionMode(thread) {
1936
1954
  if (thread.sourceType === "orchestration") {
1937
1955
  return {
@@ -2414,7 +2432,7 @@ var claudeAdapter = {
2414
2432
  );
2415
2433
  }
2416
2434
  const mode = permissionMode(thread);
2417
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-ZJBBICFJ.js");
2435
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-GQM653DP.js");
2418
2436
  const isOrchestrator = isOrchestratorThread2(thread);
2419
2437
  const injectedServers = await buildInjectedMcpServers({
2420
2438
  includeSideboard: true,
@@ -2441,7 +2459,8 @@ var claudeAdapter = {
2441
2459
  ...sideboardWorktreeAllowedTools({
2442
2460
  github: true,
2443
2461
  linear: isLinearConnected(),
2444
- abletime: isAbleTimeConnected()
2462
+ abletime: isAbleTimeConnected(),
2463
+ planMode: thread.planMode
2445
2464
  }),
2446
2465
  ...brightsyMcpAllowedTools(injectedBrightsyNames)
2447
2466
  ];
@@ -4424,6 +4443,8 @@ export {
4424
4443
  STDOUT_EVENT_MAX_CHARS,
4425
4444
  STDERR_EVENT_MAX_CHARS,
4426
4445
  clipAgentEventForPaint,
4446
+ compactSummaryPart,
4447
+ compactPartsForSummaryMessage,
4427
4448
  applyAgentEvent,
4428
4449
  partsToAssistantText,
4429
4450
  lastAssistantMessageText,
@@ -4473,6 +4494,8 @@ export {
4473
4494
  isInjectedOrchMcpName,
4474
4495
  userMcpNamesToDisable,
4475
4496
  PLAN_MODE_INSTRUCTION,
4497
+ PLAN_MODE_OFF_INSTRUCTION,
4498
+ planModeTurnInstruction,
4476
4499
  permissionMode,
4477
4500
  mcpStatusThinkingFromClaudeInit,
4478
4501
  claudeAdapter,