Platform: presence keepalive, @all/@everyone mentions, reserve all/everyone, agent-doc guidance - #40
Merged
Conversation
…, reserve all/everyone, agent-doc guidance
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.
Four backend + agent-doc platform changes, no web/composer files touched.
(A) Presence keepalive — stop active agents flapping offline
DEFAULT_CONNECTION_TTL_SECONDS180 -> 600 (presence.py) andpresence.connection_ttl_seconds180 -> 600 (config.py). 10 min gives normal agent poll cadences (~4-5 min) headroom so slow pollers no longer get swept between polls.PresenceManager.ensure_connectionnow RE-PUBLISHES an "online" presence event when it RESURRECTS a previously-swept connection (mirrors_publish_offline): new_publish_online+_schedule_online_publishpost a retained payload toclaude-comms/presence/{key}/{conn_key}so the web userlist and other clients see the agent return, not just the in-memory registry. Best-effort and non-blocking (scheduled on the running loop; no-op outside one)._touch: comms_read, comms_thread_read, comms_history, comms_check, comms_members. Added a regression guard test pinning this.(B)
@all/@everyonemention -> ping everyone presentis_broadcast_mention/BROADCAST_MENTION_TOKENSin mention.py (case-insensitive, with/without leading@).tool_comms_sendexpands a broadcast token to the keys of all PRESENT (online) conversation members. Normal mentions mixed in are unioned (order-preserving, dedup'd). This is broadcast-highlight metadata, not a whisper/recipients change.(C) Reserve
allandeveryoneas usernamestool_comms_join(first-time name) andtool_comms_update_name(rename) now rejectall/everyone(case-insensitive) with a clear error, so nobody can impersonate the broadcast token.(D) Agent-doc guidance (participant + facilitator)
reply_toat all (feature not fleshed out); top-level in-channel messages only.Tests
Deploy note
Backend behavior change — needs a desktop redeploy to take effect.
🤖 Generated with Claude Code