@langchain/langgraph 0.4.9 → 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +1 -2
- package/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/channels/any_value.cjs +44 -63
- package/dist/channels/any_value.cjs.map +1 -0
- package/dist/channels/any_value.d.cts +24 -0
- package/dist/channels/any_value.d.cts.map +1 -0
- package/dist/channels/any_value.d.ts +16 -11
- package/dist/channels/any_value.d.ts.map +1 -0
- package/dist/channels/any_value.js +42 -57
- package/dist/channels/any_value.js.map +1 -1
- package/dist/channels/base.cjs +93 -133
- package/dist/channels/base.cjs.map +1 -0
- package/dist/channels/base.d.cts +79 -0
- package/dist/channels/base.d.cts.map +1 -0
- package/dist/channels/base.d.ts +77 -73
- package/dist/channels/base.d.ts.map +1 -0
- package/dist/channels/base.js +90 -127
- package/dist/channels/base.js.map +1 -1
- package/dist/channels/binop.cjs +47 -77
- package/dist/channels/binop.cjs.map +1 -0
- package/dist/channels/binop.d.cts +22 -0
- package/dist/channels/binop.d.cts.map +1 -0
- package/dist/channels/binop.d.ts +17 -12
- package/dist/channels/binop.d.ts.map +1 -0
- package/dist/channels/binop.js +45 -71
- package/dist/channels/binop.js.map +1 -1
- package/dist/channels/dynamic_barrier_value.cjs +72 -208
- package/dist/channels/dynamic_barrier_value.cjs.map +1 -0
- package/dist/channels/dynamic_barrier_value.d.cts +42 -0
- package/dist/channels/dynamic_barrier_value.d.cts.map +1 -0
- package/dist/channels/dynamic_barrier_value.d.ts +20 -35
- package/dist/channels/dynamic_barrier_value.d.ts.map +1 -0
- package/dist/channels/dynamic_barrier_value.js +69 -200
- package/dist/channels/dynamic_barrier_value.js.map +1 -1
- package/dist/channels/ephemeral_value.cjs +44 -70
- package/dist/channels/ephemeral_value.cjs.map +1 -0
- package/dist/channels/ephemeral_value.d.cts +22 -0
- package/dist/channels/ephemeral_value.d.cts.map +1 -0
- package/dist/channels/ephemeral_value.d.ts +18 -12
- package/dist/channels/ephemeral_value.d.ts.map +1 -0
- package/dist/channels/ephemeral_value.js +43 -65
- package/dist/channels/ephemeral_value.js.map +1 -1
- package/dist/channels/index.cjs +21 -10
- package/dist/channels/index.d.cts +9 -0
- package/dist/channels/index.d.ts +9 -7
- package/dist/channels/index.js +10 -3
- package/dist/channels/last_value.cjs +90 -140
- package/dist/channels/last_value.cjs.map +1 -0
- package/dist/channels/last_value.d.cts +42 -0
- package/dist/channels/last_value.d.cts.map +1 -0
- package/dist/channels/last_value.d.ts +27 -23
- package/dist/channels/last_value.d.ts.map +1 -0
- package/dist/channels/last_value.js +87 -133
- package/dist/channels/last_value.js.map +1 -1
- package/dist/channels/named_barrier_value.cjs +114 -170
- package/dist/channels/named_barrier_value.cjs.map +1 -0
- package/dist/channels/named_barrier_value.d.cts +46 -0
- package/dist/channels/named_barrier_value.d.cts.map +1 -0
- package/dist/channels/named_barrier_value.d.ts +32 -29
- package/dist/channels/named_barrier_value.d.ts.map +1 -0
- package/dist/channels/named_barrier_value.js +111 -163
- package/dist/channels/named_barrier_value.js.map +1 -1
- package/dist/channels/topic.cjs +63 -96
- package/dist/channels/topic.cjs.map +1 -0
- package/dist/channels/topic.d.cts +32 -0
- package/dist/channels/topic.d.cts.map +1 -0
- package/dist/channels/topic.d.ts +28 -19
- package/dist/channels/topic.d.ts.map +1 -0
- package/dist/channels/topic.js +61 -90
- package/dist/channels/topic.js.map +1 -1
- package/dist/constants.cjs +376 -452
- package/dist/constants.cjs.map +1 -0
- package/dist/constants.d.cts +285 -0
- package/dist/constants.d.cts.map +1 -0
- package/dist/constants.d.ts +113 -148
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +336 -444
- package/dist/constants.js.map +1 -1
- package/dist/errors.cjs +151 -179
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.cts +81 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.ts +56 -46
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +140 -165
- package/dist/errors.js.map +1 -1
- package/dist/func/index.cjs +292 -290
- package/dist/func/index.cjs.map +1 -0
- package/dist/func/index.d.cts +293 -0
- package/dist/func/index.d.cts.map +1 -0
- package/dist/func/index.d.ts +86 -72
- package/dist/func/index.d.ts.map +1 -0
- package/dist/func/index.js +288 -284
- package/dist/func/index.js.map +1 -1
- package/dist/func/types.d.cts +64 -0
- package/dist/func/types.d.cts.map +1 -0
- package/dist/func/types.d.ts +24 -19
- package/dist/func/types.d.ts.map +1 -0
- package/dist/graph/annotation.cjs +96 -120
- package/dist/graph/annotation.cjs.map +1 -0
- package/dist/graph/annotation.d.cts +116 -0
- package/dist/graph/annotation.d.cts.map +1 -0
- package/dist/graph/annotation.d.ts +33 -34
- package/dist/graph/annotation.d.ts.map +1 -0
- package/dist/graph/annotation.js +91 -112
- package/dist/graph/annotation.js.map +1 -1
- package/dist/graph/graph.cjs +419 -723
- package/dist/graph/graph.cjs.map +1 -0
- package/dist/graph/graph.d.cts +133 -0
- package/dist/graph/graph.d.cts.map +1 -0
- package/dist/graph/graph.d.ts +124 -91
- package/dist/graph/graph.d.ts.map +1 -0
- package/dist/graph/graph.js +412 -713
- package/dist/graph/graph.js.map +1 -1
- package/dist/graph/index.cjs +4 -17
- package/dist/graph/index.js +6 -5
- package/dist/graph/message.cjs +59 -104
- package/dist/graph/message.cjs.map +1 -0
- package/dist/graph/message.d.cts +19 -0
- package/dist/graph/message.d.cts.map +1 -0
- package/dist/graph/message.d.ts +11 -10
- package/dist/graph/message.d.ts.map +1 -0
- package/dist/graph/message.js +56 -98
- package/dist/graph/message.js.map +1 -1
- package/dist/graph/messages_annotation.cjs +106 -106
- package/dist/graph/messages_annotation.cjs.map +1 -0
- package/dist/graph/messages_annotation.d.cts +111 -0
- package/dist/graph/messages_annotation.d.cts.map +1 -0
- package/dist/graph/messages_annotation.d.ts +18 -9
- package/dist/graph/messages_annotation.d.ts.map +1 -0
- package/dist/graph/messages_annotation.js +100 -100
- package/dist/graph/messages_annotation.js.map +1 -1
- package/dist/graph/state.cjs +475 -779
- package/dist/graph/state.cjs.map +1 -0
- package/dist/graph/state.d.cts +231 -0
- package/dist/graph/state.d.cts.map +1 -0
- package/dist/graph/state.d.ts +148 -138
- package/dist/graph/state.d.ts.map +1 -0
- package/dist/graph/state.js +469 -769
- package/dist/graph/state.js.map +1 -1
- package/dist/graph/zod/index.cjs +10 -21
- package/dist/graph/zod/index.d.cts +3 -0
- package/dist/graph/zod/index.d.ts +3 -3
- package/dist/graph/zod/index.js +4 -4
- package/dist/graph/zod/meta.cjs +142 -177
- package/dist/graph/zod/meta.cjs.map +1 -0
- package/dist/graph/zod/meta.d.cts +116 -0
- package/dist/graph/zod/meta.d.cts.map +1 -0
- package/dist/graph/zod/meta.d.ts +99 -97
- package/dist/graph/zod/meta.d.ts.map +1 -0
- package/dist/graph/zod/meta.js +136 -170
- package/dist/graph/zod/meta.js.map +1 -1
- package/dist/graph/zod/plugin.cjs +36 -39
- package/dist/graph/zod/plugin.cjs.map +1 -0
- package/dist/graph/zod/plugin.js +34 -35
- package/dist/graph/zod/plugin.js.map +1 -1
- package/dist/graph/zod/schema.cjs +82 -110
- package/dist/graph/zod/schema.cjs.map +1 -0
- package/dist/graph/zod/schema.d.cts +38 -0
- package/dist/graph/zod/schema.d.cts.map +1 -0
- package/dist/graph/zod/schema.d.ts +12 -6
- package/dist/graph/zod/schema.d.ts.map +1 -0
- package/dist/graph/zod/schema.js +77 -103
- package/dist/graph/zod/schema.js.map +1 -1
- package/dist/graph/zod/zod-registry.cjs +41 -47
- package/dist/graph/zod/zod-registry.cjs.map +1 -0
- package/dist/graph/zod/zod-registry.d.cts +51 -0
- package/dist/graph/zod/zod-registry.d.cts.map +1 -0
- package/dist/graph/zod/zod-registry.d.ts +34 -26
- package/dist/graph/zod/zod-registry.d.ts.map +1 -0
- package/dist/graph/zod/zod-registry.js +37 -41
- package/dist/graph/zod/zod-registry.js.map +1 -1
- package/dist/hash.cjs +205 -267
- package/dist/hash.cjs.map +1 -0
- package/dist/hash.js +205 -265
- package/dist/hash.js.map +1 -1
- package/dist/index.cjs +111 -33
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +26 -0
- package/dist/index.d.ts +26 -5
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/dist/interrupt.cjs +79 -85
- package/dist/interrupt.cjs.map +1 -0
- package/dist/interrupt.d.cts +49 -0
- package/dist/interrupt.d.cts.map +1 -0
- package/dist/interrupt.d.ts +6 -1
- package/dist/interrupt.d.ts.map +1 -0
- package/dist/interrupt.js +76 -80
- package/dist/interrupt.js.map +1 -1
- package/dist/prebuilt/agentName.cjs +139 -172
- package/dist/prebuilt/agentName.cjs.map +1 -0
- package/dist/prebuilt/agentName.d.cts +42 -0
- package/dist/prebuilt/agentName.d.cts.map +1 -0
- package/dist/prebuilt/agentName.d.ts +13 -21
- package/dist/prebuilt/agentName.d.ts.map +1 -0
- package/dist/prebuilt/agentName.js +139 -168
- package/dist/prebuilt/agentName.js.map +1 -1
- package/dist/prebuilt/agent_executor.cjs +42 -80
- package/dist/prebuilt/agent_executor.cjs.map +1 -0
- package/dist/prebuilt/agent_executor.d.cts +57 -0
- package/dist/prebuilt/agent_executor.d.cts.map +1 -0
- package/dist/prebuilt/agent_executor.d.ts +47 -38
- package/dist/prebuilt/agent_executor.d.ts.map +1 -0
- package/dist/prebuilt/agent_executor.js +40 -75
- package/dist/prebuilt/agent_executor.js.map +1 -1
- package/dist/prebuilt/chat_agent_executor.cjs +66 -128
- package/dist/prebuilt/chat_agent_executor.cjs.map +1 -0
- package/dist/prebuilt/chat_agent_executor.d.cts +23 -0
- package/dist/prebuilt/chat_agent_executor.d.cts.map +1 -0
- package/dist/prebuilt/chat_agent_executor.d.ts +18 -10
- package/dist/prebuilt/chat_agent_executor.d.ts.map +1 -0
- package/dist/prebuilt/chat_agent_executor.js +63 -123
- package/dist/prebuilt/chat_agent_executor.js.map +1 -1
- package/dist/prebuilt/index.cjs +15 -18
- package/dist/prebuilt/index.d.cts +8 -0
- package/dist/prebuilt/index.d.ts +8 -8
- package/dist/prebuilt/index.js +8 -7
- package/dist/prebuilt/interrupt.d.cts +73 -0
- package/dist/prebuilt/interrupt.d.cts.map +1 -0
- package/dist/prebuilt/interrupt.d.ts +32 -15
- package/dist/prebuilt/interrupt.d.ts.map +1 -0
- package/dist/prebuilt/react_agent_executor.cjs +317 -473
- package/dist/prebuilt/react_agent_executor.cjs.map +1 -0
- package/dist/prebuilt/react_agent_executor.d.cts +229 -0
- package/dist/prebuilt/react_agent_executor.d.cts.map +1 -0
- package/dist/prebuilt/react_agent_executor.d.ts +171 -143
- package/dist/prebuilt/react_agent_executor.d.ts.map +1 -0
- package/dist/prebuilt/react_agent_executor.js +315 -465
- package/dist/prebuilt/react_agent_executor.js.map +1 -1
- package/dist/prebuilt/tool_executor.cjs +45 -67
- package/dist/prebuilt/tool_executor.cjs.map +1 -0
- package/dist/prebuilt/tool_executor.d.cts +42 -0
- package/dist/prebuilt/tool_executor.d.cts.map +1 -0
- package/dist/prebuilt/tool_executor.d.ts +30 -24
- package/dist/prebuilt/tool_executor.d.ts.map +1 -0
- package/dist/prebuilt/tool_executor.js +44 -63
- package/dist/prebuilt/tool_executor.js.map +1 -1
- package/dist/prebuilt/tool_node.cjs +213 -275
- package/dist/prebuilt/tool_node.cjs.map +1 -0
- package/dist/prebuilt/tool_node.d.cts +151 -0
- package/dist/prebuilt/tool_node.d.cts.map +1 -0
- package/dist/prebuilt/tool_node.d.ts +30 -17
- package/dist/prebuilt/tool_node.d.ts.map +1 -0
- package/dist/prebuilt/tool_node.js +209 -268
- package/dist/prebuilt/tool_node.js.map +1 -1
- package/dist/pregel/algo.cjs +551 -692
- package/dist/pregel/algo.cjs.map +1 -0
- package/dist/pregel/algo.d.cts +13 -0
- package/dist/pregel/algo.d.cts.map +1 -0
- package/dist/pregel/algo.d.ts +8 -38
- package/dist/pregel/algo.d.ts.map +1 -0
- package/dist/pregel/algo.js +546 -683
- package/dist/pregel/algo.js.map +1 -1
- package/dist/pregel/call.cjs +46 -42
- package/dist/pregel/call.cjs.map +1 -0
- package/dist/pregel/call.js +43 -37
- package/dist/pregel/call.js.map +1 -1
- package/dist/pregel/debug.cjs +153 -223
- package/dist/pregel/debug.cjs.map +1 -0
- package/dist/pregel/debug.js +152 -215
- package/dist/pregel/debug.js.map +1 -1
- package/dist/pregel/index.cjs +1138 -1604
- package/dist/pregel/index.cjs.map +1 -0
- package/dist/pregel/index.d.cts +536 -0
- package/dist/pregel/index.d.cts.map +1 -0
- package/dist/pregel/index.d.ts +460 -422
- package/dist/pregel/index.d.ts.map +1 -0
- package/dist/pregel/index.js +1129 -1592
- package/dist/pregel/index.js.map +1 -1
- package/dist/pregel/io.cjs +127 -234
- package/dist/pregel/io.cjs.map +1 -0
- package/dist/pregel/io.js +122 -225
- package/dist/pregel/io.js.map +1 -1
- package/dist/pregel/loop.cjs +542 -954
- package/dist/pregel/loop.cjs.map +1 -0
- package/dist/pregel/loop.js +539 -948
- package/dist/pregel/loop.js.map +1 -1
- package/dist/pregel/messages.cjs +104 -196
- package/dist/pregel/messages.cjs.map +1 -0
- package/dist/pregel/messages.js +102 -191
- package/dist/pregel/messages.js.map +1 -1
- package/dist/pregel/read.cjs +150 -280
- package/dist/pregel/read.cjs.map +1 -0
- package/dist/pregel/read.d.cts +51 -0
- package/dist/pregel/read.d.cts.map +1 -0
- package/dist/pregel/read.d.ts +48 -46
- package/dist/pregel/read.d.ts.map +1 -0
- package/dist/pregel/read.js +147 -274
- package/dist/pregel/read.js.map +1 -1
- package/dist/pregel/remote.cjs +339 -458
- package/dist/pregel/remote.cjs.map +1 -0
- package/dist/pregel/remote.d.cts +121 -0
- package/dist/pregel/remote.d.cts.map +1 -0
- package/dist/pregel/remote.d.ts +79 -69
- package/dist/pregel/remote.d.ts.map +1 -0
- package/dist/pregel/remote.js +337 -453
- package/dist/pregel/remote.js.map +1 -1
- package/dist/pregel/retry.cjs +87 -138
- package/dist/pregel/retry.cjs.map +1 -0
- package/dist/pregel/retry.js +83 -130
- package/dist/pregel/retry.js.map +1 -1
- package/dist/pregel/runnable_types.d.cts +49 -0
- package/dist/pregel/runnable_types.d.cts.map +1 -0
- package/dist/pregel/runnable_types.d.ts +47 -17
- package/dist/pregel/runnable_types.d.ts.map +1 -0
- package/dist/pregel/runner.cjs +222 -315
- package/dist/pregel/runner.cjs.map +1 -0
- package/dist/pregel/runner.js +219 -308
- package/dist/pregel/runner.js.map +1 -1
- package/dist/pregel/stream.cjs +89 -130
- package/dist/pregel/stream.cjs.map +1 -0
- package/dist/pregel/stream.js +87 -125
- package/dist/pregel/stream.js.map +1 -1
- package/dist/pregel/types.cjs +25 -62
- package/dist/pregel/types.cjs.map +1 -0
- package/dist/pregel/types.d.cts +440 -0
- package/dist/pregel/types.d.cts.map +1 -0
- package/dist/pregel/types.d.ts +381 -432
- package/dist/pregel/types.d.ts.map +1 -0
- package/dist/pregel/types.js +23 -57
- package/dist/pregel/types.js.map +1 -1
- package/dist/pregel/utils/config.cjs +101 -147
- package/dist/pregel/utils/config.cjs.map +1 -0
- package/dist/pregel/utils/config.d.cts +36 -0
- package/dist/pregel/utils/config.d.cts.map +1 -0
- package/dist/pregel/utils/config.d.ts +12 -9
- package/dist/pregel/utils/config.d.ts.map +1 -0
- package/dist/pregel/utils/config.js +99 -143
- package/dist/pregel/utils/config.js.map +1 -1
- package/dist/pregel/utils/index.cjs +87 -125
- package/dist/pregel/utils/index.cjs.map +1 -0
- package/dist/pregel/utils/index.d.cts +51 -0
- package/dist/pregel/utils/index.d.cts.map +1 -0
- package/dist/pregel/utils/index.d.ts +45 -61
- package/dist/pregel/utils/index.d.ts.map +1 -0
- package/dist/pregel/utils/index.js +86 -120
- package/dist/pregel/utils/index.js.map +1 -1
- package/dist/pregel/utils/subgraph.cjs +15 -26
- package/dist/pregel/utils/subgraph.cjs.map +1 -0
- package/dist/pregel/utils/subgraph.js +12 -21
- package/dist/pregel/utils/subgraph.js.map +1 -1
- package/dist/pregel/validate.cjs +42 -92
- package/dist/pregel/validate.cjs.map +1 -0
- package/dist/pregel/validate.js +39 -84
- package/dist/pregel/validate.js.map +1 -1
- package/dist/pregel/write.cjs +87 -137
- package/dist/pregel/write.cjs.map +1 -0
- package/dist/pregel/write.d.cts +35 -0
- package/dist/pregel/write.d.cts.map +1 -0
- package/dist/pregel/write.d.ts +27 -23
- package/dist/pregel/write.d.ts.map +1 -0
- package/dist/pregel/write.js +83 -131
- package/dist/pregel/write.js.map +1 -1
- package/dist/remote.cjs +3 -6
- package/dist/remote.d.cts +2 -0
- package/dist/remote.d.ts +2 -1
- package/dist/remote.js +3 -2
- package/dist/setup/async_local_storage.cjs +10 -7
- package/dist/setup/async_local_storage.cjs.map +1 -0
- package/dist/setup/async_local_storage.js +7 -2
- package/dist/setup/async_local_storage.js.map +1 -1
- package/dist/ui/index.cjs +4 -0
- package/dist/ui/index.d.cts +5 -0
- package/dist/ui/index.d.ts +5 -0
- package/dist/ui/index.js +3 -0
- package/dist/ui/stream.cjs +145 -0
- package/dist/ui/stream.cjs.map +1 -0
- package/dist/ui/stream.d.cts +25 -0
- package/dist/ui/stream.d.cts.map +1 -0
- package/dist/ui/stream.d.ts +25 -0
- package/dist/ui/stream.d.ts.map +1 -0
- package/dist/ui/stream.js +143 -0
- package/dist/ui/stream.js.map +1 -0
- package/dist/ui/types.infer.d.cts +53 -0
- package/dist/ui/types.infer.d.cts.map +1 -0
- package/dist/ui/types.infer.d.ts +53 -0
- package/dist/ui/types.infer.d.ts.map +1 -0
- package/dist/ui/types.message.d.cts +95 -0
- package/dist/ui/types.message.d.cts.map +1 -0
- package/dist/ui/types.message.d.ts +95 -0
- package/dist/ui/types.message.d.ts.map +1 -0
- package/dist/ui/types.schema.d.cts +228 -0
- package/dist/ui/types.schema.d.cts.map +1 -0
- package/dist/ui/types.schema.d.ts +228 -0
- package/dist/ui/types.schema.d.ts.map +1 -0
- package/dist/utils.cjs +77 -147
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +32 -0
- package/dist/utils.d.cts.map +1 -0
- package/dist/utils.d.ts +29 -25
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +73 -140
- package/dist/utils.js.map +1 -1
- package/dist/web.cjs +96 -55
- package/dist/web.d.cts +23 -0
- package/dist/web.d.ts +23 -14
- package/dist/web.js +15 -8
- package/dist/writer.cjs +15 -0
- package/dist/writer.cjs.map +1 -0
- package/dist/writer.d.cts +5 -0
- package/dist/writer.d.cts.map +1 -0
- package/dist/writer.d.ts +5 -0
- package/dist/writer.d.ts.map +1 -0
- package/dist/writer.js +14 -0
- package/dist/writer.js.map +1 -0
- package/package.json +90 -83
- package/dist/channels/index.js.map +0 -1
- package/dist/func/types.cjs +0 -15
- package/dist/func/types.js +0 -12
- package/dist/func/types.js.map +0 -1
- package/dist/graph/index.d.ts +0 -4
- package/dist/graph/index.js.map +0 -1
- package/dist/graph/message.test.cjs +0 -196
- package/dist/graph/message.test.d.ts +0 -1
- package/dist/graph/message.test.js +0 -194
- package/dist/graph/message.test.js.map +0 -1
- package/dist/graph/zod/index.js.map +0 -1
- package/dist/graph/zod/plugin.d.ts +0 -28
- package/dist/hash.d.ts +0 -2
- package/dist/prebuilt/index.js.map +0 -1
- package/dist/prebuilt/interrupt.cjs +0 -3
- package/dist/prebuilt/interrupt.js +0 -2
- package/dist/prebuilt/interrupt.js.map +0 -1
- package/dist/pregel/call.d.ts +0 -16
- package/dist/pregel/debug.d.ts +0 -41
- package/dist/pregel/debug.test.cjs +0 -258
- package/dist/pregel/debug.test.d.ts +0 -1
- package/dist/pregel/debug.test.js +0 -256
- package/dist/pregel/debug.test.js.map +0 -1
- package/dist/pregel/io.d.ts +0 -30
- package/dist/pregel/io.mapCommand.test.cjs +0 -150
- package/dist/pregel/io.mapCommand.test.d.ts +0 -1
- package/dist/pregel/io.mapCommand.test.js +0 -148
- package/dist/pregel/io.mapCommand.test.js.map +0 -1
- package/dist/pregel/loop.d.ts +0 -147
- package/dist/pregel/messages.d.ts +0 -30
- package/dist/pregel/messages.test.cjs +0 -369
- package/dist/pregel/messages.test.d.ts +0 -1
- package/dist/pregel/messages.test.js +0 -367
- package/dist/pregel/messages.test.js.map +0 -1
- package/dist/pregel/read.test.cjs +0 -194
- package/dist/pregel/read.test.d.ts +0 -1
- package/dist/pregel/read.test.js +0 -192
- package/dist/pregel/read.test.js.map +0 -1
- package/dist/pregel/retry.d.ts +0 -17
- package/dist/pregel/runnable_types.cjs +0 -3
- package/dist/pregel/runnable_types.js +0 -2
- package/dist/pregel/runnable_types.js.map +0 -1
- package/dist/pregel/runner.d.ts +0 -79
- package/dist/pregel/runner.test.cjs +0 -66
- package/dist/pregel/runner.test.d.ts +0 -1
- package/dist/pregel/runner.test.js +0 -64
- package/dist/pregel/runner.test.js.map +0 -1
- package/dist/pregel/stream.d.ts +0 -40
- package/dist/pregel/utils/config.test.cjs +0 -214
- package/dist/pregel/utils/config.test.d.ts +0 -1
- package/dist/pregel/utils/config.test.js +0 -212
- package/dist/pregel/utils/config.test.js.map +0 -1
- package/dist/pregel/utils/subgraph.d.ts +0 -4
- package/dist/pregel/utils/subgraph.test.cjs +0 -83
- package/dist/pregel/utils/subgraph.test.d.ts +0 -1
- package/dist/pregel/utils/subgraph.test.js +0 -81
- package/dist/pregel/utils/subgraph.test.js.map +0 -1
- package/dist/pregel/validate.d.ts +0 -16
- package/dist/pregel/validate.test.cjs +0 -220
- package/dist/pregel/validate.test.d.ts +0 -1
- package/dist/pregel/validate.test.js +0 -218
- package/dist/pregel/validate.test.js.map +0 -1
- package/dist/pregel/write.test.cjs +0 -181
- package/dist/pregel/write.test.d.ts +0 -1
- package/dist/pregel/write.test.js +0 -179
- package/dist/pregel/write.test.js.map +0 -1
- package/dist/remote.js.map +0 -1
- package/dist/setup/async_local_storage.d.ts +0 -1
- package/dist/web.js.map +0 -1
- package/index.cjs +0 -1
- package/index.d.cts +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/prebuilt.cjs +0 -1
- package/prebuilt.d.cts +0 -1
- package/prebuilt.d.ts +0 -1
- package/prebuilt.js +0 -1
- package/pregel.cjs +0 -1
- package/pregel.d.cts +0 -1
- package/pregel.d.ts +0 -1
- package/pregel.js +0 -1
- package/remote.cjs +0 -1
- package/remote.d.cts +0 -1
- package/remote.d.ts +0 -1
- package/remote.js +0 -1
- package/web.cjs +0 -1
- package/web.d.cts +0 -1
- package/web.d.ts +0 -1
- package/web.js +0 -1
- package/zod/schema.cjs +0 -1
- package/zod/schema.d.cts +0 -1
- package/zod/schema.d.ts +0 -1
- package/zod/schema.js +0 -1
- package/zod.cjs +0 -1
- package/zod.d.cts +0 -1
- package/zod.d.ts +0 -1
- package/zod.js +0 -1
package/dist/constants.d.ts
CHANGED
|
@@ -1,55 +1,16 @@
|
|
|
1
1
|
import { PendingWrite } from "@langchain/langgraph-checkpoint";
|
|
2
|
+
|
|
3
|
+
//#region src/constants.d.ts
|
|
2
4
|
/** Special reserved node name denoting the start of a graph. */
|
|
3
|
-
|
|
5
|
+
declare const START = "__start__";
|
|
4
6
|
/** Special reserved node name denoting the end of a graph. */
|
|
5
|
-
|
|
6
|
-
export declare const INPUT = "__input__";
|
|
7
|
-
export declare const COPY = "__copy__";
|
|
8
|
-
export declare const ERROR = "__error__";
|
|
9
|
-
/** Special reserved cache namespaces */
|
|
10
|
-
export declare const CACHE_NS_WRITES = "__pregel_ns_writes";
|
|
11
|
-
export declare const CONFIG_KEY_SEND = "__pregel_send";
|
|
12
|
-
/** config key containing function used to call a node (push task) */
|
|
13
|
-
export declare const CONFIG_KEY_CALL = "__pregel_call";
|
|
14
|
-
export declare const CONFIG_KEY_READ = "__pregel_read";
|
|
15
|
-
export declare const CONFIG_KEY_CHECKPOINTER = "__pregel_checkpointer";
|
|
16
|
-
export declare const CONFIG_KEY_RESUMING = "__pregel_resuming";
|
|
17
|
-
export declare const CONFIG_KEY_TASK_ID = "__pregel_task_id";
|
|
18
|
-
export declare const CONFIG_KEY_STREAM = "__pregel_stream";
|
|
19
|
-
export declare const CONFIG_KEY_RESUME_VALUE = "__pregel_resume_value";
|
|
20
|
-
export declare const CONFIG_KEY_RESUME_MAP = "__pregel_resume_map";
|
|
21
|
-
export declare const CONFIG_KEY_SCRATCHPAD = "__pregel_scratchpad";
|
|
22
|
-
/** config key containing state from previous invocation of graph for the given thread */
|
|
23
|
-
export declare const CONFIG_KEY_PREVIOUS_STATE = "__pregel_previous";
|
|
24
|
-
export declare const CONFIG_KEY_DURABILITY = "__pregel_durability";
|
|
25
|
-
export declare const CONFIG_KEY_CHECKPOINT_ID = "checkpoint_id";
|
|
26
|
-
export declare const CONFIG_KEY_CHECKPOINT_NS = "checkpoint_ns";
|
|
27
|
-
export declare const CONFIG_KEY_NODE_FINISHED = "__pregel_node_finished";
|
|
28
|
-
export declare const CONFIG_KEY_CHECKPOINT_MAP = "checkpoint_map";
|
|
29
|
-
export declare const CONFIG_KEY_ABORT_SIGNALS = "__pregel_abort_signals";
|
|
7
|
+
declare const END = "__end__";
|
|
30
8
|
/** Special channel reserved for graph interrupts */
|
|
31
|
-
|
|
9
|
+
declare const INTERRUPT = "__interrupt__";
|
|
32
10
|
/** Special channel reserved for graph resume */
|
|
33
|
-
|
|
34
|
-
/** Special channel reserved for cases when a task exits without any writes */
|
|
35
|
-
export declare const NO_WRITES = "__no_writes__";
|
|
36
|
-
/** Special channel reserved for graph return */
|
|
37
|
-
export declare const RETURN = "__return__";
|
|
11
|
+
|
|
38
12
|
/** Special channel reserved for graph previous state */
|
|
39
|
-
|
|
40
|
-
export declare const RUNTIME_PLACEHOLDER = "__pregel_runtime_placeholder__";
|
|
41
|
-
export declare const RECURSION_LIMIT_DEFAULT = 25;
|
|
42
|
-
export declare const TAG_HIDDEN = "langsmith:hidden";
|
|
43
|
-
export declare const TAG_NOSTREAM = "langsmith:nostream";
|
|
44
|
-
export declare const SELF = "__self__";
|
|
45
|
-
export declare const TASKS = "__pregel_tasks";
|
|
46
|
-
export declare const PUSH = "__pregel_push";
|
|
47
|
-
export declare const PULL = "__pregel_pull";
|
|
48
|
-
export declare const TASK_NAMESPACE = "6ba7b831-9dad-11d1-80b4-00c04fd430c8";
|
|
49
|
-
export declare const NULL_TASK_ID = "00000000-0000-0000-0000-000000000000";
|
|
50
|
-
export declare const RESERVED: string[];
|
|
51
|
-
export declare const CHECKPOINT_NAMESPACE_SEPARATOR = "|";
|
|
52
|
-
export declare const CHECKPOINT_NAMESPACE_END = ":";
|
|
13
|
+
declare const PREVIOUS = "__previous__";
|
|
53
14
|
/** @internal */
|
|
54
15
|
declare const COMMAND_SYMBOL: unique symbol;
|
|
55
16
|
/**
|
|
@@ -61,14 +22,15 @@ declare const COMMAND_SYMBOL: unique symbol;
|
|
|
61
22
|
* @see {@link Command}
|
|
62
23
|
* @internal
|
|
63
24
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
25
|
+
declare class CommandInstance<Resume = unknown, Update extends Record<string, unknown> = Record<string, unknown>, Nodes extends string = string> {
|
|
26
|
+
[COMMAND_SYMBOL]: CommandParams<Resume, Update, Nodes>;
|
|
27
|
+
constructor(args: CommandParams<Resume, Update, Nodes>);
|
|
66
28
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
+
interface SendInterface<Node extends string = string, Args = any> {
|
|
31
|
+
node: Node;
|
|
32
|
+
args: Args;
|
|
70
33
|
}
|
|
71
|
-
export declare function _isSendInterface(x: unknown): x is SendInterface;
|
|
72
34
|
/**
|
|
73
35
|
*
|
|
74
36
|
* A message or packet to send to a specific node in the graph.
|
|
@@ -115,21 +77,22 @@ export declare function _isSendInterface(x: unknown): x is SendInterface;
|
|
|
115
77
|
* // { subjects: ["cats", "dogs"], jokes: [`Joke about cats`, `Joke about dogs`] }
|
|
116
78
|
* ```
|
|
117
79
|
*/
|
|
118
|
-
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
+
declare class Send<Node extends string = string, Args = any> implements SendInterface<Node, Args> {
|
|
82
|
+
lg_name: string;
|
|
83
|
+
node: Node;
|
|
84
|
+
args: Args;
|
|
85
|
+
constructor(node: Node, args: Args);
|
|
86
|
+
toJSON(): {
|
|
119
87
|
lg_name: string;
|
|
120
88
|
node: Node;
|
|
121
89
|
args: Args;
|
|
122
|
-
|
|
123
|
-
toJSON(): {
|
|
124
|
-
lg_name: string;
|
|
125
|
-
node: Node;
|
|
126
|
-
args: Args;
|
|
127
|
-
};
|
|
90
|
+
};
|
|
128
91
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
93
|
+
type Interrupt<Value = any> = {
|
|
94
|
+
id?: string;
|
|
95
|
+
value?: Value;
|
|
133
96
|
};
|
|
134
97
|
/**
|
|
135
98
|
* Checks if the given graph invoke / stream chunk contains interrupt.
|
|
@@ -147,40 +110,41 @@ export type Interrupt<Value = any> = {
|
|
|
147
110
|
* @param values - The values to check.
|
|
148
111
|
* @returns `true` if the values contain an interrupt, `false` otherwise.
|
|
149
112
|
*/
|
|
150
|
-
|
|
151
|
-
|
|
113
|
+
declare function isInterrupted<Value = unknown>(values: unknown): values is {
|
|
114
|
+
[INTERRUPT]: Interrupt<Value>[];
|
|
152
115
|
};
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
116
|
+
type CommandParams<Resume = unknown, Update extends Record<string, unknown> = Record<string, unknown>, Nodes extends string = string> = {
|
|
117
|
+
/**
|
|
118
|
+
* A discriminator field used to identify the type of object. Must be populated when serializing.
|
|
119
|
+
*
|
|
120
|
+
* Optional because it's not required to specify this when directly constructing a {@link Command}
|
|
121
|
+
* object.
|
|
122
|
+
*/
|
|
123
|
+
lg_name?: "Command";
|
|
124
|
+
/**
|
|
125
|
+
* Value to resume execution with. To be used together with {@link interrupt}.
|
|
126
|
+
*/
|
|
127
|
+
resume?: Resume;
|
|
128
|
+
/**
|
|
129
|
+
* Graph to send the command to. Supported values are:
|
|
130
|
+
* - None: the current graph (default)
|
|
131
|
+
* - The specific name of the graph to send the command to
|
|
132
|
+
* - {@link Command.PARENT}: closest parent graph (only supported when returned from a node in a subgraph)
|
|
133
|
+
*/
|
|
134
|
+
graph?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Update to apply to the graph's state.
|
|
137
|
+
*/
|
|
138
|
+
update?: Update | [string, unknown][];
|
|
139
|
+
/**
|
|
140
|
+
* Can be one of the following:
|
|
141
|
+
* - name of the node to navigate to next (any node that belongs to the specified `graph`)
|
|
142
|
+
* - sequence of node names to navigate to next
|
|
143
|
+
* - `Send` object (to execute a node with the input provided)
|
|
144
|
+
* - sequence of `Send` objects
|
|
145
|
+
*/
|
|
146
|
+
goto?: Nodes | SendInterface<Nodes> // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
147
|
+
| (Nodes | SendInterface<Nodes>)[]; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
184
148
|
};
|
|
185
149
|
/**
|
|
186
150
|
* One or more commands to update the graph's state and send messages to nodes.
|
|
@@ -244,55 +208,55 @@ export type CommandParams<Resume = unknown, Update extends Record<string, unknow
|
|
|
244
208
|
* // { foo: 'a|c' } and { foo: 'a|b' }
|
|
245
209
|
* ```
|
|
246
210
|
*/
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
211
|
+
declare class Command<Resume = unknown, Update extends Record<string, unknown> = Record<string, unknown>, Nodes extends string = string> extends CommandInstance<Resume, Update, Nodes> {
|
|
212
|
+
readonly lg_name: string;
|
|
213
|
+
lc_direct_tool_output: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Graph to send the command to. Supported values are:
|
|
216
|
+
* - None: the current graph (default)
|
|
217
|
+
* - The specific name of the graph to send the command to
|
|
218
|
+
* - {@link Command.PARENT}: closest parent graph (only supported when returned from a node in a subgraph)
|
|
219
|
+
*/
|
|
220
|
+
graph?: string;
|
|
221
|
+
/**
|
|
222
|
+
* Update to apply to the graph's state as a result of executing the node that is returning the command.
|
|
223
|
+
* Written to the state as if the node had simply returned this value instead of the Command object.
|
|
224
|
+
*/
|
|
225
|
+
update?: Update | [string, unknown][];
|
|
226
|
+
/**
|
|
227
|
+
* Value to resume execution with. To be used together with {@link interrupt}.
|
|
228
|
+
*/
|
|
229
|
+
resume?: Resume;
|
|
230
|
+
/**
|
|
231
|
+
* Can be one of the following:
|
|
232
|
+
* - name of the node to navigate to next (any node that belongs to the specified `graph`)
|
|
233
|
+
* - sequence of node names to navigate to next
|
|
234
|
+
* - {@link Send} object (to execute a node with the exact input provided in the {@link Send} object)
|
|
235
|
+
* - sequence of {@link Send} objects
|
|
236
|
+
*/
|
|
237
|
+
goto?: Nodes | Send<Nodes> | (Nodes | Send<Nodes>)[];
|
|
238
|
+
static PARENT: string;
|
|
239
|
+
constructor(args: Omit<CommandParams<Resume, Update, Nodes>, "lg_name">);
|
|
240
|
+
/**
|
|
241
|
+
* Convert the update field to a list of {@link PendingWrite} tuples
|
|
242
|
+
* @returns List of {@link PendingWrite} tuples of the form `[channelKey, value]`.
|
|
243
|
+
* @internal
|
|
244
|
+
*/
|
|
245
|
+
_updateAsTuples(): PendingWrite[];
|
|
246
|
+
toJSON(): {
|
|
247
|
+
lg_name: string;
|
|
248
|
+
update: Update | [string, unknown][] | undefined;
|
|
249
|
+
resume: Resume | undefined;
|
|
250
|
+
goto: Nodes | (Nodes | {
|
|
251
|
+
lg_name: string;
|
|
252
|
+
node: Nodes;
|
|
253
|
+
args: any;
|
|
254
|
+
})[] | {
|
|
255
|
+
lg_name: string;
|
|
256
|
+
node: Nodes;
|
|
257
|
+
args: any;
|
|
258
|
+
} | undefined;
|
|
259
|
+
};
|
|
296
260
|
}
|
|
297
261
|
/**
|
|
298
262
|
* A type guard to check if the given value is a {@link Command}.
|
|
@@ -302,7 +266,7 @@ export declare class Command<Resume = unknown, Update extends Record<string, unk
|
|
|
302
266
|
* @param x - The value to check.
|
|
303
267
|
* @returns `true` if the value is a {@link Command}, `false` otherwise.
|
|
304
268
|
*/
|
|
305
|
-
|
|
269
|
+
declare function isCommand(x: unknown): x is Command;
|
|
306
270
|
/**
|
|
307
271
|
* Reconstructs Command and Send objects from a deeply nested tree of anonymous objects
|
|
308
272
|
* matching their interfaces.
|
|
@@ -316,5 +280,6 @@ export declare function isCommand(x: unknown): x is Command;
|
|
|
316
280
|
* @param seen - A map of seen objects to avoid infinite loops.
|
|
317
281
|
* @returns The converted command send tree.
|
|
318
282
|
*/
|
|
319
|
-
|
|
320
|
-
export {};
|
|
283
|
+
//#endregion
|
|
284
|
+
export { Command, CommandInstance, CommandParams, END, INTERRUPT, Interrupt, PREVIOUS, START, Send, isCommand, isInterrupted };
|
|
285
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","names":["PendingWrite","START","END","INPUT","COPY","ERROR","CACHE_NS_WRITES","CONFIG_KEY_SEND","CONFIG_KEY_CALL","CONFIG_KEY_READ","CONFIG_KEY_CHECKPOINTER","CONFIG_KEY_RESUMING","CONFIG_KEY_TASK_ID","CONFIG_KEY_STREAM","CONFIG_KEY_RESUME_VALUE","CONFIG_KEY_RESUME_MAP","CONFIG_KEY_SCRATCHPAD","CONFIG_KEY_PREVIOUS_STATE","CONFIG_KEY_DURABILITY","CONFIG_KEY_CHECKPOINT_ID","CONFIG_KEY_CHECKPOINT_NS","CONFIG_KEY_NODE_FINISHED","CONFIG_KEY_CHECKPOINT_MAP","CONFIG_KEY_ABORT_SIGNALS","INTERRUPT","RESUME","NO_WRITES","RETURN","PREVIOUS","RUNTIME_PLACEHOLDER","RECURSION_LIMIT_DEFAULT","TAG_HIDDEN","TAG_NOSTREAM","SELF","TASKS","PUSH","PULL","TASK_NAMESPACE","NULL_TASK_ID","RESERVED","CHECKPOINT_NAMESPACE_SEPARATOR","CHECKPOINT_NAMESPACE_END","COMMAND_SYMBOL","CommandInstance","Record","Resume","Update","Nodes","CommandParams","SendInterface","Node","Args","_isSendInterface","Send","_isSend","Interrupt","Value","isInterrupted","Command","Omit","isCommand","_deserializeCommandSendObjectGraph","Map"],"sources":["../src/constants.d.ts"],"sourcesContent":["import { PendingWrite } from \"@langchain/langgraph-checkpoint\";\n/** Special reserved node name denoting the start of a graph. */\nexport declare const START = \"__start__\";\n/** Special reserved node name denoting the end of a graph. */\nexport declare const END = \"__end__\";\nexport declare const INPUT = \"__input__\";\nexport declare const COPY = \"__copy__\";\nexport declare const ERROR = \"__error__\";\n/** Special reserved cache namespaces */\nexport declare const CACHE_NS_WRITES = \"__pregel_ns_writes\";\nexport declare const CONFIG_KEY_SEND = \"__pregel_send\";\n/** config key containing function used to call a node (push task) */\nexport declare const CONFIG_KEY_CALL = \"__pregel_call\";\nexport declare const CONFIG_KEY_READ = \"__pregel_read\";\nexport declare const CONFIG_KEY_CHECKPOINTER = \"__pregel_checkpointer\";\nexport declare const CONFIG_KEY_RESUMING = \"__pregel_resuming\";\nexport declare const CONFIG_KEY_TASK_ID = \"__pregel_task_id\";\nexport declare const CONFIG_KEY_STREAM = \"__pregel_stream\";\nexport declare const CONFIG_KEY_RESUME_VALUE = \"__pregel_resume_value\";\nexport declare const CONFIG_KEY_RESUME_MAP = \"__pregel_resume_map\";\nexport declare const CONFIG_KEY_SCRATCHPAD = \"__pregel_scratchpad\";\n/** config key containing state from previous invocation of graph for the given thread */\nexport declare const CONFIG_KEY_PREVIOUS_STATE = \"__pregel_previous\";\nexport declare const CONFIG_KEY_DURABILITY = \"__pregel_durability\";\nexport declare const CONFIG_KEY_CHECKPOINT_ID = \"checkpoint_id\";\nexport declare const CONFIG_KEY_CHECKPOINT_NS = \"checkpoint_ns\";\nexport declare const CONFIG_KEY_NODE_FINISHED = \"__pregel_node_finished\";\n// this one is part of public API\nexport declare const CONFIG_KEY_CHECKPOINT_MAP = \"checkpoint_map\";\nexport declare const CONFIG_KEY_ABORT_SIGNALS = \"__pregel_abort_signals\";\n/** Special channel reserved for graph interrupts */\nexport declare const INTERRUPT = \"__interrupt__\";\n/** Special channel reserved for graph resume */\nexport declare const RESUME = \"__resume__\";\n/** Special channel reserved for cases when a task exits without any writes */\nexport declare const NO_WRITES = \"__no_writes__\";\n/** Special channel reserved for graph return */\nexport declare const RETURN = \"__return__\";\n/** Special channel reserved for graph previous state */\nexport declare const PREVIOUS = \"__previous__\";\nexport declare const RUNTIME_PLACEHOLDER = \"__pregel_runtime_placeholder__\";\nexport declare const RECURSION_LIMIT_DEFAULT = 25;\nexport declare const TAG_HIDDEN = \"langsmith:hidden\";\nexport declare const TAG_NOSTREAM = \"langsmith:nostream\";\nexport declare const SELF = \"__self__\";\nexport declare const TASKS = \"__pregel_tasks\";\nexport declare const PUSH = \"__pregel_push\";\nexport declare const PULL = \"__pregel_pull\";\nexport declare const TASK_NAMESPACE = \"6ba7b831-9dad-11d1-80b4-00c04fd430c8\";\nexport declare const NULL_TASK_ID = \"00000000-0000-0000-0000-000000000000\";\nexport declare const RESERVED: string[];\nexport declare const CHECKPOINT_NAMESPACE_SEPARATOR = \"|\";\nexport declare const CHECKPOINT_NAMESPACE_END = \":\";\n/** @internal */\ndeclare const COMMAND_SYMBOL: unique symbol;\n/**\n * Instance of a {@link Command} class.\n *\n * This is used to avoid IntelliSense suggesting public fields\n * of {@link Command} class when a plain object is expected.\n *\n * @see {@link Command}\n * @internal\n */\nexport declare class CommandInstance<Resume = unknown, Update extends Record<string, unknown> = Record<string, unknown>, Nodes extends string = string> {\n [COMMAND_SYMBOL]: CommandParams<Resume, Update, Nodes>;\n constructor(args: CommandParams<Resume, Update, Nodes>);\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface SendInterface<Node extends string = string, Args = any> {\n node: Node;\n args: Args;\n}\nexport declare function _isSendInterface(x: unknown): x is SendInterface;\n/**\n *\n * A message or packet to send to a specific node in the graph.\n *\n * The `Send` class is used within a `StateGraph`'s conditional edges to\n * dynamically invoke a node with a custom state at the next step.\n *\n * Importantly, the sent state can differ from the core graph's state,\n * allowing for flexible and dynamic workflow management.\n *\n * One such example is a \"map-reduce\" workflow where your graph invokes\n * the same node multiple times in parallel with different states,\n * before aggregating the results back into the main graph's state.\n *\n * @example\n * ```typescript\n * import { Annotation, Send, StateGraph } from \"@langchain/langgraph\";\n *\n * const ChainState = Annotation.Root({\n * subjects: Annotation<string[]>,\n * jokes: Annotation<string[]>({\n * reducer: (a, b) => a.concat(b),\n * }),\n * });\n *\n * const continueToJokes = async (state: typeof ChainState.State) => {\n * return state.subjects.map((subject) => {\n * return new Send(\"generate_joke\", { subjects: [subject] });\n * });\n * };\n *\n * const graph = new StateGraph(ChainState)\n * .addNode(\"generate_joke\", (state) => ({\n * jokes: [`Joke about ${state.subjects}`],\n * }))\n * .addConditionalEdges(\"__start__\", continueToJokes)\n * .addEdge(\"generate_joke\", \"__end__\")\n * .compile();\n *\n * const res = await graph.invoke({ subjects: [\"cats\", \"dogs\"] });\n * console.log(res);\n *\n * // Invoking with two subjects results in a generated joke for each\n * // { subjects: [\"cats\", \"dogs\"], jokes: [`Joke about cats`, `Joke about dogs`] }\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport declare class Send<Node extends string = string, Args = any> implements SendInterface<Node, Args> {\n lg_name: string;\n node: Node;\n args: Args;\n constructor(node: Node, args: Args);\n toJSON(): {\n lg_name: string;\n node: Node;\n args: Args;\n };\n}\nexport declare function _isSend(x: unknown): x is Send;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type Interrupt<Value = any> = {\n id?: string;\n value?: Value;\n};\n/**\n * Checks if the given graph invoke / stream chunk contains interrupt.\n *\n * @example\n * ```ts\n * import { INTERRUPT, isInterrupted } from \"@langchain/langgraph\";\n *\n * const values = await graph.invoke({ foo: \"bar\" });\n * if (isInterrupted<string>(values)) {\n * const interrupt = values[INTERRUPT][0].value;\n * }\n * ```\n *\n * @param values - The values to check.\n * @returns `true` if the values contain an interrupt, `false` otherwise.\n */\nexport declare function isInterrupted<Value = unknown>(values: unknown): values is {\n [INTERRUPT]: Interrupt<Value>[];\n};\nexport type CommandParams<Resume = unknown, Update extends Record<string, unknown> = Record<string, unknown>, Nodes extends string = string> = {\n /**\n * A discriminator field used to identify the type of object. Must be populated when serializing.\n *\n * Optional because it's not required to specify this when directly constructing a {@link Command}\n * object.\n */\n lg_name?: \"Command\";\n /**\n * Value to resume execution with. To be used together with {@link interrupt}.\n */\n resume?: Resume;\n /**\n * Graph to send the command to. Supported values are:\n * - None: the current graph (default)\n * - The specific name of the graph to send the command to\n * - {@link Command.PARENT}: closest parent graph (only supported when returned from a node in a subgraph)\n */\n graph?: string;\n /**\n * Update to apply to the graph's state.\n */\n update?: Update | [string, unknown][];\n /**\n * Can be one of the following:\n * - name of the node to navigate to next (any node that belongs to the specified `graph`)\n * - sequence of node names to navigate to next\n * - `Send` object (to execute a node with the input provided)\n * - sequence of `Send` objects\n */\n goto?: Nodes | SendInterface<Nodes> // eslint-disable-line @typescript-eslint/no-explicit-any\n | (Nodes | SendInterface<Nodes>)[]; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n/**\n * One or more commands to update the graph's state and send messages to nodes.\n * Can be used to combine routing logic with state updates in lieu of conditional edges\n *\n * @example\n * ```ts\n * import { Annotation, Command } from \"@langchain/langgraph\";\n *\n * // Define graph state\n * const StateAnnotation = Annotation.Root({\n * foo: Annotation<string>,\n * });\n *\n * // Define the nodes\n * const nodeA = async (_state: typeof StateAnnotation.State) => {\n * console.log(\"Called A\");\n * // this is a replacement for a real conditional edge function\n * const goto = Math.random() > .5 ? \"nodeB\" : \"nodeC\";\n * // note how Command allows you to BOTH update the graph state AND route to the next node\n * return new Command({\n * // this is the state update\n * update: {\n * foo: \"a\",\n * },\n * // this is a replacement for an edge\n * goto,\n * });\n * };\n *\n * // Nodes B and C are unchanged\n * const nodeB = async (state: typeof StateAnnotation.State) => {\n * console.log(\"Called B\");\n * return {\n * foo: state.foo + \"|b\",\n * };\n * }\n *\n * const nodeC = async (state: typeof StateAnnotation.State) => {\n * console.log(\"Called C\");\n * return {\n * foo: state.foo + \"|c\",\n * };\n * }\n *\n * import { StateGraph } from \"@langchain/langgraph\";\n\n * // NOTE: there are no edges between nodes A, B and C!\n * const graph = new StateGraph(StateAnnotation)\n * .addNode(\"nodeA\", nodeA, {\n * ends: [\"nodeB\", \"nodeC\"],\n * })\n * .addNode(\"nodeB\", nodeB)\n * .addNode(\"nodeC\", nodeC)\n * .addEdge(\"__start__\", \"nodeA\")\n * .compile();\n *\n * await graph.invoke({ foo: \"\" });\n *\n * // Randomly oscillates between\n * // { foo: 'a|c' } and { foo: 'a|b' }\n * ```\n */\nexport declare class Command<Resume = unknown, Update extends Record<string, unknown> = Record<string, unknown>, Nodes extends string = string> extends CommandInstance<Resume, Update, Nodes> {\n readonly lg_name: string;\n lc_direct_tool_output: boolean;\n /**\n * Graph to send the command to. Supported values are:\n * - None: the current graph (default)\n * - The specific name of the graph to send the command to\n * - {@link Command.PARENT}: closest parent graph (only supported when returned from a node in a subgraph)\n */\n graph?: string;\n /**\n * Update to apply to the graph's state as a result of executing the node that is returning the command.\n * Written to the state as if the node had simply returned this value instead of the Command object.\n */\n update?: Update | [string, unknown][];\n /**\n * Value to resume execution with. To be used together with {@link interrupt}.\n */\n resume?: Resume;\n /**\n * Can be one of the following:\n * - name of the node to navigate to next (any node that belongs to the specified `graph`)\n * - sequence of node names to navigate to next\n * - {@link Send} object (to execute a node with the exact input provided in the {@link Send} object)\n * - sequence of {@link Send} objects\n */\n goto?: Nodes | Send<Nodes> | (Nodes | Send<Nodes>)[];\n static PARENT: string;\n constructor(args: Omit<CommandParams<Resume, Update, Nodes>, \"lg_name\">);\n /**\n * Convert the update field to a list of {@link PendingWrite} tuples\n * @returns List of {@link PendingWrite} tuples of the form `[channelKey, value]`.\n * @internal\n */\n _updateAsTuples(): PendingWrite[];\n toJSON(): {\n lg_name: string;\n update: Update | [string, unknown][] | undefined;\n resume: Resume | undefined;\n goto: Nodes | (Nodes | {\n lg_name: string;\n node: Nodes;\n args: any;\n })[] | {\n lg_name: string;\n node: Nodes;\n args: any;\n } | undefined;\n };\n}\n/**\n * A type guard to check if the given value is a {@link Command}.\n *\n * Useful for type narrowing when working with the {@link Command} object.\n *\n * @param x - The value to check.\n * @returns `true` if the value is a {@link Command}, `false` otherwise.\n */\nexport declare function isCommand(x: unknown): x is Command;\n/**\n * Reconstructs Command and Send objects from a deeply nested tree of anonymous objects\n * matching their interfaces.\n *\n * This is only exported for testing purposes. It is NOT intended to be used outside of\n * the Command and Send classes.\n *\n * @internal\n *\n * @param x - The command send tree to convert.\n * @param seen - A map of seen objects to avoid infinite loops.\n * @returns The converted command send tree.\n */\nexport declare function _deserializeCommandSendObjectGraph(x: unknown, seen?: Map<object, unknown>): unknown;\nexport {};\n"],"mappings":";;;;cAEqBC,KAAAA;AAArB;AAEqBC,cAAAA,GAAAA,GAAG,SAAA;;AAuHdgD,cA5FW1B,SAAAA,GA4FX0B,eAAAA;;;;AAWEK,cA/FS3B,QAAAA,GAiGT4B,cAAAA;;cAlFEd,cAqIKO,EAAAA,OAAAA,MAAAA;;;;;AAiEnB;;;;;AAAgLH,cA5L3JH,eA4L2JG,CAAAA,SAAAA,OAAAA,EAAAA,eA5L1GF,MA4L0GE,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,GA5LhFF,MA4LgFE,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,EAAAA,cAAAA,MAAAA,GAAAA,MAAAA,CAAAA,CAAAA;GA3L3KJ,cAAAA,CA2LmLK,EA3LlKC,aA2LkKD,CA3LpJF,MA2LoJE,EA3L5ID,MA2L4IC,EA3LpIA,KA2LoIA,CAAAA;aAc3KD,CAAAA,IAAAA,EAxMSE,aAwMTF,CAxMuBD,MAwMvBC,EAxM+BA,MAwM/BA,EAxMuCC,KAwMvCD,CAAAA;;;AAYWC,UAjNPE,aAiNOF,CAAAA,aAAAA,MAAAA,GAAAA,MAAAA,EAAAA,OAAAA,GAAAA,CAAAA,CAAAA;MAALM,EAhNTH,IAgNSG;MAAeN,EA/MxBI,IA+MwBJ;;;;;;;;;;;;;;;;AAgClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA7LqBM,0DAA0DJ,cAAcC,MAAMC;;QAEzFD;QACAC;oBACYD,YAAYC;;;UAGpBD;UACAC;;;;KAKFI;;UAEAC;;;;;;;;;;;;;;;;;;iBAkBYC;GACnBjC,SAAAA,GAAY+B,UAAUC;;KAEfR,+CAA+CJ,0BAA0BA;;;;;;;;;;;WAWxEC;;;;;;;;;;;WAWAC;;;;;;;;SAQFC,QAAQE,cAAcF;KACzBA,QAAQE,cAAcF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgETW,yCAAyCd,0BAA0BA,gEAAgED,gBAAgBE,QAAQC,QAAQC;;;;;;;;;;;;;;WAc3KD;;;;WAIAD;;;;;;;;SAQFE,QAAQM,KAAKN,UAAUA,QAAQM,KAAKN;;oBAEzBY,KAAKX,cAAcH,QAAQC,QAAQC;;;;;;qBAMlC/C;;;YAGP8C;YACAD;UACFE,SAASA;;YAELA;;;;YAIAA;;;;;;;;;;;;;iBAaMa,SAAAA,mBAA4BF"}
|