Based on my analysis of the codebase, here's the updated spec for adding .cat -T <topic> / .cat --topic <topic> functionality:
The .cat command flows through these layers:
- xs.nu wrapper → calls
xs catCLI with flags - src/main.rs CommandCat → parses CLI args, builds ReadOptions
- client/commands.rs cat() → makes HTTP GET to
/with query params - api.rs handle_stream_cat() → parses query into ReadOptions, calls Store::read
- store/mod.rs Store::read() → performs backlog scan + live subscription