@get-bb/plugin-sdk 0.6.146 → 0.6.157
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/LICENSE +21 -0
- package/README.md +4 -1
- package/bundled-types/bb-plugin-sdk-app.d.ts +20 -14
- package/bundled-types/bb-plugin-sdk-testing.d.ts +91 -2
- package/bundled-types/bb-plugin-sdk.d.ts +20 -14
- package/dist/host.js +1 -1
- package/dist/internal/rpc-query-host.js +27 -18
- package/dist/process.js +1 -1
- package/dist/provider-bridge-acp-next.js +1250 -1058
- package/dist/provider-bridge-acp.js +1250 -1058
- package/dist/provider-bridge-testing.js +10 -4
- package/dist/provider-bridge-worker-entry.mjs +9 -3
- package/dist/provider-bridge.js +51 -5
- package/dist/replay-provider-child.mjs +82 -0
- package/dist/testing/app.js +27 -18
- package/dist/testing/index.js +258 -11
- package/package.json +3 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Michael Yong
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -106,7 +106,10 @@ a React slot. The host supplies `{ pluginId, generation, signal }`, awaits
|
|
|
106
106
|
mount setup, and owns abort plus exact-once reverse-order disposal across hash
|
|
107
107
|
reload, disable, removal, failed replacement, and app-window teardown. The old
|
|
108
108
|
generation is disposed before candidate mounts, so generations never overlap.
|
|
109
|
-
|
|
109
|
+
When the page unloads, the host aborts and cleans up content scripts but leaves
|
|
110
|
+
slot components mounted for the browser to discard, so React effect cleanups do
|
|
111
|
+
not run at unload. Save state as it changes, or flush it from a content script
|
|
112
|
+
cleanup. Content scripts are trusted same-origin page code, not a sandbox.
|
|
110
113
|
|
|
111
114
|
Static styles should stay in the normal imported `app.css`. The host keeps
|
|
112
115
|
that stylesheet active while the plugin has rendered slot, panel-header, or
|
|
@@ -151,6 +151,7 @@ declare const appSettingsSchema: z$1.ZodObject<{
|
|
|
151
151
|
flat: "flat";
|
|
152
152
|
}>>;
|
|
153
153
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
154
|
+
resumeThreadsAfterRestart: z$1.ZodBoolean;
|
|
154
155
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
155
156
|
showKeyboardHints: z$1.ZodBoolean;
|
|
156
157
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -177,6 +178,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
177
178
|
flat: "flat";
|
|
178
179
|
}>>;
|
|
179
180
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
181
|
+
resumeThreadsAfterRestart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
180
182
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
181
183
|
showKeyboardHints: z$1.ZodBoolean;
|
|
182
184
|
showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -202,6 +204,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
202
204
|
flat: "flat";
|
|
203
205
|
}>>;
|
|
204
206
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
207
|
+
resumeThreadsAfterRestart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
205
208
|
showKeyboardHints: z$1.ZodBoolean;
|
|
206
209
|
showUnhandledProviderEvents: z$1.ZodBoolean;
|
|
207
210
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -610,30 +613,26 @@ type Environment = z$1.infer<typeof environmentSchema>;
|
|
|
610
613
|
declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
611
614
|
agentCpuPriority: "agentCpuPriority";
|
|
612
615
|
compactExpiredCache: "compactExpiredCache";
|
|
613
|
-
|
|
616
|
+
keyedPluginCss: "keyedPluginCss";
|
|
614
617
|
performanceDiagnostics: "performanceDiagnostics";
|
|
615
618
|
pluginUpdates: "pluginUpdates";
|
|
616
|
-
|
|
619
|
+
resumeDaemonSessions: "resumeDaemonSessions";
|
|
617
620
|
serverMove: "serverMove";
|
|
618
621
|
skipFocusedThreadNotifications: "skipFocusedThreadNotifications";
|
|
619
622
|
threadContextCard: "threadContextCard";
|
|
620
|
-
threadRowMetadata: "threadRowMetadata";
|
|
621
|
-
updateWhenIdle: "updateWhenIdle";
|
|
622
623
|
walCheckpointWorker: "walCheckpointWorker";
|
|
623
624
|
}>, z$1.ZodBoolean>;
|
|
624
625
|
type Experiments = z$1.infer<typeof experimentsSchema>;
|
|
625
626
|
declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
626
627
|
agentCpuPriority: "agentCpuPriority";
|
|
627
628
|
compactExpiredCache: "compactExpiredCache";
|
|
628
|
-
|
|
629
|
+
keyedPluginCss: "keyedPluginCss";
|
|
629
630
|
performanceDiagnostics: "performanceDiagnostics";
|
|
630
631
|
pluginUpdates: "pluginUpdates";
|
|
631
|
-
|
|
632
|
+
resumeDaemonSessions: "resumeDaemonSessions";
|
|
632
633
|
serverMove: "serverMove";
|
|
633
634
|
skipFocusedThreadNotifications: "skipFocusedThreadNotifications";
|
|
634
635
|
threadContextCard: "threadContextCard";
|
|
635
|
-
threadRowMetadata: "threadRowMetadata";
|
|
636
|
-
updateWhenIdle: "updateWhenIdle";
|
|
637
636
|
walCheckpointWorker: "walCheckpointWorker";
|
|
638
637
|
}> & z$1.core.$partial, z$1.ZodBoolean>;
|
|
639
638
|
type ExperimentUpdates = z$1.infer<typeof experimentUpdatesSchema>;
|
|
@@ -6710,6 +6709,10 @@ declare const hostDaemonCommandRegistry: {
|
|
|
6710
6709
|
}, z$1.core.$strict>;
|
|
6711
6710
|
}, z$1.core.$strip>, "settled", false>;
|
|
6712
6711
|
"thread.stop": HostDaemonCommandDescriptor<"thread.stop", z$1.ZodObject<{
|
|
6712
|
+
aimedAt: z$1.ZodNullable<z$1.ZodObject<{
|
|
6713
|
+
requestIds: z$1.ZodArray<z$1.ZodString>;
|
|
6714
|
+
turnId: z$1.ZodNullable<z$1.ZodString>;
|
|
6715
|
+
}, z$1.core.$strict>>;
|
|
6713
6716
|
environmentId: z$1.ZodString;
|
|
6714
6717
|
intent: z$1.ZodEnum<{
|
|
6715
6718
|
interrupt: "interrupt";
|
|
@@ -7651,6 +7654,7 @@ declare const hostDaemonCommandRegistry: {
|
|
|
7651
7654
|
equal: "equal";
|
|
7652
7655
|
unknown: "unknown";
|
|
7653
7656
|
}>>;
|
|
7657
|
+
defaultWorktreeBaseBranch: z$1.ZodNullable<z$1.ZodString>;
|
|
7654
7658
|
hasUncommittedChanges: z$1.ZodBoolean;
|
|
7655
7659
|
isWorktree: z$1.ZodBoolean;
|
|
7656
7660
|
operation: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
@@ -10715,15 +10719,13 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10715
10719
|
experiments: z$1.ZodRecord<z$1.ZodEnum<{
|
|
10716
10720
|
agentCpuPriority: "agentCpuPriority";
|
|
10717
10721
|
compactExpiredCache: "compactExpiredCache";
|
|
10718
|
-
|
|
10722
|
+
keyedPluginCss: "keyedPluginCss";
|
|
10719
10723
|
performanceDiagnostics: "performanceDiagnostics";
|
|
10720
10724
|
pluginUpdates: "pluginUpdates";
|
|
10721
|
-
|
|
10725
|
+
resumeDaemonSessions: "resumeDaemonSessions";
|
|
10722
10726
|
serverMove: "serverMove";
|
|
10723
10727
|
skipFocusedThreadNotifications: "skipFocusedThreadNotifications";
|
|
10724
10728
|
threadContextCard: "threadContextCard";
|
|
10725
|
-
threadRowMetadata: "threadRowMetadata";
|
|
10726
|
-
updateWhenIdle: "updateWhenIdle";
|
|
10727
10729
|
walCheckpointWorker: "walCheckpointWorker";
|
|
10728
10730
|
}>, z$1.ZodBoolean>;
|
|
10729
10731
|
featureFlags: z$1.ZodObject<{
|
|
@@ -10748,6 +10750,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10748
10750
|
flat: "flat";
|
|
10749
10751
|
}>>;
|
|
10750
10752
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
10753
|
+
resumeThreadsAfterRestart: z$1.ZodBoolean;
|
|
10751
10754
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
10752
10755
|
showKeyboardHints: z$1.ZodBoolean;
|
|
10753
10756
|
showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -16680,6 +16683,10 @@ declare const threadTimelineReadResponseSchema: z$1.ZodUnion<readonly [z$1.ZodOb
|
|
|
16680
16683
|
returnedSegmentCount: z$1.ZodOptional<z$1.ZodNumber>;
|
|
16681
16684
|
}, z$1.core.$strict>>;
|
|
16682
16685
|
}, z$1.core.$strip>;
|
|
16686
|
+
patchRows: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
16687
|
+
id: z$1.ZodString;
|
|
16688
|
+
ops: z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodTuple<[z$1.ZodLiteral<"append">, z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodNumber]>>, z$1.ZodString], null>, z$1.ZodTuple<[z$1.ZodLiteral<"set">, z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodNumber]>>, z$1.ZodUnknown], null>, z$1.ZodTuple<[z$1.ZodLiteral<"delete">, z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodNumber]>>], null>]>>;
|
|
16689
|
+
}, z$1.core.$strip>>>;
|
|
16683
16690
|
rowOrder: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodTuple<[z$1.ZodNumber, z$1.ZodNumber], null>]>>>;
|
|
16684
16691
|
upsertRows: z$1.ZodArray<z$1.ZodType<TimelineRow, unknown, z$1.core.$ZodTypeInternals<TimelineRow, unknown>>>;
|
|
16685
16692
|
}, z$1.core.$strip>;
|
|
@@ -21108,8 +21115,7 @@ interface ExperimentalThreadRowMetadataDataInput {
|
|
|
21108
21115
|
/**
|
|
21109
21116
|
* A small item on a thread row's metadata line, under the title: a badge, not
|
|
21110
21117
|
* a control. Items share one line, left to right, and the line clips at the
|
|
21111
|
-
* row's edge. bb's sidebar draws the line
|
|
21112
|
-
* experiment is on and the user turns on Organize → Rows → Metadata, and only
|
|
21118
|
+
* row's edge. bb's sidebar draws the line when the user turns on Organize → Rows → Metadata, and only
|
|
21113
21119
|
* on rows where an item shows something.
|
|
21114
21120
|
* Load the line's data in `useData`, a React hook bb calls once for the
|
|
21115
21121
|
* whole app while any list draws a metadata line, never per row; it
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { StandardSchemaV1 as StandardSchemaV1$1, StandardSchemaV1InferOutput as StandardSchemaV1InferOutput$1, 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, InternalDoNotUsePluginNextTunnelConfig, InternalDoNotUsePluginHostNextTunnelStatus, PluginInteractionRequest, ExperimentalPanelController, MessageDispatchHookContext } from '@get-bb/plugin-sdk';
|
|
9
9
|
import { z } from 'zod';
|
|
10
|
+
import { ChildProcess } from 'node:child_process';
|
|
10
11
|
|
|
11
12
|
type PluginMachineProviderResource = Exclude<JsonValue$2, null>;
|
|
12
13
|
type PluginMachineProviderInputsSchema = StandardSchemaV1$1 | undefined;
|
|
@@ -1603,5 +1604,93 @@ interface PublicSdkOnlyScan {
|
|
|
1603
1604
|
*/
|
|
1604
1605
|
declare function scanPublicSdkOnly(packageRoot: string, options?: PublicSdkOnlyScanOptions): PublicSdkOnlyScan;
|
|
1605
1606
|
|
|
1606
|
-
|
|
1607
|
-
|
|
1607
|
+
interface ChildProcessTracker {
|
|
1608
|
+
readonly children: readonly ChildProcess[];
|
|
1609
|
+
running(): ChildProcess[];
|
|
1610
|
+
waitForExit(): Promise<void>;
|
|
1611
|
+
waitForClose(): Promise<void>;
|
|
1612
|
+
killRunning(signal?: NodeJS.Signals): void;
|
|
1613
|
+
dispose(): void;
|
|
1614
|
+
[Symbol.dispose](): void;
|
|
1615
|
+
}
|
|
1616
|
+
interface LifelineHolder {
|
|
1617
|
+
readonly label: string;
|
|
1618
|
+
readonly pid: number;
|
|
1619
|
+
readonly exited: Promise<void>;
|
|
1620
|
+
alive(): boolean;
|
|
1621
|
+
kill(signal?: NodeJS.Signals): boolean;
|
|
1622
|
+
}
|
|
1623
|
+
interface ProcessLifeline {
|
|
1624
|
+
readonly path: string;
|
|
1625
|
+
readonly holders: readonly LifelineHolder[];
|
|
1626
|
+
holdSource(label: string, onHeld?: string): string;
|
|
1627
|
+
waitForHolders(count: number): Promise<readonly LifelineHolder[]>;
|
|
1628
|
+
close(): Promise<void>;
|
|
1629
|
+
}
|
|
1630
|
+
interface DescendantPipe {
|
|
1631
|
+
readonly path: string;
|
|
1632
|
+
readonly opened: Promise<void>;
|
|
1633
|
+
readonly closed: Promise<void>;
|
|
1634
|
+
dispose(): Promise<void>;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
* Every `ChildProcess` spawned anywhere in this process (Node's
|
|
1639
|
+
* `child_process` diagnostics channel) after tracking starts. `children` lists
|
|
1640
|
+
* them in spawn order; `running()` excludes those with an exit code or signal;
|
|
1641
|
+
* `waitForExit()` resolves once all have exited, including any spawned while
|
|
1642
|
+
* waiting; `waitForClose()` also waits for each child's stdio to close, which
|
|
1643
|
+
* an unread piped stream can delay indefinitely; `killRunning()` signals the ones still running (SIGKILL by default);
|
|
1644
|
+
* `dispose()` stops recording.
|
|
1645
|
+
*/
|
|
1646
|
+
type ExperimentalChildProcessTracker = ChildProcessTracker;
|
|
1647
|
+
/**
|
|
1648
|
+
* A process connected to a lifeline. `pid` is the PID it reported, `label` the
|
|
1649
|
+
* label passed to `holdSource`. `exited` resolves and `alive()` turns false when
|
|
1650
|
+
* its connection closes, which the operating system does when it exits.
|
|
1651
|
+
* `kill(signal)` sends a signal (SIGKILL by default) only while the connection
|
|
1652
|
+
* is open, so a recycled PID is never signalled; it returns whether it sent.
|
|
1653
|
+
*/
|
|
1654
|
+
type ExperimentalLifelineHolder = LifelineHolder;
|
|
1655
|
+
/**
|
|
1656
|
+
* A local socket (a named pipe on Windows), at `path`, that processes the test
|
|
1657
|
+
* did not spawn itself connect to. `holdSource(label, onHeld?)` is a JavaScript
|
|
1658
|
+
* statement, with the path embedded, that connects the Node process running it;
|
|
1659
|
+
* embed it in a descendant's script. The optional `onHeld` statement runs once
|
|
1660
|
+
* the lifeline has registered the holder, for a script that blocks next.
|
|
1661
|
+
* `holders` lists connected processes in connection order, and
|
|
1662
|
+
* `waitForHolders(count)` resolves once that many have connected. `close()`
|
|
1663
|
+
* kills holders still connected, waits for them to exit, and removes the
|
|
1664
|
+
* socket.
|
|
1665
|
+
*/
|
|
1666
|
+
type ExperimentalProcessLifeline = ProcessLifeline;
|
|
1667
|
+
/**
|
|
1668
|
+
* Starts recording the child processes this process spawns, so a test can
|
|
1669
|
+
* assert that a process exited from its `ChildProcess` state instead of probing
|
|
1670
|
+
* a PID the operating system may have reused. Experimental: see
|
|
1671
|
+
* docs/api_to_audit.md.
|
|
1672
|
+
*/
|
|
1673
|
+
declare function experimental_trackChildProcesses(): ExperimentalChildProcessTracker;
|
|
1674
|
+
/**
|
|
1675
|
+
* Creates a lifeline for observing descendants and other processes the test
|
|
1676
|
+
* did not spawn, by the lifetime of a connection they hold rather than by PID.
|
|
1677
|
+
* Experimental: see docs/api_to_audit.md.
|
|
1678
|
+
*/
|
|
1679
|
+
declare function experimental_createProcessLifeline(): Promise<ExperimentalProcessLifeline>;
|
|
1680
|
+
/**
|
|
1681
|
+
* A POSIX named pipe at `path` for shell descendants that cannot run Node:
|
|
1682
|
+
* redirect one into it (`sleep 60 > "$pipe" &`). `opened` resolves once a
|
|
1683
|
+
* descendant has opened it for writing, and `closed` once every process holding
|
|
1684
|
+
* it has exited. `dispose()` releases a reader no descendant opened and removes
|
|
1685
|
+
* the pipe.
|
|
1686
|
+
*/
|
|
1687
|
+
type ExperimentalDescendantPipe = DescendantPipe;
|
|
1688
|
+
/**
|
|
1689
|
+
* Creates a named pipe that observes shell descendants by the lifetime of the
|
|
1690
|
+
* write end they inherit, with no startup cost of its own. POSIX only; it
|
|
1691
|
+
* throws on Windows. Experimental: see docs/api_to_audit.md.
|
|
1692
|
+
*/
|
|
1693
|
+
declare function experimental_createDescendantPipe(): Promise<ExperimentalDescendantPipe>;
|
|
1694
|
+
|
|
1695
|
+
export { PluginContextStaleError, createFakePluginHost, createFakeSdk, experimental_createDescendantPipe, experimental_createProcessLifeline, makePanelController as experimental_makePanelController, scanPublicSdkOnly as experimental_scanPublicSdkOnly, experimental_trackChildProcesses, makeHostResponse, makeMessageDispatchHookContext, makePluginAgentConfigurationContext, makeQueueEntry, makeThreadResponse, makeTurnFailedEvent };
|
|
1696
|
+
export type { CreateFakePluginHostOptions, ExperimentalChildProcessTracker, ExperimentalDescendantPipe, ExperimentalFakeHostRpcCall, ExperimentalLifelineHolder, ExperimentalProcessLifeline, FakeAgentToolRecord, FakeCliRecord, FakeHttpRouteRecord, FakeLogEntry, FakeLogLevel, FakeMentionProviderRecord, FakePluginBehaviorDrivers, FakePluginHarness, FakePluginHost, FakePluginInspectionState, FakePluginLifecycleControls, FakePluginRegistrations, FakeRealtimeSignal, FakeScheduleRecord, FakeSdkCall, FakeSdkHarness, FakeSdkOverrides, FakeServiceRecord, InternalDoNotUseFakeTunnelIngress, PublicSdkOnlyScan, PublicSdkOnlyScanOptions, PublicSdkOnlyViolation };
|
|
@@ -236,6 +236,7 @@ declare const appSettingsSchema: z$1.ZodObject<{
|
|
|
236
236
|
flat: "flat";
|
|
237
237
|
}>>;
|
|
238
238
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
239
|
+
resumeThreadsAfterRestart: z$1.ZodBoolean;
|
|
239
240
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
240
241
|
showKeyboardHints: z$1.ZodBoolean;
|
|
241
242
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -262,6 +263,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
262
263
|
flat: "flat";
|
|
263
264
|
}>>;
|
|
264
265
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
266
|
+
resumeThreadsAfterRestart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
265
267
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
266
268
|
showKeyboardHints: z$1.ZodBoolean;
|
|
267
269
|
showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -287,6 +289,7 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
287
289
|
flat: "flat";
|
|
288
290
|
}>>;
|
|
289
291
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
292
|
+
resumeThreadsAfterRestart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
290
293
|
showKeyboardHints: z$1.ZodBoolean;
|
|
291
294
|
showUnhandledProviderEvents: z$1.ZodBoolean;
|
|
292
295
|
steerActiveThreadOnEnter: z$1.ZodBoolean;
|
|
@@ -701,30 +704,26 @@ type Environment = z$1.infer<typeof environmentSchema>;
|
|
|
701
704
|
declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
702
705
|
agentCpuPriority: "agentCpuPriority";
|
|
703
706
|
compactExpiredCache: "compactExpiredCache";
|
|
704
|
-
|
|
707
|
+
keyedPluginCss: "keyedPluginCss";
|
|
705
708
|
performanceDiagnostics: "performanceDiagnostics";
|
|
706
709
|
pluginUpdates: "pluginUpdates";
|
|
707
|
-
|
|
710
|
+
resumeDaemonSessions: "resumeDaemonSessions";
|
|
708
711
|
serverMove: "serverMove";
|
|
709
712
|
skipFocusedThreadNotifications: "skipFocusedThreadNotifications";
|
|
710
713
|
threadContextCard: "threadContextCard";
|
|
711
|
-
threadRowMetadata: "threadRowMetadata";
|
|
712
|
-
updateWhenIdle: "updateWhenIdle";
|
|
713
714
|
walCheckpointWorker: "walCheckpointWorker";
|
|
714
715
|
}>, z$1.ZodBoolean>;
|
|
715
716
|
type Experiments = z$1.infer<typeof experimentsSchema>;
|
|
716
717
|
declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
717
718
|
agentCpuPriority: "agentCpuPriority";
|
|
718
719
|
compactExpiredCache: "compactExpiredCache";
|
|
719
|
-
|
|
720
|
+
keyedPluginCss: "keyedPluginCss";
|
|
720
721
|
performanceDiagnostics: "performanceDiagnostics";
|
|
721
722
|
pluginUpdates: "pluginUpdates";
|
|
722
|
-
|
|
723
|
+
resumeDaemonSessions: "resumeDaemonSessions";
|
|
723
724
|
serverMove: "serverMove";
|
|
724
725
|
skipFocusedThreadNotifications: "skipFocusedThreadNotifications";
|
|
725
726
|
threadContextCard: "threadContextCard";
|
|
726
|
-
threadRowMetadata: "threadRowMetadata";
|
|
727
|
-
updateWhenIdle: "updateWhenIdle";
|
|
728
727
|
walCheckpointWorker: "walCheckpointWorker";
|
|
729
728
|
}> & z$1.core.$partial, z$1.ZodBoolean>;
|
|
730
729
|
type ExperimentUpdates = z$1.infer<typeof experimentUpdatesSchema>;
|
|
@@ -6925,6 +6924,10 @@ declare const hostDaemonCommandRegistry: {
|
|
|
6925
6924
|
}, z$1.core.$strict>;
|
|
6926
6925
|
}, z$1.core.$strip>, "settled", false>;
|
|
6927
6926
|
"thread.stop": HostDaemonCommandDescriptor<"thread.stop", z$1.ZodObject<{
|
|
6927
|
+
aimedAt: z$1.ZodNullable<z$1.ZodObject<{
|
|
6928
|
+
requestIds: z$1.ZodArray<z$1.ZodString>;
|
|
6929
|
+
turnId: z$1.ZodNullable<z$1.ZodString>;
|
|
6930
|
+
}, z$1.core.$strict>>;
|
|
6928
6931
|
environmentId: z$1.ZodString;
|
|
6929
6932
|
intent: z$1.ZodEnum<{
|
|
6930
6933
|
interrupt: "interrupt";
|
|
@@ -7866,6 +7869,7 @@ declare const hostDaemonCommandRegistry: {
|
|
|
7866
7869
|
equal: "equal";
|
|
7867
7870
|
unknown: "unknown";
|
|
7868
7871
|
}>>;
|
|
7872
|
+
defaultWorktreeBaseBranch: z$1.ZodNullable<z$1.ZodString>;
|
|
7869
7873
|
hasUncommittedChanges: z$1.ZodBoolean;
|
|
7870
7874
|
isWorktree: z$1.ZodBoolean;
|
|
7871
7875
|
operation: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
@@ -10930,15 +10934,13 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10930
10934
|
experiments: z$1.ZodRecord<z$1.ZodEnum<{
|
|
10931
10935
|
agentCpuPriority: "agentCpuPriority";
|
|
10932
10936
|
compactExpiredCache: "compactExpiredCache";
|
|
10933
|
-
|
|
10937
|
+
keyedPluginCss: "keyedPluginCss";
|
|
10934
10938
|
performanceDiagnostics: "performanceDiagnostics";
|
|
10935
10939
|
pluginUpdates: "pluginUpdates";
|
|
10936
|
-
|
|
10940
|
+
resumeDaemonSessions: "resumeDaemonSessions";
|
|
10937
10941
|
serverMove: "serverMove";
|
|
10938
10942
|
skipFocusedThreadNotifications: "skipFocusedThreadNotifications";
|
|
10939
10943
|
threadContextCard: "threadContextCard";
|
|
10940
|
-
threadRowMetadata: "threadRowMetadata";
|
|
10941
|
-
updateWhenIdle: "updateWhenIdle";
|
|
10942
10944
|
walCheckpointWorker: "walCheckpointWorker";
|
|
10943
10945
|
}>, z$1.ZodBoolean>;
|
|
10944
10946
|
featureFlags: z$1.ZodObject<{
|
|
@@ -10963,6 +10965,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10963
10965
|
flat: "flat";
|
|
10964
10966
|
}>>;
|
|
10965
10967
|
providerOrder: z$1.ZodArray<z$1.ZodString>;
|
|
10968
|
+
resumeThreadsAfterRestart: z$1.ZodBoolean;
|
|
10966
10969
|
showDiagnosticEvents: z$1.ZodBoolean;
|
|
10967
10970
|
showKeyboardHints: z$1.ZodBoolean;
|
|
10968
10971
|
showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -16896,6 +16899,10 @@ declare const threadTimelineReadResponseSchema: z$1.ZodUnion<readonly [z$1.ZodOb
|
|
|
16896
16899
|
returnedSegmentCount: z$1.ZodOptional<z$1.ZodNumber>;
|
|
16897
16900
|
}, z$1.core.$strict>>;
|
|
16898
16901
|
}, z$1.core.$strip>;
|
|
16902
|
+
patchRows: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
16903
|
+
id: z$1.ZodString;
|
|
16904
|
+
ops: z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodTuple<[z$1.ZodLiteral<"append">, z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodNumber]>>, z$1.ZodString], null>, z$1.ZodTuple<[z$1.ZodLiteral<"set">, z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodNumber]>>, z$1.ZodUnknown], null>, z$1.ZodTuple<[z$1.ZodLiteral<"delete">, z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodNumber]>>], null>]>>;
|
|
16905
|
+
}, z$1.core.$strip>>>;
|
|
16899
16906
|
rowOrder: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodTuple<[z$1.ZodNumber, z$1.ZodNumber], null>]>>>;
|
|
16900
16907
|
upsertRows: z$1.ZodArray<z$1.ZodType<TimelineRow, unknown, z$1.core.$ZodTypeInternals<TimelineRow, unknown>>>;
|
|
16901
16908
|
}, z$1.core.$strip>;
|
|
@@ -23711,8 +23718,7 @@ interface ExperimentalThreadRowMetadataDataInput {
|
|
|
23711
23718
|
/**
|
|
23712
23719
|
* A small item on a thread row's metadata line, under the title: a badge, not
|
|
23713
23720
|
* a control. Items share one line, left to right, and the line clips at the
|
|
23714
|
-
* row's edge. bb's sidebar draws the line
|
|
23715
|
-
* experiment is on and the user turns on Organize → Rows → Metadata, and only
|
|
23721
|
+
* row's edge. bb's sidebar draws the line when the user turns on Organize → Rows → Metadata, and only
|
|
23716
23722
|
* on rows where an item shows something.
|
|
23717
23723
|
* Load the line's data in `useData`, a React hook bb calls once for the
|
|
23718
23724
|
* whole app while any list draws a metadata line, never per row; it
|
package/dist/host.js
CHANGED
|
@@ -1378,7 +1378,7 @@ function spawnHostProcess(command, args = [], options = {}) {
|
|
|
1378
1378
|
env: launch.env,
|
|
1379
1379
|
windowsHide: options.windowsHide ?? true
|
|
1380
1380
|
};
|
|
1381
|
-
if (process.platform === "win32" && !options.shell
|
|
1381
|
+
if (process.platform === "win32" && !options.shell) {
|
|
1382
1382
|
const parsed = parse(launch.command, launch.args, spawnOptions);
|
|
1383
1383
|
return observe(
|
|
1384
1384
|
parsed.file ? nodeSpawn(parsed.command, parsed.args, parsed.options) : nodeSpawn(launch.command, launch.args, spawnOptions)
|
|
@@ -1254,27 +1254,36 @@ function createTaggedKeyedQueryOwner(options) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
};
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
select(snapshot)
|
|
1269
|
-
)
|
|
1270
|
-
};
|
|
1271
|
-
return cached.value;
|
|
1257
|
+
function createSelectionGetter(getSnapshot, select, committed) {
|
|
1258
|
+
let cached;
|
|
1259
|
+
return () => {
|
|
1260
|
+
const snapshot = getSnapshot();
|
|
1261
|
+
if (cached && Object.is(cached.snapshot, snapshot)) return cached.value;
|
|
1262
|
+
cached = {
|
|
1263
|
+
snapshot,
|
|
1264
|
+
value: replaceEqualDeep3(
|
|
1265
|
+
cached?.value ?? committed.current,
|
|
1266
|
+
select(snapshot)
|
|
1267
|
+
)
|
|
1272
1268
|
};
|
|
1273
|
-
|
|
1269
|
+
return cached.value;
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
function commitSelection(committed, value) {
|
|
1273
|
+
committed.current = value;
|
|
1274
|
+
}
|
|
1275
|
+
function useQuerySelection(subscribe, getSnapshot, select) {
|
|
1276
|
+
const [committed] = useState(() => ({
|
|
1277
|
+
current: void 0
|
|
1278
|
+
}));
|
|
1279
|
+
const getSelection = useMemo(
|
|
1280
|
+
() => createSelectionGetter(getSnapshot, select, committed),
|
|
1281
|
+
[committed, getSnapshot, select]
|
|
1282
|
+
);
|
|
1274
1283
|
const value = useSyncExternalStore(subscribe, getSelection, getSelection);
|
|
1275
1284
|
useEffect(() => {
|
|
1276
|
-
committed
|
|
1277
|
-
}, [value]);
|
|
1285
|
+
commitSelection(committed, value);
|
|
1286
|
+
}, [committed, value]);
|
|
1278
1287
|
return value;
|
|
1279
1288
|
}
|
|
1280
1289
|
|
package/dist/process.js
CHANGED
|
@@ -584,7 +584,7 @@ function spawnHostProcess(command, args = [], options = {}) {
|
|
|
584
584
|
env: launch.env,
|
|
585
585
|
windowsHide: options.windowsHide ?? true
|
|
586
586
|
};
|
|
587
|
-
if (process.platform === "win32" && !options.shell
|
|
587
|
+
if (process.platform === "win32" && !options.shell) {
|
|
588
588
|
const parsed = parse(launch.command, launch.args, spawnOptions);
|
|
589
589
|
return observe(
|
|
590
590
|
parsed.file ? nodeSpawn(parsed.command, parsed.args, parsed.options) : nodeSpawn(launch.command, launch.args, spawnOptions)
|