deepagents 1.13.1 → 1.13.3

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.
@@ -4,6 +4,7 @@ import * as _langgraph from "@langchain/langgraph";
4
4
  import { AnnotationRoot, AnyStateSchema, Command, ReducedValue, StateDefinitionInit, StateSchema, StreamTransformer } from "@langchain/langgraph";
5
5
  import { z } from "zod/v4";
6
6
  import * as _messages from "@langchain/core/messages";
7
+ import { SystemMessage as SystemMessage$1 } from "@langchain/core/messages";
7
8
  import * as z$2 from "zod";
8
9
  import { z as z$1 } from "zod";
9
10
  import { Client } from "@langchain/langgraph-sdk";
@@ -357,6 +358,23 @@ interface ReadResult {
357
358
  content?: string | Uint8Array;
358
359
  /** MIME type of the file, when available */
359
360
  mimeType?: string;
361
+ /**
362
+ * Total number of logical source lines for a text read, when known.
363
+ * Omitted for binary reads and for backends that cannot determine it.
364
+ */
365
+ totalLines?: number;
366
+ /**
367
+ * 1-indexed first source line represented by `content`.
368
+ * Text pagination fields are optional so older/custom backends remain valid.
369
+ */
370
+ startLine?: number;
371
+ /** 1-indexed last source line represented by `content`. */
372
+ endLine?: number;
373
+ /**
374
+ * 0-indexed offset of the next unread source line.
375
+ * Omitted when the returned text reaches EOF.
376
+ */
377
+ nextOffset?: number;
360
378
  }
361
379
  /**
362
380
  * Structured result from backend readRaw operations.
@@ -1188,11 +1206,13 @@ interface HarnessProfileOptions {
1188
1206
  */
1189
1207
  toolDescriptionOverrides?: Record<string, string>;
1190
1208
  /**
1191
- * Tool names to remove from the agent's visible tool set.
1209
+ * Tool names to remove from the agent's visible tool set and reject at the
1210
+ * tool-call boundary.
1192
1211
  *
1193
- * Applied via a filtering middleware after all tool-injecting
1194
- * middleware have run, so it catches both user-provided and
1195
- * middleware-provided tools.
1212
+ * Applied via middleware after all tool-injecting middleware have run, so it
1213
+ * catches both user-provided and middleware-provided tools. Each declarative
1214
+ * subagent uses the profile resolved for its own model. Exclusions are
1215
+ * model-facing calibration, not a security boundary.
1196
1216
  *
1197
1217
  * @default [] (no tools excluded)
1198
1218
  */
@@ -1266,11 +1286,13 @@ interface HarnessProfile {
1266
1286
  */
1267
1287
  toolDescriptionOverrides: Record<string, string>;
1268
1288
  /**
1269
- * Tool names to remove from the agent's visible tool set.
1289
+ * Tool names to remove from the agent's visible tool set and reject at the
1290
+ * tool-call boundary.
1270
1291
  *
1271
- * Applied via a filtering middleware after all tool-injecting
1272
- * middleware have run, so it catches both user-provided and
1273
- * middleware-provided tools.
1292
+ * Applied via middleware after all tool-injecting middleware have run, so it
1293
+ * catches both user-provided and middleware-provided tools. Each declarative
1294
+ * subagent uses the profile resolved for its own model. Exclusions are
1295
+ * model-facing calibration, not a security boundary.
1274
1296
  */
1275
1297
  excludedTools: Set<string>;
1276
1298
  /**
@@ -1494,31 +1516,55 @@ interface CompiledSubAgent<TRunnable extends ReactAgent<any> | Runnable = ReactA
1494
1516
  /**
1495
1517
  * Context mode. `"fork"` inherits the parent's conversation history
1496
1518
  * (but not its system prompt — that's baked into the runnable).
1497
- * `"handoff"` (default) is fully isolated.
1519
+ * `"isolated"` (default) only sees the delegated task.
1498
1520
  */
1499
- mode?: "handoff" | "fork";
1521
+ mode?: "isolated" | "fork";
1500
1522
  }
1501
1523
  /**
1502
- * Fields shared by both {@link SubAgent} and {@link ForkedSubAgent}.
1524
+ * Specification for a declarative subagent.
1503
1525
  *
1504
- * @internal
1526
+ * When using `createDeepAgent`, subagents automatically receive a default middleware
1527
+ * stack (filesystemMiddleware, summarizationMiddleware, etc.) before any custom
1528
+ * `middleware` specified in this spec. Add `todoListMiddleware` explicitly to opt in.
1529
+ *
1530
+ * By default the subagent is isolated — it only ever sees the delegated task
1531
+ * description, never the parent's conversation. Setting `mode: "fork"` makes
1532
+ * it continue the parent's conversation instead.
1533
+ *
1534
+ * @example
1535
+ * ```typescript
1536
+ * const researcher: SubAgent = {
1537
+ * name: "researcher",
1538
+ * description: "Research assistant for complex topics",
1539
+ * systemPrompt: "You are a research assistant.",
1540
+ * tools: [webSearchTool],
1541
+ * skills: ["/skills/research/"],
1542
+ * };
1543
+ * ```
1544
+ *
1545
+ * @experimental `mode: "fork"` is experimental and subject to change.
1505
1546
  */
1506
- interface SubAgentBase {
1547
+ interface SubAgent {
1507
1548
  /** Identifier used to select this subagent in the task tool */
1508
1549
  name: string;
1509
1550
  /** Description shown to the model for subagent selection */
1510
1551
  description: string;
1511
1552
  /**
1512
- * The system prompt for the agent. Optional on {@link SubAgent} (falls
1513
- * back to an empty prompt if omitted); forbidden on {@link ForkedSubAgent},
1514
- * which always inherits the parent's instead.
1553
+ * The system prompt for the agent. Falls back to an empty prompt if
1554
+ * omitted. Under `mode: "fork"`, this is appended to the parent's
1555
+ * inherited prompt rather than replacing it.
1515
1556
  */
1516
1557
  systemPrompt?: string | SystemMessage;
1517
1558
  /**
1518
- * Context mode. `"handoff"` (default) is fully isolated. `"fork"` inherits
1519
- * the parent's conversation history and system prompt.
1559
+ * Context mode. `"isolated"` (default) only sees the delegated task.
1560
+ * `"fork"` inherits the parent's conversation history and mirrors the
1561
+ * parent's prompt-producing middleware (skills, memory, custom middleware)
1562
+ * so it rebuilds an equivalent system prompt — the tradeoff is cache
1563
+ * misses if this subagent's own `model` differs from the parent's. Cannot
1564
+ * declare `skills` under `mode: "fork"`; the parent's skills are inherited
1565
+ * instead.
1520
1566
  */
1521
- mode?: "handoff" | "fork";
1567
+ mode?: "isolated" | "fork";
1522
1568
  /** The tools to use for the agent (tool instances, not names). Defaults to defaultTools */
1523
1569
  tools?: StructuredTool[];
1524
1570
  /** The model for the agent. Defaults to defaultModel */
@@ -1597,67 +1643,14 @@ interface SubAgentBase {
1597
1643
  permissions?: FilesystemPermission[];
1598
1644
  }
1599
1645
  /**
1600
- * Specification for a subagent that can be dynamically created.
1601
- *
1602
- * When using `createDeepAgent`, subagents automatically receive a default middleware
1603
- * stack (filesystemMiddleware, summarizationMiddleware, etc.) before any custom
1604
- * `middleware` specified in this spec. Add `todoListMiddleware` explicitly to opt in.
1605
- *
1606
- * Always fully isolated — this subagent only ever sees the task description,
1607
- * never the parent's conversation. Use {@link ForkedSubAgent} to inherit the
1608
- * parent's history and system prompt instead.
1609
- *
1610
- * @example
1611
- * ```typescript
1612
- * const researcher: SubAgent = {
1613
- * name: "researcher",
1614
- * description: "Research assistant for complex topics",
1615
- * systemPrompt: "You are a research assistant.",
1616
- * tools: [webSearchTool],
1617
- * skills: ["/skills/research/"],
1618
- * };
1619
- * ```
1620
- */
1621
- interface SubAgent extends SubAgentBase {
1622
- /** The system prompt to use for the agent */
1623
- systemPrompt?: string | SystemMessage;
1624
- /**
1625
- * Context mode. `"handoff"` (default) is fully isolated. `"fork"` inherits
1626
- * the parent's conversation history and system prompt.
1627
- */
1628
- mode?: "handoff";
1629
- }
1630
- /**
1631
- * Specification for a subagent that inherits the parent's conversation
1632
- * instead of starting from just the task description.
1633
- *
1634
- * Always forks: it inherits the parent's full message history and its exact
1635
- * system prompt (there's no own prompt to fall back to). Mirrored middleware
1636
- * is only added when its model matches the parent's, since that's the only
1637
- * case with a cache benefit to protect. Deliberately has no `systemPrompt`
1638
- * of its own: since its system slot always carries the parent's prompt,
1639
- * there's nothing of its own to put there. If you need a subagent with a
1640
- * distinguishing system prompt, use {@link SubAgent} without forking instead.
1641
- *
1642
- * @example
1643
- * ```typescript
1644
- * const researcher: ForkedSubAgent = {
1645
- * name: "researcher",
1646
- * description: "Continues the current investigation with full context",
1647
- * mode: "fork",
1648
- * tools: [webSearchTool],
1649
- * };
1650
- * ```
1646
+ * A {@link SubAgent} with `mode: "fork"`.
1651
1647
  *
1652
- * @experimental Forking subagents is experimental and subject to change
1648
+ * @deprecated Kept as a named type for backward compatibility with code that imported
1649
+ * `ForkedSubAgent` before it merged into `SubAgent` — not a distinct shape
1650
+ * with its own constraints (a fork can now declare its own `systemPrompt`,
1651
+ * same as any `SubAgent`). Prefer `SubAgent` with `mode: "fork"` in new code.
1653
1652
  */
1654
- interface ForkedSubAgent extends SubAgentBase {
1655
- /** A ForkedSubAgent never has its own system prompt — always the parent's. */
1656
- systemPrompt?: undefined;
1657
- /**
1658
- * Always `"fork"`. Required (not defaulted) so this can't structurally
1659
- * collapse into a plain `SubAgent` — see `isForkedSubAgent` below.
1660
- */
1653
+ interface ForkedSubAgent extends SubAgent {
1661
1654
  mode: "fork";
1662
1655
  }
1663
1656
  /**
@@ -1701,7 +1694,7 @@ declare const GENERAL_PURPOSE_SUBAGENT: {
1701
1694
  readonly name: "general-purpose";
1702
1695
  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.";
1703
1696
  readonly systemPrompt: "In order to complete the objective that the user asks of you, you have access to a number of standard tools.";
1704
- readonly mode: "handoff";
1697
+ readonly mode: "isolated";
1705
1698
  };
1706
1699
  /**
1707
1700
  * Create a runnable agent from a declarative `SubAgent` spec.
@@ -1737,14 +1730,14 @@ interface SubAgentMiddlewareOptions {
1737
1730
  /** The tool configs for the default general-purpose subagent */
1738
1731
  defaultInterruptOn?: Record<string, boolean | InterruptOnConfig> | null;
1739
1732
  /** A list of additional subagents to provide to the agent */
1740
- subagents?: (SubAgent | CompiledSubAgent | ForkedSubAgent)[];
1733
+ subagents?: (SubAgent | CompiledSubAgent)[];
1741
1734
  /** Full system prompt override */
1742
1735
  systemPrompt?: string | null;
1743
1736
  /** Whether to include the general-purpose agent */
1744
1737
  generalPurposeAgent?: boolean;
1745
1738
  /** Custom description for the task tool */
1746
1739
  taskDescription?: string | null;
1747
- /** Inherited by `ForkedSubAgent`s and `mode: "fork"` compiled subagents */
1740
+ /** Inherited by a `mode: "fork"` declarative or compiled subagent */
1748
1741
  parentSystemPrompt?: string | SystemMessage | null;
1749
1742
  }
1750
1743
  /**
@@ -2491,8 +2484,8 @@ type BuiltinToolPlaceholder<N extends string> = {
2491
2484
  */
2492
2485
  type DeepAgentBuiltinToolsTuple = { [K in DeepAgentBuiltinToolName]: BuiltinToolPlaceholder<K>; }[DeepAgentBuiltinToolName][];
2493
2486
  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>;
2494
- /** Any subagent specification — sync, compiled, forked, or async. */
2495
- type AnySubAgent = SubAgent | CompiledSubAgent | ForkedSubAgent | AsyncSubAgent;
2487
+ /** Any subagent specification — sync, compiled, or async. */
2488
+ type AnySubAgent = SubAgent | CompiledSubAgent | AsyncSubAgent;
2496
2489
  interface TypedToolStrategy<T = unknown> extends Array<ToolStrategy<any>> {
2497
2490
  _schemaType?: T;
2498
2491
  }
@@ -2753,7 +2746,7 @@ type InferSubagentByName<T, TName extends string> = InferDeepAgentSubagents<T> e
2753
2746
  * type SubagentState = InferMiddlewareStates<SubagentMiddleware>;
2754
2747
  * ```
2755
2748
  */
2756
- 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;
2749
+ type InferSubagentReactAgentType<TSubagent extends SubAgent | CompiledSubAgent> = TSubagent extends CompiledSubAgent ? TSubagent["runnable"] : TSubagent extends SubAgent ? ReactAgent<AgentTypeConfig<ResponseFormatUndefined, undefined, AnyAnnotationRoot, ExtractSubAgentMiddleware<TSubagent>, readonly []>> : never;
2757
2750
  /**
2758
2751
  * Configuration parameters for creating a Deep Agent
2759
2752
  * Matches Python's create_deep_agent parameters
@@ -2769,7 +2762,10 @@ type InferSubagentReactAgentType<TSubagent extends SubAgent | CompiledSubAgent |
2769
2762
  interface CreateDeepAgentParams<TResponse extends SupportedResponseFormat = SupportedResponseFormat, ContextSchema extends AnnotationRoot<any> | InteropZodObject = AnnotationRoot<any>, TMiddleware extends readonly AgentMiddleware[] = readonly AgentMiddleware[], TSubagents extends readonly AnySubAgent[] = readonly AnySubAgent[], TTools extends readonly (ClientTool | ServerTool)[] = readonly (ClientTool | ServerTool)[], TStreamTransformers extends ReadonlyArray<() => StreamTransformer<any>> = readonly [], TStateSchema extends AnyStateSchema | InteropZodObject | undefined = undefined> {
2770
2763
  /** The model to use (model name string or LanguageModelLike instance). Defaults to claude-sonnet-4-5-20250929 */
2771
2764
  model?: BaseLanguageModel | string;
2772
- /** Tools the agent should have access to */
2765
+ /**
2766
+ * Additional tools for the agent. Passing tools here does not remove built-in
2767
+ * filesystem tools; customize `FilesystemMiddleware` to remove them entirely.
2768
+ */
2773
2769
  tools?: TTools | StructuredTool$1[];
2774
2770
  /**
2775
2771
  * Custom system instructions. Structured configuration is deprecated and
@@ -4213,6 +4209,20 @@ declare class LangSmithSandbox extends BaseSandbox {
4213
4209
  }
4214
4210
  //#endregion
4215
4211
  //#region src/backends/utils.d.ts
4212
+ /**
4213
+ * Normalize model- or caller-supplied text pagination bounds.
4214
+ *
4215
+ * Every backend must slice content and calculate pagination metadata from the
4216
+ * same normalized values. Otherwise a fractional or negative argument could
4217
+ * return one window while advertising a different `nextOffset`.
4218
+ *
4219
+ * Binary reads do not use this helper because their backend contract ignores
4220
+ * line-based offset and limit values.
4221
+ */
4222
+ declare function normalizeReadPagination(offset: number, limit: number): {
4223
+ offset: number;
4224
+ limit: number;
4225
+ };
4216
4226
  /**
4217
4227
  * Adapt a v1 {@link BackendProtocol} to {@link BackendProtocolV2}.
4218
4228
  *
@@ -4380,5 +4390,5 @@ declare function createDeepAgent<TResponse extends SupportedResponseFormat = Sup
4380
4390
  }, import("zod/v4/core").$strip>>;
4381
4391
  }, 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>>;
4382
4392
  //#endregion
4383
- 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 };
4384
- //# sourceMappingURL=agent-D50BBbJT.d.ts.map
4393
+ export { AsyncTaskStatus as $, BackendFactory as $t, createSettings as A, resolveBackend as An, harnessProfileConfigSchema as At, FlattenSubAgentMiddleware as B, ConfigurationErrorCode as Bt, listSkills as C, SandboxListOptions as Cn, SubAgentMiddlewareOptions as Ct, filesValue as D, applyGrepMaxCount as Dn, registerHarnessProfile as Dt, createAgentMemoryMiddleware as E, WriteResult as En, getHarnessProfile as Et, CreateDeepAgentParams as F, GeneralPurposeSubagentConfig as Ft, InferSubagentByName as G, TASK_SYSTEM_PROMPT as Gt, InferDeepAgentType as H, BASE_AGENT_PROMPT as Ht, DeepAgent as I, HarnessProfile as It, ResolveDeepAgentTypeConfig as J, createFilesystemMiddleware as Jt, InferSubagentReactAgentType as K, FilesystemMiddlewareOptions as Kt, DeepAgentTypeConfig as L, HarnessProfileOptions as Lt, DeepAgentRunStream as M, SandboxBackendProtocolV2 as Mn, serializeProfile as Mt, SubagentRunStream$1 as N, BackendProtocolV1 as Nn, EMPTY_HARNESS_PROFILE as Nt, Settings as O, isSandboxBackend as On, HarnessProfileConfigData as Ot, AnySubAgent as P, SandboxBackendProtocolV1 as Pn, createHarnessProfile as Pt, AsyncTask as Q, AnyBackendProtocol as Qt, DefaultDeepAgentTypeConfig as R, REQUIRED_MIDDLEWARE_NAMES as Rt, SkillMetadata as S, SandboxInfo as Sn, SubAgent as St, AgentMemoryMiddlewareOptions as T, StateAndStore as Tn, createSubAgentMiddleware as Tt, InferStructuredResponse as U, EXECUTION_SYSTEM_PROMPT as Ut, InferDeepAgentSubagents as V, ASYNC_TASK_SYSTEM_PROMPT as Vt, InferSubAgentMiddlewareStates as W, SystemPromptConfig as Wt, AsyncSubAgent as X, FilesystemPermission as Xt, SupportedResponseFormat as Y, FilesystemOperation as Yt, AsyncSubAgentMiddlewareOptions as Z, PermissionMode as Zt, StoreBackend as _, SandboxBackendProtocol as _n, DEFAULT_GENERAL_PURPOSE_DESCRIPTION as _t, adaptBackendProtocol as a, FileData as an, createCompletionCallbackMiddleware as at, StoreBackendOptions as b, SandboxErrorCode as bn, GENERAL_PURPOSE_SUBAGENT as bt, LangSmithSandbox as c, FileOperationError as cn, MAX_SKILL_NAME_LENGTH as ct, BaseSandbox as d, GrepMatch as dn, createSkillsMiddleware as dt, BackendProtocol as en, createAsyncSubAgentMiddleware as et, LocalShellBackend as f, GrepResult as fn, MemoryMiddlewareOptions as ft, FilesystemBackend as g, ReadResult as gn, CompiledSubAgent as gt, CompositeBackend as h, ReadRawResult as hn, createPatchToolCallsMiddleware as ht, LangSmithStartSandboxOptions as i, ExecuteResponse as in, CompletionCallbackOptions as it, findProjectRoot as j, BackendProtocolV2 as jn, parseHarnessProfileConfig as jt, SettingsOptions as k, isSandboxProtocol as kn, generalPurposeSubagentConfigSchema as kt, LangSmithSandboxCreateOptions as l, FileUploadResponse as ln, SkillMetadata$1 as lt, ContextHubBackend as m, MaybePromise as mn, StateBackend as mt, LangSmithCaptureSnapshotOptions as n, DeleteResult as nn, computeSummarizationDefaults as nt, adaptSandboxProtocol as o, FileDownloadResponse as on, MAX_SKILL_DESCRIPTION_LENGTH as ot, LocalShellBackendOptions as p, LsResult as pn, createMemoryMiddleware as pt, MergedDeepAgentState as q, FsToolName as qt, LangSmithSnapshot as r, EditResult as rn, createSummarizationMiddleware as rt, normalizeReadPagination as s, FileInfo as sn, MAX_SKILL_FILE_SIZE as st, createDeepAgent as t, BackendRuntime as tn, isAsyncSubAgent as tt, LangSmithSandboxOptions as u, GlobResult as un, SkillsMiddlewareOptions as ut, StoreBackendContext as v, SandboxDeleteOptions as vn, DEFAULT_SUBAGENT_PROMPT as vt, parseSkillMetadata as w, SandboxListResponse as wn, createSubAgent as wt, ListSkillsOptions as x, SandboxGetOrCreateOptions as xn, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY as xt, StoreBackendNamespaceFactory as y, SandboxError as yn, ForkedSubAgent as yt, ExtractSubAgentMiddleware as z, ConfigurationError as zt };
4394
+ //# sourceMappingURL=agent-CVBXKZAu.d.ts.map
@@ -357,6 +357,23 @@ interface ReadResult {
357
357
  content?: string | Uint8Array;
358
358
  /** MIME type of the file, when available */
359
359
  mimeType?: string;
360
+ /**
361
+ * Total number of logical source lines for a text read, when known.
362
+ * Omitted for binary reads and for backends that cannot determine it.
363
+ */
364
+ totalLines?: number;
365
+ /**
366
+ * 1-indexed first source line represented by `content`.
367
+ * Text pagination fields are optional so older/custom backends remain valid.
368
+ */
369
+ startLine?: number;
370
+ /** 1-indexed last source line represented by `content`. */
371
+ endLine?: number;
372
+ /**
373
+ * 0-indexed offset of the next unread source line.
374
+ * Omitted when the returned text reaches EOF.
375
+ */
376
+ nextOffset?: number;
360
377
  }
361
378
  /**
362
379
  * Structured result from backend readRaw operations.
@@ -1188,11 +1205,13 @@ interface HarnessProfileOptions {
1188
1205
  */
1189
1206
  toolDescriptionOverrides?: Record<string, string>;
1190
1207
  /**
1191
- * Tool names to remove from the agent's visible tool set.
1208
+ * Tool names to remove from the agent's visible tool set and reject at the
1209
+ * tool-call boundary.
1192
1210
  *
1193
- * Applied via a filtering middleware after all tool-injecting
1194
- * middleware have run, so it catches both user-provided and
1195
- * middleware-provided tools.
1211
+ * Applied via middleware after all tool-injecting middleware have run, so it
1212
+ * catches both user-provided and middleware-provided tools. Each declarative
1213
+ * subagent uses the profile resolved for its own model. Exclusions are
1214
+ * model-facing calibration, not a security boundary.
1196
1215
  *
1197
1216
  * @default [] (no tools excluded)
1198
1217
  */
@@ -1266,11 +1285,13 @@ interface HarnessProfile {
1266
1285
  */
1267
1286
  toolDescriptionOverrides: Record<string, string>;
1268
1287
  /**
1269
- * Tool names to remove from the agent's visible tool set.
1288
+ * Tool names to remove from the agent's visible tool set and reject at the
1289
+ * tool-call boundary.
1270
1290
  *
1271
- * Applied via a filtering middleware after all tool-injecting
1272
- * middleware have run, so it catches both user-provided and
1273
- * middleware-provided tools.
1291
+ * Applied via middleware after all tool-injecting middleware have run, so it
1292
+ * catches both user-provided and middleware-provided tools. Each declarative
1293
+ * subagent uses the profile resolved for its own model. Exclusions are
1294
+ * model-facing calibration, not a security boundary.
1274
1295
  */
1275
1296
  excludedTools: Set<string>;
1276
1297
  /**
@@ -1494,31 +1515,55 @@ interface CompiledSubAgent<TRunnable extends ReactAgent<any> | Runnable = ReactA
1494
1515
  /**
1495
1516
  * Context mode. `"fork"` inherits the parent's conversation history
1496
1517
  * (but not its system prompt — that's baked into the runnable).
1497
- * `"handoff"` (default) is fully isolated.
1518
+ * `"isolated"` (default) only sees the delegated task.
1498
1519
  */
1499
- mode?: "handoff" | "fork";
1520
+ mode?: "isolated" | "fork";
1500
1521
  }
1501
1522
  /**
1502
- * Fields shared by both {@link SubAgent} and {@link ForkedSubAgent}.
1523
+ * Specification for a declarative subagent.
1503
1524
  *
1504
- * @internal
1525
+ * When using `createDeepAgent`, subagents automatically receive a default middleware
1526
+ * stack (filesystemMiddleware, summarizationMiddleware, etc.) before any custom
1527
+ * `middleware` specified in this spec. Add `todoListMiddleware` explicitly to opt in.
1528
+ *
1529
+ * By default the subagent is isolated — it only ever sees the delegated task
1530
+ * description, never the parent's conversation. Setting `mode: "fork"` makes
1531
+ * it continue the parent's conversation instead.
1532
+ *
1533
+ * @example
1534
+ * ```typescript
1535
+ * const researcher: SubAgent = {
1536
+ * name: "researcher",
1537
+ * description: "Research assistant for complex topics",
1538
+ * systemPrompt: "You are a research assistant.",
1539
+ * tools: [webSearchTool],
1540
+ * skills: ["/skills/research/"],
1541
+ * };
1542
+ * ```
1543
+ *
1544
+ * @experimental `mode: "fork"` is experimental and subject to change.
1505
1545
  */
1506
- interface SubAgentBase {
1546
+ interface SubAgent {
1507
1547
  /** Identifier used to select this subagent in the task tool */
1508
1548
  name: string;
1509
1549
  /** Description shown to the model for subagent selection */
1510
1550
  description: string;
1511
1551
  /**
1512
- * The system prompt for the agent. Optional on {@link SubAgent} (falls
1513
- * back to an empty prompt if omitted); forbidden on {@link ForkedSubAgent},
1514
- * which always inherits the parent's instead.
1552
+ * The system prompt for the agent. Falls back to an empty prompt if
1553
+ * omitted. Under `mode: "fork"`, this is appended to the parent's
1554
+ * inherited prompt rather than replacing it.
1515
1555
  */
1516
1556
  systemPrompt?: string | SystemMessage;
1517
1557
  /**
1518
- * Context mode. `"handoff"` (default) is fully isolated. `"fork"` inherits
1519
- * the parent's conversation history and system prompt.
1558
+ * Context mode. `"isolated"` (default) only sees the delegated task.
1559
+ * `"fork"` inherits the parent's conversation history and mirrors the
1560
+ * parent's prompt-producing middleware (skills, memory, custom middleware)
1561
+ * so it rebuilds an equivalent system prompt — the tradeoff is cache
1562
+ * misses if this subagent's own `model` differs from the parent's. Cannot
1563
+ * declare `skills` under `mode: "fork"`; the parent's skills are inherited
1564
+ * instead.
1520
1565
  */
1521
- mode?: "handoff" | "fork";
1566
+ mode?: "isolated" | "fork";
1522
1567
  /** The tools to use for the agent (tool instances, not names). Defaults to defaultTools */
1523
1568
  tools?: StructuredTool[];
1524
1569
  /** The model for the agent. Defaults to defaultModel */
@@ -1597,67 +1642,14 @@ interface SubAgentBase {
1597
1642
  permissions?: FilesystemPermission[];
1598
1643
  }
1599
1644
  /**
1600
- * Specification for a subagent that can be dynamically created.
1601
- *
1602
- * When using `createDeepAgent`, subagents automatically receive a default middleware
1603
- * stack (filesystemMiddleware, summarizationMiddleware, etc.) before any custom
1604
- * `middleware` specified in this spec. Add `todoListMiddleware` explicitly to opt in.
1605
- *
1606
- * Always fully isolated — this subagent only ever sees the task description,
1607
- * never the parent's conversation. Use {@link ForkedSubAgent} to inherit the
1608
- * parent's history and system prompt instead.
1609
- *
1610
- * @example
1611
- * ```typescript
1612
- * const researcher: SubAgent = {
1613
- * name: "researcher",
1614
- * description: "Research assistant for complex topics",
1615
- * systemPrompt: "You are a research assistant.",
1616
- * tools: [webSearchTool],
1617
- * skills: ["/skills/research/"],
1618
- * };
1619
- * ```
1620
- */
1621
- interface SubAgent extends SubAgentBase {
1622
- /** The system prompt to use for the agent */
1623
- systemPrompt?: string | SystemMessage;
1624
- /**
1625
- * Context mode. `"handoff"` (default) is fully isolated. `"fork"` inherits
1626
- * the parent's conversation history and system prompt.
1627
- */
1628
- mode?: "handoff";
1629
- }
1630
- /**
1631
- * Specification for a subagent that inherits the parent's conversation
1632
- * instead of starting from just the task description.
1633
- *
1634
- * Always forks: it inherits the parent's full message history and its exact
1635
- * system prompt (there's no own prompt to fall back to). Mirrored middleware
1636
- * is only added when its model matches the parent's, since that's the only
1637
- * case with a cache benefit to protect. Deliberately has no `systemPrompt`
1638
- * of its own: since its system slot always carries the parent's prompt,
1639
- * there's nothing of its own to put there. If you need a subagent with a
1640
- * distinguishing system prompt, use {@link SubAgent} without forking instead.
1641
- *
1642
- * @example
1643
- * ```typescript
1644
- * const researcher: ForkedSubAgent = {
1645
- * name: "researcher",
1646
- * description: "Continues the current investigation with full context",
1647
- * mode: "fork",
1648
- * tools: [webSearchTool],
1649
- * };
1650
- * ```
1645
+ * A {@link SubAgent} with `mode: "fork"`.
1651
1646
  *
1652
- * @experimental Forking subagents is experimental and subject to change
1647
+ * @deprecated Kept as a named type for backward compatibility with code that imported
1648
+ * `ForkedSubAgent` before it merged into `SubAgent` — not a distinct shape
1649
+ * with its own constraints (a fork can now declare its own `systemPrompt`,
1650
+ * same as any `SubAgent`). Prefer `SubAgent` with `mode: "fork"` in new code.
1653
1651
  */
1654
- interface ForkedSubAgent extends SubAgentBase {
1655
- /** A ForkedSubAgent never has its own system prompt — always the parent's. */
1656
- systemPrompt?: undefined;
1657
- /**
1658
- * Always `"fork"`. Required (not defaulted) so this can't structurally
1659
- * collapse into a plain `SubAgent` — see `isForkedSubAgent` below.
1660
- */
1652
+ interface ForkedSubAgent extends SubAgent {
1661
1653
  mode: "fork";
1662
1654
  }
1663
1655
  /**
@@ -1701,7 +1693,7 @@ declare const GENERAL_PURPOSE_SUBAGENT: {
1701
1693
  readonly name: "general-purpose";
1702
1694
  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.";
1703
1695
  readonly systemPrompt: "In order to complete the objective that the user asks of you, you have access to a number of standard tools.";
1704
- readonly mode: "handoff";
1696
+ readonly mode: "isolated";
1705
1697
  };
1706
1698
  /**
1707
1699
  * Create a runnable agent from a declarative `SubAgent` spec.
@@ -1737,14 +1729,14 @@ interface SubAgentMiddlewareOptions {
1737
1729
  /** The tool configs for the default general-purpose subagent */
1738
1730
  defaultInterruptOn?: Record<string, boolean | InterruptOnConfig> | null;
1739
1731
  /** A list of additional subagents to provide to the agent */
1740
- subagents?: (SubAgent | CompiledSubAgent | ForkedSubAgent)[];
1732
+ subagents?: (SubAgent | CompiledSubAgent)[];
1741
1733
  /** Full system prompt override */
1742
1734
  systemPrompt?: string | null;
1743
1735
  /** Whether to include the general-purpose agent */
1744
1736
  generalPurposeAgent?: boolean;
1745
1737
  /** Custom description for the task tool */
1746
1738
  taskDescription?: string | null;
1747
- /** Inherited by `ForkedSubAgent`s and `mode: "fork"` compiled subagents */
1739
+ /** Inherited by a `mode: "fork"` declarative or compiled subagent */
1748
1740
  parentSystemPrompt?: string | SystemMessage | null;
1749
1741
  }
1750
1742
  /**
@@ -2491,8 +2483,8 @@ type BuiltinToolPlaceholder<N extends string> = {
2491
2483
  */
2492
2484
  type DeepAgentBuiltinToolsTuple = { [K in DeepAgentBuiltinToolName]: BuiltinToolPlaceholder<K>; }[DeepAgentBuiltinToolName][];
2493
2485
  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>;
2494
- /** Any subagent specification — sync, compiled, forked, or async. */
2495
- type AnySubAgent = SubAgent | CompiledSubAgent | ForkedSubAgent | AsyncSubAgent;
2486
+ /** Any subagent specification — sync, compiled, or async. */
2487
+ type AnySubAgent = SubAgent | CompiledSubAgent | AsyncSubAgent;
2496
2488
  interface TypedToolStrategy<T = unknown> extends Array<ToolStrategy<any>> {
2497
2489
  _schemaType?: T;
2498
2490
  }
@@ -2753,7 +2745,7 @@ type InferSubagentByName<T, TName extends string> = InferDeepAgentSubagents<T> e
2753
2745
  * type SubagentState = InferMiddlewareStates<SubagentMiddleware>;
2754
2746
  * ```
2755
2747
  */
2756
- 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;
2748
+ type InferSubagentReactAgentType<TSubagent extends SubAgent | CompiledSubAgent> = TSubagent extends CompiledSubAgent ? TSubagent["runnable"] : TSubagent extends SubAgent ? ReactAgent<AgentTypeConfig<ResponseFormatUndefined, undefined, AnyAnnotationRoot, ExtractSubAgentMiddleware<TSubagent>, readonly []>> : never;
2757
2749
  /**
2758
2750
  * Configuration parameters for creating a Deep Agent
2759
2751
  * Matches Python's create_deep_agent parameters
@@ -2769,7 +2761,10 @@ type InferSubagentReactAgentType<TSubagent extends SubAgent | CompiledSubAgent |
2769
2761
  interface CreateDeepAgentParams<TResponse extends SupportedResponseFormat = SupportedResponseFormat, ContextSchema extends AnnotationRoot<any> | InteropZodObject = AnnotationRoot<any>, TMiddleware extends readonly AgentMiddleware[] = readonly AgentMiddleware[], TSubagents extends readonly AnySubAgent[] = readonly AnySubAgent[], TTools extends readonly (ClientTool | ServerTool)[] = readonly (ClientTool | ServerTool)[], TStreamTransformers extends ReadonlyArray<() => StreamTransformer<any>> = readonly [], TStateSchema extends AnyStateSchema | InteropZodObject | undefined = undefined> {
2770
2762
  /** The model to use (model name string or LanguageModelLike instance). Defaults to claude-sonnet-4-5-20250929 */
2771
2763
  model?: BaseLanguageModel | string;
2772
- /** Tools the agent should have access to */
2764
+ /**
2765
+ * Additional tools for the agent. Passing tools here does not remove built-in
2766
+ * filesystem tools; customize `FilesystemMiddleware` to remove them entirely.
2767
+ */
2773
2768
  tools?: TTools | StructuredTool$1[];
2774
2769
  /**
2775
2770
  * Custom system instructions. Structured configuration is deprecated and
@@ -4213,6 +4208,20 @@ declare class LangSmithSandbox extends BaseSandbox {
4213
4208
  }
4214
4209
  //#endregion
4215
4210
  //#region src/backends/utils.d.ts
4211
+ /**
4212
+ * Normalize model- or caller-supplied text pagination bounds.
4213
+ *
4214
+ * Every backend must slice content and calculate pagination metadata from the
4215
+ * same normalized values. Otherwise a fractional or negative argument could
4216
+ * return one window while advertising a different `nextOffset`.
4217
+ *
4218
+ * Binary reads do not use this helper because their backend contract ignores
4219
+ * line-based offset and limit values.
4220
+ */
4221
+ declare function normalizeReadPagination(offset: number, limit: number): {
4222
+ offset: number;
4223
+ limit: number;
4224
+ };
4216
4225
  /**
4217
4226
  * Adapt a v1 {@link BackendProtocol} to {@link BackendProtocolV2}.
4218
4227
  *
@@ -4380,5 +4389,5 @@ declare function createDeepAgent<TResponse extends SupportedResponseFormat = Sup
4380
4389
  }, import("zod/v4/core").$strip>>;
4381
4390
  }, 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>>;
4382
4391
  //#endregion
4383
- 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 };
4384
- //# sourceMappingURL=agent-HW8KptlB.d.cts.map
4392
+ export { AsyncTaskStatus as $, BackendFactory as $t, createSettings as A, resolveBackend as An, harnessProfileConfigSchema as At, FlattenSubAgentMiddleware as B, ConfigurationErrorCode as Bt, listSkills as C, SandboxListOptions as Cn, SubAgentMiddlewareOptions as Ct, filesValue as D, applyGrepMaxCount as Dn, registerHarnessProfile as Dt, createAgentMemoryMiddleware as E, WriteResult as En, getHarnessProfile as Et, CreateDeepAgentParams as F, GeneralPurposeSubagentConfig as Ft, InferSubagentByName as G, TASK_SYSTEM_PROMPT as Gt, InferDeepAgentType as H, BASE_AGENT_PROMPT as Ht, DeepAgent as I, HarnessProfile as It, ResolveDeepAgentTypeConfig as J, createFilesystemMiddleware as Jt, InferSubagentReactAgentType as K, FilesystemMiddlewareOptions as Kt, DeepAgentTypeConfig as L, HarnessProfileOptions as Lt, DeepAgentRunStream as M, SandboxBackendProtocolV2 as Mn, serializeProfile as Mt, SubagentRunStream$1 as N, BackendProtocolV1 as Nn, EMPTY_HARNESS_PROFILE as Nt, Settings as O, isSandboxBackend as On, HarnessProfileConfigData as Ot, AnySubAgent as P, SandboxBackendProtocolV1 as Pn, createHarnessProfile as Pt, AsyncTask as Q, AnyBackendProtocol as Qt, DefaultDeepAgentTypeConfig as R, REQUIRED_MIDDLEWARE_NAMES as Rt, SkillMetadata as S, SandboxInfo as Sn, SubAgent as St, AgentMemoryMiddlewareOptions as T, StateAndStore as Tn, createSubAgentMiddleware as Tt, InferStructuredResponse as U, EXECUTION_SYSTEM_PROMPT as Ut, InferDeepAgentSubagents as V, ASYNC_TASK_SYSTEM_PROMPT as Vt, InferSubAgentMiddlewareStates as W, SystemPromptConfig as Wt, AsyncSubAgent as X, FilesystemPermission as Xt, SupportedResponseFormat as Y, FilesystemOperation as Yt, AsyncSubAgentMiddlewareOptions as Z, PermissionMode as Zt, StoreBackend as _, SandboxBackendProtocol as _n, DEFAULT_GENERAL_PURPOSE_DESCRIPTION as _t, adaptBackendProtocol as a, FileData as an, createCompletionCallbackMiddleware as at, StoreBackendOptions as b, SandboxErrorCode as bn, GENERAL_PURPOSE_SUBAGENT as bt, LangSmithSandbox as c, FileOperationError as cn, MAX_SKILL_NAME_LENGTH as ct, BaseSandbox as d, GrepMatch as dn, createSkillsMiddleware as dt, BackendProtocol as en, createAsyncSubAgentMiddleware as et, LocalShellBackend as f, GrepResult as fn, MemoryMiddlewareOptions as ft, FilesystemBackend as g, ReadResult as gn, CompiledSubAgent as gt, CompositeBackend as h, ReadRawResult as hn, createPatchToolCallsMiddleware as ht, LangSmithStartSandboxOptions as i, ExecuteResponse as in, CompletionCallbackOptions as it, findProjectRoot as j, BackendProtocolV2 as jn, parseHarnessProfileConfig as jt, SettingsOptions as k, isSandboxProtocol as kn, generalPurposeSubagentConfigSchema as kt, LangSmithSandboxCreateOptions as l, FileUploadResponse as ln, SkillMetadata$1 as lt, ContextHubBackend as m, MaybePromise as mn, StateBackend as mt, LangSmithCaptureSnapshotOptions as n, DeleteResult as nn, computeSummarizationDefaults as nt, adaptSandboxProtocol as o, FileDownloadResponse as on, MAX_SKILL_DESCRIPTION_LENGTH as ot, LocalShellBackendOptions as p, LsResult as pn, createMemoryMiddleware as pt, MergedDeepAgentState as q, FsToolName as qt, LangSmithSnapshot as r, EditResult as rn, createSummarizationMiddleware as rt, normalizeReadPagination as s, FileInfo as sn, MAX_SKILL_FILE_SIZE as st, createDeepAgent as t, BackendRuntime as tn, isAsyncSubAgent as tt, LangSmithSandboxOptions as u, GlobResult as un, SkillsMiddlewareOptions as ut, StoreBackendContext as v, SandboxDeleteOptions as vn, DEFAULT_SUBAGENT_PROMPT as vt, parseSkillMetadata as w, SandboxListResponse as wn, createSubAgent as wt, ListSkillsOptions as x, SandboxGetOrCreateOptions as xn, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY as xt, StoreBackendNamespaceFactory as y, SandboxError as yn, ForkedSubAgent as yt, ExtractSubAgentMiddleware as z, ConfigurationError as zt };
4393
+ //# sourceMappingURL=agent-D7nWARfg.d.cts.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-Ck9t7AGW.cjs");
2
+ const require_langsmith = require("./langsmith-Ynj9VKxb.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;