Commit graph

1886 commits

Author SHA1 Message Date
Danny Avila
0e626948c4
🍽️ feat: Let Schedule Owners Choose Allowed MCP Tools (#18260)
* 🗳️ feat: Let a Schedule's Owner Choose Which MCP Tools It May Use

An enrolled scheduled chat could call an MCP tool only when an operator had
listed it in config as read-only, pinned to a hash of its definition. Whether
a tool is safe to run with nobody watching is the owner's call, and read-only
is a poor proxy for it.

The consent offer now lists every MCP tool the agent graph selects on servers
whose recipient the operator declared. The owner ticks servers and tools, and
the grant stores only those. A tool is allowed at run time when the grant
lists it for the calling agent and that agent still selects it; anything else
is refused. Selecting another tool later no longer invalidates the grant.

The operator `mcpConsent.readOnlyPolicy` list is retired: the loader warns
when it is still configured. The stored grant keeps its shape.

* 🗳️ fix: Check the Server Box Only When Every Tool Is Allowed

The shared Checkbox has no partly-selected appearance, so a server with some
tools ticked showed its "allow all" box as checked.

* 🧪 test: Check the Live Catalog at the Manager Boundary Without the Retired Pin

* 🧭 fix: Check Readiness Against What the Owner Allowed, Not What the Agents Select

* 🧭 fix: Turn Away a Tool the Owner Left Out Without Failing the Run

* 🧭 fix: Load Only the MCP Tools the Owner Allowed in a Scheduled Run
2026-11-18 08:44:08 -05:00
Danny Avila
dd83596e70
🚔 fix: Enforce Host Model Policies for Responses and OpenAI Callers (#18400)
* fix: enforce host model policies for API SDK callers

* refactor: share API model policy assembly in TypeScript
2026-11-18 08:31:19 -05:00
Danny Avila
e7565f28ad
🔷 feat: Declare Turn Shapes in Created Frames (#18401)
* 🪪 feat: State a Turn's Shape in Its Created Frame So an Observer Applies It as Its Sender Does

* 🪪 test: Give the Request Controller Specs the Turn Helper Their Mocks Left Out

* 🪪 fix: Name the Reply an Edited or Continued Turn Starts From, and Build on It, Not the List's Tail

* 🪪 fix: Put a Plain Turn's Reply Last in the List, Where Its First Step Builds
2026-11-18 08:31:01 -05:00
Danny Avila
67d44d5edc
🧑‍🔬 fix: Preserve File Checks for Large Agent Tool Catalogs (#18405)
* fix: inspect agent tool catalogs in bounded file-policy units

* test: align agent inspection fixtures with published contracts
2026-11-18 08:30:43 -05:00
Danny Avila
2e792a3a73
📦 chore: upgrade agents SDK to 4.2.10 (#18409) 2026-11-18 08:25:05 -05:00
Danny Avila
ff522e0771
🧭 refactor: Build One Execution Context Where a Run Enters (#18255)
* 🧭 refactor: Build One Execution Context Where a Run Enters

Each consumer of a scheduled run's identity (the host token resolver, the
scheduled MCP authority and the resource-bearer host) read the trigger body
and the restored job for itself, and the remote agent API carried a separate
`unattended` flag through tool loading.

The entry point now builds one frozen ExecutionContext: the chat controller
from the verified schedule trigger, the resume host from the saved job, and
the remote controllers from the run envelope. The initializer and tool
loading receive it as an argument. The schedule consumers project their
identity from it, and `unattended` is derived from it at the tool-loading
boundary. No client or model input sets any field.

* 🧭 refactor: Decide Whether a Run Is Unattended in Its Execution Context
2026-11-18 07:39:34 -05:00
Danny Avila
7d1f618b24
🥪 feat: Compose Remote Model Admission With Output Protection (#18276)
* feat: compose remote model admission with output protection

* chore: adopt agents 4.2.9 for remote policy composition
2026-11-18 06:17:01 -05:00
Danny Avila
4cd70c5af9
🧑‍⚖️ feat: Preserve Input Policy and Persistence Admission for Remote Models (#18271) 2026-11-18 06:16:26 -05:00
Danny Avila
dc07a93343
🎮 feat: Use Saved-Agent Host Models in Remote SDK Runtimes (#18261) 2026-11-18 06:16:00 -05:00
lia-by-librechat[bot]
85d0b310a9
🧦 test: Verify Redis Fixture Cleanup With Reused Ports (#18275)
Some checks are pending
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
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/chat (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Frontend Unit Tests / frontend (push) Blocked by required conditions
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
Playwright E2E Tests / Codegraph select (push) Waiting to run
Playwright E2E Tests / Shard timings (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
Playwright Shard Timings / Record shard timings (push) Waiting to run
Sync README Translations / Test Translation Helpers (push) Waiting to run
Sync README Translations / Translate README (push) Waiting to run
Co-authored-by: Lia <lia@librechat.ai>
2026-11-17 14:22:47 -05:00
Danny Avila
be42a7d6e3
🐨 feat: Read Subagent Messages Through Their Parent Conversation (#18187)
A subagent child thread is reachable only through the parent the requester
owns: /api/messages/<threadId> answers 404 by design, and the durable thread
view sends a bounded projection, not messages. A chat pane pointed at a child
thread therefore had nothing to load.

GET /api/convos/:parent/subagents/:thread/messages returns the thread's rows
with the conversation route's projection and tool-call previews, after the
thread view's parent, lineage and tenant check. An event thread's input is
the raw payload of an external event, so its row is sent with empty text, as
the thread view already does. A second route reads the full tool call behind
a preview, reusing the conversation route's reader.
2026-11-17 10:05:42 -05:00
lia-by-librechat[bot]
7608737d76
🎍 fix: Preserve Every Conversation Branch When Duplicating (#18257)
* 🎍 fix: Preserve Every Conversation Branch When Duplicating

* style: Normalize Regression Fixture Formatting

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-17 09:54:40 -05:00
Danny Avila
cb133ebf09
🗓️ feat: Align Balance Resets to Fixed Calendar Boundaries (#18144)
* 🗓️ feat: Align Balance Resets to Fixed Calendar Boundaries

Add balance.refillAnchor, an ISO timestamp with a fixed offset that periods align to: a refill or reset is due at the first anchor-plus-whole-intervals boundary after the last one, so every user resets at the same moment (e.g. each Monday at 00:00 UTC, or the 1st of each month). Omitted, periods keep running from each user's last refill. The gauge names the reset date for anchored periods.

* 🧭 fix: Clear a Removed Reset Anchor During Admission and Shape Balance Responses in TS

A policy built without a record now always carries refillAnchor, null when unset, so removing the setting clears a stored anchor instead of looping admission until its retry bound throws. Balance response shaping moves to toBalanceResponse in packages/api; the CJS controller delegates to it.
2026-11-17 09:37:34 -05:00
Danny Avila
0d8c4c191a
🧵 feat: Run Background Shell Commands Without Holding Their Worktree (#18247) 2026-11-17 09:36:27 -05:00
Danny Avila
1b8e89d7d8
🧩 feat: Stream Host Models Through Remote SDK Runtimes (#18250)
* feat: stream authenticated host models through remote SDK runtimes

* fix: bind authorized tool schemas on remote host models
2026-11-17 09:36:04 -05:00
Danny Avila
d4e85d2205
🚀 v0.8.9 (#18236)
Some checks are pending
Publish `@librechat/client` to NPM / pack (push) Waiting to run
Publish `@librechat/client` to NPM / publish-npm (push) Blocked by required conditions
Publish `librechat-data-provider` to NPM / pack (push) Waiting to run
Publish `librechat-data-provider` to NPM / publish-npm (push) Blocked by required conditions
Publish `@librechat/data-schemas` to NPM / pack (push) Waiting to run
Publish `@librechat/data-schemas` to NPM / publish-npm (push) Blocked by required conditions
Docker Dev Images Build / publish (push) Waiting to run
Sync Helm Chart Tags / Ignore non-main push (push) Waiting to run
Sync Helm Chart Tags / Sync chart tags (push) Waiting to run
* chore: Prepare v0.8.9 Release

* docs: Label Agent Channels as Beta
2026-11-17 09:22:57 -05:00
Dustin Healy
54ea64a4c9
🛟 fix: Preserve SDK Runs Across Failed Reattachments (#18237)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-17 07:33:23 -05:00
Danny Avila
2b828ca2c5
🛁 feat: Apply Host Provider-Text Protection to Remote SDK Runs (#18240)
Some checks are pending
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
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/chat (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Frontend Unit Tests / frontend (push) Blocked by required conditions
Playwright E2E Tests / Codegraph select (push) Waiting to run
Playwright E2E Tests / Shard timings (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
Playwright Shard Timings / Record shard timings (push) Waiting to run
* feat: bridge host provider-text policy to remote SDK runs

* build: consume published agents 4.2.7 for remote policy services
2026-11-16 22:37:13 -05:00
Danny Avila
3de814c0fa
🥊 fix: Reject Malformed LDAP Credentials Before Authentication (#18235) 2026-11-16 20:04:11 -05:00
lia-by-librechat[bot]
e1fc59c9cf
🐦‍🔥 fix: Recover Redis Clients After Extended Outages (#18164)
* 🐦‍🔥 fix: Recover Redis Clients After Extended Outages

* fix: Retain Subscriber Registrations Across Repeated Disconnects

* test: Diagnose Redis Fixture Startup Failures

* fix: Close Redis Invalidation Connections During Outages

* fix: Bound Redis Subscriber Lifetimes During Shutdown

* fix: Retain Pending Redis Subscription Cancellation After Removal

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-16 19:04:57 -05:00
lia-by-librechat[bot]
687af9ac5a
🛵 chore: Bump Agents SDK to 4.2.6 (#18234)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-16 18:42:43 -05:00
Danny Avila
39a270ccf0
🏯 fix: Bind MCP Grants to Authorized Agent State and Server Identity (#18233)
* fix: prevent Action writes from expanding MCP access

* fix: fence MCP grant snapshots before Action token cleanup

* fix: reject Action writes after concurrent agent deletion

* fix: enforce MCP grant provenance across saves and server replacement

* test: expect reserved MCP names after server replacement
2026-11-16 18:42:32 -05:00
Marco Beretta
b075605e98
💧 feat: Add Gemini Hydrogen Support (#18159)
Some checks are pending
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
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/chat (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Frontend Unit Tests / frontend (push) Blocked by required conditions
Playwright E2E Tests / Codegraph select (push) Waiting to run
Playwright E2E Tests / Shard timings (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
Playwright Shard Timings / Record shard timings (push) Waiting to run
* feat: Add Gemini Hydrogen Model Support

* fix: Restore Google History For Reachable Agents

* fix: Preserve Mixed Google Signature History

* refactor: Inject Google billing configuration at application boundary

* fix: Preserve Call Signatures From Unsupported Google Output

* chore: Use Released Agents SDK 4.2.5

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-16 10:26:55 -05:00
lia-by-librechat[bot]
73860d71d5
🥼 fix: Keep Runtime MIME State Out of File Inspection (#18216)
* fix: Keep runtime MIME state out of file inspection

* fix: Preserve attachment-free inspection admission

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-16 10:12:36 -05:00
Danny Avila
9529c99f5e
🛑 fix: Harden Remote SDK Lifecycle and Recovery (#18213)
Some checks are pending
Docker Dev Images Build / publish (push) Waiting to run
Sync Helm Chart Tags / Ignore non-main push (push) Waiting to run
Sync Helm Chart Tags / Sync chart tags (push) Waiting to run
* fix: propagate remote SDK tool invocation cancellation

* fix: harden remote SDK drain, replay, and state parity
2026-11-16 08:47:28 -05:00
Marco Beretta
a375a9b6e3
💰 feat: Configure Native Google Token Rates (#18149)
* feat: Configure Native Google Token Rates

* fix: Preserve Numeric Token Rate Maps

* test: Verify Persisted Google Billing Charges
2026-11-16 08:38:01 -05:00
Danny Avila
9363db541e
🐕‍🦺 feat: Run Authorized Host Tools From Remote SDK Agents (#18189)
Some checks are pending
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
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/chat (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Frontend Unit Tests / frontend (push) Blocked by required conditions
Playwright E2E Tests / Codegraph select (push) Waiting to run
Playwright E2E Tests / Shard timings (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
Playwright Shard Timings / Record shard timings (push) Waiting to run
Docker Dev Images Build / publish (push) Waiting to run
Sync Helm Chart Tags / Ignore non-main push (push) Waiting to run
Sync Helm Chart Tags / Sync chart tags (push) Waiting to run
* feat: execute remote SDK host tools through the shared harness

* fix: allow host tool execution within the configured run budget

* fix: reject unsupported client-owned tool dispatch
2026-11-15 09:42:41 -05:00
Danny Avila
c83336c7bf
📡 fix: Stream Compaction Summaries as They Are Written (#18174)
* 🧽 fix: Replace an Abandoned Summary Attempt's Text When Its Retry Streams

Summary deltas append to the in-flight summary part. Once the agents SDK
streams them while the provider is still responding, an attempt that is
then abandoned (a retry, a fallback provider) has already put text in the
part, and the next attempt's deltas would follow it until the completion
event replaced the lot.

A delta may now carry `reset`: the part's content is replaced instead of
extended, and a reset with no content empties it. The part keeps its slot
and stays in flight. Deltas without the field behave as before, so this
is inert until the SDK sends it.

* 🦿 chore: Bump Agents SDK to 4.2.3

4.2.3 dispatches each summary delta while the provider is still responding
and marks the first delta after an abandoned attempt `reset`, which the
chat reducer now honors. It also stops sending reasoning as summary text,
which is where the `incoming.content is not iterable` handler errors
during compaction came from.

The release changed only the SDK's own dev dependencies and overrides, so
the lockfile moves the package's version, URL and integrity and nothing
else.
2026-11-15 08:53:22 -05:00
Danny Avila
08f9d7f7e0
🧵 feat: Stream a Background Subagent Child Through Its Own Generation Job (#18169)
* 🫀 feat: Let a Job Owner Keep a Silent Run Alive

A generation job's idle clock advances only with emitted chunks, so a run that
works without output for 20 minutes is reaped while it is still alive.
touchJob refreshes the idle clock and the storage lifetimes an append would
have extended, fenced on the generation epoch and limited to the replica that
owns the runtime.

* 🧶 refactor: Share One Fold From Child Frames to Content Parts

readSubagentContent folded public child frames into content parts inline.
The fold is now a synchronous function a second caller can use, so a frame
can be folded and published without yielding in between.

* 🏷️ feat: Mark the Generation Job of a Background Subagent Task

Job metadata gains subagentTaskId and subagentParentConversationId, set only
by the subagent task store. A marked job is a child-thread job, so it stays
out of the active chat list, and isBackgroundChildJob tells it apart from an
event-bound child, whose job the chat controller owns.

* 🧵 feat: Run a Background Child as a Resumable Generation Job

createChildGenerationHost opens a generation job keyed by the child thread id
and feeds it the child's public step frames. Text deltas that queue behind a
slow write merge instead of dropping, the terminal state is claimed before the
caller persists and the final event is published only afterwards, and no
stream failure can fail the child: the run and its result carry on without a
live view.

* 🪢 feat: Stream a Background Child Through Its Own Generation Job

The subagent task store takes a childGenerations dependency. Once a child's
thread and input row are durable it opens a job keyed by the thread id, feeds
it each public frame, refreshes its idle clock on every lease renewal, and
settles it around its own persistence, so a reader sees the final event only
after the result row exists. A cancel, a failure and a job aborted from
outside all end both the child and its stream.

endpoints.agents.subagentActivity.generationJobs turns it off. A stream that
cannot be opened or written never fails the child.

* 🔌 feat: Give the Server's Task Store Its Child Stream

The host wiring builds the child generation host from the generation job
manager and hands it to the subagent task store, so a background child's
stream is reachable in the running server.

* 🚧 fix: Refuse Chat Abort and Steer on a Background Child's Job

The chat abort route saves a user row and a partial response and upserts the
conversation, and the steer route queues text only the chat controller drains.
Both authorized on the job's owner alone, so either could act on a background
child's job and write a chat-shaped history into a view-only thread, or accept
a steer nothing would ever apply. Both now answer 409 for a job the subagent
task store owns; the child is stopped and steered through its control
endpoint.

* 🧹 fix: Evict a Finished Job Before a Live One at Capacity

The in-memory job store made room by deleting its oldest job whatever its
status, so a full store could end a run somebody was still waiting on. It now
takes the oldest finished job first. Also covers a job manager that shuts down
while a background child runs: the child still persists its cancellation.

* 🛰️ test: Read a Background Child's Stream From Another Replica

Against real Redis: a second replica resumes with everything the child has
streamed, receives only newer deltas live, then the final event; a child that
streams past the manager's 5,000-event early buffer before anyone attaches
still resumes whole on both replicas; and the owner's touch keeps a silent
child's job alive.

* 🧽 chore: Sort Imports in the Child Stream Files

* 🧪 test: Expect the Child Stream Lever in the Activity Defaults

* 📜 feat: Store What a Background Child Streamed as Standard Content (#18173)

A child's result row carried its text and a bounded activity projection, not
the content parts every agent message stores, so a reader had to rebuild the
child's output from the projection. The row now also carries what the child
streamed, on completion, failure and cancellation, in the standard shape.

endpoints.agents.subagentActivity.generationContentBytes bounds it (4 MiB by
default, 0 stores none). Content over the bound is left off, so the row always
fits and keeps its text and projection as before.

* 🛟 fix: Keep a Stalled or Failing Child Stream From Touching Its Child

Four ways the stream could still reach the run it only observes. A frame that
could not be copied threw into the child's own progress report. A job store
that never answered held the child's start behind job creation and its result
behind the terminal claim. And a stream that had stopped being written was
never ended, so its job read as a live child for twenty minutes after the
child finished.

Frames are now copied defensively, opening and settling are bounded, a job
that arrives after its child stopped waiting is ended, and a detached stream
is still touched and still settled with its full final event.

* 🧯 fix: Let a Child Stream Observe Its Run Without Ever Stopping It

Review round 1.

A failed Redis append retires the job's runtime by aborting its controller,
and the child stream forwarded every abort of that controller to the task
store as a cancellation. A stream-store outage therefore stopped the child's
model and tool work. The stream no longer signals the child at all: deletion,
shutdown and the control endpoint already stop a child through the task
store, and an aborted, reaped or retired job now only ends the live view.

The in-memory store's capacity eviction preferred any terminal job, including
one that still owed persistence, a host action, a schedule reconciliation or
a provider drain. Those are no longer treated as finished.

The chat abort route's refusal for a background child's job moves out of the
CJS route into createBackgroundChildAbortGuard, registered ahead of it.

* ♻️ fix: Replace a Dead Background Child's Job on Its Thread

A background child's job outlives an owner that crashed, or a settlement that
could not reach the store, for up to twenty minutes. A continuation of the
thread in that window was refused its own stream, because the dead job still
read as live. The caller of open holds the thread's lease, so a background
child's job still marked live there has lost its owner: it is replaced and its
readers are told to refetch. A live job that is not a background child's, such
as an event-bound child paused for approval, is still never replaced.

* 🧱 fix: Fail the Abort Guard Closed and Budget Content Against the Whole Row

Review round 2.

The abort guard passed the request on when its job lookup failed, so a
retried lookup in the route could run the chat-shaped abort on a child the
guard never saw. A failed lookup now ends the request at the error boundary.

A child's streamed content was checked against its own limit only. A result
row also carries the text and the transcript, so content that passed the
limit could push the document past MongoDB's 16 MiB and turn a successful
child into a failed one. The content is now the optional field: it is left
off whenever the row's large fields together would exceed the budget.

Also accounts for the guard's job read in the two abort route specs that
sequence it, and gives the limiter spec's api mock the guard.

* 🪶 refactor: Settle a Child Stream Once and Fold a Frame It Cannot Copy

The task store settles a child's stream on its outcome path and again in its
cleanup. The second call made another terminal claim that could only lose;
the stream now remembers that it claimed and only persists. A frame that
cannot be copied is still folded from the original, so the stored content
stays whole when the stream detaches over it.

* 🧪 test: Cover the Child Stream's Failure Branches and the Content Fold

The change-risk report showed the stream's fail-open branches untested: a
terminal claim that lands after its wait, a claim or a final publish that
throws, the settle timeout, the backlog limit, and a rejected touch. Each now
has a case. The shared content fold gets direct cases for a closed step, a
commentary phase and an applied steer.
2026-11-15 08:35:08 -05:00
Danny Avila
929f05daec
🪡 fix: Leave Child-Thread Runs Out of the Active Chat List (#18167)
An event-bound subagent child runs as a generation job keyed by its child
thread id, so GET /chat/active returned that id beside the user's chats. The
sidebar has no row for it, looks the conversation up, gets 404, and asks again
every two seconds for as long as the child runs.

The manager's active-job read now takes a filter and leaves child-thread jobs
out. The job still answers its own status and stream reads, and owner cleanup
still counts it.
2026-11-14 15:01:48 -05:00
lia-by-librechat[bot]
5473f91036
🪴 fix: Recognize Live Code Files Across API Layouts (#18165)
Some checks failed
Publish `@librechat/data-schemas` to NPM / pack (push) Has been cancelled
Docker Dev Images Build / publish (push) Has been cancelled
Sync Helm Chart Tags / Ignore non-main push (push) Has been cancelled
Sync Helm Chart Tags / Sync chart tags (push) Has been cancelled
Publish `@librechat/data-schemas` to NPM / publish-npm (push) Has been cancelled
Co-authored-by: Lia <lia@librechat.ai>
2026-11-14 14:00:26 -05:00
lia-by-librechat[bot]
68c436f6bc
🦭 fix: Verify Approval Checkpoints With Authoritative Reads (#18166)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-14 13:50:27 -05:00
Danny Avila
3a277a2652
🪔 feat: Recover Remote SDK Connections Without Repeating Execution (#18163)
* wip: persist remote runtime recovery frames and ownership

* feat: recover remote SDK connections without repeating execution
2026-11-14 13:49:59 -05:00
lia-by-librechat[bot]
3376942149
🛒 fix: Correct Agent Admission and Failed-Run Billing (#18157)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-14 12:20:51 -05:00
lia-by-librechat[bot]
f2b4a58b0e
🔦 fix: Skip Unselected Tool Schemas Under Legacy PII (#18158)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-14 12:20:16 -05:00
lia-by-librechat[bot]
e7669c147b
🐹 fix: Bound In-Memory Configuration Cache Retention (#18156)
* 🐹 fix: Bound In-Memory Configuration Cache Retention

* test: Require User Principal in Config Retention Fixture

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-14 12:19:58 -05:00
lia-by-librechat[bot]
8ed7a7d3d7
🍂 fix: Emit Persisted Agent IDs in Attribution Headers (#18151)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-14 12:15:33 -05:00
lia-by-librechat[bot]
4074c2a279
🦑 chore: Upgrade OpenTelemetry HTTP Instrumentation to 0.222.0 (#18152)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-14 12:14:49 -05:00
Danny Avila
4c6da07a7a
🚠 feat: Bridge Registered SDK Agents to Remote Runtimes (#18150)
* feat: bridge registered SDK agents to remote runtimes

* docs: make remote runtime parity gates explicit

* fix: bound runtime authorization admission and shutdown

* fix: reject unresolved runtime secrets and preserve checkpoint queries

* fix: order remote policy hooks after preceding events
2026-11-14 10:56:05 -05:00
lia-by-librechat[bot]
59cf1af4b7
🦠 fix: Patch Vulnerable Database and Transport Dependencies (#18124)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-14 09:14:34 -05:00
Marco Beretta
4a13f26651
🧽 fix: Guard Remaining Mongo Cleanup In Post-Audit Tests (#18132)
* fix: Guard Remaining Mongo Cleanup In Post-Audit Tests
2026-11-14 15:08:10 +01:00
Danny Avila
fad2c51da4
🏇 feat: Register SDK-Backed Agents for Native Chat (#18114)
Some checks are pending
Docker Dev Images Build / publish (push) Waiting to run
Sync Helm Chart Tags / Ignore non-main push (push) Waiting to run
Sync Helm Chart Tags / Sync chart tags (push) Waiting to run
* feat: register SDK-backed agents through agent management

* fix: gate SDK binding writes and preserve native lifecycle
2026-11-13 13:02:53 -05:00
Danny Avila
fb3b299de6
🪪 feat: Add Agent Identity to Provider and MCP Header Templates (#18113)
* feat: resolve executing agent ids in MCP header templates

* test: preserve MCP config source literal types

* 🪪 feat: Forward the Active Agent Id in Request Header Placeholders

A gateway in front of LibreChat sees the user, the conversation and the
message, but not which agent is running — so it cannot attribute spend per
agent, apply per-agent limits, or tell agent traffic from plain chat. Adds
`{{LIBRECHAT_AGENT_ID}}` as its own namespace beside the user / body / OpenID
ones, resolving wherever the existing request placeholders already work.

The value is the primary agent's, derived once per run, so subagent steps and
auxiliary calls (summarization, titles, activity labels, memory extraction)
forward the id of the turn they belong to rather than their own. Only
persisted agents resolve: ephemeral ids embed user-authored preset text that
is unsafe in a header value, so ephemeral runs and non-agent requests resolve
to an empty value rather than forwarding literal template text.

No behaviour change unless the placeholder is configured. The MCP surface
(#14303) is not covered — its connection classification derives from
`ALLOWED_BODY_FIELDS`, so a new namespace needs a follow-up.

(cherry picked from commit 8a3f1016f0)

* test: cover shared provider and MCP agent header resolution

* docs: clarify absent agent placeholder resolution

* fix: preserve agent header boundaries across transport lifecycles

* fix: retain Google header provenance during agent resolution

---------

Co-authored-by: Jiří Krejčí <51734696+krejcji@users.noreply.github.com>
2026-11-13 13:02:39 -05:00
Marco Beretta
fbca86bba9
⚙️ fix: Guard Mongo Cleanup In Package Service Tests (#17992)
* fix: Guard Mongo Cleanup In Package Services Tests
* fix: Guard Mongo Cleanup In Agents Precedence And Promotion Tests
2026-11-13 18:18:17 +01:00
Marco Beretta
8c569a15ac
🤖 fix: Guard Mongo Cleanup And Await ACL Test Cleanup (#17991)
* fix: Guard Mongo Cleanup In Package Agents Tests
* fix: Await Actual ACL Cleanup In Shared Link Tests
2026-11-13 17:49:53 +01:00
Marco Beretta
24da3c92ed
🪨 fix: Supply Nonempty MCP Tool Descriptions for Bedrock
Supply nonempty MCP tool descriptions for Bedrock while preserving existing descriptions and approval identities.

Fixes #18013
2026-11-13 17:22:15 +01:00
Marco Beretta
ddbff5ac81
🪶 perf: Load Math, Highlighting, Side Panels and RE2 Only When Needed (#18108)
- perf: Stop Shipping the Node Crypto Polyfill to the Browser
- perf: Keep the Query Devtools Out of the Boot Chunks
- perf: Load Side Panel Tabs When They Open
- perf: Keep the RE2 Engine Out of the Browser Bundle
- perf: Load KaTeX and highlight.js Only for Math and Code
- test: Cover Code That Loads on First Need
- fix: Apply Loaded Math and Highlighting Whatever the Load Trigger Matched
- test: Assert Rendered Formulas Without Assuming Display Math
- fix: Retry a Failed Math and Highlighting Load While Mounted
- fix: Always Load Highlighting Where the Language Is Guessed
- fix: Register the PII Sizer Wherever Config Loads
- fix: Load Preview Math From the Filled-In Prompt and Keep Dollar Signs Literal
- test: Register the PII Sizer Where the Filter Harness Validates Config
- test: Preserve Side Panel Layout During Lazy Loading
2026-11-13 17:21:50 +01:00
lia-by-librechat[bot]
8246e2191f
🚋 fix: Isolate Sentinel-Aware Config Cache Entries (#18097)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-12 21:59:37 -05:00
lia-by-librechat[bot]
31b5d8d1c1
🥚 fix: Wait for Initialized Skill Metadata Across Replicas (#18094)
Some checks are pending
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
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/chat (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Frontend Unit Tests / frontend (push) Blocked by required conditions
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: Wait for Initialized Skill Metadata Across Replicas

* fix: Preserve Initialization OAuth During Resume

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-12 21:00:01 -05:00
Danny Avila
cbd4cbb5fb
🧲 fix: Settle Fast Pinned Drops, Defer the Hidden Mobile Header Menu, and Close Untraced E2E Races (#18087)
* 🧪 test: Read the Artifact Scrim's Blur From the Persistent Scrim

"a small blur surface still blurs by four pixels" read the backdrop filter
of `#artifact-viewer [role="status"]`.first() once, with a single evaluate.

The artifact panel's lazy tabs also render a `role="status"` loading
placeholder until their chunk arrives, and the panel re-renders while it
opens. A one-shot read that resolves the wrong status, or a node React has
just replaced, gets the computed style of a detached element: an empty
string instead of `blur(4px)`.

Select the always-mounted refresh scrim, the only status that carries
`aria-hidden`, and assert its filter with `toHaveCSS`, which re-resolves and
retries until the value settles.

Untraced, on two CPUs: 11 of 20 runs failed with `Received: ""` before,
20 of 20 pass after.

* ⚡ perf: Mount the Mobile Header Menu Only Once a Phone Layout Has Shown It

The chat header rendered both of its action surfaces on every load: the
desktop buttons and the mobile overflow menu, hidden with `className="hidden"`
on wide screens. The hidden menu still mounted its whole tree on desktop,
with its bookmark, export, share, temporary-chat and pull-request hooks and
its dialog providers.

Mount the overflow menu only while the drawer viewport is active, and keep
it mounted once it has been shown, so resizing back to desktop does not drop
a dialog opened from it.

Measured with a React DevTools hook counting component renders over a cold
desktop load of a saved conversation (7 warm navigations each, production
build): 1,313 component mounts before and 1,242 after, the overflow trigger
no longer in the DOM, and the median component re-renders over the load
5,835 before and 5,682 after.

`dropped-classes.spec.ts` read the overflow trigger's size on a desktop
viewport, where it was only attached; it now reads it at phone width, where
the trigger is visible.

* 🧲 fix: Settle a Pinned Row's Position on Drop, Not Only on Hover

A pinned row reorders in its `hover` callback, which judges the pointer
against the hovered row's midpoint using the offset react-dnd last recorded.
The HTML5 backend delivers hover once per animation frame, so a release that
lands in the same frame as the move across the midpoint is judged against the
offset from before it: the swap is refused and the drop keeps the old order.
A quick, deliberate drag is discarded.

The drop handler now runs the same placement against the final pointer offset
before returning its result, so `end` commits the order the pointer actually
ended on. Hovering is unchanged.

The new regression holds the hover frame and fires dragover/drop at a point
past the midpoint and at one short of it. On the previous handler the first
case keeps the old order; with this change both cases match the pointer.

In a real browser, with a drag that releases without waiting for a hover
frame: "a pinned chat cannot be dragged through a pinned model" kept the old
order in 4 of 15 untraced runs on the previous handler and 0 of 15 with this
one.

* 🧲 test: Release a Pinned Drag Without Waiting for a Hover Frame

The pinned drag helper waited for an animation frame after each settling
move, so react-dnd had delivered a hover at the final position before the
release. That kept the reorder scenario green while a release landing in the
same frame as its last move was discarded by the app.

The drop handler now settles the final pointer position itself, so that wait
no longer stands between the scenario and a failure; it only hides the
fast-release path. Release straight after the settling moves again, so the
scenario covers it.

Untraced, on two CPUs, with this helper: "a pinned chat cannot be dragged
through a pinned model" failed 4 of 15 runs against the previous drop handler
and passed 15 of 15 with the settled drop; the whole pinned-drag-rules file
passed 30 of 30.

* 🧪 test: Publish the Reaper Fixture's PID Only After It Is Written

Two reaper tests wait for a PID file to exist and then read it. The shell
creates the file when it opens the redirection and writes the PID a moment
later, so a read in between gets an empty file. `Number('')` is 0, and
`isGone(0)` reports true because there is no `/proc/0`: "escalates to
SIGKILL when the tree ignores SIGTERM" and "sweep reaps a group that
outlived a clean root exit" then fail their "still running" assertion.

Write the PID to a temporary file and rename it into place, so the file
appears only with its content. With a 0.3 s pause forced between the
redirection and the write, both tests fail on the old fixture and pass on
this one.

Also kill each spawned process group after every test, so a failing test
does not leave its trap-protected `sleep 30` behind, and read the process
state with `ps` where `/proc` does not exist.

* 🔦 test: Keep a Measured Trace and a Startup Profile When Lighthouse Fails

When the serial-latency audit fails a budget, the uploaded `.lighthouse/`
holds the JSON and HTML reports only. They name the slow metric but not the
main-thread work behind it, so a total-blocking-time failure cannot be traced
to the code that blocked without reproducing it locally.

- Run Lighthouse with `--save-assets`, keeping each run's measured
  `lhr-*-0.trace.json` for Chrome's Performance panel. Its raw DevTools
  network log is deleted; the trace is parsed and every string value has the
  session cookie values redacted, so numeric timings and JSON structure
  survive even for short cookie values. A trace that does not parse (an
  interrupted run) is deleted rather than uploaded raw.
- After a failed audit, navigate once more with the CDP profiler running and
  save `.lighthouse/startup.cpuprofile`, including three seconds after the
  transcript appears so late catalog callbacks are sampled. This runs after
  the measured audits, so it cannot change their numbers, and a profiling
  error never replaces the original failure.

Budgets, runs and the workflow are unchanged; the workflow already uploads
`.lighthouse/`.

* 🔦 test: Keep Lighthouse Traces Only When the Audit Fails

Each saved trace is about 45 MB, so keeping all three on every run turned the
always-uploaded `lighthouse` artifact from about 2 MB into about 137 MB for
runs that pass and need no diagnosis. Delete the traces once the test's last
assertion has passed; a failing run still uploads them with its reports.

* 🧪 test: Read the Streaming Shimmer From the Live Footer

"an in-flight label sweeps, and high contrast holds both stops opaque" read
the stream-elapsed label's styles once through `locator.evaluate`. The label
lives in the streaming footer, which re-renders while the reply streams; when
the node the locator resolved was replaced before the evaluate ran, the read
came from a detached element or failed.

Assert the animation name and background clip with `toHaveCSS`, which
re-resolves and retries, and read the shimmer's dip alpha by querying the
current node inside the evaluate, polling until it settles.

Untraced, on two CPUs: 4 of 20 runs failed with `Received: ""` before,
20 of 20 pass after.

* 🧪 test: Click the Drawer's New Chat Link, Not Whichever One Is Exposed

"returns focus after right-clicking an unopened running menu on a small
screen" opens the mobile drawer and clicks
`getByRole('link', { name: 'New chat', exact: true })`. On a saved chat the
header row also offers a New chat link, and it hides only when the sidebar's
expanded state commits. On mobile that commit is deferred: the drawer starts
sliding first and the state flips a few frames later inside a transition,
which a streaming run keeps pushing back. The drawer's Close button is
already visible during the slide, so the test reaches the click while both
links are exposed and fails with a strict mode violation.

Scope the locator to `#mobile-drawer`, the link the test means.

Untraced, on two CPUs: 20 of 20 runs failed on the previous locator and 20
of 20 pass with this one.

---------

Co-authored-by: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
2026-11-12 09:47:46 -05:00