@sideboard-ai/core 0.1.325 → 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 (66) hide show
  1. package/dist/{abletime-VL234MCP.js → abletime-RDHYSZL2.js} +4 -4
  2. package/dist/{abletime-M7STTMZT.js → abletime-RYYFGKMU.js} +4 -4
  3. package/dist/{abletime-oauth-LMMGMAPA.js → abletime-oauth-OYGS2DAU.js} +3 -3
  4. package/dist/{abletime-oauth-P4ZFBEAL.js → abletime-oauth-QR2QDVMK.js} +3 -3
  5. package/dist/{abletime-rest-GOI7HELR.js → abletime-rest-BKYKNPTC.js} +3 -3
  6. package/dist/{abletime-rest-DLV7EIWS.js → abletime-rest-QDPTWNS4.js} +3 -3
  7. package/dist/agents/cursor-runner.cjs +1 -1
  8. package/dist/agents/cursor-runner.js +1 -1
  9. package/dist/{agents-LDRM3BTY.js → agents-HANWZNI6.js} +6 -6
  10. package/dist/{agents-MBIEAETM.js → agents-QO7GKBYT.js} +7 -7
  11. package/dist/{app-settings-UQHUNOLV.js → app-settings-RXBH7KY4.js} +1 -1
  12. package/dist/{app-settings-E7DMMEKC.js → app-settings-TUVLZNDE.js} +1 -1
  13. package/dist/{chunk-GNLKBS3U.js → chunk-2EOLWHXH.js} +18 -18
  14. package/dist/{chunk-BOFYI6LC.js → chunk-3Q4XNYHY.js} +1 -1
  15. package/dist/{chunk-WYEST76H.js → chunk-46FECFZU.js} +15 -12
  16. package/dist/{chunk-SK6NYGPD.js → chunk-4H5MWZ6J.js} +2 -2
  17. package/dist/{chunk-EO6ZFLG6.js → chunk-75RPUXJS.js} +1 -1
  18. package/dist/{chunk-2UP3XD2D.js → chunk-B244TJWC.js} +2 -2
  19. package/dist/{chunk-MFMDZAA6.js → chunk-BBNWKL4I.js} +15 -11
  20. package/dist/{chunk-ZEUMWHOH.js → chunk-C7HUCBX7.js} +5 -5
  21. package/dist/{chunk-CI4M54LS.js → chunk-D744HOI5.js} +3 -1
  22. package/dist/{chunk-APKUI4BP.js → chunk-FWVUGLBG.js} +2 -2
  23. package/dist/{chunk-SACHHTBJ.js → chunk-GP3RLZ6A.js} +20 -20
  24. package/dist/{chunk-AQEKPJWU.js → chunk-JM2TGOHP.js} +5 -5
  25. package/dist/{chunk-A76MKMSF.js → chunk-K7M7MIWL.js} +3 -3
  26. package/dist/{chunk-BTF3ATST.js → chunk-KECHK3ZT.js} +1 -1
  27. package/dist/{chunk-H36GKGU2.js → chunk-KXRF6RNL.js} +2 -2
  28. package/dist/{chunk-EZR6W4B3.js → chunk-LRHUBGEM.js} +1 -1
  29. package/dist/{chunk-F65JMKUR.js → chunk-MAW7DIG7.js} +2 -2
  30. package/dist/{chunk-U5WO6MEB.js → chunk-NURZOXGN.js} +1 -1
  31. package/dist/{chunk-NWGINMEA.js → chunk-PB6HW7SA.js} +3 -3
  32. package/dist/{chunk-HG6KS7OT.js → chunk-QG4CYRA3.js} +15 -11
  33. package/dist/{chunk-RZJTGBXY.js → chunk-QPSKQP6E.js} +2 -1
  34. package/dist/{chunk-SS6CYGLF.js → chunk-RZVOX2MT.js} +3 -3
  35. package/dist/{chunk-7LUOLYFM.js → chunk-SO7G6O24.js} +1 -1
  36. package/dist/{chunk-PPTJMBUY.js → chunk-TMCK5TLA.js} +1 -1
  37. package/dist/{chunk-MBT6WDAB.js → chunk-WUCAVIIP.js} +1 -1
  38. package/dist/{chunk-7G27TB4M.js → chunk-XLVLMQKN.js} +11 -7
  39. package/dist/{chunk-ZHDXLDLA.js → chunk-YGVGXQA7.js} +2 -2
  40. package/dist/{chunk-VAFQS4D2.js → chunk-YWQF7WAG.js} +2 -2
  41. package/dist/{chunk-SQQBU7Z6.js → chunk-ZUAYA57W.js} +2 -2
  42. package/dist/{conductor-KB7L7NQN.js → conductor-4GVTHUUB.js} +4 -4
  43. package/dist/{conductor-D4KFZF54.js → conductor-TGWI6ETZ.js} +4 -4
  44. package/dist/{coordinator-prompt-OBXEC63K.js → coordinator-prompt-3E6SIDTM.js} +3 -3
  45. package/dist/{coordinator-prompt-SUO4FRY3.js → coordinator-prompt-WEYJREV6.js} +3 -3
  46. package/dist/{global-workspace-UHU2FXTY.js → global-workspace-FPDZKUPF.js} +3 -3
  47. package/dist/{global-workspace-Z2SURNHA.js → global-workspace-UIEXAG2B.js} +3 -3
  48. package/dist/index.cjs +20 -14
  49. package/dist/index.d.cts +11 -8
  50. package/dist/index.d.ts +11 -8
  51. package/dist/index.js +21 -21
  52. package/dist/{linear-SIHEBU3X.js → linear-6S7MK5YK.js} +2 -2
  53. package/dist/{linear-HFUOUJ5H.js → linear-Z2T4KUAQ.js} +2 -2
  54. package/dist/{linear-list-63I7QUC6.js → linear-list-A37WLUBO.js} +1 -1
  55. package/dist/{linear-list-JFV3EES6.js → linear-list-Q4M7AZO2.js} +1 -1
  56. package/dist/mcp/run-stdio.cjs +15 -8
  57. package/dist/mcp/run-stdio.js +15 -15
  58. package/dist/{optional-cli-U2GUA2X6.js → optional-cli-AANBL4U5.js} +3 -3
  59. package/dist/{optional-cli-ULDP3O5S.js → optional-cli-CA4LL322.js} +4 -4
  60. package/dist/{orchestrator-3H4KNGPN.js → orchestrator-7FVDBE7Y.js} +10 -10
  61. package/dist/{orchestrator-6ROMEWBP.js → orchestrator-RQXRZW7Z.js} +9 -9
  62. package/dist/{workspaces-MG5JHRKW.js → workspaces-LEW4UP56.js} +3 -3
  63. package/dist/{workspaces-QJNKEGEM.js → workspaces-QONNLHNR.js} +3 -3
  64. package/dist/{worktree-KSJPTHGZ.js → worktree-6GIONDQO.js} +2 -2
  65. package/dist/{worktree-MYJYUHZM.js → worktree-KFEJAQ2H.js} +2 -2
  66. package/package.json +1 -1
@@ -17,13 +17,13 @@ import {
17
17
  toAbleTimeIssueInfo,
18
18
  updateAbleTimeTask,
19
19
  verifyAbleTimeConnection
20
- } from "./chunk-NWGINMEA.js";
20
+ } from "./chunk-PB6HW7SA.js";
21
21
  import "./chunk-DBKHL7NC.js";
22
- import "./chunk-H36GKGU2.js";
23
- import "./chunk-ZEUMWHOH.js";
22
+ import "./chunk-KXRF6RNL.js";
23
+ import "./chunk-C7HUCBX7.js";
24
24
  import "./chunk-JAT3JFOS.js";
25
25
  import "./chunk-6K64FJDD.js";
26
- import "./chunk-RZJTGBXY.js";
26
+ import "./chunk-QPSKQP6E.js";
27
27
  import "./chunk-77WWLBCI.js";
28
28
  import "./chunk-4TR3HZFT.js";
29
29
  import "./chunk-WDRMZKVB.js";
@@ -19,13 +19,13 @@ import {
19
19
  toAbleTimeIssueInfo,
20
20
  updateAbleTimeTask,
21
21
  verifyAbleTimeConnection
22
- } from "./chunk-A76MKMSF.js";
23
- import "./chunk-VAFQS4D2.js";
24
- import "./chunk-AQEKPJWU.js";
22
+ } from "./chunk-K7M7MIWL.js";
23
+ import "./chunk-YWQF7WAG.js";
24
+ import "./chunk-JM2TGOHP.js";
25
25
  import "./chunk-F6GE7V3Q.js";
26
26
  import "./chunk-N2WW62LF.js";
27
27
  import "./chunk-2GPQZZLY.js";
28
- import "./chunk-CI4M54LS.js";
28
+ import "./chunk-D744HOI5.js";
29
29
  import "./chunk-NSTQ6QKD.js";
30
30
  import "./chunk-WWUABK6B.js";
31
31
  import "./chunk-FJZWM2ON.js";
@@ -20,10 +20,10 @@ import {
20
20
  parseAbleTimeOAuthCallbackUrl,
21
21
  resolveAbleTimeOAuthHost,
22
22
  startAbleTimeOAuth
23
- } from "./chunk-SS6CYGLF.js";
24
- import "./chunk-ZEUMWHOH.js";
23
+ } from "./chunk-RZVOX2MT.js";
24
+ import "./chunk-C7HUCBX7.js";
25
25
  import "./chunk-JAT3JFOS.js";
26
- import "./chunk-RZJTGBXY.js";
26
+ import "./chunk-QPSKQP6E.js";
27
27
  import "./chunk-77WWLBCI.js";
28
28
  import "./chunk-4TR3HZFT.js";
29
29
  import "./chunk-WDRMZKVB.js";
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  DEFAULT_ABLETIME_HOST,
5
5
  normalizeAbleTimeHost
6
- } from "./chunk-AQEKPJWU.js";
6
+ } from "./chunk-JM2TGOHP.js";
7
7
  import {
8
8
  httpFetch
9
9
  } from "./chunk-2GPQZZLY.js";
@@ -12,7 +12,7 @@ import {
12
12
  getAbleTimeHost,
13
13
  loadAppSettings,
14
14
  saveAbleTimeConnection
15
- } from "./chunk-CI4M54LS.js";
15
+ } from "./chunk-D744HOI5.js";
16
16
  import "./chunk-NSTQ6QKD.js";
17
17
  import "./chunk-WWUABK6B.js";
18
18
  import "./chunk-FJZWM2ON.js";
@@ -288,7 +288,7 @@ async function startAbleTimeOAuth(opts) {
288
288
  persistAbleTimeTokens(data, { host });
289
289
  const token = data.access_token.trim();
290
290
  try {
291
- const { getAbleTimeOrientation } = await import("./abletime-M7STTMZT.js");
291
+ const { getAbleTimeOrientation } = await import("./abletime-RYYFGKMU.js");
292
292
  const orientation = await getAbleTimeOrientation({ token, host });
293
293
  return saveAbleTimeConnection({
294
294
  accessToken: token,
@@ -5,10 +5,10 @@ import {
5
5
  callAbleTimeRestTool,
6
6
  looksLikeAbleTimeUlid,
7
7
  textFromAbleTimeDoc
8
- } from "./chunk-H36GKGU2.js";
9
- import "./chunk-ZEUMWHOH.js";
8
+ } from "./chunk-KXRF6RNL.js";
9
+ import "./chunk-C7HUCBX7.js";
10
10
  import "./chunk-JAT3JFOS.js";
11
- import "./chunk-RZJTGBXY.js";
11
+ import "./chunk-QPSKQP6E.js";
12
12
  import "./chunk-77WWLBCI.js";
13
13
  import "./chunk-4TR3HZFT.js";
14
14
  import "./chunk-WDRMZKVB.js";
@@ -7,10 +7,10 @@ import {
7
7
  callAbleTimeRestTool,
8
8
  looksLikeAbleTimeUlid,
9
9
  textFromAbleTimeDoc
10
- } from "./chunk-VAFQS4D2.js";
11
- import "./chunk-AQEKPJWU.js";
10
+ } from "./chunk-YWQF7WAG.js";
11
+ import "./chunk-JM2TGOHP.js";
12
12
  import "./chunk-2GPQZZLY.js";
13
- import "./chunk-CI4M54LS.js";
13
+ import "./chunk-D744HOI5.js";
14
14
  import "./chunk-NSTQ6QKD.js";
15
15
  import "./chunk-WWUABK6B.js";
16
16
  import "./chunk-FJZWM2ON.js";
@@ -1819,7 +1819,7 @@ function cursorSdkMessageToEvents(msg) {
1819
1819
  }
1820
1820
  if (msg.type === "usage") {
1821
1821
  const usage = usageFromCursor(msg.usage);
1822
- if (usage) return [{ type: "usage", data: usage, scope: "request" }];
1822
+ if (usage) return [{ type: "usage", data: usage, scope: "turn" }];
1823
1823
  }
1824
1824
  if (msg.type === "status" && msg.status === "ERROR") {
1825
1825
  const rawMessage = msg.message;
@@ -20,7 +20,7 @@ import {
20
20
  fetchCursorTurnCostUsd,
21
21
  importCursorSdk,
22
22
  resolveCursorSdkRoot
23
- } from "../chunk-U5WO6MEB.js";
23
+ } from "../chunk-NURZOXGN.js";
24
24
  import {
25
25
  TOOL_RESULT_STORE_MAX_CHARS,
26
26
  createCursorStreamToolProgress,
@@ -46,7 +46,7 @@ import {
46
46
  resolveCursorSdkRoot,
47
47
  resolveQuotaFallbackAgent,
48
48
  turnCostUsdFromCursorUsage
49
- } from "./chunk-HG6KS7OT.js";
49
+ } from "./chunk-QG4CYRA3.js";
50
50
  import "./chunk-5MXLDDYF.js";
51
51
  import {
52
52
  getAgentSetupInfo,
@@ -59,14 +59,14 @@ import {
59
59
  prepareTerminalCommand,
60
60
  resolveLoginCommand,
61
61
  whichOnPath
62
- } from "./chunk-F65JMKUR.js";
63
- import "./chunk-ZHDXLDLA.js";
64
- import "./chunk-EO6ZFLG6.js";
62
+ } from "./chunk-MAW7DIG7.js";
63
+ import "./chunk-YGVGXQA7.js";
64
+ import "./chunk-75RPUXJS.js";
65
65
  import "./chunk-6U6QRUHY.js";
66
66
  import "./chunk-E63AM3PW.js";
67
67
  import "./chunk-N2WW62LF.js";
68
68
  import "./chunk-2GPQZZLY.js";
69
- import "./chunk-MBT6WDAB.js";
69
+ import "./chunk-WUCAVIIP.js";
70
70
  import "./chunk-4YXZOXMT.js";
71
71
  import {
72
72
  conductorBundledBinDir,
@@ -84,7 +84,7 @@ import {
84
84
  assertOrchestratorCapableAgent,
85
85
  coerceOrchestratorAgent,
86
86
  isOrchestratorCapableAgent
87
- } from "./chunk-CI4M54LS.js";
87
+ } from "./chunk-D744HOI5.js";
88
88
  import "./chunk-NSTQ6QKD.js";
89
89
  import "./chunk-WWUABK6B.js";
90
90
  import "./chunk-FJZWM2ON.js";
@@ -37,7 +37,7 @@ import {
37
37
  planModeTurnInstruction,
38
38
  resolveCursorModelId,
39
39
  resolveQuotaFallbackAgent
40
- } from "./chunk-MFMDZAA6.js";
40
+ } from "./chunk-BBNWKL4I.js";
41
41
  import {
42
42
  getAgentSetupInfo,
43
43
  installAgent,
@@ -49,12 +49,12 @@ import {
49
49
  prepareTerminalCommand,
50
50
  resolveLoginCommand,
51
51
  whichOnPath
52
- } from "./chunk-SK6NYGPD.js";
52
+ } from "./chunk-4H5MWZ6J.js";
53
53
  import "./chunk-S5CJUIPY.js";
54
- import "./chunk-PPTJMBUY.js";
54
+ import "./chunk-TMCK5TLA.js";
55
55
  import "./chunk-OOXRMTU6.js";
56
- import "./chunk-APKUI4BP.js";
57
- import "./chunk-BTF3ATST.js";
56
+ import "./chunk-FWVUGLBG.js";
57
+ import "./chunk-KECHK3ZT.js";
58
58
  import "./chunk-ZSHS46V5.js";
59
59
  import "./chunk-QKHEVSB5.js";
60
60
  import "./chunk-RSA47QYR.js";
@@ -68,7 +68,7 @@ import {
68
68
  preferredCursorCostCents,
69
69
  resolveCursorSdkRoot,
70
70
  turnCostUsdFromCursorUsage
71
- } from "./chunk-U5WO6MEB.js";
71
+ } from "./chunk-NURZOXGN.js";
72
72
  import "./chunk-OPXEJJBM.js";
73
73
  import "./chunk-6K64FJDD.js";
74
74
  import "./chunk-LG6RJBIY.js";
@@ -89,7 +89,7 @@ import {
89
89
  assertOrchestratorCapableAgent,
90
90
  coerceOrchestratorAgent,
91
91
  isOrchestratorCapableAgent
92
- } from "./chunk-RZJTGBXY.js";
92
+ } from "./chunk-QPSKQP6E.js";
93
93
  import "./chunk-77WWLBCI.js";
94
94
  import "./chunk-4TR3HZFT.js";
95
95
  import "./chunk-WDRMZKVB.js";
@@ -107,7 +107,7 @@ import {
107
107
  updateProjectProfileSettings,
108
108
  usageOnLimit,
109
109
  writeViewerContext
110
- } from "./chunk-RZJTGBXY.js";
110
+ } from "./chunk-QPSKQP6E.js";
111
111
  import "./chunk-77WWLBCI.js";
112
112
  import "./chunk-4TR3HZFT.js";
113
113
  import "./chunk-WDRMZKVB.js";
@@ -109,7 +109,7 @@ import {
109
109
  updateProjectProfileSettings,
110
110
  usageOnLimit,
111
111
  writeViewerContext
112
- } from "./chunk-CI4M54LS.js";
112
+ } from "./chunk-D744HOI5.js";
113
113
  import "./chunk-NSTQ6QKD.js";
114
114
  import "./chunk-WWUABK6B.js";
115
115
  import "./chunk-FJZWM2ON.js";
@@ -14,7 +14,7 @@ import {
14
14
  parseSessionQuotaResetAt,
15
15
  planModeTurnInstruction,
16
16
  resolveQuotaFallbackAgent
17
- } from "./chunk-HG6KS7OT.js";
17
+ } from "./chunk-QG4CYRA3.js";
18
18
  import {
19
19
  applyWorktreePkgCacheEnv,
20
20
  askBlockStillWaiting,
@@ -52,7 +52,7 @@ import {
52
52
  worktreeDevProcessKey,
53
53
  worktreeRunProcessKey,
54
54
  worktreeSetupProcessKey
55
- } from "./chunk-7G27TB4M.js";
55
+ } from "./chunk-XLVLMQKN.js";
56
56
  import {
57
57
  applyAgentEvent,
58
58
  clipAgentEventForPaint,
@@ -86,7 +86,7 @@ import {
86
86
  import {
87
87
  formatOptionalServicesDirectiveForTurn,
88
88
  formatOptionalServicesReminderForTurn
89
- } from "./chunk-BOFYI6LC.js";
89
+ } from "./chunk-3Q4XNYHY.js";
90
90
  import {
91
91
  extractPresentedPlan,
92
92
  isPresentPlanToolName,
@@ -117,7 +117,7 @@ import {
117
117
  stageAbsolutePathsAsAttachments,
118
118
  stageBuffersAsAttachments,
119
119
  syncWorkspacesFromThreads
120
- } from "./chunk-ZHDXLDLA.js";
120
+ } from "./chunk-YGVGXQA7.js";
121
121
  import {
122
122
  addPrStackLayer,
123
123
  allocateTeamSlug,
@@ -166,7 +166,7 @@ import {
166
166
  resolveRepoRoot,
167
167
  switchWorktreeBranch,
168
168
  withRepoGitLock
169
- } from "./chunk-EO6ZFLG6.js";
169
+ } from "./chunk-75RPUXJS.js";
170
170
  import {
171
171
  issueActivityKind
172
172
  } from "./chunk-OYRN356W.js";
@@ -214,7 +214,7 @@ import {
214
214
  usageOnLimit,
215
215
  withTurnScopedCost,
216
216
  writeViewerContext
217
- } from "./chunk-CI4M54LS.js";
217
+ } from "./chunk-D744HOI5.js";
218
218
  import {
219
219
  writePrivateFile
220
220
  } from "./chunk-NSTQ6QKD.js";
@@ -564,9 +564,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
564
564
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
565
565
  );
566
566
  }
567
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-UHU2FXTY.js");
567
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-FPDZKUPF.js");
568
568
  if (isGlobalThread2(thread)) {
569
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-SUO4FRY3.js");
569
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-WEYJREV6.js");
570
570
  ensureGlobalCoordinatorCwd2(
571
571
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
572
572
  );
@@ -2862,7 +2862,7 @@ async function createThread(input, _onSetupLine) {
2862
2862
  });
2863
2863
  await requireAgent(resolved.agent);
2864
2864
  if (input.cowboy) {
2865
- const { cowboyModeEnabled } = await import("./app-settings-E7DMMEKC.js");
2865
+ const { cowboyModeEnabled } = await import("./app-settings-TUVLZNDE.js");
2866
2866
  if (!cowboyModeEnabled()) {
2867
2867
  throw new Error(
2868
2868
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -2921,7 +2921,7 @@ async function createThread(input, _onSetupLine) {
2921
2921
  let sourceIsFork = false;
2922
2922
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
2923
2923
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
2924
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-M7STTMZT.js");
2924
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-RYYFGKMU.js");
2925
2925
  const task = await ensureAbleTimeTask({
2926
2926
  title: title?.trim() || "Untitled work",
2927
2927
  description: input.prompt?.trim() || void 0
@@ -3803,7 +3803,7 @@ async function adoptThread(input) {
3803
3803
  messages: input.messages ?? []
3804
3804
  });
3805
3805
  writeThread(thread);
3806
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-MG5JHRKW.js");
3806
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-LEW4UP56.js");
3807
3807
  await addWorkspace2(repoPath);
3808
3808
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-P5NJODWP.js");
3809
3809
  await ensureWorktreeSideboardIgnored(input.worktreePath);
@@ -7141,7 +7141,7 @@ function formatScheduledPrompt(name, prompt) {
7141
7141
  ${prompt}`;
7142
7142
  }
7143
7143
  async function defaultDeps() {
7144
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-6ROMEWBP.js");
7144
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-RQXRZW7Z.js");
7145
7145
  const orch = getOrchestrator2();
7146
7146
  return {
7147
7147
  findThread: (id) => findThreadByRef(id),
@@ -7492,7 +7492,7 @@ var Orchestrator = class {
7492
7492
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
7493
7493
  });
7494
7494
  }
7495
- const { autoCleanupOrphansEnabled } = await import("./app-settings-E7DMMEKC.js");
7495
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-TUVLZNDE.js");
7496
7496
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
7497
7497
  await cleanupOrphanWorktrees({ repoPaths });
7498
7498
  }
@@ -7886,7 +7886,7 @@ var Orchestrator = class {
7886
7886
  }
7887
7887
  await setup;
7888
7888
  if (skipSetup) return;
7889
- const { autoRunAfterSetupEnabled } = await import("./app-settings-E7DMMEKC.js");
7889
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-TUVLZNDE.js");
7890
7890
  if (autoRunAfterSetupEnabled()) {
7891
7891
  try {
7892
7892
  await this.startDev(threadId);
@@ -8271,7 +8271,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
8271
8271
  }
8272
8272
  const isBrightsy = fresh.agent === "brightsy";
8273
8273
  const isOrchestration = isOrchestratorThread(fresh);
8274
- const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-E7DMMEKC.js");
8274
+ const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-TUVLZNDE.js");
8275
8275
  const gitAuthMode = getGithubGitAuthMode();
8276
8276
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
8277
8277
  githubSlug: turnOrigin?.forge === "github" ? turnOrigin.slug : await withTimeout(resolveGithubRepoSlug(fresh.worktreePath), 8e3, "resolveGithubRepoSlug").catch(() => null),
@@ -9611,7 +9611,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
9611
9611
  if (Object.keys(patch).length === 0) continue;
9612
9612
  updateThread(t.id, patch);
9613
9613
  }
9614
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-E7DMMEKC.js");
9614
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-TUVLZNDE.js");
9615
9615
  const latest = this.requireThread(thread.id);
9616
9616
  if (!shouldAutoArchiveOnPrMerge({
9617
9617
  previousPrState: prevState || null,
@@ -9935,7 +9935,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
9935
9935
  await runArchiveScript(thread.repoPath, thread.worktreePath);
9936
9936
  } catch {
9937
9937
  }
9938
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-E7DMMEKC.js");
9938
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-TUVLZNDE.js");
9939
9939
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
9940
9940
  await removeWorktree(thread.repoPath, thread.worktreePath, {
9941
9941
  deleteBranch: deleteBranch ? thread.branchName : void 0
@@ -10073,7 +10073,7 @@ async function startOrchestration(opts) {
10073
10073
  sourceRef: "default",
10074
10074
  ...createOpts
10075
10075
  }).catch(async () => {
10076
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-MYJYUHZM.js");
10076
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-KFEJAQ2H.js");
10077
10077
  const repo = await resolveRepoRoot2(repoPath);
10078
10078
  const def = await resolveDefaultBranch2(repo);
10079
10079
  return orch.createThread({
@@ -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-U2GUA2X6.js");
128
+ const { optionalCliPresence } = await import("./optional-cli-AANBL4U5.js");
129
129
  return await optionalCliPresence(ids);
130
130
  } catch {
131
131
  return void 0;
@@ -8,11 +8,11 @@ import {
8
8
  isGlobalThread,
9
9
  isOrchestratorThread,
10
10
  isSlackCoordinatorThread
11
- } from "./chunk-APKUI4BP.js";
11
+ } from "./chunk-FWVUGLBG.js";
12
12
  import {
13
13
  mergeAgentGitAuthEnv,
14
14
  resolveAgentGitAuthEnv
15
- } from "./chunk-BTF3ATST.js";
15
+ } from "./chunk-KECHK3ZT.js";
16
16
  import {
17
17
  REVIEW_TAB_TITLE,
18
18
  allocateTeamName,
@@ -44,7 +44,7 @@ import {
44
44
  import {
45
45
  assertOrchestratorCapableAgent,
46
46
  contextTokens
47
- } from "./chunk-RZJTGBXY.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-KB7L7NQN.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-RZJTGBXY.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-UQHUNOLV.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) {
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  getGithubGitAuthMode,
22
22
  getGithubPat
23
- } from "./chunk-CI4M54LS.js";
23
+ } from "./chunk-D744HOI5.js";
24
24
  import {
25
25
  allocateTeamName,
26
26
  listThreads,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  loadAppSettings,
6
6
  saveAppSettings
7
- } from "./chunk-RZJTGBXY.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-ULDP3O5S.js");
276
+ const { optionalCliPresence } = await import("./optional-cli-CA4LL322.js");
277
277
  return await optionalCliPresence(ids);
278
278
  } catch {
279
279
  return void 0;
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-S5CJUIPY.js";
7
7
  import {
8
8
  listAssignedLinearIssues
9
- } from "./chunk-PPTJMBUY.js";
9
+ } from "./chunk-TMCK5TLA.js";
10
10
  import {
11
11
  looksLikeConversationSummary,
12
12
  looksLikeSkillBody,
@@ -15,13 +15,13 @@ import {
15
15
  } from "./chunk-OOXRMTU6.js";
16
16
  import {
17
17
  isOrchestratorThread
18
- } from "./chunk-APKUI4BP.js";
18
+ } from "./chunk-FWVUGLBG.js";
19
19
  import {
20
20
  codexUnattendedGitConfigArgs,
21
21
  mergeAgentGitAuthEnv,
22
22
  resolveAgentGitAuthEnv,
23
23
  resolveCodexGitWritableRoots
24
- } from "./chunk-BTF3ATST.js";
24
+ } from "./chunk-KECHK3ZT.js";
25
25
  import {
26
26
  loadBrightsyConfig
27
27
  } from "./chunk-RSA47QYR.js";
@@ -48,7 +48,7 @@ import {
48
48
  packagedMcpStdioPath,
49
49
  parseCursorRunnerLine,
50
50
  resolveNodeLaunch
51
- } from "./chunk-U5WO6MEB.js";
51
+ } from "./chunk-NURZOXGN.js";
52
52
  import {
53
53
  extractJsonErrorMessage,
54
54
  formatUnknownDetail,
@@ -77,9 +77,10 @@ import {
77
77
  isLinearConnected,
78
78
  isPosthogConnected,
79
79
  loadAppSettings,
80
+ requestOccupancy,
80
81
  resolveAgentExecutable,
81
82
  resolveClaudeExecutable
82
- } from "./chunk-RZJTGBXY.js";
83
+ } from "./chunk-QPSKQP6E.js";
83
84
  import {
84
85
  isElectronLikeCommand,
85
86
  unwrapStrippedElectronLaunch
@@ -2658,7 +2659,7 @@ var claudeAdapter = {
2658
2659
  );
2659
2660
  }
2660
2661
  const mode = permissionMode(thread);
2661
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-Z2SURNHA.js");
2662
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-UIEXAG2B.js");
2662
2663
  const isOrchestrator = isOrchestratorThread2(thread);
2663
2664
  const rpc = worktreeAgentRpc(isOrchestrator);
2664
2665
  const injectedServers = await buildInjectedMcpServers({
@@ -2885,7 +2886,7 @@ var claudeAdapter = {
2885
2886
  return { file: claude, args, cwd: thread.worktreePath };
2886
2887
  },
2887
2888
  async listLinearIssues(_repoPath) {
2888
- const { listAssignedLinearIssues: listAssignedLinearIssues2 } = await import("./linear-list-63I7QUC6.js");
2889
+ const { listAssignedLinearIssues: listAssignedLinearIssues2 } = await import("./linear-list-A37WLUBO.js");
2889
2890
  return listAssignedLinearIssues2();
2890
2891
  }
2891
2892
  };
@@ -2970,13 +2971,16 @@ async function listCodexModels() {
2970
2971
  return cachedCodexModels?.models ?? FALLBACK_CODEX_MODELS;
2971
2972
  }
2972
2973
  }
2973
- function usageFromCodex(usage) {
2974
+ function usageFromCodex(usage, asContext = false) {
2974
2975
  if (!usage) return null;
2975
- return fromInclusiveInputUsage({
2976
+ const mapped = fromInclusiveInputUsage({
2976
2977
  inputTokens: Number(usage.input_tokens ?? 0),
2977
2978
  outputTokens: Number(usage.output_tokens ?? 0),
2978
2979
  cachedInputTokens: Number(usage.cached_input_tokens ?? 0)
2979
2980
  });
2981
+ if (!mapped || !asContext) return mapped;
2982
+ const occ = requestOccupancy(mapped);
2983
+ return occ > 0 ? { ...mapped, lastRequestTokens: occ } : mapped;
2980
2984
  }
2981
2985
  function codexHomeDir() {
2982
2986
  return process.env.CODEX_HOME?.trim() || join7(homedir6(), ".codex");
@@ -3242,7 +3246,7 @@ var codexAdapter = {
3242
3246
  }
3243
3247
  if (type === "turn.completed" || type === "turn_completed") {
3244
3248
  const payload = obj;
3245
- const usage = usageFromCodex(payload.last_token_usage ?? payload.usage);
3249
+ const usage = payload.last_token_usage ? usageFromCodex(payload.last_token_usage, true) : usageFromCodex(payload.usage);
3246
3250
  return usage ? { type: "usage", data: usage, scope: "turn" } : null;
3247
3251
  }
3248
3252
  if (typeof obj.content === "string" && obj.content.trim()) {
@@ -3973,7 +3977,7 @@ var opencodeAdapter = {
3973
3977
  };
3974
3978
  },
3975
3979
  async listLinearIssues(_repoPath) {
3976
- const { listAssignedLinearIssues: listAssignedLinearIssues2 } = await import("./linear-list-63I7QUC6.js");
3980
+ const { listAssignedLinearIssues: listAssignedLinearIssues2 } = await import("./linear-list-A37WLUBO.js");
3977
3981
  return listAssignedLinearIssues2();
3978
3982
  }
3979
3983
  };
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getAbleTimeHost,
6
6
  isAbleTimeConnected
7
- } from "./chunk-RZJTGBXY.js";
7
+ } from "./chunk-QPSKQP6E.js";
8
8
 
9
9
  // src/integrations/abletime-mcp.ts
10
10
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -153,7 +153,7 @@ function textsFromUnknown(value) {
153
153
  return "";
154
154
  }
155
155
  async function abletimeMcpRequest(method, params, opts) {
156
- const rawToken = opts?.token ?? await import("./abletime-oauth-LMMGMAPA.js").then((m) => m.ensureAbleTimeAccessToken());
156
+ const rawToken = opts?.token ?? await import("./abletime-oauth-OYGS2DAU.js").then((m) => m.ensureAbleTimeAccessToken());
157
157
  if (!rawToken?.trim()) {
158
158
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
159
159
  }
@@ -224,9 +224,9 @@ async function callAbleTimeTool(name, args = {}, opts) {
224
224
  if (!opts?.token && !isAbleTimeConnected()) {
225
225
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
226
226
  }
227
- const rawToken = opts?.token ?? await import("./abletime-oauth-LMMGMAPA.js").then((m) => m.ensureAbleTimeAccessToken());
227
+ const rawToken = opts?.token ?? await import("./abletime-oauth-OYGS2DAU.js").then((m) => m.ensureAbleTimeAccessToken());
228
228
  if (rawToken && ableTimeUsesRest(rawToken)) {
229
- const { callAbleTimeRestTool } = await import("./abletime-rest-GOI7HELR.js");
229
+ const { callAbleTimeRestTool } = await import("./abletime-rest-BKYKNPTC.js");
230
230
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
231
231
  }
232
232
  const requestOpts = { ...opts, pm: opts?.pm ?? abletimeToolUsesPm(name) };
@@ -242,7 +242,7 @@ async function callAbleTimeTool(name, args = {}, opts) {
242
242
  return await call();
243
243
  }
244
244
  if (rawToken && ableTimeUsesRest(rawToken) && isAbleTimeRejectedCredential(message)) {
245
- const { callAbleTimeRestTool } = await import("./abletime-rest-GOI7HELR.js");
245
+ const { callAbleTimeRestTool } = await import("./abletime-rest-BKYKNPTC.js");
246
246
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
247
247
  }
248
248
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;