feat(build): support host native plugin builds - #899
Draft
soyeon-oai wants to merge 1 commit into
Draft
soyeon-oai wants to merge 1 commit into
soyeon-oai wants to merge 1 commit into
Conversation
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.
Summary
Local and CI plugin builds currently require native artifacts for every supported platform. Add an explicit host packaging mode so those builds can compile the checked-out native source and package only the current target, with its notices.
Changes
pnpm run build:nativein the MCP app to compile native TypeScript tools, run the locked Cargo build, and generate notices using the existing plugin dependencies.build_mcp_app.mjs --output <directory> --native host. The default remains--native universal, using every verified prebuilt target.Testing
build:ci, plugin source compatibility, all nine compatibility tests, and the plugin's pinned Ruff checks passed. Compatibility tests ran with the local proxy agent's unrelated warning suppressed in child processes.Risk and rollout
This changes build tooling only. Universal package and release consumers retain their complete native payload requirement. Host mode requires
build:nativeafter native source changes and is intended for the build host; it does not replace portable distribution artifacts. Actual Windows and Linux host-build integration was not executed locally.Public disclosure review
Change impact
The MCP app can compile one native target and package it without a universal artifact.
flowchart LR subgraph column_0["Inputs"] direction TB node_0["MCP app dependencies"] node_3["Prebuilt native files"] end subgraph column_1["Build tools"] direction TB node_1["Compile host native"] node_4["Select native payload"] end subgraph column_2["Payload"] direction TB node_2["Host binary and notices"] node_5["MCP output"] end node_0 -->|"compiles tools"| node_1 node_1 -->|"builds and prepares"| node_2 node_2 -->|"supplies host mode"| node_4 node_3 -->|"supplies default mode"| node_4 node_4 -->|"copies declared files"| node_5 class node_0 context class node_1 changed class node_2 affected class node_3 context class node_4 changed class node_5 affected classDef changed fill:#d7f5e5,stroke:#237a4b,color:#111 classDef affected fill:#e6f0ff,stroke:#3569a8,color:#111 classDef context fill:#f2f3f5,stroke:#6e7781,color:#111Source evidence (4)
plugins/codex-security/mcp-app/scripts/build_native.mjs:L8-L16— Compile native tools using the MCP app TypeScript dependency.plugins/codex-security/mcp-app/scripts/build_native.mjs:L18-L27— Run the existing locked native build and generate shared notices.plugins/codex-security/mcp-app/scripts/build_mcp_app.mjs:L13-L42— Host mode reads the current target from dist; the default copies every declared prebuilt file.plugins/codex-security/mcp-app/tsconfig.native.json:L1-L12— Emit the native tools without requiring the SDK TypeScript project.