import { s as normalizeOptionalLowercaseString } from "./string-coerce-DyL154ka.js";
import { o as resolveRequiredHomeDir } from "./home-dir-Bs0GlzoJ.js";
import path from "node:path";
import os from "node:os";
//#region src/agents/workspace-default.ts
function resolveDefaultAgentWorkspaceDir(env = process.env, homedir = os.homedir) {
	const workspaceDir = env.DAOCORE_WORKSPACE_DIR?.trim();
	if (workspaceDir) return path.resolve(workspaceDir);
	const home = resolveRequiredHomeDir(env, homedir);
	const profile = env.DAOCORE_PROFILE?.trim();
	if (profile && normalizeOptionalLowercaseString(profile) !== "default") return path.join(home, ".daocore", `workspace-${profile}`);
	return path.join(home, ".daocore", "workspace");
}
const DEFAULT_AGENT_WORKSPACE_DIR = resolveDefaultAgentWorkspaceDir();
//#endregion
export { resolveDefaultAgentWorkspaceDir as n, DEFAULT_AGENT_WORKSPACE_DIR as t };
