@armature-tech/mcp-analytics 0.6.40 → 0.6.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -40
- package/SKILL.md +6 -5
- package/dist/cjs/doctor.js +5 -3
- package/dist/cjs/events.js +3 -2
- package/dist/cjs/fastmcp.js +2 -5
- package/dist/cjs/mastra.js +6 -10
- package/dist/cjs/recorder.js +5 -5
- package/dist/cjs/request-capability.d.ts +10 -1
- package/dist/cjs/request-capability.js +30 -10
- package/dist/cjs/schema.d.ts +13 -12
- package/dist/cjs/schema.js +41 -172
- package/dist/cjs/server.js +8 -62
- package/dist/cjs/types.d.ts +7 -3
- package/dist/cjs/v2.js +2 -5
- package/dist/esm/doctor.js +6 -4
- package/dist/esm/events.js +3 -2
- package/dist/esm/fastmcp.js +3 -6
- package/dist/esm/mastra.js +7 -11
- package/dist/esm/recorder.js +6 -6
- package/dist/esm/request-capability.d.ts +10 -1
- package/dist/esm/request-capability.js +29 -9
- package/dist/esm/schema.d.ts +13 -12
- package/dist/esm/schema.js +39 -170
- package/dist/esm/server.js +9 -63
- package/dist/esm/types.d.ts +7 -3
- package/dist/esm/v2.js +3 -6
- package/package.json +1 -1
package/dist/esm/types.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ export type TelemetryFieldMap = {
|
|
|
60
60
|
call_purpose?: string;
|
|
61
61
|
/** @deprecated Accepted for compatibility. Prefer call_purpose. */
|
|
62
62
|
agent_thinking?: string;
|
|
63
|
+
/** @deprecated `user_frustration` is no longer collected; this mapping is ignored. */
|
|
63
64
|
user_frustration?: string;
|
|
64
65
|
};
|
|
65
66
|
export type McpAnalyticsConfig = {
|
|
@@ -83,10 +84,12 @@ export type McpAnalyticsConfig = {
|
|
|
83
84
|
/** Register background work with a platform lifecycle primitive (for example waitUntil). */
|
|
84
85
|
schedule?: (work: Promise<void>) => void;
|
|
85
86
|
telemetryFieldMap?: TelemetryFieldMap;
|
|
87
|
+
sendFeedback?: boolean;
|
|
88
|
+
/** @deprecated Earlier name of `sendFeedback`; `sendFeedback` wins when both are set. */
|
|
86
89
|
requestCapability?: boolean;
|
|
87
90
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
91
|
+
* @deprecated The SDK no longer adds text to tool descriptions, so there
|
|
92
|
+
* is no length notice. Accepted and ignored.
|
|
90
93
|
*/
|
|
91
94
|
descriptionLengthLogLevel?: DescriptionLengthLogLevel;
|
|
92
95
|
};
|
|
@@ -108,12 +111,13 @@ export type TelemetryArgs = {
|
|
|
108
111
|
call_purpose?: string;
|
|
109
112
|
/** @deprecated Accepted for compatibility. Prefer call_purpose. */
|
|
110
113
|
agent_thinking?: string;
|
|
114
|
+
/** @deprecated No longer collected: accepted from cached clients and dropped. */
|
|
111
115
|
user_frustration?: "low" | "medium" | "high";
|
|
112
116
|
/** @deprecated Pre-V1 spelling of `user_intent`; still accepted. */
|
|
113
117
|
intent?: string;
|
|
114
118
|
/** @deprecated Pre-V1 spelling of `agent_thinking`; still accepted. */
|
|
115
119
|
context?: string;
|
|
116
|
-
/** @deprecated
|
|
120
|
+
/** @deprecated No longer collected: accepted from cached clients and dropped. */
|
|
117
121
|
frustration_level?: "low" | "medium" | "high";
|
|
118
122
|
};
|
|
119
123
|
export type ExtractedToolArguments = {
|
package/dist/esm/v2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BAGGAGE_META_KEY, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, PROTOCOL_VERSION_META_KEY, fromJsonSchema, } from "@modelcontextprotocol/server";
|
|
2
2
|
import { createAnalyticsRecorderCore, } from "./recorder-core.js";
|
|
3
3
|
import { defaultMcpAnalyticsConfig } from "./emit.js";
|
|
4
|
-
import {
|
|
4
|
+
import { stripSdkDescriptionHint, createTelemetryJsonSchema, isCaptureEnabled, schemaDeclaresTelemetry, } from "./schema.js";
|
|
5
5
|
import { capCapabilities } from "./events.js";
|
|
6
6
|
import { prepareForPreview } from "./sanitize.js";
|
|
7
7
|
import { headerValue, isRecord, stringifyPreview, truncateUtf8 } from "./utils.js";
|
|
@@ -412,11 +412,8 @@ const instrumentRegisteredTool = (state, server, name, tool, defaults, options)
|
|
|
412
412
|
...(decoratedSchema !== undefined
|
|
413
413
|
? {
|
|
414
414
|
paramsSchema: decoratedSchema,
|
|
415
|
-
//
|
|
416
|
-
description:
|
|
417
|
-
toolName: name,
|
|
418
|
-
logLevel: state.config.armature?.descriptionLengthLogLevel,
|
|
419
|
-
}),
|
|
415
|
+
// Never adds text; removes SDK hint suffixes from earlier releases.
|
|
416
|
+
description: stripSdkDescriptionHint(registered.description),
|
|
420
417
|
}
|
|
421
418
|
: {}),
|
|
422
419
|
callback: wrapToolCallback(state, name, originalHasInputSchema, registeredHasInputSchema, handler, defaults, options),
|