mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 20:20:43 +00:00
feat(plugins): add SQLite plugin state store (#74190)
* feat(plugins): add experimental sqlite plugin state store
This commit is contained in:
@@ -226,7 +226,12 @@ export function createPluginRuntime(_options: CreatePluginRuntimeOptions = {}):
|
||||
channel: createRuntimeChannel(),
|
||||
events: createRuntimeEvents(),
|
||||
logging: createRuntimeLogging(),
|
||||
state: { resolveStateDir },
|
||||
state: {
|
||||
resolveStateDir,
|
||||
openKeyedStore: () => {
|
||||
throw new Error("openKeyedStore is only available through the plugin runtime proxy.");
|
||||
},
|
||||
},
|
||||
tasks,
|
||||
taskFlow,
|
||||
} satisfies Omit<
|
||||
@@ -262,7 +267,7 @@ export function createPluginRuntime(_options: CreatePluginRuntimeOptions = {}):
|
||||
defineCachedValue(runtime, "videoGeneration", createRuntimeVideoGeneration);
|
||||
defineCachedValue(runtime, "musicGeneration", createRuntimeMusicGeneration);
|
||||
|
||||
return runtime as PluginRuntime;
|
||||
return runtime as unknown as PluginRuntime;
|
||||
}
|
||||
|
||||
export type { PluginRuntime } from "./types.js";
|
||||
|
||||
@@ -227,6 +227,9 @@ export type PluginRuntimeCore = {
|
||||
};
|
||||
state: {
|
||||
resolveStateDir: typeof import("../../config/paths.js").resolveStateDir;
|
||||
openKeyedStore: <T>(
|
||||
options: import("../../plugin-state/plugin-state-store.types.js").OpenKeyedStoreOptions,
|
||||
) => import("../../plugin-state/plugin-state-store.types.js").PluginStateKeyedStore<T>;
|
||||
};
|
||||
tasks: {
|
||||
runs: PluginRuntimeTaskRuns;
|
||||
|
||||
Reference in New Issue
Block a user