import { h as loadWorkspaceBootstrapFiles } from "./workspace-CnnxQiol.js";
//#region src/agents/bootstrap-cache.ts
const cache = /* @__PURE__ */ new Map();
async function getOrLoadBootstrapFiles(params) {
	const existing = cache.get(params.sessionKey);
	if (existing) return existing;
	const files = await loadWorkspaceBootstrapFiles(params.workspaceDir, { soulPreset: params.soulPreset });
	cache.set(params.sessionKey, files);
	return files;
}
function clearBootstrapSnapshot(sessionKey) {
	cache.delete(sessionKey);
}
function clearBootstrapSnapshotOnSessionRollover(params) {
	if (!params.sessionKey || !params.previousSessionId) return;
	clearBootstrapSnapshot(params.sessionKey);
}
function clearAllBootstrapSnapshots() {
	cache.clear();
}
//#endregion
export { getOrLoadBootstrapFiles as i, clearBootstrapSnapshot as n, clearBootstrapSnapshotOnSessionRollover as r, clearAllBootstrapSnapshots as t };
