import { init_loader, loadConfig } from "../../config/loader.js";
import { SessionIndex } from "../../session/manager.js";
import "../../session/index.js";
//#region src/cli/utils/session.ts
/**
* Session management utilities for CLI commands
*/
init_loader();
/**
* Get initialized SessionManager instance
* Eliminates repeated initialization boilerplate
*/
async function getSessionIndex() {
	const manager = new SessionIndex({ config: loadConfig() });
	await manager.initialize();
	return manager;
}
async function getSessionIndexSafe() {
	try {
		return {
			manager: await getSessionIndex(),
			error: null
		};
	} catch (error) {
		return {
			manager: null,
			error
		};
	}
}
//#endregion
export { getSessionIndex, getSessionIndexSafe };

//# sourceMappingURL=session.js.map