@get-bb/plugin-sdk 0.6.94 → 0.6.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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>;
@@ -418,13 +593,10 @@ declare const changedMessageSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
418
593
  "plugins-changed": "plugins-changed";
419
594
  "provider-registrations-changed": "provider-registrations-changed";
420
595
  "server-move-changed": "server-move-changed";
596
+ "ui-preferences-changed": "ui-preferences-changed";
421
597
  }>>>;
422
598
  entity: z$1.ZodLiteral<"system">;
423
599
  type: z$1.ZodLiteral<"changed">;
424
- }, z$1.core.$strict>, z$1.ZodObject<{
425
- entity: z$1.ZodLiteral<"tags">;
426
- tags: z$1.ZodArray<z$1.ZodString>;
427
- type: z$1.ZodLiteral<"changed">;
428
600
  }, z$1.core.$strict>, z$1.ZodObject<{
429
601
  entity: z$1.ZodLiteral<"plugin">;
430
602
  pluginId: z$1.ZodString;
@@ -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<{
@@ -12239,6 +12266,7 @@ declare const timelineQuestionWorkRowSchema: z$1.ZodObject<{
12239
12266
  value: z$1.ZodString;
12240
12267
  }, z$1.core.$strip>>>;
12241
12268
  prompt: z$1.ZodString;
12269
+ required: z$1.ZodDefault<z$1.ZodBoolean>;
12242
12270
  shortLabel: z$1.ZodOptional<z$1.ZodString>;
12243
12271
  }, z$1.core.$strip>>;
12244
12272
  sourceSeqEnd: z$1.ZodNumber;
@@ -14473,6 +14501,7 @@ declare const threadPendingInteractionsResponseSchema: z$1.ZodArray<z$1.ZodUnion
14473
14501
  value: z$1.ZodString;
14474
14502
  }, z$1.core.$strip>>>;
14475
14503
  prompt: z$1.ZodString;
14504
+ required: z$1.ZodDefault<z$1.ZodBoolean>;
14476
14505
  shortLabel: z$1.ZodOptional<z$1.ZodString>;
14477
14506
  }, z$1.core.$strip>>;
14478
14507
  }, z$1.core.$strip>;
@@ -19977,7 +20006,9 @@ interface PluginRpc {
19977
20006
  * serialization. The response is `{ ok: true, result }` or
19978
20007
  * `{ ok: false, error: { code, message, issues? } }`. Each handler gets
19979
20008
  * the call's context as its second argument; `experimental_caller` names
19980
- * 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.
19981
20012
  */
19982
20013
  register<Contract extends PluginRpcContract>(contract: Contract, handlers: ExperimentalPluginRpcHandlersWithContext<Contract>, options?: {
19983
20014
  experimental_discoverable?: boolean;
@@ -20026,7 +20057,10 @@ interface PluginCliContext {
20026
20057
  cwd?: string;
20027
20058
  threadId?: string;
20028
20059
  projectId?: string;
20029
- /** 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
+ */
20030
20064
  signal?: AbortSignal;
20031
20065
  }
20032
20066
  type PluginInteractionCancelReason = "plugin-disposed" | "request-aborted" | "server-restarted" | "thread-deleted" | "thread-stopped" | "timeout" | "user";
@@ -22325,6 +22359,11 @@ interface PluginSidebarThread {
22325
22359
  * when its owner stops); null when the thread owns its own lifecycle.
22326
22360
  */
22327
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;
22328
22367
  /** The thread this one was forked from; null unless `originKind` is "fork". */
22329
22368
  sourceThreadId: string | null;
22330
22369
  sectionId: string | null;
@@ -22907,6 +22946,8 @@ interface PluginThreadActionTarget {
22907
22946
  id: string;
22908
22947
  projectId: string;
22909
22948
  parentThreadId: string | null;
22949
+ /** Which of this child's outcomes wake its parent; see `PluginSidebarThread`. */
22950
+ parentNotifications: ThreadParentNotifications;
22910
22951
  archivedAt: number | null;
22911
22952
  pinnedAt: number | null;
22912
22953
  sectionId: string | null;
@@ -24041,6 +24082,37 @@ interface ThreadChatMessageReference {
24041
24082
  */
24042
24083
  experimental_messageSeq: number;
24043
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
+ }
24044
24116
  /** Context handed to a `messageAction`'s `run`. */
24045
24117
  interface PluginMessageActionContext {
24046
24118
  /** The thread whose timeline surfaced the action. */
@@ -24439,6 +24511,8 @@ interface PluginAppSlots {
24439
24511
  */
24440
24512
  experimental_codeFenceRenderer(registration: ExperimentalCodeFenceRendererRegistration): void;
24441
24513
  messageAction(registration: PluginMessageActionRegistration): void;
24514
+ /** Register React message metadata. Experimental: see docs/api_to_audit.md. */
24515
+ experimental_messageMetadata(registration: ExperimentalMessageMetadataRegistration): void;
24442
24516
  /**
24443
24517
  * @deprecated Use `app.commands.register` with the same registration.
24444
24518
  * Both entry points share the same command registry and ID namespace.
@@ -25668,10 +25742,10 @@ interface ExperimentalRpcMutationOptions<Contract extends PluginRpcContract, Met
25668
25742
  optimistic?(input: StandardSchemaV1InferInput<Contract[Method]["input"]>, cache: ExperimentalRpcOptimisticCache<Contract>): void;
25669
25743
  }
25670
25744
  /**
25671
- * One mutation hook's state. `mutate` calls the RPC, invalidates the
25672
- * response's `invalidated` tags on this client immediately, and resolves when
25673
- * the server acknowledges the write. Matched reads refresh in the background. `error` holds the last failure
25674
- * 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`.
25675
25749
  */
25676
25750
  interface ExperimentalRpcMutationState<Method extends PluginRpcMethodContract> {
25677
25751
  /** Resolves at write acknowledgement; rejects with experimental_PluginRpcCallError. Refreshes continue in the background without releasing predictions before confirmed reads. */
@@ -25682,6 +25756,30 @@ interface ExperimentalRpcMutationState<Method extends PluginRpcMethodContract> {
25682
25756
  error: experimental_PluginRpcCallError | null;
25683
25757
  reset(): void;
25684
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
+ }
25685
25783
  /**
25686
25784
  * Everything `@get-bb/plugin-sdk/app` resolves to at runtime. The BB app builds
25687
25785
  * the real implementation and `satisfies` this interface; `bb plugin build`
@@ -25773,6 +25871,11 @@ interface PluginSdkApp {
25773
25871
  * tabs. Experimental: see docs/api_to_audit.md.
25774
25872
  */
25775
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;
25776
25879
  /**
25777
25880
  * The side panel of the surface the calling component renders in: the
25778
25881
  * thread view, the plugin page, or the New thread screen.
@@ -26485,4 +26588,4 @@ declare const experimental_THREAD_INFO_SECTION_GROUPS: {
26485
26588
  };
26486
26589
 
26487
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 };
26488
- 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, 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 };
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 };