[PR #317] [MERGED] fix(deepagents, quickjs): read store from runtime/config.store instead of config.configurable #351

Closed
opened 2026-06-05 17:22:46 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/317
Author: @hntrl
Created: 3/17/2026
Status: Merged
Merged: 3/17/2026
Merged by: @hntrl

Base: mainHead: hunter/store-propagation-again


📝 Commits (1)

  • fa0de49 fix(deepagents, quickjs): read store from runtime/config.store instead of config.configurable

📊 Changes

6 files changed (+23 additions, -19 deletions)

View changed files

.changeset/store-propagation-fix.md (+8 -0)
📝 libs/deepagents/src/backends/composite.test.ts (+4 -8)
📝 libs/deepagents/src/backends/state.test.ts (+1 -1)
📝 libs/deepagents/src/backends/store.test.ts (+2 -3)
📝 libs/deepagents/src/middleware/fs.ts (+2 -4)
📝 libs/providers/quickjs/src/middleware.ts (+6 -3)

📄 Description

Summary

Fix store propagation in filesystem and QuickJS middleware to use properly typed access paths instead of reaching into internal configurable fields.

Changes

deepagentslibs/deepagents/src/middleware/fs.ts

The filesystem middleware was accessing the store via request.config.store with @ts-expect-error suppressions. This worked by accident because LangGraph happened to attach the store there, but it wasn't part of the typed contract. Updated both call sites in createFilesystemMiddleware to read from request.runtime.store instead, which is the intended propagation path. This removes two @ts-expect-error comments.

@langchain/quickjslibs/providers/quickjs/src/middleware.ts

The QuickJS middleware was reading the store from config.configurable.__pregel_store, an internal/private LangGraph field. Updated to use config.store, which is the public API exposed by LangGraphRunnableConfig. Added the LangGraphRunnableConfig type import and annotated the tool callback parameter for proper typing.

Test updates

Updated tests in composite.test.ts, state.test.ts, and store.test.ts to pass the store via runtime: { store } instead of config: { store }, matching the new propagation path.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/317 **Author:** [@hntrl](https://github.com/hntrl) **Created:** 3/17/2026 **Status:** ✅ Merged **Merged:** 3/17/2026 **Merged by:** [@hntrl](https://github.com/hntrl) **Base:** `main` ← **Head:** `hunter/store-propagation-again` --- ### 📝 Commits (1) - [`fa0de49`](https://github.com/langchain-ai/deepagentsjs/commit/fa0de49308c4fec231e5290fcf7e2ce38388f0eb) fix(deepagents, quickjs): read store from runtime/config.store instead of config.configurable ### 📊 Changes **6 files changed** (+23 additions, -19 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/store-propagation-fix.md` (+8 -0) 📝 `libs/deepagents/src/backends/composite.test.ts` (+4 -8) 📝 `libs/deepagents/src/backends/state.test.ts` (+1 -1) 📝 `libs/deepagents/src/backends/store.test.ts` (+2 -3) 📝 `libs/deepagents/src/middleware/fs.ts` (+2 -4) 📝 `libs/providers/quickjs/src/middleware.ts` (+6 -3) </details> ### 📄 Description ## Summary Fix store propagation in filesystem and QuickJS middleware to use properly typed access paths instead of reaching into internal configurable fields. ## Changes ### `deepagents` — `libs/deepagents/src/middleware/fs.ts` The filesystem middleware was accessing the store via `request.config.store` with `@ts-expect-error` suppressions. This worked by accident because LangGraph happened to attach the store there, but it wasn't part of the typed contract. Updated both call sites in `createFilesystemMiddleware` to read from `request.runtime.store` instead, which is the intended propagation path. This removes two `@ts-expect-error` comments. ### `@langchain/quickjs` — `libs/providers/quickjs/src/middleware.ts` The QuickJS middleware was reading the store from `config.configurable.__pregel_store`, an internal/private LangGraph field. Updated to use `config.store`, which is the public API exposed by `LangGraphRunnableConfig`. Added the `LangGraphRunnableConfig` type import and annotated the tool callback parameter for proper typing. ### Test updates Updated tests in `composite.test.ts`, `state.test.ts`, and `store.test.ts` to pass the store via `runtime: { store }` instead of `config: { store }`, matching the new propagation path. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 17:22:46 -04:00
yindo closed this issue 2026-06-05 17:22:46 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#351