/** * Path utilities for hash-based directory structure. * * Architecture: * - Config location determines hash: sha256(dirname(configPath)).slice(0, 12) * - Each project gets directory: ~/.agent-orchestrator/{hash}-{projectId}/ * - Sessions inside: sessions/{sessionName} (no hash prefix, already namespaced) * - Tmux names include hash for global uniqueness: {hash}-{prefix}-{num} */ /** * Generate a 12-character hash from a config directory path. * Always resolves symlinks before hashing to ensure consistency. */ export declare function generateConfigHash(configPath: string): string; /** * Generate project ID from project path (basename of the path). * Example: ~/repos/integrator → "integrator" */ export declare function generateProjectId(projectPath: string): string; /** * Generate instance ID combining hash and project ID. * Format: {hash}-{projectId} * Example: "a3b4c5d6e7f8-integrator" */ export declare function generateInstanceId(configPath: string, projectPath: string): string; /** * Generate session prefix from project ID using clean heuristics. * * Rules: * 1. ≤4 chars: use as-is (lowercase) * 2. CamelCase: extract uppercase letters (PyTorch → pt) * 3. kebab/snake case: use initials (agent-orchestrator → ao) * 4. Single word: first 3 chars (integrator → int) */ export declare function generateSessionPrefix(projectId: string): string; /** * Get the project base directory for a given config and project. * Format: ~/.agent-orchestrator/{hash}-{projectId} */ export declare function getProjectBaseDir(configPath: string, projectPath: string): string; /** * Get the shared observability base directory for a config. * Format: ~/.agent-orchestrator/{hash}-observability */ export declare function getObservabilityBaseDir(configPath: string): string; /** * Get the sessions directory for a project. * Format: ~/.agent-orchestrator/{hash}-{projectId}/sessions */ export declare function getSessionsDir(configPath: string, projectPath: string): string; /** * Get the worktrees directory for a project. * Format: ~/.agent-orchestrator/{hash}-{projectId}/worktrees */ export declare function getWorktreesDir(configPath: string, projectPath: string): string; /** * Get the feedback reports directory for a project. * Format: ~/.agent-orchestrator/{hash}-{projectId}/feedback-reports */ export declare function getFeedbackReportsDir(configPath: string, projectPath: string): string; /** * Get the archive directory for a project. * Format: ~/.agent-orchestrator/{hash}-{projectId}/archive */ export declare function getArchiveDir(configPath: string, projectPath: string): string; /** * Get the .origin file path for a project. * This file stores the config path for collision detection. */ export declare function getOriginFilePath(configPath: string, projectPath: string): string; /** * Generate user-facing session name. * Format: {prefix}-{num} * Example: "int-1", "ao-42" */ export declare function generateSessionName(prefix: string, num: number): string; /** * Generate tmux session name (globally unique). * Format: {hash}-{prefix}-{num} * Example: "a3b4c5d6e7f8-int-1" */ export declare function generateTmuxName(configPath: string, prefix: string, num: number): string; /** * Parse a tmux session name to extract components. * Returns null if the name doesn't match the expected format. */ export declare function parseTmuxName(tmuxName: string): { hash: string; prefix: string; num: number; } | null; /** * Expand ~ to home directory. */ export declare function expandHome(filepath: string): string; /** * Validate and store the .origin file for a project. * Throws if a hash collision is detected (different config, same hash). */ export declare function validateAndStoreOrigin(configPath: string, projectPath: string): void; //# sourceMappingURL=paths.d.ts.map