Skip to content

CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.

fix(hitl): add return type annotation to Agent.in_flight_hitl_request

xf gong4f735cdf5806
diff --git a/cubepi/agent/agent.py b/cubepi/agent/agent.py
index eee5804..04a3906 100644
--- a/cubepi/agent/agent.py
+++ b/cubepi/agent/agent.py
@@ -6,7 +6,7 @@ from dataclasses import dataclass, field
from typing import Any, Callable, Generic, TypeVar
from cubepi.agent.loop import run_agent_loop, run_agent_loop_continue
-from cubepi.hitl import HitlError
+from cubepi.hitl import HitlError, HitlRequest
from cubepi.hitl.channel import HitlChannel
from cubepi.middleware.base import Middleware, compose_middleware
from cubepi.agent.types import (
@@ -194,7 +194,7 @@ class Agent(Generic[TMessage]):
return self._channel
@property
- def in_flight_hitl_request(self):
+ def in_flight_hitl_request(self) -> HitlRequest | None:
if self._channel is None:
raise HitlError("agent has no channel bound; pass channel= to Agent()")
return self._channel.pending