Ë
    À7j%  ã                  óZ   — d Z ddlmZ ddlmZ ddlmZ ddlmZ  ed«      Z	d
d„Z
ddd„Zy	)u»   Quick discovery: a small, fast, read-only snapshot.

Runs during install/registration so the panel has baseline facts immediately.
Intentionally cheap â€” no subprocess-heavy scans here.
é    )Úannotations)ÚAny)Úsystem)Ú
get_loggerzdiscovery.quickc                 ó„  — t        j                  «       t        j                  «       t        j                  «       t        j                  «       t        j
                  «       t        j                  «       t        j                  «       t        j                  «       t        j                  «       t        j                  «       dœ
S )z)Return the minimal baseline server facts.)
ÚhostnameÚosÚkernelÚarchitectureÚ	cpu_countÚmemory_totalÚ
disk_totalÚ	public_ipÚprivate_ipsÚuptime)r   r   Úos_infor
   r   r   Úmemory_total_bytesÚdisk_total_bytesr   r   Úuptime_seconds© ó    úI/var/www/downloads.wolfpanel.net/public_html/agent/src/discovery/quick.pyÚcollectr      s   € ô —O‘OÓ%Ü�n‰nÓÜ—-‘-“/Ü×+Ñ+Ó-Ü×%Ñ%Ó'Ü×1Ñ1Ó3Ü×-Ñ-Ó/Ü×%Ñ%Ó'Ü×)Ñ)Ó+Ü×'Ñ'Ó)ñð r   c                ó¦   — t        «       }|rddlm} 	  || |dd|gi«       |S |S # t        $ r!}t        j                  d|«       Y d}~|S d}~ww xY w)zîCollect baseline facts and upload them as an instant server_facts scan.

    The quick scan gives the panel non-empty server_facts immediately after the
    first connection, ahead of the slower full inventory. Upload is best-effort.
    r   )Úupload_inventoryÚquickÚserver_factszquick scan upload failed: %sN)r   Údiscovery.uploadr   Ú	ExceptionÚlogÚwarning)ÚconfigÚ
api_clientÚuploadÚsnapshotr   Úexcs         r   Úrunr'   !   s_   € ô ‹y€HÙÝ5ð	=Ù˜V Z°¸>ÈHÈ:Ð:VÔWð €Oˆ8€Oøô ò 	=Ü�K‰KÐ6¸×<Ð<Ø€Oûð	=ús   ”& ¦	A¯AÁAN)Úreturnúdict[str, Any])T)r$   Úboolr(   r)   )Ú__doc__Ú
__future__r   Útypingr   Ú	discoveryr   Úloggerr   r    r   r'   r   r   r   ú<module>r0      s-   ðñõ #å å Ý áÐ"Ó#€óõ r   