/** * Hostile-input validation for the schema-fragment-shaped parts of an * untrusted {@link WorkflowRevisionManifest}: `inputSchema`/`outputSchema` * pairs, and the `signals`/`updates`/`queries`/`activities` records that * carry them. * * Split out of `manifest-parse.ts` to keep each file under the repository's * implementation-file-size ceiling and so the depth/JSON-safety walk that * every schema fragment goes through has one place to audit. * * @module core/contract/manifest-parse-schema */ import { type NameKind } from '../types/name-grammar.ts'; import { type WorkflowRevisionManifestValidationFailure } from './failure.ts'; import type { WorkflowActivityContract, WorkflowMessageContract } from './types.ts'; type ParseSuccess = { ok: true; value: T; }; type ParseOutcome = ParseSuccess | WorkflowRevisionManifestValidationFailure; /** Validate a `{ inputSchema?, outputSchema? }`-shaped entry from untrusted input. */ export declare function parseSchemaPair(value: unknown, path: string): ParseOutcome; /** * Validate one record key: present, non-empty, within the identifier byte * ceiling and, when `kind` is given, wire-safe per * `validateWorkflowOrActivityName`. Signal/update/query names pass `kind: * undefined` — those names are deliberately unconstrained, matching * `SignalDefinition`/`UpdateDefinition`/`QueryDefinition` at the type level. */ export declare function checkContractKey(key: string, kind: NameKind | undefined, path: string): WorkflowRevisionManifestValidationFailure | undefined; /** * Validate a `signals`/`updates`/`queries`/`activities` record from * untrusted input: bounded entry count, bounded/validated keys, and every * entry parsed as a schema pair. */ export declare function parseContractRecord(value: unknown, path: string, keyKind: NameKind | undefined): ParseOutcome>>; export {};