feat(mcp): adopt the shared mcp-web crate for the generic web layer #127
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/YT-73-adopt-mcp-web"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adopt the shared
mcp-webcrate for youtrack-mcp's product-agnostic web layer (the second half of the YT-73 / MCPWEB-1 extraction). youtrack-mcp keeps only its YouTrack-specific parts and depends onmcp-web = "0.1"from the pandoras-box Forgejo Cargo registry.Changes
crypto,password,totp, andweb/{session,oauth_as,auth_mw,sweep,admin,accounts,templates}plus the generic HTML templates and the0001-0005migrations. Their clean equivalents live inmcp-web.client_for_account(per-account YouTrack client from the stored instance), theUpstreamDirectoryimpl over the instance table, and the instance-management UI (web/instance.rs), handed tomcp_web::build_routeras extra routes with/mcpgated by the re-exportedrequire_bearer.1000, chained aftermcp-web's generic set (1..=999) viamcp_web::db::open_with(one_sqlx_migrationstable).YOUTRACK_MCP_*env var names;yt mcp stdiois untouched..cargo/config.tomldefining thepandoras-box-cargoregistry (sparse index) so the dep resolves; the org is public, so the build reads it anonymously (no token).Verification
just pre-commitgreen (fmt, clippy-D warnings, build, tests) withmcp-web 0.1.0resolved from the registry inside the docker container.Cargo.lockpinsmcp-webtosparse+https://dev.a8n.run/api/packages/pandoras-box/cargo/with the published checksum.Closes the last acceptance criterion of MCPWEB-1 (
just pre-commitgreen in both repositories).#MCPWEB-1
Replace youtrack-mcp's in-crate copy of the product-agnostic MCP web layer with a dependency on the published `mcp-web` crate (extracted in YT-73), keeping only the YouTrack-specific parts. mcp-web resolves from the pandoras-box Forgejo Cargo registry (`mcp-web = "0.1"`, alias in .cargo/config.toml); the org is public so the build reads it anonymously. - Delete the relocated generic modules: crypto, password, totp, and web/{session,oauth_as,auth_mw,sweep,admin,accounts,templates} plus the generic HTML templates and the 0001-0005 migrations. Their clean equivalents now live in mcp-web. - Keep the product parts and wire the seams: `client_for_account` (per-account YouTrack client from the stored instance), the `UpstreamDirectory` impl over the instance table, and the instance-management UI (web/instance.rs, the one page this crate still renders), handed to `mcp_web::build_router` as extra routes with `/mcp` gated by the re-exported `require_bearer`. - Ship the instance table as a single migration at version 1000, chained after mcp-web's generic set (1..=999) via `mcp_web::db::open_with`, so both live under one _sqlx_migrations table. - Keep the YOUTRACK_MCP_* env var names; `yt mcp stdio` is untouched. Whole workspace green (fmt, clippy -D warnings, tests) with mcp-web resolved from the registry inside the docker pre-commit. #MCPWEB-1