@runpod/mcp-server 2.0.0 → 3.1.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/CHANGELOG.md +97 -2
- package/README.md +59 -309
- package/dist/chunk-OM6RHPQC.mjs +3023 -0
- package/dist/chunk-OM6RHPQC.mjs.map +1 -0
- package/dist/http.cjs +1621 -489
- package/dist/http.cjs.map +1 -1
- package/dist/http.d.cts +35 -2
- package/dist/http.d.ts +35 -2
- package/dist/http.mjs +247 -17
- package/dist/http.mjs.map +1 -1
- package/dist/stdio.cjs +1420 -516
- package/dist/stdio.cjs.map +1 -1
- package/dist/stdio.mjs +1420 -516
- package/dist/stdio.mjs.map +1 -1
- package/dist/tools.cjs +1293 -399
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.d.cts +14 -0
- package/dist/tools.d.ts +14 -0
- package/dist/tools.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZP3TCVXG.mjs +0 -2116
- package/dist/chunk-ZP3TCVXG.mjs.map +0 -1
package/dist/tools.d.cts
CHANGED
|
@@ -25,6 +25,18 @@ declare function createHttpClient(deps: {
|
|
|
25
25
|
errorPrefix: string;
|
|
26
26
|
}): HttpClient;
|
|
27
27
|
|
|
28
|
+
interface SseResponse {
|
|
29
|
+
ok: boolean;
|
|
30
|
+
status: number;
|
|
31
|
+
text(): Promise<string>;
|
|
32
|
+
body: AsyncIterable<Buffer> | null;
|
|
33
|
+
}
|
|
34
|
+
type SseFetch = (url: string, init: {
|
|
35
|
+
method: string;
|
|
36
|
+
headers: Record<string, string>;
|
|
37
|
+
signal: AbortSignal;
|
|
38
|
+
}) => Promise<SseResponse>;
|
|
39
|
+
|
|
28
40
|
/**
|
|
29
41
|
* Context passed to every tool handler. Contains the API key used to
|
|
30
42
|
* authenticate against the Runpod REST and Serverless APIs, the transport the
|
|
@@ -36,12 +48,14 @@ interface ToolContext {
|
|
|
36
48
|
transport: 'stdio' | 'http';
|
|
37
49
|
clientUserAgent?: string;
|
|
38
50
|
serverVersion?: string;
|
|
51
|
+
onUnauthorized?: () => void;
|
|
39
52
|
}
|
|
40
53
|
type HttpFetch = Parameters<typeof createHttpClient>[0]['fetch'];
|
|
41
54
|
interface ToolDeps {
|
|
42
55
|
fetch?: HttpFetch;
|
|
43
56
|
v2Available?: boolean;
|
|
44
57
|
streamSse?: StreamSse;
|
|
58
|
+
sseFetch?: SseFetch;
|
|
45
59
|
}
|
|
46
60
|
interface StreamSseResult {
|
|
47
61
|
raw: string;
|
package/dist/tools.d.ts
CHANGED
|
@@ -25,6 +25,18 @@ declare function createHttpClient(deps: {
|
|
|
25
25
|
errorPrefix: string;
|
|
26
26
|
}): HttpClient;
|
|
27
27
|
|
|
28
|
+
interface SseResponse {
|
|
29
|
+
ok: boolean;
|
|
30
|
+
status: number;
|
|
31
|
+
text(): Promise<string>;
|
|
32
|
+
body: AsyncIterable<Buffer> | null;
|
|
33
|
+
}
|
|
34
|
+
type SseFetch = (url: string, init: {
|
|
35
|
+
method: string;
|
|
36
|
+
headers: Record<string, string>;
|
|
37
|
+
signal: AbortSignal;
|
|
38
|
+
}) => Promise<SseResponse>;
|
|
39
|
+
|
|
28
40
|
/**
|
|
29
41
|
* Context passed to every tool handler. Contains the API key used to
|
|
30
42
|
* authenticate against the Runpod REST and Serverless APIs, the transport the
|
|
@@ -36,12 +48,14 @@ interface ToolContext {
|
|
|
36
48
|
transport: 'stdio' | 'http';
|
|
37
49
|
clientUserAgent?: string;
|
|
38
50
|
serverVersion?: string;
|
|
51
|
+
onUnauthorized?: () => void;
|
|
39
52
|
}
|
|
40
53
|
type HttpFetch = Parameters<typeof createHttpClient>[0]['fetch'];
|
|
41
54
|
interface ToolDeps {
|
|
42
55
|
fetch?: HttpFetch;
|
|
43
56
|
v2Available?: boolean;
|
|
44
57
|
streamSse?: StreamSse;
|
|
58
|
+
sseFetch?: SseFetch;
|
|
45
59
|
}
|
|
46
60
|
interface StreamSseResult {
|
|
47
61
|
raw: string;
|
package/dist/tools.mjs
CHANGED