deepagents 1.14.0 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2683,10 +2683,11 @@ function createFilesystemMiddleware(options = {}) {
2683
2683
  ...runtime,
2684
2684
  state
2685
2685
  });
2686
- const evictPath = `/large_tool_results/${sanitizeToolCallId(fallbackToolCallId || msg.tool_call_id)}.txt`;
2686
+ const sanitizedId = sanitizeToolCallId(fallbackToolCallId || msg.tool_call_id);
2687
+ const evictPath = `/large_tool_results/${new TextEncoder().encode(sanitizedId).length > 128 ? `call-${crypto.randomUUID()}` : sanitizedId}.txt`;
2687
2688
  const writeResult = await resolvedBackend.write(evictPath, textContent);
2688
2689
  const contentSample = createContentPreview(textContent);
2689
- const replacementText = writeResult.error ? `Tool result too large, but the result could not be saved to the filesystem: ${writeResult.error}` : TOO_LARGE_TOOL_MSG.replace("{tool_call_id}", msg.tool_call_id).replace("{file_path}", evictPath).replace("{content_sample}", contentSample);
2690
+ const replacementText = writeResult.error ? `Tool result too large, but the result could not be saved to the filesystem: ${writeResult.error}` : TOO_LARGE_TOOL_MSG.replace("{tool_call_id}", msg.tool_call_id.length > 32 ? `${msg.tool_call_id.slice(0, 32)}...` : msg.tool_call_id).replace("{file_path}", evictPath).replace("{content_sample}", contentSample);
2690
2691
  return {
2691
2692
  message: new langchain.ToolMessage({
2692
2693
  content: replacementText,
@@ -9227,4 +9228,4 @@ Object.defineProperty(exports, "skillsMetadataValue", {
9227
9228
  }
9228
9229
  });
9229
9230
 
9230
- //# sourceMappingURL=langsmith-C9zNPKIz.cjs.map
9231
+ //# sourceMappingURL=langsmith-Bhg_Q4ZO.cjs.map