mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-04 12:08:11 +00:00
Clean aged download caches, installer leftovers, retired browser profiles, inactive-chat screenshots, temporary captures and unused Chromium versions by default. Preserve explicit master and per-area opt-outs; keep embedding caches and custom folders behind manual selection and confirmation. Add bounded metadata scans, identity-checked deletion, active-resource protection, persistent activity, editable native scheduler integration and actionable A0 notifications. Provide a responsive branded UI and a 256px thumbnail based on the Agent Zero logo. Validate with 65 focused backend tests, 6 frontend tests and live desktop/mobile checks on localhost:32081. The native task cleaned 88,833 files (4.4 GB) in about 22 seconds; protected chat text, uploads, shared browser data, required Chromium and embeddings were preserved.
12 lines
300 B
Python
12 lines
300 B
Python
from plugins._a0_cleaner.helpers import runtime
|
|
|
|
|
|
def run_scheduled_task(task, cancel_event):
|
|
return runtime.run_scheduled(cancel_event)
|
|
|
|
|
|
def save_plugin_config(settings, **kwargs):
|
|
cleaner = runtime.service(config=settings)
|
|
cleaner.areas(validate_custom=True)
|
|
return cleaner.config
|