@get-bb/plugin-sdk 0.6.94 → 0.6.99
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 +209 -119
- package/bundled-types/bb-plugin-sdk-host.d.ts +64 -64
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +18 -8
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-internal-rpc-query-host.d.ts +6 -6
- package/bundled-types/bb-plugin-sdk-internal-rpc-tags.d.ts +1 -1
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp-next.d.ts +4 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +4 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +2 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +12 -1
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +8 -1
- package/bundled-types/bb-plugin-sdk-testing.d.ts +11 -8
- package/bundled-types/bb-plugin-sdk.d.ts +284 -181
- package/dist/app.js +4 -0
- package/dist/internal/host-policy.js +1 -3
- package/dist/internal/plugin-app-collector.js +18 -0
- package/dist/internal/rpc-query-host.js +4 -10
- package/dist/provider-bridge-acp-next.js +2158 -2016
- package/dist/provider-bridge-acp.js +2158 -2016
- package/dist/provider-bridge-testing.js +112 -127
- package/dist/provider-bridge.js +608 -592
- package/dist/testing/app.js +26 -10
- package/dist/testing/index.js +5 -4
- package/package.json +1 -1
|
@@ -9,69 +9,6 @@ import { z } from 'zod';
|
|
|
9
9
|
import { ChildProcess } from 'node:child_process';
|
|
10
10
|
import { Readable } from 'node:stream';
|
|
11
11
|
|
|
12
|
-
/** The input form a resolver writes: the options optional, filled per side by the normalizer. */
|
|
13
|
-
declare const providerResolvedNativeRootInputSchema: z.ZodObject<{
|
|
14
|
-
ancestors: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
-
fallbackName: z.ZodOptional<z.ZodString>;
|
|
16
|
-
namePrefix: z.ZodOptional<z.ZodString>;
|
|
17
|
-
origin: z.ZodEnum<{
|
|
18
|
-
project: "project";
|
|
19
|
-
user: "user";
|
|
20
|
-
}>;
|
|
21
|
-
path: z.ZodString;
|
|
22
|
-
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
-
shape: z.ZodOptional<z.ZodEnum<{
|
|
24
|
-
"command-file": "command-file";
|
|
25
|
-
"skill-file": "skill-file";
|
|
26
|
-
commands: "commands";
|
|
27
|
-
skill: "skill";
|
|
28
|
-
skills: "skills";
|
|
29
|
-
}>>;
|
|
30
|
-
skipIfManifest: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.core.$strict>;
|
|
32
|
-
type ProviderResolvedNativeRootInput = z.input<typeof providerResolvedNativeRootInputSchema>;
|
|
33
|
-
declare const providerResolvedNativeRootsSchema: z.ZodObject<{
|
|
34
|
-
commands: z.ZodArray<z.ZodObject<{
|
|
35
|
-
ancestors: z.ZodBoolean;
|
|
36
|
-
fallbackName: z.ZodOptional<z.ZodString>;
|
|
37
|
-
namePrefix: z.ZodString;
|
|
38
|
-
origin: z.ZodEnum<{
|
|
39
|
-
project: "project";
|
|
40
|
-
user: "user";
|
|
41
|
-
}>;
|
|
42
|
-
path: z.ZodString;
|
|
43
|
-
recursive: z.ZodBoolean;
|
|
44
|
-
shape: z.ZodEnum<{
|
|
45
|
-
"command-file": "command-file";
|
|
46
|
-
"skill-file": "skill-file";
|
|
47
|
-
commands: "commands";
|
|
48
|
-
skill: "skill";
|
|
49
|
-
skills: "skills";
|
|
50
|
-
}>;
|
|
51
|
-
skipIfManifest: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, z.core.$strict>>;
|
|
53
|
-
skills: z.ZodArray<z.ZodObject<{
|
|
54
|
-
ancestors: z.ZodBoolean;
|
|
55
|
-
fallbackName: z.ZodOptional<z.ZodString>;
|
|
56
|
-
namePrefix: z.ZodString;
|
|
57
|
-
origin: z.ZodEnum<{
|
|
58
|
-
project: "project";
|
|
59
|
-
user: "user";
|
|
60
|
-
}>;
|
|
61
|
-
path: z.ZodString;
|
|
62
|
-
recursive: z.ZodBoolean;
|
|
63
|
-
shape: z.ZodEnum<{
|
|
64
|
-
"command-file": "command-file";
|
|
65
|
-
"skill-file": "skill-file";
|
|
66
|
-
commands: "commands";
|
|
67
|
-
skill: "skill";
|
|
68
|
-
skills: "skills";
|
|
69
|
-
}>;
|
|
70
|
-
skipIfManifest: z.ZodOptional<z.ZodString>;
|
|
71
|
-
}, z.core.$strict>>;
|
|
72
|
-
}, z.core.$strict>;
|
|
73
|
-
type ProviderResolvedNativeRoots = z.infer<typeof providerResolvedNativeRootsSchema>;
|
|
74
|
-
|
|
75
12
|
interface ContractTagDeclarations<Input, Output> {
|
|
76
13
|
tags?(input: Input, output: Output): readonly string[];
|
|
77
14
|
keyTags?(key: string, value: Output extends Readonly<Record<string, infer Value>> ? Value : unknown): readonly string[];
|
|
@@ -116,7 +53,7 @@ interface StandardSchemaV1Issue {
|
|
|
116
53
|
}
|
|
117
54
|
type StandardSchemaV1InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
118
55
|
type StandardSchemaV1InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
119
|
-
interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema
|
|
56
|
+
interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends Omit<ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema>>, "invalidates"> {
|
|
120
57
|
readonly experimental_description?: string;
|
|
121
58
|
/**
|
|
122
59
|
* Host contracts only. When true and the daemon's response has not arrived
|
|
@@ -209,6 +146,69 @@ declare function experimental_defineHostEntry<const Contract extends PluginRpcCo
|
|
|
209
146
|
dispose?: () => void | Promise<void>;
|
|
210
147
|
}): ExperimentalHostEntry<Contract, Signals>;
|
|
211
148
|
|
|
149
|
+
/** The input form a resolver writes: the options optional, filled per side by the normalizer. */
|
|
150
|
+
declare const providerResolvedNativeRootInputSchema: z.ZodObject<{
|
|
151
|
+
ancestors: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
+
fallbackName: z.ZodOptional<z.ZodString>;
|
|
153
|
+
namePrefix: z.ZodOptional<z.ZodString>;
|
|
154
|
+
origin: z.ZodEnum<{
|
|
155
|
+
project: "project";
|
|
156
|
+
user: "user";
|
|
157
|
+
}>;
|
|
158
|
+
path: z.ZodString;
|
|
159
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
shape: z.ZodOptional<z.ZodEnum<{
|
|
161
|
+
"command-file": "command-file";
|
|
162
|
+
"skill-file": "skill-file";
|
|
163
|
+
commands: "commands";
|
|
164
|
+
skill: "skill";
|
|
165
|
+
skills: "skills";
|
|
166
|
+
}>>;
|
|
167
|
+
skipIfManifest: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
type ProviderResolvedNativeRootInput = z.input<typeof providerResolvedNativeRootInputSchema>;
|
|
170
|
+
declare const providerResolvedNativeRootsSchema: z.ZodObject<{
|
|
171
|
+
commands: z.ZodArray<z.ZodObject<{
|
|
172
|
+
ancestors: z.ZodBoolean;
|
|
173
|
+
fallbackName: z.ZodOptional<z.ZodString>;
|
|
174
|
+
namePrefix: z.ZodString;
|
|
175
|
+
origin: z.ZodEnum<{
|
|
176
|
+
project: "project";
|
|
177
|
+
user: "user";
|
|
178
|
+
}>;
|
|
179
|
+
path: z.ZodString;
|
|
180
|
+
recursive: z.ZodBoolean;
|
|
181
|
+
shape: z.ZodEnum<{
|
|
182
|
+
"command-file": "command-file";
|
|
183
|
+
"skill-file": "skill-file";
|
|
184
|
+
commands: "commands";
|
|
185
|
+
skill: "skill";
|
|
186
|
+
skills: "skills";
|
|
187
|
+
}>;
|
|
188
|
+
skipIfManifest: z.ZodOptional<z.ZodString>;
|
|
189
|
+
}, z.core.$strict>>;
|
|
190
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
191
|
+
ancestors: z.ZodBoolean;
|
|
192
|
+
fallbackName: z.ZodOptional<z.ZodString>;
|
|
193
|
+
namePrefix: z.ZodString;
|
|
194
|
+
origin: z.ZodEnum<{
|
|
195
|
+
project: "project";
|
|
196
|
+
user: "user";
|
|
197
|
+
}>;
|
|
198
|
+
path: z.ZodString;
|
|
199
|
+
recursive: z.ZodBoolean;
|
|
200
|
+
shape: z.ZodEnum<{
|
|
201
|
+
"command-file": "command-file";
|
|
202
|
+
"skill-file": "skill-file";
|
|
203
|
+
commands: "commands";
|
|
204
|
+
skill: "skill";
|
|
205
|
+
skills: "skills";
|
|
206
|
+
}>;
|
|
207
|
+
skipIfManifest: z.ZodOptional<z.ZodString>;
|
|
208
|
+
}, z.core.$strict>>;
|
|
209
|
+
}, z.core.$strict>;
|
|
210
|
+
type ProviderResolvedNativeRoots = z.infer<typeof providerResolvedNativeRootsSchema>;
|
|
211
|
+
|
|
212
212
|
declare const experimental_nativeRootsResolveInputSchema: z.ZodObject<{
|
|
213
213
|
cwd: z.ZodNullable<z.ZodString>;
|
|
214
214
|
providerId: z.ZodString;
|
|
@@ -476,12 +476,6 @@ declare const threadQueuedMessageSchema: z.ZodObject<{
|
|
|
476
476
|
}, z.core.$strip>;
|
|
477
477
|
type ThreadQueuedMessage = z.infer<typeof threadQueuedMessageSchema>;
|
|
478
478
|
|
|
479
|
-
interface ContractTagDeclarations<Input, Output> {
|
|
480
|
-
tags?(input: Input, output: Output): readonly string[];
|
|
481
|
-
keyTags?(key: string, value: Output extends Readonly<Record<string, infer Value>> ? Value : unknown): readonly string[];
|
|
482
|
-
invalidates?(input: Input, output: Output): readonly string[];
|
|
483
|
-
}
|
|
484
|
-
|
|
485
479
|
type ExecutionInputFieldSource = CallerExecutionInputSource;
|
|
486
480
|
declare const threadResponseSchema: z.ZodObject<{
|
|
487
481
|
activeBackgroundAgentCount: z.ZodNumber;
|
|
@@ -664,6 +658,12 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
664
658
|
remove(context: PluginEnvironmentProviderRemoveContext): Promise<PluginEnvironmentProviderRemoveResult>;
|
|
665
659
|
}
|
|
666
660
|
|
|
661
|
+
interface ContractTagDeclarations<Input, Output> {
|
|
662
|
+
tags?(input: Input, output: Output): readonly string[];
|
|
663
|
+
keyTags?(key: string, value: Output extends Readonly<Record<string, infer Value>> ? Value : unknown): readonly string[];
|
|
664
|
+
invalidates?(input: Input, output: Output): readonly string[];
|
|
665
|
+
}
|
|
666
|
+
|
|
667
667
|
declare const RESERVED_BB_CLI_COMMANDS: readonly string[];
|
|
668
668
|
|
|
669
669
|
type PluginMachineProviderResource = Exclude<JsonValue$2, null>;
|
|
@@ -805,7 +805,7 @@ interface StandardSchemaV1Issue {
|
|
|
805
805
|
})[];
|
|
806
806
|
}
|
|
807
807
|
type StandardSchemaV1InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
808
|
-
interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema
|
|
808
|
+
interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends Omit<ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema>>, "invalidates"> {
|
|
809
809
|
readonly experimental_description?: string;
|
|
810
810
|
/**
|
|
811
811
|
* Host contracts only. When true and the daemon's response has not arrived
|
|
@@ -832,6 +832,13 @@ type ExperimentalPluginRpcCaller = {
|
|
|
832
832
|
/** Second argument of every rpc handler. */
|
|
833
833
|
interface ExperimentalPluginRpcHandlerContext {
|
|
834
834
|
readonly experimental_caller: ExperimentalPluginRpcCaller;
|
|
835
|
+
/**
|
|
836
|
+
* Aborts when the caller stops waiting (its HTTP request disconnects) or
|
|
837
|
+
* when this plugin instance is reloaded, disabled or removed. A disposing
|
|
838
|
+
* instance's callers still waiting when the dispose drain ends are
|
|
839
|
+
* released with an error, so work finished after that reaches nobody.
|
|
840
|
+
*/
|
|
841
|
+
readonly experimental_signal: AbortSignal;
|
|
835
842
|
}
|
|
836
843
|
|
|
837
844
|
type PluginSettingDescriptor = {
|
|
@@ -1161,7 +1168,10 @@ interface PluginCliContext {
|
|
|
1161
1168
|
cwd?: string;
|
|
1162
1169
|
threadId?: string;
|
|
1163
1170
|
projectId?: string;
|
|
1164
|
-
/**
|
|
1171
|
+
/**
|
|
1172
|
+
* Aborted when the invoking CLI HTTP request disconnects or this plugin
|
|
1173
|
+
* instance is reloaded, disabled or removed.
|
|
1174
|
+
*/
|
|
1165
1175
|
signal?: AbortSignal;
|
|
1166
1176
|
}
|
|
1167
1177
|
/**
|
|
@@ -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, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, PluginCommandRegistration, ExperimentalComposerCommandRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } 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, 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
|
|
|
@@ -118,6 +118,7 @@ interface CollectedPluginAppRegistrations {
|
|
|
118
118
|
messageDirectives: PluginMessageDirectiveRegistration[];
|
|
119
119
|
codeFenceRenderers: ExperimentalCodeFenceRendererRegistration[];
|
|
120
120
|
messageActions: PluginMessageActionRegistration[];
|
|
121
|
+
messageMetadata: ExperimentalMessageMetadataRegistration[];
|
|
121
122
|
commandPaletteActions: CollectedPluginCommandRegistration[];
|
|
122
123
|
providerIcons: CollectedPluginProviderIconRegistration[];
|
|
123
124
|
icons: ExperimentalIconRegistration[];
|
|
@@ -7,11 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
import { QueryClient } from '@tanstack/react-query';
|
|
9
9
|
|
|
10
|
-
interface JsonObject {
|
|
11
|
-
[key: string]: JsonValue;
|
|
12
|
-
}
|
|
13
|
-
type JsonValue = string | number | boolean | null | JsonValue[] | JsonObject;
|
|
14
|
-
|
|
15
10
|
interface ContractTagDeclarations<Input, Output> {
|
|
16
11
|
tags?(input: Input, output: Output): readonly string[];
|
|
17
12
|
keyTags?(key: string, value: Output extends Readonly<Record<string, infer Value>> ? Value : unknown): readonly string[];
|
|
@@ -87,7 +82,7 @@ interface StandardSchemaV1Issue {
|
|
|
87
82
|
}
|
|
88
83
|
type StandardSchemaV1InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
89
84
|
type StandardSchemaV1InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
90
|
-
interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema
|
|
85
|
+
interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends Omit<ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema>>, "invalidates"> {
|
|
91
86
|
readonly experimental_description?: string;
|
|
92
87
|
/**
|
|
93
88
|
* Host contracts only. When true and the daemon's response has not arrived
|
|
@@ -114,6 +109,11 @@ type PluginRpcCallInput<Method extends PluginRpcMethodContract> = StandardSchema
|
|
|
114
109
|
type PluginRpcCallArgs<Method extends PluginRpcMethodContract> = null extends PluginRpcCallInput<Method> ? [input?: PluginRpcCallInput<Method>] : [input: PluginRpcCallInput<Method>];
|
|
115
110
|
type PluginRpcResult<Method extends PluginRpcMethodContract> = StandardSchemaV1InferOutput<Method["output"]>;
|
|
116
111
|
|
|
112
|
+
interface JsonObject {
|
|
113
|
+
[key: string]: JsonValue;
|
|
114
|
+
}
|
|
115
|
+
type JsonValue = string | number | boolean | null | JsonValue[] | JsonObject;
|
|
116
|
+
|
|
117
117
|
/**
|
|
118
118
|
* BB live reads are fresh for two seconds, with no polling when freshness expires.
|
|
119
119
|
* Focus does not refetch while BB's realtime connection is healthy. While
|
|
@@ -12,7 +12,6 @@ interface ContractTagDeclarations<Input, Output> {
|
|
|
12
12
|
keyTags?(key: string, value: Output extends Readonly<Record<string, infer Value>> ? Value : unknown): readonly string[];
|
|
13
13
|
invalidates?(input: Input, output: Output): readonly string[];
|
|
14
14
|
}
|
|
15
|
-
|
|
16
15
|
declare const rpcInvalidationTags: z.ZodArray<z.ZodString>;
|
|
17
16
|
declare function rpcResponseTags<Input, Output>(declarations: ContractTagDeclarations<Input, Output>, input: Input, output: Output): {
|
|
18
17
|
tags: string[];
|
|
@@ -21,3 +20,4 @@ declare function rpcResponseTags<Input, Output>(declarations: ContractTagDeclara
|
|
|
21
20
|
};
|
|
22
21
|
|
|
23
22
|
export { rpcInvalidationTags, rpcResponseTags };
|
|
23
|
+
export type { ContractTagDeclarations };
|
|
@@ -26,6 +26,10 @@ declare const availableModelSchema: z.ZodObject<{
|
|
|
26
26
|
id: z.ZodString;
|
|
27
27
|
isDefault: z.ZodBoolean;
|
|
28
28
|
model: z.ZodString;
|
|
29
|
+
reasoningDiscovery: z.ZodDefault<z.ZodEnum<{
|
|
30
|
+
known: "known";
|
|
31
|
+
unknown: "unknown";
|
|
32
|
+
}>>;
|
|
29
33
|
routeProviderId: z.ZodOptional<z.ZodString>;
|
|
30
34
|
sessionOptions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
31
35
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -24,6 +24,10 @@ declare const availableModelSchema: z.ZodObject<{
|
|
|
24
24
|
id: z.ZodString;
|
|
25
25
|
isDefault: z.ZodBoolean;
|
|
26
26
|
model: z.ZodString;
|
|
27
|
+
reasoningDiscovery: z.ZodDefault<z.ZodEnum<{
|
|
28
|
+
known: "known";
|
|
29
|
+
unknown: "unknown";
|
|
30
|
+
}>>;
|
|
27
31
|
routeProviderId: z.ZodOptional<z.ZodString>;
|
|
28
32
|
sessionOptions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
29
33
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -3894,6 +3894,7 @@ declare const threadEventSchema: z.ZodUnion<readonly [z.ZodIntersection<z.ZodDis
|
|
|
3894
3894
|
value: z.ZodString;
|
|
3895
3895
|
}, z.core.$strip>>>;
|
|
3896
3896
|
prompt: z.ZodString;
|
|
3897
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
3897
3898
|
shortLabel: z.ZodOptional<z.ZodString>;
|
|
3898
3899
|
}, z.core.$strip>>;
|
|
3899
3900
|
}, z.core.$strip>;
|
|
@@ -4052,6 +4053,7 @@ declare const threadEventSchema: z.ZodUnion<readonly [z.ZodIntersection<z.ZodDis
|
|
|
4052
4053
|
value: z.ZodString;
|
|
4053
4054
|
}, z.core.$strip>>>;
|
|
4054
4055
|
prompt: z.ZodString;
|
|
4056
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
4055
4057
|
shortLabel: z.ZodOptional<z.ZodString>;
|
|
4056
4058
|
}, z.core.$strip>>;
|
|
4057
4059
|
}, z.core.$strip>;
|
|
@@ -717,7 +717,7 @@ declare const approvalPendingInteractionPayloadSchema: z.ZodObject<{
|
|
|
717
717
|
}, z.core.$strip>], "kind">;
|
|
718
718
|
}, z.core.$strip>;
|
|
719
719
|
type ApprovalPendingInteractionPayload = z.infer<typeof approvalPendingInteractionPayloadSchema>;
|
|
720
|
-
declare const USER_QUESTION_MAX_QUESTIONS =
|
|
720
|
+
declare const USER_QUESTION_MAX_QUESTIONS = 10;
|
|
721
721
|
declare const USER_QUESTION_MAX_OPTIONS = 4;
|
|
722
722
|
declare const pendingInteractionUserQuestionQuestionSchema: z.ZodObject<{
|
|
723
723
|
allowFreeText: z.ZodBoolean;
|
|
@@ -729,6 +729,7 @@ declare const pendingInteractionUserQuestionQuestionSchema: z.ZodObject<{
|
|
|
729
729
|
value: z.ZodString;
|
|
730
730
|
}, z.core.$strip>>>;
|
|
731
731
|
prompt: z.ZodString;
|
|
732
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
732
733
|
shortLabel: z.ZodOptional<z.ZodString>;
|
|
733
734
|
}, z.core.$strip>;
|
|
734
735
|
type PendingInteractionUserQuestionQuestion = z.infer<typeof pendingInteractionUserQuestionQuestionSchema>;
|
|
@@ -744,6 +745,7 @@ declare const userQuestionPendingInteractionPayloadSchema: z.ZodObject<{
|
|
|
744
745
|
value: z.ZodString;
|
|
745
746
|
}, z.core.$strip>>>;
|
|
746
747
|
prompt: z.ZodString;
|
|
748
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
747
749
|
shortLabel: z.ZodOptional<z.ZodString>;
|
|
748
750
|
}, z.core.$strip>>;
|
|
749
751
|
}, z.core.$strip>;
|
|
@@ -791,6 +793,7 @@ declare const interactionRequestPayloadSchema: z.ZodUnion<readonly [z.ZodObject<
|
|
|
791
793
|
value: z.ZodString;
|
|
792
794
|
}, z.core.$strip>>>;
|
|
793
795
|
prompt: z.ZodString;
|
|
796
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
794
797
|
shortLabel: z.ZodOptional<z.ZodString>;
|
|
795
798
|
}, z.core.$strip>>;
|
|
796
799
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -912,6 +915,7 @@ declare const pendingInteractionPayloadSchema: z.ZodUnion<readonly [z.ZodObject<
|
|
|
912
915
|
value: z.ZodString;
|
|
913
916
|
}, z.core.$strip>>>;
|
|
914
917
|
prompt: z.ZodString;
|
|
918
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
915
919
|
shortLabel: z.ZodOptional<z.ZodString>;
|
|
916
920
|
}, z.core.$strip>>;
|
|
917
921
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1144,6 +1148,7 @@ declare const userQuestionInteractionOutcomeSchema: z.ZodObject<{
|
|
|
1144
1148
|
value: z.ZodString;
|
|
1145
1149
|
}, z.core.$strip>>>;
|
|
1146
1150
|
prompt: z.ZodString;
|
|
1151
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
1147
1152
|
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1148
1153
|
}, z.core.$strip>>;
|
|
1149
1154
|
}, z.core.$strip>;
|
|
@@ -1297,6 +1302,7 @@ declare const providerInteractionOutcomeSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
1297
1302
|
value: z.ZodString;
|
|
1298
1303
|
}, z.core.$strip>>>;
|
|
1299
1304
|
prompt: z.ZodString;
|
|
1305
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
1300
1306
|
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1301
1307
|
}, z.core.$strip>>;
|
|
1302
1308
|
}, z.core.$strip>;
|
|
@@ -1502,6 +1508,10 @@ declare const availableModelSchema: z.ZodObject<{
|
|
|
1502
1508
|
id: z.ZodString;
|
|
1503
1509
|
isDefault: z.ZodBoolean;
|
|
1504
1510
|
model: z.ZodString;
|
|
1511
|
+
reasoningDiscovery: z.ZodDefault<z.ZodEnum<{
|
|
1512
|
+
known: "known";
|
|
1513
|
+
unknown: "unknown";
|
|
1514
|
+
}>>;
|
|
1505
1515
|
routeProviderId: z.ZodOptional<z.ZodString>;
|
|
1506
1516
|
sessionOptions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1507
1517
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -4486,6 +4496,7 @@ declare const BRIDGE_REQUEST_METHODS: {
|
|
|
4486
4496
|
declare const modelListParamsSchema: z.ZodObject<{
|
|
4487
4497
|
cwd: z.ZodOptional<z.ZodString>;
|
|
4488
4498
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4499
|
+
selectedModel: z.ZodOptional<z.ZodString>;
|
|
4489
4500
|
}, z.core.$loose>;
|
|
4490
4501
|
declare const commandListParamsSchema: z.ZodObject<{
|
|
4491
4502
|
cwd: 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, 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';
|
|
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, ExperimentalMessageMetadataRegistration, 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, ExperimentalServers, 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
|
|
|
@@ -249,6 +249,7 @@ interface CapturedPluginApp {
|
|
|
249
249
|
messageDirectives: PluginMessageDirectiveRegistration[];
|
|
250
250
|
codeFenceRenderers: ExperimentalCodeFenceRendererRegistration[];
|
|
251
251
|
messageActions: PluginMessageActionRegistration[];
|
|
252
|
+
messageMetadata: ExperimentalMessageMetadataRegistration[];
|
|
252
253
|
providerIcons: CollectedPluginProviderIconRegistration[];
|
|
253
254
|
icons: ExperimentalIconRegistration[];
|
|
254
255
|
timelineRenderers: PluginTimelineRendererRegistration[];
|
|
@@ -455,6 +456,12 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
|
|
|
455
456
|
* that is selected in an open panel.
|
|
456
457
|
*/
|
|
457
458
|
tabVisible?: boolean;
|
|
459
|
+
/**
|
|
460
|
+
* Answer for `experimental_useServers()`. Omitted → null, as in a web
|
|
461
|
+
* browser. Pass `{ status, servers, switchTo }` to act as bb Desktop or the
|
|
462
|
+
* mobile app.
|
|
463
|
+
*/
|
|
464
|
+
servers?: ExperimentalServers | null;
|
|
458
465
|
/** Host acceptance for `useBbNavigate().experimental_openTerminal`. */
|
|
459
466
|
openTerminal?: (options: Parameters<BbNavigate["experimental_openTerminal"]>[0]) => boolean;
|
|
460
467
|
/**
|
|
@@ -270,12 +270,6 @@ type Project = z.infer<typeof projectSchema>;
|
|
|
270
270
|
declare const PROVIDER_FORK_VALUES: readonly ["none", "tip", "checkpoint"];
|
|
271
271
|
type ProviderFork = (typeof PROVIDER_FORK_VALUES)[number];
|
|
272
272
|
|
|
273
|
-
interface ContractTagDeclarations<Input, Output> {
|
|
274
|
-
tags?(input: Input, output: Output): readonly string[];
|
|
275
|
-
keyTags?(key: string, value: Output extends Readonly<Record<string, infer Value>> ? Value : unknown): readonly string[];
|
|
276
|
-
invalidates?(input: Input, output: Output): readonly string[];
|
|
277
|
-
}
|
|
278
|
-
|
|
279
273
|
declare const threadResponseSchema: z.ZodObject<{
|
|
280
274
|
activeBackgroundAgentCount: z.ZodNumber;
|
|
281
275
|
archivedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -491,6 +485,12 @@ type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
|
491
485
|
[key: string]: JsonValue;
|
|
492
486
|
};
|
|
493
487
|
|
|
488
|
+
interface ContractTagDeclarations<Input, Output> {
|
|
489
|
+
tags?(input: Input, output: Output): readonly string[];
|
|
490
|
+
keyTags?(key: string, value: Output extends Readonly<Record<string, infer Value>> ? Value : unknown): readonly string[];
|
|
491
|
+
invalidates?(input: Input, output: Output): readonly string[];
|
|
492
|
+
}
|
|
493
|
+
|
|
494
494
|
/**
|
|
495
495
|
* The validator-neutral subset of Standard Schema v1 used by plugin contracts.
|
|
496
496
|
* Zod 4 schemas implement this interface directly; other validators can do
|
|
@@ -528,7 +528,7 @@ interface StandardSchemaV1Issue {
|
|
|
528
528
|
})[];
|
|
529
529
|
}
|
|
530
530
|
type StandardSchemaV1InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
531
|
-
interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema
|
|
531
|
+
interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends Omit<ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema>>, "invalidates"> {
|
|
532
532
|
readonly experimental_description?: string;
|
|
533
533
|
/**
|
|
534
534
|
* Host contracts only. When true and the daemon's response has not arrived
|
|
@@ -1316,10 +1316,13 @@ interface FakePluginBehaviorDrivers {
|
|
|
1316
1316
|
* with the same message/code/issues the frontend client surfaces. The
|
|
1317
1317
|
* handler sees `options.experimental_caller` as its caller, `{ kind:
|
|
1318
1318
|
* "client" }` by default; pass `{ kind: "plugin", pluginId }` to act as
|
|
1319
|
-
* another plugin calling through `bb.sdk.plugins.callRpc`.
|
|
1319
|
+
* another plugin calling through `bb.sdk.plugins.callRpc`. The handler's
|
|
1320
|
+
* `experimental_signal` aborts when `options.signal` aborts or the fake
|
|
1321
|
+
* host is disposed.
|
|
1320
1322
|
*/
|
|
1321
1323
|
callRpc(method: string, input?: unknown, options?: {
|
|
1322
1324
|
experimental_caller?: ExperimentalPluginRpcCaller;
|
|
1325
|
+
signal?: AbortSignal;
|
|
1323
1326
|
}): Promise<unknown>;
|
|
1324
1327
|
/**
|
|
1325
1328
|
* Start a client watch of one read, as the first client of a watched read
|