@get-bb/plugin-sdk 0.6.109 → 0.6.116
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 +146 -9
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +8 -3
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-internal-thread-status.d.ts +316 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp-next.d.ts +10 -1
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +10 -1
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk.d.ts +169 -12
- package/dist/app.js +108 -0
- package/dist/index.js +161 -1
- package/dist/internal/plugin-app-collector.js +11 -0
- package/dist/internal/rpc-query-host.js +4 -2
- package/dist/internal/thread-status.js +111 -0
- package/dist/provider-bridge-acp-next.js +30 -22
- package/dist/provider-bridge-acp.js +30 -22
- package/dist/replay-provider-child.mjs +21 -22
- package/dist/testing/app.js +123 -2
- package/package.json +7 -1
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
// Portable type declarations for `@get-bb/plugin-sdk`. Unpublished BB
|
|
2
|
+
// workspace contracts are flattened; public subpaths may reuse the
|
|
3
|
+
// package root without requiring any other @bb/* package.
|
|
4
|
+
//
|
|
5
|
+
// Confused by the API, or need a symbol that isn't here? Clone the BB repo
|
|
6
|
+
// and read the real source: https://github.com/get-bb/bb
|
|
7
|
+
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
|
|
10
|
+
declare const environmentWorkspaceDisplayKindSchema: z.ZodEnum<{
|
|
11
|
+
"managed-worktree": "managed-worktree";
|
|
12
|
+
"unmanaged-worktree": "unmanaged-worktree";
|
|
13
|
+
other: "other";
|
|
14
|
+
}>;
|
|
15
|
+
type EnvironmentWorkspaceDisplayKind = z.infer<typeof environmentWorkspaceDisplayKindSchema>;
|
|
16
|
+
|
|
17
|
+
declare const threadStatusSchema: z.ZodEnum<{
|
|
18
|
+
active: "active";
|
|
19
|
+
error: "error";
|
|
20
|
+
idle: "idle";
|
|
21
|
+
pending: "pending";
|
|
22
|
+
starting: "starting";
|
|
23
|
+
stopping: "stopping";
|
|
24
|
+
}>;
|
|
25
|
+
type ThreadStatus = z.infer<typeof threadStatusSchema>;
|
|
26
|
+
|
|
27
|
+
declare const threadParentNotificationsSchema: z.ZodEnum<{
|
|
28
|
+
auto: "auto";
|
|
29
|
+
off: "off";
|
|
30
|
+
stuck: "stuck";
|
|
31
|
+
}>;
|
|
32
|
+
type ThreadParentNotifications = z.infer<typeof threadParentNotificationsSchema>;
|
|
33
|
+
|
|
34
|
+
declare const threadRuntimeDisplayStatusSchema: z.ZodEnum<{
|
|
35
|
+
"waiting-for-host": "waiting-for-host";
|
|
36
|
+
active: "active";
|
|
37
|
+
error: "error";
|
|
38
|
+
idle: "idle";
|
|
39
|
+
pending: "pending";
|
|
40
|
+
provisioning: "provisioning";
|
|
41
|
+
starting: "starting";
|
|
42
|
+
stopping: "stopping";
|
|
43
|
+
}>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The three additions to {@link threadStatusValues} are display-only: they
|
|
47
|
+
* refine `active`/`idle` with host and workspace facts the durable status does
|
|
48
|
+
* not record.
|
|
49
|
+
*
|
|
50
|
+
* A never-started thread needs no such refinement — `pending` is a real thread
|
|
51
|
+
* status now, so it travels to the client as itself. It used to arrive as a
|
|
52
|
+
* separate `held` display status, derived from an `idle` thread holding a live
|
|
53
|
+
* dispatch hold; that derivation and the holds behind it are both gone.
|
|
54
|
+
*/
|
|
55
|
+
type ThreadRuntimeDisplayStatus = z.infer<typeof threadRuntimeDisplayStatusSchema>;
|
|
56
|
+
declare const threadQueuedWorkSchema: z.ZodEnum<{
|
|
57
|
+
failed: "failed";
|
|
58
|
+
none: "none";
|
|
59
|
+
waiting: "waiting";
|
|
60
|
+
}>;
|
|
61
|
+
type ThreadQueuedWork = z.infer<typeof threadQueuedWorkSchema>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* A name the host resolves to a glyph, in this order: a name any plugin
|
|
65
|
+
* registered with `app.experimental_icons.register()`, then a built-in BB icon
|
|
66
|
+
* name (`"Zap"`), then a namespaced `"<pluginId>/<name>"` glyph naming an
|
|
67
|
+
* entry of that plugin's manifest `bb.branding.experimental_icons` map. A
|
|
68
|
+
* registration therefore shadows a built-in, and either shadows a declared
|
|
69
|
+
* icon of the same name. Names that resolve to none of the three fall back to
|
|
70
|
+
* the surface's generic icon.
|
|
71
|
+
*
|
|
72
|
+
* Declared icons and registrations are one vocabulary here: the same name
|
|
73
|
+
* works in `experimental_Icon`, in every field below, and — for a declared
|
|
74
|
+
* icon — in the tool, provider and bridge-row declarations that accept one.
|
|
75
|
+
* Declared icons need no frontend bundle and survive the plugin being stopped;
|
|
76
|
+
* registrations can be any React component but live only while the plugin's
|
|
77
|
+
* app bundle is loaded.
|
|
78
|
+
*/
|
|
79
|
+
type BbIconName = string;
|
|
80
|
+
/**
|
|
81
|
+
* The one status bb would paint for a thread, already resolved through the
|
|
82
|
+
* host's precedence (attention before work; plan and goal before the generic
|
|
83
|
+
* spinner). Draw it with {@link PluginSdkApp.experimental_ThreadStatusGlyph},
|
|
84
|
+
* or resolve a row that folds in more through
|
|
85
|
+
* {@link PluginSdkApp.experimental_resolveThreadStatus}.
|
|
86
|
+
*
|
|
87
|
+
* Treat an unrecognized value as "none": bb adds kinds over time, and an
|
|
88
|
+
* older plugin must degrade to drawing nothing rather than throwing.
|
|
89
|
+
*
|
|
90
|
+
* "draft" and "working-draft" are never reported here: an unsubmitted composer
|
|
91
|
+
* draft is per-client state the host reads per row, which an array-wide view
|
|
92
|
+
* cannot. A thread holding a draft reports whatever it would report without
|
|
93
|
+
* one. "queued-failed" and "queued-waiting" are reported, with the same
|
|
94
|
+
* precedence bb's list uses (a failed send outranks the unread dot; a waiting
|
|
95
|
+
* message ranks just below it).
|
|
96
|
+
*/
|
|
97
|
+
type PluginSidebarThreadIndicator = "background-agent" | "background-command" | "draft" | "goal" | "none" | "plan-mode" | "queued-failed" | "queued-waiting" | "runtime" | "unread-error" | "unread-success" | "waiting-for-input" | "workflow" | "working-draft";
|
|
98
|
+
/** Live work counts on a thread. All zero means nothing is running. */
|
|
99
|
+
interface PluginSidebarThreadActivity {
|
|
100
|
+
workflows: number;
|
|
101
|
+
backgroundAgents: number;
|
|
102
|
+
backgroundCommands: number;
|
|
103
|
+
planMode: number;
|
|
104
|
+
goals: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* One thread in the sidebar's live view.
|
|
108
|
+
*
|
|
109
|
+
* A deliberate copy of the fields a sidebar needs — not a re-export of the
|
|
110
|
+
* host's internal thread row type, which changes whenever the app needs a
|
|
111
|
+
* field. Timestamps are epoch milliseconds.
|
|
112
|
+
*/
|
|
113
|
+
interface PluginSidebarThread {
|
|
114
|
+
id: string;
|
|
115
|
+
projectId: string;
|
|
116
|
+
/** Null while a thread is still unnamed; pair with `titleFallback`. */
|
|
117
|
+
title: string | null;
|
|
118
|
+
titleFallback: string | null;
|
|
119
|
+
/**
|
|
120
|
+
* What bb shows for this thread as plain text: `title`, else
|
|
121
|
+
* `titleFallback`, else a short id, with any `@project:`, `@section:`, and
|
|
122
|
+
* `@thread:` mentions in it resolved to their names. Sort on it and use it
|
|
123
|
+
* for accessible names; render {@link PluginSdkApp.ThreadTitle} for the
|
|
124
|
+
* same text with mention chips.
|
|
125
|
+
*/
|
|
126
|
+
displayTitle: string;
|
|
127
|
+
/** The thread this one was forked from or spawned under; null at the root. */
|
|
128
|
+
parentThreadId: string | null;
|
|
129
|
+
/**
|
|
130
|
+
* The thread whose lifecycle this one follows (a delegated child stops
|
|
131
|
+
* when its owner stops); null when the thread owns its own lifecycle.
|
|
132
|
+
*/
|
|
133
|
+
lifecycleOwnerThreadId: string | null;
|
|
134
|
+
/**
|
|
135
|
+
* Which of this child's outcomes wake its parent: "auto" (every outcome),
|
|
136
|
+
* "stuck" (failures, interruptions, and blockers), or "off".
|
|
137
|
+
*/
|
|
138
|
+
parentNotifications: ThreadParentNotifications;
|
|
139
|
+
/** The thread this one was forked from; null unless `originKind` is "fork". */
|
|
140
|
+
sourceThreadId: string | null;
|
|
141
|
+
sectionId: string | null;
|
|
142
|
+
/** How this thread came to exist under its parent; null for root threads. */
|
|
143
|
+
originKind: "fork" | null;
|
|
144
|
+
/** The plugin that spawned it, or null for non-plugin origins. */
|
|
145
|
+
originPluginId: string | null;
|
|
146
|
+
/** The agent provider this thread runs on; resolve it through
|
|
147
|
+
* {@link PluginSdkApp.experimental_useProviders} for a name and icon. */
|
|
148
|
+
providerId: string;
|
|
149
|
+
/**
|
|
150
|
+
* The thread's execution status. bb's list sorts busy threads ("starting",
|
|
151
|
+
* "active", "stopping") above idle ones. Treat an unknown value as "idle".
|
|
152
|
+
*/
|
|
153
|
+
status: ThreadStatus;
|
|
154
|
+
/**
|
|
155
|
+
* `status` refined by host and environment state: adds "provisioning" and
|
|
156
|
+
* "waiting-for-host" for a thread whose machine is not ready. Treat an
|
|
157
|
+
* unknown value as `status`.
|
|
158
|
+
*/
|
|
159
|
+
runtimeStatus: ThreadRuntimeDisplayStatus;
|
|
160
|
+
/**
|
|
161
|
+
* Whether a message is queued behind the running turn ("waiting") or a
|
|
162
|
+
* queued message failed to send ("failed"). "none" otherwise.
|
|
163
|
+
*/
|
|
164
|
+
queuedWork: ThreadQueuedWork;
|
|
165
|
+
/** The agent is blocked on the user: an approval or a question. */
|
|
166
|
+
hasPendingInteraction: boolean;
|
|
167
|
+
activity: PluginSidebarThreadActivity;
|
|
168
|
+
indicator: PluginSidebarThreadIndicator;
|
|
169
|
+
/**
|
|
170
|
+
* The host's accessible label for `indicator`, e.g. "Thread needs user
|
|
171
|
+
* input"; null when the indicator is "none". Use it for `aria-label` so
|
|
172
|
+
* screen-reader text stays consistent across sidebars.
|
|
173
|
+
*/
|
|
174
|
+
indicatorLabel: string | null;
|
|
175
|
+
isUnread: boolean;
|
|
176
|
+
isPinned: boolean;
|
|
177
|
+
/** When the thread was pinned (epoch ms); null when unpinned. */
|
|
178
|
+
pinnedAt: number | null;
|
|
179
|
+
/**
|
|
180
|
+
* The user's manual order among pinned threads (lexicographic, ascending);
|
|
181
|
+
* null for an unpinned thread or a pin that has never been reordered, which
|
|
182
|
+
* bb's list sorts after keyed pins by `pinnedAt`.
|
|
183
|
+
*/
|
|
184
|
+
pinSortKey: string | null;
|
|
185
|
+
isArchived: boolean;
|
|
186
|
+
/** When the thread was archived (epoch ms); null when not archived. */
|
|
187
|
+
archivedAt: number | null;
|
|
188
|
+
/**
|
|
189
|
+
* The app-relative URL bb opens for this thread, e.g.
|
|
190
|
+
* `/projects/<projectId>/threads/<id>`. Put it on your row's anchor: the
|
|
191
|
+
* host routes a plain click in place, and middle-click, copy-link, and
|
|
192
|
+
* open-in-new-window work without further code.
|
|
193
|
+
*/
|
|
194
|
+
href: string;
|
|
195
|
+
/**
|
|
196
|
+
* True for threads bb keeps out of its own list (internal helper threads a
|
|
197
|
+
* plugin spawned with `visibility: "hidden"`). The array includes them so a
|
|
198
|
+
* list that wants them can show them; bb's list filters them out.
|
|
199
|
+
*/
|
|
200
|
+
isHidden: boolean;
|
|
201
|
+
environment: {
|
|
202
|
+
id: string | null;
|
|
203
|
+
name: string | null;
|
|
204
|
+
branchName: string | null;
|
|
205
|
+
/** The checkout's absolute path on its host; null when unknown. */
|
|
206
|
+
path: string | null;
|
|
207
|
+
/**
|
|
208
|
+
* True when the environment is a git worktree, which is what bb's
|
|
209
|
+
* "group by environment" clusters; false for a plain checkout; null when
|
|
210
|
+
* unknown.
|
|
211
|
+
*/
|
|
212
|
+
isWorktree: boolean | null;
|
|
213
|
+
/**
|
|
214
|
+
* The id of the environment provider that produced this environment, or
|
|
215
|
+
* null for a project's own checkout. Resolve it against
|
|
216
|
+
* `GET /system/environment-providers` for a display name and icon.
|
|
217
|
+
*/
|
|
218
|
+
providerId: string | null;
|
|
219
|
+
/** @deprecated Use providerId and the environment provider catalog instead. */
|
|
220
|
+
workspaceDisplayKind: EnvironmentWorkspaceDisplayKind | null;
|
|
221
|
+
} | null;
|
|
222
|
+
/**
|
|
223
|
+
* The machine this thread's work runs on, with the name resolved for you.
|
|
224
|
+
* Null when the thread has no environment yet, or when its host is not in
|
|
225
|
+
* the known-hosts list. Useful where a thread has no branch to show — a
|
|
226
|
+
* personal-project thread has a machine but no worktree.
|
|
227
|
+
*/
|
|
228
|
+
host: {
|
|
229
|
+
id: string;
|
|
230
|
+
name: string;
|
|
231
|
+
} | null;
|
|
232
|
+
createdAt: number;
|
|
233
|
+
updatedAt: number;
|
|
234
|
+
lastReadAt: number | null;
|
|
235
|
+
latestAttentionAt: number;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* The fields of a {@link PluginSidebarThread} that
|
|
239
|
+
* {@link PluginSdkApp.experimental_resolveThreadStatus} reads.
|
|
240
|
+
*/
|
|
241
|
+
type PluginThreadStatusThread = Pick<PluginSidebarThread, "activity" | "hasPendingInteraction" | "isUnread" | "parentThreadId" | "queuedWork" | "runtimeStatus" | "status">;
|
|
242
|
+
/** Input for {@link PluginSdkApp.experimental_resolveThreadStatus}. */
|
|
243
|
+
interface PluginThreadStatusInput {
|
|
244
|
+
/**
|
|
245
|
+
* The row's own thread, or null for a group row (a collapsed section,
|
|
246
|
+
* project, or environment) that stands only for `hiddenThreads`.
|
|
247
|
+
*/
|
|
248
|
+
thread: PluginThreadStatusThread | null;
|
|
249
|
+
/**
|
|
250
|
+
* Threads the row stands for while they are hidden, such as a collapsed
|
|
251
|
+
* parent's sub-threads. Their attention and work count toward the row;
|
|
252
|
+
* their queued messages do not. Pass an empty array when nothing is hidden.
|
|
253
|
+
*/
|
|
254
|
+
hiddenThreads: readonly PluginThreadStatusThread[];
|
|
255
|
+
/**
|
|
256
|
+
* Whether the composer holds an unsent draft for `thread` or any of
|
|
257
|
+
* `hiddenThreads` (see {@link PluginSdkApp.useSidebarThreadDraft}).
|
|
258
|
+
*/
|
|
259
|
+
hasUnsubmittedDraft: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* The status another plugin set on the row (see
|
|
262
|
+
* {@link PluginSdkApp.useSidebarThreadRowStatus}), or null.
|
|
263
|
+
*/
|
|
264
|
+
rowStatus: PluginSidebarThreadRowStatus | null;
|
|
265
|
+
}
|
|
266
|
+
/** What bb's lists draw for a row (see {@link PluginThreadStatusInput}). */
|
|
267
|
+
interface PluginThreadStatus {
|
|
268
|
+
indicator: PluginSidebarThreadIndicator;
|
|
269
|
+
/**
|
|
270
|
+
* The input `rowStatus` when it shows in place of `indicator`: it replaces
|
|
271
|
+
* every indicator except "runtime", "unread-error", and
|
|
272
|
+
* "waiting-for-input". Null otherwise.
|
|
273
|
+
*/
|
|
274
|
+
rowStatus: PluginSidebarThreadRowStatus | null;
|
|
275
|
+
/**
|
|
276
|
+
* The accessible label for what shows: `rowStatus`'s label, else the
|
|
277
|
+
* indicator's; null when nothing shows.
|
|
278
|
+
*/
|
|
279
|
+
label: string | null;
|
|
280
|
+
/**
|
|
281
|
+
* Whether the row's thread or a hidden thread is working, or the input
|
|
282
|
+
* `rowStatus` has the "running" tone.
|
|
283
|
+
*/
|
|
284
|
+
isWorking: boolean;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* The status another plugin's app-wide script set on a thread's row through
|
|
288
|
+
* the content-script context's `experimental_setThreadRowStatus` (see
|
|
289
|
+
* {@link PluginSdkApp.useSidebarThreadRowStatus}). bb's row draws it in
|
|
290
|
+
* place of the draft glyph while it is set; a replaced list should do the
|
|
291
|
+
* same so a status set by, say, the drafts or workflows plugin does not
|
|
292
|
+
* vanish when the list changes hands.
|
|
293
|
+
*/
|
|
294
|
+
type PluginSidebarThreadRowStatus = PluginComposerThreadRowStatus;
|
|
295
|
+
/** Host-rendered status that temporarily replaces a thread's draft glyph. */
|
|
296
|
+
interface PluginComposerThreadRowStatus {
|
|
297
|
+
/**
|
|
298
|
+
* Always drawn as given: unlike the plugin-badged surfaces, this one has no
|
|
299
|
+
* preference for the plugin's own `bb.branding.icon`.
|
|
300
|
+
*/
|
|
301
|
+
icon: BbIconName;
|
|
302
|
+
/** Accessible label for the status glyph. */
|
|
303
|
+
label: string;
|
|
304
|
+
/**
|
|
305
|
+
* Semantic host treatment for the status glyph. `running` automatically
|
|
306
|
+
* shimmers; terminal `success` and `error` tones are static. Defaults to the
|
|
307
|
+
* neutral tone.
|
|
308
|
+
*/
|
|
309
|
+
tone?: "default" | "error" | "running" | "success";
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
declare function threadIndicatorLabel(indicator: PluginSidebarThreadIndicator): string | null;
|
|
313
|
+
declare function visibleThreadRowStatus(indicator: PluginSidebarThreadIndicator, rowStatus: PluginSidebarThreadRowStatus | null): PluginSidebarThreadRowStatus | null;
|
|
314
|
+
declare function experimental_resolveThreadStatus({ thread, hiddenThreads, hasUnsubmittedDraft, rowStatus, }: PluginThreadStatusInput): PluginThreadStatus;
|
|
315
|
+
|
|
316
|
+
export { experimental_resolveThreadStatus, threadIndicatorLabel, visibleThreadRowStatus };
|
|
@@ -440,7 +440,8 @@ interface AcpDialect {
|
|
|
440
440
|
toolIdentity?(event: AcpToolCallUpdateEvent): AcpToolIdentity | undefined;
|
|
441
441
|
classifyToolCall?(event: AcpToolCallUpdateEvent): AcpClassifiedToolCall | undefined;
|
|
442
442
|
commandResult?(event: AcpToolCallUpdateEvent): AcpCommandResult | undefined;
|
|
443
|
-
normalizeCommandEvent?(event: AcpToolCallUpdateEvent): AcpToolCallUpdateEvent;
|
|
443
|
+
normalizeCommandEvent?(event: AcpToolCallUpdateEvent, call: AcpToolCallUpdateEvent): AcpToolCallUpdateEvent;
|
|
444
|
+
normalizeToolCallEvent?(event: AcpToolCallUpdateEvent, call: AcpToolCallUpdateEvent): AcpToolCallUpdateEvent;
|
|
444
445
|
readonly clientRequestMethods?: readonly string[];
|
|
445
446
|
handleClientRequest?(method: string, params: unknown): AcpClientRequestOutcome | undefined;
|
|
446
447
|
maintenance?: AcpMaintenanceDialect;
|
|
@@ -583,6 +584,14 @@ interface AgentModelCatalog {
|
|
|
583
584
|
* });
|
|
584
585
|
* ```
|
|
585
586
|
*
|
|
587
|
+
* `normalizeCommandEvent` and `normalizeToolCallEvent` rewrite a tool call
|
|
588
|
+
* update before bb reads its output: command output and exit code for the
|
|
589
|
+
* first, progress and result text for every other tool. Each receives the
|
|
590
|
+
* update and the call: everything the agent has reported for that tool call
|
|
591
|
+
* so far, this update included. A dialect can therefore judge an update by
|
|
592
|
+
* the call's `rawInput` without keeping per-call state; the two arguments
|
|
593
|
+
* are the same event when the call closes.
|
|
594
|
+
*
|
|
586
595
|
* The registration then names it: `acpDialect: "amp"`. A built-in id cannot
|
|
587
596
|
* be replaced, and an id nothing registered falls back to the generic
|
|
588
597
|
* dialect. The registry is one per host artifact, and a dialect's hooks are
|
|
@@ -440,7 +440,8 @@ interface AcpDialect {
|
|
|
440
440
|
toolIdentity?(event: AcpToolCallUpdateEvent): AcpToolIdentity | undefined;
|
|
441
441
|
classifyToolCall?(event: AcpToolCallUpdateEvent): AcpClassifiedToolCall | undefined;
|
|
442
442
|
commandResult?(event: AcpToolCallUpdateEvent): AcpCommandResult | undefined;
|
|
443
|
-
normalizeCommandEvent?(event: AcpToolCallUpdateEvent): AcpToolCallUpdateEvent;
|
|
443
|
+
normalizeCommandEvent?(event: AcpToolCallUpdateEvent, call: AcpToolCallUpdateEvent): AcpToolCallUpdateEvent;
|
|
444
|
+
normalizeToolCallEvent?(event: AcpToolCallUpdateEvent, call: AcpToolCallUpdateEvent): AcpToolCallUpdateEvent;
|
|
444
445
|
readonly clientRequestMethods?: readonly string[];
|
|
445
446
|
handleClientRequest?(method: string, params: unknown): AcpClientRequestOutcome | undefined;
|
|
446
447
|
maintenance?: AcpMaintenanceDialect;
|
|
@@ -584,6 +585,14 @@ interface AgentModelCatalog {
|
|
|
584
585
|
* });
|
|
585
586
|
* ```
|
|
586
587
|
*
|
|
588
|
+
* `normalizeCommandEvent` and `normalizeToolCallEvent` rewrite a tool call
|
|
589
|
+
* update before bb reads its output: command output and exit code for the
|
|
590
|
+
* first, progress and result text for every other tool. Each receives the
|
|
591
|
+
* update and the call: everything the agent has reported for that tool call
|
|
592
|
+
* so far, this update included. A dialect can therefore judge an update by
|
|
593
|
+
* the call's `rawInput` without keeping per-call state; the two arguments
|
|
594
|
+
* are the same event when the call closes.
|
|
595
|
+
*
|
|
587
596
|
* The registration then names it: `acpDialect: "amp"`. A built-in id cannot
|
|
588
597
|
* be replaced, and an id nothing registered falls back to the generic
|
|
589
598
|
* dialect. The registry is one per host artifact, and a dialect's hooks are
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and read the real source: https://github.com/get-bb/bb
|
|
7
7
|
|
|
8
8
|
import * as _get_bb_plugin_sdk from '@get-bb/plugin-sdk';
|
|
9
|
-
import { ExperimentalSidebarFooterItemRegistration, PluginNavPanelRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadContextCardRowRegistration, ExperimentalThreadContextCardSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalMessageMetadataRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, ExperimentalThreadContextKind, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalComposerRendererApi, ExperimentalSidebarNavigationItem, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState, ExperimentalLiveFileTarget, ExperimentalServers, ExperimentalPanelController, ExperimentalPanelTabs, JsonValue, ExperimentalPageTitle, ExperimentalOpenTabOptions, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationTarget } from '@get-bb/plugin-sdk';
|
|
9
|
+
import { ExperimentalSidebarFooterItemRegistration, PluginNavPanelRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, InternalDoNotUseSetupGuideSectionRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadContextCardRowRegistration, ExperimentalThreadContextCardSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalMessageMetadataRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, ExperimentalThreadContextKind, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalComposerRendererApi, ExperimentalSidebarNavigationItem, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState, ExperimentalLiveFileTarget, ExperimentalServers, ExperimentalPanelController, ExperimentalPanelTabs, JsonValue, ExperimentalPageTitle, ExperimentalOpenTabOptions, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationTarget } from '@get-bb/plugin-sdk';
|
|
10
10
|
import { ComponentType, ReactNode } from 'react';
|
|
11
11
|
import { RenderResult } from '@testing-library/react';
|
|
12
12
|
|
|
@@ -228,6 +228,7 @@ interface CapturedPluginApp {
|
|
|
228
228
|
homepageSections: PluginHomepageSectionRegistration[];
|
|
229
229
|
settingsSections: PluginSettingsSectionRegistration[];
|
|
230
230
|
appOverlays: ExperimentalAppOverlayRegistration[];
|
|
231
|
+
setupGuideSections: InternalDoNotUseSetupGuideSectionRegistration[];
|
|
231
232
|
navPanels: LegacyNavPanelRegistration[];
|
|
232
233
|
tabs: ExperimentalTabRegistration[];
|
|
233
234
|
threadPanelActions: LegacyThreadPanelActionRegistration[];
|