Skip to content

feat(build): support host native plugin builds - #899

Draft
soyeon-oai wants to merge 1 commit into
mainfrom
codex/host-native-build
Draft

soyeon-oai wants to merge 1 commit into
mainfrom
codex/host-native-build

Conversation

@soyeon-oai

@soyeon-oai soyeon-oai commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

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

  • Add pnpm run build:native in the MCP app to compile native TypeScript tools, run the locked Cargo build, and generate notices using the existing plugin dependencies.
  • Add build_mcp_app.mjs --output <directory> --native host. The default remains --native universal, using every verified prebuilt target.
  • Document setup and add packaging regressions for host output, universal output, and missing binaries.

Testing

  • Four packaging tests passed, including the host case that failed before the change.
  • Built the native binding and host MCP payload on macOS ARM64 with Node 22.23.2 and the declared Rust 1.97.1 toolchain.
  • Native compatibility/private-path checks and the Unix native proof with an empty PATH passed. MCP smoke and Deep Scan executor integration tests passed against a detached single-target plugin.
  • SDK 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:native after 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

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

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:#111
Loading

Limits: Host builds are for the build platform; portable releases still use universal artifacts. · Windows and Linux host-build integration was not executed locally.

Source evidence (4)

@github-actions github-actions Bot added the enhancement New feature or request label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant