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: Skill runtime integration: catalog, tools, execution, file priming (#12649)
Danny Avila64ec5f18b85d
diff --git a/api/package.json b/api/package.jsonindex 239b859084..082009f54e 100644--- a/api/package.json+++ b/api/package.json@@ -44,7 +44,7 @@"@google/genai": "^1.19.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.80",- "@librechat/agents": "^3.1.68",+ "@librechat/agents": "^3.1.66-dev.0","@librechat/api": "*","@librechat/data-schemas": "*","@microsoft/microsoft-graph-client": "^3.0.7",diff --git a/api/server/controllers/agents/__tests__/openai.spec.js b/api/server/controllers/agents/__tests__/openai.spec.jsindex f55b798f14..a444b18863 100644--- a/api/server/controllers/agents/__tests__/openai.spec.js+++ b/api/server/controllers/agents/__tests__/openai.spec.js@@ -114,6 +114,19 @@ jest.mock('~/server/services/PermissionService', () => ({checkPermission: jest.fn().mockResolvedValue(true),}));+jest.mock('~/server/services/Files/strategies', () => ({+ getStrategyFunctions: jest.fn().mockReturnValue({}),+}));++jest.mock('~/server/services/Files/Code/crud', () => ({+ batchUploadCodeEnvFiles: jest.fn().mockResolvedValue({ session_id: '', files: [] }),+}));++jest.mock('~/server/services/Files/Code/process', () => ({+ getSessionInfo: jest.fn().mockResolvedValue(null),+ checkIfActive: jest.fn().mockReturnValue(false),+}));+const mockUpdateBalance = jest.fn().mockResolvedValue({});const mockBulkInsertTransactions = jest.fn().mockResolvedValue(undefined);diff --git a/api/server/controllers/agents/__tests__/responses.unit.spec.js b/api/server/controllers/agents/__tests__/responses.unit.spec.jsindex 1a6fa6053f..cc2086766f 100644--- a/api/server/controllers/agents/__tests__/responses.unit.spec.js+++ b/api/server/controllers/agents/__tests__/responses.unit.spec.js@@ -144,6 +144,19 @@ jest.mock('~/cache', () => ({logViolation: jest.fn(),}));+jest.mock('~/server/services/Files/strategies', () => ({+ getStrategyFunctions: jest.fn().mockReturnValue({}),+}));++jest.mock('~/server/services/Files/Code/crud', () => ({+ batchUploadCodeEnvFiles: jest.fn().mockResolvedValue({ session_id: '', files: [] }),+}));++jest.mock('~/server/services/Files/Code/process', () => ({+ getSessionInfo: jest.fn().mockResolvedValue(null),+ checkIfActive: jest.fn().mockReturnValue(false),+}));+const mockUpdateBalance = jest.fn().mockResolvedValue({});const mockBulkInsertTransactions = jest.fn().mockResolvedValue(undefined);diff --git a/api/server/controllers/agents/callbacks.js b/api/server/controllers/agents/callbacks.jsindex 40fdf74212..40483ebdc3 100644--- a/api/server/controllers/agents/callbacks.js+++ b/api/server/controllers/agents/callbacks.js@@ -7,6 +7,7 @@ const {GraphEvents,GraphNodeKeys,ToolEndHandler,+ CODE_EXECUTION_TOOLS,} = require('@librechat/agents');const {sendEvent,@@ -443,9 +444,7 @@ function createToolEndCallback({ req, res, artifactPromises, streamId = null })return;}- const isCodeTool =- output.name === Tools.execute_code || output.name === Constants.PROGRAMMATIC_TOOL_CALLING;- if (!isCodeTool) {+ if (!CODE_EXECUTION_TOOLS.has(output.name)) {return;}@@ -651,9 +650,7 @@ function createResponsesToolEndCallback({ req, res, tracker, artifactPromises })return;}- const isCodeTool =- output.name === Tools.execute_code || output.name === Constants.PROGRAMMATIC_TOOL_CALLING;- if (!isCodeTool) {+ if (!CODE_EXECUTION_TOOLS.has(output.name)) {return;}diff --git a/api/server/controllers/agents/client.js b/api/server/controllers/agents/client.jsindex 71fd843b0f..7828048991 100644--- a/api/server/controllers/agents/client.js+++ b/api/server/controllers/agents/client.js@@ -742,12 +742,18 @@ class AgentClient extends BaseClient {const toolSet = buildToolSet(this.options.agent);const tokenCounter = createTokenCounter(this.getEncoding());++ /** Pre-resolve invoked skill bodies + re-prime files before formatting messages */+ const skillPrimeResult = this.options.primeInvokedSkills+ ? await this.options.primeInvokedSkills(payload)+ : undefined;+let {messages: initialMessages,indexTokenCountMap,summary: initialSummary,boundaryTokenAdjustment,- } = formatAgentMessages(payload, this.indexTokenCountMap, toolSet);+ } = formatAgentMessages(payload, this.indexTokenCountMap, toolSet, skillPrimeResult?.skills);if (boundaryTokenAdjustment) {logger.debug(`[AgentClient] Boundary token adjustment: ${boundaryTokenAdjustment.original} → ${boundaryTokenAdjustment.adjusted} (${boundaryTokenAdjustment.remainingChars}/${boundaryTokenAdjustment.totalChars} chars)`,@@ -829,6 +835,7 @@ class AgentClient extends BaseClient {messages,indexTokenCountMap,initialSummary,+ initialSessions: skillPrimeResult?.initialSessions,calibrationRatio,runId: this.responseMessageId,signal: abortController.signal,diff --git a/api/server/controllers/agents/openai.js b/api/server/controllers/agents/openai.jsindex e7cd7e1c29..9826adfad2 100644--- a/api/server/controllers/agents/openai.js+++ b/api/server/controllers/agents/openai.js@@ -6,6 +6,7 @@ const {ResourceType,PermissionBits,hasPermissions,+ AgentCapabilities,} = require('librechat-data-provider');const {writeSSE,@@ -40,6 +41,10 @@ const {findAccessibleResources,getEffectivePermissions,} = require('~/server/services/PermissionService');+const {+ getSkillToolDeps,+ enrichWithSkillConfigurable,+} = require('~/server/services/Endpoints/agents/skillDeps');const { getModelsConfig } = require('~/server/controllers/ModelController');const { logViolation } = require('~/cache');const db = require('~/models');@@ -235,8 +240,22 @@ const OpenAIChatCompletionController = async (req, res) => {getUserCodeFiles: db.getUserCodeFiles,getToolFilesByIds: db.getToolFilesByIds,getCodeGeneratedFiles: db.getCodeGeneratedFiles,+ listSkillsByAccess: db.listSkillsByAccess,};+ const enabledCapabilities = new Set(agentsEConfig?.capabilities);+ const ephemeralAgent = req.body?.ephemeralAgent;+ const skillsEnabled =+ enabledCapabilities.has(AgentCapabilities.skills) && ephemeralAgent?.skills === true;+ const accessibleSkillIds = skillsEnabled+ ? await findAccessibleResources({+ userId: req.user.id,+ role: req.user.role,+ resourceType: ResourceType.SKILL,+ requiredPermissions: PermissionBits.VIEW,+ })+ : [];+const primaryConfig = await initializeAgent({req,@@ -249,6 +268,8 @@ const OpenAIChatCompletionController = async (req, res) => {endpointOption,allowedProviders,isInitialAgent: true,+ accessibleSkillIds,+ codeEnvAvailable: enabledCapabilities.has(AgentCapabilities.execute_code),},dbMethods,);@@ -375,7 +396,7 @@ const OpenAIChatCompletionController = async (req, res) => {const toolExecuteOptions = {loadTools: async (toolNames, agentId) => {const ctx = agentToolContexts.get(agentId) ?? agentToolContexts.get(primaryConfig.id) ?? {};- return loadToolsForExecution({+ const result = await loadToolsForExecution({req,res,toolNames,@@ -386,8 +407,10 @@ const OpenAIChatCompletionController = async (req, res) => {tool_resources: ctx.tool_resources,actionsEnabled: ctx.actionsEnabled,});+ return enrichWithSkillConfigurable(result, req, primaryConfig.accessibleSkillIds);},toolEndCallback,+ ...getSkillToolDeps(),};const summarizationConfig = appConfig?.summarization;diff --git a/api/server/controllers/agents/responses.js b/api/server/controllers/agents/responses.jsindex 3cb24b2083..3993be345f 100644--- a/api/server/controllers/agents/responses.js+++ b/api/server/controllers/agents/responses.js@@ -7,6 +7,7 @@ const {ResourceType,PermissionBits,hasPermissions,+ AgentCapabilities,} = require('librechat-data-provider');const {createRun,@@ -49,6 +50,10 @@ const {findAccessibleResources,getEffectivePermissions,} = require('~/server/services/PermissionService');+const {+ getSkillToolDeps,+ enrichWithSkillConfigurable,+} = require('~/server/services/Endpoints/agents/skillDeps');const { getModelsConfig } = require('~/server/controllers/ModelController');const { logViolation } = require('~/cache');const db = require('~/models');@@ -362,8 +367,24 @@ const createResponse = async (req, res) => {getUserCodeFiles: db.getUserCodeFiles,getToolFilesByIds: db.getToolFilesByIds,getCodeGeneratedFiles: db.getCodeGeneratedFiles,+ listSkillsByAccess: db.listSkillsByAccess,};+ const enabledCapabilities = new Set(+ appConfig?.endpoints?.[EModelEndpoint.agents]?.capabilities,+ );+ const ephemeralAgent = req.body?.ephemeralAgent;+ const skillsEnabled =+ enabledCapabilities.has(AgentCapabilities.skills) && ephemeralAgent?.skills === true;+ const accessibleSkillIds = skillsEnabled+ ? await findAccessibleResources({+ userId: req.user.id,+ role: req.user.role,+ resourceType: ResourceType.SKILL,+ requiredPermissions: PermissionBits.VIEW,+ })+ : [];+const primaryConfig = await initializeAgent({req,@@ -376,6 +397,8 @@ const createResponse = async (req, res) => {endpointOption,allowedProviders,isInitialAgent: true,+ accessibleSkillIds,+ codeEnvAvailable: enabledCapabilities.has(AgentCapabilities.execute_code),},dbMethods,);@@ -533,7 +556,7 @@ const createResponse = async (req, res) => {loadTools: async (toolNames, agentId) => {const ctx =agentToolContexts.get(agentId) ?? agentToolContexts.get(primaryConfig.id) ?? {};- return loadToolsForExecution({+ const result = await loadToolsForExecution({req,res,toolNames,@@ -544,8 +567,10 @@ const createResponse = async (req, res) => {tool_resources: ctx.tool_resources,actionsEnabled: ctx.actionsEnabled,});+ return enrichWithSkillConfigurable(result, req, primaryConfig.accessibleSkillIds);},toolEndCallback,+ ...getSkillToolDeps(),};// Combine handlers@@ -701,7 +726,7 @@ const createResponse = async (req, res) => {loadTools: async (toolNames, agentId) => {const ctx =agentToolContexts.get(agentId) ?? agentToolContexts.get(primaryConfig.id) ?? {};- return loadToolsForExecution({+ const result = await loadToolsForExecution({req,res,toolNames,@@ -712,8 +737,10 @@ const createResponse = async (req, res) => {tool_resources: ctx.tool_resources,actionsEnabled: ctx.actionsEnabled,});+ return enrichWithSkillConfigurable(result, req, primaryConfig.accessibleSkillIds);},toolEndCallback,+ ...getSkillToolDeps(),};const handlers = {diff --git a/api/server/services/Endpoints/agents/initialize.js b/api/server/services/Endpoints/agents/initialize.jsindex 549e9047b5..1cabe402fc 100644--- a/api/server/services/Endpoints/agents/initialize.js+++ b/api/server/services/Endpoints/agents/initialize.js@@ -1,7 +1,8 @@const { logger } = require('@librechat/data-schemas');-const { createContentAggregator } = require('@librechat/agents');+const { EnvVar, createContentAggregator } = require('@librechat/agents');const {initializeAgent,+ primeInvokedSkills,validateAgentModel,GenerationJobManager,getCustomEndpointConfig,@@ -11,6 +12,7 @@ const {EModelEndpoint,isAgentsEndpoint,getResponseSender,+ AgentCapabilities,isEphemeralAgentId,} = require('librechat-data-provider');const {@@ -18,9 +20,11 @@ const {getDefaultHandlers,} = require('~/server/controllers/agents/callbacks');const { loadAgentTools, loadToolsForExecution } = require('~/server/services/ToolService');+const { loadAuthValues } = require('~/server/services/Tools/credentials');const { filterFilesByAgentAccess } = require('~/server/services/Files/permissions');+const { getSkillToolDeps, enrichWithSkillConfigurable } = require('./skillDeps');const { getModelsConfig } = require('~/server/controllers/ModelController');-const { checkPermission } = require('~/server/services/PermissionService');+const { checkPermission, findAccessibleResources } = require('~/server/services/PermissionService');const AgentClient = require('~/server/controllers/agents/client');const { processAddedConvo } = require('./addedConvo');const { logViolation } = require('~/cache');@@ -102,6 +106,37 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {const { contentParts, aggregateContent } = createContentAggregator();const toolEndCallback = createToolEndCallback({ req, res, artifactPromises, streamId });+ /** Query accessible skill IDs once per run (shared across all agents).+ * Requires both admin capability AND per-conversation toggle (if ephemeral). */+ const enabledCapabilities = new Set(appConfig?.endpoints?.[EModelEndpoint.agents]?.capabilities);+ const ephemeralSkillsToggle = req.body?.ephemeralAgent?.skills;+ const skillsCapabilityEnabled =+ enabledCapabilities.has(AgentCapabilities.skills) && ephemeralSkillsToggle === true;++ const accessibleSkillIds = skillsCapabilityEnabled+ ? await findAccessibleResources({+ userId: req.user.id,+ role: req.user.role,+ resourceType: ResourceType.SKILL,+ requiredPermissions: PermissionBits.VIEW,+ })+ : [];++ // Resolve code API key once for the entire run (shared by primeInvokedSkills+ // and enrichWithSkillConfigurable) to avoid redundant auth lookups.+ let codeApiKey;+ if (skillsCapabilityEnabled && enabledCapabilities.has(AgentCapabilities.execute_code)) {+ try {+ const authValues = await loadAuthValues({+ userId: req.user.id,+ authFields: [EnvVar.CODE_API_KEY],+ });+ codeApiKey = authValues[EnvVar.CODE_API_KEY];+ } catch {+ // non-fatal — primeInvokedSkills and enrichWithSkillConfigurable will work without it+ }+ }+/*** Agent context store - populated after initialization, accessed by callback via closure.* Maps agentId -> { userMCPAuthMap, agent, tool_resources, toolRegistry, openAIApiKey }@@ -135,9 +170,10 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {});logger.debug(`[ON_TOOL_EXECUTE] loaded ${result.loadedTools?.length ?? 0} tools`);- return result;+ return enrichWithSkillConfigurable(result, req, ctx.accessibleSkillIds, codeApiKey);},toolEndCallback,+ ...getSkillToolDeps(),};const summarizationOptions =@@ -200,6 +236,8 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {endpointOption,allowedProviders,isInitialAgent: true,+ accessibleSkillIds,+ codeEnvAvailable: enabledCapabilities.has(AgentCapabilities.execute_code),},{getFiles: db.getFiles,@@ -212,6 +250,7 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {getToolFilesByIds: db.getToolFilesByIds,getCodeGeneratedFiles: db.getCodeGeneratedFiles,filterFilesByAgentAccess,+ listSkillsByAccess: db.listSkillsByAccess,},);@@ -224,6 +263,7 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {userMCPAuthMap: primaryConfig.userMCPAuthMap,tool_resources: primaryConfig.tool_resources,actionsEnabled: primaryConfig.actionsEnabled,+ accessibleSkillIds: primaryConfig.accessibleSkillIds,});const {@@ -259,6 +299,7 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {getToolFilesByIds: db.getToolFilesByIds,getCodeGeneratedFiles: db.getCodeGeneratedFiles,filterFilesByAgentAccess,+ listSkillsByAccess: db.listSkillsByAccess,},// The callback fires during BFS, before the helper prunes agents// whose edges end up filtered. Don't populate `agentConfigs` here —@@ -273,6 +314,7 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {userMCPAuthMap: config.userMCPAuthMap,tool_resources: config.tool_resources,actionsEnabled: config.actionsEnabled,+ accessibleSkillIds: config.accessibleSkillIds,});},// Pass through the `@librechat/api` exports so that tests which@@ -325,6 +367,7 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {userMCPAuthMap: config.userMCPAuthMap,tool_resources: config.tool_resources,actionsEnabled: config.actionsEnabled,+ accessibleSkillIds: config.accessibleSkillIds,});}@@ -356,6 +399,18 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {modelLabel: endpointOption.model_parameters.modelLabel,});+ const handlePrimeInvokedSkills = skillsCapabilityEnabled+ ? (payload) =>+ primeInvokedSkills({+ req,+ payload,+ accessibleSkillIds,+ codeApiKey,+ loadAuthValues,+ ...getSkillToolDeps(),+ })+ : undefined;+const client = new AgentClient({req,res,@@ -366,6 +421,7 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {collectedUsage,aggregateContent,artifactPromises,+ primeInvokedSkills: handlePrimeInvokedSkills,agent: primaryConfig,spec: endpointOption.spec,iconURL: endpointOption.iconURL,diff --git a/api/server/services/Endpoints/agents/skillDeps.js b/api/server/services/Endpoints/agents/skillDeps.jsnew file mode 100644index 0000000000..32a7995a49--- /dev/null+++ b/api/server/services/Endpoints/agents/skillDeps.js@@ -0,0 +1,43 @@+const { getStrategyFunctions } = require('~/server/services/Files/strategies');+const { batchUploadCodeEnvFiles } = require('~/server/services/Files/Code/crud');+const { getSessionInfo, checkIfActive } = require('~/server/services/Files/Code/process');+const { loadAuthValues } = require('~/server/services/Tools/credentials');+const { enrichWithSkillConfigurable } = require('@librechat/api');+const db = require('~/models');++/** Skill-related properties for ToolExecuteOptions (stable references, allocated once). */+const skillToolDeps = {+ getSkillByName: db.getSkillByName,+ listSkillFiles: db.listSkillFiles,+ getStrategyFunctions,+ batchUploadCodeEnvFiles,+ getSessionInfo,+ checkIfActive,+ updateSkillFileCodeEnvIds: db.updateSkillFileCodeEnvIds,+ getSkillFileByPath: db.getSkillFileByPath,+ updateSkillFileContent: db.updateSkillFileContent,+};++function getSkillToolDeps() {+ return skillToolDeps;+}++/**+ * Wraps the TS enrichWithSkillConfigurable with the CJS loadAuthValues dependency.+ * @param {object} result - The result from loadToolsForExecution+ * @param {object} req - The Express request object+ * @param {Array} accessibleSkillIds - Pre-computed accessible skill IDs+ * @param {string} [preResolvedCodeApiKey] - Pre-resolved code API key (skips redundant lookup)+ * @returns {Promise<object>} Augmented result with skill configurable+ */+function enrichConfigurable(result, req, accessibleSkillIds, preResolvedCodeApiKey) {+ return enrichWithSkillConfigurable(+ result,+ req,+ accessibleSkillIds,+ loadAuthValues,+ preResolvedCodeApiKey,+ );+}++module.exports = { getSkillToolDeps, enrichWithSkillConfigurable: enrichConfigurable };diff --git a/api/server/services/Files/Code/crud.js b/api/server/services/Files/Code/crud.jsindex 945aec787b..5bf028702a 100644--- a/api/server/services/Files/Code/crud.js+++ b/api/server/services/Files/Code/crud.js@@ -1,4 +1,5 @@const FormData = require('form-data');+const { logger } = require('@librechat/data-schemas');const { getCodeBaseURL } = require('@librechat/agents');const {logAxiosError,@@ -107,4 +108,82 @@ async function uploadCodeEnvFile({ req, stream, filename, apiKey, entity_id = ''}}-module.exports = { getCodeOutputDownloadStream, uploadCodeEnvFile };+/**+ * Uploads multiple files to the code execution environment in a single request.+ * Uses the /upload/batch endpoint which shares one session_id across all files.+ *+ * @param {object} params+ * @param {import('express').Request & { user: { id: string } }} params.req - The request object.+ * @param {Array<{ stream: NodeJS.ReadableStream; filename: string }>} params.files - Files to upload.+ * @param {string} params.apiKey - The API key for authentication.+ * @param {string} [params.entity_id] - Optional entity ID.+ * @returns {Promise<{ session_id: string; files: Array<{ fileId: string; filename: string }> }>}+ * @throws {Error} If the batch upload fails entirely.+ */+async function batchUploadCodeEnvFiles({ req, files, apiKey, entity_id = '' }) {+ try {+ const form = new FormData();+ if (entity_id.length > 0) {+ form.append('entity_id', entity_id);+ }+ for (const file of files) {+ form.append('file', file.stream, file.filename);+ }++ const baseURL = getCodeBaseURL();+ /** @type {import('axios').AxiosRequestConfig} */+ const options = {+ headers: {+ ...form.getHeaders(),+ 'Content-Type': 'multipart/form-data',+ 'User-Agent': 'LibreChat/1.0',+ 'User-Id': req.user.id,+ 'X-API-Key': apiKey,+ },+ httpAgent: codeServerHttpAgent,+ httpsAgent: codeServerHttpsAgent,+ timeout: 120000,+ maxContentLength: MAX_FILE_SIZE,+ maxBodyLength: MAX_FILE_SIZE,+ };++ const response = await axios.post(`${baseURL}/upload/batch`, form, options);++ /** @type {{ message: string; session_id: string; files: Array<{ status: string; fileId?: string; filename: string; error?: string }>; succeeded: number; failed: number }} */+ const result = response.data;+ if (+ !result ||+ typeof result !== 'object' ||+ !result.session_id ||+ !Array.isArray(result.files)+ ) {+ throw new Error(`Unexpected batch upload response: ${JSON.stringify(result).slice(0, 200)}`);+ }+ if (result.message === 'error') {+ throw new Error('All files in batch upload failed');+ }++ if (result.failed > 0) {+ const failedNames = result.files+ .filter((f) => f.status === 'error')+ .map((f) => `${f.filename}: ${f.error || 'unknown'}`)+ .join(', ');+ logger.warn(`[batchUploadCodeEnvFiles] ${result.failed} file(s) failed: ${failedNames}`);+ }++ const successFiles = result.files+ .filter((f) => f.status === 'success' && f.fileId)+ .map((f) => ({ fileId: f.fileId, filename: f.filename }));++ return { session_id: result.session_id, files: successFiles };+ } catch (error) {+ throw new Error(+ logAxiosError({+ message: `Error in batch upload to code environment: ${error instanceof Error ? error.message : String(error)}`,+ error,+ }),+ );+ }+}++module.exports = { getCodeOutputDownloadStream, uploadCodeEnvFile, batchUploadCodeEnvFiles };diff --git a/api/server/services/Files/Code/process.js b/api/server/services/Files/Code/process.jsindex 7cdebeb202..d7076f75f2 100644--- a/api/server/services/Files/Code/process.js+++ b/api/server/services/Files/Code/process.js@@ -292,8 +292,7 @@ async function getSessionInfo(fileIdentifier, apiKey) {try {const baseURL = getCodeBaseURL();const [path, queryString] = fileIdentifier.split('?');- const session_id = path.split('/')[0];-+ const [session_id, fileId] = path.split('/');let queryParams = {};if (queryString) {queryParams = Object.fromEntries(new URLSearchParams(queryString).entries());@@ -301,11 +300,8 @@ async function getSessionInfo(fileIdentifier, apiKey) {const response = await axios({method: 'get',- url: `${baseURL}/files/${session_id}`,- params: {- detail: 'summary',- ...queryParams,- },+ url: `${baseURL}/sessions/${session_id}/objects/${fileId}`,+ params: queryParams,headers: {'User-Agent': 'LibreChat/1.0','X-API-Key': apiKey,@@ -315,7 +311,7 @@ async function getSessionInfo(fileIdentifier, apiKey) {timeout: 5000,});- return response.data.find((file) => file.name.startsWith(path))?.lastModified;+ return response.data?.lastModified;} catch (error) {logAxiosError({message: `Error fetching session info: ${error.message}`,@@ -460,6 +456,7 @@ const primeFiles = async (options, apiKey) => {module.exports = {primeFiles,+ checkIfActive,getSessionInfo,processCodeOutput,};diff --git a/api/server/services/ToolService.js b/api/server/services/ToolService.jsindex 7478564292..79b562caec 100644--- a/api/server/services/ToolService.js+++ b/api/server/services/ToolService.js@@ -7,6 +7,7 @@ const {GraphEvents,createToolSearch,Constants: AgentConstants,+ createBashExecutionTool,createProgrammaticToolCallingTool,} = require('@librechat/agents');const {@@ -1269,9 +1270,46 @@ async function loadToolsForExecution({}}+ const isBashTool = toolNames.includes(AgentConstants.BASH_TOOL);+ if (isBashTool) {+ try {+ const authValues = await loadAuthValues({+ userId: req.user.id,+ authFields: [EnvVar.CODE_API_KEY],+ });+ const codeApiKey = authValues[EnvVar.CODE_API_KEY];++ if (codeApiKey) {+ const bashTool = createBashExecutionTool({ apiKey: codeApiKey });+ allLoadedTools.push(bashTool);+ } else {+ logger.debug('[loadToolsForExecution] bash_tool requested but CODE_API_KEY not available');+ allLoadedTools.push(+ toolFn(+ async () => [+ 'Code execution is not available. Use the read_file tool instead.',+ undefined,+ ],+ {+ name: AgentConstants.BASH_TOOL,+ description: 'Bash execution (unavailable - no code API key configured)',+ schema: { type: 'object', properties: { command: { type: 'string' } } },+ responseFormat: AgentConstants.CONTENT_AND_ARTIFACT,+ },+ ),+ );+ }+ } catch (error) {+ logger.error('[loadToolsForExecution] Error creating bash tool:', error);+ }+ }+const specialToolNames = new Set([AgentConstants.TOOL_SEARCH,AgentConstants.PROGRAMMATIC_TOOL_CALLING,+ AgentConstants.BASH_TOOL,+ AgentConstants.SKILL_TOOL,+ AgentConstants.READ_FILE,]);let ptcOrchestratedToolNames = [];diff --git a/client/src/Providers/BadgeRowContext.tsx b/client/src/Providers/BadgeRowContext.tsxindex 1bedcec66f..05f6528145 100644--- a/client/src/Providers/BadgeRowContext.tsx+++ b/client/src/Providers/BadgeRowContext.tsx@@ -17,6 +17,7 @@ interface BadgeRowContextType {conversationId?: string | null;storageContextKey?: string;agentsConfig?: TAgentsEndpoint | null;+ skills: ReturnType<typeof useToolToggle>;webSearch: ReturnType<typeof useToolToggle>;artifacts: ReturnType<typeof useToolToggle>;fileSearch: ReturnType<typeof useToolToggle>;@@ -100,13 +101,15 @@ export default function BadgeRowProvider({const webSearchToggleKey = `${LocalStorageKeys.LAST_WEB_SEARCH_TOGGLE_}${storageSuffix}`;const fileSearchToggleKey = `${LocalStorageKeys.LAST_FILE_SEARCH_TOGGLE_}${storageSuffix}`;const artifactsToggleKey = `${LocalStorageKeys.LAST_ARTIFACTS_TOGGLE_}${storageSuffix}`;+ const skillsToggleKey = `${LocalStorageKeys.LAST_SKILLS_TOGGLE_}${storageSuffix}`;const codeToggleValue = getTimestampedValue(codeToggleKey);const webSearchToggleValue = getTimestampedValue(webSearchToggleKey);const fileSearchToggleValue = getTimestampedValue(fileSearchToggleKey);const artifactsToggleValue = getTimestampedValue(artifactsToggleKey);+ const skillsToggleValue = getTimestampedValue(skillsToggleKey);- const initialValues: Record<string, any> = {};+ const initialValues: Record<string, boolean | string> = {};if (codeToggleValue !== null) {try {@@ -140,6 +143,14 @@ export default function BadgeRowProvider({}}+ if (skillsToggleValue !== null) {+ try {+ initialValues[AgentCapabilities.skills] = JSON.parse(skillsToggleValue);+ } catch (e) {+ console.error('Failed to parse skills toggle value:', e);+ }+ }+const hasOverrides = Object.keys(initialValues).length > 0;/** Read persisted MCP values from localStorage */@@ -238,9 +249,19 @@ export default function BadgeRowProvider({isAuthenticated: true,});+ /** Skills hook - using a custom key since it's not a Tool but a capability */+ const skills = useToolToggle({+ conversationId,+ storageContextKey,+ toolKey: AgentCapabilities.skills,+ localStorageKey: LocalStorageKeys.LAST_SKILLS_TOGGLE_,+ isAuthenticated: true,+ });+const mcpServerManager = useMCPServerManager({ conversationId, storageContextKey });const value: BadgeRowContextType = {+ skills,webSearch,artifacts,fileSearch,diff --git a/client/src/components/Chat/Input/BadgeRow.tsx b/client/src/components/Chat/Input/BadgeRow.tsxindex 6fea6b0d58..7b7140c9fb 100644--- a/client/src/components/Chat/Input/BadgeRow.tsx+++ b/client/src/components/Chat/Input/BadgeRow.tsx@@ -21,6 +21,7 @@ import FileSearch from './FileSearch';import Artifacts from './Artifacts';import MCPSelect from './MCPSelect';import WebSearch from './WebSearch';+import Skills from './Skills';import store from '~/store';interface BadgeRowProps {@@ -373,6 +374,7 @@ function BadgeRow({<WebSearch /><CodeInterpreter /><FileSearch />+ <Skills /><Artifacts /><MCPSelect /></>diff --git a/client/src/components/Chat/Input/Skills.tsx b/client/src/components/Chat/Input/Skills.tsxnew file mode 100644index 0000000000..2a5706eb5f--- /dev/null+++ b/client/src/components/Chat/Input/Skills.tsx@@ -0,0 +1,36 @@+import React, { memo } from 'react';+import { ScrollText } from 'lucide-react';+import { CheckboxButton } from '@librechat/client';+import { PermissionTypes, Permissions } from 'librechat-data-provider';+import { useLocalize, useHasAccess } from '~/hooks';+import { useBadgeRowContext } from '~/Providers';++function Skills() {+ const localize = useLocalize();+ const context = useBadgeRowContext();+ const { toggleState: skillsActive, debouncedChange, isPinned } = context?.skills ?? {};++ const canUseSkills = useHasAccess({+ permissionType: PermissionTypes.SKILLS,+ permission: Permissions.USE,+ });++ if (!canUseSkills) {+ return null;+ }++ return (+ (skillsActive || isPinned) && (+ <CheckboxButton+ className="max-w-fit"+ checked={skillsActive}+ setValue={debouncedChange}+ label={localize('com_ui_skills')}+ isCheckedClassName="border-cyan-600/40 bg-cyan-500/10 hover:bg-cyan-700/10"+ icon={<ScrollText className="icon-md" aria-hidden="true" />}+ />+ )+ );+}++export default memo(Skills);diff --git a/client/src/components/Chat/Input/ToolsDropdown.tsx b/client/src/components/Chat/Input/ToolsDropdown.tsxindex 0b103c2ea7..6b06d5f3cc 100644--- a/client/src/components/Chat/Input/ToolsDropdown.tsx+++ b/client/src/components/Chat/Input/ToolsDropdown.tsx@@ -1,7 +1,7 @@import React, { useState, useMemo, useCallback } from 'react';import * as Ariakit from '@ariakit/react';-import { Globe, Settings, Settings2, TerminalSquareIcon } from 'lucide-react';import { TooltipAnchor, DropdownPopup, PinIcon, VectorIcon } from '@librechat/client';+import { Globe, ScrollText, Settings, Settings2, TerminalSquareIcon } from 'lucide-react';import type { MenuItemProps } from '~/common';import {AuthType,@@ -26,7 +26,7 @@ const ToolsDropdown = ({ disabled }: ToolsDropdownProps) => {const context = useBadgeRowContext();const { data: startupConfig } = useGetStartupConfig();- const { codeEnabled, webSearchEnabled, artifactsEnabled, fileSearchEnabled } =+ const { codeEnabled, webSearchEnabled, artifactsEnabled, fileSearchEnabled, skillsEnabled } =useAgentCapabilities(context?.agentsConfig?.capabilities ?? defaultAgentCapabilities);const canUseWebSearch = useHasAccess({@@ -49,9 +49,15 @@ const ToolsDropdown = ({ disabled }: ToolsDropdownProps) => {permission: Permissions.USE,});+ const canUseSkills = useHasAccess({+ permissionType: PermissionTypes.SKILLS,+ permission: Permissions.USE,+ });+const [isPopoverActive, setIsPopoverActive] = useState(false);const isDisabled = disabled ?? false;const {+ skills,webSearch,artifacts,fileSearch,@@ -77,6 +83,7 @@ const ToolsDropdown = ({ disabled }: ToolsDropdownProps) => {} = codeInterpreter ?? {};const { isPinned: isFileSearchPinned, setIsPinned: setIsFileSearchPinned } = fileSearch ?? {};const { isPinned: isArtifactsPinned, setIsPinned: setIsArtifactsPinned } = artifacts ?? {};+ const { isPinned: isSkillsPinned, setIsPinned: setIsSkillsPinned } = skills ?? {};const showWebSearchSettings = useMemo(() => {const authTypes = webSearchAuthData?.authTypes ?? [];@@ -131,6 +138,11 @@ const ToolsDropdown = ({ disabled }: ToolsDropdownProps) => {}}, [artifacts]);+ const handleSkillsToggle = useCallback(() => {+ const newValue = !skills?.toggleState;+ skills?.debouncedChange({ value: newValue });+ }, [skills]);+const mcpPlaceholder = startupConfig?.interface?.mcpServers?.placeholder;const dropdownItems: MenuItemProps[] = [];@@ -221,6 +233,38 @@ const ToolsDropdown = ({ disabled }: ToolsDropdownProps) => {});}+ if (canUseSkills && skillsEnabled) {+ dropdownItems.push({+ onClick: handleSkillsToggle,+ hideOnClick: false,+ render: (props) => (+ <div {...props}>+ <div className="flex items-center gap-2">+ <ScrollText className="icon-md" aria-hidden="true" />+ <span>{localize('com_ui_skills')}</span>+ </div>+ <button+ type="button"+ onClick={(e) => {+ e.stopPropagation();+ setIsSkillsPinned?.(!isSkillsPinned);+ }}+ className={cn(+ 'rounded p-1 transition-all duration-200',+ 'hover:bg-surface-secondary hover:shadow-sm',+ !isSkillsPinned && 'text-text-secondary hover:text-text-primary',+ )}+ aria-label={isSkillsPinned ? localize('com_ui_unpin') : localize('com_ui_pin')}+ >+ <div className="h-4 w-4">+ <PinIcon unpin={isSkillsPinned} />+ </div>+ </button>+ </div>+ ),+ });+ }+if (canRunCode && codeEnabled) {dropdownItems.push({onClick: handleCodeInterpreterToggle,diff --git a/client/src/hooks/Agents/useAgentCapabilities.ts b/client/src/hooks/Agents/useAgentCapabilities.tsindex a0f3de025e..170d8f7821 100644--- a/client/src/hooks/Agents/useAgentCapabilities.ts+++ b/client/src/hooks/Agents/useAgentCapabilities.ts@@ -10,6 +10,7 @@ interface AgentCapabilitiesResult {fileSearchEnabled: boolean;webSearchEnabled: boolean;codeEnabled: boolean;+ skillsEnabled: boolean;deferredToolsEnabled: boolean;programmaticToolsEnabled: boolean;}@@ -57,6 +58,11 @@ export default function useAgentCapabilities([capabilities],);+ const skillsEnabled = useMemo(+ () => capabilities?.includes(AgentCapabilities.skills) ?? false,+ [capabilities],+ );+const deferredToolsEnabled = useMemo(() => capabilities?.includes(AgentCapabilities.deferred_tools) ?? false,[capabilities],@@ -71,6 +77,7 @@ export default function useAgentCapabilities(ocrEnabled,codeEnabled,toolsEnabled,+ skillsEnabled,actionsEnabled,contextEnabled,artifactsEnabled,diff --git a/package-lock.json b/package-lock.jsonindex 482c3924a8..6198015fe2 100644--- a/package-lock.json+++ b/package-lock.json@@ -59,7 +59,7 @@"@google/genai": "^1.19.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.80",- "@librechat/agents": "^3.1.68",+ "@librechat/agents": "^3.1.66-dev.0","@librechat/api": "*","@librechat/data-schemas": "*","@microsoft/microsoft-graph-client": "^3.0.7",@@ -3060,6 +3060,7 @@"resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-agent-runtime/-/client-bedrock-agent-runtime-3.984.0.tgz","integrity": "sha512-oZGlDtjWUNUDTpXYeRpnKM66W/x+HjxV+zesSVFPHOVgdNI7eU00GtMYg0Wk0YKZTSPpNAPV7RhxkMSQuyVa6g==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@aws-crypto/sha256-browser": "5.2.0","@aws-crypto/sha256-js": "5.2.0",@@ -3113,6 +3114,7 @@"resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.984.0.tgz","integrity": "sha512-9ebjLA0hMKHeVvXEtTDCCOBtwjb0bOXiuUV06HNeVdgAjH6gj4x4Zwt4IBti83TiyTGOCl5YfZqGx4ehVsasbQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@aws-sdk/types": "^3.973.1","@smithy/types": "^4.12.0",@@ -3129,6 +3131,7 @@"resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz","integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"tslib": "^2.6.2"},@@ -3141,6 +3144,7 @@"resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz","integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@smithy/is-array-buffer": "^4.2.0","tslib": "^2.6.2"@@ -3154,6 +3158,7 @@"resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz","integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@smithy/util-buffer-from": "^4.2.0","tslib": "^2.6.2"@@ -3279,6 +3284,7 @@"resolved": "https://registry.npmjs.org/@aws-sdk/client-kendra/-/client-kendra-3.984.0.tgz","integrity": "sha512-csqS9mbfZmgQbb5NokZQ4siB6rVPsOYtppr80njxVrRPtRIeTq+YU+OXcvea06sbpRL+sNQ+PqOhgW4/HB7swQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@aws-crypto/sha256-browser": "5.2.0","@aws-crypto/sha256-js": "5.2.0",@@ -3329,6 +3335,7 @@"resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.984.0.tgz","integrity": "sha512-9ebjLA0hMKHeVvXEtTDCCOBtwjb0bOXiuUV06HNeVdgAjH6gj4x4Zwt4IBti83TiyTGOCl5YfZqGx4ehVsasbQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@aws-sdk/types": "^3.973.1","@smithy/types": "^4.12.0",@@ -3345,6 +3352,7 @@"resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz","integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"tslib": "^2.6.2"},@@ -3357,6 +3365,7 @@"resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz","integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@smithy/is-array-buffer": "^4.2.0","tslib": "^2.6.2"@@ -3370,6 +3379,7 @@"resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz","integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@smithy/util-buffer-from": "^4.2.0","tslib": "^2.6.2"@@ -9893,6 +9903,7 @@"resolved": "https://registry.npmjs.org/@google/generative-ai/-/generative-ai-0.24.1.tgz","integrity": "sha512-MqO+MLfM6kjxcKoy0p1wRzG3b4ZZXtPI+z2IE26UogS2Cm/XHO+7gGRBh6gcJsOiIVoH93UwKvW4HdgiOZCy9Q==","license": "Apache-2.0",+ "peer": true,"engines": {"node": ">=18.0.0"}@@ -11317,6 +11328,7 @@"resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.34.tgz","integrity": "sha512-8bOW1A2VHRCjbzdYElrjxutKNs9NSIxYRGtR+OJWVzluMqoKKh2NmmFrpPizEyqCUEG2tTq5xt6XA1lwfqMJRA==","license": "MIT",+ "peer": true,"dependencies": {"@anthropic-ai/sdk": "^0.65.0","fast-xml-parser": "5.3.8"@@ -11353,6 +11365,7 @@"resolved": "https://registry.npmjs.org/@langchain/aws/-/aws-0.1.15.tgz","integrity": "sha512-oyOMhTHP0rxdSCVI/g5KXYCOs9Kq/FpXMZbOk1JSIUoaIzUg4p6d98lsHu7erW//8NSaT+SX09QRbVDAgt7pNA==","license": "MIT",+ "peer": true,"dependencies": {"@aws-sdk/client-bedrock-agent-runtime": "^3.755.0","@aws-sdk/client-bedrock-runtime": "^3.840.0",@@ -11452,6 +11465,7 @@"resolved": "https://registry.npmjs.org/@langchain/deepseek/-/deepseek-0.0.2.tgz","integrity": "sha512-u13KbPUXW7uhcybbRzYdRroBgqVUSgG0SJM15c7Etld2yjRQC2c4O/ga9eQZdLh/kaDlQfH/ZITFdjHe77RnGw==","license": "MIT",+ "peer": true,"dependencies": {"@langchain/openai": "^0.5.5"},@@ -11467,6 +11481,7 @@"resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.2.18.tgz","integrity": "sha512-HjWB6Bx4zj7KkiHnqRpx8YNaXdA97sKQMQ17keyWl7nQJlRauNyymm8QGeduKSEfECDr2nGzY8Y/SNY64X6cSA==","license": "MIT",+ "peer": true,"dependencies": {"uuid": "^10.0.0"},@@ -11486,6 +11501,7 @@"https://github.com/sponsors/ctavan"],"license": "MIT",+ "peer": true,"bin": {"uuid": "dist/bin/uuid"}@@ -11495,6 +11511,7 @@"resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.2.18.tgz","integrity": "sha512-xof4jBnPB0YI6OlFuETdbODoM05XBTJoC+qQKJ4qNOcWI7u760sRKm57cvG+jzjParojAxdCdrNEKV47wUpoKg==","license": "MIT",+ "peer": true,"dependencies": {"@langchain/google-common": "^0.2.18","google-auth-library": "^10.1.0"@@ -11511,6 +11528,7 @@"resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.3.tgz","integrity": "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"extend": "^3.0.2","https-proxy-agent": "^7.0.1",@@ -11526,6 +11544,7 @@"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.2.tgz","integrity": "sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"gaxios": "^7.0.0","google-logging-utils": "^1.0.0",@@ -11540,6 +11559,7 @@"resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.5.0.tgz","integrity": "sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w==","license": "Apache-2.0",+ "peer": true,"dependencies": {"base64-js": "^1.3.0","ecdsa-sig-formatter": "^1.0.11",@@ -11558,6 +11578,7 @@"resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.3.tgz","integrity": "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==","license": "Apache-2.0",+ "peer": true,"engines": {"node": ">=14"}@@ -11567,6 +11588,7 @@"resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz","integrity": "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==","license": "MIT",+ "peer": true,"dependencies": {"gaxios": "^7.0.0","jws": "^4.0.0"@@ -11580,6 +11602,7 @@"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz","integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==","license": "MIT",+ "peer": true,"dependencies": {"data-uri-to-buffer": "^4.0.0","fetch-blob": "^3.1.4",@@ -11598,6 +11621,7 @@"resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.2.18.tgz","integrity": "sha512-m9EiN3VKC01A7/625YQ6Q1Lqq8zueewADX4W5Tcme4RImN75zkg2Z7FYbD1Fo6Zwolc4wBNO6LUtbg3no4rv1Q==","license": "MIT",+ "peer": true,"dependencies": {"@google/generative-ai": "^0.24.0","uuid": "^11.1.0"@@ -11614,6 +11638,7 @@"resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.2.18.tgz","integrity": "sha512-oZsOp9Sx4rsFpHH5UiuObo5NYCAqhhmroL3f3pDZ06DB6hpfnNc6XNjdpbmt0AemP6PO/52UlKHeSYtnYlBzIQ==","license": "MIT",+ "peer": true,"dependencies": {"@langchain/google-gauth": "^0.2.18"},@@ -11629,6 +11654,7 @@"resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.4.9.tgz","integrity": "sha512-+rcdTGi4Ium4X/VtIX3Zw4RhxEkYWpwUyz806V6rffjHOAMamg6/WZDxpJbrP33RV/wJG1GH12Z29oX3Pqq3Aw==","license": "MIT",+ "peer": true,"dependencies": {"@langchain/langgraph-checkpoint": "^0.1.1","@langchain/langgraph-sdk": "~0.1.0",@@ -11653,6 +11679,7 @@"resolved": "https://registry.npmjs.org/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-0.1.1.tgz","integrity": "sha512-h2bP0RUikQZu0Um1ZUPErQLXyhzroJqKRbRcxYRTAh49oNlsfeq4A3K4YEDRbGGuyPZI/Jiqwhks1wZwY73AZw==","license": "MIT",+ "peer": true,"dependencies": {"uuid": "^10.0.0"},@@ -11672,6 +11699,7 @@"https://github.com/sponsors/ctavan"],"license": "MIT",+ "peer": true,"bin": {"uuid": "dist/bin/uuid"}@@ -11681,6 +11709,7 @@"resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.1.10.tgz","integrity": "sha512-9srSCb2bSvcvehMgjA2sMMwX0o1VUgPN6ghwm5Fwc9JGAKsQa6n1S4eCwy1h4abuYxwajH5n3spBw+4I2WYbgw==","license": "MIT",+ "peer": true,"dependencies": {"@types/json-schema": "^7.0.15","p-queue": "^6.6.2",@@ -11713,6 +11742,7 @@"https://github.com/sponsors/ctavan"],"license": "MIT",+ "peer": true,"bin": {"uuid": "dist/bin/uuid"}@@ -11726,6 +11756,7 @@"https://github.com/sponsors/ctavan"],"license": "MIT",+ "peer": true,"bin": {"uuid": "dist/bin/uuid"}@@ -11735,6 +11766,7 @@"resolved": "https://registry.npmjs.org/@langchain/mistralai/-/mistralai-0.2.3.tgz","integrity": "sha512-U2gaoRF7zilpc5pvdSoPTpYWo/vF47PPeHwCwd98RSFBracEZ3WGJ4zoXTqM7+4/WF3bTbDZ5f6+YO2PDX66qQ==","license": "MIT",+ "peer": true,"dependencies": {"@mistralai/mistralai": "^1.3.1","uuid": "^10.0.0"@@ -11755,6 +11787,7 @@"https://github.com/sponsors/ctavan"],"license": "MIT",+ "peer": true,"bin": {"uuid": "dist/bin/uuid"}@@ -11764,6 +11797,7 @@"resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.5.18.tgz","integrity": "sha512-CX1kOTbT5xVFNdtLjnM0GIYNf+P7oMSu+dGCFxxWRa3dZwWiuyuBXCm+dToUGxDLnsHuV1bKBtIzrY1mLq/A1Q==","license": "MIT",+ "peer": true,"dependencies": {"js-tiktoken": "^1.0.12","openai": "^5.3.0",@@ -11781,6 +11815,7 @@"resolved": "https://registry.npmjs.org/@langchain/textsplitters/-/textsplitters-0.1.0.tgz","integrity": "sha512-djI4uw9rlkAb5iMhtLED+xJebDdAG935AdP4eRTB02R7OB/act55Bj9wsskhZsvuyQRpO4O1wQOp85s6T6GWmw==","license": "MIT",+ "peer": true,"dependencies": {"js-tiktoken": "^1.0.12"},@@ -11796,6 +11831,7 @@"resolved": "https://registry.npmjs.org/@langchain/xai/-/xai-0.0.3.tgz","integrity": "sha512-NA+0d6z/1focGuakceOz/AspWN9xcz7mYpjLFuCDtOPRLzdjUTRiqljXx9RVSl/VQMA8AzHCOA64m3asYZAYWg==","license": "MIT",+ "peer": true,"dependencies": {"@langchain/openai": "^0.5.5"},@@ -11811,6 +11847,7 @@"resolved": "https://registry.npmjs.org/@langfuse/core/-/core-4.5.1.tgz","integrity": "sha512-caJ2YWcaEU+kbzxFiyzRYaCmKxGzL9DSxbrCer8HbayYo2TaFaAu67Zeili8u8qG4q7TXga4aL2+rpU5ebWdRA==","license": "MIT",+ "peer": true,"peerDependencies": {"@opentelemetry/api": "^1.9.0"}@@ -11820,6 +11857,7 @@"resolved": "https://registry.npmjs.org/@langfuse/langchain/-/langchain-4.5.1.tgz","integrity": "sha512-+pzC/WVR9f8YS3vEi69GmTNzwqJ9z2VZN8tOGYO3zO15b306aMTvUm44/EYCanWiZjhwUNqEM25jEHB+/dCFYA==","license": "MIT",+ "peer": true,"dependencies": {"@langfuse/core": "^4.5.1","@langfuse/tracing": "^4.5.1"@@ -11834,6 +11872,7 @@"resolved": "https://registry.npmjs.org/@langfuse/otel/-/otel-4.5.1.tgz","integrity": "sha512-cqykMEAYmGnd9RSZW2FPCNLda5jKZpCOnHTCu0pQD8EDgxCaHbnmD16k6WyjE/jywh991BcIFXzYub2fNbbSSQ==","license": "MIT",+ "peer": true,"dependencies": {"@langfuse/core": "^4.5.1"},@@ -11852,6 +11891,7 @@"resolved": "https://registry.npmjs.org/@langfuse/tracing/-/tracing-4.5.1.tgz","integrity": "sha512-PvN8fJzEDG2IQMD7/iGhoeEzMM0fJ/ktZdy5gfMfj3/UUccigqV0flxpzvgRoAUss+0ZmqkIlJoaerHKOCMD+A==","license": "MIT",+ "peer": true,"dependencies": {"@langfuse/core": "^4.5.1"},@@ -11914,10 +11954,11 @@}},"node_modules/@librechat/agents": {- "version": "3.1.68",- "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.1.68.tgz",- "integrity": "sha512-lTfyPJkgOHdUFauIAcjt+DnJyTq6ApJWlX2UOqXJtLXmLilLBMl1fx0wb8PnwspB+8sEOm/8gte319wu2cRATw==",+ "version": "3.1.66-dev.0",+ "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.1.66-dev.0.tgz",+ "integrity": "sha512-R4/+PwEP0oYv3Ns/4eFMi6WzYfaWQKaN8u+UbQjjdJJIhG3sSq52aoIqmVQyUXXcFD1nUYlu7LNGUV9PD43oeg==","license": "MIT",+ "peer": true,"dependencies": {"@anthropic-ai/sdk": "^0.73.0","@aws-sdk/client-bedrock-runtime": "^3.1013.0",@@ -12036,6 +12077,7 @@"version": "1.14.0","resolved": "https://registry.npmjs.org/@mistralai/mistralai/-/mistralai-1.14.0.tgz","integrity": "sha512-6zaj2f2LCd37cRpBvCgctkDbXtYBlAC85p+u4uU/726zjtsI+sdVH34qRzkm9iE3tRb8BoaiI0/P7TD+uMvLLQ==",+ "peer": true,"dependencies": {"ws": "^8.18.0","zod": "^3.25.0 || ^4.0.0",@@ -12451,6 +12493,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz","integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==","license": "Apache-2.0",+ "peer": true,"engines": {"node": ">=8.0.0"}@@ -12473,6 +12516,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.2.0.tgz","integrity": "sha512-qRkLWiUEZNAmYapZ7KGS5C4OmBLcP/H2foXeOEaowYCR0wi89fHejrfYfbuLVCMLp/dWZXKvQusdbUEZjERfwQ==","license": "Apache-2.0",+ "peer": true,"engines": {"node": "^18.19.0 || >=20.6.0"},@@ -12501,6 +12545,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.207.0.tgz","integrity": "sha512-K92RN+kQGTMzFDsCzsYNGqOsXRUnko/Ckk+t/yPJao72MewOLgBUTWVHhebgkNfRCYqDz1v3K0aPT9OJkemvgg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@grpc/grpc-js": "^1.7.1","@opentelemetry/core": "2.2.0",@@ -12521,6 +12566,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -12533,6 +12579,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -12548,6 +12595,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -12564,6 +12612,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -12585,6 +12634,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -12601,6 +12651,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -12618,6 +12669,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -12634,6 +12686,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -12651,6 +12704,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.207.0.tgz","integrity": "sha512-JpOh7MguEUls8eRfkVVW3yRhClo5b9LqwWTOg8+i4gjr/+8eiCtquJnC7whvpTIGyff06cLZ2NsEj+CVP3Mjeg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -12670,6 +12724,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -12682,6 +12737,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -12697,6 +12753,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -12713,6 +12770,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -12734,6 +12792,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -12750,6 +12809,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -12767,6 +12827,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -12783,6 +12844,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -12800,6 +12862,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.207.0.tgz","integrity": "sha512-RQJEV/K6KPbQrIUbsrRkEe0ufks1o5OGLHy6jbDD8tRjeCsbFHWfg99lYBRqBV33PYZJXsigqMaAbjWGTFYzLw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -12821,6 +12884,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -12833,6 +12897,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -12848,6 +12913,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -12864,6 +12930,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -12885,6 +12952,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -12901,6 +12969,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -12918,6 +12987,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -12934,6 +13004,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -12951,6 +13022,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.207.0.tgz","integrity": "sha512-6flX89W54gkwmqYShdcTBR1AEF5C1Ob0O8pDgmLPikTKyEv27lByr9yBmO5WrP0+5qJuNPHrLfgFQFYi6npDGA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@grpc/grpc-js": "^1.7.1","@opentelemetry/core": "2.2.0",@@ -12973,6 +13045,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -12985,6 +13058,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -13000,6 +13074,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -13016,6 +13091,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13037,6 +13113,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -13053,6 +13130,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13070,6 +13148,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -13086,6 +13165,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -13103,6 +13183,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.207.0.tgz","integrity": "sha512-fG8FAJmvXOrKXGIRN8+y41U41IfVXxPRVwyB05LoMqYSjugx/FSBkMZUZXUT/wclTdmBKtS5MKoi0bEKkmRhSw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-exporter-base": "0.207.0",@@ -13122,6 +13203,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -13134,6 +13216,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -13149,6 +13232,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -13165,6 +13249,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13186,6 +13271,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -13202,6 +13288,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13219,6 +13306,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -13235,6 +13323,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -13252,6 +13341,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.207.0.tgz","integrity": "sha512-kDBxiTeQjaRlUQzS1COT9ic+et174toZH6jxaVuVAvGqmxOkgjpLOjrI5ff8SMMQE69r03L3Ll3nPKekLopLwg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/exporter-metrics-otlp-http": "0.207.0",@@ -13272,6 +13362,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -13284,6 +13375,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -13299,6 +13391,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -13315,6 +13408,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13336,6 +13430,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -13352,6 +13447,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13369,6 +13465,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -13385,6 +13482,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -13402,6 +13500,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.207.0.tgz","integrity": "sha512-Y5p1s39FvIRmU+F1++j7ly8/KSqhMmn6cMfpQqiDCqDjdDHwUtSq0XI0WwL3HYGnZeaR/VV4BNmsYQJ7GAPrhw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -13419,6 +13518,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -13434,6 +13534,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -13450,6 +13551,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -13466,6 +13568,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.207.0.tgz","integrity": "sha512-7u2ZmcIx6D4KG/+5np4X2qA0o+O0K8cnUDhR4WI/vr5ZZ0la9J9RG+tkSjC7Yz+2XgL6760gSIM7/nyd3yaBLA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@grpc/grpc-js": "^1.7.1","@opentelemetry/core": "2.2.0",@@ -13487,6 +13590,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -13499,6 +13603,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -13514,6 +13619,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -13530,6 +13636,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13551,6 +13658,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -13567,6 +13675,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13584,6 +13693,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -13600,6 +13710,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -13637,6 +13748,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.207.0.tgz","integrity": "sha512-ruUQB4FkWtxHjNmSXjrhmJZFvyMm+tBzHyMm7YPQshApy4wvZUTcrpPyP/A/rCl/8M4BwoVIZdiwijMdbZaq4w==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-exporter-base": "0.207.0",@@ -13656,6 +13768,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -13668,6 +13781,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -13683,6 +13797,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -13699,6 +13814,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13720,6 +13836,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -13736,6 +13853,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13753,6 +13871,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -13769,6 +13888,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -13786,6 +13906,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.2.0.tgz","integrity": "sha512-VV4QzhGCT7cWrGasBWxelBjqbNBbyHicWWS/66KoZoe9BzYwFB72SH2/kkc4uAviQlO8iwv2okIJy+/jqqEHTg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -13804,6 +13925,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -13819,6 +13941,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -13835,6 +13958,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -13852,6 +13976,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.207.0.tgz","integrity": "sha512-y6eeli9+TLKnznrR8AZlQMSJT7wILpXH+6EYq5Vf/4Ao+huI7EedxQHwRgVUOMLFbe7VFDvHJrX9/f4lcwnJsA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","import-in-the-middle": "^2.0.0",@@ -13869,6 +13994,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -13898,6 +14024,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.207.0.tgz","integrity": "sha512-eKFjKNdsPed4q9yYqeI5gBTLjXxDM/8jwhiC0icw3zKxHVGBySoDsed5J5q/PGY/3quzenTr3FiTxA3NiNT+nw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@grpc/grpc-js": "^1.7.1","@opentelemetry/core": "2.2.0",@@ -13916,6 +14043,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -13928,6 +14056,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -13943,6 +14072,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -13959,6 +14089,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -13980,6 +14111,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -13996,6 +14128,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -14013,6 +14146,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -14029,6 +14163,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -14068,6 +14203,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.2.0.tgz","integrity": "sha512-9CrbTLFi5Ee4uepxg2qlpQIozoJuoAZU5sKMx0Mn7Oh+p7UrgCiEV6C02FOxxdYVRRFQVCinYR8Kf6eMSQsIsw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0"},@@ -14083,6 +14219,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -14098,6 +14235,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.2.0.tgz","integrity": "sha512-FfeOHOrdhiNzecoB1jZKp2fybqmqMPJUXe2ZOydP7QzmTPYcfPeuaclTLYVhK3HyJf71kt8sTl92nV4YIaLaKA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0"},@@ -14113,6 +14251,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -14181,6 +14320,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.207.0.tgz","integrity": "sha512-hnRsX/M8uj0WaXOBvFenQ8XsE8FLVh2uSnn1rkWu4mx+qu7EKGUZvZng6y/95cyzsqOfiaDDr08Ek4jppkIDNg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -14217,6 +14357,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz","integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api": "^1.3.0"},@@ -14229,6 +14370,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -14244,6 +14386,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.207.0.tgz","integrity": "sha512-HSRBzXHIC7C8UfPQdu15zEEoBGv0yWkhEwxqgPCHVUKUQ9NLHVGXkVrf65Uaj7UwmAkC1gQfkuVYvLlD//AnUQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-exporter-base": "0.207.0",@@ -14263,6 +14406,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.207.0.tgz","integrity": "sha512-4RQluMVVGMrHok/3SVeSJ6EnRNkA2MINcX88sh+d/7DjGUrewW/WT88IsMEci0wUM+5ykTpPPNbEOoW+jwHnbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/otlp-transformer": "0.207.0"@@ -14279,6 +14423,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.207.0.tgz","integrity": "sha512-+6DRZLqM02uTIY5GASMZWUwr52sLfNiEe20+OEaZKhztCs3+2LxoTjb6JxFRd9q1qNqckXKYlUKjbH/AhG8/ZA==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -14300,6 +14445,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -14316,6 +14462,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.207.0.tgz","integrity": "sha512-4MEQmn04y+WFe6cyzdrXf58hZxilvY59lzZj2AccuHW/+BxLn/rGVN/Irsi/F0qfBOpMOrrCLKTExoSL2zoQmg==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/api-logs": "0.207.0","@opentelemetry/core": "2.2.0",@@ -14333,6 +14480,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz","integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0"@@ -14349,6 +14497,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -14384,6 +14533,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.2.0.tgz","integrity": "sha512-+OaRja3f0IqGG2kptVeYsrZQK9nKRSpfFrKtRBq4uh6nIB8bTBgaGvYQrQoRrQWQMA5dK5yLhDMDc0dvYvCOIQ==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/context-async-hooks": "2.2.0","@opentelemetry/core": "2.2.0",@@ -14401,6 +14551,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz","integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/semantic-conventions": "^1.29.0"},@@ -14416,6 +14567,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz","integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/semantic-conventions": "^1.29.0"@@ -14432,6 +14584,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz","integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"@opentelemetry/core": "2.2.0","@opentelemetry/resources": "2.2.0",@@ -14449,6 +14602,7 @@"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.39.0.tgz","integrity": "sha512-R5R9tb2AXs2IRLNKLBJDynhkfmx7mX0vi8NkhZb3gUkPWHn6HXk5J8iQ/dql0U3ApfWym4kXXmBDRGO+oeOfjg==","license": "Apache-2.0",+ "peer": true,"engines": {"node": ">=14"}@@ -19131,7 +19285,8 @@"resolved": "https://registry.npmjs.org/@scarf/scarf/-/scarf-1.4.0.tgz","integrity": "sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==","hasInstallScript": true,- "license": "Apache-2.0"+ "license": "Apache-2.0",+ "peer": true},"node_modules/@sinclair/typebox": {"version": "0.27.8",@@ -21928,6 +22083,7 @@"version": "1.9.5","resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz","integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==",+ "peer": true,"peerDependencies": {"acorn": "^8"}@@ -23503,6 +23659,7 @@"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz","integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==","license": "MIT",+ "peer": true,"dependencies": {"cheerio-select": "^2.1.0","dom-serializer": "^2.0.0",@@ -23528,6 +23685,7 @@"resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz","integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==","license": "BSD-2-Clause",+ "peer": true,"dependencies": {"boolbase": "^1.0.0","css-select": "^5.1.0",@@ -24459,6 +24617,7 @@"resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz","integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==","license": "BSD-2-Clause",+ "peer": true,"dependencies": {"boolbase": "^1.0.0","css-what": "^6.1.0",@@ -25647,6 +25806,7 @@"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz","integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==","license": "MIT",+ "peer": true,"dependencies": {"domelementtype": "^2.3.0","domhandler": "^5.0.2",@@ -25686,6 +25846,7 @@"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz","integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==","license": "BSD-2-Clause",+ "peer": true,"dependencies": {"domelementtype": "^2.3.0"},@@ -25710,6 +25871,7 @@"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz","integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==","license": "BSD-2-Clause",+ "peer": true,"dependencies": {"dom-serializer": "^2.0.0","domelementtype": "^2.3.0",@@ -25857,6 +26019,7 @@"resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz","integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==","license": "MIT",+ "peer": true,"dependencies": {"iconv-lite": "^0.6.3","whatwg-encoding": "^3.1.1"@@ -25870,6 +26033,7 @@"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz","integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==","license": "MIT",+ "peer": true,"dependencies": {"safer-buffer": ">= 2.1.2 < 3.0.0"},@@ -25895,6 +26059,7 @@"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz","integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==","license": "BSD-2-Clause",+ "peer": true,"engines": {"node": ">=0.12"},@@ -28727,6 +28892,7 @@}],"license": "MIT",+ "peer": true,"dependencies": {"domelementtype": "^2.3.0","domhandler": "^5.0.3",@@ -28739,6 +28905,7 @@"resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz","integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==","license": "BSD-2-Clause",+ "peer": true,"engines": {"node": ">=0.12"},@@ -29016,6 +29183,7 @@"resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-2.0.6.tgz","integrity": "sha512-3vZV3jX0XRFW3EJDTwzWoZa+RH1b8eTTx6YOCjglrLyPuepwoBti1k3L2dKwdCUrnVEfc5CuRuGstaC/uQJJaw==","license": "Apache-2.0",+ "peer": true,"dependencies": {"acorn": "^8.15.0","acorn-import-attributes": "^1.9.5",@@ -34123,7 +34291,8 @@"version": "1.0.4","resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz","integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==",- "license": "MIT"+ "license": "MIT",+ "peer": true},"node_modules/moment": {"version": "2.30.1",@@ -34965,7 +35134,8 @@"version": "1.4.1","resolved": "https://registry.npmjs.org/okapibm25/-/okapibm25-1.4.1.tgz","integrity": "sha512-UHmeH4MAtZXGFVncwbY7pfFvDVNxpsyM3W66aGPU0SHj1+ld59ty+9lJ0ifcrcnPUl1XdYoDgb06ObyCnpTs3g==",- "license": "MIT"+ "license": "MIT",+ "peer": true},"node_modules/ollama": {"version": "0.5.18",@@ -35316,6 +35486,7 @@"resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz","integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==","license": "MIT",+ "peer": true,"dependencies": {"domhandler": "^5.0.3","parse5": "^7.0.0"@@ -35329,6 +35500,7 @@"resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz","integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==","license": "MIT",+ "peer": true,"dependencies": {"parse5": "^7.0.0"},@@ -39305,6 +39477,7 @@"resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz","integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==","license": "MIT",+ "peer": true,"dependencies": {"debug": "^4.3.5","module-details-from-path": "^1.0.3"@@ -44252,7 +44425,7 @@"@google/genai": "^1.19.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.80",- "@librechat/agents": "^3.1.68",+ "@librechat/agents": "^3.1.66-dev.0","@librechat/data-schemas": "*","@modelcontextprotocol/sdk": "^1.29.0","@smithy/node-http-handler": "^4.4.5",diff --git a/packages/api/package.json b/packages/api/package.jsonindex add27cc1e8..efe767bb30 100644--- a/packages/api/package.json+++ b/packages/api/package.json@@ -95,7 +95,7 @@"@google/genai": "^1.19.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.80",- "@librechat/agents": "^3.1.68",+ "@librechat/agents": "^3.1.66-dev.0","@librechat/data-schemas": "*","@modelcontextprotocol/sdk": "^1.29.0","@smithy/node-http-handler": "^4.4.5",diff --git a/packages/api/src/agents/__tests__/skills.test.ts b/packages/api/src/agents/__tests__/skills.test.tsnew file mode 100644index 0000000000..69dcaa2a22--- /dev/null+++ b/packages/api/src/agents/__tests__/skills.test.ts@@ -0,0 +1,183 @@+/** Mock Constants.SKILL_TOOL since the installed SDK version may not include it yet */+jest.mock('@librechat/agents', () => ({+ ...jest.requireActual('@librechat/agents'),+ Constants: {+ ...(jest.requireActual('@librechat/agents') as { Constants: Record<string, unknown> })+ .Constants,+ SKILL_TOOL: 'skill',+ },+}));++import { extractInvokedSkillsFromPayload } from '../run';++describe('extractInvokedSkillsFromPayload', () => {+ it('extracts skill names from assistant messages with skill tool_calls', () => {+ const payload = [+ { role: 'user', content: 'Analyze this' },+ {+ role: 'assistant',+ content: [+ {+ type: 'tool_call',+ tool_call: {+ id: 'call_1',+ name: 'skill' /* Constants.SKILL_TOOL */,+ args: JSON.stringify({ skillName: 'pdf-analyzer' }),+ output: 'Skill loaded.',+ },+ },+ ],+ },+ ];++ const result = extractInvokedSkillsFromPayload(payload);+ expect(result).toEqual(new Set(['pdf-analyzer']));+ });++ it('handles object args (not stringified)', () => {+ const payload = [+ {+ role: 'assistant',+ content: [+ {+ type: 'tool_call',+ tool_call: {+ id: 'call_1',+ name: 'skill' /* Constants.SKILL_TOOL */,+ args: { skillName: 'code-review' },+ output: 'Loaded.',+ },+ },+ ],+ },+ ];++ const result = extractInvokedSkillsFromPayload(payload);+ expect(result).toEqual(new Set(['code-review']));+ });++ it('returns empty set for no skill tool_calls', () => {+ const payload = [+ { role: 'user', content: 'Hello' },+ {+ role: 'assistant',+ content: [+ {+ type: 'tool_call',+ tool_call: { id: 'call_1', name: 'web_search', args: '{}', output: 'Results' },+ },+ ],+ },+ ];++ const result = extractInvokedSkillsFromPayload(payload);+ expect(result.size).toBe(0);+ });++ it('skips non-assistant messages', () => {+ const payload = [+ {+ role: 'user',+ content: [+ {+ type: 'tool_call',+ tool_call: {+ id: 'call_1',+ name: 'skill' /* Constants.SKILL_TOOL */,+ args: '{"skillName":"x"}',+ output: '',+ },+ },+ ],+ },+ ];++ const result = extractInvokedSkillsFromPayload(payload);+ expect(result.size).toBe(0);+ });++ it('gracefully handles malformed JSON args', () => {+ const payload = [+ {+ role: 'assistant',+ content: [+ {+ type: 'tool_call',+ tool_call: {+ id: 'call_1',+ name: 'skill' /* Constants.SKILL_TOOL */,+ args: '{bad json',+ output: '',+ },+ },+ ],+ },+ ];++ const result = extractInvokedSkillsFromPayload(payload);+ expect(result.size).toBe(0);+ });++ it('skips empty skillName', () => {+ const payload = [+ {+ role: 'assistant',+ content: [+ {+ type: 'tool_call',+ tool_call: {+ id: 'call_1',+ name: 'skill' /* Constants.SKILL_TOOL */,+ args: '{"skillName":""}',+ output: '',+ },+ },+ ],+ },+ ];++ const result = extractInvokedSkillsFromPayload(payload);+ expect(result.size).toBe(0);+ });++ it('returns empty set for empty payload', () => {+ expect(extractInvokedSkillsFromPayload([]).size).toBe(0);+ });++ it('deduplicates across multiple messages', () => {+ const payload = [+ {+ role: 'assistant',+ content: [+ {+ type: 'tool_call',+ tool_call: {+ id: 'c1',+ name: 'skill' /* Constants.SKILL_TOOL */,+ args: '{"skillName":"pdf"}',+ output: '',+ },+ },+ ],+ },+ {+ role: 'assistant',+ content: [+ {+ type: 'tool_call',+ tool_call: {+ id: 'c2',+ name: 'skill' /* Constants.SKILL_TOOL */,+ args: '{"skillName":"pdf"}',+ output: '',+ },+ },+ ],+ },+ ];++ const result = extractInvokedSkillsFromPayload(payload);+ expect(result.size).toBe(1);+ expect(result.has('pdf')).toBe(true);+ });+});diff --git a/packages/api/src/agents/handlers.ts b/packages/api/src/agents/handlers.tsindex d1be596219..8ec138ffe4 100644--- a/packages/api/src/agents/handlers.ts+++ b/packages/api/src/agents/handlers.ts@@ -1,14 +1,19 @@import { logger } from '@librechat/data-schemas';-import { GraphEvents, Constants } from '@librechat/agents';+import { GraphEvents, Constants, CODE_EXECUTION_TOOLS } from '@librechat/agents';import type {LCTool,EventHandler,LCToolRegistry,+ InjectedMessage,ToolCallRequest,ToolExecuteResult,ToolExecuteBatchRequest,} from '@librechat/agents';+import type { Types } from 'mongoose';import type { StructuredToolInterface } from '@langchain/core/tools';+import type { ServerRequest } from '~/types';+import { primeSkillFiles } from './skillFiles';+import type { SkillFileRecord } from './skillFiles';import { runOutsideTracing } from '~/utils';export interface ToolEndCallbackData {@@ -43,6 +48,446 @@ export interface ToolExecuteOptions {}>;/** Callback to process tool artifacts (code output files, file citations, etc.) */toolEndCallback?: ToolEndCallback;+ /** Loads a skill by name with ACL constraint (returns full body for injection) */+ getSkillByName?: (+ name: string,+ accessibleIds: Types.ObjectId[],+ ) => Promise<{+ body: string;+ name: string;+ _id: Types.ObjectId;+ fileCount: number;+ } | null>;+ /** Lists files bundled with a skill (for code env priming) */+ listSkillFiles?: (skillId: Types.ObjectId | string) => Promise<SkillFileRecord[]>;+ /** Storage strategy resolver for skill file streaming */+ getStrategyFunctions?: (source: string) => {+ getDownloadStream?: (req: ServerRequest, filepath: string) => Promise<NodeJS.ReadableStream>;+ [key: string]: unknown;+ };+ /** Batch uploads files to the code execution environment */+ batchUploadCodeEnvFiles?: (params: {+ req: ServerRequest;+ files: Array<{ stream: NodeJS.ReadableStream; filename: string }>;+ apiKey: string;+ entity_id?: string;+ }) => Promise<{ session_id: string; files: Array<{ fileId: string; filename: string }> }>;+ /** Checks if a code env file is still active. Returns lastModified or null. */+ getSessionInfo?: (fileIdentifier: string, apiKey: string) => Promise<string | null>;+ /** 23-hour freshness check */+ checkIfActive?: (dateString: string) => boolean;+ /** Persists codeEnvIdentifiers on skill files after upload */+ updateSkillFileCodeEnvIds?: (+ updates: Array<{+ skillId: Types.ObjectId | string;+ relativePath: string;+ codeEnvIdentifier: string;+ }>,+ ) => Promise<void>;+ /** Loads a skill file by path (for read_file tool) */+ getSkillFileByPath?: (+ skillId: Types.ObjectId | string,+ relativePath: string,+ ) => Promise<{+ content?: string;+ isBinary?: boolean;+ mimeType: string;+ bytes: number;+ filepath: string;+ source: string;+ relativePath: string;+ } | null>;+ /** Updates cached content on a skill file (lazy caching after first read) */+ updateSkillFileContent?: (+ skillId: Types.ObjectId | string,+ relativePath: string,+ update: { content?: string; isBinary?: boolean },+ ) => Promise<void>;+}++const MAX_READABLE_BYTES = 262_144;+const MAX_BINARY_BYTES = 5 * 1024 * 1024;+const MAX_CACHE_BYTES = 512 * 1024;++const IMAGE_MIMES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp']);++function addLineNumbers(content: string): string {+ const lines = content.split('\n');+ const w = String(lines.length).length;+ return lines.map((l, i) => `${String(i + 1).padStart(w, ' ')} | ${l}`).join('\n');+}++async function handleReadFileCall(+ tc: ToolCallRequest,+ mergedConfigurable: Record<string, unknown>,+ options: ToolExecuteOptions,+ req?: ServerRequest,+): Promise<ToolExecuteResult> {+ const { getSkillByName, getSkillFileByPath, getStrategyFunctions, updateSkillFileContent } =+ options;+ const args = tc.args as { file_path?: string };+ if (!args.file_path) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: 'file_path is required',+ };+ }++ const slashIdx = args.file_path.indexOf('/');+ if (slashIdx < 1) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: `Invalid file path "${args.file_path}". Use format: {skillName}/{path}`,+ };+ }++ const skillName = args.file_path.slice(0, slashIdx);+ const relativePath = args.file_path.slice(slashIdx + 1);+ if (!relativePath) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: 'Missing file path after skill name',+ };+ }++ if (!getSkillByName) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: 'File reading is not configured',+ };+ }++ const accessibleIds = (mergedConfigurable?.accessibleSkillIds as Types.ObjectId[]) ?? [];+ const skill = await getSkillByName(skillName, accessibleIds);+ if (!skill) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: `Skill "${skillName}" not found or not accessible`,+ };+ }++ // SKILL.md special case: read from skill.body directly+ if (relativePath === 'SKILL.md') {+ if (!skill.body) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: `SKILL.md is empty for skill "${skillName}"`,+ };+ }+ return {+ toolCallId: tc.id,+ status: 'success',+ content: `File: ${args.file_path}\n\n${addLineNumbers(skill.body)}`,+ };+ }++ if (!getSkillFileByPath) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: 'File reading is not configured',+ };+ }++ const file = await getSkillFileByPath(skill._id, relativePath);+ if (!file) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: `File not found: "${relativePath}" in skill "${skillName}"`,+ };+ }++ // Known binary — serve images as artifacts, others as metadata+ if (file.isBinary === true) {+ if (IMAGE_MIMES.has(file.mimeType) && file.bytes <= MAX_BINARY_BYTES) {+ // Stream and return as image artifact (handled below in stream path)+ } else {+ return {+ toolCallId: tc.id,+ status: 'success',+ content: `Binary file (${file.mimeType}, ${file.bytes} bytes). Use bash to process: /mnt/data/${args.file_path}`,+ };+ }+ }++ // Cached text content+ if (file.isBinary !== true && file.content != null && file.content !== '') {+ return {+ toolCallId: tc.id,+ status: 'success',+ content: `File: ${args.file_path} (${file.bytes} bytes)\n\n${addLineNumbers(file.content)}`,+ };+ }++ // Early size check from DB metadata before streaming+ const isImage = IMAGE_MIMES.has(file.mimeType);+ if (!isImage && file.bytes > MAX_READABLE_BYTES) {+ return {+ toolCallId: tc.id,+ status: 'success',+ content: `File "${args.file_path}" is too large to read directly (${file.bytes} bytes, limit: ${MAX_READABLE_BYTES}). Invoke the skill first, then use bash to read it at /mnt/data/${args.file_path}.`,+ };+ }+ if (isImage && file.bytes > MAX_BINARY_BYTES) {+ return {+ toolCallId: tc.id,+ status: 'success',+ content: `File too large (${file.bytes} bytes, limit: ${MAX_BINARY_BYTES}). Use bash to process: /mnt/data/${args.file_path}`,+ };+ }++ // Stream from storage+ if (!getStrategyFunctions || !req) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: 'Storage access not available',+ };+ }++ try {+ const strategy = getStrategyFunctions(file.source);+ if (!strategy.getDownloadStream) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: 'Download not supported for this storage backend',+ };+ }++ const stream = await strategy.getDownloadStream(req, file.filepath);+ const chunks: Buffer[] = [];+ // Use the larger binary limit as streaming cap; cheaper type-specific+ // checks happen after binary detection on the assembled buffer.+ const streamLimit = MAX_BINARY_BYTES;+ let streamedBytes = 0;+ for await (const chunk of stream as AsyncIterable<Buffer>) {+ streamedBytes += chunk.length;+ if (streamedBytes > streamLimit) {+ // Destroy the stream if possible to free resources+ if (+ 'destroy' in stream &&+ typeof (stream as NodeJS.ReadableStream & { destroy?: () => void }).destroy === 'function'+ ) {+ (stream as NodeJS.ReadableStream & { destroy: () => void }).destroy();+ }+ return {+ toolCallId: tc.id,+ status: 'success',+ content: `File "${args.file_path}" exceeded streaming limit (${streamLimit} bytes). Invoke the skill first, then use bash to read it at /mnt/data/${args.file_path}.`,+ };+ }+ chunks.push(chunk);+ }+ const buffer = Buffer.concat(chunks);++ // Binary detection on first 8KB+ const checkLen = Math.min(buffer.length, 8192);+ let isBinary = file.isBinary === true;+ if (!isBinary) {+ for (let i = 0; i < checkLen; i++) {+ if (buffer[i] === 0) {+ isBinary = true;+ break;+ }+ }+ }++ if (isBinary) {+ // Cache the binary flag (first read only)+ if (file.isBinary == null && updateSkillFileContent) {+ updateSkillFileContent(skill._id, relativePath, { isBinary: true }).catch(+ (err: unknown) => {+ logger.warn(+ '[handleReadFileCall] cache write failed:',+ err instanceof Error ? err.message : err,+ );+ },+ );+ }++ // Return images/PDFs as artifacts+ if (IMAGE_MIMES.has(file.mimeType) && buffer.length <= MAX_BINARY_BYTES) {+ const base64 = buffer.toString('base64');+ return {+ toolCallId: tc.id,+ status: 'success',+ content: `Image: ${args.file_path} (${buffer.length} bytes, ${file.mimeType})`,+ artifact: {+ content: [+ { type: 'image_url', image_url: { url: `data:${file.mimeType};base64,${base64}` } },+ ],+ },+ };+ }++ // TODO: PDF artifact support requires a document content block path+ // (image_url runs image processing which fails for PDFs). Falls through+ // to the generic binary handler below.++ return {+ toolCallId: tc.id,+ status: 'success',+ content: `Binary file (${file.mimeType}, ${buffer.length} bytes). Use bash to process: /mnt/data/${args.file_path}`,+ };+ }++ const text = buffer.toString('utf-8');++ // Cache text on first read (skill files are immutable)+ if (file.content == null && updateSkillFileContent && buffer.length <= MAX_CACHE_BYTES) {+ updateSkillFileContent(skill._id, relativePath, { content: text, isBinary: false }).catch(+ (err: unknown) => {+ logger.warn(+ '[handleReadFileCall] cache write failed:',+ err instanceof Error ? err.message : err,+ );+ },+ );+ }++ if (buffer.length > MAX_READABLE_BYTES) {+ return {+ toolCallId: tc.id,+ status: 'success',+ content: `File too large (${buffer.length} bytes, limit: ${MAX_READABLE_BYTES}). Use bash: cat /mnt/data/${args.file_path}`,+ };+ }++ return {+ toolCallId: tc.id,+ status: 'success',+ content: `File: ${args.file_path} (${buffer.length} bytes)\n\n${addLineNumbers(text)}`,+ };+ } catch (error) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: `Failed to read file: ${error instanceof Error ? error.message : 'Unknown error'}`,+ };+ }+}++async function handleSkillToolCall(+ tc: ToolCallRequest,+ mergedConfigurable: Record<string, unknown>,+ options: ToolExecuteOptions,+ req?: ServerRequest,+): Promise<ToolExecuteResult> {+ const {+ getSkillByName,+ listSkillFiles,+ getStrategyFunctions,+ batchUploadCodeEnvFiles,+ getSessionInfo,+ checkIfActive,+ updateSkillFileCodeEnvIds,+ } = options;+ const args = tc.args as { skillName?: string; args?: string };+ if (!args.skillName) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: 'skillName is required',+ };+ }++ if (!getSkillByName) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: 'Skill execution is not configured',+ };+ }++ const accessibleIds = (mergedConfigurable?.accessibleSkillIds as Types.ObjectId[]) ?? [];+ const skill = await getSkillByName(args.skillName, accessibleIds);++ if (!skill) {+ return {+ toolCallId: tc.id,+ status: 'error',+ content: '',+ errorMessage: `Skill "${args.skillName}" not found or not accessible`,+ };+ }++ let body = skill.body;+ if (args.args) {+ body = body.replace(/\$ARGUMENTS/g, args.args);+ }++ const injectedMessages: InjectedMessage[] = [+ { role: 'user', content: body, isMeta: true, source: 'skill', skillName: skill.name },+ ];++ const contentText = `Skill "${args.skillName}" loaded. Follow the instructions below.`;+ let artifact:+ | { session_id: string; files: Array<{ id: string; session_id: string; name: string }> }+ | undefined;++ // Prime skill files to code env when the skill has bundled files+ if (+ skill.fileCount > 0 &&+ req &&+ listSkillFiles &&+ getStrategyFunctions &&+ batchUploadCodeEnvFiles+ ) {+ const codeApiKey = (mergedConfigurable?.codeApiKey as string) ?? '';+ if (codeApiKey) {+ try {+ const skillFiles = await listSkillFiles(skill._id);+ const primeResult = await primeSkillFiles({+ skill,+ skillFiles,+ req,+ apiKey: codeApiKey,+ getStrategyFunctions,+ batchUploadCodeEnvFiles,+ getSessionInfo,+ checkIfActive,+ updateSkillFileCodeEnvIds,+ });+ if (primeResult) {+ artifact = primeResult;+ }+ } catch (error) {+ logger.error(+ `[handleSkillToolCall] Failed to prime files for skill "${args.skillName}":`,+ error instanceof Error ? error.message : error,+ );+ }+ }+ }++ return {+ toolCallId: tc.id,+ content: contentText,+ status: 'success',+ artifact,+ injectedMessages,+ };}/**@@ -70,6 +515,36 @@ export function createToolExecuteHandler(options: ToolExecuteOptions): EventHandconst results: ToolExecuteResult[] = await Promise.all(toolCalls.map(async (tc: ToolCallRequest) => {+ if (tc.name === Constants.SKILL_TOOL || tc.name === Constants.READ_FILE) {+ const req = mergedConfigurable?.req as ServerRequest | undefined;+ const handlerResult =+ tc.name === Constants.SKILL_TOOL+ ? await handleSkillToolCall(tc, mergedConfigurable, options, req)+ : await handleReadFileCall(tc, mergedConfigurable, options, req);++ if (toolEndCallback && handlerResult.artifact) {+ await toolEndCallback(+ {+ output: {+ name: tc.name,+ tool_call_id: tc.id,+ content: handlerResult.content,+ artifact: handlerResult.artifact,+ },+ },+ {+ run_id: (metadata as Record<string, unknown>)?.run_id as string | undefined,+ thread_id: (metadata as Record<string, unknown>)?.thread_id as+ | string+ | undefined,+ ...metadata,+ },+ );+ }++ return handlerResult;+ }+const tool = toolMap.get(tc.name);if (!tool) {@@ -91,11 +566,7 @@ export function createToolExecuteHandler(options: ToolExecuteOptions): EventHandturn: tc.turn,};- if (- tc.codeSessionContext &&- (tc.name === Constants.EXECUTE_CODE ||- tc.name === Constants.PROGRAMMATIC_TOOL_CALLING)- ) {+ if (tc.codeSessionContext && CODE_EXECUTION_TOOLS.has(tc.name)) {toolCallConfig.session_id = tc.codeSessionContext.session_id;if (tc.codeSessionContext.files && tc.codeSessionContext.files.length > 0) {toolCallConfig._injected_files = tc.codeSessionContext.files;diff --git a/packages/api/src/agents/index.ts b/packages/api/src/agents/index.tsindex 2dad6b33d4..dd482b0689 100644--- a/packages/api/src/agents/index.ts+++ b/packages/api/src/agents/index.ts@@ -16,6 +16,9 @@ export * from './transactions';export * from './usage';export * from './resources';export * from './responses';+export * from './skills';+export * from './skillConfigurable';+export * from './skillFiles';export * from './run';export * from './tools';export * from './validation';diff --git a/packages/api/src/agents/initialize.ts b/packages/api/src/agents/initialize.tsindex 5105b21305..81f4bdb8a7 100644--- a/packages/api/src/agents/initialize.ts+++ b/packages/api/src/agents/initialize.ts@@ -30,6 +30,7 @@ import {import { filterFilesByEndpointConfig } from '~/files';import { generateArtifactsPrompt } from '~/prompts';import { getProviderConfig } from '~/endpoints';+import { injectSkillCatalog } from './skills';import { primeResources } from './resources';import type { TFilterFilesByAgentAccess } from './resources';@@ -66,6 +67,10 @@ export type InitializedAgent = Agent & {actionsEnabled?: boolean;/** Maximum characters allowed in a single tool result before truncation. */maxToolResultChars?: number;+ /** Accessible skill IDs for ACL checking at execute time */+ accessibleSkillIds?: import('mongoose').Types.ObjectId[];+ /** Number of skills in the catalog (used to determine if SkillTool should be registered) */+ skillCount?: number;};export const DEFAULT_MAX_CONTEXT_TOKENS = 32000;@@ -114,6 +119,10 @@ export interface InitializeAgentParams {allowedProviders: Set<string>;/** Whether this is the initial agent */isInitialAgent?: boolean;+ /** Accessible skill IDs for this user (pre-computed by the caller via ACL query) */+ accessibleSkillIds?: import('mongoose').Types.ObjectId[];+ /** Whether the code execution environment is available (execute_code capability enabled) */+ codeEnvAvailable?: boolean;}/**@@ -145,6 +154,11 @@ export interface InitializeAgentDbMethods extends EndpointDbMethods {parentMessageId?: string;files?: Array<{ file_id: string }>;}> | null>;+ /** List skill summaries for catalog injection (paginated, omits body/frontmatter) */+ listSkillsByAccess?: (params: {+ accessibleIds: import('mongoose').Types.ObjectId[];+ limit: number;+ }) => Promise<{ skills: Array<{ name: string; description: string }> }>;}/**@@ -301,7 +315,7 @@ export async function initializeAgent(toolRegistry,toolContextMap,userMCPAuthMap,- toolDefinitions,+ toolDefinitions: loadedToolDefinitions,hasDeferredTools,actionsEnabled,tools: structuredTools,@@ -324,6 +338,8 @@ export async function initializeAgent(actionsEnabled: undefined,};+ let toolDefinitions = loadedToolDefinitions;+const { getOptions, overrideProvider, customEndpointConfig } = getProviderConfig({provider,appConfig: req.config,@@ -416,6 +432,22 @@ export async function initializeAgent(agent.additional_instructions = artifactsPromptResult ?? undefined;}+ let skillCount = 0;+ const { accessibleSkillIds } = params;+ if (accessibleSkillIds && accessibleSkillIds.length > 0) {+ const skillResult = await injectSkillCatalog({+ agent,+ toolDefinitions,+ toolRegistry,+ accessibleSkillIds,+ contextWindowTokens: Number(agentMaxContextTokens) || 200_000,+ listSkillsByAccess: db?.listSkillsByAccess,+ codeEnvAvailable: params.codeEnvAvailable,+ });+ toolDefinitions = skillResult.toolDefinitions;+ skillCount = skillResult.skillCount;+ }+const agentMaxContextNum = Number(agentMaxContextTokens) || DEFAULT_MAX_CONTEXT_TOKENS;const maxOutputTokensNum = Number(maxOutputTokens) || 0;const baseContextTokens = Math.max(0, agentMaxContextNum - maxOutputTokensNum);@@ -447,6 +479,8 @@ export async function initializeAgent(hasDeferredTools,actionsEnabled,baseContextTokens,+ skillCount,+ accessibleSkillIds: params.accessibleSkillIds,attachments: finalAttachments,toolContextMap: toolContextMap ?? {},useLegacyContent: !!options.useLegacyContent,diff --git a/packages/api/src/agents/run.ts b/packages/api/src/agents/run.tsindex a2327d279c..b79fe92cfd 100644--- a/packages/api/src/agents/run.ts+++ b/packages/api/src/agents/run.ts@@ -117,6 +117,62 @@ export function extractDiscoveredToolsFromHistory(messages: BaseMessage[]): Set<return discoveredTools;}+/**+ * Extracts skill names that were invoked in previous turns from raw message payload.+ * Scans assistant messages for tool_call content parts where name === 'skill'.+ * Works with TPayload (raw message objects) so it can run before formatAgentMessages.+ *+ * @param payload - The raw conversation message payload+ * @returns Set of skill names that were previously invoked+ */+export function extractInvokedSkillsFromPayload(+ payload: Array<Partial<{ role: string; content: unknown }>>,+): Set<string> {+ const invokedSkills = new Set<string>();++ for (const message of payload) {+ if (message.role !== 'assistant') {+ continue;+ }++ const content = message.content;+ if (!Array.isArray(content)) {+ continue;+ }++ for (const part of content) {+ if (+ part == null ||+ typeof part !== 'object' ||+ (part as { type?: string }).type !== 'tool_call'+ ) {+ continue;+ }+ const toolCall = (part as { tool_call?: { name?: string; args?: unknown } }).tool_call;+ if (toolCall?.name !== Constants.SKILL_TOOL) {+ continue;+ }+ const rawArgs = toolCall.args;+ const args =+ typeof rawArgs === 'string'+ ? (() => {+ try {+ return JSON.parse(rawArgs) as Record<string, unknown>;+ } catch {+ return {};+ }+ })()+ : (rawArgs as Record<string, unknown> | undefined);+ const skillName = args?.skillName;+ if (typeof skillName === 'string' && skillName.length > 0) {+ invokedSkills.add(skillName);+ }+ }+ }++ return invokedSkills;+}+/*** Overrides defer_loading to false for tools that were already discovered via tool_search.* This prevents the LLM from having to re-discover tools on every turn.@@ -463,6 +519,7 @@ export async function createRun({tokenCounter,customHandlers,indexTokenCountMap,+ initialSessions,summarizationConfig,initialSummary,calibrationRatio,@@ -489,9 +546,10 @@ export async function createRun({* (e.g. "Ollama") in the summarization config to SDK-recognized providers.*/appConfig?: AppConfig;-} & Pick<RunConfig, 'tokenCounter' | 'customHandlers' | 'indexTokenCountMap'>): Promise<- Run<IState>-> {+} & Pick<+ RunConfig,+ 'tokenCounter' | 'customHandlers' | 'indexTokenCountMap' | 'initialSessions'+>): Promise<Run<IState>> {/*** Only extract discovered tools if:* 1. We have message history to parse@@ -641,6 +699,7 @@ export async function createRun({tokenCounter,customHandlers,indexTokenCountMap,+ initialSessions,calibrationRatio,});}diff --git a/packages/api/src/agents/skillConfigurable.ts b/packages/api/src/agents/skillConfigurable.tsnew file mode 100644index 0000000000..e41012820a--- /dev/null+++ b/packages/api/src/agents/skillConfigurable.ts@@ -0,0 +1,43 @@+import { EnvVar } from '@librechat/agents';+import { logger } from '@librechat/data-schemas';++/**+ * Augments a loadTools result with skill-specific configurable properties.+ * Loads the code API key and merges it with accessibleSkillIds and the request object.+ */+export async function enrichWithSkillConfigurable(+ result: { loadedTools: unknown[]; configurable?: Record<string, unknown> },+ req: { user?: { id?: string } },+ accessibleSkillIds: unknown[],+ loadAuthValues: (params: {+ userId: string;+ authFields: string[];+ }) => Promise<Record<string, string>>,+ /** Pre-resolved code API key. When provided, loadAuthValues is skipped. */+ preResolvedCodeApiKey?: string,+): Promise<{ loadedTools: unknown[]; configurable: Record<string, unknown> }> {+ let codeApiKey: string | undefined = preResolvedCodeApiKey;+ if (!codeApiKey) {+ try {+ const authValues = await loadAuthValues({+ userId: req.user?.id ?? '',+ authFields: [EnvVar.CODE_API_KEY],+ });+ codeApiKey = authValues[EnvVar.CODE_API_KEY];+ } catch (err) {+ logger.debug(+ '[enrichWithSkillConfigurable] loadAuthValues failed:',+ err instanceof Error ? err.message : err,+ );+ }+ }+ return {+ ...result,+ configurable: {+ ...result.configurable,+ req,+ codeApiKey,+ accessibleSkillIds,+ },+ };+}diff --git a/packages/api/src/agents/skillFiles.ts b/packages/api/src/agents/skillFiles.tsnew file mode 100644index 0000000000..72156fcea0--- /dev/null+++ b/packages/api/src/agents/skillFiles.ts@@ -0,0 +1,434 @@+import { Readable } from 'stream';+import { Constants, EnvVar } from '@librechat/agents';+import { logger } from '@librechat/data-schemas';+import type { ToolSessionMap, CodeSessionContext } from '@librechat/agents';+import type { Types } from 'mongoose';+import type { ServerRequest } from '~/types';+import { extractInvokedSkillsFromPayload } from './run';++export interface SkillFileRecord {+ relativePath: string;+ filename: string;+ filepath: string;+ source: string;+ bytes: number;+ codeEnvIdentifier?: string;+}++export interface PrimeSkillFilesParams {+ skill: { body: string; name: string; _id: Types.ObjectId | string };+ skillFiles: SkillFileRecord[];+ req: ServerRequest;+ apiKey: string;+ getStrategyFunctions: (source: string) => {+ getDownloadStream?: (req: ServerRequest, filepath: string) => Promise<NodeJS.ReadableStream>;+ [key: string]: unknown;+ };+ batchUploadCodeEnvFiles: (params: {+ req: ServerRequest;+ files: Array<{ stream: NodeJS.ReadableStream; filename: string }>;+ apiKey: string;+ entity_id?: string;+ }) => Promise<{+ session_id: string;+ files: Array<{ fileId: string; filename: string }>;+ }>;+ /** Checks if a code env file is still active. Returns lastModified timestamp or null. */+ getSessionInfo?: (fileIdentifier: string, apiKey: string) => Promise<string | null>;+ /** 23-hour freshness check */+ checkIfActive?: (dateString: string) => boolean;+ /** Persists codeEnvIdentifier on skill files after upload */+ updateSkillFileCodeEnvIds?: (+ updates: Array<{+ skillId: Types.ObjectId | string;+ relativePath: string;+ codeEnvIdentifier: string;+ }>,+ ) => Promise<void>;+}++export interface PrimeSkillFilesResult {+ session_id: string;+ files: Array<{ id: string; session_id: string; name: string }>;+}++/**+ * Uploads skill files to the code execution environment.+ *+ * Smart re-upload: if skill files have existing codeEnvIdentifiers,+ * checks session freshness first. If the session is still active,+ * returns cached references. Otherwise batch-uploads everything.+ *+ * After upload, persists new codeEnvIdentifiers on the SkillFile+ * documents for future freshness checks.+ */+export async function primeSkillFiles(+ params: PrimeSkillFilesParams,+): Promise<PrimeSkillFilesResult | null> {+ const {+ skill,+ skillFiles,+ req,+ apiKey,+ getStrategyFunctions,+ batchUploadCodeEnvFiles,+ getSessionInfo,+ checkIfActive,+ updateSkillFileCodeEnvIds,+ } = params;++ // Check if ALL existing sessions are still active before reusing cached refs.+ // Files normally share one session, but a partial bulkWrite failure during+ // updateSkillFileCodeEnvIds can leave mixed session IDs. Checking every+ // distinct session prevents serving stale identifiers that 404 in code env.+ if (getSessionInfo && checkIfActive && skillFiles.length > 0) {+ // All files must have identifiers for the cache to be complete.+ // Any missing identifier means partial persistence — fall through to re-upload.+ const allHaveIds = skillFiles.every((sf) => sf.codeEnvIdentifier);+ if (allHaveIds) {+ const sessionIds = new Set(+ skillFiles.map((sf) => (sf.codeEnvIdentifier as string).split('?')[0].split('/')[0]),+ );++ try {+ const checkResults = await Promise.all(+ Array.from(sessionIds).map(async (sid) => {+ const representative = skillFiles.find((sf) =>+ sf.codeEnvIdentifier!.startsWith(`${sid}/`),+ );+ if (!representative) {+ return false;+ }+ const lastModified = await getSessionInfo(representative.codeEnvIdentifier!, apiKey);+ return !!(lastModified && checkIfActive(lastModified));+ }),+ );+ const allActive = checkResults.every(Boolean);++ if (allActive) {+ const files: PrimeSkillFilesResult['files'] = [];+ for (const sf of skillFiles) {+ const [sid, fid] = (sf.codeEnvIdentifier as string).split('?')[0].split('/');+ files.push({ id: fid, session_id: sid, name: `${skill.name}/${sf.relativePath}` });+ }++ if (files.length > 0) {+ logger.debug(+ `[primeSkillFiles] All ${sessionIds.size} session(s) active for skill "${skill.name}", reusing ${files.length} files`,+ );+ return { session_id: files[0].session_id, files };+ }+ }+ } catch {+ // Session check failed — fall through to re-upload+ }+ }+ }++ // Collect streams for batch upload+ const filesToUpload: Array<{ stream: NodeJS.ReadableStream; filename: string }> = [];++ // SKILL.md from the skill body+ const bodyBuffer = Buffer.from(skill.body, 'utf-8');+ filesToUpload.push({ stream: Readable.from(bodyBuffer), filename: `${skill.name}/SKILL.md` });++ // Bundled files from storage (parallel stream acquisition)+ const streamResults = await Promise.allSettled(+ skillFiles.map(async (file) => {+ const strategy = getStrategyFunctions(file.source);+ if (!strategy.getDownloadStream) {+ logger.warn(+ `[primeSkillFiles] No download stream for "${file.relativePath}" (source: ${file.source})`,+ );+ return null;+ }+ const stream = await strategy.getDownloadStream(req, file.filepath);+ return { stream, filename: `${skill.name}/${file.relativePath}` };+ }),+ );+ for (const result of streamResults) {+ if (result.status === 'fulfilled' && result.value) {+ filesToUpload.push(result.value);+ } else if (result.status === 'rejected') {+ logger.error('[primeSkillFiles] Failed to get stream:', result.reason);+ }+ }++ if (filesToUpload.length === 0) {+ return null;+ }++ try {+ const entityId = skill._id.toString();+ const result = await batchUploadCodeEnvFiles({+ req,+ files: filesToUpload,+ apiKey,+ entity_id: entityId,+ });+ // Exclude SKILL.md from the returned files array — it is uploaded to disk+ // for bash access but has no codeEnvIdentifier (cannot be cached). Omitting+ // it here keeps the fresh-upload and cache-hit code paths consistent.+ const files = result.files+ .filter((f) => !f.filename.endsWith('/SKILL.md'))+ .map((f) => ({+ id: f.fileId,+ session_id: result.session_id,+ name: f.filename,+ }));++ // Treat partial upload failures as a priming failure — missing bundled+ // files cause follow-up bash/read calls to fail at runtime with missing paths.+ const expectedCount = filesToUpload.filter((f) => !f.filename.endsWith('/SKILL.md')).length;+ if (files.length < expectedCount) {+ const uploadedNames = new Set(result.files.map((f) => f.filename));+ const missingNames = filesToUpload+ .filter((f) => !f.filename.endsWith('/SKILL.md') && !uploadedNames.has(f.filename))+ .map((f) => f.filename);+ logger.error(+ `[primeSkillFiles] Partial upload failure for skill "${skill.name}": ${missingNames.length} file(s) missing: ${missingNames.join(', ')}`,+ );+ return null;+ }++ // Persist codeEnvIdentifiers on skill files (fire-and-forget)+ if (updateSkillFileCodeEnvIds) {+ const updates = result.files+ .filter((f) => !f.filename.endsWith('/SKILL.md'))+ .map((f) => ({+ skillId: skill._id,+ relativePath: f.filename.slice(f.filename.indexOf('/') + 1),+ codeEnvIdentifier: `${result.session_id}/${f.fileId}?entity_id=${entityId}`,+ }));+ if (updates.length > 0) {+ updateSkillFileCodeEnvIds(updates).catch((err: unknown) => {+ logger.warn(+ '[primeSkillFiles] Failed to persist codeEnvIdentifiers:',+ err instanceof Error ? err.message : err,+ );+ });+ }+ }++ return { session_id: result.session_id, files };+ } catch (error) {+ logger.error(+ `[primeSkillFiles] Batch upload failed for skill "${skill.name}":`,+ error instanceof Error ? error.message : error,+ );+ return null;+ }+}++export interface PrimeInvokedSkillsDeps {+ req: ServerRequest;+ /** Raw message payload (before formatAgentMessages). Used to extract invoked skill names. */+ payload: Array<Partial<{ role: string; content: unknown }>>;+ accessibleSkillIds: Types.ObjectId[];+ /** Pre-resolved code API key. When provided, loadAuthValues is not called (avoids redundant lookups). */+ codeApiKey?: string;+ loadAuthValues: (params: {+ userId: string;+ authFields: string[];+ }) => Promise<Record<string, string>>;+ getSkillByName: (+ name: string,+ accessibleIds: Types.ObjectId[],+ ) => Promise<{ body: string; name: string; _id: Types.ObjectId; fileCount: number } | null>;+ listSkillFiles: (skillId: Types.ObjectId | string) => Promise<SkillFileRecord[]>;+ getStrategyFunctions: PrimeSkillFilesParams['getStrategyFunctions'];+ batchUploadCodeEnvFiles: PrimeSkillFilesParams['batchUploadCodeEnvFiles'];+ getSessionInfo?: PrimeSkillFilesParams['getSessionInfo'];+ checkIfActive?: PrimeSkillFilesParams['checkIfActive'];+ updateSkillFileCodeEnvIds?: PrimeSkillFilesParams['updateSkillFileCodeEnvIds'];+}++export interface PrimeInvokedSkillsResult {+ initialSessions?: ToolSessionMap;+ /** Pre-resolved skill bodies keyed by skill name. Passed to formatAgentMessages+ * so it can reconstruct HumanMessages at the right position in the message sequence. */+ skills?: Map<string, string>;+}++/**+ * Extracts previously invoked skills from message history, resolves their+ * bodies from DB, and re-primes their files to the code env.+ *+ * Returns:+ * - initialSessions: seeds Graph.sessions so ToolNode injects session_id into bash/code tools+ * - skills: Map of skillName → body for formatAgentMessages to reconstruct HumanMessages+ */+export async function primeInvokedSkills(+ deps: PrimeInvokedSkillsDeps,+): Promise<PrimeInvokedSkillsResult> {+ if (!deps.payload?.length || !deps.accessibleSkillIds?.length) {+ return {};+ }++ const invokedSkills = extractInvokedSkillsFromPayload(deps.payload);+ if (invokedSkills.size === 0) {+ return {};+ }++ let apiKey = deps.codeApiKey ?? '';+ if (!apiKey) {+ try {+ const authValues = await deps.loadAuthValues({+ userId: deps.req.user?.id ?? '',+ authFields: [EnvVar.CODE_API_KEY],+ });+ apiKey = authValues[EnvVar.CODE_API_KEY] ?? '';+ } catch (err) {+ logger.debug(+ '[primeInvokedSkills] loadAuthValues failed:',+ err instanceof Error ? err.message : err,+ );+ }+ }++ const skills = new Map<string, string>();++ // Phase 1: Resolve all skills in parallel (DB lookups)+ const resolveResults = await Promise.allSettled(+ Array.from(invokedSkills).map(async (skillName) => {+ const skill = await deps.getSkillByName(skillName, deps.accessibleSkillIds);+ return skill ?? undefined;+ }),+ );++ const resolvedSkills: Array<{+ body: string;+ name: string;+ _id: Types.ObjectId;+ fileCount: number;+ }> = [];+ for (const r of resolveResults) {+ if (r.status === 'fulfilled' && r.value) {+ skills.set(r.value.name, r.value.body);+ resolvedSkills.push(r.value);+ } else if (r.status === 'rejected') {+ logger.warn('[primeInvokedSkills] Skill resolution failed:', r.reason);+ }+ }++ // Phase 2: Single batch upload for ALL skills' files (shared session)+ let sessions: ToolSessionMap | undefined;+ const skillsWithFiles = resolvedSkills.filter((s) => s.fileCount > 0);++ if (apiKey && skillsWithFiles.length > 0) {+ // Parallel file list lookups (R2 fix)+ const fileListResults = await Promise.all(+ skillsWithFiles.map(async (skill) => ({+ skill,+ files: await deps.listSkillFiles(skill._id),+ })),+ );++ // Session freshness check: the code env natively handles mixed sessions+ // (each file carries its own session_id, fetched independently). We check+ // ALL distinct sessions for freshness. If all are active, return cached+ // references with zero re-uploads. If any expired, re-upload everything.+ if (deps.getSessionInfo && deps.checkIfActive) {+ const allFiles = fileListResults.flatMap((r) => r.files);+ const allFilesWithIds = allFiles.filter((f) => f.codeEnvIdentifier);++ // Only use cache when ALL files have identifiers (no partial persistence)+ if (allFilesWithIds.length > 0 && allFilesWithIds.length === allFiles.length) {+ const sessionIds = new Set(+ allFilesWithIds.map((f) => f.codeEnvIdentifier!.split('?')[0].split('/')[0]),+ );++ const checkResults = await Promise.all(+ Array.from(sessionIds).map(async (sid) => {+ const representative = allFilesWithIds.find((f) =>+ f.codeEnvIdentifier!.startsWith(`${sid}/`),+ );+ if (!representative) return true;+ try {+ const lastModified = await deps.getSessionInfo?.(+ representative.codeEnvIdentifier!,+ apiKey,+ );+ return !!(lastModified && deps.checkIfActive?.(lastModified));+ } catch {+ return false;+ }+ }),+ );+ const allActive = checkResults.every(Boolean);++ if (allActive) {+ const cachedFiles = fileListResults.flatMap((r) =>+ r.files+ .filter((f) => f.codeEnvIdentifier)+ .map((f) => {+ const [sid, fid] = (f.codeEnvIdentifier as string).split('?')[0].split('/');+ return { id: fid, name: `${r.skill.name}/${f.relativePath}`, session_id: sid };+ }),+ );+ if (cachedFiles.length > 0) {+ logger.debug(+ `[primeInvokedSkills] All ${sessionIds.size} session(s) active, reusing ${cachedFiles.length} cached files`,+ );+ sessions = new Map();+ // session_id is a representative value. ToolNode uses per-file+ // session_id from the files array (file.session_id ?? codeSession.session_id).+ sessions.set(Constants.EXECUTE_CODE, {+ session_id: cachedFiles[0].session_id,+ files: cachedFiles,+ lastUpdated: Date.now(),+ } satisfies CodeSessionContext);+ return { initialSessions: sessions, skills: skills.size > 0 ? skills : undefined };+ }+ }+ }+ }++ // Per-skill upload: each skill gets its own session with entity_id=skillId.+ // primeSkillFiles handles freshness caching per-skill, so only expired+ // skills re-upload. The code env handles mixed session_ids natively.+ const allPrimedFiles: Array<{ id: string; name: string; session_id: string }> = [];+ const primeResults = await Promise.allSettled(+ fileListResults.map(async ({ skill, files }) => {+ const result = await primeSkillFiles({+ skill,+ skillFiles: files,+ req: deps.req,+ apiKey,+ getStrategyFunctions: deps.getStrategyFunctions,+ batchUploadCodeEnvFiles: deps.batchUploadCodeEnvFiles,+ getSessionInfo: deps.getSessionInfo,+ checkIfActive: deps.checkIfActive,+ updateSkillFileCodeEnvIds: deps.updateSkillFileCodeEnvIds,+ });+ return { skill, result };+ }),+ );+ for (const r of primeResults) {+ if (r.status === 'fulfilled' && r.value.result) {+ for (const f of r.value.result.files) {+ allPrimedFiles.push({ id: f.id, name: f.name, session_id: f.session_id });+ }+ } else if (r.status === 'rejected') {+ logger.warn('[primeInvokedSkills] Failed to prime skill files:', r.reason);+ }+ }++ if (allPrimedFiles.length > 0) {+ sessions = new Map();+ // session_id is a representative value (first skill's session). ToolNode+ // uses per-file session_id from the files array (file.session_id ??+ // codeSession.session_id), so mixed sessions work correctly.+ sessions.set(Constants.EXECUTE_CODE, {+ session_id: allPrimedFiles[0].session_id,+ files: allPrimedFiles,+ lastUpdated: Date.now(),+ } satisfies CodeSessionContext);+ }+ }++ return {+ initialSessions: sessions,+ skills: skills.size > 0 ? skills : undefined,+ };+}diff --git a/packages/api/src/agents/skills.ts b/packages/api/src/agents/skills.tsnew file mode 100644index 0000000000..d302dbf6f3--- /dev/null+++ b/packages/api/src/agents/skills.ts@@ -0,0 +1,131 @@+import {+ formatSkillCatalog,+ SkillToolDefinition,+ ReadFileToolDefinition,+ BashExecutionToolDefinition,+} from '@librechat/agents';+import type { LCToolRegistry, LCTool } from '@librechat/agents';+import { logger } from '@librechat/data-schemas';+import type { Types } from 'mongoose';+import type { Agent } from 'librechat-data-provider';+import type { InitializeAgentDbMethods } from './initialize';++const SKILL_CATALOG_LIMIT = 100;++export interface InjectSkillCatalogParams {+ agent: Agent;+ toolDefinitions: LCTool[] | undefined;+ toolRegistry: LCToolRegistry | undefined;+ accessibleSkillIds: Types.ObjectId[];+ contextWindowTokens: number;+ listSkillsByAccess: InitializeAgentDbMethods['listSkillsByAccess'];+ /** When true, registers bash_tool alongside skill + read_file. */+ codeEnvAvailable?: boolean;+}++export interface InjectSkillCatalogResult {+ toolDefinitions: LCTool[] | undefined;+ skillCount: number;+}++/**+ * Queries accessible skills, formats a budget-aware catalog, appends it to the+ * agent's additional_instructions, and registers the SkillTool definition.+ * Returns updated toolDefinitions and the skill count.+ *+ * No tool instance is created — SkillTool is event-driven only. The tool+ * definition in toolDefinitions is sufficient for the LLM to see and call it;+ * the host handler intercepts the call via ON_TOOL_EXECUTE.+ *+ * The caller is responsible for gating on the skills capability before calling.+ */+export async function injectSkillCatalog(+ params: InjectSkillCatalogParams,+): Promise<InjectSkillCatalogResult> {+ const {+ agent,+ toolDefinitions: inputDefs,+ toolRegistry,+ accessibleSkillIds,+ contextWindowTokens,+ listSkillsByAccess,+ codeEnvAvailable,+ } = params;++ if (!listSkillsByAccess || accessibleSkillIds.length === 0) {+ return { toolDefinitions: inputDefs, skillCount: 0 };+ }++ const { skills } = await listSkillsByAccess({+ accessibleIds: accessibleSkillIds,+ limit: SKILL_CATALOG_LIMIT,+ });++ if (skills.length === SKILL_CATALOG_LIMIT) {+ logger.warn(+ `[injectSkillCatalog] Skill catalog reached limit of ${SKILL_CATALOG_LIMIT}. Some skills may be excluded.`,+ );+ }++ if (skills.length === 0) {+ return { toolDefinitions: inputDefs, skillCount: 0 };+ }++ // Warn on duplicate names — model may invoke the wrong skill+ const nameCount = new Map<string, number>();+ for (const s of skills) {+ nameCount.set(s.name, (nameCount.get(s.name) ?? 0) + 1);+ }+ for (const [dupName, count] of nameCount) {+ if (count > 1) {+ logger.warn(+ `[injectSkillCatalog] ${count} accessible skills share name "${dupName}" — model may invoke the wrong one`,+ );+ }+ }++ const catalog = formatSkillCatalog(+ skills.map((s) => ({ name: s.name, description: s.description })),+ { contextWindowTokens: contextWindowTokens || 200_000 },+ );++ if (catalog) {+ agent.additional_instructions = agent.additional_instructions+ ? `${agent.additional_instructions}\n\n${catalog}`+ : catalog;+ }++ const skillToolDef: LCTool = {+ name: SkillToolDefinition.name,+ description: SkillToolDefinition.description,+ parameters: SkillToolDefinition.parameters as unknown as LCTool['parameters'],+ };++ const readFileDef: LCTool = {+ name: ReadFileToolDefinition.name,+ description: ReadFileToolDefinition.description,+ parameters: ReadFileToolDefinition.parameters as unknown as LCTool['parameters'],+ responseFormat: ReadFileToolDefinition.responseFormat,+ };++ const bashToolDef: LCTool = {+ name: BashExecutionToolDefinition.name,+ description: BashExecutionToolDefinition.description,+ parameters: BashExecutionToolDefinition.schema as unknown as LCTool['parameters'],+ };++ // Always register skill + read_file; only register bash_tool when code env is available+ const defs: LCTool[] = [skillToolDef, readFileDef];+ if (codeEnvAvailable) {+ defs.push(bashToolDef);+ }++ const toolDefinitions = [...(inputDefs ?? []), ...defs];+ if (toolRegistry) {+ for (const def of defs) {+ toolRegistry.set(def.name, def);+ }+ }++ return { toolDefinitions, skillCount: skills.length };+}diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.tsindex 99a68de331..b6ff52abee 100644--- a/packages/data-provider/src/config.ts+++ b/packages/data-provider/src/config.ts@@ -225,6 +225,7 @@ export enum AgentCapabilities {artifacts = 'artifacts',actions = 'actions',context = 'context',+ skills = 'skills',tools = 'tools',chain = 'chain',ocr = 'ocr',@@ -314,6 +315,7 @@ export const defaultAgentCapabilities = [AgentCapabilities.artifacts,AgentCapabilities.actions,AgentCapabilities.context,+ AgentCapabilities.skills,AgentCapabilities.tools,AgentCapabilities.chain,AgentCapabilities.ocr,@@ -1966,6 +1968,8 @@ export enum LocalStorageKeys {LAST_FILE_SEARCH_TOGGLE_ = 'LAST_FILE_SEARCH_TOGGLE_',/** Last checked toggle for Artifacts per conversation ID */LAST_ARTIFACTS_TOGGLE_ = 'LAST_ARTIFACTS_TOGGLE_',+ /** Last checked toggle for Skills per conversation ID */+ LAST_SKILLS_TOGGLE_ = 'LAST_SKILLS_TOGGLE_',/** Key for the last selected agent provider */LAST_AGENT_PROVIDER = 'lastAgentProvider',/** Key for the last selected agent model */diff --git a/packages/data-provider/src/types.ts b/packages/data-provider/src/types.tsindex 6afd7e36cf..b5f032cd79 100644--- a/packages/data-provider/src/types.ts+++ b/packages/data-provider/src/types.ts@@ -102,6 +102,7 @@ export type TEphemeralAgent = {file_search?: boolean;execute_code?: boolean;artifacts?: string;+ skills?: boolean;};export type TPayload = Partial<TMessage> &diff --git a/packages/data-schemas/src/methods/skill.ts b/packages/data-schemas/src/methods/skill.tsindex c271b7d4a8..a857933f43 100644--- a/packages/data-schemas/src/methods/skill.ts+++ b/packages/data-schemas/src/methods/skill.ts@@ -16,6 +16,7 @@ import type {ISkillSummary,} from '~/types/skill';import { isValidObjectIdString } from '~/utils/objectId';+import { tenantSafeBulkWrite } from '~/utils/tenantBulkWrite';import { escapeRegExp } from '~/utils/string';import logger from '~/config/winston';@@ -613,6 +614,18 @@ export function createSkillMethods(mongoose: typeof import('mongoose'), deps: Skreturn (doc as unknown as (ISkill & { _id: Types.ObjectId }) | null) ?? null;}+ async function getSkillByName(+ name: string,+ accessibleIds: Types.ObjectId[],+ ): Promise<(ISkill & { _id: Types.ObjectId }) | null> {+ const Skill = mongoose.models.Skill as Model<ISkillDocument>;+ // sort by updatedAt desc for deterministic result when multiple skills share a name+ const doc = await Skill.findOne({ name, _id: { $in: accessibleIds } })+ .sort({ updatedAt: -1 })+ .lean();+ return (doc as unknown as (ISkill & { _id: Types.ObjectId }) | null) ?? null;+ }+async function listSkillsByAccess(params: ListSkillsByAccessParams,): Promise<ListSkillsByAccessResult> {@@ -842,7 +855,7 @@ export function createSkillMethods(mongoose: typeof import('mongoose'), deps: Skauthor: row.author,tenantId: row.tenantId,},- $unset: { content: '', isBinary: '' },+ $unset: { content: '', isBinary: '', codeEnvIdentifier: '' },},{ new: false, upsert: true },).lean();@@ -895,11 +908,28 @@ export function createSkillMethods(mongoose: typeof import('mongoose'), deps: Skawait SkillFile.updateOne({ skillId, relativePath }, { $set: update });}- // deletion controller actually call. The per-skill file cascade on- // `deleteSkill` is inlined; there's no need for a separate export.+ async function updateSkillFileCodeEnvIds(+ updates: Array<{+ skillId: Types.ObjectId | string;+ relativePath: string;+ codeEnvIdentifier: string;+ }>,+ ): Promise<void> {+ if (updates.length === 0) return;+ const SkillFile = mongoose.models.SkillFile as Model<ISkillFileDocument>;+ const ops = updates.map((u) => ({+ updateOne: {+ filter: { skillId: u.skillId, relativePath: u.relativePath },+ update: { $set: { codeEnvIdentifier: u.codeEnvIdentifier } },+ },+ }));+ await tenantSafeBulkWrite(SkillFile, ops);+ }+return {createSkill,getSkillById,+ getSkillByName,listSkillsByAccess,updateSkill,deleteSkill,@@ -909,6 +939,7 @@ export function createSkillMethods(mongoose: typeof import('mongoose'), deps: SkdeleteSkillFile,getSkillFileByPath,updateSkillFileContent,+ updateSkillFileCodeEnvIds,};}diff --git a/packages/data-schemas/src/schema/skillFile.ts b/packages/data-schemas/src/schema/skillFile.tsindex d8c11cbf09..b0430fce91 100644--- a/packages/data-schemas/src/schema/skillFile.ts+++ b/packages/data-schemas/src/schema/skillFile.ts@@ -96,6 +96,9 @@ const skillFileSchema: Schema<ISkillFileDocument> = new Schema(isBinary: {type: Boolean,},+ codeEnvIdentifier: {+ type: String,+ },},{timestamps: true,diff --git a/packages/data-schemas/src/types/skill.ts b/packages/data-schemas/src/types/skill.tsindex b1d120ff23..d1582e5314 100644--- a/packages/data-schemas/src/types/skill.ts+++ b/packages/data-schemas/src/types/skill.ts@@ -94,6 +94,12 @@ export interface ISkillFile {content?: string;/** Set on first read. `true` prevents repeated storage reads for non-text files. */isBinary?: boolean;+ /**+ * Code environment file identifier (`session_id/fileId`).+ * Set after uploading to code env, used to check freshness on subsequent runs.+ * Cleared when the skill file is re-uploaded to storage.+ */+ codeEnvIdentifier?: string;createdAt?: Date;updatedAt?: Date;}