@sideboard-ai/core 0.1.174 → 0.1.175

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-LMPVUPOH.js → agents-2W7LP7JR.js} +5 -5
  6. package/dist/{agents-ZWYRGFZB.js → agents-AWSFDB47.js} +6 -6
  7. package/dist/{chunk-M267JPEA.js → chunk-AN3THU7F.js} +1 -1
  8. package/dist/{chunk-AQPVBVJE.js → chunk-BBNUL4IE.js} +1 -1
  9. package/dist/{chunk-LZ6QMEQC.js → chunk-HVIEYTUK.js} +1 -1
  10. package/dist/{chunk-XD2BAANL.js → chunk-IEEAVWAP.js} +6 -6
  11. package/dist/{chunk-HJPGIETB.js → chunk-JIWRBNSO.js} +12 -12
  12. package/dist/{chunk-ELBYOGVA.js → chunk-N7WZ6NIN.js} +10 -1
  13. package/dist/{chunk-ZY7K4T37.js → chunk-NA7P3SZL.js} +3 -3
  14. package/dist/{chunk-XXIH6XYR.js → chunk-NQTKRAUF.js} +167 -35
  15. package/dist/{chunk-CUA4S537.js → chunk-QTJ2ERA6.js} +5 -5
  16. package/dist/{chunk-YEPVWJ3R.js → chunk-RCICB4OM.js} +9 -9
  17. package/dist/{chunk-CMJ2FBBV.js → chunk-RE2YWFUQ.js} +1 -1
  18. package/dist/{chunk-VCVBICMZ.js → chunk-TNOLCU5B.js} +3 -3
  19. package/dist/{chunk-6GN5WPYZ.js → chunk-VKQGAWHY.js} +10 -1
  20. package/dist/{chunk-S42XV45P.js → chunk-Y4MIXGPA.js} +1 -1
  21. package/dist/{chunk-TPPZXZTA.js → chunk-ZXHV3NHY.js} +224 -95
  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-LJKA2ODR.js → coordinator-prompt-7OHKB5WV.js} +1 -1
  25. package/dist/{coordinator-prompt-K3HXEPFD.js → coordinator-prompt-XCQCGUED.js} +1 -1
  26. package/dist/{global-workspace-VDFSU3DD.js → global-workspace-KPROJ54C.js} +1 -1
  27. package/dist/{global-workspace-KA7T26F5.js → global-workspace-WSQNEALF.js} +1 -1
  28. package/dist/index.cjs +565 -373
  29. package/dist/index.d.cts +49 -8
  30. package/dist/index.d.ts +49 -8
  31. package/dist/index.js +71 -25
  32. package/dist/mcp/run-stdio.cjs +762 -570
  33. package/dist/mcp/run-stdio.js +74 -25
  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-VMUZJFTZ.js → orchestrator-PDEU75EE.js} +7 -7
  37. package/dist/{orchestrator-DMSSC4SV.js → orchestrator-QSNGJ2ER.js} +6 -6
  38. package/dist/{workspaces-GOGBPATJ.js → workspaces-P66DGCZE.js} +1 -1
  39. package/dist/{workspaces-UR7YEFMZ.js → workspaces-TEBTNS2M.js} +1 -1
  40. package/package.json +1 -1
@@ -37,14 +37,17 @@ import {
37
37
  syncBoardPins,
38
38
  updateSchedule,
39
39
  waitForDetachedJob
40
- } from "../chunk-YEPVWJ3R.js";
40
+ } from "../chunk-RCICB4OM.js";
41
41
  import {
42
+ applySystemCaEnv,
42
43
  isInternalAgentStatusText,
43
44
  listModelsForAgent,
44
- sideboardMcpProfile
45
- } from "../chunk-TPPZXZTA.js";
46
- import "../chunk-LZ6QMEQC.js";
47
- import "../chunk-S42XV45P.js";
45
+ materializeSystemCaBundle,
46
+ sideboardMcpProfile,
47
+ trustSystemCertificates
48
+ } from "../chunk-ZXHV3NHY.js";
49
+ import "../chunk-HVIEYTUK.js";
50
+ import "../chunk-Y4MIXGPA.js";
48
51
  import {
49
52
  commentAbleTimeTask,
50
53
  createAbleTimeTask,
@@ -57,17 +60,17 @@ import {
57
60
  searchAbleTimeTasks,
58
61
  toAbleTimeIssueInfo,
59
62
  updateAbleTimeTask
60
- } from "../chunk-AQPVBVJE.js";
63
+ } from "../chunk-BBNUL4IE.js";
61
64
  import {
62
65
  httpFetch
63
- } from "../chunk-6GN5WPYZ.js";
66
+ } from "../chunk-VKQGAWHY.js";
64
67
  import "../chunk-JFOPOMK7.js";
65
68
  import "../chunk-OCQPTUR7.js";
66
69
  import {
67
70
  GLOBAL_WORKSPACE_ID,
68
71
  isCloudCoordinatorThread,
69
72
  listWorkspaces
70
- } from "../chunk-VCVBICMZ.js";
73
+ } from "../chunk-TNOLCU5B.js";
71
74
  import {
72
75
  canonicalizeRepoPath,
73
76
  formatGhLandError,
@@ -2863,6 +2866,50 @@ async function getHomeBoardInputs(workspaces, opts) {
2863
2866
  }
2864
2867
  }
2865
2868
 
2869
+ // src/mcp/create-thread-agent.ts
2870
+ function resolveOrchCreateThreadOptions(input) {
2871
+ const { resolveNewThreadOptions } = input;
2872
+ const account = resolveNewThreadOptions({});
2873
+ const requested = input.requestedAgent;
2874
+ const parent = input.parentAgent ?? void 0;
2875
+ let agent = account.agent;
2876
+ let ignoredAgent;
2877
+ let honorRequestedModel = false;
2878
+ if (requested) {
2879
+ const parentEcho = Boolean(parent) && requested === parent && requested !== account.agent;
2880
+ const cursorAutofill = requested === "cursor" && account.agent !== "cursor";
2881
+ if (parentEcho || cursorAutofill) {
2882
+ ignoredAgent = requested;
2883
+ } else {
2884
+ agent = requested;
2885
+ honorRequestedModel = input.requestedModel !== void 0;
2886
+ }
2887
+ }
2888
+ let coercedFrom;
2889
+ if (agent === "codex" && parent === "codex") {
2890
+ coercedFrom = requested ?? "codex";
2891
+ agent = "cursor";
2892
+ }
2893
+ const opts = resolveNewThreadOptions({
2894
+ agent,
2895
+ model: honorRequestedModel ? input.requestedModel : void 0
2896
+ });
2897
+ return {
2898
+ ...opts,
2899
+ ...ignoredAgent ? { ignoredAgent } : {},
2900
+ ...coercedFrom ? { coercedFrom } : {}
2901
+ };
2902
+ }
2903
+ function orchCreateThreadAgentNote(input) {
2904
+ if (input.coercedFrom) {
2905
+ return `Avoid nested Codex under a Codex orchestrator \u2014 used Account default agent=${input.agent}`;
2906
+ }
2907
+ if (input.ignoredAgent) {
2908
+ return `Ignored agent=${input.ignoredAgent} \u2014 used Account default agent=${input.agent}`;
2909
+ }
2910
+ return void 0;
2911
+ }
2912
+
2866
2913
  // src/mcp/server.ts
2867
2914
  var MAX_ORCH_THREADS = 5;
2868
2915
  var CREATE_THREAD_TIMEOUT_MS = 9e4;
@@ -2911,18 +2958,13 @@ async function createOrchChildThread(orch, args, resolveNewThreadOptions) {
2911
2958
  };
2912
2959
  }
2913
2960
  }
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
2961
+ const opts = resolveOrchCreateThreadOptions({
2962
+ requestedAgent: args.agent,
2963
+ requestedModel: args.model,
2964
+ parentAgent: parent?.agent,
2965
+ resolveNewThreadOptions
2925
2966
  });
2967
+ const agentNote = orchCreateThreadAgentNote(opts);
2926
2968
  try {
2927
2969
  const priorIds = new Set(orch.getThreads(false).map((t) => t.id));
2928
2970
  const thread = await withTimeout(
@@ -2958,10 +3000,9 @@ async function createOrchChildThread(orch, args, resolveNewThreadOptions) {
2958
3000
  link: `sideboard://thread/${thread.id}`,
2959
3001
  parentThreadId: thread.parentThreadId,
2960
3002
  ...alreadyStarted ? { alreadyStarted: true } : {},
2961
- ...agentCoercedFrom ? {
2962
- agentCoercedFrom,
2963
- note: `Avoid nested Codex under a Codex orchestrator \u2014 used Account default agent=${thread.agent}`
2964
- } : {},
3003
+ ...opts.coercedFrom ? { agentCoercedFrom: opts.coercedFrom } : {},
3004
+ ...opts.ignoredAgent ? { agentIgnored: opts.ignoredAgent } : {},
3005
+ ...agentNote ? { note: agentNote } : {},
2965
3006
  ...parentCorrectedFrom ? { parentCorrectedFrom, parentNote } : {}
2966
3007
  })
2967
3008
  };
@@ -3321,11 +3362,13 @@ async function startMcpServer() {
3321
3362
  );
3322
3363
  server.tool(
3323
3364
  "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.`,
3365
+ `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
3366
  {
3326
3367
  sourceType: z8.enum(["branch", "pr", "ticket"]),
3327
3368
  sourceRef: z8.string(),
3328
- agent: z8.enum(["claude", "codex", "opencode", "brightsy", "cursor"]).optional().describe(`Omit to use Account default agent (${accountDefaults.agent})`),
3369
+ agent: z8.enum(["claude", "codex", "opencode", "brightsy", "cursor"]).optional().describe(
3370
+ `Usually omit. Sideboard uses Account default agent (${accountDefaults.agent}). Passing your own agent or cursor is ignored.`
3371
+ ),
3329
3372
  model: z8.string().nullable().optional().describe(
3330
3373
  `Usually omit to use Account default model (${accountDefaults.model?.trim() || "Auto"}). Pass null only to force Auto / agent-default.`
3331
3374
  ),
@@ -4032,6 +4075,12 @@ async function startMcpServer() {
4032
4075
 
4033
4076
  // src/mcp/run-stdio.ts
4034
4077
  dropNestedElectronEnvFromProcess();
4078
+ var systemCaBundle = materializeSystemCaBundle();
4079
+ if (systemCaBundle && !process.env.NODE_EXTRA_CA_CERTS?.trim()) {
4080
+ process.env.NODE_EXTRA_CA_CERTS = systemCaBundle;
4081
+ }
4082
+ applySystemCaEnv(process.env);
4083
+ trustSystemCertificates();
4035
4084
  startMcpServer().catch((err) => {
4036
4085
  console.error(err);
4037
4086
  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,
@@ -5,17 +5,17 @@ import {
5
5
  isPidAlive,
6
6
  startOrchestration,
7
7
  waitForPidExit
8
- } from "./chunk-HJPGIETB.js";
8
+ } from "./chunk-JIWRBNSO.js";
9
9
  import "./chunk-DJU54RYW.js";
10
- import "./chunk-CUA4S537.js";
11
- import "./chunk-ZY7K4T37.js";
10
+ import "./chunk-QTJ2ERA6.js";
11
+ import "./chunk-NA7P3SZL.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";
@@ -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-RCICB4OM.js";
11
+ import "./chunk-ZXHV3NHY.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-TNOLCU5B.js";
18
18
  import "./chunk-7O53GXTA.js";
19
19
  import "./chunk-D6JWYJ4P.js";
20
20
  import "./chunk-LZQULFIT.js";
@@ -6,7 +6,7 @@ import {
6
6
  listWorkspaces,
7
7
  removeWorkspace,
8
8
  syncWorkspacesFromThreads
9
- } from "./chunk-VCVBICMZ.js";
9
+ } from "./chunk-TNOLCU5B.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-NA7P3SZL.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.175",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",