@get-bb/plugin-sdk 0.6.19 → 0.6.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-types/bb-plugin-sdk-app.d.ts +76 -16
- package/bundled-types/bb-plugin-sdk.d.ts +74 -15
- package/dist/app.js +4 -0
- package/dist/provider-bridge-acp.js +15 -9
- package/dist/provider-bridge-testing.js +306 -248
- package/dist/testing/app.js +16 -1
- package/package.json +1 -1
|
@@ -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, CSSProperties, ReactNode } from 'react';
|
|
9
|
+
import { ComponentType, ComponentPropsWithoutRef, CSSProperties, ComponentPropsWithRef, ReactNode } from 'react';
|
|
10
10
|
import * as z from 'zod';
|
|
11
11
|
import { z as z$1 } from 'zod';
|
|
12
12
|
import * as zod_v4_core from 'zod/v4/core';
|
|
@@ -109,6 +109,7 @@ declare const appSettingsSchema: z$1.ZodObject<{
|
|
|
109
109
|
}>>;
|
|
110
110
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
111
111
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
112
|
+
showGitChanges: z$1.ZodBoolean;
|
|
112
113
|
showKeyboardHints: z$1.ZodBoolean;
|
|
113
114
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
114
115
|
streamerMode: z$1.ZodBoolean;
|
|
@@ -129,6 +130,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
129
130
|
}>>;
|
|
130
131
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
131
132
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
133
|
+
showGitChanges: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
132
134
|
showKeyboardHints: z$1.ZodBoolean;
|
|
133
135
|
showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
134
136
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -147,6 +149,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
147
149
|
flat: "flat";
|
|
148
150
|
}>>;
|
|
149
151
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
152
|
+
showGitChanges: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
150
153
|
showKeyboardHints: z$1.ZodBoolean;
|
|
151
154
|
showUnhandledProviderEvents: z$1.ZodBoolean;
|
|
152
155
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -155,7 +158,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
155
158
|
}, z$1.core.$strict>]>;
|
|
156
159
|
type AppSettingsUpdate = z$1.infer<typeof appSettingsUpdateSchema>;
|
|
157
160
|
|
|
158
|
-
declare const UI_PREFERENCE_KEYS: readonly ["sidebar.organizationMode", "sidebar.threadGrouping.environment", "sidebar.chronologicalSort", "sidebar.sortDirection", "sidebar.sectionOrder", "sidebar.manualSectionOrder", "sidebar.machineSectionOrder", "sidebar.hiddenGroups", "sidebar.collapsedSections", "sidebar.collapsedProjects", "sidebar.collapsedThreads", "sidebar.collapsedEnvironments", "sidebar.collapsedThreadSections", "sidebar.collapsedMachines", "sidebar.footerOrder", "sidebar.hiddenFooterItems", "sidebar.pluginPanelOrder", "sidebar.visiblePluginPanels", "sidebar.navigationProvider", "sidebar.headerProvider", "sidebar.threadListProvider"];
|
|
161
|
+
declare const UI_PREFERENCE_KEYS: readonly ["sidebar.organizationMode", "sidebar.threadGrouping.environment", "sidebar.chronologicalSort", "sidebar.sortDirection", "sidebar.sectionOrder", "sidebar.manualSectionOrder", "sidebar.machineSectionOrder", "sidebar.hiddenGroups", "sidebar.collapsedSections", "sidebar.collapsedProjects", "sidebar.collapsedThreads", "sidebar.collapsedEnvironments", "sidebar.collapsedThreadSections", "sidebar.collapsedMachines", "sidebar.footerOrder", "sidebar.hiddenFooterItems", "sidebar.pluginPanelOrder", "sidebar.visiblePluginPanels", "sidebar.navigationProvider", "sidebar.headerProvider", "sidebar.threadListProvider", "infoPanel.collapsedSections"];
|
|
159
162
|
type UiPreferenceKey = (typeof UI_PREFERENCE_KEYS)[number];
|
|
160
163
|
interface UiPreferenceDefinition<Schema extends z$1.ZodTypeAny = z$1.ZodTypeAny> {
|
|
161
164
|
schema: Schema;
|
|
@@ -200,6 +203,7 @@ declare const uiPreferenceDefinitions: {
|
|
|
200
203
|
readonly "sidebar.navigationProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
|
|
201
204
|
readonly "sidebar.headerProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
|
|
202
205
|
readonly "sidebar.threadListProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
|
|
206
|
+
readonly "infoPanel.collapsedSections": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
203
207
|
};
|
|
204
208
|
type UiPreferenceValue<Key extends UiPreferenceKey> = z$1.infer<(typeof uiPreferenceDefinitions)[Key]["schema"]>;
|
|
205
209
|
interface UiPreferenceEntry<Key extends UiPreferenceKey = UiPreferenceKey> {
|
|
@@ -220,6 +224,8 @@ declare const appKeybindingOverridesSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
|
220
224
|
"dataDirectory.open": "dataDirectory.open";
|
|
221
225
|
"diff.toggle": "diff.toggle";
|
|
222
226
|
"file.quickOpen": "file.quickOpen";
|
|
227
|
+
"history.back": "history.back";
|
|
228
|
+
"history.forward": "history.forward";
|
|
223
229
|
"logs.openServerDaemon": "logs.openServerDaemon";
|
|
224
230
|
"modelPicker.cycleModel": "modelPicker.cycleModel";
|
|
225
231
|
"modelPicker.cycleModelBackward": "modelPicker.cycleModelBackward";
|
|
@@ -538,12 +544,14 @@ type Environment = z$1.infer<typeof environmentSchema>;
|
|
|
538
544
|
|
|
539
545
|
declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
540
546
|
changelogPreview: "changelogPreview";
|
|
547
|
+
navigationRail: "navigationRail";
|
|
541
548
|
performanceDiagnostics: "performanceDiagnostics";
|
|
542
549
|
serverMove: "serverMove";
|
|
543
550
|
}>, z$1.ZodBoolean>;
|
|
544
551
|
type Experiments = z$1.infer<typeof experimentsSchema>;
|
|
545
552
|
declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
546
553
|
changelogPreview: "changelogPreview";
|
|
554
|
+
navigationRail: "navigationRail";
|
|
547
555
|
performanceDiagnostics: "performanceDiagnostics";
|
|
548
556
|
serverMove: "serverMove";
|
|
549
557
|
}> & z$1.core.$partial, z$1.ZodBoolean>;
|
|
@@ -9597,6 +9605,11 @@ declare const pluginCatalogStatusSchema: z$1.ZodObject<{
|
|
|
9597
9605
|
}, z$1.core.$strip>;
|
|
9598
9606
|
type PluginCatalogStatus = z$1.infer<typeof pluginCatalogStatusSchema>;
|
|
9599
9607
|
declare const pluginCatalogSearchResponseSchema: z$1.ZodObject<{
|
|
9608
|
+
categories: z$1.ZodDefault<z$1.ZodArray<z$1.ZodObject<{
|
|
9609
|
+
description: z$1.ZodString;
|
|
9610
|
+
displayName: z$1.ZodString;
|
|
9611
|
+
id: z$1.ZodString;
|
|
9612
|
+
}, z$1.core.$strip>>>;
|
|
9600
9613
|
collections: z$1.ZodArray<z$1.ZodObject<{
|
|
9601
9614
|
displayName: z$1.ZodString;
|
|
9602
9615
|
id: z$1.ZodString;
|
|
@@ -10118,6 +10131,8 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10118
10131
|
"dataDirectory.open": "dataDirectory.open";
|
|
10119
10132
|
"diff.toggle": "diff.toggle";
|
|
10120
10133
|
"file.quickOpen": "file.quickOpen";
|
|
10134
|
+
"history.back": "history.back";
|
|
10135
|
+
"history.forward": "history.forward";
|
|
10121
10136
|
"logs.openServerDaemon": "logs.openServerDaemon";
|
|
10122
10137
|
"modelPicker.cycleModel": "modelPicker.cycleModel";
|
|
10123
10138
|
"modelPicker.cycleModelBackward": "modelPicker.cycleModelBackward";
|
|
@@ -10231,6 +10246,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10231
10246
|
}, z$1.core.$strict>>;
|
|
10232
10247
|
experiments: z$1.ZodRecord<z$1.ZodEnum<{
|
|
10233
10248
|
changelogPreview: "changelogPreview";
|
|
10249
|
+
navigationRail: "navigationRail";
|
|
10234
10250
|
performanceDiagnostics: "performanceDiagnostics";
|
|
10235
10251
|
serverMove: "serverMove";
|
|
10236
10252
|
}>, z$1.ZodBoolean>;
|
|
@@ -10252,6 +10268,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10252
10268
|
}>>;
|
|
10253
10269
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
10254
10270
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
10271
|
+
showGitChanges: z$1.ZodBoolean;
|
|
10255
10272
|
showKeyboardHints: z$1.ZodBoolean;
|
|
10256
10273
|
showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
10257
10274
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -10269,6 +10286,8 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10269
10286
|
"dataDirectory.open": "dataDirectory.open";
|
|
10270
10287
|
"diff.toggle": "diff.toggle";
|
|
10271
10288
|
"file.quickOpen": "file.quickOpen";
|
|
10289
|
+
"history.back": "history.back";
|
|
10290
|
+
"history.forward": "history.forward";
|
|
10272
10291
|
"logs.openServerDaemon": "logs.openServerDaemon";
|
|
10273
10292
|
"modelPicker.cycleModel": "modelPicker.cycleModel";
|
|
10274
10293
|
"modelPicker.cycleModelBackward": "modelPicker.cycleModelBackward";
|
|
@@ -10362,6 +10381,8 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10362
10381
|
"dataDirectory.open": "dataDirectory.open";
|
|
10363
10382
|
"diff.toggle": "diff.toggle";
|
|
10364
10383
|
"file.quickOpen": "file.quickOpen";
|
|
10384
|
+
"history.back": "history.back";
|
|
10385
|
+
"history.forward": "history.forward";
|
|
10365
10386
|
"logs.openServerDaemon": "logs.openServerDaemon";
|
|
10366
10387
|
"modelPicker.cycleModel": "modelPicker.cycleModel";
|
|
10367
10388
|
"modelPicker.cycleModelBackward": "modelPicker.cycleModelBackward";
|
|
@@ -10579,6 +10600,7 @@ declare const systemAppUpdateStatusSchema: z$1.ZodObject<{
|
|
|
10579
10600
|
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
10580
10601
|
phase: z$1.ZodLiteral<"restarting">;
|
|
10581
10602
|
startedAt: z$1.ZodString;
|
|
10603
|
+
targetCommit: z$1.ZodNullable<z$1.ZodString>;
|
|
10582
10604
|
targetVersion: z$1.ZodString;
|
|
10583
10605
|
}, z$1.core.$strip>], "phase">;
|
|
10584
10606
|
available: z$1.ZodNullable<z$1.ZodObject<{
|
|
@@ -17722,6 +17744,26 @@ interface ExperimentalQuestionFormHost {
|
|
|
17722
17744
|
*/
|
|
17723
17745
|
registerChoiceHandler(handler: (index: number) => boolean): () => void;
|
|
17724
17746
|
}
|
|
17747
|
+
/**
|
|
17748
|
+
* Props of the host-owned `experimental_VoiceInputTextarea`: a controlled
|
|
17749
|
+
* textarea with bb's voice input. Other textarea attributes, including `ref`
|
|
17750
|
+
* and `className`, reach the underlying `<textarea>`; the caller styles it and
|
|
17751
|
+
* the host adds room for its microphone controls when voice input is
|
|
17752
|
+
* available.
|
|
17753
|
+
*/
|
|
17754
|
+
interface ExperimentalVoiceInputTextareaProps extends Omit<ComponentPropsWithRef<"textarea">, "children" | "defaultValue" | "onChange" | "value"> {
|
|
17755
|
+
value: string;
|
|
17756
|
+
/**
|
|
17757
|
+
* Receives typed edits and finished transcripts, which the host appends to
|
|
17758
|
+
* `value`. Transcripts stay editable and are never submitted.
|
|
17759
|
+
*/
|
|
17760
|
+
onValueChange(value: string): void;
|
|
17761
|
+
/**
|
|
17762
|
+
* True from the start of recording until transcription finishes or is
|
|
17763
|
+
* cancelled, and false on unmount. Hold submission while it is true.
|
|
17764
|
+
*/
|
|
17765
|
+
onVoiceInputActiveChange?(active: boolean): void;
|
|
17766
|
+
}
|
|
17725
17767
|
/**
|
|
17726
17768
|
* Props for a `sidebarFooterAction` — host-rendered (no plugin component).
|
|
17727
17769
|
* Deliberately empty; the registration's `run` carries the behavior.
|
|
@@ -19165,6 +19207,13 @@ interface ThreadChatMessageReference {
|
|
|
19165
19207
|
/** Visible text of the message. */
|
|
19166
19208
|
text: string;
|
|
19167
19209
|
sourceSeqEnd: number;
|
|
19210
|
+
/**
|
|
19211
|
+
* The event sequence that recorded this message: the `msg` value of a
|
|
19212
|
+
* message link and the seq that `sdk.threads.message` and
|
|
19213
|
+
* `bb thread log --message` read. For a steer this is its request sequence,
|
|
19214
|
+
* which can differ from the acceptance sequence in `sourceSeqEnd`.
|
|
19215
|
+
*/
|
|
19216
|
+
experimental_messageSeq: number;
|
|
19168
19217
|
}
|
|
19169
19218
|
/**
|
|
19170
19219
|
* What a caller that is *not* itself a panel action passes to open one — a
|
|
@@ -19206,10 +19255,11 @@ interface PluginMessageActionContext {
|
|
|
19206
19255
|
composer: PluginComposerApi | null;
|
|
19207
19256
|
}
|
|
19208
19257
|
/**
|
|
19209
|
-
* An action on chat messages: an icon button in
|
|
19210
|
-
* (user and assistant messages) and an entry in
|
|
19211
|
-
* text-selection menu.
|
|
19212
|
-
*
|
|
19258
|
+
* An action on chat messages in the main thread timeline: an icon button in
|
|
19259
|
+
* the per-message action bar (user and assistant messages) and an entry in
|
|
19260
|
+
* the assistant-message text-selection menu. Embedded `ThreadChat` timelines
|
|
19261
|
+
* do not show slot-registered actions. Host-rendered chrome — the plugin
|
|
19262
|
+
* supplies title, icon, and `run` behavior only. Resolved icon names take precedence over
|
|
19213
19263
|
* plugin branding; omitted or unknown names fall back to branding.
|
|
19214
19264
|
*/
|
|
19215
19265
|
interface PluginMessageActionRegistration {
|
|
@@ -19230,14 +19280,15 @@ interface PluginCommandContext {
|
|
|
19230
19280
|
threadId: string | null;
|
|
19231
19281
|
projectId: string | null;
|
|
19232
19282
|
/**
|
|
19233
|
-
* Open one of this plugin's
|
|
19234
|
-
*
|
|
19283
|
+
* Open one of this plugin's panel components in the focused side panel.
|
|
19284
|
+
* In a thread, `actionId` resolves against `threadPanelAction`; on the New
|
|
19285
|
+
* thread screen, it resolves against `experimental_newThreadPanelAction`.
|
|
19286
|
+
* Register both slots with the same id to support commands on both screens.
|
|
19235
19287
|
*
|
|
19236
19288
|
* Returns true when the host accepted the open; false when it declined —
|
|
19237
|
-
* `params` was not a JSON value, the action id names no
|
|
19238
|
-
* of this plugin, or the surface has no side panel.
|
|
19239
|
-
*
|
|
19240
|
-
* rather than assuming.
|
|
19289
|
+
* `params` was not a JSON value, the action id names no matching panel action
|
|
19290
|
+
* of this plugin on the focused surface, or the surface has no side panel.
|
|
19291
|
+
* The palette opens anywhere, so guard with `isAvailable` rather than assuming.
|
|
19241
19292
|
*/
|
|
19242
19293
|
openPanel(options: PluginTargetedPanelActionOpenOptions): boolean;
|
|
19243
19294
|
}
|
|
@@ -20158,8 +20209,9 @@ type ComposerSubmitOptions = {
|
|
|
20158
20209
|
/**
|
|
20159
20210
|
* A consumer-supplied action on the messages of one `ThreadChat` instance,
|
|
20160
20211
|
* rendered in the embedded timeline's per-message action bar alongside the
|
|
20161
|
-
* native
|
|
20162
|
-
* scoped to the rendering component, not
|
|
20212
|
+
* native actions. Slot-registered `messageAction`s do not appear there. Unlike
|
|
20213
|
+
* the `messageAction` slot this is scoped to the rendering component, not
|
|
20214
|
+
* registered globally.
|
|
20163
20215
|
*/
|
|
20164
20216
|
interface ThreadChatMessageAction {
|
|
20165
20217
|
/** Unique within this ThreadChat instance; letters, digits, `-`, `_`. */
|
|
@@ -20866,6 +20918,13 @@ interface PluginSdkApp {
|
|
|
20866
20918
|
* docs/api_to_audit.md for what to audit before the prefix drops.
|
|
20867
20919
|
*/
|
|
20868
20920
|
experimental_NewThreadComposer: ComponentType<NewThreadComposerProps>;
|
|
20921
|
+
/**
|
|
20922
|
+
* BB's textarea with voice input (see
|
|
20923
|
+
* {@link ExperimentalVoiceInputTextareaProps}): the same microphone
|
|
20924
|
+
* preference, transcription service, and error handling as the prompt box.
|
|
20925
|
+
* Experimental: see docs/api_to_audit.md.
|
|
20926
|
+
*/
|
|
20927
|
+
experimental_VoiceInputTextarea: ComponentType<ExperimentalVoiceInputTextareaProps>;
|
|
20869
20928
|
/**
|
|
20870
20929
|
* BB's controlled provider/model/reasoning picker. Provider changes emit
|
|
20871
20930
|
* only after the new provider's verified defaults and capabilities resolve,
|
|
@@ -20924,6 +20983,7 @@ declare const Markdown: react.ComponentType<MarkdownProps>;
|
|
|
20924
20983
|
declare const experimental_FileLink: react.ComponentType<ExperimentalFileLinkProps>;
|
|
20925
20984
|
declare const UrlLink: react.ComponentType<UrlLinkProps>;
|
|
20926
20985
|
declare const experimental_NewThreadComposer: react.ComponentType<NewThreadComposerProps>;
|
|
20986
|
+
declare const experimental_VoiceInputTextarea: react.ComponentType<ExperimentalVoiceInputTextareaProps>;
|
|
20927
20987
|
declare const experimental_ProviderModelPicker: react.ComponentType<ExperimentalProviderModelPickerProps>;
|
|
20928
20988
|
declare const experimental_PermissionModePicker: react.ComponentType<ExperimentalPermissionModePickerProps>;
|
|
20929
20989
|
declare const experimental_BranchPicker: react.ComponentType<BranchPickerProps>;
|
|
@@ -20964,5 +21024,5 @@ declare const useSdk: () => PluginBrowserBbSdk;
|
|
|
20964
21024
|
declare const experimental_useProviders: () => PluginProvidersState;
|
|
20965
21025
|
declare const experimental_useCodeTheme: () => PluginCodeThemeState;
|
|
20966
21026
|
|
|
20967
|
-
export { Markdown, ThreadChat, ThreadTitle, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_Icon, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderIcon, experimental_ProviderModelPicker, experimental_SidebarNavigationIcon, experimental_SourceCode, experimental_useAppPanel, experimental_useBranches, experimental_useCheckoutState, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_usePluginId, experimental_useProviders, experimental_useQuestionFormHost, experimental_useSidebarNavigation, experimental_useSidebarNavigationSplit, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposers, useEnvironmentProviders, useRealtime, useRealtimeConnectionState, useRpc, useSdk, useSettings, useSidebarSplitLayout, useSidebarThreadDraft, useSidebarThreadDraftIds, useSidebarThreadRowStatus, useSidebarThreadRowStatuses, useSidebarThreadShortcut };
|
|
20968
|
-
export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerAttachment, ComposerCustomization, ComposerDraft, ComposerDraftReplacement, ComposerDraftSnapshot, ComposerInsertOptions, ComposerInsertPart, ComposerMention, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerSelection, ComposerSendMenuItem, ComposerSubmitOptions, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerCommandRegistration, ExperimentalComposerPopupRegistration, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalQuestionFormHost, ExperimentalQuestionShortcut, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarHeaderRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProvider, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProvidersState, 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, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|
|
21027
|
+
export { Markdown, ThreadChat, ThreadTitle, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_Icon, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderIcon, experimental_ProviderModelPicker, experimental_SidebarNavigationIcon, experimental_SourceCode, experimental_VoiceInputTextarea, experimental_useAppPanel, experimental_useBranches, experimental_useCheckoutState, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_usePluginId, experimental_useProviders, experimental_useQuestionFormHost, experimental_useSidebarNavigation, experimental_useSidebarNavigationSplit, experimental_useSidebarThreadActions, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, useBbContext, useBbNavigate, useComposer, useComposers, useEnvironmentProviders, useRealtime, useRealtimeConnectionState, useRpc, useSdk, useSettings, useSidebarSplitLayout, useSidebarThreadDraft, useSidebarThreadDraftIds, useSidebarThreadRowStatus, useSidebarThreadRowStatuses, useSidebarThreadShortcut };
|
|
21028
|
+
export type { BbContext, BbNavigate, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerAttachment, ComposerCustomization, ComposerDraft, ComposerDraftReplacement, ComposerDraftSnapshot, ComposerInsertOptions, ComposerInsertPart, ComposerMention, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerSelection, ComposerSendMenuItem, ComposerSubmitOptions, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerCommandRegistration, ExperimentalComposerPopupRegistration, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalQuestionFormHost, ExperimentalQuestionShortcut, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarHeaderRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, ExperimentalVoiceInputTextareaProps, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginEnvironmentProvider, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProvidersState, 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, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|
|
@@ -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, CSSProperties, ReactNode } from 'react';
|
|
9
|
+
import { ComponentType, ComponentPropsWithoutRef, CSSProperties, ComponentPropsWithRef, ReactNode } from 'react';
|
|
10
10
|
import * as z from 'zod';
|
|
11
11
|
import { z as z$1 } from 'zod';
|
|
12
12
|
import * as zod_v4_core from 'zod/v4/core';
|
|
@@ -58,6 +58,7 @@ declare const appSettingsSchema: z$1.ZodObject<{
|
|
|
58
58
|
}>>;
|
|
59
59
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
60
60
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
61
|
+
showGitChanges: z$1.ZodBoolean;
|
|
61
62
|
showKeyboardHints: z$1.ZodBoolean;
|
|
62
63
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
63
64
|
streamerMode: z$1.ZodBoolean;
|
|
@@ -78,6 +79,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
78
79
|
}>>;
|
|
79
80
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
80
81
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
82
|
+
showGitChanges: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
81
83
|
showKeyboardHints: z$1.ZodBoolean;
|
|
82
84
|
showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
83
85
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -96,6 +98,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
96
98
|
flat: "flat";
|
|
97
99
|
}>>;
|
|
98
100
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
101
|
+
showGitChanges: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
99
102
|
showKeyboardHints: z$1.ZodBoolean;
|
|
100
103
|
showUnhandledProviderEvents: z$1.ZodBoolean;
|
|
101
104
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -104,7 +107,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
104
107
|
}, z$1.core.$strict>]>;
|
|
105
108
|
type AppSettingsUpdate = z$1.infer<typeof appSettingsUpdateSchema>;
|
|
106
109
|
|
|
107
|
-
declare const UI_PREFERENCE_KEYS: readonly ["sidebar.organizationMode", "sidebar.threadGrouping.environment", "sidebar.chronologicalSort", "sidebar.sortDirection", "sidebar.sectionOrder", "sidebar.manualSectionOrder", "sidebar.machineSectionOrder", "sidebar.hiddenGroups", "sidebar.collapsedSections", "sidebar.collapsedProjects", "sidebar.collapsedThreads", "sidebar.collapsedEnvironments", "sidebar.collapsedThreadSections", "sidebar.collapsedMachines", "sidebar.footerOrder", "sidebar.hiddenFooterItems", "sidebar.pluginPanelOrder", "sidebar.visiblePluginPanels", "sidebar.navigationProvider", "sidebar.headerProvider", "sidebar.threadListProvider"];
|
|
110
|
+
declare const UI_PREFERENCE_KEYS: readonly ["sidebar.organizationMode", "sidebar.threadGrouping.environment", "sidebar.chronologicalSort", "sidebar.sortDirection", "sidebar.sectionOrder", "sidebar.manualSectionOrder", "sidebar.machineSectionOrder", "sidebar.hiddenGroups", "sidebar.collapsedSections", "sidebar.collapsedProjects", "sidebar.collapsedThreads", "sidebar.collapsedEnvironments", "sidebar.collapsedThreadSections", "sidebar.collapsedMachines", "sidebar.footerOrder", "sidebar.hiddenFooterItems", "sidebar.pluginPanelOrder", "sidebar.visiblePluginPanels", "sidebar.navigationProvider", "sidebar.headerProvider", "sidebar.threadListProvider", "infoPanel.collapsedSections"];
|
|
108
111
|
type UiPreferenceKey = (typeof UI_PREFERENCE_KEYS)[number];
|
|
109
112
|
interface UiPreferenceDefinition<Schema extends z$1.ZodTypeAny = z$1.ZodTypeAny> {
|
|
110
113
|
schema: Schema;
|
|
@@ -149,6 +152,7 @@ declare const uiPreferenceDefinitions: {
|
|
|
149
152
|
readonly "sidebar.navigationProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
|
|
150
153
|
readonly "sidebar.headerProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
|
|
151
154
|
readonly "sidebar.threadListProvider": UiPreferenceDefinition<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<string, string>>>;
|
|
155
|
+
readonly "infoPanel.collapsedSections": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
152
156
|
};
|
|
153
157
|
type UiPreferenceValue<Key extends UiPreferenceKey> = z$1.infer<(typeof uiPreferenceDefinitions)[Key]["schema"]>;
|
|
154
158
|
interface UiPreferenceEntry<Key extends UiPreferenceKey = UiPreferenceKey> {
|
|
@@ -169,6 +173,8 @@ declare const appKeybindingOverridesSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
|
169
173
|
"dataDirectory.open": "dataDirectory.open";
|
|
170
174
|
"diff.toggle": "diff.toggle";
|
|
171
175
|
"file.quickOpen": "file.quickOpen";
|
|
176
|
+
"history.back": "history.back";
|
|
177
|
+
"history.forward": "history.forward";
|
|
172
178
|
"logs.openServerDaemon": "logs.openServerDaemon";
|
|
173
179
|
"modelPicker.cycleModel": "modelPicker.cycleModel";
|
|
174
180
|
"modelPicker.cycleModelBackward": "modelPicker.cycleModelBackward";
|
|
@@ -493,12 +499,14 @@ type Environment = z$1.infer<typeof environmentSchema>;
|
|
|
493
499
|
|
|
494
500
|
declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
495
501
|
changelogPreview: "changelogPreview";
|
|
502
|
+
navigationRail: "navigationRail";
|
|
496
503
|
performanceDiagnostics: "performanceDiagnostics";
|
|
497
504
|
serverMove: "serverMove";
|
|
498
505
|
}>, z$1.ZodBoolean>;
|
|
499
506
|
type Experiments = z$1.infer<typeof experimentsSchema>;
|
|
500
507
|
declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
501
508
|
changelogPreview: "changelogPreview";
|
|
509
|
+
navigationRail: "navigationRail";
|
|
502
510
|
performanceDiagnostics: "performanceDiagnostics";
|
|
503
511
|
serverMove: "serverMove";
|
|
504
512
|
}> & z$1.core.$partial, z$1.ZodBoolean>;
|
|
@@ -9648,6 +9656,11 @@ declare const pluginCatalogStatusSchema: z$1.ZodObject<{
|
|
|
9648
9656
|
}, z$1.core.$strip>;
|
|
9649
9657
|
type PluginCatalogStatus = z$1.infer<typeof pluginCatalogStatusSchema>;
|
|
9650
9658
|
declare const pluginCatalogSearchResponseSchema: z$1.ZodObject<{
|
|
9659
|
+
categories: z$1.ZodDefault<z$1.ZodArray<z$1.ZodObject<{
|
|
9660
|
+
description: z$1.ZodString;
|
|
9661
|
+
displayName: z$1.ZodString;
|
|
9662
|
+
id: z$1.ZodString;
|
|
9663
|
+
}, z$1.core.$strip>>>;
|
|
9651
9664
|
collections: z$1.ZodArray<z$1.ZodObject<{
|
|
9652
9665
|
displayName: z$1.ZodString;
|
|
9653
9666
|
id: z$1.ZodString;
|
|
@@ -10169,6 +10182,8 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10169
10182
|
"dataDirectory.open": "dataDirectory.open";
|
|
10170
10183
|
"diff.toggle": "diff.toggle";
|
|
10171
10184
|
"file.quickOpen": "file.quickOpen";
|
|
10185
|
+
"history.back": "history.back";
|
|
10186
|
+
"history.forward": "history.forward";
|
|
10172
10187
|
"logs.openServerDaemon": "logs.openServerDaemon";
|
|
10173
10188
|
"modelPicker.cycleModel": "modelPicker.cycleModel";
|
|
10174
10189
|
"modelPicker.cycleModelBackward": "modelPicker.cycleModelBackward";
|
|
@@ -10282,6 +10297,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10282
10297
|
}, z$1.core.$strict>>;
|
|
10283
10298
|
experiments: z$1.ZodRecord<z$1.ZodEnum<{
|
|
10284
10299
|
changelogPreview: "changelogPreview";
|
|
10300
|
+
navigationRail: "navigationRail";
|
|
10285
10301
|
performanceDiagnostics: "performanceDiagnostics";
|
|
10286
10302
|
serverMove: "serverMove";
|
|
10287
10303
|
}>, z$1.ZodBoolean>;
|
|
@@ -10303,6 +10319,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10303
10319
|
}>>;
|
|
10304
10320
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
10305
10321
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
10322
|
+
showGitChanges: z$1.ZodBoolean;
|
|
10306
10323
|
showKeyboardHints: z$1.ZodBoolean;
|
|
10307
10324
|
showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
10308
10325
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -10320,6 +10337,8 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10320
10337
|
"dataDirectory.open": "dataDirectory.open";
|
|
10321
10338
|
"diff.toggle": "diff.toggle";
|
|
10322
10339
|
"file.quickOpen": "file.quickOpen";
|
|
10340
|
+
"history.back": "history.back";
|
|
10341
|
+
"history.forward": "history.forward";
|
|
10323
10342
|
"logs.openServerDaemon": "logs.openServerDaemon";
|
|
10324
10343
|
"modelPicker.cycleModel": "modelPicker.cycleModel";
|
|
10325
10344
|
"modelPicker.cycleModelBackward": "modelPicker.cycleModelBackward";
|
|
@@ -10413,6 +10432,8 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10413
10432
|
"dataDirectory.open": "dataDirectory.open";
|
|
10414
10433
|
"diff.toggle": "diff.toggle";
|
|
10415
10434
|
"file.quickOpen": "file.quickOpen";
|
|
10435
|
+
"history.back": "history.back";
|
|
10436
|
+
"history.forward": "history.forward";
|
|
10416
10437
|
"logs.openServerDaemon": "logs.openServerDaemon";
|
|
10417
10438
|
"modelPicker.cycleModel": "modelPicker.cycleModel";
|
|
10418
10439
|
"modelPicker.cycleModelBackward": "modelPicker.cycleModelBackward";
|
|
@@ -10630,6 +10651,7 @@ declare const systemAppUpdateStatusSchema: z$1.ZodObject<{
|
|
|
10630
10651
|
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
10631
10652
|
phase: z$1.ZodLiteral<"restarting">;
|
|
10632
10653
|
startedAt: z$1.ZodString;
|
|
10654
|
+
targetCommit: z$1.ZodNullable<z$1.ZodString>;
|
|
10633
10655
|
targetVersion: z$1.ZodString;
|
|
10634
10656
|
}, z$1.core.$strip>], "phase">;
|
|
10635
10657
|
available: z$1.ZodNullable<z$1.ZodObject<{
|
|
@@ -17898,6 +17920,26 @@ interface ExperimentalQuestionFormHost {
|
|
|
17898
17920
|
*/
|
|
17899
17921
|
registerChoiceHandler(handler: (index: number) => boolean): () => void;
|
|
17900
17922
|
}
|
|
17923
|
+
/**
|
|
17924
|
+
* Props of the host-owned `experimental_VoiceInputTextarea`: a controlled
|
|
17925
|
+
* textarea with bb's voice input. Other textarea attributes, including `ref`
|
|
17926
|
+
* and `className`, reach the underlying `<textarea>`; the caller styles it and
|
|
17927
|
+
* the host adds room for its microphone controls when voice input is
|
|
17928
|
+
* available.
|
|
17929
|
+
*/
|
|
17930
|
+
interface ExperimentalVoiceInputTextareaProps extends Omit<ComponentPropsWithRef<"textarea">, "children" | "defaultValue" | "onChange" | "value"> {
|
|
17931
|
+
value: string;
|
|
17932
|
+
/**
|
|
17933
|
+
* Receives typed edits and finished transcripts, which the host appends to
|
|
17934
|
+
* `value`. Transcripts stay editable and are never submitted.
|
|
17935
|
+
*/
|
|
17936
|
+
onValueChange(value: string): void;
|
|
17937
|
+
/**
|
|
17938
|
+
* True from the start of recording until transcription finishes or is
|
|
17939
|
+
* cancelled, and false on unmount. Hold submission while it is true.
|
|
17940
|
+
*/
|
|
17941
|
+
onVoiceInputActiveChange?(active: boolean): void;
|
|
17942
|
+
}
|
|
17901
17943
|
/**
|
|
17902
17944
|
* Props for a `sidebarFooterAction` — host-rendered (no plugin component).
|
|
17903
17945
|
* Deliberately empty; the registration's `run` carries the behavior.
|
|
@@ -19341,6 +19383,13 @@ interface ThreadChatMessageReference {
|
|
|
19341
19383
|
/** Visible text of the message. */
|
|
19342
19384
|
text: string;
|
|
19343
19385
|
sourceSeqEnd: number;
|
|
19386
|
+
/**
|
|
19387
|
+
* The event sequence that recorded this message: the `msg` value of a
|
|
19388
|
+
* message link and the seq that `sdk.threads.message` and
|
|
19389
|
+
* `bb thread log --message` read. For a steer this is its request sequence,
|
|
19390
|
+
* which can differ from the acceptance sequence in `sourceSeqEnd`.
|
|
19391
|
+
*/
|
|
19392
|
+
experimental_messageSeq: number;
|
|
19344
19393
|
}
|
|
19345
19394
|
/**
|
|
19346
19395
|
* What a caller that is *not* itself a panel action passes to open one — a
|
|
@@ -19382,10 +19431,11 @@ interface PluginMessageActionContext {
|
|
|
19382
19431
|
composer: PluginComposerApi | null;
|
|
19383
19432
|
}
|
|
19384
19433
|
/**
|
|
19385
|
-
* An action on chat messages: an icon button in
|
|
19386
|
-
* (user and assistant messages) and an entry in
|
|
19387
|
-
* text-selection menu.
|
|
19388
|
-
*
|
|
19434
|
+
* An action on chat messages in the main thread timeline: an icon button in
|
|
19435
|
+
* the per-message action bar (user and assistant messages) and an entry in
|
|
19436
|
+
* the assistant-message text-selection menu. Embedded `ThreadChat` timelines
|
|
19437
|
+
* do not show slot-registered actions. Host-rendered chrome — the plugin
|
|
19438
|
+
* supplies title, icon, and `run` behavior only. Resolved icon names take precedence over
|
|
19389
19439
|
* plugin branding; omitted or unknown names fall back to branding.
|
|
19390
19440
|
*/
|
|
19391
19441
|
interface PluginMessageActionRegistration {
|
|
@@ -19406,14 +19456,15 @@ interface PluginCommandContext {
|
|
|
19406
19456
|
threadId: string | null;
|
|
19407
19457
|
projectId: string | null;
|
|
19408
19458
|
/**
|
|
19409
|
-
* Open one of this plugin's
|
|
19410
|
-
*
|
|
19459
|
+
* Open one of this plugin's panel components in the focused side panel.
|
|
19460
|
+
* In a thread, `actionId` resolves against `threadPanelAction`; on the New
|
|
19461
|
+
* thread screen, it resolves against `experimental_newThreadPanelAction`.
|
|
19462
|
+
* Register both slots with the same id to support commands on both screens.
|
|
19411
19463
|
*
|
|
19412
19464
|
* Returns true when the host accepted the open; false when it declined —
|
|
19413
|
-
* `params` was not a JSON value, the action id names no
|
|
19414
|
-
* of this plugin, or the surface has no side panel.
|
|
19415
|
-
*
|
|
19416
|
-
* rather than assuming.
|
|
19465
|
+
* `params` was not a JSON value, the action id names no matching panel action
|
|
19466
|
+
* of this plugin on the focused surface, or the surface has no side panel.
|
|
19467
|
+
* The palette opens anywhere, so guard with `isAvailable` rather than assuming.
|
|
19417
19468
|
*/
|
|
19418
19469
|
openPanel(options: PluginTargetedPanelActionOpenOptions): boolean;
|
|
19419
19470
|
}
|
|
@@ -20334,8 +20385,9 @@ type ComposerSubmitOptions = {
|
|
|
20334
20385
|
/**
|
|
20335
20386
|
* A consumer-supplied action on the messages of one `ThreadChat` instance,
|
|
20336
20387
|
* rendered in the embedded timeline's per-message action bar alongside the
|
|
20337
|
-
* native
|
|
20338
|
-
* scoped to the rendering component, not
|
|
20388
|
+
* native actions. Slot-registered `messageAction`s do not appear there. Unlike
|
|
20389
|
+
* the `messageAction` slot this is scoped to the rendering component, not
|
|
20390
|
+
* registered globally.
|
|
20339
20391
|
*/
|
|
20340
20392
|
interface ThreadChatMessageAction {
|
|
20341
20393
|
/** Unique within this ThreadChat instance; letters, digits, `-`, `_`. */
|
|
@@ -21042,6 +21094,13 @@ interface PluginSdkApp {
|
|
|
21042
21094
|
* docs/api_to_audit.md for what to audit before the prefix drops.
|
|
21043
21095
|
*/
|
|
21044
21096
|
experimental_NewThreadComposer: ComponentType<NewThreadComposerProps>;
|
|
21097
|
+
/**
|
|
21098
|
+
* BB's textarea with voice input (see
|
|
21099
|
+
* {@link ExperimentalVoiceInputTextareaProps}): the same microphone
|
|
21100
|
+
* preference, transcription service, and error handling as the prompt box.
|
|
21101
|
+
* Experimental: see docs/api_to_audit.md.
|
|
21102
|
+
*/
|
|
21103
|
+
experimental_VoiceInputTextarea: ComponentType<ExperimentalVoiceInputTextareaProps>;
|
|
21045
21104
|
/**
|
|
21046
21105
|
* BB's controlled provider/model/reasoning picker. Provider changes emit
|
|
21047
21106
|
* only after the new provider's verified defaults and capabilities resolve,
|
|
@@ -23506,4 +23565,4 @@ declare function cliCommand<const TOptions extends CliOptions = Record<string, n
|
|
|
23506
23565
|
declare function defineCli(spec: PluginCliSpec): PluginCliRegistration;
|
|
23507
23566
|
|
|
23508
23567
|
export { PLUGIN_CLI_OUTPUT_MAX_BYTES, PluginCliError, cliCommand, defineCli, defineRpcContract, experimental_defineHostEntry };
|
|
23509
|
-
export type { BbContext, BbNavigate, BbPluginApi, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerAttachment, ComposerCustomization, ComposerDraft, ComposerDraftReplacement, ComposerDraftSnapshot, ComposerInsertOptions, ComposerInsertPart, ComposerMention, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerSelection, ComposerSendMenuItem, ComposerSubmitOptions, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerCommandRegistration, ExperimentalComposerPopupRegistration, ExperimentalDesktopBrowserAcquireInput, ExperimentalDesktopBrowserCreateInput, ExperimentalDesktopBrowserLease, ExperimentalDesktopBrowserScope, ExperimentalDesktopBrowsersArea, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalPluginMentionImage, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealth, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginRpcCaller, ExperimentalPluginRpcHandlerContext, ExperimentalPluginRpcHandlersWithContext, ExperimentalPluginWebSocket, ExperimentalPluginWebSocketContext, ExperimentalPluginWebSocketHandler, ExperimentalPluginWebSocketHandlers, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalQuestionFormHost, ExperimentalQuestionShortcut, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarHeaderRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, JsonValue, MachineBootstrapApi, MachineBootstrapRequest, MachineExecutor, MachineExecutorRequest, MarkdownProps, MessageDispatchHookContext, MessageDispatchHookDecision, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiCompleteOptions, PluginAiServiceDeclaration, PluginAiServiceStatus, PluginAiServices, PluginAiTranscribeOptions, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginBbSdk, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCli, PluginCliBooleanOption, PluginCliCommand, PluginCliCommandInfo, PluginCliConstraint, PluginCliContext, PluginCliDurationOption, PluginCliDurationUnit, PluginCliEnumOption, PluginCliErrorCode, PluginCliExecutionResult, PluginCliIntegerOption, PluginCliOption, PluginCliOptionValues, PluginCliOutputLimitError, PluginCliPositional, PluginCliPositionalValues, PluginCliRegistration, PluginCliResult, PluginCliRunInput, PluginCliSpec, PluginCliStringOption, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginDispatchAttemptKind, PluginDispatchEnvironmentIntent, PluginDispatchExecution, PluginDispatchExecutionSources, PluginDispatchInput, PluginEnvironmentProvider, PluginEnvironmentProviderDeclaration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProviderRequirements, PluginEnvironmentProvidersState, PluginEnvironmentValidateDecision, PluginEnvironments, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHookHandler, PluginHookName, PluginHookSignatures, PluginHooks, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionDescription, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMachineProviderDeclaration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMachineValidateDecision, PluginMachines, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderCompletedTurnDisplay, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRowLabels, PluginRowPresentation, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerAccess, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, ReadonlyJsonValue, ServerAccessGrant, ServerAccessProviderDeclaration, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|
|
23568
|
+
export type { BbContext, BbNavigate, BbPluginApi, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerAttachment, ComposerCustomization, ComposerDraft, ComposerDraftReplacement, ComposerDraftSnapshot, ComposerInsertOptions, ComposerInsertPart, ComposerMention, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerSelection, ComposerSendMenuItem, ComposerSubmitOptions, DiffProps, DiffViewMode, ExperimentalAppIcons, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerCommandRegistration, ExperimentalComposerPopupRegistration, ExperimentalDesktopBrowserAcquireInput, ExperimentalDesktopBrowserCreateInput, ExperimentalDesktopBrowserLease, ExperimentalDesktopBrowserScope, ExperimentalDesktopBrowsersArea, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalIconProps, ExperimentalIconRegistration, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginBrowserPage, ExperimentalPluginBrowserPageEvaluateOptions, ExperimentalPluginBrowserPageWorld, ExperimentalPluginBrowserToolbarActionProps, ExperimentalPluginBrowserToolbarActionRegistration, ExperimentalPluginFixedTabReference, ExperimentalPluginMentionImage, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealth, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginRpcCaller, ExperimentalPluginRpcHandlerContext, ExperimentalPluginRpcHandlersWithContext, ExperimentalPluginWebSocket, ExperimentalPluginWebSocketContext, ExperimentalPluginWebSocketHandler, ExperimentalPluginWebSocketHandlers, ExperimentalProviderIconProps, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalQuestionFormHost, ExperimentalQuestionShortcut, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarHeaderProps, ExperimentalSidebarHeaderRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationIconProps, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, ExperimentalSidebarNavigationSplit, ExperimentalSidebarNavigationSplitOptions, ExperimentalSidebarNavigationState, ExperimentalVoiceInputTextareaProps, JsonValue, MachineBootstrapApi, MachineBootstrapRequest, MachineExecutor, MachineExecutorRequest, MarkdownProps, MessageDispatchHookContext, MessageDispatchHookDecision, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiCompleteOptions, PluginAiServiceDeclaration, PluginAiServiceStatus, PluginAiServices, PluginAiTranscribeOptions, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginBbSdk, PluginBoundThreadsArea, PluginBrowserBbSdk, PluginCli, PluginCliBooleanOption, PluginCliCommand, PluginCliCommandInfo, PluginCliConstraint, PluginCliContext, PluginCliDurationOption, PluginCliDurationUnit, PluginCliEnumOption, PluginCliErrorCode, PluginCliExecutionResult, PluginCliIntegerOption, PluginCliOption, PluginCliOptionValues, PluginCliOutputLimitError, PluginCliPositional, PluginCliPositionalValues, PluginCliRegistration, PluginCliResult, PluginCliRunInput, PluginCliSpec, PluginCliStringOption, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandContext, PluginCommandRegistration, PluginCommandShortcut, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginDispatchAttemptKind, PluginDispatchEnvironmentIntent, PluginDispatchExecution, PluginDispatchExecutionSources, PluginDispatchInput, PluginEnvironmentProvider, PluginEnvironmentProviderDeclaration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProviderRequirements, PluginEnvironmentProvidersState, PluginEnvironmentValidateDecision, PluginEnvironments, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHookHandler, PluginHookName, PluginHookSignatures, PluginHooks, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionDescription, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMachineProviderDeclaration, PluginMachineProviderInputsChange, PluginMachineProviderInputsProps, PluginMachineProviderInputsRegistration, PluginMachineValidateDecision, PluginMachines, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderCompletedTurnDisplay, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRowLabels, PluginRowPresentation, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerAccess, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSection, PluginSidebarSplitLayout, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, ReadonlyJsonValue, ServerAccessGrant, ServerAccessProviderDeclaration, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|
package/dist/app.js
CHANGED
|
@@ -50,6 +50,9 @@ var UrlLink = runtimeComponent("UrlLink");
|
|
|
50
50
|
var experimental_NewThreadComposer = runtimeComponent(
|
|
51
51
|
"experimental_NewThreadComposer"
|
|
52
52
|
);
|
|
53
|
+
var experimental_VoiceInputTextarea = runtimeComponent(
|
|
54
|
+
"experimental_VoiceInputTextarea"
|
|
55
|
+
);
|
|
53
56
|
var experimental_ProviderModelPicker = runtimeComponent(
|
|
54
57
|
"experimental_ProviderModelPicker"
|
|
55
58
|
);
|
|
@@ -154,6 +157,7 @@ export {
|
|
|
154
157
|
experimental_ProviderModelPicker,
|
|
155
158
|
experimental_SidebarNavigationIcon,
|
|
156
159
|
experimental_SourceCode,
|
|
160
|
+
experimental_VoiceInputTextarea,
|
|
157
161
|
experimental_useAppPanel,
|
|
158
162
|
experimental_useBranches,
|
|
159
163
|
experimental_useCheckoutState,
|
|
@@ -15976,7 +15976,7 @@ function resolveBridgeProcessEnvForMcpServer() {
|
|
|
15976
15976
|
}
|
|
15977
15977
|
async function forwardDynamicToolCall(args, signal) {
|
|
15978
15978
|
const session = sessionsByBbThreadId.get(args.threadId);
|
|
15979
|
-
if (!session || !session.providerThreadId || session.stopping) {
|
|
15979
|
+
if (!session || !session.providerThreadId || session.stopping || session.connection.exited) {
|
|
15980
15980
|
return { ok: false, error: "No active ACP session for dynamic tool call." };
|
|
15981
15981
|
}
|
|
15982
15982
|
const controller = new AbortController();
|
|
@@ -16984,8 +16984,8 @@ async function startAgentSession(request) {
|
|
|
16984
16984
|
onExit: (info) => {
|
|
16985
16985
|
const wasCurrent = sessionsByBbThreadId.get(bbThreadId) === session;
|
|
16986
16986
|
cancelPendingPermissions(session);
|
|
16987
|
-
removeSession(session);
|
|
16988
16987
|
if (!wasCurrent || session.stopping || session.providerThreadId === "") {
|
|
16988
|
+
removeSession(session);
|
|
16989
16989
|
return;
|
|
16990
16990
|
}
|
|
16991
16991
|
void releaseCursorMcpApproval(session);
|
|
@@ -16993,6 +16993,7 @@ async function startAgentSession(request) {
|
|
|
16993
16993
|
session,
|
|
16994
16994
|
`ACP agent "${agentLabel}" exited unexpectedly${info.code !== null ? ` (code ${info.code})` : ""}${info.stderrTail ? `: ${info.stderrTail}` : ""}`
|
|
16995
16995
|
);
|
|
16996
|
+
session.activePromptKind = null;
|
|
16996
16997
|
}
|
|
16997
16998
|
});
|
|
16998
16999
|
session = {
|
|
@@ -17353,11 +17354,16 @@ function runTurn(session, firstInput) {
|
|
|
17353
17354
|
"ACP turn failed before the steer was sent"
|
|
17354
17355
|
);
|
|
17355
17356
|
session.cancelRequested = false;
|
|
17356
|
-
if (!session.stopping
|
|
17357
|
-
|
|
17358
|
-
|
|
17359
|
-
|
|
17360
|
-
)
|
|
17357
|
+
if (!session.stopping) {
|
|
17358
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
17359
|
+
if (!session.connection.exited) {
|
|
17360
|
+
emitSessionError(session, message);
|
|
17361
|
+
} else if (session.activePromptKind === "turn") {
|
|
17362
|
+
emitForSession(session, "error", {
|
|
17363
|
+
threadId: session.bbThreadId,
|
|
17364
|
+
message
|
|
17365
|
+
});
|
|
17366
|
+
}
|
|
17361
17367
|
}
|
|
17362
17368
|
session.activePromptKind = null;
|
|
17363
17369
|
return;
|
|
@@ -17403,7 +17409,7 @@ function reconcileExecutionSettings(session, options) {
|
|
|
17403
17409
|
construction.permissionMode
|
|
17404
17410
|
)
|
|
17405
17411
|
);
|
|
17406
|
-
const restart = session.restartAfterCancelError || launchArgsChanged || !isDeepStrictEqual(envVars ?? {}, session.construction.envVars ?? {});
|
|
17412
|
+
const restart = session.connection.exited || session.restartAfterCancelError || launchArgsChanged || !isDeepStrictEqual(envVars ?? {}, session.construction.envVars ?? {});
|
|
17407
17413
|
cancelPendingPermissions(session);
|
|
17408
17414
|
session.policy = {
|
|
17409
17415
|
permissionMode: options.permissionMode,
|
|
@@ -17417,7 +17423,7 @@ function reconcileExecutionSettings(session, options) {
|
|
|
17417
17423
|
}
|
|
17418
17424
|
async function rebuildAgentSession(session, construction) {
|
|
17419
17425
|
const previousProviderThreadId = session.providerThreadId;
|
|
17420
|
-
const reason = session.restartAfterCancelError ? "The ACP agent failed during cancellation; its session was rebuilt before continuing." : "Execution settings changed; the ACP session was rebuilt to apply them.";
|
|
17426
|
+
const reason = session.connection.exited ? "The ACP agent exited unexpectedly; its session was rebuilt before continuing." : session.restartAfterCancelError ? "The ACP agent failed during cancellation; its session was rebuilt before continuing." : "Execution settings changed; the ACP session was rebuilt to apply them.";
|
|
17421
17427
|
const queuedInputs = session.queuedInputs.splice(0);
|
|
17422
17428
|
const continuingTurn = session.activePromptKind === "turn";
|
|
17423
17429
|
finishTurn(session, "cancelled");
|
|
@@ -6540,6 +6540,26 @@ var PARITY_INITIALIZE_ID = "parity-initialize";
|
|
|
6540
6540
|
function sleep(ms) {
|
|
6541
6541
|
return new Promise((resolveSleep) => setTimeout(resolveSleep, ms));
|
|
6542
6542
|
}
|
|
6543
|
+
var REPLAY_STARTUP_CONCURRENCY = 4;
|
|
6544
|
+
var replayStartupQueue = [];
|
|
6545
|
+
var startingReplays = 0;
|
|
6546
|
+
async function acquireReplayStartup() {
|
|
6547
|
+
if (startingReplays < REPLAY_STARTUP_CONCURRENCY) {
|
|
6548
|
+
startingReplays += 1;
|
|
6549
|
+
} else {
|
|
6550
|
+
await new Promise(
|
|
6551
|
+
(resolveSlot) => replayStartupQueue.push(resolveSlot)
|
|
6552
|
+
);
|
|
6553
|
+
}
|
|
6554
|
+
let released = false;
|
|
6555
|
+
return () => {
|
|
6556
|
+
if (released) return;
|
|
6557
|
+
released = true;
|
|
6558
|
+
const next = replayStartupQueue.shift();
|
|
6559
|
+
if (next === void 0) startingReplays -= 1;
|
|
6560
|
+
else next();
|
|
6561
|
+
};
|
|
6562
|
+
}
|
|
6543
6563
|
async function replayRecording(options) {
|
|
6544
6564
|
const timeoutMs = options.timeoutMs ?? 15e3;
|
|
6545
6565
|
const orderTimeoutMs = options.orderTimeoutMs ?? 5e3;
|
|
@@ -6582,275 +6602,313 @@ async function replayRecording(options) {
|
|
|
6582
6602
|
);
|
|
6583
6603
|
profile.prepareState?.({ recording, stateDir, workspaceDir });
|
|
6584
6604
|
const launch = options.bridge;
|
|
6585
|
-
const
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
6593
|
-
});
|
|
6594
|
-
const recordedCwd = recordedWorkspaceDir(recording);
|
|
6595
|
-
const jsonText = (value) => JSON.stringify(value).slice(1, -1);
|
|
6596
|
-
const restoreRecordedWorkspace = (line) => recordedCwd === null || recordedCwd === workspaceDir ? line : line.split(jsonText(workspaceDir)).join(jsonText(recordedCwd));
|
|
6597
|
-
const initializeId = PARITY_INITIALIZE_ID;
|
|
6598
|
-
const startedAt = Date.now();
|
|
6599
|
-
const lines = [];
|
|
6600
|
-
const lineTimes = [];
|
|
6601
|
-
const lineAfter = [];
|
|
6602
|
-
let lastSentRuntimeEntry = null;
|
|
6603
|
-
const events = [];
|
|
6604
|
-
const grammarViolations = [];
|
|
6605
|
-
const stalls = [];
|
|
6606
|
-
let stderr = "";
|
|
6607
|
-
const grammar = new ThreadEventGrammar();
|
|
6608
|
-
const liveAssembler = options.createAssembler(providerId);
|
|
6609
|
-
const planAssembler = (options.createPlanAssembler ?? options.createAssembler)(providerId);
|
|
6610
|
-
const exactPlan = options.planFromCurrentLane === true;
|
|
6611
|
-
const planRecording = exactPlan ? withCurrentBridgeLane(recording) : recording;
|
|
6612
|
-
const steps = planRuntimeSteps(planRecording, planAssembler);
|
|
6613
|
-
const plannedEventCount = exactPlan ? assembleRecordedEvents(
|
|
6614
|
-
planRecording,
|
|
6615
|
-
options.createPlanAssembler ?? options.createAssembler,
|
|
6616
|
-
providerId
|
|
6617
|
-
).events.length : null;
|
|
6618
|
-
const answeredIds = /* @__PURE__ */ new Set();
|
|
6619
|
-
const pendingBridgeRequests = [];
|
|
6620
|
-
const recordedAnswers = /* @__PURE__ */ new Map();
|
|
6621
|
-
for (const step of steps) {
|
|
6622
|
-
if (step.message !== null && isResponse(step.message)) {
|
|
6623
|
-
const method = methodOfRecordedBridgeRequest(
|
|
6624
|
-
recording,
|
|
6625
|
-
step.entry,
|
|
6626
|
-
step.message.id
|
|
6627
|
-
) ?? "?";
|
|
6628
|
-
const queue = recordedAnswers.get(method) ?? [];
|
|
6629
|
-
queue.push(step.message);
|
|
6630
|
-
recordedAnswers.set(method, queue);
|
|
6631
|
-
}
|
|
6632
|
-
}
|
|
6633
|
-
let lastOutputAt = Date.now();
|
|
6634
|
-
const exited = new Promise((resolveExit) => {
|
|
6635
|
-
child.on("exit", (code) => resolveExit(code));
|
|
6636
|
-
});
|
|
6637
|
-
child.stderr?.setEncoding("utf8").on("data", (chunk) => {
|
|
6638
|
-
stderr += chunk;
|
|
6639
|
-
options.onStderr?.(chunk);
|
|
6640
|
-
});
|
|
6641
|
-
function write(line) {
|
|
6642
|
-
if (child.stdin?.writable) {
|
|
6643
|
-
child.stdin.write(`${line}
|
|
6605
|
+
const releaseStartup = await acquireReplayStartup();
|
|
6606
|
+
let spawnedChild;
|
|
6607
|
+
let childEnded;
|
|
6608
|
+
try {
|
|
6609
|
+
let write2 = function(line) {
|
|
6610
|
+
if (child.stdin?.writable) {
|
|
6611
|
+
child.stdin.write(`${line}
|
|
6644
6612
|
`);
|
|
6645
|
-
}
|
|
6646
|
-
}
|
|
6647
|
-
function answerBridgeRequest(message) {
|
|
6648
|
-
const method = message.method ?? "?";
|
|
6649
|
-
const queue = recordedAnswers.get(method);
|
|
6650
|
-
const recorded = queue?.shift();
|
|
6651
|
-
if (recorded === void 0) {
|
|
6652
|
-
stalls.push(
|
|
6653
|
-
`no recorded answer for bridge request ${method} (${String(message.id)})`
|
|
6654
|
-
);
|
|
6655
|
-
write(
|
|
6656
|
-
JSON.stringify({
|
|
6657
|
-
jsonrpc: "2.0",
|
|
6658
|
-
id: message.id,
|
|
6659
|
-
error: { code: -32e3, message: "parity replay: no recorded answer" }
|
|
6660
|
-
})
|
|
6661
|
-
);
|
|
6662
|
-
return;
|
|
6663
|
-
}
|
|
6664
|
-
write(JSON.stringify({ ...recorded, id: message.id }));
|
|
6665
|
-
}
|
|
6666
|
-
readBoundedLines({
|
|
6667
|
-
input: child.stdout,
|
|
6668
|
-
onLine: (rawLine) => {
|
|
6669
|
-
const line = restoreRecordedWorkspace(rawLine);
|
|
6670
|
-
lastOutputAt = Date.now();
|
|
6671
|
-
lines.push(line);
|
|
6672
|
-
lineTimes.push(lastOutputAt - startedAt);
|
|
6673
|
-
lineAfter.push(lastSentRuntimeEntry);
|
|
6674
|
-
const message = parseWire(line);
|
|
6675
|
-
if (message === null) return;
|
|
6676
|
-
if (isResponse(message)) {
|
|
6677
|
-
answeredIds.add(String(message.id));
|
|
6678
|
-
return;
|
|
6679
6613
|
}
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6614
|
+
}, answerBridgeRequest2 = function(message) {
|
|
6615
|
+
const method = message.method ?? "?";
|
|
6616
|
+
const queue = recordedAnswers.get(method);
|
|
6617
|
+
const recorded = queue?.shift();
|
|
6618
|
+
if (recorded === void 0) {
|
|
6619
|
+
stalls.push(
|
|
6620
|
+
`no recorded answer for bridge request ${method} (${String(message.id)})`
|
|
6621
|
+
);
|
|
6622
|
+
write2(
|
|
6623
|
+
JSON.stringify({
|
|
6624
|
+
jsonrpc: "2.0",
|
|
6625
|
+
id: message.id,
|
|
6626
|
+
error: {
|
|
6627
|
+
code: -32e3,
|
|
6628
|
+
message: "parity replay: no recorded answer"
|
|
6629
|
+
}
|
|
6630
|
+
})
|
|
6631
|
+
);
|
|
6686
6632
|
return;
|
|
6687
6633
|
}
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6634
|
+
write2(JSON.stringify({ ...recorded, id: message.id }));
|
|
6635
|
+
};
|
|
6636
|
+
var write = write2, answerBridgeRequest = answerBridgeRequest2;
|
|
6637
|
+
const child = spawn(launch.command, launch.args, {
|
|
6638
|
+
cwd: launch.cwd,
|
|
6639
|
+
env: {
|
|
6640
|
+
...process.env,
|
|
6641
|
+
...launch.env,
|
|
6642
|
+
...profile.env({ replayCommand, wrapperPath, stateDir })
|
|
6643
|
+
},
|
|
6644
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
6645
|
+
});
|
|
6646
|
+
spawnedChild = child;
|
|
6647
|
+
childEnded = new Promise((resolveEnded) => {
|
|
6648
|
+
const onEnded = () => {
|
|
6649
|
+
releaseStartup();
|
|
6650
|
+
resolveEnded();
|
|
6651
|
+
};
|
|
6652
|
+
child.once("exit", onEnded);
|
|
6653
|
+
child.once("error", onEnded);
|
|
6654
|
+
});
|
|
6655
|
+
const recordedCwd = recordedWorkspaceDir(recording);
|
|
6656
|
+
const jsonText = (value) => JSON.stringify(value).slice(1, -1);
|
|
6657
|
+
const restoreRecordedWorkspace = (line) => recordedCwd === null || recordedCwd === workspaceDir ? line : line.split(jsonText(workspaceDir)).join(jsonText(recordedCwd));
|
|
6658
|
+
const initializeId = PARITY_INITIALIZE_ID;
|
|
6659
|
+
const startedAt = Date.now();
|
|
6660
|
+
const lines = [];
|
|
6661
|
+
const lineTimes = [];
|
|
6662
|
+
const lineAfter = [];
|
|
6663
|
+
let lastSentRuntimeEntry = null;
|
|
6664
|
+
const events = [];
|
|
6665
|
+
const grammarViolations = [];
|
|
6666
|
+
const stalls = [];
|
|
6667
|
+
let stderr = "";
|
|
6668
|
+
const grammar = new ThreadEventGrammar();
|
|
6669
|
+
const liveAssembler = options.createAssembler(providerId);
|
|
6670
|
+
const planAssembler = (options.createPlanAssembler ?? options.createAssembler)(providerId);
|
|
6671
|
+
const exactPlan = options.planFromCurrentLane === true;
|
|
6672
|
+
const planRecording = exactPlan ? withCurrentBridgeLane(recording) : recording;
|
|
6673
|
+
const steps = planRuntimeSteps(planRecording, planAssembler);
|
|
6674
|
+
const plannedEventCount = exactPlan ? assembleRecordedEvents(
|
|
6675
|
+
planRecording,
|
|
6676
|
+
options.createPlanAssembler ?? options.createAssembler,
|
|
6677
|
+
providerId
|
|
6678
|
+
).events.length : null;
|
|
6679
|
+
const answeredIds = /* @__PURE__ */ new Set();
|
|
6680
|
+
const pendingBridgeRequests = [];
|
|
6681
|
+
const recordedAnswers = /* @__PURE__ */ new Map();
|
|
6682
|
+
for (const step of steps) {
|
|
6683
|
+
if (step.message !== null && isResponse(step.message)) {
|
|
6684
|
+
const method = methodOfRecordedBridgeRequest(
|
|
6685
|
+
recording,
|
|
6686
|
+
step.entry,
|
|
6687
|
+
step.message.id
|
|
6688
|
+
) ?? "?";
|
|
6689
|
+
const queue = recordedAnswers.get(method) ?? [];
|
|
6690
|
+
queue.push(step.message);
|
|
6691
|
+
recordedAnswers.set(method, queue);
|
|
6692
|
+
}
|
|
6693
|
+
}
|
|
6694
|
+
let lastOutputAt = Date.now();
|
|
6695
|
+
const exited = new Promise((resolveExit) => {
|
|
6696
|
+
child.on("exit", (code) => resolveExit(code));
|
|
6697
|
+
child.on("error", (error) => {
|
|
6698
|
+
stalls.push(`bridge spawn failed: ${error.message}`);
|
|
6699
|
+
resolveExit(null);
|
|
6700
|
+
});
|
|
6701
|
+
});
|
|
6702
|
+
child.stderr?.setEncoding("utf8").on("data", (chunk) => {
|
|
6703
|
+
stderr += chunk;
|
|
6704
|
+
options.onStderr?.(chunk);
|
|
6705
|
+
});
|
|
6706
|
+
readBoundedLines({
|
|
6707
|
+
input: child.stdout,
|
|
6708
|
+
onLine: (rawLine) => {
|
|
6709
|
+
const line = restoreRecordedWorkspace(rawLine);
|
|
6710
|
+
lastOutputAt = Date.now();
|
|
6711
|
+
lines.push(line);
|
|
6712
|
+
lineTimes.push(lastOutputAt - startedAt);
|
|
6713
|
+
lineAfter.push(lastSentRuntimeEntry);
|
|
6714
|
+
const message = parseWire(line);
|
|
6715
|
+
if (message === null) return;
|
|
6716
|
+
if (isResponse(message)) {
|
|
6717
|
+
answeredIds.add(String(message.id));
|
|
6696
6718
|
return;
|
|
6697
6719
|
}
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6720
|
+
if (isRequest(message)) {
|
|
6721
|
+
pendingBridgeRequests.push({
|
|
6722
|
+
id: message.id,
|
|
6723
|
+
method: message.method
|
|
6724
|
+
});
|
|
6725
|
+
answerBridgeRequest2(message);
|
|
6726
|
+
return;
|
|
6727
|
+
}
|
|
6728
|
+
if (message.method === THREAD_DELTA_NOTIFICATION_METHOD) {
|
|
6729
|
+
let assembled;
|
|
6730
|
+
try {
|
|
6731
|
+
assembled = liveAssembler.assembleMessage(message);
|
|
6732
|
+
} catch (error) {
|
|
6733
|
+
stalls.push(
|
|
6734
|
+
`invalid thread/delta: ${error instanceof Error ? error.message : String(error)}`
|
|
6735
|
+
);
|
|
6736
|
+
return;
|
|
6737
|
+
}
|
|
6738
|
+
for (const event of assembled) {
|
|
6739
|
+
const result2 = grammar.observe(event);
|
|
6740
|
+
if (result2.kind === "violation") {
|
|
6741
|
+
grammarViolations.push({
|
|
6742
|
+
rule: result2.rule,
|
|
6743
|
+
reason: result2.reason,
|
|
6744
|
+
eventType: event.type
|
|
6745
|
+
});
|
|
6746
|
+
continue;
|
|
6747
|
+
}
|
|
6748
|
+
events.push(event);
|
|
6707
6749
|
}
|
|
6708
|
-
events.push(event);
|
|
6709
6750
|
}
|
|
6751
|
+
},
|
|
6752
|
+
onOverflow: (bytes) => {
|
|
6753
|
+
stalls.push(`oversized bridge line (${bytes} bytes)`);
|
|
6710
6754
|
}
|
|
6711
|
-
}
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
if (reportStall) stalls.push(`timed out waiting for ${label}`);
|
|
6725
|
-
return;
|
|
6755
|
+
});
|
|
6756
|
+
async function waitFor(label, predicate, limitMs = timeoutMs, reportStall = true) {
|
|
6757
|
+
const deadline = Date.now() + limitMs;
|
|
6758
|
+
while (!predicate()) {
|
|
6759
|
+
if (child.exitCode !== null || child.signalCode !== null || child.pid === void 0) {
|
|
6760
|
+
stalls.push(`bridge exited while waiting for ${label}`);
|
|
6761
|
+
return;
|
|
6762
|
+
}
|
|
6763
|
+
if (Date.now() > deadline) {
|
|
6764
|
+
if (reportStall) stalls.push(`timed out waiting for ${label}`);
|
|
6765
|
+
return;
|
|
6766
|
+
}
|
|
6767
|
+
await sleep(10);
|
|
6726
6768
|
}
|
|
6727
|
-
await sleep(10);
|
|
6728
6769
|
}
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6770
|
+
const firstStep = steps.find(
|
|
6771
|
+
(step) => step.message !== null && isRequest(step.message)
|
|
6772
|
+
);
|
|
6773
|
+
setCursor(
|
|
6774
|
+
firstStep === void 0 ? "end" : { run: firstStep.entry.run, seq: firstStep.entry.seq }
|
|
6775
|
+
);
|
|
6776
|
+
write2(
|
|
6777
|
+
JSON.stringify({
|
|
6778
|
+
jsonrpc: "2.0",
|
|
6779
|
+
id: initializeId,
|
|
6780
|
+
method: "initialize",
|
|
6781
|
+
params: {
|
|
6782
|
+
protocolVersion: PROVIDER_BRIDGE_PROTOCOL_VERSION,
|
|
6783
|
+
client: { name: "bb-parity", version: "0" }
|
|
6784
|
+
}
|
|
6785
|
+
})
|
|
6786
|
+
);
|
|
6787
|
+
await waitFor("initialize response", () => answeredIds.has(initializeId));
|
|
6788
|
+
const initialized = answeredIds.has(initializeId);
|
|
6789
|
+
if (!initialized) {
|
|
6790
|
+
if (child.pid !== void 0 && child.exitCode === null && child.signalCode === null)
|
|
6791
|
+
child.kill("SIGKILL");
|
|
6792
|
+
await childEnded;
|
|
6793
|
+
}
|
|
6794
|
+
releaseStartup();
|
|
6795
|
+
const sentRequestIds = [];
|
|
6796
|
+
for (const step of initialized ? steps : []) {
|
|
6797
|
+
if (step.message === null || !isRequest(step.message)) {
|
|
6798
|
+
if (step.message !== null && !isResponse(step.message)) {
|
|
6799
|
+
lastSentRuntimeEntry = {
|
|
6800
|
+
run: step.entry.run,
|
|
6801
|
+
seq: step.entry.seq,
|
|
6802
|
+
ts: step.entry.ts
|
|
6803
|
+
};
|
|
6804
|
+
write2(step.entry.line);
|
|
6805
|
+
}
|
|
6806
|
+
continue;
|
|
6744
6807
|
}
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
}
|
|
6757
|
-
|
|
6808
|
+
const request = step.message;
|
|
6809
|
+
const method = request.method;
|
|
6810
|
+
await waitFor(
|
|
6811
|
+
`earlier requests before ${method}`,
|
|
6812
|
+
() => sentRequestIds.every((id) => answeredIds.has(id))
|
|
6813
|
+
);
|
|
6814
|
+
await waitFor(
|
|
6815
|
+
`${step.gate.started} turn/started and ${step.gate.completed} turn/completed before ${method}`,
|
|
6816
|
+
() => {
|
|
6817
|
+
const live = countTurns(events);
|
|
6818
|
+
return live.started >= step.gate.started && live.completed >= step.gate.completed;
|
|
6819
|
+
}
|
|
6820
|
+
);
|
|
6821
|
+
await waitFor(
|
|
6822
|
+
`${step.eventsBefore} events before ${method}`,
|
|
6823
|
+
() => events.length >= step.eventsBefore || !exactPlan && Date.now() - lastOutputAt >= orderTimeoutMs,
|
|
6824
|
+
timeoutMs,
|
|
6825
|
+
exactPlan
|
|
6826
|
+
);
|
|
6827
|
+
await waitFor(
|
|
6828
|
+
`the stream to drain before ${method}`,
|
|
6829
|
+
() => Date.now() - lastOutputAt >= drainMs,
|
|
6830
|
+
timeoutMs,
|
|
6831
|
+
false
|
|
6832
|
+
);
|
|
6833
|
+
if (child.exitCode !== null) break;
|
|
6834
|
+
if (method === "thread/stop" && typeof request.params === "object" && request.params !== null && request.params.intent === "release") {
|
|
6835
|
+
const threadId = request.params.threadId;
|
|
6836
|
+
if (typeof threadId === "string") grammar.clearThread(threadId);
|
|
6758
6837
|
}
|
|
6759
|
-
|
|
6838
|
+
const rewritten = rewriteRecordedMachineFacts(
|
|
6839
|
+
step.entry.line,
|
|
6840
|
+
workspaceDir
|
|
6841
|
+
);
|
|
6842
|
+
const line = profile.rewriteRuntimeLine === void 0 ? rewritten : profile.rewriteRuntimeLine(rewritten, { replayCommand });
|
|
6843
|
+
lastSentRuntimeEntry = {
|
|
6844
|
+
run: step.entry.run,
|
|
6845
|
+
seq: step.entry.seq,
|
|
6846
|
+
ts: step.entry.ts
|
|
6847
|
+
};
|
|
6848
|
+
write2(line);
|
|
6849
|
+
sentRequestIds.push(String(request.id));
|
|
6850
|
+
const nextStep = steps.slice(steps.indexOf(step) + 1).find(
|
|
6851
|
+
(candidate) => candidate.message !== null && isRequest(candidate.message)
|
|
6852
|
+
);
|
|
6853
|
+
setCursor(
|
|
6854
|
+
nextStep === void 0 ? "end" : { run: nextStep.entry.run, seq: nextStep.entry.seq }
|
|
6855
|
+
);
|
|
6760
6856
|
}
|
|
6761
|
-
|
|
6762
|
-
const method = request.method;
|
|
6857
|
+
setCursor("end");
|
|
6763
6858
|
await waitFor(
|
|
6764
|
-
|
|
6859
|
+
"the last responses",
|
|
6765
6860
|
() => sentRequestIds.every((id) => answeredIds.has(id))
|
|
6766
6861
|
);
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
}
|
|
6773
|
-
);
|
|
6774
|
-
await waitFor(
|
|
6775
|
-
`${step.eventsBefore} events before ${method}`,
|
|
6776
|
-
() => events.length >= step.eventsBefore || !exactPlan && Date.now() - lastOutputAt >= orderTimeoutMs,
|
|
6777
|
-
timeoutMs,
|
|
6778
|
-
exactPlan
|
|
6779
|
-
);
|
|
6780
|
-
await waitFor(
|
|
6781
|
-
`the stream to drain before ${method}`,
|
|
6782
|
-
() => Date.now() - lastOutputAt >= drainMs,
|
|
6783
|
-
timeoutMs,
|
|
6784
|
-
false
|
|
6785
|
-
);
|
|
6786
|
-
if (child.exitCode !== null) break;
|
|
6787
|
-
if (method === "thread/stop" && typeof request.params === "object" && request.params !== null && request.params.intent === "release") {
|
|
6788
|
-
const threadId = request.params.threadId;
|
|
6789
|
-
if (typeof threadId === "string") grammar.clearThread(threadId);
|
|
6862
|
+
if (plannedEventCount !== null) {
|
|
6863
|
+
await waitFor(
|
|
6864
|
+
`all ${plannedEventCount} planned events before closing the bridge`,
|
|
6865
|
+
() => events.length >= plannedEventCount
|
|
6866
|
+
);
|
|
6790
6867
|
}
|
|
6791
|
-
const rewritten = rewriteRecordedMachineFacts(
|
|
6792
|
-
step.entry.line,
|
|
6793
|
-
workspaceDir
|
|
6794
|
-
);
|
|
6795
|
-
const line = profile.rewriteRuntimeLine === void 0 ? rewritten : profile.rewriteRuntimeLine(rewritten, { replayCommand });
|
|
6796
|
-
lastSentRuntimeEntry = {
|
|
6797
|
-
run: step.entry.run,
|
|
6798
|
-
seq: step.entry.seq,
|
|
6799
|
-
ts: step.entry.ts
|
|
6800
|
-
};
|
|
6801
|
-
write(line);
|
|
6802
|
-
sentRequestIds.push(String(request.id));
|
|
6803
|
-
const nextStep = steps.slice(steps.indexOf(step) + 1).find(
|
|
6804
|
-
(candidate) => candidate.message !== null && isRequest(candidate.message)
|
|
6805
|
-
);
|
|
6806
|
-
setCursor(
|
|
6807
|
-
nextStep === void 0 ? "end" : { run: nextStep.entry.run, seq: nextStep.entry.seq }
|
|
6808
|
-
);
|
|
6809
|
-
}
|
|
6810
|
-
setCursor("end");
|
|
6811
|
-
await waitFor(
|
|
6812
|
-
"the last responses",
|
|
6813
|
-
() => sentRequestIds.every((id) => answeredIds.has(id))
|
|
6814
|
-
);
|
|
6815
|
-
if (plannedEventCount !== null) {
|
|
6816
6868
|
await waitFor(
|
|
6817
|
-
|
|
6818
|
-
() =>
|
|
6869
|
+
"the stream to settle",
|
|
6870
|
+
() => Date.now() - lastOutputAt >= settleMs
|
|
6819
6871
|
);
|
|
6872
|
+
child.stdin?.end();
|
|
6873
|
+
let shutdownTimer;
|
|
6874
|
+
const exitCode = await Promise.race([
|
|
6875
|
+
exited,
|
|
6876
|
+
new Promise((resolveTimeout) => {
|
|
6877
|
+
shutdownTimer = setTimeout(() => {
|
|
6878
|
+
stalls.push("bridge did not exit after stdin closed; killed");
|
|
6879
|
+
child.kill("SIGKILL");
|
|
6880
|
+
resolveTimeout(null);
|
|
6881
|
+
}, timeoutMs);
|
|
6882
|
+
})
|
|
6883
|
+
]);
|
|
6884
|
+
clearTimeout(shutdownTimer);
|
|
6885
|
+
return {
|
|
6886
|
+
providerId,
|
|
6887
|
+
recordingDir: options.recordingDir,
|
|
6888
|
+
lines,
|
|
6889
|
+
lineTimes,
|
|
6890
|
+
lineAfter,
|
|
6891
|
+
events,
|
|
6892
|
+
grammarViolations,
|
|
6893
|
+
stalls,
|
|
6894
|
+
stderr,
|
|
6895
|
+
exitCode
|
|
6896
|
+
};
|
|
6897
|
+
} finally {
|
|
6898
|
+
if (spawnedChild !== void 0 && spawnedChild.pid !== void 0 && spawnedChild.exitCode === null && spawnedChild.signalCode === null) {
|
|
6899
|
+
spawnedChild.kill("SIGKILL");
|
|
6900
|
+
await childEnded;
|
|
6901
|
+
}
|
|
6902
|
+
releaseStartup();
|
|
6903
|
+
for (const directory of [stateDir, workspaceDir]) {
|
|
6904
|
+
await rm(directory, {
|
|
6905
|
+
force: true,
|
|
6906
|
+
maxRetries: REPLAY_CLEANUP_RETRIES,
|
|
6907
|
+
recursive: true,
|
|
6908
|
+
retryDelay: REPLAY_CLEANUP_RETRY_DELAY_MS
|
|
6909
|
+
});
|
|
6910
|
+
}
|
|
6820
6911
|
}
|
|
6821
|
-
await waitFor(
|
|
6822
|
-
"the stream to settle",
|
|
6823
|
-
() => Date.now() - lastOutputAt >= settleMs
|
|
6824
|
-
);
|
|
6825
|
-
child.stdin?.end();
|
|
6826
|
-
const exitCode = await Promise.race([
|
|
6827
|
-
exited,
|
|
6828
|
-
sleep(timeoutMs).then(() => {
|
|
6829
|
-
stalls.push("bridge did not exit after stdin closed; killed");
|
|
6830
|
-
child.kill("SIGKILL");
|
|
6831
|
-
return null;
|
|
6832
|
-
})
|
|
6833
|
-
]);
|
|
6834
|
-
for (const directory of [stateDir, workspaceDir]) {
|
|
6835
|
-
await rm(directory, {
|
|
6836
|
-
force: true,
|
|
6837
|
-
maxRetries: REPLAY_CLEANUP_RETRIES,
|
|
6838
|
-
recursive: true,
|
|
6839
|
-
retryDelay: REPLAY_CLEANUP_RETRY_DELAY_MS
|
|
6840
|
-
});
|
|
6841
|
-
}
|
|
6842
|
-
return {
|
|
6843
|
-
providerId,
|
|
6844
|
-
recordingDir: options.recordingDir,
|
|
6845
|
-
lines,
|
|
6846
|
-
lineTimes,
|
|
6847
|
-
lineAfter,
|
|
6848
|
-
events,
|
|
6849
|
-
grammarViolations,
|
|
6850
|
-
stalls,
|
|
6851
|
-
stderr,
|
|
6852
|
-
exitCode
|
|
6853
|
-
};
|
|
6854
6912
|
}
|
|
6855
6913
|
function assembleRecordedEvents(recording, createAssembler, providerId) {
|
|
6856
6914
|
const assembler = createAssembler(providerId);
|
package/dist/testing/app.js
CHANGED
|
@@ -1793,7 +1793,8 @@ function TestThreadChat({
|
|
|
1793
1793
|
threadId,
|
|
1794
1794
|
role: action.roles?.[0] ?? "assistant",
|
|
1795
1795
|
text: "test message text",
|
|
1796
|
-
sourceSeqEnd: 1
|
|
1796
|
+
sourceSeqEnd: 1,
|
|
1797
|
+
experimental_messageSeq: 1
|
|
1797
1798
|
});
|
|
1798
1799
|
},
|
|
1799
1800
|
children: action.title
|
|
@@ -2106,6 +2107,19 @@ function TestPermissionModePicker({
|
|
|
2106
2107
|
}
|
|
2107
2108
|
);
|
|
2108
2109
|
}
|
|
2110
|
+
function TestVoiceInputTextarea({
|
|
2111
|
+
onValueChange,
|
|
2112
|
+
onVoiceInputActiveChange: _onVoiceInputActiveChange,
|
|
2113
|
+
...props
|
|
2114
|
+
}) {
|
|
2115
|
+
return /* @__PURE__ */ jsx(
|
|
2116
|
+
"textarea",
|
|
2117
|
+
{
|
|
2118
|
+
...props,
|
|
2119
|
+
onChange: (event) => onValueChange(event.target.value)
|
|
2120
|
+
}
|
|
2121
|
+
);
|
|
2122
|
+
}
|
|
2109
2123
|
function TestSourceCode({
|
|
2110
2124
|
content,
|
|
2111
2125
|
path,
|
|
@@ -2262,6 +2276,7 @@ var testPluginSdkApp = {
|
|
|
2262
2276
|
),
|
|
2263
2277
|
UrlLink: TestUrlLink,
|
|
2264
2278
|
experimental_NewThreadComposer: TestNewThreadComposer,
|
|
2279
|
+
experimental_VoiceInputTextarea: TestVoiceInputTextarea,
|
|
2265
2280
|
experimental_ProviderModelPicker: TestProviderModelPicker,
|
|
2266
2281
|
experimental_PermissionModePicker: TestPermissionModePicker,
|
|
2267
2282
|
experimental_BranchPicker: TestBranchPicker,
|