Collaborative terminal session sharing using CRDT-style s-expressions with GF(3) trifurcated conflict resolution.
Collaborative terminal session sharing using CRDT-style s-expressions with GF(3) trifurcated conflict resolution.
crdt-vterm-bridge.elvterm_crdt_recorder.bbvterm_localsend_share.bb┌──────────────────────────────────────────────────────────────────┐
│ CRDT-VTerm System │
├──────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ remote-insert ┌───────────────┐ │
│ │ vterm │ ───────────────────▶ │ shadow buffer │ │
│ │ PTY │ (GF3 trit) │ (crdt.el) │ │
│ └────┬────┘ └───────┬───────┘ │
│ │ │ │
│ │ script(1) │ sexp file │
│ ▼ ▼ │
│ ┌─────────┐ ┌───────────────┐ │
│ │ raw log │ │ .sexp log │ │
│ └────┬────┘ └───────┬───────┘ │
│ │ │ │
│ │ vterm_crdt_recorder.bb │ localsend UDP │
│ ▼ ▼ │
│ ┌─────────────────────────────────────────────────┐ │
│ │ P2P Peer Network │ │
│ │ ┌───────┐ ┌───────┐ ┌───────┐ │ │
│ │ │ MINUS │ │ERGODIC│ │ PLUS │ ← GF(3) │ │
│ │ └───────┘ └───────┘ └───────┘ routing │ │
│ └─────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────┘
;; Session header
(crdt-terminal-session
(version "0.1.0")
(session-id "T-abc123")
(site-id 42)
(gf3-assignment :ERGODIC))
;; Terminal output
(remote-insert "0a1b2c3d" 42 "$ ls -la\n"
(props :type :terminal-output
:trit :MINUS
:timestamp 1234567890))
;; User input
(remote-input "0a1b2c3e" 42 "ls -la"
(props :trit :PLUS
:timestamp 1234567891))
;; Conflict resolution
(conflict-resolution
:type :concurrent-input
:strategy :gf3-ordering)
bb vterm_crdt_recorder.bb record session.sexp
bb vterm_crdt_recorder.bb replay session.sexp 2.0
bb vterm_localsend_share.bb share output.sexp 192.168.1.5
M-x crdt-vterm-replay RET session.sexp RET 1.0 RET
Multi-user input is routed through three queues:
| Queue | Trit | Processing Order | |-------|------|------------------| | MINUS | -1 | First | | ERGODIC | 0 | Second | | PLUS | +1 | Third |
This prevents conflicts in "no-longer-optimistic waiting" scenarios by deterministically ordering concurrent inputs.
;; Cycle through queues
(crdt-vterm-trifurcate-cycle)
Each terminal session gets a deterministic color based on session ID.
P2P discovery and file transfer for session sharing.
Terminal sessions can be indexed in DuckDB for time-travel queries.
gay-mcp - Deterministic colorsspi-parallel-verify - GF(3) conservationtriad-interleave - Three-stream schedulingbisimulation-game - Session equivalenceSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer