@recapt/mcp 0.0.46 → 0.0.48

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 (2) hide show
  1. package/dist/index.js +58 -26
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2164,6 +2164,7 @@ var KNOWLEDGE_CATEGORIES = [
2164
2164
  "fix_pattern",
2165
2165
  "context"
2166
2166
  ];
2167
+ var IMPORTANCE_LEVELS = ["critical", "high", "normal", "low"];
2167
2168
  var ISSUE_CATEGORIES = [
2168
2169
  "code_error",
2169
2170
  "dead_click",
@@ -2175,25 +2176,35 @@ var ISSUE_CATEGORIES = [
2175
2176
  "structural_issue"
2176
2177
  ];
2177
2178
  var getSiteKnowledgeTool = {
2178
- name: "get_site_knowledge",
2179
- 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.",
2179
+ name: "recall_memory",
2180
+ description: "Search your persistent memory from previous sessions. Use to recall context, patterns, lessons learned, and site-specific knowledge. Supports semantic search (finds memories by meaning) or filter-based retrieval.",
2180
2181
  inputSchema: z27.object({
2181
- category: z27.enum(KNOWLEDGE_CATEGORIES).optional().describe("Filter by knowledge category"),
2182
+ query: z27.string().optional().describe("Natural language search query to find relevant memories by meaning. When provided, uses semantic search to find memories by similarity."),
2183
+ category: z27.enum(KNOWLEDGE_CATEGORIES).optional().describe("Filter by memory category"),
2184
+ importance: z27.enum(IMPORTANCE_LEVELS).optional().describe("Filter by importance level"),
2182
2185
  page_path: z27.string().optional().describe("Filter by page path"),
2183
2186
  issue_category: z27.enum(ISSUE_CATEGORIES).optional().describe("Filter by issue category"),
2184
- limit: z27.number().optional().default(50).describe("Maximum number of entries to return (default: 50)")
2187
+ limit: z27.number().optional().default(20).describe("Maximum number of memories to return (default: 20)")
2185
2188
  }),
2186
2189
  handler: async (args) => {
2187
- const { category, page_path, issue_category, limit } = args;
2190
+ const { query, category, importance, page_path, issue_category, limit } = args;
2188
2191
  if (!isApiConfigured()) {
2189
2192
  return apiNotConfiguredResult();
2190
2193
  }
2191
- const { data, error } = await apiGet("/knowledge", {
2192
- category,
2193
- page_path,
2194
- issue_category,
2195
- limit: limit ?? 50
2196
- });
2194
+ const params = {};
2195
+ if (query)
2196
+ params.query = query;
2197
+ if (category)
2198
+ params.category = category;
2199
+ if (importance)
2200
+ params.importance = importance;
2201
+ if (page_path)
2202
+ params.page_path = page_path;
2203
+ if (issue_category)
2204
+ params.issue_category = issue_category;
2205
+ if (limit)
2206
+ params.limit = limit;
2207
+ const { data, error } = await apiGet("/knowledge", params);
2197
2208
  if (error) {
2198
2209
  return errorResult(error);
2199
2210
  }
@@ -2201,18 +2212,19 @@ var getSiteKnowledgeTool = {
2201
2212
  }
2202
2213
  };
2203
2214
  var addSiteKnowledgeTool = {
2204
- name: "add_site_knowledge",
2205
- description: "Store a site-specific learning. Use to record false positives, intended behaviors, successful fix patterns, or important context about the site.",
2215
+ name: "remember",
2216
+ description: "Store a persistent memory that will survive across sessions. Use when you discover important context, patterns, or lessons that your future self should know. Set importance to 'critical' for things you should ALWAYS be aware of in every session.",
2206
2217
  inputSchema: z27.object({
2207
- category: z27.enum(KNOWLEDGE_CATEGORIES).describe("Category of knowledge: false_positive, intended_behavior, fix_pattern, or context"),
2208
- subject: z27.string().describe("Unique identifier/title for this knowledge entry"),
2209
- content: z27.string().describe("Detailed description of the learning"),
2218
+ category: z27.enum(KNOWLEDGE_CATEGORIES).describe("Category: false_positive (not a real issue), intended_behavior (by design), fix_pattern (what works/doesn't for fixes), context (general site knowledge)"),
2219
+ subject: z27.string().describe("Short, unique title for this memory (used for deduplication)"),
2220
+ content: z27.string().describe("Detailed description of what you learned"),
2221
+ importance: z27.enum(IMPORTANCE_LEVELS).optional().default("normal").describe("How important is this memory? 'critical' = always loaded at start of every session, 'high' = loaded when working on related pages/categories, 'normal' = available via search (default), 'low' = rarely relevant"),
2210
2222
  page_path: z27.string().optional().describe("Associated page path (if applicable)"),
2211
2223
  element_selector: z27.string().optional().describe("Associated element selector (if applicable)"),
2212
2224
  issue_category: z27.enum(ISSUE_CATEGORIES).optional().describe("Associated issue category (if applicable)")
2213
2225
  }),
2214
2226
  handler: async (args) => {
2215
- const { category, subject, content, page_path, element_selector, issue_category } = args;
2227
+ const { category, subject, content, importance, page_path, element_selector, issue_category } = args;
2216
2228
  if (!isApiConfigured()) {
2217
2229
  return apiNotConfiguredResult();
2218
2230
  }
@@ -2220,6 +2232,7 @@ var addSiteKnowledgeTool = {
2220
2232
  category,
2221
2233
  subject,
2222
2234
  content,
2235
+ importance: importance || "normal",
2223
2236
  page_path,
2224
2237
  element_selector,
2225
2238
  issue_category,
@@ -2232,10 +2245,10 @@ var addSiteKnowledgeTool = {
2232
2245
  }
2233
2246
  };
2234
2247
  var deleteSiteKnowledgeTool = {
2235
- name: "delete_site_knowledge",
2236
- description: "Delete a site knowledge entry. Use when a learning is no longer valid or was created in error.",
2248
+ name: "forget",
2249
+ description: "Remove a memory that is no longer valid or was created in error. Use when you notice an outdated or incorrect memory during recall.",
2237
2250
  inputSchema: z27.object({
2238
- knowledge_id: z27.string().describe("The ID of the knowledge entry to delete")
2251
+ knowledge_id: z27.string().describe("The ID of the memory to remove")
2239
2252
  }),
2240
2253
  handler: async (args) => {
2241
2254
  const { knowledge_id } = args;
@@ -2377,10 +2390,16 @@ var proposeFixTool = {
2377
2390
  iterations: z31.number().optional(),
2378
2391
  credits_used: z31.number().optional(),
2379
2392
  duration_ms: z31.number().optional()
2380
- }).optional().describe("AI execution metadata for tracking model selection and performance")
2393
+ }).optional().describe("AI execution metadata for tracking model selection and performance"),
2394
+ evidence_sessions: z31.array(z31.object({
2395
+ session_id: z31.string().describe("Session ID that demonstrates this issue"),
2396
+ reason: z31.string().optional().describe("Why this session was selected as evidence"),
2397
+ frustration: z31.number().optional().describe("Frustration score for this session"),
2398
+ page_path: z31.string().optional().describe("Page where the issue manifested")
2399
+ })).max(5).optional().describe("Up to 5 example sessions that demonstrate the issue. Discovered via triage_sessions or search_sessions during investigation.")
2381
2400
  }),
2382
2401
  handler: async (args) => {
2383
- const { page_path, category, severity, diagnosis, proposed_fix, code_snippet, affected_files, code_changes, confidence, title, execution_metadata } = args;
2402
+ const { page_path, category, severity, diagnosis, proposed_fix, code_snippet, affected_files, code_changes, confidence, title, execution_metadata, evidence_sessions } = args;
2384
2403
  if (!isApiConfigured()) {
2385
2404
  return apiNotConfiguredResult();
2386
2405
  }
@@ -2395,7 +2414,8 @@ var proposeFixTool = {
2395
2414
  code_changes,
2396
2415
  confidence,
2397
2416
  title,
2398
- execution_metadata
2417
+ execution_metadata,
2418
+ evidence_sessions
2399
2419
  });
2400
2420
  if (error) {
2401
2421
  return errorResult(error);
@@ -2600,10 +2620,17 @@ var updateRemediationTool = {
2600
2620
  description: z31.string().optional().describe("Description of the change")
2601
2621
  })).optional().describe("Detailed code changes with file contents"),
2602
2622
  confidence: z31.number().min(0).max(1).optional().describe("Updated confidence level in the fix (0-1)"),
2603
- title: z31.string().optional().describe("Updated user-friendly title")
2623
+ title: z31.string().optional().describe("Updated user-friendly title"),
2624
+ evidence_sessions: z31.array(z31.object({
2625
+ session_id: z31.string().describe("Session ID that demonstrates this issue"),
2626
+ reason: z31.string().optional().describe("Why this session was selected as evidence"),
2627
+ frustration: z31.number().optional().describe("Frustration score for this session"),
2628
+ page_path: z31.string().optional().describe("Page where the issue manifested")
2629
+ })).max(5).optional().describe("Up to 5 example sessions that demonstrate the issue. Replaces any existing evidence sessions."),
2630
+ user_context: z31.string().optional().describe("User-provided context, constraints, or business rules relevant to this remediation. Synthesize into a concise summary \u2014 replaces any existing context.")
2604
2631
  }),
2605
2632
  handler: async (args) => {
2606
- const { remediation_id, proposed_fix, code_snippet, affected_files, code_changes, confidence, title } = args;
2633
+ const { remediation_id, proposed_fix, code_snippet, affected_files, code_changes, confidence, title, evidence_sessions, user_context } = args;
2607
2634
  if (!isApiConfigured()) {
2608
2635
  return apiNotConfiguredResult();
2609
2636
  }
@@ -2613,7 +2640,9 @@ var updateRemediationTool = {
2613
2640
  affected_files,
2614
2641
  code_changes,
2615
2642
  confidence,
2616
- title
2643
+ title,
2644
+ evidence_sessions,
2645
+ user_context
2617
2646
  });
2618
2647
  if (error) {
2619
2648
  return errorResult(error);
@@ -3150,6 +3179,9 @@ var EXPOSED_TOOL_NAMES = [
3150
3179
  "get_upgrade_options",
3151
3180
  "search_tools",
3152
3181
  "call_tool",
3182
+ "recall_memory",
3183
+ "remember",
3184
+ "forget",
3153
3185
  "memory_save",
3154
3186
  "query_memory",
3155
3187
  "memory_recall",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recapt/mcp",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "description": "MCP exposing recapt behavioral intelligence to AI coding agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",