Skip to main content

oneharness-sdk

Async Python access to the oneharness engine, generated from and validated against the Rust-owned JSON Schema contracts. The distribution is oneharness-sdk, the import is oneharness_sdk, and every release depends on the exact same oneharness-cli version.

pip install oneharness-sdk
import asyncio

from oneharness_sdk import OneHarness


async def main() -> None:
    oneharness = OneHarness()
    report = await oneharness.run(
        {"prompt": "Summarize this repository", "harnesses": ["codex"]}
    )
    print(report["results"][0]["text"])


asyncio.run(main())

The client covers every verb the CLI exposes, so nothing needs a hand-built command line: run, run_mock, run_stream, list, detect, config, sync, init, usage, gate, mock, interrupt, history, history_list, history_watch, history_clear, and history_migrate. That coverage is gated, not asserted here. run_mock uses the deterministic responder shipped in the CLI; see Testing patterns. run_stream and history_watch are async iterators. Every envelope is validated before it is yielded; closing or cancelling an iterator terminates its subprocess.

An option whose name is a Python keyword takes the conventional trailing underscore — sync({"global_": True}) sends --global — and nothing else about the spelling changes.

async for envelope in oneharness.run_stream(
    {"prompt": "Inspect this repository", "harnesses": ["codex"]}
):
    if envelope["type"] == "event" and envelope["event"]["name"] == "shell":
        break

async for envelope in oneharness.history_watch(
    {"labels": {"graph": "release"}, "after": last_history_id}
):
    print(envelope["record"]["history_id"])

Python input keys are snake case and strict: unknown fields and misspellings fail before the CLI starts. Output dictionaries preserve additive fields from newer compatible CLI versions. history and history_watch raise HistoryNotFoundError when a session, record, or cursor cannot be resolved.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oneharness_sdk-0.7.0.tar.gz (81.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oneharness_sdk-0.7.0-py3-none-any.whl (84.5 kB view details)

Uploaded Python 3

File details

Details for the file oneharness_sdk-0.7.0.tar.gz.

File metadata

  • Download URL: oneharness_sdk-0.7.0.tar.gz
  • Upload date:
  • Size: 81.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for oneharness_sdk-0.7.0.tar.gz
Algorithm Hash digest
SHA256 3b78fb054df6bc8aa1dabc6b9fc0f990debfd79784d9fb7c5ea9a6e46aeb2d34
MD5 d5ddbf6e206723889bbdbecabda6af5f
BLAKE2b-256 f5c59ae6e5376b2a1a98cb4b7bdc860203a97dd0102d3ac3cb25d0a2bbf1d974

See more details on using hashes here.

Provenance

The following attestation bundles were made for oneharness_sdk-0.7.0.tar.gz:

Publisher: release.yml on nickderobertis/oneharness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oneharness_sdk-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: oneharness_sdk-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 84.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for oneharness_sdk-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5d5092a51e431b7c936d71ebb1ade07383a34bb95f395a0a37e2f840b89cace
MD5 44d593e4718293c2a1791c4ab5707dda
BLAKE2b-256 4d6687300ff779f507655a4da0cb12042f9d6880a11b9904963c64d3622722ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for oneharness_sdk-0.7.0-py3-none-any.whl:

Publisher: release.yml on nickderobertis/oneharness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.11.3

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.3

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.2

2 files

0.7.1

2 files

This release

0.7.0 This release

2 files

0.6.16

2 files

0.6.15

2 files

0.6.14

2 files

0.6.13

2 files

0.6.12

2 files

0.6.11

2 files

0.6.10

2 files

0.6.9

2 files

0.6.8

2 files

0.6.7

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.11

2 files

0.5.10

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page