//! Schema helpers for config validation.
//!
//! Uses JsonSchema to derive valid top-level keys, feeding
//! `WorktrunkConfig::is_valid_key` so unknown-key classification can tell
//! "belongs in the other config" from "truly unknown."
use SchemaGenerator;
use UserConfig;
/// Returns all valid top-level keys in user config, derived from the JsonSchema.
///
/// This includes keys from UserConfig and HooksConfig (flattened).
/// Public for use by the `WorktrunkConfig` trait implementation.
///
/// `pre-create`/`post-create` are appended as silent serde aliases for the
/// canonical `pre-start`/`post-start` hook keys (see `HooksConfig` in
/// `src/config/hooks.rs`). The schema only knows canonical names from
/// `#[serde(rename = ...)]`; adding the aliases here keeps the unknown-key
/// round-trip from flagging an accepted name as unknown.