/** * Capability declaration (ADR-010). * * A client learns what a deployment supports by reading a declaration, never by * probing endpoints and interpreting 404/405/501. Status-code sniffing conflates * "this build does not have that feature" with "that request was wrong" and * with "a proxy ate it", and every consumer ends up with its own guess. * * The schema is intentionally the minimum that supports that rule: an opaque * string set plus a monotonic declaration version. Capability names are host and * deployment vocabulary — core validates their shape, never their meaning, so a * new capability never requires a core release. */ import { z } from 'zod'; export declare const CAPABILITY_DECLARATION_SCHEMA_ID = "byok-capabilities-v1"; /** Capability names: lowercase dotted segments, e.g. `board.sse`, `storage.reservations`. */ export declare const CAPABILITY_NAME_PATTERN: RegExp; export declare const CapabilityDeclarationSchema: z.ZodObject<{ schema: z.ZodLiteral<"byok-capabilities-v1">; version: z.ZodNumber; capabilities: z.ZodArray; }, z.core.$strip>; export type CapabilityDeclaration = z.infer; /** * Parses a declaration fail-closed. * * @throws {ByokCoreError} code `capability_declaration_invalid`. */ export declare function parseCapabilityDeclaration(input: unknown): CapabilityDeclaration; export declare function hasCapability(declaration: CapabilityDeclaration, capability: string): boolean; /** * The enforcement point ADR-010 exists for: a caller asserts the capability up * front and gets a named failure, instead of issuing the request and guessing * what the status code meant. * * @throws {ByokCoreError} code `capability_unavailable`. */ export declare function assertCapability(declaration: CapabilityDeclaration, capability: string): void;