docs: add Claude AI assistant rules and configuration
Add comprehensive rule documentation for AI-assisted development covering authentication surfaces, outbound-call safety invariants, and other project conventions to guide Claude's understanding of critical system behaviors.
This commit is contained in:
31
config.py
31
config.py
@@ -89,6 +89,25 @@ class TTSSettings(BaseSettings):
|
||||
sample_rate: int = 16000
|
||||
|
||||
|
||||
class CasdoorSettings(BaseSettings):
|
||||
"""Casdoor SSO (OIDC) configuration.
|
||||
|
||||
When `enabled` is true the browser authenticates via Casdoor and every
|
||||
surface is gated to the owner; the SDK is used only for the OAuth2 code
|
||||
exchange in the /auth/callback route (JWTs are validated against the
|
||||
endpoint's JWKS). When false, the app runs in dev-owner mode (loopback only).
|
||||
"""
|
||||
|
||||
model_config = SettingsConfigDict(env_prefix="CASDOOR_", env_file=".env", extra="ignore")
|
||||
|
||||
enabled: bool = False
|
||||
endpoint: str = "https://id.ouranos.helu.ca"
|
||||
client_id: str = ""
|
||||
client_secret: SecretStr = SecretStr("")
|
||||
org_name: str = "heluca"
|
||||
app_name: str = ""
|
||||
|
||||
|
||||
class ReceptionistSettings(BaseSettings):
|
||||
"""AI Receptionist behavior settings."""
|
||||
|
||||
@@ -126,9 +145,14 @@ class Settings(BaseSettings):
|
||||
debug: bool = False
|
||||
log_level: str = "info"
|
||||
|
||||
# Auth — one static bearer token shared by REST, WebSocket, and MCP.
|
||||
# Empty disables auth, which is only permitted on loopback binds.
|
||||
api_token: SecretStr = SecretStr("")
|
||||
# Auth — Casdoor SSO for the browser + owner-minted PATs for MCP/CLI,
|
||||
# gated to a single owner. `owner_name` is the Casdoor username that owns
|
||||
# this gateway (everyone else gets 403). `public_base_url` seeds the OAuth
|
||||
# discovery URLs; blank derives them from request headers. Both cross-cut
|
||||
# every surface, so they live on the root model (like DATABASE_URL); the
|
||||
# Casdoor connection knobs live under the CASDOOR_ prefix.
|
||||
owner_name: str = ""
|
||||
public_base_url: str = ""
|
||||
|
||||
# Outbound-call safety cap (REST + MCP make_call)
|
||||
max_concurrent_calls: int = 4
|
||||
@@ -150,6 +174,7 @@ class Settings(BaseSettings):
|
||||
hold_slayer: HoldSlayerSettings = Field(default_factory=HoldSlayerSettings)
|
||||
tts: TTSSettings = Field(default_factory=TTSSettings)
|
||||
receptionist: ReceptionistSettings = Field(default_factory=ReceptionistSettings)
|
||||
casdoor: CasdoorSettings = Field(default_factory=CasdoorSettings)
|
||||
|
||||
|
||||
# Singleton
|
||||
|
||||
Reference in New Issue
Block a user