mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
* 🔑 fix: Use Admin-Stored Web Search Credentials at Runtime Use admin-stored (encrypted or literal) web search credentials as system credentials at runtime, add the Keenable key to the secret registry, bind a stored key to the layer that set its URL, and require re-entering the key when a write changes or removes that URL (checked atomically with a version precondition). * 🧹 fix: Keep Dotted-Key Write Guarantees on Version-Checked Web Search Writes A version-checked write the caller saw absent first creates an empty document. When the database then refuses the write (a key name it cannot store, answered 422 CONFIG_KEY_NOT_STORABLE), remove that document again so a refused write stores nothing, unless another write has changed it. Secret re-entry issues now carry `segments` like every other config issue. * 🚩 feat: Publish the webSearchStoredKeys Feature Flag in the Config Contract GET /api/admin/config/meta now reports `webSearchStoredKeys: true`, so an admin client can stop warning that only ${VAR} web search references work at runtime. meta.spec probes the behaviour behind it: an encrypted stored key reaches web search auth, the Keenable key is encrypted on write, and changing a URL beside a stored key requires entering the key again. * 🧪 test: Type the Refused-Write Driver Stub in the Config Methods Spec * 🧪 test: Expect the Write Precondition Arguments in the Admin Config Route Test The handler passes a session slot and an optional version precondition to patchConfigFields since the web search re-entry check; the route test added in #17322 asserted the earlier five-argument call. * 🧹 fix: Surface a Failed Cleanup of the Empty Config Document When a version-checked write the database refused cannot remove the empty document created for it, let that failure reach the handler (500) instead of logging it and answering 422 CONFIG_KEY_NOT_STORABLE, which promises that nothing was stored. * 📝 docs: State the Web Search Stored-Key Binding Rule Exactly in the webSearchStoredKeys Flag The flag's doc said a stored key goes only to a URL the same layer set. The merge rule keeps a stored key over an inherited ${VAR} or default URL, so the doc now names the exact rule: a stored key reaches a URL stored in config only when one layer set both, a later layer that changes, blanks or removes the URL drops the key, and a write that changes or removes the URL must enter the key again. * 🧹 refactor: Read the Secret Registry Through getConfigSecretRules Only The dev merge kept this branch's getConfigSecretFields and getConfigArraySecretFields beside dev's getConfigSecretRules, which returns the same registry data. Only the secret specs used the two extra accessors. They now read getConfigSecretRules().secretFields and .arraySecretFields, so the accessors and their exported ConfigSecretField and ArraySecretField interfaces (duplicates of AdminConfigSecretFieldRule and AdminConfigArraySecretFieldRule) are gone. |
||
|---|---|---|
| .. | ||
| agent.spec.ts | ||
| agent.ts | ||
| index.ts | ||
| web.integration.spec.ts | ||
| web.spec.ts | ||
| web.ts | ||