Implement business plans

This commit is contained in:
2026-03-02 00:00:53 +00:00
parent d22924f6aa
commit b3e183eb0a
26 changed files with 4109 additions and 39 deletions

16
core/commands/registry.py Normal file
View File

@@ -0,0 +1,16 @@
from __future__ import annotations
from core.commands.base import CommandHandler
_HANDLERS: dict[str, CommandHandler] = {}
def register(handler: CommandHandler):
slug = str(getattr(handler, "slug", "") or "").strip().lower()
if not slug:
raise ValueError("handler slug is required")
_HANDLERS[slug] = handler
def get(slug: str) -> CommandHandler | None:
return _HANDLERS.get(str(slug or "").strip().lower())