export declare const LEGACY_GENERATION_POLICY_VERSION: 1; export declare const GENERATION_POLICY_VERSION: 2; /** * The extraction strategy recorded with a graph. `auto` is capability-aware: * SPI owns its supported JS/TS corpus and the legacy pipeline owns every * other supported language. The explicit modes deliberately do not fall back. */ export declare const EXTRACTION_MODES: readonly ["auto", "legacy", "spi"]; export type ExtractionMode = (typeof EXTRACTION_MODES)[number]; export interface GenerationPolicyStrictThresholdsV1 { max_failed: number; max_unsupported: number; } /** * Every setting here can change the graph corpus, extraction semantics, or * whether a graph is publishable. Output-only choices such as HTML rendering * deliberately do not belong in this contract. */ export interface GenerationPolicySettingsV1 { directed: boolean; use_spi: boolean; respect_gitignore: boolean; follow_symlinks: boolean; include_documents: boolean; include_non_code: true; extractor_cache_version: number; exclusion_rules_fingerprint: string; indexing_strict: GenerationPolicyStrictThresholdsV1 | null; } export interface GenerationPolicyV1 { version: typeof LEGACY_GENERATION_POLICY_VERSION; fingerprint: string; settings: GenerationPolicySettingsV1; } /** * V2 makes the extraction strategy explicit. `use_spi` remains a derived * compatibility signal for consumers that only need to know whether the * policy enables SPI; `extraction_mode` is the authoritative setting. */ export interface GenerationPolicySettingsV2 { directed: boolean; use_spi: boolean; extraction_mode: ExtractionMode; respect_gitignore: boolean; follow_symlinks: boolean; include_documents: boolean; include_non_code: true; extractor_cache_version: number; exclusion_rules_fingerprint: string; indexing_strict: GenerationPolicyStrictThresholdsV1 | null; } export interface GenerationPolicyV2 { version: typeof GENERATION_POLICY_VERSION; fingerprint: string; settings: GenerationPolicySettingsV2; } export type GenerationPolicy = GenerationPolicyV1 | GenerationPolicyV2; export declare function generationPolicyFingerprint(settings: GenerationPolicySettingsV1 | GenerationPolicySettingsV2): string; export declare function createGenerationPolicy(settings: GenerationPolicySettingsV2): GenerationPolicyV2; export declare function createGenerationPolicy(settings: GenerationPolicySettingsV1): GenerationPolicyV1; /** Parse and authenticate a stored policy. Tampered or partial policies fail closed. */ export declare function parseGenerationPolicy(value: unknown): GenerationPolicy | null;