Framework-hardening release. The agent runtime is more robust under streaming interruptions, hung tools, and corrupt state, and the package is friendlier to import and embed. No breaking changes — existing databases upgrade automatically.
Added
- Per-tool execution timeout —
Agent(tool_timeout=...)/daemon.tool_timeout(default 60s). A hung tool becomes a tool-error fed back to the model instead of stalling the cycle.0disables it. - Install extras —
hive-agent[anthropic],[openai],[mcp],[cli]. SDKs still ship in core deps; a missing one raises a clearMissingDependencyErrornaming the extra. - Context managers + lazy init on
Hive—with Hive() as h:/async with Hive() as h:, andHive(path).spawn(...)scaffolds.hive/lazily soinit()is optional.ensure_hive_dirs()exported. StructuredParseErrorandMissingDependencyErrortyped exceptions.
Changed
- Streaming falls back instead of failing — a stream ending without a terminal DONE event (or erroring mid-stream) keeps the text already shown or falls back to a retried non-streaming call; the stream is closed on cancellation.
StructuredTaskResult.parsedis nowT | None— failed structured runs returnparsed=Noneinstead of an unvalidated object.- Provider error detection is structured-first for unsupported
response_format/json_schema.
Fixed
- Previously-silent failures surfaced — memory recall, corrupt suffering/persona restore, and plugin-init failures now log with context; corrupt suffering snapshots fall back to a fresh state.
- Robust structured-output parsing — a brace-matching scanner replaces the naive first-
{/last-}slice. - One active generated goal per agent — the existence loop re-checks before saving (subgoals/delegation still create multiple by design).
- Malformed tool-call arguments are logged instead of silently dropped.
- Budget: the
run_oncewrap-up generation is now budget-checked; a hard budget can overshoot by at most one generation (documented).
Full changelog: https://github.com/chiruu12/Hive/blob/main/CHANGELOG.md