Skip to content
Back to skills

Crdt Vterm

ASecurity

Collaborative terminal session sharing using CRDT-style s-expressions

  • 61 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 6, 2026
developmentgobashexpress

Works with

  • terminal
  • mcp

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add plurigrid/asi --skill crdt-vterm --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Crdt Vterm?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Crdt Vterm
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/plurigrid-crdt-vterm-asi/badge)](https://www.skillsdirectory.com/skills/plurigrid-crdt-vterm-asi)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: crdt-vterm
description: Collaborative terminal session sharing using CRDT-style s-expressions
  with GF(3) trifurcated conflict resolution.
metadata:
  trit: 0
---

# CRDT-VTerm - Collaborative Terminal Sharing

Collaborative terminal session sharing using CRDT-style s-expressions with GF(3) trifurcated conflict resolution.

## Components

### Emacs Bridge
- **File**: `crdt-vterm-bridge.el`
- **Purpose**: Connect vterm.el to crdt.el via shadow buffers

### Babashka Recorder
- **File**: `vterm_crdt_recorder.bb`
- **Purpose**: Record/replay terminal sessions as CRDT sexps

### P2P Sharing
- **File**: `vterm_localsend_share.bb`  
- **Purpose**: Live terminal sharing via localsend multicast

## Architecture

```
┌──────────────────────────────────────────────────────────────────┐
│                    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   │             │
│  └─────────────────────────────────────────────────┘             │
└──────────────────────────────────────────────────────────────────┘
```

## CRDT Sexp Format

```clojure
;; 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)
```

## Usage

### Record Session
```bash
bb vterm_crdt_recorder.bb record session.sexp
```

### Replay Session
```bash
bb vterm_crdt_recorder.bb replay session.sexp 2.0
```

### Live P2P Share
```bash
bb vterm_localsend_share.bb share output.sexp 192.168.1.5
```

### Emacs Replay
```elisp
M-x crdt-vterm-replay RET session.sexp RET 1.0 RET
```

## GF(3) Trifurcated Input

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.

```elisp
;; Cycle through queues
(crdt-vterm-trifurcate-cycle)
```

## Integration

### With gay-mcp
Each terminal session gets a deterministic color based on session ID.

### With localsend-mcp
P2P discovery and file transfer for session sharing.

### With duckdb-ies
Terminal sessions can be indexed in DuckDB for time-travel queries.

## Related Skills
- `gay-mcp` - Deterministic colors
- `spi-parallel-verify` - GF(3) conservation
- `triad-interleave` - Three-stream scheduling
- `bisimulation-game` - Session equivalence

Files in this skill

  • CONCOMITANT_SKILLS.md2.3 KB
  • SKILL.md5.1 KB
  • crdt-vterm-bridge.el10.3 KB
  • increment_69h_crdt_sexp.bb6.7 KB
  • vterm_crdt_recorder.bb8.2 KB
  • vterm_localsend_share.bb7.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.