@get-bb/plugin-sdk 0.4.104 → 0.4.106
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 +9 -10
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +2 -0
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +3 -0
- package/bundled-types/bb-plugin-sdk-testing.d.ts +3 -0
- package/bundled-types/bb-plugin-sdk.d.ts +11 -10
- package/dist/internal/host-policy.js +7 -0
- package/dist/provider-bridge-acp.js +1 -1
- package/dist/testing/app.js +1 -1
- package/dist/testing/index.js +7 -0
- package/package.json +1 -1
|
@@ -2470,9 +2470,8 @@ interface ExperimentalProviderModelPickerProps {
|
|
|
2470
2470
|
/**
|
|
2471
2471
|
* Props of the host-owned `experimental_BranchPicker` component — bb's branch
|
|
2472
2472
|
* picker bundled with its branch-options loading for the given host and
|
|
2473
|
-
* project
|
|
2474
|
-
*
|
|
2475
|
-
* caller owns only the selection.
|
|
2473
|
+
* project. The host owns fetching, searching, and refreshing the branch list;
|
|
2474
|
+
* the caller owns the selection and its meaning.
|
|
2476
2475
|
*/
|
|
2477
2476
|
interface BranchPickerProps {
|
|
2478
2477
|
/**
|
|
@@ -2483,21 +2482,21 @@ interface BranchPickerProps {
|
|
|
2483
2482
|
/** The project whose source on `hostId` is listed; null disables loading. */
|
|
2484
2483
|
projectId: string | null;
|
|
2485
2484
|
/**
|
|
2486
|
-
* The selected branch name, or null when no branch is chosen
|
|
2487
|
-
* shows
|
|
2485
|
+
* The selected branch name, or null when no branch is chosen. A null value
|
|
2486
|
+
* shows the placeholder without selecting or implying a default branch.
|
|
2488
2487
|
*/
|
|
2489
2488
|
value: string | null;
|
|
2490
2489
|
/** Called with the picked branch name, or null when the pick is cleared. */
|
|
2491
2490
|
onChange(next: string | null): void;
|
|
2492
2491
|
/**
|
|
2493
|
-
* Text placed before the branch on the trigger
|
|
2494
|
-
* trigger is the branch alone
|
|
2492
|
+
* Text placed before the branch on the trigger and used as the menu heading,
|
|
2493
|
+
* e.g. "Compare with:". Omitted, the trigger is the branch alone and the menu
|
|
2494
|
+
* uses the neutral "Branches" heading.
|
|
2495
2495
|
*/
|
|
2496
2496
|
label?: string;
|
|
2497
2497
|
/**
|
|
2498
|
-
* The trigger while nothing is picked
|
|
2499
|
-
*
|
|
2500
|
-
* when the base cannot be resolved.
|
|
2498
|
+
* The complete trigger text while nothing is picked, without the label
|
|
2499
|
+
* prefix. Defaults to "Select branch".
|
|
2501
2500
|
*/
|
|
2502
2501
|
placeholder?: string;
|
|
2503
2502
|
/** Render the current selection without allowing changes. */
|
|
@@ -292,6 +292,8 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
292
292
|
/** Experimental per-machine availability, probed in the background for pickers and again at thread creation: see docs/api_to_audit.md. */
|
|
293
293
|
availability?(context: PluginEnvironmentProviderAvailabilityContext): PluginEnvironmentProviderAvailability | Promise<PluginEnvironmentProviderAvailability>;
|
|
294
294
|
validate?(context: PluginEnvironmentProviderValidateContext<R, S>): PluginEnvironmentValidateDecision | Promise<PluginEnvironmentValidateDecision>;
|
|
295
|
+
/** Pure path selection from parsed inputs. Core reuses a recorded environment on the selected host before calling create; null requests normal creation. */
|
|
296
|
+
experimental_existingPath?(inputs: InputsValue<S>): string | null;
|
|
295
297
|
create(context: PluginEnvironmentProviderCreateContext<R, S>): Promise<PluginEnvironmentProviderCreateResult>;
|
|
296
298
|
remove(context: PluginEnvironmentProviderRemoveContext): Promise<PluginEnvironmentProviderRemoveResult>;
|
|
297
299
|
}
|
|
@@ -630,6 +630,8 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
630
630
|
/** Experimental per-machine availability, probed in the background for pickers and again at thread creation: see docs/api_to_audit.md. */
|
|
631
631
|
availability?(context: PluginEnvironmentProviderAvailabilityContext): PluginEnvironmentProviderAvailability | Promise<PluginEnvironmentProviderAvailability>;
|
|
632
632
|
validate?(context: PluginEnvironmentProviderValidateContext<R, S>): PluginEnvironmentValidateDecision | Promise<PluginEnvironmentValidateDecision>;
|
|
633
|
+
/** Pure path selection from parsed inputs. Core reuses a recorded environment on the selected host before calling create; null requests normal creation. */
|
|
634
|
+
experimental_existingPath?(inputs: InputsValue$1<S>): string | null;
|
|
633
635
|
create(context: PluginEnvironmentProviderCreateContext<R, S>): Promise<PluginEnvironmentProviderCreateResult>;
|
|
634
636
|
remove(context: PluginEnvironmentProviderRemoveContext): Promise<PluginEnvironmentProviderRemoveResult>;
|
|
635
637
|
}
|
|
@@ -1931,6 +1933,7 @@ interface NormalizedPluginEnvironmentProvider {
|
|
|
1931
1933
|
inputsJsonSchema: JsonValue | null;
|
|
1932
1934
|
availability: NonNullable<PluginEnvironmentProviderDeclaration["availability"]> | null;
|
|
1933
1935
|
validate: NonNullable<PluginEnvironmentProviderDeclaration["validate"]> | null;
|
|
1936
|
+
experimental_existingPath: NonNullable<PluginEnvironmentProviderDeclaration["experimental_existingPath"]> | null;
|
|
1934
1937
|
create: PluginEnvironmentProviderDeclaration["create"];
|
|
1935
1938
|
remove: PluginEnvironmentProviderDeclaration["remove"];
|
|
1936
1939
|
policy: PluginEnvironmentProviderPolicy;
|
|
@@ -423,6 +423,8 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
423
423
|
/** Experimental per-machine availability, probed in the background for pickers and again at thread creation: see docs/api_to_audit.md. */
|
|
424
424
|
availability?(context: PluginEnvironmentProviderAvailabilityContext): PluginEnvironmentProviderAvailability | Promise<PluginEnvironmentProviderAvailability>;
|
|
425
425
|
validate?(context: PluginEnvironmentProviderValidateContext<R, S>): PluginEnvironmentValidateDecision | Promise<PluginEnvironmentValidateDecision>;
|
|
426
|
+
/** Pure path selection from parsed inputs. Core reuses a recorded environment on the selected host before calling create; null requests normal creation. */
|
|
427
|
+
experimental_existingPath?(inputs: InputsValue<S>): string | null;
|
|
426
428
|
create(context: PluginEnvironmentProviderCreateContext<R, S>): Promise<PluginEnvironmentProviderCreateResult>;
|
|
427
429
|
remove(context: PluginEnvironmentProviderRemoveContext): Promise<PluginEnvironmentProviderRemoveResult>;
|
|
428
430
|
}
|
|
@@ -980,6 +982,7 @@ interface NormalizedPluginEnvironmentProvider {
|
|
|
980
982
|
inputsJsonSchema: JsonValue | null;
|
|
981
983
|
availability: NonNullable<PluginEnvironmentProviderDeclaration["availability"]> | null;
|
|
982
984
|
validate: NonNullable<PluginEnvironmentProviderDeclaration["validate"]> | null;
|
|
985
|
+
experimental_existingPath: NonNullable<PluginEnvironmentProviderDeclaration["experimental_existingPath"]> | null;
|
|
983
986
|
create: PluginEnvironmentProviderDeclaration["create"];
|
|
984
987
|
remove: PluginEnvironmentProviderDeclaration["remove"];
|
|
985
988
|
policy: PluginEnvironmentProviderPolicy;
|
|
@@ -17215,9 +17215,8 @@ interface ExperimentalProviderModelPickerProps {
|
|
|
17215
17215
|
/**
|
|
17216
17216
|
* Props of the host-owned `experimental_BranchPicker` component — bb's branch
|
|
17217
17217
|
* picker bundled with its branch-options loading for the given host and
|
|
17218
|
-
* project
|
|
17219
|
-
*
|
|
17220
|
-
* caller owns only the selection.
|
|
17218
|
+
* project. The host owns fetching, searching, and refreshing the branch list;
|
|
17219
|
+
* the caller owns the selection and its meaning.
|
|
17221
17220
|
*/
|
|
17222
17221
|
interface BranchPickerProps {
|
|
17223
17222
|
/**
|
|
@@ -17228,21 +17227,21 @@ interface BranchPickerProps {
|
|
|
17228
17227
|
/** The project whose source on `hostId` is listed; null disables loading. */
|
|
17229
17228
|
projectId: string | null;
|
|
17230
17229
|
/**
|
|
17231
|
-
* The selected branch name, or null when no branch is chosen
|
|
17232
|
-
* shows
|
|
17230
|
+
* The selected branch name, or null when no branch is chosen. A null value
|
|
17231
|
+
* shows the placeholder without selecting or implying a default branch.
|
|
17233
17232
|
*/
|
|
17234
17233
|
value: string | null;
|
|
17235
17234
|
/** Called with the picked branch name, or null when the pick is cleared. */
|
|
17236
17235
|
onChange(next: string | null): void;
|
|
17237
17236
|
/**
|
|
17238
|
-
* Text placed before the branch on the trigger
|
|
17239
|
-
* trigger is the branch alone
|
|
17237
|
+
* Text placed before the branch on the trigger and used as the menu heading,
|
|
17238
|
+
* e.g. "Compare with:". Omitted, the trigger is the branch alone and the menu
|
|
17239
|
+
* uses the neutral "Branches" heading.
|
|
17240
17240
|
*/
|
|
17241
17241
|
label?: string;
|
|
17242
17242
|
/**
|
|
17243
|
-
* The trigger while nothing is picked
|
|
17244
|
-
*
|
|
17245
|
-
* when the base cannot be resolved.
|
|
17243
|
+
* The complete trigger text while nothing is picked, without the label
|
|
17244
|
+
* prefix. Defaults to "Select branch".
|
|
17246
17245
|
*/
|
|
17247
17246
|
placeholder?: string;
|
|
17248
17247
|
/** Render the current selection without allowing changes. */
|
|
@@ -17917,6 +17916,8 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
17917
17916
|
/** Experimental per-machine availability, probed in the background for pickers and again at thread creation: see docs/api_to_audit.md. */
|
|
17918
17917
|
availability?(context: PluginEnvironmentProviderAvailabilityContext): PluginEnvironmentProviderAvailability | Promise<PluginEnvironmentProviderAvailability>;
|
|
17919
17918
|
validate?(context: PluginEnvironmentProviderValidateContext<R, S>): PluginEnvironmentValidateDecision$1 | Promise<PluginEnvironmentValidateDecision$1>;
|
|
17919
|
+
/** Pure path selection from parsed inputs. Core reuses a recorded environment on the selected host before calling create; null requests normal creation. */
|
|
17920
|
+
experimental_existingPath?(inputs: InputsValue<S>): string | null;
|
|
17920
17921
|
create(context: PluginEnvironmentProviderCreateContext<R, S>): Promise<PluginEnvironmentProviderCreateResult>;
|
|
17921
17922
|
remove(context: PluginEnvironmentProviderRemoveContext): Promise<PluginEnvironmentProviderRemoveResult>;
|
|
17922
17923
|
}
|
|
@@ -1983,6 +1983,12 @@ function validatePluginEnvironmentProviderDeclaration(declaration) {
|
|
|
1983
1983
|
declaration.availability,
|
|
1984
1984
|
"availability"
|
|
1985
1985
|
);
|
|
1986
|
+
assertOptionalFunction(
|
|
1987
|
+
"environment provider",
|
|
1988
|
+
id,
|
|
1989
|
+
declaration.experimental_existingPath,
|
|
1990
|
+
"experimental_existingPath"
|
|
1991
|
+
);
|
|
1986
1992
|
return {
|
|
1987
1993
|
id,
|
|
1988
1994
|
displayName,
|
|
@@ -1993,6 +1999,7 @@ function validatePluginEnvironmentProviderDeclaration(declaration) {
|
|
|
1993
1999
|
inputsJsonSchema: inputs === null ? null : inputs.jsonSchema,
|
|
1994
2000
|
availability: declaration.availability ?? null,
|
|
1995
2001
|
validate: declaration.validate ?? null,
|
|
2002
|
+
experimental_existingPath: declaration.experimental_existingPath ?? null,
|
|
1996
2003
|
create: declaration.create,
|
|
1997
2004
|
remove: declaration.remove,
|
|
1998
2005
|
policy: environmentProviderPolicySchema.parse(declaration.policy ?? {})
|
|
@@ -9277,7 +9277,7 @@ async function handleFsWriteTextFile(session, params, responder) {
|
|
|
9277
9277
|
...oldText === void 0 ? {} : { oldText },
|
|
9278
9278
|
content: parsed.data.content
|
|
9279
9279
|
});
|
|
9280
|
-
responder.result(
|
|
9280
|
+
responder.result({});
|
|
9281
9281
|
} catch (error) {
|
|
9282
9282
|
responder.error(
|
|
9283
9283
|
-32603,
|
package/dist/testing/app.js
CHANGED
|
@@ -15157,7 +15157,7 @@ function TestBranchPicker({
|
|
|
15157
15157
|
"input",
|
|
15158
15158
|
{
|
|
15159
15159
|
"aria-label": label ?? "Branch",
|
|
15160
|
-
placeholder: placeholder ?? "",
|
|
15160
|
+
placeholder: placeholder ?? "Select branch",
|
|
15161
15161
|
disabled: inert,
|
|
15162
15162
|
value: value ?? "",
|
|
15163
15163
|
onChange: (event) => {
|
package/dist/testing/index.js
CHANGED
|
@@ -2008,6 +2008,12 @@ function validatePluginEnvironmentProviderDeclaration(declaration) {
|
|
|
2008
2008
|
declaration.availability,
|
|
2009
2009
|
"availability"
|
|
2010
2010
|
);
|
|
2011
|
+
assertOptionalFunction(
|
|
2012
|
+
"environment provider",
|
|
2013
|
+
id,
|
|
2014
|
+
declaration.experimental_existingPath,
|
|
2015
|
+
"experimental_existingPath"
|
|
2016
|
+
);
|
|
2011
2017
|
return {
|
|
2012
2018
|
id,
|
|
2013
2019
|
displayName,
|
|
@@ -2018,6 +2024,7 @@ function validatePluginEnvironmentProviderDeclaration(declaration) {
|
|
|
2018
2024
|
inputsJsonSchema: inputs === null ? null : inputs.jsonSchema,
|
|
2019
2025
|
availability: declaration.availability ?? null,
|
|
2020
2026
|
validate: declaration.validate ?? null,
|
|
2027
|
+
experimental_existingPath: declaration.experimental_existingPath ?? null,
|
|
2021
2028
|
create: declaration.create,
|
|
2022
2029
|
remove: declaration.remove,
|
|
2023
2030
|
policy: environmentProviderPolicySchema.parse(declaration.policy ?? {})
|