import { q as resolveOpenClawStateSqliteDir } from "./openclaw-state-db-readonly-YhcJ4nbp.js";
import { n as normalizeAgentId } from "./agent-id-CeT3w4ap.js";
import path from "node:path";
//#region src/state/openclaw-agent-db.paths.ts
const INCOGNITO_AGENT_SQLITE_BASENAME = "incognito-openclaw-agent.sqlite";
/** Resolve the SQLite file for one normalized agent id. */
function resolveOpenClawAgentSqlitePath(options) {
	const agentId = normalizeAgentId(options.agentId);
	return path.resolve(options.path ?? path.join(path.dirname(resolveOpenClawStateSqliteDir(options.env ?? process.env)), "agents", agentId, "agent", "openclaw-agent.sqlite"));
}
/** Resolve the lexical sentinel path that keys one agent's process-held incognito database. */
function resolveIncognitoOpenClawAgentSqlitePath(options) {
	return path.join(path.dirname(resolveOpenClawAgentSqlitePath(options)), INCOGNITO_AGENT_SQLITE_BASENAME);
}
/** Identify the reserved incognito sentinel without touching its filesystem path. */
function isIncognitoOpenClawAgentSqlitePath(pathname, options) {
	return path.resolve(pathname) === resolveIncognitoOpenClawAgentSqlitePath(options);
}
//#endregion
export { resolveIncognitoOpenClawAgentSqlitePath as n, resolveOpenClawAgentSqlitePath as r, isIncognitoOpenClawAgentSqlitePath as t };
