@sideboard-ai/core 0.1.324 → 0.1.326

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 (83) hide show
  1. package/dist/{abletime-CU2UPMJF.js → abletime-RDHYSZL2.js} +5 -4
  2. package/dist/{abletime-5ZY3ZUUO.js → abletime-RYYFGKMU.js} +6 -5
  3. package/dist/{abletime-oauth-7EOSBEFM.js → abletime-oauth-OYGS2DAU.js} +3 -3
  4. package/dist/{abletime-oauth-4TTCR3CT.js → abletime-oauth-QR2QDVMK.js} +3 -3
  5. package/dist/{abletime-rest-KOKE7V4B.js → abletime-rest-BKYKNPTC.js} +3 -3
  6. package/dist/{abletime-rest-3TG4G7LW.js → abletime-rest-QDPTWNS4.js} +3 -3
  7. package/dist/agents/claude-runner.cjs +59 -22
  8. package/dist/agents/claude-runner.js +39 -16
  9. package/dist/agents/cursor-runner.cjs +97 -32
  10. package/dist/agents/cursor-runner.js +74 -24
  11. package/dist/{agents-YK65UDLT.js → agents-HANWZNI6.js} +9 -8
  12. package/dist/{agents-LUSTCMDN.js → agents-QO7GKBYT.js} +12 -11
  13. package/dist/{app-settings-XIF4EC4K.js → app-settings-RXBH7KY4.js} +1 -1
  14. package/dist/{app-settings-I5HM5RMP.js → app-settings-TUVLZNDE.js} +1 -1
  15. package/dist/{chunk-7MQSYPAY.js → chunk-2EOLWHXH.js} +206 -188
  16. package/dist/{chunk-QOS4465Y.js → chunk-3Q4XNYHY.js} +1 -1
  17. package/dist/{chunk-RR4WCGNB.js → chunk-46FECFZU.js} +18 -15
  18. package/dist/{chunk-5GDJSFCT.js → chunk-4H5MWZ6J.js} +2 -2
  19. package/dist/{chunk-EQ52JR3Q.js → chunk-5MXLDDYF.js} +1 -1
  20. package/dist/{chunk-NCHOTN3C.js → chunk-5YCKATG6.js} +4 -3
  21. package/dist/{chunk-ROOZDDFA.js → chunk-75RPUXJS.js} +7 -8
  22. package/dist/{chunk-INBUV7HY.js → chunk-B244TJWC.js} +2 -2
  23. package/dist/{chunk-JH5SMVM5.js → chunk-BBNWKL4I.js} +268 -235
  24. package/dist/{chunk-ODH3XHMI.js → chunk-C7HUCBX7.js} +5 -5
  25. package/dist/{chunk-OIHRC2ZJ.js → chunk-D744HOI5.js} +25 -3
  26. package/dist/chunk-DBKHL7NC.js +214 -0
  27. package/dist/chunk-F6GE7V3Q.js +216 -0
  28. package/dist/{chunk-JE3JLHMO.js → chunk-FWVUGLBG.js} +3 -3
  29. package/dist/{chunk-DF5BM5OY.js → chunk-GP3RLZ6A.js} +207 -186
  30. package/dist/{chunk-FR3SAYUL.js → chunk-JM2TGOHP.js} +5 -5
  31. package/dist/{chunk-Y3WREIPQ.js → chunk-K7M7MIWL.js} +12 -210
  32. package/dist/{chunk-FUFNMUNR.js → chunk-KECHK3ZT.js} +7 -8
  33. package/dist/{chunk-EKU7FQVG.js → chunk-KXRF6RNL.js} +2 -2
  34. package/dist/chunk-LRHUBGEM.js +1259 -0
  35. package/dist/{chunk-MZIZTSR2.js → chunk-MAW7DIG7.js} +2 -2
  36. package/dist/{chunk-ZHGMRBSC.js → chunk-NURZOXGN.js} +4 -4
  37. package/dist/{chunk-QIC2JXHW.js → chunk-OOXRMTU6.js} +1 -1
  38. package/dist/{chunk-5XNT6BCG.js → chunk-OPXEJJBM.js} +1 -1
  39. package/dist/chunk-OYRN356W.js +80 -0
  40. package/dist/{chunk-7PVT73H6.js → chunk-PB6HW7SA.js} +12 -210
  41. package/dist/{chunk-B4CDSSRN.js → chunk-Q3FHTGIW.js} +2 -0
  42. package/dist/{chunk-7D5QIU3N.js → chunk-QG4CYRA3.js} +301 -268
  43. package/dist/{chunk-EJ66LEKH.js → chunk-QPSKQP6E.js} +24 -3
  44. package/dist/{chunk-Q3YJZPQI.js → chunk-RZVOX2MT.js} +3 -3
  45. package/dist/chunk-SO7G6O24.js +1445 -0
  46. package/dist/{chunk-YDUHLWI5.js → chunk-SUZOPJZC.js} +21 -7
  47. package/dist/chunk-TMCK5TLA.js +25 -0
  48. package/dist/chunk-W3ZLE4PO.js +77 -0
  49. package/dist/chunk-WUCAVIIP.js +28 -0
  50. package/dist/{chunk-BYUCNIXK.js → chunk-XLVLMQKN.js} +13 -9
  51. package/dist/{chunk-ZIRQZUZY.js → chunk-YGVGXQA7.js} +3 -3
  52. package/dist/{chunk-NXUN4U5P.js → chunk-YWQF7WAG.js} +2 -2
  53. package/dist/{chunk-IFWGG2M2.js → chunk-ZSHS46V5.js} +2 -0
  54. package/dist/{chunk-74OPNF7U.js → chunk-ZUAYA57W.js} +2 -2
  55. package/dist/{conductor-SPZOTC7W.js → conductor-4GVTHUUB.js} +7 -7
  56. package/dist/{conductor-JFABMXDA.js → conductor-TGWI6ETZ.js} +6 -6
  57. package/dist/{coordinator-prompt-K66RGNWK.js → coordinator-prompt-3E6SIDTM.js} +4 -4
  58. package/dist/{coordinator-prompt-Z6UFHFDH.js → coordinator-prompt-WEYJREV6.js} +4 -4
  59. package/dist/{cursor-recover-TEBFKAZ4.js → cursor-recover-7F46PAJ5.js} +1 -1
  60. package/dist/{cursor-recover-OWPQUHFH.js → cursor-recover-BDIAZIE3.js} +1 -1
  61. package/dist/{global-workspace-A6UO6PJV.js → global-workspace-FPDZKUPF.js} +4 -4
  62. package/dist/{global-workspace-RHEO55B4.js → global-workspace-UIEXAG2B.js} +4 -4
  63. package/dist/index.cjs +21094 -20840
  64. package/dist/index.d.cts +36 -17
  65. package/dist/index.d.ts +36 -17
  66. package/dist/index.js +343 -1678
  67. package/dist/linear-6S7MK5YK.js +69 -0
  68. package/dist/linear-Z2T4KUAQ.js +67 -0
  69. package/dist/linear-list-A37WLUBO.js +6 -0
  70. package/dist/linear-list-Q4M7AZO2.js +8 -0
  71. package/dist/mcp/run-stdio.cjs +15903 -15640
  72. package/dist/mcp/run-stdio.js +67 -1247
  73. package/dist/{optional-cli-RMMS5L6F.js → optional-cli-AANBL4U5.js} +3 -3
  74. package/dist/{optional-cli-Y3Z3GIPZ.js → optional-cli-CA4LL322.js} +4 -4
  75. package/dist/{orchestrator-7VTAUY24.js → orchestrator-7FVDBE7Y.js} +15 -13
  76. package/dist/{orchestrator-2O6OJQLX.js → orchestrator-RQXRZW7Z.js} +14 -12
  77. package/dist/{thread-store-3F7GR64A.js → thread-store-4ZN3DS2W.js} +1 -1
  78. package/dist/{thread-store-JRSL4HQY.js → thread-store-IC4BQXDW.js} +1 -1
  79. package/dist/{workspaces-NRKEXOYR.js → workspaces-LEW4UP56.js} +4 -4
  80. package/dist/{workspaces-42E6AGXD.js → workspaces-QONNLHNR.js} +4 -4
  81. package/dist/{worktree-ZDA2UJ7C.js → worktree-6GIONDQO.js} +3 -3
  82. package/dist/{worktree-4NGXCCUO.js → worktree-KFEJAQ2H.js} +3 -3
  83. package/package.json +1 -1
@@ -125,7 +125,7 @@ async function connectedCliPresence(integrations) {
125
125
  const ids = connectedOptionalServices(integrations).filter((spec) => spec.cli).map((spec) => spec.id);
126
126
  if (ids.length === 0) return void 0;
127
127
  try {
128
- const { optionalCliPresence } = await import("./optional-cli-RMMS5L6F.js");
128
+ const { optionalCliPresence } = await import("./optional-cli-AANBL4U5.js");
129
129
  return await optionalCliPresence(ids);
130
130
  } catch {
131
131
  return void 0;
@@ -2,17 +2,17 @@ import {
2
2
  compactSummaryPart,
3
3
  isInternalAgentStatusText,
4
4
  lastAssistantMessageText
5
- } from "./chunk-QIC2JXHW.js";
5
+ } from "./chunk-OOXRMTU6.js";
6
6
  import {
7
7
  isCloudCoordinatorThread,
8
8
  isGlobalThread,
9
9
  isOrchestratorThread,
10
10
  isSlackCoordinatorThread
11
- } from "./chunk-JE3JLHMO.js";
11
+ } from "./chunk-FWVUGLBG.js";
12
12
  import {
13
13
  mergeAgentGitAuthEnv,
14
14
  resolveAgentGitAuthEnv
15
- } from "./chunk-FUFNMUNR.js";
15
+ } from "./chunk-KECHK3ZT.js";
16
16
  import {
17
17
  REVIEW_TAB_TITLE,
18
18
  allocateTeamName,
@@ -24,13 +24,13 @@ import {
24
24
  updateThread,
25
25
  worktreeNameFromPath,
26
26
  writeThread
27
- } from "./chunk-IFWGG2M2.js";
27
+ } from "./chunk-ZSHS46V5.js";
28
28
  import {
29
29
  ensureWorktreeSideboardIgnored
30
30
  } from "./chunk-QKHEVSB5.js";
31
31
  import {
32
32
  clipToolResultForStore
33
- } from "./chunk-5XNT6BCG.js";
33
+ } from "./chunk-OPXEJJBM.js";
34
34
  import {
35
35
  ATTACHMENTS_DIR,
36
36
  DETACHED_JOBS_DIR,
@@ -44,7 +44,7 @@ import {
44
44
  import {
45
45
  assertOrchestratorCapableAgent,
46
46
  contextTokens
47
- } from "./chunk-EJ66LEKH.js";
47
+ } from "./chunk-QPSKQP6E.js";
48
48
  import {
49
49
  stripNestedElectronEnv
50
50
  } from "./chunk-4TR3HZFT.js";
@@ -161,13 +161,12 @@ function estimateOccupancyTokens(messages) {
161
161
  function threadHasCompactedContext(messages) {
162
162
  return messages.some((m) => m.role === "summary");
163
163
  }
164
- function forwardOccupancyTokens(messages, usage, windowTokens = 1e6) {
164
+ function forwardOccupancyTokens(messages, usage, windowTokens = 1e6, opts) {
165
165
  const estimated = estimateOccupancyTokens(messages);
166
+ if (opts?.trustProviderOccupancy === false) return estimated;
166
167
  if (threadHasCompactedContext(messages) && estimated > 0) return estimated;
167
- if (usage) {
168
- const last = contextTokens(usage);
169
- if (last > 0 && last <= windowTokens) return last;
170
- }
168
+ const explicit = usage?.lastRequestTokens;
169
+ if (explicit != null && explicit > 0 && explicit <= windowTokens) return explicit;
171
170
  return estimated;
172
171
  }
173
172
  function forwardContextUsage(usage, messages) {
@@ -553,11 +552,15 @@ function applyCompaction(messages, summaryText, thresholds = {}) {
553
552
  return [summary, ...recent];
554
553
  }
555
554
  function lastRequestOccupancy(thread) {
555
+ if (thread.agent === "cursor") return estimateOccupancyTokens(thread.messages);
556
556
  for (let i = thread.messages.length - 1; i >= 0; i--) {
557
557
  const usage = thread.messages[i]?.usage;
558
- if (usage) return contextTokens(usage);
558
+ if (!usage) continue;
559
+ const n = usage.lastRequestTokens;
560
+ if (n != null && n > 0) return n;
561
+ if (thread.agent === "codex") return estimateOccupancyTokens(thread.messages);
559
562
  }
560
- return 0;
563
+ return thread.agent === "codex" ? estimateOccupancyTokens(thread.messages) : 0;
561
564
  }
562
565
  function shouldResetSessionForOccupancy(thread, occupancyTokens = SESSION_RESET_OCCUPANCY_TOKENS) {
563
566
  return lastRequestOccupancy(thread) >= occupancyTokens;
@@ -576,7 +579,7 @@ async function maybeCompactContext(thread, thresholds = {}, summarize = summariz
576
579
  });
577
580
  let messages = applyCompaction(thread.messages, summary, thresholds);
578
581
  const compactedMessages = appendCompactedMessages(thread.compactedMessages, older);
579
- const resetSession = shouldResetSessionForOccupancy({ messages: thread.messages });
582
+ const resetSession = shouldResetSessionForOccupancy(thread);
580
583
  if (resetSession) {
581
584
  messages = applyForwardOccupancy(messages);
582
585
  }
@@ -1808,7 +1811,7 @@ var PORT_RANGE_SIZE = 10;
1808
1811
  var RECLAIM_RETRY_DELAY_MS = 40;
1809
1812
  var RECLAIM_TRIES = 8;
1810
1813
  async function killReclaimable(ports, worktreePath, signal) {
1811
- const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-SPZOTC7W.js");
1814
+ const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-4GVTHUUB.js");
1812
1815
  if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
1813
1816
  else killListenersOnPorts2(ports);
1814
1817
  }
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-2TUE6JKQ.js";
8
8
  import {
9
9
  resolveAgentExecutable
10
- } from "./chunk-EJ66LEKH.js";
10
+ } from "./chunk-QPSKQP6E.js";
11
11
 
12
12
  // src/agents/install.ts
13
13
  import { existsSync } from "fs";
@@ -265,7 +265,7 @@ async function loginAgent(agent) {
265
265
  };
266
266
  }
267
267
  async function loginManagedAccount(accountId) {
268
- const { loadAppSettings } = await import("./app-settings-XIF4EC4K.js");
268
+ const { loadAppSettings } = await import("./app-settings-RXBH7KY4.js");
269
269
  const { loginEnvPrefix } = await import("./managed-accounts-JJTAKHMG.js");
270
270
  const account = loadAppSettings().accounts.accounts.find((a) => a.id === accountId);
271
271
  if (!account) {
@@ -55,7 +55,7 @@ function extractJsonErrorMessage(obj) {
55
55
  const candidates = [
56
56
  typeof obj.message === "string" ? obj.message : null,
57
57
  typeof obj.error === "string" ? obj.error : null,
58
- nested && typeof nested.message === "string" ? nested.message : null,
58
+ nested && typeof nested.message === "string" ? nested.message : typeof nested?.data?.message === "string" ? nested.data.message : null,
59
59
  typeof obj.result === "string" ? obj.result : null,
60
60
  typeof obj.detail === "string" ? obj.detail : null
61
61
  ];
@@ -4,7 +4,7 @@ import {
4
4
  formatUnknownDetail,
5
5
  looksLikeCursorStreamCutOff,
6
6
  looksLikeHugeToolResultDump
7
- } from "./chunk-5XNT6BCG.js";
7
+ } from "./chunk-OPXEJJBM.js";
8
8
  import {
9
9
  CLI_DIR
10
10
  } from "./chunk-6K64FJDD.js";
@@ -14,7 +14,7 @@ import {
14
14
  WAIT_FOR_TURN_DESCRIPTION,
15
15
  WAIT_FOR_TURN_SCHEMA,
16
16
  createPilotRpcExecutors
17
- } from "./chunk-YDUHLWI5.js";
17
+ } from "./chunk-SUZOPJZC.js";
18
18
 
19
19
  // src/agents/tool-result-clip.ts
20
20
  import { mkdirSync, writeFileSync } from "fs";
@@ -121,13 +121,14 @@ function guardCursorCustomTool(tool, opts) {
121
121
  };
122
122
  }
123
123
  var NON_RECOVERABLE_RUN_ERROR = /invalid (?:user )?api key|not logged in|not authenticated|unauthorized|credit balance|out of credits|insufficient.?quota|usage limit|you've hit your|too many requests|rate.?limit/;
124
+ var RECOVERABLE_RUN_ERROR = /premature close|tool execution failed|stream (?:idle|cut ?off|closed)|custom tool|result too (?:large|long)|max(?:imum)? (?:tool )?result/;
124
125
  function shouldReturnRunErrorToAgent(detail) {
125
126
  const text = detail.trim();
126
127
  if (!text) return false;
127
128
  if (looksLikeHugeToolResultDump(text) || looksLikeCursorStreamCutOff(text)) return true;
128
129
  const head = text.slice(0, 2e3).toLowerCase();
129
130
  if (NON_RECOVERABLE_RUN_ERROR.test(head)) return false;
130
- return true;
131
+ return RECOVERABLE_RUN_ERROR.test(head);
131
132
  }
132
133
  function cursorRunErrorRecoveryPrompt(detail) {
133
134
  const summary = looksLikeHugeToolResultDump(detail) ? HUGE_TOOL_RESULT_SUMMARY : detail.replace(/\s+/g, " ").trim().slice(0, 400);
@@ -20,14 +20,14 @@ import {
20
20
  import {
21
21
  getGithubGitAuthMode,
22
22
  getGithubPat
23
- } from "./chunk-OIHRC2ZJ.js";
23
+ } from "./chunk-D744HOI5.js";
24
24
  import {
25
25
  allocateTeamName,
26
26
  listThreads,
27
27
  normalizeTakenSlug,
28
28
  normalizeWorktreePath,
29
29
  takenSlugsFromThread
30
- } from "./chunk-B4CDSSRN.js";
30
+ } from "./chunk-Q3FHTGIW.js";
31
31
  import {
32
32
  worktreesRoot
33
33
  } from "./chunk-WOU343SI.js";
@@ -282,12 +282,11 @@ function codexSandboxWritableRootsArgs(roots) {
282
282
  return ["-c", `sandbox_workspace_write.writable_roots=${JSON.stringify(abs)}`];
283
283
  }
284
284
  function codexUnattendedGitConfigArgs(sandbox, opts) {
285
- const args = [
286
- "-c",
287
- 'shell_environment_policy.inherit="all"',
288
- "-c",
289
- "shell_environment_policy.ignore_default_excludes=true"
290
- ];
285
+ const args = ["-c", 'shell_environment_policy.inherit="all"'];
286
+ for (const [key, value] of Object.entries(opts?.preserveEnv ?? {})) {
287
+ if (!/^GIT_CONFIG_KEY_\d+$/.test(key) || !value) continue;
288
+ args.push("-c", `shell_environment_policy.set.${key}=${JSON.stringify(value)}`);
289
+ }
291
290
  if (sandbox === "workspace-write") {
292
291
  args.push("-c", "sandbox_workspace_write.network_access=true");
293
292
  args.push(...codexSandboxWritableRootsArgs(opts?.writableRoots ?? []));
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  loadAppSettings,
6
6
  saveAppSettings
7
- } from "./chunk-EJ66LEKH.js";
7
+ } from "./chunk-QPSKQP6E.js";
8
8
 
9
9
  // src/integrations/optional-services.ts
10
10
  var OPTIONAL_SERVICE_IDS = ["vercel", "supabase", "posthog", "sentry"];
@@ -273,7 +273,7 @@ async function connectedCliPresence(integrations) {
273
273
  const ids = connectedOptionalServices(integrations).filter((spec) => spec.cli).map((spec) => spec.id);
274
274
  if (ids.length === 0) return void 0;
275
275
  try {
276
- const { optionalCliPresence } = await import("./optional-cli-Y3Z3GIPZ.js");
276
+ const { optionalCliPresence } = await import("./optional-cli-CA4LL322.js");
277
277
  return await optionalCliPresence(ids);
278
278
  } catch {
279
279
  return void 0;