mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
317 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
91fd4b6833
|
🧭 perf: Validate Agent Models Against Their Own Endpoint Catalog (#17972)
* perf: Validate Agent Models Against Their Own Endpoint Catalog * perf: Share In-Flight Model List Fetches * test: Cover Agent Model Validation Across Endpoints * test: Check Agent Model Catalog Parity With the Real Loaders |
||
|
|
23aa0f822d
|
🗂️ feat: Defer System Tools Behind Tool Search (#17864)
* 🎛️ fix: Treat Model Spec Tools as Defaults, Not Mandates * 🗂️ feat: Defer System Tools Behind Tool Search |
||
|
|
7e7f559ea6
|
🏎️ perf: Parallelize Independent Agent and Schedule Lookups (#17465)
* perf: Parallelize Serial Lookups on Agent Load, Discovery, Skills, and Schedules * fix: Address Review Findings on Parallel Lookups Stage same-level discovery results before collecting edges so a shared sibling is initialized once, bound resume snapshot fetches to small chunks so over-budget graphs stop early, and surface the first ordered image failure without waiting on later reads. Update the skill name test for bounded concurrency. * test: Tag Existing Mock Specs as Acceptance Scenarios for Parallel Lookups * feat: Make Parallel Lookup Bounds Configurable Add a concurrency section to librechat.yaml for MCP catalog, skill name, skill file and resume agent lookups. Defaults equal the previous hard-coded values. * style: Sort Imports for Configurable Lookup Bounds * test: Match Model Spec Skill Resolution Args With App Config * test: Close the Builder Drawer Before Chatting on Narrow Viewports * fix: Surface Fatal Discovery Errors Without Awaiting Later Siblings * fix: Reject Discovery on the First Fatal Load Regardless of Queue Order * fix: Keep Image Encoding Fail-Fast With Parallel Reads * fix: Reject Resume Snapshot Lookups Without Waiting on the Whole Chunk * feat: Make Connected Agent Discovery Concurrency Configurable |
||
|
|
784582850a
|
🧯 fix: Guard SSE Writes and Interval Cleanups Against Crashes (#17462)
* fix: Harden Timer Sweeps, SSE Writes, and Violation Counters Guard SSE writes against ended or destroyed responses through one helper, catch and single-flight the job store and TTL cache cleanup timers, serialize in-process counter updates, cap the violation log, prune stale OAuth failure records, batch the active-job lookup, and count Redis keys with DBSIZE. * refactor: Drop the redundant violation log entry copy * refactor: Log single-flight sweep failures from the API package * test: Cover active generation listing and client disconnect mid-stream * refactor: Configure violation log retention and move title timeout into the API package * feat: Configure OAuth failure retention through mcpSettings * fix: Prune OAuth failures promptly under short retention |
||
|
|
a2cd772d49
|
🏭 refactor: Centralize Source Prompt Imports in the Prompt Service (#17272)
PromptService gains importSourceGroup, which finds or creates a source pointer group, grants the PUBLIC viewer role and rolls the group back if the grant fails. The Langfuse catalog sync calls it instead of four storage callbacks and two Mongo error predicates, and the prompt service is composed once in api/server/services/Prompts.js and passed to the prompt routes, linked instructions, instructions prompt access and the Langfuse sync runner. Co-authored-by: Rebase Probe <probe@example.com> |
||
|
|
02613ce212
|
⛲ feat: Resolve Native and Langfuse Prompts by Source (#16909)
The prompt service dispatches resolvePrompt by group.source. A read-only Langfuse adapter fetches the text prompt on each use, with no cache, after a resolver checks the deployment gate, the tenant, prompt sync, the connection and the stored source identity. GET /api/prompts/groups/:groupId/resolve returns resolved content for native and Langfuse groups, with a per-user limit set by rateLimits.promptResolve (default 60 per minute). Agent-instruction links stay native only. |
||
|
|
532214c022
|
🐡 fix: Bound Tool Approval Admission Work (#17387)
* 🐡 fix: Bound Tool Approval Admission Work
* style: Normalize HTTP Regression Formatting
* fix: Validate Persisted Options Before Runtime Alias Expansion
* fix: Preserve Option Limits Across Reset and Initialization
* fix: Keep Legacy Approval Options Readable in Management Responses
* fix: Retain Option Limit Provenance Through Runtime Normalization
* test: Use a Typed MCP Configuration Fixture
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
5e90cc45e4
|
📎 feat: Copy Chat Attachments into Attached Workspaces (#17376)
* 📎 feat: Copy Chat Attachments into Attached Workspaces A chat on an attached workspace now copies the user's own attachments into .librechat/attachments/ before the model runs, through the worker's import_file operation, and tells the model where they are. A worker without the operation, a deny file-write policy, or a copy that fails or runs past its bound leaves a plain note saying the file is not on this machine and why. * 🧭 fix: Scope Attachment Records by Tenant and Prime Late Subagents Match the tenant when recording a workspace copy, require write_file so the folder can always ignore itself, key copies by the live Code API route and worker, keep a digest when a copy fails so it is not hashed again, stop waiting on bookkeeping at the deadline, refuse to start on a cancelled turn, prime lazily initialized subagents through one per-turn primer, and make the budget configurable as endpoints.agents.workspaceAttachments.timeoutMs. * 🙈 fix: Copy Attachments Only Where the Folder Ignores Itself Gate every copy on .librechat/attachments/.gitignore ignoring the whole folder: create it with *, and accept an existing one only when it already ignores everything, otherwise report the file as unavailable with how to fix it. Prime a lazily routed subagent against its own tool context with a provisioning callback bound to it, and check for a cancelled turn before arming the deadline timer. * 🪢 fix: Recheck the Attachment Ignore Rule Each Turn and Share One Request Cap Drop the process-wide ignore cache and check the folder once per turn, shared by every agent, rejecting a truncated read. Cap workspace requests per turn across agents (workspaceAttachments.concurrency, default 3), name converted images for their stored type, log only safe error metadata, and keep the bookkeeping write from advancing updatedAt. * 🔀 chore: Take dev's File Methods Ahead of Merging dev dev and this branch both add to the same lines of the file methods module. Take dev's version here so the merge of dev that follows is clean; the next commit adds recordFileWorkspaceImport back beside dev's new methods. * 🧩 fix: Ignore Workspace Operations a Newer Worker Advertises Bring recordFileWorkspaceImport back beside dev's new file methods after the merge. Drop well-formed operation names this build does not know from a worker's capabilities, globally and per workspace, instead of rejecting the whole status, so workers can turn on new operations such as import_file by default. Known names keep their strict checks, malformed lists are still refused, and a worker offering only unknown operations offers no workspace tools rather than failing. |
||
|
|
a51c45bbf3
|
🌳 fix: Preserve Primary Files Until Secondary Cleanup Succeeds (#17228)
* fix: Preserve primary files until secondary cleanup succeeds * test: Use a flat deletion-strategy lookup * fix: Preserve erasure retries and reconcile removed embeddings * test: Match deletion regression formatting * fix: Preserve search intent after vector cleanup * fix: Repair retained project search files before tool execution * fix: Normalize Retained Project File Runtime Types * test: Use the Storage Source Enum in Project Repair Coverage * fix: Confirm Secondary Cleanup and Preserve Repair Policy * test: Correct Repair Fixture Types and Cleanup Retry Assertions * fix: Reconcile Code Copies Compatibly and Charge Shared File Budgets * fix: Reserve Admitted File Budgets Before Deferred Screening * fix: Retain Concurrent File Copies and Scope Cleanup by Tenant * fix: Bound Erasure File Checks and Correct Cleanup Fixtures * fix: Preserve Provider-Only Assistant File Deletion * fix: Reconcile Primary Vector Deletions Before Finalization * fix: Finalize Successful Files in Mixed Cleanup Batches * test: Load Real File Finalizer in Cleanup Integration Tests * fix: Preserve Project Routing MIME and Fence File Storage Operations * fix: Validate Provisioning Principal and Type Project Repair Fixtures * fix: Recover Provisioning Claims and Retain Uncertain Storage Outcomes * fix: Normalize File Recovery Results and Reconcile Transport Attempts * test: Preserve Deployment Routes in Host Provisioning Fixtures * fix: Recover Deletion Claims and Fence Generated Output Writes * fix: Preserve Generated Output Commit Snapshots * test: Use Persisted Owner Type in Generated File Fixture * test: Type Generated Output Fixture with Its Commit Contract * fix: Preserve Publication Error Handling and Cleanup Test Boundaries --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
6189220697
|
🏷️ fix: Resolve endpoints.all Title Settings per Field and Fold Ollama Endpoint Names (#17316)
Some checks failed
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
Publish `@librechat/client` to NPM / pack (push) Waiting to run
Publish `@librechat/client` 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
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Has been cancelled
Publish `librechat-data-provider` to NPM / pack (push) Has been cancelled
Publish `@librechat/data-schemas` to NPM / pack (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
Publish `librechat-data-provider` to NPM / publish-npm (push) Has been cancelled
Publish `@librechat/data-schemas` to NPM / publish-npm (push) Has been cancelled
* 🏷️ fix: Resolve endpoints.all Title Settings per Field and Fold Ollama Endpoint Names Conversation titles picked `endpoints.all` as a whole block, so any `all` block (even one holding only streamRate, headers or activity label keys) hid every per-endpoint titleConvo, titleModel, titleMethod, titleEndpoint and title prompt. `resolveTitleConfig` resolves each field from `all`, then the named endpoint, then the custom endpoint entry, keeping titleEndpoint and titleModel as one choice from the first layer that sets either. Config overrides merged `endpoints.custom` by exact name while the runtime serves names through `normalizeEndpointName`, so an override `ollama` survived beside the YAML `Ollama` and split the endpoint between two baseURLs and keys. The merge key now folds the same way (the YAML spelling is kept), merge-key issues, issue attribution and secret preservation use the same identity, and the effective config serves `modelSpecs.addedEndpoints`, `modelSpecs.list[].preset.endpoint` and `endpoints.agents.allowedProviders` in served names without repeats. A stored document that already names one endpoint in two spellings is combined at merge in document order, so requests keep the host and key of the first item instead of moving to the YAML entry; omit-to-keep secret preservation reads the same combined entry. A new write naming both spellings is rejected as a duplicate. An agent saved as `Ollama` now runs on the served `ollama`: the model catalog lookup (`resolveModelCatalogKey`) falls back to the served name, and `initializeAgent` folds the provider before the allowedProviders check and provider setup. * 🏷️ fix: Report Per-Field endpoints.all Title Resolution in the Admin Config Meta resolveTitleConfig resolves endpoints.all title settings one field at a time, so GET /api/admin/config/meta now reports rules.titleResolution as 'field'. meta.spec ties the reported value to resolveTitleConfig: with endpoints.all = { streamRate: 1 } and openAI.titleModel = 'x', the rule is 'field' exactly when the endpoint's titleModel survives. * 🧪 test: Expect Segments on the Folded duplicate_merge_key Write Issue Admin config write issues carry segments since #17322; the folded Ollama/ollama duplicate test now asserts them. * 🏷️ fix: Match Folded Custom Endpoint Names in Admin Config Change Ops The changes endpoint from dev matched entry keys exactly, while the config merge, merge-key issues and secret preservation fold `Ollama`/`ollama` into one custom endpoint. An upsertEntry `ollama` over a stored `Ollama` copied the stored key, appended a second entry and failed as duplicate_merge_key; removeEntry `ollama` left a stored `Ollama` in place; a rename onto another spelling passed entry_exists; and the librechat.yaml entry check missed `ollama` against the YAML `Ollama`. - data-schemas: `getConfigEntryIdentity` folds a key by its override path; `getConfigEntryMatcher` backs upsertEntry, removeEntry, rename, written-path attribution and the stored-counterpart lookup; issue locations use the same identity. A rename of an entry stored in two spellings moves the one entry the runtime merge combines (`combineFoldedConfigEntries`). - api: the YAML-entry rename guard and the per-batch duplicate check compare entries by the same identity. - Tests: unit coverage for each op across spellings, and handler integration tests against MongoDB for upsert with secret preservation (single and two-spelling documents), removal, entry_exists, inherited_entry and duplicate changes in one batch. |
||
|
|
ff962fcaa2
|
📔 fix: Recover Subagent Content With Shared Chat Rendering (#17290)
* test: cover retained subagent chat history parity * feat: Define Task-Scoped Subagent Content Recovery Contract * style: Format Retained History Regression Tests * feat: Add Task-Scoped Subagent Public Content Recovery Foundation * feat: Render Subagent Turns With Standard Chat Content * fix: Bound Recovery Capture and Keep the New Writer Opt-In * feat: Recover Subagent Chat Content From Committed Task History * fix: Preserve Recovered Metadata and Shared Reader State * fix: Preserve Journal Retry Bytes, Unicode and Recovered Phases * fix: Catch Up Terminal Child Content Beyond Pinned Pages * fix: Bound Child Content Settlement and Restore Preparation Timing * fix: Preserve Retained Child History After Late Append Completion * fix: Reconcile Late Child Commits and Preserve Terminal Content * fix: Retain MCP Scope While Detached Children Execute * test: Assert Shared Task Ownership Across Request Adapters * fix: Preserve Subagent Recovery Across Flush and Deletion Races * test: Enforce Indexes in Subagent Deletion Regressions * fix: Respect Revoked Recovery When Cached Content Exists * fix: Honor Recovery Revocations and Hide Read-Only Approvals * test: Type Captured Tool Metadata in Approval Regressions * fix: Keep Recovery Fallbacks Read-Only * fix: Bound Subagent Recovery Work and Preserve Terminal Answers * fix: Reconcile Late Content Writes and Preserve Selected Outcomes * fix: Preserve Durable Outcomes Independently of Capture Completeness * fix: Reconcile Serialized Subagent Text Blocks Without Duplicate Outcomes * fix: Preserve Journal Cleanup Scope Before Conversation Erasure --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
8fab21d882
|
🧬 fix: Skip Re-Embedding Legacy File Search Files After Upgrade (#17206)
* fix: Skip Re-Embedding Legacy File Search Files an Agent Already Holds Files embedded before per-namespace tracking carry no embeddedEntities, so lazy provisioning treated them as unembedded and embedded them a second time on the first search after upgrading, duplicating every passage. A legacy record in the agent's own file_search resources was embedded for it, so trust its embedded flag there instead of re-queueing it. * fix: Adopt Legacy Search Embeddings Only for Their Sole Holder Trusting the embedded flag for every legacy File Search file left an agent that inherited one querying a namespace without its vectors. Legacy files held by no other agent now record the active agent as their namespace, a one-time write, and are not embedded again; a file another agent also holds keeps the per-namespace re-embed. Adds an e2e scenario that reshapes an uploaded agent file into the v0.8.7 record and checks that search queries it without a second embed. * test: Cover Legacy Search Files Shared With Another Agent * test: Read the Stored File Id in Legacy Search Scenarios * fix: Pin Legacy Search Adoption to Loaded Records and Wire Every Agent Init file_id is not unique, so adoption now matches each record by its owner and tenant as well, and only rewrites the records priming loaded. The added conversation and client agent initializations receive the dependency too, so their sole-holder legacy files are not embedded a second time. * fix: Adopt Each Legacy Search Record in One Conditional Write * fix: Count a Concurrent Same-Agent Adoption as Adopted * fix: Run Legacy Search Adoption Beside the Liveness Probe and Fall Back on Failure * fix: Keep Committed Legacy Search Adoptions When a Sibling Write Fails * fix: Confirm Legacy Search Embeddings With RAG Before Adopting Them Inferring the embedding agent from current File Search holders could adopt a file for an agent whose namespace held none of its vectors, for example after the agent that embedded it was deleted. Priming now asks RAG for one chunk of each legacy file under the agent's entity_id and records the namespace only on a hit; a miss or an unreachable RAG keeps the file queued for embedding. The data-schemas method no longer scans agents and matches untenanted records as untenanted. The fake RAG server answers these presence checks from the embeds it stores. * fix: Require the Entity's Own Chunks and Keep Confirmed Vectors RAG also returns chunks owned by the requesting user, so a presence check now counts only chunks recorded under the agent itself. Once vectors are confirmed, the turn skips the re-embed even if recording the namespace fails. * fix: Bound the Legacy Search Check and Keep the Fake RAG Query Shape The RAG presence check now times out (fileConfig.legacySearchProbeTimeoutMs, 5s by default) and falls back to embedding, so a stalled RAG cannot hang priming. The fake RAG server records presence checks in their own list and keeps the file_search query records it already returned. * fix: Check Any Unrecorded Namespace Before Embedding a Search File A file another agent embedded first lists only that agent, so the agent whose older vectors went unrecorded skipped the check and embedded a second copy. Priming now asks RAG for every agent File Search file that records no embedding for the active agent, and recording adds the namespace to the ones already there. * fix: Ask RAG for Several Chunks So a User Copy Cannot Hide the Agent's RAG ranks chunks across every owner of a file_id and, once the top one is authorized, returns them all. A copy of an agent file embedded for the requesting user could rank first with k: 1 and hide the agent's own chunks, so the presence check now asks for ten and checks every owner. * fix: Confirm Setup Embeddings in Shared-File Runs and Log Safely The run-file host primes an agent's setup files on its own, so it now receives the RAG presence check and the namespace recorder too; without them a shared-file run could embed a legacy setup file a second time. Failed checks are logged with getSafeErrorMetadata rather than the raw error, which carries the vector store's response body. |
||
|
|
73847f2db5
|
🔌 feat: Integrate Durable Skill Lifecycle Across Writers and Routes (#17043)
* feat: integrate durable Skill lifecycle across writers and routes * 🧪 test: Cover Skill Management Deletion End to End * fix: Queue superseded Skill blobs for durable cleanup * fix: Reject Skill file storage moves without new identity * 🧪 test: Cover Skill UI Delete and Cleanup Restart * 🧪 test: Assert Durable Cleanup for Replaced Skill Files * fix: release Skill names during account deletion marking * fix: use reserved Skill blob plans across writers * fix: hold superseded Skill blobs until sync commits * test: preserve account deletion retry coverage after restack * test: verify durable Skill cleanup after account erasure * fix: complete Skill cleanup leases and avoid historical metadata scans * fix: bound Skill cleanup manifest processing |
||
|
|
5fc4371c6a
|
🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) | ||
|
|
6b5cf0a231
|
🏝️ fix: Apply the No-Workspace Decision Wherever an Agent's Code Route Resolves (#16798)
* 🏝️ fix: Apply the No-Workspace Decision Wherever an Agent's Code Route Resolves
A conversation set to run without attached workspaces failed mid-turn with
"Choose an attached workspace before using this agent." when its agent's
default machine was attached and the turn loaded a skill or another tool at
execution time. Request-start initialization honoured the decision, but the
execution-time tool loader re-resolved the agent's attached default and then
demanded a workspace selection the conversation intentionally never made.
The per-agent code rule now lives in one typed function,
resolveAgentCodeExecution (packages/api/src/code/agent.ts): it applies the
conversation's no-workspace opt-out, the run-code grant, the stateful
capability and the stateful environment policy, then resolves the base route.
Request-start initialization, lazy subagent metadata and graph members, the
execution-time and definition tool loaders, and the legacy execute_code
loader all go through it, so an opted-out agent lands on the managed default
route with no code tools at every site. Per-call subagent machine choices
offer and accept no attached machine in such a conversation, and a source
invariant test keeps new resolver call sites on the shared rule.
* fix: Pass the Implicit Stateful Route Rollout Into the Shared Code Rule
The per-agent code rule read the implicit stateful route rollout from the environment itself. It now takes it as a parameter, and the request boundaries (initializeAgent and withRequestCodeInputs) resolve it from the deployment configuration, so the rule stays a pure function of its inputs.
* fix: Carry the Initializer's Code Opt-Out Into Tool Definition Loading
initializeAgent hands the tool loaders a partial agent record (id, tools, provider, model) together with the code route it already resolved. Without the agent's route fields the definition loaders could not see a no-workspace opt-out and recomputed code execution as enabled, so tool classification could advertise the programmatic bash tool that execution then refuses. initializeAgent now passes attachedEnvironmentOptOut through every tool loader, and the shared rule keeps an opt-out its caller already decided.
|
||
|
|
301f9ac634
|
🚕 feat: Add Per-Call Subagent Machine Selection (#16757)
* 🧭 feat: Let a Parent Choose Its Subagent's Code Machine Per Call A parent agent can now pass optional `machine` / `workspace` arguments on a subagent call to pick where the child runs, using the host-argument extension point added to @librechat/agents. - Each lazy child declares enums built only from machines it may reach: admitted in the conversation's sealed codeWorkspaces, on its default or allowlist, in the requesting principal's tenant-scoped list, and served by a ready worker. A child the conversation pinned to a machine offers only that machine; a child with no reachable machine declares nothing. - On use, a request-scoped routing session in packages/api re-validates the choice against the current request and live worker status and refuses an invalid one with a typed, model-visible error instead of falling back. A routed child is pinned to the chosen machine at every routing site, overriding parent inheritance. - Omitted arguments keep inherit-by-default routing, extended so a child follows the machine a per-call-routed parent runs on (passing through agents without code). A subagent keeps one machine for the whole request. - A child whose default workspace is unavailable stays guarded unless it has per-call choices; then it stays callable and its description asks the parent to pick a listed machine. - Routed children keep their tool context per execution for tool loading, provisioning and artifact handling. - Paused-approval bindings, the attached-machine policy hook, skill-file priming and tool-output references account for per-call choices. The declarations are gated on the installed SDK exporting SubagentHostArgumentError, so this change is inert until LibreChat depends on an @librechat/agents release that includes it. * 🧭 fix: Reserve Default Routes Early and Route a Routed Subagent's Graph Members - Reserve a subagent's default machine when it is placed, as initializeAgent will resolve it (including parent inheritance), so a concurrent call cannot claim another machine during initialization. - Graph members spawned by a per-call-routed subagent follow its machine when they may, unless they already initialized on their own route this request. * 🧭 fix: Settle Concurrent Inherited Routes and Register Routed Graph Members - Re-read a subagent's inherited route after resolving targets, so two concurrent calls from differently routed parents settle on one machine. - Attribute a workspace-only conflict to the workspace argument. - Register graph members a routed subagent initialized, so each gets the attached-machine policy of the machine it actually runs on. * 🧭 fix: Re-read Inherited Routes After Resolving Subagent Targets - Re-read a subagent's inherited route after the target resolution await, so two concurrent omitted-machine calls from differently routed parents settle on one machine. - Attribute a workspace-only conflict to the workspace argument. * 🧪 test: Prove a Routed Graph Member Takes Its Machine's Policy Through createRun - Register a resolved child's graph members inline in the lazy resolver instead of through an exported generic helper whose test did not typecheck. - Drive the check through createRun's real PreToolUse hook: a member routed to a deny machine flips from its metadata machine's allow to deny once its parent resolves. * 🧭 fix: Hold a Lazily Loaded Graph Member's Default Machine While It Initializes - Pass a graph member's code flags when it initializes on its default route, so the routing session reserves that machine before the asynchronous initialization instead of only after it, and a concurrent call cannot place the same agent on another machine meanwhile. * 🧭 fix: Validate the Approval Mode Against Every Machine a Subagent May Use - Collect each agent's default attached route and each attached machine a parent may route it to per call, and validate the requested approval mode against that set in createRun and both client checks. - A child whose default is unavailable but whose per-call machine permits accept edits no longer fails run creation; full access still requires every such machine to permit it. * 🧭 fix: Admit, Prime, and Cancel Per-Call Subagent Routes Conservatively - Build scheduled pause admission from every attached machine a parent may route an agent to, so a permissive default does not hide a per-call machine that asks. - Walk lazy graph-member metadata when collecting execution routes, so historical skill files are primed for every machine such a member may run on. - Stop placing a canceled call after its target resolution resolves, so it never claims a machine for an execution that will not initialize. * 🧭 fix: Release Unused Route Claims and Scope Per-Call Machines to Their Run - Hold a subagent's route claim per placement: a failed or canceled initialization gives the machine back unless another execution still holds it, and a claim is permanent once a child on it attaches. - Fold an agent's default route into its per-call choice digest, so each agent contributes at most one paused-approval binding target. - Use only an agent's route policies for pause admission when it has them, so a missing default does not make a decided route look asking. - Drop a routable child's provisional attached-machine membership when it resolves off attached machines. - Offer and accept no attached machine per call while run files are shared, since shared children must run on managed code. * 🧭 fix: Give Back a Route When Its Placement Verification Fails - Release a placement's hold when attach finds the child initialized on a different machine than the one it was routed to, so a retry that follows the unavailable-machine guidance may name another machine. * 🧭 fix: Commit a Lazy Child's Routes Only When Its Whole Resolution Succeeds - Keep the routes a lazy child and its routed graph members hold pending through the child's entire resolution (settleExecution), committing them on success and giving them back on failure or cancellation unless another execution still holds them. - Placements outside any call (shared graph members) still commit when they attach. * 🧭 fix: Drop a Failed Lazy Resolution's Config from the Graph Cache - When a lazy child's graph resolution fails or is canceled after its config was cached for graph reuse, remove that entry with its route, so a later graph never reuses a config for a machine the child gave back. * 🧭 fix: Follow a Routed Agent Through Self-Spawned Runs and Scope Routed Member Configs - A call whose parent run was never placed (an allowSelf spawn reuses its routed inputs) inherits the routed claim of its parent agent, which keeps one machine per request. - Never share a graph member initialized for a routed parent's execution through the graph-member cache, so a failed resolution leaves no config behind for a route it gave back. - Race lazy target discovery with the request signal. * 🧭 fix: Pass a Machine On Through Self-Spawned Runs of Agents Without Code - Record the machine each agent without stateful code passes on, and let a call from that agent's unplaced run (an allowSelf spawn) follow it when the agent passed on exactly one machine this request. * 🧭 fix: Keep a Pass-Through Route Only When Its Resolution Succeeds - Record the machine an agent without code passes on with the rest of its call's routing state: kept when the resolution deciding it succeeds, dropped when it fails, so a self-spawn never follows a failed attempt. * 🧭 fix: Settle a Lazy Child's Routing State at the SDK Handoff - Wrap the run's whole lazy resolution, through the inputs handed to the SDK, in the descriptor's settle hook, so a cancel after the host resolver returns still gives the call's routes back. - Roll back the per-agent tool context a pending placement set (restoring the entry it replaced) when its resolution fails, so a retry on another machine seeds its own context. - Drop a failed call's shared config from the graph cache through the same settle hook. * 🧭 fix: Keep Per-Agent Tool Contexts on Live Placements and Queue Target Probes - Track every pending placement that uses an agent's per-agent tool context: a committed one sets it, a failed one hands it to a surviving placement, and only the last failure restores the earlier entry. - Let an unplaced run of an agent (an allowSelf spawn) defer to the routed run of the same agent that encloses it when looking up tool contexts. - Queue live target probes at eight in flight, below the shared status poller's ceiling, so concurrent descriptors never misreport a healthy machine as unavailable. * 🧭 refactor: Load Routed Graph Members Through a packages/api Service - Move the routed graph-member load (shared reuse, skip list, view check, execution identity, failure policy) into createRoutedGraphMemberLoader; the initializer only injects its dependencies. - Thread the request and call signals into target resolution so queued probes are skipped once canceled. - Probe nothing in shared-file runs, where every per-call target is attached and unusable. - Retire pending tool-context ownership when a committed placement installs the per-agent entry. * 🧭 fix: Share a Lazy Child's Config with Later Graphs Only After It Commits - Publish a default-placed lazy child's config to the shared graph cache from the settle hook's commit, so no concurrent graph can borrow a config whose route may still be given back. - Resolve a child's own appearance in its graph to the child config itself. |
||
|
|
1418d44ad9
|
🕊️ feat: Supply Authorized Scheduled MCP Resource Bearers (#16699)
* 🕊️ feat: Supply Authorized Scheduled MCP Resource Bearers * 🥟 fix: Preserve Scheduled Bearer Denials and Request Headers * 🪼 fix: Retain Bearer Denials Across Scheduled Recovery * 🐡 fix: Retain Unsettled Scheduled Generation Evidence * 🧭 fix: Recover Retained Scheduled Generation Obligations * 🪢 fix: Drive Retained Recovery in Every Scheduler Mode * 🦔 fix: Fence Complete Scheduled Denial Receipts * 🪵 fix: Require Durable Scheduled Denial Acknowledgement * 🕯️ fix: Preserve Fresh Terminal Writers During Cleanup * 🪷 fix: Preserve Durable Scheduled Receipt Acknowledgements * 🧿 fix: Acknowledge Scheduled Evidence Before Erasure * 🧪 test: Verify Merged Scheduled Receipt Union in Redis * 🪡 fix: Deduplicate Merged MCP Agent Context * 🪷 fix: Reauthorize Scheduled MCP Transport Requests * 🛟 fix: Preserve Scheduled Catalog Authority Denials * 🛟 fix: Fence Scheduled Dispatch and Stale Owner Settlement * 🛟 fix: Gate Scheduled Cleanup on Owner Evidence * 🛟 fix: Preserve Scheduled Drain and Transport Rejection Evidence * 🛟 fix: Quiesce Scheduled MCP Before Occurrence Settlement * 🛟 fix: Fence Scheduled Owner Recovery and Back Off Receipt Admission * 🛟 fix: Index Initially Retained Scheduled Generations * 🛟 fix: Require Durable Admission for Scheduled Policy Denials * 🛟 fix: Abort Occurrence Bearer Work Before Quiescence * 🛟 fix: Cancel Connection Credential Waiters During Failed Initialization * 🛟 fix: Fence Scheduled HTTP Dispatch at the Cancellation Cutoff * 🛟 fix: Bind SDK Request Deadlines to Scheduled Denial Admission * 🛟 fix: Recover Retained Creation and Isolate SDK Caller Cutoffs * 🛟 fix: Fence Scheduled App Reads and Share Cold Connection Ownership * 🛟 fix: Retain Observed Scheduled Denials Across Caller Cancellation * 🛟 fix: Invalidate Retained Discovery on Each Re-Arm * 🛂 fix: Classify Scheduled Resource 403 as Permission Denial --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
c23fbc8f77
|
🧬 fix: Default Subagents to Their Parent's Code Machine and Workspace (#16756)
* 🧬 fix: Default Subagents to Their Parent's Code Machine and Workspace
A subagent resolved its code machine from its own saved fields only, so
when a chat routed the parent to an allowlisted machine the subagent fell
back to its own default and whatever workspace the conversation had
selected there, or failed the parent's whole turn when none existed.
Subagents now inherit the parent's resolved attached machine when it is
their own default or on their allowlist where per-chat choice applies,
the principal can use it, the sealed decision already selected it, and no
selection names the subagent as an explicit owner. Inheritance is derived
per request from the sealed decision and current agent configuration and
fed to every routing site; it is never persisted, so existing chats and
older clients get it without a decision change. The composer mirrors it.
A subagent whose machine has no usable workspace is advertised to the
parent as unavailable instead of failing the turn; a locked decision
stays fatal.
* fix: Inherit Across Every Spawning Path, Graph Members and Deferred Code Tools
A subagent now inherits only when every agent that can spawn it, at any
depth, runs on the same machine; spawn cycles keep their own routes.
Subagent graph members inherit like explicit subagents. The deferred
execute_code loader passes inheritance to its fallback resolver. Subagent
reads and VIEW checks move to a packages/api loader shared by inheritance,
lazy descriptors and graph members. The composer lets a draft's subagent
follow its parent's machine before a workspace is picked, and keeps an
inheriting subagent's former selection without asking for a move.
* fix: Prune Spawn Back-Edges, Gate the Composer on an Inheritance Capability
Spawning parents follow the run's path semantics, so a back-edge the
descriptor tree prunes no longer blocks inheritance, and agents that spawn
each other follow their single outside parent machine when it routes them
all there. Only admitted subagents count toward the walk's node limit.
Graph members re-read and re-check VIEW when they initialize. The composer
echoes an inheriting subagent's former selection without gating on that
machine, and mirrors inheritance only when the API advertises
codeWorkspaceInheritanceVersion; approval modes keep intersecting every
machine an agent could use.
* fix: Settle Each Mutually Spawning Group on Its Own
Independent spawn cycles no longer merge into one group, so a pair under
one parent follows that parent even when another pair follows a different
machine. Also types the data-provider spec for its ES5 target.
* fix: Bound the Inheritance Walk, Normalize Parallel Roots, Move Subagent Availability to TS
The walk reads in batches no larger than the remaining node budget, stops
once the limit is reached, and runs through the run's subagent load limiter.
Roots are keyed by saved agent ID, so a parallel root such as id____1 can
never receive an inheritance entry. Resolving a lazy subagent's code route,
reporting it unavailable, and guarding its descriptor now live in
packages/api (resolveSubagentCodeAvailability, guardUnavailableSubagent).
* fix: Keep Missing Subagent Loads Parallel Near the Node Limit
Batches never shrink below eight IDs, so missing or unviewable subagents
near the limit still load in parallel under the injected limiter, and at
most a handful of reads land past the limit.
|
||
|
|
3c90cde7d8
|
🔗 feat: use LibreChat prompt groups as agent instructions (#16686)
* 🔗 feat(agents): use LibreChat prompt groups as agent instructions
Agents can link a prompt group revision or Production as their instructions. The link resolves at the start of each turn through a cached resolver. The cache clears on promote and delete. Editors without VIEW on the group see a restricted placeholder.
* fix: remove duplicate logger import from agent initialization tests
* fix: honor prompt management capabilities for linked agent instructions
* test: seed prompt manager capabilities in authorization fixtures
* fix: clear acknowledged linked prompt edits before version restore
* test: adapt merged chain coverage to prompt-aware payload helper
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
0e3c9088f6
|
🫰 feat: Configure Tool Approval Modes Per Agent (#16707)
* 🫰 feat: Configure Tool Approval Modes Per Agent
* fix: Fence Remembered Tool Approval Authority
* fix: Unify Tool Approval Execution Invariants
* fix: Revalidate Learned Approval at MCP Invocation
* fix: Preserve One-Time MCP Review at Invocation
* fix: Execute Reviewed Calls on Templated MCP Connections
* fix: Scope Approval Witnesses to Executing Agents
* fix: Retain Approval Bindings for Hook-Rewritten Inputs
* fix: Pin Review Authority and Retire Settled Tool Calls
* fix: Fingerprint Effective MCP Request Headers
* fix: Preserve Routing Around Renewable MCP Token Fragments
* fix: Bind Tool Consent to OAuth Credential Generations
* test: Keep Mobile Approval Save Outside Drawer Escape Race
* fix: Fence OAuth Consent at MCP Transport Retries
* fix: Let Shared Agent Viewers Reset Personal Consent
* fix: Preserve Renewed Consent Across Reset Races
* fix: Resolve Verified Aliases for Personal Tool Reset
* fix: Fence Renewed OAuth Consent and Credential Review
* fix: Require Foreground Execution for Review-Only MCP Calls
* fix: Pin Invocation Ownership and Stable MCP Consent
* fix: Fence Superseded Tool Consent Completion Writes
* fix: Scope Consent Epochs to Effective MCP Authentication
* fix: Scope Approval Admission to Reachable Agent Tools
* fix: Preserve Approval Epochs for Runtime-Detected OAuth
* fix: Address Tool Approval Review Findings
* fix: Preserve Captured Consent When Tool Approval Is Inherited
* fix: Preserve Approval Admission Through Lazy Metadata
* fix: Fence Programmatic Reviews and Unresolved Lazy Approval Keys
* fix: Account for Normalized and Skill-Contributed Lazy Tools
* fix: Scope Lazy Approval to Selected Tool Spellings and Servers
* fix: Honor Disabled MCP Capability During Lazy Approval Admission
* test: Preserve Approval Merge Regressions After Rebase
* fix: Preserve One-Time Review During Non-OAuth Grant Outages
* fix: Retain One-Time Consent Across Resume Recovery
* fix: Preserve Reviewed Consent Through Transport Outages
* fix: Preserve Case-Variant Lazy Approval Hook Admission
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
19092e55bd
|
🖲️ fix: Enable Running Chat Menus and Preserve Renamed Titles (#16697)
Reconciles current dev while preserving manual title ownership, existing menus, and configuration regressions. Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
38a9dab3f5
|
🦫 feat: Enforce Scheduled MCP Read-Only Authority (#16681)
* feat: enforce scheduled MCP read-only authority * fix: preserve startup admission and enforce consent deadline * fix: fail closed on malformed scheduled consent * fix: preserve scheduled MCP authority failure receipts * fix: preserve scheduled MCP handoffs and manual runs * fix: persist mandatory scheduled tool policy denials * fix: fence late scheduled consent and retain denial recovery * fix: retain scheduled transport denials and prevent replay * fix: merge retained scheduled denials during settlement * fix: prevent enrolled schedule completion wakeup escapes * fix: close scheduled consent admission and receipt races * fix: retain scheduled completion authority across approval * fix: retain safe scheduled authorization dependency denials * fix: sanitize scheduled authorization preparation failures * fix: bind schedule completion authority to task origin --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
f88f3fb2fe
|
🪇 perf: Coalesce Ready Background Completions (#16650)
* 🪇 perf: Coalesce Ready Background Completions
* fix: Recover Receipt Batches and Gate Rolling Deploys
* fix: Fence Background Batch Handoffs and Cleanup Epochs
* fix: Bind Resumed Cleanup to Its Observed Batch
* fix: Preserve Background Results Through Recovery Handoffs
* fix: Recover Unconfirmed Manual Background Claims
* fix: Fence Automatic Recovery of Manual Handoffs
* fix: Preserve Background Reconciliation and Recovery Retention
* fix: Preserve Replayed Claims and Finish Follower Proofs
* fix: Recover Stale Background Projection Epochs
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
bb0543fd15
|
📼 fix: Replay Running Subagent Activity (#16541)
* 📼 fix: Replay Running Subagent Activity * 📼 fix: Preserve Activity Across Rollouts and Reconnects * 📼 fix: Backfill Missing Foreground Activity * 📼 fix: Fence Replay and Drain Admitted Activity * 📼 fix: Close Subagent Replay Review Gaps * 📼 fix: Resume Activity After Replay Recovery Expires * 📼 fix: Use Singular Subagent Omission Copy * 📼 fix: Preserve Public Replay and Displayed Activity * 📼 fix: Write Expanded Live Activity Before Queuing * 📼 fix: Track Disjoint Subagent Replay Coverage * 📼 fix: Preserve Tool Details and Omission Totals * 📼 fix: Recover Tool Timing During Replay Backfill * 📼 fix: Reconcile Covered Replay Timing Metadata * 📼 fix: Restore Message Phases During Replay Backfill --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
2eee568542
|
🧳 feat: Choose Agent-Allowed Machines For New Chats (#16651)
* feat: Let New Chats Choose Agent-Allowed Machines * test: Keep Machine Choice Contracts And Native Selectors In Sync * fix: Preserve Graph Machine Choices And Reference Lifecycles * fix: Explain Graph Workspace Requirements And Validate Machine Choices * test: Cover Default And Non-Default Graph Machine Choices * test: Keep Unauthorized Machine Duplication Mocks Isolated * fix: Preserve Graph Agent Machine Ownership And Explain Requirements * fix: Preserve Stable Workspace Ownership Across Runtime And Config Changes * test: Wait For Verified Generation Readiness In Native Canaries |
||
|
|
5b84c4b57f |
⏳ feat: Add Ephemeral Retention Mode for Forced Temporary Chats (#13811)
* feat: add ephemeral retention mode for forced temporary chats
Adds RetentionMode.EPHEMERAL, which forces every newly saved chat
temporary: hidden from history and search, given the temporary-chat
expiration, and with the toggle locked on.
Forces isTemporary and applies the temporary expiration in the normal
conversation and message save methods, routes Assistants/Threads
messages through the normal message save, applies the all-data
retention policy to file uploads and shared links, and stamps imports,
forks, and duplicates. Locks the frontend toggle and keyboard shortcut
behind an administrator-enforced badge.
The default temporary mode and the existing all mode are unchanged.
* fix: enforce ephemeral retention when resuming paused chats
* fix: preserve forced retention across pauses and assistant turns
* test: Use Real Module IDs for Installed Package Mocks
* test: Wait for Resumed Retention Persistence
* test: Control Mongo Index Setup in OpenID Fixture
* test: Close Mobile Drawer Before Retention Resume Scenario
* fix: Store Responses API Messages Under the Retention Write Context
Input and output messages were saved with the raw request, so under
ephemeral retention they missed the forced-temporary classification the
conversation received. Route both through getConversationWriteContext
and announce the stored reply as saved.
* fix: Align Resumed Responses With the Parent Retention Deadline
A resumed response was saved with a fresh forced-temporary window while
the re-stamp kept the conversation's earlier deadline, so a chat that
paused again could leave its response stored after the conversation
expired. Stamp the saved response with the parent's deadline.
* fix: Clear Released Bookmark Tags When Forcing a Chat Temporary
stampForcedRetention released a converted chat's bookmark counts but
kept its tags, so deleting that chat before TTL removal decremented the
same tags again and reduced counts owned by other visible chats. Clear
the tags in the conditional conversion update that releases them.
* fix: Store No Bookmark Tags on Forced-Temporary Imports
An ephemeral import, fork or duplicate skipped its tag count increment
but kept the source tags, so deleting the copy before TTL removal
decremented counts owned by other visible chats. Store the same tags the
import counts, which is none for a forced-temporary copy.
* test: Provide the Forced-Temporary Retention Helper to the Header Stacking Mock
* test: Reuse One Admin Login per Worker in Ephemeral Retention Scenarios
* fix: Keep Legacy Temporary Chats Temporary When Forking Under All-Data Retention
* fix: Convert a Resumed Chat Under Ephemeral Retention Before It Can Re-Pause Empty
* fix: Treat a Reloaded Pre-Policy Run as Temporary Once Retention Is Forced
* fix: Stamp Messages with the Deadline a Concurrent Retention Stamp Stored
* fix: Wait for the Startup Config Before Rebuilding a Resumed Submission
* test: Wait for the Resumed Response Row in the Ephemeral Resume Scenario
* test: Provide the Real Command Executor Stamp to the Callbacks Mock
(cherry picked from commit
|
||
|
|
ea938f6054 |
🚦 feat: Show Exit Status and Stderr for Attached Workspace Commands (#16556)
* feat: Show Exit Status for Attached Workspace Commands
Parse the exit trailer the attached-workspace bash_tool writes so the card
fails a non-zero exit, a signal or a timeout, names the reason beside the
failure suffix, and renders stderr distinctly. The group outcome reads the
same parser so its failed count matches the card. Sandbox output without the
trailer keeps the existing heuristics.
* fix: Parse Exit Status Only for Attached Workspace Calls
The sandbox and attached-workspace tools are both named bash_tool, and the
sandbox output is trimmed, so a sandbox command that printed
"[exit code: 1]" last was read as a failed attached-workspace run by the
card and the group outcome.
The execute handler now records a run step when the resolved tool instance
is the one createAttachedWorkspaceBashTool built (tracked by object
identity), and the step-completed handler stamps executor:
'attached_workspace' on the streamed tool call and the aggregated part.
Redis replay and the client SSE merge carry the field through. BashCall
and outcome.ts parse the trailer only when the marker is set.
* fix: Count Styled Terminal Lines Like Plain Ones When Output Ends in a Newline
(cherry picked from commit
|
||
|
|
e1e1d1b19d |
🎒 feat: Carry Project Context Across Conversations (#15684)
* 🎒 feat: Carry Project Context Across Conversations
* fix: fail a project attach whose upload hold cannot be released and keep file deletes independent of project cleanup
- Attaching a project file now fails, with nothing attached, when the file's
temporary upload hold cannot be released, instead of attaching a file that
can still expire.
- A failed project cleanup after a file delete is logged rather than failing a
delete that already happened, and a user-wide delete clears that user's
project references without reading every file first.
- Both resize handles share the orientation-aware grip, so a primary handle in
a vertical group renders a rotated grip like the alternate one.
* fix: treat an empty tenant id as no tenant in the project file picker
* fix: attach nothing when a project file is deleted while the attach is in flight
* fix: localize project file association failures instead of showing server text
* test: expect a localized reason for a rejected project file association
* fix: scope project file listing to the caller's tenant and name the file limit when attaching an existing file
- Listing a project's attached files now returns not found when the project
belongs to another tenant, matching the available-file listing and the
chat context resolver.
- Choosing an existing file for a full project now names the project file
limit instead of the generic attach error, like the upload path.
* fix: treat an empty tenant id as no tenant in every project tenant check
A caller whose tenant id is an empty string was refused its own tenantless
project when listing attached or available files, because the handlers
compared '' with null. The project handlers and the chat context resolver now
share one comparison that treats an empty tenant id as no tenant, the rule the
project file queries already follow.
* test: wait for the workspace layout swap and the mobile drawer before acting in the long-metadata spec
The desktop title was measured while the phone layout could still be the one
rendered, and the sidebar row menu was opened before the mobile drawer
committed its open state, which closes a menu opened ahead of it. The spec
now waits for the workspace's phone-only sidebar toggle to leave and for the
drawer to drop inert, the same drawer signal the agents helpers use.
* fix: keep the agent context fingerprint of a turn outside any project unchanged
Every turn now passes a project context key into the agent context
fingerprint, and a turn outside any project passed the no-project sentinel,
which changed the digest of every existing no-project checkpoint. An agent
event conversation written before this change then cold-started and reloaded
its history on its next event. The fingerprint now hashes the no-project key
as absent, so those checkpoints keep matching.
* test: load the long-metadata spec at phone width before driving the mobile drawer
The spec crossed back from desktop to phone width without a reload, which
leaves the drawer on the desktop toggle path whose delayed focus handoff to
the close button dismissed the row menu roughly 200ms after it opened. The
spec now reloads at phone width, as a phone arrives, and waits for the
drawer's own focus handoff before opening the menu.
(cherry picked from commit
|
||
|
|
cd44344647 |
🔔 feat: Unseen Reply Indicators, Reply Notifications, and Mark as Unread (#15025)
* feat: add unseen reply indicators, reply notifications, and mark as unread
A reply that lands while the user is elsewhere now leaves a trace. The
conversation carries a durable reply stamp written with the assistant message
that backs it, the sidebar row shows an unread dot until that message is
actually rendered, and an optional tab badge, desktop notification and chime
announce arrivals in a tab that is away. Rows can also be marked unread by hand
from the row menu, in the archived view as well as the main list.
The stamp is written by a compare-and-swap so concurrent replies order on the
database rather than on the application hosts' clocks, and only once output that
a reader can actually see is persisted: a stopped turn with nothing to read, an
empty synchronized row, or a failed message write never lights a dot that cannot
be cleared. Read intent survives archives, metadata edits and preset applies,
and a later read always outranks a delayed unread.
* fix: gate reply alerts on config and announce only readable replies
Three review rounds kept finding the same two shapes, so both are answered once
rather than patched again.
The alert capabilities are now operator-configurable through
`interface.replyNotifications` in `librechat.yaml`: the tab badge, desktop
notifications and the chime each have a gate, and the away poll's page size is a
field rather than a constant, with defaults that reproduce the shipped behavior.
A capability the operator turns off reads as off whatever the device stored, and
its settings toggle is not offered.
Deciding whether a persisted turn may raise an indicator now lives in one place
in `packages/api`, with the Responses API controller, the abort route, the
Assistants thread sync and the client's override path all calling it instead of
carrying their own copy. That closes the last case where a reply nobody can read
lit a dot nothing could clear: a `/v1/responses` completion whose output held
only reasoning or tool calls persists an empty row, and stamping it left an
unread conversation that opening could not settle.
Also: the retention backfill no longer advances `updatedAt` past a reply stamp,
which an away tab reads as a metadata-only promotion and withholds the alert
for; arrival evidence is swept of conversations no cached list still holds, so a
long-lived tab stops growing with its lifetime number of replies; and generated
Lighthouse profile directories are ignored where the runner leaves them.
* test: open the sidebar by what the drawer paints, not by its test ids
The drawer became a mounted, sliding panel on canary, so the controls this
helper read no longer say what it assumed. `close-sidebar-button` answers from
the off-canvas copy before the expanded state commits, which returned the helper
with the conversation list still hidden behind the pane, and the panel's own
`new-chat-button` has a rail copy that a plain locator reaches first. Both
readings passed on the previous drawer, which unmounted when closed.
Settling on the close control's accessible name, and on the first candidate that
is actually painted, is what a reader perceives and survives either drawer. One
click is one toggle and the opener sits in the pane the drawer marks inert for
the whole of its travel, so each attempt is given that travel to itself rather
than reissued into it.
Also serves `interface.replyNotifications` in the operator-gate scenario with a
fresh body instead of the upstream response, since reusing its encoding headers
for a re-serialized payload leaves the client unable to read the config, which
looks exactly like an operator who configured nothing.
* fix: gate the assistant save on renderable output and stop overselling the poll limit
Two gaps this round's own work left behind.
`saveAssistantMessage` still decided to stamp from the message id alone, so an
Assistants run that persisted an empty row raised a dot that opening the
conversation could never clear. It now asks `isAnnounceableReply`, the same
predicate every other persistence path asks, which is the point of having moved
that decision into one place.
`pollLimit` advertised a range up to 1000 while `getConvosByCursor` clamps every
conversation read to a hundred-row page, so an operator who set 500 would have
been told it applied and silently served a hundred. The schema now stops at the
page the server will actually return; covering a deployment whose replies
outpace one page needs the server-side unseen query, not a wider page.
* test: let the mobile scenarios use the surface they are actually asserting on
Three scenarios opened the drawer on a page they only ever send a reply from.
On the mobile project that drawer sits over the composer and marks the pane
inert, so there was nothing left to type in and the run waited out its whole
budget. They ask for the composer now, which is what they were always about.
The two that read a row after leaving the list open it again first. A reply sent
from another tab closes this one's drawer, because `sidebarExpanded` is stored
per browser rather than per tab, and opening a chat closes it the way it does
for a reader. Both are what someone would do to look at the row, and neither
changes what is being asserted.
Mark as unread is dispatched rather than clicked, like the row controls around
it: the menu is portaled, and behind the drawer's scrim it inherits
`pointer-events: none` and goes click-dead.
* test: dispatch the row menu's unread item like the controls around it
The portaled menu sits under the mobile drawer's scrim, which intercepts the
pointer, so a real click retried until the budget ran out. The sibling scenarios
and the row's own controls already dispatch; these two were the last real
clicks.
* fix: hold reply alerts until the deployment answers, and read the resolved temporary state
The capability gate treated a startup config that had not loaded yet the same as
one that set nothing, so a device that stored "on" could badge, poll or notify in
the window before an operator's `false` arrived. Nothing is permitted now until
the config is in hand; only a loaded config that lacks the field reads as the
shipped default, which is the case a backend predating the setting produces.
The Responses API announcement read the temporary flag from the request body
alone, while the conversation save beside it resolves it from the stored
conversation first. A temporary chat restored or resolved on the server without
the flag in the body would have been announced through the unread indicators;
both completion branches now resolve it the same way the save does.
* fix: route the last reply stamps through the shared owner and hand back failed claims
Moving the announce decision into packages/api left three callers still deciding
for themselves. The agents controller re-stamped an unfinished turn whose
terminal persistence was skipped, and the resumed legacy turn stamped its
directly saved row, both from the message id alone, so a preempted or stopped
turn that persisted nothing readable lit a dot that could never be
acknowledged. Both ask isAnnounceableReply now. The non-agents abort path
carried an inline copy of the same predicate; it calls announceReply instead.
Error turns keep their direct stamp: the error card is what renders them.
A notification claim was written to shared storage before the notification
was constructed, so a constructor that throws left the reply claimed in every
tab with nothing ever shown. The claim is handed back when construction fails,
removed only while it still names that exact stamp.
* fix: judge the normal reply save by the shared predicate and hand back failed chimes
The regular BaseClient save still stamped any assistant reply that persisted,
readable or not, because the conversation write took a bare reply id. It takes
the persisted reply now and asks isAnnounceableReply before it stamps, which
leaves the error turns as the only direct stamps, and those are rendered by the
error card. saveTurnConversation is exercised against a real store in both
directions. announce.ts derives its write-context type locally so the two
modules do not import each other.
The chime claimed its replies before building the tones, so an output that
failed while they were being scheduled left them claimed in every tab with
nothing played. Those claims are handed back on failure, the same way a
notification that could not be constructed now releases its own.
* feat: let operators set the reply polling cadence
The away poll and the focused refresh were fixed at 30 seconds and five minutes,
which are request-rate levers on the conversation list and nothing an operator
could tune. Both are fields on `interface.replyNotifications` now, bounded and
defaulting to the values they had, and the watcher reads them through the same
capability hook as the rest of the block.
* fix: keep reply identity through list merges and drop rows the server no longer has
The list merge carried three of the four read-state fields by hand and left out
`lastResponseMessageId`, so an SSE update on an unseen conversation erased which
branch the reply landed on, and a missing identity reads as visible. It uses the
same `preserveReadState` helper as the other two merge paths now, and the test
that covered the other three fields covers this one too.
A local cache merge was only inspected on a list's first page for new arrivals.
A title or oldest-first sort leaves a replied row where it is, so its first
reply on a later page went into the alerts baseline without an arrival and its
chime or notification was lost. Local merges scan every loaded page; server
responses keep the first-page rule, and only rows already known are considered.
An unread request that matched nothing means the conversation is gone: the
server's owner-scoped update returns the row even for a no-op. The mutation
rolled back the read fields and kept the row; it removes it from the caches now,
as a delete does.
* fix: discard a job completion that resolves after the watcher has gone
The fetch that settles a finished job had no teardown guard, unlike the away
poll. Signing out or switching accounts unmounts the watcher, and a response
still in flight for the previous session would then merge into the caches the
next one reads. The result is dropped once the watcher has unmounted, tracked
on unmount rather than in the jobs effect's cleanup, which re-runs on every
change to the running set while its earlier completions are still wanted.
* fix: move error-turn stamps into packages/api and settle overlapping unread no-matches
Error turns were stamped in CJS: the error middleware checked eligibility, called
the stamp and shaped the event's conversation snapshot itself, and the agents
controller stamped its own. Both call announceErrorTurn now, and the
skipped-persistence restamp goes through announceReply, so no stamp is issued
directly from /api any more. The existing sendError tests pass against the real
helper unchanged.
An unread call that no longer owned the row dropped a server no-match with the
rest of its stale answers, so a deleted conversation could be restored by a newer
call's rollback. The no-match now evicts before ownership is consulted. It stays
after the superseded check: a superseded call never reached the server, and its
synthetic `modified: false` is not a no-match.
Also: Settings offers the reply toggles only once the startup config has loaded,
matching the capability hook; a cancelled reply-discovery snapshot is restarted
even though nothing observes it; and the focused refresh is capped at the five
minutes the discovery snapshot stays authoritative, since that refresh is what
renews it.
* fix: settle the assistant final in packages/api, announce attachment-only replies
Both assistant controllers carried the same persistence barrier: write the
response, check the row and the conversation both persisted, and unwrap the
settled conversation for the final event. That is behaviour, and it was
duplicated in CJS; settleAssistantFinal owns it now and the controllers call
it. Their existing tests pass unchanged.
The announce predicate ignored attachments, so a reply made only of files,
such as a resumed workspace artifact with empty content and text, raised no
dot, badge or alert. The message body renders attachments and acknowledgement
checks the body, so such a reply can be cleared as well as announced; every
announce path now passes them through.
The stopped-reply announcement took the storage engine's own id type in its
exported signature. It takes plain string ids now, and saveConvo accepts them
alongside its own, since the update casts them against the schema; the id type
stays inside data-schemas.
* fix: normalize the stopped reply's written ids in packages/api
The abort route filtered and stringified the ids of the rows it had written
before handing them to announceStoppedReply. That is data shaping, and it sat
in CJS; the announcement takes the ids as the caller holds them and drops the
unwritten ones itself.
* style: order the conversation row classes for Tailwind v4
The v4 upgrade on canary changed the class order Prettier enforces; these
three rows carried the v3 order.
* fix: replay replies a dead tab's focus lease held back, keep the focused refresh at a full page
A tab killed without firing blur or pagehide leaves its focus lease for up to
a minute. A reply arriving under it was baselined and then suppressed, and
nothing reran when the lease lapsed, so its chime and notification were lost.
Arrivals held back only by another tab's lease are kept and rechecked when
that lease expires; a lease the focused tab keeps refreshing still holds them.
The focused refresh reused the away-poll limit, so an operator who lowered it
also shrank the discovery page that keeps the unseen count complete behind a
filtered list. The limit now bounds only the away poll.
* fix: announce a held reply as soon as the focused tab releases its lease
A tab that blurs normally clears its lease long before the lapse, and a reply
held back for it is due as soon as nobody is looking. Lease changes from other
tabs now trigger the recheck, not only the expiry timer.
(cherry picked from commit
|
||
|
|
a7662d2d26
|
🕘 feat: Distinguish Tool Preparation From Tool Call Time (#16455)
Some checks failed
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
Codegraph E2E Votes / vote (full suite) (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/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) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
* 🕘 feat: Distinguish Tool Preparation From Tool Call Time * 🎞️ fix: Format timing specs and flatten phase labels * 🧷 fix: Narrow Tool-Step Timing Before Stream Callback * ⏱️ fix: Show Measured Subsecond Tool Calls * 🧮 fix: Attribute Earliest Tool Fragment to Its Call * 🧵 fix: Preserve Tool Timing Across Replay and Parallel Calls * 📦 chore: Upgrade Agents SDK To 3.9.8 * 🧭 fix: Restore Tool Timing Across Redis And Child Activity --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
7caa98ff15
|
🖊️ fix: Persist Skill Subfile Edits (#16362)
* 🖊️ fix: Persist Skill Subfile Edits
* fix: Guard skill file revisions and preserve cached views
* fix: Clear unavailable skill files and overlap upload reads
* fix: Recover unavailable skill files and clean up replaced uploads
* fix: Protect agent skill subfiles from concurrent edits
* fix: Keep management skill file writes revision-safe
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
7b2362d7a7
|
🧲 feat: Attach or Leave a Workspace on a Saved Chat (#16124)
Some checks failed
Codegraph E2E Votes / vote (full suite) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
Backend Unit Tests / Build packages (push) Has been cancelled
Backend Unit Tests / Codegraph select (push) Has been cancelled
Backend Unit Tests / Circular dependency checks (push) Has been cancelled
Frontend Unit Tests / Client build recovery regression (push) Has been cancelled
Frontend Unit Tests / Codegraph select (push) Has been cancelled
Frontend Unit Tests / Build packages (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (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
Backend Unit Tests / TypeScript type checks (push) Has been cancelled
Backend Unit Tests / Tests: api (shard 1/3) (push) Has been cancelled
Backend Unit Tests / Tests: api (shard 2/3) (push) Has been cancelled
Backend Unit Tests / Tests: api (shard 3/3) (push) Has been cancelled
Backend Unit Tests / Tests: data-provider (push) Has been cancelled
Backend Unit Tests / Tests: data-schemas (push) Has been cancelled
Backend Unit Tests / Tests: @librechat/api (shard 1/4) (push) Has been cancelled
Backend Unit Tests / Tests: @librechat/api (shard 2/4) (push) Has been cancelled
Backend Unit Tests / Tests: @librechat/api (shard 3/4) (push) Has been cancelled
Backend Unit Tests / Tests: @librechat/api (shard 4/4) (push) Has been cancelled
Frontend Unit Tests / TypeScript type checks (client) (push) Has been cancelled
Frontend Unit Tests / Tests: @librechat/client (push) Has been cancelled
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Has been cancelled
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Has been cancelled
Frontend Unit Tests / Vite build verification (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
* feat: Attach or leave a workspace on a saved chat
A saved chat that recorded running without an attached environment could
never take one: `without_attached` is sealed for the life of the chat, and
the only transition was a move between attached environments. Switching an
existing chat to a coding agent therefore ended in a composer that could
send but never reach files or commands. A chat sealed to a machine that went
offline had the opposite dead end: Send stayed disabled with nothing on
offer but a reconnect hint, and the "Move the chat to continue without it"
copy promised a request the server rejected as `invalid`.
One transition mechanism now covers all three directions. `from` still
repeats the persisted decision, so a stale view cannot replace a decision it
has not seen, and only a decision the chat actually recorded can move:
- attach, from a recorded `without_attached` onto the environments its
agents use, with each target workspace revalidated on its worker;
- detach, an empty `to`, which clears the selections without polling the
machine the chat is leaving;
- move, unchanged, including its refusal to switch the workspace of an
environment the decision already covers.
The composer keeps the control visible while a chat runs without a
workspace, so that state is named and reversible, and offers "Continue
without workspace" whenever a sealed machine stops being usable. History is
untouched and no file is copied.
A send now also records the decision it was submitted under on its own
conversation. The server seals that pair for the rest of the chat, so a chat
that became saved mid-run held none while the stored one was already sealed:
the composer re-derived an agent default the seal refuses and reported
"Choose workspace" with Send disabled until the page was reloaded.
* 🎨 style: Format the Workspace Transition Hook Tests
* fix: Never seal a partial workspace decision, and gate the new directions
Two review findings on the transition mechanism.
A transition replaces the sealed decision whole, and the next turn resolves
every environment or none. The move path could not truncate before, because it
was offered only in `choose` state, which `aggregateState` reaches only when no
environment is unavailable, unsupported or missing: every environment was then
either carried over or selectable. Widening the gate to `!canSubmit` so an
unreachable machine could be left behind broke that invariant, and an
environment nothing can cover would have been dropped from a decision the
composer then sealed, blocking the next send and needing a second transition to
escape. A nonempty transition now requires every environment to be retained or
selectable; when one cannot be, only leaving attached execution is offered,
which is the escape.
The move protocol version becomes 2. Attach and detach travel on the same
owner-authorized endpoint as the move, so a client built against this change
would otherwise offer both to a deployment that only implements moves, where an
attach comes back `locked` and an empty target set `invalid`. The client already
compares the advertised number against the constant, so the bump is the gate.
`conversationMoves.enabled` still decides whether an owner may replace a sealed
decision at all.
* fix: Keep v1 moves working, and take the conversation updater from its owner
Two review findings on the previous head.
Bumping the move protocol wholesale made the client's exact-version check treat
a replica still advertising 1 as supporting nothing, so an attached chat whose
agent moved to another machine lost the relocation that replica already served
-- the previous head's own compatibility test pinned that regression. The
protocol is now two constants: version 1 is the move between attached
environments, version 2 adds attaching an environment to a chat that recorded
running without one and leaving attached execution behind. The server
advertises the highest it implements and the client keeps every lower
capability, so a v1 replica keeps its move while attach and detach wait for the
version that serves them. Where an environment cannot be covered and leaving is
not served either, no transition is offered and the composer reports the state.
Recording the submitted decision had made this hook a second Recoil writer of
the conversation atom, widening the surface that migration has to convert. The
host that owns the atom already holds its setter, so the hook receives it
instead of reaching through `~/store`.
* fix: Advertise attach and detach beside the move instead of above it
Raising the move protocol to 2 kept a client and server of the same build in
agreement, but not the two builds a rollout actually runs at once. The deployed
client compares the advertised number for equality against its own constant of
1, so a server advertising 2 tells every client already loaded in a browser that
moves are unsupported, and an attached chat whose agent changed machines loses
its relocation until that tab reloads.
The move version therefore stays 1, exactly as before this branch, and the two
new directions are advertised on their own field:
codeEnvironmentMoveVersion: 1 // move between attached environments
codeEnvironmentTransitionVersion: 2 // attach an environment, or leave one
Both come from `conversationMoves.enabled`, since all three are one owner
replacing one sealed decision. A client that predates this capability reads only
the move version and keeps working; a client that has it offers attach and
detach only where the second field appears, so it never sends a replica an
attach it refuses as `locked` or an empty target set it calls `invalid`.
* fix: Hold a send while a workspace decision is being replaced
Confirming an attach left Send enabled. The composer disables only the
workspace menu while the request is in flight, so a turn submitted right after
the confirmation started under the decision being replaced: it ran without the
workspace its owner had just chosen, and the replacement still landed, because
the stored decision the compare-and-swap expects was unchanged. The chat then
reported an environment its last turn never used, and nothing said so.
The server's own check has the same shape. It reads the conversation's
generation state, then revalidates each target workspace over the network, then
swaps; a turn that starts during that round trip is invisible to the check that
already ran. It now re-reads the generation state immediately before the swap,
leaving only the instant the compare-and-swap itself covers, which closes the
window for every client rather than just this one.
On the client the submission resolver refuses while a replacement is pending,
so the same signal disables the Send button and makes a programmatic send
return false. The workspace control stays reachable, so the state a chat is in
remains visible while it settles.
* fix: Fence Workspace Transitions and Reconcile Rejected Choices
Advance a private conversation revision after publishing an active generation and before reading its authoritative workspace decision. Transition CAS writes compare that revision, covering admission during the final idle-check window without expiring locks. Preserve tenant middleware and exclude private counter writes from chat activity and indexing.
Default existing undecided chats to no workspace, reconcile failed submissions from the server, scope pending guards to the affected chat, compare selection tuples without delimiter collisions, and opt attach/detach into deployment policy independently of existing moves. Retain legacy selection-only choices through first-send events.
* fix: Retain Failed Workspace Recovery and Skip Disabled Fences
Keep unconfirmed code-environment decisions in conversation-scoped Jotai state after authoritative reads fail, mutation observers reset, or navigation unmounts them. Expose a retry action and release submission only after a matching successful read. Ignore stale completions and reject mismatched conversation responses.
Reuse the owner-scoped conversation already loaded by each ingress when effective conversation moves are disabled. Retain the admitted revision fence for enabled moves, including move-only deployments. Cover failure/retry lifecycle and both policy branches at the helper and ingress levels.
* fix: Reuse the Atomic Admitted Snapshot Through Recovery
Return the admission revision and persisted decision from one Mongo findOneAndUpdate. Skip content indexing per internal query while retaining tenant middleware, private projection, and timestamps. Carry the returned snapshot through web and API initialization instead of validating against a stale pre-admission selection.
Keep first-send workspace choices in both the recovery preset and conversation template, and reconcile using the generated conversation ID from error or message data rather than requiring a saved submission snapshot. Cover single-query storage, indexing isolation, moved-machine validation, and first-send error recovery.
* fix: Reconcile Cancelled Turns and Keep Detach Reachable
Reconcile the submitted code decision before the local cancellation path finalizes streamed content or recovers a minimal submission. A cancel that beats the server rejection must not leave the attempted choice sealed locally; navigation must not update a different conversation.
Offer the authorized detach-only transition when a sealed conversation no longer has any attached agents, while ordinary chat stays sendable. Keep the selector visible for that transition and retain existing policy gates. Cover cancellation branches, no-attached-agent states, managed-only agents and the detach action.
* fix: Recover Workspace Transitions Across Navigation
* test: Verify Saved Workspace Transitions Against Current Dev
* test: Assert Explicit No-Workspace State in Native Journey
* test: Await Browser Settlement Before Switching Native Agents
* test: Settle URL Agent Selection Before Native Chat
* test: Wait for Worker Lease Expiry Before Offline Detach
---------
Co-authored-by: Lia <lia@librechat.ai>
Co-authored-by: Danny Avila <danny@librechat.ai>
|
||
|
|
34938ebcba
|
📮 fix: Count Undelivered Background Results as Outstanding (#16343)
* 📮 fix: Count Undelivered Background Results as Outstanding
* fix: Reconcile delivered tasks, discard exactly, and count pending subagent results
* fix: Settle manually claimed remote deliveries and keep pending controls while wake-ups drain
* fix: Report dead-lettered deliveries as failed and read subagent wake-ups from the durable store
* fix: List restored dead letters and retire deliveries on local durable claims
|
||
|
|
c6282fa888
|
🧷 fix: Wait for Long Dispatch Turns Before Giving Up Background Code Results (#16345)
* 🐢 fix: Back Off Waiting Completion Wake-ups and Deliver Them When Ready * fix: Signal every readiness path and make the completion wait cap configurable * 🧷 fix: Wait for Long Dispatch Turns Before Giving Up Background Code Results * fix: Mark held completion deliveries instead of pipeline expedite, and announce store-won approval expiry * fix: Keep code tasks protected and wait without a fixed cutoff * fix: Scope settle expedites to the resumed conversation and close the remaining signal gaps * style: Format the settlement waiter * fix: Announce a won approval expiry once and release subagent wake-up registrations * fix: Outlast terminal persistence before giving up an unanchored code result * fix: Anchor code results the moment their dispatch turn settles * fix: Scope harvest epoch pinning to the owning stream --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
dd21e7fb6d
|
📣 fix: Surface MCP Credential Failures During Tool Loading (#16323)
* 📣 fix: Surface MCP Credential Failures During Tool Loading
* fix: address MCP credential propagation review
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
7238be3e5e
|
⚡ fix: Deliver Waiting Completion Wake-ups the Moment They Are Ready (#16339)
* 🐢 fix: Back Off Waiting Completion Wake-ups and Deliver Them When Ready * fix: Signal every readiness path and make the completion wait cap configurable * fix: Mark held completion deliveries instead of pipeline expedite, and announce store-won approval expiry * fix: Scope settle expedites to the resumed conversation and close the remaining signal gaps * fix: Announce a won approval expiry once and release subagent wake-up registrations * 🧪 ci: Count System Instructions in Mock Model Usage (#16350) The e2e fake model reported input tokens for the chat messages alone, because the SDK hands a test override model the pruned messages without the systemRunnable pipe. Once #16301 gave every memory-enabled chat a system prompt, the calibrated context snapshot put used tokens below the instructions and the gauge dropped its Messages row. Count input over the complete prompt, as a real provider bills it. --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
e4024052e0
|
✒️ fix: Persist a Generated Title Before the Turn Ends (#16137)
* ✒️ fix: Persist a Generated Title Before the Turn Ends * 🧷 fix: Keep the Early Title Save From Rewriting Message References * 🩹 fix: Carry the Recovered User Message Reference * 🧵 fix: Reference Every Recovered Message Row * 🪢 fix: Reference Paused and Resumed Response Rows --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
5f4a07f40b
|
⚡ perf: Exclude Agent Version History From Default getAgent Reads (#16070)
* ⚡ perf: Exclude Agent Version History From Default `getAgent` Reads
getAgent now defaults its projection to { versions: 0 }; loadAgent/loadAddedAgent
and canAccessAgentFromBody use getAgentWithVersionCount so the version count stays
exact without transferring the unbounded versions array on every chat request.
Callers that need history (v1 update/revert handlers) request it explicitly.
* fix: tighten agent version projection types
* fix: type projected agent version counts
* fix: type default agent projection
* style: format agent projection overload
* fix: expose projected agent return type
|
||
|
|
8a3ab43965
|
📬 fix: Persist Background Results Before Parent Rows (#16101)
* 📬 fix: Persist Background Results Before Parent Rows
* fix: Harden durable background result delivery
* fix: Fence durable background completion ownership
* fix: reconcile durable background receipt ownership
* test: align background receipt mocks with contracts
* fix: Fence durable result ownership and recover interrupted cleanup
* fix: Mark independent receipt projections for task-local ownership
* fix: Carry receipt provenance through message patch inputs
* fix: Preserve resumed receipt delivery during mutual claim yielding
* fix: Preserve conversation cleanup for non-receipt owner identities
* fix: Preserve receipt recovery across cleanup and retry exhaustion
|
||
|
|
21a9edbe74
|
🪪 feat: Pass Schedule Identity to MCP Token Providers (#15962)
* feat: carry schedule context into MCP token providers * fix: restore scheduled token context after approval pauses * fix: make scheduled identity boundaries explicit * test: keep owner-drain leases live through CI delays |
||
|
|
2ffee7e143
|
🪂 feat: Opt-In Text Fallback for Files No Tool Can Read (#15940)
* 🪂 feat: Opt-In Text Fallback for Files No Tool Can Read An upload routed to tools (`llmDeliveryPath: none`) reaches nothing when the agent handling the turn runs neither Run Code nor File Search, or runs one that cannot read the type. With `fileConfig.endpoints.<endpoint>.textFallbackWithoutTools` (also accepted at the top level and inherited from `default`), such a turn delivers the text extracted at upload instead. The setting is off by default, which keeps today's behavior. - Upload: when the setting is on and an inferred `none` route finds no reading tool, the built-in document parser or native text reader stores the text on the file, best effort, under the extracted-text size cap and content policy. - Turn: `resolveTurnLLMDeliveryPath` re-resolves each inferred route against the tools the agent runs, and `applyTurnTextFallback` marks copies of the records a turn loads, so endpoint filtering, limits, inspection, history replay and steer media all see the text the turn delivers. The stored route is never rewritten. - Explicit destinations, records predating routing, and turns whose tools are unknown are left as they are. * 🧪 test: Resolve Custom Endpoint Fallback Under the Endpoint Name Uploads route a custom endpoint agent by its saved provider, the endpoint name. initializeAgent marks turn copies before getProviderConfig swaps the provider for the backing client, and the endpoint keeps the name afterward, so the client and child encoders resolve the opt-in under the same endpoint. Cover both the initialization path and the post-initialization agent shape. * ♻️ refactor: Share One Extracted-Text Storage Cap Across Uploads The fallback defined its own copy of the 15 MiB cap context uploads already apply to extracted text. Export MAX_STORED_EXTRACTED_TEXT_BYTES from files/extract and use it in both places, documenting that it bounds what a MongoDB file document can hold rather than operator policy. * 🧭 fix: Keep Fallback Text Wherever a Later Turn Can Deliver It Extraction skipped uploads filed under a reading tool, so a handoff agent without that tool, or the same agent after its tools or grants changed, had no text to fall back to. Store fallback text for every inferred route on a message attachment; files kept on an agent's tool resources never reach a prompt and still skip it. Turn marking only ran while the fallback was enabled, so a stored tool-routed record whose type the endpoint now routes to text stayed marked `none` and `extractFileContext` skipped it. applyTurnTextDelivery (renamed from applyTurnTextFallback) now marks any stored `none` record with text that the turn resolves to text, and returns early when no such record is loaded. * 🚦 fix: Admit Every Attachment by the Route Its Turn Delivers A record upload routed to tools that the current endpoint sends to the provider stayed marked `none` on the turn copy, so admission skipped it while BaseClient encoded its bytes, bypassing attachment count and size limits. applyTurnDelivery (renamed from applyTurnTextDelivery) now gives every record whose route upload inferred the route the turn resolves, before endpoint filtering, limits and inspection, matching the run-file encoder. hasInferredLLMDeliveryPath shares the inferred-route rule with the resolver. Fallback extraction selected the document parser inside the CJS upload path. resolveUploadFallbackText now takes the upload and picks parseDocument or parseTextNative itself, with the extractors injectable, so process.js passes request data only. Its tests run the real parser against the xlsx fixture and the real native reader against temporary files. * 🎚️ fix: Read Custom Endpoint Dialect From Config on Both Sides of Init initializeAgent materializes turn routes before getProviderConfig swaps the saved custom endpoint name in agent.provider for its backing client, so routing read that name as a non-OpenAI dialect. Media a custom endpoint opted into could then be materialized off the provider path, skipping admission, while the finalized client still sent the bytes. resolveAgentDeliveryRouting now reads the dialect with getCustomEndpointProvider, as upload does, which holds before and after the swap. The upload fallback plan now keys on the chosen-destination marker the turn resolver reads, so an upload recorded as chosen, including every legacy chooser upload, never pays for text a turn cannot deliver. * 🛡️ fix: Apply Turn Routes Only While the Record Stays Admitted Resolution while initializing and at delivery can disagree: delivery reads a Responses API choice only the finished client config holds. Applying a route that takes a record out of admission, off the model path or to text it never stored, would then skip the limits for a file the client still sends. applyTurnDelivery now applies a route only while the record stays model-bound; admitting a record the turn leaves out cannot slip past a limit. * 🕹️ feat: Run Declared Project Actions on Attached Workers (#15943) * feat: use declared attached project actions * Complete named action definitions and approval previews * Sort named environment imports * Sort native environment fixture imports * 🔓 fix: Keep Code Approval Mode Selectable Mid-Run (#15938) * 🔓 fix: Keep Code Approval Mode Selectable Mid-Run The composer's code approval mode selector was disabled while a run streamed, and a mode picked during a run was reverted when the final or abort event merged the server conversation back. The selector now stays usable in flight and both merges retain a mid-run selection, which the next send carries. * 🔓 fix: Retain Mid-Run Approval Mode Across Cache and Recovery Stamp the live approval mode onto the submission conversation at send so the retention baseline matches what was read, keep a retained mode in the conversation query cache on final and cancel, and rebuild failed or aborted conversations from a preset that carries the mid-run pick. * 🔓 fix: Scope Retained Approval Mode to the Submitted Conversation Retention now requires the live conversation to be the one the run submitted, or the id the server assigned to a new chat, so navigating elsewhere mid-run cannot write that conversation's mode back. A single recovery helper rebuilds failed or aborted conversations from the retained preset and patches the detail cache for every recovery site. * 🔓 refactor: Keep the Local Approval Mode on Every Server Merge Replace per-path retention with one rule: a locally picked code approval mode is newer than any server copy of the same conversation, so the final and abort merges and the error recovery preset keep it. The selector writes the pick into the conversation's detail cache, which navigation rebuilds from, so the pick is conversation-scoped without reading the index-global atom from the SSE handlers. * 🔓 fix: Prefer the Live Conversation When Caching the Final Merge The final handler's detail-cache merge now takes the local approval mode from the open conversation when it is the one that finished, falling back to the cached record only for a conversation that is no longer on screen. * 🔓 fix: Keep the Local Approval Mode Through Settled-Start Reconciliation The resumable transport's settled-start reconciliation and replacement handoff wrote a fetched conversation straight into conversation state and the detail cache. Both now apply the same local-mode rule as the event handlers, treating a new chat's pending id as the settled conversation's own. * 🔓 fix: Seed the Detail Record When a Mode Is Picked A conversation that has its id but no detail record yet now gets one from the live conversation when a mode is picked, the same key the resumable transport seeds optimistically, so recovery and navigation find the pick. A chat with no id yet still keeps the pick in conversation state alone. * ⬆️ chore: bump agents to 3.8.7 (#15947) * 🧭 refactor: Settle Turn Delivery Routing Once in Agent Initialization `initializeAgent` resolved the provider and its client options only after the turn's files were loaded and admitted, and the two delivery readers each rebuilt the attachment routing from the agent object at their own moment: `BaseClient` took the custom-endpoint dialect from the already-swapped `agent.provider`, the run-file encoder from whatever child config it was handed. Move `getProviderConfig`/`getOptions` ahead of file discovery, where nothing in between fed them, and settle one `deliveryRouting` value with every input final: the file policy under the endpoint's own name, the dialect its config declares, the Responses API decision the model call uses, and the transcription setting. `InitializedAgent`, the child encoder and `BaseClient` consume that value; `resolveTurnLLMDeliveryPath` is the one place a stored route is resolved again. * fix: Preserve attachment reachability across handoffs and late steers * test: Type the untrusted attachment reference fixture --------- Co-authored-by: Ravi Kumar L <upman@users.noreply.github.com> |
||
|
|
345cf8877f
|
🍵 fix: Support Renewable MCP Credentials for Schedules (#15908)
* fix(schedules): forward renewable MCP credentials * fix(schedules): require unattended MCP credentials * fix(schedules): resolve MCP credentials during execution * refactor(schedules): inject unattended credentials * fix(schedules): scope renewable credential resolution * fix: isolate lazy scheduled OBO credentials across MCP lifecycle * fix: preserve MCP cancellation and retryable credential lookup * fix: bind MCP cancellation to the owning run signal * test: supply flow manager in OBO cancellation regression * fix: preserve MCP cancellation across exchange and API ingress * style: sort MCP manager imports * fix: propagate cancellation through agent discovery * test: preserve agent discovery edge literals * fix: propagate agent initialization cancellation * fix: expose initialization signal in OpenAI adapter |
||
|
|
74fa60cee1
|
🔎 fix: Enforce WEB_SEARCH Role Permission on Agents (#15875)
* 🔎 fix: Enforce WEB_SEARCH Role Permission on Agents Squash of #15822 onto dev, preserving authorship: - 🔎 fix: Enforce WEB_SEARCH Role Permission on Agents - 🧪 test: Cover the Runtime Tool Loader's Web Search Gate - 🔒 fix: Gate Web Search on the OpenAI-Compatible Embedder Surface - 🩹 fix: Authorize Web Search by the Execution Context's User - 📝 docs: Note the Grant Memo's One-Subject-Per-Request Assumption - 🧹 fix: Deny Web Search Before an Endpoint Default Can Grant It - 🙈 fix: Withhold the Web Search Model Parameter From a Denied Role - 🧱 fix: Strip Provider-Native Search an Endpoint Re-Enables After Denial - 🔌 fix: Close the OpenRouter Plugin Path and Stop Pruning Hidden Parameters * 🧭 fix: Gate Provider-Native Web Search on the Built Config The web search role gate ran before the provider builder and only when the agent's stored `web_search` was not `false`, so an endpoint's `addParams` re-enabled native search for a denied role, and every OpenAI-compatible and Responses request read the role whether or not search was in play. The gate now reads the builder's output: when it carries a native search tool or OpenRouter's `web` plugin, the `WEB_SEARCH` grant is resolved and the search stripped on denial. The routes that reach `initializeAgent` with `runtime` and no `req` pass a lazy `resolveWebSearchGrant` that joins their request-memoized grants, forwarded through agent discovery to handoffs and subagents. The embedder surface wires it whenever `getRoleByName` is supplied, independent of `appConfig`. --------- Co-authored-by: TomasPalsson <tomas2212042710@gmail.com> |
||
|
|
1163045cef
|
🖋️ feat: Seal Code Environment Choices Per Conversation (#15868)
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
Codegraph E2E Votes / vote (full suite) (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/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
* feat: lock code environments per conversation * style: Sort code environment imports * fix: Harden code environment decisions * fix: Preserve code environment rollout compatibility * fix: Harden code environment boundaries * refactor: Centralize code environment policy * test: Restore partial disconnect policy mock * fix: Close code environment edge paths * fix: Preserve implicit stateful code routes * fix: Stabilize implicit code routing * test: Align remote workspace contract * chore: Sort code route import |
||
|
|
f25242df98
|
🦘 feat: Share Run-Scoped Files With Subagents (#15848)
* feat: add run-scoped file sharing for subagents Delegate current-message files through authorized execution catalogs and publish selected immutable code-output versions through the existing file pipeline. Requires the companion agents SDK context adapter before the dependency can be released and pinned. * fix: preserve child tool artifacts and verify file-sharing lifecycle Keep citations and other non-sandbox artifacts on their existing delivery path while retaining private code outputs and inspected images until publication. Cover native and text delivery, nested and sibling authorization, concurrent runs, cancellation cleanup, and checkpoint recovery through the browser harness. * test: align file-sharing fixtures and integration cleanup * test: repair LibreOffice conversion fixtures * test: verify deployment skill bytes across checkout formats * fix: align subagent file budgets and refresh boundaries * chore: update agents SDK to 3.8.6 * refactor: move code output processing into API workspace * fix: enforce shared file budgets for parents and teams * fix: declare the shared file encoder interface |
||
|
|
d510b6feb6
|
🛖 fix: Restore Saved Attached Workspaces (#15811)
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
Codegraph E2E Votes / vote (full suite) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
* Restore attached workspaces from the resolved owner conversation * Carry restored conversation through lazy tool initialization * fix: Resolve Workspace State From Effective Conversation * style: Format Conversation Regression Cases * test: Retain Real Workspace Resolver In Controller Fixtures * test: Exercise Workspace Envelope Conversation Identity |
||
|
|
65bb64bc68
|
🛟 fix: Recover CodeAPI File Uploads After Throttling (#15784)
* fix: recover CodeAPI uploads after throttling * fix: cover eager CodeAPI uploads * fix: scope CodeAPI upload recovery * test: clarify upload recovery deadlines * fix: isolate CodeAPI recovery state * fix: cancel CodeAPI recovery waits * test: provide CodeAPI registry in handler fixture * fix: propagate CodeAPI recovery controls * fix: bound CodeAPI recovery by run * fix: preserve skill upload cancellation * test: update deferred loader signal contract * fix: preserve recovery cancellation * fix: cancel recovery source reads * fix: classify Axios upload cancellation * fix: preserve lazy provisioning cancellation * fix: close resource recovery boundaries * fix: preserve provisioning failures compatibly |
||
|
|
66faf4c27a
|
🛑 fix: Preserve BYOM Foreground Cancellation Identity (#15777)
* fix: Preserve BYOM foreground cancellation identity * fix: Bind foreground cancellation to runtime message |
||
|
|
559fd7d607
|
🪓 feat: Cancel Background Tool Invocations (#15773)
* ✨ feat: Cancel ordinary background tools * 🛡️ fix: Keep cancellation receipts rollout-safe * 🛡️ fix: Harden Background Tool Cancellation * 🧪 test: Cover cancellation config wiring * 🎨 style: Sort cancellation imports * 🧪 test: Align Cancellation Claim Result * 🛑 fix: Complete Background Cancellation Lifecycle * 🎨 style: Align Cancellation Test Formatting |
||
|
|
b207530ff5
|
🪡 fix: Thread Stop Into BYOM Commands (#15772) |