@librechat/agents 3.2.55 → 3.2.57
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 +5 -0
- package/dist/cjs/graphs/Graph.cjs.map +1 -1
- package/dist/cjs/run.cjs +4 -0
- package/dist/cjs/run.cjs.map +1 -1
- package/dist/cjs/stream.cjs +9 -3
- package/dist/cjs/stream.cjs.map +1 -1
- package/dist/cjs/tools/ToolNode.cjs +19 -5
- package/dist/cjs/tools/ToolNode.cjs.map +1 -1
- package/dist/esm/graphs/Graph.mjs +5 -0
- package/dist/esm/graphs/Graph.mjs.map +1 -1
- package/dist/esm/run.mjs +4 -0
- package/dist/esm/run.mjs.map +1 -1
- package/dist/esm/stream.mjs +9 -3
- package/dist/esm/stream.mjs.map +1 -1
- package/dist/esm/tools/ToolNode.mjs +19 -5
- package/dist/esm/tools/ToolNode.mjs.map +1 -1
- package/dist/types/graphs/Graph.d.ts +1 -0
- package/dist/types/run.d.ts +1 -0
- package/dist/types/tools/ToolNode.d.ts +11 -1
- package/dist/types/types/run.d.ts +9 -0
- package/dist/types/types/tools.d.ts +16 -0
- package/package.json +1 -1
- package/src/__tests__/stream.eagerEventExecution.test.ts +144 -0
- package/src/graphs/Graph.ts +6 -1
- package/src/run.ts +4 -0
- package/src/stream.ts +28 -2
- package/src/tools/ToolNode.ts +28 -4
- package/src/tools/__tests__/ToolNode.session.test.ts +160 -0
- package/src/types/run.ts +9 -0
- package/src/types/tools.ts +16 -0
package/src/types/tools.ts
CHANGED
|
@@ -38,6 +38,16 @@ export type EagerEventToolExecutionConfig = {
|
|
|
38
38
|
* ToolMessages so provider message ordering is preserved.
|
|
39
39
|
*/
|
|
40
40
|
enabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Tool names that must never be started eagerly. Eager execution
|
|
43
|
+
* speculates on tool args before the model turn commits, so
|
|
44
|
+
* side-effecting tools (e.g. file writes) should opt out: a
|
|
45
|
+
* speculative write can land even if the turn is superseded, and a
|
|
46
|
+
* later arg revision would otherwise trip the "changed after eager
|
|
47
|
+
* execution" guard. Excluded calls fall through to normal ToolNode
|
|
48
|
+
* execution with final args.
|
|
49
|
+
*/
|
|
50
|
+
excludeToolNames?: string[];
|
|
41
51
|
};
|
|
42
52
|
|
|
43
53
|
export type EagerEventToolExecutionOutcome =
|
|
@@ -100,6 +110,12 @@ export type ToolNodeOptions = {
|
|
|
100
110
|
directToolNames?: Set<string>;
|
|
101
111
|
/** Opt-in eager execution for event-driven tool calls. */
|
|
102
112
|
eagerEventToolExecution?: EagerEventToolExecutionConfig;
|
|
113
|
+
/**
|
|
114
|
+
* Host tool names that write to the code-execution sandbox but are not
|
|
115
|
+
* built-in `CODE_EXECUTION_TOOLS`. Their exec `session_id` is folded into the
|
|
116
|
+
* shared code session so later bash_tool/execute_code calls see written files.
|
|
117
|
+
*/
|
|
118
|
+
codeSessionToolNames?: string[];
|
|
103
119
|
/** Shared per-run eager execution registry populated by the stream handler. */
|
|
104
120
|
eagerEventToolExecutions?: Map<string, EagerEventToolExecution>;
|
|
105
121
|
/** Shared per-run per-tool turn counter used by eager and normal event dispatch. */
|