@sideboard-ai/core 0.1.205 → 0.1.207

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 (50) hide show
  1. package/dist/{abletime-TONBQP4O.js → abletime-I4IYZBKU.js} +4 -4
  2. package/dist/{abletime-S3UHQZVW.js → abletime-UWSSLXH3.js} +4 -4
  3. package/dist/{abletime-oauth-SD4SZY5U.js → abletime-oauth-C3BQXKW3.js} +5 -3
  4. package/dist/{abletime-oauth-AVCEO2DY.js → abletime-oauth-UZHPB3W2.js} +14 -4
  5. package/dist/{abletime-rest-J2OBB4VA.js → abletime-rest-5YPPEOKK.js} +3 -3
  6. package/dist/{abletime-rest-6ODSXV7G.js → abletime-rest-HYNYDYK3.js} +3 -3
  7. package/dist/agents/cursor-runner.js +1 -1
  8. package/dist/{agents-67K4BQFJ.js → agents-7MULGRPU.js} +5 -5
  9. package/dist/{agents-BVOJNHV6.js → agents-KCBCFMFW.js} +6 -6
  10. package/dist/{app-settings-YEPF46IJ.js → app-settings-GJ6KDYEF.js} +1 -1
  11. package/dist/{app-settings-LGHMNHSP.js → app-settings-R2KNCT37.js} +1 -1
  12. package/dist/{chunk-FO45DMJ5.js → chunk-2GPZ4BAU.js} +81 -34
  13. package/dist/{chunk-X743YN5Y.js → chunk-4EGK47WV.js} +1 -0
  14. package/dist/{chunk-ULZLWQBS.js → chunk-5UQTT4S7.js} +79 -32
  15. package/dist/{chunk-6Q7DFVDQ.js → chunk-6J4OQ6TF.js} +14 -4
  16. package/dist/{chunk-WVATAIF4.js → chunk-6KH4OBEW.js} +2 -2
  17. package/dist/{chunk-FO2NTJ7L.js → chunk-6YZLSZLK.js} +3 -3
  18. package/dist/{chunk-YOSTWSNC.js → chunk-A2BRWIEM.js} +18 -11
  19. package/dist/{chunk-DFUES6QU.js → chunk-ARR4OGLY.js} +1 -0
  20. package/dist/{chunk-INNLWYXW.js → chunk-DWGEBZ3C.js} +1 -0
  21. package/dist/{chunk-CYLDJWRK.js → chunk-F4LZUEIO.js} +37 -7
  22. package/dist/{chunk-KZ7PI7FE.js → chunk-JZHRZ3DR.js} +6 -1
  23. package/dist/{chunk-QUW5D62C.js → chunk-N4A4NWFO.js} +2 -2
  24. package/dist/{chunk-VIPA75ZA.js → chunk-PAQPT3JO.js} +3 -3
  25. package/dist/{chunk-5SMS6QTO.js → chunk-QOJB5PC7.js} +3 -3
  26. package/dist/{chunk-3K257PCS.js → chunk-TEDEVD4O.js} +37 -7
  27. package/dist/{chunk-QAVWH2RQ.js → chunk-W6X4GZJG.js} +3 -3
  28. package/dist/{chunk-SGUVAK66.js → chunk-WXWJ5MJ4.js} +5 -5
  29. package/dist/{chunk-W6VM36YO.js → chunk-X45BV4VX.js} +5 -5
  30. package/dist/{chunk-QFBBUFD4.js → chunk-Y4CF7LHH.js} +1 -0
  31. package/dist/{chunk-WF33LOP4.js → chunk-ZU7R35NY.js} +23 -11
  32. package/dist/{coordinator-prompt-WEPXXLLX.js → coordinator-prompt-6A3D7BV3.js} +4 -4
  33. package/dist/{coordinator-prompt-NPT555BO.js → coordinator-prompt-6NV2IHEX.js} +4 -4
  34. package/dist/{global-workspace-2I2T7FL5.js → global-workspace-I2X6UQMX.js} +4 -4
  35. package/dist/{global-workspace-NSILADOM.js → global-workspace-VS6HZF2I.js} +4 -4
  36. package/dist/index.cjs +125 -24
  37. package/dist/index.d.cts +16 -3
  38. package/dist/index.d.ts +16 -3
  39. package/dist/index.js +15 -13
  40. package/dist/mcp/run-stdio.cjs +123 -24
  41. package/dist/mcp/run-stdio.js +11 -11
  42. package/dist/{orchestrator-I7GFXLHF.js → orchestrator-7WF32ZXJ.js} +6 -6
  43. package/dist/{orchestrator-CMAVNELS.js → orchestrator-CXQY5YRG.js} +7 -7
  44. package/dist/{thread-store-ZGVWPVHP.js → thread-store-LS2T6RVH.js} +1 -1
  45. package/dist/{thread-store-2SS5V5CN.js → thread-store-XGYWXR2P.js} +1 -1
  46. package/dist/{workspaces-BOC6M7BW.js → workspaces-7PM7UGLG.js} +4 -4
  47. package/dist/{workspaces-RFGZBUAR.js → workspaces-CEU25ANO.js} +4 -4
  48. package/dist/{worktree-G3ZLM4DC.js → worktree-T6PCOIHZ.js} +3 -3
  49. package/dist/{worktree-WSUQMMK4.js → worktree-YD7Y6NRY.js} +3 -3
  50. package/package.json +1 -1
@@ -15,11 +15,11 @@ import {
15
15
  toAbleTimeIssueInfo,
16
16
  updateAbleTimeTask,
17
17
  verifyAbleTimeConnection
18
- } from "./chunk-QAVWH2RQ.js";
19
- import "./chunk-CYLDJWRK.js";
20
- import "./chunk-W6VM36YO.js";
18
+ } from "./chunk-W6X4GZJG.js";
19
+ import "./chunk-F4LZUEIO.js";
20
+ import "./chunk-X45BV4VX.js";
21
21
  import "./chunk-N7WZ6NIN.js";
22
- import "./chunk-QFBBUFD4.js";
22
+ import "./chunk-Y4CF7LHH.js";
23
23
  import "./chunk-4TR3HZFT.js";
24
24
  import "./chunk-WDRMZKVB.js";
25
25
  import "./chunk-JT7R45JB.js";
@@ -17,11 +17,11 @@ import {
17
17
  toAbleTimeIssueInfo,
18
18
  updateAbleTimeTask,
19
19
  verifyAbleTimeConnection
20
- } from "./chunk-FO2NTJ7L.js";
21
- import "./chunk-3K257PCS.js";
22
- import "./chunk-SGUVAK66.js";
20
+ } from "./chunk-6YZLSZLK.js";
21
+ import "./chunk-TEDEVD4O.js";
22
+ import "./chunk-WXWJ5MJ4.js";
23
23
  import "./chunk-VKQGAWHY.js";
24
- import "./chunk-X743YN5Y.js";
24
+ import "./chunk-4EGK47WV.js";
25
25
  import "./chunk-NSTQ6QKD.js";
26
26
  import "./chunk-KGZBYWZ3.js";
27
27
  import "./chunk-EQNRWDLN.js";
@@ -18,11 +18,12 @@ import {
18
18
  hasBakedAbleTimeOAuth,
19
19
  isAbleTimeOAuthCancelled,
20
20
  parseAbleTimeOAuthCallbackUrl,
21
+ resolveAbleTimeOAuthHost,
21
22
  startAbleTimeOAuth
22
- } from "./chunk-6Q7DFVDQ.js";
23
- import "./chunk-W6VM36YO.js";
23
+ } from "./chunk-6J4OQ6TF.js";
24
+ import "./chunk-X45BV4VX.js";
24
25
  import "./chunk-N7WZ6NIN.js";
25
- import "./chunk-QFBBUFD4.js";
26
+ import "./chunk-Y4CF7LHH.js";
26
27
  import "./chunk-4TR3HZFT.js";
27
28
  import "./chunk-WDRMZKVB.js";
28
29
  import "./chunk-JT7R45JB.js";
@@ -48,5 +49,6 @@ export {
48
49
  hasBakedAbleTimeOAuth,
49
50
  isAbleTimeOAuthCancelled,
50
51
  parseAbleTimeOAuthCallbackUrl,
52
+ resolveAbleTimeOAuthHost,
51
53
  startAbleTimeOAuth
52
54
  };
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  DEFAULT_ABLETIME_HOST,
5
5
  normalizeAbleTimeHost
6
- } from "./chunk-SGUVAK66.js";
6
+ } from "./chunk-WXWJ5MJ4.js";
7
7
  import {
8
8
  httpFetch
9
9
  } from "./chunk-VKQGAWHY.js";
@@ -12,7 +12,7 @@ import {
12
12
  getAbleTimeHost,
13
13
  loadAppSettings,
14
14
  saveAbleTimeConnection
15
- } from "./chunk-X743YN5Y.js";
15
+ } from "./chunk-4EGK47WV.js";
16
16
  import "./chunk-NSTQ6QKD.js";
17
17
  import "./chunk-KGZBYWZ3.js";
18
18
  import "./chunk-EQNRWDLN.js";
@@ -78,6 +78,12 @@ function ableTimeOAuthClientId() {
78
78
  function ableTimeOAuthResource(host) {
79
79
  return `${normalizeAbleTimeHost(host)}/api/public/v2/mcp`;
80
80
  }
81
+ function resolveAbleTimeOAuthHost(requested, saved) {
82
+ const fromRequest = requested?.trim();
83
+ if (fromRequest) return fromRequest;
84
+ const fromSaved = saved?.trim();
85
+ return fromSaved || void 0;
86
+ }
81
87
  function createAbleTimePkce() {
82
88
  const verifier = randomBytes(32).toString("base64url");
83
89
  const challenge = createHash("sha256").update(verifier).digest("base64url");
@@ -189,7 +195,10 @@ async function startAbleTimeOAuth(opts) {
189
195
  `AbleTime browser sign-in needs a Client ID Metadata Document URL. Host ${BAKED_ABLETIME_OAUTH_CLIENT_ID} (see site/oauth/abletime-client.json), or set SIDEBOARD_ABLETIME_OAUTH_CLIENT_ID.`
190
196
  );
191
197
  }
192
- const host = opts?.host?.trim() || void 0;
198
+ const host = resolveAbleTimeOAuthHost(
199
+ opts?.host,
200
+ loadAppSettings().integrations.abletimeHost
201
+ );
193
202
  const state = randomBytes(16).toString("hex");
194
203
  const pkce = createAbleTimePkce();
195
204
  const authorizeUrl = ableTimeOAuthAuthorizeUrl(clientId, state, pkce.challenge, host);
@@ -277,7 +286,7 @@ async function startAbleTimeOAuth(opts) {
277
286
  persistAbleTimeTokens(data, { host });
278
287
  const token = data.access_token.trim();
279
288
  try {
280
- const { getAbleTimeOrientation } = await import("./abletime-S3UHQZVW.js");
289
+ const { getAbleTimeOrientation } = await import("./abletime-UWSSLXH3.js");
281
290
  const orientation = await getAbleTimeOrientation({ token, host });
282
291
  return saveAbleTimeConnection({
283
292
  accessToken: token,
@@ -310,5 +319,6 @@ export {
310
319
  hasBakedAbleTimeOAuth,
311
320
  isAbleTimeOAuthCancelled,
312
321
  parseAbleTimeOAuthCallbackUrl,
322
+ resolveAbleTimeOAuthHost,
313
323
  startAbleTimeOAuth
314
324
  };
@@ -5,10 +5,10 @@ import {
5
5
  callAbleTimeRestTool,
6
6
  looksLikeAbleTimeUlid,
7
7
  textFromAbleTimeDoc
8
- } from "./chunk-CYLDJWRK.js";
9
- import "./chunk-W6VM36YO.js";
8
+ } from "./chunk-F4LZUEIO.js";
9
+ import "./chunk-X45BV4VX.js";
10
10
  import "./chunk-N7WZ6NIN.js";
11
- import "./chunk-QFBBUFD4.js";
11
+ import "./chunk-Y4CF7LHH.js";
12
12
  import "./chunk-4TR3HZFT.js";
13
13
  import "./chunk-WDRMZKVB.js";
14
14
  import "./chunk-JT7R45JB.js";
@@ -7,10 +7,10 @@ import {
7
7
  callAbleTimeRestTool,
8
8
  looksLikeAbleTimeUlid,
9
9
  textFromAbleTimeDoc
10
- } from "./chunk-3K257PCS.js";
11
- import "./chunk-SGUVAK66.js";
10
+ } from "./chunk-TEDEVD4O.js";
11
+ import "./chunk-WXWJ5MJ4.js";
12
12
  import "./chunk-VKQGAWHY.js";
13
- import "./chunk-X743YN5Y.js";
13
+ import "./chunk-4EGK47WV.js";
14
14
  import "./chunk-NSTQ6QKD.js";
15
15
  import "./chunk-KGZBYWZ3.js";
16
16
  import "./chunk-EQNRWDLN.js";
@@ -13,7 +13,7 @@ import {
13
13
  fetchCursorTurnCostUsd,
14
14
  formatUnknownDetail,
15
15
  looksLikeCursorHttp2StreamClose
16
- } from "../chunk-KZ7PI7FE.js";
16
+ } from "../chunk-JZHRZ3DR.js";
17
17
  import {
18
18
  dropNestedElectronEnvFromProcess
19
19
  } from "../chunk-4TR3HZFT.js";
@@ -50,14 +50,14 @@ import {
50
50
  resolveQuotaFallbackAgent,
51
51
  turnCostUsdFromCursorUsage,
52
52
  whichOnPath
53
- } from "./chunk-WF33LOP4.js";
54
- import "./chunk-5SMS6QTO.js";
53
+ } from "./chunk-ZU7R35NY.js";
54
+ import "./chunk-QOJB5PC7.js";
55
55
  import "./chunk-3OHR73VK.js";
56
56
  import "./chunk-Y4MIXGPA.js";
57
57
  import "./chunk-VKQGAWHY.js";
58
- import "./chunk-QUW5D62C.js";
58
+ import "./chunk-N4A4NWFO.js";
59
59
  import "./chunk-D6JWYJ4P.js";
60
- import "./chunk-INNLWYXW.js";
60
+ import "./chunk-DWGEBZ3C.js";
61
61
  import "./chunk-SYFVUF2C.js";
62
62
  import {
63
63
  conductorBundledBinDir,
@@ -73,7 +73,7 @@ import {
73
73
  assertOrchestratorCapableAgent,
74
74
  coerceOrchestratorAgent,
75
75
  isOrchestratorCapableAgent
76
- } from "./chunk-X743YN5Y.js";
76
+ } from "./chunk-4EGK47WV.js";
77
77
  import "./chunk-NSTQ6QKD.js";
78
78
  import "./chunk-KGZBYWZ3.js";
79
79
  import "./chunk-EQNRWDLN.js";
@@ -44,9 +44,9 @@ import {
44
44
  resolveLoginCommand,
45
45
  resolveQuotaFallbackAgent,
46
46
  whichOnPath
47
- } from "./chunk-YOSTWSNC.js";
48
- import "./chunk-VIPA75ZA.js";
49
- import "./chunk-WVATAIF4.js";
47
+ } from "./chunk-A2BRWIEM.js";
48
+ import "./chunk-PAQPT3JO.js";
49
+ import "./chunk-6KH4OBEW.js";
50
50
  import "./chunk-6K64FJDD.js";
51
51
  import "./chunk-QQKDGPUI.js";
52
52
  import "./chunk-SALM35KD.js";
@@ -57,17 +57,17 @@ import {
57
57
  parseCursorRunnerLine,
58
58
  preferredCursorCostCents,
59
59
  turnCostUsdFromCursorUsage
60
- } from "./chunk-KZ7PI7FE.js";
60
+ } from "./chunk-JZHRZ3DR.js";
61
61
  import {
62
62
  ORCHESTRATOR_AGENT_KINDS,
63
63
  assertOrchestratorCapableAgent,
64
64
  coerceOrchestratorAgent,
65
65
  isOrchestratorCapableAgent
66
- } from "./chunk-QFBBUFD4.js";
66
+ } from "./chunk-Y4CF7LHH.js";
67
67
  import "./chunk-4TR3HZFT.js";
68
68
  import "./chunk-WDRMZKVB.js";
69
69
  import "./chunk-JT7R45JB.js";
70
- import "./chunk-DFUES6QU.js";
70
+ import "./chunk-ARR4OGLY.js";
71
71
  import "./chunk-77WWLBCI.js";
72
72
  import "./chunk-WFUDY6PC.js";
73
73
  import {
@@ -89,7 +89,7 @@ import {
89
89
  updateProjectProfileSettings,
90
90
  usageOnLimit,
91
91
  writeViewerContext
92
- } from "./chunk-QFBBUFD4.js";
92
+ } from "./chunk-Y4CF7LHH.js";
93
93
  import "./chunk-4TR3HZFT.js";
94
94
  import "./chunk-WDRMZKVB.js";
95
95
  import "./chunk-JT7R45JB.js";
@@ -91,7 +91,7 @@ import {
91
91
  updateProjectProfileSettings,
92
92
  usageOnLimit,
93
93
  writeViewerContext
94
- } from "./chunk-X743YN5Y.js";
94
+ } from "./chunk-4EGK47WV.js";
95
95
  import "./chunk-NSTQ6QKD.js";
96
96
  import "./chunk-KGZBYWZ3.js";
97
97
  import "./chunk-EQNRWDLN.js";
@@ -26,7 +26,7 @@ import {
26
26
  stripBrightsyNdjsonNoise,
27
27
  sumUsageList,
28
28
  toolDescription
29
- } from "./chunk-YOSTWSNC.js";
29
+ } from "./chunk-A2BRWIEM.js";
30
30
  import {
31
31
  SLACK_REPLY_FORMATTING,
32
32
  addWorkspace,
@@ -49,7 +49,7 @@ import {
49
49
  stageAbsolutePathsAsAttachments,
50
50
  stageBuffersAsAttachments,
51
51
  syncWorkspacesFromThreads
52
- } from "./chunk-VIPA75ZA.js";
52
+ } from "./chunk-PAQPT3JO.js";
53
53
  import {
54
54
  addPrStackLayer,
55
55
  allocateTeamName,
@@ -99,7 +99,7 @@ import {
99
99
  worktreeDisplayLabelForGroup,
100
100
  worktreeNameFromPath,
101
101
  worktreeSlugForTicket
102
- } from "./chunk-WVATAIF4.js";
102
+ } from "./chunk-6KH4OBEW.js";
103
103
  import {
104
104
  ATTACHMENTS_DIR,
105
105
  DETACHED_JOBS_DIR,
@@ -127,10 +127,11 @@ import {
127
127
  packagedMcpDir,
128
128
  pushTurnStderr,
129
129
  shouldFeedErrorBackToAgent,
130
+ shouldRetryCodexPluginIsolate,
130
131
  shouldRetryFailedAgentTurn,
131
132
  summarizeTurnStderr,
132
133
  turnFailChatText
133
- } from "./chunk-KZ7PI7FE.js";
134
+ } from "./chunk-JZHRZ3DR.js";
134
135
  import {
135
136
  assertOrchestratorCapableAgent,
136
137
  childEnvWithAppSettings,
@@ -155,7 +156,7 @@ import {
155
156
  updateAdvancedSettings,
156
157
  usageOnLimit,
157
158
  writeSecureJson
158
- } from "./chunk-QFBBUFD4.js";
159
+ } from "./chunk-Y4CF7LHH.js";
159
160
  import {
160
161
  stripNestedElectronEnv
161
162
  } from "./chunk-4TR3HZFT.js";
@@ -180,7 +181,7 @@ import {
180
181
  updateThread,
181
182
  withThreadLock,
182
183
  writeThread
183
- } from "./chunk-DFUES6QU.js";
184
+ } from "./chunk-ARR4OGLY.js";
184
185
  import {
185
186
  appDataDir,
186
187
  findConventionSetup,
@@ -474,7 +475,7 @@ async function continueSourceThread(threadId, prompt) {
474
475
  await continueOnReply(threadId, prompt);
475
476
  return;
476
477
  }
477
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-CMAVNELS.js");
478
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-CXQY5YRG.js");
478
479
  await getOrchestrator2().send(threadId, prompt);
479
480
  } catch {
480
481
  }
@@ -808,9 +809,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
808
809
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
809
810
  );
810
811
  }
811
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-NSILADOM.js");
812
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-VS6HZF2I.js");
812
813
  if (isGlobalThread2(thread)) {
813
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-WEPXXLLX.js");
814
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-6A3D7BV3.js");
814
815
  ensureGlobalCoordinatorCwd2(
815
816
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
816
817
  );
@@ -1018,6 +1019,24 @@ var FIX_CI_RE = /^Fix CI: .+\.$/;
1018
1019
  function normalizePrState(state) {
1019
1020
  return (state ?? "").trim().toUpperCase();
1020
1021
  }
1022
+ function samePrIdentity(a, b) {
1023
+ const left = (a ?? "").trim().replace(/\/+$/, "");
1024
+ const right = (b ?? "").trim().replace(/\/+$/, "");
1025
+ if (!left || !right) return false;
1026
+ if (left === right) return true;
1027
+ const ln = left.match(/\/pull\/(\d+)/i)?.[1];
1028
+ const rn = right.match(/\/pull\/(\d+)/i)?.[1];
1029
+ return Boolean(ln && rn && ln === rn);
1030
+ }
1031
+ function shouldPersistFetchedPrMeta(opts) {
1032
+ const meta = opts.metaUrl?.trim() || "";
1033
+ if (!meta) return false;
1034
+ const head = opts.headPrUrl?.trim() || "";
1035
+ if (head) return samePrIdentity(meta, head);
1036
+ const live = opts.livePrUrl?.trim() || "";
1037
+ if (live) return samePrIdentity(meta, live);
1038
+ return true;
1039
+ }
1021
1040
  function sameLoginList(a, b) {
1022
1041
  const left = [...a ?? []].map((s) => s.trim().toLowerCase()).filter(Boolean).sort();
1023
1042
  const right = [...b ?? []].map((s) => s.trim().toLowerCase()).filter(Boolean).sort();
@@ -3788,7 +3807,7 @@ async function createThread(input, _onSetupLine) {
3788
3807
  });
3789
3808
  await requireAgent(resolved.agent);
3790
3809
  if (input.cowboy) {
3791
- const { cowboyModeEnabled } = await import("./app-settings-YEPF46IJ.js");
3810
+ const { cowboyModeEnabled } = await import("./app-settings-GJ6KDYEF.js");
3792
3811
  if (!cowboyModeEnabled()) {
3793
3812
  throw new Error(
3794
3813
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -3846,7 +3865,7 @@ async function createThread(input, _onSetupLine) {
3846
3865
  let sourceIsFork = false;
3847
3866
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
3848
3867
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
3849
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-TONBQP4O.js");
3868
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-I4IYZBKU.js");
3850
3869
  const task = await ensureAbleTimeTask({
3851
3870
  title: title?.trim() || "Untitled work",
3852
3871
  description: input.prompt?.trim() || void 0
@@ -3948,7 +3967,7 @@ async function createThread(input, _onSetupLine) {
3948
3967
  return readThread(thread.id) ?? thread;
3949
3968
  }
3950
3969
  async function listLinearIssues(agent, repoPath) {
3951
- const { getAdapter: getAdapter2 } = await import("./agents-BVOJNHV6.js");
3970
+ const { getAdapter: getAdapter2 } = await import("./agents-KCBCFMFW.js");
3952
3971
  await requireAgent(agent, { requireLinear: true });
3953
3972
  const adapter = getAdapter2(agent);
3954
3973
  if (!adapter.listLinearIssues) {
@@ -4394,7 +4413,7 @@ async function adoptThread(input) {
4394
4413
  messages: input.messages ?? []
4395
4414
  });
4396
4415
  writeThread(thread);
4397
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-BOC6M7BW.js");
4416
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-7PM7UGLG.js");
4398
4417
  await ensureWorkspace2(repoPath);
4399
4418
  const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-X54WSOXM.js");
4400
4419
  await ensureWorktreeSideboardIgnored2(input.worktreePath);
@@ -6978,7 +6997,7 @@ function formatScheduledPrompt(name, prompt) {
6978
6997
  ${prompt}`;
6979
6998
  }
6980
6999
  async function defaultDeps() {
6981
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-CMAVNELS.js");
7000
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-CXQY5YRG.js");
6982
7001
  const orch = getOrchestrator2();
6983
7002
  return {
6984
7003
  findThread: (id) => findThreadByRef(id),
@@ -7248,7 +7267,7 @@ var Orchestrator = class {
7248
7267
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
7249
7268
  });
7250
7269
  }
7251
- const { autoCleanupOrphansEnabled } = await import("./app-settings-YEPF46IJ.js");
7270
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-GJ6KDYEF.js");
7252
7271
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
7253
7272
  await cleanupOrphanWorktrees({ repoPaths });
7254
7273
  }
@@ -7540,7 +7559,7 @@ var Orchestrator = class {
7540
7559
  }
7541
7560
  await setup;
7542
7561
  if (skipSetup) return;
7543
- const { autoRunAfterSetupEnabled } = await import("./app-settings-YEPF46IJ.js");
7562
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-GJ6KDYEF.js");
7544
7563
  if (autoRunAfterSetupEnabled()) {
7545
7564
  try {
7546
7565
  await this.startDev(threadId);
@@ -7864,7 +7883,7 @@ var Orchestrator = class {
7864
7883
  }
7865
7884
  const isBrightsy = fresh.agent === "brightsy";
7866
7885
  const isOrchestration = isOrchestratorThread(fresh);
7867
- const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-YEPF46IJ.js");
7886
+ const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-GJ6KDYEF.js");
7868
7887
  const gitAuthMode = getGithubGitAuthMode();
7869
7888
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
7870
7889
  githubSlug: await resolveGithubRepoSlug(fresh.worktreePath).catch(
@@ -7948,7 +7967,12 @@ var Orchestrator = class {
7948
7967
  const stderrTail = [];
7949
7968
  const handle = await spawnAgentTurn(
7950
7969
  fresh,
7951
- { cachedPrefix, prompt: agentPrompt, systemPrompt: turnReminders },
7970
+ {
7971
+ cachedPrefix,
7972
+ prompt: agentPrompt,
7973
+ systemPrompt: turnReminders,
7974
+ isolateCodexPlugins: fresh.isolateCodexPlugins === true
7975
+ },
7952
7976
  (event) => {
7953
7977
  this.emit({ type: "turn_output", threadId, event });
7954
7978
  noteTurnLiveEvent(threadId, event);
@@ -8022,10 +8046,21 @@ var Orchestrator = class {
8022
8046
  }
8023
8047
  let lastStderr = summarizeTurnStderr(stderrTail);
8024
8048
  let detail = lastStderr || (exitCode !== 0 ? fallbackTurnFailDetail(assistantText) : "");
8025
- if (exitCode !== 0 && !assistantText && parts.length === 0 && !this.stoppedTurns.has(threadId) && shouldRetryFailedAgentTurn(detail, {
8049
+ const liveThread = this.requireThread(threadId);
8050
+ const isolateCodexPluginRetry = liveThread.agent === "codex" && shouldRetryCodexPluginIsolate(detail, {
8051
+ // Coordinators already pass toCodexUnattendedAppsArgs — a second
8052
+ // isolate exec keeps sessionId and burns the crash/OOM retry.
8053
+ alreadyIsolated: liveThread.isolateCodexPlugins === true || isOrchestratorThread(liveThread)
8054
+ });
8055
+ if (isolateCodexPluginRetry) {
8056
+ updateThread(threadId, { isolateCodexPlugins: true });
8057
+ }
8058
+ if (exitCode !== 0 && !assistantText && parts.length === 0 && !this.stoppedTurns.has(threadId) && (isolateCodexPluginRetry || shouldRetryFailedAgentTurn(detail, {
8026
8059
  hasSession: Boolean(this.requireThread(threadId).sessionId)
8027
- })) {
8028
- updateThread(threadId, { sessionId: null });
8060
+ }))) {
8061
+ if (!isolateCodexPluginRetry) {
8062
+ updateThread(threadId, { sessionId: null });
8063
+ }
8029
8064
  try {
8030
8065
  const gitDirs = await resolveGitDirsForLockRecovery(thread.worktreePath);
8031
8066
  const clearedLocks = clearStaleIndexLocks(gitDirs, 2e3);
@@ -8034,7 +8069,7 @@ var Orchestrator = class {
8034
8069
  }
8035
8070
  } catch {
8036
8071
  }
8037
- const retryNote = looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
8072
+ const retryNote = isolateCodexPluginRetry ? "Codex plugin/MCP failed \u2014 continuing without that vendor plugin (Settings \u2192 Connectors + HTTP API)" : looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
8038
8073
  pushTurnStderr(stderrTail, retryNote);
8039
8074
  this.emit({
8040
8075
  type: "turn_output",
@@ -8058,7 +8093,12 @@ var Orchestrator = class {
8058
8093
  ].filter(Boolean).join("\n\n---\n\n");
8059
8094
  const retryHandle = await spawnAgentTurn(
8060
8095
  retryThread,
8061
- { cachedPrefix: retryPrefix, prompt: agentPrompt, systemPrompt: turnReminders },
8096
+ {
8097
+ cachedPrefix: retryPrefix,
8098
+ prompt: agentPrompt,
8099
+ systemPrompt: turnReminders,
8100
+ isolateCodexPlugins: isolateCodexPluginRetry || retryThread.isolateCodexPlugins === true
8101
+ },
8062
8102
  (event) => {
8063
8103
  this.emit({ type: "turn_output", threadId, event });
8064
8104
  if (event.type === "session_id") {
@@ -8813,7 +8853,7 @@ var Orchestrator = class {
8813
8853
  } catch {
8814
8854
  headUrl = null;
8815
8855
  }
8816
- return { thread, selectors: connectedPrSelectors(thread, headUrl), cwd };
8856
+ return { thread, selectors: connectedPrSelectors(thread, headUrl), cwd, headUrl };
8817
8857
  }
8818
8858
  async getPrChecks(threadRef) {
8819
8859
  const { selectors, cwd } = await this.withPrSelector(threadRef);
@@ -8824,13 +8864,20 @@ var Orchestrator = class {
8824
8864
  return null;
8825
8865
  }
8826
8866
  async getPrMeta(threadRef) {
8827
- const { thread, selectors, cwd } = await this.withPrSelector(threadRef);
8867
+ const { thread, selectors, cwd, headUrl } = await this.withPrSelector(threadRef);
8828
8868
  for (const selector of selectors) {
8829
8869
  const meta = await getPrMeta(cwd, selector);
8830
- if (meta) {
8831
- await this.persistPrMetaAndMaybeArchive(thread, meta);
8832
- return meta;
8870
+ if (!meta) continue;
8871
+ const live = this.requireThread(thread.id);
8872
+ if (!shouldPersistFetchedPrMeta({
8873
+ metaUrl: meta.url,
8874
+ livePrUrl: live.prUrl,
8875
+ headPrUrl: headUrl
8876
+ })) {
8877
+ continue;
8833
8878
  }
8879
+ await this.persistPrMetaAndMaybeArchive(live, meta);
8880
+ return meta;
8834
8881
  }
8835
8882
  return null;
8836
8883
  }
@@ -8852,7 +8899,7 @@ var Orchestrator = class {
8852
8899
  if (!titled.userSetTitle && meta.title && titled.title !== meta.title) {
8853
8900
  updateThread(thread.id, { title: meta.title });
8854
8901
  }
8855
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-YEPF46IJ.js");
8902
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-GJ6KDYEF.js");
8856
8903
  const latest = this.requireThread(thread.id);
8857
8904
  if (!shouldAutoArchiveOnPrMerge({
8858
8905
  previousPrState: prevState || null,
@@ -9129,7 +9176,7 @@ var Orchestrator = class {
9129
9176
  this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
9130
9177
  if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
9131
9178
  try {
9132
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-BOC6M7BW.js");
9179
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-7PM7UGLG.js");
9133
9180
  await ensureWorkspace2(thread.repoPath);
9134
9181
  } catch {
9135
9182
  }
@@ -9156,7 +9203,7 @@ var Orchestrator = class {
9156
9203
  await runArchiveScript(thread.repoPath, thread.worktreePath);
9157
9204
  } catch {
9158
9205
  }
9159
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-YEPF46IJ.js");
9206
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-GJ6KDYEF.js");
9160
9207
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
9161
9208
  await removeWorktree(thread.repoPath, thread.worktreePath, {
9162
9209
  deleteBranch: deleteBranch ? thread.branchName : void 0
@@ -9183,7 +9230,7 @@ var Orchestrator = class {
9183
9230
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
9184
9231
  );
9185
9232
  }
9186
- const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-G3ZLM4DC.js");
9233
+ const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-T6PCOIHZ.js");
9187
9234
  const slug = thread.worktreePath.split("/").pop();
9188
9235
  const dest = thread.worktreePath;
9189
9236
  await withRepoGitLock(thread.repoPath, async () => {
@@ -9293,7 +9340,7 @@ async function startOrchestration(opts) {
9293
9340
  sourceRef: "default",
9294
9341
  ...createOpts
9295
9342
  }).catch(async () => {
9296
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-G3ZLM4DC.js");
9343
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-T6PCOIHZ.js");
9297
9344
  const repo = await resolveRepoRoot2(repoPath);
9298
9345
  const def = await resolveDefaultBranch2(repo);
9299
9346
  return orch.createThread({
@@ -9303,7 +9350,7 @@ async function startOrchestration(opts) {
9303
9350
  repoPath: repo
9304
9351
  });
9305
9352
  });
9306
- const { updateThread: upd } = await import("./thread-store-2SS5V5CN.js");
9353
+ const { updateThread: upd } = await import("./thread-store-XGYWXR2P.js");
9307
9354
  const updated = upd(thread.id, {
9308
9355
  sourceType: "orchestration",
9309
9356
  sourceRef: goal
@@ -1605,6 +1605,7 @@ function disconnectAbleTimeConnection() {
1605
1605
  delete integrations.abletimeRefreshToken;
1606
1606
  delete integrations.abletimeTokenExpiresAt;
1607
1607
  delete integrations.abletimeViewerName;
1608
+ delete integrations.abletimeHost;
1608
1609
  return saveAppSettings({ ...current, integrations });
1609
1610
  }
1610
1611
  function getIssueSource(settings = loadAppSettings()) {