The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(gateway): drop blank after dataclass docstrings and section headers in hosted-room modules (AST-neutral)
Teknium4c7847d59bd7
diff --git a/gateway/hosted_room_discussion.py b/gateway/hosted_room_discussion.pyindex d1c14678472..1be91f68663 100644--- a/gateway/hosted_room_discussion.py+++ b/gateway/hosted_room_discussion.py@@ -78,7 +78,6 @@ class DiscussionReconstructionError(DiscussionPolicyError):@dataclass(frozen=True)class DiscussionMember:"""One immutable local or peer member of the hosted room."""-member_id: strprofile: strhandle: str@@ -89,7 +88,6 @@ class DiscussionMember:@dataclass(frozen=True)class DiscussionRoom:"""Validated policy projection of one active hosted room."""-room_id: strname: strmembers: tuple[DiscussionMember, ...]@@ -100,7 +98,6 @@ class DiscussionRoom:@dataclass(frozen=True)class DiscussionTaskPlan:"""One deterministic member turn compatible with the driver schema."""-identity: driver.TaskIdentitypayload: Mapping[str, Any]discussion_event_id: str@@ -113,7 +110,6 @@ class DiscussionTaskPlan:@dataclass(frozen=True)class DiscussionDecision:"""Current result of replaying one room's Discussion policy."""-status: DecisionStatusreason: strdiscussion_event_id: str | None = None@@ -125,7 +121,6 @@ class DiscussionDecision:@dataclass(frozen=True)class EventPlan:"""One idempotent append for :func:`gateway.hosted_rooms.append_event`."""-event_id: strkind: stractor: Mapping[str, str]@@ -141,7 +136,6 @@ class EventPlan:@dataclass(frozen=True)class PublicationPlan:"""Ordered visible and terminal effects for one driver task."""-task_id: strterminal_kind: strevents: tuple[EventPlan, ...]@@ -354,8 +348,6 @@ def _validate_turn_coordinates(payload: Mapping[str, Any], room: DiscussionRoom)# -- per-kind event payload validators (dispatched by _validate_event) ---------# Each takes (kind, payload, actor, room) and returns the payload to record.--def _validate_user_event(kind: str, payload: Payload, actor: Payload, room: DiscussionRoom) -> Payload:payload = validate_user_payload(payload)if actor.get("kind") != "user":diff --git a/gateway/hosted_room_driver.py b/gateway/hosted_room_driver.pyindex 19e4f428abf..b53c85909a6 100644--- a/gateway/hosted_room_driver.py+++ b/gateway/hosted_room_driver.py@@ -166,7 +166,6 @@ def _task_payload(value: Any) -> tuple[dict[str, Any], str, str]:@dataclass(frozen=True)class TaskIdentity:"""Stable identity for one admitted room turn."""-room_id: strtask_id: strthread_id: str@@ -180,7 +179,6 @@ class TaskIdentity:@dataclass(frozen=True)class DriverLease:"""A fenced lease held by one gateway process incarnation."""-room_id: strgateway_id: strauthority_epoch: int@@ -193,7 +191,6 @@ class DriverLease:@dataclass(frozen=True)class TaskAttempt:"""The exact running generation authorized to settle one task."""-identity: TaskIdentitylease: DriverLeaseexecution_generation: intdiff --git a/gateway/hosted_room_execution_policy.py b/gateway/hosted_room_execution_policy.pyindex b12c5bfae48..b425d850ff0 100644--- a/gateway/hosted_room_execution_policy.py+++ b/gateway/hosted_room_execution_policy.py@@ -30,7 +30,6 @@ def _identifier(value: Any, *, field: str) -> str:@dataclass(frozen=True)class RoomExecutionPolicy:"""Immutable target policy applied at the agent and approval boundaries."""-version: inttarget_profile: strenabled_toolsets: tuple[str, ...]diff --git a/gateway/hosted_room_peer.py b/gateway/hosted_room_peer.pyindex d8936ffbdb1..fa3cff0a38e 100644--- a/gateway/hosted_room_peer.py+++ b/gateway/hosted_room_peer.py@@ -194,7 +194,6 @@ _CATALOG_FIELDS = {@dataclass(frozen=True)class GatewayRoomCatalog:"""Authenticated gateway capabilities inherited by its Bots."""-installation_id: strprotocol_versions: tuple[int, ...]link_modes: tuple[LinkMode, ...]@@ -353,7 +352,6 @@ _DISPATCH_FIELDS: dict[str, Callable[..., Any]] = dict(@dataclass(frozen=True)class HostedMemberDispatch:"""Recipient-validated identity for one remote room member attempt."""-protocol_version: introom_id: strhome_install_id: strdiff --git a/gateway/hosted_room_policy_checkpoint.py b/gateway/hosted_room_policy_checkpoint.pyindex 3b6bfcff83c..c72daafa95a 100644--- a/gateway/hosted_room_policy_checkpoint.py+++ b/gateway/hosted_room_policy_checkpoint.py@@ -69,7 +69,6 @@ _TRANSCRIPT_EVENTS_SQL = f"""WITH transcript_events(seq) AS (@dataclass(frozen=True)class PolicySnapshot:"""Bounded active policy input at one durable room-log cursor."""-through_seq: intstopped_through_seq: intevents: tuple[dict[str, Any], ...]@@ -100,7 +99,6 @@ def _settled_message(class HostedRoomPolicyCheckpoint:"""Incrementally index room policy without compacting visible history."""-def __init__(self, db_path: DbPath) -> None:self.db_path = Path(db_path)with self._connect() as conn: