MCP: dispatch incoming requests and notifications through SDK envelopes
CI / UI Checks (pull_request) Successful in 14s
CI / Rust Checks (pull_request) Successful in 35m55s
CI / Rust Feature Validation (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Required Checks (pull_request) Successful in 1s
CI / Deploy (pull_request) Skipped
CI / UI Checks (pull_request) Successful in 14s
CI / Rust Checks (pull_request) Successful in 35m55s
CI / Rust Feature Validation (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Required Checks (pull_request) Successful in 1s
CI / Deploy (pull_request) Skipped
This commit is contained in:
1 parent
156a849087
commit
0de1e94df4
8 files changed
+662
-33
No files matched your search
@@ -75,6 +75,8 @@ pub(crate) struct CounterSet {
|
||||
sdk_jsonrpc_error: AtomicUsize,
|
||||
sdk_ping_request: AtomicUsize,
|
||||
sdk_ping_result: AtomicUsize,
|
||||
sdk_dispatch_decoded: AtomicUsize,
|
||||
sdk_dispatch_consumed: AtomicUsize,
|
||||
sdk_initialized_decoded: AtomicUsize,
|
||||
sdk_initialized_consumed: AtomicUsize,
|
||||
sdk_initialize_input: AtomicUsize,
|
||||
@@ -83,6 +85,12 @@ pub(crate) struct CounterSet {
|
||||
}
|
||||
|
||||
impl CounterSet {
|
||||
pub(crate) fn sdk_dispatch_decoded(&self) -> usize {
|
||||
self.sdk_dispatch_decoded.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_dispatch_consumed(&self) -> usize {
|
||||
self.sdk_dispatch_consumed.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_initialized_decoded(&self) -> usize {
|
||||
self.sdk_initialized_decoded.load(Ordering::SeqCst)
|
||||
}
|
||||
@@ -456,6 +464,19 @@ pub(crate) fn sdk_initialized_notification_consumed(
|
||||
#[path = "../rmcp_initialized_runtime_tests.rs"]
|
||||
mod rmcp_initialized_runtime_tests;
|
||||
|
||||
/// Mark after successful SDK envelope decode, independently of routing consumption.
|
||||
pub(crate) fn sdk_dispatch_envelope_decoded() {
|
||||
increment(|counters| &counters.sdk_dispatch_decoded);
|
||||
}
|
||||
|
||||
/// Mark only when decoded method/kind selects the existing registry-backed route.
|
||||
pub(crate) fn sdk_dispatch_envelope_consumed() {
|
||||
increment(|counters| &counters.sdk_dispatch_consumed);
|
||||
}
|
||||
|
||||
#[path = "../rmcp_dispatch_runtime_tests.rs"]
|
||||
mod rmcp_dispatch_runtime_tests;
|
||||
|
||||
fn increment(counter: impl Fn(&CounterSet) -> &AtomicUsize) {
|
||||
let _ = OBSERVER.try_with(|counters| {
|
||||
counter(counters).fetch_add(1, Ordering::SeqCst);
|
||||
|
||||
Reference in new issue
Block a user