Commit graph

2043 commits

Author SHA1 Message Date
shars
3a117fe256
Merge 2296a180ae into b2244f7b53 2026-11-18 14:49:47 +01: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
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
dc07a93343
🎮 feat: Use Saved-Agent Host Models in Remote SDK Runtimes (#18261) 2026-11-18 06:16:00 -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
3de814c0fa
🥊 fix: Reject Malformed LDAP Credentials Before Authentication (#18235) 2026-11-16 20:04:11 -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
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
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]
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
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
Marco Beretta
c44ce3b825
⏱️ test: Allow Cold-Cache Boot Time In API Server Spec (#18145)
* test: Allow Cold-Cache Boot Time In API Server Spec
2026-11-14 16:03:14 +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
shars
2296a180ae chore: update to dev 78c516b61 2026-11-13 16:28:34 +03:00
Danny Avila
06c58c5fc1
🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs (#18058)
Some checks are pending
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

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
lia-by-librechat[bot]
79e209030c
🦂 feat: Add GPT-6 Cyber Support (#18023)
* 🦂 feat: Add GPT-6 Cyber Support

* fix: Isolate Cyber Summaries and Account for Cache TTLs

* fix: Complete Cyber Cache Accounting With Agents 4.2.2

* test: Use the Typed SDK AI Message Guard

* test: Narrow SDK Callback Messages Safely

* fix: Shape Cyber Summary Targets With Authenticated Identity

* test: Type Summary SDK Fixtures Consistently

* fix: Enforce Cyber Identity After Final Summary Merging

* fix: Resolve SDK URL Defaults Before Cyber Shaping

* fix: Preserve Cyber Summary Endpoint Routing Policy

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-11 16:50:26 -05:00
lia-by-librechat[bot]
1ef7d244b5
🌄 fix: Show Skill Pills When a Turn Starts (#18036)
Co-authored-by: Lia <lia@librechat.ai>
2026-11-11 12:49:50 -05:00
lia-by-librechat[bot]
42219ec8e9
🚜 feat: Support Native PostgreSQL Tool Favorites (#18032)
* 🚜 feat: Support Native PostgreSQL Tool Favorites

* fix: Guard PostgreSQL Reconciliation and Connection Leases

* fix: Scope Favorites Erasure Fences to Deletion Attempts

* fix: Preserve Account Erasure Ownership Until Cancellation Completes

* fix: Reject Unsupported PostgreSQL Command Flags Before Connecting

* fix: Keep Command Validation Compatible With the TypeScript Target

* fix: Keep Migration Previews Read-Only and Preserve Erasure Recovery Identity

* fix: Fence Erasure Recovery Across Tenant and Ownership Changes

* fix: Isolate Migration Dependencies and Keep Mongo Scans Outside Transactions

* fix: Inject PostgreSQL Backend Factories at Composition Roots

* ci: Shard Complete Mutation Work Without Relaxing the Aggregate Gate

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-11 12:07:07 -05:00
Marco Beretta
b1591d291b
fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
Marco Beretta
2e50ea0993
fix: Guard Mongo Cleanup In Controller And Migration Tests (#17989) 2026-11-11 10:30:38 +01:00
Dustin Healy
21c286346b
🔗 fix: Update Slack Account Linking in Place (#18039)
* fix: Advance Slack Account Linking in Place

* fix: Narrow Slack Reply Transport Contract

* fix: Make Slack Link Reply Updates Monotonic

* fix: Clear Invalidated Slack Link Cards After Delayed Writes
2026-11-10 21:04:12 -08:00
Dustin Healy
67fd560fac
🔐 feat: Add Admin-Assigned Slack Bot Managers (#17836)
* feat: add admin-assigned Slack bot managers

* fix: align revoked bot access messaging with manager grants

* chore: refresh pull request synchronization

* fix: authorize Slack bot manager search through workspace capabilities

* fix: preserve administrator authority during bot grant changes

* test: Observe and Drain Concurrent Fixture Work
2026-11-10 21:04:12 -08:00
Dustin Healy
3e19ef42fe
👥 fix: Let Members Connect Agents to Slack Workspaces (#17835)
* fix: allow members to connect agents to installed Slack workspaces

* fix: clarify Slack destination assignment actions

* fix: align Slack assignment status with destination heading

* fix: explain Slack agent assignments in terms of the connected bot

* fix: separate Slack connection setup, management and confirmation

* fix: name replaced agents only when the member can view them

* perf: avoid redundant Slack assignment identity lookups
2026-11-10 21:04:11 -08:00
Dustin Healy
567aeefe93
🧹 fix: Remove Disconnected Slack Workspaces (#17834)
* fix: Allow Admins to Remove Disconnected Slack Workspaces

* fix: Use Workspace Status Chips and One Confirmation Action

* fix: Confirm Workspace Removal in a Stacked Dialog

* fix: Align Confirmation Cancel Action to the Left
2026-11-10 21:04:11 -08:00
Dustin Healy
fdf75e0174
🔧 fix: Fence Channel Startup and Transaction Capability (#17831)
* 🔧 fix: Fence Channel Startup and Transaction Capability

* 🔧 fix: Gate Clustered Workers Until Startup Completes
2026-11-10 21:04:10 -08:00
Dustin Healy
1f27f5848a
📦 feat: Package Shared Slack Workspace Deployments (#17815)
* feat: Package Shared Slack Workspace Deployments

* fix: Require Explicit Shared Slack Deployment Prerequisites

* fix: Validate Public Slack Deployment Origins

* fix: Keep Shared Slack App Setup in Organization Administration

* 🔧 fix: Validate Shared Gateway Deployment Prerequisites
2026-11-10 21:04:10 -08:00
Dustin Healy
cd4652279c
🌐 feat: Connect Organization Slack Workspaces to Agents (#17811)
* feat: Route shared Slack installations through durable channel workers

* fix: Retain workspace metadata projection after helper cleanup

* fix: Honor configured proxy for Slack credential verification

* feat: Complete Shared Slack Workspace Setup and Routing

* fix: Integrate Shared Routing Retirement and Helm Startup

* fix: Cache Gateway Preparation and Recover OAuth Notifications

* fix: Route Organization-Owned Slack Apps Through the Shared Gateway

* 🔒 fix: Close Shared Slack Lifecycle and Retry Boundaries

* test: Isolate Channel Policy Route From Workspace Startup
2026-11-10 21:04:10 -08:00
Dustin Healy
f5ac244781
🔌 feat: Add Tenant-Owned Slack Installation Storage and OAuth (#17810)
* 🔌 feat: Connect Organization Slack Workspaces

* 🔒 fix: Protect Deployment Slack App Configuration

* fix: Make Slack install callbacks terminal and defer setup UI

* fix: Store Organization-Owned Slack App Credentials

* 🔒 fix: Recheck Slack Installation Authority at Callback Boundaries
2026-11-10 21:04:09 -08:00
Dustin Healy
f70aff8420
🧹 refactor: Consolidate Channel and Response Contracts (#17705)
* refactor: consolidate unreleased channel and response contracts

* test: align gateway process smoke with current bundle

* fix: retain dispatch acknowledgement identity across pauses

* test: align remaining fixtures with initial channel contracts

* test: align admin integration fixture lifecycles
2026-11-10 21:04:06 -08:00
Dustin Healy
1081a92f02
👤 feat: Link and Revoke Personal Channel Accounts (#17615)
* 👤 feat: Link and Revoke Personal Channel Accounts

* fix: Own Channel Link Lifetimes and Complete Channel Entry Points

* fix(channels): activate trusted link URLs with account page

* fix: Preserve Personal Consent for Channel Managers

* test: preserve channel fixture in upstream agent selection cases
2026-11-10 21:04:04 -08:00
Dustin Healy
0c6c223cdd
⏯️ feat: Review and Stop Background Responses (#17613)
* ⏯️ feat: Review and Stop Background Responses

* fix(responses): activate browser review with its owner page

* fix: Preserve Queued Responses Across Interactive Activation

* fix: Use Shared Lifecycle For Owner Review Submission

* fix: Own Interactive Response Composition and Absolute Deadlines
2026-11-10 21:04:04 -08:00
Dustin Healy
8596615d1d
🌐 feat: Wire Responses and Channel Lifecycle APIs (#17611)
* 🌐 feat: Wire Responses and Channel Lifecycle APIs

* fix: Align Channel Application Policy and Source Authority

* fix: Preserve Configured App Budgets in Canonical Response Commits

* Expose Fenced Channel Receipt Reconciliation Routes

* fix: Keep Ordinary Chat Capture In Its Existing Owner

* fix(channels): scope worker authority and defer browser activation

* fix(responses): gate admission on canonical queue readiness

* fix: Recover Durable Response Dispatch Across Queue Shutdown

* fix: Preserve Upstream Endpoint Config Insertions

* test: Align Channel Runtime Configuration Contract
2026-11-10 21:04:03 -08:00
Dustin Healy
aae13f6817
📎 feat: Resolve Channel Attachments and Usage Summaries (#17608)
* 📎 feat: Resolve Channel Attachments and Usage Summaries

* fix: Bound Response Artifact Catalogs and Reauthorize Trace Disclosure

* fix: unify channel artifact budgets and generated provenance
2026-11-10 21:04:02 -08:00
Dustin Healy
a1ac175544
💾 feat: Persist and Continue Stored Agent Responses (#17605)
* 💾 feat: Persist and Continue Stored Agent Responses

* fix: unify response persistence and terminal ownership

* fix: Commit Canonical Responses With Conversation History

* test: Keep Interrupted Erasure Payloads Private

* fix: Fence Canonical Response Materialization During Rolling Upgrades
2026-11-10 21:04:01 -08:00
Dustin Healy
8552368176
🔄 fix: Restore MCP Sign-In Prompts After Reload (#17604)
* 🔄 fix: Restore MCP Sign-In Prompts After Reload

* wip: Separate OAuth Presentation and Publication Lifecycles

* wip: Verify OAuth Publication and Presentation Ownership

* fix: Fence OAuth Publication and Preserve Tool Outcomes

* fix: fence first-turn OAuth recovery by durable identity and retention

* test: Cover Canonical OAuth Recovery Replay in Manager

* fix: Unify Startup OAuth Prompt Lifecycle Ownership
2026-11-10 21:04:00 -08:00
Dustin Healy
9aa81cf1ab
🔐 fix: Redact MCP OAuth Diagnostics (#17603)
* 🔐 fix: Redact MCP OAuth Diagnostics

* fix: Keep OAuth Resource Credentials Out of Diagnostics

* test: Type the OAuth Completion Diagnostic Fixture
2026-11-10 21:04:00 -08:00
Dustin Healy
7e51963f2b
📊 feat: Preserve Response Accounting and History (#17599)
* 📊 feat: Preserve Response Accounting and History

* fix: preserve accounting completeness and invocation provenance

* fix: retain invocation receipts across repeated contextualization

* feat: Own Foreground Response History and Terminal Publication

* fix: Retain Complete Submitted Response History

* test: Exercise Artifact and Response Completion Together

* chore: Validate Foreground Types and Lint

* style: Use Narrowed Canonical Outcome

* fix: Own Foreground Completion Through Tracked Persistence

* refactor: Keep Foreground Request Contract Storage Independent
2026-11-10 21:03:58 -08:00
Dustin Healy
9d14eb5b35
🛡️ fix: Retain Execution Ownership Until Terminal Persistence (#17598)
* 🛡️ fix: Retain Execution Ownership Until Terminal Persistence

* wip: separate execution attempt and persistence authorities

* test: prove execution ownership and persistence boundaries

* refactor: settle execution before returning its captured outcome

* test: verify signed channel execution at controller ingress

* fix: Unify Source Ingress and Execution Settlement Contracts

* test: Preserve Real Resume Guard in Chat Route Fixtures

* fix: Persist Terminal Journal Ownership and Remove Unused Chat Channel Lane
2026-11-10 21:03:58 -08:00
Dustin Healy
7dd4fafdf3
📬 feat: Persist Channel Events and Delivery Receipts (#17595)
* 📬 feat: Persist Channel Events and Delivery Receipts

* fix: enforce channel run identity and fenced recovery

* fix: fence and erase channel state during account deletion

* refactor: share channel owner admission with private persistence

* refactor: name channel account-erasure boundary explicitly

* fix: prove channel identity and delivery authority at storage boundaries

* refactor: enforce channel delivery protocol and terminal lifecycle

* fix: enforce channel tenant and operation boundaries

* fix: initialize channel config from its composition owner

* test: verify config installs channel storage reader

* test: complete config initializer contract in model mocks

* test: include channel config reader in migration fixture

* test: await SSE subscription before advancing keepalive time

* test: Observe and Drain Concurrent Fixture Work
2026-11-10 21:03:57 -08:00
Danny Avila
60a74e6cd4
🧷 fix: Promote Unapplied Steers to Durable Queued Turns at Run End (#18028)
* 🧷 fix: Promote Unapplied Steers to Durable Queued Turns at Run End

A steer the server accepted (202) but the run never applied was handed back
in FINAL as `pendingSteers` and re-owned by the browser as a tab-local queued
message. A reload, closed tab, or a predecessor race before the drain lost it.

At terminal publication, a normally completed run now promotes such steers
into server-owned agent queued turns (parent: the ended response, epoch: the
ended generation's createdAt, chained behind any turn already queued against
that epoch). The job store hands the parked copy over atomically
(`promoteSteerLeftover`: parked item removed, receipt settled `recovered`), so
status recovery, lost-ACK retries and legacy recovery starts cannot queue the
same words again. FINAL reports the receipts in `promotedSteers`; the client
adopts them as server rows instead of converting the steer locally.

Promotion is opt-in per steer (`promoteLeftover`, sent only by clients that
adopt receipts and only for steers with no tab-only context), so older
clients keep the legacy path unchanged, and older servers simply never
report `promotedSteers`.

* 🔒 fix: Settle a Promoted Steer's Hand-Off at Admission, Not Only at FINAL

The job-store hand-off of a promoted steer now returns an outcome and stamps
the receipt with the owning queued turn, so it is idempotent for that turn.
The queued-turn resolver repeats it before admitting a promoted turn: it
completes a hand-off a crash interrupted, and cancels the turn when the
parked copy was discarded or recovered elsewhere, so the words never run
twice. At FINAL, a row whose hand-off was refused and whose retirement cannot
be confirmed is withheld from `pendingSteers` and left for that admission
check. The conservative reconcile frame keeps `promotedSteers`, and the
client adopts it there before sweeping local chips.

* 🔏 fix: Give Promoted Steers Durable Ownership, Their Run's Queue Lineage and Approval Mode

A turn promoted from an unapplied steer now records its source on its own
row: the steer's ids, the generation that accepted it, and a mark set only
once the job store handed the parked copy to that row. Admission runs a
promoted turn on that mark or on a hand-off the job store confirms now;
without proof (the store's evidence expired, or the host cannot ask) the
turn is held for review instead of running.

- Hand-off replies that are lost no longer cancel the row. The row stays as
  the client's handle and its admission settles ownership, so a committed
  hand-off can no longer leave the steer with no runnable copy.
- A replayed promotion never hands the parked copy to a row that was
  cancelled or failed.
- Promoted turns join the queue lineage of the generation that accepted
  the steer, so a sibling still queued behind that run no longer strands
  them with a predecessor mismatch.
- The steer request carries the sender's code approval mode onto the
  promoted turn; an unreadable mode keeps the steer on the client path.
- A steer whose quotes its owner stripped stays on the client path.
- The queued-turn receipt names the promoted steer by both ids, and the
  receipt list retires a pane's local copies even when it missed FINAL.

* 🚧 fix: Fence Promoted Turns to Workers That Prove Steer Ownership

A promoted row without an approval mode was published under the v1 queued
turn capability, so during a rolling deploy a worker that predates the
ownership check could claim it and run an unsettled row while the parked
steer was still recoverable elsewhere.

Promoted rows now publish under a new agent_queued_turn_v3 capability and a
v3 delivery identity, always reserved before insertion. A replica that
projects an older version can neither publish the reserved delivery nor
claim it, and enqueue refuses a promoted row without a reservation.

* 🪦 fix: Keep a Dead Promoted Turn Answering for Words It Held

A pane that learns of a promoted steer from the receipt list dropped the
mapping for every dead row. A row quarantined as ADMISSION_INDETERMINATE can
still settle as admitted, and a row that died after it was proven the sole
owner of the words is their only surface, so in both cases the pane kept a
chip whose recovery could never run.

The receipt now says whether the turn owned its steer's words, and a dead
receipt keeps answering for them when it did or when its admission is
indeterminate. A replayed promotion applies the same rule to a settled row.

* 🧾 fix: Find Promoted Turns by the Steer a Pane Holds, Join Root Lineages, Redact Hand-off Errors

- A promoted turn's request id is now derived from the client steer id, and a
  pane asks for the receipts of the steers it still holds a local copy of
  (recovery rows and failed chips). A promoted turn that already ran is only
  listed when asked for by name, so a pane that missed FINAL now finds it
  and retires its copy. A client steer id too long to key a queued turn is
  not promoted.
- The lineage lookup includes a generation admitted from a root queued turn,
  which has a parent and no epoch. The promoted turn joins that lineage
  without an epoch instead of opening a second one.
- A failed hand-off at admission reports a fixed message. The job store's
  own error text stays out of the dead-letter record a client can read, and
  promotion logs carry safe error metadata instead of error text.

* 🔢 fix: Ask for Held Steers First Under the Receipt Lookup Limit

The receipt list answers for at most 100 request ids, and a pane's server
rows were listed ahead of the steers it still holds, so a full server queue
could push every held steer out of the request. A promoted turn that had
already run was then never found.

Held steers now come first. An active server row is listed whether or not
it is asked for, while a settled promoted turn is found only by name.
2026-11-10 22:43:32 -05:00
lia-by-librechat[bot]
0eadbc45b1
🪸 refactor: Separate Shared-Link and Schedule Persistence (#18031)
Some checks are pending
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
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
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
Co-authored-by: Lia <lia@librechat.ai>
2026-11-10 15:44:13 -05:00
lia-by-librechat[bot]
c102e2d498
🦪 fix: Preserve Generated File Byte Snapshots (#18009)
* fix: Preserve Generated File Byte Snapshots

* fix: Select Snapshot Generations Before Resource Partitioning

* fix: Select Snapshot Destinations Before File Admission

* fix: Separate Snapshot Capture Identity and File Consumers

* fix: Separate Owned References and Literal Snapshot Mounts

* fix: Clean Up Unfinished Snapshots and Normalize Upload Arbitration

* fix: Keep Shared Snapshot Mounts Ahead of Private Receipts

* test: Keep Snapshot Priority Regressions Type-Safe

* fix: Preserve Literal Snapshot Paths During Legacy Recovery

* fix: Reconcile Legacy Receipt Paths Before Recovery

* fix: Reuse Fresh Unnamed Legacy Code References

* fix: Expire Snapshot Reservations Before Provisioning

---------

Co-authored-by: Lia <lia@librechat.ai>
Co-authored-by: lia-by-librechat[bot] <328778573+lia-by-librechat[bot]@users.noreply.github.com>
2026-11-10 13:45:15 -05:00