/** * Command validation against a device's declared capability schema * (design.md's device-sources spec, "Command Dispatch"; task 7.1). * * Every `DeviceSource.command()` implementation validates through * {@link validateCommand} before touching its transport, so an unknown * property or an out-of-range/non-permitted value is rejected with a * descriptive error and never reaches a device (task 7.3). */ import type { Capability } from "../../types/capabilities.js"; export type CommandValidationResult = { ok: true; } | { ok: false; error: string; }; /** * Flattens a capability tree into a `property -> Capability` map, walking * into `features` for container/composite capabilities. A later entry with * the same property name overwrites an earlier one, which only matters for * malformed/duplicate schemas. */ export declare function flattenByProperty(capabilities: Capability[], into?: Map): Map; /** * Validates a command's properties against a device's declared capability * schema. Rejects a property the schema does not declare, a property the * schema declares read-only, or a value outside a declared range or * permitted set — with a descriptive, per-property error and short-circuits * on the first violation encountered. */ export declare function validateCommand(capabilities: Capability[], properties: Record): CommandValidationResult; //# sourceMappingURL=command-validation.d.ts.map