Typed async Python SDK for oneharness
Project description
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 complete client surface is run, run_stream, list, detect, history, history_list, and history_watch. run_stream and history_watch are async iterators. Every envelope is validated before it is yielded; closing or cancelling an iterator terminates its subprocess.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oneharness_sdk-0.4.0.tar.gz.
File metadata
- Download URL: oneharness_sdk-0.4.0.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d5673c7328fa0d1382d2b7398e1ae3bfe2e4dee8d53737f0059152339960e22
|
|
| MD5 |
e5ef2bbf9f68f125c8b99766b50c9a9c
|
|
| BLAKE2b-256 |
b46c702f99d7b64321aa89b81b8fb625a1178df5bc80529d7ae37e1caaab33a0
|
Provenance
The following attestation bundles were made for oneharness_sdk-0.4.0.tar.gz:
Publisher:
release.yml on nickderobertis/oneharness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oneharness_sdk-0.4.0.tar.gz -
Subject digest:
3d5673c7328fa0d1382d2b7398e1ae3bfe2e4dee8d53737f0059152339960e22 - Sigstore transparency entry: 2188207771
- Sigstore integration time:
-
Permalink:
nickderobertis/oneharness@3bebaadfb396a685b0198e97e838b946603b8314 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/nickderobertis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3bebaadfb396a685b0198e97e838b946603b8314 -
Trigger Event:
release
-
Statement type:
File details
Details for the file oneharness_sdk-0.4.0-py3-none-any.whl.
File metadata
- Download URL: oneharness_sdk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ea2104726be77be6e409fb06e2cb2a2ba0bbe7304202fb6540d549d8f93d769
|
|
| MD5 |
05a59838eed137ac7cc2b50430cfbe47
|
|
| BLAKE2b-256 |
a3defdf780e55d7f694b25aae6b29f30fe961a48eff9847734d71377e8041dcd
|
Provenance
The following attestation bundles were made for oneharness_sdk-0.4.0-py3-none-any.whl:
Publisher:
release.yml on nickderobertis/oneharness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oneharness_sdk-0.4.0-py3-none-any.whl -
Subject digest:
1ea2104726be77be6e409fb06e2cb2a2ba0bbe7304202fb6540d549d8f93d769 - Sigstore transparency entry: 2188207781
- Sigstore integration time:
-
Permalink:
nickderobertis/oneharness@3bebaadfb396a685b0198e97e838b946603b8314 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/nickderobertis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3bebaadfb396a685b0198e97e838b946603b8314 -
Trigger Event:
release
-
Statement type: