@get-bb/plugin-sdk 0.4.12 → 0.4.14

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.
@@ -1232,6 +1232,45 @@ interface PluginMessageActionRegistration {
1232
1232
  */
1233
1233
  run(context: PluginMessageActionContext): void | Promise<void>;
1234
1234
  }
1235
+ /** Context handed to a `commandPaletteAction`'s `isAvailable` and `run`. */
1236
+ interface PluginCommandPaletteActionContext {
1237
+ /** The thread in view, or null on a surface without one. */
1238
+ threadId: string | null;
1239
+ projectId: string | null;
1240
+ /**
1241
+ * Open one of this plugin's `threadPanelAction` components in the current
1242
+ * thread's side panel, exactly as `messageAction`'s `openPanel` does.
1243
+ *
1244
+ * Returns true when the host accepted the open; false when it declined —
1245
+ * `params` was not a JSON value, the action id names no `threadPanelAction`
1246
+ * of this plugin, or the surface has no side panel. Only the main thread
1247
+ * view has one, and the palette opens anywhere, so guard with `isAvailable`
1248
+ * rather than assuming.
1249
+ */
1250
+ openPanel(options: PluginTargetedPanelActionOpenOptions): boolean;
1251
+ }
1252
+ /**
1253
+ * A row in bb's quick palette (Mod+Shift+P), listed under the plugin's name
1254
+ * beside bb's own commands. Host-rendered: the plugin supplies a title and
1255
+ * `run`, and the host owns matching, ordering, and recency.
1256
+ */
1257
+ interface PluginCommandPaletteActionRegistration {
1258
+ /** Unique within the plugin; letters, digits, `-`, `_`. */
1259
+ id: string;
1260
+ /** The row's label, e.g. "Linear: open issue for this thread". */
1261
+ title: string;
1262
+ /**
1263
+ * Hide the row when it cannot do anything — typically when it needs a thread
1264
+ * and there is none. Called while the palette is open; keep it cheap and
1265
+ * synchronous. Omitted means always listed.
1266
+ */
1267
+ isAvailable?(context: PluginCommandPaletteActionContext): boolean;
1268
+ /**
1269
+ * Runs after the palette closes and focus is restored. Errors (sync or
1270
+ * async) are contained and logged; they never break the palette.
1271
+ */
1272
+ run(context: PluginCommandPaletteActionContext): void | Promise<void>;
1273
+ }
1235
1274
  /**
1236
1275
  * Supply the inline React mark bb draws for one agent provider.
1237
1276
  *
@@ -1302,6 +1341,11 @@ interface PluginAppSlots {
1302
1341
  experimental_diffRenderer(registration: PluginDiffRendererRegistration): void;
1303
1342
  messageDirective(registration: PluginMessageDirectiveRegistration): void;
1304
1343
  messageAction(registration: PluginMessageActionRegistration): void;
1344
+ /**
1345
+ * Add a row to the quick palette (see
1346
+ * {@link PluginCommandPaletteActionRegistration}).
1347
+ */
1348
+ commandPaletteAction(registration: PluginCommandPaletteActionRegistration): void;
1305
1349
  /**
1306
1350
  * Draw one agent provider's icon with an inline React component instead of
1307
1351
  * its `<img>`-rendered logo file (see
@@ -1626,6 +1670,57 @@ interface ThreadChatProps {
1626
1670
  */
1627
1671
  messageActions?: readonly ThreadChatMessageAction[];
1628
1672
  }
1673
+ /** The controlled execution selection resolved by the picker. */
1674
+ interface ExperimentalProviderModelPickerValue {
1675
+ providerId: string;
1676
+ model: string;
1677
+ reasoningLevel: ReasoningLevel;
1678
+ /** Present only when the selected provider supports service tiers. */
1679
+ serviceTier?: ServiceTier;
1680
+ }
1681
+ /** Where the picker resolves the live provider and model catalog. */
1682
+ type ExperimentalProviderModelPickerRouting = {
1683
+ kind: "host";
1684
+ hostId: string;
1685
+ } | {
1686
+ kind: "environment";
1687
+ environmentId: string;
1688
+ };
1689
+ /**
1690
+ * Props of the host-owned `experimental_ProviderModelPicker` component.
1691
+ * Provider switches emit one coherent value after the live catalog resolves
1692
+ * its default model, reasoning level, and service-tier capability. Failed or
1693
+ * empty catalogs leave `value` unchanged. Omit `routing` to use bb's
1694
+ * primary-machine routing. Environment routing is required when a provider's
1695
+ * model catalog depends on the selected workspace.
1696
+ */
1697
+ interface ExperimentalProviderModelPickerProps {
1698
+ value: ExperimentalProviderModelPickerValue;
1699
+ onChange(value: ExperimentalProviderModelPickerValue): void;
1700
+ /** Route discovery through an explicit machine or existing environment. */
1701
+ routing?: ExperimentalProviderModelPickerRouting;
1702
+ /** Allow switching providers. Defaults to true; false hides provider tabs. */
1703
+ allowProviderChange?: boolean;
1704
+ /** Horizontal popover alignment. Defaults to `"start"`. */
1705
+ align?: "center" | "end" | "start";
1706
+ /** Render the shared selection summary without allowing changes. */
1707
+ disabled?: boolean;
1708
+ className?: string;
1709
+ }
1710
+ /** Props of BB's controlled, host-resolved permission-mode picker. */
1711
+ interface ExperimentalPermissionModePickerProps {
1712
+ /** Provider whose supported modes determine the available choices. */
1713
+ providerId: string;
1714
+ value: PermissionMode;
1715
+ onChange(value: PermissionMode): void;
1716
+ /** Route capability and machine-ceiling resolution like the execution picker. */
1717
+ routing?: ExperimentalProviderModelPickerRouting;
1718
+ /** Horizontal menu alignment. Defaults to `"end"`. */
1719
+ align?: "center" | "end" | "start";
1720
+ /** Render the resolved mode without allowing changes. */
1721
+ disabled?: boolean;
1722
+ className?: string;
1723
+ }
1629
1724
  /**
1630
1725
  * Every selection the composer resolved, JSON-serializable so a plugin can
1631
1726
  * forward it to its own backend rpc verbatim and hand it straight to
@@ -1989,6 +2084,19 @@ interface PluginSdkApp {
1989
2084
  * docs/api_to_audit.md for what to audit before the prefix drops.
1990
2085
  */
1991
2086
  experimental_NewThreadComposer: ComponentType<NewThreadComposerProps>;
2087
+ /**
2088
+ * BB's controlled provider/model/reasoning picker. Provider changes emit
2089
+ * only after the new provider's verified defaults and capabilities resolve,
2090
+ * so `onChange` always receives one coherent value. Experimental: see
2091
+ * docs/api_to_audit.md.
2092
+ */
2093
+ experimental_ProviderModelPicker: ComponentType<ExperimentalProviderModelPickerProps>;
2094
+ /**
2095
+ * BB's controlled permission-mode picker. The host resolves provider
2096
+ * capabilities and the routed machine's permission ceiling. Experimental:
2097
+ * see docs/api_to_audit.md.
2098
+ */
2099
+ experimental_PermissionModePicker: ComponentType<ExperimentalPermissionModePickerProps>;
1992
2100
  /**
1993
2101
  * The host-owned source viewer (see {@link SourceCodeProps}). Renders
1994
2102
  * supplied source text with BB's syntax highlighting, gutters, and live code
@@ -2014,6 +2122,8 @@ declare const Markdown: react.ComponentType<MarkdownProps>;
2014
2122
  declare const experimental_FileLink: react.ComponentType<ExperimentalFileLinkProps>;
2015
2123
  declare const experimental_UrlLink: react.ComponentType<ExperimentalUrlLinkProps>;
2016
2124
  declare const experimental_NewThreadComposer: react.ComponentType<NewThreadComposerProps>;
2125
+ declare const experimental_ProviderModelPicker: react.ComponentType<ExperimentalProviderModelPickerProps>;
2126
+ declare const experimental_PermissionModePicker: react.ComponentType<ExperimentalPermissionModePickerProps>;
2017
2127
  declare const experimental_SourceCode: react.ComponentType<SourceCodeProps>;
2018
2128
  declare const experimental_Diff: react.ComponentType<DiffProps>;
2019
2129
  declare const useRpc: <Contract extends PluginRpcContract = Readonly<Record<string, PluginRpcMethodContract<StandardSchemaV1<unknown, unknown>, StandardSchemaV1<unknown, unknown>>>>>() => PluginRpcClient<Contract>;
@@ -2032,5 +2142,5 @@ declare const experimental_useSidebarThreadPullRequest: (threadId: string) => Pl
2032
2142
  declare const experimental_useSidebarThreadSplit: (threadId: string) => PluginSidebarThreadSplit;
2033
2143
  declare const experimental_useProviders: () => PluginProvidersState;
2034
2144
 
2035
- export { Markdown, ThreadChat, definePluginApp, experimental_Diff, experimental_FileLink, experimental_NewThreadComposer, experimental_SourceCode, experimental_UrlLink, experimental_useAppPanel, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useRealtime, useRealtimeConnectionState, useRpc, useSettings };
2036
- export type { BbContext, BbNavigate, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPluginFixedTabDeclaration, ExperimentalPluginFixedTabReference, ExperimentalPluginFixedTabRegistration, ExperimentalUrlLinkProps, JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, 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, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps };
2145
+ export { Markdown, ThreadChat, definePluginApp, experimental_Diff, experimental_FileLink, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderModelPicker, experimental_SourceCode, experimental_UrlLink, experimental_useAppPanel, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useRealtime, useRealtimeConnectionState, useRpc, useSettings };
2146
+ export type { BbContext, BbNavigate, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabDeclaration, ExperimentalPluginFixedTabReference, ExperimentalPluginFixedTabRegistration, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalUrlLinkProps, 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, 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, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps };
@@ -5,7 +5,7 @@
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 { PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginProviderIconRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
8
+ import { PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginCommandPaletteActionRegistration, PluginProviderIconRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
9
9
 
10
10
  /** Validated registrations produced by one plugin app setup execution. */
11
11
  interface CollectedPluginAppRegistrations {
@@ -24,6 +24,7 @@ interface CollectedPluginAppRegistrations {
24
24
  diffRenderers: PluginDiffRendererRegistration[];
25
25
  messageDirectives: PluginMessageDirectiveRegistration[];
26
26
  messageActions: PluginMessageActionRegistration[];
27
+ commandPaletteActions: PluginCommandPaletteActionRegistration[];
27
28
  providerIcons: PluginProviderIconRegistration[];
28
29
  contentScripts: PluginContentScriptRegistration[];
29
30
  }
@@ -2356,6 +2356,10 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2356
2356
  clientRequestId: z.ZodString;
2357
2357
  kind: z.ZodLiteral<"input.accepted">;
2358
2358
  providerTurnId: z.ZodOptional<z.ZodString>;
2359
+ }, z.core.$strip>, z.ZodObject<{
2360
+ kind: z.ZodLiteral<"input.provider">;
2361
+ parentRef: z.ZodOptional<z.ZodString>;
2362
+ text: z.ZodString;
2359
2363
  }, z.core.$strip>, z.ZodObject<{
2360
2364
  kind: z.ZodLiteral<"turn.open">;
2361
2365
  parentRef: z.ZodOptional<z.ZodString>;
@@ -3398,6 +3398,10 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3398
3398
  clientRequestId: z.ZodString;
3399
3399
  kind: z.ZodLiteral<"input.accepted">;
3400
3400
  providerTurnId: z.ZodOptional<z.ZodString>;
3401
+ }, z.core.$strip>, z.ZodObject<{
3402
+ kind: z.ZodLiteral<"input.provider">;
3403
+ parentRef: z.ZodOptional<z.ZodString>;
3404
+ text: z.ZodString;
3401
3405
  }, z.core.$strip>, z.ZodObject<{
3402
3406
  kind: z.ZodLiteral<"turn.open">;
3403
3407
  parentRef: z.ZodOptional<z.ZodString>;
@@ -4178,6 +4182,10 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
4178
4182
  clientRequestId: z.ZodString;
4179
4183
  kind: z.ZodLiteral<"input.accepted">;
4180
4184
  providerTurnId: z.ZodOptional<z.ZodString>;
4185
+ }, z.core.$strip>, z.ZodObject<{
4186
+ kind: z.ZodLiteral<"input.provider">;
4187
+ parentRef: z.ZodOptional<z.ZodString>;
4188
+ text: z.ZodString;
4181
4189
  }, z.core.$strip>, z.ZodObject<{
4182
4190
  kind: z.ZodLiteral<"turn.open">;
4183
4191
  parentRef: z.ZodOptional<z.ZodString>;
@@ -41,6 +41,7 @@ declare const appKeybindingOverridesSchema: z$1.ZodArray<z$1.ZodObject<{
41
41
  "modelPicker.cycleReasoning": "modelPicker.cycleReasoning";
42
42
  "modelPicker.cycleReasoningBackward": "modelPicker.cycleReasoningBackward";
43
43
  "modelPicker.toggle": "modelPicker.toggle";
44
+ "palette.open": "palette.open";
44
45
  "pane.close": "pane.close";
45
46
  "pane.focus.1": "pane.focus.1";
46
47
  "pane.focus.2": "pane.focus.2";
@@ -172,6 +173,37 @@ declare const changedMessageSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
172
173
  eventTypes: z$1.ZodOptional<z$1.ZodReadonly<z$1.ZodArray<z$1.ZodString & z$1.ZodType<"client/thread/start" | "client/turn/rejected" | "client/turn/requested" | "client/turn/start" | "item/agentMessage/delta" | "item/backgroundTask/completed" | "item/backgroundTask/progress" | "item/commandExecution/outputDelta" | "item/completed" | "item/delegation/completed" | "item/delegation/progress" | "item/fileChange/outputDelta" | "item/mcpToolCall/progress" | "item/plan/delta" | "item/reasoning/summaryTextDelta" | "item/reasoning/textDelta" | "item/started" | "item/toolCall/progress" | "provider/error" | "provider/modelFallback" | "provider/rateLimits/updated" | "provider/unhandled" | "provider/warning" | "system/error" | "system/manager/user_message" | "system/operation" | "system/permissionGrant/lifecycle" | "system/provider-turn-watchdog" | "system/thread-provisioning" | "system/thread/interrupted" | "system/userQuestion/lifecycle" | "thread/compacted" | "thread/context/cleared" | "thread/contextWindowUsage/updated" | "thread/extensionState/updated" | "thread/goal/cleared" | "thread/goal/updated" | "thread/identity" | "thread/name/updated" | "thread/started" | "thread/tokenUsage/updated" | "turn/completed" | "turn/diff/updated" | "turn/input/accepted" | "turn/plan/updated" | "turn/started", string, z$1.core.$ZodTypeInternals<"client/thread/start" | "client/turn/rejected" | "client/turn/requested" | "client/turn/start" | "item/agentMessage/delta" | "item/backgroundTask/completed" | "item/backgroundTask/progress" | "item/commandExecution/outputDelta" | "item/completed" | "item/delegation/completed" | "item/delegation/progress" | "item/fileChange/outputDelta" | "item/mcpToolCall/progress" | "item/plan/delta" | "item/reasoning/summaryTextDelta" | "item/reasoning/textDelta" | "item/started" | "item/toolCall/progress" | "provider/error" | "provider/modelFallback" | "provider/rateLimits/updated" | "provider/unhandled" | "provider/warning" | "system/error" | "system/manager/user_message" | "system/operation" | "system/permissionGrant/lifecycle" | "system/provider-turn-watchdog" | "system/thread-provisioning" | "system/thread/interrupted" | "system/userQuestion/lifecycle" | "thread/compacted" | "thread/context/cleared" | "thread/contextWindowUsage/updated" | "thread/extensionState/updated" | "thread/goal/cleared" | "thread/goal/updated" | "thread/identity" | "thread/name/updated" | "thread/started" | "thread/tokenUsage/updated" | "turn/completed" | "turn/diff/updated" | "turn/input/accepted" | "turn/plan/updated" | "turn/started", string>>>>>;
173
174
  hasPendingInteraction: z$1.ZodOptional<z$1.ZodBoolean>;
174
175
  projectId: z$1.ZodOptional<z$1.ZodString>;
176
+ statusChange: z$1.ZodOptional<z$1.ZodObject<{
177
+ activity: z$1.ZodObject<{
178
+ activeBackgroundAgentCount: z$1.ZodNumber;
179
+ activeBackgroundCommandCount: z$1.ZodNumber;
180
+ activeGoalCount: z$1.ZodNumber;
181
+ activePlanModeCount: z$1.ZodNumber;
182
+ activeWorkflowCount: z$1.ZodNumber;
183
+ }, z$1.core.$strip>;
184
+ latestAttentionAt: z$1.ZodNumber;
185
+ runtime: z$1.ZodObject<{
186
+ displayStatus: z$1.ZodEnum<{
187
+ "host-reconnecting": "host-reconnecting";
188
+ "waiting-for-host": "waiting-for-host";
189
+ active: "active";
190
+ error: "error";
191
+ idle: "idle";
192
+ provisioning: "provisioning";
193
+ starting: "starting";
194
+ stopping: "stopping";
195
+ }>;
196
+ hostReconnectGraceExpiresAt: z$1.ZodNullable<z$1.ZodNumber>;
197
+ }, z$1.core.$strip>;
198
+ status: z$1.ZodEnum<{
199
+ active: "active";
200
+ error: "error";
201
+ idle: "idle";
202
+ starting: "starting";
203
+ stopping: "stopping";
204
+ }>;
205
+ updatedAt: z$1.ZodNumber;
206
+ }, z$1.core.$strict>>;
175
207
  }, z$1.core.$strict>>;
176
208
  type: z$1.ZodLiteral<"changed">;
177
209
  }, z$1.core.$strict>, z$1.ZodObject<{
@@ -4821,6 +4853,7 @@ declare const hostDaemonCommandRegistry: {
4821
4853
  }, z$1.core.$strip>>;
4822
4854
  environmentId: z$1.ZodString;
4823
4855
  fork: z$1.ZodOptional<z$1.ZodObject<{
4856
+ sourceProviderCheckpointId: z$1.ZodOptional<z$1.ZodString>;
4824
4857
  sourceProviderThreadId: z$1.ZodString;
4825
4858
  }, z$1.core.$strip>>;
4826
4859
  injectedSkillSources: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
@@ -8854,6 +8887,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
8854
8887
  "modelPicker.cycleReasoning": "modelPicker.cycleReasoning";
8855
8888
  "modelPicker.cycleReasoningBackward": "modelPicker.cycleReasoningBackward";
8856
8889
  "modelPicker.toggle": "modelPicker.toggle";
8890
+ "palette.open": "palette.open";
8857
8891
  "pane.close": "pane.close";
8858
8892
  "pane.focus.1": "pane.focus.1";
8859
8893
  "pane.focus.2": "pane.focus.2";
@@ -8973,6 +9007,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
8973
9007
  "modelPicker.cycleReasoning": "modelPicker.cycleReasoning";
8974
9008
  "modelPicker.cycleReasoningBackward": "modelPicker.cycleReasoningBackward";
8975
9009
  "modelPicker.toggle": "modelPicker.toggle";
9010
+ "palette.open": "palette.open";
8976
9011
  "pane.close": "pane.close";
8977
9012
  "pane.focus.1": "pane.focus.1";
8978
9013
  "pane.focus.2": "pane.focus.2";
@@ -9043,6 +9078,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
9043
9078
  "modelPicker.cycleReasoning": "modelPicker.cycleReasoning";
9044
9079
  "modelPicker.cycleReasoningBackward": "modelPicker.cycleReasoningBackward";
9045
9080
  "modelPicker.toggle": "modelPicker.toggle";
9081
+ "palette.open": "palette.open";
9046
9082
  "pane.close": "pane.close";
9047
9083
  "pane.focus.1": "pane.focus.1";
9048
9084
  "pane.focus.2": "pane.focus.2";
@@ -13380,6 +13416,45 @@ interface PluginMessageActionRegistration {
13380
13416
  */
13381
13417
  run(context: PluginMessageActionContext): void | Promise<void>;
13382
13418
  }
13419
+ /** Context handed to a `commandPaletteAction`'s `isAvailable` and `run`. */
13420
+ interface PluginCommandPaletteActionContext {
13421
+ /** The thread in view, or null on a surface without one. */
13422
+ threadId: string | null;
13423
+ projectId: string | null;
13424
+ /**
13425
+ * Open one of this plugin's `threadPanelAction` components in the current
13426
+ * thread's side panel, exactly as `messageAction`'s `openPanel` does.
13427
+ *
13428
+ * Returns true when the host accepted the open; false when it declined —
13429
+ * `params` was not a JSON value, the action id names no `threadPanelAction`
13430
+ * of this plugin, or the surface has no side panel. Only the main thread
13431
+ * view has one, and the palette opens anywhere, so guard with `isAvailable`
13432
+ * rather than assuming.
13433
+ */
13434
+ openPanel(options: PluginTargetedPanelActionOpenOptions): boolean;
13435
+ }
13436
+ /**
13437
+ * A row in bb's quick palette (Mod+Shift+P), listed under the plugin's name
13438
+ * beside bb's own commands. Host-rendered: the plugin supplies a title and
13439
+ * `run`, and the host owns matching, ordering, and recency.
13440
+ */
13441
+ interface PluginCommandPaletteActionRegistration {
13442
+ /** Unique within the plugin; letters, digits, `-`, `_`. */
13443
+ id: string;
13444
+ /** The row's label, e.g. "Linear: open issue for this thread". */
13445
+ title: string;
13446
+ /**
13447
+ * Hide the row when it cannot do anything — typically when it needs a thread
13448
+ * and there is none. Called while the palette is open; keep it cheap and
13449
+ * synchronous. Omitted means always listed.
13450
+ */
13451
+ isAvailable?(context: PluginCommandPaletteActionContext): boolean;
13452
+ /**
13453
+ * Runs after the palette closes and focus is restored. Errors (sync or
13454
+ * async) are contained and logged; they never break the palette.
13455
+ */
13456
+ run(context: PluginCommandPaletteActionContext): void | Promise<void>;
13457
+ }
13383
13458
  /**
13384
13459
  * Supply the inline React mark bb draws for one agent provider.
13385
13460
  *
@@ -13450,6 +13525,11 @@ interface PluginAppSlots {
13450
13525
  experimental_diffRenderer(registration: PluginDiffRendererRegistration): void;
13451
13526
  messageDirective(registration: PluginMessageDirectiveRegistration): void;
13452
13527
  messageAction(registration: PluginMessageActionRegistration): void;
13528
+ /**
13529
+ * Add a row to the quick palette (see
13530
+ * {@link PluginCommandPaletteActionRegistration}).
13531
+ */
13532
+ commandPaletteAction(registration: PluginCommandPaletteActionRegistration): void;
13453
13533
  /**
13454
13534
  * Draw one agent provider's icon with an inline React component instead of
13455
13535
  * its `<img>`-rendered logo file (see
@@ -13774,6 +13854,57 @@ interface ThreadChatProps {
13774
13854
  */
13775
13855
  messageActions?: readonly ThreadChatMessageAction[];
13776
13856
  }
13857
+ /** The controlled execution selection resolved by the picker. */
13858
+ interface ExperimentalProviderModelPickerValue {
13859
+ providerId: string;
13860
+ model: string;
13861
+ reasoningLevel: ReasoningLevel;
13862
+ /** Present only when the selected provider supports service tiers. */
13863
+ serviceTier?: ServiceTier;
13864
+ }
13865
+ /** Where the picker resolves the live provider and model catalog. */
13866
+ type ExperimentalProviderModelPickerRouting = {
13867
+ kind: "host";
13868
+ hostId: string;
13869
+ } | {
13870
+ kind: "environment";
13871
+ environmentId: string;
13872
+ };
13873
+ /**
13874
+ * Props of the host-owned `experimental_ProviderModelPicker` component.
13875
+ * Provider switches emit one coherent value after the live catalog resolves
13876
+ * its default model, reasoning level, and service-tier capability. Failed or
13877
+ * empty catalogs leave `value` unchanged. Omit `routing` to use bb's
13878
+ * primary-machine routing. Environment routing is required when a provider's
13879
+ * model catalog depends on the selected workspace.
13880
+ */
13881
+ interface ExperimentalProviderModelPickerProps {
13882
+ value: ExperimentalProviderModelPickerValue;
13883
+ onChange(value: ExperimentalProviderModelPickerValue): void;
13884
+ /** Route discovery through an explicit machine or existing environment. */
13885
+ routing?: ExperimentalProviderModelPickerRouting;
13886
+ /** Allow switching providers. Defaults to true; false hides provider tabs. */
13887
+ allowProviderChange?: boolean;
13888
+ /** Horizontal popover alignment. Defaults to `"start"`. */
13889
+ align?: "center" | "end" | "start";
13890
+ /** Render the shared selection summary without allowing changes. */
13891
+ disabled?: boolean;
13892
+ className?: string;
13893
+ }
13894
+ /** Props of BB's controlled, host-resolved permission-mode picker. */
13895
+ interface ExperimentalPermissionModePickerProps {
13896
+ /** Provider whose supported modes determine the available choices. */
13897
+ providerId: string;
13898
+ value: PermissionMode;
13899
+ onChange(value: PermissionMode): void;
13900
+ /** Route capability and machine-ceiling resolution like the execution picker. */
13901
+ routing?: ExperimentalProviderModelPickerRouting;
13902
+ /** Horizontal menu alignment. Defaults to `"end"`. */
13903
+ align?: "center" | "end" | "start";
13904
+ /** Render the resolved mode without allowing changes. */
13905
+ disabled?: boolean;
13906
+ className?: string;
13907
+ }
13777
13908
  /**
13778
13909
  * Every selection the composer resolved, JSON-serializable so a plugin can
13779
13910
  * forward it to its own backend rpc verbatim and hand it straight to
@@ -14137,6 +14268,19 @@ interface PluginSdkApp {
14137
14268
  * docs/api_to_audit.md for what to audit before the prefix drops.
14138
14269
  */
14139
14270
  experimental_NewThreadComposer: ComponentType<NewThreadComposerProps>;
14271
+ /**
14272
+ * BB's controlled provider/model/reasoning picker. Provider changes emit
14273
+ * only after the new provider's verified defaults and capabilities resolve,
14274
+ * so `onChange` always receives one coherent value. Experimental: see
14275
+ * docs/api_to_audit.md.
14276
+ */
14277
+ experimental_ProviderModelPicker: ComponentType<ExperimentalProviderModelPickerProps>;
14278
+ /**
14279
+ * BB's controlled permission-mode picker. The host resolves provider
14280
+ * capabilities and the routed machine's permission ceiling. Experimental:
14281
+ * see docs/api_to_audit.md.
14282
+ */
14283
+ experimental_PermissionModePicker: ComponentType<ExperimentalPermissionModePickerProps>;
14140
14284
  /**
14141
14285
  * The host-owned source viewer (see {@link SourceCodeProps}). Renders
14142
14286
  * supplied source text with BB's syntax highlighting, gutters, and live code
@@ -16538,4 +16682,4 @@ interface BbPluginApi {
16538
16682
  }
16539
16683
 
16540
16684
  export { PLUGIN_CLI_OUTPUT_MAX_BYTES, defineRpcContract, experimental_defineHostEntry };
16541
- 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, ExperimentalPluginFixedTabDeclaration, ExperimentalPluginFixedTabReference, ExperimentalPluginFixedTabRegistration, ExperimentalUrlLinkProps, JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolExperimentalStatusLabels, PluginAgentToolPresentation, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginCli, PluginCliCommandInfo, PluginCliContext, PluginCliExecutionResult, PluginCliOutputLimitError, PluginCliRegistration, PluginCliResult, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, 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, 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, PluginUi, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps };
16685
+ 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, ExperimentalPluginFixedTabDeclaration, ExperimentalPluginFixedTabReference, ExperimentalPluginFixedTabRegistration, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalUrlLinkProps, JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolExperimentalStatusLabels, PluginAgentToolPresentation, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, 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, 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, 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, PluginUi, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps };
package/dist/app.js CHANGED
@@ -6,6 +6,8 @@ var Markdown = runtime.Markdown;
6
6
  var experimental_FileLink = runtime.experimental_FileLink;
7
7
  var experimental_UrlLink = runtime.experimental_UrlLink;
8
8
  var experimental_NewThreadComposer = runtime.experimental_NewThreadComposer;
9
+ var experimental_ProviderModelPicker = runtime.experimental_ProviderModelPicker;
10
+ var experimental_PermissionModePicker = runtime.experimental_PermissionModePicker;
9
11
  var experimental_SourceCode = runtime.experimental_SourceCode;
10
12
  var experimental_Diff = runtime.experimental_Diff;
11
13
  var useRpc = runtime.useRpc;
@@ -30,6 +32,8 @@ export {
30
32
  experimental_Diff,
31
33
  experimental_FileLink,
32
34
  experimental_NewThreadComposer,
35
+ experimental_PermissionModePicker,
36
+ experimental_ProviderModelPicker,
33
37
  experimental_SourceCode,
34
38
  experimental_UrlLink,
35
39
  experimental_useAppPanel,
@@ -221,6 +221,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
221
221
  diffRenderers: [],
222
222
  messageDirectives: [],
223
223
  messageActions: [],
224
+ commandPaletteActions: [],
224
225
  providerIcons: [],
225
226
  contentScripts: []
226
227
  };
@@ -240,6 +241,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
240
241
  diffRenderer: /* @__PURE__ */ new Set(),
241
242
  messageDirective: /* @__PURE__ */ new Set(),
242
243
  messageAction: /* @__PURE__ */ new Set(),
244
+ commandPaletteAction: /* @__PURE__ */ new Set(),
243
245
  providerIcon: /* @__PURE__ */ new Set(),
244
246
  contentScript: /* @__PURE__ */ new Set()
245
247
  };
@@ -535,6 +537,23 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
535
537
  run: registration.run
536
538
  });
537
539
  },
540
+ commandPaletteAction(registration) {
541
+ const kind = "slots.commandPaletteAction";
542
+ const id = requireSlotId(kind, registration?.id);
543
+ requireUniqueId(kind, seenIds.commandPaletteAction, id);
544
+ if (typeof registration.run !== "function") {
545
+ throw new Error(`${kind}: "run" must be a function`);
546
+ }
547
+ if (registration.isAvailable !== void 0 && typeof registration.isAvailable !== "function") {
548
+ throw new Error(`${kind}: "isAvailable" must be a function`);
549
+ }
550
+ collected.commandPaletteActions.push({
551
+ id,
552
+ title: requireNonEmptyString(kind, "title", registration.title),
553
+ ...registration.isAvailable !== void 0 ? { isAvailable: registration.isAvailable } : {},
554
+ run: registration.run
555
+ });
556
+ },
538
557
  experimental_providerIcon(registration) {
539
558
  const kind = "slots.experimental_providerIcon";
540
559
  const providerId = requireProviderId(kind, registration?.providerId);
@@ -2893,6 +2893,20 @@ var threadDeltaSchema = z20.discriminatedUnion("kind", [
2893
2893
  clientRequestId: clientTurnRequestIdSchema,
2894
2894
  providerTurnId: providerTurnIdSchema.optional()
2895
2895
  }),
2896
+ /**
2897
+ * Input the provider itself injected into the conversation, with no bb
2898
+ * client request behind it (a pi extension's `sendMessage` custom message
2899
+ * that triggered or steered a turn). The assembler records it as a
2900
+ * `userMessage` item in the open turn so the transcript shows what the
2901
+ * model was answering. Dropped silently when no turn is open: the provider
2902
+ * appended it to its own context without running the agent, so there is no
2903
+ * bb turn to attach it to.
2904
+ */
2905
+ z20.object({
2906
+ kind: z20.literal("input.provider"),
2907
+ text: z20.string().min(1),
2908
+ parentRef: deltaKeyPartSchema.optional()
2909
+ }),
2896
2910
  /**
2897
2911
  * An explicit provider signal opened work (pi `agent_start`, codex
2898
2912
  * `turn/started`). With `providerTurnId` the turn lives in the keyed
@@ -4272,6 +4286,25 @@ function createDeltaAssembler(options) {
4272
4286
  state.pendingAccepted.push(delta.clientRequestId);
4273
4287
  return;
4274
4288
  }
4289
+ case "input.provider": {
4290
+ if (state.currentTurnId === void 0) {
4291
+ return;
4292
+ }
4293
+ const parentToolCallId = mapParentRef(state, delta.parentRef);
4294
+ events.push({
4295
+ type: "item/completed",
4296
+ threadId: UNSTAMPED_THREAD_ID,
4297
+ providerThreadId: "",
4298
+ scope: turnScope(state.currentTurnId),
4299
+ item: {
4300
+ type: "userMessage",
4301
+ id: mintItemId(),
4302
+ content: [{ type: "text", text: delta.text }],
4303
+ ...parentToolCallId === void 0 ? {} : { parentToolCallId }
4304
+ }
4305
+ });
4306
+ return;
4307
+ }
4275
4308
  case "turn.open": {
4276
4309
  if (delta.providerTurnId !== void 0) {
4277
4310
  const parentToolCallId = mapParentRef(state, delta.parentRef);