@echoes-io/mcp-server 1.5.0 → 1.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/README.md +60 -6
- package/lib/server.d.ts +17 -0
- package/lib/server.js +63 -31
- package/lib/tools/book-generate.d.ts +5 -12
- package/lib/tools/chapter-delete.d.ts +1 -13
- package/lib/tools/chapter-info.d.ts +1 -11
- package/lib/tools/chapter-insert.d.ts +1 -25
- package/lib/tools/chapter-refresh.d.ts +1 -7
- package/lib/tools/episode-info.d.ts +1 -9
- package/lib/tools/episode-update.d.ts +1 -15
- package/lib/tools/rag-characters.d.ts +1 -7
- package/lib/tools/rag-context.d.ts +2 -16
- package/lib/tools/rag-index.d.ts +1 -9
- package/lib/tools/rag-search.d.ts +2 -18
- package/lib/tools/stats.d.ts +1 -11
- package/lib/tools/timeline-sync.d.ts +1 -5
- package/lib/tools/words-count.d.ts +1 -5
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -8,9 +8,27 @@ The server is distributed as an npm package and can be used without cloning the
|
|
|
8
8
|
|
|
9
9
|
### Using with MCP Clients
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The server can run in three modes depending on the working directory:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
1. **Single Timeline Mode**: Run from a `timeline-*` directory to work with that specific timeline
|
|
14
|
+
2. **Multi-Timeline Mode**: Run from `.github` directory to access all timelines
|
|
15
|
+
3. **Test Mode**: Run from `mcp-server` directory for development
|
|
16
|
+
|
|
17
|
+
#### Single Timeline Configuration (Recommended for Kiro CLI)
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"echoes": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": ["-y", "@echoes-io/mcp-server"],
|
|
25
|
+
"cwd": "/path/to/timeline-pulse"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
#### Multi-Timeline Configuration (Legacy/CAO)
|
|
14
32
|
|
|
15
33
|
```json
|
|
16
34
|
{
|
|
@@ -37,7 +55,7 @@ Then configure:
|
|
|
37
55
|
"mcpServers": {
|
|
38
56
|
"echoes": {
|
|
39
57
|
"command": "echoes-mcp-server",
|
|
40
|
-
"cwd": "/path/to/
|
|
58
|
+
"cwd": "/path/to/timeline-pulse",
|
|
41
59
|
"env": {
|
|
42
60
|
"ECHOES_RAG_PROVIDER": "e5-small"
|
|
43
61
|
}
|
|
@@ -50,13 +68,49 @@ Then configure:
|
|
|
50
68
|
- `ECHOES_RAG_PROVIDER`: Embedding provider (`e5-small`, `e5-large`, or `gemini`). Default: `e5-small`
|
|
51
69
|
- `ECHOES_GEMINI_API_KEY`: Required if using `gemini` provider
|
|
52
70
|
|
|
53
|
-
##
|
|
71
|
+
## Execution Modes
|
|
72
|
+
|
|
73
|
+
### Single Timeline Mode (Recommended)
|
|
74
|
+
Run from a timeline directory to work with that specific timeline:
|
|
75
|
+
```bash
|
|
76
|
+
cd timeline-pulse
|
|
77
|
+
npx @echoes-io/mcp-server
|
|
78
|
+
# [DEBUG] Mode: single-timeline "pulse"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Benefits:**
|
|
82
|
+
- Simpler configuration for single-timeline workflows
|
|
83
|
+
- Direct access to timeline databases
|
|
84
|
+
- Perfect for Kiro CLI integration
|
|
85
|
+
|
|
86
|
+
### Multi-Timeline Mode (Legacy)
|
|
87
|
+
Run from `.github` directory to access all timelines:
|
|
88
|
+
```bash
|
|
89
|
+
cd .github
|
|
90
|
+
npx @echoes-io/mcp-server
|
|
91
|
+
# [DEBUG] Mode: multi-timeline (scanning /path/to/echoes-io)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Benefits:**
|
|
95
|
+
- Manage multiple timelines simultaneously
|
|
96
|
+
- Backward compatible with CAO agents
|
|
97
|
+
- Timeline repositories can be private
|
|
98
|
+
|
|
99
|
+
### Test Mode
|
|
100
|
+
Run from `mcp-server` directory for development:
|
|
101
|
+
```bash
|
|
102
|
+
cd mcp-server
|
|
103
|
+
npm run dev
|
|
104
|
+
# [DEBUG] Mode: test from mcp-server (in-memory)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Timeline Architecture
|
|
54
108
|
|
|
55
|
-
|
|
109
|
+
Each timeline has isolated databases in its own repository:
|
|
56
110
|
|
|
57
111
|
```
|
|
58
112
|
echoes-io/
|
|
59
|
-
.github/ #
|
|
113
|
+
.github/ # Multi-timeline mode runs from here
|
|
60
114
|
timeline-eros/ # Private timeline repo
|
|
61
115
|
tracker.db # Timeline-specific database
|
|
62
116
|
rag.db # Timeline-specific RAG index
|
package/lib/server.d.ts
CHANGED
|
@@ -10,9 +10,18 @@ export declare function createServer(timelines: Map<string, TimelineContext>): S
|
|
|
10
10
|
method: string;
|
|
11
11
|
params?: {
|
|
12
12
|
[x: string]: unknown;
|
|
13
|
+
task?: {
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
ttl?: number | null | undefined;
|
|
16
|
+
pollInterval?: number | undefined;
|
|
17
|
+
} | undefined;
|
|
13
18
|
_meta?: {
|
|
14
19
|
[x: string]: unknown;
|
|
15
20
|
progressToken?: string | number | undefined;
|
|
21
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
taskId: string;
|
|
24
|
+
} | undefined;
|
|
16
25
|
} | undefined;
|
|
17
26
|
} | undefined;
|
|
18
27
|
}, {
|
|
@@ -21,12 +30,20 @@ export declare function createServer(timelines: Map<string, TimelineContext>): S
|
|
|
21
30
|
[x: string]: unknown;
|
|
22
31
|
_meta?: {
|
|
23
32
|
[x: string]: unknown;
|
|
33
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
34
|
+
[x: string]: unknown;
|
|
35
|
+
taskId: string;
|
|
36
|
+
} | undefined;
|
|
24
37
|
} | undefined;
|
|
25
38
|
} | undefined;
|
|
26
39
|
}, {
|
|
27
40
|
[x: string]: unknown;
|
|
28
41
|
_meta?: {
|
|
29
42
|
[x: string]: unknown;
|
|
43
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
44
|
+
[x: string]: unknown;
|
|
45
|
+
taskId: string;
|
|
46
|
+
} | undefined;
|
|
30
47
|
} | undefined;
|
|
31
48
|
}>;
|
|
32
49
|
interface TimelineContext {
|
package/lib/server.js
CHANGED
|
@@ -5,8 +5,8 @@ import { RAGSystem } from '@echoes-io/rag';
|
|
|
5
5
|
import { Tracker } from '@echoes-io/tracker';
|
|
6
6
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
7
7
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
8
|
+
import { toJsonSchemaCompat } from '@modelcontextprotocol/sdk/server/zod-json-schema-compat.js';
|
|
8
9
|
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
9
|
-
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
10
10
|
import { bookGenerate, bookGenerateSchema, chapterDelete, chapterDeleteSchema, chapterInfo, chapterInfoSchema, chapterInsert, chapterInsertSchema, chapterRefresh, chapterRefreshSchema, episodeInfo, episodeInfoSchema, episodeUpdate, episodeUpdateSchema, ragCharacters, ragCharactersSchema, ragContext, ragContextSchema, ragIndex, ragIndexSchema, ragSearch, ragSearchSchema, stats, statsSchema, timelineSync, timelineSyncSchema, wordsCount, wordsCountSchema, } from './tools/index.js';
|
|
11
11
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
12
|
const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
|
|
@@ -25,72 +25,72 @@ export function createServer(timelines) {
|
|
|
25
25
|
{
|
|
26
26
|
name: 'words-count',
|
|
27
27
|
description: 'Count words and text statistics in a markdown file',
|
|
28
|
-
inputSchema:
|
|
28
|
+
inputSchema: toJsonSchemaCompat(wordsCountSchema),
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
name: 'chapter-info',
|
|
32
32
|
description: 'Extract chapter metadata, content preview, and statistics',
|
|
33
|
-
inputSchema:
|
|
33
|
+
inputSchema: toJsonSchemaCompat(chapterInfoSchema),
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
name: 'episode-info',
|
|
37
37
|
description: 'Get episode information and list of chapters',
|
|
38
|
-
inputSchema:
|
|
38
|
+
inputSchema: toJsonSchemaCompat(episodeInfoSchema),
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
name: 'episode-update',
|
|
42
42
|
description: 'Update episode metadata (description, title, slug)',
|
|
43
|
-
inputSchema:
|
|
43
|
+
inputSchema: toJsonSchemaCompat(episodeUpdateSchema),
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
name: 'chapter-refresh',
|
|
47
47
|
description: 'Refresh chapter metadata and statistics from file',
|
|
48
|
-
inputSchema:
|
|
48
|
+
inputSchema: toJsonSchemaCompat(chapterRefreshSchema),
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
name: 'chapter-delete',
|
|
52
52
|
description: 'Delete chapter from database and optionally from filesystem',
|
|
53
|
-
inputSchema:
|
|
53
|
+
inputSchema: toJsonSchemaCompat(chapterDeleteSchema),
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
name: 'chapter-insert',
|
|
57
57
|
description: 'Insert new chapter and automatically renumber subsequent chapters',
|
|
58
|
-
inputSchema:
|
|
58
|
+
inputSchema: toJsonSchemaCompat(chapterInsertSchema),
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
name: 'timeline-sync',
|
|
62
62
|
description: 'Synchronize timeline content with database',
|
|
63
|
-
inputSchema:
|
|
63
|
+
inputSchema: toJsonSchemaCompat(timelineSyncSchema),
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
name: 'stats',
|
|
67
67
|
description: 'Get statistics for timeline, arc, episode, or POV',
|
|
68
|
-
inputSchema:
|
|
68
|
+
inputSchema: toJsonSchemaCompat(statsSchema),
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
name: 'rag-index',
|
|
72
72
|
description: 'Index chapters into RAG vector database for semantic search',
|
|
73
|
-
inputSchema:
|
|
73
|
+
inputSchema: toJsonSchemaCompat(ragIndexSchema),
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
name: 'rag-search',
|
|
77
77
|
description: 'Semantic search across timeline content',
|
|
78
|
-
inputSchema:
|
|
78
|
+
inputSchema: toJsonSchemaCompat(ragSearchSchema),
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
name: 'rag-context',
|
|
82
82
|
description: 'Retrieve relevant context for AI interactions',
|
|
83
|
-
inputSchema:
|
|
83
|
+
inputSchema: toJsonSchemaCompat(ragContextSchema),
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
name: 'rag-characters',
|
|
87
87
|
description: 'Get all characters that appear in chapters with a specific character',
|
|
88
|
-
inputSchema:
|
|
88
|
+
inputSchema: toJsonSchemaCompat(ragCharactersSchema),
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
name: 'book-generate',
|
|
92
92
|
description: 'Generate PDF book from timeline content using LaTeX',
|
|
93
|
-
inputSchema:
|
|
93
|
+
inputSchema: toJsonSchemaCompat(bookGenerateSchema),
|
|
94
94
|
},
|
|
95
95
|
],
|
|
96
96
|
};
|
|
@@ -180,13 +180,48 @@ export function createServer(timelines) {
|
|
|
180
180
|
return server;
|
|
181
181
|
}
|
|
182
182
|
export async function runServer() {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
const { readdirSync, existsSync } = await import('node:fs');
|
|
184
|
+
const { join, basename } = await import('node:path');
|
|
185
|
+
const cwd = process.cwd();
|
|
186
|
+
const cwdName = basename(cwd);
|
|
187
187
|
const timelines = new Map();
|
|
188
|
+
console.error(`[DEBUG] Starting from: ${cwd}`);
|
|
188
189
|
if (process.env.NODE_ENV === 'test') {
|
|
189
|
-
// Test mode:
|
|
190
|
+
// Test mode: in-memory databases
|
|
191
|
+
const tracker = new Tracker(':memory:');
|
|
192
|
+
await tracker.init();
|
|
193
|
+
const rag = new RAGSystem({
|
|
194
|
+
provider: 'e5-small',
|
|
195
|
+
dbPath: ':memory:',
|
|
196
|
+
});
|
|
197
|
+
timelines.set('test', { tracker, rag, contentPath: './test-content' });
|
|
198
|
+
console.error('[DEBUG] Mode: test (in-memory)');
|
|
199
|
+
}
|
|
200
|
+
else if (cwdName.startsWith('timeline-')) {
|
|
201
|
+
// Single timeline mode: running from timeline directory
|
|
202
|
+
const timelineName = cwdName.replace('timeline-', '');
|
|
203
|
+
const contentPath = join(cwd, 'content');
|
|
204
|
+
if (!existsSync(contentPath)) {
|
|
205
|
+
throw new Error(`No content directory found in ${cwd}`);
|
|
206
|
+
}
|
|
207
|
+
const trackerPath = join(cwd, 'tracker.db');
|
|
208
|
+
const ragPath = join(cwd, 'rag.db');
|
|
209
|
+
const tracker = new Tracker(trackerPath);
|
|
210
|
+
await tracker.init();
|
|
211
|
+
const provider = (process.env.ECHOES_RAG_PROVIDER || 'e5-small');
|
|
212
|
+
const rag = new RAGSystem({
|
|
213
|
+
provider,
|
|
214
|
+
dbPath: ragPath,
|
|
215
|
+
geminiApiKey: process.env.ECHOES_GEMINI_API_KEY,
|
|
216
|
+
});
|
|
217
|
+
timelines.set(timelineName, { tracker, rag, contentPath });
|
|
218
|
+
console.error(`[DEBUG] Mode: single-timeline "${timelineName}"`);
|
|
219
|
+
console.error(`[DEBUG] Content: ${contentPath}`);
|
|
220
|
+
console.error(`[DEBUG] Tracker: ${trackerPath}`);
|
|
221
|
+
console.error(`[DEBUG] RAG: ${ragPath}`);
|
|
222
|
+
}
|
|
223
|
+
else if (cwdName === 'mcp-server') {
|
|
224
|
+
// Test mode from mcp-server directory: in-memory
|
|
190
225
|
const tracker = new Tracker(':memory:');
|
|
191
226
|
await tracker.init();
|
|
192
227
|
const rag = new RAGSystem({
|
|
@@ -194,29 +229,26 @@ export async function runServer() {
|
|
|
194
229
|
dbPath: ':memory:',
|
|
195
230
|
});
|
|
196
231
|
timelines.set('test', { tracker, rag, contentPath: './test-content' });
|
|
197
|
-
console.error('
|
|
232
|
+
console.error('[DEBUG] Mode: test from mcp-server (in-memory)');
|
|
198
233
|
}
|
|
199
234
|
else {
|
|
200
|
-
//
|
|
201
|
-
const
|
|
202
|
-
const { join } = await import('node:path');
|
|
203
|
-
const parentDir = join(process.cwd(), '..');
|
|
235
|
+
// Multi-timeline mode: discover from parent directory (backward compat for .github)
|
|
236
|
+
const parentDir = join(cwd, '..');
|
|
204
237
|
const entries = readdirSync(parentDir, { withFileTypes: true });
|
|
238
|
+
console.error(`[DEBUG] Mode: multi-timeline (scanning ${parentDir})`);
|
|
205
239
|
for (const entry of entries) {
|
|
206
240
|
if (entry.isDirectory() && entry.name.startsWith('timeline-')) {
|
|
207
241
|
const timelineName = entry.name.replace('timeline-', '');
|
|
208
242
|
const timelinePath = join(parentDir, entry.name);
|
|
209
243
|
const contentPath = join(timelinePath, 'content');
|
|
210
244
|
if (!existsSync(contentPath)) {
|
|
211
|
-
console.error(`Skipping ${entry.name}: no content directory`);
|
|
245
|
+
console.error(`[DEBUG] Skipping ${entry.name}: no content directory`);
|
|
212
246
|
continue;
|
|
213
247
|
}
|
|
214
|
-
// Initialize tracker
|
|
215
248
|
const trackerPath = join(timelinePath, 'tracker.db');
|
|
249
|
+
const ragPath = join(timelinePath, 'rag.db');
|
|
216
250
|
const tracker = new Tracker(trackerPath);
|
|
217
251
|
await tracker.init();
|
|
218
|
-
// Initialize RAG
|
|
219
|
-
const ragPath = join(timelinePath, 'rag.db');
|
|
220
252
|
const provider = (process.env.ECHOES_RAG_PROVIDER || 'e5-small');
|
|
221
253
|
const rag = new RAGSystem({
|
|
222
254
|
provider,
|
|
@@ -224,7 +256,7 @@ export async function runServer() {
|
|
|
224
256
|
geminiApiKey: process.env.ECHOES_GEMINI_API_KEY,
|
|
225
257
|
});
|
|
226
258
|
timelines.set(timelineName, { tracker, rag, contentPath });
|
|
227
|
-
console.error(`Timeline "${timelineName}"
|
|
259
|
+
console.error(`[DEBUG] Timeline "${timelineName}": ${trackerPath}`);
|
|
228
260
|
}
|
|
229
261
|
}
|
|
230
262
|
if (timelines.size === 0) {
|
|
@@ -234,5 +266,5 @@ export async function runServer() {
|
|
|
234
266
|
const server = createServer(timelines);
|
|
235
267
|
const transport = new StdioServerTransport();
|
|
236
268
|
await server.connect(transport);
|
|
237
|
-
console.error(`
|
|
269
|
+
console.error(`[DEBUG] Server ready with ${timelines.size} timeline(s)`);
|
|
238
270
|
}
|
|
@@ -3,18 +3,11 @@ export declare const bookGenerateSchema: z.ZodObject<{
|
|
|
3
3
|
timeline: z.ZodString;
|
|
4
4
|
outputPath: z.ZodString;
|
|
5
5
|
episodes: z.ZodOptional<z.ZodString>;
|
|
6
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
format?: "a4" | "a5" | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
timeline: string;
|
|
14
|
-
outputPath: string;
|
|
15
|
-
episodes?: string | undefined;
|
|
16
|
-
format?: "a4" | "a5" | undefined;
|
|
17
|
-
}>;
|
|
6
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
7
|
+
a4: "a4";
|
|
8
|
+
a5: "a5";
|
|
9
|
+
}>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
18
11
|
type BookGenerateArgs = z.infer<typeof bookGenerateSchema> & {
|
|
19
12
|
contentPath: string;
|
|
20
13
|
};
|
|
@@ -6,19 +6,7 @@ export declare const chapterDeleteSchema: z.ZodObject<{
|
|
|
6
6
|
episode: z.ZodNumber;
|
|
7
7
|
chapter: z.ZodNumber;
|
|
8
8
|
file: z.ZodOptional<z.ZodString>;
|
|
9
|
-
},
|
|
10
|
-
timeline: string;
|
|
11
|
-
arc: string;
|
|
12
|
-
episode: number;
|
|
13
|
-
chapter: number;
|
|
14
|
-
file?: string | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
timeline: string;
|
|
17
|
-
arc: string;
|
|
18
|
-
episode: number;
|
|
19
|
-
chapter: number;
|
|
20
|
-
file?: string | undefined;
|
|
21
|
-
}>;
|
|
9
|
+
}, z.core.$strip>;
|
|
22
10
|
export declare function chapterDelete(args: z.infer<typeof chapterDeleteSchema>, tracker: Tracker): Promise<{
|
|
23
11
|
content: {
|
|
24
12
|
type: "text";
|
|
@@ -5,17 +5,7 @@ export declare const chapterInfoSchema: z.ZodObject<{
|
|
|
5
5
|
arc: z.ZodString;
|
|
6
6
|
episode: z.ZodNumber;
|
|
7
7
|
chapter: z.ZodNumber;
|
|
8
|
-
},
|
|
9
|
-
timeline: string;
|
|
10
|
-
arc: string;
|
|
11
|
-
episode: number;
|
|
12
|
-
chapter: number;
|
|
13
|
-
}, {
|
|
14
|
-
timeline: string;
|
|
15
|
-
arc: string;
|
|
16
|
-
episode: number;
|
|
17
|
-
chapter: number;
|
|
18
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
19
9
|
export declare function chapterInfo(args: z.infer<typeof chapterInfoSchema>, tracker: Tracker): Promise<{
|
|
20
10
|
content: {
|
|
21
11
|
type: "text";
|
|
@@ -12,31 +12,7 @@ export declare const chapterInsertSchema: z.ZodObject<{
|
|
|
12
12
|
outfit: z.ZodOptional<z.ZodString>;
|
|
13
13
|
kink: z.ZodOptional<z.ZodString>;
|
|
14
14
|
file: z.ZodOptional<z.ZodString>;
|
|
15
|
-
},
|
|
16
|
-
timeline: string;
|
|
17
|
-
arc: string;
|
|
18
|
-
episode: number;
|
|
19
|
-
after: number;
|
|
20
|
-
pov: string;
|
|
21
|
-
title: string;
|
|
22
|
-
file?: string | undefined;
|
|
23
|
-
summary?: string | undefined;
|
|
24
|
-
location?: string | undefined;
|
|
25
|
-
outfit?: string | undefined;
|
|
26
|
-
kink?: string | undefined;
|
|
27
|
-
}, {
|
|
28
|
-
timeline: string;
|
|
29
|
-
arc: string;
|
|
30
|
-
episode: number;
|
|
31
|
-
after: number;
|
|
32
|
-
pov: string;
|
|
33
|
-
title: string;
|
|
34
|
-
file?: string | undefined;
|
|
35
|
-
summary?: string | undefined;
|
|
36
|
-
location?: string | undefined;
|
|
37
|
-
outfit?: string | undefined;
|
|
38
|
-
kink?: string | undefined;
|
|
39
|
-
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
40
16
|
export declare function chapterInsert(args: z.infer<typeof chapterInsertSchema>, tracker: Tracker): Promise<{
|
|
41
17
|
content: {
|
|
42
18
|
type: "text";
|
|
@@ -3,13 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
export declare const chapterRefreshSchema: z.ZodObject<{
|
|
4
4
|
timeline: z.ZodString;
|
|
5
5
|
file: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
timeline: string;
|
|
8
|
-
file: string;
|
|
9
|
-
}, {
|
|
10
|
-
timeline: string;
|
|
11
|
-
file: string;
|
|
12
|
-
}>;
|
|
6
|
+
}, z.core.$strip>;
|
|
13
7
|
export declare function chapterRefresh(args: z.infer<typeof chapterRefreshSchema>, tracker: Tracker): Promise<{
|
|
14
8
|
content: {
|
|
15
9
|
type: "text";
|
|
@@ -4,15 +4,7 @@ export declare const episodeInfoSchema: z.ZodObject<{
|
|
|
4
4
|
timeline: z.ZodString;
|
|
5
5
|
arc: z.ZodString;
|
|
6
6
|
episode: z.ZodNumber;
|
|
7
|
-
},
|
|
8
|
-
timeline: string;
|
|
9
|
-
arc: string;
|
|
10
|
-
episode: number;
|
|
11
|
-
}, {
|
|
12
|
-
timeline: string;
|
|
13
|
-
arc: string;
|
|
14
|
-
episode: number;
|
|
15
|
-
}>;
|
|
7
|
+
}, z.core.$strip>;
|
|
16
8
|
export declare function episodeInfo(args: z.infer<typeof episodeInfoSchema>, tracker: Tracker): Promise<{
|
|
17
9
|
content: {
|
|
18
10
|
type: "text";
|
|
@@ -7,21 +7,7 @@ export declare const episodeUpdateSchema: z.ZodObject<{
|
|
|
7
7
|
description: z.ZodOptional<z.ZodString>;
|
|
8
8
|
title: z.ZodOptional<z.ZodString>;
|
|
9
9
|
slug: z.ZodOptional<z.ZodString>;
|
|
10
|
-
},
|
|
11
|
-
timeline: string;
|
|
12
|
-
arc: string;
|
|
13
|
-
episode: number;
|
|
14
|
-
title?: string | undefined;
|
|
15
|
-
description?: string | undefined;
|
|
16
|
-
slug?: string | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
timeline: string;
|
|
19
|
-
arc: string;
|
|
20
|
-
episode: number;
|
|
21
|
-
title?: string | undefined;
|
|
22
|
-
description?: string | undefined;
|
|
23
|
-
slug?: string | undefined;
|
|
24
|
-
}>;
|
|
10
|
+
}, z.core.$strip>;
|
|
25
11
|
export declare function episodeUpdate(args: z.infer<typeof episodeUpdateSchema>, tracker: Tracker): Promise<{
|
|
26
12
|
content: {
|
|
27
13
|
type: "text";
|
|
@@ -3,13 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
export declare const ragCharactersSchema: z.ZodObject<{
|
|
4
4
|
timeline: z.ZodString;
|
|
5
5
|
character: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
timeline: string;
|
|
8
|
-
character: string;
|
|
9
|
-
}, {
|
|
10
|
-
timeline: string;
|
|
11
|
-
character: string;
|
|
12
|
-
}>;
|
|
6
|
+
}, z.core.$strip>;
|
|
13
7
|
export declare function ragCharacters(args: z.infer<typeof ragCharactersSchema>, rag: RAGSystem): Promise<{
|
|
14
8
|
content: {
|
|
15
9
|
type: "text";
|
|
@@ -6,22 +6,8 @@ export declare const ragContextSchema: z.ZodObject<{
|
|
|
6
6
|
arc: z.ZodOptional<z.ZodString>;
|
|
7
7
|
pov: z.ZodOptional<z.ZodString>;
|
|
8
8
|
maxChapters: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
characters: z.ZodOptional<z.ZodArray<z.ZodString
|
|
10
|
-
},
|
|
11
|
-
timeline: string;
|
|
12
|
-
query: string;
|
|
13
|
-
arc?: string | undefined;
|
|
14
|
-
pov?: string | undefined;
|
|
15
|
-
characters?: string[] | undefined;
|
|
16
|
-
maxChapters?: number | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
timeline: string;
|
|
19
|
-
query: string;
|
|
20
|
-
arc?: string | undefined;
|
|
21
|
-
pov?: string | undefined;
|
|
22
|
-
characters?: string[] | undefined;
|
|
23
|
-
maxChapters?: number | undefined;
|
|
24
|
-
}>;
|
|
9
|
+
characters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
25
11
|
export declare function ragContext(args: z.infer<typeof ragContextSchema>, rag: RAGSystem): Promise<{
|
|
26
12
|
content: {
|
|
27
13
|
type: "text";
|
package/lib/tools/rag-index.d.ts
CHANGED
|
@@ -5,15 +5,7 @@ export declare const ragIndexSchema: z.ZodObject<{
|
|
|
5
5
|
timeline: z.ZodString;
|
|
6
6
|
arc: z.ZodOptional<z.ZodString>;
|
|
7
7
|
episode: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
},
|
|
9
|
-
timeline: string;
|
|
10
|
-
arc?: string | undefined;
|
|
11
|
-
episode?: number | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
timeline: string;
|
|
14
|
-
arc?: string | undefined;
|
|
15
|
-
episode?: number | undefined;
|
|
16
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
17
9
|
type RagIndexArgs = z.infer<typeof ragIndexSchema> & {
|
|
18
10
|
contentPath: string;
|
|
19
11
|
};
|
|
@@ -6,25 +6,9 @@ export declare const ragSearchSchema: z.ZodObject<{
|
|
|
6
6
|
arc: z.ZodOptional<z.ZodString>;
|
|
7
7
|
pov: z.ZodOptional<z.ZodString>;
|
|
8
8
|
maxResults: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
characters: z.ZodOptional<z.ZodArray<z.ZodString
|
|
9
|
+
characters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
10
|
allCharacters: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
},
|
|
12
|
-
timeline: string;
|
|
13
|
-
query: string;
|
|
14
|
-
arc?: string | undefined;
|
|
15
|
-
pov?: string | undefined;
|
|
16
|
-
characters?: string[] | undefined;
|
|
17
|
-
maxResults?: number | undefined;
|
|
18
|
-
allCharacters?: boolean | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
timeline: string;
|
|
21
|
-
query: string;
|
|
22
|
-
arc?: string | undefined;
|
|
23
|
-
pov?: string | undefined;
|
|
24
|
-
characters?: string[] | undefined;
|
|
25
|
-
maxResults?: number | undefined;
|
|
26
|
-
allCharacters?: boolean | undefined;
|
|
27
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
28
12
|
export declare function ragSearch(args: z.infer<typeof ragSearchSchema>, rag: RAGSystem): Promise<{
|
|
29
13
|
content: {
|
|
30
14
|
type: "text";
|
package/lib/tools/stats.d.ts
CHANGED
|
@@ -5,17 +5,7 @@ export declare const statsSchema: z.ZodObject<{
|
|
|
5
5
|
arc: z.ZodOptional<z.ZodString>;
|
|
6
6
|
episode: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
pov: z.ZodOptional<z.ZodString>;
|
|
8
|
-
},
|
|
9
|
-
timeline: string;
|
|
10
|
-
arc?: string | undefined;
|
|
11
|
-
episode?: number | undefined;
|
|
12
|
-
pov?: string | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
timeline: string;
|
|
15
|
-
arc?: string | undefined;
|
|
16
|
-
episode?: number | undefined;
|
|
17
|
-
pov?: string | undefined;
|
|
18
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
19
9
|
export declare function stats(args: z.infer<typeof statsSchema>, tracker: Tracker): Promise<{
|
|
20
10
|
content: {
|
|
21
11
|
type: "text";
|
|
@@ -2,11 +2,7 @@ import type { Tracker } from '@echoes-io/tracker';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export declare const timelineSyncSchema: z.ZodObject<{
|
|
4
4
|
timeline: z.ZodString;
|
|
5
|
-
},
|
|
6
|
-
timeline: string;
|
|
7
|
-
}, {
|
|
8
|
-
timeline: string;
|
|
9
|
-
}>;
|
|
5
|
+
}, z.core.$strip>;
|
|
10
6
|
type TimelineSyncArgs = z.infer<typeof timelineSyncSchema> & {
|
|
11
7
|
contentPath: string;
|
|
12
8
|
};
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const wordsCountSchema: z.ZodObject<{
|
|
3
3
|
file: z.ZodString;
|
|
4
|
-
},
|
|
5
|
-
file: string;
|
|
6
|
-
}, {
|
|
7
|
-
file: string;
|
|
8
|
-
}>;
|
|
4
|
+
}, z.core.$strip>;
|
|
9
5
|
export declare function wordsCount(args: z.infer<typeof wordsCountSchema>): Promise<{
|
|
10
6
|
content: {
|
|
11
7
|
type: "text";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@echoes-io/mcp-server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.0",
|
|
5
5
|
"description": "Model Context Protocol server for AI integration with Echoes storytelling platform",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "tsx cli/index.ts",
|
|
@@ -63,30 +63,30 @@
|
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@biomejs/biome": "^2.3.
|
|
66
|
+
"@biomejs/biome": "^2.3.8",
|
|
67
67
|
"@semantic-release/changelog": "^6.0.3",
|
|
68
68
|
"@semantic-release/git": "^10.0.1",
|
|
69
|
-
"@tsconfig/node22": "^22.0.
|
|
70
|
-
"@types/node": "^24.10.
|
|
71
|
-
"@vitest/coverage-v8": "^4.0.
|
|
69
|
+
"@tsconfig/node22": "^22.0.5",
|
|
70
|
+
"@types/node": "^24.10.1",
|
|
71
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
72
72
|
"concurrently": "^9.2.1",
|
|
73
73
|
"husky": "^9.1.7",
|
|
74
|
-
"lint-staged": "^16.2.
|
|
74
|
+
"lint-staged": "^16.2.7",
|
|
75
75
|
"lockfile-lint": "^4.14.1",
|
|
76
76
|
"ls-engines": "^0.9.3",
|
|
77
77
|
"publint": "^0.3.15",
|
|
78
|
-
"rimraf": "^6.1.
|
|
79
|
-
"semantic-release": "^25.0.
|
|
80
|
-
"tsx": "^4.
|
|
78
|
+
"rimraf": "^6.1.2",
|
|
79
|
+
"semantic-release": "^25.0.2",
|
|
80
|
+
"tsx": "^4.21.0",
|
|
81
81
|
"typescript": "^5.9.3",
|
|
82
|
-
"vitest": "^4.0.
|
|
82
|
+
"vitest": "^4.0.15"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@echoes-io/books-generator": "^1.0
|
|
86
|
-
"@echoes-io/models": "^1.0
|
|
85
|
+
"@echoes-io/books-generator": "^1.1.0",
|
|
86
|
+
"@echoes-io/models": "^1.1.0",
|
|
87
87
|
"@echoes-io/rag": "^1.2.0",
|
|
88
|
-
"@echoes-io/tracker": "^1.0
|
|
89
|
-
"@echoes-io/utils": "^1.
|
|
90
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
88
|
+
"@echoes-io/tracker": "^1.1.0",
|
|
89
|
+
"@echoes-io/utils": "^1.3.0",
|
|
90
|
+
"@modelcontextprotocol/sdk": "^1.24.2"
|
|
91
91
|
}
|
|
92
92
|
}
|