update api for subagent protocol and delete hermes agent

This commit is contained in:
fedorkobylkevitch 2026-04-25 01:39:02 +03:00
parent ff1799cd98
commit 952b2e7d17
1150 changed files with 704 additions and 458893 deletions

28
api/services/protocols.py Normal file
View file

@ -0,0 +1,28 @@
from __future__ import annotations
from asyncio import Queue
from typing import Any, Protocol
from api.repositories.task_store import TaskRecord
class TaskServiceProtocol(Protocol):
async def submit_task(self, task: str, timeout: int, metadata: dict | None) -> TaskRecord: ...
async def get_task(self, task_id: str) -> TaskRecord | None: ...
async def create_run(self, thread_id: str, user_input: str, timeout: int, metadata: dict | None) -> TaskRecord: ...
async def get_run(self, run_id: str) -> TaskRecord | None: ...
async def list_thread_runs(self, thread_id: str) -> list[TaskRecord]: ...
async def cancel_run(self, run_id: str) -> TaskRecord | None: ...
async def delete_run(self, run_id: str) -> tuple[bool, bool]: ...
async def wait_run(self, run_id: str, timeout: float | None = None) -> TaskRecord | None: ...
async def subscribe_run_stream(self, run_id: str) -> Queue[dict[str, Any]] | None: ...
async def unsubscribe_run_stream(self, run_id: str, queue: Queue[dict[str, Any]]) -> None: ...