refactor(acp): extract nori-acp-host crate (slice G2)#529
Open
CSRessel wants to merge 1 commit into
Open
Conversation
Pull the agent-agnostic ACP hosting machinery out of nori-acp into a new Layer-0 crate, nori-acp-host, per docs/specs/crate-layering.md §3: - connection/ (agent subprocess spawn, AcpConnection wire client, MCP wiring) - translator.rs (ACP wire ↔ codex-protocol event bridge) - registry.rs (agent registry / distribution resolution) - patch.rs (file-change/diff helpers) - error_category.rs (AcpErrorCategory + categorize_acp_error, split out of backend/mod.rs; enhanced_error_message stays in the backend — it is UX wording, not a wire concern) nori-acp re-exports the moved modules (`pub use nori_acp_host::connection;` etc.), so downstream consumers are untouched in this slice; the TUI is rewired onto direct crate deps in slice H. Validation: cargo test -p nori-acp-host standalone-clean (106 tests; caught two feature gaps masked by workspace unification — tokio-util "compat", agent-client-protocol-schema "unstable"); full workspace suite green; tui-pty-e2e green; elizacp close-the-loop TUI drive green. Part of the crate-layering refactor (docs/specs/crate-layering.md).
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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.
Slice G2 of the crate-layering refactor (design doc). Stacked on #528 (slice G1, nori-config extraction).
What
Extracts the agent-agnostic ACP hosting machinery from
nori-acpinto a new Layer-0 crate,nori-acp-host:connection/AcpConnectionwire client, MCP server wiringtranslator.rscodex-protocolevent bridgeregistry.rspatch.rserror_category.rsAcpErrorCategory+categorize_acp_error(split out ofbackend/mod.rs)enhanced_error_messagestays in thenori-acpbackend — it's user-facing UX wording, not a wire concern.Compatibility
nori-acpre-exports the moved modules (pub use nori_acp_host::connection;etc.), so downstream consumers (TUI) are unchanged in this slice. Slice H rewires the TUI onto direct crate deps and drops the aliases.Why
Per the design doc §3, Layer-0 leaves (
nori-acp-host,nori-protocol,mock-acp-agent) must be independently usable and testable by other projects in the ACP / harness-engineering ecosystem. This is the crate you'd pull in to host any ACP agent from your own frontend.Validation
cargo test -p nori-acp-hoststandalone-clean (106 tests). Standalone build caught two dep-feature gaps masked by workspace feature unification (tokio-utilcompat,agent-client-protocol-schemaunstable) — exactly the class of bug this extraction exists to surface.cargo test --workspace --exclude tui-pty-e2e).cargo build --bin nori+cargo test -p tui-pty-e2egreen.just fmt,just fix -p nori-acp-hostclean.