AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He
fix(daemons): report lock pid on startup, drop redundant liveness probe
hugohe38c9d725e8206
diff --git a/skills/ppt-master/scripts/confirm_ui/server.py b/skills/ppt-master/scripts/confirm_ui/server.pyindex 952b2dbb..26680465 100644--- a/skills/ppt-master/scripts/confirm_ui/server.py+++ b/skills/ppt-master/scripts/confirm_ui/server.py@@ -1049,8 +1049,13 @@ def _wait_for_server_ready(proc: subprocess.Popen,project_path: Path,timeout: int = STARTUP_TIMEOUT,-) -> bool:- """Wait until this project's detached confirm server is accepting requests."""+) -> int:+ """Wait until this project's detached confirm server is accepting requests.++ Returns the server pid recorded in the project lock, or 0 on timeout.+ ``proc.pid`` is not used for identity: on Windows a venv ``python.exe``+ may be a launcher whose child is the real interpreter.+ """deadline = time.time() + timeoutlast_error = ''health_url = _server_url(port, '/api/health')@@ -1058,7 +1063,7 @@ def _wait_for_server_ready(returncode = proc.poll()if returncode is not None:logger.error('confirm UI exited during startup (code=%s)', returncode)- return False+ return 0try:with urllib.request.urlopen(health_url, timeout=1) as resp:data = json.load(resp)@@ -1072,9 +1077,8 @@ def _wait_for_server_ready(and lock is not Noneand lock.get('port') == portand data.get('pid') == server_pid- and _process_alive(server_pid)):- return True+ return server_pidlast_error = 'health response belongs to another service or project'except (OSError, ValueError, urllib.error.URLError) as exc:last_error = str(exc)@@ -1085,7 +1089,7 @@ def _wait_for_server_ready(timeout,f' (last error: {last_error})' if last_error else '',)- return False+ return 0def _launch_background_server(@@ -1120,13 +1124,14 @@ def _launch_background_server(logger=logger,)logger.info('log: %s', log_path)- if not _wait_for_server_ready(port, proc, project_path):+ server_pid = _wait_for_server_ready(port, proc, project_path)+ if not server_pid:if proc.poll() is None:proc.terminate()raise RuntimeError(f'confirm UI failed to become reachable: {_server_url(port)}')_sync_session_state(confirm_dir, server_port=port, event='server-ready')url = _server_url(port)- logger.info('started confirm UI in background: %s (pid=%s)', url, proc.pid)+ logger.info('started confirm UI in background: %s (pid=%s)', url, server_pid)if open_browser:webbrowser.open(url)return proc, port, log_pathdiff --git a/skills/ppt-master/scripts/svg_editor/server.py b/skills/ppt-master/scripts/svg_editor/server.pyindex 456105ca..414debb2 100644--- a/skills/ppt-master/scripts/svg_editor/server.py+++ b/skills/ppt-master/scripts/svg_editor/server.py@@ -1065,15 +1065,20 @@ def _wait_for_ready(proc: subprocess.Popen,project_path: Path,timeout: int = STARTUP_TIMEOUT,-) -> bool:- """Wait until this project's detached live-preview server responds."""+) -> int:+ """Wait until this project's detached live-preview server responds.++ Returns the server pid recorded in the project lock, or 0 on timeout.+ ``proc.pid`` is not used for identity: on Windows a venv ``python.exe``+ may be a launcher whose child is the real interpreter.+ """deadline = time.time() + timeouthealth_url = _server_url(port, '/api/health')last_error = ''while time.time() < deadline:if proc.poll() is not None:logger.error('live preview exited during startup (code=%s)', proc.returncode)- return False+ return 0try:with urllib.request.urlopen(health_url, timeout=1) as response:data = json.load(response)@@ -1087,9 +1092,8 @@ def _wait_for_ready(and lock is not Noneand lock.get('port') == portand data.get('pid') == server_pid- and _process_alive(server_pid)):- return True+ return server_pidlast_error = 'health response belongs to another service or project'except (urllib.error.URLError, TimeoutError, OSError, ValueError) as exc:last_error = str(exc)@@ -1100,7 +1104,7 @@ def _wait_for_ready(timeout,f' (last error: {last_error})' if last_error else '',)- return False+ return 0def _open_browser(url: str) -> bool:@@ -1296,12 +1300,13 @@ def main(argv: Optional[list[str]] = None) -> int:logger.error('cannot write live preview log: %s (%s)', log_path, exc)return 1url = _server_url(port)- if not _wait_for_ready(port, proc, project_path):+ server_pid = _wait_for_ready(port, proc, project_path)+ if not server_pid:if proc.poll() is None:proc.terminate()logger.error('live preview failed to become reachable: %s (log: %s)', url, log_path)return 1- logger.info('started live preview in background: %s (pid=%s)', url, proc.pid)+ logger.info('started live preview in background: %s (pid=%s)', url, server_pid)logger.info('log: %s', log_path)if not args.no_browser and not _open_browser(url):logger.info('browser did not auto-open; open %s manually', url)