Commit graph

198 commits

Author SHA1 Message Date
Marco Beretta
fd86359e82
📡 refactor: Move the Adaptive and Resumable SSE Bindings into the Chat Package (#17452)
useAdaptiveSSE and useResumableSSE now live in the chat package and own the
run, the stream id and how a stream re-attaches. The app supplies the services
a resumable stream runs on and the Assistants stream through a StreamHost,
mounted in Root beside the chat and steer hosts.
2026-10-26 22:47:30 +01:00
Marco Beretta
7e56534c5f
🧰 refactor: Move useChatHelpers and ChatProvider into the Chat Package (#17446)
useChatHelpers now builds the pane contract from a ChatHost the app supplies:
its pane store, message query cache, turn builder, thread selection, abort
transport and settings. The stop path lives in its own module, its spec runs
in the package against a host with no app behind it, and the app mounts its
host in Root beside the steer host.
2026-10-26 22:47:11 +01:00
Marco Beretta
c1dfd6bc0f
📦 refactor: Move the useChat Facade and ChatContext into the Chat Package (#17445)
* refactor: Move the useChat Facade and ChatContext into @librechat/chat/react

The facade, ChatContext, the chat contract types and the resume request atom now
live in the chat package. The message cache subscription and the app's tool
outcome rules reach the facade through the contract, and useChatHelpers reads
its pane conversation through ChatSettings instead of the app store.

* fix: Key Cached Message Views on the Host's Tool Outcome Rules
2026-10-26 22:46:55 +01:00
Marco Beretta
da84398a44
📐 refactor: Split History Placement Out of the Resumable resume.ts (#17428) 2026-10-26 07:40:38 +01:00
lia-by-librechat[bot]
5cf87548cd
🩰 fix: Keep Subagent Guidance in Main Chat Order (#17394)
* fix: Keep Applied Subagent Guidance in Main Chat Order

* fix: Preserve Pending Controls and Unmatched Legacy Guidance

* fix: Type Retained Control Read Parameters

* fix: Keep Guidance Receipts Truthful Across Delivery States

* fix: Retain Projected Steering Client Identities

* fix: Retain Ordered Guidance Across Terminal Child States

* style: Keep Public Observation Parsing Flat

* fix: Preserve Usable Legacy Activity During Reprojection

* test: Type the Legacy Recovery View Adapter

* fix: Preserve Shared Progress Identity and Public Reasoning

* fix: Forward Host Steering Through Shared Progress

* fix: Replace Tool Argument Placeholders Before Streaming

* fix: Retain Late Child Calls and Parent Steering Content

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-24 12:12:57 +02:00
lia-by-librechat[bot]
f18b16baed
🚿 fix: Bound Chat Message IDs and Remove Backtracking (#17388)
Some checks are pending
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
* 🚿 fix: Bound Chat Message IDs and Remove Backtracking

* fix: Reserve the Preliminary Response ID Suffix Budget

* fix: Annotate Message ID Limit Exports for Declaration Builds

* fix: Accept Preliminary Response IDs as Compaction Anchors

* fix: Keep Derived Compaction Error IDs Within the Response Bound

* fix: Bound Regeneration Placeholders Across Client and API

* test: Complete Turn Protocol Regression Fixture Contracts

* fix: Validate Effective Turn IDs and Align Queued Parent Bounds

* test: Preserve Shared Constants in OAuth Controller Mocks

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-24 10:16:25 +02:00
lia-by-librechat[bot]
1871d31401
🪏 fix: Restore Explicit File Search Uploads (#17226)
* fix: Restore Explicit File Search Uploads

* fix: Preserve Unified Assistants Upload Sources

* style: Format Upload Provider Condition

* fix: Keep Unified Code Uploads Implicit

* fix: Respect File Search Upload Role Permissions

* fix: Activate File Search After Upload Persistence

* fix: Recover File Search Activation for Retained Drafts

* fix: Distinguish File Search Choices From Preference Sync

* fix: Preserve Upload Operation and Draft Ownership

* fix: Bound Draft Recovery and Own Staged Upload Cancellation

* fix: Preserve Composer Draft Ownership Across Navigation

* style: Match Pinned Prettier Union Formatting

* fix: Bind Deferred Uploads to Their Originating Composer

* fix: Preserve Upload Ownership Through Acknowledged Composer Handoffs

* test: Pass the New Conversation Sentinel as a String

* fix: Refresh Composer Ownership Atomically on New Chat Reset

* fix: Preserve Composer Ownership During URL Prompt Cleanup

* fix: Refresh Composer Ownership After Project Route Changes

* fix: Fence Upload Activation With Current or Retained Composer Ownership

* fix: Retire Composer Ownership Across History and Reloads

* fix: Preserve New-Chat Upload Ownership During Bootstrap

* fix: Fence Retained Uploads During Composer Cache Recovery

* fix: Transfer File Search Preferences Only on First Assignment

* fix: Preserve Upload State Across Acknowledgement Races

* test: Use Production Pending Draft Keys in Autosave Regressions

* fix: Preserve Upload Ownership Through Assistants Sync

* test: Supply Required Assistants Submission Metadata

* fix: Remove Retired Upload Chips by File Identity

* test: Fix Sync Fixture Type and Regression Formatting

* fix: Preserve Retained Uploads and Final Tool Preferences

* test: Align Final Frame Fixtures With Upload Retirement

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-21 23:53:29 +02:00
Marco Beretta
490ad4a32e
🧩 refactor: Move the Resumable Submission Mount Into the Chat Core (#17132) 2026-10-20 22:28:21 +02:00
Marco Beretta
2f724fccff
🚀 refactor: Move the Resumable Generation Start Into the Chat Core (#17131)
* refactor: Move the Resumable Generation Start Into the Chat Core

* fix: Call a Host Transport's Start on the Transport Itself

Forwarding transport.start as a bare function rebound this to the resumable host, breaking any host transport whose start is an instance method.
2026-10-20 22:24:15 +02:00
Marco Beretta
6c0d3a7cbb
↔️ fix: Follow the Interface Direction in Radix, the Composer and First Paint (#17264)
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/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
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
* fix: Follow the Interface Direction in Radix, the Composer and First Paint

Wrap the app in a Radix DirectionProvider driven by i18n so Tabs, Select and
menus stop rendering LTR subtrees in right-to-left locales, and swipe toasts
toward the inline end.

Chat direction becomes auto, ltr or rtl (auto by default; stored LTR/RTL
values are kept). The composer applies a forced direction as a dir attribute
instead of reversing rows, which double-flipped under an RTL document, and the
text fields default to dir=auto. The unused Jotai chat direction atom that
pinned every TextareaAutosize to ltr is removed.

index.html sets dir before first paint, and the language setting no longer
races i18n over document.lang.

* fix: Keep the Empty Composer Placeholder on the Interface's Reading Edge
2026-10-19 23:10:06 +02:00
Marco Beretta
255acf3812
🚰 refactor: Move the Queue Drain, Reveal and Recovery Hooks into the Chat Package (#17170)
* refactor: Move the Queue Drain, Reveal and Recovery Hooks into the Chat Package

* test: Run the Unmounted Steer Retry on React Query Itself
2026-10-19 15:52:50 +02:00
Marco Beretta
02b4a41cc1
🧷 refactor: Require a Mounted Steer Host Instead of a Module Default (#17164) 2026-10-18 20:28:50 +02:00
Marco Beretta
b06224bf60
🧽 refactor: Import Composer State and Restore from the Chat Package (#17163) 2026-10-18 17:43:59 +02:00
Marco Beretta
d9f2b26795
🚚 refactor: Move the Steering Hooks into the Chat Package (#17158) 2026-10-18 17:38:22 +02:00
Marco Beretta
59849fd5f9
🗂️ refactor: Move Pane Composer Files to Jotai in the Chat Package (#17193) 2026-10-17 01:12:06 +02:00
Marco Beretta
63983c9374
🎚️ refactor: Move Pane Preset and Option Settings to Jotai in the Chat Package (#17179) 2026-10-16 23:05:05 +02:00
Marco Beretta
8137a8f1b4
🗂️ refactor: Read the Search, File and Message Editor Siblings Through the Parts Host (#17173) 2026-10-16 22:49:21 +02:00
Marco Beretta
dd570269a9
✏️ refactor: Read the Inline Editors' Messages View Through the Parts Host (#17172) 2026-10-16 22:48:06 +02:00
Marco Beretta
6194cb86b0
🧱 refactor: Read Message Content Siblings Through the Parts Host (#17171) 2026-10-16 22:05:25 +02:00
Marco Beretta
73afd79e93
🔌 refactor: Inject the App Services the Steer Hooks Use through a Steer Host (#17156) 2026-10-16 15:39:28 +02:00
Marco Beretta
07a72afbc2
🔀 refactor: Move Resumable Frame Dispatch and Attach Into the Chat Core (#17129) 2026-10-16 15:38:27 +02:00
Marco Beretta
4f4bda9ebe
🛰️ refactor: Move the Pane Submission to Jotai in the Chat Package (#17159) 2026-10-16 15:35:32 +02:00
Marco Beretta
25ecf9e7cb
📦 refactor: Move the Generation Run Atoms Into the Chat Package (#17140) 2026-10-15 21:34:17 +02:00
Marco Beretta
2a701417b7
🩹 refactor: Move Resumable Response Patching Into the Chat Core (#17127) 2026-10-15 21:33:00 +02:00
Marco Beretta
d4e52acdfb
🛟 refactor: Move Resumable Transport Failure Handling Into the Chat Core (#17120)
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/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
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
2026-10-15 19:05:12 +02:00
Marco Beretta
f43e7fa041
🛰️ refactor: Move the Submitting Flag to Jotai in the Chat Package (#17121) 2026-10-15 19:04:21 +02:00
Marco Beretta
995a56b117
✂️ refactor: Split the Chat Ask Function Into Turn Modules (#17115) 2026-10-15 18:13:05 +02:00
Marco Beretta
510cf9efc9
🧱 refactor: Split the Chat Step Reducer Into Stream Modules (#17105) 2026-10-15 18:12:49 +02:00
Marco Beretta
e693deddb0
📦 refactor: Move Steer Queue and Composer State into the Chat Package (#17155) 2026-10-15 17:39:34 +02:00
Marco Beretta
2d1b570c63
🚰 refactor: Move Queue Drain Decisions into the Chat Core (#17130) 2026-10-15 17:37:44 +02:00
Marco Beretta
d9f62bbcbe
🏁 refactor: Move Resumable Terminal Handoff and Lifecycle Reconcile Into the Chat Core (#17119) 2026-10-15 17:28:22 +02:00
Marco Beretta
5364225d0c
🧭 refactor: Give the Resumable Stream a Core Run and Subscription (#17117) 2026-10-15 17:25:25 +02:00
Marco Beretta
0354562075
🔁 fix: Keep the Error Card When a Stream Reattached Without Resume State Fails (#17112) 2026-10-15 17:22:28 +02:00
Marco Beretta
f25e8eb3d9
🧵 refactor: Move Turn Message Helpers Into the Chat Core (#17110) 2026-10-15 17:20:49 +02:00
Marco Beretta
3709e1fcec
🧰 refactor: Move Resumable Start Helpers Into the Chat Core (#17109) 2026-10-15 17:19:36 +02:00
Marco Beretta
86c2ac7dce
🧮 refactor: Move Token Usage Math Into the Chat Package (#17106) 2026-10-15 17:18:58 +02:00
Marco Beretta
c577e384ed
⚛️ refactor: Move the Steer Atoms to Jotai in the Chat Package (#17135) 2026-10-15 16:31:06 +02:00
Marco Beretta
1a0c23af77
🧮 refactor: Lift Stream Steer-Chip Reconciliation into Core Reducers (#17128) 2026-10-15 16:30:47 +02:00
Marco Beretta
c6dac4b508
📮 refactor: Move the Steer POST into useSubmitSteer with Core Helpers (#17124) 2026-10-15 16:29:11 +02:00
Marco Beretta
10ff7b3757
🪡 refactor: Split Queue Receipts, Rows and Composer Takes out of useSteering (#17122) 2026-10-15 16:28:13 +02:00
Marco Beretta
d1c06145ab
🧭 refactor: Move Steer and Queue Pure Logic into the Chat Core (#17107) 2026-10-15 15:49:27 +02:00
Marco Beretta
1e23b3545b
📝 refactor: Move Text-Like Message Parts Into @librechat/chat (#17087)
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/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
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
Main Promotion Policy Tests / Main promotion denial and fast-forward tests (push) Has been cancelled
* refactor: Move text-like message parts into @librechat/chat

Text, EmptyText, CollapsibleText, Summary and AgentUpdate move into the package's components entry with their unit specs and read the app only through MessagePartsHost, which gains renderMarkdown, useSmoothStreaming, useAgent and renderAgentIcon. The app's markdown and agent-icon renderers register from the Parts barrel, so the host module keeps its import graph.

The design-suppression runner compares a moved file's diagnostics by their first sentence: the remedy that follows names app-only compositions for client paths, so the same violation read as new after a move.

* test: Cover text-like parts rendered from @librechat/chat in the browser
2026-10-14 18:05:48 +02:00
Marco Beretta
a30b11b4c7
🧩 refactor: Route Message Parts Through a @librechat/chat Part Dispatcher and Host (#16976) 2026-10-14 11:10:28 +02:00
Marco Beretta
8829a3975c
🗳️ feat: Approval-Responded, Output-Denied and Ask-User Parts in the UI Message View (#16961)
* feat: Add Approval-Responded, Output-Denied and Ask-User Parts to the UI Message View

* refactor: Accept the Ask-User Pause in the Part Mapper Input Type

* fix: Keep the Reviewer's Output on a Respond Decision

* fix: Keep a Respond Decision's Output Successful When It Reads Like an Error
2026-10-12 16:03:26 +02:00
Marco Beretta
98c35b648b
🔁 refactor: Lift the Step Handler Into a Core reduceStep With an Effects Channel (#17000)
* refactor: Lift the step handler branches into a core reduceStep

The stepHandler branches move to @librechat/chat as reduceStep(state, event, ctx), with the per-run maps in a StreamState and every write outside the message list returned as a StepEffect. useStepHandler keeps the frame coalescing and applies the effects to the Jotai and Recoil stores.

The equivalence spec runs a frozen copy of the previous hook against the new binding on each recorded sequence and compares every channel they write.

* test: Pin the step reducer equivalence digests and drop the frozen handler

* test: Load the step reducer from the built chat core

* test: Type the equivalence fixtures to the event unions
2026-10-12 16:02:17 +02:00
Marco Beretta
e1b4e09d7c
🥟 ci: Type-Check Workspaces with bun check (#17009)
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/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
Main Promotion Policy Tests / Main promotion denial and fast-forward tests (push) Has been cancelled
* ci: Type-Check Workspaces with bun check

Make every workspace tsconfig valid under TypeScript 7 semantics while
staying clean on the installed tsc 5.9: explicit types arrays (TS 7 no
longer auto-includes node_modules/@types), es2017 target for
data-provider, rootDir for api specs that import client contracts, and
noUncheckedSideEffectImports off for the CSS and matchMedia mock imports.

Fix the four client type errors newer DOM and Intl libs expose, and drop
the fetch.preconnect copy in useRum that only existed to satisfy the
leaked @types/bun globals.

Switch the client typecheck script and the CI type-check steps to
bun check (Bun 1.4.3); tsc --noEmit stays available as typecheck:tsc.

* chore: Fall Back to tsc When bun check Is Unavailable

Add scripts/typecheck.mts, which runs bun check when the installed Bun
provides it and the repository's tsc otherwise, so contributors without
Bun can still type-check. The client typecheck script and the
static-checks TypeScript gate both resolve their checker through it,
keeping local runs on the same checker CI uses whenever Bun is present.

* ci: Type-Check the Chat Package Through the Shared Checker

* ci: Run the Type Check When Only the Shared Checker Changes

A change to scripts/typecheck.mts alone started neither frontend review
nor the static-checks TypeScript gate, so a broken resolver could merge
unexercised. Add it to the frontend-review triggers and to every
typecheck project's paths.

The suppression-baseline scenarios copy static-checks.mts into synthetic
roots; copy its new typecheck.mts import alongside i18n.mts so the runner
loads there. Add scenarios for the checker choice and its fallback.
2026-10-12 06:40:07 -04:00
Marco Beretta
bdc4bafce2
🚰 refactor: Move the Pure Stream Code into the @librechat/chat Core (#16979)
The step appliers, frame normalizer and SSE transport move from client/src/hooks/SSE into packages/chat/src/core with their specs, and the client imports them from @librechat/chat. The ask-user-question predicates the content applier reads move with them, and the client's approval module re-exports them so its consumers are unchanged.
2026-10-11 23:04:47 +02:00
Marco Beretta
c00c776e0e
📦 feat: Scaffold the @librechat/chat Package (#16964)
* feat: Scaffold the @librechat/chat package

Adds packages/chat with core, react and components entries, a tsdown build,
a node-environment jest config, turbo and root build wiring, import boundary
rules, design-lint scope, and core types for the chat transport, stream,
host and status. No code moves yet.

* test: Cover the @librechat/chat boundaries as scenarios

* fix: Run the chat suite in test:turbo and build it for the mock lane

test:turbo now selects @librechat/chat, the mock e2e job builds the package the
chat-package scenarios load, and the synthetic repository in the suppression
scenarios carries the packages/chat/src root lint:design:record names.

* chore: Build the chat package in frontend:ci too

* chore: Run the chat suite in test:all

* fix: Hold core TSX to the chat boundary and scan the package for cycles

* fix: Apply the chat import boundary to JavaScript sources

* fix: Keep nested core files off the components entry

* fix: Close the remaining chat package gates and fence aborts by generation

Blocks imports through the @librechat/frontend workspace name, adds the chat
sources to the i18n scan, the CSS color gate and the client Tailwind content,
and lets ChatAbortRequest carry the generation it means to stop.

* fix: Keep JSX out of the chat core and carry abort and reconnect outcomes

Rejects JSX under the core, copies the chat manifest before the Docker
install, keys the client app build caches on the chat sources, fences
reconnects by generation, and types the abort result the transport returns.

* test: Give the CSS gate's scratch tree the chat root it now scans

* fix: Close the remaining @librechat/chat gates and wiring

Rejects import() and require() across the package boundaries, holds chat
components to the literal-copy rule, compiles TSX in the package's jest
transform, builds the package in Frontend Unit Tests, requires its test job for
main promotion, adds it to the unused-dependency scan, and lists it wherever a
sibling workspace is listed: Dockerfile.multi, the docker smoke paths, the
remaining node_modules caches, the reinstall helper, the bun build chain and
AGENTS.md.

* fix: Tighten the chat boundaries and carry steering and Assistants aborts

Template-literal import() and require() and self-imports through the package
name are rejected, user-facing JSX attributes need localized text, the cycle
scan resolves self-imports, Dockerfile.multi builds the package for the client
stage, and the transport carries steer, cancelSteer, armSteer and the
Assistants abort key.

* feat: Match the chat transport and host contracts to the client's

The transport now reports settled and replaced starts, the stream's protocol
version and resumed flag, reconnect replay, generation status, paused-run
resume with approvals or answers, abort and steer protocol versions, and the
request error shape. The host config and auth carry what the client's
ChatSettings now supplies: rename-while-running, model specs, retention mode
and the user.

* fix: Keep lazy React-entry loads out of the core and type the Assistants stop

Relative import() and require() of the /react entry from core are rejected,
and an abortKey stop resolves to the terminal conversation and run messages the
Assistants route returns.

* fix: Fence start controls by protocol and close extension-bearing entry loads

Settled and replaced start results carry the protocol version, core loads of
the /react or /components entry with a file extension are rejected, and
test:packages:chat builds data-provider first.
2026-10-10 21:00:10 +02:00