@get-bb/plugin-sdk 0.4.88 → 0.4.97

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.
@@ -52,6 +52,14 @@ interface StandardSchemaV1<Input = unknown, Output = Input> {
52
52
  readonly version: 1;
53
53
  readonly vendor: string;
54
54
  readonly validate: (value: unknown) => StandardSchemaV1Result<Output> | Promise<StandardSchemaV1Result<Output>>;
55
+ readonly jsonSchema?: {
56
+ readonly input: (options: {
57
+ target: string;
58
+ }) => Record<string, unknown>;
59
+ readonly output: (options: {
60
+ target: string;
61
+ }) => Record<string, unknown>;
62
+ };
55
63
  readonly types?: {
56
64
  readonly input: Input;
57
65
  readonly output: Output;
@@ -73,6 +81,7 @@ interface StandardSchemaV1Issue {
73
81
  type StandardSchemaV1InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
74
82
  type StandardSchemaV1InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
75
83
  interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> {
84
+ readonly experimental_description?: string;
76
85
  readonly input: InputSchema;
77
86
  readonly output: OutputSchema;
78
87
  }
@@ -241,6 +250,10 @@ declare const providerInfoSchema: z.ZodObject<{
241
250
  supportsThreadArchive: z.ZodBoolean;
242
251
  supportsThreadRename: z.ZodBoolean;
243
252
  }, z.core.$strip>;
253
+ completedTurnDisplay: z.ZodEnum<{
254
+ collapse: "collapse";
255
+ flat: "flat";
256
+ }>;
244
257
  composerActions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
245
258
  kind: z.ZodLiteral<"skills">;
246
259
  trigger: z.ZodEnum<{
@@ -566,6 +579,16 @@ interface PluginThreadHeaderActionProps {
566
579
  */
567
580
  isCompactViewport: boolean;
568
581
  }
582
+ interface ExperimentalPluginBrowserToolbarActionProps {
583
+ /** Thread that owns the Browser tab. */
584
+ threadId: string;
585
+ /** Browser tab currently rendering the action. */
586
+ tabId: string;
587
+ /** Current top-level URL shown in the address bar. */
588
+ url: string;
589
+ /** True when the Browser chrome needs compact controls. */
590
+ isCompactViewport: boolean;
591
+ }
569
592
  /**
570
593
  * Where a file being opened by a `fileOpener` lives. `path` semantics follow
571
594
  * the source: workspace paths are relative to the environment's worktree,
@@ -1289,6 +1312,14 @@ interface PluginThreadHeaderActionRegistration {
1289
1312
  title: string;
1290
1313
  component: ComponentType<PluginThreadHeaderActionProps>;
1291
1314
  }
1315
+ interface ExperimentalPluginBrowserToolbarActionRegistration {
1316
+ /** Unique within the plugin; letters, digits, `-`, `_`. */
1317
+ id: string;
1318
+ /** Accessible name for the host-wrapped control group. */
1319
+ title: string;
1320
+ /** Component rendered beside the Browser address bar. */
1321
+ component: ComponentType<ExperimentalPluginBrowserToolbarActionProps>;
1322
+ }
1292
1323
  /** One pane's place in the split layout, as fractions of the split area. */
1293
1324
  interface PluginSidebarSplitPane {
1294
1325
  paneId: string;
@@ -1501,8 +1532,8 @@ interface PluginMessageActionRegistration {
1501
1532
  */
1502
1533
  run(context: PluginMessageActionContext): void | Promise<void>;
1503
1534
  }
1504
- /** Context handed to a `commandPaletteAction`'s `isAvailable` and `run`. */
1505
- interface PluginCommandPaletteActionContext {
1535
+ /** Current context for palette and keyboard command invocations. */
1536
+ interface PluginCommandContext {
1506
1537
  /** The thread in view, or null on a surface without one. */
1507
1538
  threadId: string | null;
1508
1539
  projectId: string | null;
@@ -1518,27 +1549,49 @@ interface PluginCommandPaletteActionContext {
1518
1549
  */
1519
1550
  openPanel(options: PluginTargetedPanelActionOpenOptions): boolean;
1520
1551
  }
1552
+ /** A default keyboard shortcut. Omitted modifiers are false. */
1553
+ interface PluginCommandShortcut {
1554
+ key: string;
1555
+ /** Command on macOS, Control elsewhere. */
1556
+ mod?: boolean;
1557
+ meta?: boolean;
1558
+ control?: boolean;
1559
+ alt?: boolean;
1560
+ shift?: boolean;
1561
+ }
1521
1562
  /**
1522
- * A row in bb's quick palette (Mod+Shift+P), listed under the plugin's name
1563
+ * A command registered with `app.commands.register`, listed in bb's quick
1564
+ * palette (Mod+Shift+P) under the plugin's name
1523
1565
  * beside bb's own commands. Host-rendered: the plugin supplies a title and
1524
1566
  * `run`, and the host owns matching, ordering, and recency.
1525
1567
  */
1526
- interface PluginCommandPaletteActionRegistration {
1568
+ interface PluginCommandRegistration {
1569
+ /** Initial keyboard binding. Users can rebind every command, including ones without a default. Conflicting defaults remain unbound. */
1570
+ defaultShortcut?: PluginCommandShortcut;
1527
1571
  /** Unique within the plugin; letters, digits, `-`, `_`. */
1528
1572
  id: string;
1529
1573
  /** The row's label, e.g. "Linear: open issue for this thread". */
1530
1574
  title: string;
1531
1575
  /**
1532
1576
  * Hide the row when it cannot do anything — typically when it needs a thread
1533
- * and there is none. Called while the palette is open; keep it cheap and
1534
- * synchronous. Omitted means always listed.
1577
+ * and there is none. Called before palette listing and keyboard invocation;
1578
+ * keep it cheap and synchronous. Omitted means always listed.
1535
1579
  */
1536
- isAvailable?(context: PluginCommandPaletteActionContext): boolean;
1580
+ isAvailable?(context: PluginCommandContext): boolean;
1537
1581
  /**
1538
- * Runs after the palette closes and focus is restored. Errors (sync or
1539
- * async) are contained and logged; they never break the palette.
1582
+ * Runs on keyboard invocation, or after the palette closes and focus is
1583
+ * restored. Errors (sync or async) are contained and logged; they never break the palette.
1540
1584
  */
1541
- run(context: PluginCommandPaletteActionContext): void | Promise<void>;
1585
+ run(context: PluginCommandContext): void | Promise<void>;
1586
+ }
1587
+ /** @deprecated Use PluginCommandContext. */
1588
+ type PluginCommandPaletteActionContext = PluginCommandContext;
1589
+ /** @deprecated Use PluginCommandRegistration. */
1590
+ type PluginCommandPaletteActionRegistration = PluginCommandRegistration;
1591
+ /** Registers commands for bb's command palette. */
1592
+ interface PluginAppCommands {
1593
+ /** Register a command. IDs are unique within this plugin, including legacy slot registrations. */
1594
+ register(registration: PluginCommandRegistration): void;
1542
1595
  }
1543
1596
  /**
1544
1597
  * Supply an inline React mark for a provider. Agent, machine, and environment
@@ -1769,6 +1822,8 @@ interface PluginAppSlots {
1769
1822
  * docs/api_to_audit.md.
1770
1823
  */
1771
1824
  experimental_threadHeaderAction(registration: PluginThreadHeaderActionRegistration): void;
1825
+ /** Render a component beside each Browser tab's address bar. */
1826
+ experimental_browserToolbarAction(registration: ExperimentalPluginBrowserToolbarActionRegistration): void;
1772
1827
  fileOpener(registration: PluginFileOpenerRegistration): void;
1773
1828
  /**
1774
1829
  * Replace BB's source-code renderer (see
@@ -1785,10 +1840,10 @@ interface PluginAppSlots {
1785
1840
  messageDirective(registration: PluginMessageDirectiveRegistration): void;
1786
1841
  messageAction(registration: PluginMessageActionRegistration): void;
1787
1842
  /**
1788
- * Add a row to the quick palette (see
1789
- * {@link PluginCommandPaletteActionRegistration}).
1843
+ * @deprecated Use `app.commands.register` with the same registration.
1844
+ * Both entry points share the same command registry and ID namespace.
1790
1845
  */
1791
- commandPaletteAction(registration: PluginCommandPaletteActionRegistration): void;
1846
+ commandPaletteAction(registration: PluginCommandRegistration): void;
1792
1847
  /**
1793
1848
  * Draw one agent, environment, or machine provider's icon with an inline
1794
1849
  * React component instead of its masked logo asset (see
@@ -1920,6 +1975,7 @@ interface ExperimentalAppIcons {
1920
1975
  }
1921
1976
  interface PluginAppBuilder {
1922
1977
  experimental_icons: ExperimentalAppIcons;
1978
+ commands: PluginAppCommands;
1923
1979
  slots: PluginAppSlots;
1924
1980
  composer: PluginAppComposer;
1925
1981
  contentScripts: PluginAppContentScripts;
@@ -2126,7 +2182,7 @@ interface PluginComposerApi {
2126
2182
  focus(): void;
2127
2183
  /**
2128
2184
  * Submit this composer's draft through the composer's OWN submit pipeline,
2129
- * queued until `sendAt` instead of dispatched now.
2185
+ * optionally scheduling it or attaching plugin-owned dispatch data.
2130
2186
  *
2131
2187
  * This is a real submission, not a plugin-issued send: the host builds the
2132
2188
  * request exactly as pressing Enter would, so the draft's attachments and
@@ -2136,12 +2192,11 @@ interface PluginComposerApi {
2136
2192
  * tuple itself, which is why sending from the backend instead would silently
2137
2193
  * run the message with different settings than the ones in front of the user.
2138
2194
  *
2139
- * In a thread composer the message is queued as a row instead of being
2140
- * sent or queued for the next idle moment. In the new-thread composer the
2141
- * thread is created `pending` and its first message becomes the queued row.
2142
- * Either way the resulting row is core's: the queued card above the
2143
- * composer, the countdown, Send now and Delete all work with no further
2144
- * plugin involvement.
2195
+ * `sendAt` queues the submission until that time. `experimental_data` is
2196
+ * opaque JSON delivered to dispatch hooks together with the calling plugin's
2197
+ * id on this initial attempt. Hooks run before operational core waits. If a
2198
+ * hook queues the message, its existing plugin wait identifies the owner on
2199
+ * later attempts; core does not persist or interpret the opaque data.
2145
2200
  *
2146
2201
  * Resolves once the host has accepted the submission and cleared the draft.
2147
2202
  * Rejects when the composer refused to submit — a scope with no submit
@@ -2158,18 +2213,17 @@ interface PluginComposerApi {
2158
2213
  /**
2159
2214
  * What `experimental_submit` does differently from pressing Enter.
2160
2215
  *
2161
- * There is deliberately no zero-argument overload and no "submit now" arm: a
2162
- * plugin that wants a draft sent immediately is asking for the affordance the
2163
- * user already has, and handing plugins an unconditional "send this draft"
2164
- * button is a much larger surface than scheduling needs.
2216
+ * `experimental_data` is opaque JSON delivered to dispatch hooks. The runtime
2217
+ * associates it with the calling plugin automatically for the initial
2218
+ * dispatch attempt.
2165
2219
  */
2166
- interface ExperimentalComposerSubmitOptions {
2167
- /**
2168
- * Epoch ms the submission should dispatch at. Must be in the future; the
2169
- * host does not second-guess how far ahead it is.
2170
- */
2220
+ type ExperimentalComposerSubmitOptions = {
2171
2221
  sendAt: number;
2172
- }
2222
+ experimental_data?: JsonValue$1;
2223
+ } | {
2224
+ experimental_data: JsonValue$1;
2225
+ sendAt?: never;
2226
+ };
2173
2227
  /**
2174
2228
  * A consumer-supplied action on the messages of one `ThreadChat` instance,
2175
2229
  * rendered in the embedded timeline's per-message action bar alongside the
@@ -2478,7 +2532,13 @@ interface NewThreadComposerProps {
2478
2532
  * the original `default` submission would have created from.
2479
2533
  */
2480
2534
  defaultEnvironment?: CreateThreadEnvironmentArgs;
2481
- /** Seeds the draft, only while the draft is still empty. */
2535
+ /**
2536
+ * Seeds the draft, only while the draft is still empty. Serialized
2537
+ * `@thread:<id>`, `@project:<id>`, and `@section:<id>` tokens become mention
2538
+ * pills with host-resolved titles/names. Missing projects/sections use their
2539
+ * IDs; unavailable generated thread IDs use "Unavailable thread" ("Thread"
2540
+ * if lookup fails). Other unknown thread IDs use the ID as their label.
2541
+ */
2482
2542
  initialPrompt?: string;
2483
2543
  placeholder?: string;
2484
2544
  /**
@@ -2613,7 +2673,8 @@ interface BbNavigate {
2613
2673
  }): void;
2614
2674
  /**
2615
2675
  * Navigate to the root compose surface (the new-thread screen). Pass
2616
- * `initialPrompt` to seed the composer draft and `focusPrompt` to focus the
2676
+ * `initialPrompt` to seed the composer draft (serialized thread, project,
2677
+ * and section mention tokens become pills) and `focusPrompt` to focus the
2617
2678
  * composer on arrival — the pairing behind "Create via chat" style entry
2618
2679
  * points that drop the user into chat with a prefilled prompt.
2619
2680
  */
@@ -2829,4 +2890,4 @@ declare const experimental_useProviders: () => PluginProvidersState;
2829
2890
  declare const experimental_useCodeTheme: () => PluginCodeThemeState;
2830
2891
 
2831
2892
  export { Markdown, ThreadChat, 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, useRealtime, useRealtimeConnectionState, useRpc, useSettings };
2832
- export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, 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, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, 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, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
2893
+ export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, 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, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, 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, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
@@ -19,6 +19,14 @@ interface StandardSchemaV1<Input = unknown, Output = Input> {
19
19
  readonly version: 1;
20
20
  readonly vendor: string;
21
21
  readonly validate: (value: unknown) => StandardSchemaV1Result<Output> | Promise<StandardSchemaV1Result<Output>>;
22
+ readonly jsonSchema?: {
23
+ readonly input: (options: {
24
+ target: string;
25
+ }) => Record<string, unknown>;
26
+ readonly output: (options: {
27
+ target: string;
28
+ }) => Record<string, unknown>;
29
+ };
22
30
  readonly types?: {
23
31
  readonly input: Input;
24
32
  readonly output: Output;
@@ -40,6 +48,7 @@ interface StandardSchemaV1Issue {
40
48
  type StandardSchemaV1InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
41
49
  type StandardSchemaV1InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
42
50
  interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> {
51
+ readonly experimental_description?: string;
43
52
  readonly input: InputSchema;
44
53
  readonly output: OutputSchema;
45
54
  }
@@ -427,6 +427,8 @@ declare const threadQueuedMessageSchema: z.ZodObject<{
427
427
  kind: z.ZodLiteral<"time">;
428
428
  }, z.core.$strip>, z.ZodObject<{
429
429
  kind: z.ZodLiteral<"thread-busy">;
430
+ }, z.core.$strip>, z.ZodObject<{
431
+ kind: z.ZodLiteral<"stopping">;
430
432
  }, z.core.$strip>, z.ZodObject<{
431
433
  kind: z.ZodLiteral<"turn-starting">;
432
434
  }, z.core.$strip>, z.ZodObject<{
@@ -693,7 +695,9 @@ interface PluginMachineProviderDefinition<S extends PluginMachineProviderInputsS
693
695
  report: PluginMachineProviderProgress;
694
696
  signal: AbortSignal;
695
697
  }): Promise<PluginMachineProviderRemoveResult>;
698
+ /** Idempotent: preserve saved state when compute is already stopped; save and stop any remaining compute, including during reconciliation of a suspended machine. */
696
699
  suspend?(context: PluginMachineProviderResourceLifecycleContext): Promise<PluginMachineProviderResourceResult>;
700
+ /** Idempotent: reuse existing running compute instead of allocating a duplicate. */
697
701
  resume?(context: PluginMachineProviderResourceLifecycleContext): Promise<PluginMachineProviderResourceResult>;
698
702
  remove(context: PluginMachineProviderRemoveContext): Promise<PluginMachineProviderRemoveResult>;
699
703
  }
@@ -733,6 +737,14 @@ interface StandardSchemaV1<Input = unknown, Output = Input> {
733
737
  readonly version: 1;
734
738
  readonly vendor: string;
735
739
  readonly validate: (value: unknown) => StandardSchemaV1Result<Output> | Promise<StandardSchemaV1Result<Output>>;
740
+ readonly jsonSchema?: {
741
+ readonly input: (options: {
742
+ target: string;
743
+ }) => Record<string, unknown>;
744
+ readonly output: (options: {
745
+ target: string;
746
+ }) => Record<string, unknown>;
747
+ };
736
748
  readonly types?: {
737
749
  readonly input: Input;
738
750
  readonly output: Output;
@@ -751,6 +763,11 @@ interface StandardSchemaV1Issue {
751
763
  readonly key: PropertyKey;
752
764
  })[];
753
765
  }
766
+ interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> {
767
+ readonly experimental_description?: string;
768
+ readonly input: InputSchema;
769
+ readonly output: OutputSchema;
770
+ }
754
771
 
755
772
  type PluginSettingDescriptor = {
756
773
  type: "string";
@@ -1006,6 +1023,16 @@ interface MessageDispatchHookContext {
1006
1023
  * double-count.
1007
1024
  */
1008
1025
  queuedMessage: ThreadQueuedMessage | null;
1026
+ /**
1027
+ * Opaque JSON supplied by a plugin through the composer's
1028
+ * `experimental_submit`, paired with that plugin's id. Null for ordinary
1029
+ * submissions and queued re-attempts. Core does not persist or interpret
1030
+ * the data.
1031
+ */
1032
+ experimental_submission: {
1033
+ pluginId: string;
1034
+ data: JsonValue;
1035
+ } | null;
1009
1036
  /** How the dispatch was requested; null for internal/core-driven sends. */
1010
1037
  origin: ThreadCreateOrigin | null;
1011
1038
  originPluginId: string | null;
@@ -1286,6 +1313,8 @@ interface PluginProviderOptionsContext {
1286
1313
  }
1287
1314
  /** See {@link PluginProviderDeclaration.models}. */
1288
1315
  type PluginProviderModelCatalogScope = "host" | "workspace";
1316
+ /** See {@link PluginProviderDeclaration.completedTurnDisplay}. */
1317
+ type PluginProviderCompletedTurnDisplay = "collapse" | "flat";
1289
1318
  /**
1290
1319
  * One cold-cache fallback model. The provider's live `model/list` result is
1291
1320
  * the only real model source; this list stands in only while no probe has
@@ -1392,6 +1421,16 @@ interface PluginProviderDeclaration {
1392
1421
  /** Composer actions this provider supports. No duplicates; may be empty
1393
1422
  * (the universal skills typeahead is implicit). */
1394
1423
  composerActions: readonly PluginProviderComposerAction[];
1424
+ /**
1425
+ * How the thread timeline shows this provider's turns once they finish.
1426
+ * `"collapse"` (the default) folds a finished turn's work into one
1427
+ * "Worked for" row and leaves the final answer visible. `"flat"` keeps
1428
+ * every row of a finished turn visible, as it was while the turn ran. This
1429
+ * is only the provider's default: the user can choose either display for
1430
+ * each provider in Settings → Providers or with
1431
+ * `bb settings completed-turns`, and that choice wins.
1432
+ */
1433
+ completedTurnDisplay?: PluginProviderCompletedTurnDisplay;
1395
1434
  /** Provider copy for core surfaces ({@link PluginProviderStrings}). */
1396
1435
  strings?: PluginProviderStrings;
1397
1436
  /** Service tiers this provider accepts, as picker options. Non-empty when
@@ -1509,6 +1548,16 @@ interface PluginMentionItem {
1509
1548
  subtitle?: string;
1510
1549
  icon?: string;
1511
1550
  }
1551
+ /** Agent-only image context resolved with a plugin mention. */
1552
+ type ExperimentalPluginMentionImage = {
1553
+ type: "image";
1554
+ url: string;
1555
+ context?: string;
1556
+ } | {
1557
+ type: "localImage";
1558
+ path: string;
1559
+ context?: string;
1560
+ };
1512
1561
  interface PluginMentionProviderRegistration {
1513
1562
  /** Unique within this plugin: [a-zA-Z0-9_-]+ (no ":" — the host composes
1514
1563
  * wire item ids as "<providerId>:<itemId>"). */
@@ -1535,8 +1584,10 @@ interface PluginMentionProviderRegistration {
1535
1584
  */
1536
1585
  resolve(itemId: string): {
1537
1586
  context: string;
1587
+ experimental_images?: readonly ExperimentalPluginMentionImage[];
1538
1588
  } | Promise<{
1539
1589
  context: string;
1590
+ experimental_images?: readonly ExperimentalPluginMentionImage[];
1540
1591
  }>;
1541
1592
  }
1542
1593
  /**
@@ -1668,6 +1719,7 @@ type NormalizedPluginProviderDeclaration = Omit<PluginProviderDeclaration, "expe
1668
1719
  readonly experimental_nativeSkillRoots?: ProviderNativeRoots;
1669
1720
  readonly experimental_nativeCommandRoots?: ProviderNativeRoots;
1670
1721
  readonly experimental_resolvesNativeRoots: boolean;
1722
+ readonly completedTurnDisplay: PluginProviderCompletedTurnDisplay;
1671
1723
  readonly maintenance: {
1672
1724
  readonly health: boolean;
1673
1725
  readonly usage: boolean;
@@ -1691,6 +1743,17 @@ declare function deriveValidatedProviderOptions(args: {
1691
1743
  context: Parameters<NonNullable<PluginProviderDeclaration["deriveProviderOptions"]>>[0];
1692
1744
  }): Readonly<Record<string, JsonValue>>;
1693
1745
  declare function isStandardSchema(value: unknown): value is StandardSchemaV1;
1746
+ declare function readRpcPublicationOptions(value: unknown): {
1747
+ experimental_discoverable: boolean;
1748
+ experimental_description: string | null;
1749
+ };
1750
+ declare function publishRpcMethod(method: string, contract: PluginRpcMethodContract, options: ReturnType<typeof readRpcPublicationOptions>): {
1751
+ method: string;
1752
+ registrationDescription: string | null;
1753
+ methodDescription: string | null;
1754
+ inputSchema: Record<string, JsonValue$1>;
1755
+ outputSchema: Record<string, JsonValue$1>;
1756
+ } | null;
1694
1757
  /**
1695
1758
  * The declared shape of `presentation`, copied field by field so
1696
1759
  * a plugin's object cannot smuggle prototypes or extra markup into the
@@ -1827,11 +1890,12 @@ declare function normalizeWebSocketRouteRegistration(path: string, handler: unkn
1827
1890
  auth: PluginHttpAuthMode;
1828
1891
  };
1829
1892
  type RpcRegistrationRecord = {
1893
+ publication: ReturnType<typeof publishRpcMethod>;
1830
1894
  inputSchema: StandardSchemaV1;
1831
1895
  outputSchema: StandardSchemaV1;
1832
1896
  handler: (input: unknown) => unknown;
1833
1897
  };
1834
- declare function normalizeRpcRegistration(contract: unknown, handlers: unknown, registered: ReadonlyMap<string, unknown>): Array<[string, RpcRegistrationRecord]>;
1898
+ declare function normalizeRpcRegistration(contract: unknown, handlers: unknown, registered: ReadonlyMap<string, unknown>, options: unknown): Array<[string, RpcRegistrationRecord]>;
1835
1899
  declare function normalizeRealtimePayload(channel: string, payload: unknown): unknown;
1836
1900
  declare function validateBackgroundServiceRegistration(name: string, service: {
1837
1901
  start(signal: AbortSignal): void | Promise<void>;
@@ -1913,5 +1977,5 @@ declare function normalizePluginAgentConfiguration(args: {
1913
1977
  declare function validateRpcValue(schema: StandardSchemaV1, value: unknown, phase: "input" | "output", fail: (error: PluginRpcError) => never): Promise<unknown>;
1914
1978
  declare function normalizeRpcJsonResult(value: unknown, fail: (error: PluginRpcError) => never): JsonValue;
1915
1979
 
1916
- export { ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS, ENVIRONMENT_PROVIDER_DISPLAY_NAME_MAX_CHARS, ENVIRONMENT_PROVIDER_ID_PATTERN, ENVIRONMENT_PROVIDER_REQUIREMENT_NAMES, KV_VALUE_MAX_BYTES, MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS, PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS, PLUGIN_MENTION_TRIGGER_VALUES, PLUGIN_PROVIDER_BRIDGE_OPTIONS_MAX_BYTES, PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES, PLUGIN_PROVIDER_DISPLAY_NAME_MAX_CHARS, PLUGIN_PROVIDER_ENV_MAX_ENTRIES, PLUGIN_PROVIDER_ENV_NAME_PATTERN, PLUGIN_PROVIDER_PERMISSION_MODE_VALUES, PLUGIN_PROVIDER_REASONING_LEVEL_VALUES, PROVIDER_ID_PATTERN, RESERVED_AGENT_TOOL_NAMES, RESERVED_BB_CLI_COMMANDS, SERVER_DIRECT_AI_SERVICE_IDS, SETTING_KEY_PATTERN, adoptHttpRouteResponse, aiServiceAlreadyRegisteredMessage, assertAiServiceRegistrable, coerceStoredPluginSettingValue, deriveValidatedProviderOptions, enforcePluginCliOutputLimit, environmentCompositionSchema, isPluginMentionTrigger, isStandardSchema, normalizeAgentToolRegistration, normalizeCliRegistration, normalizeHttpRouteRegistration, normalizeInteractionRequest, normalizeMentionProviderRegistration, normalizePluginAgentConfiguration, normalizeRealtimePayload, normalizeRpcJsonResult, normalizeRpcRegistration, normalizeWebSocketRouteRegistration, parsePluginAgentToolPresentation, pluginCliCollisionWarning, pluginHookAlreadyRegisteredMessage, providerAlreadyRegisteredMessage, providerIconRefusalMessage, providerWithoutBridgeMessage, registerSettingDescriptors, runPluginStorageMigrations, storePluginHook, summarizeStandardIssues, undeclaredIconProblem, validateBackgroundServiceRegistration, validatePluginAiServiceDeclaration, validatePluginEnvironmentProviderDeclaration, validatePluginMachineProviderDeclaration, validatePluginProviderDeclaration, validatePluginProviderEnvEntries, validateProviderEnvContribution, validateRpcValue, validateScheduleRegistration, validateServerAccessProviderDeclaration, validateSettingsUpdate };
1980
+ export { ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS, ENVIRONMENT_PROVIDER_DISPLAY_NAME_MAX_CHARS, ENVIRONMENT_PROVIDER_ID_PATTERN, ENVIRONMENT_PROVIDER_REQUIREMENT_NAMES, KV_VALUE_MAX_BYTES, MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS, PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS, PLUGIN_MENTION_TRIGGER_VALUES, PLUGIN_PROVIDER_BRIDGE_OPTIONS_MAX_BYTES, PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES, PLUGIN_PROVIDER_DISPLAY_NAME_MAX_CHARS, PLUGIN_PROVIDER_ENV_MAX_ENTRIES, PLUGIN_PROVIDER_ENV_NAME_PATTERN, PLUGIN_PROVIDER_PERMISSION_MODE_VALUES, PLUGIN_PROVIDER_REASONING_LEVEL_VALUES, PROVIDER_ID_PATTERN, RESERVED_AGENT_TOOL_NAMES, RESERVED_BB_CLI_COMMANDS, SERVER_DIRECT_AI_SERVICE_IDS, SETTING_KEY_PATTERN, adoptHttpRouteResponse, aiServiceAlreadyRegisteredMessage, assertAiServiceRegistrable, coerceStoredPluginSettingValue, deriveValidatedProviderOptions, enforcePluginCliOutputLimit, environmentCompositionSchema, isPluginMentionTrigger, isStandardSchema, normalizeAgentToolRegistration, normalizeCliRegistration, normalizeHttpRouteRegistration, normalizeInteractionRequest, normalizeMentionProviderRegistration, normalizePluginAgentConfiguration, normalizeRealtimePayload, normalizeRpcJsonResult, normalizeRpcRegistration, normalizeWebSocketRouteRegistration, parsePluginAgentToolPresentation, pluginCliCollisionWarning, pluginHookAlreadyRegisteredMessage, providerAlreadyRegisteredMessage, providerIconRefusalMessage, providerWithoutBridgeMessage, publishRpcMethod, readRpcPublicationOptions, registerSettingDescriptors, runPluginStorageMigrations, storePluginHook, summarizeStandardIssues, undeclaredIconProblem, validateBackgroundServiceRegistration, validatePluginAiServiceDeclaration, validatePluginEnvironmentProviderDeclaration, validatePluginMachineProviderDeclaration, validatePluginProviderDeclaration, validatePluginProviderEnvEntries, validateProviderEnvContribution, validateRpcValue, validateScheduleRegistration, validateServerAccessProviderDeclaration, validateSettingsUpdate };
1917
1981
  export type { AiServiceHostBinding, NormalizedPluginEnvironmentComposition, NormalizedPluginEnvironmentProvider, NormalizedPluginEnvironmentProviderRequirements, NormalizedPluginMachineProvider, NormalizedPluginProviderDeclaration };
@@ -5,7 +5,8 @@
5
5
  // Confused by the API, or need a symbol that isn't here? Clone the BB repo
6
6
  // and read the real source: https://github.com/get-bb/bb
7
7
 
8
- import { ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterItemRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, ExperimentalSidebarNavigationRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginCommandPaletteActionRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
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
10
 
10
11
  type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
11
12
  interface ExperimentalSidebarFooterRuntimeSnapshot {
@@ -40,6 +41,17 @@ type CollectedPluginProviderIconRegistration = Omit<PluginProviderIconRegistrati
40
41
  providerKind: PluginProviderIconRegistration["providerKind"] | "all";
41
42
  };
42
43
  /** Validated registrations produced by one plugin app setup execution. */
44
+ declare const commandShortcutSchema: z.ZodObject<{
45
+ alt: z.ZodDefault<z.ZodBoolean>;
46
+ control: z.ZodDefault<z.ZodBoolean>;
47
+ key: z.ZodString;
48
+ meta: z.ZodDefault<z.ZodBoolean>;
49
+ mod: z.ZodDefault<z.ZodBoolean>;
50
+ shift: z.ZodDefault<z.ZodBoolean>;
51
+ }, z.core.$strict>;
52
+ interface CollectedPluginCommandRegistration extends Omit<PluginCommandRegistration, "defaultShortcut"> {
53
+ defaultShortcut: z.infer<typeof commandShortcutSchema> | null;
54
+ }
43
55
  interface CollectedPluginAppRegistrations {
44
56
  homepageSections: PluginHomepageSectionRegistration[];
45
57
  settingsSections: PluginSettingsSectionRegistration[];
@@ -54,12 +66,13 @@ interface CollectedPluginAppRegistrations {
54
66
  experimentalSidebarNavigations: ExperimentalSidebarNavigationRegistration[];
55
67
  threadLists: PluginThreadListRegistration[];
56
68
  threadHeaderActions: PluginThreadHeaderActionRegistration[];
69
+ browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
57
70
  fileOpeners: PluginFileOpenerRegistration[];
58
71
  sourceCodeRenderers: PluginSourceCodeRendererRegistration[];
59
72
  diffRenderers: PluginDiffRendererRegistration[];
60
73
  messageDirectives: PluginMessageDirectiveRegistration[];
61
74
  messageActions: PluginMessageActionRegistration[];
62
- commandPaletteActions: PluginCommandPaletteActionRegistration[];
75
+ commandPaletteActions: CollectedPluginCommandRegistration[];
63
76
  providerIcons: CollectedPluginProviderIconRegistration[];
64
77
  icons: ExperimentalIconRegistration[];
65
78
  timelineRenderers: PluginTimelineRendererRegistration[];
@@ -77,4 +90,4 @@ declare function getCollectedSidebarFooterItems(registrations: object): readonly
77
90
  declare function collectPluginAppRegistrations(definition: PluginAppDefinition, onComposerCustomizationRejected?: (reason: string) => void): CollectedPluginAppRegistrations;
78
91
 
79
92
  export { adaptSidebarFooterAction, collectPluginAppRegistrations, getCollectedSidebarFooterItems };
80
- export type { CollectedCompatibilitySidebarFooterItem, CollectedExperimentalSidebarFooterItem, CollectedManagedSidebarFooterItem, CollectedPluginAppRegistrations, CollectedPluginProviderIconRegistration, CollectedSidebarFooterItem, ExperimentalSidebarFooterCommandKind, ExperimentalSidebarFooterItemRuntime, ExperimentalSidebarFooterRuntimeSnapshot };
93
+ export type { CollectedCompatibilitySidebarFooterItem, CollectedExperimentalSidebarFooterItem, CollectedManagedSidebarFooterItem, CollectedPluginAppRegistrations, CollectedPluginCommandRegistration, CollectedPluginProviderIconRegistration, CollectedSidebarFooterItem, ExperimentalSidebarFooterCommandKind, ExperimentalSidebarFooterItemRuntime, ExperimentalSidebarFooterRuntimeSnapshot };
@@ -76,7 +76,9 @@ interface PluginMachineProviderDefinition<S extends PluginMachineProviderInputsS
76
76
  report: PluginMachineProviderProgress;
77
77
  signal: AbortSignal;
78
78
  }): Promise<PluginMachineProviderRemoveResult>;
79
+ /** Idempotent: preserve saved state when compute is already stopped; save and stop any remaining compute, including during reconciliation of a suspended machine. */
79
80
  suspend?(context: PluginMachineProviderResourceLifecycleContext): Promise<PluginMachineProviderResourceResult>;
81
+ /** Idempotent: reuse existing running compute instead of allocating a duplicate. */
80
82
  resume?(context: PluginMachineProviderResourceLifecycleContext): Promise<PluginMachineProviderResourceResult>;
81
83
  remove(context: PluginMachineProviderRemoveContext): Promise<PluginMachineProviderRemoveResult>;
82
84
  }
@@ -3132,6 +3132,8 @@ declare const threadEventSchema: z.ZodPipe<z.ZodUnknown, z.ZodUnion<readonly [z.
3132
3132
  threadId: z.ZodString;
3133
3133
  tokenUsage: z.ZodObject<{
3134
3134
  last: z.ZodObject<{
3135
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
3136
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
3135
3137
  cachedInputTokens: z.ZodNumber;
3136
3138
  inputTokens: z.ZodNumber;
3137
3139
  outputTokens: z.ZodNumber;
@@ -3140,6 +3142,8 @@ declare const threadEventSchema: z.ZodPipe<z.ZodUnknown, z.ZodUnion<readonly [z.
3140
3142
  }, z.core.$strip>;
3141
3143
  modelContextWindow: z.ZodNullable<z.ZodNumber>;
3142
3144
  total: z.ZodObject<{
3145
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
3146
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
3143
3147
  cachedInputTokens: z.ZodNumber;
3144
3148
  inputTokens: z.ZodNumber;
3145
3149
  outputTokens: z.ZodNumber;
@@ -4732,6 +4736,8 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4732
4736
  }, z.core.$strip>, z.ZodObject<{
4733
4737
  kind: z.ZodLiteral<"usage">;
4734
4738
  last: z.ZodObject<{
4739
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
4740
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
4735
4741
  cachedInputTokens: z.ZodNumber;
4736
4742
  inputTokens: z.ZodNumber;
4737
4743
  outputTokens: z.ZodNumber;
@@ -4741,6 +4747,8 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4741
4747
  modelContextWindow: z.ZodNullable<z.ZodNumber>;
4742
4748
  providerTurnId: z.ZodOptional<z.ZodString>;
4743
4749
  total: z.ZodObject<{
4750
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
4751
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
4744
4752
  cachedInputTokens: z.ZodNumber;
4745
4753
  inputTokens: z.ZodNumber;
4746
4754
  outputTokens: z.ZodNumber;
@@ -414,6 +414,8 @@ declare const threadEventUserContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject
414
414
  }, z.core.$strip>], "type">;
415
415
  type ThreadEventUserContent = z.infer<typeof threadEventUserContentSchema>;
416
416
  declare const threadEventTokenUsageBreakdownSchema: z.ZodObject<{
417
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
418
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
417
419
  cachedInputTokens: z.ZodNumber;
418
420
  inputTokens: z.ZodNumber;
419
421
  outputTokens: z.ZodNumber;
@@ -2912,6 +2914,8 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2912
2914
  }, z.core.$strip>, z.ZodObject<{
2913
2915
  kind: z.ZodLiteral<"usage">;
2914
2916
  last: z.ZodObject<{
2917
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
2918
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
2915
2919
  cachedInputTokens: z.ZodNumber;
2916
2920
  inputTokens: z.ZodNumber;
2917
2921
  outputTokens: z.ZodNumber;
@@ -2921,6 +2925,8 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2921
2925
  modelContextWindow: z.ZodNullable<z.ZodNumber>;
2922
2926
  providerTurnId: z.ZodOptional<z.ZodString>;
2923
2927
  total: z.ZodObject<{
2928
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
2929
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
2924
2930
  cachedInputTokens: z.ZodNumber;
2925
2931
  inputTokens: z.ZodNumber;
2926
2932
  outputTokens: z.ZodNumber;
@@ -3753,6 +3759,8 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
3753
3759
  }, z.core.$strip>, z.ZodObject<{
3754
3760
  kind: z.ZodLiteral<"usage">;
3755
3761
  last: z.ZodObject<{
3762
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
3763
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
3756
3764
  cachedInputTokens: z.ZodNumber;
3757
3765
  inputTokens: z.ZodNumber;
3758
3766
  outputTokens: z.ZodNumber;
@@ -3762,6 +3770,8 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
3762
3770
  modelContextWindow: z.ZodNullable<z.ZodNumber>;
3763
3771
  providerTurnId: z.ZodOptional<z.ZodString>;
3764
3772
  total: z.ZodObject<{
3773
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
3774
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
3765
3775
  cachedInputTokens: z.ZodNumber;
3766
3776
  inputTokens: z.ZodNumber;
3767
3777
  outputTokens: z.ZodNumber;
@@ -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, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
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, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
11
11
 
12
12
  type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
13
13
  interface ExperimentalSidebarFooterRuntimeSnapshot {
@@ -115,9 +115,7 @@ interface ComposerLog {
115
115
  * has no submit pipeline of its own, so it records the options and clears the
116
116
  * draft — enough to assert what a picker scheduled and that it tidied up.
117
117
  */
118
- submits: Array<{
119
- sendAt: number;
120
- }>;
118
+ submits: ExperimentalComposerSubmitOptions[];
121
119
  }
122
120
  /** One recorded `experimental_useSidebarThreadActions()` call. */
123
121
  interface SidebarActionCall {
@@ -148,6 +146,7 @@ interface CapturedPluginApp {
148
146
  experimentalSidebarNavigations: ExperimentalSidebarNavigationRegistration[];
149
147
  threadLists: PluginThreadListRegistration[];
150
148
  threadHeaderActions: PluginThreadHeaderActionRegistration[];
149
+ browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
151
150
  fileOpeners: PluginFileOpenerRegistration[];
152
151
  sourceCodeRenderers: PluginSourceCodeRendererRegistration[];
153
152
  diffRenderers: PluginDiffRendererRegistration[];