@sideboard-ai/core 0.1.74 → 0.1.79

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 (37) hide show
  1. package/dist/{agents-H7M5CQY2.js → agents-EWPHOM6Y.js} +6 -6
  2. package/dist/{agents-2S2JVLZ6.js → agents-GRAPUXWW.js} +5 -5
  3. package/dist/{app-settings-3TLA2EJ7.js → app-settings-6IOQYGBK.js} +7 -1
  4. package/dist/{app-settings-P42Z3VOB.js → app-settings-NILNWNNQ.js} +7 -1
  5. package/dist/{caffeinate-hold-KLC6SABD.js → caffeinate-hold-EAZNWJBE.js} +5 -1
  6. package/dist/caffeinate-hold-OHAUWOA6.js +20 -0
  7. package/dist/{chunk-77W62MTX.js → chunk-5LXWTU3J.js} +6 -6
  8. package/dist/{chunk-GJ2LZQJI.js → chunk-5VTWBI3I.js} +2 -2
  9. package/dist/{chunk-2NKSHIRI.js → chunk-6T2SKGCS.js} +3 -3
  10. package/dist/{chunk-OE7YBB5X.js → chunk-FUUVPN4A.js} +108 -3
  11. package/dist/{chunk-HCWAIEBU.js → chunk-HCGEFU3J.js} +8 -7
  12. package/dist/{chunk-XA2FQJTN.js → chunk-HSLQXL6M.js} +6 -5
  13. package/dist/{chunk-W7YOTDVO.js → chunk-IFPN6TER.js} +47 -2
  14. package/dist/chunk-MFF2RE3I.js +168 -0
  15. package/dist/{chunk-KBKPVKYZ.js → chunk-P33ZQ7ZC.js} +3 -3
  16. package/dist/{chunk-DG3S2UXP.js → chunk-PW5YHHP3.js} +2 -2
  17. package/dist/chunk-RV6DBEDQ.js +170 -0
  18. package/dist/{chunk-5KJMNNCB.js → chunk-SHCR6RPU.js} +3 -3
  19. package/dist/{chunk-PTJJIQK7.js → chunk-XKNBSYA7.js} +47 -2
  20. package/dist/{chunk-MF2YMEGD.js → chunk-YVVXWWCC.js} +110 -3
  21. package/dist/{coordinator-prompt-3XXSG7M2.js → coordinator-prompt-2OVON2LQ.js} +4 -4
  22. package/dist/{coordinator-prompt-RTUCCPCI.js → coordinator-prompt-K2R34A5T.js} +3 -3
  23. package/dist/{global-workspace-PJU6HISJ.js → global-workspace-RI367AM6.js} +4 -4
  24. package/dist/{global-workspace-CSIS62Z4.js → global-workspace-VG44RZUH.js} +5 -5
  25. package/dist/index.cjs +1548 -614
  26. package/dist/index.d.cts +226 -28
  27. package/dist/index.d.ts +226 -28
  28. package/dist/index.js +1277 -575
  29. package/dist/mcp/run-stdio.cjs +3153 -2509
  30. package/dist/mcp/run-stdio.js +690 -262
  31. package/dist/{workspaces-L4TXMUNM.js → workspaces-BQWQEZWE.js} +5 -5
  32. package/dist/{workspaces-W72KZL4B.js → workspaces-TYPJNUSM.js} +6 -6
  33. package/dist/{worktree-VOCH3WS3.js → worktree-5VLLFI5W.js} +5 -1
  34. package/dist/{worktree-KWXHMKRN.js → worktree-UNSOCYZU.js} +5 -1
  35. package/package.json +1 -1
  36. package/dist/caffeinate-hold-BEJIYPJ7.js +0 -107
  37. package/dist/chunk-JAWEDVVA.js +0 -106
package/dist/index.d.ts CHANGED
@@ -628,9 +628,21 @@ interface BrightsyHarnessSettings {
628
628
  }
629
629
  /** Preferred issue tracker for Create-from / Link issue. */
630
630
  type IssueSource = 'linear' | 'github';
631
+ /**
632
+ * How Sideboard and worktree agents authenticate GitHub git operations.
633
+ * A declared mode so the app and injected prompts agree. Sideboard never
634
+ * uses a third-party GitHub App (including Conductor.build) for git auth.
635
+ * - `auto` (default): keep remotes as-is (SSH first); prompt HTTPS/`gh` fallback
636
+ * - `gh`: rewrite SSH remotes to HTTPS; `gh auth git-credential`
637
+ * - `ssh`: keep `git@` remotes; use this Mac’s SSH agent
638
+ * - `token`: stored PAT + HTTPS rewrite; `GH_TOKEN` in the agent env
639
+ */
640
+ type GithubGitAuthMode = 'auto' | 'gh' | 'ssh' | 'token';
641
+ declare const GITHUB_GIT_AUTH_MODES: readonly ["auto", "gh", "ssh", "token"];
631
642
  /**
632
643
  * Sideboard-owned third-party connections (Account / Integrations).
633
- * GitHub uses machine `gh` auth; Linear uses OAuth (or a stored API key).
644
+ * GitHub uses a declared git-auth mode (`gh` / SSH / PAT); Linear uses OAuth
645
+ * (or a stored API key).
634
646
  */
635
647
  interface IntegrationsSettings {
636
648
  /** Linear personal API key (https://linear.app/settings/api). Fallback when OAuth is unused. */
@@ -672,6 +684,13 @@ interface IntegrationsSettings {
672
684
  slackDeviceId?: string;
673
685
  /** Human label for this Mac destination, e.g. Personal / Work. */
674
686
  slackDeviceLabel?: string;
687
+ /**
688
+ * How agents and Sideboard git helpers authenticate GitHub.
689
+ * Omitted = {@link getGithubGitAuthMode} default (`auto`).
690
+ */
691
+ githubGitAuthMode?: GithubGitAuthMode;
692
+ /** Fine-grained or classic PAT when mode is `token` (vaulted). */
693
+ githubPat?: string;
675
694
  }
676
695
  /**
677
696
  * Conductor-inspired power-user preferences (Settings → Advanced).
@@ -754,12 +773,14 @@ interface AppSettings {
754
773
  advanced: AdvancedAppSettings;
755
774
  }
756
775
  /** Integrations fields safe to send to the renderer (no token values). */
757
- type PublicIntegrationsSettings = Omit<IntegrationsSettings, 'linearApiKey' | 'linearAccessToken' | 'linearRefreshToken' | 'linearClientSecret' | 'slackClientSecret' | 'slackAppToken'> & {
776
+ type PublicIntegrationsSettings = Omit<IntegrationsSettings, 'linearApiKey' | 'linearAccessToken' | 'linearRefreshToken' | 'linearClientSecret' | 'slackClientSecret' | 'slackAppToken' | 'githubPat'> & {
758
777
  /** True when Linear is connected (OAuth or API key). */
759
778
  hasLinearApiKey: boolean;
760
779
  hasLinearOAuth: boolean;
761
780
  hasSlackClientSecret: boolean;
762
781
  hasSlackAppToken: boolean;
782
+ /** True when a GitHub PAT is stored (token mode). */
783
+ hasGithubPat: boolean;
763
784
  };
764
785
  /** Settings payload for the desktop UI. Secret values are omitted. */
765
786
  type PublicAppSettings = Omit<AppSettings, 'integrations'> & {
@@ -799,6 +820,8 @@ declare function updateIntegrationsSettings(patch: {
799
820
  slackListenEnabled?: boolean | null;
800
821
  slackDeviceId?: string | null;
801
822
  slackDeviceLabel?: string | null;
823
+ githubGitAuthMode?: GithubGitAuthMode | null;
824
+ githubPat?: string | null;
802
825
  }): AppSettings;
803
826
  declare function updateDefaultsSettings(patch: {
804
827
  agent?: AgentKind | null;
@@ -852,6 +875,10 @@ declare function saveLinearOAuth(input: {
852
875
  declare function disconnectLinearConnection(): AppSettings;
853
876
  /** Preferred issue source (default GitHub). */
854
877
  declare function getIssueSource(settings?: AppSettings): IssueSource;
878
+ /** Declared GitHub git-auth mode (default `auto`). */
879
+ declare function getGithubGitAuthMode(settings?: AppSettings): GithubGitAuthMode;
880
+ /** Stored GitHub PAT for `token` mode (null when unset). */
881
+ declare function getGithubPat(settings?: AppSettings): string | null;
855
882
  /**
856
883
  * Runtime issue source: honors preference, but falls back to GitHub when
857
884
  * Linear is preferred and not connected.
@@ -923,14 +950,27 @@ interface CaffeinateHoldState {
923
950
  pid: number | null;
924
951
  running: boolean;
925
952
  platform: NodeJS.Platform;
953
+ /** Orchestration thread ids that requested this hold. */
954
+ threadIds: string[];
926
955
  }
927
956
  declare function caffeinateHoldPath(): string;
957
+ /** True when this orchestration chat currently holds `set_caffeinate`. */
958
+ declare function isThreadCaffeinated(threadId: string, state: CaffeinateHoldState): boolean;
928
959
  declare function getCaffeinateHold(): CaffeinateHoldState;
929
960
  /**
930
961
  * Session hold so the Mac stays awake across orchestration turns (MCP
931
962
  * processes exit). Detached `caffeinate` on macOS; no-op elsewhere.
963
+ * Pass `threadId` so closing that orchestration chat can release the hold.
932
964
  */
933
- declare function setCaffeinateHold(enabled: boolean): CaffeinateHoldState;
965
+ declare function setCaffeinateHold(enabled: boolean, opts?: {
966
+ threadId?: string | null;
967
+ }): CaffeinateHoldState;
968
+ /**
969
+ * Drop a closed orchestration chat from the hold. Kills caffeinate when no
970
+ * other chats still want it. A legacy hold with no thread ids is treated as
971
+ * belonging to this chat (the usual one-orchestrator case).
972
+ */
973
+ declare function releaseCaffeinateHoldForThread(threadId: string): CaffeinateHoldState;
934
974
 
935
975
  /** Desktop registers a 32-byte key from Electron safeStorage. */
936
976
  declare function setVaultMasterKey(key: Buffer | null): void;
@@ -1094,6 +1134,31 @@ declare function formatGhLandError(raw: string, opts?: FormatGhLandErrorOptions)
1094
1134
  /** Strip Electron's IPC invoke wrapper, then humanize known gh failures. */
1095
1135
  declare function formatIpcInvokeError(err: unknown): string;
1096
1136
 
1137
+ type EnvLike = NodeJS.ProcessEnv | Record<string, string | undefined>;
1138
+ /**
1139
+ * Append `GIT_CONFIG_KEY_n` / `VALUE_n` entries without clobbering inherited
1140
+ * command-scoped git config (enterprise insteadOf, custom certs, …).
1141
+ */
1142
+ declare function appendIndexedGitConfig(existing: EnvLike | undefined, entries: Array<{
1143
+ key: string;
1144
+ value: string;
1145
+ }>): Record<string, string>;
1146
+ /**
1147
+ * Rewrite GitHub SSH remotes to HTTPS and let `gh` supply credentials.
1148
+ * GUI / agent shells often have no ssh-agent; `gh` keyring still works.
1149
+ */
1150
+ declare function githubAgentGitEnv(existing?: EnvLike): Record<string, string>;
1151
+ /**
1152
+ * Extra env for a worktree agent given Account → GitHub git-auth mode.
1153
+ * Does not set `GH_REPO` (caller adds that after resolving origin).
1154
+ */
1155
+ declare function applyGithubGitAuthEnv(existing: EnvLike | undefined, opts: {
1156
+ mode: GithubGitAuthMode;
1157
+ token?: string | null;
1158
+ }): Record<string, string>;
1159
+ /** Injected prompt block so agents use the same git path as Sideboard. */
1160
+ declare function formatGitAuthModeDirective(mode: GithubGitAuthMode): string;
1161
+
1097
1162
  interface TeamName {
1098
1163
  name: string;
1099
1164
  slug: string;
@@ -1172,11 +1237,16 @@ declare function ghHeadRef(slug: string, branch: string): string;
1172
1237
  * Pin the CLI default to `origin` once per repo (shared by all worktrees).
1173
1238
  */
1174
1239
  declare function ensureGhPreferOrigin(cwd: string): Promise<void>;
1240
+
1175
1241
  /**
1176
1242
  * Env pin so bare `gh` (and agents) target this checkout's **origin**, not
1177
1243
  * Makerkit-style `upstream`. `GH_REPO` is the CLI's documented override.
1244
+ * HTTPS rewrite / `GH_TOKEN` follow Account → GitHub git-auth mode.
1178
1245
  */
1179
- declare function originGhRepoEnv(cwd: string): Promise<Record<string, string>>;
1246
+ declare function originGhRepoEnv(cwd: string, opts?: {
1247
+ env?: NodeJS.ProcessEnv | Record<string, string | undefined>;
1248
+ mode?: GithubGitAuthMode;
1249
+ }): Promise<Record<string, string>>;
1180
1250
  declare function resolveDefaultBranch(repoPath: string, opts?: {
1181
1251
  network?: boolean;
1182
1252
  }): Promise<string>;
@@ -1354,6 +1424,55 @@ declare function getGitHubStatus(): Promise<GitHubStatus>;
1354
1424
  /** Open interactive `gh auth login` in a terminal-friendly way (caller may spawn UI). */
1355
1425
  declare function refreshGitHubAuth(): Promise<GitHubStatus>;
1356
1426
 
1427
+ interface LinearWorkflowState {
1428
+ id: string;
1429
+ name: string;
1430
+ type: string;
1431
+ }
1432
+ interface LinearTeam {
1433
+ id: string;
1434
+ key: string;
1435
+ name: string;
1436
+ states: LinearWorkflowState[];
1437
+ }
1438
+ interface LinearIssue {
1439
+ id: string;
1440
+ identifier: string;
1441
+ title: string;
1442
+ url: string;
1443
+ description?: string;
1444
+ priority?: number;
1445
+ state?: LinearWorkflowState;
1446
+ assignee?: {
1447
+ id: string;
1448
+ name: string;
1449
+ };
1450
+ team?: {
1451
+ id: string;
1452
+ key: string;
1453
+ name: string;
1454
+ states: LinearWorkflowState[];
1455
+ };
1456
+ labels: string[];
1457
+ }
1458
+ interface LinearComment {
1459
+ id: string;
1460
+ body: string;
1461
+ url?: string;
1462
+ }
1463
+ interface LinearTeamsResult {
1464
+ viewer: {
1465
+ id: string;
1466
+ name: string;
1467
+ };
1468
+ teams: LinearTeam[];
1469
+ }
1470
+ declare function rewriteLinearError(message: string): string;
1471
+ declare function linearGraphql<T>(query: string, variables?: Record<string, unknown>, opts?: {
1472
+ apiKey?: string | null;
1473
+ }): Promise<T>;
1474
+ declare function resolveLinearTeam(teams: LinearTeam[], team: string): LinearTeam;
1475
+ declare function resolveLinearState(team: Pick<LinearTeam, 'key' | 'states'>, state: string): LinearWorkflowState;
1357
1476
  /**
1358
1477
  * List open issues assigned to the authenticated Linear user via GraphQL.
1359
1478
  * Uses Sideboard-stored OAuth token or API key (Account → Linear), not agent MCP.
@@ -1362,6 +1481,38 @@ declare function listLinearIssuesDirect(opts?: {
1362
1481
  limit?: number;
1363
1482
  apiKey?: string | null;
1364
1483
  }): Promise<IssueInfo[]>;
1484
+ declare function listLinearTeams(opts?: {
1485
+ apiKey?: string | null;
1486
+ }): Promise<LinearTeamsResult>;
1487
+ declare function getLinearIssue(id: string, opts?: {
1488
+ apiKey?: string | null;
1489
+ }): Promise<LinearIssue>;
1490
+ declare function createLinearIssue(input: {
1491
+ team: string;
1492
+ title: string;
1493
+ description?: string;
1494
+ state?: string;
1495
+ assignee?: string | null;
1496
+ priority?: number;
1497
+ }, opts?: {
1498
+ apiKey?: string | null;
1499
+ }): Promise<LinearIssue>;
1500
+ declare function updateLinearIssue(input: {
1501
+ id: string;
1502
+ title?: string;
1503
+ description?: string;
1504
+ state?: string;
1505
+ assignee?: string | null;
1506
+ priority?: number;
1507
+ }, opts?: {
1508
+ apiKey?: string | null;
1509
+ }): Promise<LinearIssue>;
1510
+ declare function commentLinearIssue(input: {
1511
+ id: string;
1512
+ body: string;
1513
+ }, opts?: {
1514
+ apiKey?: string | null;
1515
+ }): Promise<LinearComment>;
1365
1516
  /** Probe Linear with the stored key (or provided key). */
1366
1517
  declare function validateLinearApiKey(apiKey: string): Promise<boolean>;
1367
1518
 
@@ -1370,8 +1521,12 @@ declare function hasBakedLinearOAuth(): boolean;
1370
1521
  /** Fixed port so the Linear OAuth redirect URI can be registered once. */
1371
1522
  declare const LINEAR_OAUTH_PORT = 19848;
1372
1523
  declare const LINEAR_OAUTH_REDIRECT = "http://127.0.0.1:19848/callback";
1373
- /** Read-only — Sideboard lists assigned issues; it does not create them. */
1374
- declare const LINEAR_OAUTH_SCOPES = "read";
1524
+ /**
1525
+ * Requested at authorize time — Linear’s OAuth app settings have no scopes UI.
1526
+ * `read,write` lists assigned issues and lets MCP create/update/comment.
1527
+ * Users who connected with `read` only must Disconnect and Connect again.
1528
+ */
1529
+ declare const LINEAR_OAUTH_SCOPES = "read,write";
1375
1530
  declare function linearOAuthCredentials(): {
1376
1531
  clientId: string;
1377
1532
  clientSecret: string;
@@ -1425,6 +1580,18 @@ declare function listGitHubIssues(repoPath: string, opts?: {
1425
1580
  */
1426
1581
  declare function listIssues(repoPath: string): Promise<ListIssuesResult>;
1427
1582
 
1583
+ /**
1584
+ * HTTP fetch used by Linear (and other Node-side API clients).
1585
+ *
1586
+ * Electron main should call {@link setHttpFetchImpl} with `net.fetch` so
1587
+ * requests use Chromium's network stack. Node's undici `fetch` often fails
1588
+ * behind corporate VPN/proxy as an opaque `TypeError: fetch failed`.
1589
+ */
1590
+ declare function setHttpFetchImpl(fetchImpl: typeof fetch | null): void;
1591
+ /** Expand undici/Electron `TypeError: fetch failed` with the underlying cause. */
1592
+ declare function formatFetchError(err: unknown, url: string): string;
1593
+ declare function httpFetch(input: string | URL, init?: RequestInit): Promise<Response>;
1594
+
1428
1595
  /**
1429
1596
  * Turn payload for agent CLIs.
1430
1597
  * `cachedPrefix` is stable context (instructions, conversation seed) sent before
@@ -1863,6 +2030,7 @@ declare function formatRenameBranchDirective(thread: Pick<Thread, 'worktreePath'
1863
2030
  */
1864
2031
  declare function formatWorktreeDirective(thread: Pick<Thread, 'worktreePath' | 'repoPath' | 'branchName'> & Partial<Pick<Thread, 'title' | 'prUrl'>>, opts?: {
1865
2032
  githubSlug?: string | null;
2033
+ gitAuthMode?: GithubGitAuthMode;
1866
2034
  }): string;
1867
2035
  /**
1868
2036
  * Tell agents how Sideboard renders Claude-style artifacts (side column).
@@ -1981,6 +2149,7 @@ interface WorkspaceScriptEnvOpts {
1981
2149
  defaultBranch?: string;
1982
2150
  ports?: number[];
1983
2151
  }
2152
+ declare function stripNestedElectronEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
1984
2153
  /** Build Conductor/Sideboard env vars for setup/run scripts. */
1985
2154
  declare function buildWorkspaceScriptEnv(opts: WorkspaceScriptEnvOpts, baseEnv?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
1986
2155
  interface ScriptHandle {
@@ -2632,6 +2801,8 @@ declare class Orchestrator {
2632
2801
  sessionId: string | null;
2633
2802
  };
2634
2803
  private assertNotGlobal;
2804
+ /** MCP set_caffeinate is a detached hold — closing the chat must not leave the Mac awake. */
2805
+ private releaseOrchestratorCaffeinate;
2635
2806
  diff(threadRef: string, opts?: {
2636
2807
  scope?: DiffScope;
2637
2808
  commitSha?: string | null;
@@ -2737,10 +2908,13 @@ declare class Orchestrator {
2737
2908
  */
2738
2909
  requestReview(threadRef: string): Promise<Thread>;
2739
2910
  /**
2740
- * Queue a desktop-git-button prompt on a worktree agent (commit/push/PR/merge).
2741
- * Orchestrators use this instead of running git/gh from the synthetic home.
2911
+ * Desktop git buttons + MCP `ask_git`.
2912
+ * When the worktree is clean, push / open the PR here (HTTPS via `gh` if SSH
2913
+ * is missing). When dirty, queue the worktree agent to commit first.
2742
2914
  */
2743
2915
  askGit(threadRef: string, action: AgentGitAction): Promise<Thread>;
2916
+ /** Push origin (gh HTTPS fallback) and create/update the PR when requested. */
2917
+ private pushAndMaybeOpenPr;
2744
2918
  setThreadOptions(threadRef: string, patch: ThreadOptionsPatch): Thread;
2745
2919
  createChatTab(input: {
2746
2920
  fromThreadId: string;
@@ -3017,8 +3191,9 @@ declare function cloneRepoIntoSideboard(opts: {
3017
3191
  /**
3018
3192
  * Sideboard MCP server — agent-facing judgment surface.
3019
3193
  * Deliberately excludes ready-for-review confirm_land and purge_thread.
3020
- * Orchestrators commit, push, open PRs, and merge by telling worktree agents
3021
- * (`ask_git` / `send_to_thread`) — they do not run git/gh from the synthetic home.
3194
+ * Orchestrators commit, push, open PRs, and merge via `ask_git` / `send_to_thread`
3195
+ * — they do not run git/gh from the synthetic home. `ask_git` pushes itself when
3196
+ * the worktree is already clean.
3022
3197
  */
3023
3198
  declare function startMcpServer(): Promise<void>;
3024
3199
 
@@ -3278,6 +3453,8 @@ interface IpcApi {
3278
3453
  slackListenEnabled?: boolean | null;
3279
3454
  slackDeviceId?: string | null;
3280
3455
  slackDeviceLabel?: string | null;
3456
+ githubGitAuthMode?: GithubGitAuthMode | null;
3457
+ githubPat?: string | null;
3281
3458
  }): Promise<PublicAppSettings>;
3282
3459
  updateDefaultsSettings(patch: {
3283
3460
  agent?: AgentKind | null;
@@ -3307,6 +3484,14 @@ interface IpcApi {
3307
3484
  setSlackListen(opts: {
3308
3485
  enabled: boolean;
3309
3486
  }): Promise<SlackListenStatus>;
3487
+ /** Live caffeinate: chat hold and/or Settings (agents running / Slack Listen). */
3488
+ getCaffeinateHold(): Promise<CaffeinateHoldState & {
3489
+ appCaffeinated: boolean;
3490
+ }>;
3491
+ /** Fired when any caffeinate source starts or stops. */
3492
+ onCaffeinateHoldChanged(listener: (state: CaffeinateHoldState & {
3493
+ appCaffeinated: boolean;
3494
+ }) => void): () => void;
3310
3495
  /** Unread Slack replies to messages this Mac posted (relayed as info; does not start a turn). */
3311
3496
  getSlackReplyBadges(): Promise<SlackReplyBadge[]>;
3312
3497
  /** Open the Slack thread in the browser/app and clear that user's badge. */
@@ -3514,6 +3699,8 @@ interface IpcApi {
3514
3699
  url: string;
3515
3700
  state: string;
3516
3701
  }>;
3702
+ /** Desktop git buttons: push/PR when clean, else queue the worktree agent. */
3703
+ askGit(threadRef: string, action: 'commit-push' | 'create-draft' | 'create-web' | 'resolve-conflicts' | 'merge'): Promise<Thread>;
3517
3704
  archiveThread(threadRef: string): Promise<Thread>;
3518
3705
  purgeThread(threadRef: string, opts?: {
3519
3706
  deleteBranch?: boolean;
@@ -3712,7 +3899,7 @@ type BrightsySideboardApiOptions = {
3712
3899
  fetchImpl?: FetchLike;
3713
3900
  };
3714
3901
  /** Expand undici/Electron `TypeError: fetch failed` with the underlying cause. */
3715
- declare function formatBrightsyFetchError(err: unknown, url: string): string;
3902
+ declare const formatBrightsyFetchError: typeof formatFetchError;
3716
3903
  /**
3717
3904
  * Minimal Brightsy HTTP client using ~/.brightsy/config.json (same session as CLI).
3718
3905
  */
@@ -3833,7 +4020,7 @@ declare function writeInjectedMcpConfig(opts: {
3833
4020
  }): Promise<string | null>;
3834
4021
 
3835
4022
  /** Public WebSocket URL for the hosted Slack inbound relay (path included). */
3836
- declare const BAKED_SLACK_RELAY_URL = "wss://slack-relay.sideboard.cloud/desktop";
4023
+ declare const BAKED_SLACK_RELAY_URL = "wss://relay.sideboard.cloud/slack/desktop";
3837
4024
  declare function hasBakedSlackOAuth(): boolean;
3838
4025
  /**
3839
4026
  * Relay URL for inbound Slack when this Mac has no local xapp-.
@@ -3841,19 +4028,14 @@ declare function hasBakedSlackOAuth(): boolean;
3841
4028
  */
3842
4029
  declare function slackRelayUrl(): string;
3843
4030
 
3844
- /** Fixed port so the desktop can listen on one localhost callback. */
3845
- declare const SLACK_OAUTH_PORT = 19847;
3846
- /** Local listener. Slack never redirects here — HTTP is not allowed for public distribution. */
3847
- declare const SLACK_OAUTH_LOCAL_CALLBACK = "http://127.0.0.1:19847/callback";
3848
- /**
3849
- * Slack-registered redirect URI (HTTPS). The hosted relay bounces to
3850
- * {@link SLACK_OAUTH_LOCAL_CALLBACK} so the desktop can finish OAuth.
3851
- */
3852
- declare const SLACK_OAUTH_REDIRECT = "https://slack-relay.sideboard.cloud/callback";
4031
+ declare const SLACK_OAUTH_REDIRECT = "https://relay.sideboard.cloud/slack/callback";
3853
4032
 
4033
+ declare function slackOAuthResultUrl(state: string, relayWsUrl?: string): string;
4034
+
4035
+ /** Public client id plus optional local secret (custom Slack app only — not baked). */
3854
4036
  declare function slackOAuthCredentials(): {
3855
4037
  clientId: string;
3856
- clientSecret: string;
4038
+ clientSecret: string | null;
3857
4039
  };
3858
4040
  declare const SLACK_OAUTH_CANCELLED = "Slack sign-in cancelled";
3859
4041
  declare class SlackOAuthCancelledError extends Error {
@@ -3861,15 +4043,16 @@ declare class SlackOAuthCancelledError extends Error {
3861
4043
  }
3862
4044
  declare function isSlackOAuthCancelled(err: unknown): boolean;
3863
4045
  /**
3864
- * Open Slack OAuth in the browser, listen on a localhost callback, store tokens.
3865
- * Slack redirects to the hosted HTTPS bounce, which forwards here.
3866
- * Pass `signal` (or abort after start) so closing the browser tab is not the
3867
- * only way out — Settings Cancel and modal close abort this wait.
4046
+ * Open Slack OAuth in the browser. The hosted relay exchanges the code
4047
+ * (client secret stays on the server). This process polls `/slack/oauth/result`.
3868
4048
  */
3869
4049
  declare function startSlackOAuth(opts?: {
3870
4050
  openUrl?: (url: string) => void | Promise<void>;
3871
4051
  timeoutMs?: number;
3872
4052
  signal?: AbortSignal;
4053
+ fetchImpl?: typeof fetch;
4054
+ resultUrlForState?: (state: string) => string;
4055
+ pollIntervalMs?: number;
3873
4056
  }): Promise<SlackWorkspaceInfo>;
3874
4057
 
3875
4058
  /** Minimal WebSocket surface so tests can inject a fake without DOM lib types. */
@@ -4047,6 +4230,10 @@ declare class SlackRelayHub {
4047
4230
 
4048
4231
  interface SlackRelayServerOptions {
4049
4232
  appToken: string;
4233
+ /** OAuth client secret — from Fly `SIDEBOARD_SLACK_CLIENT_SECRET`. Never ship in the DMG. */
4234
+ clientSecret?: string;
4235
+ clientId?: string;
4236
+ oauthRedirectUri?: string;
4050
4237
  port?: number;
4051
4238
  host?: string;
4052
4239
  signal?: AbortSignal;
@@ -4054,6 +4241,16 @@ interface SlackRelayServerOptions {
4054
4241
  fetchImpl?: typeof fetch;
4055
4242
  /** Injected hub (tests). */
4056
4243
  hub?: SlackRelayHub;
4244
+ /** Skip Slack Socket Mode (tests). */
4245
+ skipSocketMode?: boolean;
4246
+ /** Optional marketing site root (Fly: `/app/site`). `/health` stays JSON. */
4247
+ staticRoot?: string;
4248
+ /** Hostnames that get the marketing site (e.g. `www.sideboard.cloud`). Empty = any host. */
4249
+ staticHosts?: string[];
4250
+ /** Apex (or aliases) that 301 to `canonicalSiteHost`. */
4251
+ redirectHosts?: string[];
4252
+ /** Canonical public site host (default `www.sideboard.cloud`). */
4253
+ canonicalSiteHost?: string;
4057
4254
  }
4058
4255
  interface SlackRelayServerHandle {
4059
4256
  port: number;
@@ -4064,6 +4261,7 @@ interface SlackRelayServerHandle {
4064
4261
  /**
4065
4262
  * Hosted Slack inbound relay: one Socket Mode connection (xapp- on the server)
4066
4263
  * plus desktop WebSocket sessions that register via bot-token auth.test.
4264
+ * GET /slack/callback exchanges Slack OAuth (client secret stays here).
4067
4265
  */
4068
4266
  declare function startSlackRelayServer(opts: SlackRelayServerOptions): Promise<SlackRelayServerHandle>;
4069
4267
 
@@ -4075,7 +4273,7 @@ interface SlackRelayRegisterWorkspace {
4075
4273
  userToken: string;
4076
4274
  }
4077
4275
  interface SlackRelayClientOptions {
4078
- /** Full WebSocket URL including path, e.g. wss://slack-relay.sideboard.cloud/desktop */
4276
+ /** Full WebSocket URL including path, e.g. wss://relay.sideboard.cloud/slack/desktop */
4079
4277
  url: string;
4080
4278
  workspaces: SlackRelayRegisterWorkspace[];
4081
4279
  /** Stable per-Mac destination id. */
@@ -4093,4 +4291,4 @@ interface SlackRelayClientOptions {
4093
4291
  */
4094
4292
  declare function runSlackRelayClient(opts: SlackRelayClientOptions): Promise<void>;
4095
4293
 
4096
- export { AGENT_GIT_ACTIONS, ATTACHMENTS_DIR, type ActiveRun, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, 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 CaffeinateHoldState, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateStackInput, 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 GhStackStatus, type GitHubStatus, type GitWorktreeStatus, HARNESS_ENV_KEYS, type HarnessId, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, type LandPreview, type LandResult, LinearOAuthCancelledError, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_BUSY_REPLY, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_LOCAL_CALLBACK, SLACK_OAUTH_PORT, SLACK_OAUTH_REDIRECT, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, type ScriptHandle, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackReplyBadge, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, type UsageScope, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, ackSlackInboundSeen, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyThreadIntoMain, applyTurnUsage, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSlackListenEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, collectTakenTeamSlugs, commitAll, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, connectSlackToken, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createLinearPkce, createOrUpdatePr, createPrStack, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectSlackWorkspace, discoverSkills, dismissSlackReplyBadge, dropCachedPrefixOnResume, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, findThreadForStackLayer, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatGhLandError, formatIpcInvokeError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatRateLimitResetHint, formatRenameBranchDirective, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackSignedReply, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, formatWorktreeReminder, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getIssueSource, getLinearApiKey, getLinearAuthToken, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSlackWorkspace, gh, ghHeadRef, ghRepoSelectArgs, git, globalAgentCwd, handleSlackInbound, harnessEnvKey, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isLinearConnected, isLinearOAuthCancelled, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPresentPlanToolName, isSessionQuotaLimit, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isThinkingEffort, isWorkspaceScratchPath, linearAuthorizationHeader, linearOAuthAuthorizeUrl, linearOAuthCredentials, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSlackOutboundWatches, listSlackReplyBadges, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergePrStack, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permalinkForSlackReplyBadge, permissionMode, persistVaultKeyInKeychain, planFileAbs, posixShellSingleQuote, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordSlackOutboundWatch, refreshGitHubAuth, refreshSlackReplyBadges, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resolveAgentExecutable, resolveClaudeExecutable, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubRepoSlug, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveVaultKey, resolveWorktreeStartPoint, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, saveLinearOAuth, secureFileUnlocksWith, setCaffeinateHold, setStatus, setVaultMasterKey, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackRelayUrl, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, stripBrightsyNdjsonNoise, submitPrStack, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toPublicAppSettings, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateOpencodeSettings, updateThread, validateLinearApiKey, withAgentInstructions, withExportedPath, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };
4294
+ export { AGENT_GIT_ACTIONS, ATTACHMENTS_DIR, type ActiveRun, type AddStackLayerInput, type AdoptInput, type AdvancedAppSettings, type AgentAdapter, type AgentEvent, type AgentGitAction, type AgentInstructionFile, type AgentKind, type AgentModelCatalog, type AgentModelInfo, type AgentSetupActionResult, type AgentSetupInfo, type AgentSetupKind, type AgentStatus, type AgentTurnInput, type AnthropicCacheControl, type AppSettings, type ApplyIntoMainResult, type AttachCommand, type Autonomy, BAKED_SLACK_RELAY_URL, BRIGHTSY_MCP_ALLOWED_TOOLS, type BranchInfo, type BrightsyAccount, type BrightsyChatTarget, type BrightsyChatTargets, type BrightsyCloudConnectAgent, type BrightsyHarnessSettings, type BrightsySession, BrightsySideboardApi, type BrightsyTeamTargets, CLAUDE_MODEL_CATALOG, 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 CaffeinateHoldState, type ClaudeHarnessSettings, type CleanupOrphansResult, type CliAgentKind, type CliExecutableSettings, type CloudConnectAgent, type CloudConnectOptions, type CloudConnectStatus, type CompactResult, type CompactThresholds, type ComposerFileBuffer, type ConductorSettings, type ConductorWorkspace, type ConnectedBrightsyTeamInfo, type CreateChatTabInput, type CreateGlobalChatOpts, type CreateStackInput, 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, GITHUB_GIT_AUTH_MODES, GLOBAL_WORKSPACE_ID, type GetDiffOptions, type GhStackStatus, type GitHubStatus, type GitWorktreeStatus, type GithubGitAuthMode, HARNESS_ENV_KEYS, type HarnessId, type InitStackFromThreadInput, type IntegrationsSettings, type IpcApi, type IssueInfo, type IssueSource, LEGACY_ATTACHMENTS_DIR, LEGACY_PLAN_FILE_REL, LEGACY_REVIEW_REQUEST_PATH, LINEAR_OAUTH_CANCELLED, LINEAR_OAUTH_PORT, LINEAR_OAUTH_REDIRECT, LINEAR_OAUTH_SCOPES, type LandPreview, type LandResult, type LinearComment, type LinearIssue, LinearOAuthCancelledError, type LinearTeam, type LinearTeamsResult, type LinearWorkflowState, type ListIssuesResult, MAX_ANTHROPIC_CACHE_CONTROL_BLOCKS, type McpServerStatus, type MessagePart, ORCHESTRATOR_AGENT_KINDS, type OpenPrStackLayersInput, type OpenStackLayerInput, type OpenStackLayerResult, type OrchestrationQuotaOnLimit, Orchestrator, type OrchestratorAgentKind, type OrchestratorEvent, type OrchestratorRuntime, type OrphanWorktree, PASTE_ATTACH_MIN_CHARS, PASTE_ATTACH_MIN_LINES, PLAN_FILE_NAME, PLAN_FILE_REL, PLAN_MODE_INSTRUCTION, type PendingPlanQuestions, type PlanQuestion, type PlanQuestionAnswer, type PlanQuestionOption, type PlanToolPartLike, type PrActor, type PrCheckRun, type PrCommentInfo, type PrCommitInfo, type PrDetails, type PrInfo, type PrMeta, type PrReviewInfo, type PrStack, type PrStackLayer, type PresentedPlan, type PublicAppSettings, type PublicIntegrationsSettings, REPO_REVIEW_NAME, REPO_REVIEW_PATH, REVIEW_REQUEST_NAME, REVIEW_REQUEST_PATH, REVIEW_REQUEST_PREFILL, type RepoSettings, type RepoSetupInfo, type RequestReviewResult, type ResolvedReviewGuidelines, type ReviewGuidelinesSource, type RunMode, type RunScript, SIDEBOARD_FORCE_STOP, SIDEBOARD_MCP_ALLOWED_TOOLS, SIDEBOARD_MCP_PROFILE_ENV, SLACK_LISTEN_BUSY_REPLY, SLACK_LISTEN_STOPPED_REPLY, SLACK_LISTEN_TIMEOUT_REPLY, SLACK_OAUTH_CANCELLED, SLACK_OAUTH_REDIRECT, SLACK_REPLY_FORMATTING, SLACK_SEEN_REACTION, type ScriptHandle, type SideboardMcpProfile, type SkillInfo, type SlackInboundMessage, type SlackListenOptions, type SlackListenStatus, SlackOAuthCancelledError, type SlackOutboundReply, type SlackOutboundWatch, type SlackRelayClientMessage, type SlackRelayClientOptions, SlackRelayHub, type SlackRelayServerHandle, type SlackRelayServerMessage, type SlackRelayServerOptions, type SlackReplyBadge, type SlackWorkspaceInfo, type SourceType, type SpawnTurnHandle, type SummarizeResult, THINKING_EFFORTS, type TeamName, type ThinkingEffort, type Thread, type ThreadAttachment, type ThreadMessage, type ThreadOptionsPatch, type ThreadStatus, type TokenUsage, type ToolPartLike, type TranscriptToolDetail, type TurnCommand, type UsageScope, type Workspace, type WorkspaceInventoryEntry, type WorkspaceScriptEnvOpts, ackSlackInboundSeen, addPrStackLayer, addStackLayerFromThread, addWorkspace, adoptThread, agentGitPrompt, allAdapters, allocatePort, allocatePortRange, allocateTeamName, allocateTeamSlug, appDataDir, appSettingsPath, appendIndexedGitConfig, appendMessage, applyAgentEvent, applyAppEnvironment, applyCompaction, applyGithubGitAuthEnv, applyThreadIntoMain, applyTurnUsage, assertOrchestratorCapableAgent, attachmentFromAbsolutePath, attachmentsFromBuffers, attachmentsFromWorktreePaths, attachmentsGitignoreBody, autoArchiveOnMergeEnabled, autoCleanupOrphansEnabled, autoRenameBranchEnabled, autoRunAfterSetupEnabled, branchDisplayLabel, brightsyAdapter, brightsyCloudConnectAgent, brightsyCloudConnectEnabled, brightsyConfigPath, brightsyInjectWorktreeMcpEnabled, brightsyMcpAllowedTools, brightsyMcpServerName, buildCachedUserContent, buildClaudeStreamJsonUserMessage, buildDiffCommentAttachment, buildForkTranscriptAttachment, buildPastedTextAttachment, buildReviewRequestAttachment, buildSessionSeed, buildWorkspaceScriptEnv, caffeinateHoldPath, caffeinateWhileCloudConnectEnabled, caffeinateWhileRunningEnabled, caffeinateWhileSlackListenEnabled, captureLoginEnv, captureTurnBaseline, checkoutPrStackLayer, childEnvWithAppSettings, claudeAdapter, claudeChromeEnabled, claudeUserSettingsPath, cleanupOrphanWorktrees, cloneRepoIntoSideboard, codexAdapter, coerceOrchestratorAgent, collectTakenTeamSlugs, commentLinearIssue, commitAll, conductorBundledBinDir, conductorDbPath, confirmLand, connectBrightsyTeam, connectSlackToken, contextTokens, coordinatorSystemPrompt, coordinatorTurnReminder, copyConfiguredFiles, countCacheControlBlocks, createChatTab, createEmptyThread, createExistingBranchWorktree, createGlobalChat, createLinearIssue, createLinearPkce, createOrUpdatePr, createPrStack, createThread, createThreadWorktree, currentBranch, cursorAdapter, cursorSdkMessageToEvents, decodeBrightsyTarget, deleteBranchOnPurgeEnabled, deleteThreadRecord, detectAgents, detectGhStack, detectLocalMergeConflicts, disconnectBrightsyTeam, disconnectLinear, disconnectLinearConnection, disconnectSlackWorkspace, discoverSkills, dismissSlackReplyBadge, dropCachedPrefixOnResume, encodeBrightsyTarget, enrichPathWithNpmGlobalBin, enrichWorkspacesWithGithub, ensureAgentPath, ensureCloudCoordinator, ensureGhPreferOrigin, ensureGlobalCoordinatorCwd, ensureReviewRequestFile, ensureSlackCoordinator, ensureSlackDeviceIdentity, ensureWorkspace, estimateMessageChars, estimateThreadChars, expandComposerPrompt, extractGhErrorDetail, extractPendingPlanQuestions, extractPresentedPlan, extractiveSummary, fetchPrHead, finalizeParts, findInvalidCacheControlTtlOrder, findOrphanWorktrees, findThreadByRef, findThreadForStackLayer, flattenTurnInput, forkChatTab, forkMessageSlice, forkThreadWorktree, formatAgentInstructions, formatArtifactDirective, formatBrightsyFetchError, formatFetchError, formatGhLandError, formatGitAuthModeDirective, formatIpcInvokeError, formatMessagesAsTranscript, formatPlanQuestionAnswers, formatPlanQuestionsForChat, formatRateLimitResetHint, formatRenameBranchDirective, formatSlackExternalReplyPrompt, formatSlackInboundPrompt, formatSlackRepliesForTurn, formatSlackSignedReply, formatTranscriptMarkdown, formatWorkspaceInventory, formatWorktreeDirective, formatWorktreeReminder, getAdapter, getAgentSetupInfo, getBrightsySession, getCaffeinateHold, getDefaultAgent, getDefaultEffort, getDefaultFast, getDefaultModel, getDefaultRunScript, getDiff, getDiffSummary, getGitHubStatus, getGithubGitAuthMode, getGithubPat, getIssueSource, getLinearApiKey, getLinearAuthToken, getLinearIssue, getOrchestrator, getPr, getPrChecks, getPrDetails, getPrMeta, getPrStack, getRepoSetupInfo, getRunMode, getRunScript, getSlackWorkspace, gh, ghHeadRef, ghRepoSelectArgs, git, githubAgentGitEnv, globalAgentCwd, handleSlackInbound, harnessEnvKey, hasBakedLinearOAuth, hasBakedSlackOAuth, hasConductorHook, hasCursorWorktreeSetup, hasRepoHook, hasWorkspaceHook, healOrchestrationSoccerTitles, httpFetch, importConductorWorkspace, importConductorWorkspaceAsync, initPrStack, initStackFromThread, initializeGitRepository, inspectGitWorktree, installAgent, isAskUserToolName, isBrightsyConnected, isBrightsyNdjsonLine, isCloudCoordinatorThread, isConductorBundledCli, isCursorAutoModel, isDirty, isGhRateLimitError, isGlobalRepoPath, isGlobalThread, isImageFilePath, isInPrStack, isInboundForThisDesktop, isLinearConnected, isLinearOAuthCancelled, isOrchestratorCapableAgent, isOrchestratorThread, isPidAlive, isPlaceholderBranch, isPresentPlanToolName, isSessionQuotaLimit, isSideboardScratchPath, isSlackCoordinatorThread, isSlackExternalReplyPrompt, isSlackOAuthCancelled, isThinkingEffort, isThreadCaffeinated, isWorkspaceScratchPath, linearAuthorizationHeader, linearGraphql, linearOAuthAuthorizeUrl, linearOAuthCredentials, listAgentSetupInfo, listBranchCommits, listBranches, listBrightsyAccounts, listBrightsyChatTargets, listCodexModels, listConductorWorkspaces, listConnectedBrightsyTeams, listCursorModels, listGitHubIssues, listGlobalThreads, listIssues, listLinearIssues, listLinearIssuesDirect, listLinearTeams, listModelsForAgent, listOpencodeModels, listPrs, listRunScripts, listSlackOutboundWatches, listSlackReplyBadges, listSlackWorkspaces, listThreads, listWorkspaces, listWorktreeFiles, listWorktrees, loadAgentInstructions, loadAppSettings, loadBrightsyConfig, loadConductorSettings, loadRepoSettings, loadWorkspaceSettings, locksDir, loginAgent, lookupSoccerTeam, maxConcurrentAgents, maybeCompactContext, mcpAllowTools, mcpAuthWarnings, mergePr, mergePrStack, mergeUsage, nextPastedTextName, nextThinkingEffort, normalizeParseResult, normalizeThinkingEffort, normalizeThread, normalizeTurnInput, normalizeWorktreePath, openInSystemTerminal, openPrStackLayers, openStackLayer, opencodeAdapter, orchestrationQuotaFallbackAgent, orchestrationQuotaOnLimit, orchestrationTitleNeedsSoccerNickname, orchestratorSessionPoisonedByBuiltins, originGhRepoEnv, parseCursorRunnerLine, parseForceStopMessage, parseGhStackViewJson, parseGithubSlugFromRemoteUrl, parseMcpList, parsePlanQuestionsInput, parseSessionQuotaResetAt, parseSlackRelayClientMessage, parseSlackRelayServerMessage, partsToAssistantText, pastedTextStats, pendingSlackExternalReplies, permalinkForSlackReplyBadge, permissionMode, persistVaultKeyInKeychain, planFileAbs, posixShellSingleQuote, prepareTerminalCommand, previewLand, promptMentionsBrightsy, pushBranch, readExistingReviewRequestFile, readKeychainVaultKey, readPlanFile, readSkillBody, readThread, readWorktreeFile, readWorktreeFileForUpload, readWorktreeInclude, recordSlackOutboundWatch, refreshGitHubAuth, refreshSlackReplyBadges, releaseCaffeinateHoldForThread, removeWorkspace, removeWorktree, repoSlug, requestOccupancy, requestReview, requireAgent, resetGhStackDetectCache, resolveAgentExecutable, resolveClaudeExecutable, resolveCommandBinarySync, resolveConductorCursorAgentId, resolveCursorModelId, resolveDefaultBranch, resolveDiffBaseRef, resolveEffectiveIssueSource, resolveFilesToCopy, resolveGhAuthToken, resolveGithubRepoSlug, resolveLinearState, resolveLinearTeam, resolveLoginCommand, resolveNewThreadOptions, resolvePlanMarkdown, resolvePrSelector, resolveQuotaFallbackAgent, resolveRepoRoot, resolveReviewGuidelines, resolveSlackListenMode, resolveThreadDefaults, resolveThreadEffort, resolveVaultKey, resolveWorktreeStartPoint, rewriteLinearError, run, runArchiveScript, runCloudConnect, runCursorWorktreeSetup, runSetupScript, runSlackListen, runSlackRelayClient, sameWorktreePath, sanitizeMcpServerName, saveAppSettings, saveLinearOAuth, secureFileUnlocksWith, setCaffeinateHold, setHttpFetchImpl, setStatus, setVaultMasterKey, settingsSourceLabel, shouldAttachPastedText, shouldCompactContext, shouldInjectBrightsyMcp, shouldRefreshReviewRequestTemplate, shouldRunWorktreeCleanup, sideboardHomeDir, sideboardMcpProfile, sideboardReposDir, sideboardWorkspacesDir, slackAppLevelToken, slackArchiveUrl, slackCoordinatorSourceRef, slackListenEnabled, slackOAuthCredentials, slackOAuthResultUrl, slackRelayUrl, slugify, spawnAgentTurn, splitForCompaction, stackAgentDefaultsFrom, stackIdFrom, stackMergeReadiness, stageAbsolutePathsAsAttachments, stageBuffersAsAttachments, startDevServer, startLinearOAuth, startMcpServer, startOrchestration, startSlackOAuth, startSlackRelayServer, stripBrightsyNdjsonNoise, stripNestedElectronEnv, submitPrStack, suggestSlug, summarizeConversation, switchBrightsyAccount, syncWorkspacesFromThreads, takenTeamSlugsForChatTab, takenTeamSlugsForOrchestration, taskMessageText, thinkingEffortBars, thinkingEffortLabel, threadDisplayLabel, threadFilePath, threadLockPath, threadRequestsBrightsyMcp, threadsDir, threadsSharingWorktree, toPublicAppSettings, toolDescription, toolDetail, toolFilePath, totalTokens, updateAdvancedSettings, updateAgentExecutable, updateAppEnvironment, updateBrightsySettings, updateClaudeSettings, updateCodexSettings, updateDefaultsSettings, updateIntegrationsSettings, updateLinearIssue, updateOpencodeSettings, updateThread, validateLinearApiKey, withAgentInstructions, withExportedPath, withThreadLock, workspaceSettingsSourceLabel, worktreeCleanupSettings, worktreeDisplayLabel, worktreeDisplayLabelForGroup, worktreeNameFromPath, worktreesRoot, writeInjectedMcpConfig, writePlanFile, writeThread, writeWorktreeFile };