Skip to main content

Crate harness_lock_core

Crate harness_lock_core 

Source
Expand description

Core library for harness-lock (hlock).

Implements the manifest, the lockfile, the content-addressed store, task packs, the deterministic reference provider/harness, the search layer, and the resolver — the same v0.1 surface as the (now reference) Python implementation, in Rust. The [flyte] backend and the PyO3 Python bindings live in sibling crates.

The Python-facing API mirrors resolve and the lockfile model so the user surface stays stable across the language boundary.

Re-exports§

pub use adapters::HarnessAdapter;
pub use error::Error;
pub use error::Result;
pub use hash::content_hash;
pub use hash::sha256_hex;
pub use hash::sha256_text;
pub use lockfile::Lockfile;
pub use manifest::find_manifest;
pub use manifest::Manifest;
pub use profiles::Registry;
pub use resolver::Resolver;
pub use store::Store;
pub use worker::Backend;

Modules§

adapters
Harness adapters — a baseline (reference) adapter for the local loop.
agent
The built-in agent: a small tool-calling loop that ships inside hlock, so the meta harness works with no install (specs/meta-harness.md).
capture
hlock pin: capture the live setup of one harness into a pinned harness.lock (SPEC §7.8.4).
contract
The execution contract for code harnesses (SPEC §7.8.3): how hlock runs a framework agent or a custom script declared under [harnesses.<id>].
error
Errors.
hash
Content hashing helpers.
launch
hlock launch: start a harness session that matches a lock (SPEC §7.8.6).
localize
hlock localize: the best all-local equivalent of a lock (SPEC §7.8.7).
lockfile
The lockfile: harness.lock.
manifest
The manifest: harness.toml.
meta
hlock meta: the locked agent hlock uses for its own judgment work (specs/meta-harness.md).
ops
Operational commands built on the resolver: hlock upgrade (§5.8) and hlock tune (§5.9, §8.5).
profiles
Harness and runtime profiles: declarative descriptions of agent harnesses (Claude Code, Codex, Pi, OpenCode, …) and local inference runtimes (Ollama, LM Studio, vLLM, …).
providers
LLM providers — a thin abstraction with a deterministic reference provider.
resolver
The resolver: turns a manifest into an harness.lock.
search
The search layer: stacks, trials, aggregation, Pareto front, selection.
store
Content-addressed blob store.
sync
hlock sync: rehydrate a locked harness setup (SPEC §7.8.5).
tasks
Eval packs: the tasks a stack is measured against.
worker
Bridge from the Rust core to the Python worker (harness_lock.tasks.worker).

Constants§

LOCKFILE_PATH
Default output filename for the lockfile.
LOCK_VERSION
Schema version of the harness.lock lockfile.
MANIFEST_PATH
Default manifest filename.