/** * Shared setup for hmem-mcp and hmem-curate-server. * Both MCP servers run as separate processes but share env vars, config, and sync logic. */ import { z } from "zod"; import { HmemStore } from "./hmem-store.js"; import type { HmemConfig } from "./hmem-config.js"; export declare const HMEM_PATH: string; export declare const PROJECT_DIR: string; export declare function log(msg: string): void; export declare function jsonArrayString(schema: T): z.ZodPipe, T>; export declare function validateFilePath(userPath: string, hmemDir: string): string; export declare function safeError(e: unknown): string; export declare function activeProjectLine(store: HmemStore): string; export declare function syncPull(hmemPath: string): Promise>; export declare function syncPullThenPush(hmemPath: string): Promise; export declare function syncPush(hmemPath: string): void; export declare function reserveId(hmemPath: string, id: string): Promise; export declare function syncPushSync(hmemPath: string): Promise; export declare function syncPushWithRetry(hmemPath: string, maxAttempts?: number): Promise<{ attempts: number; resolved: boolean; }>; export declare function reserveNextSubIds(hmemPath: string, parentId: string, content: string, hmemStore: HmemStore, maxAttempts?: number): Promise; export declare function bumpId(id: string): string; export declare function compareIds(a: string, b: string): number; export declare function reserveNextId(hmemPath: string, prefix: string, hmemStore: HmemStore, maxAttempts?: number): Promise; export declare const hmemConfig: HmemConfig; export declare function resolveStore(storeName: "personal" | "company", hmemPath: string | undefined): { store: HmemStore; label: string; path: string; isExternal: boolean; };