@sideboard-ai/core 0.1.159 → 0.1.160

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 (33) hide show
  1. package/dist/{abletime-LK7GV556.js → abletime-AGF54TNA.js} +2 -2
  2. package/dist/{abletime-HOQBDQC4.js → abletime-BMS53RIZ.js} +2 -2
  3. package/dist/{agents-67ZBH5OE.js → agents-6UOXBORU.js} +4 -4
  4. package/dist/{agents-5HY76BCR.js → agents-RD774UEV.js} +4 -4
  5. package/dist/{app-settings-BJ5GFAE5.js → app-settings-BRLZQA7N.js} +1 -1
  6. package/dist/{app-settings-YWJ4MVYM.js → app-settings-JJQDWPEK.js} +1 -1
  7. package/dist/{chunk-DWUOKF3W.js → chunk-7OWRFJK6.js} +4 -4
  8. package/dist/{chunk-OYOXLY6B.js → chunk-BQ4PEXIF.js} +20 -20
  9. package/dist/{chunk-FLG4A5FJ.js → chunk-CVZ4KXVP.js} +8 -3
  10. package/dist/{chunk-SIMFKJIB.js → chunk-HZROPNYL.js} +2 -2
  11. package/dist/{chunk-AGLPYXDT.js → chunk-ILXKJ4ZD.js} +1 -1
  12. package/dist/{chunk-MEZXWELT.js → chunk-IO5WGZRR.js} +1 -1
  13. package/dist/{chunk-UBMCEZRE.js → chunk-KJFFQAMA.js} +1 -1
  14. package/dist/{chunk-EQIJ5MHR.js → chunk-LTXS26K5.js} +8 -3
  15. package/dist/{chunk-O7RWWPMR.js → chunk-QANLIT2E.js} +2 -2
  16. package/dist/{chunk-TGU3LSDG.js → chunk-QYKADGPP.js} +19 -19
  17. package/dist/{chunk-V4R6L2ZL.js → chunk-RQNXLIXO.js} +4 -4
  18. package/dist/{chunk-KEDHHXKW.js → chunk-UUEBNUEG.js} +1 -1
  19. package/dist/{coordinator-prompt-CNI6AK65.js → coordinator-prompt-X3LXE5Q4.js} +3 -3
  20. package/dist/{coordinator-prompt-7NKY7QRK.js → coordinator-prompt-YYUXC7EM.js} +3 -3
  21. package/dist/{global-workspace-FKAJZHO5.js → global-workspace-E6S5XQZF.js} +3 -3
  22. package/dist/{global-workspace-IJYCUO4M.js → global-workspace-SPR2Y4YQ.js} +3 -3
  23. package/dist/index.cjs +15 -7
  24. package/dist/index.js +15 -12
  25. package/dist/mcp/run-stdio.cjs +15 -7
  26. package/dist/mcp/run-stdio.js +15 -12
  27. package/dist/{orchestrator-KFLS5BTP.js → orchestrator-BSVSOTBK.js} +5 -5
  28. package/dist/{orchestrator-NSVP7DJH.js → orchestrator-KVKPIUVU.js} +5 -5
  29. package/dist/{workspaces-D2M3AM2M.js → workspaces-MZELP4BI.js} +3 -3
  30. package/dist/{workspaces-OFSDJ7PZ.js → workspaces-OK2SNNQF.js} +3 -3
  31. package/dist/{worktree-BQE5KLRY.js → worktree-BX53JZHO.js} +2 -2
  32. package/dist/{worktree-EA6AD6D6.js → worktree-IY7YCEGH.js} +2 -2
  33. package/package.json +1 -1
@@ -14,9 +14,9 @@ import {
14
14
  toAbleTimeIssueInfo,
15
15
  updateAbleTimeTask,
16
16
  verifyAbleTimeConnection
17
- } from "./chunk-AGLPYXDT.js";
17
+ } from "./chunk-ILXKJ4ZD.js";
18
18
  import "./chunk-ELBYOGVA.js";
19
- import "./chunk-FLG4A5FJ.js";
19
+ import "./chunk-CVZ4KXVP.js";
20
20
  import "./chunk-4TR3HZFT.js";
21
21
  import "./chunk-JT7R45JB.js";
22
22
  import "./chunk-77WWLBCI.js";
@@ -16,9 +16,9 @@ import {
16
16
  toAbleTimeIssueInfo,
17
17
  updateAbleTimeTask,
18
18
  verifyAbleTimeConnection
19
- } from "./chunk-UBMCEZRE.js";
19
+ } from "./chunk-KJFFQAMA.js";
20
20
  import "./chunk-6GN5WPYZ.js";
21
- import "./chunk-EQIJ5MHR.js";
21
+ import "./chunk-LTXS26K5.js";
22
22
  import "./chunk-NSTQ6QKD.js";
23
23
  import "./chunk-KGZBYWZ3.js";
24
24
  import "./chunk-JTJHOYCU.js";
@@ -37,7 +37,7 @@ import {
37
37
  resolveQuotaFallbackAgent,
38
38
  turnCostUsdFromCursorUsage,
39
39
  whichOnPath
40
- } from "./chunk-DWUOKF3W.js";
40
+ } from "./chunk-7OWRFJK6.js";
41
41
  import "./chunk-LZ6QMEQC.js";
42
42
  import "./chunk-S42XV45P.js";
43
43
  import "./chunk-6GN5WPYZ.js";
@@ -46,8 +46,8 @@ import {
46
46
  assertOrchestratorCapableAgent,
47
47
  coerceOrchestratorAgent,
48
48
  isOrchestratorCapableAgent
49
- } from "./chunk-SIMFKJIB.js";
50
- import "./chunk-MEZXWELT.js";
49
+ } from "./chunk-HZROPNYL.js";
50
+ import "./chunk-IO5WGZRR.js";
51
51
  import "./chunk-5U4NZLBH.js";
52
52
  import "./chunk-LZQULFIT.js";
53
53
  import "./chunk-SYFVUF2C.js";
@@ -60,7 +60,7 @@ import {
60
60
  resolveCommandBinarySync,
61
61
  withExportedPath
62
62
  } from "./chunk-FNQNJOHY.js";
63
- import "./chunk-EQIJ5MHR.js";
63
+ import "./chunk-LTXS26K5.js";
64
64
  import "./chunk-NSTQ6QKD.js";
65
65
  import "./chunk-KGZBYWZ3.js";
66
66
  import "./chunk-JTJHOYCU.js";
@@ -31,14 +31,14 @@ import {
31
31
  resolveLoginCommand,
32
32
  resolveQuotaFallbackAgent,
33
33
  whichOnPath
34
- } from "./chunk-V4R6L2ZL.js";
34
+ } from "./chunk-RQNXLIXO.js";
35
35
  import {
36
36
  ORCHESTRATOR_AGENT_KINDS,
37
37
  assertOrchestratorCapableAgent,
38
38
  coerceOrchestratorAgent,
39
39
  isOrchestratorCapableAgent
40
- } from "./chunk-O7RWWPMR.js";
41
- import "./chunk-KEDHHXKW.js";
40
+ } from "./chunk-QANLIT2E.js";
41
+ import "./chunk-UUEBNUEG.js";
42
42
  import "./chunk-JRH62XC4.js";
43
43
  import "./chunk-XD2BAANL.js";
44
44
  import "./chunk-M267JPEA.js";
@@ -49,7 +49,7 @@ import {
49
49
  preferredCursorCostCents,
50
50
  turnCostUsdFromCursorUsage
51
51
  } from "./chunk-HEII7W3Q.js";
52
- import "./chunk-FLG4A5FJ.js";
52
+ import "./chunk-CVZ4KXVP.js";
53
53
  import "./chunk-4TR3HZFT.js";
54
54
  import "./chunk-JT7R45JB.js";
55
55
  import "./chunk-7UURXPKD.js";
@@ -83,7 +83,7 @@ import {
83
83
  updateOpencodeSettings,
84
84
  updateProjectProfileSettings,
85
85
  writeViewerContext
86
- } from "./chunk-EQIJ5MHR.js";
86
+ } from "./chunk-LTXS26K5.js";
87
87
  import "./chunk-NSTQ6QKD.js";
88
88
  import "./chunk-KGZBYWZ3.js";
89
89
  import "./chunk-JTJHOYCU.js";
@@ -81,7 +81,7 @@ import {
81
81
  updateOpencodeSettings,
82
82
  updateProjectProfileSettings,
83
83
  writeViewerContext
84
- } from "./chunk-FLG4A5FJ.js";
84
+ } from "./chunk-CVZ4KXVP.js";
85
85
  import "./chunk-4TR3HZFT.js";
86
86
  import "./chunk-JT7R45JB.js";
87
87
  import "./chunk-77WWLBCI.js";
@@ -11,13 +11,13 @@ import {
11
11
  } from "./chunk-S42XV45P.js";
12
12
  import {
13
13
  isOrchestratorThread
14
- } from "./chunk-SIMFKJIB.js";
14
+ } from "./chunk-HZROPNYL.js";
15
15
  import {
16
16
  codexUnattendedGitConfigArgs,
17
17
  mergeAgentGitAuthEnv,
18
18
  resolveAgentGitAuthEnv,
19
19
  resolveCodexGitWritableRoots
20
- } from "./chunk-MEZXWELT.js";
20
+ } from "./chunk-IO5WGZRR.js";
21
21
  import {
22
22
  enrichPathWithNpmGlobalBin,
23
23
  isConductorBundledCli,
@@ -35,7 +35,7 @@ import {
35
35
  resolveClaudeExecutable,
36
36
  unwrapStrippedElectronLaunch,
37
37
  wrapElectronAsNodeLaunch
38
- } from "./chunk-EQIJ5MHR.js";
38
+ } from "./chunk-LTXS26K5.js";
39
39
  import {
40
40
  appDataDir
41
41
  } from "./chunk-JTJHOYCU.js";
@@ -2158,7 +2158,7 @@ var claudeAdapter = {
2158
2158
  );
2159
2159
  }
2160
2160
  const mode = permissionMode(thread);
2161
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-FKAJZHO5.js");
2161
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-E6S5XQZF.js");
2162
2162
  const isOrchestrator = isOrchestratorThread2(thread);
2163
2163
  const injectedServers = await buildInjectedMcpServers({
2164
2164
  includeSideboard: true,
@@ -24,7 +24,7 @@ import {
24
24
  stripBrightsyNdjsonNoise,
25
25
  sumUsageList,
26
26
  toolDescription
27
- } from "./chunk-V4R6L2ZL.js";
27
+ } from "./chunk-RQNXLIXO.js";
28
28
  import {
29
29
  SLACK_REPLY_FORMATTING,
30
30
  addWorkspace,
@@ -50,7 +50,7 @@ import {
50
50
  stageAbsolutePathsAsAttachments,
51
51
  stageBuffersAsAttachments,
52
52
  syncWorkspacesFromThreads
53
- } from "./chunk-O7RWWPMR.js";
53
+ } from "./chunk-QANLIT2E.js";
54
54
  import {
55
55
  addPrStackLayer,
56
56
  allocateTeamName,
@@ -98,7 +98,7 @@ import {
98
98
  withRepoGitLock,
99
99
  worktreeDisplayLabelForGroup,
100
100
  worktreeNameFromPath
101
- } from "./chunk-KEDHHXKW.js";
101
+ } from "./chunk-UUEBNUEG.js";
102
102
  import {
103
103
  ATTACHMENTS_DIR,
104
104
  DETACHED_JOBS_DIR,
@@ -146,7 +146,7 @@ import {
146
146
  saveAppSettings,
147
147
  updateAdvancedSettings,
148
148
  writeSecureJson
149
- } from "./chunk-FLG4A5FJ.js";
149
+ } from "./chunk-CVZ4KXVP.js";
150
150
  import {
151
151
  stripNestedElectronEnv
152
152
  } from "./chunk-4TR3HZFT.js";
@@ -464,7 +464,7 @@ async function continueSourceThread(threadId, prompt) {
464
464
  await continueOnReply(threadId, prompt);
465
465
  return;
466
466
  }
467
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-KFLS5BTP.js");
467
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-BSVSOTBK.js");
468
468
  await getOrchestrator2().send(threadId, prompt);
469
469
  } catch {
470
470
  }
@@ -744,9 +744,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
744
744
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
745
745
  );
746
746
  }
747
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-IJYCUO4M.js");
747
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-SPR2Y4YQ.js");
748
748
  if (isGlobalThread2(thread)) {
749
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-CNI6AK65.js");
749
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-X3LXE5Q4.js");
750
750
  ensureGlobalCoordinatorCwd2(
751
751
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
752
752
  );
@@ -3373,7 +3373,7 @@ async function createThread(input, _onSetupLine) {
3373
3373
  });
3374
3374
  await requireAgent(resolved.agent);
3375
3375
  if (input.cowboy) {
3376
- const { cowboyModeEnabled } = await import("./app-settings-YWJ4MVYM.js");
3376
+ const { cowboyModeEnabled } = await import("./app-settings-JJQDWPEK.js");
3377
3377
  if (!cowboyModeEnabled()) {
3378
3378
  throw new Error(
3379
3379
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -3431,7 +3431,7 @@ async function createThread(input, _onSetupLine) {
3431
3431
  let sourceIsFork = false;
3432
3432
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
3433
3433
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
3434
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-LK7GV556.js");
3434
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-AGF54TNA.js");
3435
3435
  const task = await ensureAbleTimeTask({
3436
3436
  title: title?.trim() || "Untitled work",
3437
3437
  description: input.prompt?.trim() || void 0
@@ -3528,7 +3528,7 @@ async function createThread(input, _onSetupLine) {
3528
3528
  return readThread(thread.id) ?? thread;
3529
3529
  }
3530
3530
  async function listLinearIssues(agent, repoPath) {
3531
- const { getAdapter: getAdapter2 } = await import("./agents-5HY76BCR.js");
3531
+ const { getAdapter: getAdapter2 } = await import("./agents-RD774UEV.js");
3532
3532
  await requireAgent(agent, { requireLinear: true });
3533
3533
  const adapter = getAdapter2(agent);
3534
3534
  if (!adapter.listLinearIssues) {
@@ -3939,7 +3939,7 @@ async function adoptThread(input) {
3939
3939
  messages: input.messages ?? []
3940
3940
  });
3941
3941
  writeThread(thread);
3942
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-D2M3AM2M.js");
3942
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-MZELP4BI.js");
3943
3943
  await ensureWorkspace2(repoPath);
3944
3944
  const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-X54WSOXM.js");
3945
3945
  await ensureWorktreeSideboardIgnored2(input.worktreePath);
@@ -6493,7 +6493,7 @@ function formatScheduledPrompt(name, prompt) {
6493
6493
  ${prompt}`;
6494
6494
  }
6495
6495
  async function defaultDeps() {
6496
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-KFLS5BTP.js");
6496
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-BSVSOTBK.js");
6497
6497
  const orch = getOrchestrator2();
6498
6498
  return {
6499
6499
  findThread: (id) => findThreadByRef(id),
@@ -6755,7 +6755,7 @@ var Orchestrator = class {
6755
6755
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
6756
6756
  });
6757
6757
  }
6758
- const { autoCleanupOrphansEnabled } = await import("./app-settings-YWJ4MVYM.js");
6758
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-JJQDWPEK.js");
6759
6759
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
6760
6760
  await cleanupOrphanWorktrees({ repoPaths });
6761
6761
  }
@@ -7026,7 +7026,7 @@ var Orchestrator = class {
7026
7026
  }
7027
7027
  await setup;
7028
7028
  if (skipSetup) return;
7029
- const { autoRunAfterSetupEnabled } = await import("./app-settings-YWJ4MVYM.js");
7029
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-JJQDWPEK.js");
7030
7030
  if (autoRunAfterSetupEnabled()) {
7031
7031
  try {
7032
7032
  await this.startDev(threadId);
@@ -7337,7 +7337,7 @@ var Orchestrator = class {
7337
7337
  }
7338
7338
  const isBrightsy = fresh.agent === "brightsy";
7339
7339
  const isOrchestration = isOrchestratorThread(fresh);
7340
- const { autoRenameBranchEnabled, getGithubGitAuthMode } = await import("./app-settings-YWJ4MVYM.js");
7340
+ const { autoRenameBranchEnabled, getGithubGitAuthMode } = await import("./app-settings-JJQDWPEK.js");
7341
7341
  const gitAuthMode = getGithubGitAuthMode();
7342
7342
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
7343
7343
  githubSlug: await resolveGithubRepoSlug(fresh.worktreePath).catch(
@@ -8249,7 +8249,7 @@ var Orchestrator = class {
8249
8249
  updateThread(thread.id, { title: meta.title });
8250
8250
  }
8251
8251
  }
8252
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-YWJ4MVYM.js");
8252
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-JJQDWPEK.js");
8253
8253
  const latest = this.requireThread(thread.id);
8254
8254
  if (!shouldAutoArchiveOnPrMerge({
8255
8255
  previousPrState: prevState || null,
@@ -8566,7 +8566,7 @@ var Orchestrator = class {
8566
8566
  this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
8567
8567
  if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
8568
8568
  try {
8569
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-D2M3AM2M.js");
8569
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-MZELP4BI.js");
8570
8570
  await ensureWorkspace2(thread.repoPath);
8571
8571
  } catch {
8572
8572
  }
@@ -8593,7 +8593,7 @@ var Orchestrator = class {
8593
8593
  await runArchiveScript(thread.repoPath, thread.worktreePath);
8594
8594
  } catch {
8595
8595
  }
8596
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-YWJ4MVYM.js");
8596
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-JJQDWPEK.js");
8597
8597
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
8598
8598
  await removeWorktree(thread.repoPath, thread.worktreePath, {
8599
8599
  deleteBranch: deleteBranch ? thread.branchName : void 0
@@ -8620,7 +8620,7 @@ var Orchestrator = class {
8620
8620
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
8621
8621
  );
8622
8622
  }
8623
- const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-EA6AD6D6.js");
8623
+ const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-IY7YCEGH.js");
8624
8624
  const slug = thread.worktreePath.split("/").pop();
8625
8625
  const dest = thread.worktreePath;
8626
8626
  await withRepoGitLock(thread.repoPath, async () => {
@@ -8730,7 +8730,7 @@ async function startOrchestration(opts) {
8730
8730
  sourceRef: "default",
8731
8731
  ...createOpts
8732
8732
  }).catch(async () => {
8733
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-EA6AD6D6.js");
8733
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-IY7YCEGH.js");
8734
8734
  const repo = await resolveRepoRoot2(repoPath);
8735
8735
  const def = await resolveDefaultBranch2(repo);
8736
8736
  return orch.createThread({
@@ -650,14 +650,19 @@ function findProjectProfileKey(projects, repoPath) {
650
650
  const want = profileRepoKey(repoPath ?? "");
651
651
  if (!want) return void 0;
652
652
  if (projects[want]) return want;
653
+ let best;
654
+ let bestLen = 0;
653
655
  for (const key of Object.keys(projects)) {
654
656
  const stored = profileRepoKey(key);
655
657
  if (!stored) continue;
656
- if (stored === want || want.startsWith(`${stored}/`) || stored.startsWith(`${want}/`)) {
657
- return key;
658
+ if (stored === want || want.startsWith(`${stored}/`)) {
659
+ if (stored.length > bestLen) {
660
+ best = key;
661
+ bestLen = stored.length;
662
+ }
658
663
  }
659
664
  }
660
- return void 0;
665
+ return best;
661
666
  }
662
667
  function normalizeAdvanced(raw) {
663
668
  if (!raw || typeof raw !== "object") return {};
@@ -7,7 +7,7 @@ import {
7
7
  resolveRepoRoot,
8
8
  takenSlugsFromThread,
9
9
  teamSlugFromName
10
- } from "./chunk-MEZXWELT.js";
10
+ } from "./chunk-IO5WGZRR.js";
11
11
  import {
12
12
  ATTACHMENTS_DIR,
13
13
  attachmentsGitignoreBody
@@ -28,7 +28,7 @@ import {
28
28
  resolveThreadDefaults,
29
29
  resolveViewerProfile,
30
30
  resolveViewerProfileForRepo
31
- } from "./chunk-EQIJ5MHR.js";
31
+ } from "./chunk-LTXS26K5.js";
32
32
  import {
33
33
  appDataDir,
34
34
  globalAgentCwd,
@@ -6,7 +6,7 @@ import {
6
6
  getAbleTimeHost,
7
7
  isAbleTimeConnected,
8
8
  saveAbleTimeConnection
9
- } from "./chunk-FLG4A5FJ.js";
9
+ } from "./chunk-CVZ4KXVP.js";
10
10
 
11
11
  // src/integrations/abletime-mcp.ts
12
12
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  getGithubGitAuthMode,
24
24
  getGithubPat
25
- } from "./chunk-EQIJ5MHR.js";
25
+ } from "./chunk-LTXS26K5.js";
26
26
  import {
27
27
  worktreesRoot
28
28
  } from "./chunk-JTJHOYCU.js";
@@ -8,7 +8,7 @@ import {
8
8
  getAbleTimeHost,
9
9
  isAbleTimeConnected,
10
10
  saveAbleTimeConnection
11
- } from "./chunk-EQIJ5MHR.js";
11
+ } from "./chunk-LTXS26K5.js";
12
12
 
13
13
  // src/integrations/abletime-mcp.ts
14
14
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -678,14 +678,19 @@ function findProjectProfileKey(projects, repoPath) {
678
678
  const want = profileRepoKey(repoPath ?? "");
679
679
  if (!want) return void 0;
680
680
  if (projects[want]) return want;
681
+ let best;
682
+ let bestLen = 0;
681
683
  for (const key of Object.keys(projects)) {
682
684
  const stored = profileRepoKey(key);
683
685
  if (!stored) continue;
684
- if (stored === want || want.startsWith(`${stored}/`) || stored.startsWith(`${want}/`)) {
685
- return key;
686
+ if (stored === want || want.startsWith(`${stored}/`)) {
687
+ if (stored.length > bestLen) {
688
+ best = key;
689
+ bestLen = stored.length;
690
+ }
686
691
  }
687
692
  }
688
- return void 0;
693
+ return best;
689
694
  }
690
695
  function normalizeAdvanced(raw) {
691
696
  if (!raw || typeof raw !== "object") return {};
@@ -5,7 +5,7 @@ import {
5
5
  resolveRepoRoot,
6
6
  takenSlugsFromThread,
7
7
  teamSlugFromName
8
- } from "./chunk-KEDHHXKW.js";
8
+ } from "./chunk-UUEBNUEG.js";
9
9
  import {
10
10
  ATTACHMENTS_DIR,
11
11
  attachmentsGitignoreBody
@@ -20,7 +20,7 @@ import {
20
20
  resolveThreadDefaults,
21
21
  resolveViewerProfile,
22
22
  resolveViewerProfileForRepo
23
- } from "./chunk-FLG4A5FJ.js";
23
+ } from "./chunk-CVZ4KXVP.js";
24
24
  import {
25
25
  createEmptyThread,
26
26
  listThreads,
@@ -33,7 +33,7 @@ import {
33
33
  summarizeTurnStderr,
34
34
  toolDescription,
35
35
  turnFailChatText
36
- } from "./chunk-DWUOKF3W.js";
36
+ } from "./chunk-7OWRFJK6.js";
37
37
  import {
38
38
  extractPresentedPlan,
39
39
  readPlanFile,
@@ -67,7 +67,7 @@ import {
67
67
  stageAbsolutePathsAsAttachments,
68
68
  stageBuffersAsAttachments,
69
69
  syncWorkspacesFromThreads
70
- } from "./chunk-SIMFKJIB.js";
70
+ } from "./chunk-HZROPNYL.js";
71
71
  import {
72
72
  addPrStackLayer,
73
73
  allocateTeamName,
@@ -115,7 +115,7 @@ import {
115
115
  withRepoGitLock,
116
116
  worktreeDisplayLabelForGroup,
117
117
  worktreeNameFromPath
118
- } from "./chunk-MEZXWELT.js";
118
+ } from "./chunk-IO5WGZRR.js";
119
119
  import {
120
120
  ATTACHMENTS_DIR,
121
121
  DETACHED_JOBS_DIR,
@@ -165,7 +165,7 @@ import {
165
165
  stripNestedElectronEnv,
166
166
  updateAdvancedSettings,
167
167
  writeSecureJson
168
- } from "./chunk-EQIJ5MHR.js";
168
+ } from "./chunk-LTXS26K5.js";
169
169
  import {
170
170
  writePrivateFile
171
171
  } from "./chunk-NSTQ6QKD.js";
@@ -399,7 +399,7 @@ async function continueSourceThread(threadId, prompt) {
399
399
  await continueOnReply(threadId, prompt);
400
400
  return;
401
401
  }
402
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-NSVP7DJH.js");
402
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-KVKPIUVU.js");
403
403
  await getOrchestrator2().send(threadId, prompt);
404
404
  } catch {
405
405
  }
@@ -740,9 +740,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
740
740
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
741
741
  );
742
742
  }
743
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-FKAJZHO5.js");
743
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-E6S5XQZF.js");
744
744
  if (isGlobalThread2(thread)) {
745
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-7NKY7QRK.js");
745
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-YYUXC7EM.js");
746
746
  ensureGlobalCoordinatorCwd2(
747
747
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
748
748
  );
@@ -3246,7 +3246,7 @@ async function createThread(input, _onSetupLine) {
3246
3246
  });
3247
3247
  await requireAgent(resolved.agent);
3248
3248
  if (input.cowboy) {
3249
- const { cowboyModeEnabled } = await import("./app-settings-BJ5GFAE5.js");
3249
+ const { cowboyModeEnabled } = await import("./app-settings-BRLZQA7N.js");
3250
3250
  if (!cowboyModeEnabled()) {
3251
3251
  throw new Error(
3252
3252
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -3304,7 +3304,7 @@ async function createThread(input, _onSetupLine) {
3304
3304
  let sourceIsFork = false;
3305
3305
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
3306
3306
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
3307
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-HOQBDQC4.js");
3307
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-BMS53RIZ.js");
3308
3308
  const task = await ensureAbleTimeTask({
3309
3309
  title: title?.trim() || "Untitled work",
3310
3310
  description: input.prompt?.trim() || void 0
@@ -3800,7 +3800,7 @@ async function adoptThread(input) {
3800
3800
  messages: input.messages ?? []
3801
3801
  });
3802
3802
  writeThread(thread);
3803
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-OFSDJ7PZ.js");
3803
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-OK2SNNQF.js");
3804
3804
  await ensureWorkspace2(repoPath);
3805
3805
  const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-N5X5I422.js");
3806
3806
  await ensureWorktreeSideboardIgnored2(input.worktreePath);
@@ -6083,7 +6083,7 @@ function formatScheduledPrompt(name, prompt) {
6083
6083
  ${prompt}`;
6084
6084
  }
6085
6085
  async function defaultDeps() {
6086
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-NSVP7DJH.js");
6086
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-KVKPIUVU.js");
6087
6087
  const orch = getOrchestrator2();
6088
6088
  return {
6089
6089
  findThread: (id) => findThreadByRef(id),
@@ -6345,7 +6345,7 @@ var Orchestrator = class {
6345
6345
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
6346
6346
  });
6347
6347
  }
6348
- const { autoCleanupOrphansEnabled } = await import("./app-settings-BJ5GFAE5.js");
6348
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-BRLZQA7N.js");
6349
6349
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
6350
6350
  await cleanupOrphanWorktrees({ repoPaths });
6351
6351
  }
@@ -6616,7 +6616,7 @@ var Orchestrator = class {
6616
6616
  }
6617
6617
  await setup;
6618
6618
  if (skipSetup) return;
6619
- const { autoRunAfterSetupEnabled } = await import("./app-settings-BJ5GFAE5.js");
6619
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-BRLZQA7N.js");
6620
6620
  if (autoRunAfterSetupEnabled()) {
6621
6621
  try {
6622
6622
  await this.startDev(threadId);
@@ -6927,7 +6927,7 @@ var Orchestrator = class {
6927
6927
  }
6928
6928
  const isBrightsy = fresh.agent === "brightsy";
6929
6929
  const isOrchestration = isOrchestratorThread(fresh);
6930
- const { autoRenameBranchEnabled, getGithubGitAuthMode } = await import("./app-settings-BJ5GFAE5.js");
6930
+ const { autoRenameBranchEnabled, getGithubGitAuthMode } = await import("./app-settings-BRLZQA7N.js");
6931
6931
  const gitAuthMode = getGithubGitAuthMode();
6932
6932
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
6933
6933
  githubSlug: await resolveGithubRepoSlug(fresh.worktreePath).catch(
@@ -7839,7 +7839,7 @@ var Orchestrator = class {
7839
7839
  updateThread(thread.id, { title: meta.title });
7840
7840
  }
7841
7841
  }
7842
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-BJ5GFAE5.js");
7842
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-BRLZQA7N.js");
7843
7843
  const latest = this.requireThread(thread.id);
7844
7844
  if (!shouldAutoArchiveOnPrMerge({
7845
7845
  previousPrState: prevState || null,
@@ -8156,7 +8156,7 @@ var Orchestrator = class {
8156
8156
  this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
8157
8157
  if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
8158
8158
  try {
8159
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-OFSDJ7PZ.js");
8159
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-OK2SNNQF.js");
8160
8160
  await ensureWorkspace2(thread.repoPath);
8161
8161
  } catch {
8162
8162
  }
@@ -8183,7 +8183,7 @@ var Orchestrator = class {
8183
8183
  await runArchiveScript(thread.repoPath, thread.worktreePath);
8184
8184
  } catch {
8185
8185
  }
8186
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-BJ5GFAE5.js");
8186
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-BRLZQA7N.js");
8187
8187
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
8188
8188
  await removeWorktree(thread.repoPath, thread.worktreePath, {
8189
8189
  deleteBranch: deleteBranch ? thread.branchName : void 0
@@ -8210,7 +8210,7 @@ var Orchestrator = class {
8210
8210
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
8211
8211
  );
8212
8212
  }
8213
- const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-BQE5KLRY.js");
8213
+ const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-BX53JZHO.js");
8214
8214
  const slug = thread.worktreePath.split("/").pop();
8215
8215
  const dest = thread.worktreePath;
8216
8216
  await withRepoGitLock(thread.repoPath, async () => {
@@ -8320,7 +8320,7 @@ async function startOrchestration(opts) {
8320
8320
  sourceRef: "default",
8321
8321
  ...createOpts
8322
8322
  }).catch(async () => {
8323
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-BQE5KLRY.js");
8323
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-BX53JZHO.js");
8324
8324
  const repo = await resolveRepoRoot2(repoPath);
8325
8325
  const def = await resolveDefaultBranch2(repo);
8326
8326
  return orch.createThread({
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isOrchestratorThread
3
- } from "./chunk-O7RWWPMR.js";
3
+ } from "./chunk-QANLIT2E.js";
4
4
  import {
5
5
  codexUnattendedGitConfigArgs,
6
6
  mergeAgentGitAuthEnv,
7
7
  resolveAgentGitAuthEnv,
8
8
  resolveCodexGitWritableRoots
9
- } from "./chunk-KEDHHXKW.js";
9
+ } from "./chunk-UUEBNUEG.js";
10
10
  import {
11
11
  applyConnectedTeamToCli,
12
12
  brightsyMcpServerName,
@@ -36,7 +36,7 @@ import {
36
36
  loadAppSettings,
37
37
  resolveAgentExecutable,
38
38
  resolveClaudeExecutable
39
- } from "./chunk-FLG4A5FJ.js";
39
+ } from "./chunk-CVZ4KXVP.js";
40
40
  import {
41
41
  isElectronLikeCommand,
42
42
  unwrapStrippedElectronLaunch
@@ -1865,7 +1865,7 @@ var claudeAdapter = {
1865
1865
  );
1866
1866
  }
1867
1867
  const mode = permissionMode(thread);
1868
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-IJYCUO4M.js");
1868
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-SPR2Y4YQ.js");
1869
1869
  const isOrchestrator = isOrchestratorThread2(thread);
1870
1870
  const injectedServers = await buildInjectedMcpServers({
1871
1871
  includeSideboard: true,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getGithubGitAuthMode,
6
6
  getGithubPat
7
- } from "./chunk-FLG4A5FJ.js";
7
+ } from "./chunk-CVZ4KXVP.js";
8
8
  import {
9
9
  listThreads
10
10
  } from "./chunk-7UURXPKD.js";
@@ -7,10 +7,10 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-O7RWWPMR.js";
11
- import "./chunk-KEDHHXKW.js";
10
+ } from "./chunk-QANLIT2E.js";
11
+ import "./chunk-UUEBNUEG.js";
12
12
  import "./chunk-JRH62XC4.js";
13
- import "./chunk-FLG4A5FJ.js";
13
+ import "./chunk-CVZ4KXVP.js";
14
14
  import "./chunk-4TR3HZFT.js";
15
15
  import "./chunk-JT7R45JB.js";
16
16
  import "./chunk-7UURXPKD.js";
@@ -9,13 +9,13 @@ import {
9
9
  enrichWorkspacesWithGithub,
10
10
  ensureGlobalCoordinatorCwd,
11
11
  formatWorkspaceInventory
12
- } from "./chunk-SIMFKJIB.js";
13
- import "./chunk-MEZXWELT.js";
12
+ } from "./chunk-HZROPNYL.js";
13
+ import "./chunk-IO5WGZRR.js";
14
14
  import "./chunk-5U4NZLBH.js";
15
15
  import "./chunk-LZQULFIT.js";
16
16
  import "./chunk-SYFVUF2C.js";
17
17
  import "./chunk-FNQNJOHY.js";
18
- import "./chunk-EQIJ5MHR.js";
18
+ import "./chunk-LTXS26K5.js";
19
19
  import "./chunk-NSTQ6QKD.js";
20
20
  import "./chunk-KGZBYWZ3.js";
21
21
  import "./chunk-JTJHOYCU.js";
@@ -17,13 +17,13 @@ import {
17
17
  orchestratorSessionPoisonedByBuiltins,
18
18
  slackCoordinatorSourceRef,
19
19
  takenTeamSlugsForOrchestration
20
- } from "./chunk-SIMFKJIB.js";
21
- import "./chunk-MEZXWELT.js";
20
+ } from "./chunk-HZROPNYL.js";
21
+ import "./chunk-IO5WGZRR.js";
22
22
  import "./chunk-5U4NZLBH.js";
23
23
  import "./chunk-LZQULFIT.js";
24
24
  import "./chunk-SYFVUF2C.js";
25
25
  import "./chunk-FNQNJOHY.js";
26
- import "./chunk-EQIJ5MHR.js";
26
+ import "./chunk-LTXS26K5.js";
27
27
  import "./chunk-NSTQ6QKD.js";
28
28
  import "./chunk-KGZBYWZ3.js";
29
29
  import {
@@ -15,10 +15,10 @@ import {
15
15
  orchestratorSessionPoisonedByBuiltins,
16
16
  slackCoordinatorSourceRef,
17
17
  takenTeamSlugsForOrchestration
18
- } from "./chunk-O7RWWPMR.js";
19
- import "./chunk-KEDHHXKW.js";
18
+ } from "./chunk-QANLIT2E.js";
19
+ import "./chunk-UUEBNUEG.js";
20
20
  import "./chunk-JRH62XC4.js";
21
- import "./chunk-FLG4A5FJ.js";
21
+ import "./chunk-CVZ4KXVP.js";
22
22
  import "./chunk-4TR3HZFT.js";
23
23
  import "./chunk-JT7R45JB.js";
24
24
  import "./chunk-7UURXPKD.js";
package/dist/index.cjs CHANGED
@@ -1317,14 +1317,19 @@ function findProjectProfileKey(projects, repoPath) {
1317
1317
  const want = profileRepoKey(repoPath ?? "");
1318
1318
  if (!want) return void 0;
1319
1319
  if (projects[want]) return want;
1320
+ let best;
1321
+ let bestLen = 0;
1320
1322
  for (const key of Object.keys(projects)) {
1321
1323
  const stored = profileRepoKey(key);
1322
1324
  if (!stored) continue;
1323
- if (stored === want || want.startsWith(`${stored}/`) || stored.startsWith(`${want}/`)) {
1324
- return key;
1325
+ if (stored === want || want.startsWith(`${stored}/`)) {
1326
+ if (stored.length > bestLen) {
1327
+ best = key;
1328
+ bestLen = stored.length;
1329
+ }
1325
1330
  }
1326
1331
  }
1327
- return void 0;
1332
+ return best;
1328
1333
  }
1329
1334
  function normalizeAdvanced(raw) {
1330
1335
  if (!raw || typeof raw !== "object") return {};
@@ -25686,11 +25691,14 @@ function text5(payload, isError = false) {
25686
25691
  function matchRegisteredWorkspace(repoPath) {
25687
25692
  const hint = (repoPath ?? "").trim().replace(/\/+$/, "");
25688
25693
  if (!hint) return null;
25689
- const match = listWorkspaces().find((w) => {
25694
+ let best = null;
25695
+ for (const w of listWorkspaces()) {
25690
25696
  const stored = w.path.replace(/\/+$/, "");
25691
- return stored === hint || hint.startsWith(`${stored}/`) || stored.startsWith(`${hint}/`);
25692
- });
25693
- return match?.path.replace(/\/+$/, "") ?? null;
25697
+ if (stored === hint || hint.startsWith(`${stored}/`)) {
25698
+ if (!best || stored.length > best.length) best = stored;
25699
+ }
25700
+ }
25701
+ return best;
25694
25702
  }
25695
25703
  async function resolveProjectRepoPath(repoPath) {
25696
25704
  const hint = repoPath?.trim() || process.cwd();
package/dist/index.js CHANGED
@@ -234,7 +234,7 @@ import {
234
234
  worktreeCleanupSettings,
235
235
  wrapReviewSkillMarkdown,
236
236
  writeWorktreeFile
237
- } from "./chunk-OYOXLY6B.js";
237
+ } from "./chunk-BQ4PEXIF.js";
238
238
  import {
239
239
  LEGACY_PLAN_FILE_REL,
240
240
  PLAN_FILE_NAME,
@@ -337,7 +337,7 @@ import {
337
337
  withEventParentId,
338
338
  withEventsParentId,
339
339
  writeInjectedMcpConfig
340
- } from "./chunk-V4R6L2ZL.js";
340
+ } from "./chunk-RQNXLIXO.js";
341
341
  import {
342
342
  CLOUD_COORDINATOR_BUSY_REPLY,
343
343
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -384,7 +384,7 @@ import {
384
384
  stageBuffersAsAttachments,
385
385
  syncWorkspacesFromThreads,
386
386
  takenTeamSlugsForOrchestration
387
- } from "./chunk-O7RWWPMR.js";
387
+ } from "./chunk-QANLIT2E.js";
388
388
  import {
389
389
  FAMOUS_SOCCER_TEAMS,
390
390
  GITHUB_PR_BODY_MAX_CHARS,
@@ -477,7 +477,7 @@ import {
477
477
  worktreeDisplayLabel,
478
478
  worktreeDisplayLabelForGroup,
479
479
  worktreeNameFromPath
480
- } from "./chunk-KEDHHXKW.js";
480
+ } from "./chunk-UUEBNUEG.js";
481
481
  import {
482
482
  ATTACHMENTS_DIR,
483
483
  DETACHED_JOBS_DIR,
@@ -527,7 +527,7 @@ import {
527
527
  toAbleTimeIssueInfo,
528
528
  updateAbleTimeTask,
529
529
  verifyAbleTimeConnection
530
- } from "./chunk-AGLPYXDT.js";
530
+ } from "./chunk-ILXKJ4ZD.js";
531
531
  import {
532
532
  formatFetchError,
533
533
  httpFetch,
@@ -631,7 +631,7 @@ import {
631
631
  updateOpencodeSettings,
632
632
  updateProjectProfileSettings,
633
633
  writeViewerContext
634
- } from "./chunk-FLG4A5FJ.js";
634
+ } from "./chunk-CVZ4KXVP.js";
635
635
  import {
636
636
  stripNestedElectronEnv
637
637
  } from "./chunk-4TR3HZFT.js";
@@ -3234,11 +3234,14 @@ function text5(payload, isError = false) {
3234
3234
  function matchRegisteredWorkspace(repoPath) {
3235
3235
  const hint = (repoPath ?? "").trim().replace(/\/+$/, "");
3236
3236
  if (!hint) return null;
3237
- const match = listWorkspaces().find((w) => {
3237
+ let best = null;
3238
+ for (const w of listWorkspaces()) {
3238
3239
  const stored = w.path.replace(/\/+$/, "");
3239
- return stored === hint || hint.startsWith(`${stored}/`) || stored.startsWith(`${hint}/`);
3240
- });
3241
- return match?.path.replace(/\/+$/, "") ?? null;
3240
+ if (stored === hint || hint.startsWith(`${stored}/`)) {
3241
+ if (!best || stored.length > best.length) best = stored;
3242
+ }
3243
+ }
3244
+ return best;
3242
3245
  }
3243
3246
  async function resolveProjectRepoPath(repoPath) {
3244
3247
  const hint = repoPath?.trim() || process.cwd();
@@ -3913,7 +3916,7 @@ async function startMcpServer() {
3913
3916
  );
3914
3917
  }
3915
3918
  try {
3916
- const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-YWJ4MVYM.js");
3919
+ const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-JJQDWPEK.js");
3917
3920
  orch.setMaxConcurrent(maxConcurrentAgents2());
3918
3921
  } catch {
3919
3922
  }
@@ -4221,7 +4224,7 @@ async function startMcpServer() {
4221
4224
  registerConnectedIssueVendorTools(server);
4222
4225
  registerScheduleTools(server);
4223
4226
  const { getCaffeinateHold: getCaffeinateHold2, setCaffeinateHold: setCaffeinateHold2 } = await import("./caffeinate-hold-SK2QISPE.js");
4224
- const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-YWJ4MVYM.js");
4227
+ const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-JJQDWPEK.js");
4225
4228
  const accountDefaults = resolveThreadDefaults2();
4226
4229
  const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
4227
4230
  server.tool(
@@ -3544,14 +3544,19 @@ function findProjectProfileKey(projects, repoPath) {
3544
3544
  const want = profileRepoKey(repoPath ?? "");
3545
3545
  if (!want) return void 0;
3546
3546
  if (projects[want]) return want;
3547
+ let best;
3548
+ let bestLen = 0;
3547
3549
  for (const key of Object.keys(projects)) {
3548
3550
  const stored = profileRepoKey(key);
3549
3551
  if (!stored) continue;
3550
- if (stored === want || want.startsWith(`${stored}/`) || stored.startsWith(`${want}/`)) {
3551
- return key;
3552
+ if (stored === want || want.startsWith(`${stored}/`)) {
3553
+ if (stored.length > bestLen) {
3554
+ best = key;
3555
+ bestLen = stored.length;
3556
+ }
3552
3557
  }
3553
3558
  }
3554
- return void 0;
3559
+ return best;
3555
3560
  }
3556
3561
  function normalizeAdvanced(raw) {
3557
3562
  if (!raw || typeof raw !== "object") return {};
@@ -22739,11 +22744,14 @@ function text5(payload, isError = false) {
22739
22744
  function matchRegisteredWorkspace(repoPath) {
22740
22745
  const hint = (repoPath ?? "").trim().replace(/\/+$/, "");
22741
22746
  if (!hint) return null;
22742
- const match = listWorkspaces().find((w) => {
22747
+ let best = null;
22748
+ for (const w of listWorkspaces()) {
22743
22749
  const stored = w.path.replace(/\/+$/, "");
22744
- return stored === hint || hint.startsWith(`${stored}/`) || stored.startsWith(`${hint}/`);
22745
- });
22746
- return match?.path.replace(/\/+$/, "") ?? null;
22750
+ if (stored === hint || hint.startsWith(`${stored}/`)) {
22751
+ if (!best || stored.length > best.length) best = stored;
22752
+ }
22753
+ }
22754
+ return best;
22747
22755
  }
22748
22756
  async function resolveProjectRepoPath(repoPath) {
22749
22757
  const hint = repoPath?.trim() || process.cwd();
@@ -36,12 +36,12 @@ import {
36
36
  syncBoardPins,
37
37
  updateSchedule,
38
38
  waitForDetachedJob
39
- } from "../chunk-TGU3LSDG.js";
39
+ } from "../chunk-QYKADGPP.js";
40
40
  import {
41
41
  isInternalAgentStatusText,
42
42
  listModelsForAgent,
43
43
  sideboardMcpProfile
44
- } from "../chunk-DWUOKF3W.js";
44
+ } from "../chunk-7OWRFJK6.js";
45
45
  import "../chunk-LZ6QMEQC.js";
46
46
  import "../chunk-S42XV45P.js";
47
47
  import {
@@ -56,7 +56,7 @@ import {
56
56
  searchAbleTimeTasks,
57
57
  toAbleTimeIssueInfo,
58
58
  updateAbleTimeTask
59
- } from "../chunk-UBMCEZRE.js";
59
+ } from "../chunk-KJFFQAMA.js";
60
60
  import {
61
61
  httpFetch
62
62
  } from "../chunk-6GN5WPYZ.js";
@@ -66,7 +66,7 @@ import {
66
66
  GLOBAL_WORKSPACE_ID,
67
67
  isCloudCoordinatorThread,
68
68
  listWorkspaces
69
- } from "../chunk-SIMFKJIB.js";
69
+ } from "../chunk-HZROPNYL.js";
70
70
  import {
71
71
  canonicalizeRepoPath,
72
72
  formatGhLandError,
@@ -77,7 +77,7 @@ import {
77
77
  resolveListPrsOptions,
78
78
  resolveRepoRoot,
79
79
  warmGithubAgentAuth
80
- } from "../chunk-MEZXWELT.js";
80
+ } from "../chunk-IO5WGZRR.js";
81
81
  import "../chunk-5U4NZLBH.js";
82
82
  import "../chunk-LZQULFIT.js";
83
83
  import "../chunk-SYFVUF2C.js";
@@ -97,7 +97,7 @@ import {
97
97
  resolveViewerProfileForRepo,
98
98
  saveLinearOAuth,
99
99
  writeViewerContext
100
- } from "../chunk-EQIJ5MHR.js";
100
+ } from "../chunk-LTXS26K5.js";
101
101
  import "../chunk-NSTQ6QKD.js";
102
102
  import "../chunk-KGZBYWZ3.js";
103
103
  import {
@@ -2049,11 +2049,14 @@ function text5(payload, isError = false) {
2049
2049
  function matchRegisteredWorkspace(repoPath) {
2050
2050
  const hint = (repoPath ?? "").trim().replace(/\/+$/, "");
2051
2051
  if (!hint) return null;
2052
- const match = listWorkspaces().find((w) => {
2052
+ let best = null;
2053
+ for (const w of listWorkspaces()) {
2053
2054
  const stored = w.path.replace(/\/+$/, "");
2054
- return stored === hint || hint.startsWith(`${stored}/`) || stored.startsWith(`${hint}/`);
2055
- });
2056
- return match?.path.replace(/\/+$/, "") ?? null;
2055
+ if (stored === hint || hint.startsWith(`${stored}/`)) {
2056
+ if (!best || stored.length > best.length) best = stored;
2057
+ }
2058
+ }
2059
+ return best;
2057
2060
  }
2058
2061
  async function resolveProjectRepoPath(repoPath) {
2059
2062
  const hint = repoPath?.trim() || process.cwd();
@@ -2666,7 +2669,7 @@ async function startMcpServer() {
2666
2669
  );
2667
2670
  }
2668
2671
  try {
2669
- const { maxConcurrentAgents } = await import("../app-settings-BJ5GFAE5.js");
2672
+ const { maxConcurrentAgents } = await import("../app-settings-BRLZQA7N.js");
2670
2673
  orch.setMaxConcurrent(maxConcurrentAgents());
2671
2674
  } catch {
2672
2675
  }
@@ -2974,7 +2977,7 @@ async function startMcpServer() {
2974
2977
  registerConnectedIssueVendorTools(server);
2975
2978
  registerScheduleTools(server);
2976
2979
  const { getCaffeinateHold, setCaffeinateHold } = await import("../caffeinate-hold-DBKMRZZO.js");
2977
- const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-BJ5GFAE5.js");
2980
+ const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-BRLZQA7N.js");
2978
2981
  const accountDefaults = resolveThreadDefaults();
2979
2982
  const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
2980
2983
  server.tool(
@@ -5,18 +5,18 @@ import {
5
5
  isPidAlive,
6
6
  startOrchestration,
7
7
  waitForPidExit
8
- } from "./chunk-OYOXLY6B.js";
8
+ } from "./chunk-BQ4PEXIF.js";
9
9
  import "./chunk-RFMQY56R.js";
10
- import "./chunk-V4R6L2ZL.js";
11
- import "./chunk-O7RWWPMR.js";
12
- import "./chunk-KEDHHXKW.js";
10
+ import "./chunk-RQNXLIXO.js";
11
+ import "./chunk-QANLIT2E.js";
12
+ import "./chunk-UUEBNUEG.js";
13
13
  import "./chunk-JRH62XC4.js";
14
14
  import "./chunk-XD2BAANL.js";
15
15
  import "./chunk-M267JPEA.js";
16
16
  import "./chunk-ELBYOGVA.js";
17
17
  import "./chunk-AXQ4ZWHK.js";
18
18
  import "./chunk-HEII7W3Q.js";
19
- import "./chunk-FLG4A5FJ.js";
19
+ import "./chunk-CVZ4KXVP.js";
20
20
  import "./chunk-4TR3HZFT.js";
21
21
  import "./chunk-AO35MGOE.js";
22
22
  import "./chunk-JT7R45JB.js";
@@ -7,20 +7,20 @@ import {
7
7
  isPidAlive,
8
8
  startOrchestration,
9
9
  waitForPidExit
10
- } from "./chunk-TGU3LSDG.js";
11
- import "./chunk-DWUOKF3W.js";
10
+ } from "./chunk-QYKADGPP.js";
11
+ import "./chunk-7OWRFJK6.js";
12
12
  import "./chunk-LZ6QMEQC.js";
13
13
  import "./chunk-S42XV45P.js";
14
14
  import "./chunk-6GN5WPYZ.js";
15
15
  import "./chunk-JV4VNFMS.js";
16
16
  import "./chunk-OCQPTUR7.js";
17
- import "./chunk-SIMFKJIB.js";
18
- import "./chunk-MEZXWELT.js";
17
+ import "./chunk-HZROPNYL.js";
18
+ import "./chunk-IO5WGZRR.js";
19
19
  import "./chunk-5U4NZLBH.js";
20
20
  import "./chunk-LZQULFIT.js";
21
21
  import "./chunk-SYFVUF2C.js";
22
22
  import "./chunk-FNQNJOHY.js";
23
- import "./chunk-EQIJ5MHR.js";
23
+ import "./chunk-LTXS26K5.js";
24
24
  import "./chunk-NSTQ6QKD.js";
25
25
  import "./chunk-KGZBYWZ3.js";
26
26
  import "./chunk-JTJHOYCU.js";
@@ -4,10 +4,10 @@ import {
4
4
  listWorkspaces,
5
5
  removeWorkspace,
6
6
  syncWorkspacesFromThreads
7
- } from "./chunk-O7RWWPMR.js";
8
- import "./chunk-KEDHHXKW.js";
7
+ } from "./chunk-QANLIT2E.js";
8
+ import "./chunk-UUEBNUEG.js";
9
9
  import "./chunk-JRH62XC4.js";
10
- import "./chunk-FLG4A5FJ.js";
10
+ import "./chunk-CVZ4KXVP.js";
11
11
  import "./chunk-4TR3HZFT.js";
12
12
  import "./chunk-JT7R45JB.js";
13
13
  import "./chunk-7UURXPKD.js";
@@ -6,13 +6,13 @@ import {
6
6
  listWorkspaces,
7
7
  removeWorkspace,
8
8
  syncWorkspacesFromThreads
9
- } from "./chunk-SIMFKJIB.js";
10
- import "./chunk-MEZXWELT.js";
9
+ } from "./chunk-HZROPNYL.js";
10
+ import "./chunk-IO5WGZRR.js";
11
11
  import "./chunk-5U4NZLBH.js";
12
12
  import "./chunk-LZQULFIT.js";
13
13
  import "./chunk-SYFVUF2C.js";
14
14
  import "./chunk-FNQNJOHY.js";
15
- import "./chunk-EQIJ5MHR.js";
15
+ import "./chunk-LTXS26K5.js";
16
16
  import "./chunk-NSTQ6QKD.js";
17
17
  import "./chunk-KGZBYWZ3.js";
18
18
  import "./chunk-JTJHOYCU.js";
@@ -55,12 +55,12 @@ import {
55
55
  worktreeDisplayLabel,
56
56
  worktreeDisplayLabelForGroup,
57
57
  worktreeNameFromPath
58
- } from "./chunk-MEZXWELT.js";
58
+ } from "./chunk-IO5WGZRR.js";
59
59
  import "./chunk-5U4NZLBH.js";
60
60
  import "./chunk-LZQULFIT.js";
61
61
  import "./chunk-SYFVUF2C.js";
62
62
  import "./chunk-FNQNJOHY.js";
63
- import "./chunk-EQIJ5MHR.js";
63
+ import "./chunk-LTXS26K5.js";
64
64
  import "./chunk-NSTQ6QKD.js";
65
65
  import "./chunk-KGZBYWZ3.js";
66
66
  import "./chunk-JTJHOYCU.js";
@@ -53,9 +53,9 @@ import {
53
53
  worktreeDisplayLabel,
54
54
  worktreeDisplayLabelForGroup,
55
55
  worktreeNameFromPath
56
- } from "./chunk-KEDHHXKW.js";
56
+ } from "./chunk-UUEBNUEG.js";
57
57
  import "./chunk-JRH62XC4.js";
58
- import "./chunk-FLG4A5FJ.js";
58
+ import "./chunk-CVZ4KXVP.js";
59
59
  import "./chunk-4TR3HZFT.js";
60
60
  import "./chunk-JT7R45JB.js";
61
61
  import "./chunk-7UURXPKD.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideboard-ai/core",
3
- "version": "0.1.159",
3
+ "version": "0.1.160",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",