MCP: execute Tools through request-scoped SDK handlers
CI / UI Checks (pull_request) Successful in 8s
CI / Rust Checks (pull_request) Successful in 35m42s
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 8s
CI / Rust Checks (pull_request) Successful in 35m42s
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
5611e81579
commit
3b30aad28e
12 files changed
+798
-151
No files matched your search
@@ -54,6 +54,10 @@ pub(crate) struct CounterSet {
|
||||
sdk_tools_dispatch: AtomicUsize,
|
||||
sdk_tools_list_result: AtomicUsize,
|
||||
sdk_tools_call_result: AtomicUsize,
|
||||
sdk_tools_list_handler_completed: AtomicUsize,
|
||||
sdk_tools_list_handler_consumed: AtomicUsize,
|
||||
sdk_tools_call_handler_completed: AtomicUsize,
|
||||
sdk_tools_call_handler_consumed: AtomicUsize,
|
||||
sdk_resources_dispatch: AtomicUsize,
|
||||
sdk_resources_list_handler_completed: AtomicUsize,
|
||||
sdk_resources_read_handler_completed: AtomicUsize,
|
||||
@@ -101,6 +105,18 @@ pub(crate) struct CounterSet {
|
||||
}
|
||||
|
||||
impl CounterSet {
|
||||
pub(crate) fn sdk_tools_list_handler_completed(&self) -> usize {
|
||||
self.sdk_tools_list_handler_completed.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_tools_list_handler_consumed(&self) -> usize {
|
||||
self.sdk_tools_list_handler_consumed.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_tools_call_handler_completed(&self) -> usize {
|
||||
self.sdk_tools_call_handler_completed.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_tools_call_handler_consumed(&self) -> usize {
|
||||
self.sdk_tools_call_handler_consumed.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_prompts_list_handler_completed(&self) -> usize {
|
||||
self.sdk_prompts_list_handler_completed
|
||||
.load(Ordering::SeqCst)
|
||||
@@ -366,6 +382,23 @@ pub(crate) fn sdk_tools_call_result_serialized() {
|
||||
increment(|counters| &counters.sdk_tools_call_result);
|
||||
}
|
||||
|
||||
/// Mark after the SDK Tools handler awaits the domain operation and builds its typed result.
|
||||
pub(crate) fn sdk_tools_list_handler_completed() {
|
||||
increment(|counters| &counters.sdk_tools_list_handler_completed);
|
||||
}
|
||||
/// Mark only after the caller consumes the actual SDK handler result.
|
||||
pub(crate) fn sdk_tools_list_handler_consumed() {
|
||||
increment(|counters| &counters.sdk_tools_list_handler_consumed);
|
||||
}
|
||||
/// Mark after the SDK Tools handler awaits the domain operation and builds its typed result.
|
||||
pub(crate) fn sdk_tools_call_handler_completed() {
|
||||
increment(|counters| &counters.sdk_tools_call_handler_completed);
|
||||
}
|
||||
/// Mark only after the caller consumes the actual SDK handler result.
|
||||
pub(crate) fn sdk_tools_call_handler_consumed() {
|
||||
increment(|counters| &counters.sdk_tools_call_handler_consumed);
|
||||
}
|
||||
|
||||
/// Mark inside the ServerHandler override after domain await and typed result/error construction.
|
||||
pub(crate) fn sdk_resources_list_handler_completed() {
|
||||
increment(|c| &c.sdk_resources_list_handler_completed);
|
||||
|
||||
Reference in new issue
Block a user