@kaiord/mcp 4.3.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.
@@ -0,0 +1,41 @@
1
+ import { Logger, BinaryReader, TextReader, BinaryWriter, TextWriter } from '@kaiord/core';
2
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
+ import { z } from 'zod';
4
+
5
+ declare const createStderrLogger: () => Logger;
6
+
7
+ declare const createServer: () => McpServer;
8
+
9
+ declare const formatSchema: z.ZodEnum<{
10
+ fit: "fit";
11
+ tcx: "tcx";
12
+ zwo: "zwo";
13
+ gcn: "gcn";
14
+ krd: "krd";
15
+ }>;
16
+ type FileFormat = z.infer<typeof formatSchema>;
17
+
18
+ type ReaderFactory = (logger: Logger) => BinaryReader | TextReader;
19
+ type WriterFactory = (logger: Logger) => BinaryWriter | TextWriter;
20
+ type FormatDescriptor = {
21
+ readonly name: string;
22
+ readonly extension: string;
23
+ readonly description: string;
24
+ readonly binary: boolean;
25
+ readonly createReader: ReaderFactory;
26
+ readonly createWriter: WriterFactory;
27
+ };
28
+ declare const FORMAT_REGISTRY: Record<FileFormat, FormatDescriptor>;
29
+ declare const detectFormatFromPath: (filePath: string) => FileFormat | null;
30
+
31
+ type ToolResult = {
32
+ content: Array<{
33
+ type: "text";
34
+ text: string;
35
+ }>;
36
+ isError?: boolean;
37
+ };
38
+ declare const formatSuccess: (text: string) => ToolResult;
39
+ declare const formatError: (error: unknown) => ToolResult;
40
+
41
+ export { FORMAT_REGISTRY, type FileFormat, type ToolResult, createServer, createStderrLogger, detectFormatFromPath, formatError, formatSchema, formatSuccess };