//! Story 3.14 pre-build acceptance tests: discover and render the bound Published Prompts through //! MCP (AT-3.14-01..04). //! //! Oracles: `docs/acceptance-test-plan.md` AT-3.14-01..04 and `_bmad-output/.../epics-source.md` //! Story 3.14. Every request travels through the real HTTP endpoint built by `build_test_app` against //! a real PostgreSQL registry; the bound versions are produced through the production registry path. mod composition; mod fixtures; mod get; mod latency; mod list; use serde_json::json; use fixtures::*; /// AT-3.14-04: the advertised capability equals the implemented surface on both revisions. #[tokio::test] async fn advertisement_declares_prompts_on_both_revisions() { let endpoint = prompt_endpoint().await; let discover = endpoint.modern("server/discover", json!({}), None).await; assert_eq!( discover["result"]["capabilities"]["prompts"], json!({"listChanged": false}), "the modern advertisement must declare the prompts capability: {discover}" ); let initialize_response = endpoint .client .post(&endpoint.mcp_url) .header( reqwest::header::ACCEPT, "application/json, text/event-stream", ) .header( reqwest::header::AUTHORIZATION, format!("Bearer {}", endpoint.api_key), ) .json(&json!({ "jsonrpc": "2.0", "id": 11, "method": "initialize", "params": {"protocolVersion": LEGACY_REVISION, "capabilities": {}} })) .send() .await .unwrap(); let initialize = json_body(initialize_response).await; assert_eq!( initialize["result"]["capabilities"]["prompts"], json!({"listChanged": false}), "the legacy advertisement must declare the prompts capability: {initialize}" ); }