refactor: make policy a map in client schema for config ergonomics
Policy rules now support a name field for better config ergonomics,
especially in Nix where attrsets are easier to merge and override than
arrays. Config preprocessing converts map-format policy to array with
names injected, matching the existing subscription naming pattern.
Policy is now a map (keyed by rule name) in the client-side OpenAPI
schema, matching Nix attrset ergonomics. The server continues to store
policy as embeds_many (list) with list<->map conversion at the
registration boundary.
- Change Subscription.policy from array to object with additionalProperties
- Remove name from Policy schema (name is the map key)
- Add normalize_rules/1 to evaluator to handle both map and list formats
- from_legacy/1 now returns a map
- Remove preprocess_policy config preprocessor (schema handles it natively)
- Convert list->map when casting server subscription back to client struct
sow-166
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>