import path from "node:path"; import fs from "node:fs"; export function getContractorStateDir(workspace: string): string { return path.join(workspace, ".openclaw", "contractor-agent"); } export function getSessionMapPath(workspace: string): string { return path.join(getContractorStateDir(workspace), "session-map.json"); } export function ensureContractorStateDir(workspace: string): void { const dir = getContractorStateDir(workspace); fs.mkdirSync(dir, { recursive: true }); }