Commit graph

4 commits

Author SHA1 Message Date
Danny Avila
6f95f68a5e
🧱 refactor: Give a Schedule's Grant Storage Its Own Object, Out of the Shared Method Bag (#18662) 2026-11-21 08:31:28 -05:00
Danny Avila
e1756585dd
🧑‍🔬 fix: Bind MCP Grants to Inspected Server Configurations (#18622)
* 🧬 fix: Bind a Grant to the MCP Server Configuration a Run Checks It Against

A grant's offer read each server's configuration as librechat.yaml writes it,
while a run's readiness check and each tool call read the registry's inspected
entry. Inspection fills in requiresOAuth where the operator left it out, and the
configuration revision covers that field, so for such a server the revision a
grant was made with never matched the one a run computed: every scheduled run
and every API-key run there was refused with binding_mismatch.

The offer now resolves the operator's servers through ensureConfigServers
before the registry lookup, as the readiness check does.

* 🧪 test: Leave the E2E HTTP Fixture's requiresOAuth to Detection

The fixture spelled out requiresOAuth: false so that a grant's configuration
revision matched the one a run computed. With the offer reading the inspected
configuration it no longer needs to, and the API-key grant spec now covers a
server written the way most are.

* 🧬 fix: Inspect Only the Declared Servers the Agents Select for an Offer

Resolving every configured server before the lookup could inspect a cold or
unreachable admin-override server that no agent selects, and hold up the
consent view and each authorized call behind its timeout. The offer now walks
the agent graph first and inspects only the declared servers it selects, as a
run's readiness check does. A declared server is never handed to the registry
as written; the others are, since only their names are read.

* 🧬 fix: Leave a Server That Is Only Attached Out of an Offer's Inspection

An agent with every tool on a server deselected keeps the server's attachment
marker among its tools. The offer's pre-pass counted that marker as a selection
and inspected the server, which the offer itself then skipped. Both now use one
test for whether a key selects something on a server.
2026-11-20 11:56:14 -05:00
Danny Avila
a0f17e5581
🙋 feat: Let a Schedule's Owner Approve a Tool Before Each Use (#18277)
* 🙋 feat: Let a Schedule's Owner Approve a Tool Before Each Use

* 🧪 test: Drive a Real Run Through a Schedule's Approval Pause and Resume

* 🙋 fix: Keep a Stored Ask-First Choice When a Run Can No Longer Pause

Where pausing became unavailable, the dialog hid the ask-first boxes and renewed the
grant without them, so a tool the owner approved each time started running unattended.
The dialog now starts from the stored choice either way and always sends it. Where a run
cannot pause it shows only the stored questions, with a note that those tools are refused
for now, and the owner can keep or drop them but add none. The server keeps the stored
questions for tools still allowed when a confirmation says nothing about asking, and
refuses only a new question where a run cannot pause.

* 🙋 fix: Say Why a Schedule Asks for Approval in the Reader's Language

The approval card showed an English sentence sent by the server as the request's
description. The server now sends a code, and the card maps it to a localized string.
Any other description is shown as sent.

* 🙋 fix: Never Offer Always Allow for a Tool a Schedule Asks About Each Use

Where the endpoint enables Always allow, a schedule's approval card offered it for a tool
the owner approves on each use. Choosing it stored a conversation allow the schedule
still overrode at the next use. The offer and the recheck at resume now take a predicate
for anything beyond the policy that asks on every use, and the schedule's grant supplies
it, so such a tool is neither offered nor stored.

* 🙋 fix: Let the Owner Ask First About as Many Tools as They Can Allow

The confirmation accepted up to 25,600 allowed tools per server but only 256 to ask
about, so a large grant could not be confirmed with every tool set to ask first.

* 🙋 fix: Keep a Tool Asking First When the Owner Allows Its Changed Definition

The dialog derived the ask-first boxes from the ticked tools. A tool whose definition
changed starts unticked, so its stored question was dropped, and ticking the tool again
confirmed it as unattended. The ask-first selection is now kept apart from the ticks,
starts from the stored grant, and is narrowed to the ticked tools only when the
confirmation is sent. The owner's edits to it hold only for the grant they were made
against, so a question added to a grant confirmed elsewhere is not dropped unseen.
2026-11-18 12:18:15 -05:00
lia-by-librechat[bot]
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>
2026-10-03 20:39:43 -04:00