27 lines
1012 B
JavaScript
27 lines
1012 B
JavaScript
/**
|
|
* Original-record layer public surface.
|
|
*
|
|
* This module deliberately has no dependency on Mnemon's core: a host entry
|
|
* can create the recorder, register its three tools, and feed it session
|
|
* events without changing any Mnemon source, database or UI.
|
|
*/
|
|
import { RawMemoryStore } from "./store.js";
|
|
import { rawMemorySettingsFromConfig } from "./settings.js";
|
|
import { createRawMemoryTools } from "./tools.js";
|
|
/** Build the raw recorder and its tools from one row config. */
|
|
export function createRawMemoryRuntime(config) {
|
|
const settings = rawMemorySettingsFromConfig(config);
|
|
const store = new RawMemoryStore({
|
|
root: settings.dir,
|
|
maxBytesPerSession: settings.maxBytesPerSession,
|
|
});
|
|
return {
|
|
settings,
|
|
store,
|
|
tools: createRawMemoryTools({ store, settings: () => settings }),
|
|
};
|
|
}
|
|
export { RawMemoryStore } from "./store.js";
|
|
export { createRawMemoryTools } from "./tools.js";
|
|
export { rawMemorySettingsFromConfig } from "./settings.js";
|