learngraph 0.5.0 → 0.7.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/dist/cjs/api/routes/analytics.js +288 -0
- package/dist/cjs/api/routes/analytics.js.map +1 -0
- package/dist/cjs/api/routes/assessments.js +269 -0
- package/dist/cjs/api/routes/assessments.js.map +1 -0
- package/dist/cjs/api/routes/curriculum.js +345 -0
- package/dist/cjs/api/routes/curriculum.js.map +1 -0
- package/dist/cjs/api/routes/edges.js +162 -0
- package/dist/cjs/api/routes/edges.js.map +1 -0
- package/dist/cjs/api/routes/explore.js +224 -0
- package/dist/cjs/api/routes/explore.js.map +1 -0
- package/dist/cjs/api/routes/learners.js +324 -0
- package/dist/cjs/api/routes/learners.js.map +1 -0
- package/dist/cjs/api/routes/me.js +404 -0
- package/dist/cjs/api/routes/me.js.map +1 -0
- package/dist/cjs/api/routes/skills.js +319 -0
- package/dist/cjs/api/routes/skills.js.map +1 -0
- package/dist/cjs/api/server.js +185 -0
- package/dist/cjs/api/server.js.map +1 -0
- package/dist/cjs/api/types.js +10 -0
- package/dist/cjs/api/types.js.map +1 -0
- package/dist/cjs/assessment/adaptive.js +390 -0
- package/dist/cjs/assessment/adaptive.js.map +1 -0
- package/dist/cjs/assessment/bkt.js +362 -0
- package/dist/cjs/assessment/bkt.js.map +1 -0
- package/dist/cjs/assessment/index.js +54 -0
- package/dist/cjs/assessment/index.js.map +1 -0
- package/dist/cjs/assessment/irt.js +420 -0
- package/dist/cjs/assessment/irt.js.map +1 -0
- package/dist/cjs/assessment/mastery-engine.js +411 -0
- package/dist/cjs/assessment/mastery-engine.js.map +1 -0
- package/dist/cjs/components/LearningPathView.js +320 -0
- package/dist/cjs/components/LearningPathView.js.map +1 -0
- package/dist/cjs/components/ProgressDashboard.js +308 -0
- package/dist/cjs/components/ProgressDashboard.js.map +1 -0
- package/dist/cjs/components/SkillCard.js +264 -0
- package/dist/cjs/components/SkillCard.js.map +1 -0
- package/dist/cjs/components/SkillExplorer.js +401 -0
- package/dist/cjs/components/SkillExplorer.js.map +1 -0
- package/dist/cjs/components/SkillGraph.js +435 -0
- package/dist/cjs/components/SkillGraph.js.map +1 -0
- package/dist/cjs/components/hooks.js +510 -0
- package/dist/cjs/components/hooks.js.map +1 -0
- package/dist/cjs/components/index.js +77 -0
- package/dist/cjs/components/index.js.map +1 -0
- package/dist/cjs/components/types.js +34 -0
- package/dist/cjs/components/types.js.map +1 -0
- package/dist/cjs/index.js +35 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/llm/adapters/anthropic.js +91 -3
- package/dist/cjs/llm/adapters/anthropic.js.map +1 -1
- package/dist/cjs/llm/adapters/gemini.js +101 -8
- package/dist/cjs/llm/adapters/gemini.js.map +1 -1
- package/dist/cjs/llm/adapters/index.js +42 -1
- package/dist/cjs/llm/adapters/index.js.map +1 -1
- package/dist/cjs/llm/adapters/ollama.js +120 -3
- package/dist/cjs/llm/adapters/ollama.js.map +1 -1
- package/dist/cjs/llm/adapters/openai.js +108 -2
- package/dist/cjs/llm/adapters/openai.js.map +1 -1
- package/dist/cjs/mcp/cli.js +302 -0
- package/dist/cjs/mcp/cli.js.map +1 -0
- package/dist/cjs/mcp/index.js +79 -0
- package/dist/cjs/mcp/index.js.map +1 -0
- package/dist/cjs/mcp/prompts.js +425 -0
- package/dist/cjs/mcp/prompts.js.map +1 -0
- package/dist/cjs/mcp/resources.js +371 -0
- package/dist/cjs/mcp/resources.js.map +1 -0
- package/dist/cjs/mcp/server.js +410 -0
- package/dist/cjs/mcp/server.js.map +1 -0
- package/dist/cjs/mcp/tools.js +612 -0
- package/dist/cjs/mcp/tools.js.map +1 -0
- package/dist/cjs/mcp/types.js +10 -0
- package/dist/cjs/mcp/types.js.map +1 -0
- package/dist/cjs/types/assessment.js +46 -0
- package/dist/cjs/types/assessment.js.map +1 -0
- package/dist/cjs/types/bloom.js +12 -1
- package/dist/cjs/types/bloom.js.map +1 -1
- package/dist/cjs/types/index.js +7 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/esm/api/routes/analytics.js +285 -0
- package/dist/esm/api/routes/analytics.js.map +1 -0
- package/dist/esm/api/routes/assessments.js +266 -0
- package/dist/esm/api/routes/assessments.js.map +1 -0
- package/dist/esm/api/routes/curriculum.js +342 -0
- package/dist/esm/api/routes/curriculum.js.map +1 -0
- package/dist/esm/api/routes/edges.js +159 -0
- package/dist/esm/api/routes/edges.js.map +1 -0
- package/dist/esm/api/routes/explore.js +221 -0
- package/dist/esm/api/routes/explore.js.map +1 -0
- package/dist/esm/api/routes/learners.js +321 -0
- package/dist/esm/api/routes/learners.js.map +1 -0
- package/dist/esm/api/routes/me.js +401 -0
- package/dist/esm/api/routes/me.js.map +1 -0
- package/dist/esm/api/routes/skills.js +316 -0
- package/dist/esm/api/routes/skills.js.map +1 -0
- package/dist/esm/api/server.js +179 -0
- package/dist/esm/api/server.js.map +1 -0
- package/dist/esm/api/types.js +9 -0
- package/dist/esm/api/types.js.map +1 -0
- package/dist/esm/assessment/adaptive.js +384 -0
- package/dist/esm/assessment/adaptive.js.map +1 -0
- package/dist/esm/assessment/bkt.js +354 -0
- package/dist/esm/assessment/bkt.js.map +1 -0
- package/dist/esm/assessment/index.js +21 -0
- package/dist/esm/assessment/index.js.map +1 -0
- package/dist/esm/assessment/irt.js +406 -0
- package/dist/esm/assessment/irt.js.map +1 -0
- package/dist/esm/assessment/mastery-engine.js +406 -0
- package/dist/esm/assessment/mastery-engine.js.map +1 -0
- package/dist/esm/components/LearningPathView.js +316 -0
- package/dist/esm/components/LearningPathView.js.map +1 -0
- package/dist/esm/components/ProgressDashboard.js +304 -0
- package/dist/esm/components/ProgressDashboard.js.map +1 -0
- package/dist/esm/components/SkillCard.js +260 -0
- package/dist/esm/components/SkillCard.js.map +1 -0
- package/dist/esm/components/SkillExplorer.js +397 -0
- package/dist/esm/components/SkillExplorer.js.map +1 -0
- package/dist/esm/components/SkillGraph.js +398 -0
- package/dist/esm/components/SkillGraph.js.map +1 -0
- package/dist/esm/components/hooks.js +502 -0
- package/dist/esm/components/hooks.js.map +1 -0
- package/dist/esm/components/index.js +61 -0
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/components/types.js +31 -0
- package/dist/esm/components/types.js.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/llm/adapters/anthropic.js +88 -2
- package/dist/esm/llm/adapters/anthropic.js.map +1 -1
- package/dist/esm/llm/adapters/gemini.js +98 -7
- package/dist/esm/llm/adapters/gemini.js.map +1 -1
- package/dist/esm/llm/adapters/index.js +15 -4
- package/dist/esm/llm/adapters/index.js.map +1 -1
- package/dist/esm/llm/adapters/ollama.js +117 -2
- package/dist/esm/llm/adapters/ollama.js.map +1 -1
- package/dist/esm/llm/adapters/openai.js +105 -1
- package/dist/esm/llm/adapters/openai.js.map +1 -1
- package/dist/esm/mcp/cli.js +267 -0
- package/dist/esm/mcp/cli.js.map +1 -0
- package/dist/esm/mcp/index.js +39 -0
- package/dist/esm/mcp/index.js.map +1 -0
- package/dist/esm/mcp/prompts.js +419 -0
- package/dist/esm/mcp/prompts.js.map +1 -0
- package/dist/esm/mcp/resources.js +359 -0
- package/dist/esm/mcp/resources.js.map +1 -0
- package/dist/esm/mcp/server.js +372 -0
- package/dist/esm/mcp/server.js.map +1 -0
- package/dist/esm/mcp/tools.js +598 -0
- package/dist/esm/mcp/tools.js.map +1 -0
- package/dist/esm/mcp/types.js +9 -0
- package/dist/esm/mcp/types.js.map +1 -0
- package/dist/esm/types/assessment.js +40 -0
- package/dist/esm/types/assessment.js.map +1 -0
- package/dist/esm/types/bloom.js +11 -0
- package/dist/esm/types/bloom.js.map +1 -1
- package/dist/esm/types/index.js +2 -1
- package/dist/esm/types/index.js.map +1 -1
- package/dist/types/api/routes/analytics.d.ts +14 -0
- package/dist/types/api/routes/analytics.d.ts.map +1 -0
- package/dist/types/api/routes/assessments.d.ts +14 -0
- package/dist/types/api/routes/assessments.d.ts.map +1 -0
- package/dist/types/api/routes/curriculum.d.ts +14 -0
- package/dist/types/api/routes/curriculum.d.ts.map +1 -0
- package/dist/types/api/routes/edges.d.ts +14 -0
- package/dist/types/api/routes/edges.d.ts.map +1 -0
- package/dist/types/api/routes/explore.d.ts +14 -0
- package/dist/types/api/routes/explore.d.ts.map +1 -0
- package/dist/types/api/routes/learners.d.ts +14 -0
- package/dist/types/api/routes/learners.d.ts.map +1 -0
- package/dist/types/api/routes/me.d.ts +14 -0
- package/dist/types/api/routes/me.d.ts.map +1 -0
- package/dist/types/api/routes/skills.d.ts +14 -0
- package/dist/types/api/routes/skills.d.ts.map +1 -0
- package/dist/types/api/server.d.ts +147 -0
- package/dist/types/api/server.d.ts.map +1 -0
- package/dist/types/api/types.d.ts +443 -0
- package/dist/types/api/types.d.ts.map +1 -0
- package/dist/types/assessment/adaptive.d.ts +155 -0
- package/dist/types/assessment/adaptive.d.ts.map +1 -0
- package/dist/types/assessment/bkt.d.ts +185 -0
- package/dist/types/assessment/bkt.d.ts.map +1 -0
- package/dist/types/assessment/index.d.ts +18 -0
- package/dist/types/assessment/index.d.ts.map +1 -0
- package/dist/types/assessment/irt.d.ts +159 -0
- package/dist/types/assessment/irt.d.ts.map +1 -0
- package/dist/types/assessment/mastery-engine.d.ts +178 -0
- package/dist/types/assessment/mastery-engine.d.ts.map +1 -0
- package/dist/types/components/LearningPathView.d.ts +40 -0
- package/dist/types/components/LearningPathView.d.ts.map +1 -0
- package/dist/types/components/ProgressDashboard.d.ts +49 -0
- package/dist/types/components/ProgressDashboard.d.ts.map +1 -0
- package/dist/types/components/SkillCard.d.ts +34 -0
- package/dist/types/components/SkillCard.d.ts.map +1 -0
- package/dist/types/components/SkillExplorer.d.ts +39 -0
- package/dist/types/components/SkillExplorer.d.ts.map +1 -0
- package/dist/types/components/SkillGraph.d.ts +38 -0
- package/dist/types/components/SkillGraph.d.ts.map +1 -0
- package/dist/types/components/hooks.d.ts +187 -0
- package/dist/types/components/hooks.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +59 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/types.d.ts +410 -0
- package/dist/types/components/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/llm/adapters/anthropic.d.ts +84 -1
- package/dist/types/llm/adapters/anthropic.d.ts.map +1 -1
- package/dist/types/llm/adapters/gemini.d.ts +93 -6
- package/dist/types/llm/adapters/gemini.d.ts.map +1 -1
- package/dist/types/llm/adapters/index.d.ts +13 -4
- package/dist/types/llm/adapters/index.d.ts.map +1 -1
- package/dist/types/llm/adapters/ollama.d.ts +126 -1
- package/dist/types/llm/adapters/ollama.d.ts.map +1 -1
- package/dist/types/llm/adapters/openai.d.ts +104 -1
- package/dist/types/llm/adapters/openai.d.ts.map +1 -1
- package/dist/types/mcp/cli.d.ts +15 -0
- package/dist/types/mcp/cli.d.ts.map +1 -0
- package/dist/types/mcp/index.d.ts +32 -0
- package/dist/types/mcp/index.d.ts.map +1 -0
- package/dist/types/mcp/prompts.d.ts +27 -0
- package/dist/types/mcp/prompts.d.ts.map +1 -0
- package/dist/types/mcp/resources.d.ts +59 -0
- package/dist/types/mcp/resources.d.ts.map +1 -0
- package/dist/types/mcp/server.d.ts +136 -0
- package/dist/types/mcp/server.d.ts.map +1 -0
- package/dist/types/mcp/tools.d.ts +344 -0
- package/dist/types/mcp/tools.d.ts.map +1 -0
- package/dist/types/mcp/types.d.ts +137 -0
- package/dist/types/mcp/types.d.ts.map +1 -0
- package/dist/types/types/assessment.d.ts +512 -0
- package/dist/types/types/assessment.d.ts.map +1 -0
- package/dist/types/types/bloom.d.ts +4 -0
- package/dist/types/types/bloom.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +3 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +48 -3
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* LLM adapter exports
|
|
3
3
|
*
|
|
4
|
+
* All adapters support flexible model selection:
|
|
5
|
+
* - Use model aliases for convenience (e.g., 'sonnet-4.5', 'gpt-5', 'gemini-3-flash')
|
|
6
|
+
* - Use full model IDs for specific versions
|
|
7
|
+
* - Use any valid model ID string for future models
|
|
8
|
+
*
|
|
4
9
|
* @packageDocumentation
|
|
5
10
|
*/
|
|
6
11
|
export { BaseLLMAdapter, LLMError, DEFAULT_CONFIG } from './base.js';
|
|
7
12
|
export type { LLMErrorCode } from './base.js';
|
|
8
|
-
export { OpenAIAdapter, createOpenAIAdapter } from './openai.js';
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
13
|
+
export { OpenAIAdapter, createOpenAIAdapter, resolveOpenAIModel, listOpenAIModels, OPENAI_MODELS, GPT_5_MODELS, O_SERIES_MODELS, GPT_4_1_MODELS, GPT_4O_MODELS, GPT_4_LEGACY_MODELS, } from './openai.js';
|
|
14
|
+
export type { OpenAIModelAlias } from './openai.js';
|
|
15
|
+
export { AnthropicAdapter, createAnthropicAdapter, resolveClaudeModel, listClaudeModels, CLAUDE_MODELS, CLAUDE_4_5_MODELS, CLAUDE_4_MODELS, CLAUDE_3_5_MODELS, CLAUDE_3_MODELS, } from './anthropic.js';
|
|
16
|
+
export type { ClaudeModelAlias } from './anthropic.js';
|
|
17
|
+
export { OllamaAdapter, createOllamaAdapter, resolveOllamaModel, listOllamaModels, OLLAMA_MODELS, LLAMA_MODELS, MISTRAL_MODELS, QWEN_MODELS, CODING_MODELS, SMALL_MODELS, } from './ollama.js';
|
|
18
|
+
export type { OllamaModelAlias } from './ollama.js';
|
|
19
|
+
export { GeminiAdapter, createGeminiAdapter, resolveGeminiModel, listGeminiModels, GEMINI_MODELS, GEMINI_3_MODELS, GEMINI_2_5_MODELS, GEMINI_2_0_MODELS, GEMINI_1_5_MODELS, } from './gemini.js';
|
|
20
|
+
export type { GeminiModelAlias } from './gemini.js';
|
|
12
21
|
export { OpenRouterAdapter, createOpenRouterAdapter, OPENROUTER_MODELS } from './openrouter.js';
|
|
13
22
|
export { MediaPipeAdapter, createMediaPipeAdapter, MEDIAPIPE_MODELS } from './mediapipe.js';
|
|
14
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/llm/adapters/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/llm/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACrE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,cAAc,EACd,aAAa,EACb,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGhG,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,10 +1,109 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Ollama adapter for local LLM integration
|
|
3
3
|
*
|
|
4
|
+
* Supports any model available through Ollama including Llama, Mistral, Qwen, and more.
|
|
5
|
+
*
|
|
4
6
|
* @packageDocumentation
|
|
5
7
|
*/
|
|
6
8
|
import type { LLMProvider, OllamaConfig, CompletionRequest, CompletionResponse } from '../../types/llm.js';
|
|
7
9
|
import { BaseLLMAdapter } from './base.js';
|
|
10
|
+
/**
|
|
11
|
+
* Meta Llama Models (Latest)
|
|
12
|
+
* - llama3.3: 70B parameter model, excellent general purpose
|
|
13
|
+
* - llama3.2: Available in 1B, 3B, and vision variants
|
|
14
|
+
*/
|
|
15
|
+
export declare const LLAMA_MODELS: {
|
|
16
|
+
readonly 'llama3.3': "llama3.3";
|
|
17
|
+
readonly 'llama3.3:70b': "llama3.3:70b";
|
|
18
|
+
readonly 'llama3.2': "llama3.2";
|
|
19
|
+
readonly 'llama3.2:1b': "llama3.2:1b";
|
|
20
|
+
readonly 'llama3.2:3b': "llama3.2:3b";
|
|
21
|
+
readonly 'llama3.2-vision': "llama3.2-vision";
|
|
22
|
+
readonly 'llama3.1': "llama3.1";
|
|
23
|
+
readonly 'llama3.1:8b': "llama3.1:8b";
|
|
24
|
+
readonly 'llama3.1:70b': "llama3.1:70b";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Mistral Models
|
|
28
|
+
* - mistral-large: Most capable Mistral model
|
|
29
|
+
* - mistral-nemo: Fast, efficient
|
|
30
|
+
* - mixtral: Mixture of experts
|
|
31
|
+
*/
|
|
32
|
+
export declare const MISTRAL_MODELS: {
|
|
33
|
+
readonly 'mistral-large': "mistral-large";
|
|
34
|
+
readonly 'mistral-nemo': "mistral-nemo";
|
|
35
|
+
readonly mistral: "mistral";
|
|
36
|
+
readonly mixtral: "mixtral";
|
|
37
|
+
readonly 'mixtral:8x7b': "mixtral:8x7b";
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Qwen Models (Alibaba)
|
|
41
|
+
* - qwen2.5: Latest Qwen release
|
|
42
|
+
* - qwen2.5-coder: Optimized for coding
|
|
43
|
+
*/
|
|
44
|
+
export declare const QWEN_MODELS: {
|
|
45
|
+
readonly 'qwen2.5': "qwen2.5";
|
|
46
|
+
readonly 'qwen2.5:72b': "qwen2.5:72b";
|
|
47
|
+
readonly 'qwen2.5-coder': "qwen2.5-coder";
|
|
48
|
+
readonly qwen2: "qwen2";
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Coding-Focused Models
|
|
52
|
+
*/
|
|
53
|
+
export declare const CODING_MODELS: {
|
|
54
|
+
readonly codellama: "codellama";
|
|
55
|
+
readonly 'deepseek-coder-v2': "deepseek-coder-v2";
|
|
56
|
+
readonly codegemma: "codegemma";
|
|
57
|
+
readonly starcoder2: "starcoder2";
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Small/Fast Models
|
|
61
|
+
*/
|
|
62
|
+
export declare const SMALL_MODELS: {
|
|
63
|
+
readonly phi3: "phi3";
|
|
64
|
+
readonly 'phi3:mini': "phi3:mini";
|
|
65
|
+
readonly gemma2: "gemma2";
|
|
66
|
+
readonly 'gemma2:2b': "gemma2:2b";
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* All popular Ollama models
|
|
70
|
+
*/
|
|
71
|
+
export declare const OLLAMA_MODELS: {
|
|
72
|
+
readonly phi3: "phi3";
|
|
73
|
+
readonly 'phi3:mini': "phi3:mini";
|
|
74
|
+
readonly gemma2: "gemma2";
|
|
75
|
+
readonly 'gemma2:2b': "gemma2:2b";
|
|
76
|
+
readonly codellama: "codellama";
|
|
77
|
+
readonly 'deepseek-coder-v2': "deepseek-coder-v2";
|
|
78
|
+
readonly codegemma: "codegemma";
|
|
79
|
+
readonly starcoder2: "starcoder2";
|
|
80
|
+
readonly 'qwen2.5': "qwen2.5";
|
|
81
|
+
readonly 'qwen2.5:72b': "qwen2.5:72b";
|
|
82
|
+
readonly 'qwen2.5-coder': "qwen2.5-coder";
|
|
83
|
+
readonly qwen2: "qwen2";
|
|
84
|
+
readonly 'mistral-large': "mistral-large";
|
|
85
|
+
readonly 'mistral-nemo': "mistral-nemo";
|
|
86
|
+
readonly mistral: "mistral";
|
|
87
|
+
readonly mixtral: "mixtral";
|
|
88
|
+
readonly 'mixtral:8x7b': "mixtral:8x7b";
|
|
89
|
+
readonly 'llama3.3': "llama3.3";
|
|
90
|
+
readonly 'llama3.3:70b': "llama3.3:70b";
|
|
91
|
+
readonly 'llama3.2': "llama3.2";
|
|
92
|
+
readonly 'llama3.2:1b': "llama3.2:1b";
|
|
93
|
+
readonly 'llama3.2:3b': "llama3.2:3b";
|
|
94
|
+
readonly 'llama3.2-vision': "llama3.2-vision";
|
|
95
|
+
readonly 'llama3.1': "llama3.1";
|
|
96
|
+
readonly 'llama3.1:8b': "llama3.1:8b";
|
|
97
|
+
readonly 'llama3.1:70b': "llama3.1:70b";
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Model alias type for convenient model selection
|
|
101
|
+
*/
|
|
102
|
+
export type OllamaModelAlias = keyof typeof OLLAMA_MODELS;
|
|
103
|
+
/**
|
|
104
|
+
* Resolve a model alias or name (passthrough for Ollama since names are direct)
|
|
105
|
+
*/
|
|
106
|
+
export declare function resolveOllamaModel(modelOrAlias: string): string;
|
|
8
107
|
/**
|
|
9
108
|
* Ollama adapter for local models
|
|
10
109
|
*/
|
|
@@ -25,6 +124,32 @@ export declare class OllamaAdapter extends BaseLLMAdapter {
|
|
|
25
124
|
}
|
|
26
125
|
/**
|
|
27
126
|
* Create an Ollama adapter
|
|
127
|
+
*
|
|
128
|
+
* @param model - Any model name that's been pulled via `ollama pull <model>`
|
|
129
|
+
* Common models: llama3.3, mistral, qwen2.5, codellama
|
|
130
|
+
* Run `ollama list` to see installed models.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* // Using latest Llama model
|
|
135
|
+
* const adapter = createOllamaAdapter('llama3.3');
|
|
136
|
+
*
|
|
137
|
+
* // Using Mistral
|
|
138
|
+
* const adapter = createOllamaAdapter('mistral-large');
|
|
139
|
+
*
|
|
140
|
+
* // Using coding-focused model
|
|
141
|
+
* const adapter = createOllamaAdapter('qwen2.5-coder');
|
|
142
|
+
*
|
|
143
|
+
* // Using any custom or fine-tuned model
|
|
144
|
+
* const adapter = createOllamaAdapter('my-custom-model');
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
export declare function createOllamaAdapter(model?: OllamaModelAlias | string, overrides?: Partial<OllamaConfig>): OllamaAdapter;
|
|
148
|
+
/**
|
|
149
|
+
* List popular Ollama model aliases
|
|
28
150
|
*/
|
|
29
|
-
export declare function
|
|
151
|
+
export declare function listOllamaModels(): {
|
|
152
|
+
alias: string;
|
|
153
|
+
modelId: string;
|
|
154
|
+
}[];
|
|
30
155
|
//# sourceMappingURL=ollama.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ollama.d.ts","sourceRoot":"","sources":["../../../../src/llm/adapters/ollama.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ollama.d.ts","sourceRoot":"","sources":["../../../../src/llm/adapters/ollama.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAA4B,MAAM,WAAW,CAAC;AAS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AI adapter for LLM integration
|
|
3
3
|
*
|
|
4
|
+
* Supports all OpenAI models including GPT-5, o3, and GPT-4.1 families.
|
|
5
|
+
*
|
|
4
6
|
* @packageDocumentation
|
|
5
7
|
*/
|
|
6
8
|
import type { LLMProvider, OpenAIConfig, CompletionRequest, CompletionResponse } from '../../types/llm.js';
|
|
7
9
|
import { BaseLLMAdapter } from './base.js';
|
|
10
|
+
/**
|
|
11
|
+
* GPT-5 Models (Latest - 2025)
|
|
12
|
+
* - gpt-5: Flagship model for general-purpose and agentic use
|
|
13
|
+
* - gpt-5-mini: Smaller, faster version
|
|
14
|
+
* - gpt-5-nano: Smallest, most cost-effective
|
|
15
|
+
*/
|
|
16
|
+
export declare const GPT_5_MODELS: {
|
|
17
|
+
readonly 'gpt-5': "gpt-5";
|
|
18
|
+
readonly 'gpt-5-mini': "gpt-5-mini";
|
|
19
|
+
readonly 'gpt-5-nano': "gpt-5-nano";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* o-Series Reasoning Models (Latest - 2025)
|
|
23
|
+
* - o3: Most powerful reasoning model
|
|
24
|
+
* - o3-pro: Extended thinking for complex tasks
|
|
25
|
+
* - o4-mini: Fast, cost-efficient reasoning
|
|
26
|
+
*/
|
|
27
|
+
export declare const O_SERIES_MODELS: {
|
|
28
|
+
readonly o3: "o3";
|
|
29
|
+
readonly 'o3-pro': "o3-pro";
|
|
30
|
+
readonly 'o4-mini': "o4-mini";
|
|
31
|
+
readonly o1: "o1";
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* GPT-4.1 Models (2025)
|
|
35
|
+
* - Major gains in coding and instruction following
|
|
36
|
+
* - Up to 1M token context
|
|
37
|
+
*/
|
|
38
|
+
export declare const GPT_4_1_MODELS: {
|
|
39
|
+
readonly 'gpt-4.1': "gpt-4.1";
|
|
40
|
+
readonly 'gpt-4.1-mini': "gpt-4.1-mini";
|
|
41
|
+
readonly 'gpt-4.1-nano': "gpt-4.1-nano";
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* GPT-4o Models (2024-2025)
|
|
45
|
+
* - Optimized for speed and multimodal
|
|
46
|
+
*/
|
|
47
|
+
export declare const GPT_4O_MODELS: {
|
|
48
|
+
readonly 'gpt-4o': "gpt-4o";
|
|
49
|
+
readonly 'gpt-4o-mini': "gpt-4o-mini";
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Legacy GPT-4 Models
|
|
53
|
+
*/
|
|
54
|
+
export declare const GPT_4_LEGACY_MODELS: {
|
|
55
|
+
readonly 'gpt-4-turbo': "gpt-4-turbo";
|
|
56
|
+
readonly 'gpt-4': "gpt-4";
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* All available OpenAI models
|
|
60
|
+
*/
|
|
61
|
+
export declare const OPENAI_MODELS: {
|
|
62
|
+
readonly 'gpt-4-turbo': "gpt-4-turbo";
|
|
63
|
+
readonly 'gpt-4': "gpt-4";
|
|
64
|
+
readonly 'gpt-4o': "gpt-4o";
|
|
65
|
+
readonly 'gpt-4o-mini': "gpt-4o-mini";
|
|
66
|
+
readonly 'gpt-4.1': "gpt-4.1";
|
|
67
|
+
readonly 'gpt-4.1-mini': "gpt-4.1-mini";
|
|
68
|
+
readonly 'gpt-4.1-nano': "gpt-4.1-nano";
|
|
69
|
+
readonly o3: "o3";
|
|
70
|
+
readonly 'o3-pro': "o3-pro";
|
|
71
|
+
readonly 'o4-mini': "o4-mini";
|
|
72
|
+
readonly o1: "o1";
|
|
73
|
+
readonly 'gpt-5': "gpt-5";
|
|
74
|
+
readonly 'gpt-5-mini': "gpt-5-mini";
|
|
75
|
+
readonly 'gpt-5-nano': "gpt-5-nano";
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Model alias type for convenient model selection
|
|
79
|
+
*/
|
|
80
|
+
export type OpenAIModelAlias = keyof typeof OPENAI_MODELS;
|
|
81
|
+
/**
|
|
82
|
+
* Resolve a model alias or ID to the full model ID
|
|
83
|
+
*/
|
|
84
|
+
export declare function resolveOpenAIModel(modelOrAlias: string): string;
|
|
8
85
|
/**
|
|
9
86
|
* OpenAI adapter for chat completions
|
|
10
87
|
*/
|
|
@@ -17,6 +94,32 @@ export declare class OpenAIAdapter extends BaseLLMAdapter {
|
|
|
17
94
|
}
|
|
18
95
|
/**
|
|
19
96
|
* Create an OpenAI adapter from environment variables
|
|
97
|
+
*
|
|
98
|
+
* @param model - Model ID or alias (e.g., 'gpt-5', 'o3', 'gpt-4.1', 'gpt-4o')
|
|
99
|
+
* Use aliases for convenience or full model IDs for specific versions.
|
|
100
|
+
* Any valid OpenAI model ID will work - not limited to the aliases.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* // Using current flagship model
|
|
105
|
+
* const adapter = createOpenAIAdapter('gpt-5');
|
|
106
|
+
*
|
|
107
|
+
* // Using reasoning model for complex tasks
|
|
108
|
+
* const adapter = createOpenAIAdapter('o3');
|
|
109
|
+
*
|
|
110
|
+
* // Using fast, cost-effective reasoning
|
|
111
|
+
* const adapter = createOpenAIAdapter('o4-mini');
|
|
112
|
+
*
|
|
113
|
+
* // Using a future model (when released)
|
|
114
|
+
* const adapter = createOpenAIAdapter('gpt-6');
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export declare function createOpenAIAdapter(model?: OpenAIModelAlias | string, overrides?: Partial<OpenAIConfig>): OpenAIAdapter;
|
|
118
|
+
/**
|
|
119
|
+
* List all available OpenAI model aliases
|
|
20
120
|
*/
|
|
21
|
-
export declare function
|
|
121
|
+
export declare function listOpenAIModels(): {
|
|
122
|
+
alias: string;
|
|
123
|
+
modelId: string;
|
|
124
|
+
}[];
|
|
22
125
|
//# sourceMappingURL=openai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../../src/llm/adapters/openai.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"open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AAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CAKvE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* LearnGraph MCP Server CLI
|
|
4
|
+
*
|
|
5
|
+
* Command-line interface for running the LearnGraph MCP server.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* npx learngraph-mcp # Run with in-memory storage
|
|
9
|
+
* npx learngraph-mcp --neo4j <uri> # Run with Neo4j backend
|
|
10
|
+
* npx learngraph-mcp --level <path> # Run with LevelGraph backend
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/mcp/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;GAWG"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LearnGraph MCP Server Module
|
|
3
|
+
*
|
|
4
|
+
* Model Context Protocol integration for Claude.
|
|
5
|
+
* Provides tools, resources, and prompts for educational knowledge graphs.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { LearnGraphMcpServer, startMcpServer } from 'learngraph/mcp';
|
|
12
|
+
* import { MemoryStorage } from 'learngraph/storage';
|
|
13
|
+
*
|
|
14
|
+
* // Create storage
|
|
15
|
+
* const storage = new MemoryStorage();
|
|
16
|
+
* await storage.connect({ backend: 'memory' });
|
|
17
|
+
*
|
|
18
|
+
* // Option 1: Quick start
|
|
19
|
+
* await startMcpServer({ storage });
|
|
20
|
+
*
|
|
21
|
+
* // Option 2: Full control
|
|
22
|
+
* const server = new LearnGraphMcpServer({ storage });
|
|
23
|
+
* console.log(server.listTools());
|
|
24
|
+
* await server.start();
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export { LearnGraphMcpServer, startMcpServer } from './server.js';
|
|
28
|
+
export type { McpServerConfig, McpTextContent, McpImageContent, McpContent, McpToolResult, McpResourceMeta, McpPromptArgument, McpPromptMeta, LearnerProfile, LearningPathResult, ZpdResult, SkillSearchResult, GraphStatistics, } from './types.js';
|
|
29
|
+
export { TOOL_DEFINITIONS, type ToolName, ListSkillsSchema, GetSkillSchema, CreateSkillSchema, SearchSkillsSchema, GetPrerequisitesSchema, GetDependentsSchema, GetLearningPathSchema, GetZpdSkillsSchema, CreatePrerequisiteSchema, GetGraphStatsSchema, ValidateCurriculumSchema, listSkills, getSkill, createSkill, searchSkills, getPrerequisites, getDependents, getLearningPath, getZpdSkills, createPrerequisite, getGraphStats, validateCurriculum, } from './tools.js';
|
|
30
|
+
export { getResourceTemplates, listResources, resolveResource, getCurriculumOverview, getAllSkills, getAllEdges, getSkillById, getSkillsByBloomLevel, getAllTags, getFullExport, type ResourceContent, } from './resources.js';
|
|
31
|
+
export { PROMPT_DEFINITIONS, getPromptMetas, renderPrompt, getPromptDefinition, } from './prompts.js';
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlE,YAAY,EACV,eAAe,EACf,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,KAAK,QAAQ,EAEb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EAExB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,mBAAmB,GACpB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompt Templates
|
|
3
|
+
*
|
|
4
|
+
* Educational prompt templates for curriculum building and learning path generation.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
import type { McpPromptMeta } from './types.js';
|
|
9
|
+
/**
|
|
10
|
+
* All available prompt templates
|
|
11
|
+
*/
|
|
12
|
+
export declare const PROMPT_DEFINITIONS: Record<string, McpPromptMeta & {
|
|
13
|
+
template: (args: Record<string, string>) => string;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Get prompt metadata for MCP listing
|
|
17
|
+
*/
|
|
18
|
+
export declare function getPromptMetas(): McpPromptMeta[];
|
|
19
|
+
/**
|
|
20
|
+
* Render a prompt with arguments
|
|
21
|
+
*/
|
|
22
|
+
export declare function renderPrompt(promptName: string, args: Record<string, string>): string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Get a prompt definition by name
|
|
25
|
+
*/
|
|
26
|
+
export declare function getPromptDefinition(promptName: string): McpPromptMeta | null;
|
|
27
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/mcp/prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAMhD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAA;CAAE,CA6WrH,CAAC;AAEF;;GAEG;AACH,wBAAgB,cAAc,IAAI,aAAa,EAAE,CAahD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,MAAM,GAAG,IAAI,CAOf;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAgB5E"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resource Definitions
|
|
3
|
+
*
|
|
4
|
+
* Resource endpoints for exposing curriculum data through MCP.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
import type { GraphStorage } from '../types/index.js';
|
|
9
|
+
import type { McpResourceMeta } from './types.js';
|
|
10
|
+
/**
|
|
11
|
+
* Resource content result
|
|
12
|
+
*/
|
|
13
|
+
export interface ResourceContent {
|
|
14
|
+
uri: string;
|
|
15
|
+
mimeType: string;
|
|
16
|
+
text?: string;
|
|
17
|
+
blob?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get all available resource templates
|
|
21
|
+
*/
|
|
22
|
+
export declare function getResourceTemplates(): McpResourceMeta[];
|
|
23
|
+
/**
|
|
24
|
+
* Get curriculum overview
|
|
25
|
+
*/
|
|
26
|
+
export declare function getCurriculumOverview(storage: GraphStorage): Promise<ResourceContent>;
|
|
27
|
+
/**
|
|
28
|
+
* Get all skills
|
|
29
|
+
*/
|
|
30
|
+
export declare function getAllSkills(storage: GraphStorage): Promise<ResourceContent>;
|
|
31
|
+
/**
|
|
32
|
+
* Get all edges
|
|
33
|
+
*/
|
|
34
|
+
export declare function getAllEdges(storage: GraphStorage): Promise<ResourceContent>;
|
|
35
|
+
/**
|
|
36
|
+
* Get skill by ID
|
|
37
|
+
*/
|
|
38
|
+
export declare function getSkillById(storage: GraphStorage, skillId: string): Promise<ResourceContent | null>;
|
|
39
|
+
/**
|
|
40
|
+
* Get skills by Bloom level
|
|
41
|
+
*/
|
|
42
|
+
export declare function getSkillsByBloomLevel(storage: GraphStorage, level: string): Promise<ResourceContent>;
|
|
43
|
+
/**
|
|
44
|
+
* Get all tags with counts
|
|
45
|
+
*/
|
|
46
|
+
export declare function getAllTags(storage: GraphStorage): Promise<ResourceContent>;
|
|
47
|
+
/**
|
|
48
|
+
* Get full curriculum export
|
|
49
|
+
*/
|
|
50
|
+
export declare function getFullExport(storage: GraphStorage): Promise<ResourceContent>;
|
|
51
|
+
/**
|
|
52
|
+
* Route a resource URI to its handler
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveResource(storage: GraphStorage, uri: string): Promise<ResourceContent | null>;
|
|
55
|
+
/**
|
|
56
|
+
* List all available resources (including dynamic ones based on current data)
|
|
57
|
+
*/
|
|
58
|
+
export declare function listResources(storage: GraphStorage): Promise<McpResourceMeta[]>;
|
|
59
|
+
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/mcp/resources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAA+B,MAAM,mB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EAAE,CAAC,CAyBrF"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LearnGraph MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Model Context Protocol server for Claude integration.
|
|
5
|
+
* Exposes knowledge graph tools, resources, and prompts.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import type { McpServerConfig, McpToolResult } from './types.js';
|
|
10
|
+
/**
|
|
11
|
+
* LearnGraph MCP Server
|
|
12
|
+
*
|
|
13
|
+
* Provides tools, resources, and prompts for Claude to interact with
|
|
14
|
+
* educational knowledge graphs.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import { LearnGraphMcpServer } from 'learngraph/mcp';
|
|
19
|
+
* import { MemoryStorage } from 'learngraph/storage';
|
|
20
|
+
*
|
|
21
|
+
* const storage = new MemoryStorage();
|
|
22
|
+
* await storage.connect({ backend: 'memory' });
|
|
23
|
+
*
|
|
24
|
+
* const server = new LearnGraphMcpServer({ storage });
|
|
25
|
+
* await server.start();
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class LearnGraphMcpServer {
|
|
29
|
+
private storage;
|
|
30
|
+
private config;
|
|
31
|
+
private isRunning;
|
|
32
|
+
constructor(config: McpServerConfig);
|
|
33
|
+
/**
|
|
34
|
+
* Log debug messages
|
|
35
|
+
*/
|
|
36
|
+
private log;
|
|
37
|
+
/**
|
|
38
|
+
* Get server info
|
|
39
|
+
*/
|
|
40
|
+
getServerInfo(): {
|
|
41
|
+
name: string;
|
|
42
|
+
version: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* List available tools
|
|
46
|
+
*/
|
|
47
|
+
listTools(): Array<{
|
|
48
|
+
name: string;
|
|
49
|
+
description: string;
|
|
50
|
+
inputSchema: Record<string, unknown>;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Execute a tool
|
|
54
|
+
*/
|
|
55
|
+
executeTool(name: string, args: Record<string, unknown>): Promise<McpToolResult>;
|
|
56
|
+
/**
|
|
57
|
+
* List available resources
|
|
58
|
+
*/
|
|
59
|
+
listResources(): Promise<Array<{
|
|
60
|
+
uri: string;
|
|
61
|
+
name: string;
|
|
62
|
+
description?: string;
|
|
63
|
+
mimeType?: string;
|
|
64
|
+
}>>;
|
|
65
|
+
/**
|
|
66
|
+
* Get resource templates
|
|
67
|
+
*/
|
|
68
|
+
listResourceTemplates(): Array<{
|
|
69
|
+
uri: string;
|
|
70
|
+
name: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
mimeType?: string;
|
|
73
|
+
}>;
|
|
74
|
+
/**
|
|
75
|
+
* Read a resource
|
|
76
|
+
*/
|
|
77
|
+
readResource(uri: string): Promise<{
|
|
78
|
+
uri: string;
|
|
79
|
+
mimeType: string;
|
|
80
|
+
text?: string;
|
|
81
|
+
} | null>;
|
|
82
|
+
/**
|
|
83
|
+
* List available prompts
|
|
84
|
+
*/
|
|
85
|
+
listPrompts(): Array<{
|
|
86
|
+
name: string;
|
|
87
|
+
description?: string;
|
|
88
|
+
arguments?: Array<{
|
|
89
|
+
name: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
required?: boolean;
|
|
92
|
+
}>;
|
|
93
|
+
}>;
|
|
94
|
+
/**
|
|
95
|
+
* Get a prompt
|
|
96
|
+
*/
|
|
97
|
+
getPrompt(name: string, args: Record<string, string>): {
|
|
98
|
+
description?: string;
|
|
99
|
+
messages: Array<{
|
|
100
|
+
role: string;
|
|
101
|
+
content: string;
|
|
102
|
+
}>;
|
|
103
|
+
} | null;
|
|
104
|
+
/**
|
|
105
|
+
* Convert Zod schema to JSON Schema
|
|
106
|
+
*/
|
|
107
|
+
private zodToJsonSchema;
|
|
108
|
+
/**
|
|
109
|
+
* Start the MCP server (stdio transport)
|
|
110
|
+
*
|
|
111
|
+
* This requires @modelcontextprotocol/sdk to be installed.
|
|
112
|
+
*/
|
|
113
|
+
start(): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Check if server is running
|
|
116
|
+
*/
|
|
117
|
+
get running(): boolean;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Create and start an MCP server
|
|
121
|
+
*
|
|
122
|
+
* Convenience function for quick server setup.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* import { startMcpServer } from 'learngraph/mcp';
|
|
127
|
+
* import { MemoryStorage } from 'learngraph/storage';
|
|
128
|
+
*
|
|
129
|
+
* const storage = new MemoryStorage();
|
|
130
|
+
* await storage.connect({ backend: 'memory' });
|
|
131
|
+
*
|
|
132
|
+
* await startMcpServer({ storage });
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
export declare function startMcpServer(config: McpServerConfig): Promise<LearnGraphMcpServer>;
|
|
136
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAoBjE;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,SAAS,CAAS;gBAEd,MAAM,EAAE,eAAe;IAUnC;;OAEG;IACH,OAAO,CAAC,GAAG;IAOX;;OAEG;IACH,aAAa,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;IAOlD;;OAEG;IACH,SAAS,IAAI,KAAK,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC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