Skip to main content

Crate termproof

Crate termproof 

Source
Expand description

TermProof: evidence-first verification for TUI and terminal applications.

§Layout

This crate was merged from three (termproof-core, termproof-terminal, termproof-evidence) before any of them was published, so the shape below is the only one that has ever existed on crates.io.

  • The crate root is what was termproof-core: the recipe model, config, schema, validation, the built-in steps and assertions, planner/runner/execution, store/cache, and the py* compatibility shims that keep this port close to the Python oracle. It is flat rather than under a core module, both because it is the crate’s primary surface and because a module named core shadows the core crate for every path in its scope.
  • terminal is what was termproof-terminal: PTY, tmux and process sessions, plain and attributed screen state, asciicast recording, idle detection and the terminal::SessionBackend implementations.
  • evidence is what was termproof-evidence: screenshot and video rendering, Markdown and JUnit reports, visual baselines, diff and upload.

The two nested modules keep their own re-exports rather than flattening into the root. error is defined by both the root and terminal, so nesting is what keeps crate::error and terminal::error apart; the same nesting keeps crate::result clear of evidence::report, and keeps the reader’s sense of which layer a name comes from.

Original module notes: models, config, schema, registries, planning, orchestration and execution (RUST-004 + RUST-010 + RUST-016); PTY/process ownership, terminal screen, cast recording, idle and session backends (RUST-005/006 + RUST-012 + RUST-016); and the evidence pipeline.

Re-exports§

pub use config::VerifierConfig;
pub use recipe::Assertion;
pub use recipe::CommandSpec as RecipeCommandSpec;
pub use recipe::Recipe;
pub use recipe::Step;
pub use recipe::RECIPE_VERSION;
pub use validation::has_errors;
pub use validation::Severity;
pub use validation::ValidationIssue;
pub use models::Recipe as ModelRecipe;
pub use models::AssertionResult as ModelAssertionResult;
pub use models::CommandSpec as ModelCommandSpec;
pub use models::RunResult as ModelRunResult;
pub use models::StepResult as ModelStepResult;
pub use result::AssertionResult;
pub use result::RunResult;
pub use result::StepResult;
pub use store::atomic_write;
pub use store::atomic_write_text;
pub use store::ensure_within_base;
pub use store::new_run_dir;
pub use store::sanitize_component;
pub use agent::build_agent_prompt;
pub use agent::parse_agent_output;
pub use agent::ParsedAgentOutput;
pub use agent::MAX_AGENT_OUTPUT_BYTES;
pub use agent::MAX_PROMPT_CONTEXT_CHARS;
pub use error::CoreError;
pub use execution::AgentDrivenMode;
pub use execution::ExecutionContext;
pub use execution::ExecutionError;
pub use execution::ExecutionMode;
pub use execution::ExecutionResult;
pub use execution::ScriptedProcessMode;
pub use execution::ScriptedPtyMode;
pub use runner::LoadedRecipe;
pub use runner::Runner;

Modules§

agent
Agent-driven execution: prompt building and bounded JSON parsing.
assertions
The eight built-in assertions (spec 003).
before_after
What changed between two runs of the same suite.
build_info
Provenance for the binary under test.
cache
Run cache — content-addressed by recipe file hash + run options.
config
Typed configuration with cascading precedence and extension preservation.
error
Typed internal errors for the crate root.
evidence
Evidence pipeline: rendering, reports, video, baselines, diff, and cache.
execution
ExecutionContext and ExecutionMode public traits (RUST-016).
models
Canonical data models — Recipe, results, and related types.
parity
Compare two verification runs and report where they disagree.
planner
Parallel planner — deterministic ordering with bounded concurrency.
pypath
pathlib.PurePosixPath’s lexical joining and rendering.
pyregex
Python 3 re dialect for wait_for_regex.
pyrepr
One Python repr formatter, shared by every diagnostic.
pyschema
JSON Schema validation for the json_schema assertion.
recipe
Typed recipe models with flattened extension maps and legacy loading.
result
Canonical result model — mirrors termproof/models.py.
run_config
A run described by a file rather than by a command line.
runner
The concrete ExecutionContext — what actually runs a recipe.
schema
JSON Schema generation for recipes (Draft 2020-12).
selection
Choosing which recipes to run for a set of changed files.
steps
Seven built-in steps with corpus parity, ported to the InMemorySession-style Session trait.
store
Canonical artifact storage.
terminal
Terminal layer: PTY/process ownership, terminal screen, cast recording, idle, and session backends (RUST-005/006 + RUST-012 + RUST-016).
validation
Validation of recipe values before execution.
vocabulary
Screen predicates for asserting on terminal output.

Constants§

NAME
Canonical product name used by the CLI and diagnostics.
VERSION
Canonical crate/product version, inherited from the workspace manifest.

Functions§

banner
Render the canonical name version banner used by the CLI greeting.