Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
✨feat: OAuth for Actions (#5693)
Ruben Talstrad99a9db3f6ff
diff --git a/api/cache/getLogStores.js b/api/cache/getLogStores.jsindex b7ff50150e..6592371f02 100644--- a/api/cache/getLogStores.js+++ b/api/cache/getLogStores.js@@ -37,6 +37,10 @@ const messages = isRedisEnabled? new Keyv({ store: keyvRedis, ttl: Time.ONE_MINUTE }): new Keyv({ namespace: CacheKeys.MESSAGES, ttl: Time.ONE_MINUTE });+const flows = isRedisEnabled+ ? new Keyv({ store: keyvRedis, ttl: Time.TWO_MINUTES })+ : new Keyv({ namespace: CacheKeys.FLOWS, ttl: Time.ONE_MINUTE * 3 });+const tokenConfig = isRedisEnabled? new Keyv({ store: keyvRedis, ttl: Time.THIRTY_MINUTES }): new Keyv({ namespace: CacheKeys.TOKEN_CONFIG, ttl: Time.THIRTY_MINUTES });@@ -88,6 +92,7 @@ const namespaces = {[CacheKeys.MODEL_QUERIES]: modelQueries,[CacheKeys.AUDIO_RUNS]: audioRuns,[CacheKeys.MESSAGES]: messages,+ [CacheKeys.FLOWS]: flows,};/**diff --git a/api/cache/keyvRedis.js b/api/cache/keyvRedis.jsindex 9501045e4e..d544b50a11 100644--- a/api/cache/keyvRedis.js+++ b/api/cache/keyvRedis.js@@ -1,6 +1,6 @@const KeyvRedis = require('@keyv/redis');-const { logger } = require('~/config');const { isEnabled } = require('~/server/utils');+const logger = require('~/config/winston');const { REDIS_URI, USE_REDIS } = process.env;diff --git a/api/config/index.js b/api/config/index.jsindex c2b21cfc07..aaf8bb2764 100644--- a/api/config/index.js+++ b/api/config/index.js@@ -1,9 +1,11 @@const { EventSource } = require('eventsource');+const { Time, CacheKeys } = require('librechat-data-provider');const logger = require('./winston');global.EventSource = EventSource;let mcpManager = null;+let flowManager = null;/*** @returns {Promise<MCPManager>}@@ -16,6 +18,21 @@ async function getMCPManager() {return mcpManager;}+/**+ * @param {(key: string) => Keyv} getLogStores+ * @returns {Promise<FlowStateManager>}+ */+async function getFlowStateManager(getLogStores) {+ if (!flowManager) {+ const { FlowStateManager } = await import('librechat-mcp');+ flowManager = new FlowStateManager(getLogStores(CacheKeys.FLOWS), {+ ttl: Time.ONE_MINUTE * 3,+ logger,+ });+ }+ return flowManager;+}+/*** Sends message data in Server Sent Events format.* @param {ServerResponse} res - The server response.@@ -34,4 +51,5 @@ module.exports = {logger,sendEvent,getMCPManager,+ getFlowStateManager,};diff --git a/api/models/Token.js b/api/models/Token.jsindex cdd156b6b4..210666ddd7 100644--- a/api/models/Token.js+++ b/api/models/Token.js@@ -1,5 +1,6 @@-const tokenSchema = require('./schema/tokenSchema');const mongoose = require('mongoose');+const { encryptV2 } = require('~/server/utils/crypto');+const tokenSchema = require('./schema/tokenSchema');const { logger } = require('~/config');/**@@ -7,6 +8,32 @@ const { logger } = require('~/config');* @type {mongoose.Model}*/const Token = mongoose.model('Token', tokenSchema);+/**+ * Fixes the indexes for the Token collection from legacy TTL indexes to the new expiresAt index.+ */+async function fixIndexes() {+ try {+ const indexes = await Token.collection.indexes();+ logger.debug('Existing Token Indexes:', JSON.stringify(indexes, null, 2));+ const unwantedTTLIndexes = indexes.filter(+ (index) => index.key.createdAt === 1 && index.expireAfterSeconds !== undefined,+ );+ if (unwantedTTLIndexes.length === 0) {+ logger.debug('No unwanted Token indexes found.');+ return;+ }+ for (const index of unwantedTTLIndexes) {+ logger.debug(`Dropping unwanted Token index: ${index.name}`);+ await Token.collection.dropIndex(index.name);+ logger.debug(`Dropped Token index: ${index.name}`);+ }+ logger.debug('Token index cleanup completed successfully.');+ } catch (error) {+ logger.error('An error occurred while fixing Token indexes:', error);+ }+}++fixIndexes();/*** Creates a new Token instance.@@ -29,8 +56,7 @@ async function createToken(tokenData) {expiresAt,};- const newToken = new Token(newTokenData);- return await newToken.save();+ return await Token.create(newTokenData);} catch (error) {logger.debug('An error occurred while creating token:', error);throw error;@@ -42,7 +68,8 @@ async function createToken(tokenData) {* @param {Object} query - The query to match against.* @param {mongoose.Types.ObjectId|String} query.userId - The ID of the user.* @param {String} query.token - The token value.- * @param {String} query.email - The email of the user.+ * @param {String} [query.email] - The email of the user.+ * @param {String} [query.identifier] - Unique, alternative identifier for the token.* @returns {Promise<Object|null>} The matched Token document, or null if not found.* @throws Will throw an error if the find operation fails.*/@@ -59,6 +86,9 @@ async function findToken(query) {if (query.email) {conditions.push({ email: query.email });}+ if (query.identifier) {+ conditions.push({ identifier: query.identifier });+ }const token = await Token.findOne({$and: conditions,@@ -76,6 +106,8 @@ async function findToken(query) {* @param {Object} query - The query to match against.* @param {mongoose.Types.ObjectId|String} query.userId - The ID of the user.* @param {String} query.token - The token value.+ * @param {String} [query.email] - The email of the user.+ * @param {String} [query.identifier] - Unique, alternative identifier for the token.* @param {Object} updateData - The data to update the Token with.* @returns {Promise<mongoose.Document|null>} The updated Token document, or null if not found.* @throws Will throw an error if the update operation fails.@@ -94,14 +126,20 @@ async function updateToken(query, updateData) {* @param {Object} query - The query to match against.* @param {mongoose.Types.ObjectId|String} query.userId - The ID of the user.* @param {String} query.token - The token value.- * @param {String} query.email - The email of the user.+ * @param {String} [query.email] - The email of the user.+ * @param {String} [query.identifier] - Unique, alternative identifier for the token.* @returns {Promise<Object>} The result of the delete operation.* @throws Will throw an error if the delete operation fails.*/async function deleteTokens(query) {try {return await Token.deleteMany({- $or: [{ userId: query.userId }, { token: query.token }, { email: query.email }],+ $or: [+ { userId: query.userId },+ { token: query.token },+ { email: query.email },+ { identifier: query.identifier },+ ],});} catch (error) {logger.debug('An error occurred while deleting tokens:', error);@@ -109,9 +147,46 @@ async function deleteTokens(query) {}}+/**+ * Handles the OAuth token by creating or updating the token.+ * @param {object} fields+ * @param {string} fields.userId - The user's ID.+ * @param {string} fields.token - The full token to store.+ * @param {string} fields.identifier - Unique, alternative identifier for the token.+ * @param {number} fields.expiresIn - The number of seconds until the token expires.+ * @param {object} fields.metadata - Additional metadata to store with the token.+ * @param {string} [fields.type="oauth"] - The type of token. Default is 'oauth'.+ */+async function handleOAuthToken({+ token,+ userId,+ identifier,+ expiresIn,+ metadata,+ type = 'oauth',+}) {+ const encrypedToken = await encryptV2(token);+ const tokenData = {+ type,+ userId,+ metadata,+ identifier,+ token: encrypedToken,+ expiresIn: parseInt(expiresIn, 10) || 3600,+ };++ const existingToken = await findToken({ userId, identifier });+ if (existingToken) {+ return await updateToken({ identifier }, tokenData);+ } else {+ return await createToken(tokenData);+ }+}+module.exports = {- createToken,findToken,+ createToken,updateToken,deleteTokens,+ handleOAuthToken,};diff --git a/api/models/schema/tokenSchema.js b/api/models/schema/tokenSchema.jsindex bb223ff450..1b45b2ff33 100644--- a/api/models/schema/tokenSchema.js+++ b/api/models/schema/tokenSchema.js@@ -10,6 +10,10 @@ const tokenSchema = new Schema({email: {type: String,},+ type: String,+ identifier: {+ type: String,+ },token: {type: String,required: true,@@ -23,6 +27,10 @@ const tokenSchema = new Schema({type: Date,required: true,},+ metadata: {+ type: Map,+ of: Schema.Types.Mixed,+ },});tokenSchema.index({ expiresAt: 1 }, { expireAfterSeconds: 0 });diff --git a/api/package.json b/api/package.jsonindex 10264309c9..668e3bd159 100644--- a/api/package.json+++ b/api/package.json@@ -45,7 +45,7 @@"@langchain/google-genai": "^0.1.7","@langchain/google-vertexai": "^0.1.8","@langchain/textsplitters": "^0.1.0",- "@librechat/agents": "^2.0.2",+ "@librechat/agents": "^2.0.3","@waylaidwanderer/fetch-event-source": "^3.0.1","axios": "^1.7.7","bcryptjs": "^2.4.3",diff --git a/api/server/controllers/AskController.js b/api/server/controllers/AskController.jsindex b952ab0042..55fe2fa717 100644--- a/api/server/controllers/AskController.js+++ b/api/server/controllers/AskController.js@@ -155,6 +155,8 @@ const AskController = async (req, res, next, initializeClient, addTitle) => {sender,messageId: responseMessageId,parentMessageId: userMessageId ?? parentMessageId,+ }).catch((err) => {+ logger.error('[AskController] Error in `handleAbortError`', err);});}};diff --git a/api/server/controllers/EditController.js b/api/server/controllers/EditController.jsindex ec618eabcf..2a2f8c28de 100644--- a/api/server/controllers/EditController.js+++ b/api/server/controllers/EditController.js@@ -140,6 +140,8 @@ const EditController = async (req, res, next, initializeClient) => {sender,messageId: responseMessageId,parentMessageId: userMessageId ?? parentMessageId,+ }).catch((err) => {+ logger.error('[EditController] Error in `handleAbortError`', err);});}};diff --git a/api/server/controllers/agents/request.js b/api/server/controllers/agents/request.jsindex 8ceadd977d..288ae8f37f 100644--- a/api/server/controllers/agents/request.js+++ b/api/server/controllers/agents/request.js@@ -143,6 +143,8 @@ const AgentController = async (req, res, next, initializeClient, addTitle) => {sender,messageId: responseMessageId,parentMessageId: userMessageId ?? parentMessageId,+ }).catch((err) => {+ logger.error('[api/server/controllers/agents/request] Error in `handleAbortError`', err);});}};diff --git a/api/server/index.js b/api/server/index.jsindex 7278273600..30d36d9a9f 100644--- a/api/server/index.js+++ b/api/server/index.js@@ -84,6 +84,7 @@ const startServer = async () => {app.use('/oauth', routes.oauth);/* API Endpoints */app.use('/api/auth', routes.auth);+ app.use('/api/actions', routes.actions);app.use('/api/keys', routes.keys);app.use('/api/user', routes.user);app.use('/api/search', routes.search);diff --git a/api/server/routes/actions.js b/api/server/routes/actions.jsnew file mode 100644index 0000000000..454f4be6c7--- /dev/null+++ b/api/server/routes/actions.js@@ -0,0 +1,136 @@+const express = require('express');+const jwt = require('jsonwebtoken');+const { getAccessToken } = require('~/server/services/TokenService');+const { logger, getFlowStateManager } = require('~/config');+const { getLogStores } = require('~/cache');++const router = express.Router();+const JWT_SECRET = process.env.JWT_SECRET;++/**+ * Handles the OAuth callback and exchanges the authorization code for tokens.+ *+ * @route GET /actions/:action_id/oauth/callback+ * @param {string} req.params.action_id - The ID of the action.+ * @param {string} req.query.code - The authorization code returned by the provider.+ * @param {string} req.query.state - The state token to verify the authenticity of the request.+ * @returns {void} Sends a success message after updating the action with OAuth tokens.+ */+router.get('/:action_id/oauth/callback', async (req, res) => {+ const { action_id } = req.params;+ const { code, state } = req.query;++ const flowManager = await getFlowStateManager(getLogStores);+ let identifier = action_id;+ try {+ let decodedState;+ try {+ decodedState = jwt.verify(state, JWT_SECRET);+ } catch (err) {+ await flowManager.failFlow(identifier, 'oauth', 'Invalid or expired state parameter');+ return res.status(400).send('Invalid or expired state parameter');+ }++ if (decodedState.action_id !== action_id) {+ await flowManager.failFlow(identifier, 'oauth', 'Mismatched action ID in state parameter');+ return res.status(400).send('Mismatched action ID in state parameter');+ }++ if (!decodedState.user) {+ await flowManager.failFlow(identifier, 'oauth', 'Invalid user ID in state parameter');+ return res.status(400).send('Invalid user ID in state parameter');+ }+ identifier = `${decodedState.user}:${action_id}`;+ const flowState = await flowManager.getFlowState(identifier, 'oauth');+ if (!flowState) {+ throw new Error('OAuth flow not found');+ }++ const tokenData = await getAccessToken({+ code,+ userId: decodedState.user,+ identifier,+ client_url: flowState.metadata.client_url,+ redirect_uri: flowState.metadata.redirect_uri,+ /** Encrypted values */+ encrypted_oauth_client_id: flowState.metadata.encrypted_oauth_client_id,+ encrypted_oauth_client_secret: flowState.metadata.encrypted_oauth_client_secret,+ });+ await flowManager.completeFlow(identifier, 'oauth', tokenData);+ res.send(`+ <!DOCTYPE html>+ <html>+ <head>+ <title>Authentication Successful</title>+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">+ <style>+ body {+ font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont;+ background-color: rgb(249, 250, 251);+ margin: 0;+ padding: 2rem;+ display: flex;+ justify-content: center;+ align-items: center;+ min-height: 100vh;+ }+ .card {+ background-color: white;+ border-radius: 0.5rem;+ padding: 2rem;+ max-width: 28rem;+ width: 100%;+ box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);+ text-align: center;+ }+ .heading {+ color: rgb(17, 24, 39);+ font-size: 1.875rem;+ font-weight: 700;+ margin: 0 0 1rem;+ }+ .description {+ color: rgb(75, 85, 99);+ font-size: 0.875rem;+ margin: 0.5rem 0;+ }+ .countdown {+ color: rgb(99, 102, 241);+ font-weight: 500;+ }+ </style>+ </head>+ <body>+ <div class="card">+ <h1 class="heading">Authentication Successful</h1>+ <p class="description">+ Your authentication was successful. This window will close in+ <span class="countdown" id="countdown">3</span> seconds.+ </p>+ </div>+ <script>+ let secondsLeft = 3;+ const countdownElement = document.getElementById('countdown');++ const countdown = setInterval(() => {+ secondsLeft--;+ countdownElement.textContent = secondsLeft;++ if (secondsLeft <= 0) {+ clearInterval(countdown);+ window.close();+ }+ }, 1000);+ </script>+ </body>+ </html>+ `);+ } catch (error) {+ logger.error('Error in OAuth callback:', error);+ await flowManager.failFlow(identifier, 'oauth', error);+ res.status(500).send('Authentication failed. Please try again.');+ }+});++module.exports = router;diff --git a/api/server/routes/agents/actions.js b/api/server/routes/agents/actions.jsindex 5d5456c29f..786f44dd8e 100644--- a/api/server/routes/agents/actions.js+++ b/api/server/routes/agents/actions.js@@ -1,6 +1,6 @@const express = require('express');const { nanoid } = require('nanoid');-const { actionDelimiter, SystemRoles } = require('librechat-data-provider');+const { actionDelimiter, SystemRoles, removeNullishValues } = require('librechat-data-provider');const { encryptMetadata, domainParser } = require('~/server/services/ActionService');const { updateAction, getActions, deleteAction } = require('~/models/Action');const { isActionDomainAllowed } = require('~/server/services/domains');@@ -51,7 +51,7 @@ router.post('/:agent_id', async (req, res) => {return res.status(400).json({ message: 'No functions provided' });}- let metadata = await encryptMetadata(_metadata);+ let metadata = await encryptMetadata(removeNullishValues(_metadata, true));const isDomainAllowed = await isActionDomainAllowed(metadata.domain);if (!isDomainAllowed) {return res.status(400).json({ message: 'Domain not allowed' });@@ -117,10 +117,7 @@ router.post('/:agent_id', async (req, res) => {}/** @type {[Action]} */- const updatedAction = await updateAction(- { action_id },- actionUpdateData,- );+ const updatedAction = await updateAction({ action_id }, actionUpdateData);const sensitiveFields = ['api_key', 'oauth_client_id', 'oauth_client_secret'];for (let field of sensitiveFields) {diff --git a/api/server/routes/assistants/actions.js b/api/server/routes/assistants/actions.jsindex eb65749086..9f4db5d6b8 100644--- a/api/server/routes/assistants/actions.js+++ b/api/server/routes/assistants/actions.js@@ -1,6 +1,6 @@const express = require('express');const { nanoid } = require('nanoid');-const { actionDelimiter, EModelEndpoint } = require('librechat-data-provider');+const { actionDelimiter, EModelEndpoint, removeNullishValues } = require('librechat-data-provider');const { encryptMetadata, domainParser } = require('~/server/services/ActionService');const { getOpenAIClient } = require('~/server/controllers/assistants/helpers');const { updateAction, getActions, deleteAction } = require('~/models/Action');@@ -29,7 +29,7 @@ router.post('/:assistant_id', async (req, res) => {return res.status(400).json({ message: 'No functions provided' });}- let metadata = await encryptMetadata(_metadata);+ let metadata = await encryptMetadata(removeNullishValues(_metadata, true));const isDomainAllowed = await isActionDomainAllowed(metadata.domain);if (!isDomainAllowed) {return res.status(400).json({ message: 'Domain not allowed' });diff --git a/api/server/routes/index.js b/api/server/routes/index.jsindex 4aba91e954..4b34029c7b 100644--- a/api/server/routes/index.js+++ b/api/server/routes/index.js@@ -9,6 +9,7 @@ const prompts = require('./prompts');const balance = require('./balance');const plugins = require('./plugins');const bedrock = require('./bedrock');+const actions = require('./actions');const search = require('./search');const models = require('./models');const convos = require('./convos');@@ -45,6 +46,7 @@ module.exports = {config,models,plugins,+ actions,presets,balance,messages,diff --git a/api/server/services/ActionService.js b/api/server/services/ActionService.jsindex 712157bf29..660e7aeb0d 100644--- a/api/server/services/ActionService.js+++ b/api/server/services/ActionService.js@@ -1,20 +1,28 @@+const jwt = require('jsonwebtoken');+const { nanoid } = require('nanoid');+const { tool } = require('@langchain/core/tools');+const { GraphEvents, sleep } = require('@librechat/agents');const {+ Time,CacheKeys,+ StepTypes,Constants,AuthTypeEnum,actionDelimiter,isImageVisionTool,actionDomainSeparator,} = require('librechat-data-provider');-const { tool } = require('@langchain/core/tools');+const { refreshAccessToken } = require('~/server/services/TokenService');const { isActionDomainAllowed } = require('~/server/services/domains');+const { logger, getFlowStateManager, sendEvent } = require('~/config');const { encryptV2, decryptV2 } = require('~/server/utils/crypto');const { getActions, deleteActions } = require('~/models/Action');const { deleteAssistant } = require('~/models/Assistant');+const { findToken } = require('~/models/Token');const { logAxiosError } = require('~/utils');const { getLogStores } = require('~/cache');-const { logger } = require('~/config');+const JWT_SECRET = process.env.JWT_SECRET;const toolNameRegex = /^[a-zA-Z0-9_-]+$/;const replaceSeparatorRegex = new RegExp(actionDomainSeparator, 'g');@@ -115,6 +123,8 @@ async function loadActionSets(searchParams) {* Creates a general tool for an entire action set.** @param {Object} params - The parameters for loading action sets.+ * @param {ServerRequest} params.req+ * @param {ServerResponse} params.res* @param {Action} params.action - The action set. Necessary for decrypting authentication values.* @param {ActionRequest} params.requestBuilder - The ActionRequest builder class to execute the API call.* @param {string | undefined} [params.name] - The name of the tool.@@ -122,33 +132,185 @@ async function loadActionSets(searchParams) {* @param {import('zod').ZodTypeAny | undefined} [params.zodSchema] - The Zod schema for tool input validation/definition* @returns { Promise<typeof tool | { _call: (toolInput: Object | string) => unknown}> } An object with `_call` method to execute the tool input.*/-async function createActionTool({ action, requestBuilder, zodSchema, name, description }) {- action.metadata = await decryptMetadata(action.metadata);+async function createActionTool({+ req,+ res,+ action,+ requestBuilder,+ zodSchema,+ name,+ description,+}) {const isDomainAllowed = await isActionDomainAllowed(action.metadata.domain);if (!isDomainAllowed) {return null;}- /** @type {(toolInput: Object | string) => Promise<unknown>} */- const _call = async (toolInput) => {+ const encrypted = {+ oauth_client_id: action.metadata.oauth_client_id,+ oauth_client_secret: action.metadata.oauth_client_secret,+ };+ action.metadata = await decryptMetadata(action.metadata);++ /** @type {(toolInput: Object | string, config: GraphRunnableConfig) => Promise<unknown>} */+ const _call = async (toolInput, config) => {try {+ /** @type {import('librechat-data-provider').ActionMetadataRuntime} */+ const metadata = action.metadata;const executor = requestBuilder.createExecutor();-- // Chain the operationsconst preparedExecutor = executor.setParams(toolInput);- if (action.metadata.auth && action.metadata.auth.type !== AuthTypeEnum.None) {- await preparedExecutor.setAuth(action.metadata);+ if (metadata.auth && metadata.auth.type !== AuthTypeEnum.None) {+ try {+ const action_id = action.action_id;+ const identifier = `${req.user.id}:${action.action_id}`;+ if (metadata.auth.type === AuthTypeEnum.OAuth && metadata.auth.authorization_url) {+ const requestLogin = async () => {+ const { args: _args, stepId, ...toolCall } = config.toolCall ?? {};+ if (!stepId) {+ throw new Error('Tool call is missing stepId');+ }+ const statePayload = {+ nonce: nanoid(),+ user: req.user.id,+ action_id,+ };++ const stateToken = jwt.sign(statePayload, JWT_SECRET, { expiresIn: '10m' });+ try {+ const redirectUri = `${process.env.DOMAIN_CLIENT}/api/actions/${action_id}/oauth/callback`;+ const params = new URLSearchParams({+ client_id: metadata.oauth_client_id,+ scope: metadata.auth.scope,+ redirect_uri: redirectUri,+ access_type: 'offline',+ response_type: 'code',+ state: stateToken,+ });++ const authURL = `${metadata.auth.authorization_url}?${params.toString()}`;+ /** @type {{ id: string; delta: AgentToolCallDelta }} */+ const data = {+ id: stepId,+ delta: {+ type: StepTypes.TOOL_CALLS,+ tool_calls: [{ ...toolCall, args: '' }],+ auth: authURL,+ expires_at: Date.now() + Time.TWO_MINUTES,+ },+ };+ const flowManager = await getFlowStateManager(getLogStores);+ await flowManager.createFlowWithHandler(+ `${identifier}:login`,+ 'oauth_login',+ async () => {+ sendEvent(res, { event: GraphEvents.ON_RUN_STEP_DELTA, data });+ logger.debug('Sent OAuth login request to client', { action_id, identifier });+ return true;+ },+ );+ logger.debug('Waiting for OAuth Authorization response', { action_id, identifier });+ const result = await flowManager.createFlow(identifier, 'oauth', {+ state: stateToken,+ userId: req.user.id,+ client_url: metadata.auth.client_url,+ redirect_uri: `${process.env.DOMAIN_CLIENT}/api/actions/${action_id}/oauth/callback`,+ /** Encrypted values */+ encrypted_oauth_client_id: encrypted.oauth_client_id,+ encrypted_oauth_client_secret: encrypted.oauth_client_secret,+ });+ logger.debug('Received OAuth Authorization response', { action_id, identifier });+ data.delta.auth = undefined;+ data.delta.expires_at = undefined;+ sendEvent(res, { event: GraphEvents.ON_RUN_STEP_DELTA, data });+ await sleep(3000);+ metadata.oauth_access_token = result.access_token;+ metadata.oauth_refresh_token = result.refresh_token;+ const expiresAt = new Date(Date.now() + result.expires_in * 1000);+ metadata.oauth_token_expires_at = expiresAt.toISOString();+ } catch (error) {+ const errorMessage = 'Failed to authenticate OAuth tool';+ logger.error(errorMessage, error);+ throw new Error(errorMessage);+ }+ };++ const tokenPromises = [];+ tokenPromises.push(findToken({ userId: req.user.id, type: 'oauth', identifier }));+ tokenPromises.push(+ findToken({+ userId: req.user.id,+ type: 'oauth_refresh',+ identifier: `${identifier}:refresh`,+ }),+ );+ const [tokenData, refreshTokenData] = await Promise.all(tokenPromises);++ if (tokenData) {+ // Valid token exists, add it to metadata for setAuth+ metadata.oauth_access_token = await decryptV2(tokenData.token);+ if (refreshTokenData) {+ metadata.oauth_refresh_token = await decryptV2(refreshTokenData.token);+ }+ metadata.oauth_token_expires_at = tokenData.expiresAt.toISOString();+ } else if (!refreshTokenData) {+ // No tokens exist, need to authenticate+ await requestLogin();+ } else if (refreshTokenData) {+ // Refresh token is still valid, use it to get new access token+ try {+ const refresh_token = await decryptV2(refreshTokenData.token);+ const refreshTokens = async () =>+ await refreshAccessToken({+ identifier,+ refresh_token,+ userId: req.user.id,+ client_url: metadata.auth.client_url,+ encrypted_oauth_client_id: encrypted.oauth_client_id,+ encrypted_oauth_client_secret: encrypted.oauth_client_secret,+ });+ const flowManager = await getFlowStateManager(getLogStores);+ const refreshData = await flowManager.createFlowWithHandler(+ `${identifier}:refresh`,+ 'oauth_refresh',+ refreshTokens,+ );+ metadata.oauth_access_token = refreshData.access_token;+ if (refreshData.refresh_token) {+ metadata.oauth_refresh_token = refreshData.refresh_token;+ }+ const expiresAt = new Date(Date.now() + refreshData.expires_in * 1000);+ metadata.oauth_token_expires_at = expiresAt.toISOString();+ } catch (error) {+ logger.error('Failed to refresh token, requesting new login:', error);+ await requestLogin();+ }+ } else {+ await requestLogin();+ }+ }++ await preparedExecutor.setAuth(metadata);+ } catch (error) {+ if (+ error.message.includes('No access token found') ||+ error.message.includes('Access token is expired')+ ) {+ throw error;+ }+ throw new Error(`Authentication failed: ${error.message}`);+ }}- const res = await preparedExecutor.execute();+ const response = await preparedExecutor.execute();- if (typeof res.data === 'object') {- return JSON.stringify(res.data);+ if (typeof response.data === 'object') {+ return JSON.stringify(response.data);}- return res.data;+ return response.data;} catch (error) {const logMessage = `API call to ${action.metadata.domain} failed`;logAxiosError({ message: logMessage, error });+ throw error;}};diff --git a/api/server/services/Endpoints/agents/initialize.js b/api/server/services/Endpoints/agents/initialize.jsindex d1b6916854..15a310030a 100644--- a/api/server/services/Endpoints/agents/initialize.js+++ b/api/server/services/Endpoints/agents/initialize.js@@ -82,6 +82,7 @@ const initializeAgentOptions = async ({}) => {const { tools, toolContextMap } = await loadAgentTools({req,+ res,agent,tool_resources,});diff --git a/api/server/services/TokenService.js b/api/server/services/TokenService.jsnew file mode 100644index 0000000000..ec0f990a47--- /dev/null+++ b/api/server/services/TokenService.js@@ -0,0 +1,170 @@+const axios = require('axios');+const { handleOAuthToken } = require('~/models/Token');+const { decryptV2 } = require('~/server/utils/crypto');+const { logAxiosError } = require('~/utils');+const { logger } = require('~/config');++/**+ * Processes the access tokens and stores them in the database.+ * @param {object} tokenData+ * @param {string} tokenData.access_token+ * @param {number} tokenData.expires_in+ * @param {string} [tokenData.refresh_token]+ * @param {number} [tokenData.refresh_token_expires_in]+ * @param {object} metadata+ * @param {string} metadata.userId+ * @param {string} metadata.identifier+ * @returns {Promise<void>}+ */+async function processAccessTokens(tokenData, { userId, identifier }) {+ const { access_token, expires_in = 3600, refresh_token, refresh_token_expires_in } = tokenData;+ if (!access_token) {+ logger.error('Access token not found: ', tokenData);+ throw new Error('Access token not found');+ }+ await handleOAuthToken({+ identifier,+ token: access_token,+ expiresIn: expires_in,+ userId,+ });++ if (refresh_token != null) {+ logger.debug('Processing refresh token');+ await handleOAuthToken({+ token: refresh_token,+ type: 'oauth_refresh',+ userId,+ identifier: `${identifier}:refresh`,+ expiresIn: refresh_token_expires_in ?? null,+ });+ }+ logger.debug('Access tokens processed');+}++/**+ * Refreshes the access token using the refresh token.+ * @param {object} fields+ * @param {string} fields.userId - The ID of the user.+ * @param {string} fields.client_url - The URL of the OAuth provider.+ * @param {string} fields.identifier - The identifier for the token.+ * @param {string} fields.refresh_token - The refresh token to use.+ * @param {string} fields.encrypted_oauth_client_id - The client ID for the OAuth provider.+ * @param {string} fields.encrypted_oauth_client_secret - The client secret for the OAuth provider.+ * @returns {Promise<{+ * access_token: string,+ * expires_in: number,+ * refresh_token?: string,+ * refresh_token_expires_in?: number,+ * }>}+ */+const refreshAccessToken = async ({+ userId,+ client_url,+ identifier,+ refresh_token,+ encrypted_oauth_client_id,+ encrypted_oauth_client_secret,+}) => {+ try {+ const oauth_client_id = await decryptV2(encrypted_oauth_client_id);+ const oauth_client_secret = await decryptV2(encrypted_oauth_client_secret);+ const params = new URLSearchParams({+ client_id: oauth_client_id,+ client_secret: oauth_client_secret,+ grant_type: 'refresh_token',+ refresh_token,+ });++ const response = await axios({+ method: 'POST',+ url: client_url,+ headers: {+ 'Content-Type': 'application/x-www-form-urlencoded',+ Accept: 'application/json',+ },+ data: params.toString(),+ });+ await processAccessTokens(response.data, {+ userId,+ identifier,+ });+ logger.debug(`Access token refreshed successfully for ${identifier}`);+ return response.data;+ } catch (error) {+ const message = 'Error refreshing OAuth tokens';+ logAxiosError({+ message,+ error,+ });+ throw new Error(message);+ }+};++/**+ * Handles the OAuth callback and exchanges the authorization code for tokens.+ * @param {object} fields+ * @param {string} fields.code - The authorization code returned by the provider.+ * @param {string} fields.userId - The ID of the user.+ * @param {string} fields.identifier - The identifier for the token.+ * @param {string} fields.client_url - The URL of the OAuth provider.+ * @param {string} fields.redirect_uri - The redirect URI for the OAuth provider.+ * @param {string} fields.encrypted_oauth_client_id - The client ID for the OAuth provider.+ * @param {string} fields.encrypted_oauth_client_secret - The client secret for the OAuth provider.+ * @returns {Promise<{+ * access_token: string,+ * expires_in: number,+ * refresh_token?: string,+ * refresh_token_expires_in?: number,+ * }>}+ */+const getAccessToken = async ({+ code,+ userId,+ identifier,+ client_url,+ redirect_uri,+ encrypted_oauth_client_id,+ encrypted_oauth_client_secret,+}) => {+ const oauth_client_id = await decryptV2(encrypted_oauth_client_id);+ const oauth_client_secret = await decryptV2(encrypted_oauth_client_secret);+ const params = new URLSearchParams({+ code,+ client_id: oauth_client_id,+ client_secret: oauth_client_secret,+ grant_type: 'authorization_code',+ redirect_uri,+ });++ try {+ const response = await axios({+ method: 'POST',+ url: client_url,+ headers: {+ 'Content-Type': 'application/x-www-form-urlencoded',+ Accept: 'application/json',+ },+ data: params.toString(),+ });++ await processAccessTokens(response.data, {+ userId,+ identifier,+ });+ logger.debug(`Access tokens successfully created for ${identifier}`);+ return response.data;+ } catch (error) {+ const message = 'Error exchanging OAuth code';+ logAxiosError({+ message,+ error,+ });+ throw new Error(message);+ }+};++module.exports = {+ getAccessToken,+ refreshAccessToken,+};diff --git a/api/server/services/ToolService.js b/api/server/services/ToolService.jsindex cf88c0b199..f3e4efb6e3 100644--- a/api/server/services/ToolService.js+++ b/api/server/services/ToolService.js@@ -409,11 +409,12 @@ async function processRequiredActions(client, requiredActions) {* Processes the runtime tool calls and returns the tool classes.* @param {Object} params - Run params containing user and request information.* @param {ServerRequest} params.req - The request object.+ * @param {ServerResponse} params.res - The request object.* @param {Agent} params.agent - The agent to load tools for.* @param {string | undefined} [params.openAIApiKey] - The OpenAI API key.* @returns {Promise<{ tools?: StructuredTool[] }>} The agent tools.*/-async function loadAgentTools({ req, agent, tool_resources, openAIApiKey }) {+async function loadAgentTools({ req, res, agent, tool_resources, openAIApiKey }) {if (!agent.tools || agent.tools.length === 0) {return {};}@@ -546,6 +547,8 @@ async function loadAgentTools({ req, agent, tool_resources, openAIApiKey }) {if (requestBuilder) {const tool = await createActionTool({+ req,+ res,action: actionSet,requestBuilder,zodSchema,diff --git a/api/typedefs.js b/api/typedefs.jsindex c88e57719a..bd97bd93fa 100644--- a/api/typedefs.js+++ b/api/typedefs.js@@ -98,6 +98,12 @@* @memberof typedefs*/+/**+ * @exports LangChainToolCall+ * @typedef {import('@langchain/core/messages/tool').ToolCall} LangChainToolCall+ * @memberof typedefs+ */+/*** @exports GraphRunnableConfig* @typedef {import('@langchain/core/runnables').RunnableConfig<{@@ -109,7 +115,9 @@* agent_index: number;* last_agent_index: number;* hide_sequential_outputs: boolean;- * }>} GraphRunnableConfig+ * }> & {+ * toolCall?: LangChainToolCall & { stepId?: string };+ * }} GraphRunnableConfig* @memberof typedefs*/@@ -383,6 +391,12 @@* @memberof typedefs*/+/**+ * @exports AgentToolCallDelta+ * @typedef {import('librechat-data-provider').Agents.ToolCallDelta} AgentToolCallDelta+ * @memberof typedefs+ */+/** Prompts *//*** @exports TPrompt@@ -947,12 +961,24 @@* @memberof typedefs*/+/**+ * @exports Keyv+ * @typedef {import('keyv')} Keyv+ * @memberof typedefs+ */+/*** @exports MCPManager* @typedef {import('librechat-mcp').MCPManager} MCPManager* @memberof typedefs*/+/**+ * @exports FlowStateManager+ * @typedef {import('librechat-mcp').FlowStateManager} FlowStateManager+ * @memberof typedefs+ */+/*** @exports LCAvailableTools* @typedef {import('librechat-mcp').LCAvailableTools} LCAvailableToolsdiff --git a/client/src/components/Chat/Messages/Content/Files.tsx b/client/src/components/Chat/Messages/Content/Files.tsxindex 09801d92c1..8997d5e822 100644--- a/client/src/components/Chat/Messages/Content/Files.tsx+++ b/client/src/components/Chat/Messages/Content/Files.tsx@@ -9,14 +9,14 @@ const Files = ({ message }: { message?: TMessage }) => {}, [message?.files]);const otherFiles = useMemo(() => {- return message?.files?.filter((file) => !file.type?.startsWith('image/')) || [];+ return message?.files?.filter((file) => !(file.type?.startsWith('image/') === true)) || [];}, [message?.files]);return (<>{otherFiles.length > 0 &&otherFiles.map((file) => <FileContainer key={file.file_id} file={file as TFile} />)}- {imageFiles &&+ {imageFiles.length > 0 &&imageFiles.map((file) => (<Imagekey={file.file_id}diff --git a/client/src/components/Chat/Messages/Content/InProgressCall.tsx b/client/src/components/Chat/Messages/Content/InProgressCall.tsxindex c2e9fc35f8..019a3e2d0a 100644--- a/client/src/components/Chat/Messages/Content/InProgressCall.tsx+++ b/client/src/components/Chat/Messages/Content/InProgressCall.tsx@@ -11,7 +11,7 @@ export default function InProgressCall({progress: number;children: React.ReactNode;}) {- if ((!isSubmitting && progress < 1) || error) {+ if ((!isSubmitting && progress < 1) || error === true) {return <CancelledIcon />;}diff --git a/client/src/components/Chat/Messages/Content/Part.tsx b/client/src/components/Chat/Messages/Content/Part.tsxindex b67fbf6177..ced80b1aa0 100644--- a/client/src/components/Chat/Messages/Content/Part.tsx+++ b/client/src/components/Chat/Messages/Content/Part.tsx@@ -81,6 +81,8 @@ const Part = memo(({ part, isSubmitting, attachments, showCursor, isCreatedByUseinitialProgress={toolCall.progress ?? 0.1}isSubmitting={isSubmitting}attachments={attachments}+ auth={toolCall.auth}+ expires_at={toolCall.expires_at}/>);} else if (toolCall.type === ToolCallTypes.CODE_INTERPRETER) {diff --git a/client/src/components/Chat/Messages/Content/ProgressText.tsx b/client/src/components/Chat/Messages/Content/ProgressText.tsxindex ba5031fac1..aaeecd6004 100644--- a/client/src/components/Chat/Messages/Content/ProgressText.tsx+++ b/client/src/components/Chat/Messages/Content/ProgressText.tsx@@ -39,16 +39,19 @@ export default function ProgressText({onClick,inProgressText,finishedText,+ authText,hasInput = true,popover = false,}: {progress: number;- onClick: () => void;+ onClick?: () => void;inProgressText: string;finishedText: string;+ authText?: string;hasInput?: boolean;popover?: boolean;}) {+ const text = progress < 1 ? authText ?? inProgressText : finishedText;return (<Wrapper popover={popover}><button@@ -57,7 +60,7 @@ export default function ProgressText({disabled={!hasInput}onClick={onClick}>- {progress < 1 ? inProgressText : finishedText}+ {text}<svg width="16" height="17" viewBox="0 0 16 17" fill="none"><pathclassName={hasInput ? '' : 'stroke-transparent'}diff --git a/client/src/components/Chat/Messages/Content/ToolCall.tsx b/client/src/components/Chat/Messages/Content/ToolCall.tsxindex b8ca8e0a69..509d420374 100644--- a/client/src/components/Chat/Messages/Content/ToolCall.tsx+++ b/client/src/components/Chat/Messages/Content/ToolCall.tsx@@ -1,5 +1,6 @@import { useMemo } from 'react';import * as Popover from '@radix-ui/react-popover';+import { ShieldCheck, TriangleAlert } from 'lucide-react';import { actionDelimiter, actionDomainSeparator, Constants } from 'librechat-data-provider';import type { TAttachment } from 'librechat-data-provider';import useLocalize from '~/hooks/useLocalize';@@ -14,6 +15,9 @@ import WrenchIcon from './WrenchIcon';import { useProgress } from '~/hooks';import { logger } from '~/utils';+const radius = 56.08695652173913;+const circumference = 2 * Math.PI * radius;+export default function ToolCall({initialProgress = 0.1,isSubmitting,@@ -21,6 +25,7 @@ export default function ToolCall({args: _args = '',output,attachments,+ auth,}: {initialProgress: number;isSubmitting: boolean;@@ -28,13 +33,10 @@ export default function ToolCall({args: string | Record<string, unknown>;output?: string | null;attachments?: TAttachment[];+ auth?: string;+ expires_at?: number;}) {const localize = useLocalize();- const progress = useProgress(initialProgress);- const radius = 56.08695652173913;- const circumference = 2 * Math.PI * radius;- const offset = circumference - progress * circumference;-const { function_name, domain, isMCPToolCall } = useMemo(() => {if (typeof name !== 'string') {return { function_name: '', domain: null, isMCPToolCall: false };@@ -83,8 +85,37 @@ export default function ToolCall({[args, output],);+ const authDomain = useMemo(() => {+ const authURL = auth ?? '';+ if (!authURL) {+ return '';+ }+ try {+ const url = new URL(authURL);+ return url.hostname;+ } catch (e) {+ return '';+ }+ }, [auth]);++ const progress = useProgress(error === true ? 1 : initialProgress);+ const cancelled = (!isSubmitting && progress < 1) || error === true;+ const offset = circumference - progress * circumference;+const renderIcon = () => {- if (progress < 1) {+ if (progress < 1 && authDomain.length > 0) {+ return (+ <div+ className="absolute left-0 top-0 flex h-full w-full items-center justify-center rounded-full bg-transparent text-text-secondary"+ style={{ opacity: 1, transform: 'none' }}+ data-projection-id="849"+ >+ <div>+ <ShieldCheck />+ </div>+ </div>+ );+ } else if (progress < 1) {return (<InProgressCall progress={progress} isSubmitting={isSubmitting} error={error}><div@@ -101,10 +132,13 @@ export default function ToolCall({);}- return error === true ? <CancelledIcon /> : <FinishedIcon />;+ return cancelled ? <CancelledIcon /> : <FinishedIcon />;};const getFinishedText = () => {+ if (cancelled) {+ return localize('com_ui_error');+ }if (isMCPToolCall === true) {return localize('com_assistants_completed_function', { 0: function_name });}@@ -116,28 +150,49 @@ export default function ToolCall({return (<Popover.Root>- <div className="my-2.5 flex items-center gap-2.5">- <div className="relative h-5 w-5 shrink-0">{renderIcon()}</div>- <ProgressText- progress={progress}- onClick={() => ({})}- inProgressText={localize('com_assistants_running_action')}- finishedText={getFinishedText()}- hasInput={hasInfo}- popover={true}- />- {hasInfo && (- <ToolPopover- input={args ?? ''}- output={output}- domain={domain ?? ''}- function_name={function_name}+ <div className="my-2.5 flex flex-wrap items-center gap-2.5">+ <div className="flex w-full items-center gap-2.5">+ <div className="relative h-5 w-5 shrink-0">{renderIcon()}</div>+ <ProgressText+ progress={cancelled ? 1 : progress}+ inProgressText={localize('com_assistants_running_action')}+ authText={+ !cancelled && authDomain.length > 0 ? localize('com_ui_requires_auth') : undefined+ }+ finishedText={getFinishedText()}+ hasInput={hasInfo}+ popover={true}/>+ {hasInfo && (+ <ToolPopover+ input={args ?? ''}+ output={output}+ domain={authDomain || (domain ?? '')}+ function_name={function_name}+ pendingAuth={authDomain.length > 0 && !cancelled && progress < 1}+ />+ )}+ </div>+ {auth != null && auth && progress < 1 && !cancelled && (+ <div className="flex w-full flex-col gap-2.5">+ <div className="mb-1 mt-2">+ <a+ className="inline-flex items-center justify-center gap-2 rounded-3xl bg-surface-tertiary px-4 py-2 text-sm font-medium hover:bg-surface-hover"+ href={auth}+ target="_blank"+ rel="noopener noreferrer"+ >+ {localize('com_ui_sign_in_to_domain', { 0: authDomain })}+ </a>+ </div>+ <p className="flex items-center text-xs text-text-secondary">+ <TriangleAlert className="mr-1.5 inline-block h-4 w-4" />+ {localize('com_assistants_allow_sites_you_trust')}+ </p>+ </div>)}</div>- {attachments?.map((attachment, index) => (- <Attachment attachment={attachment} key={index} />- ))}+ {attachments?.map((attachment, index) => <Attachment attachment={attachment} key={index} />)}</Popover.Root>);}diff --git a/client/src/components/Chat/Messages/Content/ToolPopover.tsx b/client/src/components/Chat/Messages/Content/ToolPopover.tsxindex d3a390438a..198f64b3e0 100644--- a/client/src/components/Chat/Messages/Content/ToolPopover.tsx+++ b/client/src/components/Chat/Messages/Content/ToolPopover.tsx@@ -4,13 +4,15 @@ import useLocalize from '~/hooks/useLocalize';export default function ToolPopover({input,output,- function_name,domain,+ function_name,+ pendingAuth,}: {input: string;function_name: string;output?: string | null;domain?: string;+ pendingAuth?: boolean;}) {const localize = useLocalize();const formatText = (text: string) => {@@ -21,6 +23,17 @@ export default function ToolPopover({}};+ let title =+ domain != null && domain+ ? localize('com_assistants_domain_info', { 0: domain })+ : localize('com_assistants_function_use', { 0: function_name });+ if (pendingAuth === true) {+ title =+ domain != null && domain+ ? localize('com_assistants_action_attempt', { 0: domain })+ : localize('com_assistants_attempt_info');+ }+return (<Popover.Portal><Popover.Content@@ -28,27 +41,23 @@ export default function ToolPopover({align="start"sideOffset={12}alignOffset={-5}- className="w-18 min-w-[180px] max-w-sm rounded-lg bg-white dark:bg-gray-900"+ className="w-18 min-w-[180px] max-w-sm rounded-lg bg-surface-primary px-1"><div tabIndex={-1}><div className="bg-token-surface-primary max-w-sm rounded-md p-2 shadow-[0_0_24px_0_rgba(0,0,0,0.05),inset_0_0.5px_0_0_rgba(0,0,0,0.05),0_2px_8px_0_rgba(0,0,0,0.05)]">- <div className="mb-2 text-sm font-medium dark:text-gray-100">- {domain != null && domain- ? localize('com_assistants_domain_info', { 0: domain })- : localize('com_assistants_function_use', { 0: function_name })}- </div>+ <div className="mb-2 text-sm font-medium text-text-primary">{title}</div><div className="bg-token-surface-secondary text-token-text-primary dark rounded-md text-xs">- <div className="max-h-32 overflow-y-auto rounded-md p-2 dark:bg-gray-700">+ <div className="max-h-32 overflow-y-auto rounded-md bg-surface-tertiary p-2"><code className="!whitespace-pre-wrap ">{formatText(input)}</code></div></div>{output != null && output && (<>- <div className="mb-2 mt-2 text-sm font-medium dark:text-gray-100">+ <div className="mb-2 mt-2 text-sm font-medium text-text-primary">{localize('com_ui_result')}</div><div className="bg-token-surface-secondary text-token-text-primary dark rounded-md text-xs">- <div className="max-h-32 overflow-y-auto rounded-md p-2 dark:bg-gray-700">+ <div className="max-h-32 overflow-y-auto rounded-md bg-surface-tertiary p-2"><code className="!whitespace-pre-wrap ">{formatText(output)}</code></div></div>diff --git a/client/src/components/Prompts/Groups/GroupSidePanel.tsx b/client/src/components/Prompts/Groups/GroupSidePanel.tsxindex 74e3de1745..84a5c3a7a5 100644--- a/client/src/components/Prompts/Groups/GroupSidePanel.tsx+++ b/client/src/components/Prompts/Groups/GroupSidePanel.tsx@@ -30,17 +30,13 @@ export default function GroupSidePanel({<divclassName={cn('mr-2 flex h-auto w-auto min-w-72 flex-col gap-2 lg:w-1/4 xl:w-1/4',- isDetailView && isSmallerScreen ? 'hidden' : '',+ isDetailView === true && isSmallerScreen ? 'hidden' : '',className,)}>{children}<div className="flex-grow overflow-y-auto">- <List- groups={promptGroups}- isChatRoute={isChatRoute}- isLoading={!!groupsQuery.isLoading}- />+ <List groups={promptGroups} isChatRoute={isChatRoute} isLoading={!!groupsQuery.isLoading} /></div><PanelNavigationnextPage={nextPage}diff --git a/client/src/components/SidePanel/Agents/ActionsAuth.tsx b/client/src/components/SidePanel/Agents/ActionsAuth.tsxdeleted file mode 100644index 7310685563..0000000000--- a/client/src/components/SidePanel/Agents/ActionsAuth.tsx+++ /dev/null@@ -1,296 +0,0 @@-import { useFormContext } from 'react-hook-form';-import * as RadioGroup from '@radix-ui/react-radio-group';-import * as DialogPrimitive from '@radix-ui/react-dialog';-import {- AuthTypeEnum,- AuthorizationTypeEnum,- TokenExchangeMethodEnum,-} from 'librechat-data-provider';-import { DialogContent } from '~/components/ui/';--export default function ActionsAuth({- setOpenAuthDialog,-}: {- setOpenAuthDialog: React.Dispatch<React.SetStateAction<boolean>>;-}) {- const { watch, setValue, trigger } = useFormContext();- const type = watch('type');- return (- <DialogContent- role="dialog"- id="radix-:rf5:"- aria-describedby="radix-:rf7:"- aria-labelledby="radix-:rf6:"- data-state="open"- className="left-1/2 col-auto col-start-2 row-auto row-start-2 w-full max-w-md -translate-x-1/2 rounded-xl bg-white pb-0 text-left shadow-xl transition-all dark:bg-gray-700 dark:text-gray-100"- tabIndex={-1}- style={{ pointerEvents: 'auto' }}- >- <div className="flex items-center justify-between border-b border-black/10 px-4 pb-4 pt-5 dark:border-white/10 sm:p-6">- <div className="flex">- <div className="flex items-center">- <div className="flex grow flex-col gap-1">- <h2- id="radix-:rf6:"- className="text-token-text-primary text-lg font-medium leading-6"- >- Authentication- </h2>- </div>- </div>- </div>- </div>- <div className="p-4 sm:p-6 sm:pt-0">- <div className="mb-4">- <label className="mb-1 block text-sm font-medium">Authentication Type</label>- <RadioGroup.Root- defaultValue={AuthTypeEnum.None}- onValueChange={(value) => setValue('type', value)}- value={type}- role="radiogroup"- aria-required="false"- dir="ltr"- className="flex gap-4"- tabIndex={0}- style={{ outline: 'none' }}- >- <div className="flex items-center gap-2">- <label htmlFor=":rf8:" className="flex cursor-pointer items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- value={AuthTypeEnum.None}- id=":rf8:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={-1}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- None- </label>- </div>- <div className="flex items-center gap-2">- <label htmlFor=":rfa:" className="flex cursor-pointer items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- value={AuthTypeEnum.ServiceHttp}- id=":rfa:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={0}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- API Key- </label>- </div>- <div className="flex items-center gap-2 text-gray-500">- <label htmlFor=":rfc:" className="flex cursor-not-allowed items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- disabled={true}- value={AuthTypeEnum.OAuth}- id=":rfc:"- className="mr-1 flex h-5 w-5 cursor-not-allowed items-center justify-center rounded-full border border-gray-500 bg-gray-300 dark:border-gray-600 dark:bg-gray-700"- tabIndex={-1}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- OAuth- </label>- </div>- </RadioGroup.Root>- </div>- {type === 'none' ? null : type === 'service_http' ? <ApiKey /> : <OAuth />}- {/* Cancel/Save */}- <div className="mt-5 flex flex-col gap-3 sm:mt-4 sm:flex-row-reverse">- <button- className="btn relative bg-green-500 text-white hover:bg-green-600 dark:hover:bg-green-600"- onClick={async () => {- const result = await trigger(undefined, { shouldFocus: true });- setValue('saved_auth_fields', result);- setOpenAuthDialog(!result);- }}- >- <div className="flex w-full items-center justify-center gap-2">Save</div>- </button>- <DialogPrimitive.Close className="btn btn-neutral relative">- <div className="flex w-full items-center justify-center gap-2">Cancel</div>- </DialogPrimitive.Close>- </div>- </div>- </DialogContent>- );-}--const ApiKey = () => {- const { register, watch, setValue } = useFormContext();- const authorization_type = watch('authorization_type');- const type = watch('type');- return (- <>- <label className="mb-1 block text-sm font-medium">API Key</label>- <input- placeholder="<HIDDEN>"- type="password"- autoComplete="new-password"- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-600"- {...register('api_key', { required: type === AuthTypeEnum.ServiceHttp })}- />- <label className="mb-1 block text-sm font-medium">Auth Type</label>- <RadioGroup.Root- defaultValue={AuthorizationTypeEnum.Basic}- onValueChange={(value) => setValue('authorization_type', value)}- value={authorization_type}- role="radiogroup"- aria-required="true"- dir="ltr"- className="mb-2 flex gap-6 overflow-hidden rounded-lg"- tabIndex={0}- style={{ outline: 'none' }}- >- <div className="flex items-center gap-2">- <label htmlFor=":rfu:" className="flex cursor-pointer items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- value={AuthorizationTypeEnum.Basic}- id=":rfu:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={-1}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- Basic- </label>- </div>- <div className="flex items-center gap-2">- <label htmlFor=":rg0:" className="flex cursor-pointer items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- value={AuthorizationTypeEnum.Bearer}- id=":rg0:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={-1}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- Bearer- </label>- </div>- <div className="flex items-center gap-2">- <label htmlFor=":rg2:" className="flex cursor-pointer items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- value={AuthorizationTypeEnum.Custom}- id=":rg2:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={0}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- Custom- </label>- </div>- </RadioGroup.Root>- {authorization_type === AuthorizationTypeEnum.Custom && (- <div className="mt-2">- <label className="mb-1 block text-sm font-medium">Custom Header Name</label>- <input- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-600"- placeholder="X-Api-Key"- {...register('custom_auth_header', {- required: authorization_type === AuthorizationTypeEnum.Custom,- })}- />- </div>- )}- </>- );-};--const OAuth = () => {- const { register, watch, setValue } = useFormContext();- const token_exchange_method = watch('token_exchange_method');- const type = watch('type');- return (- <>- <label className="mb-1 block text-sm font-medium">Client ID</label>- <input- placeholder="<HIDDEN>"- type="password"- autoComplete="off"- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"- {...register('oauth_client_id', { required: type === AuthTypeEnum.OAuth })}- />- <label className="mb-1 block text-sm font-medium">Client Secret</label>- <input- placeholder="<HIDDEN>"- type="password"- autoComplete="off"- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"- {...register('oauth_client_secret', { required: type === AuthTypeEnum.OAuth })}- />- <label className="mb-1 block text-sm font-medium">Authorization URL</label>- <input- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"- {...register('authorization_url', { required: type === AuthTypeEnum.OAuth })}- />- <label className="mb-1 block text-sm font-medium">Token URL</label>- <input- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"- {...register('client_url', { required: type === AuthTypeEnum.OAuth })}- />- <label className="mb-1 block text-sm font-medium">Scope</label>- <input- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"- {...register('scope', { required: type === AuthTypeEnum.OAuth })}- />- <label className="mb-1 block text-sm font-medium">Token Exchange Method</label>- <RadioGroup.Root- defaultValue={AuthorizationTypeEnum.Basic}- onValueChange={(value) => setValue('token_exchange_method', value)}- value={token_exchange_method}- role="radiogroup"- aria-required="true"- dir="ltr"- tabIndex={0}- style={{ outline: 'none' }}- >- <div className="flex items-center gap-2">- <label htmlFor=":rj1:" className="flex cursor-pointer items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- value={TokenExchangeMethodEnum.DefaultPost}- id=":rj1:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-700 dark:bg-gray-700"- tabIndex={-1}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- Default (POST request)- </label>- </div>- <div className="flex items-center gap-2">- <label htmlFor=":rj3:" className="flex cursor-pointer items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- value={TokenExchangeMethodEnum.BasicAuthHeader}- id=":rj3:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-700 dark:bg-gray-700"- tabIndex={-1}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- Basic authorization header- </label>- </div>- </RadioGroup.Root>- </>- );-};diff --git a/client/src/components/SidePanel/Agents/ActionsInput.tsx b/client/src/components/SidePanel/Agents/ActionsInput.tsxindex a40be180d1..b2c2b9d51b 100644--- a/client/src/components/SidePanel/Agents/ActionsInput.tsx+++ b/client/src/components/SidePanel/Agents/ActionsInput.tsx@@ -14,6 +14,7 @@ import type {} from 'librechat-data-provider';import type { ActionAuthForm } from '~/common';import type { Spec } from './ActionsTable';+import ActionCallback from '~/components/SidePanel/Builder/ActionCallback';import { ActionsTable, columns } from './ActionsTable';import { useUpdateAgentAction } from '~/data-provider';import { useToastContext } from '~/Providers';@@ -248,8 +249,8 @@ export default function ActionsInput({</div></div>{!!data && (- <div>- <div className="mb-1.5 flex items-center">+ <div className="my-2">+ <div className="flex items-center"><label className="text-token-text-primary block font-medium">{localize('com_assistants_available_actions')}</label>@@ -258,6 +259,7 @@ export default function ActionsInput({</div>)}<div className="relative my-1">+ <ActionCallback action_id={action?.action_id} /><div className="mb-1.5 flex items-center"><label className="text-token-text-primary block font-medium">{localize('com_ui_privacy_policy_url')}@@ -267,7 +269,7 @@ export default function ActionsInput({<inputtype="text"placeholder="https://api.example-weather-app.com/privacy"- className="flex-1 rounded-lg bg-transparent px-3 py-1.5 text-sm outline-none focus:ring-1 focus:ring-border-light"+ className="flex-1 rounded-lg bg-transparent px-3 py-1.5 text-sm outline-none placeholder:text-text-secondary-alt focus:ring-1 focus:ring-border-light"/></div></div>diff --git a/client/src/components/SidePanel/Agents/ActionsPanel.tsx b/client/src/components/SidePanel/Agents/ActionsPanel.tsxindex f6ed948013..514e1b61eb 100644--- a/client/src/components/SidePanel/Agents/ActionsPanel.tsx+++ b/client/src/components/SidePanel/Agents/ActionsPanel.tsx@@ -1,4 +1,4 @@-import { useEffect, useState } from 'react';+import { useEffect } from 'react';import { useForm, FormProvider } from 'react-hook-form';import {AuthTypeEnum,@@ -7,14 +7,14 @@ import {} from 'librechat-data-provider';import { ChevronLeft } from 'lucide-react';import type { AgentPanelProps, ActionAuthForm } from '~/common';-import { Dialog, DialogTrigger, OGDialog, OGDialogTrigger, Label } from '~/components/ui';+import ActionsAuth from '~/components/SidePanel/Builder/ActionsAuth';+import { OGDialog, OGDialogTrigger, Label } from '~/components/ui';import OGDialogTemplate from '~/components/ui/OGDialogTemplate';import { useDeleteAgentAction } from '~/data-provider';import useLocalize from '~/hooks/useLocalize';import { useToastContext } from '~/Providers';import { TrashIcon } from '~/components/svg';import ActionsInput from './ActionsInput';-import ActionsAuth from './ActionsAuth';import { Panel } from '~/common';export default function ActionsPanel({@@ -26,8 +26,6 @@ export default function ActionsPanel({}: AgentPanelProps) {const localize = useLocalize();const { showToast } = useToastContext();-- const [openAuthDialog, setOpenAuthDialog] = useState(false);const deleteAgentAction = useDeleteAgentAction({onSuccess: () => {showToast({@@ -65,7 +63,6 @@ export default function ActionsPanel({});const { reset, watch } = methods;- const type = watch('type');useEffect(() => {if (action?.metadata.auth) {@@ -156,40 +153,7 @@ export default function ActionsPanel({<a href="https://help.openai.com/en/articles/8554397-creating-a-gpt" target="_blank" rel="noreferrer" className="font-medium">Learn more.</a></div> */}</div>- <Dialog open={openAuthDialog} onOpenChange={setOpenAuthDialog}>- <DialogTrigger asChild>- <div className="relative mb-4">- <div className="mb-1.5 flex items-center">- <label className="text-token-text-primary block font-medium">- {localize('com_ui_authentication')}- </label>- </div>- <div className="border-token-border-medium flex rounded-lg border text-sm hover:cursor-pointer">- <div className="h-9 grow px-3 py-2">{type}</div>- <div className="bg-token-border-medium w-px"></div>- <button type="button" color="neutral" className="flex items-center gap-2 px-3">- <svg- width="24"- height="24"- viewBox="0 0 24 24"- fill="none"- xmlns="http://www.w3.org/2000/svg"- className="icon-sm"- >- <path- d="M11.6439 3C10.9352 3 10.2794 3.37508 9.92002 3.98596L9.49644 4.70605C8.96184 5.61487 7.98938 6.17632 6.93501 6.18489L6.09967 6.19168C5.39096 6.19744 4.73823 6.57783 4.38386 7.19161L4.02776 7.80841C3.67339 8.42219 3.67032 9.17767 4.01969 9.7943L4.43151 10.5212C4.95127 11.4386 4.95127 12.5615 4.43151 13.4788L4.01969 14.2057C3.67032 14.8224 3.67339 15.5778 4.02776 16.1916L4.38386 16.8084C4.73823 17.4222 5.39096 17.8026 6.09966 17.8083L6.93502 17.8151C7.98939 17.8237 8.96185 18.3851 9.49645 19.294L9.92002 20.014C10.2794 20.6249 10.9352 21 11.6439 21H12.3561C13.0648 21 13.7206 20.6249 14.08 20.014L14.5035 19.294C15.0381 18.3851 16.0106 17.8237 17.065 17.8151L17.9004 17.8083C18.6091 17.8026 19.2618 17.4222 19.6162 16.8084L19.9723 16.1916C20.3267 15.5778 20.3298 14.8224 19.9804 14.2057L19.5686 13.4788C19.0488 12.5615 19.0488 11.4386 19.5686 10.5212L19.9804 9.7943C20.3298 9.17767 20.3267 8.42219 19.9723 7.80841L19.6162 7.19161C19.2618 6.57783 18.6091 6.19744 17.9004 6.19168L17.065 6.18489C16.0106 6.17632 15.0382 5.61487 14.5036 4.70605L14.08 3.98596C13.7206 3.37508 13.0648 3 12.3561 3H11.6439Z"- stroke="currentColor"- strokeWidth="2"- strokeLinejoin="round"- />- <circle cx="12" cy="12" r="2.5" stroke="currentColor" strokeWidth="2" />- </svg>- </button>- </div>- </div>- </DialogTrigger>- <ActionsAuth setOpenAuthDialog={setOpenAuthDialog} />- </Dialog>+ <ActionsAuth /><ActionsInput action={action} agent_id={agent_id} setAction={setAction} /></div></form>diff --git a/client/src/components/SidePanel/Agents/ActionsTable/Table.tsx b/client/src/components/SidePanel/Agents/ActionsTable/Table.tsxindex 921c9571ae..231badf53a 100644--- a/client/src/components/SidePanel/Agents/ActionsTable/Table.tsx+++ b/client/src/components/SidePanel/Agents/ActionsTable/Table.tsx@@ -22,7 +22,7 @@ export default function DataTable<TData, TValue>({ columns, data }: DataTableProclassName="border-token-border-light text-token-text-tertiary border-b text-left text-xs">{headerGroup.headers.map((header, j) => (- <th key={j} className="py-1 font-normal">+ <th key={j} className="py-1 font-normal text-text-secondary-alt">{header.isPlaceholder? null: flexRender(header.column.columnDef.header, header.getContext())}diff --git a/client/src/components/SidePanel/Builder/ActionCallback.tsx b/client/src/components/SidePanel/Builder/ActionCallback.tsxnew file mode 100644index 0000000000..851607f22f--- /dev/null+++ b/client/src/components/SidePanel/Builder/ActionCallback.tsx@@ -0,0 +1,63 @@+import { useState } from 'react';+import { Copy, CopyCheck } from 'lucide-react';+import { useFormContext } from 'react-hook-form';+import { AuthTypeEnum } from 'librechat-data-provider';+import { useLocalize, useCopyToClipboard } from '~/hooks';+import { useToastContext } from '~/Providers';+import { Button } from '~/components/ui';+import { cn } from '~/utils';++export default function ActionCallback({ action_id }: { action_id?: string }) {+ const localize = useLocalize();+ const { watch } = useFormContext();+ const { showToast } = useToastContext();+ const [isCopying, setIsCopying] = useState(false);+ const callbackURL = `${window.location.protocol}//${window.location.host}/api/actions/${action_id}/oauth/callback`;+ const copyLink = useCopyToClipboard({ text: callbackURL });++ if (!action_id) {+ return null;+ }+ const type = watch('type');+ if (type !== AuthTypeEnum.OAuth) {+ return null;+ }+ return (+ <div className="mb-1.5 flex flex-col space-y-2">+ <label className="font-semibold">{localize('com_ui_callback_url')}</label>+ <div className="relative flex items-center">+ <div className="border-token-border-medium bg-token-surface-primary hover:border-token-border-hover flex h-10 w-full rounded-lg border">+ <div className="flex-1 overflow-hidden">+ <div className="relative w-full">+ <input+ type="text"+ readOnly+ value={callbackURL}+ className="w-full border-0 bg-transparent px-3 py-2 pr-12 text-sm text-text-secondary-alt focus:outline-none"+ style={{ direction: 'rtl' }}+ />+ </div>+ </div>+ <div className="absolute right-0 flex h-full items-center pr-1">+ <Button+ size="sm"+ variant="ghost"+ type="button"+ onClick={() => {+ if (isCopying) {+ return;+ }+ showToast({ message: localize('com_ui_copied_to_clipboard') });+ copyLink(setIsCopying);+ }}+ className={cn('h-8 rounded-md px-2', isCopying ? 'cursor-default' : '')}+ aria-label={localize('com_ui_copy_link')}+ >+ {isCopying ? <CopyCheck className="size-4" /> : <Copy className="size-4" />}+ </Button>+ </div>+ </div>+ </div>+ </div>+ );+}diff --git a/client/src/components/SidePanel/Builder/ActionsAuth.tsx b/client/src/components/SidePanel/Builder/ActionsAuth.tsxindex 7310685563..c56a489165 100644--- a/client/src/components/SidePanel/Builder/ActionsAuth.tsx+++ b/client/src/components/SidePanel/Builder/ActionsAuth.tsx@@ -1,144 +1,190 @@+import { useState } from 'react';import { useFormContext } from 'react-hook-form';import * as RadioGroup from '@radix-ui/react-radio-group';-import * as DialogPrimitive from '@radix-ui/react-dialog';import {AuthTypeEnum,AuthorizationTypeEnum,TokenExchangeMethodEnum,} from 'librechat-data-provider';-import { DialogContent } from '~/components/ui/';+import {+ OGDialog,+ OGDialogClose,+ OGDialogTitle,+ OGDialogHeader,+ OGDialogContent,+ OGDialogTrigger,+} from '~/components/ui';+import { TranslationKeys, useLocalize } from '~/hooks';+import { cn } from '~/utils';-export default function ActionsAuth({- setOpenAuthDialog,-}: {- setOpenAuthDialog: React.Dispatch<React.SetStateAction<boolean>>;-}) {+export default function ActionsAuth({ disableOAuth }: { disableOAuth?: boolean }) {+ const localize = useLocalize();+ const [openAuthDialog, setOpenAuthDialog] = useState(false);const { watch, setValue, trigger } = useFormContext();const type = watch('type');+return (- <DialogContent- role="dialog"- id="radix-:rf5:"- aria-describedby="radix-:rf7:"- aria-labelledby="radix-:rf6:"- data-state="open"- className="left-1/2 col-auto col-start-2 row-auto row-start-2 w-full max-w-md -translate-x-1/2 rounded-xl bg-white pb-0 text-left shadow-xl transition-all dark:bg-gray-700 dark:text-gray-100"- tabIndex={-1}- style={{ pointerEvents: 'auto' }}- >- <div className="flex items-center justify-between border-b border-black/10 px-4 pb-4 pt-5 dark:border-white/10 sm:p-6">- <div className="flex">- <div className="flex items-center">- <div className="flex grow flex-col gap-1">- <h2- id="radix-:rf6:"- className="text-token-text-primary text-lg font-medium leading-6"- >- Authentication- </h2>+ <OGDialog open={openAuthDialog} onOpenChange={setOpenAuthDialog}>+ <OGDialogTrigger asChild>+ <div className="relative mb-4">+ <div className="mb-1.5 flex items-center">+ <label className="text-token-text-primary block font-medium">+ {localize('com_ui_authentication')}+ </label>+ </div>+ <div className="border-token-border-medium flex rounded-lg border text-sm hover:cursor-pointer">+ <div className="h-9 grow px-3 py-2">+ {localize(`com_ui_${type}` as TranslationKeys)}</div>+ <div className="bg-token-border-medium w-px"></div>+ <button type="button" color="neutral" className="flex items-center gap-2 px-3">+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="icon-sm"+ >+ <path+ d="M11.6439 3C10.9352 3 10.2794 3.37508 9.92002 3.98596L9.49644 4.70605C8.96184 5.61487 7.98938 6.17632 6.93501 6.18489L6.09967 6.19168C5.39096 6.19744 4.73823 6.57783 4.38386 7.19161L4.02776 7.80841C3.67339 8.42219 3.67032 9.17767 4.01969 9.7943L4.43151 10.5212C4.95127 11.4386 4.95127 12.5615 4.43151 13.4788L4.01969 14.2057C3.67032 14.8224 3.67339 15.5778 4.02776 16.1916L4.38386 16.8084C4.73823 17.4222 5.39096 17.8026 6.09966 17.8083L6.93502 17.8151C7.98939 17.8237 8.96185 18.3851 9.49645 19.294L9.92002 20.014C10.2794 20.6249 10.9352 21 11.6439 21H12.3561C13.0648 21 13.7206 20.6249 14.08 20.014L14.5035 19.294C15.0381 18.3851 16.0106 17.8237 17.065 17.8151L17.9004 17.8083C18.6091 17.8026 19.2618 17.4222 19.6162 16.8084L19.9723 16.1916C20.3267 15.5778 20.3298 14.8224 19.9804 14.2057L19.5686 13.4788C19.0488 12.5615 19.0488 11.4386 19.5686 10.5212L19.9804 9.7943C20.3298 9.17767 20.3267 8.42219 19.9723 7.80841L19.6162 7.19161C19.2618 6.57783 18.6091 6.19744 17.9004 6.19168L17.065 6.18489C16.0106 6.17632 15.0382 5.61487 14.5036 4.70605L14.08 3.98596C13.7206 3.37508 13.0648 3 12.3561 3H11.6439Z"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinejoin="round"+ />+ <circle cx="12" cy="12" r="2.5" stroke="currentColor" strokeWidth="2" />+ </svg>+ </button></div></div>- </div>- <div className="p-4 sm:p-6 sm:pt-0">- <div className="mb-4">- <label className="mb-1 block text-sm font-medium">Authentication Type</label>- <RadioGroup.Root- defaultValue={AuthTypeEnum.None}- onValueChange={(value) => setValue('type', value)}- value={type}- role="radiogroup"- aria-required="false"- dir="ltr"- className="flex gap-4"- tabIndex={0}- style={{ outline: 'none' }}- >- <div className="flex items-center gap-2">- <label htmlFor=":rf8:" className="flex cursor-pointer items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- value={AuthTypeEnum.None}- id=":rf8:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={-1}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- None- </label>- </div>- <div className="flex items-center gap-2">- <label htmlFor=":rfa:" className="flex cursor-pointer items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- value={AuthTypeEnum.ServiceHttp}- id=":rfa:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={0}- >- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- API Key- </label>- </div>- <div className="flex items-center gap-2 text-gray-500">- <label htmlFor=":rfc:" className="flex cursor-not-allowed items-center gap-1">- <RadioGroup.Item- type="button"- role="radio"- disabled={true}- value={AuthTypeEnum.OAuth}- id=":rfc:"- className="mr-1 flex h-5 w-5 cursor-not-allowed items-center justify-center rounded-full border border-gray-500 bg-gray-300 dark:border-gray-600 dark:bg-gray-700"- tabIndex={-1}+ </OGDialogTrigger>+ <OGDialogContent className="w-full max-w-md border-none bg-surface-primary text-text-primary">+ <OGDialogHeader className="border-b border-border-light sm:p-3">+ <OGDialogTitle>{localize('com_ui_authentication')}</OGDialogTitle>+ </OGDialogHeader>+ <div className="p-4 sm:p-6 sm:pt-0">+ <div className="mb-4">+ <label className="mb-1 block text-sm font-medium">+ {localize('com_ui_authentication_type')}+ </label>+ <RadioGroup.Root+ defaultValue={AuthTypeEnum.None}+ onValueChange={(value) => setValue('type', value)}+ value={type}+ role="radiogroup"+ aria-required="false"+ dir="ltr"+ className="flex gap-4"+ style={{ outline: 'none' }}+ >+ <div className="flex items-center gap-2">+ <label htmlFor=":rf8:" className="flex cursor-pointer items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ value={AuthTypeEnum.None}+ id=":rf8:"+ className={cn(+ 'mr-1 flex h-5 w-5 items-center justify-center rounded-full border',+ 'border-border-heavy bg-surface-primary',+ )}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-text-primary" />+ </RadioGroup.Item>+ {localize('com_ui_none')}+ </label>+ </div>+ <div className="flex items-center gap-2">+ <label htmlFor=":rfa:" className="flex cursor-pointer items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ value={AuthTypeEnum.ServiceHttp}+ id=":rfa:"+ className={cn(+ 'mr-1 flex h-5 w-5 items-center justify-center rounded-full border',+ 'border-border-heavy bg-surface-primary',+ )}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-text-primary" />+ </RadioGroup.Item>+ {localize('com_ui_api_key')}+ </label>+ </div>+ <div className="flex items-center gap-2">+ <label+ htmlFor=":rfc:"+ className={cn(+ 'flex items-center gap-1',+ disableOAuth === true ? 'cursor-not-allowed' : 'cursor-pointer',+ )}>- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>- </RadioGroup.Item>- OAuth- </label>- </div>- </RadioGroup.Root>- </div>- {type === 'none' ? null : type === 'service_http' ? <ApiKey /> : <OAuth />}- {/* Cancel/Save */}- <div className="mt-5 flex flex-col gap-3 sm:mt-4 sm:flex-row-reverse">- <button- className="btn relative bg-green-500 text-white hover:bg-green-600 dark:hover:bg-green-600"- onClick={async () => {- const result = await trigger(undefined, { shouldFocus: true });- setValue('saved_auth_fields', result);- setOpenAuthDialog(!result);- }}- >- <div className="flex w-full items-center justify-center gap-2">Save</div>- </button>- <DialogPrimitive.Close className="btn btn-neutral relative">- <div className="flex w-full items-center justify-center gap-2">Cancel</div>- </DialogPrimitive.Close>+ <RadioGroup.Item+ type="button"+ role="radio"+ disabled={disableOAuth}+ value={AuthTypeEnum.OAuth}+ id=":rfc:"+ className={cn(+ 'mr-1 flex h-5 w-5 items-center justify-center rounded-full border',+ 'border-border-heavy bg-surface-primary',+ disableOAuth === true ? 'cursor-not-allowed' : '',+ )}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-text-primary" />+ </RadioGroup.Item>+ {localize('com_ui_oauth')}+ </label>+ </div>+ </RadioGroup.Root>+ </div>+ {type === 'none' ? null : type === 'service_http' ? <ApiKey /> : <OAuth />}+ {/* Cancel/Save */}+ <div className="mt-5 flex flex-col gap-3 sm:mt-4 sm:flex-row-reverse">+ <button+ className="btn relative bg-surface-submit text-primary-foreground hover:bg-surface-submit-hover"+ onClick={async () => {+ const result = await trigger(undefined, { shouldFocus: true });+ setValue('saved_auth_fields', result);+ setOpenAuthDialog(!result);+ }}+ >+ <div className="flex w-full items-center justify-center gap-2 text-white">+ {localize('com_ui_save')}+ </div>+ </button>+ <OGDialogClose className="btn btn-neutral relative">+ <div className="flex w-full items-center justify-center gap-2">+ {localize('com_ui_cancel')}+ </div>+ </OGDialogClose>+ </div></div>- </div>- </DialogContent>+ </OGDialogContent>+ </OGDialog>);}const ApiKey = () => {+ const localize = useLocalize();const { register, watch, setValue } = useFormContext();const authorization_type = watch('authorization_type');const type = watch('type');return (<>- <label className="mb-1 block text-sm font-medium">API Key</label>+ <label className="mb-1 block text-sm font-medium">{localize('com_ui_api_key')}</label><inputplaceholder="<HIDDEN>"- type="password"+ type="new-password"autoComplete="new-password"- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-600"+ className={cn(+ 'mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm',+ 'border-border-medium bg-surface-primary outline-none',+ 'focus:ring-2 focus:ring-ring',+ )}{...register('api_key', { required: type === AuthTypeEnum.ServiceHttp })}/>- <label className="mb-1 block text-sm font-medium">Auth Type</label>+ <label className="mb-1 block text-sm font-medium">{localize('com_ui_auth_type')}</label><RadioGroup.RootdefaultValue={AuthorizationTypeEnum.Basic}onValueChange={(value) => setValue('authorization_type', value)}@@ -147,7 +193,6 @@ const ApiKey = () => {aria-required="true"dir="ltr"className="mb-2 flex gap-6 overflow-hidden rounded-lg"- tabIndex={0}style={{ outline: 'none' }}><div className="flex items-center gap-2">@@ -157,12 +202,14 @@ const ApiKey = () => {role="radio"value={AuthorizationTypeEnum.Basic}id=":rfu:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={-1}+ className={cn(+ 'mr-1 flex h-5 w-5 items-center justify-center rounded-full border',+ 'border-border-heavy bg-surface-primary',+ )}>- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-text-primary" /></RadioGroup.Item>- Basic+ {localize('com_ui_basic')}</label></div><div className="flex items-center gap-2">@@ -172,12 +219,14 @@ const ApiKey = () => {role="radio"value={AuthorizationTypeEnum.Bearer}id=":rg0:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={-1}+ className={cn(+ 'mr-1 flex h-5 w-5 items-center justify-center rounded-full border',+ 'border-border-heavy bg-surface-primary',+ )}>- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-text-primary" /></RadioGroup.Item>- Bearer+ {localize('com_ui_bearer')}</label></div><div className="flex items-center gap-2">@@ -187,20 +236,28 @@ const ApiKey = () => {role="radio"value={AuthorizationTypeEnum.Custom}id=":rg2:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-500 dark:bg-gray-500"- tabIndex={0}+ className={cn(+ 'mr-1 flex h-5 w-5 items-center justify-center rounded-full border',+ 'border-border-heavy bg-surface-primary',+ )}>- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-text-primary" /></RadioGroup.Item>- Custom+ {localize('com_ui_custom')}</label></div></RadioGroup.Root>{authorization_type === AuthorizationTypeEnum.Custom && (<div className="mt-2">- <label className="mb-1 block text-sm font-medium">Custom Header Name</label>+ <label className="mb-1 block text-sm font-medium">+ {localize('com_ui_custom_header_name')}+ </label><input- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-600"+ className={cn(+ 'mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm',+ 'border-border-medium bg-surface-primary outline-none',+ 'focus:ring-2 focus:ring-ring',+ )}placeholder="X-Api-Key"{...register('custom_auth_header', {required: authorization_type === AuthorizationTypeEnum.Custom,@@ -213,43 +270,53 @@ const ApiKey = () => {};const OAuth = () => {+ const localize = useLocalize();const { register, watch, setValue } = useFormContext();const token_exchange_method = watch('token_exchange_method');const type = watch('type');++ const inputClasses = cn(+ 'mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm',+ 'border-border-medium bg-surface-primary outline-none',+ 'focus:ring-2 focus:ring-ring',+ );+return (<>- <label className="mb-1 block text-sm font-medium">Client ID</label>+ <label className="mb-1 block text-sm font-medium">{localize('com_ui_client_id')}</label><inputplaceholder="<HIDDEN>"type="password"- autoComplete="off"- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"- {...register('oauth_client_id', { required: type === AuthTypeEnum.OAuth })}+ autoComplete="new-password"+ className={inputClasses}+ {...register('oauth_client_id', { required: false })}/>- <label className="mb-1 block text-sm font-medium">Client Secret</label>+ <label className="mb-1 block text-sm font-medium">{localize('com_ui_client_secret')}</label><inputplaceholder="<HIDDEN>"type="password"- autoComplete="off"- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"- {...register('oauth_client_secret', { required: type === AuthTypeEnum.OAuth })}+ autoComplete="new-password"+ className={inputClasses}+ {...register('oauth_client_secret', { required: false })}/>- <label className="mb-1 block text-sm font-medium">Authorization URL</label>+ <label className="mb-1 block text-sm font-medium">{localize('com_ui_auth_url')}</label><input- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ className={inputClasses}{...register('authorization_url', { required: type === AuthTypeEnum.OAuth })}/>- <label className="mb-1 block text-sm font-medium">Token URL</label>+ <label className="mb-1 block text-sm font-medium">{localize('com_ui_token_url')}</label><input- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ className={inputClasses}{...register('client_url', { required: type === AuthTypeEnum.OAuth })}/>- <label className="mb-1 block text-sm font-medium">Scope</label>+ <label className="mb-1 block text-sm font-medium">{localize('com_ui_scope')}</label><input- className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ className={inputClasses}{...register('scope', { required: type === AuthTypeEnum.OAuth })}/>- <label className="mb-1 block text-sm font-medium">Token Exchange Method</label>+ <label className="mb-1 block text-sm font-medium">+ {localize('com_ui_token_exchange_method')}+ </label><RadioGroup.RootdefaultValue={AuthorizationTypeEnum.Basic}onValueChange={(value) => setValue('token_exchange_method', value)}@@ -257,7 +324,6 @@ const OAuth = () => {role="radiogroup"aria-required="true"dir="ltr"- tabIndex={0}style={{ outline: 'none' }}><div className="flex items-center gap-2">@@ -267,12 +333,14 @@ const OAuth = () => {role="radio"value={TokenExchangeMethodEnum.DefaultPost}id=":rj1:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-700 dark:bg-gray-700"- tabIndex={-1}+ className={cn(+ 'mr-1 flex h-5 w-5 items-center justify-center rounded-full border',+ 'border-border-heavy bg-surface-primary',+ )}>- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-text-primary" /></RadioGroup.Item>- Default (POST request)+ {localize('com_ui_default_post_request')}</label></div><div className="flex items-center gap-2">@@ -282,12 +350,14 @@ const OAuth = () => {role="radio"value={TokenExchangeMethodEnum.BasicAuthHeader}id=":rj3:"- className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-700 dark:bg-gray-700"- tabIndex={-1}+ className={cn(+ 'mr-1 flex h-5 w-5 items-center justify-center rounded-full border',+ 'border-border-heavy bg-surface-primary',+ )}>- <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-text-primary" /></RadioGroup.Item>- Basic authorization header+ {localize('com_ui_basic_auth_header')}</label></div></RadioGroup.Root>diff --git a/client/src/components/SidePanel/Builder/ActionsInput.tsx b/client/src/components/SidePanel/Builder/ActionsInput.tsxindex 0d58daaa44..410df8e9a3 100644--- a/client/src/components/SidePanel/Builder/ActionsInput.tsx+++ b/client/src/components/SidePanel/Builder/ActionsInput.tsx@@ -15,6 +15,7 @@ import type {} from 'librechat-data-provider';import type { ActionAuthForm, ActionWithNullableMetadata } from '~/common';import type { Spec } from './ActionsTable';+import ActionCallback from '~/components/SidePanel/Builder/ActionCallback';import { useAssistantsMapContext, useToastContext } from '~/Providers';import { ActionsTable, columns } from './ActionsTable';import { useUpdateAction } from '~/data-provider';@@ -259,8 +260,8 @@ export default function ActionsInput({</div></div>{!!data && (- <div>- <div className="mb-1.5 flex items-center">+ <div className="my-2">+ <div className="flex items-center"><label className="text-token-text-primary block font-medium">{localize('com_assistants_available_actions')}</label>@@ -269,6 +270,7 @@ export default function ActionsInput({</div>)}<div className="relative my-1">+ <ActionCallback action_id={action?.action_id} /><div className="mb-1.5 flex items-center"><label className="text-token-text-primary block font-medium">{localize('com_ui_privacy_policy_url')}@@ -278,7 +280,7 @@ export default function ActionsInput({<inputtype="text"placeholder="https://api.example-weather-app.com/privacy"- className="flex-1 rounded-lg bg-transparent px-3 py-1.5 text-sm outline-none focus:ring-1 focus:ring-border-light"+ className="flex-1 rounded-lg bg-transparent px-3 py-1.5 text-sm outline-none placeholder:text-text-secondary-alt focus:ring-1 focus:ring-border-light"/></div></div>diff --git a/client/src/components/SidePanel/Builder/ActionsPanel.tsx b/client/src/components/SidePanel/Builder/ActionsPanel.tsxindex f3fdd20ded..23071f5c70 100644--- a/client/src/components/SidePanel/Builder/ActionsPanel.tsx+++ b/client/src/components/SidePanel/Builder/ActionsPanel.tsx@@ -1,4 +1,4 @@-import { useEffect, useState } from 'react';+import { useEffect } from 'react';import { useForm, FormProvider } from 'react-hook-form';import {AuthTypeEnum,@@ -8,7 +8,7 @@ import {import { ChevronLeft } from 'lucide-react';import type { AssistantPanelProps, ActionAuthForm } from '~/common';import { useAssistantsMapContext, useToastContext } from '~/Providers';-import { Dialog, DialogTrigger, OGDialog, OGDialogTrigger, Label } from '~/components/ui';+import { OGDialog, OGDialogTrigger, Label } from '~/components/ui';import OGDialogTemplate from '~/components/ui/OGDialogTemplate';import { useDeleteAction } from '~/data-provider';import { TrashIcon } from '~/components/svg';@@ -29,7 +29,6 @@ export default function ActionsPanel({const localize = useLocalize();const { showToast } = useToastContext();const assistantMap = useAssistantsMapContext();- const [openAuthDialog, setOpenAuthDialog] = useState(false);const deleteAction = useDeleteAction({onSuccess: () => {showToast({@@ -68,7 +67,6 @@ export default function ActionsPanel({});const { reset, watch } = methods;- const type = watch('type');useEffect(() => {if (action?.metadata?.auth) {@@ -162,40 +160,7 @@ export default function ActionsPanel({<a href="https://help.openai.com/en/articles/8554397-creating-a-gpt" target="_blank" rel="noreferrer" className="font-medium">Learn more.</a></div> */}</div>- <Dialog open={openAuthDialog} onOpenChange={setOpenAuthDialog}>- <DialogTrigger asChild>- <div className="relative mb-4">- <div className="mb-1.5 flex items-center">- <label className="text-token-text-primary block font-medium">- {localize('com_ui_authentication')}- </label>- </div>- <div className="border-token-border-medium flex rounded-lg border text-sm hover:cursor-pointer">- <div className="h-9 grow px-3 py-2">{type}</div>- <div className="bg-token-border-medium w-px"></div>- <button type="button" color="neutral" className="flex items-center gap-2 px-3">- <svg- width="24"- height="24"- viewBox="0 0 24 24"- fill="none"- xmlns="http://www.w3.org/2000/svg"- className="icon-sm"- >- <path- d="M11.6439 3C10.9352 3 10.2794 3.37508 9.92002 3.98596L9.49644 4.70605C8.96184 5.61487 7.98938 6.17632 6.93501 6.18489L6.09967 6.19168C5.39096 6.19744 4.73823 6.57783 4.38386 7.19161L4.02776 7.80841C3.67339 8.42219 3.67032 9.17767 4.01969 9.7943L4.43151 10.5212C4.95127 11.4386 4.95127 12.5615 4.43151 13.4788L4.01969 14.2057C3.67032 14.8224 3.67339 15.5778 4.02776 16.1916L4.38386 16.8084C4.73823 17.4222 5.39096 17.8026 6.09966 17.8083L6.93502 17.8151C7.98939 17.8237 8.96185 18.3851 9.49645 19.294L9.92002 20.014C10.2794 20.6249 10.9352 21 11.6439 21H12.3561C13.0648 21 13.7206 20.6249 14.08 20.014L14.5035 19.294C15.0381 18.3851 16.0106 17.8237 17.065 17.8151L17.9004 17.8083C18.6091 17.8026 19.2618 17.4222 19.6162 16.8084L19.9723 16.1916C20.3267 15.5778 20.3298 14.8224 19.9804 14.2057L19.5686 13.4788C19.0488 12.5615 19.0488 11.4386 19.5686 10.5212L19.9804 9.7943C20.3298 9.17767 20.3267 8.42219 19.9723 7.80841L19.6162 7.19161C19.2618 6.57783 18.6091 6.19744 17.9004 6.19168L17.065 6.18489C16.0106 6.17632 15.0382 5.61487 14.5036 4.70605L14.08 3.98596C13.7206 3.37508 13.0648 3 12.3561 3H11.6439Z"- stroke="currentColor"- strokeWidth="2"- strokeLinejoin="round"- />- <circle cx="12" cy="12" r="2.5" stroke="currentColor" strokeWidth="2" />- </svg>- </button>- </div>- </div>- </DialogTrigger>- <ActionsAuth setOpenAuthDialog={setOpenAuthDialog} />- </Dialog>+ <ActionsAuth disableOAuth={true} /><ActionsInputaction={action}assistant_id={assistant_id}diff --git a/client/src/components/SidePanel/Files/PanelFileCell.tsx b/client/src/components/SidePanel/Files/PanelFileCell.tsxindex 18fcc13ab6..e039b8b257 100644--- a/client/src/components/SidePanel/Files/PanelFileCell.tsx+++ b/client/src/components/SidePanel/Files/PanelFileCell.tsx@@ -4,12 +4,12 @@ import ImagePreview from '~/components/Chat/Input/Files/ImagePreview';import FilePreview from '~/components/Chat/Input/Files/FilePreview';import { getFileType } from '~/utils';-export default function PanelFileCell({ row }: { row: Row<TFile> }) {+export default function PanelFileCell({ row }: { row: Row<TFile | undefined> }) {const file = row.original;return (<div className="flex w-full items-center gap-2">- {file.type.startsWith('image') ? (+ {file?.type.startsWith('image') === true ? (<ImagePreviewurl={file.filepath}className="h-10 w-10 flex-shrink-0"@@ -17,11 +17,11 @@ export default function PanelFileCell({ row }: { row: Row<TFile> }) {alt={file.filename}/>) : (- <FilePreview fileType={getFileType(file.type)} file={file} />+ <FilePreview fileType={getFileType(file?.type)} file={file} />)}<div className="min-w-0 flex-1 overflow-hidden"><span className="block w-full overflow-hidden truncate text-ellipsis whitespace-nowrap text-xs">- {file.filename}+ {file?.filename}</span></div></div>diff --git a/client/src/components/ui/OGDialogTemplate.tsx b/client/src/components/ui/OGDialogTemplate.tsxindex c0602e60ca..6a1fc02799 100644--- a/client/src/components/ui/OGDialogTemplate.tsx+++ b/client/src/components/ui/OGDialogTemplate.tsx@@ -6,7 +6,6 @@ import {OGDialogHeader,OGDialogContent,OGDialogDescription,- OGDialog,} from './OriginalDialog';import { useLocalize } from '~/hooks';import { Spinner } from '../svg';diff --git a/client/src/hooks/SSE/useStepHandler.ts b/client/src/hooks/SSE/useStepHandler.tsindex bc137edbc6..06e622fc8a 100644--- a/client/src/hooks/SSE/useStepHandler.ts+++ b/client/src/hooks/SSE/useStepHandler.ts@@ -125,6 +125,8 @@ export default function useStepHandler({name,args,type: ToolCallTypes.TOOL_CALL,+ auth: contentPart.tool_call.auth,+ expires_at: contentPart.tool_call.expires_at,};if (finalUpdate) {@@ -286,6 +288,11 @@ export default function useStepHandler({},};+ if (runStepDelta.delta.auth != null) {+ contentPart.tool_call.auth = runStepDelta.delta.auth;+ contentPart.tool_call.expires_at = runStepDelta.delta.expires_at;+ }+updatedResponse = updateContent(updatedResponse, runStep.index, contentPart);});diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.jsonindex 16f8056486..7ea0d84401 100644--- a/client/src/locales/en/translation.json+++ b/client/src/locales/en/translation.json@@ -518,6 +518,8 @@"com_ui_attach_warn_endpoint": "Non-Assistant files may be ignored without a compatible tool","com_ui_attachment": "Attachment","com_ui_authentication": "Authentication",+ "com_ui_auth_type": "Auth Type",+ "com_ui_authentication_type": "Authentication Type","com_ui_avatar": "Avatar","com_ui_back_to_chat": "Back to Chat","com_ui_back_to_prompts": "Back to Prompts",@@ -622,6 +624,22 @@"com_ui_endpoint_menu": "LLM Endpoint Menu","com_ui_endpoints_available": "Available Endpoints","com_ui_enter": "Enter",+ "com_ui_api_key": "API Key",+ "com_ui_oauth": "OAuth",+ "com_ui_basic": "Basic",+ "com_ui_bearer": "Bearer",+ "com_ui_custom": "Custom",+ "com_ui_custom_header_name": "Custom Header Name",+ "com_ui_client_id": "Client ID",+ "com_ui_client_secret": "Client Secret",+ "com_ui_auth_url": "Authorization URL",+ "com_ui_token_url": "Token URL",+ "com_ui_scope": "Scope",+ "com_ui_service_http": "API Key",+ "com_ui_default_post_request": "Default (POST request)",+ "com_ui_token_exchange_method": "Token Exchange Method",+ "com_ui_basic_auth_header": "Basic authorization header",+ "com_ui_callback_url": "Callback URL","com_ui_enter_api_key": "Enter API Key","com_ui_enter_openapi_schema": "Enter your OpenAPI schema here","com_ui_enter_var": "Enter {{0}}",@@ -706,6 +724,7 @@"com_ui_no_conversation_id": "No conversation ID found","com_ui_no_prompt_description": "No description found.","com_ui_no_terms_content": "No terms and conditions content to display",+ "com_ui_none": "None","com_ui_none_selected": "None selected","com_ui_nothing_found": "Nothing found","com_ui_of": "of",@@ -832,5 +851,10 @@"com_ui_yes": "Yes","com_ui_zoom": "Zoom","com_user_message": "You",- "com_warning_resubmit_unsupported": "Resubmitting the AI message is not supported for this endpoint."+ "com_warning_resubmit_unsupported": "Resubmitting the AI message is not supported for this endpoint.",+ "com_assistants_action_attempt": "Assistant wants to talk to {{0}}",+ "com_assistants_attempt_info": "Assistant wants to send the following:",+ "com_assistants_allow_sites_you_trust": "Only allow sites you trust.",+ "com_ui_sign_in_to_domain": "Sign-in to {{0}}",+ "com_ui_requires_auth": "Requires Authentication"}\ No newline at end of filediff --git a/client/src/locales/nl/translation.json b/client/src/locales/nl/translation.jsonindex 0df6c1385b..a1eef8bdf5 100644--- a/client/src/locales/nl/translation.json+++ b/client/src/locales/nl/translation.json@@ -7,6 +7,7 @@"com_agents_code_interpreter": "Indien ingeschakeld, kan je agent de LibreChat Code Interpreter API gebruiken om gegenereerde code, inclusief bestandsverwerking, veilig uit te voeren. Vereist een geldige API-sleutel.","com_agents_code_interpreter_title": "Code-interpreter API","com_agents_create_error": "Er is een fout opgetreden bij het aanmaken van uw agent.",+ "com_agents_instructions_placeholder": "De systeeminstructies die de agent gebruikt","com_auth_already_have_account": "Heb je al een account?","com_auth_click": "Klik","com_auth_click_here": "Klik hier",diff --git a/eslint.config.mjs b/eslint.config.mjsindex ee5368db16..6991ac3742 100644--- a/eslint.config.mjs+++ b/eslint.config.mjs@@ -270,6 +270,7 @@ export default [})),{files: ['**/*.ts', '**/*.tsx'],+ ignores: ['packages/**/*'],plugins: {'@typescript-eslint': typescriptEslintEslintPlugin,jest: fixupPluginRules(jest),@@ -283,7 +284,6 @@ export default [},},rules: {- // TODO: maybe later to error.'@typescript-eslint/no-unused-expressions': 'off','@typescript-eslint/no-unused-vars': 'off','@typescript-eslint/no-explicit-any': 'off',diff --git a/package-lock.json b/package-lock.jsonindex 397af1011d..be35f065b4 100644--- a/package-lock.json+++ b/package-lock.json@@ -59,7 +59,7 @@"@langchain/google-genai": "^0.1.7","@langchain/google-vertexai": "^0.1.8","@langchain/textsplitters": "^0.1.0",- "@librechat/agents": "^2.0.2",+ "@librechat/agents": "^2.0.3","@waylaidwanderer/fetch-event-source": "^3.0.1","axios": "^1.7.7","bcryptjs": "^2.4.3",@@ -651,518 +651,1077 @@"@langchain/core": ">=0.2.21 <0.4.0"}},- "api/node_modules/@types/node": {- "version": "18.19.14",- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz",- "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==",- "dependencies": {- "undici-types": "~5.26.4"- }- },- "api/node_modules/@types/whatwg-url": {- "version": "11.0.5",- "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz",- "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==",- "optional": true,- "peer": true,- "dependencies": {- "@types/webidl-conversions": "*"- }- },- "api/node_modules/cookie-parser": {- "version": "1.4.7",- "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz",- "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==",+ "api/node_modules/@librechat/agents": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-2.0.3.tgz",+ "integrity": "sha512-RZ7kNHYtU4udCQv0LOdtmJPX3K1bNJffeVPv4HvIeYZv347ejYh62MoZw3hLxFTbeRUocH19zRb30aEdBdu1MQ==","dependencies": {- "cookie": "0.7.2",- "cookie-signature": "1.0.6"- },- "engines": {- "node": ">= 0.8.0"- }- },- "api/node_modules/express-rate-limit": {- "version": "7.4.1",- "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.4.1.tgz",- "integrity": "sha512-KS3efpnpIDVIXopMc65EMbWbUht7qvTCdtCR2dD/IZmi9MIkopYESwyRqLgv8Pfu589+KqDqOdzJWW7AHoACeg==",- "engines": {- "node": ">= 16"- },- "funding": {- "url": "https://github.com/sponsors/express-rate-limit"+ "@aws-crypto/sha256-js": "^5.2.0",+ "@aws-sdk/credential-provider-node": "^3.613.0",+ "@aws-sdk/types": "^3.609.0",+ "@langchain/anthropic": "^0.3.12",+ "@langchain/aws": "^0.1.3",+ "@langchain/community": "^0.3.27",+ "@langchain/core": "^0.3.37",+ "@langchain/google-genai": "^0.1.7",+ "@langchain/google-vertexai": "^0.1.8",+ "@langchain/langgraph": "^0.2.41",+ "@langchain/mistralai": "^0.0.26",+ "@langchain/ollama": "^0.1.5",+ "@langchain/openai": "^0.4.2",+ "@smithy/eventstream-codec": "^2.2.0",+ "@smithy/protocol-http": "^3.0.6",+ "@smithy/signature-v4": "^2.0.10",+ "@smithy/util-utf8": "^2.0.0",+ "dotenv": "^16.4.5",+ "nanoid": "^3.3.7"},- "peerDependencies": {- "express": "4 || 5 || ^5.0.0-beta.1"- }- },- "api/node_modules/express/node_modules/cookie": {- "version": "0.7.1",- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",- "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",- "extraneous": true,"engines": {- "node": ">= 0.6"+ "node": ">=14.0.0"}},- "api/node_modules/mongodb": {- "version": "6.10.0",- "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.10.0.tgz",- "integrity": "sha512-gP9vduuYWb9ZkDM546M+MP2qKVk5ZG2wPF63OvSRuUbqCR+11ZCAE1mOfllhlAG0wcoJY5yDL/rV3OmYEwXIzg==",- "optional": true,- "peer": true,+ "api/node_modules/@librechat/agents/node_modules/@langchain/community": {+ "version": "0.3.29",+ "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.29.tgz",+ "integrity": "sha512-6XIPGctpH3KziFpdVDEvYBEQMMsNomffqy545shoxOLoMkZqgn1wfMs6R7ltzzS0p3LJUXW1RbwAUEuWp0rbuA==","dependencies": {- "@mongodb-js/saslprep": "^1.1.5",- "bson": "^6.7.0",- "mongodb-connection-string-url": "^3.0.0"+ "@langchain/openai": ">=0.2.0 <0.5.0",+ "binary-extensions": "^2.2.0",+ "expr-eval": "^2.0.2",+ "flat": "^5.0.2",+ "js-yaml": "^4.1.0",+ "langchain": ">=0.2.3 <0.3.0 || >=0.3.4 <0.4.0",+ "langsmith": ">=0.2.8 <0.4.0",+ "uuid": "^10.0.0",+ "zod": "^3.22.3",+ "zod-to-json-schema": "^3.22.5"},"engines": {- "node": ">=16.20.1"+ "node": ">=18"},"peerDependencies": {- "@aws-sdk/credential-providers": "^3.188.0",- "@mongodb-js/zstd": "^1.1.0",- "gcp-metadata": "^5.2.0",- "kerberos": "^2.0.1",- "mongodb-client-encryption": ">=6.0.0 <7",- "snappy": "^7.2.2",- "socks": "^2.7.1"+ "@arcjet/redact": "^v1.0.0-alpha.23",+ "@aws-crypto/sha256-js": "^5.0.0",+ "@aws-sdk/client-bedrock-agent-runtime": "^3.583.0",+ "@aws-sdk/client-bedrock-runtime": "^3.422.0",+ "@aws-sdk/client-dynamodb": "^3.310.0",+ "@aws-sdk/client-kendra": "^3.352.0",+ "@aws-sdk/client-lambda": "^3.310.0",+ "@aws-sdk/client-s3": "^3.310.0",+ "@aws-sdk/client-sagemaker-runtime": "^3.310.0",+ "@aws-sdk/client-sfn": "^3.310.0",+ "@aws-sdk/credential-provider-node": "^3.388.0",+ "@azure/search-documents": "^12.0.0",+ "@azure/storage-blob": "^12.15.0",+ "@browserbasehq/sdk": "*",+ "@browserbasehq/stagehand": "^1.0.0",+ "@clickhouse/client": "^0.2.5",+ "@cloudflare/ai": "*",+ "@datastax/astra-db-ts": "^1.0.0",+ "@elastic/elasticsearch": "^8.4.0",+ "@getmetal/metal-sdk": "*",+ "@getzep/zep-cloud": "^1.0.6",+ "@getzep/zep-js": "^0.9.0",+ "@gomomento/sdk": "^1.51.1",+ "@gomomento/sdk-core": "^1.51.1",+ "@google-ai/generativelanguage": "*",+ "@google-cloud/storage": "^6.10.1 || ^7.7.0",+ "@gradientai/nodejs-sdk": "^1.2.0",+ "@huggingface/inference": "^2.6.4",+ "@huggingface/transformers": "^3.2.3",+ "@ibm-cloud/watsonx-ai": "*",+ "@lancedb/lancedb": "^0.12.0",+ "@langchain/core": ">=0.2.21 <0.4.0",+ "@layerup/layerup-security": "^1.5.12",+ "@libsql/client": "^0.14.0",+ "@mendable/firecrawl-js": "^1.4.3",+ "@mlc-ai/web-llm": "*",+ "@mozilla/readability": "*",+ "@neondatabase/serverless": "*",+ "@notionhq/client": "^2.2.10",+ "@opensearch-project/opensearch": "*",+ "@pinecone-database/pinecone": "*",+ "@planetscale/database": "^1.8.0",+ "@premai/prem-sdk": "^0.3.25",+ "@qdrant/js-client-rest": "^1.8.2",+ "@raycast/api": "^1.55.2",+ "@rockset/client": "^0.9.1",+ "@smithy/eventstream-codec": "^2.0.5",+ "@smithy/protocol-http": "^3.0.6",+ "@smithy/signature-v4": "^2.0.10",+ "@smithy/util-utf8": "^2.0.0",+ "@spider-cloud/spider-client": "^0.0.21",+ "@supabase/supabase-js": "^2.45.0",+ "@tensorflow-models/universal-sentence-encoder": "*",+ "@tensorflow/tfjs-converter": "*",+ "@tensorflow/tfjs-core": "*",+ "@upstash/ratelimit": "^1.1.3 || ^2.0.3",+ "@upstash/redis": "^1.20.6",+ "@upstash/vector": "^1.1.1",+ "@vercel/kv": "*",+ "@vercel/postgres": "*",+ "@writerai/writer-sdk": "^0.40.2",+ "@xata.io/client": "^0.28.0",+ "@zilliz/milvus2-sdk-node": ">=2.3.5",+ "apify-client": "^2.7.1",+ "assemblyai": "^4.6.0",+ "better-sqlite3": ">=9.4.0 <12.0.0",+ "cassandra-driver": "^4.7.2",+ "cborg": "^4.1.1",+ "cheerio": "^1.0.0-rc.12",+ "chromadb": "*",+ "closevector-common": "0.1.3",+ "closevector-node": "0.1.6",+ "closevector-web": "0.1.6",+ "cohere-ai": "*",+ "convex": "^1.3.1",+ "crypto-js": "^4.2.0",+ "d3-dsv": "^2.0.0",+ "discord.js": "^14.14.1",+ "dria": "^0.0.3",+ "duck-duck-scrape": "^2.2.5",+ "epub2": "^3.0.1",+ "faiss-node": "^0.5.1",+ "fast-xml-parser": "*",+ "firebase-admin": "^11.9.0 || ^12.0.0",+ "google-auth-library": "*",+ "googleapis": "*",+ "hnswlib-node": "^3.0.0",+ "html-to-text": "^9.0.5",+ "ibm-cloud-sdk-core": "*",+ "ignore": "^5.2.0",+ "interface-datastore": "^8.2.11",+ "ioredis": "^5.3.2",+ "it-all": "^3.0.4",+ "jsdom": "*",+ "jsonwebtoken": "^9.0.2",+ "llmonitor": "^0.5.9",+ "lodash": "^4.17.21",+ "lunary": "^0.7.10",+ "mammoth": "^1.6.0",+ "mongodb": ">=5.2.0",+ "mysql2": "^3.9.8",+ "neo4j-driver": "*",+ "notion-to-md": "^3.1.0",+ "officeparser": "^4.0.4",+ "openai": "*",+ "pdf-parse": "1.1.1",+ "pg": "^8.11.0",+ "pg-copy-streams": "^6.0.5",+ "pickleparser": "^0.2.1",+ "playwright": "^1.32.1",+ "portkey-ai": "^0.1.11",+ "puppeteer": "*",+ "pyodide": ">=0.24.1 <0.27.0",+ "redis": "*",+ "replicate": "*",+ "sonix-speech-recognition": "^2.1.1",+ "srt-parser-2": "^1.2.3",+ "typeorm": "^0.3.20",+ "typesense": "^1.5.3",+ "usearch": "^1.1.1",+ "voy-search": "0.6.2",+ "weaviate-ts-client": "*",+ "web-auth-library": "^1.0.3",+ "word-extractor": "*",+ "ws": "^8.14.2",+ "youtubei.js": "*"},"peerDependenciesMeta": {- "@aws-sdk/credential-providers": {+ "@arcjet/redact": {"optional": true},- "@mongodb-js/zstd": {+ "@aws-crypto/sha256-js": {"optional": true},- "gcp-metadata": {+ "@aws-sdk/client-bedrock-agent-runtime": {"optional": true},- "kerberos": {+ "@aws-sdk/client-bedrock-runtime": {"optional": true},- "mongodb-client-encryption": {+ "@aws-sdk/client-dynamodb": {"optional": true},- "snappy": {+ "@aws-sdk/client-kendra": {"optional": true},- "socks": {+ "@aws-sdk/client-lambda": {"optional": true- }- }- },- "api/node_modules/mongodb-connection-string-url": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.1.tgz",- "integrity": "sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg==",- "optional": true,- "peer": true,- "dependencies": {- "@types/whatwg-url": "^11.0.2",- "whatwg-url": "^13.0.0"- }- },- "api/node_modules/mongodb-connection-string-url/node_modules/tr46": {- "version": "4.1.1",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",- "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",- "optional": true,- "peer": true,- "dependencies": {- "punycode": "^2.3.0"- },- "engines": {- "node": ">=14"- }- },- "api/node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": {- "version": "7.0.0",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",- "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",- "optional": true,- "peer": true,- "engines": {- "node": ">=12"- }- },- "api/node_modules/mongodb-connection-string-url/node_modules/whatwg-url": {- "version": "13.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz",- "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==",- "optional": true,- "peer": true,- "dependencies": {- "tr46": "^4.1.1",- "webidl-conversions": "^7.0.0"- },- "engines": {- "node": ">=16"- }- },- "api/node_modules/node-fetch": {- "version": "2.6.7",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",- "dependencies": {- "whatwg-url": "^5.0.0"- },- "engines": {- "node": "4.x || >=6.0.0"- },- "peerDependencies": {- "encoding": "^0.1.0"- },- "peerDependenciesMeta": {- "encoding": {+ },+ "@aws-sdk/client-s3": {"optional": true- }- }- },- "api/node_modules/openai": {- "version": "4.71.1",- "resolved": "https://registry.npmjs.org/openai/-/openai-4.71.1.tgz",- "integrity": "sha512-C6JNMaQ1eijM0lrjiRUL3MgThVP5RdwNAghpbJFdW0t11LzmyqON8Eh8MuUuEZ+CeD6bgYl2Fkn2BoptVxv9Ug==",- "license": "Apache-2.0",- "dependencies": {- "@types/node": "^18.11.18",- "@types/node-fetch": "^2.6.4",- "abort-controller": "^3.0.0",- "agentkeepalive": "^4.2.1",- "form-data-encoder": "1.7.2",- "formdata-node": "^4.3.2",- "node-fetch": "^2.6.7"- },- "bin": {- "openai": "bin/cli"- },- "peerDependencies": {- "zod": "^3.23.8"- },- "peerDependenciesMeta": {- "zod": {+ },+ "@aws-sdk/client-sagemaker-runtime": {"optional": true- }- }- },- "api/node_modules/tr46": {- "version": "0.0.3",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="- },- "api/node_modules/uuid": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "bin": {- "uuid": "dist/bin/uuid"- }- },- "api/node_modules/webidl-conversions": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="- },- "api/node_modules/whatwg-url": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",- "dependencies": {- "tr46": "~0.0.3",- "webidl-conversions": "^3.0.0"- }- },- "client": {- "name": "@librechat/frontend",- "version": "v0.7.6",- "license": "ISC",- "dependencies": {- "@ariakit/react": "^0.4.11",- "@codesandbox/sandpack-react": "^2.19.10",- "@dicebear/collection": "^7.0.4",- "@dicebear/core": "^7.0.4",- "@headlessui/react": "^2.1.2",- "@radix-ui/react-accordion": "^1.1.2",- "@radix-ui/react-alert-dialog": "^1.0.2",- "@radix-ui/react-checkbox": "^1.0.3",- "@radix-ui/react-collapsible": "^1.0.3",- "@radix-ui/react-dialog": "^1.0.2",- "@radix-ui/react-dropdown-menu": "^2.1.1",- "@radix-ui/react-hover-card": "^1.0.5",- "@radix-ui/react-icons": "^1.3.0",- "@radix-ui/react-label": "^2.0.0",- "@radix-ui/react-popover": "^1.0.7",- "@radix-ui/react-radio-group": "^1.1.3",- "@radix-ui/react-select": "^2.0.0",- "@radix-ui/react-separator": "^1.0.3",- "@radix-ui/react-slider": "^1.1.1",- "@radix-ui/react-switch": "^1.0.3",- "@radix-ui/react-tabs": "^1.0.3",- "@radix-ui/react-toast": "^1.1.5",- "@radix-ui/react-tooltip": "^1.0.6",- "@tanstack/react-query": "^4.28.0",- "@tanstack/react-table": "^8.11.7",- "@zattoo/use-double-click": "1.2.0",- "axios": "^1.7.7",- "class-variance-authority": "^0.6.0",- "clsx": "^1.2.1",- "copy-to-clipboard": "^3.3.3",- "cross-env": "^7.0.3",- "date-fns": "^3.3.1",- "downloadjs": "^1.4.7",- "export-from-json": "^1.7.2",- "filenamify": "^6.0.0",- "framer-motion": "^11.5.4",- "html-to-image": "^1.11.11",- "i18next": "^24.2.2",- "image-blob-reduce": "^4.1.0",- "js-cookie": "^3.0.5",- "librechat-data-provider": "*",- "lodash": "^4.17.21",- "lucide-react": "^0.394.0",- "match-sorter": "^6.3.4",- "msedge-tts": "^1.3.4",- "qrcode.react": "^4.2.0",- "rc-input-number": "^7.4.2",- "react": "^18.2.0",- "react-avatar-editor": "^13.0.2",- "react-dnd": "^16.0.1",- "react-dnd-html5-backend": "^16.0.1",- "react-dom": "^18.2.0",- "react-error-boundary": "^5.0.0",- "react-flip-toolkit": "^7.1.0",- "react-gtm-module": "^2.0.11",- "react-hook-form": "^7.43.9",- "react-i18next": "^15.4.0",- "react-lazy-load-image-component": "^1.6.0",- "react-markdown": "^9.0.1",- "react-resizable-panels": "^2.1.1",- "react-router-dom": "^6.11.2",- "react-speech-recognition": "^3.10.0",- "react-textarea-autosize": "^8.4.0",- "react-transition-group": "^4.4.5",- "react-virtualized": "^9.22.6",- "recoil": "^0.7.7",- "regenerator-runtime": "^0.14.1",- "rehype-highlight": "^6.0.0",- "rehype-katex": "^6.0.3",- "remark-directive": "^3.0.0",- "remark-gfm": "^4.0.0",- "remark-math": "^6.0.0",- "remark-supersub": "^1.0.0",- "sse.js": "^2.5.0",- "tailwind-merge": "^1.9.1",- "tailwindcss-animate": "^1.0.5",- "tailwindcss-radix": "^2.8.0",- "url": "^0.11.0",- "zod": "^3.22.4"- },- "devDependencies": {- "@babel/plugin-transform-runtime": "^7.22.15",- "@babel/preset-env": "^7.22.15",- "@babel/preset-react": "^7.22.15",- "@babel/preset-typescript": "^7.22.15",- "@tanstack/react-query-devtools": "^4.29.0",- "@testing-library/dom": "^9.3.0",- "@testing-library/jest-dom": "^5.16.5",- "@testing-library/react": "^14.0.0",- "@testing-library/user-event": "^14.4.3",- "@types/jest": "^29.5.2",- "@types/js-cookie": "^3.0.6",- "@types/node": "^20.3.0",- "@types/react": "^18.2.11",- "@types/react-dom": "^18.2.4",- "@vitejs/plugin-react": "^4.2.1",- "autoprefixer": "^10.4.13",- "babel-plugin-replace-ts-export-assignment": "^0.0.2",- "babel-plugin-root-import": "^6.6.0",- "babel-plugin-transform-import-meta": "^2.2.1",- "babel-plugin-transform-vite-meta-env": "^1.0.3",- "eslint-plugin-jest": "^28.11.0",- "identity-obj-proxy": "^3.0.0",- "jest": "^29.5.0",- "jest-canvas-mock": "^2.5.1",- "jest-environment-jsdom": "^29.5.0",- "jest-file-loader": "^1.0.3",- "jest-junit": "^16.0.0",- "postcss": "^8.4.31",- "postcss-loader": "^7.1.0",- "postcss-preset-env": "^8.2.0",- "tailwindcss": "^3.4.1",- "ts-jest": "^29.1.0",- "typescript": "^5.0.4",- "vite": "^5.4.14",- "vite-plugin-node-polyfills": "^0.17.0",- "vite-plugin-pwa": "^0.21.1"- }- },- "client/node_modules/@codesandbox/sandpack-client": {- "version": "2.19.8",- "resolved": "https://registry.npmjs.org/@codesandbox/sandpack-client/-/sandpack-client-2.19.8.tgz",- "integrity": "sha512-CMV4nr1zgKzVpx4I3FYvGRM5YT0VaQhALMW9vy4wZRhEyWAtJITQIqZzrTGWqB1JvV7V72dVEUCUPLfYz5hgJQ==",- "dependencies": {- "@codesandbox/nodebox": "0.1.8",- "buffer": "^6.0.3",- "dequal": "^2.0.2",- "mime-db": "^1.52.0",- "outvariant": "1.4.0",- "static-browser-server": "1.0.3"- }- },- "client/node_modules/@codesandbox/sandpack-react": {- "version": "2.19.10",- "resolved": "https://registry.npmjs.org/@codesandbox/sandpack-react/-/sandpack-react-2.19.10.tgz",- "integrity": "sha512-X/7NzhR7R5pp5qYS+Gc31OzJvy+EzGz++H1YN9bJlDE+VzxTBsMN9dv3adzeo5wtxUhqexVOJS7mGr//e7KP2A==",- "dependencies": {- "@codemirror/autocomplete": "^6.4.0",- "@codemirror/commands": "^6.1.3",- "@codemirror/lang-css": "^6.0.1",- "@codemirror/lang-html": "^6.4.0",- "@codemirror/lang-javascript": "^6.1.2",- "@codemirror/language": "^6.3.2",- "@codemirror/state": "^6.2.0",- "@codemirror/view": "^6.7.1",- "@codesandbox/sandpack-client": "^2.19.8",- "@lezer/highlight": "^1.1.3",- "@react-hook/intersection-observer": "^3.1.1",- "@stitches/core": "^1.2.6",- "anser": "^2.1.1",- "clean-set": "^1.1.2",- "dequal": "^2.0.2",- "escape-carriage": "^1.3.1",- "lz-string": "^1.4.4",- "react-devtools-inline": "4.4.0",- "react-is": "^17.0.2"- },- "peerDependencies": {- "react": "^16.8.0 || ^17 || ^18",- "react-dom": "^16.8.0 || ^17 || ^18"- }- },- "client/node_modules/react-is": {- "version": "17.0.2",- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="- },- "node_modules/@aashutoshrathi/word-wrap": {- "version": "1.2.6",- "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",- "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",- "dev": true,- "engines": {- "node": ">=0.10.0"+ },+ "@aws-sdk/client-sfn": {+ "optional": true+ },+ "@aws-sdk/credential-provider-node": {+ "optional": true+ },+ "@azure/search-documents": {+ "optional": true+ },+ "@azure/storage-blob": {+ "optional": true+ },+ "@browserbasehq/sdk": {+ "optional": true+ },+ "@clickhouse/client": {+ "optional": true+ },+ "@cloudflare/ai": {+ "optional": true+ },+ "@datastax/astra-db-ts": {+ "optional": true+ },+ "@elastic/elasticsearch": {+ "optional": true+ },+ "@getmetal/metal-sdk": {+ "optional": true+ },+ "@getzep/zep-cloud": {+ "optional": true+ },+ "@getzep/zep-js": {+ "optional": true+ },+ "@gomomento/sdk": {+ "optional": true+ },+ "@gomomento/sdk-core": {+ "optional": true+ },+ "@google-ai/generativelanguage": {+ "optional": true+ },+ "@google-cloud/storage": {+ "optional": true+ },+ "@gradientai/nodejs-sdk": {+ "optional": true+ },+ "@huggingface/inference": {+ "optional": true+ },+ "@huggingface/transformers": {+ "optional": true+ },+ "@lancedb/lancedb": {+ "optional": true+ },+ "@layerup/layerup-security": {+ "optional": true+ },+ "@libsql/client": {+ "optional": true+ },+ "@mendable/firecrawl-js": {+ "optional": true+ },+ "@mlc-ai/web-llm": {+ "optional": true+ },+ "@mozilla/readability": {+ "optional": true+ },+ "@neondatabase/serverless": {+ "optional": true+ },+ "@notionhq/client": {+ "optional": true+ },+ "@opensearch-project/opensearch": {+ "optional": true+ },+ "@pinecone-database/pinecone": {+ "optional": true+ },+ "@planetscale/database": {+ "optional": true+ },+ "@premai/prem-sdk": {+ "optional": true+ },+ "@qdrant/js-client-rest": {+ "optional": true+ },+ "@raycast/api": {+ "optional": true+ },+ "@rockset/client": {+ "optional": true+ },+ "@smithy/eventstream-codec": {+ "optional": true+ },+ "@smithy/protocol-http": {+ "optional": true+ },+ "@smithy/signature-v4": {+ "optional": true+ },+ "@smithy/util-utf8": {+ "optional": true+ },+ "@spider-cloud/spider-client": {+ "optional": true+ },+ "@supabase/supabase-js": {+ "optional": true+ },+ "@tensorflow-models/universal-sentence-encoder": {+ "optional": true+ },+ "@tensorflow/tfjs-converter": {+ "optional": true+ },+ "@tensorflow/tfjs-core": {+ "optional": true+ },+ "@upstash/ratelimit": {+ "optional": true+ },+ "@upstash/redis": {+ "optional": true+ },+ "@upstash/vector": {+ "optional": true+ },+ "@vercel/kv": {+ "optional": true+ },+ "@vercel/postgres": {+ "optional": true+ },+ "@writerai/writer-sdk": {+ "optional": true+ },+ "@xata.io/client": {+ "optional": true+ },+ "@zilliz/milvus2-sdk-node": {+ "optional": true+ },+ "apify-client": {+ "optional": true+ },+ "assemblyai": {+ "optional": true+ },+ "better-sqlite3": {+ "optional": true+ },+ "cassandra-driver": {+ "optional": true+ },+ "cborg": {+ "optional": true+ },+ "cheerio": {+ "optional": true+ },+ "chromadb": {+ "optional": true+ },+ "closevector-common": {+ "optional": true+ },+ "closevector-node": {+ "optional": true+ },+ "closevector-web": {+ "optional": true+ },+ "cohere-ai": {+ "optional": true+ },+ "convex": {+ "optional": true+ },+ "crypto-js": {+ "optional": true+ },+ "d3-dsv": {+ "optional": true+ },+ "discord.js": {+ "optional": true+ },+ "dria": {+ "optional": true+ },+ "duck-duck-scrape": {+ "optional": true+ },+ "epub2": {+ "optional": true+ },+ "faiss-node": {+ "optional": true+ },+ "fast-xml-parser": {+ "optional": true+ },+ "firebase-admin": {+ "optional": true+ },+ "google-auth-library": {+ "optional": true+ },+ "googleapis": {+ "optional": true+ },+ "hnswlib-node": {+ "optional": true+ },+ "html-to-text": {+ "optional": true+ },+ "ignore": {+ "optional": true+ },+ "interface-datastore": {+ "optional": true+ },+ "ioredis": {+ "optional": true+ },+ "it-all": {+ "optional": true+ },+ "jsdom": {+ "optional": true+ },+ "jsonwebtoken": {+ "optional": true+ },+ "llmonitor": {+ "optional": true+ },+ "lodash": {+ "optional": true+ },+ "lunary": {+ "optional": true+ },+ "mammoth": {+ "optional": true+ },+ "mongodb": {+ "optional": true+ },+ "mysql2": {+ "optional": true+ },+ "neo4j-driver": {+ "optional": true+ },+ "notion-to-md": {+ "optional": true+ },+ "officeparser": {+ "optional": true+ },+ "pdf-parse": {+ "optional": true+ },+ "pg": {+ "optional": true+ },+ "pg-copy-streams": {+ "optional": true+ },+ "pickleparser": {+ "optional": true+ },+ "playwright": {+ "optional": true+ },+ "portkey-ai": {+ "optional": true+ },+ "puppeteer": {+ "optional": true+ },+ "pyodide": {+ "optional": true+ },+ "redis": {+ "optional": true+ },+ "replicate": {+ "optional": true+ },+ "sonix-speech-recognition": {+ "optional": true+ },+ "srt-parser-2": {+ "optional": true+ },+ "typeorm": {+ "optional": true+ },+ "typesense": {+ "optional": true+ },+ "usearch": {+ "optional": true+ },+ "voy-search": {+ "optional": true+ },+ "weaviate-ts-client": {+ "optional": true+ },+ "web-auth-library": {+ "optional": true+ },+ "word-extractor": {+ "optional": true+ },+ "ws": {+ "optional": true+ },+ "youtubei.js": {+ "optional": true+ }}},- "node_modules/@adobe/css-tools": {- "version": "4.3.3",- "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz",- "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==",- "dev": true- },- "node_modules/@alloc/quick-lru": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",- "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",+ "api/node_modules/@librechat/agents/node_modules/@langchain/openai": {+ "version": "0.4.2",+ "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.4.2.tgz",+ "integrity": "sha512-Cuj7qbVcycALTP0aqZuPpEc7As8cwiGaU21MhXRyZFs+dnWxKYxZ1Q1z4kcx6cYkq/I+CNwwmk+sP+YruU73Aw==",+ "dependencies": {+ "js-tiktoken": "^1.0.12",+ "openai": "^4.77.0",+ "zod": "^3.22.4",+ "zod-to-json-schema": "^3.22.3"+ },"engines": {- "node": ">=10"+ "node": ">=18"},- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "peerDependencies": {+ "@langchain/core": ">=0.3.29 <0.4.0"}},- "node_modules/@ampproject/remapping": {- "version": "2.2.1",- "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",- "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",+ "api/node_modules/@types/node": {+ "version": "18.19.14",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz",+ "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==","dependencies": {- "@jridgewell/gen-mapping": "^0.3.0",- "@jridgewell/trace-mapping": "^0.3.9"- },- "engines": {- "node": ">=6.0.0"+ "undici-types": "~5.26.4"}},- "node_modules/@anthropic-ai/sdk": {- "version": "0.32.1",- "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.32.1.tgz",- "integrity": "sha512-U9JwTrDvdQ9iWuABVsMLj8nJVwAyQz6QXvgLsVhryhCEPkLsbcP/MXxm+jYcAwLoV8ESbaTTjnD4kuAFa+Hyjg==",- "license": "MIT",+ "api/node_modules/@types/whatwg-url": {+ "version": "11.0.5",+ "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz",+ "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==",+ "optional": true,+ "peer": true,"dependencies": {- "@types/node": "^18.11.18",- "@types/node-fetch": "^2.6.4",- "abort-controller": "^3.0.0",- "agentkeepalive": "^4.2.1",- "form-data-encoder": "1.7.2",- "formdata-node": "^4.3.2",- "node-fetch": "^2.6.7"+ "@types/webidl-conversions": "*"}},- "node_modules/@anthropic-ai/sdk/node_modules/@types/node": {- "version": "18.19.68",- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.68.tgz",- "integrity": "sha512-QGtpFH1vB99ZmTa63K4/FU8twThj4fuVSBkGddTp7uIL/cuoLWIUSL2RcOaigBhfR+hg5pgGkBnkoOxrTVBMKw==",- "license": "MIT",+ "api/node_modules/cookie-parser": {+ "version": "1.4.7",+ "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz",+ "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==","dependencies": {- "undici-types": "~5.26.4"+ "cookie": "0.7.2",+ "cookie-signature": "1.0.6"+ },+ "engines": {+ "node": ">= 0.8.0"}},- "node_modules/@ariakit/core": {- "version": "0.4.10",- "resolved": "https://registry.npmjs.org/@ariakit/core/-/core-0.4.10.tgz",- "integrity": "sha512-mX3EabQbfVh5uTjsTJ3+gjj7KGdTNhIN0qZHJd5Z2iPUnKl9NBy23Lgu6PEskpVsKAZ3proirjguD7U9fKMs/A==",- "license": "MIT"- },- "node_modules/@ariakit/react": {- "version": "0.4.11",- "resolved": "https://registry.npmjs.org/@ariakit/react/-/react-0.4.11.tgz",- "integrity": "sha512-nLpPrmNcspqNhk4o+epsgeZfP1+Fkh4uIzNe5yrFkXolRkqHGKAxl4Hi82e0yxIBUbYbZIEwsZQQVceF1L6xrw==",- "license": "MIT",- "dependencies": {- "@ariakit/react-core": "0.4.11"+ "api/node_modules/express-rate-limit": {+ "version": "7.4.1",+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.4.1.tgz",+ "integrity": "sha512-KS3efpnpIDVIXopMc65EMbWbUht7qvTCdtCR2dD/IZmi9MIkopYESwyRqLgv8Pfu589+KqDqOdzJWW7AHoACeg==",+ "engines": {+ "node": ">= 16"},"funding": {- "type": "opencollective",- "url": "https://opencollective.com/ariakit"+ "url": "https://github.com/sponsors/express-rate-limit"},"peerDependencies": {- "react": "^17.0.0 || ^18.0.0 || ^19.0.0",- "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"+ "express": "4 || 5 || ^5.0.0-beta.1"}},- "node_modules/@ariakit/react-core": {- "version": "0.4.11",- "resolved": "https://registry.npmjs.org/@ariakit/react-core/-/react-core-0.4.11.tgz",- "integrity": "sha512-i6KedWhjZkNC7tMEKO0eNjjq2HRPiHyGaBS2x2VaWwzBepoYtjyvxRXyqLJ3gaiNdlwckN1TZsRDfD+viy13IQ==",- "license": "MIT",- "dependencies": {- "@ariakit/core": "0.4.10",- "@floating-ui/dom": "^1.0.0",- "use-sync-external-store": "^1.2.0"- },- "peerDependencies": {- "react": "^17.0.0 || ^18.0.0 || ^19.0.0",- "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"+ "api/node_modules/express/node_modules/cookie": {+ "version": "0.7.1",+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",+ "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",+ "extraneous": true,+ "engines": {+ "node": ">= 0.6"}},- "node_modules/@aws-crypto/crc32": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz",- "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==",+ "api/node_modules/mongodb": {+ "version": "6.10.0",+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.10.0.tgz",+ "integrity": "sha512-gP9vduuYWb9ZkDM546M+MP2qKVk5ZG2wPF63OvSRuUbqCR+11ZCAE1mOfllhlAG0wcoJY5yDL/rV3OmYEwXIzg==",+ "optional": true,+ "peer": true,"dependencies": {- "@aws-crypto/util": "^3.0.0",- "@aws-sdk/types": "^3.222.0",- "tslib": "^1.11.1"- }- },- "node_modules/@aws-crypto/crc32/node_modules/tslib": {- "version": "1.14.1",- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="- },- "node_modules/@aws-crypto/sha256-browser": {+ "@mongodb-js/saslprep": "^1.1.5",+ "bson": "^6.7.0",+ "mongodb-connection-string-url": "^3.0.0"+ },+ "engines": {+ "node": ">=16.20.1"+ },+ "peerDependencies": {+ "@aws-sdk/credential-providers": "^3.188.0",+ "@mongodb-js/zstd": "^1.1.0",+ "gcp-metadata": "^5.2.0",+ "kerberos": "^2.0.1",+ "mongodb-client-encryption": ">=6.0.0 <7",+ "snappy": "^7.2.2",+ "socks": "^2.7.1"+ },+ "peerDependenciesMeta": {+ "@aws-sdk/credential-providers": {+ "optional": true+ },+ "@mongodb-js/zstd": {+ "optional": true+ },+ "gcp-metadata": {+ "optional": true+ },+ "kerberos": {+ "optional": true+ },+ "mongodb-client-encryption": {+ "optional": true+ },+ "snappy": {+ "optional": true+ },+ "socks": {+ "optional": true+ }+ }+ },+ "api/node_modules/mongodb-connection-string-url": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.1.tgz",+ "integrity": "sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg==",+ "optional": true,+ "peer": true,+ "dependencies": {+ "@types/whatwg-url": "^11.0.2",+ "whatwg-url": "^13.0.0"+ }+ },+ "api/node_modules/mongodb-connection-string-url/node_modules/tr46": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",+ "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",+ "optional": true,+ "peer": true,+ "dependencies": {+ "punycode": "^2.3.0"+ },+ "engines": {+ "node": ">=14"+ }+ },+ "api/node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",+ "optional": true,+ "peer": true,+ "engines": {+ "node": ">=12"+ }+ },+ "api/node_modules/mongodb-connection-string-url/node_modules/whatwg-url": {+ "version": "13.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz",+ "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==",+ "optional": true,+ "peer": true,+ "dependencies": {+ "tr46": "^4.1.1",+ "webidl-conversions": "^7.0.0"+ },+ "engines": {+ "node": ">=16"+ }+ },+ "api/node_modules/node-fetch": {+ "version": "2.6.7",+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",+ "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",+ "dependencies": {+ "whatwg-url": "^5.0.0"+ },+ "engines": {+ "node": "4.x || >=6.0.0"+ },+ "peerDependencies": {+ "encoding": "^0.1.0"+ },+ "peerDependenciesMeta": {+ "encoding": {+ "optional": true+ }+ }+ },+ "api/node_modules/openai": {+ "version": "4.71.1",+ "resolved": "https://registry.npmjs.org/openai/-/openai-4.71.1.tgz",+ "integrity": "sha512-C6JNMaQ1eijM0lrjiRUL3MgThVP5RdwNAghpbJFdW0t11LzmyqON8Eh8MuUuEZ+CeD6bgYl2Fkn2BoptVxv9Ug==",+ "license": "Apache-2.0",+ "dependencies": {+ "@types/node": "^18.11.18",+ "@types/node-fetch": "^2.6.4",+ "abort-controller": "^3.0.0",+ "agentkeepalive": "^4.2.1",+ "form-data-encoder": "1.7.2",+ "formdata-node": "^4.3.2",+ "node-fetch": "^2.6.7"+ },+ "bin": {+ "openai": "bin/cli"+ },+ "peerDependencies": {+ "zod": "^3.23.8"+ },+ "peerDependenciesMeta": {+ "zod": {+ "optional": true+ }+ }+ },+ "api/node_modules/tr46": {+ "version": "0.0.3",+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="+ },+ "api/node_modules/uuid": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },+ "api/node_modules/webidl-conversions": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="+ },+ "api/node_modules/whatwg-url": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",+ "dependencies": {+ "tr46": "~0.0.3",+ "webidl-conversions": "^3.0.0"+ }+ },+ "client": {+ "name": "@librechat/frontend",+ "version": "v0.7.6",+ "license": "ISC",+ "dependencies": {+ "@ariakit/react": "^0.4.11",+ "@codesandbox/sandpack-react": "^2.19.10",+ "@dicebear/collection": "^7.0.4",+ "@dicebear/core": "^7.0.4",+ "@headlessui/react": "^2.1.2",+ "@radix-ui/react-accordion": "^1.1.2",+ "@radix-ui/react-alert-dialog": "^1.0.2",+ "@radix-ui/react-checkbox": "^1.0.3",+ "@radix-ui/react-collapsible": "^1.0.3",+ "@radix-ui/react-dialog": "^1.0.2",+ "@radix-ui/react-dropdown-menu": "^2.1.1",+ "@radix-ui/react-hover-card": "^1.0.5",+ "@radix-ui/react-icons": "^1.3.0",+ "@radix-ui/react-label": "^2.0.0",+ "@radix-ui/react-popover": "^1.0.7",+ "@radix-ui/react-radio-group": "^1.1.3",+ "@radix-ui/react-select": "^2.0.0",+ "@radix-ui/react-separator": "^1.0.3",+ "@radix-ui/react-slider": "^1.1.1",+ "@radix-ui/react-switch": "^1.0.3",+ "@radix-ui/react-tabs": "^1.0.3",+ "@radix-ui/react-toast": "^1.1.5",+ "@radix-ui/react-tooltip": "^1.0.6",+ "@tanstack/react-query": "^4.28.0",+ "@tanstack/react-table": "^8.11.7",+ "@zattoo/use-double-click": "1.2.0",+ "axios": "^1.7.7",+ "class-variance-authority": "^0.6.0",+ "clsx": "^1.2.1",+ "copy-to-clipboard": "^3.3.3",+ "cross-env": "^7.0.3",+ "date-fns": "^3.3.1",+ "downloadjs": "^1.4.7",+ "export-from-json": "^1.7.2",+ "filenamify": "^6.0.0",+ "framer-motion": "^11.5.4",+ "html-to-image": "^1.11.11",+ "i18next": "^24.2.2",+ "image-blob-reduce": "^4.1.0",+ "js-cookie": "^3.0.5",+ "librechat-data-provider": "*",+ "lodash": "^4.17.21",+ "lucide-react": "^0.394.0",+ "match-sorter": "^6.3.4",+ "msedge-tts": "^1.3.4",+ "qrcode.react": "^4.2.0",+ "rc-input-number": "^7.4.2",+ "react": "^18.2.0",+ "react-avatar-editor": "^13.0.2",+ "react-dnd": "^16.0.1",+ "react-dnd-html5-backend": "^16.0.1",+ "react-dom": "^18.2.0",+ "react-error-boundary": "^5.0.0",+ "react-flip-toolkit": "^7.1.0",+ "react-gtm-module": "^2.0.11",+ "react-hook-form": "^7.43.9",+ "react-i18next": "^15.4.0",+ "react-lazy-load-image-component": "^1.6.0",+ "react-markdown": "^9.0.1",+ "react-resizable-panels": "^2.1.1",+ "react-router-dom": "^6.11.2",+ "react-speech-recognition": "^3.10.0",+ "react-textarea-autosize": "^8.4.0",+ "react-transition-group": "^4.4.5",+ "react-virtualized": "^9.22.6",+ "recoil": "^0.7.7",+ "regenerator-runtime": "^0.14.1",+ "rehype-highlight": "^6.0.0",+ "rehype-katex": "^6.0.3",+ "remark-directive": "^3.0.0",+ "remark-gfm": "^4.0.0",+ "remark-math": "^6.0.0",+ "remark-supersub": "^1.0.0",+ "sse.js": "^2.5.0",+ "tailwind-merge": "^1.9.1",+ "tailwindcss-animate": "^1.0.5",+ "tailwindcss-radix": "^2.8.0",+ "url": "^0.11.0",+ "zod": "^3.22.4"+ },+ "devDependencies": {+ "@babel/plugin-transform-runtime": "^7.22.15",+ "@babel/preset-env": "^7.22.15",+ "@babel/preset-react": "^7.22.15",+ "@babel/preset-typescript": "^7.22.15",+ "@tanstack/react-query-devtools": "^4.29.0",+ "@testing-library/dom": "^9.3.0",+ "@testing-library/jest-dom": "^5.16.5",+ "@testing-library/react": "^14.0.0",+ "@testing-library/user-event": "^14.4.3",+ "@types/jest": "^29.5.2",+ "@types/js-cookie": "^3.0.6",+ "@types/node": "^20.3.0",+ "@types/react": "^18.2.11",+ "@types/react-dom": "^18.2.4",+ "@vitejs/plugin-react": "^4.2.1",+ "autoprefixer": "^10.4.13",+ "babel-plugin-replace-ts-export-assignment": "^0.0.2",+ "babel-plugin-root-import": "^6.6.0",+ "babel-plugin-transform-import-meta": "^2.2.1",+ "babel-plugin-transform-vite-meta-env": "^1.0.3",+ "eslint-plugin-jest": "^28.11.0",+ "identity-obj-proxy": "^3.0.0",+ "jest": "^29.5.0",+ "jest-canvas-mock": "^2.5.1",+ "jest-environment-jsdom": "^29.5.0",+ "jest-file-loader": "^1.0.3",+ "jest-junit": "^16.0.0",+ "postcss": "^8.4.31",+ "postcss-loader": "^7.1.0",+ "postcss-preset-env": "^8.2.0",+ "tailwindcss": "^3.4.1",+ "ts-jest": "^29.1.0",+ "typescript": "^5.0.4",+ "vite": "^5.4.14",+ "vite-plugin-node-polyfills": "^0.17.0",+ "vite-plugin-pwa": "^0.21.1"+ }+ },+ "client/node_modules/@codesandbox/sandpack-client": {+ "version": "2.19.8",+ "resolved": "https://registry.npmjs.org/@codesandbox/sandpack-client/-/sandpack-client-2.19.8.tgz",+ "integrity": "sha512-CMV4nr1zgKzVpx4I3FYvGRM5YT0VaQhALMW9vy4wZRhEyWAtJITQIqZzrTGWqB1JvV7V72dVEUCUPLfYz5hgJQ==",+ "dependencies": {+ "@codesandbox/nodebox": "0.1.8",+ "buffer": "^6.0.3",+ "dequal": "^2.0.2",+ "mime-db": "^1.52.0",+ "outvariant": "1.4.0",+ "static-browser-server": "1.0.3"+ }+ },+ "client/node_modules/@codesandbox/sandpack-react": {+ "version": "2.19.10",+ "resolved": "https://registry.npmjs.org/@codesandbox/sandpack-react/-/sandpack-react-2.19.10.tgz",+ "integrity": "sha512-X/7NzhR7R5pp5qYS+Gc31OzJvy+EzGz++H1YN9bJlDE+VzxTBsMN9dv3adzeo5wtxUhqexVOJS7mGr//e7KP2A==",+ "dependencies": {+ "@codemirror/autocomplete": "^6.4.0",+ "@codemirror/commands": "^6.1.3",+ "@codemirror/lang-css": "^6.0.1",+ "@codemirror/lang-html": "^6.4.0",+ "@codemirror/lang-javascript": "^6.1.2",+ "@codemirror/language": "^6.3.2",+ "@codemirror/state": "^6.2.0",+ "@codemirror/view": "^6.7.1",+ "@codesandbox/sandpack-client": "^2.19.8",+ "@lezer/highlight": "^1.1.3",+ "@react-hook/intersection-observer": "^3.1.1",+ "@stitches/core": "^1.2.6",+ "anser": "^2.1.1",+ "clean-set": "^1.1.2",+ "dequal": "^2.0.2",+ "escape-carriage": "^1.3.1",+ "lz-string": "^1.4.4",+ "react-devtools-inline": "4.4.0",+ "react-is": "^17.0.2"+ },+ "peerDependencies": {+ "react": "^16.8.0 || ^17 || ^18",+ "react-dom": "^16.8.0 || ^17 || ^18"+ }+ },+ "client/node_modules/react-is": {+ "version": "17.0.2",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="+ },+ "node_modules/@aashutoshrathi/word-wrap": {+ "version": "1.2.6",+ "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",+ "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",+ "dev": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/@adobe/css-tools": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz",+ "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==",+ "dev": true+ },+ "node_modules/@alloc/quick-lru": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",+ "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@ampproject/remapping": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",+ "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",+ "dependencies": {+ "@jridgewell/gen-mapping": "^0.3.0",+ "@jridgewell/trace-mapping": "^0.3.9"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@anthropic-ai/sdk": {+ "version": "0.32.1",+ "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.32.1.tgz",+ "integrity": "sha512-U9JwTrDvdQ9iWuABVsMLj8nJVwAyQz6QXvgLsVhryhCEPkLsbcP/MXxm+jYcAwLoV8ESbaTTjnD4kuAFa+Hyjg==",+ "license": "MIT",+ "dependencies": {+ "@types/node": "^18.11.18",+ "@types/node-fetch": "^2.6.4",+ "abort-controller": "^3.0.0",+ "agentkeepalive": "^4.2.1",+ "form-data-encoder": "1.7.2",+ "formdata-node": "^4.3.2",+ "node-fetch": "^2.6.7"+ }+ },+ "node_modules/@anthropic-ai/sdk/node_modules/@types/node": {+ "version": "18.19.68",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.68.tgz",+ "integrity": "sha512-QGtpFH1vB99ZmTa63K4/FU8twThj4fuVSBkGddTp7uIL/cuoLWIUSL2RcOaigBhfR+hg5pgGkBnkoOxrTVBMKw==",+ "license": "MIT",+ "dependencies": {+ "undici-types": "~5.26.4"+ }+ },+ "node_modules/@ariakit/core": {+ "version": "0.4.10",+ "resolved": "https://registry.npmjs.org/@ariakit/core/-/core-0.4.10.tgz",+ "integrity": "sha512-mX3EabQbfVh5uTjsTJ3+gjj7KGdTNhIN0qZHJd5Z2iPUnKl9NBy23Lgu6PEskpVsKAZ3proirjguD7U9fKMs/A==",+ "license": "MIT"+ },+ "node_modules/@ariakit/react": {+ "version": "0.4.11",+ "resolved": "https://registry.npmjs.org/@ariakit/react/-/react-0.4.11.tgz",+ "integrity": "sha512-nLpPrmNcspqNhk4o+epsgeZfP1+Fkh4uIzNe5yrFkXolRkqHGKAxl4Hi82e0yxIBUbYbZIEwsZQQVceF1L6xrw==",+ "license": "MIT",+ "dependencies": {+ "@ariakit/react-core": "0.4.11"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/ariakit"+ },+ "peerDependencies": {+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0",+ "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"+ }+ },+ "node_modules/@ariakit/react-core": {+ "version": "0.4.11",+ "resolved": "https://registry.npmjs.org/@ariakit/react-core/-/react-core-0.4.11.tgz",+ "integrity": "sha512-i6KedWhjZkNC7tMEKO0eNjjq2HRPiHyGaBS2x2VaWwzBepoYtjyvxRXyqLJ3gaiNdlwckN1TZsRDfD+viy13IQ==",+ "license": "MIT",+ "dependencies": {+ "@ariakit/core": "0.4.10",+ "@floating-ui/dom": "^1.0.0",+ "use-sync-external-store": "^1.2.0"+ },+ "peerDependencies": {+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0",+ "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"+ }+ },+ "node_modules/@aws-crypto/crc32": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz",+ "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==",+ "dependencies": {+ "@aws-crypto/util": "^3.0.0",+ "@aws-sdk/types": "^3.222.0",+ "tslib": "^1.11.1"+ }+ },+ "node_modules/@aws-crypto/crc32/node_modules/tslib": {+ "version": "1.14.1",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="+ },+ "node_modules/@aws-crypto/sha256-browser": {"version": "5.2.0","resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz","integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==",@@ -8575,1771 +9134,785 @@"resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz","integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==","dev": true,- "license": "Apache-2.0",- "dependencies": {- "@humanfs/core": "^0.19.1",- "@humanwhocodes/retry": "^0.3.0"- },- "engines": {- "node": ">=18.18.0"- }- },- "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": {- "version": "0.3.1",- "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz",- "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==",- "dev": true,- "license": "Apache-2.0",- "engines": {- "node": ">=18.18"- },- "funding": {- "type": "github",- "url": "https://github.com/sponsors/nzakas"- }- },- "node_modules/@humanwhocodes/config-array": {- "version": "0.13.0",- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",- "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",- "deprecated": "Use @eslint/config-array instead",- "dev": true,- "license": "Apache-2.0",- "dependencies": {- "@humanwhocodes/object-schema": "^2.0.3",- "debug": "^4.3.1",- "minimatch": "^3.0.5"- },- "engines": {- "node": ">=10.10.0"- }- },- "node_modules/@humanwhocodes/module-importer": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",- "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",- "dev": true,- "engines": {- "node": ">=12.22"- },- "funding": {- "type": "github",- "url": "https://github.com/sponsors/nzakas"- }- },- "node_modules/@humanwhocodes/object-schema": {- "version": "2.0.3",- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",- "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",- "deprecated": "Use @eslint/object-schema instead",- "dev": true,- "license": "BSD-3-Clause"- },- "node_modules/@humanwhocodes/retry": {- "version": "0.4.1",- "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz",- "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==",- "dev": true,- "license": "Apache-2.0",- "engines": {- "node": ">=18.18"- },- "funding": {- "type": "github",- "url": "https://github.com/sponsors/nzakas"- }- },- "node_modules/@ibm-cloud/watsonx-ai": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/@ibm-cloud/watsonx-ai/-/watsonx-ai-1.1.2.tgz",- "integrity": "sha512-0+ClK12jk1Jk28Hwc2BDmKkTXPjFkQOfCKzUk82TsoPwAIEVN+rlM1cny52d3oSMXXbeKorVDmnIEbXPseHiQA==",- "license": "Apache-2.0",- "peer": true,- "dependencies": {- "@types/node": "^18.0.0",- "extend": "3.0.2",- "ibm-cloud-sdk-core": "^5.0.2"- },- "engines": {- "node": ">=18.0.0"- }- },- "node_modules/@ibm-cloud/watsonx-ai/node_modules/@types/node": {- "version": "18.19.64",- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.64.tgz",- "integrity": "sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "undici-types": "~5.26.4"- }- },- "node_modules/@ioredis/commands": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz",- "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg=="- },- "node_modules/@isaacs/cliui": {- "version": "8.0.2",- "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",- "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",- "dependencies": {- "string-width": "^5.1.2",- "string-width-cjs": "npm:string-width@^4.2.0",- "strip-ansi": "^7.0.1",- "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",- "wrap-ansi": "^8.1.0",- "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"- },- "engines": {- "node": ">=12"- }- },- "node_modules/@isaacs/cliui/node_modules/ansi-regex": {- "version": "6.0.1",- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/chalk/ansi-regex?sponsor=1"- }- },- "node_modules/@isaacs/cliui/node_modules/strip-ansi": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",- "dependencies": {- "ansi-regex": "^6.0.1"- },- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/chalk/strip-ansi?sponsor=1"- }- },- "node_modules/@istanbuljs/load-nyc-config": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",- "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",- "dev": true,- "dependencies": {- "camelcase": "^5.3.1",- "find-up": "^4.1.0",- "get-package-type": "^0.1.0",- "js-yaml": "^3.13.1",- "resolve-from": "^5.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": {- "version": "1.0.10",- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",- "dev": true,- "dependencies": {- "sprintf-js": "~1.0.2"- }- },- "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": {- "version": "5.3.1",- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",- "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",- "dev": true,- "engines": {- "node": ">=6"- }- },- "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",- "dev": true,- "dependencies": {- "locate-path": "^5.0.0",- "path-exists": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": {- "version": "3.14.1",- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",- "dev": true,- "dependencies": {- "argparse": "^1.0.7",- "esprima": "^4.0.0"- },- "bin": {- "js-yaml": "bin/js-yaml.js"- }- },- "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",- "dev": true,- "dependencies": {- "p-locate": "^4.1.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",- "dev": true,- "dependencies": {- "p-try": "^2.0.0"- },- "engines": {- "node": ">=6"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",- "dev": true,- "dependencies": {- "p-limit": "^2.2.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",- "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",- "dev": true,- "engines": {- "node": ">=8"- }- },- "node_modules/@istanbuljs/schema": {- "version": "0.1.3",- "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",- "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",- "dev": true,- "engines": {- "node": ">=8"- }- },- "node_modules/@jest/console": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz",- "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==",- "dev": true,- "dependencies": {- "@jest/types": "^29.6.3",- "@types/node": "*",- "chalk": "^4.0.0",- "jest-message-util": "^29.7.0",- "jest-util": "^29.7.0",- "slash": "^3.0.0"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/console/node_modules/slash": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",- "dev": true,- "engines": {- "node": ">=8"- }- },- "node_modules/@jest/core": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz",- "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==",- "dev": true,- "dependencies": {- "@jest/console": "^29.7.0",- "@jest/reporters": "^29.7.0",- "@jest/test-result": "^29.7.0",- "@jest/transform": "^29.7.0",- "@jest/types": "^29.6.3",- "@types/node": "*",- "ansi-escapes": "^4.2.1",- "chalk": "^4.0.0",- "ci-info": "^3.2.0",- "exit": "^0.1.2",- "graceful-fs": "^4.2.9",- "jest-changed-files": "^29.7.0",- "jest-config": "^29.7.0",- "jest-haste-map": "^29.7.0",- "jest-message-util": "^29.7.0",- "jest-regex-util": "^29.6.3",- "jest-resolve": "^29.7.0",- "jest-resolve-dependencies": "^29.7.0",- "jest-runner": "^29.7.0",- "jest-runtime": "^29.7.0",- "jest-snapshot": "^29.7.0",- "jest-util": "^29.7.0",- "jest-validate": "^29.7.0",- "jest-watcher": "^29.7.0",- "micromatch": "^4.0.4",- "pretty-format": "^29.7.0",- "slash": "^3.0.0",- "strip-ansi": "^6.0.0"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- },- "peerDependencies": {- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"- },- "peerDependenciesMeta": {- "node-notifier": {- "optional": true- }- }- },- "node_modules/@jest/core/node_modules/slash": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",- "dev": true,- "engines": {- "node": ">=8"- }- },- "node_modules/@jest/environment": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz",- "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==",- "dev": true,- "dependencies": {- "@jest/fake-timers": "^29.7.0",- "@jest/types": "^29.6.3",- "@types/node": "*",- "jest-mock": "^29.7.0"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/expect": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz",- "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==",- "dev": true,- "dependencies": {- "expect": "^29.7.0",- "jest-snapshot": "^29.7.0"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/expect-utils": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz",- "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==",- "dev": true,- "dependencies": {- "jest-get-type": "^29.6.3"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/fake-timers": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz",- "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==",- "dev": true,- "dependencies": {- "@jest/types": "^29.6.3",- "@sinonjs/fake-timers": "^10.0.2",- "@types/node": "*",- "jest-message-util": "^29.7.0",- "jest-mock": "^29.7.0",- "jest-util": "^29.7.0"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/globals": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz",- "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==",- "dev": true,- "dependencies": {- "@jest/environment": "^29.7.0",- "@jest/expect": "^29.7.0",- "@jest/types": "^29.6.3",- "jest-mock": "^29.7.0"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/reporters": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz",- "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==",- "dev": true,- "dependencies": {- "@bcoe/v8-coverage": "^0.2.3",- "@jest/console": "^29.7.0",- "@jest/test-result": "^29.7.0",- "@jest/transform": "^29.7.0",- "@jest/types": "^29.6.3",- "@jridgewell/trace-mapping": "^0.3.18",- "@types/node": "*",- "chalk": "^4.0.0",- "collect-v8-coverage": "^1.0.0",- "exit": "^0.1.2",- "glob": "^7.1.3",- "graceful-fs": "^4.2.9",- "istanbul-lib-coverage": "^3.0.0",- "istanbul-lib-instrument": "^6.0.0",- "istanbul-lib-report": "^3.0.0",- "istanbul-lib-source-maps": "^4.0.0",- "istanbul-reports": "^3.1.3",- "jest-message-util": "^29.7.0",- "jest-util": "^29.7.0",- "jest-worker": "^29.7.0",- "slash": "^3.0.0",- "string-length": "^4.0.1",- "strip-ansi": "^6.0.0",- "v8-to-istanbul": "^9.0.1"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- },- "peerDependencies": {- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"- },- "peerDependenciesMeta": {- "node-notifier": {- "optional": true- }- }- },- "node_modules/@jest/reporters/node_modules/glob": {- "version": "7.2.3",- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",- "dev": true,- "dependencies": {- "fs.realpath": "^1.0.0",- "inflight": "^1.0.4",- "inherits": "2",- "minimatch": "^3.1.1",- "once": "^1.3.0",- "path-is-absolute": "^1.0.0"- },- "engines": {- "node": "*"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },- "node_modules/@jest/reporters/node_modules/slash": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",- "dev": true,- "engines": {- "node": ">=8"- }- },- "node_modules/@jest/schemas": {- "version": "29.6.3",- "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",- "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",- "dev": true,- "dependencies": {- "@sinclair/typebox": "^0.27.8"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/source-map": {- "version": "29.6.3",- "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz",- "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==",- "dev": true,- "dependencies": {- "@jridgewell/trace-mapping": "^0.3.18",- "callsites": "^3.0.0",- "graceful-fs": "^4.2.9"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/test-result": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz",- "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==",- "dev": true,- "dependencies": {- "@jest/console": "^29.7.0",- "@jest/types": "^29.6.3",- "@types/istanbul-lib-coverage": "^2.0.0",- "collect-v8-coverage": "^1.0.0"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/test-sequencer": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz",- "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==",- "dev": true,- "dependencies": {- "@jest/test-result": "^29.7.0",- "graceful-fs": "^4.2.9",- "jest-haste-map": "^29.7.0",- "slash": "^3.0.0"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/test-sequencer/node_modules/slash": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",- "dev": true,- "engines": {- "node": ">=8"- }- },- "node_modules/@jest/transform": {- "version": "29.7.0",- "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz",- "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==",- "dev": true,- "dependencies": {- "@babel/core": "^7.11.6",- "@jest/types": "^29.6.3",- "@jridgewell/trace-mapping": "^0.3.18",- "babel-plugin-istanbul": "^6.1.1",- "chalk": "^4.0.0",- "convert-source-map": "^2.0.0",- "fast-json-stable-stringify": "^2.1.0",- "graceful-fs": "^4.2.9",- "jest-haste-map": "^29.7.0",- "jest-regex-util": "^29.6.3",- "jest-util": "^29.7.0",- "micromatch": "^4.0.4",- "pirates": "^4.0.4",- "slash": "^3.0.0",- "write-file-atomic": "^4.0.2"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jest/transform/node_modules/slash": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",- "dev": true,- "engines": {- "node": ">=8"- }- },- "node_modules/@jest/types": {- "version": "29.6.3",- "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",- "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==",- "dev": true,- "dependencies": {- "@jest/schemas": "^29.6.3",- "@types/istanbul-lib-coverage": "^2.0.0",- "@types/istanbul-reports": "^3.0.0",- "@types/node": "*",- "@types/yargs": "^17.0.8",- "chalk": "^4.0.0"- },- "engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"- }- },- "node_modules/@jridgewell/gen-mapping": {- "version": "0.3.5",- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",- "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",- "dependencies": {- "@jridgewell/set-array": "^1.2.1",- "@jridgewell/sourcemap-codec": "^1.4.10",- "@jridgewell/trace-mapping": "^0.3.24"- },- "engines": {- "node": ">=6.0.0"- }- },- "node_modules/@jridgewell/resolve-uri": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",- "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",- "engines": {- "node": ">=6.0.0"- }- },- "node_modules/@jridgewell/set-array": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",- "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",- "engines": {- "node": ">=6.0.0"- }- },- "node_modules/@jridgewell/source-map": {- "version": "0.3.5",- "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz",- "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",- "dev": true,- "dependencies": {- "@jridgewell/gen-mapping": "^0.3.0",- "@jridgewell/trace-mapping": "^0.3.9"- }- },- "node_modules/@jridgewell/sourcemap-codec": {- "version": "1.4.15",- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",- "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="- },- "node_modules/@jridgewell/trace-mapping": {- "version": "0.3.25",- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",- "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",- "dependencies": {- "@jridgewell/resolve-uri": "^3.1.0",- "@jridgewell/sourcemap-codec": "^1.4.14"- }- },- "node_modules/@keyv/mongo": {- "version": "2.2.8",- "resolved": "https://registry.npmjs.org/@keyv/mongo/-/mongo-2.2.8.tgz",- "integrity": "sha512-2y8RXQDzCUzvhkzjH0bj4+Ur9Ce+x9PjNrV6KnGGpRocexFKVgOYexIegnEc/DBy6HhNyqUlgWOpuFfnhpmF+A==",- "dependencies": {- "mongodb": "^4.5.0",- "pify": "^5.0.0"- }- },- "node_modules/@keyv/mongo/node_modules/bson": {- "version": "4.7.2",- "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz",- "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==",- "dependencies": {- "buffer": "^5.6.0"- },- "engines": {- "node": ">=6.9.0"- }- },- "node_modules/@keyv/mongo/node_modules/buffer": {- "version": "5.7.1",- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/feross"- },- {- "type": "patreon",- "url": "https://www.patreon.com/feross"- },- {- "type": "consulting",- "url": "https://feross.org/support"- }- ],- "dependencies": {- "base64-js": "^1.3.1",- "ieee754": "^1.1.13"- }- },- "node_modules/@keyv/mongo/node_modules/mongodb": {- "version": "4.17.2",- "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.2.tgz",- "integrity": "sha512-mLV7SEiov2LHleRJPMPrK2PMyhXFZt2UQLC4VD4pnth3jMjYKHhtqfwwkkvS/NXuo/Fp3vbhaNcXrIDaLRb9Tg==",- "dependencies": {- "bson": "^4.7.2",- "mongodb-connection-string-url": "^2.6.0",- "socks": "^2.7.1"- },- "engines": {- "node": ">=12.9.0"- },- "optionalDependencies": {- "@aws-sdk/credential-providers": "^3.186.0",- "@mongodb-js/saslprep": "^1.1.0"- }- },- "node_modules/@keyv/redis": {- "version": "2.8.4",- "resolved": "https://registry.npmjs.org/@keyv/redis/-/redis-2.8.4.tgz",- "integrity": "sha512-osO4C+i+Gi844wHjvXuHwhl+sDx3289Of309ZlLcj6SJReTLmPXzNiVR81N88wOu5aC+lVFdmx9FUQkkjdbPRQ==",- "dependencies": {- "ioredis": "^5.3.2"- },- "engines": {- "node": ">= 14"- }- },- "node_modules/@langchain/anthropic": {- "version": "0.3.12",- "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.12.tgz",- "integrity": "sha512-vYANJVeus+v8wieTST5GUGlennY87NMIjaFx6JCJN8MMtf2KVwyBWQAUAPyGwzVQ40tru3w0rK2ruvzYBRcWEg==",- "dependencies": {- "@anthropic-ai/sdk": "^0.32.1",- "fast-xml-parser": "^4.4.1",- "zod": "^3.22.4",- "zod-to-json-schema": "^3.22.4"- },- "engines": {- "node": ">=18"- },- "peerDependencies": {- "@langchain/core": ">=0.2.21 <0.4.0"- }- },- "node_modules/@langchain/aws": {- "version": "0.1.3",- "resolved": "https://registry.npmjs.org/@langchain/aws/-/aws-0.1.3.tgz",- "integrity": "sha512-OjS6V/virzRvOX1D2xgTyyHkYzdepjes77dU2bBS53jt4mp0DT8vzgclZQ/16DA20YgNFtMKYiFbOfMI+RTHyg==",- "dependencies": {- "@aws-sdk/client-bedrock-agent-runtime": "^3.616.0",- "@aws-sdk/client-bedrock-runtime": "^3.602.0",- "@aws-sdk/client-kendra": "^3.352.0",- "@aws-sdk/credential-provider-node": "^3.600.0",- "zod": "^3.23.8",- "zod-to-json-schema": "^3.22.5"- },- "engines": {- "node": ">=18"- },- "peerDependencies": {- "@langchain/core": ">=0.2.21 <0.4.0"- }- },- "node_modules/@langchain/community": {- "version": "0.3.15",- "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.15.tgz",- "integrity": "sha512-yG4cv33u7zYar14yqZCI7o2KjwRb+9S7upVzEmVVETimpicm9UjpkMfX4qa4A4IslM1TtC4uy2Ymu9EcINZSpQ==",- "optional": true,- "peer": true,- "dependencies": {- "@langchain/openai": ">=0.2.0 <0.4.0",- "binary-extensions": "^2.2.0",- "expr-eval": "^2.0.2",- "flat": "^5.0.2",- "js-yaml": "^4.1.0",- "langchain": ">=0.2.3 <0.3.0 || >=0.3.4 <0.4.0",- "langsmith": "^0.2.0",- "uuid": "^10.0.0",- "zod": "^3.22.3",- "zod-to-json-schema": "^3.22.5"- },- "engines": {- "node": ">=18"- },- "peerDependencies": {- "@arcjet/redact": "^v1.0.0-alpha.23",- "@aws-crypto/sha256-js": "^5.0.0",- "@aws-sdk/client-bedrock-agent-runtime": "^3.583.0",- "@aws-sdk/client-bedrock-runtime": "^3.422.0",- "@aws-sdk/client-dynamodb": "^3.310.0",- "@aws-sdk/client-kendra": "^3.352.0",- "@aws-sdk/client-lambda": "^3.310.0",- "@aws-sdk/client-s3": "^3.310.0",- "@aws-sdk/client-sagemaker-runtime": "^3.310.0",- "@aws-sdk/client-sfn": "^3.310.0",- "@aws-sdk/credential-provider-node": "^3.388.0",- "@azure/search-documents": "^12.0.0",- "@azure/storage-blob": "^12.15.0",- "@browserbasehq/sdk": "*",- "@clickhouse/client": "^0.2.5",- "@cloudflare/ai": "*",- "@datastax/astra-db-ts": "^1.0.0",- "@elastic/elasticsearch": "^8.4.0",- "@getmetal/metal-sdk": "*",- "@getzep/zep-cloud": "^1.0.6",- "@getzep/zep-js": "^0.9.0",- "@gomomento/sdk": "^1.51.1",- "@gomomento/sdk-core": "^1.51.1",- "@google-ai/generativelanguage": "*",- "@google-cloud/storage": "^6.10.1 || ^7.7.0",- "@gradientai/nodejs-sdk": "^1.2.0",- "@huggingface/inference": "^2.6.4",- "@ibm-cloud/watsonx-ai": "*",- "@lancedb/lancedb": "^0.12.0",- "@langchain/core": ">=0.2.21 <0.4.0",- "@layerup/layerup-security": "^1.5.12",- "@libsql/client": "^0.14.0",- "@mendable/firecrawl-js": "^1.4.3",- "@mlc-ai/web-llm": "*",- "@mozilla/readability": "*",- "@neondatabase/serverless": "*",- "@notionhq/client": "^2.2.10",- "@opensearch-project/opensearch": "*",- "@pinecone-database/pinecone": "*",- "@planetscale/database": "^1.8.0",- "@premai/prem-sdk": "^0.3.25",- "@qdrant/js-client-rest": "^1.8.2",- "@raycast/api": "^1.55.2",- "@rockset/client": "^0.9.1",- "@smithy/eventstream-codec": "^2.0.5",- "@smithy/protocol-http": "^3.0.6",- "@smithy/signature-v4": "^2.0.10",- "@smithy/util-utf8": "^2.0.0",- "@spider-cloud/spider-client": "^0.0.21",- "@supabase/supabase-js": "^2.45.0",- "@tensorflow-models/universal-sentence-encoder": "*",- "@tensorflow/tfjs-converter": "*",- "@tensorflow/tfjs-core": "*",- "@upstash/ratelimit": "^1.1.3 || ^2.0.3",- "@upstash/redis": "^1.20.6",- "@upstash/vector": "^1.1.1",- "@vercel/kv": "^0.2.3",- "@vercel/postgres": "^0.5.0",- "@writerai/writer-sdk": "^0.40.2",- "@xata.io/client": "^0.28.0",- "@xenova/transformers": "^2.17.2",- "@zilliz/milvus2-sdk-node": ">=2.3.5",- "apify-client": "^2.7.1",- "assemblyai": "^4.6.0",- "better-sqlite3": ">=9.4.0 <12.0.0",- "cassandra-driver": "^4.7.2",- "cborg": "^4.1.1",- "cheerio": "^1.0.0-rc.12",- "chromadb": "*",- "closevector-common": "0.1.3",- "closevector-node": "0.1.6",- "closevector-web": "0.1.6",- "cohere-ai": "*",- "convex": "^1.3.1",- "crypto-js": "^4.2.0",- "d3-dsv": "^2.0.0",- "discord.js": "^14.14.1",- "dria": "^0.0.3",- "duck-duck-scrape": "^2.2.5",- "epub2": "^3.0.1",- "faiss-node": "^0.5.1",- "firebase-admin": "^11.9.0 || ^12.0.0",- "google-auth-library": "*",- "googleapis": "*",- "hnswlib-node": "^3.0.0",- "html-to-text": "^9.0.5",- "ibm-cloud-sdk-core": "*",- "ignore": "^5.2.0",- "interface-datastore": "^8.2.11",- "ioredis": "^5.3.2",- "it-all": "^3.0.4",- "jsdom": "*",- "jsonwebtoken": "^9.0.2",- "llmonitor": "^0.5.9",- "lodash": "^4.17.21",- "lunary": "^0.7.10",- "mammoth": "^1.6.0",- "mongodb": ">=5.2.0",- "mysql2": "^3.9.8",- "neo4j-driver": "*",- "notion-to-md": "^3.1.0",- "officeparser": "^4.0.4",- "pdf-parse": "1.1.1",- "pg": "^8.11.0",- "pg-copy-streams": "^6.0.5",- "pickleparser": "^0.2.1",- "playwright": "^1.32.1",- "portkey-ai": "^0.1.11",- "puppeteer": "*",- "pyodide": ">=0.24.1 <0.27.0",- "redis": "*",- "replicate": "^0.29.4",- "sonix-speech-recognition": "^2.1.1",- "srt-parser-2": "^1.2.3",- "typeorm": "^0.3.20",- "typesense": "^1.5.3",- "usearch": "^1.1.1",- "voy-search": "0.6.2",- "weaviate-ts-client": "*",- "web-auth-library": "^1.0.3",- "ws": "^8.14.2",- "youtube-transcript": "^1.0.6",- "youtubei.js": "^9.1.0"- },- "peerDependenciesMeta": {- "@arcjet/redact": {- "optional": true- },- "@aws-crypto/sha256-js": {- "optional": true- },- "@aws-sdk/client-bedrock-agent-runtime": {- "optional": true- },- "@aws-sdk/client-bedrock-runtime": {- "optional": true- },- "@aws-sdk/client-dynamodb": {- "optional": true- },- "@aws-sdk/client-kendra": {- "optional": true- },- "@aws-sdk/client-lambda": {- "optional": true- },- "@aws-sdk/client-s3": {- "optional": true- },- "@aws-sdk/client-sagemaker-runtime": {- "optional": true- },- "@aws-sdk/client-sfn": {- "optional": true- },- "@aws-sdk/credential-provider-node": {- "optional": true- },- "@azure/search-documents": {- "optional": true- },- "@azure/storage-blob": {- "optional": true- },- "@browserbasehq/sdk": {- "optional": true- },- "@clickhouse/client": {- "optional": true- },- "@cloudflare/ai": {- "optional": true- },- "@datastax/astra-db-ts": {- "optional": true- },- "@elastic/elasticsearch": {- "optional": true- },- "@getmetal/metal-sdk": {- "optional": true- },- "@getzep/zep-cloud": {- "optional": true- },- "@getzep/zep-js": {- "optional": true- },- "@gomomento/sdk": {- "optional": true- },- "@gomomento/sdk-core": {- "optional": true- },- "@google-ai/generativelanguage": {- "optional": true- },- "@google-cloud/storage": {- "optional": true- },- "@gradientai/nodejs-sdk": {- "optional": true- },- "@huggingface/inference": {- "optional": true- },- "@lancedb/lancedb": {- "optional": true- },- "@layerup/layerup-security": {- "optional": true- },- "@libsql/client": {- "optional": true- },- "@mendable/firecrawl-js": {- "optional": true- },- "@mlc-ai/web-llm": {- "optional": true- },- "@mozilla/readability": {- "optional": true- },- "@neondatabase/serverless": {- "optional": true- },- "@notionhq/client": {- "optional": true- },- "@opensearch-project/opensearch": {- "optional": true- },- "@pinecone-database/pinecone": {- "optional": true- },- "@planetscale/database": {- "optional": true- },- "@premai/prem-sdk": {- "optional": true- },- "@qdrant/js-client-rest": {- "optional": true- },- "@raycast/api": {- "optional": true- },- "@rockset/client": {- "optional": true- },- "@smithy/eventstream-codec": {- "optional": true- },- "@smithy/protocol-http": {- "optional": true- },- "@smithy/signature-v4": {- "optional": true- },- "@smithy/util-utf8": {- "optional": true- },- "@spider-cloud/spider-client": {- "optional": true- },- "@supabase/supabase-js": {- "optional": true- },- "@tensorflow-models/universal-sentence-encoder": {- "optional": true- },- "@tensorflow/tfjs-converter": {- "optional": true- },- "@tensorflow/tfjs-core": {- "optional": true- },- "@upstash/ratelimit": {- "optional": true- },- "@upstash/redis": {- "optional": true- },- "@upstash/vector": {- "optional": true- },- "@vercel/kv": {- "optional": true- },- "@vercel/postgres": {- "optional": true- },- "@writerai/writer-sdk": {- "optional": true- },- "@xata.io/client": {- "optional": true- },- "@xenova/transformers": {- "optional": true- },- "@zilliz/milvus2-sdk-node": {- "optional": true- },- "apify-client": {- "optional": true- },- "assemblyai": {- "optional": true- },- "better-sqlite3": {- "optional": true- },- "cassandra-driver": {- "optional": true- },- "cborg": {- "optional": true- },- "cheerio": {- "optional": true- },- "chromadb": {- "optional": true- },- "closevector-common": {- "optional": true- },- "closevector-node": {- "optional": true- },- "closevector-web": {- "optional": true- },- "cohere-ai": {- "optional": true- },- "convex": {- "optional": true- },- "crypto-js": {- "optional": true- },- "d3-dsv": {- "optional": true- },- "discord.js": {- "optional": true- },- "dria": {- "optional": true- },- "duck-duck-scrape": {- "optional": true- },- "epub2": {- "optional": true- },- "faiss-node": {- "optional": true- },- "firebase-admin": {- "optional": true- },- "google-auth-library": {- "optional": true- },- "googleapis": {- "optional": true- },- "hnswlib-node": {- "optional": true- },- "html-to-text": {- "optional": true- },- "ignore": {- "optional": true- },- "interface-datastore": {- "optional": true- },- "ioredis": {- "optional": true- },- "it-all": {- "optional": true- },- "jsdom": {- "optional": true- },- "jsonwebtoken": {- "optional": true- },- "llmonitor": {- "optional": true- },- "lodash": {- "optional": true- },- "lunary": {- "optional": true- },- "mammoth": {- "optional": true- },- "mongodb": {- "optional": true- },- "mysql2": {- "optional": true- },- "neo4j-driver": {- "optional": true- },- "notion-to-md": {- "optional": true- },- "officeparser": {- "optional": true- },- "pdf-parse": {- "optional": true- },- "pg": {- "optional": true- },- "pg-copy-streams": {- "optional": true- },- "pickleparser": {- "optional": true- },- "playwright": {- "optional": true- },- "portkey-ai": {- "optional": true- },- "puppeteer": {- "optional": true- },- "pyodide": {- "optional": true- },- "redis": {- "optional": true- },- "replicate": {- "optional": true- },- "sonix-speech-recognition": {- "optional": true- },- "srt-parser-2": {- "optional": true- },- "typeorm": {- "optional": true- },- "typesense": {- "optional": true- },- "usearch": {- "optional": true- },- "voy-search": {- "optional": true- },- "weaviate-ts-client": {- "optional": true- },- "web-auth-library": {- "optional": true- },- "ws": {- "optional": true- },- "youtube-transcript": {- "optional": true- },- "youtubei.js": {- "optional": true- }+ "license": "Apache-2.0",+ "dependencies": {+ "@humanfs/core": "^0.19.1",+ "@humanwhocodes/retry": "^0.3.0"+ },+ "engines": {+ "node": ">=18.18.0"}},- "node_modules/@langchain/community/node_modules/uuid": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "optional": true,- "peer": true,- "bin": {- "uuid": "dist/bin/uuid"+ "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": {+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz",+ "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.18"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/nzakas"}},- "node_modules/@langchain/core": {- "version": "0.3.37",- "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.37.tgz",- "integrity": "sha512-LFk9GqHxcyCFx0oXvCBP7vDZIOUHYzzNU7JR+2ofIMnfkBLzcCKzBLySQDfPtd13PrpGHkaeOeLq8H1Tqi9lSw==",+ "node_modules/@humanwhocodes/config-array": {+ "version": "0.13.0",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",+ "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",+ "deprecated": "Use @eslint/config-array instead",+ "dev": true,+ "license": "Apache-2.0","dependencies": {- "@cfworker/json-schema": "^4.0.2",- "ansi-styles": "^5.0.0",- "camelcase": "6",- "decamelize": "1.2.0",- "js-tiktoken": "^1.0.12",- "langsmith": ">=0.2.8 <0.4.0",- "mustache": "^4.2.0",- "p-queue": "^6.6.2",- "p-retry": "4",- "uuid": "^10.0.0",- "zod": "^3.22.4",- "zod-to-json-schema": "^3.22.3"+ "@humanwhocodes/object-schema": "^2.0.3",+ "debug": "^4.3.1",+ "minimatch": "^3.0.5"},"engines": {- "node": ">=18"+ "node": ">=10.10.0"}},- "node_modules/@langchain/core/node_modules/ansi-styles": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",+ "node_modules/@humanwhocodes/module-importer": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",+ "dev": true,"engines": {- "node": ">=10"+ "node": ">=12.22"},"funding": {- "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ "type": "github",+ "url": "https://github.com/sponsors/nzakas"}},- "node_modules/@langchain/core/node_modules/uuid": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],+ "node_modules/@humanwhocodes/object-schema": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",+ "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",+ "deprecated": "Use @eslint/object-schema instead",+ "dev": true,+ "license": "BSD-3-Clause"+ },+ "node_modules/@humanwhocodes/retry": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz",+ "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.18"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/nzakas"+ }+ },+ "node_modules/@ibm-cloud/watsonx-ai": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@ibm-cloud/watsonx-ai/-/watsonx-ai-1.1.2.tgz",+ "integrity": "sha512-0+ClK12jk1Jk28Hwc2BDmKkTXPjFkQOfCKzUk82TsoPwAIEVN+rlM1cny52d3oSMXXbeKorVDmnIEbXPseHiQA==",+ "license": "Apache-2.0",+ "peer": true,+ "dependencies": {+ "@types/node": "^18.0.0",+ "extend": "3.0.2",+ "ibm-cloud-sdk-core": "^5.0.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@ibm-cloud/watsonx-ai/node_modules/@types/node": {+ "version": "18.19.64",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.64.tgz",+ "integrity": "sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ==","license": "MIT",- "bin": {- "uuid": "dist/bin/uuid"+ "peer": true,+ "dependencies": {+ "undici-types": "~5.26.4"}},- "node_modules/@langchain/google-common": {- "version": "0.1.8",- "resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.1.8.tgz",- "integrity": "sha512-8auqWw2PMPhcHQHS+nMN3tVZrUPgSLckUaFeOHDOeSBiDvBd4KCybPwyl2oCwMDGvmyIxvOOckkMdeGaJ92vpQ==",+ "node_modules/@ioredis/commands": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz",+ "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg=="+ },+ "node_modules/@isaacs/cliui": {+ "version": "8.0.2",+ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",+ "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==","dependencies": {- "uuid": "^10.0.0",- "zod-to-json-schema": "^3.22.4"+ "string-width": "^5.1.2",+ "string-width-cjs": "npm:string-width@^4.2.0",+ "strip-ansi": "^7.0.1",+ "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",+ "wrap-ansi": "^8.1.0",+ "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"},"engines": {- "node": ">=18"+ "node": ">=12"+ }+ },+ "node_modules/@isaacs/cliui/node_modules/ansi-regex": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",+ "engines": {+ "node": ">=12"},- "peerDependencies": {- "@langchain/core": ">=0.2.21 <0.4.0"+ "funding": {+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"}},- "node_modules/@langchain/google-common/node_modules/uuid": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],+ "node_modules/@isaacs/cliui/node_modules/strip-ansi": {+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",+ "dependencies": {+ "ansi-regex": "^6.0.1"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"+ }+ },+ "node_modules/@istanbuljs/load-nyc-config": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",+ "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",+ "dev": true,+ "dependencies": {+ "camelcase": "^5.3.1",+ "find-up": "^4.1.0",+ "get-package-type": "^0.1.0",+ "js-yaml": "^3.13.1",+ "resolve-from": "^5.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": {+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",+ "dev": true,+ "dependencies": {+ "sprintf-js": "~1.0.2"+ }+ },+ "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": {+ "version": "5.3.1",+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",+ "dev": true,+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",+ "dev": true,+ "dependencies": {+ "locate-path": "^5.0.0",+ "path-exists": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": {+ "version": "3.14.1",+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",+ "dev": true,+ "dependencies": {+ "argparse": "^1.0.7",+ "esprima": "^4.0.0"+ },"bin": {- "uuid": "dist/bin/uuid"+ "js-yaml": "bin/js-yaml.js"}},- "node_modules/@langchain/google-gauth": {- "version": "0.1.8",- "resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.1.8.tgz",- "integrity": "sha512-2QK7d5SQMrnSv7X4j05BGfO74hiA8FJuNwSsQKZvzlGoVnNXil3x2aqD5V+zsYOPpxhkDCpNlmh2Pue2Wzy1rQ==",+ "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",+ "dev": true,"dependencies": {- "@langchain/google-common": "~0.1.8",- "google-auth-library": "^8.9.0"+ "p-locate": "^4.1.0"},"engines": {- "node": ">=18"+ "node": ">=8"+ }+ },+ "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",+ "dev": true,+ "dependencies": {+ "p-try": "^2.0.0"},- "peerDependencies": {- "@langchain/core": ">=0.2.21 <0.4.0"+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/@langchain/google-genai": {- "version": "0.1.7",- "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.1.7.tgz",- "integrity": "sha512-m0cg2VKxxySFfiIFfoMEt22sM4DifmV7AYUN3/DBG8AABG1qLMpNTXUA+b9DGbRD21JFCQpny8Z8eFKRSZFHzA==",+ "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",+ "dev": true,"dependencies": {- "@google/generative-ai": "^0.21.0",- "zod-to-json-schema": "^3.22.4"+ "p-limit": "^2.2.0"},"engines": {- "node": ">=18"+ "node": ">=8"+ }+ },+ "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/@istanbuljs/schema": {+ "version": "0.1.3",+ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",+ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/@jest/console": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz",+ "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==",+ "dev": true,+ "dependencies": {+ "@jest/types": "^29.6.3",+ "@types/node": "*",+ "chalk": "^4.0.0",+ "jest-message-util": "^29.7.0",+ "jest-util": "^29.7.0",+ "slash": "^3.0.0"},- "peerDependencies": {- "@langchain/core": ">=0.3.17 <0.4.0"+ "engines": {+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},- "node_modules/@langchain/google-vertexai": {- "version": "0.1.8",- "resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.1.8.tgz",- "integrity": "sha512-n06ohihopz38agOm7BTASHMmFLz+XAZlzEvqtPC4Qa1fhYhzETQg2gCzEapIJ1yVk5MhrWqwKnVOQ+tIsFE88Q==",+ "node_modules/@jest/console/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/@jest/core": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz",+ "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==",+ "dev": true,"dependencies": {- "@langchain/google-gauth": "~0.1.8"+ "@jest/console": "^29.7.0",+ "@jest/reporters": "^29.7.0",+ "@jest/test-result": "^29.7.0",+ "@jest/transform": "^29.7.0",+ "@jest/types": "^29.6.3",+ "@types/node": "*",+ "ansi-escapes": "^4.2.1",+ "chalk": "^4.0.0",+ "ci-info": "^3.2.0",+ "exit": "^0.1.2",+ "graceful-fs": "^4.2.9",+ "jest-changed-files": "^29.7.0",+ "jest-config": "^29.7.0",+ "jest-haste-map": "^29.7.0",+ "jest-message-util": "^29.7.0",+ "jest-regex-util": "^29.6.3",+ "jest-resolve": "^29.7.0",+ "jest-resolve-dependencies": "^29.7.0",+ "jest-runner": "^29.7.0",+ "jest-runtime": "^29.7.0",+ "jest-snapshot": "^29.7.0",+ "jest-util": "^29.7.0",+ "jest-validate": "^29.7.0",+ "jest-watcher": "^29.7.0",+ "micromatch": "^4.0.4",+ "pretty-format": "^29.7.0",+ "slash": "^3.0.0",+ "strip-ansi": "^6.0.0"},"engines": {- "node": ">=18"+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"},"peerDependencies": {- "@langchain/core": ">=0.2.21 <0.4.0"+ "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"+ },+ "peerDependenciesMeta": {+ "node-notifier": {+ "optional": true+ }}},- "node_modules/@langchain/langgraph": {- "version": "0.2.44",- "resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.2.44.tgz",- "integrity": "sha512-CR9LB7sytdx0Ink56qVUPorDo5gW5m7iOU2ypu1OYA4l5aIrT4xGvHCwrGH9RE80pb/d0FglVUkEgEfuvSDbmw==",+ "node_modules/@jest/core/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/@jest/environment": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz",+ "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==",+ "dev": true,"dependencies": {- "@langchain/langgraph-checkpoint": "~0.0.15",- "@langchain/langgraph-sdk": "~0.0.32",- "uuid": "^10.0.0",- "zod": "^3.23.8"+ "@jest/fake-timers": "^29.7.0",+ "@jest/types": "^29.6.3",+ "@types/node": "*",+ "jest-mock": "^29.7.0"},"engines": {- "node": ">=18"+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"+ }+ },+ "node_modules/@jest/expect": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz",+ "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==",+ "dev": true,+ "dependencies": {+ "expect": "^29.7.0",+ "jest-snapshot": "^29.7.0"+ },+ "engines": {+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"+ }+ },+ "node_modules/@jest/expect-utils": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz",+ "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==",+ "dev": true,+ "dependencies": {+ "jest-get-type": "^29.6.3"+ },+ "engines": {+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"+ }+ },+ "node_modules/@jest/fake-timers": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz",+ "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==",+ "dev": true,+ "dependencies": {+ "@jest/types": "^29.6.3",+ "@sinonjs/fake-timers": "^10.0.2",+ "@types/node": "*",+ "jest-message-util": "^29.7.0",+ "jest-mock": "^29.7.0",+ "jest-util": "^29.7.0"+ },+ "engines": {+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"+ }+ },+ "node_modules/@jest/globals": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz",+ "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==",+ "dev": true,+ "dependencies": {+ "@jest/environment": "^29.7.0",+ "@jest/expect": "^29.7.0",+ "@jest/types": "^29.6.3",+ "jest-mock": "^29.7.0"+ },+ "engines": {+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"+ }+ },+ "node_modules/@jest/reporters": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz",+ "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==",+ "dev": true,+ "dependencies": {+ "@bcoe/v8-coverage": "^0.2.3",+ "@jest/console": "^29.7.0",+ "@jest/test-result": "^29.7.0",+ "@jest/transform": "^29.7.0",+ "@jest/types": "^29.6.3",+ "@jridgewell/trace-mapping": "^0.3.18",+ "@types/node": "*",+ "chalk": "^4.0.0",+ "collect-v8-coverage": "^1.0.0",+ "exit": "^0.1.2",+ "glob": "^7.1.3",+ "graceful-fs": "^4.2.9",+ "istanbul-lib-coverage": "^3.0.0",+ "istanbul-lib-instrument": "^6.0.0",+ "istanbul-lib-report": "^3.0.0",+ "istanbul-lib-source-maps": "^4.0.0",+ "istanbul-reports": "^3.1.3",+ "jest-message-util": "^29.7.0",+ "jest-util": "^29.7.0",+ "jest-worker": "^29.7.0",+ "slash": "^3.0.0",+ "string-length": "^4.0.1",+ "strip-ansi": "^6.0.0",+ "v8-to-istanbul": "^9.0.1"+ },+ "engines": {+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"},"peerDependencies": {- "@langchain/core": ">=0.2.36 <0.3.0 || >=0.3.9 < 0.4.0"+ "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"+ },+ "peerDependenciesMeta": {+ "node-notifier": {+ "optional": true+ }}},- "node_modules/@langchain/langgraph-checkpoint": {- "version": "0.0.15",- "resolved": "https://registry.npmjs.org/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-0.0.15.tgz",- "integrity": "sha512-AiJkvsYHqNbCh1Tx823qs2lf2qRqeB4EAMejirOk8gkpPszAGYua5c3niKYkcKR2tU8Snhrmj7Gm9HKZSFOXyw==",+ "node_modules/@jest/reporters/node_modules/glob": {+ "version": "7.2.3",+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",+ "dev": true,"dependencies": {- "uuid": "^10.0.0"+ "fs.realpath": "^1.0.0",+ "inflight": "^1.0.4",+ "inherits": "2",+ "minimatch": "^3.1.1",+ "once": "^1.3.0",+ "path-is-absolute": "^1.0.0"},"engines": {- "node": ">=18"+ "node": "*"},- "peerDependencies": {- "@langchain/core": ">=0.2.31 <0.4.0"- }- },- "node_modules/@langchain/langgraph-checkpoint/node_modules/uuid": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "bin": {- "uuid": "dist/bin/uuid"- }- },- "node_modules/@langchain/langgraph-sdk": {- "version": "0.0.36",- "resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.36.tgz",- "integrity": "sha512-KkAZM0uXBaMcD/dpGTBppOhbvNX6gz+Y1zFAC898OblegFkSvICrkd0oRQ5Ro/GWK/NAoDymnMUDXeZDdUkSuw==",- "dependencies": {- "@types/json-schema": "^7.0.15",- "p-queue": "^6.6.2",- "p-retry": "4",- "uuid": "^9.0.0"+ "funding": {+ "url": "https://github.com/sponsors/isaacs"}},- "node_modules/@langchain/langgraph/node_modules/uuid": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "bin": {- "uuid": "dist/bin/uuid"+ "node_modules/@jest/reporters/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"}},- "node_modules/@langchain/mistralai": {- "version": "0.0.26",- "resolved": "https://registry.npmjs.org/@langchain/mistralai/-/mistralai-0.0.26.tgz",- "integrity": "sha512-NoXmOTrkHjfCcgWQprbPujCvFktJFPcFTAcJEc4jY0J+PRiwWfhe4Xx2MevWTSV9clWm2Pil454nJ1CYEvh3Ng==",+ "node_modules/@jest/schemas": {+ "version": "29.6.3",+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",+ "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",+ "dev": true,"dependencies": {- "@langchain/core": ">=0.2.16 <0.3.0",- "@mistralai/mistralai": "^0.4.0",- "uuid": "^10.0.0",- "zod": "^3.22.4",- "zod-to-json-schema": "^3.22.4"+ "@sinclair/typebox": "^0.27.8"},"engines": {- "node": ">=18"+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},- "node_modules/@langchain/mistralai/node_modules/@langchain/core": {- "version": "0.2.34",- "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.34.tgz",- "integrity": "sha512-Hkveq1UcOjUj1DVn5erbqElyRj1t04NORSuSIZAJCtPO7EDkIqomjAarJ5+I5NUpQeIONgbOdnY9TkJ6cKUSVA==",+ "node_modules/@jest/source-map": {+ "version": "29.6.3",+ "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz",+ "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==",+ "dev": true,"dependencies": {- "ansi-styles": "^5.0.0",- "camelcase": "6",- "decamelize": "1.2.0",- "js-tiktoken": "^1.0.12",- "langsmith": "^0.1.56-rc.1",- "mustache": "^4.2.0",- "p-queue": "^6.6.2",- "p-retry": "4",- "uuid": "^10.0.0",- "zod": "^3.22.4",- "zod-to-json-schema": "^3.22.3"+ "@jridgewell/trace-mapping": "^0.3.18",+ "callsites": "^3.0.0",+ "graceful-fs": "^4.2.9"},"engines": {- "node": ">=18"+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},- "node_modules/@langchain/mistralai/node_modules/ansi-styles": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",- "engines": {- "node": ">=10"+ "node_modules/@jest/test-result": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz",+ "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==",+ "dev": true,+ "dependencies": {+ "@jest/console": "^29.7.0",+ "@jest/types": "^29.6.3",+ "@types/istanbul-lib-coverage": "^2.0.0",+ "collect-v8-coverage": "^1.0.0"},- "funding": {- "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ "engines": {+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},- "node_modules/@langchain/mistralai/node_modules/langsmith": {- "version": "0.1.61",- "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.61.tgz",- "integrity": "sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==",+ "node_modules/@jest/test-sequencer": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz",+ "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==",+ "dev": true,"dependencies": {- "@types/uuid": "^10.0.0",- "commander": "^10.0.1",- "p-queue": "^6.6.2",- "p-retry": "4",- "semver": "^7.6.3",- "uuid": "^10.0.0"- },- "peerDependencies": {- "openai": "*"+ "@jest/test-result": "^29.7.0",+ "graceful-fs": "^4.2.9",+ "jest-haste-map": "^29.7.0",+ "slash": "^3.0.0"},- "peerDependenciesMeta": {- "openai": {- "optional": true- }+ "engines": {+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},- "node_modules/@langchain/mistralai/node_modules/uuid": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "bin": {- "uuid": "dist/bin/uuid"+ "node_modules/@jest/test-sequencer/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"}},- "node_modules/@langchain/ollama": {- "version": "0.1.5",- "resolved": "https://registry.npmjs.org/@langchain/ollama/-/ollama-0.1.5.tgz",- "integrity": "sha512-S2tF94uIJtXavekKg10LvTV+jIelOIrubaCnje8BopfiNOVcnzsSulUL4JH0wvdxMZq0vbE4/i9RwC2q9ivOmA==",+ "node_modules/@jest/transform": {+ "version": "29.7.0",+ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz",+ "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==",+ "dev": true,"dependencies": {- "ollama": "^0.5.9",- "uuid": "^10.0.0"+ "@babel/core": "^7.11.6",+ "@jest/types": "^29.6.3",+ "@jridgewell/trace-mapping": "^0.3.18",+ "babel-plugin-istanbul": "^6.1.1",+ "chalk": "^4.0.0",+ "convert-source-map": "^2.0.0",+ "fast-json-stable-stringify": "^2.1.0",+ "graceful-fs": "^4.2.9",+ "jest-haste-map": "^29.7.0",+ "jest-regex-util": "^29.6.3",+ "jest-util": "^29.7.0",+ "micromatch": "^4.0.4",+ "pirates": "^4.0.4",+ "slash": "^3.0.0",+ "write-file-atomic": "^4.0.2"},"engines": {- "node": ">=18"- },- "peerDependencies": {- "@langchain/core": ">=0.2.21 <0.4.0"+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},- "node_modules/@langchain/ollama/node_modules/uuid": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "license": "MIT",- "bin": {- "uuid": "dist/bin/uuid"+ "node_modules/@jest/transform/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"}},- "node_modules/@langchain/openai": {- "version": "0.3.14",- "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.3.14.tgz",- "integrity": "sha512-lNWjUo1tbvsss45IF7UQtMu1NJ6oUKvhgPYWXnX9f/d6OmuLu7D99HQ3Y88vLcUo9XjjOy417olYHignMduMjA==",+ "node_modules/@jest/types": {+ "version": "29.6.3",+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",+ "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==",+ "dev": true,"dependencies": {- "js-tiktoken": "^1.0.12",- "openai": "^4.71.0",- "zod": "^3.22.4",- "zod-to-json-schema": "^3.22.3"+ "@jest/schemas": "^29.6.3",+ "@types/istanbul-lib-coverage": "^2.0.0",+ "@types/istanbul-reports": "^3.0.0",+ "@types/node": "*",+ "@types/yargs": "^17.0.8",+ "chalk": "^4.0.0"},"engines": {- "node": ">=18"- },- "peerDependencies": {- "@langchain/core": ">=0.2.26 <0.4.0"+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},- "node_modules/@langchain/textsplitters": {- "version": "0.0.3",- "resolved": "https://registry.npmjs.org/@langchain/textsplitters/-/textsplitters-0.0.3.tgz",- "integrity": "sha512-cXWgKE3sdWLSqAa8ykbCcUsUF1Kyr5J3HOWYGuobhPEycXW4WI++d5DhzdpL238mzoEXTi90VqfSCra37l5YqA==",+ "node_modules/@jridgewell/gen-mapping": {+ "version": "0.3.5",+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",+ "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==","dependencies": {- "@langchain/core": ">0.2.0 <0.3.0",- "js-tiktoken": "^1.0.12"+ "@jridgewell/set-array": "^1.2.1",+ "@jridgewell/sourcemap-codec": "^1.4.10",+ "@jridgewell/trace-mapping": "^0.3.24"},"engines": {- "node": ">=18"+ "node": ">=6.0.0"}},- "node_modules/@langchain/textsplitters/node_modules/@langchain/core": {- "version": "0.2.34",- "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.34.tgz",- "integrity": "sha512-Hkveq1UcOjUj1DVn5erbqElyRj1t04NORSuSIZAJCtPO7EDkIqomjAarJ5+I5NUpQeIONgbOdnY9TkJ6cKUSVA==",- "dependencies": {- "ansi-styles": "^5.0.0",- "camelcase": "6",- "decamelize": "1.2.0",- "js-tiktoken": "^1.0.12",- "langsmith": "^0.1.56-rc.1",- "mustache": "^4.2.0",- "p-queue": "^6.6.2",- "p-retry": "4",- "uuid": "^10.0.0",- "zod": "^3.22.4",- "zod-to-json-schema": "^3.22.3"- },+ "node_modules/@jridgewell/resolve-uri": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",+ "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==","engines": {- "node": ">=18"+ "node": ">=6.0.0"}},- "node_modules/@langchain/textsplitters/node_modules/ansi-styles": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",+ "node_modules/@jridgewell/set-array": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",+ "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==","engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ "node": ">=6.0.0"}},- "node_modules/@langchain/textsplitters/node_modules/langsmith": {- "version": "0.1.61",- "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.61.tgz",- "integrity": "sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==",+ "node_modules/@jridgewell/source-map": {+ "version": "0.3.5",+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz",+ "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",+ "dev": true,"dependencies": {- "@types/uuid": "^10.0.0",- "commander": "^10.0.1",- "p-queue": "^6.6.2",- "p-retry": "4",- "semver": "^7.6.3",- "uuid": "^10.0.0"- },- "peerDependencies": {- "openai": "*"- },- "peerDependenciesMeta": {- "openai": {- "optional": true- }+ "@jridgewell/gen-mapping": "^0.3.0",+ "@jridgewell/trace-mapping": "^0.3.9"}},- "node_modules/@langchain/textsplitters/node_modules/uuid": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "bin": {- "uuid": "dist/bin/uuid"+ "node_modules/@jridgewell/sourcemap-codec": {+ "version": "1.4.15",+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="+ },+ "node_modules/@jridgewell/trace-mapping": {+ "version": "0.3.25",+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",+ "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",+ "dependencies": {+ "@jridgewell/resolve-uri": "^3.1.0",+ "@jridgewell/sourcemap-codec": "^1.4.14"}},- "node_modules/@lezer/common": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz",- "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ=="+ "node_modules/@keyv/mongo": {+ "version": "2.2.8",+ "resolved": "https://registry.npmjs.org/@keyv/mongo/-/mongo-2.2.8.tgz",+ "integrity": "sha512-2y8RXQDzCUzvhkzjH0bj4+Ur9Ce+x9PjNrV6KnGGpRocexFKVgOYexIegnEc/DBy6HhNyqUlgWOpuFfnhpmF+A==",+ "dependencies": {+ "mongodb": "^4.5.0",+ "pify": "^5.0.0"+ }},- "node_modules/@lezer/css": {- "version": "1.1.8",- "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.1.8.tgz",- "integrity": "sha512-7JhxupKuMBaWQKjQoLtzhGj83DdnZY9MckEOG5+/iLKNK2ZJqKc6hf6uc0HjwCX7Qlok44jBNqZhHKDhEhZYLA==",+ "node_modules/@keyv/mongo/node_modules/bson": {+ "version": "4.7.2",+ "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz",+ "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==","dependencies": {- "@lezer/common": "^1.2.0",- "@lezer/highlight": "^1.0.0",- "@lezer/lr": "^1.0.0"+ "buffer": "^5.6.0"+ },+ "engines": {+ "node": ">=6.9.0"}},- "node_modules/@lezer/highlight": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.1.tgz",- "integrity": "sha512-Z5duk4RN/3zuVO7Jq0pGLJ3qynpxUVsh7IbUbGj88+uV2ApSAn6kWg2au3iJb+0Zi7kKtqffIESgNcRXWZWmSA==",+ "node_modules/@keyv/mongo/node_modules/buffer": {+ "version": "5.7.1",+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],"dependencies": {- "@lezer/common": "^1.0.0"+ "base64-js": "^1.3.1",+ "ieee754": "^1.1.13"}},- "node_modules/@lezer/html": {- "version": "1.3.10",- "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.10.tgz",- "integrity": "sha512-dqpT8nISx/p9Do3AchvYGV3qYc4/rKr3IBZxlHmpIKam56P47RSHkSF5f13Vu9hebS1jM0HmtJIwLbWz1VIY6w==",+ "node_modules/@keyv/mongo/node_modules/mongodb": {+ "version": "4.17.2",+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.2.tgz",+ "integrity": "sha512-mLV7SEiov2LHleRJPMPrK2PMyhXFZt2UQLC4VD4pnth3jMjYKHhtqfwwkkvS/NXuo/Fp3vbhaNcXrIDaLRb9Tg==","dependencies": {- "@lezer/common": "^1.2.0",- "@lezer/highlight": "^1.0.0",- "@lezer/lr": "^1.0.0"+ "bson": "^4.7.2",+ "mongodb-connection-string-url": "^2.6.0",+ "socks": "^2.7.1"+ },+ "engines": {+ "node": ">=12.9.0"+ },+ "optionalDependencies": {+ "@aws-sdk/credential-providers": "^3.186.0",+ "@mongodb-js/saslprep": "^1.1.0"}},- "node_modules/@lezer/javascript": {- "version": "1.4.17",- "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.17.tgz",- "integrity": "sha512-bYW4ctpyGK+JMumDApeUzuIezX01H76R1foD6LcRX224FWfyYit/HYxiPGDjXXe/wQWASjCvVGoukTH68+0HIA==",+ "node_modules/@keyv/redis": {+ "version": "2.8.4",+ "resolved": "https://registry.npmjs.org/@keyv/redis/-/redis-2.8.4.tgz",+ "integrity": "sha512-osO4C+i+Gi844wHjvXuHwhl+sDx3289Of309ZlLcj6SJReTLmPXzNiVR81N88wOu5aC+lVFdmx9FUQkkjdbPRQ==","dependencies": {- "@lezer/common": "^1.2.0",- "@lezer/highlight": "^1.1.3",- "@lezer/lr": "^1.3.0"+ "ioredis": "^5.3.2"+ },+ "engines": {+ "node": ">= 14"}},- "node_modules/@lezer/lr": {- "version": "1.4.2",- "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz",- "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==",+ "node_modules/@langchain/anthropic": {+ "version": "0.3.12",+ "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.12.tgz",+ "integrity": "sha512-vYANJVeus+v8wieTST5GUGlennY87NMIjaFx6JCJN8MMtf2KVwyBWQAUAPyGwzVQ40tru3w0rK2ruvzYBRcWEg==","dependencies": {- "@lezer/common": "^1.0.0"+ "@anthropic-ai/sdk": "^0.32.1",+ "fast-xml-parser": "^4.4.1",+ "zod": "^3.22.4",+ "zod-to-json-schema": "^3.22.4"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@langchain/core": ">=0.2.21 <0.4.0"}},- "node_modules/@librechat/agents": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-2.0.2.tgz",- "integrity": "sha512-ucH1zb2nHpAafXq6YNNFBHl5rwBEoTl5CUZ6M9r5Mp1oyk9vSAz+knOCaUgYMU5GJqY+6ReFWRH9tnvZfrzhTQ==",+ "node_modules/@langchain/aws": {+ "version": "0.1.3",+ "resolved": "https://registry.npmjs.org/@langchain/aws/-/aws-0.1.3.tgz",+ "integrity": "sha512-OjS6V/virzRvOX1D2xgTyyHkYzdepjes77dU2bBS53jt4mp0DT8vzgclZQ/16DA20YgNFtMKYiFbOfMI+RTHyg==","dependencies": {- "@aws-crypto/sha256-js": "^5.2.0",- "@aws-sdk/credential-provider-node": "^3.613.0",- "@aws-sdk/types": "^3.609.0",- "@langchain/anthropic": "^0.3.12",- "@langchain/aws": "^0.1.3",- "@langchain/community": "^0.3.27",- "@langchain/core": "^0.3.37",- "@langchain/google-genai": "^0.1.7",- "@langchain/google-vertexai": "^0.1.8",- "@langchain/langgraph": "^0.2.41",- "@langchain/mistralai": "^0.0.26",- "@langchain/ollama": "^0.1.5",- "@langchain/openai": "^0.4.2",- "@smithy/eventstream-codec": "^2.2.0",- "@smithy/protocol-http": "^3.0.6",- "@smithy/signature-v4": "^2.0.10",- "@smithy/util-utf8": "^2.0.0",- "dotenv": "^16.4.5",- "nanoid": "^3.3.7"+ "@aws-sdk/client-bedrock-agent-runtime": "^3.616.0",+ "@aws-sdk/client-bedrock-runtime": "^3.602.0",+ "@aws-sdk/client-kendra": "^3.352.0",+ "@aws-sdk/credential-provider-node": "^3.600.0",+ "zod": "^3.23.8",+ "zod-to-json-schema": "^3.22.5"},"engines": {- "node": ">=14.0.0"+ "node": ">=18"+ },+ "peerDependencies": {+ "@langchain/core": ">=0.2.21 <0.4.0"}},- "node_modules/@librechat/agents/node_modules/@langchain/community": {- "version": "0.3.29",- "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.29.tgz",- "integrity": "sha512-6XIPGctpH3KziFpdVDEvYBEQMMsNomffqy545shoxOLoMkZqgn1wfMs6R7ltzzS0p3LJUXW1RbwAUEuWp0rbuA==",+ "node_modules/@langchain/community": {+ "version": "0.3.15",+ "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.15.tgz",+ "integrity": "sha512-yG4cv33u7zYar14yqZCI7o2KjwRb+9S7upVzEmVVETimpicm9UjpkMfX4qa4A4IslM1TtC4uy2Ymu9EcINZSpQ==",+ "optional": true,+ "peer": true,"dependencies": {- "@langchain/openai": ">=0.2.0 <0.5.0",+ "@langchain/openai": ">=0.2.0 <0.4.0","binary-extensions": "^2.2.0","expr-eval": "^2.0.2","flat": "^5.0.2","js-yaml": "^4.1.0","langchain": ">=0.2.3 <0.3.0 || >=0.3.4 <0.4.0",- "langsmith": ">=0.2.8 <0.4.0",+ "langsmith": "^0.2.0","uuid": "^10.0.0","zod": "^3.22.3","zod-to-json-schema": "^3.22.5"@@ -10362,7 +9935,6 @@"@azure/search-documents": "^12.0.0","@azure/storage-blob": "^12.15.0","@browserbasehq/sdk": "*",- "@browserbasehq/stagehand": "^1.0.0","@clickhouse/client": "^0.2.5","@cloudflare/ai": "*","@datastax/astra-db-ts": "^1.0.0",@@ -10376,7 +9948,6 @@"@google-cloud/storage": "^6.10.1 || ^7.7.0","@gradientai/nodejs-sdk": "^1.2.0","@huggingface/inference": "^2.6.4",- "@huggingface/transformers": "^3.2.3","@ibm-cloud/watsonx-ai": "*","@lancedb/lancedb": "^0.12.0","@langchain/core": ">=0.2.21 <0.4.0",@@ -10406,10 +9977,11 @@"@upstash/ratelimit": "^1.1.3 || ^2.0.3","@upstash/redis": "^1.20.6","@upstash/vector": "^1.1.1",- "@vercel/kv": "*",- "@vercel/postgres": "*",+ "@vercel/kv": "^0.2.3",+ "@vercel/postgres": "^0.5.0","@writerai/writer-sdk": "^0.40.2","@xata.io/client": "^0.28.0",+ "@xenova/transformers": "^2.17.2","@zilliz/milvus2-sdk-node": ">=2.3.5","apify-client": "^2.7.1","assemblyai": "^4.6.0",@@ -10430,7 +10002,6 @@"duck-duck-scrape": "^2.2.5","epub2": "^3.0.1","faiss-node": "^0.5.1",- "fast-xml-parser": "*","firebase-admin": "^11.9.0 || ^12.0.0","google-auth-library": "*","googleapis": "*",@@ -10452,7 +10023,6 @@"neo4j-driver": "*","notion-to-md": "^3.1.0","officeparser": "^4.0.4",- "openai": "*","pdf-parse": "1.1.1","pg": "^8.11.0","pg-copy-streams": "^6.0.5",@@ -10462,7 +10032,7 @@"puppeteer": "*","pyodide": ">=0.24.1 <0.27.0","redis": "*",- "replicate": "*",+ "replicate": "^0.29.4","sonix-speech-recognition": "^2.1.1","srt-parser-2": "^1.2.3","typeorm": "^0.3.20",@@ -10471,9 +10041,9 @@"voy-search": "0.6.2","weaviate-ts-client": "*","web-auth-library": "^1.0.3",- "word-extractor": "*","ws": "^8.14.2",- "youtubei.js": "*"+ "youtube-transcript": "^1.0.6",+ "youtubei.js": "^9.1.0"},"peerDependenciesMeta": {"@arcjet/redact": {@@ -10557,9 +10127,6 @@"@huggingface/inference": {"optional": true},- "@huggingface/transformers": {- "optional": true- },"@lancedb/lancedb": {"optional": true},@@ -10653,6 +10220,9 @@"@xata.io/client": {"optional": true},+ "@xenova/transformers": {+ "optional": true+ },"@zilliz/milvus2-sdk-node": {"optional": true},@@ -10713,9 +10283,6 @@"faiss-node": {"optional": true},- "fast-xml-parser": {- "optional": true- },"firebase-admin": {"optional": true},@@ -10830,10 +10397,10 @@"web-auth-library": {"optional": true},- "word-extractor": {+ "ws": {"optional": true},- "ws": {+ "youtube-transcript": {"optional": true},"youtubei.js": {@@ -10841,24 +10408,394 @@}}},- "node_modules/@librechat/agents/node_modules/@langchain/openai": {- "version": "0.4.2",- "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.4.2.tgz",- "integrity": "sha512-Cuj7qbVcycALTP0aqZuPpEc7As8cwiGaU21MhXRyZFs+dnWxKYxZ1Q1z4kcx6cYkq/I+CNwwmk+sP+YruU73Aw==",+ "node_modules/@langchain/community/node_modules/uuid": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],+ "optional": true,+ "peer": true,+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },+ "node_modules/@langchain/core": {+ "version": "0.3.37",+ "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.37.tgz",+ "integrity": "sha512-LFk9GqHxcyCFx0oXvCBP7vDZIOUHYzzNU7JR+2ofIMnfkBLzcCKzBLySQDfPtd13PrpGHkaeOeLq8H1Tqi9lSw==","dependencies": {+ "@cfworker/json-schema": "^4.0.2",+ "ansi-styles": "^5.0.0",+ "camelcase": "6",+ "decamelize": "1.2.0","js-tiktoken": "^1.0.12",- "openai": "^4.77.0",+ "langsmith": ">=0.2.8 <0.4.0",+ "mustache": "^4.2.0",+ "p-queue": "^6.6.2",+ "p-retry": "4",+ "uuid": "^10.0.0","zod": "^3.22.4","zod-to-json-schema": "^3.22.3"},+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@langchain/core/node_modules/ansi-styles": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/@langchain/core/node_modules/uuid": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],+ "license": "MIT",+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },+ "node_modules/@langchain/google-common": {+ "version": "0.1.8",+ "resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.1.8.tgz",+ "integrity": "sha512-8auqWw2PMPhcHQHS+nMN3tVZrUPgSLckUaFeOHDOeSBiDvBd4KCybPwyl2oCwMDGvmyIxvOOckkMdeGaJ92vpQ==",+ "dependencies": {+ "uuid": "^10.0.0",+ "zod-to-json-schema": "^3.22.4"+ },"engines": {"node": ">=18"},"peerDependencies": {- "@langchain/core": ">=0.3.29 <0.4.0"+ "@langchain/core": ">=0.2.21 <0.4.0"+ }+ },+ "node_modules/@langchain/google-common/node_modules/uuid": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },+ "node_modules/@langchain/google-gauth": {+ "version": "0.1.8",+ "resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.1.8.tgz",+ "integrity": "sha512-2QK7d5SQMrnSv7X4j05BGfO74hiA8FJuNwSsQKZvzlGoVnNXil3x2aqD5V+zsYOPpxhkDCpNlmh2Pue2Wzy1rQ==",+ "dependencies": {+ "@langchain/google-common": "~0.1.8",+ "google-auth-library": "^8.9.0"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@langchain/core": ">=0.2.21 <0.4.0"+ }+ },+ "node_modules/@langchain/google-genai": {+ "version": "0.1.7",+ "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.1.7.tgz",+ "integrity": "sha512-m0cg2VKxxySFfiIFfoMEt22sM4DifmV7AYUN3/DBG8AABG1qLMpNTXUA+b9DGbRD21JFCQpny8Z8eFKRSZFHzA==",+ "dependencies": {+ "@google/generative-ai": "^0.21.0",+ "zod-to-json-schema": "^3.22.4"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@langchain/core": ">=0.3.17 <0.4.0"+ }+ },+ "node_modules/@langchain/google-vertexai": {+ "version": "0.1.8",+ "resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.1.8.tgz",+ "integrity": "sha512-n06ohihopz38agOm7BTASHMmFLz+XAZlzEvqtPC4Qa1fhYhzETQg2gCzEapIJ1yVk5MhrWqwKnVOQ+tIsFE88Q==",+ "dependencies": {+ "@langchain/google-gauth": "~0.1.8"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@langchain/core": ">=0.2.21 <0.4.0"+ }+ },+ "node_modules/@langchain/langgraph": {+ "version": "0.2.44",+ "resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.2.44.tgz",+ "integrity": "sha512-CR9LB7sytdx0Ink56qVUPorDo5gW5m7iOU2ypu1OYA4l5aIrT4xGvHCwrGH9RE80pb/d0FglVUkEgEfuvSDbmw==",+ "dependencies": {+ "@langchain/langgraph-checkpoint": "~0.0.15",+ "@langchain/langgraph-sdk": "~0.0.32",+ "uuid": "^10.0.0",+ "zod": "^3.23.8"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@langchain/core": ">=0.2.36 <0.3.0 || >=0.3.9 < 0.4.0"+ }+ },+ "node_modules/@langchain/langgraph-checkpoint": {+ "version": "0.0.15",+ "resolved": "https://registry.npmjs.org/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-0.0.15.tgz",+ "integrity": "sha512-AiJkvsYHqNbCh1Tx823qs2lf2qRqeB4EAMejirOk8gkpPszAGYua5c3niKYkcKR2tU8Snhrmj7Gm9HKZSFOXyw==",+ "dependencies": {+ "uuid": "^10.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@langchain/core": ">=0.2.31 <0.4.0"+ }+ },+ "node_modules/@langchain/langgraph-checkpoint/node_modules/uuid": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },+ "node_modules/@langchain/langgraph-sdk": {+ "version": "0.0.36",+ "resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.36.tgz",+ "integrity": "sha512-KkAZM0uXBaMcD/dpGTBppOhbvNX6gz+Y1zFAC898OblegFkSvICrkd0oRQ5Ro/GWK/NAoDymnMUDXeZDdUkSuw==",+ "dependencies": {+ "@types/json-schema": "^7.0.15",+ "p-queue": "^6.6.2",+ "p-retry": "4",+ "uuid": "^9.0.0"+ }+ },+ "node_modules/@langchain/langgraph/node_modules/uuid": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },+ "node_modules/@langchain/mistralai": {+ "version": "0.0.26",+ "resolved": "https://registry.npmjs.org/@langchain/mistralai/-/mistralai-0.0.26.tgz",+ "integrity": "sha512-NoXmOTrkHjfCcgWQprbPujCvFktJFPcFTAcJEc4jY0J+PRiwWfhe4Xx2MevWTSV9clWm2Pil454nJ1CYEvh3Ng==",+ "dependencies": {+ "@langchain/core": ">=0.2.16 <0.3.0",+ "@mistralai/mistralai": "^0.4.0",+ "uuid": "^10.0.0",+ "zod": "^3.22.4",+ "zod-to-json-schema": "^3.22.4"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@langchain/mistralai/node_modules/@langchain/core": {+ "version": "0.2.34",+ "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.34.tgz",+ "integrity": "sha512-Hkveq1UcOjUj1DVn5erbqElyRj1t04NORSuSIZAJCtPO7EDkIqomjAarJ5+I5NUpQeIONgbOdnY9TkJ6cKUSVA==",+ "dependencies": {+ "ansi-styles": "^5.0.0",+ "camelcase": "6",+ "decamelize": "1.2.0",+ "js-tiktoken": "^1.0.12",+ "langsmith": "^0.1.56-rc.1",+ "mustache": "^4.2.0",+ "p-queue": "^6.6.2",+ "p-retry": "4",+ "uuid": "^10.0.0",+ "zod": "^3.22.4",+ "zod-to-json-schema": "^3.22.3"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@langchain/mistralai/node_modules/ansi-styles": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/@langchain/mistralai/node_modules/langsmith": {+ "version": "0.1.61",+ "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.61.tgz",+ "integrity": "sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==",+ "dependencies": {+ "@types/uuid": "^10.0.0",+ "commander": "^10.0.1",+ "p-queue": "^6.6.2",+ "p-retry": "4",+ "semver": "^7.6.3",+ "uuid": "^10.0.0"+ },+ "peerDependencies": {+ "openai": "*"+ },+ "peerDependenciesMeta": {+ "openai": {+ "optional": true+ }+ }+ },+ "node_modules/@langchain/mistralai/node_modules/uuid": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },+ "node_modules/@langchain/ollama": {+ "version": "0.1.5",+ "resolved": "https://registry.npmjs.org/@langchain/ollama/-/ollama-0.1.5.tgz",+ "integrity": "sha512-S2tF94uIJtXavekKg10LvTV+jIelOIrubaCnje8BopfiNOVcnzsSulUL4JH0wvdxMZq0vbE4/i9RwC2q9ivOmA==",+ "dependencies": {+ "ollama": "^0.5.9",+ "uuid": "^10.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@langchain/core": ">=0.2.21 <0.4.0"+ }+ },+ "node_modules/@langchain/ollama/node_modules/uuid": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],+ "license": "MIT",+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },+ "node_modules/@langchain/openai": {+ "version": "0.3.14",+ "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.3.14.tgz",+ "integrity": "sha512-lNWjUo1tbvsss45IF7UQtMu1NJ6oUKvhgPYWXnX9f/d6OmuLu7D99HQ3Y88vLcUo9XjjOy417olYHignMduMjA==",+ "dependencies": {+ "js-tiktoken": "^1.0.12",+ "openai": "^4.71.0",+ "zod": "^3.22.4",+ "zod-to-json-schema": "^3.22.3"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@langchain/core": ">=0.2.26 <0.4.0"+ }+ },+ "node_modules/@langchain/textsplitters": {+ "version": "0.0.3",+ "resolved": "https://registry.npmjs.org/@langchain/textsplitters/-/textsplitters-0.0.3.tgz",+ "integrity": "sha512-cXWgKE3sdWLSqAa8ykbCcUsUF1Kyr5J3HOWYGuobhPEycXW4WI++d5DhzdpL238mzoEXTi90VqfSCra37l5YqA==",+ "dependencies": {+ "@langchain/core": ">0.2.0 <0.3.0",+ "js-tiktoken": "^1.0.12"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@langchain/textsplitters/node_modules/@langchain/core": {+ "version": "0.2.34",+ "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.34.tgz",+ "integrity": "sha512-Hkveq1UcOjUj1DVn5erbqElyRj1t04NORSuSIZAJCtPO7EDkIqomjAarJ5+I5NUpQeIONgbOdnY9TkJ6cKUSVA==",+ "dependencies": {+ "ansi-styles": "^5.0.0",+ "camelcase": "6",+ "decamelize": "1.2.0",+ "js-tiktoken": "^1.0.12",+ "langsmith": "^0.1.56-rc.1",+ "mustache": "^4.2.0",+ "p-queue": "^6.6.2",+ "p-retry": "4",+ "uuid": "^10.0.0",+ "zod": "^3.22.4",+ "zod-to-json-schema": "^3.22.3"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@langchain/textsplitters/node_modules/ansi-styles": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/@langchain/textsplitters/node_modules/langsmith": {+ "version": "0.1.61",+ "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.61.tgz",+ "integrity": "sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==",+ "dependencies": {+ "@types/uuid": "^10.0.0",+ "commander": "^10.0.1",+ "p-queue": "^6.6.2",+ "p-retry": "4",+ "semver": "^7.6.3",+ "uuid": "^10.0.0"+ },+ "peerDependencies": {+ "openai": "*"+ },+ "peerDependenciesMeta": {+ "openai": {+ "optional": true+ }}},- "node_modules/@librechat/agents/node_modules/uuid": {+ "node_modules/@langchain/textsplitters/node_modules/uuid": {"version": "10.0.0","resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz","integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",@@ -10870,6 +10807,57 @@"uuid": "dist/bin/uuid"}},+ "node_modules/@lezer/common": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz",+ "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ=="+ },+ "node_modules/@lezer/css": {+ "version": "1.1.8",+ "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.1.8.tgz",+ "integrity": "sha512-7JhxupKuMBaWQKjQoLtzhGj83DdnZY9MckEOG5+/iLKNK2ZJqKc6hf6uc0HjwCX7Qlok44jBNqZhHKDhEhZYLA==",+ "dependencies": {+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.0.0",+ "@lezer/lr": "^1.0.0"+ }+ },+ "node_modules/@lezer/highlight": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.1.tgz",+ "integrity": "sha512-Z5duk4RN/3zuVO7Jq0pGLJ3qynpxUVsh7IbUbGj88+uV2ApSAn6kWg2au3iJb+0Zi7kKtqffIESgNcRXWZWmSA==",+ "dependencies": {+ "@lezer/common": "^1.0.0"+ }+ },+ "node_modules/@lezer/html": {+ "version": "1.3.10",+ "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.10.tgz",+ "integrity": "sha512-dqpT8nISx/p9Do3AchvYGV3qYc4/rKr3IBZxlHmpIKam56P47RSHkSF5f13Vu9hebS1jM0HmtJIwLbWz1VIY6w==",+ "dependencies": {+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.0.0",+ "@lezer/lr": "^1.0.0"+ }+ },+ "node_modules/@lezer/javascript": {+ "version": "1.4.17",+ "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.17.tgz",+ "integrity": "sha512-bYW4ctpyGK+JMumDApeUzuIezX01H76R1foD6LcRX224FWfyYit/HYxiPGDjXXe/wQWASjCvVGoukTH68+0HIA==",+ "dependencies": {+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.1.3",+ "@lezer/lr": "^1.3.0"+ }+ },+ "node_modules/@lezer/lr": {+ "version": "1.4.2",+ "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz",+ "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==",+ "dependencies": {+ "@lezer/common": "^1.0.0"+ }+ },"node_modules/@librechat/backend": {"resolved": "api","link": true@@ -36358,7 +36346,7 @@},"packages/data-provider": {"name": "librechat-data-provider",- "version": "0.7.699",+ "version": "0.7.6991","license": "ISC","dependencies": {"axios": "^1.7.7",@@ -36529,6 +36517,9 @@"rollup-plugin-typescript2": "^0.35.0","ts-node": "^10.9.2","typescript": "^5.0.4"+ },+ "peerDependencies": {+ "keyv": "^4.5.4"}},"packages/mcp/node_modules/brace-expansion": {diff --git a/packages/data-provider/package.json b/packages/data-provider/package.jsonindex 976cf85d12..240d099e07 100644--- a/packages/data-provider/package.json+++ b/packages/data-provider/package.json@@ -1,6 +1,6 @@{"name": "librechat-data-provider",- "version": "0.7.699",+ "version": "0.7.6991","description": "data services for librechat apps","main": "dist/index.js","module": "dist/index.es.js",diff --git a/packages/data-provider/specs/actions.spec.ts b/packages/data-provider/specs/actions.spec.tsindex 6a09bb6b04..1bd2b5494a 100644--- a/packages/data-provider/specs/actions.spec.ts+++ b/packages/data-provider/specs/actions.spec.ts@@ -21,6 +21,7 @@ import type { ParametersSchema } from '../src/actions';jest.mock('axios');const mockedAxios = axios as jest.Mocked<typeof axios>;+mockedAxios.create.mockReturnValue(mockedAxios);describe('FunctionSignature', () => {it('creates a function signature and converts to JSON tool', () => {diff --git a/packages/data-provider/src/actions.ts b/packages/data-provider/src/actions.tsindex 657268f7a6..94b3229164 100644--- a/packages/data-provider/src/actions.ts+++ b/packages/data-provider/src/actions.ts@@ -1,9 +1,15 @@import { z } from 'zod';-import axios from 'axios';+import _axios from 'axios';import { URL } from 'url';import crypto from 'crypto';import { load } from 'js-yaml';-import type { FunctionTool, Schema, Reference, ActionMetadata } from './types/assistants';+import type {+ FunctionTool,+ Schema,+ Reference,+ ActionMetadata,+ ActionMetadataRuntime,+} from './types/assistants';import type { OpenAPIV3 } from 'openapi-types';import { Tools, AuthTypeEnum, AuthorizationTypeEnum } from './types/assistants';@@ -176,7 +182,7 @@ class RequestExecutor {return this;}- async setAuth(metadata: ActionMetadata) {+ async setAuth(metadata: ActionMetadataRuntime) {if (!metadata.auth) {return this;}@@ -199,6 +205,8 @@ class RequestExecutor {/* OAuth */oauth_client_id,oauth_client_secret,+ oauth_token_expires_at,+ oauth_access_token = '',} = metadata;const isApiKey = api_key != null && api_key.length > 0 && type === AuthTypeEnum.ServiceHttp;@@ -230,22 +238,23 @@ class RequestExecutor {) {this.authHeaders[custom_auth_header] = api_key;} else if (isOAuth) {- const authToken = this.authToken ?? '';- if (!authToken) {- const tokenResponse = await axios.post(- client_url,- {- client_id: oauth_client_id,- client_secret: oauth_client_secret,- scope: scope,- grant_type: 'client_credentials',- },- {- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },- },- );- this.authToken = tokenResponse.data.access_token;+ // TODO: maybe doing it in a different way later on. but we want that the user needs to folllow the oauth flow.+ // If we do not have a valid token, bail or ask user to sign in+ const now = new Date();++ // 1. Check if token is set+ if (!oauth_access_token) {+ throw new Error('No access token found. Please log in first.');}++ // 2. Check if token is expired+ if (oauth_token_expires_at && now >= new Date(oauth_token_expires_at)) {+ // Optionally check refresh_token logic, or just prompt user to re-login+ throw new Error('Access token is expired. Please re-login.');+ }++ // If valid, use it+ this.authToken = oauth_access_token;this.authHeaders['Authorization'] = `Bearer ${this.authToken}`;}return this;@@ -259,7 +268,7 @@ class RequestExecutor {};const method = this.config.method.toLowerCase();-+ const axios = _axios.create();if (method === 'get') {return axios.get(url, { headers, params: this.params });} else if (method === 'post') {@@ -511,6 +520,7 @@ export function validateAndParseOpenAPISpec(specString: string): ValidationResulspec: parsedSpec,};} catch (error) {+ console.error(error);return { status: false, message: 'Error parsing OpenAPI spec.' };}}diff --git a/packages/data-provider/src/bedrock.ts b/packages/data-provider/src/bedrock.tsindex 6ee2be2fe0..be72b64539 100644--- a/packages/data-provider/src/bedrock.ts+++ b/packages/data-provider/src/bedrock.ts@@ -25,7 +25,7 @@ export const bedrockInputSchema = s.tConversationSchematopK: true,additionalModelRequestFields: true,})- .transform(s.removeNullishValues)+ .transform((obj) => s.removeNullishValues(obj)).catch(() => ({}));export type BedrockConverseInput = z.infer<typeof bedrockInputSchema>;diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.tsindex 6a2db199b2..008b009112 100644--- a/packages/data-provider/src/config.ts+++ b/packages/data-provider/src/config.ts@@ -932,6 +932,10 @@ export enum CacheKeys {* Key for in-progress messages.*/MESSAGES = 'messages',+ /**+ * Key for in-progress flow states.+ */+ FLOWS = 'flows',}/**diff --git a/packages/data-provider/src/schemas.ts b/packages/data-provider/src/schemas.tsindex 8c984cb877..04eb049170 100644--- a/packages/data-provider/src/schemas.ts+++ b/packages/data-provider/src/schemas.ts@@ -877,7 +877,10 @@ export const gptPluginsSchema = tConversationSchemamaxContextTokens: undefined,}));-export function removeNullishValues<T extends Record<string, unknown>>(obj: T): Partial<T> {+export function removeNullishValues<T extends Record<string, unknown>>(+ obj: T,+ removeEmptyStrings?: boolean,+): Partial<T> {const newObj: Partial<T> = { ...obj };(Object.keys(newObj) as Array<keyof T>).forEach((key) => {@@ -885,6 +888,9 @@ export function removeNullishValues<T extends Record<string, unknown>>(obj: T):if (value === undefined || value === null) {delete newObj[key];}+ if (removeEmptyStrings && typeof value === 'string' && value === '') {+ delete newObj[key];+ }});return newObj;@@ -935,8 +941,7 @@ export const compactAssistantSchema = tConversationSchemagreeting: true,spec: true,})- // will change after adding temperature- .transform(removeNullishValues)+ .transform((obj) => removeNullishValues(obj)).catch(() => ({}));export const agentsSchema = tConversationSchema@@ -1138,7 +1143,7 @@ export const compactPluginsSchema = tConversationSchema}).catch(() => ({}));-const tBannerSchema = z.object({+export const tBannerSchema = z.object({bannerId: z.string(),message: z.string(),displayFrom: z.string(),@@ -1160,5 +1165,5 @@ export const compactAgentsSchema = tConversationSchemainstructions: true,additional_instructions: true,})- .transform(removeNullishValues)+ .transform((obj) => removeNullishValues(obj)).catch(() => ({}));diff --git a/packages/data-provider/src/types/agents.ts b/packages/data-provider/src/types/agents.tsindex 745786e3b9..b1021d80f6 100644--- a/packages/data-provider/src/types/agents.ts+++ b/packages/data-provider/src/types/agents.ts@@ -52,6 +52,10 @@ export namespace Agents {id?: string;/** If provided, the output of the tool call */output?: string;+ /** Auth URL */+ auth?: string;+ /** Expiration time */+ expires_at?: number;};export type ToolEndEvent = {@@ -190,6 +194,8 @@ export namespace Agents {export type ToolCallDelta = {type: StepTypes.TOOL_CALLS | string;tool_calls?: ToolCallChunk[];+ auth?: string;+ expires_at?: number;};export type AgentToolCall = FunctionToolCall | ToolCall;export interface ExtendedMessageContent {diff --git a/packages/data-provider/src/types/assistants.ts b/packages/data-provider/src/types/assistants.tsindex bd5ef9d773..d5b773c36f 100644--- a/packages/data-provider/src/types/assistants.ts+++ b/packages/data-provider/src/types/assistants.ts@@ -417,6 +417,8 @@ export type PartMetadata = {asset_pointer?: string;status?: string;action?: boolean;+ auth?: string;+ expires_at?: number;};export type ContentPart = (@@ -506,6 +508,12 @@ export type ActionMetadata = {oauth_client_secret?: string;};+export type ActionMetadataRuntime = ActionMetadata & {+ oauth_access_token?: string;+ oauth_refresh_token?: string;+ oauth_token_expires_at?: Date;+};+/* Assistant types */export type Action = {diff --git a/packages/data-provider/tsconfig.json b/packages/data-provider/tsconfig.jsonindex 4de513a422..420a848523 100644--- a/packages/data-provider/tsconfig.json+++ b/packages/data-provider/tsconfig.json@@ -18,9 +18,8 @@"isolatedModules": true,"noEmit": true,"sourceMap": true,- "baseUrl": ".", // This should be the root of your package+ "baseUrl": ".","paths": {- // Add path mappings"librechat-data-provider/react-query": ["./src/react-query/index.ts"]}},diff --git a/packages/mcp/babel.config.js b/packages/mcp/babel.config.cjssimilarity index 100%rename from packages/mcp/babel.config.jsrename to packages/mcp/babel.config.cjsdiff --git a/packages/mcp/jest.config.js b/packages/mcp/jest.config.mjssimilarity index 91%rename from packages/mcp/jest.config.jsrename to packages/mcp/jest.config.mjsindex 6b8c4abe79..f5fb1f20d7 100644--- a/packages/mcp/jest.config.js+++ b/packages/mcp/jest.config.mjs@@ -1,4 +1,4 @@-module.exports = {+export default {collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!<rootDir>/node_modules/'],coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],coverageReporters: ['text', 'cobertura'],@@ -15,4 +15,5 @@ module.exports = {// },// },restoreMocks: true,-};+ testTimeout: 15000,+};\ No newline at end of filediff --git a/packages/mcp/package.json b/packages/mcp/package.jsonindex 1ab924f012..d76653a00e 100644--- a/packages/mcp/package.json+++ b/packages/mcp/package.json@@ -73,5 +73,8 @@"diff": "^7.0.0","eventsource": "^3.0.1","express": "^4.21.2"+ },+ "peerDependencies": {+ "keyv": "^4.5.4"}}diff --git a/packages/mcp/src/flow/manager.spec.ts b/packages/mcp/src/flow/manager.spec.tsnew file mode 100644index 0000000000..2d8897747a--- /dev/null+++ b/packages/mcp/src/flow/manager.spec.ts@@ -0,0 +1,152 @@+import { FlowStateManager } from './manager';+import Keyv from 'keyv';+import type { FlowState } from './types';++// Create a mock class without extending Keyv+class MockKeyv {+ private store: Map<string, FlowState<string>>;++ constructor() {+ this.store = new Map();+ }++ async get(key: string): Promise<FlowState<string> | undefined> {+ return this.store.get(key);+ }++ // eslint-disable-next-line @typescript-eslint/no-unused-vars+ async set(key: string, value: FlowState<string>, _ttl?: number): Promise<true> {+ this.store.set(key, value);+ return true;+ }++ async delete(key: string): Promise<boolean> {+ return this.store.delete(key);+ }+}++describe('FlowStateManager', () => {+ let flowManager: FlowStateManager<string>;+ let store: MockKeyv;++ beforeEach(() => {+ store = new MockKeyv();+ // Type assertion here since we know our mock implements the necessary methods+ flowManager = new FlowStateManager(store as unknown as Keyv, { ttl: 30000, ci: true });+ });++ afterEach(() => {+ jest.clearAllMocks();+ });++ describe('Concurrency Tests', () => {+ it('should handle concurrent flow creation and return same result', async () => {+ const flowId = 'test-flow';+ const type = 'test-type';++ // Start two concurrent flow creations+ const flow1Promise = flowManager.createFlowWithHandler(flowId, type, async () => {+ await new Promise((resolve) => setTimeout(resolve, 100));+ return 'result';+ });++ const flow2Promise = flowManager.createFlowWithHandler(flowId, type, async () => {+ await new Promise((resolve) => setTimeout(resolve, 50));+ return 'different-result';+ });++ // Both should resolve to the same result from the first handler+ const [result1, result2] = await Promise.all([flow1Promise, flow2Promise]);++ expect(result1).toBe('result');+ expect(result2).toBe('result');+ });++ it('should handle flow timeout correctly', async () => {+ const flowId = 'timeout-flow';+ const type = 'test-type';++ // Create flow with very short TTL+ const shortTtlManager = new FlowStateManager(store as unknown as Keyv, {+ ttl: 100,+ ci: true,+ });++ const flowPromise = shortTtlManager.createFlow(flowId, type);++ await expect(flowPromise).rejects.toThrow('test-type flow timed out');+ });++ it('should maintain flow state consistency under high concurrency', async () => {+ const flowId = 'concurrent-flow';+ const type = 'test-type';++ // Create multiple concurrent operations+ const operations = [];+ for (let i = 0; i < 10; i++) {+ operations.push(+ flowManager.createFlowWithHandler(flowId, type, async () => {+ await new Promise((resolve) => setTimeout(resolve, Math.random() * 50));+ return `result-${i}`;+ }),+ );+ }++ // All operations should resolve to the same result+ const results = await Promise.all(operations);+ const firstResult = results[0];+ results.forEach((result: string) => {+ expect(result).toBe(firstResult);+ });+ });++ it('should handle race conditions in flow completion', async () => {+ const flowId = 'test-flow';+ const type = 'test-type';++ // Create initial flow+ const flowPromise = flowManager.createFlow(flowId, type);++ // Increase delay to ensure flow is properly created+ await new Promise((resolve) => setTimeout(resolve, 500));++ // Complete the flow+ await flowManager.completeFlow(flowId, type, 'result1');++ const result = await flowPromise;+ expect(result).toBe('result1');+ }, 15000);++ it('should handle concurrent flow monitoring', async () => {+ const flowId = 'test-flow';+ const type = 'test-type';++ // Create initial flow+ const flowPromise = flowManager.createFlow(flowId, type);++ // Increase delay+ await new Promise((resolve) => setTimeout(resolve, 500));++ // Complete the flow+ await flowManager.completeFlow(flowId, type, 'success');++ const result = await flowPromise;+ expect(result).toBe('success');+ }, 15000);++ it('should handle concurrent success and failure attempts', async () => {+ const flowId = 'race-flow';+ const type = 'test-type';++ const flowPromise = flowManager.createFlow(flowId, type);++ // Increase delay+ await new Promise((resolve) => setTimeout(resolve, 500));++ // Fail the flow+ await flowManager.failFlow(flowId, type, new Error('failure'));++ await expect(flowPromise).rejects.toThrow('failure');+ }, 15000);+ });+});diff --git a/packages/mcp/src/flow/manager.ts b/packages/mcp/src/flow/manager.tsnew file mode 100644index 0000000000..f282bfad8c--- /dev/null+++ b/packages/mcp/src/flow/manager.ts@@ -0,0 +1,241 @@+import Keyv from 'keyv';+import type { Logger } from 'winston';+import type { FlowState, FlowMetadata, FlowManagerOptions } from './types';++export class FlowStateManager<T = unknown> {+ private keyv: Keyv;+ private ttl: number;+ private logger: Logger;+ private intervals: Set<NodeJS.Timeout>;++ private static getDefaultLogger(): Logger {+ return {+ error: console.error,+ warn: console.warn,+ info: console.info,+ debug: console.debug,+ } as Logger;+ }++ constructor(store: Keyv, options?: FlowManagerOptions) {+ if (!options) {+ options = { ttl: 60000 * 3 };+ }+ const { ci = false, ttl, logger } = options;++ if (!ci && !(store instanceof Keyv)) {+ throw new Error('Invalid store provided to FlowStateManager');+ }++ this.ttl = ttl;+ this.keyv = store;+ this.logger = logger || FlowStateManager.getDefaultLogger();+ this.intervals = new Set();+ this.setupCleanupHandlers();+ }++ private setupCleanupHandlers() {+ const cleanup = () => {+ this.logger.info('Cleaning up FlowStateManager intervals...');+ this.intervals.forEach((interval) => clearInterval(interval));+ this.intervals.clear();+ process.exit(0);+ };++ process.on('SIGTERM', cleanup);+ process.on('SIGINT', cleanup);+ process.on('SIGQUIT', cleanup);+ process.on('SIGHUP', cleanup);+ }++ private getFlowKey(flowId: string, type: string): string {+ return `${type}:${flowId}`;+ }++ /**+ * Creates a new flow and waits for its completion+ */+ async createFlow(flowId: string, type: string, metadata: FlowMetadata = {}): Promise<T> {+ const flowKey = this.getFlowKey(flowId, type);++ let existingState = (await this.keyv.get(flowKey)) as FlowState<T> | undefined;+ if (existingState) {+ this.logger.debug(`[${flowKey}] Flow already exists`);+ return this.monitorFlow(flowKey, type);+ }++ await new Promise((resolve) => setTimeout(resolve, 250));++ existingState = (await this.keyv.get(flowKey)) as FlowState<T> | undefined;+ if (existingState) {+ this.logger.debug(`[${flowKey}] Flow exists on 2nd check`);+ return this.monitorFlow(flowKey, type);+ }++ const initialState: FlowState = {+ type,+ status: 'PENDING',+ metadata,+ createdAt: Date.now(),+ };++ this.logger.debug('Creating initial flow state:', flowKey);+ await this.keyv.set(flowKey, initialState, this.ttl);+ return this.monitorFlow(flowKey, type);+ }++ private monitorFlow(flowKey: string, type: string): Promise<T> {+ return new Promise<T>((resolve, reject) => {+ const checkInterval = 2000;+ let elapsedTime = 0;++ const intervalId = setInterval(async () => {+ try {+ const flowState = (await this.keyv.get(flowKey)) as FlowState<T> | undefined;++ if (!flowState) {+ clearInterval(intervalId);+ this.intervals.delete(intervalId);+ this.logger.error(`[${flowKey}] Flow state not found`);+ reject(new Error(`${type} Flow state not found`));+ return;+ }++ if (flowState.status !== 'PENDING') {+ clearInterval(intervalId);+ this.intervals.delete(intervalId);+ this.logger.debug(`[${flowKey}] Flow completed`);++ if (flowState.status === 'COMPLETED' && flowState.result !== undefined) {+ resolve(flowState.result);+ } else if (flowState.status === 'FAILED') {+ await this.keyv.delete(flowKey);+ reject(new Error(flowState.error ?? `${type} flow failed`));+ }+ return;+ }++ elapsedTime += checkInterval;+ if (elapsedTime >= this.ttl) {+ clearInterval(intervalId);+ this.intervals.delete(intervalId);+ this.logger.error(+ `[${flowKey}] Flow timed out | Elapsed time: ${elapsedTime} | TTL: ${this.ttl}`,+ );+ await this.keyv.delete(flowKey);+ reject(new Error(`${type} flow timed out`));+ }+ this.logger.debug(+ `[${flowKey}] Flow state elapsed time: ${elapsedTime}, checking again...`,+ );+ } catch (error) {+ this.logger.error(`[${flowKey}] Error checking flow state:`, error);+ clearInterval(intervalId);+ this.intervals.delete(intervalId);+ reject(error);+ }+ }, checkInterval);++ this.intervals.add(intervalId);+ });+ }++ /**+ * Completes a flow successfully+ */+ async completeFlow(flowId: string, type: string, result: T): Promise<boolean> {+ const flowKey = this.getFlowKey(flowId, type);+ const flowState = (await this.keyv.get(flowKey)) as FlowState<T> | undefined;++ if (!flowState) {+ return false;+ }++ const updatedState: FlowState<T> = {+ ...flowState,+ status: 'COMPLETED',+ result,+ completedAt: Date.now(),+ };++ await this.keyv.set(flowKey, updatedState, this.ttl);+ return true;+ }++ /**+ * Marks a flow as failed+ */+ async failFlow(flowId: string, type: string, error: Error | string): Promise<boolean> {+ const flowKey = this.getFlowKey(flowId, type);+ const flowState = (await this.keyv.get(flowKey)) as FlowState | undefined;++ if (!flowState) {+ return false;+ }++ const updatedState: FlowState = {+ ...flowState,+ status: 'FAILED',+ error: error instanceof Error ? error.message : error,+ failedAt: Date.now(),+ };++ await this.keyv.set(flowKey, updatedState, this.ttl);+ return true;+ }++ /**+ * Gets current flow state+ */+ async getFlowState(flowId: string, type: string): Promise<FlowState<T> | null> {+ const flowKey = this.getFlowKey(flowId, type);+ return this.keyv.get(flowKey);+ }++ /**+ * Creates a new flow and waits for its completion, only executing the handler if no existing flow is found+ * @param flowId - The ID of the flow+ * @param type - The type of flow+ * @param handler - Async function to execute if no existing flow is found+ * @param metadata - Optional metadata for the flow+ */+ async createFlowWithHandler(+ flowId: string,+ type: string,+ handler: () => Promise<T>,+ metadata: FlowMetadata = {},+ ): Promise<T> {+ const flowKey = this.getFlowKey(flowId, type);+ let existingState = (await this.keyv.get(flowKey)) as FlowState<T> | undefined;+ if (existingState) {+ this.logger.debug(`[${flowKey}] Flow already exists`);+ return this.monitorFlow(flowKey, type);+ }++ await new Promise((resolve) => setTimeout(resolve, 250));++ existingState = (await this.keyv.get(flowKey)) as FlowState<T> | undefined;+ if (existingState) {+ this.logger.debug(`[${flowKey}] Flow exists on 2nd check`);+ return this.monitorFlow(flowKey, type);+ }++ const initialState: FlowState = {+ type,+ status: 'PENDING',+ metadata,+ createdAt: Date.now(),+ };+ this.logger.debug(`[${flowKey}] Creating initial flow state`);+ await this.keyv.set(flowKey, initialState, this.ttl);++ try {+ const result = await handler();+ await this.completeFlow(flowId, type, result);+ return result;+ } catch (error) {+ await this.failFlow(flowId, type, error instanceof Error ? error : new Error(String(error)));+ throw error;+ }+ }+}diff --git a/packages/mcp/src/flow/types.ts b/packages/mcp/src/flow/types.tsnew file mode 100644index 0000000000..491dcb7896--- /dev/null+++ b/packages/mcp/src/flow/types.ts@@ -0,0 +1,23 @@+import type { Logger } from 'winston';+export type FlowStatus = 'PENDING' | 'COMPLETED' | 'FAILED';++export interface FlowMetadata {+ [key: string]: unknown;+}++export interface FlowState<T = unknown> {+ type: string;+ status: FlowStatus;+ metadata: FlowMetadata;+ createdAt: number;+ result?: T;+ error?: string;+ completedAt?: number;+ failedAt?: number;+}++export interface FlowManagerOptions {+ ttl: number;+ ci?: boolean;+ logger?: Logger;+}diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.tsindex ecf601787b..ba1dcdf821 100644--- a/packages/mcp/src/index.ts+++ b/packages/mcp/src/index.ts@@ -1,4 +1,7 @@/* MCP */export * from './manager';+/* Flow */+export * from './flow/manager';/* types */export type * from './types/mcp';+export type * from './flow/types';diff --git a/packages/mcp/tsconfig.json b/packages/mcp/tsconfig.jsonindex 94667987f1..7c03dc1fb4 100644--- a/packages/mcp/tsconfig.json+++ b/packages/mcp/tsconfig.json@@ -18,7 +18,7 @@"isolatedModules": true,"noEmit": true,"sourceMap": true,- "baseUrl": "." // This should be the root of your package+ "baseUrl": "."},"ts-node": {"experimentalSpecifierResolution": "node",