oclaw/svc/persistence/sa_repos/__init__.py
oliver d14e9d3596 feat(persistence): PostgreSQL assistant store, chat persist fixes, gateway scripts
- Add SQLAlchemy Core repos, pg adapter/compat, assistant_store factory, Alembic bootstrap and migration/cutover scripts.

- Harden chat_message writes (NUL scrub for PG), turn_uuid on attempt failure, WS turn_runner fallbacks and gateway executed_turn_uuid init.

- start_gateway: log paths, PS7 stderr handling via cmd, background stdout/stderr redirect; runtime assistant_runtime_log_dir export.

- Ops: clear_all_chat_sessions with PG-only --postgresql and env-gated wipe; clear_postgres_chat_sessions.ps1.

- Tests: SA repos, pg compat, persist fallback, smoke env isolation; CI and docs touch-ups.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 09:33:50 +08:00

30 lines
1.3 KiB
Python

"""SQLAlchemy-backed repository slices (incremental migration off raw SQL)."""
from __future__ import annotations
from svc.persistence.sa_repos.admin_user_stats import AdminUserStatsSaRepository
from svc.persistence.sa_repos.app_settings import AppSettingsSaRepository
from svc.persistence.sa_repos.app_users import AppUsersSaRepository
from svc.persistence.sa_repos.auth_sessions import AuthSessionsSaRepository
from svc.persistence.sa_repos.chat_messages import ChatMessagesSaRepository
from svc.persistence.sa_repos.chat_sessions import ChatSessionsSaRepository
from svc.persistence.sa_repos.session_tool_health import SessionToolHealthSaRepository
from svc.persistence.sa_repos.tenant_bind_code import BindCodeSaRepository, TenantSaRepository
from svc.persistence.sa_repos.tool_log_queries import ToolLogQueriesSaRepository
from svc.persistence.sa_repos.trace_events import TraceEventsSaRepository
from svc.persistence.sa_repos.ui_session_owner import UiSessionOwnerSaRepository
__all__ = [
"AdminUserStatsSaRepository",
"AppSettingsSaRepository",
"AppUsersSaRepository",
"AuthSessionsSaRepository",
"BindCodeSaRepository",
"ChatMessagesSaRepository",
"ChatSessionsSaRepository",
"SessionToolHealthSaRepository",
"TenantSaRepository",
"ToolLogQueriesSaRepository",
"TraceEventsSaRepository",
"UiSessionOwnerSaRepository",
]