chore: initialize project repository

This commit is contained in:
Codex
2026-09-09 21:55:37 +08:00
commit b1497fd2c6
167 changed files with 17690 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
from collections.abc import AsyncIterator
from app.core.contracts import AgentRequest, RequestContext, RunProgressEvent
from app.service.agent.factory import AgentFactory
class AgentExecutor:
def __init__(self, factory: AgentFactory) -> None:
self.factory = factory
async def execute(
self, agent_type: str, request: AgentRequest, context: RequestContext, run_id: str
) -> AsyncIterator[RunProgressEvent]:
agent = self.factory.create(agent_type, context)
async for event in agent.execute(request, context, run_id):
yield event