deepagents 1.13.5 → 1.14.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.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as AsyncTaskStatus, $t as BackendFactory, A as createSettings, An as resolveBackend, At as harnessProfileConfigSchema, B as FlattenSubAgentMiddleware, Bt as ConfigurationErrorCode, C as listSkills, Cn as SandboxListOptions, Ct as SubAgentMiddlewareOptions, D as filesValue, Dn as applyGrepMaxCount, Dt as registerHarnessProfile, E as createAgentMemoryMiddleware, En as WriteResult, Et as getHarnessProfile, F as CreateDeepAgentParams, Ft as GeneralPurposeSubagentConfig, G as InferSubagentByName, Gt as TASK_SYSTEM_PROMPT, H as InferDeepAgentType, Ht as BASE_AGENT_PROMPT, I as DeepAgent, It as HarnessProfile, J as ResolveDeepAgentTypeConfig, Jt as createFilesystemMiddleware, K as InferSubagentReactAgentType, Kt as FilesystemMiddlewareOptions, L as DeepAgentTypeConfig, Lt as HarnessProfileOptions, M as DeepAgentRunStream, Mn as SandboxBackendProtocolV2, Mt as serializeProfile, N as SubagentRunStream, Nn as BackendProtocolV1, Nt as EMPTY_HARNESS_PROFILE, O as Settings, On as isSandboxBackend, Ot as HarnessProfileConfigData, P as AnySubAgent, Pn as SandboxBackendProtocolV1, Pt as createHarnessProfile, Q as AsyncTask, Qt as AnyBackendProtocol, R as DefaultDeepAgentTypeConfig, Rt as REQUIRED_MIDDLEWARE_NAMES, S as SkillMetadata, Sn as SandboxInfo, St as SubAgent, T as AgentMemoryMiddlewareOptions, Tn as StateAndStore, Tt as createSubAgentMiddleware, U as InferStructuredResponse, Ut as EXECUTION_SYSTEM_PROMPT, V as InferDeepAgentSubagents, Vt as ASYNC_TASK_SYSTEM_PROMPT, W as InferSubAgentMiddlewareStates, Wt as SystemPromptConfig, X as AsyncSubAgent, Xt as FilesystemPermission, Y as SupportedResponseFormat, Yt as FilesystemOperation, Z as AsyncSubAgentMiddlewareOptions, Zt as PermissionMode, _ as StoreBackend, _n as SandboxBackendProtocol, _t as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, a as adaptBackendProtocol, an as FileData, at as createCompletionCallbackMiddleware, b as StoreBackendOptions, bn as SandboxErrorCode, bt as GENERAL_PURPOSE_SUBAGENT, c as LangSmithSandbox, cn as FileOperationError, ct as MAX_SKILL_NAME_LENGTH, d as BaseSandbox, dn as GrepMatch, dt as createSkillsMiddleware, en as BackendProtocol, et as createAsyncSubAgentMiddleware, f as LocalShellBackend, fn as GrepResult, ft as MemoryMiddlewareOptions, g as FilesystemBackend, gn as ReadResult, gt as CompiledSubAgent, h as CompositeBackend, hn as ReadRawResult, ht as createPatchToolCallsMiddleware, i as LangSmithStartSandboxOptions, in as ExecuteResponse, it as CompletionCallbackOptions, j as findProjectRoot, jn as BackendProtocolV2, jt as parseHarnessProfileConfig, k as SettingsOptions, kn as isSandboxProtocol, kt as generalPurposeSubagentConfigSchema, l as LangSmithSandboxCreateOptions, ln as FileUploadResponse, lt as SkillMetadata$1, m as ContextHubBackend, mn as MaybePromise, mt as StateBackend, n as LangSmithCaptureSnapshotOptions, nn as DeleteResult, nt as computeSummarizationDefaults, o as adaptSandboxProtocol, on as FileDownloadResponse, ot as MAX_SKILL_DESCRIPTION_LENGTH, p as LocalShellBackendOptions, pn as LsResult, pt as createMemoryMiddleware, q as MergedDeepAgentState, qt as FsToolName, r as LangSmithSnapshot, rn as EditResult, rt as createSummarizationMiddleware, s as normalizeReadPagination, sn as FileInfo, st as MAX_SKILL_FILE_SIZE, t as createDeepAgent, tn as BackendRuntime, tt as isAsyncSubAgent, u as LangSmithSandboxOptions, un as GlobResult, ut as SkillsMiddlewareOptions, v as StoreBackendContext, vn as SandboxDeleteOptions, vt as DEFAULT_SUBAGENT_PROMPT, w as parseSkillMetadata, wn as SandboxListResponse, wt as createSubAgent, x as ListSkillsOptions, xn as SandboxGetOrCreateOptions, xt as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, y as StoreBackendNamespaceFactory, yn as SandboxError, yt as ForkedSubAgent, z as ExtractSubAgentMiddleware, zt as ConfigurationError } from "./agent-CVBXKZAu.js";
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, 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 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 WriteResult, adaptBackendProtocol, adaptSandboxProtocol, applyGrepMaxCount, computeSummarizationDefaults, createAgentMemoryMiddleware, createAsyncSubAgentMiddleware, createCompletionCallbackMiddleware, createDeepAgent, createFilesystemMiddleware, createHarnessProfile, createMemoryMiddleware, createPatchToolCallsMiddleware, createSettings, createSkillsMiddleware, createSubAgent, createSubAgentMiddleware, createSummarizationMiddleware, filesValue, findProjectRoot, generalPurposeSubagentConfigSchema, getHarnessProfile, harnessProfileConfigSchema, isAsyncSubAgent, isSandboxBackend, isSandboxProtocol, listSkills, normalizeReadPagination, parseHarnessProfileConfig, parseSkillMetadata, registerHarnessProfile, resolveBackend, serializeProfile };
1
+ import { $ as AsyncTaskStatus, $t as PermissionMode, A as createSettings, An as isSandboxBackend, At as HarnessProfileConfigData, B as FlattenSubAgentMiddleware, Bt as REQUIRED_MIDDLEWARE_NAMES, C as listSkills, Cn as SandboxGetOrCreateOptions, Ct as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, D as filesValue, Dn as StateAndStore, Dt as createSubAgentMiddleware, E as createAgentMemoryMiddleware, En as SandboxListResponse, Et as createSubAgent, F as CreateDeepAgentParams, Fn as BackendProtocolV1, Ft as EMPTY_HARNESS_PROFILE, G as InferSubagentByName, Gt as EXECUTION_SYSTEM_PROMPT, H as InferDeepAgentType, Ht as ConfigurationErrorCode, I as DeepAgent, In as SandboxBackendProtocolV1, It as createHarnessProfile, J as ResolveDeepAgentTypeConfig, Jt as FilesystemMiddlewareOptions, K as InferSubagentReactAgentType, Kt as SystemPromptConfig, L as DeepAgentTypeConfig, Lt as GeneralPurposeSubagentConfig, M as DeepAgentRunStream, Mn as resolveBackend, Mt as harnessProfileConfigSchema, N as SubagentRunStream, Nn as BackendProtocolV2, Nt as parseHarnessProfileConfig, O as Settings, On as WriteResult, Ot as getHarnessProfile, P as AnySubAgent, Pn as SandboxBackendProtocolV2, Pt as serializeProfile, Q as AsyncTask, Qt as FilesystemPermission, R as DefaultDeepAgentTypeConfig, Rt as HarnessProfile, S as SkillMetadata, Sn as SandboxErrorCode, St as GENERAL_PURPOSE_SUBAGENT, T as AgentMemoryMiddlewareOptions, Tn as SandboxListOptions, Tt as SubAgentMiddlewareOptions, U as InferStructuredResponse, Ut as ASYNC_TASK_SYSTEM_PROMPT, V as InferDeepAgentSubagents, Vt as ConfigurationError, W as InferSubAgentMiddlewareStates, Wt as BASE_AGENT_PROMPT, X as AsyncSubAgent, Xt as createFilesystemMiddleware, Y as SupportedResponseFormat, Yt as FsToolName, Z as AsyncSubAgentMiddlewareOptions, Zt as FilesystemOperation, _ as StoreBackend, _n as ReadRawResult, _t as createPatchToolCallsMiddleware, a as adaptBackendProtocol, an as EditResult, at as createCompletionCallbackMiddleware, b as StoreBackendOptions, bn as SandboxDeleteOptions, bt as DEFAULT_SUBAGENT_PROMPT, c as LangSmithSandbox, cn as FileDownloadResponse, ct as MAX_SKILL_NAME_LENGTH, d as BaseSandbox, dn as FileUploadResponse, dt as SkillsMiddlewareOptions, en as AnyBackendProtocol, et as createAsyncSubAgentMiddleware, f as LocalShellBackend, fn as GlobResult, ft as createSkillsMiddleware, g as FilesystemBackend, gn as MaybePromise, gt as StateBackend, h as CompositeBackend, hn as LsResult, ht as createMemoryMiddleware, i as LangSmithStartSandboxOptions, in as DeleteResult, it as CompletionCallbackOptions, j as findProjectRoot, jn as isSandboxProtocol, jt as generalPurposeSubagentConfigSchema, k as SettingsOptions, kn as applyGrepMaxCount, kt as registerHarnessProfile, l as LangSmithSandboxCreateOptions, ln as FileInfo, lt as SkillMetadata$1, m as ContextHubBackend, mn as GrepResult, mt as MemoryMiddlewareOptions, n as LangSmithCaptureSnapshotOptions, nn as BackendProtocol, nt as computeSummarizationDefaults, o as adaptSandboxProtocol, on as ExecuteResponse, ot as MAX_SKILL_DESCRIPTION_LENGTH, p as LocalShellBackendOptions, pn as GrepMatch, pt as skillsMetadataValue, q as MergedDeepAgentState, qt as TASK_SYSTEM_PROMPT, r as LangSmithSnapshot, rn as BackendRuntime, rt as createSummarizationMiddleware, s as normalizeReadPagination, sn as FileData, st as MAX_SKILL_FILE_SIZE, t as createDeepAgent, tn as BackendFactory, tt as isAsyncSubAgent, u as LangSmithSandboxOptions, un as FileOperationError, ut as SkillMetadataEntry, v as StoreBackendContext, vn as ReadResult, vt as CompiledSubAgent, w as parseSkillMetadata, wn as SandboxInfo, wt as SubAgent, x as ListSkillsOptions, xn as SandboxError, xt as ForkedSubAgent, y as StoreBackendNamespaceFactory, yn as SandboxBackendProtocol, yt as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, z as ExtractSubAgentMiddleware, zt as HarnessProfileOptions } from "./agent-DGkf2K7U.js";
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, 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 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 WriteResult, adaptBackendProtocol, adaptSandboxProtocol, applyGrepMaxCount, computeSummarizationDefaults, createAgentMemoryMiddleware, createAsyncSubAgentMiddleware, createCompletionCallbackMiddleware, createDeepAgent, createFilesystemMiddleware, createHarnessProfile, createMemoryMiddleware, createPatchToolCallsMiddleware, createSettings, createSkillsMiddleware, createSubAgent, createSubAgentMiddleware, createSummarizationMiddleware, filesValue, findProjectRoot, generalPurposeSubagentConfigSchema, getHarnessProfile, harnessProfileConfigSchema, isAsyncSubAgent, isSandboxBackend, isSandboxProtocol, listSkills, normalizeReadPagination, parseHarnessProfileConfig, parseSkillMetadata, registerHarnessProfile, resolveBackend, serializeProfile, skillsMetadataValue };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { A as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, B as StateBackend, C as MAX_SKILL_DESCRIPTION_LENGTH, D as createMemoryMiddleware, E as createSkillsMiddleware, F as createSubAgentMiddleware, G as resolveBackend, H as applyGrepMaxCount, I as computeSummarizationDefaults, K as adaptBackendProtocol, L as createSummarizationMiddleware, M as GENERAL_PURPOSE_SUBAGENT, N as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, O as filesValue, P as createSubAgent, R as createFilesystemMiddleware, S as createCompletionCallbackMiddleware, T as MAX_SKILL_NAME_LENGTH, U as isSandboxBackend, V as SandboxError, W as isSandboxProtocol, Z as normalizeReadPagination, _ as createHarnessProfile, a as ASYNC_TASK_SYSTEM_PROMPT, b as createAsyncSubAgentMiddleware, c as TASK_SYSTEM_PROMPT, d as registerHarnessProfile, f as generalPurposeSubagentConfigSchema, g as EMPTY_HARNESS_PROFILE, h as serializeProfile, i as StoreBackend, j as DEFAULT_SUBAGENT_PROMPT, k as createPatchToolCallsMiddleware, l as createDeepAgent, m as parseHarnessProfileConfig, n as BaseSandbox, o as BASE_AGENT_PROMPT, p as harnessProfileConfigSchema, q as adaptSandboxProtocol, r as ContextHubBackend, s as EXECUTION_SYSTEM_PROMPT, t as LangSmithSandbox, u as getHarnessProfile, v as REQUIRED_MIDDLEWARE_NAMES, w as MAX_SKILL_FILE_SIZE, x as isAsyncSubAgent, y as ConfigurationError, z as CompositeBackend } from "./langsmith-CY7MawjU.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-Bos_UCsK.js";
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, 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, filesValue, findProjectRoot, generalPurposeSubagentConfigSchema, getHarnessProfile, harnessProfileConfigSchema, isAsyncSubAgent, isSandboxBackend, isSandboxProtocol, listSkills, normalizeReadPagination, parseHarnessProfileConfig, parseSkillMetadata, registerHarnessProfile, resolveBackend, serializeProfile };
1
+ import { A as createPatchToolCallsMiddleware, B as CompositeBackend, C as MAX_SKILL_DESCRIPTION_LENGTH, D as skillsMetadataValue, E as createSkillsMiddleware, F as createSubAgent, G as isSandboxProtocol, H as SandboxError, I as createSubAgentMiddleware, J as adaptSandboxProtocol, K as resolveBackend, L as computeSummarizationDefaults, M as DEFAULT_SUBAGENT_PROMPT, N as GENERAL_PURPOSE_SUBAGENT, O as createMemoryMiddleware, P as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, Q as normalizeReadPagination, R as createSummarizationMiddleware, S as createCompletionCallbackMiddleware, T as MAX_SKILL_NAME_LENGTH, U as applyGrepMaxCount, V as StateBackend, W as isSandboxBackend, _ as createHarnessProfile, a as ASYNC_TASK_SYSTEM_PROMPT, b as createAsyncSubAgentMiddleware, c as TASK_SYSTEM_PROMPT, d as registerHarnessProfile, f as generalPurposeSubagentConfigSchema, g as EMPTY_HARNESS_PROFILE, h as serializeProfile, i as StoreBackend, j as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, k as filesValue, l as createDeepAgent, m as parseHarnessProfileConfig, n as BaseSandbox, o as BASE_AGENT_PROMPT, p as harnessProfileConfigSchema, q as adaptBackendProtocol, r as ContextHubBackend, s as EXECUTION_SYSTEM_PROMPT, t as LangSmithSandbox, u as getHarnessProfile, v as REQUIRED_MIDDLEWARE_NAMES, w as MAX_SKILL_FILE_SIZE, x as isAsyncSubAgent, y as ConfigurationError, z as createFilesystemMiddleware } from "./langsmith-3LzYb-m7.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-gIoHrhh3.js";
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, 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, filesValue, findProjectRoot, generalPurposeSubagentConfigSchema, getHarnessProfile, harnessProfileConfigSchema, isAsyncSubAgent, isSandboxBackend, isSandboxProtocol, listSkills, normalizeReadPagination, parseHarnessProfileConfig, parseSkillMetadata, registerHarnessProfile, resolveBackend, serializeProfile, skillsMetadataValue };
@@ -3596,6 +3596,11 @@ const EXCLUDED_STATE_KEYS = [
3596
3596
  * the parent's private channels (skills metadata, memory contents, etc.)
3597
3597
  * to rebuild an equivalent prompt.
3598
3598
  *
3599
+ * A pending invalidation propagates: a fork spawned in the same iteration
3600
+ * that set `skillsMetadata` to `null` inherits the `null`, so its mirrored
3601
+ * skills middleware reloads from its own sources rather than seeing the
3602
+ * parent's last loaded list.
3603
+ *
3599
3604
  * Call counts stay excluded: a fork inherits the parent's middleware, so
3600
3605
  * sharing them collides on the parent's channel.
3601
3606
  */
@@ -4560,30 +4565,37 @@ const SkillMetadataEntrySchema = z$1.object({
4560
4565
  module: z$1.string().optional()
4561
4566
  });
4562
4567
  /**
4563
- * Reducer for skillsMetadata that merges arrays from parallel subagents.
4564
- * Skills are deduplicated by name, with later values overriding earlier ones.
4568
+ * State value for a middleware's `skillsMetadata` field.
4569
+ *
4570
+ * A middleware can only read and write the fields declared on its own state
4571
+ * schema. A middleware that needs `skillsMetadata` — to inspect the skills
4572
+ * loaded for the thread, or to set the field to `null` and make the next model
4573
+ * call reload every source — declares it with this value.
4574
+ *
4575
+ * Treat the value as opaque: it is meant to be passed to `StateSchema`, and
4576
+ * its concrete type is an implementation detail that may change. To type an
4577
+ * individual entry, use {@link SkillMetadataEntry}.
4578
+ *
4579
+ * @example
4580
+ * ```typescript
4581
+ * import { createMiddleware } from "langchain";
4582
+ * import { StateSchema } from "@langchain/langgraph";
4583
+ * import { skillsMetadataValue } from "deepagents";
4565
4584
  *
4566
- * @param current - The current skillsMetadata array (from state)
4567
- * @param update - The new skillsMetadata array (from a subagent update)
4568
- * @returns Merged array with duplicates resolved by name (later values win)
4585
+ * const reloadEditedSkills = createMiddleware({
4586
+ * name: "ReloadEditedSkills",
4587
+ * stateSchema: new StateSchema({ skillsMetadata: skillsMetadataValue }),
4588
+ * afterAgent: (state) =>
4589
+ * agentEditedSkills(state) ? { skillsMetadata: null } : undefined,
4590
+ * });
4591
+ * ```
4569
4592
  */
4570
- function skillsMetadataReducer(current, update) {
4571
- if (!update || update.length === 0) return current || [];
4572
- if (!current || current.length === 0) return update;
4573
- const merged = /* @__PURE__ */ new Map();
4574
- for (const skill of current) merged.set(skill.name, skill);
4575
- for (const skill of update) merged.set(skill.name, skill);
4576
- return Array.from(merged.values());
4577
- }
4593
+ const skillsMetadataValue = z$1.array(SkillMetadataEntrySchema).nullish();
4578
4594
  /**
4579
4595
  * State schema for skills middleware.
4580
- * Uses ReducedValue for skillsMetadata to allow concurrent updates from parallel subagents.
4581
4596
  */
4582
4597
  const SkillsStateSchema = new StateSchema({
4583
- skillsMetadata: new ReducedValue(z$1.array(SkillMetadataEntrySchema).default(() => []), {
4584
- inputSchema: z$1.array(SkillMetadataEntrySchema).optional(),
4585
- reducer: skillsMetadataReducer
4586
- }),
4598
+ skillsMetadata: skillsMetadataValue,
4587
4599
  files: filesValue
4588
4600
  });
4589
4601
  /**
@@ -4920,6 +4932,21 @@ function validateModulePath(raw) {
4920
4932
  * pattern: skill names and descriptions are shown in the prompt, but the agent
4921
4933
  * reads full SKILL.md content only when needed.
4922
4934
  *
4935
+ * Skills are loaded once per thread and stored in state. To pick up skills
4936
+ * added, edited, or deleted since then, set `skillsMetadata` to `null`; the
4937
+ * next model call reloads every source:
4938
+ *
4939
+ * ```ts
4940
+ * await agent.updateState(config, { skillsMetadata: null });
4941
+ * // or as part of the next run's input
4942
+ * await agent.invoke({ messages, skillsMetadata: null }, config);
4943
+ * ```
4944
+ *
4945
+ * Loading happens in `beforeModel`, so the reload is served by the next model
4946
+ * call rather than the next run. A middleware of your own can therefore
4947
+ * invalidate from any hook — including mid-run, from `afterModel` — and see
4948
+ * the fresh list on the following call. See {@link skillsMetadataValue}.
4949
+ *
4923
4950
  * @param options - Configuration options
4924
4951
  * @returns AgentMiddleware for skills loading and injection
4925
4952
  *
@@ -4936,8 +4963,8 @@ function createSkillsMiddleware(options) {
4936
4963
  return createMiddleware({
4937
4964
  name: "SkillsMiddleware",
4938
4965
  stateSchema: SkillsStateSchema,
4939
- async beforeAgent(state) {
4940
- if ("skillsMetadata" in state && Array.isArray(state.skillsMetadata) && state.skillsMetadata.length > 0) return;
4966
+ async beforeModel(state) {
4967
+ if (state.skillsMetadata !== null && state.skillsMetadata !== void 0) return;
4941
4968
  const resolvedBackend = await resolveBackend(backend, { state });
4942
4969
  const allSkills = /* @__PURE__ */ new Map();
4943
4970
  for (const sourcePath of sources) try {
@@ -8851,6 +8878,6 @@ var LangSmithSandbox = class LangSmithSandbox extends BaseSandbox {
8851
8878
  }
8852
8879
  };
8853
8880
  //#endregion
8854
- 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 };
8881
+ export { performStringReplacement as $, createPatchToolCallsMiddleware as A, CompositeBackend as B, MAX_SKILL_DESCRIPTION_LENGTH as C, skillsMetadataValue as D, createSkillsMiddleware as E, createSubAgent as F, isSandboxProtocol as G, SandboxError as H, createSubAgentMiddleware as I, adaptSandboxProtocol as J, resolveBackend as K, computeSummarizationDefaults as L, DEFAULT_SUBAGENT_PROMPT as M, GENERAL_PURPOSE_SUBAGENT as N, createMemoryMiddleware as O, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY as P, normalizeReadPagination as Q, createSummarizationMiddleware as R, createCompletionCallbackMiddleware as S, MAX_SKILL_NAME_LENGTH as T, applyGrepMaxCount as U, StateBackend as V, isSandboxBackend as W, getMimeType as X, checkEmptyContent as Y, isTextMimeType 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_GENERAL_PURPOSE_DESCRIPTION as j, filesValue as k, createDeepAgent as l, parseHarnessProfileConfig as m, BaseSandbox as n, BASE_AGENT_PROMPT as o, harnessProfileConfigSchema as p, adaptBackendProtocol 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, createFilesystemMiddleware as z };
8855
8882
 
8856
- //# sourceMappingURL=langsmith-CY7MawjU.js.map
8883
+ //# sourceMappingURL=langsmith-3LzYb-m7.js.map