/**
 * Daily Log Service
 *
 * Manages daily markdown log files for tracking agent activities within a project.
 * Each day produces a single log file at `{projectPath}/.crewly/logs/daily/YYYY-MM-DD.md`
 * containing timestamped entries grouped by agent role and ID.
 *
 * Log entries are append-only and provide a human-readable audit trail of what
 * each agent worked on during the day. The orchestrator and agents can review
 * recent logs to maintain continuity across sessions.
 *
 * @module services/memory/daily-log.service
 */
/**
 * Service for managing daily agent activity logs
 *
 * Follows singleton pattern for consistent state management across the backend.
 * Uses append-only file writes since log entries are never modified after creation.
 *
 * @example
 * ```typescript
 * const dailyLog = DailyLogService.getInstance();
 * await dailyLog.appendEntry('/path/to/project', 'agent-dev-1', 'developer', 'Started login page implementation');
 * const todayLog = await dailyLog.getTodaysLog('/path/to/project');
 * ```
 */
export declare class DailyLogService {
    private static instance;
    private readonly logger;
    /**
     * Creates a new DailyLogService instance
     *
     * Use {@link getInstance} to obtain the singleton instance instead of
     * calling this constructor directly.
     */
    private constructor();
    /**
     * Gets the singleton instance of DailyLogService
     *
     * @returns The singleton DailyLogService instance
     */
    static getInstance(): DailyLogService;
    /**
     * Clears the singleton instance
     *
     * Primarily used in tests to reset state between test cases.
     */
    static clearInstance(): void;
    /**
     * Formats a Date object as a YYYY-MM-DD string
     *
     * @param date - The date to format
     * @returns Date string in YYYY-MM-DD format
     *
     * @example
     * ```typescript
     * formatDate(new Date('2026-02-09T14:30:00Z')); // '2026-02-09'
     * ```
     */
    private formatDate;
    /**
     * Formats a Date object as an HH:MM time string (24-hour format)
     *
     * @param date - The date to format
     * @returns Time string in HH:MM format
     *
     * @example
     * ```typescript
     * formatTime(new Date('2026-02-09T14:05:00')); // '14:05'
     * ```
     */
    private formatTime;
    /**
     * Returns the absolute path to a daily log file
     *
     * Constructs the path using the project's `.crewly` directory and the
     * configured daily log subdirectory from MEMORY_CONSTANTS.
     *
     * @param projectPath - Absolute path to the project root
     * @param date - Optional date string in YYYY-MM-DD format; defaults to today
     * @returns Absolute path to the daily log file
     *
     * @example
     * ```typescript
     * const logPath = dailyLog.getLogPath('/home/user/my-project');
     * // '/home/user/my-project/.crewly/logs/daily/2026-02-09.md'
     *
     * const pastLogPath = dailyLog.getLogPath('/home/user/my-project', '2026-02-07');
     * // '/home/user/my-project/.crewly/logs/daily/2026-02-07.md'
     * ```
     */
    getLogPath(projectPath: string, date?: string): string;
    /**
     * Appends a timestamped activity entry to today's daily log
     *
     * Creates the log file with a date header if it does not already exist.
     * Each entry is formatted as a markdown section with the agent's role, ID,
     * and current time, followed by the entry text as a bullet point.
     *
     * Uses `fs.appendFile` (not atomic write) since daily logs are append-only
     * and a partial write is acceptable -- the next append will still succeed.
     *
     * @param projectPath - Absolute path to the project root
     * @param agentId - Unique identifier of the agent making the entry
     * @param role - Agent's role (e.g., 'developer', 'orchestrator', 'qa')
     * @param entry - Free-text description of the activity
     * @throws Error if the directory cannot be created or the file cannot be written
     *
     * @example
     * ```typescript
     * await dailyLog.appendEntry(
     *   '/home/user/my-project',
     *   'agent-dev-1',
     *   'developer',
     *   'Started login page implementation'
     * );
     * // Appends to .crewly/logs/daily/2026-02-09.md:
     * // ## [developer / agent-dev-1] 14:05
     * // - Started login page implementation
     * ```
     */
    appendEntry(projectPath: string, agentId: string, role: string, entry: string): Promise<void>;
    /**
     * Reads the contents of today's daily log file
     *
     * @param projectPath - Absolute path to the project root
     * @returns The full markdown content of today's log, or null if no log exists yet
     *
     * @example
     * ```typescript
     * const log = await dailyLog.getTodaysLog('/home/user/my-project');
     * if (log) {
     *   console.log(log);
     * } else {
     *   console.log('No activity logged today');
     * }
     * ```
     */
    getTodaysLog(projectPath: string): Promise<string | null>;
    /**
     * Reads and concatenates the most recent daily logs
     *
     * Iterates backwards from today through the specified number of days,
     * reading each log file that exists and joining them with markdown
     * separators. Days without log files are silently skipped.
     *
     * @param projectPath - Absolute path to the project root
     * @param days - Number of days to look back (default: 3, including today)
     * @returns Concatenated log content, or empty string if no logs found
     *
     * @example
     * ```typescript
     * // Get the last 7 days of logs
     * const recentLogs = await dailyLog.getRecentLogs('/home/user/my-project', 7);
     * ```
     */
    getRecentLogs(projectPath: string, days?: number): Promise<string>;
}
//# sourceMappingURL=daily-log.service.d.ts.map