@get-bb/plugin-sdk 0.5.9 → 0.5.15

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.
@@ -149,7 +149,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
149
149
  }, z$1.core.$strict>]>;
150
150
  type AppSettingsUpdate = z$1.infer<typeof appSettingsUpdateSchema>;
151
151
 
152
- declare const UI_PREFERENCE_KEYS: readonly ["sidebar.organizationMode", "sidebar.threadGrouping.environment", "sidebar.chronologicalSort", "sidebar.sortDirection", "sidebar.sectionOrder", "sidebar.manualSectionOrder", "sidebar.machineSectionOrder", "sidebar.hiddenGroups", "sidebar.collapsedSections", "sidebar.collapsedProjects", "sidebar.collapsedThreads", "sidebar.collapsedEnvironments", "sidebar.collapsedThreadSections", "sidebar.collapsedMachines", "sidebar.footerOrder", "sidebar.hiddenFooterItems", "sidebar.pluginPanelOrder", "sidebar.visiblePluginPanels", "sidebar.navigationProvider", "sidebar.threadListProvider"];
152
+ declare const UI_PREFERENCE_KEYS: readonly ["sidebar.organizationMode", "sidebar.threadGrouping.environment", "sidebar.chronologicalSort", "sidebar.sortDirection", "sidebar.sectionOrder", "sidebar.manualSectionOrder", "sidebar.machineSectionOrder", "sidebar.hiddenGroups", "sidebar.collapsedSections", "sidebar.collapsedProjects", "sidebar.collapsedThreads", "sidebar.collapsedEnvironments", "sidebar.collapsedThreadSections", "sidebar.collapsedMachines", "sidebar.footerOrder", "sidebar.hiddenFooterItems", "sidebar.pluginPanelOrder", "sidebar.visiblePluginPanels", "sidebar.navigationProvider", "sidebar.headerProvider", "sidebar.threadListProvider"];
153
153
  type UiPreferenceKey = (typeof UI_PREFERENCE_KEYS)[number];
154
154
  interface UiPreferenceDefinition<Schema extends z$1.ZodTypeAny = z$1.ZodTypeAny> {
155
155
  schema: Schema;
@@ -191,7 +191,8 @@ declare const uiPreferenceDefinitions: {
191
191
  readonly "sidebar.hiddenFooterItems": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
192
192
  readonly "sidebar.pluginPanelOrder": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
193
193
  readonly "sidebar.visiblePluginPanels": UiPreferenceDefinition<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
194
- readonly "sidebar.navigationProvider": UiPreferenceDefinition<z$1.ZodString>;
194
+ readonly "sidebar.navigationProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
195
+ readonly "sidebar.headerProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
195
196
  readonly "sidebar.threadListProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
196
197
  };
197
198
  type UiPreferenceValue<Key extends UiPreferenceKey> = z$1.infer<(typeof uiPreferenceDefinitions)[Key]["schema"]>;
@@ -5867,18 +5868,20 @@ declare const hostDaemonCommandRegistry: {
5867
5868
  }, z$1.core.$strict>, z$1.ZodObject<{
5868
5869
  sources: z$1.ZodArray<z$1.ZodObject<{
5869
5870
  icon: z$1.ZodOptional<z$1.ZodString>;
5870
- id: z$1.ZodEnum<{
5871
+ id: z$1.ZodUnion<readonly [z$1.ZodEnum<{
5871
5872
  arc: "arc";
5872
5873
  brave: "brave";
5873
5874
  chrome: "chrome";
5874
5875
  chromium: "chromium";
5876
+ dia: "dia";
5875
5877
  edge: "edge";
5876
5878
  firefox: "firefox";
5877
5879
  helium: "helium";
5878
5880
  opera: "opera";
5879
5881
  safari: "safari";
5880
5882
  vivaldi: "vivaldi";
5881
- }>;
5883
+ zen: "zen";
5884
+ }>, z$1.ZodString]>;
5882
5885
  name: z$1.ZodString;
5883
5886
  profiles: z$1.ZodArray<z$1.ZodObject<{
5884
5887
  cookieCount: z$1.ZodOptional<z$1.ZodNumber>;
@@ -5904,18 +5907,20 @@ declare const hostDaemonCommandRegistry: {
5904
5907
  }, z$1.core.$strip>, z$1.ZodObject<{
5905
5908
  kind: z$1.ZodLiteral<"personal">;
5906
5909
  }, z$1.core.$strip>], "kind">;
5907
- sourceId: z$1.ZodEnum<{
5910
+ sourceId: z$1.ZodUnion<readonly [z$1.ZodEnum<{
5908
5911
  arc: "arc";
5909
5912
  brave: "brave";
5910
5913
  chrome: "chrome";
5911
5914
  chromium: "chromium";
5915
+ dia: "dia";
5912
5916
  edge: "edge";
5913
5917
  firefox: "firefox";
5914
5918
  helium: "helium";
5915
5919
  opera: "opera";
5916
5920
  safari: "safari";
5917
5921
  vivaldi: "vivaldi";
5918
- }>;
5922
+ zen: "zen";
5923
+ }>, z$1.ZodString]>;
5919
5924
  sourceProfileDirectory: z$1.ZodString;
5920
5925
  type: z$1.ZodLiteral<"desktop.browser.import_cookies">;
5921
5926
  }, z$1.core.$strict>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
@@ -8752,18 +8757,20 @@ declare const desktopBrowserCommandSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObj
8752
8757
  }, z$1.core.$strip>, z$1.ZodObject<{
8753
8758
  kind: z$1.ZodLiteral<"personal">;
8754
8759
  }, z$1.core.$strip>], "kind">;
8755
- sourceId: z$1.ZodEnum<{
8760
+ sourceId: z$1.ZodUnion<readonly [z$1.ZodEnum<{
8756
8761
  arc: "arc";
8757
8762
  brave: "brave";
8758
8763
  chrome: "chrome";
8759
8764
  chromium: "chromium";
8765
+ dia: "dia";
8760
8766
  edge: "edge";
8761
8767
  firefox: "firefox";
8762
8768
  helium: "helium";
8763
8769
  opera: "opera";
8764
8770
  safari: "safari";
8765
8771
  vivaldi: "vivaldi";
8766
- }>;
8772
+ zen: "zen";
8773
+ }>, z$1.ZodString]>;
8767
8774
  sourceProfileDirectory: z$1.ZodString;
8768
8775
  type: z$1.ZodLiteral<"desktop.browser.import_cookies">;
8769
8776
  }, z$1.core.$strict>], "type">;
@@ -8850,18 +8857,20 @@ declare const desktopBrowserResultSchemas: {
8850
8857
  "desktop.browser.list_import_sources": z$1.ZodObject<{
8851
8858
  sources: z$1.ZodArray<z$1.ZodObject<{
8852
8859
  icon: z$1.ZodOptional<z$1.ZodString>;
8853
- id: z$1.ZodEnum<{
8860
+ id: z$1.ZodUnion<readonly [z$1.ZodEnum<{
8854
8861
  arc: "arc";
8855
8862
  brave: "brave";
8856
8863
  chrome: "chrome";
8857
8864
  chromium: "chromium";
8865
+ dia: "dia";
8858
8866
  edge: "edge";
8859
8867
  firefox: "firefox";
8860
8868
  helium: "helium";
8861
8869
  opera: "opera";
8862
8870
  safari: "safari";
8863
8871
  vivaldi: "vivaldi";
8864
- }>;
8872
+ zen: "zen";
8873
+ }>, z$1.ZodString]>;
8865
8874
  name: z$1.ZodString;
8866
8875
  profiles: z$1.ZodArray<z$1.ZodObject<{
8867
8876
  cookieCount: z$1.ZodOptional<z$1.ZodNumber>;
@@ -14512,18 +14521,20 @@ declare const desktopBrowserImportCookiesRequestSchema: z$1.ZodObject<{
14512
14521
  }, z$1.core.$strip>, z$1.ZodObject<{
14513
14522
  kind: z$1.ZodLiteral<"personal">;
14514
14523
  }, z$1.core.$strip>], "kind">>;
14515
- sourceId: z$1.ZodEnum<{
14524
+ sourceId: z$1.ZodUnion<readonly [z$1.ZodEnum<{
14516
14525
  arc: "arc";
14517
14526
  brave: "brave";
14518
14527
  chrome: "chrome";
14519
14528
  chromium: "chromium";
14529
+ dia: "dia";
14520
14530
  edge: "edge";
14521
14531
  firefox: "firefox";
14522
14532
  helium: "helium";
14523
14533
  opera: "opera";
14524
14534
  safari: "safari";
14525
14535
  vivaldi: "vivaldi";
14526
- }>;
14536
+ zen: "zen";
14537
+ }>, z$1.ZodString]>;
14527
14538
  sourceProfileDirectory: z$1.ZodString;
14528
14539
  }, z$1.core.$strict>;
14529
14540
  type ExperimentalDesktopBrowserHostRequest = z$1.infer<typeof desktopBrowserHostRequestSchema>;
@@ -16614,15 +16625,21 @@ type ExperimentalSidebarNavigationAction = {
16614
16625
  kind: "search-threads";
16615
16626
  } | {
16616
16627
  kind: "open-extensions";
16628
+ } | {
16629
+ kind: "open-skills";
16617
16630
  } | {
16618
16631
  kind: "open-plugin-panel";
16619
16632
  pluginId: string;
16620
16633
  panelId: string;
16621
16634
  };
16622
- /** Semantic icon identity for one sidebar navigation item. */
16635
+ /**
16636
+ * Semantic icon identity for one sidebar navigation item. Render it with
16637
+ * {@link PluginSdkApp.experimental_SidebarNavigationIcon} to match bb's
16638
+ * artwork, including plugin branding.
16639
+ */
16623
16640
  type ExperimentalSidebarNavigationIcon = {
16624
16641
  kind: "host";
16625
- name: "extensions" | "new-thread" | "search";
16642
+ name: "extensions" | "new-thread" | "search" | "skills";
16626
16643
  } | {
16627
16644
  kind: "plugin";
16628
16645
  pluginId: string;
@@ -16630,28 +16647,164 @@ type ExperimentalSidebarNavigationIcon = {
16630
16647
  };
16631
16648
  /** One host-owned destination or action a plugin may arrange. */
16632
16649
  interface ExperimentalSidebarNavigationItem {
16650
+ /**
16651
+ * Arrangement key, stable across reloads: `__bb__/new-thread`,
16652
+ * `__bb__/search-threads`, `__bb__/extensions`, `__bb__/skills`,
16653
+ * `__bb__/automations`, or `<pluginId>/<panelId>`. The same keys appear in
16654
+ * the `sidebar.pluginPanelOrder` and `sidebar.visiblePluginPanels`
16655
+ * settings.
16656
+ */
16633
16657
  id: string;
16634
16658
  label: string;
16635
16659
  icon: ExperimentalSidebarNavigationIcon;
16636
16660
  action: ExperimentalSidebarNavigationAction;
16637
16661
  isDisabled: boolean;
16662
+ /**
16663
+ * False when the user hid the item from the sidebar. Draw hidden items in an
16664
+ * overflow menu rather than dropping them, so they stay reachable.
16665
+ */
16666
+ isVisible: boolean;
16667
+ /**
16668
+ * A plugin panel remembered from the last session whose bundle has not
16669
+ * registered yet. Activating it does nothing until it loads.
16670
+ */
16671
+ isLoading: boolean;
16672
+ /**
16673
+ * The plugin that contributed this panel; null for bb's own items. Gates
16674
+ * `openDetails` and `disablePlugin`.
16675
+ */
16676
+ pluginId: string | null;
16638
16677
  shortcut: ExperimentalSidebarNavigationShortcut | null;
16639
- experimental_splitProps: {
16640
- onPointerDown?: (event: react.PointerEvent<HTMLElement>) => void;
16641
- };
16678
+ /**
16679
+ * The panel's `experimental_sidebarAccessory`, already wrapped in the host's
16680
+ * crash boundary. Null for bb's items, panels without an accessory, and on
16681
+ * compact viewports. Keep it within one line, about 4rem by 1.25rem.
16682
+ */
16683
+ experimental_Accessory: ComponentType | null;
16642
16684
  }
16643
16685
  /** How the host should activate a sidebar navigation item. */
16644
16686
  interface ExperimentalSidebarNavigationActivationOptions {
16645
16687
  openInSplit: boolean;
16646
16688
  }
16647
- /** Props passed to an `experimental_sidebarNavigation` component. */
16648
- interface ExperimentalSidebarNavigationProps {
16689
+ /**
16690
+ * Host behavior for sidebar navigation items (see
16691
+ * {@link ExperimentalSidebarNavigationState}). Unknown item ids are ignored.
16692
+ * Calls made after the calling component unmounts do nothing.
16693
+ */
16694
+ interface ExperimentalSidebarNavigationActions {
16695
+ /**
16696
+ * Run the item's host behavior and close the mobile sidebar drawer.
16697
+ * `openInSplit` is ignored where splits are unavailable, and disabled or
16698
+ * loading items do nothing.
16699
+ */
16700
+ activate(itemId: string, options: ExperimentalSidebarNavigationActivationOptions): void;
16701
+ /** Hide or show one item. Persists to `sidebar.visiblePluginPanels`. */
16702
+ setVisible(itemId: string, isVisible: boolean): void;
16703
+ /**
16704
+ * Save a new order. Pass item ids in the order you want; unknown ids are
16705
+ * dropped and ids you leave out keep their relative order after the ones
16706
+ * you pass. Persists to `sidebar.pluginPanelOrder`.
16707
+ */
16708
+ setOrder(itemIds: readonly string[]): void;
16709
+ /** Open bb's customize editor, which reorders and hides items. */
16710
+ openCustomize(): void;
16711
+ /** Open the owning plugin's details. Does nothing when `pluginId` is null. */
16712
+ openDetails(itemId: string): void;
16713
+ /**
16714
+ * Disable the owning plugin, leave its panel if it is open, and show a
16715
+ * toast. Rejects after the host's error toast when disabling fails. Does
16716
+ * nothing when `pluginId` is null.
16717
+ */
16718
+ disablePlugin(itemId: string): Promise<void>;
16719
+ }
16720
+ /** What {@link PluginSdkApp.experimental_useSidebarNavigation} returns. */
16721
+ interface ExperimentalSidebarNavigationState {
16722
+ /** Every item in the user's saved order, visible and hidden. */
16649
16723
  items: readonly ExperimentalSidebarNavigationItem[];
16724
+ /** The item whose destination the route currently shows, or null. */
16650
16725
  activeItemId: string | null;
16726
+ /**
16727
+ * True while the user holds the app command modifier, when bb's own rows
16728
+ * reveal their `shortcut` labels. Show yours at the same time.
16729
+ */
16730
+ isShortcutModifierHeld: boolean;
16731
+ actions: ExperimentalSidebarNavigationActions;
16732
+ }
16733
+ /**
16734
+ * Per-item drag-to-split support (see
16735
+ * {@link PluginSdkApp.experimental_useSidebarNavigationSplit}). Same contract
16736
+ * as {@link PluginSidebarThreadSplit}.
16737
+ */
16738
+ interface ExperimentalSidebarNavigationSplit {
16739
+ /**
16740
+ * Spread onto the item's interactive element. Empty when the item cannot
16741
+ * open in a pane, so spreading it is always safe.
16742
+ */
16743
+ splitProps: {
16744
+ onPointerDown?: (event: react.PointerEvent<HTMLElement>) => void;
16745
+ };
16746
+ /**
16747
+ * False for items that cannot open in a pane (Search, Plugins, Skills), on
16748
+ * compact viewports, and when splits are unavailable.
16749
+ */
16750
+ isAvailable: boolean;
16751
+ /** Where this item's destination sits in the split layout, or null. */
16752
+ layout: {
16753
+ panes: readonly PluginSidebarSplitPane[];
16754
+ } | null;
16755
+ }
16756
+ /** Options for {@link PluginSdkApp.experimental_useSidebarNavigationSplit}. */
16757
+ interface ExperimentalSidebarNavigationSplitOptions {
16758
+ /**
16759
+ * `sidebar` (the default) engages the drag once the pointer leaves the
16760
+ * sidebar, so a row list with its own drag-to-reorder keeps working.
16761
+ * `distance` engages after a short movement in any direction; use it for
16762
+ * rows inside a menu or popover that covers the main area.
16763
+ */
16764
+ activation?: "distance" | "sidebar";
16765
+ /** Called when the drag engages, for example to close the menu the row is in. */
16766
+ onDragStart?: () => void;
16767
+ }
16768
+ /** Props for {@link PluginSdkApp.experimental_SidebarNavigationIcon}. */
16769
+ interface ExperimentalSidebarNavigationIconProps {
16770
+ icon: ExperimentalSidebarNavigationIcon;
16771
+ className?: string;
16772
+ }
16773
+ /**
16774
+ * Props passed to an `experimental_sidebarNavigation` component. Read the
16775
+ * items and their actions with
16776
+ * {@link PluginSdkApp.experimental_useSidebarNavigation}.
16777
+ */
16778
+ interface ExperimentalSidebarNavigationProps {
16651
16779
  isCompactViewport: boolean;
16652
- experimental_activate(itemId: string, options: ExperimentalSidebarNavigationActivationOptions): void;
16780
+ /**
16781
+ * Renders bb's bundled Navigation plugin, or nothing while it is disabled.
16782
+ * Kept for plugins written before `experimental_useSidebarNavigation`;
16783
+ * render items from that hook instead. Scheduled for removal.
16784
+ *
16785
+ * @deprecated
16786
+ */
16653
16787
  experimental_Original: ComponentType;
16654
16788
  }
16789
+ /**
16790
+ * Props passed to an `experimental_sidebarHeader` component, rendered in the
16791
+ * sidebar's header row between the sidebar toggle (and the macOS window
16792
+ * controls) and bb's back and forward buttons.
16793
+ */
16794
+ interface ExperimentalSidebarHeaderProps {
16795
+ /**
16796
+ * Width in px of the space the component may use, updated when the sidebar
16797
+ * resizes or the window chrome changes. It can be smaller than
16798
+ * `controlSize` in a narrow sidebar.
16799
+ */
16800
+ width: number;
16801
+ /**
16802
+ * Width and height in px of the header's own buttons, equal to the
16803
+ * `--bb-sidebar-control-size` CSS variable. Size your controls to match.
16804
+ */
16805
+ controlSize: number;
16806
+ isCompactViewport: boolean;
16807
+ }
16655
16808
  /**
16656
16809
  * Props passed to an `experimental_threadList` component — the sidebar's
16657
16810
  * scrolling thread area, replaced wholesale by one plugin.
@@ -17752,7 +17905,14 @@ interface PluginThreadListRegistration {
17752
17905
  description?: string;
17753
17906
  component: ComponentType<PluginThreadListProps>;
17754
17907
  }
17755
- /** Replace the bounded navigation controls above the sidebar thread list. */
17908
+ /**
17909
+ * Replace the navigation controls above the sidebar thread list. Exclusive:
17910
+ * the user picks one provider under Settings → Appearance → Navigation, and
17911
+ * bb ships its own rows as the bundled Navigation plugin
17912
+ * (`navigation/navigation`, the default). A picked provider that is disabled
17913
+ * or removed falls back to Navigation; a crashing provider is replaced by a
17914
+ * placeholder with a Reload button.
17915
+ */
17756
17916
  interface ExperimentalSidebarNavigationRegistration {
17757
17917
  /** Unique within the plugin; letters, digits, `-`, `_`. */
17758
17918
  id: string;
@@ -17762,6 +17922,23 @@ interface ExperimentalSidebarNavigationRegistration {
17762
17922
  description?: string;
17763
17923
  component: ComponentType<ExperimentalSidebarNavigationProps>;
17764
17924
  }
17925
+ /**
17926
+ * Render a component in the sidebar's header row, between the sidebar toggle
17927
+ * and bb's back and forward buttons. Exclusive: the user picks at most one
17928
+ * header under Settings → Appearance, and by default the header shows only
17929
+ * bb's own controls. Content is clipped to the row, so it cannot move the
17930
+ * thread list or bb's controls. On macOS the empty space keeps dragging the
17931
+ * window; buttons, links, and inputs do not.
17932
+ */
17933
+ interface ExperimentalSidebarHeaderRegistration {
17934
+ /** Unique within the plugin; letters, digits, `-`, `_`. */
17935
+ id: string;
17936
+ /** Label shown in Settings → Appearance and capability details. */
17937
+ title: string;
17938
+ /** Optional one-line description shown with the provider choice. */
17939
+ description?: string;
17940
+ component: ComponentType<ExperimentalSidebarHeaderProps>;
17941
+ }
17765
17942
  /**
17766
17943
  * Register this plugin as a viewer/editor for file extensions. By default,
17767
17944
  * matching files render the first applicable opener in deterministic slot
@@ -18166,6 +18343,12 @@ interface PluginAppSlots {
18166
18343
  sidebarFooterAction(registration: PluginSidebarFooterActionRegistration): void;
18167
18344
  /** Replace the bounded sidebar navigation controls. */
18168
18345
  experimental_sidebarNavigation(registration: ExperimentalSidebarNavigationRegistration): void;
18346
+ /**
18347
+ * Render a component in the sidebar header row (see
18348
+ * {@link ExperimentalSidebarHeaderRegistration}). Experimental: see
18349
+ * docs/api_to_audit.md.
18350
+ */
18351
+ experimental_sidebarHeader(registration: ExperimentalSidebarHeaderRegistration): void;
18169
18352
  /**
18170
18353
  * Replace the sidebar's thread list (see
18171
18354
  * {@link PluginThreadListRegistration}). Experimental: see
@@ -19221,6 +19404,27 @@ interface PluginSdkApp {
19221
19404
  * Experimental: see docs/api_to_audit.md.
19222
19405
  */
19223
19406
  experimental_useSidebarThreadSplit(threadId: string): PluginSidebarThreadSplit;
19407
+ /**
19408
+ * The sidebar navigation items in the user's saved order, the active item,
19409
+ * and the host actions that activate, hide, reorder, and customize them
19410
+ * (see {@link ExperimentalSidebarNavigationState}). One model shared by
19411
+ * every caller in the sidebar. Items keep their identity while unchanged.
19412
+ * Outside the sidebar it returns no items and actions that do nothing.
19413
+ * Experimental: see docs/api_to_audit.md.
19414
+ */
19415
+ experimental_useSidebarNavigation(): ExperimentalSidebarNavigationState;
19416
+ /**
19417
+ * Per-item drag-to-split support for navigation items (see
19418
+ * {@link ExperimentalSidebarNavigationSplit}). Call it once per rendered
19419
+ * item. Experimental: see docs/api_to_audit.md.
19420
+ */
19421
+ experimental_useSidebarNavigationSplit(itemId: string, options?: ExperimentalSidebarNavigationSplitOptions): ExperimentalSidebarNavigationSplit;
19422
+ /**
19423
+ * bb's artwork for a navigation item's icon: bb's glyphs for its own items,
19424
+ * and the contributing plugin's branding for plugin panels. Experimental:
19425
+ * see docs/api_to_audit.md.
19426
+ */
19427
+ experimental_SidebarNavigationIcon: ComponentType<ExperimentalSidebarNavigationIconProps>;
19224
19428
  /**
19225
19429
  * Whether the composer holds an unsent draft for one thread (see
19226
19430
  * {@link PluginSidebarThreadDraftState}). Per row, because a draft is
@@ -19410,6 +19614,9 @@ declare const experimental_useSidebarThreads: (options?: {
19410
19614
  declare const experimental_useSidebarThreadActions: () => PluginSidebarThreadActions;
19411
19615
  declare const experimental_useSidebarThreadPullRequest: (threadId: string) => PluginSidebarThreadPullRequestState;
19412
19616
  declare const experimental_useSidebarThreadSplit: (threadId: string) => PluginSidebarThreadSplit;
19617
+ declare const experimental_useSidebarNavigation: () => ExperimentalSidebarNavigationState;
19618
+ declare const experimental_useSidebarNavigationSplit: (itemId: string, options?: ExperimentalSidebarNavigationSplitOptions) => ExperimentalSidebarNavigationSplit;
19619
+ declare const experimental_SidebarNavigationIcon: react.ComponentType<ExperimentalSidebarNavigationIconProps>;
19413
19620
  declare const useSidebarThreadDraft: (threadId: string) => PluginSidebarThreadDraftState;
19414
19621
  declare const useSidebarThreadDraftIds: () => ReadonlySet<string>;
19415
19622
  declare const useSidebarThreadRowStatus: (threadId: string) => PluginSidebarThreadRowStatus | null;
@@ -19422,5 +19629,5 @@ declare const useSdk: () => PluginBrowserBbSdk;
19422
19629
  declare const experimental_useProviders: () => PluginProvidersState;
19423
19630
  declare const experimental_useCodeTheme: () => PluginCodeThemeState;
19424
19631
 
19425
- export { Markdown, ThreadChat, ThreadTitle, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_Icon, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderIcon, experimental_ProviderModelPicker, experimental_SourceCode, experimental_useAppPanel, experimental_useBranches, experimental_useCheckoutState, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useEnvironmentProviders, useRealtime, useRealtimeConnectionState, useRpc, useSdk, useSettings, useSidebarSplitLayout, useSidebarThreadDraft, useSidebarThreadDraftIds, useSidebarThreadRowStatus, useSidebarThreadRowStatuses, useSidebarThreadShortcut };
19426
- export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSelection, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProvider, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProvidersState, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderIconRegistration, PluginProvidersState, PluginRealtimeConnectionState, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
19632
+ export { Markdown, ThreadChat, ThreadTitle, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_Icon, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderIcon, experimental_ProviderModelPicker, experimental_SidebarNavigationIcon, experimental_SourceCode, experimental_useAppPanel, experimental_useBranches, experimental_useCheckoutState, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarNavigation, experimental_useSidebarNavigationSplit, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useEnvironmentProviders, useRealtime, useRealtimeConnectionState, useRpc, useSdk, useSettings, useSidebarSplitLayout, useSidebarThreadDraft, useSidebarThreadDraftIds, useSidebarThreadRowStatus, useSidebarThreadRowStatuses, useSidebarThreadShortcut };
19633
+ export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSelection, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarHeaderRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProvider, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProvidersState, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderIconRegistration, PluginProvidersState, PluginRealtimeConnectionState, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
@@ -6,7 +6,7 @@
6
6
  // and read the real source: https://github.com/get-bb/bb
7
7
 
8
8
  import { z } from 'zod';
9
- import { ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterItemRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, ExperimentalSidebarNavigationRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginCommandRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
9
+ import { ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterItemRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarHeaderRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginCommandRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
10
10
 
11
11
  type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
12
12
  interface ExperimentalSidebarFooterRuntimeSnapshot {
@@ -64,6 +64,7 @@ interface CollectedPluginAppRegistrations {
64
64
  sidebarFooterActions: PluginSidebarFooterActionRegistration[];
65
65
  experimentalSidebarFooterItems: CollectedExperimentalSidebarFooterItem[];
66
66
  experimentalSidebarNavigations: ExperimentalSidebarNavigationRegistration[];
67
+ experimentalSidebarHeaders: ExperimentalSidebarHeaderRegistration[];
67
68
  threadLists: PluginThreadListRegistration[];
68
69
  threadHeaderActions: PluginThreadHeaderActionRegistration[];
69
70
  browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { ReactNode, ComponentType } from 'react';
9
9
  import { RenderResult } from '@testing-library/react';
10
- import { ExperimentalSidebarFooterItemRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, ExperimentalSidebarNavigationRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, ExperimentalComposerSubmitOptions, ExperimentalComposerSelection, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, PluginEnvironmentProvidersState, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
10
+ import { ExperimentalSidebarFooterItemRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarHeaderRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, ExperimentalComposerSubmitOptions, ExperimentalComposerSelection, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalSidebarNavigationItem, PluginEnvironmentProvidersState, PluginSidebarThreadActions, ExperimentalSidebarNavigationActions } from '@get-bb/plugin-sdk';
11
11
 
12
12
  type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
13
13
  interface ExperimentalSidebarFooterRuntimeSnapshot {
@@ -149,6 +149,17 @@ interface SidebarActionCall {
149
149
  pinned?: boolean;
150
150
  read?: boolean;
151
151
  }
152
+ /**
153
+ * One recorded `experimental_useSidebarNavigation()` action, or a split drag
154
+ * started from `experimental_useSidebarNavigationSplit()` (`beginSplitDrag`).
155
+ */
156
+ interface SidebarNavigationCall {
157
+ method: keyof ExperimentalSidebarNavigationActions | "beginSplitDrag";
158
+ itemId?: string;
159
+ itemIds?: string[];
160
+ isVisible?: boolean;
161
+ openInSplit?: boolean;
162
+ }
152
163
  /**
153
164
  * Install the test runtime at `globalThis.__bbPluginRuntime.pluginSdkApp`.
154
165
  * Idempotent per module instance; must run before the plugin's `app.tsx`
@@ -167,6 +178,7 @@ interface CapturedPluginApp {
167
178
  sidebarFooterActions: PluginSidebarFooterActionRegistration[];
168
179
  experimentalSidebarFooterItems: CollectedExperimentalSidebarFooterItem[];
169
180
  experimentalSidebarNavigations: ExperimentalSidebarNavigationRegistration[];
181
+ experimentalSidebarHeaders: ExperimentalSidebarHeaderRegistration[];
170
182
  threadLists: PluginThreadListRegistration[];
171
183
  threadHeaderActions: PluginThreadHeaderActionRegistration[];
172
184
  browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
@@ -293,6 +305,16 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
293
305
  sidebarShortcuts?: Record<string, PluginSidebarThreadShortcut>;
294
306
  /** The split layout `useSidebarSplitLayout()` reports. Omitted → null. */
295
307
  sidebarSplitLayout?: PluginSidebarSplitLayout;
308
+ /**
309
+ * Items and the active item `experimental_useSidebarNavigation()` reports.
310
+ * Omitted → no items. Actions are recorded in
311
+ * `inspection.sidebarNavigationCalls` and do not change the items.
312
+ */
313
+ sidebarNavigation?: {
314
+ items?: readonly ExperimentalSidebarNavigationItem[];
315
+ activeItemId?: string | null;
316
+ isShortcutModifierHeld?: boolean;
317
+ };
296
318
  /**
297
319
  * The environment provider catalog `useEnvironmentProviders()` reports.
298
320
  * Omitted → a ready, empty list. Pass `{ status: "loading" }` to test that
@@ -345,6 +367,11 @@ interface RenderedSlotInspectionState {
345
367
  readonly experimental_fixedTabOpenCalls: ExperimentalFixedTabOpenCall[];
346
368
  /** Every `experimental_useSidebarThreadActions()` call, in order. */
347
369
  readonly sidebarActionCalls: SidebarActionCall[];
370
+ /**
371
+ * Every `experimental_useSidebarNavigation()` action and navigation split
372
+ * drag, in order.
373
+ */
374
+ readonly sidebarNavigationCalls: SidebarNavigationCall[];
348
375
  /** Every `useSdk()` call, in order, as `"<area>.<method>"`. */
349
376
  readonly sdkCalls: SdkCall[];
350
377
  /** Everything written through `useComposer()`. */
@@ -369,4 +396,4 @@ declare function renderSlot<Props extends object, Contract extends PluginRpcCont
369
396
  }, props: Props, options?: RenderSlotOptions<Contract>): RenderedSlot;
370
397
 
371
398
  export { installTestPluginRuntime, loadPluginApp, mountPluginContentScripts, renderSlot };
372
- export type { CapturedPluginApp, ComposerLog, ContentScriptTestMountOptions, ContentScriptThreadRowStatusCall, ExperimentalFixedTabOpenCall, MountedPluginContentScripts, NavigateCall, PluginAppSource, PluginRpcTestHandlers, PluginSdkTestFakes, RenderSlotOptions, RenderedSlot, RenderedSlotBehaviorDrivers, RenderedSlotInspectionState, RenderedSlotLifecycleControls, RpcCall, SdkCall, SidebarActionCall };
399
+ export type { CapturedPluginApp, ComposerLog, ContentScriptTestMountOptions, ContentScriptThreadRowStatusCall, ExperimentalFixedTabOpenCall, MountedPluginContentScripts, NavigateCall, PluginAppSource, PluginRpcTestHandlers, PluginSdkTestFakes, RenderSlotOptions, RenderedSlot, RenderedSlotBehaviorDrivers, RenderedSlotInspectionState, RenderedSlotLifecycleControls, RpcCall, SdkCall, SidebarActionCall, SidebarNavigationCall };
@@ -1321,6 +1321,12 @@ interface FakePluginLifecycleControls {
1321
1321
  * PluginContextStaleError). Idempotent.
1322
1322
  */
1323
1323
  dispose(): Promise<void>;
1324
+ /**
1325
+ * Run every handler registered with `bb.onInstall`, in
1326
+ * registration order, as bb does right after a fresh install. A handler
1327
+ * that throws is logged at warn level and the rest still run.
1328
+ */
1329
+ install(): Promise<void>;
1324
1330
  }
1325
1331
  /**
1326
1332
  * Complete fake-host harness. Direct members are retained for compatibility;
@@ -98,7 +98,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
98
98
  }, z$1.core.$strict>]>;
99
99
  type AppSettingsUpdate = z$1.infer<typeof appSettingsUpdateSchema>;
100
100
 
101
- declare const UI_PREFERENCE_KEYS: readonly ["sidebar.organizationMode", "sidebar.threadGrouping.environment", "sidebar.chronologicalSort", "sidebar.sortDirection", "sidebar.sectionOrder", "sidebar.manualSectionOrder", "sidebar.machineSectionOrder", "sidebar.hiddenGroups", "sidebar.collapsedSections", "sidebar.collapsedProjects", "sidebar.collapsedThreads", "sidebar.collapsedEnvironments", "sidebar.collapsedThreadSections", "sidebar.collapsedMachines", "sidebar.footerOrder", "sidebar.hiddenFooterItems", "sidebar.pluginPanelOrder", "sidebar.visiblePluginPanels", "sidebar.navigationProvider", "sidebar.threadListProvider"];
101
+ declare const UI_PREFERENCE_KEYS: readonly ["sidebar.organizationMode", "sidebar.threadGrouping.environment", "sidebar.chronologicalSort", "sidebar.sortDirection", "sidebar.sectionOrder", "sidebar.manualSectionOrder", "sidebar.machineSectionOrder", "sidebar.hiddenGroups", "sidebar.collapsedSections", "sidebar.collapsedProjects", "sidebar.collapsedThreads", "sidebar.collapsedEnvironments", "sidebar.collapsedThreadSections", "sidebar.collapsedMachines", "sidebar.footerOrder", "sidebar.hiddenFooterItems", "sidebar.pluginPanelOrder", "sidebar.visiblePluginPanels", "sidebar.navigationProvider", "sidebar.headerProvider", "sidebar.threadListProvider"];
102
102
  type UiPreferenceKey = (typeof UI_PREFERENCE_KEYS)[number];
103
103
  interface UiPreferenceDefinition<Schema extends z$1.ZodTypeAny = z$1.ZodTypeAny> {
104
104
  schema: Schema;
@@ -140,7 +140,8 @@ declare const uiPreferenceDefinitions: {
140
140
  readonly "sidebar.hiddenFooterItems": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
141
141
  readonly "sidebar.pluginPanelOrder": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
142
142
  readonly "sidebar.visiblePluginPanels": UiPreferenceDefinition<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
143
- readonly "sidebar.navigationProvider": UiPreferenceDefinition<z$1.ZodString>;
143
+ readonly "sidebar.navigationProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
144
+ readonly "sidebar.headerProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
144
145
  readonly "sidebar.threadListProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
145
146
  };
146
147
  type UiPreferenceValue<Key extends UiPreferenceKey> = z$1.infer<(typeof uiPreferenceDefinitions)[Key]["schema"]>;
@@ -5918,18 +5919,20 @@ declare const hostDaemonCommandRegistry: {
5918
5919
  }, z$1.core.$strict>, z$1.ZodObject<{
5919
5920
  sources: z$1.ZodArray<z$1.ZodObject<{
5920
5921
  icon: z$1.ZodOptional<z$1.ZodString>;
5921
- id: z$1.ZodEnum<{
5922
+ id: z$1.ZodUnion<readonly [z$1.ZodEnum<{
5922
5923
  arc: "arc";
5923
5924
  brave: "brave";
5924
5925
  chrome: "chrome";
5925
5926
  chromium: "chromium";
5927
+ dia: "dia";
5926
5928
  edge: "edge";
5927
5929
  firefox: "firefox";
5928
5930
  helium: "helium";
5929
5931
  opera: "opera";
5930
5932
  safari: "safari";
5931
5933
  vivaldi: "vivaldi";
5932
- }>;
5934
+ zen: "zen";
5935
+ }>, z$1.ZodString]>;
5933
5936
  name: z$1.ZodString;
5934
5937
  profiles: z$1.ZodArray<z$1.ZodObject<{
5935
5938
  cookieCount: z$1.ZodOptional<z$1.ZodNumber>;
@@ -5955,18 +5958,20 @@ declare const hostDaemonCommandRegistry: {
5955
5958
  }, z$1.core.$strip>, z$1.ZodObject<{
5956
5959
  kind: z$1.ZodLiteral<"personal">;
5957
5960
  }, z$1.core.$strip>], "kind">;
5958
- sourceId: z$1.ZodEnum<{
5961
+ sourceId: z$1.ZodUnion<readonly [z$1.ZodEnum<{
5959
5962
  arc: "arc";
5960
5963
  brave: "brave";
5961
5964
  chrome: "chrome";
5962
5965
  chromium: "chromium";
5966
+ dia: "dia";
5963
5967
  edge: "edge";
5964
5968
  firefox: "firefox";
5965
5969
  helium: "helium";
5966
5970
  opera: "opera";
5967
5971
  safari: "safari";
5968
5972
  vivaldi: "vivaldi";
5969
- }>;
5973
+ zen: "zen";
5974
+ }>, z$1.ZodString]>;
5970
5975
  sourceProfileDirectory: z$1.ZodString;
5971
5976
  type: z$1.ZodLiteral<"desktop.browser.import_cookies">;
5972
5977
  }, z$1.core.$strict>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
@@ -8803,18 +8808,20 @@ declare const desktopBrowserCommandSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObj
8803
8808
  }, z$1.core.$strip>, z$1.ZodObject<{
8804
8809
  kind: z$1.ZodLiteral<"personal">;
8805
8810
  }, z$1.core.$strip>], "kind">;
8806
- sourceId: z$1.ZodEnum<{
8811
+ sourceId: z$1.ZodUnion<readonly [z$1.ZodEnum<{
8807
8812
  arc: "arc";
8808
8813
  brave: "brave";
8809
8814
  chrome: "chrome";
8810
8815
  chromium: "chromium";
8816
+ dia: "dia";
8811
8817
  edge: "edge";
8812
8818
  firefox: "firefox";
8813
8819
  helium: "helium";
8814
8820
  opera: "opera";
8815
8821
  safari: "safari";
8816
8822
  vivaldi: "vivaldi";
8817
- }>;
8823
+ zen: "zen";
8824
+ }>, z$1.ZodString]>;
8818
8825
  sourceProfileDirectory: z$1.ZodString;
8819
8826
  type: z$1.ZodLiteral<"desktop.browser.import_cookies">;
8820
8827
  }, z$1.core.$strict>], "type">;
@@ -8901,18 +8908,20 @@ declare const desktopBrowserResultSchemas: {
8901
8908
  "desktop.browser.list_import_sources": z$1.ZodObject<{
8902
8909
  sources: z$1.ZodArray<z$1.ZodObject<{
8903
8910
  icon: z$1.ZodOptional<z$1.ZodString>;
8904
- id: z$1.ZodEnum<{
8911
+ id: z$1.ZodUnion<readonly [z$1.ZodEnum<{
8905
8912
  arc: "arc";
8906
8913
  brave: "brave";
8907
8914
  chrome: "chrome";
8908
8915
  chromium: "chromium";
8916
+ dia: "dia";
8909
8917
  edge: "edge";
8910
8918
  firefox: "firefox";
8911
8919
  helium: "helium";
8912
8920
  opera: "opera";
8913
8921
  safari: "safari";
8914
8922
  vivaldi: "vivaldi";
8915
- }>;
8923
+ zen: "zen";
8924
+ }>, z$1.ZodString]>;
8916
8925
  name: z$1.ZodString;
8917
8926
  profiles: z$1.ZodArray<z$1.ZodObject<{
8918
8927
  cookieCount: z$1.ZodOptional<z$1.ZodNumber>;
@@ -14564,18 +14573,20 @@ declare const desktopBrowserImportCookiesRequestSchema: z$1.ZodObject<{
14564
14573
  }, z$1.core.$strip>, z$1.ZodObject<{
14565
14574
  kind: z$1.ZodLiteral<"personal">;
14566
14575
  }, z$1.core.$strip>], "kind">>;
14567
- sourceId: z$1.ZodEnum<{
14576
+ sourceId: z$1.ZodUnion<readonly [z$1.ZodEnum<{
14568
14577
  arc: "arc";
14569
14578
  brave: "brave";
14570
14579
  chrome: "chrome";
14571
14580
  chromium: "chromium";
14581
+ dia: "dia";
14572
14582
  edge: "edge";
14573
14583
  firefox: "firefox";
14574
14584
  helium: "helium";
14575
14585
  opera: "opera";
14576
14586
  safari: "safari";
14577
14587
  vivaldi: "vivaldi";
14578
- }>;
14588
+ zen: "zen";
14589
+ }>, z$1.ZodString]>;
14579
14590
  sourceProfileDirectory: z$1.ZodString;
14580
14591
  }, z$1.core.$strict>;
14581
14592
  type ExperimentalDesktopBrowserHostRequest = z$1.infer<typeof desktopBrowserHostRequestSchema>;
@@ -16766,15 +16777,21 @@ type ExperimentalSidebarNavigationAction = {
16766
16777
  kind: "search-threads";
16767
16778
  } | {
16768
16779
  kind: "open-extensions";
16780
+ } | {
16781
+ kind: "open-skills";
16769
16782
  } | {
16770
16783
  kind: "open-plugin-panel";
16771
16784
  pluginId: string;
16772
16785
  panelId: string;
16773
16786
  };
16774
- /** Semantic icon identity for one sidebar navigation item. */
16787
+ /**
16788
+ * Semantic icon identity for one sidebar navigation item. Render it with
16789
+ * {@link PluginSdkApp.experimental_SidebarNavigationIcon} to match bb's
16790
+ * artwork, including plugin branding.
16791
+ */
16775
16792
  type ExperimentalSidebarNavigationIcon = {
16776
16793
  kind: "host";
16777
- name: "extensions" | "new-thread" | "search";
16794
+ name: "extensions" | "new-thread" | "search" | "skills";
16778
16795
  } | {
16779
16796
  kind: "plugin";
16780
16797
  pluginId: string;
@@ -16782,28 +16799,164 @@ type ExperimentalSidebarNavigationIcon = {
16782
16799
  };
16783
16800
  /** One host-owned destination or action a plugin may arrange. */
16784
16801
  interface ExperimentalSidebarNavigationItem {
16802
+ /**
16803
+ * Arrangement key, stable across reloads: `__bb__/new-thread`,
16804
+ * `__bb__/search-threads`, `__bb__/extensions`, `__bb__/skills`,
16805
+ * `__bb__/automations`, or `<pluginId>/<panelId>`. The same keys appear in
16806
+ * the `sidebar.pluginPanelOrder` and `sidebar.visiblePluginPanels`
16807
+ * settings.
16808
+ */
16785
16809
  id: string;
16786
16810
  label: string;
16787
16811
  icon: ExperimentalSidebarNavigationIcon;
16788
16812
  action: ExperimentalSidebarNavigationAction;
16789
16813
  isDisabled: boolean;
16814
+ /**
16815
+ * False when the user hid the item from the sidebar. Draw hidden items in an
16816
+ * overflow menu rather than dropping them, so they stay reachable.
16817
+ */
16818
+ isVisible: boolean;
16819
+ /**
16820
+ * A plugin panel remembered from the last session whose bundle has not
16821
+ * registered yet. Activating it does nothing until it loads.
16822
+ */
16823
+ isLoading: boolean;
16824
+ /**
16825
+ * The plugin that contributed this panel; null for bb's own items. Gates
16826
+ * `openDetails` and `disablePlugin`.
16827
+ */
16828
+ pluginId: string | null;
16790
16829
  shortcut: ExperimentalSidebarNavigationShortcut | null;
16791
- experimental_splitProps: {
16792
- onPointerDown?: (event: react.PointerEvent<HTMLElement>) => void;
16793
- };
16830
+ /**
16831
+ * The panel's `experimental_sidebarAccessory`, already wrapped in the host's
16832
+ * crash boundary. Null for bb's items, panels without an accessory, and on
16833
+ * compact viewports. Keep it within one line, about 4rem by 1.25rem.
16834
+ */
16835
+ experimental_Accessory: ComponentType | null;
16794
16836
  }
16795
16837
  /** How the host should activate a sidebar navigation item. */
16796
16838
  interface ExperimentalSidebarNavigationActivationOptions {
16797
16839
  openInSplit: boolean;
16798
16840
  }
16799
- /** Props passed to an `experimental_sidebarNavigation` component. */
16800
- interface ExperimentalSidebarNavigationProps {
16841
+ /**
16842
+ * Host behavior for sidebar navigation items (see
16843
+ * {@link ExperimentalSidebarNavigationState}). Unknown item ids are ignored.
16844
+ * Calls made after the calling component unmounts do nothing.
16845
+ */
16846
+ interface ExperimentalSidebarNavigationActions {
16847
+ /**
16848
+ * Run the item's host behavior and close the mobile sidebar drawer.
16849
+ * `openInSplit` is ignored where splits are unavailable, and disabled or
16850
+ * loading items do nothing.
16851
+ */
16852
+ activate(itemId: string, options: ExperimentalSidebarNavigationActivationOptions): void;
16853
+ /** Hide or show one item. Persists to `sidebar.visiblePluginPanels`. */
16854
+ setVisible(itemId: string, isVisible: boolean): void;
16855
+ /**
16856
+ * Save a new order. Pass item ids in the order you want; unknown ids are
16857
+ * dropped and ids you leave out keep their relative order after the ones
16858
+ * you pass. Persists to `sidebar.pluginPanelOrder`.
16859
+ */
16860
+ setOrder(itemIds: readonly string[]): void;
16861
+ /** Open bb's customize editor, which reorders and hides items. */
16862
+ openCustomize(): void;
16863
+ /** Open the owning plugin's details. Does nothing when `pluginId` is null. */
16864
+ openDetails(itemId: string): void;
16865
+ /**
16866
+ * Disable the owning plugin, leave its panel if it is open, and show a
16867
+ * toast. Rejects after the host's error toast when disabling fails. Does
16868
+ * nothing when `pluginId` is null.
16869
+ */
16870
+ disablePlugin(itemId: string): Promise<void>;
16871
+ }
16872
+ /** What {@link PluginSdkApp.experimental_useSidebarNavigation} returns. */
16873
+ interface ExperimentalSidebarNavigationState {
16874
+ /** Every item in the user's saved order, visible and hidden. */
16801
16875
  items: readonly ExperimentalSidebarNavigationItem[];
16876
+ /** The item whose destination the route currently shows, or null. */
16802
16877
  activeItemId: string | null;
16878
+ /**
16879
+ * True while the user holds the app command modifier, when bb's own rows
16880
+ * reveal their `shortcut` labels. Show yours at the same time.
16881
+ */
16882
+ isShortcutModifierHeld: boolean;
16883
+ actions: ExperimentalSidebarNavigationActions;
16884
+ }
16885
+ /**
16886
+ * Per-item drag-to-split support (see
16887
+ * {@link PluginSdkApp.experimental_useSidebarNavigationSplit}). Same contract
16888
+ * as {@link PluginSidebarThreadSplit}.
16889
+ */
16890
+ interface ExperimentalSidebarNavigationSplit {
16891
+ /**
16892
+ * Spread onto the item's interactive element. Empty when the item cannot
16893
+ * open in a pane, so spreading it is always safe.
16894
+ */
16895
+ splitProps: {
16896
+ onPointerDown?: (event: react.PointerEvent<HTMLElement>) => void;
16897
+ };
16898
+ /**
16899
+ * False for items that cannot open in a pane (Search, Plugins, Skills), on
16900
+ * compact viewports, and when splits are unavailable.
16901
+ */
16902
+ isAvailable: boolean;
16903
+ /** Where this item's destination sits in the split layout, or null. */
16904
+ layout: {
16905
+ panes: readonly PluginSidebarSplitPane[];
16906
+ } | null;
16907
+ }
16908
+ /** Options for {@link PluginSdkApp.experimental_useSidebarNavigationSplit}. */
16909
+ interface ExperimentalSidebarNavigationSplitOptions {
16910
+ /**
16911
+ * `sidebar` (the default) engages the drag once the pointer leaves the
16912
+ * sidebar, so a row list with its own drag-to-reorder keeps working.
16913
+ * `distance` engages after a short movement in any direction; use it for
16914
+ * rows inside a menu or popover that covers the main area.
16915
+ */
16916
+ activation?: "distance" | "sidebar";
16917
+ /** Called when the drag engages, for example to close the menu the row is in. */
16918
+ onDragStart?: () => void;
16919
+ }
16920
+ /** Props for {@link PluginSdkApp.experimental_SidebarNavigationIcon}. */
16921
+ interface ExperimentalSidebarNavigationIconProps {
16922
+ icon: ExperimentalSidebarNavigationIcon;
16923
+ className?: string;
16924
+ }
16925
+ /**
16926
+ * Props passed to an `experimental_sidebarNavigation` component. Read the
16927
+ * items and their actions with
16928
+ * {@link PluginSdkApp.experimental_useSidebarNavigation}.
16929
+ */
16930
+ interface ExperimentalSidebarNavigationProps {
16803
16931
  isCompactViewport: boolean;
16804
- experimental_activate(itemId: string, options: ExperimentalSidebarNavigationActivationOptions): void;
16932
+ /**
16933
+ * Renders bb's bundled Navigation plugin, or nothing while it is disabled.
16934
+ * Kept for plugins written before `experimental_useSidebarNavigation`;
16935
+ * render items from that hook instead. Scheduled for removal.
16936
+ *
16937
+ * @deprecated
16938
+ */
16805
16939
  experimental_Original: ComponentType;
16806
16940
  }
16941
+ /**
16942
+ * Props passed to an `experimental_sidebarHeader` component, rendered in the
16943
+ * sidebar's header row between the sidebar toggle (and the macOS window
16944
+ * controls) and bb's back and forward buttons.
16945
+ */
16946
+ interface ExperimentalSidebarHeaderProps {
16947
+ /**
16948
+ * Width in px of the space the component may use, updated when the sidebar
16949
+ * resizes or the window chrome changes. It can be smaller than
16950
+ * `controlSize` in a narrow sidebar.
16951
+ */
16952
+ width: number;
16953
+ /**
16954
+ * Width and height in px of the header's own buttons, equal to the
16955
+ * `--bb-sidebar-control-size` CSS variable. Size your controls to match.
16956
+ */
16957
+ controlSize: number;
16958
+ isCompactViewport: boolean;
16959
+ }
16807
16960
  /**
16808
16961
  * Props passed to an `experimental_threadList` component — the sidebar's
16809
16962
  * scrolling thread area, replaced wholesale by one plugin.
@@ -17904,7 +18057,14 @@ interface PluginThreadListRegistration {
17904
18057
  description?: string;
17905
18058
  component: ComponentType<PluginThreadListProps>;
17906
18059
  }
17907
- /** Replace the bounded navigation controls above the sidebar thread list. */
18060
+ /**
18061
+ * Replace the navigation controls above the sidebar thread list. Exclusive:
18062
+ * the user picks one provider under Settings → Appearance → Navigation, and
18063
+ * bb ships its own rows as the bundled Navigation plugin
18064
+ * (`navigation/navigation`, the default). A picked provider that is disabled
18065
+ * or removed falls back to Navigation; a crashing provider is replaced by a
18066
+ * placeholder with a Reload button.
18067
+ */
17908
18068
  interface ExperimentalSidebarNavigationRegistration {
17909
18069
  /** Unique within the plugin; letters, digits, `-`, `_`. */
17910
18070
  id: string;
@@ -17914,6 +18074,23 @@ interface ExperimentalSidebarNavigationRegistration {
17914
18074
  description?: string;
17915
18075
  component: ComponentType<ExperimentalSidebarNavigationProps>;
17916
18076
  }
18077
+ /**
18078
+ * Render a component in the sidebar's header row, between the sidebar toggle
18079
+ * and bb's back and forward buttons. Exclusive: the user picks at most one
18080
+ * header under Settings → Appearance, and by default the header shows only
18081
+ * bb's own controls. Content is clipped to the row, so it cannot move the
18082
+ * thread list or bb's controls. On macOS the empty space keeps dragging the
18083
+ * window; buttons, links, and inputs do not.
18084
+ */
18085
+ interface ExperimentalSidebarHeaderRegistration {
18086
+ /** Unique within the plugin; letters, digits, `-`, `_`. */
18087
+ id: string;
18088
+ /** Label shown in Settings → Appearance and capability details. */
18089
+ title: string;
18090
+ /** Optional one-line description shown with the provider choice. */
18091
+ description?: string;
18092
+ component: ComponentType<ExperimentalSidebarHeaderProps>;
18093
+ }
17917
18094
  /**
17918
18095
  * Register this plugin as a viewer/editor for file extensions. By default,
17919
18096
  * matching files render the first applicable opener in deterministic slot
@@ -18318,6 +18495,12 @@ interface PluginAppSlots {
18318
18495
  sidebarFooterAction(registration: PluginSidebarFooterActionRegistration): void;
18319
18496
  /** Replace the bounded sidebar navigation controls. */
18320
18497
  experimental_sidebarNavigation(registration: ExperimentalSidebarNavigationRegistration): void;
18498
+ /**
18499
+ * Render a component in the sidebar header row (see
18500
+ * {@link ExperimentalSidebarHeaderRegistration}). Experimental: see
18501
+ * docs/api_to_audit.md.
18502
+ */
18503
+ experimental_sidebarHeader(registration: ExperimentalSidebarHeaderRegistration): void;
18321
18504
  /**
18322
18505
  * Replace the sidebar's thread list (see
18323
18506
  * {@link PluginThreadListRegistration}). Experimental: see
@@ -19373,6 +19556,27 @@ interface PluginSdkApp {
19373
19556
  * Experimental: see docs/api_to_audit.md.
19374
19557
  */
19375
19558
  experimental_useSidebarThreadSplit(threadId: string): PluginSidebarThreadSplit;
19559
+ /**
19560
+ * The sidebar navigation items in the user's saved order, the active item,
19561
+ * and the host actions that activate, hide, reorder, and customize them
19562
+ * (see {@link ExperimentalSidebarNavigationState}). One model shared by
19563
+ * every caller in the sidebar. Items keep their identity while unchanged.
19564
+ * Outside the sidebar it returns no items and actions that do nothing.
19565
+ * Experimental: see docs/api_to_audit.md.
19566
+ */
19567
+ experimental_useSidebarNavigation(): ExperimentalSidebarNavigationState;
19568
+ /**
19569
+ * Per-item drag-to-split support for navigation items (see
19570
+ * {@link ExperimentalSidebarNavigationSplit}). Call it once per rendered
19571
+ * item. Experimental: see docs/api_to_audit.md.
19572
+ */
19573
+ experimental_useSidebarNavigationSplit(itemId: string, options?: ExperimentalSidebarNavigationSplitOptions): ExperimentalSidebarNavigationSplit;
19574
+ /**
19575
+ * bb's artwork for a navigation item's icon: bb's glyphs for its own items,
19576
+ * and the contributing plugin's branding for plugin panels. Experimental:
19577
+ * see docs/api_to_audit.md.
19578
+ */
19579
+ experimental_SidebarNavigationIcon: ComponentType<ExperimentalSidebarNavigationIconProps>;
19376
19580
  /**
19377
19581
  * Whether the composer holds an unsent draft for one thread (see
19378
19582
  * {@link PluginSidebarThreadDraftState}). Per row, because a draft is
@@ -21634,6 +21838,16 @@ interface BbPluginApi {
21634
21838
  * The sanctioned place to clear timers and close connections.
21635
21839
  */
21636
21840
  onDispose(hook: () => void | Promise<void>): void;
21841
+ /**
21842
+ * Run a handler once, right after this plugin is installed and its server
21843
+ * entry has loaded: for example to pick its own sidebar slots with
21844
+ * `bb.sdk.system.uiPreferences`. It does not run on update, reload,
21845
+ * enable, or server restart, nor for bb's bundled plugins; reinstalling
21846
+ * after removal runs it again. Register it while the entry loads. A
21847
+ * handler that throws is logged and the install still succeeds; the
21848
+ * install waits at most 30 seconds for handlers to finish.
21849
+ */
21850
+ onInstall(handler: () => void | Promise<void>): void;
21637
21851
  }
21638
21852
 
21639
21853
  /** Duration suffixes, shared with the core `bb` CLI grammar. */
@@ -21869,4 +22083,4 @@ declare function cliCommand<const TOptions extends CliOptions = Record<string, n
21869
22083
  declare function defineCli(spec: PluginCliSpec): PluginCliRegistration;
21870
22084
 
21871
22085
  export { PLUGIN_CLI_OUTPUT_MAX_BYTES, PluginCliError, cliCommand, defineCli, defineRpcContract, experimental_defineHostEntry };
21872
- export type { BbContext, BbNavigate, BbPluginApi, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSelection, ExperimentalComposerSubmitOptions, ExperimentalDesktopBrowserAcquireInput, ExperimentalDesktopBrowserCreateInput, ExperimentalDesktopBrowserLease, ExperimentalDesktopBrowserScope, ExperimentalDesktopBrowsersArea, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalPluginMentionImage, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealth, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginWebSocket, ExperimentalPluginWebSocketContext, ExperimentalPluginWebSocketHandler, ExperimentalPluginWebSocketHandlers, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, JsonValue, MachineBootstrapApi, MachineBootstrapRequest, MachineExecutor, MachineExecutorRequest, MarkdownProps, MessageDispatchHookContext, MessageDispatchHookDecision, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiServiceDeclaration, PluginAiServiceKind, PluginAiServices, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginBbSdk, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCli, PluginCliBooleanOption, PluginCliCommand, PluginCliCommandInfo, PluginCliConstraint, PluginCliContext, PluginCliDurationOption, PluginCliDurationUnit, PluginCliEnumOption, PluginCliErrorCode, PluginCliExecutionResult, PluginCliIntegerOption, PluginCliOption, PluginCliOptionValues, PluginCliOutputLimitError, PluginCliPositional, PluginCliPositionalValues, PluginCliRegistration, PluginCliResult, PluginCliRunInput, PluginCliSpec, PluginCliStringOption, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginDispatchAttemptKind, PluginDispatchEnvironmentIntent, PluginDispatchExecution, PluginDispatchExecutionSources, PluginDispatchInput, PluginEnvironmentProvider, PluginEnvironmentProviderDeclaration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProviderRequirements, PluginEnvironmentProvidersState, PluginEnvironmentValidateDecision, PluginEnvironments, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHookHandler, PluginHookName, PluginHookSignatures, PluginHooks, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionDescription, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMachineProviderDeclaration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMachineValidateDecision, PluginMachines, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderCompletedTurnDisplay, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRowLabels, PluginRowPresentation, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerAccess, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, ReadonlyJsonValue, ServerAccessGrant, ServerAccessProviderDeclaration, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
22086
+ export type { BbContext, BbNavigate, BbPluginApi, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSelection, ExperimentalComposerSubmitOptions, ExperimentalDesktopBrowserAcquireInput, ExperimentalDesktopBrowserCreateInput, ExperimentalDesktopBrowserLease, ExperimentalDesktopBrowserScope, ExperimentalDesktopBrowsersArea, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalPluginMentionImage, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealth, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginWebSocket, ExperimentalPluginWebSocketContext, ExperimentalPluginWebSocketHandler, ExperimentalPluginWebSocketHandlers, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarHeaderRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, JsonValue, MachineBootstrapApi, MachineBootstrapRequest, MachineExecutor, MachineExecutorRequest, MarkdownProps, MessageDispatchHookContext, MessageDispatchHookDecision, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiServiceDeclaration, PluginAiServiceKind, PluginAiServices, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginBbSdk, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCli, PluginCliBooleanOption, PluginCliCommand, PluginCliCommandInfo, PluginCliConstraint, PluginCliContext, PluginCliDurationOption, PluginCliDurationUnit, PluginCliEnumOption, PluginCliErrorCode, PluginCliExecutionResult, PluginCliIntegerOption, PluginCliOption, PluginCliOptionValues, PluginCliOutputLimitError, PluginCliPositional, PluginCliPositionalValues, PluginCliRegistration, PluginCliResult, PluginCliRunInput, PluginCliSpec, PluginCliStringOption, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginDispatchAttemptKind, PluginDispatchEnvironmentIntent, PluginDispatchExecution, PluginDispatchExecutionSources, PluginDispatchInput, PluginEnvironmentProvider, PluginEnvironmentProviderDeclaration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProviderRequirements, PluginEnvironmentProvidersState, PluginEnvironmentValidateDecision, PluginEnvironments, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHookHandler, PluginHookName, PluginHookSignatures, PluginHooks, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionDescription, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMachineProviderDeclaration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMachineValidateDecision, PluginMachines, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderCompletedTurnDisplay, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRowLabels, PluginRowPresentation, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerAccess, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, ReadonlyJsonValue, ServerAccessGrant, ServerAccessProviderDeclaration, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
package/dist/app.js CHANGED
@@ -29,6 +29,9 @@ var experimental_useSidebarThreads = runtime.experimental_useSidebarThreads;
29
29
  var experimental_useSidebarThreadActions = runtime.experimental_useSidebarThreadActions;
30
30
  var experimental_useSidebarThreadPullRequest = runtime.experimental_useSidebarThreadPullRequest;
31
31
  var experimental_useSidebarThreadSplit = runtime.experimental_useSidebarThreadSplit;
32
+ var experimental_useSidebarNavigation = runtime.experimental_useSidebarNavigation;
33
+ var experimental_useSidebarNavigationSplit = runtime.experimental_useSidebarNavigationSplit;
34
+ var experimental_SidebarNavigationIcon = runtime.experimental_SidebarNavigationIcon;
32
35
  var useSidebarThreadDraft = runtime.useSidebarThreadDraft;
33
36
  var useSidebarThreadDraftIds = runtime.useSidebarThreadDraftIds;
34
37
  var useSidebarThreadRowStatus = runtime.useSidebarThreadRowStatus;
@@ -54,6 +57,7 @@ export {
54
57
  experimental_PermissionModePicker,
55
58
  experimental_ProviderIcon,
56
59
  experimental_ProviderModelPicker,
60
+ experimental_SidebarNavigationIcon,
57
61
  experimental_SourceCode,
58
62
  experimental_useAppPanel,
59
63
  experimental_useBranches,
@@ -61,6 +65,8 @@ export {
61
65
  experimental_useCodeTheme,
62
66
  experimental_useFixedTabTarget,
63
67
  experimental_useProviders,
68
+ experimental_useSidebarNavigation,
69
+ experimental_useSidebarNavigationSplit,
64
70
  experimental_useSidebarThreadActions,
65
71
  experimental_useSidebarThreadPullRequest,
66
72
  experimental_useSidebarThreadSplit,
@@ -446,6 +446,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
446
446
  sidebarFooterActions: [],
447
447
  experimentalSidebarFooterItems: [],
448
448
  experimentalSidebarNavigations: [],
449
+ experimentalSidebarHeaders: [],
449
450
  threadLists: [],
450
451
  threadHeaderActions: [],
451
452
  browserToolbarActions: [],
@@ -474,6 +475,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
474
475
  pendingInteraction: /* @__PURE__ */ new Set(),
475
476
  sidebarFooterItem: /* @__PURE__ */ new Set(),
476
477
  sidebarNavigation: /* @__PURE__ */ new Set(),
478
+ sidebarHeader: /* @__PURE__ */ new Set(),
477
479
  threadList: /* @__PURE__ */ new Set(),
478
480
  threadHeaderAction: /* @__PURE__ */ new Set(),
479
481
  browserToolbarAction: /* @__PURE__ */ new Set(),
@@ -683,6 +685,15 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
683
685
  )
684
686
  );
685
687
  },
688
+ experimental_sidebarHeader(registration) {
689
+ collected.experimentalSidebarHeaders.push(
690
+ collectTitledComponent(
691
+ "slots.experimental_sidebarHeader",
692
+ seenIds.sidebarHeader,
693
+ registration
694
+ )
695
+ );
696
+ },
686
697
  experimental_threadList(registration) {
687
698
  collected.threadLists.push(
688
699
  collectTitledComponent(
@@ -620,6 +620,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
620
620
  sidebarFooterActions: [],
621
621
  experimentalSidebarFooterItems: [],
622
622
  experimentalSidebarNavigations: [],
623
+ experimentalSidebarHeaders: [],
623
624
  threadLists: [],
624
625
  threadHeaderActions: [],
625
626
  browserToolbarActions: [],
@@ -648,6 +649,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
648
649
  pendingInteraction: /* @__PURE__ */ new Set(),
649
650
  sidebarFooterItem: /* @__PURE__ */ new Set(),
650
651
  sidebarNavigation: /* @__PURE__ */ new Set(),
652
+ sidebarHeader: /* @__PURE__ */ new Set(),
651
653
  threadList: /* @__PURE__ */ new Set(),
652
654
  threadHeaderAction: /* @__PURE__ */ new Set(),
653
655
  browserToolbarAction: /* @__PURE__ */ new Set(),
@@ -857,6 +859,15 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
857
859
  )
858
860
  );
859
861
  },
862
+ experimental_sidebarHeader(registration) {
863
+ collected.experimentalSidebarHeaders.push(
864
+ collectTitledComponent(
865
+ "slots.experimental_sidebarHeader",
866
+ seenIds.sidebarHeader,
867
+ registration
868
+ )
869
+ );
870
+ },
860
871
  experimental_threadList(registration) {
861
872
  collected.threadLists.push(
862
873
  collectTitledComponent(
@@ -1100,6 +1111,19 @@ function TestThreadTitle({ threadId }) {
1100
1111
  if (thread === void 0) return null;
1101
1112
  return /* @__PURE__ */ jsx("span", { "data-thread-title": threadId, children: thread.displayTitle });
1102
1113
  }
1114
+ function TestSidebarNavigationIcon({
1115
+ icon,
1116
+ className
1117
+ }) {
1118
+ return /* @__PURE__ */ jsx(
1119
+ "span",
1120
+ {
1121
+ "aria-hidden": "true",
1122
+ className,
1123
+ "data-sidebar-navigation-icon": icon.kind === "host" ? icon.name : `${icon.pluginId}/${icon.icon ?? ""}`
1124
+ }
1125
+ );
1126
+ }
1103
1127
  function SlotLifecycleGuard({
1104
1128
  children,
1105
1129
  onUnmount
@@ -1679,6 +1703,28 @@ var testPluginSdkApp = {
1679
1703
  return env.sidebarShortcuts.get(threadId) ?? null;
1680
1704
  },
1681
1705
  ThreadTitle: TestThreadTitle,
1706
+ experimental_useSidebarNavigation() {
1707
+ return useSlotEnv("experimental_useSidebarNavigation").sidebarNavigation;
1708
+ },
1709
+ experimental_useSidebarNavigationSplit(itemId, _options) {
1710
+ const env = useSlotEnv("experimental_useSidebarNavigationSplit");
1711
+ return useMemo(
1712
+ () => ({
1713
+ splitProps: {
1714
+ onPointerDown: () => {
1715
+ env.sidebarNavigationCalls.push({
1716
+ method: "beginSplitDrag",
1717
+ itemId
1718
+ });
1719
+ }
1720
+ },
1721
+ isAvailable: true,
1722
+ layout: null
1723
+ }),
1724
+ [env, itemId]
1725
+ );
1726
+ },
1727
+ experimental_SidebarNavigationIcon: TestSidebarNavigationIcon,
1682
1728
  useEnvironmentProviders() {
1683
1729
  return useSlotEnv("useEnvironmentProviders").environmentProviders;
1684
1730
  },
@@ -1965,6 +2011,43 @@ function renderSlot(registration, props, options = {}) {
1965
2011
  }
1966
2012
  };
1967
2013
  const sidebarActionCalls = [];
2014
+ const sidebarNavigationCalls = [];
2015
+ const sidebarNavigation = {
2016
+ items: options.sidebarNavigation?.items ?? [],
2017
+ activeItemId: options.sidebarNavigation?.activeItemId ?? null,
2018
+ isShortcutModifierHeld: options.sidebarNavigation?.isShortcutModifierHeld ?? false,
2019
+ actions: {
2020
+ activate(itemId, activationOptions) {
2021
+ sidebarNavigationCalls.push({
2022
+ method: "activate",
2023
+ itemId,
2024
+ openInSplit: activationOptions.openInSplit
2025
+ });
2026
+ },
2027
+ setVisible(itemId, isVisible) {
2028
+ sidebarNavigationCalls.push({
2029
+ method: "setVisible",
2030
+ itemId,
2031
+ isVisible
2032
+ });
2033
+ },
2034
+ setOrder(itemIds) {
2035
+ sidebarNavigationCalls.push({
2036
+ method: "setOrder",
2037
+ itemIds: [...itemIds]
2038
+ });
2039
+ },
2040
+ openCustomize() {
2041
+ sidebarNavigationCalls.push({ method: "openCustomize" });
2042
+ },
2043
+ openDetails(itemId) {
2044
+ sidebarNavigationCalls.push({ method: "openDetails", itemId });
2045
+ },
2046
+ async disablePlugin(itemId) {
2047
+ sidebarNavigationCalls.push({ method: "disablePlugin", itemId });
2048
+ }
2049
+ }
2050
+ };
1968
2051
  const sidebarPullRequests = new Map(
1969
2052
  Object.entries(options.sidebarPullRequests ?? {})
1970
2053
  );
@@ -2235,6 +2318,8 @@ ${block}
2235
2318
  sidebarRowStatuses,
2236
2319
  sidebarShortcuts,
2237
2320
  sidebarSplitLayout: options.sidebarSplitLayout ?? null,
2321
+ sidebarNavigation,
2322
+ sidebarNavigationCalls,
2238
2323
  environmentProviders,
2239
2324
  sdk,
2240
2325
  sdkCalls,
@@ -2306,6 +2391,7 @@ ${block}
2306
2391
  navigateCalls,
2307
2392
  experimental_fixedTabOpenCalls,
2308
2393
  sidebarActionCalls,
2394
+ sidebarNavigationCalls,
2309
2395
  sdkCalls,
2310
2396
  composer: composerLog,
2311
2397
  behavior: {
@@ -2319,6 +2405,7 @@ ${block}
2319
2405
  navigateCalls,
2320
2406
  experimental_fixedTabOpenCalls,
2321
2407
  sidebarActionCalls,
2408
+ sidebarNavigationCalls,
2322
2409
  sdkCalls,
2323
2410
  composer: composerLog
2324
2411
  },
@@ -3360,6 +3360,7 @@ function createFakePluginHostInternal(options, sharedState) {
3360
3360
  const machineProviders = /* @__PURE__ */ new Map();
3361
3361
  const serverAccessProviders = /* @__PURE__ */ new Map();
3362
3362
  const disposeHooks = [];
3363
+ const installHandlers = [];
3363
3364
  const serviceControllers = [];
3364
3365
  let nextInteractionId = 1;
3365
3366
  const pendingInteractions = /* @__PURE__ */ new Map();
@@ -3685,6 +3686,13 @@ function createFakePluginHostInternal(options, sharedState) {
3685
3686
  onDispose(hook) {
3686
3687
  assertLive();
3687
3688
  disposeHooks.push(hook);
3689
+ },
3690
+ onInstall(handler) {
3691
+ assertLive();
3692
+ if (typeof handler !== "function") {
3693
+ throw new Error("onInstall expects a function");
3694
+ }
3695
+ installHandlers.push(handler);
3688
3696
  }
3689
3697
  };
3690
3698
  async function disposeHost(cleanupStorage) {
@@ -4223,6 +4231,16 @@ function createFakePluginHostInternal(options, sharedState) {
4223
4231
  },
4224
4232
  async dispose() {
4225
4233
  await disposeHost(true);
4234
+ },
4235
+ async install() {
4236
+ assertLive();
4237
+ for (const handler of [...installHandlers]) {
4238
+ try {
4239
+ await handler();
4240
+ } catch (error) {
4241
+ emitLog("warn", `install handler failed: ${errorMessage(error)}`);
4242
+ }
4243
+ }
4226
4244
  }
4227
4245
  };
4228
4246
  fakeHostDisposers.set(harness, disposeHost);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@get-bb/plugin-sdk",
3
- "version": "0.5.9",
3
+ "version": "0.5.15",
4
4
  "homepage": "https://github.com/get-bb/bb#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/get-bb/bb/issues"