start implementation on new architecture

This commit is contained in:
2024-11-01 09:56:30 +01:00
parent ee089e5be7
commit 2c1e134c6e
43 changed files with 2978 additions and 619 deletions

35
sia/command_result.py Normal file
View File

@@ -0,0 +1,35 @@
from dataclasses import dataclass
@dataclass
class CommandResult:
"""
Result of a command execution.
Attributes:
message: Optional message describing the result
success: Whether the command executed successfully
should_stop: Whether the agent should stop after this command
"""
message: str
success: bool = True
should_stop: bool = False
@staticmethod
def success() -> 'CommandResult':
"""Create a successful command result."""
return CommandResult(message="", success=True, should_stop=False)
@staticmethod
def failure(message: str) -> 'CommandResult':
"""
Create a failed command result.
Args:
message: Description of the failure
"""
return CommandResult(message=message, success=False, should_stop=False)
@staticmethod
def stop() -> 'CommandResult':
"""Create a command result indicating the agent should stop."""
return CommandResult(message="", success=True, should_stop=True)