Files
SIA/sia/command.py

26 lines
728 B
Python

from abc import ABC, abstractmethod
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .working_memory import WorkingMemory
from .command_result import CommandResult
class Command(ABC):
"""
Abstract base class for all commands that can be executed on working memory.
Commands represent immediate actions that modify the system state.
"""
@abstractmethod
def execute(self, memory: 'WorkingMemory') -> 'CommandResult':
"""
Execute the command on the given working memory.
Args:
memory: WorkingMemory instance to execute command on
Returns:
CommandResult: Result of command execution
"""
pass