@@ -6,6 +6,7 @@ import type { PluginMemoryEmbeddingProviderRegistration } from "./registry.test-
66import {
77 createCompatibilityNotice ,
88 createCustomHook ,
9+ createInstalledPluginIndexSnapshot ,
910 createPluginLoadResult ,
1011 createPluginRecord ,
1112 DEPRECATED_MEMORY_EMBEDDING_PROVIDER_API_MESSAGE ,
@@ -58,6 +59,10 @@ vi.mock("../config/config.js", () => ({
5859 loadConfig : ( ) => loadConfigMock ( ) ,
5960} ) ) ;
6061
62+ vi . mock ( "../config/io.plugin-metadata.js" , ( ) => ( {
63+ resolveConfigWidePluginManifestRegistry : ( ) => ( { plugins : [ ] , diagnostics : [ ] } ) ,
64+ } ) ) ;
65+
6166vi . mock ( "../config/plugin-auto-enable.js" , ( ) => ( {
6267 applyPluginAutoEnable : ( ...args : unknown [ ] ) => applyPluginAutoEnableMock ( ...args ) ,
6368} ) ) ;
@@ -91,6 +96,7 @@ vi.mock("./manifest-registry-installed.js", () => ({
9196vi . mock ( "./plugin-metadata-snapshot.js" , ( ) => ( {
9297 isPluginMetadataSnapshotCompatible : isPluginMetadataSnapshotCompatibleMock ,
9398 loadPluginMetadataSnapshot : ( params ?: unknown ) => loadPluginMetadataSnapshotMock ( params ) ,
99+ rebasePluginMetadataSnapshotManifestRegistry : < T > ( snapshot : T ) => snapshot ,
94100 resolvePluginMetadataSnapshot : ( params ?: { pluginMetadataSnapshot ?: unknown } ) =>
95101 params ?. pluginMetadataSnapshot ?? loadPluginMetadataSnapshotMock ( params ) ,
96102} ) ) ;
@@ -118,6 +124,7 @@ vi.mock("./runtime.js", () => ({
118124vi . mock ( "../agents/agent-scope.js" , ( ) => ( {
119125 resolveAgentWorkspaceDir : ( ) => undefined ,
120126 resolveDefaultAgentId : ( ) => "default" ,
127+ tryResolveConfiguredAgentWorkspaceDir : ( ) => undefined ,
121128} ) ) ;
122129
123130vi . mock ( "../agents/workspace.js" , ( ) => ( {
@@ -143,23 +150,6 @@ function setSinglePluginLoadResult(
143150 } ) ;
144151}
145152
146- function createInstalledPluginIndexSnapshot (
147- plugins : Array < Record < string , unknown > > ,
148- ) : Record < string , unknown > {
149- return {
150- version : 1 ,
151- warning : "test" ,
152- hostContractVersion : "test" ,
153- compatRegistryVersion : "test" ,
154- migrationVersion : 1 ,
155- policyHash : "test" ,
156- generatedAtMs : 0 ,
157- installRecords : { } ,
158- plugins,
159- diagnostics : [ ] ,
160- } ;
161- }
162-
163153function expectInspectReport (
164154 pluginId : string ,
165155 options : Omit < Parameters < typeof buildPluginInspectReport > [ 0 ] , "id" > = { } ,
0 commit comments