Conversation
|
CI follow-up: all required checks are green, including Python tests, lints, attribution, uv lock, supply-chain scan, and amd64 Docker build. The only red check is optional |
|
Updated the Agent PR.
Validation run on python -m pytest tests/test_post_llm_call_hook_metadata.py tests/agent/test_turn_finalizer_interrupt_alternation.py tests/agent/test_turn_finalizer_cleanup_guard.py -q -o addopts=
python -m ruff check agent/turn_finalizer.py tests/test_post_llm_call_hook_metadata.py
python -m py_compile agent/turn_finalizer.py tests/test_post_llm_call_hook_metadata.py
git diff --checkResult: 13 passed, ruff passed, py_compile passed, diff check passed. |
84c258d to
353e1f9
Compare
|
Refreshed this against current Relevance check:
Refresh work:
@teknium1 this should be ready for another look. |
|
Thanks for the focused host-contract fix. The premise is verified on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
353e1f9 to
00735d3
Compare
00735d3 to
e5c16a5
Compare
|
@teknium1 addressed this in The optional I also tightened the context-engine field while validating the contract: hooks now receive only Local exact-tree validation is green:
Exact-head CI currently has one unrelated failure: |
Refresh status — 2026-07-15
Rebased onto current
main(569b912d7d0931c7256e9f5fb326609e9deda377). Current head:e5c16a5ac84a44802a4e44909b1034fcd14e5494.The original gap still exists on current
main:post_llm_callreceives the generic turn/session fields but not the gateway lane metadata already retained on the agent. This refresh also documents the extended hook contract and avoids exposing the live context-engine/compressor object to observer plugins.Exact-head local validation:
172 passed.python3 -m ruff check agent/turn_finalizer.py tests/test_post_llm_call_hook_metadata.py— passed.python3 -m py_compile agent/turn_finalizer.py tests/test_post_llm_call_hook_metadata.py— passed.git diff --check origin/main...HEAD— passed.cd website && npm run build— passed; generated all locales. Existing site-wide broken-anchor warnings remain unrelated.tests/agent/test_codex_responses_adapter.py, tracked and fixed in test(codex): pin codex_backend issuer in xai-scoped salvage test #64844.What does this PR do?
Extends the existing
post_llm_callplugin hook with optional, generic metadata:context_enginename (for examplelcm), never the live compressor objectconversation_id/gateway_session_keyThis closes a host-contract gap for plugins that persist completed turns by lane. The same payload works for Discord channels, Discord threads/forum topics, Telegram DMs, and other gateway conversations, while CLI/non-gateway sessions receive empty strings for unavailable gateway fields.
The change is intentionally small and generic. It does not add a core tool, vendor a plugin, change prompt construction, or rebuild tools/system prompts mid-conversation.
Related Issue
No issue number.
Duplicate searches for existing
post_llm_callcontext-engine/lane-metadata work returned no matching implementation before this refresh.Type of Change
Changes Made
agent/turn_finalizer.pycontext_engine,conversation_id,gateway_session_key,sender_id,chat_id,chat_name,chat_type, andthread_idto successfulpost_llm_callpayloads.tests/test_post_llm_call_hook_metadata.pyHow to Test
python3 -m pytest \ tests/test_post_llm_call_hook_metadata.py \ tests/agent/test_turn_finalizer_interrupt_alternation.py \ tests/agent/test_turn_finalizer_cleanup_guard.py \ tests/agent/test_context_engine_host_contract.py \ tests/agent/test_context_engine.py \ tests/run_agent/test_plugin_context_engine_init.py \ tests/run_agent/test_commit_memory_session_context_engine.py \ tests/plugins/test_nemo_relay_plugin.py \ tests/hermes_cli/test_plugins.py::TestPluginHooks::test_hook_none_returns_excluded \ tests/test_model_tools.py \ tests/gateway/test_pii_redaction.py \ tests/gateway/test_pre_gateway_dispatch.py \ -q -o addopts= python3 -m ruff check agent/turn_finalizer.py tests/test_post_llm_call_hook_metadata.py python3 -m py_compile agent/turn_finalizer.py tests/test_post_llm_call_hook_metadata.py git diff --check origin/main...HEAD cd website npm run buildLocal result:
172 passed; lint, compile, diff check, and documentation build passed.The full
tests/hermes_cli/test_plugins.pyfile also discovers the locally installed Noisegate entrypoint and therefore has two exact-count failures in this environment. The same two failures reproduce unchanged onorigin/main; the scoped hook test from that file passes and the PR does not modify plugin discovery.Tested on Linux
7.0.0-27-generic, Python3.11.15.Scope ledger
tests/agent/test_codex_responses_adapter.py::test_normalize_codex_response_salvage_is_xai_scopedfails unchanged on clean base569b912d7d0931c7256e9f5fb326609e9deda377. This PR does not touch the adapter or test. Existing fix: test(codex): pin codex_backend issuer in xai-scoped salvage test #64844. No patch or duplicate issue added here.Checklist
Code
pytest tests/ -qlocally and all tests pass7.0.0-27-generic, Python3.11.15Documentation & Housekeeping
cli-config.yaml.exampleis unchanged; no config keys were addedCONTRIBUTING.md/AGENTS.mdare unchanged; no architecture or workflow contract changedFor New Skills
N/A.
Screenshots / Logs
Companion LCM plugin PR: stephenschoettler/hermes-lcm#292
The LCM-side implementation owns storage/filtering and active-engine resolution; this PR only exposes the generic, safe host metadata contract.