feat(delegation): persist background completions

This commit is contained in:
teknium1 2026-07-09 18:56:14 -07:00 committed by Teknium
parent 94a7705bdd
commit 67f4e1b4a9
6 changed files with 366 additions and 301 deletions

6
cli.py
View file

@ -15190,6 +15190,9 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin):
_drain_sk = get_current_session_key(default="")
for _evt, _synth in process_registry.drain_notifications(session_key=_drain_sk):
self._pending_input.put(_synth)
if _evt.get("type") == "async_delegation":
from tools.async_delegation import mark_completion_delivered
mark_completion_delivered(str(_evt.get("delegation_id") or ""))
except Exception:
pass
continue
@ -15352,6 +15355,9 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin):
from tools.process_registry import process_registry
for _evt, _synth in process_registry.drain_notifications():
self._pending_input.put(_synth)
if _evt.get("type") == "async_delegation":
from tools.async_delegation import mark_completion_delivered
mark_completion_delivered(str(_evt.get("delegation_id") or ""))
except Exception:
pass # Non-fatal — don't break the main loop