Expand shared Sprinter MCP with managed launch, raw reads and key input

This commit is contained in:
Александр Петров
2026-09-17 22:57:27 +03:00
parent a43e7bda89
commit 5dc7998324
22 changed files with 1120 additions and 67 deletions
+9 -2
View File
@@ -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 = []