feat(console): operator participant mode — agents can reply to you#206
Open
Lanzelot1 wants to merge 1 commit into
Open
feat(console): operator participant mode — agents can reply to you#206Lanzelot1 wants to merge 1 commit into
Lanzelot1 wants to merge 1 commit into
Conversation
36f96ba to
29745a9
Compare
8909549 to
c6c57ed
Compare
29745a9 to
d245b87
Compare
c6c57ed to
e452a23
Compare
d245b87 to
e29a877
Compare
a9a5f91 to
36b9355
Compare
A console send was one-way: the observer is invisible (registerPresence false) with no inbox (consume false), so an agent's DM reply to the operator had nowhere to land. On the operator's first send the console now upgrades the observer in place — CotalEndpoint.startPresence() registers presence so agents see and can reply to the operator, and MeshView reveals the DM lens and captures the operator's own inbox (inst.<self>.>). Outbound DMs are recorded locally (auth path) for two-sided threads; a clean offline leave fires on exit. canWrite-gated, so a pure-watch session stays invisible; works on open meshes (or a capable --creds). Runtime upgrade, no rebuild, no provisioning or manager.
e29a877 to
f4d3961
Compare
36b9355 to
5dcde20
Compare
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
Sending from
cotal consolewas one-way: the console joins as an invisible observer (registerPresence:false) with no inbox (consume:false), so an agent's DM reply to the operator had no consumer to land in and expired unread. Channel posts already round-tripped (agents reply in-channel, the tap shows it); DMs/:call/:askdidn't.Now, on the operator's first send, the console upgrades the observer in place (no rebuild, no provisioning, no manager):
CotalEndpoint.startPresence()registers the operator as arole:"operator"peer, so agents see it on the roster and can reply. Clean offline leave on exit (reuses the existing stop path).MeshViewreveals the DM lens and captures the operator's own inbox. On an auth mesh (chat-narrowed tap) it opens a second tap scoped toinst.<selfId>.>; on an open mesh the whole-space tap already covers it (so no second tap — avoids a double-count). A best-effort one-shot backfill catches a reply that raced activation.Gating / reach:
canWrite-gated, so a pure-watch session never registers (stays invisible). It works where the console can actually send — an open mesh (bare) or an auth mesh with a capable--creds. Under the auth-default read-only god-view cred the console can't send at all, so participant mode never activates there; full auth-default participation would need a dedicatedparticipantcred profile (future work, deliberately out of scope to keep this minimal and not touch the core cred matrix).Stacked on #200 (
feat/console-control) — retarget to main after it lands.Verified
pnpm typecheck+pnpm test+smoke:viewclean.:dm, it registers (the stub sees it), the agent'sackreaches the operator's DM lens as a two-sided thread, and there's exactly one distinct outbound (no double-count). 5/5.:dm @stub hi there→ operator joins the roster as an endpoint peer, the feed shows the reply, the DM lens showsuser → stub/stub → user: ack; onqthe operator deregisters cleanly (only the agent remains live).Core change
One small, generic method —
CotalEndpoint.startPresence()(post-construction presence + heartbeat, idempotent) + makingdoRegistermutable + a scopedinboxHistory(selfId). Everything else is console/MeshView.