export const manualUpdateMessage = 'Automatic update needs write access to the global npm install. Run this from a normal NTerminal runtime-user shell; only the npm install step uses sudo.';
export function createManualUpdateInfo(packageName = 'nterminal', detectedAt = new Date()) {
    return {
        reason: 'permission',
        message: manualUpdateMessage,
        command: `sudo npm i -g ${packageName}@latest --prefer-online && nterminal restart-after-update`,
        detectedAt: detectedAt.toISOString()
    };
}
export function isPermissionUpdateFailure(output) {
    return /\b(?:EACCES|EPERM)\b|permission denied|missing write access|access denied|operation was rejected by your operating system|operation not permitted|root-owned files/i.test(output);
}
//# sourceMappingURL=manualUpdate.js.map