fetch_ml/cli/src/net
Jeremie Fraeys 1597c20b73
refactor(cli): consolidate shared utilities and remove code duplication
Extract common helper functions from multiple command files into shared
utility modules:

- Create cli/src/utils/json.zig with json.getString(), getInt(), getFloat(), getBool()
- Create cli/src/utils/manifest.zig with readFileAlloc(), resolvePathWithBase(),
  resolvePathById(), readJobNameFromManifest()
- Add ResponsePacket.deinit() method to net/protocol.zig for consistent cleanup
- Update info.zig, annotate.zig, narrative.zig, requeue.zig to use shared utilities
- Update utils.zig exports for new modules

Eliminates duplicate implementations of:
- jsonGetString() and jsonGetInt() in 4 files
- readFileAlloc() in 4 files
- resolveManifestPath*() functions in 4 files
- ResponsePacket cleanup defer blocks (replaced with .deinit())

Builds cleanly with zig build --release=fast
2026-02-18 13:19:40 -05:00
..
ws feat: enhance CLI with improved commands and WebSocket handling 2026-02-16 20:38:08 -05:00
protocol.zig refactor(cli): consolidate shared utilities and remove code duplication 2026-02-18 13:19:40 -05:00
ws.zig feat(cli): enhance Zig CLI with new commands and improved networking 2026-02-12 12:05:10 -05:00