@frontmcp/react 0.0.1
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/LICENSE +201 -0
- package/README.md +263 -0
- package/ai/createToolHandler.d.ts +10 -0
- package/ai/createToolHandler.d.ts.map +1 -0
- package/ai/index.d.ts +7 -0
- package/ai/index.d.ts.map +1 -0
- package/ai/index.js +416 -0
- package/ai/types.d.ts +52 -0
- package/ai/types.d.ts.map +1 -0
- package/ai/useAITools.d.ts +17 -0
- package/ai/useAITools.d.ts.map +1 -0
- package/ai/useTools.d.ts +19 -0
- package/ai/useTools.d.ts.map +1 -0
- package/api/api.types.d.ts +61 -0
- package/api/api.types.d.ts.map +1 -0
- package/api/createFetchClient.d.ts +9 -0
- package/api/createFetchClient.d.ts.map +1 -0
- package/api/index.d.ts +12 -0
- package/api/index.d.ts.map +1 -0
- package/api/index.js +402 -0
- package/api/parseOpenApiSpec.d.ts +9 -0
- package/api/parseOpenApiSpec.d.ts.map +1 -0
- package/api/useApiClient.d.ts +9 -0
- package/api/useApiClient.d.ts.map +1 -0
- package/components/AgentContent.d.ts +30 -0
- package/components/AgentContent.d.ts.map +1 -0
- package/components/AgentSearch.d.ts +35 -0
- package/components/AgentSearch.d.ts.map +1 -0
- package/components/ComponentRegistry.d.ts +36 -0
- package/components/ComponentRegistry.d.ts.map +1 -0
- package/components/DomResources.d.ts +16 -0
- package/components/DomResources.d.ts.map +1 -0
- package/components/DynamicRenderer.d.ts +19 -0
- package/components/DynamicRenderer.d.ts.map +1 -0
- package/components/OutputDisplay.d.ts +11 -0
- package/components/OutputDisplay.d.ts.map +1 -0
- package/components/PromptForm.d.ts +13 -0
- package/components/PromptForm.d.ts.map +1 -0
- package/components/ResourceViewer.d.ts +18 -0
- package/components/ResourceViewer.d.ts.map +1 -0
- package/components/ToolForm.d.ts +16 -0
- package/components/ToolForm.d.ts.map +1 -0
- package/components/index.d.ts +21 -0
- package/components/index.d.ts.map +1 -0
- package/components/mcpComponent.d.ts +48 -0
- package/components/mcpComponent.d.ts.map +1 -0
- package/esm/ai/index.mjs +393 -0
- package/esm/api/index.mjs +379 -0
- package/esm/index.mjs +1814 -0
- package/esm/package.json +111 -0
- package/esm/router/index.mjs +157 -0
- package/esm/state/index.mjs +450 -0
- package/hooks/index.d.ts +21 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/useCallTool.d.ts +9 -0
- package/hooks/useCallTool.d.ts.map +1 -0
- package/hooks/useComponentTree.d.ts +21 -0
- package/hooks/useComponentTree.d.ts.map +1 -0
- package/hooks/useDynamicResource.d.ts +20 -0
- package/hooks/useDynamicResource.d.ts.map +1 -0
- package/hooks/useDynamicTool.d.ts +39 -0
- package/hooks/useDynamicTool.d.ts.map +1 -0
- package/hooks/useFrontMcp.d.ts +8 -0
- package/hooks/useFrontMcp.d.ts.map +1 -0
- package/hooks/useGetPrompt.d.ts +13 -0
- package/hooks/useGetPrompt.d.ts.map +1 -0
- package/hooks/useListPrompts.d.ts +10 -0
- package/hooks/useListPrompts.d.ts.map +1 -0
- package/hooks/useListResources.d.ts +14 -0
- package/hooks/useListResources.d.ts.map +1 -0
- package/hooks/useListTools.d.ts +10 -0
- package/hooks/useListTools.d.ts.map +1 -0
- package/hooks/useReadResource.d.ts +23 -0
- package/hooks/useReadResource.d.ts.map +1 -0
- package/hooks/useResolvedServer.d.ts +16 -0
- package/hooks/useResolvedServer.d.ts.map +1 -0
- package/hooks/useServer.d.ts +17 -0
- package/hooks/useServer.d.ts.map +1 -0
- package/hooks/useStoreResource.d.ts +22 -0
- package/hooks/useStoreResource.d.ts.map +1 -0
- package/index.d.ts +33 -0
- package/index.d.ts.map +1 -0
- package/index.js +1821 -0
- package/package.json +111 -0
- package/provider/FrontMcpContext.d.ts +6 -0
- package/provider/FrontMcpContext.d.ts.map +1 -0
- package/provider/FrontMcpProvider.d.ts +34 -0
- package/provider/FrontMcpProvider.d.ts.map +1 -0
- package/provider/index.d.ts +4 -0
- package/provider/index.d.ts.map +1 -0
- package/registry/DynamicRegistry.d.ts +55 -0
- package/registry/DynamicRegistry.d.ts.map +1 -0
- package/registry/ServerRegistry.d.ts +43 -0
- package/registry/ServerRegistry.d.ts.map +1 -0
- package/registry/createWrappedServer.d.ts +14 -0
- package/registry/createWrappedServer.d.ts.map +1 -0
- package/registry/index.d.ts +5 -0
- package/registry/index.d.ts.map +1 -0
- package/router/current-route.resource.d.ts +11 -0
- package/router/current-route.resource.d.ts.map +1 -0
- package/router/go-back.tool.d.ts +18 -0
- package/router/go-back.tool.d.ts.map +1 -0
- package/router/index.d.ts +9 -0
- package/router/index.d.ts.map +1 -0
- package/router/index.js +180 -0
- package/router/navigate.tool.d.ts +35 -0
- package/router/navigate.tool.d.ts.map +1 -0
- package/router/router-bridge.d.ts +20 -0
- package/router/router-bridge.d.ts.map +1 -0
- package/router/router.entries.d.ts +23 -0
- package/router/router.entries.d.ts.map +1 -0
- package/router/useRouterBridge.d.ts +7 -0
- package/router/useRouterBridge.d.ts.map +1 -0
- package/state/adapters/createStore.d.ts +15 -0
- package/state/adapters/createStore.d.ts.map +1 -0
- package/state/adapters/index.d.ts +7 -0
- package/state/adapters/index.d.ts.map +1 -0
- package/state/adapters/reduxAdapter.d.ts +21 -0
- package/state/adapters/reduxAdapter.d.ts.map +1 -0
- package/state/adapters/valtioAdapter.d.ts +19 -0
- package/state/adapters/valtioAdapter.d.ts.map +1 -0
- package/state/index.d.ts +15 -0
- package/state/index.d.ts.map +1 -0
- package/state/index.js +473 -0
- package/state/state.types.d.ts +48 -0
- package/state/state.types.d.ts.map +1 -0
- package/state/useReduxResource.d.ts +8 -0
- package/state/useReduxResource.d.ts.map +1 -0
- package/state/useStoreRegistration.d.ts +14 -0
- package/state/useStoreRegistration.d.ts.map +1 -0
- package/state/useStoreResource.d.ts +10 -0
- package/state/useStoreResource.d.ts.map +1 -0
- package/state/useValtioResource.d.ts +9 -0
- package/state/useValtioResource.d.ts.map +1 -0
- package/types.d.ts +127 -0
- package/types.d.ts.map +1 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.d.ts.map +1 -0
- package/utils/zodToJsonSchema.d.ts +9 -0
- package/utils/zodToJsonSchema.d.ts.map +1 -0
package/ai/index.js
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// libs/react/src/ai/index.ts
|
|
21
|
+
var ai_exports = {};
|
|
22
|
+
__export(ai_exports, {
|
|
23
|
+
createToolCallHandler: () => createToolCallHandler,
|
|
24
|
+
useAITools: () => useAITools,
|
|
25
|
+
useTools: () => useTools
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(ai_exports);
|
|
28
|
+
|
|
29
|
+
// libs/react/src/ai/useAITools.ts
|
|
30
|
+
var import_react4 = require("react");
|
|
31
|
+
var import_sdk = require("@frontmcp/sdk");
|
|
32
|
+
|
|
33
|
+
// libs/react/src/hooks/useResolvedServer.ts
|
|
34
|
+
var import_react3 = require("react");
|
|
35
|
+
|
|
36
|
+
// libs/react/src/provider/FrontMcpContext.ts
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
|
|
39
|
+
// libs/react/src/components/ComponentRegistry.ts
|
|
40
|
+
var ComponentRegistry = class {
|
|
41
|
+
entries = /* @__PURE__ */ new Map();
|
|
42
|
+
register(uri, component, meta) {
|
|
43
|
+
const name = extractName(uri);
|
|
44
|
+
this.entries.set(uri, { uri, name, component, description: meta?.description });
|
|
45
|
+
}
|
|
46
|
+
registerAll(map) {
|
|
47
|
+
for (const [uri, component] of Object.entries(map)) {
|
|
48
|
+
this.register(uri, component);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
get(uri) {
|
|
52
|
+
return this.entries.get(uri)?.component;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Resolve a shorthand name like `'UserCard'` by trying
|
|
56
|
+
* `component://UserCard`, `element://UserCard`, `page://UserCard`.
|
|
57
|
+
*/
|
|
58
|
+
resolve(type) {
|
|
59
|
+
const exact = this.entries.get(type);
|
|
60
|
+
if (exact) return exact.component;
|
|
61
|
+
for (const protocol of ["component://", "element://", "page://"]) {
|
|
62
|
+
const entry = this.entries.get(`${protocol}${type}`);
|
|
63
|
+
if (entry) return entry.component;
|
|
64
|
+
}
|
|
65
|
+
return void 0;
|
|
66
|
+
}
|
|
67
|
+
has(uri) {
|
|
68
|
+
return this.entries.has(uri);
|
|
69
|
+
}
|
|
70
|
+
list() {
|
|
71
|
+
return Array.from(this.entries.values()).map(({ uri, name, description }) => ({
|
|
72
|
+
uri,
|
|
73
|
+
name,
|
|
74
|
+
description
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
clear() {
|
|
78
|
+
this.entries.clear();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
function extractName(uri) {
|
|
82
|
+
const idx = uri.indexOf("://");
|
|
83
|
+
return idx >= 0 ? uri.slice(idx + 3) : uri;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// libs/react/src/registry/DynamicRegistry.ts
|
|
87
|
+
var DynamicRegistry = class {
|
|
88
|
+
tools = /* @__PURE__ */ new Map();
|
|
89
|
+
resources = /* @__PURE__ */ new Map();
|
|
90
|
+
toolRefCounts = /* @__PURE__ */ new Map();
|
|
91
|
+
resourceRefCounts = /* @__PURE__ */ new Map();
|
|
92
|
+
listeners = /* @__PURE__ */ new Set();
|
|
93
|
+
version = 0;
|
|
94
|
+
/**
|
|
95
|
+
* Register a dynamic tool. Returns an unregister function
|
|
96
|
+
* suitable for useEffect cleanup.
|
|
97
|
+
*
|
|
98
|
+
* Multiple registrations of the same name are ref-counted:
|
|
99
|
+
* subsequent registrations update the definition but the tool
|
|
100
|
+
* is only removed when every registrant has unregistered.
|
|
101
|
+
*/
|
|
102
|
+
registerTool(def) {
|
|
103
|
+
const existing = this.toolRefCounts.get(def.name) ?? 0;
|
|
104
|
+
this.toolRefCounts.set(def.name, existing + 1);
|
|
105
|
+
this.tools.set(def.name, def);
|
|
106
|
+
if (existing === 0) {
|
|
107
|
+
this.notify();
|
|
108
|
+
}
|
|
109
|
+
let called = false;
|
|
110
|
+
return () => {
|
|
111
|
+
if (called) return;
|
|
112
|
+
called = true;
|
|
113
|
+
this.unregisterTool(def.name);
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
unregisterTool(name) {
|
|
117
|
+
const count = this.toolRefCounts.get(name);
|
|
118
|
+
if (count == null) return;
|
|
119
|
+
if (count <= 1) {
|
|
120
|
+
this.toolRefCounts.delete(name);
|
|
121
|
+
this.tools.delete(name);
|
|
122
|
+
this.notify();
|
|
123
|
+
} else {
|
|
124
|
+
this.toolRefCounts.set(name, count - 1);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Register a dynamic resource. Returns an unregister function
|
|
129
|
+
* suitable for useEffect cleanup.
|
|
130
|
+
*
|
|
131
|
+
* Multiple registrations of the same URI are ref-counted.
|
|
132
|
+
*/
|
|
133
|
+
registerResource(def) {
|
|
134
|
+
const existing = this.resourceRefCounts.get(def.uri) ?? 0;
|
|
135
|
+
this.resourceRefCounts.set(def.uri, existing + 1);
|
|
136
|
+
this.resources.set(def.uri, def);
|
|
137
|
+
if (existing === 0) {
|
|
138
|
+
this.notify();
|
|
139
|
+
}
|
|
140
|
+
let called = false;
|
|
141
|
+
return () => {
|
|
142
|
+
if (called) return;
|
|
143
|
+
called = true;
|
|
144
|
+
this.unregisterResource(def.uri);
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
unregisterResource(uri) {
|
|
148
|
+
const count = this.resourceRefCounts.get(uri);
|
|
149
|
+
if (count == null) return;
|
|
150
|
+
if (count <= 1) {
|
|
151
|
+
this.resourceRefCounts.delete(uri);
|
|
152
|
+
this.resources.delete(uri);
|
|
153
|
+
this.notify();
|
|
154
|
+
} else {
|
|
155
|
+
this.resourceRefCounts.set(uri, count - 1);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/** Update the execute function for an existing tool (for stale closure prevention). */
|
|
159
|
+
updateToolExecute(name, execute) {
|
|
160
|
+
const existing = this.tools.get(name);
|
|
161
|
+
if (existing) {
|
|
162
|
+
existing.execute = execute;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/** Update the read function for an existing resource and notify subscribers. */
|
|
166
|
+
updateResourceRead(uri, read) {
|
|
167
|
+
const existing = this.resources.get(uri);
|
|
168
|
+
if (existing) {
|
|
169
|
+
existing.read = read;
|
|
170
|
+
this.notify();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
getTools() {
|
|
174
|
+
return [...this.tools.values()];
|
|
175
|
+
}
|
|
176
|
+
getResources() {
|
|
177
|
+
return [...this.resources.values()];
|
|
178
|
+
}
|
|
179
|
+
findTool(name) {
|
|
180
|
+
return this.tools.get(name);
|
|
181
|
+
}
|
|
182
|
+
findResource(uri) {
|
|
183
|
+
return this.resources.get(uri);
|
|
184
|
+
}
|
|
185
|
+
hasTool(name) {
|
|
186
|
+
return this.tools.has(name);
|
|
187
|
+
}
|
|
188
|
+
hasResource(uri) {
|
|
189
|
+
return this.resources.has(uri);
|
|
190
|
+
}
|
|
191
|
+
subscribe(listener) {
|
|
192
|
+
this.listeners.add(listener);
|
|
193
|
+
return () => {
|
|
194
|
+
this.listeners.delete(listener);
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
getVersion() {
|
|
198
|
+
return this.version;
|
|
199
|
+
}
|
|
200
|
+
clear() {
|
|
201
|
+
if (this.tools.size === 0 && this.resources.size === 0) return;
|
|
202
|
+
this.tools.clear();
|
|
203
|
+
this.resources.clear();
|
|
204
|
+
this.toolRefCounts.clear();
|
|
205
|
+
this.resourceRefCounts.clear();
|
|
206
|
+
this.notify();
|
|
207
|
+
}
|
|
208
|
+
notify() {
|
|
209
|
+
this.version++;
|
|
210
|
+
this.listeners.forEach((l) => {
|
|
211
|
+
l();
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
// libs/react/src/provider/FrontMcpContext.ts
|
|
217
|
+
var defaultDynamicRegistry = new DynamicRegistry();
|
|
218
|
+
var FrontMcpContext = (0, import_react.createContext)({
|
|
219
|
+
name: "default",
|
|
220
|
+
registry: new ComponentRegistry(),
|
|
221
|
+
dynamicRegistry: defaultDynamicRegistry,
|
|
222
|
+
getDynamicRegistry: () => defaultDynamicRegistry,
|
|
223
|
+
connect: async () => {
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
// libs/react/src/hooks/useServer.ts
|
|
228
|
+
var import_react2 = require("react");
|
|
229
|
+
|
|
230
|
+
// libs/react/src/registry/ServerRegistry.ts
|
|
231
|
+
var ServerRegistry = class {
|
|
232
|
+
entries = /* @__PURE__ */ new Map();
|
|
233
|
+
listeners = /* @__PURE__ */ new Set();
|
|
234
|
+
version = 0;
|
|
235
|
+
register(name, server) {
|
|
236
|
+
this.entries.set(name, {
|
|
237
|
+
server,
|
|
238
|
+
client: null,
|
|
239
|
+
status: "idle",
|
|
240
|
+
error: null,
|
|
241
|
+
tools: [],
|
|
242
|
+
resources: [],
|
|
243
|
+
resourceTemplates: [],
|
|
244
|
+
prompts: []
|
|
245
|
+
});
|
|
246
|
+
this.notify();
|
|
247
|
+
}
|
|
248
|
+
unregister(name) {
|
|
249
|
+
this.entries.delete(name);
|
|
250
|
+
this.notify();
|
|
251
|
+
}
|
|
252
|
+
get(name) {
|
|
253
|
+
return this.entries.get(name);
|
|
254
|
+
}
|
|
255
|
+
has(name) {
|
|
256
|
+
return this.entries.has(name);
|
|
257
|
+
}
|
|
258
|
+
list() {
|
|
259
|
+
return [...this.entries.keys()];
|
|
260
|
+
}
|
|
261
|
+
async connect(name) {
|
|
262
|
+
const entry = this.entries.get(name);
|
|
263
|
+
if (!entry) throw new Error(`Server "${name}" not registered`);
|
|
264
|
+
if (entry.client) return entry.client;
|
|
265
|
+
this.entries.set(name, { ...entry, status: "connecting", error: null });
|
|
266
|
+
this.notify();
|
|
267
|
+
try {
|
|
268
|
+
const client = await entry.server.connect();
|
|
269
|
+
const [toolsResult, resourcesResult, templatesResult, promptsResult] = await Promise.all([
|
|
270
|
+
client.listTools(),
|
|
271
|
+
client.listResources(),
|
|
272
|
+
client.listResourceTemplates(),
|
|
273
|
+
client.listPrompts()
|
|
274
|
+
]);
|
|
275
|
+
const connected = {
|
|
276
|
+
...entry,
|
|
277
|
+
client,
|
|
278
|
+
tools: toolsResult,
|
|
279
|
+
resources: resourcesResult.resources ?? [],
|
|
280
|
+
resourceTemplates: templatesResult.resourceTemplates ?? [],
|
|
281
|
+
prompts: promptsResult.prompts ?? [],
|
|
282
|
+
status: "connected",
|
|
283
|
+
error: null
|
|
284
|
+
};
|
|
285
|
+
this.entries.set(name, connected);
|
|
286
|
+
this.notify();
|
|
287
|
+
return client;
|
|
288
|
+
} catch (err) {
|
|
289
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
290
|
+
this.entries.set(name, { ...entry, error, status: "error" });
|
|
291
|
+
this.notify();
|
|
292
|
+
throw error;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
async connectAll() {
|
|
296
|
+
await Promise.all(this.list().map((name) => this.connect(name)));
|
|
297
|
+
}
|
|
298
|
+
update(name, partial) {
|
|
299
|
+
const entry = this.entries.get(name);
|
|
300
|
+
if (entry) {
|
|
301
|
+
this.entries.set(name, { ...entry, ...partial });
|
|
302
|
+
this.notify();
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
clear() {
|
|
306
|
+
this.entries.clear();
|
|
307
|
+
this.notify();
|
|
308
|
+
}
|
|
309
|
+
subscribe(listener) {
|
|
310
|
+
this.listeners.add(listener);
|
|
311
|
+
return () => {
|
|
312
|
+
this.listeners.delete(listener);
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
getVersion() {
|
|
316
|
+
return this.version;
|
|
317
|
+
}
|
|
318
|
+
notify() {
|
|
319
|
+
this.version++;
|
|
320
|
+
this.listeners.forEach((l) => l());
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
var serverRegistry = new ServerRegistry();
|
|
324
|
+
|
|
325
|
+
// libs/react/src/hooks/useServer.ts
|
|
326
|
+
function useServer(name) {
|
|
327
|
+
const subscribe = (0, import_react2.useCallback)((cb) => serverRegistry.subscribe(cb), []);
|
|
328
|
+
const getSnapshot = (0, import_react2.useCallback)(() => {
|
|
329
|
+
return serverRegistry.get(name ?? "default");
|
|
330
|
+
}, [name]);
|
|
331
|
+
return (0, import_react2.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// libs/react/src/hooks/useResolvedServer.ts
|
|
335
|
+
function useResolvedServer(serverName) {
|
|
336
|
+
const ctx = (0, import_react3.useContext)(FrontMcpContext);
|
|
337
|
+
const resolvedName = serverName ?? ctx.name;
|
|
338
|
+
const entry = useServer(resolvedName);
|
|
339
|
+
return { entry, name: resolvedName, registry: ctx.registry, connect: ctx.connect };
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// libs/react/src/ai/useAITools.ts
|
|
343
|
+
function useAITools(platform, options) {
|
|
344
|
+
const { entry } = useResolvedServer(options?.server);
|
|
345
|
+
const server = entry?.server ?? null;
|
|
346
|
+
const toolInfos = entry?.tools ?? [];
|
|
347
|
+
const status = entry?.status ?? "idle";
|
|
348
|
+
const [formattedTools, setFormattedTools] = (0, import_react4.useState)(null);
|
|
349
|
+
const [loading, setLoading] = (0, import_react4.useState)(true);
|
|
350
|
+
const [error, setError] = (0, import_react4.useState)(null);
|
|
351
|
+
(0, import_react4.useEffect)(() => {
|
|
352
|
+
if (status !== "connected" || toolInfos.length === 0) {
|
|
353
|
+
setFormattedTools(null);
|
|
354
|
+
setLoading(status !== "connected" && status !== "error");
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
try {
|
|
358
|
+
const mcpTools = toolInfos.filter((t) => t.inputSchema != null).map((t) => ({ name: t.name, description: t.description, inputSchema: t.inputSchema }));
|
|
359
|
+
if (mcpTools.length === 0) {
|
|
360
|
+
setFormattedTools(null);
|
|
361
|
+
setLoading(false);
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
const formatted = (0, import_sdk.formatToolsForPlatform)(
|
|
365
|
+
mcpTools,
|
|
366
|
+
platform
|
|
367
|
+
);
|
|
368
|
+
setFormattedTools(formatted);
|
|
369
|
+
setLoading(false);
|
|
370
|
+
setError(null);
|
|
371
|
+
} catch (err) {
|
|
372
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
373
|
+
setLoading(false);
|
|
374
|
+
}
|
|
375
|
+
}, [toolInfos, platform, status]);
|
|
376
|
+
const callTool = (0, import_react4.useCallback)(
|
|
377
|
+
async (name, args) => {
|
|
378
|
+
if (!server) {
|
|
379
|
+
throw new Error("FrontMCP server not available");
|
|
380
|
+
}
|
|
381
|
+
try {
|
|
382
|
+
const rawResult = await server.callTool(name, args);
|
|
383
|
+
return (0, import_sdk.formatResultForPlatform)(rawResult, platform);
|
|
384
|
+
} catch (err) {
|
|
385
|
+
const error2 = err instanceof Error ? err : new Error(String(err));
|
|
386
|
+
setError(error2);
|
|
387
|
+
throw error2;
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
[server, platform]
|
|
391
|
+
);
|
|
392
|
+
return { tools: formattedTools, callTool, loading, error };
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// libs/react/src/ai/useTools.ts
|
|
396
|
+
var import_react5 = require("react");
|
|
397
|
+
var import_utils = require("@frontmcp/utils");
|
|
398
|
+
function useTools(platform, options) {
|
|
399
|
+
const { tools, callTool, loading, error } = useAITools(platform, options);
|
|
400
|
+
const processToolCalls = (0, import_react5.useCallback)(
|
|
401
|
+
(calls) => (0, import_utils.processPlatformToolCalls)(platform, calls, callTool),
|
|
402
|
+
[platform, callTool]
|
|
403
|
+
);
|
|
404
|
+
return { tools, processToolCalls, loading, error };
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// libs/react/src/ai/createToolHandler.ts
|
|
408
|
+
var import_sdk2 = require("@frontmcp/sdk");
|
|
409
|
+
function createToolCallHandler(server, platform) {
|
|
410
|
+
return {
|
|
411
|
+
callTool: async (name, args) => {
|
|
412
|
+
const rawResult = await server.callTool(name, args);
|
|
413
|
+
return (0, import_sdk2.formatResultForPlatform)(rawResult, platform);
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
}
|
package/ai/types.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI SDK integration types.
|
|
3
|
+
*
|
|
4
|
+
* Platform-specific tool call types are re-exported from @frontmcp/utils.
|
|
5
|
+
* SDK-dependent types (tool shapes, hook return types) remain here.
|
|
6
|
+
*/
|
|
7
|
+
import type { OpenAITool, ClaudeTool, LangChainTool, VercelAITools, LLMPlatform, CallToolResult } from '@frontmcp/sdk';
|
|
8
|
+
import type { OpenAIToolCallItem as _OpenAIToolCallItem, ClaudeToolUseBlock as _ClaudeToolUseBlock, VercelToolCallInfo as _VercelToolCallInfo } from '@frontmcp/utils';
|
|
9
|
+
export type OpenAIToolCallItem = _OpenAIToolCallItem;
|
|
10
|
+
export type ClaudeToolUseBlock = _ClaudeToolUseBlock;
|
|
11
|
+
export type VercelToolCallInfo = _VercelToolCallInfo;
|
|
12
|
+
/**
|
|
13
|
+
* Formatted tool result — local union matching SDK's FormattedToolResult.
|
|
14
|
+
* Synced with: libs/sdk/src/direct/llm-platform.ts FormattedToolResult
|
|
15
|
+
* @see libs/react/src/ai/__tests__/types-compat.spec.ts for drift guard
|
|
16
|
+
*/
|
|
17
|
+
export type FormattedToolResult = string | Record<string, unknown> | Array<{
|
|
18
|
+
type: string;
|
|
19
|
+
text: string;
|
|
20
|
+
}> | CallToolResult['content'] | {
|
|
21
|
+
content?: Array<{
|
|
22
|
+
type: string;
|
|
23
|
+
text?: string;
|
|
24
|
+
data?: string;
|
|
25
|
+
mimeType?: string;
|
|
26
|
+
}>;
|
|
27
|
+
} | {
|
|
28
|
+
text?: string[];
|
|
29
|
+
images?: Array<{
|
|
30
|
+
data: string;
|
|
31
|
+
mimeType: string;
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
export interface McpToolInfo {
|
|
35
|
+
name: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
inputSchema: Record<string, unknown>;
|
|
38
|
+
}
|
|
39
|
+
export type PlatformToolsMap = {
|
|
40
|
+
openai: OpenAITool[];
|
|
41
|
+
claude: ClaudeTool[];
|
|
42
|
+
langchain: LangChainTool[];
|
|
43
|
+
'vercel-ai': VercelAITools;
|
|
44
|
+
raw: McpToolInfo[];
|
|
45
|
+
};
|
|
46
|
+
export interface UseAIToolsResult<P extends LLMPlatform> {
|
|
47
|
+
tools: PlatformToolsMap[P] | null;
|
|
48
|
+
callTool: (name: string, args?: Record<string, unknown>) => Promise<FormattedToolResult>;
|
|
49
|
+
loading: boolean;
|
|
50
|
+
error: Error | null;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ai/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,KAAK,EACV,kBAAkB,IAAI,mBAAmB,EACzC,kBAAkB,IAAI,mBAAmB,EACzC,kBAAkB,IAAI,mBAAmB,EAC1C,MAAM,iBAAiB,CAAC;AAGzB,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GACrC,cAAc,CAAC,SAAS,CAAC,GACzB;IAAE,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,GACtF;IAAE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAM5E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAMD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,WAAW,EAAE,aAAa,CAAC;IAC3B,GAAG,EAAE,WAAW,EAAE,CAAC;CACpB,CAAC;AAMF,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,WAAW;IACrD,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACzF,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useAITools — generic hook that bridges FrontMCP tools to any AI SDK platform.
|
|
3
|
+
*
|
|
4
|
+
* Reads raw MCP tools from the ServerRegistry, formats them via
|
|
5
|
+
* `formatToolsForPlatform()`, and provides a `callTool` handler that
|
|
6
|
+
* executes via `server.callTool()` + `formatResultForPlatform()`.
|
|
7
|
+
*
|
|
8
|
+
* Supports multi-server via `options.server`.
|
|
9
|
+
*/
|
|
10
|
+
import type { LLMPlatform } from '@frontmcp/sdk';
|
|
11
|
+
import type { UseAIToolsResult } from './types';
|
|
12
|
+
interface AIToolsOptions {
|
|
13
|
+
server?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function useAITools<P extends LLMPlatform>(platform: P, options?: AIToolsOptions): UseAIToolsResult<P>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=useAITools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAITools.d.ts","sourceRoot":"","sources":["../../src/ai/useAITools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAE,gBAAgB,EAAsD,MAAM,SAAS,CAAC;AAEpG,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,WAAW,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,gBAAgB,CAAC,CAAC,CAAC,CA0D5G"}
|
package/ai/useTools.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useTools — generic hook replacing per-platform hooks.
|
|
3
|
+
*
|
|
4
|
+
* Delegates tool call processing to `processPlatformToolCalls` from
|
|
5
|
+
* `@frontmcp/utils`, making the logic reusable in Node.js backends.
|
|
6
|
+
*/
|
|
7
|
+
import type { SupportedPlatform, PlatformToolCallsInput, PlatformToolCallsOutput } from '@frontmcp/utils';
|
|
8
|
+
import type { PlatformToolsMap } from './types';
|
|
9
|
+
export interface UseToolsResult<P extends SupportedPlatform> {
|
|
10
|
+
tools: PlatformToolsMap[P] | null;
|
|
11
|
+
processToolCalls: (calls: PlatformToolCallsInput[P]) => Promise<PlatformToolCallsOutput[P]>;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
error: Error | null;
|
|
14
|
+
}
|
|
15
|
+
export interface ToolsOptions {
|
|
16
|
+
server?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function useTools<P extends SupportedPlatform>(platform: P, options?: ToolsOptions): UseToolsResult<P>;
|
|
19
|
+
//# sourceMappingURL=useTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTools.d.ts","sourceRoot":"","sources":["../../src/ai/useTools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,uBAAuB,EAAc,MAAM,iBAAiB,CAAC;AAEtH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,iBAAiB;IACzD,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5F,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAcD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,iBAAiB,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC,CAS5G"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for API client integration.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiOperation {
|
|
5
|
+
/** Unique operation identifier (becomes part of the tool name). */
|
|
6
|
+
operationId: string;
|
|
7
|
+
/** Human-readable description for agents. */
|
|
8
|
+
description: string;
|
|
9
|
+
/** HTTP method (GET, POST, PUT, DELETE, PATCH). */
|
|
10
|
+
method: string;
|
|
11
|
+
/** URL path (may contain {param} placeholders). */
|
|
12
|
+
path: string;
|
|
13
|
+
/** JSON Schema for the operation's input. */
|
|
14
|
+
inputSchema: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
/** Configuration for a single HTTP request. */
|
|
17
|
+
export interface HttpRequestConfig {
|
|
18
|
+
/** HTTP method (GET, POST, PUT, DELETE, PATCH, etc.). */
|
|
19
|
+
method: string;
|
|
20
|
+
/** Fully resolved URL. */
|
|
21
|
+
url: string;
|
|
22
|
+
/** Request headers. */
|
|
23
|
+
headers: Record<string, string>;
|
|
24
|
+
/** Request body (will be serialized by the client). */
|
|
25
|
+
body?: unknown;
|
|
26
|
+
}
|
|
27
|
+
/** Normalized HTTP response returned by an HttpClient. */
|
|
28
|
+
export interface HttpResponse {
|
|
29
|
+
/** HTTP status code. */
|
|
30
|
+
status: number;
|
|
31
|
+
/** HTTP status text (optional). */
|
|
32
|
+
statusText?: string;
|
|
33
|
+
/** Parsed response data. */
|
|
34
|
+
data: unknown;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Generic HTTP client interface.
|
|
38
|
+
*
|
|
39
|
+
* Implement this to inject any HTTP library (axios, ky, got, custom wrappers
|
|
40
|
+
* with token refresh, auth headers, interceptors, etc.).
|
|
41
|
+
*/
|
|
42
|
+
export interface HttpClient {
|
|
43
|
+
request(config: HttpRequestConfig): Promise<HttpResponse>;
|
|
44
|
+
}
|
|
45
|
+
export interface ApiClientOptions {
|
|
46
|
+
/** Base URL for all API requests. */
|
|
47
|
+
baseUrl: string;
|
|
48
|
+
/** Operations to register as MCP tools. */
|
|
49
|
+
operations: ApiOperation[];
|
|
50
|
+
/** Static headers or header factory function. */
|
|
51
|
+
headers?: Record<string, string> | (() => Record<string, string>);
|
|
52
|
+
/** Tool name prefix (default: 'api'). */
|
|
53
|
+
prefix?: string;
|
|
54
|
+
/** Inject any HTTP client (axios, ky, custom). Takes precedence over `fetch`. */
|
|
55
|
+
client?: HttpClient;
|
|
56
|
+
/** @deprecated Use `client` instead. Raw fetch fallback. */
|
|
57
|
+
fetch?: typeof globalThis.fetch;
|
|
58
|
+
/** Target a specific named server. */
|
|
59
|
+
server?: string;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=api.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../../src/api/api.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,+CAA+C;AAC/C,MAAM,WAAW,iBAAiB;IAChC,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,uDAAuD;IACvD,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,0DAA0D;AAC1D,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClE,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createFetchClient — wraps a plain fetch function into the HttpClient interface.
|
|
3
|
+
*
|
|
4
|
+
* Useful for developers who want the generic HttpClient interface but still
|
|
5
|
+
* use fetch under the hood.
|
|
6
|
+
*/
|
|
7
|
+
import type { HttpClient } from './api.types';
|
|
8
|
+
export declare function createFetchClient(fetchFn?: typeof globalThis.fetch): HttpClient;
|
|
9
|
+
//# sourceMappingURL=createFetchClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFetchClient.d.ts","sourceRoot":"","sources":["../../src/api/createFetchClient.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAmC,MAAM,aAAa,CAAC;AAE/E,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,GAAG,UAAU,CAoC/E"}
|
package/api/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @frontmcp/react/api — API client integration for FrontMCP.
|
|
3
|
+
*
|
|
4
|
+
* Register OpenAPI operations as MCP tools so agents can call APIs directly.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
export { useApiClient } from './useApiClient';
|
|
9
|
+
export { parseOpenApiSpec } from './parseOpenApiSpec';
|
|
10
|
+
export { createFetchClient } from './createFetchClient';
|
|
11
|
+
export type { ApiOperation, ApiClientOptions, HttpClient, HttpRequestConfig, HttpResponse } from './api.types';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|