mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-09-01 03:27:01 +00:00
🚦 fix: Restrict Programmatic Tool Execution Maps (#15105)
* fix: restrict programmatic tool execution maps * chore: bump `@librechat/agents` to v3.6.10 * fix: honor live programmatic caller projections * style: sort caller capability imports * test: expect caller projection loader argument * chore: bump agents sdk to v3.6.11 * refactor: use SDK caller projection type * style: sort agent handler imports
This commit is contained in:
parent
d3e70159ca
commit
89494d45fd
15 changed files with 456 additions and 37 deletions
|
|
@ -329,7 +329,7 @@ const initializeClient = async ({
|
|||
const endpointTokenConfigByAgentId = new Map();
|
||||
|
||||
const toolExecuteOptions = {
|
||||
loadTools: async (toolNames, agentId) => {
|
||||
loadTools: async (toolNames, agentId, _configurable, callerCapabilityProjection) => {
|
||||
const ctx = agentToolContexts.get(agentId) ?? {};
|
||||
logger.debug(`[ON_TOOL_EXECUTE] ctx found: ${!!ctx.userMCPAuthMap}, agent: ${ctx.agent?.id}`);
|
||||
logger.debug(`[ON_TOOL_EXECUTE] toolRegistry size: ${ctx.toolRegistry?.size ?? 'undefined'}`);
|
||||
|
|
@ -344,6 +344,7 @@ const initializeClient = async ({
|
|||
toolNames,
|
||||
agent: ctx.agent,
|
||||
toolRegistry: ctx.toolRegistry,
|
||||
callerCapabilityProjection,
|
||||
backgroundToolNames: ctx.backgroundToolNames,
|
||||
intentToolNames: ctx.intentToolNames,
|
||||
mcpAvailableTools: ctx.mcpAvailableTools,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue