start implementation on new architecture
This commit is contained in:
25
sia/command.py
Normal file
25
sia/command.py
Normal file
@@ -0,0 +1,25 @@
|
||||
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
|
||||
Reference in New Issue
Block a user