@@ -91,6 +91,7 @@ vi.mock("./cli.host.runtime.js", async () => {
9191 {
9292 defaultRuntime,
9393 formatErrorMessage,
94+ getMemoryEmbeddingCommandSecretTargetIds,
9495 setVerbose,
9596 shortenHomeInString,
9697 shortenHomePath,
@@ -109,6 +110,7 @@ vi.mock("./cli.host.runtime.js", async () => {
109110 return {
110111 defaultRuntime,
111112 formatErrorMessage,
113+ getMemoryEmbeddingCommandSecretTargetIds,
112114 getMemorySearchManager,
113115 listMemoryFiles,
114116 getRuntimeConfig,
@@ -129,6 +131,7 @@ vi.mock("./cli.host.runtime.js", async () => {
129131
130132let registerMemoryCli : typeof import ( "./cli.js" ) . registerMemoryCli ;
131133let defaultRuntime : typeof import ( "openclaw/plugin-sdk/memory-core-host-runtime-cli" ) . defaultRuntime ;
134+ let getMemoryEmbeddingCommandSecretTargetIds : typeof import ( "openclaw/plugin-sdk/memory-core-host-runtime-cli" ) . getMemoryEmbeddingCommandSecretTargetIds ;
132135let isVerbose : typeof import ( "openclaw/plugin-sdk/memory-core-host-runtime-cli" ) . isVerbose ;
133136let setVerbose : typeof import ( "openclaw/plugin-sdk/memory-core-host-runtime-cli" ) . setVerbose ;
134137let fixtureRoot = "" ;
@@ -140,10 +143,12 @@ beforeAll(async () => {
140143 ( { registerMemoryCli } = await import ( "./cli.js" ) ) ;
141144 const {
142145 defaultRuntime : loadedDefaultRuntime ,
146+ getMemoryEmbeddingCommandSecretTargetIds : loadedGetMemoryEmbeddingCommandSecretTargetIds ,
143147 isVerbose : loadedIsVerbose ,
144148 setVerbose : loadedSetVerbose ,
145149 } = await import ( "openclaw/plugin-sdk/memory-core-host-runtime-cli" ) ;
146150 defaultRuntime = loadedDefaultRuntime ;
151+ getMemoryEmbeddingCommandSecretTargetIds = loadedGetMemoryEmbeddingCommandSecretTargetIds ;
147152 isVerbose = loadedIsVerbose ;
148153 setVerbose = loadedSetVerbose ;
149154 fixtureRoot = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , "memory-cli-fixtures-" ) ) ;
@@ -980,9 +985,7 @@ describe("memory cli", () => {
980985 ) as { config ?: unknown ; commandName ?: unknown ; targetIds ?: unknown ; mode ?: unknown } ;
981986 expect ( secretRefsCall . config ) . toBe ( config ) ;
982987 expect ( secretRefsCall . commandName ) . toBe ( "memory status" ) ;
983- expect ( secretRefsCall . targetIds ) . toStrictEqual (
984- new Set ( [ "memory.search.remote.apiKey" , "agents.entries.*.memory.search.remote.apiKey" ] ) ,
985- ) ;
988+ expect ( secretRefsCall . targetIds ) . toStrictEqual ( getMemoryEmbeddingCommandSecretTargetIds ( ) ) ;
986989 expect ( secretRefsCall . mode ) . toBe ( "read_only_status" ) ;
987990 } ) ;
988991
0 commit comments