deepagents 1.13.3 → 1.13.4-rc.0

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.
@@ -1,4 +1,4 @@
1
- import { AIMessage, HumanMessage, SystemMessage, ToolMessage, anthropicPromptCachingMiddleware, bedrockPromptCachingMiddleware, context, countTokensApproximately, createAgent, createMiddleware, humanInTheLoopMiddleware, todoListMiddleware, tool } from "langchain";
1
+ import { AIMessage, HumanMessage, SystemMessage, ToolMessage, anthropicPromptCachingMiddleware, bedrockPromptCachingMiddleware, context, countTokensApproximately, createAgent, createMiddleware, humanInTheLoopMiddleware, omitPayload, todoListMiddleware, tool } from "langchain";
2
2
  import { Command, REMOVE_ALL_MESSAGES, ReducedValue, StateSchema, getConfig, getCurrentTaskInput, getStore, isCommand } from "@langchain/langgraph";
3
3
  import { z } from "zod/v4";
4
4
  import micromatch from "micromatch";
@@ -2574,6 +2574,7 @@ function createFilesystemMiddleware(options = {}) {
2574
2574
  }
2575
2575
  return createMiddleware({
2576
2576
  name: "FilesystemMiddleware",
2577
+ tracePolicy: { processInputs: omitPayload },
2577
2578
  stateSchema: FilesystemStateSchema,
2578
2579
  tools: allTools,
2579
2580
  async beforeAgent(state) {
@@ -3313,6 +3314,7 @@ function createSummarizationMiddleware(options) {
3313
3314
  }
3314
3315
  return createMiddleware({
3315
3316
  name: "SummarizationMiddleware",
3317
+ tracePolicy: { processInputs: omitPayload },
3316
3318
  stateSchema: SummarizationStateSchema,
3317
3319
  async wrapModelCall(request, handler) {
3318
3320
  const effectiveMessages = getEffectiveMessages(request.messages ?? [], request.state);
@@ -3623,6 +3625,7 @@ const ForkedContextStateSchema = z.object({ [FORKED_CONTEXT_KEY]: z.boolean().op
3623
3625
  function createForkTaskToolMiddleware(taskTool) {
3624
3626
  return createMiddleware({
3625
3627
  name: "forkTaskToolMiddleware",
3628
+ tracePolicy: { processInputs: omitPayload },
3626
3629
  stateSchema: ForkedContextStateSchema,
3627
3630
  tools: [taskTool],
3628
3631
  beforeAgent: () => ({ [FORKED_CONTEXT_KEY]: true })
@@ -3858,6 +3861,7 @@ function createSubAgentMiddleware(options) {
3858
3861
  });
3859
3862
  return createMiddleware({
3860
3863
  name: "subAgentMiddleware",
3864
+ tracePolicy: { processInputs: omitPayload },
3861
3865
  tools: [taskTool],
3862
3866
  wrapModelCall: async (request, handler) => {
3863
3867
  if (systemPrompt !== null) return handler({
@@ -3962,6 +3966,7 @@ function patchDanglingToolCalls(messages) {
3962
3966
  function createPatchToolCallsMiddleware() {
3963
3967
  return createMiddleware({
3964
3968
  name: "patchToolCallsMiddleware",
3969
+ tracePolicy: { processInputs: omitPayload },
3965
3970
  beforeAgent: async (state) => {
3966
3971
  const messages = state.messages;
3967
3972
  if (!messages || messages.length === 0) return;
@@ -4323,6 +4328,7 @@ function createMemoryMiddleware(options) {
4323
4328
  const { backend, sources, addCacheControl = false } = options;
4324
4329
  return createMiddleware({
4325
4330
  name: "MemoryMiddleware",
4331
+ tracePolicy: { processInputs: omitPayload },
4326
4332
  stateSchema: MemoryStateSchema,
4327
4333
  async beforeAgent(state) {
4328
4334
  if ("memoryContents" in state && state.memoryContents != null) return;
@@ -4807,6 +4813,7 @@ function createSkillsMiddleware(options) {
4807
4813
  let loadedSkills = [];
4808
4814
  return createMiddleware({
4809
4815
  name: "SkillsMiddleware",
4816
+ tracePolicy: { processInputs: omitPayload },
4810
4817
  stateSchema: SkillsStateSchema,
4811
4818
  async beforeAgent(state) {
4812
4819
  const stateHasSkills = "skillsMetadata" in state && Array.isArray(state.skillsMetadata) && state.skillsMetadata.length > 0;
@@ -5051,6 +5058,7 @@ function createCompletionCallbackMiddleware(options) {
5051
5058
  }
5052
5059
  return createMiddleware({
5053
5060
  name: "CompletionCallbackMiddleware",
5061
+ tracePolicy: { processInputs: omitPayload },
5054
5062
  stateSchema: CompletionCallbackStateSchema,
5055
5063
  /**
5056
5064
  * After-agent hook: fires when the subagent completes successfully.
@@ -5592,6 +5600,7 @@ function createAsyncSubAgentMiddleware(options) {
5592
5600
  const fullSystemPrompt = systemPrompt ? `${systemPrompt}\n\nAvailable async subagent types:\n${agentsDescription}` : null;
5593
5601
  return createMiddleware({
5594
5602
  name: "asyncSubAgentMiddleware",
5603
+ tracePolicy: { processInputs: omitPayload },
5595
5604
  stateSchema: AsyncTaskStateSchema,
5596
5605
  tools,
5597
5606
  wrapModelCall: async (request, handler) => {
@@ -5674,6 +5683,7 @@ var ConfigurationError = class ConfigurationError extends Error {
5674
5683
  function createCacheBreakpointMiddleware() {
5675
5684
  return createMiddleware({
5676
5685
  name: "CacheBreakpointMiddleware",
5686
+ tracePolicy: { processInputs: omitPayload },
5677
5687
  wrapModelCall(request, handler) {
5678
5688
  if (!isAnthropicModel(request.model)) return handler(request);
5679
5689
  const existingContent = request.systemMessage.content;
@@ -5708,6 +5718,7 @@ function hasToolName(tool) {
5708
5718
  function createToolExclusionMiddleware(excludedTools) {
5709
5719
  return createMiddleware({
5710
5720
  name: "_ToolExclusionMiddleware",
5721
+ tracePolicy: { processInputs: omitPayload },
5711
5722
  wrapModelCall(request, handler) {
5712
5723
  return handler({
5713
5724
  ...request,
@@ -8731,4 +8742,4 @@ var LangSmithSandbox = class LangSmithSandbox extends BaseSandbox {
8731
8742
  //#endregion
8732
8743
  export { DEFAULT_GENERAL_PURPOSE_DESCRIPTION as A, StateBackend as B, MAX_SKILL_DESCRIPTION_LENGTH as C, createMemoryMiddleware as D, createSkillsMiddleware as E, createSubAgentMiddleware as F, resolveBackend as G, applyGrepMaxCount as H, computeSummarizationDefaults as I, checkEmptyContent as J, adaptBackendProtocol as K, createSummarizationMiddleware as L, GENERAL_PURPOSE_SUBAGENT as M, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY as N, filesValue as O, createSubAgent as P, performStringReplacement as Q, createFilesystemMiddleware as R, createCompletionCallbackMiddleware as S, MAX_SKILL_NAME_LENGTH as T, isSandboxBackend as U, SandboxError as V, isSandboxProtocol as W, isTextMimeType as X, getMimeType as Y, normalizeReadPagination as Z, createHarnessProfile as _, ASYNC_TASK_SYSTEM_PROMPT as a, createAsyncSubAgentMiddleware as b, TASK_SYSTEM_PROMPT as c, registerHarnessProfile as d, generalPurposeSubagentConfigSchema as f, EMPTY_HARNESS_PROFILE as g, serializeProfile as h, StoreBackend as i, DEFAULT_SUBAGENT_PROMPT as j, createPatchToolCallsMiddleware as k, createDeepAgent as l, parseHarnessProfileConfig as m, BaseSandbox as n, BASE_AGENT_PROMPT as o, harnessProfileConfigSchema as p, adaptSandboxProtocol as q, ContextHubBackend as r, EXECUTION_SYSTEM_PROMPT as s, LangSmithSandbox as t, getHarnessProfile as u, REQUIRED_MIDDLEWARE_NAMES as v, MAX_SKILL_FILE_SIZE as w, isAsyncSubAgent as x, ConfigurationError as y, CompositeBackend as z };
8733
8744
 
8734
- //# sourceMappingURL=langsmith-BYWZnEVh.js.map
8745
+ //# sourceMappingURL=langsmith-CkXiO0e9.js.map