@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binop.cjs","names":["BaseChannel","EmptyChannelError"],"sources":["../../src/channels/binop.ts"],"sourcesContent":["import { EmptyChannelError } from \"../errors.js\";\nimport { BaseChannel } from \"./base.js\";\n\nexport type BinaryOperator<ValueType, UpdateType> = (\n a: ValueType,\n b: UpdateType\n) => ValueType;\n\n/**\n * Stores the result of applying a binary operator to the current value and each new value.\n */\nexport class BinaryOperatorAggregate<\n ValueType,\n UpdateType = ValueType\n> extends BaseChannel<ValueType, UpdateType, ValueType> {\n lc_graph_name = \"BinaryOperatorAggregate\";\n\n value: ValueType | undefined;\n\n operator: BinaryOperator<ValueType, UpdateType>;\n\n initialValueFactory?: () => ValueType;\n\n constructor(\n operator: BinaryOperator<ValueType, UpdateType>,\n initialValueFactory?: () => ValueType\n ) {\n super();\n\n this.operator = operator;\n this.initialValueFactory = initialValueFactory;\n this.value = initialValueFactory?.();\n }\n\n public fromCheckpoint(checkpoint?: ValueType) {\n const empty = new BinaryOperatorAggregate(\n this.operator,\n this.initialValueFactory\n );\n if (typeof checkpoint !== \"undefined\") {\n empty.value = checkpoint;\n }\n return empty as this;\n }\n\n public update(values: UpdateType[]): boolean {\n let newValues = values;\n if (!newValues.length) return false;\n\n if (this.value === undefined) {\n [this.value as UpdateType] = newValues;\n newValues = newValues.slice(1);\n }\n\n for (const value of newValues) {\n if (this.value !== undefined) {\n this.value = this.operator(this.value, value);\n }\n }\n return true;\n }\n\n public get(): ValueType {\n if (this.value === undefined) {\n throw new EmptyChannelError();\n }\n return this.value;\n }\n\n public checkpoint(): ValueType {\n if (this.value === undefined) {\n throw new EmptyChannelError();\n }\n return this.value;\n }\n\n isAvailable(): boolean {\n return this.value !== undefined;\n }\n}\n"],"mappings":";;;;;;;AAWA,IAAa,0BAAb,MAAa,gCAGHA,yBAA8C;CACtD,gBAAgB;CAEhB;CAEA;CAEA;CAEA,YACE,UACA,qBACA;AACA;AAEA,OAAK,WAAW;AAChB,OAAK,sBAAsB;AAC3B,OAAK,QAAQ;;CAGf,AAAO,eAAe,YAAwB;EAC5C,MAAM,QAAQ,IAAI,wBAChB,KAAK,UACL,KAAK;AAEP,MAAI,OAAO,eAAe,YACxB,OAAM,QAAQ;AAEhB,SAAO;;CAGT,AAAO,OAAO,QAA+B;EAC3C,IAAI,YAAY;AAChB,MAAI,CAAC,UAAU,OAAQ,QAAO;AAE9B,MAAI,KAAK,UAAU,QAAW;AAC5B,IAAC,KAAK,SAAuB;AAC7B,eAAY,UAAU,MAAM;;AAG9B,OAAK,MAAM,SAAS,UAClB,KAAI,KAAK,UAAU,OACjB,MAAK,QAAQ,KAAK,SAAS,KAAK,OAAO;AAG3C,SAAO;;CAGT,AAAO,MAAiB;AACtB,MAAI,KAAK,UAAU,OACjB,OAAM,IAAIC;AAEZ,SAAO,KAAK;;CAGd,AAAO,aAAwB;AAC7B,MAAI,KAAK,UAAU,OACjB,OAAM,IAAIA;AAEZ,SAAO,KAAK;;CAGd,cAAuB;AACrB,SAAO,KAAK,UAAU"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseChannel } from "./base.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/channels/binop.d.ts
|
|
4
|
+
type BinaryOperator<ValueType, UpdateType> = (a: ValueType, b: UpdateType) => ValueType;
|
|
5
|
+
/**
|
|
6
|
+
* Stores the result of applying a binary operator to the current value and each new value.
|
|
7
|
+
*/
|
|
8
|
+
declare class BinaryOperatorAggregate<ValueType, UpdateType = ValueType> extends BaseChannel<ValueType, UpdateType, ValueType> {
|
|
9
|
+
lc_graph_name: string;
|
|
10
|
+
value: ValueType | undefined;
|
|
11
|
+
operator: BinaryOperator<ValueType, UpdateType>;
|
|
12
|
+
initialValueFactory?: () => ValueType;
|
|
13
|
+
constructor(operator: BinaryOperator<ValueType, UpdateType>, initialValueFactory?: () => ValueType);
|
|
14
|
+
fromCheckpoint(checkpoint?: ValueType): this;
|
|
15
|
+
update(values: UpdateType[]): boolean;
|
|
16
|
+
get(): ValueType;
|
|
17
|
+
checkpoint(): ValueType;
|
|
18
|
+
isAvailable(): boolean;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { BinaryOperator, BinaryOperatorAggregate };
|
|
22
|
+
//# sourceMappingURL=binop.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binop.d.cts","names":["BaseChannel","BinaryOperator","ValueType","UpdateType","BinaryOperatorAggregate"],"sources":["../../src/channels/binop.d.ts"],"sourcesContent":["import { BaseChannel } from \"./base.js\";\nexport type BinaryOperator<ValueType, UpdateType> = (a: ValueType, b: UpdateType) => ValueType;\n/**\n * Stores the result of applying a binary operator to the current value and each new value.\n */\nexport declare class BinaryOperatorAggregate<ValueType, UpdateType = ValueType> extends BaseChannel<ValueType, UpdateType, ValueType> {\n lc_graph_name: string;\n value: ValueType | undefined;\n operator: BinaryOperator<ValueType, UpdateType>;\n initialValueFactory?: () => ValueType;\n constructor(operator: BinaryOperator<ValueType, UpdateType>, initialValueFactory?: () => ValueType);\n fromCheckpoint(checkpoint?: ValueType): this;\n update(values: UpdateType[]): boolean;\n get(): ValueType;\n checkpoint(): ValueType;\n isAvailable(): boolean;\n}\n"],"mappings":";;;KACYC,4CAA4CC,cAAcC,eAAeD;;AAArF;;AAAwDA,cAInCE,uBAJmCF,CAAAA,SAAAA,EAAAA,aAIaA,SAJbA,CAAAA,SAIgCF,WAJhCE,CAI4CA,SAJ5CA,EAIuDC,UAJvDD,EAImEA,SAJnEA,CAAAA,CAAAA;eAAcC,EAAAA,MAAAA;OAAeD,EAM1EA,SAN0EA,GAAAA,SAAAA;YAOvED,eAAeC,WAAWC;EAHnBC,mBAAAA,CAAAA,EAAAA,GAAAA,GAIWF,SAJY;EAAA,WAAA,CAAA,QAAA,EAKlBD,cALkB,CAKHC,SALG,EAKQC,UALR,CAAA,EAAA,mBAAA,CAAA,EAAA,GAAA,GAKiDD,SALjD;gBAAyBA,CAAAA,UAAAA,CAAAA,EAMrCA,SANqCA,CAAAA,EAAAA,IAAAA;QAA+BA,CAAAA,MAAAA,EAOjFC,UAPiFD,EAAAA,CAAAA,EAAAA,OAAAA;KAAWC,CAAAA,CAAAA,EAQpGD,SARoGC;YAAYD,CAAAA,CAAAA,EASzGA,SATyGA;aAEhHA,CAAAA,CAAAA,EAAAA,OAAAA"}
|
package/dist/channels/binop.d.ts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { BaseChannel } from "./base.js";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
//#region src/channels/binop.d.ts
|
|
4
|
+
type BinaryOperator<ValueType, UpdateType> = (a: ValueType, b: UpdateType) => ValueType;
|
|
3
5
|
/**
|
|
4
6
|
* Stores the result of applying a binary operator to the current value and each new value.
|
|
5
7
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
declare class BinaryOperatorAggregate<ValueType, UpdateType = ValueType> extends BaseChannel<ValueType, UpdateType, ValueType> {
|
|
9
|
+
lc_graph_name: string;
|
|
10
|
+
value: ValueType | undefined;
|
|
11
|
+
operator: BinaryOperator<ValueType, UpdateType>;
|
|
12
|
+
initialValueFactory?: () => ValueType;
|
|
13
|
+
constructor(operator: BinaryOperator<ValueType, UpdateType>, initialValueFactory?: () => ValueType);
|
|
14
|
+
fromCheckpoint(checkpoint?: ValueType): this;
|
|
15
|
+
update(values: UpdateType[]): boolean;
|
|
16
|
+
get(): ValueType;
|
|
17
|
+
checkpoint(): ValueType;
|
|
18
|
+
isAvailable(): boolean;
|
|
17
19
|
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { BinaryOperator, BinaryOperatorAggregate };
|
|
22
|
+
//# sourceMappingURL=binop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binop.d.ts","names":["BaseChannel","BinaryOperator","ValueType","UpdateType","BinaryOperatorAggregate"],"sources":["../../src/channels/binop.d.ts"],"sourcesContent":["import { BaseChannel } from \"./base.js\";\nexport type BinaryOperator<ValueType, UpdateType> = (a: ValueType, b: UpdateType) => ValueType;\n/**\n * Stores the result of applying a binary operator to the current value and each new value.\n */\nexport declare class BinaryOperatorAggregate<ValueType, UpdateType = ValueType> extends BaseChannel<ValueType, UpdateType, ValueType> {\n lc_graph_name: string;\n value: ValueType | undefined;\n operator: BinaryOperator<ValueType, UpdateType>;\n initialValueFactory?: () => ValueType;\n constructor(operator: BinaryOperator<ValueType, UpdateType>, initialValueFactory?: () => ValueType);\n fromCheckpoint(checkpoint?: ValueType): this;\n update(values: UpdateType[]): boolean;\n get(): ValueType;\n checkpoint(): ValueType;\n isAvailable(): boolean;\n}\n"],"mappings":";;;KACYC,4CAA4CC,cAAcC,eAAeD;;AAArF;;AAAwDA,cAInCE,uBAJmCF,CAAAA,SAAAA,EAAAA,aAIaA,SAJbA,CAAAA,SAIgCF,WAJhCE,CAI4CA,SAJ5CA,EAIuDC,UAJvDD,EAImEA,SAJnEA,CAAAA,CAAAA;eAAcC,EAAAA,MAAAA;OAAeD,EAM1EA,SAN0EA,GAAAA,SAAAA;YAOvED,eAAeC,WAAWC;EAHnBC,mBAAAA,CAAAA,EAAAA,GAAAA,GAIWF,SAJY;EAAA,WAAA,CAAA,QAAA,EAKlBD,cALkB,CAKHC,SALG,EAKQC,UALR,CAAA,EAAA,mBAAA,CAAA,EAAA,GAAA,GAKiDD,SALjD;gBAAyBA,CAAAA,UAAAA,CAAAA,EAMrCA,SANqCA,CAAAA,EAAAA,IAAAA;QAA+BA,CAAAA,MAAAA,EAOjFC,UAPiFD,EAAAA,CAAAA,EAAAA,OAAAA;KAAWC,CAAAA,CAAAA,EAQpGD,SARoGC;YAAYD,CAAAA,CAAAA,EASzGA,SATyGA;aAEhHA,CAAAA,CAAAA,EAAAA,OAAAA"}
|
package/dist/channels/binop.js
CHANGED
|
@@ -1,75 +1,49 @@
|
|
|
1
1
|
import { EmptyChannelError } from "../errors.js";
|
|
2
2
|
import { BaseChannel } from "./base.js";
|
|
3
|
+
|
|
4
|
+
//#region src/channels/binop.ts
|
|
3
5
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return false;
|
|
48
|
-
if (this.value === undefined) {
|
|
49
|
-
[this.value] = newValues;
|
|
50
|
-
newValues = newValues.slice(1);
|
|
51
|
-
}
|
|
52
|
-
for (const value of newValues) {
|
|
53
|
-
if (this.value !== undefined) {
|
|
54
|
-
this.value = this.operator(this.value, value);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
get() {
|
|
60
|
-
if (this.value === undefined) {
|
|
61
|
-
throw new EmptyChannelError();
|
|
62
|
-
}
|
|
63
|
-
return this.value;
|
|
64
|
-
}
|
|
65
|
-
checkpoint() {
|
|
66
|
-
if (this.value === undefined) {
|
|
67
|
-
throw new EmptyChannelError();
|
|
68
|
-
}
|
|
69
|
-
return this.value;
|
|
70
|
-
}
|
|
71
|
-
isAvailable() {
|
|
72
|
-
return this.value !== undefined;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
6
|
+
* Stores the result of applying a binary operator to the current value and each new value.
|
|
7
|
+
*/
|
|
8
|
+
var BinaryOperatorAggregate = class BinaryOperatorAggregate extends BaseChannel {
|
|
9
|
+
lc_graph_name = "BinaryOperatorAggregate";
|
|
10
|
+
value;
|
|
11
|
+
operator;
|
|
12
|
+
initialValueFactory;
|
|
13
|
+
constructor(operator, initialValueFactory) {
|
|
14
|
+
super();
|
|
15
|
+
this.operator = operator;
|
|
16
|
+
this.initialValueFactory = initialValueFactory;
|
|
17
|
+
this.value = initialValueFactory?.();
|
|
18
|
+
}
|
|
19
|
+
fromCheckpoint(checkpoint) {
|
|
20
|
+
const empty = new BinaryOperatorAggregate(this.operator, this.initialValueFactory);
|
|
21
|
+
if (typeof checkpoint !== "undefined") empty.value = checkpoint;
|
|
22
|
+
return empty;
|
|
23
|
+
}
|
|
24
|
+
update(values) {
|
|
25
|
+
let newValues = values;
|
|
26
|
+
if (!newValues.length) return false;
|
|
27
|
+
if (this.value === void 0) {
|
|
28
|
+
[this.value] = newValues;
|
|
29
|
+
newValues = newValues.slice(1);
|
|
30
|
+
}
|
|
31
|
+
for (const value of newValues) if (this.value !== void 0) this.value = this.operator(this.value, value);
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
get() {
|
|
35
|
+
if (this.value === void 0) throw new EmptyChannelError();
|
|
36
|
+
return this.value;
|
|
37
|
+
}
|
|
38
|
+
checkpoint() {
|
|
39
|
+
if (this.value === void 0) throw new EmptyChannelError();
|
|
40
|
+
return this.value;
|
|
41
|
+
}
|
|
42
|
+
isAvailable() {
|
|
43
|
+
return this.value !== void 0;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { BinaryOperatorAggregate };
|
|
75
49
|
//# sourceMappingURL=binop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binop.js","
|
|
1
|
+
{"version":3,"file":"binop.js","names":[],"sources":["../../src/channels/binop.ts"],"sourcesContent":["import { EmptyChannelError } from \"../errors.js\";\nimport { BaseChannel } from \"./base.js\";\n\nexport type BinaryOperator<ValueType, UpdateType> = (\n a: ValueType,\n b: UpdateType\n) => ValueType;\n\n/**\n * Stores the result of applying a binary operator to the current value and each new value.\n */\nexport class BinaryOperatorAggregate<\n ValueType,\n UpdateType = ValueType\n> extends BaseChannel<ValueType, UpdateType, ValueType> {\n lc_graph_name = \"BinaryOperatorAggregate\";\n\n value: ValueType | undefined;\n\n operator: BinaryOperator<ValueType, UpdateType>;\n\n initialValueFactory?: () => ValueType;\n\n constructor(\n operator: BinaryOperator<ValueType, UpdateType>,\n initialValueFactory?: () => ValueType\n ) {\n super();\n\n this.operator = operator;\n this.initialValueFactory = initialValueFactory;\n this.value = initialValueFactory?.();\n }\n\n public fromCheckpoint(checkpoint?: ValueType) {\n const empty = new BinaryOperatorAggregate(\n this.operator,\n this.initialValueFactory\n );\n if (typeof checkpoint !== \"undefined\") {\n empty.value = checkpoint;\n }\n return empty as this;\n }\n\n public update(values: UpdateType[]): boolean {\n let newValues = values;\n if (!newValues.length) return false;\n\n if (this.value === undefined) {\n [this.value as UpdateType] = newValues;\n newValues = newValues.slice(1);\n }\n\n for (const value of newValues) {\n if (this.value !== undefined) {\n this.value = this.operator(this.value, value);\n }\n }\n return true;\n }\n\n public get(): ValueType {\n if (this.value === undefined) {\n throw new EmptyChannelError();\n }\n return this.value;\n }\n\n public checkpoint(): ValueType {\n if (this.value === undefined) {\n throw new EmptyChannelError();\n }\n return this.value;\n }\n\n isAvailable(): boolean {\n return this.value !== undefined;\n }\n}\n"],"mappings":";;;;;;;AAWA,IAAa,0BAAb,MAAa,gCAGH,YAA8C;CACtD,gBAAgB;CAEhB;CAEA;CAEA;CAEA,YACE,UACA,qBACA;AACA;AAEA,OAAK,WAAW;AAChB,OAAK,sBAAsB;AAC3B,OAAK,QAAQ;;CAGf,AAAO,eAAe,YAAwB;EAC5C,MAAM,QAAQ,IAAI,wBAChB,KAAK,UACL,KAAK;AAEP,MAAI,OAAO,eAAe,YACxB,OAAM,QAAQ;AAEhB,SAAO;;CAGT,AAAO,OAAO,QAA+B;EAC3C,IAAI,YAAY;AAChB,MAAI,CAAC,UAAU,OAAQ,QAAO;AAE9B,MAAI,KAAK,UAAU,QAAW;AAC5B,IAAC,KAAK,SAAuB;AAC7B,eAAY,UAAU,MAAM;;AAG9B,OAAK,MAAM,SAAS,UAClB,KAAI,KAAK,UAAU,OACjB,MAAK,QAAQ,KAAK,SAAS,KAAK,OAAO;AAG3C,SAAO;;CAGT,AAAO,MAAiB;AACtB,MAAI,KAAK,UAAU,OACjB,OAAM,IAAI;AAEZ,SAAO,KAAK;;CAGd,AAAO,aAAwB;AAC7B,MAAI,KAAK,UAAU,OACjB,OAAM,IAAI;AAEZ,SAAO,KAAK;;CAGd,cAAuB;AACrB,SAAO,KAAK,UAAU"}
|
|
@@ -1,212 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const named_barrier_value_js_1 = require("./named_barrier_value.cjs");
|
|
1
|
+
const require_errors = require('../errors.cjs');
|
|
2
|
+
const require_base = require('./base.cjs');
|
|
3
|
+
const require_named_barrier_value = require('./named_barrier_value.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/channels/dynamic_barrier_value.ts
|
|
7
6
|
function isWaitForNames(v) {
|
|
8
|
-
|
|
7
|
+
return v.__names !== void 0;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
consume() {
|
|
77
|
-
if (this.seen && this.names && (0, named_barrier_value_js_1.areSetsEqual)(this.seen, this.names)) {
|
|
78
|
-
this.seen = new Set();
|
|
79
|
-
this.names = undefined;
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
// If we have not yet seen all the node names we want to wait for,
|
|
85
|
-
// throw an error to prevent continuing.
|
|
86
|
-
get() {
|
|
87
|
-
if (!this.names || !(0, named_barrier_value_js_1.areSetsEqual)(this.names, this.seen)) {
|
|
88
|
-
throw new errors_js_1.EmptyChannelError();
|
|
89
|
-
}
|
|
90
|
-
return undefined;
|
|
91
|
-
}
|
|
92
|
-
checkpoint() {
|
|
93
|
-
return [this.names ? [...this.names] : undefined, [...this.seen]];
|
|
94
|
-
}
|
|
95
|
-
isAvailable() {
|
|
96
|
-
return !!this.names && (0, named_barrier_value_js_1.areSetsEqual)(this.names, this.seen);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
10
|
+
* A channel that switches between two states
|
|
11
|
+
*
|
|
12
|
+
* - in the "priming" state it can't be read from.
|
|
13
|
+
* - if it receives a WaitForNames update, it switches to the "waiting" state.
|
|
14
|
+
* - in the "waiting" state it collects named values until all are received.
|
|
15
|
+
* - once all named values are received, it can be read once, and it switches
|
|
16
|
+
* back to the "priming" state.
|
|
17
|
+
*/
|
|
18
|
+
var DynamicBarrierValue = class DynamicBarrierValue extends require_base.BaseChannel {
|
|
19
|
+
lc_graph_name = "DynamicBarrierValue";
|
|
20
|
+
names;
|
|
21
|
+
seen;
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.names = void 0;
|
|
25
|
+
this.seen = /* @__PURE__ */ new Set();
|
|
26
|
+
}
|
|
27
|
+
fromCheckpoint(checkpoint) {
|
|
28
|
+
const empty = new DynamicBarrierValue();
|
|
29
|
+
if (typeof checkpoint !== "undefined") {
|
|
30
|
+
empty.names = new Set(checkpoint[0]);
|
|
31
|
+
empty.seen = new Set(checkpoint[1]);
|
|
32
|
+
}
|
|
33
|
+
return empty;
|
|
34
|
+
}
|
|
35
|
+
update(values) {
|
|
36
|
+
const waitForNames = values.filter(isWaitForNames);
|
|
37
|
+
if (waitForNames.length > 0) {
|
|
38
|
+
if (waitForNames.length > 1) throw new require_errors.InvalidUpdateError("Received multiple WaitForNames updates in the same step.");
|
|
39
|
+
this.names = new Set(waitForNames[0].__names);
|
|
40
|
+
return true;
|
|
41
|
+
} else if (this.names !== void 0) {
|
|
42
|
+
let updated = false;
|
|
43
|
+
for (const value of values) {
|
|
44
|
+
if (isWaitForNames(value)) throw new Error("Assertion Error: Received unexpected WaitForNames instance.");
|
|
45
|
+
if (this.names.has(value) && !this.seen.has(value)) {
|
|
46
|
+
this.seen.add(value);
|
|
47
|
+
updated = true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return updated;
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
consume() {
|
|
55
|
+
if (this.seen && this.names && require_named_barrier_value.areSetsEqual(this.seen, this.names)) {
|
|
56
|
+
this.seen = /* @__PURE__ */ new Set();
|
|
57
|
+
this.names = void 0;
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
get() {
|
|
63
|
+
if (!this.names || !require_named_barrier_value.areSetsEqual(this.names, this.seen)) throw new require_errors.EmptyChannelError();
|
|
64
|
+
return void 0;
|
|
65
|
+
}
|
|
66
|
+
checkpoint() {
|
|
67
|
+
return [this.names ? [...this.names] : void 0, [...this.seen]];
|
|
68
|
+
}
|
|
69
|
+
isAvailable() {
|
|
70
|
+
return !!this.names && require_named_barrier_value.areSetsEqual(this.names, this.seen);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
99
75
|
exports.DynamicBarrierValue = DynamicBarrierValue;
|
|
100
|
-
|
|
101
|
-
* A channel that switches between two states with an additional finished flag
|
|
102
|
-
*
|
|
103
|
-
* - in the "priming" state it can't be read from.
|
|
104
|
-
* - if it receives a WaitForNames update, it switches to the "waiting" state.
|
|
105
|
-
* - in the "waiting" state it collects named values until all are received.
|
|
106
|
-
* - once all named values are received, and the finished flag is set, it can be read once, and it switches
|
|
107
|
-
* back to the "priming" state.
|
|
108
|
-
* @internal
|
|
109
|
-
*/
|
|
110
|
-
class DynamicBarrierValueAfterFinish extends base_js_1.BaseChannel {
|
|
111
|
-
constructor() {
|
|
112
|
-
super();
|
|
113
|
-
Object.defineProperty(this, "lc_graph_name", {
|
|
114
|
-
enumerable: true,
|
|
115
|
-
configurable: true,
|
|
116
|
-
writable: true,
|
|
117
|
-
value: "DynamicBarrierValueAfterFinish"
|
|
118
|
-
});
|
|
119
|
-
Object.defineProperty(this, "names", {
|
|
120
|
-
enumerable: true,
|
|
121
|
-
configurable: true,
|
|
122
|
-
writable: true,
|
|
123
|
-
value: void 0
|
|
124
|
-
}); // Names of nodes that we want to wait for.
|
|
125
|
-
Object.defineProperty(this, "seen", {
|
|
126
|
-
enumerable: true,
|
|
127
|
-
configurable: true,
|
|
128
|
-
writable: true,
|
|
129
|
-
value: void 0
|
|
130
|
-
});
|
|
131
|
-
Object.defineProperty(this, "finished", {
|
|
132
|
-
enumerable: true,
|
|
133
|
-
configurable: true,
|
|
134
|
-
writable: true,
|
|
135
|
-
value: void 0
|
|
136
|
-
});
|
|
137
|
-
this.names = undefined;
|
|
138
|
-
this.seen = new Set();
|
|
139
|
-
this.finished = false;
|
|
140
|
-
}
|
|
141
|
-
fromCheckpoint(checkpoint) {
|
|
142
|
-
const empty = new DynamicBarrierValueAfterFinish();
|
|
143
|
-
if (typeof checkpoint !== "undefined") {
|
|
144
|
-
const [names, seen, finished] = checkpoint;
|
|
145
|
-
empty.names = names ? new Set(names) : undefined;
|
|
146
|
-
empty.seen = new Set(seen);
|
|
147
|
-
empty.finished = finished;
|
|
148
|
-
}
|
|
149
|
-
return empty;
|
|
150
|
-
}
|
|
151
|
-
update(values) {
|
|
152
|
-
const waitForNames = values.filter(isWaitForNames);
|
|
153
|
-
if (waitForNames.length > 0) {
|
|
154
|
-
if (waitForNames.length > 1) {
|
|
155
|
-
throw new errors_js_1.InvalidUpdateError("Received multiple WaitForNames updates in the same step.");
|
|
156
|
-
}
|
|
157
|
-
this.names = new Set(waitForNames[0].__names);
|
|
158
|
-
return true;
|
|
159
|
-
}
|
|
160
|
-
else if (this.names !== undefined) {
|
|
161
|
-
let updated = false;
|
|
162
|
-
for (const value of values) {
|
|
163
|
-
if (isWaitForNames(value)) {
|
|
164
|
-
throw new Error("Assertion Error: Received unexpected WaitForNames instance.");
|
|
165
|
-
}
|
|
166
|
-
if (this.names.has(value) && !this.seen.has(value)) {
|
|
167
|
-
this.seen.add(value);
|
|
168
|
-
updated = true;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return updated;
|
|
172
|
-
}
|
|
173
|
-
return false;
|
|
174
|
-
}
|
|
175
|
-
consume() {
|
|
176
|
-
if (this.finished &&
|
|
177
|
-
this.seen &&
|
|
178
|
-
this.names &&
|
|
179
|
-
(0, named_barrier_value_js_1.areSetsEqual)(this.seen, this.names)) {
|
|
180
|
-
this.seen = new Set();
|
|
181
|
-
this.names = undefined;
|
|
182
|
-
this.finished = false;
|
|
183
|
-
return true;
|
|
184
|
-
}
|
|
185
|
-
return false;
|
|
186
|
-
}
|
|
187
|
-
finish() {
|
|
188
|
-
if (!this.finished && this.names && (0, named_barrier_value_js_1.areSetsEqual)(this.names, this.seen)) {
|
|
189
|
-
this.finished = true;
|
|
190
|
-
return true;
|
|
191
|
-
}
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
get() {
|
|
195
|
-
if (!this.finished || !this.names || !(0, named_barrier_value_js_1.areSetsEqual)(this.names, this.seen)) {
|
|
196
|
-
throw new errors_js_1.EmptyChannelError();
|
|
197
|
-
}
|
|
198
|
-
return undefined;
|
|
199
|
-
}
|
|
200
|
-
checkpoint() {
|
|
201
|
-
return [
|
|
202
|
-
this.names ? [...this.names] : undefined,
|
|
203
|
-
[...this.seen],
|
|
204
|
-
this.finished,
|
|
205
|
-
];
|
|
206
|
-
}
|
|
207
|
-
isAvailable() {
|
|
208
|
-
return this.finished && !!this.names && (0, named_barrier_value_js_1.areSetsEqual)(this.names, this.seen);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
exports.DynamicBarrierValueAfterFinish = DynamicBarrierValueAfterFinish;
|
|
212
|
-
//# sourceMappingURL=dynamic_barrier_value.js.map
|
|
76
|
+
//# sourceMappingURL=dynamic_barrier_value.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic_barrier_value.cjs","names":["BaseChannel","InvalidUpdateError","areSetsEqual","EmptyChannelError"],"sources":["../../src/channels/dynamic_barrier_value.ts"],"sourcesContent":["import { EmptyChannelError, InvalidUpdateError } from \"../errors.js\";\nimport { BaseChannel } from \"./base.js\";\nimport { areSetsEqual } from \"./named_barrier_value.js\";\n\nexport interface WaitForNames<Value> {\n __names: Value[];\n}\n\nfunction isWaitForNames<Value>(\n v: WaitForNames<Value> | Value\n): v is WaitForNames<Value> {\n return (v as WaitForNames<Value>).__names !== undefined;\n}\n\n/**\n * A channel that switches between two states\n *\n * - in the \"priming\" state it can't be read from.\n * - if it receives a WaitForNames update, it switches to the \"waiting\" state.\n * - in the \"waiting\" state it collects named values until all are received.\n * - once all named values are received, it can be read once, and it switches\n * back to the \"priming\" state.\n */\nexport class DynamicBarrierValue<Value> extends BaseChannel<\n void,\n Value | WaitForNames<Value>,\n [Value[] | undefined, Value[]]\n> {\n lc_graph_name = \"DynamicBarrierValue\";\n\n names?: Set<Value>; // Names of nodes that we want to wait for.\n\n seen: Set<Value>;\n\n constructor() {\n super();\n this.names = undefined;\n this.seen = new Set<Value>();\n }\n\n fromCheckpoint(checkpoint?: [Value[] | undefined, Value[]]) {\n const empty = new DynamicBarrierValue<Value>();\n if (typeof checkpoint !== \"undefined\") {\n empty.names = new Set(checkpoint[0]);\n empty.seen = new Set(checkpoint[1]);\n }\n return empty as this;\n }\n\n update(values: (Value | WaitForNames<Value>)[]): boolean {\n const waitForNames = values.filter(isWaitForNames);\n if (waitForNames.length > 0) {\n if (waitForNames.length > 1) {\n throw new InvalidUpdateError(\n \"Received multiple WaitForNames updates in the same step.\"\n );\n }\n this.names = new Set(waitForNames[0].__names);\n return true;\n } else if (this.names !== undefined) {\n let updated = false;\n for (const value of values) {\n if (isWaitForNames(value)) {\n throw new Error(\n \"Assertion Error: Received unexpected WaitForNames instance.\"\n );\n }\n if (this.names.has(value) && !this.seen.has(value)) {\n this.seen.add(value);\n updated = true;\n }\n }\n return updated;\n }\n return false;\n }\n\n consume(): boolean {\n if (this.seen && this.names && areSetsEqual(this.seen, this.names)) {\n this.seen = new Set<Value>();\n this.names = undefined;\n return true;\n }\n return false;\n }\n\n // If we have not yet seen all the node names we want to wait for,\n // throw an error to prevent continuing.\n get(): void {\n if (!this.names || !areSetsEqual(this.names, this.seen)) {\n throw new EmptyChannelError();\n }\n return undefined;\n }\n\n checkpoint(): [Value[] | undefined, Value[]] {\n return [this.names ? [...this.names] : undefined, [...this.seen]];\n }\n\n isAvailable(): boolean {\n return !!this.names && areSetsEqual(this.names, this.seen);\n }\n}\n\n/**\n * A channel that switches between two states with an additional finished flag\n *\n * - in the \"priming\" state it can't be read from.\n * - if it receives a WaitForNames update, it switches to the \"waiting\" state.\n * - in the \"waiting\" state it collects named values until all are received.\n * - once all named values are received, and the finished flag is set, it can be read once, and it switches\n * back to the \"priming\" state.\n * @internal\n */\nexport class DynamicBarrierValueAfterFinish<Value> extends BaseChannel<\n void,\n Value | WaitForNames<Value>,\n [Value[] | undefined, Value[], boolean]\n> {\n lc_graph_name = \"DynamicBarrierValueAfterFinish\";\n\n names?: Set<Value>; // Names of nodes that we want to wait for.\n\n seen: Set<Value>;\n\n finished: boolean;\n\n constructor() {\n super();\n this.names = undefined;\n this.seen = new Set<Value>();\n this.finished = false;\n }\n\n fromCheckpoint(checkpoint?: [Value[] | undefined, Value[], boolean]) {\n const empty = new DynamicBarrierValueAfterFinish<Value>();\n if (typeof checkpoint !== \"undefined\") {\n const [names, seen, finished] = checkpoint;\n empty.names = names ? new Set(names) : undefined;\n empty.seen = new Set(seen);\n empty.finished = finished;\n }\n return empty as this;\n }\n\n update(values: (Value | WaitForNames<Value>)[]): boolean {\n const waitForNames = values.filter(isWaitForNames);\n if (waitForNames.length > 0) {\n if (waitForNames.length > 1) {\n throw new InvalidUpdateError(\n \"Received multiple WaitForNames updates in the same step.\"\n );\n }\n this.names = new Set(waitForNames[0].__names);\n return true;\n } else if (this.names !== undefined) {\n let updated = false;\n for (const value of values) {\n if (isWaitForNames(value)) {\n throw new Error(\n \"Assertion Error: Received unexpected WaitForNames instance.\"\n );\n }\n if (this.names.has(value) && !this.seen.has(value)) {\n this.seen.add(value);\n updated = true;\n }\n }\n return updated;\n }\n return false;\n }\n\n consume(): boolean {\n if (\n this.finished &&\n this.seen &&\n this.names &&\n areSetsEqual(this.seen, this.names)\n ) {\n this.seen = new Set<Value>();\n this.names = undefined;\n this.finished = false;\n return true;\n }\n return false;\n }\n\n finish(): boolean {\n if (!this.finished && this.names && areSetsEqual(this.names, this.seen)) {\n this.finished = true;\n return true;\n }\n return false;\n }\n\n get(): void {\n if (!this.finished || !this.names || !areSetsEqual(this.names, this.seen)) {\n throw new EmptyChannelError();\n }\n return undefined;\n }\n\n checkpoint(): [Value[] | undefined, Value[], boolean] {\n return [\n this.names ? [...this.names] : undefined,\n [...this.seen],\n this.finished,\n ];\n }\n\n isAvailable(): boolean {\n return this.finished && !!this.names && areSetsEqual(this.names, this.seen);\n }\n}\n"],"mappings":";;;;;AAQA,SAAS,eACP,GAC0B;AAC1B,QAAQ,EAA0B,YAAY;;;;;;;;;;;AAYhD,IAAa,sBAAb,MAAa,4BAAmCA,yBAI9C;CACA,gBAAgB;CAEhB;CAEA;CAEA,cAAc;AACZ;AACA,OAAK,QAAQ;AACb,OAAK,uBAAO,IAAI;;CAGlB,eAAe,YAA6C;EAC1D,MAAM,QAAQ,IAAI;AAClB,MAAI,OAAO,eAAe,aAAa;AACrC,SAAM,QAAQ,IAAI,IAAI,WAAW;AACjC,SAAM,OAAO,IAAI,IAAI,WAAW;;AAElC,SAAO;;CAGT,OAAO,QAAkD;EACvD,MAAM,eAAe,OAAO,OAAO;AACnC,MAAI,aAAa,SAAS,GAAG;AAC3B,OAAI,aAAa,SAAS,EACxB,OAAM,IAAIC,kCACR;AAGJ,QAAK,QAAQ,IAAI,IAAI,aAAa,GAAG;AACrC,UAAO;aACE,KAAK,UAAU,QAAW;GACnC,IAAI,UAAU;AACd,QAAK,MAAM,SAAS,QAAQ;AAC1B,QAAI,eAAe,OACjB,OAAM,IAAI,MACR;AAGJ,QAAI,KAAK,MAAM,IAAI,UAAU,CAAC,KAAK,KAAK,IAAI,QAAQ;AAClD,UAAK,KAAK,IAAI;AACd,eAAU;;;AAGd,UAAO;;AAET,SAAO;;CAGT,UAAmB;AACjB,MAAI,KAAK,QAAQ,KAAK,SAASC,yCAAa,KAAK,MAAM,KAAK,QAAQ;AAClE,QAAK,uBAAO,IAAI;AAChB,QAAK,QAAQ;AACb,UAAO;;AAET,SAAO;;CAKT,MAAY;AACV,MAAI,CAAC,KAAK,SAAS,CAACA,yCAAa,KAAK,OAAO,KAAK,MAChD,OAAM,IAAIC;AAEZ,SAAO;;CAGT,aAA6C;AAC3C,SAAO,CAAC,KAAK,QAAQ,CAAC,GAAG,KAAK,SAAS,QAAW,CAAC,GAAG,KAAK;;CAG7D,cAAuB;AACrB,SAAO,CAAC,CAAC,KAAK,SAASD,yCAAa,KAAK,OAAO,KAAK"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BaseChannel } from "./base.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/channels/dynamic_barrier_value.d.ts
|
|
4
|
+
interface WaitForNames<Value> {
|
|
5
|
+
__names: Value[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A channel that switches between two states
|
|
9
|
+
*
|
|
10
|
+
* - in the "priming" state it can't be read from.
|
|
11
|
+
* - if it receives a WaitForNames update, it switches to the "waiting" state.
|
|
12
|
+
* - in the "waiting" state it collects named values until all are received.
|
|
13
|
+
* - once all named values are received, it can be read once, and it switches
|
|
14
|
+
* back to the "priming" state.
|
|
15
|
+
*/
|
|
16
|
+
declare class DynamicBarrierValue<Value> extends BaseChannel<void, Value | WaitForNames<Value>, [Value[] | undefined, Value[]]> {
|
|
17
|
+
lc_graph_name: string;
|
|
18
|
+
names?: Set<Value>; // Names of nodes that we want to wait for.
|
|
19
|
+
seen: Set<Value>;
|
|
20
|
+
constructor();
|
|
21
|
+
fromCheckpoint(checkpoint?: [Value[] | undefined, Value[]]): this;
|
|
22
|
+
update(values: (Value | WaitForNames<Value>)[]): boolean;
|
|
23
|
+
consume(): boolean;
|
|
24
|
+
// If we have not yet seen all the node names we want to wait for,
|
|
25
|
+
// throw an error to prevent continuing.
|
|
26
|
+
get(): void;
|
|
27
|
+
checkpoint(): [Value[] | undefined, Value[]];
|
|
28
|
+
isAvailable(): boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A channel that switches between two states with an additional finished flag
|
|
32
|
+
*
|
|
33
|
+
* - in the "priming" state it can't be read from.
|
|
34
|
+
* - if it receives a WaitForNames update, it switches to the "waiting" state.
|
|
35
|
+
* - in the "waiting" state it collects named values until all are received.
|
|
36
|
+
* - once all named values are received, and the finished flag is set, it can be read once, and it switches
|
|
37
|
+
* back to the "priming" state.
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
//#endregion
|
|
41
|
+
export { DynamicBarrierValue, WaitForNames };
|
|
42
|
+
//# sourceMappingURL=dynamic_barrier_value.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic_barrier_value.d.cts","names":["BaseChannel","WaitForNames","Value","DynamicBarrierValue","Set","DynamicBarrierValueAfterFinish"],"sources":["../../src/channels/dynamic_barrier_value.d.ts"],"sourcesContent":["import { BaseChannel } from \"./base.js\";\nexport interface WaitForNames<Value> {\n __names: Value[];\n}\n/**\n * A channel that switches between two states\n *\n * - in the \"priming\" state it can't be read from.\n * - if it receives a WaitForNames update, it switches to the \"waiting\" state.\n * - in the \"waiting\" state it collects named values until all are received.\n * - once all named values are received, it can be read once, and it switches\n * back to the \"priming\" state.\n */\nexport declare class DynamicBarrierValue<Value> extends BaseChannel<void, Value | WaitForNames<Value>, [\n Value[] | undefined,\n Value[]\n]> {\n lc_graph_name: string;\n names?: Set<Value>; // Names of nodes that we want to wait for.\n seen: Set<Value>;\n constructor();\n fromCheckpoint(checkpoint?: [Value[] | undefined, Value[]]): this;\n update(values: (Value | WaitForNames<Value>)[]): boolean;\n consume(): boolean;\n // If we have not yet seen all the node names we want to wait for,\n // throw an error to prevent continuing.\n get(): void;\n checkpoint(): [Value[] | undefined, Value[]];\n isAvailable(): boolean;\n}\n/**\n * A channel that switches between two states with an additional finished flag\n *\n * - in the \"priming\" state it can't be read from.\n * - if it receives a WaitForNames update, it switches to the \"waiting\" state.\n * - in the \"waiting\" state it collects named values until all are received.\n * - once all named values are received, and the finished flag is set, it can be read once, and it switches\n * back to the \"priming\" state.\n * @internal\n */\nexport declare class DynamicBarrierValueAfterFinish<Value> extends BaseChannel<void, Value | WaitForNames<Value>, [\n Value[] | undefined,\n Value[],\n boolean\n]> {\n lc_graph_name: string;\n names?: Set<Value>; // Names of nodes that we want to wait for.\n seen: Set<Value>;\n finished: boolean;\n constructor();\n fromCheckpoint(checkpoint?: [Value[] | undefined, Value[], boolean]): this;\n update(values: (Value | WaitForNames<Value>)[]): boolean;\n consume(): boolean;\n finish(): boolean;\n get(): void;\n checkpoint(): [Value[] | undefined, Value[], boolean];\n isAvailable(): boolean;\n}\n"],"mappings":";;;UACiBC;WACJC;AADb;AAYA;;;;;;;;;AAMcA,cANOC,mBAMPD,CAAAA,KAAAA,CAAAA,SAN0CF,WAM1CE,CAAAA,IAAAA,EAN4DA,KAM5DA,GANoED,YAMpEC,CANiFA,KAMjFA,CAAAA,EAAAA,CALVA,KAKME,EAAAA,GAAAA,SAAAA,EAJNF,KAM6BA,EAAAA;eACbA,EAAAA,MAAAA;OAAqBA,CAAAA,EAJ7BE,GAI6BF,CAJzBA,KAIyBA,CAAAA,CAAAA,CAAAA;MAAbD,EAHlBG,GAGkBH,CAHdC,KAGcD,CAAAA;aAKTC,CAAAA;gBAAqBA,CAAAA,UAAAA,CAAAA,EAAAA,CANPA,KAMOA,EAAAA,GAAAA,SAAAA,EANcA,KAMdA,EAAAA,CAAAA,CAAAA,EAAAA,IAAAA;QAdgBF,CAAAA,MAAAA,EAAAA,CASpCE,KAToCF,GAS5BC,YAT4BD,CASfE,KATeF,CAAAA,CAAAA,EAAAA,CAAAA,EAAAA,OAAAA;;;;;iBAcrCE,qBAAqBA"}
|