Expand description
CRDT-based collaborative file editing.
Provides a shared document model using automerge for collaborative editing
of files within worktrees. Multiple clients can edit the same file via
separate fids, sharing a single AutoCommit document.
§Session lifecycle
editOpen— Read file, hash it, initialize automerge doc, create sessioneditState— Serialize current automerge doc state to text (TOML/JSON/etc.)editApply— Apply automerge changes from a clientflush— Write automerge state back to disk (atomic, checks file_hash)editClose— Close this client’s session (decrements client_count)
Structs§
- Editing
Table - Table of active CRDT editing sessions.
- Shared
Doc - Shared CRDT document for a file, accessed by multiple clients.
Functions§
- normalize_
path - Normalize a path: no leading
./, no trailing/, POSIX separators. - sha256_
hash - SHA-256 hash of bytes.
Type Aliases§
- DocKey
- Canonical key for a shared document: (repo_id, worktree_name, normalized_path).