/** * Shared bounds and scalar rules for runtime and static extension metadata * validation. Keep this module dependency-free so repository tooling can use * the exact production policy without executing extension code. * * @internal */ export declare const MAX_EXTENSION_CAPABILITIES = 256; export declare const MAX_EXTENSION_NAME_CHARACTERS = 256; export declare const MAX_EXTENSION_VERSION_CHARACTERS = 128; export declare const MAX_CAPABILITY_TYPE_CHARACTERS = 128; export declare const MAX_CAPABILITY_NESTING_DEPTH = 32; export declare const MAX_CAPABILITY_VALUE_NODES = 8192; export declare const MAX_CAPABILITY_CONTAINER_ENTRIES = 4096; export declare const MAX_CAPABILITY_KEY_CHARACTERS = 256; export declare const MAX_CAPABILITY_STRING_CHARACTERS = 8192; export declare const MAX_CAPABILITY_METADATA_UTF8_BYTES = 32768; export declare const MAX_CAPABILITY_METADATA_UTF16_CODE_UNITS = 32768; export declare const MAX_CAPABILITY_AUDIT_UTF8_BYTES = 49152; export declare const MAX_CAPABILITY_AUDIT_UTF16_CODE_UNITS = 49152; export declare const MAX_EXTENSION_CONTRACTS_PER_LIST = 256; export declare const MAX_EXTENSION_CONTRACT_NAME_CHARACTERS = 256; export declare const MAX_EXTENSION_PRESET_CHILDREN = 256; export declare const MAX_EXTENSION_PRESET_DEPTH = 32; export declare const MAX_EXTENSION_PRESET_NODES = 4096; /** * Conservative aggregate budget for every Deno permission flag produced for * one extension invocation. The paired limits leave headroom for the * executable, unrelated arguments, environment, and Windows argument quoting. */ export declare const MAX_DENO_PERMISSION_FLAGS_UTF8_BYTES = 8192; export declare const MAX_DENO_PERMISSION_FLAGS_UTF16_CODE_UNITS = 8192; /** Return the UTF-8 byte length used by metadata and command-line budgets. */ export declare function utf8ByteLength(value: string): number; /** Return whether a string contains no unpaired UTF-16 surrogate code units. */ export declare function isWellFormedUnicode(value: string): boolean; /** * Reject characters that can split or visually forge line-oriented audit and * command output. Commas are handled separately as Deno flag separators. */ export declare function containsUnicodeControlOrLineSeparator(value: string): boolean; /** * Snapshot a bounded dense array through own data descriptors only. This * avoids executing iterator, length, index, or accessor hooks in metadata. */ export declare function snapshotDenseMetadataArray(value: unknown, label: string, minimumLength: number, maximumLength: number): readonly unknown[]; //# sourceMappingURL=metadata-policy.d.ts.map