@get-bb/plugin-sdk 0.5.16 → 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/bundled-types/bb-plugin-sdk-app.d.ts +246 -24
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +72 -60
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +1 -0
- package/bundled-types/bb-plugin-sdk-testing.d.ts +2 -4
- package/bundled-types/bb-plugin-sdk.d.ts +306 -43
- package/dist/app.js +4 -0
- package/dist/host.js +2 -535
- package/dist/internal/host-policy.js +29 -77
- package/dist/provider-bridge-acp.js +24 -2
- package/dist/provider-bridge-testing.js +2 -1
- package/dist/provider-bridge.js +4 -506
- package/dist/testing/app.js +8 -0
- package/dist/testing/index.js +39 -83
- package/package.json +2 -7
- package/bundled-types/bb-plugin-sdk-ai-services.d.ts +0 -141
- package/dist/ai-services.js +0 -95
|
@@ -429,6 +429,7 @@ declare const changedMessageSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
|
429
429
|
type: z$1.ZodLiteral<"changed">;
|
|
430
430
|
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
431
431
|
changes: z$1.ZodReadonly<z$1.ZodArray<z$1.ZodEnum<{
|
|
432
|
+
"app-update-changed": "app-update-changed";
|
|
432
433
|
"config-changed": "config-changed";
|
|
433
434
|
"environment-availability-changed": "environment-availability-changed";
|
|
434
435
|
"plugins-changed": "plugins-changed";
|
|
@@ -519,10 +520,8 @@ type Environment = z$1.infer<typeof environmentSchema>;
|
|
|
519
520
|
declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
520
521
|
changelogPreview: "changelogPreview";
|
|
521
522
|
mobileApp: "mobileApp";
|
|
522
|
-
multiMachinePicker: "multiMachinePicker";
|
|
523
523
|
serverMove: "serverMove";
|
|
524
524
|
sidebarProgressiveDisclosure: "sidebarProgressiveDisclosure";
|
|
525
|
-
timelineWindowing: "timelineWindowing";
|
|
526
525
|
}>, z$1.ZodBoolean>;
|
|
527
526
|
type Experiments = z$1.infer<typeof experimentsSchema>;
|
|
528
527
|
|
|
@@ -8964,6 +8963,12 @@ declare const hostEnrollmentCommandResponseSchema: z$1.ZodNullable<z$1.ZodObject
|
|
|
8964
8963
|
expiresAt: z$1.ZodNumber;
|
|
8965
8964
|
}, z$1.core.$strip>>;
|
|
8966
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>;
|
|
8967
8972
|
declare const createHostJoinCodeResponseSchema: z$1.ZodObject<{
|
|
8968
8973
|
expiresAt: z$1.ZodNumber;
|
|
8969
8974
|
hostId: z$1.ZodString;
|
|
@@ -9651,6 +9656,7 @@ declare const systemExecutionOptionsResponseSchema: z$1.ZodObject<{
|
|
|
9651
9656
|
provider_unavailable: "provider_unavailable";
|
|
9652
9657
|
timeout: "timeout";
|
|
9653
9658
|
}>;
|
|
9659
|
+
detail: z$1.ZodNullable<z$1.ZodString>;
|
|
9654
9660
|
providerId: z$1.ZodString;
|
|
9655
9661
|
}, z$1.core.$strip>>;
|
|
9656
9662
|
models: z$1.ZodArray<z$1.ZodObject<{
|
|
@@ -9857,21 +9863,93 @@ declare const systemProviderStatesResponseSchema: z$1.ZodObject<{
|
|
|
9857
9863
|
}, z$1.core.$loose>>;
|
|
9858
9864
|
}, z$1.core.$strip>;
|
|
9859
9865
|
type SystemProviderStatesResponse = z$1.infer<typeof systemProviderStatesResponseSchema>;
|
|
9860
|
-
declare const
|
|
9861
|
-
|
|
9862
|
-
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
inference: "inference";
|
|
9869
|
-
voice: "voice";
|
|
9870
|
-
}>>;
|
|
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">;
|
|
9871
9874
|
pluginId: z$1.ZodString;
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
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<{
|
|
9875
9953
|
appearance: z$1.ZodObject<{
|
|
9876
9954
|
customCss: z$1.ZodNullable<z$1.ZodString>;
|
|
9877
9955
|
faviconColor: z$1.ZodEnum<{
|
|
@@ -10010,10 +10088,8 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10010
10088
|
experiments: z$1.ZodRecord<z$1.ZodEnum<{
|
|
10011
10089
|
changelogPreview: "changelogPreview";
|
|
10012
10090
|
mobileApp: "mobileApp";
|
|
10013
|
-
multiMachinePicker: "multiMachinePicker";
|
|
10014
10091
|
serverMove: "serverMove";
|
|
10015
10092
|
sidebarProgressiveDisclosure: "sidebarProgressiveDisclosure";
|
|
10016
|
-
timelineWindowing: "timelineWindowing";
|
|
10017
10093
|
}>, z$1.ZodBoolean>;
|
|
10018
10094
|
featureFlags: z$1.ZodObject<{
|
|
10019
10095
|
placeholder: z$1.ZodBoolean;
|
|
@@ -10321,6 +10397,94 @@ declare const systemVersionResponseSchema: z$1.ZodObject<{
|
|
|
10321
10397
|
upgradeCommand: z$1.ZodString;
|
|
10322
10398
|
}, z$1.core.$strip>;
|
|
10323
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>;
|
|
10324
10488
|
declare const systemConfigReloadResponseSchema: z$1.ZodObject<{
|
|
10325
10489
|
ok: z$1.ZodLiteral<true>;
|
|
10326
10490
|
}, z$1.core.$strip>;
|
|
@@ -15289,6 +15453,9 @@ interface HostRetryUpdateArgs {
|
|
|
15289
15453
|
interface HostActionArgs {
|
|
15290
15454
|
hostId: string;
|
|
15291
15455
|
}
|
|
15456
|
+
interface HostReconnectArgs extends HostActionArgs {
|
|
15457
|
+
signal?: AbortSignal;
|
|
15458
|
+
}
|
|
15292
15459
|
interface HostDirectoryArgs extends HostDirectoryQuery {
|
|
15293
15460
|
hostId: string;
|
|
15294
15461
|
signal?: AbortSignal;
|
|
@@ -15328,6 +15495,7 @@ type HostGetResult = Host & {
|
|
|
15328
15495
|
connectMachineId: string | null;
|
|
15329
15496
|
};
|
|
15330
15497
|
type HostEnrollmentCommandResult = HostEnrollmentCommandResponse;
|
|
15498
|
+
type HostReconnectResult = HostReconnectResponse;
|
|
15331
15499
|
type HostCloneDefaultPathResult = HostCloneDefaultPathResponse;
|
|
15332
15500
|
type HostProviderCliInstallResult = HostProviderCliInstallEvent[];
|
|
15333
15501
|
type HostListResult = Host[];
|
|
@@ -15341,6 +15509,7 @@ type MachineProviderListResult = SystemMachineProvider[];
|
|
|
15341
15509
|
interface HostsArea {
|
|
15342
15510
|
experimental_create(args: MachineCreateArgs): Promise<Host>;
|
|
15343
15511
|
experimental_getEnrollmentCommand(args: HostGetArgs): Promise<HostEnrollmentCommandResult>;
|
|
15512
|
+
experimental_reconnect(args: HostReconnectArgs): Promise<HostReconnectResult>;
|
|
15344
15513
|
/** @deprecated Use experimental_create() and experimental_getEnrollmentCommand() for bootstrap enrollment. */
|
|
15345
15514
|
createJoinCode(): Promise<HostCreateJoinCodeResult>;
|
|
15346
15515
|
delete(args: HostDeleteArgs): Promise<HostDeleteResult>;
|
|
@@ -15906,6 +16075,13 @@ interface SystemVersionArgs {
|
|
|
15906
16075
|
force?: boolean;
|
|
15907
16076
|
signal?: AbortSignal;
|
|
15908
16077
|
}
|
|
16078
|
+
interface SystemAppUpdateArgs {
|
|
16079
|
+
force?: boolean;
|
|
16080
|
+
signal?: AbortSignal;
|
|
16081
|
+
}
|
|
16082
|
+
type SystemApplyAppUpdateArgs = SystemAppUpdateApplyRequest;
|
|
16083
|
+
type SystemAcknowledgeAppUpdateArgs = SystemAppUpdateAcknowledgeRequest;
|
|
16084
|
+
type SystemAppUpdateStatusResult = SystemAppUpdateStatus;
|
|
15909
16085
|
interface SystemVoiceTranscriptionArgs {
|
|
15910
16086
|
file: Blob;
|
|
15911
16087
|
prompt?: string;
|
|
@@ -15913,6 +16089,13 @@ interface SystemVoiceTranscriptionArgs {
|
|
|
15913
16089
|
}
|
|
15914
16090
|
type SystemAttentionResult = SystemAttentionResponse;
|
|
15915
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
|
+
}
|
|
15916
16099
|
type SystemExecutionOptionsResult = SystemExecutionOptionsResponse;
|
|
15917
16100
|
type SystemReloadConfigResult = SystemConfigReloadResponse;
|
|
15918
16101
|
type SystemInstallCliSkillsArgs = SystemInstallCliSkillsRequest;
|
|
@@ -15959,12 +16142,15 @@ interface SystemArea {
|
|
|
15959
16142
|
}): Promise<MachineEnvironmentList>;
|
|
15960
16143
|
machineEnvironment(): Promise<MachineEnvironmentList>;
|
|
15961
16144
|
replaceMachineEnvironment(input: MachineEnvironmentReplace): Promise<MachineEnvironmentList>;
|
|
16145
|
+
aiServices(args?: SystemAiServicesArgs): Promise<SystemAiServicesResult>;
|
|
15962
16146
|
attention(args?: SystemAttentionArgs): Promise<SystemAttentionResult>;
|
|
15963
16147
|
config(args?: SystemConfigArgs): Promise<SystemConfigResult>;
|
|
15964
16148
|
executionOptions(args?: SystemExecutionOptionsArgs): Promise<SystemExecutionOptionsResult>;
|
|
15965
16149
|
cliSkillsStatus(args?: SystemCliSkillsStatusArgs): Promise<SystemCliSkillsStatusResult>;
|
|
15966
16150
|
installCliSkills(args: SystemInstallCliSkillsArgs): Promise<SystemInstallCliSkillsResult>;
|
|
15967
16151
|
reloadConfig(): Promise<SystemReloadConfigResult>;
|
|
16152
|
+
setAiServiceSelection(args: SystemSetAiServiceSelectionArgs): Promise<SystemAiServicesResult>;
|
|
16153
|
+
testAiService(args: SystemTestAiServiceArgs): Promise<SystemTestAiServiceResult>;
|
|
15968
16154
|
transcribeVoice(args: SystemVoiceTranscriptionArgs): Promise<SystemVoiceTranscriptionResult>;
|
|
15969
16155
|
uiPreferences: SystemUiPreferencesArea;
|
|
15970
16156
|
updateExperiments(args: Experiments): Promise<SystemUpdateExperimentsResult>;
|
|
@@ -15973,6 +16159,9 @@ interface SystemArea {
|
|
|
15973
16159
|
providerStates(args?: SystemProviderStatesArgs): Promise<SystemProviderStatesResult>;
|
|
15974
16160
|
usageLimits(args?: SystemUsageLimitsArgs): Promise<SystemUsageLimitsResult>;
|
|
15975
16161
|
version(args?: SystemVersionArgs): Promise<SystemVersionResult>;
|
|
16162
|
+
appUpdate(args?: SystemAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
|
|
16163
|
+
applyAppUpdate(args: SystemApplyAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
|
|
16164
|
+
acknowledgeAppUpdate(args: SystemAcknowledgeAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
|
|
15976
16165
|
}
|
|
15977
16166
|
|
|
15978
16167
|
interface TerminalThreadScope {
|
|
@@ -16606,6 +16795,30 @@ interface PluginPendingInteractionProps {
|
|
|
16606
16795
|
submit(value: JsonValue$1): Promise<void>;
|
|
16607
16796
|
cancel(): Promise<void>;
|
|
16608
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
|
+
}
|
|
16609
16822
|
/**
|
|
16610
16823
|
* Props for a `sidebarFooterAction` — host-rendered (no plugin component).
|
|
16611
16824
|
* Deliberately empty; the registration's `run` carries the behavior.
|
|
@@ -17776,7 +17989,7 @@ interface PluginSidebarThreadActions {
|
|
|
17776
17989
|
setRead(threadId: string, read: boolean): Promise<void>;
|
|
17777
17990
|
/** Silent rename — no dialog. For inline editing in your own row. */
|
|
17778
17991
|
rename(threadId: string, title: string): Promise<void>;
|
|
17779
|
-
/**
|
|
17992
|
+
/** Archives immediately, or confirms first if child threads will also be archived. */
|
|
17780
17993
|
archive(threadId: string): void;
|
|
17781
17994
|
/**
|
|
17782
17995
|
* Opens bb's delete confirmation, which counts child threads first. Deletion
|
|
@@ -19368,6 +19581,13 @@ interface PluginSdkApp {
|
|
|
19368
19581
|
* docs/api_to_audit.md.
|
|
19369
19582
|
*/
|
|
19370
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;
|
|
19371
19591
|
useBbNavigate(): BbNavigate;
|
|
19372
19592
|
/** Select one of this plugin's eligible fixed tabs on the current surface. */
|
|
19373
19593
|
experimental_useAppPanel(): ExperimentalAppPanel;
|
|
@@ -19499,9 +19719,10 @@ interface PluginSdkApp {
|
|
|
19499
19719
|
* surfaces without further work. Reserve `useRpc` for work that needs your
|
|
19500
19720
|
* server: secrets, host files, or your plugin's own storage.
|
|
19501
19721
|
*
|
|
19502
|
-
*
|
|
19503
|
-
*
|
|
19504
|
-
*
|
|
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.
|
|
19505
19726
|
*
|
|
19506
19727
|
* The client is stable for the plugin's lifetime, so it is safe in effect
|
|
19507
19728
|
* and callback dependency lists.
|
|
@@ -19617,6 +19838,7 @@ declare const useRealtimeConnectionState: () => PluginRealtimeConnectionState;
|
|
|
19617
19838
|
declare const useSettings: () => PluginSettingsState;
|
|
19618
19839
|
declare const useBbContext: () => BbContext;
|
|
19619
19840
|
declare const experimental_usePluginId: () => string;
|
|
19841
|
+
declare const experimental_useQuestionFormHost: () => ExperimentalQuestionFormHost;
|
|
19620
19842
|
declare const useBbNavigate: () => BbNavigate;
|
|
19621
19843
|
declare const experimental_useAppPanel: () => ExperimentalAppPanel;
|
|
19622
19844
|
declare const experimental_useFixedTabTarget: <Target extends JsonValue$1>(tab: ExperimentalPluginFixedTabReference<Target>) => ExperimentalFixedTabTargetState<Target> | null;
|
|
@@ -19643,5 +19865,5 @@ declare const useSdk: () => PluginBrowserBbSdk;
|
|
|
19643
19865
|
declare const experimental_useProviders: () => PluginProvidersState;
|
|
19644
19866
|
declare const experimental_useCodeTheme: () => PluginCodeThemeState;
|
|
19645
19867
|
|
|
19646
|
-
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_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 };
|
|
19647
|
-
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 };
|
|
@@ -1677,26 +1677,71 @@ interface PluginMentionProviderRegistration {
|
|
|
1677
1677
|
experimental_images?: readonly ExperimentalPluginMentionImage[];
|
|
1678
1678
|
}>;
|
|
1679
1679
|
}
|
|
1680
|
+
/** Options for one `complete` call. */
|
|
1681
|
+
interface PluginAiCompleteOptions {
|
|
1682
|
+
/**
|
|
1683
|
+
* Aborted when bb stops waiting: the task timed out (5 seconds for titles
|
|
1684
|
+
* and commit messages) or the request was cancelled. Pass it to `fetch`.
|
|
1685
|
+
*/
|
|
1686
|
+
readonly signal: AbortSignal;
|
|
1687
|
+
}
|
|
1688
|
+
/** Options for one `transcribe` call. */
|
|
1689
|
+
interface PluginAiTranscribeOptions {
|
|
1690
|
+
/** Aborted when bb stops waiting (10 seconds) or the request was cancelled. */
|
|
1691
|
+
readonly signal: AbortSignal;
|
|
1692
|
+
/**
|
|
1693
|
+
* Vocabulary the speaker is likely to use (names, identifiers), for
|
|
1694
|
+
* services that accept a transcription prompt; `null` when there is none.
|
|
1695
|
+
*/
|
|
1696
|
+
readonly hint: string | null;
|
|
1697
|
+
}
|
|
1680
1698
|
/**
|
|
1681
|
-
*
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
1699
|
+
* Whether a service can answer right now. `message` is shown to the user
|
|
1700
|
+
* beside the service ("Sign in to your bb account") and should say how to
|
|
1701
|
+
* make it ready.
|
|
1684
1702
|
*/
|
|
1685
|
-
type
|
|
1703
|
+
type PluginAiServiceStatus = {
|
|
1704
|
+
readonly ready: true;
|
|
1705
|
+
} | {
|
|
1706
|
+
readonly ready: false;
|
|
1707
|
+
readonly message: string;
|
|
1708
|
+
};
|
|
1686
1709
|
/**
|
|
1687
|
-
* An AI service
|
|
1688
|
-
* `
|
|
1689
|
-
*
|
|
1690
|
-
*
|
|
1691
|
-
*
|
|
1710
|
+
* An AI service bb can use for its helper tasks: thread titles and commit
|
|
1711
|
+
* messages (`complete`) and voice input (`transcribe`). The user picks a
|
|
1712
|
+
* service per task in Settings → AI services or with
|
|
1713
|
+
* `bb settings ai-services set`. The functions run in the plugin's server
|
|
1714
|
+
* process; a plugin that needs host-local state (a login file, a local model)
|
|
1715
|
+
* reaches its own `bb.host` entry through `bb.hosts.experimental_client`.
|
|
1716
|
+
*
|
|
1717
|
+
* bb owns the prompts and cleans up replies (think blocks, quotes, labels,
|
|
1718
|
+
* extra lines), so a service returns the model's text as-is. The plugin owns
|
|
1719
|
+
* everything behind the function: which model, which API, any retries.
|
|
1720
|
+
* Failure is a rejected promise.
|
|
1692
1721
|
*/
|
|
1693
1722
|
interface PluginAiServiceDeclaration {
|
|
1694
|
-
/**
|
|
1723
|
+
/**
|
|
1724
|
+
* Stable, lowercase id, unique within this plugin. bb identifies a service
|
|
1725
|
+
* by plugin id and service id, so another plugin may use the same id.
|
|
1726
|
+
* `automatic` and `off` are reserved.
|
|
1727
|
+
*/
|
|
1695
1728
|
readonly id: string;
|
|
1696
|
-
/** Shown
|
|
1729
|
+
/** Shown in the picker; 1-64 characters. */
|
|
1697
1730
|
readonly displayName: string;
|
|
1698
|
-
/**
|
|
1699
|
-
|
|
1731
|
+
/**
|
|
1732
|
+
* Answer one prompt with plain text. Offered for thread titles and commit
|
|
1733
|
+
* messages. Declare `complete`, `transcribe`, or both.
|
|
1734
|
+
*/
|
|
1735
|
+
readonly complete?: (prompt: string, options: PluginAiCompleteOptions) => Promise<string>;
|
|
1736
|
+
/** Transcribe recorded speech to text. Offered for voice input. */
|
|
1737
|
+
readonly transcribe?: (audio: File, options: PluginAiTranscribeOptions) => Promise<string>;
|
|
1738
|
+
/**
|
|
1739
|
+
* Report whether the service can answer. bb calls it for the picker's
|
|
1740
|
+
* status line and to decide whether Automatic skips the service and
|
|
1741
|
+
* whether the microphone shows; results are cached for a few seconds.
|
|
1742
|
+
* Omit it when the service is always ready.
|
|
1743
|
+
*/
|
|
1744
|
+
readonly status?: () => Promise<PluginAiServiceStatus>;
|
|
1700
1745
|
}
|
|
1701
1746
|
|
|
1702
1747
|
declare function pluginCliCollisionWarning(pluginId: string, commandName: string): string | null;
|
|
@@ -1733,57 +1778,24 @@ declare const PLUGIN_PROVIDER_PERMISSION_MODE_VALUES: readonly ["accept-edits",
|
|
|
1733
1778
|
declare const PLUGIN_PROVIDER_REASONING_LEVEL_VALUES: readonly ["none", "low", "medium", "high", "xhigh", "ultracode", "max", "ultra"];
|
|
1734
1779
|
declare const PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES: readonly ["plan", "goal"];
|
|
1735
1780
|
/**
|
|
1736
|
-
*
|
|
1737
|
-
*
|
|
1738
|
-
*
|
|
1739
|
-
* for both the fake host and production (`isServerDirectAiServiceId`);
|
|
1740
|
-
* apps/server/test/services/plugins/plugin-ai-services.test.ts pins it to
|
|
1741
|
-
* pi-ai's provider registry, so a pi-ai bump must move it in the same change.
|
|
1781
|
+
* A validated `bb.experimental_aiServices.register` declaration. Absent
|
|
1782
|
+
* functions are `null` so hosts never have to distinguish missing from
|
|
1783
|
+
* undefined.
|
|
1742
1784
|
*/
|
|
1743
|
-
|
|
1785
|
+
interface NormalizedPluginAiService {
|
|
1786
|
+
readonly id: string;
|
|
1787
|
+
readonly displayName: string;
|
|
1788
|
+
readonly complete: NonNullable<PluginAiServiceDeclaration["complete"]> | null;
|
|
1789
|
+
readonly transcribe: NonNullable<PluginAiServiceDeclaration["transcribe"]> | null;
|
|
1790
|
+
readonly status: NonNullable<PluginAiServiceDeclaration["status"]> | null;
|
|
1791
|
+
}
|
|
1744
1792
|
/**
|
|
1745
1793
|
* Validate one `bb.experimental_aiServices.register` declaration the same
|
|
1746
1794
|
* way in the production host and the fake host. Throws on the first problem;
|
|
1747
1795
|
* returns a normalized, frozen copy carrying only contract fields.
|
|
1748
1796
|
*/
|
|
1749
|
-
declare function validatePluginAiServiceDeclaration(declaration: PluginAiServiceDeclaration):
|
|
1750
|
-
/**
|
|
1751
|
-
* What an AI service binds to, decided at the
|
|
1752
|
-
* `bb.experimental_aiServices.register` call: the plugin's built `bb.host`
|
|
1753
|
-
* artifact, or — when the plugin declares an entry that failed to build —
|
|
1754
|
-
* nothing yet, with the build problem. An unbound service is staged so the
|
|
1755
|
-
* factory completes; the load then fails on that problem before the staged
|
|
1756
|
-
* registrations flush, so the service never goes live, while a provider the
|
|
1757
|
-
* same factory declared can still be retained as unavailable.
|
|
1758
|
-
*/
|
|
1759
|
-
type AiServiceHostBinding<THostArtifact> = {
|
|
1760
|
-
readonly artifact: THostArtifact;
|
|
1761
|
-
readonly problem: null;
|
|
1762
|
-
} | {
|
|
1763
|
-
readonly artifact: null;
|
|
1764
|
-
readonly problem: string;
|
|
1765
|
-
};
|
|
1766
|
-
/**
|
|
1767
|
-
* The refusals a host makes at `bb.experimental_aiServices.register` before
|
|
1768
|
-
* it stages the declaration: a reserved server-direct id, and a plugin with
|
|
1769
|
-
* no `bb.host` entry for the service to run on. A plugin whose declared
|
|
1770
|
-
* entry failed to build is not refused here: the service is staged unbound,
|
|
1771
|
-
* carrying the build problem, so the load fails on that problem — the
|
|
1772
|
-
* actionable one — after the factory instead of at this call, and a
|
|
1773
|
-
* provider the same factory declares is listed as unavailable rather than
|
|
1774
|
-
* lost. Returns what the service binds to. The production host and the fake
|
|
1775
|
-
* host both call this, so they refuse identically;
|
|
1776
|
-
* apps/server/test/services/plugins/plugin-ai-services.test.ts pins the
|
|
1777
|
-
* messages.
|
|
1778
|
-
*/
|
|
1779
|
-
declare function assertAiServiceRegistrable<THostArtifact>(args: {
|
|
1780
|
-
id: string;
|
|
1781
|
-
/** The plugin's built `bb.host` artifact, or null when it has none. */
|
|
1782
|
-
hostArtifact: THostArtifact | null;
|
|
1783
|
-
/** Why the artifact is missing when the plugin declared an entry that failed to build. */
|
|
1784
|
-
hostArtifactProblem: string | null;
|
|
1785
|
-
}): AiServiceHostBinding<THostArtifact>;
|
|
1786
|
-
/** The collision a second registration of a live AI-service id raises. */
|
|
1797
|
+
declare function validatePluginAiServiceDeclaration(declaration: PluginAiServiceDeclaration): NormalizedPluginAiService;
|
|
1798
|
+
/** The collision a plugin's second registration of one AI-service id raises. */
|
|
1787
1799
|
declare function aiServiceAlreadyRegisteredMessage(id: string): string;
|
|
1788
1800
|
/** The collision a second registration of a live provider id raises. */
|
|
1789
1801
|
declare function providerAlreadyRegisteredMessage(id: string): string;
|
|
@@ -2069,5 +2081,5 @@ declare function normalizePluginAgentConfiguration(args: {
|
|
|
2069
2081
|
declare function validateRpcValue(schema: StandardSchemaV1, value: unknown, phase: "input" | "output", fail: (error: PluginRpcError) => never): Promise<unknown>;
|
|
2070
2082
|
declare function normalizeRpcJsonResult(value: unknown, fail: (error: PluginRpcError) => never): JsonValue;
|
|
2071
2083
|
|
|
2072
|
-
export { ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS, ENVIRONMENT_PROVIDER_DISPLAY_NAME_MAX_CHARS, ENVIRONMENT_PROVIDER_ID_PATTERN, ENVIRONMENT_PROVIDER_REQUIREMENT_NAMES, KV_VALUE_MAX_BYTES, MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS, PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS, PLUGIN_MENTION_TRIGGER_VALUES, PLUGIN_PROVIDER_BRIDGE_OPTIONS_MAX_BYTES, PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES, PLUGIN_PROVIDER_DISPLAY_NAME_MAX_CHARS, PLUGIN_PROVIDER_ENV_MAX_ENTRIES, PLUGIN_PROVIDER_ENV_NAME_PATTERN, PLUGIN_PROVIDER_PERMISSION_MODE_VALUES, PLUGIN_PROVIDER_REASONING_LEVEL_VALUES, PROVIDER_ID_PATTERN, RESERVED_AGENT_TOOL_NAMES, RESERVED_BB_CLI_COMMANDS,
|
|
2073
|
-
export type {
|
|
2084
|
+
export { ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS, ENVIRONMENT_PROVIDER_DISPLAY_NAME_MAX_CHARS, ENVIRONMENT_PROVIDER_ID_PATTERN, ENVIRONMENT_PROVIDER_REQUIREMENT_NAMES, KV_VALUE_MAX_BYTES, MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS, PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS, PLUGIN_MENTION_TRIGGER_VALUES, PLUGIN_PROVIDER_BRIDGE_OPTIONS_MAX_BYTES, PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES, PLUGIN_PROVIDER_DISPLAY_NAME_MAX_CHARS, PLUGIN_PROVIDER_ENV_MAX_ENTRIES, PLUGIN_PROVIDER_ENV_NAME_PATTERN, PLUGIN_PROVIDER_PERMISSION_MODE_VALUES, PLUGIN_PROVIDER_REASONING_LEVEL_VALUES, PROVIDER_ID_PATTERN, RESERVED_AGENT_TOOL_NAMES, RESERVED_BB_CLI_COMMANDS, SETTING_KEY_PATTERN, adoptHttpRouteResponse, aiServiceAlreadyRegisteredMessage, coerceStoredPluginSettingValue, deriveValidatedProviderOptions, enforcePluginCliOutputLimit, environmentCompositionSchema, isPluginMentionTrigger, isStandardSchema, normalizeAgentToolRegistration, normalizeCliRegistration, normalizeHttpRouteRegistration, normalizeInteractionRequest, normalizeMentionProviderRegistration, normalizePluginAgentConfiguration, normalizeRealtimePayload, normalizeRpcJsonResult, normalizeRpcRegistration, normalizeWebSocketRouteRegistration, parsePluginRowPresentation, pluginCliCollisionWarning, pluginHookAlreadyRegisteredMessage, providerAlreadyRegisteredMessage, providerIconRefusalMessage, providerWithoutBridgeMessage, publishRpcMethod, readRpcPublicationOptions, registerSettingDescriptors, runPluginStorageMigrations, storePluginHook, summarizeStandardIssues, undeclaredIconProblem, validateBackgroundServiceRegistration, validatePluginAiServiceDeclaration, validatePluginEnvironmentProviderDeclaration, validatePluginMachineProviderDeclaration, validatePluginProviderDeclaration, validatePluginProviderEnvEntries, validateProviderEnvContribution, validateRpcValue, validateScheduleRegistration, validateServerAccessProviderDeclaration, validateSettingsUpdate };
|
|
2085
|
+
export type { NormalizedPluginAiService, NormalizedPluginEnvironmentComposition, NormalizedPluginEnvironmentProvider, NormalizedPluginEnvironmentProviderRequirements, NormalizedPluginInteractionRequest, NormalizedPluginMachineProvider, NormalizedPluginProviderDeclaration };
|
|
@@ -1657,6 +1657,7 @@ declare const BRIDGE_JSON_RPC_ERRORS: {
|
|
|
1657
1657
|
readonly NO_ACTIVE_TURN: -32001;
|
|
1658
1658
|
readonly SESSION_NOT_RESTORABLE: -32002;
|
|
1659
1659
|
readonly FORK_CHECKPOINT_UNSUPPORTED: -32003;
|
|
1660
|
+
readonly MISSING_EXECUTABLE: -32004;
|
|
1660
1661
|
};
|
|
1661
1662
|
declare const providerRecoveryHintSchema: z.ZodObject<{
|
|
1662
1663
|
kind: z.ZodEnum<{
|
|
@@ -1371,10 +1371,8 @@ interface CreateFakePluginHostOptions {
|
|
|
1371
1371
|
sharedPortTunnelIdentities?: Record<string, PluginSharedPortTunnelIdentity>;
|
|
1372
1372
|
/**
|
|
1373
1373
|
* Whether the plugin's manifest declares a `bb.host` entry. Production
|
|
1374
|
-
* refuses `bb.providers.register` (the provider would have no
|
|
1375
|
-
* run on)
|
|
1376
|
-
* nothing to run on) without one; the fake applies the same rules.
|
|
1377
|
-
* Defaults to true.
|
|
1374
|
+
* refuses `bb.providers.register` without one (the provider would have no
|
|
1375
|
+
* bridge to run on); the fake applies the same rule. Defaults to true.
|
|
1378
1376
|
*/
|
|
1379
1377
|
experimental_hostEntry?: boolean;
|
|
1380
1378
|
/**
|