@get-bb/plugin-sdk 0.6.94 → 0.6.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.
@@ -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
- /** Aborted when the invoking CLI HTTP request disconnects. */
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, 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
 
@@ -109,6 +109,8 @@ interface CollectedPluginAppRegistrations {
109
109
  threadInfoRows: ExperimentalThreadInfoRowRegistration[];
110
110
  threadRowMetadata: ExperimentalThreadRowMetadataRegistration<unknown>[];
111
111
  threadInfoSections: ExperimentalThreadInfoSectionRegistration[];
112
+ threadContextCardRows: ExperimentalThreadContextCardRowRegistration[];
113
+ threadContextCardSections: ExperimentalThreadContextCardSectionRegistration[];
112
114
  threadActions: PluginThreadActionRegistration<unknown>[];
113
115
  browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
114
116
  fileOpeners: PluginFileOpenerRegistration[];
@@ -118,6 +120,7 @@ interface CollectedPluginAppRegistrations {
118
120
  messageDirectives: PluginMessageDirectiveRegistration[];
119
121
  codeFenceRenderers: ExperimentalCodeFenceRendererRegistration[];
120
122
  messageActions: PluginMessageActionRegistration[];
123
+ messageMetadata: ExperimentalMessageMetadataRegistration[];
121
124
  commandPaletteActions: CollectedPluginCommandRegistration[];
122
125
  providerIcons: CollectedPluginProviderIconRegistration[];
123
126
  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>;
@@ -1247,9 +1247,11 @@ declare const threadEventSchema: z.ZodUnion<readonly [z.ZodIntersection<z.ZodDis
1247
1247
  providerThreadId: z.ZodString;
1248
1248
  status: z.ZodEnum<{
1249
1249
  active: "active";
1250
+ blocked: "blocked";
1250
1251
  budgetLimited: "budgetLimited";
1251
1252
  complete: "complete";
1252
1253
  paused: "paused";
1254
+ usageLimited: "usageLimited";
1253
1255
  }>;
1254
1256
  threadId: z.ZodString;
1255
1257
  timeUsedSeconds: z.ZodNumber;
@@ -3894,6 +3896,7 @@ declare const threadEventSchema: z.ZodUnion<readonly [z.ZodIntersection<z.ZodDis
3894
3896
  value: z.ZodString;
3895
3897
  }, z.core.$strip>>>;
3896
3898
  prompt: z.ZodString;
3899
+ required: z.ZodDefault<z.ZodBoolean>;
3897
3900
  shortLabel: z.ZodOptional<z.ZodString>;
3898
3901
  }, z.core.$strip>>;
3899
3902
  }, z.core.$strip>;
@@ -4052,6 +4055,7 @@ declare const threadEventSchema: z.ZodUnion<readonly [z.ZodIntersection<z.ZodDis
4052
4055
  value: z.ZodString;
4053
4056
  }, z.core.$strip>>>;
4054
4057
  prompt: z.ZodString;
4058
+ required: z.ZodDefault<z.ZodBoolean>;
4055
4059
  shortLabel: z.ZodOptional<z.ZodString>;
4056
4060
  }, z.core.$strip>>;
4057
4061
  }, 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 = 4;
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, 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, 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, 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
 
@@ -136,6 +136,9 @@ type NavigateCall = {
136
136
  type ExperimentalPanelCall = {
137
137
  method: "openTab" | "toggleTab";
138
138
  options: ExperimentalOpenTabOptions;
139
+ } | {
140
+ method: "closeTab" | "selectTab";
141
+ key: string;
139
142
  } | {
140
143
  method: "close";
141
144
  };
@@ -240,6 +243,8 @@ interface CapturedPluginApp {
240
243
  threadInfoRows: ExperimentalThreadInfoRowRegistration[];
241
244
  threadRowMetadata: ExperimentalThreadRowMetadataRegistration<unknown>[];
242
245
  threadInfoSections: ExperimentalThreadInfoSectionRegistration[];
246
+ threadContextCardRows: ExperimentalThreadContextCardRowRegistration[];
247
+ threadContextCardSections: ExperimentalThreadContextCardSectionRegistration[];
243
248
  threadActions: PluginThreadActionRegistration<unknown>[];
244
249
  browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
245
250
  fileOpeners: PluginFileOpenerRegistration[];
@@ -249,6 +254,7 @@ interface CapturedPluginApp {
249
254
  messageDirectives: PluginMessageDirectiveRegistration[];
250
255
  codeFenceRenderers: ExperimentalCodeFenceRendererRegistration[];
251
256
  messageActions: PluginMessageActionRegistration[];
257
+ messageMetadata: ExperimentalMessageMetadataRegistration[];
252
258
  providerIcons: CollectedPluginProviderIconRegistration[];
253
259
  icons: ExperimentalIconRegistration[];
254
260
  timelineRenderers: PluginTimelineRendererRegistration[];
@@ -383,6 +389,8 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
383
389
  sidebarDraftThreadIds?: readonly string[];
384
390
  /** Experiment keys `experimental_useExperiment()` reports as on. Omitted → none. */
385
391
  experiments?: readonly string[];
392
+ /** What `experimental_useThreadContextKind()` reports. Omitted → `banner`. */
393
+ threadContextKind?: ExperimentalThreadContextKind;
386
394
  /**
387
395
  * Row statuses `useSidebarThreadRowStatus()` reports, keyed by thread id.
388
396
  * Omitted → every thread reports null.
@@ -455,6 +463,12 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
455
463
  * that is selected in an open panel.
456
464
  */
457
465
  tabVisible?: boolean;
466
+ /**
467
+ * Answer for `experimental_useServers()`. Omitted → null, as in a web
468
+ * browser. Pass `{ status, servers, switchTo }` to act as bb Desktop or the
469
+ * mobile app.
470
+ */
471
+ servers?: ExperimentalServers | null;
458
472
  /** Host acceptance for `useBbNavigate().experimental_openTerminal`. */
459
473
  openTerminal?: (options: Parameters<BbNavigate["experimental_openTerminal"]>[0]) => boolean;
460
474
  /**
@@ -463,6 +477,11 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
463
477
  * with a `target` makes that target visible to `experimental_useFixedTabTarget`.
464
478
  */
465
479
  experimental_panel?: Partial<ExperimentalPanelController>;
480
+ /**
481
+ * What `experimental_usePanelTabs()` reports. Omitted → a closed panel with
482
+ * no tabs.
483
+ */
484
+ experimental_panelTabs?: ExperimentalPanelTabs;
466
485
  /**
467
486
  * Initial session target visible to `experimental_useFixedTabTarget`.
468
487
  * Omit `panelId` for a thread fixed tab.
@@ -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 as StandardSchemaV1InferOutput$1, 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, ExperimentalPluginRpcCaller, PluginCliExecutionResult, PluginThreadEventName, PluginThreadEventPayloads, PluginAgentConfigurationContext, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginProviderEnvHealth, PluginSettingDescriptors, ExperimentalPluginWebSocketHandler, PluginAgentConfiguration, PluginHookName, PluginHookHandler, PluginAiServiceDeclaration, InternalDoNotUsePluginNextTunnelConfig, InternalDoNotUsePluginHostNextTunnelStatus, PluginInteractionRequest, MessageDispatchHookContext } from '@get-bb/plugin-sdk';
8
+ import { StandardSchemaV1 as StandardSchemaV1$1, StandardSchemaV1InferOutput as StandardSchemaV1InferOutput$1, 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, ExperimentalPluginRpcCaller, PluginCliExecutionResult, PluginThreadEventName, PluginThreadEventPayloads, PluginAgentConfigurationContext, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginProviderEnvHealth, PluginSettingDescriptors, ExperimentalPluginWebSocketHandler, PluginAgentConfiguration, PluginHookName, PluginHookHandler, PluginAiServiceDeclaration, InternalDoNotUsePluginNextTunnelConfig, InternalDoNotUsePluginHostNextTunnelStatus, PluginInteractionRequest, ExperimentalPanelController, MessageDispatchHookContext } from '@get-bb/plugin-sdk';
9
9
  import { z } from 'zod';
10
10
 
11
11
  type PluginMachineProviderResource = Exclude<JsonValue$2, null>;
@@ -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
@@ -1546,6 +1549,12 @@ declare function makeQueueEntry(overrides?: Partial<QueueEntry>): QueueEntry;
1546
1549
  * typecheck — update the default here.
1547
1550
  */
1548
1551
  declare function makeTurnFailedEvent(overrides?: Partial<TurnFailedEvent>): TurnFailedEvent;
1552
+ /**
1553
+ * A side panel controller for tests that call a command, thread action or
1554
+ * message action directly: every call declines and `getTabs()` reports a
1555
+ * closed, empty panel, except the methods in `overrides`.
1556
+ */
1557
+ declare function makePanelController(overrides?: Partial<ExperimentalPanelController>): ExperimentalPanelController;
1549
1558
 
1550
1559
  interface PublicSdkOnlyScanOptions {
1551
1560
  /**
@@ -1576,5 +1585,5 @@ interface PublicSdkOnlyScan {
1576
1585
  */
1577
1586
  declare function scanPublicSdkOnly(packageRoot: string, options?: PublicSdkOnlyScanOptions): PublicSdkOnlyScan;
1578
1587
 
1579
- export { PluginContextStaleError, createFakePluginHost, createFakeSdk, scanPublicSdkOnly as experimental_scanPublicSdkOnly, makeHostResponse, makeMessageDispatchHookContext, makePluginAgentConfigurationContext, makeQueueEntry, makeThreadResponse, makeTurnFailedEvent };
1588
+ export { PluginContextStaleError, createFakePluginHost, createFakeSdk, makePanelController as experimental_makePanelController, scanPublicSdkOnly as experimental_scanPublicSdkOnly, makeHostResponse, makeMessageDispatchHookContext, makePluginAgentConfigurationContext, makeQueueEntry, makeThreadResponse, makeTurnFailedEvent };
1580
1589
  export type { CreateFakePluginHostOptions, ExperimentalFakeHostRpcCall, FakeAgentToolRecord, FakeCliRecord, FakeHttpRouteRecord, FakeLogEntry, FakeLogLevel, FakeMentionProviderRecord, FakePluginBehaviorDrivers, FakePluginHarness, FakePluginHost, FakePluginInspectionState, FakePluginLifecycleControls, FakePluginRegistrations, FakeRealtimeSignal, FakeScheduleRecord, FakeSdkCall, FakeSdkHarness, FakeSdkOverrides, FakeServiceRecord, InternalDoNotUseFakeTunnelIngress, PublicSdkOnlyScan, PublicSdkOnlyScanOptions, PublicSdkOnlyViolation };