@togglhq/mcp 1.8.0 → 1.8.2
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/build/cli.js +8 -4
- package/build/index.d.ts +3355 -1949
- package/build/index.js +1 -1
- package/build/{src-BHdIWjE4.js → src-B1RvFhZP.js} +9318 -1925
- package/package.json +1 -1
package/build/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as initProductAnalytics, c as shutdownProductAnalytics, i as getProductAnalyticsDistinctId, n as runMcpCli, o as redactUnsafeSentryMessages, r as captureToolInvocation, s as resolveProductAnalyticsDistinctId } from "./src-
|
|
2
|
+
import { a as initProductAnalytics, c as shutdownProductAnalytics, i as getProductAnalyticsDistinctId, n as runMcpCli, o as redactUnsafeSentryMessages, r as captureToolInvocation, s as resolveProductAnalyticsDistinctId } from "./src-B1RvFhZP.js";
|
|
3
3
|
import * as Sentry from "@sentry/node";
|
|
4
4
|
//#region src/analytics-tool-metadata.ts
|
|
5
5
|
/**
|
|
@@ -135,12 +135,15 @@ function wrapServerWithProductAnalytics(server) {
|
|
|
135
135
|
const action = readToolAction(handlerArgs);
|
|
136
136
|
let distinctId = resolveProductAnalyticsDistinctId("mcp") ?? getProductAnalyticsDistinctId();
|
|
137
137
|
let outcome = "error";
|
|
138
|
+
let result;
|
|
139
|
+
let thrown;
|
|
138
140
|
try {
|
|
139
|
-
|
|
141
|
+
result = await toolHandler(...handlerArgs);
|
|
140
142
|
outcome = classifyToolResult(result);
|
|
141
143
|
if (IDENTITY_CHANGING_MCP_TOOLS.has(name) && outcome === "success") distinctId = resolveProductAnalyticsDistinctId("mcp") ?? distinctId;
|
|
142
144
|
return result;
|
|
143
145
|
} catch (error) {
|
|
146
|
+
thrown = error;
|
|
144
147
|
outcome = "error";
|
|
145
148
|
throw error;
|
|
146
149
|
} finally {
|
|
@@ -148,7 +151,8 @@ function wrapServerWithProductAnalytics(server) {
|
|
|
148
151
|
toolName: name,
|
|
149
152
|
action,
|
|
150
153
|
outcome,
|
|
151
|
-
distinctId
|
|
154
|
+
distinctId,
|
|
155
|
+
error: outcome === "error" ? thrown ?? result : void 0
|
|
152
156
|
});
|
|
153
157
|
}
|
|
154
158
|
};
|
|
@@ -161,7 +165,7 @@ function wrapServerWithProductAnalytics(server) {
|
|
|
161
165
|
}
|
|
162
166
|
//#endregion
|
|
163
167
|
//#region src/cli.ts
|
|
164
|
-
const packageVersion = "1.8.
|
|
168
|
+
const packageVersion = "1.8.2";
|
|
165
169
|
let sentryEnabled = false;
|
|
166
170
|
let productAnalyticsEnabled = false;
|
|
167
171
|
runMcpCli({
|