@librechat/agents 3.7.21 → 3.7.22
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/cjs/graphs/Graph.cjs +21 -4
- package/dist/cjs/graphs/Graph.cjs.map +1 -1
- package/dist/cjs/llm/invoke.cjs +21 -6
- package/dist/cjs/llm/invoke.cjs.map +1 -1
- package/dist/cjs/main.cjs +2 -0
- package/dist/cjs/stream.cjs +38 -1
- package/dist/cjs/stream.cjs.map +1 -1
- package/dist/cjs/tools/ToolNode.cjs +95 -18
- package/dist/cjs/tools/ToolNode.cjs.map +1 -1
- package/dist/cjs/tools/ToolSearch.cjs +130 -24
- package/dist/cjs/tools/ToolSearch.cjs.map +1 -1
- package/dist/cjs/tools/local/resolveLocalExecutionTools.cjs +1 -1
- package/dist/cjs/tools/preparedSubagents.cjs +129 -0
- package/dist/cjs/tools/preparedSubagents.cjs.map +1 -0
- package/dist/esm/graphs/Graph.mjs +21 -4
- package/dist/esm/graphs/Graph.mjs.map +1 -1
- package/dist/esm/llm/invoke.mjs +21 -6
- package/dist/esm/llm/invoke.mjs.map +1 -1
- package/dist/esm/main.mjs +2 -2
- package/dist/esm/stream.mjs +39 -2
- package/dist/esm/stream.mjs.map +1 -1
- package/dist/esm/tools/ToolNode.mjs +95 -18
- package/dist/esm/tools/ToolNode.mjs.map +1 -1
- package/dist/esm/tools/ToolSearch.mjs +129 -25
- package/dist/esm/tools/ToolSearch.mjs.map +1 -1
- package/dist/esm/tools/local/resolveLocalExecutionTools.mjs +1 -1
- package/dist/esm/tools/preparedSubagents.mjs +128 -0
- package/dist/esm/tools/preparedSubagents.mjs.map +1 -0
- package/dist/types/graphs/Graph.d.ts +6 -1
- package/dist/types/tools/ToolNode.d.ts +13 -1
- package/dist/types/tools/ToolSearch.d.ts +46 -2
- package/dist/types/tools/preparedSubagents.d.ts +26 -0
- package/dist/types/types/tools.d.ts +17 -0
- package/package.json +1 -1
- package/src/graphs/Graph.ts +63 -5
- package/src/llm/invoke.ts +35 -8
- package/src/stream.ts +70 -1
- package/src/tools/ToolNode.ts +189 -43
- package/src/tools/ToolSearch.ts +278 -28
- package/src/tools/preparedSubagents.ts +228 -0
- package/src/types/tools.ts +17 -0
package/src/types/tools.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
ToolErrorData,
|
|
12
12
|
} from './stream';
|
|
13
13
|
import type { ToolOutputReferenceRegistry } from '@/tools/toolOutputReferences';
|
|
14
|
+
import type { PreparedSubagents } from '@/tools/preparedSubagents';
|
|
14
15
|
import type { RunBreakerScope } from '@/llm/streamLimits';
|
|
15
16
|
import type { HumanInTheLoopConfig } from './hitl';
|
|
16
17
|
import type { LangfuseConfig } from './graph';
|
|
@@ -56,6 +57,13 @@ export type EagerEventToolExecutionConfig = {
|
|
|
56
57
|
* execution with final args.
|
|
57
58
|
*/
|
|
58
59
|
excludeToolNames?: string[];
|
|
60
|
+
/**
|
|
61
|
+
* Maximum retained early foreground subagent invocations per graph. Defaults
|
|
62
|
+
* to 4; 0 disables them. Checkpoints, parent tool hooks, background calls and
|
|
63
|
+
* control-flow graph tools retain normal batch execution. Once a child has
|
|
64
|
+
* started, a failed/revised model attempt fails instead of automatically retrying.
|
|
65
|
+
*/
|
|
66
|
+
maxPendingSubagents?: number;
|
|
59
67
|
};
|
|
60
68
|
|
|
61
69
|
export type EagerEventToolExecutionOutcome =
|
|
@@ -290,6 +298,8 @@ export type ToolNodeOptions = {
|
|
|
290
298
|
* controller.
|
|
291
299
|
*/
|
|
292
300
|
getRunScope?: () => RunBreakerScope;
|
|
301
|
+
/** Internal graph-owned prepared invocation registry. */
|
|
302
|
+
preparedSubagents?: PreparedSubagents;
|
|
293
303
|
/** SDK-owned checkpoint bridge for open run-step lifecycle state. */
|
|
294
304
|
restoreRunStepResumeState?: (
|
|
295
305
|
state?: RunStepResumeState,
|
|
@@ -1259,6 +1269,13 @@ export type ToolSearchArtifact = {
|
|
|
1259
1269
|
total_searched: number;
|
|
1260
1270
|
pattern: string;
|
|
1261
1271
|
error?: string;
|
|
1272
|
+
/** Servers that had tools to search, emitted when a server filter matched
|
|
1273
|
+
* nothing so the caller can see what it could have asked for. */
|
|
1274
|
+
available_mcp_servers?: string[];
|
|
1275
|
+
/** Requested servers that matched no registered server. */
|
|
1276
|
+
unmatched_mcp_servers?: string[];
|
|
1277
|
+
/** Requested servers that exist but had no tools left to search. */
|
|
1278
|
+
idle_mcp_servers?: string[];
|
|
1262
1279
|
};
|
|
1263
1280
|
};
|
|
1264
1281
|
|