@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
@@ -37,14 +37,18 @@ import {
37
37
  syncBoardPins,
38
38
  updateSchedule,
39
39
  waitForDetachedJob
40
- } from "../chunk-YEPVWJ3R.js";
40
+ } from "../chunk-JUA7XEXR.js";
41
41
  import {
42
+ applySystemCaEnv,
43
+ isCursorApiKeyConfigured,
42
44
  isInternalAgentStatusText,
43
45
  listModelsForAgent,
44
- sideboardMcpProfile
45
- } from "../chunk-TPPZXZTA.js";
46
- import "../chunk-LZ6QMEQC.js";
47
- import "../chunk-S42XV45P.js";
46
+ materializeSystemCaBundle,
47
+ sideboardMcpProfile,
48
+ trustSystemCertificates
49
+ } from "../chunk-W44EKPIR.js";
50
+ import "../chunk-HVIEYTUK.js";
51
+ import "../chunk-Y4MIXGPA.js";
48
52
  import {
49
53
  commentAbleTimeTask,
50
54
  createAbleTimeTask,
@@ -57,17 +61,17 @@ import {
57
61
  searchAbleTimeTasks,
58
62
  toAbleTimeIssueInfo,
59
63
  updateAbleTimeTask
60
- } from "../chunk-AQPVBVJE.js";
64
+ } from "../chunk-BBNUL4IE.js";
61
65
  import {
62
66
  httpFetch
63
- } from "../chunk-6GN5WPYZ.js";
67
+ } from "../chunk-VKQGAWHY.js";
64
68
  import "../chunk-JFOPOMK7.js";
65
69
  import "../chunk-OCQPTUR7.js";
66
70
  import {
67
71
  GLOBAL_WORKSPACE_ID,
68
72
  isCloudCoordinatorThread,
69
73
  listWorkspaces
70
- } from "../chunk-VCVBICMZ.js";
74
+ } from "../chunk-FJWQCZ74.js";
71
75
  import {
72
76
  canonicalizeRepoPath,
73
77
  formatGhLandError,
@@ -2863,6 +2867,51 @@ async function getHomeBoardInputs(workspaces, opts) {
2863
2867
  }
2864
2868
  }
2865
2869
 
2870
+ // src/mcp/create-thread-agent.ts
2871
+ function resolveOrchCreateThreadOptions(input) {
2872
+ const { resolveNewThreadOptions } = input;
2873
+ const account = resolveNewThreadOptions({});
2874
+ const requested = input.requestedAgent;
2875
+ const parent = input.parentAgent ?? void 0;
2876
+ const cursorReady = input.cursorReady ?? isCursorApiKeyConfigured();
2877
+ let agent = account.agent;
2878
+ let ignoredAgent;
2879
+ let honorRequestedModel = false;
2880
+ if (requested) {
2881
+ const parentEcho = Boolean(parent) && requested === parent && requested !== account.agent;
2882
+ const cursorAutofill = requested === "cursor" && account.agent !== "cursor";
2883
+ if (parentEcho || cursorAutofill) {
2884
+ ignoredAgent = requested;
2885
+ } else {
2886
+ agent = requested;
2887
+ honorRequestedModel = input.requestedModel !== void 0;
2888
+ }
2889
+ }
2890
+ let coercedFrom;
2891
+ if (agent === "codex" && parent === "codex" && cursorReady) {
2892
+ coercedFrom = requested ?? "codex";
2893
+ agent = "cursor";
2894
+ }
2895
+ const opts = resolveNewThreadOptions({
2896
+ agent,
2897
+ model: honorRequestedModel ? input.requestedModel : void 0
2898
+ });
2899
+ return {
2900
+ ...opts,
2901
+ ...ignoredAgent ? { ignoredAgent } : {},
2902
+ ...coercedFrom ? { coercedFrom } : {}
2903
+ };
2904
+ }
2905
+ function orchCreateThreadAgentNote(input) {
2906
+ if (input.coercedFrom) {
2907
+ return `Avoid nested Codex under a Codex orchestrator \u2014 used agent=${input.agent}`;
2908
+ }
2909
+ if (input.ignoredAgent) {
2910
+ return `Ignored agent=${input.ignoredAgent} \u2014 used Account default agent=${input.agent}`;
2911
+ }
2912
+ return void 0;
2913
+ }
2914
+
2866
2915
  // src/mcp/server.ts
2867
2916
  var MAX_ORCH_THREADS = 5;
2868
2917
  var CREATE_THREAD_TIMEOUT_MS = 9e4;
@@ -2911,18 +2960,13 @@ async function createOrchChildThread(orch, args, resolveNewThreadOptions) {
2911
2960
  };
2912
2961
  }
2913
2962
  }
2914
- let agentArg = args.agent;
2915
- let agentCoercedFrom;
2916
- const resolvedProbe = resolveNewThreadOptions({ agent: agentArg }).agent;
2917
- if (resolvedProbe === "codex") {
2918
- agentCoercedFrom = agentArg ?? "codex";
2919
- const accountAgent = resolveNewThreadOptions({}).agent;
2920
- agentArg = accountAgent !== "codex" ? accountAgent : "cursor";
2921
- }
2922
- const opts = resolveNewThreadOptions({
2923
- agent: agentArg,
2924
- model: args.model
2963
+ const opts = resolveOrchCreateThreadOptions({
2964
+ requestedAgent: args.agent,
2965
+ requestedModel: args.model,
2966
+ parentAgent: parent?.agent,
2967
+ resolveNewThreadOptions
2925
2968
  });
2969
+ const agentNote = orchCreateThreadAgentNote(opts);
2926
2970
  try {
2927
2971
  const priorIds = new Set(orch.getThreads(false).map((t) => t.id));
2928
2972
  const thread = await withTimeout(
@@ -2958,10 +3002,9 @@ async function createOrchChildThread(orch, args, resolveNewThreadOptions) {
2958
3002
  link: `sideboard://thread/${thread.id}`,
2959
3003
  parentThreadId: thread.parentThreadId,
2960
3004
  ...alreadyStarted ? { alreadyStarted: true } : {},
2961
- ...agentCoercedFrom ? {
2962
- agentCoercedFrom,
2963
- note: `Avoid nested Codex under a Codex orchestrator \u2014 used Account default agent=${thread.agent}`
2964
- } : {},
3005
+ ...opts.coercedFrom ? { agentCoercedFrom: opts.coercedFrom } : {},
3006
+ ...opts.ignoredAgent ? { agentIgnored: opts.ignoredAgent } : {},
3007
+ ...agentNote ? { note: agentNote } : {},
2965
3008
  ...parentCorrectedFrom ? { parentCorrectedFrom, parentNote } : {}
2966
3009
  })
2967
3010
  };
@@ -3321,11 +3364,13 @@ async function startMcpServer() {
3321
3364
  );
3322
3365
  server.tool(
3323
3366
  "create_thread",
3324
- `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.`,
3367
+ `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.`,
3325
3368
  {
3326
3369
  sourceType: z8.enum(["branch", "pr", "ticket"]),
3327
3370
  sourceRef: z8.string(),
3328
- agent: z8.enum(["claude", "codex", "opencode", "brightsy", "cursor"]).optional().describe(`Omit to use Account default agent (${accountDefaults.agent})`),
3371
+ agent: z8.enum(["claude", "codex", "opencode", "brightsy", "cursor"]).optional().describe(
3372
+ `Usually omit. Sideboard uses Account default agent (${accountDefaults.agent}). Passing your own agent or cursor is ignored.`
3373
+ ),
3329
3374
  model: z8.string().nullable().optional().describe(
3330
3375
  `Usually omit to use Account default model (${accountDefaults.model?.trim() || "Auto"}). Pass null only to force Auto / agent-default.`
3331
3376
  ),
@@ -3629,11 +3674,11 @@ async function startMcpServer() {
3629
3674
  );
3630
3675
  server.tool(
3631
3676
  "ask_git",
3632
- "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.",
3677
+ "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.",
3633
3678
  {
3634
3679
  ref: z8.string().describe("Worktree thread id/ref"),
3635
3680
  action: z8.enum(AGENT_GIT_ACTIONS).describe(
3636
- "commit-push | create-draft | create-web | resolve-conflicts | merge"
3681
+ "commit-push | create-draft | create-web | resolve-conflicts | ready-for-review | merge"
3637
3682
  )
3638
3683
  },
3639
3684
  async ({ ref, action }) => {
@@ -4032,6 +4077,12 @@ async function startMcpServer() {
4032
4077
 
4033
4078
  // src/mcp/run-stdio.ts
4034
4079
  dropNestedElectronEnvFromProcess();
4080
+ var systemCaBundle = materializeSystemCaBundle();
4081
+ if (systemCaBundle && !process.env.NODE_EXTRA_CA_CERTS?.trim()) {
4082
+ process.env.NODE_EXTRA_CA_CERTS = systemCaBundle;
4083
+ }
4084
+ applySystemCaEnv(process.env);
4085
+ trustSystemCertificates();
4035
4086
  startMcpServer().catch((err) => {
4036
4087
  console.error(err);
4037
4088
  process.exitCode = 1;
@@ -2,8 +2,8 @@ import {
2
2
  brightsyAccessTokenNeedsRefresh,
3
3
  ensureBrightsyLocalConfigFresh,
4
4
  refreshBrightsyAccessToken
5
- } from "./chunk-M267JPEA.js";
6
- import "./chunk-ELBYOGVA.js";
5
+ } from "./chunk-AN3THU7F.js";
6
+ import "./chunk-N7WZ6NIN.js";
7
7
  export {
8
8
  brightsyAccessTokenNeedsRefresh,
9
9
  ensureBrightsyLocalConfigFresh,
@@ -4,8 +4,8 @@ import {
4
4
  brightsyAccessTokenNeedsRefresh,
5
5
  ensureBrightsyLocalConfigFresh,
6
6
  refreshBrightsyAccessToken
7
- } from "./chunk-S42XV45P.js";
8
- import "./chunk-6GN5WPYZ.js";
7
+ } from "./chunk-Y4MIXGPA.js";
8
+ import "./chunk-VKQGAWHY.js";
9
9
  export {
10
10
  brightsyAccessTokenNeedsRefresh,
11
11
  ensureBrightsyLocalConfigFresh,
@@ -7,14 +7,14 @@ import {
7
7
  isPidAlive,
8
8
  startOrchestration,
9
9
  waitForPidExit
10
- } from "./chunk-YEPVWJ3R.js";
11
- import "./chunk-TPPZXZTA.js";
12
- import "./chunk-LZ6QMEQC.js";
13
- import "./chunk-S42XV45P.js";
14
- import "./chunk-6GN5WPYZ.js";
10
+ } from "./chunk-JUA7XEXR.js";
11
+ import "./chunk-W44EKPIR.js";
12
+ import "./chunk-HVIEYTUK.js";
13
+ import "./chunk-Y4MIXGPA.js";
14
+ import "./chunk-VKQGAWHY.js";
15
15
  import "./chunk-JFOPOMK7.js";
16
16
  import "./chunk-OCQPTUR7.js";
17
- import "./chunk-VCVBICMZ.js";
17
+ import "./chunk-FJWQCZ74.js";
18
18
  import "./chunk-7O53GXTA.js";
19
19
  import "./chunk-D6JWYJ4P.js";
20
20
  import "./chunk-LZQULFIT.js";
@@ -5,17 +5,17 @@ import {
5
5
  isPidAlive,
6
6
  startOrchestration,
7
7
  waitForPidExit
8
- } from "./chunk-HJPGIETB.js";
8
+ } from "./chunk-4ELBAYFW.js";
9
9
  import "./chunk-DJU54RYW.js";
10
- import "./chunk-CUA4S537.js";
11
- import "./chunk-ZY7K4T37.js";
10
+ import "./chunk-NIB6BTC6.js";
11
+ import "./chunk-3ZFGZ7RT.js";
12
12
  import "./chunk-7JIYKYLL.js";
13
13
  import "./chunk-6K64FJDD.js";
14
- import "./chunk-XD2BAANL.js";
15
- import "./chunk-M267JPEA.js";
16
- import "./chunk-ELBYOGVA.js";
14
+ import "./chunk-IEEAVWAP.js";
15
+ import "./chunk-AN3THU7F.js";
16
+ import "./chunk-N7WZ6NIN.js";
17
17
  import "./chunk-AXQ4ZWHK.js";
18
- import "./chunk-XXIH6XYR.js";
18
+ import "./chunk-NQTKRAUF.js";
19
19
  import "./chunk-J7LQVLFQ.js";
20
20
  import "./chunk-4TR3HZFT.js";
21
21
  import "./chunk-AO35MGOE.js";
@@ -6,7 +6,7 @@ import {
6
6
  listWorkspaces,
7
7
  removeWorkspace,
8
8
  syncWorkspacesFromThreads
9
- } from "./chunk-VCVBICMZ.js";
9
+ } from "./chunk-FJWQCZ74.js";
10
10
  import "./chunk-7O53GXTA.js";
11
11
  import "./chunk-D6JWYJ4P.js";
12
12
  import "./chunk-LZQULFIT.js";
@@ -4,7 +4,7 @@ import {
4
4
  listWorkspaces,
5
5
  removeWorkspace,
6
6
  syncWorkspacesFromThreads
7
- } from "./chunk-ZY7K4T37.js";
7
+ } from "./chunk-3ZFGZ7RT.js";
8
8
  import "./chunk-7JIYKYLL.js";
9
9
  import "./chunk-6K64FJDD.js";
10
10
  import "./chunk-J7LQVLFQ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideboard-ai/core",
3
- "version": "0.1.174",
3
+ "version": "0.1.176",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",