deepagents 1.12.4 → 1.13.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.
@@ -94,10 +94,14 @@ interface BackendProtocolV1 {
94
94
  */
95
95
  edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): MaybePromise<EditResult>;
96
96
  /**
97
- * Delete a single file.
97
+ * Delete a path, recursively removing anything nested under it.
98
98
  *
99
- * @param filePath - Absolute path to the file to delete
100
- * @returns DeleteResult with path on success or error on failure
99
+ * This method is optional. Backends that do not implement it should omit it;
100
+ * callers that need broad backend compatibility should check for support before
101
+ * calling.
102
+ *
103
+ * @param filePath - Absolute path to delete (a file, or a directory/prefix to remove recursively).
104
+ * @returns DeleteResult with path on success or error on failure.
101
105
  */
102
106
  delete?(filePath: string): MaybePromise<DeleteResult>;
103
107
  /**
@@ -210,7 +214,7 @@ interface BackendProtocolV2 extends Omit<BackendProtocolV1, "read" | "readRaw" |
210
214
  */
211
215
  glob(pattern: string, path?: string): MaybePromise<GlobResult>;
212
216
  /**
213
- * Delete a single file.
217
+ * Delete a file or directory recursively.
214
218
  * Optional - backends that don't support file deletion can omit this.
215
219
  *
216
220
  * @param filePath - Absolute path to the file to delete
@@ -444,8 +448,23 @@ interface EditResult {
444
448
  interface DeleteResult {
445
449
  /** Error message on failure, undefined on success */
446
450
  error?: string;
447
- /** File path of deleted file, undefined on failure */
451
+ /** File path of deleted file or directory, undefined on failure */
448
452
  path?: string;
453
+ /**
454
+ * State update dict for checkpoint backends, null for external storage.
455
+ * Deletions are represented as null values keyed by removed path.
456
+ *
457
+ * @deprecated Only the deprecated legacy (runtime-injected) `StateBackend`
458
+ * still populates this field. A modern zero-argument `StateBackend` publishes
459
+ * its own deletion markers through LangGraph's `__pregel_send` channel and
460
+ * returns only `path`, so callers no longer need to apply a `Command` from
461
+ * this value. The delete tool and `CompositeBackend` continue to honor it
462
+ * while the legacy `StateBackend` constructor remains supported; it will be
463
+ * removed alongside that constructor.
464
+ */
465
+ filesUpdate?: Record<string, null> | null;
466
+ /** Metadata for the delete operation, attached to the ToolMessage */
467
+ metadata?: Record<string, unknown>;
449
468
  }
450
469
  /**
451
470
  * Result of code execution.
@@ -799,7 +818,7 @@ interface FilesystemPermission {
799
818
  * truncate the result of read_file, the agent may then attempt to re-read the
800
819
  * truncated file using read_file again, which won't help.
801
820
  *
802
- * 3. Tools that never exceed limits (edit_file, write_file):
821
+ * 3. Tools that never exceed limits (edit_file, write_file, delete):
803
822
  * These tools return minimal confirmation messages and are never expected to produce
804
823
  * output large enough to exceed token limits, so checking them would be unnecessary.
805
824
  */
@@ -808,7 +827,7 @@ interface FilesystemPermission {
808
827
  * This is the single source of truth — used by createDeepAgent to detect
809
828
  * collisions with user-supplied tools at construction time.
810
829
  */
811
- declare const FILESYSTEM_TOOL_NAMES: readonly ["ls", "read_file", "write_file", "edit_file", "glob", "grep", "execute"];
830
+ declare const FILESYSTEM_TOOL_NAMES: readonly ["ls", "read_file", "write_file", "edit_file", "delete", "glob", "grep", "execute"];
812
831
  /**
813
832
  * Built-in filesystem tool names accepted by
814
833
  * {@link createFilesystemMiddleware}'s `tools` allowlist.
@@ -979,7 +998,7 @@ declare function createFilesystemMiddleware(options?: FilesystemMiddlewareOption
979
998
  data: string;
980
999
  }[] | ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "read_file"> | _langchain.DynamicStructuredTool<z.ZodPreprocess<z.ZodObject<{
981
1000
  file_path: z.ZodString;
982
- content: z.ZodDefault<z.ZodString>;
1001
+ content: z.ZodString;
983
1002
  }, z.core.$strip>>, {
984
1003
  file_path: string;
985
1004
  content: string;
@@ -999,7 +1018,14 @@ declare function createFilesystemMiddleware(options?: FilesystemMiddlewareOption
999
1018
  }, unknown, string | Command<unknown, {
1000
1019
  files: Record<string, FileData>;
1001
1020
  messages: ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>[];
1002
- }, string> | ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "edit_file">)[], readonly []>;
1021
+ }, string> | ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "edit_file"> | _langchain.DynamicStructuredTool<z.ZodPreprocess<z.ZodObject<{
1022
+ file_path: z.ZodString;
1023
+ }, z.core.$strip>>, {
1024
+ file_path: string;
1025
+ }, unknown, Command<unknown, {
1026
+ files: Record<string, null>;
1027
+ messages: ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>[];
1028
+ }, string> | ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "delete">)[], readonly []>;
1003
1029
  //#endregion
1004
1030
  //#region src/compat.d.ts
1005
1031
  /**
@@ -1465,44 +1491,33 @@ interface CompiledSubAgent<TRunnable extends ReactAgent<any> | Runnable = ReactA
1465
1491
  description: string;
1466
1492
  /** The agent instance */
1467
1493
  runnable: TRunnable;
1494
+ /**
1495
+ * Context mode. `"fork"` inherits the parent's conversation history
1496
+ * (but not its system prompt — that's baked into the runnable).
1497
+ * `"handoff"` (default) is fully isolated.
1498
+ */
1499
+ mode?: "handoff" | "fork";
1468
1500
  }
1469
1501
  /**
1470
- * Specification for a subagent that can be dynamically created.
1502
+ * Fields shared by both {@link SubAgent} and {@link ForkedSubAgent}.
1471
1503
  *
1472
- * When using `createDeepAgent`, subagents automatically receive a default middleware
1473
- * stack (filesystemMiddleware, summarizationMiddleware, etc.) before any custom
1474
- * `middleware` specified in this spec. Add `todoListMiddleware` explicitly to opt in.
1475
- *
1476
- * Required fields:
1477
- * - `name`: Identifier used to select this subagent in the task tool
1478
- * - `description`: Shown to the model for subagent selection
1479
- * - `systemPrompt`: The system prompt for the subagent
1480
- *
1481
- * Optional fields:
1482
- * - `model`: Override the default model for this subagent
1483
- * - `tools`: Override the default tools for this subagent
1484
- * - `middleware`: Additional middleware appended after defaults
1485
- * - `interruptOn`: Human-in-the-loop configuration for specific tools
1486
- * - `skills`: Skill source paths for SkillsMiddleware (e.g., `["/skills/user/", "/skills/project/"]`)
1487
- *
1488
- * @example
1489
- * ```typescript
1490
- * const researcher: SubAgent = {
1491
- * name: "researcher",
1492
- * description: "Research assistant for complex topics",
1493
- * systemPrompt: "You are a research assistant.",
1494
- * tools: [webSearchTool],
1495
- * skills: ["/skills/research/"],
1496
- * };
1497
- * ```
1504
+ * @internal
1498
1505
  */
1499
- interface SubAgent {
1506
+ interface SubAgentBase {
1500
1507
  /** Identifier used to select this subagent in the task tool */
1501
1508
  name: string;
1502
1509
  /** Description shown to the model for subagent selection */
1503
1510
  description: string;
1504
- /** The system prompt to use for the agent */
1505
- systemPrompt: string;
1511
+ /**
1512
+ * The system prompt for the agent. Required on {@link SubAgent}; forbidden
1513
+ * on {@link ForkedSubAgent}, which always inherits the parent's instead.
1514
+ */
1515
+ systemPrompt?: string | SystemMessage;
1516
+ /**
1517
+ * Context mode. `"handoff"` (default) is fully isolated. `"fork"` inherits
1518
+ * the parent's conversation history and system prompt.
1519
+ */
1520
+ mode?: "handoff" | "fork";
1506
1521
  /** The tools to use for the agent (tool instances, not names). Defaults to defaultTools */
1507
1522
  tools?: StructuredTool[];
1508
1523
  /** The model for the agent. Defaults to defaultModel */
@@ -1580,6 +1595,69 @@ interface SubAgent {
1580
1595
  */
1581
1596
  permissions?: FilesystemPermission[];
1582
1597
  }
1598
+ /**
1599
+ * Specification for a subagent that can be dynamically created.
1600
+ *
1601
+ * When using `createDeepAgent`, subagents automatically receive a default middleware
1602
+ * stack (filesystemMiddleware, summarizationMiddleware, etc.) before any custom
1603
+ * `middleware` specified in this spec. Add `todoListMiddleware` explicitly to opt in.
1604
+ *
1605
+ * Always fully isolated — this subagent only ever sees the task description,
1606
+ * never the parent's conversation. Use {@link ForkedSubAgent} to inherit the
1607
+ * parent's history and system prompt instead.
1608
+ *
1609
+ * @example
1610
+ * ```typescript
1611
+ * const researcher: SubAgent = {
1612
+ * name: "researcher",
1613
+ * description: "Research assistant for complex topics",
1614
+ * systemPrompt: "You are a research assistant.",
1615
+ * tools: [webSearchTool],
1616
+ * skills: ["/skills/research/"],
1617
+ * };
1618
+ * ```
1619
+ */
1620
+ interface SubAgent extends SubAgentBase {
1621
+ /** The system prompt to use for the agent */
1622
+ systemPrompt?: string | SystemMessage;
1623
+ /**
1624
+ * Context mode. `"handoff"` (default) is fully isolated. `"fork"` inherits
1625
+ * the parent's conversation history and system prompt.
1626
+ */
1627
+ mode?: "handoff";
1628
+ }
1629
+ /**
1630
+ * Specification for a subagent that inherits the parent's conversation
1631
+ * instead of starting from just the task description.
1632
+ *
1633
+ * Always forks: it inherits the parent's full message history and its exact
1634
+ * system prompt (there's no own prompt to fall back to). Mirrored middleware
1635
+ * is only added when its model matches the parent's, since that's the only
1636
+ * case with a cache benefit to protect. Deliberately has no `systemPrompt`
1637
+ * of its own: since its system slot always carries the parent's prompt,
1638
+ * there's nothing of its own to put there. If you need a subagent with a
1639
+ * distinguishing system prompt, use {@link SubAgent} without forking instead.
1640
+ *
1641
+ * @example
1642
+ * ```typescript
1643
+ * const researcher: ForkedSubAgent = {
1644
+ * name: "researcher",
1645
+ * description: "Continues the current investigation with full context",
1646
+ * tools: [webSearchTool],
1647
+ * };
1648
+ * ```
1649
+ *
1650
+ * @experimental Forking subagents is experimental and subject to change
1651
+ */
1652
+ interface ForkedSubAgent extends SubAgentBase {
1653
+ /** A ForkedSubAgent never has its own system prompt — always the parent's. */
1654
+ systemPrompt?: undefined;
1655
+ /**
1656
+ * Context mode. `"handoff"` (default) is fully isolated. `"fork"` inherits
1657
+ * the parent's conversation history and system prompt.
1658
+ */
1659
+ mode?: "fork";
1660
+ }
1583
1661
  /**
1584
1662
  * Base specification for the general-purpose subagent.
1585
1663
  *
@@ -1617,7 +1695,12 @@ interface SubAgent {
1617
1695
  * });
1618
1696
  * ```
1619
1697
  */
1620
- declare const GENERAL_PURPOSE_SUBAGENT: Pick<SubAgent, "name" | "description" | "systemPrompt">;
1698
+ declare const GENERAL_PURPOSE_SUBAGENT: {
1699
+ readonly name: "general-purpose";
1700
+ readonly description: "General-purpose agent for researching complex questions, searching for files and content, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries use this agent to perform the search for you. This agent has access to all tools as the main agent.";
1701
+ readonly systemPrompt: "In order to complete the objective that the user asks of you, you have access to a number of standard tools.";
1702
+ readonly mode: "handoff";
1703
+ };
1621
1704
  /**
1622
1705
  * Create a runnable agent from a declarative `SubAgent` spec.
1623
1706
  *
@@ -1652,13 +1735,15 @@ interface SubAgentMiddlewareOptions {
1652
1735
  /** The tool configs for the default general-purpose subagent */
1653
1736
  defaultInterruptOn?: Record<string, boolean | InterruptOnConfig> | null;
1654
1737
  /** A list of additional subagents to provide to the agent */
1655
- subagents?: (SubAgent | CompiledSubAgent)[];
1738
+ subagents?: (SubAgent | CompiledSubAgent | ForkedSubAgent)[];
1656
1739
  /** Full system prompt override */
1657
1740
  systemPrompt?: string | null;
1658
1741
  /** Whether to include the general-purpose agent */
1659
1742
  generalPurposeAgent?: boolean;
1660
1743
  /** Custom description for the task tool */
1661
1744
  taskDescription?: string | null;
1745
+ /** Inherited by `ForkedSubAgent`s and `mode: "fork"` compiled subagents */
1746
+ parentSystemPrompt?: string | SystemMessage | null;
1662
1747
  }
1663
1748
  /**
1664
1749
  * Create subagent middleware with task tool
@@ -1790,15 +1875,17 @@ declare class StateBackend implements BackendProtocolV2 {
1790
1875
  * Returns WriteResult with filesUpdate to update LangGraph state.
1791
1876
  */
1792
1877
  write(filePath: string, content: string): WriteResult;
1878
+ /**
1879
+ * Delete a file or directory from state.
1880
+ *
1881
+ * Removes the exact file path plus every nested key under it.
1882
+ */
1883
+ delete(filePath: string): DeleteResult;
1793
1884
  /**
1794
1885
  * Edit a file by replacing string occurrences.
1795
1886
  * Returns EditResult with filesUpdate and occurrences.
1796
1887
  */
1797
1888
  edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): EditResult;
1798
- /**
1799
- * Delete a file from state by sending a null deletion marker through Pregel.
1800
- */
1801
- delete(filePath: string): DeleteResult;
1802
1889
  /**
1803
1890
  * Search file contents for a literal text pattern.
1804
1891
  * Binary files are skipped.
@@ -2402,8 +2489,8 @@ type BuiltinToolPlaceholder<N extends string> = {
2402
2489
  */
2403
2490
  type DeepAgentBuiltinToolsTuple = { [K in DeepAgentBuiltinToolName]: BuiltinToolPlaceholder<K>; }[DeepAgentBuiltinToolName][];
2404
2491
  type InferDeepAgentStreamExtensions<T extends ReadonlyArray<() => StreamTransformer<any>>> = T extends readonly [] ? Record<string, never> : T extends readonly [() => StreamTransformer<infer P>, ...infer Rest extends ReadonlyArray<() => StreamTransformer<any>>] ? P & InferDeepAgentStreamExtensions<Rest> : Record<string, unknown>;
2405
- /** Any subagent specification — sync, compiled, or async. */
2406
- type AnySubAgent = SubAgent | CompiledSubAgent | AsyncSubAgent;
2492
+ /** Any subagent specification — sync, compiled, forked, or async. */
2493
+ type AnySubAgent = SubAgent | CompiledSubAgent | ForkedSubAgent | AsyncSubAgent;
2407
2494
  interface TypedToolStrategy<T = unknown> extends Array<ToolStrategy<any>> {
2408
2495
  _schemaType?: T;
2409
2496
  }
@@ -2664,7 +2751,7 @@ type InferSubagentByName<T, TName extends string> = InferDeepAgentSubagents<T> e
2664
2751
  * type SubagentState = InferMiddlewareStates<SubagentMiddleware>;
2665
2752
  * ```
2666
2753
  */
2667
- type InferSubagentReactAgentType<TSubagent extends SubAgent | CompiledSubAgent> = TSubagent extends CompiledSubAgent ? TSubagent["runnable"] : TSubagent extends SubAgent ? ReactAgent<AgentTypeConfig<ResponseFormatUndefined, undefined, AnyAnnotationRoot, ExtractSubAgentMiddleware<TSubagent>, readonly []>> : never;
2754
+ type InferSubagentReactAgentType<TSubagent extends SubAgent | CompiledSubAgent | ForkedSubAgent> = TSubagent extends CompiledSubAgent ? TSubagent["runnable"] : TSubagent extends SubAgent | ForkedSubAgent ? ReactAgent<AgentTypeConfig<ResponseFormatUndefined, undefined, AnyAnnotationRoot, ExtractSubAgentMiddleware<TSubagent>, readonly []>> : never;
2668
2755
  /**
2669
2756
  * Configuration parameters for creating a Deep Agent
2670
2757
  * Matches Python's create_deep_agent parameters
@@ -3251,18 +3338,17 @@ declare class StoreBackend implements BackendProtocolV2 {
3251
3338
  * Returns WriteResult. External storage sets filesUpdate=null.
3252
3339
  */
3253
3340
  write(filePath: string, content: string): Promise<WriteResult>;
3341
+ /**
3342
+ * Delete a file or directory from the store.
3343
+ *
3344
+ * Removes the exact key plus every nested key under it.
3345
+ */
3346
+ delete(filePath: string): Promise<DeleteResult>;
3254
3347
  /**
3255
3348
  * Edit a file by replacing string occurrences.
3256
3349
  * Returns EditResult. External storage sets filesUpdate=null.
3257
3350
  */
3258
3351
  edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): Promise<EditResult>;
3259
- /**
3260
- * Delete a file from the store.
3261
- *
3262
- * The file path is used as an exact store key. Wildcards are treated
3263
- * literally and do not expand to multiple entries.
3264
- */
3265
- delete(filePath: string): Promise<DeleteResult>;
3266
3352
  /**
3267
3353
  * Search file contents for a literal text pattern.
3268
3354
  * Binary files are skipped.
@@ -3356,15 +3442,19 @@ declare class FilesystemBackend implements BackendProtocolV2 {
3356
3442
  * Returns WriteResult. External storage sets filesUpdate=null.
3357
3443
  */
3358
3444
  write(filePath: string, content: string): Promise<WriteResult>;
3445
+ /**
3446
+ * Delete a file or directory from the filesystem.
3447
+ *
3448
+ * Files are unlinked. Directories are removed recursively along with all of
3449
+ * their contents. Symlinks are removed as links and never followed into their
3450
+ * targets.
3451
+ */
3452
+ delete(filePath: string): Promise<DeleteResult>;
3359
3453
  /**
3360
3454
  * Edit a file by replacing string occurrences.
3361
3455
  * Returns EditResult. External storage sets filesUpdate=null.
3362
3456
  */
3363
3457
  edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): Promise<EditResult>;
3364
- /**
3365
- * Delete a file from the filesystem.
3366
- */
3367
- delete(filePath: string): Promise<DeleteResult>;
3368
3458
  /**
3369
3459
  * Search for a literal text pattern in files.
3370
3460
  *
@@ -3510,6 +3600,26 @@ declare class CompositeBackend implements BackendProtocolV2 {
3510
3600
  * @returns WriteResult with path or error
3511
3601
  */
3512
3602
  write(filePath: string, content: string): Promise<WriteResult>;
3603
+ /**
3604
+ * Add a route prefix back to state deletion updates.
3605
+ */
3606
+ private prefixDeleteFilesUpdate;
3607
+ /**
3608
+ * Restore composite paths in a deletion result from a single backend.
3609
+ */
3610
+ private restoreDeleteResult;
3611
+ /**
3612
+ * Delete a file or directory, routing to appropriate backend.
3613
+ *
3614
+ * Parent and root deletions run sequentially across the base backend and any
3615
+ * mounted routes below the requested path. A failure stops the fan-out so
3616
+ * later backends are left untouched, but earlier deletions cannot be rolled
3617
+ * back and are reported as potentially partial.
3618
+ *
3619
+ * @param filePath - Absolute file path
3620
+ * @returns DeleteResult with path or error
3621
+ */
3622
+ delete(filePath: string): Promise<DeleteResult>;
3513
3623
  /**
3514
3624
  * Edit a file, routing to appropriate backend.
3515
3625
  *
@@ -3520,10 +3630,6 @@ declare class CompositeBackend implements BackendProtocolV2 {
3520
3630
  * @returns EditResult with path, occurrences, or error
3521
3631
  */
3522
3632
  edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): Promise<EditResult>;
3523
- /**
3524
- * Delete a file, routing to the appropriate backend.
3525
- */
3526
- delete(filePath: string): Promise<DeleteResult>;
3527
3633
  /**
3528
3634
  * Execute a command via the default backend.
3529
3635
  * Execution is not path-specific, so it always delegates to the default backend.
@@ -3609,6 +3715,13 @@ declare class ContextHubBackend implements BackendProtocolV2 {
3609
3715
  private ensureCacheLoaded;
3610
3716
  private ensureCache;
3611
3717
  private static applyChanges;
3718
+ /**
3719
+ * Select the exact key at `base` plus every key nested under `base + "/"`
3720
+ * and map each to `null` (a deletion marker). Returns an empty object when
3721
+ * nothing is stored at or under `base`. Recomputing this against the current
3722
+ * cache is what makes a recursive delete correct under conflict replay.
3723
+ */
3724
+ private static collectDeleteChanges;
3612
3725
  /**
3613
3726
  * Build the read-your-writes view without publishing speculative data as the
3614
3727
  * durable cache. Later batches overlay earlier ones, matching worker order.
@@ -3939,6 +4052,21 @@ declare abstract class BaseSandbox implements SandboxBackendProtocolV2 {
3939
4052
  * Uses uploadFiles() to write. No runtime needed on the sandbox host.
3940
4053
  */
3941
4054
  write(filePath: string, content: string): Promise<WriteResult>;
4055
+ /**
4056
+ * Delete a file or directory from the sandbox via a server-side `rm`.
4057
+ *
4058
+ * Runs `test -e || test -L` first: a path that does not exist (and is not a
4059
+ * broken symlink) returns a not-found error, matching the contract of
4060
+ * `FilesystemBackend` and `StateBackend`. Because a shell `test` has no error
4061
+ * channel, a non-zero probe conflates "absent" with "unstattable" (e.g. an
4062
+ * unsearchable parent directory); an unknown exit code is not treated as
4063
+ * absent and falls through to the delete.
4064
+ *
4065
+ * Uses `rm -rf`, so directories are removed recursively along with their
4066
+ * contents. A non-zero `rm` exit (e.g. a permission error) is reported as a
4067
+ * failure.
4068
+ */
4069
+ delete(filePath: string): Promise<DeleteResult>;
3942
4070
  /**
3943
4071
  * Edit a file by replacing string occurrences.
3944
4072
  *
@@ -3949,12 +4077,6 @@ declare abstract class BaseSandbox implements SandboxBackendProtocolV2 {
3949
4077
  * reclaim buffers before the next large allocation is made.
3950
4078
  */
3951
4079
  edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): Promise<EditResult>;
3952
- /**
3953
- * Delete a file from the sandbox via a server-side rm.
3954
- *
3955
- * Uses rm -f, so deleting a path that does not exist succeeds silently.
3956
- */
3957
- delete(filePath: string): Promise<DeleteResult>;
3958
4080
  }
3959
4081
  //#endregion
3960
4082
  //#region src/backends/langsmith.d.ts
@@ -4211,7 +4333,7 @@ declare function createDeepAgent<TResponse extends SupportedResponseFormat = Sup
4211
4333
  data: string;
4212
4334
  }[] | _messages.ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "read_file"> | import("langchain").DynamicStructuredTool<import("zod").ZodPreprocess<import("zod").ZodObject<{
4213
4335
  file_path: import("zod").ZodString;
4214
- content: import("zod").ZodDefault<import("zod").ZodString>;
4336
+ content: import("zod").ZodString;
4215
4337
  }, import("zod/v4/core").$strip>>, {
4216
4338
  file_path: string;
4217
4339
  content: string;
@@ -4231,7 +4353,14 @@ declare function createDeepAgent<TResponse extends SupportedResponseFormat = Sup
4231
4353
  }, unknown, string | _langgraph.Command<unknown, {
4232
4354
  files: Record<string, FileData>;
4233
4355
  messages: _messages.ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>[];
4234
- }, string> | _messages.ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "edit_file">)[], readonly []>, AgentMiddleware<undefined, undefined, unknown, readonly [import("langchain").DynamicStructuredTool<import("zod").ZodObject<{
4356
+ }, string> | _messages.ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "edit_file"> | import("langchain").DynamicStructuredTool<import("zod").ZodPreprocess<import("zod").ZodObject<{
4357
+ file_path: import("zod").ZodString;
4358
+ }, import("zod/v4/core").$strip>>, {
4359
+ file_path: string;
4360
+ }, unknown, _langgraph.Command<unknown, {
4361
+ files: Record<string, null>;
4362
+ messages: _messages.ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>[];
4363
+ }, string> | _messages.ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "delete">)[], readonly []>, AgentMiddleware<undefined, undefined, unknown, readonly [import("langchain").DynamicStructuredTool<import("zod").ZodObject<{
4235
4364
  description: import("zod").ZodString;
4236
4365
  subagent_type: import("zod").ZodString;
4237
4366
  }, import("zod/v4/core").$strip>, {
@@ -4249,5 +4378,5 @@ declare function createDeepAgent<TResponse extends SupportedResponseFormat = Sup
4249
4378
  }, import("zod/v4/core").$strip>>;
4250
4379
  }, 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>>;
4251
4380
  //#endregion
4252
- export { createAsyncSubAgentMiddleware as $, BackendRuntime as $t, findProjectRoot as A, SandboxBackendProtocolV2 as An, serializeProfile as At, InferDeepAgentSubagents as B, BASE_AGENT_PROMPT as Bt, parseSkillMetadata as C, StateAndStore as Cn, createSubAgentMiddleware as Ct, Settings as D, isSandboxProtocol as Dn, generalPurposeSubagentConfigSchema as Dt, filesValue as E, isSandboxBackend as En, HarnessProfileConfigData as Et, DeepAgent as F, HarnessProfileOptions as Ft, InferSubagentReactAgentType as G, FsToolName as Gt, InferStructuredResponse as H, SystemPromptConfig as Ht, DeepAgentTypeConfig as I, REQUIRED_MIDDLEWARE_NAMES as It, SupportedResponseFormat as J, FilesystemPermission as Jt, MergedDeepAgentState as K, createFilesystemMiddleware as Kt, DefaultDeepAgentTypeConfig as L, ConfigurationError as Lt, SubagentRunStream$1 as M, SandboxBackendProtocolV1 as Mn, createHarnessProfile as Mt, AnySubAgent as N, GeneralPurposeSubagentConfig as Nt, SettingsOptions as O, resolveBackend as On, harnessProfileConfigSchema as Ot, CreateDeepAgentParams as P, HarnessProfile as Pt, AsyncTaskStatus as Q, BackendProtocol as Qt, ExtractSubAgentMiddleware as R, ConfigurationErrorCode as Rt, listSkills as S, SandboxListResponse as Sn, createSubAgent as St, createAgentMemoryMiddleware as T, applyGrepMaxCount as Tn, registerHarnessProfile as Tt, InferSubAgentMiddlewareStates as U, TASK_SYSTEM_PROMPT as Ut, InferDeepAgentType as V, EXECUTION_SYSTEM_PROMPT as Vt, InferSubagentByName as W, FilesystemMiddlewareOptions as Wt, AsyncSubAgentMiddlewareOptions as X, AnyBackendProtocol as Xt, AsyncSubAgent as Y, PermissionMode as Yt, AsyncTask as Z, BackendFactory as Zt, StoreBackendContext as _, SandboxError as _n, DEFAULT_SUBAGENT_PROMPT as _t, adaptBackendProtocol as a, FileInfo as an, MAX_SKILL_DESCRIPTION_LENGTH as at, ListSkillsOptions as b, SandboxInfo as bn, SubAgent as bt, LangSmithSandboxCreateOptions as c, GlobResult as cn, SkillMetadata$1 as ct, LocalShellBackend as d, LsResult as dn, MemoryMiddlewareOptions as dt, DeleteResult as en, isAsyncSubAgent as et, LocalShellBackendOptions as f, MaybePromise as fn, createMemoryMiddleware as ft, StoreBackend as g, SandboxDeleteOptions as gn, DEFAULT_GENERAL_PURPOSE_DESCRIPTION as gt, FilesystemBackend as h, SandboxBackendProtocol as hn, CompiledSubAgent as ht, LangSmithStartSandboxOptions as i, FileDownloadResponse as in, createCompletionCallbackMiddleware as it, DeepAgentRunStream as j, BackendProtocolV1 as jn, EMPTY_HARNESS_PROFILE as jt, createSettings as k, BackendProtocolV2 as kn, parseHarnessProfileConfig as kt, LangSmithSandboxOptions as l, GrepMatch as ln, SkillsMiddlewareOptions as lt, CompositeBackend as m, ReadResult as mn, createPatchToolCallsMiddleware as mt, LangSmithCaptureSnapshotOptions as n, ExecuteResponse as nn, createSummarizationMiddleware as nt, adaptSandboxProtocol as o, FileOperationError as on, MAX_SKILL_FILE_SIZE as ot, ContextHubBackend as p, ReadRawResult as pn, StateBackend as pt, ResolveDeepAgentTypeConfig as q, FilesystemOperation as qt, LangSmithSnapshot as r, FileData as rn, CompletionCallbackOptions as rt, LangSmithSandbox as s, FileUploadResponse as sn, MAX_SKILL_NAME_LENGTH as st, createDeepAgent as t, EditResult as tn, computeSummarizationDefaults as tt, BaseSandbox as u, GrepResult as un, createSkillsMiddleware as ut, StoreBackendNamespaceFactory as v, SandboxErrorCode as vn, GENERAL_PURPOSE_SUBAGENT as vt, AgentMemoryMiddlewareOptions as w, WriteResult as wn, getHarnessProfile as wt, SkillMetadata as x, SandboxListOptions as xn, SubAgentMiddlewareOptions as xt, StoreBackendOptions as y, SandboxGetOrCreateOptions as yn, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY as yt, FlattenSubAgentMiddleware as z, ASYNC_TASK_SYSTEM_PROMPT as zt };
4253
- //# sourceMappingURL=agent-BNyBUA4W.d.ts.map
4381
+ export { createAsyncSubAgentMiddleware as $, BackendProtocol as $t, findProjectRoot as A, BackendProtocolV2 as An, parseHarnessProfileConfig as At, InferDeepAgentSubagents as B, ASYNC_TASK_SYSTEM_PROMPT as Bt, parseSkillMetadata as C, SandboxListResponse as Cn, createSubAgent as Ct, Settings as D, isSandboxBackend as Dn, HarnessProfileConfigData as Dt, filesValue as E, applyGrepMaxCount as En, registerHarnessProfile as Et, DeepAgent as F, HarnessProfile as Ft, InferSubagentReactAgentType as G, FilesystemMiddlewareOptions as Gt, InferStructuredResponse as H, EXECUTION_SYSTEM_PROMPT as Ht, DeepAgentTypeConfig as I, HarnessProfileOptions as It, SupportedResponseFormat as J, FilesystemOperation as Jt, MergedDeepAgentState as K, FsToolName as Kt, DefaultDeepAgentTypeConfig as L, REQUIRED_MIDDLEWARE_NAMES as Lt, SubagentRunStream$1 as M, BackendProtocolV1 as Mn, EMPTY_HARNESS_PROFILE as Mt, AnySubAgent as N, SandboxBackendProtocolV1 as Nn, createHarnessProfile as Nt, SettingsOptions as O, isSandboxProtocol as On, generalPurposeSubagentConfigSchema as Ot, CreateDeepAgentParams as P, GeneralPurposeSubagentConfig as Pt, AsyncTaskStatus as Q, BackendFactory as Qt, ExtractSubAgentMiddleware as R, ConfigurationError as Rt, listSkills as S, SandboxListOptions as Sn, SubAgentMiddlewareOptions as St, createAgentMemoryMiddleware as T, WriteResult as Tn, getHarnessProfile as Tt, InferSubAgentMiddlewareStates as U, SystemPromptConfig as Ut, InferDeepAgentType as V, BASE_AGENT_PROMPT as Vt, InferSubagentByName as W, TASK_SYSTEM_PROMPT as Wt, AsyncSubAgentMiddlewareOptions as X, PermissionMode as Xt, AsyncSubAgent as Y, FilesystemPermission as Yt, AsyncTask as Z, AnyBackendProtocol as Zt, StoreBackendContext as _, SandboxDeleteOptions as _n, DEFAULT_SUBAGENT_PROMPT as _t, adaptBackendProtocol as a, FileDownloadResponse as an, MAX_SKILL_DESCRIPTION_LENGTH as at, ListSkillsOptions as b, SandboxGetOrCreateOptions as bn, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY as bt, LangSmithSandboxCreateOptions as c, FileUploadResponse as cn, SkillMetadata$1 as ct, LocalShellBackend as d, GrepResult as dn, MemoryMiddlewareOptions as dt, BackendRuntime as en, isAsyncSubAgent as et, LocalShellBackendOptions as f, LsResult as fn, createMemoryMiddleware as ft, StoreBackend as g, SandboxBackendProtocol as gn, DEFAULT_GENERAL_PURPOSE_DESCRIPTION as gt, FilesystemBackend as h, ReadResult as hn, CompiledSubAgent as ht, LangSmithStartSandboxOptions as i, FileData as in, createCompletionCallbackMiddleware as it, DeepAgentRunStream as j, SandboxBackendProtocolV2 as jn, serializeProfile as jt, createSettings as k, resolveBackend as kn, harnessProfileConfigSchema as kt, LangSmithSandboxOptions as l, GlobResult as ln, SkillsMiddlewareOptions as lt, CompositeBackend as m, ReadRawResult as mn, createPatchToolCallsMiddleware as mt, LangSmithCaptureSnapshotOptions as n, EditResult as nn, createSummarizationMiddleware as nt, adaptSandboxProtocol as o, FileInfo as on, MAX_SKILL_FILE_SIZE as ot, ContextHubBackend as p, MaybePromise as pn, StateBackend as pt, ResolveDeepAgentTypeConfig as q, createFilesystemMiddleware as qt, LangSmithSnapshot as r, ExecuteResponse as rn, CompletionCallbackOptions as rt, LangSmithSandbox as s, FileOperationError as sn, MAX_SKILL_NAME_LENGTH as st, createDeepAgent as t, DeleteResult as tn, computeSummarizationDefaults as tt, BaseSandbox as u, GrepMatch as un, createSkillsMiddleware as ut, StoreBackendNamespaceFactory as v, SandboxError as vn, ForkedSubAgent as vt, AgentMemoryMiddlewareOptions as w, StateAndStore as wn, createSubAgentMiddleware as wt, SkillMetadata as x, SandboxInfo as xn, SubAgent as xt, StoreBackendOptions as y, SandboxErrorCode as yn, GENERAL_PURPOSE_SUBAGENT as yt, FlattenSubAgentMiddleware as z, ConfigurationErrorCode as zt };
4382
+ //# sourceMappingURL=agent-Bx0owr-O.d.ts.map