import { type CapabilityId, type PluginId } from '@zhin.js/plugin-runtime'; import type { SourceOwnershipIndex } from './source-ownership.js'; export interface DependencyImpactPort { affectedSources(source: string): readonly string[]; } export interface NoInvalidationPlan { readonly kind: 'none'; readonly changed: readonly string[]; readonly reasons: readonly string[]; } export interface GenerationInvalidationPlan { readonly kind: 'generation'; readonly changed: readonly string[]; /** Manifest sources require a graph and process-boundary check before reload. */ readonly manifestSources: readonly string[]; readonly slots: readonly CapabilityId[]; readonly subtrees: readonly PluginId[]; /** Paths without ownership records; RootRuntime may claim them through a convention. */ readonly fallbacks: readonly FallbackInvalidation[]; readonly reasons: readonly string[]; } export interface FallbackInvalidation { readonly source: string; readonly owners: readonly PluginId[]; } export interface ProcessInvalidationPlan { readonly kind: 'process'; readonly changed: readonly string[]; readonly reasons: readonly string[]; } export type InvalidationPlan = NoInvalidationPlan | GenerationInvalidationPlan | ProcessInvalidationPlan; export declare class InvalidationPlanner { private readonly ownership; private readonly dependencies?; constructor(ownership: SourceOwnershipIndex, dependencies?: DependencyImpactPort | undefined); plan(sources: readonly string[]): InvalidationPlan; }