Commit Graph

56 Commits

Author SHA1 Message Date
github-actions[bot] 7cf506eee6 chore: version packages (#196)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-06 13:31:18 -08:00
Christian Bromann 731b01ed17 fix(deepagents): polish sandbox interfaces (#194)
* fix(deepagents): polish sandbox interfaces

* revert

* global ref

* format

* changesets

* tweak CI

* fix
2026-02-06 13:27:10 -08:00
Christian Bromann d31f6cbff5 test(sandbox): add standard tests for all provider (#195)
* test(sandbox): add standard tests for all provider

* cr

* fix: allow to clean all daytona sandboxes

* apply CI labels

* withRetry

* bump retry

* format

* cr

* cr

* tweak CI
2026-02-06 13:13:52 -08:00
github-actions[bot] e1a9a62d12 chore: version packages (#192)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-04 22:57:14 -08:00
Christian Bromann cf32056c32 fix: peerdep 2026-02-04 22:54:52 -08:00
Christian Bromann b7c32ee168 fix: add 0.0.1 changelog entries for provider packages 2026-02-04 22:40:27 -08:00
Christian Bromann a18575f9f7 fix: create empty changeset files 2026-02-04 22:28:14 -08:00
Christian Bromann 0d3aa48230 feat(daytona): adding sandbox integration (#188)
* feat: add support for Vercel sandbox

* format

* switch to deno

* cr

* format

* rename

* format

* auto bump peer dep

* format

* feat(daytona): adding sandbox integration

* format

* test fix

* format

* add support for

* add changesets

* feat: add modal sandbox (#190)

* feat: add modal sandbox

* chore: format

* cr

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-02-04 22:11:38 -08:00
Christian Bromann 988b44c129 feat: add SandboxProvider abstraction (#165)
* feat: add support for Vercel sandbox

* format

* switch to deno

* cr

* format

* feat: add support for Vercel sandbox

* feat: add VFS sandbox

* format

* rm vercel

* rename

* format

* rename

* feat: add support for Vercel sandbox

* format

* switch to deno

* cr

* feat: add support for Vercel sandbox

* feat: add VFS sandbox

* format

* rm vercel

* rename

* rename

* feat: add support for Vercel sandbox

* feat: support for sandbox provider

* not needed

* format

* add changeset

* missed file

* tweak

* format

* change changeset
2026-02-04 21:49:22 -08:00
Christian Bromann 2789ebd9d9 feat: add VFS sandbox (#163)
* feat: add support for Vercel sandbox

* format

* switch to deno

* cr

* format

* feat: add support for Vercel sandbox

* feat: add VFS sandbox

* format

* rm vercel

* rename

* format

* rename

* skip if on windows
2026-02-04 21:35:46 -08:00
Christian Bromann c0e676a1a5 feat: add support for Deno sandbox (#162)
* feat: add support for Vercel sandbox

* format

* switch to deno

* cr

* format

* rename

* format

* remove skip

* feedback

* Apply suggestion from @hntrl

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>

* auto bump peer dep

* format

* fix lock file

* add jiti

* add support for initialFiles

* include provider integration tests

* use DENO_DEPLOY_TOKEN

* add changeset

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-02-04 21:10:28 -08:00
Christian Bromann 07b91219e4 fix(summarization): resolve fraction trigger bug by using model profile for maxInputTokens (#189)
* fix(summarization): resolve fraction trigger bug by using model profile for maxInputTokens

The fraction-based trigger in createSummarizationMiddleware was always
ineffective because maxInputTokens was never passed to the internal
functions that needed it.

fixes #185

* fix type
2026-02-04 17:06:15 -08:00
Christian Bromann d7cc7f4d92 feat(deepagents): support skills in subagents (#187)
* feat(deepagents): support skills in subagents

* better check for runnable

* improve testing

* format
2026-02-04 17:01:52 -08:00
Christian Bromann 2380fc1317 fix(deepagents): grep should perform literal search instead of regex (#186) 2026-02-04 17:01:38 -08:00
Christian Bromann 9ce0db10e4 chore(deepagents): minor Readme tweaks 2026-02-04 14:41:02 -08:00
Youngho Kim 1a902db31f chore: migrate to use SystemMessage and add tests for filesystem middleware (#184)
* refactor: migrate filesystem middleware to use SystemMessage

Refactor `createFilesystemMiddleware` to use `systemMessage.concat()` instead of string concatenation with `systemPrompt`. This aligns with the pattern established in the memory middleware and provides better type safety.

Add comprehensive test coverage for `wrapModelCall` including:
- System prompt injection behavior
- Conditional execute tool registration based on backend support
- Custom system prompt handling

* test: add comprehensive wrapToolCall tests for filesystem middleware

Add test coverage for the wrapToolCall functionality in the filesystem middleware:
- Test pass-through behavior when eviction is disabled
- Test that tools in TOOLS_EXCLUDED_FROM_EVICTION are not evicted regardless of size
- Test that small tool results are not evicted
- Test eviction of large ToolMessage results to filesystem
- Test handling of Command objects with multiple ToolMessages
- Test graceful error handling when backend write fails during eviction
2026-02-04 11:04:26 -08:00
github-actions[bot] 72c3b18d09 chore: version packages (#182)
* chore: version packages

* cr

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-02-04 03:14:33 +00:00
Hunter Lovell 063436e0a0 feat: set default recursionLimit to 10k (#183)
* feat: set default recursionLimit to 10k

* chore: format

* chore: fixup bad test
2026-02-03 19:11:23 -08:00
Youngho Kim 9f77da4723 refactor: migrate memory middleware to use SystemMessage (#178)
* refactor(deepagents): migrate memory middleware to use SystemMessage

Update memory middleware to use SystemMessage class instead of string-based systemPrompt. This change aligns the middleware with the updated request interface and provides better type safety.

- Replace systemPrompt string with SystemMessage object in memory.ts
- Use SystemMessage.concat() method for combining memory section with existing system message
- Update all test cases to use SystemMessage constructor and .text property for assertions

* add changeset

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-02-03 16:18:50 -08:00
Maahir Sachdev 3cc53264db refactor: Add shared filesValue state primitive (#181)
* Add shared filesValue

* lint
2026-02-03 16:18:26 -08:00
github-actions[bot] 41f1e38f65 chore: version packages (#164)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-02 22:40:11 -08:00
Christian Bromann 90ade665a3 fix(deepagents): fix type issues (#174)
* fix(deepagents): fix type issues

* fix types

* minor tweak
2026-02-02 22:35:00 -08:00
Christian Bromann 7038d247a8 fix(deepagents): resolve dangling tool_call_id when rejecting parallel tool calls (#173)
* fix(deepagents): resolve dangling tool_call_id when rejecting parallel tool calls

* type improvements

* format
2026-02-02 21:41:32 -08:00
Christian Bromann dff8977d20 fix(deepagents): remove obsolete import 2026-02-02 21:15:52 -08:00
Maahir Sachdev e4f9f8d8c8 fix: missing files in skillsMiddleware schema (#160)
* fix missing files in skillsMiddleware

* Update tests

* Add integration tests + fixes

* Restore skills.test.ts from main

* Update tests to unit from integration

* Update unit tests

* fix test

* changeset
2026-02-02 21:11:51 -08:00
Christian Bromann c674c619cd fix(deepagents): prevent infinite loop when read_file returns large content (#172)
* fix(deepagents): prevent infinite loop when read_file returns large content (#82)

When a tool returned a large result with few but very long lines, the
agent could enter an infinite eviction/read loop. The content would be
evicted to the filesystem, then read_file would return all the content
(since it only had a line limit, not a character limit), which would
again exceed the eviction threshold.

fixes #82

* export FileData from right place

* add changesets
2026-02-02 21:10:56 -08:00
Christian Bromann 52675bd939 fix(deepagents): handle empty oldString in performStringReplacement (#170)
* fix: handle empty oldString in performStringReplacement (#161)

When both file content and oldString are empty, `content.split("")`
returns an empty array, causing `occurrences` to be -1 and returning
an invalid success response.

This change:
- Adds special case handling for empty files: when both content and
  oldString are empty, treat it as "set initial content" and return
  [newString, 0]
- Returns a clear error when oldString is empty but file has content
- Adds comprehensive tests for empty oldString scenarios

This allows users to edit empty files by passing oldString="" with
their desired content, while preventing ambiguous empty replacements
on non-empty files.

fixes #161

* retrigger
2026-02-02 21:08:30 -08:00
Christian Bromann e6d895bdf9 fix(middleware): avoid unnecessary REMOVE_ALL_MESSAGES in PatchToolCallsMiddleware (#169)
* fix(middleware): avoid unnecessary REMOVE_ALL_MESSAGES in PatchToolCallsMiddleware

The middleware was unconditionally triggering REMOVE_ALL_MESSAGES on every
request, even when there were no dangling tool calls to patch. This caused
unnecessary frontend re-renders and UI flickering when using useStream with
fetchStateHistory: true.

Added a needsPatch flag to track whether any dangling tool calls are found,
and only trigger the state rebuild when patching is actually needed.

Fixes #127

* retrigger

* fix test

* add changeset
2026-02-02 21:08:12 -08:00
Maahir Sachdev 0fe09a51de fix: missing files/memoryContents in memory middleware (#159)
* Update memory state schmea

* Update tests

* Update testing

* changeset

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-02-02 20:07:59 -08:00
Youngho Kim 0ef8362f80 test(deepagents): add unit tests for createPatchToolCallsMiddleware (#168) 2026-02-02 10:28:37 -08:00
Christian Bromann 0b65b09864 fix(deepagents): copy LICENSE file into published package 2026-02-01 19:14:00 -08:00
dependabot[bot] 9acbdca34d build(deps-dev): bump the minor-deps-updates-main group across 1 directory with 5 updates (#152)
Bumps the minor-deps-updates-main group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [globals](https://github.com/sindresorhus/globals) | `17.0.0` | `17.2.0` |
| [prettier](https://github.com/prettier/prettier) | `3.7.4` | `3.8.1` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.53.1` | `8.54.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.0.10` | `25.1.0` |
| [tsdown](https://github.com/rolldown/tsdown) | `0.19.0` | `0.20.1` |



Updates `globals` from 17.0.0 to 17.2.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.0.0...v17.2.0)

Updates `prettier` from 3.7.4 to 3.8.1
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.7.4...3.8.1)

Updates `typescript-eslint` from 8.53.1 to 8.54.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.54.0/packages/typescript-eslint)

Updates `@types/node` from 25.0.10 to 25.1.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `tsdown` from 0.19.0 to 0.20.1
- [Release notes](https://github.com/rolldown/tsdown/releases)
- [Commits](https://github.com/rolldown/tsdown/compare/v0.19.0...v0.20.1)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-deps-updates-main
- dependency-name: prettier
  dependency-version: 3.8.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-deps-updates-main
- dependency-name: typescript-eslint
  dependency-version: 8.54.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-deps-updates-main
- dependency-name: "@types/node"
  dependency-version: 25.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-deps-updates-main
- dependency-name: tsdown
  dependency-version: 0.20.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-deps-updates-main
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-30 09:31:08 -08:00
github-actions[bot] fa41f08580 chore: version packages (#151)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-28 10:55:12 -08:00
Christian Bromann 8a92e572ea fix(deepagents): use new StateSchema class (#145)
* fix(deepagents): use new StateSchema class

* format

* fix bundling

* run unit tests also in windows

* revert

* fix windows test issue

* bump lc

* bump lc

* path normalization
2026-01-28 10:52:38 -08:00
github-actions[bot] eb79cdc1e7 chore: version packages (#140)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-23 13:24:49 -08:00
Christian Bromann ef821a7d7b feat(deepagents): align JS implementation with Python deepagents (#139)
* feat(deepagents): align JS implementation with Python deepagents

This commit addresses divergences between the JavaScript and Python
implementations of the deepagents library, porting several features
from Python and adding comprehensive test coverage.

Changes:

Deprecation:
- Mark `createAgentMemoryMiddleware` as deprecated in favor of
  `createMemoryMiddleware` which uses BackendProtocol abstraction

Filesystem middleware (fs.ts):
- Port comprehensive tool descriptions from Python's filesystem.py
- Add TOOLS_EXCLUDED_FROM_EVICTION constant for eviction control
- Add NUM_CHARS_PER_TOKEN constant for token estimation
- Add createContentPreview() for showing head/tail of large results
- Update eviction logic to skip excluded tools and show content preview

Path validation (backends/utils.ts):
- Add validateFilePath() with security checks for path traversal
- Reject Windows absolute paths and tilde expansion
- Support allowedPrefixes validation

Skills middleware (skills.ts):
- Show "(higher priority)" indicator for last source in locations
- Display allowedTools in skill list when specified

Summarization middleware (summarization.ts):
- Port SummarizationMiddleware from Python with backend offloading
- Support conversation history persistence to filesystem
- Add tool argument truncation for old messages
- Re-export base summarizationMiddleware from langchain

Middleware utilities (utils.ts):
- Add appendToSystemMessage() helper
- Add prependToSystemMessage() helper

* format

* fix test
2026-01-23 13:22:31 -08:00
github-actions[bot] 5596fa1e68 chore: version packages (#135)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-22 13:25:31 -08:00
Christian Bromann 0fa85f6169 chore(deepagents): update deps and re-establish old interfaces (#133)
* chore(deepagents): update deps

* add changeset

* re-estebalish old interfaces

* format

* skip new integration test for now
2026-01-22 13:20:07 -08:00
github-actions[bot] de2b4f1bec chore: version packages (#126)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-16 12:53:36 -08:00
Christian Bromann 06a2631b9e fix(deepagents): align with Python interfaces (#125)
* fix(deepagents): align with Python interfaces

* fix test

* cr

* add changelog
2026-01-16 12:46:10 -08:00
Christian Bromann 67018b2443 fix(deepagents): port backend agnostic skills (#124)
* fix(deepagents): port backend agnostic skills

* update test
2026-01-16 10:58:05 -08:00
Christian Bromann c648cd67b5 feat(deepagents): add MemoryMiddleware for AGENTS.md support (#123)
* feat(deepagents): add MemoryMiddleware for AGENTS.md support

Port of langchain-ai/deepagents#646 to TypeScript.

Adds MemoryMiddleware that loads persistent context from AGENTS.md files
following the agents.md specification. Unlike skills (which are on-demand),
memory is always loaded at agent startup and injected into the system prompt.

Changes:
- Add createMemoryMiddleware in middleware/memory.ts
- Add `memory` parameter to createDeepAgent for automatic middleware setup
- Export MemoryMiddleware from package index
- Add unit tests for memory loading and prompt injection

Usage:
const agent = createDeepAgent({
  memory: [
    "~/.deepagents/AGENTS.md",
    "./.deepagents/AGENTS.md",
  ],
});

* add example
2026-01-16 10:53:39 -08:00
github-actions[bot] bdf9186a14 chore: version packages (#121)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-15 17:19:34 -08:00
Christian Bromann a70b29721e fix(deepagents): define type bag to better type extraction (#113)
* fix(deepagents): define type bag to better type extraction

* remove unnecessary generic param
2026-01-15 17:17:59 -08:00
dependabot[bot] 8740987427 build(deps-dev): bump the major-deps-updates-main group with 2 updates (#117)
Bumps the major-deps-updates-main group with 2 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid).


Updates `@types/node` from 22.19.3 to 25.0.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/uuid` from 10.0.0 to 11.0.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.0.7
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
- dependency-name: "@types/uuid"
  dependency-version: 11.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 14:13:18 -08:00
dependabot[bot] 391a047f99 build(deps-dev): bump the minor-deps-updates-main group with 2 updates (#116)
Bumps the minor-deps-updates-main group with 2 updates: [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) and [tsdown](https://github.com/rolldown/tsdown).


Updates `typescript-eslint` from 8.52.0 to 8.53.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.53.0/packages/typescript-eslint)

Updates `tsdown` from 0.15.12 to 0.19.0
- [Release notes](https://github.com/rolldown/tsdown/releases)
- [Commits](https://github.com/rolldown/tsdown/compare/v0.15.12...v0.19.0)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.53.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-deps-updates-main
- dependency-name: tsdown
  dependency-version: 0.19.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-deps-updates-main
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-13 12:39:32 -08:00
github-actions[bot] ddb1b444a5 chore: version packages (#110)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-10 21:23:59 -08:00
Christian Bromann 3e1151dc98 fix(internal): another readme fix (#108) 2026-01-10 21:17:46 -08:00
Christian Bromann 362f9401a6 fix(deepagents): update Readme.md (#107)
* fix(deepagents): update Readme.md

* use image from blog

* update docs link
2026-01-10 21:15:33 -08:00
Christian Bromann 3f5d99887f fix(deepagents): use proper ToolMessage.isInstance (#106) 2026-01-10 21:03:23 -08:00