The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(honcho): declare the injection block in config_schema so the desktop panel can pin sessionStart
Erosikac04722102f23
diff --git a/plugins/memory/honcho/config_schema.py b/plugins/memory/honcho/config_schema.pyindex 827732898c9..fdd778d68f5 100644--- a/plugins/memory/honcho/config_schema.py+++ b/plugins/memory/honcho/config_schema.py@@ -105,6 +105,11 @@ CONFIG_SCHEMA = ProviderConfigSchema(default="false", group="Recall"),_field("contextTokens", "Context token cap", KIND_NUMBER, "Cap on auto-injected context tokens. Blank leaves it uncapped.",placeholder="(uncapped)", group="Recall"),+ # The plugin reads `injection` as one object, so the panel edits the whole block rather than a nested key.+ _field("injection", "Session-start injection", KIND_JSON,+ "Pin which base-context sections the first turn injects: summary, peerRepresentation, peerCard, "+ "aiRepresentation, aiCard. Blank injects all of them; an empty list injects nothing.",+ placeholder='{"sessionStart": ["summary", "peerCard"]}', group="Recall"),_field("initOnSessionStart", "Eager init", KIND_BOOL, "Initialize the session eagerly in tools mode instead of on first tool call.",default="false", group="Recall"),# — Limits —diff --git a/tests/honcho_plugin/test_session.py b/tests/honcho_plugin/test_session.pyindex 9e11593907a..5534e24d025 100644--- a/tests/honcho_plugin/test_session.py+++ b/tests/honcho_plugin/test_session.py@@ -1317,6 +1317,22 @@ class TestSessionStartInjection:formatted = _provider_with_raw(raw)._format_first_turn_context(_FULL_CTX)assert [line for line in formatted.splitlines() if line.startswith("## ")] == headings+ @pytest.mark.parametrize("submitted, headings", [+ ('{"sessionStart": ["peerCard"]}', ["## User Peer Card"]),+ ('{"sessionStart": []}', []),+ ("", ["## Session Summary", "## User Representation", "## User Peer Card",+ "## AI Self-Representation", "## AI Identity Card"]),+ ], ids=["pin", "empty-list", "blank-clears-the-pin"])+ def test_desktop_panel_writes_the_pin_the_provider_reads(self, submitted, headings):+ from hermes_cli.web_routers.memory_providers import _apply_field_values+ from plugins.memory.honcho.config_schema import CONFIG_SCHEMA++ host_block = {"injection": {"sessionStart": ["summary"]}}+ _apply_field_values(CONFIG_SCHEMA, {"injection": submitted}, lambda field: host_block)+ raw = {"hosts": {"hermes": host_block}}+ formatted = _provider_with_raw(raw)._format_first_turn_context(_FULL_CTX)+ assert [line for line in formatted.splitlines() if line.startswith("## ")] == headings+def test_non_list_value_is_treated_as_unset(self):raw = {"injection": {"sessionStart": "summary"}}assert _provider_with_raw(raw)._session_start_components is None