@librechat/agents-types 2.4.49 → 2.4.50

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tools.ts +17 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@librechat/agents-types",
3
- "version": "2.4.49",
3
+ "version": "2.4.50",
4
4
  "description": "Type definitions for @librechat/agents",
5
5
  "types": "index.d.ts",
6
6
  "scripts": {
package/tools.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/types/tools.ts
2
- import type { RunnableToolLike } from '@langchain/core/runnables';
3
- import type { StructuredToolInterface } from '@langchain/core/tools';
2
+ import type { BindToolsInput } from '@langchain/core/language_models/chat_models';
3
+ import type { GoogleAIToolType } from '@langchain/google-common';
4
4
  import type { ToolCall } from '@langchain/core/messages/tool';
5
5
  import type { ToolErrorData } from './stream';
6
6
  import { EnvVar } from '@/common';
@@ -13,9 +13,9 @@ export type CustomToolCall = {
13
13
  id?: string;
14
14
  type?: 'tool_call';
15
15
  output?: string;
16
- }
16
+ };
17
17
 
18
- export type GenericTool = StructuredToolInterface | RunnableToolLike;
18
+ export type GenericTool = BindToolsInput | GoogleAIToolType;
19
19
  export type ToolMap = Map<string, GenericTool>;
20
20
  export type ToolRefs = {
21
21
  tools: GenericTool[];
@@ -30,7 +30,10 @@ export type ToolNodeOptions = {
30
30
  handleToolErrors?: boolean;
31
31
  loadRuntimeTools?: ToolRefGenerator;
32
32
  toolCallStepIds?: Map<string, string>;
33
- errorHandler?: (data: ToolErrorData, metadata?: Record<string, unknown>) => void
33
+ errorHandler?: (
34
+ data: ToolErrorData,
35
+ metadata?: Record<string, unknown>
36
+ ) => void;
34
37
  };
35
38
 
36
39
  export type ToolNodeConstructorParams = ToolRefs & ToolNodeOptions;
@@ -50,13 +53,15 @@ export type CodeEnvFile = {
50
53
  session_id: string;
51
54
  };
52
55
 
53
- export type CodeExecutionToolParams = undefined | {
54
- session_id?: string;
55
- user_id?: string;
56
- apiKey?: string;
57
- files?: CodeEnvFile[];
58
- [EnvVar.CODE_API_KEY]?: string;
59
- }
56
+ export type CodeExecutionToolParams =
57
+ | undefined
58
+ | {
59
+ session_id?: string;
60
+ user_id?: string;
61
+ apiKey?: string;
62
+ files?: CodeEnvFile[];
63
+ [EnvVar.CODE_API_KEY]?: string;
64
+ };
60
65
 
61
66
  export type FileRef = {
62
67
  id: string;