[PR #103] [MERGED] fix(deepagents): improve type inference #122

Closed
opened 2026-02-16 06:17:13 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/103
Author: @christian-bromann
Created: 1/10/2026
Status: Merged
Merged: 1/10/2026
Merged by: @christian-bromann

Base: mainHead: cb/type-fixes


📝 Commits (3)

  • 06b6d61 fix(deepagents): properly implement type inferrence
  • f7a2c7c recognise built-in middleware
  • 51327e8 make it a type test

📊 Changes

8 files changed (+382 additions, -80 deletions)

View changed files

libs/deepagents/src/agent.test-d.ts (+149 -0)
📝 libs/deepagents/src/agent.ts (+87 -66)
📝 libs/deepagents/src/index.ts (+2 -1)
📝 libs/deepagents/src/middleware/index.test.ts (+3 -3)
📝 libs/deepagents/src/middleware/skills.ts (+7 -4)
📝 libs/deepagents/src/middleware/subagents.ts (+2 -4)
📝 libs/deepagents/src/testing/utils.ts (+7 -2)
libs/deepagents/src/types.ts (+125 -0)

📄 Description

Currently types are broken in deepagents as we don't properly pass on / infer types from passed in middleware. This patch improves the whole type system from the createDeepAgent function, properly allowing state schema types to trickle down to the invoke result. I added a type test to ensure we don't regress here in the future.


🔄 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/103 **Author:** [@christian-bromann](https://github.com/christian-bromann) **Created:** 1/10/2026 **Status:** ✅ Merged **Merged:** 1/10/2026 **Merged by:** [@christian-bromann](https://github.com/christian-bromann) **Base:** `main` ← **Head:** `cb/type-fixes` --- ### 📝 Commits (3) - [`06b6d61`](https://github.com/langchain-ai/deepagentsjs/commit/06b6d619fc855a98a0ae11d08a55c6401c9ddd4f) fix(deepagents): properly implement type inferrence - [`f7a2c7c`](https://github.com/langchain-ai/deepagentsjs/commit/f7a2c7ce3c0b57c2da84576985291d2642ed6127) recognise built-in middleware - [`51327e8`](https://github.com/langchain-ai/deepagentsjs/commit/51327e874475d1818803bda125e2818199088070) make it a type test ### 📊 Changes **8 files changed** (+382 additions, -80 deletions) <details> <summary>View changed files</summary> ➕ `libs/deepagents/src/agent.test-d.ts` (+149 -0) 📝 `libs/deepagents/src/agent.ts` (+87 -66) 📝 `libs/deepagents/src/index.ts` (+2 -1) 📝 `libs/deepagents/src/middleware/index.test.ts` (+3 -3) 📝 `libs/deepagents/src/middleware/skills.ts` (+7 -4) 📝 `libs/deepagents/src/middleware/subagents.ts` (+2 -4) 📝 `libs/deepagents/src/testing/utils.ts` (+7 -2) ➕ `libs/deepagents/src/types.ts` (+125 -0) </details> ### 📄 Description Currently types are broken in deepagents as we don't properly pass on / infer types from passed in middleware. This patch improves the whole type system from the `createDeepAgent` function, properly allowing state schema types to trickle down to the invoke result. I added a type test to ensure we don't regress here in the future. --- <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-02-16 06:17:13 -05:00
yindo closed this issue 2026-02-16 06:17:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#122