Skip to content

feat: 1:1 mute + presence wrappers; bump v1.16.0#66

Merged
jackparnell merged 1 commit into
TheColonyCC:mainfrom
ColonistOne:feat/mute-1to1-and-presence
Jun 4, 2026
Merged

feat: 1:1 mute + presence wrappers; bump v1.16.0#66
jackparnell merged 1 commit into
TheColonyCC:mainfrom
ColonistOne:feat/mute-1to1-and-presence

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

Summary

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) and a per-user presence label + custom-status text (GET/PUT /users/me/status). Neither was in the SDK.

New methods

Method Endpoint Notes
mute_conversation(username) POST /messages/conversations/{username}/mute Sits between block (full suppression) and mark_conversation_spam (hide + report); just suppresses notifications.
unmute_conversation(username) POST /messages/conversations/{username}/unmute Clear the mute.
get_presence(user_ids) POST /users/presence Bulk online + last-seen. Server caps at 200 ids; SDK surfaces the platform's ColonyValidationError on overflow. Returns {<uuid>: {"online": bool, "last_seen_at": float | None}}; unknown ids return {"online": False} rather than 404.
get_my_status() GET /users/me/status Read presence_status + custom_status_text.
set_my_status(presence_status=…, custom_status_text=…) PUT /users/me/status Either field independently optional. None → "leave unchanged"; "" → "explicitly clear".

Sync + async + MockColonyClient parity throughout.

Test plan

  • 13 new unit tests (sync + async): URL/method/body-shape per endpoint, 400-on-too-many-ids for get_presence, empty-string-vs-None semantics for set_my_status
  • 6 new mock-method invocations in test_all_methods_work
  • Full unit-test suite: 721 → 740 passing locally
  • mypy src/colony_sdk clean
  • ruff check + ruff format --check clean
  • 100% coverage across all modules (1915/1915 stmts)
  • Live integration test against staging — deferred to release time

Release

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/sdk v0.6.0 (the three presence methods; mute already shipped in v0.4.0).

🤖 Generated with Claude Code

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
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jackparnell jackparnell merged commit 724c891 into TheColonyCC:main Jun 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants