feat(sources): admin page to add and remove git sources (TODO.md L4)
This commit is contained in:
@@ -13,6 +13,8 @@ Data model — see ``.agent/PLAN.md`` §Data Model:
|
||||
* ``kb_overview`` — single-row lite-generated outline of the KB's basic
|
||||
categories, injected as the ``<knowledge_base>``
|
||||
section of every chat turn (phase 31).
|
||||
* ``git_sources`` — admin-managed git source URLs the Sync button and
|
||||
import_docs clone/pull (phase 35).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -133,3 +135,19 @@ class KbOverview(Base):
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), server_default=func.now()
|
||||
)
|
||||
|
||||
|
||||
class GitSource(Base):
|
||||
"""One admin-managed git source (phase 35).
|
||||
|
||||
The UI-maintained list of repo URLs the Sync button (phase 32) and
|
||||
import_docs (phase 28) clone/pull. DB rows win over the
|
||||
BOR_GIT_SOURCES env var, which is a fallback while this table is
|
||||
empty (see app.rag.git_sources.effective_git_sources).
|
||||
"""
|
||||
|
||||
__tablename__ = "git_sources"
|
||||
|
||||
id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
url: Mapped[str] = mapped_column(Text, unique=True, nullable=False)
|
||||
added_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
|
||||
|
||||
Reference in New Issue
Block a user