@wireweave/sdk 0.1.0-beta.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,97 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+
3
+ interface ApiConfig {
4
+ apiUrl: string;
5
+ apiKey: string;
6
+ }
7
+ interface CreditInfo {
8
+ balance?: number;
9
+ monthlyRemaining?: number;
10
+ totalAvailable?: number;
11
+ }
12
+ type HttpMethod$1 = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
13
+ interface ToolEndpoint$1 {
14
+ method: HttpMethod$1;
15
+ path: string;
16
+ pathParams?: string[];
17
+ }
18
+ interface ApiResult {
19
+ data: unknown;
20
+ credits?: CreditInfo;
21
+ }
22
+ interface ApiErrorBody {
23
+ error?: string;
24
+ message?: string;
25
+ }
26
+ interface LocalToolContentBlock {
27
+ type: 'text';
28
+ text: string;
29
+ }
30
+ interface LocalToolResult {
31
+ content: LocalToolContentBlock[];
32
+ isError?: boolean;
33
+ [key: string]: unknown;
34
+ }
35
+
36
+ declare function buildRequest(config: ApiConfig, endpoint: ToolEndpoint$1, args?: Record<string, unknown>): {
37
+ url: string;
38
+ options: RequestInit;
39
+ bodyForGet: Record<string, unknown>;
40
+ };
41
+ declare function parseErrorMessage(status: number, error: ApiErrorBody): string;
42
+ declare function extractCreditInfo(headers: Headers): CreditInfo;
43
+ declare function callApi(config: ApiConfig, endpoint: ToolEndpoint$1, args?: Record<string, unknown>, fetchFn?: typeof fetch): Promise<unknown>;
44
+
45
+ interface StoredConfig {
46
+ token: string;
47
+ apiUrl?: string;
48
+ }
49
+ interface AuthOptions {
50
+ configDir?: string;
51
+ configFileName?: string;
52
+ }
53
+ declare function getConfigPath(opts?: AuthOptions): string;
54
+ declare function loadToken(opts?: AuthOptions): Promise<StoredConfig | null>;
55
+ declare function saveToken(config: StoredConfig, opts?: AuthOptions): Promise<void>;
56
+ declare function clearToken(opts?: AuthOptions): Promise<void>;
57
+ interface VerifyTokenResult {
58
+ valid: boolean;
59
+ status: number;
60
+ body?: unknown;
61
+ }
62
+ declare function verifyToken(token: string, apiUrl: string, verifyEndpoint: string, fetchFn?: typeof fetch): Promise<VerifyTokenResult>;
63
+
64
+ declare const LOCAL_DISPATCH_TOOL_NAMES: ReadonlySet<string>;
65
+ declare function isLocalDispatchTool(name: string): boolean;
66
+ declare function localDispatch(toolName: string, args: Record<string, unknown>): LocalToolResult;
67
+
68
+ interface DispatchOptions {
69
+ apiConfig: ApiConfig;
70
+ endpoints: Record<string, ToolEndpoint$1>;
71
+ fetchFn?: typeof fetch;
72
+ }
73
+ declare function dispatch(toolName: string, args: Record<string, unknown>, options: DispatchOptions): Promise<LocalToolResult>;
74
+
75
+ /**
76
+ * MCP Tool Definitions
77
+ *
78
+ * ⚠️ AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
79
+ *
80
+ * This file is generated by the Wireweave team.
81
+ * To request changes, please open an issue at:
82
+ * https://github.com/wireweave/mcp-server/issues
83
+ *
84
+ * Generated: 2026-05-17T13:36:37.806Z
85
+ * Public tools: 32 (local: 9, server: 23)
86
+ */
87
+
88
+ declare const tools: Tool[];
89
+ type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
90
+ interface ToolEndpoint {
91
+ method: HttpMethod;
92
+ path: string;
93
+ pathParams?: string[];
94
+ }
95
+ declare const toolEndpoints: Record<string, ToolEndpoint>;
96
+
97
+ export { type ApiConfig, type ApiErrorBody, type ApiResult, type AuthOptions, type CreditInfo, type DispatchOptions, type HttpMethod$1 as HttpMethod, LOCAL_DISPATCH_TOOL_NAMES, type LocalToolContentBlock, type LocalToolResult, type StoredConfig, type ToolEndpoint$1 as ToolEndpoint, type VerifyTokenResult, buildRequest, callApi, clearToken, dispatch, extractCreditInfo, getConfigPath, isLocalDispatchTool, loadToken, localDispatch, parseErrorMessage, saveToken, toolEndpoints, tools, verifyToken };