Skip to content
selcukguralPublic

Repository files navigation

Lonca

Lonca: agents lease symbols and propose; the daemon decides, signs and logs; the merge queue builds and tests; trunk stays plain Git; lonca-audit replays every decision

crates.io lonca-client on docs.rs Licence

Agent-native, Git-compatible version control.

Lonca (Turkish: the craft guild — written rules, masters and apprentices, inspection before anything reaches the market) is a version control system designed for repositories where many AI agents and a few humans work at the same time. Content stays plain Git, so GitHub and every Git tool keep working. What changes is everything around it: who may do what, how concurrent work merges, and how every action is recorded and checked.

Everything else is on the site: https://selcukgural.github.io/lonca/.

Status: 0.2.2 (release notes). Every phase of the design is implemented and tested, and a log written by any 0.x release stays readable by every later one. 0.x is one machine: one developer with many agents (scope).

See it

Two agents on one file: each leases its own method, a lease that is held and a write outside a session's paths are refused, a human approves, both changes merge, and the auditor replays the log.

A terminal recording: two agents lease different methods of one file, a lease that is held and a write outside a session's paths are refused, a human approves both changes, they merge, and lonca-audit verifies the log

Every line is what the released binaries print; the script is docs/demo/demo.sh, and it runs in a home of its own.

Works with Claude Code

Claude Code is the harness Lonca is built and checked against, live, before every release. Start a session with --harness claude-code, run claude in its workspace, and every hook event and Lonca's MCP tools are already wired to the daemon:

Claude Code's hook events (SessionStart, PreToolUse, PostToolUse, Stop) and Lonca's MCP tools, each carried to the daemon by lonca hook or lonca mcp

Harness Support
Claude Code Full: every hook, the MCP server, the hardened and isolated levels
Codex, Gemini CLI, OpenCode Profiles included; full support is coming. Isolated today under lonca run
IDE agents (Copilot, Cursor, JetBrains AI) Planned; any MCP client can use lonca mcp today

How it works, step by step: Lonca with Claude Code.

In use: imece, a terminal for many coding agents, runs every worker as a Lonca session.

Install

macOS (arm64, x86_64) and Linux (x86_64, arm64):

curl -fsSL https://selcukgural.github.io/lonca/install.sh | sh   # ~/.local/bin
brew tap selcukgural/lonca                                       # or Homebrew,
brew trust --formula selcukgural/lonca/lonca                     # (Homebrew 7+)
brew install lonca
cargo install --locked lonca lonca-audit                         # or crates.io, Rust 1.90+

These install cooperative mode. Hardened mode, checking a download, upgrade and uninstall: Install.

Quick start

lonca daemon &                       # the gatekeeper (~/.lonca)
lonca human keygen ayse              # or: --secure-enclave, --security-key
lonca init demo --import ~/src/myproject
lonca session start --repo demo --agent claude --paths 'src/**' \
      --task T-142 --ttl 2h --workspace ~/ws/claude-1 --harness claude-code
lonca doctor                         # what a first run trips over
cd ~/ws/claude-1 && claude           # the agent, hooks and MCP set up

The agent leases the symbols it edits and proposes; you review, approve and audit. The whole walk-through is the quick start.

Crates

Most people want the command: cargo install --locked lonca (and lonca-audit for the auditor). Every crate has the workspace's version; only lonca-client is meant to be depended on, and the internal crates' APIs have no stability promise.

Crate What it is
lonca The lonca command: daemon, workspaces, approvals, harness hook, MCP server
lonca-audit (docs) The independent auditor, lonca-audit verify
lonca-client (docs) Client of the daemon socket: what harnesses and runners depend on
lonca-net (docs) Loopback CONNECT proxy that asks a gate about every connection
lonca-core (docs) Change ids, the signed operation log, keys, the Git store
lonca-policy (docs) The pure decide(), state replay, Cedar policies, human signatures
lonca-symbols (docs) tree-sitter symbols, facts and the structural merge
lonca-verify (docs) Sandboxed build and test runs, recorded as evidence
lonca-daemon (docs) The single writer: decide, sign, log, apply

Documentation

  • The site: guides, the protocol, release notes, the threat model, the OWASP review and cryptography.
  • docs/design.md (Turkish) and docs/decisions.md: the design, and every decision and deviation from it with its reasons. SECURITY.md to report a vulnerability.

Questions and ideas

  • Discussions: questions (Q&A), ideas, and how you run your agents (Show and tell). Releases are announced there.
  • Issues: bugs, and work that was agreed on. The plan is the roadmap.
  • A security problem: privately, as SECURITY.md says.

License

Apache-2.0. See LICENSE.

Releases

Sponsor this project

Packages

Used by

Contributors

Languages