@get-bb/plugin-sdk 0.4.56 → 0.4.84
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 +129 -20
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +35 -3
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +178 -10
- 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 +5 -0
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +7 -2
- package/bundled-types/bb-plugin-sdk-testing.d.ts +195 -4
- package/bundled-types/bb-plugin-sdk.d.ts +579 -45
- package/dist/app.js +4 -0
- package/dist/internal/host-policy.js +126 -15
- package/dist/internal/plugin-app-collector.js +45 -1
- package/dist/machine-provider.js +0 -0
- package/dist/provider-bridge-acp.js +2 -1
- package/dist/provider-bridge-testing.js +2 -1
- package/dist/provider-bridge.js +2 -1
- package/dist/testing/app.js +63 -1
- package/dist/testing/index.js +227 -28
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -9,18 +9,6 @@ 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
|
-
|
|
24
12
|
## Composer customization
|
|
25
13
|
|
|
26
14
|
Composer UI extensions register through `app.composer.customize(...)`. A
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and read the real source: https://github.com/get-bb/bb
|
|
7
7
|
|
|
8
8
|
import * as react from 'react';
|
|
9
|
-
import { ComponentType, ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
9
|
+
import { ComponentType, ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -330,10 +330,14 @@ declare const createThreadEnvironmentArgsSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
330
330
|
}, z.core.$strip>, z.ZodObject<{
|
|
331
331
|
environmentProviderId: z.ZodString;
|
|
332
332
|
inputs: z.ZodDefault<z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
333
|
-
machine: z.ZodObject<{
|
|
333
|
+
machine: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
334
334
|
hostId: z.ZodString;
|
|
335
335
|
type: z.ZodLiteral<"existing">;
|
|
336
|
-
}, z.core.$strip
|
|
336
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
337
|
+
inputs: z.ZodDefault<z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
338
|
+
machineProviderId: z.ZodString;
|
|
339
|
+
type: z.ZodLiteral<"new">;
|
|
340
|
+
}, z.core.$strip>], "type">>;
|
|
337
341
|
type: z.ZodLiteral<"provider">;
|
|
338
342
|
}, z.core.$strip>], "type">;
|
|
339
343
|
type CreateThreadEnvironmentArgs = z.infer<typeof createThreadEnvironmentArgsSchema>;
|
|
@@ -1529,20 +1533,21 @@ interface PluginCommandPaletteActionRegistration {
|
|
|
1529
1533
|
run(context: PluginCommandPaletteActionContext): void | Promise<void>;
|
|
1530
1534
|
}
|
|
1531
1535
|
/**
|
|
1532
|
-
* Supply
|
|
1536
|
+
* Supply an inline React mark for a provider. Agent, machine, and environment
|
|
1537
|
+
* icon renderers select the mark by provider kind and id.
|
|
1538
|
+
* Only surfaces using the provider icon renderer consult this slot. Persistent
|
|
1539
|
+
* machine labels use a laptop glyph directly.
|
|
1533
1540
|
*
|
|
1534
|
-
*
|
|
1535
|
-
*
|
|
1536
|
-
* — invisible on dark themes and unreachable from app CSS. A component is
|
|
1537
|
-
* rendered inline, so it inherits the app's theme colors and the host's sizing
|
|
1538
|
-
* classes. Register a static color logo as a file and a theme-aware mark here.
|
|
1541
|
+
* Provider logo assets use a currentColor mask. Inline components can also
|
|
1542
|
+
* render multiple colors and inherit the app's theme and sizing classes.
|
|
1539
1543
|
*
|
|
1540
|
-
* The host passes
|
|
1544
|
+
* The host passes `className` for sizing; color inherits from its wrapper.
|
|
1541
1545
|
* the component must render an inline SVG (or other inline markup) and must
|
|
1542
|
-
* not fetch. One registration per provider id per plugin; when two
|
|
1543
|
-
* claim the same
|
|
1546
|
+
* not fetch. One registration per provider kind and id per plugin; when two
|
|
1547
|
+
* plugins claim the same pair the host keeps the first by plugin id and warns.
|
|
1544
1548
|
*/
|
|
1545
1549
|
interface PluginProviderIconRegistration {
|
|
1550
|
+
providerKind: "agent" | "environment" | "machine";
|
|
1546
1551
|
/**
|
|
1547
1552
|
* The provider this mark is for — the id bb knows the provider by (the
|
|
1548
1553
|
* provider declaration's id, e.g. `codex` or `acp-cursor`), not the plugin
|
|
@@ -1650,10 +1655,13 @@ interface PluginTimelineRendererRegistration {
|
|
|
1650
1655
|
interface PluginEnvironmentProviderInputsProps {
|
|
1651
1656
|
/** Project selected in the composer; null in projectless compose. */
|
|
1652
1657
|
projectId: string | null;
|
|
1653
|
-
/**
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1658
|
+
/** Whether setup uses an existing host or provisions a new host before create. */
|
|
1659
|
+
target: {
|
|
1660
|
+
kind: "existing-host";
|
|
1661
|
+
hostId: string;
|
|
1662
|
+
} | {
|
|
1663
|
+
kind: "new-host";
|
|
1664
|
+
};
|
|
1657
1665
|
/**
|
|
1658
1666
|
* The `inputs` value the selection will carry: null until `onChange`
|
|
1659
1667
|
* supplies one.
|
|
@@ -1688,6 +1696,34 @@ interface PluginEnvironmentProviderInputsRegistration {
|
|
|
1688
1696
|
environmentProviderId: string;
|
|
1689
1697
|
component: ComponentType<PluginEnvironmentProviderInputsProps>;
|
|
1690
1698
|
}
|
|
1699
|
+
/**
|
|
1700
|
+
* Props passed to an `experimental_machineProviderInputs` component. Machine
|
|
1701
|
+
* inputs are persisted and readable by every plugin, so they must contain only
|
|
1702
|
+
* non-secret configuration and references to credentials held in plugin
|
|
1703
|
+
* settings.
|
|
1704
|
+
*/
|
|
1705
|
+
interface PluginMachineProviderInputsProps {
|
|
1706
|
+
/** The value persisted with the machine selection. */
|
|
1707
|
+
value: JsonValue$1 | null;
|
|
1708
|
+
/** Replace the submitted value or block submission with a visible reason. */
|
|
1709
|
+
onChange(next: PluginMachineProviderInputsChange): void;
|
|
1710
|
+
}
|
|
1711
|
+
type PluginMachineProviderInputsChange = {
|
|
1712
|
+
status: "ready";
|
|
1713
|
+
value: JsonValue$1;
|
|
1714
|
+
} | {
|
|
1715
|
+
status: "blocked";
|
|
1716
|
+
reason: string;
|
|
1717
|
+
};
|
|
1718
|
+
/**
|
|
1719
|
+
* Supply the inputs control for one machine provider registered server-side
|
|
1720
|
+
* through `bb.experimental_machines.register`.
|
|
1721
|
+
*/
|
|
1722
|
+
interface PluginMachineProviderInputsRegistration {
|
|
1723
|
+
/** The machine provider id this control supplies inputs for. */
|
|
1724
|
+
machineProviderId: string;
|
|
1725
|
+
component: ComponentType<PluginMachineProviderInputsProps>;
|
|
1726
|
+
}
|
|
1691
1727
|
interface PluginAppSlots {
|
|
1692
1728
|
homepageSection(registration: PluginHomepageSectionRegistration): void;
|
|
1693
1729
|
settingsSection(registration: PluginSettingsSectionRegistration): void;
|
|
@@ -1746,8 +1782,8 @@ interface PluginAppSlots {
|
|
|
1746
1782
|
*/
|
|
1747
1783
|
commandPaletteAction(registration: PluginCommandPaletteActionRegistration): void;
|
|
1748
1784
|
/**
|
|
1749
|
-
* Draw one agent or
|
|
1750
|
-
* React component instead of its
|
|
1785
|
+
* Draw one agent, environment, or machine provider's icon with an inline
|
|
1786
|
+
* React component instead of its masked logo asset (see
|
|
1751
1787
|
* {@link PluginProviderIconRegistration}). Experimental: see
|
|
1752
1788
|
* docs/api_to_audit.md.
|
|
1753
1789
|
*/
|
|
@@ -1766,6 +1802,12 @@ interface PluginAppSlots {
|
|
|
1766
1802
|
* see docs/api_to_audit.md.
|
|
1767
1803
|
*/
|
|
1768
1804
|
experimental_environmentProviderInputs(registration: PluginEnvironmentProviderInputsRegistration): void;
|
|
1805
|
+
/**
|
|
1806
|
+
* Supply the non-secret machine inputs control rendered by machine creation
|
|
1807
|
+
* surfaces (see {@link PluginMachineProviderInputsRegistration}).
|
|
1808
|
+
* Experimental: see docs/api_to_audit.md.
|
|
1809
|
+
*/
|
|
1810
|
+
experimental_machineProviderInputs(registration: PluginMachineProviderInputsRegistration): void;
|
|
1769
1811
|
}
|
|
1770
1812
|
interface PluginAppComposer {
|
|
1771
1813
|
customize(registration: ComposerCustomization): void;
|
|
@@ -1813,7 +1855,63 @@ interface PluginContentScriptRegistration {
|
|
|
1813
1855
|
interface PluginAppContentScripts {
|
|
1814
1856
|
register(registration: PluginContentScriptRegistration): void;
|
|
1815
1857
|
}
|
|
1858
|
+
interface ExperimentalIconProps {
|
|
1859
|
+
name: string;
|
|
1860
|
+
/** Used when the requested name is missing; defaults to the host Zap icon. */
|
|
1861
|
+
fallback?: string;
|
|
1862
|
+
className?: string;
|
|
1863
|
+
style?: CSSProperties;
|
|
1864
|
+
"aria-hidden"?: boolean | "false" | "true";
|
|
1865
|
+
"aria-label"?: string;
|
|
1866
|
+
}
|
|
1867
|
+
/** Shared agent, machine, or environment artwork without fetching metadata. */
|
|
1868
|
+
interface ExperimentalProviderIconProps {
|
|
1869
|
+
/** Keeps same-id agent, machine, and environment providers distinct. */
|
|
1870
|
+
providerKind: PluginProviderIconRegistration["providerKind"];
|
|
1871
|
+
/**
|
|
1872
|
+
* Existing agent, machine, or environment provider record. Reads id, logoUrl, icon and
|
|
1873
|
+
* strings.iconTint; other fields are ignored. An id-only record is sufficient
|
|
1874
|
+
* when only frontend registrations and fallback are needed. Does not fetch.
|
|
1875
|
+
*/
|
|
1876
|
+
provider: {
|
|
1877
|
+
id: string;
|
|
1878
|
+
logoUrl?: string | null;
|
|
1879
|
+
/** Agent providers use { glyph }; machine and environment providers use a string. */
|
|
1880
|
+
icon?: {
|
|
1881
|
+
glyph: string;
|
|
1882
|
+
} | string | null;
|
|
1883
|
+
strings?: {
|
|
1884
|
+
iconTint?: {
|
|
1885
|
+
light: string;
|
|
1886
|
+
dark: string;
|
|
1887
|
+
} | null;
|
|
1888
|
+
} | null;
|
|
1889
|
+
};
|
|
1890
|
+
/** Used when no artwork is available; defaults to Code. */
|
|
1891
|
+
fallback?: string;
|
|
1892
|
+
className?: string;
|
|
1893
|
+
"aria-hidden"?: boolean | "false" | "true";
|
|
1894
|
+
"aria-label"?: string;
|
|
1895
|
+
}
|
|
1896
|
+
interface ExperimentalIconRegistration {
|
|
1897
|
+
/** Shared app name. Namespacing is recommended, but not required. */
|
|
1898
|
+
name: string;
|
|
1899
|
+
/** Inline artwork. Honor className for sizing; use currentColor for tint. */
|
|
1900
|
+
component: ComponentType<{
|
|
1901
|
+
className?: string;
|
|
1902
|
+
}>;
|
|
1903
|
+
}
|
|
1904
|
+
interface ExperimentalAppIcons {
|
|
1905
|
+
/**
|
|
1906
|
+
* Add or override an app icon during setup. Returns nothing; the host
|
|
1907
|
+
* replaces registrations on reload and removes them on unload. Duplicate
|
|
1908
|
+
* names within a plugin reject setup. Between plugins, the first plugin id
|
|
1909
|
+
* in lexical order wins, independent of bundle load order.
|
|
1910
|
+
*/
|
|
1911
|
+
register(registration: ExperimentalIconRegistration): void;
|
|
1912
|
+
}
|
|
1816
1913
|
interface PluginAppBuilder {
|
|
1914
|
+
experimental_icons: ExperimentalAppIcons;
|
|
1817
1915
|
slots: PluginAppSlots;
|
|
1818
1916
|
composer: PluginAppComposer;
|
|
1819
1917
|
contentScripts: PluginAppContentScripts;
|
|
@@ -2538,6 +2636,15 @@ interface BbNavigate {
|
|
|
2538
2636
|
* shims the specifier to that object on `globalThis.__bbPluginRuntime`.
|
|
2539
2637
|
*/
|
|
2540
2638
|
interface PluginSdkApp {
|
|
2639
|
+
experimental_Icon: ComponentType<ExperimentalIconProps>;
|
|
2640
|
+
/**
|
|
2641
|
+
* Render provider slot override, then its logo, then its glyph, then fallback.
|
|
2642
|
+
* Pass a record from agent, machine, or environment provider queries;
|
|
2643
|
+
* an id-only record resolves frontend registrations, without fetching metadata.
|
|
2644
|
+
* Updates on plugin load, reload and unload. Throwing or recursive overrides
|
|
2645
|
+
* fall back to declared artwork. Logo assets render as currentColor masks.
|
|
2646
|
+
*/
|
|
2647
|
+
experimental_ProviderIcon: ComponentType<ExperimentalProviderIconProps>;
|
|
2541
2648
|
definePluginApp(setup: PluginAppSetup): PluginAppDefinition;
|
|
2542
2649
|
useRpc<Contract extends PluginRpcContract = PluginRpcContract>(): PluginRpcClient<Contract>;
|
|
2543
2650
|
useRealtime(channel: string, handler: (payload: unknown) => void): void;
|
|
@@ -2681,6 +2788,8 @@ interface PluginSdkApp {
|
|
|
2681
2788
|
useComposerView(): ComposerView;
|
|
2682
2789
|
}
|
|
2683
2790
|
|
|
2791
|
+
declare const experimental_Icon: react.ComponentType<ExperimentalIconProps>;
|
|
2792
|
+
declare const experimental_ProviderIcon: react.ComponentType<ExperimentalProviderIconProps>;
|
|
2684
2793
|
declare const definePluginApp: (setup: PluginAppSetup) => PluginAppDefinition;
|
|
2685
2794
|
declare const ThreadChat: react.ComponentType<ThreadChatProps>;
|
|
2686
2795
|
declare const Markdown: react.ComponentType<MarkdownProps>;
|
|
@@ -2711,5 +2820,5 @@ declare const experimental_useSidebarThreadSplit: (threadId: string) => PluginSi
|
|
|
2711
2820
|
declare const experimental_useProviders: () => PluginProvidersState;
|
|
2712
2821
|
declare const experimental_useCodeTheme: () => PluginCodeThemeState;
|
|
2713
2822
|
|
|
2714
|
-
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 };
|
|
2715
|
-
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 };
|
|
2823
|
+
export { Markdown, ThreadChat, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_Icon, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderIcon, 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 };
|
|
2824
|
+
export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSubmitOptions, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabReference, ExperimentalProviderIconProps, 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, 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, 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 };
|
|
@@ -22,10 +22,14 @@ declare const environmentSchema: z.ZodObject<{
|
|
|
22
22
|
environmentProviderInstanceKey: z.ZodNullable<z.ZodString>;
|
|
23
23
|
environmentProviderSelection: z.ZodNullable<z.ZodObject<{
|
|
24
24
|
inputs: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
25
|
-
machine: z.ZodObject<{
|
|
25
|
+
machine: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
26
|
hostId: z.ZodString;
|
|
27
27
|
type: z.ZodLiteral<"existing">;
|
|
28
|
-
}, z.core.$strip
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
inputs: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
30
|
+
machineProviderId: z.ZodString;
|
|
31
|
+
type: z.ZodLiteral<"new">;
|
|
32
|
+
}, z.core.$strip>], "type">;
|
|
29
33
|
}, z.core.$strip>>;
|
|
30
34
|
hostId: z.ZodString;
|
|
31
35
|
id: z.ZodString;
|
|
@@ -75,6 +79,29 @@ declare const hostSchema: z.ZodObject<{
|
|
|
75
79
|
id: z.ZodString;
|
|
76
80
|
lastRejectedProtocolVersion: z.ZodNullable<z.ZodNumber>;
|
|
77
81
|
lastSeenAt: z.ZodNullable<z.ZodNumber>;
|
|
82
|
+
lifecycle: z.ZodObject<{
|
|
83
|
+
message: z.ZodNullable<z.ZodString>;
|
|
84
|
+
pendingLog: z.ZodString;
|
|
85
|
+
phase: z.ZodEnum<{
|
|
86
|
+
active: "active";
|
|
87
|
+
creating: "creating";
|
|
88
|
+
destroyed: "destroyed";
|
|
89
|
+
removing: "removing";
|
|
90
|
+
resuming: "resuming";
|
|
91
|
+
suspended: "suspended";
|
|
92
|
+
suspending: "suspending";
|
|
93
|
+
}>;
|
|
94
|
+
suspendedAt: z.ZodNullable<z.ZodNumber>;
|
|
95
|
+
teardown: z.ZodNullable<z.ZodObject<{
|
|
96
|
+
attempt: z.ZodNumber;
|
|
97
|
+
status: z.ZodEnum<{
|
|
98
|
+
failed: "failed";
|
|
99
|
+
removed: "removed";
|
|
100
|
+
running: "running";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
machineProviderId: z.ZodNullable<z.ZodString>;
|
|
78
105
|
maxPermissionMode: z.ZodEnum<{
|
|
79
106
|
"accept-edits": "accept-edits";
|
|
80
107
|
auto: "auto";
|
|
@@ -86,6 +113,7 @@ declare const hostSchema: z.ZodObject<{
|
|
|
86
113
|
disconnected: "disconnected";
|
|
87
114
|
}>;
|
|
88
115
|
type: z.ZodEnum<{
|
|
116
|
+
ephemeral: "ephemeral";
|
|
89
117
|
persistent: "persistent";
|
|
90
118
|
}>;
|
|
91
119
|
updatedAt: z.ZodNumber;
|
|
@@ -166,8 +194,10 @@ type Checkout<R> = R extends {
|
|
|
166
194
|
gitCheckout: true;
|
|
167
195
|
} ? {
|
|
168
196
|
path: string;
|
|
197
|
+
experimental_ownsPath: boolean;
|
|
169
198
|
} : {
|
|
170
199
|
path: string;
|
|
200
|
+
experimental_ownsPath: boolean;
|
|
171
201
|
} | null;
|
|
172
202
|
type InputsValue<S> = S extends StandardSchemaV1 ? StandardSchemaV1InferOutput<S> : null;
|
|
173
203
|
/** Attempt-scoped updates; core persists each update before this call returns. */
|
|
@@ -251,8 +281,10 @@ interface PluginEnvironmentProviderPolicy {
|
|
|
251
281
|
interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProviderRequirements = PluginEnvironmentProviderRequirements, S extends PluginEnvironmentProviderInputsSchema = PluginEnvironmentProviderInputsSchema> {
|
|
252
282
|
id: string;
|
|
253
283
|
displayName: string;
|
|
284
|
+
/** Short explanation shown in environment choices. */
|
|
285
|
+
description: string;
|
|
254
286
|
/** Host glyph, plugin-relative icon path, or this plugin’s declared namespaced icon. */
|
|
255
|
-
icon
|
|
287
|
+
icon: string;
|
|
256
288
|
requires?: R;
|
|
257
289
|
inputs?: S;
|
|
258
290
|
policy?: Partial<PluginEnvironmentProviderPolicy>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and read the real source: https://github.com/get-bb/bb
|
|
7
7
|
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import { StandardSchemaV1 as StandardSchemaV1$1, PluginEnvironmentProviderRequirements as PluginEnvironmentProviderRequirements$1, StandardSchemaV1InferOutput, PluginEnvironmentValidateDecision, JsonValue as JsonValue$2 } from '@get-bb/plugin-sdk';
|
|
9
|
+
import { StandardSchemaV1 as StandardSchemaV1$1, PluginEnvironmentProviderRequirements as PluginEnvironmentProviderRequirements$1, StandardSchemaV1InferOutput, PluginEnvironmentValidateDecision, JsonValue as JsonValue$2, PluginMachineValidateDecision } from '@get-bb/plugin-sdk';
|
|
10
10
|
|
|
11
11
|
/** Input-form entry: a path, or a path with options. */
|
|
12
12
|
declare const providerNativeRootInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -74,10 +74,14 @@ declare const environmentSchema: z.ZodObject<{
|
|
|
74
74
|
environmentProviderInstanceKey: z.ZodNullable<z.ZodString>;
|
|
75
75
|
environmentProviderSelection: z.ZodNullable<z.ZodObject<{
|
|
76
76
|
inputs: z.ZodNullable<z.ZodType<JsonValue$1, unknown, z.core.$ZodTypeInternals<JsonValue$1, unknown>>>;
|
|
77
|
-
machine: z.ZodObject<{
|
|
77
|
+
machine: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
78
78
|
hostId: z.ZodString;
|
|
79
79
|
type: z.ZodLiteral<"existing">;
|
|
80
|
-
}, z.core.$strip
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
inputs: z.ZodNullable<z.ZodType<JsonValue$1, unknown, z.core.$ZodTypeInternals<JsonValue$1, unknown>>>;
|
|
82
|
+
machineProviderId: z.ZodString;
|
|
83
|
+
type: z.ZodLiteral<"new">;
|
|
84
|
+
}, z.core.$strip>], "type">;
|
|
81
85
|
}, z.core.$strip>>;
|
|
82
86
|
hostId: z.ZodString;
|
|
83
87
|
id: z.ZodString;
|
|
@@ -127,6 +131,29 @@ declare const hostSchema: z.ZodObject<{
|
|
|
127
131
|
id: z.ZodString;
|
|
128
132
|
lastRejectedProtocolVersion: z.ZodNullable<z.ZodNumber>;
|
|
129
133
|
lastSeenAt: z.ZodNullable<z.ZodNumber>;
|
|
134
|
+
lifecycle: z.ZodObject<{
|
|
135
|
+
message: z.ZodNullable<z.ZodString>;
|
|
136
|
+
pendingLog: z.ZodString;
|
|
137
|
+
phase: z.ZodEnum<{
|
|
138
|
+
active: "active";
|
|
139
|
+
creating: "creating";
|
|
140
|
+
destroyed: "destroyed";
|
|
141
|
+
removing: "removing";
|
|
142
|
+
resuming: "resuming";
|
|
143
|
+
suspended: "suspended";
|
|
144
|
+
suspending: "suspending";
|
|
145
|
+
}>;
|
|
146
|
+
suspendedAt: z.ZodNullable<z.ZodNumber>;
|
|
147
|
+
teardown: z.ZodNullable<z.ZodObject<{
|
|
148
|
+
attempt: z.ZodNumber;
|
|
149
|
+
status: z.ZodEnum<{
|
|
150
|
+
failed: "failed";
|
|
151
|
+
removed: "removed";
|
|
152
|
+
running: "running";
|
|
153
|
+
}>;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
machineProviderId: z.ZodNullable<z.ZodString>;
|
|
130
157
|
maxPermissionMode: z.ZodEnum<{
|
|
131
158
|
"accept-edits": "accept-edits";
|
|
132
159
|
auto: "auto";
|
|
@@ -138,6 +165,7 @@ declare const hostSchema: z.ZodObject<{
|
|
|
138
165
|
disconnected: "disconnected";
|
|
139
166
|
}>;
|
|
140
167
|
type: z.ZodEnum<{
|
|
168
|
+
ephemeral: "ephemeral";
|
|
141
169
|
persistent: "persistent";
|
|
142
170
|
}>;
|
|
143
171
|
updatedAt: z.ZodNumber;
|
|
@@ -492,10 +520,12 @@ type Checkout<R> = R extends {
|
|
|
492
520
|
gitCheckout: true;
|
|
493
521
|
} ? {
|
|
494
522
|
path: string;
|
|
523
|
+
experimental_ownsPath: boolean;
|
|
495
524
|
} : {
|
|
496
525
|
path: string;
|
|
526
|
+
experimental_ownsPath: boolean;
|
|
497
527
|
} | null;
|
|
498
|
-
type InputsValue<S> = S extends StandardSchemaV1$1 ? StandardSchemaV1InferOutput<S> : null;
|
|
528
|
+
type InputsValue$1<S> = S extends StandardSchemaV1$1 ? StandardSchemaV1InferOutput<S> : null;
|
|
499
529
|
/** Attempt-scoped updates; core persists each update before this call returns. */
|
|
500
530
|
interface PluginEnvironmentProviderProgress {
|
|
501
531
|
step(text: string): void;
|
|
@@ -506,7 +536,7 @@ interface PluginEnvironmentProviderValidateContext<R extends PluginEnvironmentPr
|
|
|
506
536
|
host: Host;
|
|
507
537
|
projectCheckout: Checkout<R>;
|
|
508
538
|
gitRemote: Fact<R, "gitRemote", string>;
|
|
509
|
-
inputs: InputsValue<S>;
|
|
539
|
+
inputs: InputsValue$1<S>;
|
|
510
540
|
}
|
|
511
541
|
interface PluginEnvironmentProviderAvailabilityContext {
|
|
512
542
|
project: Project;
|
|
@@ -577,8 +607,10 @@ interface PluginEnvironmentProviderPolicy {
|
|
|
577
607
|
interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProviderRequirements$1 = PluginEnvironmentProviderRequirements$1, S extends PluginEnvironmentProviderInputsSchema = PluginEnvironmentProviderInputsSchema> {
|
|
578
608
|
id: string;
|
|
579
609
|
displayName: string;
|
|
610
|
+
/** Short explanation shown in environment choices. */
|
|
611
|
+
description: string;
|
|
580
612
|
/** Host glyph, plugin-relative icon path, or this plugin’s declared namespaced icon. */
|
|
581
|
-
icon
|
|
613
|
+
icon: string;
|
|
582
614
|
requires?: R;
|
|
583
615
|
inputs?: S;
|
|
584
616
|
policy?: Partial<PluginEnvironmentProviderPolicy>;
|
|
@@ -591,6 +623,80 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
591
623
|
|
|
592
624
|
declare const RESERVED_BB_CLI_COMMANDS: readonly string[];
|
|
593
625
|
|
|
626
|
+
type PluginMachineProviderResource = Exclude<JsonValue$2, null>;
|
|
627
|
+
type PluginMachineProviderInputsSchema = StandardSchemaV1$1 | undefined;
|
|
628
|
+
type InputsValue<S> = S extends StandardSchemaV1$1 ? StandardSchemaV1InferOutput<S> : null;
|
|
629
|
+
interface PluginMachineProviderProgress {
|
|
630
|
+
step(text: string): void;
|
|
631
|
+
log(text: string): void;
|
|
632
|
+
}
|
|
633
|
+
type PluginMachineProviderAvailability = {
|
|
634
|
+
status: "available";
|
|
635
|
+
} | {
|
|
636
|
+
status: "setup-required";
|
|
637
|
+
message: string;
|
|
638
|
+
} | {
|
|
639
|
+
status: "unavailable";
|
|
640
|
+
message: string;
|
|
641
|
+
};
|
|
642
|
+
type PluginMachineProviderValidateContext<S extends PluginMachineProviderInputsSchema = PluginMachineProviderInputsSchema> = {
|
|
643
|
+
inputs: InputsValue<S>;
|
|
644
|
+
};
|
|
645
|
+
interface PluginMachineProviderLifecycleContext {
|
|
646
|
+
checkpoint(resource: PluginMachineProviderResource): Promise<void>;
|
|
647
|
+
report: PluginMachineProviderProgress;
|
|
648
|
+
signal: AbortSignal;
|
|
649
|
+
}
|
|
650
|
+
type PluginMachineProviderCreateContext<S extends PluginMachineProviderInputsSchema = PluginMachineProviderInputsSchema> = PluginMachineProviderValidateContext<S> & PluginMachineProviderLifecycleContext & {
|
|
651
|
+
key: string;
|
|
652
|
+
attempt: number;
|
|
653
|
+
};
|
|
654
|
+
type PluginMachineProviderCreateResult = {
|
|
655
|
+
status: "created";
|
|
656
|
+
name: string;
|
|
657
|
+
resource: PluginMachineProviderResource;
|
|
658
|
+
} | {
|
|
659
|
+
status: "failed";
|
|
660
|
+
message: string;
|
|
661
|
+
};
|
|
662
|
+
type PluginMachineProviderResourceLifecycleContext = PluginMachineProviderLifecycleContext & {
|
|
663
|
+
hostId: string;
|
|
664
|
+
resource: PluginMachineProviderResource;
|
|
665
|
+
};
|
|
666
|
+
type PluginMachineProviderRemoveContext = Omit<PluginMachineProviderResourceLifecycleContext, "checkpoint">;
|
|
667
|
+
interface PluginMachineProviderResourceResult {
|
|
668
|
+
resource: PluginMachineProviderResource;
|
|
669
|
+
}
|
|
670
|
+
type PluginMachineProviderRemoveResult = {
|
|
671
|
+
status: "removed";
|
|
672
|
+
} | {
|
|
673
|
+
status: "failed";
|
|
674
|
+
message: string;
|
|
675
|
+
};
|
|
676
|
+
interface PluginMachineProviderDefinition<S extends PluginMachineProviderInputsSchema = PluginMachineProviderInputsSchema> {
|
|
677
|
+
id: string;
|
|
678
|
+
displayName: string;
|
|
679
|
+
/** One line telling a user what choosing this provider gets them, shown wherever a machine is added. */
|
|
680
|
+
description: string;
|
|
681
|
+
/** Provider glyph, declared icon, or plugin-relative icon path. */
|
|
682
|
+
icon: string;
|
|
683
|
+
ephemeral?: boolean;
|
|
684
|
+
/** Persisted and readable by every plugin. Store secret references, never secrets. */
|
|
685
|
+
inputs?: S;
|
|
686
|
+
availability?(): PluginMachineProviderAvailability | Promise<PluginMachineProviderAvailability>;
|
|
687
|
+
validate?(context: PluginMachineProviderValidateContext<S>): PluginMachineValidateDecision | Promise<PluginMachineValidateDecision>;
|
|
688
|
+
create(context: PluginMachineProviderCreateContext<S>): Promise<PluginMachineProviderCreateResult>;
|
|
689
|
+
/** Reconcile and remove an uncertain allocation by durable key without creating or bootstrapping. Return failed while allocation intent remains unresolved. */
|
|
690
|
+
reconcileCleanup(context: {
|
|
691
|
+
key: string;
|
|
692
|
+
report: PluginMachineProviderProgress;
|
|
693
|
+
signal: AbortSignal;
|
|
694
|
+
}): Promise<PluginMachineProviderRemoveResult>;
|
|
695
|
+
suspend?(context: PluginMachineProviderResourceLifecycleContext): Promise<PluginMachineProviderResourceResult>;
|
|
696
|
+
resume?(context: PluginMachineProviderResourceLifecycleContext): Promise<PluginMachineProviderResourceResult>;
|
|
697
|
+
remove(context: PluginMachineProviderRemoveContext): Promise<PluginMachineProviderRemoveResult>;
|
|
698
|
+
}
|
|
699
|
+
|
|
594
700
|
/**
|
|
595
701
|
* A value that survives a JSON round trip without coercion or data loss.
|
|
596
702
|
*
|
|
@@ -710,6 +816,36 @@ interface PluginEnvironmentProviderRequirements {
|
|
|
710
816
|
* supplied pathKey. Provider ids are unique across running plugins.
|
|
711
817
|
*/
|
|
712
818
|
type PluginEnvironmentProviderDeclaration<Requires extends PluginEnvironmentProviderRequirements = PluginEnvironmentProviderRequirements, Inputs extends PluginEnvironmentProviderInputsSchema = PluginEnvironmentProviderInputsSchema> = PluginEnvironmentProviderDefinition<Requires, Inputs>;
|
|
819
|
+
type PluginMachineProviderDeclaration<Inputs extends PluginMachineProviderInputsSchema = PluginMachineProviderInputsSchema> = PluginMachineProviderDefinition<Inputs>;
|
|
820
|
+
interface ServerAccessGrant {
|
|
821
|
+
id: string;
|
|
822
|
+
serverUrl: string;
|
|
823
|
+
headers?: Record<string, string>;
|
|
824
|
+
}
|
|
825
|
+
interface ServerAccessProviderDeclaration {
|
|
826
|
+
id: string;
|
|
827
|
+
displayName: string;
|
|
828
|
+
description: string;
|
|
829
|
+
availability(): (PluginMachineProviderAvailability & {
|
|
830
|
+
serverUrl?: string;
|
|
831
|
+
}) | Promise<PluginMachineProviderAvailability & {
|
|
832
|
+
serverUrl?: string;
|
|
833
|
+
}>;
|
|
834
|
+
acquire(context: {
|
|
835
|
+
key: string;
|
|
836
|
+
hostId: string;
|
|
837
|
+
signal: AbortSignal;
|
|
838
|
+
}): Promise<ServerAccessGrant | {
|
|
839
|
+
status: "failed";
|
|
840
|
+
message: string;
|
|
841
|
+
}>;
|
|
842
|
+
release(context: {
|
|
843
|
+
key: string;
|
|
844
|
+
hostId: string;
|
|
845
|
+
/** Null when acquisition was interrupted before a grant was returned. Reconcile using key and hostId. */
|
|
846
|
+
grantId: string | null;
|
|
847
|
+
}): Promise<void>;
|
|
848
|
+
}
|
|
713
849
|
/**
|
|
714
850
|
* Where a thread is going to run, as far as core knows at the checkpoint.
|
|
715
851
|
* Before provisioning attaches an environment this is the start intent the
|
|
@@ -726,6 +862,10 @@ type PluginDispatchEnvironmentIntent = {
|
|
|
726
862
|
machine: {
|
|
727
863
|
type: "existing";
|
|
728
864
|
hostId: string;
|
|
865
|
+
} | {
|
|
866
|
+
type: "new";
|
|
867
|
+
machineProviderId: string;
|
|
868
|
+
inputs: JsonValue | null;
|
|
729
869
|
};
|
|
730
870
|
inputs: JsonValue | null;
|
|
731
871
|
};
|
|
@@ -1279,7 +1419,6 @@ interface ExperimentalPluginProviderEnvEntry {
|
|
|
1279
1419
|
serverPath: string;
|
|
1280
1420
|
};
|
|
1281
1421
|
reason: string;
|
|
1282
|
-
secret: boolean;
|
|
1283
1422
|
}
|
|
1284
1423
|
type PluginMentionTrigger = "!" | "#" | "$" | "@" | "~";
|
|
1285
1424
|
/**
|
|
@@ -1539,13 +1678,24 @@ declare function storePluginHook<K extends PluginHookName>(records: {
|
|
|
1539
1678
|
declare function pluginHookAlreadyRegisteredMessage(hook: PluginHookName): string;
|
|
1540
1679
|
declare const ENVIRONMENT_PROVIDER_ID_PATTERN: RegExp;
|
|
1541
1680
|
declare const ENVIRONMENT_PROVIDER_DISPLAY_NAME_MAX_CHARS = 80;
|
|
1681
|
+
declare const ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS = 200;
|
|
1542
1682
|
declare const ENVIRONMENT_PROVIDER_REQUIREMENT_NAMES: readonly ["projectCheckout", "gitCheckout", "gitRemote", "projectless"];
|
|
1543
1683
|
type NormalizedPluginEnvironmentProviderRequirements = {
|
|
1544
1684
|
[K in (typeof ENVIRONMENT_PROVIDER_REQUIREMENT_NAMES)[number]]: boolean;
|
|
1545
1685
|
};
|
|
1686
|
+
declare const environmentCompositionSchema: z.ZodObject<{
|
|
1687
|
+
description: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
|
|
1688
|
+
displayName: z.ZodString;
|
|
1689
|
+
environmentProviderId: z.ZodString;
|
|
1690
|
+
icon: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>, z.ZodTransform<string | null, string | undefined>>;
|
|
1691
|
+
id: z.ZodString;
|
|
1692
|
+
machineProviderId: z.ZodString;
|
|
1693
|
+
}, z.core.$strict>;
|
|
1694
|
+
type NormalizedPluginEnvironmentComposition = z.infer<typeof environmentCompositionSchema>;
|
|
1546
1695
|
interface NormalizedPluginEnvironmentProvider {
|
|
1547
1696
|
id: string;
|
|
1548
1697
|
displayName: string;
|
|
1698
|
+
description: string | null;
|
|
1549
1699
|
icon: string | null;
|
|
1550
1700
|
requires: NormalizedPluginEnvironmentProviderRequirements;
|
|
1551
1701
|
inputs: StandardSchemaV1 | null;
|
|
@@ -1557,7 +1707,25 @@ interface NormalizedPluginEnvironmentProvider {
|
|
|
1557
1707
|
policy: PluginEnvironmentProviderPolicy;
|
|
1558
1708
|
}
|
|
1559
1709
|
declare function validatePluginEnvironmentProviderDeclaration(declaration: PluginEnvironmentProviderDeclaration): NormalizedPluginEnvironmentProvider;
|
|
1560
|
-
declare const
|
|
1710
|
+
declare const MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS = 200;
|
|
1711
|
+
interface NormalizedPluginMachineProvider {
|
|
1712
|
+
id: string;
|
|
1713
|
+
displayName: string;
|
|
1714
|
+
description: string;
|
|
1715
|
+
icon: string;
|
|
1716
|
+
ephemeral: boolean;
|
|
1717
|
+
inputs: StandardSchemaV1 | null;
|
|
1718
|
+
inputsJsonSchema: JsonValue | null;
|
|
1719
|
+
availability: NonNullable<PluginMachineProviderDeclaration["availability"]> | null;
|
|
1720
|
+
validate: NonNullable<PluginMachineProviderDeclaration["validate"]> | null;
|
|
1721
|
+
reconcileCleanup: PluginMachineProviderDeclaration["reconcileCleanup"];
|
|
1722
|
+
create: PluginMachineProviderDeclaration["create"];
|
|
1723
|
+
suspend: NonNullable<PluginMachineProviderDeclaration["suspend"]> | null;
|
|
1724
|
+
resume: NonNullable<PluginMachineProviderDeclaration["resume"]> | null;
|
|
1725
|
+
remove: PluginMachineProviderDeclaration["remove"];
|
|
1726
|
+
}
|
|
1727
|
+
declare function validatePluginMachineProviderDeclaration(declaration: PluginMachineProviderDeclaration): NormalizedPluginMachineProvider;
|
|
1728
|
+
declare function validateServerAccessProviderDeclaration(declaration: ServerAccessProviderDeclaration): ServerAccessProviderDeclaration;
|
|
1561
1729
|
|
|
1562
|
-
export { AGENT_TOOL_NAME_PATTERN, BACKGROUND_NAME_PATTERN, CLI_COMMAND_NAME_PATTERN, ENVIRONMENT_PROVIDER_DISPLAY_NAME_MAX_CHARS, ENVIRONMENT_PROVIDER_ID_PATTERN, ENVIRONMENT_PROVIDER_REQUIREMENT_NAMES, KV_VALUE_MAX_BYTES,
|
|
1563
|
-
export type { AiServiceHostBinding, NormalizedPluginEnvironmentProvider, NormalizedPluginEnvironmentProviderRequirements, NormalizedPluginProviderDeclaration };
|
|
1730
|
+
export { AGENT_TOOL_NAME_PATTERN, BACKGROUND_NAME_PATTERN, CLI_COMMAND_NAME_PATTERN, 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, MENTION_PROVIDER_ID_PATTERN, PLUGIN_AGENT_DYNAMIC_INSTRUCTIONS_MAX_CHARS, PLUGIN_AGENT_SELECTION_MAX_IDS, PLUGIN_AGENT_STATIC_INSTRUCTIONS_MAX_CHARS, PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS, PLUGIN_AGENT_TOOL_PARAMETERS_MAX_BYTES, PLUGIN_HTTP_METHODS, 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, RPC_METHOD_PATTERN, SERVER_DIRECT_AI_SERVICE_IDS, SETTING_KEY_PATTERN, adoptHttpRouteResponse, agentToolIconRefusalMessage, aiServiceAlreadyRegisteredMessage, assertAiServiceRegistrable, assertNoRecursiveJsonSchemaReferences, deriveValidatedProviderOptions, enforcePluginCliOutputLimit, environmentCompositionSchema, isPluginMentionTrigger, isStandardSchema, isZodSchemaLike, normalizeMentionProviderTriggers, parsePluginAgentToolPresentation, pluginCliCollisionWarning, pluginHookAlreadyRegisteredMessage, providerAlreadyRegisteredMessage, providerIconRefusalMessage, providerWithoutBridgeMessage, readRpcMethodContract, registerSettingDescriptors, rejectStaleAgentToolFields, storePluginHook, summarizeParseIssues, summarizeStandardIssues, undeclaredIconProblem, validatePluginAiServiceDeclaration, validatePluginEnvironmentProviderDeclaration, validatePluginMachineProviderDeclaration, validatePluginProviderDeclaration, validatePluginProviderEnvEntries, validateServerAccessProviderDeclaration, validateSettingsUpdate, zodSchemaToJsonSchema };
|
|
1731
|
+
export type { AiServiceHostBinding, NormalizedPluginEnvironmentComposition, NormalizedPluginEnvironmentProvider, NormalizedPluginEnvironmentProviderRequirements, NormalizedPluginMachineProvider, NormalizedPluginProviderDeclaration };
|