Sweep every first-party crate source (1956 .rs files) to the project comment guidelines: delete redundant restatements, decorative banners, change narration, and end-of-line comments; keep and tighten the crucial ones (invariants, bug rationale, SAFETY blocks, ported-source attribution). No functional code changed. Every edit is proven comment-only against the prior tree by a comment-stripping lexer (string/char/raw-string aware) plus a separate doctest-fence check. Where removing a comment made rustfmt or clippy want to re-lay-out adjacent code, the minimal triggering comment is restored so code tokens stay byte-identical. Gates green: cargo fmt --all --check (0 diffs), cargo check and cargo clippy --workspace --all-targets (0 warnings). Adds scripts/check_codegen_comment_guidelines.py — the enforcement gate for these guidelines (flags banners, end-of-line comments, change narration, and commented-out code).
39 lines
1.6 KiB
Rust
39 lines
1.6 KiB
Rust
//! MCP integration crate.
|
|
//!
|
|
//! Two responsibilities:
|
|
//!
|
|
//! 1. **Quarantines `rmcp` 2.1 and `reqwest` 0.13.** `rmcp` 2.1 requires
|
|
//! `reqwest >= 0.13.2`. The rest of the workspace consumes `reqwest` 0.12
|
|
//! and a transitive ecosystem (`opentelemetry-otlp`, `oauth2`,
|
|
//! `kigi-mixpanel`, `kigi-tools`, ...) also pinned to 0.12. Bumping every
|
|
//! crate to 0.13 to satisfy `rmcp` triggers a cascade — an OpenTelemetry
|
|
//! `HttpClient` adapter and cross-version test breakage when a crate
|
|
//! carries both versions under a renamed `package = "reqwest"` alias.
|
|
//! reqwest 0.13 is a fully private impl detail of [`servers`]; no
|
|
//! re-export. Consumers reach `rmcp` model types through this namespace
|
|
//! (`kigi_mcp::rmcp::*`).
|
|
//!
|
|
//! 2. **Owns MCP-specific integration code**:
|
|
//! - [`credentials`] -- on-disk `$KIGI_SHARE_DIR/mcp_credentials.json` store and
|
|
//! the rmcp `CredentialStore` adapter.
|
|
//! - [`oauth`] -- browser-based OAuth flow with cross-process + in-process
|
|
//! dedup.
|
|
//! - [`oauth_config`] -- BYO OAuth config types parsed out of `config.toml`.
|
|
//! - [`servers`] -- MCP transport layer (rmcp's `StreamableHttpClientTransport`
|
|
//! and `TokioChildProcess`) plus client lifecycle, tool invocation, error
|
|
//! classification, and managed-MCP refresh.
|
|
//! - [`mcp_http_client`] -- backoff wrapper around the HTTP client handed to
|
|
//! rmcp's streamable-HTTP transport (works around rmcp's zero-backoff SSE
|
|
//! reconnect loop).
|
|
|
|
pub use rmcp;
|
|
|
|
pub mod acp_transport;
|
|
pub mod credentials;
|
|
pub mod liveness;
|
|
pub mod mcp_http_client;
|
|
pub mod oauth;
|
|
pub mod oauth_config;
|
|
pub mod servers;
|
|
pub mod wire;
|