Cotal TypeScript packages
    Preparing search index...

    Function agentAuthState

    • A live managed agent's health, as ps should render it. Absence/malformation is AMBIGUOUS, not healthy (the preflight writes the first ok record before launch, so a live agent always has one — a missing file means someone removed it or the record never landed): auth-unknown. A record past staleMs on a live agent means refreshes stopped happening at all (the refresh cadence is a few minutes): auth-stale. Never silent-healthy.

      Parameters

      • path: string
      • staleMs: number = ...

      Returns {
          reason?: string;
          state: "ok" | "auth-renewal-failed" | "auth-unknown" | "auth-stale";
      }