@librechat/agents-types 1.4.3 → 1.4.5

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/graph.ts CHANGED
@@ -123,4 +123,12 @@ export type StreamEvent = {
123
123
  export type GraphConfig = {
124
124
  provider: string;
125
125
  thread_id?: string;
126
+ };
127
+
128
+ export type PartMetadata = {
129
+ progress?: number;
130
+ asset_pointer?: string;
131
+ status?: string;
132
+ action?: boolean;
133
+ output?: string;
126
134
  };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@librechat/agents-types",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "Type definitions for @librechat/agents",
5
5
  "types": "index.d.ts",
6
6
  "scripts": {
7
7
  "build": "tsc"
8
8
  },
9
9
  "peerDependencies": {
10
- "@librechat/agents": "^1.4.3"
10
+ "@librechat/agents": "^1.4.5"
11
11
  }
12
12
  }
package/run.ts CHANGED
@@ -52,5 +52,6 @@ export type TaskManagerGraphConfig = {
52
52
  export type RunConfig = {
53
53
  graphConfig: StandardGraphConfig | CollaborativeGraphConfig | TaskManagerGraphConfig;
54
54
  customHandlers?: Record<string, g.EventHandler>;
55
+ returnContent?: boolean;
55
56
  runId?: string;
56
57
  };
package/stream.ts CHANGED
@@ -112,8 +112,8 @@ export type ToolCallsDetails = {
112
112
  };
113
113
 
114
114
  export type ToolCallDelta = {
115
- type: StepTypes.TOOL_CALLS;
116
- tool_calls: ToolCallChunk[]; // #new
115
+ type: StepTypes;
116
+ tool_calls?: ToolCallChunk[]; // #new
117
117
  };
118
118
 
119
119
  export type AgentToolCall = {
package/tools.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  import type { RunnableToolLike } from '@langchain/core/runnables';
3
3
  import type { StructuredToolInterface } from '@langchain/core/tools';
4
4
  import type { ToolCall } from '@langchain/core/messages/tool';
5
+ import { ContentTypes } from '@/common';
5
6
 
6
7
  /** Replacement type for `import type { ToolCall } from '@langchain/core/messages/tool'` in order to have stringified args typed */
7
8
  export type CustomToolCall = {
@@ -10,6 +11,7 @@ export type CustomToolCall = {
10
11
  args: string | Record<string, any>;
11
12
  id?: string;
12
13
  type?: 'tool_call';
14
+ output?: string;
13
15
  }
14
16
 
15
17
  export type GenericTool = StructuredToolInterface | RunnableToolLike;
@@ -28,4 +30,18 @@ export type ToolNodeOptions = {
28
30
  loadRuntimeTools?: ToolRefGenerator;
29
31
  };
30
32
 
31
- export type ToolNodeConstructorParams = ToolRefs & ToolNodeOptions;
33
+ export type ToolNodeConstructorParams = ToolRefs & ToolNodeOptions;
34
+
35
+ export type ToolEndEvent = {
36
+ /** The Step Id of the Tool Call */
37
+ id: string;
38
+ /** The Completed Tool Call */
39
+ tool_call: ToolCall;
40
+ /** The content index of the tool call */
41
+ index: number;
42
+ };
43
+
44
+ export type ToolCallContent = {
45
+ type: ContentTypes.TOOL_CALL;
46
+ tool_call: ToolCall;
47
+ };