feat(envelope,conversations): recall hook under the user text, user_sink for the setup's reply log

This commit is contained in:
hh
2026-09-01 16:08:53 +02:00
parent 63014a487d
commit acc79c2e42
5 changed files with 170 additions and 13 deletions
+9 -2
View File
@@ -13,11 +13,12 @@ from dataclasses import dataclass, field
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Iterable, Iterator
from collections.abc import Awaitable, Callable, Iterable, Iterator
from beaver_gateway.agents.base import BaseAgent
from beaver_gateway.core.conversations import ConversationTexts
from beaver_gateway.core.conversations import ConversationTexts, UserSaid
from beaver_gateway.core.distill import Distiller
from beaver_gateway.core.envelope import RecallContext
from beaver_gateway.core.rotation import RotationPolicy
from beaver_gateway.core.scheduler import Budget, Job
from beaver_gateway.core.watch import VaultWatch
@@ -94,6 +95,12 @@ class Gateway:
"""When a master is rotated (§4.5); ``None`` keeps the defaults."""
watch: VaultWatch | None = None
"""Vault watcher feeding the envelope (§3.5, §4.6); ``None`` = no vault block."""
recall: Callable[[RecallContext], str | None] | None = None
"""Envelope lookup on the user's text: pointers into the vault (cards,
the agent's notes, due dates) the gateway knows no paths for (§3.3)."""
user_sink: Callable[[UserSaid], Awaitable[None] | None] | None = None
"""Sees every user message as it enters a master or branch turn - the
setup's own grep-able log of what the user said, outside the transcript."""
budget: Budget | None = None
"""Subscription window past which non-critical jobs wait (§4.5)."""
distiller: Distiller | None = None