Fix StartOS 0.4 TypeScript packaging to match SDK API

This commit is contained in:
MacPro
2026-04-09 15:10:44 -05:00
parent d5046a0daf
commit 0b70cbb2bf
3436 changed files with 867051 additions and 92 deletions
@@ -0,0 +1,46 @@
import { HealthCheckResult } from '../health/checkFns';
import { Ready } from './Daemons';
import { Daemon } from './Daemon';
import { Effects, SDKManifest } from '../../../base/lib/types';
export declare const EXIT_SUCCESS: "EXIT_SUCCESS";
/**
* Wanted a structure that deals with controlling daemons by their health status
* States:
* -- Waiting for dependencies to be success
* -- Running: Daemon is running and the status is in the health
*
*/
export declare class HealthDaemon<Manifest extends SDKManifest> {
readonly daemon: Daemon<Manifest> | null;
readonly dependencies: HealthDaemon<Manifest>[];
readonly id: string;
readonly ready: Ready | typeof EXIT_SUCCESS;
readonly effects: Effects;
private _health;
private healthWatchers;
private running;
private started?;
private resolveReady;
private resolvedReady;
private readyPromise;
private session;
constructor(daemon: Daemon<Manifest> | null, dependencies: HealthDaemon<Manifest>[], id: string, ready: Ready | typeof EXIT_SUCCESS, effects: Effects);
/** Run after we want to do cleanup */
term(termOptions?: {
signal?: NodeJS.Signals | undefined;
timeout?: number | undefined;
destroySubcontainer?: boolean;
}): Promise<void>;
/** Want to add another notifier that the health might have changed */
addWatcher(watcher: () => unknown): void;
get health(): Readonly<HealthCheckResult>;
private changeRunning;
private stopSession;
private resetReady;
private startSession;
private runHealthCheckLoop;
onReady(): Promise<void>;
get isReady(): boolean;
private setHealth;
updateStatus(): Promise<void>;
}