@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
@@ -1,6 +1,6 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from '../types';
3
- import { Constants } from '../common';
2
+ import type * as t from '@/types';
3
+ import { Constants } from '@/common';
4
4
  export declare const BashExecutionToolSchema: {
5
5
  readonly type: "object";
6
6
  readonly properties: {
@@ -1,7 +1,7 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
2
  import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout';
3
- import type * as t from '../types';
4
- import { Constants } from '../common';
3
+ import type * as t from '@/types';
4
+ import { Constants } from '@/common';
5
5
  export declare function createBashProgrammaticToolCallingSchema(maxRunTimeoutMs?: number): ProgrammaticToolCallingJsonSchema;
6
6
  export declare const BashProgrammaticToolCallingSchema: ProgrammaticToolCallingJsonSchema;
7
7
  export declare const BashProgrammaticToolCallingName = Constants.BASH_PROGRAMMATIC_TOOL_CALLING;
@@ -1,7 +1,7 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from '../types';
3
- import { Constants } from '../common';
4
- export { appendCodeSessionFileSummary, stripCodeSessionFileSummary, } from '../tools/CodeSessionFileSummary';
2
+ import type * as t from '@/types';
3
+ import { Constants } from '@/common';
4
+ export { appendCodeSessionFileSummary, stripCodeSessionFileSummary, } from '@/tools/CodeSessionFileSummary';
5
5
  export declare const getCodeBaseURL: () => string;
6
6
  export declare const emptyOutputMessage = "stdout: Empty. Ensure you're writing output explicitly.\n";
7
7
  export declare const CODE_ARTIFACT_PATH_GUIDANCE = "Anything a later call needs (data, helper scripts/modules, partial results) MUST be written under `/mnt/data` in the same call that produces it; `/tmp` never survives the call. `/mnt/data` keeps files with recognized extensions, covering common source, text, data, document, image, and archive formats (.py/.sh/.sql/.md/.json/.csv/.parquet/.png/.pdf/.zip and similar); extensionless or unusual extensions are not kept. Failed executions register nothing; fix the error and rerun before relying on new files.";
@@ -1,3 +1,3 @@
1
- import type * as t from '../types';
1
+ import type * as t from '@/types';
2
2
  export declare function stripCodeSessionFileSummary(output: string): string;
3
3
  export declare function appendCodeSessionFileSummary(output: string, files: t.FileRefs | undefined): string;
@@ -1,7 +1,7 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
2
  import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout';
3
- import type * as t from '../types';
4
- import { Constants } from '../common';
3
+ import type * as t from '@/types';
4
+ import { Constants } from '@/common';
5
5
  export declare function createProgrammaticToolCallingSchema(maxRunTimeoutMs?: number): ProgrammaticToolCallingJsonSchema;
6
6
  export declare const ProgrammaticToolCallingSchema: ProgrammaticToolCallingJsonSchema;
7
7
  export declare const ProgrammaticToolCallingName = Constants.PROGRAMMATIC_TOOL_CALLING;
@@ -1,4 +1,4 @@
1
- import { Constants } from '../common';
1
+ import { Constants } from '@/common';
2
2
  export declare const ReadFileToolName = Constants.READ_FILE;
3
3
  export declare const ReadFileToolDescription = "Read the contents of a file. Returns text content with line numbers for easy reference.\n\nFor skill files, use the path format: {skillName}/{filePath} (e.g. \"pdf-analyzer/src/utils.py\", \"code-review/SKILL.md\").\n\nBEHAVIOR:\n- Text files: returned with numbered lines.\n- Images (png, jpeg, gif, webp): returned as visual content the model can see.\n- PDFs: returned as document content.\n- Other binary files: metadata returned with a note to use bash for processing.\n- Large files (>256KB text, >10MB binary): metadata only.\n- SKILL.md: returns the skill's instructions directly.\n\nCONSTRAINTS:\n- Only files from invoked skills or code execution output are accessible.\n- Do not guess file paths. Use paths from the skill documentation or tool output.";
4
4
  export declare const ReadFileToolSchema: {
@@ -1,4 +1,4 @@
1
- import { Constants } from '../common';
1
+ import { Constants } from '@/common';
2
2
  export declare const SkillToolName = Constants.SKILL_TOOL;
3
3
  export declare const SkillToolDescription = "Invoke a skill from the user's library. Skills provide domain-specific instructions loaded into the conversation context, and may also provide files accessible via available tools depending on the runtime environment.\n\nWHEN TO USE:\n- The user's request matches a skill listed in the \"Available Skills\" section of the system prompt.\n- You MUST invoke the matching skill BEFORE attempting the task yourself.\n\nWHAT HAPPENS:\n- The skill's full instructions are loaded into the conversation as context.\n- Files bundled with the skill may become accessible via available tools.\n- Follow the skill's instructions to complete the task.\n\nCONSTRAINTS:\n- Do not invoke a skill that is already active in this conversation.\n- Skill names come from the catalog only. Do not guess names.";
4
4
  /**
@@ -1,6 +1,6 @@
1
- import type { JsonSchemaType, LCTool } from '../types/tools';
2
- import type { SubagentConfig } from '../types';
3
- import { Constants } from '../common';
1
+ import type { JsonSchemaType, LCTool } from '@/types/tools';
2
+ import type { SubagentConfig } from '@/types';
3
+ import { Constants } from '@/common';
4
4
  export declare const SubagentToolName = Constants.SUBAGENT;
5
5
  export declare const SubagentToolDescription = "Delegate a task to a specialized subagent or bounded agent team that runs in an isolated context window. The delegated execution returns only its designated final text result \u2014 all intermediate tool calls, reasoning, and context stay isolated.\n\nWHEN TO USE:\n- The task is self-contained and can be described in a single prompt.\n- You want to offload verbose or exploratory work without bloating your own context.\n- A specialized subagent is available for the task domain.\n\nWHAT HAPPENS:\n- A fresh agent or configured agent graph is created with the task description as its only input.\n- The delegated agent or team runs to completion using isolated tools and context.\n- Only the single agent's final response or the graph's designated result-agent response is returned to you.\n\nCONSTRAINTS:\n- subagent_type must match one of the available types listed below.\n- The subagent cannot see your conversation history.";
6
6
  export declare const SubagentToolSchema: {
@@ -2,11 +2,11 @@ import { ToolCall } from '@langchain/core/messages/tool';
2
2
  import { END, Command, MessagesAnnotation } from '@langchain/langgraph';
3
3
  import type { RunnableConfig } from '@langchain/core/runnables';
4
4
  import type { BaseMessage } from '@langchain/core/messages';
5
- import type { ToolOutputResolveView, ResolvedArgsByCallId } from '../tools/toolOutputReferences';
6
- import type { SubagentToolNodeResumeState } from '../tools/subagent/SubagentReplay';
7
- import type * as t from '../types';
8
- import { ToolOutputReferenceRegistry } from '../tools/toolOutputReferences';
9
- import { RunnableCallable } from '../utils';
5
+ import type { ToolOutputResolveView, ResolvedArgsByCallId } from '@/tools/toolOutputReferences';
6
+ import type { SubagentToolNodeResumeState } from '@/tools/subagent/SubagentReplay';
7
+ import type * as t from '@/types';
8
+ import { ToolOutputReferenceRegistry } from '@/tools/toolOutputReferences';
9
+ import { RunnableCallable } from '@/utils';
10
10
  /**
11
11
  * Per-call batch context for `runTool`. Bundles every optional
12
12
  * batch-scoped value the method needs so the signature stays at
@@ -1,6 +1,6 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from '../types';
3
- import { Constants } from '../common';
2
+ import type * as t from '@/types';
3
+ import { Constants } from '@/common';
4
4
  export declare const ToolSearchToolName = Constants.TOOL_SEARCH;
5
5
  export declare const ToolSearchToolDescription = "Searches deferred tools using BM25 ranking. Multi-word queries supported. Use mcp_server param to filter by server.";
6
6
  export declare const ToolSearchToolSchema: {
@@ -1,4 +1,4 @@
1
- import type * as t from '../../types';
1
+ import type * as t from '@/types';
2
2
  export type CloudflareBridgeRuntimeConfig = {
3
3
  /** Base URL of a Worker using `bridge()` from `@cloudflare/sandbox/bridge`. */
4
4
  baseURL: string;
@@ -1,4 +1,4 @@
1
1
  import type { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from '../../types';
2
+ import type * as t from '@/types';
3
3
  export declare function createCloudflareProgrammaticToolCallingTool(cloudflareConfig: t.CloudflareSandboxExecutionConfig): DynamicStructuredTool;
4
4
  export declare function createCloudflareBashProgrammaticToolCallingTool(cloudflareConfig: t.CloudflareSandboxExecutionConfig): DynamicStructuredTool;
@@ -1,5 +1,5 @@
1
- import type { WorkspaceFS } from '../../tools/local/workspaceFS';
2
- import type * as t from '../../types';
1
+ import type { WorkspaceFS } from '@/tools/local/workspaceFS';
2
+ import type * as t from '@/types';
3
3
  type SpawnResult = {
4
4
  stdout: string;
5
5
  stderr: string;
@@ -1,5 +1,5 @@
1
1
  import type { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from '../../types';
2
+ import type * as t from '@/types';
3
3
  export declare const CLOUDFLARE_CODING_TOOL_NAMES: readonly string[];
4
4
  export declare const CLOUDFLARE_BASH_CODING_TOOL_NAMES: readonly string[];
5
5
  export declare const CloudflareCodeExecutionToolDescription: string;
@@ -1,4 +1,4 @@
1
- import type * as t from '../types';
1
+ import type * as t from '@/types';
2
2
  export declare function coerceRecordArgs(args: unknown): Record<string, unknown> | undefined;
3
3
  export declare function stableStringify(value: unknown): string;
4
4
  export declare function recordArgsEqual(left: Record<string, unknown>, right: Record<string, unknown>): boolean;
@@ -1,7 +1,7 @@
1
1
  import type { ToolCall, ToolCallChunk } from '@langchain/core/messages/tool';
2
- import type { Graph, MultiAgentGraph, StandardGraph } from '../graphs';
3
- import type { AgentContext } from '../agents/AgentContext';
4
- import type * as t from '../types';
2
+ import type { Graph, MultiAgentGraph, StandardGraph } from '@/graphs';
3
+ import type { AgentContext } from '@/agents/AgentContext';
4
+ import type * as t from '@/types';
5
5
  export declare function handleToolCallChunks({ graph, stepKey, toolCallChunks, metadata, }: {
6
6
  graph: StandardGraph | MultiAgentGraph;
7
7
  stepKey: string;
@@ -18,7 +18,7 @@
18
18
  * must call {@link stripIntent} before using their args so no tool receives a
19
19
  * parameter it did not declare.
20
20
  */
21
- import type { JsonSchemaType, OutcomePatch } from '../types';
21
+ import type { JsonSchemaType, OutcomePatch } from '@/types';
22
22
  /** Argument carrying the model-authored label for a tool call. */
23
23
  export declare const INTENT_ARG = "intent";
24
24
  /**
@@ -23,8 +23,8 @@
23
23
  * exit code is reported.
24
24
  */
25
25
  import type { DynamicStructuredTool } from '@langchain/core/tools';
26
- import type * as t from '../../types';
27
- import { Constants } from '../../common';
26
+ import type * as t from '@/types';
27
+ import { Constants } from '@/common';
28
28
  /** Back-compat alias; canonical name lives on `Constants.COMPILE_CHECK`. */
29
29
  export declare const CompileCheckToolName = Constants.COMPILE_CHECK;
30
30
  export declare function createCompileCheckTool(config?: t.LocalExecutionConfig): DynamicStructuredTool;
@@ -1,5 +1,5 @@
1
1
  import type { WorkspaceFS } from './workspaceFS';
2
- import type * as t from '../../types';
2
+ import type * as t from '@/types';
3
3
  /**
4
4
  * Per-Run snapshot store for write_file / edit_file. Captures the
5
5
  * pre-write byte content of every path the local engine is about to
@@ -1,6 +1,6 @@
1
1
  import type { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from '../../types';
3
- import { Constants } from '../../common';
2
+ import type * as t from '@/types';
3
+ import { Constants } from '@/common';
4
4
  /**
5
5
  * Tool name aliases retained for back-compat with consumers that imported
6
6
  * the per-file `Local*ToolName` constants. The canonical names live on
@@ -1,5 +1,5 @@
1
1
  import type { WorkspaceFS } from './workspaceFS';
2
- import type * as t from '../../types';
2
+ import type * as t from '@/types';
3
3
  type SpawnResult = {
4
4
  stdout: string;
5
5
  stderr: string;
@@ -1,5 +1,5 @@
1
1
  import type { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from '../../types';
2
+ import type * as t from '@/types';
3
3
  export declare const LocalCodeExecutionToolDescription: string;
4
4
  export declare const LocalBashExecutionToolDescription: string;
5
5
  export declare function createLocalCodeExecutionTool(config?: t.LocalExecutionConfig): DynamicStructuredTool;
@@ -1,5 +1,5 @@
1
1
  import type { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from '../../types';
2
+ import type * as t from '@/types';
3
3
  /**
4
4
  * Run the host's `PreToolUse` hook chain for a single bridge call.
5
5
  * Returns the (possibly rewritten) input and a `denyReason` if any
@@ -1,4 +1,4 @@
1
- import type * as t from '../../types';
1
+ import type * as t from '@/types';
2
2
  export type BashAstFinding = {
3
3
  code: string;
4
4
  message: string;
@@ -1,4 +1,4 @@
1
- import type * as t from '../../types';
1
+ import type * as t from '@/types';
2
2
  type ResolveLocalToolsResult = {
3
3
  toolMap: t.ToolMap;
4
4
  directToolNames: Set<string>;
@@ -15,7 +15,7 @@
15
15
  * is slow and per-file syntax (without type info) misses most TS
16
16
  * errors anyway. Use the project-level `compile_check` tool for that.
17
17
  */
18
- import type * as t from '../../types';
18
+ import type * as t from '@/types';
19
19
  export type SyntaxCheckOutcome = {
20
20
  ok: true;
21
21
  } | {
@@ -1,4 +1,4 @@
1
- import type { JsonSchemaType } from '../types';
1
+ import type { JsonSchemaType } from '@/types';
2
2
  export declare const DEFAULT_CODE_API_RUN_TIMEOUT_MS = 15000;
3
3
  export declare const MIN_CODE_API_RUN_TIMEOUT_MS = 1000;
4
4
  export declare const MAX_CODE_API_RUN_TIMEOUT_SCHEMA_MS = 300000;
@@ -1,5 +1,5 @@
1
1
  import { type StructuredToolInterface } from '@langchain/core/tools';
2
- import type { LCTool } from '../types';
2
+ import type { LCTool } from '@/types';
3
3
  /**
4
4
  * Creates a schema-only tool for LLM binding in event-driven mode.
5
5
  * These tools have valid schemas for the LLM to understand but should
@@ -1,4 +1,4 @@
1
- import type { AnthropicTextBlockParam, AnthropicWebSearchResultBlockParam } from '../../llm/anthropic/types';
1
+ import type { AnthropicTextBlockParam, AnthropicWebSearchResultBlockParam } from '@/llm/anthropic/types';
2
2
  import type { SearchResultData } from './types';
3
3
  /**
4
4
  * Coerces Anthropic web search results to the SearchResultData format
@@ -1,4 +1,4 @@
1
- import type { SkillCatalogEntry } from '../types';
1
+ import type { SkillCatalogEntry } from '@/types';
2
2
  export type SkillCatalogOptions = {
3
3
  /** Total context window in tokens. Default: 200_000 */
4
4
  contextWindowTokens?: number;
@@ -1,12 +1,12 @@
1
1
  import { BaseMessage } from '@langchain/core/messages';
2
2
  import type { RunnableConfig } from '@langchain/core/runnables';
3
3
  import type { ToolCall } from '@langchain/core/messages/tool';
4
- import type { MultiAgentGraphState, HumanInTheLoopConfig, StandardGraphInput, ExecutableSubagentConfigEntry, SubagentExecutionContext, SubagentUsageSink, TokenCounter } from '../../types';
4
+ import type { MultiAgentGraphState, HumanInTheLoopConfig, StandardGraphInput, ExecutableSubagentConfigEntry, SubagentExecutionContext, SubagentUsageSink, TokenCounter } from '@/types';
5
5
  import type { SubagentResumeManifest, SettledSubagentToolOutput } from './SubagentReplay';
6
- import type { HookRegistry } from '../../hooks';
7
- import type { GraphFactory } from '../../graphs/graphFactory';
8
- import type { StandardGraph } from '../../graphs/Graph';
9
- import type { HandlerRegistry } from '../../events';
6
+ import type { HookRegistry } from '@/hooks';
7
+ import type { GraphFactory } from '@/graphs/graphFactory';
8
+ import type { StandardGraph } from '@/graphs/Graph';
9
+ import type { HandlerRegistry } from '@/events';
10
10
  export { buildChildInputs, isGraphSubagentConfig, normalizeSubagentConfigs, normalizeSubagentConfigEntries, resolveSubagentConfigs, resolveSubagentConfigEntries, } from './childGraphConfig';
11
11
  export declare const DEFAULT_SUBAGENT_DESCRIPTION = "No task description provided";
12
12
  export type SubagentExecuteParams = {
@@ -1,8 +1,8 @@
1
1
  import type { ToolCall, ToolMessage } from '@langchain/core/messages/tool';
2
2
  import type { RunnableConfig } from '@langchain/core/runnables';
3
- import type { ToolOutputReferenceState } from '../../tools/toolOutputReferences';
4
- import type { ToolApprovalReplaySnapshot } from '../../hooks';
5
- import type { ToolSessionContext } from '../../types';
3
+ import type { ToolOutputReferenceState } from '@/tools/toolOutputReferences';
4
+ import type { ToolApprovalReplaySnapshot } from '@/hooks';
5
+ import type { ToolSessionContext } from '@/types';
6
6
  export declare const SUBAGENT_RESUME_MANIFEST_CONFIG_KEY = "__librechat_subagent_resume_manifest";
7
7
  export declare const SUBAGENT_RESUME_ATTEMPT_CONFIG_KEY = "__librechat_subagent_resume_attempt";
8
8
  export declare const SUBAGENT_PARENT_BATCH_CONFIG_KEY = "__librechat_subagent_parent_batch";
@@ -1,5 +1,5 @@
1
- import type { AgentInputs, ExecutableSubagentConfig, ExecutableSubagentConfigEntry, GraphEdge, GraphSubagentConfig, ResolvedSubagentConfig, ResolvedSubagentConfigEntry, SubagentConfig, SubagentConfigEntry } from '../../types';
2
- import type { AgentContext } from '../../agents/AgentContext';
1
+ import type { AgentInputs, ExecutableSubagentConfig, ExecutableSubagentConfigEntry, GraphEdge, GraphSubagentConfig, ResolvedSubagentConfig, ResolvedSubagentConfigEntry, SubagentConfig, SubagentConfigEntry } from '@/types';
2
+ import type { AgentContext } from '@/agents/AgentContext';
3
3
  type ChildGraphPlanBase = {
4
4
  subjectAgentId: string;
5
5
  checkpointNodeId: string;
@@ -1,7 +1,7 @@
1
1
  import type { RunnableConfig } from '@langchain/core/runnables';
2
- import type { AssistantTextPhase } from '../types/assistantPhase';
3
- import type { ClientOptions } from '../types/llm';
4
- import type { Providers } from '../common';
2
+ import type { AssistantTextPhase } from '@/types/assistantPhase';
3
+ import type { ClientOptions } from '@/types/llm';
4
+ import type { Providers } from '@/common';
5
5
  /** One tool call's contribution to the label payload (host-assembled). */
6
6
  export type ActivityLabelToolEntry = {
7
7
  toolName: string;
@@ -4,13 +4,13 @@ import type { START, StateGraph, StateGraphArgs } from '@langchain/langgraph';
4
4
  import type { RunnableConfig, Runnable } from '@langchain/core/runnables';
5
5
  import type { ChatGenerationChunk } from '@langchain/core/outputs';
6
6
  import type { GoogleAIToolType } from '@langchain/google-common';
7
- import type { SummarizationNodeInput, SummarizeCompleteEvent, SummarizationConfig, SummarizeStartEvent, SummarizeDeltaEvent } from '../types/summarize';
8
- import type { RunStep, RunStepDeltaEvent, RunStepClosedEvent, MessageDeltaEvent, ReasoningDeltaEvent } from '../types/stream';
9
- import type { ToolMap, ToolSessionMap, ToolEndEvent, GenericTool, LCTool, ToolExecuteBatchRequest } from '../types/tools';
10
- import type { TokenCounter, StreamLimits, StreamPreemption, TokenBudgetBreakdown } from '../types/run';
11
- import type { Providers, Callback, GraphNodeKeys } from '../common';
12
- import type { StandardGraph, MultiAgentGraph } from '../graphs';
13
- import type { ClientOptions } from '../types/llm';
7
+ import type { SummarizationNodeInput, SummarizeCompleteEvent, SummarizationConfig, SummarizeStartEvent, SummarizeDeltaEvent } from '@/types/summarize';
8
+ import type { RunStep, RunStepDeltaEvent, RunStepClosedEvent, MessageDeltaEvent, ReasoningDeltaEvent } from '@/types/stream';
9
+ import type { ToolMap, ToolSessionMap, ToolEndEvent, GenericTool, LCTool, ToolExecuteBatchRequest } from '@/types/tools';
10
+ import type { TokenCounter, StreamLimits, StreamPreemption, TokenBudgetBreakdown } from '@/types/run';
11
+ import type { Providers, Callback, GraphNodeKeys } from '@/common';
12
+ import type { StandardGraph, MultiAgentGraph } from '@/graphs';
13
+ import type { ClientOptions } from '@/types/llm';
14
14
  /** Interface for bound model with stream and invoke methods */
15
15
  export interface ChatModel {
16
16
  stream?: (messages: BaseMessage[], config?: RunnableConfig) => Promise<AsyncIterable<AIMessageChunk>>;
@@ -12,15 +12,15 @@ import type { AnthropicInput } from '@langchain/anthropic';
12
12
  import type { Runnable } from '@langchain/core/runnables';
13
13
  import type { OpenAI as OpenAIClient } from 'openai';
14
14
  import type { ChatXAIInput } from '@langchain/xai';
15
- import type { ChatOpenRouterCallOptions } from '../llm/openrouter';
16
- import type { PromptCacheTtl } from '../messages/cache';
17
- import { AzureChatOpenAI, ChatDeepSeek, ChatMoonshot, ChatOpenAI, ChatXAI } from '../llm/openai';
18
- import { CustomChatGoogleGenerativeAI } from '../llm/google';
19
- import { CustomChatBedrockConverse } from '../llm/bedrock';
20
- import { CustomAnthropic } from '../llm/anthropic';
21
- import { ChatOpenRouter } from '../llm/openrouter';
22
- import { ChatVertexAI } from '../llm/vertexai';
23
- import { Providers } from '../common';
15
+ import type { ChatOpenRouterCallOptions } from '@/llm/openrouter';
16
+ import type { PromptCacheTtl } from '@/messages/cache';
17
+ import { AzureChatOpenAI, ChatDeepSeek, ChatMoonshot, ChatOpenAI, ChatXAI } from '@/llm/openai';
18
+ import { CustomChatGoogleGenerativeAI } from '@/llm/google';
19
+ import { CustomChatBedrockConverse } from '@/llm/bedrock';
20
+ import { CustomAnthropic } from '@/llm/anthropic';
21
+ import { ChatOpenRouter } from '@/llm/openrouter';
22
+ import { ChatVertexAI } from '@/llm/vertexai';
23
+ import { Providers } from '@/common';
24
24
  export type AzureClientOptions = Partial<OpenAIChatInput> & Partial<AzureOpenAIInput> & {
25
25
  openAIApiKey?: string;
26
26
  openAIApiVersion?: string;
@@ -3,13 +3,13 @@ import type { RunnableConfig } from '@langchain/core/runnables';
3
3
  import type { BaseMessage } from '@langchain/core/messages';
4
4
  import type { StructuredTool } from '@langchain/core/tools';
5
5
  import type * as z from 'zod';
6
- import type { ToolSessionMap, ToolExecutionConfig, ToolOutputReferencesConfig, EagerEventToolExecutionConfig } from '../types/tools';
7
- import type { HumanInTheLoopConfig } from '../types/hitl';
8
- import type { HookRegistry } from '../hooks';
9
- import type * as s from '../types/stream';
10
- import type * as e from '../common/enum';
11
- import type * as g from '../types/graph';
12
- import type * as l from '../types/llm';
6
+ import type { ToolSessionMap, ToolExecutionConfig, ToolOutputReferencesConfig, EagerEventToolExecutionConfig } from '@/types/tools';
7
+ import type { HumanInTheLoopConfig } from '@/types/hitl';
8
+ import type { HookRegistry } from '@/hooks';
9
+ import type * as s from '@/types/stream';
10
+ import type * as e from '@/common/enum';
11
+ import type * as g from '@/types/graph';
12
+ import type * as l from '@/types/llm';
13
13
  export type ZodObjectAny = z.ZodObject<any, any, any, any>;
14
14
  export type BaseGraphConfig = {
15
15
  llmConfig: l.LLMConfig;
@@ -3,11 +3,11 @@ import type { ToolCall, ToolCallChunk } from '@langchain/core/messages/tool';
3
3
  import type { LLMResult, Generation } from '@langchain/core/outputs';
4
4
  import type { Command } from '@langchain/langgraph';
5
5
  import type Anthropic from '@anthropic-ai/sdk';
6
- import type { AnthropicContentBlock } from '../llm/anthropic/types';
7
- import type { AssistantTextPhase } from '../types/assistantPhase';
8
- import type { SummarizeCompleteEvent } from '../types/summarize';
9
- import type { ToolEndEvent } from '../types/tools';
10
- import { StepTypes, ContentTypes, GraphEvents } from '../common/enum';
6
+ import type { AnthropicContentBlock } from '@/llm/anthropic/types';
7
+ import type { AssistantTextPhase } from '@/types/assistantPhase';
8
+ import type { SummarizeCompleteEvent } from '@/types/summarize';
9
+ import type { ToolEndEvent } from '@/types/tools';
10
+ import { StepTypes, ContentTypes, GraphEvents } from '@/common/enum';
11
11
  export type HandleLLMEnd = (output: LLMResult, runId: string, parentRunId?: string, tags?: string[]) => void;
12
12
  export type MetadataAggregatorResult = {
13
13
  handleLLMEnd: HandleLLMEnd;
@@ -1,5 +1,5 @@
1
- import type { SummaryContentBlock } from '../types/stream';
2
- import type { Providers } from '../common';
1
+ import type { SummaryContentBlock } from '@/types/stream';
2
+ import type { Providers } from '@/common';
3
3
  export type SummarizationTrigger = {
4
4
  type: 'token_ratio' | 'remaining_tokens' | 'messages_to_refine' | (string & {});
5
5
  value: number;
@@ -1,12 +1,12 @@
1
1
  import type { StructuredToolInterface } from '@langchain/core/tools';
2
2
  import type { RunnableToolLike } from '@langchain/core/runnables';
3
3
  import type { ToolCall } from '@langchain/core/messages/tool';
4
- import type { ToolOutputReferenceRegistry } from '../tools/toolOutputReferences';
5
- import type { RunBreakerScope } from '../llm/streamLimits';
4
+ import type { ToolOutputReferenceRegistry } from '@/tools/toolOutputReferences';
5
+ import type { RunBreakerScope } from '@/llm/streamLimits';
6
6
  import type { MessageContentComplex, ToolErrorData } from './stream';
7
7
  import type { HumanInTheLoopConfig } from './hitl';
8
8
  import type { LangfuseConfig } from './graph';
9
- import type { HookRegistry } from '../hooks';
9
+ import type { HookRegistry } from '@/hooks';
10
10
  /** Replacement type for `import type { ToolCall } from '@langchain/core/messages/tool'` in order to have stringified args typed */
11
11
  export type CustomToolCall = {
12
12
  name: string;
@@ -756,7 +756,7 @@ export type LocalExecConfig = {
756
756
  * `spawn` — see the type-level note above on why both should be
757
757
  * overridden together for non-host engines.
758
758
  */
759
- fs?: import('../tools/local/workspaceFS').WorkspaceFS;
759
+ fs?: import('@/tools/local/workspaceFS').WorkspaceFS;
760
760
  /**
761
761
  * Set by custom execution backends that already provide their own
762
762
  * sandbox boundary. Suppresses the local host-sandbox warning while
@@ -1078,7 +1078,7 @@ export type ProgrammaticCache = {
1078
1078
  hookContext?: ProgrammaticHookContext;
1079
1079
  };
1080
1080
  export type ProgrammaticHookContext = {
1081
- registry: import('../hooks').HookRegistry | undefined;
1081
+ registry: import('@/hooks').HookRegistry | undefined;
1082
1082
  runId: string;
1083
1083
  threadId?: string;
1084
1084
  agentId?: string;
@@ -1,4 +1,4 @@
1
- import type { Providers } from '../common';
1
+ import type { Providers } from '@/common';
2
2
  /**
3
3
  * Why the request was rejected. Both kinds are fixed by shrinking the
4
4
  * prompt, which is what makes them recoverable; they are distinguished
@@ -1,5 +1,5 @@
1
1
  import type { RunnableConfig } from '@langchain/core/runnables';
2
- import type { AgentLogEvent } from '../types/graph';
2
+ import type { AgentLogEvent } from '@/types/graph';
3
3
  /**
4
4
  * Safely dispatches a custom event and properly awaits it to avoid
5
5
  * race conditions where events are dispatched after run cleanup.
@@ -14,9 +14,9 @@
14
14
  * });
15
15
  * ```
16
16
  */
17
- import type * as t from '../types';
18
- import { createContentAggregator } from '../stream';
19
- import { GraphEvents } from '../common';
17
+ import type * as t from '@/types';
18
+ import { createContentAggregator } from '@/stream';
19
+ import { GraphEvents } from '@/common';
20
20
  interface HandlerCallbacks {
21
21
  onRunStep?: (event: GraphEvents.ON_RUN_STEP, data: t.StreamEventData) => void;
22
22
  onRunStepCompleted?: (event: GraphEvents.ON_RUN_STEP_COMPLETED, data: t.StreamEventData) => void;
@@ -1,4 +1,4 @@
1
- import { Providers } from '../common';
1
+ import { Providers } from '@/common';
2
2
  export declare function isOpenAILike(provider?: string | Providers): boolean;
3
3
  export declare function isGoogleLike(provider?: string | Providers): boolean;
4
4
  /** Returns true for native Anthropic or Bedrock running a Claude model. */
@@ -1,3 +1,3 @@
1
- import type * as t from '../types';
1
+ import type * as t from '@/types';
2
2
  export declare const llmConfigs: Record<string, t.LLMConfig | undefined>;
3
3
  export declare function getLLMConfig(provider: string): t.LLMConfig;
@@ -1,4 +1,4 @@
1
1
  import type { Runnable } from '@langchain/core/runnables';
2
- import type * as t from '../types';
2
+ import type * as t from '@/types';
3
3
  export declare const createTitleRunnable: (model: t.ChatModelInstance, _titlePrompt?: string) => Promise<Runnable>;
4
4
  export declare const createCompletionTitleRunnable: (model: t.ChatModelInstance, titlePrompt?: string) => Promise<Runnable>;