@langchain/langgraph 0.4.7 → 1.0.0-alpha.0
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 +11 -0
- package/README.md +1 -2
- package/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/channels/any_value.d.cts +26 -0
- package/dist/channels/any_value.d.cts.map +1 -0
- package/dist/channels/any_value.d.ts +16 -9
- package/dist/channels/any_value.d.ts.map +1 -0
- package/dist/channels/base.cjs +97 -133
- package/dist/channels/base.cjs.map +1 -0
- package/dist/channels/base.d.cts +73 -0
- package/dist/channels/base.d.cts.map +1 -0
- package/dist/channels/base.d.ts +73 -74
- package/dist/channels/base.d.ts.map +1 -0
- package/dist/channels/base.js +94 -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.d.cts +43 -0
- package/dist/channels/dynamic_barrier_value.d.cts.map +1 -0
- package/dist/channels/dynamic_barrier_value.d.ts +20 -34
- package/dist/channels/dynamic_barrier_value.d.ts.map +1 -0
- package/dist/channels/ephemeral_value.cjs +46 -70
- package/dist/channels/ephemeral_value.cjs.map +1 -0
- package/dist/channels/ephemeral_value.d.cts +23 -0
- package/dist/channels/ephemeral_value.d.cts.map +1 -0
- package/dist/channels/ephemeral_value.d.ts +18 -11
- package/dist/channels/ephemeral_value.d.ts.map +1 -0
- package/dist/channels/ephemeral_value.js +45 -65
- package/dist/channels/ephemeral_value.js.map +1 -1
- package/dist/channels/index.cjs +2 -10
- package/dist/channels/index.js +4 -3
- package/dist/channels/last_value.cjs +91 -140
- package/dist/channels/last_value.cjs.map +1 -0
- package/dist/channels/last_value.d.cts +30 -0
- package/dist/channels/last_value.d.cts.map +1 -0
- package/dist/channels/last_value.d.ts +15 -23
- package/dist/channels/last_value.d.ts.map +1 -0
- package/dist/channels/last_value.js +88 -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 +33 -0
- package/dist/channels/named_barrier_value.d.cts.map +1 -0
- package/dist/channels/named_barrier_value.d.ts +19 -29
- package/dist/channels/named_barrier_value.d.ts.map +1 -0
- package/dist/channels/named_barrier_value.js +112 -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 +26 -0
- package/dist/channels/topic.d.cts.map +1 -0
- package/dist/channels/topic.d.ts +21 -18
- 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 +373 -452
- package/dist/constants.cjs.map +1 -0
- package/dist/constants.d.cts +284 -0
- package/dist/constants.d.cts.map +1 -0
- package/dist/constants.d.ts +112 -148
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +333 -444
- package/dist/constants.js.map +1 -1
- package/dist/errors.cjs +150 -179
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.cts +80 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.ts +55 -46
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +139 -165
- package/dist/errors.js.map +1 -1
- package/dist/func/index.cjs +289 -290
- package/dist/func/index.cjs.map +1 -0
- package/dist/func/index.d.cts +289 -0
- package/dist/func/index.d.cts.map +1 -0
- package/dist/func/index.d.ts +81 -71
- package/dist/func/index.d.ts.map +1 -0
- package/dist/func/index.js +285 -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 +131 -0
- package/dist/graph/graph.d.cts.map +1 -0
- package/dist/graph/graph.d.ts +122 -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 +476 -777
- package/dist/graph/state.cjs.map +1 -0
- package/dist/graph/state.d.cts +216 -0
- package/dist/graph/state.d.cts.map +1 -0
- package/dist/graph/state.d.ts +129 -134
- package/dist/graph/state.d.ts.map +1 -0
- package/dist/graph/state.js +470 -768
- 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 +110 -33
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +25 -0
- package/dist/index.d.ts +25 -5
- package/dist/index.js +18 -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 +46 -37
- 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 +521 -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 +516 -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 +1134 -1604
- package/dist/pregel/index.cjs.map +1 -0
- package/dist/pregel/index.d.cts +534 -0
- package/dist/pregel/index.d.cts.map +1 -0
- package/dist/pregel/index.d.ts +458 -422
- package/dist/pregel/index.d.ts.map +1 -0
- package/dist/pregel/index.js +1125 -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 +539 -954
- package/dist/pregel/loop.cjs.map +1 -0
- package/dist/pregel/loop.js +536 -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 +25 -0
- package/dist/pregel/runnable_types.d.cts.map +1 -0
- package/dist/pregel/runnable_types.d.ts +22 -16
- 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 +437 -0
- package/dist/pregel/types.d.cts.map +1 -0
- package/dist/pregel/types.d.ts +377 -431
- 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 +100 -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 +98 -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 +97 -55
- package/dist/web.d.cts +23 -0
- package/dist/web.d.ts +23 -14
- package/dist/web.js +15 -8
- package/package.json +77 -80
- package/dist/channels/any_value.cjs +0 -65
- package/dist/channels/any_value.js +0 -61
- package/dist/channels/any_value.js.map +0 -1
- package/dist/channels/dynamic_barrier_value.cjs +0 -212
- package/dist/channels/dynamic_barrier_value.js +0 -207
- package/dist/channels/dynamic_barrier_value.js.map +0 -1
- package/dist/channels/index.d.ts +0 -7
- 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
|
@@ -1,174 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const base_js_1 = require("./base.cjs");
|
|
1
|
+
const require_errors = require('../errors.cjs');
|
|
2
|
+
const require_base = require('./base.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/channels/named_barrier_value.ts
|
|
6
5
|
const areSetsEqual = (a, b) => a.size === b.size && [...a].every((value) => b.has(value));
|
|
7
|
-
exports.areSetsEqual = areSetsEqual;
|
|
8
6
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class NamedBarrierValue extends
|
|
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
|
-
return updated;
|
|
60
|
-
}
|
|
61
|
-
// If we have not yet seen all the node names we want to wait for,
|
|
62
|
-
// throw an error to prevent continuing.
|
|
63
|
-
get() {
|
|
64
|
-
if (!(0, exports.areSetsEqual)(this.names, this.seen)) {
|
|
65
|
-
throw new errors_js_1.EmptyChannelError();
|
|
66
|
-
}
|
|
67
|
-
return undefined;
|
|
68
|
-
}
|
|
69
|
-
checkpoint() {
|
|
70
|
-
return [...this.seen];
|
|
71
|
-
}
|
|
72
|
-
consume() {
|
|
73
|
-
if (this.seen && this.names && (0, exports.areSetsEqual)(this.seen, this.names)) {
|
|
74
|
-
this.seen = new Set();
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
isAvailable() {
|
|
80
|
-
return !!this.names && (0, exports.areSetsEqual)(this.names, this.seen);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
exports.NamedBarrierValue = NamedBarrierValue;
|
|
7
|
+
* A channel that waits until all named values are received before making the value available.
|
|
8
|
+
*
|
|
9
|
+
* This ensures that if node N and node M both write to channel C, the value of C will not be updated
|
|
10
|
+
* until N and M have completed updating.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
var NamedBarrierValue = class NamedBarrierValue extends require_base.BaseChannel {
|
|
14
|
+
lc_graph_name = "NamedBarrierValue";
|
|
15
|
+
names;
|
|
16
|
+
seen;
|
|
17
|
+
constructor(names) {
|
|
18
|
+
super();
|
|
19
|
+
this.names = names;
|
|
20
|
+
this.seen = /* @__PURE__ */ new Set();
|
|
21
|
+
}
|
|
22
|
+
fromCheckpoint(checkpoint) {
|
|
23
|
+
const empty = new NamedBarrierValue(this.names);
|
|
24
|
+
if (typeof checkpoint !== "undefined") empty.seen = new Set(checkpoint);
|
|
25
|
+
return empty;
|
|
26
|
+
}
|
|
27
|
+
update(values) {
|
|
28
|
+
let updated = false;
|
|
29
|
+
for (const nodeName of values) if (this.names.has(nodeName)) {
|
|
30
|
+
if (!this.seen.has(nodeName)) {
|
|
31
|
+
this.seen.add(nodeName);
|
|
32
|
+
updated = true;
|
|
33
|
+
}
|
|
34
|
+
} else throw new require_errors.InvalidUpdateError(`Value ${JSON.stringify(nodeName)} not in names ${JSON.stringify(this.names)}`);
|
|
35
|
+
return updated;
|
|
36
|
+
}
|
|
37
|
+
get() {
|
|
38
|
+
if (!areSetsEqual(this.names, this.seen)) throw new require_errors.EmptyChannelError();
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
41
|
+
checkpoint() {
|
|
42
|
+
return [...this.seen];
|
|
43
|
+
}
|
|
44
|
+
consume() {
|
|
45
|
+
if (this.seen && this.names && areSetsEqual(this.seen, this.names)) {
|
|
46
|
+
this.seen = /* @__PURE__ */ new Set();
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
isAvailable() {
|
|
52
|
+
return !!this.names && areSetsEqual(this.names, this.seen);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
84
55
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
class NamedBarrierValueAfterFinish extends
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return undefined;
|
|
147
|
-
}
|
|
148
|
-
checkpoint() {
|
|
149
|
-
return [[...this.seen], this.finished];
|
|
150
|
-
}
|
|
151
|
-
consume() {
|
|
152
|
-
if (this.finished &&
|
|
153
|
-
this.seen &&
|
|
154
|
-
this.names &&
|
|
155
|
-
(0, exports.areSetsEqual)(this.seen, this.names)) {
|
|
156
|
-
this.seen = new Set();
|
|
157
|
-
this.finished = false;
|
|
158
|
-
return true;
|
|
159
|
-
}
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
finish() {
|
|
163
|
-
if (!this.finished && !!this.names && (0, exports.areSetsEqual)(this.names, this.seen)) {
|
|
164
|
-
this.finished = true;
|
|
165
|
-
return true;
|
|
166
|
-
}
|
|
167
|
-
return false;
|
|
168
|
-
}
|
|
169
|
-
isAvailable() {
|
|
170
|
-
return this.finished && !!this.names && (0, exports.areSetsEqual)(this.names, this.seen);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
56
|
+
* A channel that waits until all named values are received before making the value ready to be made available.
|
|
57
|
+
* It is only made available after finish() is called.
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
var NamedBarrierValueAfterFinish = class NamedBarrierValueAfterFinish extends require_base.BaseChannel {
|
|
61
|
+
lc_graph_name = "NamedBarrierValueAfterFinish";
|
|
62
|
+
names;
|
|
63
|
+
seen;
|
|
64
|
+
finished;
|
|
65
|
+
constructor(names) {
|
|
66
|
+
super();
|
|
67
|
+
this.names = names;
|
|
68
|
+
this.seen = /* @__PURE__ */ new Set();
|
|
69
|
+
this.finished = false;
|
|
70
|
+
}
|
|
71
|
+
fromCheckpoint(checkpoint) {
|
|
72
|
+
const empty = new NamedBarrierValueAfterFinish(this.names);
|
|
73
|
+
if (typeof checkpoint !== "undefined") {
|
|
74
|
+
const [seen, finished] = checkpoint;
|
|
75
|
+
empty.seen = new Set(seen);
|
|
76
|
+
empty.finished = finished;
|
|
77
|
+
}
|
|
78
|
+
return empty;
|
|
79
|
+
}
|
|
80
|
+
update(values) {
|
|
81
|
+
let updated = false;
|
|
82
|
+
for (const nodeName of values) if (this.names.has(nodeName) && !this.seen.has(nodeName)) {
|
|
83
|
+
this.seen.add(nodeName);
|
|
84
|
+
updated = true;
|
|
85
|
+
} else if (!this.names.has(nodeName)) throw new require_errors.InvalidUpdateError(`Value ${JSON.stringify(nodeName)} not in names ${JSON.stringify(this.names)}`);
|
|
86
|
+
return updated;
|
|
87
|
+
}
|
|
88
|
+
get() {
|
|
89
|
+
if (!this.finished || !areSetsEqual(this.names, this.seen)) throw new require_errors.EmptyChannelError();
|
|
90
|
+
return void 0;
|
|
91
|
+
}
|
|
92
|
+
checkpoint() {
|
|
93
|
+
return [[...this.seen], this.finished];
|
|
94
|
+
}
|
|
95
|
+
consume() {
|
|
96
|
+
if (this.finished && this.seen && this.names && areSetsEqual(this.seen, this.names)) {
|
|
97
|
+
this.seen = /* @__PURE__ */ new Set();
|
|
98
|
+
this.finished = false;
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
finish() {
|
|
104
|
+
if (!this.finished && !!this.names && areSetsEqual(this.names, this.seen)) {
|
|
105
|
+
this.finished = true;
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
isAvailable() {
|
|
111
|
+
return this.finished && !!this.names && areSetsEqual(this.names, this.seen);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
//#endregion
|
|
116
|
+
exports.NamedBarrierValue = NamedBarrierValue;
|
|
173
117
|
exports.NamedBarrierValueAfterFinish = NamedBarrierValueAfterFinish;
|
|
174
|
-
//# sourceMappingURL=named_barrier_value.
|
|
118
|
+
//# sourceMappingURL=named_barrier_value.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"named_barrier_value.cjs","names":["BaseChannel","InvalidUpdateError","EmptyChannelError"],"sources":["../../src/channels/named_barrier_value.ts"],"sourcesContent":["import { EmptyChannelError, InvalidUpdateError } from \"../errors.js\";\nimport { BaseChannel } from \"./base.js\";\n\nexport const areSetsEqual = <T>(a: Set<T>, b: Set<T>) =>\n a.size === b.size && [...a].every((value) => b.has(value));\n\n/**\n * A channel that waits until all named values are received before making the value available.\n *\n * This ensures that if node N and node M both write to channel C, the value of C will not be updated\n * until N and M have completed updating.\n * @internal\n */\nexport class NamedBarrierValue<Value> extends BaseChannel<\n void,\n Value,\n Value[]\n> {\n lc_graph_name = \"NamedBarrierValue\";\n\n names: Set<Value>; // Names of nodes that we want to wait for.\n\n seen: Set<Value>;\n\n constructor(names: Set<Value>) {\n super();\n this.names = names;\n this.seen = new Set<Value>();\n }\n\n fromCheckpoint(checkpoint?: Value[]) {\n const empty = new NamedBarrierValue<Value>(this.names);\n if (typeof checkpoint !== \"undefined\") {\n empty.seen = new Set(checkpoint);\n }\n return empty as this;\n }\n\n update(values: Value[]): boolean {\n let updated = false;\n for (const nodeName of values) {\n if (this.names.has(nodeName)) {\n if (!this.seen.has(nodeName)) {\n this.seen.add(nodeName);\n updated = true;\n }\n } else {\n throw new InvalidUpdateError(\n `Value ${JSON.stringify(nodeName)} not in names ${JSON.stringify(\n this.names\n )}`\n );\n }\n }\n return updated;\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 (!areSetsEqual(this.names, this.seen)) {\n throw new EmptyChannelError();\n }\n return undefined;\n }\n\n checkpoint(): Value[] {\n return [...this.seen];\n }\n\n consume(): boolean {\n if (this.seen && this.names && areSetsEqual(this.seen, this.names)) {\n this.seen = new Set<Value>();\n return true;\n }\n return false;\n }\n\n isAvailable(): boolean {\n return !!this.names && areSetsEqual(this.names, this.seen);\n }\n}\n\n/**\n * A channel that waits until all named values are received before making the value ready to be made available.\n * It is only made available after finish() is called.\n * @internal\n */\nexport class NamedBarrierValueAfterFinish<Value> extends BaseChannel<\n void,\n Value,\n [Value[], boolean]\n> {\n lc_graph_name = \"NamedBarrierValueAfterFinish\";\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(names: Set<Value>) {\n super();\n this.names = names;\n this.seen = new Set<Value>();\n this.finished = false;\n }\n\n fromCheckpoint(checkpoint?: [Value[], boolean]) {\n const empty = new NamedBarrierValueAfterFinish<Value>(this.names);\n if (typeof checkpoint !== \"undefined\") {\n const [seen, finished] = checkpoint;\n empty.seen = new Set(seen);\n empty.finished = finished;\n }\n return empty as this;\n }\n\n update(values: Value[]): boolean {\n let updated = false;\n for (const nodeName of values) {\n if (this.names.has(nodeName) && !this.seen.has(nodeName)) {\n this.seen.add(nodeName);\n updated = true;\n } else if (!this.names.has(nodeName)) {\n throw new InvalidUpdateError(\n `Value ${JSON.stringify(nodeName)} not in names ${JSON.stringify(\n this.names\n )}`\n );\n }\n }\n return updated;\n }\n\n get(): void {\n if (!this.finished || !areSetsEqual(this.names, this.seen)) {\n throw new EmptyChannelError();\n }\n return undefined;\n }\n\n checkpoint(): [Value[], boolean] {\n return [[...this.seen], this.finished];\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.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 isAvailable(): boolean {\n return this.finished && !!this.names && areSetsEqual(this.names, this.seen);\n }\n}\n"],"mappings":";;;;AAGA,MAAa,gBAAmB,GAAW,MACzC,EAAE,SAAS,EAAE,QAAQ,CAAC,GAAG,GAAG,OAAO,UAAU,EAAE,IAAI;;;;;;;;AASrD,IAAa,oBAAb,MAAa,0BAAiCA,yBAI5C;CACA,gBAAgB;CAEhB;CAEA;CAEA,YAAY,OAAmB;AAC7B;AACA,OAAK,QAAQ;AACb,OAAK,uBAAO,IAAI;;CAGlB,eAAe,YAAsB;EACnC,MAAM,QAAQ,IAAI,kBAAyB,KAAK;AAChD,MAAI,OAAO,eAAe,YACxB,OAAM,OAAO,IAAI,IAAI;AAEvB,SAAO;;CAGT,OAAO,QAA0B;EAC/B,IAAI,UAAU;AACd,OAAK,MAAM,YAAY,OACrB,KAAI,KAAK,MAAM,IAAI,WACjB;OAAI,CAAC,KAAK,KAAK,IAAI,WAAW;AAC5B,SAAK,KAAK,IAAI;AACd,cAAU;;QAGZ,OAAM,IAAIC,kCACR,SAAS,KAAK,UAAU,UAAU,gBAAgB,KAAK,UACrD,KAAK;AAKb,SAAO;;CAKT,MAAY;AACV,MAAI,CAAC,aAAa,KAAK,OAAO,KAAK,MACjC,OAAM,IAAIC;AAEZ,SAAO;;CAGT,aAAsB;AACpB,SAAO,CAAC,GAAG,KAAK;;CAGlB,UAAmB;AACjB,MAAI,KAAK,QAAQ,KAAK,SAAS,aAAa,KAAK,MAAM,KAAK,QAAQ;AAClE,QAAK,uBAAO,IAAI;AAChB,UAAO;;AAET,SAAO;;CAGT,cAAuB;AACrB,SAAO,CAAC,CAAC,KAAK,SAAS,aAAa,KAAK,OAAO,KAAK;;;;;;;;AASzD,IAAa,+BAAb,MAAa,qCAA4CF,yBAIvD;CACA,gBAAgB;CAEhB;CAEA;CAEA;CAEA,YAAY,OAAmB;AAC7B;AACA,OAAK,QAAQ;AACb,OAAK,uBAAO,IAAI;AAChB,OAAK,WAAW;;CAGlB,eAAe,YAAiC;EAC9C,MAAM,QAAQ,IAAI,6BAAoC,KAAK;AAC3D,MAAI,OAAO,eAAe,aAAa;GACrC,MAAM,CAAC,MAAM,YAAY;AACzB,SAAM,OAAO,IAAI,IAAI;AACrB,SAAM,WAAW;;AAEnB,SAAO;;CAGT,OAAO,QAA0B;EAC/B,IAAI,UAAU;AACd,OAAK,MAAM,YAAY,OACrB,KAAI,KAAK,MAAM,IAAI,aAAa,CAAC,KAAK,KAAK,IAAI,WAAW;AACxD,QAAK,KAAK,IAAI;AACd,aAAU;aACD,CAAC,KAAK,MAAM,IAAI,UACzB,OAAM,IAAIC,kCACR,SAAS,KAAK,UAAU,UAAU,gBAAgB,KAAK,UACrD,KAAK;AAKb,SAAO;;CAGT,MAAY;AACV,MAAI,CAAC,KAAK,YAAY,CAAC,aAAa,KAAK,OAAO,KAAK,MACnD,OAAM,IAAIC;AAEZ,SAAO;;CAGT,aAAiC;AAC/B,SAAO,CAAC,CAAC,GAAG,KAAK,OAAO,KAAK;;CAG/B,UAAmB;AACjB,MACE,KAAK,YACL,KAAK,QACL,KAAK,SACL,aAAa,KAAK,MAAM,KAAK,QAC7B;AACA,QAAK,uBAAO,IAAI;AAChB,QAAK,WAAW;AAChB,UAAO;;AAET,SAAO;;CAGT,SAAkB;AAChB,MAAI,CAAC,KAAK,YAAY,CAAC,CAAC,KAAK,SAAS,aAAa,KAAK,OAAO,KAAK,OAAO;AACzE,QAAK,WAAW;AAChB,UAAO;;AAET,SAAO;;CAGT,cAAuB;AACrB,SAAO,KAAK,YAAY,CAAC,CAAC,KAAK,SAAS,aAAa,KAAK,OAAO,KAAK"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseChannel } from "./base.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/channels/named_barrier_value.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A channel that waits until all named values are received before making the value available.
|
|
7
|
+
*
|
|
8
|
+
* This ensures that if node N and node M both write to channel C, the value of C will not be updated
|
|
9
|
+
* until N and M have completed updating.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
declare class NamedBarrierValue<Value> extends BaseChannel<void, Value, Value[]> {
|
|
13
|
+
lc_graph_name: string;
|
|
14
|
+
names: Set<Value>; // Names of nodes that we want to wait for.
|
|
15
|
+
seen: Set<Value>;
|
|
16
|
+
constructor(names: Set<Value>);
|
|
17
|
+
fromCheckpoint(checkpoint?: Value[]): this;
|
|
18
|
+
update(values: Value[]): boolean;
|
|
19
|
+
// If we have not yet seen all the node names we want to wait for,
|
|
20
|
+
// throw an error to prevent continuing.
|
|
21
|
+
get(): void;
|
|
22
|
+
checkpoint(): Value[];
|
|
23
|
+
consume(): boolean;
|
|
24
|
+
isAvailable(): boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A channel that waits until all named values are received before making the value ready to be made available.
|
|
28
|
+
* It is only made available after finish() is called.
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
//#endregion
|
|
32
|
+
export { NamedBarrierValue };
|
|
33
|
+
//# sourceMappingURL=named_barrier_value.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"named_barrier_value.d.cts","names":["BaseChannel","areSetsEqual","T","Set","NamedBarrierValue","Value","NamedBarrierValueAfterFinish"],"sources":["../../src/channels/named_barrier_value.d.ts"],"sourcesContent":["import { BaseChannel } from \"./base.js\";\nexport declare const areSetsEqual: <T>(a: Set<T>, b: Set<T>) => boolean;\n/**\n * A channel that waits until all named values are received before making the value available.\n *\n * This ensures that if node N and node M both write to channel C, the value of C will not be updated\n * until N and M have completed updating.\n * @internal\n */\nexport declare class NamedBarrierValue<Value> extends BaseChannel<void, Value, Value[]> {\n lc_graph_name: string;\n names: Set<Value>; // Names of nodes that we want to wait for.\n seen: Set<Value>;\n constructor(names: Set<Value>);\n fromCheckpoint(checkpoint?: Value[]): this;\n update(values: Value[]): 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[];\n consume(): boolean;\n isAvailable(): boolean;\n}\n/**\n * A channel that waits until all named values are received before making the value ready to be made available.\n * It is only made available after finish() is called.\n * @internal\n */\nexport declare class NamedBarrierValueAfterFinish<Value> extends BaseChannel<void, Value, [\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(names: Set<Value>);\n fromCheckpoint(checkpoint?: [Value[], boolean]): this;\n update(values: Value[]): boolean;\n get(): void;\n checkpoint(): [Value[], boolean];\n consume(): boolean;\n finish(): boolean;\n isAvailable(): boolean;\n}\n"],"mappings":";;;;;AASA;;;;;;AAGcK,cAHOD,iBAGPC,CAAAA,KAAAA,CAAAA,SAHwCL,WAGxCK,CAAAA,IAAAA,EAH0DA,KAG1DA,EAHiEA,KAGjEA,EAAAA,CAAAA,CAAAA;eAAJF,EAAAA,MAAAA;OACiBE,EAFhBF,GAEgBE,CAFZA,KAEYA,CAAAA,CAAAA,CAAAA;MAAJF,EADbA,GACaA,CADTE,KACSF,CAAAA;aACSE,CAAAA,KAAAA,EADTF,GACSE,CADLA,KACKA,CAAAA;gBACbA,CAAAA,UAAAA,CAAAA,EADaA,KACbA,EAAAA,CAAAA,EAAAA,IAAAA;QAIDA,CAAAA,MAAAA,EAJCA,KAIDA,EAAAA,CAAAA,EAAAA,OAAAA;;;;gBAAAA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BaseChannel } from "./base.js";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
//#region src/channels/named_barrier_value.d.ts
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* A channel that waits until all named values are received before making the value available.
|
|
5
7
|
*
|
|
@@ -7,37 +9,25 @@ export declare const areSetsEqual: <T>(a: Set<T>, b: Set<T>) => boolean;
|
|
|
7
9
|
* until N and M have completed updating.
|
|
8
10
|
* @internal
|
|
9
11
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
declare class NamedBarrierValue<Value> extends BaseChannel<void, Value, Value[]> {
|
|
13
|
+
lc_graph_name: string;
|
|
14
|
+
names: Set<Value>; // Names of nodes that we want to wait for.
|
|
15
|
+
seen: Set<Value>;
|
|
16
|
+
constructor(names: Set<Value>);
|
|
17
|
+
fromCheckpoint(checkpoint?: Value[]): this;
|
|
18
|
+
update(values: Value[]): boolean;
|
|
19
|
+
// If we have not yet seen all the node names we want to wait for,
|
|
20
|
+
// throw an error to prevent continuing.
|
|
21
|
+
get(): void;
|
|
22
|
+
checkpoint(): Value[];
|
|
23
|
+
consume(): boolean;
|
|
24
|
+
isAvailable(): boolean;
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
27
|
* A channel that waits until all named values are received before making the value ready to be made available.
|
|
24
28
|
* It is only made available after finish() is called.
|
|
25
29
|
* @internal
|
|
26
30
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
]> {
|
|
31
|
-
lc_graph_name: string;
|
|
32
|
-
names: Set<Value>;
|
|
33
|
-
seen: Set<Value>;
|
|
34
|
-
finished: boolean;
|
|
35
|
-
constructor(names: Set<Value>);
|
|
36
|
-
fromCheckpoint(checkpoint?: [Value[], boolean]): this;
|
|
37
|
-
update(values: Value[]): boolean;
|
|
38
|
-
get(): void;
|
|
39
|
-
checkpoint(): [Value[], boolean];
|
|
40
|
-
consume(): boolean;
|
|
41
|
-
finish(): boolean;
|
|
42
|
-
isAvailable(): boolean;
|
|
43
|
-
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { NamedBarrierValue };
|
|
33
|
+
//# sourceMappingURL=named_barrier_value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"named_barrier_value.d.ts","names":["BaseChannel","areSetsEqual","T","Set","NamedBarrierValue","Value","NamedBarrierValueAfterFinish"],"sources":["../../src/channels/named_barrier_value.d.ts"],"sourcesContent":["import { BaseChannel } from \"./base.js\";\nexport declare const areSetsEqual: <T>(a: Set<T>, b: Set<T>) => boolean;\n/**\n * A channel that waits until all named values are received before making the value available.\n *\n * This ensures that if node N and node M both write to channel C, the value of C will not be updated\n * until N and M have completed updating.\n * @internal\n */\nexport declare class NamedBarrierValue<Value> extends BaseChannel<void, Value, Value[]> {\n lc_graph_name: string;\n names: Set<Value>; // Names of nodes that we want to wait for.\n seen: Set<Value>;\n constructor(names: Set<Value>);\n fromCheckpoint(checkpoint?: Value[]): this;\n update(values: Value[]): 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[];\n consume(): boolean;\n isAvailable(): boolean;\n}\n/**\n * A channel that waits until all named values are received before making the value ready to be made available.\n * It is only made available after finish() is called.\n * @internal\n */\nexport declare class NamedBarrierValueAfterFinish<Value> extends BaseChannel<void, Value, [\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(names: Set<Value>);\n fromCheckpoint(checkpoint?: [Value[], boolean]): this;\n update(values: Value[]): boolean;\n get(): void;\n checkpoint(): [Value[], boolean];\n consume(): boolean;\n finish(): boolean;\n isAvailable(): boolean;\n}\n"],"mappings":";;;;;AASA;;;;;;AAGcK,cAHOD,iBAGPC,CAAAA,KAAAA,CAAAA,SAHwCL,WAGxCK,CAAAA,IAAAA,EAH0DA,KAG1DA,EAHiEA,KAGjEA,EAAAA,CAAAA,CAAAA;eAAJF,EAAAA,MAAAA;OACiBE,EAFhBF,GAEgBE,CAFZA,KAEYA,CAAAA,CAAAA,CAAAA;MAAJF,EADbA,GACaA,CADTE,KACSF,CAAAA;aACSE,CAAAA,KAAAA,EADTF,GACSE,CADLA,KACKA,CAAAA;gBACbA,CAAAA,UAAAA,CAAAA,EADaA,KACbA,EAAAA,CAAAA,EAAAA,IAAAA;QAIDA,CAAAA,MAAAA,EAJCA,KAIDA,EAAAA,CAAAA,EAAAA,OAAAA;;;;gBAAAA"}
|