@kynver-app/runtime 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,3 +3,4 @@ export { buildDaemonSupervisionPolicy, defaultSupervisionOwner, formatSupervisio
3
3
  export { applyDaemonSupervisionSetup, defaultSystemdUserUnitPath, isSystemdSupervisionInstalled, supervisionOwnerForDoctor, type DaemonSupervisionSetupResult, } from "./setup.js";
4
4
  export { ensureDaemonSupervisionForStart, formatSystemdDelegationGuidance, shouldDelegateStartToSystemd, summarizeSupervisionForStart, type EnsureDaemonSupervisionInput, type EnsureDaemonSupervisionResult, } from "./start.js";
5
5
  export { assessDaemonSupervisionChecks, type AssessDaemonSupervisionOptions, type DaemonSupervisionVerifyCheck, } from "./verify.js";
6
+ export { assessSupervisionHealth, type SupervisionHealth } from "./supervision-health.js";
@@ -0,0 +1,20 @@
1
+ import type { KynverUserConfig } from "../config.js";
2
+ import type { DaemonSupervisionOwner } from "./policy.js";
3
+ export interface SupervisionHealthOptions {
4
+ envFilePath?: string;
5
+ /** Injectable for tests. */
6
+ systemdUnitActive?: () => boolean;
7
+ }
8
+ export interface SupervisionHealth {
9
+ owner: DaemonSupervisionOwner | null;
10
+ daemonPresentSignal: boolean;
11
+ systemdUnitInstalled: boolean;
12
+ systemdUnitActive: boolean;
13
+ /** True when restart policy is persisted or inferable from a healthy supervised daemon. */
14
+ effectivelyConfigured: boolean;
15
+ }
16
+ /**
17
+ * Infer whether a keeper/systemd-owned daemon is already healthy on this host,
18
+ * so doctor checks avoid stale warnings on upgraded installs.
19
+ */
20
+ export declare function assessSupervisionHealth(config: KynverUserConfig, options?: SupervisionHealthOptions): SupervisionHealth;
@@ -2,6 +2,7 @@ import type { KynverUserConfig } from "../config.js";
2
2
  export interface AssessDaemonSupervisionOptions {
3
3
  /** Override for tests; defaults to ~/.kynver/.env */
4
4
  envFilePath?: string;
5
+ systemdUnitActive?: () => boolean;
5
6
  }
6
7
  export interface DaemonSupervisionVerifyCheck {
7
8
  id: string;
@@ -0,0 +1,16 @@
1
+ import type { CommandProbeResult } from "./runtime-takeover.probes.js";
2
+ export type GitHubReadinessSource = "env" | "gh-cli" | "missing";
3
+ export interface GitHubReadinessProbe {
4
+ envGithubToken?: boolean;
5
+ envGhToken?: boolean;
6
+ ghAuthToken(): CommandProbeResult;
7
+ }
8
+ export interface GitHubReadinessResult {
9
+ viable: boolean;
10
+ source: GitHubReadinessSource;
11
+ summary: string;
12
+ }
13
+ /**
14
+ * Read-only GitHub auth probe for doctor checks. Never prints or persists tokens.
15
+ */
16
+ export declare function probeGitHubReadiness(probe: GitHubReadinessProbe): GitHubReadinessResult;
@@ -0,0 +1,9 @@
1
+ import type { DoctorSection } from "./doctor.types.js";
2
+ import { type GitHubReadinessProbe } from "./github-readiness.js";
3
+ import type { RuntimeTakeoverProbes } from "./runtime-takeover.probes.js";
4
+ /**
5
+ * Optional deploy-evidence checks for merge-gate / PR handoff workflows.
6
+ * Core runtime takeover does not require Vercel CLI or VERCEL_TOKEN when GitHub
7
+ * commit-status evidence is viable.
8
+ */
9
+ export declare function assessDeployEvidence(probes: RuntimeTakeoverProbes, githubProbe: GitHubReadinessProbe): DoctorSection;
@@ -36,5 +36,10 @@ export interface RuntimeTakeoverProbes {
36
36
  legacyOpenclawHarnessRoot(): string;
37
37
  pathExists(target: string): boolean;
38
38
  pathWritable(target: string): boolean;
39
+ ghAuthToken(): CommandProbeResult;
40
+ /** When false, GitHub/Vercel deploy-evidence checks are advisory-only skips. */
41
+ deployEvidenceNeedsGithub?(): boolean;
42
+ /** Injectable systemd active probe for supervision checks. */
43
+ systemdDaemonActive?(): boolean;
39
44
  }
40
45
  export declare const defaultRuntimeTakeoverProbes: RuntimeTakeoverProbes;