/** * Fail-closed, deterministic discovery of `.human` inputs. * * The scanner never imports project code, follows symlinks, or silently turns * an unreadable/partial scan into an empty successful result. Security files * are enumerated even below configured or git ignore boundaries. */ import type { DiscoveryResult, SourceFile } from "../core/types.ts"; export type DiscoveryErrorCode = "ROOT_NOT_FOUND" | "ROOT_NOT_DIRECTORY" | "ROOT_SYMLINK" | "ROOT_UNREADABLE" | "PARTIAL_SCAN" | "GIT_UNAVAILABLE" | "GIT_ERROR" | "SOURCE_UNREADABLE"; /** A non-success result for any scan whose completeness cannot be guaranteed. */ export declare class DiscoveryError extends Error { readonly name = "DiscoveryError"; readonly code: DiscoveryErrorCode; constructor(message: string, code: DiscoveryErrorCode, options?: ErrorOptions); } /** Backwards-compatible result plus the complete security-file enumeration. */ export interface SecureDiscoveryResult extends DiscoveryResult { /** Every `secrets.human` below the root, including ignored locations. */ secretsFiles: SourceFile[]; } /** * Finds and classifies natural-language instruction sources without executing * project code. Missing or unreadable roots, unreadable descendants, and Git * failures all reject rather than returning partial output. */ export declare function discoverHumanInstructionSources(rootInput: string, extraIgnore?: string[]): Promise; /** * @deprecated Use `discoverHumanInstructionSources`; retained for embedding * API compatibility with pre-clarity releases. */ export declare const discover: typeof discoverHumanInstructionSources; /** * Refuse when any nested `secrets.human` under the same discovery root is Git * tracked. This intentionally checks Git's index rather than only the supplied * file, preserving safety for legacy callers that pass `result.secrets`. */ export declare function secretsTrackedError(secretOrSecrets: SourceFile | readonly SourceFile[]): string | null; /** SHA-256 content hash used to bind contracts to exact source bytes. */ export declare function sourceContentHash(source: SourceFile | string): Promise; //# sourceMappingURL=discovery.d.ts.map