mcp_repl/lifecycle.rs
1//! Project lifecycle and extraction guide.
2//!
3//! `mcp-repl` is independently versioned and published even though its source
4//! currently lives in the tower-mcp workspace. This guide records the release
5//! contract and the work required before moving it to a standalone repository.
6//! It is a plan, not authorization to perform the move.
7//!
8//! # Supported boundaries
9//!
10//! The application lives in the `mcp_repl` library and the binary is only a
11//! thin call to [`crate::run_cli`]. The deliberately reusable seams are:
12//!
13//! - [`crate::config`] for native server and alias profiles;
14//! - [`crate::import_config`] for explicit imports from standard MCP JSON
15//! configuration files; and
16//! - [`crate::oauth_profile`] for non-secret OAuth profile metadata and secure
17//! credential-store access.
18//!
19//! Terminal editing, rendering, and command dispatch remain private. A related
20//! tool such as `mcp2md` should not depend on all of `mcp-repl` merely to reuse
21//! configuration: that would also couple it to the interactive terminal stack.
22//! Keep such a tool independent unless real duplication justifies extracting a
23//! narrow configuration or connection crate used by both projects.
24//!
25//! # Compatibility and release lanes
26//!
27//! The path-scoped `mcp-repl` workflow owns the package's checks independently
28//! from the rest of the workspace:
29//!
30//! ```text
31//! cargo fmt -p mcp-repl -- --check
32//! cargo clippy -p mcp-repl --all-targets --all-features -- -D warnings
33//! cargo test -p mcp-repl --all-targets --all-features
34//! RUSTDOCFLAGS=-Dwarnings cargo doc -p mcp-repl --no-deps --all-features
35//! ```
36//!
37//! Those commands test the workspace's current `tower-mcp`, which is the main
38//! compatibility lane. `cargo package -p mcp-repl` creates and verifies the
39//! normalized publishable package. In that package, Cargo replaces the
40//! workspace path dependency with the declared crates.io version, so this is
41//! also the released-framework compatibility lane. A tower-mcp version change
42//! must be published before that package lane can pass.
43//!
44//! While the package remains in this workspace, the repository's release-plz
45//! workflow owns crates.io publication, tags, GitHub releases, and changelog
46//! updates. Do not publish the same version manually in parallel. Before an
47//! extraction, let the final workspace release finish and start the new
48//! repository at the next version. Copy and dry-run the release workflow before
49//! enabling its registry credential.
50//!
51//! # Extraction checklist
52//!
53//! Perform history rewriting only in a disposable clone. A starting point is:
54//!
55//! ```text
56//! git filter-repo \
57//! --path examples/mcp-repl/ \
58//! --path LICENSE-APACHE \
59//! --path LICENSE-MIT \
60//! --path-rename examples/mcp-repl/:
61//! git log --follow -- src/lib.rs
62//! ```
63//!
64//! Before making the new repository authoritative:
65//!
66//! 1. Move or reproduce the black-box fixture currently located at
67//! `examples/mcp_repl_fixture.rs`; it intentionally is not part of the
68//! published package today.
69//! 2. Replace workspace-inherited package fields and dependencies with explicit
70//! standalone manifest values, then run all checks and `cargo package` from
71//! the extracted repository.
72//! 3. Carry over the licenses, contribution and security policy, code-owner and
73//! dependency-update settings, supported Rust version, and the path-scoped
74//! quality workflow.
75//! 4. Transfer open mcp-repl issues when possible. Otherwise recreate them with
76//! bidirectional links, leave a migration notice in tower-mcp, and update
77//! repository links in the README, Cargo manifest, crates.io, docs.rs, and
78//! release notes.
79//! 5. Confirm the maintainers and crates.io owners who will handle releases and
80//! security reports. Publish the new repository's security contact before
81//! changing the crate's canonical repository URL.
82//! 6. Verify tags, changelog history, and `git log --follow` before archiving the
83//! old source location or closing the extraction tracker.
84//!
85//! Until those steps are complete, source, issue triage, release notes, and
86//! security reporting remain owned by the tower-mcp repository.