import type { OrgXClient } from "../api.js"; import type { OnboardingState, OrgSnapshot } from "../types.js"; import type { ResolvedConfig } from "../config/resolution.js"; type DoctorCheckStatus = "pass" | "warn" | "fail"; type ReplayStatus = "idle" | "running" | "success" | "error"; interface DoctorCheck { id: string; status: DoctorCheckStatus; message: string; } export interface HealthReport { ok: boolean; status: "ok" | "degraded" | "error"; generatedAt: string; checks: DoctorCheck[]; plugin: { version: string; installationId: string; enabled: boolean; dashboardEnabled: boolean; baseUrl: string; }; auth: { hasApiKey: boolean; keySource: ResolvedConfig["apiKeySource"]; userIdConfigured: boolean; onboardingStatus: OnboardingState["status"]; }; sync: { serviceRunning: boolean; inFlight: boolean; backgroundInFlight: boolean; lastSnapshotAt: string | null; lastBackgroundSyncAt: string | null; lastBackgroundSyncError: string | null; }; outbox: { pendingTotal: number; pendingByQueue: Record; oldestEventAt: string | null; newestEventAt: string | null; replayStatus: ReplayStatus; lastReplayAttemptAt: string | null; lastReplaySuccessAt: string | null; lastReplayFailureAt: string | null; lastReplayError: string | null; }; remote: { enabled: boolean; reachable: boolean | null; latencyMs: number | null; error: string | null; }; } export interface UpdateInitiativeInput { title?: string; summary?: string; status?: "draft" | "active" | "paused" | "completed" | "archived"; priority?: "critical" | "active" | "maintenance" | "hold"; } export interface RegisterOrgxCliDeps { registerCli: (fn: (ctx: { program: any; }) => void, options?: { commands?: string[]; }) => void; client: OrgXClient; formatSnapshot: (snapshot: OrgSnapshot) => string; buildHealthReport: (input?: { probeRemote?: boolean; }) => Promise; apiKeySourceLabel: (source: ResolvedConfig["apiKeySource"]) => string; /** Patch an initiative via the OrgX API. Injected by the caller. */ patchInitiative?: (id: string, input: UpdateInitiativeInput) => Promise; } export declare function registerOrgxCli(deps: RegisterOrgxCliDeps): void; export {};