/**
 * Workspace file handlers — upload, list, read workspace .md files.
 *
 * Workspace files (SOUL.md, IDENTITY.md, etc.) define agent personality
 * and behavior. These handlers validate filenames, verify signatures,
 * enforce size limits, and perform atomic writes.
 */
export interface WorkspaceFileInfo {
    filename: string;
    size: number;
    modified: string;
}
export interface WorkspaceUploadData {
    filename: string;
    content: string;
    signature: string;
    signer_public_key: string;
    timestamp: string;
}
export interface WorkspaceUploadResult {
    status: "success" | "error";
    error?: string;
    written_path?: string;
    verified_signature?: boolean;
}
export interface WorkspaceListResult {
    files: WorkspaceFileInfo[];
}
export interface WorkspaceReadResult {
    filename: string;
    content: string;
    size: number;
}
export interface WorkspaceReadError {
    error: string;
}
/**
 * Validate a workspace filename.
 * Returns an error message if invalid, null if valid.
 *
 * Rules:
 * - Must end in .md
 * - No path traversal (.., /)
 * - No backslashes or null bytes
 * - Alphanumeric, hyphens, underscores, and dots only
 */
export declare function validateWorkspaceFilename(filename: string): string | null;
/**
 * Handle a workspace file upload — verify signature, validate, write atomically.
 */
export declare function handleWorkspaceUpload(data: WorkspaceUploadData, workspaceDir: string): Promise<WorkspaceUploadResult>;
/**
 * List .md files in the workspace directory.
 */
export declare function handleWorkspaceList(workspaceDir: string): Promise<WorkspaceListResult>;
/**
 * Read a workspace file's content.
 */
export declare function handleWorkspaceRead(data: {
    filename: string;
}, workspaceDir: string): Promise<WorkspaceReadResult | WorkspaceReadError>;
//# sourceMappingURL=workspace-handlers.d.ts.map