@runpod/mcp-server 3.2.0 → 3.4.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/tools.d.cts CHANGED
@@ -4,6 +4,7 @@ interface RequestInitLike {
4
4
  method: string;
5
5
  headers: Record<string, string>;
6
6
  body?: string;
7
+ signal: AbortSignal;
7
8
  }
8
9
  type FetchLike = (url: string, init: RequestInitLike) => Promise<HttpResponseLike>;
9
10
  interface HttpResponseLike {
@@ -15,14 +16,20 @@ interface HttpResponseLike {
15
16
  get(name: string): string | null;
16
17
  };
17
18
  }
19
+ interface RequestOptions {
20
+ timeoutMs?: number;
21
+ }
22
+ type TimeoutCeiling = number | (() => number);
18
23
  interface HttpClient {
19
- (url: string, method?: string, body?: Record<string, unknown>): Promise<unknown>;
24
+ (url: string, method?: string, body?: Record<string, unknown>, options?: RequestOptions): Promise<unknown>;
20
25
  }
21
26
  declare function createHttpClient(deps: {
22
27
  apiKey: string;
23
28
  fetch: FetchLike;
24
29
  tracking: () => Record<string, string>;
25
30
  errorPrefix: string;
31
+ defaultTimeoutMs?: number;
32
+ maxTimeoutMs?: TimeoutCeiling;
26
33
  }): HttpClient;
27
34
 
28
35
  interface SseResponse {
@@ -59,6 +66,8 @@ interface ToolDeps {
59
66
  v2Available?: boolean;
60
67
  streamSse?: StreamSse;
61
68
  sseFetch?: SseFetch;
69
+ defaultTimeoutMs?: number;
70
+ maxTimeoutMs?: TimeoutCeiling;
62
71
  }
63
72
  interface StreamSseResult {
64
73
  raw: string;
package/dist/tools.d.ts CHANGED
@@ -4,6 +4,7 @@ interface RequestInitLike {
4
4
  method: string;
5
5
  headers: Record<string, string>;
6
6
  body?: string;
7
+ signal: AbortSignal;
7
8
  }
8
9
  type FetchLike = (url: string, init: RequestInitLike) => Promise<HttpResponseLike>;
9
10
  interface HttpResponseLike {
@@ -15,14 +16,20 @@ interface HttpResponseLike {
15
16
  get(name: string): string | null;
16
17
  };
17
18
  }
19
+ interface RequestOptions {
20
+ timeoutMs?: number;
21
+ }
22
+ type TimeoutCeiling = number | (() => number);
18
23
  interface HttpClient {
19
- (url: string, method?: string, body?: Record<string, unknown>): Promise<unknown>;
24
+ (url: string, method?: string, body?: Record<string, unknown>, options?: RequestOptions): Promise<unknown>;
20
25
  }
21
26
  declare function createHttpClient(deps: {
22
27
  apiKey: string;
23
28
  fetch: FetchLike;
24
29
  tracking: () => Record<string, string>;
25
30
  errorPrefix: string;
31
+ defaultTimeoutMs?: number;
32
+ maxTimeoutMs?: TimeoutCeiling;
26
33
  }): HttpClient;
27
34
 
28
35
  interface SseResponse {
@@ -59,6 +66,8 @@ interface ToolDeps {
59
66
  v2Available?: boolean;
60
67
  streamSse?: StreamSse;
61
68
  sseFetch?: SseFetch;
69
+ defaultTimeoutMs?: number;
70
+ maxTimeoutMs?: TimeoutCeiling;
62
71
  }
63
72
  interface StreamSseResult {
64
73
  raw: string;
package/dist/tools.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  registerTools
3
- } from "./chunk-WGK7D2YR.mjs";
3
+ } from "./chunk-G4URDODF.mjs";
4
4
  export {
5
5
  registerTools
6
6
  };