@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.
- package/dist/graph/index.d.ts +3 -3
- package/dist/graph/state.d.cts +1 -1
- package/dist/graph/state.d.ts +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/pregel/algo.cjs +139 -103
- package/dist/pregel/algo.cjs.map +1 -1
- package/dist/pregel/algo.js +139 -103
- package/dist/pregel/algo.js.map +1 -1
- package/dist/pregel/index.cjs +43 -1
- package/dist/pregel/index.cjs.map +1 -1
- package/dist/pregel/index.d.cts.map +1 -1
- package/dist/pregel/index.d.ts.map +1 -1
- package/dist/pregel/index.js +44 -2
- package/dist/pregel/index.js.map +1 -1
- package/dist/pregel/messages.cjs +14 -10
- package/dist/pregel/messages.cjs.map +1 -1
- package/dist/pregel/messages.js +14 -10
- package/dist/pregel/messages.js.map +1 -1
- package/dist/pregel/remote.cjs +15 -0
- package/dist/pregel/remote.cjs.map +1 -1
- package/dist/pregel/remote.d.cts.map +1 -1
- package/dist/pregel/remote.d.ts.map +1 -1
- package/dist/pregel/remote.js +15 -0
- package/dist/pregel/remote.js.map +1 -1
- package/dist/pregel/retry.cjs +11 -1
- package/dist/pregel/retry.cjs.map +1 -1
- package/dist/pregel/retry.js +11 -1
- package/dist/pregel/retry.js.map +1 -1
- package/dist/pregel/runnable_types.d.cts +31 -1
- package/dist/pregel/runnable_types.d.cts.map +1 -1
- package/dist/pregel/runnable_types.d.ts +31 -1
- package/dist/pregel/runnable_types.d.ts.map +1 -1
- package/dist/pregel/utils/config.cjs +24 -5
- package/dist/pregel/utils/config.cjs.map +1 -1
- package/dist/pregel/utils/config.d.cts.map +1 -1
- package/dist/pregel/utils/config.d.ts.map +1 -1
- package/dist/pregel/utils/config.js +24 -6
- package/dist/pregel/utils/config.js.map +1 -1
- package/dist/pregel/utils/index.d.ts +0 -1
- package/dist/pregel/utils/index.d.ts.map +1 -1
- package/dist/state/index.d.ts +1 -1
- package/dist/state/schema.d.cts +1 -1
- package/dist/state/schema.d.ts +1 -1
- package/dist/web.d.cts +7 -7
- package/dist/web.d.ts +7 -7
- package/package.json +4 -4
package/dist/graph/index.d.ts
CHANGED
|
@@ -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";
|
package/dist/graph/state.d.cts
CHANGED
|
@@ -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
|
package/dist/graph/state.d.ts
CHANGED
|
@@ -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 };
|
package/dist/pregel/algo.cjs
CHANGED
|
@@ -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:
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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:
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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:
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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 ? {
|