@librechat/agents 4.2.9 → 4.2.11
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/agents/AgentContext.cjs +32 -2
- package/dist/cjs/agents/AgentContext.cjs.map +1 -1
- package/dist/cjs/harness/fileBindings.cjs +93 -0
- package/dist/cjs/harness/fileBindings.cjs.map +1 -0
- package/dist/cjs/harness/fileService.cjs +141 -0
- package/dist/cjs/harness/fileService.cjs.map +1 -0
- package/dist/cjs/harness/fileStream.cjs +76 -0
- package/dist/cjs/harness/fileStream.cjs.map +1 -0
- package/dist/cjs/harness/files.cjs +106 -0
- package/dist/cjs/harness/files.cjs.map +1 -0
- package/dist/cjs/harness/index.cjs +3 -0
- package/dist/cjs/harness/index.cjs.map +1 -1
- package/dist/cjs/llm/google/utils/signatures.cjs +5 -3
- package/dist/cjs/llm/google/utils/signatures.cjs.map +1 -1
- package/dist/cjs/main.cjs +13 -0
- package/dist/cjs/runtime/admission.cjs +135 -0
- package/dist/cjs/runtime/admission.cjs.map +1 -0
- package/dist/cjs/runtime/checkpoint.cjs +40 -0
- package/dist/cjs/runtime/checkpoint.cjs.map +1 -0
- package/dist/cjs/runtime/client.cjs +435 -0
- package/dist/cjs/runtime/client.cjs.map +1 -0
- package/dist/cjs/runtime/files.cjs +301 -0
- package/dist/cjs/runtime/files.cjs.map +1 -0
- package/dist/cjs/runtime/hostTools.cjs +165 -0
- package/dist/cjs/runtime/hostTools.cjs.map +1 -0
- package/dist/cjs/runtime/index.cjs +11 -0
- package/dist/cjs/runtime/model.cjs +303 -0
- package/dist/cjs/runtime/model.cjs.map +1 -0
- package/dist/cjs/runtime/peer.cjs +209 -0
- package/dist/cjs/runtime/peer.cjs.map +1 -0
- package/dist/cjs/runtime/policy.cjs +77 -0
- package/dist/cjs/runtime/policy.cjs.map +1 -0
- package/dist/cjs/runtime/recovery/client.cjs +172 -0
- package/dist/cjs/runtime/recovery/client.cjs.map +1 -0
- package/dist/cjs/runtime/recovery/log.cjs +47 -0
- package/dist/cjs/runtime/recovery/log.cjs.map +1 -0
- package/dist/cjs/runtime/recovery/redis.cjs +239 -0
- package/dist/cjs/runtime/recovery/redis.cjs.map +1 -0
- package/dist/cjs/runtime/recovery/server.cjs +190 -0
- package/dist/cjs/runtime/recovery/server.cjs.map +1 -0
- package/dist/cjs/runtime/recovery/socket.cjs +298 -0
- package/dist/cjs/runtime/recovery/socket.cjs.map +1 -0
- package/dist/cjs/runtime/resume.cjs +115 -0
- package/dist/cjs/runtime/resume.cjs.map +1 -0
- package/dist/cjs/runtime/sealed.cjs +107 -0
- package/dist/cjs/runtime/sealed.cjs.map +1 -0
- package/dist/cjs/runtime/server.cjs +415 -0
- package/dist/cjs/runtime/server.cjs.map +1 -0
- package/dist/cjs/runtime/snapshot.cjs +61 -0
- package/dist/cjs/runtime/snapshot.cjs.map +1 -0
- package/dist/cjs/runtime/types.cjs +20 -0
- package/dist/cjs/runtime/types.cjs.map +1 -0
- package/dist/cjs/runtime/wire.cjs +84 -0
- package/dist/cjs/runtime/wire.cjs.map +1 -0
- package/dist/cjs/tools/BashProgrammaticToolCalling.cjs +3 -2
- package/dist/cjs/tools/BashProgrammaticToolCalling.cjs.map +1 -1
- package/dist/cjs/tools/ProgrammaticCallerPolicy.cjs +24 -1
- package/dist/cjs/tools/ProgrammaticCallerPolicy.cjs.map +1 -1
- package/dist/cjs/tools/ProgrammaticToolCalling.cjs +3 -2
- package/dist/cjs/tools/ProgrammaticToolCalling.cjs.map +1 -1
- package/dist/cjs/tools/local/LocalProgrammaticToolCalling.cjs +2 -1
- package/dist/cjs/tools/local/LocalProgrammaticToolCalling.cjs.map +1 -1
- package/dist/cjs/tools/subagent/SubagentExecutor.cjs +15 -3
- package/dist/cjs/tools/subagent/SubagentExecutor.cjs.map +1 -1
- package/dist/cjs/tools/subagent/childGraphConfig.cjs +13 -1
- package/dist/cjs/tools/subagent/childGraphConfig.cjs.map +1 -1
- package/dist/cjs/tools/subagent/hostArgs.cjs +2 -0
- package/dist/cjs/tools/subagent/hostArgs.cjs.map +1 -1
- package/dist/esm/agents/AgentContext.mjs +32 -2
- package/dist/esm/agents/AgentContext.mjs.map +1 -1
- package/dist/esm/harness/fileBindings.mjs +93 -0
- package/dist/esm/harness/fileBindings.mjs.map +1 -0
- package/dist/esm/harness/fileService.mjs +140 -0
- package/dist/esm/harness/fileService.mjs.map +1 -0
- package/dist/esm/harness/fileStream.mjs +76 -0
- package/dist/esm/harness/fileStream.mjs.map +1 -0
- package/dist/esm/harness/files.mjs +97 -0
- package/dist/esm/harness/files.mjs.map +1 -0
- package/dist/esm/harness/index.mjs +3 -0
- package/dist/esm/harness/index.mjs.map +1 -1
- package/dist/esm/llm/google/utils/signatures.mjs +5 -3
- package/dist/esm/llm/google/utils/signatures.mjs.map +1 -1
- package/dist/esm/main.mjs +5 -2
- package/dist/esm/runtime/admission.mjs +133 -0
- package/dist/esm/runtime/admission.mjs.map +1 -0
- package/dist/esm/runtime/checkpoint.mjs +39 -0
- package/dist/esm/runtime/checkpoint.mjs.map +1 -0
- package/dist/esm/runtime/client.mjs +432 -0
- package/dist/esm/runtime/client.mjs.map +1 -0
- package/dist/esm/runtime/files.mjs +299 -0
- package/dist/esm/runtime/files.mjs.map +1 -0
- package/dist/esm/runtime/hostTools.mjs +164 -0
- package/dist/esm/runtime/hostTools.mjs.map +1 -0
- package/dist/esm/runtime/index.mjs +5 -0
- package/dist/esm/runtime/model.mjs +301 -0
- package/dist/esm/runtime/model.mjs.map +1 -0
- package/dist/esm/runtime/peer.mjs +209 -0
- package/dist/esm/runtime/peer.mjs.map +1 -0
- package/dist/esm/runtime/policy.mjs +75 -0
- package/dist/esm/runtime/policy.mjs.map +1 -0
- package/dist/esm/runtime/recovery/client.mjs +172 -0
- package/dist/esm/runtime/recovery/client.mjs.map +1 -0
- package/dist/esm/runtime/recovery/log.mjs +46 -0
- package/dist/esm/runtime/recovery/log.mjs.map +1 -0
- package/dist/esm/runtime/recovery/redis.mjs +239 -0
- package/dist/esm/runtime/recovery/redis.mjs.map +1 -0
- package/dist/esm/runtime/recovery/server.mjs +189 -0
- package/dist/esm/runtime/recovery/server.mjs.map +1 -0
- package/dist/esm/runtime/recovery/socket.mjs +297 -0
- package/dist/esm/runtime/recovery/socket.mjs.map +1 -0
- package/dist/esm/runtime/resume.mjs +111 -0
- package/dist/esm/runtime/resume.mjs.map +1 -0
- package/dist/esm/runtime/sealed.mjs +106 -0
- package/dist/esm/runtime/sealed.mjs.map +1 -0
- package/dist/esm/runtime/server.mjs +413 -0
- package/dist/esm/runtime/server.mjs.map +1 -0
- package/dist/esm/runtime/snapshot.mjs +60 -0
- package/dist/esm/runtime/snapshot.mjs.map +1 -0
- package/dist/esm/runtime/types.mjs +19 -0
- package/dist/esm/runtime/types.mjs.map +1 -0
- package/dist/esm/runtime/wire.mjs +80 -0
- package/dist/esm/runtime/wire.mjs.map +1 -0
- package/dist/esm/tools/BashProgrammaticToolCalling.mjs +3 -2
- package/dist/esm/tools/BashProgrammaticToolCalling.mjs.map +1 -1
- package/dist/esm/tools/ProgrammaticCallerPolicy.mjs +24 -1
- package/dist/esm/tools/ProgrammaticCallerPolicy.mjs.map +1 -1
- package/dist/esm/tools/ProgrammaticToolCalling.mjs +3 -2
- package/dist/esm/tools/ProgrammaticToolCalling.mjs.map +1 -1
- package/dist/esm/tools/local/LocalProgrammaticToolCalling.mjs +2 -1
- package/dist/esm/tools/local/LocalProgrammaticToolCalling.mjs.map +1 -1
- package/dist/esm/tools/subagent/SubagentExecutor.mjs +15 -3
- package/dist/esm/tools/subagent/SubagentExecutor.mjs.map +1 -1
- package/dist/esm/tools/subagent/childGraphConfig.mjs +13 -1
- package/dist/esm/tools/subagent/childGraphConfig.mjs.map +1 -1
- package/dist/esm/tools/subagent/hostArgs.mjs +2 -1
- package/dist/esm/tools/subagent/hostArgs.mjs.map +1 -1
- package/dist/types/agents/AgentContext.d.ts +4 -4
- package/dist/types/agents/projection.d.ts +1 -1
- package/dist/types/events.d.ts +2 -2
- package/dist/types/graphs/Graph.d.ts +13 -13
- package/dist/types/graphs/MultiAgentGraph.d.ts +2 -2
- package/dist/types/graphs/acceptedModelResponse.d.ts +1 -1
- package/dist/types/graphs/createGraph.d.ts +4 -4
- package/dist/types/graphs/graphFactory.d.ts +1 -1
- package/dist/types/graphs/handoff.d.ts +1 -1
- package/dist/types/harness/fileBindings.d.ts +13 -0
- package/dist/types/harness/fileService.d.ts +37 -0
- package/dist/types/harness/fileStream.d.ts +7 -0
- package/dist/types/harness/files.d.ts +108 -0
- package/dist/types/harness/index.d.ts +8 -2
- package/dist/types/harness/model.d.ts +3 -3
- package/dist/types/harness/providerText.d.ts +2 -2
- package/dist/types/hitl/approvalReview.d.ts +1 -1
- package/dist/types/hitl/askUserQuestion.d.ts +1 -1
- package/dist/types/hitl/askUserQuestions.d.ts +1 -1
- package/dist/types/hitl/askUserQuestionsInterrupt.d.ts +1 -1
- package/dist/types/hooks/types.d.ts +2 -2
- package/dist/types/instrumentation.d.ts +1 -1
- package/dist/types/langfuse.d.ts +3 -3
- package/dist/types/langfuseConfig.d.ts +2 -2
- package/dist/types/langfuseRuntimeContext.d.ts +1 -1
- package/dist/types/langfuseRuntimeScope.d.ts +2 -2
- package/dist/types/langfuseSpanRegistry.d.ts +1 -1
- package/dist/types/langfuseToolOutputTracing.d.ts +3 -3
- package/dist/types/llm/anthropic/index.d.ts +1 -1
- package/dist/types/llm/bedrock/index.d.ts +1 -1
- package/dist/types/llm/bedrock/toolCache.d.ts +2 -2
- package/dist/types/llm/contextOverflowRecovery.d.ts +2 -2
- package/dist/types/llm/contextPressureMeter.d.ts +2 -2
- package/dist/types/llm/google/index.d.ts +1 -1
- package/dist/types/llm/init.d.ts +1 -1
- package/dist/types/llm/invoke.d.ts +9 -9
- package/dist/types/llm/mistral/index.d.ts +1 -1
- package/dist/types/llm/openai/index.d.ts +2 -2
- package/dist/types/llm/openrouter/index.d.ts +2 -2
- package/dist/types/llm/openrouter/toolCache.d.ts +2 -2
- package/dist/types/llm/prepareProviderRequest.d.ts +3 -3
- package/dist/types/llm/promptCacheTools.d.ts +1 -1
- package/dist/types/llm/providerRegistry.d.ts +1 -1
- package/dist/types/llm/providerTextBoundary.d.ts +2 -2
- package/dist/types/llm/providerTextControls.d.ts +1 -1
- package/dist/types/llm/providers.d.ts +2 -2
- package/dist/types/llm/request.d.ts +1 -1
- package/dist/types/llm/stream/chunkAdapters.d.ts +1 -1
- package/dist/types/llm/streamLimits.d.ts +1 -1
- package/dist/types/llm/truncation.d.ts +1 -1
- package/dist/types/llm/vertexai/index.d.ts +1 -1
- package/dist/types/messages/alternation.d.ts +1 -1
- package/dist/types/messages/anthropicToolCache.d.ts +2 -2
- package/dist/types/messages/assistantPhase.d.ts +3 -3
- package/dist/types/messages/budget.d.ts +1 -1
- package/dist/types/messages/cache.d.ts +1 -1
- package/dist/types/messages/contextPruning.d.ts +2 -2
- package/dist/types/messages/core.d.ts +1 -1
- package/dist/types/messages/fading.d.ts +1 -1
- package/dist/types/messages/format.d.ts +2 -2
- package/dist/types/messages/ids.d.ts +2 -2
- package/dist/types/messages/injected.d.ts +1 -1
- package/dist/types/messages/langchain.d.ts +1 -1
- package/dist/types/messages/prune.d.ts +4 -4
- package/dist/types/messages/recency.d.ts +1 -1
- package/dist/types/messages/toolResultTypes.d.ts +1 -1
- package/dist/types/openai/arguments.d.ts +1 -1
- package/dist/types/openai/index.d.ts +1 -1
- package/dist/types/openai/toolProjection.d.ts +1 -1
- package/dist/types/prompts/activityLabel.d.ts +2 -2
- package/dist/types/prompts/reasoningLabel.d.ts +1 -1
- package/dist/types/rerank/search.d.ts +1 -1
- package/dist/types/responses/index.d.ts +1 -1
- package/dist/types/run.d.ts +3 -3
- package/dist/types/runtime/admission.d.ts +30 -0
- package/dist/types/runtime/checkpoint.d.ts +14 -0
- package/dist/types/runtime/client.d.ts +12 -0
- package/dist/types/runtime/files.d.ts +75 -0
- package/dist/types/runtime/hostTools.d.ts +22 -0
- package/dist/types/runtime/identity.d.ts +2 -0
- package/dist/types/runtime/index.d.ts +12 -0
- package/dist/types/runtime/model.d.ts +42 -0
- package/dist/types/runtime/peer.d.ts +55 -0
- package/dist/types/runtime/policy.d.ts +43 -0
- package/dist/types/runtime/recovery/client.d.ts +12 -0
- package/dist/types/runtime/recovery/journal.d.ts +62 -0
- package/dist/types/runtime/recovery/log.d.ts +9 -0
- package/dist/types/runtime/recovery/redis.d.ts +17 -0
- package/dist/types/runtime/recovery/server.d.ts +37 -0
- package/dist/types/runtime/recovery/socket.d.ts +72 -0
- package/dist/types/runtime/resume.d.ts +66 -0
- package/dist/types/runtime/sealed.d.ts +19 -0
- package/dist/types/runtime/server.d.ts +21 -0
- package/dist/types/runtime/snapshot.d.ts +12 -0
- package/dist/types/runtime/types.d.ts +125 -0
- package/dist/types/runtime/wire.d.ts +3 -0
- package/dist/types/session/handlers.d.ts +1 -1
- package/dist/types/session/types.d.ts +1 -1
- package/dist/types/stream.d.ts +3 -3
- package/dist/types/summarization/index.d.ts +1 -1
- package/dist/types/summarization/input.d.ts +1 -1
- package/dist/types/summarization/node.d.ts +6 -6
- package/dist/types/summarization/retry.d.ts +2 -2
- package/dist/types/summarization/semanticIndex.d.ts +2 -2
- package/dist/types/summarization/toolBudget.d.ts +1 -1
- package/dist/types/summarization/usage.d.ts +1 -1
- package/dist/types/tools/ArtifactDelivery.d.ts +1 -1
- package/dist/types/tools/ArtifactTruncation.d.ts +1 -1
- package/dist/types/tools/BashExecutor.d.ts +2 -2
- package/dist/types/tools/BashProgrammaticToolCalling.d.ts +2 -2
- package/dist/types/tools/CallerCapabilities.d.ts +1 -1
- package/dist/types/tools/CodeExecutor.d.ts +4 -4
- package/dist/types/tools/CodeSessionFileSummary.d.ts +1 -1
- package/dist/types/tools/ProgrammaticCallerPolicy.d.ts +2 -1
- package/dist/types/tools/ProgrammaticToolCalling.d.ts +2 -2
- package/dist/types/tools/ReadFile.d.ts +1 -1
- package/dist/types/tools/SkillTool.d.ts +1 -1
- package/dist/types/tools/SubagentTool.d.ts +3 -3
- package/dist/types/tools/ToolNode.d.ts +5 -5
- package/dist/types/tools/ToolSearch.d.ts +2 -2
- package/dist/types/tools/cloudflare/CloudflareBridgeRuntime.d.ts +1 -1
- package/dist/types/tools/cloudflare/CloudflareProgrammaticToolCalling.d.ts +1 -1
- package/dist/types/tools/cloudflare/CloudflareSandboxExecutionEngine.d.ts +2 -2
- package/dist/types/tools/cloudflare/CloudflareSandboxTools.d.ts +1 -1
- package/dist/types/tools/diagnostics.d.ts +1 -1
- package/dist/types/tools/eagerEventExecution.d.ts +1 -1
- package/dist/types/tools/handlers.d.ts +3 -3
- package/dist/types/tools/intentArg.d.ts +1 -1
- package/dist/types/tools/local/CompileCheckTool.d.ts +2 -2
- package/dist/types/tools/local/FileCheckpointer.d.ts +1 -1
- package/dist/types/tools/local/LocalCodingTools.d.ts +2 -2
- package/dist/types/tools/local/LocalExecutionEngine.d.ts +1 -1
- package/dist/types/tools/local/LocalExecutionTools.d.ts +1 -1
- package/dist/types/tools/local/LocalProgrammaticToolCalling.d.ts +1 -1
- package/dist/types/tools/local/bashAst.d.ts +1 -1
- package/dist/types/tools/local/resolveLocalExecutionTools.d.ts +1 -1
- package/dist/types/tools/local/syntaxCheck.d.ts +1 -1
- package/dist/types/tools/ptcTimeout.d.ts +1 -1
- package/dist/types/tools/runStepResume.d.ts +1 -1
- package/dist/types/tools/schema.d.ts +1 -1
- package/dist/types/tools/search/anthropic.d.ts +1 -1
- package/dist/types/tools/skillCatalog.d.ts +1 -1
- package/dist/types/tools/subagent/InMemorySubagentTaskStore.d.ts +1 -1
- package/dist/types/tools/subagent/SubagentExecutor.d.ts +5 -5
- package/dist/types/tools/subagent/SubagentReplay.d.ts +3 -3
- package/dist/types/tools/subagent/childGraphConfig.d.ts +2 -2
- package/dist/types/tools/subagent/diagnostics.d.ts +2 -2
- package/dist/types/tools/subagent/hostArgs.d.ts +8 -2
- package/dist/types/tools/subagent/index.d.ts +1 -1
- package/dist/types/tools/toolBatchReplay.d.ts +3 -3
- package/dist/types/types/activityLabel.d.ts +2 -2
- package/dist/types/types/graph.d.ts +16 -13
- package/dist/types/types/llm.d.ts +9 -9
- package/dist/types/types/reasoningLabel.d.ts +1 -1
- package/dist/types/types/run.d.ts +8 -8
- package/dist/types/types/stream.d.ts +5 -5
- package/dist/types/types/summarize.d.ts +2 -2
- package/dist/types/types/tools.d.ts +8 -8
- package/dist/types/utils/errors.d.ts +1 -1
- package/dist/types/utils/events.d.ts +3 -3
- package/dist/types/utils/handlers.d.ts +3 -3
- package/dist/types/utils/llm.d.ts +2 -2
- package/dist/types/utils/llmConfig.d.ts +1 -1
- package/dist/types/utils/title.d.ts +1 -1
- package/dist/types/utils/toolSessions.d.ts +1 -1
- package/package.json +22 -3
- package/src/agents/AgentContext.ts +68 -2
- package/src/harness/fileBindings.ts +156 -0
- package/src/harness/fileService.ts +217 -0
- package/src/harness/fileStream.ts +99 -0
- package/src/harness/files.ts +185 -0
- package/src/harness/index.ts +24 -0
- package/src/llm/google/utils/signatures.ts +10 -3
- package/src/runtime/admission.ts +224 -0
- package/src/runtime/checkpoint.ts +66 -0
- package/src/runtime/client.ts +674 -0
- package/src/runtime/files.ts +503 -0
- package/src/runtime/hostTools.ts +243 -0
- package/src/runtime/identity.ts +3 -0
- package/src/runtime/index.ts +33 -0
- package/src/runtime/model.ts +452 -0
- package/src/runtime/peer.ts +262 -0
- package/src/runtime/policy.ts +150 -0
- package/src/runtime/recovery/client.ts +232 -0
- package/src/runtime/recovery/journal.ts +88 -0
- package/src/runtime/recovery/log.ts +70 -0
- package/src/runtime/recovery/redis.ts +342 -0
- package/src/runtime/recovery/server.ts +280 -0
- package/src/runtime/recovery/socket.ts +422 -0
- package/src/runtime/resume.ts +268 -0
- package/src/runtime/sealed.ts +144 -0
- package/src/runtime/server.ts +653 -0
- package/src/runtime/snapshot.ts +87 -0
- package/src/runtime/types.ts +184 -0
- package/src/runtime/wire.ts +96 -0
- package/src/tools/BashProgrammaticToolCalling.ts +5 -2
- package/src/tools/ProgrammaticCallerPolicy.ts +42 -3
- package/src/tools/ProgrammaticToolCalling.ts +4 -1
- package/src/tools/local/LocalProgrammaticToolCalling.ts +4 -0
- package/src/tools/subagent/SubagentExecutor.ts +98 -32
- package/src/tools/subagent/childGraphConfig.ts +33 -1
- package/src/tools/subagent/hostArgs.ts +7 -0
- package/src/tools/subagent/index.ts +1 -0
- package/src/types/graph.ts +6 -3
|
@@ -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 '
|
|
4
|
-
import { Constants } from '
|
|
3
|
+
import type * as t from '../types/index.js';
|
|
4
|
+
import { Constants } from '../common/index.js';
|
|
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 '
|
|
1
|
+
import { Constants } from '../common/index.js';
|
|
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 '
|
|
1
|
+
import { Constants } from '../common/index.js';
|
|
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 '
|
|
2
|
-
import type { SubagentConfig } from '
|
|
3
|
-
import { Constants } from '
|
|
1
|
+
import type { JsonSchemaType, LCTool } from '../types/tools.js';
|
|
2
|
+
import type { SubagentConfig } from '../types/index.js';
|
|
3
|
+
import { Constants } from '../common/index.js';
|
|
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, unless the host enables child-thread continuation and you provide a saved thread id.\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, ToolOutputReferenceState, ResolvedArgsByCallId, ResolveResult } from '
|
|
6
|
-
import type { SubagentToolNodeResumeState } from '
|
|
7
|
-
import type * as t from '
|
|
8
|
-
import { ToolOutputReferenceRegistry } from '
|
|
9
|
-
import { RunnableCallable } from '
|
|
5
|
+
import type { ToolOutputResolveView, ToolOutputReferenceState, ResolvedArgsByCallId, ResolveResult } from './toolOutputReferences.js';
|
|
6
|
+
import type { SubagentToolNodeResumeState } from './subagent/SubagentReplay.js';
|
|
7
|
+
import type * as t from '../types/index.js';
|
|
8
|
+
import { ToolOutputReferenceRegistry } from './toolOutputReferences.js';
|
|
9
|
+
import { RunnableCallable } from '../utils/index.js';
|
|
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 '
|
|
3
|
-
import { Constants } from '
|
|
2
|
+
import type * as t from '../types/index.js';
|
|
3
|
+
import { Constants } from '../common/index.js';
|
|
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
1
|
import type { DynamicStructuredTool } from '@langchain/core/tools';
|
|
2
|
-
import type * as t from '
|
|
2
|
+
import type * as t from '../../types/index.js';
|
|
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 '
|
|
2
|
-
import type * as t from '
|
|
1
|
+
import type { WorkspaceFS } from '../local/workspaceFS.js';
|
|
2
|
+
import type * as t from '../../types/index.js';
|
|
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 '
|
|
2
|
+
import type * as t from '../../types/index.js';
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import type { ToolCall, ToolCallChunk } from '@langchain/core/messages/tool';
|
|
2
|
-
import type { Graph, MultiAgentGraph, StandardGraph } from '
|
|
3
|
-
import type { AgentContext } from '
|
|
4
|
-
import type * as t from '
|
|
2
|
+
import type { Graph, MultiAgentGraph, StandardGraph } from '../graphs/index.js';
|
|
3
|
+
import type { AgentContext } from '../agents/AgentContext.js';
|
|
4
|
+
import type * as t from '../types/index.js';
|
|
5
5
|
export declare function handleToolCallChunks({ graph, stepKey, toolCallChunks, metadata, observedAt, }: {
|
|
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 '
|
|
21
|
+
import type { JsonSchemaType, OutcomePatch } from '../types/index.js';
|
|
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 '
|
|
27
|
-
import { Constants } from '
|
|
26
|
+
import type * as t from '../../types/index.js';
|
|
27
|
+
import { Constants } from '../../common/index.js';
|
|
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 '
|
|
2
|
+
import type * as t from '../../types/index.js';
|
|
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 '
|
|
3
|
-
import { Constants } from '
|
|
2
|
+
import type * as t from '../../types/index.js';
|
|
3
|
+
import { Constants } from '../../common/index.js';
|
|
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 '
|
|
2
|
+
import type * as t from '../../types/index.js';
|
|
3
3
|
/** Produces a stable, non-plaintext key for environment-sensitive probes. */
|
|
4
4
|
export declare function commandAvailabilityEnvCacheKey(env: NodeJS.ProcessEnv | undefined): string;
|
|
5
5
|
/** Adds a probe entry while bounding retained environment variants. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DynamicStructuredTool } from '@langchain/core/tools';
|
|
2
|
-
import type * as t from '
|
|
2
|
+
import type * as t from '../../types/index.js';
|
|
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 '
|
|
2
|
+
import type * as t from '../../types/index.js';
|
|
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
|
|
@@ -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 '
|
|
18
|
+
import type * as t from '../../types/index.js';
|
|
19
19
|
export type SyntaxCheckOutcome = {
|
|
20
20
|
ok: true;
|
|
21
21
|
} | {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonSchemaType } from '
|
|
1
|
+
import type { JsonSchemaType } from '../types/index.js';
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import type { RunStepResumeState } from '
|
|
1
|
+
import type { RunStepResumeState } from '../types/index.js';
|
|
2
2
|
export declare function isRunStepResumeState(value: unknown): value is RunStepResumeState;
|
|
3
3
|
export declare function attachRunStepResumeState(payload: unknown, state: RunStepResumeState): object;
|
|
4
4
|
export declare function getRunStepResumeState(payload: unknown): RunStepResumeState | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type StructuredToolInterface } from '@langchain/core/tools';
|
|
2
|
-
import type { LCTool } from '
|
|
2
|
+
import type { LCTool } from '../types/index.js';
|
|
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 '
|
|
1
|
+
import type { AnthropicTextBlockParam, AnthropicWebSearchResultBlockParam } from '../../llm/anthropic/types.js';
|
|
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 { SubagentTaskClaim, SubagentTaskControlCommand, SubagentTaskControlReceipt, SubagentTaskControlResult, SubagentTaskSnapshot, SubagentTaskStartRequest, SubagentTaskStartResult, SubagentTaskStore } from '
|
|
1
|
+
import type { SubagentTaskClaim, SubagentTaskControlCommand, SubagentTaskControlReceipt, SubagentTaskControlResult, SubagentTaskSnapshot, SubagentTaskStartRequest, SubagentTaskStartResult, SubagentTaskStore } from '../../types/index.js';
|
|
2
2
|
export interface InMemorySubagentTaskStoreOptions {
|
|
3
3
|
completedTtlMs?: number;
|
|
4
4
|
maxControlMessageChars?: number;
|
|
@@ -1,13 +1,13 @@
|
|
|
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, SubagentContextAdapter, SubagentContextResult, SubagentTaskConfig, SubagentTaskRuntime, SubagentHostArgs, SubagentUsageSink, TokenCounter } from '
|
|
4
|
+
import type { MultiAgentGraphState, HumanInTheLoopConfig, StandardGraphInput, ExecutableSubagentConfigEntry, SubagentExecutionContext, SubagentContextAdapter, SubagentContextResult, SubagentTaskConfig, SubagentTaskRuntime, SubagentHostArgs, SubagentUsageSink, TokenCounter } from '../../types/index.js';
|
|
5
5
|
import type { SubagentResolutionPhase, SubagentResolutionCause, SubagentHostArgumentFailure, SubagentResolutionFailureHandler } from './diagnostics';
|
|
6
6
|
import type { SubagentResumeManifest, SettledSubagentToolOutput } from './SubagentReplay';
|
|
7
|
-
import type { GraphFactory } from '
|
|
8
|
-
import type { StandardGraph } from '
|
|
9
|
-
import { HookRegistry } from '
|
|
10
|
-
import { HandlerRegistry } from '
|
|
7
|
+
import type { GraphFactory } from '../../graphs/graphFactory.js';
|
|
8
|
+
import type { StandardGraph } from '../../graphs/Graph.js';
|
|
9
|
+
import { HookRegistry } from '../../hooks/index.js';
|
|
10
|
+
import { HandlerRegistry } from '../../events.js';
|
|
11
11
|
export { buildChildInputs, isGraphSubagentConfig, normalizeSubagentConfigs, normalizeSubagentConfigEntries, resolveSubagentConfigs, resolveSubagentConfigEntries, } from './childGraphConfig';
|
|
12
12
|
export declare const DEFAULT_SUBAGENT_DESCRIPTION = "No task description provided";
|
|
13
13
|
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 { FadingTier, FadingTiers, RunStepResumeState, RunInterruptResult, ToolSessionContext } from '
|
|
4
|
-
import type { ToolOutputReferenceState } from '
|
|
5
|
-
import type { ToolApprovalReplaySnapshot } from '
|
|
3
|
+
import type { FadingTier, FadingTiers, RunStepResumeState, RunInterruptResult, ToolSessionContext } from '../../types/index.js';
|
|
4
|
+
import type { ToolOutputReferenceState } from '../toolOutputReferences.js';
|
|
5
|
+
import type { ToolApprovalReplaySnapshot } from '../../hooks/index.js';
|
|
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 '
|
|
2
|
-
import type { AgentContext } from '
|
|
1
|
+
import type { AgentInputs, ExecutableSubagentConfig, ExecutableSubagentConfigEntry, GraphEdge, GraphSubagentConfig, ResolvedSubagentConfig, ResolvedSubagentConfigEntry, SubagentConfig, SubagentConfigEntry } from '../../types/index.js';
|
|
2
|
+
import type { AgentContext } from '../../agents/AgentContext.js';
|
|
3
3
|
type ChildGraphPlanBase = {
|
|
4
4
|
subjectAgentId: string;
|
|
5
5
|
checkpointNodeId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SubagentHostArgs } from '
|
|
1
|
+
import type { SubagentHostArgs } from '../../types/graph.js';
|
|
2
2
|
import { SubagentSettlementBindingError, SubagentDefinitionBindingError, SubagentInvocationBindingError, SubagentExecutionInvalidatedError } from './SubagentExecutionRegistry';
|
|
3
|
-
import { describeCodeApiError } from '
|
|
3
|
+
import { describeCodeApiError } from '../diagnostics.js';
|
|
4
4
|
/** Which step of child start-up failed: execution identity, then host config resolution. */
|
|
5
5
|
export type SubagentResolutionPhase = 'identity' | 'config';
|
|
6
6
|
/** Why a host resolver refused a declared host argument value. */
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import type { SubagentHostArgs, SubagentHostArgSpec, SubagentHostArgSpecs } from '
|
|
2
|
-
import type { JsonSchemaType } from '
|
|
1
|
+
import type { SubagentHostArgs, SubagentHostArgSpec, SubagentHostArgSpecs } from '../../types/graph.js';
|
|
2
|
+
import type { JsonSchemaType } from '../../types/tools.js';
|
|
3
|
+
/**
|
|
4
|
+
* Feature probe: `self` subagent configs may declare `hostArgs` together with
|
|
5
|
+
* `resolveAgentInputs` and a `configId`. Calls that pass host arguments are
|
|
6
|
+
* resolved through the resolver; calls that pass none reuse the self inputs.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SELF_SUBAGENT_HOST_ARGS_SUPPORTED = true;
|
|
3
9
|
/** Bounds on host-declared subagent call arguments and their values. */
|
|
4
10
|
export declare const SUBAGENT_HOST_ARG_LIMITS: Readonly<{
|
|
5
11
|
argsPerSubagent: 8;
|
|
@@ -3,5 +3,5 @@ export type { SubagentExecuteParams, SubagentExecuteResult, SubagentExecutorOpti
|
|
|
3
3
|
export { InMemorySubagentTaskStore } from './InMemorySubagentTaskStore';
|
|
4
4
|
export type { InMemorySubagentTaskStoreOptions } from './InMemorySubagentTaskStore';
|
|
5
5
|
export { SubagentResolutionError, SubagentHostArgumentError, getSubagentResolutionFailureMessage, getSubagentHostArgumentFailureMessage, } from './diagnostics';
|
|
6
|
-
export { SUBAGENT_HOST_ARG_LIMITS, buildSubagentHostArgProperties, resolveSubagentHostArgs, } from './hostArgs';
|
|
6
|
+
export { SUBAGENT_HOST_ARG_LIMITS, SELF_SUBAGENT_HOST_ARGS_SUPPORTED, buildSubagentHostArgProperties, resolveSubagentHostArgs, } from './hostArgs';
|
|
7
7
|
export type { SubagentHostArgumentFailure, SubagentHostArgumentRejection, SubagentResolutionPhase, SubagentResolutionCause, SubagentResolutionContext, SubagentResolutionDiagnostic, SubagentResolutionFailureHandler, } from './diagnostics';
|
|
@@ -2,9 +2,9 @@ import { Command } from '@langchain/langgraph';
|
|
|
2
2
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
3
3
|
import type { BaseMessage } from '@langchain/core/messages';
|
|
4
4
|
import type { Interrupt } from '@langchain/langgraph';
|
|
5
|
-
import type { SubagentToolNodeResumeState } from '
|
|
6
|
-
import type { ToolOutputReferenceState } from '
|
|
7
|
-
import type { ToolApprovalReviewEvidence } from '
|
|
5
|
+
import type { SubagentToolNodeResumeState } from './subagent/SubagentReplay.js';
|
|
6
|
+
import type { ToolOutputReferenceState } from './toolOutputReferences.js';
|
|
7
|
+
import type { ToolApprovalReviewEvidence } from '../hitl/approvalReview.js';
|
|
8
8
|
export declare const TOOL_BATCH_REPLAY_KEY = "__librechat_tool_batch_replay";
|
|
9
9
|
export declare const TOOL_REPLAY_CONFIGS_KEY = "__librechat_tool_replay_configs";
|
|
10
10
|
export declare const TOOL_PENDING_APPROVAL_KEY = "__librechat_tool_pending_approval";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
2
|
-
import type { AssistantTextPhase } from '
|
|
3
|
-
import type { ClientOptions, ProviderName } from '
|
|
2
|
+
import type { AssistantTextPhase } from './assistantPhase.js';
|
|
3
|
+
import type { ClientOptions, ProviderName } from './llm.js';
|
|
4
4
|
/** One tool call's contribution to the label payload (host-assembled). */
|
|
5
5
|
export type ActivityLabelToolEntry = {
|
|
6
6
|
toolName: string;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { ProviderTextProtection } from '
|
|
1
|
+
import type { ProviderTextProtection } from '../protection/providerText.js';
|
|
2
2
|
import type { BaseMessage, AIMessageChunk, SystemMessage, UsageMetadata } from '@langchain/core/messages';
|
|
3
3
|
import type { BindToolsInput } from '@langchain/core/language_models/chat_models';
|
|
4
4
|
import type { START, StateGraph, StateGraphArgs } from '@langchain/langgraph';
|
|
5
5
|
import type { RunnableConfig, Runnable } from '@langchain/core/runnables';
|
|
6
6
|
import type { ChatGenerationChunk } from '@langchain/core/outputs';
|
|
7
7
|
import type { GoogleAIToolType } from '@langchain/google-common';
|
|
8
|
-
import type { RunStep, ModelResponseEvent, ModelToolsClaimedEvent, RunStepDeltaEvent, RunStepResumeState, RunStepClosedEvent, ToolCallsDispatchedEvent, MessageDeltaEvent, ReasoningDeltaEvent } from '
|
|
9
|
-
import type { SummarizationNodeInput, SummarizeCompleteEvent, CompactionSemanticIndex, SummarizationConfig, SummarizeStartEvent, SummarizeDeltaEvent } from '
|
|
10
|
-
import type { ToolMap, ToolSessionMap, ToolEndEvent, GenericTool, LCTool, ToolExecutionConfig, ToolExecuteBatchRequest } from '
|
|
11
|
-
import type { TokenCounter, StreamLimits, StreamPreemption, TokenBudgetBreakdown } from '
|
|
12
|
-
import type { SubagentResolutionFailureHandler } from '
|
|
13
|
-
import type { SubagentTaskConfig } from '
|
|
14
|
-
import type { StandardGraph, MultiAgentGraph } from '
|
|
15
|
-
import type { ProviderClientOptionsConfig } from '
|
|
16
|
-
import type { Callback, GraphNodeKeys } from '
|
|
8
|
+
import type { RunStep, ModelResponseEvent, ModelToolsClaimedEvent, RunStepDeltaEvent, RunStepResumeState, RunStepClosedEvent, ToolCallsDispatchedEvent, MessageDeltaEvent, ReasoningDeltaEvent } from './stream.js';
|
|
9
|
+
import type { SummarizationNodeInput, SummarizeCompleteEvent, CompactionSemanticIndex, SummarizationConfig, SummarizeStartEvent, SummarizeDeltaEvent } from './summarize.js';
|
|
10
|
+
import type { ToolMap, ToolSessionMap, ToolEndEvent, GenericTool, LCTool, ToolExecutionConfig, ToolExecuteBatchRequest } from './tools.js';
|
|
11
|
+
import type { TokenCounter, StreamLimits, StreamPreemption, TokenBudgetBreakdown } from './run.js';
|
|
12
|
+
import type { SubagentResolutionFailureHandler } from '../tools/subagent/diagnostics.js';
|
|
13
|
+
import type { SubagentTaskConfig } from './subagentTasks.js';
|
|
14
|
+
import type { StandardGraph, MultiAgentGraph } from '../graphs/index.js';
|
|
15
|
+
import type { ProviderClientOptionsConfig } from './llm.js';
|
|
16
|
+
import type { Callback, GraphNodeKeys } from '../common/index.js';
|
|
17
17
|
/** Interface for bound model with stream and invoke methods */
|
|
18
18
|
export interface ChatModel {
|
|
19
19
|
stream?: (messages: BaseMessage[], config?: RunnableConfig) => Promise<AsyncIterable<AIMessageChunk>>;
|
|
@@ -497,8 +497,10 @@ export interface SubagentConfig extends SubagentConfigBase {
|
|
|
497
497
|
agentInputs?: AgentInputs;
|
|
498
498
|
/**
|
|
499
499
|
* Resolve the full child config only after this descriptor is selected.
|
|
500
|
-
* Eager `agentInputs` take precedence when also supplied. `self`
|
|
501
|
-
* resolver
|
|
500
|
+
* Eager `agentInputs` take precedence when also supplied. A `self` config
|
|
501
|
+
* may set a resolver only together with `hostArgs` and a `configId`; it then
|
|
502
|
+
* runs only for calls that pass host arguments, and every other call reuses
|
|
503
|
+
* the self inputs. Normalization rejects any other `self` + resolver pairing.
|
|
502
504
|
*
|
|
503
505
|
* Resolvers should rebuild inputs from the stable execution context instead
|
|
504
506
|
* of retaining request-owned state. The SDK keeps resolved inputs in memory
|
|
@@ -512,7 +514,8 @@ export interface SubagentConfig extends SubagentConfigBase {
|
|
|
512
514
|
/**
|
|
513
515
|
* Optional per-call arguments the parent model may pass for this subagent,
|
|
514
516
|
* delivered to `resolveAgentInputs` as `context.hostArgs`. Only lazy
|
|
515
|
-
* configs accept them. Declaring none
|
|
517
|
+
* configs and `self` configs with a resolver accept them. Declaring none
|
|
518
|
+
* leaves the tool schema unchanged.
|
|
516
519
|
*/
|
|
517
520
|
hostArgs?: SubagentHostArgSpecs;
|
|
518
521
|
/** When true, reuse the parent's AgentInputs (context isolation without separate config). */
|
|
@@ -13,15 +13,15 @@ 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
15
|
import type { CustomProviderOptionsMap } from '../provider-registration';
|
|
16
|
-
import type { ChatOpenRouterCallOptions } from '
|
|
17
|
-
import type { PromptCacheTtl } from '
|
|
18
|
-
import { AzureChatOpenAI, ChatDeepSeek, ChatMoonshot, ChatOpenAI, ChatXAI } from '
|
|
19
|
-
import { CustomChatGoogleGenerativeAI } from '
|
|
20
|
-
import { CustomChatBedrockConverse } from '
|
|
21
|
-
import { CustomAnthropic } from '
|
|
22
|
-
import { ChatOpenRouter } from '
|
|
23
|
-
import { ChatVertexAI } from '
|
|
24
|
-
import { Providers } from '
|
|
16
|
+
import type { ChatOpenRouterCallOptions } from '../llm/openrouter/index.js';
|
|
17
|
+
import type { PromptCacheTtl } from '../messages/cache.js';
|
|
18
|
+
import { AzureChatOpenAI, ChatDeepSeek, ChatMoonshot, ChatOpenAI, ChatXAI } from '../llm/openai/index.js';
|
|
19
|
+
import { CustomChatGoogleGenerativeAI } from '../llm/google/index.js';
|
|
20
|
+
import { CustomChatBedrockConverse } from '../llm/bedrock/index.js';
|
|
21
|
+
import { CustomAnthropic } from '../llm/anthropic/index.js';
|
|
22
|
+
import { ChatOpenRouter } from '../llm/openrouter/index.js';
|
|
23
|
+
import { ChatVertexAI } from '../llm/vertexai/index.js';
|
|
24
|
+
import { Providers } from '../common/index.js';
|
|
25
25
|
export type AzureClientOptions = Partial<OpenAIChatInput> & Partial<AzureOpenAIInput> & {
|
|
26
26
|
openAIApiKey?: string;
|
|
27
27
|
openAIApiVersion?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
2
2
|
import type { UsageMetadata } from '@langchain/core/messages';
|
|
3
|
-
import type { ClientOptions, ProviderName } from '
|
|
3
|
+
import type { ClientOptions, ProviderName } from './llm.js';
|
|
4
4
|
/** Lifecycle state of the visible reasoning snapshot being labeled. */
|
|
5
5
|
export type ReasoningLabelStatus = 'streaming' | 'complete';
|
|
6
6
|
/** Result of one reasoning-label revision. */
|
|
@@ -3,14 +3,14 @@ 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 '
|
|
7
|
-
import type { SubagentTaskConfig } from '
|
|
8
|
-
import type { HumanInTheLoopConfig } from '
|
|
9
|
-
import type { HookRegistry } from '
|
|
10
|
-
import type * as s from '
|
|
11
|
-
import type * as e from '
|
|
12
|
-
import type * as g from '
|
|
13
|
-
import type * as l from '
|
|
6
|
+
import type { ToolSessionMap, ToolExecutionConfig, ToolOutputReferencesConfig, EagerEventToolExecutionConfig } from './tools.js';
|
|
7
|
+
import type { SubagentTaskConfig } from './subagentTasks.js';
|
|
8
|
+
import type { HumanInTheLoopConfig } from './hitl.js';
|
|
9
|
+
import type { HookRegistry } from '../hooks/index.js';
|
|
10
|
+
import type * as s from './stream.js';
|
|
11
|
+
import type * as e from '../common/enum.js';
|
|
12
|
+
import type * as g from './graph.js';
|
|
13
|
+
import type * as l from './llm.js';
|
|
14
14
|
export type ZodObjectAny = z.ZodObject;
|
|
15
15
|
export type BaseGraphConfig = {
|
|
16
16
|
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 '
|
|
7
|
-
import type { AssistantTextPhase } from '
|
|
8
|
-
import type { SummarizeCompleteEvent } from '
|
|
9
|
-
import type { ToolEndEvent } from '
|
|
10
|
-
import { StepTypes, ContentTypes, GraphEvents } from '
|
|
6
|
+
import type { AnthropicContentBlock } from '../llm/anthropic/types.js';
|
|
7
|
+
import type { AssistantTextPhase } from './assistantPhase.js';
|
|
8
|
+
import type { SummarizeCompleteEvent } from './summarize.js';
|
|
9
|
+
import type { ToolEndEvent } from './tools.js';
|
|
10
|
+
import { StepTypes, ContentTypes, GraphEvents } from '../common/enum.js';
|
|
11
11
|
/** One accepted model result, detached from execution state before host dispatch.
|
|
12
12
|
* Provider chunks, failed attempts and UI run-step events are not this contract. */
|
|
13
13
|
export interface ModelResponseEvent {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UsageMetadata, BaseMessage } from '@langchain/core/messages';
|
|
2
|
-
import type { ProviderName, ContextBudgetMode } from '
|
|
3
|
-
import type { SummaryContentBlock } from '
|
|
2
|
+
import type { ProviderName, ContextBudgetMode } from './llm.js';
|
|
3
|
+
import type { SummaryContentBlock } from './stream.js';
|
|
4
4
|
export type SummarizationTrigger = {
|
|
5
5
|
type: 'token_ratio' | 'remaining_tokens' | 'messages_to_refine' | (string & {});
|
|
6
6
|
value: number;
|
|
@@ -2,13 +2,13 @@ import type { RunnableConfig, RunnableToolLike } from '@langchain/core/runnables
|
|
|
2
2
|
import type { StructuredToolInterface } from '@langchain/core/tools';
|
|
3
3
|
import type { ToolCall } from '@langchain/core/messages/tool';
|
|
4
4
|
import type { MessageContentComplex, RunStepResumeState, ToolErrorData } from './stream';
|
|
5
|
-
import type { ToolOutputReferenceRegistry } from '
|
|
5
|
+
import type { ToolOutputReferenceRegistry } from '../tools/toolOutputReferences.js';
|
|
6
6
|
import type { LangfuseConfig, SubagentExecutionContext } from './graph';
|
|
7
|
-
import type { PreparedSubagents } from '
|
|
8
|
-
import type { RunBreakerScope } from '
|
|
9
|
-
import type { HandoffRouting } from '
|
|
7
|
+
import type { PreparedSubagents } from '../tools/preparedSubagents.js';
|
|
8
|
+
import type { RunBreakerScope } from '../llm/streamLimits.js';
|
|
9
|
+
import type { HandoffRouting } from '../graphs/handoff.js';
|
|
10
10
|
import type { HumanInTheLoopConfig } from './hitl';
|
|
11
|
-
import type { HookRegistry } from '
|
|
11
|
+
import type { HookRegistry } from '../hooks/index.js';
|
|
12
12
|
/** Replacement type for `import type { ToolCall } from '@langchain/core/messages/tool'` in order to have stringified args typed */
|
|
13
13
|
export type CustomToolCall = {
|
|
14
14
|
name: string;
|
|
@@ -819,7 +819,7 @@ export interface ExecutionWorld {
|
|
|
819
819
|
/** Launches a process inside this world's filesystem namespace. */
|
|
820
820
|
readonly spawn: LocalSpawn;
|
|
821
821
|
/** Reads and writes the same namespace observed by `spawn`. */
|
|
822
|
-
readonly fs: Readonly<import('
|
|
822
|
+
readonly fs: Readonly<import('../tools/local/workspaceFS.js').WorkspaceFS>;
|
|
823
823
|
/** Whether the world already enforces a sandbox boundary. */
|
|
824
824
|
readonly sandboxed: boolean;
|
|
825
825
|
}
|
|
@@ -836,7 +836,7 @@ export interface ExecutionWorld {
|
|
|
836
836
|
* relying on validation alone.
|
|
837
837
|
*/
|
|
838
838
|
export type LocalExecConfig = {
|
|
839
|
-
-readonly [Key in keyof ExecutionWorld]?: Key extends 'fs' ? import('
|
|
839
|
+
-readonly [Key in keyof ExecutionWorld]?: Key extends 'fs' ? import('../tools/local/workspaceFS.js').WorkspaceFS : ExecutionWorld[Key];
|
|
840
840
|
};
|
|
841
841
|
export type LocalExecutionConfig = {
|
|
842
842
|
/**
|
|
@@ -1175,7 +1175,7 @@ export type ProgrammaticCache = {
|
|
|
1175
1175
|
hookContext?: ProgrammaticHookContext;
|
|
1176
1176
|
};
|
|
1177
1177
|
export type ProgrammaticHookContext = {
|
|
1178
|
-
registry: import('
|
|
1178
|
+
registry: import('../hooks/index.js').HookRegistry | undefined;
|
|
1179
1179
|
/** A detached HITL child must never execute an inner tool if its policy hook fails. */
|
|
1180
1180
|
failClosedOnHookError?: boolean;
|
|
1181
1181
|
runId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
2
|
-
import type { ToolCallsDispatchedEvent } from '
|
|
3
|
-
import type { ToolExecuteBatchRequest } from '
|
|
4
|
-
import type { AgentLogEvent } from '
|
|
2
|
+
import type { ToolCallsDispatchedEvent } from '../types/stream.js';
|
|
3
|
+
import type { ToolExecuteBatchRequest } from '../types/tools.js';
|
|
4
|
+
import type { AgentLogEvent } from '../types/graph.js';
|
|
5
5
|
/**
|
|
6
6
|
* Safely dispatches a custom event and properly awaits it to avoid
|
|
7
7
|
* 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 '
|
|
18
|
-
import { createContentAggregator } from '
|
|
19
|
-
import { GraphEvents } from '
|
|
17
|
+
import type * as t from '../types/index.js';
|
|
18
|
+
import { createContentAggregator } from '../stream.js';
|
|
19
|
+
import { GraphEvents } from '../common/index.js';
|
|
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;
|