feat: add multi-device concurrency, server lifecycle CLI, and unified execution stream
- Implement DevicePool and DeviceExecutionLock concurrency modes (per-device FIFO vs global serialization) - Extend ArtemisClient SDK and CLI with explicit device targeting and concurrency strategy configuration - Add server lifecycle management (artemis restart, stop, status) with cross-platform PID discovery - Update MCP server tools to support multi-device dispatch, trace tagging, and per-device execution - Enhance Showcase UI with step-by-step visual replay, playback speed controls, and device serial badges - Add comprehensive unit test coverage and edge-case verification scripts
This commit is contained in:
1 parent
a36a66ce6d
commit
c2c90a6378
84 files changed
+5612
-645
No files matched your search
@@ -218,6 +218,7 @@ class FlashRunner:
|
||||
|
||||
for attempt in range(max_retries):
|
||||
try:
|
||||
stream_exec_id = uuid.uuid4()
|
||||
|
||||
async def run_stream():
|
||||
full_response = None
|
||||
@@ -226,6 +227,34 @@ class FlashRunner:
|
||||
full_response = chunk
|
||||
else:
|
||||
full_response += chunk
|
||||
|
||||
# Real-time token streaming to DataEngine for live UI display
|
||||
if (
|
||||
getattr(self, "ctx", None)
|
||||
and getattr(self.ctx, "data_engine", None)
|
||||
and getattr(chunk, "content", None)
|
||||
):
|
||||
text_to_stream = ""
|
||||
thinking_to_stream = ""
|
||||
if isinstance(chunk.content, str):
|
||||
text_to_stream = chunk.content
|
||||
elif isinstance(chunk.content, list):
|
||||
for item in chunk.content:
|
||||
if isinstance(item, str):
|
||||
text_to_stream += item
|
||||
elif isinstance(item, dict):
|
||||
if item.get("type") == "text":
|
||||
text_to_stream += item.get("text", "")
|
||||
elif item.get("type") == "thinking":
|
||||
thinking_to_stream += item.get("thinking", "")
|
||||
if text_to_stream:
|
||||
self.ctx.data_engine.stream_output(
|
||||
stream_exec_id, text_to_stream, is_thinking=False
|
||||
)
|
||||
if thinking_to_stream:
|
||||
self.ctx.data_engine.stream_output(
|
||||
stream_exec_id, thinking_to_stream, is_thinking=True
|
||||
)
|
||||
return full_response
|
||||
|
||||
response = await invoke_llm_with_timeout_message(
|
||||
|
||||
Reference in new issue
Block a user