@get-bb/plugin-sdk 0.4.47 → 0.4.50
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 +12 -0
- package/bundled-types/bb-plugin-sdk-app.d.ts +203 -28
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +266 -0
- package/bundled-types/bb-plugin-sdk-host.d.ts +33 -2
- package/bundled-types/bb-plugin-sdk-internal-composer-customization-validation.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +231 -8
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +7 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +195 -1
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +202 -167
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +5 -1
- package/bundled-types/bb-plugin-sdk-testing.d.ts +308 -3
- package/bundled-types/bb-plugin-sdk.d.ts +1639 -572
- package/dist/app.js +6 -0
- package/dist/environment-provider.js +0 -0
- package/dist/host.js +734 -30
- package/dist/internal/composer-customization-validation.js +9 -0
- package/dist/internal/host-policy.js +233 -64
- package/dist/internal/plugin-app-collector.js +26 -0
- package/dist/provider-bridge-acp.js +46 -2
- package/dist/provider-bridge-testing.js +62 -1
- package/dist/provider-bridge.js +23 -1
- package/dist/testing/app.js +86 -1
- package/dist/testing/index.js +254 -72
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -9,6 +9,18 @@ The authoritative contracts are the exported declarations in
|
|
|
9
9
|
[`src/app-contract.ts`](src/app-contract.ts). Keep author-facing guidance in
|
|
10
10
|
the built-in `bb-plugin-authoring` skill synchronized with those declarations.
|
|
11
11
|
|
|
12
|
+
## Environment providers
|
|
13
|
+
|
|
14
|
+
`bb.experimental_environments.register` lets plugins create and remove thread
|
|
15
|
+
workspaces on enrolled machines. The type-only `./environment-provider` entry
|
|
16
|
+
contains the resource-operation contract. Core owns durable launches,
|
|
17
|
+
cancellation, retries, retirement, and teardown. Selections persist non-secret
|
|
18
|
+
inputs alongside `machine: { type: "existing", hostId }`.
|
|
19
|
+
|
|
20
|
+
The bundled Project checkout, Worktree, and Personal workspace plugins are the
|
|
21
|
+
reference implementations. See the Plugin Guide for registration, availability,
|
|
22
|
+
validation, lifecycle policy, and app inputs controls.
|
|
23
|
+
|
|
12
24
|
## Composer customization
|
|
13
25
|
|
|
14
26
|
Composer UI extensions register through `app.composer.customize(...)`. A
|
|
@@ -15,8 +15,8 @@ import { z } from 'zod';
|
|
|
15
15
|
* Host boundaries still validate values at runtime because TypeScript cannot
|
|
16
16
|
* exclude non-finite numbers and plugin bundles can bypass static types.
|
|
17
17
|
*/
|
|
18
|
-
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
19
|
-
[key: string]: JsonValue;
|
|
18
|
+
type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | {
|
|
19
|
+
[key: string]: JsonValue$1;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
/** A JSON-safe path segment reported by a Standard Schema validation issue. */
|
|
@@ -76,6 +76,39 @@ type PluginRpcCallInput<Method extends PluginRpcMethodContract> = StandardSchema
|
|
|
76
76
|
type PluginRpcCallArgs<Method extends PluginRpcMethodContract> = null extends PluginRpcCallInput<Method> ? [input?: PluginRpcCallInput<Method>] : [input: PluginRpcCallInput<Method>];
|
|
77
77
|
type PluginRpcResult<Method extends PluginRpcMethodContract> = StandardSchemaV1InferOutput<Method["output"]>;
|
|
78
78
|
|
|
79
|
+
interface JsonObject {
|
|
80
|
+
[key: string]: JsonValue;
|
|
81
|
+
}
|
|
82
|
+
type JsonValue = string | number | boolean | null | JsonValue[] | JsonObject;
|
|
83
|
+
|
|
84
|
+
declare const environmentWorkspaceDisplayKindSchema: z.ZodEnum<{
|
|
85
|
+
"managed-worktree": "managed-worktree";
|
|
86
|
+
"unmanaged-worktree": "unmanaged-worktree";
|
|
87
|
+
other: "other";
|
|
88
|
+
}>;
|
|
89
|
+
type EnvironmentWorkspaceDisplayKind = z.infer<typeof environmentWorkspaceDisplayKindSchema>;
|
|
90
|
+
|
|
91
|
+
declare const workspaceGitOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"none">;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
hasConflicts: z.ZodBoolean;
|
|
95
|
+
kind: z.ZodLiteral<"merge">;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
hasConflicts: z.ZodBoolean;
|
|
98
|
+
kind: z.ZodLiteral<"rebase">;
|
|
99
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
+
hasConflicts: z.ZodBoolean;
|
|
101
|
+
kind: z.ZodLiteral<"cherry-pick">;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
hasConflicts: z.ZodBoolean;
|
|
104
|
+
kind: z.ZodLiteral<"revert">;
|
|
105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
+
hasConflicts: z.ZodBoolean;
|
|
107
|
+
kind: z.ZodLiteral<"unknown">;
|
|
108
|
+
reason: z.ZodString;
|
|
109
|
+
}, z.core.$strip>], "kind">;
|
|
110
|
+
type WorkspaceGitOperation = z.infer<typeof workspaceGitOperationSchema>;
|
|
111
|
+
|
|
79
112
|
declare const reasoningLevelSchema: z.ZodEnum<{
|
|
80
113
|
high: "high";
|
|
81
114
|
low: "low";
|
|
@@ -294,6 +327,14 @@ declare const createThreadEnvironmentArgsSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
294
327
|
}, z.core.$strip>], "type">;
|
|
295
328
|
}, z.core.$strip>, z.ZodObject<{
|
|
296
329
|
type: z.ZodLiteral<"project-default">;
|
|
330
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
331
|
+
environmentProviderId: z.ZodString;
|
|
332
|
+
inputs: z.ZodDefault<z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
333
|
+
machine: z.ZodObject<{
|
|
334
|
+
hostId: z.ZodString;
|
|
335
|
+
type: z.ZodLiteral<"existing">;
|
|
336
|
+
}, z.core.$strip>;
|
|
337
|
+
type: z.ZodLiteral<"provider">;
|
|
297
338
|
}, z.core.$strip>], "type">;
|
|
298
339
|
type CreateThreadEnvironmentArgs = z.infer<typeof createThreadEnvironmentArgsSchema>;
|
|
299
340
|
|
|
@@ -374,7 +415,7 @@ interface PluginThreadPanelProps {
|
|
|
374
415
|
* through persistence, so the tab restores across reloads); null when the
|
|
375
416
|
* action opened the panel without params.
|
|
376
417
|
*/
|
|
377
|
-
params: JsonValue | null;
|
|
418
|
+
params: JsonValue$1 | null;
|
|
378
419
|
}
|
|
379
420
|
/** Props passed to a panel tab opened by `experimental_newThreadPanelAction`. */
|
|
380
421
|
interface PluginNewThreadPanelProps {
|
|
@@ -385,19 +426,19 @@ interface PluginNewThreadPanelProps {
|
|
|
385
426
|
* through persistence, so the tab restores across reloads); null when the
|
|
386
427
|
* action opened the panel without params.
|
|
387
428
|
*/
|
|
388
|
-
params: JsonValue | null;
|
|
429
|
+
params: JsonValue$1 | null;
|
|
389
430
|
}
|
|
390
431
|
interface PluginPendingInteractionView {
|
|
391
432
|
id: string;
|
|
392
433
|
threadId: string;
|
|
393
434
|
title: string;
|
|
394
|
-
payload: JsonValue;
|
|
435
|
+
payload: JsonValue$1;
|
|
395
436
|
createdAt: number;
|
|
396
437
|
expiresAt: number | null;
|
|
397
438
|
}
|
|
398
439
|
interface PluginPendingInteractionProps {
|
|
399
440
|
interaction: PluginPendingInteractionView;
|
|
400
|
-
submit(value: JsonValue): Promise<void>;
|
|
441
|
+
submit(value: JsonValue$1): Promise<void>;
|
|
401
442
|
cancel(): Promise<void>;
|
|
402
443
|
}
|
|
403
444
|
/**
|
|
@@ -738,11 +779,11 @@ interface ExperimentalAppOverlayRegistration {
|
|
|
738
779
|
* verifies that the value is JSON-safe, then calls this validator before
|
|
739
780
|
* selecting the tab or delivering the target.
|
|
740
781
|
*/
|
|
741
|
-
interface ExperimentalFixedTabTargetContract<Target extends JsonValue> {
|
|
742
|
-
validate(value: JsonValue): value is Target;
|
|
782
|
+
interface ExperimentalFixedTabTargetContract<Target extends JsonValue$1> {
|
|
783
|
+
validate(value: JsonValue$1): value is Target;
|
|
743
784
|
}
|
|
744
785
|
/** Stable, owner-scoped reference used by the app-panel controller. */
|
|
745
|
-
type ExperimentalPluginFixedTabReference<Target extends JsonValue = never> = {
|
|
786
|
+
type ExperimentalPluginFixedTabReference<Target extends JsonValue$1 = never> = {
|
|
746
787
|
/** The owning `navPanel` id; validated against the containing registration. */
|
|
747
788
|
readonly panelId: string;
|
|
748
789
|
/** Unique within the owning nav panel; letters, digits, `-`, `_`. */
|
|
@@ -755,7 +796,7 @@ type ExperimentalPluginFixedTabReference<Target extends JsonValue = never> = {
|
|
|
755
796
|
readonly experimental_target: ExperimentalFixedTabTargetContract<Target>;
|
|
756
797
|
});
|
|
757
798
|
/** A fixed tab declared by a plugin nav panel. */
|
|
758
|
-
type PluginFixedTabRegistration<Target extends JsonValue = never> = ExperimentalPluginFixedTabReference<Target> & {
|
|
799
|
+
type PluginFixedTabRegistration<Target extends JsonValue$1 = never> = ExperimentalPluginFixedTabReference<Target> & {
|
|
759
800
|
title: string;
|
|
760
801
|
/** Icon hint (BB icon name); unknown names fall back to a generic icon. */
|
|
761
802
|
icon: string;
|
|
@@ -764,7 +805,7 @@ type PluginFixedTabRegistration<Target extends JsonValue = never> = Experimental
|
|
|
764
805
|
layout?: "flush" | "padded";
|
|
765
806
|
};
|
|
766
807
|
/** A fixed tab with either no target or an owner-validated JSON target. */
|
|
767
|
-
type PluginFixedTabDeclaration = PluginFixedTabRegistration | PluginFixedTabRegistration<JsonValue>;
|
|
808
|
+
type PluginFixedTabDeclaration = PluginFixedTabRegistration | PluginFixedTabRegistration<JsonValue$1>;
|
|
768
809
|
interface PluginNavPanelRegistration {
|
|
769
810
|
/** Unique within the plugin; letters, digits, `-`, `_`. */
|
|
770
811
|
id: string;
|
|
@@ -818,7 +859,7 @@ interface PluginPanelActionOpenOptions {
|
|
|
818
859
|
* Persisted with the tab and handed to the component as its `params` prop.
|
|
819
860
|
* Must be a JSON value; anything else is a declined open.
|
|
820
861
|
*/
|
|
821
|
-
params?: JsonValue;
|
|
862
|
+
params?: JsonValue$1;
|
|
822
863
|
}
|
|
823
864
|
/**
|
|
824
865
|
* Context handed to a `threadPanelAction`'s `run`.
|
|
@@ -1001,11 +1042,6 @@ interface ExperimentalSidebarFooter {
|
|
|
1001
1042
|
* one.
|
|
1002
1043
|
*/
|
|
1003
1044
|
type PluginSidebarThreadIndicator = "background-agent" | "background-command" | "draft" | "goal" | "none" | "plan-mode" | "runtime" | "unread-error" | "unread-success" | "waiting-for-input" | "workflow" | "working-draft";
|
|
1004
|
-
/**
|
|
1005
|
-
* How a thread's environment presents its workspace: a worktree bb manages,
|
|
1006
|
-
* a worktree the user manages, or anything else (a plain checkout).
|
|
1007
|
-
*/
|
|
1008
|
-
type PluginSidebarWorkspaceKind = "managed-worktree" | "other" | "unmanaged-worktree";
|
|
1009
1045
|
/** Live work counts on a thread. All zero means nothing is running. */
|
|
1010
1046
|
interface PluginSidebarThreadActivity {
|
|
1011
1047
|
workflows: number;
|
|
@@ -1054,7 +1090,14 @@ interface PluginSidebarThread {
|
|
|
1054
1090
|
id: string | null;
|
|
1055
1091
|
name: string | null;
|
|
1056
1092
|
branchName: string | null;
|
|
1057
|
-
|
|
1093
|
+
/**
|
|
1094
|
+
* The id of the environment provider that produced this environment, or
|
|
1095
|
+
* null for a project's own checkout. Resolve it against
|
|
1096
|
+
* `GET /system/environment-providers` for a display name and icon.
|
|
1097
|
+
*/
|
|
1098
|
+
providerId: string | null;
|
|
1099
|
+
/** @deprecated Use providerId and the environment provider catalog instead. */
|
|
1100
|
+
workspaceDisplayKind: EnvironmentWorkspaceDisplayKind | null;
|
|
1058
1101
|
} | null;
|
|
1059
1102
|
/**
|
|
1060
1103
|
* The machine this thread's work runs on, with the name resolved for you.
|
|
@@ -1546,7 +1589,7 @@ interface PluginTimelineRendererProps {
|
|
|
1546
1589
|
* plugin's declared schema at ingest), or for a `"tool"` row the call's
|
|
1547
1590
|
* `{ arguments, output }`.
|
|
1548
1591
|
*/
|
|
1549
|
-
payload: JsonValue;
|
|
1592
|
+
payload: JsonValue$1;
|
|
1550
1593
|
/**
|
|
1551
1594
|
* The bridge's presentation for the row. Null only for a generic tool row
|
|
1552
1595
|
* persisted before bridges attached presentation (grammar v2); an
|
|
@@ -1587,6 +1630,52 @@ interface PluginTimelineRendererRegistration {
|
|
|
1587
1630
|
kind: string;
|
|
1588
1631
|
component: ComponentType<PluginTimelineRendererProps>;
|
|
1589
1632
|
}
|
|
1633
|
+
/**
|
|
1634
|
+
* Props passed to an `experimental_environmentProviderInputs` component — the
|
|
1635
|
+
* control the New Thread environment picker renders beside this plugin's
|
|
1636
|
+
* selected environment provider, for the provider's declared `inputs`.
|
|
1637
|
+
*/
|
|
1638
|
+
interface PluginEnvironmentProviderInputsProps {
|
|
1639
|
+
/** Project selected in the composer; null in projectless compose. */
|
|
1640
|
+
projectId: string | null;
|
|
1641
|
+
/**
|
|
1642
|
+
* The enrolled machine the selection names; null before one is picked.
|
|
1643
|
+
*/
|
|
1644
|
+
hostId: string | null;
|
|
1645
|
+
/**
|
|
1646
|
+
* The `inputs` value the selection will carry: null until `onChange`
|
|
1647
|
+
* supplies one.
|
|
1648
|
+
* The server parses it with the provider's `inputs` schema at create time,
|
|
1649
|
+
* so the component only has to produce a value that schema accepts.
|
|
1650
|
+
*/
|
|
1651
|
+
value: JsonValue$1 | null;
|
|
1652
|
+
/**
|
|
1653
|
+
* Replace the inputs that will be submitted or block submission with the
|
|
1654
|
+
* reason the control should show.
|
|
1655
|
+
*/
|
|
1656
|
+
onChange(next: PluginEnvironmentProviderInputsChange): void;
|
|
1657
|
+
}
|
|
1658
|
+
type PluginEnvironmentProviderInputsChange = {
|
|
1659
|
+
status: "ready";
|
|
1660
|
+
value: JsonValue$1;
|
|
1661
|
+
} | {
|
|
1662
|
+
status: "blocked";
|
|
1663
|
+
reason: string;
|
|
1664
|
+
};
|
|
1665
|
+
/**
|
|
1666
|
+
* Supply the control for one of this plugin's environment providers that
|
|
1667
|
+
* declared `inputs` (registered server-side via
|
|
1668
|
+
* `bb.experimental_environments.register`). The New Thread environment picker
|
|
1669
|
+
* renders the component beside the picker while that provider is selected and
|
|
1670
|
+
* submits the component's latest `onChange` value as the selection's `inputs`.
|
|
1671
|
+
* A provider whose schema rejects empty inputs cannot be submitted without a
|
|
1672
|
+
* registration that reports ready inputs.
|
|
1673
|
+
*/
|
|
1674
|
+
interface PluginEnvironmentProviderInputsRegistration {
|
|
1675
|
+
/** The environment provider id this control supplies inputs for. */
|
|
1676
|
+
environmentProviderId: string;
|
|
1677
|
+
component: ComponentType<PluginEnvironmentProviderInputsProps>;
|
|
1678
|
+
}
|
|
1590
1679
|
interface PluginAppSlots {
|
|
1591
1680
|
homepageSection(registration: PluginHomepageSectionRegistration): void;
|
|
1592
1681
|
settingsSection(registration: PluginSettingsSectionRegistration): void;
|
|
@@ -1645,8 +1734,8 @@ interface PluginAppSlots {
|
|
|
1645
1734
|
*/
|
|
1646
1735
|
commandPaletteAction(registration: PluginCommandPaletteActionRegistration): void;
|
|
1647
1736
|
/**
|
|
1648
|
-
* Draw one agent provider's icon with an inline
|
|
1649
|
-
* its `<img>`-rendered logo file (see
|
|
1737
|
+
* Draw one agent or environment provider's icon with an inline
|
|
1738
|
+
* React component instead of its `<img>`-rendered logo file (see
|
|
1650
1739
|
* {@link PluginProviderIconRegistration}). Experimental: see
|
|
1651
1740
|
* docs/api_to_audit.md.
|
|
1652
1741
|
*/
|
|
@@ -1658,6 +1747,13 @@ interface PluginAppSlots {
|
|
|
1658
1747
|
* docs/api_to_audit.md.
|
|
1659
1748
|
*/
|
|
1660
1749
|
experimental_timelineRenderer(registration: PluginTimelineRendererRegistration): void;
|
|
1750
|
+
/**
|
|
1751
|
+
* Supply the inputs control the New Thread environment picker renders
|
|
1752
|
+
* beside one of this plugin's selected environment providers (see
|
|
1753
|
+
* {@link PluginEnvironmentProviderInputsRegistration}). Experimental:
|
|
1754
|
+
* see docs/api_to_audit.md.
|
|
1755
|
+
*/
|
|
1756
|
+
experimental_environmentProviderInputs(registration: PluginEnvironmentProviderInputsRegistration): void;
|
|
1661
1757
|
}
|
|
1662
1758
|
interface PluginAppComposer {
|
|
1663
1759
|
customize(registration: ComposerCustomization): void;
|
|
@@ -2065,6 +2161,65 @@ interface ExperimentalProviderModelPickerProps {
|
|
|
2065
2161
|
disabled?: boolean;
|
|
2066
2162
|
className?: string;
|
|
2067
2163
|
}
|
|
2164
|
+
/**
|
|
2165
|
+
* Props of the host-owned `experimental_BranchPicker` component — bb's branch
|
|
2166
|
+
* picker bundled with its branch-options loading for the given host and
|
|
2167
|
+
* project, the control bb's own New Thread composer renders as "Branch from".
|
|
2168
|
+
* The host owns fetching, searching, and refreshing the branch list; the
|
|
2169
|
+
* caller owns only the selection.
|
|
2170
|
+
*/
|
|
2171
|
+
interface BranchPickerProps {
|
|
2172
|
+
/**
|
|
2173
|
+
* The enrolled machine whose project checkout supplies the branch list.
|
|
2174
|
+
* Null renders the picker disabled with no options.
|
|
2175
|
+
*/
|
|
2176
|
+
hostId: string | null;
|
|
2177
|
+
/** The project whose source on `hostId` is listed; null disables loading. */
|
|
2178
|
+
projectId: string | null;
|
|
2179
|
+
/**
|
|
2180
|
+
* The selected branch name, or null when no branch is chosen (the host
|
|
2181
|
+
* shows its placeholder and the consumer falls back to its own default).
|
|
2182
|
+
*/
|
|
2183
|
+
value: string | null;
|
|
2184
|
+
/** Called with the picked branch name, or null when the pick is cleared. */
|
|
2185
|
+
onChange(next: string | null): void;
|
|
2186
|
+
/**
|
|
2187
|
+
* Text placed before the branch on the trigger, e.g. "Base:". Omitted, the
|
|
2188
|
+
* trigger is the branch alone.
|
|
2189
|
+
*/
|
|
2190
|
+
label?: string;
|
|
2191
|
+
/**
|
|
2192
|
+
* The trigger while nothing is picked. Omitted, the host shows the resolved
|
|
2193
|
+
* default worktree base branch muted, or a neutral `default` placeholder
|
|
2194
|
+
* when the base cannot be resolved.
|
|
2195
|
+
*/
|
|
2196
|
+
placeholder?: string;
|
|
2197
|
+
/** Render the current selection without allowing changes. */
|
|
2198
|
+
disabled?: boolean;
|
|
2199
|
+
}
|
|
2200
|
+
interface UseBranchesArgs {
|
|
2201
|
+
hostId: string | null;
|
|
2202
|
+
projectId: string | null;
|
|
2203
|
+
query?: string;
|
|
2204
|
+
}
|
|
2205
|
+
interface BranchesState {
|
|
2206
|
+
branches: readonly string[];
|
|
2207
|
+
remoteBranches: readonly string[];
|
|
2208
|
+
isLoading: boolean;
|
|
2209
|
+
refresh(): Promise<void>;
|
|
2210
|
+
}
|
|
2211
|
+
interface UseCheckoutStateArgs {
|
|
2212
|
+
hostId: string | null;
|
|
2213
|
+
projectId: string | null;
|
|
2214
|
+
}
|
|
2215
|
+
interface CheckoutState {
|
|
2216
|
+
isGit: boolean | null;
|
|
2217
|
+
unborn: boolean;
|
|
2218
|
+
detached: boolean;
|
|
2219
|
+
dirty: boolean;
|
|
2220
|
+
currentBranch: string | null;
|
|
2221
|
+
operation: WorkspaceGitOperation;
|
|
2222
|
+
}
|
|
2068
2223
|
/** Props of BB's controlled, host-resolved permission-mode picker. */
|
|
2069
2224
|
interface ExperimentalPermissionModePickerProps {
|
|
2070
2225
|
/** Provider whose supported modes determine the available choices. */
|
|
@@ -2297,12 +2452,12 @@ type ExperimentalAppPanelSurface = {
|
|
|
2297
2452
|
* and route remounts during the current app session, but is never persisted
|
|
2298
2453
|
* across a refresh. Call `clear` when the owner returns to its untargeted state.
|
|
2299
2454
|
*/
|
|
2300
|
-
interface ExperimentalFixedTabTargetState<Target extends JsonValue> {
|
|
2455
|
+
interface ExperimentalFixedTabTargetState<Target extends JsonValue$1> {
|
|
2301
2456
|
readonly sequence: number;
|
|
2302
2457
|
readonly target: Target;
|
|
2303
2458
|
clear(): void;
|
|
2304
2459
|
}
|
|
2305
|
-
type ExperimentalOpenFixedTabOptions<Target extends JsonValue> = {
|
|
2460
|
+
type ExperimentalOpenFixedTabOptions<Target extends JsonValue$1> = {
|
|
2306
2461
|
surface: ExperimentalAppPanelSurface;
|
|
2307
2462
|
tab: ExperimentalPluginFixedTabReference<Target>;
|
|
2308
2463
|
/** Omit to select the tab without replacing its current session target. */
|
|
@@ -2310,7 +2465,7 @@ type ExperimentalOpenFixedTabOptions<Target extends JsonValue> = {
|
|
|
2310
2465
|
};
|
|
2311
2466
|
/** Surface-aware controller for selecting owner-scoped fixed tabs. */
|
|
2312
2467
|
interface ExperimentalAppPanel {
|
|
2313
|
-
openFixedTab<Target extends JsonValue = never>(options: ExperimentalOpenFixedTabOptions<Target>): boolean;
|
|
2468
|
+
openFixedTab<Target extends JsonValue$1 = never>(options: ExperimentalOpenFixedTabOptions<Target>): boolean;
|
|
2314
2469
|
}
|
|
2315
2470
|
/** Current app selection, derived from the route. */
|
|
2316
2471
|
interface BbContext {
|
|
@@ -2379,7 +2534,7 @@ interface PluginSdkApp {
|
|
|
2379
2534
|
/** Select one of this plugin's eligible fixed tabs on the current surface. */
|
|
2380
2535
|
experimental_useAppPanel(): ExperimentalAppPanel;
|
|
2381
2536
|
/** Read or clear the owning tab's validated, session-scoped target. */
|
|
2382
|
-
experimental_useFixedTabTarget<Target extends JsonValue>(tab: ExperimentalPluginFixedTabReference<Target>): ExperimentalFixedTabTargetState<Target> | null;
|
|
2537
|
+
experimental_useFixedTabTarget<Target extends JsonValue$1>(tab: ExperimentalPluginFixedTabReference<Target>): ExperimentalFixedTabTargetState<Target> | null;
|
|
2383
2538
|
useComposer(): PluginComposerApi;
|
|
2384
2539
|
/**
|
|
2385
2540
|
* The sidebar's live thread view (see {@link PluginSidebarThreadsState}).
|
|
@@ -2470,6 +2625,23 @@ interface PluginSdkApp {
|
|
|
2470
2625
|
* see docs/api_to_audit.md.
|
|
2471
2626
|
*/
|
|
2472
2627
|
experimental_PermissionModePicker: ComponentType<ExperimentalPermissionModePickerProps>;
|
|
2628
|
+
/**
|
|
2629
|
+
* BB's branch picker with its branch-options loading for one host and
|
|
2630
|
+
* project (see {@link BranchPickerProps}) — the same control
|
|
2631
|
+
* the New Thread composer renders as "Branch from". Experimental: see
|
|
2632
|
+
* docs/api_to_audit.md.
|
|
2633
|
+
*/
|
|
2634
|
+
experimental_BranchPicker: ComponentType<BranchPickerProps>;
|
|
2635
|
+
/**
|
|
2636
|
+
* Search and refresh the branch list for one project source. Experimental:
|
|
2637
|
+
* see docs/api_to_audit.md.
|
|
2638
|
+
*/
|
|
2639
|
+
experimental_useBranches(args: UseBranchesArgs): BranchesState;
|
|
2640
|
+
/**
|
|
2641
|
+
* Inspect the checkout state for one project source. Experimental: see
|
|
2642
|
+
* docs/api_to_audit.md.
|
|
2643
|
+
*/
|
|
2644
|
+
experimental_useCheckoutState(args: UseCheckoutStateArgs): CheckoutState;
|
|
2473
2645
|
/**
|
|
2474
2646
|
* The host-owned source viewer (see {@link SourceCodeProps}). Renders
|
|
2475
2647
|
* supplied source text with BB's syntax highlighting, gutters, and live code
|
|
@@ -2497,6 +2669,9 @@ declare const UrlLink: react.ComponentType<UrlLinkProps>;
|
|
|
2497
2669
|
declare const experimental_NewThreadComposer: react.ComponentType<NewThreadComposerProps>;
|
|
2498
2670
|
declare const experimental_ProviderModelPicker: react.ComponentType<ExperimentalProviderModelPickerProps>;
|
|
2499
2671
|
declare const experimental_PermissionModePicker: react.ComponentType<ExperimentalPermissionModePickerProps>;
|
|
2672
|
+
declare const experimental_BranchPicker: react.ComponentType<BranchPickerProps>;
|
|
2673
|
+
declare const experimental_useBranches: (args: UseBranchesArgs) => BranchesState;
|
|
2674
|
+
declare const experimental_useCheckoutState: (args: UseCheckoutStateArgs) => CheckoutState;
|
|
2500
2675
|
declare const experimental_SourceCode: react.ComponentType<SourceCodeProps>;
|
|
2501
2676
|
declare const experimental_Diff: react.ComponentType<DiffProps>;
|
|
2502
2677
|
declare const useRpc: <Contract extends PluginRpcContract = Readonly<Record<string, PluginRpcMethodContract<StandardSchemaV1<unknown, unknown>, StandardSchemaV1<unknown, unknown>>>>>() => PluginRpcClient<Contract>;
|
|
@@ -2506,7 +2681,7 @@ declare const useSettings: () => PluginSettingsState;
|
|
|
2506
2681
|
declare const useBbContext: () => BbContext;
|
|
2507
2682
|
declare const useBbNavigate: () => BbNavigate;
|
|
2508
2683
|
declare const experimental_useAppPanel: () => ExperimentalAppPanel;
|
|
2509
|
-
declare const experimental_useFixedTabTarget: <Target extends JsonValue>(tab: ExperimentalPluginFixedTabReference<Target>) => ExperimentalFixedTabTargetState<Target> | null;
|
|
2684
|
+
declare const experimental_useFixedTabTarget: <Target extends JsonValue$1>(tab: ExperimentalPluginFixedTabReference<Target>) => ExperimentalFixedTabTargetState<Target> | null;
|
|
2510
2685
|
declare const useComposer: () => PluginComposerApi;
|
|
2511
2686
|
declare const useComposerView: () => ComposerView;
|
|
2512
2687
|
declare const experimental_useSidebarThreads: () => PluginSidebarThreadsState;
|
|
@@ -2516,5 +2691,5 @@ declare const experimental_useSidebarThreadSplit: (threadId: string) => PluginSi
|
|
|
2516
2691
|
declare const experimental_useProviders: () => PluginProvidersState;
|
|
2517
2692
|
declare const experimental_useCodeTheme: () => PluginCodeThemeState;
|
|
2518
2693
|
|
|
2519
|
-
export { Markdown, ThreadChat, UrlLink, definePluginApp, experimental_Diff, experimental_FileLink, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderModelPicker, experimental_SourceCode, experimental_useAppPanel, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useRealtime, useRealtimeConnectionState, useRpc, useSettings };
|
|
2520
|
-
export type { BbContext, BbNavigate, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabReference, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, 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, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState,
|
|
2694
|
+
export { Markdown, ThreadChat, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderModelPicker, experimental_SourceCode, experimental_useAppPanel, experimental_useBranches, experimental_useCheckoutState, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_useProviders, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposerView, useRealtime, useRealtimeConnectionState, useRpc, useSettings };
|
|
2695
|
+
export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabReference, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, 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, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|