/** * Agent path and list resolution (config is the single source of truth). */ import type { Config } from '../config/schema.js'; export declare const DEFAULT_AGENT_ID = "main"; /** Normalized id segment safe for directory names under `agents//`. */ export declare const STRICT_AGENT_ID_RE: RegExp; /** Path-safe agent id. */ export declare function normalizeAgentId(value: string | undefined | null): string; /** * Validate agent id for new agents (folder-safe path segment). * When `explicitId` is set, it must already match {@link STRICT_AGENT_ID_RE} (case-insensitive input, stored lowercase). * When omitted, id is derived from `displayNameForDerivation` via {@link normalizeAgentId}. */ export declare function validateAgentIdForNewAgent(explicitId: string | undefined | null, displayNameForDerivation: string): { ok: true; agentId: string; } | { ok: false; error: string; }; /** Expand `~` and resolve to an absolute path. */ export declare function resolveUserPath(raw: string): string; type AgentEntry = NonNullable['list']>[number]; export declare function listAgentEntries(cfg: Config): AgentEntry[]; export declare function resolveDefaultAgentId(cfg: Config): string; /** * Markdown workspace root for an agent. */ export declare function resolveAgentWorkspaceDir(cfg: Config, agentId: string): string; /** * Internal agent state dir: credentials, `agent.json`, pid, inbox (`…/agent/`). */ export declare function resolveAgentDir(cfg: Config, agentId: string): string; /** Parent of `sessions/` and `agent/`: `/agents//`. */ export declare function resolveAgentHomeDir(cfg: Config, agentId: string): string; /** Profile Markdown + gateway avatar files: `/agents//profile/`. */ export declare function resolveAgentProfileDir(cfg: Config, agentId: string): string; /** Resolved path for a single profile Markdown basename (e.g. `SOUL.md`). */ export declare function resolveAgentProfileMarkdownPath(cfg: Config, agentId: string, filename: string): string; /** Agent ids whose workspace root contains `workspacePath` (longest match first). */ export declare function resolveAgentIdsByWorkspacePath(cfg: Config, workspacePath: string): string[]; /** Best-matching agent id for cwd, or `undefined` when no workspace contains the path. */ export declare function resolveAgentIdByWorkspacePath(cfg: Config, workspacePath: string): string | undefined; /** * Find the agent id whose resolved markdown workspace matches `resolvedWorkspacePath`. * Falls back to {@link resolveDefaultAgentId} when no list entry matches. */ export declare function resolveAgentIdForWorkspacePath(cfg: Config, resolvedWorkspacePath: string): string; export declare function getDefaultWorkspacePath(cfg: Config): string; export {};