@sideboard-ai/core 0.1.159 → 0.1.161

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-FLG4A5FJ.js → chunk-CVZ4KXVP.js} +8 -3
  9. package/dist/{chunk-TGU3LSDG.js → chunk-EZANYS5D.js} +22 -22
  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-OYOXLY6B.js → chunk-MIX4R72K.js} +23 -23
  16. package/dist/{chunk-O7RWWPMR.js → chunk-QANLIT2E.js} +2 -2
  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 +756 -614
  24. package/dist/index.js +746 -612
  25. package/dist/mcp/run-stdio.cjs +756 -614
  26. package/dist/mcp/run-stdio.js +746 -612
  27. package/dist/{orchestrator-NSVP7DJH.js → orchestrator-6FZBSP5B.js} +5 -5
  28. package/dist/{orchestrator-KFLS5BTP.js → orchestrator-QREP2CFO.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,
@@ -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 {};
@@ -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-6FZBSP5B.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);
@@ -5627,17 +5627,17 @@ function formatIssueToolsDirective(opts) {
5627
5627
  ];
5628
5628
  if (opts.linear) {
5629
5629
  lines.push(
5630
- "- Linear: `linear_get_issue` (comments), `linear_comment`, `linear_update_issue` (state), `linear_create_issue` (pass `parent` for spin-offs; call `linear_list_teams` first). Scope errors: reconnect Linear in Settings \u2192 Issues."
5630
+ "- Linear: `linear_get_issue` (comments; pass `include=full` if crush.truncated), `linear_comment`, `linear_update_issue` (state), `linear_create_issue` (pass `parent` for spin-offs; call `linear_list_teams` first). Scope errors: reconnect Linear in Settings \u2192 Issues."
5631
5631
  );
5632
5632
  }
5633
5633
  if (github) {
5634
5634
  lines.push(
5635
- "- GitHub: `github_get_issue` (comments), `github_comment`, `github_update_issue` (state open|closed), `github_create_issue` (pass `parent` for spin-offs). Uses Account `gh`."
5635
+ "- GitHub: `github_get_issue` (comments; pass `include=full` if crush.truncated), `github_comment`, `github_update_issue` (state open|closed), `github_create_issue` (pass `parent` for spin-offs). Uses Account `gh`."
5636
5636
  );
5637
5637
  }
5638
5638
  if (opts.abletime) {
5639
5639
  lines.push(
5640
- "- AbleTime: `abletime_get_task` (comments), `abletime_comment`, `abletime_update_task` (state), `abletime_create_task` (pass `parent` for spin-offs; `abletime_list_projects` if needed)."
5640
+ "- AbleTime: `abletime_get_task` (comments; pass `include=full` if crush.truncated), `abletime_comment`, `abletime_update_task` (state), `abletime_create_task` (pass `parent` for spin-offs; `abletime_list_projects` if needed)."
5641
5641
  );
5642
5642
  }
5643
5643
  lines.push(
@@ -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-6FZBSP5B.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({
@@ -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 {};
@@ -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-QREP2CFO.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);
@@ -5783,17 +5783,17 @@ function formatIssueToolsDirective(opts) {
5783
5783
  ];
5784
5784
  if (opts.linear) {
5785
5785
  lines.push(
5786
- "- Linear: `linear_get_issue` (comments), `linear_comment`, `linear_update_issue` (state), `linear_create_issue` (pass `parent` for spin-offs; call `linear_list_teams` first). Scope errors: reconnect Linear in Settings \u2192 Issues."
5786
+ "- Linear: `linear_get_issue` (comments; pass `include=full` if crush.truncated), `linear_comment`, `linear_update_issue` (state), `linear_create_issue` (pass `parent` for spin-offs; call `linear_list_teams` first). Scope errors: reconnect Linear in Settings \u2192 Issues."
5787
5787
  );
5788
5788
  }
5789
5789
  if (github) {
5790
5790
  lines.push(
5791
- "- GitHub: `github_get_issue` (comments), `github_comment`, `github_update_issue` (state open|closed), `github_create_issue` (pass `parent` for spin-offs). Uses Account `gh`."
5791
+ "- GitHub: `github_get_issue` (comments; pass `include=full` if crush.truncated), `github_comment`, `github_update_issue` (state open|closed), `github_create_issue` (pass `parent` for spin-offs). Uses Account `gh`."
5792
5792
  );
5793
5793
  }
5794
5794
  if (opts.abletime) {
5795
5795
  lines.push(
5796
- "- AbleTime: `abletime_get_task` (comments), `abletime_comment`, `abletime_update_task` (state), `abletime_create_task` (pass `parent` for spin-offs; `abletime_list_projects` if needed)."
5796
+ "- AbleTime: `abletime_get_task` (comments; pass `include=full` if crush.truncated), `abletime_comment`, `abletime_update_task` (state), `abletime_create_task` (pass `parent` for spin-offs; `abletime_list_projects` if needed)."
5797
5797
  );
5798
5798
  }
5799
5799
  lines.push(
@@ -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-QREP2CFO.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({
@@ -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,
@@ -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,