@nexus-cortex/core 4.34.3 → 4.34.5
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/mcp/McpClient.d.ts +7 -0
- package/dist/mcp/McpClient.d.ts.map +1 -1
- package/dist/mcp/McpClient.js +142 -91
- package/dist/mcp/McpClient.js.map +1 -1
- package/package.json +3 -3
package/dist/mcp/McpClient.d.ts
CHANGED
|
@@ -67,6 +67,13 @@ export declare class McpClient {
|
|
|
67
67
|
* Connect to the MCP server
|
|
68
68
|
*/
|
|
69
69
|
connect(): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Build the transport (http or stdio) and complete the MCP handshake.
|
|
72
|
+
* `useDispatcher` gates the optional undici keep-alive dispatcher (http only).
|
|
73
|
+
*/
|
|
74
|
+
private openTransportAndConnect;
|
|
75
|
+
/** Best-effort teardown of a half-open client/transport before a connect retry. */
|
|
76
|
+
private safeCloseAfterFailedConnect;
|
|
70
77
|
/**
|
|
71
78
|
* Disconnect from the MCP server
|
|
72
79
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpClient.d.ts","sourceRoot":"","sources":["../../src/mcp/McpClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"McpClient.d.ts","sourceRoot":"","sources":["../../src/mcp/McpClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAkBjF,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,sBAAsB;IACrC,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,wBAAwB,EAAE,MAAM,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Ae;IAG7C;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA4C9B;;;OAGG;YACW,uBAAuB;IAkGrC,mFAAmF;YACrE,2BAA2B;IAUzC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAqBjC;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IActC;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAoB9C;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAoB1C;;OAEG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAoB7E;;OAEG;IACG,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAe7C;;OAEG;IACH,kBAAkB,IAAI,IAAI,EAAE;IAI5B;;OAEG;IACH,sBAAsB,IAAI,QAAQ,EAAE;IAIpC;;OAEG;IACH,oBAAoB,IAAI,MAAM,EAAE;IAIhC;;OAEG;IACH,SAAS,IAAI,mBAAmB;IAIhC;;OAEG;IACH,WAAW,IAAI,OAAO;IAUtB;;;;OAIG;IACH,sBAAsB,IAAI,sBAAsB,GAAG,SAAS;IAO5D,OAAO,CAAC,8BAA8B;IAItC;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;IAOhC;;;;;;OAMG;YACW,6BAA6B;IAc3C;;OAEG;IACH,OAAO,CAAC,eAAe;CAOxB"}
|
package/dist/mcp/McpClient.js
CHANGED
|
@@ -9,6 +9,22 @@ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
|
9
9
|
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
10
10
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
11
11
|
import { logger } from '../utils/logger.js';
|
|
12
|
+
/**
|
|
13
|
+
* Format an error with its underlying cause. Node's fetch throws a bare
|
|
14
|
+
* "fetch failed" whose real reason (ECONNRESET, a TLS/cert error, ENOTFOUND,
|
|
15
|
+
* HTTP/2 issues, an HTTP status, etc.) lives in `error.cause` — surface it so
|
|
16
|
+
* MCP connection failures are diagnosable instead of an opaque "fetch failed".
|
|
17
|
+
*/
|
|
18
|
+
function describeError(error) {
|
|
19
|
+
if (!(error instanceof Error))
|
|
20
|
+
return String(error);
|
|
21
|
+
const cause = error.cause;
|
|
22
|
+
if (!cause)
|
|
23
|
+
return error.message;
|
|
24
|
+
const causeMsg = cause instanceof Error ? cause.message : String(cause);
|
|
25
|
+
const code = cause?.code ? ` [${cause.code}]` : '';
|
|
26
|
+
return `${error.message} (cause: ${causeMsg}${code})`;
|
|
27
|
+
}
|
|
12
28
|
/**
|
|
13
29
|
* Defaults for HTTP-MCP reconnection. The SDK's own defaults (maxRetries: 2)
|
|
14
30
|
* are far too low for long-running cortex sessions where the SSE channel may
|
|
@@ -55,99 +71,134 @@ export class McpClient {
|
|
|
55
71
|
throw new Error(`Cannot connect when status is ${this.status}. Current status must be DISCONNECTED.`);
|
|
56
72
|
}
|
|
57
73
|
this.status = McpConnectionStatus.CONNECTING;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
const transportType = this.config.transport ?? (this.config.url ? 'http' : 'stdio');
|
|
75
|
+
// For http: try WITH the undici keep-alive dispatcher, then retry WITHOUT it.
|
|
76
|
+
// A cross-version undici Agent — e.g. the standalone undici-5 package's Agent on
|
|
77
|
+
// Node 23's built-in undici-7 — makes the very first fetch throw a bare
|
|
78
|
+
// "fetch failed", which broke MCP http connections entirely on newer Node. The
|
|
79
|
+
// dispatcher is only a cosmetic SSE idle keep-alive, so a dispatcher-less
|
|
80
|
+
// connection is fully functional (the SDK reconnects genuine idle drops).
|
|
81
|
+
const attempts = transportType === 'http' ? [true, false] : [false];
|
|
82
|
+
let lastError;
|
|
83
|
+
for (let i = 0; i < attempts.length; i++) {
|
|
84
|
+
try {
|
|
85
|
+
await this.openTransportAndConnect(transportType, attempts[i] === true);
|
|
86
|
+
this.status = McpConnectionStatus.CONNECTED;
|
|
87
|
+
if (i > 0) {
|
|
88
|
+
logger.debug(`[MCP ${this.config.name}] connected without the undici keep-alive dispatcher ` +
|
|
89
|
+
`(it is incompatible with this Node's built-in undici)`);
|
|
69
90
|
}
|
|
70
|
-
|
|
71
|
-
// SSE stream. Without this, an idle server->client stream (no messages
|
|
72
|
-
// between tool calls) is terminated after undici's default (~300s),
|
|
73
|
-
// surfacing as "SSE stream disconnected: TypeError: terminated" and a
|
|
74
|
-
// needless reconnect every few minutes. The SDK's reconnection still
|
|
75
|
-
// covers genuine drops; this just stops the idle-timeout churn.
|
|
76
|
-
const dispatcher = await this.createNoIdleTimeoutDispatcher();
|
|
77
|
-
const requestInit = {
|
|
78
|
-
...(this.config.headers ? { headers: this.config.headers } : {}),
|
|
79
|
-
...(dispatcher ? { dispatcher } : {}),
|
|
80
|
-
};
|
|
81
|
-
this.transport = new StreamableHTTPClientTransport(new URL(this.config.url), {
|
|
82
|
-
...(Object.keys(requestInit).length > 0
|
|
83
|
-
? { requestInit: requestInit }
|
|
84
|
-
: {}),
|
|
85
|
-
reconnectionOptions: this.getResolvedReconnectionOptions(),
|
|
86
|
-
});
|
|
91
|
+
return;
|
|
87
92
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
this.transport = new StdioClientTransport({
|
|
93
|
-
command: this.config.command,
|
|
94
|
-
args: this.config.args || [],
|
|
95
|
-
env: {
|
|
96
|
-
...process.env,
|
|
97
|
-
...(this.config.env || {}),
|
|
98
|
-
},
|
|
99
|
-
cwd: this.config.cwd,
|
|
100
|
-
stderr: 'pipe',
|
|
101
|
-
});
|
|
102
|
-
// Log stderr if debug mode (stdio only)
|
|
103
|
-
if (this.debugMode && 'stderr' in this.transport) {
|
|
104
|
-
const stderr = this.transport.stderr;
|
|
105
|
-
if (stderr) {
|
|
106
|
-
stderr.on('data', (data) => {
|
|
107
|
-
console.error(`[MCP STDERR (${this.config.name})]:`, data.toString().trim());
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
lastError = error;
|
|
95
|
+
await this.safeCloseAfterFailedConnect();
|
|
111
96
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
// Setup close handler
|
|
138
|
-
this.client.onclose = () => {
|
|
139
|
-
this.status = McpConnectionStatus.DISCONNECTED;
|
|
97
|
+
}
|
|
98
|
+
this.status = McpConnectionStatus.ERROR;
|
|
99
|
+
throw new Error(`Failed to connect to MCP server '${this.config.name}': ${describeError(lastError)}`);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Build the transport (http or stdio) and complete the MCP handshake.
|
|
103
|
+
* `useDispatcher` gates the optional undici keep-alive dispatcher (http only).
|
|
104
|
+
*/
|
|
105
|
+
async openTransportAndConnect(transportType, useDispatcher) {
|
|
106
|
+
this.client = new Client({
|
|
107
|
+
name: 'nexus-cortex-mcp-client',
|
|
108
|
+
version: '1.0.0',
|
|
109
|
+
});
|
|
110
|
+
if (transportType === 'http') {
|
|
111
|
+
if (!this.config.url) {
|
|
112
|
+
throw new Error('http transport requires a url to be specified');
|
|
113
|
+
}
|
|
114
|
+
// Disable undici's response body-inactivity timeout for the long-lived SSE
|
|
115
|
+
// stream (prevents a needless reconnect every few minutes on idle). Skipped
|
|
116
|
+
// on the retry attempt to dodge cross-Node-version undici dispatcher breakage.
|
|
117
|
+
const dispatcher = useDispatcher ? await this.createNoIdleTimeoutDispatcher() : undefined;
|
|
118
|
+
const requestInit = {
|
|
119
|
+
...(this.config.headers ? { headers: this.config.headers } : {}),
|
|
120
|
+
...(dispatcher ? { dispatcher } : {}),
|
|
140
121
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
122
|
+
this.transport = new StreamableHTTPClientTransport(new URL(this.config.url), {
|
|
123
|
+
...(Object.keys(requestInit).length > 0
|
|
124
|
+
? { requestInit: requestInit }
|
|
125
|
+
: {}),
|
|
126
|
+
reconnectionOptions: this.getResolvedReconnectionOptions(),
|
|
144
127
|
});
|
|
145
|
-
this.status = McpConnectionStatus.CONNECTED;
|
|
146
128
|
}
|
|
147
|
-
|
|
148
|
-
this.
|
|
149
|
-
|
|
129
|
+
else {
|
|
130
|
+
if (!this.config.command) {
|
|
131
|
+
throw new Error('stdio transport requires a command to be specified');
|
|
132
|
+
}
|
|
133
|
+
this.transport = new StdioClientTransport({
|
|
134
|
+
command: this.config.command,
|
|
135
|
+
args: this.config.args || [],
|
|
136
|
+
env: {
|
|
137
|
+
...process.env,
|
|
138
|
+
...(this.config.env || {}),
|
|
139
|
+
},
|
|
140
|
+
cwd: this.config.cwd,
|
|
141
|
+
stderr: 'pipe',
|
|
142
|
+
});
|
|
143
|
+
// Log stderr if debug mode (stdio only)
|
|
144
|
+
if (this.debugMode && 'stderr' in this.transport) {
|
|
145
|
+
const stderr = this.transport.stderr;
|
|
146
|
+
if (stderr) {
|
|
147
|
+
stderr.on('data', (data) => {
|
|
148
|
+
console.error(`[MCP STDERR (${this.config.name})]:`, data.toString().trim());
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// Setup error handler. HTTP/SSE transports drop the long-lived stream
|
|
154
|
+
// periodically (idle timeouts, key rotation, network blips); the SDK
|
|
155
|
+
// auto-reconnects per reconnectionOptions. Treat those as recoverable —
|
|
156
|
+
// a gated debug note, NOT a console.error stack that corrupts the TUI,
|
|
157
|
+
// and NOT a permanent ERROR state (which would make isConnected() throw
|
|
158
|
+
// mid-reconnect). Only a terminal "max retries exceeded" or a genuine
|
|
159
|
+
// protocol error flips the client to ERROR.
|
|
160
|
+
this.client.onerror = (error) => {
|
|
161
|
+
const msg = describeError(error);
|
|
162
|
+
// Errors fired while we are intentionally tearing the connection down
|
|
163
|
+
// (the SSE stream aborts on close) are expected noise — ignore them.
|
|
164
|
+
if (this.status === McpConnectionStatus.DISCONNECTING ||
|
|
165
|
+
this.status === McpConnectionStatus.DISCONNECTED) {
|
|
166
|
+
logger.debug(`[MCP ${this.config.name}] error during teardown (ignored): ${msg}`);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (this.isRecoverableStreamError(msg)) {
|
|
170
|
+
this.status = McpConnectionStatus.RECONNECTING;
|
|
171
|
+
logger.debug(`[MCP ${this.config.name}] stream drop; auto-reconnecting: ${msg}`);
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
this.status = McpConnectionStatus.ERROR;
|
|
175
|
+
logger.warn(`[MCP ${this.config.name}] ${msg}`);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
// Setup close handler
|
|
179
|
+
this.client.onclose = () => {
|
|
180
|
+
this.status = McpConnectionStatus.DISCONNECTED;
|
|
181
|
+
};
|
|
182
|
+
// Connect to server
|
|
183
|
+
await this.client.connect(this.transport, {
|
|
184
|
+
timeout: this.config.timeout ?? 10000, // 10 second default
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
/** Best-effort teardown of a half-open client/transport before a connect retry. */
|
|
188
|
+
async safeCloseAfterFailedConnect() {
|
|
189
|
+
// Mark DISCONNECTING so the stale client's error/close handlers ignore the noise.
|
|
190
|
+
this.status = McpConnectionStatus.DISCONNECTING;
|
|
191
|
+
try {
|
|
192
|
+
await this.transport?.close?.();
|
|
193
|
+
}
|
|
194
|
+
catch { /* ignore */ }
|
|
195
|
+
try {
|
|
196
|
+
await this.client?.close?.();
|
|
150
197
|
}
|
|
198
|
+
catch { /* ignore */ }
|
|
199
|
+
this.transport = undefined;
|
|
200
|
+
this.client = undefined;
|
|
201
|
+
this.status = McpConnectionStatus.CONNECTING;
|
|
151
202
|
}
|
|
152
203
|
/**
|
|
153
204
|
* Disconnect from the MCP server
|
|
@@ -182,7 +233,7 @@ export class McpClient {
|
|
|
182
233
|
return this.discoveredTools;
|
|
183
234
|
}
|
|
184
235
|
catch (error) {
|
|
185
|
-
throw new Error(`Failed to discover tools from MCP server '${this.config.name}': ${
|
|
236
|
+
throw new Error(`Failed to discover tools from MCP server '${this.config.name}': ${describeError(error)}`);
|
|
186
237
|
}
|
|
187
238
|
}
|
|
188
239
|
/**
|
|
@@ -203,7 +254,7 @@ export class McpClient {
|
|
|
203
254
|
this.discoveredResources = [];
|
|
204
255
|
return this.discoveredResources;
|
|
205
256
|
}
|
|
206
|
-
throw new Error(`Failed to discover resources from MCP server '${this.config.name}': ${
|
|
257
|
+
throw new Error(`Failed to discover resources from MCP server '${this.config.name}': ${describeError(error)}`);
|
|
207
258
|
}
|
|
208
259
|
}
|
|
209
260
|
/**
|
|
@@ -224,7 +275,7 @@ export class McpClient {
|
|
|
224
275
|
this.discoveredPrompts = [];
|
|
225
276
|
return this.discoveredPrompts;
|
|
226
277
|
}
|
|
227
|
-
throw new Error(`Failed to discover prompts from MCP server '${this.config.name}': ${
|
|
278
|
+
throw new Error(`Failed to discover prompts from MCP server '${this.config.name}': ${describeError(error)}`);
|
|
228
279
|
}
|
|
229
280
|
}
|
|
230
281
|
/**
|
|
@@ -244,7 +295,7 @@ export class McpClient {
|
|
|
244
295
|
return result;
|
|
245
296
|
}
|
|
246
297
|
catch (error) {
|
|
247
|
-
throw new Error(`Failed to call tool '${toolName}' on MCP server '${this.config.name}': ${
|
|
298
|
+
throw new Error(`Failed to call tool '${toolName}' on MCP server '${this.config.name}': ${describeError(error)}`);
|
|
248
299
|
}
|
|
249
300
|
}
|
|
250
301
|
/**
|
|
@@ -259,7 +310,7 @@ export class McpClient {
|
|
|
259
310
|
return result;
|
|
260
311
|
}
|
|
261
312
|
catch (error) {
|
|
262
|
-
throw new Error(`Failed to read resource '${uri}' from MCP server '${this.config.name}': ${
|
|
313
|
+
throw new Error(`Failed to read resource '${uri}' from MCP server '${this.config.name}': ${describeError(error)}`);
|
|
263
314
|
}
|
|
264
315
|
}
|
|
265
316
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpClient.js","sourceRoot":"","sources":["../../src/mcp/McpClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAGnG,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAe5C;;;;;GAKG;AACH,MAAM,iCAAiC,GAA2B;IAChE,UAAU,EAAE,EAAE;IACd,wBAAwB,EAAE,KAAK;IAC/B,oBAAoB,EAAE,MAAM;IAC5B,2BAA2B,EAAE,GAAG;CACjC,CAAC;AAoCF,MAAM,CAAN,IAAY,mBAQX;AARD,WAAY,mBAAmB;IAC7B,oDAA6B,CAAA;IAC7B,gDAAyB,CAAA;IACzB,8CAAuB,CAAA;IACvB,gFAAgF;IAChF,oDAA6B,CAAA;IAC7B,sDAA+B,CAAA;IAC/B,sCAAe,CAAA;AACjB,CAAC,EARW,mBAAmB,KAAnB,mBAAmB,QAQ9B;AAED;;GAEG;AACH,MAAM,OAAO,SAAS;IASD;IACA;IATX,MAAM,CAAqB;IAC3B,SAAS,CAA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E,CAAC,EAAE,CAAC,CAAC;QAC9C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,KAAK,CACV,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,4DACtB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CACjD,EAAE,CACH,CAAC;YACF,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED;;OAEG;IACK,eAAe;QACrB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CACb,mBAAmB,IAAI,CAAC,MAAM,CAAC,IAAI,uCAAuC,IAAI,CAAC,MAAM,EAAE,CACxF,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cortex/core",
|
|
3
|
-
"version": "4.34.
|
|
3
|
+
"version": "4.34.5",
|
|
4
4
|
"description": "Core orchestration library implementing Claude CLI architecture patterns",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@google/genai": "^1.27.0",
|
|
47
47
|
"@google/generative-ai": "^0.2.1",
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.20.2",
|
|
49
|
-
"@nexus-cortex/executors": "^4.34.
|
|
50
|
-
"@nexus-cortex/types": "^4.34.
|
|
49
|
+
"@nexus-cortex/executors": "^4.34.5",
|
|
50
|
+
"@nexus-cortex/types": "^4.34.5",
|
|
51
51
|
"@types/uuid": "^10.0.0",
|
|
52
52
|
"chokidar": "^3.6.0",
|
|
53
53
|
"openai": "^4.104.0",
|