Skip to content

v10.0.5

Choose a tag to compare

@RichardHightower RichardHightower released this 27 May 01:47
· 448 commits to main since this release

v10.0.5 — Bug fixes and doctor enhancements

Fixed

  • Graph search with Anthropic summarization now works out of the box. When graphrag.enabled: true and summarization.provider: anthropic, LangExtractExtractor silently produced zero triplets per chunk because Claude model ids (claude-haiku-4-5-…, etc.) are not in langextract's provider registry — the per-chunk WARNING that should have surfaced the failure used logger.warning(..., extra={"error": ...}), which the default formatter does not render. Three layers of fix in agent_brain_server/indexing/graph_extractors.py: (a) when summarization.provider is anthropic / claude and no explicit graphrag.langextract_{provider,model} override is configured, the extractor auto-routes to openai/gpt-4o-mini with a clear INFO log; (b) startup-time validation now calls langextract.providers.router.resolve(model_id) and raises a ConfigurationError naming the YAML keys to set when the resolved model would be rejected; (c) the per-chunk WARNING now interpolates the underlying error text via %s so it shows in any default-formatted log. Also fixed two latent bugs surfaced by the new validation: _resolve_model_id's ollama default (ollama/llama3.1:8b) was always rejected by langextract — switched to the bare llama3.1:8b form; and self.model no longer inherits summarization.model when the caller passed an explicit provider= (the cross-wiring made LangExtractExtractor(provider="ollama") resolve to a Claude model in the wild). langextract_provider and langextract_model are now documented in agent-brain-plugin/skills/configuring-agent-brain/SKILL.md and docs/GRAPHRAG_GUIDE.md. Closes #149.
  • agent-brain jobs <job_id> no longer crashes with TypeError: unsupported format string passed to dict.__format__ when the server returns a structured JobProgress payload (the default since the job-queue rework — progress is a dict with percent_complete, files_processed, files_total, chunks_created, current_file). The CLI assumed a float and used f"{progress:.1f}%" unconditionally on jobs.py:33,34,126,129. _format_progress was rewritten to dispatch on type — extracts percent_complete from the structured dict, falls back to a key=value pretty-print for unknown dicts, keeps the legacy float path, and coerces unknown types to str(...) rather than raising. The detail view (_create_job_detail_panel) now centralizes formatting through the same helper so list view and detail view never diverge. New regression suite in agent-brain-cli/tests/test_jobs_progress.py pins each input shape, including the exact failing payload from the issue. Closes #150.
  • Kuzu graph-store initialization now self-heals when a stale empty kuzu_db/ directory is left over from a v10.0.2 upgrade. Pre-v10.0.4 created kuzu_db/ as a directory; v10.0.4's #144 fix expects either no path or a kuzu single-file database there, so the upgrade path raised RuntimeError: Database path cannot be a directory: …/kuzu_db on the first indexing job. _initialize_kuzu_store in agent_brain_server/storage/graph_store.py now rmdir()s an empty stale dir before opening (only succeeds on empty dirs — safe), and raises a clearer RuntimeError that names the directory + suggests GRAPH_INDEX_PATH if the leftover is non-empty (never silently deletes user data). Two regression tests in tests/integration/test_kuzu_graph_e2e.py pin both paths. Closes #151.

Added

  • agent-brain doctor gained the --fix flag for safe, idempotent, offline remediations: appends .agent-brain/ to .gitignore (creating it if missing) and creates a stub state dir + config.json when the project is uninitialized. The doctor report re-runs after fixing so the printed table reflects the new state. Network calls, API keys, and user code are explicitly off-limits — those still require manual action. Closes part of #146.
  • agent-brain doctor now reports the installed agent-brain-cli version as its own check (catches broken installs at the top of the report instead of letting the user discover them later), and explains which rule selected the project root (.agent-brain/ match, git top-level, .claude/ marker, etc.) on monorepos. When the server is reachable, the server check additionally pulls /health/status and surfaces a one-line indexing summary (state + chunk count). When graphrag.enabled: true, doctor checks that langextract is importable and hints at the [graphrag] extra if not. Closes #146.

Internal

  • resolve_project_root in agent_brain_cli/config.py now has a sibling resolve_project_root_with_strategy() that returns (root, strategy_label) — the strategy is a stable identifier (agent_brain_dir, git_root, pyproject, etc.) for use by agent-brain doctor. The original signature is unchanged and now delegates to the new function.
  • Confirmed via codebase audit that issue #147 (auto-suggest doctor on connection failures) was already implemented end-to-end in v10.0.4: all five commands (status, query, jobs, index, reset) import doctor_hint_message from agent_brain_cli.diagnostics and print it on ConnectionError, and the helper already distinguishes "no runtime.json found" from "server unreachable." Closed with evidence; no code change in this release.

PyPI