keywordgraph-mcp-server 1.7.0 → 1.7.4
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/README.md +52 -20
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +8 -2
- package/dist/api/client.js.map +1 -1
- package/dist/api/config-store.d.ts +2 -0
- package/dist/api/config-store.d.ts.map +1 -1
- package/dist/api/config-store.js +7 -0
- package/dist/api/config-store.js.map +1 -1
- package/dist/auth/oauth-provider.d.ts +3 -2
- package/dist/auth/oauth-provider.d.ts.map +1 -1
- package/dist/auth/oauth-provider.js +83 -28
- package/dist/auth/oauth-provider.js.map +1 -1
- package/dist/http-server.js +3 -1
- package/dist/http-server.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -11
- package/dist/index.js.map +1 -1
- package/dist/instructions.js +2 -2
- package/dist/resources/about.d.ts.map +1 -1
- package/dist/resources/about.js +15 -14
- package/dist/resources/about.js.map +1 -1
- package/dist/schemas/index.d.ts +452 -15
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +190 -32
- package/dist/schemas/index.js.map +1 -1
- package/dist/tools/addMemory.d.ts +4 -2
- package/dist/tools/addMemory.d.ts.map +1 -1
- package/dist/tools/addMemory.js +15 -1
- package/dist/tools/addMemory.js.map +1 -1
- package/dist/tools/analyzeExistingGraph.d.ts +1 -0
- package/dist/tools/analyzeExistingGraph.d.ts.map +1 -1
- package/dist/tools/analyzeExistingGraph.js +13 -4
- package/dist/tools/analyzeExistingGraph.js.map +1 -1
- package/dist/tools/analyzeText.d.ts +5 -0
- package/dist/tools/analyzeText.d.ts.map +1 -1
- package/dist/tools/analyzeText.js +18 -21
- package/dist/tools/analyzeText.js.map +1 -1
- package/dist/tools/createKnowledgeGraph.d.ts +6 -0
- package/dist/tools/createKnowledgeGraph.d.ts.map +1 -1
- package/dist/tools/createKnowledgeGraph.js +25 -22
- package/dist/tools/createKnowledgeGraph.js.map +1 -1
- package/dist/tools/developConceptualBridges.d.ts +3 -0
- package/dist/tools/developConceptualBridges.d.ts.map +1 -1
- package/dist/tools/developConceptualBridges.js +5 -17
- package/dist/tools/developConceptualBridges.js.map +1 -1
- package/dist/tools/developLatentTopics.d.ts +3 -0
- package/dist/tools/developLatentTopics.d.ts.map +1 -1
- package/dist/tools/developLatentTopics.js +5 -17
- package/dist/tools/developLatentTopics.js.map +1 -1
- package/dist/tools/developTextTool.d.ts +3 -0
- package/dist/tools/developTextTool.d.ts.map +1 -1
- package/dist/tools/developTextTool.js +9 -19
- package/dist/tools/developTextTool.js.map +1 -1
- package/dist/tools/generateContentGaps.d.ts +3 -0
- package/dist/tools/generateContentGaps.d.ts.map +1 -1
- package/dist/tools/generateContentGaps.js +5 -17
- package/dist/tools/generateContentGaps.js.map +1 -1
- package/dist/tools/generateContextualHint.d.ts +3 -0
- package/dist/tools/generateContextualHint.d.ts.map +1 -1
- package/dist/tools/generateContextualHint.js +5 -17
- package/dist/tools/generateContextualHint.js.map +1 -1
- package/dist/tools/generateDifferenceGraphFromTexts.d.ts +15 -3
- package/dist/tools/generateDifferenceGraphFromTexts.d.ts.map +1 -1
- package/dist/tools/generateDifferenceGraphFromTexts.js +9 -30
- package/dist/tools/generateDifferenceGraphFromTexts.js.map +1 -1
- package/dist/tools/generateKnowledgeGraph.d.ts +6 -0
- package/dist/tools/generateKnowledgeGraph.d.ts.map +1 -1
- package/dist/tools/generateKnowledgeGraph.js +19 -22
- package/dist/tools/generateKnowledgeGraph.js.map +1 -1
- package/dist/tools/generateMergedGraphFromTexts.d.ts +15 -3
- package/dist/tools/generateMergedGraphFromTexts.d.ts.map +1 -1
- package/dist/tools/generateMergedGraphFromTexts.js +9 -30
- package/dist/tools/generateMergedGraphFromTexts.js.map +1 -1
- package/dist/tools/generateOntologyGraph.d.ts +2 -0
- package/dist/tools/generateOntologyGraph.d.ts.map +1 -1
- package/dist/tools/generateOntologyGraph.js +9 -2
- package/dist/tools/generateOntologyGraph.js.map +1 -1
- package/dist/tools/generateOverlapGraphFromTexts.d.ts +15 -3
- package/dist/tools/generateOverlapGraphFromTexts.d.ts.map +1 -1
- package/dist/tools/generateOverlapGraphFromTexts.js +9 -30
- package/dist/tools/generateOverlapGraphFromTexts.js.map +1 -1
- package/dist/tools/generateResearchIdeas.d.ts +3 -0
- package/dist/tools/generateResearchIdeas.d.ts.map +1 -1
- package/dist/tools/generateResearchIdeas.js +5 -17
- package/dist/tools/generateResearchIdeas.js.map +1 -1
- package/dist/tools/generateResearchQuestions.d.ts +3 -0
- package/dist/tools/generateResearchQuestions.d.ts.map +1 -1
- package/dist/tools/generateResearchQuestions.js +5 -17
- package/dist/tools/generateResearchQuestions.js.map +1 -1
- package/dist/tools/generateResponses.d.ts +3 -0
- package/dist/tools/generateResponses.d.ts.map +1 -1
- package/dist/tools/generateResponses.js +5 -17
- package/dist/tools/generateResponses.js.map +1 -1
- package/dist/tools/generateSEOGraphTool.d.ts +2 -0
- package/dist/tools/generateSEOGraphTool.d.ts.map +1 -1
- package/dist/tools/generateSEOGraphTool.js +47 -9
- package/dist/tools/generateSEOGraphTool.js.map +1 -1
- package/dist/tools/generateTopicalClusters.d.ts +3 -0
- package/dist/tools/generateTopicalClusters.d.ts.map +1 -1
- package/dist/tools/generateTopicalClusters.js +5 -17
- package/dist/tools/generateTopicalClusters.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/optimizeReasoning.d.ts +34 -0
- package/dist/tools/optimizeReasoning.d.ts.map +1 -0
- package/dist/tools/optimizeReasoning.js +84 -0
- package/dist/tools/optimizeReasoning.js.map +1 -0
- package/dist/tools/optimizeTextStructure.d.ts +3 -0
- package/dist/tools/optimizeTextStructure.d.ts.map +1 -1
- package/dist/tools/optimizeTextStructure.js +7 -19
- package/dist/tools/optimizeTextStructure.js.map +1 -1
- package/dist/utils/graphInput.d.ts +72 -0
- package/dist/utils/graphInput.d.ts.map +1 -0
- package/dist/utils/graphInput.js +167 -0
- package/dist/utils/graphInput.js.map +1 -0
- package/dist/utils/wikilinksMode.d.ts +65 -0
- package/dist/utils/wikilinksMode.d.ts.map +1 -0
- package/dist/utils/wikilinksMode.js +188 -0
- package/dist/utils/wikilinksMode.js.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,14 +2,15 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
3
|
import { configSchema, serverInfo } from "./config/index.js";
|
|
4
4
|
import { brand, brandApiKey, brandApiBase, isToolEnabled, } from "./config/brand.js";
|
|
5
|
-
import { generateKnowledgeGraphTool, createKnowledgeGraphTool, generateOntologyGraphTool, analyzeLlmResultsTool, addMemoryTool, getMemoryTool, analyzeExistingGraphTool, analyzeTextTool, generateContentGapsTool, generateTopicalClustersTool, generateResearchQuestionsTool, generateResearchIdeasTool, generateResponsesFromGraphTool, generateContextualHintTool, retrieveContextForPromptFromGraphTool, developConceptualBridgesTool, developLatentTopicsTool, optimizeTextStructureTool, listGraphsTool, searchExistingGraphsTool, searchExistingGraphsFetchTool, generateOverlapGraphFromTextsTool, generateMergedGraphFromTextsTool, generateDifferenceGraphFromTextsTool, generateGoogleSearchResultsGraphTool, generateYoutubeSearchResultsGraphTool, generateGoogleSearchQueriesGraphTool, generateGoogleResultsVsQueriesGraphTool, generateSEOGraphTool, developTextTool, } from "./tools/index.js";
|
|
5
|
+
import { generateKnowledgeGraphTool, createKnowledgeGraphTool, generateOntologyGraphTool, analyzeLlmResultsTool, addMemoryTool, getMemoryTool, analyzeExistingGraphTool, analyzeTextTool, generateContentGapsTool, generateTopicalClustersTool, generateResearchQuestionsTool, generateResearchIdeasTool, generateResponsesFromGraphTool, generateContextualHintTool, retrieveContextForPromptFromGraphTool, developConceptualBridgesTool, developLatentTopicsTool, optimizeTextStructureTool, optimizeReasoningTool, listGraphsTool, searchExistingGraphsTool, searchExistingGraphsFetchTool, generateOverlapGraphFromTextsTool, generateMergedGraphFromTextsTool, generateDifferenceGraphFromTextsTool, generateGoogleSearchResultsGraphTool, generateYoutubeSearchResultsGraphTool, generateGoogleSearchQueriesGraphTool, generateGoogleResultsVsQueriesGraphTool, generateSEOGraphTool, developTextTool, } from "./tools/index.js";
|
|
6
6
|
import { aboutResource } from "./resources/about.js";
|
|
7
7
|
import { llmsTxtResource, llmsFullTxtResource } from "./resources/llms-txt.js";
|
|
8
8
|
import { prompts } from "./prompts/index.js";
|
|
9
9
|
import { serverInstructions } from "./instructions.js";
|
|
10
10
|
import * as dotenv from "dotenv";
|
|
11
11
|
import * as mcpcat from "mcpcat";
|
|
12
|
-
import { runWithConfig } from "./api/config-store.js";
|
|
12
|
+
import { runWithConfig, runWithTool } from "./api/config-store.js";
|
|
13
|
+
import { validateApiKey } from "./auth/oauth-provider.js";
|
|
13
14
|
// Export the config schema for Smithery
|
|
14
15
|
export { configSchema };
|
|
15
16
|
// Main function that creates and returns the server
|
|
@@ -21,12 +22,14 @@ export default function createServer({ config, }) {
|
|
|
21
22
|
instructions: serverInstructions,
|
|
22
23
|
});
|
|
23
24
|
// Wrap tool handlers so each invocation runs in an AsyncLocalStorage
|
|
24
|
-
|
|
25
|
+
// carrying both the config and the invoking tool's name (so API requests
|
|
26
|
+
// can tag which tool triggered them — see makeInfraNodusRequest).
|
|
27
|
+
const wrapHandler = (handler, toolName) => {
|
|
25
28
|
return async (params, extra) => {
|
|
26
|
-
return runWithConfig(config, () => handler(params, {
|
|
29
|
+
return runWithConfig(config, () => runWithTool(toolName, () => handler(params, {
|
|
27
30
|
progressToken: extra?._meta?.progressToken,
|
|
28
31
|
sendNotification: extra?.sendNotification,
|
|
29
|
-
}));
|
|
32
|
+
})));
|
|
30
33
|
};
|
|
31
34
|
};
|
|
32
35
|
// All tools are compiled in; the active brand decides which are exposed
|
|
@@ -50,6 +53,7 @@ export default function createServer({ config, }) {
|
|
|
50
53
|
developConceptualBridgesTool,
|
|
51
54
|
developLatentTopicsTool,
|
|
52
55
|
optimizeTextStructureTool,
|
|
56
|
+
optimizeReasoningTool,
|
|
53
57
|
developTextTool,
|
|
54
58
|
listGraphsTool,
|
|
55
59
|
searchExistingGraphsTool,
|
|
@@ -68,7 +72,7 @@ export default function createServer({ config, }) {
|
|
|
68
72
|
for (const tool of allTools) {
|
|
69
73
|
if (!isToolEnabled(tool.name))
|
|
70
74
|
continue;
|
|
71
|
-
mcpServer.registerTool(tool.name, tool.definition, wrapHandler(tool.handler));
|
|
75
|
+
mcpServer.registerTool(tool.name, tool.definition, wrapHandler(tool.handler, tool.name));
|
|
72
76
|
}
|
|
73
77
|
// Register resources
|
|
74
78
|
mcpServer.registerResource(aboutResource.name, aboutResource.uri, aboutResource.definition, aboutResource.handler);
|
|
@@ -78,12 +82,33 @@ export default function createServer({ config, }) {
|
|
|
78
82
|
prompts.forEach((prompt) => {
|
|
79
83
|
mcpServer.registerPrompt(prompt.name, prompt.definition, prompt.handler);
|
|
80
84
|
});
|
|
85
|
+
// Usage telemetry (which tools are called) via mcpcat, used to improve the
|
|
86
|
+
// product. MCPCAT_ANONYMOUS=1 keeps the stats but skips user identification.
|
|
87
|
+
const anonymous = process.env.MCPCAT_ANONYMOUS === "1";
|
|
81
88
|
mcpcat.track(mcpServer.server, "proj_3AiICLoMV0iZakDgdJGLoipgOor", {
|
|
82
|
-
...(
|
|
83
|
-
identify: async () =>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
...(!anonymous && {
|
|
90
|
+
identify: async () => {
|
|
91
|
+
// HTTP mode: identity already resolved during auth
|
|
92
|
+
if (config.userId) {
|
|
93
|
+
return {
|
|
94
|
+
userId: String(config.userId),
|
|
95
|
+
userName: config.userName,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
// STDIO/npx mode: resolve identity from the API key
|
|
99
|
+
// (validateApiKey caches results, so this costs one API
|
|
100
|
+
// round-trip per process, not one per event)
|
|
101
|
+
if (config.apiKey) {
|
|
102
|
+
const userInfo = await validateApiKey(config.apiKey);
|
|
103
|
+
if (userInfo) {
|
|
104
|
+
return {
|
|
105
|
+
userId: String(userInfo.userId),
|
|
106
|
+
userName: userInfo.userName,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
},
|
|
87
112
|
}),
|
|
88
113
|
});
|
|
89
114
|
// Return the server instance
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EACN,KAAK,EACL,WAAW,EACX,YAAY,EACZ,aAAa,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,eAAe,EACf,uBAAuB,EACvB,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC1B,qCAAqC,EACrC,4BAA4B,EAC5B,uBAAuB,EACvB,yBAAyB,EACzB,cAAc,EACd,wBAAwB,EACxB,6BAA6B,EAC7B,iCAAiC,EACjC,gCAAgC,EAChC,oCAAoC,EACpC,oCAAoC,EACpC,qCAAqC,EACrC,oCAAoC,EACpC,uCAAuC,EACvC,oBAAoB,EACpB,eAAe,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,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@
|
|
|
10
10
|
import { brand } from "./config/brand.js";
|
|
11
11
|
export const serverInstructions = `${brand.name} MCP server for knowledge graph generation and text network analysis using graph theory algorithms.
|
|
12
12
|
|
|
13
|
-
INPUT TYPES: All analysis tools accept text (string), url (webpage or YouTube video URL — automatically transcribed), or graphName (existing ${brand.name} graph). Provide exactly one input type per call.
|
|
13
|
+
INPUT TYPES: All analysis tools accept text (string), url (webpage or YouTube video URL — automatically transcribed), or graphName (existing ${brand.name} graph). Provide exactly one input type per call. Every tool that takes text also takes statements (array of short discrete statements — notes, records, memory items, relations) with two optional parallel arrays: categories (metadata labels, each becoming a [[label]] node on that statement) and timestamps (ISO 8601 dates for time filters and dynamic graphs). Use text/url for prose and long documents. The comparison tools take the same fields per item of their contexts array, where metadata applies only if every context uses statements.
|
|
14
14
|
|
|
15
15
|
ENTITY DETECTION MODES: Use modifyAnalyzedText parameter — 'none' (default, word co-occurrence graph), 'detectEntities' (mix entities and words), 'extractEntitiesOnly' (entity-only graph, best for ontologies and knowledge graphs).
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ WORKFLOW PATTERNS:
|
|
|
18
18
|
1. Quick structural overview: generate_knowledge_graph or generate_topical_clusters → get main topics, clusters, gaps.
|
|
19
19
|
2. Deep text development: develop_text_tool (combines optimize + latent topics + conceptual bridges in one call with progress tracking).
|
|
20
20
|
3. Research ideation: generate_content_gaps → generate_research_questions or generate_research_ideas. Use useSeveralGaps for diversity, gapDepth for less prominent gaps.
|
|
21
|
-
4. Text optimization: optimize_text_structure (auto-detects bias/focus/dispersion and suggests appropriate development).
|
|
21
|
+
4. Text optimization: optimize_text_structure (auto-detects bias/focus/dispersion and suggests appropriate development). For the model's own reasoning or chat with the user, use optimize_reasoning (same analysis applied to the reasoning trace/conversation, steering it toward optimal diversity and coherence).
|
|
22
22
|
5. Outside-the-box thinking: develop_conceptual_bridges (connects discourse to broader context) or set shouldTranscend/transcendDiscourse: true.
|
|
23
23
|
6. RAG augmentation: generate_contextual_hint (lightweight structural summary) or retrieve_from_knowledge_base with includeGraphSummary (GraphRAG retrieval).
|
|
24
24
|
7. Comparing texts: overlap_between_texts (similarities), difference_between_texts (what's missing in first text), merged_graph_from_texts (combined overview).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"about.d.ts","sourceRoot":"","sources":["../../src/resources/about.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"about.d.ts","sourceRoot":"","sources":["../../src/resources/about.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;CA+DzB,CAAC"}
|
package/dist/resources/about.js
CHANGED
|
@@ -23,20 +23,21 @@ Available Tools:
|
|
|
23
23
|
3. generate_content_gaps - Generate content gaps from text
|
|
24
24
|
4. generate_topical_clusters - Generate topics and clusters of keywords from text using knowledge graph analysis; by default also returns AI-generated summaries of each topical cluster (topicalClusterSummaries, useful for SEO-optimized content creation) — set generateTopicalSummaries: false to increase processing speed or if the summary request fails
|
|
25
25
|
5. optimize_text_structure - Analyze the level of bias and coherence in text; if too biased, develop the represented topics; if focused or diversified, develop the content gaps; if dispersed, focus the most common gap topics
|
|
26
|
-
6.
|
|
27
|
-
7.
|
|
28
|
-
8.
|
|
29
|
-
9.
|
|
30
|
-
10.
|
|
31
|
-
11.
|
|
32
|
-
12.
|
|
33
|
-
13.
|
|
34
|
-
14.
|
|
35
|
-
15.
|
|
36
|
-
16.
|
|
37
|
-
17.
|
|
38
|
-
18.
|
|
39
|
-
19.
|
|
26
|
+
6. optimize_reasoning - Apply the same bias/coherence analysis to the model's own reasoning trace or chat with the user (pass it as text); detects whether the reasoning is biased, focused, diversified, or dispersed and suggests how to continue thinking toward optimal diversity and coherence at the same time
|
|
27
|
+
7. develop_text_tool - Comprehensive text analysis combining research questions, latent topics, and content gaps with progress tracking
|
|
28
|
+
8. create_knowledge_graph - Create a knowledge graph in ${brand.name} from text and provide a link to it
|
|
29
|
+
9. overlap_between_texts - Create knowledge graphs from two or more texts and find the overlap (similarities) between them
|
|
30
|
+
10. merged_graph_from_texts - Build a graph of all the texts, URLs, and existing graphs provided, providing topical clusters and gaps present in the merged graph generated from all the texts
|
|
31
|
+
11. difference_between_texts - Create knowledge graphs from two or more text and find what's not present in the first graph that's present in the others
|
|
32
|
+
12. analyze_llm_results - Ask an LLM to describe a topic and turn its answer into a knowledge graph that reveals how the model frames it (main concepts, clusters, content gaps, relations). Useful for probing model bias or comparing how different models describe the same topic. Default model: claude-opus-4.6. Saves by default; returns analytics by default and omits raw graph (includeGraph: false) to keep responses compact
|
|
33
|
+
13. analyze_google_search_results - Generate a Google search results graph from search queries
|
|
34
|
+
14. analyze_youtube_results - Generate a knowledge graph from YouTube results (search results, a channel's or playlist's videos, video comments, or transcribed subtitles) to reveal main topics, clusters, and content gaps
|
|
35
|
+
15. analyze_related_search_queries - Generate a graph of search requests related to search queries provided
|
|
36
|
+
16. search_queries_vs_search_results - Find what people search for but don't yet find
|
|
37
|
+
17. generate_seo_report - Analyze content for SEO optimization by comparing it with Google search results and search queries
|
|
38
|
+
18. list_graphs - List all graphs for the currently logged in user with optional filtering by name, type, date, language, or favorite status
|
|
39
|
+
19. search - Search through existing ${brand.name} graphs
|
|
40
|
+
20. fetch - Fetch a specific search result from a ${brand.name} graph
|
|
40
41
|
|
|
41
42
|
Key Features:
|
|
42
43
|
- Topic modeling and clustering
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"about.js","sourceRoot":"","sources":["../../src/resources/about.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,cAAc;IACnB,UAAU,EAAE;QACX,IAAI,EAAE,SAAS,KAAK,CAAC,IAAI,aAAa;QACtC,WAAW,EAAE,GAAG,KAAK,CAAC,IAAI,uGAAuG,K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