@langchain/langgraph 0.2.46 → 0.2.47

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.
@@ -5,77 +5,379 @@ import { BaseChannel } from "../channels/base.js";
5
5
  import { PregelNode } from "./read.js";
6
6
  import { ChannelWrite } from "./write.js";
7
7
  import { Command } from "../constants.js";
8
- import { PregelInterface, PregelParams, StateSnapshot, StreamMode, PregelInputType, PregelOutputType, PregelOptions } from "./types.js";
8
+ import { PregelInterface, PregelParams, StateSnapshot, StreamMode, PregelInputType, PregelOutputType, PregelOptions, SingleChannelSubscriptionOptions, MultipleChannelSubscriptionOptions, GetStateOptions } from "./types.js";
9
9
  import { StrRecord } from "./algo.js";
10
10
  import { RetryPolicy } from "./utils/index.js";
11
11
  import { ManagedValueMapping, type ManagedValueSpec } from "../managed/base.js";
12
12
  import { LangGraphRunnableConfig } from "./runnable_types.js";
13
13
  type WriteValue = Runnable | RunnableFunc<unknown, unknown> | unknown;
14
+ /**
15
+ * Utility class for working with channels in the Pregel system.
16
+ * Provides static methods for subscribing to channels and writing to them.
17
+ *
18
+ * Channels are the communication pathways between nodes in a Pregel graph.
19
+ * They enable message passing and state updates between different parts of the graph.
20
+ */
14
21
  export declare class Channel {
15
- static subscribeTo(channels: string, options?: {
16
- key?: string;
17
- tags?: string[];
18
- }): PregelNode;
19
- static subscribeTo(channels: string[], options?: {
20
- tags?: string[];
21
- }): PregelNode;
22
- static writeTo(channels: string[], kwargs?: Record<string, WriteValue>): ChannelWrite;
22
+ /**
23
+ * Creates a PregelNode that subscribes to a single channel.
24
+ * This is used to define how nodes receive input from channels.
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * // Subscribe to a single channel
29
+ * const node = Channel.subscribeTo("messages");
30
+ *
31
+ * // Subscribe to multiple channels
32
+ * const node = Channel.subscribeTo(["messages", "state"]);
33
+ *
34
+ * // Subscribe with a custom key
35
+ * const node = Channel.subscribeTo("messages", { key: "chat" });
36
+ * ```
37
+ *
38
+ * @param channel - Single channel name to subscribe to
39
+ * @param options - Subscription options
40
+ * @returns A PregelNode configured to receive from the specified channels
41
+ * @throws {Error} If a key is specified when subscribing to multiple channels
42
+ */
43
+ static subscribeTo(channel: string, options?: SingleChannelSubscriptionOptions): PregelNode;
44
+ /**
45
+ * Creates a PregelNode that subscribes to multiple channels.
46
+ * This is used to define how nodes receive input from channels.
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * // Subscribe to a single channel
51
+ * const node = Channel.subscribeTo("messages");
52
+ *
53
+ * // Subscribe to multiple channels
54
+ * const node = Channel.subscribeTo(["messages", "state"]);
55
+ *
56
+ * // Subscribe with a custom key
57
+ * const node = Channel.subscribeTo("messages", { key: "chat" });
58
+ * ```
59
+ *
60
+ * @param channel - Single channel name to subscribe to
61
+ * @param options - Subscription options
62
+ * @returns A PregelNode configured to receive from the specified channels
63
+ * @throws {Error} If a key is specified when subscribing to multiple channels
64
+ */
65
+ static subscribeTo(channels: string[], options?: MultipleChannelSubscriptionOptions): PregelNode;
66
+ /**
67
+ * Creates a ChannelWrite that specifies how to write values to channels.
68
+ * This is used to define how nodes send output to channels.
69
+ *
70
+ * @example
71
+ * ```typescript
72
+ * // Write to multiple channels
73
+ * const write = Channel.writeTo(["output", "state"]);
74
+ *
75
+ * // Write with specific values
76
+ * const write = Channel.writeTo(["output"], {
77
+ * state: "completed",
78
+ * result: calculateResult()
79
+ * });
80
+ *
81
+ * // Write with a transformation function
82
+ * const write = Channel.writeTo(["output"], {
83
+ * result: (x) => processResult(x)
84
+ * });
85
+ * ```
86
+ *
87
+ * @param channels - Array of channel names to write to
88
+ * @param writes - Optional map of channel names to values or transformations
89
+ * @returns A ChannelWrite object that can be used to write to the specified channels
90
+ */
91
+ static writeTo(channels: string[], writes?: Record<string, WriteValue>): ChannelWrite;
23
92
  }
24
93
  export type { PregelInputType, PregelOutputType, PregelOptions };
25
- export declare class Pregel<Nn extends StrRecord<string, PregelNode>, Cc extends StrRecord<string, BaseChannel | ManagedValueSpec>, ConfigurableFieldType extends Record<string, any> = StrRecord<string, any>, InputType = PregelInputType, OutputType = PregelOutputType> extends Runnable<InputType | Command | null, OutputType, PregelOptions<Nn, Cc, ConfigurableFieldType>> implements PregelInterface<Nn, Cc, ConfigurableFieldType>, PregelParams<Nn, Cc> {
94
+ /**
95
+ * The Pregel class is the core runtime engine of LangGraph, implementing a message-passing graph computation model
96
+ * inspired by [Google's Pregel system](https://research.google/pubs/pregel-a-system-for-large-scale-graph-processing/).
97
+ * It provides the foundation for building reliable, controllable agent workflows that can evolve state over time.
98
+ *
99
+ * Key features:
100
+ * - Message passing between nodes in discrete "supersteps"
101
+ * - Built-in persistence layer through checkpointers
102
+ * - First-class streaming support for values, updates, and events
103
+ * - Human-in-the-loop capabilities via interrupts
104
+ * - Support for parallel node execution within supersteps
105
+ *
106
+ * The Pregel class is not intended to be instantiated directly by consumers. Instead, use the following higher-level APIs:
107
+ * - {@link StateGraph}: The main graph class for building agent workflows
108
+ * - Compiling a {@link StateGraph} will return a {@link CompiledGraph} instance, which extends `Pregel`
109
+ * - Functional API: A declarative approach using tasks and entrypoints
110
+ * - A `Pregel` instance is returned by the {@link entrypoint} function
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * // Using StateGraph API
115
+ * const graph = new StateGraph(annotation)
116
+ * .addNode("nodeA", myNodeFunction)
117
+ * .addEdge("nodeA", "nodeB")
118
+ * .compile();
119
+ *
120
+ * // The compiled graph is a Pregel instance
121
+ * const result = await graph.invoke(input);
122
+ * ```
123
+ *
124
+ * @example
125
+ * ```typescript
126
+ * // Using Functional API
127
+ * import { task, entrypoint } from "@langchain/langgraph";
128
+ * import { MemorySaver } from "@langchain/langgraph-checkpoint";
129
+ *
130
+ * // Define tasks that can be composed
131
+ * const addOne = task("add", async (x: number) => x + 1);
132
+ *
133
+ * // Create a workflow using the entrypoint function
134
+ * const workflow = entrypoint({
135
+ * name: "workflow",
136
+ * checkpointer: new MemorySaver()
137
+ * }, async (numbers: number[]) => {
138
+ * // Tasks can be run in parallel
139
+ * const results = await Promise.all(numbers.map(n => addOne(n)));
140
+ * return results;
141
+ * });
142
+ *
143
+ * // The workflow is a Pregel instance
144
+ * const result = await workflow.invoke([1, 2, 3]); // Returns [2, 3, 4]
145
+ * ```
146
+ *
147
+ * @typeParam Nodes - Mapping of node names to their {@link PregelNode} implementations
148
+ * @typeParam Channels - Mapping of channel names to their {@link BaseChannel} or {@link ManagedValueSpec} implementations
149
+ * @typeParam ConfigurableFieldType - Type of configurable fields that can be passed to the graph
150
+ * @typeParam InputType - Type of input values accepted by the graph
151
+ * @typeParam OutputType - Type of output values produced by the graph
152
+ */
153
+ export declare class Pregel<Nodes extends StrRecord<string, PregelNode>, Channels extends StrRecord<string, BaseChannel | ManagedValueSpec>, ConfigurableFieldType extends Record<string, any> = StrRecord<string, any>, InputType = PregelInputType, OutputType = PregelOutputType> extends Runnable<InputType | Command | null, OutputType, PregelOptions<Nodes, Channels, ConfigurableFieldType>> implements PregelInterface<Nodes, Channels, ConfigurableFieldType>, PregelParams<Nodes, Channels> {
154
+ /**
155
+ * Name of the class when serialized
156
+ * @internal
157
+ */
26
158
  static lc_name(): string;
27
- /** @internal Used for type inferrence */
159
+ /** @internal Used for type inference */
28
160
  "~InputType": InputType;
29
- /** @internal Used for type inferrence */
161
+ /** @internal Used for type inference */
30
162
  "~OutputType": OutputType;
163
+ /** @internal LangChain namespace for serialization necessary because Pregel extends Runnable */
31
164
  lc_namespace: string[];
165
+ /** @internal Flag indicating this is a Pregel instance - necessary for serialization */
32
166
  lg_is_pregel: boolean;
33
- nodes: Nn;
34
- channels: Cc;
35
- inputChannels: keyof Cc | Array<keyof Cc>;
36
- outputChannels: keyof Cc | Array<keyof Cc>;
167
+ /** The nodes in the graph, mapping node names to their PregelNode instances */
168
+ nodes: Nodes;
169
+ /** The channels in the graph, mapping channel names to their BaseChannel or ManagedValueSpec instances */
170
+ channels: Channels;
171
+ /**
172
+ * The input channels for the graph. These channels receive the initial input when the graph is invoked.
173
+ * Can be a single channel key or an array of channel keys.
174
+ */
175
+ inputChannels: keyof Channels | Array<keyof Channels>;
176
+ /**
177
+ * The output channels for the graph. These channels contain the final output when the graph completes.
178
+ * Can be a single channel key or an array of channel keys.
179
+ */
180
+ outputChannels: keyof Channels | Array<keyof Channels>;
181
+ /** Whether to automatically validate the graph structure when it is compiled. Defaults to true. */
37
182
  autoValidate: boolean;
183
+ /**
184
+ * The streaming modes enabled for this graph. Defaults to ["values"].
185
+ * Supported modes:
186
+ * - "values": Streams the full state after each step
187
+ * - "updates": Streams state updates after each step
188
+ * - "messages": Streams messages from within nodes
189
+ * - "custom": Streams custom events from within nodes
190
+ * - "debug": Streams events related to the execution of the graph - useful for tracing & debugging graph execution
191
+ */
38
192
  streamMode: StreamMode[];
39
- streamChannels?: keyof Cc | Array<keyof Cc>;
40
- interruptAfter?: Array<keyof Nn> | All;
41
- interruptBefore?: Array<keyof Nn> | All;
193
+ /**
194
+ * Optional channels to stream. If not specified, all channels will be streamed.
195
+ * Can be a single channel key or an array of channel keys.
196
+ */
197
+ streamChannels?: keyof Channels | Array<keyof Channels>;
198
+ /**
199
+ * Optional array of node names or "all" to interrupt after executing these nodes.
200
+ * Used for implementing human-in-the-loop workflows.
201
+ */
202
+ interruptAfter?: Array<keyof Nodes> | All;
203
+ /**
204
+ * Optional array of node names or "all" to interrupt before executing these nodes.
205
+ * Used for implementing human-in-the-loop workflows.
206
+ */
207
+ interruptBefore?: Array<keyof Nodes> | All;
208
+ /** Optional timeout in milliseconds for the execution of each superstep */
42
209
  stepTimeout?: number;
210
+ /** Whether to enable debug logging. Defaults to false. */
43
211
  debug: boolean;
212
+ /**
213
+ * Optional checkpointer for persisting graph state.
214
+ * When provided, saves a checkpoint of the graph state at every superstep.
215
+ * When false or undefined, checkpointing is disabled, and the graph will not be able to save or restore state.
216
+ */
44
217
  checkpointer?: BaseCheckpointSaver | false;
218
+ /** Optional retry policy for handling failures in node execution */
45
219
  retryPolicy?: RetryPolicy;
220
+ /** The default configuration for graph execution, can be overridden on a per-invocation basis */
46
221
  config?: LangGraphRunnableConfig;
222
+ /**
223
+ * Optional long-term memory store for the graph, allows for persistance & retrieval of data across threads
224
+ */
47
225
  store?: BaseStore;
48
- constructor(fields: PregelParams<Nn, Cc>);
226
+ /**
227
+ * Constructor for Pregel - meant for internal use only.
228
+ *
229
+ * @internal
230
+ */
231
+ constructor(fields: PregelParams<Nodes, Channels>);
232
+ /**
233
+ * Creates a new instance of the Pregel graph with updated configuration.
234
+ * This method follows the immutable pattern - instead of modifying the current instance,
235
+ * it returns a new instance with the merged configuration.
236
+ *
237
+ * @example
238
+ * ```typescript
239
+ * // Create a new instance with debug enabled
240
+ * const debugGraph = graph.withConfig({ debug: true });
241
+ *
242
+ * // Create a new instance with a specific thread ID
243
+ * const threadGraph = graph.withConfig({
244
+ * configurable: { thread_id: "123" }
245
+ * });
246
+ * ```
247
+ *
248
+ * @param config - The configuration to merge with the current configuration
249
+ * @returns A new Pregel instance with the merged configuration
250
+ */
49
251
  withConfig(config: RunnableConfig): typeof this;
252
+ /**
253
+ * Validates the graph structure to ensure it is well-formed.
254
+ * Checks for:
255
+ * - No orphaned nodes
256
+ * - Valid input/output channel configurations
257
+ * - Valid interrupt configurations
258
+ *
259
+ * @returns this - The Pregel instance for method chaining
260
+ * @throws {GraphValidationError} If the graph structure is invalid
261
+ */
50
262
  validate(): this;
51
- get streamChannelsList(): Array<keyof Cc>;
52
- get streamChannelsAsIs(): keyof Cc | Array<keyof Cc>;
263
+ /**
264
+ * Gets a list of all channels that should be streamed.
265
+ * If streamChannels is specified, returns those channels.
266
+ * Otherwise, returns all channels in the graph.
267
+ *
268
+ * @returns Array of channel keys to stream
269
+ */
270
+ get streamChannelsList(): Array<keyof Channels>;
271
+ /**
272
+ * Gets the channels to stream in their original format.
273
+ * If streamChannels is specified, returns it as-is (either single key or array).
274
+ * Otherwise, returns all channels in the graph as an array.
275
+ *
276
+ * @returns Channel keys to stream, either as a single key or array
277
+ */
278
+ get streamChannelsAsIs(): keyof Channels | Array<keyof Channels>;
279
+ /**
280
+ * Gets a drawable representation of the graph structure.
281
+ * This is an async version of getGraph() and is the preferred method to use.
282
+ *
283
+ * @param config - Configuration for generating the graph visualization
284
+ * @returns A representation of the graph that can be visualized
285
+ */
53
286
  getGraphAsync(config: RunnableConfig): Promise<import("@langchain/core/runnables/graph").Graph>;
54
- /** @deprecated Use getSubgraphsAsync instead. The async method will become the default in the next minor release. */
287
+ /**
288
+ * Gets all subgraphs within this graph.
289
+ * A subgraph is a Pregel instance that is nested within a node of this graph.
290
+ *
291
+ * @deprecated Use getSubgraphsAsync instead. The async method will become the default in the next minor release.
292
+ * @param namespace - Optional namespace to filter subgraphs
293
+ * @param recurse - Whether to recursively get subgraphs of subgraphs
294
+ * @returns Generator yielding tuples of [name, subgraph]
295
+ */
55
296
  getSubgraphs(namespace?: string, recurse?: boolean): Generator<[string, Pregel<any, any>]>;
297
+ /**
298
+ * Gets all subgraphs within this graph asynchronously.
299
+ * A subgraph is a Pregel instance that is nested within a node of this graph.
300
+ *
301
+ * @param namespace - Optional namespace to filter subgraphs
302
+ * @param recurse - Whether to recursively get subgraphs of subgraphs
303
+ * @returns AsyncGenerator yielding tuples of [name, subgraph]
304
+ */
56
305
  getSubgraphsAsync(namespace?: string, recurse?: boolean): AsyncGenerator<[string, Pregel<any, any>]>;
306
+ /**
307
+ * Prepares a state snapshot from saved checkpoint data.
308
+ * This is an internal method used by getState and getStateHistory.
309
+ *
310
+ * @param config - Configuration for preparing the snapshot
311
+ * @param saved - Optional saved checkpoint data
312
+ * @param subgraphCheckpointer - Optional checkpointer for subgraphs
313
+ * @returns A snapshot of the graph state
314
+ * @internal
315
+ */
57
316
  protected _prepareStateSnapshot({ config, saved, subgraphCheckpointer, }: {
58
317
  config: RunnableConfig;
59
318
  saved?: CheckpointTuple;
60
319
  subgraphCheckpointer?: BaseCheckpointSaver;
61
320
  }): Promise<StateSnapshot>;
62
321
  /**
63
- * Get the current state of the graph.
322
+ * Gets the current state of the graph.
323
+ * Requires a checkpointer to be configured.
324
+ *
325
+ * @param config - Configuration for retrieving the state
326
+ * @param options - Additional options
327
+ * @returns A snapshot of the current graph state
328
+ * @throws {GraphValueError} If no checkpointer is configured
64
329
  */
65
- getState(config: RunnableConfig, options?: {
66
- subgraphs?: boolean;
67
- }): Promise<StateSnapshot>;
330
+ getState(config: RunnableConfig, options?: GetStateOptions): Promise<StateSnapshot>;
68
331
  /**
69
- * Get the history of the state of the graph.
332
+ * Gets the history of graph states.
333
+ * Requires a checkpointer to be configured.
334
+ * Useful for:
335
+ * - Debugging execution history
336
+ * - Implementing time travel
337
+ * - Analyzing graph behavior
338
+ *
339
+ * @param config - Configuration for retrieving the history
340
+ * @param options - Options for filtering the history
341
+ * @returns An async iterator of state snapshots
342
+ * @throws {Error} If no checkpointer is configured
70
343
  */
71
344
  getStateHistory(config: RunnableConfig, options?: CheckpointListOptions): AsyncIterableIterator<StateSnapshot>;
72
345
  /**
73
- * Update the state of the graph with the given values, as if they came from
74
- * node `as_node`. If `as_node` is not provided, it will be set to the last node
75
- * that updated the state, if not ambiguous.
346
+ * Updates the state of the graph with new values.
347
+ * Requires a checkpointer to be configured.
348
+ *
349
+ * This method can be used for:
350
+ * - Implementing human-in-the-loop workflows
351
+ * - Modifying graph state during breakpoints
352
+ * - Integrating external inputs into the graph
353
+ *
354
+ * @param inputConfig - Configuration for the update
355
+ * @param values - The values to update the state with
356
+ * @param asNode - Optional node name to attribute the update to
357
+ * @returns Updated configuration
358
+ * @throws {GraphValueError} If no checkpointer is configured
359
+ * @throws {InvalidUpdateError} If the update cannot be attributed to a node
76
360
  */
77
- updateState(inputConfig: LangGraphRunnableConfig, values: Record<string, unknown> | unknown, asNode?: keyof Nn | string): Promise<RunnableConfig>;
78
- _defaults(config: PregelOptions<Nn, Cc>): [
361
+ updateState(inputConfig: LangGraphRunnableConfig, values: Record<string, unknown> | unknown, asNode?: keyof Nodes | string): Promise<RunnableConfig>;
362
+ /**
363
+ * Gets the default values for various graph configuration options.
364
+ * This is an internal method used to process and normalize configuration options.
365
+ *
366
+ * @param config - The input configuration options
367
+ * @returns A tuple containing normalized values for:
368
+ * - debug mode
369
+ * - stream modes
370
+ * - input keys
371
+ * - output keys
372
+ * - remaining config
373
+ * - interrupt before nodes
374
+ * - interrupt after nodes
375
+ * - checkpointer
376
+ * - store
377
+ * - whether stream mode is single
378
+ * @internal
379
+ */
380
+ _defaults(config: PregelOptions<Nodes, Channels>): [
79
381
  boolean,
80
382
  StreamMode[],
81
383
  // stream mode
@@ -93,43 +395,54 @@ export declare class Pregel<Nn extends StrRecord<string, PregelNode>, Cc extends
93
395
  boolean
94
396
  ];
95
397
  /**
96
- * Stream graph steps for a single input.
97
- * @param input The input to the graph.
98
- * @param options The configuration to use for the run.
99
- * @param options.streamMode The mode to stream output. Defaults to value set on initialization.
100
- * Options are "values", "updates", and "debug". Default is "values".
101
- * values: Emit the current values of the state for each step.
102
- * updates: Emit only the updates to the state for each step.
103
- * Output is a dict with the node name as key and the updated values as value.
104
- * debug: Emit debug events for each step.
105
- * @param options.outputKeys The keys to stream. Defaults to all non-context channels.
106
- * @param options.interruptBefore Nodes to interrupt before.
107
- * @param options.interruptAfter Nodes to interrupt after.
108
- * @param options.debug Whether to print debug information during execution.
109
- */
110
- stream(input: InputType | Command | null, options?: Partial<PregelOptions<Nn, Cc, ConfigurableFieldType>>): Promise<IterableReadableStream<PregelOutputType>>;
398
+ * Streams the execution of the graph, emitting state updates as they occur.
399
+ * This is the primary method for observing graph execution in real-time.
400
+ *
401
+ * Stream modes:
402
+ * - "values": Emits complete state after each step
403
+ * - "updates": Emits only state changes after each step
404
+ * - "debug": Emits detailed debug information
405
+ * - "messages": Emits messages from within nodes
406
+ *
407
+ * For more details, see the [Streaming how-to guides](../../how-tos/#streaming_1).
408
+ *
409
+ * @param input - The input to start graph execution with
410
+ * @param options - Configuration options for streaming
411
+ * @returns An async iterable stream of graph state updates
412
+ */
413
+ stream(input: InputType | Command | null, options?: Partial<PregelOptions<Nodes, Channels, ConfigurableFieldType>>): Promise<IterableReadableStream<PregelOutputType>>;
414
+ /**
415
+ * Prepares channel specifications and managed values for graph execution.
416
+ * This is an internal method used to set up the graph's communication channels
417
+ * and managed state before execution.
418
+ *
419
+ * @param config - Configuration for preparing specs
420
+ * @param options - Additional options
421
+ * @param options.skipManaged - Whether to skip initialization of managed values
422
+ * @returns Object containing channel specs and managed value mapping
423
+ * @internal
424
+ */
111
425
  protected prepareSpecs(config: RunnableConfig, options?: {
112
426
  skipManaged?: boolean;
113
427
  }): Promise<{
114
428
  channelSpecs: Record<string, BaseChannel<unknown, unknown, unknown>>;
115
429
  managed: ManagedValueMapping;
116
430
  }>;
117
- _streamIterator(input: PregelInputType | Command, options?: Partial<PregelOptions<Nn, Cc>>): AsyncGenerator<PregelOutputType>;
431
+ /**
432
+ * Internal iterator used by stream() to generate state updates.
433
+ * This method handles the core logic of graph execution and streaming.
434
+ *
435
+ * @param input - The input to start graph execution with
436
+ * @param options - Configuration options for streaming
437
+ * @returns AsyncGenerator yielding state updates
438
+ * @internal
439
+ */
440
+ _streamIterator(input: PregelInputType | Command, options?: Partial<PregelOptions<Nodes, Channels>>): AsyncGenerator<PregelOutputType>;
118
441
  /**
119
442
  * Run the graph with a single input and config.
120
443
  * @param input The input to the graph.
121
444
  * @param options The configuration to use for the run.
122
- * @param options.streamMode The mode to stream output. Defaults to value set on initialization.
123
- * Options are "values", "updates", and "debug". Default is "values".
124
- * values: Emit the current values of the state for each step.
125
- * updates: Emit only the updates to the state for each step.
126
- * Output is a dict with the node name as key and the updated values as value.
127
- * debug: Emit debug events for each step.
128
- * @param options.outputKeys The keys to stream. Defaults to all non-context channels.
129
- * @param options.interruptBefore Nodes to interrupt before.
130
- * @param options.interruptAfter Nodes to interrupt after.
131
- * @param options.debug Whether to print debug information during execution.
132
- */
133
- invoke(input: InputType | Command | null, options?: Partial<PregelOptions<Nn, Cc, ConfigurableFieldType>>): Promise<OutputType>;
445
+ */
446
+ invoke(input: InputType | Command | null, options?: Partial<PregelOptions<Nodes, Channels, ConfigurableFieldType>>): Promise<OutputType>;
134
447
  private _runLoop;
135
448
  }