/**
 * VectorDrive Extension for Singularity Forge
 *
 * Integrates the native Rust vectordrive vector database for semantic
 * memory and code search. Works offline with no external services.
 */
import { VectordriveManager } from "./manager.js";
import { registerVectordriveInfoTool } from "./tool-info.js";
import { registerVectordriveSearchTool } from "./tool-search.js";
import { registerVectordriveStoreTool } from "./tool-store.js";
export default function (pi) {
	registerVectordriveInfoTool(pi);
	registerVectordriveStoreTool(pi);
	registerVectordriveSearchTool(pi);
	// Pre-warm the connection on session start
	pi.on("session_start", async () => {
		const manager = VectordriveManager.getInstance();
		await manager.getStatus();
	});
	pi.on("session_shutdown", async () => {
		const manager = VectordriveManager.getInstance();
		await manager.close();
	});
}
