Launch managed SDK servers through the Rust runtime wrapper - #2395
Conversation
Stage and launch copilot-runtime beside runtime.node across all SDKs, with an opt-in local runtime-worktree override until published packages include the wrapper. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Route out-of-process E2E harnesses through the local runtime override while preserving the residual CLI for in-process execution. Keep Java bundled residual injection intact and surface Python fast-exit diagnostics reliably. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Ensure managed wrapper launches materialize and hand off the compatible host, and expose the same launch descriptor for health checks and intermediate launchers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2455380f-4747-4900-89ca-93b30399de03
Extract the bundled CLI beside copilot-runtime and runtime.node so managed and intermediate launches retain compatibility through the wrapper's sibling fallback. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Ensure a clean bundled runtime cache can publish runtime.node, the wrapper, and sibling CLI before any artifact path exists. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Keep the root CLI artifact bundled for direct and in-process use, while managed out-of-process caches materialize only copilot-runtime and runtime.node. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Wait for the bounded stderr reader to drain before failing pending JSON-RPC requests so startup diagnostics are preserved. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Serialize the MCP stdio server working directory using the protocol's cwd field and cover the wire shape with a focused regression test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
|
The hostless wrapper direction looks right, but this is not complete yet because I manually tested all 48 combinations: 6 SDKs × stdio/TCP/in-process/existing URL × source/published consumption, using The missing piece is preserving the hostless runtime assets relative to Node-only and delivery-only content can be excluded: I validated this approach on .NET in both development and after Before merging, I think this PR needs to:
|
Preserve unknown package assets by default while filtering known CLI-only content in each SDK's existing staging path. Keep wrapper companions adjacent, migrate caches safely, and retain executable metadata for external runtime tools. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f5c3c30-0cf7-4b9a-9a3b-2b01ca073015
Managed out-of-process SDK connections currently launch the root Copilot SEA directly. The runtime now provides a dedicated
copilot-runtimeexecutable that loads the adjacentruntime.node, so SDK-managed subprocess connections should use that coherent wrapper/addon pair while preserving explicit external server and in-process modes.What changed
copilot-runtime(copilot-runtime.exeon Windows).runtime.node, retaining the rootcopilotexecutable only for residual and in-process compatibility.cwdserialization issue discovered during end-to-end validation.Validation
Validated all six SDKs against the immutable same-tip runtime release candidate
adce886fd1across supported root SEA, in-process, and hostless wrapper transports. The final focused cache/resume gates and supported full-suite cells passed with exact artifact hash checks and no leaked runtime processes.The auxiliary-asset follow-up adds focused staging, cache-migration, filtering, permission, and path-safety tests in all six SDKs. A real Node hostless-wrapper integration test also confirms built-in grep completes successfully through the staged ripgrep binary.
Known non-runtime exclusions remain documented from validation: hostless Node extension/factory lifecycle behavior (including the corresponding .NET extension tests), the Go invalid-model fixture, the Java literal-YAML fixture and order-dependent socket-helper contamination, and Rust forced-environment unit-test contamination.
Review notes
This is a draft while the runtime platform packages and Java classifier publication complete. The production platform package is treated as the runtime distribution source: the root
copilot[.exe], selectedprebuilds/<platform>/runtime.nodeandcopilot-runtime[.exe], and retained package-relative runtime assets are staged as one coherent version. Mixed or incomplete artifact sets are rejected.