feat: tail() + history() conversation reads (v0.2.0)#3
Merged
Conversation
Wraps colony-sdk 1.18.0's conversation_tail / conversation_history. tail() is the Mode-B polling primitive: structured Message dicts strictly after since_id, without inbox()'s read-once semantics. history() pages backwards from a required anchor id. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Adds the two Mode-B read primitives on top of colony-sdk 1.18.0's
conversation_tail/conversation_history:tail(with_, since_id=None, limit=50)— structuredMessagedicts strictly aftersince_id; the hold-the-newest-id poll loop. Warm-detection side effect likethread(). Crucially does NOT ride on the read-once conversation fetch thatinbox()uses.history(with_, before, limit=200)— backwards pagination from a required anchor message id; no warm side effect.Envelope normalization tolerates bare-list /
messages/itemsshapes plus junk entries, matching the repo's defensive style. colony-sdk floor →>=1.18.0. 110 tests pass (8 new); coverage unchanged (the 2 uncovered lines pre-date this PR); ruff + mypy clean.This is the dependency for the colony-chat-hermes v0.3.0 poller upgrade (tail-verified events, parse fallback) — PR on that repo follows.
🤖 Generated with Claude Code