infranodus-mcp-server 1.2.4 → 1.5.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.
- package/README.md +57 -31
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +2 -2
- package/dist/api/client.js.map +1 -1
- package/dist/api/config-store.d.ts +4 -0
- package/dist/api/config-store.d.ts.map +1 -0
- package/dist/api/config-store.js +11 -0
- package/dist/api/config-store.js.map +1 -0
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -1
- package/dist/http-server.js +219 -27
- package/dist/http-server.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -8
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +11 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +37 -0
- package/dist/instructions.js.map +1 -0
- package/dist/prompts/index.js +1 -1
- package/dist/resources/about.d.ts.map +1 -1
- package/dist/resources/about.js +26 -24
- package/dist/resources/about.js.map +1 -1
- package/dist/resources/llms-txt.d.ts +33 -0
- package/dist/resources/llms-txt.d.ts.map +1 -0
- package/dist/resources/llms-txt.js +54 -0
- package/dist/resources/llms-txt.js.map +1 -0
- package/dist/schemas/index.d.ts +673 -86
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +304 -87
- package/dist/schemas/index.js.map +1 -1
- package/dist/tools/analyzeExistingGraph.d.ts.map +1 -1
- package/dist/tools/analyzeExistingGraph.js +13 -8
- package/dist/tools/analyzeExistingGraph.js.map +1 -1
- package/dist/tools/analyzeText.d.ts +36 -0
- package/dist/tools/analyzeText.d.ts.map +1 -0
- package/dist/tools/analyzeText.js +96 -0
- package/dist/tools/analyzeText.js.map +1 -0
- package/dist/tools/createKnowledgeGraph.d.ts +2 -2
- package/dist/tools/createKnowledgeGraph.d.ts.map +1 -1
- package/dist/tools/createKnowledgeGraph.js +26 -2
- package/dist/tools/createKnowledgeGraph.js.map +1 -1
- package/dist/tools/developConceptualBridges.d.ts +4 -3
- package/dist/tools/developConceptualBridges.d.ts.map +1 -1
- package/dist/tools/developConceptualBridges.js +45 -11
- package/dist/tools/developConceptualBridges.js.map +1 -1
- package/dist/tools/developLatentTopics.d.ts +4 -3
- package/dist/tools/developLatentTopics.d.ts.map +1 -1
- package/dist/tools/developLatentTopics.js +45 -11
- package/dist/tools/developLatentTopics.js.map +1 -1
- package/dist/tools/developTextTool.d.ts +3 -2
- package/dist/tools/developTextTool.d.ts.map +1 -1
- package/dist/tools/developTextTool.js +73 -23
- package/dist/tools/developTextTool.js.map +1 -1
- package/dist/tools/generateContentGaps.d.ts +3 -2
- package/dist/tools/generateContentGaps.d.ts.map +1 -1
- package/dist/tools/generateContentGaps.js +38 -10
- package/dist/tools/generateContentGaps.js.map +1 -1
- package/dist/tools/generateContextualHint.d.ts +3 -2
- package/dist/tools/generateContextualHint.d.ts.map +1 -1
- package/dist/tools/generateContextualHint.js +36 -8
- package/dist/tools/generateContextualHint.js.map +1 -1
- package/dist/tools/generateDifferenceGraphFromTexts.d.ts +15 -6
- package/dist/tools/generateDifferenceGraphFromTexts.d.ts.map +1 -1
- package/dist/tools/generateDifferenceGraphFromTexts.js +90 -7
- package/dist/tools/generateDifferenceGraphFromTexts.js.map +1 -1
- package/dist/tools/generateGoogleResultsVsQueriesGraph.d.ts +3 -1
- package/dist/tools/generateGoogleResultsVsQueriesGraph.d.ts.map +1 -1
- package/dist/tools/generateGoogleResultsVsQueriesGraph.js +18 -9
- package/dist/tools/generateGoogleResultsVsQueriesGraph.js.map +1 -1
- package/dist/tools/generateGoogleSearchQueriesGraph.d.ts +3 -1
- package/dist/tools/generateGoogleSearchQueriesGraph.d.ts.map +1 -1
- package/dist/tools/generateGoogleSearchQueriesGraph.js +21 -10
- package/dist/tools/generateGoogleSearchQueriesGraph.js.map +1 -1
- package/dist/tools/generateGoogleSearchResultsGraph.d.ts +4 -2
- package/dist/tools/generateGoogleSearchResultsGraph.d.ts.map +1 -1
- package/dist/tools/generateGoogleSearchResultsGraph.js +22 -10
- package/dist/tools/generateGoogleSearchResultsGraph.js.map +1 -1
- package/dist/tools/generateKnowledgeGraph.d.ts +2 -2
- package/dist/tools/generateKnowledgeGraph.d.ts.map +1 -1
- package/dist/tools/generateKnowledgeGraph.js +26 -2
- package/dist/tools/generateKnowledgeGraph.js.map +1 -1
- package/dist/tools/generateMergedGraphFromTexts.d.ts +52 -0
- package/dist/tools/generateMergedGraphFromTexts.d.ts.map +1 -0
- package/dist/tools/generateMergedGraphFromTexts.js +159 -0
- package/dist/tools/generateMergedGraphFromTexts.js.map +1 -0
- package/dist/tools/generateOverlapGraphFromTexts.d.ts +15 -6
- package/dist/tools/generateOverlapGraphFromTexts.d.ts.map +1 -1
- package/dist/tools/generateOverlapGraphFromTexts.js +91 -7
- package/dist/tools/generateOverlapGraphFromTexts.js.map +1 -1
- package/dist/tools/generateResearchIdeas.d.ts +4 -2
- package/dist/tools/generateResearchIdeas.d.ts.map +1 -1
- package/dist/tools/generateResearchIdeas.js +54 -13
- package/dist/tools/generateResearchIdeas.js.map +1 -1
- package/dist/tools/generateResearchQuestions.d.ts +3 -2
- package/dist/tools/generateResearchQuestions.d.ts.map +1 -1
- package/dist/tools/generateResearchQuestions.js +44 -9
- package/dist/tools/generateResearchQuestions.js.map +1 -1
- package/dist/tools/generateResponses.d.ts +34 -0
- package/dist/tools/generateResponses.d.ts.map +1 -0
- package/dist/tools/generateResponses.js +110 -0
- package/dist/tools/generateResponses.js.map +1 -0
- package/dist/tools/generateSEOGraphTool.d.ts +2 -0
- package/dist/tools/generateSEOGraphTool.d.ts.map +1 -1
- package/dist/tools/generateSEOGraphTool.js +16 -75
- package/dist/tools/generateSEOGraphTool.js.map +1 -1
- package/dist/tools/generateTopicalClusters.d.ts +3 -2
- package/dist/tools/generateTopicalClusters.d.ts.map +1 -1
- package/dist/tools/generateTopicalClusters.js +38 -10
- package/dist/tools/generateTopicalClusters.js.map +1 -1
- package/dist/tools/getMemory.d.ts.map +1 -1
- package/dist/tools/getMemory.js +7 -5
- package/dist/tools/getMemory.js.map +1 -1
- package/dist/tools/index.d.ts +4 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/listGraphs.d.ts +1 -1
- package/dist/tools/listGraphs.d.ts.map +1 -1
- package/dist/tools/listGraphs.js +7 -5
- package/dist/tools/listGraphs.js.map +1 -1
- package/dist/tools/optimizeTextStructure.d.ts +34 -0
- package/dist/tools/optimizeTextStructure.d.ts.map +1 -0
- package/dist/tools/optimizeTextStructure.js +108 -0
- package/dist/tools/optimizeTextStructure.js.map +1 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/transformers.d.ts +2 -1
- package/dist/utils/transformers.d.ts.map +1 -1
- package/dist/utils/transformers.js +39 -1
- package/dist/utils/transformers.js.map +1 -1
- package/dist/utils/urlContent.d.ts +35 -0
- package/dist/utils/urlContent.d.ts.map +1 -0
- package/dist/utils/urlContent.js +87 -0
- package/dist/utils/urlContent.js.map +1 -0
- package/llms-full.txt +469 -0
- package/llms.txt +64 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -34,68 +34,75 @@ InfraNodus MCP Server enables LLM workflows and AI assistants to analyze text us
|
|
|
34
34
|
- Access previously saved analyses
|
|
35
35
|
- Export graph data with full statistics
|
|
36
36
|
|
|
37
|
-
3. **
|
|
37
|
+
3. **analyze_text**
|
|
38
|
+
|
|
39
|
+
- Analyze a text, URL, or YouTube transcript
|
|
40
|
+
- Extract and analyze a graph from text or URL; provide either text or url
|
|
41
|
+
- Get topics, clusters, statements, graph structure, and AI summary as requested
|
|
42
|
+
|
|
43
|
+
4. **generate_content_gaps**
|
|
38
44
|
|
|
39
45
|
- Detect missing connections in discourse
|
|
40
46
|
- Identify underexplored topics
|
|
41
47
|
- Generate research questions
|
|
42
48
|
- Suggest content development opportunities
|
|
43
49
|
|
|
44
|
-
|
|
50
|
+
5. **generate_topical_clusters**
|
|
45
51
|
|
|
46
52
|
- Generate topics and clusters of keywords from text using knowledge graph analysis
|
|
47
53
|
- Make sure to beyond genetic insights and detect smaller topics
|
|
48
54
|
- Use the topical clusters to establish topical authority for SEO
|
|
49
55
|
|
|
50
|
-
|
|
56
|
+
6. **generate_contextual_hint**
|
|
51
57
|
|
|
52
58
|
- Generate a topical overview of a text and provide insights for LLMs to generate better responses
|
|
53
59
|
- Use it to get a high-level understanding of a text
|
|
54
60
|
- Use it to augment prompts in your LLM workflows and AI assistants
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
7. **generate_research_questions**
|
|
57
63
|
|
|
58
|
-
- Generate research questions that bridge content gaps
|
|
64
|
+
- Generate research questions that bridge content gaps from text, URL, or an existing InfraNodus graph
|
|
59
65
|
- Use them as prompts in your LLM models and AI workflows
|
|
60
66
|
- Use any AI model (included in InfraNodus API)
|
|
61
67
|
- Content gaps are identified based on topical clustering
|
|
62
68
|
|
|
63
|
-
|
|
69
|
+
8. **generate_research_ideas**
|
|
64
70
|
|
|
65
71
|
- Generate innovative research ideas based on content gaps identified in the text
|
|
66
72
|
- Get actionable ideas to improve the text and develop the discourse
|
|
67
73
|
- Use any AI model (included in InfraNodus API)
|
|
68
74
|
- Ideas are generated from gaps between topical clusters
|
|
69
75
|
|
|
70
|
-
|
|
76
|
+
9. **optimize_text_structure**
|
|
71
77
|
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
78
|
+
- Analyze the level of bias and coherence in text using knowledge graph analysis
|
|
79
|
+
- If the text is too biased, develop the represented topics to balance the discourse
|
|
80
|
+
- If the text is focused or diversified, develop the content gaps to deepen the analysis
|
|
81
|
+
- If the text is dispersed, focus the most common gap topics to improve coherence
|
|
82
|
+
- Choose response type: response, idea, question, or transcend
|
|
76
83
|
|
|
77
|
-
|
|
84
|
+
10. **generate_responses_from_graph**
|
|
78
85
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
- Generate responses based on an existing InfraNodus graph
|
|
87
|
+
- Integrate them into your LLM workflows and AI assistants
|
|
88
|
+
- Use any AI model (included in InfraNodus API)
|
|
89
|
+
- Use any prompt
|
|
83
90
|
|
|
84
|
-
|
|
91
|
+
11. **develop_conceptual_bridges**
|
|
85
92
|
|
|
86
93
|
- Analyze text and develop latent ideas based on concepts that connect this text to a broader discourse
|
|
87
94
|
- Discover hidden themes and patterns that link your text to wider contexts
|
|
88
95
|
- Use any AI model (included in InfraNodus API)
|
|
89
96
|
- Generate insights that help develop the discourse
|
|
90
97
|
|
|
91
|
-
|
|
98
|
+
12. **develop_latent_topics**
|
|
92
99
|
|
|
93
100
|
- Analyze text and extract underdeveloped topics with ideas on how to develop them
|
|
94
101
|
- Identify topics that need more attention and elaboration
|
|
95
102
|
- Use any AI model (included in InfraNodus API)
|
|
96
103
|
- Get actionable suggestions for content expansion
|
|
97
104
|
|
|
98
|
-
|
|
105
|
+
13. **develop_text_tool**
|
|
99
106
|
|
|
100
107
|
- Comprehensive text analysis combining content gap ideas, latent topics, and conceptual bridges
|
|
101
108
|
- Executes multiple analyses in sequence with progress tracking
|
|
@@ -103,44 +110,49 @@ InfraNodus MCP Server enables LLM workflows and AI assistants to analyze text us
|
|
|
103
110
|
- Identifies latent topics and conceptual bridges to develop
|
|
104
111
|
- Finds content gaps for deeper exploration
|
|
105
112
|
|
|
106
|
-
|
|
113
|
+
14. **create_knowledge_graph**
|
|
107
114
|
|
|
108
115
|
- Create a knowledge graph in InfraNodus from text and provide a link to it
|
|
109
116
|
- Use it to create a knowledge graph in InfraNodus from text
|
|
110
117
|
|
|
111
|
-
|
|
118
|
+
15. **overlap_between_texts**
|
|
112
119
|
|
|
113
120
|
- Create knowledge graphs from two or more texts and find the overlap (similarities) between them
|
|
114
121
|
- Use it to find similar topics and keywords across different texts
|
|
115
122
|
|
|
116
|
-
|
|
123
|
+
16. **merged_graph_from_texts**
|
|
124
|
+
|
|
125
|
+
- Build a graph of all the texts and URLs provided, providing topical clusters and gaps present in the merged graph generated from all the texts
|
|
126
|
+
- Use it to combine multiple sources into one graph and see clusters and content gaps across the merged content
|
|
127
|
+
|
|
128
|
+
17. **difference_between_texts**
|
|
117
129
|
|
|
118
130
|
- Compare knowledge graphs from two or more texts and find what's not present in the first graph that's present in the others
|
|
119
131
|
- Use it to find how one text can be enriched with the others
|
|
120
132
|
|
|
121
|
-
|
|
133
|
+
18. **analyze_google_search_results**
|
|
122
134
|
|
|
123
135
|
- Generate a graph with keywords and topics for Google search results for a certain query
|
|
124
136
|
- Use it to understand the current informational supply (what people find)
|
|
125
137
|
|
|
126
|
-
|
|
138
|
+
19. **analyze_related_search_queries**
|
|
127
139
|
|
|
128
140
|
- Generate a graph from the search queries suggested by Google for a certain query
|
|
129
141
|
- Use it to understand the current informational demand (what people are looking for)
|
|
130
142
|
|
|
131
|
-
|
|
143
|
+
20. **search_queries_vs_search_results**
|
|
132
144
|
|
|
133
145
|
- Generate a graph of keyword combinations and topics people tend to search for that do not readily appear in the search results for the same queries
|
|
134
146
|
- Use it to understand what people search for but don't yet find
|
|
135
147
|
|
|
136
|
-
|
|
148
|
+
21. **generate_seo_report**
|
|
137
149
|
|
|
138
150
|
- Analyze content for SEO optimization by comparing it with Google search results and search queries
|
|
139
151
|
- Identify content gaps and opportunities for better search visibility
|
|
140
152
|
- Get comprehensive analysis of what's in search results but not in your text
|
|
141
153
|
- Discover what people search for but don't find in current results
|
|
142
154
|
|
|
143
|
-
|
|
155
|
+
22. **memory_add_relations**
|
|
144
156
|
|
|
145
157
|
- Add relations to the InfraNodus memory from text
|
|
146
158
|
- Automatically detect entities or use [[wikilinks]] syntax to mark them
|
|
@@ -148,7 +160,7 @@ InfraNodus MCP Server enables LLM workflows and AI assistants to analyze text us
|
|
|
148
160
|
- Support automatic entity extraction or manual entity marking
|
|
149
161
|
- Provide links to created memory graphs for easy access
|
|
150
162
|
|
|
151
|
-
|
|
163
|
+
23. **memory_get_relations**
|
|
152
164
|
|
|
153
165
|
- Retrieve relations from InfraNodus memory for specific entities
|
|
154
166
|
- Search for entity relations using [[wikilinks]] syntax
|
|
@@ -156,7 +168,7 @@ InfraNodus MCP Server enables LLM workflows and AI assistants to analyze text us
|
|
|
156
168
|
- Extract statements and relationships from stored knowledge graphs
|
|
157
169
|
- Support both entity-specific searches and full context retrieval
|
|
158
170
|
|
|
159
|
-
|
|
171
|
+
24. **retrieve_from_knowledge_base**
|
|
160
172
|
|
|
161
173
|
- Retrieve context from an existing InfraNodus knowledge graph using GraphRAG
|
|
162
174
|
- Query your knowledge base with a natural language prompt to get relevant statements
|
|
@@ -164,13 +176,13 @@ InfraNodus MCP Server enables LLM workflows and AI assistants to analyze text us
|
|
|
164
176
|
- Optionally retrieve the full graph, statements, or extended analysis
|
|
165
177
|
- Ideal for augmenting LLM responses with domain-specific knowledge
|
|
166
178
|
|
|
167
|
-
|
|
179
|
+
25. **search**
|
|
168
180
|
|
|
169
181
|
- Search through existing InfraNodus graphs
|
|
170
182
|
- Also use it to search through the public graphs of a specific user
|
|
171
183
|
- Compatible with ChatGPT Deep Research mode via Developer Mode > Connectors
|
|
172
184
|
|
|
173
|
-
|
|
185
|
+
26. **fetch**
|
|
174
186
|
|
|
175
187
|
- Fetch a specific search result for a graph
|
|
176
188
|
- Can be used in ChatGPT Deep Research mode via Developer Mode > Connectors
|
|
@@ -523,6 +535,20 @@ Retrieves and analyzes an existing graph from your InfraNodus account.
|
|
|
523
535
|
- `includeStatements` (boolean): Include statements in response
|
|
524
536
|
- `includeGraphSummary` (boolean): Include graph summary
|
|
525
537
|
|
|
538
|
+
### analyze_text
|
|
539
|
+
|
|
540
|
+
Analyze a text, URL, or YouTube transcript. Extract and analyze a graph from text or URL; provide either text or url.
|
|
541
|
+
|
|
542
|
+
**Parameters:**
|
|
543
|
+
|
|
544
|
+
- `text` (string, optional): Text to analyze. Provide either this or url.
|
|
545
|
+
- `url` (string, optional): URL to fetch content from (e.g. webpage or YouTube transcript). Provide either this or text.
|
|
546
|
+
- `includeStatements` (boolean): Include processed statements in response
|
|
547
|
+
- `includeGraph` (boolean): Include full graph structure in response
|
|
548
|
+
- `addNodesAndEdges` (boolean): Include nodes and edges in response
|
|
549
|
+
- `includeGraphSummary` (boolean): Include AI-generated graph summary for RAG prompt augmentation
|
|
550
|
+
- `modifyAnalyzedText` (string): Entity detection — "none", "detectEntities", or "extractEntitiesOnly"
|
|
551
|
+
|
|
526
552
|
### generate_content_gaps
|
|
527
553
|
|
|
528
554
|
Identifies content gaps and missing connections in text.
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,wBAAsB,qBAAqB,CAC1C,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,GAAG,EACT,MAAM,GAAE,MAAe,GACrB,OAAO,CAAC,aAAa,CAAC,CAgCxB"}
|
package/dist/api/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { getConfig } from "./config-store.js";
|
|
1
2
|
export async function makeInfraNodusRequest(endpoint, body, method = "POST") {
|
|
2
3
|
try {
|
|
3
|
-
|
|
4
|
-
const config = global.infranodusConfig;
|
|
4
|
+
const config = getConfig();
|
|
5
5
|
const requestBody = { ...body, modal: "mcp_server" };
|
|
6
6
|
const response = await fetch(`${config.apiBase}${endpoint}`, {
|
|
7
7
|
method,
|
package/dist/api/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAC1C,QAAgB,EAChB,IAAS,EACT,SAAiB,MAAM;IAEvB,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAE3B,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QAErD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,MAAM,CAAC,OAAO,GAAG,QAAQ,EAAE,EAAE;YAC5D,MAAM;YACN,OAAO,EAAE;gBACR,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,UAAU,MAAM,CAAC,MAAM,EAAE;aACxC;YACD,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;SAC9D,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YAClB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,CAAC,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC;QAC1E,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAEnC,iCAAiC;QACjC,IAAI,IAAI,CAAC,wBAAwB,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,wBAAwB,CAAC;QACtC,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,0DAA0D;QAC1D,MAAM,KAAK,CAAC;IACb,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-store.d.ts","sourceRoot":"","sources":["../../src/api/config-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI5C,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAE/D;AAED,wBAAgB,SAAS,IAAI,MAAM,CAMlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
const configStorage = new AsyncLocalStorage();
|
|
3
|
+
export function runWithConfig(config, fn) {
|
|
4
|
+
return configStorage.run(config, fn);
|
|
5
|
+
}
|
|
6
|
+
export function getConfig() {
|
|
7
|
+
return (configStorage.getStore() ??
|
|
8
|
+
global.infranodusConfig ??
|
|
9
|
+
{ apiKey: "", apiBase: "https://infranodus.com/api/v1" });
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=config-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-store.js","sourceRoot":"","sources":["../../src/api/config-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,MAAM,aAAa,GAAG,IAAI,iBAAiB,EAAU,CAAC;AAEtD,MAAM,UAAU,aAAa,CAAI,MAAc,EAAE,EAAW;IAC3D,OAAO,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,SAAS;IACxB,OAAO,CACN,aAAa,CAAC,QAAQ,EAAE;QACvB,MAAc,CAAC,gBAAgB;QAChC,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,+BAA+B,EAAE,CACxD,CAAC;AACH,CAAC"}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -2,12 +2,18 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const configSchema: z.ZodObject<{
|
|
3
3
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
4
4
|
apiBase: z.ZodDefault<z.ZodString>;
|
|
5
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
5
7
|
}, "strip", z.ZodTypeAny, {
|
|
6
8
|
apiBase: string;
|
|
7
9
|
apiKey?: string | undefined;
|
|
10
|
+
userId?: number | undefined;
|
|
11
|
+
userName?: string | undefined;
|
|
8
12
|
}, {
|
|
9
13
|
apiKey?: string | undefined;
|
|
10
14
|
apiBase?: string | undefined;
|
|
15
|
+
userId?: number | undefined;
|
|
16
|
+
userName?: string | undefined;
|
|
11
17
|
}>;
|
|
12
18
|
export type Config = z.infer<typeof configSchema>;
|
|
13
19
|
export declare const serverInfo: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;EAQvB,CAAC;AAGH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAGlD,eAAO,MAAM,UAAU;;;;CAKtB,CAAC"}
|
package/dist/config/index.js
CHANGED
|
@@ -6,6 +6,8 @@ export const configSchema = z.object({
|
|
|
6
6
|
.string()
|
|
7
7
|
.default("https://infranodus.com/api/v1")
|
|
8
8
|
.describe("InfraNodus API base URL"),
|
|
9
|
+
userId: z.number().optional().describe("Authenticated user ID"),
|
|
10
|
+
userName: z.string().optional().describe("Authenticated user name"),
|
|
9
11
|
});
|
|
10
12
|
// Server metadata
|
|
11
13
|
export const serverInfo = {
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+CAA+C;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IACjE,OAAO,EAAE,CAAC;SACR,MAAM,EAAE;SACR,OAAO,CAAC,+BAA+B,CAAC;SACxC,QAAQ,CAAC,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+CAA+C;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IACjE,OAAO,EAAE,CAAC;SACR,MAAM,EAAE;SACR,OAAO,CAAC,+BAA+B,CAAC;SACxC,QAAQ,CAAC,yBAAyB,CAAC;IACrC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAC/D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;CACnE,CAAC,CAAC;AAKH,kBAAkB;AAClB,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,OAAO;IAChB,WAAW,EACV,qHAAqH;CACtH,CAAC"}
|