@sideboard-ai/core 0.1.314 → 0.1.315

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 (59) hide show
  1. package/dist/{abletime-SJUVZVRU.js → abletime-QK3KMRQD.js} +4 -4
  2. package/dist/{abletime-T5YSJLNZ.js → abletime-QQZWYJXC.js} +4 -4
  3. package/dist/{abletime-oauth-73TFJME4.js → abletime-oauth-CAHTMB4V.js} +3 -3
  4. package/dist/{abletime-oauth-2TOOZ2FN.js → abletime-oauth-I2RRPVKT.js} +3 -3
  5. package/dist/{abletime-rest-PNUGH2FS.js → abletime-rest-5V4KGMSY.js} +3 -3
  6. package/dist/{abletime-rest-5TDRIFEV.js → abletime-rest-W5TLQK7C.js} +3 -3
  7. package/dist/{agents-KIC6CNXF.js → agents-5XJ7EHGU.js} +6 -6
  8. package/dist/{agents-S7VBS5JL.js → agents-Y3M3EKLY.js} +6 -6
  9. package/dist/{app-settings-CC65VPBL.js → app-settings-CZVFMOI5.js} +3 -1
  10. package/dist/{app-settings-DZ5AY7N5.js → app-settings-RQAFJZCD.js} +3 -1
  11. package/dist/{chunk-EGTCXNQM.js → chunk-53OCOGND.js} +2 -2
  12. package/dist/{chunk-DLGGLV2M.js → chunk-5CTG5W7S.js} +2 -2
  13. package/dist/{chunk-JARCAPKL.js → chunk-72OWKHFJ.js} +3 -3
  14. package/dist/{chunk-CW4FIIDE.js → chunk-7J2KOIYD.js} +3 -3
  15. package/dist/{chunk-6EGQPMSR.js → chunk-BMORGDYI.js} +46 -26
  16. package/dist/{chunk-BIPXOHZI.js → chunk-BPBDGJ43.js} +2 -2
  17. package/dist/{chunk-HG25AYBV.js → chunk-CHUPIJP7.js} +14 -0
  18. package/dist/{chunk-YK77HB3W.js → chunk-CYPFOIUK.js} +45 -25
  19. package/dist/{chunk-JWW66PO3.js → chunk-DV6ID6CK.js} +5 -5
  20. package/dist/{chunk-A45QMSVB.js → chunk-FVTR54LY.js} +5 -5
  21. package/dist/{chunk-PHMFAU35.js → chunk-GCHSJCCX.js} +96 -64
  22. package/dist/{chunk-ZSVKUOFH.js → chunk-GFM63DTU.js} +8 -5
  23. package/dist/{chunk-7UP4D5XI.js → chunk-IODJCVMN.js} +5 -5
  24. package/dist/{chunk-CFTOKVQN.js → chunk-JRZTJ4F7.js} +5 -5
  25. package/dist/{chunk-TO5UL7VN.js → chunk-MBYGWNLQ.js} +1 -1
  26. package/dist/{chunk-OLSLE3LO.js → chunk-MKGSMPWB.js} +3 -3
  27. package/dist/{chunk-7DBL5AF4.js → chunk-NKVNHBDB.js} +4 -4
  28. package/dist/{chunk-U4WACWBC.js → chunk-NXNNYY3Q.js} +2 -2
  29. package/dist/{chunk-SZ3XS2WM.js → chunk-NZVD5EVX.js} +2 -2
  30. package/dist/{chunk-NMPQ7GIS.js → chunk-OLYNM52B.js} +2 -2
  31. package/dist/{chunk-S3KYDK6W.js → chunk-PN32Z4JL.js} +8 -5
  32. package/dist/{chunk-ZQLZ2A3I.js → chunk-S3U4HR5F.js} +2 -2
  33. package/dist/{chunk-3UDRWMIM.js → chunk-U35AHE2P.js} +14 -0
  34. package/dist/{chunk-A2YXQC65.js → chunk-U7PNCYNX.js} +96 -64
  35. package/dist/{chunk-6424BACS.js → chunk-Y4WARKPW.js} +2 -2
  36. package/dist/{chunk-5QYCCXXQ.js → chunk-YR7NZYUT.js} +5 -5
  37. package/dist/{conductor-IIDQ2U24.js → conductor-DKWTQADV.js} +5 -5
  38. package/dist/{conductor-G6TKCMIW.js → conductor-IMKNYQWZ.js} +5 -5
  39. package/dist/{coordinator-prompt-EXJSULAR.js → coordinator-prompt-HUZC4DZ2.js} +4 -4
  40. package/dist/{coordinator-prompt-5USNNCG6.js → coordinator-prompt-SPOYUZG5.js} +4 -4
  41. package/dist/{global-workspace-ZGPIGJ6J.js → global-workspace-3NNDDTFD.js} +4 -4
  42. package/dist/{global-workspace-UDRTONQE.js → global-workspace-SK4JQBPN.js} +4 -4
  43. package/dist/index.cjs +155 -65
  44. package/dist/index.d.cts +71 -51
  45. package/dist/index.d.ts +71 -51
  46. package/dist/index.js +25 -21
  47. package/dist/mcp/run-stdio.cjs +150 -63
  48. package/dist/mcp/run-stdio.js +15 -14
  49. package/dist/{optional-cli-MLZSE6KW.js → optional-cli-EMSZBYDE.js} +3 -3
  50. package/dist/{optional-cli-SI4BCPRH.js → optional-cli-LMSRZNH4.js} +4 -4
  51. package/dist/{orchestrator-V6NLIPLH.js → orchestrator-4XFRK57E.js} +9 -9
  52. package/dist/{orchestrator-AM7VT2BD.js → orchestrator-ZRMZ4TCL.js} +9 -9
  53. package/dist/{thread-store-HY22M5A7.js → thread-store-5OF6M6VZ.js} +1 -1
  54. package/dist/{thread-store-XMUQDO5O.js → thread-store-GOVVXQV2.js} +1 -1
  55. package/dist/{workspaces-3TTODHKN.js → workspaces-52L6NZ3P.js} +4 -4
  56. package/dist/{workspaces-TATO466L.js → workspaces-EYNZDL45.js} +4 -4
  57. package/dist/{worktree-C5VI46RZ.js → worktree-BP5ICYQ2.js} +3 -3
  58. package/dist/{worktree-FMK57ULT.js → worktree-UCOSAI7J.js} +3 -3
  59. package/package.json +1 -1
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  formatOptionalServicesDirectiveForTurn,
8
8
  formatOptionalServicesReminderForTurn
9
- } from "./chunk-TO5UL7VN.js";
9
+ } from "./chunk-MBYGWNLQ.js";
10
10
  import {
11
11
  extractPresentedPlan,
12
12
  isPresentPlanToolName,
@@ -27,7 +27,7 @@ import {
27
27
  parseSessionQuotaResetAt,
28
28
  planModeTurnInstruction,
29
29
  resolveQuotaFallbackAgent
30
- } from "./chunk-A45QMSVB.js";
30
+ } from "./chunk-FVTR54LY.js";
31
31
  import {
32
32
  REVIEW_TAB_TITLE,
33
33
  applyWorktreePkgCacheEnv,
@@ -69,7 +69,7 @@ import {
69
69
  worktreeDevProcessKey,
70
70
  worktreeRunProcessKey,
71
71
  worktreeSetupProcessKey
72
- } from "./chunk-5QYCCXXQ.js";
72
+ } from "./chunk-YR7NZYUT.js";
73
73
  import {
74
74
  applyAgentEvent,
75
75
  clipAgentEventForPaint,
@@ -121,7 +121,7 @@ import {
121
121
  stageAbsolutePathsAsAttachments,
122
122
  stageBuffersAsAttachments,
123
123
  syncWorkspacesFromThreads
124
- } from "./chunk-S3KYDK6W.js";
124
+ } from "./chunk-PN32Z4JL.js";
125
125
  import {
126
126
  addPrStackLayer,
127
127
  allocateTeamSlug,
@@ -163,7 +163,7 @@ import {
163
163
  resolveRepoRoot,
164
164
  switchWorktreeBranch,
165
165
  withRepoGitLock
166
- } from "./chunk-DLGGLV2M.js";
166
+ } from "./chunk-5CTG5W7S.js";
167
167
  import {
168
168
  clearStaleIndexLocks,
169
169
  enrichPathWithNpmGlobalBin,
@@ -182,6 +182,7 @@ import {
182
182
  followUpBehavior,
183
183
  formatViewerContextDirective,
184
184
  formatViewerContextReminder,
185
+ getDefaultAutonomy,
185
186
  getIssueSource,
186
187
  historyMaxCount,
187
188
  historyMaxDays,
@@ -204,7 +205,7 @@ import {
204
205
  usageOnLimit,
205
206
  withTurnScopedCost,
206
207
  writeViewerContext
207
- } from "./chunk-PHMFAU35.js";
208
+ } from "./chunk-GCHSJCCX.js";
208
209
  import {
209
210
  writePrivateFile
210
211
  } from "./chunk-NSTQ6QKD.js";
@@ -241,7 +242,7 @@ import {
241
242
  worktreeNameFromPath,
242
243
  worktreeSlugForTicket,
243
244
  writeThread
244
- } from "./chunk-3UDRWMIM.js";
245
+ } from "./chunk-U35AHE2P.js";
245
246
  import {
246
247
  annotateDevAccessRuns,
247
248
  appDataDir,
@@ -506,9 +507,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
506
507
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
507
508
  );
508
509
  }
509
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-UDRTONQE.js");
510
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-SK4JQBPN.js");
510
511
  if (isGlobalThread2(thread)) {
511
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-EXJSULAR.js");
512
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-HUZC4DZ2.js");
512
513
  ensureGlobalCoordinatorCwd2(
513
514
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
514
515
  );
@@ -2010,6 +2011,22 @@ async function requireAgent(agent, opts) {
2010
2011
  return status;
2011
2012
  }
2012
2013
 
2014
+ // src/board/issue-blocked-view.ts
2015
+ function issueBlockedByIds(group) {
2016
+ const out = [];
2017
+ const seen = /* @__PURE__ */ new Set();
2018
+ for (const thread of group) {
2019
+ for (const raw of thread.issueBlockedBy ?? []) {
2020
+ const id = String(raw ?? "").trim();
2021
+ const key = id.toLowerCase();
2022
+ if (!id || seen.has(key)) continue;
2023
+ seen.add(key);
2024
+ out.push(id);
2025
+ }
2026
+ }
2027
+ return out;
2028
+ }
2029
+
2013
2030
  // src/board/pr-state.ts
2014
2031
  function isOpenPrState(prUrl, prState) {
2015
2032
  if (!prUrl?.trim()) return false;
@@ -2417,6 +2434,7 @@ function toThreadCard(group) {
2417
2434
  const thread = group[0];
2418
2435
  const withPr = group.find((t) => t.prUrl?.trim()) ?? thread;
2419
2436
  const tags = workspaceTagsFromGroup(group);
2437
+ const issueBlockedBy = issueBlockedByIds(group);
2420
2438
  return {
2421
2439
  kind: "thread",
2422
2440
  id: thread.id,
@@ -2430,6 +2448,7 @@ function toThreadCard(group) {
2430
2448
  link: `sideboard://chat/${thread.id}`,
2431
2449
  ...group.length > 1 ? { chatCount: group.length } : {},
2432
2450
  ...threadCardBlockFields(group) ?? {},
2451
+ ...issueBlockedBy.length > 0 ? { issueBlockedBy } : {},
2433
2452
  ...tags.length > 0 ? { tags } : {}
2434
2453
  };
2435
2454
  }
@@ -2506,7 +2525,7 @@ function assembleHomeBoard(input) {
2506
2525
  }
2507
2526
  return { columns, hidden, totals };
2508
2527
  }
2509
- var HOME_BOARD_AGENT_HINT = "Home is a Kanban of workspaces (one card per checkout; sibling chats on a card are separate agents). Do not create a second workspace for a ticket, PR, or named branch that already has a live checkout \u2014 create_workspace / start_board_card return that checkout (alreadyStarted) and its chats. Add another agent with fork_chat. Creating from the default branch still opens a new isolated workspace. Columns are the path to merge: New (no PR) \u2192 Draft (draft PR) \u2192 Review (open PR) \u2192 Approved (approved, not merged) \u2192 Merged. ownership=mine is PRs you authored (or WIP with no PR); ownership=reviewing is someone else's PR (or a review-requested checkout). Viewer login comes from gh, not a setting. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not columns. blockedReason means an agent on that card is waiting on a person (the question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in. Orchestration chats stay in the sidebar. Do not invent status.";
2528
+ var HOME_BOARD_AGENT_HINT = "Home is a Kanban of workspaces (one card per checkout; sibling chats on a card are separate agents). Do not create a second workspace for a ticket, PR, or named branch that already has a live checkout \u2014 create_workspace / start_board_card return that checkout (alreadyStarted) and its chats. Add another agent with fork_chat. Creating from the default branch still opens a new isolated workspace. Columns are the path to merge: New (no PR) \u2192 Draft (draft PR) \u2192 Review (open PR) \u2192 Approved (approved, not merged) \u2192 Merged. ownership=mine is PRs you authored (or WIP with no PR); ownership=reviewing is someone else's PR (or a review-requested checkout). Viewer login comes from gh, not a setting. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not columns. blockedReason means an agent on that card is waiting on a person (the question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in. issueBlockedBy, when present, lists issues blocking that workspace's source ticket (the tracker dependency, not a person). Orchestration chats stay in the sidebar. Do not invent status.";
2510
2529
 
2511
2530
  // src/threads/workspace-tags.ts
2512
2531
  function workspaceTagTargetRef(opts) {
@@ -2608,11 +2627,12 @@ async function createThread(input, _onSetupLine) {
2608
2627
  agent: input.agent,
2609
2628
  model: input.model,
2610
2629
  effort: input.effort,
2611
- fast: input.fast
2630
+ fast: input.fast,
2631
+ autonomy: input.autonomy
2612
2632
  });
2613
2633
  await requireAgent(resolved.agent);
2614
2634
  if (input.cowboy) {
2615
- const { cowboyModeEnabled } = await import("./app-settings-CC65VPBL.js");
2635
+ const { cowboyModeEnabled } = await import("./app-settings-CZVFMOI5.js");
2616
2636
  if (!cowboyModeEnabled()) {
2617
2637
  throw new Error(
2618
2638
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -2647,7 +2667,7 @@ async function createThread(input, _onSetupLine) {
2647
2667
  worktreePath: repoPath,
2648
2668
  repoPath,
2649
2669
  agent: resolved.agent,
2650
- autonomy: input.autonomy ?? "default",
2670
+ autonomy: resolved.autonomy,
2651
2671
  model: resolved.model,
2652
2672
  effort: resolved.effort,
2653
2673
  fast: resolved.fast,
@@ -2671,7 +2691,7 @@ async function createThread(input, _onSetupLine) {
2671
2691
  let sourceIsFork = false;
2672
2692
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
2673
2693
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
2674
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-SJUVZVRU.js");
2694
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-QK3KMRQD.js");
2675
2695
  const task = await ensureAbleTimeTask({
2676
2696
  title: title?.trim() || "Untitled work",
2677
2697
  description: input.prompt?.trim() || void 0
@@ -2761,7 +2781,7 @@ async function createThread(input, _onSetupLine) {
2761
2781
  worktreePath,
2762
2782
  repoPath,
2763
2783
  agent: resolved.agent,
2764
- autonomy: input.autonomy ?? "default",
2784
+ autonomy: resolved.autonomy,
2765
2785
  model: resolved.model,
2766
2786
  effort: resolved.effort,
2767
2787
  fast: resolved.fast,
@@ -3544,7 +3564,7 @@ async function adoptThread(input) {
3544
3564
  messages: input.messages ?? []
3545
3565
  });
3546
3566
  writeThread(thread);
3547
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-TATO466L.js");
3567
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-EYNZDL45.js");
3548
3568
  await addWorkspace2(repoPath);
3549
3569
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-5N2KTYIT.js");
3550
3570
  await ensureWorktreeSideboardIgnored(input.worktreePath);
@@ -3836,7 +3856,7 @@ async function openStackLayer(input, _onSetupLine) {
3836
3856
  worktreePath,
3837
3857
  repoPath,
3838
3858
  agent: input.agent,
3839
- autonomy: input.autonomy ?? "default",
3859
+ autonomy: input.autonomy ?? getDefaultAutonomy(),
3840
3860
  model: input.model ?? null,
3841
3861
  effort: input.effort ?? "high",
3842
3862
  fast: Boolean(input.fast),
@@ -6438,7 +6458,7 @@ function formatScheduledPrompt(name, prompt) {
6438
6458
  ${prompt}`;
6439
6459
  }
6440
6460
  async function defaultDeps() {
6441
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-AM7VT2BD.js");
6461
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-ZRMZ4TCL.js");
6442
6462
  const orch = getOrchestrator2();
6443
6463
  return {
6444
6464
  findThread: (id) => findThreadByRef(id),
@@ -6756,7 +6776,7 @@ var Orchestrator = class {
6756
6776
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
6757
6777
  });
6758
6778
  }
6759
- const { autoCleanupOrphansEnabled } = await import("./app-settings-CC65VPBL.js");
6779
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-CZVFMOI5.js");
6760
6780
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
6761
6781
  await cleanupOrphanWorktrees({ repoPaths });
6762
6782
  }
@@ -7150,7 +7170,7 @@ var Orchestrator = class {
7150
7170
  }
7151
7171
  await setup;
7152
7172
  if (skipSetup) return;
7153
- const { autoRunAfterSetupEnabled } = await import("./app-settings-CC65VPBL.js");
7173
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-CZVFMOI5.js");
7154
7174
  if (autoRunAfterSetupEnabled()) {
7155
7175
  try {
7156
7176
  await this.startDev(threadId);
@@ -7544,7 +7564,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
7544
7564
  }
7545
7565
  const isBrightsy = fresh.agent === "brightsy";
7546
7566
  const isOrchestration = isOrchestratorThread(fresh);
7547
- const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-CC65VPBL.js");
7567
+ const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-CZVFMOI5.js");
7548
7568
  const gitAuthMode = getGithubGitAuthMode();
7549
7569
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
7550
7570
  githubSlug: await withTimeout(
@@ -8860,7 +8880,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
8860
8880
  if (Object.keys(patch).length === 0) continue;
8861
8881
  updateThread(t.id, patch);
8862
8882
  }
8863
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-CC65VPBL.js");
8883
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-CZVFMOI5.js");
8864
8884
  const latest = this.requireThread(thread.id);
8865
8885
  if (!shouldAutoArchiveOnPrMerge({
8866
8886
  previousPrState: prevState || null,
@@ -9184,7 +9204,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
9184
9204
  await runArchiveScript(thread.repoPath, thread.worktreePath);
9185
9205
  } catch {
9186
9206
  }
9187
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-CC65VPBL.js");
9207
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-CZVFMOI5.js");
9188
9208
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
9189
9209
  await removeWorktree(thread.repoPath, thread.worktreePath, {
9190
9210
  deleteBranch: deleteBranch ? thread.branchName : void 0
@@ -9320,7 +9340,7 @@ async function startOrchestration(opts) {
9320
9340
  sourceRef: "default",
9321
9341
  ...createOpts
9322
9342
  }).catch(async () => {
9323
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-FMK57ULT.js");
9343
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-UCOSAI7J.js");
9324
9344
  const repo = await resolveRepoRoot2(repoPath);
9325
9345
  const def = await resolveDefaultBranch2(repo);
9326
9346
  return orch.createThread({
@@ -9330,7 +9350,7 @@ async function startOrchestration(opts) {
9330
9350
  repoPath: repo
9331
9351
  });
9332
9352
  });
9333
- const { updateThread: upd } = await import("./thread-store-XMUQDO5O.js");
9353
+ const { updateThread: upd } = await import("./thread-store-GOVVXQV2.js");
9334
9354
  const updated = upd(thread.id, {
9335
9355
  sourceType: "orchestration",
9336
9356
  sourceRef: goal
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getAbleTimeHost,
6
6
  isAbleTimeConnected
7
- } from "./chunk-A2YXQC65.js";
7
+ } from "./chunk-U7PNCYNX.js";
8
8
 
9
9
  // src/integrations/abletime-mcp.ts
10
10
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -153,7 +153,7 @@ function textsFromUnknown(value) {
153
153
  return "";
154
154
  }
155
155
  async function abletimeMcpRequest(method, params, opts) {
156
- const rawToken = opts?.token ?? await import("./abletime-oauth-73TFJME4.js").then((m) => m.ensureAbleTimeAccessToken());
156
+ const rawToken = opts?.token ?? await import("./abletime-oauth-CAHTMB4V.js").then((m) => m.ensureAbleTimeAccessToken());
157
157
  if (!rawToken?.trim()) {
158
158
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
159
159
  }
@@ -224,9 +224,9 @@ async function callAbleTimeTool(name, args = {}, opts) {
224
224
  if (!opts?.token && !isAbleTimeConnected()) {
225
225
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
226
226
  }
227
- const rawToken = opts?.token ?? await import("./abletime-oauth-73TFJME4.js").then((m) => m.ensureAbleTimeAccessToken());
227
+ const rawToken = opts?.token ?? await import("./abletime-oauth-CAHTMB4V.js").then((m) => m.ensureAbleTimeAccessToken());
228
228
  if (rawToken && ableTimeUsesRest(rawToken)) {
229
- const { callAbleTimeRestTool } = await import("./abletime-rest-PNUGH2FS.js");
229
+ const { callAbleTimeRestTool } = await import("./abletime-rest-5V4KGMSY.js");
230
230
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
231
231
  }
232
232
  const requestOpts = { ...opts, pm: opts?.pm ?? abletimeToolUsesPm(name) };
@@ -242,7 +242,7 @@ async function callAbleTimeTool(name, args = {}, opts) {
242
242
  return await call();
243
243
  }
244
244
  if (rawToken && ableTimeUsesRest(rawToken) && isAbleTimeRejectedCredential(message)) {
245
- const { callAbleTimeRestTool } = await import("./abletime-rest-PNUGH2FS.js");
245
+ const { callAbleTimeRestTool } = await import("./abletime-rest-5V4KGMSY.js");
246
246
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
247
247
  }
248
248
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -24,13 +24,13 @@ import {
24
24
  } from "./chunk-I5TESHDN.js";
25
25
  import {
26
26
  isOrchestratorThread
27
- } from "./chunk-S3KYDK6W.js";
27
+ } from "./chunk-PN32Z4JL.js";
28
28
  import {
29
29
  codexUnattendedGitConfigArgs,
30
30
  mergeAgentGitAuthEnv,
31
31
  resolveAgentGitAuthEnv,
32
32
  resolveCodexGitWritableRoots
33
- } from "./chunk-DLGGLV2M.js";
33
+ } from "./chunk-5CTG5W7S.js";
34
34
  import {
35
35
  githubAgentAuthReady,
36
36
  npmGlobalNodeModules,
@@ -45,7 +45,7 @@ import {
45
45
  loadAppSettings,
46
46
  resolveAgentExecutable,
47
47
  resolveClaudeExecutable
48
- } from "./chunk-PHMFAU35.js";
48
+ } from "./chunk-GCHSJCCX.js";
49
49
  import {
50
50
  isElectronLikeCommand,
51
51
  unwrapStrippedElectronLaunch,
@@ -57,7 +57,7 @@ import {
57
57
  CLAUDE_POSTHOG_CONNECTOR_ALLOWED_TOOLS,
58
58
  CLAUDE_PRINT_BG_WAIT_CEILING_MS,
59
59
  mcpAllowToolsFromNames
60
- } from "./chunk-3UDRWMIM.js";
60
+ } from "./chunk-U35AHE2P.js";
61
61
  import {
62
62
  appDataDir
63
63
  } from "./chunk-WOU343SI.js";
@@ -2916,7 +2916,7 @@ var claudeAdapter = {
2916
2916
  );
2917
2917
  }
2918
2918
  const mode = permissionMode(thread);
2919
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-UDRTONQE.js");
2919
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-SK4JQBPN.js");
2920
2920
  const isOrchestrator = isOrchestratorThread2(thread);
2921
2921
  const rpc = worktreeAgentRpc(isOrchestrator);
2922
2922
  const injectedServers = await buildInjectedMcpServers({
@@ -55,6 +55,73 @@ function coerceOrchestratorAgent(agent, fallback = "claude") {
55
55
  return isOrchestratorCapableAgent(agent) ? agent : fallback;
56
56
  }
57
57
 
58
+ // src/store/thread-option-defaults.ts
59
+ function normalizeAutonomy(value) {
60
+ return value === "default" || value === "full" ? value : void 0;
61
+ }
62
+ function getDefaultAgent(settings = loadAppSettings()) {
63
+ return settings.defaults.agent ?? "claude";
64
+ }
65
+ function getDefaultModel(settings = loadAppSettings()) {
66
+ const model = settings.defaults.model?.trim();
67
+ return model || null;
68
+ }
69
+ function getDefaultEffort(settings = loadAppSettings()) {
70
+ return normalizeThinkingEffort(settings.defaults.effort) ?? "high";
71
+ }
72
+ function getDefaultFast(settings = loadAppSettings()) {
73
+ return settings.defaults.fast === true;
74
+ }
75
+ function getDefaultAutonomy(settings = loadAppSettings()) {
76
+ return settings.defaults.autonomy === "default" ? "default" : "full";
77
+ }
78
+ function resolveThreadDefaults(settings = loadAppSettings()) {
79
+ return {
80
+ agent: getDefaultAgent(settings),
81
+ model: getDefaultModel(settings),
82
+ effort: getDefaultEffort(settings),
83
+ fast: getDefaultFast(settings),
84
+ autonomy: getDefaultAutonomy(settings)
85
+ };
86
+ }
87
+ function resolveOrchestratorDefaults(settings = loadAppSettings()) {
88
+ const account = resolveThreadDefaults(settings);
89
+ const orch = settings.defaults.orchestrator;
90
+ const agent = coerceOrchestratorAgent(orch?.agent ?? account.agent);
91
+ let model = orch ? orch.model?.trim() || null : account.model;
92
+ if (model && agent !== "cursor" && /^(default|auto)$/i.test(model.trim())) {
93
+ model = null;
94
+ }
95
+ return {
96
+ agent,
97
+ model,
98
+ effort: orch?.effort ?? account.effort,
99
+ fast: orch?.fast ?? account.fast,
100
+ autonomy: orch?.autonomy ?? account.autonomy
101
+ };
102
+ }
103
+ function mergeThreadOptionOverrides(defaults, overrides) {
104
+ const effort = overrides.effort === void 0 || overrides.effort === null ? defaults.effort : normalizeThinkingEffort(overrides.effort) ?? defaults.effort;
105
+ const agent = overrides.agent ?? defaults.agent;
106
+ let model = overrides.model === void 0 ? defaults.model : overrides.model?.trim() || null;
107
+ if (model && agent !== "cursor" && /^(default|auto)$/i.test(model.trim())) {
108
+ model = null;
109
+ }
110
+ return {
111
+ agent,
112
+ model,
113
+ effort,
114
+ fast: overrides.fast === void 0 || overrides.fast === null ? defaults.fast : Boolean(overrides.fast),
115
+ autonomy: overrides.autonomy == null ? defaults.autonomy : normalizeAutonomy(overrides.autonomy) ?? defaults.autonomy
116
+ };
117
+ }
118
+ function resolveNewThreadOptions(overrides = {}, settings = loadAppSettings()) {
119
+ return mergeThreadOptionOverrides(resolveThreadDefaults(settings), overrides);
120
+ }
121
+ function resolveNewOrchestratorOptions(overrides = {}, settings = loadAppSettings()) {
122
+ return mergeThreadOptionOverrides(resolveOrchestratorDefaults(settings), overrides);
123
+ }
124
+
58
125
  // src/store/account-profile.ts
59
126
  var PROFILE_NOTES_MAX = 2e3;
60
127
  var LEGACY_ROLE_LABELS = {
@@ -1025,6 +1092,8 @@ function normalizeOrchestratorDefaults(raw) {
1025
1092
  if (typeof source.fast === "boolean") {
1026
1093
  out.fast = source.fast;
1027
1094
  }
1095
+ const autonomy = normalizeAutonomy(source.autonomy);
1096
+ if (autonomy) out.autonomy = autonomy;
1028
1097
  return Object.keys(out).length > 0 ? out : void 0;
1029
1098
  }
1030
1099
  function normalizeDefaults(raw) {
@@ -1044,6 +1113,8 @@ function normalizeDefaults(raw) {
1044
1113
  if (typeof source.fast === "boolean") {
1045
1114
  out.fast = source.fast;
1046
1115
  }
1116
+ const autonomy = normalizeAutonomy(source.autonomy);
1117
+ if (autonomy) out.autonomy = autonomy;
1047
1118
  const notes = foldLegacyRolesIntoNotes(source.roles, source.role, source.notes);
1048
1119
  if (notes) out.notes = notes;
1049
1120
  const orchestrator = normalizeOrchestratorDefaults(source.orchestrator);
@@ -1709,6 +1780,14 @@ function applyOrchestratorDefaultsPatch(current, patch) {
1709
1780
  next.fast = Boolean(patch.fast);
1710
1781
  }
1711
1782
  }
1783
+ if ("autonomy" in patch) {
1784
+ if (patch.autonomy == null) {
1785
+ delete next.autonomy;
1786
+ } else {
1787
+ const autonomy = normalizeAutonomy(patch.autonomy);
1788
+ if (autonomy) next.autonomy = autonomy;
1789
+ }
1790
+ }
1712
1791
  return Object.keys(next).length > 0 ? next : void 0;
1713
1792
  }
1714
1793
  function updateDefaultsSettings(patch) {
@@ -1743,6 +1822,14 @@ function updateDefaultsSettings(patch) {
1743
1822
  defaults.fast = Boolean(patch.fast);
1744
1823
  }
1745
1824
  }
1825
+ if ("autonomy" in patch) {
1826
+ if (patch.autonomy == null) {
1827
+ delete defaults.autonomy;
1828
+ } else {
1829
+ const autonomy = normalizeAutonomy(patch.autonomy);
1830
+ if (autonomy) defaults.autonomy = autonomy;
1831
+ }
1832
+ }
1746
1833
  if ("notes" in patch) {
1747
1834
  const notes = normalizeProfileNotes(patch.notes);
1748
1835
  if (!notes) delete defaults.notes;
@@ -1792,19 +1879,6 @@ function resolveProjectReviewLabel(settings, repoPath) {
1792
1879
  if (!key) return "";
1793
1880
  return settings.projects[key]?.reviewLabel?.trim() || "";
1794
1881
  }
1795
- function getDefaultAgent(settings = loadAppSettings()) {
1796
- return settings.defaults.agent ?? "claude";
1797
- }
1798
- function getDefaultModel(settings = loadAppSettings()) {
1799
- const model = settings.defaults.model?.trim();
1800
- return model || null;
1801
- }
1802
- function getDefaultEffort(settings = loadAppSettings()) {
1803
- return normalizeThinkingEffort(settings.defaults.effort) ?? "high";
1804
- }
1805
- function getDefaultFast(settings = loadAppSettings()) {
1806
- return settings.defaults.fast === true;
1807
- }
1808
1882
  function resolveAccountProfileFromSettings(settings = loadAppSettings()) {
1809
1883
  return resolveViewerProfile(settings.defaults);
1810
1884
  }
@@ -1869,49 +1943,6 @@ function writeViewerContext(input) {
1869
1943
  updateDefaultsSettings({ notes: proposed || null });
1870
1944
  return { ok: true, scope: "account", context: proposed };
1871
1945
  }
1872
- function resolveThreadDefaults(settings = loadAppSettings()) {
1873
- return {
1874
- agent: getDefaultAgent(settings),
1875
- model: getDefaultModel(settings),
1876
- effort: getDefaultEffort(settings),
1877
- fast: getDefaultFast(settings)
1878
- };
1879
- }
1880
- function resolveOrchestratorDefaults(settings = loadAppSettings()) {
1881
- const account = resolveThreadDefaults(settings);
1882
- const orch = settings.defaults.orchestrator;
1883
- const agent = coerceOrchestratorAgent(orch?.agent ?? account.agent);
1884
- let model = orch ? orch.model?.trim() || null : account.model;
1885
- if (model && agent !== "cursor" && /^(default|auto)$/i.test(model.trim())) {
1886
- model = null;
1887
- }
1888
- return {
1889
- agent,
1890
- model,
1891
- effort: orch?.effort ?? account.effort,
1892
- fast: orch?.fast ?? account.fast
1893
- };
1894
- }
1895
- function mergeThreadOptionOverrides(defaults, overrides) {
1896
- const effort = overrides.effort === void 0 || overrides.effort === null ? defaults.effort : normalizeThinkingEffort(overrides.effort) ?? defaults.effort;
1897
- const agent = overrides.agent ?? defaults.agent;
1898
- let model = overrides.model === void 0 ? defaults.model : overrides.model?.trim() || null;
1899
- if (model && agent !== "cursor" && /^(default|auto)$/i.test(model.trim())) {
1900
- model = null;
1901
- }
1902
- return {
1903
- agent,
1904
- model,
1905
- effort,
1906
- fast: overrides.fast === void 0 || overrides.fast === null ? defaults.fast : Boolean(overrides.fast)
1907
- };
1908
- }
1909
- function resolveNewThreadOptions(overrides = {}, settings = loadAppSettings()) {
1910
- return mergeThreadOptionOverrides(resolveThreadDefaults(settings), overrides);
1911
- }
1912
- function resolveNewOrchestratorOptions(overrides = {}, settings = loadAppSettings()) {
1913
- return mergeThreadOptionOverrides(resolveOrchestratorDefaults(settings), overrides);
1914
- }
1915
1946
  function isLinearConnected(settings = loadAppSettings()) {
1916
1947
  return hasLinearCredentials(settings.integrations);
1917
1948
  }
@@ -2319,6 +2350,15 @@ export {
2319
2350
  isOrchestratorCapableAgent,
2320
2351
  assertOrchestratorCapableAgent,
2321
2352
  coerceOrchestratorAgent,
2353
+ getDefaultAgent,
2354
+ getDefaultModel,
2355
+ getDefaultEffort,
2356
+ getDefaultFast,
2357
+ getDefaultAutonomy,
2358
+ resolveThreadDefaults,
2359
+ resolveOrchestratorDefaults,
2360
+ resolveNewThreadOptions,
2361
+ resolveNewOrchestratorOptions,
2322
2362
  PROFILE_NOTES_MAX,
2323
2363
  foldLegacyRolesIntoNotes,
2324
2364
  resolveAccountProfile,
@@ -2372,18 +2412,10 @@ export {
2372
2412
  updateDefaultsSettings,
2373
2413
  updateProjectProfileSettings,
2374
2414
  resolveProjectReviewLabel,
2375
- getDefaultAgent,
2376
- getDefaultModel,
2377
- getDefaultEffort,
2378
- getDefaultFast,
2379
2415
  resolveAccountProfileFromSettings,
2380
2416
  resolveViewerProfileForRepo,
2381
2417
  readViewerContext,
2382
2418
  writeViewerContext,
2383
- resolveThreadDefaults,
2384
- resolveOrchestratorDefaults,
2385
- resolveNewThreadOptions,
2386
- resolveNewOrchestratorOptions,
2387
2419
  isLinearConnected,
2388
2420
  saveLinearOAuth,
2389
2421
  disconnectLinearConnection,
@@ -3,7 +3,7 @@ import {
3
3
  ensureGhPreferOrigin,
4
4
  resolveGithubRepoSlug,
5
5
  resolveRepoRoot
6
- } from "./chunk-BIPXOHZI.js";
6
+ } from "./chunk-BPBDGJ43.js";
7
7
  import {
8
8
  allocateTeamName,
9
9
  createEmptyThread,
@@ -12,7 +12,7 @@ import {
12
12
  teamSlugFromName,
13
13
  updateThread,
14
14
  writeThread
15
- } from "./chunk-HG25AYBV.js";
15
+ } from "./chunk-CHUPIJP7.js";
16
16
  import {
17
17
  ATTACHMENTS_DIR,
18
18
  attachmentsGitignoreBody
@@ -29,7 +29,7 @@ import {
29
29
  resolveThreadDefaults,
30
30
  resolveViewerProfile,
31
31
  resolveViewerProfileForRepo
32
- } from "./chunk-A2YXQC65.js";
32
+ } from "./chunk-U7PNCYNX.js";
33
33
  import {
34
34
  appDataDir,
35
35
  globalAgentCwd,
@@ -663,7 +663,8 @@ function createGlobalChat(opts) {
663
663
  agent: opts.agent,
664
664
  model: opts.model,
665
665
  effort: opts.effort,
666
- fast: opts.fast
666
+ fast: opts.fast,
667
+ autonomy: opts.autonomy
667
668
  });
668
669
  const agent = assertOrchestratorCapableAgent(resolved.agent);
669
670
  const worktreePath = globalAgentCwd();
@@ -677,7 +678,7 @@ function createGlobalChat(opts) {
677
678
  worktreePath,
678
679
  repoPath: GLOBAL_WORKSPACE_ID,
679
680
  agent,
680
- autonomy: opts.autonomy ?? "default",
681
+ autonomy: resolved.autonomy,
681
682
  model: resolved.model,
682
683
  effort: resolved.effort,
683
684
  fast: resolved.fast,
@@ -754,6 +755,7 @@ function ensureSlackCoordinator(teamId, userId, agent, opts) {
754
755
  if (existing.model !== defaults.model) patch.model = defaults.model;
755
756
  if (existing.effort !== defaults.effort) patch.effort = defaults.effort;
756
757
  if (existing.fast !== defaults.fast) patch.fast = defaults.fast;
758
+ if (existing.autonomy !== defaults.autonomy) patch.autonomy = defaults.autonomy;
757
759
  }
758
760
  if (Object.keys(patch).length > 0) {
759
761
  return updateThread(existing.id, patch);
@@ -812,6 +814,7 @@ function ensureCloudCoordinator(agent) {
812
814
  if (existing.model !== defaults.model) patch.model = defaults.model;
813
815
  if (existing.effort !== defaults.effort) patch.effort = defaults.effort;
814
816
  if (existing.fast !== defaults.fast) patch.fast = defaults.fast;
817
+ if (existing.autonomy !== defaults.autonomy) patch.autonomy = defaults.autonomy;
815
818
  }
816
819
  if (Object.keys(patch).length > 0) {
817
820
  return updateThread(existing.id, patch);
@@ -8,11 +8,11 @@ import {
8
8
  isGlobalThread,
9
9
  isOrchestratorThread,
10
10
  isSlackCoordinatorThread
11
- } from "./chunk-ZSVKUOFH.js";
11
+ } from "./chunk-GFM63DTU.js";
12
12
  import {
13
13
  mergeAgentGitAuthEnv,
14
14
  resolveAgentGitAuthEnv
15
- } from "./chunk-BIPXOHZI.js";
15
+ } from "./chunk-BPBDGJ43.js";
16
16
  import {
17
17
  allocateTeamName,
18
18
  createEmptyThread,
@@ -23,7 +23,7 @@ import {
23
23
  updateThread,
24
24
  worktreeNameFromPath,
25
25
  writeThread
26
- } from "./chunk-HG25AYBV.js";
26
+ } from "./chunk-CHUPIJP7.js";
27
27
  import {
28
28
  ensureWorktreeSideboardIgnored
29
29
  } from "./chunk-2P4XKWV2.js";
@@ -43,7 +43,7 @@ import {
43
43
  import {
44
44
  assertOrchestratorCapableAgent,
45
45
  contextTokens
46
- } from "./chunk-A2YXQC65.js";
46
+ } from "./chunk-U7PNCYNX.js";
47
47
  import {
48
48
  stripNestedElectronEnv
49
49
  } from "./chunk-4TR3HZFT.js";
@@ -1832,7 +1832,7 @@ var PORT_RANGE_SIZE = 10;
1832
1832
  var RECLAIM_RETRY_DELAY_MS = 40;
1833
1833
  var RECLAIM_TRIES = 8;
1834
1834
  async function killReclaimable(ports, worktreePath, signal) {
1835
- const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-IIDQ2U24.js");
1835
+ const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-DKWTQADV.js");
1836
1836
  if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
1837
1837
  else killListenersOnPorts2(ports);
1838
1838
  }