@clipform/mcp-server 5.9.0 → 5.10.1
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/dist/api-client.js +1 -1
- package/dist/{chunk-HHRUYPFP.js → chunk-4RHYPCK5.js} +2 -2
- package/dist/{chunk-YFOTTAGR.js → chunk-IMRQG5GI.js} +3 -3
- package/dist/{chunk-EQPYULVM.js → chunk-LCTBXXYI.js} +5 -5
- package/dist/{chunk-5AODH5TC.js → chunk-QHIVMOLB.js} +3 -3
- package/dist/{chunk-7PJHCRSD.js → chunk-Z2DXO3RN.js} +9 -5
- package/dist/chunk-Z2DXO3RN.js.map +1 -0
- package/dist/index.js +5 -5
- package/dist/instrument.d.ts +8 -1
- package/dist/instrument.js +9 -1
- package/dist/instrument.js.map +1 -1
- package/dist/prompts.js +3 -3
- package/dist/resources.js +3 -3
- package/dist/server.js +5 -5
- package/package.json +1 -1
- package/server.json +2 -2
- package/dist/chunk-7PJHCRSD.js.map +0 -1
- /package/dist/{chunk-HHRUYPFP.js.map → chunk-4RHYPCK5.js.map} +0 -0
- /package/dist/{chunk-YFOTTAGR.js.map → chunk-IMRQG5GI.js.map} +0 -0
- /package/dist/{chunk-EQPYULVM.js.map → chunk-LCTBXXYI.js.map} +0 -0
- /package/dist/{chunk-5AODH5TC.js.map → chunk-QHIVMOLB.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
createServer,
|
|
5
5
|
process as process2,
|
|
6
6
|
serializeMessage
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-LCTBXXYI.js";
|
|
8
|
+
import "./chunk-IMRQG5GI.js";
|
|
9
|
+
import "./chunk-QHIVMOLB.js";
|
|
10
|
+
import "./chunk-4RHYPCK5.js";
|
|
11
|
+
import "./chunk-Z2DXO3RN.js";
|
|
12
12
|
import "./chunk-ENVV65JX.js";
|
|
13
13
|
import {
|
|
14
14
|
setMcpVersion
|
package/dist/instrument.d.ts
CHANGED
|
@@ -41,6 +41,13 @@ interface McpTelemetryContext {
|
|
|
41
41
|
/** ChatGPT `_meta["openai/locale"]` (BCP 47). Language hint only - never location. */
|
|
42
42
|
clientLocale?: string;
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* #6058: PostHog's bot detection (`$virt_is_bot`, `$virt_traffic_type`, custom
|
|
46
|
+
* bot rules) reads `$raw_user_agent`, and our server-side events carry the
|
|
47
|
+
* caller's UA only as the SDK's `$mcp_client_user_agent`. Copy it across so
|
|
48
|
+
* directory crawlers and liveness probes classify. Same string, no new data.
|
|
49
|
+
*/
|
|
50
|
+
declare function stampRawUserAgent(properties: Record<string, unknown>): void;
|
|
44
51
|
declare function buildInstrumentOptions(mcpAuth: {
|
|
45
52
|
user_id?: string;
|
|
46
53
|
} | null, opts?: InstrumentServerOptions, telemetry?: McpTelemetryContext): MCPAnalyticsOptions;
|
|
@@ -56,4 +63,4 @@ declare function instrumentServer(server: unknown, posthogClient: McpAnalyticsCl
|
|
|
56
63
|
user_id?: string;
|
|
57
64
|
} | null, opts?: InstrumentServerOptions, telemetry?: McpTelemetryContext): void;
|
|
58
65
|
|
|
59
|
-
export { type InstrumentServerOptions, type McpTelemetryContext, buildInstrumentOptions, getMcpAnalyticsClient, instrumentServer, setMcpAnalyticsClient };
|
|
66
|
+
export { type InstrumentServerOptions, type McpTelemetryContext, buildInstrumentOptions, getMcpAnalyticsClient, instrumentServer, setMcpAnalyticsClient, stampRawUserAgent };
|
package/dist/instrument.js
CHANGED
|
@@ -5239,6 +5239,12 @@ function setMcpAnalyticsClient(client) {
|
|
|
5239
5239
|
function getMcpAnalyticsClient() {
|
|
5240
5240
|
return installedClient;
|
|
5241
5241
|
}
|
|
5242
|
+
function stampRawUserAgent(properties) {
|
|
5243
|
+
const ua = properties[PostHogMCPAnalyticsProperty.ClientUserAgent];
|
|
5244
|
+
if (typeof ua === "string" && ua && properties.$raw_user_agent === void 0) {
|
|
5245
|
+
properties.$raw_user_agent = ua;
|
|
5246
|
+
}
|
|
5247
|
+
}
|
|
5242
5248
|
function buildInstrumentOptions(mcpAuth, opts = {}, telemetry) {
|
|
5243
5249
|
return {
|
|
5244
5250
|
context: {
|
|
@@ -5261,6 +5267,7 @@ function buildInstrumentOptions(mcpAuth, opts = {}, telemetry) {
|
|
|
5261
5267
|
}
|
|
5262
5268
|
delete event.properties[PostHogMCPAnalyticsProperty.Parameters];
|
|
5263
5269
|
delete event.properties[PostHogMCPAnalyticsProperty.Response];
|
|
5270
|
+
stampRawUserAgent(event.properties);
|
|
5264
5271
|
if (telemetry) {
|
|
5265
5272
|
if (telemetry.clientOrigin) event.properties.client_origin = telemetry.clientOrigin;
|
|
5266
5273
|
if (telemetry.authMode) event.properties.auth_mode = telemetry.authMode;
|
|
@@ -5293,7 +5300,8 @@ export {
|
|
|
5293
5300
|
buildInstrumentOptions,
|
|
5294
5301
|
getMcpAnalyticsClient,
|
|
5295
5302
|
instrumentServer,
|
|
5296
|
-
setMcpAnalyticsClient
|
|
5303
|
+
setMcpAnalyticsClient,
|
|
5304
|
+
stampRawUserAgent
|
|
5297
5305
|
};
|
|
5298
5306
|
/*! Bundled license information:
|
|
5299
5307
|
|