@get-bb/plugin-sdk 0.6.125 → 0.6.132
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 +211 -64
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +10 -1
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-internal-thread-status.d.ts +2 -3
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +6 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +2 -0
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +8 -1
- package/bundled-types/bb-plugin-sdk-testing.d.ts +10 -1
- package/bundled-types/bb-plugin-sdk.d.ts +222 -67
- package/dist/app.js +10 -6
- package/dist/internal/host-policy.js +7 -0
- package/dist/internal/plugin-app-collector.js +11 -0
- package/dist/internal/rpc-query-host.js +3 -3
- package/dist/internal/thread-status.js +2 -6
- package/dist/provider-bridge-acp-next.js +211 -450
- package/dist/provider-bridge-acp.js +211 -450
- package/dist/provider-bridge-testing.js +17 -11
- package/dist/provider-bridge.js +63 -29
- package/dist/testing/app.js +44 -9
- package/dist/testing/index.js +8 -0
- package/package.json +18 -18
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and read the real source: https://github.com/get-bb/bb
|
|
7
7
|
|
|
8
8
|
import * as _get_bb_plugin_sdk from '@get-bb/plugin-sdk';
|
|
9
|
-
import { ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterItemRegistration, PluginSidebarFooterActionRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationPlacement, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadContextCardRowRegistration, ExperimentalThreadContextCardSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalMessageMetadataRegistration, PluginCommandRegistration, ExperimentalComposerCommandRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
|
|
9
|
+
import { ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterItemRegistration, PluginSidebarFooterActionRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, InternalDoNotUseSetupGuideSectionRegistration, PluginNavPanelRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationPlacement, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadContextCardRowRegistration, ExperimentalThreadContextCardSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalMessageMetadataRegistration, PluginCommandRegistration, ExperimentalComposerCommandRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
|
|
10
10
|
import { ComponentType } from 'react';
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
|
|
@@ -94,6 +94,7 @@ interface CollectedPluginAppRegistrations {
|
|
|
94
94
|
homepageSections: PluginHomepageSectionRegistration[];
|
|
95
95
|
settingsSections: PluginSettingsSectionRegistration[];
|
|
96
96
|
appOverlays: ExperimentalAppOverlayRegistration[];
|
|
97
|
+
setupGuideSections: InternalDoNotUseSetupGuideSectionRegistration[];
|
|
97
98
|
navPanels: LegacyNavPanelRegistration[];
|
|
98
99
|
tabs: ExperimentalTabRegistration[];
|
|
99
100
|
threadPanelActions: LegacyThreadPanelActionRegistration[];
|
|
@@ -79,7 +79,7 @@ type ThreadQueuedWork = z.infer<typeof threadQueuedWorkSchema>;
|
|
|
79
79
|
type BbIconName = string;
|
|
80
80
|
/**
|
|
81
81
|
* The one status bb would paint for a thread, already resolved through the
|
|
82
|
-
* host's precedence (attention before work; plan
|
|
82
|
+
* host's precedence (attention before work; plan mode before the generic
|
|
83
83
|
* spinner). Draw it with {@link PluginSdkApp.experimental_ThreadStatusGlyph},
|
|
84
84
|
* or resolve a row that folds in more through
|
|
85
85
|
* {@link PluginSdkApp.experimental_resolveThreadStatus}.
|
|
@@ -94,14 +94,13 @@ type BbIconName = string;
|
|
|
94
94
|
* precedence bb's list uses (a failed send outranks the unread dot; a waiting
|
|
95
95
|
* message ranks just below it).
|
|
96
96
|
*/
|
|
97
|
-
type PluginSidebarThreadIndicator = "background-agent" | "background-command" | "draft" | "
|
|
97
|
+
type PluginSidebarThreadIndicator = "background-agent" | "background-command" | "draft" | "none" | "plan-mode" | "queued-failed" | "queued-waiting" | "runtime" | "unread-error" | "unread-success" | "waiting-for-input" | "workflow" | "working-draft";
|
|
98
98
|
/** Live work counts on a thread. All zero means nothing is running. */
|
|
99
99
|
interface PluginSidebarThreadActivity {
|
|
100
100
|
workflows: number;
|
|
101
101
|
backgroundAgents: number;
|
|
102
102
|
backgroundCommands: number;
|
|
103
103
|
planMode: number;
|
|
104
|
-
goals: number;
|
|
105
104
|
}
|
|
106
105
|
/**
|
|
107
106
|
* One thread in the sidebar's live view.
|
|
@@ -339,6 +339,7 @@ declare const threadEventBackgroundTaskItemSchema: z.ZodObject<{
|
|
|
339
339
|
foreground: z.ZodBoolean;
|
|
340
340
|
id: z.ZodString;
|
|
341
341
|
outputFile: z.ZodOptional<z.ZodString>;
|
|
342
|
+
ownerStopped: z.ZodOptional<z.ZodLiteral<true>>;
|
|
342
343
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
343
344
|
presentation: z.ZodOptional<z.ZodObject<{
|
|
344
345
|
badge: z.ZodOptional<z.ZodObject<{
|
|
@@ -1028,6 +1029,7 @@ declare const threadEventItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1028
1029
|
foreground: z.ZodBoolean;
|
|
1029
1030
|
id: z.ZodString;
|
|
1030
1031
|
outputFile: z.ZodOptional<z.ZodString>;
|
|
1032
|
+
ownerStopped: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1031
1033
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
1032
1034
|
presentation: z.ZodOptional<z.ZodObject<{
|
|
1033
1035
|
badge: z.ZodOptional<z.ZodObject<{
|
|
@@ -1864,6 +1866,7 @@ declare const threadEventSchema: z.ZodUnion<readonly [z.ZodIntersection<z.ZodDis
|
|
|
1864
1866
|
foreground: z.ZodBoolean;
|
|
1865
1867
|
id: z.ZodString;
|
|
1866
1868
|
outputFile: z.ZodOptional<z.ZodString>;
|
|
1869
|
+
ownerStopped: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1867
1870
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
1868
1871
|
presentation: z.ZodOptional<z.ZodObject<{
|
|
1869
1872
|
badge: z.ZodOptional<z.ZodObject<{
|
|
@@ -2632,6 +2635,7 @@ declare const threadEventSchema: z.ZodUnion<readonly [z.ZodIntersection<z.ZodDis
|
|
|
2632
2635
|
foreground: z.ZodBoolean;
|
|
2633
2636
|
id: z.ZodString;
|
|
2634
2637
|
outputFile: z.ZodOptional<z.ZodString>;
|
|
2638
|
+
ownerStopped: z.ZodOptional<z.ZodLiteral<true>>;
|
|
2635
2639
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
2636
2640
|
presentation: z.ZodOptional<z.ZodObject<{
|
|
2637
2641
|
badge: z.ZodOptional<z.ZodObject<{
|
|
@@ -2864,6 +2868,7 @@ declare const threadEventSchema: z.ZodUnion<readonly [z.ZodIntersection<z.ZodDis
|
|
|
2864
2868
|
foreground: z.ZodBoolean;
|
|
2865
2869
|
id: z.ZodString;
|
|
2866
2870
|
outputFile: z.ZodOptional<z.ZodString>;
|
|
2871
|
+
ownerStopped: z.ZodOptional<z.ZodLiteral<true>>;
|
|
2867
2872
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
2868
2873
|
presentation: z.ZodOptional<z.ZodObject<{
|
|
2869
2874
|
badge: z.ZodOptional<z.ZodObject<{
|
|
@@ -2963,6 +2968,7 @@ declare const threadEventSchema: z.ZodUnion<readonly [z.ZodIntersection<z.ZodDis
|
|
|
2963
2968
|
foreground: z.ZodBoolean;
|
|
2964
2969
|
id: z.ZodString;
|
|
2965
2970
|
outputFile: z.ZodOptional<z.ZodString>;
|
|
2971
|
+
ownerStopped: z.ZodOptional<z.ZodLiteral<true>>;
|
|
2966
2972
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
2967
2973
|
presentation: z.ZodOptional<z.ZodObject<{
|
|
2968
2974
|
badge: z.ZodOptional<z.ZodObject<{
|
|
@@ -4076,6 +4076,7 @@ declare const providerHealthSchema: z.ZodObject<{
|
|
|
4076
4076
|
canInstall: z.ZodBoolean;
|
|
4077
4077
|
canUpdate: z.ZodBoolean;
|
|
4078
4078
|
installedVersion: z.ZodNullable<z.ZodString>;
|
|
4079
|
+
internal_DO_NOT_USE_setupGuidePlanLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4079
4080
|
localLoginCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4080
4081
|
loginCommand: z.ZodNullable<z.ZodString>;
|
|
4081
4082
|
minimumSupportedVersion: z.ZodNullable<z.ZodString>;
|
|
@@ -4135,6 +4136,7 @@ declare const providerHealthResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4135
4136
|
canInstall: z.ZodBoolean;
|
|
4136
4137
|
canUpdate: z.ZodBoolean;
|
|
4137
4138
|
installedVersion: z.ZodNullable<z.ZodString>;
|
|
4139
|
+
internal_DO_NOT_USE_setupGuidePlanLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4138
4140
|
localLoginCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4139
4141
|
loginCommand: z.ZodNullable<z.ZodString>;
|
|
4140
4142
|
minimumSupportedVersion: z.ZodNullable<z.ZodString>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and read the real source: https://github.com/get-bb/bb
|
|
7
7
|
|
|
8
8
|
import * as _get_bb_plugin_sdk from '@get-bb/plugin-sdk';
|
|
9
|
-
import { ExperimentalSidebarFooterItemRegistration, PluginNavPanelRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadContextCardRowRegistration, ExperimentalThreadContextCardSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalMessageMetadataRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, BbNavigate, ExperimentalFilePreviewOptions, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, ExperimentalThreadContextKind, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalComposerRendererApi, ExperimentalSidebarNavigationItem, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState, ExperimentalLiveFileTarget, ExperimentalFilePreviewFile, ExperimentalServers, ExperimentalPanelController, ExperimentalPanelTabs, JsonValue, ExperimentalPageTitle, ExperimentalOpenTabOptions, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationTarget } from '@get-bb/plugin-sdk';
|
|
9
|
+
import { ExperimentalSidebarFooterItemRegistration, PluginNavPanelRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, InternalDoNotUseSetupGuideSectionRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadContextCardRowRegistration, ExperimentalThreadContextCardSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalMessageMetadataRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, BbNavigate, ExperimentalFilePreviewOptions, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, ExperimentalThreadContextKind, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalComposerRendererApi, ExperimentalSidebarNavigationItem, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState, ExperimentalLiveFileTarget, ExperimentalFilePreviewFile, ExperimentalServers, ExperimentalPanelController, ExperimentalPanelTabs, JsonValue, ExperimentalPageTitle, ExperimentalOpenTabOptions, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationTarget } from '@get-bb/plugin-sdk';
|
|
10
10
|
import { ComponentType, ReactNode } from 'react';
|
|
11
11
|
import { RenderResult } from '@testing-library/react';
|
|
12
12
|
|
|
@@ -228,6 +228,7 @@ interface CapturedPluginApp {
|
|
|
228
228
|
homepageSections: PluginHomepageSectionRegistration[];
|
|
229
229
|
settingsSections: PluginSettingsSectionRegistration[];
|
|
230
230
|
appOverlays: ExperimentalAppOverlayRegistration[];
|
|
231
|
+
setupGuideSections: InternalDoNotUseSetupGuideSectionRegistration[];
|
|
231
232
|
navPanels: LegacyNavPanelRegistration[];
|
|
232
233
|
tabs: ExperimentalTabRegistration[];
|
|
233
234
|
threadPanelActions: LegacyThreadPanelActionRegistration[];
|
|
@@ -391,6 +392,12 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
|
|
|
391
392
|
experiments?: readonly string[];
|
|
392
393
|
/** What `experimental_useThreadContextKind()` reports. Omitted → `banner`. */
|
|
393
394
|
threadContextKind?: ExperimentalThreadContextKind;
|
|
395
|
+
/**
|
|
396
|
+
* What `experimental_useThreadExtensionState(threadId, kind)` reports,
|
|
397
|
+
* keyed by thread id and then by the kind's local name. Omitted → null for
|
|
398
|
+
* every thread and kind.
|
|
399
|
+
*/
|
|
400
|
+
threadExtensionStates?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
394
401
|
/**
|
|
395
402
|
* Row statuses `useSidebarThreadRowStatus()` reports, keyed by thread id.
|
|
396
403
|
* Omitted → every thread reports null.
|
|
@@ -951,6 +951,14 @@ interface PluginProviderDeclaration {
|
|
|
951
951
|
* project-scoped entries, which a global declaration cannot carry.
|
|
952
952
|
*/
|
|
953
953
|
experimental_resolvesNativeRoots?: boolean;
|
|
954
|
+
/**
|
|
955
|
+
* Internal to bb's own provider plugins; not part of the plugin API, and it
|
|
956
|
+
* may change or disappear in any release. When true, the first-run setup
|
|
957
|
+
* guide runs this provider's sign-in in its guided panel, which reads the
|
|
958
|
+
* sign-in link and code from the provider's login output. Otherwise the
|
|
959
|
+
* guide opens the provider's sign-in terminal in the row. Defaults to false.
|
|
960
|
+
*/
|
|
961
|
+
internal_DO_NOT_USE_guidedSignIn?: boolean;
|
|
954
962
|
/**
|
|
955
963
|
* Derive this provider's opaque per-command options. Called synchronously
|
|
956
964
|
* by the server for every session and turn command on a thread of this
|
|
@@ -981,10 +989,11 @@ interface PluginProviderDeclaration {
|
|
|
981
989
|
* the validator GUARANTEES are narrowed here; everything else keeps the
|
|
982
990
|
* author-facing shape.
|
|
983
991
|
*/
|
|
984
|
-
type NormalizedPluginProviderDeclaration = Omit<PluginProviderDeclaration, "experimental_nativeCommandRoots" | "experimental_nativeSkillRoots" | "experimental_resolvesNativeRoots"> & {
|
|
992
|
+
type NormalizedPluginProviderDeclaration = Omit<PluginProviderDeclaration, "experimental_nativeCommandRoots" | "experimental_nativeSkillRoots" | "experimental_resolvesNativeRoots" | "internal_DO_NOT_USE_guidedSignIn"> & {
|
|
985
993
|
readonly experimental_nativeSkillRoots?: ProviderNativeRoots;
|
|
986
994
|
readonly experimental_nativeCommandRoots?: ProviderNativeRoots;
|
|
987
995
|
readonly experimental_resolvesNativeRoots: boolean;
|
|
996
|
+
readonly internal_DO_NOT_USE_guidedSignIn: boolean;
|
|
988
997
|
readonly completedTurnDisplay: PluginProviderCompletedTurnDisplay;
|
|
989
998
|
readonly maintenance: {
|
|
990
999
|
readonly health: boolean;
|