@librechat/agents 3.5.0 → 3.5.1

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 (106) hide show
  1. package/dist/types/agents/AgentContext.d.ts +3 -3
  2. package/dist/types/agents/projection.d.ts +1 -1
  3. package/dist/types/events.d.ts +2 -2
  4. package/dist/types/graphs/Graph.d.ts +11 -11
  5. package/dist/types/graphs/MultiAgentGraph.d.ts +2 -2
  6. package/dist/types/graphs/createGraph.d.ts +4 -4
  7. package/dist/types/graphs/graphFactory.d.ts +1 -1
  8. package/dist/types/hitl/askUserQuestion.d.ts +1 -1
  9. package/dist/types/hitl/askUserQuestions.d.ts +1 -1
  10. package/dist/types/hitl/askUserQuestionsInterrupt.d.ts +1 -1
  11. package/dist/types/hooks/types.d.ts +1 -1
  12. package/dist/types/instrumentation.d.ts +1 -1
  13. package/dist/types/langfuse.d.ts +3 -3
  14. package/dist/types/langfuseConfig.d.ts +2 -2
  15. package/dist/types/langfuseRuntimeContext.d.ts +1 -1
  16. package/dist/types/langfuseRuntimeScope.d.ts +2 -2
  17. package/dist/types/langfuseSpanRegistry.d.ts +1 -1
  18. package/dist/types/langfuseToolOutputTracing.d.ts +3 -3
  19. package/dist/types/llm/anthropic/index.d.ts +1 -1
  20. package/dist/types/llm/bedrock/index.d.ts +1 -1
  21. package/dist/types/llm/bedrock/toolCache.d.ts +2 -2
  22. package/dist/types/llm/contextOverflowRecovery.d.ts +2 -2
  23. package/dist/types/llm/google/index.d.ts +1 -1
  24. package/dist/types/llm/init.d.ts +2 -2
  25. package/dist/types/llm/invoke.d.ts +6 -6
  26. package/dist/types/llm/mistral/index.d.ts +1 -1
  27. package/dist/types/llm/openai/index.d.ts +2 -2
  28. package/dist/types/llm/openrouter/index.d.ts +2 -2
  29. package/dist/types/llm/openrouter/toolCache.d.ts +2 -2
  30. package/dist/types/llm/providers.d.ts +2 -2
  31. package/dist/types/llm/request.d.ts +2 -2
  32. package/dist/types/llm/stream/chunkAdapters.d.ts +1 -1
  33. package/dist/types/llm/streamLimits.d.ts +1 -1
  34. package/dist/types/llm/truncation.d.ts +1 -1
  35. package/dist/types/llm/vertexai/index.d.ts +1 -1
  36. package/dist/types/messages/alternation.d.ts +1 -1
  37. package/dist/types/messages/anthropicToolCache.d.ts +2 -2
  38. package/dist/types/messages/assistantPhase.d.ts +3 -3
  39. package/dist/types/messages/budget.d.ts +1 -1
  40. package/dist/types/messages/cache.d.ts +1 -1
  41. package/dist/types/messages/contextPruning.d.ts +2 -2
  42. package/dist/types/messages/core.d.ts +2 -2
  43. package/dist/types/messages/format.d.ts +2 -2
  44. package/dist/types/messages/ids.d.ts +2 -2
  45. package/dist/types/messages/injected.d.ts +1 -1
  46. package/dist/types/messages/langchain.d.ts +1 -1
  47. package/dist/types/messages/prune.d.ts +3 -3
  48. package/dist/types/openai/index.d.ts +1 -1
  49. package/dist/types/prompts/activityLabel.d.ts +2 -2
  50. package/dist/types/responses/index.d.ts +1 -1
  51. package/dist/types/run.d.ts +3 -3
  52. package/dist/types/session/handlers.d.ts +1 -1
  53. package/dist/types/session/types.d.ts +1 -1
  54. package/dist/types/stream.d.ts +4 -4
  55. package/dist/types/summarization/index.d.ts +1 -1
  56. package/dist/types/summarization/node.d.ts +6 -6
  57. package/dist/types/tools/BashExecutor.d.ts +2 -2
  58. package/dist/types/tools/BashProgrammaticToolCalling.d.ts +2 -2
  59. package/dist/types/tools/CodeExecutor.d.ts +3 -3
  60. package/dist/types/tools/CodeSessionFileSummary.d.ts +1 -1
  61. package/dist/types/tools/ProgrammaticToolCalling.d.ts +2 -2
  62. package/dist/types/tools/ReadFile.d.ts +1 -1
  63. package/dist/types/tools/SkillTool.d.ts +1 -1
  64. package/dist/types/tools/SubagentTool.d.ts +3 -3
  65. package/dist/types/tools/ToolNode.d.ts +5 -5
  66. package/dist/types/tools/ToolSearch.d.ts +2 -2
  67. package/dist/types/tools/cloudflare/CloudflareBridgeRuntime.d.ts +1 -1
  68. package/dist/types/tools/cloudflare/CloudflareProgrammaticToolCalling.d.ts +1 -1
  69. package/dist/types/tools/cloudflare/CloudflareSandboxExecutionEngine.d.ts +2 -2
  70. package/dist/types/tools/cloudflare/CloudflareSandboxTools.d.ts +1 -1
  71. package/dist/types/tools/eagerEventExecution.d.ts +1 -1
  72. package/dist/types/tools/handlers.d.ts +3 -3
  73. package/dist/types/tools/intentArg.d.ts +1 -1
  74. package/dist/types/tools/local/CompileCheckTool.d.ts +2 -2
  75. package/dist/types/tools/local/FileCheckpointer.d.ts +1 -1
  76. package/dist/types/tools/local/LocalCodingTools.d.ts +2 -2
  77. package/dist/types/tools/local/LocalExecutionEngine.d.ts +1 -1
  78. package/dist/types/tools/local/LocalExecutionTools.d.ts +1 -1
  79. package/dist/types/tools/local/LocalProgrammaticToolCalling.d.ts +1 -1
  80. package/dist/types/tools/local/bashAst.d.ts +1 -1
  81. package/dist/types/tools/local/resolveLocalExecutionTools.d.ts +1 -1
  82. package/dist/types/tools/local/syntaxCheck.d.ts +1 -1
  83. package/dist/types/tools/ptcTimeout.d.ts +1 -1
  84. package/dist/types/tools/schema.d.ts +1 -1
  85. package/dist/types/tools/search/anthropic.d.ts +1 -1
  86. package/dist/types/tools/skillCatalog.d.ts +1 -1
  87. package/dist/types/tools/subagent/SubagentExecutor.d.ts +5 -5
  88. package/dist/types/tools/subagent/SubagentReplay.d.ts +3 -3
  89. package/dist/types/tools/subagent/childGraphConfig.d.ts +2 -2
  90. package/dist/types/types/activityLabel.d.ts +3 -3
  91. package/dist/types/types/graph.d.ts +7 -7
  92. package/dist/types/types/llm.d.ts +9 -9
  93. package/dist/types/types/run.d.ts +7 -7
  94. package/dist/types/types/stream.d.ts +5 -5
  95. package/dist/types/types/summarize.d.ts +2 -2
  96. package/dist/types/types/tools.d.ts +5 -5
  97. package/dist/types/utils/errors.d.ts +1 -1
  98. package/dist/types/utils/events.d.ts +1 -1
  99. package/dist/types/utils/handlers.d.ts +3 -3
  100. package/dist/types/utils/llm.d.ts +1 -1
  101. package/dist/types/utils/llmConfig.d.ts +1 -1
  102. package/dist/types/utils/title.d.ts +1 -1
  103. package/package.json +28 -32
  104. package/dist/types/agents/__tests__/promptCacheLiveHelpers.d.ts +0 -52
  105. package/dist/types/test/mockTools.d.ts +0 -28
  106. package/dist/types/utils/__tests__/fixtures/contextOverflowSignatures.d.ts +0 -40
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@librechat/agents",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "reova": {
5
5
  "enabled": true,
6
6
  "endpoint": "https://telemetry.reo.dev/data"
@@ -10,69 +10,69 @@
10
10
  "types": "./dist/types/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
+ "types": "./dist/types/index.d.ts",
13
14
  "import": "./dist/esm/main.mjs",
14
- "require": "./dist/cjs/main.cjs",
15
- "types": "./dist/types/index.d.ts"
15
+ "require": "./dist/cjs/main.cjs"
16
16
  },
17
17
  "./openai": {
18
+ "types": "./dist/types/openai/index.d.ts",
18
19
  "import": "./dist/esm/openai/index.mjs",
19
- "require": "./dist/cjs/openai/index.cjs",
20
- "types": "./dist/types/openai/index.d.ts"
20
+ "require": "./dist/cjs/openai/index.cjs"
21
21
  },
22
22
  "./responses": {
23
+ "types": "./dist/types/responses/index.d.ts",
23
24
  "import": "./dist/esm/responses/index.mjs",
24
- "require": "./dist/cjs/responses/index.cjs",
25
- "types": "./dist/types/responses/index.d.ts"
25
+ "require": "./dist/cjs/responses/index.cjs"
26
26
  },
27
27
  "./langchain": {
28
+ "types": "./dist/types/langchain/index.d.ts",
28
29
  "import": "./dist/esm/langchain/index.mjs",
29
- "require": "./dist/cjs/langchain/index.cjs",
30
- "types": "./dist/types/langchain/index.d.ts"
30
+ "require": "./dist/cjs/langchain/index.cjs"
31
31
  },
32
32
  "./langchain/language_models/chat_models": {
33
+ "types": "./dist/types/langchain/language_models/chat_models.d.ts",
33
34
  "import": "./dist/esm/langchain/language_models/chat_models.mjs",
34
- "require": "./dist/cjs/langchain/language_models/chat_models.cjs",
35
- "types": "./dist/types/langchain/language_models/chat_models.d.ts"
35
+ "require": "./dist/cjs/langchain/language_models/chat_models.cjs"
36
36
  },
37
37
  "./langchain/messages": {
38
+ "types": "./dist/types/langchain/messages.d.ts",
38
39
  "import": "./dist/esm/langchain/messages.mjs",
39
- "require": "./dist/cjs/langchain/messages.cjs",
40
- "types": "./dist/types/langchain/messages.d.ts"
40
+ "require": "./dist/cjs/langchain/messages.cjs"
41
41
  },
42
42
  "./langchain/messages/tool": {
43
+ "types": "./dist/types/langchain/messages/tool.d.ts",
43
44
  "import": "./dist/esm/langchain/messages/tool.mjs",
44
- "require": "./dist/cjs/langchain/messages/tool.cjs",
45
- "types": "./dist/types/langchain/messages/tool.d.ts"
45
+ "require": "./dist/cjs/langchain/messages/tool.cjs"
46
46
  },
47
47
  "./langchain/google-common": {
48
+ "types": "./dist/types/langchain/google-common.d.ts",
48
49
  "import": "./dist/esm/langchain/google-common.mjs",
49
- "require": "./dist/cjs/langchain/google-common.cjs",
50
- "types": "./dist/types/langchain/google-common.d.ts"
50
+ "require": "./dist/cjs/langchain/google-common.cjs"
51
51
  },
52
52
  "./langchain/openai": {
53
+ "types": "./dist/types/langchain/openai.d.ts",
53
54
  "import": "./dist/esm/langchain/openai.mjs",
54
- "require": "./dist/cjs/langchain/openai.cjs",
55
- "types": "./dist/types/langchain/openai.d.ts"
55
+ "require": "./dist/cjs/langchain/openai.cjs"
56
56
  },
57
57
  "./langchain/prompts": {
58
+ "types": "./dist/types/langchain/prompts.d.ts",
58
59
  "import": "./dist/esm/langchain/prompts.mjs",
59
- "require": "./dist/cjs/langchain/prompts.cjs",
60
- "types": "./dist/types/langchain/prompts.d.ts"
60
+ "require": "./dist/cjs/langchain/prompts.cjs"
61
61
  },
62
62
  "./langchain/runnables": {
63
+ "types": "./dist/types/langchain/runnables.d.ts",
63
64
  "import": "./dist/esm/langchain/runnables.mjs",
64
- "require": "./dist/cjs/langchain/runnables.cjs",
65
- "types": "./dist/types/langchain/runnables.d.ts"
65
+ "require": "./dist/cjs/langchain/runnables.cjs"
66
66
  },
67
67
  "./langchain/tools": {
68
+ "types": "./dist/types/langchain/tools.d.ts",
68
69
  "import": "./dist/esm/langchain/tools.mjs",
69
- "require": "./dist/cjs/langchain/tools.cjs",
70
- "types": "./dist/types/langchain/tools.d.ts"
70
+ "require": "./dist/cjs/langchain/tools.cjs"
71
71
  },
72
72
  "./langchain/utils/env": {
73
+ "types": "./dist/types/langchain/utils/env.d.ts",
73
74
  "import": "./dist/esm/langchain/utils/env.mjs",
74
- "require": "./dist/cjs/langchain/utils/env.cjs",
75
- "types": "./dist/types/langchain/utils/env.d.ts"
75
+ "require": "./dist/cjs/langchain/utils/env.cjs"
76
76
  }
77
77
  },
78
78
  "typesVersions": {
@@ -125,7 +125,7 @@
125
125
  "scripts": {
126
126
  "prepare": "node husky-setup.js",
127
127
  "prepublishOnly": "npm run build",
128
- "build": "tsdown && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
128
+ "build": "tsdown && tsc -p tsconfig.build.json",
129
129
  "build:dev": "tsdown",
130
130
  "check:circular-deps": "node config/circular-deps.mjs",
131
131
  "test:circular-deps": "node --test config/circular-deps.test.mjs",
@@ -274,10 +274,6 @@
274
274
  "optional": true
275
275
  }
276
276
  },
277
- "imports": {
278
- "@/*": "./src/*",
279
- "~/*": "./*"
280
- },
281
277
  "devDependencies": {
282
278
  "@anthropic-ai/sandbox-runtime": "^0.0.67",
283
279
  "@anthropic-ai/vertex-sdk": "^0.12.0",
@@ -1,52 +0,0 @@
1
- import type { UsageMetadata } from '@langchain/core/messages';
2
- import type { ClientOptions } from '@langchain/openai';
3
- import type { ChatOpenRouterInput } from '../../llm/openrouter';
4
- import type * as t from '../../types';
5
- import { Providers } from '../../common';
6
- type LivePromptCacheProvider = Providers.ANTHROPIC | Providers.BEDROCK | Providers.OPENROUTER;
7
- type PromptCacheExpectedSystemBlock = {
8
- type: 'text';
9
- text: string;
10
- cache_control?: {
11
- type: 'ephemeral';
12
- ttl?: '1h';
13
- };
14
- } | {
15
- cachePoint: {
16
- type: 'default';
17
- ttl?: '1h';
18
- };
19
- };
20
- type LivePromptCacheClientOptions = t.ClientOptions | t.BedrockAnthropicClientOptions | (ChatOpenRouterInput & {
21
- configuration?: ClientOptions;
22
- });
23
- export declare function buildStableInstructions({ nonce, providerLabel, }: {
24
- nonce: string;
25
- providerLabel: string;
26
- }): string;
27
- export declare function buildDynamicInstructions({ marker, tailDescription, }: {
28
- marker: string;
29
- tailDescription: string;
30
- }): string;
31
- export declare function waitForCachePropagation(): Promise<void>;
32
- export declare function assertSystemPayloadShape({ agentId, provider, clientOptions, stableInstructions, dynamicInstructions, expectedContent, }: {
33
- agentId: string;
34
- provider: LivePromptCacheProvider;
35
- clientOptions: LivePromptCacheClientOptions;
36
- stableInstructions: string;
37
- dynamicInstructions: string;
38
- expectedContent: PromptCacheExpectedSystemBlock[];
39
- }): Promise<void>;
40
- export declare function runLiveTurn({ provider, providerLabel, clientOptions, runId, threadId, stableInstructions, dynamicInstructions, }: {
41
- provider: LivePromptCacheProvider;
42
- providerLabel: string;
43
- clientOptions: LivePromptCacheClientOptions;
44
- runId: string;
45
- threadId: string;
46
- stableInstructions: string;
47
- dynamicInstructions: string;
48
- }): Promise<{
49
- text: string;
50
- usage: UsageMetadata;
51
- }>;
52
- export {};
@@ -1,28 +0,0 @@
1
- import type { StructuredToolInterface } from '@langchain/core/tools';
2
- import type { LCToolRegistry } from '../types';
3
- /**
4
- * Mock get_team_members tool - returns list of team members
5
- */
6
- export declare function createGetTeamMembersTool(): StructuredToolInterface;
7
- /**
8
- * Mock get_expenses tool - returns expense records for a user
9
- */
10
- export declare function createGetExpensesTool(): StructuredToolInterface;
11
- /**
12
- * Mock get_weather tool - returns weather data for a city
13
- */
14
- export declare function createGetWeatherTool(): StructuredToolInterface;
15
- /**
16
- * Mock calculator tool - evaluates mathematical expressions
17
- */
18
- export declare function createCalculatorTool(): StructuredToolInterface;
19
- /**
20
- * Creates a tool registry for programmatic tool calling tests.
21
- * Tools are configured with allowed_callers to demonstrate classification.
22
- */
23
- export declare function createProgrammaticToolRegistry(): LCToolRegistry;
24
- /**
25
- * Creates a sample tool registry for tool search tests.
26
- * Includes mix of deferred and non-deferred tools.
27
- */
28
- export declare function createToolSearchToolRegistry(): LCToolRegistry;
@@ -1,40 +0,0 @@
1
- /**
2
- * Provider error signatures captured from live over-limit requests.
3
- *
4
- * Every entry below was produced by `src/scripts/context-overflow-probe.ts`
5
- * sending a prompt past the model's context window and recording what came
6
- * back. Account identifiers and request ids have been replaced with
7
- * placeholders; the wording, status codes, and nesting are verbatim.
8
- *
9
- * Treat these as evidence, not examples: if a provider changes its wording,
10
- * re-run the probe and update the fixture rather than loosening the matcher.
11
- */
12
- import { Providers } from '../../../common';
13
- export interface OverflowSignature {
14
- provider: Providers;
15
- model: string;
16
- /** Class the SDK actually threw, for reference in review. */
17
- thrownAs: string;
18
- /**
19
- * Stand-in for the thrown error carrying exactly the fields the classifier
20
- * reads. Nested bodies are kept as the strings the SDKs attach.
21
- */
22
- error: Record<string, unknown>;
23
- expected: {
24
- kind: 'context_window' | 'request_too_large';
25
- limitTokens?: number;
26
- requestedTokens?: number;
27
- };
28
- /** Set when the signature is only decidable with caller-side corroboration. */
29
- requiresContextPressure?: boolean;
30
- }
31
- export declare const OVERFLOW_SIGNATURES: readonly OverflowSignature[];
32
- /**
33
- * Errors that mention limits, sizes, or tokens but are NOT fixed by
34
- * compaction. The first two were captured live alongside the signatures
35
- * above; the rest are the adjacent failures a loose matcher would swallow.
36
- */
37
- export declare const NON_OVERFLOW_SIGNATURES: readonly {
38
- label: string;
39
- error: Record<string, unknown>;
40
- }[];