alepha 0.13.8 → 0.14.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/api/audits/index.d.ts +2 -1
- package/dist/api/audits/index.d.ts.map +1 -0
- package/dist/api/files/index.d.ts +2 -1
- package/dist/api/files/index.d.ts.map +1 -0
- package/dist/api/jobs/index.d.ts +158 -157
- package/dist/api/jobs/index.d.ts.map +1 -0
- package/dist/api/notifications/index.d.ts.map +1 -0
- package/dist/api/parameters/index.d.ts +4 -4
- package/dist/api/parameters/index.d.ts.map +1 -0
- package/dist/api/users/index.d.ts +132 -131
- package/dist/api/users/index.d.ts.map +1 -0
- package/dist/api/verifications/index.d.ts.map +1 -0
- package/dist/batch/index.d.ts.map +1 -0
- package/dist/bucket/index.d.ts.map +1 -0
- package/dist/cache/core/index.d.ts.map +1 -0
- package/dist/cache/redis/index.d.ts.map +1 -0
- package/dist/cli/index.d.ts +44 -32
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +380 -109
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +11 -1
- package/dist/command/index.d.ts.map +1 -0
- package/dist/command/index.js +45 -6
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +1334 -1318
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +75 -71
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +1337 -1321
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +1337 -1321
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.d.ts.map +1 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/fake/index.d.ts.map +1 -0
- package/dist/file/index.d.ts.map +1 -0
- package/dist/lock/core/index.d.ts.map +1 -0
- package/dist/lock/redis/index.d.ts.map +1 -0
- package/dist/logger/index.d.ts +1 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +820 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +978 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/orm/index.d.ts +180 -107
- package/dist/orm/index.d.ts.map +1 -0
- package/dist/orm/index.js +260 -174
- package/dist/orm/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +4 -4
- package/dist/queue/core/index.d.ts.map +1 -0
- package/dist/queue/redis/index.d.ts.map +1 -0
- package/dist/redis/index.d.ts.map +1 -0
- package/dist/retry/index.d.ts.map +1 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/scheduler/index.d.ts.map +1 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/server/auth/index.d.ts +155 -155
- package/dist/server/auth/index.d.ts.map +1 -0
- package/dist/server/cache/index.d.ts.map +1 -0
- package/dist/server/compress/index.d.ts.map +1 -0
- package/dist/server/cookies/index.d.ts.map +1 -0
- package/dist/server/core/index.d.ts.map +1 -0
- package/dist/server/cors/index.d.ts.map +1 -0
- package/dist/server/health/index.d.ts.map +1 -0
- package/dist/server/helmet/index.d.ts.map +1 -0
- package/dist/server/links/index.d.ts +33 -33
- package/dist/server/links/index.d.ts.map +1 -0
- package/dist/server/metrics/index.d.ts.map +1 -0
- package/dist/server/multipart/index.d.ts.map +1 -0
- package/dist/server/proxy/index.d.ts.map +1 -0
- package/dist/server/rate-limit/index.d.ts.map +1 -0
- package/dist/server/security/index.d.ts +9 -9
- package/dist/server/security/index.d.ts.map +1 -0
- package/dist/server/static/index.d.ts.map +1 -0
- package/dist/server/swagger/index.d.ts.map +1 -0
- package/dist/sms/index.d.ts.map +1 -0
- package/dist/thread/index.d.ts.map +1 -0
- package/dist/topic/core/index.d.ts.map +1 -0
- package/dist/topic/redis/index.d.ts.map +1 -0
- package/dist/vite/index.d.ts +10 -2
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.js +36 -14
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.d.ts.map +1 -0
- package/package.json +9 -4
- package/src/cli/apps/AlephaCli.ts +2 -0
- package/src/cli/apps/AlephaPackageBuilderCli.ts +12 -8
- package/src/cli/assets/mainTs.ts +9 -10
- package/src/cli/commands/ChangelogCommands.ts +389 -0
- package/src/cli/commands/DrizzleCommands.ts +204 -4
- package/src/cli/commands/ViteCommands.ts +26 -16
- package/src/cli/services/AlephaCliUtils.ts +23 -150
- package/src/command/providers/CliProvider.ts +76 -5
- package/src/core/providers/SchemaValidator.ts +23 -1
- package/src/mcp/errors/McpError.ts +72 -0
- package/src/mcp/helpers/jsonrpc.ts +163 -0
- package/src/mcp/index.ts +132 -0
- package/src/mcp/interfaces/McpTypes.ts +248 -0
- package/src/mcp/primitives/$prompt.ts +188 -0
- package/src/mcp/primitives/$resource.ts +171 -0
- package/src/mcp/primitives/$tool.ts +285 -0
- package/src/mcp/providers/McpServerProvider.ts +382 -0
- package/src/mcp/transports/SseMcpTransport.ts +172 -0
- package/src/mcp/transports/StdioMcpTransport.ts +126 -0
- package/src/orm/index.ts +12 -0
- package/src/orm/providers/drivers/CloudflareD1Provider.ts +164 -0
- package/src/orm/providers/drivers/NodeSqliteProvider.ts +3 -1
- package/src/vite/plugins/viteAlephaBuild.ts +8 -2
- package/src/vite/plugins/viteAlephaDev.ts +6 -2
- package/src/vite/tasks/buildServer.ts +1 -1
- package/src/vite/tasks/generateCloudflare.ts +43 -15
- package/src/vite/tasks/runAlepha.ts +1 -0
|
@@ -0,0 +1,820 @@
|
|
|
1
|
+
import * as alepha3 from "alepha";
|
|
2
|
+
import { Alepha, AlephaError, Async, KIND, Primitive, Static, TObject, TSchema } from "alepha";
|
|
3
|
+
import * as alepha_logger0 from "alepha/logger";
|
|
4
|
+
import * as alepha_server0 from "alepha/server";
|
|
5
|
+
import * as readline from "node:readline";
|
|
6
|
+
|
|
7
|
+
//#region ../../src/mcp/errors/McpError.d.ts
|
|
8
|
+
declare class McpError extends Error {
|
|
9
|
+
name: string;
|
|
10
|
+
code: number;
|
|
11
|
+
constructor(message: string, code?: number);
|
|
12
|
+
}
|
|
13
|
+
declare class McpMethodNotFoundError extends McpError {
|
|
14
|
+
name: string;
|
|
15
|
+
constructor(method: string);
|
|
16
|
+
}
|
|
17
|
+
declare class McpToolNotFoundError extends McpError {
|
|
18
|
+
name: string;
|
|
19
|
+
tool: string;
|
|
20
|
+
constructor(tool: string);
|
|
21
|
+
}
|
|
22
|
+
declare class McpResourceNotFoundError extends McpError {
|
|
23
|
+
name: string;
|
|
24
|
+
uri: string;
|
|
25
|
+
constructor(uri: string);
|
|
26
|
+
}
|
|
27
|
+
declare class McpPromptNotFoundError extends McpError {
|
|
28
|
+
name: string;
|
|
29
|
+
prompt: string;
|
|
30
|
+
constructor(prompt: string);
|
|
31
|
+
}
|
|
32
|
+
declare class McpInvalidParamsError extends McpError {
|
|
33
|
+
name: string;
|
|
34
|
+
constructor(message: string);
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ../../src/mcp/interfaces/McpTypes.d.ts
|
|
38
|
+
interface JsonRpcRequest {
|
|
39
|
+
jsonrpc: "2.0";
|
|
40
|
+
id?: string | number;
|
|
41
|
+
method: string;
|
|
42
|
+
params?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
interface JsonRpcResponse {
|
|
45
|
+
jsonrpc: "2.0";
|
|
46
|
+
id: string | number;
|
|
47
|
+
result?: unknown;
|
|
48
|
+
error?: JsonRpcError;
|
|
49
|
+
}
|
|
50
|
+
interface JsonRpcNotification {
|
|
51
|
+
jsonrpc: "2.0";
|
|
52
|
+
method: string;
|
|
53
|
+
params?: Record<string, unknown>;
|
|
54
|
+
}
|
|
55
|
+
interface JsonRpcError {
|
|
56
|
+
code: number;
|
|
57
|
+
message: string;
|
|
58
|
+
data?: unknown;
|
|
59
|
+
}
|
|
60
|
+
interface McpCapabilities {
|
|
61
|
+
tools?: Record<string, never>;
|
|
62
|
+
resources?: Record<string, never>;
|
|
63
|
+
prompts?: Record<string, never>;
|
|
64
|
+
}
|
|
65
|
+
interface McpServerInfo {
|
|
66
|
+
name: string;
|
|
67
|
+
version: string;
|
|
68
|
+
}
|
|
69
|
+
interface McpClientInfo {
|
|
70
|
+
name: string;
|
|
71
|
+
version: string;
|
|
72
|
+
}
|
|
73
|
+
interface McpInitializeParams {
|
|
74
|
+
protocolVersion: string;
|
|
75
|
+
capabilities: McpCapabilities;
|
|
76
|
+
clientInfo: McpClientInfo;
|
|
77
|
+
}
|
|
78
|
+
interface McpInitializeResult {
|
|
79
|
+
protocolVersion: string;
|
|
80
|
+
capabilities: McpCapabilities;
|
|
81
|
+
serverInfo: McpServerInfo;
|
|
82
|
+
}
|
|
83
|
+
interface McpToolDescriptor {
|
|
84
|
+
name: string;
|
|
85
|
+
description: string;
|
|
86
|
+
inputSchema: McpJsonSchema;
|
|
87
|
+
}
|
|
88
|
+
interface McpJsonSchema {
|
|
89
|
+
type: string;
|
|
90
|
+
properties?: Record<string, unknown>;
|
|
91
|
+
required?: string[];
|
|
92
|
+
}
|
|
93
|
+
interface McpToolCallParams {
|
|
94
|
+
name: string;
|
|
95
|
+
arguments?: Record<string, unknown>;
|
|
96
|
+
}
|
|
97
|
+
interface McpToolCallResult {
|
|
98
|
+
content: McpContent[];
|
|
99
|
+
isError?: boolean;
|
|
100
|
+
}
|
|
101
|
+
interface McpContent {
|
|
102
|
+
type: "text" | "image" | "resource";
|
|
103
|
+
text?: string;
|
|
104
|
+
data?: string;
|
|
105
|
+
mimeType?: string;
|
|
106
|
+
}
|
|
107
|
+
interface McpResourceDescriptor {
|
|
108
|
+
uri: string;
|
|
109
|
+
name: string;
|
|
110
|
+
description?: string;
|
|
111
|
+
mimeType?: string;
|
|
112
|
+
}
|
|
113
|
+
interface McpResourceReadParams {
|
|
114
|
+
uri: string;
|
|
115
|
+
}
|
|
116
|
+
interface McpResourceReadResult {
|
|
117
|
+
contents: McpResourceContent[];
|
|
118
|
+
}
|
|
119
|
+
interface McpResourceContent {
|
|
120
|
+
uri: string;
|
|
121
|
+
mimeType?: string;
|
|
122
|
+
text?: string;
|
|
123
|
+
blob?: string;
|
|
124
|
+
}
|
|
125
|
+
interface McpPromptDescriptor {
|
|
126
|
+
name: string;
|
|
127
|
+
description?: string;
|
|
128
|
+
arguments?: McpPromptArgument[];
|
|
129
|
+
}
|
|
130
|
+
interface McpPromptArgument {
|
|
131
|
+
name: string;
|
|
132
|
+
description?: string;
|
|
133
|
+
required?: boolean;
|
|
134
|
+
}
|
|
135
|
+
interface McpPromptGetParams {
|
|
136
|
+
name: string;
|
|
137
|
+
arguments?: Record<string, string>;
|
|
138
|
+
}
|
|
139
|
+
interface McpPromptGetResult {
|
|
140
|
+
description?: string;
|
|
141
|
+
messages: McpPromptMessage[];
|
|
142
|
+
}
|
|
143
|
+
interface McpPromptMessage {
|
|
144
|
+
role: "user" | "assistant";
|
|
145
|
+
content: McpPromptContent;
|
|
146
|
+
}
|
|
147
|
+
interface McpPromptContent {
|
|
148
|
+
type: "text" | "image" | "resource";
|
|
149
|
+
text?: string;
|
|
150
|
+
data?: string;
|
|
151
|
+
mimeType?: string;
|
|
152
|
+
}
|
|
153
|
+
interface ToolPrimitiveSchema {
|
|
154
|
+
params?: TObject;
|
|
155
|
+
result?: TSchema;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Context passed to MCP handlers from the transport layer.
|
|
159
|
+
*
|
|
160
|
+
* This allows tools, resources, and prompts to access request-level
|
|
161
|
+
* information like headers for authentication.
|
|
162
|
+
*/
|
|
163
|
+
interface McpContext<T = unknown> {
|
|
164
|
+
/**
|
|
165
|
+
* HTTP headers from the request (for SSE transport).
|
|
166
|
+
*/
|
|
167
|
+
headers?: Record<string, string | string[] | undefined>;
|
|
168
|
+
/**
|
|
169
|
+
* Custom context data set by transport or middleware.
|
|
170
|
+
* Can be used to pass authenticated user, project scope, etc.
|
|
171
|
+
*/
|
|
172
|
+
data?: T;
|
|
173
|
+
}
|
|
174
|
+
type ToolHandler<T extends ToolPrimitiveSchema, TContext = unknown> = (args: ToolHandlerArgs<T, TContext>) => Async<ToolHandlerResult<T>>;
|
|
175
|
+
interface ToolHandlerArgs<T extends ToolPrimitiveSchema, TContext = unknown> {
|
|
176
|
+
params: T["params"] extends TObject ? Static<T["params"]> : Record<string, never>;
|
|
177
|
+
context?: McpContext<TContext>;
|
|
178
|
+
}
|
|
179
|
+
type ToolHandlerResult<T extends ToolPrimitiveSchema> = T["result"] extends TSchema ? Static<T["result"]> : unknown;
|
|
180
|
+
type ResourceHandler<TContext = unknown> = (args: ResourceHandlerArgs<TContext>) => Async<ResourceContent>;
|
|
181
|
+
interface ResourceHandlerArgs<TContext = unknown> {
|
|
182
|
+
context?: McpContext<TContext>;
|
|
183
|
+
}
|
|
184
|
+
interface ResourceContent {
|
|
185
|
+
text?: string;
|
|
186
|
+
blob?: Uint8Array;
|
|
187
|
+
}
|
|
188
|
+
type PromptHandler<T extends TObject, TContext = unknown> = (args: PromptHandlerArgs<T, TContext>) => Async<PromptMessage[]>;
|
|
189
|
+
interface PromptHandlerArgs<T extends TObject, TContext = unknown> {
|
|
190
|
+
args: Static<T>;
|
|
191
|
+
context?: McpContext<TContext>;
|
|
192
|
+
}
|
|
193
|
+
interface PromptMessage {
|
|
194
|
+
role: "user" | "assistant";
|
|
195
|
+
content: string;
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region ../../src/mcp/helpers/jsonrpc.d.ts
|
|
199
|
+
declare const JSONRPC_VERSION: "2.0";
|
|
200
|
+
declare const MCP_PROTOCOL_VERSION: "2024-11-05";
|
|
201
|
+
declare const JsonRpcErrorCodes: {
|
|
202
|
+
readonly PARSE_ERROR: -32700;
|
|
203
|
+
readonly INVALID_REQUEST: -32600;
|
|
204
|
+
readonly METHOD_NOT_FOUND: -32601;
|
|
205
|
+
readonly INVALID_PARAMS: -32602;
|
|
206
|
+
readonly INTERNAL_ERROR: -32603;
|
|
207
|
+
};
|
|
208
|
+
declare function createResponse(id: string | number, result: unknown): JsonRpcResponse;
|
|
209
|
+
declare function createErrorResponse(id: string | number, error: JsonRpcError): JsonRpcResponse;
|
|
210
|
+
declare function createNotification(method: string, params?: Record<string, unknown>): JsonRpcNotification;
|
|
211
|
+
declare function createParseError(message?: string): JsonRpcError;
|
|
212
|
+
declare function createInvalidRequestError(message?: string): JsonRpcError;
|
|
213
|
+
declare function createMethodNotFoundError(method: string): JsonRpcError;
|
|
214
|
+
declare function createInvalidParamsError(message: string): JsonRpcError;
|
|
215
|
+
declare function createInternalError(message: string): JsonRpcError;
|
|
216
|
+
declare function parseMessage(data: string): JsonRpcRequest;
|
|
217
|
+
declare function isValidJsonRpcRequest(value: unknown): value is JsonRpcRequest;
|
|
218
|
+
declare function isNotification(request: JsonRpcRequest): boolean;
|
|
219
|
+
declare class JsonRpcParseError extends AlephaError {
|
|
220
|
+
name: string;
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region ../../src/mcp/primitives/$resource.d.ts
|
|
224
|
+
/**
|
|
225
|
+
* Creates an MCP resource primitive for exposing read-only data.
|
|
226
|
+
*
|
|
227
|
+
* Resources represent any kind of data that an LLM might want to read,
|
|
228
|
+
* such as files, database records, API responses, or computed data.
|
|
229
|
+
*
|
|
230
|
+
* **Key Features**
|
|
231
|
+
* - URI-based identification for resources
|
|
232
|
+
* - Support for text and binary content
|
|
233
|
+
* - MIME type specification
|
|
234
|
+
* - Lazy loading via handler function
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```ts
|
|
238
|
+
* class ProjectResources {
|
|
239
|
+
* readme = $resource({
|
|
240
|
+
* uri: "file:///readme",
|
|
241
|
+
* description: "Project README file",
|
|
242
|
+
* mimeType: "text/markdown",
|
|
243
|
+
* handler: async () => ({
|
|
244
|
+
* text: await fs.readFile("README.md", "utf-8"),
|
|
245
|
+
* }),
|
|
246
|
+
* });
|
|
247
|
+
*
|
|
248
|
+
* config = $resource({
|
|
249
|
+
* uri: "config://app",
|
|
250
|
+
* name: "Application Configuration",
|
|
251
|
+
* mimeType: "application/json",
|
|
252
|
+
* handler: async () => ({
|
|
253
|
+
* text: JSON.stringify(this.configService.getConfig()),
|
|
254
|
+
* }),
|
|
255
|
+
* });
|
|
256
|
+
* }
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
declare const $resource: {
|
|
260
|
+
(options: ResourcePrimitiveOptions): ResourcePrimitive;
|
|
261
|
+
[KIND]: typeof ResourcePrimitive;
|
|
262
|
+
};
|
|
263
|
+
interface ResourcePrimitiveOptions {
|
|
264
|
+
/**
|
|
265
|
+
* The URI that identifies this resource.
|
|
266
|
+
*
|
|
267
|
+
* URIs should follow a consistent scheme for your application.
|
|
268
|
+
* Common patterns:
|
|
269
|
+
* - `file:///path/to/file` - File system resources
|
|
270
|
+
* - `db://table/id` - Database records
|
|
271
|
+
* - `api://endpoint` - API responses
|
|
272
|
+
* - `config://name` - Configuration values
|
|
273
|
+
*
|
|
274
|
+
* @example "file:///readme.md"
|
|
275
|
+
* @example "db://users/123"
|
|
276
|
+
*/
|
|
277
|
+
uri: string;
|
|
278
|
+
/**
|
|
279
|
+
* Human-readable name for the resource.
|
|
280
|
+
*
|
|
281
|
+
* If not provided, defaults to the property key where the resource is declared.
|
|
282
|
+
*
|
|
283
|
+
* @example "Project README"
|
|
284
|
+
* @example "User Profile"
|
|
285
|
+
*/
|
|
286
|
+
name?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Description of what this resource contains.
|
|
289
|
+
*
|
|
290
|
+
* Helps the LLM understand the purpose and content of the resource.
|
|
291
|
+
*
|
|
292
|
+
* @example "The main README file for the project"
|
|
293
|
+
*/
|
|
294
|
+
description?: string;
|
|
295
|
+
/**
|
|
296
|
+
* MIME type of the resource content.
|
|
297
|
+
*
|
|
298
|
+
* Helps clients understand how to interpret the content.
|
|
299
|
+
*
|
|
300
|
+
* @default "text/plain"
|
|
301
|
+
* @example "text/markdown"
|
|
302
|
+
* @example "application/json"
|
|
303
|
+
*/
|
|
304
|
+
mimeType?: string;
|
|
305
|
+
/**
|
|
306
|
+
* Handler function that returns the resource content.
|
|
307
|
+
*
|
|
308
|
+
* Called when the resource is read. Can return text or binary content.
|
|
309
|
+
*
|
|
310
|
+
* @returns Resource content with either `text` or `blob` property
|
|
311
|
+
*/
|
|
312
|
+
handler: ResourceHandler;
|
|
313
|
+
}
|
|
314
|
+
declare class ResourcePrimitive extends Primitive<ResourcePrimitiveOptions> {
|
|
315
|
+
protected readonly mcpServer: McpServerProvider;
|
|
316
|
+
/**
|
|
317
|
+
* Returns the name of the resource.
|
|
318
|
+
*/
|
|
319
|
+
get name(): string;
|
|
320
|
+
/**
|
|
321
|
+
* Returns the URI of the resource.
|
|
322
|
+
*/
|
|
323
|
+
get uri(): string;
|
|
324
|
+
/**
|
|
325
|
+
* Returns the description of the resource.
|
|
326
|
+
*/
|
|
327
|
+
get description(): string | undefined;
|
|
328
|
+
/**
|
|
329
|
+
* Returns the MIME type of the resource.
|
|
330
|
+
*/
|
|
331
|
+
get mimeType(): string;
|
|
332
|
+
protected onInit(): void;
|
|
333
|
+
/**
|
|
334
|
+
* Read the resource content.
|
|
335
|
+
*
|
|
336
|
+
* @param context - Optional context from the transport layer
|
|
337
|
+
* @returns The resource content
|
|
338
|
+
*/
|
|
339
|
+
read(context?: McpContext): Promise<ResourceContent>;
|
|
340
|
+
/**
|
|
341
|
+
* Convert the resource to an MCP resource descriptor for protocol messages.
|
|
342
|
+
*/
|
|
343
|
+
toDescriptor(): McpResourceDescriptor;
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region ../../src/mcp/primitives/$tool.d.ts
|
|
347
|
+
/**
|
|
348
|
+
* Creates an MCP tool primitive for defining callable functions.
|
|
349
|
+
*
|
|
350
|
+
* Tools are the primary way for LLMs to interact with external systems through MCP.
|
|
351
|
+
* Each tool has a name, description, typed parameters, and a handler function.
|
|
352
|
+
*
|
|
353
|
+
* **Key Features**
|
|
354
|
+
* - Full TypeScript inference for parameters and results
|
|
355
|
+
* - Automatic schema validation using TypeBox
|
|
356
|
+
* - JSON Schema generation for MCP protocol
|
|
357
|
+
* - Integration with MCP server provider
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* ```ts
|
|
361
|
+
* class CalculatorTools {
|
|
362
|
+
* add = $tool({
|
|
363
|
+
* description: "Add two numbers together",
|
|
364
|
+
* schema: {
|
|
365
|
+
* params: t.object({
|
|
366
|
+
* a: t.number(),
|
|
367
|
+
* b: t.number(),
|
|
368
|
+
* }),
|
|
369
|
+
* result: t.number(),
|
|
370
|
+
* },
|
|
371
|
+
* handler: async ({ params }) => {
|
|
372
|
+
* return params.a + params.b;
|
|
373
|
+
* },
|
|
374
|
+
* });
|
|
375
|
+
*
|
|
376
|
+
* greet = $tool({
|
|
377
|
+
* description: "Generate a greeting message",
|
|
378
|
+
* schema: {
|
|
379
|
+
* params: t.object({
|
|
380
|
+
* name: t.text(),
|
|
381
|
+
* }),
|
|
382
|
+
* result: t.text(),
|
|
383
|
+
* },
|
|
384
|
+
* handler: async ({ params }) => {
|
|
385
|
+
* return `Hello, ${params.name}!`;
|
|
386
|
+
* },
|
|
387
|
+
* });
|
|
388
|
+
* }
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
declare const $tool: {
|
|
392
|
+
<T extends ToolPrimitiveSchema>(options: ToolPrimitiveOptions<T>): ToolPrimitive<T>;
|
|
393
|
+
[KIND]: typeof ToolPrimitive;
|
|
394
|
+
};
|
|
395
|
+
interface ToolPrimitiveOptions<T extends ToolPrimitiveSchema> {
|
|
396
|
+
/**
|
|
397
|
+
* The name of the tool.
|
|
398
|
+
*
|
|
399
|
+
* If not provided, defaults to the property key where the tool is declared.
|
|
400
|
+
* Names should be descriptive and use kebab-case or snake_case.
|
|
401
|
+
*
|
|
402
|
+
* @example "calculate-sum"
|
|
403
|
+
* @example "get_weather"
|
|
404
|
+
*/
|
|
405
|
+
name?: string;
|
|
406
|
+
/**
|
|
407
|
+
* A human-readable description of what the tool does.
|
|
408
|
+
*
|
|
409
|
+
* This description is sent to the LLM to help it understand
|
|
410
|
+
* when and how to use the tool. Be clear and specific.
|
|
411
|
+
*
|
|
412
|
+
* @example "Calculate the sum of two numbers"
|
|
413
|
+
* @example "Retrieve current weather data for a given location"
|
|
414
|
+
*/
|
|
415
|
+
description: string;
|
|
416
|
+
/**
|
|
417
|
+
* TypeBox schema defining the tool's parameters and result type.
|
|
418
|
+
*
|
|
419
|
+
* - **params**: TObject schema for input parameters (optional)
|
|
420
|
+
* - **result**: TSchema for the return value (optional)
|
|
421
|
+
*
|
|
422
|
+
* Schemas provide:
|
|
423
|
+
* - Type inference for handler function
|
|
424
|
+
* - Runtime validation of inputs
|
|
425
|
+
* - JSON Schema generation for MCP protocol
|
|
426
|
+
*/
|
|
427
|
+
schema?: T;
|
|
428
|
+
/**
|
|
429
|
+
* The handler function that executes when the tool is called.
|
|
430
|
+
*
|
|
431
|
+
* Receives validated parameters and returns the result.
|
|
432
|
+
* Errors thrown here are caught and returned as MCP errors.
|
|
433
|
+
*
|
|
434
|
+
* @param args - Object containing validated params
|
|
435
|
+
* @returns The tool result (can be async)
|
|
436
|
+
*/
|
|
437
|
+
handler: (args: ToolHandlerArgs<T>) => Async<ToolHandlerResult<T>>;
|
|
438
|
+
}
|
|
439
|
+
declare class ToolPrimitive<T extends ToolPrimitiveSchema> extends Primitive<ToolPrimitiveOptions<T>> {
|
|
440
|
+
protected readonly mcpServer: McpServerProvider;
|
|
441
|
+
/**
|
|
442
|
+
* Returns the name of the tool.
|
|
443
|
+
*/
|
|
444
|
+
get name(): string;
|
|
445
|
+
/**
|
|
446
|
+
* Returns the description of the tool.
|
|
447
|
+
*/
|
|
448
|
+
get description(): string;
|
|
449
|
+
protected onInit(): void;
|
|
450
|
+
/**
|
|
451
|
+
* Execute the tool with the given parameters.
|
|
452
|
+
*
|
|
453
|
+
* @param params - Raw parameters to validate and pass to the handler
|
|
454
|
+
* @param context - Optional context from the transport layer
|
|
455
|
+
* @returns The tool result
|
|
456
|
+
*/
|
|
457
|
+
execute(params: unknown, context?: McpContext): Promise<ToolHandlerResult<T>>;
|
|
458
|
+
/**
|
|
459
|
+
* Convert the tool to an MCP tool descriptor for protocol messages.
|
|
460
|
+
*/
|
|
461
|
+
toDescriptor(): McpToolDescriptor;
|
|
462
|
+
/**
|
|
463
|
+
* Convert a TypeBox schema to JSON Schema format.
|
|
464
|
+
*/
|
|
465
|
+
protected schemaToJsonSchema(schema: TObject): McpJsonSchema;
|
|
466
|
+
/**
|
|
467
|
+
* Convert a single property schema to JSON Schema format.
|
|
468
|
+
*/
|
|
469
|
+
protected propertyToJsonSchema(schema: TSchema): Record<string, unknown>;
|
|
470
|
+
}
|
|
471
|
+
//#endregion
|
|
472
|
+
//#region ../../src/mcp/providers/McpServerProvider.d.ts
|
|
473
|
+
/**
|
|
474
|
+
* Core MCP server provider that handles protocol messages.
|
|
475
|
+
*
|
|
476
|
+
* This provider maintains registries of tools, resources, and prompts,
|
|
477
|
+
* and routes incoming JSON-RPC requests to the appropriate handlers.
|
|
478
|
+
*
|
|
479
|
+
* It is transport-agnostic - actual communication is handled by
|
|
480
|
+
* transport providers like StdioMcpTransport or SseMcpTransport.
|
|
481
|
+
*/
|
|
482
|
+
declare class McpServerProvider {
|
|
483
|
+
protected readonly log: alepha_logger0.Logger;
|
|
484
|
+
protected readonly alepha: Alepha;
|
|
485
|
+
protected readonly tools: Map<string, ToolPrimitive<any>>;
|
|
486
|
+
protected readonly resources: Map<string, ResourcePrimitive>;
|
|
487
|
+
protected readonly prompts: Map<string, PromptPrimitive<any>>;
|
|
488
|
+
protected initialized: boolean;
|
|
489
|
+
protected serverInfo: McpServerInfo;
|
|
490
|
+
/**
|
|
491
|
+
* Register a tool with the MCP server.
|
|
492
|
+
*/
|
|
493
|
+
registerTool(tool: ToolPrimitive<any>): void;
|
|
494
|
+
/**
|
|
495
|
+
* Register a resource with the MCP server.
|
|
496
|
+
*/
|
|
497
|
+
registerResource(resource: ResourcePrimitive): void;
|
|
498
|
+
/**
|
|
499
|
+
* Register a prompt with the MCP server.
|
|
500
|
+
*/
|
|
501
|
+
registerPrompt(prompt: PromptPrimitive<any>): void;
|
|
502
|
+
/**
|
|
503
|
+
* Get the server capabilities based on registered primitives.
|
|
504
|
+
*/
|
|
505
|
+
getCapabilities(): McpCapabilities;
|
|
506
|
+
/**
|
|
507
|
+
* Get all registered tools.
|
|
508
|
+
*/
|
|
509
|
+
getTools(): ToolPrimitive<any>[];
|
|
510
|
+
/**
|
|
511
|
+
* Get all registered resources.
|
|
512
|
+
*/
|
|
513
|
+
getResources(): ResourcePrimitive[];
|
|
514
|
+
/**
|
|
515
|
+
* Get all registered prompts.
|
|
516
|
+
*/
|
|
517
|
+
getPrompts(): PromptPrimitive<any>[];
|
|
518
|
+
/**
|
|
519
|
+
* Get a tool by name.
|
|
520
|
+
*/
|
|
521
|
+
getTool(name: string): ToolPrimitive<any> | undefined;
|
|
522
|
+
/**
|
|
523
|
+
* Get a resource by URI.
|
|
524
|
+
*/
|
|
525
|
+
getResource(uri: string): ResourcePrimitive | undefined;
|
|
526
|
+
/**
|
|
527
|
+
* Get a prompt by name.
|
|
528
|
+
*/
|
|
529
|
+
getPrompt(name: string): PromptPrimitive<any> | undefined;
|
|
530
|
+
/**
|
|
531
|
+
* Handle an incoming JSON-RPC request.
|
|
532
|
+
*
|
|
533
|
+
* @param request - The parsed JSON-RPC request
|
|
534
|
+
* @param context - Optional context from the transport layer (headers, auth, etc.)
|
|
535
|
+
* @returns The JSON-RPC response, or null for notifications
|
|
536
|
+
*/
|
|
537
|
+
handleMessage(request: JsonRpcRequest, context?: McpContext): Promise<JsonRpcResponse | null>;
|
|
538
|
+
/**
|
|
539
|
+
* Handle a JSON-RPC request that expects a response.
|
|
540
|
+
*/
|
|
541
|
+
protected handleRequest(request: JsonRpcRequest, context?: McpContext): Promise<unknown>;
|
|
542
|
+
/**
|
|
543
|
+
* Handle a notification (no response expected).
|
|
544
|
+
*/
|
|
545
|
+
protected handleNotification(request: JsonRpcRequest): Promise<void>;
|
|
546
|
+
protected handleInitialize(params: Record<string, unknown>): McpInitializeResult;
|
|
547
|
+
protected handlePing(): Record<string, never>;
|
|
548
|
+
protected handleToolsList(): {
|
|
549
|
+
tools: McpToolDescriptor[];
|
|
550
|
+
};
|
|
551
|
+
protected handleToolsCall(params: Record<string, unknown>, context?: McpContext): Promise<McpToolCallResult>;
|
|
552
|
+
protected handleResourcesList(): {
|
|
553
|
+
resources: McpResourceDescriptor[];
|
|
554
|
+
};
|
|
555
|
+
protected handleResourcesRead(params: Record<string, unknown>, context?: McpContext): Promise<McpResourceReadResult>;
|
|
556
|
+
protected handlePromptsList(): {
|
|
557
|
+
prompts: McpPromptDescriptor[];
|
|
558
|
+
};
|
|
559
|
+
protected handlePromptsGet(params: Record<string, unknown>, context?: McpContext): Promise<McpPromptGetResult>;
|
|
560
|
+
}
|
|
561
|
+
//#endregion
|
|
562
|
+
//#region ../../src/mcp/primitives/$prompt.d.ts
|
|
563
|
+
/**
|
|
564
|
+
* Creates an MCP prompt primitive for defining reusable prompt templates.
|
|
565
|
+
*
|
|
566
|
+
* Prompts allow you to define templated messages that can be filled in
|
|
567
|
+
* with arguments at runtime. They're useful for creating consistent
|
|
568
|
+
* interaction patterns.
|
|
569
|
+
*
|
|
570
|
+
* @example
|
|
571
|
+
* ```ts
|
|
572
|
+
* class Prompts {
|
|
573
|
+
* greeting = $prompt({
|
|
574
|
+
* description: "Generate a personalized greeting",
|
|
575
|
+
* args: t.object({
|
|
576
|
+
* name: t.text({ description: "Name of the person to greet" }),
|
|
577
|
+
* style: t.optional(t.enum(["formal", "casual"])),
|
|
578
|
+
* }),
|
|
579
|
+
* handler: async ({ args }) => [
|
|
580
|
+
* {
|
|
581
|
+
* role: "user",
|
|
582
|
+
* content: args.style === "formal"
|
|
583
|
+
* ? `Please greet ${args.name} in a formal manner.`
|
|
584
|
+
* : `Say hi to ${args.name}!`,
|
|
585
|
+
* },
|
|
586
|
+
* ],
|
|
587
|
+
* });
|
|
588
|
+
*
|
|
589
|
+
* codeReview = $prompt({
|
|
590
|
+
* description: "Request a code review",
|
|
591
|
+
* args: t.object({
|
|
592
|
+
* code: t.text({ description: "The code to review" }),
|
|
593
|
+
* language: t.text({ description: "Programming language" }),
|
|
594
|
+
* }),
|
|
595
|
+
* handler: async ({ args }) => [
|
|
596
|
+
* {
|
|
597
|
+
* role: "user",
|
|
598
|
+
* content: `Please review this ${args.language} code:\n\n${args.code}`,
|
|
599
|
+
* },
|
|
600
|
+
* ],
|
|
601
|
+
* });
|
|
602
|
+
* }
|
|
603
|
+
* ```
|
|
604
|
+
*/
|
|
605
|
+
declare const $prompt: {
|
|
606
|
+
<T extends TObject>(options: PromptPrimitiveOptions<T>): PromptPrimitive<T>;
|
|
607
|
+
[KIND]: typeof PromptPrimitive;
|
|
608
|
+
};
|
|
609
|
+
interface PromptPrimitiveOptions<T extends TObject> {
|
|
610
|
+
/**
|
|
611
|
+
* The name of the prompt.
|
|
612
|
+
*
|
|
613
|
+
* If not provided, defaults to the property key where the prompt is declared.
|
|
614
|
+
*
|
|
615
|
+
* @example "greeting"
|
|
616
|
+
* @example "code-review"
|
|
617
|
+
*/
|
|
618
|
+
name?: string;
|
|
619
|
+
/**
|
|
620
|
+
* Description of what this prompt does.
|
|
621
|
+
*
|
|
622
|
+
* Helps users understand the purpose of the prompt.
|
|
623
|
+
*
|
|
624
|
+
* @example "Generate a personalized greeting message"
|
|
625
|
+
*/
|
|
626
|
+
description?: string;
|
|
627
|
+
/**
|
|
628
|
+
* TypeBox schema defining the prompt arguments.
|
|
629
|
+
*
|
|
630
|
+
* Each property in the schema becomes an argument that can be
|
|
631
|
+
* filled in when the prompt is used.
|
|
632
|
+
*/
|
|
633
|
+
args?: T;
|
|
634
|
+
/**
|
|
635
|
+
* Handler function that generates the prompt messages.
|
|
636
|
+
*
|
|
637
|
+
* Receives the validated arguments and returns an array of messages.
|
|
638
|
+
*
|
|
639
|
+
* @param args - Object containing validated arguments
|
|
640
|
+
* @returns Array of prompt messages
|
|
641
|
+
*/
|
|
642
|
+
handler: (args: PromptHandlerArgs<T>) => Async<PromptMessage[]>;
|
|
643
|
+
}
|
|
644
|
+
declare class PromptPrimitive<T extends TObject> extends Primitive<PromptPrimitiveOptions<T>> {
|
|
645
|
+
protected readonly mcpServer: McpServerProvider;
|
|
646
|
+
/**
|
|
647
|
+
* Returns the name of the prompt.
|
|
648
|
+
*/
|
|
649
|
+
get name(): string;
|
|
650
|
+
/**
|
|
651
|
+
* Returns the description of the prompt.
|
|
652
|
+
*/
|
|
653
|
+
get description(): string | undefined;
|
|
654
|
+
protected onInit(): void;
|
|
655
|
+
/**
|
|
656
|
+
* Get the prompt messages with the given arguments.
|
|
657
|
+
*
|
|
658
|
+
* @param rawArgs - Raw arguments to validate and pass to the handler
|
|
659
|
+
* @param context - Optional context from the transport layer
|
|
660
|
+
* @returns Array of prompt messages
|
|
661
|
+
*/
|
|
662
|
+
get(rawArgs: unknown, context?: McpContext): Promise<PromptMessage[]>;
|
|
663
|
+
/**
|
|
664
|
+
* Convert the prompt to an MCP prompt descriptor for protocol messages.
|
|
665
|
+
*/
|
|
666
|
+
toDescriptor(): McpPromptDescriptor;
|
|
667
|
+
/**
|
|
668
|
+
* Convert a TypeBox schema to an array of prompt arguments.
|
|
669
|
+
*/
|
|
670
|
+
protected schemaToArguments(schema: TObject): McpPromptArgument[];
|
|
671
|
+
}
|
|
672
|
+
//#endregion
|
|
673
|
+
//#region ../../src/mcp/transports/SseMcpTransport.d.ts
|
|
674
|
+
/**
|
|
675
|
+
* SSE (Server-Sent Events) transport for MCP communication.
|
|
676
|
+
*
|
|
677
|
+
* This transport uses HTTP with SSE for server-to-client messages
|
|
678
|
+
* and POST requests for client-to-server messages.
|
|
679
|
+
*
|
|
680
|
+
* Endpoints:
|
|
681
|
+
* - GET /mcp - SSE stream for server events
|
|
682
|
+
* - POST /mcp - JSON-RPC request endpoint
|
|
683
|
+
*
|
|
684
|
+
* @example
|
|
685
|
+
* ```ts
|
|
686
|
+
* import { Alepha, run } from "alepha";
|
|
687
|
+
* import { AlephaServer } from "alepha/server";
|
|
688
|
+
* import { AlephaMcp, AlephaMcpSse } from "alepha/mcp";
|
|
689
|
+
*
|
|
690
|
+
* class MyTools {
|
|
691
|
+
* // ... tool definitions
|
|
692
|
+
* }
|
|
693
|
+
*
|
|
694
|
+
* run(
|
|
695
|
+
* Alepha.create()
|
|
696
|
+
* .with(AlephaServer)
|
|
697
|
+
* .with(AlephaMcp)
|
|
698
|
+
* .with(AlephaMcpSse)
|
|
699
|
+
* .with(MyTools)
|
|
700
|
+
* );
|
|
701
|
+
* ```
|
|
702
|
+
*/
|
|
703
|
+
declare class SseMcpTransport {
|
|
704
|
+
protected readonly log: alepha_logger0.Logger;
|
|
705
|
+
protected readonly env: {
|
|
706
|
+
MCP_SSE_PATH: string;
|
|
707
|
+
};
|
|
708
|
+
protected readonly mcpServer: McpServerProvider;
|
|
709
|
+
/**
|
|
710
|
+
* SSE endpoint for server-to-client messages.
|
|
711
|
+
*
|
|
712
|
+
* Returns a text/event-stream response with server capabilities
|
|
713
|
+
* and keeps the connection open for notifications.
|
|
714
|
+
*/
|
|
715
|
+
sse: alepha_server0.RoutePrimitive<alepha_server0.RequestConfigSchema>;
|
|
716
|
+
/**
|
|
717
|
+
* POST endpoint for client-to-server JSON-RPC messages.
|
|
718
|
+
*/
|
|
719
|
+
message: alepha_server0.RoutePrimitive<{
|
|
720
|
+
body: alepha3.TRecord<string, alepha3.TAny>;
|
|
721
|
+
}>;
|
|
722
|
+
/**
|
|
723
|
+
* Format a message as an SSE event.
|
|
724
|
+
*/
|
|
725
|
+
protected formatSseEvent(event: string, data: string): string;
|
|
726
|
+
}
|
|
727
|
+
//#endregion
|
|
728
|
+
//#region ../../src/mcp/transports/StdioMcpTransport.d.ts
|
|
729
|
+
/**
|
|
730
|
+
* Stdio transport for MCP communication.
|
|
731
|
+
*
|
|
732
|
+
* This transport uses stdin/stdout for JSON-RPC message exchange,
|
|
733
|
+
* which is the standard transport for local MCP servers.
|
|
734
|
+
*
|
|
735
|
+
* Messages are newline-delimited JSON objects.
|
|
736
|
+
*
|
|
737
|
+
* @example
|
|
738
|
+
* ```ts
|
|
739
|
+
* import { Alepha, run } from "alepha";
|
|
740
|
+
* import { AlephaMcp, AlephaMcpStdio } from "alepha/mcp";
|
|
741
|
+
*
|
|
742
|
+
* class MyTools {
|
|
743
|
+
* // ... tool definitions
|
|
744
|
+
* }
|
|
745
|
+
*
|
|
746
|
+
* run(
|
|
747
|
+
* Alepha.create()
|
|
748
|
+
* .with(AlephaMcp)
|
|
749
|
+
* .with(AlephaMcpStdio)
|
|
750
|
+
* .with(MyTools)
|
|
751
|
+
* );
|
|
752
|
+
* ```
|
|
753
|
+
*/
|
|
754
|
+
declare class StdioMcpTransport {
|
|
755
|
+
protected readonly log: alepha_logger0.Logger;
|
|
756
|
+
protected readonly mcpServer: McpServerProvider;
|
|
757
|
+
protected rl?: readline.Interface;
|
|
758
|
+
protected started: boolean;
|
|
759
|
+
onStart: alepha3.HookPrimitive<"start">;
|
|
760
|
+
onStop: alepha3.HookPrimitive<"stop">;
|
|
761
|
+
/**
|
|
762
|
+
* Start the stdio transport.
|
|
763
|
+
*/
|
|
764
|
+
protected start(): void;
|
|
765
|
+
/**
|
|
766
|
+
* Stop the stdio transport.
|
|
767
|
+
*/
|
|
768
|
+
protected stop(): void;
|
|
769
|
+
/**
|
|
770
|
+
* Handle an incoming line from stdin.
|
|
771
|
+
*/
|
|
772
|
+
protected handleLine(line: string): Promise<void>;
|
|
773
|
+
/**
|
|
774
|
+
* Handle stdin close event.
|
|
775
|
+
*/
|
|
776
|
+
protected handleClose(): void;
|
|
777
|
+
/**
|
|
778
|
+
* Send a message to stdout.
|
|
779
|
+
*/
|
|
780
|
+
protected send(message: object): void;
|
|
781
|
+
}
|
|
782
|
+
//#endregion
|
|
783
|
+
//#region ../../src/mcp/index.d.ts
|
|
784
|
+
/**
|
|
785
|
+
* Core MCP module with primitives and server provider.
|
|
786
|
+
*
|
|
787
|
+
* This module registers the $tool, $resource, and $prompt primitives
|
|
788
|
+
* and the McpServerProvider. You need to add a transport module
|
|
789
|
+
* (AlephaMcpStdio or AlephaMcpSse) for actual communication.
|
|
790
|
+
*
|
|
791
|
+
* @example
|
|
792
|
+
* ```ts
|
|
793
|
+
* import { Alepha, run } from "alepha";
|
|
794
|
+
* import { AlephaMcp, AlephaMcpStdio, $tool, t } from "alepha/mcp";
|
|
795
|
+
*
|
|
796
|
+
* class MyMcpServer {
|
|
797
|
+
* add = $tool({
|
|
798
|
+
* description: "Add two numbers",
|
|
799
|
+
* schema: {
|
|
800
|
+
* params: t.object({ a: t.number(), b: t.number() }),
|
|
801
|
+
* result: t.number(),
|
|
802
|
+
* },
|
|
803
|
+
* handler: async ({ params }) => params.a + params.b,
|
|
804
|
+
* });
|
|
805
|
+
* }
|
|
806
|
+
*
|
|
807
|
+
* run(
|
|
808
|
+
* Alepha.create()
|
|
809
|
+
* .with(AlephaMcp)
|
|
810
|
+
* .with(AlephaMcpStdio)
|
|
811
|
+
* .with(MyMcpServer)
|
|
812
|
+
* );
|
|
813
|
+
* ```
|
|
814
|
+
*
|
|
815
|
+
* @module alepha.mcp
|
|
816
|
+
*/
|
|
817
|
+
declare const AlephaMcp: alepha3.Service<alepha3.Module>;
|
|
818
|
+
//#endregion
|
|
819
|
+
export { $prompt, $resource, $tool, AlephaMcp, JSONRPC_VERSION, type JsonRpcError, JsonRpcErrorCodes, type JsonRpcNotification, JsonRpcParseError, type JsonRpcRequest, type JsonRpcResponse, MCP_PROTOCOL_VERSION, type McpCapabilities, type McpClientInfo, type McpContent, type McpContext, McpError, type McpInitializeParams, type McpInitializeResult, McpInvalidParamsError, type McpJsonSchema, McpMethodNotFoundError, type McpPromptArgument, type McpPromptContent, type McpPromptDescriptor, type McpPromptGetParams, type McpPromptGetResult, type McpPromptMessage, McpPromptNotFoundError, type McpResourceContent, type McpResourceDescriptor, McpResourceNotFoundError, type McpResourceReadParams, type McpResourceReadResult, type McpServerInfo, McpServerProvider, type McpToolCallParams, type McpToolCallResult, type McpToolDescriptor, McpToolNotFoundError, type PromptHandler, type PromptHandlerArgs, type PromptMessage, PromptPrimitive, type PromptPrimitiveOptions, type ResourceContent, type ResourceHandler, type ResourceHandlerArgs, ResourcePrimitive, type ResourcePrimitiveOptions, SseMcpTransport, StdioMcpTransport, type ToolHandler, type ToolHandlerArgs, type ToolHandlerResult, ToolPrimitive, type ToolPrimitiveOptions, type ToolPrimitiveSchema, createErrorResponse, createInternalError, createInvalidParamsError, createInvalidRequestError, createMethodNotFoundError, createNotification, createParseError, createResponse, isNotification, isValidJsonRpcRequest, parseMessage };
|
|
820
|
+
//# sourceMappingURL=index.d.ts.map
|