import { lstat } from 'node:fs/promises'; import type { SqliteDatabase } from '../db/adapter.js'; import { type ErrorCode } from '../errors.js'; import { useRepository } from '../commands/use.js'; export declare const MAX_SETUP_PROJECT_LOCATIONS = 10000; export interface RegisteredProjectLocation { repositoryId: string; workspace: string; repositoryRoot: string; } export type ProjectAgentRefreshResult = RegisteredProjectLocation & ({ status: 'created' | 'updated' | 'unchanged'; agentFile: string; bindingAction: 'created' | 'updated' | 'unchanged' | 'planned'; } | { status: 'skipped'; agentFile: null; reason: 'missing_root' | 'unsafe_root'; } | { status: 'failed'; agentFile: null; reason: 'inaccessible_root' | 'use_rejected'; errorCode: ErrorCode | 'FILESYSTEM_ERROR'; }); export interface RefreshRegisteredProjectOptions { databasePath: string; migrationsDirectory?: string; dryRun?: boolean; } export interface RefreshRegisteredProjectDependencies { useRepository?: typeof useRepository; lstat?: typeof lstat; } export interface ListRegisteredProjectOptions { allowUnavailableRegistry?: boolean; } /** Read one bounded, validated snapshot of project locations persisted by Kiokuko. */ export declare function listRegisteredProjectLocations(database: SqliteDatabase, options?: ListRegisteredProjectOptions): RegisteredProjectLocation[]; /** Apply the existing `kiokuko use` file contract to each registered live project. */ export declare function refreshRegisteredProjectAgentFiles(locations: readonly RegisteredProjectLocation[], options: RefreshRegisteredProjectOptions, dependencyOverrides?: RefreshRegisteredProjectDependencies): Promise; //# sourceMappingURL=project-agent-refresh.d.ts.map