import type { JsonObject, JsonValue, PathSegment } from './types.js'; export type FrontierRegistryEntryKind = 'feature' | 'method' | 'action' | 'query' | 'state' | 'subscription' | 'component' | 'effect' | 'route' | 'schema' | 'cache' | 'event' | 'job' | 'service' | 'module' | 'asset' | 'test' | 'fixture' | 'probe' | 'telemetry' | string; export type FrontierRegistryPath = string | readonly PathSegment[]; export type FrontierRegistryEdgeKind = 'belongs-to' | 'owns' | 'declares-read' | 'declares-write' | 'runtime-read' | 'runtime-write' | 'calls' | 'runtime-call' | 'depends-on' | 'invalidates' | 'affects' | 'touches' | 'handles' | 'observes' | 'produces' | 'consumes' | 'subscribes' | 'persists' | 'schedules' | 'emits' | 'covers' | 'declared-in' | 'documented-by' | 'tagged-as' | string; export type FrontierRegistryRecordStatus = 'ok' | 'error' | 'pending' | string; export interface FrontierRegistrySourceLocation { file: string; line?: number; column?: number; symbol?: string; exportName?: string; package?: string; } export type FrontierRegistrySource = FrontierRegistrySourceLocation | readonly FrontierRegistrySourceLocation[]; export interface FrontierRegistryEntry { id: string; kind: FrontierRegistryEntryKind; description?: string; package?: string; feature?: string; owner?: string; version?: string; contentHash?: string; source?: FrontierRegistrySource; reads?: readonly FrontierRegistryPath[]; writes?: readonly FrontierRegistryPath[]; calls?: readonly string[]; dependsOn?: readonly string[]; invalidates?: readonly string[]; affects?: readonly string[]; touches?: readonly string[]; handles?: readonly string[]; observes?: readonly string[]; produces?: readonly string[]; consumes?: readonly string[]; emits?: readonly string[]; covers?: readonly string[]; docs?: readonly string[]; tags?: readonly string[]; metadata?: JsonObject; } export interface FrontierRegistryRecord { id: string; entryId: string; kind?: FrontierRegistryEntryKind; causeId?: string; parentId?: string; status?: FrontierRegistryRecordStatus; startedAt?: number; endedAt?: number; durationMs?: number; input?: JsonValue; output?: JsonValue; reads?: readonly FrontierRegistryPath[]; writes?: readonly FrontierRegistryPath[]; calls?: readonly string[]; affected?: readonly string[]; metadata?: JsonObject; error?: string; } export interface FrontierRegistryEdge { from: string; to: string; kind: FrontierRegistryEdgeKind; metadata?: JsonObject; } export interface FrontierRegistryGraph { kind: 'frontier.registry.graph'; version: 1; generatedAt?: number; entries: FrontierRegistryEntry[]; records: FrontierRegistryRecord[]; edges: FrontierRegistryEdge[]; metadata?: JsonObject; } export interface FrontierRegistryGraphInput { entries?: readonly FrontierRegistryEntry[]; records?: readonly FrontierRegistryRecord[]; edges?: readonly FrontierRegistryEdge[]; generatedAt?: number; metadata?: JsonObject; } export interface FrontierRegistryImpactInput { ids?: readonly string[]; paths?: readonly FrontierRegistryPath[]; features?: readonly string[]; packages?: readonly string[]; tags?: readonly string[]; files?: readonly string[]; nodes?: readonly string[]; direction?: 'forward' | 'reverse' | 'both'; } export interface FrontierRegistryImpact { kind: 'frontier.registry.impact'; version: 1; seeds: string[]; nodes: string[]; entries: FrontierRegistryEntry[]; records: FrontierRegistryRecord[]; edges: FrontierRegistryEdge[]; } export interface FrontierRegistryOptions { generatedAt?: () => number; metadata?: JsonObject; } export interface FrontierRegistryRecordOptions { edges?: readonly FrontierRegistryEdge[]; } export declare class FrontierRegistry { private readonly options; private readonly entries; private readonly records; private readonly extraEdges; constructor(options?: FrontierRegistryOptions); register(entry: FrontierRegistryEntry): this; unregister(id: string): boolean; has(id: string): boolean; get(id: string): FrontierRegistryEntry; list(): FrontierRegistryEntry[]; record(record: FrontierRegistryRecord, options?: FrontierRegistryRecordOptions): this; history(): FrontierRegistryRecord[]; edge(edge: FrontierRegistryEdge): this; inspect(): FrontierRegistryGraph; impact(input: FrontierRegistryImpactInput): FrontierRegistryImpact; clearRecords(): void; } export interface FrontierRegistryValidationOptions { requireFeature?: boolean; requireSource?: boolean; } export type FrontierRegistryValidationSeverity = 'error' | 'warning'; export interface FrontierRegistryValidationIssue { severity: FrontierRegistryValidationSeverity; code: string; message: string; node?: string; entryId?: string; recordId?: string; edge?: FrontierRegistryEdge; } export interface FrontierRegistryValidation { kind: 'frontier.registry.validation'; version: 1; valid: boolean; issues: FrontierRegistryValidationIssue[]; } export interface FrontierRegistryFeatureSummary { id: string; entryCount: number; recordCount: number; entries: string[]; packages: string[]; owners: string[]; kinds: string[]; tags: string[]; reads: string[]; writes: string[]; calls: string[]; invalidates: string[]; touches: string[]; tests: string[]; telemetry: string[]; } export interface FrontierRegistryIndex { kind: 'frontier.registry.index'; version: 1; generatedAt?: number; entriesById: Record; recordsById: Record; features: FrontierRegistryFeatureSummary[]; packages: Record; tags: Record; files: Record; } export interface FrontierRegistryQueryInput { ids?: readonly string[]; kinds?: readonly string[]; features?: readonly string[]; packages?: readonly string[]; tags?: readonly string[]; files?: readonly string[]; paths?: readonly FrontierRegistryPath[]; } export interface FrontierRegistryQueryResult { kind: 'frontier.registry.query'; version: 1; entries: FrontierRegistryEntry[]; records: FrontierRegistryRecord[]; edges: FrontierRegistryEdge[]; } export interface FrontierRegistryTraceInput extends FrontierRegistryImpactInput { targets?: FrontierRegistryImpactInput; maxDepth?: number; maxPaths?: number; } export interface FrontierRegistryTracePath { nodes: string[]; edges: FrontierRegistryEdge[]; } export interface FrontierRegistryTrace { kind: 'frontier.registry.trace'; version: 1; seeds: string[]; targets: string[]; paths: FrontierRegistryTracePath[]; } export interface FrontierRegistryExplainInput extends FrontierRegistryImpactInput { targets?: FrontierRegistryImpactInput; maxTraceDepth?: number; maxTracePaths?: number; validation?: FrontierRegistryValidationOptions; } export interface FrontierRegistryExplainSummary { entryCount: number; recordCount: number; edgeCount: number; featureCount: number; packageCount: number; tagCount: number; fileCount: number; issueCount: number; } export interface FrontierRegistryExplain { kind: 'frontier.registry.explain'; version: 1; summary: FrontierRegistryExplainSummary; features: FrontierRegistryFeatureSummary[]; packages: Record; tags: Record; files: Record; impact: FrontierRegistryImpact; traces?: FrontierRegistryTrace; validation: FrontierRegistryValidation; } export declare function createFrontierRegistry(options?: FrontierRegistryOptions): FrontierRegistry; export declare function createFrontierRegistryGraph(input?: FrontierRegistryGraphInput): FrontierRegistryGraph; export declare function frontierRegistryMergeGraphs(graphs: readonly FrontierRegistryGraph[], input?: Omit): FrontierRegistryGraph; export declare function frontierRegistryImpact(graph: FrontierRegistryGraph, input: FrontierRegistryImpactInput): FrontierRegistryImpact; export declare function frontierRegistryIndex(graph: FrontierRegistryGraph): FrontierRegistryIndex; export declare function frontierRegistryQuery(graph: FrontierRegistryGraph, input: FrontierRegistryQueryInput): FrontierRegistryQueryResult; export declare function frontierRegistryValidateGraph(graph: FrontierRegistryGraph, options?: FrontierRegistryValidationOptions): FrontierRegistryValidation; export declare function frontierRegistryTrace(graph: FrontierRegistryGraph, input: FrontierRegistryTraceInput): FrontierRegistryTrace; export declare function frontierRegistryExplain(graph: FrontierRegistryGraph, input?: FrontierRegistryExplainInput): FrontierRegistryExplain; export declare function frontierRegistryEntryNode(id: string): string; export declare function frontierRegistryRecordNode(id: string): string; export declare function frontierRegistryPathNode(path: FrontierRegistryPath): string; export declare function frontierRegistryFeatureNode(feature: string): string; export declare function frontierRegistryPackageNode(packageName: string): string; export declare function frontierRegistryTagNode(tag: string): string; export declare function frontierRegistryFileNode(file: string): string; export declare function frontierRegistryNode(kind: string, id: string): string; export declare function normalizeFrontierRegistryPath(path: FrontierRegistryPath): string; //# sourceMappingURL=registry.d.ts.map