feat(l1): category service (defaults + hard floor) and AI action keys

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 15:49:30 -04:00
parent 0796874376
commit 4b0d2e6b1c
4 changed files with 92 additions and 1 deletions

View File

@@ -67,7 +67,9 @@ class Account(Base):
sso_provider: Mapped[Optional[str]] = mapped_column(String(20), nullable=True) # "saml" | "oidc"
sso_config: Mapped[Optional[dict]] = mapped_column(JSONB, nullable=True)
# L1 AI tree builder — per-account allowlist of problem categories
# L1 AI tree builder — per-account allowlist of problem categories.
# Keep this server_default in sync with DEFAULT_L1_CATEGORIES in
# app/services/l1_category_service.py when adding/removing categories.
enabled_l1_categories: Mapped[list[str]] = mapped_column(
JSONB(), nullable=False,
server_default=sa_text(