/** * Bump this when introducing a breaking change to the manifest schema. * Used by the schema's `literal()` check and exported for callers (tests, * scaffold templates) that need to emit a matching manifest. */ export declare const MANIFEST_VERSION = 1; /** * Single source of truth for the fetch directives the manifest is allowed * to extend. Imported by the CSP builder and the dev-server reporter so * they stay in lock-step with the schema's accept list. */ export declare const CSP_FETCH_DIRECTIVES: readonly ["connect-src", "img-src", "font-src", "frame-src", "media-src", "worker-src", "script-src", "style-src"]; export type CspFetchDirective = (typeof CSP_FETCH_DIRECTIVES)[number]; /** Type guard so callers can narrow a string to `CspFetchDirective` without an `as` cast. */ export declare function isCspFetchDirective(value: string): value is CspFetchDirective; export type NetworkAllowlistRule = { sources: string[]; directives?: CspFetchDirective[]; }; export interface ManifestConfig { manifestVersion: typeof MANIFEST_VERSION; permissions?: { network?: Array<{ sources: string[]; directives?: CspFetchDirective[]; }>; }; } export declare function validateManifestConfig(raw: unknown): ManifestConfig; /** * Parses raw `manifest.json` text and runs the schema validator. `source` * is included in JSON-parse error messages so callers can identify which * file failed (e.g. the absolute manifest path from `loadManifestConfig`). */ export declare function parseAndValidateManifestConfig(rawJson: string, source: string): ManifestConfig; export declare function getManifestNetworkRules(manifest: ManifestConfig): NetworkAllowlistRule[] | undefined;