/** * INPUT_CONTRACTS — SSoT registry of per-operation input contracts. * * Keyed by the canonical `.` operation identifier (e.g. * `'tasks.add'`, `'tasks.add-batch'`, `'tasks.update'`). The value type uses * `OperationInputContract` so the map is assignable across * operations with different input shapes — callers that need the concrete * `T` must narrow via an operation-specific accessor. * * Originally seeded by T9918 (PR #663) with a single `tasks.add-batch` * entry to back the `cleo schema --input/--examples` introspection * surface. T9917 extends the registry to cover the full tasks.* mutate * surface (add + add-batch + update) and rewires the schemas to live in * `packages/contracts/src/operations/tasks.ts` so the CLI commands * import them via the contracts leaf package (no Core dependency hop). * * CLI commands look up their contract by operation name, hand the raw * payload to `validateOperationInput()` (T9915), then forward the * narrowed value through `dispatchRaw`. Every retrofit (T9917+) extends * this map. * * @packageDocumentation * @module @cleocode/core/dispatch/contracts/input-contracts * * @epic T9855 * @task T9918 — original seed entry + getInputContract accessor * @task T9917 — tasks.add + tasks.update extension; schemas moved to contracts */ import { type OperationInputContract, type OperationInputContractRegistry } from '@cleocode/contracts'; /** * Registry of every {@link OperationInputContract} known to the CLEO * runtime, keyed by the contract's `operation` identifier. * * Extend this map every time a new operation is migrated to the * schema-first input contract surface. * * @example * ```ts * import { INPUT_CONTRACTS } from '@cleocode/core/dispatch/contracts/input-contracts'; * * const contract = INPUT_CONTRACTS['tasks.add']; * if (!contract) throw new Error('unknown op'); * const result = validateOperationInput(contract, payload); * ``` * * @task T9917 — extended with tasks.add + tasks.update * @task T9918 — original tasks.add-batch seed */ export declare const INPUT_CONTRACTS: OperationInputContractRegistry; /** * Resolve the {@link OperationInputContract} for an operation id, or * return `null` when no contract is registered. * * Used by the `cleo schema --input` / `--examples` introspection * surface (T9918) and by any caller that needs to render a null-safe * envelope when an operation has no schema-first contract yet. * * @param operation - Canonical `.` operation identifier. * @returns The matching contract, or `null` when no contract is registered. * * @task T9918 */ export declare function getInputContract(operation: string): OperationInputContract | null; //# sourceMappingURL=input-contracts.d.ts.map