@get-bb/plugin-sdk 0.4.50 → 0.4.53
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 +2 -1
- package/bundled-types/bb-plugin-sdk-environment-provider.d.ts +2 -2
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +6 -7
- package/bundled-types/bb-plugin-sdk-testing.d.ts +15 -8
- package/bundled-types/bb-plugin-sdk.d.ts +278 -10
- package/dist/testing/index.js +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -149,7 +149,8 @@ await host.harness.lifecycle.dispose();
|
|
|
149
149
|
```
|
|
150
150
|
|
|
151
151
|
`makePluginAgentConfigurationContext`, `makeMessageDispatchHookContext`,
|
|
152
|
-
`makeThreadResponse`, `makeQueueEntry`, and
|
|
152
|
+
`makeHostResponse`, `makeThreadResponse`, `makeQueueEntry`, and
|
|
153
|
+
`makeTurnFailedEvent` return
|
|
153
154
|
complete deterministic SDK objects. Pass partial overrides so a behavioral
|
|
154
155
|
test shows only the values relevant to its scenario. Nested context
|
|
155
156
|
members merge partial overrides against complete defaults, so required contract
|
|
@@ -183,7 +183,7 @@ interface PluginEnvironmentProviderValidateContext<R extends PluginEnvironmentPr
|
|
|
183
183
|
}
|
|
184
184
|
interface PluginEnvironmentProviderAvailabilityContext {
|
|
185
185
|
project: Project;
|
|
186
|
-
host: Host
|
|
186
|
+
host: Host;
|
|
187
187
|
projectCheckout: {
|
|
188
188
|
path: string;
|
|
189
189
|
} | null;
|
|
@@ -256,7 +256,7 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
256
256
|
requires?: R;
|
|
257
257
|
inputs?: S;
|
|
258
258
|
policy?: Partial<PluginEnvironmentProviderPolicy>;
|
|
259
|
-
/** Experimental: see docs/api_to_audit.md. */
|
|
259
|
+
/** Experimental create-time preflight: see docs/api_to_audit.md. */
|
|
260
260
|
availability?(context: PluginEnvironmentProviderAvailabilityContext): PluginEnvironmentProviderAvailability | Promise<PluginEnvironmentProviderAvailability>;
|
|
261
261
|
validate?(context: PluginEnvironmentProviderValidateContext<R, S>): PluginEnvironmentValidateDecision | Promise<PluginEnvironmentValidateDecision>;
|
|
262
262
|
create(context: PluginEnvironmentProviderCreateContext<R, S>): Promise<PluginEnvironmentProviderCreateResult>;
|
|
@@ -509,7 +509,7 @@ interface PluginEnvironmentProviderValidateContext<R extends PluginEnvironmentPr
|
|
|
509
509
|
}
|
|
510
510
|
interface PluginEnvironmentProviderAvailabilityContext {
|
|
511
511
|
project: Project;
|
|
512
|
-
host: Host
|
|
512
|
+
host: Host;
|
|
513
513
|
projectCheckout: {
|
|
514
514
|
path: string;
|
|
515
515
|
} | null;
|
|
@@ -582,7 +582,7 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
582
582
|
requires?: R;
|
|
583
583
|
inputs?: S;
|
|
584
584
|
policy?: Partial<PluginEnvironmentProviderPolicy>;
|
|
585
|
-
/** Experimental: see docs/api_to_audit.md. */
|
|
585
|
+
/** Experimental create-time preflight: see docs/api_to_audit.md. */
|
|
586
586
|
availability?(context: PluginEnvironmentProviderAvailabilityContext): PluginEnvironmentProviderAvailability | Promise<PluginEnvironmentProviderAvailability>;
|
|
587
587
|
validate?(context: PluginEnvironmentProviderValidateContext<R, S>): PluginEnvironmentValidateDecision | Promise<PluginEnvironmentValidateDecision>;
|
|
588
588
|
create(context: PluginEnvironmentProviderCreateContext<R, S>): Promise<PluginEnvironmentProviderCreateResult>;
|
|
@@ -690,11 +690,10 @@ type PluginSettingValue = string | number | boolean;
|
|
|
690
690
|
* that machine, git or not, so core refuses a machine with no checkout of
|
|
691
691
|
* the project at create time and `context.projectCheckout` is non-null.
|
|
692
692
|
* - `gitCheckout` — that directory must also be a git repository with at
|
|
693
|
-
* least one commit.
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
* in a project with no git remote and an explicit selection is rejected.
|
|
693
|
+
* least one commit. Core inspects the selected machine and rejects an
|
|
694
|
+
* invalid selection before creating the thread. Implies `projectCheckout`.
|
|
695
|
+
* - `gitRemote` — the provider clones the project itself, so an explicit
|
|
696
|
+
* selection is rejected when the project has no git remote.
|
|
698
697
|
* - `projectless` — this provider serves only threads that have no project,
|
|
699
698
|
* so it is offered for those and nowhere else. It cannot be combined with
|
|
700
699
|
* `projectCheckout`, `gitCheckout` or `gitRemote`, which need a project.
|
|
@@ -238,7 +238,7 @@ interface PluginEnvironmentProviderValidateContext<R extends PluginEnvironmentPr
|
|
|
238
238
|
}
|
|
239
239
|
interface PluginEnvironmentProviderAvailabilityContext {
|
|
240
240
|
project: Project;
|
|
241
|
-
host: Host
|
|
241
|
+
host: Host;
|
|
242
242
|
projectCheckout: {
|
|
243
243
|
path: string;
|
|
244
244
|
} | null;
|
|
@@ -311,7 +311,7 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
311
311
|
requires?: R;
|
|
312
312
|
inputs?: S;
|
|
313
313
|
policy?: Partial<PluginEnvironmentProviderPolicy>;
|
|
314
|
-
/** Experimental: see docs/api_to_audit.md. */
|
|
314
|
+
/** Experimental create-time preflight: see docs/api_to_audit.md. */
|
|
315
315
|
availability?(context: PluginEnvironmentProviderAvailabilityContext): PluginEnvironmentProviderAvailability | Promise<PluginEnvironmentProviderAvailability>;
|
|
316
316
|
validate?(context: PluginEnvironmentProviderValidateContext<R, S>): PluginEnvironmentValidateDecision | Promise<PluginEnvironmentValidateDecision>;
|
|
317
317
|
create(context: PluginEnvironmentProviderCreateContext<R, S>): Promise<PluginEnvironmentProviderCreateResult>;
|
|
@@ -369,11 +369,10 @@ type PluginSettingValue = string | number | boolean;
|
|
|
369
369
|
* that machine, git or not, so core refuses a machine with no checkout of
|
|
370
370
|
* the project at create time and `context.projectCheckout` is non-null.
|
|
371
371
|
* - `gitCheckout` — that directory must also be a git repository with at
|
|
372
|
-
* least one commit.
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
* in a project with no git remote and an explicit selection is rejected.
|
|
372
|
+
* least one commit. Core inspects the selected machine and rejects an
|
|
373
|
+
* invalid selection before creating the thread. Implies `projectCheckout`.
|
|
374
|
+
* - `gitRemote` — the provider clones the project itself, so an explicit
|
|
375
|
+
* selection is rejected when the project has no git remote.
|
|
377
376
|
* - `projectless` — this provider serves only threads that have no project,
|
|
378
377
|
* so it is offered for those and nowhere else. It cannot be combined with
|
|
379
378
|
* `projectCheckout`, `gitCheckout` or `gitRemote`, which need a project.
|
|
@@ -1152,6 +1151,7 @@ interface FakePluginHost {
|
|
|
1152
1151
|
}
|
|
1153
1152
|
declare function createFakePluginHost(options?: CreateFakePluginHostOptions): FakePluginHost;
|
|
1154
1153
|
|
|
1154
|
+
type HostResponse = Awaited<ReturnType<BbPluginApi["sdk"]["hosts"]["list"]>>[number];
|
|
1155
1155
|
type ThreadResponse = PluginThreadEventPayloads["thread.created"]["thread"];
|
|
1156
1156
|
type QueueEntry = PluginThreadEventPayloads["message.queued"]["entry"];
|
|
1157
1157
|
type TurnFailedEvent = PluginThreadEventPayloads["turn.failed"];
|
|
@@ -1175,6 +1175,13 @@ type MessageDispatchHookContextOverrides = Omit<Partial<MessageDispatchHookConte
|
|
|
1175
1175
|
executionSources?: Partial<MessageDispatchHookContext["executionSources"]>;
|
|
1176
1176
|
queuedMessage?: Partial<NonNullable<MessageDispatchHookContext["queuedMessage"]>> | null;
|
|
1177
1177
|
};
|
|
1178
|
+
/**
|
|
1179
|
+
* A complete, deterministic host response for faking `bb.sdk.hosts.list()`
|
|
1180
|
+
* and environment-provider contexts. Override only the fields the test cares
|
|
1181
|
+
* about. If the contract grows a required field, this builder fails
|
|
1182
|
+
* typecheck — update the default here.
|
|
1183
|
+
*/
|
|
1184
|
+
declare function makeHostResponse(overrides?: Partial<HostResponse>): HostResponse;
|
|
1178
1185
|
/**
|
|
1179
1186
|
* A complete, deterministic `ThreadResponse` for thread lifecycle event
|
|
1180
1187
|
* payloads (`harness.emitThreadEvent`). Defaults are the minimal idle
|
|
@@ -1242,5 +1249,5 @@ interface PublicSdkOnlyScan {
|
|
|
1242
1249
|
*/
|
|
1243
1250
|
declare function scanPublicSdkOnly(packageRoot: string, options?: PublicSdkOnlyScanOptions): PublicSdkOnlyScan;
|
|
1244
1251
|
|
|
1245
|
-
export { PluginContextStaleError, createFakePluginHost, createFakeSdk, scanPublicSdkOnly as experimental_scanPublicSdkOnly, makeMessageDispatchHookContext, makePluginAgentConfigurationContext, makeQueueEntry, makeThreadResponse, makeTurnFailedEvent };
|
|
1252
|
+
export { PluginContextStaleError, createFakePluginHost, createFakeSdk, scanPublicSdkOnly as experimental_scanPublicSdkOnly, makeHostResponse, makeMessageDispatchHookContext, makePluginAgentConfigurationContext, makeQueueEntry, makeThreadResponse, makeTurnFailedEvent };
|
|
1246
1253
|
export type { CreateFakePluginHostOptions, ExperimentalFakeHostRpcCall, FakeAgentToolRecord, FakeCliRecord, FakeHttpRouteRecord, FakeLogEntry, FakeLogLevel, FakeMentionProviderRecord, FakePluginBehaviorDrivers, FakePluginHarness, FakePluginHost, FakePluginInspectionState, FakePluginLifecycleControls, FakePluginRegistrations, FakeRealtimeSignal, FakeScheduleRecord, FakeSdkCall, FakeSdkHarness, FakeSdkOverrides, FakeServiceRecord, PublicSdkOnlyScan, PublicSdkOnlyScanOptions, PublicSdkOnlyViolation };
|
|
@@ -73,6 +73,51 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
|
73
73
|
}, z$1.core.$strict>]>;
|
|
74
74
|
type AppSettingsUpdate = z$1.infer<typeof appSettingsUpdateSchema>;
|
|
75
75
|
|
|
76
|
+
declare const UI_PREFERENCE_KEYS: readonly ["sidebar.organizationMode", "sidebar.chronologicalSort", "sidebar.sectionOrder", "sidebar.manualSectionOrder", "sidebar.machineSectionOrder", "sidebar.collapsedSections", "sidebar.collapsedProjects", "sidebar.collapsedThreads", "sidebar.collapsedEnvironments", "sidebar.collapsedThreadSections", "sidebar.collapsedMachines", "sidebar.pluginPanelOrder", "sidebar.visiblePluginPanels", "sidebar.navigationProvider", "sidebar.threadListProvider"];
|
|
77
|
+
type UiPreferenceKey = (typeof UI_PREFERENCE_KEYS)[number];
|
|
78
|
+
interface UiPreferenceDefinition<Schema extends z$1.ZodTypeAny = z$1.ZodTypeAny> {
|
|
79
|
+
schema: Schema;
|
|
80
|
+
defaultValue: z$1.infer<Schema>;
|
|
81
|
+
description: string;
|
|
82
|
+
}
|
|
83
|
+
declare const uiPreferenceDefinitions: {
|
|
84
|
+
readonly "sidebar.organizationMode": UiPreferenceDefinition<z$1.ZodEnum<{
|
|
85
|
+
chronological: "chronological";
|
|
86
|
+
machine: "machine";
|
|
87
|
+
project: "project";
|
|
88
|
+
}>>;
|
|
89
|
+
readonly "sidebar.chronologicalSort": UiPreferenceDefinition<z$1.ZodEnum<{
|
|
90
|
+
alpha: "alpha";
|
|
91
|
+
created: "created";
|
|
92
|
+
none: "none";
|
|
93
|
+
updated: "updated";
|
|
94
|
+
}>>;
|
|
95
|
+
readonly "sidebar.sectionOrder": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
96
|
+
readonly "sidebar.manualSectionOrder": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
97
|
+
readonly "sidebar.machineSectionOrder": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
98
|
+
readonly "sidebar.collapsedSections": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodEnum<{
|
|
99
|
+
pinned: "pinned";
|
|
100
|
+
threads: "threads";
|
|
101
|
+
}>>>;
|
|
102
|
+
readonly "sidebar.collapsedProjects": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
103
|
+
readonly "sidebar.collapsedThreads": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
104
|
+
readonly "sidebar.collapsedEnvironments": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
105
|
+
readonly "sidebar.collapsedThreadSections": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
106
|
+
readonly "sidebar.collapsedMachines": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
107
|
+
readonly "sidebar.pluginPanelOrder": UiPreferenceDefinition<z$1.ZodArray<z$1.ZodString>>;
|
|
108
|
+
readonly "sidebar.visiblePluginPanels": UiPreferenceDefinition<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
109
|
+
readonly "sidebar.navigationProvider": UiPreferenceDefinition<z$1.ZodString>;
|
|
110
|
+
readonly "sidebar.threadListProvider": UiPreferenceDefinition<z$1.ZodString>;
|
|
111
|
+
};
|
|
112
|
+
type UiPreferenceValue<Key extends UiPreferenceKey> = z$1.infer<(typeof uiPreferenceDefinitions)[Key]["schema"]>;
|
|
113
|
+
interface UiPreferenceEntry<Key extends UiPreferenceKey = UiPreferenceKey> {
|
|
114
|
+
revision: number;
|
|
115
|
+
value: UiPreferenceValue<Key>;
|
|
116
|
+
}
|
|
117
|
+
type UiPreferenceEntries = {
|
|
118
|
+
[Key in UiPreferenceKey]: UiPreferenceEntry<Key>;
|
|
119
|
+
};
|
|
120
|
+
|
|
76
121
|
declare const appKeybindingOverridesSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
77
122
|
command: z$1.ZodEnum<{
|
|
78
123
|
"app.back": "app.back";
|
|
@@ -291,6 +336,7 @@ declare const changedMessageSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
|
291
336
|
"config-changed": "config-changed";
|
|
292
337
|
"plugins-changed": "plugins-changed";
|
|
293
338
|
"provider-registrations-changed": "provider-registrations-changed";
|
|
339
|
+
"ui-preferences-changed": "ui-preferences-changed";
|
|
294
340
|
}>>>;
|
|
295
341
|
entity: z$1.ZodLiteral<"system">;
|
|
296
342
|
type: z$1.ZodLiteral<"changed">;
|
|
@@ -5585,6 +5631,82 @@ declare const hostDaemonCommandRegistry: {
|
|
|
5585
5631
|
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
5586
5632
|
ok: z$1.ZodLiteral<true>;
|
|
5587
5633
|
}, z$1.core.$strip>, "onlineRpc", false>;
|
|
5634
|
+
"desktop.browser.list_import_sources": HostDaemonCommandDescriptor<"desktop.browser.list_import_sources", z$1.ZodObject<{
|
|
5635
|
+
generation: z$1.ZodString;
|
|
5636
|
+
instanceId: z$1.ZodString;
|
|
5637
|
+
type: z$1.ZodLiteral<"desktop.browser.list_import_sources">;
|
|
5638
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
5639
|
+
sources: z$1.ZodArray<z$1.ZodObject<{
|
|
5640
|
+
icon: z$1.ZodOptional<z$1.ZodString>;
|
|
5641
|
+
id: z$1.ZodEnum<{
|
|
5642
|
+
arc: "arc";
|
|
5643
|
+
brave: "brave";
|
|
5644
|
+
chrome: "chrome";
|
|
5645
|
+
chromium: "chromium";
|
|
5646
|
+
edge: "edge";
|
|
5647
|
+
firefox: "firefox";
|
|
5648
|
+
opera: "opera";
|
|
5649
|
+
safari: "safari";
|
|
5650
|
+
vivaldi: "vivaldi";
|
|
5651
|
+
}>;
|
|
5652
|
+
name: z$1.ZodString;
|
|
5653
|
+
profiles: z$1.ZodArray<z$1.ZodObject<{
|
|
5654
|
+
cookieCount: z$1.ZodOptional<z$1.ZodNumber>;
|
|
5655
|
+
directory: z$1.ZodString;
|
|
5656
|
+
name: z$1.ZodString;
|
|
5657
|
+
}, z$1.core.$strict>>;
|
|
5658
|
+
unavailable: z$1.ZodOptional<z$1.ZodEnum<{
|
|
5659
|
+
browserRunning: "browserRunning";
|
|
5660
|
+
keychainItemMissing: "keychainItemMissing";
|
|
5661
|
+
needsFullDiskAccess: "needsFullDiskAccess";
|
|
5662
|
+
needsKeychainApproval: "needsKeychainApproval";
|
|
5663
|
+
notInstalled: "notInstalled";
|
|
5664
|
+
unsupportedPlatform: "unsupportedPlatform";
|
|
5665
|
+
}>>;
|
|
5666
|
+
}, z$1.core.$strict>>;
|
|
5667
|
+
}, z$1.core.$strip>, "onlineRpc", false>;
|
|
5668
|
+
"desktop.browser.import_cookies": HostDaemonCommandDescriptor<"desktop.browser.import_cookies", z$1.ZodObject<{
|
|
5669
|
+
generation: z$1.ZodString;
|
|
5670
|
+
instanceId: z$1.ZodString;
|
|
5671
|
+
profile: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
5672
|
+
id: z$1.ZodString;
|
|
5673
|
+
kind: z$1.ZodLiteral<"automation">;
|
|
5674
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
5675
|
+
kind: z$1.ZodLiteral<"personal">;
|
|
5676
|
+
}, z$1.core.$strip>], "kind">;
|
|
5677
|
+
sourceId: z$1.ZodEnum<{
|
|
5678
|
+
arc: "arc";
|
|
5679
|
+
brave: "brave";
|
|
5680
|
+
chrome: "chrome";
|
|
5681
|
+
chromium: "chromium";
|
|
5682
|
+
edge: "edge";
|
|
5683
|
+
firefox: "firefox";
|
|
5684
|
+
opera: "opera";
|
|
5685
|
+
safari: "safari";
|
|
5686
|
+
vivaldi: "vivaldi";
|
|
5687
|
+
}>;
|
|
5688
|
+
sourceProfileDirectory: z$1.ZodString;
|
|
5689
|
+
type: z$1.ZodLiteral<"desktop.browser.import_cookies">;
|
|
5690
|
+
}, z$1.core.$strict>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
5691
|
+
imported: z$1.ZodNumber;
|
|
5692
|
+
ok: z$1.ZodLiteral<true>;
|
|
5693
|
+
skipped: z$1.ZodNumber;
|
|
5694
|
+
skippedDomains: z$1.ZodArray<z$1.ZodString>;
|
|
5695
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
5696
|
+
ok: z$1.ZodLiteral<false>;
|
|
5697
|
+
reason: z$1.ZodEnum<{
|
|
5698
|
+
browserRunning: "browserRunning";
|
|
5699
|
+
keychainItemMissing: "keychainItemMissing";
|
|
5700
|
+
keychainUnavailable: "keychainUnavailable";
|
|
5701
|
+
needsFullDiskAccess: "needsFullDiskAccess";
|
|
5702
|
+
needsKeychainApproval: "needsKeychainApproval";
|
|
5703
|
+
notInstalled: "notInstalled";
|
|
5704
|
+
readFailed: "readFailed";
|
|
5705
|
+
unknownSource: "unknownSource";
|
|
5706
|
+
unknownSourceProfile: "unknownSourceProfile";
|
|
5707
|
+
unsupportedPlatform: "unsupportedPlatform";
|
|
5708
|
+
}>;
|
|
5709
|
+
}, z$1.core.$strict>], "ok">, "onlineRpc", false>;
|
|
5588
5710
|
"thread.rewind.discard": HostDaemonCommandDescriptor<"thread.rewind.discard", z$1.ZodObject<{
|
|
5589
5711
|
environmentId: z$1.ZodString;
|
|
5590
5712
|
leaseId: z$1.ZodString;
|
|
@@ -6753,6 +6875,7 @@ declare const hostDaemonCommandRegistry: {
|
|
|
6753
6875
|
threadId: z$1.ZodString;
|
|
6754
6876
|
}, z$1.core.$strict>>;
|
|
6755
6877
|
path: z$1.ZodString;
|
|
6878
|
+
setupScriptTimeoutMs: z$1.ZodNullable<z$1.ZodNumber>;
|
|
6756
6879
|
type: z$1.ZodLiteral<"environment.attach">;
|
|
6757
6880
|
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
6758
6881
|
branchName: z$1.ZodNullable<z$1.ZodString>;
|
|
@@ -6815,6 +6938,8 @@ declare const hostDaemonCommandRegistry: {
|
|
|
6815
6938
|
}, z$1.core.$strip>;
|
|
6816
6939
|
}, z$1.core.$strict>], "operation">, z$1.ZodObject<{}, z$1.core.$strict>, "settled", false>;
|
|
6817
6940
|
"host.list_files": HostDaemonCommandDescriptor<"host.list_files", z$1.ZodObject<{
|
|
6941
|
+
excludeNames: z$1.ZodArray<z$1.ZodString>;
|
|
6942
|
+
includeHidden: z$1.ZodBoolean;
|
|
6818
6943
|
limit: z$1.ZodNumber;
|
|
6819
6944
|
path: z$1.ZodString;
|
|
6820
6945
|
query: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -6827,8 +6952,10 @@ declare const hostDaemonCommandRegistry: {
|
|
|
6827
6952
|
truncated: z$1.ZodBoolean;
|
|
6828
6953
|
}, z$1.core.$strip>, "onlineRpc", true>;
|
|
6829
6954
|
"host.list_paths": HostDaemonCommandDescriptor<"host.list_paths", z$1.ZodObject<{
|
|
6955
|
+
excludeNames: z$1.ZodArray<z$1.ZodString>;
|
|
6830
6956
|
includeDirectories: z$1.ZodBoolean;
|
|
6831
6957
|
includeFiles: z$1.ZodBoolean;
|
|
6958
|
+
includeHidden: z$1.ZodBoolean;
|
|
6832
6959
|
limit: z$1.ZodNumber;
|
|
6833
6960
|
path: z$1.ZodString;
|
|
6834
6961
|
query: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -8176,6 +8303,32 @@ declare const desktopBrowserCommandSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObj
|
|
|
8176
8303
|
leaseId: z$1.ZodString;
|
|
8177
8304
|
threadId: z$1.ZodString;
|
|
8178
8305
|
type: z$1.ZodLiteral<"desktop.browser.release_control">;
|
|
8306
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
8307
|
+
generation: z$1.ZodString;
|
|
8308
|
+
instanceId: z$1.ZodString;
|
|
8309
|
+
type: z$1.ZodLiteral<"desktop.browser.list_import_sources">;
|
|
8310
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
8311
|
+
generation: z$1.ZodString;
|
|
8312
|
+
instanceId: z$1.ZodString;
|
|
8313
|
+
profile: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
8314
|
+
id: z$1.ZodString;
|
|
8315
|
+
kind: z$1.ZodLiteral<"automation">;
|
|
8316
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
8317
|
+
kind: z$1.ZodLiteral<"personal">;
|
|
8318
|
+
}, z$1.core.$strip>], "kind">;
|
|
8319
|
+
sourceId: z$1.ZodEnum<{
|
|
8320
|
+
arc: "arc";
|
|
8321
|
+
brave: "brave";
|
|
8322
|
+
chrome: "chrome";
|
|
8323
|
+
chromium: "chromium";
|
|
8324
|
+
edge: "edge";
|
|
8325
|
+
firefox: "firefox";
|
|
8326
|
+
opera: "opera";
|
|
8327
|
+
safari: "safari";
|
|
8328
|
+
vivaldi: "vivaldi";
|
|
8329
|
+
}>;
|
|
8330
|
+
sourceProfileDirectory: z$1.ZodString;
|
|
8331
|
+
type: z$1.ZodLiteral<"desktop.browser.import_cookies">;
|
|
8179
8332
|
}, z$1.core.$strict>], "type">;
|
|
8180
8333
|
declare const desktopBrowserResultSchemas: {
|
|
8181
8334
|
"desktop.browser.list_instances": z$1.ZodObject<{
|
|
@@ -8257,6 +8410,56 @@ declare const desktopBrowserResultSchemas: {
|
|
|
8257
8410
|
"desktop.browser.release_control": z$1.ZodObject<{
|
|
8258
8411
|
ok: z$1.ZodLiteral<true>;
|
|
8259
8412
|
}, z$1.core.$strip>;
|
|
8413
|
+
"desktop.browser.list_import_sources": z$1.ZodObject<{
|
|
8414
|
+
sources: z$1.ZodArray<z$1.ZodObject<{
|
|
8415
|
+
icon: z$1.ZodOptional<z$1.ZodString>;
|
|
8416
|
+
id: z$1.ZodEnum<{
|
|
8417
|
+
arc: "arc";
|
|
8418
|
+
brave: "brave";
|
|
8419
|
+
chrome: "chrome";
|
|
8420
|
+
chromium: "chromium";
|
|
8421
|
+
edge: "edge";
|
|
8422
|
+
firefox: "firefox";
|
|
8423
|
+
opera: "opera";
|
|
8424
|
+
safari: "safari";
|
|
8425
|
+
vivaldi: "vivaldi";
|
|
8426
|
+
}>;
|
|
8427
|
+
name: z$1.ZodString;
|
|
8428
|
+
profiles: z$1.ZodArray<z$1.ZodObject<{
|
|
8429
|
+
cookieCount: z$1.ZodOptional<z$1.ZodNumber>;
|
|
8430
|
+
directory: z$1.ZodString;
|
|
8431
|
+
name: z$1.ZodString;
|
|
8432
|
+
}, z$1.core.$strict>>;
|
|
8433
|
+
unavailable: z$1.ZodOptional<z$1.ZodEnum<{
|
|
8434
|
+
browserRunning: "browserRunning";
|
|
8435
|
+
keychainItemMissing: "keychainItemMissing";
|
|
8436
|
+
needsFullDiskAccess: "needsFullDiskAccess";
|
|
8437
|
+
needsKeychainApproval: "needsKeychainApproval";
|
|
8438
|
+
notInstalled: "notInstalled";
|
|
8439
|
+
unsupportedPlatform: "unsupportedPlatform";
|
|
8440
|
+
}>>;
|
|
8441
|
+
}, z$1.core.$strict>>;
|
|
8442
|
+
}, z$1.core.$strip>;
|
|
8443
|
+
"desktop.browser.import_cookies": z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
8444
|
+
imported: z$1.ZodNumber;
|
|
8445
|
+
ok: z$1.ZodLiteral<true>;
|
|
8446
|
+
skipped: z$1.ZodNumber;
|
|
8447
|
+
skippedDomains: z$1.ZodArray<z$1.ZodString>;
|
|
8448
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
8449
|
+
ok: z$1.ZodLiteral<false>;
|
|
8450
|
+
reason: z$1.ZodEnum<{
|
|
8451
|
+
browserRunning: "browserRunning";
|
|
8452
|
+
keychainItemMissing: "keychainItemMissing";
|
|
8453
|
+
keychainUnavailable: "keychainUnavailable";
|
|
8454
|
+
needsFullDiskAccess: "needsFullDiskAccess";
|
|
8455
|
+
needsKeychainApproval: "needsKeychainApproval";
|
|
8456
|
+
notInstalled: "notInstalled";
|
|
8457
|
+
readFailed: "readFailed";
|
|
8458
|
+
unknownSource: "unknownSource";
|
|
8459
|
+
unknownSourceProfile: "unknownSourceProfile";
|
|
8460
|
+
unsupportedPlatform: "unsupportedPlatform";
|
|
8461
|
+
}>;
|
|
8462
|
+
}, z$1.core.$strict>], "ok">;
|
|
8260
8463
|
};
|
|
8261
8464
|
type DesktopBrowserCommand = z$1.infer<typeof desktopBrowserCommandSchema>;
|
|
8262
8465
|
type DesktopBrowserCommandType = DesktopBrowserCommand["type"];
|
|
@@ -8483,6 +8686,7 @@ declare const installedPluginSchema: z$1.ZodObject<{
|
|
|
8483
8686
|
incompatible: "incompatible";
|
|
8484
8687
|
missing: "missing";
|
|
8485
8688
|
running: "running";
|
|
8689
|
+
starting: "starting";
|
|
8486
8690
|
}>;
|
|
8487
8691
|
statusDetail: z$1.ZodNullable<z$1.ZodString>;
|
|
8488
8692
|
updateState: z$1.ZodObject<{
|
|
@@ -8602,6 +8806,7 @@ declare const pluginListResponseSchema: z$1.ZodObject<{
|
|
|
8602
8806
|
incompatible: "incompatible";
|
|
8603
8807
|
missing: "missing";
|
|
8604
8808
|
running: "running";
|
|
8809
|
+
starting: "starting";
|
|
8605
8810
|
}>;
|
|
8606
8811
|
statusDetail: z$1.ZodNullable<z$1.ZodString>;
|
|
8607
8812
|
updateState: z$1.ZodObject<{
|
|
@@ -8723,6 +8928,7 @@ declare const pluginReloadResponseSchema: z$1.ZodObject<{
|
|
|
8723
8928
|
incompatible: "incompatible";
|
|
8724
8929
|
missing: "missing";
|
|
8725
8930
|
running: "running";
|
|
8931
|
+
starting: "starting";
|
|
8726
8932
|
}>;
|
|
8727
8933
|
statusDetail: z$1.ZodNullable<z$1.ZodString>;
|
|
8728
8934
|
updateState: z$1.ZodObject<{
|
|
@@ -9626,6 +9832,15 @@ declare const systemEnvironmentProviderSchema: z$1.ZodObject<{
|
|
|
9626
9832
|
}, z$1.core.$strip>;
|
|
9627
9833
|
type SystemEnvironmentProvider = z$1.infer<typeof systemEnvironmentProviderSchema>;
|
|
9628
9834
|
|
|
9835
|
+
interface UiPreferencesResponse {
|
|
9836
|
+
preferences: UiPreferenceEntries;
|
|
9837
|
+
}
|
|
9838
|
+
interface UiPreferenceResponse<Key extends UiPreferenceKey = UiPreferenceKey> {
|
|
9839
|
+
key: Key;
|
|
9840
|
+
revision: number;
|
|
9841
|
+
value: UiPreferenceValue<Key>;
|
|
9842
|
+
}
|
|
9843
|
+
|
|
9629
9844
|
declare const terminalSessionSchema: z$1.ZodObject<{
|
|
9630
9845
|
closeReason: z$1.ZodNullable<z$1.ZodEnum<{
|
|
9631
9846
|
"daemon-disconnect": "daemon-disconnect";
|
|
@@ -13490,6 +13705,34 @@ declare const desktopBrowserLeaseRequestSchema: z$1.ZodObject<{
|
|
|
13490
13705
|
leaseId: z$1.ZodString;
|
|
13491
13706
|
threadId: z$1.ZodString;
|
|
13492
13707
|
}, z$1.core.$strict>;
|
|
13708
|
+
declare const desktopBrowserInstanceRequestSchema: z$1.ZodObject<{
|
|
13709
|
+
generation: z$1.ZodString;
|
|
13710
|
+
hostId: z$1.ZodString;
|
|
13711
|
+
instanceId: z$1.ZodString;
|
|
13712
|
+
}, z$1.core.$strict>;
|
|
13713
|
+
declare const desktopBrowserImportCookiesRequestSchema: z$1.ZodObject<{
|
|
13714
|
+
generation: z$1.ZodString;
|
|
13715
|
+
hostId: z$1.ZodString;
|
|
13716
|
+
instanceId: z$1.ZodString;
|
|
13717
|
+
profile: z$1.ZodDefault<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
13718
|
+
id: z$1.ZodString;
|
|
13719
|
+
kind: z$1.ZodLiteral<"automation">;
|
|
13720
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
13721
|
+
kind: z$1.ZodLiteral<"personal">;
|
|
13722
|
+
}, z$1.core.$strip>], "kind">>;
|
|
13723
|
+
sourceId: z$1.ZodEnum<{
|
|
13724
|
+
arc: "arc";
|
|
13725
|
+
brave: "brave";
|
|
13726
|
+
chrome: "chrome";
|
|
13727
|
+
chromium: "chromium";
|
|
13728
|
+
edge: "edge";
|
|
13729
|
+
firefox: "firefox";
|
|
13730
|
+
opera: "opera";
|
|
13731
|
+
safari: "safari";
|
|
13732
|
+
vivaldi: "vivaldi";
|
|
13733
|
+
}>;
|
|
13734
|
+
sourceProfileDirectory: z$1.ZodString;
|
|
13735
|
+
}, z$1.core.$strict>;
|
|
13493
13736
|
type ExperimentalDesktopBrowserHostRequest = z$1.infer<typeof desktopBrowserHostRequestSchema>;
|
|
13494
13737
|
type ExperimentalDesktopBrowserScope = z$1.infer<typeof desktopBrowserScopeSchema>;
|
|
13495
13738
|
type ExperimentalDesktopBrowserTabRequest = z$1.infer<typeof desktopBrowserTabRequestSchema>;
|
|
@@ -13515,6 +13758,10 @@ type ExperimentalDesktopBrowserConnection = {
|
|
|
13515
13758
|
wsEndpoint: string;
|
|
13516
13759
|
expiresAt: number;
|
|
13517
13760
|
};
|
|
13761
|
+
type ExperimentalDesktopBrowserInstanceRequest = z$1.infer<typeof desktopBrowserInstanceRequestSchema>;
|
|
13762
|
+
type ExperimentalDesktopBrowserImportCookiesInput = z$1.input<typeof desktopBrowserImportCookiesRequestSchema>;
|
|
13763
|
+
type ExperimentalDesktopBrowserImportSources = DesktopBrowserResult<"desktop.browser.list_import_sources">;
|
|
13764
|
+
type ExperimentalDesktopBrowserImportOutcome = DesktopBrowserResult<"desktop.browser.import_cookies">;
|
|
13518
13765
|
|
|
13519
13766
|
declare const threadTabsResponseSchema: z$1.ZodObject<{
|
|
13520
13767
|
revision: z$1.ZodNumber;
|
|
@@ -16191,7 +16438,7 @@ interface PluginEnvironmentProviderValidateContext<R extends PluginEnvironmentPr
|
|
|
16191
16438
|
}
|
|
16192
16439
|
interface PluginEnvironmentProviderAvailabilityContext {
|
|
16193
16440
|
project: Project;
|
|
16194
|
-
host: Host
|
|
16441
|
+
host: Host;
|
|
16195
16442
|
projectCheckout: {
|
|
16196
16443
|
path: string;
|
|
16197
16444
|
} | null;
|
|
@@ -16264,7 +16511,7 @@ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProvide
|
|
|
16264
16511
|
requires?: R;
|
|
16265
16512
|
inputs?: S;
|
|
16266
16513
|
policy?: Partial<PluginEnvironmentProviderPolicy>;
|
|
16267
|
-
/** Experimental: see docs/api_to_audit.md. */
|
|
16514
|
+
/** Experimental create-time preflight: see docs/api_to_audit.md. */
|
|
16268
16515
|
availability?(context: PluginEnvironmentProviderAvailabilityContext): PluginEnvironmentProviderAvailability | Promise<PluginEnvironmentProviderAvailability>;
|
|
16269
16516
|
validate?(context: PluginEnvironmentProviderValidateContext<R, S>): PluginEnvironmentValidateDecision$1 | Promise<PluginEnvironmentValidateDecision$1>;
|
|
16270
16517
|
create(context: PluginEnvironmentProviderCreateContext<R, S>): Promise<PluginEnvironmentProviderCreateResult>;
|
|
@@ -16287,6 +16534,8 @@ interface ExperimentalDesktopBrowsersArea {
|
|
|
16287
16534
|
ok: true;
|
|
16288
16535
|
}>;
|
|
16289
16536
|
captureTab(input: ExperimentalDesktopBrowserTabRequest): Promise<ExperimentalDesktopBrowserCapture>;
|
|
16537
|
+
listImportSources(input: ExperimentalDesktopBrowserInstanceRequest): Promise<ExperimentalDesktopBrowserImportSources>;
|
|
16538
|
+
importCookies(input: ExperimentalDesktopBrowserImportCookiesInput): Promise<ExperimentalDesktopBrowserImportOutcome>;
|
|
16290
16539
|
subscribe(input: ExperimentalDesktopBrowserScope & {
|
|
16291
16540
|
onChange: (result: ExperimentalDesktopBrowserTabs) => void;
|
|
16292
16541
|
onError: (error: Error) => void;
|
|
@@ -16427,6 +16676,8 @@ interface FileListArgs {
|
|
|
16427
16676
|
path: string;
|
|
16428
16677
|
query?: string;
|
|
16429
16678
|
limit?: number;
|
|
16679
|
+
includeHidden?: boolean;
|
|
16680
|
+
excludeNames?: string[];
|
|
16430
16681
|
signal?: AbortSignal;
|
|
16431
16682
|
}
|
|
16432
16683
|
interface PathListArgs extends FileListArgs {
|
|
@@ -17086,6 +17337,24 @@ interface SystemProviderStatesArgs extends SystemProvidersQuery {
|
|
|
17086
17337
|
}
|
|
17087
17338
|
type SystemProviderStatesResult = SystemProviderStatesResponse;
|
|
17088
17339
|
type SystemVersionResult = SystemVersionResponse;
|
|
17340
|
+
interface SystemUiPreferencesArgs {
|
|
17341
|
+
signal?: AbortSignal;
|
|
17342
|
+
}
|
|
17343
|
+
type SystemUiPreferencesResult = UiPreferencesResponse;
|
|
17344
|
+
interface SystemUpdateUiPreferenceArgs<Key extends UiPreferenceKey> {
|
|
17345
|
+
expectedRevision: number;
|
|
17346
|
+
key: Key;
|
|
17347
|
+
value: UiPreferenceValue<Key>;
|
|
17348
|
+
}
|
|
17349
|
+
interface SystemResetUiPreferenceArgs<Key extends UiPreferenceKey> {
|
|
17350
|
+
key: Key;
|
|
17351
|
+
}
|
|
17352
|
+
type SystemUiPreferenceResult<Key extends UiPreferenceKey> = UiPreferenceResponse<Key>;
|
|
17353
|
+
interface SystemUiPreferencesArea {
|
|
17354
|
+
list(args?: SystemUiPreferencesArgs): Promise<SystemUiPreferencesResult>;
|
|
17355
|
+
set<Key extends UiPreferenceKey>(args: SystemUpdateUiPreferenceArgs<Key>): Promise<SystemUiPreferenceResult<Key>>;
|
|
17356
|
+
reset<Key extends UiPreferenceKey>(args: SystemResetUiPreferenceArgs<Key>): Promise<SystemUiPreferenceResult<Key>>;
|
|
17357
|
+
}
|
|
17089
17358
|
interface SystemArea {
|
|
17090
17359
|
attention(args?: SystemAttentionArgs): Promise<SystemAttentionResult>;
|
|
17091
17360
|
config(args?: SystemConfigArgs): Promise<SystemConfigResult>;
|
|
@@ -17094,6 +17363,7 @@ interface SystemArea {
|
|
|
17094
17363
|
installCliSkills(args: SystemInstallCliSkillsArgs): Promise<SystemInstallCliSkillsResult>;
|
|
17095
17364
|
reloadConfig(): Promise<SystemReloadConfigResult>;
|
|
17096
17365
|
transcribeVoice(args: SystemVoiceTranscriptionArgs): Promise<SystemVoiceTranscriptionResult>;
|
|
17366
|
+
uiPreferences: SystemUiPreferencesArea;
|
|
17097
17367
|
updateExperiments(args: Experiments): Promise<SystemUpdateExperimentsResult>;
|
|
17098
17368
|
updateGeneralSettings(args: AppSettingsUpdate): Promise<SystemUpdateGeneralSettingsResult>;
|
|
17099
17369
|
updateKeyboardSettings(args: AppKeybindingOverrides): Promise<SystemUpdateKeyboardSettingsResult>;
|
|
@@ -18018,11 +18288,10 @@ type PluginThreadEventHandler<E extends PluginThreadEventName> = (payload: Plugi
|
|
|
18018
18288
|
* that machine, git or not, so core refuses a machine with no checkout of
|
|
18019
18289
|
* the project at create time and `context.projectCheckout` is non-null.
|
|
18020
18290
|
* - `gitCheckout` — that directory must also be a git repository with at
|
|
18021
|
-
* least one commit.
|
|
18022
|
-
*
|
|
18023
|
-
*
|
|
18024
|
-
*
|
|
18025
|
-
* in a project with no git remote and an explicit selection is rejected.
|
|
18291
|
+
* least one commit. Core inspects the selected machine and rejects an
|
|
18292
|
+
* invalid selection before creating the thread. Implies `projectCheckout`.
|
|
18293
|
+
* - `gitRemote` — the provider clones the project itself, so an explicit
|
|
18294
|
+
* selection is rejected when the project has no git remote.
|
|
18026
18295
|
* - `projectless` — this provider serves only threads that have no project,
|
|
18027
18296
|
* so it is offered for those and nowhere else. It cannot be combined with
|
|
18028
18297
|
* `projectCheckout`, `gitCheckout` or `gitRemote`, which need a project.
|
|
@@ -18057,9 +18326,8 @@ interface PluginEnvironments {
|
|
|
18057
18326
|
register<const Requires extends PluginEnvironmentProviderRequirements, const Inputs extends PluginEnvironmentProviderInputsSchema = undefined>(declaration: PluginEnvironmentProviderDeclaration<Requires, Inputs>): void;
|
|
18058
18327
|
/**
|
|
18059
18328
|
* Ask core to re-ask this plugin's waiting providers now instead of at their
|
|
18060
|
-
* `sendAt
|
|
18061
|
-
*
|
|
18062
|
-
* scheduling, exactly like `experimental_hooks.recheck`.
|
|
18329
|
+
* `sendAt`. Resolves on scheduling, exactly like
|
|
18330
|
+
* `experimental_hooks.recheck`.
|
|
18063
18331
|
*/
|
|
18064
18332
|
recheck(): Promise<void>;
|
|
18065
18333
|
}
|
package/dist/testing/index.js
CHANGED
|
@@ -3761,6 +3761,20 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
3761
3761
|
}
|
|
3762
3762
|
|
|
3763
3763
|
// src/testing/fixtures.ts
|
|
3764
|
+
function makeHostResponse(overrides = {}) {
|
|
3765
|
+
return {
|
|
3766
|
+
id: "host-1",
|
|
3767
|
+
name: "Test host",
|
|
3768
|
+
status: "connected",
|
|
3769
|
+
type: "persistent",
|
|
3770
|
+
maxPermissionMode: "full",
|
|
3771
|
+
lastSeenAt: null,
|
|
3772
|
+
lastRejectedProtocolVersion: null,
|
|
3773
|
+
createdAt: 0,
|
|
3774
|
+
updatedAt: 0,
|
|
3775
|
+
...overrides
|
|
3776
|
+
};
|
|
3777
|
+
}
|
|
3764
3778
|
function makeThreadResponse(overrides = {}) {
|
|
3765
3779
|
return {
|
|
3766
3780
|
id: "thread-1",
|
|
@@ -4079,6 +4093,7 @@ export {
|
|
|
4079
4093
|
createFakePluginHost,
|
|
4080
4094
|
createFakeSdk,
|
|
4081
4095
|
scanPublicSdkOnly as experimental_scanPublicSdkOnly,
|
|
4096
|
+
makeHostResponse,
|
|
4082
4097
|
makeMessageDispatchHookContext,
|
|
4083
4098
|
makePluginAgentConfigurationContext,
|
|
4084
4099
|
makeQueueEntry,
|