mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
chore(honcho): drop docs from PR scope, scrub commentary
- Revert website/docs and SKILL.md changes; docs unification handled separately - Scrub commit/PR refs and process narration from code comments and test docstrings (no behavior change)
This commit is contained in:
parent
78586ce036
commit
5f9907c116
7 changed files with 33 additions and 55 deletions
|
|
@ -393,13 +393,10 @@ class HonchoMemoryProvider(MemoryProvider):
|
|||
logger.debug("Honcho memory file migration skipped: %s", e)
|
||||
|
||||
# ----- B7: Pre-warming at init -----
|
||||
# Context prewarm: warms peer.context() cache (base layer), consumed
|
||||
# via pop_context_result() in prefetch().
|
||||
# Dialectic prewarm: fires a depth-aware cycle against the plugin's
|
||||
# own _prefetch_result so turn 1 can consume it directly. Without this
|
||||
# the first-turn sync path pays for a duplicate .chat() — and at
|
||||
# depth>1 a single-pass session-start dialectic often returns weak
|
||||
# output that multi-pass audit/reconciliation is meant to catch.
|
||||
# Context prewarm warms peer.context() (base layer), consumed via
|
||||
# pop_context_result() in prefetch(). Dialectic prewarm runs the
|
||||
# full configured depth and writes into _prefetch_result so turn 1
|
||||
# consumes the result directly.
|
||||
if self._recall_mode in ("context", "hybrid"):
|
||||
try:
|
||||
self._manager.prefetch_context(self._session_key)
|
||||
|
|
@ -555,8 +552,7 @@ class HonchoMemoryProvider(MemoryProvider):
|
|||
if self._injection_frequency == "first-turn" and self._turn_count > 1:
|
||||
return ""
|
||||
|
||||
# Skip trivial prompts — "ok", "yes", slash commands carry no semantic signal,
|
||||
# so injecting user context there just burns tokens and can derail the reply.
|
||||
# Trivial prompts ("ok", "yes", slash commands) carry no semantic signal.
|
||||
if self._is_trivial_prompt(query):
|
||||
return ""
|
||||
|
||||
|
|
@ -619,8 +615,8 @@ class HonchoMemoryProvider(MemoryProvider):
|
|||
if r and r.strip():
|
||||
with self._prefetch_lock:
|
||||
self._prefetch_result = r
|
||||
# Only advance cadence on a non-empty result so failures
|
||||
# don't burn a 3-turn cooldown on nothing.
|
||||
# Advance cadence only on a non-empty result so the next
|
||||
# turn retries when the call returned nothing.
|
||||
self._last_dialectic_turn = _fired_at
|
||||
|
||||
self._prefetch_thread = threading.Thread(
|
||||
|
|
@ -711,9 +707,8 @@ class HonchoMemoryProvider(MemoryProvider):
|
|||
self._dialectic_cadence, self._turn_count - self._last_dialectic_turn)
|
||||
return
|
||||
|
||||
# Advance cadence only on a non-empty result — otherwise a silent failure
|
||||
# (empty dialectic, transient API error) would burn the full cadence window
|
||||
# before the next retry, making it look like dialectic "never fires again".
|
||||
# Cadence advances only on a non-empty result so empty returns
|
||||
# (transient API error, sparse representation) retry next turn.
|
||||
_fired_at = self._turn_count
|
||||
|
||||
def _run():
|
||||
|
|
@ -751,9 +746,7 @@ class HonchoMemoryProvider(MemoryProvider):
|
|||
|
||||
_LEVEL_ORDER = ("minimal", "low", "medium", "high", "max")
|
||||
|
||||
# Reasoning-level heuristic thresholds (restored from pre-9a0ab34c behavior).
|
||||
# Promoted to class constants so tests can override without widening the
|
||||
# config surface. Bump to config fields only if real use shows they're needed.
|
||||
# Char-count thresholds for the query-length reasoning heuristic.
|
||||
_HEURISTIC_LENGTH_MEDIUM = 120
|
||||
_HEURISTIC_LENGTH_HIGH = 400
|
||||
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ def cmd_setup(args) -> None:
|
|||
current_dialectic = str(hermes_host.get("dialecticCadence") or cfg.get("dialecticCadence") or "1")
|
||||
print("\n Dialectic cadence:")
|
||||
print(" How often Honcho rebuilds its user model (LLM call on Honcho backend).")
|
||||
print(" 1 = every turn (default), 3+ = sparse (cost-saving).")
|
||||
print(" 1 = every turn (default), 3+ = sparse.")
|
||||
new_dialectic = _prompt("Dialectic cadence", default=current_dialectic)
|
||||
try:
|
||||
val = int(new_dialectic)
|
||||
|
|
|
|||
|
|
@ -251,13 +251,11 @@ class HonchoClientConfig:
|
|||
# matching dialectic_depth length. When None, uses proportional defaults
|
||||
# derived from dialectic_reasoning_level.
|
||||
dialectic_depth_levels: list[str] | None = None
|
||||
# Reasoning-level heuristic for auto-injected dialectic calls. When true,
|
||||
# scales the base level up on longer queries (restored from pre-#10619
|
||||
# behavior; see plugins/memory/honcho/__init__.py for thresholds).
|
||||
# Never auto-selects a level above reasoning_level_cap.
|
||||
# When true, the auto-injected dialectic scales reasoning level up on
|
||||
# longer queries. See HonchoMemoryProvider for thresholds.
|
||||
reasoning_heuristic: bool = True
|
||||
# Ceiling for heuristic-selected reasoning level. "max" is reserved for
|
||||
# explicit tool-path selection; default "high" matches the old behavior.
|
||||
# Ceiling for the heuristic-selected reasoning level. "max" is reserved
|
||||
# for explicit tool-path selection.
|
||||
reasoning_level_cap: str = "high"
|
||||
# Honcho API limits — configurable for self-hosted instances
|
||||
# Max chars per message sent via add_messages() (Honcho cloud: 25000)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue