@webhooks-cc/mcp 1.12.0 → 1.12.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/bin/mcp.js CHANGED
@@ -157,6 +157,13 @@ function omitHeaders(holder) {
157
157
  holder.headers = {};
158
158
  holder.headersOmitted = `${count} headers left out to fit the output`;
159
159
  }
160
+ function trimSpam(holder) {
161
+ const spam = holder.spam;
162
+ if (spam && typeof spam === "object" && !Array.isArray(spam)) {
163
+ const { score, required, action, error } = spam;
164
+ holder.spam = { score, required, action, error };
165
+ }
166
+ }
160
167
  function capExtracts(holder) {
161
168
  if (Array.isArray(holder.codes) && holder.codes.length > MAX_EXTRACTS) {
162
169
  holder.codes = holder.codes.slice(0, MAX_EXTRACTS);
@@ -221,7 +228,8 @@ var ESSENTIAL_EMAIL_FIELDS = [
221
228
  "date",
222
229
  "text",
223
230
  "textTruncated",
224
- "htmlSize"
231
+ "htmlSize",
232
+ "spam"
225
233
  ];
226
234
  function compactRequest(request) {
227
235
  if (request.kind !== "email") return request;
@@ -248,6 +256,7 @@ function compactRequest(request) {
248
256
  const budget = MAX_OUTPUT - 128;
249
257
  shrinkToFit(root, budget, [
250
258
  () => omitHeaders(compact),
259
+ () => trimSpam(email),
251
260
  () => capLists(email),
252
261
  () => cutStringToFit(root, email, "text", "textTruncated", budget, TEXT_FLOOR),
253
262
  // Down to the essentials there may be room for more of the text again.
@@ -737,6 +746,7 @@ var ESSENTIAL_DETAIL_FIELDS = [
737
746
  "from",
738
747
  "size",
739
748
  "test",
749
+ "spam",
740
750
  "text",
741
751
  "textTruncated",
742
752
  "htmlSize",
@@ -765,6 +775,7 @@ function emailDetail(client, email, view, includeHtml) {
765
775
  };
766
776
  shrinkToFit(detail, MAX_BODY_SIZE, [
767
777
  () => omitHeaders(detail),
778
+ () => trimSpam(detail),
768
779
  () => capExtracts(detail),
769
780
  () => capLists(detail),
770
781
  () => cutStringToFit(detail, detail, "html", "htmlTruncated", MAX_BODY_SIZE),
@@ -2023,7 +2034,7 @@ function registerSandboxTools(server, options = {}) {
2023
2034
  }
2024
2035
 
2025
2036
  // src/index.ts
2026
- var VERSION = true ? "1.12.0" : "0.0.0-dev";
2037
+ var VERSION = true ? "1.12.1" : "0.0.0-dev";
2027
2038
  function createServer(options = {}) {
2028
2039
  const apiKey = options.apiKey ?? process.env.WHK_API_KEY;
2029
2040
  const webhookUrl = options.webhookUrl ?? process.env.WHK_WEBHOOK_URL;
package/dist/index.js CHANGED
@@ -180,6 +180,13 @@ function omitHeaders(holder) {
180
180
  holder.headers = {};
181
181
  holder.headersOmitted = `${count} headers left out to fit the output`;
182
182
  }
183
+ function trimSpam(holder) {
184
+ const spam = holder.spam;
185
+ if (spam && typeof spam === "object" && !Array.isArray(spam)) {
186
+ const { score, required, action, error } = spam;
187
+ holder.spam = { score, required, action, error };
188
+ }
189
+ }
183
190
  function capExtracts(holder) {
184
191
  if (Array.isArray(holder.codes) && holder.codes.length > MAX_EXTRACTS) {
185
192
  holder.codes = holder.codes.slice(0, MAX_EXTRACTS);
@@ -244,7 +251,8 @@ var ESSENTIAL_EMAIL_FIELDS = [
244
251
  "date",
245
252
  "text",
246
253
  "textTruncated",
247
- "htmlSize"
254
+ "htmlSize",
255
+ "spam"
248
256
  ];
249
257
  function compactRequest(request) {
250
258
  if (request.kind !== "email") return request;
@@ -271,6 +279,7 @@ function compactRequest(request) {
271
279
  const budget = MAX_OUTPUT - 128;
272
280
  shrinkToFit(root, budget, [
273
281
  () => omitHeaders(compact),
282
+ () => trimSpam(email),
274
283
  () => capLists(email),
275
284
  () => cutStringToFit(root, email, "text", "textTruncated", budget, TEXT_FLOOR),
276
285
  // Down to the essentials there may be room for more of the text again.
@@ -760,6 +769,7 @@ var ESSENTIAL_DETAIL_FIELDS = [
760
769
  "from",
761
770
  "size",
762
771
  "test",
772
+ "spam",
763
773
  "text",
764
774
  "textTruncated",
765
775
  "htmlSize",
@@ -788,6 +798,7 @@ function emailDetail(client, email, view, includeHtml) {
788
798
  };
789
799
  shrinkToFit(detail, MAX_BODY_SIZE, [
790
800
  () => omitHeaders(detail),
801
+ () => trimSpam(detail),
791
802
  () => capExtracts(detail),
792
803
  () => capLists(detail),
793
804
  () => cutStringToFit(detail, detail, "html", "htmlTruncated", MAX_BODY_SIZE),
@@ -2049,7 +2060,7 @@ function registerAgentRegistrationTools(server) {
2049
2060
  }
2050
2061
 
2051
2062
  // src/index.ts
2052
- var VERSION = true ? "1.12.0" : "0.0.0-dev";
2063
+ var VERSION = true ? "1.12.1" : "0.0.0-dev";
2053
2064
  function createServer(options = {}) {
2054
2065
  const apiKey = options.apiKey ?? process.env.WHK_API_KEY;
2055
2066
  const webhookUrl = options.webhookUrl ?? process.env.WHK_WEBHOOK_URL;
package/dist/index.mjs CHANGED
@@ -151,6 +151,13 @@ function omitHeaders(holder) {
151
151
  holder.headers = {};
152
152
  holder.headersOmitted = `${count} headers left out to fit the output`;
153
153
  }
154
+ function trimSpam(holder) {
155
+ const spam = holder.spam;
156
+ if (spam && typeof spam === "object" && !Array.isArray(spam)) {
157
+ const { score, required, action, error } = spam;
158
+ holder.spam = { score, required, action, error };
159
+ }
160
+ }
154
161
  function capExtracts(holder) {
155
162
  if (Array.isArray(holder.codes) && holder.codes.length > MAX_EXTRACTS) {
156
163
  holder.codes = holder.codes.slice(0, MAX_EXTRACTS);
@@ -215,7 +222,8 @@ var ESSENTIAL_EMAIL_FIELDS = [
215
222
  "date",
216
223
  "text",
217
224
  "textTruncated",
218
- "htmlSize"
225
+ "htmlSize",
226
+ "spam"
219
227
  ];
220
228
  function compactRequest(request) {
221
229
  if (request.kind !== "email") return request;
@@ -242,6 +250,7 @@ function compactRequest(request) {
242
250
  const budget = MAX_OUTPUT - 128;
243
251
  shrinkToFit(root, budget, [
244
252
  () => omitHeaders(compact),
253
+ () => trimSpam(email),
245
254
  () => capLists(email),
246
255
  () => cutStringToFit(root, email, "text", "textTruncated", budget, TEXT_FLOOR),
247
256
  // Down to the essentials there may be room for more of the text again.
@@ -757,6 +766,7 @@ var ESSENTIAL_DETAIL_FIELDS = [
757
766
  "from",
758
767
  "size",
759
768
  "test",
769
+ "spam",
760
770
  "text",
761
771
  "textTruncated",
762
772
  "htmlSize",
@@ -785,6 +795,7 @@ function emailDetail(client, email, view, includeHtml) {
785
795
  };
786
796
  shrinkToFit(detail, MAX_BODY_SIZE, [
787
797
  () => omitHeaders(detail),
798
+ () => trimSpam(detail),
788
799
  () => capExtracts(detail),
789
800
  () => capLists(detail),
790
801
  () => cutStringToFit(detail, detail, "html", "htmlTruncated", MAX_BODY_SIZE),
@@ -2046,7 +2057,7 @@ function registerAgentRegistrationTools(server) {
2046
2057
  }
2047
2058
 
2048
2059
  // src/index.ts
2049
- var VERSION = true ? "1.12.0" : "0.0.0-dev";
2060
+ var VERSION = true ? "1.12.1" : "0.0.0-dev";
2050
2061
  function createServer(options = {}) {
2051
2062
  const apiKey = options.apiKey ?? process.env.WHK_API_KEY;
2052
2063
  const webhookUrl = options.webhookUrl ?? process.env.WHK_WEBHOOK_URL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webhooks-cc/mcp",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "MCP server for webhooks.cc — AI agent integration for webhook testing",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@modelcontextprotocol/sdk": "^1.31.0",
40
40
  "zod": "^4.6.5",
41
- "@webhooks-cc/sdk": "1.14.0"
41
+ "@webhooks-cc/sdk": "1.15.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^26.6.4",