[PR #441] [CLOSED] feat: namespace factory support with BackendContext backwards compat #466

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/441
Author: @open-swe[bot]
Created: 4/8/2026
Status: Closed

Base: mainHead: open-swe/086c3d27-2ff0-ebf5-5d74-4d35e38083c5


📝 Commits (1)

  • e2f246d feat: add NamespaceFactory type and BackendContext backwards-compat wrapper

📊 Changes

5 files changed (+321 additions, -23 deletions)

View changed files

📝 libs/deepagents/src/backends/index.ts (+2 -1)
📝 libs/deepagents/src/backends/protocol.ts (+78 -0)
📝 libs/deepagents/src/backends/store.test.ts (+204 -2)
📝 libs/deepagents/src/backends/store.ts (+35 -20)
📝 libs/deepagents/src/index.ts (+2 -0)

📄 Description

Description

Ports the Python namespace API change (langchain-ai/docs#3496) to JS. StoreBackend.namespace now accepts a NamespaceFactory function (rt: Runtime) => string[] in addition to a static string[]. A BackendContext backwards-compat wrapper lets legacy (ctx) => [ctx.runtime.serverInfo...] factories keep working with a deprecation warning, following JS best practices for the migration path.

Test Plan

  • Verify namespace factory resolves dynamically from LangGraph Runtime (serverInfo, executionInfo, context)
  • Verify legacy BackendContext-style factories emit deprecation warning and still work
  • Verify static string[] namespaces continue to work unchanged

Opened collaboratively by Sydney Runkle and open-swe.


🔄 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/441 **Author:** [@open-swe[bot]](https://github.com/apps/open-swe) **Created:** 4/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `open-swe/086c3d27-2ff0-ebf5-5d74-4d35e38083c5` --- ### 📝 Commits (1) - [`e2f246d`](https://github.com/langchain-ai/deepagentsjs/commit/e2f246d633de95007c78e96129c0db559a4341ee) feat: add NamespaceFactory type and BackendContext backwards-compat wrapper ### 📊 Changes **5 files changed** (+321 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `libs/deepagents/src/backends/index.ts` (+2 -1) 📝 `libs/deepagents/src/backends/protocol.ts` (+78 -0) 📝 `libs/deepagents/src/backends/store.test.ts` (+204 -2) 📝 `libs/deepagents/src/backends/store.ts` (+35 -20) 📝 `libs/deepagents/src/index.ts` (+2 -0) </details> ### 📄 Description ## Description Ports the Python namespace API change (langchain-ai/docs#3496) to JS. `StoreBackend.namespace` now accepts a `NamespaceFactory` function `(rt: Runtime) => string[]` in addition to a static `string[]`. A `BackendContext` backwards-compat wrapper lets legacy `(ctx) => [ctx.runtime.serverInfo...]` factories keep working with a deprecation warning, following JS best practices for the migration path. ## Test Plan - [ ] Verify namespace factory resolves dynamically from LangGraph Runtime (serverInfo, executionInfo, context) - [ ] Verify legacy BackendContext-style factories emit deprecation warning and still work - [ ] Verify static string[] namespaces continue to work unchanged _Opened collaboratively by Sydney Runkle and open-swe._ --- <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:23:17 -04:00
yindo closed this issue 2026-06-05 17:23:17 -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#466