@get-bb/plugin-sdk 0.5.30 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/bundled-types/bb-plugin-sdk-app.d.ts +264 -384
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +0 -84
- package/bundled-types/bb-plugin-sdk-internal-composer-handle.d.ts +457 -0
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +21 -88
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +32 -10
- package/bundled-types/bb-plugin-sdk-testing.d.ts +8 -87
- package/bundled-types/bb-plugin-sdk.d.ts +298 -391
- package/dist/app.js +2 -0
- package/dist/internal/composer-customization-validation.js +37 -27
- package/dist/internal/composer-handle.js +531 -0
- package/dist/internal/plugin-app-collector.js +37 -27
- package/dist/testing/app.js +780 -132
- package/dist/testing/index.js +7 -4
- package/package.json +7 -1
|
@@ -484,88 +484,6 @@ declare const threadResponseSchema: z.ZodObject<{
|
|
|
484
484
|
canSpawnChild: z.ZodBoolean;
|
|
485
485
|
createdAt: z.ZodNumber;
|
|
486
486
|
deletedAt: z.ZodNullable<z.ZodNumber>;
|
|
487
|
-
draft: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
488
|
-
mentions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
489
|
-
end: z.ZodNumber;
|
|
490
|
-
resource: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
491
|
-
kind: z.ZodLiteral<"thread">;
|
|
492
|
-
label: z.ZodString;
|
|
493
|
-
projectId: z.ZodOptional<z.ZodString>;
|
|
494
|
-
threadId: z.ZodString;
|
|
495
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
496
|
-
kind: z.ZodLiteral<"project">;
|
|
497
|
-
label: z.ZodString;
|
|
498
|
-
projectId: z.ZodString;
|
|
499
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
500
|
-
kind: z.ZodLiteral<"section">;
|
|
501
|
-
label: z.ZodString;
|
|
502
|
-
sectionId: z.ZodString;
|
|
503
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
504
|
-
entryKind: z.ZodEnum<{
|
|
505
|
-
directory: "directory";
|
|
506
|
-
file: "file";
|
|
507
|
-
}>;
|
|
508
|
-
kind: z.ZodLiteral<"path">;
|
|
509
|
-
label: z.ZodString;
|
|
510
|
-
path: z.ZodString;
|
|
511
|
-
source: z.ZodEnum<{
|
|
512
|
-
"thread-storage": "thread-storage";
|
|
513
|
-
workspace: "workspace";
|
|
514
|
-
}>;
|
|
515
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
516
|
-
argumentHint: z.ZodNullable<z.ZodString>;
|
|
517
|
-
kind: z.ZodLiteral<"command">;
|
|
518
|
-
label: z.ZodString;
|
|
519
|
-
name: z.ZodString;
|
|
520
|
-
origin: z.ZodEnum<{
|
|
521
|
-
builtin: "builtin";
|
|
522
|
-
project: "project";
|
|
523
|
-
user: "user";
|
|
524
|
-
}>;
|
|
525
|
-
source: z.ZodEnum<{
|
|
526
|
-
command: "command";
|
|
527
|
-
skill: "skill";
|
|
528
|
-
}>;
|
|
529
|
-
trigger: z.ZodEnum<{
|
|
530
|
-
"/": "/";
|
|
531
|
-
$: "$";
|
|
532
|
-
}>;
|
|
533
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
534
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
535
|
-
itemId: z.ZodString;
|
|
536
|
-
kind: z.ZodLiteral<"plugin">;
|
|
537
|
-
label: z.ZodString;
|
|
538
|
-
pluginId: z.ZodString;
|
|
539
|
-
}, z.core.$strip>], "kind">>;
|
|
540
|
-
start: z.ZodNumber;
|
|
541
|
-
}, z.core.$strip>>>;
|
|
542
|
-
text: z.ZodString;
|
|
543
|
-
type: z.ZodLiteral<"text">;
|
|
544
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
545
|
-
"agent-only": "agent-only";
|
|
546
|
-
}>>;
|
|
547
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
548
|
-
type: z.ZodLiteral<"image">;
|
|
549
|
-
url: z.ZodString;
|
|
550
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
551
|
-
"agent-only": "agent-only";
|
|
552
|
-
}>>;
|
|
553
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
554
|
-
path: z.ZodString;
|
|
555
|
-
type: z.ZodLiteral<"localImage">;
|
|
556
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
557
|
-
"agent-only": "agent-only";
|
|
558
|
-
}>>;
|
|
559
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
560
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
561
|
-
name: z.ZodOptional<z.ZodString>;
|
|
562
|
-
path: z.ZodString;
|
|
563
|
-
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
564
|
-
type: z.ZodLiteral<"localFile">;
|
|
565
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
566
|
-
"agent-only": "agent-only";
|
|
567
|
-
}>>;
|
|
568
|
-
}, z.core.$strip>], "type">>>;
|
|
569
487
|
environmentId: z.ZodNullable<z.ZodString>;
|
|
570
488
|
id: z.ZodString;
|
|
571
489
|
lastReadAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -582,7 +500,6 @@ declare const threadResponseSchema: z.ZodObject<{
|
|
|
582
500
|
queuedMessageCount: z.ZodNumber;
|
|
583
501
|
runtime: z.ZodObject<{
|
|
584
502
|
displayStatus: z.ZodEnum<{
|
|
585
|
-
"host-reconnecting": "host-reconnecting";
|
|
586
503
|
"waiting-for-host": "waiting-for-host";
|
|
587
504
|
active: "active";
|
|
588
505
|
error: "error";
|
|
@@ -592,7 +509,6 @@ declare const threadResponseSchema: z.ZodObject<{
|
|
|
592
509
|
starting: "starting";
|
|
593
510
|
stopping: "stopping";
|
|
594
511
|
}>;
|
|
595
|
-
hostReconnectGraceExpiresAt: z.ZodNullable<z.ZodNumber>;
|
|
596
512
|
}, z.core.$strip>;
|
|
597
513
|
sectionId: z.ZodNullable<z.ZodString>;
|
|
598
514
|
sourceThreadId: z.ZodNullable<z.ZodString>;
|
|
@@ -879,6 +795,22 @@ interface PluginRpcMethodContract<InputSchema extends StandardSchemaV1 = Standar
|
|
|
879
795
|
readonly input: InputSchema;
|
|
880
796
|
readonly output: OutputSchema;
|
|
881
797
|
}
|
|
798
|
+
/**
|
|
799
|
+
* Who invoked an rpc method. `plugin` means another loaded plugin (or this
|
|
800
|
+
* one) called through its own `bb.sdk.plugins.callRpc`; the host verifies
|
|
801
|
+
* that with a per-load token only the server knows. Every other caller — the
|
|
802
|
+
* app, the `bb` CLI, agents, and bb itself — is `client`.
|
|
803
|
+
*/
|
|
804
|
+
type ExperimentalPluginRpcCaller = {
|
|
805
|
+
readonly kind: "plugin";
|
|
806
|
+
readonly pluginId: string;
|
|
807
|
+
} | {
|
|
808
|
+
readonly kind: "client";
|
|
809
|
+
};
|
|
810
|
+
/** Second argument of every rpc handler. */
|
|
811
|
+
interface ExperimentalPluginRpcHandlerContext {
|
|
812
|
+
readonly experimental_caller: ExperimentalPluginRpcCaller;
|
|
813
|
+
}
|
|
882
814
|
|
|
883
815
|
type PluginSettingDescriptor = {
|
|
884
816
|
type: "string";
|
|
@@ -1154,7 +1086,7 @@ interface MessageDispatchHookContext {
|
|
|
1154
1086
|
queuedMessages: ThreadQueuedMessage[];
|
|
1155
1087
|
/**
|
|
1156
1088
|
* Opaque JSON supplied by a plugin through the composer's
|
|
1157
|
-
* `
|
|
1089
|
+
* `submit`, paired with that plugin's id. Null for ordinary
|
|
1158
1090
|
* submissions and queued re-attempts. Core does not persist or interpret
|
|
1159
1091
|
* the data.
|
|
1160
1092
|
*/
|
|
@@ -1728,8 +1660,9 @@ interface PluginMentionItem {
|
|
|
1728
1660
|
subtitle?: string;
|
|
1729
1661
|
/**
|
|
1730
1662
|
* BB icon name: a built-in name, or a name the plugin's app bundle
|
|
1731
|
-
* registered with `app.experimental_icons.register()`.
|
|
1732
|
-
* plugin
|
|
1663
|
+
* registered with `app.experimental_icons.register()`. Resolved names take
|
|
1664
|
+
* precedence over plugin branding in menu rows, composer pills, and sent
|
|
1665
|
+
* messages. Omitted or unknown names fall back to plugin branding, then
|
|
1733
1666
|
* the generic plugin icon.
|
|
1734
1667
|
*/
|
|
1735
1668
|
icon?: string;
|
|
@@ -2093,7 +2026,7 @@ type RpcRegistrationRecord = {
|
|
|
2093
2026
|
publication: ReturnType<typeof publishRpcMethod>;
|
|
2094
2027
|
inputSchema: StandardSchemaV1;
|
|
2095
2028
|
outputSchema: StandardSchemaV1;
|
|
2096
|
-
handler: (input: unknown) => unknown;
|
|
2029
|
+
handler: (input: unknown, context: ExperimentalPluginRpcHandlerContext) => unknown;
|
|
2097
2030
|
};
|
|
2098
2031
|
declare function normalizeRpcRegistration(contract: unknown, handlers: unknown, registered: ReadonlyMap<string, unknown>, options: unknown): Array<[string, RpcRegistrationRecord]>;
|
|
2099
2032
|
declare function normalizeRealtimePayload(channel: string, payload: unknown): unknown;
|
|
@@ -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, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarHeaderRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention,
|
|
10
|
+
import { ExperimentalSidebarFooterItemRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarHeaderRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarPullRequest, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalSidebarNavigationItem, PluginEnvironmentProvidersState, PluginSidebarThreadActions, ExperimentalSidebarNavigationActions } from '@get-bb/plugin-sdk';
|
|
11
11
|
|
|
12
12
|
type ExperimentalSidebarFooterCommandKind = "close" | "open" | "toggle";
|
|
13
13
|
interface ExperimentalSidebarFooterRuntimeSnapshot {
|
|
@@ -112,8 +112,17 @@ interface ExperimentalFixedTabOpenCall {
|
|
|
112
112
|
interface ComposerLog {
|
|
113
113
|
/** Latest plain text in this isolated composer scope. */
|
|
114
114
|
readonly text: string;
|
|
115
|
+
/**
|
|
116
|
+
* Latest text and mention pills, as `useComposer().draft` reports them.
|
|
117
|
+
* The harness composer has no caret, so cursor inserts land at the end.
|
|
118
|
+
*/
|
|
119
|
+
readonly draft: ComposerDraftSnapshot;
|
|
120
|
+
/** The key `useComposer().key` reports for the current scope. */
|
|
121
|
+
readonly key: string;
|
|
115
122
|
/** Latest host-provided composer scope. */
|
|
116
123
|
readonly scope: PluginComposerScope;
|
|
124
|
+
/** Current picker snapshot, or null for a composer without pickers. */
|
|
125
|
+
readonly selection: ComposerSelection | null;
|
|
117
126
|
/** Latest host-provided attachment count exposed through `useComposerView()`. */
|
|
118
127
|
readonly attachmentCount: number;
|
|
119
128
|
/** Latest host-rendered text effect requested by the plugin. */
|
|
@@ -126,19 +135,19 @@ interface ComposerLog {
|
|
|
126
135
|
mentions: PluginComposerMention[];
|
|
127
136
|
focusCount: number;
|
|
128
137
|
/**
|
|
129
|
-
* Every `
|
|
130
|
-
*
|
|
138
|
+
* Every `submit` the plugin ran, in order. The harness composer has no
|
|
139
|
+
* submit pipeline of its own, so it records the options and clears the
|
|
131
140
|
* draft — enough to assert what a picker scheduled and that it tidied up.
|
|
132
141
|
*/
|
|
133
|
-
submits:
|
|
142
|
+
submits: ComposerSubmitOptions[];
|
|
134
143
|
/**
|
|
135
|
-
* Every `
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
144
|
+
* Every `setSelection` the harness composer accepted, in order. The
|
|
145
|
+
* harness has no pickers of its own, so it merges accepted fields into
|
|
146
|
+
* its current selection and returns that snapshot. A thread drops
|
|
147
|
+
* project and environment because it has no pickers for them. The
|
|
148
|
+
* queued-message scope rejects, as the app does.
|
|
140
149
|
*/
|
|
141
|
-
selections:
|
|
150
|
+
selections: ComposerSelection[];
|
|
142
151
|
}
|
|
143
152
|
/** One recorded `experimental_useSidebarThreadActions()` call. */
|
|
144
153
|
interface SidebarActionCall {
|
|
@@ -264,8 +273,21 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
|
|
|
264
273
|
/** Initial state for this render's isolated composer scope and view. */
|
|
265
274
|
composer?: {
|
|
266
275
|
text?: string;
|
|
276
|
+
/** Mention pills already in `text`, with ranges into it. */
|
|
277
|
+
mentions?: readonly ComposerMention[];
|
|
267
278
|
scope?: PluginComposerScope;
|
|
268
279
|
attachmentCount?: number;
|
|
280
|
+
attachments?: readonly ComposerAttachment[];
|
|
281
|
+
layout?: "compact" | "expanded";
|
|
282
|
+
isRunning?: boolean;
|
|
283
|
+
isSubmitting?: boolean;
|
|
284
|
+
selection?: ComposerSelection;
|
|
285
|
+
/**
|
|
286
|
+
* What `submittingBlockedReason` reports, and what `submit` rejects
|
|
287
|
+
* with. Omitted → "Type a message first." while the draft is empty,
|
|
288
|
+
* "Submitting..." while `isSubmitting`, otherwise null.
|
|
289
|
+
*/
|
|
290
|
+
submittingBlockedReason?: string | null;
|
|
269
291
|
};
|
|
270
292
|
/**
|
|
271
293
|
* Threads and projects `experimental_useSidebarThreads()` reports. Omitted →
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// Confused by the API, or need a symbol that isn't here? Clone the BB repo
|
|
6
6
|
// and read the real source: https://github.com/get-bb/bb
|
|
7
7
|
|
|
8
|
-
import { StandardSchemaV1 as StandardSchemaV1$1, StandardSchemaV1InferOutput, PluginMachineValidateDecision, JsonValue as JsonValue$2, PluginEnvironmentProviderRequirements as PluginEnvironmentProviderRequirements$1, PluginEnvironmentValidateDecision, BbPluginApi, PluginSettingValue as PluginSettingValue$1, PluginSharedPortTunnelIdentity, PluginRowPresentation, PluginAgentToolContext, PluginAgentToolResult, PluginCliCommandInfo, PluginCliContext, PluginCliResult, PluginHttpAuthMode, PluginHttpHandler, PluginMentionTrigger, PluginMentionSearchContext, PluginMentionItem, PluginMentionProviderRegistration, PluginCliExecutionResult, PluginThreadEventName, PluginThreadEventPayloads, PluginAgentConfigurationContext, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginProviderEnvHealth, PluginSettingDescriptors, ExperimentalPluginWebSocketHandler, PluginAgentConfiguration, PluginHookName, PluginHookHandler, PluginAiServiceDeclaration, PluginInteractionRequest, MessageDispatchHookContext } from '@get-bb/plugin-sdk';
|
|
8
|
+
import { StandardSchemaV1 as StandardSchemaV1$1, StandardSchemaV1InferOutput, PluginMachineValidateDecision, JsonValue as JsonValue$2, PluginEnvironmentProviderRequirements as PluginEnvironmentProviderRequirements$1, PluginEnvironmentValidateDecision, BbPluginApi, PluginSettingValue as PluginSettingValue$1, PluginSharedPortTunnelIdentity, PluginRowPresentation, PluginAgentToolContext, PluginAgentToolResult, PluginCliCommandInfo, PluginCliContext, PluginCliResult, PluginHttpAuthMode, PluginHttpHandler, PluginMentionTrigger, PluginMentionSearchContext, PluginMentionItem, PluginMentionProviderRegistration, ExperimentalPluginRpcCaller, PluginCliExecutionResult, PluginThreadEventName, PluginThreadEventPayloads, PluginAgentConfigurationContext, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginProviderEnvHealth, PluginSettingDescriptors, ExperimentalPluginWebSocketHandler, PluginAgentConfiguration, PluginHookName, PluginHookHandler, PluginAiServiceDeclaration, PluginInteractionRequest, MessageDispatchHookContext } from '@get-bb/plugin-sdk';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
|
|
11
11
|
type PluginMachineProviderResource = Exclude<JsonValue$2, null>;
|
|
@@ -277,88 +277,6 @@ declare const threadResponseSchema: z.ZodObject<{
|
|
|
277
277
|
canSpawnChild: z.ZodBoolean;
|
|
278
278
|
createdAt: z.ZodNumber;
|
|
279
279
|
deletedAt: z.ZodNullable<z.ZodNumber>;
|
|
280
|
-
draft: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
281
|
-
mentions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
282
|
-
end: z.ZodNumber;
|
|
283
|
-
resource: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
284
|
-
kind: z.ZodLiteral<"thread">;
|
|
285
|
-
label: z.ZodString;
|
|
286
|
-
projectId: z.ZodOptional<z.ZodString>;
|
|
287
|
-
threadId: z.ZodString;
|
|
288
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
289
|
-
kind: z.ZodLiteral<"project">;
|
|
290
|
-
label: z.ZodString;
|
|
291
|
-
projectId: z.ZodString;
|
|
292
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
293
|
-
kind: z.ZodLiteral<"section">;
|
|
294
|
-
label: z.ZodString;
|
|
295
|
-
sectionId: z.ZodString;
|
|
296
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
297
|
-
entryKind: z.ZodEnum<{
|
|
298
|
-
directory: "directory";
|
|
299
|
-
file: "file";
|
|
300
|
-
}>;
|
|
301
|
-
kind: z.ZodLiteral<"path">;
|
|
302
|
-
label: z.ZodString;
|
|
303
|
-
path: z.ZodString;
|
|
304
|
-
source: z.ZodEnum<{
|
|
305
|
-
"thread-storage": "thread-storage";
|
|
306
|
-
workspace: "workspace";
|
|
307
|
-
}>;
|
|
308
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
309
|
-
argumentHint: z.ZodNullable<z.ZodString>;
|
|
310
|
-
kind: z.ZodLiteral<"command">;
|
|
311
|
-
label: z.ZodString;
|
|
312
|
-
name: z.ZodString;
|
|
313
|
-
origin: z.ZodEnum<{
|
|
314
|
-
builtin: "builtin";
|
|
315
|
-
project: "project";
|
|
316
|
-
user: "user";
|
|
317
|
-
}>;
|
|
318
|
-
source: z.ZodEnum<{
|
|
319
|
-
command: "command";
|
|
320
|
-
skill: "skill";
|
|
321
|
-
}>;
|
|
322
|
-
trigger: z.ZodEnum<{
|
|
323
|
-
"/": "/";
|
|
324
|
-
$: "$";
|
|
325
|
-
}>;
|
|
326
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
327
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
328
|
-
itemId: z.ZodString;
|
|
329
|
-
kind: z.ZodLiteral<"plugin">;
|
|
330
|
-
label: z.ZodString;
|
|
331
|
-
pluginId: z.ZodString;
|
|
332
|
-
}, z.core.$strip>], "kind">>;
|
|
333
|
-
start: z.ZodNumber;
|
|
334
|
-
}, z.core.$strip>>>;
|
|
335
|
-
text: z.ZodString;
|
|
336
|
-
type: z.ZodLiteral<"text">;
|
|
337
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
338
|
-
"agent-only": "agent-only";
|
|
339
|
-
}>>;
|
|
340
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
341
|
-
type: z.ZodLiteral<"image">;
|
|
342
|
-
url: z.ZodString;
|
|
343
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
344
|
-
"agent-only": "agent-only";
|
|
345
|
-
}>>;
|
|
346
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
-
path: z.ZodString;
|
|
348
|
-
type: z.ZodLiteral<"localImage">;
|
|
349
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
350
|
-
"agent-only": "agent-only";
|
|
351
|
-
}>>;
|
|
352
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
353
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
354
|
-
name: z.ZodOptional<z.ZodString>;
|
|
355
|
-
path: z.ZodString;
|
|
356
|
-
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
357
|
-
type: z.ZodLiteral<"localFile">;
|
|
358
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
359
|
-
"agent-only": "agent-only";
|
|
360
|
-
}>>;
|
|
361
|
-
}, z.core.$strip>], "type">>>;
|
|
362
280
|
environmentId: z.ZodNullable<z.ZodString>;
|
|
363
281
|
id: z.ZodString;
|
|
364
282
|
lastReadAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -375,7 +293,6 @@ declare const threadResponseSchema: z.ZodObject<{
|
|
|
375
293
|
queuedMessageCount: z.ZodNumber;
|
|
376
294
|
runtime: z.ZodObject<{
|
|
377
295
|
displayStatus: z.ZodEnum<{
|
|
378
|
-
"host-reconnecting": "host-reconnecting";
|
|
379
296
|
"waiting-for-host": "waiting-for-host";
|
|
380
297
|
active: "active";
|
|
381
298
|
error: "error";
|
|
@@ -385,7 +302,6 @@ declare const threadResponseSchema: z.ZodObject<{
|
|
|
385
302
|
starting: "starting";
|
|
386
303
|
stopping: "stopping";
|
|
387
304
|
}>;
|
|
388
|
-
hostReconnectGraceExpiresAt: z.ZodNullable<z.ZodNumber>;
|
|
389
305
|
}, z.core.$strip>;
|
|
390
306
|
sectionId: z.ZodNullable<z.ZodString>;
|
|
391
307
|
sourceThreadId: z.ZodNullable<z.ZodString>;
|
|
@@ -1346,9 +1262,14 @@ interface FakePluginBehaviorDrivers {
|
|
|
1346
1262
|
/**
|
|
1347
1263
|
* Invoke a registered rpc method with host semantics: input/output schemas,
|
|
1348
1264
|
* strict JSON result normalization, and structured failure codes. Rejects
|
|
1349
|
-
* with the same message/code/issues the frontend client surfaces.
|
|
1265
|
+
* with the same message/code/issues the frontend client surfaces. The
|
|
1266
|
+
* handler sees `options.experimental_caller` as its caller, `{ kind:
|
|
1267
|
+
* "client" }` by default; pass `{ kind: "plugin", pluginId }` to act as
|
|
1268
|
+
* another plugin calling through `bb.sdk.plugins.callRpc`.
|
|
1350
1269
|
*/
|
|
1351
|
-
callRpc(method: string, input?: unknown
|
|
1270
|
+
callRpc(method: string, input?: unknown, options?: {
|
|
1271
|
+
experimental_caller?: ExperimentalPluginRpcCaller;
|
|
1272
|
+
}): Promise<unknown>;
|
|
1352
1273
|
/**
|
|
1353
1274
|
* Invoke the plugin's CLI command with host semantics: the result's
|
|
1354
1275
|
* exitCode must be a number, stdout/stderr default to "", and a throwing
|