Files
openclaw/node-version.d.mts
Peter Steinberger 80b92306e4 fix(update): prevent runtime recovery from replacing another install (#150526)
* fix(update): explain runtime and global install permission failures

Report the affected directory, owner, and next action for npm permission
failures. Preserve typed outcomes in dry-run previews, update reports, and
Doctor history, and give candidate-specific Node upgrade guidance.

Thanks to @arrobapontocom-ui for reporting the upgrade diagnostics in #150452.

* fix(update): keep the final retry error in staging and guidance

Carry the package owner's failedStep through the result adapter instead of
selecting a failure from attempt history. Admission, settlement, and retention
owners record their selected outcomes directly.

Preserve EACCES remediation and facts after an unrelated npm failure and retry.
Thanks to @arrobapontocom-ui for the report in #150452; follow-up to #150526.

* fix(update): preserve deployment advice in permission recovery

* test(update): assert candidate runtime guidance at the CLI boundary

* fix(update): recommend a runtime the updater itself can run

* fix(update): keep the CLI reachable through a runtime switch in recovery guidance

* fix(update): recheck ownership after runtime switches

Continue through the retained absolute launcher instead of recommending an
uninspected global install. Recheck prefix and service ownership, preserve
typed refusal guidance in reports, and keep the selected runtime during
fresh-profile admission.

Thanks to @arrobapontocom-ui for the original report (#150452, item 1).

* fix(update): isolate the global command runner contract

* test(update): match resolved npm prefix probes

* fix(update): refuse uninspectable npm destinations
2026-09-17 13:24:42 -07:00

23 lines
892 B
TypeScript

export type NodeReleaseVersion = {
major: number;
minor: number;
patch: number;
};
export function parseNodeReleaseVersion(value: unknown): NodeReleaseVersion | null;
export function isNodeVersionAtLeast(
version: NodeReleaseVersion | null,
minimum: NodeReleaseVersion,
): boolean;
export function isSupportedOpenClawNodeVersion(value: unknown): boolean;
export const PROCESS_NODE_VERSION_CHECK: string;
export const SUPPORTED_NODE_VERSIONS: string;
export const SUPPORTED_NODE_VERSION_RANGE: string;
export function formatUnsupportedNodeVersionMessage(version: string | null): string;
export function formatUnsupportedNodeDiagnosticWarning(version: string | null): string;
export function classifyUnsupportedNodeCommand(
argv: readonly string[],
): "diagnostic" | "update" | null;
export function canRunOpenClawNodeDiagnostics(value: unknown, hasNodeSqlite: boolean): boolean;