feat: deploy infrastructure + disk/drive, calendar, presentation, workspaces, onboarding, demo user

This commit is contained in:
2026-05-19 16:26:26 +03:00
parent 688d043dad
commit 3529c39b22
304 changed files with 18826 additions and 1176 deletions
+29
View File
@@ -39,6 +39,8 @@ from app.schemas.admin import (
SystemInfoResponse,
UserAdminUpdate,
)
from app.agents.base import AgentResult
from app.schemas.agent import AgentRunRequest
from app.schemas.bot import BotCommandResponse, BotCommandUpdate
from app.schemas.feedback import FeedbackResponse, FeedbackUpdate
from app.schemas.tariff import TariffPlanCreate, TariffPlanResponse, TariffPlanUpdate, UserSubscriptionResponse
@@ -101,6 +103,7 @@ def _agent_to_response(a: AgentConfig) -> AgentInfoResponse:
description=getattr(a, "description", ""),
is_enabled=a.is_enabled,
version=a.version,
config=a.config,
last_run_at=a.last_run_at,
)
@@ -191,12 +194,38 @@ async def update_agent(
agent.description = body.description
if body.is_enabled is not None:
agent.is_enabled = body.is_enabled
if body.config is not None:
agent.config = body.config
await db.commit()
await db.refresh(agent)
return _agent_to_response(agent)
@router.post("/agents/{agent_name}/run", response_model=AgentResult)
async def run_agent(
agent_name: str,
user: Annotated[User, Depends(get_current_user)],
body: AgentRunRequest | None = None,
):
from app.agents.registry import registry
context = body.model_dump() if body else {}
result = await registry.run_agent(agent_name, context)
return result
@router.post("/agents/run-all", response_model=dict[str, AgentResult])
async def run_all_agents(
user: Annotated[User, Depends(get_current_user)],
body: AgentRunRequest | None = None,
):
from app.agents.registry import registry
context = body.model_dump() if body else {}
return await registry.run_all(context)
# ── Logs ──
@router.get("/logs", response_model=list[LogEntryResponse])