Skip to main content

onevcs

Version control and its remote host behind one host-neutral vocabulary, for agent workflows.

The review unit is a change request — GitHub maps it to a pull request, and a later host maps it to whatever it calls the same thing. Vcs owns the repository side (identities, sessions over an isolated worktree, preserved work); RemoteHost owns the host side (opening a change, reading its checks, merging it); a rules file decides, per repository, how a change publishes and what verifies it. Everything a run does is emitted as an NDJSON event stream.

The public surface is the approved contract — docs/contract.md — compiled, and it is implemented: the registry with its lazy migration, the rules engine, sessions over borrowing clones, bounded git, the FIFO merge queue, both publication strategies, recovery and provenance, the merge train, and the event stream.

What one change looks like

onevcs register ~/projects/widgets                 # once per checkout
onevcs rules check widgets                         # which policy, and why
token=$(onevcs session open widgets --branch feature/thing | jq -r .token)
# …work in the worktree the session printed…
onevcs publish "$token"                            # verify, then land it
onevcs events "$token"                             # everything it did, as NDJSON

Everything durable lives under one state root — ONEVCS_HOME, otherwise ~/.onevcs.

GitHub is reached through gh, so whatever gh auth status reports is the credential. A fine-grained personal access token needs Actions: Read on the repository beside its contents and pull-requests access: GitHub will not let that credential class resolve a check run at all — there is no Checks permission to grant one — so a change request's checks are read from its workflow runs, and change_checks says so in the sources it answers with. Anything a third-party integration posted as a check run or a commit status is invisible to such a token, and a credential that can read neither source is refused rather than reported as having no checks.

Install

cargo install onevcs      # crates.io
pip install onevcs-cli    # a prebuilt wheel, no Rust toolchain
npm install -g onevcs-cli # a prebuilt binary, no Rust toolchain

All three install the same onevcs binary. Prebuilt binaries exist for Linux (x64, arm64), macOS (x64, arm64), and Windows (x64); every release also attaches the archives and their .sha256 checksums for a direct download.

Use

onevcs --help

--help is the command surface, and publish reserves its own exit codes for a gate that failed, a request that was invalid, and a base that moved under it.

Embed it

A command answers a process: an exit code and a line of prose. A caller embedding the crate wants the decision, so the same operations answer values.

let published = onevcs::publish(&providers, &token, &PublishRequest::default())?;
match published.outcome {
    PublishOutcome::Merged(sha) => journal.landed(sha),
    PublishOutcome::ChangeOpen(url) | PublishOutcome::Queued(url) => journal.awaiting(url),
    PublishOutcome::NothingToPublish => journal.nothing(),
    PublishOutcome::Failed { kind, reason, retained } => journal.failed(kind, reason, retained),
}

close_session and session are the same for the rest of a session's life, and EventStream::open(&token) reads its events as Envelopes, each attributed to the session that wrote it — so a caller following several publications at once can tell them apart. The command line is a rendering of these rather than a second path through them.

A consumer that wants some of what a session writes reads it through the filter grammar the three producing libraries share — EventStream::open_filtered(&token, filter), or onevcs events TOKEN --filter SPEC with the spec inline as JSON or in a file. An envelope passes when it matches any include matcher (or include is absent) and no exclude matcher, matching source by family, kind by glob (change-*), and the reserved label keys exactly:

include:
  - {source: vcs, kind: "gate-*"}
exclude:
  - {kind: lock-wait}

Before a caller has a token, session_holders(repo) answers who is in a repository: one SessionHolder per recorded session, carrying the token the calls above take, the branch and worktree it holds, and whether its owner is still running (Liveness::Live) or the session is the remains of a run that stopped.

Test against it, without a real GitHub

Embedding the crate, run_with(&cli, providers) takes the two implementations a run reaches Vcs and RemoteHost through; run is that with Git and GitHub, and every entry point above goes through the same seam. onevcs-testing ships in-memory and file-backed implementations of both, so a consumer's suite drives a real onevcs through a real journey against a host it seeded:

cargo add --dev onevcs-testing

They emit the events the real implementations emit — a claim this repository's own suite checks by running one publication journey on both backends and holding the two event streams to each other.

Develop

just bootstrap   # from a clean clone
just check       # the deterministic gate: format, clippy, tests, coverage, docs
just gate        # check, plus the diff-scoped LLM-judge tier — the pre-push bar

just --list is the full index.

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

onevcs_cli-0.2.9-py3-none-win_amd64.whl (1.0 MB view details)

Uploaded Python 3Windows x86-64

onevcs_cli-0.2.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

onevcs_cli-0.2.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (993.4 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

onevcs_cli-0.2.9-py3-none-macosx_11_0_arm64.whl (979.3 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

onevcs_cli-0.2.9-py3-none-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file onevcs_cli-0.2.9-py3-none-win_amd64.whl.

File metadata

  • Download URL: onevcs_cli-0.2.9-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for onevcs_cli-0.2.9-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b460b3f45eb2ae6b5f5981e1006ab6d7089992eba0512d3b519a215145eaebd4
MD5 01ea4d9ff1fb537bb90ff6305e4e37d5
BLAKE2b-256 193f72c5b7bcc2bebd0e4fe0db810e39adebb29b5514ef65b6fe39e17b544eb6

See more details on using hashes here.

File details

Details for the file onevcs_cli-0.2.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for onevcs_cli-0.2.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 96426655e62a1c3b1e7fd115f27b408498069d1c97f9e8a8bcccb6d1867549db
MD5 a591e86337c9f4adf52245646b4f126d
BLAKE2b-256 2bbe13aa318d4ef92ac6c33dd83b65b6cdf13f04aa1be1d417690de3b2868074

See more details on using hashes here.

File details

Details for the file onevcs_cli-0.2.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for onevcs_cli-0.2.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f1409184aba11ad05c147061712dc33ea3dc97139d03c6fafb24cb07edb08e42
MD5 7270a040dd599a7ca00a421ee1096be0
BLAKE2b-256 3317cb2e07dfb62b42fe4262fb26f984c48a65a38432242d84344fd64f02342e

See more details on using hashes here.

File details

Details for the file onevcs_cli-0.2.9-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for onevcs_cli-0.2.9-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc0e2fc67c372a34e668c962c5e6fa843643583d5d1786fd92626d3fbb2330a1
MD5 09ff382e260d16a6be8f65a3f9396a57
BLAKE2b-256 79a6c18bb7b91da5439533b8b6e3ac585e1b87ee8cade7b7842106a63d408540

See more details on using hashes here.

File details

Details for the file onevcs_cli-0.2.9-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for onevcs_cli-0.2.9-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 63a67de208c85c5bfdab8cd36d56a44206d4ea3441708863bc7e69c043e74a51
MD5 ef0feecc1c317420da4974a2e0e1eea9
BLAKE2b-256 74ab657b315e35d9765ae6945c66504b5b4f1702c1fe1601e51b3c4c16c32846

See more details on using hashes here.

Release history Release notifications | RSS feed

0.18.0

5 files

0.17.1

5 files

0.17.0

5 files

0.16.3

5 files

0.16.2

5 files

0.16.1

5 files

0.16.0

5 files

0.15.10

5 files

0.15.9

5 files

0.15.8

5 files

0.15.7

5 files

0.15.6

5 files

0.15.5

5 files

0.15.4

5 files

0.15.3

5 files

0.15.2

5 files

0.15.1

5 files

0.15.0

5 files

0.14.1

5 files

0.14.0

5 files

0.13.0

5 files

0.12.3

5 files

0.12.1

5 files

0.12.0

5 files

0.11.1

5 files

0.11.0

5 files

0.10.0

5 files

0.9.0

5 files

0.8.1

5 files

0.8.0

5 files

0.7.0

5 files

0.6.1

5 files

0.6.0

5 files

0.5.0

5 files

0.4.2

5 files

0.4.1

5 files

0.4.0

5 files

0.3.1

5 files

0.3.0

5 files

0.2.10

5 files

This release

0.2.9 This release

5 files

0.2.8

5 files

0.2.7

5 files

0.2.6

5 files

0.2.5

5 files

0.2.4

5 files

0.2.3

5 files

0.2.2

5 files

0.2.1

5 files

0.2.0

5 files

0.1.3

5 files

0.1.2

5 files

0.1.1

5 files

0.1.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page