Expand shared Sprinter MCP with managed launch, raw reads and key input
This commit is contained in:
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from .server import rpc_call
|
||||
from .server import RPC_GENERATION_MUTATIONS, rpc_call
|
||||
from .session import SessionError
|
||||
|
||||
|
||||
@@ -19,7 +19,14 @@ class DapEngine:
|
||||
return self._rpc_override(method, arguments or {})
|
||||
if not self.rpc_path:
|
||||
raise SessionError('DAP ещё не подключён к session server')
|
||||
return rpc_call(self.rpc_path, method, arguments, timeout)
|
||||
identity = {}
|
||||
if self.attached is not None:
|
||||
identity = {'session_id': self.attached['session_id'],
|
||||
'build_id': self.attached['build_id']}
|
||||
if method in RPC_GENERATION_MUTATIONS:
|
||||
current = rpc_call(self.rpc_path, 'status', **identity)
|
||||
identity['generation'] = current['generation']
|
||||
return rpc_call(self.rpc_path, method, arguments, timeout, **identity)
|
||||
|
||||
def handle(self, command: str, arguments: dict) -> tuple[dict, list[tuple[str, dict]]]:
|
||||
events = []
|
||||
|
||||
Reference in New Issue
Block a user