refactor: fold construct-mcp and construct-adapter-* into single construct binary#441
Merged
Merged
Conversation
…truct binary All 7 previously separate binaries are now dispatched through hidden subcommands: `construct __mcp` and `construct __adapter <name>`. Each adapter/mcp crate becomes a library crate (src/main.rs → src/lib.rs, [[bin]] removed, [lib] added). The cli crate grows deps on all of them and routes via two new hidden clap subcommands: `__mcp` and `__adapter`. BUILTIN_ADAPTERS gains an `args` field; all built-ins now set binary="construct" with args=["__adapter","<name>"], so the daemon's existing AdapterConfig.args layering carries the routing prefix into every spawned adapter process. MCP injection (maybe_inject_mcp_config, maybe_inject_codex_mcp_args) now locates `construct` and passes `["__mcp"]` as args in the generated configs. generate_auto_title in session.rs gains a prefix_args param so the smith --title-mode invocation becomes `construct __adapter smith --title-mode`. install.sh ships a single `construct` binary. e2e tests no longer copy sibling adapter binaries in the relocatable daemon case.
Removes references to construct-mcp, construct-adapter-shell, construct-adapter-claude, construct-adapter-codex, construct-adapter-antigravity, construct-adapter-smith as standalone binaries, replacing them with the single-binary dispatch form (construct __mcp, construct __adapter <name>) throughout docs and examples/config.toml.
This was referenced Jun 23, 2026
Merged
edwin-zvs
added a commit
that referenced
this pull request
Jun 23, 2026
PR #441 folded construct-mcp and every construct-adapter-* into the single construct binary, but the release workflow still listed them in BINS and built them with `-p`. The adapter/mcp crates are now libraries with no [[bin]], so `cargo build -p construct-mcp` produces no binary and the packaging step's `cp target/<triple>/release/construct-mcp` fails — which is why the v0.11.0 release build failed on all four targets. Build just `--bin construct` and ship that single binary in the tarball (adapters/mcp run as `construct __adapter <name>` / `construct __mcp`).
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
constructconstruct __adapter <name>(hidden clap subcommand)construct __mcp(hidden clap subcommand)install.shnow ships a single binaryImplementation
Each adapter/mcp crate becomes a pure library (
src/main.rs→src/lib.rs,[[bin]]removed,[lib]added, logic exposed aspub async fn run()). Theclicrate grows deps on all of them.BUILTIN_ADAPTERSgains anargs: &[&str]field; every built-in setsbinary = "construct"withargs = ["__adapter", "<name>"], so the daemon's existingAdapterConfig.argslayering carries the routing prefix into spawned processes automatically.MCP injection (
maybe_inject_mcp_config,maybe_inject_codex_mcp_args) now locatesconstructand passes["__mcp"]as args.generate_auto_titleaccepts aprefix_argsparameter for the same reason.Test plan
cargo buildsucceeds (no new errors)construct __adapter shellspawns a shell sessionconstruct __adapter smithstarts the smith harnessconstruct __mcpconnects to daemon and serves MCP toolsconstruct __adapter smith --title-mode "implement a todo app"prints a short titleconstruct new smith "hello"creates a session (daemon resolves via builtin args)agentd_list_sessionsworks)🤖 Generated with Claude Code