@librechat/agents 4.2.11 → 4.2.13
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 +15 -3
- package/dist/cjs/graphs/Graph.cjs.map +1 -1
- package/dist/cjs/langfuse.cjs +63 -35
- package/dist/cjs/langfuse.cjs.map +1 -1
- package/dist/cjs/langfuseConfig.cjs +6 -0
- package/dist/cjs/langfuseConfig.cjs.map +1 -1
- package/dist/cjs/langfuseToolOutputTracing.cjs +1 -1
- package/dist/cjs/langfuseToolOutputTracing.cjs.map +1 -1
- package/dist/cjs/langfuseTraceShaping.cjs +18 -8
- package/dist/cjs/langfuseTraceShaping.cjs.map +1 -1
- package/dist/cjs/llm/anthropic/index.cjs +4 -3
- package/dist/cjs/llm/anthropic/index.cjs.map +1 -1
- package/dist/cjs/llm/anthropic/utils/container.cjs +37 -0
- package/dist/cjs/llm/anthropic/utils/container.cjs.map +1 -0
- package/dist/cjs/llm/anthropic/utils/message_inputs.cjs +25 -23
- package/dist/cjs/llm/anthropic/utils/message_inputs.cjs.map +1 -1
- package/dist/cjs/llm/anthropic/utils/message_outputs.cjs +15 -21
- package/dist/cjs/llm/anthropic/utils/message_outputs.cjs.map +1 -1
- package/dist/cjs/llm/anthropic/utils/stream_events.cjs +16 -14
- package/dist/cjs/llm/anthropic/utils/stream_events.cjs.map +1 -1
- package/dist/cjs/llm/bedrock/index.cjs +1 -1
- package/dist/cjs/llm/bedrock/index.cjs.map +1 -1
- package/dist/cjs/llm/bedrock/toolCache.cjs +1 -1
- package/dist/cjs/llm/bedrock/utils/message_inputs.cjs +19 -13
- package/dist/cjs/llm/bedrock/utils/message_inputs.cjs.map +1 -1
- package/dist/cjs/llm/google/utils/common.cjs +59 -13
- package/dist/cjs/llm/google/utils/common.cjs.map +1 -1
- package/dist/cjs/llm/init.cjs +12 -2
- package/dist/cjs/llm/init.cjs.map +1 -1
- package/dist/cjs/llm/openai/index.cjs +15 -2
- package/dist/cjs/llm/openai/index.cjs.map +1 -1
- package/dist/cjs/llm/openai/responseToolArguments.cjs +62 -0
- package/dist/cjs/llm/openai/responseToolArguments.cjs.map +1 -0
- package/dist/cjs/llm/openrouter/index.cjs +11 -2
- package/dist/cjs/llm/openrouter/index.cjs.map +1 -1
- package/dist/cjs/llm/openrouter/toolCache.cjs +1 -1
- package/dist/cjs/llm/prepareProviderRequest.cjs +35 -7
- package/dist/cjs/llm/prepareProviderRequest.cjs.map +1 -1
- package/dist/cjs/main.cjs +9 -3
- package/dist/cjs/messages/alternation.cjs +1 -1
- package/dist/cjs/messages/anthropicServerTools.cjs +20 -0
- package/dist/cjs/messages/anthropicServerTools.cjs.map +1 -0
- package/dist/cjs/messages/budget.cjs +1 -1
- package/dist/cjs/messages/cache.cjs +14 -1
- package/dist/cjs/messages/cache.cjs.map +1 -1
- package/dist/cjs/messages/core.cjs +4 -3
- package/dist/cjs/messages/core.cjs.map +1 -1
- package/dist/cjs/messages/format.cjs +3 -3
- package/dist/cjs/messages/index.cjs +1 -1
- package/dist/cjs/messages/prune.cjs +1 -1
- package/dist/cjs/messages/recency.cjs +1 -1
- package/dist/cjs/messages/toolResultTypes.cjs +21 -45
- package/dist/cjs/messages/toolResultTypes.cjs.map +1 -1
- package/dist/cjs/protection/providerText.cjs +4 -0
- package/dist/cjs/protection/providerText.cjs.map +1 -1
- package/dist/cjs/protection/toolResult.cjs +119 -0
- package/dist/cjs/protection/toolResult.cjs.map +1 -0
- package/dist/cjs/run.cjs +31 -13
- package/dist/cjs/run.cjs.map +1 -1
- package/dist/cjs/runtime/admission.cjs +1 -1
- package/dist/cjs/runtime/client.cjs +3 -0
- package/dist/cjs/runtime/client.cjs.map +1 -1
- package/dist/cjs/stream.cjs +2 -1
- package/dist/cjs/stream.cjs.map +1 -1
- package/dist/cjs/summarization/node.cjs +9 -4
- package/dist/cjs/summarization/node.cjs.map +1 -1
- package/dist/cjs/tools/ProgrammaticToolCalling.cjs +1 -1
- package/dist/cjs/tools/ToolNode.cjs +47 -14
- package/dist/cjs/tools/ToolNode.cjs.map +1 -1
- package/dist/cjs/tools/local/CompileCheckTool.cjs +1 -1
- package/dist/cjs/tools/local/LocalCodingTools.cjs +1 -1
- package/dist/cjs/tools/search/content.cjs +163 -42
- package/dist/cjs/tools/search/content.cjs.map +1 -1
- package/dist/cjs/tools/subagent/SubagentExecutor.cjs +8 -0
- package/dist/cjs/tools/subagent/SubagentExecutor.cjs.map +1 -1
- package/dist/cjs/utils/events.cjs +2 -2
- package/dist/cjs/utils/events.cjs.map +1 -1
- package/dist/cjs/utils/tokens.cjs +7 -2
- package/dist/cjs/utils/tokens.cjs.map +1 -1
- package/dist/esm/graphs/Graph.mjs +15 -3
- package/dist/esm/graphs/Graph.mjs.map +1 -1
- package/dist/esm/langfuse.mjs +63 -35
- package/dist/esm/langfuse.mjs.map +1 -1
- package/dist/esm/langfuseConfig.mjs +6 -1
- package/dist/esm/langfuseConfig.mjs.map +1 -1
- package/dist/esm/langfuseToolOutputTracing.mjs +2 -2
- package/dist/esm/langfuseToolOutputTracing.mjs.map +1 -1
- package/dist/esm/langfuseTraceShaping.mjs +18 -9
- package/dist/esm/langfuseTraceShaping.mjs.map +1 -1
- package/dist/esm/llm/anthropic/index.mjs +4 -3
- package/dist/esm/llm/anthropic/index.mjs.map +1 -1
- package/dist/esm/llm/anthropic/utils/container.mjs +37 -0
- package/dist/esm/llm/anthropic/utils/container.mjs.map +1 -0
- package/dist/esm/llm/anthropic/utils/message_inputs.mjs +25 -23
- package/dist/esm/llm/anthropic/utils/message_inputs.mjs.map +1 -1
- package/dist/esm/llm/anthropic/utils/message_outputs.mjs +15 -21
- package/dist/esm/llm/anthropic/utils/message_outputs.mjs.map +1 -1
- package/dist/esm/llm/anthropic/utils/stream_events.mjs +16 -14
- package/dist/esm/llm/anthropic/utils/stream_events.mjs.map +1 -1
- package/dist/esm/llm/bedrock/index.mjs +2 -2
- package/dist/esm/llm/bedrock/index.mjs.map +1 -1
- package/dist/esm/llm/bedrock/toolCache.mjs +1 -1
- package/dist/esm/llm/bedrock/utils/message_inputs.mjs +19 -14
- package/dist/esm/llm/bedrock/utils/message_inputs.mjs.map +1 -1
- package/dist/esm/llm/google/utils/common.mjs +59 -13
- package/dist/esm/llm/google/utils/common.mjs.map +1 -1
- package/dist/esm/llm/init.mjs +12 -2
- package/dist/esm/llm/init.mjs.map +1 -1
- package/dist/esm/llm/openai/index.mjs +16 -3
- package/dist/esm/llm/openai/index.mjs.map +1 -1
- package/dist/esm/llm/openai/responseToolArguments.mjs +62 -0
- package/dist/esm/llm/openai/responseToolArguments.mjs.map +1 -0
- package/dist/esm/llm/openrouter/index.mjs +11 -2
- package/dist/esm/llm/openrouter/index.mjs.map +1 -1
- package/dist/esm/llm/openrouter/toolCache.mjs +1 -1
- package/dist/esm/llm/prepareProviderRequest.mjs +35 -7
- package/dist/esm/llm/prepareProviderRequest.mjs.map +1 -1
- package/dist/esm/main.mjs +5 -4
- package/dist/esm/messages/alternation.mjs +1 -1
- package/dist/esm/messages/anthropicServerTools.mjs +18 -0
- package/dist/esm/messages/anthropicServerTools.mjs.map +1 -0
- package/dist/esm/messages/budget.mjs +1 -1
- package/dist/esm/messages/cache.mjs +12 -2
- package/dist/esm/messages/cache.mjs.map +1 -1
- package/dist/esm/messages/core.mjs +4 -3
- package/dist/esm/messages/core.mjs.map +1 -1
- package/dist/esm/messages/format.mjs +3 -3
- package/dist/esm/messages/index.mjs +1 -1
- package/dist/esm/messages/prune.mjs +1 -1
- package/dist/esm/messages/recency.mjs +1 -1
- package/dist/esm/messages/toolResultTypes.mjs +21 -45
- package/dist/esm/messages/toolResultTypes.mjs.map +1 -1
- package/dist/esm/protection/providerText.mjs +4 -1
- package/dist/esm/protection/providerText.mjs.map +1 -1
- package/dist/esm/protection/toolResult.mjs +114 -0
- package/dist/esm/protection/toolResult.mjs.map +1 -0
- package/dist/esm/run.mjs +32 -14
- package/dist/esm/run.mjs.map +1 -1
- package/dist/esm/runtime/admission.mjs +1 -1
- package/dist/esm/runtime/client.mjs +3 -0
- package/dist/esm/runtime/client.mjs.map +1 -1
- package/dist/esm/stream.mjs +2 -1
- package/dist/esm/stream.mjs.map +1 -1
- package/dist/esm/summarization/node.mjs +9 -4
- package/dist/esm/summarization/node.mjs.map +1 -1
- package/dist/esm/tools/ProgrammaticToolCalling.mjs +1 -1
- package/dist/esm/tools/ToolNode.mjs +47 -14
- package/dist/esm/tools/ToolNode.mjs.map +1 -1
- package/dist/esm/tools/local/CompileCheckTool.mjs +1 -1
- package/dist/esm/tools/local/LocalCodingTools.mjs +1 -1
- package/dist/esm/tools/search/content.mjs +163 -42
- package/dist/esm/tools/search/content.mjs.map +1 -1
- package/dist/esm/tools/subagent/SubagentExecutor.mjs +8 -0
- package/dist/esm/tools/subagent/SubagentExecutor.mjs.map +1 -1
- package/dist/esm/utils/events.mjs +2 -2
- package/dist/esm/utils/events.mjs.map +1 -1
- package/dist/esm/utils/tokens.mjs +7 -2
- package/dist/esm/utils/tokens.mjs.map +1 -1
- package/dist/types/common/index.d.ts +2 -2
- package/dist/types/decisions/breaker.d.ts +2 -2
- package/dist/types/decisions/core.d.ts +13 -13
- package/dist/types/decisions/dialect.d.ts +1 -1
- package/dist/types/decisions/http.d.ts +2 -2
- package/dist/types/decisions/index.d.ts +5 -5
- package/dist/types/decisions/node.d.ts +2 -2
- package/dist/types/decisions/presets.d.ts +2 -2
- package/dist/types/decisions/probe.d.ts +1 -1
- package/dist/types/decisions/questions.d.ts +1 -1
- package/dist/types/decisions/structuredChat.d.ts +2 -2
- package/dist/types/decisions/transport.d.ts +1 -1
- package/dist/types/eventActor/EventActorExecutor.d.ts +1 -1
- package/dist/types/eventActor/index.d.ts +2 -2
- package/dist/types/graphs/Graph.d.ts +6 -2
- package/dist/types/graphs/MultiAgentGraph.d.ts +1 -1
- package/dist/types/graphs/applyGraphRuntimeConfig.d.ts +1 -1
- package/dist/types/graphs/graphFactory.d.ts +1 -1
- package/dist/types/graphs/index.d.ts +5 -5
- package/dist/types/harness/fileBindings.d.ts +2 -2
- package/dist/types/harness/fileService.d.ts +2 -2
- package/dist/types/harness/fileStream.d.ts +1 -1
- package/dist/types/harness/index.d.ts +15 -15
- package/dist/types/harness/model.d.ts +1 -1
- package/dist/types/harness/modelService.d.ts +2 -2
- package/dist/types/harness/modelStreamCallbacks.d.ts +1 -1
- package/dist/types/harness/providerText.d.ts +1 -1
- package/dist/types/hitl/index.d.ts +3 -3
- package/dist/types/hooks/HookRegistry.d.ts +1 -1
- package/dist/types/hooks/createToolPolicyHook.d.ts +1 -1
- package/dist/types/hooks/createWorkspacePolicyHook.d.ts +1 -1
- package/dist/types/hooks/executeHooks.d.ts +2 -2
- package/dist/types/hooks/index.d.ts +11 -11
- package/dist/types/index.d.ts +62 -60
- package/dist/types/langchain/index.d.ts +8 -8
- package/dist/types/langfuse.d.ts +7 -4
- package/dist/types/langfuseConfig.d.ts +5 -0
- package/dist/types/langfuseTraceShaping.d.ts +5 -0
- package/dist/types/llm/anthropic/utils/container.d.ts +4 -0
- package/dist/types/llm/anthropic/utils/message_inputs.d.ts +1 -1
- package/dist/types/llm/anthropic/utils/message_outputs.d.ts +1 -1
- package/dist/types/llm/anthropic/utils/stream_events.d.ts +1 -1
- package/dist/types/llm/bedrock/index.d.ts +2 -3
- package/dist/types/llm/bedrock/utils/harmony.d.ts +1 -1
- package/dist/types/llm/bedrock/utils/index.d.ts +2 -2
- package/dist/types/llm/bedrock/utils/message_inputs.d.ts +3 -12
- package/dist/types/llm/bedrock/utils/message_outputs.d.ts +1 -1
- package/dist/types/llm/google/index.d.ts +2 -2
- package/dist/types/llm/google/utils/common.d.ts +1 -1
- package/dist/types/llm/google/utils/tools.d.ts +1 -1
- package/dist/types/llm/openai/index.d.ts +2 -1
- package/dist/types/llm/openai/responseToolArguments.d.ts +7 -0
- package/dist/types/llm/openrouter/index.d.ts +1 -0
- package/dist/types/llm/prepareProviderRequest.d.ts +4 -1
- package/dist/types/llm/providerRegistry.d.ts +1 -1
- package/dist/types/llm/providers.d.ts +1 -1
- package/dist/types/messages/anthropicServerTools.d.ts +13 -0
- package/dist/types/messages/cache.d.ts +13 -0
- package/dist/types/messages/contextPruning.d.ts +1 -1
- package/dist/types/messages/core.d.ts +4 -4
- package/dist/types/messages/format.d.ts +1 -1
- package/dist/types/messages/index.d.ts +21 -21
- package/dist/types/messages/prune.d.ts +1 -1
- package/dist/types/openai/index.d.ts +2 -2
- package/dist/types/openai/toolProjection.d.ts +1 -1
- package/dist/types/prompts/index.d.ts +2 -2
- package/dist/types/protection/providerText.d.ts +3 -1
- package/dist/types/protection/toolResult.d.ts +69 -0
- package/dist/types/provider-registration.d.ts +1 -1
- package/dist/types/rerank/bm25.d.ts +1 -1
- package/dist/types/rerank/core.d.ts +17 -17
- package/dist/types/rerank/crossEncoder.d.ts +3 -3
- package/dist/types/rerank/fallback.d.ts +1 -1
- package/dist/types/rerank/index.d.ts +2 -2
- package/dist/types/rerank/outcome.d.ts +2 -2
- package/dist/types/rerank/pin.d.ts +2 -2
- package/dist/types/rerank/search.d.ts +1 -1
- package/dist/types/rerank/systemone.d.ts +4 -4
- package/dist/types/rerank/types.d.ts +1 -1
- package/dist/types/run.d.ts +2 -0
- package/dist/types/runtime/admission.d.ts +1 -1
- package/dist/types/runtime/checkpoint.d.ts +1 -1
- package/dist/types/runtime/client.d.ts +2 -2
- package/dist/types/runtime/files.d.ts +4 -4
- package/dist/types/runtime/hostTools.d.ts +2 -2
- package/dist/types/runtime/index.d.ts +12 -12
- package/dist/types/runtime/model.d.ts +5 -5
- package/dist/types/runtime/policy.d.ts +3 -3
- package/dist/types/runtime/recovery/client.d.ts +3 -3
- package/dist/types/runtime/recovery/log.d.ts +2 -2
- package/dist/types/runtime/recovery/redis.d.ts +1 -1
- package/dist/types/runtime/recovery/server.d.ts +3 -3
- package/dist/types/runtime/resume.d.ts +1 -1
- package/dist/types/runtime/server.d.ts +3 -3
- package/dist/types/runtime/snapshot.d.ts +1 -1
- package/dist/types/runtime/types.d.ts +2 -2
- package/dist/types/session/AgentSession.d.ts +2 -2
- package/dist/types/session/JsonlSessionStore.d.ts +1 -1
- package/dist/types/session/deriveMessages.d.ts +1 -1
- package/dist/types/session/handlers.d.ts +1 -1
- package/dist/types/session/index.d.ts +7 -7
- package/dist/types/session/messageSerialization.d.ts +1 -1
- package/dist/types/session/sessionProjection.d.ts +3 -3
- package/dist/types/summarization/index.d.ts +2 -2
- package/dist/types/summarization/node.d.ts +2 -0
- package/dist/types/tools/BashProgrammaticToolCalling.d.ts +1 -1
- package/dist/types/tools/GitHubCompare.d.ts +6 -6
- package/dist/types/tools/ProgrammaticToolCalling.d.ts +1 -1
- package/dist/types/tools/ReadFile.d.ts +6 -6
- package/dist/types/tools/SkillTool.d.ts +6 -6
- package/dist/types/tools/ToolNode.d.ts +5 -1
- package/dist/types/tools/cloudflare/index.d.ts +4 -4
- package/dist/types/tools/local/FileCheckpointer.d.ts +1 -1
- package/dist/types/tools/local/LocalExecutionEngine.d.ts +1 -1
- package/dist/types/tools/local/attachments.d.ts +1 -1
- package/dist/types/tools/local/index.d.ts +12 -12
- package/dist/types/tools/search/anthropic.d.ts +1 -1
- package/dist/types/tools/search/content.d.ts +38 -1
- package/dist/types/tools/search/crw-scraper.d.ts +1 -1
- package/dist/types/tools/search/crw-search.d.ts +1 -1
- package/dist/types/tools/search/firecrawl.d.ts +1 -1
- package/dist/types/tools/search/format.d.ts +1 -1
- package/dist/types/tools/search/highlights.d.ts +1 -1
- package/dist/types/tools/search/index.d.ts +3 -3
- package/dist/types/tools/search/keenable-scraper.d.ts +1 -1
- package/dist/types/tools/search/keenable-search.d.ts +1 -1
- package/dist/types/tools/search/metrics.d.ts +1 -1
- package/dist/types/tools/search/rerankers.d.ts +1 -1
- package/dist/types/tools/search/schema.d.ts +6 -6
- package/dist/types/tools/search/search.d.ts +1 -1
- package/dist/types/tools/search/serper-scraper.d.ts +1 -1
- package/dist/types/tools/search/tavily-scraper.d.ts +1 -1
- package/dist/types/tools/search/tavily-search.d.ts +1 -1
- package/dist/types/tools/search/tool.d.ts +3 -3
- package/dist/types/tools/search/types.d.ts +2 -2
- package/dist/types/tools/search/utils.d.ts +3 -3
- package/dist/types/tools/subagent/SubagentExecutionRegistry.d.ts +1 -1
- package/dist/types/tools/subagent/SubagentExecutor.d.ts +9 -3
- package/dist/types/tools/subagent/diagnostics.d.ts +1 -1
- package/dist/types/tools/subagent/index.d.ts +7 -7
- package/dist/types/types/attachments.d.ts +25 -0
- package/dist/types/types/graph.d.ts +15 -0
- package/dist/types/types/index.d.ts +14 -13
- package/dist/types/types/llm.d.ts +2 -2
- package/dist/types/types/run.d.ts +7 -2
- package/dist/types/types/subagentTasks.d.ts +2 -2
- package/dist/types/types/tools.d.ts +6 -3
- package/dist/types/utils/events.d.ts +2 -1
- package/dist/types/utils/index.d.ts +10 -10
- package/dist/types/utils/tokens.d.ts +1 -0
- package/package.json +14 -12
- package/src/graphs/Graph.ts +32 -1
- package/src/index.ts +8 -0
- package/src/langfuse.ts +129 -41
- package/src/langfuseConfig.ts +14 -0
- package/src/langfuseToolOutputTracing.ts +5 -4
- package/src/langfuseTraceShaping.ts +49 -12
- package/src/llm/anthropic/index.ts +11 -3
- package/src/llm/anthropic/utils/container.ts +63 -0
- package/src/llm/anthropic/utils/message_inputs.ts +57 -51
- package/src/llm/anthropic/utils/message_outputs.ts +12 -39
- package/src/llm/anthropic/utils/stream_events.ts +17 -12
- package/src/llm/bedrock/index.ts +7 -5
- package/src/llm/bedrock/utils/message_inputs.ts +28 -35
- package/src/llm/google/utils/common.ts +88 -36
- package/src/llm/init.ts +35 -3
- package/src/llm/openai/index.ts +17 -2
- package/src/llm/openai/responseToolArguments.ts +104 -0
- package/src/llm/openrouter/index.ts +13 -0
- package/src/llm/prepareProviderRequest.ts +75 -13
- package/src/messages/anthropicServerTools.ts +24 -0
- package/src/messages/cache.ts +25 -5
- package/src/messages/core.ts +12 -11
- package/src/messages/toolResultTypes.ts +80 -88
- package/src/protection/providerText.ts +127 -40
- package/src/protection/toolResult.ts +272 -0
- package/src/run.ts +112 -47
- package/src/runtime/client.ts +7 -0
- package/src/stream.ts +7 -1
- package/src/summarization/node.ts +17 -4
- package/src/tools/ToolNode.ts +114 -18
- package/src/tools/search/content.ts +282 -62
- package/src/tools/subagent/SubagentExecutor.ts +12 -0
- package/src/types/attachments.ts +31 -0
- package/src/types/graph.ts +12 -0
- package/src/types/index.ts +1 -0
- package/src/types/run.ts +8 -1
- package/src/types/tools.ts +3 -0
- package/src/utils/events.ts +9 -2
- package/src/utils/tokens.ts +28 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Graph';
|
|
2
|
-
export * from './MultiAgentGraph';
|
|
3
|
-
export * from './createGraph';
|
|
4
|
-
export type * from './graphFactory';
|
|
5
|
-
export { HandoffLimitError } from './handoff';
|
|
1
|
+
export * from './Graph.js';
|
|
2
|
+
export * from './MultiAgentGraph.js';
|
|
3
|
+
export * from './createGraph.js';
|
|
4
|
+
export type * from './graphFactory.js';
|
|
5
|
+
export { HandoffLimitError } from './handoff.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HostFileDescriptor, HostFileStageRequest, HostFilePublication, HostFileServiceDescriptor, HostFileService } from './files';
|
|
2
|
-
import type { ExecutionIdentity } from './identity';
|
|
1
|
+
import type { HostFileDescriptor, HostFileStageRequest, HostFilePublication, HostFileServiceDescriptor, HostFileService } from './files.js';
|
|
2
|
+
import type { ExecutionIdentity } from './identity.js';
|
|
3
3
|
export interface HostFileBindings {
|
|
4
4
|
read(file: HostFileDescriptor, signal?: AbortSignal): AsyncIterable<Uint8Array>;
|
|
5
5
|
stage(artifact: Omit<HostFileStageRequest, 'version' | 'identity'>, content: AsyncIterable<Uint8Array>, signal?: AbortSignal): Promise<HostFileDescriptor>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HostFileService, HostFileServiceDescriptor } from './files';
|
|
2
|
-
import type { ExecutionIdentity } from './identity';
|
|
1
|
+
import type { HostFileService, HostFileServiceDescriptor } from './files.js';
|
|
2
|
+
import type { ExecutionIdentity } from './identity.js';
|
|
3
3
|
/** Share across bindings in the host's quota scope. Hung storage retains its slot and byte reservation. */
|
|
4
4
|
export declare class HostFileAdmission {
|
|
5
5
|
private operations;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HostFileStageRequest } from './files';
|
|
1
|
+
import type { HostFileStageRequest } from './files.js';
|
|
2
2
|
/** Single-consumer, bounded upload. Cleanup is owned by the operation, not the transport. */
|
|
3
3
|
export declare function createFileUpload(source: AsyncIterable<Uint8Array>, request: Pick<HostFileStageRequest, 'bytes' | 'sha256'>, maxChunkBytes: number, signal?: AbortSignal, hash?: boolean): {
|
|
4
4
|
content: AsyncIterable<Uint8Array>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EventHandler, LCTool, ToolCallRequest, ToolExecuteBatchRequest, ToolExecuteResult } from '../types/index.js';
|
|
2
|
-
import type { ExecutionIdentity } from './identity';
|
|
3
|
-
export { snapshotExecutionIdentity } from './identity';
|
|
4
|
-
export type { ExecutionIdentity } from './identity';
|
|
2
|
+
import type { ExecutionIdentity } from './identity.js';
|
|
3
|
+
export { snapshotExecutionIdentity } from './identity.js';
|
|
4
|
+
export type { ExecutionIdentity } from './identity.js';
|
|
5
5
|
/** A host reference selects an authorized implementation, not a URL or executable name. */
|
|
6
6
|
export interface HostToolDescriptor {
|
|
7
7
|
definition: LCTool;
|
|
@@ -48,16 +48,16 @@ export declare function createHostToolBindings(options: {
|
|
|
48
48
|
tools: readonly HostToolDescriptor[];
|
|
49
49
|
service: HostToolService;
|
|
50
50
|
}): HostToolBindings;
|
|
51
|
-
export { createHostProviderTextService, createHostProviderTextProtection, } from './providerText';
|
|
52
|
-
export type { HostProviderTextDescriptor, HostProviderTextRequest, HostProviderTextService, } from './providerText';
|
|
53
|
-
export { HostChatModel, HostModelServiceError } from './model';
|
|
51
|
+
export { createHostProviderTextService, createHostProviderTextProtection, } from './providerText.js';
|
|
52
|
+
export type { HostProviderTextDescriptor, HostProviderTextRequest, HostProviderTextService, } from './providerText.js';
|
|
53
|
+
export { HostChatModel, HostModelServiceError } from './model.js';
|
|
54
54
|
export type { ModelInvocationContext } from '../llm/invocation.js';
|
|
55
|
-
export type { HostModelDescriptor, HostModelRequest, HostModelService, HostModelToolChoice, HostModelErrorCode, } from './model';
|
|
56
|
-
export { createHostModelService, HostModelAdmission } from './modelService';
|
|
57
|
-
export type { HostModelLimits } from './modelService';
|
|
58
|
-
export { createHostFileService, HostFileAdmission } from './fileService';
|
|
59
|
-
export type { HostFileStore } from './fileService';
|
|
60
|
-
export { createHostFileBindings } from './fileBindings';
|
|
61
|
-
export type { HostFileBindings } from './fileBindings';
|
|
62
|
-
export { HostFileServiceError, hostFileDescriptorSchema, hostFileServiceDescriptorSchema, hostFileReadRequestSchema, hostFileStageRequestSchema, hostFilePublishRequestSchema, } from './files';
|
|
63
|
-
export type { HostFileDescriptor, HostFileServiceDescriptor, HostFileService, HostFileReadRequest, HostFileStageRequest, HostFilePublishRequest, HostFileChunk, HostFilePublication, HostFileErrorCode, } from './files';
|
|
55
|
+
export type { HostModelDescriptor, HostModelRequest, HostModelService, HostModelToolChoice, HostModelErrorCode, } from './model.js';
|
|
56
|
+
export { createHostModelService, HostModelAdmission } from './modelService.js';
|
|
57
|
+
export type { HostModelLimits } from './modelService.js';
|
|
58
|
+
export { createHostFileService, HostFileAdmission } from './fileService.js';
|
|
59
|
+
export type { HostFileStore } from './fileService.js';
|
|
60
|
+
export { createHostFileBindings } from './fileBindings.js';
|
|
61
|
+
export type { HostFileBindings } from './fileBindings.js';
|
|
62
|
+
export { HostFileServiceError, hostFileDescriptorSchema, hostFileServiceDescriptorSchema, hostFileReadRequestSchema, hostFileStageRequestSchema, hostFilePublishRequestSchema, } from './files.js';
|
|
63
|
+
export type { HostFileDescriptor, HostFileServiceDescriptor, HostFileService, HostFileReadRequest, HostFileStageRequest, HostFilePublishRequest, HostFileChunk, HostFilePublication, HostFileErrorCode, } from './files.js';
|
|
@@ -9,7 +9,7 @@ import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager
|
|
|
9
9
|
import type { Runnable } from '@langchain/core/runnables';
|
|
10
10
|
import type { ChatResult } from '@langchain/core/outputs';
|
|
11
11
|
import type { ModelInvocationContext } from '../llm/invocation.js';
|
|
12
|
-
import type { ExecutionIdentity } from './identity';
|
|
12
|
+
import type { ExecutionIdentity } from './identity.js';
|
|
13
13
|
import { PreparedSubagentError } from '../tools/preparedSubagents.js';
|
|
14
14
|
import { StreamLimitExceededError } from '../llm/streamLimits.js';
|
|
15
15
|
type FunctionTool = ReturnType<typeof convertToOpenAITool>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseChatModel } from '@langchain/core/language_models/chat_models';
|
|
2
2
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
3
|
-
import type { HostModelDescriptor, HostModelService } from './model';
|
|
4
|
-
import type { ExecutionIdentity } from './identity';
|
|
3
|
+
import type { HostModelDescriptor, HostModelService } from './model.js';
|
|
4
|
+
import type { ExecutionIdentity } from './identity.js';
|
|
5
5
|
interface ModelLease {
|
|
6
6
|
charge(bytes: number): void;
|
|
7
7
|
retain(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AIMessageChunk } from '@langchain/core/messages';
|
|
2
2
|
import type { UsageMetadata } from '@langchain/core/messages';
|
|
3
3
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
4
|
-
import type { HostModelErrorCode } from './model';
|
|
4
|
+
import type { HostModelErrorCode } from './model.js';
|
|
5
5
|
/** Observes native completion; only synthesizes an end when iterator return bypasses it. */
|
|
6
6
|
export declare function modelStreamCallbacks(model: object, config: RunnableConfig): {
|
|
7
7
|
config: RunnableConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProviderTextAdmission } from '../protection/providerTextAdmission.js';
|
|
2
2
|
import type { ProviderTextProtection } from '../protection/providerText.js';
|
|
3
|
-
import type { ExecutionIdentity } from './identity';
|
|
3
|
+
import type { ExecutionIdentity } from './identity.js';
|
|
4
4
|
/** Host-owned limits, negotiated before executing a graph. Contains no credentials or callbacks. */
|
|
5
5
|
export type HostProviderTextDescriptor = Pick<ProviderTextProtection, 'version' | 'timeoutMs' | 'maxAttemptBytes' | 'maxBufferedBytes'>;
|
|
6
6
|
export interface HostProviderTextRequest {
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* and re-export from the top-level types barrel; runtime helpers (like
|
|
4
4
|
* `askUserQuestion()`) live here.
|
|
5
5
|
*/
|
|
6
|
-
export { askUserQuestion } from './askUserQuestion';
|
|
7
|
-
export { askUserQuestions } from './askUserQuestions';
|
|
8
|
-
export { ASK_USER_QUESTION_ID_PATTERN, isAskUserQuestionsInterrupt, MAX_ASK_USER_QUESTIONS, } from './askUserQuestionsInterrupt';
|
|
6
|
+
export { askUserQuestion } from './askUserQuestion.js';
|
|
7
|
+
export { askUserQuestions } from './askUserQuestions.js';
|
|
8
|
+
export { ASK_USER_QUESTION_ID_PATTERN, isAskUserQuestionsInterrupt, MAX_ASK_USER_QUESTIONS, } from './askUserQuestionsInterrupt.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HookEvent, HookMatcher, ToolApprovalReplayKey, ToolApprovalReplaySnapshot, AggregatedHookResult } from './types';
|
|
1
|
+
import type { HookEvent, HookMatcher, ToolApprovalReplayKey, ToolApprovalReplaySnapshot, AggregatedHookResult } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Snapshot of a halt request raised by a hook returning
|
|
4
4
|
* `preventContinuation: true`. The SDK's run loop polls for this between
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the cross-walk and `docs/hooks-design-report.md` for the broader hook
|
|
10
10
|
* system context.
|
|
11
11
|
*/
|
|
12
|
-
import type { HookCallback } from './types';
|
|
12
|
+
import type { HookCallback } from './types.js';
|
|
13
13
|
/**
|
|
14
14
|
* Permission mode controlling how tool calls that match no rule are
|
|
15
15
|
* resolved. Mirrors Claude Code's `permissionMode`.
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* },
|
|
47
47
|
* // …with the hook installed and humanInTheLoop.enabled = true.
|
|
48
48
|
*/
|
|
49
|
-
import type { HookCallback } from './types';
|
|
49
|
+
import type { HookCallback } from './types.js';
|
|
50
50
|
/**
|
|
51
51
|
* What to do when a tool call references a path outside the workspace.
|
|
52
52
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Logger } from 'winston';
|
|
2
|
-
import type { HookInput, ToolApprovalReplayKey, AggregatedHookResult } from './types';
|
|
3
|
-
import type { HookRegistry } from './HookRegistry';
|
|
2
|
+
import type { HookInput, ToolApprovalReplayKey, AggregatedHookResult } from './types.js';
|
|
3
|
+
import type { HookRegistry } from './HookRegistry.js';
|
|
4
4
|
/** Default per-hook timeout when a matcher doesn't set its own. */
|
|
5
5
|
export declare const DEFAULT_HOOK_TIMEOUT_MS = 30000;
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { HookRegistry } from './HookRegistry';
|
|
2
|
-
export type { HookHaltSignal } from './HookRegistry';
|
|
3
|
-
export { executeHooks, mergeAggregatedHookResults, DEFAULT_HOOK_TIMEOUT_MS, } from './executeHooks';
|
|
1
|
+
export { HookRegistry } from './HookRegistry.js';
|
|
2
|
+
export type { HookHaltSignal } from './HookRegistry.js';
|
|
3
|
+
export { executeHooks, mergeAggregatedHookResults, DEFAULT_HOOK_TIMEOUT_MS, } from './executeHooks.js';
|
|
4
4
|
/**
|
|
5
5
|
* Feature probe for hosts: hook outputs support `injectedMessages`
|
|
6
6
|
* (per-message graph-state injection at the `PostToolBatch` boundary).
|
|
@@ -39,13 +39,13 @@ export declare const HOOK_STOP_CONTINUATION_CAPABLE = true;
|
|
|
39
39
|
* exactly the window users reach for it most.
|
|
40
40
|
*/
|
|
41
41
|
export declare const HOOK_PREEMPT_RESTART_CAPABLE = true;
|
|
42
|
-
export { matchesQuery, hasNestedQuantifier, MAX_PATTERN_LENGTH, MAX_CACHE_SIZE, } from './matchers';
|
|
43
|
-
export { createToolPolicyHook } from './createToolPolicyHook';
|
|
44
|
-
export type { ToolPolicyMode, ToolPolicyConfig } from './createToolPolicyHook';
|
|
45
|
-
export { createWorkspacePolicyHook } from './createWorkspacePolicyHook';
|
|
46
|
-
export type { OutsideAccessPolicy, WorkspacePolicyConfig, PathExtractor, } from './createWorkspacePolicyHook';
|
|
47
|
-
export { HOOK_EVENTS, TOOL_APPROVAL_EXECUTION_SCOPE_CONFIG_KEY } from './types';
|
|
48
|
-
export type { HookEvent, HookInput, HookOutput, HookCallback, HookMatcher, HooksByEvent, HookInputByEvent, HookOutputByEvent, BaseHookInput, BaseHookOutput, ToolDecision, StopDecision, ToolApprovalReplayKey, ToolApprovalReplaySnapshot, AggregatedHookResult, RunStartHookInput, UserPromptSubmitHookInput, PreToolUseHookInput, PostToolUseHookInput, PostToolUseFailureHookInput, PostToolBatchHookInput, PostToolBatchEntry, PreemptBoundaryHookInput, PermissionDeniedHookInput, SubagentStartHookInput, SubagentStopHookInput, StopHookInput, StopFinalizeHookInput, StopFailureHookInput, PreCompactHookInput, PostCompactHookInput, RunStartHookOutput, UserPromptSubmitHookOutput, PreToolUseHookOutput, PostToolUseHookOutput, PostToolUseFailureHookOutput, PostToolBatchHookOutput, PreemptBoundaryHookOutput, PermissionDeniedHookOutput, SubagentStartHookOutput, SubagentStopHookOutput, StopHookOutput, StopFinalizeHookOutput, StopFailureHookOutput, PreCompactHookOutput, PostCompactHookOutput, } from './types';
|
|
49
|
-
export type { ExecuteHooksOptions } from './executeHooks';
|
|
42
|
+
export { matchesQuery, hasNestedQuantifier, MAX_PATTERN_LENGTH, MAX_CACHE_SIZE, } from './matchers.js';
|
|
43
|
+
export { createToolPolicyHook } from './createToolPolicyHook.js';
|
|
44
|
+
export type { ToolPolicyMode, ToolPolicyConfig } from './createToolPolicyHook.js';
|
|
45
|
+
export { createWorkspacePolicyHook } from './createWorkspacePolicyHook.js';
|
|
46
|
+
export type { OutsideAccessPolicy, WorkspacePolicyConfig, PathExtractor, } from './createWorkspacePolicyHook.js';
|
|
47
|
+
export { HOOK_EVENTS, TOOL_APPROVAL_EXECUTION_SCOPE_CONFIG_KEY } from './types.js';
|
|
48
|
+
export type { HookEvent, HookInput, HookOutput, HookCallback, HookMatcher, HooksByEvent, HookInputByEvent, HookOutputByEvent, BaseHookInput, BaseHookOutput, ToolDecision, StopDecision, ToolApprovalReplayKey, ToolApprovalReplaySnapshot, AggregatedHookResult, RunStartHookInput, UserPromptSubmitHookInput, PreToolUseHookInput, PostToolUseHookInput, PostToolUseFailureHookInput, PostToolBatchHookInput, PostToolBatchEntry, PreemptBoundaryHookInput, PermissionDeniedHookInput, SubagentStartHookInput, SubagentStopHookInput, StopHookInput, StopFinalizeHookInput, StopFailureHookInput, PreCompactHookInput, PostCompactHookInput, RunStartHookOutput, UserPromptSubmitHookOutput, PreToolUseHookOutput, PostToolUseHookOutput, PostToolUseFailureHookOutput, PostToolBatchHookOutput, PreemptBoundaryHookOutput, PermissionDeniedHookOutput, SubagentStartHookOutput, SubagentStopHookOutput, StopHookOutput, StopFinalizeHookOutput, StopFailureHookOutput, PreCompactHookOutput, PostCompactHookOutput, } from './types.js';
|
|
49
|
+
export type { ExecuteHooksOptions } from './executeHooks.js';
|
|
50
50
|
/** Hosts may opt into stable generation scopes across every ToolNode interrupt type. */
|
|
51
51
|
export declare const TOOL_APPROVAL_EXECUTION_SCOPE_CAPABLE = true;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
export * from './run';
|
|
2
|
-
export * from './stream';
|
|
3
|
-
export * from './events';
|
|
4
|
-
export * from './messages';
|
|
5
|
-
export { LANGFUSE_OBSERVATION_METADATA_ARTIFACT_KEY } from './langfuseToolOutputTracing';
|
|
6
|
-
export * from './graphs';
|
|
7
|
-
export * from './agents/projection';
|
|
8
|
-
export * from './summarization';
|
|
9
|
-
export * from './tools/Calculator';
|
|
10
|
-
export * from './tools/GitHubCompare';
|
|
11
|
-
export * from './tools/CodeExecutor';
|
|
12
|
-
export * from './tools/BashExecutor';
|
|
13
|
-
export * from './tools/ProgrammaticToolCalling';
|
|
14
|
-
export * from './tools/BashProgrammaticToolCalling';
|
|
15
|
-
export * from './tools/SkillTool';
|
|
16
|
-
export * from './tools/SubagentTool';
|
|
17
|
-
export * from './tools/subagent';
|
|
18
|
-
export * from './tools/ReadFile';
|
|
19
|
-
export * from './tools/skillCatalog';
|
|
20
|
-
export * from './tools/ToolSearch';
|
|
21
|
-
export * from './tools/ToolNode';
|
|
22
|
-
export * from './tools/intentArg';
|
|
23
|
-
export * from './tools/schema';
|
|
24
|
-
export * from './tools/handlers';
|
|
25
|
-
export * from './tools/local';
|
|
26
|
-
export * from './tools/cloudflare';
|
|
27
|
-
export * from './tools/search';
|
|
28
|
-
export * from './common';
|
|
29
|
-
export * from './utils';
|
|
30
|
-
export * from './hooks';
|
|
31
|
-
export * from './session';
|
|
32
|
-
export * from './eventActor';
|
|
33
|
-
export * from './hitl';
|
|
34
|
-
export type * from './types';
|
|
35
|
-
export * from './langchain';
|
|
1
|
+
export * from './run.js';
|
|
2
|
+
export * from './stream.js';
|
|
3
|
+
export * from './events.js';
|
|
4
|
+
export * from './messages/index.js';
|
|
5
|
+
export { LANGFUSE_OBSERVATION_METADATA_ARTIFACT_KEY } from './langfuseToolOutputTracing.js';
|
|
6
|
+
export * from './graphs/index.js';
|
|
7
|
+
export * from './agents/projection.js';
|
|
8
|
+
export * from './summarization/index.js';
|
|
9
|
+
export * from './tools/Calculator.js';
|
|
10
|
+
export * from './tools/GitHubCompare.js';
|
|
11
|
+
export * from './tools/CodeExecutor.js';
|
|
12
|
+
export * from './tools/BashExecutor.js';
|
|
13
|
+
export * from './tools/ProgrammaticToolCalling.js';
|
|
14
|
+
export * from './tools/BashProgrammaticToolCalling.js';
|
|
15
|
+
export * from './tools/SkillTool.js';
|
|
16
|
+
export * from './tools/SubagentTool.js';
|
|
17
|
+
export * from './tools/subagent/index.js';
|
|
18
|
+
export * from './tools/ReadFile.js';
|
|
19
|
+
export * from './tools/skillCatalog.js';
|
|
20
|
+
export * from './tools/ToolSearch.js';
|
|
21
|
+
export * from './tools/ToolNode.js';
|
|
22
|
+
export * from './tools/intentArg.js';
|
|
23
|
+
export * from './tools/schema.js';
|
|
24
|
+
export * from './tools/handlers.js';
|
|
25
|
+
export * from './tools/local/index.js';
|
|
26
|
+
export * from './tools/cloudflare/index.js';
|
|
27
|
+
export * from './tools/search/index.js';
|
|
28
|
+
export * from './common/index.js';
|
|
29
|
+
export * from './utils/index.js';
|
|
30
|
+
export * from './hooks/index.js';
|
|
31
|
+
export * from './session/index.js';
|
|
32
|
+
export * from './eventActor/index.js';
|
|
33
|
+
export * from './hitl/index.js';
|
|
34
|
+
export type * from './types/index.js';
|
|
35
|
+
export * from './langchain/index.js';
|
|
36
36
|
/**
|
|
37
37
|
* HITL primitives re-exported from `@langchain/langgraph` so hosts that
|
|
38
38
|
* build durable checkpoint savers, dispatch `Command({ resume })`, or
|
|
@@ -41,31 +41,33 @@ export * from './langchain';
|
|
|
41
41
|
*/
|
|
42
42
|
export { Command, INTERRUPT, interrupt, MemorySaver, BaseCheckpointSaver, isInterrupted, } from '@langchain/langgraph';
|
|
43
43
|
export type { Interrupt } from '@langchain/langgraph';
|
|
44
|
-
export { markTokenCounterCacheCompatible } from './llm/tokenCounterCacheCompatibility';
|
|
44
|
+
export { markTokenCounterCacheCompatible } from './llm/tokenCounterCacheCompatibility.js';
|
|
45
45
|
/** Provider chat-model classes moved off the root barrel: importing any of them here
|
|
46
46
|
* forced every host to pay that provider SDK's module init at boot. They remain
|
|
47
47
|
* available from their own entries, e.g. `@librechat/agents/llm/openai`. */
|
|
48
|
-
export type { OpenRouterReasoning, OpenRouterReasoningEffort, ChatOpenRouterCallOptions, } from './llm/openrouter';
|
|
49
|
-
export { getChatModelClass } from './llm/providers';
|
|
50
|
-
export { registerProvider } from './provider-registration';
|
|
51
|
-
export type { ProviderFamily, ProviderRegistrationOptions, } from './provider-registration';
|
|
52
|
-
export { smoothStream, resolveStreamDelay, DEFAULT_STREAM_DELAY, computeAdaptivePieceSize, } from './llm/stream/smoother';
|
|
53
|
-
export type { SmoothItem, SmoothPiece } from './llm/stream/smoother';
|
|
54
|
-
export { FakeChatModel, createFakeStreamingLLM } from './llm/fake';
|
|
55
|
-
export { initializeModel } from './llm/init';
|
|
56
|
-
export { attemptInvoke, tryFallbackProviders } from './llm/invoke';
|
|
57
|
-
export { prepareProviderRequest } from './llm/prepareProviderRequest';
|
|
58
|
-
export type { PreparedProviderRequest, PrepareProviderRequestParams, ProviderMessageProjectionMode, ProviderPayloadMeasurement, ProviderRequestContext, } from './llm/prepareProviderRequest';
|
|
59
|
-
export { canSealPreempt } from './llm/preempt';
|
|
60
|
-
export { isThinkingEnabled, getMaxOutputTokensKey } from './llm/request';
|
|
61
|
-
export { DEFAULT_MAX_TOOL_CALL_ARG_BYTES, StreamLimitExceededError, resolveStreamLimits, } from './llm/streamLimits';
|
|
62
|
-
export type { StreamedToolCallArgTally, ResolvedStreamLimits, StreamLimitState, StreamLimitKind, } from './llm/streamLimits';
|
|
63
|
-
export * from './decisions';
|
|
64
|
-
export * from './rerank';
|
|
65
|
-
export { PROVIDER_TEXT_PROTECTION_VERSION, ProviderTextProtectionError, serializeProviderTextProtectionError, deserializeProviderTextProtectionError, } from './protection/providerText';
|
|
66
|
-
export type { ProviderTextProtection, ProviderTextProtectionResult, ProviderTextProtectionErrorCode, ProviderTextProtectionFailure, } from './protection/providerText';
|
|
67
|
-
export {
|
|
68
|
-
export type {
|
|
69
|
-
export
|
|
70
|
-
export {
|
|
71
|
-
export
|
|
48
|
+
export type { OpenRouterReasoning, OpenRouterReasoningEffort, ChatOpenRouterCallOptions, } from './llm/openrouter/index.js';
|
|
49
|
+
export { getChatModelClass } from './llm/providers.js';
|
|
50
|
+
export { registerProvider } from './provider-registration.js';
|
|
51
|
+
export type { ProviderFamily, ProviderRegistrationOptions, } from './provider-registration.js';
|
|
52
|
+
export { smoothStream, resolveStreamDelay, DEFAULT_STREAM_DELAY, computeAdaptivePieceSize, } from './llm/stream/smoother.js';
|
|
53
|
+
export type { SmoothItem, SmoothPiece } from './llm/stream/smoother.js';
|
|
54
|
+
export { FakeChatModel, createFakeStreamingLLM } from './llm/fake.js';
|
|
55
|
+
export { initializeModel } from './llm/init.js';
|
|
56
|
+
export { attemptInvoke, tryFallbackProviders } from './llm/invoke.js';
|
|
57
|
+
export { prepareProviderRequest } from './llm/prepareProviderRequest.js';
|
|
58
|
+
export type { PreparedProviderRequest, PrepareProviderRequestParams, ProviderMessageProjectionMode, ProviderPayloadMeasurement, ProviderRequestContext, } from './llm/prepareProviderRequest.js';
|
|
59
|
+
export { canSealPreempt } from './llm/preempt.js';
|
|
60
|
+
export { isThinkingEnabled, getMaxOutputTokensKey } from './llm/request.js';
|
|
61
|
+
export { DEFAULT_MAX_TOOL_CALL_ARG_BYTES, StreamLimitExceededError, resolveStreamLimits, } from './llm/streamLimits.js';
|
|
62
|
+
export type { StreamedToolCallArgTally, ResolvedStreamLimits, StreamLimitState, StreamLimitKind, } from './llm/streamLimits.js';
|
|
63
|
+
export * from './decisions/index.js';
|
|
64
|
+
export * from './rerank/index.js';
|
|
65
|
+
export { PROVIDER_TEXT_PROTECTION_VERSION, ProviderTextProtectionError, serializeProviderTextProtectionError, deserializeProviderTextProtectionError, } from './protection/providerText.js';
|
|
66
|
+
export type { ProviderTextProtection, ProviderTextProtectionResult, ProviderTextProtectionErrorCode, ProviderTextProtectionFailure, } from './protection/providerText.js';
|
|
67
|
+
export { TOOL_RESULT_PROTECTION_VERSION, ToolResultProtectionError, } from './protection/toolResult.js';
|
|
68
|
+
export type { ToolResultProtection, ToolResultProtectionResult, } from './protection/toolResult.js';
|
|
69
|
+
export { GEMINI_PARTS, GEMINI_REPLAY_UNSUPPORTED, captureGeminiReplayParts, restoreGeminiReplayParts, isGeminiReplayParts, } from './llm/google/utils/signatures.js';
|
|
70
|
+
export type { GeminiReplayPart } from './llm/google/utils/signatures.js';
|
|
71
|
+
export * from './harness/index.js';
|
|
72
|
+
export { ProviderTextAdmission } from './protection/providerTextAdmission.js';
|
|
73
|
+
export type { ProviderTextAdmissionLimits, ProviderTextAdmissionSnapshot, } from './protection/providerTextAdmission.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './messages';
|
|
2
|
-
export * from './prompts';
|
|
3
|
-
export * from './runnables';
|
|
4
|
-
export * from './tools';
|
|
5
|
-
export * from './google-common';
|
|
6
|
-
export * from './language_models/chat_models';
|
|
7
|
-
export * from './messages/tool';
|
|
8
|
-
export * from './openai';
|
|
1
|
+
export * from './messages.js';
|
|
2
|
+
export * from './prompts.js';
|
|
3
|
+
export * from './runnables.js';
|
|
4
|
+
export * from './tools.js';
|
|
5
|
+
export * from './google-common.js';
|
|
6
|
+
export * from './language_models/chat_models.js';
|
|
7
|
+
export * from './messages/tool.js';
|
|
8
|
+
export * from './openai.js';
|
package/dist/types/langfuse.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CallbackHandler } from '@langfuse/langchain';
|
|
2
2
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
3
3
|
import type { SpanContext } from '@opentelemetry/api';
|
|
4
|
+
import type { ToolCall } from '@langchain/core/messages/tool';
|
|
4
5
|
import type { ResolvedLangfuseToolOutputTracingConfig } from './langfuseRuntimeContext.js';
|
|
5
6
|
import type * as t from './types/index.js';
|
|
6
7
|
import { hasLangfuseConfigCredentials, hasLangfuseEnvCredentials, hasLangfuseEnvConfig } from './langfuseConfig.js';
|
|
@@ -92,8 +93,10 @@ export declare function hasExplicitLangfuseConfig(contexts: Iterable<{
|
|
|
92
93
|
langfuse?: t.LangfuseConfig;
|
|
93
94
|
}>): boolean;
|
|
94
95
|
export declare function isLangfuseCallbackHandler(value: unknown): boolean;
|
|
95
|
-
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
|
|
96
|
+
/** Records host results using model-authored arguments, never substituted
|
|
97
|
+
* tool outputs, and reserved metadata.
|
|
98
|
+
* Host results have passed host output filters, so rows, errors, and
|
|
99
|
+
* attachments are not recorded. These completion observations do not measure
|
|
100
|
+
* tool latency; execution timing belongs in the metadata. */
|
|
101
|
+
export declare function traceHostToolResults(request: t.ToolExecuteBatchRequest, results: t.ToolExecuteResult[], config?: RunnableConfig, originalToolCalls?: readonly ToolCall[]): Promise<void>;
|
|
99
102
|
export declare function disposeLangfuseHandler(value: unknown): Promise<void>;
|
|
@@ -11,3 +11,8 @@ export declare function hasLangfuseEnvConfig(): boolean;
|
|
|
11
11
|
export declare function hasToolOutputTracingConfig(runLangfuse?: t.LangfuseConfig, agentLangfuse?: t.LangfuseConfig): boolean;
|
|
12
12
|
export declare function resolveToolOutputTracingConfig(runLangfuse?: t.LangfuseConfig, agentLangfuse?: t.LangfuseConfig): ResolvedLangfuseToolOutputTracingConfig;
|
|
13
13
|
export declare function resolveLangfuseConfig(runLangfuse?: t.LangfuseConfig, agentLangfuse?: t.LangfuseConfig): t.LangfuseConfig | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Removes the agent's skills from the config of a run the agent does not
|
|
16
|
+
* drive, such as the title or a label. Those runs cannot load the skills.
|
|
17
|
+
*/
|
|
18
|
+
export declare function withoutSkillsAvailable(langfuse?: t.LangfuseConfig): t.LangfuseConfig | undefined;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an observation metadata value. `@langfuse/tracing` stores each
|
|
4
|
+
* metadata value on the span as JSON, strings included.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getObservationMetadataAttribute(attributes: Record<string, unknown>, key: string): unknown;
|
|
2
7
|
/**
|
|
3
8
|
* LangGraph plumbing observations that add noise without information:
|
|
4
9
|
* the duplicated `__start__` channel-seed nodes and anonymous
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToolCall } from '@langchain/core/messages/tool';
|
|
2
2
|
import { type BaseMessage } from '@langchain/core/messages';
|
|
3
|
-
import { AnthropicMessageCreateParams, AnthropicToolResponse } from '../types';
|
|
3
|
+
import { AnthropicMessageCreateParams, AnthropicToolResponse } from '../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Normalize a tool-call ID to satisfy Anthropic's `^[a-zA-Z0-9_-]+$` and 64-char
|
|
6
6
|
* constraints. Pure and deterministic — same input always yields the same output,
|
|
@@ -3,7 +3,7 @@ import { AIMessageChunk } from '@langchain/core/messages';
|
|
|
3
3
|
import type { UsageMetadata } from '@langchain/core/messages';
|
|
4
4
|
import type { ChatGeneration } from '@langchain/core/outputs';
|
|
5
5
|
import type Anthropic from '@anthropic-ai/sdk';
|
|
6
|
-
import type { AnthropicMessageResponse } from '../types';
|
|
6
|
+
import type { AnthropicMessageResponse } from '../types.js';
|
|
7
7
|
export interface AnthropicUsageData {
|
|
8
8
|
input_tokens?: number | null;
|
|
9
9
|
output_tokens?: number | null;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import type { ChatModelStreamEvent } from '@langchain/core/language_models/event';
|
|
7
|
-
import type { AnthropicMessageStreamEvent } from '../types';
|
|
7
|
+
import type { AnthropicMessageStreamEvent } from '../types.js';
|
|
8
8
|
interface AnthropicStreamErrorEvent {
|
|
9
9
|
type: 'error';
|
|
10
10
|
error: {
|
|
@@ -146,9 +146,8 @@ export declare class CustomChatBedrockConverse extends ChatBedrockConverse {
|
|
|
146
146
|
_generateNonStreaming(messages: BaseMessage[], options: this['ParsedCallOptions'] & CustomChatBedrockConverseCallOptions, runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;
|
|
147
147
|
/**
|
|
148
148
|
* Non-streaming Converse through this package's converter, as the stream already uses.
|
|
149
|
-
* The parent's converter
|
|
150
|
-
*
|
|
151
|
-
* assistant prefill that Claude 4.6 and later reject.
|
|
149
|
+
* The parent's converter cannot omit unsupported reasoning replay, neutralize
|
|
150
|
+
* OpenAI Harmony tokens, or strip unsupported Claude assistant prefill.
|
|
152
151
|
*/
|
|
153
152
|
private generateWithLocalConverter;
|
|
154
153
|
/**
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* tolerated inside the match and kept.
|
|
16
16
|
*/
|
|
17
17
|
import type { ConverseStreamCommandInput } from '@aws-sdk/client-bedrock-runtime';
|
|
18
|
-
import type { BedrockMessage, BedrockSystemContentBlock } from '../types';
|
|
18
|
+
import type { BedrockMessage, BedrockSystemContentBlock } from '../types.js';
|
|
19
19
|
/** The text with every harmony control token rendered inert; the same string when none. */
|
|
20
20
|
export declare function neutralizeHarmonyControlTokens(text: string): string;
|
|
21
21
|
type ToolConfiguration = NonNullable<ConverseStreamCommandInput['toolConfig']>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bedrock Converse utility exports.
|
|
3
3
|
*/
|
|
4
|
-
export { convertToConverseMessages, extractImageInfo, langchainReasoningBlockToBedrockReasoningBlock, concatenateLangchainReasoningBlocks, } from './message_inputs';
|
|
5
|
-
export { convertConverseMessageToLangChainMessage, createConverseToolUseStopChunk, handleConverseStreamContentBlockStart, handleConverseStreamContentBlockDelta, handleConverseStreamMetadata, bedrockReasoningBlockToLangchainReasoningBlock, bedrockReasoningDeltaToLangchainPartialReasoningBlock, } from './message_outputs';
|
|
4
|
+
export { convertToConverseMessages, extractImageInfo, langchainReasoningBlockToBedrockReasoningBlock, concatenateLangchainReasoningBlocks, } from './message_inputs.js';
|
|
5
|
+
export { convertConverseMessageToLangChainMessage, createConverseToolUseStopChunk, handleConverseStreamContentBlockStart, handleConverseStreamContentBlockDelta, handleConverseStreamMetadata, bedrockReasoningBlockToLangchainReasoningBlock, bedrockReasoningDeltaToLangchainPartialReasoningBlock, } from './message_outputs.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Ported from @langchain/aws common.js
|
|
4
4
|
*/
|
|
5
5
|
import { type BaseMessage, MessageContentComplex } from '@langchain/core/messages';
|
|
6
|
-
import type { BedrockMessage, BedrockSystemContentBlock, BedrockContentBlock, MessageContentReasoningBlock } from '../types';
|
|
6
|
+
import type { BedrockMessage, BedrockSystemContentBlock, BedrockContentBlock, MessageContentReasoningBlock } from '../types.js';
|
|
7
7
|
/**
|
|
8
8
|
* Convert a LangChain reasoning block to a Bedrock reasoning block.
|
|
9
9
|
*/
|
|
@@ -30,18 +30,9 @@ export interface ConvertToConverseMessagesOptions {
|
|
|
30
30
|
*/
|
|
31
31
|
model?: string;
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Whether the model is an identified OpenAI model on Bedrock (`openai.*`, a geo/global
|
|
35
|
-
* inference profile such as `global.openai.*`, or an ARN naming one). Missing model IDs and
|
|
36
|
-
* opaque resource ARNs are not identified.
|
|
37
|
-
*/
|
|
33
|
+
/** Identifies OpenAI models on Bedrock, including named inference profiles. */
|
|
38
34
|
export declare function isBedrockOpenAIModel(model?: string): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* OpenAI Bedrock models reject prior `reasoningContent`, including on Claude-to-GPT handoffs.
|
|
41
|
-
* Only suppress replay for identified OpenAI targets; other model families retain the existing
|
|
42
|
-
* behavior because their Bedrock reasoning-replay requirements have not been verified here.
|
|
43
|
-
* Missing model IDs and opaque resource ARNs also retain the existing behavior.
|
|
44
|
-
*/
|
|
35
|
+
/** OpenAI and Grok 4.7 reject prior reasoning; opaque resources keep replay. */
|
|
45
36
|
export declare function replaysBedrockReasoning(model?: string): boolean;
|
|
46
37
|
/**
|
|
47
38
|
* Convert LangChain messages to Bedrock Converse messages.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { ChatGenerationChunk } from '@langchain/core/outputs';
|
|
6
6
|
import { AIMessage } from '@langchain/core/messages';
|
|
7
|
-
import type { BedrockMessage, ConverseResponse, ContentBlockDeltaEvent, ConverseStreamMetadataEvent, ContentBlockStartEvent, ReasoningContentBlock, ReasoningContentBlockDelta, MessageContentReasoningBlock, MessageContentReasoningBlockReasoningTextPartial, MessageContentReasoningBlockRedacted } from '../types';
|
|
7
|
+
import type { BedrockMessage, ConverseResponse, ContentBlockDeltaEvent, ConverseStreamMetadataEvent, ContentBlockStartEvent, ReasoningContentBlock, ReasoningContentBlockDelta, MessageContentReasoningBlock, MessageContentReasoningBlockReasoningTextPartial, MessageContentReasoningBlockRedacted } from '../types.js';
|
|
8
8
|
/**
|
|
9
9
|
* Convert a Bedrock reasoning block delta to a LangChain partial reasoning block.
|
|
10
10
|
*/
|
|
@@ -27,5 +27,5 @@ export declare class CustomChatGoogleGenerativeAI extends ChatGoogleGenerativeAI
|
|
|
27
27
|
_streamResponseChunks(messages: BaseMessage[], options: this['ParsedCallOptions'], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;
|
|
28
28
|
private _streamProviderChunks;
|
|
29
29
|
}
|
|
30
|
-
export { GEMINI_PARTS, GEMINI_REPLAY_UNSUPPORTED, captureGeminiReplayParts, restoreGeminiReplayParts, isGeminiReplayParts, } from './utils/signatures';
|
|
31
|
-
export type { GeminiReplayPart } from './utils/signatures';
|
|
30
|
+
export { GEMINI_PARTS, GEMINI_REPLAY_UNSUPPORTED, captureGeminiReplayParts, restoreGeminiReplayParts, isGeminiReplayParts, } from './utils/signatures.js';
|
|
31
|
+
export type { GeminiReplayPart } from './utils/signatures.js';
|
|
@@ -2,7 +2,7 @@ import { ChatGenerationChunk } from '@langchain/core/outputs';
|
|
|
2
2
|
import { BaseMessage, UsageMetadata } from '@langchain/core/messages';
|
|
3
3
|
import { POSSIBLE_ROLES, type Part, type Content, type GenerateContentResponse, type EnhancedGenerateContentResponse, type FunctionDeclarationsTool as GoogleGenerativeAIFunctionDeclarationsTool } from '@google/generative-ai';
|
|
4
4
|
import type { ChatResult } from '@langchain/core/outputs';
|
|
5
|
-
import { GoogleGenerativeAIToolType } from '../types';
|
|
5
|
+
import { GoogleGenerativeAIToolType } from '../types.js';
|
|
6
6
|
export declare const _FUNCTION_CALL_THOUGHT_SIGNATURES_MAP_KEY = "__gemini_function_call_thought_signatures__";
|
|
7
7
|
type GoogleResponse = GenerateContentResponse & Partial<EnhancedGenerateContentResponse>;
|
|
8
8
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToolChoice } from '@langchain/core/language_models/chat_models';
|
|
2
2
|
import { Tool as GenerativeAITool, ToolConfig } from '@google/generative-ai';
|
|
3
|
-
import { GoogleGenerativeAIToolType } from '../types';
|
|
3
|
+
import { GoogleGenerativeAIToolType } from '../types.js';
|
|
4
4
|
export declare function convertToolsToGenAI(tools: GoogleGenerativeAIToolType[], extra?: {
|
|
5
5
|
toolChoice?: ToolChoice;
|
|
6
6
|
allowedFunctionNames?: string[];
|
|
@@ -11,7 +11,7 @@ import type { ChatResult } from '@langchain/core/outputs';
|
|
|
11
11
|
import type { ChatXAIInput } from '@langchain/xai';
|
|
12
12
|
import type * as t from '@langchain/openai';
|
|
13
13
|
import type { SmoothItem } from '../stream/smoother.js';
|
|
14
|
-
import type { HeaderValue, HeadersLike } from './types';
|
|
14
|
+
import type { HeaderValue, HeadersLike } from './types.js';
|
|
15
15
|
import type { PromptCacheTtl } from '../../messages/cache.js';
|
|
16
16
|
export declare function isHeaders(headers: unknown): headers is Headers;
|
|
17
17
|
export declare function normalizeHeaders(headers: HeadersLike): Record<string, HeaderValue | readonly HeaderValue[]>;
|
|
@@ -108,6 +108,7 @@ export declare class ChatOpenAI extends OriginalChatOpenAI<t.ChatOpenAICallOptio
|
|
|
108
108
|
constructor(fields?: LibreChatOpenAIFields & t.OpenAIChatInput['modelKwargs']);
|
|
109
109
|
get exposedClient(): CustomOpenAIClient;
|
|
110
110
|
static lc_name(): string;
|
|
111
|
+
withConfig(config: Partial<t.ChatOpenAICallOptions>): this;
|
|
111
112
|
_getClientOptions(options?: OpenAICoreRequestOptions): OpenAICoreRequestOptions;
|
|
112
113
|
/**
|
|
113
114
|
* Returns backwards compatible reasoning parameters from constructor params and call options
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChatGenerationChunk } from '@langchain/core/outputs';
|
|
2
|
+
import type { OpenAIClient } from '@langchain/openai';
|
|
3
|
+
type ResponseEvent = OpenAIClient.Responses.ResponseStreamEvent;
|
|
4
|
+
type ResponseConverter = (event: ResponseEvent) => ChatGenerationChunk | null;
|
|
5
|
+
/** Reconcile terminal snapshots with the append-only tool-call chunk stream. */
|
|
6
|
+
export declare function createResponsesToolArgumentConverter(): ResponseConverter;
|
|
7
|
+
export {};
|
|
@@ -47,6 +47,7 @@ export declare class ChatOpenRouter extends ChatOpenAI {
|
|
|
47
47
|
private includeReasoning?;
|
|
48
48
|
constructor(_fields: ChatOpenRouterInput);
|
|
49
49
|
static lc_name(): 'LibreChatOpenRouter';
|
|
50
|
+
withConfig(config: Partial<ChatOpenRouterCallOptions>): this;
|
|
50
51
|
invocationParams(options?: this['ParsedCallOptions'], extra?: InvocationParamsExtra): OpenRouterInvocationParams;
|
|
51
52
|
private buildOpenRouterReasoning;
|
|
52
53
|
_streamResponseChunks(messages: BaseMessage[], options: this['ParsedCallOptions'], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;
|