LibreChat/packages/api/src/files
Danny Avila 2bd3c5293a 🔒 fix: Track the configured approval window in the /files/usage hold
Codex review on 9277620.

`endpoints.agents.checkpointer.ttl` is a positive int with no upper bound,
and its docs invite raising it for longer review windows. It drives the
pending-action expiry, so a run can legitimately stay paused past 24h. The
fixed 24h lifetime would then let Mongo reap an attachment while its
approval was still live, and the later queue drain would send a file that
no longer exists.

Replace the fixed constant with `resolveFilesUsageHoldMs`, which adds the
configured approval window to a 24h baseline covering upload, enqueue, and
the run reaching its pause. The route reads the window from the same
`getApprovalTtlMs(checkpointerCfg)` the pending action uses, so the two
stay in lockstep.

The replay bound is unaffected: the window is a per-deployment constant and
the deadline is still `createdAt + holdMs`, so a replayed touch re-asserts
the same instant and `$max` skips the write. Only an operator config change
moves it, never a client.
2026-07-27 22:31:45 -04:00
..
agents 🛡️ fix: Agent Permission Check on Image Upload Route (#12219) 2026-03-14 02:57:56 -04:00
code 🐛 fix: Prevent Infinite Render Loop on Code-Execution File Preview (#13922) 2026-06-23 16:34:43 -04:00
documents ️ refactor: Migrate @librechat/api build to tsdown (#13595) 2026-06-08 10:54:48 -04:00
encode fix: bound peak memory of concurrent base64 attachment encoding (#14023) 2026-07-01 08:22:16 -04:00
mistral 🌐 fix: Centralize Outbound Proxy Handling (#13726) 2026-06-14 10:47:49 -04:00
audio.ts
context.ts 🗂️ fix: Scope Handoff Agent Context Docs (#13167) 2026-05-18 15:36:22 -04:00
filter.spec.ts 🖼️ feat: File Size and MIME Type Filtering at Agent level (#10446) 2025-11-10 21:36:48 -05:00
filter.ts 🖼️ feat: File Size and MIME Type Filtering at Agent level (#10446) 2025-11-10 21:36:48 -05:00
index.ts 🛟 fix: Keep File Uploads Alive With SSE Heartbeats (#14295) 2026-07-21 19:27:09 -04:00
ocr.ts 🔍 refactor: OCR Fully Optional with Defaults for "Upload as Text" (#9856) 2025-09-26 11:56:11 -04:00
parse.ts ️ refactor: Migrate @librechat/api build to tsdown (#13595) 2026-06-08 10:54:48 -04:00
rag.spec.ts 🎨 chore: prettier --write all workspaces (#13281) 2026-05-23 17:52:58 -04:00
rag.ts 🎨 chore: prettier --write all workspaces (#13281) 2026-05-23 17:52:58 -04:00
retention.spec.ts 🗃️ feat: Retain Agent Files During All-Data Retention (#13477) 2026-06-02 15:04:10 -04:00
retention.ts ️ refactor: Migrate @librechat/api build to tsdown (#13595) 2026-06-08 10:54:48 -04:00
sse.spec.ts 🛟 fix: Keep File Uploads Alive With SSE Heartbeats (#14295) 2026-07-21 19:27:09 -04:00
sse.ts 🛟 fix: Keep File Uploads Alive With SSE Heartbeats (#14295) 2026-07-21 19:27:09 -04:00
sweep.spec.ts 🧯 fix: Harden Data Retention Semantics (#13049) 2026-05-19 21:58:42 -04:00
sweep.ts ️ refactor: Migrate @librechat/api build to tsdown (#13595) 2026-06-08 10:54:48 -04:00
text.spec.ts 🚏 fix: Route Admin-Configured Document Types to RAG /text on Agent Upload (#14345) 2026-07-20 22:46:28 -04:00
text.ts 🚏 fix: Route Admin-Configured Document Types to RAG /text on Agent Upload (#14345) 2026-07-20 22:46:28 -04:00
usage.spec.ts 🔒 fix: Track the configured approval window in the /files/usage hold 2026-07-27 22:31:45 -04:00
usage.ts 🔒 fix: Track the configured approval window in the /files/usage hold 2026-07-27 22:31:45 -04:00
validation.spec.ts ✳️ feat: Claude Opus 5 Support (#14422) 2026-07-24 21:45:32 -04:00
validation.ts ✳️ feat: Claude Opus 5 Support (#14422) 2026-07-24 21:45:32 -04:00