import { type IncomingMessage, type ServerResponse } from "node:http"; import type { Logger } from "@onenomad/przm-cortex-core"; /** * Per-workspace markdown docs surface. * * GET /api/workspace-docs?workspace= — list markdown * files in the * workspace's * docs/ dir * GET /api/workspace-docs/?workspace= — read one file * * The query-string `workspace` is optional; when absent we resolve the * active workspace from `~/.cortex/state.json`. Slugs are restricted to * `[A-Za-z0-9._-]+` so a caller can't traverse outside the docs/ dir. * * This is read-only on purpose — workspace docs are authored on disk * (Obsidian, your editor of choice) and surfaced through the dashboard * for at-a-glance reading. Editing them would duplicate the notes * surface and the round-trip risk that comes with it. */ export interface WorkspaceDocSummary { slug: string; title: string; description?: string; updatedAt: string; sizeBytes: number; } export interface WorkspaceDocsListResponse { workspace: string | null; path: string | null; exists: boolean; docs: WorkspaceDocSummary[]; } export interface WorkspaceDocReadResponse { workspace: string; slug: string; title: string; body: string; updatedAt: string; path: string; } export declare function handleWorkspaceDocs(req: IncomingMessage, res: ServerResponse, pathname: string, logger: Logger): Promise; //# sourceMappingURL=workspace-docs.d.ts.map