logicroot 0.2.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.
- logicroot-0.2.0/.gitignore +41 -0
- logicroot-0.2.0/CHANGELOG.md +212 -0
- logicroot-0.2.0/LICENSE +21 -0
- logicroot-0.2.0/PKG-INFO +1188 -0
- logicroot-0.2.0/README.md +1126 -0
- logicroot-0.2.0/pyproject.toml +134 -0
- logicroot-0.2.0/src/logicroot/__init__.py +17 -0
- logicroot-0.2.0/src/logicroot/__main__.py +8 -0
- logicroot-0.2.0/src/logicroot/assistant/__init__.py +57 -0
- logicroot-0.2.0/src/logicroot/assistant/base.py +85 -0
- logicroot-0.2.0/src/logicroot/assistant/context.py +113 -0
- logicroot-0.2.0/src/logicroot/assistant/local.py +198 -0
- logicroot-0.2.0/src/logicroot/assistant/manager.py +107 -0
- logicroot-0.2.0/src/logicroot/assistant/models.py +117 -0
- logicroot-0.2.0/src/logicroot/assistant/openai.py +167 -0
- logicroot-0.2.0/src/logicroot/cleanup/__init__.py +34 -0
- logicroot-0.2.0/src/logicroot/cleanup/executor.py +259 -0
- logicroot-0.2.0/src/logicroot/cleanup/manager.py +46 -0
- logicroot-0.2.0/src/logicroot/cleanup/models.py +133 -0
- logicroot-0.2.0/src/logicroot/cleanup/planner.py +219 -0
- logicroot-0.2.0/src/logicroot/cli.py +558 -0
- logicroot-0.2.0/src/logicroot/cmd/__init__.py +47 -0
- logicroot-0.2.0/src/logicroot/cmd/_common.py +82 -0
- logicroot-0.2.0/src/logicroot/cmd/ask.py +100 -0
- logicroot-0.2.0/src/logicroot/cmd/cleanup.py +92 -0
- logicroot-0.2.0/src/logicroot/cmd/diagnose.py +77 -0
- logicroot-0.2.0/src/logicroot/cmd/gpu.py +50 -0
- logicroot-0.2.0/src/logicroot/cmd/logs.py +177 -0
- logicroot-0.2.0/src/logicroot/cmd/network.py +159 -0
- logicroot-0.2.0/src/logicroot/cmd/processes.py +235 -0
- logicroot-0.2.0/src/logicroot/cmd/services.py +206 -0
- logicroot-0.2.0/src/logicroot/cmd/status.py +66 -0
- logicroot-0.2.0/src/logicroot/cmd/storage.py +202 -0
- logicroot-0.2.0/src/logicroot/config.py +419 -0
- logicroot-0.2.0/src/logicroot/constants.py +226 -0
- logicroot-0.2.0/src/logicroot/core/__init__.py +3 -0
- logicroot-0.2.0/src/logicroot/core/capabilities.py +266 -0
- logicroot-0.2.0/src/logicroot/core/command.py +266 -0
- logicroot-0.2.0/src/logicroot/core/permissions.py +114 -0
- logicroot-0.2.0/src/logicroot/core/platform.py +163 -0
- logicroot-0.2.0/src/logicroot/core/validation.py +174 -0
- logicroot-0.2.0/src/logicroot/diagnostics/__init__.py +21 -0
- logicroot-0.2.0/src/logicroot/diagnostics/boot.py +154 -0
- logicroot-0.2.0/src/logicroot/diagnostics/engine.py +200 -0
- logicroot-0.2.0/src/logicroot/diagnostics/models.py +102 -0
- logicroot-0.2.0/src/logicroot/diagnostics/rules.py +569 -0
- logicroot-0.2.0/src/logicroot/exceptions.py +102 -0
- logicroot-0.2.0/src/logicroot/hardware/__init__.py +8 -0
- logicroot-0.2.0/src/logicroot/hardware/backend.py +199 -0
- logicroot-0.2.0/src/logicroot/hardware/backends/__init__.py +9 -0
- logicroot-0.2.0/src/logicroot/hardware/backends/linux.py +131 -0
- logicroot-0.2.0/src/logicroot/hardware/backends/macos.py +874 -0
- logicroot-0.2.0/src/logicroot/hardware/backends/powershell.py +102 -0
- logicroot-0.2.0/src/logicroot/hardware/backends/windows.py +1182 -0
- logicroot-0.2.0/src/logicroot/hardware/battery.py +123 -0
- logicroot-0.2.0/src/logicroot/hardware/bluetooth.py +94 -0
- logicroot-0.2.0/src/logicroot/hardware/cache.py +131 -0
- logicroot-0.2.0/src/logicroot/hardware/capabilities.py +743 -0
- logicroot-0.2.0/src/logicroot/hardware/context.py +149 -0
- logicroot-0.2.0/src/logicroot/hardware/cpu.py +236 -0
- logicroot-0.2.0/src/logicroot/hardware/discovery.py +234 -0
- logicroot-0.2.0/src/logicroot/hardware/display.py +109 -0
- logicroot-0.2.0/src/logicroot/hardware/gpu.py +243 -0
- logicroot-0.2.0/src/logicroot/hardware/memory.py +88 -0
- logicroot-0.2.0/src/logicroot/hardware/models.py +784 -0
- logicroot-0.2.0/src/logicroot/hardware/network.py +313 -0
- logicroot-0.2.0/src/logicroot/hardware/packages.py +107 -0
- logicroot-0.2.0/src/logicroot/hardware/pci.py +187 -0
- logicroot-0.2.0/src/logicroot/hardware/storage.py +192 -0
- logicroot-0.2.0/src/logicroot/hardware/system.py +191 -0
- logicroot-0.2.0/src/logicroot/hardware/systemd.py +86 -0
- logicroot-0.2.0/src/logicroot/hardware/thermal.py +91 -0
- logicroot-0.2.0/src/logicroot/hardware/tools.py +120 -0
- logicroot-0.2.0/src/logicroot/hardware/usb.py +137 -0
- logicroot-0.2.0/src/logicroot/logs/__init__.py +16 -0
- logicroot-0.2.0/src/logicroot/logs/journal.py +160 -0
- logicroot-0.2.0/src/logicroot/logs/manager.py +67 -0
- logicroot-0.2.0/src/logicroot/logs/models.py +122 -0
- logicroot-0.2.0/src/logicroot/network/__init__.py +38 -0
- logicroot-0.2.0/src/logicroot/network/connections.py +175 -0
- logicroot-0.2.0/src/logicroot/network/foreign.py +604 -0
- logicroot-0.2.0/src/logicroot/network/interfaces.py +277 -0
- logicroot-0.2.0/src/logicroot/network/manager.py +151 -0
- logicroot-0.2.0/src/logicroot/network/models.py +150 -0
- logicroot-0.2.0/src/logicroot/network/ping.py +170 -0
- logicroot-0.2.0/src/logicroot/processes/__init__.py +30 -0
- logicroot-0.2.0/src/logicroot/processes/foreign.py +213 -0
- logicroot-0.2.0/src/logicroot/processes/manager.py +412 -0
- logicroot-0.2.0/src/logicroot/processes/models.py +175 -0
- logicroot-0.2.0/src/logicroot/processes/reader.py +243 -0
- logicroot-0.2.0/src/logicroot/providers/__init__.py +5 -0
- logicroot-0.2.0/src/logicroot/providers/gpu/__init__.py +21 -0
- logicroot-0.2.0/src/logicroot/providers/gpu/amd.py +135 -0
- logicroot-0.2.0/src/logicroot/providers/gpu/base.py +99 -0
- logicroot-0.2.0/src/logicroot/providers/gpu/collector.py +153 -0
- logicroot-0.2.0/src/logicroot/providers/gpu/intel.py +114 -0
- logicroot-0.2.0/src/logicroot/providers/gpu/nvidia.py +185 -0
- logicroot-0.2.0/src/logicroot/providers/package/__init__.py +26 -0
- logicroot-0.2.0/src/logicroot/providers/package/apt.py +26 -0
- logicroot-0.2.0/src/logicroot/providers/package/base.py +127 -0
- logicroot-0.2.0/src/logicroot/providers/package/dnf.py +37 -0
- logicroot-0.2.0/src/logicroot/providers/package/pacman.py +25 -0
- logicroot-0.2.0/src/logicroot/providers/package/zypper.py +24 -0
- logicroot-0.2.0/src/logicroot/providers/services/__init__.py +6 -0
- logicroot-0.2.0/src/logicroot/providers/services/base.py +40 -0
- logicroot-0.2.0/src/logicroot/providers/services/systemd.py +11 -0
- logicroot-0.2.0/src/logicroot/services/__init__.py +25 -0
- logicroot-0.2.0/src/logicroot/services/foreign.py +230 -0
- logicroot-0.2.0/src/logicroot/services/manager.py +149 -0
- logicroot-0.2.0/src/logicroot/services/models.py +116 -0
- logicroot-0.2.0/src/logicroot/services/systemd.py +200 -0
- logicroot-0.2.0/src/logicroot/storage/__init__.py +27 -0
- logicroot-0.2.0/src/logicroot/storage/analyzer.py +373 -0
- logicroot-0.2.0/src/logicroot/storage/manager.py +86 -0
- logicroot-0.2.0/src/logicroot/storage/models.py +128 -0
- logicroot-0.2.0/src/logicroot/storage/scanner.py +252 -0
- logicroot-0.2.0/src/logicroot/system/__init__.py +38 -0
- logicroot-0.2.0/src/logicroot/system/foreign.py +373 -0
- logicroot-0.2.0/src/logicroot/system/models.py +248 -0
- logicroot-0.2.0/src/logicroot/system/monitor.py +145 -0
- logicroot-0.2.0/src/logicroot/system/reader.py +629 -0
- logicroot-0.2.0/src/logicroot/system/sampler.py +311 -0
- logicroot-0.2.0/src/logicroot/ui/__init__.py +24 -0
- logicroot-0.2.0/src/logicroot/ui/app.py +186 -0
- logicroot-0.2.0/src/logicroot/ui/console.py +63 -0
- logicroot-0.2.0/src/logicroot/ui/launcher.py +57 -0
- logicroot-0.2.0/src/logicroot/ui/panels.py +417 -0
- logicroot-0.2.0/src/logicroot/ui/screens/__init__.py +25 -0
- logicroot-0.2.0/src/logicroot/ui/screens/base.py +59 -0
- logicroot-0.2.0/src/logicroot/ui/screens/cleanup.py +130 -0
- logicroot-0.2.0/src/logicroot/ui/screens/dashboard.py +109 -0
- logicroot-0.2.0/src/logicroot/ui/screens/diagnose.py +83 -0
- logicroot-0.2.0/src/logicroot/ui/screens/gpu.py +87 -0
- logicroot-0.2.0/src/logicroot/ui/screens/logs.py +107 -0
- logicroot-0.2.0/src/logicroot/ui/screens/network.py +165 -0
- logicroot-0.2.0/src/logicroot/ui/screens/processes.py +199 -0
- logicroot-0.2.0/src/logicroot/ui/screens/services.py +173 -0
- logicroot-0.2.0/src/logicroot/ui/screens/storage.py +147 -0
- logicroot-0.2.0/src/logicroot/ui/theme.py +114 -0
- logicroot-0.2.0/src/logicroot/ui/views.py +628 -0
- logicroot-0.2.0/src/logicroot/ui/widgets/__init__.py +13 -0
- logicroot-0.2.0/src/logicroot/ui/widgets/dialogs.py +65 -0
- logicroot-0.2.0/src/logicroot/ui/widgets/gauges.py +113 -0
- logicroot-0.2.0/src/logicroot/utils/__init__.py +1 -0
- logicroot-0.2.0/src/logicroot/utils/fs.py +172 -0
- logicroot-0.2.0/src/logicroot/utils/logging.py +183 -0
- logicroot-0.2.0/src/logicroot/utils/serialize.py +168 -0
- logicroot-0.2.0/src/logicroot/utils/text.py +144 -0
- logicroot-0.2.0/tests/__init__.py +5 -0
- logicroot-0.2.0/tests/conftest.py +162 -0
- logicroot-0.2.0/tests/fixtures/__init__.py +1 -0
- logicroot-0.2.0/tests/fixtures/scenarios.py +1231 -0
- logicroot-0.2.0/tests/mocks/__init__.py +1 -0
- logicroot-0.2.0/tests/mocks/command.py +113 -0
- logicroot-0.2.0/tests/test_cache.py +140 -0
- logicroot-0.2.0/tests/test_capabilities.py +568 -0
- logicroot-0.2.0/tests/test_cli.py +388 -0
- logicroot-0.2.0/tests/test_config.py +247 -0
- logicroot-0.2.0/tests/test_core.py +254 -0
- logicroot-0.2.0/tests/test_discovery.py +929 -0
- logicroot-0.2.0/tests/test_panels.py +274 -0
- logicroot-0.2.0/tests/test_parsers.py +435 -0
- logicroot-0.2.0/tests/test_serialize.py +187 -0
- logicroot-0.2.0/tests/test_tools.py +243 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Byte-compiled / optimized
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# Distribution / packaging
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
.eggs/
|
|
11
|
+
pip-wheel-metadata/
|
|
12
|
+
|
|
13
|
+
# Virtual environments
|
|
14
|
+
.venv/
|
|
15
|
+
venv/
|
|
16
|
+
env/
|
|
17
|
+
|
|
18
|
+
# Test and type-check caches
|
|
19
|
+
.pytest_cache/
|
|
20
|
+
.mypy_cache/
|
|
21
|
+
.ruff_cache/
|
|
22
|
+
.coverage
|
|
23
|
+
.coverage.*
|
|
24
|
+
htmlcov/
|
|
25
|
+
coverage.xml
|
|
26
|
+
|
|
27
|
+
# Tooling
|
|
28
|
+
.tox/
|
|
29
|
+
.nox/
|
|
30
|
+
.hypothesis/
|
|
31
|
+
|
|
32
|
+
# Editors and OS noise
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
35
|
+
*.swp
|
|
36
|
+
.DS_Store
|
|
37
|
+
Thumbs.db
|
|
38
|
+
|
|
39
|
+
# Local LOGICROOT state (should never be committed)
|
|
40
|
+
logicroot.log
|
|
41
|
+
*.local.toml
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project uses
|
|
5
|
+
semantic versioning once it leaves alpha.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
Nothing yet.
|
|
10
|
+
|
|
11
|
+
## [0.2.0] — Milestones 3–14
|
|
12
|
+
|
|
13
|
+
The full command center: live monitoring, process/service/storage/network
|
|
14
|
+
management, GPU telemetry, logs, diagnostics, cleanup, the interactive
|
|
15
|
+
dashboard, and the opt-in assistant. Still alpha — the schema will change.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
**Milestone 3 — live system monitoring (`logicroot status`, `logicroot.system`)**
|
|
20
|
+
|
|
21
|
+
- Native `/proc` + `/sys` + `statvfs` sampling with no third-party dependency:
|
|
22
|
+
CPU utilisation via two-sample jiffy deltas (never 0% on the first tick),
|
|
23
|
+
memory/swap from `meminfo`, per-mount capacity, thermal zones plus hwmon
|
|
24
|
+
sensors, battery state, per-interface counters, load averages.
|
|
25
|
+
- Windows sampler (one CIM query) and macOS sampler (`sysctl`/`vm_stat`/`df`
|
|
26
|
+
/`pmset`); unsupported hosts yield empty snapshots, not exceptions.
|
|
27
|
+
- Background `MetricMonitor` with bounded history feeding the dashboard
|
|
28
|
+
sparklines.
|
|
29
|
+
|
|
30
|
+
**Milestone 4 — process manager (`logicroot processes`, `logicroot.processes`)**
|
|
31
|
+
|
|
32
|
+
- `/proc/[pid]` reader handling parenthesised names, kernel threads, UID
|
|
33
|
+
resolution, and RSS fallbacks; top-style CPU% from wall-clock deltas.
|
|
34
|
+
- List/search/sort/inspect/tree views; `terminate` (SIGTERM + exit wait) and
|
|
35
|
+
`kill` (SIGKILL) gated by confirmation, refusing PID 1 and LOGICROOT itself.
|
|
36
|
+
- Windows (CIM, command lines on inspect only) and macOS (`ps`) readers
|
|
37
|
+
producing the same normalized rows.
|
|
38
|
+
|
|
39
|
+
**Milestone 5 — service manager (`logicroot services`, `logicroot.services`)**
|
|
40
|
+
|
|
41
|
+
- `systemd` provider over `systemctl` only (list-units, show, is-enabled,
|
|
42
|
+
start/stop/restart), mapping privilege refusals to exit 3 without
|
|
43
|
+
escalating; Windows SCM provider (CIM + `sc.exe`); macOS launchd listing
|
|
44
|
+
with control honestly unsupported.
|
|
45
|
+
|
|
46
|
+
**Milestone 6 — storage analysis (`logicroot storage`, `logicroot.storage`)**
|
|
47
|
+
|
|
48
|
+
- Bounded tree scanner (single filesystem by default, no symlink following,
|
|
49
|
+
cancellable, error-tolerant) with bottom-up directory aggregates.
|
|
50
|
+
- Largest-file ranking, three-phase duplicate detection (size → prefix hash
|
|
51
|
+
→ full SHA-256), and a platform cache inventory.
|
|
52
|
+
|
|
53
|
+
**Milestone 7 — network operations (`logicroot network`, `logicroot.network`)**
|
|
54
|
+
|
|
55
|
+
- Live interfaces (ioctl addresses, `/proc/net/if_inet6`, gateway, DNS),
|
|
56
|
+
`/proc/net` socket parsing with inode→process resolution, throughput
|
|
57
|
+
measurement, and validated `ping` across all three platforms.
|
|
58
|
+
|
|
59
|
+
**Milestone 8 — providers (`logicroot.providers`, `logicroot gpu`)**
|
|
60
|
+
|
|
61
|
+
- NVIDIA (`nvidia-smi` CSV, UUID process attribution), AMD (`rocm-smi`
|
|
62
|
+
JSON, schema-tolerant), Intel (`intel_gpu_top` single sample) telemetry
|
|
63
|
+
paired with detected GPUs; per-manager package-cache measurement
|
|
64
|
+
(dnf/dnf5/apt/pacman/zypper).
|
|
65
|
+
|
|
66
|
+
**Milestone 9 — logs (`logicroot logs`, `logicroot.logs`)**
|
|
67
|
+
|
|
68
|
+
- `journalctl --output=json` reader with unit/priority/since/until/boot
|
|
69
|
+
filters, error shortcut, and boot history; unavailable off Linux with a
|
|
70
|
+
reason.
|
|
71
|
+
|
|
72
|
+
**Milestone 10 — diagnostics (`logicroot diagnose`, `logicroot.diagnostics`)**
|
|
73
|
+
|
|
74
|
+
- Eleven pure rules over one gathered bundle (CPU, memory, disk, read-only,
|
|
75
|
+
thermals, battery, network errors, GPU, failed services, boot, metric
|
|
76
|
+
availability) with worst-first findings, suggestions, passed/skipped lists,
|
|
77
|
+
and user `[thresholds]` honoured; `systemd-analyze` boot parsing.
|
|
78
|
+
|
|
79
|
+
**Milestone 11 — cleanup (`logicroot cleanup`, `logicroot.cleanup`)**
|
|
80
|
+
|
|
81
|
+
- Read-only planning from cache/package/journal informants with
|
|
82
|
+
safe/review/system risk labels; confirmed execution clears only planned
|
|
83
|
+
user-owned locations (symlinks unlinked, never followed) and prints exact
|
|
84
|
+
privileged commands for the rest.
|
|
85
|
+
|
|
86
|
+
**Milestone 12 — dashboard (`logicroot` on a terminal, `logicroot.ui`)**
|
|
87
|
+
|
|
88
|
+
- Textual app with sidebar navigation and nine screens (dashboard, processes,
|
|
89
|
+
services, storage, network, GPU, logs, diagnose, cleanup), per-screen
|
|
90
|
+
refresh cadences, worker-thread loading, confirmation modals, and
|
|
91
|
+
capability-aware degradation. Optional `tui` extra; bare `logicroot` falls back
|
|
92
|
+
to the text summary on pipes and minimal installs.
|
|
93
|
+
|
|
94
|
+
**Milestone 13 — assistant (`logicroot ask`, `logicroot.assistant`)**
|
|
95
|
+
|
|
96
|
+
- Offline rule-based answers from LOGICROOT data by default; network provider
|
|
97
|
+
(OpenAI-compatible, stdlib HTTP, no new dependency) only with
|
|
98
|
+
`privacy.allow_ai = true` + `LOGICROOT_AI_API_KEY` + `--ai`. Text-only replies,
|
|
99
|
+
scrubbed contexts, no file contents or command lines sent.
|
|
100
|
+
|
|
101
|
+
### Fixed
|
|
102
|
+
|
|
103
|
+
- `SubprocessCommandRunner` rejected absolute binary paths (breaking `ping`,
|
|
104
|
+
`/bin/ps`, and any caller passing a resolved path); explicit paths that
|
|
105
|
+
point at real files now execute.
|
|
106
|
+
- Windows network speeds showed `9223372036854 Mb/s` from the disconnected-
|
|
107
|
+
adapter sentinel; terabit-plus values now read as unknown.
|
|
108
|
+
- Windows DNS list included interface addresses from a config-map key
|
|
109
|
+
collision; servers and addresses are collected separately.
|
|
110
|
+
- Storage scanner skipped every subdirectory on Windows (`st_dev` 0 vs real
|
|
111
|
+
volume id); a zero device now means "unknown", never "different".
|
|
112
|
+
- Duplicate cache entries (`TEMP` vs `Local Temp`) are collapsed in both the
|
|
113
|
+
analyzer and the cleanup planner.
|
|
114
|
+
|
|
115
|
+
[Unreleased]: https://github.com/madhav-manchanda/linx/compare/v0.2.0...HEAD
|
|
116
|
+
[0.2.0]: https://github.com/madhav-manchanda/linx/releases/tag/v0.2.0
|
|
117
|
+
[0.1.0]: https://github.com/madhav-manchanda/linx/releases/tag/v0.1.0
|
|
118
|
+
|
|
119
|
+
## [0.1.0] — Milestones 1–2
|
|
120
|
+
|
|
121
|
+
The first runnable build: LOGICROOT can detect a Linux machine, decide what that
|
|
122
|
+
machine is capable of, and say so in the terminal or as JSON.
|
|
123
|
+
|
|
124
|
+
### Added
|
|
125
|
+
|
|
126
|
+
**Foundation**
|
|
127
|
+
|
|
128
|
+
- `pyproject.toml` with a `logicroot` console script, Ruff and strict mypy, and a
|
|
129
|
+
`dev` extra.
|
|
130
|
+
- Typed error hierarchy carrying user-facing hints and exit codes.
|
|
131
|
+
- Exit-code contract: `0` success, `1` error, `2` usage, `3` permission,
|
|
132
|
+
`4` unsupported, `5` incomplete profile.
|
|
133
|
+
- Bounded, argv-only subprocess execution (`shell=False`, per-command timeouts)
|
|
134
|
+
behind an injectable runner interface.
|
|
135
|
+
- Tolerant filesystem readers for the many shapes Linux uses — one-line values,
|
|
136
|
+
`KEY=value` uevents, whitespace-padded integers, `0x`-prefixed sizes.
|
|
137
|
+
- `tomllib` configuration with strict and lenient modes, XDG paths on every
|
|
138
|
+
platform, and atomic writes that never clobber an existing file.
|
|
139
|
+
- Normalized, versioned serialization (`schema_version` on every profile).
|
|
140
|
+
|
|
141
|
+
**Hardware discovery** — one module per subsystem, all failure-isolated:
|
|
142
|
+
|
|
143
|
+
OS and kernel (including WSL and container detection), CPU topology, memory and
|
|
144
|
+
NUMA, thermal zones, PCI devices with driver binding and `pci.ids` vendor
|
|
145
|
+
lookup, USB devices, GPUs (NVIDIA/AMD/Intel, with VRAM and driver provenance),
|
|
146
|
+
DRM display connectors and headless detection, block devices with rotational
|
|
147
|
+
and SSD heuristics, network interfaces with addresses, routes, nameservers and
|
|
148
|
+
Wi-Fi, batteries, Bluetooth, optional-tool inventory, systemd, container
|
|
149
|
+
runtimes, and package-manager detection for dnf5, apt, pacman and zypper.
|
|
150
|
+
|
|
151
|
+
- Single discovery timestamp shared by `discovered_at`, `uptime_seconds` and
|
|
152
|
+
`boot_time`, derived from `/proc/uptime`.
|
|
153
|
+
- `DiscoveryContext` as the single injection point for roots and the command
|
|
154
|
+
runner.
|
|
155
|
+
- Profile cache keyed by boot ID and schema version, with a TTL.
|
|
156
|
+
|
|
157
|
+
**Capabilities**
|
|
158
|
+
|
|
159
|
+
- 38 capabilities derived from the discovered profile.
|
|
160
|
+
- Every disabled capability carries an actionable reason; a test asserts that
|
|
161
|
+
no capability is left undecided and none is blank.
|
|
162
|
+
|
|
163
|
+
**CLI and UI**
|
|
164
|
+
|
|
165
|
+
- `logicroot`, `logicroot hardware`, `logicroot capabilities`, `logicroot config`, each with
|
|
166
|
+
`--json`.
|
|
167
|
+
- Global `--no-cache`, `--config`, `--verbose`, `--debug`, `--version`.
|
|
168
|
+
- Rich panels for the hardware profile, capability table, startup summary and
|
|
169
|
+
unsupported-platform notice, bounded to 40–120 columns and degrading to plain
|
|
170
|
+
text when piped.
|
|
171
|
+
- Unsupported hosts get exit `4` and, with `--json`, a machine-readable
|
|
172
|
+
`error` object.
|
|
173
|
+
|
|
174
|
+
**Tests** — 412 tests, no hardware required
|
|
175
|
+
|
|
176
|
+
- Seven mocked machines (A–G) covering workstation, laptop, server, container,
|
|
177
|
+
proprietary-NVIDIA box, foreign kernel and a locked-down host.
|
|
178
|
+
- Parser tests written against byte-accurate real output, plus profile, cache,
|
|
179
|
+
serialization, capability, panel and CLI suites.
|
|
180
|
+
- The suite passes on Windows and Linux; host-dependent behaviour is patched
|
|
181
|
+
rather than assumed.
|
|
182
|
+
|
|
183
|
+
### Fixed
|
|
184
|
+
|
|
185
|
+
Bugs found while building the test scenarios, all of which would have shipped:
|
|
186
|
+
|
|
187
|
+
- `iw dev <if> link` output is tab-indented, so the `SSID:` pattern never
|
|
188
|
+
matched and no wireless network was ever named.
|
|
189
|
+
- `ip -j address show` entries without a `family` key were silently dropped;
|
|
190
|
+
IPv6 and IPv4 addresses both come from that key.
|
|
191
|
+
- `lspci -Dmm` prints the **vendor** before the **device**; the parser had them
|
|
192
|
+
reversed, so every PCI and GPU name was wrong.
|
|
193
|
+
- `lsusb` accepts both `Device` and `Dev`; only the first was parsed.
|
|
194
|
+
- USB Bluetooth class `e0/01` could never match, so Bluetooth adapters were
|
|
195
|
+
reported as absent on any Realtek or Mediatek dongle.
|
|
196
|
+
- `/proc/net/fib_trie` leaf addresses carry trailing flags
|
|
197
|
+
(`192.168.1.42/32 host LOCAL`), so no address was ever extracted; the default
|
|
198
|
+
route `0.0.0.0` was not excluded.
|
|
199
|
+
- A PCI device with a `driver` link pointing at a missing directory reported no
|
|
200
|
+
driver at all.
|
|
201
|
+
- `columns_of()` divided by zero on any console narrower than the requested
|
|
202
|
+
column width, crashing the hint layout on small terminals.
|
|
203
|
+
- `PLATFORM_SUDO` and `NETWORK_METRICS` were declared capabilities but never
|
|
204
|
+
registered, so they vanished from `logicroot capabilities` entirely.
|
|
205
|
+
- XDG directory resolution was memoized, so tests could not redirect it, and
|
|
206
|
+
the POSIX fallbacks were reported as unreachable when type-checking on
|
|
207
|
+
Windows.
|
|
208
|
+
- A broken `config.toml` was fatal in normal operation; it now warns and falls
|
|
209
|
+
back to defaults, and stays fatal only under `--debug`.
|
|
210
|
+
|
|
211
|
+
[Unreleased]: https://github.com/madhav-manchanda/linx/compare/v0.1.0...HEAD
|
|
212
|
+
[0.1.0]: https://github.com/madhav-manchanda/linx/releases/tag/v0.1.0
|
logicroot-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Madhav Manchanda
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|