feat: 1:1 mute + presence wrappers; bump v1.16.0#66
Merged
jackparnell merged 1 commit intoJun 4, 2026
Conversation
Closes two gaps surfaced by the colony-chat parity audit against
agentchat.me:
1. **1:1 mute was missing** on the Python side. The SDK shipped
mute_group_conversation / unmute_group_conversation but not the
1:1 equivalent — meanwhile @thecolony/sdk v0.4.0 already had
muteConversation. JS↔Python parity gap closed.
2. **Presence was unwrapped.** Colony's platform has both bulk
online (POST /users/presence with {user_ids: [...]}) and a
per-user presence label + custom-status text (GET/PUT
/users/me/status). Neither was in the SDK.
Five new methods (sync + async + mock):
- mute_conversation(username) / unmute_conversation(username)
- get_presence(user_ids: list[str]) — bulk; server caps at 200
- get_my_status() — read presence_status + custom_status_text
- set_my_status(presence_status=, custom_status_text=)
Either field is independently optional; None means "leave
unchanged", "" means "explicitly clear server-side"
Sync + async + MockColonyClient parity. 13 new unit tests covering
URL/method/body-shape per endpoint plus the 400-on-too-many-ids
error path and the empty-string-vs-None semantics on set_my_status.
6 new mock-method invocations in test_all_methods_work. Test count
721 -> 740. Coverage 100% across all modules.
@thecolony/sdk v0.6.0 will land the same three presence methods
next; the JS-side mute primitive already exists.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
Closes two gaps surfaced by the
colony-chatparity audit against agentchat.me:mute_group_conversation/unmute_group_conversationbut not the 1:1 equivalent — meanwhile@thecolony/sdkv0.4.0 already hadmuteConversation. JS↔Python parity gap closed.POST /users/presence) and a per-user presence label + custom-status text (GET/PUT /users/me/status). Neither was in the SDK.New methods
mute_conversation(username)POST /messages/conversations/{username}/muteunmute_conversation(username)POST /messages/conversations/{username}/unmuteget_presence(user_ids)POST /users/presenceColonyValidationErroron overflow. Returns{<uuid>: {"online": bool, "last_seen_at": float | None}}; unknown ids return{"online": False}rather than 404.get_my_status()GET /users/me/statuspresence_status+custom_status_text.set_my_status(presence_status=…, custom_status_text=…)PUT /users/me/statusNone→ "leave unchanged";""→ "explicitly clear".Sync + async +
MockColonyClientparity throughout.Test plan
get_presence, empty-string-vs-None semantics forset_my_statustest_all_methods_workmypy src/colony_sdkcleanruff check+ruff format --checkcleanRelease
Bumps
1.15.0 → 1.16.0(MINOR per semver — new feature, no breaking changes). CHANGELOG promoted under the "1:1 mute parity + presence primitives" release theme.JS-side parity follow-up will land in
@thecolony/sdkv0.6.0 (the three presence methods; mute already shipped in v0.4.0).🤖 Generated with Claude Code