MCPcopy
hub / github.com/abhi1693/openclaw-mission-control / _agent

Function _agent

backend/tests/test_lifecycle_reconcile_state.py:18–33  ·  view source on GitHub ↗
(*, last_seen_offset_s: int | None, last_wake_offset_s: int | None)

Source from the content-addressed store, hash-verified

16
17
18def _agent(*, last_seen_offset_s: int | None, last_wake_offset_s: int | None) -> Agent:
19 now = utcnow()
20 return Agent(
21 name="reconcile-test",
22 gateway_id=uuid4(),
23 last_seen_at=(
24 (now + timedelta(seconds=last_seen_offset_s))
25 if last_seen_offset_s is not None
26 else None
27 ),
28 last_wake_sent_at=(
29 (now + timedelta(seconds=last_wake_offset_s))
30 if last_wake_offset_s is not None
31 else None
32 ),
33 )
34
35
36def test_checked_in_since_wake_when_last_seen_after_wake() -> None:

Calls 2

utcnowFunction · 0.90
AgentClass · 0.90

Tested by

no test coverage detected