Support bounded machine instruction step counts in MCP
This commit is contained in:
@@ -201,8 +201,10 @@ class McpSession:
|
||||
def pause_execution(self):
|
||||
return self.call('pause', {'owner': self.owner})
|
||||
|
||||
def step_instruction(self):
|
||||
return self.call('step', {'owner': self.owner})
|
||||
def step_instruction(self, count: int = 1):
|
||||
if not isinstance(count, int) or isinstance(count, bool) or count < 1 or count > 64:
|
||||
raise SessionError('Число машинных шагов должно быть 1..64')
|
||||
return self.call('step', {'count': count, 'owner': self.owner})
|
||||
|
||||
def step_source(self, kind: str = 'into'):
|
||||
if kind not in ('into', 'over', 'out'):
|
||||
|
||||
Reference in New Issue
Block a user