export declare const MAX_NESTING_DEPTH = 32; export declare const MAX_ARRAY_ITEMS = 10000; export declare const MAX_OBJECT_KEYS = 1000; export declare const MAX_STRING_LENGTH = 1000000; /** * Hard ceiling on reported issues. The decoder runs on the untrusted side of * the IPC boundary and its issue list is serialized straight into the error * response, so an input that is *wrong in many places at once* used to cost * far more memory than the input itself: one 8 MB frame carrying a two-million * entry `capabilities` array produced roughly four million issue objects (an * `invalid_value` and a duplicate report per entry), each holding its own path * and message string. * * A caller only ever acts on the first few issues, so the list is truncated * with an explicit marker instead of being allowed to outgrow its input. Every * issue is created through `issue()`, which makes this the single choke point. */ export declare const MAX_ISSUES = 100; export type GovernanceProtocolDecodeIssueCode = 'expected_object' | 'expected_array' | 'unknown_field' | 'invalid_value' | 'semantic_invalid' | 'resource_limit'; export interface GovernanceProtocolDecodeIssue { readonly code: GovernanceProtocolDecodeIssueCode; readonly path: string; readonly message: string; } export type MutableIssues = GovernanceProtocolDecodeIssue[]; export type JsonRecord = Record; export declare function issue(issues: MutableIssues, code: GovernanceProtocolDecodeIssueCode, path: string, message: string): void; export declare function plainRecord(value: unknown, path: string, issues: MutableIssues): JsonRecord | undefined; export declare function exactKeys(record: JsonRecord, allowed: readonly string[], path: string, issues: MutableIssues): void; export declare function stringValue(value: unknown, path: string, issues: MutableIssues, allowEmpty?: boolean): void; export declare function timestamp(value: unknown, path: string, issues: MutableIssues): void; export declare function booleanValue(value: unknown, path: string, issues: MutableIssues): void; export declare function integerValue(value: unknown, path: string, issues: MutableIssues, minimum?: number): void; export declare function enumValue(value: unknown, allowed: readonly string[], path: string, issues: MutableIssues): void; export declare function arrayValue(value: unknown, path: string, issues: MutableIssues, validate: (entry: unknown, entryPath: string, issues: MutableIssues) => void): void; export declare function stringArray(value: unknown, path: string, issues: MutableIssues): void; export declare function enumArray(value: unknown, allowed: readonly string[], path: string, issues: MutableIssues): void; export declare function jsonValue(value: unknown, path: string, issues: MutableIssues, depth?: number): void; export declare function objectArray(value: unknown, path: string, issues: MutableIssues, validate: (record: JsonRecord, entryPath: string, issues: MutableIssues) => void): void; export declare function validateAutonomy(value: unknown, path: string, issues: MutableIssues): void; export declare function validateTaskContract(value: unknown, path: string, issues: MutableIssues): void; export declare function validatePlan(value: unknown, path: string, issues: MutableIssues): void; export declare function validateCommand(value: unknown, path: string, issues: MutableIssues): void; export declare function validateObservation(value: unknown, path: string, issues: MutableIssues): void; /** * Shared cursor/page validation for the two observation reads. Same shape and * bounds as `read_evidence_candidates`, so every paginated read on this * protocol accepts the same window. */ export declare function observationPageWindow(record: JsonRecord, issues: MutableIssues): void; //# sourceMappingURL=protocol-decode-validation.d.ts.map