CLI: add a read command to inspect a single sentence by sentence-id (elephant show <id>) #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
There is no read command to inspect a single sentence by its sentence-id.
assert/definemint a sentence-id andretract/concede --reconsume one,but to actually look at that entry you must dump the whole journal
(
elephant -t <th> --json log) and filter client-side:For an epistemics workflow where you hand agents sentence-ids (concede-to,
retract, "explain why you asserted X"), being unable to say
elephant show <id>is a sharp edge.Note: the machinery already exists
An entry can already be located by id internally —
sentence_id_of(&entry)plusthe by-id find at src/cli.rs:575 (used to validate
retract/concede --re,which errors
no entry with sentence-id <id> in this theory). This is only aboutexposing that lookup as a read.
Proposal
Add a read command, e.g.
elephant -t <th> show <sentence-id>, that prints thesingle entry: speech act, literal / SPL form, signer DID, HLC timestamp,
in-reply-to (if any), quarantine status, and — with the global
--jsonflag —the raw entry object. Reuse the existing by-id lookup and the same
no entry with sentence-id <id>error for a miss.Related: anuna/elephant#8 (CLI discoverability — surfacing the active store).
Both are "make existing internal state observable from the CLI".