mcp-researchpowerpack 3.9.4 → 4.3.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 (188) hide show
  1. package/README.md +116 -208
  2. package/dist/index.js +280 -337
  3. package/dist/index.js.map +7 -1
  4. package/dist/mcp-use.json +7 -0
  5. package/dist/src/clients/reddit.js +278 -0
  6. package/dist/src/clients/reddit.js.map +7 -0
  7. package/dist/src/clients/scraper.js +326 -0
  8. package/dist/src/clients/scraper.js.map +7 -0
  9. package/dist/src/clients/search.js +217 -0
  10. package/dist/src/clients/search.js.map +7 -0
  11. package/dist/src/config/index.js +138 -0
  12. package/dist/src/config/index.js.map +7 -0
  13. package/dist/src/prompts/deep-research.js +41 -0
  14. package/dist/src/prompts/deep-research.js.map +7 -0
  15. package/dist/src/prompts/reddit-sentiment.js +47 -0
  16. package/dist/src/prompts/reddit-sentiment.js.map +7 -0
  17. package/dist/src/schemas/reddit.js +21 -0
  18. package/dist/src/schemas/reddit.js.map +7 -0
  19. package/dist/src/schemas/scrape-links.js +26 -0
  20. package/dist/src/schemas/scrape-links.js.map +7 -0
  21. package/dist/src/schemas/start-research.js +17 -0
  22. package/dist/src/schemas/start-research.js.map +7 -0
  23. package/dist/src/schemas/web-search.js +53 -0
  24. package/dist/src/schemas/web-search.js.map +7 -0
  25. package/dist/src/services/llm-processor.js +675 -0
  26. package/dist/src/services/llm-processor.js.map +7 -0
  27. package/dist/src/services/markdown-cleaner.js +62 -0
  28. package/dist/src/services/markdown-cleaner.js.map +7 -0
  29. package/dist/src/services/workflow-state.js +116 -0
  30. package/dist/src/services/workflow-state.js.map +7 -0
  31. package/dist/src/tools/mcp-helpers.js +50 -0
  32. package/dist/src/tools/mcp-helpers.js.map +7 -0
  33. package/dist/src/tools/reddit.js +277 -0
  34. package/dist/src/tools/reddit.js.map +7 -0
  35. package/dist/src/tools/registry.js +18 -0
  36. package/dist/src/tools/registry.js.map +7 -0
  37. package/dist/src/tools/scrape.js +334 -0
  38. package/dist/src/tools/scrape.js.map +7 -0
  39. package/dist/src/tools/search.js +423 -0
  40. package/dist/src/tools/search.js.map +7 -0
  41. package/dist/src/tools/start-research.js +199 -0
  42. package/dist/src/tools/start-research.js.map +7 -0
  43. package/dist/src/tools/utils.js +29 -0
  44. package/dist/src/tools/utils.js.map +7 -0
  45. package/dist/src/utils/bootstrap-guard.js +27 -0
  46. package/dist/src/utils/bootstrap-guard.js.map +7 -0
  47. package/dist/src/utils/concurrency.js +62 -0
  48. package/dist/src/utils/concurrency.js.map +7 -0
  49. package/dist/src/utils/content-extractor.js +61 -0
  50. package/dist/src/utils/content-extractor.js.map +7 -0
  51. package/dist/src/utils/errors.js +211 -0
  52. package/dist/src/utils/errors.js.map +7 -0
  53. package/dist/src/utils/logger.js +25 -0
  54. package/dist/src/utils/logger.js.map +7 -0
  55. package/dist/src/utils/markdown-formatter.js +15 -0
  56. package/dist/src/utils/markdown-formatter.js.map +7 -0
  57. package/dist/src/utils/reddit-keyword-guard.js +29 -0
  58. package/dist/src/utils/reddit-keyword-guard.js.map +7 -0
  59. package/dist/src/utils/response.js +81 -0
  60. package/dist/src/utils/response.js.map +7 -0
  61. package/dist/src/utils/retry.js +13 -0
  62. package/dist/src/utils/retry.js.map +7 -0
  63. package/dist/src/utils/sanitize.js +10 -0
  64. package/dist/src/utils/sanitize.js.map +7 -0
  65. package/dist/src/utils/source-type.js +41 -0
  66. package/dist/src/utils/source-type.js.map +7 -0
  67. package/dist/src/utils/url-aggregator.js +227 -0
  68. package/dist/src/utils/url-aggregator.js.map +7 -0
  69. package/dist/src/utils/workflow-key.js +14 -0
  70. package/dist/src/utils/workflow-key.js.map +7 -0
  71. package/dist/src/version.js +32 -0
  72. package/dist/src/version.js.map +7 -0
  73. package/package.json +33 -28
  74. package/dist/clients/reddit.d.ts +0 -69
  75. package/dist/clients/reddit.d.ts.map +0 -1
  76. package/dist/clients/reddit.js +0 -369
  77. package/dist/clients/reddit.js.map +0 -1
  78. package/dist/clients/research.d.ts +0 -67
  79. package/dist/clients/research.d.ts.map +0 -1
  80. package/dist/clients/research.js +0 -290
  81. package/dist/clients/research.js.map +0 -1
  82. package/dist/clients/scraper.d.ts +0 -72
  83. package/dist/clients/scraper.d.ts.map +0 -1
  84. package/dist/clients/scraper.js +0 -338
  85. package/dist/clients/scraper.js.map +0 -1
  86. package/dist/clients/search.d.ts +0 -57
  87. package/dist/clients/search.d.ts.map +0 -1
  88. package/dist/clients/search.js +0 -223
  89. package/dist/clients/search.js.map +0 -1
  90. package/dist/config/index.d.ts +0 -78
  91. package/dist/config/index.d.ts.map +0 -1
  92. package/dist/config/index.js +0 -201
  93. package/dist/config/index.js.map +0 -1
  94. package/dist/config/loader.d.ts +0 -40
  95. package/dist/config/loader.d.ts.map +0 -1
  96. package/dist/config/loader.js +0 -322
  97. package/dist/config/loader.js.map +0 -1
  98. package/dist/config/types.d.ts +0 -81
  99. package/dist/config/types.d.ts.map +0 -1
  100. package/dist/config/types.js +0 -6
  101. package/dist/config/types.js.map +0 -1
  102. package/dist/config/yaml/tools.yaml +0 -146
  103. package/dist/index.d.ts +0 -7
  104. package/dist/index.d.ts.map +0 -1
  105. package/dist/schemas/deep-research.d.ts +0 -64
  106. package/dist/schemas/deep-research.d.ts.map +0 -1
  107. package/dist/schemas/deep-research.js +0 -224
  108. package/dist/schemas/deep-research.js.map +0 -1
  109. package/dist/schemas/scrape-links.d.ts +0 -32
  110. package/dist/schemas/scrape-links.d.ts.map +0 -1
  111. package/dist/schemas/scrape-links.js +0 -34
  112. package/dist/schemas/scrape-links.js.map +0 -1
  113. package/dist/schemas/web-search.d.ts +0 -22
  114. package/dist/schemas/web-search.d.ts.map +0 -1
  115. package/dist/schemas/web-search.js +0 -21
  116. package/dist/schemas/web-search.js.map +0 -1
  117. package/dist/services/file-attachment.d.ts +0 -30
  118. package/dist/services/file-attachment.d.ts.map +0 -1
  119. package/dist/services/file-attachment.js +0 -207
  120. package/dist/services/file-attachment.js.map +0 -1
  121. package/dist/services/llm-processor.d.ts +0 -29
  122. package/dist/services/llm-processor.d.ts.map +0 -1
  123. package/dist/services/llm-processor.js +0 -244
  124. package/dist/services/llm-processor.js.map +0 -1
  125. package/dist/services/markdown-cleaner.d.ts +0 -8
  126. package/dist/services/markdown-cleaner.d.ts.map +0 -1
  127. package/dist/services/markdown-cleaner.js +0 -74
  128. package/dist/services/markdown-cleaner.js.map +0 -1
  129. package/dist/tools/definitions.d.ts +0 -16
  130. package/dist/tools/definitions.d.ts.map +0 -1
  131. package/dist/tools/definitions.js +0 -17
  132. package/dist/tools/definitions.js.map +0 -1
  133. package/dist/tools/reddit.d.ts +0 -14
  134. package/dist/tools/reddit.d.ts.map +0 -1
  135. package/dist/tools/reddit.js +0 -265
  136. package/dist/tools/reddit.js.map +0 -1
  137. package/dist/tools/registry.d.ts +0 -71
  138. package/dist/tools/registry.d.ts.map +0 -1
  139. package/dist/tools/registry.js +0 -252
  140. package/dist/tools/registry.js.map +0 -1
  141. package/dist/tools/research.d.ts +0 -14
  142. package/dist/tools/research.d.ts.map +0 -1
  143. package/dist/tools/research.js +0 -196
  144. package/dist/tools/research.js.map +0 -1
  145. package/dist/tools/scrape.d.ts +0 -14
  146. package/dist/tools/scrape.d.ts.map +0 -1
  147. package/dist/tools/scrape.js +0 -234
  148. package/dist/tools/scrape.js.map +0 -1
  149. package/dist/tools/search.d.ts +0 -10
  150. package/dist/tools/search.d.ts.map +0 -1
  151. package/dist/tools/search.js +0 -158
  152. package/dist/tools/search.js.map +0 -1
  153. package/dist/tools/utils.d.ts +0 -105
  154. package/dist/tools/utils.d.ts.map +0 -1
  155. package/dist/tools/utils.js +0 -159
  156. package/dist/tools/utils.js.map +0 -1
  157. package/dist/utils/concurrency.d.ts +0 -28
  158. package/dist/utils/concurrency.d.ts.map +0 -1
  159. package/dist/utils/concurrency.js +0 -92
  160. package/dist/utils/concurrency.js.map +0 -1
  161. package/dist/utils/errors.d.ts +0 -95
  162. package/dist/utils/errors.d.ts.map +0 -1
  163. package/dist/utils/errors.js +0 -390
  164. package/dist/utils/errors.js.map +0 -1
  165. package/dist/utils/logger.d.ts +0 -39
  166. package/dist/utils/logger.d.ts.map +0 -1
  167. package/dist/utils/logger.js +0 -57
  168. package/dist/utils/logger.js.map +0 -1
  169. package/dist/utils/markdown-formatter.d.ts +0 -5
  170. package/dist/utils/markdown-formatter.d.ts.map +0 -1
  171. package/dist/utils/markdown-formatter.js +0 -15
  172. package/dist/utils/markdown-formatter.js.map +0 -1
  173. package/dist/utils/response.d.ts +0 -93
  174. package/dist/utils/response.d.ts.map +0 -1
  175. package/dist/utils/response.js +0 -170
  176. package/dist/utils/response.js.map +0 -1
  177. package/dist/utils/retry.d.ts +0 -43
  178. package/dist/utils/retry.d.ts.map +0 -1
  179. package/dist/utils/retry.js +0 -57
  180. package/dist/utils/retry.js.map +0 -1
  181. package/dist/utils/url-aggregator.d.ts +0 -90
  182. package/dist/utils/url-aggregator.d.ts.map +0 -1
  183. package/dist/utils/url-aggregator.js +0 -538
  184. package/dist/utils/url-aggregator.js.map +0 -1
  185. package/dist/version.d.ts +0 -29
  186. package/dist/version.d.ts.map +0 -1
  187. package/dist/version.js +0 -55
  188. package/dist/version.js.map +0 -1
@@ -1,81 +0,0 @@
1
- /**
2
- * TypeScript interfaces for YAML tool configuration
3
- * Matches structure defined in yaml/tools.yaml
4
- */
5
- import type { Capabilities } from './index.js';
6
- /**
7
- * Validation rules for parameters
8
- */
9
- export interface YamlValidation {
10
- readonly minLength?: number;
11
- readonly maxLength?: number;
12
- readonly pattern?: string;
13
- readonly format?: 'uri' | 'email' | 'uuid';
14
- readonly min?: number;
15
- readonly max?: number;
16
- readonly int?: boolean;
17
- readonly positive?: boolean;
18
- readonly negative?: boolean;
19
- readonly minItems?: number;
20
- readonly maxItems?: number;
21
- readonly nonempty?: boolean;
22
- }
23
- /**
24
- * Parameter definition in YAML
25
- */
26
- export interface YamlParameter {
27
- readonly type: 'string' | 'number' | 'boolean' | 'array' | 'object';
28
- readonly required?: boolean;
29
- readonly default?: unknown;
30
- readonly description?: string;
31
- readonly validation?: YamlValidation;
32
- readonly items?: YamlParameter;
33
- readonly properties?: Record<string, YamlParameter>;
34
- }
35
- /**
36
- * Tool definition in YAML
37
- */
38
- export interface YamlToolConfig {
39
- readonly name: string;
40
- readonly category?: string;
41
- readonly capability?: keyof Capabilities;
42
- readonly description: string;
43
- readonly parameters?: Record<string, YamlParameter>;
44
- readonly useZodSchema?: boolean;
45
- readonly zodSchemaRef?: string;
46
- readonly schemaDescriptions?: Record<string, string>;
47
- readonly limits?: Record<string, string | number | boolean>;
48
- }
49
- /**
50
- * Root YAML configuration structure
51
- */
52
- export interface YamlConfig {
53
- readonly version: string;
54
- readonly metadata: {
55
- readonly name: string;
56
- readonly description: string;
57
- };
58
- readonly tools: readonly YamlToolConfig[];
59
- }
60
- /**
61
- * MCP Tool definition (matches SDK)
62
- */
63
- export interface McpTool {
64
- readonly name: string;
65
- readonly description: string;
66
- readonly inputSchema: {
67
- readonly type: 'object';
68
- readonly properties: Record<string, unknown>;
69
- readonly required?: string[];
70
- };
71
- }
72
- /**
73
- * Loaded tool with additional metadata
74
- */
75
- export interface LoadedTool extends McpTool {
76
- readonly category?: string;
77
- readonly capability?: keyof Capabilities;
78
- readonly useZodSchema?: boolean;
79
- readonly zodSchemaRef?: string;
80
- }
81
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAE7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,M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aces for YAML tool configuration
3
- * Matches structure defined in yaml/tools.yaml
4
- */
5
- export {};
6
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,146 +0,0 @@
1
- # Research Powerpack MCP - Tool Configuration
2
- # Optimized for LLM consumption - <1K tokens total
3
- version: "1.0"
4
-
5
- metadata:
6
- name: "mcp-research-powerpack"
7
- description: "Parallel research tools with AI extraction"
8
-
9
- # CORE PRINCIPLES (ALL TOOLS)
10
- shared:
11
- philosophy: "MAXIMIZE inputs for parallel processing - NO time penalty for more items! More diverse inputs = better coverage = higher quality. Each input MUST target DIFFERENT angle - NO overlap/duplicates. ALWAYS use sequentialthinking between tool calls."
12
-
13
- workflow: |
14
- MANDATORY: THINK → EXECUTE (max diversity) → THINK (evaluate: gaps? claims to verify? links to follow?) → CROSS-REFERENCE (Reddit claims → web search, web results → scrape) → ITERATE → SYNTHESIZE.
15
- NEVER stop after one tool call. Every search result has URLs to scrape. Every Reddit discussion has claims to verify. Every scraped page has links to follow.
16
-
17
- iteration_triggers: "Iterate when: Reddit comments mention specific tools/links (scrape them) | Research cites sources (verify them) | Community claims contradict each other (web search for truth) | Results mention concepts you didn't research | First pass is ALWAYS incomplete"
18
-
19
- tools:
20
- - name: search_reddit
21
- category: reddit
22
- capability: search
23
- limits: {min_queries: 3, max_queries: 50, recommended: 20}
24
-
25
- description: |
26
- MIN 3 queries, REC 20+ (3q=30 results, 20q=200 results). Each query MUST target DIFFERENT angle - NO overlap! Categories: 1) direct topic 2) recommendations (best/top) 3) specific tools/repos/names 4) comparisons (vs) 5) alternatives 6) subreddit targeting (r/macapps, r/opensource) 7) problems/issues/crashes 8) year-specific (2024/2025) 9) features 10) dev/GitHub. Operators: intitle:, "exact", OR, -exclude. Auto adds site:reddit.com.
27
-
28
- parameters:
29
- queries:
30
- type: array
31
- required: true
32
- items: {type: string}
33
- validation: {minItems: 3, maxItems: 50}
34
- description: "3-50 diverse queries. Each targets different angle: direct|best|tools|vs|alternative|r/sub|issues|2024|features|GitHub. NO overlap."
35
- date_after:
36
- type: string
37
- required: false
38
- description: "Filter after date (YYYY-MM-DD)"
39
-
40
-
41
- - name: get_reddit_post
42
- category: reddit
43
- capability: reddit
44
- limits:
45
- min_urls: 2
46
- max_urls: 50
47
- recommended: 20
48
- default_max_comments: 1000
49
- extraction_suffix: "Extract key insights: consensus, recommendations with reasoning, contrasting views, real experiences, technical details. Be comprehensive + concise, prioritize actionable info."
50
-
51
- description: |
52
- MIN 2 URLs, REC 10-20+. Auto comment budget: 1000 total (2 posts=500 each deep, 10=100 balanced, 20=50 broad coverage). Comments have BEST insights - always fetch_comments=true unless only need titles. DO NOT use use_llm — default is false. Users need raw exact comments to read verbatim (quotes, code snippets, specific recommendations). LLM summarization loses critical detail and nuance from discussions. Only set use_llm=true if explicitly asked to synthesize across 20+ posts. Mix subreddits for diverse perspectives. Using 2-5 posts = narrow. 20-30 posts = comprehensive.
53
-
54
- parameters:
55
- urls:
56
- type: array
57
- required: true
58
- items: {type: string}
59
- validation: {minItems: 2, maxItems: 50}
60
- description: "2-50 Reddit URLs. More = broader consensus. Get from search_reddit."
61
- fetch_comments:
62
- type: boolean
63
- required: false
64
- default: true
65
- description: "Fetch comments (true recommended - best insights in comments)"
66
- max_comments:
67
- type: number
68
- required: false
69
- default: 100
70
- description: "Override auto allocation. Leave empty for smart allocation."
71
- use_llm:
72
- type: boolean
73
- required: false
74
- default: false
75
- description: "Default false — DO NOT enable unless user explicitly requests synthesis. Raw comments preserve exact quotes, code snippets, nuanced opinions, and specific recommendations that LLM summarization loses. Only consider use_llm=true when processing 20+ posts and user explicitly wants a synthesized overview rather than reading individual comments."
76
- what_to_extract:
77
- type: string
78
- required: false
79
- description: "Only used when use_llm=true. Extraction instructions for AI synthesis. Be specific: 'Extract recommendations for X with pros/cons'."
80
-
81
-
82
- - name: deep_research
83
- category: research
84
- capability: deepResearch
85
- useZodSchema: true
86
- zodSchemaRef: "deepResearchParamsSchema"
87
- limits:
88
- min_questions: 1
89
- max_questions: 10
90
- recommended: 5
91
- min_length: 200
92
- min_specific: 2
93
- research_suffix: "CONSTRAINTS: No restating the question. No hedging preambles. Cite sources inline [source]. NEVER hallucinate — only report what sources confirm."
94
-
95
- description: |
96
- MIN 2, REC 5-10 questions parallel. 32K tokens distributed (2q=16K/each deep, 5q=6.4K balanced, 10q=3.2K comprehensive). A compression suffix auto-appended to each question (anti-hallucination, cite-inline, no filler). Output uses tables for comparisons/structured data, tight bullets for explanations. MANDATORY template per question:
97
- "🎯 WHAT I NEED: [clear goal]
98
- 🤔 WHY: [decision/problem]
99
- 📚 WHAT I KNOW: [current understanding - so research fills gaps not basics]
100
- 🔧 HOW I'LL USE: [implementation/debugging/architecture]
101
- ❓ SPECIFIC QUESTIONS: 1) [q1] 2) [q2] 3) [q3]
102
- 🌐 PRIORITY SOURCES: [optional - docs/sites]
103
- ⚡ FOCUS: [optional - performance/security]"
104
- ATTACH FILES for code Qs (bugs/perf/refactor/review/architecture) - MANDATORY or research is generic/unhelpful. Using 1-2 Qs wastes parallel capacity. First pass incomplete - iterate based on findings.
105
-
106
- schemaDescriptions:
107
- questions: "2-10 structured questions following template above. Each MUST cover different angle of topic. Attach files for ANY code-related Q (bugs/errors/perf/refactoring/review/architecture) - without code context, research is generic/useless."
108
- file_attachments: "MANDATORY for code Qs: bugs→failing code, perf→slow code, refactor→current implementation, review→code to review, architecture→relevant modules. Format: {path: '/absolute/path', description: 'What file is, why relevant, focus areas, known issues', start_line?, end_line?}. Thorough description critical."
109
-
110
-
111
- - name: scrape_links
112
- category: scrape
113
- capability: scraping
114
- useZodSchema: true
115
- zodSchemaRef: "scrapeLinksParamsSchema"
116
- limits:
117
- min_urls: 1
118
- max_urls: 50
119
- recommended: 5
120
- min_extract_len: 50
121
- min_targets: 3
122
- extraction_prefix: "Extract ONLY from document — never hallucinate. For structured data (pricing, specs, features) → markdown table. Otherwise → tight bullet points. No intro, no confirmation message, no meta-commentary."
123
- extraction_suffix: "Output grounded info only. First line = content, not preamble."
124
-
125
- description: |
126
- REC 3-5 URLs. use_llm=true BY DEFAULT — AI extraction auto-filters nav/ads/footers, returns clean structured content. A compression prefix+suffix wraps your prompt automatically for max info density. 32K tokens (3=10K each, 5=6K, 10=3K, 50=640). PROMPT FORMULA — keep it tight, no verbosity: "Extract [t1] | [t2] | [t3] | [t4] | [t5] with focus on [a1], [a2], [a3]". Min 3 targets with | separator. Be specific (pricing tiers not pricing). Aim 5-10 targets. BAD: "Please extract all information about pricing and features from this page" → GOOD: "pricing tiers|limits|features|integrations|API auth|rate limits with focus on free tier, enterprise pricing". Templates: Product (pricing|features|reviews|specs|integrations|support), Tech Docs (endpoints|auth|limits|errors|examples|schemas), Competitive (features|pricing|customers|USPs|stack|testimonials). Set use_llm=false ONLY for raw HTML debugging.
127
-
128
- schemaDescriptions:
129
- urls: "1-50 URLs (3-5 recommended). More URLs = broader coverage, fewer tokens/URL."
130
- timeout: "Timeout per URL (5-120s, default 30)"
131
- use_llm: "Defaults to true. AI extraction auto-filters noise, extracts only specified targets, returns clean structured content. Compression prefix+suffix auto-applied to maximize info density. Cost: ~$0.001/page. Set false ONLY for raw HTML debugging. Needs OPENROUTER_API_KEY."
132
- what_to_extract: "Your extraction targets — auto-wrapped with compression prefix+suffix. Formula: 'pricing tiers|limits|features|integrations|API auth with focus on free tier, enterprise'. Min 3 targets with | separator. Be terse and specific (pricing tiers not pricing, API rate limits not API info). No verbose sentences — just targets+focus. The system adds compression instructions automatically."
133
-
134
-
135
- - name: web_search
136
- category: search
137
- capability: search
138
- useZodSchema: true
139
- zodSchemaRef: "webSearchParamsSchema"
140
- limits: {min_keywords: 3, max_keywords: 100, recommended: 7}
141
-
142
- description: |
143
- MIN 3, REC 5-7 keywords parallel Google search. 10 results/keyword (3=30 results, 7=70, 100=1000). Each keyword = separate search - MUST be diverse angles! 7 perspectives: 1) broad [topic] 2) specific/technical [topic]+[term] 3) problems [topic] issues/debugging 4) best practices [topic] 2024/2025 5) comparison [A] vs [B] OR 6) tutorial/guide 7) advanced patterns/architecture. Operators: site:domain.com (target GitHub/StackOverflow/docs), "exact phrase", -exclude, filetype:pdf, OR. Examples: "PostgreSQL" site:github.com stars:>1000, "Docker OOM" site:stackoverflow.com. CRITICAL: Search only gives URLs - MUST follow with scrape_links to get actual content! Workflow: search → think → scrape_links (MANDATORY) → think → iterate → synthesize. Using 1-2 keywords wastes parallel power.
144
-
145
- schemaDescriptions:
146
- keywords: "3-100 diverse keywords (5-7 rec). Each separate Google search parallel. 7 angles: broad | technical | problems | best practices+year | vs/OR | tutorial | patterns. Operators: site:, \"exact\", -exclude, filetype:, OR."
package/dist/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Research Powerpack MCP Server
4
- * Implements robust error handling - server NEVER crashes on tool failures
5
- */
6
- export {};
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG"}
@@ -1,64 +0,0 @@
1
- /**
2
- * Deep research schema - batch research with dynamic token allocation
3
- * Enhanced with comprehensive prompting for bugs, programming questions, and general research
4
- */
5
- import { z } from 'zod';
6
- export declare const deepResearchParamsSchema: z.ZodObject<{
7
- questions: z.ZodArray<z.ZodObject<{
8
- question: z.ZodString;
9
- file_attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
10
- path: z.ZodString;
11
- start_line: z.ZodOptional<z.ZodNumber>;
12
- end_line: z.ZodOptional<z.ZodNumber>;
13
- description: z.ZodOptional<z.ZodString>;
14
- }, "strip", z.ZodTypeAny, {
15
- path: string;
16
- start_line?: number | undefined;
17
- end_line?: number | undefined;
18
- description?: string | undefined;
19
- }, {
20
- path: string;
21
- start_line?: number | undefined;
22
- end_line?: number | undefined;
23
- description?: string | undefined;
24
- }>, "many">>;
25
- }, "strip", z.ZodTypeAny, {
26
- question: string;
27
- file_attachments?: {
28
- path: string;
29
- start_line?: number | undefined;
30
- end_line?: number | undefined;
31
- description?: string | undefined;
32
- }[] | undefined;
33
- }, {
34
- question: string;
35
- file_attachments?: {
36
- path: string;
37
- start_line?: number | undefined;
38
- end_line?: number | undefined;
39
- description?: string | undefined;
40
- }[] | undefined;
41
- }>, "many">;
42
- }, "strip", z.ZodTypeAny, {
43
- questions: {
44
- question: string;
45
- file_attachments?: {
46
- path: string;
47
- start_line?: number | undefined;
48
- end_line?: number | undefined;
49
- description?: string | undefined;
50
- }[] | undefined;
51
- }[];
52
- }, {
53
- questions: {
54
- question: string;
55
- file_attachments?: {
56
- path: string;
57
- start_line?: number | undefined;
58
- end_line?: number | undefined;
59
- description?: string | undefined;
60
- }[] | undefined;
61
- }[];
62
- }>;
63
- export type DeepResearchParams = z.infer<typeof deepResearchParamsSchema>;
64
- //# sourceMappingURL=deep-research.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deep-research.d.ts","sourceRoot":"","sources":["../../src/schemas/deep-research.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4OxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -1,224 +0,0 @@
1
- /**
2
- * Deep research schema - batch research with dynamic token allocation
3
- * Enhanced with comprehensive prompting for bugs, programming questions, and general research
4
- */
5
- import { z } from 'zod';
6
- // File attachment schema with comprehensive descriptions to guide LLM usage
7
- const fileAttachmentSchema = z.object({
8
- path: z
9
- .string({ required_error: 'deep_research: File path is required' })
10
- .min(1, { message: 'deep_research: File path cannot be empty' })
11
- .describe(`**[REQUIRED] Absolute file path to attach.**
12
-
13
- ⚠️ **YOU MUST USE ABSOLUTE PATHS** - e.g., "/Users/john/project/src/utils/auth.ts" NOT "src/utils/auth.ts"
14
-
15
- The file will be read from the filesystem and included as context for the research question. This is CRITICAL for:
16
- - Bug investigations (attach the failing code)
17
- - Code reviews (attach the code to review)
18
- - Refactoring questions (attach current implementation)
19
- - Architecture decisions (attach relevant modules)
20
- - Performance issues (attach the slow code path)
21
-
22
- **IMPORTANT:** Always use the full absolute path as shown in your IDE or terminal.`),
23
- start_line: z
24
- .number({ invalid_type_error: 'deep_research: start_line must be a number' })
25
- .int({ message: 'deep_research: start_line must be an integer' })
26
- .positive({ message: 'deep_research: start_line must be a positive integer (1-indexed)' })
27
- .optional()
28
- .describe(`**[OPTIONAL] Start line number (1-indexed).**
29
-
30
- Use this to focus on a specific section of a large file. If omitted, reads from line 1.
31
- Example: start_line=50 with end_line=100 reads lines 50-100 only.`),
32
- end_line: z
33
- .number({ invalid_type_error: 'deep_research: end_line must be a number' })
34
- .int({ message: 'deep_research: end_line must be an integer' })
35
- .positive({ message: 'deep_research: end_line must be a positive integer (1-indexed)' })
36
- .optional()
37
- .describe(`**[OPTIONAL] End line number (1-indexed).**
38
-
39
- Use this to limit the scope to relevant code sections. If omitted, reads to end of file.
40
- For large files (>500 lines), consider specifying a range to focus the research.`),
41
- description: z
42
- .string()
43
- .optional()
44
- .describe(`**[HIGHLY RECOMMENDED] Comprehensive description of why this file is attached and what to focus on.**
45
-
46
- ⚠️ **THIS IS CRITICAL FOR EFFECTIVE RESEARCH.** Write a detailed description explaining:
47
-
48
- 1. **What this file is:** "This is the main authentication middleware that handles JWT validation"
49
- 2. **Why it's relevant:** "The bug occurs when tokens expire during long-running requests"
50
- 3. **What to focus on:** "Pay attention to the refreshToken() function on lines 45-80"
51
- 4. **Known issues/context:** "We suspect the race condition happens in the async validation"
52
- 5. **Related files:** "This interacts with /src/services/token-service.ts for token refresh"
53
-
54
- **GOOD EXAMPLE:**
55
- "This is our Redis caching layer (cache-service.ts). The bug manifests as stale data being returned after cache invalidation. Focus on the invalidatePattern() method (lines 120-150) and how it interacts with the pub/sub mechanism. We're using Redis Cluster and suspect the issue is related to cross-node invalidation timing."
56
-
57
- **BAD EXAMPLE:**
58
- "cache file" ← Too vague, research will be unfocused`),
59
- });
60
- // Research question schema with structured template guidance
61
- const researchQuestionSchema = z.object({
62
- question: z
63
- .string({ required_error: 'deep_research: Question is required' })
64
- .min(10, { message: 'deep_research: Question must be at least 10 characters' })
65
- .describe(`**[REQUIRED] Your research question - MUST follow this structured template:**
66
-
67
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
68
- 📋 **STRUCTURED QUESTION TEMPLATE** (You MUST use this format)
69
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
70
-
71
- **1. 🎯 WHAT I NEED:**
72
- [Clearly state what you're trying to achieve, solve, or understand]
73
-
74
- **2. 🤔 WHY I'M RESEARCHING THIS:**
75
- [Explain the context - what decision does this inform? What problem are you solving?]
76
-
77
- **3. 📚 WHAT I ALREADY KNOW:**
78
- [Share your current understanding so research fills gaps, not repeats basics]
79
-
80
- **4. 🔧 HOW I PLAN TO USE THIS:**
81
- [Describe the practical application - implementation, debugging, architecture, etc.]
82
-
83
- **5. ❓ SPECIFIC QUESTIONS (2-5):**
84
- - Question 1: [Specific, pointed question]
85
- - Question 2: [Another specific question]
86
- - Question 3: [etc.]
87
-
88
- **6. 🌐 PRIORITY SOURCES (optional):**
89
- [Sites/docs to prioritize: "Prefer official React docs, GitHub issues, Stack Overflow"]
90
-
91
- **7. ⚡ PRIORITY INFO (optional):**
92
- [What matters most: "Focus on performance implications" or "Prioritize security best practices"]
93
-
94
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
95
-
96
- **EXAMPLE FOR BUG INVESTIGATION:**
97
- "🎯 WHAT I NEED: Debug why our WebSocket connections drop after exactly 60 seconds of inactivity.
98
-
99
- 🤔 WHY: Production users are losing real-time updates, causing data sync issues and support tickets.
100
-
101
- 📚 WHAT I KNOW: We use Socket.io v4.6 with Redis adapter. The 60s timeout suggests a proxy/load balancer issue, but we've checked nginx configs.
102
-
103
- 🔧 HOW I'LL USE THIS: Implement the fix in our connection-manager.ts (attached) and update our deployment configs.
104
-
105
- ❓ SPECIFIC QUESTIONS:
106
- 1. What are common causes of exactly 60-second WebSocket timeouts?
107
- 2. How should Socket.io heartbeat/ping intervals be configured to prevent this?
108
- 3. Are there AWS ALB-specific settings we need to consider?
109
- 4. How do other production apps handle WebSocket keep-alive?
110
-
111
- 🌐 PRIORITY: Socket.io official docs, AWS documentation, GitHub issues with similar problems
112
-
113
- ⚡ FOCUS: Production-ready solutions, not development workarounds"
114
-
115
- **EXAMPLE FOR ARCHITECTURE RESEARCH:**
116
- "🎯 WHAT I NEED: Best practices for implementing CQRS pattern with Event Sourcing in Node.js/TypeScript.
117
-
118
- 🤔 WHY: Our monolithic API is hitting scaling limits. We need to separate read/write paths for our order processing system.
119
-
120
- 📚 WHAT I KNOW: Familiar with basic event-driven architecture, used RabbitMQ before. New to full CQRS/ES implementation.
121
-
122
- 🔧 HOW I'LL USE THIS: Design the new order-service architecture, select appropriate libraries, plan migration strategy.
123
-
124
- ❓ SPECIFIC QUESTIONS:
125
- 1. What are the recommended Node.js libraries for CQRS/ES? (Pros/cons of each)
126
- 2. How should we handle eventual consistency in read models?
127
- 3. What's the best event store for our scale (~10k events/day)?
128
- 4. How do we handle schema evolution for events over time?
129
- 5. What are common pitfalls teams encounter when adopting CQRS/ES?
130
-
131
- 🌐 PRIORITY: Microsoft docs (they coined CQRS), Martin Fowler, real-world case studies
132
-
133
- ⚡ FOCUS: Production patterns, not theoretical explanations. Include code examples."`),
134
- file_attachments: z
135
- .array(fileAttachmentSchema)
136
- .optional()
137
- .describe(`**[CRITICAL FOR BUGS/CODE QUESTIONS] File attachments to include as research context.**
138
-
139
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
140
- ⚠️ **YOU MUST ATTACH FILES WHEN:**
141
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
142
-
143
- ✅ **MANDATORY file attachment scenarios:**
144
- - 🐛 **Bug investigation** → Attach the buggy code file(s)
145
- - 🔍 **Code review** → Attach the code to be reviewed
146
- - ♻️ **Refactoring** → Attach current implementation
147
- - 🏗️ **Architecture questions about YOUR code** → Attach relevant modules
148
- - ⚡ **Performance issues** → Attach the slow code paths
149
- - 🔒 **Security review** → Attach the security-sensitive code
150
- - 🧪 **Testing questions** → Attach both the code AND test files
151
- - 🔗 **Integration issues** → Attach files from both sides of the integration
152
-
153
- ❌ **File attachments NOT needed for:**
154
- - General concept questions ("What is CQRS?")
155
- - Technology comparisons ("React vs Vue")
156
- - Best practices research (unless about your specific code)
157
- - Documentation lookups
158
-
159
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
160
- 📎 **HOW TO ATTACH FILES:**
161
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
162
-
163
- **Each attachment requires:**
164
- 1. \`path\` (REQUIRED): **Absolute path** like "/Users/dev/project/src/auth.ts"
165
- 2. \`start_line\` (optional): Focus on specific section
166
- 3. \`end_line\` (optional): Limit scope for large files
167
- 4. \`description\` (HIGHLY RECOMMENDED): Explain what this file is and why it matters
168
-
169
- **EXAMPLE - Bug with multiple related files:**
170
- \`\`\`json
171
- {
172
- "question": "🎯 WHAT I NEED: Fix the race condition in our order processing...",
173
- "file_attachments": [
174
- {
175
- "path": "/Users/dev/ecommerce/src/services/order-processor.ts",
176
- "description": "Main order processing service. The race condition occurs in processOrder() when two requests hit simultaneously. Lines 45-120 contain the critical section."
177
- },
178
- {
179
- "path": "/Users/dev/ecommerce/src/repositories/inventory-repo.ts",
180
- "start_line": 30,
181
- "end_line": 80,
182
- "description": "Inventory repository - the decrementStock() method (lines 30-80) is called by order-processor and we suspect it's not properly locked."
183
- },
184
- {
185
- "path": "/Users/dev/ecommerce/src/utils/db-transaction.ts",
186
- "description": "Our transaction wrapper utility. Need to verify if it properly handles concurrent transactions."
187
- }
188
- ]
189
- }
190
- \`\`\`
191
-
192
- **Attach as many files as needed for complete context - there is no limit!**`),
193
- });
194
- // Shape object for external consumers who need individual field schemas
195
- const deepResearchParamsShape = {
196
- questions: z
197
- .array(researchQuestionSchema, {
198
- required_error: 'deep_research: Questions array is required',
199
- invalid_type_error: 'deep_research: Questions must be an array'
200
- })
201
- .min(1, { message: 'deep_research: At least 1 question is required (recommend 2-7 for optimal depth)' })
202
- .max(10, { message: 'deep_research: Maximum 10 questions allowed per batch' })
203
- .describe(`**Batch deep research (2-10 questions) with dynamic token allocation.**
204
-
205
- **TOKEN BUDGET:** 32,000 tokens distributed across all questions:
206
- - 2 questions: 16,000 tokens/question (deep dive)
207
- - 5 questions: 6,400 tokens/question (balanced)
208
- - 10 questions: 3,200 tokens/question (rapid multi-topic)
209
-
210
- **WHEN TO USE:**
211
- - Need multi-perspective analysis on related topics
212
- - Researching a domain from multiple angles
213
- - Validating understanding across different aspects
214
- - Comparing approaches/technologies side-by-side
215
-
216
- **EACH QUESTION SHOULD INCLUDE:**
217
- - Topic & context (what decision it informs)
218
- - Your current understanding (to fill gaps)
219
- - Specific sub-questions (2-5 per topic)
220
-
221
- **USE:** Maximize question count for comprehensive coverage. All questions run in parallel. Group related questions for coherent research.`),
222
- };
223
- export const deepResearchParamsSchema = z.object(deepResearchParamsShape);
224
- //# sourceMappingURL=deep-research.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deep-research.js","source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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oFAoE8E,CAC/E;IACH,gBAAgB,EAAE,CAAC;SAChB,KAAK,CAAC,oBAAoB,CAAC;SAC3B,QAAQ,EAAE;SACV,QAAQ,CACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAuDuE,CACxE;CACJ,CAAC,CAAC;AAEH,wEAAwE;AACxE,MAAM,uBAAuB,GAAG;IAC9B,SAAS,EAAE,CAAC;SACT,KAAK,CAAC,sBAAsB,EAAE;QAC7B,cAAc,EAAE,4CAA4C;QAC5D,kBAAkB,EAAE,2CAA2C;KAChE,CAAC;SACD,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,kFAAkF,EAAE,CAAC;SACvG,GAAG,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,uDAAuD,EAAE,CAAC;SAC7E,QAAQ,CACP;;;;;;;;;;;;;;;;;;2IAkBqI,CACtI;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC"}
@@ -1,32 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const scrapeLinksParamsSchema: z.ZodObject<{
3
- urls: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
4
- timeout: z.ZodDefault<z.ZodNumber>;
5
- use_llm: z.ZodDefault<z.ZodBoolean>;
6
- what_to_extract: z.ZodOptional<z.ZodString>;
7
- }, "strip", z.ZodTypeAny, {
8
- urls: string[];
9
- timeout: number;
10
- use_llm: boolean;
11
- what_to_extract?: string | undefined;
12
- }, {
13
- urls: string[];
14
- timeout?: number | undefined;
15
- use_llm?: boolean | undefined;
16
- what_to_extract?: string | undefined;
17
- }>;
18
- export type ScrapeLinksParams = z.infer<typeof scrapeLinksParamsSchema>;
19
- export interface ScrapeLinksOutput {
20
- readonly content: string;
21
- readonly metadata: {
22
- readonly total_urls: number;
23
- readonly successful: number;
24
- readonly failed: number;
25
- readonly total_credits: number;
26
- readonly execution_time_ms: number;
27
- readonly tokens_per_url?: number;
28
- readonly total_token_budget?: number;
29
- readonly batches_processed?: number;
30
- };
31
- }
32
- //# sourceMappingURL=scrape-links.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scrape-links.d.ts","sourceRoot":"","sources":["../../src/schemas/scrape-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsCxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAAmC,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAGxE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAC/B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;QACnC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QACjC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QACrC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;KACrC,CAAC;CACH"}
@@ -1,34 +0,0 @@
1
- import { z } from 'zod';
2
- // URL schema with protocol validation
3
- const urlSchema = z
4
- .string({ required_error: 'scrape_links: URL is required' })
5
- .url({ message: 'scrape_links: Invalid URL format' })
6
- .refine(url => url.startsWith('http://') || url.startsWith('https://'), { message: 'scrape_links: URL must use http:// or https:// protocol' });
7
- // Input schema for scrape_links tool
8
- const scrapeLinksParamsShape = {
9
- urls: z
10
- .array(urlSchema, {
11
- required_error: 'scrape_links: URLs array is required',
12
- invalid_type_error: 'scrape_links: URLs must be an array'
13
- })
14
- .min(1, { message: 'scrape_links: At least 1 URL is required' })
15
- .max(50, { message: 'scrape_links: Maximum 50 URLs allowed per request' })
16
- .describe('URLs to scrape (1-50). Recommend 3-5 URLs for balanced depth/breadth. More URLs = broader coverage but fewer tokens per URL. 3 URLs: ~10K tokens each (deep); 10 URLs: ~3K tokens each (balanced); 50 URLs: ~640 tokens each (scan).'),
17
- timeout: z
18
- .number({ invalid_type_error: 'scrape_links: Timeout must be a number' })
19
- .min(5, { message: 'scrape_links: Timeout must be at least 5 seconds' })
20
- .max(120, { message: 'scrape_links: Timeout cannot exceed 120 seconds' })
21
- .default(30)
22
- .describe('Timeout in seconds for each URL'),
23
- use_llm: z
24
- .boolean({ invalid_type_error: 'scrape_links: use_llm must be a boolean' })
25
- .default(true)
26
- .describe('AI extraction enabled by default (requires OPENROUTER_API_KEY). Auto-filters nav/ads/footers, extracts ONLY what you specify. Set false only for raw HTML debugging.'),
27
- what_to_extract: z
28
- .string()
29
- .max(1000, { message: 'scrape_links: Extraction instructions too long (max 1000 characters)' })
30
- .optional()
31
- .describe('Extraction instructions for AI. Will be wrapped with compression prefix+suffix automatically. Formula: "Extract [target1] | [target2] | [target3] with focus on [aspect1], [aspect2]". Min 3 targets with | separator. Be specific (pricing tiers not pricing). Aim 5-10 targets.'),
32
- };
33
- export const scrapeLinksParamsSchema = z.object(scrapeLinksParamsShape);
34
- //# sourceMappingURL=scrape-links.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scrape-links.js","sourceRoot":"","sources":["../../src/schemas/scrape-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sCAAsC;AACtC,MAAM,SAAS,GAAG,CAAC;KAChB,MAAM,CAAC,EAAE,cAAc,EAAE,+BAA+B,EAAE,CAAC;KAC3D,GAAG,CAAC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