/** * Bounded validation for the open-ended `capabilities` record on a worker * manifest. * * `isJSONValue()` already rejects the values JSON cannot round-trip — cycles, * `-0`, exotic prototypes — but it is deliberately unbounded in depth, key * count, and string size. A manifest arrives from a worker we do not trust, so * the depth and size ceilings have to be imposed here rather than delegated. * * @module worker/manifest/capabilities */ import { type JSONValue } from '../../core/json.ts'; import type { ManifestValidationFailure } from './failure.ts'; /** * Validate the manifest `capabilities` record from untrusted input. * * Capabilities are descriptive only. Nothing here consults their meaning — * a capability never grants authorization or affects routing without an * explicit host policy — so this checks shape and size and nothing else. */ export declare function parseManifestCapabilities(value: unknown, path: string): { ok: true; capabilities: Readonly>; } | ManifestValidationFailure;