@get-bb/plugin-sdk 0.6.89 → 0.6.94
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 +157 -83
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +14 -3
- package/bundled-types/bb-plugin-sdk-internal-rpc-query-host.d.ts +8 -1
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +18 -2
- package/bundled-types/bb-plugin-sdk.d.ts +152 -82
- package/dist/app.js +16 -0
- package/dist/host.js +93 -1
- package/dist/internal/plugin-app-collector.js +29 -10
- package/dist/internal/rpc-query-host.js +130 -84
- package/dist/process.js +100 -3
- package/dist/provider-bridge-acp-next.js +133 -22
- package/dist/provider-bridge-acp.js +133 -22
- package/dist/provider-bridge-testing.js +95 -5
- package/dist/provider-bridge-worker-entry.mjs +93 -1
- package/dist/provider-bridge.js +95 -5
- package/dist/testing/app.js +172 -97
- package/package.json +3 -3
|
@@ -133,10 +133,17 @@ interface ExperimentalRpcQueryState<T> {
|
|
|
133
133
|
isLoading: boolean;
|
|
134
134
|
/** A read attempt is active, including background refreshes. Keyed consumers share this activity for their method; offline-paused reads are not fetching. */
|
|
135
135
|
isFetching: boolean;
|
|
136
|
-
/** Force a read regardless of freshness and wait for its attempt/retries. Keyed reads refresh
|
|
136
|
+
/** Force a read regardless of freshness and wait for its attempt/retries. Keyed reads refresh only this hook's keys, batched with other hooks refreshing in the same render. Failures update error and retain data; this promise resolves rather than rejecting. */
|
|
137
137
|
refetch(): Promise<void>;
|
|
138
138
|
}
|
|
139
139
|
interface ExperimentalRpcKeyedQueryState<T, Selection = Record<string, T>> extends ExperimentalRpcQueryState<Selection> {
|
|
140
|
+
/**
|
|
141
|
+
* Read these keys again and keep every other loaded row, for retrying one
|
|
142
|
+
* failed row without refreshing the rest. Keys must be among this query's
|
|
143
|
+
* keys; others are ignored. Resolves once the read settles; failures update
|
|
144
|
+
* `error` and retain data.
|
|
145
|
+
*/
|
|
146
|
+
refetchKeys(keys: readonly string[]): Promise<void>;
|
|
140
147
|
}
|
|
141
148
|
interface ExperimentalRpcQueryOptions<Contract extends PluginRpcContract, Method extends keyof Contract & string> {
|
|
142
149
|
contract: Contract;
|
|
@@ -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,
|
|
9
|
+
import { ExperimentalSidebarFooterItemRegistration, PluginNavPanelRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalComposerRendererApi, ExperimentalSidebarNavigationItem, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState, ExperimentalLiveFileTarget, ExperimentalPanelController, 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
|
|
|
@@ -34,6 +34,16 @@ interface LegacyThreadPanelActionRegistration {
|
|
|
34
34
|
layout?: "flush" | "padded";
|
|
35
35
|
run?(context: _get_bb_plugin_sdk.ExperimentalThreadTabActionContext): void | Promise<void>;
|
|
36
36
|
}
|
|
37
|
+
interface LegacyThreadHeaderActionProps {
|
|
38
|
+
threadId: string;
|
|
39
|
+
projectId: string;
|
|
40
|
+
isCompactViewport: boolean;
|
|
41
|
+
}
|
|
42
|
+
interface LegacyThreadHeaderActionRegistration {
|
|
43
|
+
id: string;
|
|
44
|
+
title: string;
|
|
45
|
+
component: ComponentType<LegacyThreadHeaderActionProps>;
|
|
46
|
+
}
|
|
37
47
|
type LegacyNavPanelRegistration = PluginNavPanelRegistration & {
|
|
38
48
|
fixedTabs?: readonly PluginNavPanelFixedTabRegistration[];
|
|
39
49
|
};
|
|
@@ -225,9 +235,10 @@ interface CapturedPluginApp {
|
|
|
225
235
|
experimentalSidebarFooterItems: CollectedExperimentalSidebarFooterItem[];
|
|
226
236
|
threadLists: PluginThreadListRegistration[];
|
|
227
237
|
experimentalSidebarNavigations: ExperimentalSidebarNavigationRegistration[];
|
|
228
|
-
threadHeaderActions:
|
|
238
|
+
threadHeaderActions: LegacyThreadHeaderActionRegistration[];
|
|
229
239
|
threadContextSegments: ExperimentalThreadContextSegmentRegistration[];
|
|
230
240
|
threadInfoRows: ExperimentalThreadInfoRowRegistration[];
|
|
241
|
+
threadRowMetadata: ExperimentalThreadRowMetadataRegistration<unknown>[];
|
|
231
242
|
threadInfoSections: ExperimentalThreadInfoSectionRegistration[];
|
|
232
243
|
threadActions: PluginThreadActionRegistration<unknown>[];
|
|
233
244
|
browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
|
|
@@ -439,6 +450,11 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
|
|
|
439
450
|
* false for every target.
|
|
440
451
|
*/
|
|
441
452
|
canOpenFileExternally?: (target: ExperimentalLiveFileTarget) => boolean;
|
|
453
|
+
/**
|
|
454
|
+
* Answer for `experimental_useTabVisible()`. Omitted → true, as for a tab
|
|
455
|
+
* that is selected in an open panel.
|
|
456
|
+
*/
|
|
457
|
+
tabVisible?: boolean;
|
|
442
458
|
/** Host acceptance for `useBbNavigate().experimental_openTerminal`. */
|
|
443
459
|
openTerminal?: (options: Parameters<BbNavigate["experimental_openTerminal"]>[0]) => boolean;
|
|
444
460
|
/**
|