@sideboard-ai/core 0.1.35 → 0.1.37

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.
package/dist/index.cjs CHANGED
@@ -354,6 +354,8 @@ __export(app_settings_exports, {
354
354
  claudeChromeEnabled: () => claudeChromeEnabled,
355
355
  claudeUserSettingsPath: () => claudeUserSettingsPath,
356
356
  deleteBranchOnPurgeEnabled: () => deleteBranchOnPurgeEnabled,
357
+ getDefaultAgent: () => getDefaultAgent,
358
+ getDefaultModel: () => getDefaultModel,
357
359
  getIssueSource: () => getIssueSource,
358
360
  getLinearApiKey: () => getLinearApiKey,
359
361
  harnessEnvKey: () => harnessEnvKey,
@@ -362,11 +364,13 @@ __export(app_settings_exports, {
362
364
  maxConcurrentAgents: () => maxConcurrentAgents,
363
365
  resolveClaudeExecutable: () => resolveClaudeExecutable,
364
366
  resolveEffectiveIssueSource: () => resolveEffectiveIssueSource,
367
+ resolveThreadDefaults: () => resolveThreadDefaults,
365
368
  saveAppSettings: () => saveAppSettings,
366
369
  updateAdvancedSettings: () => updateAdvancedSettings,
367
370
  updateAppEnvironment: () => updateAppEnvironment,
368
371
  updateBrightsySettings: () => updateBrightsySettings,
369
372
  updateClaudeSettings: () => updateClaudeSettings,
373
+ updateDefaultsSettings: () => updateDefaultsSettings,
370
374
  updateIntegrationsSettings: () => updateIntegrationsSettings
371
375
  });
372
376
  function appSettingsPath() {
@@ -413,6 +417,19 @@ function normalizeIntegrations(raw) {
413
417
  }
414
418
  return out;
415
419
  }
420
+ function normalizeDefaults(raw) {
421
+ if (!raw || typeof raw !== "object") return {};
422
+ const source = raw;
423
+ const out = {};
424
+ if (typeof source.agent === "string" && DEFAULT_AGENTS.has(source.agent)) {
425
+ out.agent = source.agent;
426
+ }
427
+ if (typeof source.model === "string") {
428
+ const model = source.model.trim();
429
+ if (model) out.model = model;
430
+ }
431
+ return out;
432
+ }
416
433
  function normalizeAdvanced(raw) {
417
434
  if (!raw || typeof raw !== "object") return {};
418
435
  const source = raw;
@@ -457,6 +474,7 @@ function normalizeSettings(raw) {
457
474
  let claude = {};
458
475
  let brightsy = {};
459
476
  let integrations = {};
477
+ let defaults = {};
460
478
  let advanced = {};
461
479
  if (raw && typeof raw === "object") {
462
480
  if ("environment" in raw) {
@@ -480,11 +498,14 @@ function normalizeSettings(raw) {
480
498
  raw.integrations
481
499
  );
482
500
  }
501
+ if ("defaults" in raw) {
502
+ defaults = normalizeDefaults(raw.defaults);
503
+ }
483
504
  if ("advanced" in raw) {
484
505
  advanced = normalizeAdvanced(raw.advanced);
485
506
  }
486
507
  }
487
- return { environment: env, claude, brightsy, integrations, advanced };
508
+ return { environment: env, claude, brightsy, integrations, defaults, advanced };
488
509
  }
489
510
  function loadAppSettings() {
490
511
  const path = appSettingsPath();
@@ -568,6 +589,38 @@ function updateIntegrationsSettings(patch) {
568
589
  }
569
590
  return saveAppSettings({ ...current, integrations });
570
591
  }
592
+ function updateDefaultsSettings(patch) {
593
+ const current = loadAppSettings();
594
+ const defaults = { ...current.defaults };
595
+ if ("agent" in patch) {
596
+ if (patch.agent == null) {
597
+ delete defaults.agent;
598
+ } else if (DEFAULT_AGENTS.has(patch.agent)) {
599
+ defaults.agent = patch.agent;
600
+ }
601
+ }
602
+ if ("model" in patch) {
603
+ if (patch.model == null || patch.model.trim() === "") {
604
+ delete defaults.model;
605
+ } else {
606
+ defaults.model = patch.model.trim();
607
+ }
608
+ }
609
+ return saveAppSettings({ ...current, defaults });
610
+ }
611
+ function getDefaultAgent(settings = loadAppSettings()) {
612
+ return settings.defaults.agent ?? "claude";
613
+ }
614
+ function getDefaultModel(settings = loadAppSettings()) {
615
+ const model = settings.defaults.model?.trim();
616
+ return model || null;
617
+ }
618
+ function resolveThreadDefaults(settings = loadAppSettings()) {
619
+ return {
620
+ agent: getDefaultAgent(settings),
621
+ model: getDefaultModel(settings)
622
+ };
623
+ }
571
624
  function isLinearConnected(settings = loadAppSettings()) {
572
625
  return Boolean(settings.integrations.linearApiKey?.trim());
573
626
  }
@@ -682,7 +735,7 @@ function childEnvWithAppSettings(extra) {
682
735
  function harnessEnvKey(harness) {
683
736
  return HARNESS_ENV_KEYS[harness];
684
737
  }
685
- var import_node_fs3, import_node_os3, import_node_path4, HARNESS_ENV_KEYS, CLOUD_CONNECT_AGENTS, ISSUE_SOURCES, EMPTY_SETTINGS;
738
+ var import_node_fs3, import_node_os3, import_node_path4, HARNESS_ENV_KEYS, DEFAULT_AGENTS, CLOUD_CONNECT_AGENTS, ISSUE_SOURCES, EMPTY_SETTINGS;
686
739
  var init_app_settings = __esm({
687
740
  "src/store/app-settings.ts"() {
688
741
  "use strict";
@@ -697,6 +750,13 @@ var init_app_settings = __esm({
697
750
  opencode: null,
698
751
  brightsy: null
699
752
  };
753
+ DEFAULT_AGENTS = /* @__PURE__ */ new Set([
754
+ "claude",
755
+ "codex",
756
+ "opencode",
757
+ "brightsy",
758
+ "cursor"
759
+ ]);
700
760
  CLOUD_CONNECT_AGENTS = /* @__PURE__ */ new Set([
701
761
  "claude",
702
762
  "codex",
@@ -709,6 +769,7 @@ var init_app_settings = __esm({
709
769
  claude: {},
710
770
  brightsy: {},
711
771
  integrations: {},
772
+ defaults: {},
712
773
  advanced: {}
713
774
  };
714
775
  }
@@ -2518,11 +2579,83 @@ async function getPrDetails(cwd, selector) {
2518
2579
  };
2519
2580
  }
2520
2581
  async function fetchPrHead(repoPath, number, localBranch) {
2521
- await git(
2522
- ["fetch", "origin", `pull/${number}/head:${localBranch}`],
2523
- repoPath,
2524
- { reject: false }
2525
- );
2582
+ const slug = await resolveGithubRepoSlug(repoPath);
2583
+ const refspec = `+pull/${number}/head:${localBranch}`;
2584
+ const errors = [];
2585
+ const tryFetch = async (remote) => {
2586
+ const result = await git(["fetch", remote, refspec], repoPath, {
2587
+ reject: false
2588
+ });
2589
+ if (result.exitCode === 0) return true;
2590
+ const detail = (result.stderr || result.stdout).trim();
2591
+ if (detail) errors.push(`${remote}: ${detail}`);
2592
+ return false;
2593
+ };
2594
+ let fetched = await tryFetch("origin");
2595
+ if (!fetched && slug) {
2596
+ fetched = await tryFetch(`https://github.com/${slug}.git`);
2597
+ }
2598
+ const localOk = async () => {
2599
+ const verify = await git(["rev-parse", "--verify", localBranch], repoPath, {
2600
+ reject: false
2601
+ });
2602
+ return verify.exitCode === 0;
2603
+ };
2604
+ if (!await localOk()) {
2605
+ const viewArgs = [
2606
+ "pr",
2607
+ "view",
2608
+ String(number),
2609
+ "--json",
2610
+ "headRefOid"
2611
+ ];
2612
+ if (slug) viewArgs.push("--repo", slug);
2613
+ const view = await gh(viewArgs, repoPath, { reject: false });
2614
+ let oid = "";
2615
+ if (view.exitCode === 0 && view.stdout.trim()) {
2616
+ try {
2617
+ oid = String(
2618
+ JSON.parse(view.stdout).headRefOid ?? ""
2619
+ ).trim();
2620
+ } catch {
2621
+ oid = "";
2622
+ }
2623
+ }
2624
+ if (oid) {
2625
+ const ensureOid = async (remote) => {
2626
+ const got = await git(["fetch", remote, oid], repoPath, {
2627
+ reject: false
2628
+ });
2629
+ return got.exitCode === 0;
2630
+ };
2631
+ let haveObject = (await git(["cat-file", "-e", `${oid}^{commit}`], repoPath, {
2632
+ reject: false
2633
+ })).exitCode === 0;
2634
+ if (!haveObject) haveObject = await ensureOid("origin");
2635
+ if (!haveObject && slug) {
2636
+ haveObject = await ensureOid(`https://github.com/${slug}.git`);
2637
+ }
2638
+ if (haveObject) {
2639
+ const branched = await git(["branch", "-f", localBranch, oid], repoPath, {
2640
+ reject: false
2641
+ });
2642
+ if (branched.exitCode !== 0) {
2643
+ const detail = (branched.stderr || branched.stdout).trim();
2644
+ if (detail) errors.push(`branch -f: ${detail}`);
2645
+ }
2646
+ } else {
2647
+ errors.push(`could not fetch commit ${oid.slice(0, 12)}`);
2648
+ }
2649
+ } else if (view.stderr.trim()) {
2650
+ errors.push(view.stderr.trim());
2651
+ }
2652
+ }
2653
+ if (!await localOk()) {
2654
+ const hint = errors.length ? ` (${errors.join(" | ")})` : "";
2655
+ throw new Error(
2656
+ `Failed to fetch PR #${number} head into ${localBranch}${hint}`
2657
+ );
2658
+ }
2526
2659
  }
2527
2660
  async function resolveWorktreeStartPoint(repoPath, sourceRef) {
2528
2661
  const ref = sourceRef.trim();
@@ -2532,6 +2665,7 @@ async function resolveWorktreeStartPoint(repoPath, sourceRef) {
2532
2665
  reject: false
2533
2666
  });
2534
2667
  if (ok.exitCode === 0) return ref;
2668
+ throw new Error(`Invalid git reference: ${ref}`);
2535
2669
  }
2536
2670
  const remote = `origin/${ref}`;
2537
2671
  const remoteOk = await git(["rev-parse", "--verify", remote], repoPath, {
@@ -2542,7 +2676,10 @@ async function resolveWorktreeStartPoint(repoPath, sourceRef) {
2542
2676
  reject: false
2543
2677
  });
2544
2678
  if (localOk.exitCode === 0) return ref;
2545
- return ref;
2679
+ throw new Error(`Invalid git reference: ${ref}`);
2680
+ }
2681
+ function isLocalPrFetchBranch(ref) {
2682
+ return /^sideboard-pr-\d+$/.test(ref.trim());
2546
2683
  }
2547
2684
  async function createThreadWorktree(opts) {
2548
2685
  let branchName = `thread/${opts.slug}`;
@@ -2552,7 +2689,7 @@ async function createThreadWorktree(opts) {
2552
2689
  }
2553
2690
  await ensureGhPreferOrigin(opts.repoPath);
2554
2691
  await git(["fetch", "origin", "--prune"], opts.repoPath, { reject: false });
2555
- if (!opts.sourceRef.startsWith("origin/") && !opts.sourceRef.startsWith("refs/")) {
2692
+ if (!isLocalPrFetchBranch(opts.sourceRef) && !opts.sourceRef.startsWith("origin/") && !opts.sourceRef.startsWith("refs/")) {
2556
2693
  await git(["fetch", "origin", opts.sourceRef], opts.repoPath, {
2557
2694
  reject: false
2558
2695
  });
@@ -5843,6 +5980,8 @@ __export(index_exports, {
5843
5980
  getAdapter: () => getAdapter,
5844
5981
  getAgentSetupInfo: () => getAgentSetupInfo,
5845
5982
  getBrightsySession: () => getBrightsySession,
5983
+ getDefaultAgent: () => getDefaultAgent,
5984
+ getDefaultModel: () => getDefaultModel,
5846
5985
  getDefaultRunScript: () => getDefaultRunScript,
5847
5986
  getDiff: () => getDiff,
5848
5987
  getDiffSummary: () => getDiffSummary,
@@ -5958,6 +6097,7 @@ __export(index_exports, {
5958
6097
  resolveGithubRepoSlug: () => resolveGithubRepoSlug,
5959
6098
  resolvePrSelector: () => resolvePrSelector,
5960
6099
  resolveRepoRoot: () => resolveRepoRoot,
6100
+ resolveThreadDefaults: () => resolveThreadDefaults,
5961
6101
  resolveWorktreeStartPoint: () => resolveWorktreeStartPoint,
5962
6102
  run: () => run,
5963
6103
  runArchiveScript: () => runArchiveScript,
@@ -6003,6 +6143,7 @@ __export(index_exports, {
6003
6143
  updateAppEnvironment: () => updateAppEnvironment,
6004
6144
  updateBrightsySettings: () => updateBrightsySettings,
6005
6145
  updateClaudeSettings: () => updateClaudeSettings,
6146
+ updateDefaultsSettings: () => updateDefaultsSettings,
6006
6147
  updateIntegrationsSettings: () => updateIntegrationsSettings,
6007
6148
  updateThread: () => updateThread,
6008
6149
  validateLinearApiKey: () => validateLinearApiKey,
@@ -11563,6 +11704,8 @@ init_injected_mcp();
11563
11704
  getAdapter,
11564
11705
  getAgentSetupInfo,
11565
11706
  getBrightsySession,
11707
+ getDefaultAgent,
11708
+ getDefaultModel,
11566
11709
  getDefaultRunScript,
11567
11710
  getDiff,
11568
11711
  getDiffSummary,
@@ -11678,6 +11821,7 @@ init_injected_mcp();
11678
11821
  resolveGithubRepoSlug,
11679
11822
  resolvePrSelector,
11680
11823
  resolveRepoRoot,
11824
+ resolveThreadDefaults,
11681
11825
  resolveWorktreeStartPoint,
11682
11826
  run,
11683
11827
  runArchiveScript,
@@ -11723,6 +11867,7 @@ init_injected_mcp();
11723
11867
  updateAppEnvironment,
11724
11868
  updateBrightsySettings,
11725
11869
  updateClaudeSettings,
11870
+ updateDefaultsSettings,
11726
11871
  updateIntegrationsSettings,
11727
11872
  updateThread,
11728
11873
  validateLinearApiKey,
package/dist/index.d.cts CHANGED
@@ -455,6 +455,15 @@ declare const HARNESS_ENV_KEYS: {
455
455
  readonly brightsy: null;
456
456
  };
457
457
  type HarnessId = keyof typeof HARNESS_ENV_KEYS;
458
+ /**
459
+ * Account-level defaults for Create / new chat tabs (Settings → Account).
460
+ * Omitted fields fall back to Claude + Auto at runtime.
461
+ */
462
+ interface DefaultsAppSettings {
463
+ agent?: AgentKind;
464
+ /** Model / Brightsy target id. Empty or omitted = Auto / agent default. */
465
+ model?: string;
466
+ }
458
467
  /** Claude Code harness options (executable override + Chrome). */
459
468
  interface ClaudeHarnessSettings {
460
469
  /** Absolute path to Claude Code. Empty/omitted = `claude` on PATH. */
@@ -539,6 +548,8 @@ interface AppSettings {
539
548
  brightsy: BrightsyHarnessSettings;
540
549
  /** GitHub / Linear connections and issue-source preference. */
541
550
  integrations: IntegrationsSettings;
551
+ /** Default agent + model for new chats (Settings → Account). */
552
+ defaults: DefaultsAppSettings;
542
553
  /** Power-user / Conductor-style advanced preferences. */
543
554
  advanced: AdvancedAppSettings;
544
555
  }
@@ -560,6 +571,19 @@ declare function updateIntegrationsSettings(patch: {
560
571
  linearApiKey?: string | null;
561
572
  issueSource?: IssueSource | null;
562
573
  }): AppSettings;
574
+ declare function updateDefaultsSettings(patch: {
575
+ agent?: AgentKind | null;
576
+ model?: string | null;
577
+ }): AppSettings;
578
+ /** Default agent for Create / new chats (claude when unset). */
579
+ declare function getDefaultAgent(settings?: AppSettings): AgentKind;
580
+ /** Default model id for Create / new chats (`null` = Auto / agent default). */
581
+ declare function getDefaultModel(settings?: AppSettings): string | null;
582
+ /** Resolved Create / new-chat agent + model pair. */
583
+ declare function resolveThreadDefaults(settings?: AppSettings): {
584
+ agent: AgentKind;
585
+ model: string | null;
586
+ };
563
587
  /** True when Sideboard has a Linear API key stored. */
564
588
  declare function isLinearConnected(settings?: AppSettings): boolean;
565
589
  /** Preferred issue source (default GitHub). */
@@ -2152,6 +2176,10 @@ interface IpcApi {
2152
2176
  linearApiKey?: string | null;
2153
2177
  issueSource?: IssueSource | null;
2154
2178
  }): Promise<AppSettings>;
2179
+ updateDefaultsSettings(patch: {
2180
+ agent?: AgentKind | null;
2181
+ model?: string | null;
2182
+ }): Promise<AppSettings>;
2155
2183
  /** Machine-global GitHub status via `gh`. */
2156
2184
  getGitHubStatus(): Promise<GitHubStatus>;
2157
2185
  /**
@@ -2608,4 +2636,4 @@ declare function writeInjectedMcpConfig(opts: {
2608
2636
  includeBrightsy?: boolean;
2609
2637
  }): Promise<string | null>;
2610
2638
 
2611
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
2639
+ export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveThreadDefaults, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
package/dist/index.d.ts CHANGED
@@ -455,6 +455,15 @@ declare const HARNESS_ENV_KEYS: {
455
455
  readonly brightsy: null;
456
456
  };
457
457
  type HarnessId = keyof typeof HARNESS_ENV_KEYS;
458
+ /**
459
+ * Account-level defaults for Create / new chat tabs (Settings → Account).
460
+ * Omitted fields fall back to Claude + Auto at runtime.
461
+ */
462
+ interface DefaultsAppSettings {
463
+ agent?: AgentKind;
464
+ /** Model / Brightsy target id. Empty or omitted = Auto / agent default. */
465
+ model?: string;
466
+ }
458
467
  /** Claude Code harness options (executable override + Chrome). */
459
468
  interface ClaudeHarnessSettings {
460
469
  /** Absolute path to Claude Code. Empty/omitted = `claude` on PATH. */
@@ -539,6 +548,8 @@ interface AppSettings {
539
548
  brightsy: BrightsyHarnessSettings;
540
549
  /** GitHub / Linear connections and issue-source preference. */
541
550
  integrations: IntegrationsSettings;
551
+ /** Default agent + model for new chats (Settings → Account). */
552
+ defaults: DefaultsAppSettings;
542
553
  /** Power-user / Conductor-style advanced preferences. */
543
554
  advanced: AdvancedAppSettings;
544
555
  }
@@ -560,6 +571,19 @@ declare function updateIntegrationsSettings(patch: {
560
571
  linearApiKey?: string | null;
561
572
  issueSource?: IssueSource | null;
562
573
  }): AppSettings;
574
+ declare function updateDefaultsSettings(patch: {
575
+ agent?: AgentKind | null;
576
+ model?: string | null;
577
+ }): AppSettings;
578
+ /** Default agent for Create / new chats (claude when unset). */
579
+ declare function getDefaultAgent(settings?: AppSettings): AgentKind;
580
+ /** Default model id for Create / new chats (`null` = Auto / agent default). */
581
+ declare function getDefaultModel(settings?: AppSettings): string | null;
582
+ /** Resolved Create / new-chat agent + model pair. */
583
+ declare function resolveThreadDefaults(settings?: AppSettings): {
584
+ agent: AgentKind;
585
+ model: string | null;
586
+ };
563
587
  /** True when Sideboard has a Linear API key stored. */
564
588
  declare function isLinearConnected(settings?: AppSettings): boolean;
565
589
  /** Preferred issue source (default GitHub). */
@@ -2152,6 +2176,10 @@ interface IpcApi {
2152
2176
  linearApiKey?: string | null;
2153
2177
  issueSource?: IssueSource | null;
2154
2178
  }): Promise<AppSettings>;
2179
+ updateDefaultsSettings(patch: {
2180
+ agent?: AgentKind | null;
2181
+ model?: string | null;
2182
+ }): Promise<AppSettings>;
2155
2183
  /** Machine-global GitHub status via `gh`. */
2156
2184
  getGitHubStatus(): Promise<GitHubStatus>;
2157
2185
  /**
@@ -2608,4 +2636,4 @@ declare function writeInjectedMcpConfig(opts: {
2608
2636
  includeBrightsy?: boolean;
2609
2637
  }): Promise<string | null>;
2610
2638
 
2611
- export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
2639
+ export { type ActiveRun, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentInstructionFile, type AgentKind, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLOUD_COORDINATOR_BUSY_REPLY, CLOUD_COORDINATOR_STOPPED_REPLY, CLOUD_COORDINATOR_TIMEOUT_REPLY, CLOUD_ORCHESTRATOR_GOAL, CONTEXT_COMPACT_CHARS, CONTEXT_KEEP_RECENT_CHARS, CONTEXT_KEEP_RECENT_MESSAGES, CONTEXT_MIN_MESSAGES, COORDINATOR_TOOL_PLAYBOOK, type ClaudeHarnessSettings, type CleanupOrphansResult, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateThreadInput, type CreateWorktreeResult, type CursorModelInfo, type CursorSdkStreamMessage, type CursorTurnRequest, type CursorWorktreesConfig, type DefaultsAppSettings, type DevServerHandle, type DiffCommentInput, type DiffCommentLine, type DiffCommit, type DiffFile, type DiffResult, type DiffScope, type DiffScopeStat, type ExpandResult, FAMOUS_SOCCER_TEAMS, type ForkChatTabInput, type ForkThreadWorktreeInput, type FormatGhLandErrorOptions, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, type LandPreview, type LandResult, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, Orchestrator, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PLAN_MODE_INSTRUCTION, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type RepoSettings, type RepoSetupInfo, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, type ScriptHandle, type SkillInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, type TeamName, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type TranscriptToolDetail, type TurnCommand, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, addWorkspace, adoptThread, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, captureLoginEnv, captureTurnBaseline, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, collectTakenTeamSlugs, commitAll, conductorDbPath, confirmLand, connectBrightsyTeam, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createGlobalChat, createOrUpdatePr, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectLocalMergeConflicts, disconnectBrightsyTeam, discoverSkills, encodeBrightsyTarget, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatRateLimitResetHint, formatRenameBranchDirective, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, getAdapter, getAgentSetupInfo, getBrightsySession, getDefaultAgent, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getRepoSetupInfo, getRunMode, getRunScript, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, harnessEnvKey, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initializeGitRepository, inspectGitWorktree, installAgent, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isLinearConnected, isOrchestratorThread, isPlaceholderBranch, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listOpencodeModels, listPrs, listRunScripts, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergeUsage, normalizeParseResult, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, opencodeAdapter, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGithubSlugFromRemoteUrl, parseMcpList, partsToAssistantText, permissionMode, previewLand, pushBranch, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, refreshGitHubAuth, removeWorkspace, removeWorktree, repoSlug, requireAgent, resolveClaudeExecutable, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGithubRepoSlug, resolvePrSelector, resolveRepoRoot, resolveThreadDefaults, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, setStatus, settingsSourceLabel, shouldCompactContext, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardReposDir, sideboardWorkspacesDir, slugify, spawnAgentTurn, splitForCompaction, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startMcpServer, startOrchestration, stripBrightsyNdjsonNoise, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, threadDisplayLabel, threadFilePath, threadLockPath, threadsDir, threadsSharingWorktree, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateDefaultsSettings, updateIntegrationsSettings, updateThread, validateLinearApiKey, withAgentInstructions, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writeThread, writeWorktreeFile };
package/dist/index.js CHANGED
@@ -101,14 +101,14 @@ import {
101
101
  withAgentInstructions,
102
102
  worktreeCleanupSettings,
103
103
  writeWorktreeFile
104
- } from "./chunk-AL2GL5HJ.js";
104
+ } from "./chunk-E4TRCRKH.js";
105
105
  import {
106
106
  addWorkspace,
107
107
  ensureWorkspace,
108
108
  listWorkspaces,
109
109
  removeWorkspace,
110
110
  syncWorkspacesFromThreads
111
- } from "./chunk-PER4N6LS.js";
111
+ } from "./chunk-FVGRUZHI.js";
112
112
  import {
113
113
  CLOUD_COORDINATOR_BUSY_REPLY,
114
114
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -128,7 +128,7 @@ import {
128
128
  orchestratorSessionPoisonedByBuiltins,
129
129
  parseForceStopMessage,
130
130
  takenTeamSlugsForOrchestration
131
- } from "./chunk-Y2EWQ4TL.js";
131
+ } from "./chunk-IS3AGU33.js";
132
132
  import {
133
133
  COORDINATOR_TOOL_PLAYBOOK,
134
134
  coordinatorSystemPrompt,
@@ -136,7 +136,7 @@ import {
136
136
  enrichWorkspacesWithGithub,
137
137
  ensureGlobalCoordinatorCwd,
138
138
  formatWorkspaceInventory
139
- } from "./chunk-BMB7WCGF.js";
139
+ } from "./chunk-PTASB7SJ.js";
140
140
  import {
141
141
  BRIGHTSY_MCP_ALLOWED_TOOLS,
142
142
  MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS,
@@ -176,7 +176,7 @@ import {
176
176
  resolveCursorModelId,
177
177
  sanitizeMcpServerName,
178
178
  writeInjectedMcpConfig
179
- } from "./chunk-MULWZLDI.js";
179
+ } from "./chunk-5KZLWNBS.js";
180
180
  import {
181
181
  brightsyConfigPath,
182
182
  brightsyMcpServerName,
@@ -208,6 +208,8 @@ import {
208
208
  claudeChromeEnabled,
209
209
  claudeUserSettingsPath,
210
210
  deleteBranchOnPurgeEnabled,
211
+ getDefaultAgent,
212
+ getDefaultModel,
211
213
  getIssueSource,
212
214
  getLinearApiKey,
213
215
  harnessEnvKey,
@@ -216,13 +218,15 @@ import {
216
218
  maxConcurrentAgents,
217
219
  resolveClaudeExecutable,
218
220
  resolveEffectiveIssueSource,
221
+ resolveThreadDefaults,
219
222
  saveAppSettings,
220
223
  updateAdvancedSettings,
221
224
  updateAppEnvironment,
222
225
  updateBrightsySettings,
223
226
  updateClaudeSettings,
227
+ updateDefaultsSettings,
224
228
  updateIntegrationsSettings
225
- } from "./chunk-3WF3X46L.js";
229
+ } from "./chunk-YZ23S32T.js";
226
230
  import {
227
231
  FAMOUS_SOCCER_TEAMS,
228
232
  allocateTeamName,
@@ -271,7 +275,7 @@ import {
271
275
  worktreeDisplayLabel,
272
276
  worktreeDisplayLabelForGroup,
273
277
  worktreeNameFromPath
274
- } from "./chunk-UFWEANLU.js";
278
+ } from "./chunk-XBEQI5H4.js";
275
279
  import {
276
280
  appendMessage,
277
281
  createEmptyThread,
@@ -859,6 +863,8 @@ export {
859
863
  getAdapter,
860
864
  getAgentSetupInfo,
861
865
  getBrightsySession,
866
+ getDefaultAgent,
867
+ getDefaultModel,
862
868
  getDefaultRunScript,
863
869
  getDiff,
864
870
  getDiffSummary,
@@ -974,6 +980,7 @@ export {
974
980
  resolveGithubRepoSlug,
975
981
  resolvePrSelector,
976
982
  resolveRepoRoot,
983
+ resolveThreadDefaults,
977
984
  resolveWorktreeStartPoint,
978
985
  run,
979
986
  runArchiveScript,
@@ -1019,6 +1026,7 @@ export {
1019
1026
  updateAppEnvironment,
1020
1027
  updateBrightsySettings,
1021
1028
  updateClaudeSettings,
1029
+ updateDefaultsSettings,
1022
1030
  updateIntegrationsSettings,
1023
1031
  updateThread,
1024
1032
  validateLinearApiKey,