WebRTC: Add objective Chat service: Spaces, sessions, and call timeline#1950
Open
cool-ant wants to merge 5 commits into
Open
WebRTC: Add objective Chat service: Spaces, sessions, and call timeline#1950cool-ant wants to merge 5 commits into
cool-ant wants to merge 5 commits into
Conversation
Extract the on-chain Chat package from mm/webrtc-refactor as the first WebRTC stack slice, adapted for main's removal of psibase::check. Co-authored-by: Cursor <cursoragent@cursor.com>
cool-ant
requested review from
James-Mart and
swatanabe
and removed request for
swatanabe
July 20, 2026 18:47
cool-ant
marked this pull request as ready for review
July 20, 2026 18:48
swatanabe
reviewed
Jul 20, 2026
| } | ||
|
|
||
| /// For group `chat-data` and `av-call` sessions, objective metadata always includes all | ||
| /// Space members (N-party mesh). DM and other purposes use the explicit participant list. |
Collaborator
There was a problem hiding this comment.
I'm confused.
- There is no other purpose
- The only way for DM not to include all space members is to have only one participant. Is that even allowed?
Member
Author
There was a problem hiding this comment.
hmm, I likely pruned one along the way. Reworded. And DMs now confirm both participatns, so the session memberhsip matches the space membership
Collaborator
There was a problem hiding this comment.
I don't understand why using the explicit participants list for other purposes is safer. If every existing purpose uses the space members, why would you expect a new purpose to be different? Is the explicit participants list needed at all?
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.
This is PR1 in a chin of PRs to release the webrtc work. First phase is the Chat objective service, which handles
Architectural Decisions and their Impact
Added in this PR: the Chat package — objective service
chatandr-chat. Plugin API included; there is no Homepage UI here.chatis an objective (on-chain) service.Spaces, session metadata (
chat-data/av-call/ pair), and call-timeline events live in consensus state. Architectural impact:authorizeSessionJoin) and build UX on top.x-wrtcsig-- also future PR) brokering live presence.In short: Chat (this PR) = objective who’s-allowed / session + call metadata infra; realtime who’s-connected-now comes later as subjective
x-wrtcsig.Summary
chat-data/av-call/ pair sessions), and call-timeline events.ensure-dm,ensure-group,create-session,close-session, …) and authenticated GraphQL (mySpaces,activeSession,sessionJoinAuth,callEvents, …).ctestso the on-chain model can be built and tested on its own.Testing locally
via
ctest/ manualcargo-psibase testThere is no Homepage UI in this PR. Validation is via
cargo-psibase test(primary) and optional GraphiQL on a node with Chat installed.For convenience, here's the ctest command:
cargo-psibase test \ --manifest-path packages/user/Chat/service/Cargo.toml \ --target-dir /tmp/psibase-chat-target \ --psitest=build/psiteston chain:
On a booted node with the Chat package installed: