Expand description
Tiny shared helpers used across multiple modules.
Kept deliberately small — when in doubt, inline instead of growing
this module. The helpers live here because they’d otherwise duplicate
across meta_model.rs and feedback.rs (both need timestamps on
persisted records, both default their storage to ~/.sphereql/, and
both migrate legacy JSON-array stores to JSONL on first append).
Functions§
- default_
timestamp - Default persisted-record timestamp: seconds since Unix epoch, as a
string. Sortable, unambiguous, and dependency-free. Callers that
want a human-readable format should overwrite the timestamp field
themselves (e.g. via
with_timestamp). - migrate_
legacy_ array_ to_ jsonl - One-time migration of a legacy JSON-array store to JSONL, shared by
the append paths in
meta_model.rsandfeedback.rs. - sphereql_
home_ dir - Resolve
~/.sphereql/— the on-disk convention for SphereQL’s persistent training stores (meta_records.json, feedback_events.json).