@langchain/langgraph 1.2.7 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/graph/index.d.ts +3 -3
  2. package/dist/graph/state.d.cts +1 -1
  3. package/dist/graph/state.d.ts +1 -1
  4. package/dist/index.d.cts +7 -7
  5. package/dist/index.d.ts +7 -7
  6. package/dist/pregel/algo.cjs +139 -103
  7. package/dist/pregel/algo.cjs.map +1 -1
  8. package/dist/pregel/algo.js +139 -103
  9. package/dist/pregel/algo.js.map +1 -1
  10. package/dist/pregel/index.cjs +43 -1
  11. package/dist/pregel/index.cjs.map +1 -1
  12. package/dist/pregel/index.d.cts.map +1 -1
  13. package/dist/pregel/index.d.ts.map +1 -1
  14. package/dist/pregel/index.js +44 -2
  15. package/dist/pregel/index.js.map +1 -1
  16. package/dist/pregel/messages.cjs +14 -10
  17. package/dist/pregel/messages.cjs.map +1 -1
  18. package/dist/pregel/messages.js +14 -10
  19. package/dist/pregel/messages.js.map +1 -1
  20. package/dist/pregel/remote.cjs +15 -0
  21. package/dist/pregel/remote.cjs.map +1 -1
  22. package/dist/pregel/remote.d.cts.map +1 -1
  23. package/dist/pregel/remote.d.ts.map +1 -1
  24. package/dist/pregel/remote.js +15 -0
  25. package/dist/pregel/remote.js.map +1 -1
  26. package/dist/pregel/retry.cjs +11 -1
  27. package/dist/pregel/retry.cjs.map +1 -1
  28. package/dist/pregel/retry.js +11 -1
  29. package/dist/pregel/retry.js.map +1 -1
  30. package/dist/pregel/runnable_types.d.cts +31 -1
  31. package/dist/pregel/runnable_types.d.cts.map +1 -1
  32. package/dist/pregel/runnable_types.d.ts +31 -1
  33. package/dist/pregel/runnable_types.d.ts.map +1 -1
  34. package/dist/pregel/utils/config.cjs +24 -5
  35. package/dist/pregel/utils/config.cjs.map +1 -1
  36. package/dist/pregel/utils/config.d.cts.map +1 -1
  37. package/dist/pregel/utils/config.d.ts.map +1 -1
  38. package/dist/pregel/utils/config.js +24 -6
  39. package/dist/pregel/utils/config.js.map +1 -1
  40. package/dist/pregel/utils/index.d.ts +0 -1
  41. package/dist/pregel/utils/index.d.ts.map +1 -1
  42. package/dist/state/index.d.ts +1 -1
  43. package/dist/state/schema.d.cts +1 -1
  44. package/dist/state/schema.d.ts +1 -1
  45. package/dist/web.d.cts +7 -7
  46. package/dist/web.d.ts +7 -7
  47. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  import { CommandInstance, CommandParams } from "../constants.js";
2
2
  import { Annotation, AnnotationRoot, NodeType, SingleReducer, StateDefinition, StateType, UpdateType } from "./annotation.js";
3
- import { CompiledGraph, Graph } from "./graph.js";
4
- import { ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, ExtractStateType, ExtractUpdateType, GraphNode, GraphNodeReturnValue, GraphNodeTypes, StateDefinitionInit, StateGraphInit, StateGraphOptions } from "./types.js";
5
- import { CompiledStateGraph, StateGraph, StateGraphArgs } from "./state.js";
3
+ import { AddNodeOptions, CompiledGraph, Graph, NodeSpec } from "./graph.js";
4
+ import { ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, ExtractStateType, ExtractUpdateType, GraphNode, GraphNodeReturnValue, GraphNodeTypes, StateDefinitionInit, StateGraphInit, StateGraphOptions, ToStateDefinition } from "./types.js";
5
+ import { CompiledStateGraph, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphNodeSpec } from "./state.js";
6
6
  import { Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./messages_reducer.js";
7
7
  import { MessageGraph, pushMessage } from "./message.js";
@@ -326,5 +326,5 @@ declare class CompiledStateGraph<S, U, N extends string = typeof START, I extend
326
326
  protected _validateContext(config: Partial<Record<string, unknown>>): Promise<Partial<Record<string, unknown>>>;
327
327
  }
328
328
  //#endregion
329
- export { CompiledStateGraph, StateGraph, StateGraphArgs };
329
+ export { CompiledStateGraph, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphNodeSpec };
330
330
  //# sourceMappingURL=state.d.cts.map
@@ -326,5 +326,5 @@ declare class CompiledStateGraph<S, U, N extends string = typeof START, I extend
326
326
  protected _validateContext(config: Partial<Record<string, unknown>>): Promise<Partial<Record<string, unknown>>>;
327
327
  }
328
328
  //#endregion
329
- export { CompiledStateGraph, StateGraph, StateGraphArgs };
329
+ export { CompiledStateGraph, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphNodeSpec };
330
330
  //# sourceMappingURL=state.d.ts.map
package/dist/index.d.cts CHANGED
@@ -8,21 +8,21 @@ import { EphemeralValue } from "./channels/ephemeral_value.cjs";
8
8
  import { NamedBarrierValue } from "./channels/named_barrier_value.cjs";
9
9
  import { Topic } from "./channels/topic.cjs";
10
10
  import { UntrackedValueChannel } from "./channels/untracked_value.cjs";
11
- import { LangGraphRunnableConfig, Runtime } from "./pregel/runnable_types.cjs";
11
+ import { ExecutionInfo, LangGraphRunnableConfig, Runtime, ServerInfo } from "./pregel/runnable_types.cjs";
12
12
  import { Annotation, AnnotationRoot, NodeType, SingleReducer, StateDefinition, StateType, UpdateType } from "./graph/annotation.cjs";
13
- import { RetryPolicy } from "./pregel/utils/index.cjs";
13
+ import { CachePolicy, RetryPolicy } from "./pregel/utils/index.cjs";
14
14
  import { PregelNode } from "./pregel/read.cjs";
15
15
  import { GetStateOptions, MultipleChannelSubscriptionOptions, PregelOptions, PregelParams, SingleChannelSubscriptionOptions, StateSnapshot, StreamMode, StreamOutputMap } from "./pregel/types.cjs";
16
16
  import { Pregel } from "./pregel/index.cjs";
17
- import { CompiledGraph, Graph } from "./graph/graph.cjs";
17
+ import { AddNodeOptions, CompiledGraph, Graph, NodeSpec } from "./graph/graph.cjs";
18
18
  import { InferInterruptInputType, InferInterruptResumeType, interrupt } from "./interrupt.cjs";
19
19
  import { InferWriterType, writer } from "./writer.cjs";
20
20
  import { isSerializableSchema, isStandardSchema } from "./state/types.cjs";
21
21
  import { ReducedValue, ReducedValueInit } from "./state/values/reduced.cjs";
22
22
  import { UntrackedValue, UntrackedValueInit } from "./state/values/untracked.cjs";
23
- import { InferStateSchemaUpdate, InferStateSchemaValue, StateSchema, StateSchemaField, StateSchemaFields } from "./state/schema.cjs";
24
- import { ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, ExtractStateType, ExtractUpdateType, GraphNode, GraphNodeReturnValue, GraphNodeTypes, StateDefinitionInit, StateGraphInit, StateGraphOptions } from "./graph/types.cjs";
25
- import { CompiledStateGraph, StateGraph, StateGraphArgs } from "./graph/state.cjs";
23
+ import { AnyStateSchema, InferStateSchemaUpdate, InferStateSchemaValue, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition } from "./state/schema.cjs";
24
+ import { ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, ExtractStateType, ExtractUpdateType, GraphNode, GraphNodeReturnValue, GraphNodeTypes, StateDefinitionInit, StateGraphInit, StateGraphOptions, ToStateDefinition } from "./graph/types.cjs";
25
+ import { CompiledStateGraph, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphNodeSpec } from "./graph/state.cjs";
26
26
  import { Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/messages_reducer.cjs";
27
27
  import { MessageGraph, pushMessage } from "./graph/message.cjs";
28
28
  import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, StateGraphInputError, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.cjs";
@@ -32,4 +32,4 @@ import { getJsonSchemaFromSchema, getSchemaDefaultGetter } from "./state/adapter
32
32
  import { MessagesValue } from "./state/prebuilt/messages.cjs";
33
33
  import { getConfig, getCurrentTaskInput, getStore, getWriter } from "./pregel/utils/config.cjs";
34
34
  import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, Checkpoint, CheckpointMetadata, CheckpointTuple, GetOperation, InMemoryStore, Item, ListNamespacesOperation, MatchCondition, MemorySaver, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchOperation, copyCheckpoint, emptyCheckpoint } from "./web.cjs";
35
- export { Annotation, AnnotationRoot, AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, BinaryOperator, BinaryOperatorAggregate, COMMAND_SYMBOL, Checkpoint, CheckpointMetadata, CheckpointTuple, Command, CommandInstance, CommandParams, CompiledGraph, CompiledStateGraph, ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, EntrypointOptions, EphemeralValue, ExtractStateType, ExtractUpdateType, GetOperation, GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphNode, GraphNodeReturnValue, GraphNodeTypes, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, InferInterruptInputType, InferInterruptResumeType, InferStateSchemaUpdate, InferStateSchemaValue, InferWriterType, Interrupt, InvalidUpdateError, Item, LangGraphRunnableConfig, LastValue, ListNamespacesOperation, MatchCondition, MemorySaver, MessageGraph, Messages, MessagesAnnotation, MessagesValue, MessagesZodMeta, MessagesZodState, MultipleChannelSubscriptionOptions, MultipleSubgraphsError, NameSpacePath, NamedBarrierValue, NamespaceMatchType, NodeInterrupt, NodeType, Operation, OperationResults, Overwrite, OverwriteValue, ParentCommand, Pregel, PregelNode, PregelOptions, PregelParams, PutOperation, REMOVE_ALL_MESSAGES, ReducedValue, ReducedValueInit, RemoteException, RetryPolicy, Runtime, START, SearchOperation, Send, SingleChannelSubscriptionOptions, SingleReducer, StateDefinition, StateDefinitionInit, StateGraph, StateGraphArgs, StateGraphInit, StateGraphInputError, StateGraphOptions, StateSchema, StateSchemaField, StateSchemaFields, StateSnapshot, StateType, StreamMode, StreamOutputMap, TaskOptions, Topic, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, UntrackedValueInit, UpdateType, WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, isSerializableSchema, isStandardSchema, messagesStateReducer, pushMessage, task, writer };
35
+ export { AddNodeOptions, Annotation, AnnotationRoot, AnyStateSchema, AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, BinaryOperator, BinaryOperatorAggregate, COMMAND_SYMBOL, CachePolicy, Checkpoint, CheckpointMetadata, CheckpointTuple, Command, CommandInstance, CommandParams, CompiledGraph, CompiledStateGraph, ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, EntrypointOptions, EphemeralValue, ExecutionInfo, ExtractStateType, ExtractUpdateType, GetOperation, GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphNode, GraphNodeReturnValue, GraphNodeTypes, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, InferInterruptInputType, InferInterruptResumeType, InferStateSchemaUpdate, InferStateSchemaValue, InferWriterType, Interrupt, InvalidUpdateError, Item, LangGraphRunnableConfig, LastValue, ListNamespacesOperation, MatchCondition, MemorySaver, MessageGraph, Messages, MessagesAnnotation, MessagesValue, MessagesZodMeta, MessagesZodState, MultipleChannelSubscriptionOptions, MultipleSubgraphsError, NameSpacePath, NamedBarrierValue, NamespaceMatchType, NodeInterrupt, NodeSpec, NodeType, Operation, OperationResults, Overwrite, OverwriteValue, ParentCommand, Pregel, PregelNode, PregelOptions, PregelParams, PutOperation, REMOVE_ALL_MESSAGES, ReducedValue, ReducedValueInit, RemoteException, RetryPolicy, Runtime, START, SearchOperation, Send, ServerInfo, SingleChannelSubscriptionOptions, SingleReducer, StateDefinition, StateDefinitionInit, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphInit, StateGraphInputError, StateGraphNodeSpec, StateGraphOptions, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition, StateSnapshot, StateType, StreamMode, StreamOutputMap, TaskOptions, ToStateDefinition, Topic, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, UntrackedValueInit, UpdateType, WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, isSerializableSchema, isStandardSchema, messagesStateReducer, pushMessage, task, writer };
package/dist/index.d.ts CHANGED
@@ -8,21 +8,21 @@ import { EphemeralValue } from "./channels/ephemeral_value.js";
8
8
  import { NamedBarrierValue } from "./channels/named_barrier_value.js";
9
9
  import { Topic } from "./channels/topic.js";
10
10
  import { UntrackedValueChannel } from "./channels/untracked_value.js";
11
- import { LangGraphRunnableConfig, Runtime } from "./pregel/runnable_types.js";
11
+ import { ExecutionInfo, LangGraphRunnableConfig, Runtime, ServerInfo } from "./pregel/runnable_types.js";
12
12
  import { Annotation, AnnotationRoot, NodeType, SingleReducer, StateDefinition, StateType, UpdateType } from "./graph/annotation.js";
13
- import { RetryPolicy } from "./pregel/utils/index.js";
13
+ import { CachePolicy, RetryPolicy } from "./pregel/utils/index.js";
14
14
  import { PregelNode } from "./pregel/read.js";
15
15
  import { GetStateOptions, MultipleChannelSubscriptionOptions, PregelOptions, PregelParams, SingleChannelSubscriptionOptions, StateSnapshot, StreamMode, StreamOutputMap } from "./pregel/types.js";
16
16
  import { Pregel } from "./pregel/index.js";
17
- import { CompiledGraph, Graph } from "./graph/graph.js";
17
+ import { AddNodeOptions, CompiledGraph, Graph, NodeSpec } from "./graph/graph.js";
18
18
  import { InferInterruptInputType, InferInterruptResumeType, interrupt } from "./interrupt.js";
19
19
  import { InferWriterType, writer } from "./writer.js";
20
20
  import { isSerializableSchema, isStandardSchema } from "./state/types.js";
21
21
  import { ReducedValue, ReducedValueInit } from "./state/values/reduced.js";
22
22
  import { UntrackedValue, UntrackedValueInit } from "./state/values/untracked.js";
23
- import { InferStateSchemaUpdate, InferStateSchemaValue, StateSchema, StateSchemaField, StateSchemaFields } from "./state/schema.js";
24
- import { ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, ExtractStateType, ExtractUpdateType, GraphNode, GraphNodeReturnValue, GraphNodeTypes, StateDefinitionInit, StateGraphInit, StateGraphOptions } from "./graph/types.js";
25
- import { CompiledStateGraph, StateGraph, StateGraphArgs } from "./graph/state.js";
23
+ import { AnyStateSchema, InferStateSchemaUpdate, InferStateSchemaValue, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition } from "./state/schema.js";
24
+ import { ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, ExtractStateType, ExtractUpdateType, GraphNode, GraphNodeReturnValue, GraphNodeTypes, StateDefinitionInit, StateGraphInit, StateGraphOptions, ToStateDefinition } from "./graph/types.js";
25
+ import { CompiledStateGraph, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphNodeSpec } from "./graph/state.js";
26
26
  import { Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/messages_reducer.js";
27
27
  import { MessageGraph, pushMessage } from "./graph/message.js";
28
28
  import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, StateGraphInputError, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.js";
@@ -32,4 +32,4 @@ import { getJsonSchemaFromSchema, getSchemaDefaultGetter } from "./state/adapter
32
32
  import { MessagesValue } from "./state/prebuilt/messages.js";
33
33
  import { getConfig, getCurrentTaskInput, getStore, getWriter } from "./pregel/utils/config.js";
34
34
  import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, Checkpoint, CheckpointMetadata, CheckpointTuple, GetOperation, InMemoryStore, Item, ListNamespacesOperation, MatchCondition, MemorySaver, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchOperation, copyCheckpoint, emptyCheckpoint } from "./web.js";
35
- export { Annotation, AnnotationRoot, AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, BinaryOperator, BinaryOperatorAggregate, COMMAND_SYMBOL, Checkpoint, CheckpointMetadata, CheckpointTuple, Command, CommandInstance, CommandParams, CompiledGraph, CompiledStateGraph, ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, EntrypointOptions, EphemeralValue, ExtractStateType, ExtractUpdateType, GetOperation, GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphNode, GraphNodeReturnValue, GraphNodeTypes, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, InferInterruptInputType, InferInterruptResumeType, InferStateSchemaUpdate, InferStateSchemaValue, InferWriterType, Interrupt, InvalidUpdateError, Item, LangGraphRunnableConfig, LastValue, ListNamespacesOperation, MatchCondition, MemorySaver, MessageGraph, Messages, MessagesAnnotation, MessagesValue, MessagesZodMeta, MessagesZodState, MultipleChannelSubscriptionOptions, MultipleSubgraphsError, NameSpacePath, NamedBarrierValue, NamespaceMatchType, NodeInterrupt, NodeType, Operation, OperationResults, Overwrite, OverwriteValue, ParentCommand, Pregel, PregelNode, PregelOptions, PregelParams, PutOperation, REMOVE_ALL_MESSAGES, ReducedValue, ReducedValueInit, RemoteException, RetryPolicy, Runtime, START, SearchOperation, Send, SingleChannelSubscriptionOptions, SingleReducer, StateDefinition, StateDefinitionInit, StateGraph, StateGraphArgs, StateGraphInit, StateGraphInputError, StateGraphOptions, StateSchema, StateSchemaField, StateSchemaFields, StateSnapshot, StateType, StreamMode, StreamOutputMap, TaskOptions, Topic, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, UntrackedValueInit, UpdateType, WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, isSerializableSchema, isStandardSchema, messagesStateReducer, pushMessage, task, writer };
35
+ export { AddNodeOptions, Annotation, AnnotationRoot, AnyStateSchema, AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, BinaryOperator, BinaryOperatorAggregate, COMMAND_SYMBOL, CachePolicy, Checkpoint, CheckpointMetadata, CheckpointTuple, Command, CommandInstance, CommandParams, CompiledGraph, CompiledStateGraph, ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, EntrypointOptions, EphemeralValue, ExecutionInfo, ExtractStateType, ExtractUpdateType, GetOperation, GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphNode, GraphNodeReturnValue, GraphNodeTypes, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, InferInterruptInputType, InferInterruptResumeType, InferStateSchemaUpdate, InferStateSchemaValue, InferWriterType, Interrupt, InvalidUpdateError, Item, LangGraphRunnableConfig, LastValue, ListNamespacesOperation, MatchCondition, MemorySaver, MessageGraph, Messages, MessagesAnnotation, MessagesValue, MessagesZodMeta, MessagesZodState, MultipleChannelSubscriptionOptions, MultipleSubgraphsError, NameSpacePath, NamedBarrierValue, NamespaceMatchType, NodeInterrupt, NodeSpec, NodeType, Operation, OperationResults, Overwrite, OverwriteValue, ParentCommand, Pregel, PregelNode, PregelOptions, PregelParams, PutOperation, REMOVE_ALL_MESSAGES, ReducedValue, ReducedValueInit, RemoteException, RetryPolicy, Runtime, START, SearchOperation, Send, ServerInfo, SingleChannelSubscriptionOptions, SingleReducer, StateDefinition, StateDefinitionInit, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphInit, StateGraphInputError, StateGraphNodeSpec, StateGraphOptions, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition, StateSnapshot, StateType, StreamMode, StreamOutputMap, TaskOptions, ToStateDefinition, Topic, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, UntrackedValueInit, UpdateType, WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, isSerializableSchema, isStandardSchema, messagesStateReducer, pushMessage, task, writer };
@@ -215,47 +215,59 @@ function _prepareSingleTask(taskPath, checkpoint, pendingWrites, processes, chan
215
215
  langgraph_node: call.name,
216
216
  langgraph_triggers: triggers,
217
217
  langgraph_path: outputTaskPath,
218
- langgraph_checkpoint_ns: taskCheckpointNamespace
218
+ langgraph_checkpoint_ns: taskCheckpointNamespace,
219
+ checkpoint_ns: taskCheckpointNamespace
219
220
  };
220
221
  if (forExecution) {
221
222
  const writes = [];
223
+ const executionInfo = {
224
+ checkpointId: checkpoint.id,
225
+ checkpointNs: taskCheckpointNamespace,
226
+ taskId: id,
227
+ threadId: configurable.thread_id,
228
+ runId: config.runId != null ? String(config.runId) : void 0,
229
+ nodeAttempt: 1
230
+ };
222
231
  return {
223
232
  name: call.name,
224
233
  input: call.input,
225
234
  proc,
226
235
  writes,
227
- config: (0, _langchain_core_runnables.patchConfig)((0, _langchain_core_runnables.mergeConfigs)(config, {
228
- metadata,
229
- store: extra.store ?? config.store
230
- }), {
231
- runName: call.name,
232
- callbacks: manager?.getChild(`graph:step:${step}`),
233
- configurable: {
234
- [require_constants.CONFIG_KEY_TASK_ID]: id,
235
- [require_constants.CONFIG_KEY_SEND]: (writes_) => _localWrite((items) => writes.push(...items), processes, writes_),
236
- [require_constants.CONFIG_KEY_READ]: (select_, fresh_ = false) => _localRead(checkpoint, channels, {
237
- name: call.name,
238
- writes,
239
- triggers,
240
- path: outputTaskPath
241
- }, select_, fresh_),
242
- [require_constants.CONFIG_KEY_CHECKPOINTER]: checkpointer ?? configurable["__pregel_checkpointer"],
243
- [require_constants.CONFIG_KEY_CHECKPOINT_MAP]: {
244
- ...configurable[require_constants.CONFIG_KEY_CHECKPOINT_MAP],
245
- [parentNamespace]: checkpoint.id
246
- },
247
- [require_constants.CONFIG_KEY_SCRATCHPAD]: _scratchpad({
248
- pendingWrites: pendingWrites ?? [],
249
- taskId: id,
250
- currentTaskInput: call.input,
251
- resumeMap: config.configurable?.[require_constants.CONFIG_KEY_RESUME_MAP],
252
- namespaceHash: require_hash.XXH3(taskCheckpointNamespace)
253
- }),
254
- [require_constants.CONFIG_KEY_PREVIOUS_STATE]: checkpoint.channel_values[require_constants.PREVIOUS],
255
- checkpoint_id: void 0,
256
- checkpoint_ns: taskCheckpointNamespace
257
- }
258
- }),
236
+ config: {
237
+ ...(0, _langchain_core_runnables.patchConfig)((0, _langchain_core_runnables.mergeConfigs)(config, {
238
+ metadata,
239
+ store: extra.store ?? config.store
240
+ }), {
241
+ runName: call.name,
242
+ callbacks: manager?.getChild(`graph:step:${step}`),
243
+ configurable: {
244
+ [require_constants.CONFIG_KEY_TASK_ID]: id,
245
+ [require_constants.CONFIG_KEY_SEND]: (writes_) => _localWrite((items) => writes.push(...items), processes, writes_),
246
+ [require_constants.CONFIG_KEY_READ]: (select_, fresh_ = false) => _localRead(checkpoint, channels, {
247
+ name: call.name,
248
+ writes,
249
+ triggers,
250
+ path: outputTaskPath
251
+ }, select_, fresh_),
252
+ [require_constants.CONFIG_KEY_CHECKPOINTER]: checkpointer ?? configurable["__pregel_checkpointer"],
253
+ [require_constants.CONFIG_KEY_CHECKPOINT_MAP]: {
254
+ ...configurable[require_constants.CONFIG_KEY_CHECKPOINT_MAP],
255
+ [parentNamespace]: checkpoint.id
256
+ },
257
+ [require_constants.CONFIG_KEY_SCRATCHPAD]: _scratchpad({
258
+ pendingWrites: pendingWrites ?? [],
259
+ taskId: id,
260
+ currentTaskInput: call.input,
261
+ resumeMap: config.configurable?.[require_constants.CONFIG_KEY_RESUME_MAP],
262
+ namespaceHash: require_hash.XXH3(taskCheckpointNamespace)
263
+ }),
264
+ [require_constants.CONFIG_KEY_PREVIOUS_STATE]: checkpoint.channel_values[require_constants.PREVIOUS],
265
+ checkpoint_id: void 0,
266
+ checkpoint_ns: taskCheckpointNamespace
267
+ }
268
+ }),
269
+ executionInfo
270
+ },
259
271
  triggers,
260
272
  retry_policy: call.retry,
261
273
  cache_key: call.cache ? {
@@ -302,7 +314,8 @@ function _prepareSingleTask(taskPath, checkpoint, pendingWrites, processes, chan
302
314
  langgraph_node: packet.node,
303
315
  langgraph_triggers: triggers,
304
316
  langgraph_path: taskPath.slice(0, 3),
305
- langgraph_checkpoint_ns: taskCheckpointNamespace
317
+ langgraph_checkpoint_ns: taskCheckpointNamespace,
318
+ checkpoint_ns: taskCheckpointNamespace
306
319
  };
307
320
  if (forExecution) {
308
321
  const proc = processes[packet.node];
@@ -313,45 +326,56 @@ function _prepareSingleTask(taskPath, checkpoint, pendingWrites, processes, chan
313
326
  ...proc.metadata
314
327
  };
315
328
  const writes = [];
329
+ const executionInfo = {
330
+ checkpointId: checkpoint.id,
331
+ checkpointNs: taskCheckpointNamespace,
332
+ taskId,
333
+ threadId: configurable.thread_id,
334
+ runId: config.runId != null ? String(config.runId) : void 0,
335
+ nodeAttempt: 1
336
+ };
316
337
  return {
317
338
  name: packet.node,
318
339
  input: packet.args,
319
340
  proc: node,
320
341
  subgraphs: proc.subgraphs,
321
342
  writes,
322
- config: (0, _langchain_core_runnables.patchConfig)((0, _langchain_core_runnables.mergeConfigs)(config, {
323
- metadata,
324
- tags: proc.tags,
325
- store: extra.store ?? config.store
326
- }), {
327
- runName: packet.node,
328
- callbacks: manager?.getChild(`graph:step:${step}`),
329
- configurable: {
330
- [require_constants.CONFIG_KEY_TASK_ID]: taskId,
331
- [require_constants.CONFIG_KEY_SEND]: (writes_) => _localWrite((items) => writes.push(...items), processes, writes_),
332
- [require_constants.CONFIG_KEY_READ]: (select_, fresh_ = false) => _localRead(checkpoint, channels, {
333
- name: packet.node,
334
- writes,
335
- triggers,
336
- path: taskPath
337
- }, select_, fresh_),
338
- [require_constants.CONFIG_KEY_CHECKPOINTER]: checkpointer ?? configurable["__pregel_checkpointer"],
339
- [require_constants.CONFIG_KEY_CHECKPOINT_MAP]: {
340
- ...configurable[require_constants.CONFIG_KEY_CHECKPOINT_MAP],
341
- [parentNamespace]: checkpoint.id
342
- },
343
- [require_constants.CONFIG_KEY_SCRATCHPAD]: _scratchpad({
344
- pendingWrites: pendingWrites ?? [],
345
- taskId,
346
- currentTaskInput: packet.args,
347
- resumeMap: config.configurable?.[require_constants.CONFIG_KEY_RESUME_MAP],
348
- namespaceHash: require_hash.XXH3(taskCheckpointNamespace)
349
- }),
350
- [require_constants.CONFIG_KEY_PREVIOUS_STATE]: checkpoint.channel_values[require_constants.PREVIOUS],
351
- checkpoint_id: void 0,
352
- checkpoint_ns: taskCheckpointNamespace
353
- }
354
- }),
343
+ config: {
344
+ ...(0, _langchain_core_runnables.patchConfig)((0, _langchain_core_runnables.mergeConfigs)(config, {
345
+ metadata,
346
+ tags: proc.tags,
347
+ store: extra.store ?? config.store
348
+ }), {
349
+ runName: packet.node,
350
+ callbacks: manager?.getChild(`graph:step:${step}`),
351
+ configurable: {
352
+ [require_constants.CONFIG_KEY_TASK_ID]: taskId,
353
+ [require_constants.CONFIG_KEY_SEND]: (writes_) => _localWrite((items) => writes.push(...items), processes, writes_),
354
+ [require_constants.CONFIG_KEY_READ]: (select_, fresh_ = false) => _localRead(checkpoint, channels, {
355
+ name: packet.node,
356
+ writes,
357
+ triggers,
358
+ path: taskPath
359
+ }, select_, fresh_),
360
+ [require_constants.CONFIG_KEY_CHECKPOINTER]: checkpointer ?? configurable["__pregel_checkpointer"],
361
+ [require_constants.CONFIG_KEY_CHECKPOINT_MAP]: {
362
+ ...configurable[require_constants.CONFIG_KEY_CHECKPOINT_MAP],
363
+ [parentNamespace]: checkpoint.id
364
+ },
365
+ [require_constants.CONFIG_KEY_SCRATCHPAD]: _scratchpad({
366
+ pendingWrites: pendingWrites ?? [],
367
+ taskId,
368
+ currentTaskInput: packet.args,
369
+ resumeMap: config.configurable?.[require_constants.CONFIG_KEY_RESUME_MAP],
370
+ namespaceHash: require_hash.XXH3(taskCheckpointNamespace)
371
+ }),
372
+ [require_constants.CONFIG_KEY_PREVIOUS_STATE]: checkpoint.channel_values[require_constants.PREVIOUS],
373
+ checkpoint_id: void 0,
374
+ checkpoint_ns: taskCheckpointNamespace
375
+ }
376
+ }),
377
+ executionInfo
378
+ },
355
379
  triggers,
356
380
  retry_policy: proc.retryPolicy,
357
381
  cache_key: proc.cachePolicy ? {
@@ -413,7 +437,8 @@ function _prepareSingleTask(taskPath, checkpoint, pendingWrites, processes, chan
413
437
  langgraph_node: name,
414
438
  langgraph_triggers: [trigger],
415
439
  langgraph_path: taskPath,
416
- langgraph_checkpoint_ns: taskCheckpointNamespace
440
+ langgraph_checkpoint_ns: taskCheckpointNamespace,
441
+ checkpoint_ns: taskCheckpointNamespace
417
442
  };
418
443
  if (forExecution) {
419
444
  const node = proc.getNode();
@@ -423,47 +448,58 @@ function _prepareSingleTask(taskPath, checkpoint, pendingWrites, processes, chan
423
448
  ...proc.metadata
424
449
  };
425
450
  const writes = [];
451
+ const executionInfo = {
452
+ checkpointId: checkpoint.id,
453
+ checkpointNs: taskCheckpointNamespace,
454
+ taskId,
455
+ threadId: configurable.thread_id,
456
+ runId: config.runId != null ? String(config.runId) : void 0,
457
+ nodeAttempt: 1
458
+ };
426
459
  return {
427
460
  name,
428
461
  input: val,
429
462
  proc: node,
430
463
  subgraphs: proc.subgraphs,
431
464
  writes,
432
- config: (0, _langchain_core_runnables.patchConfig)((0, _langchain_core_runnables.mergeConfigs)(config, {
433
- metadata,
434
- tags: proc.tags,
435
- store: extra.store ?? config.store
436
- }), {
437
- runName: name,
438
- callbacks: manager?.getChild(`graph:step:${step}`),
439
- configurable: {
440
- [require_constants.CONFIG_KEY_TASK_ID]: taskId,
441
- [require_constants.CONFIG_KEY_SEND]: (writes_) => _localWrite((items) => {
442
- writes.push(...items);
443
- }, processes, writes_),
444
- [require_constants.CONFIG_KEY_READ]: (select_, fresh_ = false) => _localRead(checkpoint, channels, {
445
- name,
446
- writes,
447
- triggers: [trigger],
448
- path: taskPath
449
- }, select_, fresh_),
450
- [require_constants.CONFIG_KEY_CHECKPOINTER]: checkpointer ?? configurable["__pregel_checkpointer"],
451
- [require_constants.CONFIG_KEY_CHECKPOINT_MAP]: {
452
- ...configurable[require_constants.CONFIG_KEY_CHECKPOINT_MAP],
453
- [parentNamespace]: checkpoint.id
454
- },
455
- [require_constants.CONFIG_KEY_SCRATCHPAD]: _scratchpad({
456
- pendingWrites: pendingWrites ?? [],
457
- taskId,
458
- currentTaskInput: val,
459
- resumeMap: config.configurable?.[require_constants.CONFIG_KEY_RESUME_MAP],
460
- namespaceHash: require_hash.XXH3(taskCheckpointNamespace)
461
- }),
462
- [require_constants.CONFIG_KEY_PREVIOUS_STATE]: checkpoint.channel_values[require_constants.PREVIOUS],
463
- checkpoint_id: void 0,
464
- checkpoint_ns: taskCheckpointNamespace
465
- }
466
- }),
465
+ config: {
466
+ ...(0, _langchain_core_runnables.patchConfig)((0, _langchain_core_runnables.mergeConfigs)(config, {
467
+ metadata,
468
+ tags: proc.tags,
469
+ store: extra.store ?? config.store
470
+ }), {
471
+ runName: name,
472
+ callbacks: manager?.getChild(`graph:step:${step}`),
473
+ configurable: {
474
+ [require_constants.CONFIG_KEY_TASK_ID]: taskId,
475
+ [require_constants.CONFIG_KEY_SEND]: (writes_) => _localWrite((items) => {
476
+ writes.push(...items);
477
+ }, processes, writes_),
478
+ [require_constants.CONFIG_KEY_READ]: (select_, fresh_ = false) => _localRead(checkpoint, channels, {
479
+ name,
480
+ writes,
481
+ triggers: [trigger],
482
+ path: taskPath
483
+ }, select_, fresh_),
484
+ [require_constants.CONFIG_KEY_CHECKPOINTER]: checkpointer ?? configurable["__pregel_checkpointer"],
485
+ [require_constants.CONFIG_KEY_CHECKPOINT_MAP]: {
486
+ ...configurable[require_constants.CONFIG_KEY_CHECKPOINT_MAP],
487
+ [parentNamespace]: checkpoint.id
488
+ },
489
+ [require_constants.CONFIG_KEY_SCRATCHPAD]: _scratchpad({
490
+ pendingWrites: pendingWrites ?? [],
491
+ taskId,
492
+ currentTaskInput: val,
493
+ resumeMap: config.configurable?.[require_constants.CONFIG_KEY_RESUME_MAP],
494
+ namespaceHash: require_hash.XXH3(taskCheckpointNamespace)
495
+ }),
496
+ [require_constants.CONFIG_KEY_PREVIOUS_STATE]: checkpoint.channel_values[require_constants.PREVIOUS],
497
+ checkpoint_id: void 0,
498
+ checkpoint_ns: taskCheckpointNamespace
499
+ }
500
+ }),
501
+ executionInfo
502
+ },
467
503
  triggers: [trigger],
468
504
  retry_policy: proc.retryPolicy,
469
505
  cache_key: proc.cachePolicy ? {