@zellifyapp/mcp 0.3.1 → 0.4.0

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +16 -15
  3. package/build/client.d.ts +77 -28
  4. package/build/client.d.ts.map +1 -1
  5. package/build/client.js +78 -34
  6. package/build/client.test.d.ts +2 -0
  7. package/build/client.test.d.ts.map +1 -0
  8. package/build/client.test.js +88 -0
  9. package/build/index.js +63 -45
  10. package/build/init.d.ts.map +1 -1
  11. package/build/init.js +3 -2
  12. package/build/prompts/integration-plan.d.ts +2 -0
  13. package/build/prompts/integration-plan.d.ts.map +1 -1
  14. package/build/prompts/integration-plan.js +46 -30
  15. package/build/tools/get-example-payload.d.ts.map +1 -1
  16. package/build/tools/get-example-payload.js +24 -7
  17. package/build/tools/get-funnel-schema.d.ts.map +1 -1
  18. package/build/tools/get-funnel-schema.js +35 -7
  19. package/build/tools/get-integrations.d.ts +2 -0
  20. package/build/tools/get-integrations.d.ts.map +1 -1
  21. package/build/tools/get-integrations.js +37 -22
  22. package/build/tools/get-integrations.test.d.ts +2 -0
  23. package/build/tools/get-integrations.test.d.ts.map +1 -0
  24. package/build/tools/get-integrations.test.js +29 -0
  25. package/build/tools/list-funnels.d.ts.map +1 -1
  26. package/build/tools/list-funnels.js +6 -7
  27. package/build/tools/validate-setup.d.ts +2 -0
  28. package/build/tools/validate-setup.d.ts.map +1 -1
  29. package/build/tools/validate-setup.js +85 -52
  30. package/build/tools/validate-setup.test.d.ts +2 -0
  31. package/build/tools/validate-setup.test.d.ts.map +1 -0
  32. package/build/tools/validate-setup.test.js +57 -0
  33. package/commands/integrationcheck.md +3 -1
  34. package/package.json +7 -4
  35. package/skill/SKILL.md +36 -35
  36. package/skill/references/debugging.md +28 -20
  37. package/skill/references/integration-paths.md +47 -25
  38. package/skill/references/language-guides.md +7 -3
  39. package/skill/references/revenuecat.md +15 -16
  40. package/skill/references/types-and-payload.md +336 -70
  41. package/skill/references/webhook-handler.md +31 -22
  42. package/build/tools/send-test-webhook.d.ts +0 -3
  43. package/build/tools/send-test-webhook.d.ts.map +0 -1
  44. package/build/tools/send-test-webhook.js +0 -78
@@ -1,78 +0,0 @@
1
- import { z } from "zod";
2
- import { sendTestWebhook } from "../client.js";
3
- export function registerSendTestWebhook(server) {
4
- server.tool("send_test_webhook", "Send a signed test webhook event to your configured endpoint. Returns response status, body, and timing. Payload includes context.test=true. Use to verify your handler works.", { funnelId: z.string().describe("The funnel ID (number as string)") }, async ({ funnelId }) => {
5
- let data;
6
- try {
7
- data = await sendTestWebhook(funnelId);
8
- }
9
- catch (err) {
10
- const message = err instanceof Error ? err.message : String(err);
11
- // Surface actionable messages for common failures
12
- if (message.includes("404") || message.includes("not found")) {
13
- return {
14
- content: [
15
- {
16
- type: "text",
17
- text: `Funnel ${funnelId} not found. Run list_funnels to see available funnel IDs.`,
18
- },
19
- ],
20
- };
21
- }
22
- if (message.includes("webhook") &&
23
- (message.includes("not configured") || message.includes("no endpoint"))) {
24
- return {
25
- content: [
26
- {
27
- type: "text",
28
- text: `No webhook endpoint configured. Go to Dashboard → Settings → Developers → Registration Webhook to set one up, then try again.`,
29
- },
30
- ],
31
- };
32
- }
33
- return {
34
- content: [
35
- { type: "text", text: `Test webhook failed: ${message}` },
36
- ],
37
- };
38
- }
39
- const lines = [];
40
- if (data.success) {
41
- lines.push(`Webhook delivered successfully (${data.statusCode} in ${data.responseTimeMs}ms)`);
42
- if (data.responseBody) {
43
- lines.push("");
44
- lines.push("Response body:");
45
- lines.push(data.responseBody);
46
- }
47
- }
48
- else {
49
- const error = data.error ?? "Unknown error";
50
- // Enrich common error patterns
51
- if (error.includes("ECONNREFUSED")) {
52
- lines.push(`Webhook delivery failed: Connection refused. The endpoint server is not running or the port is wrong.`);
53
- }
54
- else if (error.includes("ENOTFOUND")) {
55
- lines.push(`Webhook delivery failed: DNS resolution failed. Check the webhook URL for typos.`);
56
- }
57
- else if (error.includes("timeout") ||
58
- error.includes("ETIMEDOUT")) {
59
- lines.push(`Webhook delivery failed: Timeout (>10s). The handler must respond within 10 seconds — move heavy processing to a background job.`);
60
- }
61
- else {
62
- lines.push(`Webhook delivery failed: ${error}`);
63
- }
64
- if (data.responseTimeMs !== undefined) {
65
- lines.push(`(after ${data.responseTimeMs}ms)`);
66
- }
67
- }
68
- lines.push("");
69
- lines.push("---");
70
- lines.push("Payload sent:");
71
- lines.push("```json");
72
- lines.push(JSON.stringify(data.payloadSent, null, 2));
73
- lines.push("```");
74
- return {
75
- content: [{ type: "text", text: lines.join("\n") }],
76
- };
77
- });
78
- }