@sideboard-ai/core 0.1.241 → 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-63UHRQ64.js → chunk-DARSRQUE.js} +1523 -1450
  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-EE3REM4B.js → chunk-NEOAHPMK.js} +1582 -1505
  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 +609 -463
  37. package/dist/index.d.cts +56 -2
  38. package/dist/index.d.ts +56 -2
  39. package/dist/index.js +74 -38
  40. package/dist/mcp/run-stdio.cjs +1029 -908
  41. package/dist/mcp/run-stdio.js +50 -36
  42. package/dist/{orchestrator-ZUOEBJFN.js → orchestrator-3IOISDFS.js} +7 -7
  43. package/dist/{orchestrator-7AJEFWGQ.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
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  parseAbleTimeOAuthCallbackUrl,
21
21
  resolveAbleTimeOAuthHost,
22
22
  startAbleTimeOAuth
23
- } from "./chunk-CWHMLCLN.js";
23
+ } from "./chunk-C64YQAA6.js";
24
24
  import {
25
25
  ableTimeDependencyTarget,
26
26
  commentAbleTimeTask,
@@ -38,8 +38,8 @@ import {
38
38
  toAbleTimeIssueInfo,
39
39
  updateAbleTimeTask,
40
40
  verifyAbleTimeConnection
41
- } from "./chunk-CRAXJAYJ.js";
42
- import "./chunk-3PGFAVFL.js";
41
+ } from "./chunk-G45QP2ZD.js";
42
+ import "./chunk-43F44EKX.js";
43
43
  import {
44
44
  ABLETIME_MCP_PATH,
45
45
  ABLETIME_MCP_PM_PATH,
@@ -60,7 +60,7 @@ import {
60
60
  normalizeAbleTimeCredential,
61
61
  normalizeAbleTimeHost,
62
62
  rewriteAbleTimeError
63
- } from "./chunk-5ELC3KK3.js";
63
+ } from "./chunk-QNJXJIWJ.js";
64
64
  import {
65
65
  AGENT_GIT_ACTIONS,
66
66
  BOARD_COLUMN_DEFS,
@@ -107,6 +107,7 @@ import {
107
107
  alignQueueAttachments,
108
108
  allocatePort,
109
109
  allocatePortRange,
110
+ appendCompactedMessages,
110
111
  appendQueuedItem,
111
112
  applyCompaction,
112
113
  applyForwardOccupancy,
@@ -127,6 +128,7 @@ import {
127
128
  cleanupArchivedHistory,
128
129
  cleanupOrphanWorktrees,
129
130
  cloneRepoIntoSideboard,
131
+ compactArchiveProse,
130
132
  computeNextRunAt,
131
133
  conductorDbPath,
132
134
  confirmLand,
@@ -226,9 +228,11 @@ import {
226
228
  isStaleLastErrorDuringTurn,
227
229
  isTerminalTaskState,
228
230
  isThisProcessDesktopHost,
231
+ isThisWorktreeListenerCwd,
229
232
  isUnclaimedRunScriptRequest,
230
233
  issueNeedsWorkspacePick,
231
234
  issueTicketFromThread,
235
+ killDetachedRunTree,
232
236
  killListenersOnPorts,
233
237
  killStaleWorktreeListeners,
234
238
  killableListenerPids,
@@ -252,6 +256,7 @@ import {
252
256
  mcpWaitTaskHint,
253
257
  mentionsPrGoal,
254
258
  mergeSetupOutput,
259
+ messagesForCompactArchive,
255
260
  messagesSinceLastBrightsyContextSummary,
256
261
  moveQueuedItemToFront,
257
262
  needsCoordinatorAction,
@@ -331,23 +336,28 @@ import {
331
336
  worktreeRunPortsPath,
332
337
  wrapReviewSkillMarkdown,
333
338
  writeWorktreeFile
334
- } from "./chunk-EE3REM4B.js";
339
+ } from "./chunk-NEOAHPMK.js";
335
340
  import {
336
341
  LEGACY_PLAN_FILE_REL,
337
342
  PLAN_FILE_NAME,
338
343
  PLAN_FILE_REL,
344
+ PRESENT_PLAN_REQUIRES_PLAN_MODE,
345
+ PRESENT_PLAN_TOOL_DESCRIPTION,
339
346
  extractPresentedPlan,
340
347
  isPresentPlanToolName,
341
348
  planFileAbs,
342
349
  readPlanFile,
343
350
  resolvePlanMarkdown,
351
+ shouldRegisterPresentPlan,
352
+ threadMayPresentPlan,
344
353
  writePlanFile
345
- } from "./chunk-DJU54RYW.js";
354
+ } from "./chunk-PGPSIEMW.js";
346
355
  import {
347
356
  BRIGHTSY_MCP_ALLOWED_TOOLS,
348
357
  CLAUDE_MODEL_CATALOG,
349
358
  MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
350
359
  PLAN_MODE_INSTRUCTION,
360
+ PLAN_MODE_OFF_INSTRUCTION,
351
361
  SIDEBOARD_MCP_ALLOWED_TOOLS,
352
362
  SIDEBOARD_MCP_PROFILE_ENV,
353
363
  SIDEBOARD_THREAD_ID_ENV,
@@ -369,6 +379,8 @@ import {
369
379
  clipAgentEventForPaint,
370
380
  clipThinkingForStore,
371
381
  codexAdapter,
382
+ compactPartsForSummaryMessage,
383
+ compactSummaryPart,
372
384
  countCacheControlBlocks,
373
385
  cursorAdapter,
374
386
  decodeBrightsyTarget,
@@ -432,6 +444,7 @@ import {
432
444
  parseSessionQuotaResetAt,
433
445
  partsToAssistantText,
434
446
  permissionMode,
447
+ planModeTurnInstruction,
435
448
  prepareTerminalCommand,
436
449
  promptMentionsBrightsy,
437
450
  registerPackagedUserMcpClients,
@@ -459,7 +472,7 @@ import {
459
472
  withEventParentId,
460
473
  withEventsParentId,
461
474
  writeInjectedMcpConfig
462
- } from "./chunk-QXYWLO6W.js";
475
+ } from "./chunk-ISZERVDT.js";
463
476
  import {
464
477
  CLOUD_COORDINATOR_BUSY_REPLY,
465
478
  CLOUD_COORDINATOR_CANCELED_REPLY,
@@ -505,7 +518,7 @@ import {
505
518
  stageBuffersAsAttachments,
506
519
  syncWorkspacesFromThreads,
507
520
  takenTeamSlugsForOrchestration
508
- } from "./chunk-BILEJG3V.js";
521
+ } from "./chunk-3P5OCI2X.js";
509
522
  import {
510
523
  FAMOUS_SOCCER_TEAMS,
511
524
  GITHUB_PR_BODY_MAX_CHARS,
@@ -603,7 +616,7 @@ import {
603
616
  worktreeDisplayLabelForGroup,
604
617
  worktreeNameFromPath,
605
618
  worktreeSlugForTicket
606
- } from "./chunk-O3UAQAYA.js";
619
+ } from "./chunk-CCD2QIFK.js";
607
620
  import {
608
621
  ATTACHMENTS_DIR,
609
622
  CLI_DIR,
@@ -785,7 +798,7 @@ import {
785
798
  usageOnLimit,
786
799
  writeSecureJson,
787
800
  writeViewerContext
788
- } from "./chunk-P3DCZRER.js";
801
+ } from "./chunk-PPJ5JTWA.js";
789
802
  import {
790
803
  examplePrefixedBranch,
791
804
  resolveGitBranchPrefix,
@@ -818,7 +831,7 @@ import {
818
831
  updateThread,
819
832
  withThreadLock,
820
833
  writeThread
821
- } from "./chunk-3AJUH66R.js";
834
+ } from "./chunk-6I5YQTNK.js";
822
835
  import "./chunk-224IXQOM.js";
823
836
  import {
824
837
  THINKING_EFFORTS,
@@ -978,7 +991,8 @@ function slimThreadForUiList(thread) {
978
991
  attachments: [],
979
992
  pendingTurnAttachments: [],
980
993
  queueAttachments: [],
981
- messages: slimMessagesForUiList(messages, thread.updatedAt)
994
+ messages: slimMessagesForUiList(messages, thread.updatedAt),
995
+ compactedMessages: void 0
982
996
  };
983
997
  }
984
998
  function slimMessagesForUiList(messages, fallbackTs) {
@@ -3945,7 +3959,7 @@ async function continueSourceThread(threadId, prompt) {
3945
3959
  await continueOnReply(threadId, prompt);
3946
3960
  return;
3947
3961
  }
3948
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-7AJEFWGQ.js");
3962
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-YDPDMXUY.js");
3949
3963
  await getOrchestrator2().send(threadId, prompt);
3950
3964
  } catch {
3951
3965
  }
@@ -6060,7 +6074,7 @@ async function startMcpServer() {
6060
6074
  );
6061
6075
  }
6062
6076
  try {
6063
- const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-I27UBVI4.js");
6077
+ const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-VOPXJMGV.js");
6064
6078
  orch.setMaxConcurrent(maxConcurrentAgents2());
6065
6079
  } catch {
6066
6080
  }
@@ -6285,31 +6299,40 @@ async function startMcpServer() {
6285
6299
  return mcpJson(payload);
6286
6300
  }
6287
6301
  );
6288
- server.tool(
6289
- "present_plan",
6290
- "Save the implementation plan as markdown to .context/attachments/plan.md and show it in Sideboard chat for user approval (Copy / Hand off / Approve). Call this when the plan is ready \u2014 required in plan mode. Pass the full plan body in content. Then Claude should call ExitPlanMode.",
6291
- {
6292
- title: z9.string().optional().describe("Short plan title (defaults to Plan)"),
6293
- content: z9.string().min(1).describe("Full plan markdown (headings, steps, risks, open questions)"),
6294
- thread_id: z9.string().optional().describe("Sideboard thread id when cwd is not the worktree")
6295
- },
6296
- async ({ title, content, thread_id }) => {
6297
- const { writePlanFile: writePlanFile2 } = await import("./plan-file-UUKCZEYP.js");
6298
- let root = process.cwd();
6299
- if (thread_id?.trim()) {
6300
- const t = orch.getThread(thread_id.trim());
6302
+ const callingThreadId = process.env[SIDEBOARD_THREAD_ID_ENV]?.trim() || "";
6303
+ const callingThread = callingThreadId ? orch.getThread(callingThreadId) : null;
6304
+ if (shouldRegisterPresentPlan(callingThread)) {
6305
+ server.tool(
6306
+ "present_plan",
6307
+ PRESENT_PLAN_TOOL_DESCRIPTION,
6308
+ {
6309
+ title: z9.string().optional().describe("Short plan title (defaults to Plan)"),
6310
+ content: z9.string().min(1).describe("Full plan markdown (headings, steps, risks, open questions)"),
6311
+ thread_id: z9.string().optional().describe("Sideboard thread id when cwd is not the worktree")
6312
+ },
6313
+ async ({ title, content, thread_id }) => {
6314
+ const { writePlanFile: writePlanFile2 } = await import("./plan-file-7MMIPV7Y.js");
6315
+ const ref = thread_id?.trim() || callingThreadId;
6316
+ const t = ref ? orch.getThread(ref) : null;
6317
+ if (t && !threadMayPresentPlan(t)) {
6318
+ return mcpJson(
6319
+ { ok: false, error: PRESENT_PLAN_REQUIRES_PLAN_MODE },
6320
+ true
6321
+ );
6322
+ }
6323
+ let root = process.cwd();
6301
6324
  if (t?.worktreePath?.trim()) root = t.worktreePath;
6325
+ const path2 = writePlanFile2(root, content);
6326
+ const payload = {
6327
+ ok: true,
6328
+ path: path2,
6329
+ title: title?.trim() || "Plan",
6330
+ message: "Plan saved to .context/attachments/plan.md and shown in Sideboard chat for approval."
6331
+ };
6332
+ return mcpJson(payload);
6302
6333
  }
6303
- const path2 = writePlanFile2(root, content);
6304
- const payload = {
6305
- ok: true,
6306
- path: path2,
6307
- title: title?.trim() || "Plan",
6308
- message: "Plan saved to .context/attachments/plan.md and shown in Sideboard chat for approval."
6309
- };
6310
- return mcpJson(payload);
6311
- }
6312
- );
6334
+ );
6335
+ }
6313
6336
  server.tool(
6314
6337
  "present_schema",
6315
6338
  "Open Sideboard\u2019s schema-driven side column (filterable table and/or form) when the user needs to filter, edit, publish, or persist records. Do not call this just to re-display rows you already wrote as a markdown table. If the user asks for an editable / interactive table, call this even if chat already showed those rows. Pass JSON Schema + optional schemaUi. Prefer datasource=inline with embedded resource/records. Use datasource=brightsy with resource_id only when the user is logged into Brightsy.",
@@ -6546,7 +6569,7 @@ async function startMcpServer() {
6546
6569
  registerConnectedIssueVendorTools(server);
6547
6570
  registerScheduleTools(server);
6548
6571
  const { getCaffeinateHold: getCaffeinateHold2, setCaffeinateHold: setCaffeinateHold2 } = await import("./caffeinate-hold-PXHGH7ZN.js");
6549
- const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-I27UBVI4.js");
6572
+ const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-VOPXJMGV.js");
6550
6573
  const accountDefaults = resolveThreadDefaults2();
6551
6574
  const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
6552
6575
  server.tool(
@@ -9611,8 +9634,11 @@ export {
9611
9634
  PLAN_FILE_NAME,
9612
9635
  PLAN_FILE_REL,
9613
9636
  PLAN_MODE_INSTRUCTION,
9637
+ PLAN_MODE_OFF_INSTRUCTION,
9614
9638
  PLAN_QUESTION_ANSWERS_PREFIX,
9615
9639
  PORT_RANGE_SIZE,
9640
+ PRESENT_PLAN_REQUIRES_PLAN_MODE,
9641
+ PRESENT_PLAN_TOOL_DESCRIPTION,
9616
9642
  PROFILE_NOTES_MAX,
9617
9643
  PR_DETAILS_JSON_FIELDS,
9618
9644
  REPO_REVIEW_NAME,
@@ -9683,6 +9709,7 @@ export {
9683
9709
  annotateDevAccessRuns,
9684
9710
  appDataDir,
9685
9711
  appSettingsPath,
9712
+ appendCompactedMessages,
9686
9713
  appendIndexedGitConfig,
9687
9714
  appendMessage,
9688
9715
  appendQueuedItem,
@@ -9770,6 +9797,9 @@ export {
9770
9797
  commentGitHubIssue,
9771
9798
  commentLinearIssue,
9772
9799
  commitAll,
9800
+ compactArchiveProse,
9801
+ compactPartsForSummaryMessage,
9802
+ compactSummaryPart,
9773
9803
  computeNextRunAt,
9774
9804
  conductorBundledBinDir,
9775
9805
  conductorDbPath,
@@ -10076,6 +10106,7 @@ export {
10076
10106
  isTerminalTaskState,
10077
10107
  isThinkingEffort,
10078
10108
  isThisProcessDesktopHost,
10109
+ isThisWorktreeListenerCwd,
10079
10110
  isThreadCaffeinated,
10080
10111
  isThreadRecordFile,
10081
10112
  isUnclaimedRunScriptRequest,
@@ -10085,6 +10116,7 @@ export {
10085
10116
  issueMatchesAssignee,
10086
10117
  issueSourceLabel,
10087
10118
  issueTicketFromThread,
10119
+ killDetachedRunTree,
10088
10120
  killListenersOnPorts,
10089
10121
  killStaleWorktreeListeners,
10090
10122
  killableListenerPids,
@@ -10167,6 +10199,7 @@ export {
10167
10199
  mergeSideboardIntoMcpServersJson,
10168
10200
  mergeUsage,
10169
10201
  messagePartParentId,
10202
+ messagesForCompactArchive,
10170
10203
  messagesSinceLastBrightsyContextSummary,
10171
10204
  moveQueuedItemToFront,
10172
10205
  needsCoordinatorAction,
@@ -10226,6 +10259,7 @@ export {
10226
10259
  planFileAbs,
10227
10260
  planHistoryAgePurge,
10228
10261
  planHistoryRetention,
10262
+ planModeTurnInstruction,
10229
10263
  planQuestionsSignature,
10230
10264
  pnpmFilterPackage,
10231
10265
  pollSlackOutboundWatches,
@@ -10353,6 +10387,7 @@ export {
10353
10387
  shouldInjectBrightsyMcp,
10354
10388
  shouldNotifyOrchestrator,
10355
10389
  shouldRefreshReviewRequestTemplate,
10390
+ shouldRegisterPresentPlan,
10356
10391
  shouldRemoveWorktreeOnTeardown,
10357
10392
  shouldResetSessionForOccupancy,
10358
10393
  shouldRunHistoryCleanup,
@@ -10414,6 +10449,7 @@ export {
10414
10449
  threadHasCompactedContext,
10415
10450
  threadLivePath,
10416
10451
  threadLockPath,
10452
+ threadMayPresentPlan,
10417
10453
  threadRequestsBrightsyMcp,
10418
10454
  threadsDir,
10419
10455
  threadsSharingWorktree,