First feature extracted from core into a plugin per "plugin is the product", mirroring the notifications plugin. KB is a NON-asset plugin: it contributes a model + blueprint + nav item but registers no AssetType. - plugins/knowledgebase/: manifest.json (api_prefix /api/knowledgebase, no deps), models/ (KnowledgeBase, contract-pure imports via shopdb.api), api/ (the blueprint, same routes/prefix so the frontend is unchanged), plugin.py (get_blueprint + get_models + get_navigation_items). - De-cored: removed shopdb/core/models/knowledgebase.py + api/knowledgebase.py, their __init__ exports, and 'knowledgebase' from CORE_BLUEPRINT_NAMES; dropped the hardcoded KB nav item from dashboard.py (now via the plugin nav hook). - search.py and reports.py lazy-import KnowledgeBase from the plugin and degrade gracefully (search skips via _require_enabled when disabled; kb-popularity report returns 503 if the plugin is absent). - Registered in instance/plugins.json (enabled). The knowledgebase table stays in the core Alembic chain (bundled-plugin schema folded into core, ADR-004); the model just maps it. KB was never in the shopdb.api contract surface, so no __contract_version__ bump. Pinned with characterization tests first (test_knowledgebase.py); they pass unchanged against the plugin blueprint. 163 tests pass, naming green, app boots 7 bundled plugins, KB endpoint/nav/search verified live. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
13 lines
304 B
JSON
13 lines
304 B
JSON
{
|
|
"name": "knowledgebase",
|
|
"version": "1.0.0",
|
|
"description": "Knowledge Base articles linking to external resources",
|
|
"author": "ShopDB Team",
|
|
"dependencies": [],
|
|
"core_version": ">=0.1.0,<1.0.0",
|
|
"api_prefix": "/api/knowledgebase",
|
|
"provides": {
|
|
"features": ["knowledgebase"]
|
|
}
|
|
}
|