/**
 * Folder Document Sync Adapter
 *
 * Implements the DocumentSyncAdapter interface for local folder-based
 * document synchronization. Maps between Stoneforge documents and
 * markdown files with YAML frontmatter in a local directory tree.
 *
 * Uses folder-fs.ts for all filesystem operations (read, write, list).
 *
 * Conventions:
 * - project = absolute folder path (base directory)
 * - externalId = relative file path within the folder (e.g., 'notes/meeting.md')
 * - URL format: file:///absolute/path/to/file.md
 * - Filenames are generated from titles using slugification
 */
import type { DocumentSyncAdapter, ExternalDocument, ExternalDocumentInput, Timestamp } from '@stoneforge/core';
/**
 * Converts a title string into a filename-safe slug.
 *
 * - Lowercases the string
 * - Replaces non-alphanumeric characters (except hyphens) with hyphens
 * - Collapses consecutive hyphens
 * - Trims leading/trailing hyphens
 * - Falls back to 'untitled' for empty results
 *
 * @param title - The document title to slugify
 * @returns A filename-safe slug string (without extension)
 */
export declare function slugify(title: string): string;
/**
 * DocumentSyncAdapter implementation for local folder-based sync.
 *
 * Maps between Stoneforge ExternalDocument and markdown files with YAML
 * frontmatter on the local filesystem.
 *
 * Usage:
 * ```typescript
 * const adapter = new FolderDocumentAdapter();
 * const doc = await adapter.getPage('/path/to/docs', 'notes/meeting.md');
 * ```
 */
export declare class FolderDocumentAdapter implements DocumentSyncAdapter {
    /**
     * Fetch a single document by its relative file path.
     *
     * @param project - Absolute path to the base directory
     * @param externalId - Relative file path (e.g., 'notes/meeting.md')
     * @returns The document as an ExternalDocument, or null if not found
     */
    getPage(project: string, externalId: string): Promise<ExternalDocument | null>;
    /**
     * List documents modified since a given timestamp.
     *
     * Reads each file to extract title and content, returning full
     * ExternalDocument objects.
     *
     * @param project - Absolute path to the base directory
     * @param since - ISO 8601 timestamp; only files modified after this are returned
     * @returns Array of ExternalDocument objects for modified files
     */
    listPagesSince(project: string, since: Timestamp): Promise<ExternalDocument[]>;
    /**
     * Create a new document file in the folder.
     *
     * Generates a filename from the title using slugification, writes
     * the content with frontmatter, and returns the created document.
     *
     * If the page has a `libraryPath`, the file is placed in the
     * corresponding subdirectory. For example, a libraryPath of
     * 'documentation/api' results in the file being created at
     * 'documentation/api/my-doc.md'.
     *
     * @param project - Absolute path to the base directory
     * @param page - Document input with title, content, and optional contentType
     * @returns The created ExternalDocument
     */
    createPage(project: string, page: ExternalDocumentInput): Promise<ExternalDocument>;
    /**
     * Update an existing document file in the folder.
     *
     * Reads the existing file, merges the updates (preserving existing
     * frontmatter), and writes back. Returns the updated document.
     *
     * @param project - Absolute path to the base directory
     * @param externalId - Relative file path of the existing document
     * @param updates - Partial document input with fields to update
     * @returns The updated ExternalDocument
     */
    updatePage(project: string, externalId: string, updates: Partial<ExternalDocumentInput>): Promise<ExternalDocument>;
}
/**
 * Creates a new FolderDocumentAdapter instance.
 *
 * @returns A configured FolderDocumentAdapter
 */
export declare function createFolderDocumentAdapter(): FolderDocumentAdapter;
//# sourceMappingURL=folder-document-adapter.d.ts.map