@get-bb/plugin-sdk 0.6.157 → 0.6.169
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 +1 -1
- package/bundled-types/bb-plugin-sdk-app.d.ts +1010 -353
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +3 -0
- package/bundled-types/bb-plugin-sdk-host.d.ts +4 -1
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +9 -6
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +10 -4
- package/bundled-types/bb-plugin-sdk-internal-thread-event-gate.d.ts +1001 -0
- package/bundled-types/bb-plugin-sdk-internal-thread-status.d.ts +2 -2
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp-next.d.ts +56 -6
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +56 -6
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +45 -8
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +7 -3
- package/bundled-types/bb-plugin-sdk-testing.d.ts +14 -19
- package/bundled-types/bb-plugin-sdk.d.ts +1043 -436
- package/dist/app.js +8 -0
- package/dist/host.js +27 -3
- package/dist/index.js +19 -1
- package/dist/internal/host-policy.js +34 -13
- package/dist/internal/plugin-app-collector.js +35 -3
- package/dist/internal/rpc-query-host.js +1 -0
- package/dist/internal/thread-event-gate.js +95 -0
- package/dist/process.js +7 -1
- package/dist/provider-bridge-acp-next.js +503 -144
- package/dist/provider-bridge-acp.js +503 -144
- package/dist/provider-bridge-testing.js +12 -4
- package/dist/provider-bridge.js +115 -34
- package/dist/replay-provider-child.mjs +158 -31
- package/dist/testing/app.js +647 -351
- package/dist/testing/index.js +184 -77
- package/package.json +8 -1
|
@@ -52,6 +52,7 @@ declare const environmentSchema: z.ZodObject<{
|
|
|
52
52
|
teardown: z.ZodNullable<z.ZodObject<{
|
|
53
53
|
attempt: z.ZodNumber;
|
|
54
54
|
message: z.ZodOptional<z.ZodString>;
|
|
55
|
+
needsRecovery: z.ZodBoolean;
|
|
55
56
|
status: z.ZodEnum<{
|
|
56
57
|
failed: "failed";
|
|
57
58
|
removed: "removed";
|
|
@@ -100,6 +101,8 @@ declare const hostSchema: z.ZodObject<{
|
|
|
100
101
|
suspendedAt: z.ZodNullable<z.ZodNumber>;
|
|
101
102
|
teardown: z.ZodNullable<z.ZodObject<{
|
|
102
103
|
attempt: z.ZodNumber;
|
|
104
|
+
blockedByEnvironmentId: z.ZodNullable<z.ZodString>;
|
|
105
|
+
needsRecovery: z.ZodBoolean;
|
|
103
106
|
status: z.ZodEnum<{
|
|
104
107
|
failed: "failed";
|
|
105
108
|
removed: "removed";
|
|
@@ -645,6 +645,9 @@ declare function sanitizeInheritedChildProcessEnv(args: SanitizeInheritedChildPr
|
|
|
645
645
|
*/
|
|
646
646
|
declare function experimental_killProcessesWithCwdUnder(args: Parameters<typeof killProcessesWithCwdUnder>[0]): ReturnType<typeof killProcessesWithCwdUnder>;
|
|
647
647
|
|
|
648
|
+
declare function sliceUtf16Head(value: string, maxChars: number): string;
|
|
649
|
+
declare function sliceUtf16Tail(value: string, maxChars: number): string;
|
|
650
|
+
|
|
648
651
|
/**
|
|
649
652
|
* What the operating system reports about a running process. `command` is its
|
|
650
653
|
* full command line, or null when the OS does not expose it. `startedAt` is its
|
|
@@ -664,5 +667,5 @@ interface ExperimentalProcessIdentity {
|
|
|
664
667
|
*/
|
|
665
668
|
declare function experimental_readProcessIdentity(pid: number): Promise<ExperimentalProcessIdentity | null>;
|
|
666
669
|
|
|
667
|
-
export { experimental_defineHostEntry, experimental_filterResolvedNativeRoots, experimental_killProcessesWithCwdUnder, experimental_nativeRootsHostContract, experimental_nativeRootsResolveInputSchema, experimental_nativeRootsResolveOutputSchema, experimental_readProcessIdentity, experimental_resolveClaudePluginRoots, experimental_resolveVendorPluginRoots, runVcsProcess as experimental_runVcsProcess, sanitizeInheritedChildProcessEnv as experimental_sanitizeInheritedChildProcessEnv, spawnPortableOutputProcess as experimental_spawnPortableOutputProcess };
|
|
670
|
+
export { experimental_defineHostEntry, experimental_filterResolvedNativeRoots, experimental_killProcessesWithCwdUnder, experimental_nativeRootsHostContract, experimental_nativeRootsResolveInputSchema, experimental_nativeRootsResolveOutputSchema, experimental_readProcessIdentity, experimental_resolveClaudePluginRoots, experimental_resolveVendorPluginRoots, runVcsProcess as experimental_runVcsProcess, sanitizeInheritedChildProcessEnv as experimental_sanitizeInheritedChildProcessEnv, sliceUtf16Head as experimental_sliceUtf16Head, sliceUtf16Tail as experimental_sliceUtf16Tail, spawnPortableOutputProcess as experimental_spawnPortableOutputProcess };
|
|
668
671
|
export type { ExperimentalClaudePluginRoots, ExperimentalClaudePluginRootsArgs, ExperimentalDroppedNativeRoot, ExperimentalFilteredNativeRoots, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalNativeRootsHostContract, ExperimentalNativeRootsResolveAnswer, ExperimentalNativeRootsResolveInput, ExperimentalNativeRootsResolveOutput, ExperimentalProcessIdentity, SanitizeInheritedChildProcessEnvArgs as ExperimentalSanitizeInheritedChildProcessEnvArgs, VcsProcessOptions as ExperimentalVcsProcessOptions, VcsProcessPriority as ExperimentalVcsProcessPriority, ExperimentalVendorPlugin, ExperimentalVendorPluginRoots, ExperimentalVendorPluginRootsArgs };
|
|
@@ -105,6 +105,7 @@ declare const environmentSchema: z.ZodObject<{
|
|
|
105
105
|
teardown: z.ZodNullable<z.ZodObject<{
|
|
106
106
|
attempt: z.ZodNumber;
|
|
107
107
|
message: z.ZodOptional<z.ZodString>;
|
|
108
|
+
needsRecovery: z.ZodBoolean;
|
|
108
109
|
status: z.ZodEnum<{
|
|
109
110
|
failed: "failed";
|
|
110
111
|
removed: "removed";
|
|
@@ -153,6 +154,8 @@ declare const hostSchema: z.ZodObject<{
|
|
|
153
154
|
suspendedAt: z.ZodNullable<z.ZodNumber>;
|
|
154
155
|
teardown: z.ZodNullable<z.ZodObject<{
|
|
155
156
|
attempt: z.ZodNumber;
|
|
157
|
+
blockedByEnvironmentId: z.ZodNullable<z.ZodString>;
|
|
158
|
+
needsRecovery: z.ZodBoolean;
|
|
156
159
|
status: z.ZodEnum<{
|
|
157
160
|
failed: "failed";
|
|
158
161
|
removed: "removed";
|
|
@@ -1323,8 +1326,8 @@ interface PluginCliRegistration {
|
|
|
1323
1326
|
rendersHelp?: boolean;
|
|
1324
1327
|
run(argv: string[], ctx: PluginCliContext): PluginCliResult | Promise<PluginCliResult>;
|
|
1325
1328
|
}
|
|
1326
|
-
/** Per-turn context handed to bb.agents context providers
|
|
1327
|
-
/** MCP-style content parts a native tool may return
|
|
1329
|
+
/** Per-turn context handed to bb.agents context providers. */
|
|
1330
|
+
/** MCP-style content parts a native tool may return. */
|
|
1328
1331
|
type PluginAgentToolContentPart = {
|
|
1329
1332
|
type: "text";
|
|
1330
1333
|
text: string;
|
|
@@ -1337,7 +1340,7 @@ type PluginAgentToolResult = string | {
|
|
|
1337
1340
|
content: PluginAgentToolContentPart[];
|
|
1338
1341
|
isError?: boolean;
|
|
1339
1342
|
};
|
|
1340
|
-
/** Per-call context handed to a native tool's execute
|
|
1343
|
+
/** Per-call context handed to a native tool's execute. */
|
|
1341
1344
|
interface PluginAgentToolContext {
|
|
1342
1345
|
threadId: string;
|
|
1343
1346
|
projectId: string;
|
|
@@ -1769,7 +1772,7 @@ interface ExperimentalPluginProviderEnvEntry {
|
|
|
1769
1772
|
reason: string;
|
|
1770
1773
|
}
|
|
1771
1774
|
type PluginMentionTrigger = "!" | "#" | "$" | "@" | "~";
|
|
1772
|
-
/** Search context handed to a mention provider
|
|
1775
|
+
/** Search context handed to a mention provider. `projectId`/
|
|
1773
1776
|
* `threadId` are null when the composer has not committed one yet. */
|
|
1774
1777
|
interface PluginMentionSearchContext {
|
|
1775
1778
|
trigger: PluginMentionTrigger;
|
|
@@ -1837,14 +1840,14 @@ interface PluginMentionProviderRegistration {
|
|
|
1837
1840
|
/** Options for one `complete` call. */
|
|
1838
1841
|
interface PluginAiCompleteOptions {
|
|
1839
1842
|
/**
|
|
1840
|
-
* Aborted when bb stops waiting: the task timed out (
|
|
1843
|
+
* Aborted when bb stops waiting: the task timed out (8 seconds for titles
|
|
1841
1844
|
* and commit messages) or the request was cancelled. Pass it to `fetch`.
|
|
1842
1845
|
*/
|
|
1843
1846
|
readonly signal: AbortSignal;
|
|
1844
1847
|
}
|
|
1845
1848
|
/** Options for one `transcribe` call. */
|
|
1846
1849
|
interface PluginAiTranscribeOptions {
|
|
1847
|
-
/** Aborted when bb stops waiting (
|
|
1850
|
+
/** Aborted when bb stops waiting (70 seconds) or the request was cancelled. */
|
|
1848
1851
|
readonly signal: AbortSignal;
|
|
1849
1852
|
/**
|
|
1850
1853
|
* Vocabulary the speaker is likely to use (names, identifiers), for
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and read the real source: https://github.com/get-bb/bb
|
|
7
7
|
|
|
8
8
|
import * as _get_bb_plugin_sdk from '@get-bb/plugin-sdk';
|
|
9
|
-
import { ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterItemRegistration, PluginSidebarFooterActionRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, InternalDoNotUseSetupGuideSectionRegistration, PluginNavPanelRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationPlacement, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadHeaderRowRegistration, ExperimentalThreadHeaderTitleRegistration, ExperimentalThreadContextCardRowRegistration, ExperimentalThreadContextCardSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalMessageMetadataRegistration, PluginCommandRegistration, ExperimentalComposerCommandRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
|
|
9
|
+
import { ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterItemRegistration, PluginSidebarFooterActionRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, InternalDoNotUseSetupGuideSectionRegistration, PluginNavPanelRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationPlacement, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadHeaderRowRegistration, ExperimentalThreadHeaderTitleRegistration, ExperimentalThreadContextCardRowRegistration, ExperimentalThreadContextCardSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalMessageActionSurface, ExperimentalMessageMetadataRegistration, PluginCommandRegistration, ExperimentalComposerCommandRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
|
|
10
10
|
import { ComponentType } from 'react';
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
|
|
@@ -71,6 +71,9 @@ type PluginNavPanelFixedTabRegistration = {
|
|
|
71
71
|
layout?: "flush" | "padded";
|
|
72
72
|
experimental_target?: _get_bb_plugin_sdk.ExperimentalFixedTabTargetContract<_get_bb_plugin_sdk.JsonValue>;
|
|
73
73
|
};
|
|
74
|
+
interface CollectedThreadContextCardSectionRegistration extends ExperimentalThreadContextCardSectionRegistration {
|
|
75
|
+
legacyTitle: string | null;
|
|
76
|
+
}
|
|
74
77
|
type CollectedPluginProviderIconRegistration = Omit<PluginProviderIconRegistration, "providerKind"> & {
|
|
75
78
|
providerKind: PluginProviderIconRegistration["providerKind"] | "all";
|
|
76
79
|
};
|
|
@@ -90,6 +93,9 @@ type CollectedPluginCommandRegistration = (Omit<PluginCommandRegistration, "defa
|
|
|
90
93
|
target: "composer";
|
|
91
94
|
defaultShortcut: CollectedCommandShortcut;
|
|
92
95
|
});
|
|
96
|
+
type CollectedPluginMessageActionRegistration = Omit<PluginMessageActionRegistration, "experimental_surfaces"> & {
|
|
97
|
+
experimental_surfaces: readonly ExperimentalMessageActionSurface[];
|
|
98
|
+
};
|
|
93
99
|
interface CollectedPluginAppRegistrations {
|
|
94
100
|
homepageSections: PluginHomepageSectionRegistration[];
|
|
95
101
|
settingsSections: PluginSettingsSectionRegistration[];
|
|
@@ -113,7 +119,7 @@ interface CollectedPluginAppRegistrations {
|
|
|
113
119
|
threadHeaderRows: ExperimentalThreadHeaderRowRegistration[];
|
|
114
120
|
threadHeaderTitles: ExperimentalThreadHeaderTitleRegistration[];
|
|
115
121
|
threadContextCardRows: ExperimentalThreadContextCardRowRegistration[];
|
|
116
|
-
threadContextCardSections:
|
|
122
|
+
threadContextCardSections: CollectedThreadContextCardSectionRegistration[];
|
|
117
123
|
threadActions: PluginThreadActionRegistration<unknown>[];
|
|
118
124
|
browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
|
|
119
125
|
fileOpeners: PluginFileOpenerRegistration[];
|
|
@@ -122,7 +128,7 @@ interface CollectedPluginAppRegistrations {
|
|
|
122
128
|
composers: ExperimentalComposerRegistration[];
|
|
123
129
|
messageDirectives: PluginMessageDirectiveRegistration[];
|
|
124
130
|
codeFenceRenderers: ExperimentalCodeFenceRendererRegistration[];
|
|
125
|
-
messageActions:
|
|
131
|
+
messageActions: CollectedPluginMessageActionRegistration[];
|
|
126
132
|
messageMetadata: ExperimentalMessageMetadataRegistration[];
|
|
127
133
|
commandPaletteActions: CollectedPluginCommandRegistration[];
|
|
128
134
|
providerIcons: CollectedPluginProviderIconRegistration[];
|
|
@@ -138,4 +144,4 @@ interface CollectedSidebarNavigationRegistration extends ExperimentalSidebarNavi
|
|
|
138
144
|
declare function collectPluginAppRegistrations(definition: PluginAppDefinition, onWarning?: (message: string) => void): CollectedPluginAppRegistrations;
|
|
139
145
|
|
|
140
146
|
export { adaptSidebarFooterAction, collectPluginAppRegistrations, getCollectedSidebarFooterItems };
|
|
141
|
-
export type { CollectedCompatibilitySidebarFooterItem, CollectedExperimentalSidebarFooterItem, CollectedManagedSidebarFooterItem, CollectedPluginAppRegistrations, CollectedPluginCommandRegistration, CollectedPluginProviderIconRegistration, CollectedSidebarFooterItem, CollectedSidebarNavigationRegistration, ExperimentalSidebarFooterCommandKind, ExperimentalSidebarFooterItemRuntime, ExperimentalSidebarFooterRuntimeSnapshot, LegacyNavPanelRegistration, LegacyThreadHeaderActionRegistration, LegacyThreadPanelActionRegistration };
|
|
147
|
+
export type { CollectedCompatibilitySidebarFooterItem, CollectedExperimentalSidebarFooterItem, CollectedManagedSidebarFooterItem, CollectedPluginAppRegistrations, CollectedPluginCommandRegistration, CollectedPluginMessageActionRegistration, CollectedPluginProviderIconRegistration, CollectedSidebarFooterItem, CollectedSidebarNavigationRegistration, CollectedThreadContextCardSectionRegistration, ExperimentalSidebarFooterCommandKind, ExperimentalSidebarFooterItemRuntime, ExperimentalSidebarFooterRuntimeSnapshot, LegacyNavPanelRegistration, LegacyThreadHeaderActionRegistration, LegacyThreadPanelActionRegistration };
|