TermVerify
Protocol-driven verification for autonomous terminal applications.
TermVerify is a Python library and reference toolkit for testing terminal and TUI applications through reproducible interaction. It combines direct semantic adapters with real PTY-driven runs, then compares structured observations rather than relying only on brittle raw-terminal snapshots.
Why
An autonomous coding agent is most reliable when it can make a change, exercise the actual program, observe meaningful results, and leave behind replayable evidence. Terminal applications need this especially badly: unit tests alone do not prove that key bindings, focus, rendering, prompts, and real interaction work.
TermVerify provides a common foundation for:
- deterministic interaction transcripts and replay;
- semantic state and UI observations;
- property/state-machine testing;
- reviewed golden snapshots;
- differential tests against a reference implementation or execution mode;
- failure minimization and CI-ready artifacts.
Project status
The repository is in its foundation phase. The reviewed transcript design has
an initial codec, semantic validator, mandatory safe transcript-persistence
boundary, immutable producer-side adapter contract, and deterministic in-process
direct runtime. Semantic key chords use a closed, protocol-owned v1 registry and
have an immutable direct-dispatch representation; a requested timezone is a
plain non-empty string, since only UTC can be applied and any other request
is refused. The canonical transcript schema ships inside the package with a
public access API, and isolated installation checks verify the wheel and sdist
resource contract; the schema's $id resolves at
termverify.dev
as a byte-identical mirror of the committed resource, and runtime validation
remains authoritative. A strict no-regression coverage floor gates the full
suite. Release governance is defined — changelog policy, private security
disclosure, reviewed release checklist, and a tag-triggered attested release
workflow — and termverify 0.1.0 was published to PyPI on 2026-07-19 through
that CI-gated workflow. That publication was a distribution-pipeline
exercise, not a stability promise: TermVerify is in its prototyping
stage, no backward compatibility is guaranteed for any published artifact,
and protocols and APIs may change incompatibly without notice until the
owner declares readiness for external clients (recorded governance decision:
prototyping-stage protocol governance). A Windows ConPTY
adapter with Windows-matrix evidence covers native pseudoconsole ownership
and close, end-of-stream draining, process-tree teardown,
cancellation/recovery, resize epochs, and replayable evidence normalization,
and the first fully verified terminal run has landed using opt-in
cooperation-tier constraint ports: the six non-terminal constraints are
delivered to the subject's environment with truthful delivered receipts,
honored by subject cooperation rather than OS enforcement. OS-level
containment is an explicit non-goal by recorded owner decision; TermVerify
verifies applications whose authors control the subject and is not an
execution sandbox for adversarial code. Configuration values or receipt
construction alone do not prove constraint enforcement.
Design principles
- Semantic evidence first. Verify state, events, and explicit UI semantics before comparing raw ANSI output.
- Production interaction still matters. PTY/terminal tests validate the application a person or agent actually drives.
- Determinism is a contract. Seeds, clock, locale, terminal size, filesystem sandbox, and network policy are explicit.
- Human review owns baselines. Agents may propose snapshot updates; they never silently bless them.
- Harness-neutral by default. The project works with Hermes, Claude Code, Codex, OpenCode, and ordinary CI without a required proprietary integration.
Planned architecture
application under test
├── direct semantic adapter ── fast properties, replay, differential tests
└── PTY adapter ───────────── real terminal interaction and rendering evidence
│
TermVerify
├── run configuration and interaction protocol
├── observation normalization and comparison
├── transcript replay and shrinking
├── property/state-machine support
└── reports and CI artifacts
See the knowledge bundle for the durable architecture and verification model. Browser bridging is deferred until the terminal vertical slice proves a shared abstraction is necessary.
Development
Requirements: uv and Python 3.12 or newer. The minimum installer version is 3.12; the continuously supported and tested versions are currently 3.12 through 3.14. Support for later Python releases is not implied until they join the CI matrix.
uv --no-config sync --all-groups --locked
uv --no-config run pytest --cov --cov-report=term-missing
uv --no-config run ruff check .
uv --no-config run ruff format --check .
uv --no-config run mypy src tests scripts
uv --no-config run pre-commit run --all-files
uv --no-config run pre-commit run --hook-stage pre-push --all-files
uv --no-config build
uv --no-config run pre-commit install --hook-type pre-commit --hook-type pre-push
See developer workflow and contributing guide. External subjects implementing the producer contract start with the adapter-author surface.
License
Apache License 2.0. See LICENSE.
Metadata
Release files for termverify 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| termverify-0.1.1.tar.gz | 118.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| termverify-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 247.8 kB
Release files / termverify-0.1.1.tar.gz
| Download URL | termverify-0.1.1.tar.gz |
|---|---|
| Size | 118.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2e4d344cf14cea0f37c019ebcebfe0865c4a0e5837c7c3f999f2a038bfd005a
|
|
BLAKE2b-256 checksum How to use checksums |
c86875f96fa086194423801dc182c7eab7e20a5978a865c2c1ab759c4bde55bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / termverify-0.1.1-py3-none-any.whl
| Download URL | termverify-0.1.1-py3-none-any.whl |
|---|---|
| Size | 129.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5e34772f419243a4b79efd89e7597c0607c484f0ab1687ab94ff104bb5bad46
|
|
BLAKE2b-256 checksum How to use checksums |
bd993d7cdd29527d644137ff746ed1d48a87f2707b432d739c9d03a078a4165e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for termverify 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.