LibreChat/api/server/controllers/agents
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: Show Skill Pills When a Turn Starts (#18036) 2026-11-11 12:49:50 -05:00
callbacks.background.spec.js 🛂 feat: Filter Model-Bound Content by Source (#14425) 2026-08-21 22:43:32 -04:00
callbacks.js 🦂 feat: Add GPT-6 Cyber Support (#18023) 2026-11-11 16:50:26 -05:00
client.codeDecision.spec.js 🍯 fix: Stop Approval Pauses From Unsealing Code Environments (#15963) 2026-09-15 12:30:37 -04:00
client.imageDetail.spec.js 🖍️ fix: Honor Agent Image Detail Settings (#15407) 2026-08-31 08:34:05 -04:00
client.js 🦣 fix: Honor Trace Policy in Memory Runs (#18006) 2026-11-10 10:35:59 -05:00
client.test.js 🦣 fix: Honor Trace Policy in Memory Runs (#18006) 2026-11-10 10:35:59 -05:00
filterAuthorizedTools.spec.js fix: Guard Mongo Cleanup In Controller And Migration Tests (#17989) 2026-11-11 10:30:38 +01:00
openai.js 🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs (#18058) 2026-11-11 20:56:17 -05:00
promotion.js 🧷 fix: Promote Unapplied Steers to Durable Queued Turns at Run End (#18028) 2026-11-10 22:43:32 -05:00
protocol.js 🛫 refactor: Promote Generation Protocol V2 Automatically (#15324) 2026-08-28 17:17:09 -04:00
queuedTurns.js 🍱 fix: Carry Coding Approval Mode With Queued Turns (#16326) 2026-09-25 07:28:43 -04:00
recordCollectedUsage.spec.js 📬 feat: Persist Channel Events and Delivery Receipts (#17595) 2026-11-10 21:03:57 -08:00
request.js 🌄 fix: Show Skill Pills When a Turn Starts (#18036) 2026-11-11 12:49:50 -05:00
responses.js 🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs (#18058) 2026-11-11 20:56:17 -05:00
resume.js 🧷 fix: Promote Unapplied Steers to Durable Queued Turns at Run End (#18028) 2026-11-10 22:43:32 -05:00
steer.js 📬 feat: Move Agent Queued Turns Server-Side (#15370) 2026-08-30 21:53:58 -04:00
v1.js 🔐 fix: Authorize Restored MCP Tools Before Agent Revert Writes Them (#17843) 2026-11-09 07:20:31 -05:00
v1.spec.js fix: Guard Mongo Cleanup In Controller And Migration Tests (#17989) 2026-11-11 10:30:38 +01:00