LibreChat/api/server/services
Danny Avila 06c58c5fc1
Some checks are pending
Backend Unit Tests / Build packages (push) Waiting to run
Backend Unit Tests / Codegraph select (push) Waiting to run
Backend Unit Tests / TypeScript type checks (push) Blocked by required conditions
Backend Unit Tests / Circular dependency checks (push) Waiting to run
Backend Unit Tests / Tests: api (shard 1/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 2/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 3/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: data-provider (push) Blocked by required conditions
Backend Unit Tests / Tests: data-schemas (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 1/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 2/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 3/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 4/4) (push) Blocked by required conditions
Backend Unit Tests / backend (push) Blocked by required conditions
Codegraph E2E Vote Gate / Gate (push) Waiting to run
Codegraph E2E Votes / vote (shard 1/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 10/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 2/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 3/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 4/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 5/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 6/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 7/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 8/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 9/10) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
Playwright E2E Tests / Codegraph select (push) Waiting to run
Playwright E2E Tests / e2e () (push) Blocked by required conditions
Playwright E2E Tests / MCP list_changed (replica count 1) (push) Blocked by required conditions
Playwright E2E Tests / MCP list_changed (replica count 2) (push) Blocked by required conditions
Playwright E2E Tests / MCP Apps (browser and server) (push) Waiting to run
Playwright E2E Tests / e2e (push) Blocked by required conditions
🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs (#18058)
* 🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs

A run started through the remote agent API (API key or OIDC bearer) has no
signed-in browser reading its response. When one of the agent's MCP servers
needed OAuth, the run still published LibreChat's sign-in prompt into the
OpenAI-compatible response and waited up to two minutes for a sign-in the
caller could not complete.

The remote auth middleware now marks the response it admits. The prompt
emitters refuse to write to a marked response, and tool loading skips the
turn-start wait when no reader exists. Background Responses keep their
prompts: those go to the generation stream the owner follows in LibreChat.

* 🧭 refactor: Pass the Unattended Fact Explicitly and Release Unattended Callers From Shared Sign-in

Review feedback on the first commit:

- The response registry coupled the auth middleware to MCP through module
  state. The remote controllers now supply `unattended` as an argument
  (chat completions always; Responses through the runtime's tool context,
  foreground only) and it is passed through tool loading to the manager and
  the prompt transports. The registry and the middleware side effect are gone.

- A remote run that reached a server while its owner had a sign-in open in a
  browser joined that recovery and waited for the person. The manager now
  guards an unattended caller at its two entry points: the first sign-in
  prompt, from the caller's own flow or from a recovery it waits on, ends that
  caller's wait with a typed error and leaves a shared recovery running for
  its other waiters. A recovery announces a sign-in request so waiters that
  registered no prompt handler are released too.

* 🧪 test: Cover Unattended Sign-in Through the Real MCP SDK

The shared-sign-in tests replaced the production OAuth handler with a
synthetic listener, so they did not exercise the SDK lifecycle whose
cancellation and shared-recovery behaviour the change depends on.

They now run against the real Streamable HTTP test server, the real
connection factory handler and the real flow manager: an unattended tool
call alone, alongside the owner's open sign-in, joining a recovery that
then stops being silent, recovering through a silent refresh, and opening
a connection that needs sign-in. The synthetic-handler versions are removed.
2026-11-11 20:56:17 -05:00
..
__tests__ 🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs (#18058) 2026-11-11 20:56:17 -05:00
Agents 🌐 feat: Wire Responses and Channel Lifecycle APIs (#17611) 2026-11-10 21:04:03 -08:00
Artifacts
Config 📦 feat: Package Shared Slack Workspace Deployments (#17815) 2026-11-10 21:04:10 -08:00
Endpoints fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
Files fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
MCP 🔐 fix: Fence ACL Viewers and Surface Revocation Failures When Removing Shared MCP Servers (#17506) 2026-10-28 00:37:07 +01:00
Runs 🗑️ fix: Drain Assistants Runs Before Erasing the Account (#17937) 2026-11-09 15:35:31 +01:00
Schedules 🪸 refactor: Separate Shared-Link and Schedule Persistence (#18031) 2026-11-10 15:44:13 -05:00
Skills 🔌 feat: Integrate Durable Skill Lifecycle Across Writers and Routes (#17043) 2026-10-16 09:05:05 -07:00
start 🔑 perf: Cache JWT Users and Batch Auth-Path Reads (#17466) 2026-10-30 00:24:08 +01:00
Threads fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
Tools 🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs (#18058) 2026-11-11 20:56:17 -05:00
ActionService.js 🫢 fix: Keep OAuth Credentials Out of Logs (#17409) 2026-10-24 09:43:06 +02:00
ActionService.spec.js 🫢 fix: Keep OAuth Credentials Out of Logs (#17409) 2026-10-24 09:43:06 +02:00
AssistantService.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
AuthService.js 📪 fix: Require Email Delivery for Password Reset Links (#17823) 2026-11-09 08:27:33 -05:00
AuthService.spec.js 📪 fix: Require Email Delivery for Password Reset Links (#17823) 2026-11-09 08:27:33 -05:00
ChannelAuthority.js 🔗 fix: Update Slack Account Linking in Place (#18039) 2026-11-10 21:04:12 -08:00
ChannelAuthority.spec.js 👤 feat: Link and Revoke Personal Channel Accounts (#17615) 2026-11-10 21:04:04 -08:00
Channels.js 🧹 refactor: Consolidate Channel and Response Contracts (#17705) 2026-11-10 21:04:06 -08:00
Channels.spec.js 🌐 feat: Connect Organization Slack Workspaces to Agents (#17811) 2026-11-10 21:04:10 -08:00
createRunBody.js
createRunBody.spec.js
GraphApiService.js 🥸 fix: Resolve Directory Principals Through Trusted Integration Data (#17825) 2026-11-10 09:22:08 -05:00
GraphApiService.spec.js fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
GraphTokenService.js
initializeMCPs.js 🙈 feat: Let Config Profiles Hide librechat.yaml MCP Servers and Remove Their Fields (#17327) 2026-10-22 14:10:31 +02:00
initializeMCPs.plugins.spec.js 🙈 feat: Let Config Profiles Hide librechat.yaml MCP Servers and Remove Their Fields (#17327) 2026-10-22 14:10:31 +02:00
initializeMCPs.spec.js 🙈 feat: Let Config Profiles Hide librechat.yaml MCP Servers and Remove Their Fields (#17327) 2026-10-22 14:10:31 +02:00
initializeOAuthReconnectManager.js 🧯 fix: Guard SSE Writes and Interval Cleanups Against Crashes (#17462) 2026-10-27 23:06:58 +01:00
initializeOAuthReconnectManager.spec.js 🧯 fix: Guard SSE Writes and Interval Cleanups Against Crashes (#17462) 2026-10-27 23:06:58 +01:00
LangfusePromptSync.js 🏭 refactor: Centralize Source Prompt Imports in the Prompt Service (#17272) 2026-10-24 13:51:31 +02:00
LangfusePromptSync.spec.js 🏭 refactor: Centralize Source Prompt Imports in the Prompt Service (#17272) 2026-10-24 13:51:31 +02:00
MCP.js 🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs (#18058) 2026-11-11 20:56:17 -05:00
MCP.spec.js 🔄 fix: Restore MCP Sign-In Prompts After Reload (#17604) 2026-11-10 21:04:00 -08:00
MCPAuthorizationFenceRetry.js
MCPAuthorizationFenceRetry.spec.js
MCPRequestContext.js
OboPolicyService.js
OboTokenService.js 🙈 fix: Mask Emails and Drop Personal Identifiers From Logs (#17048) 2026-10-15 15:54:27 +02:00
OboTokenService.spec.js
OpenIDRefreshFlight.js
OpenIDRefreshFlight.spec.js
OpenIDRefreshRecovery.js 🔐 fix: Retire Credentials by Their Committing Write and on Opt-In 2FA (#17504) 2026-11-05 22:53:11 +01:00
OpenIDSessionRefresh.js
OpenIDSessionRefresh.spec.js 🪪 fix: Boot-Paint a Cached Theme Only for Its Signed-In Owner (#16926) 2026-10-14 11:08:53 +02:00
PermissionService.js 🥸 fix: Resolve Directory Principals Through Trusted Integration Data (#17825) 2026-11-10 09:22:08 -05:00
PermissionService.spec.js fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
PluginService.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
PluginService.spec.js 🔐 fix: Encrypt User Plugin Credentials With Random-IV v3 Format (#16996) 2026-10-12 16:33:08 +02:00
Prompts.consumers.spec.js 🏭 refactor: Centralize Source Prompt Imports in the Prompt Service (#17272) 2026-10-24 13:51:31 +02:00
Prompts.js 🏭 refactor: Centralize Source Prompt Imports in the Prompt Service (#17272) 2026-10-24 13:51:31 +02:00
Prompts.spec.js 🏭 refactor: Centralize Source Prompt Imports in the Prompt Service (#17272) 2026-10-24 13:51:31 +02:00
RefreshTokenBridge.js
RefreshTokenBridge.spec.js
Responses.js ⏯️ feat: Review and Stop Background Responses (#17613) 2026-11-10 21:04:04 -08:00
Responses.spec.js ⏯️ feat: Review and Stop Background Responses (#17613) 2026-11-10 21:04:04 -08:00
SlackDispatch.js 🌐 feat: Connect Organization Slack Workspaces to Agents (#17811) 2026-11-10 21:04:10 -08:00
SlackWorkspaceBindings.js 👥 fix: Let Members Connect Agents to Slack Workspaces (#17835) 2026-11-10 21:04:11 -08:00
SlackWorkspaces.js 🔌 feat: Add Tenant-Owned Slack Installation Storage and OAuth (#17810) 2026-11-10 21:04:09 -08:00
systemGrant.spec.js fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
ToolService.js 🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs (#18058) 2026-11-11 20:56:17 -05:00
twoFactorService.js 🗝️ fix: Strengthen Two-Factor Recovery Credentials (#16742) 2026-10-04 12:16:37 -04:00
twoFactorService.spec.js 🗃️ refactor: Remove Dead Data Schemas Methods and Data Provider Exports (#17113) 2026-10-15 12:23:29 +02:00