std: add caos-conversation-list tool - #309
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
std/caos-conversation-list, a tool that lists the conversations recorded on the server, newest first.std/caos-conversationcan read one conversation but needs its tip hash; nothing could produce that hash before.Each line has the UTC time of the last message, the conversation id, the tip commit hash, the title, and
user:active/user:archivedmembership when there is any:Parameters:
filter(substring of id or title),limit(default 50, 0 for all),titles(set 0 to skip title reads). Because the list is newest first,limit=Nis the N most recent.How
refs/caos/v3/conversations/<hex id>/head, plus per-userrefs/caos/v3/users/<hex user>/conversations/{active,archived}/<hex id>(seeconversation-protocol/src/v3/refs.rs). The worker lists them withgit ls-remoteagainst$CAOS_SERVER_URL;std/goalready ships git for refs work.caos get-hasheach) before applyinglimit. Titles are read only for the conversations printed, unlessfilteris set.std/caos-conversation:.caos-exprwith the help as a here-string,DEPSonstd/go, andworker.goon thewprelude. Every outcome, including an unreachable server, is returned as text rather than a job error. A conversation whose tip cannot be read is still listed, last, with the reason.std/README.mdhas a row for the tool.Testing
caos-teston this branch's tree: SUITE OK, 49/49 passed (293s), includinglint,unit-fmt,unit-clippy,caos-tools,deep-depsandeval-path. The run used the cache, so tests whose inputs did not change replayed earlier results; I did not salt it to force every test to re-run.tests/entry is added here.run_toolagainst a live server with 59 conversations: ordering,limit, titles and timestamps check out.memberstags were not exercised: none of the conversations printed in my runs had a membership ref.Related
std/caos-conversation/recording-gaps.md(item 5) says every commit has the same timestamp. That does not hold on the server I tested: tips have distinct committer times, and this tool depends on that. I left the note unchanged here; it may be worth correcting separately.🤖 Generated with Claude Code
https://claude.ai/code/session_01Qmq9SYrkF8KYc2iZYjtgoh