/** * Message store engine — write, read, and list message files. * Spec: §4.4 — Message File Schema */ import type { Message, Labels } from "@pi-orca/core"; export interface WriteMessageParams { title: string; from: string; to: string; body: string; labels?: Labels; projectSlug?: string; } export interface MessageFile { message: Message; body: string; filePath: string; } export interface ListMessagesFilter { from?: string; to?: string; labels?: Labels; limit?: number; projectSlug?: string; } /** * Write a message to the store directory. * * Generates a `msg-` filename, computes the date-based subdirectory * (store/YYYY/MM/DD/), and writes a markdown file with YAML frontmatter. * * @param params - Message parameters * @returns Resolved message file with metadata */ export declare function writeMessage(params: WriteMessageParams): Promise; /** * Read a single message by ID. * * Walks all `.md` files under the store directory, parses frontmatter, * and returns the first match. * * @param messageId - Message ID to look up * @param projectSlug - Optional project slug * @returns Message file or null if not found */ export declare function readMessage(messageId: string, projectSlug?: string): Promise; /** * List messages with optional filters. * * Walks all `.md` files, parses frontmatter, applies filters, sorts by * sentAt descending, and applies limit. * * @param filters - Optional filter criteria * @returns Filtered and sorted message files */ export declare function listMessages(filters?: ListMessagesFilter): Promise; //# sourceMappingURL=store.d.ts.map