import { isMemorySubsystemEnabled } from "./memory-config.js";
import { BuiltinMemoryProvider } from "./builtin-provider.js";
import { MemoryManager } from "./manager.js";
import { StubMemoryProvider } from "./stub-memory-provider.js";
//#region src/agent/memory/create-memory-manager.ts
function createMemoryManagerFromConfig(_workspaceDir, store, config) {
	const mgr = new MemoryManager();
	mgr.addProvider(new BuiltinMemoryProvider(store));
	if (!isMemorySubsystemEnabled(config)) return mgr;
	if ((config?.agents?.defaults?.memory?.provider ?? "none") === "stub") {
		const stub = new StubMemoryProvider();
		if (stub.isAvailable()) mgr.addProvider(stub);
	}
	return mgr;
}
//#endregion
export { createMemoryManagerFromConfig };

//# sourceMappingURL=create-memory-manager.js.map