exlab_wizard.window.main#
exlab-wizard-window console_scripts entry point. Backend Spec §15.3.2.
Reads <state_dir>/server.json written by the tray’s
ServerRunner, validates the recorded PID is alive, and hands
off to pywebview_app.
Stale state file – prints a one-line message to stderr and exits with
status 2 (the tray’s WindowLauncher interprets this as “tray
died; restart from scratch”; Backend §4.3.2).
Functions
|
Cross-platform "is this PID a live process?" check. |
|
Entry point. |
|
Read and validate |
Classes
|
Resolved |
- class exlab_wizard.window.main.ServerHandshake(*, port, pid, started_at)[source]#
Bases:
objectResolved
server.jsoncontents:port/pid/started_at.- pid#
- port#
- started_at#
- exlab_wizard.window.main.main(argv=None, *, state_dir=None, handoff=None, pid_alive=None)[source]#
Entry point. Backend Spec §15.3.2.
argvis ignored at this phase (the spec lists--debugas a debug-build-only flag; release artifacts read theEXLAB_DEBUGenv var instead).state_dir,handoff, andpid_aliveare dependency injection hooks for tests.
- exlab_wizard.window.main.read_server_handshake(state_dir)[source]#
Read and validate
<state_dir>/server.json.Returns the handshake on success,
Noneif the file is missing or malformed. Validation is intentionally minimal – if the file exists, the PID is alive, and the port parses, we proceed; deeper health checks happen on the first HTTP call inside pywebview.- Parameters:
state_dir (
Path)- Return type: