mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-30 07:37:38 +00:00
cli - CliJson replaces Output.mapper. `--json` output is built from the same maps, lists and scalars by a kotlinx encoder; an embedded parsed tree is a JsonElement. A type the encoder does not know now fails the command instead of being bean- serialized (or toString'd, which could print a data class's key). - ~/.amy files (identity.json, state, aliases, operator keys, Concord stores, cashu counters) are @Serializable and keep the exact format Jackson wrote, including IdentitySecret's "type" discriminator and IdentityFile/BunkerFile's NON_NULL omission; CliFileFormatTest pins the bytes Jackson produced. Unknown keys are now skipped instead of failing the read. - `--tags` keeps Jackson's coercion of numbers/booleans inside a tag to text. - zapstore.yaml is read with SnakeYAML directly (it was Jackson's YAML backend, Apache-2.0); date-like scalars stay text as before. - Tests read output through a small JsonNode wrapper over kotlinx. Before the switch, a temporary shadow encoded every emitted result with both Jackson and the new encoder: 85 results across the unit suite and the clink, pow, cache and notes harnesses were byte-identical, with no unknown types. The one known difference is that kotlinx writes a control char's \u escape in lowercase hex. relayBench - Frames, NIP-11 and checkpoints read as JsonElements with Jackson-like helpers (BenchJson); the array corpus is streamed object by object into OptimizedJsonMapper; results.json is built with kotlinx (pretty-printed with kotlinx's layout). Neither module declares Jackson any more. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HisVbewiVYcAvnCCkBXCZK