Files
SIA/sia/command.py
2024-11-01 18:31:12 +01:00

25 lines
698 B
Python

from abc import ABC, abstractmethod
from typing import 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