src-control
Version control and a Git forge for fleets of AI agents.
src-control forks copy-on-write worktrees in memory for parallel agents, keeps secrets and private branches encrypted in the repository, and syncs with Git in both directions. Its Git forge, sc-forge, hosts repositories over smart HTTP with a Gitea-compatible API subset.
Status
Production use covers sc-forge only, as the project Git host at Codento Engine.
- Maturity
- Pre-1.0. Phases 1 to 39 (including the P37 partial-clone series, 37a to 37d) are implemented and tested.
- Latest phase
- P39, Git-carried bucket remotes (
sc+git::, ADR-0060). - Production use
- sc-forge is the Git host for Codento Engine's project repositories. There are no other production users.
- Not yet done
- The cryptography has had no independent audit. Do not trust production secrets to it yet.
- Language
- Rust. The desktop app uses Tauri v2 and TypeScript.
- License
- Apache 2.0
Quickstart
The commands build and run with cargo.
Clone the repository and run these from its root. The
demo forks parallel worktrees off one snapshot, runs against each and
tears them down. The last command is a check for leftover artifacts. It
lists the scl-* entries in the temp directory and the
project's files before and after a demo run, and fails if either list
changed. That run has spill enabled, so blobs can reach a temporary
spill directory while it runs. The repository has 28 end-to-end demos
in demo/.
# fork 4 parallel in-RAM worktrees, run and check out against each
$ cargo run --bin sc -- demo --agents 4
# force the bounded budget: LRU eviction + spill, auto-cleaned
$ cargo run --bin sc -- demo --agents 6 --budget-mb 4 --spill
# leftover-artifact check (compares temp dir entries and project files before/after)
$ bash demo/run_demo.sh Features
A checkout assumes one developer, one directory and one disk. Agent fleets want dozens of worktrees at once, forked in milliseconds and gone when the run ends.
sc-forge, a self-hosted Git host
sc-forge serves bare Git over smart HTTP and a recorded subset of the Gitea API: repositories, pull requests, reviews, statuses and branch protection. It adds protected merges and ops tooling. All 24 recorded scenarios and six first-consumer acceptance scenarios pass.
Codento Engine runs sc-forge in production as the Git host for its project repositories, where it replaced Gitea. This is the only part of src-control in production use.
In-memory worktrees
Fork N copy-on-write worktrees off one snapshot. With spill disabled, content stays in RAM and reaches disk only on an explicit checkout.
Agent workspaces
sc work forks workspaces, runs a command in each and harvests the results. sc ws sessions can be named and run concurrently.
Committed secrets
Environment variables and keys live in repository state, encrypted at rest and in transit, and are decrypted only in an authorized execution context.
Private branches
Seal a branch's content, paths and messages to a recipient set, then publish it in one atomic move.
Signed provenance
Ed25519 commit signing with verification of trusted signatures, and sealed agent-session transcripts attached to commits.
Git interoperability
Import from Git, export back to Git, or sync in both directions with a local or hosted Git remote.
Transports and partial clone
SSH and HTTP(S) transports with in-binary TLS, bucket WAL remotes (including sc+git:: over any Git host), and lazy partial clones.
Desktop browser
A read-only, keyless Tauri v2 app for refs, snapshot history, provenance, public trees and diffs.
How it works
A snapshot-and-tag model inspired by Jujutsu.
# agent workspaces: fork N workspaces, run a command in each, harvest results
$ sc work --agents 4 -- cargo test
# seal an agent-session transcript and attach it to a commit, signed
$ sc transcript attach HEAD session.json --sign
# stage an embargoed fix on a private branch (content, paths and messages
# all sealed to the recipient set), then make it public in one atomic move
$ sc branch hotfix --private --to alice
$ sc branch grant hotfix --to bob
$ sc branch publish hotfix
# interoperate with Git: import a repo's HEAD, export history back,
# or use a Git repo (local or GitHub over https/ssh) as a remote
$ sc import --repo /path/to/git/repo
$ sc export --to /path/to/git/repo
$ sc clone https://github.com/org/repo.git ./mirror
# open a native .sc repository browser (read-only and keyless)
$ cd apps/desktop
$ npm ci && npm run tauri dev - Copy-on-write worktrees
- A worktree is a copy-on-write overlay over an immutable base snapshot. Forking N agents costs O(overlay), not O(repo). Base blobs are shared, never copied.
- Disk only on request
- With spill disabled, content lives in RAM and touches disk only on an explicit checkout. There is no FUSE mount and no kernel extension. Tools that need real files, such as compilers and test runners, get a materialized temporary checkout that src-control cleans up.
- Bounded memory
- A blob budget with LRU eviction bounds memory use. Without spill, an insert over the budget fails. With spill, the coldest blobs go to a content-addressed temporary directory on disk, which src-control removes afterwards.
- Durable repositories
-
.sc/repositories have branches, merge with conflict tooling (sc conflictsandsc resolve), history editing (cherry-pick, rebase, amend, undo), sparse checkouts, accidental-secret scanning, per-path encryption, packfiles and garbage collection. - Private branches
-
A private branch seals every object it introduces (snapshots, trees
and blobs) with randomized per-object encryption. Non-recipients
see no content, file paths, messages or DAG shape. A grant is an
O(1) key wrap. Revocation rewraps keys without writing plaintext to
the object store.
sc branch publishreplays the sealed history into public space in one atomic ref move thatsc undocan reverse, and reruns the secret scanner at the boundary. - Provenance
-
src-control supports Ed25519 signing of commits and verification
of trusted signatures with
sc verify. New commits created by amend, rebase or merge start unsigned. Sealed agent-session transcripts attach to commits. Plaintext never enters the object store, and a keyless clone gets ciphertext only. - Transports
-
sc-native transports run over SSH and HTTP(S), with in-binary TLS
(
sc+https://), token-based access control with expiry and rotation, connection caps and session timeouts. Streaming packs move multi-GiB repositories in bounded RAM. Bucket WAL remotes work oversc+wal://,sc+s3://andsc+git::<git-url>, which stores opaquerefs/sc/*entries in any Git host so private branches, protected files and committed secrets survive a plain Git host, with store compaction andsc serve --storesupport. Partial clones fetch lazily, and merge, cherry-pick, rebase and agent sessions work on a partial clone. - Git interoperability
-
Git interop goes through
gix, isolated in one crate. src-control imports a repository's HEAD in-process, exports history back to Git commits, and syncs in both directions with a local or hosted Git remote, including GitHub over https or ssh. - Desktop browser
-
The Tauri v2 desktop app reads
.screpositories directly through the Rust crates, not through CLI output or a Git export. It browses local and remote-tracking refs, the all-parent snapshot DAG, signature and transcript provenance, public trees and first-parent diffs.
Security and limits
src-control is pre-1.0. Read this before you rely on it.
- No independent audit
- The cryptography has not had an independent audit. Do not trust production secrets to src-control yet. The near-term promise is parallel agent workspaces and provenance, not production secret management.
- Scope of production use
- Production use at Codento Engine covers sc-forge only. The in-memory worktrees, committed secrets and encrypted paths are not in production use there, and no one outside Codento Engine runs src-control in production.
- TLS trust
sc+https://trust defaults to first-connection (TOFU) pinning. CA validation is an option, andsc tlsmanages pins.- Revocation
- Revoking a private-branch recipient protects what is sealed afterwards. It cannot erase what they already fetched.
- Desktop app
- The desktop browser is read-only and keyless. Protected files cross IPC only as locked states, private branches remain opaque at their public manifests, and the WebView has no general filesystem, shell, URL, process or object-store command.
The threat model and the security policy have the details.
Recent changes
November 2026
November 2026
-
Phase 39 (ADR-0060, #369 to #374) added
sc+git::bucket remotes, carrying private branches, protected files and committed secrets through any Git host (validated against GitHub), with store compaction andsc serve --storesupport. - sc-forge (P38) runs in production as the Git host for Codento Engine's project repositories. Engine builds the sc-forge image from a pinned src-control commit and deploys it by digest. The design, ADR-0058, was accepted on 25 October 2026.
- On 20 November a security fix round merged (#360 to #368): fuzzing of untrusted decoders, serve hardening, and fixes for a checkout escape, recipient sealing and secret environment injection; followed on 22 November by dependency security updates (#378, #379).
Since July 2026
- Phase 36 added bucket WAL remotes over
sc+wal://andsc+s3://. - P37a to P37d added lazy partial clones: want-by-id fetch, presence-based partial clones, and merge, cherry-pick, rebase and agent sessions on a partial clone.
sc wssessions can be named and run concurrently.sc tlsmanages TLS pins, andsc+https://can validate against a CA.- Tokens expire and rotate, and
sc rewrapgained--rotate. - Clones can filter by blob size, and keys get owner-only ACLs on Windows.
Frequently asked questions
- What is src-control?
- src-control is open-source version control built for fleets of AI agents. It combines copy-on-write virtual worktrees, a persistent collaborative VCS, encrypted paths and branches, signed provenance, Git interoperability, a self-hosted Git forge called sc-forge, and a native desktop repository browser.
- Is src-control used in production?
- One part is. Codento Engine runs sc-forge, the Gitea-compatible Git forge in src-control, as the Git host for its project repositories. The in-memory worktrees, committed secrets and encrypted paths are not in production use there, and src-control has no production users outside Codento Engine.
- Does src-control write agent worktrees to disk?
- With spill disabled, virtual worktrees stay in memory. With spill enabled, the coldest blobs go to a temporary directory on disk that src-control removes afterwards. A tool that requires real files can receive an explicitly materialized temporary checkout, which src-control also cleans up.
- Does src-control replace Git?
- No. src-control supports bidirectional Git interoperability, including import, export, and synchronization with local or hosted Git remotes.
- Does src-control have a desktop application?
- Yes. Phase 35 adds a native Tauri v2 desktop browser for .sc repositories. It reads the object model directly and shows refs, snapshot history and provenance, public trees, and first-parent diffs. This first slice is deliberately read-only and keyless.
- Is src-control ready for production secret management?
- No. src-control is pre-1.0 and its cryptography has not had an independent audit. Do not trust production secrets to it yet.
Docs and source
Everything links to the repository on GitHub.