mirror of
https://github.com/morluto/rea
synced 2026-10-26 06:16:17 -04:00
d9660eb032
Join canonical owned command cleanup before releasing package verifier workspaces. Replace raw package command wrappers, the updater supervisor, WASM cleanup composite, and boolean-only retention with explicit capability ownership. Preserve selected environments, npm arguments, no-deadline calls, clean exit status, and distinct aggregate/per-stream output budgets. Exercise actual timeout descendants, cancellation, retained cleanup retry, and workspace admission.
43 lines
1.5 KiB
TypeScript
43 lines
1.5 KiB
TypeScript
import type { PackageVerifierCommands } from "./lib/package-command-owner.mjs";
|
|
|
|
/**
|
|
* Host facts the packaged setup support is derived from.
|
|
*
|
|
* `linuxDistribution` is the distribution record the Hopper installer owner
|
|
* parses; it is absent when no distribution could be read, which leaves
|
|
* installer applicability unknown rather than unsupported.
|
|
*/
|
|
export interface SetupHostFacts {
|
|
readonly platform: NodeJS.Platform;
|
|
readonly linuxDistribution?: {
|
|
readonly hopperSetupSupported: boolean;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Derive agent setup support from the doctor node check and automated Hopper
|
|
* installer applicability from the facts their owners parse. Applicability is
|
|
* undefined when its owning fact is unavailable. On Linux, Hopper readiness is
|
|
* required only where the automated installer applies.
|
|
*/
|
|
export function packageSetupSupport(
|
|
checks:
|
|
| readonly { readonly name: string; readonly ok: boolean }[]
|
|
| undefined,
|
|
host: SetupHostFacts,
|
|
): {
|
|
supportedSetupHost: boolean;
|
|
hopperReadinessRequired: boolean;
|
|
hopperSetupSupported: boolean | undefined;
|
|
};
|
|
|
|
/** Validate --help, --llms, and doctor output and determine host setup support. */
|
|
export function verifyPackageDiscovery(input: {
|
|
readonly commands: Pick<PackageVerifierCommands, "run" | "runWithStatus">;
|
|
readonly cli: string;
|
|
readonly environment: Readonly<Record<string, string | undefined>>;
|
|
}): Promise<{
|
|
supportedSetupHost: boolean;
|
|
hopperSetupSupported: boolean | undefined;
|
|
}>;
|