Metadata-Version: 2.4
Name: vacant-network
Version: 0.9.2
Summary: An accountability layer that sits outside any AI agent: runs the customer's executable acceptance tests, gates delivery, and signs every attempt into a verifiable hash chain.
Author: cosmopig
License-Expression: MIT
Project-URL: Homepage, https://github.com/cosmopig/Vacant
Project-URL: Repository, https://github.com/cosmopig/Vacant
Project-URL: Documentation, https://github.com/cosmopig/Vacant/blob/main/README.md
Project-URL: For AI agents, https://github.com/cosmopig/Vacant/blob/main/AGENTS.md
Project-URL: Changelog, https://github.com/cosmopig/Vacant/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/cosmopig/Vacant/issues
Keywords: accountability,audit,hash-chain,ed25519,receipts,llm,agent,code-generation,evaluation,acceptance-tests
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=42
Requires-Dist: mcp<2,>=1.26
Requires-Dist: jsonschema>=4.21
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5; extra == "dev"
Dynamic: license-file

<p align="center"><img src="https://raw.githubusercontent.com/cosmopig/Vacant/main/docs/assets/vacant-8bit.svg" width="720" alt="VACANT"></p>

<p align="center">
  <b>English</b> ·
  <a href="https://github.com/cosmopig/Vacant/blob/main/README.zh-TW.md">繁體中文</a> ·
  <a href="https://github.com/cosmopig/Vacant/blob/main/README.ja.md">日本語</a>
</p>

# Vacant

**Your coding agent says "done". Vacant checks it with your own tests before it reaches you.**

Vacant wraps a coding agent (pi, Claude Code, Codex, OpenCode, or any CLI). The agent works in a copy of your project. When it says it is done, Vacant runs your project's own tests. If they fail, the copy is thrown away and the agent starts over, up to 3 times. You get the first attempt that passes. If none pass, you get the best attempt and are told plainly that it did not pass. Every attempt is written to a signed record.

## Install and run

```bash
pipx install vacant-network          # needs 0.9.2 or later; check with: vacant --version
cd your-project
vacant do claude --prompt "fix calc.add"                      # or: pi, codex, opencode
vacant do --cmd 'my-agent {prompt}' --prompt "fix calc.add"   # any other CLI agent
```

The package is `vacant-network`; the command is `vacant`. (`pip install vacant` is a different, unrelated project.)

## What happens when you run it

1. Vacant runs your tests once before the agent starts, so you know the starting point.
2. The agent edits a copy of your project, not the project itself.
3. When the agent stops, Vacant restores your test files and test config to their original content, then runs the tests. Edits the agent made to the tests do not count.
4. Tests pass: the result is written back to your project. Tests fail: the copy is discarded and the agent starts again (up to 3 attempts, 600 s each, 1800 s in total).
5. You get a summary and a signed record of every attempt, including the failed ones: `vacant audit list`.

Tests are detected automatically (unittest, pytest, `npm test`; cargo and go are experimental), or you can pass your own check with `--check "<command>"`. A project with no tests runs once, and Vacant says that nothing was checked.

| Exit code | Meaning |
|---|---|
| `0` | Tests passed and the result was written back |
| `40` | No attempt passed; the best attempt was written back and the first failing test is printed |
| `43` | Could not run (environment problem or conflicting edits); nothing was written back |
| `130` | Interrupted; your project is unchanged |

## What we measured

We ran ten pre-registered paired experiments comparing plain `pi` with `vacant do pi`, on local gemma-4 models (12B and a 4B-class model), with the same total time limit for both sides.

- **7 of 10** showed a higher pass rate with Vacant, by 4 to 18 percentage points. Example: 34 Python tasks × 5 runs went from 80/170 to 103/170.
- **3 of 10** showed no measurable difference: one where the plain agent already passed 88%, one with only 9 tasks, and one on a slow backend where 75% of attempts ran out of time.
- **Cost:** the agent makes about 1.5 to 2.2 times as many model calls. Vacant buys checked deliveries, not speed.

Read these with the numbers:

- Five of the ten experiments reuse the same 34 Python tasks. They are repeat measurements, not evidence that it works on every task.
- The experiments ran on earlier release candidates that use the same delivery policy. Version 0.9.2 itself has not been run through its own experiment.
- Only `pi` has measured results. Claude Code, Codex and OpenCode are supported but not measured here.

Full table, conditions and per-experiment conclusions: [REFERENCE.md](https://github.com/cosmopig/Vacant/blob/main/REFERENCE.md#what-was-measured-state-the-conditions-together).

## What it does not do

- **It only catches what your tests catch.** A bug your tests do not cover passes straight through.
- **It is not a security sandbox.** The agent runs with your permissions. The copy protects against accidental write-back, not against a malicious agent.
- **The signed record shows tampering after the fact; it does not stop forgery on the same machine.** The signing key is a file you can read, so a program running as you (including the agent) can read it too.
- **It does not save compute.** Failed attempts are redone.
- **It does not extend a single run.** A task that needs more than the per-attempt limit is cut off; raise `--attempt-timeout` and `--timeout` for such work.

## More

- [REFERENCE.md](https://github.com/cosmopig/Vacant/blob/main/REFERENCE.md): all flags, hook mode (keep using your agent as usual), where files and records live, integrating your own agent, library use.
- [Known limits in 0.9.2](https://github.com/cosmopig/Vacant/blob/main/docs/KNOWN_LIMITS_0.9.2.md), with reproduction scripts.
- [CHANGELOG](https://github.com/cosmopig/Vacant/blob/main/CHANGELOG.md)

## License

MIT
