"""Registry entries for the Knowledge Management layer (L13).

Auto-extracted from the monolithic ``defaults.py``.  Each entry
follows the standard registry schema:

- ``name``: human-readable tool name
- ``level``: 13-layer taxonomy level (1-13)
- ``layer``: this layer name
- ``role``: role within the layer
- ``category``: functional category
- ``installer``: installation method
- ``launcher``: process launcher specification
- ``deps``: list of required tool IDs
- ``description``: short description
- ``flags``: optional boolean flags

This module is consumed by
:mod:`ai_lsc.registry.loader`.
"""

TOOLS: dict[str, dict] = {
    'zotero': {
    "name": "Zotero",
    "level": 13,
    "layer": "Knowledge Management",
    "role": "Reference Manager",
    "category": "Academic References",
    "installer": {
        "type": "pacman",
        "pkg": "zotero"
    },
    "launcher": {
        "type": "desktop",
        "cmd": "zotero",
        "default_port": None
    },
    "deps": [],
    "description": "Free reference management for researchers.",
    "license": 'AGPL-3.0',
    "flags": {
        "has_cli": False,
        "has_gui": True,
        "has_web": False,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'calibre': {
    "name": "Calibre",
    "level": 13,
    "layer": "Knowledge Management",
    "role": "Library Manager",
    "category": "Ebook Library",
    "installer": {
        "type": "pacman",
        "pkg": "calibre"
    },
    "launcher": {
        "type": "desktop",
        "cmd": "calibre",
        "default_port": None
    },
    "deps": [],
    "description": "E-book library management and converter.",
    "license": 'GPL-3.0',
    "flags": {
        "has_cli": True,
        "has_gui": True,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'paperlessngx': {
    "name": "Paperless-ngx",
    "level": 13,
    "layer": "Knowledge Management",
    "role": "Document Archive",
    "category": "Document Management",
    "installer": {
        "type": "git",
        "pkg": "https://github.com/paperless-ngx/paperless-ngx"
    },
    "launcher": {
        "type": "tmux",
        "cmd": "cd {tools_root}/paperlessngx && python3 manage.py runserver 0.0.0.0:{port}",
        "default_port": 8000
    },
    "deps": [
        "postgresql",
        "redis"
    ],
    "description": "Document management system with OCR.",
    "license": 'GPL-3.0',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'logseq': {
    "name": "Logseq",
    "level": 13,
    "layer": "Knowledge Management",
    "role": "Knowledge Graph",
    "category": "Outliner",
    "installer": {
        "type": "npm",
        "pkg": "logseq"
    },
    "launcher": {
        "type": "desktop",
        "cmd": "logseq",
        "default_port": None
    },
    "deps": [],
    "description": "Privacy-first knowledge graph outliner.",
    "license": 'AGPL-3.0',
    "flags": {
        "has_cli": False,
        "has_gui": True,
        "has_web": False,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'joplin': {
    "name": "Joplin",
    "level": 13,
    "layer": "Knowledge Management",
    "role": "Note Taking",
    "category": "Notes",
    "installer": {
        "type": "pacman",
        "pkg": "joplin"
    },
    "launcher": {
        "type": "desktop",
        "cmd": "joplin",
        "default_port": None
    },
    "deps": [],
    "description": "Open-source note taking and to-do application.",
    "license": 'MIT',
    "flags": {
        "has_cli": True,
        "has_gui": True,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
}
