- Fix text selection menu not showing: wire contentRef via inputRef on multiline TextField - Fix blog title not truncating: add min-w-0 for flex item overflow - Fix outline generation 500: escape curly braces in f-string prompt template - Fix content generation 'NoneType not callable': replace SessionLocal() with get_session_for_user(), add db param to MediumBlogGenerator, fix signature mismatch in database_task_manager - Fix writing assistant suggest 500: add auth + user_id to API endpoint and service, replace sync requests with httpx.AsyncClient - Fix hallucination detector 404: explicitly include router in main.py and app.py - Fix missing error_data in task failure responses - Hide CopilotKit web inspector button - Remove hardcoded fallback suggestions from SmartTypingAssist - Fix stale closure refs in SmartTypingAssist handleTypingChange - Add two-column editor layout, stats bar, section hover menu - Various subscription, billing, and research module improvements
72 lines
2.0 KiB
Python
72 lines
2.0 KiB
Python
"""Feature registry for profile-based capability toggles.
|
|
|
|
This module stores normalized feature-group definitions used by the
|
|
feature profile runtime.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
from typing import Dict, Tuple
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class FeatureGroup:
|
|
"""Single feature group and the capabilities it enables."""
|
|
|
|
routers: Tuple[str, ...] = ()
|
|
startup_hooks: Tuple[str, ...] = ()
|
|
optional_services: Tuple[str, ...] = ()
|
|
features: Tuple[str, ...] = field(default_factory=tuple)
|
|
|
|
|
|
FEATURE_GROUPS: Dict[str, FeatureGroup] = {
|
|
"core": FeatureGroup(
|
|
features=("core", "health", "onboarding", "research"),
|
|
routers=(
|
|
"api.component_logic:router",
|
|
"api.subscription:router",
|
|
"api.onboarding_utils.step3_routes:router",
|
|
"api.research.router:router",
|
|
),
|
|
startup_hooks=(
|
|
"services.database:init_database",
|
|
),
|
|
optional_services=(
|
|
"services.scheduler:get_scheduler",
|
|
),
|
|
),
|
|
"podcast": FeatureGroup(
|
|
features=("podcast",),
|
|
routers=("api.podcast.router:router",),
|
|
),
|
|
"youtube": FeatureGroup(
|
|
features=("youtube",),
|
|
routers=("api.youtube.router:router",),
|
|
),
|
|
"content_planning": FeatureGroup(
|
|
features=("content_planning", "strategy_copilot"),
|
|
routers=(
|
|
"api.content_planning.api.router:router",
|
|
"api.content_planning.strategy_copilot:router",
|
|
),
|
|
),
|
|
"blog_writer": FeatureGroup(
|
|
features=("blog_writer",),
|
|
routers=(
|
|
"api.blog_writer.router:router",
|
|
"api.blog_writer.seo_analysis:router",
|
|
),
|
|
),
|
|
}
|
|
|
|
|
|
PROFILE_GROUP_MAP: Dict[str, Tuple[str, ...]] = {
|
|
"all": tuple(FEATURE_GROUPS.keys()),
|
|
"core": ("core",),
|
|
"podcast": ("core", "podcast"),
|
|
"youtube": ("core", "youtube"),
|
|
"blog_writer": ("core", "blog_writer"),
|
|
"planning": ("core", "content_planning"),
|
|
}
|