Co-authored-by: codex <[email protected]> Co-authored-by: JustYannicc <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
23 lines
669 B
TypeScript
23 lines
669 B
TypeScript
/**
|
|
* ProviderHealth - Provider readiness snapshot service.
|
|
*
|
|
* Owns provider health checks (install/auth reachability) and exposes the
|
|
* latest results to transport layers.
|
|
*
|
|
* @module ProviderHealth
|
|
*/
|
|
import type { ServerProviderStatus } from "@t3tools/contracts";
|
|
import { ServiceMap } from "effect";
|
|
import type { Effect } from "effect";
|
|
|
|
export interface ProviderHealthShape {
|
|
/**
|
|
* Read the latest provider health statuses.
|
|
*/
|
|
readonly getStatuses: Effect.Effect<ReadonlyArray<ServerProviderStatus>>;
|
|
}
|
|
|
|
export class ProviderHealth extends ServiceMap.Service<ProviderHealth, ProviderHealthShape>()(
|
|
"t3/provider/Services/ProviderHealth",
|
|
) {}
|