deepagents 1.13.3 → 1.13.4

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/browser.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_langsmith = require("./langsmith-Ynj9VKxb.cjs");
2
+ const require_langsmith = require("./langsmith-yA3yhBRa.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.js CHANGED
@@ -1,2 +1,2 @@
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, I as computeSummarizationDefaults, K as adaptBackendProtocol, L as createSummarizationMiddleware, M as GENERAL_PURPOSE_SUBAGENT, O as filesValue, R as createFilesystemMiddleware, S as createCompletionCallbackMiddleware, T as MAX_SKILL_NAME_LENGTH, U as isSandboxBackend, V as SandboxError, W as isSandboxProtocol, _ 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-BYWZnEVh.js";
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, I as computeSummarizationDefaults, K as adaptBackendProtocol, L as createSummarizationMiddleware, M as GENERAL_PURPOSE_SUBAGENT, O as filesValue, R as createFilesystemMiddleware, S as createCompletionCallbackMiddleware, T as MAX_SKILL_NAME_LENGTH, U as isSandboxBackend, V as SandboxError, W as isSandboxProtocol, _ 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-BAO_h4J6.js";
2
2
  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, GENERAL_PURPOSE_SUBAGENT, LangSmithSandbox, MAX_SKILL_DESCRIPTION_LENGTH, MAX_SKILL_FILE_SIZE, MAX_SKILL_NAME_LENGTH, REQUIRED_MIDDLEWARE_NAMES, SandboxError, StateBackend, StoreBackend, TASK_SYSTEM_PROMPT, adaptBackendProtocol, adaptSandboxProtocol, computeSummarizationDefaults, createAsyncSubAgentMiddleware, createCompletionCallbackMiddleware, createDeepAgent, createFilesystemMiddleware, createHarnessProfile, createMemoryMiddleware, createPatchToolCallsMiddleware, createSkillsMiddleware, createSubAgentMiddleware, createSummarizationMiddleware, filesValue, generalPurposeSubagentConfigSchema, getHarnessProfile, harnessProfileConfigSchema, isAsyncSubAgent, isSandboxBackend, isSandboxProtocol, parseHarnessProfileConfig, registerHarnessProfile, resolveBackend, serializeProfile };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_langsmith = require("./langsmith-Ynj9VKxb.cjs");
3
- const require_src = require("./src-DRMLI0-x.cjs");
2
+ const require_langsmith = require("./langsmith-yA3yhBRa.cjs");
3
+ const require_src = require("./src-D_XxmEak.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.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-BYWZnEVh.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-Blh1ZEYd.js";
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-BAO_h4J6.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-CcY34Ckx.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, 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 };
@@ -3451,6 +3451,24 @@ const DEFAULT_SUBAGENT_PROMPT = "In order to complete the objective that the use
3451
3451
  const FORKED_CONTEXT_KEY = "_deepagentsForkedContext";
3452
3452
  const FORK_RECURSION_REFUSAL = "You are a subagent and cannot delegate to another subagent. Complete this task yourself instead of calling this tool again.";
3453
3453
  /**
3454
+ * Per-graph call accounting owned by the upstream limit middlewares. Upstream
3455
+ * declares these as plain values, so LangGraph gives them single-writer
3456
+ * `LastValue` channels: forwarding them crashed parallel delegation and let a
3457
+ * subagent's reset overwrite the parent's budget. Each agent counts its own
3458
+ * calls, so they never cross the boundary.
3459
+ *
3460
+ * Matching by name is targeted, not structural — other middleware declaring
3461
+ * plain state still collide, notably in a fork. A later change should derive
3462
+ * these keys from each subagent's middleware `stateSchema` and forward only
3463
+ * mergeable (`ReducedValue`) channels.
3464
+ */
3465
+ const CALL_COUNT_STATE_KEYS = [
3466
+ "threadModelCallCount",
3467
+ "runModelCallCount",
3468
+ "threadToolCallCount",
3469
+ "runToolCallCount"
3470
+ ];
3471
+ /**
3454
3472
  * State keys excluded when passing state to subagents and when returning
3455
3473
  * updates from subagents. Summarization keys are excluded because their
3456
3474
  * cutoffIndex is only valid against the message list it was computed from.
@@ -3461,6 +3479,7 @@ const EXCLUDED_STATE_KEYS = [
3461
3479
  "structuredResponse",
3462
3480
  "skillsMetadata",
3463
3481
  "memoryContents",
3482
+ ...CALL_COUNT_STATE_KEYS,
3464
3483
  "_summarizationEvent",
3465
3484
  "_summarizationSessionId",
3466
3485
  FORKED_CONTEXT_KEY
@@ -3470,9 +3489,13 @@ const EXCLUDED_STATE_KEYS = [
3470
3489
  * Narrower than `EXCLUDED_STATE_KEYS`: a fork's mirrored middleware needs
3471
3490
  * the parent's private channels (skills metadata, memory contents, etc.)
3472
3491
  * to rebuild an equivalent prompt.
3492
+ *
3493
+ * Call counts stay excluded: a fork inherits the parent's middleware, so
3494
+ * sharing them collides on the parent's channel.
3473
3495
  */
3474
3496
  const FORK_EXCLUDED_STATE_KEYS = [
3475
3497
  "structuredResponse",
3498
+ ...CALL_COUNT_STATE_KEYS,
3476
3499
  "_summarizationEvent",
3477
3500
  "_summarizationSessionId"
3478
3501
  ];
@@ -8731,4 +8754,4 @@ var LangSmithSandbox = class LangSmithSandbox extends BaseSandbox {
8731
8754
  //#endregion
8732
8755
  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
8756
 
8734
- //# sourceMappingURL=langsmith-BYWZnEVh.js.map
8757
+ //# sourceMappingURL=langsmith-BAO_h4J6.js.map