[PR #244] [MERGED] feat(deepagents): add namespace option to StoreBackend #292

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/244
Author: @hntrl
Created: 2/23/2026
Status: Merged
Merged: 2/23/2026
Merged by: @hntrl

Base: mainHead: hunter/state-and-store-issue


📝 Commits (3)

📊 Changes

6 files changed (+282 additions, -12 deletions)

View changed files

.changeset/store-namespace-option.md (+11 -0)
📝 libs/deepagents/src/backends/index.ts (+1 -1)
📝 libs/deepagents/src/backends/store.test.ts (+94 -1)
📝 libs/deepagents/src/backends/store.ts (+82 -10)
📝 libs/deepagents/src/index.ts (+1 -0)
📝 libs/deepagents/src/middleware/fs.int.test.ts (+93 -0)

📄 Description

Summary

This PR simplifies StoreBackend namespacing by removing the extra factory layer and making the namespace an explicit string[] option. The backend factory passed to createDeepAgent already provides the dynamic context needed, so consumers can compute namespaces there and pass a static array into StoreBackend without additional indirection.

Key changes:

  • StoreBackend now accepts namespace?: string[] and validates components for safe characters and non‑empty values.
  • The legacy assistantId fallback namespace is preserved for backwards compatibility when no custom namespace is provided.
  • Removed the earlier namespace factory/context types in favor of the simpler array‑based option.
  • Added integration tests that simulate cloud deployment by injecting store via invoke config, proving propagation through createAgent/createDeepAgent.

🔄 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/244 **Author:** [@hntrl](https://github.com/hntrl) **Created:** 2/23/2026 **Status:** ✅ Merged **Merged:** 2/23/2026 **Merged by:** [@hntrl](https://github.com/hntrl) **Base:** `main` ← **Head:** `hunter/state-and-store-issue` --- ### 📝 Commits (3) - [`e978d1f`](https://github.com/langchain-ai/deepagentsjs/commit/e978d1f3bc8584f12a4c0876476d80e7a521fee3) Add StoreBackend namespace option - [`9473881`](https://github.com/langchain-ai/deepagentsjs/commit/9473881c0cd9f6b4268449f25371fa821b83c8b4) cr - [`65720bb`](https://github.com/langchain-ai/deepagentsjs/commit/65720bb4389f16e569ce39499b18f3f74322a99f) cr ### 📊 Changes **6 files changed** (+282 additions, -12 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/store-namespace-option.md` (+11 -0) 📝 `libs/deepagents/src/backends/index.ts` (+1 -1) 📝 `libs/deepagents/src/backends/store.test.ts` (+94 -1) 📝 `libs/deepagents/src/backends/store.ts` (+82 -10) 📝 `libs/deepagents/src/index.ts` (+1 -0) 📝 `libs/deepagents/src/middleware/fs.int.test.ts` (+93 -0) </details> ### 📄 Description ## Summary This PR simplifies StoreBackend namespacing by removing the extra factory layer and making the namespace an explicit `string[]` option. The backend factory passed to `createDeepAgent` already provides the dynamic context needed, so consumers can compute namespaces there and pass a static array into `StoreBackend` without additional indirection. Key changes: - `StoreBackend` now accepts `namespace?: string[]` and validates components for safe characters and non‑empty values. - The legacy `assistantId` fallback namespace is preserved for backwards compatibility when no custom namespace is provided. - Removed the earlier namespace factory/context types in favor of the simpler array‑based option. - Added integration tests that simulate cloud deployment by injecting `store` via invoke config, proving propagation through `createAgent`/`createDeepAgent`. --- <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:33 -04:00
yindo closed this issue 2026-06-05 17:22:33 -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#292