/** * Workspace Manager — Stores per-project data outside the Mémoire repo. * Each project gets a workspace at ~/.memoire-workspaces/{workspace-id}/ * keyed by SHA256 hash of the project's absolute path. */ import { z } from "zod"; declare const ProjectMetaSchema: z.ZodObject<{ name: z.ZodString; path: z.ZodString; created: z.ZodString; lastAccessed: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; name: string; created: string; lastAccessed: string; }, { path: string; name: string; created: string; lastAccessed: string; }>; export type ProjectMeta = z.infer; declare const DesignSystemDataSchema: z.ZodObject<{ tokens: z.ZodDefault>; components: z.ZodDefault>; styles: z.ZodDefault>; lastSync: z.ZodDefault; }, "strip", z.ZodTypeAny, { components: unknown[]; lastSync: string; styles: unknown[]; tokens: unknown[]; }, { components?: unknown[] | undefined; lastSync?: string | undefined; styles?: unknown[] | undefined; tokens?: unknown[] | undefined; }>; export type DesignSystemData = z.infer; declare const KnowledgeBaseSchema: z.ZodObject<{ research: z.ZodOptional; patterns: z.ZodOptional; decisions: z.ZodOptional; }, "strip", z.ZodTypeAny, { research?: unknown; patterns?: unknown; decisions?: unknown; }, { research?: unknown; patterns?: unknown; decisions?: unknown; }>; export type KnowledgeBase = z.infer; declare const ServerStateSchema: z.ZodObject<{ port: z.ZodOptional; pid: z.ZodOptional; startedAt: z.ZodOptional; status: z.ZodDefault>; }, "strip", z.ZodTypeAny, { status: "running" | "stopped"; port?: number | undefined; startedAt?: string | undefined; pid?: number | undefined; }, { status?: "running" | "stopped" | undefined; port?: number | undefined; startedAt?: string | undefined; pid?: number | undefined; }>; export type ServerState = z.infer; declare const GenerationEntrySchema: z.ZodObject<{ timestamp: z.ZodString; specName: z.ZodString; status: z.ZodEnum<["success", "failed"]>; message: z.ZodString; files: z.ZodOptional>; error: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "success" | "failed"; message: string; timestamp: string; specName: string; error?: string | undefined; files?: string[] | undefined; }, { status: "success" | "failed"; message: string; timestamp: string; specName: string; error?: string | undefined; files?: string[] | undefined; }>; export type GenerationEntry = z.infer; declare const RegistrySchema: z.ZodObject<{ version: z.ZodLiteral<1>; entries: z.ZodRecord>; }, "strip", z.ZodTypeAny, { entries: Record; version: 1; }, { entries: Record; version: 1; }>; export type WorkspaceRegistry = z.infer; export declare class WorkspaceManager { private workspaceRoot; constructor(workspaceRoot?: string); /** * Generate a workspace ID from project path (SHA256 hash, first 12 chars) */ private generateWorkspaceId; /** * Get the workspace directory for a project */ private getWorkspaceDir; /** * Load or initialize the workspace registry */ private loadRegistry; /** * Save the workspace registry */ private saveRegistry; /** * Get or create a workspace for a project */ getWorkspace(projectPath: string): Promise; /** * List all known workspaces */ listWorkspaces(): Promise; /** * Clean up a workspace (reset all project data) */ cleanWorkspace(projectPath: string): Promise; /** * Read cached design system */ getDesignSystem(projectPath: string): Promise; /** * Write design system */ saveDesignSystem(projectPath: string, data: DesignSystemData): Promise; /** * Read knowledge base */ getKnowledge(projectPath: string): Promise; /** * Write to knowledge base */ saveKnowledge(projectPath: string, key: "research" | "patterns" | "decisions", data: unknown): Promise; /** * Read server state */ getServerState(projectPath: string): Promise; /** * Write server state */ saveServerState(projectPath: string, state: ServerState): Promise; /** * Append to codegen history */ logGeneration(projectPath: string, entry: GenerationEntry): Promise; } /** * Singleton workspace manager instance */ export declare const workspace: WorkspaceManager; export {};