@get-bb/plugin-sdk 0.6.90 → 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.
@@ -14,6 +14,181 @@ import { StandardSchemaV1 as StandardSchemaV1$1, StandardSchemaV1InferOutput as
14
14
  import Database from 'better-sqlite3';
15
15
  import { Context } from 'hono';
16
16
 
17
+ interface ContractTagDeclarations<Input, Output> {
18
+ tags?(input: Input, output: Output): readonly string[];
19
+ keyTags?(key: string, value: Output extends Readonly<Record<string, infer Value>> ? Value : unknown): readonly string[];
20
+ invalidates?(input: Input, output: Output): readonly string[];
21
+ }
22
+
23
+ /** A JSON-safe path segment reported by a Standard Schema validation issue. */
24
+ type PluginRpcIssuePathSegment = string | number;
25
+ /** Validator-neutral validation detail carried by an RPC error envelope. */
26
+ interface PluginRpcValidationIssue {
27
+ message: string;
28
+ path?: PluginRpcIssuePathSegment[];
29
+ }
30
+ declare const rpcErrorCodes: readonly ["forbidden", "not_found", "conflict", "invalid", "invalid_json", "invalid_input", "handler_error", "invalid_output", "non_json_result", "unknown_method", "transport_error", "invalid_response", "unknown_error"];
31
+ /** RPC categories may grow. Handle unknown_error as a fallback for newer server codes. */
32
+ type PluginRpcErrorCode = (typeof rpcErrorCodes)[number];
33
+ /** A client RPC failure. Unknown server codes become unknown_error and remain in serverCode. */
34
+ declare class experimental_PluginRpcCallError extends Error {
35
+ /** Recognizes errors across the packed SDK's separately bundled entries. */
36
+ static [Symbol.hasInstance](value: unknown): boolean;
37
+ readonly code: PluginRpcErrorCode;
38
+ readonly issues?: PluginRpcValidationIssue[];
39
+ readonly status?: number;
40
+ readonly serverCode?: string;
41
+ constructor(args: PluginRpcError & {
42
+ status?: number;
43
+ serverCode?: string;
44
+ });
45
+ /** Normalize failures at the RPC boundary; preserves an existing client error. */
46
+ static from(error: unknown, fallback?: PluginRpcErrorCode): experimental_PluginRpcCallError;
47
+ }
48
+ /** Structured RPC failure returned as `{ ok: false, error }`. */
49
+ interface PluginRpcError {
50
+ code: PluginRpcErrorCode;
51
+ message: string;
52
+ issues?: PluginRpcValidationIssue[];
53
+ }
54
+ declare const refusalBrand: unique symbol;
55
+ /** Expected handler refusal; reaches callers without recording a plugin crash. */
56
+ declare class experimental_PluginRpcRefusal extends Error {
57
+ readonly [refusalBrand] = true;
58
+ readonly code: "conflict" | "forbidden" | "invalid" | "not_found";
59
+ readonly issues?: PluginRpcValidationIssue[];
60
+ constructor(args: {
61
+ code: experimental_PluginRpcRefusal["code"];
62
+ message: string;
63
+ issues?: PluginRpcValidationIssue[];
64
+ });
65
+ }
66
+ /**
67
+ * The validator-neutral subset of Standard Schema v1 used by plugin contracts.
68
+ * Zod 4 schemas implement this interface directly; other validators can do
69
+ * the same without becoming part of BB's public protocol.
70
+ */
71
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
72
+ readonly "~standard": {
73
+ readonly version: 1;
74
+ readonly vendor: string;
75
+ readonly validate: (value: unknown) => StandardSchemaV1Result<Output> | Promise<StandardSchemaV1Result<Output>>;
76
+ readonly jsonSchema?: {
77
+ readonly input: (options: {
78
+ target: string;
79
+ }) => Record<string, unknown>;
80
+ readonly output: (options: {
81
+ target: string;
82
+ }) => Record<string, unknown>;
83
+ };
84
+ readonly types?: {
85
+ readonly input: Input;
86
+ readonly output: Output;
87
+ };
88
+ };
89
+ }
90
+ type StandardSchemaV1Result<Output> = {
91
+ readonly value: Output;
92
+ readonly issues?: undefined;
93
+ } | {
94
+ readonly issues: readonly StandardSchemaV1Issue[];
95
+ };
96
+ interface StandardSchemaV1Issue {
97
+ readonly message: string;
98
+ readonly path?: PropertyKey | readonly (PropertyKey | {
99
+ readonly key: PropertyKey;
100
+ })[];
101
+ }
102
+ type StandardSchemaV1InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
103
+ type StandardSchemaV1InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
104
+ interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends Omit<ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema>>, "invalidates"> {
105
+ readonly experimental_description?: string;
106
+ /**
107
+ * Host contracts only. When true and the daemon's response has not arrived
108
+ * within half of the call's transport timeout, bb cancels the call and sends
109
+ * it once more, the retry core uses for its own read-only daemon commands.
110
+ * Declare it only for reads that are safe to run twice.
111
+ */
112
+ readonly experimental_retryable?: boolean;
113
+ readonly input: InputSchema;
114
+ readonly output: OutputSchema;
115
+ }
116
+ type PluginRpcContract = Readonly<Record<string, PluginRpcMethodContract>>;
117
+ /** Methods callable with only keys and returning one value per string key. */
118
+ type ExperimentalRpcKeyedMethod<Contract extends PluginRpcContract> = {
119
+ [Method in keyof Contract & string]: {
120
+ keys: string[];
121
+ } extends StandardSchemaV1InferInput<Contract[Method]["input"]> ? StandardSchemaV1InferOutput<Contract[Method]["input"]> extends {
122
+ keys: string[];
123
+ } ? string extends keyof PluginRpcResult<Contract[Method]> ? Method : never : never : never;
124
+ }[keyof Contract & string];
125
+ /** One keyed method's inferred row value. */
126
+ type ExperimentalRpcKeyedValue<Method extends PluginRpcMethodContract> = PluginRpcResult<Method> extends Record<string, infer Value> ? Value : never;
127
+ type KeyedContractShape<Inputs extends Record<string, StandardSchemaV1>, Outputs extends Record<string, StandardSchemaV1>> = {
128
+ readonly [Method in keyof Inputs]: StandardSchemaV1InferOutput<Inputs[Method]> extends {
129
+ keys: string[];
130
+ } ? string extends keyof StandardSchemaV1InferOutput<Outputs[Method & keyof Outputs]> ? unknown : {
131
+ keyTags?: never;
132
+ } : {
133
+ keyTags?: never;
134
+ };
135
+ };
136
+ type PluginRpcContractDefinition<Inputs extends Record<string, StandardSchemaV1>, Outputs extends Record<string, StandardSchemaV1>> = {
137
+ readonly [Method in keyof Outputs]: {
138
+ readonly output: Outputs[Method];
139
+ };
140
+ } & {
141
+ readonly [Method in keyof Inputs]: PluginRpcMethodContract<Inputs[Method], Outputs[Method & keyof Outputs]>;
142
+ } & NoInfer<KeyedContractShape<Inputs, Outputs>>;
143
+ /**
144
+ * Define a shared RPC contract while preserving exact method/schema types.
145
+ * `tags` and `keyTags` receive each method's parsed input and output types.
146
+ * A method declaring keyTags must accept parsed keys: string[] and return a
147
+ * string-indexed record. Writes do not declare what they change: the server
148
+ * calls `bb.rpc.experimental_invalidate` where the data changes, so RPC, CLI,
149
+ * agent-tool and background writes each refresh matching reads once.
150
+ */
151
+ declare function defineRpcContract<const Inputs extends Record<string, StandardSchemaV1>, const Outputs extends Record<string, StandardSchemaV1>>(contract: PluginRpcContractDefinition<Inputs, Outputs>): {
152
+ readonly [Method in keyof Inputs]: PluginRpcMethodContract<Inputs[Method], Outputs[Method & keyof Outputs]>;
153
+ } & KeyedContractShape<Inputs, Outputs>;
154
+ /**
155
+ * Who invoked an rpc method. `plugin` means another loaded plugin (or this
156
+ * one) called through its own `bb.sdk.plugins.callRpc`; the host verifies
157
+ * that with a per-load token only the server knows. Every other caller — the
158
+ * app, the `bb` CLI, agents, and bb itself — is `client`.
159
+ */
160
+ type ExperimentalPluginRpcCaller = {
161
+ readonly kind: "plugin";
162
+ readonly pluginId: string;
163
+ } | {
164
+ readonly kind: "client";
165
+ };
166
+ /** Second argument of every rpc handler. */
167
+ interface ExperimentalPluginRpcHandlerContext {
168
+ readonly experimental_caller: ExperimentalPluginRpcCaller;
169
+ /**
170
+ * Aborts when the caller stops waiting (its HTTP request disconnects) or
171
+ * when this plugin instance is reloaded, disabled or removed. A disposing
172
+ * instance's callers still waiting when the dispose drain ends are
173
+ * released with an error, so work finished after that reaches nobody.
174
+ */
175
+ readonly experimental_signal: AbortSignal;
176
+ }
177
+ type PluginRpcHandlers<Contract extends PluginRpcContract> = {
178
+ [Method in keyof Contract]: (input: StandardSchemaV1InferOutput<Contract[Method]["input"]>) => StandardSchemaV1InferInput<Contract[Method]["output"]> | Promise<StandardSchemaV1InferInput<Contract[Method]["output"]>>;
179
+ };
180
+ /**
181
+ * Handlers as `bb.rpc.register` calls them: the validated input, then the
182
+ * call's context. A `PluginRpcHandlers` map is assignable to this type, so
183
+ * handlers that ignore the context keep their one-argument signature.
184
+ */
185
+ type ExperimentalPluginRpcHandlersWithContext<Contract extends PluginRpcContract> = {
186
+ [Method in keyof Contract]: (input: StandardSchemaV1InferOutput<Contract[Method]["input"]>, context: ExperimentalPluginRpcHandlerContext) => StandardSchemaV1InferInput<Contract[Method]["output"]> | Promise<StandardSchemaV1InferInput<Contract[Method]["output"]>>;
187
+ };
188
+ type PluginRpcCallInput<Method extends PluginRpcMethodContract> = StandardSchemaV1InferInput<Method["input"]>;
189
+ type PluginRpcCallArgs<Method extends PluginRpcMethodContract> = null extends PluginRpcCallInput<Method> ? [input?: PluginRpcCallInput<Method>] : [input: PluginRpcCallInput<Method>];
190
+ type PluginRpcResult<Method extends PluginRpcMethodContract> = StandardSchemaV1InferOutput<Method["output"]>;
191
+
17
192
  /** Input-form entry: a path, or a path with options. */
18
193
  declare const providerNativeRootInputSchema: z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
19
194
  ancestors: z$1.ZodOptional<z$1.ZodBoolean>;
@@ -62,7 +237,6 @@ declare const appSettingsSchema: z$1.ZodObject<{
62
237
  }>>;
63
238
  providerOrder: z$1.ZodArray<z$1.ZodString>;
64
239
  showDiagnosticEvents: z$1.ZodBoolean;
65
- showGitChanges: z$1.ZodBoolean;
66
240
  showKeyboardHints: z$1.ZodBoolean;
67
241
  steerActiveThreadOnEnter: z$1.ZodBoolean;
68
242
  streamerMode: z$1.ZodBoolean;
@@ -89,7 +263,6 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
89
263
  }>>;
90
264
  providerOrder: z$1.ZodArray<z$1.ZodString>;
91
265
  showDiagnosticEvents: z$1.ZodBoolean;
92
- showGitChanges: z$1.ZodOptional<z$1.ZodBoolean>;
93
266
  showKeyboardHints: z$1.ZodBoolean;
94
267
  showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
95
268
  steerActiveThreadOnEnter: z$1.ZodBoolean;
@@ -114,7 +287,6 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
114
287
  flat: "flat";
115
288
  }>>;
116
289
  providerOrder: z$1.ZodArray<z$1.ZodString>;
117
- showGitChanges: z$1.ZodOptional<z$1.ZodBoolean>;
118
290
  showKeyboardHints: z$1.ZodBoolean;
119
291
  showUnhandledProviderEvents: z$1.ZodBoolean;
120
292
  steerActiveThreadOnEnter: z$1.ZodBoolean;
@@ -233,6 +405,7 @@ declare const appKeybindingOverridesSchema: z$1.ZodArray<z$1.ZodObject<{
233
405
  "settings.open": "settings.open";
234
406
  "settings.openServers": "settings.openServers";
235
407
  "sidebar.toggle": "sidebar.toggle";
408
+ "terminal.find": "terminal.find";
236
409
  "terminal.open": "terminal.open";
237
410
  "thread.archive": "thread.archive";
238
411
  "thread.jump.1": "thread.jump.1";
@@ -420,13 +593,10 @@ declare const changedMessageSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
420
593
  "plugins-changed": "plugins-changed";
421
594
  "provider-registrations-changed": "provider-registrations-changed";
422
595
  "server-move-changed": "server-move-changed";
596
+ "ui-preferences-changed": "ui-preferences-changed";
423
597
  }>>>;
424
598
  entity: z$1.ZodLiteral<"system">;
425
599
  type: z$1.ZodLiteral<"changed">;
426
- }, z$1.core.$strict>, z$1.ZodObject<{
427
- entity: z$1.ZodLiteral<"tags">;
428
- tags: z$1.ZodArray<z$1.ZodString>;
429
- type: z$1.ZodLiteral<"changed">;
430
600
  }, z$1.core.$strict>, z$1.ZodObject<{
431
601
  entity: z$1.ZodLiteral<"plugin">;
432
602
  pluginId: z$1.ZodString;
@@ -529,6 +699,7 @@ declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
529
699
  performanceDiagnostics: "performanceDiagnostics";
530
700
  serverMove: "serverMove";
531
701
  sidebarMultiSelect: "sidebarMultiSelect";
702
+ threadRowMetadata: "threadRowMetadata";
532
703
  timelinePush: "timelinePush";
533
704
  unreadDividerAtAnswer: "unreadDividerAtAnswer";
534
705
  websocketCompression: "websocketCompression";
@@ -541,6 +712,7 @@ declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
541
712
  performanceDiagnostics: "performanceDiagnostics";
542
713
  serverMove: "serverMove";
543
714
  sidebarMultiSelect: "sidebarMultiSelect";
715
+ threadRowMetadata: "threadRowMetadata";
544
716
  timelinePush: "timelinePush";
545
717
  unreadDividerAtAnswer: "unreadDividerAtAnswer";
546
718
  websocketCompression: "websocketCompression";
@@ -3409,6 +3581,7 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
3409
3581
  value: z$1.ZodString;
3410
3582
  }, z$1.core.$strip>>>;
3411
3583
  prompt: z$1.ZodString;
3584
+ required: z$1.ZodDefault<z$1.ZodBoolean>;
3412
3585
  shortLabel: z$1.ZodOptional<z$1.ZodString>;
3413
3586
  }, z$1.core.$strip>>;
3414
3587
  }, z$1.core.$strip>;
@@ -3567,6 +3740,7 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
3567
3740
  value: z$1.ZodString;
3568
3741
  }, z$1.core.$strip>>>;
3569
3742
  prompt: z$1.ZodString;
3743
+ required: z$1.ZodDefault<z$1.ZodBoolean>;
3570
3744
  shortLabel: z$1.ZodOptional<z$1.ZodString>;
3571
3745
  }, z$1.core.$strip>>;
3572
3746
  }, z$1.core.$strip>;
@@ -3853,6 +4027,7 @@ declare const providerPendingInteractionSchema: z$1.ZodUnion<readonly [z$1.ZodOb
3853
4027
  value: z$1.ZodString;
3854
4028
  }, z$1.core.$strip>>>;
3855
4029
  prompt: z$1.ZodString;
4030
+ required: z$1.ZodDefault<z$1.ZodBoolean>;
3856
4031
  shortLabel: z$1.ZodOptional<z$1.ZodString>;
3857
4032
  }, z$1.core.$strip>>;
3858
4033
  }, z$1.core.$strip>;
@@ -4521,172 +4696,6 @@ interface EnvironmentRemoval {
4521
4696
  providerOwnedPath: boolean;
4522
4697
  }
4523
4698
 
4524
- interface ContractTagDeclarations<Input, Output> {
4525
- tags?(input: Input, output: Output): readonly string[];
4526
- keyTags?(key: string, value: Output extends Readonly<Record<string, infer Value>> ? Value : unknown): readonly string[];
4527
- invalidates?(input: Input, output: Output): readonly string[];
4528
- }
4529
-
4530
- /** A JSON-safe path segment reported by a Standard Schema validation issue. */
4531
- type PluginRpcIssuePathSegment = string | number;
4532
- /** Validator-neutral validation detail carried by an RPC error envelope. */
4533
- interface PluginRpcValidationIssue {
4534
- message: string;
4535
- path?: PluginRpcIssuePathSegment[];
4536
- }
4537
- declare const rpcErrorCodes: readonly ["forbidden", "not_found", "conflict", "invalid", "invalid_json", "invalid_input", "handler_error", "invalid_output", "non_json_result", "unknown_method", "transport_error", "invalid_response", "unknown_error"];
4538
- /** RPC categories may grow. Handle unknown_error as a fallback for newer server codes. */
4539
- type PluginRpcErrorCode = (typeof rpcErrorCodes)[number];
4540
- /** A client RPC failure. Unknown server codes become unknown_error and remain in serverCode. */
4541
- declare class experimental_PluginRpcCallError extends Error {
4542
- /** Recognizes errors across the packed SDK's separately bundled entries. */
4543
- static [Symbol.hasInstance](value: unknown): boolean;
4544
- readonly code: PluginRpcErrorCode;
4545
- readonly issues?: PluginRpcValidationIssue[];
4546
- readonly status?: number;
4547
- readonly serverCode?: string;
4548
- constructor(args: PluginRpcError & {
4549
- status?: number;
4550
- serverCode?: string;
4551
- });
4552
- /** Normalize failures at the RPC boundary; preserves an existing client error. */
4553
- static from(error: unknown, fallback?: PluginRpcErrorCode): experimental_PluginRpcCallError;
4554
- }
4555
- /** Structured RPC failure returned as `{ ok: false, error }`. */
4556
- interface PluginRpcError {
4557
- code: PluginRpcErrorCode;
4558
- message: string;
4559
- issues?: PluginRpcValidationIssue[];
4560
- }
4561
- declare const refusalBrand: unique symbol;
4562
- /** Expected handler refusal; reaches callers without recording a plugin crash. */
4563
- declare class experimental_PluginRpcRefusal extends Error {
4564
- readonly [refusalBrand] = true;
4565
- readonly code: "conflict" | "forbidden" | "invalid" | "not_found";
4566
- readonly issues?: PluginRpcValidationIssue[];
4567
- constructor(args: {
4568
- code: experimental_PluginRpcRefusal["code"];
4569
- message: string;
4570
- issues?: PluginRpcValidationIssue[];
4571
- });
4572
- }
4573
- /**
4574
- * The validator-neutral subset of Standard Schema v1 used by plugin contracts.
4575
- * Zod 4 schemas implement this interface directly; other validators can do
4576
- * the same without becoming part of BB's public protocol.
4577
- */
4578
- interface StandardSchemaV1<Input = unknown, Output = Input> {
4579
- readonly "~standard": {
4580
- readonly version: 1;
4581
- readonly vendor: string;
4582
- readonly validate: (value: unknown) => StandardSchemaV1Result<Output> | Promise<StandardSchemaV1Result<Output>>;
4583
- readonly jsonSchema?: {
4584
- readonly input: (options: {
4585
- target: string;
4586
- }) => Record<string, unknown>;
4587
- readonly output: (options: {
4588
- target: string;
4589
- }) => Record<string, unknown>;
4590
- };
4591
- readonly types?: {
4592
- readonly input: Input;
4593
- readonly output: Output;
4594
- };
4595
- };
4596
- }
4597
- type StandardSchemaV1Result<Output> = {
4598
- readonly value: Output;
4599
- readonly issues?: undefined;
4600
- } | {
4601
- readonly issues: readonly StandardSchemaV1Issue[];
4602
- };
4603
- interface StandardSchemaV1Issue {
4604
- readonly message: string;
4605
- readonly path?: PropertyKey | readonly (PropertyKey | {
4606
- readonly key: PropertyKey;
4607
- })[];
4608
- }
4609
- type StandardSchemaV1InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
4610
- type StandardSchemaV1InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
4611
- interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = StandardSchemaV1, OutputSchema extends StandardSchemaV1 = StandardSchemaV1> extends ContractTagDeclarations<StandardSchemaV1InferOutput<InputSchema>, StandardSchemaV1InferOutput<OutputSchema>> {
4612
- readonly experimental_description?: string;
4613
- /**
4614
- * Host contracts only. When true and the daemon's response has not arrived
4615
- * within half of the call's transport timeout, bb cancels the call and sends
4616
- * it once more, the retry core uses for its own read-only daemon commands.
4617
- * Declare it only for reads that are safe to run twice.
4618
- */
4619
- readonly experimental_retryable?: boolean;
4620
- readonly input: InputSchema;
4621
- readonly output: OutputSchema;
4622
- }
4623
- type PluginRpcContract = Readonly<Record<string, PluginRpcMethodContract>>;
4624
- /** Methods callable with only keys and returning one value per string key. */
4625
- type ExperimentalRpcKeyedMethod<Contract extends PluginRpcContract> = {
4626
- [Method in keyof Contract & string]: {
4627
- keys: string[];
4628
- } extends StandardSchemaV1InferInput<Contract[Method]["input"]> ? StandardSchemaV1InferOutput<Contract[Method]["input"]> extends {
4629
- keys: string[];
4630
- } ? string extends keyof PluginRpcResult<Contract[Method]> ? Method : never : never : never;
4631
- }[keyof Contract & string];
4632
- /** One keyed method's inferred row value. */
4633
- type ExperimentalRpcKeyedValue<Method extends PluginRpcMethodContract> = PluginRpcResult<Method> extends Record<string, infer Value> ? Value : never;
4634
- type KeyedContractShape<Inputs extends Record<string, StandardSchemaV1>, Outputs extends Record<string, StandardSchemaV1>> = {
4635
- readonly [Method in keyof Inputs]: StandardSchemaV1InferOutput<Inputs[Method]> extends {
4636
- keys: string[];
4637
- } ? string extends keyof StandardSchemaV1InferOutput<Outputs[Method & keyof Outputs]> ? unknown : {
4638
- keyTags?: never;
4639
- } : {
4640
- keyTags?: never;
4641
- };
4642
- };
4643
- type PluginRpcContractDefinition<Inputs extends Record<string, StandardSchemaV1>, Outputs extends Record<string, StandardSchemaV1>> = {
4644
- readonly [Method in keyof Outputs]: {
4645
- readonly output: Outputs[Method];
4646
- };
4647
- } & {
4648
- readonly [Method in keyof Inputs]: PluginRpcMethodContract<Inputs[Method], Outputs[Method & keyof Outputs]>;
4649
- } & NoInfer<KeyedContractShape<Inputs, Outputs>>;
4650
- /**
4651
- * Define a shared RPC contract while preserving exact method/schema types.
4652
- * `tags`, `keyTags` and `invalidates` receive each method's parsed input and
4653
- * output types. A method declaring keyTags must accept parsed keys: string[]
4654
- * and return a string-indexed record.
4655
- */
4656
- declare function defineRpcContract<const Inputs extends Record<string, StandardSchemaV1>, const Outputs extends Record<string, StandardSchemaV1>>(contract: PluginRpcContractDefinition<Inputs, Outputs>): {
4657
- readonly [Method in keyof Inputs]: PluginRpcMethodContract<Inputs[Method], Outputs[Method & keyof Outputs]>;
4658
- } & KeyedContractShape<Inputs, Outputs>;
4659
- /**
4660
- * Who invoked an rpc method. `plugin` means another loaded plugin (or this
4661
- * one) called through its own `bb.sdk.plugins.callRpc`; the host verifies
4662
- * that with a per-load token only the server knows. Every other caller — the
4663
- * app, the `bb` CLI, agents, and bb itself — is `client`.
4664
- */
4665
- type ExperimentalPluginRpcCaller = {
4666
- readonly kind: "plugin";
4667
- readonly pluginId: string;
4668
- } | {
4669
- readonly kind: "client";
4670
- };
4671
- /** Second argument of every rpc handler. */
4672
- interface ExperimentalPluginRpcHandlerContext {
4673
- readonly experimental_caller: ExperimentalPluginRpcCaller;
4674
- }
4675
- type PluginRpcHandlers<Contract extends PluginRpcContract> = {
4676
- [Method in keyof Contract]: (input: StandardSchemaV1InferOutput<Contract[Method]["input"]>) => StandardSchemaV1InferInput<Contract[Method]["output"]> | Promise<StandardSchemaV1InferInput<Contract[Method]["output"]>>;
4677
- };
4678
- /**
4679
- * Handlers as `bb.rpc.register` calls them: the validated input, then the
4680
- * call's context. A `PluginRpcHandlers` map is assignable to this type, so
4681
- * handlers that ignore the context keep their one-argument signature.
4682
- */
4683
- type ExperimentalPluginRpcHandlersWithContext<Contract extends PluginRpcContract> = {
4684
- [Method in keyof Contract]: (input: StandardSchemaV1InferOutput<Contract[Method]["input"]>, context: ExperimentalPluginRpcHandlerContext) => StandardSchemaV1InferInput<Contract[Method]["output"]> | Promise<StandardSchemaV1InferInput<Contract[Method]["output"]>>;
4685
- };
4686
- type PluginRpcCallInput<Method extends PluginRpcMethodContract> = StandardSchemaV1InferInput<Method["input"]>;
4687
- type PluginRpcCallArgs<Method extends PluginRpcMethodContract> = null extends PluginRpcCallInput<Method> ? [input?: PluginRpcCallInput<Method>] : [input: PluginRpcCallInput<Method>];
4688
- type PluginRpcResult<Method extends PluginRpcMethodContract> = StandardSchemaV1InferOutput<Method["output"]>;
4689
-
4690
4699
  declare const threadContextResponseSchema: z$1.ZodObject<{
4691
4700
  usage: z$1.ZodNullable<z$1.ZodObject<{
4692
4701
  compactionOfferAt: z$1.ZodOptional<z$1.ZodISODateTime>;
@@ -6117,7 +6126,7 @@ declare const hostDaemonCommandRegistry: {
6117
6126
  model: z$1.ZodString;
6118
6127
  promptMode: z$1.ZodOptional<z$1.ZodLiteral<"plan">>;
6119
6128
  providerOptions: z$1.ZodType<JsonObject, unknown, z$1.core.$ZodTypeInternals<JsonObject, unknown>>;
6120
- reasoningLevel: z$1.ZodString;
6129
+ reasoningLevel: z$1.ZodOptional<z$1.ZodString>;
6121
6130
  serviceTier: z$1.ZodString;
6122
6131
  sessionOptions: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodBoolean]>>>;
6123
6132
  }, z$1.core.$strip>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
@@ -6449,7 +6458,7 @@ declare const hostDaemonCommandRegistry: {
6449
6458
  model: z$1.ZodString;
6450
6459
  promptMode: z$1.ZodOptional<z$1.ZodLiteral<"plan">>;
6451
6460
  providerOptions: z$1.ZodType<JsonObject, unknown, z$1.core.$ZodTypeInternals<JsonObject, unknown>>;
6452
- reasoningLevel: z$1.ZodString;
6461
+ reasoningLevel: z$1.ZodOptional<z$1.ZodString>;
6453
6462
  serviceTier: z$1.ZodString;
6454
6463
  sessionOptions: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodBoolean]>>>;
6455
6464
  }, z$1.core.$strip>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
@@ -6698,7 +6707,7 @@ declare const hostDaemonCommandRegistry: {
6698
6707
  model: z$1.ZodString;
6699
6708
  promptMode: z$1.ZodOptional<z$1.ZodLiteral<"plan">>;
6700
6709
  providerOptions: z$1.ZodType<JsonObject, unknown, z$1.core.$ZodTypeInternals<JsonObject, unknown>>;
6701
- reasoningLevel: z$1.ZodString;
6710
+ reasoningLevel: z$1.ZodOptional<z$1.ZodString>;
6702
6711
  serviceTier: z$1.ZodString;
6703
6712
  sessionOptions: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodBoolean]>>>;
6704
6713
  }, z$1.core.$strip>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
@@ -6915,7 +6924,7 @@ declare const hostDaemonCommandRegistry: {
6915
6924
  model: z$1.ZodString;
6916
6925
  promptMode: z$1.ZodOptional<z$1.ZodLiteral<"plan">>;
6917
6926
  providerOptions: z$1.ZodType<JsonObject, unknown, z$1.core.$ZodTypeInternals<JsonObject, unknown>>;
6918
- reasoningLevel: z$1.ZodString;
6927
+ reasoningLevel: z$1.ZodOptional<z$1.ZodString>;
6919
6928
  serviceTier: z$1.ZodString;
6920
6929
  sessionOptions: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodBoolean]>>>;
6921
6930
  }, z$1.core.$strip>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
@@ -7968,6 +7977,7 @@ declare const hostDaemonCommandRegistry: {
7968
7977
  }, z$1.core.$strict>>;
7969
7978
  cwd: z$1.ZodOptional<z$1.ZodString>;
7970
7979
  providerId: z$1.ZodString;
7980
+ selectedModel: z$1.ZodOptional<z$1.ZodString>;
7971
7981
  type: z$1.ZodLiteral<"provider.list_models">;
7972
7982
  }, z$1.core.$strip>, z$1.ZodObject<{
7973
7983
  models: z$1.ZodArray<z$1.ZodObject<{
@@ -7977,6 +7987,10 @@ declare const hostDaemonCommandRegistry: {
7977
7987
  id: z$1.ZodString;
7978
7988
  isDefault: z$1.ZodBoolean;
7979
7989
  model: z$1.ZodString;
7990
+ reasoningDiscovery: z$1.ZodDefault<z$1.ZodEnum<{
7991
+ known: "known";
7992
+ unknown: "unknown";
7993
+ }>>;
7980
7994
  routeProviderId: z$1.ZodOptional<z$1.ZodString>;
7981
7995
  sessionOptions: z$1.ZodOptional<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
7982
7996
  category: z$1.ZodOptional<z$1.ZodString>;
@@ -8018,6 +8032,10 @@ declare const hostDaemonCommandRegistry: {
8018
8032
  id: z$1.ZodString;
8019
8033
  isDefault: z$1.ZodBoolean;
8020
8034
  model: z$1.ZodString;
8035
+ reasoningDiscovery: z$1.ZodDefault<z$1.ZodEnum<{
8036
+ known: "known";
8037
+ unknown: "unknown";
8038
+ }>>;
8021
8039
  routeProviderId: z$1.ZodOptional<z$1.ZodString>;
8022
8040
  sessionOptions: z$1.ZodOptional<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
8023
8041
  category: z$1.ZodOptional<z$1.ZodString>;
@@ -9868,6 +9886,10 @@ declare const systemExecutionOptionsResponseSchema: z$1.ZodObject<{
9868
9886
  id: z$1.ZodString;
9869
9887
  isDefault: z$1.ZodBoolean;
9870
9888
  model: z$1.ZodString;
9889
+ reasoningDiscovery: z$1.ZodDefault<z$1.ZodEnum<{
9890
+ known: "known";
9891
+ unknown: "unknown";
9892
+ }>>;
9871
9893
  routeProviderId: z$1.ZodOptional<z$1.ZodString>;
9872
9894
  sessionOptions: z$1.ZodOptional<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9873
9895
  category: z$1.ZodOptional<z$1.ZodString>;
@@ -10005,6 +10027,10 @@ declare const systemExecutionOptionsResponseSchema: z$1.ZodObject<{
10005
10027
  id: z$1.ZodString;
10006
10028
  isDefault: z$1.ZodBoolean;
10007
10029
  model: z$1.ZodString;
10030
+ reasoningDiscovery: z$1.ZodDefault<z$1.ZodEnum<{
10031
+ known: "known";
10032
+ unknown: "unknown";
10033
+ }>>;
10008
10034
  routeProviderId: z$1.ZodOptional<z$1.ZodString>;
10009
10035
  sessionOptions: z$1.ZodOptional<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
10010
10036
  category: z$1.ZodOptional<z$1.ZodString>;
@@ -10054,6 +10080,7 @@ declare const systemExecutionOptionsQuerySchema: z$1.ZodObject<{
10054
10080
  hostId: z$1.ZodOptional<z$1.ZodString>;
10055
10081
  projectId: z$1.ZodOptional<z$1.ZodString>;
10056
10082
  providerId: z$1.ZodOptional<z$1.ZodString>;
10083
+ selectedModel: z$1.ZodOptional<z$1.ZodString>;
10057
10084
  }, z$1.core.$strip>;
10058
10085
  type SystemExecutionOptionsQuery = z$1.infer<typeof systemExecutionOptionsQuerySchema>;
10059
10086
  declare const systemUsageLimitsQuerySchema: z$1.ZodObject<{
@@ -10362,6 +10389,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10362
10389
  "settings.open": "settings.open";
10363
10390
  "settings.openServers": "settings.openServers";
10364
10391
  "sidebar.toggle": "sidebar.toggle";
10392
+ "terminal.find": "terminal.find";
10365
10393
  "terminal.open": "terminal.open";
10366
10394
  "thread.archive": "thread.archive";
10367
10395
  "thread.jump.1": "thread.jump.1";
@@ -10434,6 +10462,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10434
10462
  performanceDiagnostics: "performanceDiagnostics";
10435
10463
  serverMove: "serverMove";
10436
10464
  sidebarMultiSelect: "sidebarMultiSelect";
10465
+ threadRowMetadata: "threadRowMetadata";
10437
10466
  timelinePush: "timelinePush";
10438
10467
  unreadDividerAtAnswer: "unreadDividerAtAnswer";
10439
10468
  websocketCompression: "websocketCompression";
@@ -10461,7 +10490,6 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10461
10490
  }>>;
10462
10491
  providerOrder: z$1.ZodArray<z$1.ZodString>;
10463
10492
  showDiagnosticEvents: z$1.ZodBoolean;
10464
- showGitChanges: z$1.ZodBoolean;
10465
10493
  showKeyboardHints: z$1.ZodBoolean;
10466
10494
  showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
10467
10495
  steerActiveThreadOnEnter: z$1.ZodBoolean;
@@ -10532,6 +10560,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10532
10560
  "settings.open": "settings.open";
10533
10561
  "settings.openServers": "settings.openServers";
10534
10562
  "sidebar.toggle": "sidebar.toggle";
10563
+ "terminal.find": "terminal.find";
10535
10564
  "terminal.open": "terminal.open";
10536
10565
  "thread.archive": "thread.archive";
10537
10566
  "thread.jump.1": "thread.jump.1";
@@ -10630,6 +10659,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10630
10659
  "settings.open": "settings.open";
10631
10660
  "settings.openServers": "settings.openServers";
10632
10661
  "sidebar.toggle": "sidebar.toggle";
10662
+ "terminal.find": "terminal.find";
10633
10663
  "terminal.open": "terminal.open";
10634
10664
  "thread.archive": "thread.archive";
10635
10665
  "thread.jump.1": "thread.jump.1";
@@ -12236,6 +12266,7 @@ declare const timelineQuestionWorkRowSchema: z$1.ZodObject<{
12236
12266
  value: z$1.ZodString;
12237
12267
  }, z$1.core.$strip>>>;
12238
12268
  prompt: z$1.ZodString;
12269
+ required: z$1.ZodDefault<z$1.ZodBoolean>;
12239
12270
  shortLabel: z$1.ZodOptional<z$1.ZodString>;
12240
12271
  }, z$1.core.$strip>>;
12241
12272
  sourceSeqEnd: z$1.ZodNumber;
@@ -14470,6 +14501,7 @@ declare const threadPendingInteractionsResponseSchema: z$1.ZodArray<z$1.ZodUnion
14470
14501
  value: z$1.ZodString;
14471
14502
  }, z$1.core.$strip>>>;
14472
14503
  prompt: z$1.ZodString;
14504
+ required: z$1.ZodDefault<z$1.ZodBoolean>;
14473
14505
  shortLabel: z$1.ZodOptional<z$1.ZodString>;
14474
14506
  }, z$1.core.$strip>>;
14475
14507
  }, z$1.core.$strip>;
@@ -19974,7 +20006,9 @@ interface PluginRpc {
19974
20006
  * serialization. The response is `{ ok: true, result }` or
19975
20007
  * `{ ok: false, error: { code, message, issues? } }`. Each handler gets
19976
20008
  * the call's context as its second argument; `experimental_caller` names
19977
- * the plugin that called through `bb.sdk.plugins.callRpc`, or `client`.
20009
+ * the plugin that called through `bb.sdk.plugins.callRpc`, or `client`,
20010
+ * and `experimental_signal` aborts when the caller stops waiting or this
20011
+ * plugin instance is reloaded, disabled or removed.
19978
20012
  */
19979
20013
  register<Contract extends PluginRpcContract>(contract: Contract, handlers: ExperimentalPluginRpcHandlersWithContext<Contract>, options?: {
19980
20014
  experimental_discoverable?: boolean;
@@ -20023,7 +20057,10 @@ interface PluginCliContext {
20023
20057
  cwd?: string;
20024
20058
  threadId?: string;
20025
20059
  projectId?: string;
20026
- /** Aborted when the invoking CLI HTTP request disconnects. */
20060
+ /**
20061
+ * Aborted when the invoking CLI HTTP request disconnects or this plugin
20062
+ * instance is reloaded, disabled or removed.
20063
+ */
20027
20064
  signal?: AbortSignal;
20028
20065
  }
20029
20066
  type PluginInteractionCancelReason = "plugin-disposed" | "request-aborted" | "server-restarted" | "thread-deleted" | "thread-stopped" | "timeout" | "user";
@@ -21628,26 +21665,6 @@ interface PluginThreadListProps {
21628
21665
  */
21629
21666
  searchQuery: string;
21630
21667
  }
21631
- /**
21632
- * Props passed to an `experimental_threadHeaderAction` component, rendered in
21633
- * the thread header's action row.
21634
- */
21635
- interface PluginThreadHeaderActionProps {
21636
- /**
21637
- * The thread this header belongs to. Never null: the slot is not rendered
21638
- * on the compose screen or other non-thread routes. A split layout renders
21639
- * one header per pane, so the component mounts once per visible thread,
21640
- * each with its own id — keep per-thread state in the component, never in a
21641
- * module-level singleton.
21642
- */
21643
- threadId: string;
21644
- projectId: string;
21645
- /**
21646
- * True on phone-width viewports and coarse pointers. Collapse to an
21647
- * icon-sized control when it is true — the row is short.
21648
- */
21649
- isCompactViewport: boolean;
21650
- }
21651
21668
  /** JavaScript world a Browser page expression runs in. */
21652
21669
  type ExperimentalPluginBrowserPageWorld = "isolated" | "main";
21653
21670
  interface ExperimentalPluginBrowserPageEvaluateOptions {
@@ -22342,6 +22359,11 @@ interface PluginSidebarThread {
22342
22359
  * when its owner stops); null when the thread owns its own lifecycle.
22343
22360
  */
22344
22361
  lifecycleOwnerThreadId: string | null;
22362
+ /**
22363
+ * Which of this child's outcomes wake its parent: "auto" (every outcome),
22364
+ * "stuck" (failures, interruptions, and blockers), or "off".
22365
+ */
22366
+ parentNotifications: ThreadParentNotifications;
22345
22367
  /** The thread this one was forked from; null unless `originKind` is "fork". */
22346
22368
  sourceThreadId: string | null;
22347
22369
  sectionId: string | null;
@@ -22676,27 +22698,61 @@ interface PluginSidebarThreadShortcut {
22676
22698
  ariaKeyshortcuts: string;
22677
22699
  }
22678
22700
  /**
22679
- * Render a plugin component in the thread header's action row.
22680
- *
22681
- * The frontend sibling of the backend `bb.ui.registerThreadAction`, which
22682
- * renders a host-owned button and runs server-side. Use that one for "do a
22683
- * thing"; use this one when the control must draw live state.
22684
- *
22685
- * The host places it at the left end of the action row, before the workspace
22686
- * button, git actions, the panel toggle, maximize, and close. That row is a
22687
- * 48px chrome row with 28px controls: render one inline control that fits, and
22688
- * put anything taller in a portalled popover.
22701
+ * Props passed to an `experimental_threadRowMetadata` component, rendered on a
22702
+ * thread's row in a thread list: bb's sidebar and any list that draws
22703
+ * {@link PluginSdkApp.experimental_ThreadRowMetadata}.
22689
22704
  */
22690
- interface PluginThreadHeaderActionRegistration {
22705
+ interface ExperimentalThreadRowMetadataProps<Data = undefined> {
22706
+ /** The row's thread, the same value the list renders. */
22707
+ thread: PluginSidebarThread;
22708
+ /** What `useData` last returned; undefined when the registration has none. */
22709
+ data: Data;
22710
+ }
22711
+ /** What a row metadata registration's `useData` receives. */
22712
+ interface ExperimentalThreadRowMetadataDataInput {
22713
+ /**
22714
+ * Every thread a list may draw a metadata line for: bb's active sidebar
22715
+ * threads in sidebar order, then any other thread whose line is mounted
22716
+ * (such as an archived row), deduplicated. Threads whose rows are not
22717
+ * rendered, like a windowed list's rows off screen, are included: load
22718
+ * them all in one batch so a row has its data, and its final height, when
22719
+ * it renders.
22720
+ */
22721
+ threads: readonly PluginSidebarThread[];
22722
+ }
22723
+ /**
22724
+ * A small item on a thread row's metadata line, under the title: a badge, not
22725
+ * a control. Items share one line, left to right, and the line clips at the
22726
+ * row's edge. bb's sidebar draws the line only while the `threadRowMetadata`
22727
+ * experiment is on and the user turns on Organize → Rows → Metadata, and only
22728
+ * on rows where an item shows something.
22729
+ * Load the line's data in `useData`, a React hook bb calls once for the
22730
+ * whole app while any list draws a metadata line, never per row; it
22731
+ * receives every thread a list may show, so read them in one batch (for
22732
+ * example one `experimental_useRpcKeyedQuery` over their keys). The
22733
+ * component is then a pure render of its thread and `data`; with `useData`
22734
+ * it first renders once `useData` has returned. A row that renders already
22735
+ * has its data, so rows keep their height as they scroll into view.
22736
+ * It hides the line while the row is renamed or customized and keeps it
22737
+ * visible on hover. Render null to show nothing for a thread. Keep
22738
+ * it to an icon and a few characters with a tooltip; clicks on it open the
22739
+ * thread like the rest of the row. A crash removes only this item for that
22740
+ * row.
22741
+ */
22742
+ interface ExperimentalThreadRowMetadataRegistration<Data = undefined> {
22691
22743
  /** Unique within the plugin; letters, digits, `-`, `_`. */
22692
22744
  id: string;
22693
22745
  /**
22694
- * Names the region the host wraps around your component (a labelled group).
22695
- * It does NOT label your control: an icon-only button still needs its own
22696
- * accessible name.
22746
+ * Items sort by `order` (unset sorts last), then registration order. The
22747
+ * first item starts the line.
22697
22748
  */
22698
- title: string;
22699
- component: ComponentType<PluginThreadHeaderActionProps>;
22749
+ order?: number;
22750
+ useData?(input: ExperimentalThreadRowMetadataDataInput): Data;
22751
+ component: ComponentType<ExperimentalThreadRowMetadataProps<Data>>;
22752
+ }
22753
+ /** Props for {@link PluginSdkApp.experimental_ThreadRowMetadata}. */
22754
+ interface ExperimentalThreadRowMetadataLineProps {
22755
+ thread: PluginSidebarThread;
22700
22756
  }
22701
22757
  /**
22702
22758
  * Props passed to an `experimental_threadInfoRow` or
@@ -22734,8 +22790,7 @@ interface ExperimentalThreadContextSegmentInput {
22734
22790
  projectId: string;
22735
22791
  /**
22736
22792
  * The thread's environment, or null when the thread has no environment,
22737
- * its host is not active, the environment is not a usable checkout, or the
22738
- * user turned off "Show Git changes and Commit button".
22793
+ * its host is not active, or the environment is not a usable checkout.
22739
22794
  */
22740
22795
  environment: ExperimentalThreadEnvironment | null;
22741
22796
  }
@@ -22891,6 +22946,8 @@ interface PluginThreadActionTarget {
22891
22946
  id: string;
22892
22947
  projectId: string;
22893
22948
  parentThreadId: string | null;
22949
+ /** Which of this child's outcomes wake its parent; see `PluginSidebarThread`. */
22950
+ parentNotifications: ThreadParentNotifications;
22894
22951
  archivedAt: number | null;
22895
22952
  pinnedAt: number | null;
22896
22953
  sectionId: string | null;
@@ -22963,7 +23020,8 @@ interface PluginThreadActionDataInput {
22963
23020
  /**
22964
23021
  * Every thread a visible surface currently shows actions for (sidebar rows
22965
23022
  * on screen, the open thread's header, open menus); a hidden sidebar
22966
- * contributes none. Sorted, deduplicated, and published once the set has
23023
+ * contributes none. A `"header"` action receives only the threads whose
23024
+ * header is on screen. Sorted, deduplicated, and published once the set has
22967
23025
  * been quiet for 32 ms (at most 100 ms after the first change), so rows
22968
23026
  * that mount a frame apart arrive together. Load per-thread state for these
22969
23027
  * ids, fetching only ids not loaded yet.
@@ -23016,6 +23074,9 @@ interface PluginThreadActionBulkItemInput<Data> {
23016
23074
  * derives the action for one thread from that thread and `data`, closing over
23017
23075
  * everything `run` needs, or returns null to hide it. A throw from either
23018
23076
  * drops only this registration.
23077
+ *
23078
+ * With `placement: "header"` the action is a button in the open thread's
23079
+ * header instead (see {@link PluginThreadActionPlacement}).
23019
23080
  */
23020
23081
  interface PluginThreadActionRegistration<Data = undefined> {
23021
23082
  /** Unique within the plugin; letters, digits, `-`, `_`. */
@@ -23033,6 +23094,8 @@ interface PluginThreadActionRegistration<Data = undefined> {
23033
23094
  */
23034
23095
  group: string;
23035
23096
  order?: number;
23097
+ /** Where the action shows; defaults to `"menu"`. */
23098
+ placement?: PluginThreadActionPlacement;
23036
23099
  useData?(input: PluginThreadActionDataInput): Data;
23037
23100
  item(input: PluginThreadActionItemInput<Data>): PluginThreadAction | null;
23038
23101
  /**
@@ -23045,6 +23108,21 @@ interface PluginThreadActionRegistration<Data = undefined> {
23045
23108
  */
23046
23109
  experimental_bulkItem?(input: PluginThreadActionBulkItemInput<Data>): PluginThreadAction | null;
23047
23110
  }
23111
+ /**
23112
+ * Where a thread action shows.
23113
+ *
23114
+ * - `"menu"`: every thread actions menu and the quick-action picker.
23115
+ * - `"header"`: only the open thread's header, as an outline button labelled
23116
+ * with the action's `label`, after the workspace's Open button. Several
23117
+ * header actions share one split button, the first as its main action. At
23118
+ * compact width and in narrow split panes the buttons fold into the
23119
+ * header's thread menu as rows at its top, after Open. `group` and `order`
23120
+ * sort header actions among themselves. Header actions never appear in
23121
+ * other menus, selection menus, `experimental_useThreadActions`, or the
23122
+ * quick-action picker, and an action that returns `choices` is left out
23123
+ * of the header.
23124
+ */
23125
+ type PluginThreadActionPlacement = "header" | "menu";
23048
23126
  /**
23049
23127
  * A thread action as {@link PluginSdkApp.experimental_useThreadActions}
23050
23128
  * returns it: `run` is bound to the caller's `requestRename` (or bb's rename
@@ -24004,6 +24082,37 @@ interface ThreadChatMessageReference {
24004
24082
  */
24005
24083
  experimental_messageSeq: number;
24006
24084
  }
24085
+ /** Stable identity and creation time of one rendered conversation message. */
24086
+ type ExperimentalMessageMetadataContext = Pick<ThreadChatMessageReference, "id" | "threadId"> & {
24087
+ /** Unix time in milliseconds, supplied by BB's timeline. */
24088
+ createdAt: number;
24089
+ /** The containing turn, or null for a message outside a turn. */
24090
+ turnId: string | null;
24091
+ } & ({
24092
+ role: "user";
24093
+ initiator: "agent" | "system" | "user";
24094
+ } | {
24095
+ role: "assistant";
24096
+ });
24097
+ /** Props for a metadata component mounted only beside realized messages. */
24098
+ interface ExperimentalMessageMetadataProps {
24099
+ message: ExperimentalMessageMetadataContext;
24100
+ }
24101
+ /**
24102
+ * Where message metadata renders. `"above"` sits over the message, aligned to
24103
+ * its side. `"actionRow"` sits in the message's action row and shows and hides
24104
+ * with the actions, before them on user messages and after the overflow menu
24105
+ * on assistant messages. It extends into the space beside the message rather
24106
+ * than narrowing the actions.
24107
+ */
24108
+ type ExperimentalMessageMetadataPlacement = "above" | "actionRow";
24109
+ /** A React contribution beside a conversation message. */
24110
+ interface ExperimentalMessageMetadataRegistration {
24111
+ id: string;
24112
+ /** Omitted means above. */
24113
+ placement?: ExperimentalMessageMetadataPlacement;
24114
+ component: ComponentType<ExperimentalMessageMetadataProps>;
24115
+ }
24007
24116
  /** Context handed to a `messageAction`'s `run`. */
24008
24117
  interface PluginMessageActionContext {
24009
24118
  /** The thread whose timeline surfaced the action. */
@@ -24342,18 +24451,19 @@ interface PluginAppSlots {
24342
24451
  * docs/api_to_audit.md.
24343
24452
  */
24344
24453
  experimental_sidebarNavigation(registration: ExperimentalSidebarNavigationRegistration): void;
24345
- /**
24346
- * Render a component in the thread header's action row (see
24347
- * {@link PluginThreadHeaderActionRegistration}). Experimental: see
24348
- * docs/api_to_audit.md.
24349
- */
24350
- experimental_threadHeaderAction(registration: PluginThreadHeaderActionRegistration): void;
24351
24454
  /**
24352
24455
  * Add context beside an existing thread's composer (see
24353
24456
  * {@link ExperimentalThreadContextSegmentRegistration}). Experimental: see
24354
24457
  * docs/api_to_audit.md.
24355
24458
  */
24356
24459
  experimental_threadContextSegment(registration: ExperimentalThreadContextSegmentRegistration): void;
24460
+ /**
24461
+ * Add a small item to the metadata line of every thread row in thread
24462
+ * lists (see
24463
+ * {@link ExperimentalThreadRowMetadataRegistration}). Experimental: see
24464
+ * docs/api_to_audit.md.
24465
+ */
24466
+ experimental_threadRowMetadata<Data = undefined>(registration: ExperimentalThreadRowMetadataRegistration<Data>): void;
24357
24467
  /**
24358
24468
  * Add a row to the thread Info tab's details block (see
24359
24469
  * {@link ExperimentalThreadInfoRowRegistration}). Experimental: see
@@ -24401,6 +24511,8 @@ interface PluginAppSlots {
24401
24511
  */
24402
24512
  experimental_codeFenceRenderer(registration: ExperimentalCodeFenceRendererRegistration): void;
24403
24513
  messageAction(registration: PluginMessageActionRegistration): void;
24514
+ /** Register React message metadata. Experimental: see docs/api_to_audit.md. */
24515
+ experimental_messageMetadata(registration: ExperimentalMessageMetadataRegistration): void;
24404
24516
  /**
24405
24517
  * @deprecated Use `app.commands.register` with the same registration.
24406
24518
  * Both entry points share the same command registry and ID namespace.
@@ -25591,7 +25703,7 @@ interface ExperimentalRpcQueryState<T> {
25591
25703
  isLoading: boolean;
25592
25704
  /** A read attempt is active, including background refreshes. Keyed consumers share this activity for their method; offline-paused reads are not fetching. */
25593
25705
  isFetching: boolean;
25594
- /** Force a read regardless of freshness and wait for its attempt/retries. Keyed reads refresh the method's subscribed keys. Failures update error and retain data; this promise resolves rather than rejecting. */
25706
+ /** 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. */
25595
25707
  refetch(): Promise<void>;
25596
25708
  }
25597
25709
  interface ExperimentalRpcKeyedQueryState<T, Selection = Record<string, T>> extends ExperimentalRpcQueryState<Selection> {
@@ -25630,10 +25742,10 @@ interface ExperimentalRpcMutationOptions<Contract extends PluginRpcContract, Met
25630
25742
  optimistic?(input: StandardSchemaV1InferInput<Contract[Method]["input"]>, cache: ExperimentalRpcOptimisticCache<Contract>): void;
25631
25743
  }
25632
25744
  /**
25633
- * One mutation hook's state. `mutate` calls the RPC, invalidates the
25634
- * response's `invalidated` tags on this client immediately, and resolves when
25635
- * the server acknowledges the write. Matched reads refresh in the background. `error` holds the last failure
25636
- * until the next `mutate` or `reset`.
25745
+ * One mutation hook's state. `mutate` calls the RPC and resolves when the
25746
+ * server acknowledges the write. Reads refresh in the background when the
25747
+ * server marks their tags stale with `bb.rpc.experimental_invalidate`.
25748
+ * `error` holds the last failure until the next `mutate` or `reset`.
25637
25749
  */
25638
25750
  interface ExperimentalRpcMutationState<Method extends PluginRpcMethodContract> {
25639
25751
  /** Resolves at write acknowledgement; rejects with experimental_PluginRpcCallError. Refreshes continue in the background without releasing predictions before confirmed reads. */
@@ -25644,6 +25756,30 @@ interface ExperimentalRpcMutationState<Method extends PluginRpcMethodContract> {
25644
25756
  error: experimental_PluginRpcCallError | null;
25645
25757
  reset(): void;
25646
25758
  }
25759
+ /**
25760
+ * A bb server this client can switch to (see
25761
+ * {@link PluginSdkApp.experimental_useServers}).
25762
+ */
25763
+ interface ExperimentalServer {
25764
+ /** Stable while the user keeps the server. Editing a custom server's URL gives it a new id. */
25765
+ id: string;
25766
+ name: string;
25767
+ /** Scheme, host and port only, never login details or a path. */
25768
+ origin: string;
25769
+ /** `local` is bb Desktop's built-in server, `account` comes from the user's bb account, and `custom` is an address the user added. */
25770
+ kind: "account" | "custom" | "local";
25771
+ /** True for the server this page is loaded from. */
25772
+ active: boolean;
25773
+ }
25774
+ /** The viewing client's servers (see {@link PluginSdkApp.experimental_useServers}). */
25775
+ interface ExperimentalServers {
25776
+ /** `loading` until bb Desktop answers, briefly after the page loads. The mobile app's list is ready at once. */
25777
+ status: "loading" | "ready";
25778
+ /** In the client's own order; empty while loading. Changes as the user adds, renames or removes servers. */
25779
+ servers: readonly ExperimentalServer[];
25780
+ /** Switch this client to the server and reload the page on it, unloading every plugin. Ignores the active server and unknown ids. */
25781
+ switchTo(id: string): void;
25782
+ }
25647
25783
  /**
25648
25784
  * Everything `@get-bb/plugin-sdk/app` resolves to at runtime. The BB app builds
25649
25785
  * the real implementation and `satisfies` this interface; `bb plugin build`
@@ -25663,7 +25799,7 @@ interface PluginSdkApp {
25663
25799
  experimental_useRpcQuery<Contract extends PluginRpcContract, Method extends keyof Contract & string>(options: ExperimentalRpcQueryOptions<Contract, Method>): ExperimentalRpcQueryState<PluginRpcResult<Contract[Method]>>;
25664
25800
  /** Call a mutating RPC through BB's query client; pending until the server acknowledges the write; matched reads refresh in the background. */
25665
25801
  experimental_useRpcMutation<Contract extends PluginRpcContract, Method extends keyof Contract & string>(options: ExperimentalRpcMutationOptions<Contract, Method>): ExperimentalRpcMutationState<Contract[Method]>;
25666
- /** Cache each key independently and batch missing or invalidated keys in the same render. */
25802
+ /** Cache each key independently and batch missing or invalidated keys in the same render. Each key is watched once while the hook holds it, so a changing key list subscribes only added keys and releases only removed ones. */
25667
25803
  experimental_useRpcKeyedQuery<Contract extends PluginRpcContract, Method extends ExperimentalRpcKeyedMethod<Contract>, Selection = Record<string, ExperimentalRpcKeyedValue<Contract[Method]>>>(options: {
25668
25804
  contract: Contract;
25669
25805
  pluginId?: string;
@@ -25735,6 +25871,11 @@ interface PluginSdkApp {
25735
25871
  * tabs. Experimental: see docs/api_to_audit.md.
25736
25872
  */
25737
25873
  experimental_useTabVisible(): boolean;
25874
+ /**
25875
+ * The servers this client can switch between, the list bb's command palette
25876
+ * offers. Null when the client keeps no server list: any web browser.
25877
+ */
25878
+ experimental_useServers(): ExperimentalServers | null;
25738
25879
  /**
25739
25880
  * The side panel of the surface the calling component renders in: the
25740
25881
  * thread view, the plugin page, or the New thread screen.
@@ -25785,7 +25926,7 @@ interface PluginSdkApp {
25785
25926
  */
25786
25927
  experimental_useArchiveEnvironmentThreads(): (environmentId: string) => Promise<void>;
25787
25928
  /**
25788
- * Every thread action for one thread, in menu order (see
25929
+ * Every `"menu"` thread action for one thread, in menu order (see
25789
25930
  * {@link PluginThreadAction} for grouping): bb's own registrations first,
25790
25931
  * then plugins' in registration order. Registrations' `useData` hooks run
25791
25932
  * once for the app, so calling this per sidebar row costs one store
@@ -25794,8 +25935,9 @@ interface PluginSdkApp {
25794
25935
  */
25795
25936
  experimental_useThreadActions(thread: PluginThreadActionTarget, options?: PluginThreadActionsOptions): readonly PluginThreadActionEntry[];
25796
25937
  /**
25797
- * Every registered thread action with its static title and icon, in menu
25798
- * order and independent of any thread: what a quick-action picker lists.
25938
+ * Every registered `"menu"` thread action with its static title and icon,
25939
+ * in menu order and independent of any thread: what a quick-action picker
25940
+ * lists.
25799
25941
  * Experimental: see docs/api_to_audit.md.
25800
25942
  */
25801
25943
  experimental_useThreadActionRegistrations(): readonly PluginThreadActionRegistrationInfo[];
@@ -25939,6 +26081,15 @@ interface PluginSdkApp {
25939
26081
  * Experimental: see docs/api_to_audit.md.
25940
26082
  */
25941
26083
  experimental_ThreadStatusGlyph: ComponentType<PluginThreadStatusGlyphProps>;
26084
+ /**
26085
+ * Every `experimental_threadRowMetadata` contribution for one thread row (see
26086
+ * {@link ExperimentalThreadRowMetadataRegistration}), the items bb's sidebar
26087
+ * draws on its rows' metadata line. Render it under your row's title, in
26088
+ * a flex parent as wide as the line. Badges such as a pull request's status then appear on your rows as they do on
26089
+ * bb's. It renders nothing when no plugin contributes an item.
26090
+ * Experimental: see docs/api_to_audit.md.
26091
+ */
26092
+ experimental_ThreadRowMetadata: ComponentType<ExperimentalThreadRowMetadataLineProps>;
25942
26093
  /**
25943
26094
  * bb's environment provider catalog (see
25944
26095
  * {@link PluginEnvironmentProvidersState}), the directory a thread's
@@ -26437,4 +26588,4 @@ declare const experimental_THREAD_INFO_SECTION_GROUPS: {
26437
26588
  };
26438
26589
 
26439
26590
  export { PLUGIN_CLI_OUTPUT_MAX_BYTES, PluginCliError, cliCommand, defineCli, defineRpcContract, experimental_PluginRpcCallError, experimental_PluginRpcRefusal, experimental_THREAD_ACTION_GROUPS, experimental_THREAD_CONTEXT_SEGMENT_GROUPS, experimental_THREAD_INFO_ROW_GROUPS, experimental_THREAD_INFO_SECTION_GROUPS, experimental_defineHostEntry };
26440
- export type { BbContext, BbNavigate, BbPluginApi, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerAttachment, ComposerCustomization, ComposerDraft, ComposerDraftReplacement, ComposerDraftSnapshot, ComposerInsertOptions, ComposerInsertPart, ComposerMention, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerSelection, ComposerSendMenuItem, ComposerSubmitOptions, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalBadge, ExperimentalBadgeTone, ExperimentalClipboardContent, ExperimentalCodeFenceRendererProps, ExperimentalCodeFenceRendererRegistration, ExperimentalCodeFenceStatus, ExperimentalComposerAction, ExperimentalComposerAttachments, ExperimentalComposerClipboard, ExperimentalComposerCommandRegistration, ExperimentalComposerCommandSearch, ExperimentalComposerCommandSuggestion, ExperimentalComposerCommandSuggestionGroup, ExperimentalComposerCommandTrigger, ExperimentalComposerContribution, ExperimentalComposerContributions, ExperimentalComposerDecorationSource, ExperimentalComposerEditor, ExperimentalComposerEditorState, ExperimentalComposerEditorVoice, ExperimentalComposerHistory, ExperimentalComposerInput, ExperimentalComposerMentionSearch, ExperimentalComposerMentionSuggestion, ExperimentalComposerMentionSuggestionGroup, ExperimentalComposerMentionTarget, ExperimentalComposerMenuEntryProps, ExperimentalComposerMenuSelection, ExperimentalComposerPendingUpload, ExperimentalComposerPlusMenuContribution, ExperimentalComposerPopupContribution, ExperimentalComposerPopupProps, ExperimentalComposerPopupRegistration, ExperimentalComposerPromptAction, ExperimentalComposerProps, ExperimentalComposerRegistration, ExperimentalComposerRendererApi, ExperimentalComposerRootProps, ExperimentalComposerSearchQuery, ExperimentalComposerSendMenuContribution, ExperimentalComposerSubmission, ExperimentalComposerThreadLink, ExperimentalComposerThreadLinkTarget, ExperimentalComposerThreadLinks, ExperimentalComposerThreadRelation, ExperimentalComposerView, ExperimentalComposerVoice, ExperimentalDesktopBrowserAcquireInput, ExperimentalDesktopBrowserCreateInput, ExperimentalDesktopBrowserLease, ExperimentalDesktopBrowserScope, ExperimentalDesktopBrowsersArea, ExperimentalDetailRowProps, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalDroppedThreadMention, ExperimentalFailedVoiceRecording, ExperimentalFailedVoiceRecordingsProps, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalImageLightboxProps, ExperimentalInfoListProps, ExperimentalInfoListRowProps, ExperimentalInfoSectionProps, ExperimentalLiveFileTarget, ExperimentalMessageClipboardPayload, ExperimentalOpenTabOptions, ExperimentalPageBreadcrumb, ExperimentalPageTitle, ExperimentalPanelController, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalPluginIconProps, ExperimentalPluginMentionImage, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealth, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginRpcCaller, ExperimentalPluginRpcHandlerContext, ExperimentalPluginRpcHandlersWithContext, ExperimentalPluginWebSocket, ExperimentalPluginWebSocketContext, ExperimentalPluginWebSocketHandler, ExperimentalPluginWebSocketHandlers, ExperimentalPromptMentionClipboardPill, ExperimentalPromptMentionIconProps, ExperimentalPromptMentionPresentation, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalQuestionFormHost, ExperimentalQuestionShortcut, ExperimentalRpcKeyedMethod, ExperimentalRpcKeyedQueryState, ExperimentalRpcKeyedValue, ExperimentalRpcMutationOptions, ExperimentalRpcMutationState, ExperimentalRpcOptimisticCache, ExperimentalRpcQueryOptions, ExperimentalRpcQueryState, ExperimentalSaveFileOutcome, ExperimentalSaveFileRequest, ExperimentalShortcutHintProps, ExperimentalShortcutPresentation, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationPlacement, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, ExperimentalSidebarNavigationTarget, ExperimentalTabContext, ExperimentalTabReference, ExperimentalTabRegistration, ExperimentalTabTargetReference, ExperimentalThreadActionTabProps, ExperimentalThreadContextSegmentInput, ExperimentalThreadContextSegmentProps, ExperimentalThreadContextSegmentReference, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadEnvironment, ExperimentalThreadInfoProps, ExperimentalThreadInfoRowRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadTabActionContext, ExperimentalThreadTabProps, ExperimentalThreadTitleTextProps, ExperimentalVoiceDelivery, ExperimentalVoiceInputButtonProps, ExperimentalVoiceInputTextareaProps, ExperimentalVoiceRecordingBarProps, InternalDoNotUsePluginHostNextTunnelStatus, InternalDoNotUsePluginNextTunnelConfig, InternalDoNotUsePluginNextTunnelServer, InternalDoNotUsePluginTunnelIngress, InternalDoNotUsePluginTunnelIngressOptions, JsonValue, MachineBootstrapApi, MachineBootstrapRequest, MachineExecutor, MachineExecutorRequest, MarkdownProps, MessageDispatchHookContext, MessageDispatchHookDecision, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiCompleteOptions, PluginAiServiceDeclaration, PluginAiServiceStatus, PluginAiServices, PluginAiTranscribeOptions, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginBbSdk, PluginBoundThreadAction, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCli, PluginCliBooleanOption, PluginCliCommand, PluginCliCommandInfo, PluginCliConstraint, PluginCliContext, PluginCliDurationOption, PluginCliDurationUnit, PluginCliEnumOption, PluginCliErrorCode, PluginCliExecutionResult, PluginCliIntegerOption, PluginCliOption, PluginCliOptionValues, PluginCliOutputLimitError, PluginCliPositional, PluginCliPositionalValues, PluginCliRegistration, PluginCliResult, PluginCliRunInput, PluginCliSpec, PluginCliStringOption, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginDispatchAttemptKind, PluginDispatchEnvironmentIntent, PluginDispatchExecution, PluginDispatchExecutionSources, PluginDispatchInput, PluginEnvironmentProvider, PluginEnvironmentProviderDeclaration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProviderRequirements, PluginEnvironmentProvidersState, PluginEnvironmentValidateDecision, PluginEnvironments, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHookHandler, PluginHookName, PluginHookSignatures, PluginHooks, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionDescription, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMachineProviderDeclaration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMachineValidateDecision, PluginMachines, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderCompletedTurnDisplay, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRowLabels, PluginRowPresentation, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerAccess, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadSplitOptions, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginThreadAction, PluginThreadActionBulkItemInput, PluginThreadActionChoice, PluginThreadActionChoices, PluginThreadActionDataInput, PluginThreadActionEntry, PluginThreadActionItemInput, PluginThreadActionRegistration, PluginThreadActionRegistrationInfo, PluginThreadActionRunInput, PluginThreadActionTarget, PluginThreadActionsContextMenuProps, PluginThreadActionsInlineItem, PluginThreadActionsMenuProps, PluginThreadActionsOptions, PluginThreadActionsTriggerProps, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadStatusGlyphProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, ReadonlyJsonValue, ServerAccessGrant, ServerAccessProviderDeclaration, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
26591
+ export type { BbContext, BbNavigate, BbPluginApi, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerAttachment, ComposerCustomization, ComposerDraft, ComposerDraftReplacement, ComposerDraftSnapshot, ComposerInsertOptions, ComposerInsertPart, ComposerMention, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerSelection, ComposerSendMenuItem, ComposerSubmitOptions, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalBadge, ExperimentalBadgeTone, ExperimentalClipboardContent, ExperimentalCodeFenceRendererProps, ExperimentalCodeFenceRendererRegistration, ExperimentalCodeFenceStatus, ExperimentalComposerAction, ExperimentalComposerAttachments, ExperimentalComposerClipboard, ExperimentalComposerCommandRegistration, ExperimentalComposerCommandSearch, ExperimentalComposerCommandSuggestion, ExperimentalComposerCommandSuggestionGroup, ExperimentalComposerCommandTrigger, ExperimentalComposerContribution, ExperimentalComposerContributions, ExperimentalComposerDecorationSource, ExperimentalComposerEditor, ExperimentalComposerEditorState, ExperimentalComposerEditorVoice, ExperimentalComposerHistory, ExperimentalComposerInput, ExperimentalComposerMentionSearch, ExperimentalComposerMentionSuggestion, ExperimentalComposerMentionSuggestionGroup, ExperimentalComposerMentionTarget, ExperimentalComposerMenuEntryProps, ExperimentalComposerMenuSelection, ExperimentalComposerPendingUpload, ExperimentalComposerPlusMenuContribution, ExperimentalComposerPopupContribution, ExperimentalComposerPopupProps, ExperimentalComposerPopupRegistration, ExperimentalComposerPromptAction, ExperimentalComposerProps, ExperimentalComposerRegistration, ExperimentalComposerRendererApi, ExperimentalComposerRootProps, ExperimentalComposerSearchQuery, ExperimentalComposerSendMenuContribution, ExperimentalComposerSubmission, ExperimentalComposerThreadLink, ExperimentalComposerThreadLinkTarget, ExperimentalComposerThreadLinks, ExperimentalComposerThreadRelation, ExperimentalComposerView, ExperimentalComposerVoice, ExperimentalDesktopBrowserAcquireInput, ExperimentalDesktopBrowserCreateInput, ExperimentalDesktopBrowserLease, ExperimentalDesktopBrowserScope, ExperimentalDesktopBrowsersArea, ExperimentalDetailRowProps, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalDroppedThreadMention, ExperimentalFailedVoiceRecording, ExperimentalFailedVoiceRecordingsProps, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalImageLightboxProps, ExperimentalInfoListProps, ExperimentalInfoListRowProps, ExperimentalInfoSectionProps, ExperimentalLiveFileTarget, ExperimentalMessageClipboardPayload, ExperimentalMessageMetadataContext, ExperimentalMessageMetadataPlacement, ExperimentalMessageMetadataProps, ExperimentalMessageMetadataRegistration, ExperimentalOpenTabOptions, ExperimentalPageBreadcrumb, ExperimentalPageTitle, ExperimentalPanelController, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalPluginIconProps, ExperimentalPluginMentionImage, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealth, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginRpcCaller, ExperimentalPluginRpcHandlerContext, ExperimentalPluginRpcHandlersWithContext, ExperimentalPluginWebSocket, ExperimentalPluginWebSocketContext, ExperimentalPluginWebSocketHandler, ExperimentalPluginWebSocketHandlers, ExperimentalPromptMentionClipboardPill, ExperimentalPromptMentionIconProps, ExperimentalPromptMentionPresentation, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalQuestionFormHost, ExperimentalQuestionShortcut, ExperimentalRpcKeyedMethod, ExperimentalRpcKeyedQueryState, ExperimentalRpcKeyedValue, ExperimentalRpcMutationOptions, ExperimentalRpcMutationState, ExperimentalRpcOptimisticCache, ExperimentalRpcQueryOptions, ExperimentalRpcQueryState, ExperimentalSaveFileOutcome, ExperimentalSaveFileRequest, ExperimentalServer, ExperimentalServers, ExperimentalShortcutHintProps, ExperimentalShortcutPresentation, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationPlacement, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, ExperimentalSidebarNavigationTarget, ExperimentalTabContext, ExperimentalTabReference, ExperimentalTabRegistration, ExperimentalTabTargetReference, ExperimentalThreadActionTabProps, ExperimentalThreadContextSegmentInput, ExperimentalThreadContextSegmentProps, ExperimentalThreadContextSegmentReference, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadEnvironment, ExperimentalThreadInfoProps, ExperimentalThreadInfoRowRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadRowMetadataDataInput, ExperimentalThreadRowMetadataLineProps, ExperimentalThreadRowMetadataProps, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadTabActionContext, ExperimentalThreadTabProps, ExperimentalThreadTitleTextProps, ExperimentalVoiceDelivery, ExperimentalVoiceInputButtonProps, ExperimentalVoiceInputTextareaProps, ExperimentalVoiceRecordingBarProps, InternalDoNotUsePluginHostNextTunnelStatus, InternalDoNotUsePluginNextTunnelConfig, InternalDoNotUsePluginNextTunnelServer, InternalDoNotUsePluginTunnelIngress, InternalDoNotUsePluginTunnelIngressOptions, JsonValue, MachineBootstrapApi, MachineBootstrapRequest, MachineExecutor, MachineExecutorRequest, MarkdownProps, MessageDispatchHookContext, MessageDispatchHookDecision, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiCompleteOptions, PluginAiServiceDeclaration, PluginAiServiceStatus, PluginAiServices, PluginAiTranscribeOptions, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginBbSdk, PluginBoundThreadAction, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCli, PluginCliBooleanOption, PluginCliCommand, PluginCliCommandInfo, PluginCliConstraint, PluginCliContext, PluginCliDurationOption, PluginCliDurationUnit, PluginCliEnumOption, PluginCliErrorCode, PluginCliExecutionResult, PluginCliIntegerOption, PluginCliOption, PluginCliOptionValues, PluginCliOutputLimitError, PluginCliPositional, PluginCliPositionalValues, PluginCliRegistration, PluginCliResult, PluginCliRunInput, PluginCliSpec, PluginCliStringOption, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginDispatchAttemptKind, PluginDispatchEnvironmentIntent, PluginDispatchExecution, PluginDispatchExecutionSources, PluginDispatchInput, PluginEnvironmentProvider, PluginEnvironmentProviderDeclaration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProviderRequirements, PluginEnvironmentProvidersState, PluginEnvironmentValidateDecision, PluginEnvironments, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHookHandler, PluginHookName, PluginHookSignatures, PluginHooks, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionDescription, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMachineProviderDeclaration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMachineValidateDecision, PluginMachines, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderCompletedTurnDisplay, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRowLabels, PluginRowPresentation, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerAccess, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadSplitOptions, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginThreadAction, PluginThreadActionBulkItemInput, PluginThreadActionChoice, PluginThreadActionChoices, PluginThreadActionDataInput, PluginThreadActionEntry, PluginThreadActionItemInput, PluginThreadActionPlacement, PluginThreadActionRegistration, PluginThreadActionRegistrationInfo, PluginThreadActionRunInput, PluginThreadActionTarget, PluginThreadActionsContextMenuProps, PluginThreadActionsInlineItem, PluginThreadActionsMenuProps, PluginThreadActionsOptions, PluginThreadActionsTriggerProps, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadListProps, PluginThreadListRegistration, PluginThreadStatusGlyphProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, ReadonlyJsonValue, ServerAccessGrant, ServerAccessProviderDeclaration, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };