/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { EastTypeValue } from '@elaraai/east'; import type { DecisionHandleRefValue } from './handle-runtime.js'; /** A solution's constraint contract, as East types. */ export interface ConstraintContract { /** The contract `C` itself — a by-name `VariantType`, perhaps recursive. */ readonly type: EastTypeValue; /** Each of `C`'s cases' payload types, by case name. */ readonly payloads: ReadonlyMap; } /** * The constraint contract a judgements dataset's type carries. * * @param judgementsType - The judgements binding's registered East type, a * `Dict>` * @returns The contract `C` and its cases' payload types; `undefined` when the * type is not a judgements record */ export declare function constraintContractOf(judgementsType: EastTypeValue): ConstraintContract | undefined; /** * The constraint contract of a decision handle's judgements binding — what the * lever editor and the constraint chips dispatch on. * * @param ref - The decision handle's binding descriptors * @returns The contract; `undefined` until the judgements binding's type is * registered */ export declare function useConstraintContract(ref: DecisionHandleRefValue | null): ConstraintContract | undefined; //# sourceMappingURL=contract.d.ts.map