@get-bb/plugin-sdk 0.4.99 → 0.4.104
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 +123 -30
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +129 -43
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +35 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +30 -0
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +9 -1
- package/bundled-types/bb-plugin-sdk-testing.d.ts +5 -5
- package/bundled-types/bb-plugin-sdk.d.ts +692 -71
- package/dist/index.js +799 -0
- package/dist/internal/host-policy.js +21 -15
- package/dist/provider-bridge-acp.js +18 -2
- package/dist/provider-bridge-testing.js +18 -2
- package/dist/provider-bridge.js +18 -2
- package/dist/testing/app.js +18 -1
- package/dist/testing/index.js +35 -22
- package/package.json +1 -1
|
@@ -798,6 +798,31 @@ type UserQuestionPendingInteractionPayload = z.infer<typeof userQuestionPendingI
|
|
|
798
798
|
declare const pluginPendingInteractionPayloadSchema: z.ZodObject<{
|
|
799
799
|
data: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
800
800
|
kind: z.ZodLiteral<"plugin">;
|
|
801
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
802
|
+
badge: z.ZodOptional<z.ZodObject<{
|
|
803
|
+
glyph: z.ZodString;
|
|
804
|
+
hint: z.ZodString;
|
|
805
|
+
label: z.ZodString;
|
|
806
|
+
tone: z.ZodEnum<{
|
|
807
|
+
destructive: "destructive";
|
|
808
|
+
neutral: "neutral";
|
|
809
|
+
}>;
|
|
810
|
+
}, z.core.$strip>>;
|
|
811
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
812
|
+
icon: z.ZodObject<{
|
|
813
|
+
glyph: z.ZodString;
|
|
814
|
+
}, z.core.$strip>;
|
|
815
|
+
label: z.ZodObject<{
|
|
816
|
+
completed: z.ZodString;
|
|
817
|
+
pending: z.ZodString;
|
|
818
|
+
}, z.core.$strip>;
|
|
819
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
820
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
821
|
+
dark: z.ZodString;
|
|
822
|
+
light: z.ZodString;
|
|
823
|
+
}, z.core.$strip>>;
|
|
824
|
+
title: z.ZodOptional<z.ZodString>;
|
|
825
|
+
}, z.core.$strip>>;
|
|
801
826
|
title: z.ZodString;
|
|
802
827
|
}, z.core.$strip>;
|
|
803
828
|
type PluginPendingInteractionPayload = z.infer<typeof pluginPendingInteractionPayloadSchema>;
|
|
@@ -1010,6 +1035,11 @@ declare const pendingInteractionResolutionSchema: z.ZodUnion<readonly [z.ZodDisc
|
|
|
1010
1035
|
}, z.core.$strip>>;
|
|
1011
1036
|
kind: z.ZodLiteral<"user_answer">;
|
|
1012
1037
|
}, z.core.$strip>, z.ZodObject<{
|
|
1038
|
+
description: z.ZodOptional<z.ZodObject<{
|
|
1039
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1040
|
+
payload: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
1041
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1042
|
+
}, z.core.$strip>>;
|
|
1013
1043
|
kind: z.ZodLiteral<"plugin_submitted">;
|
|
1014
1044
|
}, z.core.$strip>, z.ZodObject<{
|
|
1015
1045
|
kind: z.ZodLiteral<"request_answer">;
|
|
@@ -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, ExperimentalSidebarNavigationRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, ExperimentalComposerSubmitOptions, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
|
|
10
|
+
import { ExperimentalSidebarFooterItemRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, ExperimentalSidebarNavigationRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, ExperimentalComposerSubmitOptions, ExperimentalComposerSelection, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
|
|
11
11
|
|
|
12
12
|
type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
|
|
13
13
|
interface ExperimentalSidebarFooterRuntimeSnapshot {
|
|
@@ -116,6 +116,14 @@ interface ComposerLog {
|
|
|
116
116
|
* draft — enough to assert what a picker scheduled and that it tidied up.
|
|
117
117
|
*/
|
|
118
118
|
submits: ExperimentalComposerSubmitOptions[];
|
|
119
|
+
/**
|
|
120
|
+
* Every `experimental_setSelection` the harness composer accepted, in
|
|
121
|
+
* order. The harness has no pickers of its own, so it records the request
|
|
122
|
+
* and echoes it back as the settled selection, minus the fields the
|
|
123
|
+
* composer's scope has no picker for (a thread has no project or
|
|
124
|
+
* environment). Queued-message and side-chat scopes reject, as the app does.
|
|
125
|
+
*/
|
|
126
|
+
selections: ExperimentalComposerSelection[];
|
|
119
127
|
}
|
|
120
128
|
/** One recorded `experimental_useSidebarThreadActions()` call. */
|
|
121
129
|
interface SidebarActionCall {
|
|
@@ -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 { StandardSchemaV1 as StandardSchemaV1$1, StandardSchemaV1InferOutput, PluginMachineValidateDecision, JsonValue as JsonValue$2, PluginEnvironmentProviderRequirements as PluginEnvironmentProviderRequirements$1, PluginEnvironmentValidateDecision, BbPluginApi, PluginSettingValue as PluginSettingValue$1, PluginSharedPortTunnelIdentity,
|
|
8
|
+
import { StandardSchemaV1 as StandardSchemaV1$1, StandardSchemaV1InferOutput, PluginMachineValidateDecision, JsonValue as JsonValue$2, PluginEnvironmentProviderRequirements as PluginEnvironmentProviderRequirements$1, PluginEnvironmentValidateDecision, BbPluginApi, PluginSettingValue as PluginSettingValue$1, PluginSharedPortTunnelIdentity, PluginRowPresentation, PluginAgentToolContext, PluginAgentToolResult, PluginCliCommandInfo, PluginCliContext, PluginCliResult, PluginHttpAuthMode, PluginHttpHandler, PluginMentionTrigger, PluginMentionSearchContext, PluginMentionItem, PluginMentionProviderRegistration, PluginCliExecutionResult, PluginThreadEventName, PluginThreadEventPayloads, PluginAgentConfigurationContext, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginProviderEnvHealth, PluginSettingDescriptors, ExperimentalPluginWebSocketHandler, PluginAgentConfiguration, PluginHookName, PluginHookHandler, PluginAiServiceDeclaration, PluginInteractionRequest, MessageDispatchHookContext } from '@get-bb/plugin-sdk';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
|
|
11
11
|
type PluginMachineProviderResource = Exclude<JsonValue$2, null>;
|
|
@@ -1126,11 +1126,11 @@ interface FakeAgentToolRecord {
|
|
|
1126
1126
|
instructions: string | null;
|
|
1127
1127
|
/**
|
|
1128
1128
|
* The plugin's declared row presentation, null when it declared none.
|
|
1129
|
-
* Parsed by the shared `
|
|
1129
|
+
* Parsed by the shared `parsePluginRowPresentation`, so the record
|
|
1130
1130
|
* holds exactly what the production host stores and a presentation bb
|
|
1131
1131
|
* rejects is rejected here with the same message.
|
|
1132
1132
|
*/
|
|
1133
|
-
presentation:
|
|
1133
|
+
presentation: PluginRowPresentation | null;
|
|
1134
1134
|
/** JSON-schema object the host would send providers. */
|
|
1135
1135
|
inputSchema: unknown;
|
|
1136
1136
|
parse(input: unknown): {
|
|
@@ -1402,7 +1402,7 @@ type PluginAgentConfigurationContextOverrides = {
|
|
|
1402
1402
|
};
|
|
1403
1403
|
origin?: Partial<PluginAgentConfigurationContext["origin"]>;
|
|
1404
1404
|
};
|
|
1405
|
-
type MessageDispatchHookContextOverrides = Omit<Partial<MessageDispatchHookContext>, "environment" | "executionSources" | "host" | "input" | "project" | "
|
|
1405
|
+
type MessageDispatchHookContextOverrides = Omit<Partial<MessageDispatchHookContext>, "environment" | "executionSources" | "host" | "input" | "project" | "queuedMessages" | "requestedExecution" | "thread"> & {
|
|
1406
1406
|
thread?: Partial<MessageDispatchHookContext["thread"]>;
|
|
1407
1407
|
project?: Partial<MessageDispatchHookContext["project"]>;
|
|
1408
1408
|
environment?: Partial<NonNullable<MessageDispatchHookContext["environment"]>> | null;
|
|
@@ -1410,7 +1410,7 @@ type MessageDispatchHookContextOverrides = Omit<Partial<MessageDispatchHookConte
|
|
|
1410
1410
|
input?: Partial<MessageDispatchHookContext["input"]>;
|
|
1411
1411
|
requestedExecution?: Partial<MessageDispatchHookContext["requestedExecution"]>;
|
|
1412
1412
|
executionSources?: Partial<MessageDispatchHookContext["executionSources"]>;
|
|
1413
|
-
|
|
1413
|
+
queuedMessages?: Partial<MessageDispatchHookContext["queuedMessages"][number]>[];
|
|
1414
1414
|
};
|
|
1415
1415
|
/**
|
|
1416
1416
|
* A complete, deterministic host response for faking `bb.sdk.hosts.list()`
|