@get-bb/plugin-sdk 0.4.20 → 0.4.22

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.
@@ -999,6 +999,53 @@ interface PluginProvidersState {
999
999
  status: "error" | "loading" | "ready";
1000
1000
  providers: readonly ProviderInfo[];
1001
1001
  }
1002
+ /**
1003
+ * One TextMate token rule from the active code theme, in the shape VS Code
1004
+ * theme files author it.
1005
+ */
1006
+ interface PluginCodeThemeTokenRule {
1007
+ /** Scope(s) the rule paints; absent means the theme's base rule. */
1008
+ scope?: string | readonly string[];
1009
+ settings: {
1010
+ /** `#rrggbb` or `#rrggbbaa`. */
1011
+ foreground?: string;
1012
+ background?: string;
1013
+ /** Space-separated TextMate font styles, e.g. `"bold italic"`. */
1014
+ fontStyle?: string;
1015
+ };
1016
+ }
1017
+ /**
1018
+ * The active code theme as a VS Code theme file: the same document BB's own
1019
+ * highlighter renders from, so a plugin that embeds a third-party editor can
1020
+ * translate it into that editor's theme format rather than guessing colors
1021
+ * from CSS variables.
1022
+ */
1023
+ interface PluginCodeThemeData {
1024
+ /** Registered theme name — a bundled Shiki name or a BB-registered id. */
1025
+ name: string;
1026
+ type: "dark" | "light";
1027
+ /** Default editor foreground, as `#rrggbb[aa]`. */
1028
+ fg: string;
1029
+ /** Default editor background, as `#rrggbb[aa]`. */
1030
+ bg: string;
1031
+ /** VS Code workbench colors (`editor.background`, `editorCursor.foreground`, …). */
1032
+ colors: Readonly<Record<string, string>>;
1033
+ tokenColors: readonly PluginCodeThemeTokenRule[];
1034
+ }
1035
+ /**
1036
+ * The code theme BB is currently rendering with (see
1037
+ * {@link PluginSdkApp.experimental_useCodeTheme}). `mode` and `name` change
1038
+ * the moment the user switches palette or light/dark; `theme` follows once
1039
+ * the theme file resolves, and keeps the previous document until then so a
1040
+ * consumer never has to paint an unthemed frame. Compare `theme.name` with
1041
+ * `name` to tell a settled state from one still resolving.
1042
+ */
1043
+ interface PluginCodeThemeState {
1044
+ mode: "dark" | "light";
1045
+ name: string;
1046
+ /** null only before the first theme file resolves. */
1047
+ theme: PluginCodeThemeData | null;
1048
+ }
1002
1049
  /**
1003
1050
  * Act on threads from a plugin surface. Every method routes to the host's own
1004
1051
  * flow, so optimistic updates, toasts, dialogs, pane closing, and route repair
@@ -2183,6 +2230,13 @@ interface PluginSdkApp {
2183
2230
  * see docs/api_to_audit.md.
2184
2231
  */
2185
2232
  experimental_useProviders(): PluginProvidersState;
2233
+ /**
2234
+ * The active code theme as a VS Code theme file (see
2235
+ * {@link PluginCodeThemeState}), for a plugin that renders code with an
2236
+ * engine of its own and needs BB's palette to reach it. Experimental: see
2237
+ * docs/api_to_audit.md.
2238
+ */
2239
+ experimental_useCodeTheme(): PluginCodeThemeState;
2186
2240
  /**
2187
2241
  * The host-owned chat component (see {@link ThreadChatProps}). Together
2188
2242
  * with `Markdown`, the only components the SDK ships — everything else
@@ -2264,6 +2318,7 @@ declare const experimental_useSidebarThreadActions: () => PluginSidebarThreadAct
2264
2318
  declare const experimental_useSidebarThreadPullRequest: (threadId: string) => PluginSidebarThreadPullRequestState;
2265
2319
  declare const experimental_useSidebarThreadSplit: (threadId: string) => PluginSidebarThreadSplit;
2266
2320
  declare const experimental_useProviders: () => PluginProvidersState;
2321
+ declare const experimental_useCodeTheme: () => PluginCodeThemeState;
2267
2322
 
2268
- export { Markdown, ThreadChat, UrlLink, definePluginApp, experimental_Diff, experimental_FileLink, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderModelPicker, experimental_SourceCode, experimental_useAppPanel, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useRealtime, useRealtimeConnectionState, useRpc, useSettings };
2269
- export type { BbContext, BbNavigate, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabReference, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, 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, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSidebarWorkspaceKind, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps };
2323
+ export { Markdown, ThreadChat, UrlLink, definePluginApp, experimental_Diff, experimental_FileLink, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderModelPicker, experimental_SourceCode, experimental_useAppPanel, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useRealtime, useRealtimeConnectionState, useRpc, useSettings };
2324
+ export type { BbContext, BbNavigate, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabReference, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, 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, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSidebarWorkspaceKind, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps };
@@ -4715,7 +4715,10 @@ interface ReplayRecordingOptions {
4715
4715
  * alone lands before them, at a point the recording never had.
4716
4716
  */
4717
4717
  orderTimeoutMs?: number;
4718
- /** Quiet period after the last request before the bridge is closed. */
4718
+ /**
4719
+ * Quiet period after the last request before a non-exact replay is closed.
4720
+ * An exact current-lane replay waits for every planned event instead.
4721
+ */
4719
4722
  settleMs?: number;
4720
4723
  /**
4721
4724
  * Quiet period a request waits for once the gates are met. The replay child
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { ReactNode, ComponentType } from 'react';
9
9
  import { RenderResult } from '@testing-library/react';
10
- import { PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginProviderIconRegistration, PluginTimelineRendererRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginProvidersState, PluginSidebarPullRequest, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
10
+ import { PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginProviderIconRegistration, PluginTimelineRendererRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, PluginSidebarPullRequest, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
11
11
 
12
12
  /**
13
13
  * `@get-bb/plugin-sdk/testing/app` — the frontend plugin test harness. Tests a
@@ -207,6 +207,11 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
207
207
  * a ready, empty list. Pass `{ status: "loading" }` to test that branch.
208
208
  */
209
209
  providers?: Partial<PluginProvidersState>;
210
+ /**
211
+ * The code theme `experimental_useCodeTheme()` reports. Omitted → a light
212
+ * mode with no resolved document, the state a plugin sees on first paint.
213
+ */
214
+ codeTheme?: Partial<PluginCodeThemeState>;
210
215
  /**
211
216
  * Pull requests `experimental_useSidebarThreadPullRequest()` reports, keyed
212
217
  * by thread id. Omitted → every thread reports none.
@@ -12940,6 +12940,53 @@ interface PluginProvidersState {
12940
12940
  status: "error" | "loading" | "ready";
12941
12941
  providers: readonly ProviderInfo[];
12942
12942
  }
12943
+ /**
12944
+ * One TextMate token rule from the active code theme, in the shape VS Code
12945
+ * theme files author it.
12946
+ */
12947
+ interface PluginCodeThemeTokenRule {
12948
+ /** Scope(s) the rule paints; absent means the theme's base rule. */
12949
+ scope?: string | readonly string[];
12950
+ settings: {
12951
+ /** `#rrggbb` or `#rrggbbaa`. */
12952
+ foreground?: string;
12953
+ background?: string;
12954
+ /** Space-separated TextMate font styles, e.g. `"bold italic"`. */
12955
+ fontStyle?: string;
12956
+ };
12957
+ }
12958
+ /**
12959
+ * The active code theme as a VS Code theme file: the same document BB's own
12960
+ * highlighter renders from, so a plugin that embeds a third-party editor can
12961
+ * translate it into that editor's theme format rather than guessing colors
12962
+ * from CSS variables.
12963
+ */
12964
+ interface PluginCodeThemeData {
12965
+ /** Registered theme name — a bundled Shiki name or a BB-registered id. */
12966
+ name: string;
12967
+ type: "dark" | "light";
12968
+ /** Default editor foreground, as `#rrggbb[aa]`. */
12969
+ fg: string;
12970
+ /** Default editor background, as `#rrggbb[aa]`. */
12971
+ bg: string;
12972
+ /** VS Code workbench colors (`editor.background`, `editorCursor.foreground`, …). */
12973
+ colors: Readonly<Record<string, string>>;
12974
+ tokenColors: readonly PluginCodeThemeTokenRule[];
12975
+ }
12976
+ /**
12977
+ * The code theme BB is currently rendering with (see
12978
+ * {@link PluginSdkApp.experimental_useCodeTheme}). `mode` and `name` change
12979
+ * the moment the user switches palette or light/dark; `theme` follows once
12980
+ * the theme file resolves, and keeps the previous document until then so a
12981
+ * consumer never has to paint an unthemed frame. Compare `theme.name` with
12982
+ * `name` to tell a settled state from one still resolving.
12983
+ */
12984
+ interface PluginCodeThemeState {
12985
+ mode: "dark" | "light";
12986
+ name: string;
12987
+ /** null only before the first theme file resolves. */
12988
+ theme: PluginCodeThemeData | null;
12989
+ }
12943
12990
  /**
12944
12991
  * Act on threads from a plugin surface. Every method routes to the host's own
12945
12992
  * flow, so optimistic updates, toasts, dialogs, pane closing, and route repair
@@ -14124,6 +14171,13 @@ interface PluginSdkApp {
14124
14171
  * see docs/api_to_audit.md.
14125
14172
  */
14126
14173
  experimental_useProviders(): PluginProvidersState;
14174
+ /**
14175
+ * The active code theme as a VS Code theme file (see
14176
+ * {@link PluginCodeThemeState}), for a plugin that renders code with an
14177
+ * engine of its own and needs BB's palette to reach it. Experimental: see
14178
+ * docs/api_to_audit.md.
14179
+ */
14180
+ experimental_useCodeTheme(): PluginCodeThemeState;
14127
14181
  /**
14128
14182
  * The host-owned chat component (see {@link ThreadChatProps}). Together
14129
14183
  * with `Markdown`, the only components the SDK ships — everything else
@@ -16676,4 +16730,4 @@ interface BbPluginApi {
16676
16730
  }
16677
16731
 
16678
16732
  export { PLUGIN_CLI_OUTPUT_MAX_BYTES, defineRpcContract, experimental_defineHostEntry };
16679
- export type { BbContext, BbNavigate, BbPluginApi, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabReference, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolLabels, PluginAgentToolPresentation, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiServiceDeclaration, PluginAiServiceKind, PluginAiServices, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginCli, PluginCliCommandInfo, PluginCliContext, PluginCliExecutionResult, PluginCliOutputLimitError, PluginCliRegistration, PluginCliResult, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSidebarWorkspaceKind, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginUi, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps };
16733
+ export type { BbContext, BbNavigate, BbPluginApi, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabReference, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolLabels, PluginAgentToolPresentation, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiServiceDeclaration, PluginAiServiceKind, PluginAiServices, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginCli, PluginCliCommandInfo, PluginCliContext, PluginCliExecutionResult, PluginCliOutputLimitError, PluginCliRegistration, PluginCliResult, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSidebarWorkspaceKind, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginUi, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps };
package/dist/app.js CHANGED
@@ -25,6 +25,7 @@ var experimental_useSidebarThreadActions = runtime.experimental_useSidebarThread
25
25
  var experimental_useSidebarThreadPullRequest = runtime.experimental_useSidebarThreadPullRequest;
26
26
  var experimental_useSidebarThreadSplit = runtime.experimental_useSidebarThreadSplit;
27
27
  var experimental_useProviders = runtime.experimental_useProviders;
28
+ var experimental_useCodeTheme = runtime.experimental_useCodeTheme;
28
29
  export {
29
30
  Markdown,
30
31
  ThreadChat,
@@ -37,6 +38,7 @@ export {
37
38
  experimental_ProviderModelPicker,
38
39
  experimental_SourceCode,
39
40
  experimental_useAppPanel,
41
+ experimental_useCodeTheme,
40
42
  experimental_useFixedTabTarget,
41
43
  experimental_useProviders,
42
44
  experimental_useSidebarThreadActions,
@@ -6939,10 +6939,13 @@ async function replayRecording(options) {
6939
6939
  const liveAssembler = options.createAssembler(providerId);
6940
6940
  const planAssembler = (options.createPlanAssembler ?? options.createAssembler)(providerId);
6941
6941
  const exactPlan = options.planFromCurrentLane === true;
6942
- const steps = planRuntimeSteps(
6943
- exactPlan ? withCurrentBridgeLane(recording) : recording,
6944
- planAssembler
6945
- );
6942
+ const planRecording = exactPlan ? withCurrentBridgeLane(recording) : recording;
6943
+ const steps = planRuntimeSteps(planRecording, planAssembler);
6944
+ const plannedEventCount = exactPlan ? assembleRecordedEvents(
6945
+ planRecording,
6946
+ options.createPlanAssembler ?? options.createAssembler,
6947
+ providerId
6948
+ ).events.length : null;
6946
6949
  const answeredIds = /* @__PURE__ */ new Set();
6947
6950
  const pendingBridgeRequests = [];
6948
6951
  const recordedAnswers = /* @__PURE__ */ new Map();
@@ -7103,7 +7106,14 @@ async function replayRecording(options) {
7103
7106
  }
7104
7107
  setCursor("end");
7105
7108
  await waitFor("the last responses", () => sentRequestIds.every((id) => answeredIds.has(id)));
7106
- await waitFor("the stream to settle", () => Date.now() - lastOutputAt >= settleMs);
7109
+ if (plannedEventCount !== null) {
7110
+ await waitFor(
7111
+ `all ${plannedEventCount} planned events before closing the bridge`,
7112
+ () => events.length >= plannedEventCount
7113
+ );
7114
+ } else {
7115
+ await waitFor("the stream to settle", () => Date.now() - lastOutputAt >= settleMs);
7116
+ }
7107
7117
  child.stdin?.end();
7108
7118
  const exitCode = await Promise.race([
7109
7119
  exited,
@@ -1287,6 +1287,9 @@ var testPluginSdkApp = {
1287
1287
  experimental_useProviders() {
1288
1288
  return useSlotEnv("experimental_useProviders").providers;
1289
1289
  },
1290
+ experimental_useCodeTheme() {
1291
+ return useSlotEnv("experimental_useCodeTheme").codeTheme;
1292
+ },
1290
1293
  experimental_useSidebarThreadActions() {
1291
1294
  return useSlotEnv("experimental_useSidebarThreadActions").sidebarActions;
1292
1295
  },
@@ -1597,6 +1600,11 @@ function renderSlot(registration, props, options = {}) {
1597
1600
  status: options.providers?.status ?? "ready",
1598
1601
  providers: options.providers?.providers ?? []
1599
1602
  };
1603
+ const codeTheme = {
1604
+ mode: options.codeTheme?.mode ?? "light",
1605
+ name: options.codeTheme?.name ?? "pierre-light",
1606
+ theme: options.codeTheme?.theme ?? null
1607
+ };
1600
1608
  const sidebarActions = {
1601
1609
  open(threadId2, openOptions) {
1602
1610
  sidebarActionCalls.push({
@@ -1781,7 +1789,8 @@ ${block}
1781
1789
  sidebarActions,
1782
1790
  sidebarActionCalls,
1783
1791
  sidebarPullRequests,
1784
- providers
1792
+ providers,
1793
+ codeTheme
1785
1794
  };
1786
1795
  const releaseComposerOwnership = () => {
1787
1796
  if (!composerOwnership.active) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@get-bb/plugin-sdk",
3
- "version": "0.4.20",
3
+ "version": "0.4.22",
4
4
  "homepage": "https://github.com/get-bb/bb#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/get-bb/bb/issues"