Package-level declarations
Functions
Convenience over awaitLog: wait for a record whose LogRecord.body contains substring. The common "did the device log this message?" assertion.
The NDJSON lines for records: each element is one LogRecord serialized to a single line of JSON, in the given order. No trailing newline is added — the sink-writing writeLogArtifact wrapper appends the line separators.
Decode stamped NDJSON lines back into StampedLogRecords, the inverse of stampedLogArtifactLines (parseStampedLogArtifactLines(stampedLogArtifactLines(x)) == x). Blank lines are skipped, so the trailing newline writeStampedLogArtifact emits does not decode as a phantom record.
Read a stamped NDJSON artifact from source: the inverse of writeStampedLogArtifact, returning the StampedLogRecords in file order. Reads to end-of-source a line at a time, so a consumer merging across devices decodes each *.ndjson back without touching StampedLogRecord.serializer directly.
The stamped NDJSON lines for stamped: each element is one StampedLogRecord — the log record plus its ordering stamp (producer us.tractat.kuilt.crdt.ReplicaId and cross-device total-order key) — serialized to a single line of JSON, in order.
Write stamped to sink as a stamped NDJSON artifact: one JSON StampedLogRecord per line, newline-terminated, in order. The stamped counterpart of writeLogArtifact — use it when the artifact will be merged across devices (see stampedLogArtifactLines).