import { resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
import "./agent-profile.js";
//#region src/config/workspace-dirs.ts
init_resolve_route();
/**
* Return the deduplicated list of workspace directory paths for all agents
* defined in `config.agents.list`, plus the default agent.
* Useful for file watchers, doctor checks, and batch workspace operations.
*
* OpenClaw-aligned: profile / persona files live in the workspace root,
* so this single list covers both workspace and profile Markdown directories.
*/
function listAgentWorkspaceDirs(config) {
	const dirs = /* @__PURE__ */ new Set();
	const list = config.agents?.list;
	if (Array.isArray(list)) {
		for (const entry of list) if (entry && typeof entry === "object" && typeof entry.id === "string") dirs.add(resolveAgentWorkspaceDir(config, entry.id));
	}
	dirs.add(resolveAgentWorkspaceDir(config, getDefaultAgentId(config)));
	return [...dirs];
}
/**
* OpenClaw-aligned: profile Markdown files live in the workspace root, so profile dirs match workspace dirs.
*/
function listAgentProfileMarkdownDirs(config) {
	return listAgentWorkspaceDirs(config);
}
//#endregion
export { listAgentProfileMarkdownDirs, listAgentWorkspaceDirs };

//# sourceMappingURL=workspace-dirs.js.map