devin-doctor 0.1.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.
- devin_doctor-0.1.0/LICENSE +21 -0
- devin_doctor-0.1.0/PKG-INFO +192 -0
- devin_doctor-0.1.0/README.md +178 -0
- devin_doctor-0.1.0/pyproject.toml +27 -0
- devin_doctor-0.1.0/setup.cfg +4 -0
- devin_doctor-0.1.0/src/devin_doctor/__init__.py +1 -0
- devin_doctor-0.1.0/src/devin_doctor/capabilities.py +281 -0
- devin_doctor-0.1.0/src/devin_doctor/checks/__init__.py +18 -0
- devin_doctor-0.1.0/src/devin_doctor/checks/config.py +318 -0
- devin_doctor-0.1.0/src/devin_doctor/checks/disk.py +97 -0
- devin_doctor-0.1.0/src/devin_doctor/checks/health.py +146 -0
- devin_doctor-0.1.0/src/devin_doctor/checks/hooks_windows.py +244 -0
- devin_doctor-0.1.0/src/devin_doctor/checks/schema.py +142 -0
- devin_doctor-0.1.0/src/devin_doctor/checks/stores.py +136 -0
- devin_doctor-0.1.0/src/devin_doctor/cli.py +151 -0
- devin_doctor-0.1.0/src/devin_doctor/doctor.py +143 -0
- devin_doctor-0.1.0/src/devin_doctor/model.py +94 -0
- devin_doctor-0.1.0/src/devin_doctor/paths.py +127 -0
- devin_doctor-0.1.0/src/devin_doctor.egg-info/PKG-INFO +192 -0
- devin_doctor-0.1.0/src/devin_doctor.egg-info/SOURCES.txt +34 -0
- devin_doctor-0.1.0/src/devin_doctor.egg-info/dependency_links.txt +1 -0
- devin_doctor-0.1.0/src/devin_doctor.egg-info/entry_points.txt +2 -0
- devin_doctor-0.1.0/src/devin_doctor.egg-info/requires.txt +4 -0
- devin_doctor-0.1.0/src/devin_doctor.egg-info/top_level.txt +1 -0
- devin_doctor-0.1.0/tests/test_capabilities.py +148 -0
- devin_doctor-0.1.0/tests/test_cli.py +138 -0
- devin_doctor-0.1.0/tests/test_config.py +121 -0
- devin_doctor-0.1.0/tests/test_disk.py +59 -0
- devin_doctor-0.1.0/tests/test_doctor.py +17 -0
- devin_doctor-0.1.0/tests/test_health.py +98 -0
- devin_doctor-0.1.0/tests/test_hooks_windows.py +203 -0
- devin_doctor-0.1.0/tests/test_offline_core.py +97 -0
- devin_doctor-0.1.0/tests/test_paths.py +36 -0
- devin_doctor-0.1.0/tests/test_schema.py +79 -0
- devin_doctor-0.1.0/tests/test_smoke.py +4 -0
- devin_doctor-0.1.0/tests/test_stores.py +64 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Icaro0310
|
|
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.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devin-doctor
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Diagnose a Devin Desktop installation: stores, schema versions, hooks, MCP servers, disk usage — with fix suggestions.
|
|
5
|
+
Author: Icaro0310
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: devin-internals-spec<0.4.0,>=0.3.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
|
|
17
|
+
<img src="assets/banner.svg" alt="devin-doctor" width="100%"/>
|
|
18
|
+
|
|
19
|
+
<a href="https://github.com/Icaro0310/devin-doctor/actions/workflows/ci.yml"><img src="https://github.com/Icaro0310/devin-doctor/actions/workflows/ci.yml/badge.svg" alt="CI"/></a>
|
|
20
|
+
<a href="https://github.com/Icaro0310/devin-doctor/releases"><img src="https://img.shields.io/github/v/release/Icaro0310/devin-doctor" alt="GitHub release"/></a>
|
|
21
|
+
<a href="https://scorecard.dev/viewer/?uri=github.com/Icaro0310/devin-doctor"><img src="https://api.scorecard.dev/projects/github.com/Icaro0310/devin-doctor/badge" alt="OpenSSF Scorecard"/></a>
|
|
22
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="License: MIT"/></a>
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
# devin-doctor
|
|
28
|
+
|
|
29
|
+
> **Unofficial community project.** Not affiliated with, endorsed by, or
|
|
30
|
+
> sponsored by Cognition AI. "Devin" is a trademark of Cognition AI.
|
|
31
|
+
|
|
32
|
+
**[Linux](README.linux.md)** · **[Personal Windows](README.windows.md)** · **[Corporate Windows](README.corporate-windows.md)**
|
|
33
|
+
|
|
34
|
+
Part of the [awesome-devin](https://github.com/Icaro0310/awesome-devin) ecosystem: the curated hub for the devin-* tools.
|
|
35
|
+
|
|
36
|
+
`devin-doctor` diagnoses a Devin Desktop installation — one command that
|
|
37
|
+
checks the local stores, schema versions, config files and disk usage, then
|
|
38
|
+
prints a health report with concrete fix suggestions. Read-only, always.
|
|
39
|
+
|
|
40
|
+
## The problem
|
|
41
|
+
|
|
42
|
+
Devin keeps a lot of local state: a versioned `sessions.db`, one
|
|
43
|
+
`acp-messages/*.db` per GUI session, a `state.vscdb` KV store,
|
|
44
|
+
`credentials.toml` and JSONC config files. When any of it breaks or bloats —
|
|
45
|
+
a schema the tooling doesn't know, a locked database, an unreadable hooks
|
|
46
|
+
file, a 700 MiB sessions store — nothing warns you. You find out indirectly:
|
|
47
|
+
missing history, auth errors, disk pressure.
|
|
48
|
+
|
|
49
|
+
`devin-doctor` is `brew doctor` for that installation.
|
|
50
|
+
|
|
51
|
+
## Prior art
|
|
52
|
+
|
|
53
|
+
- `brew doctor` / `flutter doctor` — the genre: one command, many checks,
|
|
54
|
+
PASS/WARN/FAIL with fix suggestions. This project adapts the pattern; it
|
|
55
|
+
does not reinvent it.
|
|
56
|
+
- [`devin-internals-spec`](https://github.com/Icaro0310/devin-internals-spec)
|
|
57
|
+
— provides the schema-version detector, the read-only store parsers and
|
|
58
|
+
the fixture generator this project builds on.
|
|
59
|
+
|
|
60
|
+
## What makes it Devin-native
|
|
61
|
+
|
|
62
|
+
It understands Devin's actual on-disk layout — the `refinery_schema_history`
|
|
63
|
+
migration ledger, the `acp-messages` per-session stores, `state.vscdb`, and
|
|
64
|
+
the `.devin/` hooks/MCP config format — things no generic system check can
|
|
65
|
+
see. Remove Devin and there is nothing to diagnose.
|
|
66
|
+
|
|
67
|
+
## Install
|
|
68
|
+
|
|
69
|
+
Python ≥ 3.10 and `pipx` are required. **Windows (PowerShell):** install `pipx` with `py -m pip install --user pipx`, run `py -m pipx ensurepath`, then reopen the terminal. **Linux (Debian/Ubuntu):** run `sudo apt install pipx python3-venv` and `pipx ensurepath`; reopen the terminal. Other Linux distributions should install `pipx` using their package manager.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pipx install "devin-doctor @ git+https://github.com/Icaro0310/devin-doctor.git"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
(Not published on PyPI yet; the GitHub install above is the supported route.)
|
|
76
|
+
|
|
77
|
+
## Usage
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
devin-doctor check # diagnose the default data dir
|
|
81
|
+
devin-doctor check --data-dir D:\devin-backup
|
|
82
|
+
# Use a separate Devin UI config root (e.g. Linux)
|
|
83
|
+
devin-doctor check --data-dir ~/.local/share/devin --config-dir ~/.config/Devin
|
|
84
|
+
devin-doctor check --json # machine-readable output
|
|
85
|
+
devin-doctor report --md # markdown, for pasting into issues
|
|
86
|
+
devin-doctor capabilities # machine capability profile, JSON
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Each check prints `PASS`/`WARN`/`FAIL`, a one-line finding and a `fix:`
|
|
90
|
+
suggestion. Exit code is `0` unless something `FAIL`s (then `1`).
|
|
91
|
+
|
|
92
|
+
The six checks:
|
|
93
|
+
|
|
94
|
+
| check | reports |
|
|
95
|
+
|---|---|
|
|
96
|
+
| `stores` | present/missing, sizes and row counts for `sessions.db`, `acp-messages/*.db`, `state.vscdb` |
|
|
97
|
+
| `schema` | schema version vs the supported range (15–17); layout recognition for the ledger-less stores |
|
|
98
|
+
| `health-of-data` | empty sessions, orphan `message_nodes`, sessions idle > `--stale-days`, `SQLITE_BUSY` locks |
|
|
99
|
+
| `config` | `credentials.toml` presence + validity (**values masked**); `.devin/` hooks/MCP config sanity |
|
|
100
|
+
| `hooks-windows` | hooks/MCP commands that would pop a visible console window on Windows (`cmd /c` without a hidden wrapper, `powershell` without `-WindowStyle Hidden`, direct `.bat`/`.ps1`, `python.exe` vs `pythonw.exe`) — each with file, hook event and a wrapper fix |
|
|
101
|
+
| `disk` | total data-dir size, largest DBs, `acp-messages` accumulation trend |
|
|
102
|
+
|
|
103
|
+
## Capability profile
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
devin-doctor capabilities # JSON profile, exit 0
|
|
107
|
+
devin-doctor capabilities --probe-network
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`capabilities` prints a JSON object — `{"profile": ..., "capabilities":
|
|
111
|
+
{...}}` — describing what the machine can do for the ecosystem (scheduler,
|
|
112
|
+
daemon, local LLM, containers, comms, proxy, ≥24 GiB RAM, …). The profile is
|
|
113
|
+
`corporate` by default (**fail-closed**); `personal` applies only when
|
|
114
|
+
explicitly declared via `DEVIN_ECOSYSTEM_PROFILE=corporate|personal` or
|
|
115
|
+
`devin-profile.json` (`{"profile": "personal"}`) in the Devin config dir —
|
|
116
|
+
the env var wins. All probing is local; `net.outbound`/`net.listener`
|
|
117
|
+
stay `"unknown"` unless `--probe-network` is passed, which performs exactly
|
|
118
|
+
ONE outbound TCP connect (1.1.1.1:443 or the configured `HTTPS_PROXY`, 2 s
|
|
119
|
+
timeout) plus a loopback bind — the only network call this tool can make.
|
|
120
|
+
|
|
121
|
+
## Works with Devin alone (Devin-only mode)
|
|
122
|
+
|
|
123
|
+
devin-doctor is a pure local diagnostic: it reads Devin's own data
|
|
124
|
+
directories, writes nothing, and never contacts a network service. No VM, no
|
|
125
|
+
Tailscale, no Ollama, no Slack — just Devin Desktop plus Python. On a
|
|
126
|
+
restricted or corporate machine it is the safest first tool: install, run
|
|
127
|
+
`devin-doctor`, read the report.
|
|
128
|
+
|
|
129
|
+
## Platform support
|
|
130
|
+
|
|
131
|
+
Tested on Windows and Linux. On Linux, session data defaults to
|
|
132
|
+
`$XDG_DATA_HOME/devin` (normally `~/.local/share/devin`) and UI stores default
|
|
133
|
+
to `$XDG_CONFIG_HOME/Devin` (normally `~/.config/Devin`). Windows stores use
|
|
134
|
+
`%APPDATA%\devin` and `%APPDATA%\Devin`. Use `--data-dir` and `--config-dir`
|
|
135
|
+
when the stores are elsewhere. macOS paths exist but are not verified.
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
### `devin-doctor plan` — remediation plan, still read-only
|
|
139
|
+
|
|
140
|
+
`plan` runs the same checks but emits a numbered remediation plan for every
|
|
141
|
+
WARN/FAIL finding (the check's `fix` suggestion) instead of a verdict —
|
|
142
|
+
nothing is executed; execution stays a human decision or another tool's job.
|
|
143
|
+
`--json` gives `{"overall", "steps": [{check, status, finding, fix}]}`.
|
|
144
|
+
This replaced the original `--fix` idea so doctor can keep its
|
|
145
|
+
"read-only, always" guarantee.
|
|
146
|
+
|
|
147
|
+
## Limitations
|
|
148
|
+
|
|
149
|
+
- **Version-bound.** Store parsing follows `devin-internals-spec` (schema
|
|
150
|
+
v15–v17). A newer Devin schema reports FAIL — "unknown version" — by
|
|
151
|
+
design, rather than silently misreading.
|
|
152
|
+
- **Read-only.** It suggests fixes but never touches the data dir. `--fix`
|
|
153
|
+
for the safe items is planned (see `STATUS.md`).
|
|
154
|
+
- **Locked stores.** If Devin is running, DBs may report `SQLITE_BUSY` —
|
|
155
|
+
close Devin and re-run.
|
|
156
|
+
- macOS paths are implemented but not verified in CI.
|
|
157
|
+
|
|
158
|
+
## Development
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
pip install -e ".[dev]"
|
|
162
|
+
python -m pytest
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Tests run entirely on synthetic fixtures generated by
|
|
166
|
+
`devin_internals.fixtures` — no real session data is ever read or required.
|
|
167
|
+
`scripts/make_fixture.py <dir>` builds a fixture data dir for manual runs.
|
|
168
|
+
|
|
169
|
+
## When to use this
|
|
170
|
+
|
|
171
|
+
- Devin misbehaves — missing history, auth errors, disk pressure — and you want one command to localize the cause.
|
|
172
|
+
- You want a health check before debugging: six checks (stores, schema, data health, config, hooks-windows, disk), each with a `fix:` suggestion.
|
|
173
|
+
- You need a paste-able report for a bug report: `devin-doctor report --md`.
|
|
174
|
+
- You are on a restricted machine: it is read-only and never contacts the network.
|
|
175
|
+
|
|
176
|
+
## When NOT to use this
|
|
177
|
+
|
|
178
|
+
- You want it to repair things — it is read-only; `--fix` for safe items is planned.
|
|
179
|
+
- Your Devin schema is newer than v17 — it reports "unknown version" FAIL rather than misread.
|
|
180
|
+
- Devin is running and DBs are locked — close Devin and re-run to clear `SQLITE_BUSY`.
|
|
181
|
+
|
|
182
|
+
## FAQ
|
|
183
|
+
|
|
184
|
+
**How do I check if my Devin installation's local data is healthy?** Run `devin-doctor check`. It inspects `sessions.db`, `acp-messages/*.db`, `state.vscdb`, `credentials.toml` and disk usage, printing `PASS`/`WARN`/`FAIL` per check with a `fix:` suggestion. Exit code is `0` unless something FAILs.
|
|
185
|
+
|
|
186
|
+
**Is devin-doctor safe to run? Will it modify my data?** It is strictly read-only — it opens Devin's stores for reading, writes nothing to the data dir, and never contacts a network service. Config check masks credential values in output. Fixes are suggested as text, never applied.
|
|
187
|
+
|
|
188
|
+
**What does "unknown schema version" mean?** Devin's `sessions.db` schema is versioned; devin-doctor understands v15–v17 via devin-internals-spec. A newer version produces a deliberate FAIL instead of a silent misread — update the tool or devin-internals-spec.
|
|
189
|
+
|
|
190
|
+
## License
|
|
191
|
+
|
|
192
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="assets/banner.svg" alt="devin-doctor" width="100%"/>
|
|
4
|
+
|
|
5
|
+
<a href="https://github.com/Icaro0310/devin-doctor/actions/workflows/ci.yml"><img src="https://github.com/Icaro0310/devin-doctor/actions/workflows/ci.yml/badge.svg" alt="CI"/></a>
|
|
6
|
+
<a href="https://github.com/Icaro0310/devin-doctor/releases"><img src="https://img.shields.io/github/v/release/Icaro0310/devin-doctor" alt="GitHub release"/></a>
|
|
7
|
+
<a href="https://scorecard.dev/viewer/?uri=github.com/Icaro0310/devin-doctor"><img src="https://api.scorecard.dev/projects/github.com/Icaro0310/devin-doctor/badge" alt="OpenSSF Scorecard"/></a>
|
|
8
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="License: MIT"/></a>
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
# devin-doctor
|
|
14
|
+
|
|
15
|
+
> **Unofficial community project.** Not affiliated with, endorsed by, or
|
|
16
|
+
> sponsored by Cognition AI. "Devin" is a trademark of Cognition AI.
|
|
17
|
+
|
|
18
|
+
**[Linux](README.linux.md)** · **[Personal Windows](README.windows.md)** · **[Corporate Windows](README.corporate-windows.md)**
|
|
19
|
+
|
|
20
|
+
Part of the [awesome-devin](https://github.com/Icaro0310/awesome-devin) ecosystem: the curated hub for the devin-* tools.
|
|
21
|
+
|
|
22
|
+
`devin-doctor` diagnoses a Devin Desktop installation — one command that
|
|
23
|
+
checks the local stores, schema versions, config files and disk usage, then
|
|
24
|
+
prints a health report with concrete fix suggestions. Read-only, always.
|
|
25
|
+
|
|
26
|
+
## The problem
|
|
27
|
+
|
|
28
|
+
Devin keeps a lot of local state: a versioned `sessions.db`, one
|
|
29
|
+
`acp-messages/*.db` per GUI session, a `state.vscdb` KV store,
|
|
30
|
+
`credentials.toml` and JSONC config files. When any of it breaks or bloats —
|
|
31
|
+
a schema the tooling doesn't know, a locked database, an unreadable hooks
|
|
32
|
+
file, a 700 MiB sessions store — nothing warns you. You find out indirectly:
|
|
33
|
+
missing history, auth errors, disk pressure.
|
|
34
|
+
|
|
35
|
+
`devin-doctor` is `brew doctor` for that installation.
|
|
36
|
+
|
|
37
|
+
## Prior art
|
|
38
|
+
|
|
39
|
+
- `brew doctor` / `flutter doctor` — the genre: one command, many checks,
|
|
40
|
+
PASS/WARN/FAIL with fix suggestions. This project adapts the pattern; it
|
|
41
|
+
does not reinvent it.
|
|
42
|
+
- [`devin-internals-spec`](https://github.com/Icaro0310/devin-internals-spec)
|
|
43
|
+
— provides the schema-version detector, the read-only store parsers and
|
|
44
|
+
the fixture generator this project builds on.
|
|
45
|
+
|
|
46
|
+
## What makes it Devin-native
|
|
47
|
+
|
|
48
|
+
It understands Devin's actual on-disk layout — the `refinery_schema_history`
|
|
49
|
+
migration ledger, the `acp-messages` per-session stores, `state.vscdb`, and
|
|
50
|
+
the `.devin/` hooks/MCP config format — things no generic system check can
|
|
51
|
+
see. Remove Devin and there is nothing to diagnose.
|
|
52
|
+
|
|
53
|
+
## Install
|
|
54
|
+
|
|
55
|
+
Python ≥ 3.10 and `pipx` are required. **Windows (PowerShell):** install `pipx` with `py -m pip install --user pipx`, run `py -m pipx ensurepath`, then reopen the terminal. **Linux (Debian/Ubuntu):** run `sudo apt install pipx python3-venv` and `pipx ensurepath`; reopen the terminal. Other Linux distributions should install `pipx` using their package manager.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pipx install "devin-doctor @ git+https://github.com/Icaro0310/devin-doctor.git"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
(Not published on PyPI yet; the GitHub install above is the supported route.)
|
|
62
|
+
|
|
63
|
+
## Usage
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
devin-doctor check # diagnose the default data dir
|
|
67
|
+
devin-doctor check --data-dir D:\devin-backup
|
|
68
|
+
# Use a separate Devin UI config root (e.g. Linux)
|
|
69
|
+
devin-doctor check --data-dir ~/.local/share/devin --config-dir ~/.config/Devin
|
|
70
|
+
devin-doctor check --json # machine-readable output
|
|
71
|
+
devin-doctor report --md # markdown, for pasting into issues
|
|
72
|
+
devin-doctor capabilities # machine capability profile, JSON
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Each check prints `PASS`/`WARN`/`FAIL`, a one-line finding and a `fix:`
|
|
76
|
+
suggestion. Exit code is `0` unless something `FAIL`s (then `1`).
|
|
77
|
+
|
|
78
|
+
The six checks:
|
|
79
|
+
|
|
80
|
+
| check | reports |
|
|
81
|
+
|---|---|
|
|
82
|
+
| `stores` | present/missing, sizes and row counts for `sessions.db`, `acp-messages/*.db`, `state.vscdb` |
|
|
83
|
+
| `schema` | schema version vs the supported range (15–17); layout recognition for the ledger-less stores |
|
|
84
|
+
| `health-of-data` | empty sessions, orphan `message_nodes`, sessions idle > `--stale-days`, `SQLITE_BUSY` locks |
|
|
85
|
+
| `config` | `credentials.toml` presence + validity (**values masked**); `.devin/` hooks/MCP config sanity |
|
|
86
|
+
| `hooks-windows` | hooks/MCP commands that would pop a visible console window on Windows (`cmd /c` without a hidden wrapper, `powershell` without `-WindowStyle Hidden`, direct `.bat`/`.ps1`, `python.exe` vs `pythonw.exe`) — each with file, hook event and a wrapper fix |
|
|
87
|
+
| `disk` | total data-dir size, largest DBs, `acp-messages` accumulation trend |
|
|
88
|
+
|
|
89
|
+
## Capability profile
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
devin-doctor capabilities # JSON profile, exit 0
|
|
93
|
+
devin-doctor capabilities --probe-network
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`capabilities` prints a JSON object — `{"profile": ..., "capabilities":
|
|
97
|
+
{...}}` — describing what the machine can do for the ecosystem (scheduler,
|
|
98
|
+
daemon, local LLM, containers, comms, proxy, ≥24 GiB RAM, …). The profile is
|
|
99
|
+
`corporate` by default (**fail-closed**); `personal` applies only when
|
|
100
|
+
explicitly declared via `DEVIN_ECOSYSTEM_PROFILE=corporate|personal` or
|
|
101
|
+
`devin-profile.json` (`{"profile": "personal"}`) in the Devin config dir —
|
|
102
|
+
the env var wins. All probing is local; `net.outbound`/`net.listener`
|
|
103
|
+
stay `"unknown"` unless `--probe-network` is passed, which performs exactly
|
|
104
|
+
ONE outbound TCP connect (1.1.1.1:443 or the configured `HTTPS_PROXY`, 2 s
|
|
105
|
+
timeout) plus a loopback bind — the only network call this tool can make.
|
|
106
|
+
|
|
107
|
+
## Works with Devin alone (Devin-only mode)
|
|
108
|
+
|
|
109
|
+
devin-doctor is a pure local diagnostic: it reads Devin's own data
|
|
110
|
+
directories, writes nothing, and never contacts a network service. No VM, no
|
|
111
|
+
Tailscale, no Ollama, no Slack — just Devin Desktop plus Python. On a
|
|
112
|
+
restricted or corporate machine it is the safest first tool: install, run
|
|
113
|
+
`devin-doctor`, read the report.
|
|
114
|
+
|
|
115
|
+
## Platform support
|
|
116
|
+
|
|
117
|
+
Tested on Windows and Linux. On Linux, session data defaults to
|
|
118
|
+
`$XDG_DATA_HOME/devin` (normally `~/.local/share/devin`) and UI stores default
|
|
119
|
+
to `$XDG_CONFIG_HOME/Devin` (normally `~/.config/Devin`). Windows stores use
|
|
120
|
+
`%APPDATA%\devin` and `%APPDATA%\Devin`. Use `--data-dir` and `--config-dir`
|
|
121
|
+
when the stores are elsewhere. macOS paths exist but are not verified.
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### `devin-doctor plan` — remediation plan, still read-only
|
|
125
|
+
|
|
126
|
+
`plan` runs the same checks but emits a numbered remediation plan for every
|
|
127
|
+
WARN/FAIL finding (the check's `fix` suggestion) instead of a verdict —
|
|
128
|
+
nothing is executed; execution stays a human decision or another tool's job.
|
|
129
|
+
`--json` gives `{"overall", "steps": [{check, status, finding, fix}]}`.
|
|
130
|
+
This replaced the original `--fix` idea so doctor can keep its
|
|
131
|
+
"read-only, always" guarantee.
|
|
132
|
+
|
|
133
|
+
## Limitations
|
|
134
|
+
|
|
135
|
+
- **Version-bound.** Store parsing follows `devin-internals-spec` (schema
|
|
136
|
+
v15–v17). A newer Devin schema reports FAIL — "unknown version" — by
|
|
137
|
+
design, rather than silently misreading.
|
|
138
|
+
- **Read-only.** It suggests fixes but never touches the data dir. `--fix`
|
|
139
|
+
for the safe items is planned (see `STATUS.md`).
|
|
140
|
+
- **Locked stores.** If Devin is running, DBs may report `SQLITE_BUSY` —
|
|
141
|
+
close Devin and re-run.
|
|
142
|
+
- macOS paths are implemented but not verified in CI.
|
|
143
|
+
|
|
144
|
+
## Development
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
pip install -e ".[dev]"
|
|
148
|
+
python -m pytest
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Tests run entirely on synthetic fixtures generated by
|
|
152
|
+
`devin_internals.fixtures` — no real session data is ever read or required.
|
|
153
|
+
`scripts/make_fixture.py <dir>` builds a fixture data dir for manual runs.
|
|
154
|
+
|
|
155
|
+
## When to use this
|
|
156
|
+
|
|
157
|
+
- Devin misbehaves — missing history, auth errors, disk pressure — and you want one command to localize the cause.
|
|
158
|
+
- You want a health check before debugging: six checks (stores, schema, data health, config, hooks-windows, disk), each with a `fix:` suggestion.
|
|
159
|
+
- You need a paste-able report for a bug report: `devin-doctor report --md`.
|
|
160
|
+
- You are on a restricted machine: it is read-only and never contacts the network.
|
|
161
|
+
|
|
162
|
+
## When NOT to use this
|
|
163
|
+
|
|
164
|
+
- You want it to repair things — it is read-only; `--fix` for safe items is planned.
|
|
165
|
+
- Your Devin schema is newer than v17 — it reports "unknown version" FAIL rather than misread.
|
|
166
|
+
- Devin is running and DBs are locked — close Devin and re-run to clear `SQLITE_BUSY`.
|
|
167
|
+
|
|
168
|
+
## FAQ
|
|
169
|
+
|
|
170
|
+
**How do I check if my Devin installation's local data is healthy?** Run `devin-doctor check`. It inspects `sessions.db`, `acp-messages/*.db`, `state.vscdb`, `credentials.toml` and disk usage, printing `PASS`/`WARN`/`FAIL` per check with a `fix:` suggestion. Exit code is `0` unless something FAILs.
|
|
171
|
+
|
|
172
|
+
**Is devin-doctor safe to run? Will it modify my data?** It is strictly read-only — it opens Devin's stores for reading, writes nothing to the data dir, and never contacts a network service. Config check masks credential values in output. Fixes are suggested as text, never applied.
|
|
173
|
+
|
|
174
|
+
**What does "unknown schema version" mean?** Devin's `sessions.db` schema is versioned; devin-doctor understands v15–v17 via devin-internals-spec. A newer version produces a deliberate FAIL instead of a silent misread — update the tool or devin-internals-spec.
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "devin-doctor"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Diagnose a Devin Desktop installation: stores, schema versions, hooks, MCP servers, disk usage — with fix suggestions."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [{ name = "Icaro0310" }]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"devin-internals-spec>=0.3.0,<0.4.0",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[project.optional-dependencies]
|
|
18
|
+
dev = ["pytest>=8"]
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
devin-doctor = "devin_doctor.cli:main"
|
|
22
|
+
|
|
23
|
+
[tool.setuptools.packages.find]
|
|
24
|
+
where = ["src"]
|
|
25
|
+
|
|
26
|
+
[tool.pytest.ini_options]
|
|
27
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|