The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Done
Anish813755b8799e
diff --git a/src/llm/__init__.py b/src/llm/__init__.pyindex e7c28925f..21e48e000 100644--- a/src/llm/__init__.py+++ b/src/llm/__init__.py@@ -12,19 +12,19 @@ from llm.cli.selector import interactive_select__version__ = "0.1.0"-__all__ = [- "LLMProvider",+__all__ = ("LLMInput","LLMOutput",+ "LLMProvider","Message",- "get_provider","ToolCall","ToolDefinition","ToolResult","ToolExecutor","ToolRegistry",+ "get_provider","interactive_select",-]+)def gui() -> None:diff --git a/src/llm/core/types.py b/src/llm/core/types.pyindex 902fd28ac..b53588dcc 100644--- a/src/llm/core/types.py+++ b/src/llm/core/types.py@@ -26,6 +26,7 @@ class Message:content: strname: str | None = Nonetool_call_id: str | None = None+ tool_calls: list[ToolCall] | None = Nonedef to_dict(self) -> dict[str, Any]:result: dict[str, Any] = {"role": self.role.value, "content": self.content}@@ -33,6 +34,11 @@ class Message:result["name"] = self.nameif self.tool_call_id:result["tool_call_id"] = self.tool_call_id+ if self.tool_calls:+ result["tool_calls"] = [+ {"id": tc.id, "function": {"name": tc.name, "arguments": tc.arguments}}+ for tc in self.tool_calls+ ]return resultdiff --git a/src/llm/prompt/__init__.py b/src/llm/prompt/__init__.pyindex 6ae8f90ac..2fae65f15 100644--- a/src/llm/prompt/__init__.py+++ b/src/llm/prompt/__init__.py@@ -3,11 +3,11 @@from llm.prompt.builder import PromptBuilder, adapt_messages_for_provider, get_provider_builderfrom llm.prompt.templates import TEMPLATES, get_template, get_template_or_default-__all__ = [+__all__ = ("PromptBuilder",+ "TEMPLATES","adapt_messages_for_provider","get_provider_builder",- "TEMPLATES","get_template","get_template_or_default",-]+)diff --git a/src/llm/providers/__init__.py b/src/llm/providers/__init__.pyindex 6194c3a2a..c495fa1ce 100644--- a/src/llm/providers/__init__.py+++ b/src/llm/providers/__init__.py@@ -5,10 +5,10 @@ from llm.providers.openai import OpenAIProviderfrom llm.providers.ollama import OllamaProviderfrom llm.providers.resolver import get_provider, register_provider-__all__ = [+__all__ = ("ClaudeProvider","OpenAIProvider","OllamaProvider","get_provider","register_provider",-]+)diff --git a/src/llm/tools/__init__.py b/src/llm/tools/__init__.pyindex cb2c5b7a1..1c59d7508 100644--- a/src/llm/tools/__init__.py+++ b/src/llm/tools/__init__.py@@ -2,8 +2,8 @@from llm.tools.executor import ReActAgent, ToolExecutor, ToolRegistry-__all__ = [- "ToolRegistry",- "ToolExecutor",+__all__ = ("ReActAgent",-]+ "ToolExecutor",+ "ToolRegistry",+)diff --git a/src/llm/tools/executor.py b/src/llm/tools/executor.pyindex 8cd134e04..b2aa1a5a3 100644--- a/src/llm/tools/executor.py+++ b/src/llm/tools/executor.py@@ -91,6 +91,14 @@ class ReActAgent:if not output.has_tool_calls:return output+ messages.append(+ Message(+ role=Role.ASSISTANT,+ content=output.content or "",+ tool_calls=output.tool_calls,+ )+ )+results = self.executor.execute_all(output.tool_calls)for result in results: