Skip to content

Commit 03d69b2

Browse files
committed
fix(types): add _telemetry_timestamp to Agent contract to resolve typecheck in agent_store.test
1 parent 9e15730 commit 03d69b2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/contracts/agent/domain.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export interface Agent {
5959
reasoning_depth?: number;
6060
workspace_path?: string;
6161
_local_timestamp?: number;
62+
_telemetry_timestamp?: number;
6263
active_mission?: {
6364
id: string;
6465
objective?: string;

src/stores/agent_store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const use_agent_store = <T = Agent_Store_State>(
4343
const agents = raw_agents.map(agent => {
4444
const live = telemetry.live_status[agent.id];
4545
if (live) {
46-
const is_local_newer = (agent._local_timestamp || 0) >= ((live as { _telemetry_timestamp?: number })._telemetry_timestamp || 0);
46+
const is_local_newer = (agent._local_timestamp || 0) >= (live._telemetry_timestamp || 0);
4747
if (is_local_newer) {
4848
return {
4949
...live,

0 commit comments

Comments
 (0)