mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-18 05:52:10 +00:00
Four review rounds found thirteen issues, all one class: a boundary the permission check had not been copied into. Rounds 2 and 3 each found gaps created by the previous round's fix, and a manual sweep of tool constructors and upload routes still missed the `codeEnvAvailable` family entirely — because the thing worth enumerating is not "paths that reach a tool" but "reads of the capability". There are 28 such reads. This replaces per-site permission checks with one resolution per request, pairs every read that is a gate, and pins the list so a new one cannot be added silently. - `resolveToolRoleGrants` resolves `RUN_CODE` and `FILE_SEARCH` together and memoizes on the request. Both perf findings disappear by construction: gates share one role read instead of each issuing its own. - Newly paired gates: `codeEnvAvailable` in the OpenAI-compatible, Responses and memory-agent initializers (`initializeAgent` rebuilds `bash_tool`, `read_file` and the workspace file tools from it, and hands their handlers the code environment); the capability checks in agent upload processing and in agent-management upload purposes; and the library chat-completion service, behind an optional `getRoleByName` dependency so embedders are not broken. - The v1 Knowledge upload posts `assistant_id` with no `tool_resource`, so there is no resource to authorize. It now reads the assistant's own native tools and requires their grants, instead of treating a missing resource as unrestricted. - The startup role read moved off the critical path into the existing `Promise.all`, and the direct tool-call check passes `req` so the shared loader gate reuses its result rather than repeating the lookup. - `toolCapabilityGates.spec.js` pins every file that reads either capability with a count and a reason. A new read fails the suite until it is classified, so the next boundary announces itself instead of waiting for a reviewer. |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| Agents | ||
| Artifacts | ||
| Config | ||
| Endpoints | ||
| Files | ||
| Runs | ||
| Schedules | ||
| Skills | ||
| start | ||
| Threads | ||
| Tools | ||
| ActionService.js | ||
| ActionService.spec.js | ||
| AssistantService.js | ||
| AuthService.js | ||
| AuthService.spec.js | ||
| cleanup.js | ||
| createRunBody.js | ||
| createRunBody.spec.js | ||
| GraphApiService.js | ||
| GraphApiService.spec.js | ||
| GraphTokenService.js | ||
| initializeMCPs.js | ||
| initializeMCPs.plugins.spec.js | ||
| initializeMCPs.spec.js | ||
| initializeOAuthReconnectManager.js | ||
| MCP.js | ||
| MCP.spec.js | ||
| MCPRequestContext.js | ||
| OboPolicyService.js | ||
| OboTokenService.js | ||
| OboTokenService.spec.js | ||
| OpenIDRefreshFlight.js | ||
| OpenIDRefreshFlight.spec.js | ||
| OpenIDRefreshRecovery.js | ||
| OpenIDSessionRefresh.js | ||
| OpenIDSessionRefresh.spec.js | ||
| PermissionService.js | ||
| PermissionService.spec.js | ||
| PluginService.js | ||
| PluginService.spec.js | ||
| RefreshTokenBridge.js | ||
| RefreshTokenBridge.spec.js | ||
| systemGrant.spec.js | ||
| ToolService.js | ||
| twoFactorService.js | ||
| twoFactorService.spec.js | ||