@get-bb/plugin-sdk 0.5.15 → 0.5.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -178,13 +178,15 @@ slot.lifecycle.unmount();
178
178
  await scripts.lifecycle.dispose();
179
179
  ```
180
180
 
181
- `loadPluginApp` installs the runtime before a thunk import and validates all
182
- registrations. `mountPluginContentScripts` mirrors the host's ordered mount,
181
+ `loadPluginApp` installs the runtime and validates all registrations; pass the
182
+ imported module or a thunk. `@get-bb/plugin-sdk/app` exports look the runtime
183
+ up when they are called or rendered, so a static import of `app.tsx` or of
184
+ components works too. `mountPluginContentScripts` mirrors the host's ordered mount,
183
185
  rollback, independent per-window signal, and exact-once disposal. `renderSlot` supplies
184
186
  RPC, realtime, settings, navigation, context, and scoped composer behavior,
185
187
  then returns Testing Library queries plus the same behavior/inspection/lifecycle
186
- split. Use a setup-file `installTestPluginRuntime()` only when a static app
187
- import is unavoidable.
188
+ split; it installs the runtime too. Call `installTestPluginRuntime()` yourself
189
+ only when a test renders plugin components without `renderSlot`.
188
190
 
189
191
  ## Fidelity boundaries
190
192
 
@@ -275,6 +275,7 @@ declare const appKeybindingOverridesSchema: z$1.ZodArray<z$1.ZodObject<{
275
275
  "thread.previous": "thread.previous";
276
276
  "thread.rename": "thread.rename";
277
277
  "thread.search": "thread.search";
278
+ "window.find": "window.find";
278
279
  "window.new": "window.new";
279
280
  "workspace.openPreferred": "workspace.openPreferred";
280
281
  }>, z$1.ZodTemplateLiteral<`plugin:${string}/${string}`>]>;
@@ -428,6 +429,7 @@ declare const changedMessageSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
428
429
  type: z$1.ZodLiteral<"changed">;
429
430
  }, z$1.core.$strict>, z$1.ZodObject<{
430
431
  changes: z$1.ZodReadonly<z$1.ZodArray<z$1.ZodEnum<{
432
+ "app-update-changed": "app-update-changed";
431
433
  "config-changed": "config-changed";
432
434
  "environment-availability-changed": "environment-availability-changed";
433
435
  "plugins-changed": "plugins-changed";
@@ -518,10 +520,8 @@ type Environment = z$1.infer<typeof environmentSchema>;
518
520
  declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
519
521
  changelogPreview: "changelogPreview";
520
522
  mobileApp: "mobileApp";
521
- multiMachinePicker: "multiMachinePicker";
522
523
  serverMove: "serverMove";
523
524
  sidebarProgressiveDisclosure: "sidebarProgressiveDisclosure";
524
- timelineWindowing: "timelineWindowing";
525
525
  }>, z$1.ZodBoolean>;
526
526
  type Experiments = z$1.infer<typeof experimentsSchema>;
527
527
 
@@ -8963,6 +8963,12 @@ declare const hostEnrollmentCommandResponseSchema: z$1.ZodNullable<z$1.ZodObject
8963
8963
  expiresAt: z$1.ZodNumber;
8964
8964
  }, z$1.core.$strip>>;
8965
8965
  type HostEnrollmentCommandResponse = z$1.infer<typeof hostEnrollmentCommandResponseSchema>;
8966
+ declare const hostReconnectResponseSchema: z$1.ZodObject<{
8967
+ command: z$1.ZodString;
8968
+ expiresAt: z$1.ZodNumber;
8969
+ hostId: z$1.ZodString;
8970
+ }, z$1.core.$strict>;
8971
+ type HostReconnectResponse = z$1.infer<typeof hostReconnectResponseSchema>;
8966
8972
  declare const createHostJoinCodeResponseSchema: z$1.ZodObject<{
8967
8973
  expiresAt: z$1.ZodNumber;
8968
8974
  hostId: z$1.ZodString;
@@ -9650,6 +9656,7 @@ declare const systemExecutionOptionsResponseSchema: z$1.ZodObject<{
9650
9656
  provider_unavailable: "provider_unavailable";
9651
9657
  timeout: "timeout";
9652
9658
  }>;
9659
+ detail: z$1.ZodNullable<z$1.ZodString>;
9653
9660
  providerId: z$1.ZodString;
9654
9661
  }, z$1.core.$strip>>;
9655
9662
  models: z$1.ZodArray<z$1.ZodObject<{
@@ -9856,21 +9863,93 @@ declare const systemProviderStatesResponseSchema: z$1.ZodObject<{
9856
9863
  }, z$1.core.$loose>>;
9857
9864
  }, z$1.core.$strip>;
9858
9865
  type SystemProviderStatesResponse = z$1.infer<typeof systemProviderStatesResponseSchema>;
9859
- declare const systemConfigResponseSchema: z$1.ZodObject<{
9860
- aiServices: z$1.ZodObject<{
9861
- inference: z$1.ZodString;
9862
- inferenceFallback: z$1.ZodString;
9863
- services: z$1.ZodArray<z$1.ZodObject<{
9864
- displayName: z$1.ZodString;
9865
- id: z$1.ZodString;
9866
- kinds: z$1.ZodArray<z$1.ZodEnum<{
9867
- inference: "inference";
9868
- voice: "voice";
9869
- }>>;
9866
+ declare const systemAiServicesResponseSchema: z$1.ZodObject<{
9867
+ selections: z$1.ZodObject<{
9868
+ "commit-message": z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9869
+ mode: z$1.ZodLiteral<"automatic">;
9870
+ }, z$1.core.$strict>, z$1.ZodObject<{
9871
+ mode: z$1.ZodLiteral<"off">;
9872
+ }, z$1.core.$strict>, z$1.ZodObject<{
9873
+ mode: z$1.ZodLiteral<"service">;
9870
9874
  pluginId: z$1.ZodString;
9871
- }, z$1.core.$strip>>;
9872
- transcription: z$1.ZodString;
9873
- }, z$1.core.$strip>;
9875
+ serviceId: z$1.ZodString;
9876
+ }, z$1.core.$strict>], "mode">;
9877
+ "thread-title": z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9878
+ mode: z$1.ZodLiteral<"automatic">;
9879
+ }, z$1.core.$strict>, z$1.ZodObject<{
9880
+ mode: z$1.ZodLiteral<"off">;
9881
+ }, z$1.core.$strict>, z$1.ZodObject<{
9882
+ mode: z$1.ZodLiteral<"service">;
9883
+ pluginId: z$1.ZodString;
9884
+ serviceId: z$1.ZodString;
9885
+ }, z$1.core.$strict>], "mode">;
9886
+ voice: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9887
+ mode: z$1.ZodLiteral<"automatic">;
9888
+ }, z$1.core.$strict>, z$1.ZodObject<{
9889
+ mode: z$1.ZodLiteral<"off">;
9890
+ }, z$1.core.$strict>, z$1.ZodObject<{
9891
+ mode: z$1.ZodLiteral<"service">;
9892
+ pluginId: z$1.ZodString;
9893
+ serviceId: z$1.ZodString;
9894
+ }, z$1.core.$strict>], "mode">;
9895
+ }, z$1.core.$strict>;
9896
+ services: z$1.ZodArray<z$1.ZodObject<{
9897
+ automaticRank: z$1.ZodNullable<z$1.ZodNumber>;
9898
+ displayName: z$1.ZodString;
9899
+ id: z$1.ZodString;
9900
+ pluginId: z$1.ZodString;
9901
+ status: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9902
+ ready: z$1.ZodLiteral<true>;
9903
+ }, z$1.core.$strict>, z$1.ZodObject<{
9904
+ message: z$1.ZodString;
9905
+ ready: z$1.ZodLiteral<false>;
9906
+ }, z$1.core.$strict>], "ready">;
9907
+ tasks: z$1.ZodArray<z$1.ZodEnum<{
9908
+ "commit-message": "commit-message";
9909
+ "thread-title": "thread-title";
9910
+ voice: "voice";
9911
+ }>>;
9912
+ }, z$1.core.$strip>>;
9913
+ }, z$1.core.$strip>;
9914
+ type SystemAiServicesResponse = z$1.infer<typeof systemAiServicesResponseSchema>;
9915
+ declare const setAiServiceSelectionRequestSchema: z$1.ZodObject<{
9916
+ selection: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9917
+ mode: z$1.ZodLiteral<"automatic">;
9918
+ }, z$1.core.$strict>, z$1.ZodObject<{
9919
+ mode: z$1.ZodLiteral<"off">;
9920
+ }, z$1.core.$strict>, z$1.ZodObject<{
9921
+ mode: z$1.ZodLiteral<"service">;
9922
+ pluginId: z$1.ZodString;
9923
+ serviceId: z$1.ZodString;
9924
+ }, z$1.core.$strict>], "mode">;
9925
+ task: z$1.ZodEnum<{
9926
+ "commit-message": "commit-message";
9927
+ "thread-title": "thread-title";
9928
+ voice: "voice";
9929
+ }>;
9930
+ }, z$1.core.$strict>;
9931
+ type SetAiServiceSelectionRequest = z$1.infer<typeof setAiServiceSelectionRequestSchema>;
9932
+ declare const testAiServiceRequestSchema: z$1.ZodObject<{
9933
+ task: z$1.ZodEnum<{
9934
+ "commit-message": "commit-message";
9935
+ "thread-title": "thread-title";
9936
+ }>;
9937
+ }, z$1.core.$strict>;
9938
+ type TestAiServiceRequest = z$1.infer<typeof testAiServiceRequestSchema>;
9939
+ declare const testAiServiceResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9940
+ displayName: z$1.ZodString;
9941
+ durationMs: z$1.ZodNumber;
9942
+ ok: z$1.ZodLiteral<true>;
9943
+ pluginId: z$1.ZodString;
9944
+ serviceId: z$1.ZodString;
9945
+ text: z$1.ZodString;
9946
+ }, z$1.core.$strip>, z$1.ZodObject<{
9947
+ durationMs: z$1.ZodNumber;
9948
+ message: z$1.ZodString;
9949
+ ok: z$1.ZodLiteral<false>;
9950
+ }, z$1.core.$strip>], "ok">;
9951
+ type TestAiServiceResponse = z$1.infer<typeof testAiServiceResponseSchema>;
9952
+ declare const systemConfigResponseSchema: z$1.ZodObject<{
9874
9953
  appearance: z$1.ZodObject<{
9875
9954
  customCss: z$1.ZodNullable<z$1.ZodString>;
9876
9955
  faviconColor: z$1.ZodEnum<{
@@ -9964,6 +10043,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
9964
10043
  "thread.previous": "thread.previous";
9965
10044
  "thread.rename": "thread.rename";
9966
10045
  "thread.search": "thread.search";
10046
+ "window.find": "window.find";
9967
10047
  "window.new": "window.new";
9968
10048
  "workspace.openPreferred": "workspace.openPreferred";
9969
10049
  }>, z$1.ZodTemplateLiteral<`plugin:${string}/${string}`>]>;
@@ -10008,10 +10088,8 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10008
10088
  experiments: z$1.ZodRecord<z$1.ZodEnum<{
10009
10089
  changelogPreview: "changelogPreview";
10010
10090
  mobileApp: "mobileApp";
10011
- multiMachinePicker: "multiMachinePicker";
10012
10091
  serverMove: "serverMove";
10013
10092
  sidebarProgressiveDisclosure: "sidebarProgressiveDisclosure";
10014
- timelineWindowing: "timelineWindowing";
10015
10093
  }>, z$1.ZodBoolean>;
10016
10094
  featureFlags: z$1.ZodObject<{
10017
10095
  placeholder: z$1.ZodBoolean;
@@ -10107,6 +10185,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10107
10185
  "thread.previous": "thread.previous";
10108
10186
  "thread.rename": "thread.rename";
10109
10187
  "thread.search": "thread.search";
10188
+ "window.find": "window.find";
10110
10189
  "window.new": "window.new";
10111
10190
  "workspace.openPreferred": "workspace.openPreferred";
10112
10191
  }>, z$1.ZodTemplateLiteral<`plugin:${string}/${string}`>]>;
@@ -10190,6 +10269,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10190
10269
  "thread.previous": "thread.previous";
10191
10270
  "thread.rename": "thread.rename";
10192
10271
  "thread.search": "thread.search";
10272
+ "window.find": "window.find";
10193
10273
  "window.new": "window.new";
10194
10274
  "workspace.openPreferred": "workspace.openPreferred";
10195
10275
  }>, z$1.ZodTemplateLiteral<`plugin:${string}/${string}`>]>;
@@ -10317,6 +10397,94 @@ declare const systemVersionResponseSchema: z$1.ZodObject<{
10317
10397
  upgradeCommand: z$1.ZodString;
10318
10398
  }, z$1.core.$strip>;
10319
10399
  type SystemVersionResponse = z$1.infer<typeof systemVersionResponseSchema>;
10400
+ declare const systemAppUpdateStatusSchema: z$1.ZodObject<{
10401
+ activity: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
10402
+ phase: z$1.ZodLiteral<"idle">;
10403
+ }, z$1.core.$strip>, z$1.ZodObject<{
10404
+ output: z$1.ZodArray<z$1.ZodString>;
10405
+ phase: z$1.ZodLiteral<"preparing">;
10406
+ startedAt: z$1.ZodString;
10407
+ step: z$1.ZodString;
10408
+ targetVersion: z$1.ZodString;
10409
+ }, z$1.core.$strip>, z$1.ZodObject<{
10410
+ phase: z$1.ZodLiteral<"restarting">;
10411
+ startedAt: z$1.ZodString;
10412
+ targetVersion: z$1.ZodString;
10413
+ }, z$1.core.$strip>], "phase">;
10414
+ available: z$1.ZodNullable<z$1.ZodObject<{
10415
+ channel: z$1.ZodEnum<{
10416
+ latest: "latest";
10417
+ main: "main";
10418
+ nightly: "nightly";
10419
+ }>;
10420
+ commit: z$1.ZodNullable<z$1.ZodString>;
10421
+ commitCount: z$1.ZodNullable<z$1.ZodNumber>;
10422
+ subjects: z$1.ZodArray<z$1.ZodString>;
10423
+ version: z$1.ZodString;
10424
+ }, z$1.core.$strip>>;
10425
+ blocked: z$1.ZodNullable<z$1.ZodObject<{
10426
+ message: z$1.ZodString;
10427
+ reason: z$1.ZodEnum<{
10428
+ "detached-head": "detached-head";
10429
+ "fetch-failed": "fetch-failed";
10430
+ "not-on-main": "not-on-main";
10431
+ "uncommitted-changes": "uncommitted-changes";
10432
+ diverged: "diverged";
10433
+ }>;
10434
+ }, z$1.core.$strip>>;
10435
+ current: z$1.ZodObject<{
10436
+ commit: z$1.ZodNullable<z$1.ZodString>;
10437
+ version: z$1.ZodString;
10438
+ }, z$1.core.$strip>;
10439
+ lastResult: z$1.ZodNullable<z$1.ZodObject<{
10440
+ acknowledged: z$1.ZodBoolean;
10441
+ finishedAt: z$1.ZodString;
10442
+ from: z$1.ZodObject<{
10443
+ commit: z$1.ZodNullable<z$1.ZodString>;
10444
+ version: z$1.ZodString;
10445
+ }, z$1.core.$strip>;
10446
+ id: z$1.ZodString;
10447
+ logTail: z$1.ZodArray<z$1.ZodString>;
10448
+ message: z$1.ZodNullable<z$1.ZodString>;
10449
+ outcome: z$1.ZodEnum<{
10450
+ failed: "failed";
10451
+ updated: "updated";
10452
+ }>;
10453
+ phase: z$1.ZodNullable<z$1.ZodEnum<{
10454
+ install: "install";
10455
+ prepare: "prepare";
10456
+ startup: "startup";
10457
+ }>>;
10458
+ to: z$1.ZodObject<{
10459
+ commit: z$1.ZodNullable<z$1.ZodString>;
10460
+ version: z$1.ZodString;
10461
+ }, z$1.core.$strip>;
10462
+ }, z$1.core.$strip>>;
10463
+ runningThreadCount: z$1.ZodNumber;
10464
+ support: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
10465
+ kind: z$1.ZodLiteral<"supported">;
10466
+ mode: z$1.ZodEnum<{
10467
+ npm: "npm";
10468
+ source: "source";
10469
+ }>;
10470
+ }, z$1.core.$strip>, z$1.ZodObject<{
10471
+ kind: z$1.ZodLiteral<"unsupported">;
10472
+ reason: z$1.ZodEnum<{
10473
+ desktop: "desktop";
10474
+ development: "development";
10475
+ unmanaged: "unmanaged";
10476
+ }>;
10477
+ }, z$1.core.$strip>], "kind">;
10478
+ }, z$1.core.$strip>;
10479
+ type SystemAppUpdateStatus = z$1.infer<typeof systemAppUpdateStatusSchema>;
10480
+ declare const systemAppUpdateApplyRequestSchema: z$1.ZodObject<{
10481
+ confirmInterruptingThreads: z$1.ZodBoolean;
10482
+ }, z$1.core.$strip>;
10483
+ type SystemAppUpdateApplyRequest = z$1.infer<typeof systemAppUpdateApplyRequestSchema>;
10484
+ declare const systemAppUpdateAcknowledgeRequestSchema: z$1.ZodObject<{
10485
+ id: z$1.ZodString;
10486
+ }, z$1.core.$strip>;
10487
+ type SystemAppUpdateAcknowledgeRequest = z$1.infer<typeof systemAppUpdateAcknowledgeRequestSchema>;
10320
10488
  declare const systemConfigReloadResponseSchema: z$1.ZodObject<{
10321
10489
  ok: z$1.ZodLiteral<true>;
10322
10490
  }, z$1.core.$strip>;
@@ -15285,6 +15453,9 @@ interface HostRetryUpdateArgs {
15285
15453
  interface HostActionArgs {
15286
15454
  hostId: string;
15287
15455
  }
15456
+ interface HostReconnectArgs extends HostActionArgs {
15457
+ signal?: AbortSignal;
15458
+ }
15288
15459
  interface HostDirectoryArgs extends HostDirectoryQuery {
15289
15460
  hostId: string;
15290
15461
  signal?: AbortSignal;
@@ -15324,6 +15495,7 @@ type HostGetResult = Host & {
15324
15495
  connectMachineId: string | null;
15325
15496
  };
15326
15497
  type HostEnrollmentCommandResult = HostEnrollmentCommandResponse;
15498
+ type HostReconnectResult = HostReconnectResponse;
15327
15499
  type HostCloneDefaultPathResult = HostCloneDefaultPathResponse;
15328
15500
  type HostProviderCliInstallResult = HostProviderCliInstallEvent[];
15329
15501
  type HostListResult = Host[];
@@ -15337,6 +15509,7 @@ type MachineProviderListResult = SystemMachineProvider[];
15337
15509
  interface HostsArea {
15338
15510
  experimental_create(args: MachineCreateArgs): Promise<Host>;
15339
15511
  experimental_getEnrollmentCommand(args: HostGetArgs): Promise<HostEnrollmentCommandResult>;
15512
+ experimental_reconnect(args: HostReconnectArgs): Promise<HostReconnectResult>;
15340
15513
  /** @deprecated Use experimental_create() and experimental_getEnrollmentCommand() for bootstrap enrollment. */
15341
15514
  createJoinCode(): Promise<HostCreateJoinCodeResult>;
15342
15515
  delete(args: HostDeleteArgs): Promise<HostDeleteResult>;
@@ -15902,6 +16075,13 @@ interface SystemVersionArgs {
15902
16075
  force?: boolean;
15903
16076
  signal?: AbortSignal;
15904
16077
  }
16078
+ interface SystemAppUpdateArgs {
16079
+ force?: boolean;
16080
+ signal?: AbortSignal;
16081
+ }
16082
+ type SystemApplyAppUpdateArgs = SystemAppUpdateApplyRequest;
16083
+ type SystemAcknowledgeAppUpdateArgs = SystemAppUpdateAcknowledgeRequest;
16084
+ type SystemAppUpdateStatusResult = SystemAppUpdateStatus;
15905
16085
  interface SystemVoiceTranscriptionArgs {
15906
16086
  file: Blob;
15907
16087
  prompt?: string;
@@ -15909,6 +16089,13 @@ interface SystemVoiceTranscriptionArgs {
15909
16089
  }
15910
16090
  type SystemAttentionResult = SystemAttentionResponse;
15911
16091
  type SystemConfigResult = SystemConfigResponse;
16092
+ type SystemAiServicesResult = SystemAiServicesResponse;
16093
+ type SystemSetAiServiceSelectionArgs = SetAiServiceSelectionRequest;
16094
+ type SystemTestAiServiceArgs = TestAiServiceRequest;
16095
+ type SystemTestAiServiceResult = TestAiServiceResponse;
16096
+ interface SystemAiServicesArgs {
16097
+ signal?: AbortSignal;
16098
+ }
15912
16099
  type SystemExecutionOptionsResult = SystemExecutionOptionsResponse;
15913
16100
  type SystemReloadConfigResult = SystemConfigReloadResponse;
15914
16101
  type SystemInstallCliSkillsArgs = SystemInstallCliSkillsRequest;
@@ -15955,12 +16142,15 @@ interface SystemArea {
15955
16142
  }): Promise<MachineEnvironmentList>;
15956
16143
  machineEnvironment(): Promise<MachineEnvironmentList>;
15957
16144
  replaceMachineEnvironment(input: MachineEnvironmentReplace): Promise<MachineEnvironmentList>;
16145
+ aiServices(args?: SystemAiServicesArgs): Promise<SystemAiServicesResult>;
15958
16146
  attention(args?: SystemAttentionArgs): Promise<SystemAttentionResult>;
15959
16147
  config(args?: SystemConfigArgs): Promise<SystemConfigResult>;
15960
16148
  executionOptions(args?: SystemExecutionOptionsArgs): Promise<SystemExecutionOptionsResult>;
15961
16149
  cliSkillsStatus(args?: SystemCliSkillsStatusArgs): Promise<SystemCliSkillsStatusResult>;
15962
16150
  installCliSkills(args: SystemInstallCliSkillsArgs): Promise<SystemInstallCliSkillsResult>;
15963
16151
  reloadConfig(): Promise<SystemReloadConfigResult>;
16152
+ setAiServiceSelection(args: SystemSetAiServiceSelectionArgs): Promise<SystemAiServicesResult>;
16153
+ testAiService(args: SystemTestAiServiceArgs): Promise<SystemTestAiServiceResult>;
15964
16154
  transcribeVoice(args: SystemVoiceTranscriptionArgs): Promise<SystemVoiceTranscriptionResult>;
15965
16155
  uiPreferences: SystemUiPreferencesArea;
15966
16156
  updateExperiments(args: Experiments): Promise<SystemUpdateExperimentsResult>;
@@ -15969,6 +16159,9 @@ interface SystemArea {
15969
16159
  providerStates(args?: SystemProviderStatesArgs): Promise<SystemProviderStatesResult>;
15970
16160
  usageLimits(args?: SystemUsageLimitsArgs): Promise<SystemUsageLimitsResult>;
15971
16161
  version(args?: SystemVersionArgs): Promise<SystemVersionResult>;
16162
+ appUpdate(args?: SystemAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
16163
+ applyAppUpdate(args: SystemApplyAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
16164
+ acknowledgeAppUpdate(args: SystemAcknowledgeAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
15972
16165
  }
15973
16166
 
15974
16167
  interface TerminalThreadScope {
@@ -16602,6 +16795,30 @@ interface PluginPendingInteractionProps {
16602
16795
  submit(value: JsonValue$1): Promise<void>;
16603
16796
  cancel(): Promise<void>;
16604
16797
  }
16798
+ /** Display and accessibility metadata for a host-owned answer shortcut. */
16799
+ interface ExperimentalQuestionShortcut {
16800
+ label: string;
16801
+ ariaKeyshortcuts: string;
16802
+ }
16803
+ /**
16804
+ * The keyboard shortcuts bb binds while a pending interaction is open. The
16805
+ * host owns the bindings (users can remap them); a form shows them and decides
16806
+ * what choosing an option means.
16807
+ */
16808
+ interface ExperimentalQuestionFormHost {
16809
+ /**
16810
+ * Shortcut per zero-based option index, as a string (`"0"` is the first
16811
+ * option). Missing entries have no binding.
16812
+ */
16813
+ shortcuts: ReadonlyMap<string, ExperimentalQuestionShortcut>;
16814
+ /**
16815
+ * Receive the index of the option the person chose with a shortcut while
16816
+ * the thread's pane is focused. Return true when the index names an option
16817
+ * the form handled. The last registered handler wins; call the returned
16818
+ * function to unregister.
16819
+ */
16820
+ registerChoiceHandler(handler: (index: number) => boolean): () => void;
16821
+ }
16605
16822
  /**
16606
16823
  * Props for a `sidebarFooterAction` — host-rendered (no plugin component).
16607
16824
  * Deliberately empty; the registration's `run` carries the behavior.
@@ -17772,7 +17989,7 @@ interface PluginSidebarThreadActions {
17772
17989
  setRead(threadId: string, read: boolean): Promise<void>;
17773
17990
  /** Silent rename — no dialog. For inline editing in your own row. */
17774
17991
  rename(threadId: string, title: string): Promise<void>;
17775
- /** Archives the thread AND its children, closing any panes showing them. */
17992
+ /** Archives immediately, or confirms first if child threads will also be archived. */
17776
17993
  archive(threadId: string): void;
17777
17994
  /**
17778
17995
  * Opens bb's delete confirmation, which counts child threads first. Deletion
@@ -19355,6 +19572,22 @@ interface PluginSdkApp {
19355
19572
  useRealtimeConnectionState(): PluginRealtimeConnectionState;
19356
19573
  useSettings(): PluginSettingsState;
19357
19574
  useBbContext(): BbContext;
19575
+ /**
19576
+ * The id of the plugin that owns the calling component: the same id
19577
+ * `bb.pluginId` reports on the server, derived from the package name. Key
19578
+ * state the plugin keeps outside bb's per-plugin storage with it, such as
19579
+ * localStorage entries and log prefixes, so a copy of the plugin published
19580
+ * under another name does not collide with the original. Experimental: see
19581
+ * docs/api_to_audit.md.
19582
+ */
19583
+ experimental_usePluginId(): string;
19584
+ /**
19585
+ * The answer shortcuts bb binds while a pending interaction is open. Inside
19586
+ * a `pendingInteraction` component the form shows each option's shortcut and
19587
+ * registers a handler that chooses the option; outside one, the map is empty
19588
+ * and handlers never run. Experimental: see docs/api_to_audit.md.
19589
+ */
19590
+ experimental_useQuestionFormHost(): ExperimentalQuestionFormHost;
19358
19591
  useBbNavigate(): BbNavigate;
19359
19592
  /** Select one of this plugin's eligible fixed tabs on the current surface. */
19360
19593
  experimental_useAppPanel(): ExperimentalAppPanel;
@@ -19486,9 +19719,10 @@ interface PluginSdkApp {
19486
19719
  * surfaces without further work. Reserve `useRpc` for work that needs your
19487
19720
  * server: secrets, host files, or your plugin's own storage.
19488
19721
  *
19489
- * Writes made here are not optimistic in bb's surfaces; they land when the
19490
- * realtime update does. `experimental_useSidebarThreadActions()` stays the
19491
- * optimistic path for pin, read state, rename, and archive.
19722
+ * Thread title, section, and parent updates are optimistic in bb's surfaces
19723
+ * and synchronous calls are applied as one cache transaction. Other writes
19724
+ * land when their realtime update does. `experimental_useSidebarThreadActions()`
19725
+ * stays the optimistic path for pin, read state, rename, and archive.
19492
19726
  *
19493
19727
  * The client is stable for the plugin's lifetime, so it is safe in effect
19494
19728
  * and callback dependency lists.
@@ -19585,7 +19819,7 @@ interface PluginSdkApp {
19585
19819
 
19586
19820
  declare const experimental_Icon: react.ComponentType<ExperimentalIconProps>;
19587
19821
  declare const experimental_ProviderIcon: react.ComponentType<ExperimentalProviderIconProps>;
19588
- declare const definePluginApp: (setup: PluginAppSetup) => PluginAppDefinition;
19822
+ declare const definePluginApp: PluginSdkApp["definePluginApp"];
19589
19823
  declare const ThreadChat: react.ComponentType<ThreadChatProps>;
19590
19824
  declare const Markdown: react.ComponentType<MarkdownProps>;
19591
19825
  declare const experimental_FileLink: react.ComponentType<ExperimentalFileLinkProps>;
@@ -19603,6 +19837,8 @@ declare const useRealtime: (channel: string, handler: (payload: unknown) => void
19603
19837
  declare const useRealtimeConnectionState: () => PluginRealtimeConnectionState;
19604
19838
  declare const useSettings: () => PluginSettingsState;
19605
19839
  declare const useBbContext: () => BbContext;
19840
+ declare const experimental_usePluginId: () => string;
19841
+ declare const experimental_useQuestionFormHost: () => ExperimentalQuestionFormHost;
19606
19842
  declare const useBbNavigate: () => BbNavigate;
19607
19843
  declare const experimental_useAppPanel: () => ExperimentalAppPanel;
19608
19844
  declare const experimental_useFixedTabTarget: <Target extends JsonValue$1>(tab: ExperimentalPluginFixedTabReference<Target>) => ExperimentalFixedTabTargetState<Target> | null;
@@ -19629,5 +19865,5 @@ declare const useSdk: () => PluginBrowserBbSdk;
19629
19865
  declare const experimental_useProviders: () => PluginProvidersState;
19630
19866
  declare const experimental_useCodeTheme: () => PluginCodeThemeState;
19631
19867
 
19632
- export { Markdown, ThreadChat, ThreadTitle, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_Icon, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderIcon, experimental_ProviderModelPicker, experimental_SidebarNavigationIcon, experimental_SourceCode, experimental_useAppPanel, experimental_useBranches, experimental_useCheckoutState, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarNavigation, experimental_useSidebarNavigationSplit, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useEnvironmentProviders, useRealtime, useRealtimeConnectionState, useRpc, useSdk, useSettings, useSidebarSplitLayout, useSidebarThreadDraft, useSidebarThreadDraftIds, useSidebarThreadRowStatus, useSidebarThreadRowStatuses, useSidebarThreadShortcut };
19633
- export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSelection, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarHeaderRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProvider, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProvidersState, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderIconRegistration, PluginProvidersState, PluginRealtimeConnectionState, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
19868
+ export { Markdown, ThreadChat, ThreadTitle, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_Icon, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderIcon, experimental_ProviderModelPicker, experimental_SidebarNavigationIcon, experimental_SourceCode, experimental_useAppPanel, experimental_useBranches, experimental_useCheckoutState, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_usePluginId, experimental_useProviders, experimental_useQuestionFormHost, experimental_useSidebarNavigation, experimental_useSidebarNavigationSplit, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useEnvironmentProviders, useRealtime, useRealtimeConnectionState, useRpc, useSdk, useSettings, useSidebarSplitLayout, useSidebarThreadDraft, useSidebarThreadDraftIds, useSidebarThreadRowStatus, useSidebarThreadRowStatuses, useSidebarThreadShortcut };
19869
+ export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSelection, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalQuestionFormHost, ExperimentalQuestionShortcut, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarHeaderRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProvider, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProvidersState, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderIconRegistration, PluginProvidersState, PluginRealtimeConnectionState, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };