Skip to content

refactor(tui,cli): import config from nori-config directly (slice H1)#530

Open
CSRessel wants to merge 1 commit into
refactor/extract-acp-hostfrom
refactor/tui-config-rewire
Open

refactor(tui,cli): import config from nori-config directly (slice H1)#530
CSRessel wants to merge 1 commit into
refactor/extract-acp-hostfrom
refactor/tui-config-rewire

Conversation

@CSRessel

@CSRessel CSRessel commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Slice H1 of the crate-layering refactor (design doc). Stacked on #529 (slice G2, nori-acp-host extraction).

What

Rewires the Layer-2 frontends (nori-tui, nori-cli crates) off nori-acp's config re-exports and onto the nori-config crate directly, then seals nori-acp's public config surface:

  • nori_acp::config::Xnori_config::X across tui/ and cli/ (~200 references; nori-config re-exports its surface flat at the crate root), plus the six top-level conveniences (ApprovalPolicy, FileManager, HistoryPersistence, NoriConfig, NoriConfigOverrides, find_nori_home).
  • nori-acp: the six pub use config::* re-exports are deleted and pub use nori_config as config is demoted to pub(crate) — config is no longer part of nori-acp's public API. Its 53 internal crate::config:: uses are unchanged.
  • tui/Cargo.toml, cli/Cargo.toml gain the nori-config workspace dep; a stale comment referencing the cargo feature removed in slice C is dropped.

Net −31 lines (224+/255−).

Why

Design doc §3: frontends take leaf crates directly; the harness crate is not a config pass-through. This makes dependency rule 2 ("nothing below Layer 2 knows a terminal exists, frontends reach leaves directly") mechanically visible in Cargo.toml instead of hidden behind re-exports, and shrinks the surface that must be considered when nori-acp becomes nori-harness.

Validation

  • Full workspace suite green (cargo test --workspace --exclude tui-pty-e2e).
  • cargo build --bin nori + cargo test -p tui-pty-e2e green (23 suites).
  • elizacp close-the-loop TUI drive: prompt → response rendered → prompt returns.
  • just fmt, just fix -p nori-tui/-p nori-cli/-p nori-acp clean.

Rewire the Layer-2 frontends off nori-acp's config re-exports and onto the
nori-config crate directly, per docs/specs/crate-layering.md §3: frontends
take leaf crates directly; the harness crate is not a config pass-through.

- tui/, cli/: `nori_acp::config::X` → `nori_config::X` (nori-config
  re-exports its surface flat at the crate root), plus the six top-level
  conveniences (ApprovalPolicy, FileManager, HistoryPersistence, NoriConfig,
  NoriConfigOverrides, find_nori_home)
- nori-acp: public config surface sealed — the six `pub use config::*`
  re-exports deleted, `pub use nori_config as config` demoted to pub(crate)
  (53 internal uses unchanged); stale crate doc comment updated
- tui/Cargo.toml: drop stale comment for the cargo feature removed in
  slice C

Validation: full workspace suite green; tui-pty-e2e green (23 suites);
elizacp close-the-loop TUI drive green; just fmt + just fix clean.

Part of the crate-layering refactor (docs/specs/crate-layering.md).
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant