@get-bb/plugin-sdk 0.4.56 → 0.4.87
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 +0 -12
- package/bundled-types/bb-plugin-sdk-app.d.ts +137 -20
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +35 -3
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +406 -52
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +8 -3
- package/bundled-types/bb-plugin-sdk-machine-provider.d.ts +84 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +57 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +131 -2
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +7 -2
- package/bundled-types/bb-plugin-sdk-testing.d.ts +212 -12
- package/bundled-types/bb-plugin-sdk.d.ts +749 -49
- package/dist/app.js +4 -0
- package/dist/host.js +1 -1
- package/dist/internal/host-policy.js +855 -68
- package/dist/internal/plugin-app-collector.js +116 -91
- package/dist/machine-provider.js +0 -0
- package/dist/provider-bridge-acp.js +1964 -2045
- package/dist/provider-bridge-testing.js +1378 -1404
- package/dist/provider-bridge-worker-entry.mjs +0 -1
- package/dist/provider-bridge.js +1455 -1498
- package/dist/testing/app.js +134 -91
- package/dist/testing/index.js +1092 -730
- package/package.json +7 -2
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Portable type declarations for `@get-bb/plugin-sdk`. Unpublished BB
|
|
2
|
+
// workspace contracts are flattened; public subpaths may reuse the
|
|
3
|
+
// package root without requiring any other @bb/* package.
|
|
4
|
+
//
|
|
5
|
+
// Confused by the API, or need a symbol that isn't here? Clone the BB repo
|
|
6
|
+
// and read the real source: https://github.com/get-bb/bb
|
|
7
|
+
|
|
8
|
+
import { StandardSchemaV1, StandardSchemaV1InferOutput, JsonValue, PluginMachineValidateDecision } from '@get-bb/plugin-sdk';
|
|
9
|
+
|
|
10
|
+
type PluginMachineProviderResource = Exclude<JsonValue, null>;
|
|
11
|
+
type PluginMachineProviderInputsSchema = StandardSchemaV1 | undefined;
|
|
12
|
+
type InputsValue<S> = S extends StandardSchemaV1 ? StandardSchemaV1InferOutput<S> : null;
|
|
13
|
+
interface PluginMachineProviderProgress {
|
|
14
|
+
step(text: string): void;
|
|
15
|
+
log(text: string): void;
|
|
16
|
+
}
|
|
17
|
+
type PluginMachineProviderAvailability = {
|
|
18
|
+
status: "available";
|
|
19
|
+
} | {
|
|
20
|
+
status: "setup-required";
|
|
21
|
+
message: string;
|
|
22
|
+
} | {
|
|
23
|
+
status: "unavailable";
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
type PluginMachineProviderValidateContext<S extends PluginMachineProviderInputsSchema = PluginMachineProviderInputsSchema> = {
|
|
27
|
+
inputs: InputsValue<S>;
|
|
28
|
+
};
|
|
29
|
+
interface PluginMachineProviderLifecycleContext {
|
|
30
|
+
checkpoint(resource: PluginMachineProviderResource): Promise<void>;
|
|
31
|
+
report: PluginMachineProviderProgress;
|
|
32
|
+
signal: AbortSignal;
|
|
33
|
+
}
|
|
34
|
+
type PluginMachineProviderCreateContext<S extends PluginMachineProviderInputsSchema = PluginMachineProviderInputsSchema> = PluginMachineProviderValidateContext<S> & PluginMachineProviderLifecycleContext & {
|
|
35
|
+
key: string;
|
|
36
|
+
attempt: number;
|
|
37
|
+
};
|
|
38
|
+
type PluginMachineProviderCreateResult = {
|
|
39
|
+
status: "created";
|
|
40
|
+
name: string;
|
|
41
|
+
resource: PluginMachineProviderResource;
|
|
42
|
+
} | {
|
|
43
|
+
status: "failed";
|
|
44
|
+
message: string;
|
|
45
|
+
};
|
|
46
|
+
type PluginMachineProviderResourceLifecycleContext = PluginMachineProviderLifecycleContext & {
|
|
47
|
+
hostId: string;
|
|
48
|
+
resource: PluginMachineProviderResource;
|
|
49
|
+
};
|
|
50
|
+
type PluginMachineProviderRemoveContext = Omit<PluginMachineProviderResourceLifecycleContext, "checkpoint">;
|
|
51
|
+
interface PluginMachineProviderResourceResult {
|
|
52
|
+
resource: PluginMachineProviderResource;
|
|
53
|
+
}
|
|
54
|
+
type PluginMachineProviderRemoveResult = {
|
|
55
|
+
status: "removed";
|
|
56
|
+
} | {
|
|
57
|
+
status: "failed";
|
|
58
|
+
message: string;
|
|
59
|
+
};
|
|
60
|
+
interface PluginMachineProviderDefinition<S extends PluginMachineProviderInputsSchema = PluginMachineProviderInputsSchema> {
|
|
61
|
+
id: string;
|
|
62
|
+
displayName: string;
|
|
63
|
+
/** One line telling a user what choosing this provider gets them, shown wherever a machine is added. */
|
|
64
|
+
description: string;
|
|
65
|
+
/** Provider glyph, declared icon, or plugin-relative icon path. */
|
|
66
|
+
icon: string;
|
|
67
|
+
ephemeral?: boolean;
|
|
68
|
+
/** Persisted and readable by every plugin. Store secret references, never secrets. */
|
|
69
|
+
inputs?: S;
|
|
70
|
+
availability?(): PluginMachineProviderAvailability | Promise<PluginMachineProviderAvailability>;
|
|
71
|
+
validate?(context: PluginMachineProviderValidateContext<S>): PluginMachineValidateDecision | Promise<PluginMachineValidateDecision>;
|
|
72
|
+
create(context: PluginMachineProviderCreateContext<S>): Promise<PluginMachineProviderCreateResult>;
|
|
73
|
+
/** Reconcile and remove an uncertain allocation by durable key without creating or bootstrapping. Return failed while allocation intent remains unresolved. */
|
|
74
|
+
reconcileCleanup(context: {
|
|
75
|
+
key: string;
|
|
76
|
+
report: PluginMachineProviderProgress;
|
|
77
|
+
signal: AbortSignal;
|
|
78
|
+
}): Promise<PluginMachineProviderRemoveResult>;
|
|
79
|
+
suspend?(context: PluginMachineProviderResourceLifecycleContext): Promise<PluginMachineProviderResourceResult>;
|
|
80
|
+
resume?(context: PluginMachineProviderResourceLifecycleContext): Promise<PluginMachineProviderResourceResult>;
|
|
81
|
+
remove(context: PluginMachineProviderRemoveContext): Promise<PluginMachineProviderRemoveResult>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type { PluginMachineProviderAvailability, PluginMachineProviderCreateContext, PluginMachineProviderCreateResult, PluginMachineProviderDefinition, PluginMachineProviderInputsSchema, PluginMachineProviderLifecycleContext, PluginMachineProviderProgress, PluginMachineProviderRemoveResult, PluginMachineProviderResource, PluginMachineProviderResourceResult, PluginMachineProviderValidateContext };
|
|
@@ -3152,6 +3152,32 @@ declare const threadEventSchema: z.ZodPipe<z.ZodUnknown, z.ZodUnion<readonly [z.
|
|
|
3152
3152
|
contextWindowUsage: z.ZodObject<{
|
|
3153
3153
|
estimated: z.ZodBoolean;
|
|
3154
3154
|
modelContextWindow: z.ZodNullable<z.ZodNumber>;
|
|
3155
|
+
snapshot: z.ZodOptional<z.ZodObject<{
|
|
3156
|
+
autoCompactAtTokens: z.ZodNullable<z.ZodNumber>;
|
|
3157
|
+
capturedAt: z.ZodISODateTime;
|
|
3158
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
3159
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
3160
|
+
id: z.ZodString;
|
|
3161
|
+
label: z.ZodString;
|
|
3162
|
+
tokens: z.ZodNumber;
|
|
3163
|
+
}, z.core.$strip>>;
|
|
3164
|
+
id: z.ZodString;
|
|
3165
|
+
kind: z.ZodEnum<{
|
|
3166
|
+
deferred: "deferred";
|
|
3167
|
+
free: "free";
|
|
3168
|
+
reserved: "reserved";
|
|
3169
|
+
used: "used";
|
|
3170
|
+
}>;
|
|
3171
|
+
label: z.ZodString;
|
|
3172
|
+
tokens: z.ZodNumber;
|
|
3173
|
+
}, z.core.$strip>>;
|
|
3174
|
+
contextWindowTokens: z.ZodNumber;
|
|
3175
|
+
estimated: z.ZodBoolean;
|
|
3176
|
+
model: z.ZodString;
|
|
3177
|
+
providerSessionId: z.ZodString;
|
|
3178
|
+
providerTurnId: z.ZodNullable<z.ZodString>;
|
|
3179
|
+
usedTokens: z.ZodNumber;
|
|
3180
|
+
}, z.core.$strip>>;
|
|
3155
3181
|
usedTokens: z.ZodNullable<z.ZodNumber>;
|
|
3156
3182
|
}, z.core.$strip>;
|
|
3157
3183
|
providerThreadId: z.ZodString;
|
|
@@ -3252,6 +3278,11 @@ declare const threadEventSchema: z.ZodPipe<z.ZodUnknown, z.ZodUnion<readonly [z.
|
|
|
3252
3278
|
reason: z.ZodOptional<z.ZodString>;
|
|
3253
3279
|
source: z.ZodUnion<readonly [z.ZodLiteral<"shell">, z.ZodObject<{
|
|
3254
3280
|
plugin: z.ZodString;
|
|
3281
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
3282
|
+
core: z.ZodEnum<{
|
|
3283
|
+
"machine-environment": "machine-environment";
|
|
3284
|
+
"machine-git": "machine-git";
|
|
3285
|
+
}>;
|
|
3255
3286
|
}, z.core.$strict>]>;
|
|
3256
3287
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
3257
3288
|
masked: z.ZodLiteral<true>;
|
|
@@ -4725,6 +4756,32 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4725
4756
|
kind: z.ZodLiteral<"contextWindow">;
|
|
4726
4757
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
4727
4758
|
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4759
|
+
snapshot: z.ZodOptional<z.ZodObject<{
|
|
4760
|
+
autoCompactAtTokens: z.ZodNullable<z.ZodNumber>;
|
|
4761
|
+
capturedAt: z.ZodISODateTime;
|
|
4762
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
4763
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
4764
|
+
id: z.ZodString;
|
|
4765
|
+
label: z.ZodString;
|
|
4766
|
+
tokens: z.ZodNumber;
|
|
4767
|
+
}, z.core.$strip>>;
|
|
4768
|
+
id: z.ZodString;
|
|
4769
|
+
kind: z.ZodEnum<{
|
|
4770
|
+
deferred: "deferred";
|
|
4771
|
+
free: "free";
|
|
4772
|
+
reserved: "reserved";
|
|
4773
|
+
used: "used";
|
|
4774
|
+
}>;
|
|
4775
|
+
label: z.ZodString;
|
|
4776
|
+
tokens: z.ZodNumber;
|
|
4777
|
+
}, z.core.$strip>>;
|
|
4778
|
+
contextWindowTokens: z.ZodNumber;
|
|
4779
|
+
estimated: z.ZodBoolean;
|
|
4780
|
+
model: z.ZodString;
|
|
4781
|
+
providerSessionId: z.ZodString;
|
|
4782
|
+
providerTurnId: z.ZodNullable<z.ZodString>;
|
|
4783
|
+
usedTokens: z.ZodNumber;
|
|
4784
|
+
}, z.core.$strip>>;
|
|
4728
4785
|
used: z.ZodNullable<z.ZodNumber>;
|
|
4729
4786
|
}, z.core.$strip>, z.ZodObject<{
|
|
4730
4787
|
kind: z.ZodLiteral<"context.compacted">;
|
|
@@ -8,6 +8,57 @@
|
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { Writable, Readable } from 'node:stream';
|
|
10
10
|
|
|
11
|
+
declare const contextEntrySchema: z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
tokens: z.ZodNumber;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
type ContextEntry = z.infer<typeof contextEntrySchema>;
|
|
17
|
+
declare const contextCategorySchema: z.ZodObject<{
|
|
18
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
label: z.ZodString;
|
|
21
|
+
tokens: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
kind: z.ZodEnum<{
|
|
25
|
+
deferred: "deferred";
|
|
26
|
+
free: "free";
|
|
27
|
+
reserved: "reserved";
|
|
28
|
+
used: "used";
|
|
29
|
+
}>;
|
|
30
|
+
label: z.ZodString;
|
|
31
|
+
tokens: z.ZodNumber;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
type ContextCategory = z.infer<typeof contextCategorySchema>;
|
|
34
|
+
declare const contextSnapshotSchema: z.ZodObject<{
|
|
35
|
+
autoCompactAtTokens: z.ZodNullable<z.ZodNumber>;
|
|
36
|
+
capturedAt: z.ZodISODateTime;
|
|
37
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
38
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
label: z.ZodString;
|
|
41
|
+
tokens: z.ZodNumber;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
kind: z.ZodEnum<{
|
|
45
|
+
deferred: "deferred";
|
|
46
|
+
free: "free";
|
|
47
|
+
reserved: "reserved";
|
|
48
|
+
used: "used";
|
|
49
|
+
}>;
|
|
50
|
+
label: z.ZodString;
|
|
51
|
+
tokens: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
contextWindowTokens: z.ZodNumber;
|
|
54
|
+
estimated: z.ZodBoolean;
|
|
55
|
+
model: z.ZodString;
|
|
56
|
+
providerSessionId: z.ZodString;
|
|
57
|
+
providerTurnId: z.ZodNullable<z.ZodString>;
|
|
58
|
+
usedTokens: z.ZodNumber;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
type ContextSnapshot = z.infer<typeof contextSnapshotSchema>;
|
|
61
|
+
|
|
11
62
|
declare const acpReasoningCliSchema: z.ZodObject<{
|
|
12
63
|
defaultLevel: z.ZodOptional<z.ZodEnum<{
|
|
13
64
|
high: "high";
|
|
@@ -373,6 +424,32 @@ type ThreadEventTokenUsageBreakdown = z.infer<typeof threadEventTokenUsageBreakd
|
|
|
373
424
|
declare const threadEventContextWindowUsageSchema: z.ZodObject<{
|
|
374
425
|
estimated: z.ZodBoolean;
|
|
375
426
|
modelContextWindow: z.ZodNullable<z.ZodNumber>;
|
|
427
|
+
snapshot: z.ZodOptional<z.ZodObject<{
|
|
428
|
+
autoCompactAtTokens: z.ZodNullable<z.ZodNumber>;
|
|
429
|
+
capturedAt: z.ZodISODateTime;
|
|
430
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
431
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
432
|
+
id: z.ZodString;
|
|
433
|
+
label: z.ZodString;
|
|
434
|
+
tokens: z.ZodNumber;
|
|
435
|
+
}, z.core.$strip>>;
|
|
436
|
+
id: z.ZodString;
|
|
437
|
+
kind: z.ZodEnum<{
|
|
438
|
+
deferred: "deferred";
|
|
439
|
+
free: "free";
|
|
440
|
+
reserved: "reserved";
|
|
441
|
+
used: "used";
|
|
442
|
+
}>;
|
|
443
|
+
label: z.ZodString;
|
|
444
|
+
tokens: z.ZodNumber;
|
|
445
|
+
}, z.core.$strip>>;
|
|
446
|
+
contextWindowTokens: z.ZodNumber;
|
|
447
|
+
estimated: z.ZodBoolean;
|
|
448
|
+
model: z.ZodString;
|
|
449
|
+
providerSessionId: z.ZodString;
|
|
450
|
+
providerTurnId: z.ZodNullable<z.ZodString>;
|
|
451
|
+
usedTokens: z.ZodNumber;
|
|
452
|
+
}, z.core.$strip>>;
|
|
376
453
|
usedTokens: z.ZodNullable<z.ZodNumber>;
|
|
377
454
|
}, z.core.$strip>;
|
|
378
455
|
type ThreadEventContextWindowUsage = z.infer<typeof threadEventContextWindowUsageSchema>;
|
|
@@ -2859,6 +2936,32 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2859
2936
|
kind: z.ZodLiteral<"contextWindow">;
|
|
2860
2937
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
2861
2938
|
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2939
|
+
snapshot: z.ZodOptional<z.ZodObject<{
|
|
2940
|
+
autoCompactAtTokens: z.ZodNullable<z.ZodNumber>;
|
|
2941
|
+
capturedAt: z.ZodISODateTime;
|
|
2942
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
2943
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
2944
|
+
id: z.ZodString;
|
|
2945
|
+
label: z.ZodString;
|
|
2946
|
+
tokens: z.ZodNumber;
|
|
2947
|
+
}, z.core.$strip>>;
|
|
2948
|
+
id: z.ZodString;
|
|
2949
|
+
kind: z.ZodEnum<{
|
|
2950
|
+
deferred: "deferred";
|
|
2951
|
+
free: "free";
|
|
2952
|
+
reserved: "reserved";
|
|
2953
|
+
used: "used";
|
|
2954
|
+
}>;
|
|
2955
|
+
label: z.ZodString;
|
|
2956
|
+
tokens: z.ZodNumber;
|
|
2957
|
+
}, z.core.$strip>>;
|
|
2958
|
+
contextWindowTokens: z.ZodNumber;
|
|
2959
|
+
estimated: z.ZodBoolean;
|
|
2960
|
+
model: z.ZodString;
|
|
2961
|
+
providerSessionId: z.ZodString;
|
|
2962
|
+
providerTurnId: z.ZodNullable<z.ZodString>;
|
|
2963
|
+
usedTokens: z.ZodNumber;
|
|
2964
|
+
}, z.core.$strip>>;
|
|
2862
2965
|
used: z.ZodNullable<z.ZodNumber>;
|
|
2863
2966
|
}, z.core.$strip>, z.ZodObject<{
|
|
2864
2967
|
kind: z.ZodLiteral<"context.compacted">;
|
|
@@ -3674,6 +3777,32 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3674
3777
|
kind: z.ZodLiteral<"contextWindow">;
|
|
3675
3778
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3676
3779
|
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3780
|
+
snapshot: z.ZodOptional<z.ZodObject<{
|
|
3781
|
+
autoCompactAtTokens: z.ZodNullable<z.ZodNumber>;
|
|
3782
|
+
capturedAt: z.ZodISODateTime;
|
|
3783
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
3784
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
3785
|
+
id: z.ZodString;
|
|
3786
|
+
label: z.ZodString;
|
|
3787
|
+
tokens: z.ZodNumber;
|
|
3788
|
+
}, z.core.$strip>>;
|
|
3789
|
+
id: z.ZodString;
|
|
3790
|
+
kind: z.ZodEnum<{
|
|
3791
|
+
deferred: "deferred";
|
|
3792
|
+
free: "free";
|
|
3793
|
+
reserved: "reserved";
|
|
3794
|
+
used: "used";
|
|
3795
|
+
}>;
|
|
3796
|
+
label: z.ZodString;
|
|
3797
|
+
tokens: z.ZodNumber;
|
|
3798
|
+
}, z.core.$strip>>;
|
|
3799
|
+
contextWindowTokens: z.ZodNumber;
|
|
3800
|
+
estimated: z.ZodBoolean;
|
|
3801
|
+
model: z.ZodString;
|
|
3802
|
+
providerSessionId: z.ZodString;
|
|
3803
|
+
providerTurnId: z.ZodNullable<z.ZodString>;
|
|
3804
|
+
usedTokens: z.ZodNumber;
|
|
3805
|
+
}, z.core.$strip>>;
|
|
3677
3806
|
used: z.ZodNullable<z.ZodNumber>;
|
|
3678
3807
|
}, z.core.$strip>, z.ZodObject<{
|
|
3679
3808
|
kind: z.ZodLiteral<"context.compacted">;
|
|
@@ -5129,5 +5258,5 @@ declare const claudeTaskToolOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
5129
5258
|
}, z.core.$loose>]>;
|
|
5130
5259
|
type ClaudeTaskToolOutput = z.infer<typeof claudeTaskToolOutputSchema>;
|
|
5131
5260
|
|
|
5132
|
-
export { BRIDGE_INBOUND_REQUEST_METHODS, BRIDGE_JSON_RPC_ERRORS, BRIDGE_NOTIFICATION_METHODS, BRIDGE_REQUEST_METHODS, HIGH_REASONING_EFFORT, LOCAL_BASH_TASK_TYPE, LOCAL_WORKFLOW_TASK_TYPE, LOW_REASONING_EFFORT, MAX_REASONING_EFFORT, MEDIUM_REASONING_EFFORT, PROVIDER_BRIDGE_EXPORT_NAME, PROVIDER_BRIDGE_PROTOCOL_VERSION, ProviderRequestDecodeError, ProviderResponseEncodeError, THREAD_DELTA_GRAMMAR_V2, THREAD_DELTA_GRAMMAR_V3, THREAD_DELTA_NOTIFICATION_METHOD, ULTRACODE_REASONING_EFFORT, USER_QUESTION_MAX_OPTIONS, USER_QUESTION_MAX_QUESTIONS, XHIGH_REASONING_EFFORT, ZERO_TOKEN_USAGE, acpNativeReasoningSchema, acpPermissionCliSchema, acpReasoningCliSchema, addTokenUsage, approvalInteractionOutcomeSchema, backgroundTaskItemStatus, bashArgsSchema, bridgeCapabilitiesSchema, bridgeErrorDataSchema, bridgeGrammarVersionsSchema, bridgeRequestEnvelopeSchema, bridgeSteerModeSchema, buildShellEnvOverrides, claudeTaskToolNameSchema, claudeTaskToolOutputSchema, createBridgeIo, createBridgeLineHandler, createPendingToolCallTracker, createProviderVisibilityMetadata, decodeBridgeJsonRpcResponse, decodeToolCallResponsePayload, deltaBackgroundTaskShapeSchema, deltaDelegationShapeSchema, deltaExtensionShapeSchema, deltaFileChangeSchema, deltaFileReadShapeSchema, deltaItemKeySchema, deltaItemShapeSchema, deltaNoTurnFallbackSchema, deltaOutputChannelSchema, deltaPlanStepsShapeSchema, deltaPresentationSchema, deltaProgressSnapshotSchema, deltaSearchShapeSchema, deltaTextChannelSchema, dynamicToolSchema, errorEnvelopeSchema, BridgeRecoveryError as experimental_BridgeRecoveryError, COMPACTION_PRESENTATION as experimental_COMPACTION_PRESENTATION, REASONING_PRESENTATION as experimental_REASONING_PRESENTATION, buildBridgeToolCallContent as experimental_buildBridgeToolCallContent, clampPercent as experimental_clampPercent, commandOutput as experimental_commandOutput, compareVersions as experimental_compareVersions, experimental_defineProviderBridge, downloadedInstallerCommand as experimental_downloadedInstallerCommand, fileReadPresentation as experimental_fileReadPresentation, formatCommand as experimental_formatCommand, installationVerification as experimental_installationVerification, experimental_isProviderBridgeRecording, npmCommand as experimental_npmCommand, npmGlobalInstallCommand as experimental_npmGlobalInstallCommand, npmGlobalInstallSource as experimental_npmGlobalInstallSource, npmLatestVersion as experimental_npmLatestVersion, planStepsPresentation as experimental_planStepsPresentation, presentationDetail as experimental_presentationDetail, presentationFileName as experimental_presentationFileName, presentationTitle as experimental_presentationTitle, probeNpmGlobalPackage as experimental_probeNpmGlobalPackage, readBoundedLines as experimental_readBoundedLines, readCliVersion as experimental_readCliVersion, experimental_recordProviderChildIo, resolveExecutablePath as experimental_resolveExecutablePath, searchPresentation as experimental_searchPresentation, toolPresentation as experimental_toolPresentation, versionFrom as experimental_versionFrom, webFetchPresentation as experimental_webFetchPresentation, webSearchPresentation as experimental_webSearchPresentation, withTitle as experimental_withTitle, extensionKindSchema, extractResultText, getRawSdkMessage, getRecordProperty, getStringProperty, acpLaunchSpecSchema as hostDaemonAcpLaunchSpecSchema, initializeParamsSchema, instructionModeValues, interactionRequestPayloadSchema, isApprovalInteractionOutcome, isApprovalPendingInteractionPayload, isApprovalPendingInteractionResolution, isBackgroundAgentTaskType, isExtensionKind, isRecord, isSettledBackgroundTaskStatus, isStandaloneBuiltinCompactCommand, isUserQuestionPendingInteractionPayload, isUserQuestionPendingInteractionResolution, jsonRpcEnvelopeSchema, jsonValueSchema, mimeTypeFromExtension, modelListParamsSchema, normalizeAcpLaunchSpec as normalizeHostDaemonAcpLaunchSpec, normalizeProviderCommandOutput, pendingInteractionCommandActionSchema, pendingInteractionFileSystemPermissionsSchema, pendingInteractionMacOsPermissionsSchema, pendingInteractionNetworkPermissionsSchema, pendingInteractionRequestedPermissionProfileSchema, pendingInteractionResolutionSchema, permissionEscalationValues, providerHealthResultSchema, providerHealthSchema, providerInstallationActionKindSchema, providerInstallationActionSchema, providerInstallationCommandSchema, providerInstallationRequirementSchema, providerInstallationRunParamsSchema, providerInstallationRunResultSchema, providerInstallationSourceSchema, providerInstallationStatusParamsSchema, providerInstallationStatusSchema, providerInstallationVerificationSchema, providerInteractionOutcomeSchema, providerMaintenanceParamsSchema, providerRawEventSchema, providerRecoveryHintSchema, providerRecoveryKindSchema, providerRecoveryKindValues, providerRecoveryNotificationSchema, providerUsageResultSchema, providerUsageSchema, providerUsageWindowSchema, reasoningEffortsForLevels, reasoningLevelSchema, reasoningLevelValues, removeCommandMentionsFromPromptInput, runBridgeRequest, runtimePermissionScopeValues, sanitizeInheritedChildProcessEnv, sdkMessageEnvelopeSchema, shouldAutoDenyInteractiveRequest, skillsConfigureParamsSchema, textBlockSchema, threadArchiveParamsSchema, threadContextWindowUsageEnvelopeSchema, threadDeltaNotificationParamsSchema, threadDeltaSchema, threadDiscardParamsSchema, threadEventItemPresentationSchema, threadEventSearchModeSchema, threadForkParamsSchema, threadGoalClearParamsSchema, threadIdentityEnvelopeSchema, threadNameSetParamsSchema, threadResumeParamsSchema, threadStartParamsSchema, threadStopParamsSchema, threadUnarchiveParamsSchema, toNonNegativeNumber, toOptionalRecord, toOptionalString, toPositiveNumber, turnStartParamsSchema, turnSteerParamsSchema, userQuestionInteractionOutcomeSchema, withoutBridgeRuntimeEnv };
|
|
5133
|
-
export type { ApprovalInteractionOutcome, ApprovalPendingInteractionPayload, AvailableModel, BackgroundTaskStatus, BackgroundTaskUsage, BoundedLineReaderArgs, BridgeCapabilities, BridgeErrorData, BridgeExecutionOptions, BridgeGrammarVersions, BridgeJsonRpcResponse, BridgeSendError, BridgeSteerMode, BridgeToolCallRequest, BuildInteractiveResponseArgs, ClaudeTaskToolOutput, ClientTurnRequestId, DecodedInteractiveRequest, DeltaBackgroundTaskShape, DeltaDelegationShape, DeltaExtensionShape, DeltaFileChange, DeltaFileReadShape, DeltaItemKey, DeltaItemShape, DeltaItemShapeType, DeltaNoTurnFallback, DeltaOutputChannel, DeltaPlanStepsShape, DeltaPresentation, DeltaProgressSnapshot, DeltaSearchShape, DeltaTextChannel, DynamicTool, ExtensionKind, AcpLaunchSpec as HostDaemonAcpLaunchSpec, InitializeResult, InstructionMode, InteractionRequestPayload, JsonObject, JsonRpcMessage, JsonValue, ModelReasoningEffort, NpmGlobalPackageProbe, PendingInteractionApprovalDecision, PendingInteractionApprovalSubject, PendingInteractionCommandAction, PendingInteractionGrantablePermissionProfile, PendingInteractionGrantedPermissionProfile, PendingInteractionPayload, PendingInteractionRequestedPermissionProfile, PendingInteractionResolution, PendingInteractionUserQuestionQuestion, PermissionEscalation, PermissionMode, PreparedProviderCommandDispatch, PromptInput, ProviderBridgeContext, ProviderBridgeDefinition, ProviderBridgeEntry, ProviderErrorCategory, ProviderErrorInfo, ProviderHealth, ProviderHealthResult, ProviderInboundRequest, ProviderInstallationAction, ProviderInstallationActionKind, ProviderInstallationCommand, ProviderInstallationRequirement, ProviderInstallationRunParams, ProviderInstallationRunResult, ProviderInstallationSource, ProviderInstallationStatus, ProviderInstallationStatusParams, ProviderInstallationVerification, ProviderInteractionOutcome, ProviderMaintenanceParams, ProviderPostInitializeRequest, ProviderRateLimitState, ProviderRateLimitStatus, ProviderRateLimitWindow, ProviderRawEvent, ProviderRawEventCoverage, ProviderRawEventDescription, ProviderRecoveryHint, ProviderRecoveryKind, ProviderRecoveryNotification, ProviderRuntimeEvent, ProviderUsage, ProviderUsageResult, ProviderUsageWindow, ProviderVisibilityMetadata, ReasoningLevel, RuntimePermissionPolicy, RuntimePermissionScope, ServiceTier, ThreadDelta, ThreadDeltaKind, ThreadDeltaNotificationParams, ThreadEventContextWindowUsage, ThreadEventItemPresentation, ThreadEventItemStatus, ThreadEventPlanStep, ThreadEventSearchMode, ThreadEventTokenUsageBreakdown, ThreadEventTurnStatus, ThreadEventUserContent, UserQuestionInteractionOutcome, UserQuestionPendingInteractionPayload, UserQuestionPendingInteractionResolution, WorkflowAgentSnapshot, WorkflowAgentState, WorkflowPhaseSnapshot, WorkflowProgressSnapshot };
|
|
5261
|
+
export { BRIDGE_INBOUND_REQUEST_METHODS, BRIDGE_JSON_RPC_ERRORS, BRIDGE_NOTIFICATION_METHODS, BRIDGE_REQUEST_METHODS, HIGH_REASONING_EFFORT, LOCAL_BASH_TASK_TYPE, LOCAL_WORKFLOW_TASK_TYPE, LOW_REASONING_EFFORT, MAX_REASONING_EFFORT, MEDIUM_REASONING_EFFORT, PROVIDER_BRIDGE_EXPORT_NAME, PROVIDER_BRIDGE_PROTOCOL_VERSION, ProviderRequestDecodeError, ProviderResponseEncodeError, THREAD_DELTA_GRAMMAR_V2, THREAD_DELTA_GRAMMAR_V3, THREAD_DELTA_NOTIFICATION_METHOD, ULTRACODE_REASONING_EFFORT, USER_QUESTION_MAX_OPTIONS, USER_QUESTION_MAX_QUESTIONS, XHIGH_REASONING_EFFORT, ZERO_TOKEN_USAGE, acpNativeReasoningSchema, acpPermissionCliSchema, acpReasoningCliSchema, addTokenUsage, approvalInteractionOutcomeSchema, backgroundTaskItemStatus, bashArgsSchema, bridgeCapabilitiesSchema, bridgeErrorDataSchema, bridgeGrammarVersionsSchema, bridgeRequestEnvelopeSchema, bridgeSteerModeSchema, buildShellEnvOverrides, claudeTaskToolNameSchema, claudeTaskToolOutputSchema, contextSnapshotSchema, createBridgeIo, createBridgeLineHandler, createPendingToolCallTracker, createProviderVisibilityMetadata, decodeBridgeJsonRpcResponse, decodeToolCallResponsePayload, deltaBackgroundTaskShapeSchema, deltaDelegationShapeSchema, deltaExtensionShapeSchema, deltaFileChangeSchema, deltaFileReadShapeSchema, deltaItemKeySchema, deltaItemShapeSchema, deltaNoTurnFallbackSchema, deltaOutputChannelSchema, deltaPlanStepsShapeSchema, deltaPresentationSchema, deltaProgressSnapshotSchema, deltaSearchShapeSchema, deltaTextChannelSchema, dynamicToolSchema, errorEnvelopeSchema, BridgeRecoveryError as experimental_BridgeRecoveryError, COMPACTION_PRESENTATION as experimental_COMPACTION_PRESENTATION, REASONING_PRESENTATION as experimental_REASONING_PRESENTATION, buildBridgeToolCallContent as experimental_buildBridgeToolCallContent, clampPercent as experimental_clampPercent, commandOutput as experimental_commandOutput, compareVersions as experimental_compareVersions, experimental_defineProviderBridge, downloadedInstallerCommand as experimental_downloadedInstallerCommand, fileReadPresentation as experimental_fileReadPresentation, formatCommand as experimental_formatCommand, installationVerification as experimental_installationVerification, experimental_isProviderBridgeRecording, npmCommand as experimental_npmCommand, npmGlobalInstallCommand as experimental_npmGlobalInstallCommand, npmGlobalInstallSource as experimental_npmGlobalInstallSource, npmLatestVersion as experimental_npmLatestVersion, planStepsPresentation as experimental_planStepsPresentation, presentationDetail as experimental_presentationDetail, presentationFileName as experimental_presentationFileName, presentationTitle as experimental_presentationTitle, probeNpmGlobalPackage as experimental_probeNpmGlobalPackage, readBoundedLines as experimental_readBoundedLines, readCliVersion as experimental_readCliVersion, experimental_recordProviderChildIo, resolveExecutablePath as experimental_resolveExecutablePath, searchPresentation as experimental_searchPresentation, toolPresentation as experimental_toolPresentation, versionFrom as experimental_versionFrom, webFetchPresentation as experimental_webFetchPresentation, webSearchPresentation as experimental_webSearchPresentation, withTitle as experimental_withTitle, extensionKindSchema, extractResultText, getRawSdkMessage, getRecordProperty, getStringProperty, acpLaunchSpecSchema as hostDaemonAcpLaunchSpecSchema, initializeParamsSchema, instructionModeValues, interactionRequestPayloadSchema, isApprovalInteractionOutcome, isApprovalPendingInteractionPayload, isApprovalPendingInteractionResolution, isBackgroundAgentTaskType, isExtensionKind, isRecord, isSettledBackgroundTaskStatus, isStandaloneBuiltinCompactCommand, isUserQuestionPendingInteractionPayload, isUserQuestionPendingInteractionResolution, jsonRpcEnvelopeSchema, jsonValueSchema, mimeTypeFromExtension, modelListParamsSchema, normalizeAcpLaunchSpec as normalizeHostDaemonAcpLaunchSpec, normalizeProviderCommandOutput, pendingInteractionCommandActionSchema, pendingInteractionFileSystemPermissionsSchema, pendingInteractionMacOsPermissionsSchema, pendingInteractionNetworkPermissionsSchema, pendingInteractionRequestedPermissionProfileSchema, pendingInteractionResolutionSchema, permissionEscalationValues, providerHealthResultSchema, providerHealthSchema, providerInstallationActionKindSchema, providerInstallationActionSchema, providerInstallationCommandSchema, providerInstallationRequirementSchema, providerInstallationRunParamsSchema, providerInstallationRunResultSchema, providerInstallationSourceSchema, providerInstallationStatusParamsSchema, providerInstallationStatusSchema, providerInstallationVerificationSchema, providerInteractionOutcomeSchema, providerMaintenanceParamsSchema, providerRawEventSchema, providerRecoveryHintSchema, providerRecoveryKindSchema, providerRecoveryKindValues, providerRecoveryNotificationSchema, providerUsageResultSchema, providerUsageSchema, providerUsageWindowSchema, reasoningEffortsForLevels, reasoningLevelSchema, reasoningLevelValues, removeCommandMentionsFromPromptInput, runBridgeRequest, runtimePermissionScopeValues, sanitizeInheritedChildProcessEnv, sdkMessageEnvelopeSchema, shouldAutoDenyInteractiveRequest, skillsConfigureParamsSchema, textBlockSchema, threadArchiveParamsSchema, threadContextWindowUsageEnvelopeSchema, threadDeltaNotificationParamsSchema, threadDeltaSchema, threadDiscardParamsSchema, threadEventItemPresentationSchema, threadEventSearchModeSchema, threadForkParamsSchema, threadGoalClearParamsSchema, threadIdentityEnvelopeSchema, threadNameSetParamsSchema, threadResumeParamsSchema, threadStartParamsSchema, threadStopParamsSchema, threadUnarchiveParamsSchema, toNonNegativeNumber, toOptionalRecord, toOptionalString, toPositiveNumber, turnStartParamsSchema, turnSteerParamsSchema, userQuestionInteractionOutcomeSchema, withoutBridgeRuntimeEnv };
|
|
5262
|
+
export type { ApprovalInteractionOutcome, ApprovalPendingInteractionPayload, AvailableModel, BackgroundTaskStatus, BackgroundTaskUsage, BoundedLineReaderArgs, BridgeCapabilities, BridgeErrorData, BridgeExecutionOptions, BridgeGrammarVersions, BridgeJsonRpcResponse, BridgeSendError, BridgeSteerMode, BridgeToolCallRequest, BuildInteractiveResponseArgs, ClaudeTaskToolOutput, ClientTurnRequestId, ContextCategory, ContextEntry, ContextSnapshot, DecodedInteractiveRequest, DeltaBackgroundTaskShape, DeltaDelegationShape, DeltaExtensionShape, DeltaFileChange, DeltaFileReadShape, DeltaItemKey, DeltaItemShape, DeltaItemShapeType, DeltaNoTurnFallback, DeltaOutputChannel, DeltaPlanStepsShape, DeltaPresentation, DeltaProgressSnapshot, DeltaSearchShape, DeltaTextChannel, DynamicTool, ExtensionKind, AcpLaunchSpec as HostDaemonAcpLaunchSpec, InitializeResult, InstructionMode, InteractionRequestPayload, JsonObject, JsonRpcMessage, JsonValue, ModelReasoningEffort, NpmGlobalPackageProbe, PendingInteractionApprovalDecision, PendingInteractionApprovalSubject, PendingInteractionCommandAction, PendingInteractionGrantablePermissionProfile, PendingInteractionGrantedPermissionProfile, PendingInteractionPayload, PendingInteractionRequestedPermissionProfile, PendingInteractionResolution, PendingInteractionUserQuestionQuestion, PermissionEscalation, PermissionMode, PreparedProviderCommandDispatch, PromptInput, ProviderBridgeContext, ProviderBridgeDefinition, ProviderBridgeEntry, ProviderErrorCategory, ProviderErrorInfo, ProviderHealth, ProviderHealthResult, ProviderInboundRequest, ProviderInstallationAction, ProviderInstallationActionKind, ProviderInstallationCommand, ProviderInstallationRequirement, ProviderInstallationRunParams, ProviderInstallationRunResult, ProviderInstallationSource, ProviderInstallationStatus, ProviderInstallationStatusParams, ProviderInstallationVerification, ProviderInteractionOutcome, ProviderMaintenanceParams, ProviderPostInitializeRequest, ProviderRateLimitState, ProviderRateLimitStatus, ProviderRateLimitWindow, ProviderRawEvent, ProviderRawEventCoverage, ProviderRawEventDescription, ProviderRecoveryHint, ProviderRecoveryKind, ProviderRecoveryNotification, ProviderRuntimeEvent, ProviderUsage, ProviderUsageResult, ProviderUsageWindow, ProviderVisibilityMetadata, ReasoningLevel, RuntimePermissionPolicy, RuntimePermissionScope, ServiceTier, ThreadDelta, ThreadDeltaKind, ThreadDeltaNotificationParams, ThreadEventContextWindowUsage, ThreadEventItemPresentation, ThreadEventItemStatus, ThreadEventPlanStep, ThreadEventSearchMode, ThreadEventTokenUsageBreakdown, ThreadEventTurnStatus, ThreadEventUserContent, UserQuestionInteractionOutcome, UserQuestionPendingInteractionPayload, UserQuestionPendingInteractionResolution, WorkflowAgentSnapshot, WorkflowAgentState, WorkflowPhaseSnapshot, WorkflowProgressSnapshot };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { ReactNode, ComponentType } from 'react';
|
|
9
9
|
import { RenderResult } from '@testing-library/react';
|
|
10
|
-
import { ExperimentalSidebarFooterItemRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, ExperimentalSidebarNavigationRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration,
|
|
10
|
+
import { ExperimentalSidebarFooterItemRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, ExperimentalSidebarNavigationRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
|
|
11
11
|
|
|
12
12
|
type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
|
|
13
13
|
interface ExperimentalSidebarFooterRuntimeSnapshot {
|
|
@@ -24,6 +24,9 @@ interface ExperimentalSidebarFooterItemRuntime {
|
|
|
24
24
|
type CollectedExperimentalSidebarFooterItem = ExperimentalSidebarFooterItemRegistration & {
|
|
25
25
|
runtime: ExperimentalSidebarFooterItemRuntime;
|
|
26
26
|
};
|
|
27
|
+
type CollectedPluginProviderIconRegistration = Omit<PluginProviderIconRegistration, "providerKind"> & {
|
|
28
|
+
providerKind: PluginProviderIconRegistration["providerKind"] | "all";
|
|
29
|
+
};
|
|
27
30
|
|
|
28
31
|
/**
|
|
29
32
|
* `@get-bb/plugin-sdk/testing/app` — the frontend plugin test harness. Tests a
|
|
@@ -150,9 +153,11 @@ interface CapturedPluginApp {
|
|
|
150
153
|
diffRenderers: PluginDiffRendererRegistration[];
|
|
151
154
|
messageDirectives: PluginMessageDirectiveRegistration[];
|
|
152
155
|
messageActions: PluginMessageActionRegistration[];
|
|
153
|
-
providerIcons:
|
|
156
|
+
providerIcons: CollectedPluginProviderIconRegistration[];
|
|
157
|
+
icons: ExperimentalIconRegistration[];
|
|
154
158
|
timelineRenderers: PluginTimelineRendererRegistration[];
|
|
155
159
|
environmentProviderInputs: PluginEnvironmentProviderInputsRegistration[];
|
|
160
|
+
machineProviderInputs: PluginMachineProviderInputsRegistration[];
|
|
156
161
|
contentScripts: PluginContentScriptRegistration[];
|
|
157
162
|
}
|
|
158
163
|
type PluginAppModule = {
|