Repository navigation
Harnessed 0.5.0
Harnessed 0.5.0 adds tool metadata, action-chain boundaries, reserved final-step summaries and correlated compaction/model activity. Python 3.12–3.14; MIT licensed.
Highlights
- Attach typed, process-local metadata to tools and inspect the captured
ToolInfoin policy, execution and result-review hooks, including schema-defined external tools. - End the remaining action chain with
ToolChain.STOP_AFTERorToolResult(..., break_chain=True). Unstarted calls receiveToolStatus.SKIPPED; already-started parallel work finishes normally, and durable break signals survive recovery. - Inspect effective step progress in
PreStep. Opt in toAgentLoop(final_step=FinalStepPolicy.SUMMARIZE)to reserve the final available step for a text summary within the configured limit. The summary cannot execute tools and remains an incomplete result. - Observe correlated compaction start/finish events with applied, discarded, failed and cancelled outcomes. Stream model requests, failures and typed retry activity, keeping provider attempts, context recovery and output correction separate. Hidden SDK retry counts remain unknown.
- Use the expanded event reference and basic-stream example for delivery, correlation and completion contracts.
The changelog includes client integration recipes with complete public imports, metadata/hooks, approval-aware chain boundaries, structured/summary results and stream handling. It also documents wire tags, retry correlation, cancellation and restoration.
Upgrade from 0.4.0
- Supply the effective keyword-only
max_steps=when constructingPreStepmanually. - Extend exhaustive event handlers for compaction/model activity and tool-result handlers for
ToolStatus.SKIPPEDandbreak_chain. A finished model request or attempt does not itself finish the turn. Preserve unknown retry counters asNone. - Session records remain format version 2; no migration is required from 0.4.0. Update strict application schemas for the new defaulted fields on model requests, turn starts and tool results. Older readers may reject 0.5.0 records. Back up persisted sessions before upgrading.
- Metadata, chain boundaries and final summaries are opt-in. A reserved summary returns
StopReason.MAX_STEPSwithcompleted=False; foroutput=Truns, use.textbecause.outputraisesOutputUnavailable.
Read the complete changelog and migration guide and release notes.
Install
uv add "harnessed[openai]==0.5.0"Other optional extras are anthropic, google, skills, mcp and otel.
Validation and artifacts
Local validation passed with all extras: 1,076 tests passed and two platform-specific tests were skipped, along with Ruff, ty, pre-commit, strict documentation and package metadata checks, and isolated wheel installation.
The Release dry run passed for final commit 5d94d00 across Linux, Windows and macOS with Python 3.12–3.14 and verified both distribution artifacts. Provider tests use SDK mocks and do not validate live API availability.
After the Release workflow successfully publishes to PyPI through Trusted Publishing with attestations, it attaches the exact verified wheel, source archive and SHA256SUMS to this release.
Full changelog: v0.4.0…v0.5.0