@get-bb/plugin-sdk 0.6.39 → 0.6.43
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 +219 -2
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk.d.ts +219 -2
- package/dist/internal/plugin-app-collector.js +32 -0
- package/dist/provider-bridge-acp-next.js +97 -11
- package/dist/provider-bridge-acp.js +44 -12
- package/dist/testing/app.js +32 -0
- package/package.json +1 -1
|
@@ -10100,6 +10100,7 @@ declare const pluginMarketplaceSchema: z$1.ZodObject<{
|
|
|
10100
10100
|
https: "https";
|
|
10101
10101
|
path: "path";
|
|
10102
10102
|
}>;
|
|
10103
|
+
subdirectory: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodString>>;
|
|
10103
10104
|
}, z$1.core.$strip>;
|
|
10104
10105
|
type PluginMarketplace = z$1.infer<typeof pluginMarketplaceSchema>;
|
|
10105
10106
|
declare const pluginMarketplaceRefreshResultSchema: z$1.ZodObject<{
|
|
@@ -10120,6 +10121,7 @@ declare const pluginMarketplaceRefreshResultSchema: z$1.ZodObject<{
|
|
|
10120
10121
|
https: "https";
|
|
10121
10122
|
path: "path";
|
|
10122
10123
|
}>;
|
|
10124
|
+
subdirectory: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodString>>;
|
|
10123
10125
|
}, z$1.core.$strip>;
|
|
10124
10126
|
name: z$1.ZodString;
|
|
10125
10127
|
ok: z$1.ZodBoolean;
|
|
@@ -10350,6 +10352,7 @@ type SystemProvidersQuery = z$1.infer<typeof systemProvidersQuerySchema>;
|
|
|
10350
10352
|
declare const systemExecutionOptionsQuerySchema: z$1.ZodObject<{
|
|
10351
10353
|
environmentId: z$1.ZodOptional<z$1.ZodString>;
|
|
10352
10354
|
hostId: z$1.ZodOptional<z$1.ZodString>;
|
|
10355
|
+
projectId: z$1.ZodOptional<z$1.ZodString>;
|
|
10353
10356
|
providerId: z$1.ZodOptional<z$1.ZodString>;
|
|
10354
10357
|
}, z$1.core.$strip>;
|
|
10355
10358
|
type SystemExecutionOptionsQuery = z$1.infer<typeof systemExecutionOptionsQuerySchema>;
|
|
@@ -10476,6 +10479,108 @@ declare const testAiServiceResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObj
|
|
|
10476
10479
|
ok: z$1.ZodLiteral<false>;
|
|
10477
10480
|
}, z$1.core.$strip>], "ok">;
|
|
10478
10481
|
type TestAiServiceResponse = z$1.infer<typeof testAiServiceResponseSchema>;
|
|
10482
|
+
declare const recordTelemetryEventRequestSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
10483
|
+
name: z$1.ZodLiteral<"onboarding_agent_state">;
|
|
10484
|
+
properties: z$1.ZodObject<{
|
|
10485
|
+
agent_installed: z$1.ZodNullable<z$1.ZodBoolean>;
|
|
10486
|
+
agent_ready: z$1.ZodNullable<z$1.ZodBoolean>;
|
|
10487
|
+
entry: z$1.ZodEnum<{
|
|
10488
|
+
first_run: "first_run";
|
|
10489
|
+
replay: "replay";
|
|
10490
|
+
}>;
|
|
10491
|
+
}, z$1.core.$strict>;
|
|
10492
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10493
|
+
name: z$1.ZodLiteral<"onboarding_sign_in">;
|
|
10494
|
+
properties: z$1.ZodObject<{
|
|
10495
|
+
entry: z$1.ZodEnum<{
|
|
10496
|
+
first_run: "first_run";
|
|
10497
|
+
replay: "replay";
|
|
10498
|
+
}>;
|
|
10499
|
+
outcome: z$1.ZodEnum<{
|
|
10500
|
+
cancelled: "cancelled";
|
|
10501
|
+
exited: "exited";
|
|
10502
|
+
failed: "failed";
|
|
10503
|
+
ready: "ready";
|
|
10504
|
+
started: "started";
|
|
10505
|
+
}>;
|
|
10506
|
+
}, z$1.core.$strict>;
|
|
10507
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10508
|
+
name: z$1.ZodLiteral<"new_thread_submit">;
|
|
10509
|
+
properties: z$1.ZodObject<{
|
|
10510
|
+
outcome: z$1.ZodEnum<{
|
|
10511
|
+
accepted: "accepted";
|
|
10512
|
+
failed: "failed";
|
|
10513
|
+
started: "started";
|
|
10514
|
+
}>;
|
|
10515
|
+
}, z$1.core.$strict>;
|
|
10516
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10517
|
+
name: z$1.ZodLiteral<"onboarding_started">;
|
|
10518
|
+
properties: z$1.ZodObject<{
|
|
10519
|
+
agent_installed: z$1.ZodBoolean;
|
|
10520
|
+
agent_ready: z$1.ZodBoolean;
|
|
10521
|
+
}, z$1.core.$strict>;
|
|
10522
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10523
|
+
name: z$1.ZodLiteral<"onboarding_step_reached">;
|
|
10524
|
+
properties: z$1.ZodObject<{
|
|
10525
|
+
entry: z$1.ZodEnum<{
|
|
10526
|
+
first_run: "first_run";
|
|
10527
|
+
replay: "replay";
|
|
10528
|
+
}>;
|
|
10529
|
+
step: z$1.ZodEnum<{
|
|
10530
|
+
agent: "agent";
|
|
10531
|
+
devices: "devices";
|
|
10532
|
+
plugins: "plugins";
|
|
10533
|
+
projects: "projects";
|
|
10534
|
+
}>;
|
|
10535
|
+
}, z$1.core.$strict>;
|
|
10536
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10537
|
+
name: z$1.ZodLiteral<"onboarding_step_completed">;
|
|
10538
|
+
properties: z$1.ZodObject<{
|
|
10539
|
+
entry: z$1.ZodEnum<{
|
|
10540
|
+
first_run: "first_run";
|
|
10541
|
+
replay: "replay";
|
|
10542
|
+
}>;
|
|
10543
|
+
step: z$1.ZodEnum<{
|
|
10544
|
+
agent: "agent";
|
|
10545
|
+
devices: "devices";
|
|
10546
|
+
plugins: "plugins";
|
|
10547
|
+
projects: "projects";
|
|
10548
|
+
}>;
|
|
10549
|
+
}, z$1.core.$strict>;
|
|
10550
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10551
|
+
name: z$1.ZodLiteral<"onboarding_step_skipped">;
|
|
10552
|
+
properties: z$1.ZodObject<{
|
|
10553
|
+
entry: z$1.ZodEnum<{
|
|
10554
|
+
first_run: "first_run";
|
|
10555
|
+
replay: "replay";
|
|
10556
|
+
}>;
|
|
10557
|
+
step: z$1.ZodEnum<{
|
|
10558
|
+
agent: "agent";
|
|
10559
|
+
devices: "devices";
|
|
10560
|
+
plugins: "plugins";
|
|
10561
|
+
projects: "projects";
|
|
10562
|
+
}>;
|
|
10563
|
+
}, z$1.core.$strict>;
|
|
10564
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10565
|
+
name: z$1.ZodLiteral<"onboarding_finished">;
|
|
10566
|
+
properties: z$1.ZodObject<{
|
|
10567
|
+
entry: z$1.ZodEnum<{
|
|
10568
|
+
first_run: "first_run";
|
|
10569
|
+
replay: "replay";
|
|
10570
|
+
}>;
|
|
10571
|
+
last_step: z$1.ZodEnum<{
|
|
10572
|
+
agent: "agent";
|
|
10573
|
+
devices: "devices";
|
|
10574
|
+
plugins: "plugins";
|
|
10575
|
+
projects: "projects";
|
|
10576
|
+
}>;
|
|
10577
|
+
outcome: z$1.ZodEnum<{
|
|
10578
|
+
completed: "completed";
|
|
10579
|
+
skipped: "skipped";
|
|
10580
|
+
}>;
|
|
10581
|
+
}, z$1.core.$strict>;
|
|
10582
|
+
}, z$1.core.$strict>], "name">;
|
|
10583
|
+
type RecordTelemetryEventRequest = z$1.infer<typeof recordTelemetryEventRequestSchema>;
|
|
10479
10584
|
declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
10480
10585
|
appearance: z$1.ZodObject<{
|
|
10481
10586
|
customCss: z$1.ZodNullable<z$1.ZodString>;
|
|
@@ -10973,6 +11078,20 @@ declare const systemVersionResponseSchema: z$1.ZodObject<{
|
|
|
10973
11078
|
upgradeCommand: z$1.ZodString;
|
|
10974
11079
|
}, z$1.core.$strip>;
|
|
10975
11080
|
type SystemVersionResponse = z$1.infer<typeof systemVersionResponseSchema>;
|
|
11081
|
+
declare const systemCliCommandStatusSchema: z$1.ZodObject<{
|
|
11082
|
+
installedPath: z$1.ZodNullable<z$1.ZodString>;
|
|
11083
|
+
onPath: z$1.ZodBoolean;
|
|
11084
|
+
shadowedBy: z$1.ZodNullable<z$1.ZodObject<{
|
|
11085
|
+
path: z$1.ZodString;
|
|
11086
|
+
source: z$1.ZodEnum<{
|
|
11087
|
+
machine: "machine";
|
|
11088
|
+
npm: "npm";
|
|
11089
|
+
other: "other";
|
|
11090
|
+
}>;
|
|
11091
|
+
}, z$1.core.$strip>>;
|
|
11092
|
+
supported: z$1.ZodBoolean;
|
|
11093
|
+
}, z$1.core.$strip>;
|
|
11094
|
+
type SystemCliCommandStatus = z$1.infer<typeof systemCliCommandStatusSchema>;
|
|
10976
11095
|
declare const systemAppUpdateStatusSchema: z$1.ZodObject<{
|
|
10977
11096
|
activity: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
10978
11097
|
phase: z$1.ZodLiteral<"idle">;
|
|
@@ -17132,7 +17251,19 @@ type ProviderListArgs = ProviderHostRoutingArgs & {
|
|
|
17132
17251
|
capability?: SystemProvidersQuery["capability"];
|
|
17133
17252
|
signal?: AbortSignal;
|
|
17134
17253
|
};
|
|
17135
|
-
type ProviderModelsArgs =
|
|
17254
|
+
type ProviderModelsArgs = ({
|
|
17255
|
+
environmentId: string;
|
|
17256
|
+
hostId?: never;
|
|
17257
|
+
projectId?: never;
|
|
17258
|
+
} | {
|
|
17259
|
+
environmentId?: never;
|
|
17260
|
+
hostId: string;
|
|
17261
|
+
projectId?: string;
|
|
17262
|
+
} | {
|
|
17263
|
+
environmentId?: never;
|
|
17264
|
+
hostId?: never;
|
|
17265
|
+
projectId?: string;
|
|
17266
|
+
}) & {
|
|
17136
17267
|
providerId?: string;
|
|
17137
17268
|
signal?: AbortSignal;
|
|
17138
17269
|
};
|
|
@@ -17174,6 +17305,7 @@ interface PluginCatalogInstallPlanArgs {
|
|
|
17174
17305
|
}
|
|
17175
17306
|
interface PluginMarketplaceAddArgs {
|
|
17176
17307
|
source: string;
|
|
17308
|
+
subdirectory?: string;
|
|
17177
17309
|
}
|
|
17178
17310
|
interface PluginMarketplaceListArgs {
|
|
17179
17311
|
signal?: AbortSignal;
|
|
@@ -17535,6 +17667,10 @@ interface SystemAppUpdateArgs {
|
|
|
17535
17667
|
type SystemApplyAppUpdateArgs = SystemAppUpdateApplyRequest;
|
|
17536
17668
|
type SystemAcknowledgeAppUpdateArgs = SystemAppUpdateAcknowledgeRequest;
|
|
17537
17669
|
type SystemAppUpdateStatusResult = SystemAppUpdateStatus;
|
|
17670
|
+
interface SystemCliCommandArgs {
|
|
17671
|
+
signal?: AbortSignal;
|
|
17672
|
+
}
|
|
17673
|
+
type SystemCliCommandStatusResult = SystemCliCommandStatus;
|
|
17538
17674
|
interface SystemVoiceTranscriptionArgs {
|
|
17539
17675
|
file: Blob;
|
|
17540
17676
|
prompt?: string;
|
|
@@ -17546,6 +17682,10 @@ type SystemAiServicesResult = SystemAiServicesResponse;
|
|
|
17546
17682
|
type SystemSetAiServiceSelectionArgs = SetAiServiceSelectionRequest;
|
|
17547
17683
|
type SystemTestAiServiceArgs = TestAiServiceRequest;
|
|
17548
17684
|
type SystemTestAiServiceResult = TestAiServiceResponse;
|
|
17685
|
+
type SystemRecordTelemetryEventArgs = RecordTelemetryEventRequest;
|
|
17686
|
+
interface SystemRecordTelemetryEventResult {
|
|
17687
|
+
ok: true;
|
|
17688
|
+
}
|
|
17549
17689
|
interface SystemAiServicesArgs {
|
|
17550
17690
|
signal?: AbortSignal;
|
|
17551
17691
|
}
|
|
@@ -17601,6 +17741,7 @@ interface SystemArea {
|
|
|
17601
17741
|
executionOptions(args?: SystemExecutionOptionsArgs): Promise<SystemExecutionOptionsResult>;
|
|
17602
17742
|
cliSkillsStatus(args?: SystemCliSkillsStatusArgs): Promise<SystemCliSkillsStatusResult>;
|
|
17603
17743
|
installCliSkills(args: SystemInstallCliSkillsArgs): Promise<SystemInstallCliSkillsResult>;
|
|
17744
|
+
experimental_recordTelemetryEvent(args: SystemRecordTelemetryEventArgs): Promise<SystemRecordTelemetryEventResult>;
|
|
17604
17745
|
reloadConfig(): Promise<SystemReloadConfigResult>;
|
|
17605
17746
|
setAiServiceSelection(args: SystemSetAiServiceSelectionArgs): Promise<SystemAiServicesResult>;
|
|
17606
17747
|
testAiService(args: SystemTestAiServiceArgs): Promise<SystemTestAiServiceResult>;
|
|
@@ -17617,6 +17758,9 @@ interface SystemArea {
|
|
|
17617
17758
|
appUpdate(args?: SystemAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
|
|
17618
17759
|
applyAppUpdate(args: SystemApplyAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
|
|
17619
17760
|
acknowledgeAppUpdate(args: SystemAcknowledgeAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
|
|
17761
|
+
experimental_cliCommand(args?: SystemCliCommandArgs): Promise<SystemCliCommandStatusResult>;
|
|
17762
|
+
experimental_installCliCommand(): Promise<SystemCliCommandStatusResult>;
|
|
17763
|
+
experimental_removeCliCommand(): Promise<SystemCliCommandStatusResult>;
|
|
17620
17764
|
}
|
|
17621
17765
|
|
|
17622
17766
|
interface TerminalThreadScope {
|
|
@@ -18652,6 +18796,49 @@ interface PluginMessageDirectiveProps {
|
|
|
18652
18796
|
*/
|
|
18653
18797
|
openWorkspaceFile: PluginMessageDirectiveOpenWorkspaceFile | null;
|
|
18654
18798
|
}
|
|
18799
|
+
/**
|
|
18800
|
+
* Where a fenced code block stands while its message is written.
|
|
18801
|
+
*
|
|
18802
|
+
* - `"streaming"`: the closing delimiter has not arrived and the message is
|
|
18803
|
+
* still being written; `code` is a prefix of the final body.
|
|
18804
|
+
* - `"closed"`: the closing delimiter is present; `code` is final.
|
|
18805
|
+
* - `"unclosed"`: the message ended without a closing delimiter (for example
|
|
18806
|
+
* an interrupted reply); `code` will not grow.
|
|
18807
|
+
*
|
|
18808
|
+
* @experimental Audit before relying on this as a stable contract.
|
|
18809
|
+
*/
|
|
18810
|
+
type ExperimentalCodeFenceStatus = "closed" | "streaming" | "unclosed";
|
|
18811
|
+
/**
|
|
18812
|
+
* Props passed to an `experimental_codeFenceRenderer` component — one fenced
|
|
18813
|
+
* code block whose info-string language the plugin claimed, inside assistant
|
|
18814
|
+
* (or nested agent) message Markdown. BB mounts the component once per fence
|
|
18815
|
+
* and keeps that instance for as long as the message stays on screen, so
|
|
18816
|
+
* component state survives the whole stream, including the moment the fence
|
|
18817
|
+
* closes and the moment the reply finishes.
|
|
18818
|
+
*
|
|
18819
|
+
* @experimental Audit before relying on this as a stable contract.
|
|
18820
|
+
*/
|
|
18821
|
+
interface ExperimentalCodeFenceRendererProps {
|
|
18822
|
+
/** The fence body received so far, without the fence delimiters. */
|
|
18823
|
+
code: string;
|
|
18824
|
+
/** The matched lowercase info-string language (e.g. `"ui"`). */
|
|
18825
|
+
language: string;
|
|
18826
|
+
status: ExperimentalCodeFenceStatus;
|
|
18827
|
+
/**
|
|
18828
|
+
* Zero-based ordinal of this fence among the fences of the same language in
|
|
18829
|
+
* the same message. It does not change while the message streams, so
|
|
18830
|
+
* `${message.id}#${language}#${index}` keys state that must outlive the
|
|
18831
|
+
* mounted component (a reload, or the message scrolling out of the rendered
|
|
18832
|
+
* window).
|
|
18833
|
+
*/
|
|
18834
|
+
index: number;
|
|
18835
|
+
message: PluginMessageDirectiveMessage;
|
|
18836
|
+
/**
|
|
18837
|
+
* BB's own code block for this fence. Render it to show the source, for
|
|
18838
|
+
* example while `status` is `"streaming"` or when `code` does not parse.
|
|
18839
|
+
*/
|
|
18840
|
+
Original: ComponentType;
|
|
18841
|
+
}
|
|
18655
18842
|
interface PluginHomepageSectionRegistration {
|
|
18656
18843
|
/** Unique within the plugin; letters, digits, `-`, `_`. */
|
|
18657
18844
|
id: string;
|
|
@@ -19768,6 +19955,30 @@ interface PluginMessageDirectiveRegistration {
|
|
|
19768
19955
|
id: string;
|
|
19769
19956
|
component: ComponentType<PluginMessageDirectiveProps>;
|
|
19770
19957
|
}
|
|
19958
|
+
/**
|
|
19959
|
+
* Render fenced code blocks of chosen languages inside assistant (and nested
|
|
19960
|
+
* agent) message Markdown. ` ```ui ` matches a registration whose `languages`
|
|
19961
|
+
* include `"ui"`. Fences elsewhere (user messages, file previews, plugin
|
|
19962
|
+
* Markdown) keep BB's code block.
|
|
19963
|
+
*
|
|
19964
|
+
* BB's code block also renders when two plugins claim the same language (BB
|
|
19965
|
+
* logs a warning naming them), when the plugin is disabled, and for a fence
|
|
19966
|
+
* whose component throws. A throw affects that fence only, and BB tries the
|
|
19967
|
+
* component again when the fence's `code` or `status` changes.
|
|
19968
|
+
*
|
|
19969
|
+
* @experimental Audit before relying on this as a stable contract.
|
|
19970
|
+
*/
|
|
19971
|
+
interface ExperimentalCodeFenceRendererRegistration {
|
|
19972
|
+
/** Unique within the plugin; letters, digits, `-`, `_`. */
|
|
19973
|
+
id: string;
|
|
19974
|
+
/**
|
|
19975
|
+
* Lowercase info-string languages, e.g. `["ui", "app"]`. Each starts with a
|
|
19976
|
+
* letter or digit and contains only `a-z`, `0-9`, `+`, `#`, `.`, `_`, `-`.
|
|
19977
|
+
* A language may be claimed once per plugin.
|
|
19978
|
+
*/
|
|
19979
|
+
languages: readonly string[];
|
|
19980
|
+
component: ComponentType<ExperimentalCodeFenceRendererProps>;
|
|
19981
|
+
}
|
|
19771
19982
|
/**
|
|
19772
19983
|
* A narrow, stable reference to one rendered chat message — NOT an internal
|
|
19773
19984
|
* timeline row. `sourceSeqEnd` is the last source event sequence the message
|
|
@@ -20177,6 +20388,12 @@ interface PluginAppSlots {
|
|
|
20177
20388
|
*/
|
|
20178
20389
|
experimental_diffRenderer(registration: PluginDiffRendererRegistration): void;
|
|
20179
20390
|
messageDirective(registration: PluginMessageDirectiveRegistration): void;
|
|
20391
|
+
/**
|
|
20392
|
+
* Render fenced code blocks of chosen languages in assistant messages (see
|
|
20393
|
+
* {@link ExperimentalCodeFenceRendererRegistration}). Experimental: see
|
|
20394
|
+
* docs/api_to_audit.md.
|
|
20395
|
+
*/
|
|
20396
|
+
experimental_codeFenceRenderer(registration: ExperimentalCodeFenceRendererRegistration): void;
|
|
20180
20397
|
messageAction(registration: PluginMessageActionRegistration): void;
|
|
20181
20398
|
/**
|
|
20182
20399
|
* @deprecated Use `app.commands.register` with the same registration.
|
|
@@ -21693,4 +21910,4 @@ declare const experimental_useCodeTheme: () => PluginCodeThemeState;
|
|
|
21693
21910
|
declare const experimental_copyToClipboard: (content: ExperimentalClipboardContent) => Promise<boolean>;
|
|
21694
21911
|
|
|
21695
21912
|
export { Markdown, ThreadChat, ThreadTitle, UrlLink, definePluginApp, experimental_BranchPicker, experimental_Diff, experimental_FileLink, experimental_Icon, experimental_NewThreadComposer, experimental_PermissionModePicker, experimental_ProviderIcon, experimental_ProviderModelPicker, experimental_SourceCode, experimental_THREAD_ACTION_GROUPS, experimental_ThreadActionsContextMenu, experimental_ThreadActionsMenu, experimental_ThreadStatusGlyph, experimental_VoiceInputTextarea, experimental_copyToClipboard, experimental_useAppPanel, experimental_useArchiveEnvironmentThreads, experimental_useBranches, experimental_useCheckoutState, experimental_useCodeTheme, experimental_useFixedTabTarget, experimental_usePluginId, experimental_useProviders, experimental_useQuestionFormHost, experimental_useSidebarThreadPullRequest, experimental_useSidebarThreadSplit, experimental_useSidebarThreads, experimental_useThreadActionRegistrations, experimental_useThreadActions, useBbContext, useBbNavigate, useComposer, useComposers, useEnvironmentProviders, useRealtime, useRealtimeConnectionState, useRpc, useSdk, useSettings, useSidebarSplitLayout, useSidebarThreadDraft, useSidebarThreadDraftIds, useSidebarThreadRowStatus, useSidebarThreadRowStatuses, useSidebarThreadShortcut };
|
|
21696
|
-
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, ExperimentalClipboardContent, 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, ExperimentalVoiceInputTextareaProps, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBoundThreadAction, 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, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadAction, PluginThreadActionChoice, PluginThreadActionChoices, PluginThreadActionDataInput, PluginThreadActionEntry, PluginThreadActionItemInput, PluginThreadActionRegistration, PluginThreadActionRegistrationInfo, PluginThreadActionRunInput, PluginThreadActionTarget, PluginThreadActionsContextMenuProps, PluginThreadActionsInlineItem, PluginThreadActionsMenuProps, PluginThreadActionsOptions, PluginThreadActionsTriggerProps, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadStatusGlyphProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, ReadonlyJsonValue, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|
|
21913
|
+
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, ExperimentalClipboardContent, ExperimentalCodeFenceRendererProps, ExperimentalCodeFenceRendererRegistration, ExperimentalCodeFenceStatus, 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, ExperimentalVoiceInputTextareaProps, JsonValue$1 as JsonValue, MarkdownProps, NewThreadComposerProps, NewThreadRequest, PluginAppBuilder, PluginAppCommands, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBoundThreadAction, 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, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginTargetedPanelActionOpenOptions, PluginThreadAction, PluginThreadActionChoice, PluginThreadActionChoices, PluginThreadActionDataInput, PluginThreadActionEntry, PluginThreadActionItemInput, PluginThreadActionRegistration, PluginThreadActionRegistrationInfo, PluginThreadActionRunInput, PluginThreadActionTarget, PluginThreadActionsContextMenuProps, PluginThreadActionsInlineItem, PluginThreadActionsMenuProps, PluginThreadActionsOptions, PluginThreadActionsTriggerProps, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadStatusGlyphProps, 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 { z } from 'zod';
|
|
9
|
-
import { ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterItemRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginCommandRegistration, ExperimentalComposerCommandRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
|
|
9
|
+
import { ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterItemRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, PluginCommandRegistration, ExperimentalComposerCommandRegistration, PluginProviderIconRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginAppDefinition } from '@get-bb/plugin-sdk';
|
|
10
10
|
|
|
11
11
|
type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
|
|
12
12
|
interface ExperimentalSidebarFooterRuntimeSnapshot {
|
|
@@ -76,6 +76,7 @@ interface CollectedPluginAppRegistrations {
|
|
|
76
76
|
sourceCodeRenderers: PluginSourceCodeRendererRegistration[];
|
|
77
77
|
diffRenderers: PluginDiffRendererRegistration[];
|
|
78
78
|
messageDirectives: PluginMessageDirectiveRegistration[];
|
|
79
|
+
codeFenceRenderers: ExperimentalCodeFenceRendererRegistration[];
|
|
79
80
|
messageActions: PluginMessageActionRegistration[];
|
|
80
81
|
commandPaletteActions: CollectedPluginCommandRegistration[];
|
|
81
82
|
providerIcons: CollectedPluginProviderIconRegistration[];
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { ReactNode, ComponentType } from 'react';
|
|
9
9
|
import { RenderResult } from '@testing-library/react';
|
|
10
|
-
import { ExperimentalSidebarFooterItemRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState } from '@get-bb/plugin-sdk';
|
|
10
|
+
import { ExperimentalSidebarFooterItemRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState } from '@get-bb/plugin-sdk';
|
|
11
11
|
|
|
12
12
|
type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
|
|
13
13
|
interface ExperimentalSidebarFooterRuntimeSnapshot {
|
|
@@ -191,6 +191,7 @@ interface CapturedPluginApp {
|
|
|
191
191
|
sourceCodeRenderers: PluginSourceCodeRendererRegistration[];
|
|
192
192
|
diffRenderers: PluginDiffRendererRegistration[];
|
|
193
193
|
messageDirectives: PluginMessageDirectiveRegistration[];
|
|
194
|
+
codeFenceRenderers: ExperimentalCodeFenceRendererRegistration[];
|
|
194
195
|
messageActions: PluginMessageActionRegistration[];
|
|
195
196
|
providerIcons: CollectedPluginProviderIconRegistration[];
|
|
196
197
|
icons: ExperimentalIconRegistration[];
|
|
@@ -10159,6 +10159,7 @@ declare const pluginMarketplaceSchema: z$1.ZodObject<{
|
|
|
10159
10159
|
https: "https";
|
|
10160
10160
|
path: "path";
|
|
10161
10161
|
}>;
|
|
10162
|
+
subdirectory: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodString>>;
|
|
10162
10163
|
}, z$1.core.$strip>;
|
|
10163
10164
|
type PluginMarketplace = z$1.infer<typeof pluginMarketplaceSchema>;
|
|
10164
10165
|
declare const pluginMarketplaceRefreshResultSchema: z$1.ZodObject<{
|
|
@@ -10179,6 +10180,7 @@ declare const pluginMarketplaceRefreshResultSchema: z$1.ZodObject<{
|
|
|
10179
10180
|
https: "https";
|
|
10180
10181
|
path: "path";
|
|
10181
10182
|
}>;
|
|
10183
|
+
subdirectory: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodString>>;
|
|
10182
10184
|
}, z$1.core.$strip>;
|
|
10183
10185
|
name: z$1.ZodString;
|
|
10184
10186
|
ok: z$1.ZodBoolean;
|
|
@@ -10409,6 +10411,7 @@ type SystemProvidersQuery = z$1.infer<typeof systemProvidersQuerySchema>;
|
|
|
10409
10411
|
declare const systemExecutionOptionsQuerySchema: z$1.ZodObject<{
|
|
10410
10412
|
environmentId: z$1.ZodOptional<z$1.ZodString>;
|
|
10411
10413
|
hostId: z$1.ZodOptional<z$1.ZodString>;
|
|
10414
|
+
projectId: z$1.ZodOptional<z$1.ZodString>;
|
|
10412
10415
|
providerId: z$1.ZodOptional<z$1.ZodString>;
|
|
10413
10416
|
}, z$1.core.$strip>;
|
|
10414
10417
|
type SystemExecutionOptionsQuery = z$1.infer<typeof systemExecutionOptionsQuerySchema>;
|
|
@@ -10535,6 +10538,108 @@ declare const testAiServiceResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObj
|
|
|
10535
10538
|
ok: z$1.ZodLiteral<false>;
|
|
10536
10539
|
}, z$1.core.$strip>], "ok">;
|
|
10537
10540
|
type TestAiServiceResponse = z$1.infer<typeof testAiServiceResponseSchema>;
|
|
10541
|
+
declare const recordTelemetryEventRequestSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
10542
|
+
name: z$1.ZodLiteral<"onboarding_agent_state">;
|
|
10543
|
+
properties: z$1.ZodObject<{
|
|
10544
|
+
agent_installed: z$1.ZodNullable<z$1.ZodBoolean>;
|
|
10545
|
+
agent_ready: z$1.ZodNullable<z$1.ZodBoolean>;
|
|
10546
|
+
entry: z$1.ZodEnum<{
|
|
10547
|
+
first_run: "first_run";
|
|
10548
|
+
replay: "replay";
|
|
10549
|
+
}>;
|
|
10550
|
+
}, z$1.core.$strict>;
|
|
10551
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10552
|
+
name: z$1.ZodLiteral<"onboarding_sign_in">;
|
|
10553
|
+
properties: z$1.ZodObject<{
|
|
10554
|
+
entry: z$1.ZodEnum<{
|
|
10555
|
+
first_run: "first_run";
|
|
10556
|
+
replay: "replay";
|
|
10557
|
+
}>;
|
|
10558
|
+
outcome: z$1.ZodEnum<{
|
|
10559
|
+
cancelled: "cancelled";
|
|
10560
|
+
exited: "exited";
|
|
10561
|
+
failed: "failed";
|
|
10562
|
+
ready: "ready";
|
|
10563
|
+
started: "started";
|
|
10564
|
+
}>;
|
|
10565
|
+
}, z$1.core.$strict>;
|
|
10566
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10567
|
+
name: z$1.ZodLiteral<"new_thread_submit">;
|
|
10568
|
+
properties: z$1.ZodObject<{
|
|
10569
|
+
outcome: z$1.ZodEnum<{
|
|
10570
|
+
accepted: "accepted";
|
|
10571
|
+
failed: "failed";
|
|
10572
|
+
started: "started";
|
|
10573
|
+
}>;
|
|
10574
|
+
}, z$1.core.$strict>;
|
|
10575
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10576
|
+
name: z$1.ZodLiteral<"onboarding_started">;
|
|
10577
|
+
properties: z$1.ZodObject<{
|
|
10578
|
+
agent_installed: z$1.ZodBoolean;
|
|
10579
|
+
agent_ready: z$1.ZodBoolean;
|
|
10580
|
+
}, z$1.core.$strict>;
|
|
10581
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10582
|
+
name: z$1.ZodLiteral<"onboarding_step_reached">;
|
|
10583
|
+
properties: z$1.ZodObject<{
|
|
10584
|
+
entry: z$1.ZodEnum<{
|
|
10585
|
+
first_run: "first_run";
|
|
10586
|
+
replay: "replay";
|
|
10587
|
+
}>;
|
|
10588
|
+
step: z$1.ZodEnum<{
|
|
10589
|
+
agent: "agent";
|
|
10590
|
+
devices: "devices";
|
|
10591
|
+
plugins: "plugins";
|
|
10592
|
+
projects: "projects";
|
|
10593
|
+
}>;
|
|
10594
|
+
}, z$1.core.$strict>;
|
|
10595
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10596
|
+
name: z$1.ZodLiteral<"onboarding_step_completed">;
|
|
10597
|
+
properties: z$1.ZodObject<{
|
|
10598
|
+
entry: z$1.ZodEnum<{
|
|
10599
|
+
first_run: "first_run";
|
|
10600
|
+
replay: "replay";
|
|
10601
|
+
}>;
|
|
10602
|
+
step: z$1.ZodEnum<{
|
|
10603
|
+
agent: "agent";
|
|
10604
|
+
devices: "devices";
|
|
10605
|
+
plugins: "plugins";
|
|
10606
|
+
projects: "projects";
|
|
10607
|
+
}>;
|
|
10608
|
+
}, z$1.core.$strict>;
|
|
10609
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10610
|
+
name: z$1.ZodLiteral<"onboarding_step_skipped">;
|
|
10611
|
+
properties: z$1.ZodObject<{
|
|
10612
|
+
entry: z$1.ZodEnum<{
|
|
10613
|
+
first_run: "first_run";
|
|
10614
|
+
replay: "replay";
|
|
10615
|
+
}>;
|
|
10616
|
+
step: z$1.ZodEnum<{
|
|
10617
|
+
agent: "agent";
|
|
10618
|
+
devices: "devices";
|
|
10619
|
+
plugins: "plugins";
|
|
10620
|
+
projects: "projects";
|
|
10621
|
+
}>;
|
|
10622
|
+
}, z$1.core.$strict>;
|
|
10623
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
10624
|
+
name: z$1.ZodLiteral<"onboarding_finished">;
|
|
10625
|
+
properties: z$1.ZodObject<{
|
|
10626
|
+
entry: z$1.ZodEnum<{
|
|
10627
|
+
first_run: "first_run";
|
|
10628
|
+
replay: "replay";
|
|
10629
|
+
}>;
|
|
10630
|
+
last_step: z$1.ZodEnum<{
|
|
10631
|
+
agent: "agent";
|
|
10632
|
+
devices: "devices";
|
|
10633
|
+
plugins: "plugins";
|
|
10634
|
+
projects: "projects";
|
|
10635
|
+
}>;
|
|
10636
|
+
outcome: z$1.ZodEnum<{
|
|
10637
|
+
completed: "completed";
|
|
10638
|
+
skipped: "skipped";
|
|
10639
|
+
}>;
|
|
10640
|
+
}, z$1.core.$strict>;
|
|
10641
|
+
}, z$1.core.$strict>], "name">;
|
|
10642
|
+
type RecordTelemetryEventRequest = z$1.infer<typeof recordTelemetryEventRequestSchema>;
|
|
10538
10643
|
declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
10539
10644
|
appearance: z$1.ZodObject<{
|
|
10540
10645
|
customCss: z$1.ZodNullable<z$1.ZodString>;
|
|
@@ -11032,6 +11137,20 @@ declare const systemVersionResponseSchema: z$1.ZodObject<{
|
|
|
11032
11137
|
upgradeCommand: z$1.ZodString;
|
|
11033
11138
|
}, z$1.core.$strip>;
|
|
11034
11139
|
type SystemVersionResponse = z$1.infer<typeof systemVersionResponseSchema>;
|
|
11140
|
+
declare const systemCliCommandStatusSchema: z$1.ZodObject<{
|
|
11141
|
+
installedPath: z$1.ZodNullable<z$1.ZodString>;
|
|
11142
|
+
onPath: z$1.ZodBoolean;
|
|
11143
|
+
shadowedBy: z$1.ZodNullable<z$1.ZodObject<{
|
|
11144
|
+
path: z$1.ZodString;
|
|
11145
|
+
source: z$1.ZodEnum<{
|
|
11146
|
+
machine: "machine";
|
|
11147
|
+
npm: "npm";
|
|
11148
|
+
other: "other";
|
|
11149
|
+
}>;
|
|
11150
|
+
}, z$1.core.$strip>>;
|
|
11151
|
+
supported: z$1.ZodBoolean;
|
|
11152
|
+
}, z$1.core.$strip>;
|
|
11153
|
+
type SystemCliCommandStatus = z$1.infer<typeof systemCliCommandStatusSchema>;
|
|
11035
11154
|
declare const systemAppUpdateStatusSchema: z$1.ZodObject<{
|
|
11036
11155
|
activity: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
11037
11156
|
phase: z$1.ZodLiteral<"idle">;
|
|
@@ -17203,7 +17322,19 @@ type ProviderListArgs = ProviderHostRoutingArgs & {
|
|
|
17203
17322
|
capability?: SystemProvidersQuery["capability"];
|
|
17204
17323
|
signal?: AbortSignal;
|
|
17205
17324
|
};
|
|
17206
|
-
type ProviderModelsArgs =
|
|
17325
|
+
type ProviderModelsArgs = ({
|
|
17326
|
+
environmentId: string;
|
|
17327
|
+
hostId?: never;
|
|
17328
|
+
projectId?: never;
|
|
17329
|
+
} | {
|
|
17330
|
+
environmentId?: never;
|
|
17331
|
+
hostId: string;
|
|
17332
|
+
projectId?: string;
|
|
17333
|
+
} | {
|
|
17334
|
+
environmentId?: never;
|
|
17335
|
+
hostId?: never;
|
|
17336
|
+
projectId?: string;
|
|
17337
|
+
}) & {
|
|
17207
17338
|
providerId?: string;
|
|
17208
17339
|
signal?: AbortSignal;
|
|
17209
17340
|
};
|
|
@@ -17245,6 +17376,7 @@ interface PluginCatalogInstallPlanArgs {
|
|
|
17245
17376
|
}
|
|
17246
17377
|
interface PluginMarketplaceAddArgs {
|
|
17247
17378
|
source: string;
|
|
17379
|
+
subdirectory?: string;
|
|
17248
17380
|
}
|
|
17249
17381
|
interface PluginMarketplaceListArgs {
|
|
17250
17382
|
signal?: AbortSignal;
|
|
@@ -17606,6 +17738,10 @@ interface SystemAppUpdateArgs {
|
|
|
17606
17738
|
type SystemApplyAppUpdateArgs = SystemAppUpdateApplyRequest;
|
|
17607
17739
|
type SystemAcknowledgeAppUpdateArgs = SystemAppUpdateAcknowledgeRequest;
|
|
17608
17740
|
type SystemAppUpdateStatusResult = SystemAppUpdateStatus;
|
|
17741
|
+
interface SystemCliCommandArgs {
|
|
17742
|
+
signal?: AbortSignal;
|
|
17743
|
+
}
|
|
17744
|
+
type SystemCliCommandStatusResult = SystemCliCommandStatus;
|
|
17609
17745
|
interface SystemVoiceTranscriptionArgs {
|
|
17610
17746
|
file: Blob;
|
|
17611
17747
|
prompt?: string;
|
|
@@ -17617,6 +17753,10 @@ type SystemAiServicesResult = SystemAiServicesResponse;
|
|
|
17617
17753
|
type SystemSetAiServiceSelectionArgs = SetAiServiceSelectionRequest;
|
|
17618
17754
|
type SystemTestAiServiceArgs = TestAiServiceRequest;
|
|
17619
17755
|
type SystemTestAiServiceResult = TestAiServiceResponse;
|
|
17756
|
+
type SystemRecordTelemetryEventArgs = RecordTelemetryEventRequest;
|
|
17757
|
+
interface SystemRecordTelemetryEventResult {
|
|
17758
|
+
ok: true;
|
|
17759
|
+
}
|
|
17620
17760
|
interface SystemAiServicesArgs {
|
|
17621
17761
|
signal?: AbortSignal;
|
|
17622
17762
|
}
|
|
@@ -17672,6 +17812,7 @@ interface SystemArea {
|
|
|
17672
17812
|
executionOptions(args?: SystemExecutionOptionsArgs): Promise<SystemExecutionOptionsResult>;
|
|
17673
17813
|
cliSkillsStatus(args?: SystemCliSkillsStatusArgs): Promise<SystemCliSkillsStatusResult>;
|
|
17674
17814
|
installCliSkills(args: SystemInstallCliSkillsArgs): Promise<SystemInstallCliSkillsResult>;
|
|
17815
|
+
experimental_recordTelemetryEvent(args: SystemRecordTelemetryEventArgs): Promise<SystemRecordTelemetryEventResult>;
|
|
17675
17816
|
reloadConfig(): Promise<SystemReloadConfigResult>;
|
|
17676
17817
|
setAiServiceSelection(args: SystemSetAiServiceSelectionArgs): Promise<SystemAiServicesResult>;
|
|
17677
17818
|
testAiService(args: SystemTestAiServiceArgs): Promise<SystemTestAiServiceResult>;
|
|
@@ -17688,6 +17829,9 @@ interface SystemArea {
|
|
|
17688
17829
|
appUpdate(args?: SystemAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
|
|
17689
17830
|
applyAppUpdate(args: SystemApplyAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
|
|
17690
17831
|
acknowledgeAppUpdate(args: SystemAcknowledgeAppUpdateArgs): Promise<SystemAppUpdateStatusResult>;
|
|
17832
|
+
experimental_cliCommand(args?: SystemCliCommandArgs): Promise<SystemCliCommandStatusResult>;
|
|
17833
|
+
experimental_installCliCommand(): Promise<SystemCliCommandStatusResult>;
|
|
17834
|
+
experimental_removeCliCommand(): Promise<SystemCliCommandStatusResult>;
|
|
17691
17835
|
}
|
|
17692
17836
|
|
|
17693
17837
|
interface TerminalThreadScope {
|
|
@@ -18836,6 +18980,49 @@ interface PluginMessageDirectiveProps {
|
|
|
18836
18980
|
*/
|
|
18837
18981
|
openWorkspaceFile: PluginMessageDirectiveOpenWorkspaceFile | null;
|
|
18838
18982
|
}
|
|
18983
|
+
/**
|
|
18984
|
+
* Where a fenced code block stands while its message is written.
|
|
18985
|
+
*
|
|
18986
|
+
* - `"streaming"`: the closing delimiter has not arrived and the message is
|
|
18987
|
+
* still being written; `code` is a prefix of the final body.
|
|
18988
|
+
* - `"closed"`: the closing delimiter is present; `code` is final.
|
|
18989
|
+
* - `"unclosed"`: the message ended without a closing delimiter (for example
|
|
18990
|
+
* an interrupted reply); `code` will not grow.
|
|
18991
|
+
*
|
|
18992
|
+
* @experimental Audit before relying on this as a stable contract.
|
|
18993
|
+
*/
|
|
18994
|
+
type ExperimentalCodeFenceStatus = "closed" | "streaming" | "unclosed";
|
|
18995
|
+
/**
|
|
18996
|
+
* Props passed to an `experimental_codeFenceRenderer` component — one fenced
|
|
18997
|
+
* code block whose info-string language the plugin claimed, inside assistant
|
|
18998
|
+
* (or nested agent) message Markdown. BB mounts the component once per fence
|
|
18999
|
+
* and keeps that instance for as long as the message stays on screen, so
|
|
19000
|
+
* component state survives the whole stream, including the moment the fence
|
|
19001
|
+
* closes and the moment the reply finishes.
|
|
19002
|
+
*
|
|
19003
|
+
* @experimental Audit before relying on this as a stable contract.
|
|
19004
|
+
*/
|
|
19005
|
+
interface ExperimentalCodeFenceRendererProps {
|
|
19006
|
+
/** The fence body received so far, without the fence delimiters. */
|
|
19007
|
+
code: string;
|
|
19008
|
+
/** The matched lowercase info-string language (e.g. `"ui"`). */
|
|
19009
|
+
language: string;
|
|
19010
|
+
status: ExperimentalCodeFenceStatus;
|
|
19011
|
+
/**
|
|
19012
|
+
* Zero-based ordinal of this fence among the fences of the same language in
|
|
19013
|
+
* the same message. It does not change while the message streams, so
|
|
19014
|
+
* `${message.id}#${language}#${index}` keys state that must outlive the
|
|
19015
|
+
* mounted component (a reload, or the message scrolling out of the rendered
|
|
19016
|
+
* window).
|
|
19017
|
+
*/
|
|
19018
|
+
index: number;
|
|
19019
|
+
message: PluginMessageDirectiveMessage;
|
|
19020
|
+
/**
|
|
19021
|
+
* BB's own code block for this fence. Render it to show the source, for
|
|
19022
|
+
* example while `status` is `"streaming"` or when `code` does not parse.
|
|
19023
|
+
*/
|
|
19024
|
+
Original: ComponentType;
|
|
19025
|
+
}
|
|
18839
19026
|
interface PluginHomepageSectionRegistration {
|
|
18840
19027
|
/** Unique within the plugin; letters, digits, `-`, `_`. */
|
|
18841
19028
|
id: string;
|
|
@@ -19952,6 +20139,30 @@ interface PluginMessageDirectiveRegistration {
|
|
|
19952
20139
|
id: string;
|
|
19953
20140
|
component: ComponentType<PluginMessageDirectiveProps>;
|
|
19954
20141
|
}
|
|
20142
|
+
/**
|
|
20143
|
+
* Render fenced code blocks of chosen languages inside assistant (and nested
|
|
20144
|
+
* agent) message Markdown. ` ```ui ` matches a registration whose `languages`
|
|
20145
|
+
* include `"ui"`. Fences elsewhere (user messages, file previews, plugin
|
|
20146
|
+
* Markdown) keep BB's code block.
|
|
20147
|
+
*
|
|
20148
|
+
* BB's code block also renders when two plugins claim the same language (BB
|
|
20149
|
+
* logs a warning naming them), when the plugin is disabled, and for a fence
|
|
20150
|
+
* whose component throws. A throw affects that fence only, and BB tries the
|
|
20151
|
+
* component again when the fence's `code` or `status` changes.
|
|
20152
|
+
*
|
|
20153
|
+
* @experimental Audit before relying on this as a stable contract.
|
|
20154
|
+
*/
|
|
20155
|
+
interface ExperimentalCodeFenceRendererRegistration {
|
|
20156
|
+
/** Unique within the plugin; letters, digits, `-`, `_`. */
|
|
20157
|
+
id: string;
|
|
20158
|
+
/**
|
|
20159
|
+
* Lowercase info-string languages, e.g. `["ui", "app"]`. Each starts with a
|
|
20160
|
+
* letter or digit and contains only `a-z`, `0-9`, `+`, `#`, `.`, `_`, `-`.
|
|
20161
|
+
* A language may be claimed once per plugin.
|
|
20162
|
+
*/
|
|
20163
|
+
languages: readonly string[];
|
|
20164
|
+
component: ComponentType<ExperimentalCodeFenceRendererProps>;
|
|
20165
|
+
}
|
|
19955
20166
|
/**
|
|
19956
20167
|
* A narrow, stable reference to one rendered chat message — NOT an internal
|
|
19957
20168
|
* timeline row. `sourceSeqEnd` is the last source event sequence the message
|
|
@@ -20361,6 +20572,12 @@ interface PluginAppSlots {
|
|
|
20361
20572
|
*/
|
|
20362
20573
|
experimental_diffRenderer(registration: PluginDiffRendererRegistration): void;
|
|
20363
20574
|
messageDirective(registration: PluginMessageDirectiveRegistration): void;
|
|
20575
|
+
/**
|
|
20576
|
+
* Render fenced code blocks of chosen languages in assistant messages (see
|
|
20577
|
+
* {@link ExperimentalCodeFenceRendererRegistration}). Experimental: see
|
|
20578
|
+
* docs/api_to_audit.md.
|
|
20579
|
+
*/
|
|
20580
|
+
experimental_codeFenceRenderer(registration: ExperimentalCodeFenceRendererRegistration): void;
|
|
20364
20581
|
messageAction(registration: PluginMessageActionRegistration): void;
|
|
20365
20582
|
/**
|
|
20366
20583
|
* @deprecated Use `app.commands.register` with the same registration.
|
|
@@ -24261,4 +24478,4 @@ declare const experimental_THREAD_ACTION_GROUPS: {
|
|
|
24261
24478
|
};
|
|
24262
24479
|
|
|
24263
24480
|
export { PLUGIN_CLI_OUTPUT_MAX_BYTES, PluginCliError, cliCommand, defineCli, defineRpcContract, experimental_THREAD_ACTION_GROUPS, experimental_defineHostEntry };
|
|
24264
|
-
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, ExperimentalClipboardContent, 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, 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, PluginBoundThreadAction, 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, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadAction, PluginThreadActionChoice, PluginThreadActionChoices, PluginThreadActionDataInput, PluginThreadActionEntry, PluginThreadActionItemInput, PluginThreadActionRegistration, PluginThreadActionRegistrationInfo, PluginThreadActionRunInput, PluginThreadActionTarget, PluginThreadActionsContextMenuProps, PluginThreadActionsInlineItem, PluginThreadActionsMenuProps, PluginThreadActionsOptions, PluginThreadActionsTriggerProps, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadStatusGlyphProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, ReadonlyJsonValue, ServerAccessGrant, ServerAccessProviderDeclaration, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|
|
24481
|
+
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, ExperimentalClipboardContent, ExperimentalCodeFenceRendererProps, ExperimentalCodeFenceRendererRegistration, ExperimentalCodeFenceStatus, 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, 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, PluginBoundThreadAction, 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, PluginSidebarThreadActivity, PluginSidebarThreadDraftState, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadAction, PluginThreadActionChoice, PluginThreadActionChoices, PluginThreadActionDataInput, PluginThreadActionEntry, PluginThreadActionItemInput, PluginThreadActionRegistration, PluginThreadActionRegistrationInfo, PluginThreadActionRunInput, PluginThreadActionTarget, PluginThreadActionsContextMenuProps, PluginThreadActionsInlineItem, PluginThreadActionsMenuProps, PluginThreadActionsOptions, PluginThreadActionsTriggerProps, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginThreadStatusGlyphProps, PluginThreadTitleProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, ReadonlyJsonValue, ServerAccessGrant, ServerAccessProviderDeclaration, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };
|
|
@@ -248,6 +248,7 @@ function collectComposerCustomization(registration, seenIds, onRejected, seenPop
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
// src/internal/plugin-app-collector.ts
|
|
251
|
+
var CODE_FENCE_LANGUAGE_PATTERN = /^[a-z0-9][a-z0-9+#._-]*$/;
|
|
251
252
|
var sidebarFooterCommandSequence = 0;
|
|
252
253
|
var SIDEBAR_FOOTER_ACTION_KEYS = /* @__PURE__ */ new Set([
|
|
253
254
|
"id",
|
|
@@ -477,6 +478,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
477
478
|
sourceCodeRenderers: [],
|
|
478
479
|
diffRenderers: [],
|
|
479
480
|
messageDirectives: [],
|
|
481
|
+
codeFenceRenderers: [],
|
|
480
482
|
messageActions: [],
|
|
481
483
|
commandPaletteActions: [],
|
|
482
484
|
providerIcons: [],
|
|
@@ -506,6 +508,8 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
506
508
|
sourceCodeRenderer: /* @__PURE__ */ new Set(),
|
|
507
509
|
diffRenderer: /* @__PURE__ */ new Set(),
|
|
508
510
|
messageDirective: /* @__PURE__ */ new Set(),
|
|
511
|
+
codeFenceRenderer: /* @__PURE__ */ new Set(),
|
|
512
|
+
codeFenceLanguage: /* @__PURE__ */ new Set(),
|
|
509
513
|
messageAction: /* @__PURE__ */ new Set(),
|
|
510
514
|
command: /* @__PURE__ */ new Set(),
|
|
511
515
|
providerIcon: /* @__PURE__ */ new Set(),
|
|
@@ -822,6 +826,34 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
822
826
|
component: requireComponent(kind, registration.component)
|
|
823
827
|
});
|
|
824
828
|
},
|
|
829
|
+
experimental_codeFenceRenderer(registration) {
|
|
830
|
+
const kind = "slots.experimental_codeFenceRenderer";
|
|
831
|
+
const id = requireSlotId(kind, registration?.id);
|
|
832
|
+
requireUniqueId(kind, seenIds.codeFenceRenderer, id);
|
|
833
|
+
const rawLanguages = registration.languages;
|
|
834
|
+
if (!Array.isArray(rawLanguages) || rawLanguages.length === 0) {
|
|
835
|
+
throw new Error(
|
|
836
|
+
`${kind}: "languages" must be a non-empty array of lowercase info-string languages`
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
const languages = rawLanguages.map((language) => {
|
|
840
|
+
if (typeof language !== "string" || !CODE_FENCE_LANGUAGE_PATTERN.test(language)) {
|
|
841
|
+
throw new Error(
|
|
842
|
+
`${kind}: languages must match ${CODE_FENCE_LANGUAGE_PATTERN}, got ${JSON.stringify(language)}`
|
|
843
|
+
);
|
|
844
|
+
}
|
|
845
|
+
if (seenIds.codeFenceLanguage.has(language)) {
|
|
846
|
+
throw new Error(`${kind}: duplicate language "${language}"`);
|
|
847
|
+
}
|
|
848
|
+
seenIds.codeFenceLanguage.add(language);
|
|
849
|
+
return language;
|
|
850
|
+
});
|
|
851
|
+
collected.codeFenceRenderers.push({
|
|
852
|
+
id,
|
|
853
|
+
languages,
|
|
854
|
+
component: requireComponent(kind, registration.component)
|
|
855
|
+
});
|
|
856
|
+
},
|
|
825
857
|
messageAction(registration) {
|
|
826
858
|
const kind = "slots.messageAction";
|
|
827
859
|
const id = requireSlotId(kind, registration?.id);
|
|
@@ -21678,7 +21678,64 @@ function rememberDeclaredSessionOptions(key, sessionSetup) {
|
|
|
21678
21678
|
function freshDeclaredSessionOptions(key) {
|
|
21679
21679
|
return cachedDeclaredSessionOptions?.key === key && Date.now() - cachedDeclaredSessionOptions.fetchedAt < SESSION_MODEL_DISCOVERY_TTL_MS ? cachedDeclaredSessionOptions.options : null;
|
|
21680
21680
|
}
|
|
21681
|
-
|
|
21681
|
+
var ACP_DISCOVERY_SESSION_DELETE_TIMEOUT_MS = 2e3;
|
|
21682
|
+
var ACP_DISCOVERY_SESSION_CLI_DELETE_TIMEOUT_MS = 15e3;
|
|
21683
|
+
function discoverySessionCliDeleteArgs(args) {
|
|
21684
|
+
if (args.dialectId !== "opencode" || args.agentArgs.at(-1) !== "acp" || !/^[A-Za-z0-9_-]+$/u.test(args.sessionId)) {
|
|
21685
|
+
return null;
|
|
21686
|
+
}
|
|
21687
|
+
return [...args.agentArgs.slice(0, -1), "session", "delete", args.sessionId];
|
|
21688
|
+
}
|
|
21689
|
+
async function endDiscoveryConnection(args) {
|
|
21690
|
+
const { connection, agent, session } = args;
|
|
21691
|
+
const agentDeletes = session?.capabilities.session.delete === true;
|
|
21692
|
+
if (session !== null && agentDeletes) {
|
|
21693
|
+
await connection.request({
|
|
21694
|
+
method: "session/delete",
|
|
21695
|
+
params: { sessionId: session.sessionId },
|
|
21696
|
+
resultSchema: z48.unknown(),
|
|
21697
|
+
timeoutMs: ACP_DISCOVERY_SESSION_DELETE_TIMEOUT_MS
|
|
21698
|
+
}).catch(() => void 0);
|
|
21699
|
+
}
|
|
21700
|
+
await connection.kill();
|
|
21701
|
+
if (session === null || agentDeletes) {
|
|
21702
|
+
return;
|
|
21703
|
+
}
|
|
21704
|
+
const cliArgs = discoverySessionCliDeleteArgs({
|
|
21705
|
+
dialectId: args.dialectId,
|
|
21706
|
+
agentArgs: agent.args,
|
|
21707
|
+
sessionId: session.sessionId
|
|
21708
|
+
});
|
|
21709
|
+
if (cliArgs === null) {
|
|
21710
|
+
return;
|
|
21711
|
+
}
|
|
21712
|
+
void execPortableFile(agent.command, cliArgs, {
|
|
21713
|
+
cwd: agent.cwd ?? process.cwd(),
|
|
21714
|
+
env: args.env,
|
|
21715
|
+
maxBuffer: 64 * 1024,
|
|
21716
|
+
timeout: ACP_DISCOVERY_SESSION_CLI_DELETE_TIMEOUT_MS
|
|
21717
|
+
}).catch(() => void 0);
|
|
21718
|
+
}
|
|
21719
|
+
async function resolveModelListWorkspace(cwd) {
|
|
21720
|
+
if (cwd === void 0) {
|
|
21721
|
+
return void 0;
|
|
21722
|
+
}
|
|
21723
|
+
const stats = await fs4.stat(cwd).catch(() => null);
|
|
21724
|
+
return stats?.isDirectory() === true ? cwd : void 0;
|
|
21725
|
+
}
|
|
21726
|
+
function inModelListWorkspace(params, workspace) {
|
|
21727
|
+
if (workspace === void 0) {
|
|
21728
|
+
return params;
|
|
21729
|
+
}
|
|
21730
|
+
const place = (command) => command.cwd === void 0 ? { ...command, cwd: workspace } : command;
|
|
21731
|
+
return {
|
|
21732
|
+
...params,
|
|
21733
|
+
...params.listCommand === void 0 ? {} : { listCommand: place(params.listCommand) },
|
|
21734
|
+
...params.agent === void 0 ? {} : { agent: place(params.agent) },
|
|
21735
|
+
...params.optionsAgent === void 0 ? {} : { optionsAgent: place(params.optionsAgent) }
|
|
21736
|
+
};
|
|
21737
|
+
}
|
|
21738
|
+
async function loadDeclaredSessionOptions(agent, parameterizedModelPicker, dialectId) {
|
|
21682
21739
|
const key = declaredSessionOptionsKey(agent, parameterizedModelPicker);
|
|
21683
21740
|
const cached = freshDeclaredSessionOptions(key);
|
|
21684
21741
|
if (cached !== null) {
|
|
@@ -21718,6 +21775,7 @@ async function loadDeclaredSessionOptions(agent, parameterizedModelPicker) {
|
|
|
21718
21775
|
);
|
|
21719
21776
|
}, MODEL_LIST_TIMEOUT_MS);
|
|
21720
21777
|
});
|
|
21778
|
+
let discoverySession = null;
|
|
21721
21779
|
try {
|
|
21722
21780
|
await Promise.race([
|
|
21723
21781
|
(async () => {
|
|
@@ -21730,11 +21788,15 @@ async function loadDeclaredSessionOptions(agent, parameterizedModelPicker) {
|
|
|
21730
21788
|
env: childEnv,
|
|
21731
21789
|
capabilities
|
|
21732
21790
|
});
|
|
21733
|
-
await connection.request({
|
|
21791
|
+
const newSession = await connection.request({
|
|
21734
21792
|
method: "session/new",
|
|
21735
21793
|
params: { cwd: agent.cwd ?? process.cwd(), mcpServers: [] },
|
|
21736
21794
|
resultSchema: z48.unknown()
|
|
21737
21795
|
});
|
|
21796
|
+
const sessionId = isJsonObject(newSession) ? newSession["sessionId"] : void 0;
|
|
21797
|
+
if (typeof sessionId === "string") {
|
|
21798
|
+
discoverySession = { capabilities, sessionId };
|
|
21799
|
+
}
|
|
21738
21800
|
})(),
|
|
21739
21801
|
timeoutReached
|
|
21740
21802
|
]);
|
|
@@ -21747,7 +21809,13 @@ async function loadDeclaredSessionOptions(agent, parameterizedModelPicker) {
|
|
|
21747
21809
|
if (timeout !== void 0) {
|
|
21748
21810
|
clearTimeout(timeout);
|
|
21749
21811
|
}
|
|
21750
|
-
await
|
|
21812
|
+
await endDiscoveryConnection({
|
|
21813
|
+
connection,
|
|
21814
|
+
agent,
|
|
21815
|
+
env: childEnv,
|
|
21816
|
+
dialectId,
|
|
21817
|
+
session: discoverySession
|
|
21818
|
+
});
|
|
21751
21819
|
}
|
|
21752
21820
|
return settleDeclaredSessionOptions(key);
|
|
21753
21821
|
}
|
|
@@ -21759,7 +21827,7 @@ function settleDeclaredSessionOptions(key) {
|
|
|
21759
21827
|
cachedDeclaredSessionOptions = { key, options: [], fetchedAt: Date.now() };
|
|
21760
21828
|
return [];
|
|
21761
21829
|
}
|
|
21762
|
-
async function loadSessionDiscoveredModels(agent, reasoningProbePriorityModelIds, parameterizedModelPicker) {
|
|
21830
|
+
async function loadSessionDiscoveredModels(agent, reasoningProbePriorityModelIds, parameterizedModelPicker, dialectId) {
|
|
21763
21831
|
const key = JSON.stringify({
|
|
21764
21832
|
agent,
|
|
21765
21833
|
reasoningProbePriorityModelIds,
|
|
@@ -21806,6 +21874,7 @@ async function loadSessionDiscoveredModels(agent, reasoningProbePriorityModelIds
|
|
|
21806
21874
|
}, MODEL_LIST_TIMEOUT_MS);
|
|
21807
21875
|
});
|
|
21808
21876
|
let discoveredCapabilities = null;
|
|
21877
|
+
let discoverySession = null;
|
|
21809
21878
|
try {
|
|
21810
21879
|
const newSession = await Promise.race([
|
|
21811
21880
|
(async () => {
|
|
@@ -21819,11 +21888,13 @@ async function loadSessionDiscoveredModels(agent, reasoningProbePriorityModelIds
|
|
|
21819
21888
|
env: childEnv,
|
|
21820
21889
|
capabilities
|
|
21821
21890
|
});
|
|
21822
|
-
|
|
21891
|
+
const created = await connection.request({
|
|
21823
21892
|
method: "session/new",
|
|
21824
21893
|
params: { cwd: agent.cwd ?? process.cwd(), mcpServers: [] },
|
|
21825
21894
|
resultSchema: acpSessionNewResultSchema
|
|
21826
21895
|
});
|
|
21896
|
+
discoverySession = { capabilities, sessionId: created.sessionId };
|
|
21897
|
+
return created;
|
|
21827
21898
|
})(),
|
|
21828
21899
|
timeoutReached
|
|
21829
21900
|
]);
|
|
@@ -21875,7 +21946,13 @@ async function loadSessionDiscoveredModels(agent, reasoningProbePriorityModelIds
|
|
|
21875
21946
|
if (timeout !== void 0) {
|
|
21876
21947
|
clearTimeout(timeout);
|
|
21877
21948
|
}
|
|
21878
|
-
await
|
|
21949
|
+
await endDiscoveryConnection({
|
|
21950
|
+
connection,
|
|
21951
|
+
agent,
|
|
21952
|
+
env: childEnv,
|
|
21953
|
+
dialectId,
|
|
21954
|
+
session: discoverySession
|
|
21955
|
+
});
|
|
21879
21956
|
settleDeclaredSessionOptions(
|
|
21880
21957
|
declaredSessionOptionsKey(agent, parameterizedModelPicker)
|
|
21881
21958
|
);
|
|
@@ -23570,9 +23647,14 @@ function decodeAcpBridgeJsonRpcRequest(raw) {
|
|
|
23570
23647
|
};
|
|
23571
23648
|
}
|
|
23572
23649
|
async function handleModelList(id, params, dialectId) {
|
|
23650
|
+
const resolvedDialectId = resolveAcpDialect({
|
|
23651
|
+
dialectId,
|
|
23652
|
+
command: params.optionsAgent?.command ?? params.agent?.command ?? ""
|
|
23653
|
+
}).id;
|
|
23573
23654
|
const declaredOptions = () => params.optionsAgent ? loadDeclaredSessionOptions(
|
|
23574
23655
|
params.optionsAgent,
|
|
23575
|
-
params.parameterizedModelPicker
|
|
23656
|
+
params.parameterizedModelPicker,
|
|
23657
|
+
resolvedDialectId
|
|
23576
23658
|
) : Promise.resolve([]);
|
|
23577
23659
|
function withDeclaredOptions(models, options) {
|
|
23578
23660
|
return options.length === 0 ? [...models] : models.map((model) => ({ ...model, sessionOptions: [...options] }));
|
|
@@ -23602,7 +23684,8 @@ async function handleModelList(id, params, dialectId) {
|
|
|
23602
23684
|
const sessionDiscoveredModels = params.listCommand === void 0 && params.agent ? await loadSessionDiscoveredModels(
|
|
23603
23685
|
params.agent,
|
|
23604
23686
|
params.reasoningProbePriorityModelIds,
|
|
23605
|
-
params.parameterizedModelPicker
|
|
23687
|
+
params.parameterizedModelPicker,
|
|
23688
|
+
resolvedDialectId
|
|
23606
23689
|
) : null;
|
|
23607
23690
|
if (sessionDiscoveredModels) {
|
|
23608
23691
|
await sendModels(sessionDiscoveredModels);
|
|
@@ -23689,9 +23772,12 @@ async function handleRequest2(request) {
|
|
|
23689
23772
|
);
|
|
23690
23773
|
await handleModelList(
|
|
23691
23774
|
request.id,
|
|
23692
|
-
|
|
23693
|
-
|
|
23694
|
-
|
|
23775
|
+
inModelListWorkspace(
|
|
23776
|
+
buildAcpModelListParams(
|
|
23777
|
+
decodeLaunchSpec(request.params.providerOptions),
|
|
23778
|
+
modelPicker
|
|
23779
|
+
),
|
|
23780
|
+
await resolveModelListWorkspace(request.params.cwd)
|
|
23695
23781
|
),
|
|
23696
23782
|
decodeDialectId(request.params.providerOptions)
|
|
23697
23783
|
);
|
|
@@ -15965,6 +15965,22 @@ async function revokeCursorSessionMcpServer(approval) {
|
|
|
15965
15965
|
|
|
15966
15966
|
// ../provider-bridge-acp/src/bridge/bridge.ts
|
|
15967
15967
|
var sessionsByBbThreadId = /* @__PURE__ */ new Map();
|
|
15968
|
+
var agentConnections = /* @__PURE__ */ new Set();
|
|
15969
|
+
var shuttingDown = false;
|
|
15970
|
+
function createBridgeAgentConnection(options) {
|
|
15971
|
+
if (shuttingDown) {
|
|
15972
|
+
throw new Error("ACP bridge is shutting down");
|
|
15973
|
+
}
|
|
15974
|
+
const connection = createAcpAgentConnection({
|
|
15975
|
+
...options,
|
|
15976
|
+
onExit: (info) => {
|
|
15977
|
+
agentConnections.delete(connection);
|
|
15978
|
+
options.onExit(info);
|
|
15979
|
+
}
|
|
15980
|
+
});
|
|
15981
|
+
agentConnections.add(connection);
|
|
15982
|
+
return connection;
|
|
15983
|
+
}
|
|
15968
15984
|
var bbThreadIdByProviderThreadId = /* @__PURE__ */ new Map();
|
|
15969
15985
|
var pendingRuntimeRequests = /* @__PURE__ */ new Map();
|
|
15970
15986
|
var runtimeRequestIdCounter = 0;
|
|
@@ -16412,7 +16428,7 @@ async function loadSessionDiscoveredModels(agent, reasoningProbePriorityModelIds
|
|
|
16412
16428
|
...withoutBridgeRuntimeEnv(process.env),
|
|
16413
16429
|
...agent.envVars ?? {}
|
|
16414
16430
|
};
|
|
16415
|
-
const connection =
|
|
16431
|
+
const connection = createBridgeAgentConnection({
|
|
16416
16432
|
command: agent.command,
|
|
16417
16433
|
args: agent.args,
|
|
16418
16434
|
cwd: agent.cwd ?? process.cwd(),
|
|
@@ -17105,7 +17121,7 @@ async function startAgentSession(request) {
|
|
|
17105
17121
|
...params.envVars,
|
|
17106
17122
|
...dialect.id === "opencode" ? { OPENCODE_CLIENT: "acp", OPENCODE_ENABLE_QUESTION_TOOL: "false" } : {}
|
|
17107
17123
|
};
|
|
17108
|
-
const connection =
|
|
17124
|
+
const connection = createBridgeAgentConnection({
|
|
17109
17125
|
command: params.agent.command,
|
|
17110
17126
|
args: launch.args,
|
|
17111
17127
|
cwd: params.cwd,
|
|
@@ -18111,11 +18127,21 @@ function handleParsedMessage(parsed) {
|
|
|
18111
18127
|
}
|
|
18112
18128
|
var handleLine = createBridgeLineHandler({ handleParsedMessage });
|
|
18113
18129
|
async function stopAllSessions() {
|
|
18114
|
-
await Promise.
|
|
18115
|
-
Array.from(
|
|
18116
|
-
(
|
|
18117
|
-
|
|
18118
|
-
|
|
18130
|
+
const results = await Promise.allSettled([
|
|
18131
|
+
...Array.from(
|
|
18132
|
+
sessionsByBbThreadId.values(),
|
|
18133
|
+
(session) => releaseSession(session)
|
|
18134
|
+
),
|
|
18135
|
+
...Array.from(agentConnections, (connection) => connection.kill())
|
|
18136
|
+
]);
|
|
18137
|
+
for (const result of results) {
|
|
18138
|
+
if (result.status === "rejected") {
|
|
18139
|
+
process.stderr.write(
|
|
18140
|
+
`acp bridge: shutdown cleanup failed: ${String(result.reason)}
|
|
18141
|
+
`
|
|
18142
|
+
);
|
|
18143
|
+
}
|
|
18144
|
+
}
|
|
18119
18145
|
const dynamicToolBridge = dynamicToolBridgePromise ? await dynamicToolBridgePromise.catch(() => null) : null;
|
|
18120
18146
|
await new Promise((resolveClose) => {
|
|
18121
18147
|
if (!dynamicToolBridge) {
|
|
@@ -18125,16 +18151,22 @@ async function stopAllSessions() {
|
|
|
18125
18151
|
dynamicToolBridge.server.close(() => resolveClose());
|
|
18126
18152
|
});
|
|
18127
18153
|
}
|
|
18154
|
+
function shutdownBridge() {
|
|
18155
|
+
if (shuttingDown) return;
|
|
18156
|
+
shuttingDown = true;
|
|
18157
|
+
void stopAllSessions().catch((error) => {
|
|
18158
|
+
process.stderr.write(`acp bridge: shutdown failed: ${String(error)}
|
|
18159
|
+
`);
|
|
18160
|
+
}).finally(() => process.exit(0));
|
|
18161
|
+
}
|
|
18128
18162
|
if (process.argv.includes("--mcp-stdio")) {
|
|
18129
18163
|
runAcpDynamicToolMcpServer();
|
|
18130
18164
|
}
|
|
18131
18165
|
var experimental_providerBridge = experimental_defineProviderBridge({
|
|
18132
18166
|
handleLine,
|
|
18133
|
-
onClose:
|
|
18134
|
-
|
|
18135
|
-
|
|
18136
|
-
});
|
|
18137
|
-
}
|
|
18167
|
+
onClose: shutdownBridge,
|
|
18168
|
+
onSigterm: shutdownBridge,
|
|
18169
|
+
onSigint: shutdownBridge
|
|
18138
18170
|
});
|
|
18139
18171
|
|
|
18140
18172
|
// ../provider-bridge-acp/src/probe.ts
|
package/dist/testing/app.js
CHANGED
|
@@ -967,6 +967,7 @@ var experimental_THREAD_ACTION_GROUPS = {
|
|
|
967
967
|
|
|
968
968
|
// src/internal/plugin-app-collector.ts
|
|
969
969
|
import { z as z2 } from "zod";
|
|
970
|
+
var CODE_FENCE_LANGUAGE_PATTERN = /^[a-z0-9][a-z0-9+#._-]*$/;
|
|
970
971
|
var sidebarFooterCommandSequence = 0;
|
|
971
972
|
var SIDEBAR_FOOTER_ACTION_KEYS = /* @__PURE__ */ new Set([
|
|
972
973
|
"id",
|
|
@@ -1193,6 +1194,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
1193
1194
|
sourceCodeRenderers: [],
|
|
1194
1195
|
diffRenderers: [],
|
|
1195
1196
|
messageDirectives: [],
|
|
1197
|
+
codeFenceRenderers: [],
|
|
1196
1198
|
messageActions: [],
|
|
1197
1199
|
commandPaletteActions: [],
|
|
1198
1200
|
providerIcons: [],
|
|
@@ -1222,6 +1224,8 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
1222
1224
|
sourceCodeRenderer: /* @__PURE__ */ new Set(),
|
|
1223
1225
|
diffRenderer: /* @__PURE__ */ new Set(),
|
|
1224
1226
|
messageDirective: /* @__PURE__ */ new Set(),
|
|
1227
|
+
codeFenceRenderer: /* @__PURE__ */ new Set(),
|
|
1228
|
+
codeFenceLanguage: /* @__PURE__ */ new Set(),
|
|
1225
1229
|
messageAction: /* @__PURE__ */ new Set(),
|
|
1226
1230
|
command: /* @__PURE__ */ new Set(),
|
|
1227
1231
|
providerIcon: /* @__PURE__ */ new Set(),
|
|
@@ -1538,6 +1542,34 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
1538
1542
|
component: requireComponent(kind, registration.component)
|
|
1539
1543
|
});
|
|
1540
1544
|
},
|
|
1545
|
+
experimental_codeFenceRenderer(registration) {
|
|
1546
|
+
const kind = "slots.experimental_codeFenceRenderer";
|
|
1547
|
+
const id = requireSlotId(kind, registration?.id);
|
|
1548
|
+
requireUniqueId(kind, seenIds.codeFenceRenderer, id);
|
|
1549
|
+
const rawLanguages = registration.languages;
|
|
1550
|
+
if (!Array.isArray(rawLanguages) || rawLanguages.length === 0) {
|
|
1551
|
+
throw new Error(
|
|
1552
|
+
`${kind}: "languages" must be a non-empty array of lowercase info-string languages`
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
const languages = rawLanguages.map((language) => {
|
|
1556
|
+
if (typeof language !== "string" || !CODE_FENCE_LANGUAGE_PATTERN.test(language)) {
|
|
1557
|
+
throw new Error(
|
|
1558
|
+
`${kind}: languages must match ${CODE_FENCE_LANGUAGE_PATTERN}, got ${JSON.stringify(language)}`
|
|
1559
|
+
);
|
|
1560
|
+
}
|
|
1561
|
+
if (seenIds.codeFenceLanguage.has(language)) {
|
|
1562
|
+
throw new Error(`${kind}: duplicate language "${language}"`);
|
|
1563
|
+
}
|
|
1564
|
+
seenIds.codeFenceLanguage.add(language);
|
|
1565
|
+
return language;
|
|
1566
|
+
});
|
|
1567
|
+
collected.codeFenceRenderers.push({
|
|
1568
|
+
id,
|
|
1569
|
+
languages,
|
|
1570
|
+
component: requireComponent(kind, registration.component)
|
|
1571
|
+
});
|
|
1572
|
+
},
|
|
1541
1573
|
messageAction(registration) {
|
|
1542
1574
|
const kind = "slots.messageAction";
|
|
1543
1575
|
const id = requireSlotId(kind, registration?.id);
|