* fix(deepagents): update summarization behavior
* actually use deepagent summarization middleware
* Update summarization behavior for deepagents
* make it work
* format
* fix pnpm-lock
* feat(standard-tests): make test suite framework-agnostic and publish as public package
Move @langchain/sandbox-standard-tests from internal/ to libs/ for
publishing. The test suite no longer hard-depends on Vitest — test-runner
primitives (describe, it, expect, beforeAll, afterAll) are supplied via
a `runner` config property, letting consumers use any framework.
A convenience sub-export at @langchain/sandbox-standard-tests/vitest
pre-fills the runner with Vitest primitives for zero-config usage.
* format
* no underscore
* adding copies of license files
* adding changesets
* add build step
* fix test
* fix(deepagents): unwrap responseFormat strategy types so structuredResponse is correctly typed
Previously, passing responseFormat to createDeepAgent would leak the
strategy wrapper type (e.g. ToolStrategy<{ city: string }>) into the
agent's structuredResponse property instead of the inner parsed type
({ city: string }). This adds an InferStructuredResponse utility type
that extracts T from ToolStrategy<T> / ProviderStrategy<T>, and resolves
to ResponseFormatUndefined when no responseFormat is provided.
Also adds integration tests covering toolStrategy, providerStrategy,
combined tools + responseFormat, nested schemas, and subagents with
structured output.
* format
* Create stale-planes-breathe.md
* improve tests
* update deps
* add type tests
* fix(skills): use systemMessage.concat() instead of systemPrompt string
* style: fix Prettier formatting in skills.test.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(skills): update integration tests to use systemMessage API
The integration tests were using the old systemPrompt string API
but wrapModelCall now uses request.systemMessage.concat(). Updated
tests to pass SystemMessage objects and read from systemMessage.text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Anton Nakaliuzhnyi <anakaliuzhnyi@gipartners.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* 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
* 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
* 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
* 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>
* 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
* 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
* 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
* 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
* 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