export interface ArtifactLocation { path: string; exists: boolean; } export interface ClaudeMdBlock { path: string; startLine: number; endLine: number; startMarker: string; endMarker: string; } export interface McpServerEntry { file: string; key: string; target: 'claude' | 'codex' | 'opencode'; } export interface PermissionEntry { file: string; pattern: string; matches: string[]; } export interface ArtifactManifest { agentId: string; projectDir: ArtifactLocation | null; dataDir: ArtifactLocation | null; dataDirLegacy: ArtifactLocation | null; claudeMdBlocks: ClaudeMdBlock[]; mcpServerEntries: McpServerEntry[]; permissionEntries: PermissionEntry[]; launcherScript: ArtifactLocation | null; } export interface RemovalResult { removed: boolean; path: string; error?: string; } /** * Detect all artifacts installed by a Soleri agent. * Non-destructive — reads the filesystem but never modifies it. */ export declare function detectArtifacts(agentId: string, agentDir?: string): ArtifactManifest; /** * Remove a directory recursively. * Idempotent — returns { removed: false } if the directory doesn't exist. */ export declare function removeDirectory(dirPath: string): Promise; /** * Remove a CLAUDE.md block by line range (1-based, inclusive). * Collapses triple+ blank lines down to at most two consecutive newlines. * Idempotent — returns { removed: false } if the file doesn't exist. */ export declare function removeClaudeMdBlock(filePath: string, startLine: number, endLine: number): Promise; /** * Remove permission entries for an agent from settings.local.json. * Filters out entries from permissions.allow that start with `mcp____`. * Idempotent — returns { removed: false } if the file doesn't exist or has no matches. */ export declare function removePermissionEntries(filePath: string, agentId: string): Promise; /** * Remove a launcher script (e.g. /usr/local/bin/). * Idempotent — returns { removed: false } if the file doesn't exist. */ export declare function removeLauncherScript(scriptPath: string): Promise;