feat(core,backends,frontends,storage): conversations, inject queue, session pool, gateway mcp tools, api frontend

This commit is contained in:
hh
2026-08-28 03:08:30 +02:00
parent 50b7057fa4
commit 33ccc78fec
28 changed files with 3543 additions and 345 deletions
+16 -4
View File
@@ -42,15 +42,27 @@ class ClaudeOptions(BaseModel):
"""Extra inherited variable names to let through the env whitelist."""
max_turns: int | None = None
idle_session_ttl: float = 1800.0
"""Seconds a live session may sit unused before it is closed."""
session_store_flush: str = "batched"
session_store_flush: str = "eager"
"""``eager`` mirrors every transcript frame as it lands, so a gateway
killed mid-turn loses at most the frame in flight."""
class ClaudeAgent(BaseAgent):
cwd: Path
system_prompt: str = ""
prompt_sources: tuple[PromptSource, ...] = ()
prompt_sources_by_kind: Mapping[str, tuple[PromptSource, ...]] = Field(
default_factory=dict
)
"""Per conversation kind (``master``/``branch``/``deep``/``job``/``fork``)
assembly; falls back to ``prompt_sources``. Constant per kind (§3.12)."""
skill_sets: tuple[Path, ...] = ()
gateway_tools: tuple[str, ...] = ()
"""Gateway tools exposed in-process (``read_conversation``, ``spawn``,
``say``, ``schedule``, ``inject``); empty = no gateway MCP server."""
options: ClaudeOptions = Field(default_factory=ClaudeOptions)
def prompt_for(self, kind: str) -> tuple[PromptSource, ...]:
return self.prompt_sources_by_kind.get(kind, self.prompt_sources)