deepagents 1.12.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_langsmith = require("./langsmith-CiiwzXI3.cjs");
2
+ const require_langsmith = require("./langsmith-DdOXam6Z.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 filesValue, B as StateBackend, C as createSummarizationMiddleware, D as MAX_SKILL_NAME_LENGTH, E as MAX_SKILL_FILE_SIZE, G as adaptBackendProtocol, H as isSandboxBackend, K as adaptSandboxProtocol, L as createSubAgentMiddleware, M as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, N as DEFAULT_SUBAGENT_PROMPT, O as createSkillsMiddleware, P as GENERAL_PURPOSE_SUBAGENT, R as createFilesystemMiddleware, S as computeSummarizationDefaults, T as MAX_SKILL_DESCRIPTION_LENGTH, U as isSandboxProtocol, V as SandboxError, W as resolveBackend, _ 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 createPatchToolCallsMiddleware, k as createMemoryMiddleware, l as createDeepAgent, m as parseHarnessProfileConfig, n as BaseSandbox, o as BASE_AGENT_PROMPT, p as harnessProfileConfigSchema, r as ContextHubBackend, s as EXECUTION_SYSTEM_PROMPT, t as LangSmithSandbox, u as getHarnessProfile, v as REQUIRED_MIDDLEWARE_NAMES, w as createCompletionCallbackMiddleware, x as isAsyncSubAgent, y as ConfigurationError, z as CompositeBackend } from "./langsmith-hz83LfzA.js";
1
+ import { A as filesValue, B as StateBackend, C as createSummarizationMiddleware, D as MAX_SKILL_NAME_LENGTH, E as MAX_SKILL_FILE_SIZE, G as adaptBackendProtocol, H as isSandboxBackend, K as adaptSandboxProtocol, L as createSubAgentMiddleware, M as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, N as DEFAULT_SUBAGENT_PROMPT, O as createSkillsMiddleware, P as GENERAL_PURPOSE_SUBAGENT, R as createFilesystemMiddleware, S as computeSummarizationDefaults, T as MAX_SKILL_DESCRIPTION_LENGTH, U as isSandboxProtocol, V as SandboxError, W as resolveBackend, _ 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 createPatchToolCallsMiddleware, k as createMemoryMiddleware, l as createDeepAgent, m as parseHarnessProfileConfig, n as BaseSandbox, o as BASE_AGENT_PROMPT, p as harnessProfileConfigSchema, r as ContextHubBackend, s as EXECUTION_SYSTEM_PROMPT, t as LangSmithSandbox, u as getHarnessProfile, v as REQUIRED_MIDDLEWARE_NAMES, w as createCompletionCallbackMiddleware, x as isAsyncSubAgent, y as ConfigurationError, z as CompositeBackend } from "./langsmith-DgbmWtWj.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-CiiwzXI3.cjs");
3
- const require_src = require("./src-BMXphRFQ.cjs");
2
+ const require_langsmith = require("./langsmith-DdOXam6Z.cjs");
3
+ const require_src = require("./src-BApYUljI.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 filesValue, B as StateBackend, C as createSummarizationMiddleware, D as MAX_SKILL_NAME_LENGTH, E as MAX_SKILL_FILE_SIZE, F as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, G as adaptBackendProtocol, H as isSandboxBackend, I as createSubAgent, K as adaptSandboxProtocol, L as createSubAgentMiddleware, M as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, N as DEFAULT_SUBAGENT_PROMPT, O as createSkillsMiddleware, P as GENERAL_PURPOSE_SUBAGENT, R as createFilesystemMiddleware, S as computeSummarizationDefaults, T as MAX_SKILL_DESCRIPTION_LENGTH, U as isSandboxProtocol, V as SandboxError, W as resolveBackend, _ 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 createPatchToolCallsMiddleware, k as createMemoryMiddleware, l as createDeepAgent, m as parseHarnessProfileConfig, n as BaseSandbox, o as BASE_AGENT_PROMPT, p as harnessProfileConfigSchema, r as ContextHubBackend, s as EXECUTION_SYSTEM_PROMPT, t as LangSmithSandbox, u as getHarnessProfile, v as REQUIRED_MIDDLEWARE_NAMES, w as createCompletionCallbackMiddleware, x as isAsyncSubAgent, y as ConfigurationError, z as CompositeBackend } from "./langsmith-hz83LfzA.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-BMn6YVTo.js";
1
+ import { A as filesValue, B as StateBackend, C as createSummarizationMiddleware, D as MAX_SKILL_NAME_LENGTH, E as MAX_SKILL_FILE_SIZE, F as SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY, G as adaptBackendProtocol, H as isSandboxBackend, I as createSubAgent, K as adaptSandboxProtocol, L as createSubAgentMiddleware, M as DEFAULT_GENERAL_PURPOSE_DESCRIPTION, N as DEFAULT_SUBAGENT_PROMPT, O as createSkillsMiddleware, P as GENERAL_PURPOSE_SUBAGENT, R as createFilesystemMiddleware, S as computeSummarizationDefaults, T as MAX_SKILL_DESCRIPTION_LENGTH, U as isSandboxProtocol, V as SandboxError, W as resolveBackend, _ 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 createPatchToolCallsMiddleware, k as createMemoryMiddleware, l as createDeepAgent, m as parseHarnessProfileConfig, n as BaseSandbox, o as BASE_AGENT_PROMPT, p as harnessProfileConfigSchema, r as ContextHubBackend, s as EXECUTION_SYSTEM_PROMPT, t as LangSmithSandbox, u as getHarnessProfile, v as REQUIRED_MIDDLEWARE_NAMES, w as createCompletionCallbackMiddleware, x as isAsyncSubAgent, y as ConfigurationError, z as CompositeBackend } from "./langsmith-DgbmWtWj.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-DeCEf6Ie.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, computeSummarizationDefaults, createAgentMemoryMiddleware, createAsyncSubAgentMiddleware, createCompletionCallbackMiddleware, createDeepAgent, createFilesystemMiddleware, createHarnessProfile, createMemoryMiddleware, createPatchToolCallsMiddleware, createSettings, createSkillsMiddleware, createSubAgent, createSubAgentMiddleware, createSummarizationMiddleware, filesValue, findProjectRoot, generalPurposeSubagentConfigSchema, getHarnessProfile, harnessProfileConfigSchema, isAsyncSubAgent, isSandboxBackend, isSandboxProtocol, listSkills, parseHarnessProfileConfig, parseSkillMetadata, registerHarnessProfile, resolveBackend, serializeProfile };
@@ -366,11 +366,32 @@ function validatePath$1(path) {
366
366
  return normalized;
367
367
  }
368
368
  /**
369
+ * Resolve the files under `path` for grep/glob search.
370
+ *
371
+ * If `path` exactly names a file that exists in `files`, only that file is
372
+ * returned (exact match) — this lets grep/glob target a specific file
373
+ * directly instead of only matching directories. Otherwise `path` is treated
374
+ * as a directory and files are filtered by the normalized directory prefix.
375
+ *
376
+ * @returns Filtered files map, or null if `path` is invalid (e.g. whitespace-only).
377
+ */
378
+ function filterFilesByPath(files, path) {
379
+ const exactPath = path ? path.startsWith("/") ? path : "/" + path : "/";
380
+ if (Object.prototype.hasOwnProperty.call(files, exactPath)) return { [exactPath]: files[exactPath] };
381
+ try {
382
+ const normalizedPath = validatePath$1(path);
383
+ return Object.fromEntries(Object.entries(files).filter(([fp]) => fp.startsWith(normalizedPath)));
384
+ } catch {
385
+ return null;
386
+ }
387
+ }
388
+ /**
369
389
  * Search files dict for paths matching glob pattern.
370
390
  *
371
391
  * @param files - Dictionary of file paths to FileData
372
392
  * @param pattern - Glob pattern (e.g., `*.py`, `**\/*.ts`)
373
- * @param path - Base path to search from
393
+ * @param path - Base path to search from. If `path` names an exact file, only
394
+ * that file is considered.
374
395
  * @returns Newline-separated file paths, sorted by modification time (most recent first).
375
396
  * Returns "No files found" if no matches.
376
397
  *
@@ -382,13 +403,9 @@ function validatePath$1(path) {
382
403
  * ```
383
404
  */
384
405
  function globSearchFiles(files, pattern, path = "/") {
385
- let normalizedPath;
386
- try {
387
- normalizedPath = validatePath$1(path);
388
- } catch {
389
- return "No files found";
390
- }
391
- const filtered = Object.fromEntries(Object.entries(files).filter(([fp]) => fp.startsWith(normalizedPath)));
406
+ const filtered = filterFilesByPath(files, path);
407
+ if (filtered === null) return "No files found";
408
+ const normalizedPath = validatePath$1(path);
392
409
  const effectivePattern = pattern;
393
410
  const matches = [];
394
411
  for (const [filePath, fileData] of Object.entries(filtered)) {
@@ -411,16 +428,12 @@ function globSearchFiles(files, pattern, path = "/") {
411
428
  * Return structured grep matches from an in-memory files mapping.
412
429
  *
413
430
  * Performs literal text search (not regex). Binary files are skipped.
431
+ * If `path` names an exact file, only that file is considered.
414
432
  * Returns an empty array when no matches are found or on invalid input.
415
433
  */
416
434
  function grepMatchesFromFiles(files, pattern, path = null, glob = null) {
417
- let normalizedPath;
418
- try {
419
- normalizedPath = validatePath$1(path);
420
- } catch {
421
- return [];
422
- }
423
- let filtered = Object.fromEntries(Object.entries(files).filter(([fp]) => fp.startsWith(normalizedPath)));
435
+ let filtered = filterFilesByPath(files, path);
436
+ if (filtered === null) return [];
424
437
  if (glob) filtered = Object.fromEntries(Object.entries(filtered).filter(([fp]) => micromatch.default.isMatch(basename(fp), glob, {
425
438
  dot: true,
426
439
  nobrace: false
@@ -7781,4 +7794,4 @@ Object.defineProperty(exports, "serializeProfile", {
7781
7794
  }
7782
7795
  });
7783
7796
 
7784
- //# sourceMappingURL=langsmith-CiiwzXI3.cjs.map
7797
+ //# sourceMappingURL=langsmith-DdOXam6Z.cjs.map