@recapt/mcp 0.0.22 → 0.0.26

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/index.js CHANGED
@@ -660,13 +660,116 @@ var getConsoleErrorsTool = {
660
660
  }
661
661
  };
662
662
 
663
- // ../../libraries/mcp-tools/dist/tools/getDeadClicks.js
663
+ // ../../libraries/mcp-tools/dist/tools/getCustomEvents.js
664
664
  import { z as z12 } from "zod";
665
+ var getCustomEventsTool = {
666
+ name: "get_custom_events",
667
+ description: "Query custom events tracked via Recapt.track(). Returns event occurrence counts, which pages they fire on, property distributions, and temporal patterns. Use to answer 'what custom events are being tracked?', 'how often does event X fire?', 'what properties does event Y have?', or 'which pages trigger the most events?'. These are app-specific events the developer explicitly tracks (purchases, signups, feature usage, etc.), not automatically captured behavioral data.",
668
+ inputSchema: z12.object({
669
+ event_name: z12.string().optional().describe("Filter by event name (case-insensitive partial match). If omitted, returns all event types."),
670
+ page_path: z12.string().optional().describe("Filter events to a specific page path (partial match)"),
671
+ session_id: z12.string().optional().describe("Filter events to a specific session"),
672
+ property_filters: z12.record(z12.string(), z12.union([z12.string(), z12.number(), z12.boolean(), z12.null()])).optional().describe("Filter events by property values, e.g. { plan: 'pro', amount: 99 }"),
673
+ days: z12.number().optional().describe("Look back N days (default: 30)"),
674
+ limit: z12.number().optional().describe("Max documents to scan (default: 500, max: 2000)")
675
+ }),
676
+ handler: async (args) => {
677
+ const { event_name, page_path, session_id, property_filters, days, limit } = args;
678
+ if (!isApiConfigured()) {
679
+ return apiNotConfiguredResult();
680
+ }
681
+ const params = {
682
+ event_name,
683
+ page_path,
684
+ session_id,
685
+ days: days ?? 30,
686
+ limit: limit ?? 500
687
+ };
688
+ if (property_filters) {
689
+ params.property_filters = JSON.stringify(property_filters);
690
+ }
691
+ const { data, error } = await apiGet("/custom-events", params);
692
+ if (error) {
693
+ return errorResult(error);
694
+ }
695
+ return successResult(data);
696
+ }
697
+ };
698
+ var listEventNamesTool = {
699
+ name: "list_event_names",
700
+ description: "List all unique custom event names tracked in the last N days. Use this to discover what events are available before querying specific events.",
701
+ inputSchema: z12.object({
702
+ days: z12.number().optional().describe("Look back N days (default: 30)")
703
+ }),
704
+ handler: async (args) => {
705
+ const { days } = args;
706
+ if (!isApiConfigured()) {
707
+ return apiNotConfiguredResult();
708
+ }
709
+ const { data, error } = await apiGet("/custom-events/names", { days: days ?? 30 });
710
+ if (error) {
711
+ return errorResult(error);
712
+ }
713
+ return successResult(data);
714
+ }
715
+ };
716
+
717
+ // ../../libraries/mcp-tools/dist/tools/getSessionComments.js
718
+ import { z as z13 } from "zod";
719
+ var getSessionCommentsTool = {
720
+ name: "get_session_comments",
721
+ description: "Query user comments and feedback submitted during sessions. These are explicit comments users submit via the feedback widget or Recapt.comment() API - direct user voice about their experience. Use to find sessions where users reported issues, understand user sentiment, or identify pages generating the most feedback. Comments often contain valuable context about what frustrated or confused users.",
722
+ inputSchema: z13.object({
723
+ session_id: z13.string().optional().describe("Filter comments to a specific session"),
724
+ page_path: z13.string().optional().describe("Filter comments to a specific page path (partial match)"),
725
+ search: z13.string().optional().describe("Search comments by text content (case-insensitive partial match)"),
726
+ days: z13.number().optional().describe("Look back N days (default: 30)"),
727
+ limit: z13.number().optional().describe("Max comments to return (default: 100, max: 500)")
728
+ }),
729
+ handler: async (args) => {
730
+ const { session_id, page_path, search, days, limit } = args;
731
+ if (!isApiConfigured()) {
732
+ return apiNotConfiguredResult();
733
+ }
734
+ const { data, error } = await apiGet("/session-comments", {
735
+ session_id,
736
+ page_path,
737
+ search,
738
+ days: days ?? 30,
739
+ limit: limit ?? 100
740
+ });
741
+ if (error) {
742
+ return errorResult(error);
743
+ }
744
+ return successResult(data);
745
+ }
746
+ };
747
+ var getCommentStatsTool = {
748
+ name: "get_comment_stats",
749
+ description: "Get statistics about user comments/feedback. Returns total comment count, which pages receive the most feedback, and daily trend. Use to understand feedback volume and identify pages where users are most vocal.",
750
+ inputSchema: z13.object({
751
+ days: z13.number().optional().describe("Look back N days (default: 30)")
752
+ }),
753
+ handler: async (args) => {
754
+ const { days } = args;
755
+ if (!isApiConfigured()) {
756
+ return apiNotConfiguredResult();
757
+ }
758
+ const { data, error } = await apiGet("/session-comments/stats", { days: days ?? 30 });
759
+ if (error) {
760
+ return errorResult(error);
761
+ }
762
+ return successResult(data);
763
+ }
764
+ };
765
+
766
+ // ../../libraries/mcp-tools/dist/tools/getDeadClicks.js
767
+ import { z as z14 } from "zod";
665
768
  var getDeadClicksTool = {
666
769
  name: "get_dead_clicks",
667
770
  description: "Find buttons and links that users click but nothing happens (dead clicks). These are interactive elements where the click produced no visible DOM change. Use this to identify BROKEN or UNRESPONSIVE UI elements that frustrate users.",
668
- inputSchema: z12.object({
669
- page_path: z12.string().describe("Page path to check for dead clicks (required)")
771
+ inputSchema: z14.object({
772
+ page_path: z14.string().describe("Page path to check for dead clicks (required)")
670
773
  }),
671
774
  handler: async (args) => {
672
775
  const { page_path } = args;
@@ -684,11 +787,11 @@ var getDeadClicksTool = {
684
787
  };
685
788
 
686
789
  // ../../libraries/mcp-tools/dist/tools/getDomains.js
687
- import { z as z13 } from "zod";
790
+ import { z as z15 } from "zod";
688
791
  var getDomainsTool = {
689
792
  name: "get_domains",
690
793
  description: "Get the list of domains configured for the organization. Domains represent different websites or applications being tracked.",
691
- inputSchema: z13.object({}),
794
+ inputSchema: z15.object({}),
692
795
  handler: async () => {
693
796
  if (!isApiConfigured()) {
694
797
  return apiNotConfiguredResult();
@@ -702,13 +805,13 @@ var getDomainsTool = {
702
805
  };
703
806
 
704
807
  // ../../libraries/mcp-tools/dist/tools/getElementFriction.js
705
- import { z as z14 } from "zod";
808
+ import { z as z16 } from "zod";
706
809
  var getElementFrictionTool = {
707
810
  name: "get_element_friction",
708
811
  description: "Get per-element friction data for a page. Shows which elements cause user frustration, with click counts and dominant frustration signals.",
709
- inputSchema: z14.object({
710
- page_path: z14.string().describe("Page path to analyze (e.g., /checkout)"),
711
- selector_filter: z14.string().optional().describe("Optional: filter elements by selector substring")
812
+ inputSchema: z16.object({
813
+ page_path: z16.string().describe("Page path to analyze (e.g., /checkout)"),
814
+ selector_filter: z16.string().optional().describe("Optional: filter elements by selector substring")
712
815
  }),
713
816
  handler: async (args) => {
714
817
  const { page_path, selector_filter } = args;
@@ -727,14 +830,14 @@ var getElementFrictionTool = {
727
830
  };
728
831
 
729
832
  // ../../libraries/mcp-tools/dist/tools/getFlowFriction.js
730
- import { z as z15 } from "zod";
833
+ import { z as z17 } from "zod";
731
834
  var getFlowFrictionTool = {
732
835
  name: "get_flow_friction",
733
836
  description: "Discover user flows with behavioral metrics. Returns navigation transitions with frustration, confusion, and health scores for each page in the flow. Also flags backtrack hotspots (pages users return to) and dropoff pages. Use this to find which flows need optimization.",
734
- inputSchema: z15.object({
735
- page_path: z15.string().optional().describe("Focus on flows involving this page (e.g., /checkout)"),
736
- days: z15.number().optional().default(7).describe("Number of days to analyze (default: 7)"),
737
- limit: z15.number().optional().default(10).describe("Maximum number of flows to return (default: 10)")
837
+ inputSchema: z17.object({
838
+ page_path: z17.string().optional().describe("Focus on flows involving this page (e.g., /checkout)"),
839
+ days: z17.number().optional().default(7).describe("Number of days to analyze (default: 7)"),
840
+ limit: z17.number().optional().default(10).describe("Maximum number of flows to return (default: 10)")
738
841
  }),
739
842
  handler: async (args) => {
740
843
  const { page_path, days, limit } = args;
@@ -754,12 +857,12 @@ var getFlowFrictionTool = {
754
857
  };
755
858
 
756
859
  // ../../libraries/mcp-tools/dist/tools/getFormFriction.js
757
- import { z as z16 } from "zod";
860
+ import { z as z18 } from "zod";
758
861
  var getFormFrictionTool = {
759
862
  name: "get_form_friction",
760
863
  description: "Analyze which form fields cause friction on a page. Returns per-field metrics including dwell time, correction rate, and abandonment rate. Use this to identify problematic form fields in checkout, signup, or other forms.",
761
- inputSchema: z16.object({
762
- page_path: z16.string().describe("Page path containing the form to analyze (required)")
864
+ inputSchema: z18.object({
865
+ page_path: z18.string().describe("Page path containing the form to analyze (required)")
763
866
  }),
764
867
  handler: async (args) => {
765
868
  const { page_path } = args;
@@ -777,7 +880,7 @@ var getFormFrictionTool = {
777
880
  };
778
881
 
779
882
  // ../../libraries/mcp-tools/dist/tools/getIssues.js
780
- import { z as z17 } from "zod";
883
+ import { z as z19 } from "zod";
781
884
  var VALID_CATEGORIES = [
782
885
  "code_error",
783
886
  "dead_click",
@@ -800,12 +903,12 @@ var VALID_STATUSES = [
800
903
  var getIssuesTool = {
801
904
  name: "get_issues",
802
905
  description: "Get detected UX issues. Issues are automatically detected from session recordings and include rage clicks, dead clicks, form issues, and behavioral anomalies.",
803
- inputSchema: z17.object({
804
- page_path: z17.string().optional().describe("Filter issues to a specific page path"),
805
- category: z17.enum(VALID_CATEGORIES).optional().describe("Filter by issue category"),
806
- severity: z17.enum(VALID_SEVERITIES).optional().describe("Filter by severity level"),
807
- status: z17.enum(VALID_STATUSES).optional().default("active").describe("Filter by status (default: active)"),
808
- limit: z17.number().optional().default(20).describe("Maximum number of issues to return (default: 20)")
906
+ inputSchema: z19.object({
907
+ page_path: z19.string().optional().describe("Filter issues to a specific page path"),
908
+ category: z19.enum(VALID_CATEGORIES).optional().describe("Filter by issue category"),
909
+ severity: z19.enum(VALID_SEVERITIES).optional().describe("Filter by severity level"),
910
+ status: z19.enum(VALID_STATUSES).optional().default("active").describe("Filter by status (default: active)"),
911
+ limit: z19.number().optional().default(20).describe("Maximum number of issues to return (default: 20)")
809
912
  }),
810
913
  handler: async (args) => {
811
914
  const { page_path, category, severity, status, limit } = args;
@@ -827,13 +930,13 @@ var getIssuesTool = {
827
930
  };
828
931
 
829
932
  // ../../libraries/mcp-tools/dist/tools/getJourneyPatterns.js
830
- import { z as z18 } from "zod";
933
+ import { z as z20 } from "zod";
831
934
  var getJourneyPatternsTool = {
832
935
  name: "get_journey_patterns",
833
936
  description: "Discover navigation patterns across sessions. Returns top page transitions, backtrack hotspots (pages users return to), and dropoff pages (where sessions end). Use this to understand organic user navigation.",
834
- inputSchema: z18.object({
835
- page_path: z18.string().optional().describe("Filter to transitions involving this page (e.g., /pricing)"),
836
- days: z18.number().optional().default(7).describe("Number of days to analyze (default: 7)")
937
+ inputSchema: z20.object({
938
+ page_path: z20.string().optional().describe("Filter to transitions involving this page (e.g., /pricing)"),
939
+ days: z20.number().optional().default(7).describe("Number of days to analyze (default: 7)")
837
940
  }),
838
941
  handler: async (args) => {
839
942
  const { page_path, days } = args;
@@ -852,13 +955,13 @@ var getJourneyPatternsTool = {
852
955
  };
853
956
 
854
957
  // ../../libraries/mcp-tools/dist/tools/getPageMetrics.js
855
- import { z as z19 } from "zod";
958
+ import { z as z21 } from "zod";
856
959
  var getPageMetricsTool = {
857
960
  name: "get_page_metrics",
858
961
  description: "Get aggregated behavioral metrics for a page. Returns frustration, confusion, confidence, energy scores, and health score. If page_path is omitted, returns metrics for all pages.",
859
- inputSchema: z19.object({
860
- page_path: z19.string().optional().describe("Page path to get metrics for (e.g., /checkout). Omit to get all pages."),
861
- days: z19.number().optional().default(7).describe("Number of days to look back (default: 7)")
962
+ inputSchema: z21.object({
963
+ page_path: z21.string().optional().describe("Page path to get metrics for (e.g., /checkout). Omit to get all pages."),
964
+ days: z21.number().optional().default(7).describe("Number of days to look back (default: 7)")
862
965
  }),
863
966
  handler: async (args) => {
864
967
  const { page_path, days } = args;
@@ -877,13 +980,13 @@ var getPageMetricsTool = {
877
980
  };
878
981
 
879
982
  // ../../libraries/mcp-tools/dist/tools/getPageTrends.js
880
- import { z as z20 } from "zod";
983
+ import { z as z22 } from "zod";
881
984
  var getPageTrendsTool = {
882
985
  name: "get_page_trends",
883
986
  description: "Get daily behavioral trends for a page. Shows how frustration, confusion, and confidence change over time.",
884
- inputSchema: z20.object({
885
- page_path: z20.string().describe("Page path to analyze (e.g., /checkout)"),
886
- days: z20.number().optional().default(14).describe("Number of days to look back (default: 14)")
987
+ inputSchema: z22.object({
988
+ page_path: z22.string().describe("Page path to analyze (e.g., /checkout)"),
989
+ days: z22.number().optional().default(14).describe("Number of days to look back (default: 14)")
887
990
  }),
888
991
  handler: async (args) => {
889
992
  const { page_path, days } = args;
@@ -902,13 +1005,13 @@ var getPageTrendsTool = {
902
1005
  };
903
1006
 
904
1007
  // ../../libraries/mcp-tools/dist/tools/getSessionDetails.js
905
- import { z as z21 } from "zod";
1008
+ import { z as z23 } from "zod";
906
1009
  var getSessionDetailsTool = {
907
1010
  name: "get_session_details",
908
1011
  description: "Get behavioral timeline for one or more sessions. Shows how frustration, confusion, and confidence evolved over time. Accepts a single session_id or an array of session_ids (max 20).",
909
- inputSchema: z21.object({
910
- session_id: z21.string().optional().describe("Single session ID to get details for"),
911
- session_ids: z21.array(z21.string()).max(20).optional().describe("Array of session IDs to get details for (max 20)")
1012
+ inputSchema: z23.object({
1013
+ session_id: z23.string().optional().describe("Single session ID to get details for"),
1014
+ session_ids: z23.array(z23.string()).max(20).optional().describe("Array of session IDs to get details for (max 20)")
912
1015
  }),
913
1016
  handler: async (args) => {
914
1017
  const { session_id, session_ids } = args;
@@ -937,13 +1040,13 @@ var getSessionDetailsTool = {
937
1040
  };
938
1041
 
939
1042
  // ../../libraries/mcp-tools/dist/tools/getSessionPages.js
940
- import { z as z22 } from "zod";
1043
+ import { z as z24 } from "zod";
941
1044
  var getSessionPagesTool = {
942
1045
  name: "get_session_pages",
943
1046
  description: "Get the pages visited within one or more sessions. Returns navigation history with timestamps, source pages, and dwell times. Use this to understand the user's journey through the site during a session. Accepts a single session_id or an array of session_ids (max 20).",
944
- inputSchema: z22.object({
945
- session_id: z22.string().optional().describe("Single session ID to get pages for"),
946
- session_ids: z22.array(z22.string()).max(20).optional().describe("Array of session IDs to get pages for (max 20)")
1047
+ inputSchema: z24.object({
1048
+ session_id: z24.string().optional().describe("Single session ID to get pages for"),
1049
+ session_ids: z24.array(z24.string()).max(20).optional().describe("Array of session IDs to get pages for (max 20)")
947
1050
  }),
948
1051
  handler: async (args) => {
949
1052
  const { session_id, session_ids } = args;
@@ -972,13 +1075,13 @@ var getSessionPagesTool = {
972
1075
  };
973
1076
 
974
1077
  // ../../libraries/mcp-tools/dist/tools/getUxHealthReport.js
975
- import { z as z23 } from "zod";
1078
+ import { z as z25 } from "zod";
976
1079
  var getUxHealthReportTool = {
977
1080
  name: "get_ux_health_report",
978
1081
  description: "Get a comprehensive UX health report combining page metrics, issues, and anomalies. Returns overall health score, per-page breakdown, active issues, and frustration spikes. Use this as a starting point to understand overall UX state before diving deeper.",
979
- inputSchema: z23.object({
980
- page_path: z23.string().optional().describe("Focus on a specific page (omit for site-wide report)"),
981
- days: z23.number().optional().default(7).describe("Number of days to analyze (default: 7)")
1082
+ inputSchema: z25.object({
1083
+ page_path: z25.string().optional().describe("Focus on a specific page (omit for site-wide report)"),
1084
+ days: z25.number().optional().default(7).describe("Number of days to analyze (default: 7)")
982
1085
  }),
983
1086
  handler: async (args) => {
984
1087
  const { page_path, days } = args;
@@ -997,7 +1100,7 @@ var getUxHealthReportTool = {
997
1100
  };
998
1101
 
999
1102
  // ../../libraries/mcp-tools/dist/tools/upgradeOptions.js
1000
- import { z as z24 } from "zod";
1103
+ import { z as z26 } from "zod";
1001
1104
  function formatUpgradeOptions(data) {
1002
1105
  const lines = [];
1003
1106
  lines.push("# UPGRADE OPTIONS\n");
@@ -1029,7 +1132,7 @@ function formatUpgradeOptions(data) {
1029
1132
  var getUpgradeOptionsTool = {
1030
1133
  name: "get_upgrade_options",
1031
1134
  description: "Get available upgrade options for the current plan. Use this when a user hits a feature limit or when you need to explain what's available on higher tiers. Returns the current plan, available upgrades with their features and benefits, and a direct link to the billing page. Use this to help users understand the value of upgrading when they encounter gated features.",
1032
- inputSchema: z24.object({}),
1135
+ inputSchema: z26.object({}),
1033
1136
  handler: async () => {
1034
1137
  if (!isApiConfigured()) {
1035
1138
  return apiNotConfiguredResult();
@@ -1044,16 +1147,16 @@ var getUpgradeOptionsTool = {
1044
1147
  };
1045
1148
 
1046
1149
  // ../../libraries/mcp-tools/dist/tools/improvementRun.js
1047
- import { z as z25 } from "zod";
1150
+ import { z as z27 } from "zod";
1048
1151
  var startImprovementRunTool = {
1049
1152
  name: "start_improvement_run",
1050
1153
  description: "Register the start of a self-improvement workflow run. Call this at the beginning of an improvement session to track the run and its outcomes. Returns a run ID to use for subsequent updates.",
1051
- inputSchema: z25.object({
1052
- trigger_type: z25.enum(["github_actions", "cron", "manual", "api"]).describe("What triggered this improvement run"),
1053
- trigger_metadata: z25.record(z25.unknown()).optional().describe("Additional metadata about the trigger (e.g., GitHub run ID, branch, actor)"),
1054
- phases: z25.array(z25.object({
1055
- name: z25.string(),
1056
- status: z25.enum(["pending", "running", "completed", "skipped", "failed"]).default("pending")
1154
+ inputSchema: z27.object({
1155
+ trigger_type: z27.enum(["github_actions", "cron", "manual", "api"]).describe("What triggered this improvement run"),
1156
+ trigger_metadata: z27.record(z27.unknown()).optional().describe("Additional metadata about the trigger (e.g., GitHub run ID, branch, actor)"),
1157
+ phases: z27.array(z27.object({
1158
+ name: z27.string(),
1159
+ status: z27.enum(["pending", "running", "completed", "skipped", "failed"]).default("pending")
1057
1160
  })).optional().describe("Initial phases to track (e.g., diagnose, investigate, fix)")
1058
1161
  }),
1059
1162
  handler: async (args) => {
@@ -1075,38 +1178,38 @@ var startImprovementRunTool = {
1075
1178
  var updateImprovementRunTool = {
1076
1179
  name: "update_improvement_run",
1077
1180
  description: "Update an improvement run's status, phases, summary, or diagnostic data. Use to track progress through the workflow phases and record final outcomes.",
1078
- inputSchema: z25.object({
1079
- run_id: z25.string().describe("The ID of the improvement run to update"),
1080
- status: z25.enum(["running", "completed", "failed", "cancelled"]).optional().describe("New status for the run"),
1081
- title: z25.string().optional().describe("A concise title summarizing what was fixed in this run (e.g., 'Fixed checkout button, improved mobile nav'). Set when completing the run."),
1082
- phases: z25.array(z25.object({
1083
- name: z25.string(),
1084
- status: z25.enum([
1181
+ inputSchema: z27.object({
1182
+ run_id: z27.string().describe("The ID of the improvement run to update"),
1183
+ status: z27.enum(["running", "completed", "failed", "cancelled"]).optional().describe("New status for the run"),
1184
+ title: z27.string().optional().describe("A concise title summarizing what was fixed in this run (e.g., 'Fixed checkout button, improved mobile nav'). Set when completing the run."),
1185
+ phases: z27.array(z27.object({
1186
+ name: z27.string(),
1187
+ status: z27.enum([
1085
1188
  "pending",
1086
1189
  "running",
1087
1190
  "completed",
1088
1191
  "skipped",
1089
1192
  "failed"
1090
1193
  ]),
1091
- startedAt: z25.string().nullable().optional(),
1092
- completedAt: z25.string().nullable().optional(),
1093
- output: z25.record(z25.unknown()).optional()
1194
+ startedAt: z27.string().nullable().optional(),
1195
+ completedAt: z27.string().nullable().optional(),
1196
+ output: z27.record(z27.unknown()).optional()
1094
1197
  })).optional().describe("Updated phases array"),
1095
- summary: z25.object({
1096
- issuesFound: z25.number().optional(),
1097
- issuesFixed: z25.number().optional(),
1098
- issuesDeferred: z25.number().optional(),
1099
- issuesDismissed: z25.number().optional(),
1100
- prsCreated: z25.number().optional()
1198
+ summary: z27.object({
1199
+ issuesFound: z27.number().optional(),
1200
+ issuesFixed: z27.number().optional(),
1201
+ issuesDeferred: z27.number().optional(),
1202
+ issuesDismissed: z27.number().optional(),
1203
+ prsCreated: z27.number().optional()
1101
1204
  }).optional().describe("Updated summary counts"),
1102
- diagnostic: z25.object({
1103
- healthScore: z25.number().describe("Site health score (0-100)"),
1104
- totalSessions: z25.number().describe("Number of sessions analyzed"),
1105
- pagesAnalyzed: z25.number().describe("Number of pages with data"),
1106
- summary: z25.string().nullable().optional().describe("1-2 sentence summary of the site's current state and key findings")
1205
+ diagnostic: z27.object({
1206
+ healthScore: z27.number().describe("Site health score (0-100)"),
1207
+ totalSessions: z27.number().describe("Number of sessions analyzed"),
1208
+ pagesAnalyzed: z27.number().describe("Number of pages with data"),
1209
+ summary: z27.string().nullable().optional().describe("1-2 sentence summary of the site's current state and key findings")
1107
1210
  }).optional().describe("Diagnostic data from run_full_diagnostic. Set after diagnosis phase completes."),
1108
- completed_at: z25.string().optional().describe("ISO timestamp when the run completed"),
1109
- duration_ms: z25.number().optional().describe("Total duration of the run in milliseconds")
1211
+ completed_at: z27.string().optional().describe("ISO timestamp when the run completed"),
1212
+ duration_ms: z27.number().optional().describe("Total duration of the run in milliseconds")
1110
1213
  }),
1111
1214
  handler: async (args) => {
1112
1215
  const { run_id, status, title, phases, summary, diagnostic, completed_at, duration_ms } = args;
@@ -1131,35 +1234,35 @@ var updateImprovementRunTool = {
1131
1234
  var recordImprovementActionTool = {
1132
1235
  name: "record_improvement_action",
1133
1236
  description: "Record an action taken during an improvement run. Use to track what was done for each issue: code fixes, deferrals, dismissals, etc. IMPORTANT: When recording code_fix actions, the code_changes.diff field must contain ACTUAL SOURCE CODE in unified diff format, not a description of what changed. Include the literal code lines with proper +/- prefixes.",
1134
- inputSchema: z25.object({
1135
- run_id: z25.string().describe("The ID of the improvement run"),
1136
- issue_id: z25.string().optional().describe("The ID of the issue this action relates to (if any)"),
1137
- action_type: z25.enum([
1237
+ inputSchema: z27.object({
1238
+ run_id: z27.string().describe("The ID of the improvement run"),
1239
+ issue_id: z27.string().optional().describe("The ID of the issue this action relates to (if any)"),
1240
+ action_type: z27.enum([
1138
1241
  "code_fix",
1139
1242
  "needs_more_data",
1140
1243
  "dismissed",
1141
1244
  "marked_intended",
1142
1245
  "knowledge_added"
1143
1246
  ]).describe("Type of action taken"),
1144
- hypothesis: z25.string().describe("AI's reasoning for this action"),
1145
- expected_improvement: z25.string().describe("What improvement is expected from this action"),
1146
- code_changes: z25.array(z25.object({
1147
- file: z25.string().describe("Path to the changed file"),
1148
- diff: z25.string().describe("Unified diff format code changes"),
1149
- startLine: z25.number().describe("Line number where the diff begins"),
1150
- linesAdded: z25.number().default(0).describe("Count of lines added"),
1151
- linesRemoved: z25.number().default(0).describe("Count of lines removed")
1247
+ hypothesis: z27.string().describe("AI's reasoning for this action"),
1248
+ expected_improvement: z27.string().describe("What improvement is expected from this action"),
1249
+ code_changes: z27.array(z27.object({
1250
+ file: z27.string().describe("Path to the changed file"),
1251
+ diff: z27.string().describe("Unified diff format code changes"),
1252
+ startLine: z27.number().describe("Line number where the diff begins"),
1253
+ linesAdded: z27.number().default(0).describe("Count of lines added"),
1254
+ linesRemoved: z27.number().default(0).describe("Count of lines removed")
1152
1255
  })).optional().describe("Array of code changes with actual source code diffs"),
1153
- pr_url: z25.string().optional().describe("GitHub PR URL if a PR was created"),
1154
- pr_number: z25.number().optional().describe("GitHub PR number"),
1155
- remediation_id: z25.string().optional().describe("ID of the associated remediation record (if any)"),
1156
- deferral_reason: z25.string().optional().describe("Explanation for why the issue was deferred (for needs_more_data actions)"),
1157
- dismissal_reason: z25.string().optional().describe("Explanation for why the issue was dismissed (for dismissed/marked_intended actions)"),
1158
- page_path: z25.string().optional().describe("Page path affected by the fix"),
1159
- element_selector: z25.string().optional().describe("CSS selector of the affected element"),
1160
- diagnosis: z25.string().optional().describe("Root cause analysis"),
1161
- proposed_fix: z25.string().optional().describe("Fix description"),
1162
- confidence: z25.number().min(0).max(1).optional().describe("Fix confidence 0-1")
1256
+ pr_url: z27.string().optional().describe("GitHub PR URL if a PR was created"),
1257
+ pr_number: z27.number().optional().describe("GitHub PR number"),
1258
+ remediation_id: z27.string().optional().describe("ID of the associated remediation record (if any)"),
1259
+ deferral_reason: z27.string().optional().describe("Explanation for why the issue was deferred (for needs_more_data actions)"),
1260
+ dismissal_reason: z27.string().optional().describe("Explanation for why the issue was dismissed (for dismissed/marked_intended actions)"),
1261
+ page_path: z27.string().optional().describe("Page path affected by the fix"),
1262
+ element_selector: z27.string().optional().describe("CSS selector of the affected element"),
1263
+ diagnosis: z27.string().optional().describe("Root cause analysis"),
1264
+ proposed_fix: z27.string().optional().describe("Fix description"),
1265
+ confidence: z27.number().min(0).max(1).optional().describe("Fix confidence 0-1")
1163
1266
  }),
1164
1267
  handler: async (args) => {
1165
1268
  const { run_id, issue_id, action_type, hypothesis, expected_improvement, code_changes, pr_url, pr_number, remediation_id, deferral_reason, dismissal_reason, page_path, element_selector, diagnosis, proposed_fix, confidence } = args;
@@ -1192,11 +1295,11 @@ var recordImprovementActionTool = {
1192
1295
  var updateImprovementActionTool = {
1193
1296
  name: "update_improvement_action",
1194
1297
  description: "Update an existing improvement run action with PR information. Use this after a PR has been created to link it to the action.",
1195
- inputSchema: z25.object({
1196
- run_id: z25.string().describe("The ID of the improvement run"),
1197
- action_id: z25.string().describe("The ID of the action to update"),
1198
- pr_url: z25.string().optional().describe("GitHub PR URL to link to this action"),
1199
- pr_number: z25.number().optional().describe("GitHub PR number to link to this action")
1298
+ inputSchema: z27.object({
1299
+ run_id: z27.string().describe("The ID of the improvement run"),
1300
+ action_id: z27.string().describe("The ID of the action to update"),
1301
+ pr_url: z27.string().optional().describe("GitHub PR URL to link to this action"),
1302
+ pr_number: z27.number().optional().describe("GitHub PR number to link to this action")
1200
1303
  }),
1201
1304
  handler: async (args) => {
1202
1305
  const { run_id, action_id, pr_url, pr_number } = args;
@@ -1216,8 +1319,8 @@ var updateImprovementActionTool = {
1216
1319
  var getImprovementRunTool = {
1217
1320
  name: "get_improvement_run",
1218
1321
  description: "Get details of a specific improvement run including all actions taken. Use to review what happened during a run.",
1219
- inputSchema: z25.object({
1220
- run_id: z25.string().describe("The ID of the improvement run to retrieve")
1322
+ inputSchema: z27.object({
1323
+ run_id: z27.string().describe("The ID of the improvement run to retrieve")
1221
1324
  }),
1222
1325
  handler: async (args) => {
1223
1326
  const { run_id } = args;
@@ -1234,11 +1337,11 @@ var getImprovementRunTool = {
1234
1337
  var listImprovementRunsTool = {
1235
1338
  name: "list_improvement_runs",
1236
1339
  description: "List recent improvement runs with optional filters. Use to review past runs and their outcomes.",
1237
- inputSchema: z25.object({
1238
- status: z25.enum(["running", "completed", "failed", "cancelled"]).optional().describe("Filter by run status"),
1239
- trigger_type: z25.enum(["github_actions", "cron", "manual", "api"]).optional().describe("Filter by trigger type"),
1240
- limit: z25.number().optional().default(20).describe("Maximum number of results (default: 20)"),
1241
- offset: z25.number().optional().default(0).describe("Offset for pagination")
1340
+ inputSchema: z27.object({
1341
+ status: z27.enum(["running", "completed", "failed", "cancelled"]).optional().describe("Filter by run status"),
1342
+ trigger_type: z27.enum(["github_actions", "cron", "manual", "api"]).optional().describe("Filter by trigger type"),
1343
+ limit: z27.number().optional().default(20).describe("Maximum number of results (default: 20)"),
1344
+ offset: z27.number().optional().default(0).describe("Offset for pagination")
1242
1345
  }),
1243
1346
  handler: async (args) => {
1244
1347
  const { status, trigger_type, limit, offset } = args;
@@ -1259,7 +1362,7 @@ var listImprovementRunsTool = {
1259
1362
  };
1260
1363
 
1261
1364
  // ../../libraries/mcp-tools/dist/tools/knowledge.js
1262
- import { z as z26 } from "zod";
1365
+ import { z as z28 } from "zod";
1263
1366
  var KNOWLEDGE_CATEGORIES = [
1264
1367
  "false_positive",
1265
1368
  "intended_behavior",
@@ -1279,11 +1382,11 @@ var ISSUE_CATEGORIES = [
1279
1382
  var getSiteKnowledgeTool = {
1280
1383
  name: "get_site_knowledge",
1281
1384
  description: "Retrieve site-specific learnings including known false positives, intended behaviors, and successful fix patterns. Use at the start of a self-improvement workflow to avoid re-flagging known issues.",
1282
- inputSchema: z26.object({
1283
- category: z26.enum(KNOWLEDGE_CATEGORIES).optional().describe("Filter by knowledge category"),
1284
- page_path: z26.string().optional().describe("Filter by page path"),
1285
- issue_category: z26.enum(ISSUE_CATEGORIES).optional().describe("Filter by issue category"),
1286
- limit: z26.number().optional().default(50).describe("Maximum number of entries to return (default: 50)")
1385
+ inputSchema: z28.object({
1386
+ category: z28.enum(KNOWLEDGE_CATEGORIES).optional().describe("Filter by knowledge category"),
1387
+ page_path: z28.string().optional().describe("Filter by page path"),
1388
+ issue_category: z28.enum(ISSUE_CATEGORIES).optional().describe("Filter by issue category"),
1389
+ limit: z28.number().optional().default(50).describe("Maximum number of entries to return (default: 50)")
1287
1390
  }),
1288
1391
  handler: async (args) => {
1289
1392
  const { category, page_path, issue_category, limit } = args;
@@ -1305,13 +1408,13 @@ var getSiteKnowledgeTool = {
1305
1408
  var addSiteKnowledgeTool = {
1306
1409
  name: "add_site_knowledge",
1307
1410
  description: "Store a site-specific learning. Use to record false positives, intended behaviors, successful fix patterns, or important context about the site.",
1308
- inputSchema: z26.object({
1309
- category: z26.enum(KNOWLEDGE_CATEGORIES).describe("Category of knowledge: false_positive, intended_behavior, fix_pattern, or context"),
1310
- subject: z26.string().describe("Unique identifier/title for this knowledge entry"),
1311
- content: z26.string().describe("Detailed description of the learning"),
1312
- page_path: z26.string().optional().describe("Associated page path (if applicable)"),
1313
- element_selector: z26.string().optional().describe("Associated element selector (if applicable)"),
1314
- issue_category: z26.enum(ISSUE_CATEGORIES).optional().describe("Associated issue category (if applicable)")
1411
+ inputSchema: z28.object({
1412
+ category: z28.enum(KNOWLEDGE_CATEGORIES).describe("Category of knowledge: false_positive, intended_behavior, fix_pattern, or context"),
1413
+ subject: z28.string().describe("Unique identifier/title for this knowledge entry"),
1414
+ content: z28.string().describe("Detailed description of the learning"),
1415
+ page_path: z28.string().optional().describe("Associated page path (if applicable)"),
1416
+ element_selector: z28.string().optional().describe("Associated element selector (if applicable)"),
1417
+ issue_category: z28.enum(ISSUE_CATEGORIES).optional().describe("Associated issue category (if applicable)")
1315
1418
  }),
1316
1419
  handler: async (args) => {
1317
1420
  const { category, subject, content, page_path, element_selector, issue_category } = args;
@@ -1336,8 +1439,8 @@ var addSiteKnowledgeTool = {
1336
1439
  var deleteSiteKnowledgeTool = {
1337
1440
  name: "delete_site_knowledge",
1338
1441
  description: "Delete a site knowledge entry. Use when a learning is no longer valid or was created in error.",
1339
- inputSchema: z26.object({
1340
- knowledge_id: z26.string().describe("The ID of the knowledge entry to delete")
1442
+ inputSchema: z28.object({
1443
+ knowledge_id: z28.string().describe("The ID of the knowledge entry to delete")
1341
1444
  }),
1342
1445
  handler: async (args) => {
1343
1446
  const { knowledge_id } = args;
@@ -1354,9 +1457,9 @@ var deleteSiteKnowledgeTool = {
1354
1457
  var getSimilarFixesTool = {
1355
1458
  name: "get_similar_fixes",
1356
1459
  description: "Find past fixes for similar issues. Returns successful and failed remediation attempts for issues with the same category, page, or element. Use before proposing a fix to learn from past attempts.",
1357
- inputSchema: z26.object({
1358
- issue_id: z26.string().describe("The ID of the issue to find similar fixes for"),
1359
- limit: z26.number().optional().default(5).describe("Maximum number of similar fixes to return (default: 5)")
1460
+ inputSchema: z28.object({
1461
+ issue_id: z28.string().describe("The ID of the issue to find similar fixes for"),
1462
+ limit: z28.number().optional().default(5).describe("Maximum number of similar fixes to return (default: 5)")
1360
1463
  }),
1361
1464
  handler: async (args) => {
1362
1465
  const { issue_id, limit } = args;
@@ -1375,13 +1478,13 @@ var getSimilarFixesTool = {
1375
1478
  };
1376
1479
 
1377
1480
  // ../../libraries/mcp-tools/dist/tools/listPages.js
1378
- import { z as z27 } from "zod";
1481
+ import { z as z29 } from "zod";
1379
1482
  var listPagesTool = {
1380
1483
  name: "list_pages",
1381
1484
  description: "List all tracked pages with basic metrics. Returns page paths sorted by session count with frustration and health grade. Use this to discover what pages are being tracked before diving into specific pages.",
1382
- inputSchema: z27.object({
1383
- days: z27.number().optional().default(7).describe("Number of days to look back (default 7)"),
1384
- limit: z27.number().optional().default(50).describe("Maximum number of pages to return (default 50)")
1485
+ inputSchema: z29.object({
1486
+ days: z29.number().optional().default(7).describe("Number of days to look back (default 7)"),
1487
+ limit: z29.number().optional().default(50).describe("Maximum number of pages to return (default 50)")
1385
1488
  }),
1386
1489
  handler: async (args) => {
1387
1490
  const { days, limit } = args;
@@ -1400,16 +1503,16 @@ var listPagesTool = {
1400
1503
  };
1401
1504
 
1402
1505
  // ../../libraries/mcp-tools/dist/tools/listSessions.js
1403
- import { z as z28 } from "zod";
1506
+ import { z as z30 } from "zod";
1404
1507
  var listSessionsTool = {
1405
1508
  name: "list_sessions",
1406
1509
  description: "List and filter recorded sessions. Returns session metadata including status, duration, device, browser, and domains. Use to find sessions for a domain, check for active sessions, or browse by device type.",
1407
- inputSchema: z28.object({
1408
- domain: z28.string().optional().describe("Filter by domain name (partial match supported)"),
1409
- status: z28.enum(["active", "terminated", "all"]).optional().default("all").describe("Filter by session status"),
1410
- device: z28.enum(["desktop", "mobile", "tablet"]).optional().describe("Filter by device type"),
1411
- days: z28.number().optional().default(7).describe("Number of days to look back (default: 7)"),
1412
- limit: z28.number().optional().default(20).describe("Maximum sessions to return (default: 20, max: 200)")
1510
+ inputSchema: z30.object({
1511
+ domain: z30.string().optional().describe("Filter by domain name (partial match supported)"),
1512
+ status: z30.enum(["active", "terminated", "all"]).optional().default("all").describe("Filter by session status"),
1513
+ device: z30.enum(["desktop", "mobile", "tablet"]).optional().describe("Filter by device type"),
1514
+ days: z30.number().optional().default(7).describe("Number of days to look back (default: 7)"),
1515
+ limit: z30.number().optional().default(20).describe("Maximum sessions to return (default: 20, max: 200)")
1413
1516
  }),
1414
1517
  handler: async (args) => {
1415
1518
  const { domain, status, device, days, limit } = args;
@@ -1431,16 +1534,16 @@ var listSessionsTool = {
1431
1534
  };
1432
1535
 
1433
1536
  // ../../libraries/mcp-tools/dist/tools/predictOutcomes.js
1434
- import { z as z29 } from "zod";
1537
+ import { z as z31 } from "zod";
1435
1538
  var predictOutcomesTool = {
1436
1539
  name: "predict_outcomes",
1437
1540
  description: "Predict session outcomes based on early behavioral signals. Provide either a session_id to analyze an existing session, or behavioral_features to predict outcomes for hypothetical scenarios. Returns predicted outcome (COMPLETED, STRUGGLED, BLOCKED, DISENGAGED) with confidence.",
1438
- inputSchema: z29.object({
1439
- session_id: z29.string().optional().describe("Session ID to analyze and predict outcome for"),
1440
- behavioral_features: z29.object({
1441
- frustration: z29.number().describe("Frustration score (0-1)"),
1442
- confusion: z29.number().describe("Confusion score (0-1)"),
1443
- confidence: z29.number().describe("Confidence score (0-1)")
1541
+ inputSchema: z31.object({
1542
+ session_id: z31.string().optional().describe("Session ID to analyze and predict outcome for"),
1543
+ behavioral_features: z31.object({
1544
+ frustration: z31.number().describe("Frustration score (0-1)"),
1545
+ confusion: z31.number().describe("Confusion score (0-1)"),
1546
+ confidence: z31.number().describe("Confidence score (0-1)")
1444
1547
  }).optional().describe("Behavioral features to use for prediction")
1445
1548
  }),
1446
1549
  handler: async (args) => {
@@ -1463,17 +1566,17 @@ var predictOutcomesTool = {
1463
1566
  };
1464
1567
 
1465
1568
  // ../../libraries/mcp-tools/dist/tools/remediation.js
1466
- import { z as z30 } from "zod";
1569
+ import { z as z32 } from "zod";
1467
1570
  var proposeFixTool = {
1468
1571
  name: "propose_fix",
1469
1572
  description: "Propose a fix for an issue. Creates a remediation record with baseline metrics for later evaluation. Include detailed diagnosis and code suggestions when possible.",
1470
- inputSchema: z30.object({
1471
- issue_id: z30.string().describe("The ID of the issue to fix"),
1472
- diagnosis: z30.string().describe("Detailed analysis of the root cause of the issue"),
1473
- proposed_fix: z30.string().describe("Description of the proposed fix and how it addresses the root cause"),
1474
- code_snippet: z30.string().optional().describe("Suggested code changes (if applicable)"),
1475
- affected_files: z30.array(z30.string()).optional().describe("List of files that need to be modified"),
1476
- confidence: z30.number().min(0).max(1).describe("Confidence level in the fix (0-1). Use <0.7 when uncertain.")
1573
+ inputSchema: z32.object({
1574
+ issue_id: z32.string().describe("The ID of the issue to fix"),
1575
+ diagnosis: z32.string().describe("Detailed analysis of the root cause of the issue"),
1576
+ proposed_fix: z32.string().describe("Description of the proposed fix and how it addresses the root cause"),
1577
+ code_snippet: z32.string().optional().describe("Suggested code changes (if applicable)"),
1578
+ affected_files: z32.array(z32.string()).optional().describe("List of files that need to be modified"),
1579
+ confidence: z32.number().min(0).max(1).describe("Confidence level in the fix (0-1). Use <0.7 when uncertain.")
1477
1580
  }),
1478
1581
  handler: async (args) => {
1479
1582
  const { issue_id, diagnosis, proposed_fix, code_snippet, affected_files, confidence } = args;
@@ -1497,7 +1600,7 @@ var proposeFixTool = {
1497
1600
  var listPendingFixesTool = {
1498
1601
  name: "list_pending_fixes",
1499
1602
  description: "List all proposed fixes awaiting deployment. Use to show the user what fixes are ready to be deployed.",
1500
- inputSchema: z30.object({}),
1603
+ inputSchema: z32.object({}),
1501
1604
  handler: async () => {
1502
1605
  if (!isApiConfigured()) {
1503
1606
  return apiNotConfiguredResult();
@@ -1512,8 +1615,8 @@ var listPendingFixesTool = {
1512
1615
  var listRemediationsTool = {
1513
1616
  name: "list_remediations",
1514
1617
  description: "List remediation records with optional filters. Use to review past and current fix attempts.",
1515
- inputSchema: z30.object({
1516
- status: z30.enum([
1618
+ inputSchema: z32.object({
1619
+ status: z32.enum([
1517
1620
  "proposed",
1518
1621
  "waiting",
1519
1622
  "dismissed",
@@ -1523,9 +1626,9 @@ var listRemediationsTool = {
1523
1626
  "failed",
1524
1627
  "reverted"
1525
1628
  ]).optional().describe("Filter by remediation status"),
1526
- issue_id: z30.string().optional().describe("Filter by issue ID"),
1527
- page_path: z30.string().optional().describe("Filter by page path"),
1528
- limit: z30.number().optional().default(20).describe("Maximum number of results (default: 20)")
1629
+ issue_id: z32.string().optional().describe("Filter by issue ID"),
1630
+ page_path: z32.string().optional().describe("Filter by page path"),
1631
+ limit: z32.number().optional().default(20).describe("Maximum number of results (default: 20)")
1529
1632
  }),
1530
1633
  handler: async (args) => {
1531
1634
  const { status, issue_id, page_path, limit } = args;
@@ -1547,8 +1650,8 @@ var listRemediationsTool = {
1547
1650
  var confirmDeploymentTool = {
1548
1651
  name: "confirm_deployment",
1549
1652
  description: "Confirm that a proposed fix has been deployed to production. This starts the evaluation timer. Call this when the user confirms they have deployed the fix.",
1550
- inputSchema: z30.object({
1551
- remediation_id: z30.string().describe("The ID of the remediation to mark as deployed")
1653
+ inputSchema: z32.object({
1654
+ remediation_id: z32.string().describe("The ID of the remediation to mark as deployed")
1552
1655
  }),
1553
1656
  handler: async (args) => {
1554
1657
  const { remediation_id } = args;
@@ -1565,9 +1668,9 @@ var confirmDeploymentTool = {
1565
1668
  var evaluateFixTool = {
1566
1669
  name: "evaluate_fix",
1567
1670
  description: "Evaluate if a deployed fix improved metrics. Compares post-deployment metrics to baseline. Returns success/partial/failed outcome with detailed verdict. Wait at least 24 hours after deployment for reliable results.",
1568
- inputSchema: z30.object({
1569
- remediation_id: z30.string().describe("The ID of the remediation to evaluate"),
1570
- min_hours: z30.number().optional().default(24).describe("Minimum hours since deployment required (default: 24)")
1671
+ inputSchema: z32.object({
1672
+ remediation_id: z32.string().describe("The ID of the remediation to evaluate"),
1673
+ min_hours: z32.number().optional().default(24).describe("Minimum hours since deployment required (default: 24)")
1571
1674
  }),
1572
1675
  handler: async (args) => {
1573
1676
  const { remediation_id, min_hours } = args;
@@ -1584,8 +1687,8 @@ var evaluateFixTool = {
1584
1687
  var getFixHistoryTool = {
1585
1688
  name: "get_fix_history",
1586
1689
  description: "Get the full remediation history for an issue. Shows all fix attempts, their outcomes, and current status. Use before proposing a new fix to learn from past attempts.",
1587
- inputSchema: z30.object({
1588
- issue_id: z30.string().describe("The ID of the issue to get fix history for")
1690
+ inputSchema: z32.object({
1691
+ issue_id: z32.string().describe("The ID of the issue to get fix history for")
1589
1692
  }),
1590
1693
  handler: async (args) => {
1591
1694
  const { issue_id } = args;
@@ -1602,13 +1705,13 @@ var getFixHistoryTool = {
1602
1705
  var updateRemediationStatusTool = {
1603
1706
  name: "update_remediation_status",
1604
1707
  description: "Update the status of a remediation based on PR events. Use to mark a fix as 'waiting' (PR created), 'deployed' (PR merged), or 'dismissed' (PR closed without merge).",
1605
- inputSchema: z30.object({
1606
- remediation_id: z30.string().describe("The ID of the remediation to update"),
1607
- status: z30.enum(["waiting", "deployed", "dismissed"]).describe("New status: 'waiting' = PR open, 'deployed' = PR merged, 'dismissed' = PR closed without merge"),
1608
- pr_url: z30.string().optional().describe("URL of the pull request"),
1609
- pr_number: z30.number().optional().describe("PR number"),
1610
- pr_merged_at: z30.string().optional().describe("ISO timestamp when PR was merged"),
1611
- pr_closed_at: z30.string().optional().describe("ISO timestamp when PR was closed")
1708
+ inputSchema: z32.object({
1709
+ remediation_id: z32.string().describe("The ID of the remediation to update"),
1710
+ status: z32.enum(["waiting", "deployed", "dismissed"]).describe("New status: 'waiting' = PR open, 'deployed' = PR merged, 'dismissed' = PR closed without merge"),
1711
+ pr_url: z32.string().optional().describe("URL of the pull request"),
1712
+ pr_number: z32.number().optional().describe("PR number"),
1713
+ pr_merged_at: z32.string().optional().describe("ISO timestamp when PR was merged"),
1714
+ pr_closed_at: z32.string().optional().describe("ISO timestamp when PR was closed")
1612
1715
  }),
1613
1716
  handler: async (args) => {
1614
1717
  const { remediation_id, status, pr_url, pr_number, pr_merged_at, pr_closed_at } = args;
@@ -1631,8 +1734,8 @@ var updateRemediationStatusTool = {
1631
1734
  var listRemediationsByStatusTool = {
1632
1735
  name: "list_remediations_by_status",
1633
1736
  description: "List remediations filtered by one or more statuses. Use to find all 'waiting' PRs or 'deployed' fixes ready for evaluation.",
1634
- inputSchema: z30.object({
1635
- statuses: z30.array(z30.enum([
1737
+ inputSchema: z32.object({
1738
+ statuses: z32.array(z32.enum([
1636
1739
  "proposed",
1637
1740
  "waiting",
1638
1741
  "dismissed",
@@ -1660,8 +1763,8 @@ var listRemediationsByStatusTool = {
1660
1763
  var getRemediationByPrTool = {
1661
1764
  name: "get_remediation_by_pr",
1662
1765
  description: "Get a remediation by its PR number. Use to look up fix details when processing PR events.",
1663
- inputSchema: z30.object({
1664
- pr_number: z30.number().describe("The PR number to look up")
1766
+ inputSchema: z32.object({
1767
+ pr_number: z32.number().describe("The PR number to look up")
1665
1768
  }),
1666
1769
  handler: async (args) => {
1667
1770
  const { pr_number } = args;
@@ -1677,13 +1780,13 @@ var getRemediationByPrTool = {
1677
1780
  };
1678
1781
 
1679
1782
  // ../../libraries/mcp-tools/dist/tools/scanSite.js
1680
- import { z as z31 } from "zod";
1783
+ import { z as z33 } from "zod";
1681
1784
  var scanSiteTool = {
1682
1785
  name: "scan_site",
1683
1786
  description: "One-shot site health scan. Lists all pages and computes aggregate metrics for the top-N pages (default 10) sorted by session count. Returns a ranked table with frustration and health grade per page. Use this as the FIRST tool when the user asks a broad question without naming a specific page.",
1684
- inputSchema: z31.object({
1685
- top_n: z31.number().optional().default(10).describe("Number of top pages to analyze (default 10)"),
1686
- offset: z31.number().optional().default(0).describe("Skip first N pages for pagination (default 0)")
1787
+ inputSchema: z33.object({
1788
+ top_n: z33.number().optional().default(10).describe("Number of top pages to analyze (default 10)"),
1789
+ offset: z33.number().optional().default(0).describe("Skip first N pages for pagination (default 0)")
1687
1790
  }),
1688
1791
  handler: async (args) => {
1689
1792
  const { top_n, offset } = args;
@@ -1702,14 +1805,14 @@ var scanSiteTool = {
1702
1805
  };
1703
1806
 
1704
1807
  // ../../libraries/mcp-tools/dist/tools/searchSessions.js
1705
- import { z as z32 } from "zod";
1808
+ import { z as z34 } from "zod";
1706
1809
  var searchSessionsTool = {
1707
1810
  name: "search_sessions",
1708
1811
  description: 'Search sessions by natural language query. Examples: "frustrated users on checkout", "rage clicks on pricing page", "confused users who abandoned cart".',
1709
- inputSchema: z32.object({
1710
- query: z32.string().describe("Natural language search query describing the sessions you want to find"),
1711
- page_path: z32.string().optional().describe("Optional: filter to a specific page path"),
1712
- limit: z32.number().optional().default(10).describe("Maximum number of sessions to return (default: 10)")
1812
+ inputSchema: z34.object({
1813
+ query: z34.string().describe("Natural language search query describing the sessions you want to find"),
1814
+ page_path: z34.string().optional().describe("Optional: filter to a specific page path"),
1815
+ limit: z34.number().optional().default(10).describe("Maximum number of sessions to return (default: 10)")
1713
1816
  }),
1714
1817
  handler: async (args) => {
1715
1818
  const { query, page_path, limit } = args;
@@ -1729,7 +1832,7 @@ var searchSessionsTool = {
1729
1832
  };
1730
1833
 
1731
1834
  // ../../libraries/mcp-tools/dist/tools/triage.js
1732
- import { z as z33 } from "zod";
1835
+ import { z as z35 } from "zod";
1733
1836
  var DISMISS_REASONS = [
1734
1837
  "stale",
1735
1838
  "intended",
@@ -1739,11 +1842,11 @@ var DISMISS_REASONS = [
1739
1842
  var dismissIssueTool = {
1740
1843
  name: "dismiss_issue",
1741
1844
  description: "Dismiss an issue as a false positive. Creates site knowledge to prevent re-flagging. Use when an issue is stale, intended behavior, a duplicate, or a false positive. Always confirm with user before dismissing.",
1742
- inputSchema: z33.object({
1743
- issue_id: z33.string().describe("The ID of the issue to dismiss"),
1744
- reason: z33.enum(DISMISS_REASONS).describe("Reason for dismissal: stale, intended, duplicate, or false_positive"),
1745
- explanation: z33.string().describe("Detailed explanation of why this issue is being dismissed"),
1746
- create_knowledge: z33.boolean().optional().default(true).describe("Whether to create site knowledge entry (default: true)")
1845
+ inputSchema: z35.object({
1846
+ issue_id: z35.string().describe("The ID of the issue to dismiss"),
1847
+ reason: z35.enum(DISMISS_REASONS).describe("Reason for dismissal: stale, intended, duplicate, or false_positive"),
1848
+ explanation: z35.string().describe("Detailed explanation of why this issue is being dismissed"),
1849
+ create_knowledge: z35.boolean().optional().default(true).describe("Whether to create site knowledge entry (default: true)")
1747
1850
  }),
1748
1851
  handler: async (args) => {
1749
1852
  const { issue_id, reason, explanation, create_knowledge } = args;
@@ -1764,9 +1867,9 @@ var dismissIssueTool = {
1764
1867
  var markIntendedBehaviorTool = {
1765
1868
  name: "mark_intended_behavior",
1766
1869
  description: "Mark an issue as intended behavior. This is a shortcut for dismissing with reason 'intended' and always creates site knowledge. Use when the detected behavior is by design (e.g., disabled button clicks are expected).",
1767
- inputSchema: z33.object({
1768
- issue_id: z33.string().describe("The ID of the issue to mark as intended"),
1769
- explanation: z33.string().describe("Explanation of why this behavior is intended")
1870
+ inputSchema: z35.object({
1871
+ issue_id: z35.string().describe("The ID of the issue to mark as intended"),
1872
+ explanation: z35.string().describe("Explanation of why this behavior is intended")
1770
1873
  }),
1771
1874
  handler: async (args) => {
1772
1875
  const { issue_id, explanation } = args;
@@ -1785,8 +1888,8 @@ var markIntendedBehaviorTool = {
1785
1888
  var getIssueHistoryTool = {
1786
1889
  name: "get_issue_history",
1787
1890
  description: "Get the full history of an issue including status changes, remediation attempts, and outcomes. Use to understand past fix attempts before proposing new ones.",
1788
- inputSchema: z33.object({
1789
- issue_id: z33.string().describe("The ID of the issue to get history for")
1891
+ inputSchema: z35.object({
1892
+ issue_id: z35.string().describe("The ID of the issue to get history for")
1790
1893
  }),
1791
1894
  handler: async (args) => {
1792
1895
  const { issue_id } = args;
@@ -1802,7 +1905,7 @@ var getIssueHistoryTool = {
1802
1905
  };
1803
1906
 
1804
1907
  // ../../libraries/mcp-tools/dist/tools/triageSessions.js
1805
- import { z as z34 } from "zod";
1908
+ import { z as z36 } from "zod";
1806
1909
  function formatDuration(seconds) {
1807
1910
  if (!seconds)
1808
1911
  return "unknown";
@@ -1925,12 +2028,12 @@ function formatTriageOutput(data) {
1925
2028
  var triageSessionsTool = {
1926
2029
  name: "triage_sessions",
1927
2030
  description: "Automatically triage sessions to find compromised user experiences. Analyzes user comments, frustration signals, rage clicks, and console errors. Returns flagged sessions with evidence and replay links. Use this to identify sessions that need attention without manually reviewing every recording. Can triage specific sessions by ID(s) or scan for problematic sessions. NOTE: Session replay URLs require a paid plan (Starter+). Free tier users can see session summaries and triage scores but not watch replays.",
1928
- inputSchema: z34.object({
1929
- session_ids: z34.array(z34.string()).optional().describe("Triage specific sessions by ID. If provided, other filters are ignored."),
1930
- days: z34.number().optional().default(7).describe("Lookback period in days (default: 7). Ignored if session_ids is provided."),
1931
- page_path: z34.string().optional().describe("Filter to sessions that visited a specific page"),
1932
- min_severity: z34.enum(["critical", "high", "medium", "low"]).optional().describe("Minimum severity to include in results"),
1933
- limit: z34.number().optional().default(20).describe("Maximum sessions to return (default: 20, max: 100)")
2031
+ inputSchema: z36.object({
2032
+ session_ids: z36.array(z36.string()).optional().describe("Triage specific sessions by ID. If provided, other filters are ignored."),
2033
+ days: z36.number().optional().default(7).describe("Lookback period in days (default: 7). Ignored if session_ids is provided."),
2034
+ page_path: z36.string().optional().describe("Filter to sessions that visited a specific page"),
2035
+ min_severity: z36.enum(["critical", "high", "medium", "low"]).optional().describe("Minimum severity to include in results"),
2036
+ limit: z36.number().optional().default(20).describe("Maximum sessions to return (default: 20, max: 100)")
1934
2037
  }),
1935
2038
  handler: async (args) => {
1936
2039
  const { session_ids, days, page_path, min_severity, limit } = args;
@@ -1953,7 +2056,7 @@ var triageSessionsTool = {
1953
2056
  };
1954
2057
 
1955
2058
  // ../../libraries/mcp-tools/dist/tools/proposal.js
1956
- import { z as z35 } from "zod";
2059
+ import { z as z37 } from "zod";
1957
2060
  var ISSUE_CATEGORIES2 = [
1958
2061
  "code_error",
1959
2062
  "dead_click",
@@ -1976,18 +2079,18 @@ var PROPOSAL_STATUSES = [
1976
2079
  var createProposalTool = {
1977
2080
  name: "create_proposal",
1978
2081
  description: "Create a fix proposal for audit mode. Proposals are suggestions that developers review and implement manually. Use this in audit mode instead of propose_fix when you cannot make code changes directly.",
1979
- inputSchema: z35.object({
1980
- issue_id: z35.string().optional().describe("The ID of the related issue (if any)"),
1981
- improvement_run_id: z35.string().optional().describe("The ID of the improvement run creating this proposal"),
1982
- title: z35.string().describe("Short title describing the proposed fix"),
1983
- diagnosis: z35.string().describe("Detailed analysis of the root cause of the issue"),
1984
- proposed_fix: z35.string().describe("Description of the proposed fix and how it addresses the root cause"),
1985
- affected_files: z35.array(z35.string()).optional().describe("List of files that likely need to be modified"),
1986
- confidence: z35.number().min(0).max(1).describe("Confidence level in the fix (0-1). Use <0.7 when uncertain."),
1987
- page_path: z35.string().describe("The page path where the issue occurs"),
1988
- element_selector: z35.string().optional().describe("CSS selector of the affected element (if applicable)"),
1989
- category: z35.enum(ISSUE_CATEGORIES2).describe("Category of the issue being addressed"),
1990
- severity: z35.enum(ISSUE_SEVERITIES).describe("Severity of the issue being addressed")
2082
+ inputSchema: z37.object({
2083
+ issue_id: z37.string().optional().describe("The ID of the related issue (if any)"),
2084
+ improvement_run_id: z37.string().optional().describe("The ID of the improvement run creating this proposal"),
2085
+ title: z37.string().describe("Short title describing the proposed fix"),
2086
+ diagnosis: z37.string().describe("Detailed analysis of the root cause of the issue"),
2087
+ proposed_fix: z37.string().describe("Description of the proposed fix and how it addresses the root cause"),
2088
+ affected_files: z37.array(z37.string()).optional().describe("List of files that likely need to be modified"),
2089
+ confidence: z37.number().min(0).max(1).describe("Confidence level in the fix (0-1). Use <0.7 when uncertain."),
2090
+ page_path: z37.string().describe("The page path where the issue occurs"),
2091
+ element_selector: z37.string().optional().describe("CSS selector of the affected element (if applicable)"),
2092
+ category: z37.enum(ISSUE_CATEGORIES2).describe("Category of the issue being addressed"),
2093
+ severity: z37.enum(ISSUE_SEVERITIES).describe("Severity of the issue being addressed")
1991
2094
  }),
1992
2095
  handler: async (args) => {
1993
2096
  const { issue_id, improvement_run_id, title, diagnosis, proposed_fix, affected_files, confidence, page_path, element_selector, category, severity } = args;
@@ -2016,14 +2119,14 @@ var createProposalTool = {
2016
2119
  var listProposalsTool = {
2017
2120
  name: "list_proposals",
2018
2121
  description: "List proposals with optional filters. Use to review pending proposals, check resolved proposals, or filter by page/category/severity.",
2019
- inputSchema: z35.object({
2020
- status: z35.enum(PROPOSAL_STATUSES).optional().describe("Filter by single status"),
2021
- statuses: z35.array(z35.enum(PROPOSAL_STATUSES)).optional().describe("Filter by multiple statuses"),
2022
- issue_id: z35.string().optional().describe("Filter by related issue ID"),
2023
- page_path: z35.string().optional().describe("Filter by page path"),
2024
- category: z35.enum(ISSUE_CATEGORIES2).optional().describe("Filter by category"),
2025
- severity: z35.enum(ISSUE_SEVERITIES).optional().describe("Filter by severity"),
2026
- limit: z35.number().optional().default(20).describe("Maximum number of results (default: 20)")
2122
+ inputSchema: z37.object({
2123
+ status: z37.enum(PROPOSAL_STATUSES).optional().describe("Filter by single status"),
2124
+ statuses: z37.array(z37.enum(PROPOSAL_STATUSES)).optional().describe("Filter by multiple statuses"),
2125
+ issue_id: z37.string().optional().describe("Filter by related issue ID"),
2126
+ page_path: z37.string().optional().describe("Filter by page path"),
2127
+ category: z37.enum(ISSUE_CATEGORIES2).optional().describe("Filter by category"),
2128
+ severity: z37.enum(ISSUE_SEVERITIES).optional().describe("Filter by severity"),
2129
+ limit: z37.number().optional().default(20).describe("Maximum number of results (default: 20)")
2027
2130
  }),
2028
2131
  handler: async (args) => {
2029
2132
  const { status, statuses, issue_id, page_path, category, severity, limit } = args;
@@ -2055,8 +2158,8 @@ var listProposalsTool = {
2055
2158
  var getProposalTool = {
2056
2159
  name: "get_proposal",
2057
2160
  description: "Get details of a specific proposal by ID. Use to review the full diagnosis and proposed fix before implementing.",
2058
- inputSchema: z35.object({
2059
- proposal_id: z35.string().describe("The ID of the proposal to retrieve")
2161
+ inputSchema: z37.object({
2162
+ proposal_id: z37.string().describe("The ID of the proposal to retrieve")
2060
2163
  }),
2061
2164
  handler: async (args) => {
2062
2165
  const { proposal_id } = args;
@@ -2073,9 +2176,9 @@ var getProposalTool = {
2073
2176
  var resolveProposalTool = {
2074
2177
  name: "resolve_proposal",
2075
2178
  description: "Mark a proposal as resolved after implementing the fix. This captures baseline metrics for later evaluation. Call this after you have implemented the proposed fix in code.",
2076
- inputSchema: z35.object({
2077
- proposal_id: z35.string().describe("The ID of the proposal to mark as resolved"),
2078
- member_id: z35.string().optional().describe("The ID of the member who resolved it (optional)")
2179
+ inputSchema: z37.object({
2180
+ proposal_id: z37.string().describe("The ID of the proposal to mark as resolved"),
2181
+ member_id: z37.string().optional().describe("The ID of the member who resolved it (optional)")
2079
2182
  }),
2080
2183
  handler: async (args) => {
2081
2184
  const { proposal_id, member_id } = args;
@@ -2092,10 +2195,10 @@ var resolveProposalTool = {
2092
2195
  var dismissProposalTool = {
2093
2196
  name: "dismiss_proposal",
2094
2197
  description: "Dismiss a proposal that won't be implemented. Use when the proposal is not applicable, the issue is intended behavior, or a different approach is preferred.",
2095
- inputSchema: z35.object({
2096
- proposal_id: z35.string().describe("The ID of the proposal to dismiss"),
2097
- reason: z35.string().describe("Explanation of why the proposal is being dismissed"),
2098
- member_id: z35.string().optional().describe("The ID of the member who dismissed it (optional)")
2198
+ inputSchema: z37.object({
2199
+ proposal_id: z37.string().describe("The ID of the proposal to dismiss"),
2200
+ reason: z37.string().describe("Explanation of why the proposal is being dismissed"),
2201
+ member_id: z37.string().optional().describe("The ID of the member who dismissed it (optional)")
2099
2202
  }),
2100
2203
  handler: async (args) => {
2101
2204
  const { proposal_id, reason, member_id } = args;
@@ -2112,9 +2215,9 @@ var dismissProposalTool = {
2112
2215
  var evaluateProposalTool = {
2113
2216
  name: "evaluate_proposal",
2114
2217
  description: "Evaluate if a resolved proposal improved metrics. Compares post-resolution metrics to baseline. Returns success/partial/failed outcome with detailed verdict. Wait at least 24 hours after resolution for reliable results.",
2115
- inputSchema: z35.object({
2116
- proposal_id: z35.string().describe("The ID of the proposal to evaluate"),
2117
- min_hours: z35.number().optional().default(24).describe("Minimum hours since resolution required (default: 24)")
2218
+ inputSchema: z37.object({
2219
+ proposal_id: z37.string().describe("The ID of the proposal to evaluate"),
2220
+ min_hours: z37.number().optional().default(24).describe("Minimum hours since resolution required (default: 24)")
2118
2221
  }),
2119
2222
  handler: async (args) => {
2120
2223
  const { proposal_id, min_hours } = args;
@@ -2132,7 +2235,7 @@ var evaluateProposalTool = {
2132
2235
  var listPendingProposalsTool = {
2133
2236
  name: "list_pending_proposals",
2134
2237
  description: "List all pending proposals awaiting review. Use to see what fix suggestions are available for implementation.",
2135
- inputSchema: z35.object({}),
2238
+ inputSchema: z37.object({}),
2136
2239
  handler: async () => {
2137
2240
  if (!isApiConfigured()) {
2138
2241
  return apiNotConfiguredResult();
@@ -2147,8 +2250,8 @@ var listPendingProposalsTool = {
2147
2250
  var listProposalsForEvaluationTool = {
2148
2251
  name: "list_proposals_for_evaluation",
2149
2252
  description: "List resolved proposals that are ready for evaluation (24+ hours since resolution). Use during audit runs to check outcomes of previously resolved proposals.",
2150
- inputSchema: z35.object({
2151
- min_hours: z35.number().optional().default(24).describe("Minimum hours since resolution (default: 24)")
2253
+ inputSchema: z37.object({
2254
+ min_hours: z37.number().optional().default(24).describe("Minimum hours since resolution (default: 24)")
2152
2255
  }),
2153
2256
  handler: async (args) => {
2154
2257
  const { min_hours } = args;
@@ -2164,7 +2267,7 @@ var listProposalsForEvaluationTool = {
2164
2267
  };
2165
2268
 
2166
2269
  // ../../libraries/mcp-tools/dist/tools/git.js
2167
- import { z as z36 } from "zod";
2270
+ import { z as z38 } from "zod";
2168
2271
  var gitContext = null;
2169
2272
  function getGitContext() {
2170
2273
  if (!gitContext) {
@@ -2202,9 +2305,9 @@ async function gitlabRequest(endpoint, options = {}) {
2202
2305
  var createBranchTool = {
2203
2306
  name: "create_branch",
2204
2307
  description: "Create a new branch from the default branch. Works with both GitHub and GitLab.",
2205
- inputSchema: z36.object({
2206
- branch_name: z36.string().describe("Name of the new branch to create"),
2207
- from_branch: z36.string().optional().default("main").describe("Base branch to create from (default: main)")
2308
+ inputSchema: z38.object({
2309
+ branch_name: z38.string().describe("Name of the new branch to create"),
2310
+ from_branch: z38.string().optional().default("main").describe("Base branch to create from (default: main)")
2208
2311
  }),
2209
2312
  handler: async (args) => {
2210
2313
  try {
@@ -2263,9 +2366,9 @@ var createBranchTool = {
2263
2366
  var getFileContentTool = {
2264
2367
  name: "get_file_content",
2265
2368
  description: "Get the content of a file from the repository. Works with both GitHub and GitLab.",
2266
- inputSchema: z36.object({
2267
- path: z36.string().describe("Path to the file in the repository"),
2268
- branch: z36.string().optional().describe("Branch to read from (default: main)")
2369
+ inputSchema: z38.object({
2370
+ path: z38.string().describe("Path to the file in the repository"),
2371
+ branch: z38.string().optional().describe("Branch to read from (default: main)")
2269
2372
  }),
2270
2373
  handler: async (args) => {
2271
2374
  try {
@@ -2315,12 +2418,12 @@ var getFileContentTool = {
2315
2418
  var updateFileTool = {
2316
2419
  name: "update_file",
2317
2420
  description: "Update or create a file in the repository. Works with both GitHub and GitLab.",
2318
- inputSchema: z36.object({
2319
- path: z36.string().describe("Path to the file in the repository"),
2320
- content: z36.string().describe("New content for the file"),
2321
- message: z36.string().describe("Commit message"),
2322
- branch: z36.string().describe("Branch to commit to"),
2323
- sha: z36.string().optional().describe("SHA of the file being replaced (required for updates)")
2421
+ inputSchema: z38.object({
2422
+ path: z38.string().describe("Path to the file in the repository"),
2423
+ content: z38.string().describe("New content for the file"),
2424
+ message: z38.string().describe("Commit message"),
2425
+ branch: z38.string().describe("Branch to commit to"),
2426
+ sha: z38.string().optional().describe("SHA of the file being replaced (required for updates)")
2324
2427
  }),
2325
2428
  handler: async (args) => {
2326
2429
  try {
@@ -2388,11 +2491,11 @@ var updateFileTool = {
2388
2491
  var createMergeRequestTool = {
2389
2492
  name: "create_merge_request",
2390
2493
  description: "Create a merge request (GitHub: Pull Request, GitLab: Merge Request). Works with both providers.",
2391
- inputSchema: z36.object({
2392
- title: z36.string().describe("Title of the merge request"),
2393
- description: z36.string().describe("Description/body of the merge request"),
2394
- source_branch: z36.string().describe("Branch containing the changes"),
2395
- target_branch: z36.string().optional().default("main").describe("Branch to merge into (default: main)")
2494
+ inputSchema: z38.object({
2495
+ title: z38.string().describe("Title of the merge request"),
2496
+ description: z38.string().describe("Description/body of the merge request"),
2497
+ source_branch: z38.string().describe("Branch containing the changes"),
2498
+ target_branch: z38.string().optional().default("main").describe("Branch to merge into (default: main)")
2396
2499
  }),
2397
2500
  handler: async (args) => {
2398
2501
  try {
@@ -2457,8 +2560,8 @@ var createMergeRequestTool = {
2457
2560
  var checkMrStatusTool = {
2458
2561
  name: "check_mr_status",
2459
2562
  description: "Check the status of a merge request. Works with both GitHub and GitLab.",
2460
- inputSchema: z36.object({
2461
- mr_number: z36.number().describe("The merge request number")
2563
+ inputSchema: z38.object({
2564
+ mr_number: z38.number().describe("The merge request number")
2462
2565
  }),
2463
2566
  handler: async (args) => {
2464
2567
  try {
@@ -2532,8 +2635,8 @@ var checkMrStatusTool = {
2532
2635
  var listOpenMrsTool = {
2533
2636
  name: "list_open_mrs",
2534
2637
  description: "List open merge requests for the repository. Works with both GitHub and GitLab.",
2535
- inputSchema: z36.object({
2536
- limit: z36.number().optional().default(10).describe("Maximum number of MRs to return (default: 10)")
2638
+ inputSchema: z38.object({
2639
+ limit: z38.number().optional().default(10).describe("Maximum number of MRs to return (default: 10)")
2537
2640
  }),
2538
2641
  handler: async (args) => {
2539
2642
  try {
@@ -2587,10 +2690,10 @@ var listOpenMrsTool = {
2587
2690
  var listRepositoryFilesTool = {
2588
2691
  name: "list_repository_files",
2589
2692
  description: "List files and directories in the repository. Use this to discover the file structure before reading or modifying files. Works with both GitHub and GitLab.",
2590
- inputSchema: z36.object({
2591
- path: z36.string().optional().default("").describe("Directory path to list (empty for root)"),
2592
- branch: z36.string().optional().describe("Branch to list from (default: main)"),
2593
- recursive: z36.boolean().optional().default(false).describe("If true, list all files recursively (may be slow for large repos)")
2693
+ inputSchema: z38.object({
2694
+ path: z38.string().optional().default("").describe("Directory path to list (empty for root)"),
2695
+ branch: z38.string().optional().describe("Branch to list from (default: main)"),
2696
+ recursive: z38.boolean().optional().default(false).describe("If true, list all files recursively (may be slow for large repos)")
2594
2697
  }),
2595
2698
  handler: async (args) => {
2596
2699
  try {
@@ -2712,6 +2815,10 @@ var allTools = [
2712
2815
  getActionableIssuesTool,
2713
2816
  getAnomaliesTool,
2714
2817
  getConsoleErrorsTool,
2818
+ getCustomEventsTool,
2819
+ listEventNamesTool,
2820
+ getSessionCommentsTool,
2821
+ getCommentStatsTool,
2715
2822
  getDeadClicksTool,
2716
2823
  getDomainsTool,
2717
2824
  getElementFrictionTool,
@@ -2796,7 +2903,7 @@ var exposedTools = allTools.filter((t) => EXPOSED_TOOL_NAMES.includes(t.name));
2796
2903
  var hiddenTools = allTools.filter((t) => !EXPOSED_TOOL_NAMES.includes(t.name));
2797
2904
 
2798
2905
  // src/tools/catalog/searchTools.ts
2799
- import { z as z37 } from "zod";
2906
+ import { z as z39 } from "zod";
2800
2907
  import { readFileSync } from "fs";
2801
2908
  import { fileURLToPath } from "url";
2802
2909
  import { dirname, join } from "path";
@@ -2890,11 +2997,11 @@ function getToolByName3(name) {
2890
2997
  return loadCatalog().find((t) => t.name === name);
2891
2998
  }
2892
2999
  var DEFAULT_TOOL_LIMIT = 5;
2893
- var searchToolsSchema = z37.object({
2894
- query: z37.string().describe(
3000
+ var searchToolsSchema = z39.object({
3001
+ query: z39.string().describe(
2895
3002
  "Natural language description of what data or analysis capability you need. Describe what you want to learn or investigate."
2896
3003
  ),
2897
- limit: z37.number().optional().describe("Maximum number of tools to return (default 5)")
3004
+ limit: z39.number().optional().describe("Maximum number of tools to return (default 5)")
2898
3005
  });
2899
3006
  function registerSearchTools(server) {
2900
3007
  server.registerTool(
@@ -2946,16 +3053,16 @@ function registerSearchTools(server) {
2946
3053
  }
2947
3054
 
2948
3055
  // src/tools/catalog/callTool.ts
2949
- import { z as z38 } from "zod";
3056
+ import { z as z40 } from "zod";
2950
3057
  var toolRegistry = /* @__PURE__ */ new Map();
2951
3058
  function registerToolHandler(name, handler) {
2952
3059
  toolRegistry.set(name, handler);
2953
3060
  }
2954
- var callToolSchema = z38.object({
2955
- tool_name: z38.string().describe(
3061
+ var callToolSchema = z40.object({
3062
+ tool_name: z40.string().describe(
2956
3063
  "The exact name of the tool to call (e.g., 'get_page_metrics', 'analyze_flow', 'compare_cohorts')"
2957
3064
  ),
2958
- arguments: z38.record(z38.string(), z38.unknown()).describe(
3065
+ arguments: z40.record(z40.string(), z40.unknown()).describe(
2959
3066
  "The arguments to pass to the tool as a JSON object. Check the tool description from search_tools for required parameters."
2960
3067
  )
2961
3068
  });
@@ -3024,17 +3131,17 @@ function registerCallTool(server) {
3024
3131
  }
3025
3132
 
3026
3133
  // src/tools/memory.ts
3027
- import { z as z39 } from "zod";
3134
+ import { z as z41 } from "zod";
3028
3135
  var memoryStore = /* @__PURE__ */ new Map();
3029
3136
  function registerMemoryTools(server) {
3030
3137
  server.registerTool(
3031
3138
  "memory_save",
3032
3139
  {
3033
3140
  description: "Save a value to working memory for later retrieval. Use this to store intermediate results from tool calls that you want to reference later.",
3034
- inputSchema: z39.object({
3035
- key: z39.string().describe("Unique key to store the value under"),
3036
- value: z39.string().describe("Value to store (will be stored as string)"),
3037
- annotation: z39.string().optional().describe("Optional note about what this data represents")
3141
+ inputSchema: z41.object({
3142
+ key: z41.string().describe("Unique key to store the value under"),
3143
+ value: z41.string().describe("Value to store (will be stored as string)"),
3144
+ annotation: z41.string().optional().describe("Optional note about what this data represents")
3038
3145
  })
3039
3146
  },
3040
3147
  async ({
@@ -3062,8 +3169,8 @@ function registerMemoryTools(server) {
3062
3169
  "memory_recall",
3063
3170
  {
3064
3171
  description: "Retrieve a value from working memory by key. Use this to access data you previously stored with memory_save.",
3065
- inputSchema: z39.object({
3066
- key: z39.string().describe("Key to retrieve")
3172
+ inputSchema: z41.object({
3173
+ key: z41.string().describe("Key to retrieve")
3067
3174
  })
3068
3175
  },
3069
3176
  async ({ key }) => {
@@ -3095,7 +3202,7 @@ function registerMemoryTools(server) {
3095
3202
  "memory_list",
3096
3203
  {
3097
3204
  description: "List all keys currently stored in working memory. Returns key names, sizes, timestamps, and annotations.",
3098
- inputSchema: z39.object({})
3205
+ inputSchema: z41.object({})
3099
3206
  },
3100
3207
  async () => {
3101
3208
  const entries = [...memoryStore.values()].map((entry) => ({
@@ -3118,8 +3225,8 @@ function registerMemoryTools(server) {
3118
3225
  "memory_delete",
3119
3226
  {
3120
3227
  description: "Delete a value from working memory by key.",
3121
- inputSchema: z39.object({
3122
- key: z39.string().describe("Key to delete")
3228
+ inputSchema: z41.object({
3229
+ key: z41.string().describe("Key to delete")
3123
3230
  })
3124
3231
  },
3125
3232
  async ({ key }) => {
@@ -3138,7 +3245,7 @@ function registerMemoryTools(server) {
3138
3245
  "memory_clear",
3139
3246
  {
3140
3247
  description: "Clear all values from working memory. Use with caution.",
3141
- inputSchema: z39.object({})
3248
+ inputSchema: z41.object({})
3142
3249
  },
3143
3250
  async () => {
3144
3251
  const count = memoryStore.size;
@@ -3255,8 +3362,8 @@ Some tools have built-in limits for performance:
3255
3362
 
3256
3363
  For guided workflows (self-improvement, deep-dive analysis, regression hunting), install recapt skills:
3257
3364
  \`\`\`bash
3258
- npx @recapt/mcp skill list
3259
- npx @recapt/mcp skill install self-improvement
3365
+ npx @recapt/cli skill list
3366
+ npx @recapt/cli skill install self-improvement
3260
3367
  \`\`\`
3261
3368
  Skills provide step-by-step guidance for complex multi-tool workflows.`;
3262
3369
  async function main() {