LibreChat/packages/data-schemas/src
Danny Avila 9277620282 🔒 fix: Anchor the /files/usage hold to upload time
Codex review on b687922.

The hold derived each new deadline from `Date.now()`, so a caller touching
once a day advanced it by another 24h every time, far below the rate limit.
That left indefinite preservation reachable and made the PR's replay claim
wrong: the window was bounded per call but not in aggregate.

Anchor the deadline to the file's immutable `createdAt` instead of the
request clock. `extendFilesTTL` now takes a lifetime and sets
`expiresAt = max(expiresAt, createdAt + holdMs)` in an aggregation
pipeline, so the target is a fixed point per file and replay is inert
rather than merely bounded. `$max` keeps the widen-only property and the
`expiresAt: {$exists: true}` filter still refuses to resurrect a released
TTL; `createdAt: {$exists: true}` fail-closes when the anchor is absent.

The update runs with `timestamps: false`: a hold is TTL bookkeeping, not a
content write, and bumping `updatedAt` also made every re-touch count as a
modification, hiding whether the deadline actually moved.

Also drop four `.node_modules-*` symlinks that `git add -A` swept in from
an npm install. They pointed at absolute paths on one machine, so every
other checkout got dangling entries. Added the pattern to .gitignore so a
workspace install cannot reintroduce them.
2026-07-27 22:16:47 -04:00
..
admin 📒 feat: Audit Log Backend for SystemGrant Assign and Revoke Events (#13087) 2026-06-18 15:42:33 -04:00
app ✳️ feat: Claude Opus 5 Support (#14422) 2026-07-24 21:45:32 -04:00
common perf: Migrate data-schemas Build to tsdown with isolatedDeclarations (#13578) 2026-06-07 21:40:48 -04:00
config fix: stripHeavyErrorFields Winston format (defense-in-depth) (#14018) 2026-06-30 20:35:51 -04:00
crypto 🧵 refactor: Migrate Endpoint Initialization to TypeScript (#10794) 2025-12-11 16:37:16 -05:00
methods 🔒 fix: Anchor the /files/usage hold to upload time 2026-07-27 22:16:47 -04:00
migrations 🧬 feat: Add GitHub Skill Sync (#13293) 2026-06-10 21:05:54 -04:00
models 🧭 feat: Mid-Run Steering and Queued Messages for Agent Runs (#14220) 2026-07-14 10:11:10 -04:00
schema 🧵 feat: Native Background Execution for Code Interpreter Tools (#14386) 2026-07-22 22:13:15 -04:00
types 🧠 feat: Add GPT-5.6 reasoning.mode + reasoning.context (Responses API) (#14233) 2026-07-13 09:52:42 -04:00
utils 🗄️ fix: Return Cached Transaction-Support Value on Cache Hit (#13999) 2026-07-05 12:02:55 -04:00
index.ts 🧰 feat: Redesign Agent Builder with Unified Tools Marketplace, Skills & Orchestration (#13952) 2026-07-05 11:30:12 -04:00