deepagents 1.14.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-B05mw_iK.d.cts → agent-FG1QOMBi.d.cts} +243 -14
- package/dist/{agent-CxEdojMv.d.ts → agent-rhzpV1Ew.d.ts} +247 -19
- package/dist/browser.cjs +2 -1
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +2 -2
- package/dist/index.cjs +7 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/{langsmith-Bhg_Q4ZO.cjs → langsmith-DMOexB11.cjs} +1392 -148
- package/dist/langsmith-DMOexB11.cjs.map +1 -0
- package/dist/{langsmith-Bgi_Ta-k.js → langsmith-v_uskil7.js} +1358 -150
- package/dist/langsmith-v_uskil7.js.map +1 -0
- package/dist/node.cjs +7 -2
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +3 -3
- package/dist/{src-BGwHTd6z.js → src-DksURH8I.js} +68 -2
- package/dist/src-DksURH8I.js.map +1 -0
- package/dist/{src-CB_Eac87.cjs → src-L1errMkM.cjs} +68 -2
- package/dist/src-L1errMkM.cjs.map +1 -0
- package/package.json +18 -8
- package/dist/langsmith-Bgi_Ta-k.js.map +0 -1
- package/dist/langsmith-Bhg_Q4ZO.cjs.map +0 -1
- package/dist/src-BGwHTd6z.js.map +0 -1
- package/dist/src-CB_Eac87.cjs.map +0 -1
|
@@ -5,6 +5,7 @@ import { AnnotationRoot, AnyStateSchema, Command, ReducedValue, StateDefinitionI
|
|
|
5
5
|
import { z } from "zod/v4";
|
|
6
6
|
import { BaseCheckpointSaver, BaseStore } from "@langchain/langgraph-checkpoint";
|
|
7
7
|
import * as _messages from "@langchain/core/messages";
|
|
8
|
+
import { BaseMessage } from "@langchain/core/messages";
|
|
8
9
|
import { ClientTool, ServerTool, StructuredTool as StructuredTool$1 } from "@langchain/core/tools";
|
|
9
10
|
import { BaseLanguageModel, LanguageModelLike } from "@langchain/core/language_models/base";
|
|
10
11
|
import { Runnable } from "@langchain/core/runnables";
|
|
@@ -907,6 +908,12 @@ interface FilesystemMiddlewareOptions {
|
|
|
907
908
|
* default. Applies to `ls`, `read_file`, `write_file`, `edit_file`,
|
|
908
909
|
* `glob`, and `grep`.
|
|
909
910
|
*
|
|
911
|
+
* Paths are canonicalized (`.` and empty segments dropped) before matching.
|
|
912
|
+
* With `FilesystemBackend` (or a `CompositeBackend` route to one), rules
|
|
913
|
+
* are also checked against the symlink-resolved target, and a deny on either
|
|
914
|
+
* form blocks the call — so allow rules must cover a symlink's target, not
|
|
915
|
+
* just the link.
|
|
916
|
+
*
|
|
910
917
|
* **Note on `execute`**: permissions are not enforced on `execute` because
|
|
911
918
|
* shell commands can access any path regardless of path-based rules. Using
|
|
912
919
|
* permissions with an execution-capable backend (one where `isSandboxBackend`
|
|
@@ -927,6 +934,21 @@ interface FilesystemMiddlewareOptions {
|
|
|
927
934
|
* argument overrides this default. Set to `null` to disable the cap.
|
|
928
935
|
*/
|
|
929
936
|
grepMaxCount?: number | null;
|
|
937
|
+
/**
|
|
938
|
+
* Keep binary `read_file` content and inline `HumanMessage` media out of
|
|
939
|
+
* message history (default: `false`).
|
|
940
|
+
*
|
|
941
|
+
* Payloads are written to `/blobs` on the backend and state keeps a
|
|
942
|
+
* content-addressed reference instead; model requests are rehydrated from
|
|
943
|
+
* the backend. `HumanMessage` payloads added since the last model response
|
|
944
|
+
* are replaced starting at the next model call, so the original input
|
|
945
|
+
* write still lands in checkpoint history for that turn. Useful with
|
|
946
|
+
* sandbox backends. Has no effect when `/blobs` routes to a `StateBackend`,
|
|
947
|
+
* since that backend stores files as part of graph state — offloading
|
|
948
|
+
* there would just relocate the bytes to a different key within the same
|
|
949
|
+
* checkpoint, not out of it.
|
|
950
|
+
*/
|
|
951
|
+
offloadBinaryContent?: boolean;
|
|
930
952
|
}
|
|
931
953
|
/**
|
|
932
954
|
* Create middleware that provides built-in filesystem tools and optional custom
|
|
@@ -1007,12 +1029,12 @@ declare function createFilesystemMiddleware(options?: FilesystemMiddlewareOption
|
|
|
1007
1029
|
offset: number;
|
|
1008
1030
|
limit: number;
|
|
1009
1031
|
}, unknown, {
|
|
1010
|
-
type: string;
|
|
1011
|
-
text: string;
|
|
1012
|
-
}[] | {
|
|
1013
1032
|
type: string;
|
|
1014
1033
|
mimeType: string;
|
|
1015
1034
|
data: string;
|
|
1035
|
+
}[] | {
|
|
1036
|
+
type: string;
|
|
1037
|
+
text: string;
|
|
1016
1038
|
}[] | ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "read_file"> | _langchain.DynamicStructuredTool<z.ZodPreprocess<z.ZodObject<{
|
|
1017
1039
|
file_path: z.ZodString;
|
|
1018
1040
|
content: z.ZodString;
|
|
@@ -1087,7 +1109,7 @@ declare const EXECUTION_SYSTEM_PROMPT: string;
|
|
|
1087
1109
|
* Each code represents a distinct misconfiguration that can be detected at
|
|
1088
1110
|
* agent-construction time. Add new codes here as new validations are added.
|
|
1089
1111
|
*/
|
|
1090
|
-
type ConfigurationErrorCode = "TOOL_NAME_COLLISION";
|
|
1112
|
+
type ConfigurationErrorCode = "TOOL_NAME_COLLISION" | "SKILL_TOOLS_DUPLICATE_NAME" | "SKILL_TOOLS_UNSUPPORTED_TYPE";
|
|
1091
1113
|
declare const CONFIGURATION_ERROR_SYMBOL: unique symbol;
|
|
1092
1114
|
/**
|
|
1093
1115
|
* Thrown when `createDeepAgent` receives invalid configuration.
|
|
@@ -1582,6 +1604,10 @@ interface SubAgent {
|
|
|
1582
1604
|
* Note: Custom subagents do NOT inherit skills from the main agent by default.
|
|
1583
1605
|
* Only the general-purpose subagent inherits the main agent's skills.
|
|
1584
1606
|
*
|
|
1607
|
+
* Not needed when you pass a `createSkillsMiddleware` in `middleware`, for
|
|
1608
|
+
* example to give the subagent skill `tools`: that middleware takes the
|
|
1609
|
+
* same slot on its own.
|
|
1610
|
+
*
|
|
1585
1611
|
* @example
|
|
1586
1612
|
* ```typescript
|
|
1587
1613
|
* const researcher: SubAgent = {
|
|
@@ -1802,8 +1828,12 @@ declare function createPatchToolCallsMiddleware(): AgentMiddleware<undefined, un
|
|
|
1802
1828
|
* for the middleware to apply via Command.
|
|
1803
1829
|
*/
|
|
1804
1830
|
declare class StateBackend implements BackendProtocolV2 {
|
|
1831
|
+
/** Class identity discriminant for {@link StateBackend.isInstance}. */
|
|
1832
|
+
readonly backendKind: "state";
|
|
1805
1833
|
private runtime;
|
|
1806
1834
|
private fileFormat;
|
|
1835
|
+
/** Duck-typed so this survives the plain-object copies `adaptBackendProtocol` makes — a class check wouldn't. */
|
|
1836
|
+
static isInstance(backend: unknown): backend is StateBackend;
|
|
1807
1837
|
constructor(options?: BackendOptions);
|
|
1808
1838
|
/**
|
|
1809
1839
|
* @deprecated Pass no `runtime` argument
|
|
@@ -2034,10 +2064,49 @@ interface SkillMetadata$1 {
|
|
|
2034
2064
|
*/
|
|
2035
2065
|
module?: string;
|
|
2036
2066
|
}
|
|
2067
|
+
/**
|
|
2068
|
+
* Return the skill tools that one `metadata.include_tools` name stands for.
|
|
2069
|
+
*
|
|
2070
|
+
* A resolver lets a skill list tools whose real names are only known at
|
|
2071
|
+
* runtime, such as generated MCP tool names, and lets one name stand for a
|
|
2072
|
+
* family of tools. It's called with the name and the agent's `runtime`, on
|
|
2073
|
+
* every model call while a read or pin of a skill listing that name stays in
|
|
2074
|
+
* context, and again before one of its tools runs. It may return the tools or
|
|
2075
|
+
* a promise of them.
|
|
2076
|
+
*
|
|
2077
|
+
* - Return the same tools for the same name within a thread, or the prompt
|
|
2078
|
+
* cache breaks: a change moves bytes at a position that has already been
|
|
2079
|
+
* sent.
|
|
2080
|
+
* - Keep it cheap, or cache, since it runs on every model call.
|
|
2081
|
+
* - One resolver serves every thread, so scope any cache by what the tools
|
|
2082
|
+
* depend on, usually something in `runtime.context`.
|
|
2083
|
+
* - Names are resolved concurrently, so cache the pending promise, not only
|
|
2084
|
+
* its result.
|
|
2085
|
+
* - Exceptions propagate out of the model call or tool call. To degrade
|
|
2086
|
+
* gracefully, catch inside the resolver and return `[]`.
|
|
2087
|
+
*
|
|
2088
|
+
* A name that exactly matches a tool already in the request is claimed by that
|
|
2089
|
+
* tool and never passed to the resolver.
|
|
2090
|
+
*
|
|
2091
|
+
* @example
|
|
2092
|
+
* ```typescript
|
|
2093
|
+
* // e.g. every tool on a Linear MCP connection, whatever their generated names
|
|
2094
|
+
* const resolveSkillTools: SkillToolResolver<{ workspaceId: string }> = async (
|
|
2095
|
+
* name,
|
|
2096
|
+
* runtime,
|
|
2097
|
+
* ) => (await toolsForWorkspace(runtime.context.workspaceId))[name] ?? [];
|
|
2098
|
+
*
|
|
2099
|
+
* createSkillsMiddleware({ backend, sources: ["/skills/"], tools: resolveSkillTools });
|
|
2100
|
+
* ```
|
|
2101
|
+
*/
|
|
2102
|
+
type SkillToolResolver<TContext = unknown> = (name: string, runtime: Runtime<TContext>) => readonly ClientTool[] | Promise<readonly ClientTool[]>;
|
|
2037
2103
|
/**
|
|
2038
2104
|
* Options for the skills middleware.
|
|
2105
|
+
*
|
|
2106
|
+
* @typeParam TContext - The agent's context type, as a `tools` resolver
|
|
2107
|
+
* receives it on `runtime.context`.
|
|
2039
2108
|
*/
|
|
2040
|
-
interface SkillsMiddlewareOptions {
|
|
2109
|
+
interface SkillsMiddlewareOptions<TContext = unknown> {
|
|
2041
2110
|
/**
|
|
2042
2111
|
* Backend instance or factory function for file operations.
|
|
2043
2112
|
* Use a factory for StateBackend since it requires runtime state.
|
|
@@ -2070,6 +2139,18 @@ interface SkillsMiddlewareOptions {
|
|
|
2070
2139
|
* ```
|
|
2071
2140
|
*/
|
|
2072
2141
|
sources: readonly string[];
|
|
2142
|
+
/**
|
|
2143
|
+
* Tools the model sees only after a skill that lists them in its `SKILL.md`
|
|
2144
|
+
* frontmatter, as a space-separated `metadata.include_tools`, is read or
|
|
2145
|
+
* pinned.
|
|
2146
|
+
*
|
|
2147
|
+
* Pass an array of tools, or a {@link SkillToolResolver} that looks up the
|
|
2148
|
+
* tools one `include_tools` name stands for when a skill is read or pinned.
|
|
2149
|
+
* Unlike other middleware's tools, these are never registered with the
|
|
2150
|
+
* agent: see {@link createSkillsMiddleware} for how they are disclosed and
|
|
2151
|
+
* gated.
|
|
2152
|
+
*/
|
|
2153
|
+
tools?: readonly ClientTool[] | SkillToolResolver<TContext>;
|
|
2073
2154
|
}
|
|
2074
2155
|
/**
|
|
2075
2156
|
* Zod schema for a single skill metadata entry.
|
|
@@ -2124,6 +2205,39 @@ declare const skillsMetadataValue: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<
|
|
|
2124
2205
|
allowedTools: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
2125
2206
|
module: z$1.ZodOptional<z$1.ZodString>;
|
|
2126
2207
|
}, z$1.core.$strip>>>>;
|
|
2208
|
+
/**
|
|
2209
|
+
* State value for a middleware's `pinnedSkills` field: the names of skills to
|
|
2210
|
+
* pin.
|
|
2211
|
+
*
|
|
2212
|
+
* The next time the skills middleware's `beforeModel` runs, before a model
|
|
2213
|
+
* call, each named skill's `SKILL.md`, without its frontmatter, is appended to
|
|
2214
|
+
* the conversation as its own `HumanMessage`, in the order named. The message
|
|
2215
|
+
* is a snapshot: editing the file later doesn't change it, and naming the
|
|
2216
|
+
* skill again appends a new copy.
|
|
2217
|
+
*
|
|
2218
|
+
* Names only, matched exactly against the loaded skills. A name that isn't
|
|
2219
|
+
* loaded, or whose `SKILL.md` can't be read, is skipped without an error. The
|
|
2220
|
+
* key is cleared once consumed, so a later run pins nothing unless it names
|
|
2221
|
+
* skills again. Writes in the same step add up, so parallel tool calls can
|
|
2222
|
+
* each pin skills by returning a `Command`.
|
|
2223
|
+
*
|
|
2224
|
+
* Like {@link skillsMetadataValue}, treat the value as opaque. A middleware
|
|
2225
|
+
* declares it on its state schema to set `pinnedSkills` from its own hooks.
|
|
2226
|
+
*
|
|
2227
|
+
* @example
|
|
2228
|
+
* ```typescript
|
|
2229
|
+
* import { createMiddleware } from "langchain";
|
|
2230
|
+
* import { StateSchema } from "@langchain/langgraph";
|
|
2231
|
+
* import { pinnedSkillsValue } from "deepagents";
|
|
2232
|
+
*
|
|
2233
|
+
* const routeSkills = createMiddleware({
|
|
2234
|
+
* name: "RouteSkills",
|
|
2235
|
+
* stateSchema: new StateSchema({ pinnedSkills: pinnedSkillsValue }),
|
|
2236
|
+
* beforeAgent: (state) => ({ pinnedSkills: skillsFor(state.messages) }),
|
|
2237
|
+
* });
|
|
2238
|
+
* ```
|
|
2239
|
+
*/
|
|
2240
|
+
declare const pinnedSkillsValue: ReducedValue<string[], string[] | undefined>;
|
|
2127
2241
|
/**
|
|
2128
2242
|
* Create backend-agnostic middleware for loading and exposing agent skills.
|
|
2129
2243
|
*
|
|
@@ -2147,8 +2261,62 @@ declare const skillsMetadataValue: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<
|
|
|
2147
2261
|
* invalidate from any hook — including mid-run, from `afterModel` — and see
|
|
2148
2262
|
* the fresh list on the following call. See {@link skillsMetadataValue}.
|
|
2149
2263
|
*
|
|
2264
|
+
* To guarantee the model gets a skill's instructions, for example when the
|
|
2265
|
+
* user names it, pass its name in `pinnedSkills`. Before the next model call,
|
|
2266
|
+
* each named skill's `SKILL.md`, without its frontmatter, is appended to the
|
|
2267
|
+
* conversation as its own `HumanMessage`, with `additional_kwargs.lc_source`
|
|
2268
|
+
* set to `"pinned_skill"` and the skill's `name`, `path` and `description`
|
|
2269
|
+
* under `additional_kwargs.skill`:
|
|
2270
|
+
*
|
|
2271
|
+
* ```ts
|
|
2272
|
+
* await agent.invoke(
|
|
2273
|
+
* {
|
|
2274
|
+
* messages: [new HumanMessage("/write-tests /house-style for auth.py")],
|
|
2275
|
+
* pinnedSkills: ["write-tests", "house-style"],
|
|
2276
|
+
* },
|
|
2277
|
+
* config,
|
|
2278
|
+
* );
|
|
2279
|
+
* ```
|
|
2280
|
+
*
|
|
2281
|
+
* Pins resolve against the skills loaded for the thread, so reset
|
|
2282
|
+
* `skillsMetadata` in the same input to pin a skill added since. See
|
|
2283
|
+
* {@link pinnedSkillsValue}.
|
|
2284
|
+
*
|
|
2285
|
+
* ## Skill tools
|
|
2286
|
+
*
|
|
2287
|
+
* A skill can list the tools its instructions use, separated by spaces, under
|
|
2288
|
+
* `metadata.include_tools` in its `SKILL.md` frontmatter:
|
|
2289
|
+
*
|
|
2290
|
+
* ```yaml
|
|
2291
|
+
* metadata:
|
|
2292
|
+
* include_tools: create_customer_request list_customer_requests
|
|
2293
|
+
* ```
|
|
2294
|
+
*
|
|
2295
|
+
* Pass those tools as `tools`, either as an array or as a
|
|
2296
|
+
* {@link SkillToolResolver} that looks them up by name when a skill is read
|
|
2297
|
+
* or pinned, so one name can stand for a family of tools whose real names are
|
|
2298
|
+
* only known at runtime. The model sees a skill tool only after it reads, with
|
|
2299
|
+
* `read_file`, a skill that lists it, or the skill is pinned, and only while
|
|
2300
|
+
* that read or pin stays in the conversation it is sent; compaction that drops
|
|
2301
|
+
* the read or pin withdraws the tool.
|
|
2302
|
+
* Until then, calling the tool fails with the standard invalid-tool error and
|
|
2303
|
+
* the tool doesn't run. This controls what is in the model's context; it is
|
|
2304
|
+
* not a security boundary, since the model can read any `SKILL.md` at any
|
|
2305
|
+
* time.
|
|
2306
|
+
*
|
|
2307
|
+
* `include_tools` can also name a tool passed to the agent rather than to this
|
|
2308
|
+
* middleware. That tool wins over a skill tool of the same name. If it is
|
|
2309
|
+
* deferred (`extras: { defer_loading: true }`), reading or pinning the skill
|
|
2310
|
+
* discloses it early, and it stays deferred and searchable; if it is bound,
|
|
2311
|
+
* nothing changes.
|
|
2312
|
+
*
|
|
2313
|
+
*
|
|
2150
2314
|
* @param options - Configuration options
|
|
2151
2315
|
* @returns AgentMiddleware for skills loading and injection
|
|
2316
|
+
* @throws {ConfigurationError} If `tools` is neither an array nor a
|
|
2317
|
+
* function (`SKILL_TOOLS_UNSUPPORTED_TYPE`), an entry isn't a client tool
|
|
2318
|
+
* (`SKILL_TOOLS_UNSUPPORTED_TYPE`), or two entries share a name
|
|
2319
|
+
* (`SKILL_TOOLS_DUPLICATE_NAME`).
|
|
2152
2320
|
*
|
|
2153
2321
|
* @example
|
|
2154
2322
|
* ```typescript
|
|
@@ -2158,7 +2326,7 @@ declare const skillsMetadataValue: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<
|
|
|
2158
2326
|
* });
|
|
2159
2327
|
* ```
|
|
2160
2328
|
*/
|
|
2161
|
-
declare function createSkillsMiddleware(options: SkillsMiddlewareOptions): AgentMiddleware<StateSchema<{
|
|
2329
|
+
declare function createSkillsMiddleware<TContext = unknown>(options: SkillsMiddlewareOptions<TContext>): AgentMiddleware<StateSchema<{
|
|
2162
2330
|
skillsMetadata: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodObject<{
|
|
2163
2331
|
name: z$1.ZodString;
|
|
2164
2332
|
description: z$1.ZodString;
|
|
@@ -2169,8 +2337,16 @@ declare function createSkillsMiddleware(options: SkillsMiddlewareOptions): Agent
|
|
|
2169
2337
|
allowedTools: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
2170
2338
|
module: z$1.ZodOptional<z$1.ZodString>;
|
|
2171
2339
|
}, z$1.core.$strip>>>>;
|
|
2172
|
-
|
|
2173
|
-
|
|
2340
|
+
pinnedSkills: ReducedValue<string[], string[] | undefined>;
|
|
2341
|
+
files: ReducedValue<FilesRecord | undefined, FilesRecordUpdate | undefined>;
|
|
2342
|
+
/**
|
|
2343
|
+
* The skill tools disclosed to the latest model call, each mapped to the
|
|
2344
|
+
* include name that produced it, for the tool-time gate. Written on every
|
|
2345
|
+
* model call of a skills middleware with skill tools. The last write wins,
|
|
2346
|
+
* so a model call retried within one step can write it again.
|
|
2347
|
+
*/
|
|
2348
|
+
_skillToolsDisclosed: ReducedValue<Record<string, string> | undefined, Record<string, string> | undefined>;
|
|
2349
|
+
}>, undefined, unknown, readonly (ServerTool | ClientTool)[], readonly []>;
|
|
2174
2350
|
/**
|
|
2175
2351
|
* The middleware value returned by {@link createSkillsMiddleware}.
|
|
2176
2352
|
*
|
|
@@ -2528,6 +2704,40 @@ declare function createAsyncSubAgentMiddleware(options: AsyncSubAgentMiddlewareO
|
|
|
2528
2704
|
statusFilter?: string | null | undefined;
|
|
2529
2705
|
}, string | Command<unknown, Record<string, unknown>, string>, unknown, "list_async_tasks">)[], readonly []>;
|
|
2530
2706
|
//#endregion
|
|
2707
|
+
//#region src/middleware/unsupportedContent.d.ts
|
|
2708
|
+
/** Content block types `read_file` may emit that require multimodal model support. */
|
|
2709
|
+
declare const MULTIMODAL_BLOCK_TYPES: ReadonlySet<string>;
|
|
2710
|
+
type Profile = Record<string, unknown>;
|
|
2711
|
+
type Block = Record<string, unknown> & {
|
|
2712
|
+
type: string;
|
|
2713
|
+
};
|
|
2714
|
+
/**
|
|
2715
|
+
* Whether the model accepts a multimodal block.
|
|
2716
|
+
*
|
|
2717
|
+
* Missing profile fields default to supported, since profile coverage is
|
|
2718
|
+
* incomplete — except `file` blocks, where a missing `fileMimeTypes`
|
|
2719
|
+
* defaults to unsupported (see `fileBlockSupported`).
|
|
2720
|
+
*/
|
|
2721
|
+
declare function multimodalBlockSupported(block: Block, profile: Profile, inToolMessage: boolean): boolean;
|
|
2722
|
+
/**
|
|
2723
|
+
* Without this, a request carrying content the model can't accept (e.g. a
|
|
2724
|
+
* `.zip` file sent to a model without file support) fails with a
|
|
2725
|
+
* non-retryable 400, and since the content stays in history, every later
|
|
2726
|
+
* turn fails the same way. Only the request is changed; messages in state
|
|
2727
|
+
* are left untouched, so switching to a model that accepts the content
|
|
2728
|
+
* sends it again.
|
|
2729
|
+
*/
|
|
2730
|
+
declare function scrubUnsupportedMultimodalContent(messages: readonly BaseMessage[], model: unknown): BaseMessage[];
|
|
2731
|
+
/**
|
|
2732
|
+
* Support is read from `model.profile` (see
|
|
2733
|
+
* https://docs.langchain.com/oss/javascript/langchain/models#model-profiles).
|
|
2734
|
+
*
|
|
2735
|
+
* Place this middleware last in the agent's `middleware` list, so that if
|
|
2736
|
+
* some other middleware changes `request.model`, this one sees the model
|
|
2737
|
+
* that will actually receive the request.
|
|
2738
|
+
*/
|
|
2739
|
+
declare function createUnsupportedContentMiddleware(): import("langchain").AgentMiddleware<undefined, undefined, unknown, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
2740
|
+
//#endregion
|
|
2531
2741
|
//#region src/types.d.ts
|
|
2532
2742
|
type AnyAnnotationRoot = AnnotationRoot<any>;
|
|
2533
2743
|
/**
|
|
@@ -3493,6 +3703,15 @@ declare class FilesystemBackend implements BackendProtocolV2 {
|
|
|
3493
3703
|
* delete(), which may target a symlink itself without following it.
|
|
3494
3704
|
*/
|
|
3495
3705
|
private assertRealPathWithinRoot;
|
|
3706
|
+
/**
|
|
3707
|
+
* Resolve `key` to the path an operation would actually touch, following
|
|
3708
|
+
* symlinks in every existing segment (including dangling ones). Missing
|
|
3709
|
+
* trailing segments are kept as given.
|
|
3710
|
+
*
|
|
3711
|
+
* Paths inside the root keep the root's configured form. In virtual mode the
|
|
3712
|
+
* result is a virtual path, and a target outside the root throws.
|
|
3713
|
+
*/
|
|
3714
|
+
private resolveRealPath;
|
|
3496
3715
|
/**
|
|
3497
3716
|
* Resolve the concrete path to unlink for a virtual delete operation.
|
|
3498
3717
|
*/
|
|
@@ -3610,7 +3829,7 @@ declare class CompositeBackend implements BackendProtocolV2 {
|
|
|
3610
3829
|
constructor(defaultBackend: AnyBackendProtocol, routes: Record<string, AnyBackendProtocol>);
|
|
3611
3830
|
/** Delegates to default backend's id if it is a sandbox, otherwise empty string. */
|
|
3612
3831
|
get id(): string;
|
|
3613
|
-
/** Route prefixes registered on this backend (e.g. `["/workspace"]`). */
|
|
3832
|
+
/** Route prefixes registered on this backend, normalized to a trailing slash (e.g. `["/workspace/"]`). */
|
|
3614
3833
|
get routePrefixes(): string[];
|
|
3615
3834
|
/**
|
|
3616
3835
|
* Type guard — returns true if `backend` is a {@link CompositeBackend}.
|
|
@@ -3619,6 +3838,16 @@ declare class CompositeBackend implements BackendProtocolV2 {
|
|
|
3619
3838
|
* where `instanceof` may fail.
|
|
3620
3839
|
*/
|
|
3621
3840
|
static isInstance(backend: unknown): backend is CompositeBackend;
|
|
3841
|
+
/**
|
|
3842
|
+
* Returns the backend for `path`, with the matched prefix stripped (`/foo` → `/`).
|
|
3843
|
+
* Routes match on path-segment boundaries: `/foo` matches `/foo/bar` but not `/foobar`.
|
|
3844
|
+
*/
|
|
3845
|
+
resolveBackendForPath(path: string): [BackendProtocolV2, string];
|
|
3846
|
+
/**
|
|
3847
|
+
* Resolve symlinks via the backend that owns `path`, re-adding the route
|
|
3848
|
+
* prefix. Returns `path` unchanged when that backend has no realpath hook.
|
|
3849
|
+
*/
|
|
3850
|
+
private resolveRealPath;
|
|
3622
3851
|
/**
|
|
3623
3852
|
* Determine which backend handles this key and strip prefix.
|
|
3624
3853
|
*
|
|
@@ -4423,12 +4652,12 @@ declare function createDeepAgent<TResponse extends SupportedResponseFormat = Sup
|
|
|
4423
4652
|
offset: number;
|
|
4424
4653
|
limit: number;
|
|
4425
4654
|
}, unknown, {
|
|
4426
|
-
type: string;
|
|
4427
|
-
text: string;
|
|
4428
|
-
}[] | {
|
|
4429
4655
|
type: string;
|
|
4430
4656
|
mimeType: string;
|
|
4431
4657
|
data: string;
|
|
4658
|
+
}[] | {
|
|
4659
|
+
type: string;
|
|
4660
|
+
text: string;
|
|
4432
4661
|
}[] | _messages.ToolMessage<_messages.MessageStructure<_messages.MessageToolSet>>, unknown, "read_file"> | import("langchain").DynamicStructuredTool<import("zod").ZodPreprocess<import("zod").ZodObject<{
|
|
4433
4662
|
file_path: import("zod").ZodString;
|
|
4434
4663
|
content: import("zod").ZodString;
|
|
@@ -4476,5 +4705,5 @@ declare function createDeepAgent<TResponse extends SupportedResponseFormat = Sup
|
|
|
4476
4705
|
}, import("zod/v4/core").$strip>>;
|
|
4477
4706
|
}, 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>>;
|
|
4478
4707
|
//#endregion
|
|
4479
|
-
export {
|
|
4480
|
-
//# sourceMappingURL=agent-
|
|
4708
|
+
export { scrubUnsupportedMultimodalContent as $, TASK_SYSTEM_PROMPT as $t, createSettings as A, SandboxInfo as An, SubAgent as At, FlattenSubAgentMiddleware as B, SandboxBackendProtocolV2 as Bn, serializeProfile as Bt, listSkills as C, ReadRawResult as Cn, createPatchToolCallsMiddleware as Ct, filesValue as D, SandboxError as Dn, ForkedSubAgent as Dt, createAgentMemoryMiddleware as E, SandboxDeleteOptions as En, DEFAULT_SUBAGENT_PROMPT as Et, CreateDeepAgentParams as F, applyGrepMaxCount as Fn, registerHarnessProfile as Ft, InferSubagentByName as G, HarnessProfileOptions as Gt, InferDeepAgentType as H, SandboxBackendProtocolV1 as Hn, createHarnessProfile as Ht, DeepAgent as I, isSandboxBackend as In, HarnessProfileConfigData as It, ResolveDeepAgentTypeConfig as J, ConfigurationErrorCode as Jt, InferSubagentReactAgentType as K, REQUIRED_MIDDLEWARE_NAMES as Kt, DeepAgentTypeConfig as L, isSandboxProtocol as Ln, generalPurposeSubagentConfigSchema as Lt, DeepAgentRunStream as M, SandboxListResponse as Mn, createSubAgent as Mt, SubagentRunStream$1 as N, StateAndStore as Nn, createSubAgentMiddleware as Nt, Settings as O, SandboxErrorCode as On, GENERAL_PURPOSE_SUBAGENT as Ot, AnySubAgent as P, WriteResult as Pn, getHarnessProfile as Pt, multimodalBlockSupported as Q, SystemPromptConfig as Qt, DefaultDeepAgentTypeConfig as R, resolveBackend as Rn, harnessProfileConfigSchema as Rt, SkillMetadata as S, MaybePromise as Sn, StateBackend as St, AgentMemoryMiddlewareOptions as T, SandboxBackendProtocol as Tn, DEFAULT_GENERAL_PURPOSE_DESCRIPTION as Tt, InferStructuredResponse as U, GeneralPurposeSubagentConfig as Ut, InferDeepAgentSubagents as V, BackendProtocolV1 as Vn, EMPTY_HARNESS_PROFILE as Vt, InferSubAgentMiddlewareStates as W, HarnessProfile as Wt, MULTIMODAL_BLOCK_TYPES as X, BASE_AGENT_PROMPT as Xt, SupportedResponseFormat as Y, ASYNC_TASK_SYSTEM_PROMPT as Yt, createUnsupportedContentMiddleware as Z, EXECUTION_SYSTEM_PROMPT as Zt, StoreBackend as _, FileUploadResponse as _n, createSkillsMiddleware as _t, adaptBackendProtocol as a, PermissionMode as an, isAsyncSubAgent as at, StoreBackendOptions as b, GrepResult as bn, MemoryMiddlewareOptions as bt, LangSmithSandbox as c, BackendProtocol as cn, CompletionCallbackOptions as ct, BaseSandbox as d, EditResult as dn, MAX_SKILL_FILE_SIZE as dt, FilesystemMiddlewareOptions as en, AsyncSubAgent as et, LocalShellBackend as f, ExecuteResponse as fn, MAX_SKILL_NAME_LENGTH as ft, FilesystemBackend as g, FileOperationError as gn, SkillsMiddlewareOptions as gt, CompositeBackend as h, FileInfo as hn, SkillToolResolver as ht, LangSmithStartSandboxOptions as i, FilesystemPermission as in, createAsyncSubAgentMiddleware as it, findProjectRoot as j, SandboxListOptions as jn, SubAgentMiddlewareOptions as jt, SettingsOptions as k, SandboxGetOrCreateOptions as kn, SUBAGENT_RESPONSE_FORMAT_CONFIG_KEY as kt, LangSmithSandboxCreateOptions as l, BackendRuntime as ln, createCompletionCallbackMiddleware as lt, ContextHubBackend as m, FileDownloadResponse as mn, SkillMetadataEntry as mt, LangSmithCaptureSnapshotOptions as n, createFilesystemMiddleware as nn, AsyncTask as nt, adaptSandboxProtocol as o, AnyBackendProtocol as on, computeSummarizationDefaults as ot, LocalShellBackendOptions as p, FileData as pn, SkillMetadata$1 as pt, MergedDeepAgentState as q, ConfigurationError as qt, LangSmithSnapshot as r, FilesystemOperation as rn, AsyncTaskStatus as rt, normalizeReadPagination as s, BackendFactory as sn, createSummarizationMiddleware as st, createDeepAgent as t, FsToolName as tn, AsyncSubAgentMiddlewareOptions as tt, LangSmithSandboxOptions as u, DeleteResult as un, MAX_SKILL_DESCRIPTION_LENGTH as ut, StoreBackendContext as v, GlobResult as vn, pinnedSkillsValue as vt, parseSkillMetadata as w, ReadResult as wn, CompiledSubAgent as wt, ListSkillsOptions as x, LsResult as xn, createMemoryMiddleware as xt, StoreBackendNamespaceFactory as y, GrepMatch as yn, skillsMetadataValue as yt, ExtractSubAgentMiddleware as z, BackendProtocolV2 as zn, parseHarnessProfileConfig as zt };
|
|
4709
|
+
//# sourceMappingURL=agent-FG1QOMBi.d.cts.map
|