/**
 * @fileoverview Static registry of downstream tool dependencies probed by
 * `codeman doctor`. Each entry declares per-environment resolvers and the
 * skills that use it. EXTENSION POINT: skill-manifest-driven discovery
 * (COD follow-up) will merge dynamically-found entries into this list.
 *
 * @module config/dependency-registry
 */
/** The valid `--category` filter values; single source of truth for the type, the CLI
 *  help text, and CLI input validation. */
export const TOOL_CATEGORIES = ['core', 'office', 'other'];
const ALL = ['linux', 'darwin', 'wsl', 'win32'];
export const DEPENDENCY_REGISTRY = [
    {
        id: 'node',
        label: 'Node.js',
        category: 'core',
        required: true,
        minVersion: '22.0.0',
        resolvers: [{ match: ALL, resolver: { kind: 'path', bins: ['node'], versionArg: '--version' } }],
        installHint: { linux: 'https://nodejs.org', darwin: 'brew install node', wsl: 'https://nodejs.org' },
    },
    {
        id: 'claude',
        label: 'Claude CLI',
        category: 'core',
        required: false,
        usedBy: ['Claude Code sessions (default backend)'],
        resolvers: [{ match: ALL, resolver: { kind: 'path', bins: ['claude'], versionArg: '--version' } }],
        installHint: { linux: 'https://docs.claude.com/claude-code', darwin: 'https://docs.claude.com/claude-code' },
    },
    {
        id: 'tmux',
        label: 'tmux',
        category: 'core',
        required: true,
        resolvers: [{ match: ['linux', 'darwin', 'wsl'], resolver: { kind: 'path', bins: ['tmux'], versionArg: '-V' } }],
        installHint: { linux: 'sudo apt install tmux', darwin: 'brew install tmux', wsl: 'sudo apt install tmux' },
    },
    {
        id: 'opencode',
        label: 'OpenCode CLI',
        category: 'core',
        required: false,
        usedBy: ['OpenCode sessions'],
        resolvers: [{ match: ALL, resolver: { kind: 'path', bins: ['opencode'], versionArg: '--version' } }],
    },
    {
        id: 'codex',
        label: 'Codex CLI',
        category: 'core',
        required: false,
        usedBy: ['Codex sessions'],
        resolvers: [{ match: ALL, resolver: { kind: 'path', bins: ['codex'], versionArg: '--version' } }],
    },
    {
        id: 'libreoffice',
        label: 'LibreOffice',
        category: 'office',
        required: false,
        usedBy: ['document preview', 'thumbnails'],
        resolvers: [
            {
                match: ['linux', 'darwin', 'wsl'],
                resolver: { kind: 'path', bins: ['libreoffice', 'soffice'], versionArg: '--version' },
            },
        ],
        installHint: { linux: 'sudo apt install libreoffice', darwin: 'brew install --cask libreoffice' },
    },
    {
        id: 'pdftoppm',
        label: 'pdftoppm',
        category: 'office',
        required: false,
        usedBy: ['document preview', 'PDF/Office first-page thumbnails'],
        // poppler's pdftoppm prints its version to stderr; presence is what matters here.
        resolvers: [
            { match: ['linux', 'darwin', 'wsl'], resolver: { kind: 'path', bins: ['pdftoppm'], versionArg: '-v' } },
        ],
        installHint: {
            linux: 'sudo apt install poppler-utils',
            darwin: 'brew install poppler',
            wsl: 'sudo apt install poppler-utils',
        },
    },
    {
        id: 'msoffice',
        label: 'MS Office',
        category: 'office',
        required: false,
        usedBy: ['document preview', 'thumbnails'],
        resolvers: [
            {
                match: ['wsl', 'win32'],
                resolver: {
                    kind: 'windows-side',
                    appDirs: ['Microsoft Office/root/Office16'],
                    exes: ['WINWORD.EXE', 'POWERPNT.EXE', 'EXCEL.EXE'],
                },
            },
        ],
    },
];
//# sourceMappingURL=dependency-registry.js.map