@sideboard-ai/core 0.1.174 → 0.1.176

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 (40) hide show
  1. package/dist/{abletime-PCLL36HW.js → abletime-BFIDZR3O.js} +2 -2
  2. package/dist/{abletime-7VW4EGPT.js → abletime-INEHQH6K.js} +2 -2
  3. package/dist/agents/cursor-runner.cjs +91 -62
  4. package/dist/agents/cursor-runner.js +1 -1
  5. package/dist/{agents-ZWYRGFZB.js → agents-544IX5KA.js} +8 -6
  6. package/dist/{agents-LMPVUPOH.js → agents-UENEQ6J2.js} +7 -5
  7. package/dist/{chunk-ZY7K4T37.js → chunk-3ZFGZ7RT.js} +5 -5
  8. package/dist/{chunk-HJPGIETB.js → chunk-4ELBAYFW.js} +19 -14
  9. package/dist/{chunk-M267JPEA.js → chunk-AN3THU7F.js} +1 -1
  10. package/dist/{chunk-AQPVBVJE.js → chunk-BBNUL4IE.js} +1 -1
  11. package/dist/{chunk-VCVBICMZ.js → chunk-FJWQCZ74.js} +5 -5
  12. package/dist/{chunk-LZ6QMEQC.js → chunk-HVIEYTUK.js} +1 -1
  13. package/dist/{chunk-XD2BAANL.js → chunk-IEEAVWAP.js} +6 -6
  14. package/dist/{chunk-YEPVWJ3R.js → chunk-JUA7XEXR.js} +16 -11
  15. package/dist/{chunk-ELBYOGVA.js → chunk-N7WZ6NIN.js} +10 -1
  16. package/dist/{chunk-CUA4S537.js → chunk-NIB6BTC6.js} +9 -5
  17. package/dist/{chunk-XXIH6XYR.js → chunk-NQTKRAUF.js} +167 -35
  18. package/dist/{chunk-CMJ2FBBV.js → chunk-RE2YWFUQ.js} +1 -1
  19. package/dist/{chunk-6GN5WPYZ.js → chunk-VKQGAWHY.js} +10 -1
  20. package/dist/{chunk-TPPZXZTA.js → chunk-W44EKPIR.js} +228 -95
  21. package/dist/{chunk-S42XV45P.js → chunk-Y4MIXGPA.js} +1 -1
  22. package/dist/{connected-teams-DBWAMP7G.js → connected-teams-ON2KIKQX.js} +3 -3
  23. package/dist/{connected-teams-WGONUQOF.js → connected-teams-WOYCH7FR.js} +3 -3
  24. package/dist/{coordinator-prompt-K3HXEPFD.js → coordinator-prompt-BE2FERYE.js} +1 -1
  25. package/dist/{coordinator-prompt-LJKA2ODR.js → coordinator-prompt-PRM5ARWG.js} +1 -1
  26. package/dist/{global-workspace-VDFSU3DD.js → global-workspace-3HIWNQ3B.js} +1 -1
  27. package/dist/{global-workspace-KA7T26F5.js → global-workspace-J737XNUX.js} +1 -1
  28. package/dist/index.cjs +584 -379
  29. package/dist/index.d.cts +53 -10
  30. package/dist/index.d.ts +53 -10
  31. package/dist/index.js +76 -27
  32. package/dist/mcp/run-stdio.cjs +778 -576
  33. package/dist/mcp/run-stdio.js +78 -27
  34. package/dist/{oauth-A7XXI2TM.js → oauth-6ZQ4Q4XN.js} +2 -2
  35. package/dist/{oauth-YJBAURIJ.js → oauth-O7UGLZOY.js} +2 -2
  36. package/dist/{orchestrator-DMSSC4SV.js → orchestrator-2KZD7N4X.js} +6 -6
  37. package/dist/{orchestrator-VMUZJFTZ.js → orchestrator-GDKEVLFK.js} +7 -7
  38. package/dist/{workspaces-GOGBPATJ.js → workspaces-DR4UNOQC.js} +1 -1
  39. package/dist/{workspaces-UR7YEFMZ.js → workspaces-ULHYXM4Y.js} +1 -1
  40. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -237,7 +237,7 @@ import {
237
237
  worktreeCleanupSettings,
238
238
  wrapReviewSkillMarkdown,
239
239
  writeWorktreeFile
240
- } from "./chunk-HJPGIETB.js";
240
+ } from "./chunk-4ELBAYFW.js";
241
241
  import {
242
242
  LEGACY_PLAN_FILE_REL,
243
243
  PLAN_FILE_NAME,
@@ -285,6 +285,7 @@ import {
285
285
  installNpmGlobalPackage,
286
286
  isBrightsyConnected,
287
287
  isBrightsyNdjsonLine,
288
+ isCursorApiKeyConfigured,
288
289
  isCursorAutoModel,
289
290
  isInjectedOrchMcpName,
290
291
  isInternalAgentStatusText,
@@ -342,7 +343,7 @@ import {
342
343
  withEventParentId,
343
344
  withEventsParentId,
344
345
  writeInjectedMcpConfig
345
- } from "./chunk-CUA4S537.js";
346
+ } from "./chunk-NIB6BTC6.js";
346
347
  import {
347
348
  CLOUD_COORDINATOR_BUSY_REPLY,
348
349
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -385,7 +386,7 @@ import {
385
386
  stageBuffersAsAttachments,
386
387
  syncWorkspacesFromThreads,
387
388
  takenTeamSlugsForOrchestration
388
- } from "./chunk-ZY7K4T37.js";
389
+ } from "./chunk-3ZFGZ7RT.js";
389
390
  import {
390
391
  FAMOUS_SOCCER_TEAMS,
391
392
  GITHUB_PR_BODY_MAX_CHARS,
@@ -501,7 +502,7 @@ import {
501
502
  listBrightsyAccounts,
502
503
  listConnectedBrightsyTeams,
503
504
  switchBrightsyAccount
504
- } from "./chunk-XD2BAANL.js";
505
+ } from "./chunk-IEEAVWAP.js";
505
506
  import {
506
507
  brightsyAccessTokenNeedsRefresh,
507
508
  brightsyConfigPath,
@@ -509,7 +510,7 @@ import {
509
510
  loadBrightsyConfig,
510
511
  refreshBrightsyAccessToken,
511
512
  saveBrightsyConfig
512
- } from "./chunk-M267JPEA.js";
513
+ } from "./chunk-AN3THU7F.js";
513
514
  import {
514
515
  ABLETIME_MCP_PATH,
515
516
  DEFAULT_ABLETIME_HOST,
@@ -533,22 +534,25 @@ import {
533
534
  toAbleTimeIssueInfo,
534
535
  updateAbleTimeTask,
535
536
  verifyAbleTimeConnection
536
- } from "./chunk-CMJ2FBBV.js";
537
+ } from "./chunk-RE2YWFUQ.js";
537
538
  import {
538
539
  formatFetchError,
539
540
  httpFetch,
540
541
  setHttpFetchImpl
541
- } from "./chunk-ELBYOGVA.js";
542
+ } from "./chunk-N7WZ6NIN.js";
542
543
  import "./chunk-AXQ4ZWHK.js";
543
544
  import {
544
545
  AGENT_RUNNER_MAX_OLD_SPACE_MB,
545
546
  applyAgentRunnerHeapEnv,
547
+ applySystemCaEnv,
546
548
  cursorSdkMessageToEvents,
549
+ materializeSystemCaBundle,
547
550
  parseCursorRunnerLine,
548
551
  preferredCursorCostCents,
552
+ trustSystemCertificates,
549
553
  turnCostUsdFromCursorUsage,
550
554
  withMaxOldSpaceSize
551
- } from "./chunk-XXIH6XYR.js";
555
+ } from "./chunk-NQTKRAUF.js";
552
556
  import {
553
557
  FOLLOW_UP_BEHAVIORS,
554
558
  GITHUB_GIT_AUTH_MODES,
@@ -4121,6 +4125,51 @@ async function getHomeBoardInputs(workspaces, opts) {
4121
4125
  }
4122
4126
  }
4123
4127
 
4128
+ // src/mcp/create-thread-agent.ts
4129
+ function resolveOrchCreateThreadOptions(input) {
4130
+ const { resolveNewThreadOptions: resolveNewThreadOptions2 } = input;
4131
+ const account = resolveNewThreadOptions2({});
4132
+ const requested = input.requestedAgent;
4133
+ const parent = input.parentAgent ?? void 0;
4134
+ const cursorReady = input.cursorReady ?? isCursorApiKeyConfigured();
4135
+ let agent = account.agent;
4136
+ let ignoredAgent;
4137
+ let honorRequestedModel = false;
4138
+ if (requested) {
4139
+ const parentEcho = Boolean(parent) && requested === parent && requested !== account.agent;
4140
+ const cursorAutofill = requested === "cursor" && account.agent !== "cursor";
4141
+ if (parentEcho || cursorAutofill) {
4142
+ ignoredAgent = requested;
4143
+ } else {
4144
+ agent = requested;
4145
+ honorRequestedModel = input.requestedModel !== void 0;
4146
+ }
4147
+ }
4148
+ let coercedFrom;
4149
+ if (agent === "codex" && parent === "codex" && cursorReady) {
4150
+ coercedFrom = requested ?? "codex";
4151
+ agent = "cursor";
4152
+ }
4153
+ const opts = resolveNewThreadOptions2({
4154
+ agent,
4155
+ model: honorRequestedModel ? input.requestedModel : void 0
4156
+ });
4157
+ return {
4158
+ ...opts,
4159
+ ...ignoredAgent ? { ignoredAgent } : {},
4160
+ ...coercedFrom ? { coercedFrom } : {}
4161
+ };
4162
+ }
4163
+ function orchCreateThreadAgentNote(input) {
4164
+ if (input.coercedFrom) {
4165
+ return `Avoid nested Codex under a Codex orchestrator \u2014 used agent=${input.agent}`;
4166
+ }
4167
+ if (input.ignoredAgent) {
4168
+ return `Ignored agent=${input.ignoredAgent} \u2014 used Account default agent=${input.agent}`;
4169
+ }
4170
+ return void 0;
4171
+ }
4172
+
4124
4173
  // src/mcp/server.ts
4125
4174
  var MAX_ORCH_THREADS = 5;
4126
4175
  var CREATE_THREAD_TIMEOUT_MS = 9e4;
@@ -4169,18 +4218,13 @@ async function createOrchChildThread(orch, args, resolveNewThreadOptions2) {
4169
4218
  };
4170
4219
  }
4171
4220
  }
4172
- let agentArg = args.agent;
4173
- let agentCoercedFrom;
4174
- const resolvedProbe = resolveNewThreadOptions2({ agent: agentArg }).agent;
4175
- if (resolvedProbe === "codex") {
4176
- agentCoercedFrom = agentArg ?? "codex";
4177
- const accountAgent = resolveNewThreadOptions2({}).agent;
4178
- agentArg = accountAgent !== "codex" ? accountAgent : "cursor";
4179
- }
4180
- const opts = resolveNewThreadOptions2({
4181
- agent: agentArg,
4182
- model: args.model
4221
+ const opts = resolveOrchCreateThreadOptions({
4222
+ requestedAgent: args.agent,
4223
+ requestedModel: args.model,
4224
+ parentAgent: parent?.agent,
4225
+ resolveNewThreadOptions: resolveNewThreadOptions2
4183
4226
  });
4227
+ const agentNote = orchCreateThreadAgentNote(opts);
4184
4228
  try {
4185
4229
  const priorIds = new Set(orch.getThreads(false).map((t) => t.id));
4186
4230
  const thread = await withTimeout(
@@ -4216,10 +4260,9 @@ async function createOrchChildThread(orch, args, resolveNewThreadOptions2) {
4216
4260
  link: `sideboard://thread/${thread.id}`,
4217
4261
  parentThreadId: thread.parentThreadId,
4218
4262
  ...alreadyStarted ? { alreadyStarted: true } : {},
4219
- ...agentCoercedFrom ? {
4220
- agentCoercedFrom,
4221
- note: `Avoid nested Codex under a Codex orchestrator \u2014 used Account default agent=${thread.agent}`
4222
- } : {},
4263
+ ...opts.coercedFrom ? { agentCoercedFrom: opts.coercedFrom } : {},
4264
+ ...opts.ignoredAgent ? { agentIgnored: opts.ignoredAgent } : {},
4265
+ ...agentNote ? { note: agentNote } : {},
4223
4266
  ...parentCorrectedFrom ? { parentCorrectedFrom, parentNote } : {}
4224
4267
  })
4225
4268
  };
@@ -4579,11 +4622,13 @@ async function startMcpServer() {
4579
4622
  );
4580
4623
  server.tool(
4581
4624
  "create_thread",
4582
- `Create a worktree thread (chat) from branch, pr, or ticket. A ticket, PR, or named branch may have only one live worktree \u2014 if one already matches, returns it (alreadyStarted=true) instead of a second checkout. Creating from the default branch still opens a new isolated worktree. Pass repoPath from list_workspaces. cowboy=true uses the project folder on the default branch (no isolated worktree; land is commit+push). From an orchestration chat, omit parentThreadId (Sideboard binds the child to this chat) or pass the exact id from the turn reminder \u2014 never invent a uuid. Prefer omitting agent/model so Sideboard applies ${accountDefaultsHint}. Setup (settings.toml, .cursor/worktrees.json, or script/setup) runs in the background in parallel with the first turn (skipped for cowboy). Then use send_to_thread to chat.`,
4625
+ `Create a worktree thread (chat) from branch, pr, or ticket. A ticket, PR, or named branch may have only one live worktree \u2014 if one already matches, returns it (alreadyStarted=true) instead of a second checkout. Creating from the default branch still opens a new isolated worktree. Pass repoPath from list_workspaces. cowboy=true uses the project folder on the default branch (no isolated worktree; land is commit+push). From an orchestration chat, omit parentThreadId (Sideboard binds the child to this chat) or pass the exact id from the turn reminder \u2014 never invent a uuid. Omit agent/model \u2014 Sideboard applies ${accountDefaultsHint}. Do not pass your own agent or agent=cursor; those are ignored. Setup (settings.toml, .cursor/worktrees.json, or script/setup) runs in the background in parallel with the first turn (skipped for cowboy). Then use send_to_thread to chat.`,
4583
4626
  {
4584
4627
  sourceType: z8.enum(["branch", "pr", "ticket"]),
4585
4628
  sourceRef: z8.string(),
4586
- agent: z8.enum(["claude", "codex", "opencode", "brightsy", "cursor"]).optional().describe(`Omit to use Account default agent (${accountDefaults.agent})`),
4629
+ agent: z8.enum(["claude", "codex", "opencode", "brightsy", "cursor"]).optional().describe(
4630
+ `Usually omit. Sideboard uses Account default agent (${accountDefaults.agent}). Passing your own agent or cursor is ignored.`
4631
+ ),
4587
4632
  model: z8.string().nullable().optional().describe(
4588
4633
  `Usually omit to use Account default model (${accountDefaults.model?.trim() || "Auto"}). Pass null only to force Auto / agent-default.`
4589
4634
  ),
@@ -4887,11 +4932,11 @@ async function startMcpServer() {
4887
4932
  );
4888
4933
  server.tool(
4889
4934
  "ask_git",
4890
- "Commit & push, open a draft PR, resolve conflicts, or merge \u2014 same actions as the desktop git buttons. When the worktree is clean, Sideboard pushes / opens the PR itself (HTTPS via `gh` even when origin is SSH / Settings \u2192 Git is SSH). When dirty, queues the worktree agent to commit; then wait_for_turn (loop while stillRunning). Do not start a checks loop on a plain push \u2014 only if the user gave a goal (Greptile 5/5, CI green). Pass a worktree thread ref (not the orchestrator). action=merge only when the user explicitly asked to merge that PR. Do not run git or gh from the orchestration cwd. If this tool errors that the GraphQL/PR body is too long, the branch is already pushed \u2014 have the worktree agent retry `gh pr create --body-file` with a short description (GitHub limit 65,536 characters). Do not invent SSH/auth failures from that error.",
4935
+ "Commit & push, open a draft PR, mark ready for review, resolve conflicts, or merge \u2014 same actions as the desktop git buttons. When the worktree is clean, Sideboard pushes / opens the PR itself (HTTPS via `gh` even when origin is SSH / Settings \u2192 Git is SSH). When dirty, queues the worktree agent to commit; then wait_for_turn (loop while stillRunning). Do not start a checks loop on a plain push \u2014 only if the user gave a goal (Greptile 5/5, CI green). Pass a worktree thread ref (not the orchestrator). action=ready-for-review and action=merge only when the user explicitly asked (or clicked the desktop button). Do not run git or gh from the orchestration cwd. If this tool errors that the GraphQL/PR body is too long, the branch is already pushed \u2014 have the worktree agent retry `gh pr create --body-file` with a short description (GitHub limit 65,536 characters). Do not invent SSH/auth failures from that error.",
4891
4936
  {
4892
4937
  ref: z8.string().describe("Worktree thread id/ref"),
4893
4938
  action: z8.enum(AGENT_GIT_ACTIONS).describe(
4894
- "commit-push | create-draft | create-web | resolve-conflicts | merge"
4939
+ "commit-push | create-draft | create-web | resolve-conflicts | ready-for-review | merge"
4895
4940
  )
4896
4941
  },
4897
4942
  async ({ ref, action }) => {
@@ -7626,6 +7671,7 @@ export {
7626
7671
  applyForwardOccupancy,
7627
7672
  applyGithubGitAuthEnv,
7628
7673
  applyPromptCacheTtlEnv,
7674
+ applySystemCaEnv,
7629
7675
  applyThreadIntoMain,
7630
7676
  applyTurnUsage,
7631
7677
  armSchedules,
@@ -7906,6 +7952,7 @@ export {
7906
7952
  isCloudCoordinatorThread,
7907
7953
  isConductorBundledCli,
7908
7954
  isCowboyThread,
7955
+ isCursorApiKeyConfigured,
7909
7956
  isCursorAutoModel,
7910
7957
  isDefaultishSourceRef,
7911
7958
  isDesktopHostAlive,
@@ -8004,6 +8051,7 @@ export {
8004
8051
  lookupSoccerTeam,
8005
8052
  mapAbleTimeTask,
8006
8053
  markPrReady,
8054
+ materializeSystemCaBundle,
8007
8055
  maxConcurrentAgents,
8008
8056
  maybeCompactContext,
8009
8057
  mcpAllowTools,
@@ -8227,6 +8275,7 @@ export {
8227
8275
  toolDetail,
8228
8276
  toolFilePath,
8229
8277
  totalTokens,
8278
+ trustSystemCertificates,
8230
8279
  turnCostUsdFromCursorUsage,
8231
8280
  updateAbleTimeTask,
8232
8281
  updateAdvancedSettings,