@echoes-io/mcp-server 1.3.2 → 1.3.3
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 +1 -1
- package/lib/tools/rag-index.js +4 -4
- package/package.json +4 -4
package/README.md
CHANGED
package/lib/tools/rag-index.js
CHANGED
|
@@ -39,10 +39,8 @@ export async function ragIndex(args, tracker, rag) {
|
|
|
39
39
|
// If contentPath is provided, read actual file content
|
|
40
40
|
if (args.contentPath) {
|
|
41
41
|
try {
|
|
42
|
-
//
|
|
42
|
+
// Find episode directory
|
|
43
43
|
const episodeDir = `ep${String(ch.episodeNumber).padStart(2, '0')}`;
|
|
44
|
-
const chapterFile = `ep${String(ch.episodeNumber).padStart(2, '0')}-ch${String(ch.number).padStart(3, '0')}-${ch.pov}`;
|
|
45
|
-
// Try to find the file (we don't know the exact title part)
|
|
46
44
|
const arcPath = join(args.contentPath, ch.arcName);
|
|
47
45
|
const episodePath = readdirSync(arcPath, { withFileTypes: true })
|
|
48
46
|
.filter((e) => e.isDirectory() && e.name.startsWith(episodeDir))
|
|
@@ -51,7 +49,9 @@ export async function ragIndex(args, tracker, rag) {
|
|
|
51
49
|
console.error(`Episode directory not found for ${ch.arcName}/ep${ch.episodeNumber}`);
|
|
52
50
|
return null;
|
|
53
51
|
}
|
|
54
|
-
|
|
52
|
+
// Find chapter file by episode and chapter number (filename-agnostic for title/pov)
|
|
53
|
+
const chapterPattern = `ep${String(ch.episodeNumber).padStart(2, '0')}-ch${String(ch.number).padStart(3, '0')}-`;
|
|
54
|
+
const chapterFiles = readdirSync(episodePath).filter((f) => f.startsWith(chapterPattern) && f.endsWith('.md'));
|
|
55
55
|
if (chapterFiles.length === 0) {
|
|
56
56
|
console.error(`Chapter file not found for ${ch.arcName}/ep${ch.episodeNumber}/ch${ch.number}`);
|
|
57
57
|
return null;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@echoes-io/mcp-server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.3",
|
|
5
5
|
"description": "Model Context Protocol server for AI integration with Echoes storytelling platform",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "tsx cli/index.ts",
|
|
8
8
|
"start": "node cli/index.js",
|
|
9
9
|
"lint": "concurrently npm:lint:* --prefixColors auto",
|
|
10
|
-
"lint:
|
|
10
|
+
"lint:format": "biome check --write",
|
|
11
11
|
"lint:lockfile": "lockfile-lint --path package-lock.json",
|
|
12
12
|
"lint:engines": "ls-engines",
|
|
13
13
|
"lint:publish": "publint --strict",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@echoes-io/books-generator": "^1.0.0",
|
|
85
|
-
"@echoes-io/models": "^1.0.
|
|
86
|
-
"@echoes-io/rag": "^1.1.
|
|
85
|
+
"@echoes-io/models": "^1.0.1",
|
|
86
|
+
"@echoes-io/rag": "^1.1.2",
|
|
87
87
|
"@echoes-io/tracker": "^1.0.0",
|
|
88
88
|
"@echoes-io/utils": "^1.1.1",
|
|
89
89
|
"@modelcontextprotocol/sdk": "^1.0.0"
|