@get-bb/plugin-sdk 0.4.11 → 0.4.13
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.
- package/bundled-types/bb-plugin-sdk-app.d.ts +146 -7
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +4 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +8 -0
- package/bundled-types/bb-plugin-sdk.d.ts +179 -6
- package/dist/app.js +4 -0
- package/dist/internal/plugin-app-collector.js +19 -0
- package/dist/provider-bridge-testing.js +33 -0
- package/dist/provider-bridge.js +542 -523
- package/dist/testing/app.js +150 -0
- package/package.json +1 -1
|
@@ -479,6 +479,18 @@ interface SourceCodeLineRange {
|
|
|
479
479
|
start: number;
|
|
480
480
|
end: number;
|
|
481
481
|
}
|
|
482
|
+
/** One complete text side of a diff, resolved by the caller. */
|
|
483
|
+
interface ExperimentalDiffFileContent {
|
|
484
|
+
/** File path for this side. May differ between `old` and `new` for a rename. */
|
|
485
|
+
path: string;
|
|
486
|
+
/** Complete UTF-8 file contents, including unchanged lines outside the patch. */
|
|
487
|
+
content: string;
|
|
488
|
+
}
|
|
489
|
+
/** Complete text contents for both sides of a diff. */
|
|
490
|
+
interface ExperimentalDiffFullFileContents {
|
|
491
|
+
old: ExperimentalDiffFileContent;
|
|
492
|
+
new: ExperimentalDiffFileContent;
|
|
493
|
+
}
|
|
482
494
|
/**
|
|
483
495
|
* Props of the host-owned `experimental_SourceCode` component — BB's source
|
|
484
496
|
* viewer. The host owns syntax highlighting, gutters, wrapping, line-selection
|
|
@@ -504,8 +516,9 @@ interface SourceCodeProps {
|
|
|
504
516
|
* Props of the host-owned `experimental_Diff` component — BB's diff viewer.
|
|
505
517
|
* The host owns patch normalization (a patch without a `diff --git` header is
|
|
506
518
|
* completed from `path`), syntax highlighting, unified/split presentation,
|
|
507
|
-
* gutters, line-selection presentation,
|
|
508
|
-
* that cannot be parsed as a patch
|
|
519
|
+
* gutters, line-selection presentation, optional full-file context expansion,
|
|
520
|
+
* and the live BB code theme. Content that cannot be parsed as a patch
|
|
521
|
+
* degrades to plain monospace text.
|
|
509
522
|
*/
|
|
510
523
|
interface DiffProps {
|
|
511
524
|
/** Unified patch text for exactly ONE file. */
|
|
@@ -522,6 +535,12 @@ interface DiffProps {
|
|
|
522
535
|
overflow?: CodeOverflowMode;
|
|
523
536
|
/** Whether the gutter shows line numbers. Defaults to `true`. */
|
|
524
537
|
showLineNumbers?: boolean;
|
|
538
|
+
/**
|
|
539
|
+
* Complete text for both file sides. When present and consistent with the
|
|
540
|
+
* patch, BB enables expand-context controls between hunks. The caller owns
|
|
541
|
+
* loading these contents; omit the field to render from the patch alone.
|
|
542
|
+
*/
|
|
543
|
+
experimental_fullFileContents?: ExperimentalDiffFullFileContents;
|
|
525
544
|
/** Applied to the renderer's root element. */
|
|
526
545
|
className?: string;
|
|
527
546
|
}
|
|
@@ -544,7 +563,8 @@ interface PluginSourceCodeRendererProps {
|
|
|
544
563
|
}
|
|
545
564
|
/**
|
|
546
565
|
* Props passed to an `experimental_diffRenderer` component. `patch` is always
|
|
547
|
-
* a complete single-file unified patch, whatever shape the caller supplied
|
|
566
|
+
* a complete single-file unified patch, whatever shape the caller supplied,
|
|
567
|
+
* and optional full-file context is resolved to an object or `null`.
|
|
548
568
|
*/
|
|
549
569
|
interface PluginDiffRendererProps {
|
|
550
570
|
patch: string;
|
|
@@ -552,6 +572,14 @@ interface PluginDiffRendererProps {
|
|
|
552
572
|
view: DiffViewMode;
|
|
553
573
|
overflow: CodeOverflowMode;
|
|
554
574
|
showLineNumbers: boolean;
|
|
575
|
+
/**
|
|
576
|
+
* Caller-resolved text for both sides, or `null` when the caller supplied
|
|
577
|
+
* only the patch. A replacement can use this to implement context expansion,
|
|
578
|
+
* but must verify that the paths and hunk lines agree with `patch` before
|
|
579
|
+
* treating the contents as complete. BB's original renderer performs that
|
|
580
|
+
* verification when it mounts.
|
|
581
|
+
*/
|
|
582
|
+
experimental_fullFileContents: ExperimentalDiffFullFileContents | null;
|
|
555
583
|
/**
|
|
556
584
|
* BB's diff renderer, bound to this request. Render it to delegate
|
|
557
585
|
* conditionally without re-entering plugin replacement resolution.
|
|
@@ -1204,6 +1232,45 @@ interface PluginMessageActionRegistration {
|
|
|
1204
1232
|
*/
|
|
1205
1233
|
run(context: PluginMessageActionContext): void | Promise<void>;
|
|
1206
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
|
+
}
|
|
1207
1274
|
/**
|
|
1208
1275
|
* Supply the inline React mark bb draws for one agent provider.
|
|
1209
1276
|
*
|
|
@@ -1274,6 +1341,11 @@ interface PluginAppSlots {
|
|
|
1274
1341
|
experimental_diffRenderer(registration: PluginDiffRendererRegistration): void;
|
|
1275
1342
|
messageDirective(registration: PluginMessageDirectiveRegistration): void;
|
|
1276
1343
|
messageAction(registration: PluginMessageActionRegistration): void;
|
|
1344
|
+
/**
|
|
1345
|
+
* Add a row to the quick palette (see
|
|
1346
|
+
* {@link PluginCommandPaletteActionRegistration}).
|
|
1347
|
+
*/
|
|
1348
|
+
commandPaletteAction(registration: PluginCommandPaletteActionRegistration): void;
|
|
1277
1349
|
/**
|
|
1278
1350
|
* Draw one agent provider's icon with an inline React component instead of
|
|
1279
1351
|
* its `<img>`-rendered logo file (see
|
|
@@ -1598,6 +1670,57 @@ interface ThreadChatProps {
|
|
|
1598
1670
|
*/
|
|
1599
1671
|
messageActions?: readonly ThreadChatMessageAction[];
|
|
1600
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
|
+
}
|
|
1601
1724
|
/**
|
|
1602
1725
|
* Every selection the composer resolved, JSON-serializable so a plugin can
|
|
1603
1726
|
* forward it to its own backend rpc verbatim and hand it straight to
|
|
@@ -1961,6 +2084,19 @@ interface PluginSdkApp {
|
|
|
1961
2084
|
* docs/api_to_audit.md for what to audit before the prefix drops.
|
|
1962
2085
|
*/
|
|
1963
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>;
|
|
1964
2100
|
/**
|
|
1965
2101
|
* The host-owned source viewer (see {@link SourceCodeProps}). Renders
|
|
1966
2102
|
* supplied source text with BB's syntax highlighting, gutters, and live code
|
|
@@ -1970,8 +2106,9 @@ interface PluginSdkApp {
|
|
|
1970
2106
|
experimental_SourceCode: ComponentType<SourceCodeProps>;
|
|
1971
2107
|
/**
|
|
1972
2108
|
* The host-owned diff viewer (see {@link DiffProps}). Renders supplied patch
|
|
1973
|
-
* content with BB's normalization,
|
|
1974
|
-
* presentation, and live code theme, and
|
|
2109
|
+
* content with BB's normalization, optional full-file context expansion,
|
|
2110
|
+
* syntax highlighting, unified/split presentation, and live code theme, and
|
|
2111
|
+
* honours an active
|
|
1975
2112
|
* `experimental_diffRenderer` replacement. Experimental: see
|
|
1976
2113
|
* docs/api_to_audit.md.
|
|
1977
2114
|
*/
|
|
@@ -1985,6 +2122,8 @@ declare const Markdown: react.ComponentType<MarkdownProps>;
|
|
|
1985
2122
|
declare const experimental_FileLink: react.ComponentType<ExperimentalFileLinkProps>;
|
|
1986
2123
|
declare const experimental_UrlLink: react.ComponentType<ExperimentalUrlLinkProps>;
|
|
1987
2124
|
declare const experimental_NewThreadComposer: react.ComponentType<NewThreadComposerProps>;
|
|
2125
|
+
declare const experimental_ProviderModelPicker: react.ComponentType<ExperimentalProviderModelPickerProps>;
|
|
2126
|
+
declare const experimental_PermissionModePicker: react.ComponentType<ExperimentalPermissionModePickerProps>;
|
|
1988
2127
|
declare const experimental_SourceCode: react.ComponentType<SourceCodeProps>;
|
|
1989
2128
|
declare const experimental_Diff: react.ComponentType<DiffProps>;
|
|
1990
2129
|
declare const useRpc: <Contract extends PluginRpcContract = Readonly<Record<string, PluginRpcMethodContract<StandardSchemaV1<unknown, unknown>, StandardSchemaV1<unknown, unknown>>>>>() => PluginRpcClient<Contract>;
|
|
@@ -2003,5 +2142,5 @@ declare const experimental_useSidebarThreadPullRequest: (threadId: string) => Pl
|
|
|
2003
2142
|
declare const experimental_useSidebarThreadSplit: (threadId: string) => PluginSidebarThreadSplit;
|
|
2004
2143
|
declare const experimental_useProviders: () => PluginProvidersState;
|
|
2005
2144
|
|
|
2006
|
-
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 };
|
|
2007
|
-
export type { BbContext, BbNavigate, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppPanel, ExperimentalAppPanelSurface, 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";
|
|
@@ -12627,6 +12663,18 @@ interface SourceCodeLineRange {
|
|
|
12627
12663
|
start: number;
|
|
12628
12664
|
end: number;
|
|
12629
12665
|
}
|
|
12666
|
+
/** One complete text side of a diff, resolved by the caller. */
|
|
12667
|
+
interface ExperimentalDiffFileContent {
|
|
12668
|
+
/** File path for this side. May differ between `old` and `new` for a rename. */
|
|
12669
|
+
path: string;
|
|
12670
|
+
/** Complete UTF-8 file contents, including unchanged lines outside the patch. */
|
|
12671
|
+
content: string;
|
|
12672
|
+
}
|
|
12673
|
+
/** Complete text contents for both sides of a diff. */
|
|
12674
|
+
interface ExperimentalDiffFullFileContents {
|
|
12675
|
+
old: ExperimentalDiffFileContent;
|
|
12676
|
+
new: ExperimentalDiffFileContent;
|
|
12677
|
+
}
|
|
12630
12678
|
/**
|
|
12631
12679
|
* Props of the host-owned `experimental_SourceCode` component — BB's source
|
|
12632
12680
|
* viewer. The host owns syntax highlighting, gutters, wrapping, line-selection
|
|
@@ -12652,8 +12700,9 @@ interface SourceCodeProps {
|
|
|
12652
12700
|
* Props of the host-owned `experimental_Diff` component — BB's diff viewer.
|
|
12653
12701
|
* The host owns patch normalization (a patch without a `diff --git` header is
|
|
12654
12702
|
* completed from `path`), syntax highlighting, unified/split presentation,
|
|
12655
|
-
* gutters, line-selection presentation,
|
|
12656
|
-
* that cannot be parsed as a patch
|
|
12703
|
+
* gutters, line-selection presentation, optional full-file context expansion,
|
|
12704
|
+
* and the live BB code theme. Content that cannot be parsed as a patch
|
|
12705
|
+
* degrades to plain monospace text.
|
|
12657
12706
|
*/
|
|
12658
12707
|
interface DiffProps {
|
|
12659
12708
|
/** Unified patch text for exactly ONE file. */
|
|
@@ -12670,6 +12719,12 @@ interface DiffProps {
|
|
|
12670
12719
|
overflow?: CodeOverflowMode;
|
|
12671
12720
|
/** Whether the gutter shows line numbers. Defaults to `true`. */
|
|
12672
12721
|
showLineNumbers?: boolean;
|
|
12722
|
+
/**
|
|
12723
|
+
* Complete text for both file sides. When present and consistent with the
|
|
12724
|
+
* patch, BB enables expand-context controls between hunks. The caller owns
|
|
12725
|
+
* loading these contents; omit the field to render from the patch alone.
|
|
12726
|
+
*/
|
|
12727
|
+
experimental_fullFileContents?: ExperimentalDiffFullFileContents;
|
|
12673
12728
|
/** Applied to the renderer's root element. */
|
|
12674
12729
|
className?: string;
|
|
12675
12730
|
}
|
|
@@ -12692,7 +12747,8 @@ interface PluginSourceCodeRendererProps {
|
|
|
12692
12747
|
}
|
|
12693
12748
|
/**
|
|
12694
12749
|
* Props passed to an `experimental_diffRenderer` component. `patch` is always
|
|
12695
|
-
* a complete single-file unified patch, whatever shape the caller supplied
|
|
12750
|
+
* a complete single-file unified patch, whatever shape the caller supplied,
|
|
12751
|
+
* and optional full-file context is resolved to an object or `null`.
|
|
12696
12752
|
*/
|
|
12697
12753
|
interface PluginDiffRendererProps {
|
|
12698
12754
|
patch: string;
|
|
@@ -12700,6 +12756,14 @@ interface PluginDiffRendererProps {
|
|
|
12700
12756
|
view: DiffViewMode;
|
|
12701
12757
|
overflow: CodeOverflowMode;
|
|
12702
12758
|
showLineNumbers: boolean;
|
|
12759
|
+
/**
|
|
12760
|
+
* Caller-resolved text for both sides, or `null` when the caller supplied
|
|
12761
|
+
* only the patch. A replacement can use this to implement context expansion,
|
|
12762
|
+
* but must verify that the paths and hunk lines agree with `patch` before
|
|
12763
|
+
* treating the contents as complete. BB's original renderer performs that
|
|
12764
|
+
* verification when it mounts.
|
|
12765
|
+
*/
|
|
12766
|
+
experimental_fullFileContents: ExperimentalDiffFullFileContents | null;
|
|
12703
12767
|
/**
|
|
12704
12768
|
* BB's diff renderer, bound to this request. Render it to delegate
|
|
12705
12769
|
* conditionally without re-entering plugin replacement resolution.
|
|
@@ -13352,6 +13416,45 @@ interface PluginMessageActionRegistration {
|
|
|
13352
13416
|
*/
|
|
13353
13417
|
run(context: PluginMessageActionContext): void | Promise<void>;
|
|
13354
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
|
+
}
|
|
13355
13458
|
/**
|
|
13356
13459
|
* Supply the inline React mark bb draws for one agent provider.
|
|
13357
13460
|
*
|
|
@@ -13422,6 +13525,11 @@ interface PluginAppSlots {
|
|
|
13422
13525
|
experimental_diffRenderer(registration: PluginDiffRendererRegistration): void;
|
|
13423
13526
|
messageDirective(registration: PluginMessageDirectiveRegistration): void;
|
|
13424
13527
|
messageAction(registration: PluginMessageActionRegistration): void;
|
|
13528
|
+
/**
|
|
13529
|
+
* Add a row to the quick palette (see
|
|
13530
|
+
* {@link PluginCommandPaletteActionRegistration}).
|
|
13531
|
+
*/
|
|
13532
|
+
commandPaletteAction(registration: PluginCommandPaletteActionRegistration): void;
|
|
13425
13533
|
/**
|
|
13426
13534
|
* Draw one agent provider's icon with an inline React component instead of
|
|
13427
13535
|
* its `<img>`-rendered logo file (see
|
|
@@ -13746,6 +13854,57 @@ interface ThreadChatProps {
|
|
|
13746
13854
|
*/
|
|
13747
13855
|
messageActions?: readonly ThreadChatMessageAction[];
|
|
13748
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
|
+
}
|
|
13749
13908
|
/**
|
|
13750
13909
|
* Every selection the composer resolved, JSON-serializable so a plugin can
|
|
13751
13910
|
* forward it to its own backend rpc verbatim and hand it straight to
|
|
@@ -14109,6 +14268,19 @@ interface PluginSdkApp {
|
|
|
14109
14268
|
* docs/api_to_audit.md for what to audit before the prefix drops.
|
|
14110
14269
|
*/
|
|
14111
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>;
|
|
14112
14284
|
/**
|
|
14113
14285
|
* The host-owned source viewer (see {@link SourceCodeProps}). Renders
|
|
14114
14286
|
* supplied source text with BB's syntax highlighting, gutters, and live code
|
|
@@ -14118,8 +14290,9 @@ interface PluginSdkApp {
|
|
|
14118
14290
|
experimental_SourceCode: ComponentType<SourceCodeProps>;
|
|
14119
14291
|
/**
|
|
14120
14292
|
* The host-owned diff viewer (see {@link DiffProps}). Renders supplied patch
|
|
14121
|
-
* content with BB's normalization,
|
|
14122
|
-
* presentation, and live code theme, and
|
|
14293
|
+
* content with BB's normalization, optional full-file context expansion,
|
|
14294
|
+
* syntax highlighting, unified/split presentation, and live code theme, and
|
|
14295
|
+
* honours an active
|
|
14123
14296
|
* `experimental_diffRenderer` replacement. Experimental: see
|
|
14124
14297
|
* docs/api_to_audit.md.
|
|
14125
14298
|
*/
|
|
@@ -16509,4 +16682,4 @@ interface BbPluginApi {
|
|
|
16509
16682
|
}
|
|
16510
16683
|
|
|
16511
16684
|
export { PLUGIN_CLI_OUTPUT_MAX_BYTES, defineRpcContract, experimental_defineHostEntry };
|
|
16512
|
-
export type { BbContext, BbNavigate, BbPluginApi, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppPanel, ExperimentalAppPanelSurface, 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,
|