Files
Jan Tomášek 188cff2073 Move optional runtimes into persistent gVisor plugin sandboxes
Move tunnel, browser, document, speech and integration runtimes into plugin-owned
sandboxes with lazy dependencies and instance-scoped lifecycle management.
Reuse Tuxee display assets and the sandbox image's Python/Node runtimes, enable
automatic Desktop login, and show elapsed time for each browser launch.

Slim the outer image, use offline ONNX embeddings, and calculate sandbox storage
only on demand. Include regression coverage and updated runtime documentation.
Exclude local handoff notes and temporary verification artifacts from publication.
2026-11-08 21:43:22 +01:00

18 lines
657 B
Python

import asyncio
from helpers.api import ApiHandler, Request
from plugins._desktop.helpers import runtime
class DesktopSession(ApiHandler):
async def process(self, input: dict, request: Request) -> dict:
action = str(input.get('action') or 'desktop')
if action == 'status':
return runtime.status()
if action in {'desktop', 'open', 'session'}:
await asyncio.to_thread(runtime.start)
return runtime.status()
if action == 'shutdown':
await asyncio.to_thread(runtime.stop)
return runtime.status()
return {'ok': False, 'error': 'Unsupported Desktop action'}