fixos 2.2.59__tar.gz → 2.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fixos-2.2.59 → fixos-2.5.0}/PKG-INFO +2 -1
- fixos-2.5.0/VERSION +1 -0
- fixos-2.5.0/docs/examples/advanced_usage.py +6 -0
- fixos-2.5.0/docs/examples/quickstart.py +5 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_auto_cleanup.py +3 -0
- fixos-2.5.0/fixos/cli/_cleanup_artifacts.py +147 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_cleanup_space.py +13 -0
- fixos-2.5.0/fixos/cli/anomalies_cmd.py +108 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/cleanup_cmd.py +69 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/fix_cmd.py +1 -1
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/main.py +3 -0
- fixos-2.5.0/fixos/cli/printers_cmd.py +117 -0
- fixos-2.5.0/fixos/cli/storage_cmd.py +290 -0
- fixos-2.5.0/fixos/diagnostics/artifact_store.py +616 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/disk_analyzer.py +18 -34
- fixos-2.5.0/fixos/diagnostics/host_anomalies.py +547 -0
- fixos-2.5.0/fixos/diagnostics/large_files.py +434 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/project_scanner.py +76 -1
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/service_cleanup.py +43 -3
- fixos-2.5.0/fixos/diagnostics/storage_rules.py +207 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/mcp_server.py +82 -22
- fixos-2.5.0/fixos/plugins/builtin/printers.py +628 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/registry.py +17 -8
- {fixos-2.2.59 → fixos-2.5.0}/fixos.egg-info/PKG-INFO +2 -1
- {fixos-2.2.59 → fixos-2.5.0}/fixos.egg-info/SOURCES.txt +18 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos.egg-info/requires.txt +1 -0
- {fixos-2.2.59 → fixos-2.5.0}/pyproject.toml +2 -1
- fixos-2.5.0/scripts/pyqual-calibrate.py +290 -0
- fixos-2.5.0/tests/twin/printers/job_sink.py +72 -0
- fixos-2.5.0/tests/unit/test_artifact_store.py +216 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_space.py +41 -0
- fixos-2.5.0/tests/unit/test_host_anomalies.py +298 -0
- fixos-2.5.0/tests/unit/test_large_file_triage.py +363 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_mcp_server.py +128 -0
- fixos-2.5.0/tests/unit/test_printers_plugin.py +251 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_project_scanner.py +96 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_service_cleanup.py +124 -0
- fixos-2.5.0/tests/unit/test_storage_cmd.py +130 -0
- fixos-2.2.59/VERSION +0 -1
- {fixos-2.2.59 → fixos-2.5.0}/.env.example +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/CHANGELOG.md +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/LICENSE +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/MANIFEST.in +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/README.md +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/README.md +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/TEST_RESULTS.md +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/TEST_RESULTS_V2.md +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/alpine/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/arch/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/base/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/broken-audio/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/broken-full/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/broken-network/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/broken-thumbnails/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/debian/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/docker-compose.multi-system.yml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/docker-compose.yml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/fedora/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/test-multi-system.sh +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/test-scenarios.sh +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/ubuntu/Dockerfile +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/docker/validate-scenario.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/__main__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/agent/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/agent/autonomous.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/agent/autonomous_session.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/agent/hitl.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/agent/hitl_session.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/agent/session_core.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/agent/session_handlers.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/agent/session_io.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/anonymizer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/__main__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_cleanup_docker_volumes.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_cleanup_flatpak.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_cleanup_free_target.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_cleanup_home.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_cleanup_snap.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_cleanup_system.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_cleanup_utils.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/_cleanup_venvs.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/ask_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/config_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/dashboard.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/features_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/history_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/jetbrains_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/mcp_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/orchestrate_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/output_formatter.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/profile_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/projects_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/provider_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/quick_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/quickfix_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/report_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/rollback_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/scan_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/shared.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/shell_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/token_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli/watch_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/cli.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/config.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/config_interactive.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/constants.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/_flatpak_analysis_mixin.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/_flatpak_execution_mixin.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/_flatpak_recommendations_mixin.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/_storage_container_mixin.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/_storage_system_mixin.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/_storage_user_mixin.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/cache_discovery.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/_shared.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/audio.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/file_analysis.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/hardware.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/packages.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/resources.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/security.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/storage_optimization.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/system_core.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/checks/thumbnails.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/dev_project_analyzer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/docker_network_cleanup.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/docker_startup_optimizer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/flatpak_analyzer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/jetbrains_ai.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/jetbrains_recovery.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/native_scan.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/orphaned_workloads.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/process_chains.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/quick_snapshot.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/service_details.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/service_scanner.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/state_retention.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/storage_analyzer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/system_checks.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/utils.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/diagnostics/venv_cleanup.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/endpoint_refresh.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/auditor.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/catalog.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/data/packages.yaml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/data/profiles/developer.yaml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/data/profiles/office.yaml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/data/profiles/sysadmin.yaml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/installer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/profiles.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/features/renderer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/fixes/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/interactive/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/interactive/cleanup_planner.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/llm_shell.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/orchestrator/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/orchestrator/executor.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/orchestrator/graph.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/orchestrator/orchestrator.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/orchestrator/rollback.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/orphan_pins.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/platform_utils.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/base.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/builtin/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/builtin/audio.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/builtin/disk.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/builtin/hardware.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/builtin/resources.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/builtin/security.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/plugins/builtin/thumbnails.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/profiles/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/profiles/desktop.yaml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/profiles/developer.yaml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/profiles/minimal.yaml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/profiles/server.yaml +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/providers/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/providers/gemini_native.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/providers/llm.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/providers/llm_analyzer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/providers/schemas.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/system_checks.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/utils/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/utils/anonymizer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/utils/terminal.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/utils/timeout.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/utils/web_search.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos/watch.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos.egg-info/dependency_links.txt +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos.egg-info/entry_points.txt +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/fixos.egg-info/top_level.txt +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/pytest.ini +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/requirements-dev.txt +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/requirements.txt +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/setup.cfg +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/setup.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/conftest.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/e2e/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/e2e/test_anonymization_layers.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/e2e/test_audio_broken.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/e2e/test_cli.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/e2e/test_diagnostics_integration.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/e2e/test_executor.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/e2e/test_multi_system.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/e2e/test_network_broken.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/e2e/test_thumbnails_broken.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/test_fixos.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/__init__.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_anonymizer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_ask_and_nl_group.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_auto_cleanup.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_auto_no_llm.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_autonomous_reporting.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cache_discovery.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_docker_buildcache.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_docker_volumes.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_effectiveness.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_free_target.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_plan_contract.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_planner.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_retention.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_safety.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_tmp.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cleanup_utils.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_cli_main.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_core.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_dashboard.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_dev_project_analyzer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_disk_analyzer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_disk_analyzer_capacity.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_docker_network_cleanup.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_docker_startup_optimizer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_endpoint_refresh.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_executor.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_gemini_native_client.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_jetbrains_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_jetbrains_recovery.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_jetbrains_toolbox_v2.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_llm_auth_stop.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_llm_provider.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_native_scan.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_ollama_endpoint.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_orchestrator.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_orphan_pins.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_orphaned_workloads.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_packaging_data.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_path_scope.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_process_chains.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_projects_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_quick_cmd.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_quick_snapshot.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_resources_quick.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_security_quick.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_service_scanner.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_shell_ux.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_standard_adoption_projection.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_state_retention.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_storage_analyzer.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_system_checks_parallel.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_venv_cleanup.py +0 -0
- {fixos-2.2.59 → fixos-2.5.0}/tests/unit/test_version_parity.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fixos
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
4
4
|
Summary: AI-powered Linux/Windows diagnostics and repair – audio, hardware, system issues
|
|
5
5
|
Home-page: https://github.com/wronai/fixos
|
|
6
6
|
Author: fixos contributors
|
|
@@ -29,6 +29,7 @@ Requires-Dist: click>=8.1.0
|
|
|
29
29
|
Requires-Dist: python-dotenv>=1.0.0
|
|
30
30
|
Requires-Dist: rich>=13.0
|
|
31
31
|
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: build>=1.2.2; extra == "dev"
|
|
32
33
|
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
33
34
|
Requires-Dist: pytest-mock>=3.12.0; extra == "dev"
|
|
34
35
|
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
fixos-2.5.0/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.5.0
|
|
@@ -24,6 +24,9 @@ _CACHE_PATHS = (
|
|
|
24
24
|
".cache/mypy",
|
|
25
25
|
".cache/Flake8",
|
|
26
26
|
".cache/black",
|
|
27
|
+
".cache/subactor-search",
|
|
28
|
+
".cache/virt-builder",
|
|
29
|
+
".cache/tree-sitter-language-pack",
|
|
27
30
|
)
|
|
28
31
|
_BROWSERS = ("google-chrome", "chromium", "BraveSoftware/Brave-Browser")
|
|
29
32
|
_BROWSER_LEAVES = ("Cache", "Code Cache", "GPUCache", "DawnCache", "ShaderCache")
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"""Inventory-first reclamation of content-addressed stores and build caches."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
import click
|
|
8
|
+
|
|
9
|
+
from fixos.cli._cleanup_utils import _format_bytes, _parse_numeric_range_set
|
|
10
|
+
from fixos.diagnostics.artifact_store import (
|
|
11
|
+
remove_artifacts,
|
|
12
|
+
scan_artifact_stores,
|
|
13
|
+
scan_build_caches,
|
|
14
|
+
scan_system_targets,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _cleanup_artifacts(
|
|
19
|
+
json_output,
|
|
20
|
+
dry_run,
|
|
21
|
+
list_only,
|
|
22
|
+
yes,
|
|
23
|
+
*,
|
|
24
|
+
paths=None,
|
|
25
|
+
min_age_days=None,
|
|
26
|
+
receipt_dir=None,
|
|
27
|
+
include_build_caches=False,
|
|
28
|
+
include_system=False,
|
|
29
|
+
):
|
|
30
|
+
interactive = sys.stdin.isatty() and not (
|
|
31
|
+
json_output or dry_run or list_only or yes
|
|
32
|
+
)
|
|
33
|
+
if min_age_days is None:
|
|
34
|
+
min_age_days = (
|
|
35
|
+
click.prompt(
|
|
36
|
+
"Minimalny wiek wpisu w dniach",
|
|
37
|
+
default=1,
|
|
38
|
+
type=click.IntRange(min=0),
|
|
39
|
+
)
|
|
40
|
+
if interactive
|
|
41
|
+
else 1
|
|
42
|
+
)
|
|
43
|
+
if min_age_days < 0:
|
|
44
|
+
raise click.BadParameter(
|
|
45
|
+
"Wiek musi wynosić co najmniej 0 dni", param_hint="--artifacts-min-age-days"
|
|
46
|
+
)
|
|
47
|
+
roots = [Path(item).expanduser() for item in (paths or [])]
|
|
48
|
+
if not roots and not include_system:
|
|
49
|
+
raise click.UsageError(
|
|
50
|
+
"--artifacts wymaga co najmniej jednej ścieżki "
|
|
51
|
+
"(np. --artifacts ~/github/paxlet-com/artifacts) lub --artifacts-system-wide"
|
|
52
|
+
)
|
|
53
|
+
missing = [str(item) for item in roots if not item.exists()]
|
|
54
|
+
if missing:
|
|
55
|
+
raise click.ClickException(f"Nie znaleziono ścieżek: {', '.join(missing)}")
|
|
56
|
+
if not json_output:
|
|
57
|
+
click.echo(
|
|
58
|
+
f"Skanowanie magazynów artefaktów w {', '.join(str(item) for item in roots)}; "
|
|
59
|
+
f"okres: >= {min_age_days} dni"
|
|
60
|
+
)
|
|
61
|
+
try:
|
|
62
|
+
report = (
|
|
63
|
+
scan_artifact_stores(roots, min_age_days=min_age_days)
|
|
64
|
+
if roots
|
|
65
|
+
else {
|
|
66
|
+
"roots": [],
|
|
67
|
+
"found": 0,
|
|
68
|
+
"eligible": 0,
|
|
69
|
+
"bytes": 0,
|
|
70
|
+
"total_bytes": 0,
|
|
71
|
+
"items": [],
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
if include_build_caches:
|
|
75
|
+
caches = scan_build_caches(roots, min_age_days=max(min_age_days, 1))
|
|
76
|
+
report["items"].extend(caches["items"])
|
|
77
|
+
report["found"] += caches["found"]
|
|
78
|
+
report["total_bytes"] += caches["total_bytes"]
|
|
79
|
+
if caches["eligible"]:
|
|
80
|
+
report["eligible"] += caches["eligible"]
|
|
81
|
+
report["bytes"] += caches["bytes"]
|
|
82
|
+
if include_system:
|
|
83
|
+
system = scan_system_targets(min_age_days=min_age_days)
|
|
84
|
+
report["items"].extend(system["items"])
|
|
85
|
+
report["found"] += system["found"]
|
|
86
|
+
report["total_bytes"] += system["total_bytes"]
|
|
87
|
+
if system["eligible"]:
|
|
88
|
+
report["eligible"] += system["eligible"]
|
|
89
|
+
report["bytes"] += system["bytes"]
|
|
90
|
+
except (OSError, ValueError) as exc:
|
|
91
|
+
raise click.ClickException(str(exc)) from exc
|
|
92
|
+
if json_output:
|
|
93
|
+
click.echo(json.dumps(report, ensure_ascii=True, indent=2))
|
|
94
|
+
return
|
|
95
|
+
click.echo(f"Znaleziono wpisów: {report['found']}")
|
|
96
|
+
click.echo(f"Łączny rozmiar: {_format_bytes(report['total_bytes'])}")
|
|
97
|
+
click.echo(
|
|
98
|
+
f"Do odzyskania: {report['eligible']}; zajęte miejsce: {_format_bytes(report['bytes'])}"
|
|
99
|
+
)
|
|
100
|
+
click.echo(
|
|
101
|
+
"Referencje: skan manifestów (digest w treści i ścieżki bezwzględne), symlinki "
|
|
102
|
+
"i indeks Git. Dane prywatne użytkownika i magazyny poświadczeń są zawsze chronione."
|
|
103
|
+
)
|
|
104
|
+
candidates = [item for item in report["items"] if item["eligible"]]
|
|
105
|
+
for number, item in enumerate(candidates, 1):
|
|
106
|
+
click.echo(f" [{number}] {item['path']!a}: {_format_bytes(item['bytes'])}")
|
|
107
|
+
for item in report["items"]:
|
|
108
|
+
if not item["eligible"]:
|
|
109
|
+
click.echo(f" Chronione {item['path']!a}: {', '.join(item['reasons'])}")
|
|
110
|
+
if dry_run or list_only:
|
|
111
|
+
click.echo("DRY-RUN — bez usuwania." if dry_run else "LISTA — bez usuwania.")
|
|
112
|
+
return
|
|
113
|
+
if not candidates:
|
|
114
|
+
return
|
|
115
|
+
if yes:
|
|
116
|
+
selected = candidates
|
|
117
|
+
else:
|
|
118
|
+
raw = click.prompt("Wybierz numery (np. 1,3-5), all lub 0", default="0")
|
|
119
|
+
numbers = (
|
|
120
|
+
set(range(1, len(candidates) + 1))
|
|
121
|
+
if raw.strip().lower() == "all"
|
|
122
|
+
else _parse_numeric_range_set(raw)
|
|
123
|
+
)
|
|
124
|
+
if any(n < 0 or n > len(candidates) for n in numbers):
|
|
125
|
+
raise click.BadParameter("Numer spoza listy")
|
|
126
|
+
selected = [item for n, item in enumerate(candidates, 1) if n in numbers]
|
|
127
|
+
if not selected or not click.confirm(
|
|
128
|
+
f"Usunąć {len(selected)} wpisów "
|
|
129
|
+
f"({_format_bytes(sum(item['bytes'] for item in selected))})? "
|
|
130
|
+
"Wpisy bez referencji trzeba będzie odtworzyć lub pobrać ponownie",
|
|
131
|
+
default=False,
|
|
132
|
+
):
|
|
133
|
+
click.echo("Anulowano — niczego nie usunięto.")
|
|
134
|
+
return
|
|
135
|
+
result = remove_artifacts(selected, receipt_dir=receipt_dir)
|
|
136
|
+
click.echo(
|
|
137
|
+
f"Usunięto {len(result['removed'])}/{len(selected)}; "
|
|
138
|
+
f"zwolniono {_format_bytes(result['freed_bytes'])}"
|
|
139
|
+
)
|
|
140
|
+
if result.get("receipt"):
|
|
141
|
+
click.echo(f"Receipt: {result['receipt']}")
|
|
142
|
+
if result["skipped"]:
|
|
143
|
+
for item in result["skipped"]:
|
|
144
|
+
click.echo(f" Pominięto {item['path']!a}: {', '.join(item['reasons'])}")
|
|
145
|
+
raise click.ClickException(
|
|
146
|
+
f"Nie usunięto {len(result['skipped'])} wpisów; sprawdź powody i ponów skan."
|
|
147
|
+
)
|
|
@@ -58,6 +58,11 @@ _USER_CACHE_SAFE = {
|
|
|
58
58
|
"cursor-compile-cache",
|
|
59
59
|
"gstreamer-1.0",
|
|
60
60
|
"mesa_shader_cache_sf",
|
|
61
|
+
"subactor-search",
|
|
62
|
+
"tree-sitter-language-pack",
|
|
63
|
+
"virt-builder",
|
|
64
|
+
"virtualenv",
|
|
65
|
+
"google-chrome-headless",
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
|
|
@@ -2155,6 +2160,14 @@ def _cleanup_build_caches(
|
|
|
2155
2160
|
if npm_cache.is_dir() and not npm_cache.is_symlink():
|
|
2156
2161
|
dirs_to_size.append(npm_cache)
|
|
2157
2162
|
|
|
2163
|
+
cargo_cache = home / ".cargo" / "registry" / "cache"
|
|
2164
|
+
if cargo_cache.is_dir() and not cargo_cache.is_symlink():
|
|
2165
|
+
dirs_to_size.append(cargo_cache)
|
|
2166
|
+
|
|
2167
|
+
android_cache = home / ".android" / "build-cache"
|
|
2168
|
+
if android_cache.is_dir() and not android_cache.is_symlink():
|
|
2169
|
+
dirs_to_size.append(android_cache)
|
|
2170
|
+
|
|
2158
2171
|
conda_pkgs = home / "miniconda3" / "pkgs"
|
|
2159
2172
|
if conda_pkgs.is_dir():
|
|
2160
2173
|
for ext in ("*.tar.bz2", "*.conda"):
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""`fixos anomalies`: report host anomalies, remove only selected stale data."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
import click
|
|
9
|
+
|
|
10
|
+
from fixos.cli._cleanup_utils import _format_bytes
|
|
11
|
+
from fixos.diagnostics.host_anomalies import GIB, remove_paths, scan_all
|
|
12
|
+
|
|
13
|
+
_ORDER = {"high": 0, "medium": 1, "review": 2, "safe": 3, "low": 4, "protected": 5}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@click.command("anomalies")
|
|
17
|
+
@click.option("--json", "json_output", is_flag=True, help="Wynik maszynowy JSON.")
|
|
18
|
+
@click.option(
|
|
19
|
+
"--min-size-gb",
|
|
20
|
+
type=click.FloatRange(min=0.01),
|
|
21
|
+
default=1.0,
|
|
22
|
+
show_default=True,
|
|
23
|
+
help="Minimalny rozmiar katalogu stanu lub indeksu IDE.",
|
|
24
|
+
)
|
|
25
|
+
@click.option(
|
|
26
|
+
"--min-age-days",
|
|
27
|
+
type=click.IntRange(min=1),
|
|
28
|
+
default=14,
|
|
29
|
+
show_default=True,
|
|
30
|
+
help="Katalog stanu jest kandydatem, gdy nic w nim nie zmieniono tyle dni.",
|
|
31
|
+
)
|
|
32
|
+
@click.option(
|
|
33
|
+
"--remove",
|
|
34
|
+
"remove",
|
|
35
|
+
multiple=True,
|
|
36
|
+
type=click.Path(path_type=Path),
|
|
37
|
+
help="Usuń wskazany katalog; tylko jeśli bieżący skan oznacza go jako usuwalny.",
|
|
38
|
+
)
|
|
39
|
+
@click.option(
|
|
40
|
+
"--remove-safe",
|
|
41
|
+
is_flag=True,
|
|
42
|
+
help="Usuń wszystkie pozycje 'safe' (indeksy IDE, gdy IDE nie działa).",
|
|
43
|
+
)
|
|
44
|
+
@click.option("--dry-run", is_flag=True, help="Pokaż, co zostałoby usunięte.")
|
|
45
|
+
def anomalies(json_output, min_size_gb, min_age_days, remove, remove_safe, dry_run):
|
|
46
|
+
"""Wykrywa anomalie hosta, których nie widzi zwykłe czyszczenie cache.
|
|
47
|
+
|
|
48
|
+
\b
|
|
49
|
+
Sprawdza: usługi systemd w pętli restartów, logi kontenerów bez rotacji,
|
|
50
|
+
duże nieużywane katalogi w ~/.local/state i ~/.local/share, indeksy IDE
|
|
51
|
+
oraz procesy zombie i grupy osieroconych procesów.
|
|
52
|
+
|
|
53
|
+
\b
|
|
54
|
+
Przykłady:
|
|
55
|
+
fixos anomalies # raport
|
|
56
|
+
fixos anomalies --json # raport maszynowy
|
|
57
|
+
fixos anomalies --remove-safe # usuń indeksy niedziałających IDE
|
|
58
|
+
fixos anomalies --remove ~/.local/state/x/backups --dry-run
|
|
59
|
+
"""
|
|
60
|
+
report = scan_all(min_bytes=int(min_size_gb * GIB), min_age_days=min_age_days)
|
|
61
|
+
findings = report["findings"]
|
|
62
|
+
targets = [path.expanduser() for path in remove]
|
|
63
|
+
if remove_safe:
|
|
64
|
+
targets += [
|
|
65
|
+
Path(f["subject"])
|
|
66
|
+
for f in findings
|
|
67
|
+
if f["removable"] and f["severity"] == "safe"
|
|
68
|
+
]
|
|
69
|
+
if targets:
|
|
70
|
+
if dry_run:
|
|
71
|
+
report["would_remove"] = [
|
|
72
|
+
str(path)
|
|
73
|
+
for path in targets
|
|
74
|
+
if any(f["removable"] and f["subject"] == str(path) for f in findings)
|
|
75
|
+
]
|
|
76
|
+
else:
|
|
77
|
+
report["removal"] = remove_paths(
|
|
78
|
+
targets,
|
|
79
|
+
findings,
|
|
80
|
+
receipt_dir=Path.home() / ".local/state/fixos/receipts",
|
|
81
|
+
)
|
|
82
|
+
if json_output:
|
|
83
|
+
click.echo(json.dumps(report, ensure_ascii=False, indent=2))
|
|
84
|
+
return
|
|
85
|
+
if not findings:
|
|
86
|
+
click.echo("Nie wykryto anomalii.")
|
|
87
|
+
for item in sorted(findings, key=lambda f: _ORDER.get(f["severity"], 9)):
|
|
88
|
+
click.echo(f"[{item['severity']}] {item['category']}: {item['subject']}")
|
|
89
|
+
click.echo(f" {item['detail']}")
|
|
90
|
+
for command in item["suggested_commands"]:
|
|
91
|
+
click.echo(f" $ {command}")
|
|
92
|
+
click.echo(
|
|
93
|
+
f"\nDo odzyskania po przeglądzie: {_format_bytes(report['reclaimable_bytes'])}"
|
|
94
|
+
)
|
|
95
|
+
for path in report.get("would_remove", []):
|
|
96
|
+
click.echo(f"[DRY-RUN] rm -rf {path}")
|
|
97
|
+
removal = report.get("removal")
|
|
98
|
+
if removal:
|
|
99
|
+
for item in removal["removed"]:
|
|
100
|
+
click.echo(f"usunięto: {item['path']}")
|
|
101
|
+
for item in removal["partial"]:
|
|
102
|
+
click.echo(
|
|
103
|
+
f"częściowo: {item['path']} (pozostało "
|
|
104
|
+
f"{_format_bytes(item['remaining_bytes'])}, {item['reason']})"
|
|
105
|
+
)
|
|
106
|
+
for item in removal["refused"]:
|
|
107
|
+
click.echo(f"pominięto: {item['path']} ({item['reason']})")
|
|
108
|
+
click.echo(f"Zwolniono: {_format_bytes(removal['freed_bytes'])}")
|
|
@@ -14,6 +14,7 @@ import re
|
|
|
14
14
|
|
|
15
15
|
import click
|
|
16
16
|
|
|
17
|
+
from fixos.cli._cleanup_artifacts import _cleanup_artifacts
|
|
17
18
|
from fixos.cli._cleanup_docker_volumes import _cleanup_docker_volumes
|
|
18
19
|
|
|
19
20
|
# Re-export public symbols used by fixos.cli (backward-compat)
|
|
@@ -1794,6 +1795,43 @@ def _run_free_target_mode(
|
|
|
1794
1795
|
"npm, ...)"
|
|
1795
1796
|
),
|
|
1796
1797
|
)
|
|
1798
|
+
@click.option(
|
|
1799
|
+
"--artifacts",
|
|
1800
|
+
"artifacts_paths",
|
|
1801
|
+
multiple=True,
|
|
1802
|
+
type=click.Path(exists=True, file_okay=False, path_type=str),
|
|
1803
|
+
help=(
|
|
1804
|
+
"Magazyn artefaktów do analizy (można podać wielokrotnie). "
|
|
1805
|
+
"Wymagane z -c artifacts; wpisy bez referencji w manifestach, "
|
|
1806
|
+
"symlinkach i indeksie Git są kandydatami do usunięcia."
|
|
1807
|
+
),
|
|
1808
|
+
)
|
|
1809
|
+
@click.option(
|
|
1810
|
+
"--artifacts-min-age-days",
|
|
1811
|
+
type=int,
|
|
1812
|
+
default=None,
|
|
1813
|
+
help="Minimalny wiek wpisu artefaktu w dniach (domyślnie 1).",
|
|
1814
|
+
)
|
|
1815
|
+
@click.option(
|
|
1816
|
+
"--artifacts-receipt-dir",
|
|
1817
|
+
type=click.Path(file_okay=False, path_type=str),
|
|
1818
|
+
default=None,
|
|
1819
|
+
help="Katalog na receipt każdego usunięcia artefaktów.",
|
|
1820
|
+
)
|
|
1821
|
+
@click.option(
|
|
1822
|
+
"--artifacts-build-caches/--no-artifacts-build-caches",
|
|
1823
|
+
default=False,
|
|
1824
|
+
help="Dołącz dyspozytorskie cache buildów (__pycache__, node_modules, dist…).",
|
|
1825
|
+
)
|
|
1826
|
+
@click.option(
|
|
1827
|
+
"--artifacts-system-wide/--no-artifacts-system-wide",
|
|
1828
|
+
default=False,
|
|
1829
|
+
help=(
|
|
1830
|
+
"Dołącz systemowe cele odzyskiwania z allowlisty (apt-archives, crash, "
|
|
1831
|
+
"coredumps, rotowane logi, /tmp, /var/tmp, pip/uv/npm cache, miniatury, kosz, "
|
|
1832
|
+
"journal). Dane prywatne użytkownika i magazyny poświadczeń pozostają chronione."
|
|
1833
|
+
),
|
|
1834
|
+
)
|
|
1797
1835
|
@click.option(
|
|
1798
1836
|
"--docker-old",
|
|
1799
1837
|
"docker_old",
|
|
@@ -2134,6 +2172,11 @@ def cleanup_services(
|
|
|
2134
2172
|
yes,
|
|
2135
2173
|
free_gb,
|
|
2136
2174
|
full_analysis,
|
|
2175
|
+
artifacts_paths=(),
|
|
2176
|
+
artifacts_min_age_days=None,
|
|
2177
|
+
artifacts_receipt_dir=None,
|
|
2178
|
+
artifacts_build_caches=False,
|
|
2179
|
+
artifacts_system_wide=False,
|
|
2137
2180
|
) -> None:
|
|
2138
2181
|
"""
|
|
2139
2182
|
Skanuje i czyści dane usług przekraczające próg.
|
|
@@ -2192,8 +2235,34 @@ def cleanup_services(
|
|
|
2192
2235
|
fixos cleanup --tmp --days 1 --dry-run # pliki i katalogi w /tmp starsze niż 1 dzień
|
|
2193
2236
|
fixos cleanup --venvs-old --days 30 --dry-run
|
|
2194
2237
|
fixos cleanup --venvs-old --projects-path ~/work --days 60
|
|
2238
|
+
fixos cleanup -c artifacts --artifacts ~/github/paxlet-com/artifacts/inputs --list
|
|
2239
|
+
# magazyn content-addressed: chroni referencje z manifestów, symlinków i Git
|
|
2240
|
+
fixos cleanup -c artifacts --artifacts ./inputs --artifacts-min-age-days 7 \\
|
|
2241
|
+
--artifacts-receipt-dir ./runs/receipts --artifacts-build-caches
|
|
2195
2242
|
fixos cleanup --full # pełna analiza systemu
|
|
2196
2243
|
"""
|
|
2244
|
+
if artifacts_paths or artifacts_system_wide or cleanup == "artifacts":
|
|
2245
|
+
if cleanup not in (None, "artifacts"):
|
|
2246
|
+
raise click.UsageError(
|
|
2247
|
+
"--artifacts uruchom jako osobną akcję (-c artifacts)"
|
|
2248
|
+
)
|
|
2249
|
+
if not artifacts_paths and not artifacts_system_wide:
|
|
2250
|
+
raise click.UsageError(
|
|
2251
|
+
"-c artifacts wymaga --artifacts PATH lub --artifacts-system-wide"
|
|
2252
|
+
)
|
|
2253
|
+
_cleanup_artifacts(
|
|
2254
|
+
json_output,
|
|
2255
|
+
dry_run,
|
|
2256
|
+
list_only,
|
|
2257
|
+
yes,
|
|
2258
|
+
paths=list(artifacts_paths),
|
|
2259
|
+
min_age_days=artifacts_min_age_days,
|
|
2260
|
+
receipt_dir=artifacts_receipt_dir,
|
|
2261
|
+
include_build_caches=artifacts_build_caches,
|
|
2262
|
+
include_system=artifacts_system_wide,
|
|
2263
|
+
)
|
|
2264
|
+
return
|
|
2265
|
+
|
|
2197
2266
|
if threshold_gb is not None:
|
|
2198
2267
|
threshold = int(threshold_gb * 1024)
|
|
2199
2268
|
|
|
@@ -645,7 +645,7 @@ def auto_cmd(
|
|
|
645
645
|
cleanup_docker_builder(dry_run=dry_run, yes=yes)
|
|
646
646
|
steps_executed.append("docker-build-cache")
|
|
647
647
|
|
|
648
|
-
if clean_snap_old:
|
|
648
|
+
if clean_snap_old or (clean_services and shutil.which("snap")):
|
|
649
649
|
if not json_output:
|
|
650
650
|
click.echo(
|
|
651
651
|
click.style(
|
|
@@ -9,6 +9,7 @@ from fixos.cli.shared import BANNER, LazyCommandDict, NaturalLanguageGroup
|
|
|
9
9
|
from fixos.config import FixOsConfig
|
|
10
10
|
|
|
11
11
|
LAZY_COMMANDS: dict[str, tuple[str, str]] = {
|
|
12
|
+
"anomalies": ("fixos.cli.anomalies_cmd", "anomalies"),
|
|
12
13
|
"ask": ("fixos.cli.ask_cmd", "ask"),
|
|
13
14
|
"auto": ("fixos.cli.fix_cmd", "auto_cmd"),
|
|
14
15
|
"cleanup": ("fixos.cli.cleanup_cmd", "cleanup_services"),
|
|
@@ -21,6 +22,7 @@ LAZY_COMMANDS: dict[str, tuple[str, str]] = {
|
|
|
21
22
|
"llm": ("fixos.cli.provider_cmd", "llm_providers"),
|
|
22
23
|
"mcp": ("fixos.cli.mcp_cmd", "mcp_cmd"),
|
|
23
24
|
"orchestrate": ("fixos.cli.orchestrate_cmd", "orchestrate"),
|
|
25
|
+
"printers": ("fixos.cli.printers_cmd", "printers"),
|
|
24
26
|
"profile": ("fixos.cli.profile_cmd", "profile"),
|
|
25
27
|
"projects": ("fixos.cli.projects_cmd", "projects_cmd"),
|
|
26
28
|
"providers": ("fixos.cli.provider_cmd", "providers"),
|
|
@@ -30,6 +32,7 @@ LAZY_COMMANDS: dict[str, tuple[str, str]] = {
|
|
|
30
32
|
"rollback": ("fixos.cli.rollback_cmd", "rollback"),
|
|
31
33
|
"scan": ("fixos.cli.scan_cmd", "scan"),
|
|
32
34
|
"shell": ("fixos.cli.shell_cmd", "shell_cmd"),
|
|
35
|
+
"storage": ("fixos.cli.storage_cmd", "storage"),
|
|
33
36
|
"test-llm": ("fixos.cli.provider_cmd", "test_llm"),
|
|
34
37
|
"token": ("fixos.cli.token_cmd", "token"),
|
|
35
38
|
"watch": ("fixos.cli.watch_cmd", "watch"),
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""``fixos printers`` — diagnose and repair printing (CUPS / Windows spooler)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import subprocess
|
|
7
|
+
|
|
8
|
+
import click
|
|
9
|
+
|
|
10
|
+
from fixos.plugins.base import Severity
|
|
11
|
+
|
|
12
|
+
_COLORS = {
|
|
13
|
+
Severity.CRITICAL: "red",
|
|
14
|
+
Severity.WARNING: "yellow",
|
|
15
|
+
Severity.INFO: "cyan",
|
|
16
|
+
Severity.OK: "green",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@click.command("printers")
|
|
21
|
+
@click.option("--fix", "apply_fix", is_flag=True, help="Wykonaj proponowane naprawy")
|
|
22
|
+
@click.option("--yes", "-y", is_flag=True, help="Nie pytaj przed każdą naprawą")
|
|
23
|
+
@click.option(
|
|
24
|
+
"--scan",
|
|
25
|
+
is_flag=True,
|
|
26
|
+
help="Przeskanuj lokalną sieć /24, by odnaleźć drukarkę po adresie MAC",
|
|
27
|
+
)
|
|
28
|
+
@click.option(
|
|
29
|
+
"--test-print", "test_queue", default=None, help="Wydrukuj stronę testową"
|
|
30
|
+
)
|
|
31
|
+
@click.option("--json", "as_json", is_flag=True, help="Wynik w formacie JSON")
|
|
32
|
+
def printers(apply_fix, yes, scan, test_queue, as_json) -> None:
|
|
33
|
+
"""
|
|
34
|
+
Diagnostyka i naprawa drukarek (Linux/macOS: CUPS, Windows: Spooler).
|
|
35
|
+
|
|
36
|
+
\b
|
|
37
|
+
Wykrywa m.in. nierozwiązywalną nazwę drukarki sieciowej (np. BRN…),
|
|
38
|
+
nieosiągalny port, wstrzymane kolejki, zablokowane zadania oraz
|
|
39
|
+
przestarzały sterownik, gdy drukarka obsługuje IPP Everywhere.
|
|
40
|
+
|
|
41
|
+
\b
|
|
42
|
+
Przykłady:
|
|
43
|
+
fixos printers # diagnoza
|
|
44
|
+
fixos printers --scan # szukaj drukarki w sieci po MAC
|
|
45
|
+
fixos printers --fix # napraw (z potwierdzeniem)
|
|
46
|
+
fixos printers --test-print NAZWA # strona testowa
|
|
47
|
+
"""
|
|
48
|
+
from fixos.plugins.builtin.printers import Plugin
|
|
49
|
+
|
|
50
|
+
plugin = Plugin(sweep=scan)
|
|
51
|
+
result = plugin.diagnose()
|
|
52
|
+
|
|
53
|
+
if as_json:
|
|
54
|
+
click.echo(json.dumps(result.to_dict(), ensure_ascii=False, indent=2))
|
|
55
|
+
else:
|
|
56
|
+
_render(result)
|
|
57
|
+
|
|
58
|
+
failed = 0
|
|
59
|
+
if apply_fix:
|
|
60
|
+
for finding in result.findings:
|
|
61
|
+
if not finding.command or finding.severity not in (
|
|
62
|
+
Severity.CRITICAL,
|
|
63
|
+
Severity.WARNING,
|
|
64
|
+
):
|
|
65
|
+
continue
|
|
66
|
+
click.echo(
|
|
67
|
+
f"\n→ {finding.title}\n {click.style(finding.command, fg='cyan')}"
|
|
68
|
+
)
|
|
69
|
+
if not yes and not click.confirm(" Wykonać?", default=True):
|
|
70
|
+
continue
|
|
71
|
+
proc = subprocess.run(
|
|
72
|
+
finding.command, check=False, shell=True, text=True, capture_output=True
|
|
73
|
+
)
|
|
74
|
+
if proc.returncode == 0:
|
|
75
|
+
click.echo(click.style(" OK", fg="green"))
|
|
76
|
+
else:
|
|
77
|
+
failed += 1
|
|
78
|
+
click.echo(
|
|
79
|
+
click.style(
|
|
80
|
+
f" FAIL ({proc.returncode}): {proc.stderr[:300]}", fg="red"
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
if test_queue:
|
|
85
|
+
ok, message = plugin.test_print(test_queue)
|
|
86
|
+
click.echo(
|
|
87
|
+
click.style(f"\nStrona testowa: {message}", fg="green" if ok else "red")
|
|
88
|
+
)
|
|
89
|
+
failed += 0 if ok else 1
|
|
90
|
+
|
|
91
|
+
if failed:
|
|
92
|
+
raise SystemExit(1)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def _render(result) -> None:
|
|
96
|
+
queues = result.raw_data.get("queues", [])
|
|
97
|
+
click.echo(click.style(f"Drukarki ({len(queues)}):", fg="cyan", bold=True))
|
|
98
|
+
for queue in queues:
|
|
99
|
+
address = queue.get("address") or queue.get("located_address") or "?"
|
|
100
|
+
click.echo(f" • {queue['name']} {queue['uri']} [{address}]")
|
|
101
|
+
if queue.get("model"):
|
|
102
|
+
click.echo(f" sterownik: {queue['model']}")
|
|
103
|
+
if not result.findings:
|
|
104
|
+
click.echo(click.style("\nBrak problemów.", fg="green"))
|
|
105
|
+
for finding in result.findings:
|
|
106
|
+
color = _COLORS.get(finding.severity, "white")
|
|
107
|
+
click.echo(
|
|
108
|
+
"\n"
|
|
109
|
+
+ click.style(
|
|
110
|
+
f"[{finding.severity.value.upper()}] {finding.title}", fg=color
|
|
111
|
+
)
|
|
112
|
+
)
|
|
113
|
+
click.echo(f" {finding.description}")
|
|
114
|
+
if finding.suggestion:
|
|
115
|
+
click.echo(f" Sugestia: {finding.suggestion}")
|
|
116
|
+
if finding.command:
|
|
117
|
+
click.echo(f" Naprawa: {click.style(finding.command, fg='cyan')}")
|