@get-bb/plugin-sdk 0.4.97 → 0.4.101
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 +88 -26
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +1 -0
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +61 -22
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +4 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +5 -0
- package/bundled-types/bb-plugin-sdk-testing.d.ts +3 -2
- package/bundled-types/bb-plugin-sdk.d.ts +557 -49
- package/dist/internal/host-policy.js +1 -0
- package/dist/provider-bridge-acp.js +8 -2
- package/dist/provider-bridge-testing.js +70 -3
- package/dist/provider-bridge.js +8 -2
- package/dist/testing/app.js +17 -0
- package/dist/testing/index.js +10 -6
- package/package.json +1 -1
|
@@ -192,6 +192,7 @@ declare const promptInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
192
192
|
}>;
|
|
193
193
|
trigger: z.ZodEnum<{
|
|
194
194
|
"/": "/";
|
|
195
|
+
$: "$";
|
|
195
196
|
}>;
|
|
196
197
|
}, z.core.$strip>, z.ZodObject<{
|
|
197
198
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -258,6 +259,7 @@ declare const providerInfoSchema: z.ZodObject<{
|
|
|
258
259
|
kind: z.ZodLiteral<"skills">;
|
|
259
260
|
trigger: z.ZodEnum<{
|
|
260
261
|
"/": "/";
|
|
262
|
+
$: "$";
|
|
261
263
|
}>;
|
|
262
264
|
}, z.core.$strip>, z.ZodObject<{
|
|
263
265
|
command: z.ZodObject<{
|
|
@@ -265,6 +267,7 @@ declare const providerInfoSchema: z.ZodObject<{
|
|
|
265
267
|
trailingText: z.ZodString;
|
|
266
268
|
trigger: z.ZodEnum<{
|
|
267
269
|
"/": "/";
|
|
270
|
+
$: "$";
|
|
268
271
|
}>;
|
|
269
272
|
}, z.core.$strip>;
|
|
270
273
|
kind: z.ZodLiteral<"plan">;
|
|
@@ -274,6 +277,7 @@ declare const providerInfoSchema: z.ZodObject<{
|
|
|
274
277
|
trailingText: z.ZodString;
|
|
275
278
|
trigger: z.ZodEnum<{
|
|
276
279
|
"/": "/";
|
|
280
|
+
$: "$";
|
|
277
281
|
}>;
|
|
278
282
|
}, z.core.$strip>;
|
|
279
283
|
kind: z.ZodLiteral<"goal">;
|
|
@@ -579,6 +583,34 @@ interface PluginThreadHeaderActionProps {
|
|
|
579
583
|
*/
|
|
580
584
|
isCompactViewport: boolean;
|
|
581
585
|
}
|
|
586
|
+
/** JavaScript world a Browser page expression runs in. */
|
|
587
|
+
type ExperimentalPluginBrowserPageWorld = "isolated" | "main";
|
|
588
|
+
interface ExperimentalPluginBrowserPageEvaluateOptions {
|
|
589
|
+
/**
|
|
590
|
+
* `isolated` (default) runs in a BB-owned world that shares the page DOM but
|
|
591
|
+
* not page globals, and binds `bb.postMessage(data)`. `main` runs beside the
|
|
592
|
+
* page's own scripts, where `bb` is `null`.
|
|
593
|
+
*/
|
|
594
|
+
world?: ExperimentalPluginBrowserPageWorld;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Script access to the top-level document of one Browser tab. Independent of
|
|
598
|
+
* CDP control leases: it never attaches a debugger or shows a control banner.
|
|
599
|
+
*/
|
|
600
|
+
interface ExperimentalPluginBrowserPage {
|
|
601
|
+
/**
|
|
602
|
+
* Evaluate a JavaScript expression and resolve its JSON-serialized value.
|
|
603
|
+
* Promises are awaited and `undefined` resolves to `null`. The expression
|
|
604
|
+
* can reference `bb`. Rejects when the tab is gone or the expression throws.
|
|
605
|
+
* Anything the expression installs is lost when the document navigates.
|
|
606
|
+
*/
|
|
607
|
+
evaluate(expression: string, options?: ExperimentalPluginBrowserPageEvaluateOptions): Promise<JsonValue$1>;
|
|
608
|
+
/**
|
|
609
|
+
* Subscribe to values this plugin's isolated-world scripts in this tab send
|
|
610
|
+
* with `bb.postMessage(data)`. Returns the unsubscribe function.
|
|
611
|
+
*/
|
|
612
|
+
onMessage(listener: (data: JsonValue$1) => void): () => void;
|
|
613
|
+
}
|
|
582
614
|
interface ExperimentalPluginBrowserToolbarActionProps {
|
|
583
615
|
/** Thread that owns the Browser tab. */
|
|
584
616
|
threadId: string;
|
|
@@ -588,6 +620,8 @@ interface ExperimentalPluginBrowserToolbarActionProps {
|
|
|
588
620
|
url: string;
|
|
589
621
|
/** True when the Browser chrome needs compact controls. */
|
|
590
622
|
isCompactViewport: boolean;
|
|
623
|
+
/** Script access to this tab's page; `null` outside the desktop app. */
|
|
624
|
+
experimental_page: ExperimentalPluginBrowserPage | null;
|
|
591
625
|
}
|
|
592
626
|
/**
|
|
593
627
|
* Where a file being opened by a `fileOpener` lives. `path` semantics follow
|
|
@@ -821,6 +855,23 @@ interface ExperimentalAppOverlayRegistration {
|
|
|
821
855
|
id: string;
|
|
822
856
|
component: ComponentType<ExperimentalAppOverlayProps>;
|
|
823
857
|
}
|
|
858
|
+
/**
|
|
859
|
+
* A name the host resolves to a glyph, in this order: a name any plugin
|
|
860
|
+
* registered with `app.experimental_icons.register()`, then a built-in BB icon
|
|
861
|
+
* name (`"Zap"`), then a namespaced `"<pluginId>/<name>"` glyph naming an
|
|
862
|
+
* entry of that plugin's manifest `bb.branding.experimental_icons` map. A
|
|
863
|
+
* registration therefore shadows a built-in, and either shadows a declared
|
|
864
|
+
* icon of the same name. Names that resolve to none of the three fall back to
|
|
865
|
+
* the surface's generic icon.
|
|
866
|
+
*
|
|
867
|
+
* Declared icons and registrations are one vocabulary here: the same name
|
|
868
|
+
* works in `experimental_Icon`, in every field below, and — for a declared
|
|
869
|
+
* icon — in the tool, provider and bridge-row declarations that accept one.
|
|
870
|
+
* Declared icons need no frontend bundle and survive the plugin being stopped;
|
|
871
|
+
* registrations can be any React component but live only while the plugin's
|
|
872
|
+
* app bundle is loaded.
|
|
873
|
+
*/
|
|
874
|
+
type BbIconName = string;
|
|
824
875
|
/**
|
|
825
876
|
* Owner-defined validator for a fixed tab's transient target. The host first
|
|
826
877
|
* verifies that the value is JSON-safe, then calls this validator before
|
|
@@ -845,8 +896,7 @@ type ExperimentalPluginFixedTabReference<Target extends JsonValue$1 = never> = {
|
|
|
845
896
|
/** A fixed tab declared by a plugin nav panel. */
|
|
846
897
|
type PluginFixedTabRegistration<Target extends JsonValue$1 = never> = ExperimentalPluginFixedTabReference<Target> & {
|
|
847
898
|
title: string;
|
|
848
|
-
|
|
849
|
-
icon: string;
|
|
899
|
+
icon: BbIconName;
|
|
850
900
|
component: ComponentType<PluginNavPanelProps>;
|
|
851
901
|
/** `flush` lets the component own padding and scrolling. */
|
|
852
902
|
layout?: "flush" | "padded";
|
|
@@ -857,8 +907,7 @@ interface PluginNavPanelRegistration {
|
|
|
857
907
|
/** Unique within the plugin; letters, digits, `-`, `_`. */
|
|
858
908
|
id: string;
|
|
859
909
|
title: string;
|
|
860
|
-
|
|
861
|
-
icon: string;
|
|
910
|
+
icon: BbIconName;
|
|
862
911
|
/** URL segment under `/plugins/<pluginId>/`; letters, digits, `-`, `_`. */
|
|
863
912
|
path: string;
|
|
864
913
|
component: ComponentType<PluginNavPanelProps>;
|
|
@@ -941,10 +990,10 @@ interface PluginThreadPanelActionRegistration {
|
|
|
941
990
|
/** Label of the action row in the panel's new-tab launcher. */
|
|
942
991
|
title: string;
|
|
943
992
|
/**
|
|
944
|
-
*
|
|
945
|
-
*
|
|
993
|
+
* Drawn only when the manifest declares no `bb.branding.icon`; the launcher
|
|
994
|
+
* row and opened tabs prefer that over this hint.
|
|
946
995
|
*/
|
|
947
|
-
icon?:
|
|
996
|
+
icon?: BbIconName;
|
|
948
997
|
/** Rendered inside every panel tab this action opens. */
|
|
949
998
|
component: ComponentType<PluginThreadPanelProps>;
|
|
950
999
|
/**
|
|
@@ -981,8 +1030,8 @@ interface PluginNewThreadPanelActionRegistration {
|
|
|
981
1030
|
id: string;
|
|
982
1031
|
/** Label of the action row in the panel's new-tab launcher. */
|
|
983
1032
|
title: string;
|
|
984
|
-
/**
|
|
985
|
-
icon?:
|
|
1033
|
+
/** Drawn only when the manifest declares no `bb.branding.icon`. */
|
|
1034
|
+
icon?: BbIconName;
|
|
986
1035
|
/** Rendered inside every panel tab this action opens. */
|
|
987
1036
|
component: ComponentType<PluginNewThreadPanelProps>;
|
|
988
1037
|
/** Host framing; matches `threadPanelAction`. */
|
|
@@ -1026,8 +1075,8 @@ interface PluginSidebarFooterActionRegistration {
|
|
|
1026
1075
|
id: string;
|
|
1027
1076
|
/** Tooltip and accessible label for the icon button. */
|
|
1028
1077
|
title: string;
|
|
1029
|
-
/**
|
|
1030
|
-
icon:
|
|
1078
|
+
/** Drawn only when the manifest declares no `bb.branding.icon`. */
|
|
1079
|
+
icon: BbIconName;
|
|
1031
1080
|
/**
|
|
1032
1081
|
* Runs when the user activates the action (e.g. call `openSettings()`,
|
|
1033
1082
|
* open a panel via other surfaces, toast). Errors (sync or async) are
|
|
@@ -1046,8 +1095,7 @@ interface ExperimentalSidebarFooterItemBase {
|
|
|
1046
1095
|
id: string;
|
|
1047
1096
|
/** Tooltip and accessible label for the host-rendered icon button. */
|
|
1048
1097
|
label: string;
|
|
1049
|
-
|
|
1050
|
-
icon: string;
|
|
1098
|
+
icon: BbIconName;
|
|
1051
1099
|
}
|
|
1052
1100
|
/** A sidebar-footer item that runs a callback when activated. */
|
|
1053
1101
|
interface ExperimentalSidebarFooterActionRegistration extends ExperimentalSidebarFooterItemBase {
|
|
@@ -1524,8 +1572,7 @@ interface PluginMessageActionRegistration {
|
|
|
1524
1572
|
id: string;
|
|
1525
1573
|
/** Tooltip / menu label for the action. */
|
|
1526
1574
|
title: string;
|
|
1527
|
-
|
|
1528
|
-
icon?: string;
|
|
1575
|
+
icon?: BbIconName;
|
|
1529
1576
|
/**
|
|
1530
1577
|
* Runs when the user activates the action. Errors (sync or async) are
|
|
1531
1578
|
* contained and logged; they never break the timeline.
|
|
@@ -1956,6 +2003,11 @@ interface ExperimentalProviderIconProps {
|
|
|
1956
2003
|
"aria-hidden"?: boolean | "false" | "true";
|
|
1957
2004
|
"aria-label"?: string;
|
|
1958
2005
|
}
|
|
2006
|
+
/**
|
|
2007
|
+
* An app icon registered by a plugin. The registry is app-wide: a registered
|
|
2008
|
+
* name is usable wherever a `BbIconName` is — `experimental_Icon`, and every
|
|
2009
|
+
* host-rendered surface that takes one — by this plugin or any other.
|
|
2010
|
+
*/
|
|
1959
2011
|
interface ExperimentalIconRegistration {
|
|
1960
2012
|
/** Shared app name. Namespacing is recommended, but not required. */
|
|
1961
2013
|
name: string;
|
|
@@ -1966,10 +2018,11 @@ interface ExperimentalIconRegistration {
|
|
|
1966
2018
|
}
|
|
1967
2019
|
interface ExperimentalAppIcons {
|
|
1968
2020
|
/**
|
|
1969
|
-
* Add or override an app icon during setup.
|
|
1970
|
-
*
|
|
1971
|
-
*
|
|
1972
|
-
*
|
|
2021
|
+
* Add or override an app icon during setup. A registered name shadows a
|
|
2022
|
+
* built-in of the same name. Returns nothing; the host replaces
|
|
2023
|
+
* registrations on reload and removes them on unload. Duplicate names within
|
|
2024
|
+
* a plugin reject setup. Between plugins, the first plugin id in lexical
|
|
2025
|
+
* order wins, independent of bundle load order.
|
|
1973
2026
|
*/
|
|
1974
2027
|
register(registration: ExperimentalIconRegistration): void;
|
|
1975
2028
|
}
|
|
@@ -2054,8 +2107,8 @@ interface ComposerCustomization {
|
|
|
2054
2107
|
interface ComposerPlusMenuItem {
|
|
2055
2108
|
id: string;
|
|
2056
2109
|
label: string;
|
|
2057
|
-
/**
|
|
2058
|
-
icon?:
|
|
2110
|
+
/** Drawn only when the manifest declares no `bb.branding.icon`. */
|
|
2111
|
+
icon?: BbIconName;
|
|
2059
2112
|
/** Accessible description for the host-rendered row. */
|
|
2060
2113
|
description?: string;
|
|
2061
2114
|
disabled?: boolean | ((view: ComposerView) => boolean);
|
|
@@ -2108,8 +2161,11 @@ interface PluginComposerTextEffect {
|
|
|
2108
2161
|
}
|
|
2109
2162
|
/** Host-rendered status that temporarily replaces a thread's draft glyph. */
|
|
2110
2163
|
interface PluginComposerThreadRowStatus {
|
|
2111
|
-
/**
|
|
2112
|
-
|
|
2164
|
+
/**
|
|
2165
|
+
* Always drawn as given: unlike the plugin-badged surfaces, this one has no
|
|
2166
|
+
* preference for the plugin's own `bb.branding.icon`.
|
|
2167
|
+
*/
|
|
2168
|
+
icon: BbIconName;
|
|
2113
2169
|
/** Accessible label for the status glyph. */
|
|
2114
2170
|
label: string;
|
|
2115
2171
|
/**
|
|
@@ -2178,6 +2234,13 @@ interface PluginComposerApi {
|
|
|
2178
2234
|
* content should be fetched fresh when the message is sent.
|
|
2179
2235
|
*/
|
|
2180
2236
|
insertMention(mention: PluginComposerMention): void;
|
|
2237
|
+
/** Remove this plugin's matching mention pills and their text from the current draft. */
|
|
2238
|
+
experimental_removeMention(mention: {
|
|
2239
|
+
provider: string;
|
|
2240
|
+
id: string;
|
|
2241
|
+
}): void;
|
|
2242
|
+
/** Subscribe to successful local submissions in this composer scope, including accepted queued messages. Failed sends and draft clearing do not notify. Dispose on unmount. */
|
|
2243
|
+
experimental_onSubmitted(listener: () => void): () => void;
|
|
2181
2244
|
/** Focus the composer caret at the end of the draft. */
|
|
2182
2245
|
focus(): void;
|
|
2183
2246
|
/**
|
|
@@ -2235,8 +2298,7 @@ interface ThreadChatMessageAction {
|
|
|
2235
2298
|
id: string;
|
|
2236
2299
|
/** Tooltip / menu label for the action. */
|
|
2237
2300
|
title: string;
|
|
2238
|
-
|
|
2239
|
-
icon?: string;
|
|
2301
|
+
icon?: BbIconName;
|
|
2240
2302
|
/**
|
|
2241
2303
|
* Message roles the action applies to. Omitted = both user and assistant
|
|
2242
2304
|
* messages.
|
|
@@ -2890,4 +2952,4 @@ declare const experimental_useProviders: () => PluginProvidersState;
|
|
|
2890
2952
|
declare const experimental_useCodeTheme: () => PluginCodeThemeState;
|
|
2891
2953
|
|
|
2892
2954
|
export { Markdown, ThreadChat, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_Icon, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderIcon, experimental_ProviderModelPicker, experimental_SourceCode, experimental_useAppPanel, experimental_useBranches, experimental_useCheckoutState, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useRealtime, useRealtimeConnectionState, useRpc, useSettings };
|
|
2893
|
-
export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderIconRegistration, PluginProvidersState, PluginRealtimeConnectionState, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|
|
2955
|
+
export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderIconRegistration, PluginProvidersState, PluginRealtimeConnectionState, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|
|
@@ -143,6 +143,7 @@ declare const threadResponseSchema: z.ZodObject<{
|
|
|
143
143
|
id: z.ZodString;
|
|
144
144
|
lastReadAt: z.ZodNullable<z.ZodNumber>;
|
|
145
145
|
latestAttentionAt: z.ZodNumber;
|
|
146
|
+
lifecycleOwnerThreadId: z.ZodNullable<z.ZodString>;
|
|
146
147
|
originKind: z.ZodNullable<z.ZodEnum<{
|
|
147
148
|
fork: "fork";
|
|
148
149
|
}>>;
|
|
@@ -252,6 +252,7 @@ declare const promptInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
252
252
|
}>;
|
|
253
253
|
trigger: z.ZodEnum<{
|
|
254
254
|
"/": "/";
|
|
255
|
+
$: "$";
|
|
255
256
|
}>;
|
|
256
257
|
}, z.core.$strip>, z.ZodObject<{
|
|
257
258
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -299,6 +300,21 @@ type CallerExecutionInputSource = z.infer<typeof callerExecutionInputSourceSchem
|
|
|
299
300
|
declare const PROVIDER_FORK_VALUES: readonly ["none", "tip", "checkpoint"];
|
|
300
301
|
type ProviderFork = (typeof PROVIDER_FORK_VALUES)[number];
|
|
301
302
|
|
|
303
|
+
declare const threadTurnInitiatorSchema: z.ZodEnum<{
|
|
304
|
+
agent: "agent";
|
|
305
|
+
system: "system";
|
|
306
|
+
user: "user";
|
|
307
|
+
}>;
|
|
308
|
+
type ThreadTurnInitiator = z.infer<typeof threadTurnInitiatorSchema>;
|
|
309
|
+
|
|
310
|
+
declare const threadCreateOriginSchema: z.ZodEnum<{
|
|
311
|
+
app: "app";
|
|
312
|
+
cli: "cli";
|
|
313
|
+
plugin: "plugin";
|
|
314
|
+
sdk: "sdk";
|
|
315
|
+
}>;
|
|
316
|
+
type ThreadCreateOrigin = z.infer<typeof threadCreateOriginSchema>;
|
|
317
|
+
|
|
302
318
|
declare const threadQueuedMessageSchema: z.ZodObject<{
|
|
303
319
|
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
304
320
|
mentions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -344,6 +360,7 @@ declare const threadQueuedMessageSchema: z.ZodObject<{
|
|
|
344
360
|
}>;
|
|
345
361
|
trigger: z.ZodEnum<{
|
|
346
362
|
"/": "/";
|
|
363
|
+
$: "$";
|
|
347
364
|
}>;
|
|
348
365
|
}, z.core.$strip>, z.ZodObject<{
|
|
349
366
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -392,6 +409,13 @@ declare const threadQueuedMessageSchema: z.ZodObject<{
|
|
|
392
409
|
user: "user";
|
|
393
410
|
}>;
|
|
394
411
|
model: z.ZodString;
|
|
412
|
+
origin: z.ZodNullable<z.ZodEnum<{
|
|
413
|
+
app: "app";
|
|
414
|
+
cli: "cli";
|
|
415
|
+
plugin: "plugin";
|
|
416
|
+
sdk: "sdk";
|
|
417
|
+
}>>;
|
|
418
|
+
originPluginId: z.ZodNullable<z.ZodString>;
|
|
395
419
|
payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
396
420
|
kind: z.ZodLiteral<"inline">;
|
|
397
421
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -446,22 +470,7 @@ declare const threadQueuedMessageSchema: z.ZodObject<{
|
|
|
446
470
|
}, z.core.$strip>;
|
|
447
471
|
type ThreadQueuedMessage = z.infer<typeof threadQueuedMessageSchema>;
|
|
448
472
|
|
|
449
|
-
declare const threadCreateOriginSchema: z.ZodEnum<{
|
|
450
|
-
app: "app";
|
|
451
|
-
cli: "cli";
|
|
452
|
-
plugin: "plugin";
|
|
453
|
-
sdk: "sdk";
|
|
454
|
-
}>;
|
|
455
|
-
type ThreadCreateOrigin = z.infer<typeof threadCreateOriginSchema>;
|
|
456
473
|
type ExecutionInputFieldSource = CallerExecutionInputSource;
|
|
457
|
-
declare const startedOnBehalfOfSchema: z.ZodObject<{
|
|
458
|
-
initiator: z.ZodEnum<{
|
|
459
|
-
agent: "agent";
|
|
460
|
-
system: "system";
|
|
461
|
-
}>;
|
|
462
|
-
senderThreadId: z.ZodString;
|
|
463
|
-
}, z.core.$strip>;
|
|
464
|
-
type StartedOnBehalfOf = z.infer<typeof startedOnBehalfOfSchema>;
|
|
465
474
|
declare const threadResponseSchema: z.ZodObject<{
|
|
466
475
|
activeBackgroundAgentCount: z.ZodNumber;
|
|
467
476
|
archivedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -472,6 +481,7 @@ declare const threadResponseSchema: z.ZodObject<{
|
|
|
472
481
|
id: z.ZodString;
|
|
473
482
|
lastReadAt: z.ZodNullable<z.ZodNumber>;
|
|
474
483
|
latestAttentionAt: z.ZodNumber;
|
|
484
|
+
lifecycleOwnerThreadId: z.ZodNullable<z.ZodString>;
|
|
475
485
|
originKind: z.ZodNullable<z.ZodEnum<{
|
|
476
486
|
fork: "fork";
|
|
477
487
|
}>>;
|
|
@@ -1013,8 +1023,26 @@ interface MessageDispatchHookContext {
|
|
|
1013
1023
|
/** Whether this attempt starts a turn or joins a running one. */
|
|
1014
1024
|
attempt: PluginDispatchAttemptKind;
|
|
1015
1025
|
/**
|
|
1016
|
-
* The
|
|
1017
|
-
*
|
|
1026
|
+
* The author category shared by this dispatch's messages: `user`, `agent`,
|
|
1027
|
+
* or `system`. `mixed` means the queued messages have different categories.
|
|
1028
|
+
* Different agents still share the `agent` category; read `queuedMessages`
|
|
1029
|
+
* for each message's author. `mixed` is a hook summary, not a turn initiator.
|
|
1030
|
+
*/
|
|
1031
|
+
initiator: ThreadTurnInitiator | "mixed";
|
|
1032
|
+
/**
|
|
1033
|
+
* The thread that sent every message in this dispatch: a thread id, null
|
|
1034
|
+
* when none of them has a sender, or the literal `"mixed"` when the rows
|
|
1035
|
+
* disagree. A thread-start names its requesting thread; a message a human
|
|
1036
|
+
* typed and a core-driven retry have no sender. Null therefore still means
|
|
1037
|
+
* "nobody sent this" rather than "bb could not tell", so a handler may key
|
|
1038
|
+
* a human-versus-agent policy on it; `queuedMessages` names each row's own
|
|
1039
|
+
* sender. Thread ids are prefixed, so no id collides with `"mixed"`.
|
|
1040
|
+
*/
|
|
1041
|
+
senderThreadId: string | "mixed" | null;
|
|
1042
|
+
/**
|
|
1043
|
+
* All queued rows this attempt is re-trying, in dispatch order. Empty for
|
|
1044
|
+
* an inline attempt. Each row retains its own content, author, and origin; `input`
|
|
1045
|
+
* contains their combined input, and the hook decides for the whole group.
|
|
1018
1046
|
*
|
|
1019
1047
|
* This is how a hook tells a fresh send from a re-attempt of something it
|
|
1020
1048
|
* already decided about — the replacement for the old
|
|
@@ -1022,7 +1050,7 @@ interface MessageDispatchHookContext {
|
|
|
1022
1050
|
* should treat the two identically; a hook that logs should not
|
|
1023
1051
|
* double-count.
|
|
1024
1052
|
*/
|
|
1025
|
-
|
|
1053
|
+
queuedMessages: ThreadQueuedMessage[];
|
|
1026
1054
|
/**
|
|
1027
1055
|
* Opaque JSON supplied by a plugin through the composer's
|
|
1028
1056
|
* `experimental_submit`, paired with that plugin's id. Null for ordinary
|
|
@@ -1033,10 +1061,15 @@ interface MessageDispatchHookContext {
|
|
|
1033
1061
|
pluginId: string;
|
|
1034
1062
|
data: JsonValue;
|
|
1035
1063
|
} | null;
|
|
1036
|
-
/**
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1064
|
+
/**
|
|
1065
|
+
* How the dispatch was requested; null for internal/core-driven sends, which
|
|
1066
|
+
* includes every follow-up, steer and retry. Persisted with the queued row,
|
|
1067
|
+
* so a drained re-attempt reads what its first attempt read. For a grouped
|
|
1068
|
+
* dispatch, each field is its shared value or `"mixed"` when rows differ,
|
|
1069
|
+
* including a value versus null. Each queued row exposes its own origin.
|
|
1070
|
+
*/
|
|
1071
|
+
origin: ThreadCreateOrigin | "mixed" | null;
|
|
1072
|
+
originPluginId: string | "mixed" | null;
|
|
1040
1073
|
parentThreadId: string | null;
|
|
1041
1074
|
}
|
|
1042
1075
|
/**
|
|
@@ -1546,6 +1579,12 @@ interface PluginMentionItem {
|
|
|
1546
1579
|
id: string;
|
|
1547
1580
|
title: string;
|
|
1548
1581
|
subtitle?: string;
|
|
1582
|
+
/**
|
|
1583
|
+
* BB icon name: a built-in name, or a name the plugin's app bundle
|
|
1584
|
+
* registered with `app.experimental_icons.register()`. The row prefers the
|
|
1585
|
+
* plugin's own branding icon when it ships one; unknown names fall back to
|
|
1586
|
+
* the generic plugin icon.
|
|
1587
|
+
*/
|
|
1549
1588
|
icon?: string;
|
|
1550
1589
|
}
|
|
1551
1590
|
/** Agent-only image context resolved with a plugin mention. */
|
|
@@ -3286,6 +3286,7 @@ declare const threadEventSchema: z.ZodPipe<z.ZodUnknown, z.ZodUnion<readonly [z.
|
|
|
3286
3286
|
core: z.ZodEnum<{
|
|
3287
3287
|
"machine-environment": "machine-environment";
|
|
3288
3288
|
"machine-git": "machine-git";
|
|
3289
|
+
"project-environment": "project-environment";
|
|
3289
3290
|
}>;
|
|
3290
3291
|
}, z.core.$strict>]>;
|
|
3291
3292
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -3445,6 +3446,7 @@ declare const threadEventSchema: z.ZodPipe<z.ZodUnknown, z.ZodUnion<readonly [z.
|
|
|
3445
3446
|
}>;
|
|
3446
3447
|
trigger: z.ZodEnum<{
|
|
3447
3448
|
"/": "/";
|
|
3449
|
+
$: "$";
|
|
3448
3450
|
}>;
|
|
3449
3451
|
}, z.core.$strip>, z.ZodObject<{
|
|
3450
3452
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -3526,6 +3528,7 @@ declare const threadEventSchema: z.ZodPipe<z.ZodUnknown, z.ZodUnion<readonly [z.
|
|
|
3526
3528
|
}>;
|
|
3527
3529
|
trigger: z.ZodEnum<{
|
|
3528
3530
|
"/": "/";
|
|
3531
|
+
$: "$";
|
|
3529
3532
|
}>;
|
|
3530
3533
|
}, z.core.$strip>, z.ZodObject<{
|
|
3531
3534
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -4065,6 +4068,7 @@ declare const promptInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4065
4068
|
}>;
|
|
4066
4069
|
trigger: z.ZodEnum<{
|
|
4067
4070
|
"/": "/";
|
|
4071
|
+
$: "$";
|
|
4068
4072
|
}>;
|
|
4069
4073
|
}, z.core.$strip>, z.ZodObject<{
|
|
4070
4074
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1375,6 +1375,7 @@ declare const permissionEscalationSchema: z.ZodEnum<{
|
|
|
1375
1375
|
type PermissionEscalation = z.infer<typeof permissionEscalationSchema>;
|
|
1376
1376
|
declare const promptMentionCommandTriggerSchema: z.ZodEnum<{
|
|
1377
1377
|
"/": "/";
|
|
1378
|
+
$: "$";
|
|
1378
1379
|
}>;
|
|
1379
1380
|
type PromptMentionCommandTrigger = z.infer<typeof promptMentionCommandTriggerSchema>;
|
|
1380
1381
|
declare const promptInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1421,6 +1422,7 @@ declare const promptInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1421
1422
|
}>;
|
|
1422
1423
|
trigger: z.ZodEnum<{
|
|
1423
1424
|
"/": "/";
|
|
1425
|
+
$: "$";
|
|
1424
1426
|
}>;
|
|
1425
1427
|
}, z.core.$strip>, z.ZodObject<{
|
|
1426
1428
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -4538,6 +4540,7 @@ declare const threadStartParamsSchema: z.ZodObject<{
|
|
|
4538
4540
|
}>;
|
|
4539
4541
|
trigger: z.ZodEnum<{
|
|
4540
4542
|
"/": "/";
|
|
4543
|
+
$: "$";
|
|
4541
4544
|
}>;
|
|
4542
4545
|
}, z.core.$strip>, z.ZodObject<{
|
|
4543
4546
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -4864,6 +4867,7 @@ declare const turnStartParamsSchema: z.ZodObject<{
|
|
|
4864
4867
|
}>;
|
|
4865
4868
|
trigger: z.ZodEnum<{
|
|
4866
4869
|
"/": "/";
|
|
4870
|
+
$: "$";
|
|
4867
4871
|
}>;
|
|
4868
4872
|
}, z.core.$strip>, z.ZodObject<{
|
|
4869
4873
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -4993,6 +4997,7 @@ declare const turnSteerParamsSchema: z.ZodObject<{
|
|
|
4993
4997
|
}>;
|
|
4994
4998
|
trigger: z.ZodEnum<{
|
|
4995
4999
|
"/": "/";
|
|
5000
|
+
$: "$";
|
|
4996
5001
|
}>;
|
|
4997
5002
|
}, z.core.$strip>, z.ZodObject<{
|
|
4998
5003
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -274,6 +274,7 @@ declare const threadResponseSchema: z.ZodObject<{
|
|
|
274
274
|
id: z.ZodString;
|
|
275
275
|
lastReadAt: z.ZodNullable<z.ZodNumber>;
|
|
276
276
|
latestAttentionAt: z.ZodNumber;
|
|
277
|
+
lifecycleOwnerThreadId: z.ZodNullable<z.ZodString>;
|
|
277
278
|
originKind: z.ZodNullable<z.ZodEnum<{
|
|
278
279
|
fork: "fork";
|
|
279
280
|
}>>;
|
|
@@ -1401,7 +1402,7 @@ type PluginAgentConfigurationContextOverrides = {
|
|
|
1401
1402
|
};
|
|
1402
1403
|
origin?: Partial<PluginAgentConfigurationContext["origin"]>;
|
|
1403
1404
|
};
|
|
1404
|
-
type MessageDispatchHookContextOverrides = Omit<Partial<MessageDispatchHookContext>, "environment" | "executionSources" | "host" | "input" | "project" | "
|
|
1405
|
+
type MessageDispatchHookContextOverrides = Omit<Partial<MessageDispatchHookContext>, "environment" | "executionSources" | "host" | "input" | "project" | "queuedMessages" | "requestedExecution" | "thread"> & {
|
|
1405
1406
|
thread?: Partial<MessageDispatchHookContext["thread"]>;
|
|
1406
1407
|
project?: Partial<MessageDispatchHookContext["project"]>;
|
|
1407
1408
|
environment?: Partial<NonNullable<MessageDispatchHookContext["environment"]>> | null;
|
|
@@ -1409,7 +1410,7 @@ type MessageDispatchHookContextOverrides = Omit<Partial<MessageDispatchHookConte
|
|
|
1409
1410
|
input?: Partial<MessageDispatchHookContext["input"]>;
|
|
1410
1411
|
requestedExecution?: Partial<MessageDispatchHookContext["requestedExecution"]>;
|
|
1411
1412
|
executionSources?: Partial<MessageDispatchHookContext["executionSources"]>;
|
|
1412
|
-
|
|
1413
|
+
queuedMessages?: Partial<MessageDispatchHookContext["queuedMessages"][number]>[];
|
|
1413
1414
|
};
|
|
1414
1415
|
/**
|
|
1415
1416
|
* A complete, deterministic host response for faking `bb.sdk.hosts.list()`
|