No description
Find a file
2026-03-16 13:44:56 +01:00
.agent/specs/native-push-pull feat(remote): native graf push/pull via GTP per-object protocol 2026-03-16 13:44:56 +01:00
src feat(remote): native graf push/pull via GTP per-object protocol 2026-03-16 13:44:56 +01:00
zig-pkg fix(merge): add/add conflict markers, wire release inspect 2026-03-16 12:50:12 +01:00
.grafignore feat(cas): add remote CAS HTTP client for graf-forge push/pull 2026-03-16 12:50:13 +01:00
build.zig feat(remote): native graf push/pull via GTP per-object protocol 2026-03-16 13:44:56 +01:00
build.zig.zon Phase 3 polish: bridge tests, prefix resolution tests, git timestamp parsing, short CID support in cat 2026-03-09 18:54:38 +01:00
CONTRIBUTING.md fix(merge): add/add conflict markers, wire release inspect 2026-03-16 12:50:12 +01:00
KNOWN_ISSUES.md fix(merge): add/add conflict markers, wire release inspect 2026-03-16 12:50:12 +01:00
README.md fix(merge): add/add conflict markers, wire release inspect 2026-03-16 12:50:12 +01:00

Graf

Content-addressed version control. Merkle trees, BLAKE3 hashing, CBOR serialization. Built in Zig.

What It Does

graf init                      Initialize repository (.graf/)
graf checkpoint "message"      Snapshot worktree (three-clock timestamps)
graf status                    Show changes (stat-cached, sub-100ms incremental)
graf log                       Show checkpoint history
graf diff                      Myers line-level diff, unified output
graf checkout <cid>            Materialize worktree from checkpoint
graf fsck                      Verify CAS integrity

graf stash                     Stash uncommitted changes
graf stash pop                 Restore stashed changes

graf branch list               List branches (* = current)
graf branch create <name>      Create branch at current HEAD
graf branch switch <name>      Switch to branch
graf branch delete <name>      Delete branch

graf merge <branch>            Three-way merge (fast-forward detection, conflict markers)

graf sync push                 Push to git remote
graf sync pull                 Pull from git remote
graf sync status               Show sync state

graf stats                     Scheduler metrics (Janus runtime)

Architecture

  • CAS: Content-addressed store with BLAKE3 CIDs, prefix-sharded object directory
  • Objects: Blob, Tree (Merkle), Change (transitions), Checkpoint (DAG with parent chain)
  • Serialization: CBOR (RFC 8949)
  • Diff: Myers O(ND) line-level algorithm
  • Merge: LCA via alternating BFS, three-way tree+line merge
  • Timestamps: Wall clock + Lamport counter + local sequence (crdt-safe)
  • Concurrency: Janus M:N scheduler with fiber-based nurseries, structured cancellation
  • Agent support: Three-level nested nurseries with supervisor merge

Build

Requires Zig 0.14+.

zig build                      # → zig-out/bin/graf
zig build test                 # 101 tests
zig build run -- status        # run directly

License

LCL-1.0 (Libertaria Community License)