import type { ManagedPathInspection } from '../checkpoints/discovery'; import type { SprintFile } from '../types'; /** * What a directory under `.agents/kyro/scopes/` actually is. * * Scope identity used to be inferred from "a directory exists here", which made any stray folder — a * manual backup, an editor artifact, a half-finished checkout — a hard integrity blocker, and let * install/sync persist it into project.json as a real scope. Identity now comes from evidence. * * The two failure modes this taxonomy exists to keep apart: * - Refusing to call a directory a scope must not hide a scope that lost its sprint.json but still * has resumable checkpoints (RECOVERABLE) — that is exactly what recover mode rescues. * - Finding *something* Kyro-shaped must not promise a recovery that does not exist * (OWNED_DAMAGED). Remediation records, certifications, a retirement checkpoint, or a corrupt * checkpoint prove ownership, not resumability. */ export declare const SCOPE_DIR_CLASS: { readonly VALID_SCOPE: "valid-scope"; readonly CORRUPT_SPRINT: "corrupt-sprint"; readonly RECOVERABLE: "recoverable"; readonly OWNED_DAMAGED: "owned-damaged"; readonly FOREIGN: "foreign"; }; export type ScopeDirClass = (typeof SCOPE_DIR_CLASS)[keyof typeof SCOPE_DIR_CLASS]; export interface ScopeDirectory { id: string; class: ScopeDirClass; detail: string; issues: ManagedPathInspection[]; } export type ScopeSprintRead = { kind: 'valid'; sprint: SprintFile; } | { kind: 'invalid'; detail: string; } | { kind: 'unsafe'; issue: ManagedPathInspection; } | { kind: 'absent'; }; /** * Single reader for "what is this scope's sprint.json". Previously duplicated in * project/reconcile.ts (deriveFromSprint) and core/scopes.ts (discoverScopeEntry), each with * slightly different tolerance; both now consume this. */ export declare function readScopeSprint(id: string): ScopeSprintRead; export declare function classifyScopeDirectory(id: string): ScopeDirectory; export declare function classifyScopeDirectories(): ScopeDirectory[]; /** * Directories Kyro owns, whatever their health. This is what discovery, resolution, Doctor and * integrity prepare consume: a corrupt or recoverable scope must stay visible so it can be * diagnosed, while a foreign directory must never enter any of those paths. */ export declare function listOwnedScopeDirectories(): string[]; /** Only directories Kyro can describe truthfully in project.json. */ export declare function listRegistrableScopeDirectories(): string[]; /** Directories under scopes/ that are not Kyro's, surfaced by global Doctor as advisory only. */ export declare function listForeignScopeDirectories(): ScopeDirectory[]; /** Compatibility wrapper. Prefer listOwnedScopeDirectories() — the name says what it returns. */ export declare function listScopeFolders(): string[]; export declare function listScopeNames(): string[]; //# sourceMappingURL=scopes.d.ts.map