/** * Versioned ownership-marker grammar shared by every comment-bearing AXM * projection. The normative contract lives in * `docs/architecture/workspace/managed-file-ownership.md`. * * @experimental This API is unstable and may change without notice. */ import * as Option from "effect/Option"; export declare const MARKER_VERSION: 1; export declare const MARKER_KIND_START: "axm:start"; export declare const MARKER_KIND_END: "axm:end"; export declare const MARKER_KIND_FILE: "axm:file"; export declare const MARKER_KIND_POINT: "axm:point"; export type RegionName = "rules" | "knowledge" | "hook-fallbacks" | "instruction-aliases" | `mcp-server:${string}`; export type FileCommentStyle = { readonly kind: "line"; readonly prefix: "#" | "//"; } | { readonly kind: "block"; readonly open: "" | "*/"; }; export interface RegionMarker { readonly kind: typeof MARKER_KIND_START | typeof MARKER_KIND_END; readonly v: typeof MARKER_VERSION; readonly region: RegionName; readonly ext?: string | undefined; readonly src?: string | undefined; } export type ManagedMarker = RegionMarker | { readonly kind: typeof MARKER_KIND_FILE; readonly v: typeof MARKER_VERSION; readonly ext: string; readonly src: string; } | { readonly kind: typeof MARKER_KIND_POINT; readonly v: typeof MARKER_VERSION; readonly pointKind: string; readonly ext: string; }; export type MarkerParseResult = { readonly state: "absent"; readonly reasonCode: "marker-absent"; } | { readonly state: "complete"; readonly reasonCode: "marker-complete"; readonly marker: ManagedMarker; } | { readonly state: "malformed"; readonly reasonCode: "marker-malformed"; readonly message: string; } | { readonly state: "unsupported-version"; readonly reasonCode: "marker-unsupported-version"; readonly message: string; readonly version: string; }; /** Resolve a target's native comment grammar, failing closed for unknown files. */ export declare const commentStyleForTarget: (target: string) => Option.Option; /** Serialize one marker with canonical attribute ordering. */ export declare const serializeMarker: (marker: ManagedMarker, style: FileCommentStyle) => string; /** Parse one native-comment marker line without assigning meaning to unknown attributes. */ export declare const parseMarker: (line: string, style: FileCommentStyle) => MarkerParseResult; export declare const sameRegionIdentity: (marker: ManagedMarker, region: RegionName) => marker is RegionMarker; export declare const markerForFile: (content: string, style: FileCommentStyle) => Option.Option>; //# sourceMappingURL=marker-grammar.d.ts.map