33 lines
1023 B
TypeScript
33 lines
1023 B
TypeScript
export interface FactoryStatus {
|
|
status?: string;
|
|
phase?: number;
|
|
containers?: number;
|
|
agents?: number;
|
|
infra?: number;
|
|
monitoring?: number;
|
|
skills?: number;
|
|
}
|
|
|
|
export interface DeployHealth {
|
|
status?: string;
|
|
service?: string;
|
|
phase?: number;
|
|
}
|
|
|
|
export function formatFactoryCheck(factory: FactoryStatus, deploy: DeployHealth): string {
|
|
return [
|
|
"",
|
|
" Factory Check",
|
|
" ─────────────────────────────",
|
|
` Factory: ${factory.status ?? "unknown"}`,
|
|
` Phase: ${factory.phase ?? "unknown"}`,
|
|
` Containers: ${factory.containers ?? "unknown"}`,
|
|
` Agents: ${factory.agents ?? "unknown"}`,
|
|
` Infra: ${factory.infra ?? "unknown"}`,
|
|
` Monitoring: ${factory.monitoring ?? "unknown"}`,
|
|
` Skills: ${factory.skills ?? "unknown"}`,
|
|
` Deploy webhook: ${deploy.status ?? "unknown"}${deploy.service ? ` (${deploy.service})` : ""}`,
|
|
"",
|
|
].join("\n");
|
|
}
|