# ZOS > ZOS is a Zig 0.17.1 monorepo for Git hosting and verified content slabs (zgit), Linux KVM microVMs (zkvm), edge routing (zddy), coding-agent swarms (zerf), and company governance (cos). Start with [the repository overview](README.md). This file is also available at `GET /llms.txt` on a zgit server. It is a public documentation index, not a list of repositories or credentials. ## zgit CLI - `zgit create-repo --data-dir DIR --org ORG --repo NAME --visibility public|private|confidential [--key KEY]` creates a repository. Store the key separately from repository content. - `zgit serve --data-dir DIR [--listen IP:PORT] [--preview-domain DOMAIN]` serves Git Smart HTTP and previews; use `ZGIT_TOKEN` or an individual repository key for protected access. Git remotes use `/ORG/NAME.git`. - `zgit build-slab --data-dir DIR --org ORG --repo NAME --ref REF` materializes a ZSLB source snapshot. `zgit inspect-slab --slab FILE` shows its layout, and `zgit verify-slab --slab FILE --path PATH --file EXPECTED` checks exact file bytes. - `zgit cache-run --data-dir DIR --org ORG --repo NAME --ref REF --target TRIPLE --cmd COMMAND` runs a trusted build; write artifacts under `out/`. Supply toolchain and dependency-closure digests when their identities matter for reuse. The CLI reports a hit flag, elapsed nanoseconds, digests, and execution count. - `zgit land --data-dir DIR --org ORG --repo NAME [--onto BRANCH] [--preview-domain DOMAIN] [--allow-test-edit] BRANCH...` tests pushed branch snapshots and lands compatible, passing changes in one target-ref transaction. The default target is `main`; up to 16 branches can be requested. A stale target aborts publication; retry against the new base. Unrelated or ambiguous Git histories are not guessed. - `zgit mcp --data-dir DIR` starts the trusted local MCP stdio server. `zgit vopr --seed N --seeds COUNT` runs a deterministic verification sweep. The default preview suffix is `preview.zos.local`; `zos.local` is accepted as shorthand. An immutable URL has the form `http://COMMIT.preview.zos.local`. Configure routing and DNS for the chosen suffix. A preview URL is not an access token. `zgit bind-preview` can bind an existing, operator-provisioned VM snapshot to an authorized preview route; it does not create a VM. ## Land manifest and JSON Land selects test definitions only from the initial target snapshot's `.zos/tests`, not from any candidate. Each manifest record is `NAME FOLDER PATH_GLOBS COMMAND ;; cpu=N`. Use `.` for the repository root and `-` as the path selector to run for any change. Include all test inputs in trigger patterns. For example: unit . - zig build test ;; cpu=1 The test guard rejects recognized weakening edits before executing affected candidates. `--allow-test-edit` is a deliberate operator override; it does not switch command selection to a candidate manifest during that invocation. This guard does not prove tests are equivalent. Cache input includes the whole candidate tree, including sibling files and modes, so trigger patterns do not narrow the input identity. The normal land result is one JSON object, for example: {"onto":"main","landed":["sub/api"],"refused":[{"who":"sub/ledger","head_oid":"...","why":"tests_failed","hitBy":"sub/api","failing":[{"test_name":"unit","assertion_line":42}],"repro":{"cmd":"zig build test"}}],"tests_run":4,"tests_cached":2,"preview_url":"http://COMMIT.preview.zos.local","merkle_cache_hits":1} `why` is `test_weakened`, `merge_conflict`, or `tests_failed`. Preflight refusals have an empty `failing` array and null `repro`, and can include a `path` and `guard_violation`. A test failure includes its test target and reproduction command; `assertion_line` is null when no location was recognized. `hitBy` is null unless the queue reproduced the failure with a specific pair that passes separately. A partial success can include both landed and refused branches, and a null preview means no new target publication. `tests_run` counts actual executions, including diagnostic probes. `tests_cached` counts targets skipped by reachability plus Merkle cache hits; `merkle_cache_hits` isolates the latter. Reachability assumes the target starts green and the manifest declares every relevant input. `cpu=N` is parsed as a scheduling hint; the local CacheRunner does not enforce a CPU quota. ## MCP over stdio Send one JSON-RPC 2.0 object per line (at most 64 KiB), read one response per request carrying an id, and reserve stdout for protocol frames. Start with: {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"local-client","version":"1"}}} {"jsonrpc":"2.0","method":"notifications/initialized"} {"jsonrpc":"2.0","id":2,"method":"tools/list"} {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"zos_repo_list","arguments":{}}} Discover current argument schemas via `tools/list`. Tool success data is JSON contained in the result's first text content item; tool failures set `isError`. Notifications have no reply and cannot invoke tools. - `zos_repo_list`: list local repositories and their visibility, with optional `visibility` filter. - `zos_slab_read`: read a repository-relative `path` from a verified slab; pass `org`, `repo`, and optionally `ref` (defaults to `HEAD`). File content is returned as base64, up to 1 MiB before encoding. - `zos_cache_run`: trusted local cache execution; pass `org`, `repo`, `cmd`, and optionally `ref`, `target`, and input digests. - `zos_land`: use the same land queue as the CLI; pass `org`, `repo`, and `branches`; optional inputs include `onto`, `allow_test_edit`, and `preview_domain`. - `zos_preview_url`: resolve `org`, `repo`, and optional `ref` to an immutable preview URL. Use `HEAD`, a short branch name, a fully qualified ref, or a known commit OID. A custom `preview_domain` must match server routing. ## Trust and visibility Git and preview HTTP enforce repository visibility: public content can be read anonymously; restricted content and writes require the applicable credential. Cache reuse is scoped to the organization and visibility tier. The stdio process is different: it runs for the local operator, with access to the supplied data root. It can list or read private and confidential repositories and publish refs. Do not expose stdio to an untrusted MCP client or forward its output to an unauthorized audience. Land and cache-run execute shell commands and repository code with the invoking user's permissions. Fresh work directories and a filtered environment help make inputs reproducible; they are **not** an OS sandbox, credential boundary, or network isolation guarantee. Use trusted inputs or an independently enforced sandbox and keep the data root writable only by the service operator. ## zkvm [zkvm](plum/packages/zkvm/) is the Linux KVM microVM subsystem. See the [workspace qualification](plum/packages/zkvm/guest/workspace-qualification.md) and the [benchmark adapter](bench/sandbox-benchmarks/README.md) for kernel/rootfs prerequisites, workspace fork and wake, receipt output, and fixture versus measured results. The default zgit CacheRunner described here does not run inside zkvm. An immutable preview serves verified slab content without requiring an active VM. ## References - [Git and slab qualification](plum/packages/zgit/QUALIFICATION.md) - [Cache and preview qualification](plum/packages/zgit/PHASE3_QUALIFICATION.md) - [Workspace benchmark adapter](bench/sandbox-benchmarks/README.md)