interface InstallState { ldmExists: boolean; crystalDbExists: boolean; ccHookDeployed: boolean; ccHookConfigured: boolean; mcpRegistered: boolean; ocDetected: boolean; ocPluginDeployed: boolean; cronInstalled: boolean; installedVersion: string | null; repoVersion: string; needsUpdate: boolean; role: 'core' | 'node' | 'standalone'; relayKeyExists: boolean; } declare function detectInstallState(): InstallState; /** Copy dist/ and package.json to ~/.ldm/extensions/memory-crystal/. */ declare function deployToLdm(): { extensionDir: string; version: string; }; /** Install npm dependencies in the deployed extension directory. */ declare function installLdmDeps(): void; /** Copy dist/ + skills/ + manifests to ~/.openclaw/extensions/memory-crystal/. */ declare function deployToOpenClaw(): { extensionDir: string; version: string; }; /** Install npm dependencies in the OC extension directory. */ declare function installOcDeps(): void; /** Add or update the Memory Crystal Stop hook in ~/.claude/settings.json. Merges safely. */ declare function configureCCHook(): void; /** Register memory-crystal MCP server with Claude Code at user scope. */ declare function registerMCPServer(): void; /** Update OpenClaw .mcp.json to point to the deployed extension. */ declare function registerOcMCPServer(): void; /** Back up crystal.db before deploying new code. Returns the backup path. */ declare function backupCrystalDb(): string; /** Verify the new code can open and read the existing crystal.db without errors. */ declare function verifyCrystalDbReadable(): Promise; /** Show what changed between versions. Returns a human-readable summary. */ declare function formatUpdateSummary(oldVersion: string, newVersion: string): string; interface InstallResult { action: 'installed' | 'updated' | 'up-to-date'; version: string; deployedTo: string[]; steps: string[]; dbStatus?: 'existing' | 'imported' | 'fresh' | 'none'; chunkCount?: number; } /** Run the full install or update flow. Returns a summary of what was done. */ declare function runInstallOrUpdate(options: { agentId?: string; role?: 'core' | 'node'; pairCode?: string; importDb?: string; yes?: boolean; skipDiscover?: boolean; }): Promise; export { type InstallResult, type InstallState, backupCrystalDb, configureCCHook, deployToLdm, deployToOpenClaw, detectInstallState, formatUpdateSummary, installLdmDeps, installOcDeps, registerMCPServer, registerOcMCPServer, runInstallOrUpdate, verifyCrystalDbReadable };