mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-03 05:59:43 +02:00
fix(doctor): correct Node minimum, drop phantom gemini, add pdftoppm, validate --category
Review fixes on top of the `codeman doctor` checker: - Node minVersion 18.0.0 -> 22.0.0. package.json engines is ">=22.0.0" and the docs/CI require Node 22+, so doctor was green-lighting Node 18-21 (a false pass). - Remove the phantom `gemini` registry entry. Codeman has no Gemini backend (SessionMode = 'claude' | 'shell' | 'opencode' | 'codex'); the entry advertised a dependency that nothing uses. - Add `pdftoppm` (poppler) to the office group. document-thumbnailer.ts calls pdftoppm with no fallback as the sole PDF/Office first-page thumbnail renderer, yet it was absent from the registry, so doctor never reported it missing. - Fix the `--category` mismatch: the help advertised `documents|media` categories that the ToolCategory type/registry never defined, and an unknown category silently produced an empty "all healthy" table. Introduce TOOL_CATEGORIES as the single source of truth (type + help + validation); an invalid `--category` now errors with the valid list and exits 2. Verified: tsc, lint, format:check all clean; both dependency tests pass (20); `doctor` runs correctly (Node 22.22 ok, pdftoppm detected, no gemini), `--category media` errors with exit 2, `--category office` lists libreoffice/pdftoppm/msoffice. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+7
-2
@@ -631,11 +631,16 @@ program
|
||||
.alias('check-deps')
|
||||
.description('Check Codeman tool dependencies (Node, Claude CLI, tmux, LibreOffice, MS Office)')
|
||||
.option('--json', 'Output structured JSON instead of a table')
|
||||
.option('--category <name>', 'Only check one category (core|office|documents|media|other)')
|
||||
.option('--category <name>', 'Only check one category (core|office|other)')
|
||||
.action(async (options) => {
|
||||
const { createRealHost, checkAll } = await import('./utils/dependency-checker.js');
|
||||
const { renderTable, renderJson, computeExitCode } = await import('./utils/dependency-report.js');
|
||||
const { DEPENDENCY_REGISTRY } = await import('./config/dependency-registry.js');
|
||||
const { DEPENDENCY_REGISTRY, TOOL_CATEGORIES } = await import('./config/dependency-registry.js');
|
||||
|
||||
if (options.category && !(TOOL_CATEGORIES as readonly string[]).includes(options.category)) {
|
||||
console.error(`Unknown category "${options.category}". Valid categories: ${TOOL_CATEGORIES.join(', ')}`);
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
const host = createRealHost();
|
||||
const registry = options.category
|
||||
|
||||
Reference in New Issue
Block a user