universal-llm-client 4.0.0 → 4.2.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/ai-model.d.ts +20 -22
- package/dist/ai-model.d.ts.map +1 -1
- package/dist/ai-model.js +26 -23
- package/dist/ai-model.js.map +1 -1
- package/dist/client.d.ts +5 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +17 -9
- package/dist/client.js.map +1 -1
- package/dist/http.d.ts +2 -0
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +1 -0
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +49 -11
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js +14 -0
- package/dist/interfaces.js.map +1 -1
- package/dist/providers/anthropic.d.ts +56 -0
- package/dist/providers/anthropic.d.ts.map +1 -0
- package/dist/providers/anthropic.js +524 -0
- package/dist/providers/anthropic.js.map +1 -0
- package/dist/providers/google.d.ts +5 -0
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +64 -8
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +1 -0
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/ollama.d.ts.map +1 -1
- package/dist/providers/ollama.js +38 -11
- package/dist/providers/ollama.js.map +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +9 -7
- package/dist/providers/openai.js.map +1 -1
- package/dist/router.d.ts +13 -33
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +33 -57
- package/dist/router.js.map +1 -1
- package/dist/stream-decoder.d.ts +29 -2
- package/dist/stream-decoder.d.ts.map +1 -1
- package/dist/stream-decoder.js +39 -11
- package/dist/stream-decoder.js.map +1 -1
- package/dist/structured-output.d.ts +107 -181
- package/dist/structured-output.d.ts.map +1 -1
- package/dist/structured-output.js +137 -192
- package/dist/structured-output.js.map +1 -1
- package/dist/zod-adapter.d.ts +44 -0
- package/dist/zod-adapter.d.ts.map +1 -0
- package/dist/zod-adapter.js +61 -0
- package/dist/zod-adapter.js.map +1 -0
- package/package.json +9 -1
- package/src/ai-model.ts +350 -0
- package/src/auditor.ts +213 -0
- package/src/client.ts +402 -0
- package/src/debug/debug-google-streaming.ts +97 -0
- package/src/debug/debug-tool-execution.ts +86 -0
- package/src/debug/test-lmstudio-tools.ts +155 -0
- package/src/demos/README.md +47 -0
- package/src/demos/basic/universal-llm-examples.ts +161 -0
- package/src/demos/mcp/astrid-memory-demo.ts +295 -0
- package/src/demos/mcp/astrid-persona-memory.ts +357 -0
- package/src/demos/mcp/mcp-mongodb-demo.ts +275 -0
- package/src/demos/mcp/simple-astrid-memory.ts +148 -0
- package/src/demos/mcp/simple-mcp-demo.ts +68 -0
- package/src/demos/mcp/working-mcp-demo.ts +62 -0
- package/src/demos/model-alias-demo.ts +0 -0
- package/src/demos/tools/RAG_MEMORY_INTEGRATION.md +267 -0
- package/src/demos/tools/astrid-memory-demo.ts +270 -0
- package/src/demos/tools/astrid-production-memory-clean.ts +785 -0
- package/src/demos/tools/astrid-production-memory.ts +558 -0
- package/src/demos/tools/basic-translation-test.ts +66 -0
- package/src/demos/tools/chromadb-similarity-tuning.ts +390 -0
- package/src/demos/tools/clean-multilingual-conversation.ts +209 -0
- package/src/demos/tools/clean-translation-test.ts +119 -0
- package/src/demos/tools/clean-universal-multilingual-test.ts +131 -0
- package/src/demos/tools/complete-rag-demo.ts +369 -0
- package/src/demos/tools/complete-tool-demo.ts +132 -0
- package/src/demos/tools/demo-tool-calling.ts +124 -0
- package/src/demos/tools/dynamic-language-switching-test.ts +251 -0
- package/src/demos/tools/hybrid-thinking-test.ts +154 -0
- package/src/demos/tools/memory-integration-test.ts +420 -0
- package/src/demos/tools/multilingual-memory-system.ts +802 -0
- package/src/demos/tools/ondemand-translation-demo.ts +655 -0
- package/src/demos/tools/production-tool-demo.ts +245 -0
- package/src/demos/tools/revolutionary-multilingual-test.ts +151 -0
- package/src/demos/tools/rigorous-language-analysis.ts +218 -0
- package/src/demos/tools/test-universal-memory-system.ts +126 -0
- package/src/demos/tools/translation-integration-guide.ts +346 -0
- package/src/demos/tools/universal-memory-system.ts +560 -0
- package/src/http.ts +247 -0
- package/src/index.ts +161 -0
- package/src/interfaces.ts +657 -0
- package/src/mcp.ts +345 -0
- package/src/providers/anthropic.ts +762 -0
- package/src/providers/google.ts +620 -0
- package/src/providers/index.ts +8 -0
- package/src/providers/ollama.ts +469 -0
- package/src/providers/openai.ts +392 -0
- package/src/router.ts +780 -0
- package/src/stream-decoder.ts +361 -0
- package/src/structured-output.ts +759 -0
- package/src/test-scripts/test-advanced-tools.ts +310 -0
- package/src/test-scripts/test-google-streaming-enhanced.ts +147 -0
- package/src/test-scripts/test-google-streaming.ts +63 -0
- package/src/test-scripts/test-google-system-prompt-comprehensive.ts +189 -0
- package/src/test-scripts/test-mcp-config.ts +28 -0
- package/src/test-scripts/test-mcp-connection.ts +29 -0
- package/src/test-scripts/test-system-message-positions.ts +163 -0
- package/src/test-scripts/test-system-prompt-improvement-demo.ts +83 -0
- package/src/test-scripts/test-tool-calling.ts +231 -0
- package/src/tests/ai-model.test.ts +1614 -0
- package/src/tests/auditor.test.ts +224 -0
- package/src/tests/http.test.ts +200 -0
- package/src/tests/interfaces.test.ts +117 -0
- package/src/tests/providers/google.test.ts +660 -0
- package/src/tests/providers/ollama.test.ts +954 -0
- package/src/tests/providers/openai.test.ts +1122 -0
- package/src/tests/router.test.ts +254 -0
- package/src/tests/stream-decoder.test.ts +179 -0
- package/src/tests/structured-output.test.ts +1450 -0
- package/src/tests/tools.test.ts +175 -0
- package/src/tools.ts +246 -0
- package/src/zod-adapter.ts +72 -0
package/src/mcp.ts
ADDED
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal LLM Client v3 — MCP Integration
|
|
3
|
+
*
|
|
4
|
+
* Native MCP tool discovery and execution bridge.
|
|
5
|
+
* Uses @modelcontextprotocol/sdk as a peer dependency.
|
|
6
|
+
*
|
|
7
|
+
* Supports:
|
|
8
|
+
* - Stdio transport (Node/Bun/Deno — spawns server processes)
|
|
9
|
+
* - Streamable HTTP transport (all runtimes including browsers)
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* const mcp = new MCPToolBridge({
|
|
13
|
+
* servers: {
|
|
14
|
+
* filesystem: { command: 'npx', args: ['-y', '@modelcontextprotocol/server-filesystem', './'] },
|
|
15
|
+
* weather: { url: 'https://mcp.example.com/weather' },
|
|
16
|
+
* }
|
|
17
|
+
* });
|
|
18
|
+
* await mcp.connect();
|
|
19
|
+
* await mcp.registerTools(model); // or registerTools(model)
|
|
20
|
+
* // ... use model.chatWithTools() — MCP tools are now callable
|
|
21
|
+
* await mcp.disconnect();
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import type { AIModel } from './ai-model.js';
|
|
25
|
+
import type { LLMFunction, ToolHandler } from './interfaces.js';
|
|
26
|
+
import type { Auditor } from './auditor.js';
|
|
27
|
+
import { NoopAuditor } from './auditor.js';
|
|
28
|
+
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// MCP Types
|
|
31
|
+
// ============================================================================
|
|
32
|
+
|
|
33
|
+
export interface MCPServerConfig {
|
|
34
|
+
/** Stdio transport: command to spawn the MCP server */
|
|
35
|
+
command?: string;
|
|
36
|
+
/** Stdio transport: arguments for the command */
|
|
37
|
+
args?: string[];
|
|
38
|
+
/** Stdio transport: environment variables for the spawned process */
|
|
39
|
+
env?: Record<string, string>;
|
|
40
|
+
/** HTTP transport: URL of the remote MCP server */
|
|
41
|
+
url?: string;
|
|
42
|
+
/** HTTP transport: additional headers for requests */
|
|
43
|
+
headers?: Record<string, string>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface MCPBridgeConfig {
|
|
47
|
+
/** Named MCP server configurations */
|
|
48
|
+
servers: Record<string, MCPServerConfig>;
|
|
49
|
+
/** Auditor for observability */
|
|
50
|
+
auditor?: Auditor;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface MCPTool {
|
|
54
|
+
/** Server this tool came from */
|
|
55
|
+
serverName: string;
|
|
56
|
+
/** Tool name (as reported by the server) */
|
|
57
|
+
name: string;
|
|
58
|
+
/** Full qualified name (serverName:toolName) */
|
|
59
|
+
qualifiedName: string;
|
|
60
|
+
/** Tool description */
|
|
61
|
+
description: string;
|
|
62
|
+
/** JSON Schema for tool input */
|
|
63
|
+
inputSchema: Record<string, unknown>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ============================================================================
|
|
67
|
+
// Internal: SDK types (to avoid hard dependency)
|
|
68
|
+
// ============================================================================
|
|
69
|
+
|
|
70
|
+
interface MCPClientLike {
|
|
71
|
+
connect(transport: unknown): Promise<void>;
|
|
72
|
+
close(): Promise<void>;
|
|
73
|
+
listTools(): Promise<{ tools: Array<{ name: string; description?: string; inputSchema: Record<string, unknown> }> }>;
|
|
74
|
+
callTool(params: { name: string; arguments?: Record<string, unknown> }): Promise<{ content: Array<{ type: string; text?: string }> }>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ============================================================================
|
|
78
|
+
// MCPToolBridge
|
|
79
|
+
// ============================================================================
|
|
80
|
+
|
|
81
|
+
export class MCPToolBridge {
|
|
82
|
+
private config: MCPBridgeConfig;
|
|
83
|
+
private auditor: Auditor;
|
|
84
|
+
private clients: Map<string, MCPClientLike> = new Map();
|
|
85
|
+
private transports: Map<string, unknown> = new Map();
|
|
86
|
+
private discoveredTools: MCPTool[] = [];
|
|
87
|
+
private connected = false;
|
|
88
|
+
|
|
89
|
+
constructor(config: MCPBridgeConfig) {
|
|
90
|
+
this.config = config;
|
|
91
|
+
this.auditor = config.auditor ?? new NoopAuditor();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ========================================================================
|
|
95
|
+
// Connection Lifecycle
|
|
96
|
+
// ========================================================================
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Connect to all configured MCP servers and discover their tools.
|
|
100
|
+
* Requires @modelcontextprotocol/sdk to be installed.
|
|
101
|
+
*/
|
|
102
|
+
async connect(): Promise<void> {
|
|
103
|
+
if (this.connected) return;
|
|
104
|
+
|
|
105
|
+
// Dynamic import of MCP SDK (peer dependency)
|
|
106
|
+
let sdk: {
|
|
107
|
+
Client: new (info: { name: string; version: string }, opts?: { capabilities?: Record<string, unknown> }) => MCPClientLike;
|
|
108
|
+
StdioClientTransport?: new (opts: { command: string; args?: string[]; env?: Record<string, string> }) => unknown;
|
|
109
|
+
StreamableHTTPClientTransport?: new (url: URL, opts?: { requestInit?: { headers: Record<string, string> } }) => unknown;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
try {
|
|
113
|
+
// @ts-ignore — peer dependency, may not be installed
|
|
114
|
+
sdk = await import('@modelcontextprotocol/sdk/client/index.js');
|
|
115
|
+
} catch {
|
|
116
|
+
throw new Error(
|
|
117
|
+
'MCP integration requires @modelcontextprotocol/sdk.\n' +
|
|
118
|
+
'Install it: bun add @modelcontextprotocol/sdk'
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const entries = Object.entries(this.config.servers);
|
|
123
|
+
|
|
124
|
+
for (const [serverName, serverConfig] of entries) {
|
|
125
|
+
try {
|
|
126
|
+
const client = new sdk.Client(
|
|
127
|
+
{ name: 'universal-llm-client', version: '3.0.0' },
|
|
128
|
+
{ capabilities: {} },
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
let transport: unknown;
|
|
132
|
+
|
|
133
|
+
if (serverConfig.url) {
|
|
134
|
+
// HTTP transport (all runtimes)
|
|
135
|
+
if (!sdk.StreamableHTTPClientTransport) {
|
|
136
|
+
// Try separate import path
|
|
137
|
+
// @ts-ignore — peer dependency, may not be installed
|
|
138
|
+
const httpModule = await import('@modelcontextprotocol/sdk/client/streamableHttp.js').catch(() => null);
|
|
139
|
+
if (!httpModule?.StreamableHTTPClientTransport) {
|
|
140
|
+
throw new Error('StreamableHTTPClientTransport not available in this SDK version');
|
|
141
|
+
}
|
|
142
|
+
transport = new httpModule.StreamableHTTPClientTransport(
|
|
143
|
+
new URL(serverConfig.url),
|
|
144
|
+
serverConfig.headers ? { requestInit: { headers: serverConfig.headers } } : undefined,
|
|
145
|
+
);
|
|
146
|
+
} else {
|
|
147
|
+
transport = new sdk.StreamableHTTPClientTransport(
|
|
148
|
+
new URL(serverConfig.url),
|
|
149
|
+
serverConfig.headers ? { requestInit: { headers: serverConfig.headers } } : undefined,
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
} else if (serverConfig.command) {
|
|
153
|
+
// Stdio transport (Node/Bun/Deno only)
|
|
154
|
+
if (!sdk.StdioClientTransport) {
|
|
155
|
+
// @ts-ignore — peer dependency, may not be installed
|
|
156
|
+
const stdioModule = await import('@modelcontextprotocol/sdk/client/stdio.js').catch(() => null);
|
|
157
|
+
if (!stdioModule?.StdioClientTransport) {
|
|
158
|
+
throw new Error(
|
|
159
|
+
'Stdio transport not available. This is expected in browser environments.\n' +
|
|
160
|
+
'Use HTTP transport (url) instead, or run in Node/Bun/Deno.'
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
transport = new stdioModule.StdioClientTransport({
|
|
164
|
+
command: serverConfig.command,
|
|
165
|
+
args: serverConfig.args,
|
|
166
|
+
env: serverConfig.env,
|
|
167
|
+
});
|
|
168
|
+
} else {
|
|
169
|
+
transport = new sdk.StdioClientTransport({
|
|
170
|
+
command: serverConfig.command,
|
|
171
|
+
args: serverConfig.args,
|
|
172
|
+
env: serverConfig.env,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
throw new Error(`MCP server "${serverName}" must have either "url" or "command" configured`);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
await client.connect(transport);
|
|
180
|
+
this.clients.set(serverName, client);
|
|
181
|
+
this.transports.set(serverName, transport);
|
|
182
|
+
|
|
183
|
+
// Discover tools
|
|
184
|
+
const toolList = await client.listTools();
|
|
185
|
+
for (const tool of toolList.tools) {
|
|
186
|
+
this.discoveredTools.push({
|
|
187
|
+
serverName,
|
|
188
|
+
name: tool.name,
|
|
189
|
+
qualifiedName: `${serverName}:${tool.name}`,
|
|
190
|
+
description: tool.description ?? '',
|
|
191
|
+
inputSchema: tool.inputSchema,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
this.auditor.record({
|
|
196
|
+
timestamp: Date.now(),
|
|
197
|
+
type: 'response',
|
|
198
|
+
metadata: {
|
|
199
|
+
event: 'mcp_connected',
|
|
200
|
+
server: serverName,
|
|
201
|
+
toolCount: toolList.tools.length,
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
} catch (error) {
|
|
205
|
+
this.auditor.record({
|
|
206
|
+
timestamp: Date.now(),
|
|
207
|
+
type: 'error',
|
|
208
|
+
error: error instanceof Error ? error.message : String(error),
|
|
209
|
+
metadata: { event: 'mcp_connect_failed', server: serverName },
|
|
210
|
+
});
|
|
211
|
+
throw error;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
this.connected = true;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// ========================================================================
|
|
219
|
+
// Tool Registration
|
|
220
|
+
// ========================================================================
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Register all discovered MCP tools with an AIModel instance.
|
|
224
|
+
* Each MCP tool becomes a callable tool that forwards execution
|
|
225
|
+
* to the appropriate MCP server.
|
|
226
|
+
*/
|
|
227
|
+
async registerTools(model: AIModel): Promise<void> {
|
|
228
|
+
if (!this.connected) {
|
|
229
|
+
await this.connect();
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const tools = this.discoveredTools.map(mcpTool => ({
|
|
233
|
+
name: mcpTool.qualifiedName,
|
|
234
|
+
description: mcpTool.description,
|
|
235
|
+
parameters: this.convertInputSchema(mcpTool.inputSchema),
|
|
236
|
+
handler: this.createToolHandler(mcpTool),
|
|
237
|
+
}));
|
|
238
|
+
|
|
239
|
+
model.registerTools(tools);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Get all discovered MCP tools (for inspection).
|
|
244
|
+
*/
|
|
245
|
+
getTools(): ReadonlyArray<MCPTool> {
|
|
246
|
+
return this.discoveredTools;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// ========================================================================
|
|
250
|
+
// Disconnect
|
|
251
|
+
// ========================================================================
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Disconnect from all MCP servers and clean up.
|
|
255
|
+
*/
|
|
256
|
+
async disconnect(): Promise<void> {
|
|
257
|
+
for (const [serverName, client] of this.clients) {
|
|
258
|
+
try {
|
|
259
|
+
await client.close();
|
|
260
|
+
} catch (error) {
|
|
261
|
+
this.auditor.record({
|
|
262
|
+
timestamp: Date.now(),
|
|
263
|
+
type: 'error',
|
|
264
|
+
error: error instanceof Error ? error.message : String(error),
|
|
265
|
+
metadata: { event: 'mcp_disconnect_failed', server: serverName },
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
this.clients.clear();
|
|
270
|
+
this.transports.clear();
|
|
271
|
+
this.discoveredTools = [];
|
|
272
|
+
this.connected = false;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// ========================================================================
|
|
276
|
+
// Internal
|
|
277
|
+
// ========================================================================
|
|
278
|
+
|
|
279
|
+
private createToolHandler(mcpTool: MCPTool): ToolHandler {
|
|
280
|
+
return async (args: unknown) => {
|
|
281
|
+
const client = this.clients.get(mcpTool.serverName);
|
|
282
|
+
if (!client) {
|
|
283
|
+
throw new Error(`MCP server "${mcpTool.serverName}" is not connected`);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const start = Date.now();
|
|
287
|
+
this.auditor.record({
|
|
288
|
+
timestamp: start,
|
|
289
|
+
type: 'tool_call',
|
|
290
|
+
metadata: {
|
|
291
|
+
event: 'mcp_tool_call',
|
|
292
|
+
server: mcpTool.serverName,
|
|
293
|
+
tool: mcpTool.name,
|
|
294
|
+
},
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
try {
|
|
298
|
+
const result = await client.callTool({
|
|
299
|
+
name: mcpTool.name,
|
|
300
|
+
arguments: args as Record<string, unknown> | undefined,
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
// Extract text content from MCP response
|
|
304
|
+
const textParts = result.content
|
|
305
|
+
.filter(c => c.type === 'text' && c.text)
|
|
306
|
+
.map(c => c.text);
|
|
307
|
+
|
|
308
|
+
const output = textParts.length === 1 ? textParts[0] : textParts.join('\n');
|
|
309
|
+
|
|
310
|
+
this.auditor.record({
|
|
311
|
+
timestamp: Date.now(),
|
|
312
|
+
type: 'tool_result',
|
|
313
|
+
metadata: {
|
|
314
|
+
event: 'mcp_tool_result',
|
|
315
|
+
server: mcpTool.serverName,
|
|
316
|
+
tool: mcpTool.name,
|
|
317
|
+
duration: Date.now() - start,
|
|
318
|
+
},
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
return output;
|
|
322
|
+
} catch (error) {
|
|
323
|
+
this.auditor.record({
|
|
324
|
+
timestamp: Date.now(),
|
|
325
|
+
type: 'error',
|
|
326
|
+
error: error instanceof Error ? error.message : String(error),
|
|
327
|
+
metadata: {
|
|
328
|
+
event: 'mcp_tool_error',
|
|
329
|
+
server: mcpTool.serverName,
|
|
330
|
+
tool: mcpTool.name,
|
|
331
|
+
},
|
|
332
|
+
});
|
|
333
|
+
throw error;
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
private convertInputSchema(schema: Record<string, unknown>): LLMFunction['parameters'] {
|
|
339
|
+
return {
|
|
340
|
+
type: 'object',
|
|
341
|
+
properties: (schema['properties'] as Record<string, unknown>) ?? {},
|
|
342
|
+
required: schema['required'] as string[] | undefined,
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
}
|