feat: implement skeleton phase

This commit is contained in:
hh
2026-05-19 14:19:15 +02:00
parent 75a23d231e
commit 221e660c5c
21 changed files with 586 additions and 3 deletions
+33
View File
@@ -0,0 +1,33 @@
"""Shared agent surface.
``BaseAgent`` is the structural contract every backend-specific agent
honours. Subclasses add **capabilities as fields** (``ClaudeAgent.cwd``,
``RaycastAgent.streaming``) — backends dispatch on type, not on a runtime
matrix.
"""
from __future__ import annotations
from dataclasses import dataclass
from pydantic import BaseModel, ConfigDict
@dataclass(frozen=True, slots=True)
class ExposedMcp:
"""Reference to an ``McpServer`` (by name) exposed to a single agent."""
name: str
tools: tuple[str, ...] | None = None
class BaseAgent(BaseModel):
"""Common fields. Concrete backends subclass and add capabilities."""
model_config = ConfigDict(frozen=True, arbitrary_types_allowed=True)
name: str
model: str
system_prompt: str
expose_mcps: tuple[ExposedMcp, ...] = ()
accept_client_tools: bool = False