keywordgraph-mcp-server 1.6.1

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 (228) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +629 -0
  3. package/bin/infranodus-mcp-server.js +8 -0
  4. package/bin/keywordgraph-mcp-server.js +8 -0
  5. package/bin/mcp-server.js +56 -0
  6. package/dist/api/client.d.ts +3 -0
  7. package/dist/api/client.d.ts.map +1 -0
  8. package/dist/api/client.js +30 -0
  9. package/dist/api/client.js.map +1 -0
  10. package/dist/api/config-store.d.ts +4 -0
  11. package/dist/api/config-store.d.ts.map +1 -0
  12. package/dist/api/config-store.js +12 -0
  13. package/dist/api/config-store.js.map +1 -0
  14. package/dist/auth/oauth-provider.d.ts +56 -0
  15. package/dist/auth/oauth-provider.d.ts.map +1 -0
  16. package/dist/auth/oauth-provider.js +295 -0
  17. package/dist/auth/oauth-provider.js.map +1 -0
  18. package/dist/auth/types.d.ts +93 -0
  19. package/dist/auth/types.d.ts.map +1 -0
  20. package/dist/auth/types.js +5 -0
  21. package/dist/auth/types.js.map +1 -0
  22. package/dist/config/brand.d.ts +58 -0
  23. package/dist/config/brand.d.ts.map +1 -0
  24. package/dist/config/brand.js +97 -0
  25. package/dist/config/brand.js.map +1 -0
  26. package/dist/config/index.d.ts +26 -0
  27. package/dist/config/index.d.ts.map +1 -0
  28. package/dist/config/index.js +20 -0
  29. package/dist/config/index.js.map +1 -0
  30. package/dist/http-server.d.ts +6 -0
  31. package/dist/http-server.d.ts.map +1 -0
  32. package/dist/http-server.js +907 -0
  33. package/dist/http-server.js.map +1 -0
  34. package/dist/index.d.ts +29 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +136 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/instructions.d.ts +11 -0
  39. package/dist/instructions.d.ts.map +1 -0
  40. package/dist/instructions.js +38 -0
  41. package/dist/instructions.js.map +1 -0
  42. package/dist/prompts/index.d.ts +24 -0
  43. package/dist/prompts/index.d.ts.map +1 -0
  44. package/dist/prompts/index.js +394 -0
  45. package/dist/prompts/index.js.map +1 -0
  46. package/dist/resources/about.d.ts +17 -0
  47. package/dist/resources/about.d.ts.map +1 -0
  48. package/dist/resources/about.js +64 -0
  49. package/dist/resources/about.js.map +1 -0
  50. package/dist/resources/llms-txt.d.ts +33 -0
  51. package/dist/resources/llms-txt.d.ts.map +1 -0
  52. package/dist/resources/llms-txt.js +65 -0
  53. package/dist/resources/llms-txt.js.map +1 -0
  54. package/dist/schemas/index.d.ts +1178 -0
  55. package/dist/schemas/index.d.ts.map +1 -0
  56. package/dist/schemas/index.js +1121 -0
  57. package/dist/schemas/index.js.map +1 -0
  58. package/dist/tools/addMemory.d.ts +36 -0
  59. package/dist/tools/addMemory.d.ts.map +1 -0
  60. package/dist/tools/addMemory.js +82 -0
  61. package/dist/tools/addMemory.js.map +1 -0
  62. package/dist/tools/analyzeExistingGraph.d.ts +37 -0
  63. package/dist/tools/analyzeExistingGraph.d.ts.map +1 -0
  64. package/dist/tools/analyzeExistingGraph.js +85 -0
  65. package/dist/tools/analyzeExistingGraph.js.map +1 -0
  66. package/dist/tools/analyzeLlmResults.d.ts +37 -0
  67. package/dist/tools/analyzeLlmResults.d.ts.map +1 -0
  68. package/dist/tools/analyzeLlmResults.js +165 -0
  69. package/dist/tools/analyzeLlmResults.js.map +1 -0
  70. package/dist/tools/analyzeText.d.ts +36 -0
  71. package/dist/tools/analyzeText.d.ts.map +1 -0
  72. package/dist/tools/analyzeText.js +97 -0
  73. package/dist/tools/analyzeText.js.map +1 -0
  74. package/dist/tools/createKnowledgeGraph.d.ts +36 -0
  75. package/dist/tools/createKnowledgeGraph.d.ts.map +1 -0
  76. package/dist/tools/createKnowledgeGraph.js +105 -0
  77. package/dist/tools/createKnowledgeGraph.js.map +1 -0
  78. package/dist/tools/developConceptualBridges.d.ts +34 -0
  79. package/dist/tools/developConceptualBridges.d.ts.map +1 -0
  80. package/dist/tools/developConceptualBridges.js +107 -0
  81. package/dist/tools/developConceptualBridges.js.map +1 -0
  82. package/dist/tools/developLatentConcepts copy.d.ts +27 -0
  83. package/dist/tools/developLatentConcepts copy.d.ts.map +1 -0
  84. package/dist/tools/developLatentConcepts copy.js +68 -0
  85. package/dist/tools/developLatentConcepts copy.js.map +1 -0
  86. package/dist/tools/developLatentConcepts.d.ts +27 -0
  87. package/dist/tools/developLatentConcepts.d.ts.map +1 -0
  88. package/dist/tools/developLatentConcepts.js +68 -0
  89. package/dist/tools/developLatentConcepts.js.map +1 -0
  90. package/dist/tools/developLatentTopics.d.ts +34 -0
  91. package/dist/tools/developLatentTopics.d.ts.map +1 -0
  92. package/dist/tools/developLatentTopics.js +107 -0
  93. package/dist/tools/developLatentTopics.js.map +1 -0
  94. package/dist/tools/developTextTool.d.ts +39 -0
  95. package/dist/tools/developTextTool.d.ts.map +1 -0
  96. package/dist/tools/developTextTool.js +210 -0
  97. package/dist/tools/developTextTool.js.map +1 -0
  98. package/dist/tools/generateContentGaps.d.ts +32 -0
  99. package/dist/tools/generateContentGaps.d.ts.map +1 -0
  100. package/dist/tools/generateContentGaps.js +96 -0
  101. package/dist/tools/generateContentGaps.js.map +1 -0
  102. package/dist/tools/generateContextualHint.d.ts +33 -0
  103. package/dist/tools/generateContextualHint.d.ts.map +1 -0
  104. package/dist/tools/generateContextualHint.js +99 -0
  105. package/dist/tools/generateContextualHint.js.map +1 -0
  106. package/dist/tools/generateDifferenceGraphFromTexts.d.ts +52 -0
  107. package/dist/tools/generateDifferenceGraphFromTexts.d.ts.map +1 -0
  108. package/dist/tools/generateDifferenceGraphFromTexts.js +160 -0
  109. package/dist/tools/generateDifferenceGraphFromTexts.js.map +1 -0
  110. package/dist/tools/generateGoogleResultsVsQueriesGraph.d.ts +37 -0
  111. package/dist/tools/generateGoogleResultsVsQueriesGraph.d.ts.map +1 -0
  112. package/dist/tools/generateGoogleResultsVsQueriesGraph.js +84 -0
  113. package/dist/tools/generateGoogleResultsVsQueriesGraph.js.map +1 -0
  114. package/dist/tools/generateGoogleSearchQueriesGraph.d.ts +39 -0
  115. package/dist/tools/generateGoogleSearchQueriesGraph.d.ts.map +1 -0
  116. package/dist/tools/generateGoogleSearchQueriesGraph.js +88 -0
  117. package/dist/tools/generateGoogleSearchQueriesGraph.js.map +1 -0
  118. package/dist/tools/generateGoogleSearchResultsGraph.d.ts +38 -0
  119. package/dist/tools/generateGoogleSearchResultsGraph.d.ts.map +1 -0
  120. package/dist/tools/generateGoogleSearchResultsGraph.js +88 -0
  121. package/dist/tools/generateGoogleSearchResultsGraph.js.map +1 -0
  122. package/dist/tools/generateKnowledgeGraph.d.ts +35 -0
  123. package/dist/tools/generateKnowledgeGraph.d.ts.map +1 -0
  124. package/dist/tools/generateKnowledgeGraph.js +105 -0
  125. package/dist/tools/generateKnowledgeGraph.js.map +1 -0
  126. package/dist/tools/generateMergedGraphFromTexts.d.ts +52 -0
  127. package/dist/tools/generateMergedGraphFromTexts.d.ts.map +1 -0
  128. package/dist/tools/generateMergedGraphFromTexts.js +160 -0
  129. package/dist/tools/generateMergedGraphFromTexts.js.map +1 -0
  130. package/dist/tools/generateOntologyGraph.d.ts +36 -0
  131. package/dist/tools/generateOntologyGraph.d.ts.map +1 -0
  132. package/dist/tools/generateOntologyGraph.js +171 -0
  133. package/dist/tools/generateOntologyGraph.js.map +1 -0
  134. package/dist/tools/generateOverlapGraphFromTexts.d.ts +52 -0
  135. package/dist/tools/generateOverlapGraphFromTexts.d.ts.map +1 -0
  136. package/dist/tools/generateOverlapGraphFromTexts.js +159 -0
  137. package/dist/tools/generateOverlapGraphFromTexts.js.map +1 -0
  138. package/dist/tools/generateResearchIdeas.d.ts +39 -0
  139. package/dist/tools/generateResearchIdeas.d.ts.map +1 -0
  140. package/dist/tools/generateResearchIdeas.js +117 -0
  141. package/dist/tools/generateResearchIdeas.js.map +1 -0
  142. package/dist/tools/generateResearchQuestions.d.ts +37 -0
  143. package/dist/tools/generateResearchQuestions.d.ts.map +1 -0
  144. package/dist/tools/generateResearchQuestions.js +111 -0
  145. package/dist/tools/generateResearchQuestions.js.map +1 -0
  146. package/dist/tools/generateResearchQuestionsFromGraph.d.ts +34 -0
  147. package/dist/tools/generateResearchQuestionsFromGraph.d.ts.map +1 -0
  148. package/dist/tools/generateResearchQuestionsFromGraph.js +75 -0
  149. package/dist/tools/generateResearchQuestionsFromGraph.js.map +1 -0
  150. package/dist/tools/generateResponses.d.ts +35 -0
  151. package/dist/tools/generateResponses.d.ts.map +1 -0
  152. package/dist/tools/generateResponses.js +112 -0
  153. package/dist/tools/generateResponses.js.map +1 -0
  154. package/dist/tools/generateResponsesFromGraph.d.ts +33 -0
  155. package/dist/tools/generateResponsesFromGraph.d.ts.map +1 -0
  156. package/dist/tools/generateResponsesFromGraph.js +74 -0
  157. package/dist/tools/generateResponsesFromGraph.js.map +1 -0
  158. package/dist/tools/generateSEOGraphTool.d.ts +39 -0
  159. package/dist/tools/generateSEOGraphTool.d.ts.map +1 -0
  160. package/dist/tools/generateSEOGraphTool.js +235 -0
  161. package/dist/tools/generateSEOGraphTool.js.map +1 -0
  162. package/dist/tools/generateTextOverview.d.ts +31 -0
  163. package/dist/tools/generateTextOverview.d.ts.map +1 -0
  164. package/dist/tools/generateTextOverview.js +68 -0
  165. package/dist/tools/generateTextOverview.js.map +1 -0
  166. package/dist/tools/generateTopicalClusters.d.ts +34 -0
  167. package/dist/tools/generateTopicalClusters.d.ts.map +1 -0
  168. package/dist/tools/generateTopicalClusters.js +134 -0
  169. package/dist/tools/generateTopicalClusters.js.map +1 -0
  170. package/dist/tools/getMemory.d.ts +32 -0
  171. package/dist/tools/getMemory.d.ts.map +1 -0
  172. package/dist/tools/getMemory.js +121 -0
  173. package/dist/tools/getMemory.js.map +1 -0
  174. package/dist/tools/index.d.ts +30 -0
  175. package/dist/tools/index.d.ts.map +1 -0
  176. package/dist/tools/index.js +30 -0
  177. package/dist/tools/index.js.map +1 -0
  178. package/dist/tools/listGraphs.d.ts +37 -0
  179. package/dist/tools/listGraphs.d.ts.map +1 -0
  180. package/dist/tools/listGraphs.js +127 -0
  181. package/dist/tools/listGraphs.js.map +1 -0
  182. package/dist/tools/optimizeTextStructure.d.ts +34 -0
  183. package/dist/tools/optimizeTextStructure.d.ts.map +1 -0
  184. package/dist/tools/optimizeTextStructure.js +108 -0
  185. package/dist/tools/optimizeTextStructure.js.map +1 -0
  186. package/dist/tools/retrieveContextForPromptFromGraph.d.ts +37 -0
  187. package/dist/tools/retrieveContextForPromptFromGraph.d.ts.map +1 -0
  188. package/dist/tools/retrieveContextForPromptFromGraph.js +80 -0
  189. package/dist/tools/retrieveContextForPromptFromGraph.js.map +1 -0
  190. package/dist/tools/searchGraph.d.ts +27 -0
  191. package/dist/tools/searchGraph.d.ts.map +1 -0
  192. package/dist/tools/searchGraph.js +57 -0
  193. package/dist/tools/searchGraph.js.map +1 -0
  194. package/dist/tools/searchGraphs.d.ts +33 -0
  195. package/dist/tools/searchGraphs.d.ts.map +1 -0
  196. package/dist/tools/searchGraphs.js +67 -0
  197. package/dist/tools/searchGraphs.js.map +1 -0
  198. package/dist/tools/searchGraphsFetch.d.ts +31 -0
  199. package/dist/tools/searchGraphsFetch.d.ts.map +1 -0
  200. package/dist/tools/searchGraphsFetch.js +78 -0
  201. package/dist/tools/searchGraphsFetch.js.map +1 -0
  202. package/dist/tools/sequentialThinking.d.ts +71 -0
  203. package/dist/tools/sequentialThinking.d.ts.map +1 -0
  204. package/dist/tools/sequentialThinking.js +218 -0
  205. package/dist/tools/sequentialThinking.js.map +1 -0
  206. package/dist/types/index.d.ts +378 -0
  207. package/dist/types/index.d.ts.map +1 -0
  208. package/dist/types/index.js +2 -0
  209. package/dist/types/index.js.map +1 -0
  210. package/dist/utils/progress.d.ts +21 -0
  211. package/dist/utils/progress.d.ts.map +1 -0
  212. package/dist/utils/progress.js +50 -0
  213. package/dist/utils/progress.js.map +1 -0
  214. package/dist/utils/transformers.d.ts +31 -0
  215. package/dist/utils/transformers.d.ts.map +1 -0
  216. package/dist/utils/transformers.js +484 -0
  217. package/dist/utils/transformers.js.map +1 -0
  218. package/dist/utils/urlContent.d.ts +35 -0
  219. package/dist/utils/urlContent.d.ts.map +1 -0
  220. package/dist/utils/urlContent.js +87 -0
  221. package/dist/utils/urlContent.js.map +1 -0
  222. package/llms-full.infranodus.txt +469 -0
  223. package/llms-full.keywordgraph.txt +469 -0
  224. package/llms-full.txt +469 -0
  225. package/llms.infranodus.txt +64 -0
  226. package/llms.keywordgraph.txt +64 -0
  227. package/llms.txt +64 -0
  228. package/package.json +78 -0
@@ -0,0 +1,35 @@
1
+ import { z } from "zod";
2
+ import { GenerateGraphSchema } from "../schemas/index.js";
3
+ export declare const generateKnowledgeGraphTool: {
4
+ name: string;
5
+ definition: {
6
+ title: string;
7
+ description: string;
8
+ inputSchema: {
9
+ text: z.ZodOptional<z.ZodString>;
10
+ url: z.ZodOptional<z.ZodString>;
11
+ includeStatements: z.ZodDefault<z.ZodBoolean>;
12
+ includeGraph: z.ZodDefault<z.ZodBoolean>;
13
+ addNodesAndEdges: z.ZodDefault<z.ZodBoolean>;
14
+ modifyAnalyzedText: z.ZodDefault<z.ZodEnum<["none", "detectEntities", "extractEntitiesOnly"]>>;
15
+ };
16
+ annotations: {
17
+ readOnlyHint: boolean;
18
+ idempotentHint: boolean;
19
+ destructiveHint: boolean;
20
+ };
21
+ };
22
+ handler: (params: z.infer<typeof GenerateGraphSchema>) => Promise<{
23
+ content: {
24
+ type: "text";
25
+ text: string;
26
+ }[];
27
+ isError: boolean;
28
+ } | {
29
+ content: {
30
+ type: "text";
31
+ text: string;
32
+ }[];
33
+ }>;
34
+ };
35
+ //# sourceMappingURL=generateKnowledgeGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateKnowledgeGraph.d.ts","sourceRoot":"","sources":["../../src/tools/generateKnowledgeGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAc1D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;sBAad,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC;;;;;;;;;;;;CA0F3D,CAAC"}
@@ -0,0 +1,105 @@
1
+ import { GenerateGraphSchema } from "../schemas/index.js";
2
+ import { makeInfraNodusRequest } from "../api/client.js";
3
+ import { fetchUrlContentAsText } from "../utils/urlContent.js";
4
+ import { transformToStructuredOutput } from "../utils/transformers.js";
5
+ function errorContent(message) {
6
+ return {
7
+ content: [
8
+ { type: "text", text: JSON.stringify({ error: message }) },
9
+ ],
10
+ isError: true,
11
+ };
12
+ }
13
+ export const generateKnowledgeGraphTool = {
14
+ name: "generate_knowledge_graph",
15
+ definition: {
16
+ title: "Generate Knowledge Graph from Text",
17
+ description: "Generate a knowledge graph with main topics, topical clusters, concepts, concepts (nodes) relations (edges) and structural gaps. Only use when explicitly asked to analyze a text or generate a knowledge graph. Do not use for short clarifying questions that you already have an answer to from the context of the conversation.",
18
+ inputSchema: GenerateGraphSchema.shape,
19
+ annotations: {
20
+ readOnlyHint: true,
21
+ idempotentHint: true,
22
+ destructiveHint: false,
23
+ },
24
+ },
25
+ handler: async (params) => {
26
+ try {
27
+ let contentText;
28
+ if (params.url) {
29
+ const result = await fetchUrlContentAsText(params.url);
30
+ if (!result.ok)
31
+ return errorContent(result.error);
32
+ contentText = result.contentText;
33
+ if (!contentText?.trim())
34
+ return errorContent("URL did not return any text content");
35
+ }
36
+ else if (params.text?.trim()) {
37
+ contentText = params.text;
38
+ }
39
+ else {
40
+ return errorContent("Provide either url or text for analysis");
41
+ }
42
+ const includeNodesAndEdges = params.addNodesAndEdges;
43
+ const includeGraph = params.includeGraph;
44
+ const buildingEntitiesGraph = params.modifyAnalyzedText == "extractEntitiesOnly" ? true : false;
45
+ // Build query parameters
46
+ const queryParams = new URLSearchParams({
47
+ doNotSave: "true",
48
+ addStats: "true",
49
+ includeStatements: params.includeStatements ? "true" : "false",
50
+ includeGraphSummary: "false",
51
+ extendedGraphSummary: "true",
52
+ includeGraph: includeGraph || buildingEntitiesGraph || includeNodesAndEdges
53
+ ? "true"
54
+ : "false",
55
+ compactGraph: includeGraph || buildingEntitiesGraph ? "true" : "false",
56
+ compactStatements: params.includeStatements ? "true" : "false",
57
+ aiTopics: "true",
58
+ optimize: "develop",
59
+ });
60
+ const endpoint = `/graphAndStatements?${queryParams.toString()}`;
61
+ const requestBody = {
62
+ text: contentText,
63
+ aiTopics: "true",
64
+ };
65
+ if (params.modifyAnalyzedText && params.modifyAnalyzedText !== "none") {
66
+ requestBody.modifyAnalyzedText = params.modifyAnalyzedText;
67
+ }
68
+ const response = await makeInfraNodusRequest(endpoint, requestBody);
69
+ if (response.error) {
70
+ return {
71
+ content: [
72
+ {
73
+ type: "text",
74
+ text: `Error: ${response.error}`,
75
+ },
76
+ ],
77
+ isError: true,
78
+ };
79
+ }
80
+ const structuredOutput = transformToStructuredOutput(response, includeGraph, includeNodesAndEdges, buildingEntitiesGraph);
81
+ return {
82
+ content: [
83
+ {
84
+ type: "text",
85
+ text: JSON.stringify(structuredOutput, null, 2),
86
+ },
87
+ ],
88
+ };
89
+ }
90
+ catch (error) {
91
+ return {
92
+ content: [
93
+ {
94
+ type: "text",
95
+ text: JSON.stringify({
96
+ error: error instanceof Error ? error.message : String(error),
97
+ }),
98
+ },
99
+ ],
100
+ isError: true,
101
+ };
102
+ }
103
+ },
104
+ };
105
+ //# sourceMappingURL=generateKnowledgeGraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateKnowledgeGraph.js","sourceRoot":"","sources":["../../src/tools/generateKnowledgeGraph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CA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AAO;oBACN,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,UAAU,QAAQ,CAAC,KAAK,EAAE;yBAChC;qBACD;oBACD,OAAO,EAAE,IAAI;iBACb,CAAC;YACH,CAAC;YAED,MAAM,gBAAgB,GAAG,2BAA2B,CACnD,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,CACrB,CAAC;YAEF,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;qBAC/C;iBACD;aACD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACpB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;yBAC7D,CAAC;qBACF;iBACD;gBACD,OAAO,EAAE,IAAI;aACb,CAAC;QACH,CAAC;IACF,CAAC;CACD,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { z } from "zod";
2
+ import { GenerateOverlapGraphFromTextsSchema } from "../schemas/index.js";
3
+ export declare const generateMergedGraphFromTextsTool: {
4
+ name: string;
5
+ definition: {
6
+ title: string;
7
+ description: string;
8
+ inputSchema: {
9
+ contexts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
10
+ text: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ text: string;
13
+ }, {
14
+ text: string;
15
+ }>, z.ZodObject<{
16
+ url: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ url: string;
19
+ }, {
20
+ url: string;
21
+ }>, z.ZodObject<{
22
+ graphName: z.ZodString;
23
+ }, "strip", z.ZodTypeAny, {
24
+ graphName: string;
25
+ }, {
26
+ graphName: string;
27
+ }>]>, "many">;
28
+ modifyAnalyzedText: z.ZodDefault<z.ZodEnum<["none", "detectEntities", "extractEntitiesOnly"]>>;
29
+ includeStatements: z.ZodDefault<z.ZodBoolean>;
30
+ includeGraph: z.ZodDefault<z.ZodBoolean>;
31
+ addNodesAndEdges: z.ZodDefault<z.ZodBoolean>;
32
+ };
33
+ annotations: {
34
+ readOnlyHint: boolean;
35
+ idempotentHint: boolean;
36
+ destructiveHint: boolean;
37
+ };
38
+ };
39
+ handler: (params: z.infer<typeof GenerateOverlapGraphFromTextsSchema>) => Promise<{
40
+ content: {
41
+ type: "text";
42
+ text: string;
43
+ }[];
44
+ isError: boolean;
45
+ } | {
46
+ content: {
47
+ type: "text";
48
+ text: string;
49
+ }[];
50
+ }>;
51
+ };
52
+ //# sourceMappingURL=generateMergedGraphFromTexts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateMergedGraphFromTexts.d.ts","sourceRoot":"","sources":["../../src/tools/generateMergedGraphFromTexts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACN,mCAAmC,EAEnC,MAAM,qBAAqB,CAAC;AA2D7B,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAcnC,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC;;;;;;;;;;;;CA+G5D,CAAC"}
@@ -0,0 +1,160 @@
1
+ import { brand } from "../config/brand.js";
2
+ import { GenerateOverlapGraphFromTextsSchemaBase, } from "../schemas/index.js";
3
+ import { makeInfraNodusRequest } from "../api/client.js";
4
+ import { fetchUrlContentAsText } from "../utils/urlContent.js";
5
+ import { transformToStructuredOutput } from "../utils/transformers.js";
6
+ function errorContent(message) {
7
+ return {
8
+ content: [
9
+ { type: "text", text: JSON.stringify({ error: message }) },
10
+ ],
11
+ isError: true,
12
+ };
13
+ }
14
+ /** Fetches an existing graph by name with includeStatements and returns its statements joined as text. */
15
+ async function fetchGraphTextByName(graphName) {
16
+ const queryParams = new URLSearchParams({
17
+ doNotSave: "true",
18
+ addStats: "true",
19
+ includeStatements: "true",
20
+ includeGraphSummary: "false",
21
+ extendedGraphSummary: "false",
22
+ includeGraph: "false",
23
+ compactGraph: "true",
24
+ compactStatements: "true",
25
+ aiTopics: "false",
26
+ optimize: "develop",
27
+ });
28
+ const endpoint = `/graphAndStatements?${queryParams.toString()}`;
29
+ const requestBody = { name: graphName, aiTopics: "true" };
30
+ let response;
31
+ try {
32
+ response = await makeInfraNodusRequest(endpoint, requestBody);
33
+ }
34
+ catch (err) {
35
+ return {
36
+ ok: false,
37
+ error: err instanceof Error ? err.message : String(err),
38
+ };
39
+ }
40
+ if (response.error) {
41
+ return { ok: false, error: response.error };
42
+ }
43
+ const statements = response.statements ?? [];
44
+ const text = statements
45
+ .map((s) => s.content?.trim())
46
+ .filter(Boolean)
47
+ .join("\n");
48
+ if (!text.trim()) {
49
+ return {
50
+ ok: false,
51
+ error: `Graph "${graphName}" returned no statement content`,
52
+ };
53
+ }
54
+ return { ok: true, text };
55
+ }
56
+ export const generateMergedGraphFromTextsTool = {
57
+ name: "merged_graph_from_texts",
58
+ definition: {
59
+ title: "Generate Merged Knowledge Graph from Texts",
60
+ description: `Build a graph of all the texts, URLs, and existing ${brand.name} graphs provided, providing topical clusters and gaps present in the merged graph generated from all the texts.`,
61
+ inputSchema: GenerateOverlapGraphFromTextsSchemaBase.shape,
62
+ annotations: {
63
+ readOnlyHint: true,
64
+ idempotentHint: true,
65
+ destructiveHint: false,
66
+ },
67
+ },
68
+ handler: async (params) => {
69
+ try {
70
+ const modifyAnalyzedText = params.modifyAnalyzedText ?? "none";
71
+ const resolvedTexts = [];
72
+ for (let i = 0; i < params.contexts.length; i++) {
73
+ const item = params.contexts[i];
74
+ if ("text" in item) {
75
+ if (!item.text.trim())
76
+ return errorContent(`Context at index ${i} has empty text.`);
77
+ resolvedTexts.push(item.text);
78
+ continue;
79
+ }
80
+ if ("url" in item) {
81
+ const result = await fetchUrlContentAsText(item.url);
82
+ if (!result.ok)
83
+ return errorContent(`URL at context index ${i} failed: ${result.error}`);
84
+ if (!result.contentText?.trim())
85
+ return errorContent(`URL at context index ${i} did not return any text content`);
86
+ resolvedTexts.push(result.contentText);
87
+ continue;
88
+ }
89
+ if ("graphName" in item) {
90
+ const result = await fetchGraphTextByName(item.graphName);
91
+ if (!result.ok)
92
+ return errorContent(`Graph at context index ${i} failed: ${result.error}`);
93
+ resolvedTexts.push(result.text);
94
+ continue;
95
+ }
96
+ return errorContent(`Context at index ${i} must be { text }, { url }, or { graphName }.`);
97
+ }
98
+ const contexts = resolvedTexts.map((text) => ({
99
+ text,
100
+ modifyAnalyzedText,
101
+ }));
102
+ const includeNodesAndEdges = params.addNodesAndEdges;
103
+ const includeGraph = params.includeGraph;
104
+ // Build query parameters (same shape as overlap tool, compareMode: merge)
105
+ const queryParams = new URLSearchParams({
106
+ doNotSave: "true",
107
+ addStats: "true",
108
+ includeStatements: params.includeStatements ? "true" : "false",
109
+ includeGraphSummary: "false",
110
+ extendedGraphSummary: "true",
111
+ includeGraph: includeGraph ? "true" : "false",
112
+ compactGraph: "true",
113
+ compactStatements: "true",
114
+ aiTopics: "true",
115
+ optimize: "develop",
116
+ compareMode: "merge",
117
+ });
118
+ const endpoint = `/graphsAndStatements?${queryParams.toString()}`;
119
+ const requestBody = {
120
+ contexts,
121
+ aiTopics: "true",
122
+ };
123
+ const response = await makeInfraNodusRequest(endpoint, requestBody);
124
+ if (response.error) {
125
+ return {
126
+ content: [
127
+ {
128
+ type: "text",
129
+ text: `Error: ${response.error}`,
130
+ },
131
+ ],
132
+ isError: true,
133
+ };
134
+ }
135
+ const structuredOutput = transformToStructuredOutput(response, includeGraph, includeNodesAndEdges);
136
+ return {
137
+ content: [
138
+ {
139
+ type: "text",
140
+ text: JSON.stringify(structuredOutput, null, 2),
141
+ },
142
+ ],
143
+ };
144
+ }
145
+ catch (error) {
146
+ return {
147
+ content: [
148
+ {
149
+ type: "text",
150
+ text: JSON.stringify({
151
+ error: error instanceof Error ? error.message : String(error),
152
+ }),
153
+ },
154
+ ],
155
+ isError: true,
156
+ };
157
+ }
158
+ },
159
+ };
160
+ //# sourceMappingURL=generateMergedGraphFromTexts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateMergedGraphFromTexts.js","sourceRoot":"","sources":["../../src/tools/generateMergedGraphFromTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAEN,uCAAuC,GACvC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAGvE,SAAS,YAAY,CAAC,OAAe;IACpC,OAAO;QACN,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE;SACnE;QACD,OAAO,EAAE,IAAI;KACb,CAAC;AACH,CAAC;AAED,0GAA0G;AAC1G,KAAK,UAAU,oBAAoB,CAClC,SAAiB;IAEjB,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC;QACvC,SAAS,EAAE,MAAM;QACjB,QAAQ,EAAE,MAAM;QAChB,iBAAiB,EAAE,MAAM;QACzB,mBAAmB,EAAE,OAAO;QAC5B,oBAAoB,EAAE,OAAO;QAC7B,YAAY,EAAE,OAAO;QACrB,YAAY,EAAE,MAAM;QACpB,iBAAiB,EAAE,MAAM;QACzB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,SAAS;KACnB,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,uBAAuB,WA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qB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;YAEpE,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;gBACpB,OAAO;oBACN,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,UAAU,QAAQ,CAAC,KAAK,EAAE;yBAChC;qBACD;oBACD,OAAO,EAAE,IAAI;iBACb,CAAC;YACH,CAAC;YAED,MAAM,gBAAgB,GAAG,2BAA2B,CACnD,QAAQ,EACR,YAAY,EACZ,oBAAoB,CACpB,CAAC;YAEF,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;qBAC/C;iBACD;aACD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACpB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;yBAC7D,CAAC;qBACF;iBACD;gBACD,OAAO,EAAE,IAAI;aACb,CAAC;QACH,CAAC;IACF,CAAC;CACD,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ import { GenerateOntologyGraphSchema } from "../schemas/index.js";
3
+ export declare const generateOntologyGraphTool: {
4
+ name: string;
5
+ definition: {
6
+ title: string;
7
+ description: string;
8
+ inputSchema: {
9
+ prompt: z.ZodString;
10
+ graphName: z.ZodOptional<z.ZodString>;
11
+ modelToUse: z.ZodDefault<z.ZodEnum<["claude-opus-4.6", "claude-sonnet-4.6", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", "grok-4.1-fast-non-reasoning", "grok-4.1-fast-reasoning", "gpt-4o", "gpt-4o-mini", "gpt-5.4", "gpt-5.4-mini"]>>;
12
+ numberOfResults: z.ZodDefault<z.ZodNumber>;
13
+ saveGraph: z.ZodDefault<z.ZodBoolean>;
14
+ includeGraph: z.ZodDefault<z.ZodBoolean>;
15
+ includeAnalytics: z.ZodDefault<z.ZodBoolean>;
16
+ };
17
+ annotations: {
18
+ readOnlyHint: boolean;
19
+ idempotentHint: boolean;
20
+ destructiveHint: boolean;
21
+ };
22
+ };
23
+ handler: (params: z.infer<typeof GenerateOntologyGraphSchema>) => Promise<{
24
+ content: {
25
+ type: "text";
26
+ text: string;
27
+ }[];
28
+ isError: boolean;
29
+ } | {
30
+ content: {
31
+ type: "text";
32
+ text: string;
33
+ }[];
34
+ }>;
35
+ };
36
+ //# sourceMappingURL=generateOntologyGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateOntologyGraph.d.ts","sourceRoot":"","sources":["../../src/tools/generateOntologyGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AA2ClE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;sBAab,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC;;;;;;;;;;;;CAqJnE,CAAC"}
@@ -0,0 +1,171 @@
1
+ import { GenerateOntologyGraphSchema } from "../schemas/index.js";
2
+ import { makeInfraNodusRequest } from "../api/client.js";
3
+ import { getConfig } from "../api/config-store.js";
4
+ import { brand, brandApiBase } from "../config/brand.js";
5
+ import { extractOntologyStatements, transformToStructuredOutput, } from "../utils/transformers.js";
6
+ function errorContent(message) {
7
+ return {
8
+ content: [
9
+ { type: "text", text: JSON.stringify({ error: message }) },
10
+ ],
11
+ isError: true,
12
+ };
13
+ }
14
+ // Derive the app base URL (e.g. https://infranodus.com) from the
15
+ // API base URL (e.g. https://infranodus.com/api/v1) so we can build graph links.
16
+ function appBaseUrl() {
17
+ const apiBase = getConfig().apiBase || brandApiBase();
18
+ return apiBase.replace(/\/api\/v1\/?$/, "");
19
+ }
20
+ function slugify(text) {
21
+ return text
22
+ .toLowerCase()
23
+ .replace(/[^a-z0-9]+/g, "_")
24
+ .replace(/^_+|_+$/g, "")
25
+ .slice(0, 30);
26
+ }
27
+ function defaultOntologyName(prompt) {
28
+ const timestamp = new Date()
29
+ .toISOString()
30
+ .slice(2, 16)
31
+ .replace(/[-:T]/g, "");
32
+ const slug = slugify(prompt.split(" ").slice(0, 3).join(" "));
33
+ return slug ? `ai_onto_${slug}_${timestamp}` : `ai_onto_${timestamp}`;
34
+ }
35
+ export const generateOntologyGraphTool = {
36
+ name: "generate_ontology_graph",
37
+ definition: {
38
+ title: "Generate an AI Ontology Graph from a Topic or Prompt",
39
+ description: `Use AI to generate a reasoning ontology knowledge graph (entities and the relations between them) for a topic, prompt, or text, and optionally save it as a ${brand.name} graph. By default the graph is saved and a link is returned. Set saveGraph to false if the user asks not to save, or when you only need a one-off AI ontology overview of a topic for the current context that won't be reused later.`,
40
+ inputSchema: GenerateOntologyGraphSchema.shape,
41
+ annotations: {
42
+ readOnlyHint: false,
43
+ idempotentHint: false,
44
+ destructiveHint: false,
45
+ },
46
+ },
47
+ handler: async (params) => {
48
+ try {
49
+ const saveGraph = params.saveGraph !== false;
50
+ const includeGraph = params.includeGraph !== false;
51
+ const includeAnalytics = params.includeAnalytics !== false;
52
+ const graphName = params.graphName?.trim() || defaultOntologyName(params.prompt);
53
+ const requestBody = {
54
+ saveToGraphAndRedirect: saveGraph,
55
+ contextName: graphName,
56
+ aiQueryType: "ontology graph",
57
+ mode: "gptchat",
58
+ modelToUse: params.modelToUse ?? "claude-opus-4.6",
59
+ prompt: [{ role: "user", content: params.prompt }],
60
+ numberOfResults: String(params.numberOfResults ?? 40),
61
+ modifyAnalyzedText: "extractEntitiesOnly",
62
+ contextType: "ONTOLOGY",
63
+ replaceEntities: false,
64
+ hideSearchTerms: true,
65
+ };
66
+ const response = await makeInfraNodusRequest("/aiAdvice", requestBody);
67
+ // The /aiAdvice endpoint returns error envelopes with HTTP 200, so the
68
+ // request does not throw — we must check response.error explicitly.
69
+ if (response.error) {
70
+ return errorContent(typeof response.error === "object"
71
+ ? JSON.stringify(response.error)
72
+ : String(response.error));
73
+ }
74
+ const ontologyStatements = extractOntologyStatements(response);
75
+ let output;
76
+ if (saveGraph) {
77
+ const redirectUrl = response.redirectUrl;
78
+ if (!redirectUrl) {
79
+ return errorContent(`The ontology was generated but no graph link was returned, so it may not have been saved. Check that your ${brand.name} API key is valid (an anonymous/demo key does not persist graphs).`);
80
+ }
81
+ const base = appBaseUrl();
82
+ // redirectUrl looks like /<userName>/<contextName>/edit
83
+ const viewUrl = redirectUrl.replace(/\/edit\/?$/, "");
84
+ output = {
85
+ saved: true,
86
+ graphName,
87
+ graphUrl: `${base}${viewUrl}`,
88
+ editUrl: `${base}${redirectUrl}`,
89
+ message: `Ontology graph "${graphName}" generated and saved.`,
90
+ };
91
+ }
92
+ else {
93
+ output = {
94
+ saved: false,
95
+ ontologyStatements,
96
+ message: ontologyStatements.length > 0
97
+ ? `Ontology generated (not saved). Use saveGraph: true to persist it as a ${brand.name} graph.`
98
+ : "The AI did not return any ontology statements. Try a more specific prompt or a more capable model.",
99
+ };
100
+ }
101
+ // Optional follow-up: fetch the analyzed graph for compact structure
102
+ // and/or analytics. Skip entirely if both are disabled.
103
+ if (includeGraph || includeAnalytics) {
104
+ const graphQuery = new URLSearchParams({
105
+ doNotSave: "true",
106
+ addStats: "true",
107
+ includeStatements: "false",
108
+ includeGraphSummary: "false",
109
+ extendedGraphSummary: includeAnalytics ? "true" : "false",
110
+ includeGraph: includeGraph ? "true" : "false",
111
+ compactGraph: includeGraph ? "true" : "false",
112
+ aiTopics: "true",
113
+ optimize: "develop",
114
+ });
115
+ const graphEndpoint = `/graphAndStatements?${graphQuery.toString()}`;
116
+ const graphRequestBody = saveGraph
117
+ ? { name: graphName, aiTopics: "true", userName: "" }
118
+ : {
119
+ text: ontologyStatements.join("\n"),
120
+ aiTopics: "true",
121
+ modifyAnalyzedText: "extractEntitiesOnly",
122
+ };
123
+ const graphResponse = await makeInfraNodusRequest(graphEndpoint, graphRequestBody);
124
+ if (!graphResponse.error) {
125
+ // For an ontology graph, nodes (entities) and edges (relations) are
126
+ // the point — tie includeNodesAndEdges to includeGraph so the
127
+ // transformer keeps them instead of stripping them.
128
+ const structured = transformToStructuredOutput(graphResponse, includeGraph, includeGraph, true);
129
+ if (includeAnalytics) {
130
+ output.statistics = structured.statistics;
131
+ output.graphSummary = structured.graphSummary;
132
+ output.contentGaps = structured.contentGaps;
133
+ output.mainTopicalClusters = structured.mainTopicalClusters;
134
+ output.mainConcepts = structured.mainConcepts;
135
+ output.conceptualGateways = structured.conceptualGateways;
136
+ output.topRelations = structured.topRelations;
137
+ output.topBigrams = structured.topBigrams;
138
+ output.topInfluentialNodes = structured.topInfluentialNodes;
139
+ output.topClusters = structured.topClusters;
140
+ output.knowledgeGraphByCluster = structured.knowledgeGraphByCluster;
141
+ }
142
+ if (includeGraph) {
143
+ output.knowledgeGraph = structured.knowledgeGraph;
144
+ }
145
+ }
146
+ }
147
+ return {
148
+ content: [
149
+ {
150
+ type: "text",
151
+ text: JSON.stringify(output, null, 2),
152
+ },
153
+ ],
154
+ };
155
+ }
156
+ catch (error) {
157
+ return {
158
+ content: [
159
+ {
160
+ type: "text",
161
+ text: JSON.stringify({
162
+ error: error instanceof Error ? error.message : String(error),
163
+ }),
164
+ },
165
+ ],
166
+ isError: true,
167
+ };
168
+ }
169
+ },
170
+ };
171
+ //# sourceMappingURL=generateOntologyGraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateOntologyGraph.js","sourceRoot":"","sources":["../../src/tools/generateOntologyGraph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kB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zod";
2
+ import { GenerateOverlapGraphFromTextsSchema } from "../schemas/index.js";
3
+ export declare const generateOverlapGraphFromTextsTool: {
4
+ name: string;
5
+ definition: {
6
+ title: string;
7
+ description: string;
8
+ inputSchema: {
9
+ contexts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
10
+ text: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ text: string;
13
+ }, {
14
+ text: string;
15
+ }>, z.ZodObject<{
16
+ url: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ url: string;
19
+ }, {
20
+ url: string;
21
+ }>, z.ZodObject<{
22
+ graphName: z.ZodString;
23
+ }, "strip", z.ZodTypeAny, {
24
+ graphName: string;
25
+ }, {
26
+ graphName: string;
27
+ }>]>, "many">;
28
+ modifyAnalyzedText: z.ZodDefault<z.ZodEnum<["none", "detectEntities", "extractEntitiesOnly"]>>;
29
+ includeStatements: z.ZodDefault<z.ZodBoolean>;
30
+ includeGraph: z.ZodDefault<z.ZodBoolean>;
31
+ addNodesAndEdges: z.ZodDefault<z.ZodBoolean>;
32
+ };
33
+ annotations: {
34
+ readOnlyHint: boolean;
35
+ idempotentHint: boolean;
36
+ destructiveHint: boolean;
37
+ };
38
+ };
39
+ handler: (params: z.infer<typeof GenerateOverlapGraphFromTextsSchema>) => Promise<{
40
+ content: {
41
+ type: "text";
42
+ text: string;
43
+ }[];
44
+ isError: boolean;
45
+ } | {
46
+ content: {
47
+ type: "text";
48
+ text: string;
49
+ }[];
50
+ }>;
51
+ };
52
+ //# sourceMappingURL=generateOverlapGraphFromTexts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateOverlapGraphFromTexts.d.ts","sourceRoot":"","sources":["../../src/tools/generateOverlapGraphFromTexts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACN,mCAAmC,EAEnC,MAAM,qBAAqB,CAAC;AA2D7B,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAcpC,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC;;;;;;;;;;;;CA+G5D,CAAC"}