Repository navigation
Run Unity bridge commands through Python - #300
Merged
Eli Pinkerton (wallstop) merged 1 commit intoOct 19, 2026
Merged
Eli Pinkerton (wallstop) merged 1 commit into
Eli Pinkerton (wallstop) merged 1 commit into
Conversation
Eli Pinkerton (wallstop)
added this pull request to stack #297
October 18, 2026 21:11
The Python implementation is ready to replace Node. Route npm commands through uv and preserve the old Node path as a small compatibility launcher. Match Node HTTP behavior with HTTP/1.1 continue and connection reuse. A socket regression first timed out waiting for 100 Continue and now passes. A one-megabyte request to a CLI that stops reading also reproduced a blocked timeout; a per-child writer queue bounded to 128 messages keeps pipe writes outside the request lock, so request deadlines and health remain responsive. Strict pyright, Python 3.9 focused cases, the full 17-step gate, and native Windows bridge contracts pass. Windows runs 17 cases with four expected legacy/platform skips; those Node hooks are removed in the final cleanup layer. The diff is 751 changed lines. Refs #171.
Eli Pinkerton (wallstop)
force-pushed
the
refactor/python-bridge-entrypoint
branch
from
October 18, 2026 21:30
0732575 to
c4e9d4e
Compare
Eli Pinkerton (wallstop)
deleted the
refactor/python-bridge-entrypoint
branch
October 19, 2026 02:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DISCLOSURE: LLM-GENERATED TEXT
Why: The validated Python bridge is not yet the default entry point.
What:
Refs #171.
Type of Change
Checklist
Note
Medium Risk
Changes the default MCP host/sync path and stdin/HTTP threading for the Unity bridge; behavior is heavily tested but affects devcontainer agent connectivity to Unity.
Overview
Makes the typed Python implementations the default for Unity MCP hosting and universal MCP sync, while keeping thin Node launchers for backward compatibility.
npm now runs
uv run scripts/mcp_configure.py(mcp:sync) anduv run scripts/unity_mcp_host.py(unity:mcp:host)..llm/mcp/unity-mcp-host.mjsis reduced to a uv/Python 3.9+ delegator instead of hosting the full HTTP bridge.The Python bridge decouples CLI stdin writes from request handling via a bounded input queue and writer thread, so a stalled Unity CLI reader no longer blocks RPC timeouts or
/healthz. The HTTP handler advertises HTTP/1.1 for clients usingExpect: 100-continueand connection reuse.Docs in
.llm/mcp/README.mddescribe the new entry points. Tests retire direct Node bridge coverage, extend the Python harness (stalled input, legacy.mjslauncher, HTTP continue), and skip the old NodeHostTestsclass.Reviewed by Cursor Bugbot for commit c4e9d4e. Bugbot is set up for automated code reviews on this repo. Configure here.