@get-bb/plugin-sdk 0.6.52 → 0.6.59
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 +444 -13
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +1 -0
- package/bundled-types/bb-plugin-sdk-host.d.ts +11 -2
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +1 -0
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +7 -3
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp-next.d.ts +72 -11
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +27 -7
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +30 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +42 -1
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +30 -2
- package/bundled-types/bb-plugin-sdk-testing.d.ts +1 -0
- package/bundled-types/bb-plugin-sdk.d.ts +446 -14
- package/dist/app.js +12 -0
- package/dist/host.js +150 -5
- package/dist/internal/plugin-app-collector.js +89 -15
- package/dist/provider-bridge-acp-next.js +314 -81
- package/dist/provider-bridge-acp.js +6733 -632
- package/dist/provider-bridge-testing.js +77 -32
- package/dist/provider-bridge-worker-entry.mjs +136 -5
- package/dist/provider-bridge.js +196 -8
- package/dist/testing/app.js +169 -15
- package/dist/testing/index.js +1 -0
- package/package.json +1 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { ReactNode, ComponentType } from 'react';
|
|
9
9
|
import { RenderResult } from '@testing-library/react';
|
|
10
|
-
import { ExperimentalSidebarFooterItemRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState } from '@get-bb/plugin-sdk';
|
|
10
|
+
import { ExperimentalSidebarFooterItemRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, PluginThreadHeaderActionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalSidebarNavigationItem, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState, ExperimentalSidebarNavigationActions } from '@get-bb/plugin-sdk';
|
|
11
11
|
|
|
12
12
|
type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
|
|
13
13
|
interface ExperimentalSidebarFooterRuntimeSnapshot {
|
|
@@ -163,6 +163,17 @@ interface ComposerLog {
|
|
|
163
163
|
type TestThreadActionsResolver = (thread: PluginThreadActionTarget, options: {
|
|
164
164
|
requestRename(threadId: string): void;
|
|
165
165
|
}) => readonly PluginThreadActionEntry[];
|
|
166
|
+
/**
|
|
167
|
+
* One recorded `experimental_useSidebarNavigation()` action, or a split drag
|
|
168
|
+
* started from `experimental_useSidebarNavigationSplit()` (`beginSplitDrag`).
|
|
169
|
+
*/
|
|
170
|
+
interface SidebarNavigationCall {
|
|
171
|
+
method: keyof ExperimentalSidebarNavigationActions | "beginSplitDrag";
|
|
172
|
+
itemId?: string;
|
|
173
|
+
itemIds?: string[];
|
|
174
|
+
isVisible?: boolean;
|
|
175
|
+
openInSplit?: boolean;
|
|
176
|
+
}
|
|
166
177
|
type TestClipboard = (content: ExperimentalClipboardContent) => Promise<boolean>;
|
|
167
178
|
/**
|
|
168
179
|
* Install the test runtime at `globalThis.__bbPluginRuntime.pluginSdkApp`,
|
|
@@ -184,6 +195,7 @@ interface CapturedPluginApp {
|
|
|
184
195
|
sidebarFooterActions: PluginSidebarFooterActionRegistration[];
|
|
185
196
|
experimentalSidebarFooterItems: CollectedExperimentalSidebarFooterItem[];
|
|
186
197
|
threadLists: PluginThreadListRegistration[];
|
|
198
|
+
experimentalSidebarNavigations: ExperimentalSidebarNavigationRegistration[];
|
|
187
199
|
threadHeaderActions: PluginThreadHeaderActionRegistration[];
|
|
188
200
|
threadActions: PluginThreadActionRegistration<unknown>[];
|
|
189
201
|
browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
|
|
@@ -342,6 +354,17 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
|
|
|
342
354
|
sidebarShortcuts?: Record<string, PluginSidebarThreadShortcut>;
|
|
343
355
|
/** The split layout `useSidebarSplitLayout()` reports. Omitted → null. */
|
|
344
356
|
sidebarSplitLayout?: PluginSidebarSplitLayout;
|
|
357
|
+
/**
|
|
358
|
+
* Items and the active item `experimental_useSidebarNavigation()` reports.
|
|
359
|
+
* Omitted → no items. Actions are recorded in `sidebarNavigationCalls` and
|
|
360
|
+
* do not change the items.
|
|
361
|
+
*/
|
|
362
|
+
sidebarNavigation?: {
|
|
363
|
+
items?: readonly ExperimentalSidebarNavigationItem[];
|
|
364
|
+
activeItemId?: string | null;
|
|
365
|
+
isHomeActive?: boolean;
|
|
366
|
+
isShortcutModifierHeld?: boolean;
|
|
367
|
+
};
|
|
345
368
|
/**
|
|
346
369
|
* What `experimental_useThreadActions()` reports for a thread, in menu
|
|
347
370
|
* order. Omitted → an empty list.
|
|
@@ -404,6 +427,11 @@ interface RenderedSlotInspectionState {
|
|
|
404
427
|
readonly navigateCalls: NavigateCall[];
|
|
405
428
|
/** Every validated `experimental_useAppPanel().openFixedTab` call. */
|
|
406
429
|
readonly experimental_fixedTabOpenCalls: ExperimentalFixedTabOpenCall[];
|
|
430
|
+
/**
|
|
431
|
+
* Every `experimental_useSidebarNavigation()` action and navigation split
|
|
432
|
+
* drag, in order.
|
|
433
|
+
*/
|
|
434
|
+
readonly sidebarNavigationCalls: SidebarNavigationCall[];
|
|
407
435
|
/**
|
|
408
436
|
* The environment id of every `experimental_useArchiveEnvironmentThreads()`
|
|
409
437
|
* call, in order.
|
|
@@ -435,4 +463,4 @@ declare function renderSlot<Props extends object, Contract extends PluginRpcCont
|
|
|
435
463
|
}, props: Props, options?: RenderSlotOptions<Contract>): RenderedSlot;
|
|
436
464
|
|
|
437
465
|
export { installTestPluginRuntime, loadPluginApp, mountPluginContentScripts, renderSlot };
|
|
438
|
-
export type { CapturedPluginApp, ComposerLog, ContentScriptTestMountOptions, ContentScriptThreadRowStatusCall, ExperimentalFixedTabOpenCall, MountedPluginContentScripts, NavigateCall, PluginAppSource, PluginRpcTestHandlers, PluginSdkTestFakes, RenderSlotOptions, RenderedSlot, RenderedSlotBehaviorDrivers, RenderedSlotInspectionState, RenderedSlotLifecycleControls, RpcCall, SdkCall, TestThreadActionsResolver };
|
|
466
|
+
export type { CapturedPluginApp, ComposerLog, ContentScriptTestMountOptions, ContentScriptThreadRowStatusCall, ExperimentalFixedTabOpenCall, MountedPluginContentScripts, NavigateCall, PluginAppSource, PluginRpcTestHandlers, PluginSdkTestFakes, RenderSlotOptions, RenderedSlot, RenderedSlotBehaviorDrivers, RenderedSlotInspectionState, RenderedSlotLifecycleControls, RpcCall, SdkCall, SidebarNavigationCall, TestThreadActionsResolver };
|
|
@@ -273,6 +273,7 @@ type ProviderFork = (typeof PROVIDER_FORK_VALUES)[number];
|
|
|
273
273
|
declare const threadResponseSchema: z.ZodObject<{
|
|
274
274
|
activeBackgroundAgentCount: z.ZodNumber;
|
|
275
275
|
archivedAt: z.ZodNullable<z.ZodNumber>;
|
|
276
|
+
canEditMessages: z.ZodBoolean;
|
|
276
277
|
canRestoreEnvironment: z.ZodBoolean;
|
|
277
278
|
canSpawnChild: z.ZodBoolean;
|
|
278
279
|
createdAt: z.ZodNumber;
|