mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00

* 📝 chore: Add comment to clarify purpose of check_updates.sh script
* feat: mcp package
* feat: add librechat-mcp package and update dependencies
* feat: refactor MCPConnectionSingleton to handle transport initialization and connection management
* feat: change private methods to public in MCPConnectionSingleton for improved accessibility
* feat: filesystem demo
* chore: everything demo and move everything under mcp workspace
* chore: move ts-node to mcp workspace
* feat: mcp examples
* feat: working sse MCP example
* refactor: rename MCPConnectionSingleton to MCPConnection for clarity
* refactor: replace MCPConnectionSingleton with MCPConnection for consistency
* refactor: manager/connections
* refactor: update MCPConnection to use type definitions from mcp types
* refactor: update MCPManager to use winston logger and enhance server initialization
* refactor: share logger between connections and manager
* refactor: add schema definitions and update MCPManager to accept logger parameter
* feat: map available MCP tools
* feat: load manifest tools
* feat: add MCP tools delimiter constant and update plugin key generation
* feat: call MCP tools
* feat: update librechat-data-provider version to 0.7.63 and enhance StdioOptionsSchema with additional properties
* refactor: simplify typing
* chore: update types/packages
* feat: MCP Tool Content parsing
* chore: update dependencies and improve package configurations
* feat: add 'mcp' directory to package and update configurations
* refactor: return CONTENT_AND_ARTIFACT format for MCP callTool
* chore: bump @librechat/agents
* WIP: MCP artifacts
* chore: bump @librechat/agents to v1.8.7
* fix: ensure filename has extension when saving base64 image
* fix: move base64 buffer conversion before filename extension check
* chore: update backend review workflow to install MCP package
* fix: use correct `mime` method
* fix: enhance file metadata with message and tool call IDs in image saving process
* fix: refactor ToolCall component to handle MCP tool calls and improve domain extraction
* fix: update ToolItem component for default isInstalled value and improve localization in ToolSelectDialog
* fix: update ToolItem component to use consistent text color for tool description
* style: add theming to ToolSelectDialog
* fix: improve domain extraction logic in ToolCall component
* refactor: conversation item theming, fix rename UI bug, optimize props, add missing types
* feat: enhance MCP options schema with base options (iconPath to start) and make transport type optional, infer based on other option fields
* fix: improve reconnection logic with parallel init and exponential backoff and enhance transport debug logging
* refactor: improve logging format
* refactor: improve logging of available tools by displaying tool names
* refactor: improve reconnection/connection logic
* feat: add MCP package build process to Dockerfile
* feat: add fallback icon for tools without an image in ToolItem component
* feat: Assistants Support for MCP Tools
* fix(build): configure rollup to use output.dir for dynamic imports
* chore: update @librechat/agents to version 1.8.8 and add @langchain/anthropic dependency
* fix: update CONFIG_VERSION to 1.2.0
213 lines
5.7 KiB
JavaScript
213 lines
5.7 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
node: true,
|
|
commonjs: true,
|
|
es6: true,
|
|
},
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:react/recommended',
|
|
'plugin:react-hooks/recommended',
|
|
'plugin:jest/recommended',
|
|
'prettier',
|
|
'plugin:jsx-a11y/recommended',
|
|
],
|
|
ignorePatterns: [
|
|
'client/dist/**/*',
|
|
'client/public/**/*',
|
|
'e2e/playwright-report/**/*',
|
|
'packages/mcp/types/**/*',
|
|
'packages/mcp/dist/**/*',
|
|
'packages/mcp/test_bundle/**/*',
|
|
'api/demo/**/*',
|
|
'packages/data-provider/types/**/*',
|
|
'packages/data-provider/dist/**/*',
|
|
'packages/data-provider/test_bundle/**/*',
|
|
'data-node/**/*',
|
|
'meili_data/**/*',
|
|
'node_modules/**/*',
|
|
],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
plugins: ['react', 'react-hooks', '@typescript-eslint', 'import', 'jsx-a11y'],
|
|
rules: {
|
|
'react/react-in-jsx-scope': 'off',
|
|
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow' }],
|
|
indent: ['error', 2, { SwitchCase: 1 }],
|
|
'max-len': [
|
|
'error',
|
|
{
|
|
code: 120,
|
|
ignoreStrings: true,
|
|
ignoreTemplateLiterals: true,
|
|
ignoreComments: true,
|
|
},
|
|
],
|
|
'linebreak-style': 0,
|
|
curly: ['error', 'all'],
|
|
semi: ['error', 'always'],
|
|
'object-curly-spacing': ['error', 'always'],
|
|
'no-multiple-empty-lines': ['error', { max: 1 }],
|
|
'no-trailing-spaces': 'error',
|
|
'comma-dangle': ['error', 'always-multiline'],
|
|
// "arrow-parens": [2, "as-needed", { requireForBlockBody: true }],
|
|
// 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
|
|
'no-console': 'off',
|
|
'import/no-cycle': 'error',
|
|
'import/no-self-import': 'error',
|
|
'import/extensions': 'off',
|
|
'no-promise-executor-return': 'off',
|
|
'no-param-reassign': 'off',
|
|
'no-continue': 'off',
|
|
'no-restricted-syntax': 'off',
|
|
'react/prop-types': ['off'],
|
|
'react/display-name': ['off'],
|
|
'no-nested-ternary': 'error',
|
|
'no-unused-vars': ['error', { varsIgnorePattern: '^_' }],
|
|
quotes: ['error', 'single'],
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
rules: {
|
|
'no-unused-vars': 'off', // off because it conflicts with '@typescript-eslint/no-unused-vars'
|
|
'react/display-name': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
},
|
|
},
|
|
{
|
|
files: ['rollup.config.js', '.eslintrc.js', 'jest.config.js'],
|
|
env: {
|
|
node: true,
|
|
},
|
|
},
|
|
{
|
|
files: [
|
|
'**/*.test.js',
|
|
'**/*.test.jsx',
|
|
'**/*.test.ts',
|
|
'**/*.test.tsx',
|
|
'**/*.spec.js',
|
|
'**/*.spec.jsx',
|
|
'**/*.spec.ts',
|
|
'**/*.spec.tsx',
|
|
'setupTests.js',
|
|
],
|
|
env: {
|
|
jest: true,
|
|
node: true,
|
|
},
|
|
rules: {
|
|
'react/display-name': 'off',
|
|
'react/prop-types': 'off',
|
|
'react/no-unescaped-entities': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
project: './client/tsconfig.json',
|
|
},
|
|
plugins: ['@typescript-eslint/eslint-plugin', 'jest'],
|
|
extends: [
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
],
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
'@typescript-eslint/no-unnecessary-condition': 'warn',
|
|
'@typescript-eslint/strict-boolean-expressions': 'warn',
|
|
},
|
|
},
|
|
{
|
|
files: './packages/data-provider/**/*.ts',
|
|
overrides: [
|
|
{
|
|
files: '**/*.ts',
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
project: './packages/data-provider/tsconfig.json',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
files: './api/demo/**/*.ts',
|
|
overrides: [
|
|
{
|
|
files: '**/*.ts',
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
project: './packages/data-provider/tsconfig.json',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
files: './packages/mcp/**/*.ts',
|
|
overrides: [
|
|
{
|
|
files: '**/*.ts',
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
project: './packages/mcp/tsconfig.json',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
files: './config/translations/**/*.ts',
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
project: './config/translations/tsconfig.json',
|
|
},
|
|
},
|
|
{
|
|
files: ['./packages/data-provider/specs/**/*.ts'],
|
|
parserOptions: {
|
|
project: './packages/data-provider/tsconfig.spec.json',
|
|
},
|
|
},
|
|
{
|
|
files: ['./api/demo/specs/**/*.ts'],
|
|
parserOptions: {
|
|
project: './packages/data-provider/tsconfig.spec.json',
|
|
},
|
|
},
|
|
{
|
|
files: ['./packages/mcp/specs/**/*.ts'],
|
|
parserOptions: {
|
|
project: './packages/mcp/tsconfig.spec.json',
|
|
},
|
|
},
|
|
],
|
|
settings: {
|
|
react: {
|
|
createClass: 'createReactClass', // Regex for Component Factory to use,
|
|
// default to "createReactClass"
|
|
pragma: 'React', // Pragma to use, default to "React"
|
|
fragment: 'Fragment', // Fragment to use (may be a property of <pragma>), default to "Fragment"
|
|
version: 'detect', // React version. "detect" automatically picks the version you have installed.
|
|
},
|
|
'import/parsers': {
|
|
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
},
|
|
'import/resolver': {
|
|
typescript: {
|
|
project: ['./client/tsconfig.json'],
|
|
},
|
|
node: {
|
|
project: ['./client/tsconfig.json'],
|
|
},
|
|
},
|
|
},
|
|
};
|