/** * EVO-7 slice 2 — pure, zero-dependency reader for the committed org manifest * (`org.h2a.yaml`). h2a carries no runtime dependencies, so rather than pull in * a YAML library we parse the small block-YAML subset the manifest needs: * block mappings, block sequences (`- `), flow sequences (`[a, b]`), scalars * (optionally single/double quoted), `#` comments and blank lines. A document * that begins with `{` or `[` is parsed as JSON instead (a manifest may be * committed as `org.h2a.json`). Anything outside the subset is rejected with a * line-anchored error rather than silently mis-parsed. * * Parsing is pure (no filesystem): the CLI reads the file and hands the text * in. Shape-coercion here only checks the manifest *types*; the h2a invariants * (a PRINCIPAL exists, unique instances, canonical roles, …) stay in * {@link validateOrgManifest}. Live provisioning is a later CLI slice. */ import type { H2AOrgManifest } from "./org.js"; /** Canonical filename of the committed org manifest. */ export declare const H2A_ORG_MANIFEST_FILENAME = "org.h2a.yaml"; /** A value produced by the block-YAML subset reader. */ export type YamlValue = string | YamlValue[] | { [key: string]: YamlValue; }; /** Outcome of {@link parseOrgManifest}: a typed manifest, or shape errors. */ export interface H2AOrgParseResult { /** Present only when the document parsed AND matched the manifest shape. */ readonly manifest?: H2AOrgManifest; /** Human-readable parse / shape errors (line- or path-anchored). Empty on success. */ readonly errors: string[]; } /** * Parse a committed org manifest (`org.h2a.yaml` block-YAML subset, or JSON) * into a typed {@link H2AOrgManifest}. Total — never throws: a malformed * document or a shape mismatch yields `{ errors }` with no `manifest`. Run the * returned manifest through {@link validateOrgManifest} for the h2a invariants. */ export declare function parseOrgManifest(source: string): H2AOrgParseResult; //# sourceMappingURL=org-parse.d.ts.map