deepagents 1.16.5 → 1.17.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.
@@ -8,9 +8,9 @@ import { BaseMessage, SystemMessage as SystemMessage$1 } from "@langchain/core/m
8
8
  import { Runnable } from "@langchain/core/runnables";
9
9
  import * as z$2 from "zod";
10
10
  import { z as z$1 } from "zod";
11
+ import { InteropZodObject } from "@langchain/core/utils/types";
11
12
  import { ClientTool, ServerTool, StructuredTool as StructuredTool$1 } from "@langchain/core/tools";
12
13
  import { BaseLanguageModel, LanguageModelLike } from "@langchain/core/language_models/base";
13
- import { InteropZodObject } from "@langchain/core/utils/types";
14
14
  import { Client } from "@langchain/langgraph-sdk";
15
15
  import { Client as Client$1 } from "langsmith";
16
16
  import { CaptureSnapshotOptions, CaptureSnapshotOptions as LangSmithCaptureSnapshotOptions, CreateSandboxOptions, Sandbox, Snapshot, Snapshot as LangSmithSnapshot, StartSandboxOptions, StartSandboxOptions as LangSmithStartSandboxOptions } from "langsmith/experimental/sandbox";
@@ -4776,4 +4776,4 @@ declare function createDeepAgent<TResponse extends SupportedResponseFormat = Sup
4776
4776
  }, import("zod/v4/core").$strip>>;
4777
4777
  }, import("zod/v4/core").$strip>, undefined, unknown, readonly (ServerTool | ClientTool)[], readonly []>, AgentMiddleware<undefined, undefined, unknown, readonly (ServerTool | ClientTool)[], readonly []>, ...TMiddleware, ...FlattenSubAgentMiddleware<TSubagents>], TTools, TSubagents, TStreamTransformers>>;
4778
4778
  export { scrubUnsupportedMultimodalContent as $, SystemPromptConfig as $t, createSettings as A, SandboxGetOrCreateOptions as An, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY as At, FlattenSubAgentMiddleware as B, BackendProtocolV2 as Bn, parseHarnessProfileConfig as Bt, listSkills as C, MaybePromise as Cn, StateBackend as Ct, filesValue as D, SandboxDeleteOptions as Dn, DEFAULT_SUBAGENT_PROMPT as Dt, createAgentMemoryMiddleware as E, SandboxBackendProtocol as En, DEFAULT_GENERAL_PURPOSE_DESCRIPTION as Et, CreateDeepAgentParams as F, WriteResult as Fn, getHarnessProfile as Ft, InferSubagentByName as G, HarnessProfile as Gt, InferDeepAgentType as H, BackendProtocolV1 as Hn, EMPTY_HARNESS_PROFILE as Ht, DeepAgent as I, applyGrepMaxCount as In, registerHarnessProfile as It, ResolveDeepAgentTypeConfig as J, ConfigurationError as Jt, InferSubagentReactAgentType as K, HarnessProfileOptions as Kt, DeepAgentTypeConfig as L, isSandboxBackend as Ln, HarnessProfileConfigData as Lt, DeepAgentRunStream as M, SandboxListOptions as Mn, SubAgentMiddlewareOptions as Mt, SubagentRunStream$1 as N, SandboxListResponse as Nn, createSubAgent as Nt, Settings as O, SandboxError as On, ForkedSubAgent as Ot, AnySubAgent as P, StateAndStore as Pn, createSubAgentMiddleware as Pt, multimodalBlockSupported as Q, EXECUTION_SYSTEM_PROMPT as Qt, DefaultDeepAgentTypeConfig as R, isSandboxProtocol as Rn, generalPurposeSubagentConfigSchema as Rt, SkillMetadata as S, LsResult as Sn, createMemoryMiddleware as St, AgentMemoryMiddlewareOptions as T, ReadResult as Tn, CompiledSubAgent as Tt, InferStructuredResponse as U, SandboxBackendProtocolV1 as Un, createHarnessProfile as Ut, InferDeepAgentSubagents as V, SandboxBackendProtocolV2 as Vn, serializeProfile as Vt, InferSubAgentMiddlewareStates as W, GeneralPurposeSubagentConfig as Wt, MULTIMODAL_BLOCK_TYPES as X, ASYNC_TASK_SYSTEM_PROMPT as Xt, SupportedResponseFormat as Y, ConfigurationErrorCode as Yt, createUnsupportedContentMiddleware as Z, BASE_AGENT_PROMPT as Zt, StoreBackend as _, FileOperationError as _n, SkillsMiddlewareOptions as _t, adaptBackendProtocol as a, FilesystemPermission as an, createAsyncSubAgentMiddleware as at, StoreBackendOptions as b, GrepMatch as bn, skillsMetadataValue as bt, LangSmithSandbox as c, BackendFactory as cn, createSummarizationMiddleware as ct, BaseSandbox as d, DeleteResult as dn, MAX_SKILL_DESCRIPTION_LENGTH as dt, TASK_SYSTEM_PROMPT as en, AsyncSubAgent as et, LocalShellBackend as f, EditResult as fn, MAX_SKILL_FILE_SIZE as ft, FilesystemBackend as g, FileInfo as gn, SkillToolResolver as gt, CompositeBackend as h, FileDownloadResponse as hn, SkillMetadataEntry as ht, LangSmithStartSandboxOptions as i, FilesystemOperation as in, TaskEvent as it, findProjectRoot as j, SandboxInfo as jn, SubAgent as jt, SettingsOptions as k, SandboxErrorCode as kn, GENERAL_PURPOSE_SUBAGENT as kt, LangSmithSandboxCreateOptions as l, BackendProtocol as ln, CompletionCallbackOptions as lt, ContextHubBackend as m, FileData as mn, SkillMetadata$1 as mt, LangSmithCaptureSnapshotOptions as n, FsToolName as nn, AsyncTask as nt, adaptSandboxProtocol as o, PermissionMode as on, isAsyncSubAgent as ot, LocalShellBackendOptions as p, ExecuteResponse as pn, MAX_SKILL_NAME_LENGTH as pt, MergedDeepAgentState as q, REQUIRED_MIDDLEWARE_NAMES as qt, LangSmithSnapshot as r, createFilesystemMiddleware as rn, AsyncTaskStatus as rt, normalizeReadPagination as s, AnyBackendProtocol as sn, computeSummarizationDefaults as st, createDeepAgent as t, FilesystemMiddlewareOptions as tn, AsyncSubAgentMiddlewareOptions as tt, LangSmithSandboxOptions as u, BackendRuntime as un, createCompletionCallbackMiddleware as ut, StoreBackendContext as v, FileUploadResponse as vn, createSkillsMiddleware as vt, parseSkillMetadata as w, ReadRawResult as wn, createPatchToolCallsMiddleware as wt, ListSkillsOptions as x, GrepResult as xn, MemoryMiddlewareOptions as xt, StoreBackendNamespaceFactory as y, GlobResult as yn, pinnedSkillsValue as yt, ExtractSubAgentMiddleware as z, resolveBackend as zn, harnessProfileConfigSchema as zt };
4779
- //# sourceMappingURL=agent-DiA5yRzO.d.ts.map
4779
+ //# sourceMappingURL=agent-CLlZT-Mb.d.ts.map
package/dist/browser.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_langsmith = require("./langsmith-CR3a2-Z7.cjs");
2
+ const require_langsmith = require("./langsmith-Fjf2fY1X.cjs");
3
3
  exports.ASYNC_TASK_SYSTEM_PROMPT = require_langsmith.ASYNC_TASK_SYSTEM_PROMPT;
4
4
  exports.BASE_AGENT_PROMPT = require_langsmith.BASE_AGENT_PROMPT;
5
5
  exports.BaseSandbox = require_langsmith.BaseSandbox;
package/dist/browser.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $t as SystemPromptConfig, An as SandboxGetOrCreateOptions, B as FlattenSubAgentMiddleware, Bn as BackendProtocolV2, Bt as parseHarnessProfileConfig, Cn as MaybePromise, Ct as StateBackend, D as filesValue, Dn as SandboxDeleteOptions, Dt as DEFAULT_SUBAGENT_PROMPT, En as SandboxBackendProtocol, Et as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, F as CreateDeepAgentParams, Fn as WriteResult, Ft as getHarnessProfile, G as InferSubagentByName, Gt as HarnessProfile, H as InferDeepAgentType, Hn as BackendProtocolV1, Ht as EMPTY_HARNESS_PROFILE, I as DeepAgent, It as registerHarnessProfile, J as ResolveDeepAgentTypeConfig, Jt as ConfigurationError, K as InferSubagentReactAgentType, Kt as HarnessProfileOptions, L as DeepAgentTypeConfig, Ln as isSandboxBackend, Lt as HarnessProfileConfigData, M as DeepAgentRunStream, Mn as SandboxListOptions, Mt as SubAgentMiddlewareOptions, N as SubagentRunStream, Nn as SandboxListResponse, On as SandboxError, Ot as ForkedSubAgent, P as AnySubAgent, Pn as StateAndStore, Pt as createSubAgentMiddleware, Qt as EXECUTION_SYSTEM_PROMPT, R as DefaultDeepAgentTypeConfig, Rn as isSandboxProtocol, Rt as generalPurposeSubagentConfigSchema, Sn as LsResult, St as createMemoryMiddleware, Tn as ReadResult, Tt as CompiledSubAgent, U as InferStructuredResponse, Un as SandboxBackendProtocolV1, Ut as createHarnessProfile, V as InferDeepAgentSubagents, Vn as SandboxBackendProtocolV2, Vt as serializeProfile, W as InferSubAgentMiddlewareStates, Wt as GeneralPurposeSubagentConfig, Xt as ASYNC_TASK_SYSTEM_PROMPT, Y as SupportedResponseFormat, Yt as ConfigurationErrorCode, Zt as BASE_AGENT_PROMPT, _ as StoreBackend, _n as FileOperationError, _t as SkillsMiddlewareOptions, a as adaptBackendProtocol, an as FilesystemPermission, at as createAsyncSubAgentMiddleware, b as StoreBackendOptions, bn as GrepMatch, bt as skillsMetadataValue, c as LangSmithSandbox, cn as BackendFactory, ct as createSummarizationMiddleware, d as BaseSandbox, dn as DeleteResult, dt as MAX_SKILL_DESCRIPTION_LENGTH, en as TASK_SYSTEM_PROMPT, et as AsyncSubAgent, fn as EditResult, ft as MAX_SKILL_FILE_SIZE, gn as FileInfo, gt as SkillToolResolver, h as CompositeBackend, hn as FileDownloadResponse, ht as SkillMetadataEntry, in as FilesystemOperation, it as TaskEvent, jn as SandboxInfo, jt as SubAgent, kn as SandboxErrorCode, kt as GENERAL_PURPOSE_SUBAGENT, l as LangSmithSandboxCreateOptions, ln as BackendProtocol, lt as CompletionCallbackOptions, m as ContextHubBackend, mn as FileData, mt as SkillMetadata, nn as FsToolName, nt as AsyncTask, o as adaptSandboxProtocol, on as PermissionMode, ot as isAsyncSubAgent, pn as ExecuteResponse, pt as MAX_SKILL_NAME_LENGTH, q as MergedDeepAgentState, qt as REQUIRED_MIDDLEWARE_NAMES, rn as createFilesystemMiddleware, rt as AsyncTaskStatus, sn as AnyBackendProtocol, st as computeSummarizationDefaults, t as createDeepAgent, tn as FilesystemMiddlewareOptions, tt as AsyncSubAgentMiddlewareOptions, u as LangSmithSandboxOptions, un as BackendRuntime, ut as createCompletionCallbackMiddleware, v as StoreBackendContext, vn as FileUploadResponse, vt as createSkillsMiddleware, wn as ReadRawResult, wt as createPatchToolCallsMiddleware, xn as GrepResult, xt as MemoryMiddlewareOptions, y as StoreBackendNamespaceFactory, yn as GlobResult, yt as pinnedSkillsValue, z as ExtractSubAgentMiddleware, zn as resolveBackend, zt as harnessProfileConfigSchema } from "./agent-DiA5yRzO.js";
1
+ import { $t as SystemPromptConfig, An as SandboxGetOrCreateOptions, B as FlattenSubAgentMiddleware, Bn as BackendProtocolV2, Bt as parseHarnessProfileConfig, Cn as MaybePromise, Ct as StateBackend, D as filesValue, Dn as SandboxDeleteOptions, Dt as DEFAULT_SUBAGENT_PROMPT, En as SandboxBackendProtocol, Et as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, F as CreateDeepAgentParams, Fn as WriteResult, Ft as getHarnessProfile, G as InferSubagentByName, Gt as HarnessProfile, H as InferDeepAgentType, Hn as BackendProtocolV1, Ht as EMPTY_HARNESS_PROFILE, I as DeepAgent, It as registerHarnessProfile, J as ResolveDeepAgentTypeConfig, Jt as ConfigurationError, K as InferSubagentReactAgentType, Kt as HarnessProfileOptions, L as DeepAgentTypeConfig, Ln as isSandboxBackend, Lt as HarnessProfileConfigData, M as DeepAgentRunStream, Mn as SandboxListOptions, Mt as SubAgentMiddlewareOptions, N as SubagentRunStream, Nn as SandboxListResponse, On as SandboxError, Ot as ForkedSubAgent, P as AnySubAgent, Pn as StateAndStore, Pt as createSubAgentMiddleware, Qt as EXECUTION_SYSTEM_PROMPT, R as DefaultDeepAgentTypeConfig, Rn as isSandboxProtocol, Rt as generalPurposeSubagentConfigSchema, Sn as LsResult, St as createMemoryMiddleware, Tn as ReadResult, Tt as CompiledSubAgent, U as InferStructuredResponse, Un as SandboxBackendProtocolV1, Ut as createHarnessProfile, V as InferDeepAgentSubagents, Vn as SandboxBackendProtocolV2, Vt as serializeProfile, W as InferSubAgentMiddlewareStates, Wt as GeneralPurposeSubagentConfig, Xt as ASYNC_TASK_SYSTEM_PROMPT, Y as SupportedResponseFormat, Yt as ConfigurationErrorCode, Zt as BASE_AGENT_PROMPT, _ as StoreBackend, _n as FileOperationError, _t as SkillsMiddlewareOptions, a as adaptBackendProtocol, an as FilesystemPermission, at as createAsyncSubAgentMiddleware, b as StoreBackendOptions, bn as GrepMatch, bt as skillsMetadataValue, c as LangSmithSandbox, cn as BackendFactory, ct as createSummarizationMiddleware, d as BaseSandbox, dn as DeleteResult, dt as MAX_SKILL_DESCRIPTION_LENGTH, en as TASK_SYSTEM_PROMPT, et as AsyncSubAgent, fn as EditResult, ft as MAX_SKILL_FILE_SIZE, gn as FileInfo, gt as SkillToolResolver, h as CompositeBackend, hn as FileDownloadResponse, ht as SkillMetadataEntry, in as FilesystemOperation, it as TaskEvent, jn as SandboxInfo, jt as SubAgent, kn as SandboxErrorCode, kt as GENERAL_PURPOSE_SUBAGENT, l as LangSmithSandboxCreateOptions, ln as BackendProtocol, lt as CompletionCallbackOptions, m as ContextHubBackend, mn as FileData, mt as SkillMetadata, nn as FsToolName, nt as AsyncTask, o as adaptSandboxProtocol, on as PermissionMode, ot as isAsyncSubAgent, pn as ExecuteResponse, pt as MAX_SKILL_NAME_LENGTH, q as MergedDeepAgentState, qt as REQUIRED_MIDDLEWARE_NAMES, rn as createFilesystemMiddleware, rt as AsyncTaskStatus, sn as AnyBackendProtocol, st as computeSummarizationDefaults, t as createDeepAgent, tn as FilesystemMiddlewareOptions, tt as AsyncSubAgentMiddlewareOptions, u as LangSmithSandboxOptions, un as BackendRuntime, ut as createCompletionCallbackMiddleware, v as StoreBackendContext, vn as FileUploadResponse, vt as createSkillsMiddleware, wn as ReadRawResult, wt as createPatchToolCallsMiddleware, xn as GrepResult, xt as MemoryMiddlewareOptions, y as StoreBackendNamespaceFactory, yn as GlobResult, yt as pinnedSkillsValue, z as ExtractSubAgentMiddleware, zn as resolveBackend, zt as harnessProfileConfigSchema } from "./agent-CLlZT-Mb.js";
2
2
  import { CaptureSnapshotOptions as LangSmithCaptureSnapshotOptions, Snapshot as LangSmithSnapshot, StartSandboxOptions as LangSmithStartSandboxOptions } from "langsmith/experimental/sandbox";
3
3
  export { ASYNC_TASK_SYSTEM_PROMPT, type AnyBackendProtocol, type AnySubAgent, type AsyncSubAgent, type AsyncSubAgentMiddlewareOptions, type AsyncTask, type AsyncTaskStatus, BASE_AGENT_PROMPT, type BackendFactory, type BackendProtocol, type BackendProtocolV1, type BackendProtocolV2, type BackendRuntime, BaseSandbox, type CompiledSubAgent, type CompletionCallbackOptions, CompositeBackend, ConfigurationError, type ConfigurationErrorCode, ContextHubBackend, type CreateDeepAgentParams, DEFAULT_GENERAL_PURPOSE_DESCRIPTION, DEFAULT_SUBAGENT_PROMPT, type DeepAgent, type DeepAgentRunStream, type DeepAgentTypeConfig, type DefaultDeepAgentTypeConfig, type DeleteResult, EMPTY_HARNESS_PROFILE, EXECUTION_SYSTEM_PROMPT, type EditResult, type ExecuteResponse, type ExtractSubAgentMiddleware, type FileData, type FileDownloadResponse, type FileInfo, type FileOperationError, type FileUploadResponse, type FilesystemMiddlewareOptions, type FilesystemOperation, type FilesystemPermission, type FlattenSubAgentMiddleware, type ForkedSubAgent, type FsToolName, GENERAL_PURPOSE_SUBAGENT, type GeneralPurposeSubagentConfig, type GlobResult, type GrepMatch, type GrepResult, type HarnessProfile, type HarnessProfileConfigData, type HarnessProfileOptions, type InferDeepAgentSubagents, type InferDeepAgentType, type InferStructuredResponse, type InferSubAgentMiddlewareStates, type InferSubagentByName, type InferSubagentReactAgentType, type LangSmithCaptureSnapshotOptions, LangSmithSandbox, type LangSmithSandboxCreateOptions, type LangSmithSandboxOptions, type LangSmithSnapshot, type LangSmithStartSandboxOptions, type LsResult, MAX_SKILL_DESCRIPTION_LENGTH, MAX_SKILL_FILE_SIZE, MAX_SKILL_NAME_LENGTH, type MaybePromise, type MemoryMiddlewareOptions, type MergedDeepAgentState, type PermissionMode, REQUIRED_MIDDLEWARE_NAMES, type ReadRawResult, type ReadResult, type ResolveDeepAgentTypeConfig, type SandboxBackendProtocol, type SandboxBackendProtocolV1, type SandboxBackendProtocolV2, type SandboxDeleteOptions, SandboxError, type SandboxErrorCode, type SandboxGetOrCreateOptions, type SandboxInfo, type SandboxListOptions, type SandboxListResponse, type SkillMetadata, type SkillMetadataEntry, type SkillToolResolver, type SkillsMiddlewareOptions, type StateAndStore, StateBackend, StoreBackend, type StoreBackendContext, type StoreBackendNamespaceFactory, type StoreBackendOptions, type SubAgent, type SubAgentMiddlewareOptions, type SubagentRunStream, type SupportedResponseFormat, type SystemPromptConfig, TASK_SYSTEM_PROMPT, type TaskEvent, type WriteResult, adaptBackendProtocol, adaptSandboxProtocol, computeSummarizationDefaults, createAsyncSubAgentMiddleware, createCompletionCallbackMiddleware, createDeepAgent, createFilesystemMiddleware, createHarnessProfile, createMemoryMiddleware, createPatchToolCallsMiddleware, createSkillsMiddleware, createSubAgentMiddleware, createSummarizationMiddleware, filesValue, generalPurposeSubagentConfigSchema, getHarnessProfile, harnessProfileConfigSchema, isAsyncSubAgent, isSandboxBackend, isSandboxProtocol, parseHarnessProfileConfig, pinnedSkillsValue, registerHarnessProfile, resolveBackend, serializeProfile, skillsMetadataValue };
package/dist/browser.js CHANGED
@@ -1 +1 @@
1
- export { a as ASYNC_TASK_SYSTEM_PROMPT, o as BASE_AGENT_PROMPT, n as BaseSandbox, V as CompositeBackend, O as ConfigurationError, r as ContextHubBackend, M as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, N as DEFAULT_SUBAGENT_PROMPT, g as EMPTY_HARNESS_PROFILE, s as EXECUTION_SYSTEM_PROMPT, P as GENERAL_PURPOSE_SUBAGENT, t as LangSmithSandbox, S as MAX_SKILL_DESCRIPTION_LENGTH, C as MAX_SKILL_FILE_SIZE, w as MAX_SKILL_NAME_LENGTH, v as REQUIRED_MIDDLEWARE_NAMES, q as SandboxError, K as StateBackend, i as StoreBackend, c as TASK_SYSTEM_PROMPT, Q as adaptBackendProtocol, $ as adaptSandboxProtocol, R as computeSummarizationDefaults, y as createAsyncSubAgentMiddleware, x as createCompletionCallbackMiddleware, l as createDeepAgent, B as createFilesystemMiddleware, _ as createHarnessProfile, k as createMemoryMiddleware, j as createPatchToolCallsMiddleware, T as createSkillsMiddleware, L as createSubAgentMiddleware, z as createSummarizationMiddleware, A as filesValue, f as generalPurposeSubagentConfigSchema, u as getHarnessProfile, p as harnessProfileConfigSchema, b as isAsyncSubAgent, Y as isSandboxBackend, X as isSandboxProtocol, m as parseHarnessProfileConfig, E as pinnedSkillsValue, d as registerHarnessProfile, Z as resolveBackend, h as serializeProfile, D as skillsMetadataValue } from "./langsmith-CH6GPPud.js";
1
+ export { a as ASYNC_TASK_SYSTEM_PROMPT, o as BASE_AGENT_PROMPT, n as BaseSandbox, V as CompositeBackend, O as ConfigurationError, r as ContextHubBackend, M as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, N as DEFAULT_SUBAGENT_PROMPT, g as EMPTY_HARNESS_PROFILE, s as EXECUTION_SYSTEM_PROMPT, P as GENERAL_PURPOSE_SUBAGENT, t as LangSmithSandbox, S as MAX_SKILL_DESCRIPTION_LENGTH, C as MAX_SKILL_FILE_SIZE, w as MAX_SKILL_NAME_LENGTH, v as REQUIRED_MIDDLEWARE_NAMES, q as SandboxError, K as StateBackend, i as StoreBackend, c as TASK_SYSTEM_PROMPT, Q as adaptBackendProtocol, $ as adaptSandboxProtocol, R as computeSummarizationDefaults, y as createAsyncSubAgentMiddleware, x as createCompletionCallbackMiddleware, l as createDeepAgent, B as createFilesystemMiddleware, _ as createHarnessProfile, k as createMemoryMiddleware, j as createPatchToolCallsMiddleware, T as createSkillsMiddleware, L as createSubAgentMiddleware, z as createSummarizationMiddleware, A as filesValue, f as generalPurposeSubagentConfigSchema, u as getHarnessProfile, p as harnessProfileConfigSchema, b as isAsyncSubAgent, Y as isSandboxBackend, X as isSandboxProtocol, m as parseHarnessProfileConfig, E as pinnedSkillsValue, d as registerHarnessProfile, Z as resolveBackend, h as serializeProfile, D as skillsMetadataValue } from "./langsmith-DYAFTn0y.js";
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_langsmith = require("./langsmith-CR3a2-Z7.cjs");
3
- const require_src = require("./src-DeLlHk9u.cjs");
2
+ const require_langsmith = require("./langsmith-Fjf2fY1X.cjs");
3
+ const require_src = require("./src-BC1al3Te.cjs");
4
4
  exports.ASYNC_TASK_SYSTEM_PROMPT = require_langsmith.ASYNC_TASK_SYSTEM_PROMPT;
5
5
  exports.BASE_AGENT_PROMPT = require_langsmith.BASE_AGENT_PROMPT;
6
6
  exports.BaseSandbox = require_langsmith.BaseSandbox;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as scrubUnsupportedMultimodalContent, $t as SystemPromptConfig, A as createSettings, An as SandboxGetOrCreateOptions, At as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, B as FlattenSubAgentMiddleware, Bn as BackendProtocolV2, Bt as parseHarnessProfileConfig, C as listSkills, Cn as MaybePromise, Ct as StateBackend, D as filesValue, Dn as SandboxDeleteOptions, Dt as DEFAULT_SUBAGENT_PROMPT, E as createAgentMemoryMiddleware, En as SandboxBackendProtocol, Et as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, F as CreateDeepAgentParams, Fn as WriteResult, Ft as getHarnessProfile, G as InferSubagentByName, Gt as HarnessProfile, H as InferDeepAgentType, Hn as BackendProtocolV1, Ht as EMPTY_HARNESS_PROFILE, I as DeepAgent, In as applyGrepMaxCount, It as registerHarnessProfile, J as ResolveDeepAgentTypeConfig, Jt as ConfigurationError, K as InferSubagentReactAgentType, Kt as HarnessProfileOptions, L as DeepAgentTypeConfig, Ln as isSandboxBackend, Lt as HarnessProfileConfigData, M as DeepAgentRunStream, Mn as SandboxListOptions, Mt as SubAgentMiddlewareOptions, N as SubagentRunStream, Nn as SandboxListResponse, Nt as createSubAgent, O as Settings, On as SandboxError, Ot as ForkedSubAgent, P as AnySubAgent, Pn as StateAndStore, Pt as createSubAgentMiddleware, Q as multimodalBlockSupported, Qt as EXECUTION_SYSTEM_PROMPT, R as DefaultDeepAgentTypeConfig, Rn as isSandboxProtocol, Rt as generalPurposeSubagentConfigSchema, S as SkillMetadata, Sn as LsResult, St as createMemoryMiddleware, T as AgentMemoryMiddlewareOptions, Tn as ReadResult, Tt as CompiledSubAgent, U as InferStructuredResponse, Un as SandboxBackendProtocolV1, Ut as createHarnessProfile, V as InferDeepAgentSubagents, Vn as SandboxBackendProtocolV2, Vt as serializeProfile, W as InferSubAgentMiddlewareStates, Wt as GeneralPurposeSubagentConfig, X as MULTIMODAL_BLOCK_TYPES, Xt as ASYNC_TASK_SYSTEM_PROMPT, Y as SupportedResponseFormat, Yt as ConfigurationErrorCode, Z as createUnsupportedContentMiddleware, Zt as BASE_AGENT_PROMPT, _ as StoreBackend, _n as FileOperationError, _t as SkillsMiddlewareOptions, a as adaptBackendProtocol, an as FilesystemPermission, at as createAsyncSubAgentMiddleware, b as StoreBackendOptions, bn as GrepMatch, bt as skillsMetadataValue, c as LangSmithSandbox, cn as BackendFactory, ct as createSummarizationMiddleware, d as BaseSandbox, dn as DeleteResult, dt as MAX_SKILL_DESCRIPTION_LENGTH, en as TASK_SYSTEM_PROMPT, et as AsyncSubAgent, f as LocalShellBackend, fn as EditResult, ft as MAX_SKILL_FILE_SIZE, g as FilesystemBackend, gn as FileInfo, gt as SkillToolResolver, h as CompositeBackend, hn as FileDownloadResponse, ht as SkillMetadataEntry, i as LangSmithStartSandboxOptions, in as FilesystemOperation, it as TaskEvent, j as findProjectRoot, jn as SandboxInfo, jt as SubAgent, k as SettingsOptions, kn as SandboxErrorCode, kt as GENERAL_PURPOSE_SUBAGENT, l as LangSmithSandboxCreateOptions, ln as BackendProtocol, lt as CompletionCallbackOptions, m as ContextHubBackend, mn as FileData, mt as SkillMetadata$1, n as LangSmithCaptureSnapshotOptions, nn as FsToolName, nt as AsyncTask, o as adaptSandboxProtocol, on as PermissionMode, ot as isAsyncSubAgent, p as LocalShellBackendOptions, pn as ExecuteResponse, pt as MAX_SKILL_NAME_LENGTH, q as MergedDeepAgentState, qt as REQUIRED_MIDDLEWARE_NAMES, r as LangSmithSnapshot, rn as createFilesystemMiddleware, rt as AsyncTaskStatus, s as normalizeReadPagination, sn as AnyBackendProtocol, st as computeSummarizationDefaults, t as createDeepAgent, tn as FilesystemMiddlewareOptions, tt as AsyncSubAgentMiddlewareOptions, u as LangSmithSandboxOptions, un as BackendRuntime, ut as createCompletionCallbackMiddleware, v as StoreBackendContext, vn as FileUploadResponse, vt as createSkillsMiddleware, w as parseSkillMetadata, wn as ReadRawResult, wt as createPatchToolCallsMiddleware, x as ListSkillsOptions, xn as GrepResult, xt as MemoryMiddlewareOptions, y as StoreBackendNamespaceFactory, yn as GlobResult, yt as pinnedSkillsValue, z as ExtractSubAgentMiddleware, zn as resolveBackend, zt as harnessProfileConfigSchema } from "./agent-DiA5yRzO.js";
1
+ import { $ as scrubUnsupportedMultimodalContent, $t as SystemPromptConfig, A as createSettings, An as SandboxGetOrCreateOptions, At as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, B as FlattenSubAgentMiddleware, Bn as BackendProtocolV2, Bt as parseHarnessProfileConfig, C as listSkills, Cn as MaybePromise, Ct as StateBackend, D as filesValue, Dn as SandboxDeleteOptions, Dt as DEFAULT_SUBAGENT_PROMPT, E as createAgentMemoryMiddleware, En as SandboxBackendProtocol, Et as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, F as CreateDeepAgentParams, Fn as WriteResult, Ft as getHarnessProfile, G as InferSubagentByName, Gt as HarnessProfile, H as InferDeepAgentType, Hn as BackendProtocolV1, Ht as EMPTY_HARNESS_PROFILE, I as DeepAgent, In as applyGrepMaxCount, It as registerHarnessProfile, J as ResolveDeepAgentTypeConfig, Jt as ConfigurationError, K as InferSubagentReactAgentType, Kt as HarnessProfileOptions, L as DeepAgentTypeConfig, Ln as isSandboxBackend, Lt as HarnessProfileConfigData, M as DeepAgentRunStream, Mn as SandboxListOptions, Mt as SubAgentMiddlewareOptions, N as SubagentRunStream, Nn as SandboxListResponse, Nt as createSubAgent, O as Settings, On as SandboxError, Ot as ForkedSubAgent, P as AnySubAgent, Pn as StateAndStore, Pt as createSubAgentMiddleware, Q as multimodalBlockSupported, Qt as EXECUTION_SYSTEM_PROMPT, R as DefaultDeepAgentTypeConfig, Rn as isSandboxProtocol, Rt as generalPurposeSubagentConfigSchema, S as SkillMetadata, Sn as LsResult, St as createMemoryMiddleware, T as AgentMemoryMiddlewareOptions, Tn as ReadResult, Tt as CompiledSubAgent, U as InferStructuredResponse, Un as SandboxBackendProtocolV1, Ut as createHarnessProfile, V as InferDeepAgentSubagents, Vn as SandboxBackendProtocolV2, Vt as serializeProfile, W as InferSubAgentMiddlewareStates, Wt as GeneralPurposeSubagentConfig, X as MULTIMODAL_BLOCK_TYPES, Xt as ASYNC_TASK_SYSTEM_PROMPT, Y as SupportedResponseFormat, Yt as ConfigurationErrorCode, Z as createUnsupportedContentMiddleware, Zt as BASE_AGENT_PROMPT, _ as StoreBackend, _n as FileOperationError, _t as SkillsMiddlewareOptions, a as adaptBackendProtocol, an as FilesystemPermission, at as createAsyncSubAgentMiddleware, b as StoreBackendOptions, bn as GrepMatch, bt as skillsMetadataValue, c as LangSmithSandbox, cn as BackendFactory, ct as createSummarizationMiddleware, d as BaseSandbox, dn as DeleteResult, dt as MAX_SKILL_DESCRIPTION_LENGTH, en as TASK_SYSTEM_PROMPT, et as AsyncSubAgent, f as LocalShellBackend, fn as EditResult, ft as MAX_SKILL_FILE_SIZE, g as FilesystemBackend, gn as FileInfo, gt as SkillToolResolver, h as CompositeBackend, hn as FileDownloadResponse, ht as SkillMetadataEntry, i as LangSmithStartSandboxOptions, in as FilesystemOperation, it as TaskEvent, j as findProjectRoot, jn as SandboxInfo, jt as SubAgent, k as SettingsOptions, kn as SandboxErrorCode, kt as GENERAL_PURPOSE_SUBAGENT, l as LangSmithSandboxCreateOptions, ln as BackendProtocol, lt as CompletionCallbackOptions, m as ContextHubBackend, mn as FileData, mt as SkillMetadata$1, n as LangSmithCaptureSnapshotOptions, nn as FsToolName, nt as AsyncTask, o as adaptSandboxProtocol, on as PermissionMode, ot as isAsyncSubAgent, p as LocalShellBackendOptions, pn as ExecuteResponse, pt as MAX_SKILL_NAME_LENGTH, q as MergedDeepAgentState, qt as REQUIRED_MIDDLEWARE_NAMES, r as LangSmithSnapshot, rn as createFilesystemMiddleware, rt as AsyncTaskStatus, s as normalizeReadPagination, sn as AnyBackendProtocol, st as computeSummarizationDefaults, t as createDeepAgent, tn as FilesystemMiddlewareOptions, tt as AsyncSubAgentMiddlewareOptions, u as LangSmithSandboxOptions, un as BackendRuntime, ut as createCompletionCallbackMiddleware, v as StoreBackendContext, vn as FileUploadResponse, vt as createSkillsMiddleware, w as parseSkillMetadata, wn as ReadRawResult, wt as createPatchToolCallsMiddleware, x as ListSkillsOptions, xn as GrepResult, xt as MemoryMiddlewareOptions, y as StoreBackendNamespaceFactory, yn as GlobResult, yt as pinnedSkillsValue, z as ExtractSubAgentMiddleware, zn as resolveBackend, zt as harnessProfileConfigSchema } from "./agent-CLlZT-Mb.js";
2
2
  export { ASYNC_TASK_SYSTEM_PROMPT, type AgentMemoryMiddlewareOptions, type AnyBackendProtocol, type AnySubAgent, type AsyncSubAgent, type AsyncSubAgentMiddlewareOptions, type AsyncTask, type AsyncTaskStatus, BASE_AGENT_PROMPT, type BackendFactory, type BackendProtocol, type BackendProtocolV1, type BackendProtocolV2, type BackendRuntime, BaseSandbox, type CompiledSubAgent, type CompletionCallbackOptions, CompositeBackend, ConfigurationError, type ConfigurationErrorCode, ContextHubBackend, type CreateDeepAgentParams, DEFAULT_GENERAL_PURPOSE_DESCRIPTION, DEFAULT_SUBAGENT_PROMPT, type DeepAgent, type DeepAgentRunStream, type DeepAgentTypeConfig, type DefaultDeepAgentTypeConfig, type DeleteResult, EMPTY_HARNESS_PROFILE, EXECUTION_SYSTEM_PROMPT, type EditResult, type ExecuteResponse, type ExtractSubAgentMiddleware, type FileData, type FileDownloadResponse, type FileInfo, type FileOperationError, type FileUploadResponse, FilesystemBackend, type FilesystemMiddlewareOptions, type FilesystemOperation, type FilesystemPermission, type FlattenSubAgentMiddleware, type ForkedSubAgent, type FsToolName, GENERAL_PURPOSE_SUBAGENT, type GeneralPurposeSubagentConfig, type GlobResult, type GrepMatch, type GrepResult, type HarnessProfile, type HarnessProfileConfigData, type HarnessProfileOptions, type InferDeepAgentSubagents, type InferDeepAgentType, type InferStructuredResponse, type InferSubAgentMiddlewareStates, type InferSubagentByName, type InferSubagentReactAgentType, type LangSmithCaptureSnapshotOptions, LangSmithSandbox, type LangSmithSandboxCreateOptions, type LangSmithSandboxOptions, type LangSmithSnapshot, type LangSmithStartSandboxOptions, type ListSkillsOptions, type SkillMetadata as LoaderSkillMetadata, LocalShellBackend, type LocalShellBackendOptions, type LsResult, MAX_SKILL_DESCRIPTION_LENGTH, MAX_SKILL_FILE_SIZE, MAX_SKILL_NAME_LENGTH, MULTIMODAL_BLOCK_TYPES, type MaybePromise, type MemoryMiddlewareOptions, type MergedDeepAgentState, type PermissionMode, REQUIRED_MIDDLEWARE_NAMES, type ReadRawResult, type ReadResult, type ResolveDeepAgentTypeConfig, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, type SandboxBackendProtocol, type SandboxBackendProtocolV1, type SandboxBackendProtocolV2, type SandboxDeleteOptions, SandboxError, type SandboxErrorCode, type SandboxGetOrCreateOptions, type SandboxInfo, type SandboxListOptions, type SandboxListResponse, type Settings, type SettingsOptions, type SkillMetadata$1 as SkillMetadata, type SkillMetadataEntry, type SkillToolResolver, type SkillsMiddlewareOptions, type StateAndStore, StateBackend, StoreBackend, type StoreBackendContext, type StoreBackendNamespaceFactory, type StoreBackendOptions, type SubAgent, type SubAgentMiddlewareOptions, type SubagentRunStream, type SupportedResponseFormat, type SystemPromptConfig, TASK_SYSTEM_PROMPT, type TaskEvent, type WriteResult, adaptBackendProtocol, adaptSandboxProtocol, applyGrepMaxCount, computeSummarizationDefaults, createAgentMemoryMiddleware, createAsyncSubAgentMiddleware, createCompletionCallbackMiddleware, createDeepAgent, createFilesystemMiddleware, createHarnessProfile, createMemoryMiddleware, createPatchToolCallsMiddleware, createSettings, createSkillsMiddleware, createSubAgent, createSubAgentMiddleware, createSummarizationMiddleware, createUnsupportedContentMiddleware, filesValue, findProjectRoot, generalPurposeSubagentConfigSchema, getHarnessProfile, harnessProfileConfigSchema, isAsyncSubAgent, isSandboxBackend, isSandboxProtocol, listSkills, multimodalBlockSupported, normalizeReadPagination, parseHarnessProfileConfig, parseSkillMetadata, pinnedSkillsValue, registerHarnessProfile, resolveBackend, scrubUnsupportedMultimodalContent, serializeProfile, skillsMetadataValue };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as adaptSandboxProtocol, A as filesValue, B as createFilesystemMiddleware, C as MAX_SKILL_FILE_SIZE, D as skillsMetadataValue, E as pinnedSkillsValue, F as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, G as scrubUnsupportedMultimodalContent, H as MULTIMODAL_BLOCK_TYPES, I as createSubAgent, J as applyGrepMaxCount, K as StateBackend, L as createSubAgentMiddleware, M as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, N as DEFAULT_SUBAGENT_PROMPT, O as ConfigurationError, P as GENERAL_PURPOSE_SUBAGENT, Q as adaptBackendProtocol, R as computeSummarizationDefaults, S as MAX_SKILL_DESCRIPTION_LENGTH, T as createSkillsMiddleware, U as createUnsupportedContentMiddleware, V as CompositeBackend, W as multimodalBlockSupported, X as isSandboxProtocol, Y as isSandboxBackend, Z as resolveBackend, _ as createHarnessProfile, a as ASYNC_TASK_SYSTEM_PROMPT, b as isAsyncSubAgent, c as TASK_SYSTEM_PROMPT, d as registerHarnessProfile, f as generalPurposeSubagentConfigSchema, g as EMPTY_HARNESS_PROFILE, h as serializeProfile, i as StoreBackend, j as createPatchToolCallsMiddleware, k as createMemoryMiddleware, l as createDeepAgent, m as parseHarnessProfileConfig, n as BaseSandbox, o as BASE_AGENT_PROMPT, p as harnessProfileConfigSchema, q as SandboxError, r as ContextHubBackend, rt as normalizeReadPagination, s as EXECUTION_SYSTEM_PROMPT, t as LangSmithSandbox, u as getHarnessProfile, v as REQUIRED_MIDDLEWARE_NAMES, w as MAX_SKILL_NAME_LENGTH, x as createCompletionCallbackMiddleware, y as createAsyncSubAgentMiddleware, z as createSummarizationMiddleware } from "./langsmith-CH6GPPud.js";
2
- import { a as createAgentMemoryMiddleware, i as parseSkillMetadata, n as FilesystemBackend, o as createSettings, r as listSkills, s as findProjectRoot, t as LocalShellBackend } from "./src-tRcDW-tU.js";
1
+ import { $ as adaptSandboxProtocol, A as filesValue, B as createFilesystemMiddleware, C as MAX_SKILL_FILE_SIZE, D as skillsMetadataValue, E as pinnedSkillsValue, F as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, G as scrubUnsupportedMultimodalContent, H as MULTIMODAL_BLOCK_TYPES, I as createSubAgent, J as applyGrepMaxCount, K as StateBackend, L as createSubAgentMiddleware, M as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, N as DEFAULT_SUBAGENT_PROMPT, O as ConfigurationError, P as GENERAL_PURPOSE_SUBAGENT, Q as adaptBackendProtocol, R as computeSummarizationDefaults, S as MAX_SKILL_DESCRIPTION_LENGTH, T as createSkillsMiddleware, U as createUnsupportedContentMiddleware, V as CompositeBackend, W as multimodalBlockSupported, X as isSandboxProtocol, Y as isSandboxBackend, Z as resolveBackend, _ as createHarnessProfile, a as ASYNC_TASK_SYSTEM_PROMPT, b as isAsyncSubAgent, c as TASK_SYSTEM_PROMPT, d as registerHarnessProfile, f as generalPurposeSubagentConfigSchema, g as EMPTY_HARNESS_PROFILE, h as serializeProfile, i as StoreBackend, j as createPatchToolCallsMiddleware, k as createMemoryMiddleware, l as createDeepAgent, m as parseHarnessProfileConfig, n as BaseSandbox, o as BASE_AGENT_PROMPT, p as harnessProfileConfigSchema, q as SandboxError, r as ContextHubBackend, rt as normalizeReadPagination, s as EXECUTION_SYSTEM_PROMPT, t as LangSmithSandbox, u as getHarnessProfile, v as REQUIRED_MIDDLEWARE_NAMES, w as MAX_SKILL_NAME_LENGTH, x as createCompletionCallbackMiddleware, y as createAsyncSubAgentMiddleware, z as createSummarizationMiddleware } from "./langsmith-DYAFTn0y.js";
2
+ import { a as createAgentMemoryMiddleware, i as parseSkillMetadata, n as FilesystemBackend, o as createSettings, r as listSkills, s as findProjectRoot, t as LocalShellBackend } from "./src-B8R36RZW.js";
3
3
  export { ASYNC_TASK_SYSTEM_PROMPT, BASE_AGENT_PROMPT, BaseSandbox, CompositeBackend, ConfigurationError, ContextHubBackend, DEFAULT_GENERAL_PURPOSE_DESCRIPTION, DEFAULT_SUBAGENT_PROMPT, EMPTY_HARNESS_PROFILE, EXECUTION_SYSTEM_PROMPT, FilesystemBackend, GENERAL_PURPOSE_SUBAGENT, LangSmithSandbox, LocalShellBackend, MAX_SKILL_DESCRIPTION_LENGTH, MAX_SKILL_FILE_SIZE, MAX_SKILL_NAME_LENGTH, MULTIMODAL_BLOCK_TYPES, REQUIRED_MIDDLEWARE_NAMES, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, SandboxError, StateBackend, StoreBackend, TASK_SYSTEM_PROMPT, adaptBackendProtocol, adaptSandboxProtocol, applyGrepMaxCount, computeSummarizationDefaults, createAgentMemoryMiddleware, createAsyncSubAgentMiddleware, createCompletionCallbackMiddleware, createDeepAgent, createFilesystemMiddleware, createHarnessProfile, createMemoryMiddleware, createPatchToolCallsMiddleware, createSettings, createSkillsMiddleware, createSubAgent, createSubAgentMiddleware, createSummarizationMiddleware, createUnsupportedContentMiddleware, filesValue, findProjectRoot, generalPurposeSubagentConfigSchema, getHarnessProfile, harnessProfileConfigSchema, isAsyncSubAgent, isSandboxBackend, isSandboxProtocol, listSkills, multimodalBlockSupported, normalizeReadPagination, parseHarnessProfileConfig, parseSkillMetadata, pinnedSkillsValue, registerHarnessProfile, resolveBackend, scrubUnsupportedMultimodalContent, serializeProfile, skillsMetadataValue };
@@ -1,7 +1,7 @@
1
1
  import { AIMessage, HumanMessage, SystemMessage, ToolMessage, anthropicPromptCachingMiddleware, bedrockPromptCachingMiddleware, context, countTokensApproximately, createAgent, createMiddleware, humanInTheLoopMiddleware, modelRefusalMiddleware, todoListMiddleware, tool } from "langchain";
2
2
  import { omitPayload } from "@langchain/core/tracers/tracer_langchain";
3
3
  import { ContextOverflowError, ModelRefusalError } from "@langchain/core/errors";
4
- import { Command, Overwrite, REMOVE_ALL_MESSAGES, ReducedValue, StateSchema, getConfig, getCurrentTaskInput, getStore, isCommand, isGraphBubbleUp } from "@langchain/langgraph";
4
+ import { Command, DeltaValue, MessagesDeltaValue, Overwrite, REMOVE_ALL_MESSAGES, ReducedValue, StateSchema, getConfig, getCurrentTaskInput, getStore, isCommand, isGraphBubbleUp } from "@langchain/langgraph";
5
5
  import { z } from "zod/v4";
6
6
  import micromatch from "micromatch";
7
7
  import { createHash } from "node:crypto";
@@ -10,12 +10,13 @@ import { Runnable, RunnableBinding } from "@langchain/core/runnables";
10
10
  import * as z$2 from "zod";
11
11
  import { z as z$1 } from "zod";
12
12
  import { initChatModel } from "langchain/chat_models/universal";
13
+ import { schemaMetaRegistry } from "@langchain/langgraph/zod";
14
+ import { getInteropZodObjectShape, isInteropZodObject, isInteropZodSchema, isZodSchemaV4 } from "@langchain/core/utils/types";
13
15
  import yaml from "yaml";
14
16
  import { isLangChainTool } from "@langchain/core/tools";
15
17
  import { isOpenAITool } from "@langchain/core/language_models/base";
16
18
  import { convertToOpenAIFunction } from "@langchain/core/utils/function_calling";
17
19
  import { toJsonSchema } from "@langchain/core/utils/json_schema";
18
- import { isInteropZodSchema } from "@langchain/core/utils/types";
19
20
  import { Client } from "@langchain/langgraph-sdk";
20
21
  import { getCurrentRunTree } from "langsmith/traceable";
21
22
  import { Client as Client$1 } from "langsmith";
@@ -5127,6 +5128,45 @@ function createPatchToolCallsMiddleware() {
5127
5128
  * This module provides pre-configured ReducedValue instances that can be
5128
5129
  * reused across different state schemas, similar to LangGraph's messagesValue.
5129
5130
  */
5131
+ const deltaFields = { messages: new DeltaValue(MessagesDeltaValue.valueSchema, {
5132
+ inputSchema: MessagesDeltaValue.inputSchema,
5133
+ reducer: MessagesDeltaValue.reducer,
5134
+ snapshotFrequency: 50,
5135
+ jsonSchemaExtra: MessagesDeltaValue.jsonSchemaExtra
5136
+ }) };
5137
+ const defaultStateSchema = new StateSchema(deltaFields);
5138
+ /**
5139
+ * The state schema of a deep agent or subagent: the caller's fields, plus the
5140
+ * delta channels for every key the caller leaves out.
5141
+ *
5142
+ * A zod schema is copied field by field the way LangChain's `createAgent` reads
5143
+ * one, keeping reducers registered on zod v4 fields, because a StateSchema
5144
+ * cannot hold a zod object. Anything else `createAgent` ignores, so it is
5145
+ * ignored here too. This follows `createAgentState` in langchain 1.6.0
5146
+ * (`dist/agents/annotation.js`); recheck it when langchain changes how it
5147
+ * reads a state schema.
5148
+ */
5149
+ function deepAgentStateSchema(stateSchema) {
5150
+ if (StateSchema.isInstance(stateSchema)) return new StateSchema({
5151
+ ...deltaFields,
5152
+ ...stateSchema.fields
5153
+ });
5154
+ if (!isInteropZodObject(stateSchema)) return defaultStateSchema;
5155
+ const fields = {};
5156
+ for (const [key, field] of Object.entries(getInteropZodObjectShape(stateSchema))) {
5157
+ const reducer = isZodSchemaV4(field) ? schemaMetaRegistry.get(field)?.reducer : void 0;
5158
+ if (reducer === void 0) fields[key] = field;
5159
+ else if (reducer.schema === void 0) fields[key] = new ReducedValue(field, { reducer: reducer.fn });
5160
+ else fields[key] = new ReducedValue(field, {
5161
+ inputSchema: reducer.schema,
5162
+ reducer: reducer.fn
5163
+ });
5164
+ }
5165
+ return new StateSchema({
5166
+ ...deltaFields,
5167
+ ...fields
5168
+ });
5169
+ }
5130
5170
  /**
5131
5171
  * Shared ReducedValue for file data state management.
5132
5172
  *
@@ -7216,24 +7256,45 @@ function describeAsyncSubAgent(spec) {
7216
7256
  return `- ${spec.name}: ${spec.description}${suffix}`;
7217
7257
  }
7218
7258
  /**
7259
+ * Streaming for the runs this middleware starts on this deployment.
7260
+ *
7261
+ * An app that shows a subagent's thread, or the parent's thread after a
7262
+ * notification, joins runs it didn't start, and a join gets only what the run
7263
+ * streams. Like an app's own runs, these stream tokens and subgraphs, and keep
7264
+ * their events for a late join.
7265
+ */
7266
+ const STREAM_OPTIONS = {
7267
+ streamMode: [
7268
+ "values",
7269
+ "updates",
7270
+ "messages-tuple",
7271
+ "custom"
7272
+ ],
7273
+ streamSubgraphs: true,
7274
+ streamResumable: true
7275
+ };
7276
+ /**
7219
7277
  * The `runs.create` options that link a run to this agent and set the subagent's webhook.
7220
7278
  *
7221
- * A subagent on this deployment runs with this agent's context. The Agent Server
7222
- * takes `context` or `configurable`, not both, so the parent reference then goes
7223
- * through the thread's metadata.
7279
+ * A subagent on this deployment runs with this agent's context, and streams with
7280
+ * `STREAM_OPTIONS`. The Agent Server takes `context` or `configurable`, not both,
7281
+ * so the parent reference then goes through the thread's metadata.
7224
7282
  */
7225
7283
  function runOptions(spec, runtime) {
7226
- const webhook = spec.webhook ? { webhook: spec.webhook } : {};
7284
+ const options = {
7285
+ ...spec.url ? {} : STREAM_OPTIONS,
7286
+ ...spec.webhook ? { webhook: spec.webhook } : {}
7287
+ };
7227
7288
  const context = spec.url ? void 0 : forwardedContext(runtime.context);
7228
7289
  if (context) return {
7229
- ...webhook,
7290
+ ...options,
7230
7291
  context
7231
7292
  };
7232
7293
  const reference = referenceFor(spec, runtime.config);
7233
7294
  return Object.keys(reference).length > 0 ? {
7234
- ...webhook,
7295
+ ...options,
7235
7296
  config: { configurable: { [PARENT_KEY]: reference } }
7236
- } : webhook;
7297
+ } : options;
7237
7298
  }
7238
7299
  /** A run context as JSON data for another run, without deepagents' parent reference. */
7239
7300
  function forwardedContext(context) {
@@ -7435,6 +7496,7 @@ async function awakeParent(parentThreadId, assistantId, update, context) {
7435
7496
  await client.runs.create(parentThreadId, assistantId, {
7436
7497
  input: { messages: [notificationMessage(update)] },
7437
7498
  multitaskStrategy: "reject",
7499
+ ...STREAM_OPTIONS,
7438
7500
  ...context ? { context } : {}
7439
7501
  });
7440
7502
  } catch {}
@@ -8948,7 +9010,7 @@ function createDeepAgent(params = {}) {
8948
9010
  return createAgent({
8949
9011
  model,
8950
9012
  ...finalSystemPrompt !== "" && { systemPrompt: finalSystemPrompt },
8951
- stateSchema,
9013
+ stateSchema: deepAgentStateSchema(stateSchema),
8952
9014
  tools: effectiveTools,
8953
9015
  middleware,
8954
9016
  ...responseFormat !== null && { responseFormat },
@@ -11063,4 +11125,4 @@ var LangSmithSandbox = class LangSmithSandbox extends BaseSandbox {
11063
11125
  };
11064
11126
  export { adaptSandboxProtocol as $, filesValue as A, createFilesystemMiddleware as B, MAX_SKILL_FILE_SIZE as C, skillsMetadataValue as D, pinnedSkillsValue as E, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY as F, scrubUnsupportedMultimodalContent as G, MULTIMODAL_BLOCK_TYPES as H, createSubAgent as I, applyGrepMaxCount as J, StateBackend as K, createSubAgentMiddleware as L, DEFAULT_GENERAL_PURPOSE_DESCRIPTION as M, DEFAULT_SUBAGENT_PROMPT as N, ConfigurationError as O, GENERAL_PURPOSE_SUBAGENT as P, adaptBackendProtocol as Q, computeSummarizationDefaults as R, MAX_SKILL_DESCRIPTION_LENGTH as S, createSkillsMiddleware as T, createUnsupportedContentMiddleware as U, CompositeBackend as V, multimodalBlockSupported as W, isSandboxProtocol as X, isSandboxBackend as Y, resolveBackend as Z, createHarnessProfile as _, ASYNC_TASK_SYSTEM_PROMPT as a, setPin as at, isAsyncSubAgent as b, TASK_SYSTEM_PROMPT as c, registerHarnessProfile as d, checkEmptyContent as et, generalPurposeSubagentConfigSchema as f, EMPTY_HARNESS_PROFILE as g, serializeProfile as h, StoreBackend as i, performStringReplacement as it, createPatchToolCallsMiddleware as j, createMemoryMiddleware as k, createDeepAgent as l, parseHarnessProfileConfig as m, BaseSandbox as n, isTextMimeType as nt, BASE_AGENT_PROMPT as o, setRealpath as ot, harnessProfileConfigSchema as p, SandboxError as q, ContextHubBackend as r, normalizeReadPagination as rt, EXECUTION_SYSTEM_PROMPT as s, LangSmithSandbox as t, getMimeType as tt, getHarnessProfile as u, REQUIRED_MIDDLEWARE_NAMES as v, MAX_SKILL_NAME_LENGTH as w, createCompletionCallbackMiddleware as x, createAsyncSubAgentMiddleware as y, createSummarizationMiddleware as z };
11065
11127
 
11066
- //# sourceMappingURL=langsmith-CH6GPPud.js.map
11128
+ //# sourceMappingURL=langsmith-DYAFTn0y.js.map