Support for Claude Code#4
Merged
Merged
Conversation
RamAnanth
approved these changes
Sep 3, 2025
sm86
added a commit
that referenced
this pull request
May 24, 2026
Address remaining review findings on the contexto-hermes plugin: - #4: update_from_response() coerces provider token counts defensively (numeric strings like "1.5" handled; non-numeric preserves prior value instead of raising into Hermes' response path). - #6: env-var config is now bounds-checked — max_context_chars >= 1, max_results >= 1, min_score in [0,1], non-finite/NaN rejected; invalid values fall back to defaults with a WARNING. Truncation sites also guard against a non-positive cap so context never collapses to just "…". - #8: installer discovers Hermes' plugins/context_engine when it is a PEP-420 namespace package (origin is None -> submodule_search_locations); directory checks relaxed from __init__.py to is_dir(). - Docs: README documents the fail-closed ingest status counters and clarifies CONTEXTO_MAX_RESULTS (compaction recall) vs the contexto_search tool's own max_results (default 5); CHANGELOG updated. Tests: 209 passed, 3 skipped.
sm86
added a commit
that referenced
this pull request
May 26, 2026
* docs: design spec for Contexto × Hermes context engine plugin Adds the v1 design for a Python context engine plugin that mirrors @ekai/contexto's remote mode for hermes-agent. Lives in the plugins/context_engine/<name>/ slot, uses the standard ContextEngine ABC without core changes, ingests on compact() and exposes a contexto_search tool for between-compaction recall. * feat: add Contexto Hermes plugin Add the contexto-hermes Python package as a Hermes context engine plugin. The implementation is remote-only and uses env-var configuration, a fail-soft httpx backend, compaction-time ingestion/search, and the contexto_search engine tool. Include installer support for Hermes' bundled context_engine slot, plugin metadata, README/changelog, TS-parity fixtures, and unit/smoke tests. Also add Python artifact ignores so local venv/cache/build files stay out of commits. * fix: harden contexto hermes fail-soft paths * fix: surface fail-closed ingest state * fix: add preflight compression fallback * fix: harden config validation, token coercion, and namespace install Address remaining review findings on the contexto-hermes plugin: - #4: update_from_response() coerces provider token counts defensively (numeric strings like "1.5" handled; non-numeric preserves prior value instead of raising into Hermes' response path). - #6: env-var config is now bounds-checked — max_context_chars >= 1, max_results >= 1, min_score in [0,1], non-finite/NaN rejected; invalid values fall back to defaults with a WARNING. Truncation sites also guard against a non-positive cap so context never collapses to just "…". - #8: installer discovers Hermes' plugins/context_engine when it is a PEP-420 namespace package (origin is None -> submodule_search_locations); directory checks relaxed from __init__.py to is_dir(). - Docs: README documents the fail-closed ingest status counters and clarifies CONTEXTO_MAX_RESULTS (compaction recall) vs the contexto_search tool's own max_results (default 5); CHANGELOG updated. Tests: 209 passed, 3 skipped. * docs: tighten contexto-hermes README config/status notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Solution
Testing
The refactor also improves maintainability by separating concerns: adapters handle format conversion, providers handle API communication, and the service layer manages routing logic.