@get-bb/plugin-sdk 0.4.56 → 0.4.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -12
- package/bundled-types/bb-plugin-sdk-app.d.ts +137 -20
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +35 -3
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +406 -52
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +8 -3
- package/bundled-types/bb-plugin-sdk-machine-provider.d.ts +84 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +57 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +131 -2
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +7 -2
- package/bundled-types/bb-plugin-sdk-testing.d.ts +212 -12
- package/bundled-types/bb-plugin-sdk.d.ts +749 -49
- package/dist/app.js +4 -0
- package/dist/host.js +1 -1
- package/dist/internal/host-policy.js +855 -68
- package/dist/internal/plugin-app-collector.js +116 -91
- package/dist/machine-provider.js +0 -0
- package/dist/provider-bridge-acp.js +1964 -2045
- package/dist/provider-bridge-testing.js +1378 -1404
- package/dist/provider-bridge-worker-entry.mjs +0 -1
- package/dist/provider-bridge.js +1455 -1498
- package/dist/testing/app.js +134 -91
- package/dist/testing/index.js +1092 -730
- package/package.json +7 -2
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
|
/**
|
|
@@ -18,6 +18,14 @@ import { z } from 'zod';
|
|
|
18
18
|
type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | {
|
|
19
19
|
[key: string]: JsonValue$1;
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* A `JsonValue` that is read-only at every depth. BB uses it for JSON
|
|
23
|
+
* snapshots it deep-freezes before handing them to a plugin, where any write
|
|
24
|
+
* throws at runtime.
|
|
25
|
+
*/
|
|
26
|
+
type ReadonlyJsonValue = string | number | boolean | null | readonly ReadonlyJsonValue[] | {
|
|
27
|
+
readonly [key: string]: ReadonlyJsonValue;
|
|
28
|
+
};
|
|
21
29
|
|
|
22
30
|
/** A JSON-safe path segment reported by a Standard Schema validation issue. */
|
|
23
31
|
type PluginRpcIssuePathSegment = string | number;
|
|
@@ -330,10 +338,14 @@ declare const createThreadEnvironmentArgsSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
330
338
|
}, z.core.$strip>, z.ZodObject<{
|
|
331
339
|
environmentProviderId: z.ZodString;
|
|
332
340
|
inputs: z.ZodDefault<z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
333
|
-
machine: z.ZodObject<{
|
|
341
|
+
machine: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
334
342
|
hostId: z.ZodString;
|
|
335
343
|
type: z.ZodLiteral<"existing">;
|
|
336
|
-
}, z.core.$strip
|
|
344
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
345
|
+
inputs: z.ZodDefault<z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
346
|
+
machineProviderId: z.ZodString;
|
|
347
|
+
type: z.ZodLiteral<"new">;
|
|
348
|
+
}, z.core.$strip>], "type">>;
|
|
337
349
|
type: z.ZodLiteral<"provider">;
|
|
338
350
|
}, z.core.$strip>], "type">;
|
|
339
351
|
type CreateThreadEnvironmentArgs = z.infer<typeof createThreadEnvironmentArgsSchema>;
|
|
@@ -1529,20 +1541,21 @@ interface PluginCommandPaletteActionRegistration {
|
|
|
1529
1541
|
run(context: PluginCommandPaletteActionContext): void | Promise<void>;
|
|
1530
1542
|
}
|
|
1531
1543
|
/**
|
|
1532
|
-
* Supply
|
|
1544
|
+
* Supply an inline React mark for a provider. Agent, machine, and environment
|
|
1545
|
+
* icon renderers select the mark by provider kind and id.
|
|
1546
|
+
* Only surfaces using the provider icon renderer consult this slot. Persistent
|
|
1547
|
+
* machine labels use a laptop glyph directly.
|
|
1533
1548
|
*
|
|
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.
|
|
1549
|
+
* Provider logo assets use a currentColor mask. Inline components can also
|
|
1550
|
+
* render multiple colors and inherit the app's theme and sizing classes.
|
|
1539
1551
|
*
|
|
1540
|
-
* The host passes
|
|
1552
|
+
* The host passes `className` for sizing; color inherits from its wrapper.
|
|
1541
1553
|
* 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
|
|
1554
|
+
* not fetch. One registration per provider kind and id per plugin; when two
|
|
1555
|
+
* plugins claim the same pair the host keeps the first by plugin id and warns.
|
|
1544
1556
|
*/
|
|
1545
1557
|
interface PluginProviderIconRegistration {
|
|
1558
|
+
providerKind: "agent" | "environment" | "machine";
|
|
1546
1559
|
/**
|
|
1547
1560
|
* The provider this mark is for — the id bb knows the provider by (the
|
|
1548
1561
|
* provider declaration's id, e.g. `codex` or `acp-cursor`), not the plugin
|
|
@@ -1650,10 +1663,13 @@ interface PluginTimelineRendererRegistration {
|
|
|
1650
1663
|
interface PluginEnvironmentProviderInputsProps {
|
|
1651
1664
|
/** Project selected in the composer; null in projectless compose. */
|
|
1652
1665
|
projectId: string | null;
|
|
1653
|
-
/**
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1666
|
+
/** Whether setup uses an existing host or provisions a new host before create. */
|
|
1667
|
+
target: {
|
|
1668
|
+
kind: "existing-host";
|
|
1669
|
+
hostId: string;
|
|
1670
|
+
} | {
|
|
1671
|
+
kind: "new-host";
|
|
1672
|
+
};
|
|
1657
1673
|
/**
|
|
1658
1674
|
* The `inputs` value the selection will carry: null until `onChange`
|
|
1659
1675
|
* supplies one.
|
|
@@ -1688,6 +1704,34 @@ interface PluginEnvironmentProviderInputsRegistration {
|
|
|
1688
1704
|
environmentProviderId: string;
|
|
1689
1705
|
component: ComponentType<PluginEnvironmentProviderInputsProps>;
|
|
1690
1706
|
}
|
|
1707
|
+
/**
|
|
1708
|
+
* Props passed to an `experimental_machineProviderInputs` component. Machine
|
|
1709
|
+
* inputs are persisted and readable by every plugin, so they must contain only
|
|
1710
|
+
* non-secret configuration and references to credentials held in plugin
|
|
1711
|
+
* settings.
|
|
1712
|
+
*/
|
|
1713
|
+
interface PluginMachineProviderInputsProps {
|
|
1714
|
+
/** The value persisted with the machine selection. */
|
|
1715
|
+
value: JsonValue$1 | null;
|
|
1716
|
+
/** Replace the submitted value or block submission with a visible reason. */
|
|
1717
|
+
onChange(next: PluginMachineProviderInputsChange): void;
|
|
1718
|
+
}
|
|
1719
|
+
type PluginMachineProviderInputsChange = {
|
|
1720
|
+
status: "ready";
|
|
1721
|
+
value: JsonValue$1;
|
|
1722
|
+
} | {
|
|
1723
|
+
status: "blocked";
|
|
1724
|
+
reason: string;
|
|
1725
|
+
};
|
|
1726
|
+
/**
|
|
1727
|
+
* Supply the inputs control for one machine provider registered server-side
|
|
1728
|
+
* through `bb.experimental_machines.register`.
|
|
1729
|
+
*/
|
|
1730
|
+
interface PluginMachineProviderInputsRegistration {
|
|
1731
|
+
/** The machine provider id this control supplies inputs for. */
|
|
1732
|
+
machineProviderId: string;
|
|
1733
|
+
component: ComponentType<PluginMachineProviderInputsProps>;
|
|
1734
|
+
}
|
|
1691
1735
|
interface PluginAppSlots {
|
|
1692
1736
|
homepageSection(registration: PluginHomepageSectionRegistration): void;
|
|
1693
1737
|
settingsSection(registration: PluginSettingsSectionRegistration): void;
|
|
@@ -1746,8 +1790,8 @@ interface PluginAppSlots {
|
|
|
1746
1790
|
*/
|
|
1747
1791
|
commandPaletteAction(registration: PluginCommandPaletteActionRegistration): void;
|
|
1748
1792
|
/**
|
|
1749
|
-
* Draw one agent or
|
|
1750
|
-
* React component instead of its
|
|
1793
|
+
* Draw one agent, environment, or machine provider's icon with an inline
|
|
1794
|
+
* React component instead of its masked logo asset (see
|
|
1751
1795
|
* {@link PluginProviderIconRegistration}). Experimental: see
|
|
1752
1796
|
* docs/api_to_audit.md.
|
|
1753
1797
|
*/
|
|
@@ -1766,6 +1810,12 @@ interface PluginAppSlots {
|
|
|
1766
1810
|
* see docs/api_to_audit.md.
|
|
1767
1811
|
*/
|
|
1768
1812
|
experimental_environmentProviderInputs(registration: PluginEnvironmentProviderInputsRegistration): void;
|
|
1813
|
+
/**
|
|
1814
|
+
* Supply the non-secret machine inputs control rendered by machine creation
|
|
1815
|
+
* surfaces (see {@link PluginMachineProviderInputsRegistration}).
|
|
1816
|
+
* Experimental: see docs/api_to_audit.md.
|
|
1817
|
+
*/
|
|
1818
|
+
experimental_machineProviderInputs(registration: PluginMachineProviderInputsRegistration): void;
|
|
1769
1819
|
}
|
|
1770
1820
|
interface PluginAppComposer {
|
|
1771
1821
|
customize(registration: ComposerCustomization): void;
|
|
@@ -1813,7 +1863,63 @@ interface PluginContentScriptRegistration {
|
|
|
1813
1863
|
interface PluginAppContentScripts {
|
|
1814
1864
|
register(registration: PluginContentScriptRegistration): void;
|
|
1815
1865
|
}
|
|
1866
|
+
interface ExperimentalIconProps {
|
|
1867
|
+
name: string;
|
|
1868
|
+
/** Used when the requested name is missing; defaults to the host Zap icon. */
|
|
1869
|
+
fallback?: string;
|
|
1870
|
+
className?: string;
|
|
1871
|
+
style?: CSSProperties;
|
|
1872
|
+
"aria-hidden"?: boolean | "false" | "true";
|
|
1873
|
+
"aria-label"?: string;
|
|
1874
|
+
}
|
|
1875
|
+
/** Shared agent, machine, or environment artwork without fetching metadata. */
|
|
1876
|
+
interface ExperimentalProviderIconProps {
|
|
1877
|
+
/** Keeps same-id agent, machine, and environment providers distinct. */
|
|
1878
|
+
providerKind: PluginProviderIconRegistration["providerKind"];
|
|
1879
|
+
/**
|
|
1880
|
+
* Existing agent, machine, or environment provider record. Reads id, logoUrl, icon and
|
|
1881
|
+
* strings.iconTint; other fields are ignored. An id-only record is sufficient
|
|
1882
|
+
* when only frontend registrations and fallback are needed. Does not fetch.
|
|
1883
|
+
*/
|
|
1884
|
+
provider: {
|
|
1885
|
+
id: string;
|
|
1886
|
+
logoUrl?: string | null;
|
|
1887
|
+
/** Agent providers use { glyph }; machine and environment providers use a string. */
|
|
1888
|
+
icon?: {
|
|
1889
|
+
glyph: string;
|
|
1890
|
+
} | string | null;
|
|
1891
|
+
strings?: {
|
|
1892
|
+
iconTint?: {
|
|
1893
|
+
light: string;
|
|
1894
|
+
dark: string;
|
|
1895
|
+
} | null;
|
|
1896
|
+
} | null;
|
|
1897
|
+
};
|
|
1898
|
+
/** Used when no artwork is available; defaults to Code. */
|
|
1899
|
+
fallback?: string;
|
|
1900
|
+
className?: string;
|
|
1901
|
+
"aria-hidden"?: boolean | "false" | "true";
|
|
1902
|
+
"aria-label"?: string;
|
|
1903
|
+
}
|
|
1904
|
+
interface ExperimentalIconRegistration {
|
|
1905
|
+
/** Shared app name. Namespacing is recommended, but not required. */
|
|
1906
|
+
name: string;
|
|
1907
|
+
/** Inline artwork. Honor className for sizing; use currentColor for tint. */
|
|
1908
|
+
component: ComponentType<{
|
|
1909
|
+
className?: string;
|
|
1910
|
+
}>;
|
|
1911
|
+
}
|
|
1912
|
+
interface ExperimentalAppIcons {
|
|
1913
|
+
/**
|
|
1914
|
+
* Add or override an app icon during setup. Returns nothing; the host
|
|
1915
|
+
* replaces registrations on reload and removes them on unload. Duplicate
|
|
1916
|
+
* names within a plugin reject setup. Between plugins, the first plugin id
|
|
1917
|
+
* in lexical order wins, independent of bundle load order.
|
|
1918
|
+
*/
|
|
1919
|
+
register(registration: ExperimentalIconRegistration): void;
|
|
1920
|
+
}
|
|
1816
1921
|
interface PluginAppBuilder {
|
|
1922
|
+
experimental_icons: ExperimentalAppIcons;
|
|
1817
1923
|
slots: PluginAppSlots;
|
|
1818
1924
|
composer: PluginAppComposer;
|
|
1819
1925
|
contentScripts: PluginAppContentScripts;
|
|
@@ -2538,6 +2644,15 @@ interface BbNavigate {
|
|
|
2538
2644
|
* shims the specifier to that object on `globalThis.__bbPluginRuntime`.
|
|
2539
2645
|
*/
|
|
2540
2646
|
interface PluginSdkApp {
|
|
2647
|
+
experimental_Icon: ComponentType<ExperimentalIconProps>;
|
|
2648
|
+
/**
|
|
2649
|
+
* Render provider slot override, then its logo, then its glyph, then fallback.
|
|
2650
|
+
* Pass a record from agent, machine, or environment provider queries;
|
|
2651
|
+
* an id-only record resolves frontend registrations, without fetching metadata.
|
|
2652
|
+
* Updates on plugin load, reload and unload. Throwing or recursive overrides
|
|
2653
|
+
* fall back to declared artwork. Logo assets render as currentColor masks.
|
|
2654
|
+
*/
|
|
2655
|
+
experimental_ProviderIcon: ComponentType<ExperimentalProviderIconProps>;
|
|
2541
2656
|
definePluginApp(setup: PluginAppSetup): PluginAppDefinition;
|
|
2542
2657
|
useRpc<Contract extends PluginRpcContract = PluginRpcContract>(): PluginRpcClient<Contract>;
|
|
2543
2658
|
useRealtime(channel: string, handler: (payload: unknown) => void): void;
|
|
@@ -2681,6 +2796,8 @@ interface PluginSdkApp {
|
|
|
2681
2796
|
useComposerView(): ComposerView;
|
|
2682
2797
|
}
|
|
2683
2798
|
|
|
2799
|
+
declare const experimental_Icon: react.ComponentType<ExperimentalIconProps>;
|
|
2800
|
+
declare const experimental_ProviderIcon: react.ComponentType<ExperimentalProviderIconProps>;
|
|
2684
2801
|
declare const definePluginApp: (setup: PluginAppSetup) => PluginAppDefinition;
|
|
2685
2802
|
declare const ThreadChat: react.ComponentType<ThreadChatProps>;
|
|
2686
2803
|
declare const Markdown: react.ComponentType<MarkdownProps>;
|
|
@@ -2711,5 +2828,5 @@ declare const experimental_useSidebarThreadSplit: (threadId: string) => PluginSi
|
|
|
2711
2828
|
declare const experimental_useProviders: () => PluginProvidersState;
|
|
2712
2829
|
declare const experimental_useCodeTheme: () => PluginCodeThemeState;
|
|
2713
2830
|
|
|
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 };
|
|
2831
|
+
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 };
|
|
2832
|
+
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, ReadonlyJsonValue, 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>;
|