Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.14.2
3.14.8
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "batrachian-toad"
version = "0.6.20"
description = "A unified experience for AI in your terminal."
readme = "README.md"
requires-python = ">=3.14"
requires-python = ">=3.14.8,<3.15"
dependencies = [
"textual[syntax]==8.2.8",
"click==8.4.0",
Expand Down
8 changes: 4 additions & 4 deletions src/toad/response_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
from typing import TYPE_CHECKING

from agent_comms.declared_family import DeclaredFamily
from agent_comms.routing import MessageRoute
from agent_comms.routing import MessageRoute, NoMessageRoute

if TYPE_CHECKING:
from agent_comms.ui_model.message_category import MessageCategory


class ResponseDelivery(DeclaredFamily, affix="Response"):
@classmethod
def from_route(cls, route: MessageRoute | None) -> ResponseDelivery:
"""Decode the optional routing annotation at the ACP/transcript boundary."""
return UnroutedResponse() if route is None else RoutedResponse(route)
def from_route(cls, route: MessageRoute | NoMessageRoute) -> ResponseDelivery:
"""Derive response delivery from the route's declared presence."""
return next(map(RoutedResponse, route.present()), UnroutedResponse())

@property
@abstractmethod
Expand Down
4 changes: 2 additions & 2 deletions tests/support/journals.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import json
from datetime import UTC, datetime
from pathlib import Path
from uuid import uuid4
from agent_comms.native_session_reopen import PiSessionId


def message_entry(role: str, text: str, *, id: str, parent: str | None = None) -> dict:
Expand Down Expand Up @@ -42,7 +42,7 @@ def write_journal(path: Path, *entries: dict) -> Path:
decoded = NativeEntry.read(json.dumps(entry).encode())
if isinstance(decoded, MessageEntry) and isinstance(decoded.message, UnknownMessage):
raise ValueError(f"Core does not read this journal line as a known message: {entry}")
header = SessionEntry(id=uuid4().hex, version=3, cwd=ReportedText(str(path.parent)),
header = SessionEntry(id=PiSessionId.fresh(), version=3, cwd=ReportedText(str(path.parent)),
timestamp=RecordedTimestamp.written(datetime.now(UTC)))
path.write_text(json.dumps(header.to_wire()) + "\n"
+ "".join(json.dumps(entry) + "\n" for entry in entries))
Expand Down
Loading
Loading