@togglhq/mcp 1.11.81 → 1.11.83
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 +1 -1
- package/build/cli.js +14 -17
- package/build/index.js +1 -1
- package/build/{src-CvrUtqKf.js → src-LMB5VU2N.js} +920 -1131
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ Disable product analytics:
|
|
|
104
104
|
TOGGL_PRODUCT_ANALYTICS=off
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
Error reporting is on by default. It sends the tool name, a redacted error category, the stack trace with package-relative file paths, the MCP, Node and OS versions, and sampled request timings without query strings. It never sends tool arguments, results, exception text, console output, your hostname, local paths, or your project's dependency list. Disable it with `TOGGL_SENTRY=off`, or send it to your own Sentry project with `TOGGL_SENTRY_DSN`.
|
|
108
108
|
|
|
109
109
|
## License
|
|
110
110
|
|
package/build/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as getProductAnalyticsDistinctId, c as resolvePublicSentryDsn, i as captureToolInvocation, l as shutdownProductAnalytics, n as runMcpCli, o as initProductAnalytics, r as PUBLIC_SENTRY_PRIVACY_OPTIONS, s as resolveProductAnalyticsDistinctId } from "./src-LMB5VU2N.js";
|
|
3
3
|
import * as Sentry from "@sentry/node";
|
|
4
4
|
//#region src/analytics-tool-metadata.ts
|
|
5
5
|
/**
|
|
@@ -66,25 +66,22 @@ function classifyToolResult(result) {
|
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/public-analytics.ts
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const dsn =
|
|
77
|
-
if (!dsn
|
|
78
|
-
console.error("[Analytics] TOGGL_SENTRY is set but SENTRY_DSN is missing; Sentry left disabled");
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
69
|
+
/**
|
|
70
|
+
* Public client DSN for the `toggl-mcp` Sentry project. Safe to ship: it only
|
|
71
|
+
* accepts events. The pack audit allowlists this exact value and still rejects
|
|
72
|
+
* any other `ingest.sentry.io` DSN.
|
|
73
|
+
*/
|
|
74
|
+
const PUBLIC_SENTRY_DSN = "https://c37820699688a7c0393aa257dbe7a99e@o43910.ingest.us.sentry.io/4512156592046081";
|
|
75
|
+
function initPublicSentry(environment, release) {
|
|
76
|
+
const dsn = resolvePublicSentryDsn(PUBLIC_SENTRY_DSN);
|
|
77
|
+
if (!dsn) return false;
|
|
81
78
|
Sentry.init({
|
|
82
79
|
dsn,
|
|
83
80
|
environment: environment ?? "production",
|
|
81
|
+
release: release ? `@togglhq/mcp@${release}` : void 0,
|
|
84
82
|
tracesSampleRate: .2,
|
|
85
83
|
enableLogs: false,
|
|
86
|
-
|
|
87
|
-
beforeSend: (event) => redactUnsafeSentryMessages(event)
|
|
84
|
+
...PUBLIC_SENTRY_PRIVACY_OPTIONS
|
|
88
85
|
});
|
|
89
86
|
return true;
|
|
90
87
|
}
|
|
@@ -165,13 +162,13 @@ function wrapServerWithProductAnalytics(server) {
|
|
|
165
162
|
}
|
|
166
163
|
//#endregion
|
|
167
164
|
//#region src/cli.ts
|
|
168
|
-
const packageVersion = "1.11.
|
|
165
|
+
const packageVersion = "1.11.83";
|
|
169
166
|
let sentryEnabled = false;
|
|
170
167
|
let productAnalyticsEnabled = false;
|
|
171
168
|
runMcpCli({
|
|
172
169
|
beforeRegister(server) {
|
|
173
170
|
productAnalyticsEnabled = initMcpProductAnalytics({ packageVersion });
|
|
174
|
-
sentryEnabled = initPublicSentry(process.env.NODE_ENV);
|
|
171
|
+
sentryEnabled = initPublicSentry(process.env.NODE_ENV, packageVersion);
|
|
175
172
|
let next = server;
|
|
176
173
|
if (sentryEnabled) next = wrapPublicServerWithSentry(next);
|
|
177
174
|
if (productAnalyticsEnabled) wrapServerWithProductAnalytics(next);
|
package/build/index.js
CHANGED