import type { Declarable } from "./declarable.js"; /** * OKF bundle emitter (#1058, epic #1057) — projects a discovered entity graph * into an Open Knowledge Format v0.2 bundle: a directory of markdown files * with YAML frontmatter, per the spec at * https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md * * One concept document per entity, `type` carrying the entity's resource type * string, dependency edges as bundle-relative markdown links (the form the * spec recommends for stability), and a root `index.md` grouping concepts into * per-lexicon sections. Emit-only: OKF as project *input* is #1059. */ export declare const OKF_VERSION = "0.2"; /** One file of an OKF bundle: a bundle-relative path and its full content. */ export interface OkfFile { /** Bundle-relative path, e.g. "aws/myBucket.md" or "index.md". */ path: string; content: string; } /** The subset of a discovery result the emitter reads. */ export interface OkfBundleInput { entities: Map; dependencies: Map>; } /** Make an entity or lexicon name safe as a single path segment. */ export declare function slug(name: string): string; /** * Render a flat frontmatter mapping as a YAML block. Keys with undefined * values are dropped; scalar quoting is `emitYAML`'s. */ export declare function frontmatter(fields: Record): string; /** * Split a concept document into its frontmatter block and body. Returns * undefined when the document does not start with a `---` delimited block. * Exported for the conformance tests (and any future OKF consumer, #1059). */ export declare function splitFrontmatter(content: string): { frontmatter: string; body: string; } | undefined; /** * Check a bundle against the OKF v0.2 conformance criteria (spec §11) and * return every violation found: parseable frontmatter on every non-reserved * `.md`, a non-empty `type` everywhere, a well-formed root `index.md`, and * generated cross-link entries that are bundle-absolute (or external URLs). * Empty result means conformant. Shared by the project-bundle tests (#1058) * and every lexicon's bundle tests (#1060). */ export declare function okfConformanceProblems(files: OkfFile[]): string[]; /** * Build the OKF bundle for a discovered graph. Pure and deterministic: the * same entities yield byte-identical files, so bundles are diffable and * snapshot-testable. `projectPath` relativizes source-file paths so the * bundle is portable. */ export declare function buildOkfBundle(input: OkfBundleInput, projectPath?: string): OkfFile[]; //# sourceMappingURL=okf.d.ts.map