Refactor core owner contracts for Remote SSH and MCP#684
Merged
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
This PR continues the core decomposition work by moving behavior-neutral Remote SSH and MCP contract helpers out of
bitfun-coreand intobitfun-services-integrations.The intent is to reduce core ownership of integration-specific pure contracts while preserving the existing runtime behavior, wire formats, config compatibility, and tool registration semantics.
What Changed
Remote SSH
services-integrations.bitfun-corecall surface as a compatibility facade.MCP
services-integrations.services-integrations.services-integrations.Tool Registry Guardrails
Boundary Enforcement and Docs
scripts/check-core-boundaries.mjsto prevent migrated MCP contracts from being reintroduced intobitfun-core.Why
bitfun-coreshould keep product/runtime orchestration, but not own pure integration contracts that can live in owner crates. This PR moves contract-only pieces toservices-integrationsso later decomposition work can continue with clearer module boundaries and less dependency pressure in core.Behavior / Compatibility
No product behavior change is intended.
The moved code is covered by contract tests for:
Core still owns the runtime-sensitive MCP pieces such as config service orchestration, transport/process management, auth, adapter behavior, and dynamic tool integration.
Risk
Main risk is accidental behavior drift from moving helpers across crate boundaries. The PR mitigates this with focused contract tests plus boundary checks that lock the new ownership direction.
No CLI, desktop UI, or frontend behavior is changed directly.
Validation
node scripts/check-core-boundaries.mjscargo --config "http.proxy=''" test --locked -p bitfun-services-integrations --features product-fullcargo --config "http.proxy=''" test --locked -p bitfun-core agentic::tools::registry::tests --features product-full -- --nocapturecargo --config "http.proxy=''" test --locked -p bitfun-core mcp --features product-full -- --nocaptureCommit Range
Based on the latest two commits on
yanzhn/refactor:3980b722refactor(remote-ssh): move workspace identity helpers8611fb07refactor(mcp): extract pure contracts and harden registry