/** * Cedar Policy Compilation * * Pure-string composition of Cedar policy fragments. We compile the granted * `Capability[]` into one Cedar policy (a) attached as `cedarPolicy` claim on * the delegation VC, (b) shown in the success-screen "View policy" disclosure. * * No `@cedar-policy/cedar-wasm` dependency — this module only emits Cedar * source text. Runtime evaluation, if ever added, lives elsewhere. * * @module @kya-os/consent/cedar/compile */ import type { Capability, CedarTemplateContext } from "../types/capabilities.types.js"; /** * Compile a single capability's Cedar fragment by binding placeholders to the * given template context. Used by the per-row "View policy" disclosure so the * end user sees the same exact Cedar source that lands on the VC. * * Throws when the fragment references an unknown placeholder or when the * compiled output is empty. */ export declare function compileSingleCapability(capability: Capability, context: CedarTemplateContext): string; /** * Compile the granted capability set into one Cedar policy ready to attach to * a delegation VC. Each capability's fragment is bound and concatenated with * a comment header that records the capability id and label, so reviewers can * map a `permit (...)` block back to the row the user clicked. */ export declare function compileCapabilitiesToCedar(grants: Capability[], context: CedarTemplateContext): string; //# sourceMappingURL=compile.d.ts.map