@sideboard-ai/core 0.1.145 → 0.1.147

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 (31) hide show
  1. package/dist/{agents-4WOO4WN4.js → agents-N3KMRQUZ.js} +4 -4
  2. package/dist/{agents-VFBNZHI4.js → agents-YVETHB2R.js} +4 -4
  3. package/dist/{chunk-TTJ6EYZC.js → chunk-4RYRNJPN.js} +3 -3
  4. package/dist/{chunk-2C5RE7K4.js → chunk-67K3FRKR.js} +1 -1
  5. package/dist/{chunk-G3KLNP2B.js → chunk-IHSR7EVK.js} +2 -2
  6. package/dist/{chunk-3UD2LW4P.js → chunk-JHZ6HGRI.js} +2 -2
  7. package/dist/{chunk-QS5JJ2IM.js → chunk-JTPDWTWJ.js} +117 -34
  8. package/dist/{chunk-LWRNRMYY.js → chunk-JW436RTA.js} +2 -2
  9. package/dist/{chunk-XUYIJY6D.js → chunk-KNE3FZ46.js} +2 -2
  10. package/dist/{chunk-335KQKWX.js → chunk-KZG47SZP.js} +18 -14
  11. package/dist/{chunk-DN7UA3UT.js → chunk-SXPTL222.js} +1 -1
  12. package/dist/{chunk-UJWGZM4K.js → chunk-WWH4NNBH.js} +3 -3
  13. package/dist/{chunk-JSYIBLBK.js → chunk-YP3CSOZ6.js} +117 -34
  14. package/dist/{chunk-3EMJ5LVV.js → chunk-ZZBN2MR7.js} +18 -14
  15. package/dist/{coordinator-prompt-JSX22ULD.js → coordinator-prompt-2EOR35TP.js} +2 -2
  16. package/dist/{coordinator-prompt-J2WBXGLP.js → coordinator-prompt-6EPVHVGJ.js} +2 -2
  17. package/dist/{global-workspace-6WR7OGMI.js → global-workspace-EZVQPMWT.js} +3 -3
  18. package/dist/{global-workspace-AQESFS7I.js → global-workspace-PANZGRUS.js} +3 -3
  19. package/dist/index.cjs +226 -34
  20. package/dist/index.d.cts +61 -2
  21. package/dist/index.d.ts +61 -2
  22. package/dist/index.js +109 -6
  23. package/dist/mcp/run-stdio.cjs +119 -34
  24. package/dist/mcp/run-stdio.js +6 -6
  25. package/dist/{orchestrator-XPGJV7JK.js → orchestrator-KWV2PPML.js} +6 -6
  26. package/dist/{orchestrator-WWQBBIPP.js → orchestrator-T35BJZWY.js} +6 -6
  27. package/dist/{workspaces-V3RNE5ZX.js → workspaces-DWERPUQJ.js} +4 -4
  28. package/dist/{workspaces-WALT3MJB.js → workspaces-ZJATBC4A.js} +4 -4
  29. package/dist/{worktree-3NLPMA7K.js → worktree-RZRJNHYL.js} +7 -1
  30. package/dist/{worktree-TUZX7F7P.js → worktree-UCWWTVLS.js} +7 -1
  31. package/package.json +1 -1
@@ -36,7 +36,7 @@ import {
36
36
  resolveQuotaFallbackAgent,
37
37
  turnCostUsdFromCursorUsage,
38
38
  whichOnPath
39
- } from "./chunk-TTJ6EYZC.js";
39
+ } from "./chunk-4RYRNJPN.js";
40
40
  import "./chunk-ED4UPEJX.js";
41
41
  import "./chunk-S42XV45P.js";
42
42
  import "./chunk-6GN5WPYZ.js";
@@ -45,9 +45,9 @@ import {
45
45
  assertOrchestratorCapableAgent,
46
46
  coerceOrchestratorAgent,
47
47
  isOrchestratorCapableAgent
48
- } from "./chunk-XUYIJY6D.js";
49
- import "./chunk-2C5RE7K4.js";
50
- import "./chunk-QS5JJ2IM.js";
48
+ } from "./chunk-KNE3FZ46.js";
49
+ import "./chunk-67K3FRKR.js";
50
+ import "./chunk-JTPDWTWJ.js";
51
51
  import "./chunk-B3SJXYIJ.js";
52
52
  import "./chunk-EUXOHTUK.js";
53
53
  import {
@@ -30,7 +30,7 @@ import {
30
30
  resolveLoginCommand,
31
31
  resolveQuotaFallbackAgent,
32
32
  whichOnPath
33
- } from "./chunk-UJWGZM4K.js";
33
+ } from "./chunk-WWH4NNBH.js";
34
34
  import "./chunk-KBWND62T.js";
35
35
  import "./chunk-M267JPEA.js";
36
36
  import {
@@ -38,8 +38,8 @@ import {
38
38
  assertOrchestratorCapableAgent,
39
39
  coerceOrchestratorAgent,
40
40
  isOrchestratorCapableAgent
41
- } from "./chunk-G3KLNP2B.js";
42
- import "./chunk-DN7UA3UT.js";
41
+ } from "./chunk-IHSR7EVK.js";
42
+ import "./chunk-SXPTL222.js";
43
43
  import "./chunk-ELBYOGVA.js";
44
44
  import {
45
45
  cursorSdkMessageToEvents,
@@ -47,7 +47,7 @@ import {
47
47
  preferredCursorCostCents,
48
48
  turnCostUsdFromCursorUsage
49
49
  } from "./chunk-WT5HSFOU.js";
50
- import "./chunk-JSYIBLBK.js";
50
+ import "./chunk-YP3CSOZ6.js";
51
51
  import "./chunk-FKOIHGKV.js";
52
52
  import "./chunk-I77RYPOH.js";
53
53
  import "./chunk-4TR3HZFT.js";
@@ -11,13 +11,13 @@ import {
11
11
  } from "./chunk-S42XV45P.js";
12
12
  import {
13
13
  isOrchestratorThread
14
- } from "./chunk-XUYIJY6D.js";
14
+ } from "./chunk-KNE3FZ46.js";
15
15
  import {
16
16
  codexUnattendedGitConfigArgs,
17
17
  mergeAgentGitAuthEnv,
18
18
  resolveAgentGitAuthEnv,
19
19
  resolveCodexGitWritableRoots
20
- } from "./chunk-QS5JJ2IM.js";
20
+ } from "./chunk-JTPDWTWJ.js";
21
21
  import {
22
22
  enrichPathWithNpmGlobalBin,
23
23
  isConductorBundledCli,
@@ -2085,7 +2085,7 @@ var claudeAdapter = {
2085
2085
  );
2086
2086
  }
2087
2087
  const mode = permissionMode(thread);
2088
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-AQESFS7I.js");
2088
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-PANZGRUS.js");
2089
2089
  const isOrchestrator = isOrchestratorThread2(thread);
2090
2090
  const injectedServers = await buildInjectedMcpServers({
2091
2091
  includeSideboard: true,
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  resolveGithubRepoSlug
5
- } from "./chunk-QS5JJ2IM.js";
5
+ } from "./chunk-JTPDWTWJ.js";
6
6
  import {
7
7
  resolveThreadDefaults
8
8
  } from "./chunk-BGQBELGJ.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ensureGlobalCoordinatorCwd
3
- } from "./chunk-DN7UA3UT.js";
3
+ } from "./chunk-SXPTL222.js";
4
4
  import {
5
5
  allocateTeamName,
6
6
  takenSlugsFromThread,
7
7
  teamSlugFromName
8
- } from "./chunk-JSYIBLBK.js";
8
+ } from "./chunk-YP3CSOZ6.js";
9
9
  import {
10
10
  ATTACHMENTS_DIR,
11
11
  attachmentsGitignoreBody
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  isGlobalRepoPath
3
- } from "./chunk-G3KLNP2B.js";
3
+ } from "./chunk-IHSR7EVK.js";
4
4
  import {
5
5
  ensureGhPreferOrigin,
6
6
  resolveRepoRoot
7
- } from "./chunk-JSYIBLBK.js";
7
+ } from "./chunk-YP3CSOZ6.js";
8
8
  import {
9
9
  appDataDir
10
10
  } from "./chunk-QZQEXME2.js";
@@ -2215,45 +2215,128 @@ async function resolveWorktreeStartPoint(repoPath, sourceRef) {
2215
2215
  function isLocalPrFetchBranch(ref) {
2216
2216
  return /^sideboard-pr-\d+$/.test(ref.trim());
2217
2217
  }
2218
- async function createThreadWorktree(opts) {
2219
- let branchName = `thread/${opts.slug}`;
2220
- const worktreePath = join2(worktreesRoot(opts.repoPath), opts.slug);
2221
- if (existsSync2(worktreePath)) {
2222
- throw new Error(`Worktree already exists at ${worktreePath}`);
2218
+ function originFetchBranch(sourceRef) {
2219
+ const ref = sourceRef.trim();
2220
+ if (!ref || isLocalPrFetchBranch(ref)) return null;
2221
+ if (ref.startsWith("refs/remotes/origin/")) {
2222
+ return ref.slice("refs/remotes/origin/".length) || null;
2223
2223
  }
2224
- await ensureGhPreferOrigin(opts.repoPath);
2225
- let startPoint = null;
2224
+ if (ref.startsWith("refs/heads/")) {
2225
+ return ref.slice("refs/heads/".length) || null;
2226
+ }
2227
+ if (ref.startsWith("refs/")) return null;
2228
+ if (ref.startsWith("origin/")) return ref.slice("origin/".length) || null;
2229
+ return ref;
2230
+ }
2231
+ async function fetchOriginWithAuth(repoPath, args, timeoutMs) {
2232
+ const first = await git(args, repoPath, { reject: false, timeoutMs });
2233
+ if (first.exitCode === 0) return true;
2234
+ let mode;
2226
2235
  try {
2227
- startPoint = await resolveWorktreeStartPoint(opts.repoPath, opts.sourceRef);
2236
+ mode = getGithubGitAuthMode();
2228
2237
  } catch {
2229
- startPoint = null;
2238
+ return false;
2230
2239
  }
2231
- if (!isLocalPrFetchBranch(opts.sourceRef)) {
2232
- const fetchTimeoutMs = startPoint ? 12e3 : 45e3;
2233
- await git(["fetch", "origin", "--prune"], opts.repoPath, {
2234
- reject: false,
2235
- timeoutMs: fetchTimeoutMs
2240
+ if (mode === "ssh") return false;
2241
+ const token = await resolveGithubAgentToken(mode, repoPath);
2242
+ if (!token) return false;
2243
+ const tryHttps = async (header) => git(args, repoPath, {
2244
+ reject: false,
2245
+ timeoutMs,
2246
+ env: { GIT_TERMINAL_PROMPT: "0" },
2247
+ config: {
2248
+ "url.https://github.com/.insteadOf": "git@github.com:",
2249
+ "http.extraHeader": header
2250
+ }
2251
+ });
2252
+ const bearer = await tryHttps(`AUTHORIZATION: bearer ${token}`);
2253
+ if (bearer.exitCode === 0) return true;
2254
+ const basic = Buffer.from(`x-access-token:${token}`, "utf8").toString("base64");
2255
+ const basicFetch = await tryHttps(`Authorization: Basic ${basic}`);
2256
+ return basicFetch.exitCode === 0;
2257
+ }
2258
+ async function fetchOriginForWorktree(repoPath, sourceRef, opts) {
2259
+ const timeoutMs = opts?.timeoutMs ?? 2e4;
2260
+ const branch = originFetchBranch(sourceRef);
2261
+ if (!branch) return false;
2262
+ const tipOk = await fetchOriginWithAuth(
2263
+ repoPath,
2264
+ ["fetch", "origin", branch],
2265
+ timeoutMs
2266
+ );
2267
+ await fetchOriginWithAuth(repoPath, ["fetch", "origin", "--prune"], timeoutMs);
2268
+ return tipOk;
2269
+ }
2270
+ async function fastForwardMainCheckoutIfSafe(repoPath, opts) {
2271
+ try {
2272
+ const branch = opts?.branch?.trim() || await resolveDefaultBranch(repoPath, { network: false });
2273
+ const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], repoPath, {
2274
+ reject: false
2236
2275
  });
2237
- if (!opts.sourceRef.startsWith("origin/") && !opts.sourceRef.startsWith("refs/")) {
2238
- await git(["fetch", "origin", opts.sourceRef], opts.repoPath, {
2239
- reject: false,
2240
- timeoutMs: fetchTimeoutMs
2241
- });
2276
+ const current = head.stdout.trim();
2277
+ if (head.exitCode !== 0 || !current || current === "HEAD" || current !== branch) {
2278
+ return { updated: false, reason: "not-on-default" };
2242
2279
  }
2243
- try {
2244
- startPoint = await resolveWorktreeStartPoint(
2245
- opts.repoPath,
2246
- opts.sourceRef
2247
- );
2248
- } catch (err) {
2249
- if (!startPoint) throw err;
2280
+ if (await isDirty(repoPath)) {
2281
+ return { updated: false, reason: "dirty" };
2250
2282
  }
2251
- }
2252
- if (!startPoint) {
2253
- throw new Error(
2254
- `Invalid git reference: ${opts.sourceRef} (and fetch did not resolve it)`
2283
+ const remote = `origin/${branch}`;
2284
+ const remoteOk = await git(["rev-parse", "--verify", remote], repoPath, {
2285
+ reject: false
2286
+ });
2287
+ if (remoteOk.exitCode !== 0) {
2288
+ return { updated: false, reason: "no-origin-tip" };
2289
+ }
2290
+ const ancestor = await git(
2291
+ ["merge-base", "--is-ancestor", "HEAD", remote],
2292
+ repoPath,
2293
+ { reject: false }
2294
+ );
2295
+ if (ancestor.exitCode !== 0) {
2296
+ return { updated: false, reason: "diverged" };
2297
+ }
2298
+ const behind = await git(
2299
+ ["rev-list", "--count", `HEAD..${remote}`],
2300
+ repoPath,
2301
+ { reject: false }
2255
2302
  );
2303
+ const n = Number(behind.stdout.trim());
2304
+ if (behind.exitCode !== 0 || !Number.isFinite(n) || n <= 0) {
2305
+ return { updated: false, reason: "already-current" };
2306
+ }
2307
+ const ff = await git(["merge", "--ff-only", remote], repoPath, {
2308
+ reject: false
2309
+ });
2310
+ if (ff.exitCode !== 0) {
2311
+ return { updated: false, reason: "ff-failed" };
2312
+ }
2313
+ return { updated: true, reason: "updated" };
2314
+ } catch {
2315
+ return { updated: false, reason: "ff-failed" };
2316
+ }
2317
+ }
2318
+ async function refreshOriginAndMaybeFastForwardMain(repoPath, sourceRef) {
2319
+ if (!isLocalPrFetchBranch(sourceRef)) {
2320
+ await fetchOriginForWorktree(repoPath, sourceRef);
2321
+ }
2322
+ const def = await resolveDefaultBranch(repoPath, { network: false });
2323
+ if (originFetchBranch(sourceRef) !== def) {
2324
+ await fetchOriginForWorktree(repoPath, def);
2325
+ }
2326
+ await fastForwardMainCheckoutIfSafe(repoPath, { branch: def });
2327
+ }
2328
+ async function createThreadWorktree(opts) {
2329
+ let branchName = `thread/${opts.slug}`;
2330
+ const worktreePath = join2(worktreesRoot(opts.repoPath), opts.slug);
2331
+ if (existsSync2(worktreePath)) {
2332
+ throw new Error(`Worktree already exists at ${worktreePath}`);
2256
2333
  }
2334
+ await ensureGhPreferOrigin(opts.repoPath);
2335
+ await refreshOriginAndMaybeFastForwardMain(opts.repoPath, opts.sourceRef);
2336
+ const startPoint = await resolveWorktreeStartPoint(
2337
+ opts.repoPath,
2338
+ opts.sourceRef
2339
+ );
2257
2340
  const added = await withRepoGitLock(opts.repoPath, async () => {
2258
2341
  const add = await git(
2259
2342
  ["worktree", "add", "-b", branchName, worktreePath, startPoint],
@@ -2290,10 +2373,7 @@ async function createExistingBranchWorktree(opts) {
2290
2373
  throw new Error(`Worktree already exists at ${worktreePath}`);
2291
2374
  }
2292
2375
  await ensureGhPreferOrigin(opts.repoPath);
2293
- await git(["fetch", "origin", "--prune"], opts.repoPath, { reject: false });
2294
- if (!branchName.startsWith("origin/") && !branchName.startsWith("refs/")) {
2295
- await git(["fetch", "origin", branchName], opts.repoPath, { reject: false });
2296
- }
2376
+ await refreshOriginAndMaybeFastForwardMain(opts.repoPath, branchName);
2297
2377
  const existing = await listWorktrees(opts.repoPath);
2298
2378
  const already = existing.find((w) => w.branch === branchName);
2299
2379
  if (already?.path) {
@@ -2735,6 +2815,9 @@ export {
2735
2815
  getPrDetails,
2736
2816
  fetchPrHead,
2737
2817
  resolveWorktreeStartPoint,
2818
+ originFetchBranch,
2819
+ fetchOriginForWorktree,
2820
+ fastForwardMainCheckoutIfSafe,
2738
2821
  createThreadWorktree,
2739
2822
  createExistingBranchWorktree,
2740
2823
  removeWorktree,
@@ -2,11 +2,11 @@
2
2
 
3
3
  import {
4
4
  isGlobalRepoPath
5
- } from "./chunk-XUYIJY6D.js";
5
+ } from "./chunk-KNE3FZ46.js";
6
6
  import {
7
7
  ensureGhPreferOrigin,
8
8
  resolveRepoRoot
9
- } from "./chunk-QS5JJ2IM.js";
9
+ } from "./chunk-JTPDWTWJ.js";
10
10
  import {
11
11
  appDataDir
12
12
  } from "./chunk-BD2ICC4D.js";
@@ -2,12 +2,12 @@
2
2
 
3
3
  import {
4
4
  ensureGlobalCoordinatorCwd
5
- } from "./chunk-2C5RE7K4.js";
5
+ } from "./chunk-67K3FRKR.js";
6
6
  import {
7
7
  allocateTeamName,
8
8
  takenSlugsFromThread,
9
9
  teamSlugFromName
10
- } from "./chunk-QS5JJ2IM.js";
10
+ } from "./chunk-JTPDWTWJ.js";
11
11
  import {
12
12
  ATTACHMENTS_DIR,
13
13
  attachmentsGitignoreBody
@@ -32,13 +32,13 @@ import {
32
32
  summarizeTurnStderr,
33
33
  toolDescription,
34
34
  turnFailChatText
35
- } from "./chunk-TTJ6EYZC.js";
35
+ } from "./chunk-4RYRNJPN.js";
36
36
  import {
37
37
  addWorkspace,
38
38
  ensureWorkspace,
39
39
  removeWorkspace,
40
40
  syncWorkspacesFromThreads
41
- } from "./chunk-LWRNRMYY.js";
41
+ } from "./chunk-JW436RTA.js";
42
42
  import {
43
43
  extractPresentedPlan,
44
44
  readPlanFile,
@@ -63,14 +63,14 @@ import {
63
63
  persistPendingFileAttachments,
64
64
  stageAbsolutePathsAsAttachments,
65
65
  stageBuffersAsAttachments
66
- } from "./chunk-XUYIJY6D.js";
66
+ } from "./chunk-KNE3FZ46.js";
67
67
  import {
68
68
  SLACK_REPLY_FORMATTING,
69
69
  coordinatorSystemPrompt,
70
70
  coordinatorTurnReminder,
71
71
  enrichWorkspacesWithGithub,
72
72
  ensureGlobalCoordinatorCwd
73
- } from "./chunk-2C5RE7K4.js";
73
+ } from "./chunk-67K3FRKR.js";
74
74
  import {
75
75
  addPrStackLayer,
76
76
  allocateTeamName,
@@ -83,6 +83,8 @@ import {
83
83
  currentBranch,
84
84
  detectGhStack,
85
85
  enqueueByKey,
86
+ fastForwardMainCheckoutIfSafe,
87
+ fetchOriginForWorktree,
86
88
  fetchPrHead,
87
89
  formatGhLandError,
88
90
  formatGitAuthModeDirective,
@@ -116,7 +118,7 @@ import {
116
118
  withRepoGitLock,
117
119
  worktreeDisplayLabelForGroup,
118
120
  worktreeNameFromPath
119
- } from "./chunk-QS5JJ2IM.js";
121
+ } from "./chunk-JTPDWTWJ.js";
120
122
  import {
121
123
  ATTACHMENTS_DIR,
122
124
  LEGACY_ATTACHMENTS_DIR
@@ -389,7 +391,7 @@ async function continueSourceThread(threadId, prompt) {
389
391
  await continueOnReply(threadId, prompt);
390
392
  return;
391
393
  }
392
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-WWQBBIPP.js");
394
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-T35BJZWY.js");
393
395
  await getOrchestrator2().send(threadId, prompt);
394
396
  } catch {
395
397
  }
@@ -730,9 +732,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
730
732
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
731
733
  );
732
734
  }
733
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-AQESFS7I.js");
735
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-PANZGRUS.js");
734
736
  if (isGlobalThread2(thread)) {
735
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-JSX22ULD.js");
737
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-2EOR35TP.js");
736
738
  ensureGlobalCoordinatorCwd2(
737
739
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
738
740
  );
@@ -2895,6 +2897,8 @@ async function createThread(input, _onSetupLine) {
2895
2897
  `Cowboy mode uses ${defaultBranch} in the project folder. Switch that checkout to ${defaultBranch} first (currently ${head}).`
2896
2898
  );
2897
2899
  }
2900
+ await fetchOriginForWorktree(repoPath, defaultBranch);
2901
+ await fastForwardMainCheckoutIfSafe(repoPath, { branch: defaultBranch });
2898
2902
  const explicitTitle2 = input.title?.trim();
2899
2903
  const thread2 = createEmptyThread({
2900
2904
  title: explicitTitle2 || `Cowboy \xB7 ${head}`,
@@ -3001,7 +3005,7 @@ async function createThread(input, _onSetupLine) {
3001
3005
  return readThread(thread.id) ?? thread;
3002
3006
  }
3003
3007
  async function listLinearIssues(agent, repoPath) {
3004
- const { getAdapter: getAdapter2 } = await import("./agents-4WOO4WN4.js");
3008
+ const { getAdapter: getAdapter2 } = await import("./agents-N3KMRQUZ.js");
3005
3009
  await requireAgent(agent, { requireLinear: true });
3006
3010
  const adapter = getAdapter2(agent);
3007
3011
  if (!adapter.listLinearIssues) {
@@ -3408,7 +3412,7 @@ async function adoptThread(input) {
3408
3412
  messages: input.messages ?? []
3409
3413
  });
3410
3414
  writeThread(thread);
3411
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-V3RNE5ZX.js");
3415
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-DWERPUQJ.js");
3412
3416
  await ensureWorkspace2(repoPath);
3413
3417
  return thread;
3414
3418
  }
@@ -5607,7 +5611,7 @@ function formatScheduledPrompt(name, prompt) {
5607
5611
  ${prompt}`;
5608
5612
  }
5609
5613
  async function defaultDeps() {
5610
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-WWQBBIPP.js");
5614
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-T35BJZWY.js");
5611
5615
  const orch = getOrchestrator2();
5612
5616
  return {
5613
5617
  findThread: (id) => findThreadByRef(id),
@@ -7543,7 +7547,7 @@ var Orchestrator = class {
7543
7547
  this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
7544
7548
  if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
7545
7549
  try {
7546
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-V3RNE5ZX.js");
7550
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-DWERPUQJ.js");
7547
7551
  await ensureWorkspace2(thread.repoPath);
7548
7552
  } catch {
7549
7553
  }
@@ -7597,7 +7601,7 @@ var Orchestrator = class {
7597
7601
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
7598
7602
  );
7599
7603
  }
7600
- const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-TUZX7F7P.js");
7604
+ const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-UCWWTVLS.js");
7601
7605
  const slug = thread.worktreePath.split("/").pop();
7602
7606
  const dest = thread.worktreePath;
7603
7607
  await withRepoGitLock(thread.repoPath, async () => {
@@ -7705,7 +7709,7 @@ async function startOrchestration(opts) {
7705
7709
  sourceRef: "default",
7706
7710
  ...createOpts
7707
7711
  }).catch(async () => {
7708
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-TUZX7F7P.js");
7712
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-UCWWTVLS.js");
7709
7713
  const repo = await resolveRepoRoot2(repoPath);
7710
7714
  const def = await resolveDefaultBranch2(repo);
7711
7715
  return orch.createThread({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveGithubRepoSlug
3
- } from "./chunk-JSYIBLBK.js";
3
+ } from "./chunk-YP3CSOZ6.js";
4
4
  import {
5
5
  resolveThreadDefaults
6
6
  } from "./chunk-I77RYPOH.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-M267JPEA.js";
10
10
  import {
11
11
  isOrchestratorThread
12
- } from "./chunk-G3KLNP2B.js";
12
+ } from "./chunk-IHSR7EVK.js";
13
13
  import {
14
14
  applyAgentRunnerHeapEnv,
15
15
  applyNodeLaunch,
@@ -28,7 +28,7 @@ import {
28
28
  mergeAgentGitAuthEnv,
29
29
  resolveAgentGitAuthEnv,
30
30
  resolveCodexGitWritableRoots
31
- } from "./chunk-JSYIBLBK.js";
31
+ } from "./chunk-YP3CSOZ6.js";
32
32
  import {
33
33
  claudeChromeEnabled,
34
34
  loadAppSettings,
@@ -1767,7 +1767,7 @@ var claudeAdapter = {
1767
1767
  );
1768
1768
  }
1769
1769
  const mode = permissionMode(thread);
1770
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-6WR7OGMI.js");
1770
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-EZVQPMWT.js");
1771
1771
  const isOrchestrator = isOrchestratorThread2(thread);
1772
1772
  const injectedServers = await buildInjectedMcpServers({
1773
1773
  includeSideboard: true,