(agent: Agent)
| 17 | } |
| 18 | |
| 19 | async checkHealth(agent: Agent): Promise<AgentHealth> { |
| 20 | const cached = this.healthCache.get(agent.url); |
| 21 | if (cached) return cached; |
| 22 | |
| 23 | const health = await this.performHealthCheck(agent); |
| 24 | this.healthCache.set(agent.url, health); |
| 25 | return health; |
| 26 | } |
| 27 | |
| 28 | private async performHealthCheck(agent: Agent): Promise<AgentHealth> { |
| 29 | const startTime = Date.now(); |
no test coverage detected