59 lines
1.2 KiB
Python
59 lines
1.2 KiB
Python
"""SQLModel-backed persistence.
|
|
|
|
Tokens, audit, conversations, Agent SDK transcript entries and per-turn
|
|
usage, plus a thin :class:`Database` wrapper around an async SQLAlchemy
|
|
engine. ``GatewayRuntime`` carries the handle.
|
|
"""
|
|
|
|
from beaver_gateway.storage.db import (
|
|
Database,
|
|
append_audit,
|
|
append_usage,
|
|
backfill_usage_deltas,
|
|
create_token,
|
|
list_active_tokens,
|
|
list_audit_records,
|
|
list_tokens,
|
|
revoke_token,
|
|
touch_token,
|
|
usage_deltas,
|
|
)
|
|
from beaver_gateway.storage.models import (
|
|
AuditLog,
|
|
Conversation,
|
|
ConversationBinding,
|
|
Delivery,
|
|
InjectQueueItem,
|
|
RateLimit,
|
|
TelegramUpdate,
|
|
Token,
|
|
TranscriptEntry,
|
|
Usage,
|
|
)
|
|
from beaver_gateway.storage.session_store import PostgresSessionStore
|
|
|
|
__all__ = [
|
|
"AuditLog",
|
|
"Conversation",
|
|
"ConversationBinding",
|
|
"Database",
|
|
"Delivery",
|
|
"InjectQueueItem",
|
|
"PostgresSessionStore",
|
|
"RateLimit",
|
|
"TelegramUpdate",
|
|
"Token",
|
|
"TranscriptEntry",
|
|
"Usage",
|
|
"append_audit",
|
|
"append_usage",
|
|
"backfill_usage_deltas",
|
|
"create_token",
|
|
"list_active_tokens",
|
|
"list_audit_records",
|
|
"list_tokens",
|
|
"revoke_token",
|
|
"touch_token",
|
|
"usage_deltas",
|
|
]
|