@langchain/langgraph 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channels/index.cjs +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/graph/message.d.cts +2 -2
- package/dist/graph/message.d.cts.map +1 -1
- package/dist/graph/message.d.ts +2 -2
- package/dist/graph/message.d.ts.map +1 -1
- package/dist/graph/messages_annotation.d.ts +5 -5
- package/dist/graph/messages_annotation.d.ts.map +1 -1
- package/dist/graph/state.cjs +59 -0
- package/dist/graph/state.cjs.map +1 -1
- package/dist/graph/state.d.cts +59 -0
- package/dist/graph/state.d.cts.map +1 -1
- package/dist/graph/state.d.ts +59 -0
- package/dist/graph/state.d.ts.map +1 -1
- package/dist/graph/state.js +59 -0
- package/dist/graph/state.js.map +1 -1
- package/dist/graph/zod/index.cjs +1 -0
- package/dist/graph/zod/meta.cjs +3 -3
- package/dist/graph/zod/meta.cjs.map +1 -1
- package/dist/graph/zod/meta.d.cts +3 -3
- package/dist/graph/zod/meta.d.cts.map +1 -1
- package/dist/graph/zod/meta.d.ts +3 -3
- package/dist/graph/zod/meta.d.ts.map +1 -1
- package/dist/graph/zod/meta.js +3 -3
- package/dist/graph/zod/meta.js.map +1 -1
- package/dist/graph/zod/schema.cjs +1 -0
- package/dist/graph/zod/schema.cjs.map +1 -1
- package/dist/graph/zod/zod-registry.d.cts.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/prebuilt/agent_executor.d.cts +5 -5
- package/dist/prebuilt/agent_executor.d.cts.map +1 -1
- package/dist/prebuilt/agent_executor.d.ts +5 -5
- package/dist/prebuilt/agent_executor.d.ts.map +1 -1
- package/dist/prebuilt/index.cjs +1 -0
- package/dist/prebuilt/react_agent_executor.d.cts +3 -3
- package/dist/prebuilt/react_agent_executor.d.cts.map +1 -1
- package/dist/prebuilt/react_agent_executor.d.ts +3 -3
- package/dist/prebuilt/react_agent_executor.d.ts.map +1 -1
- package/dist/pregel/index.cjs +1 -0
- package/dist/pregel/index.cjs.map +1 -1
- package/dist/pregel/remote.cjs +1 -1
- package/dist/pregel/remote.cjs.map +1 -1
- package/dist/pregel/remote.js +2 -2
- package/dist/pregel/remote.js.map +1 -1
- package/dist/remote.cjs +1 -0
- package/dist/state/schema.cjs +2 -2
- package/dist/state/schema.cjs.map +1 -1
- package/dist/state/schema.js +2 -2
- package/dist/state/schema.js.map +1 -1
- package/dist/web.cjs +1 -0
- package/package.json +6 -6
package/dist/graph/state.d.cts
CHANGED
|
@@ -66,6 +66,36 @@ type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
|
66
66
|
* After adding nodes and edges to your graph, you must call `.compile()` on it before
|
|
67
67
|
* you can use it.
|
|
68
68
|
*
|
|
69
|
+
* @typeParam SD - The state definition used to construct the graph. Can be an
|
|
70
|
+
* {@link AnnotationRoot}, {@link StateSchema}, or Zod object schema. This is the
|
|
71
|
+
* primary generic from which `S` and `U` are derived.
|
|
72
|
+
*
|
|
73
|
+
* @typeParam S - The full state type representing the complete shape of your graph's
|
|
74
|
+
* state after all reducers have been applied. Automatically inferred from `SD`.
|
|
75
|
+
*
|
|
76
|
+
* @typeParam U - The update type representing what nodes can return to modify state.
|
|
77
|
+
* Typically a partial of the state type. Automatically inferred from `SD`.
|
|
78
|
+
*
|
|
79
|
+
* @typeParam N - Union of all node names in the graph (e.g., `"agent" | "tool"`).
|
|
80
|
+
* Accumulated as you call `.addNode()`. Used for type-safe routing.
|
|
81
|
+
*
|
|
82
|
+
* @typeParam I - The input schema definition. Set via the `input` option in the
|
|
83
|
+
* constructor to restrict what data the graph accepts when invoked.
|
|
84
|
+
*
|
|
85
|
+
* @typeParam O - The output schema definition. Set via the `output` option in the
|
|
86
|
+
* constructor to restrict what data the graph returns after execution.
|
|
87
|
+
*
|
|
88
|
+
* @typeParam C - The config/context schema definition. Set via the `context` option
|
|
89
|
+
* to define additional configuration passed at runtime.
|
|
90
|
+
*
|
|
91
|
+
* @typeParam NodeReturnType - Constrains what types nodes in this graph can return.
|
|
92
|
+
*
|
|
93
|
+
* @typeParam InterruptType - The type for {@link interrupt} resume values. Set via
|
|
94
|
+
* the `interrupt` option for typed human-in-the-loop patterns.
|
|
95
|
+
*
|
|
96
|
+
* @typeParam WriterType - The type for custom stream writers. Set via the `writer`
|
|
97
|
+
* option to enable typed custom streaming from within nodes.
|
|
98
|
+
*
|
|
69
99
|
* @example
|
|
70
100
|
* ```ts
|
|
71
101
|
* import {
|
|
@@ -238,6 +268,35 @@ declare class StateGraph<SD extends StateDefinitionInit | unknown, S = ExtractSt
|
|
|
238
268
|
* Final result from building and compiling a {@link StateGraph}.
|
|
239
269
|
* Should not be instantiated directly, only using the StateGraph `.compile()`
|
|
240
270
|
* instance method.
|
|
271
|
+
*
|
|
272
|
+
* @typeParam S - The full state type representing the complete shape of your graph's
|
|
273
|
+
* state after all reducers have been applied. This is the type you receive when
|
|
274
|
+
* reading state in nodes or after invoking the graph.
|
|
275
|
+
*
|
|
276
|
+
* @typeParam U - The update type representing what nodes can return to modify state.
|
|
277
|
+
* Typically a partial of the state type, allowing nodes to update only specific fields.
|
|
278
|
+
* Can also include {@link Command} objects for advanced control flow.
|
|
279
|
+
*
|
|
280
|
+
* @typeParam N - Union of all node names in the graph (e.g., `"agent" | "tool"`).
|
|
281
|
+
* Used for type-safe routing with {@link Command.goto} and edge definitions.
|
|
282
|
+
*
|
|
283
|
+
* @typeParam I - The input schema definition. Determines what shape of data the graph
|
|
284
|
+
* accepts when invoked. Defaults to the main state schema if not explicitly set.
|
|
285
|
+
*
|
|
286
|
+
* @typeParam O - The output schema definition. Determines what shape of data the graph
|
|
287
|
+
* returns after execution. Defaults to the main state schema if not explicitly set.
|
|
288
|
+
*
|
|
289
|
+
* @typeParam C - The config/context schema definition. Defines additional configuration
|
|
290
|
+
* that can be passed to the graph at runtime via {@link LangGraphRunnableConfig}.
|
|
291
|
+
*
|
|
292
|
+
* @typeParam NodeReturnType - Constrains what types nodes in this graph can return.
|
|
293
|
+
* Useful for enforcing consistent return patterns across all nodes.
|
|
294
|
+
*
|
|
295
|
+
* @typeParam InterruptType - The type of values that can be passed when resuming from
|
|
296
|
+
* an {@link interrupt}. Used with human-in-the-loop patterns.
|
|
297
|
+
*
|
|
298
|
+
* @typeParam WriterType - The type for custom stream writers. Used with the `writer`
|
|
299
|
+
* option to enable typed custom streaming from within nodes.
|
|
241
300
|
*/
|
|
242
301
|
declare class CompiledStateGraph<S, U, N extends string = typeof START, I extends StateDefinitionInit = StateDefinition, O extends StateDefinitionInit = StateDefinition, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>> {
|
|
243
302
|
builder: StateGraph<unknown, S, U, N, I, O, C, NodeReturnType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.cts","names":["All","BaseCache","BaseCheckpointSaver","BaseStore","InteropZodObject","RunnableLike","Runtime","BaseChannel","CompiledGraph","Graph","Branch","AddNodeOptions","NodeSpec","Command","START","END","CommandInstance","Interrupt","INTERRUPT","AnnotationRoot","SingleReducer","StateDefinition","StateType","CachePolicy","RetryPolicy","SchemaMetaRegistry","InferInterruptResumeType","InferInterruptInputType","InferWriterType","AnyStateSchema","ContextSchemaInit","ExtractStateType","ExtractUpdateType","StateGraphInit","StateGraphOptions","ToStateDefinition","StateDefinitionInit","ChannelReducers","Channels","K","StateGraphArgs","StateGraphNodeSpec","RunInput","RunOutput","StateGraphAddNodeOptions","InputSchema","Nodes","StateGraphArgsWithStateSchema","SD","I","O","StateGraphArgsWithInputOutputSchemas","ExtractStateDefinition","T","NodeAction","S","U","Record","C","InterruptType","WriterType","StrictNodeAction","Prettify","PartialStateSchema","MergeReturnType","Prev","Curr","StateGraph","N","Set","Map","Omit","NodeMap","NodeReturnType","key","NodeInput","NodeOutput","checkpointer","store","cache","interruptBefore","interruptAfter","name","description","CompiledStateGraph","ConstructorParameters","Promise","Partial"],"sources":["../../src/graph/state.d.ts"],"sourcesContent":["import { All, type BaseCache, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { type InteropZodObject } from \"@langchain/core/utils/types\";\nimport type { RunnableLike, Runtime } from \"../pregel/runnable_types.js\";\nimport { BaseChannel } from \"../channels/base.js\";\nimport { CompiledGraph, Graph, Branch, AddNodeOptions, NodeSpec } from \"./graph.js\";\nimport { Command, START, END, CommandInstance, Interrupt, INTERRUPT } from \"../constants.js\";\nimport { AnnotationRoot, SingleReducer, StateDefinition, StateType } from \"./annotation.js\";\nimport type { CachePolicy, RetryPolicy } from \"../pregel/utils/index.js\";\nimport { type SchemaMetaRegistry } from \"./zod/meta.js\";\nimport type { InferInterruptResumeType, InferInterruptInputType } from \"../interrupt.js\";\nimport type { InferWriterType } from \"../writer.js\";\nimport type { AnyStateSchema } from \"../state/schema.js\";\nimport { ContextSchemaInit, ExtractStateType, ExtractUpdateType, StateGraphInit, StateGraphOptions, ToStateDefinition, type StateDefinitionInit } from \"./types.js\";\nexport type ChannelReducers<Channels extends object> = {\n [K in keyof Channels]: SingleReducer<Channels[K], any>;\n};\nexport interface StateGraphArgs<Channels extends object | unknown> {\n channels: Channels extends object ? Channels extends unknown[] ? ChannelReducers<{\n __root__: Channels;\n }> : ChannelReducers<Channels> : ChannelReducers<{\n __root__: Channels;\n }>;\n}\nexport type StateGraphNodeSpec<RunInput, RunOutput> = NodeSpec<RunInput, RunOutput> & {\n input?: StateDefinition;\n retryPolicy?: RetryPolicy;\n cachePolicy?: CachePolicy;\n};\n/**\n * Options for StateGraph.addNode() method.\n *\n * @template Nodes - Node name constraints\n * @template InputSchema - Per-node input schema type (inferred from options.input)\n */\nexport type StateGraphAddNodeOptions<Nodes extends string = string, InputSchema extends StateDefinitionInit | undefined = StateDefinitionInit | undefined> = {\n retryPolicy?: RetryPolicy;\n cachePolicy?: CachePolicy | boolean;\n input?: InputSchema;\n} & AddNodeOptions<Nodes>;\nexport type StateGraphArgsWithStateSchema<SD extends StateDefinition, I extends StateDefinition, O extends StateDefinition> = {\n stateSchema: AnnotationRoot<SD>;\n input?: AnnotationRoot<I>;\n output?: AnnotationRoot<O>;\n};\nexport type StateGraphArgsWithInputOutputSchemas<SD extends StateDefinition, O extends StateDefinition = SD> = {\n input: AnnotationRoot<SD>;\n output: AnnotationRoot<O>;\n};\ntype ExtractStateDefinition<T> = T extends AnyStateSchema ? T : T extends StateDefinitionInit ? ToStateDefinition<T> : StateDefinition;\ntype NodeAction<S, U, C extends StateDefinitionInit, InterruptType, WriterType> = RunnableLike<S, U extends object ? U & Record<string, any> : U, Runtime<StateType<ToStateDefinition<C>>, InterruptType, WriterType>>;\ntype StrictNodeAction<S, U, C extends StateDefinitionInit, Nodes extends string, InterruptType, WriterType> = RunnableLike<Prettify<S>, U | Command<InferInterruptResumeType<InterruptType>, U & Record<string, any>, Nodes>, Runtime<StateType<ToStateDefinition<C>>, InterruptType, WriterType>>;\ndeclare const PartialStateSchema: unique symbol;\ntype PartialStateSchema = typeof PartialStateSchema;\ntype MergeReturnType<Prev, Curr> = Prev & Curr extends infer T ? {\n [K in keyof T]: T[K];\n} & unknown : never;\ntype Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n/**\n * A graph whose nodes communicate by reading and writing to a shared state.\n * Each node takes a defined `State` as input and returns a `Partial<State>`.\n *\n * Each state key can optionally be annotated with a reducer function that\n * will be used to aggregate the values of that key received from multiple nodes.\n * The signature of a reducer function is (left: Value, right: UpdateValue) => Value.\n *\n * See {@link Annotation} for more on defining state.\n *\n * After adding nodes and edges to your graph, you must call `.compile()` on it before\n * you can use it.\n *\n * @example\n * ```ts\n * import {\n * type BaseMessage,\n * AIMessage,\n * HumanMessage,\n * } from \"@langchain/core/messages\";\n * import { StateGraph, Annotation } from \"@langchain/langgraph\";\n *\n * // Define a state with a single key named \"messages\" that will\n * // combine a returned BaseMessage or arrays of BaseMessages\n * const StateAnnotation = Annotation.Root({\n * sentiment: Annotation<string>,\n * messages: Annotation<BaseMessage[]>({\n * reducer: (left: BaseMessage[], right: BaseMessage | BaseMessage[]) => {\n * if (Array.isArray(right)) {\n * return left.concat(right);\n * }\n * return left.concat([right]);\n * },\n * default: () => [],\n * }),\n * });\n *\n * const graphBuilder = new StateGraph(StateAnnotation);\n *\n * // A node in the graph that returns an object with a \"messages\" key\n * // will update the state by combining the existing value with the returned one.\n * const myNode = (state: typeof StateAnnotation.State) => {\n * return {\n * messages: [new AIMessage(\"Some new response\")],\n * sentiment: \"positive\",\n * };\n * };\n *\n * const graph = graphBuilder\n * .addNode(\"myNode\", myNode)\n * .addEdge(\"__start__\", \"myNode\")\n * .addEdge(\"myNode\", \"__end__\")\n * .compile();\n *\n * await graph.invoke({ messages: [new HumanMessage(\"how are you?\")] });\n *\n * // {\n * // messages: [HumanMessage(\"how are you?\"), AIMessage(\"Some new response\")],\n * // sentiment: \"positive\",\n * // }\n * ```\n */\nexport declare class StateGraph<SD extends StateDefinitionInit | unknown, S = ExtractStateType<SD>, U = ExtractUpdateType<SD, S>, N extends string = typeof START, I extends StateDefinitionInit = ExtractStateDefinition<SD>, O extends StateDefinitionInit = ExtractStateDefinition<SD>, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends Graph<N, S, U, StateGraphNodeSpec<S, U>, ToStateDefinition<C>> {\n channels: Record<string, BaseChannel>;\n waitingEdges: Set<[N[], N]>;\n /** @internal */\n _schemaDefinition: StateDefinition;\n /** @internal */\n _schemaRuntimeDefinition: InteropZodObject | AnyStateSchema | undefined;\n /** @internal */\n _inputDefinition: I;\n /** @internal */\n _inputRuntimeDefinition: InteropZodObject | AnyStateSchema | PartialStateSchema | undefined;\n /** @internal */\n _outputDefinition: O;\n /** @internal */\n _outputRuntimeDefinition: InteropZodObject | AnyStateSchema | undefined;\n /**\n * Map schemas to managed values\n * @internal\n */\n _schemaDefinitions: Map<any, any>;\n /** @internal */\n _metaRegistry: SchemaMetaRegistry;\n /** @internal Used only for typing. */\n _configSchema: ToStateDefinition<C> | undefined;\n /** @internal */\n _configRuntimeSchema: InteropZodObject | undefined;\n /** @internal */\n _interrupt: InterruptType;\n /** @internal */\n _writer: WriterType;\n Node: StrictNodeAction<S, U, C, N, InterruptType, WriterType>;\n /**\n * Create a new StateGraph for building stateful, multi-step workflows.\n *\n * Accepts state definitions via `Annotation.Root`, `StateSchema`, or Zod schemas.\n *\n * @example Direct schema\n * ```ts\n * const StateAnnotation = Annotation.Root({\n * messages: Annotation<string[]>({ reducer: (a, b) => [...a, ...b] }),\n * });\n * const graph = new StateGraph(StateAnnotation);\n * ```\n *\n * @example Direct schema with input/output filtering\n * ```ts\n * const graph = new StateGraph(StateAnnotation, {\n * input: InputSchema,\n * output: OutputSchema,\n * });\n * ```\n *\n * @example Object pattern with state, input, output\n * ```ts\n * const graph = new StateGraph({\n * state: FullStateSchema,\n * input: InputSchema,\n * output: OutputSchema,\n * });\n * ```\n *\n * @example Input/output only (state inferred from input)\n * ```ts\n * const graph = new StateGraph({\n * input: InputAnnotation,\n * output: OutputAnnotation,\n * });\n * ```\n */\n constructor(state: SD extends StateDefinitionInit ? SD : never, options?: C | AnnotationRoot<ToStateDefinition<C>> | StateGraphOptions<I, O, C, N, InterruptType, WriterType>);\n constructor(fields: SD extends StateDefinition ? StateGraphArgsWithInputOutputSchemas<SD, ToStateDefinition<O>> : never, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(fields: SD extends StateDefinition ? AnnotationRoot<SD> | StateGraphArgsWithStateSchema<SD, ToStateDefinition<I>, ToStateDefinition<O>> : never, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(init: Omit<StateGraphInit<SD extends StateDefinitionInit ? SD : StateDefinitionInit, SD extends StateDefinitionInit ? SD : StateDefinitionInit, O, C extends ContextSchemaInit ? C : undefined, N, InterruptType, WriterType>, \"state\" | \"stateSchema\" | \"input\"> & {\n input: SD extends StateDefinitionInit ? SD : never;\n state?: never;\n stateSchema?: never;\n }, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(init: StateGraphInit<SD extends StateDefinitionInit ? SD : StateDefinitionInit, I, O, C extends ContextSchemaInit ? C : undefined, N, InterruptType, WriterType>);\n /** @deprecated Use `Annotation.Root`, `StateSchema`, or Zod schemas instead. */\n constructor(fields: StateGraphArgs<S>, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n /**\n * Normalize all constructor input patterns to a unified StateGraphInit object.\n * @internal\n */\n private _normalizeToStateGraphInit;\n /**\n * Convert any supported schema type to a StateDefinition (channel map).\n * @internal\n */\n private _getChannelsFromSchema;\n get allEdges(): Set<[string, string]>;\n _addSchema(stateDefinition: StateDefinitionInit): void;\n addNode<K extends string, NodeMap extends Record<K, NodeAction<S, U, C, InterruptType, WriterType>>>(nodes: NodeMap): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in keyof NodeMap]: NodeMap[key] extends NodeAction<S, infer U, C, InterruptType, WriterType> ? U : never;\n }>>;\n addNode<K extends string, NodeInput = S, NodeOutput extends U = U>(nodes: [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>,\n options?: StateGraphAddNodeOptions\n ][]): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, InputSchema extends StateDefinitionInit, NodeOutput extends U = U>(key: K, action: NodeAction<ExtractStateType<InputSchema>, NodeOutput, C, InterruptType, WriterType>, options: StateGraphAddNodeOptions<N | K, InputSchema>): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, InputSchema extends StateDefinitionInit, NodeOutput extends U = U>(key: K, action: NodeAction<ExtractStateType<InputSchema>, NodeOutput, C, InterruptType, WriterType>, options: StateGraphAddNodeOptions<N | K, InputSchema>): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, NodeInput = S, NodeOutput extends U = U>(key: K, action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>, options?: StateGraphAddNodeOptions): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, NodeInput = S>(key: K, action: NodeAction<NodeInput, U, C, InterruptType, WriterType>, options?: StateGraphAddNodeOptions): StateGraph<SD, S, U, N | K, I, O, C, NodeReturnType>;\n addEdge(startKey: typeof START | N | N[], endKey: N | typeof END): this;\n addSequence<K extends string, NodeInput = S, NodeOutput extends U = U>(nodes: [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>,\n options?: StateGraphAddNodeOptions\n ][]): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addSequence<K extends string, NodeMap extends Record<K, NodeAction<S, U, C, InterruptType, WriterType>>>(nodes: NodeMap): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in keyof NodeMap]: NodeMap[key] extends NodeAction<S, infer U, C, InterruptType, WriterType> ? U : never;\n }>>;\n compile({ checkpointer, store, cache, interruptBefore, interruptAfter, name, description }?: {\n checkpointer?: BaseCheckpointSaver | boolean;\n store?: BaseStore;\n cache?: BaseCache;\n interruptBefore?: N[] | All;\n interruptAfter?: N[] | All;\n name?: string;\n description?: string;\n }): CompiledStateGraph<Prettify<S>, Prettify<U>, N, I, O, C, NodeReturnType, InterruptType, WriterType>;\n}\n/**\n * Final result from building and compiling a {@link StateGraph}.\n * Should not be instantiated directly, only using the StateGraph `.compile()`\n * instance method.\n */\nexport declare class CompiledStateGraph<S, U, N extends string = typeof START, I extends StateDefinitionInit = StateDefinition, O extends StateDefinitionInit = StateDefinition, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>> {\n builder: StateGraph<unknown, S, U, N, I, O, C, NodeReturnType>;\n /**\n * The description of the compiled graph.\n * This is used by the supervisor agent to describe the handoff to the agent.\n */\n description?: string;\n /** @internal */\n _metaRegistry: SchemaMetaRegistry;\n constructor({ description, ...rest }: {\n description?: string;\n } & ConstructorParameters<typeof CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>>>[0]);\n attachNode(key: typeof START, node?: never): void;\n attachNode(key: N, node: StateGraphNodeSpec<S, U>): void;\n attachEdge(starts: N | N[] | \"__start__\", end: N | \"__end__\"): void;\n attachBranch(start: N | typeof START, _: string, branch: Branch<S, N>, options?: {\n withReader?: boolean;\n }): void;\n protected _validateInput(input: ExtractUpdateType<I, ExtractStateType<I>>): Promise<ExtractUpdateType<I, ExtractStateType<I>>>;\n isInterrupted(input: unknown): input is {\n [INTERRUPT]: Interrupt<InferInterruptInputType<InterruptType>>[];\n };\n protected _validateContext(config: Partial<Record<string, unknown>>): Promise<Partial<Record<string, unknown>>>;\n}\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;KAaYqC,yDACIC,WAAWlB,cAAckB,SAASC,UADlD;AAA2B,UAGVC,cAHU,CAAA,iBAAA,MAAA,GAAA,OAAA,CAAA,CAAA;UACXF,EAGFA,QAHEA,SAAAA,MAAAA,GAGwBA,QAHxBA,SAAAA,OAAAA,EAAAA,GAG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,CAAAA,CAAAA"}
|
|
1
|
+
{"version":3,"file":"state.d.cts","names":["All","BaseCache","BaseCheckpointSaver","BaseStore","InteropZodObject","RunnableLike","Runtime","BaseChannel","CompiledGraph","Graph","Branch","AddNodeOptions","NodeSpec","Command","START","END","CommandInstance","Interrupt","INTERRUPT","AnnotationRoot","SingleReducer","StateDefinition","StateType","CachePolicy","RetryPolicy","SchemaMetaRegistry","InferInterruptResumeType","InferInterruptInputType","InferWriterType","AnyStateSchema","ContextSchemaInit","ExtractStateType","ExtractUpdateType","StateGraphInit","StateGraphOptions","ToStateDefinition","StateDefinitionInit","ChannelReducers","Channels","K","StateGraphArgs","StateGraphNodeSpec","RunInput","RunOutput","StateGraphAddNodeOptions","InputSchema","Nodes","StateGraphArgsWithStateSchema","SD","I","O","StateGraphArgsWithInputOutputSchemas","ExtractStateDefinition","T","NodeAction","S","U","Record","C","InterruptType","WriterType","StrictNodeAction","Prettify","PartialStateSchema","MergeReturnType","Prev","Curr","StateGraph","N","Set","Map","Omit","NodeMap","NodeReturnType","key","NodeInput","NodeOutput","checkpointer","store","cache","interruptBefore","interruptAfter","name","description","CompiledStateGraph","ConstructorParameters","Promise","Partial"],"sources":["../../src/graph/state.d.ts"],"sourcesContent":["import { All, type BaseCache, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { type InteropZodObject } from \"@langchain/core/utils/types\";\nimport type { RunnableLike, Runtime } from \"../pregel/runnable_types.js\";\nimport { BaseChannel } from \"../channels/base.js\";\nimport { CompiledGraph, Graph, Branch, AddNodeOptions, NodeSpec } from \"./graph.js\";\nimport { Command, START, END, CommandInstance, Interrupt, INTERRUPT } from \"../constants.js\";\nimport { AnnotationRoot, SingleReducer, StateDefinition, StateType } from \"./annotation.js\";\nimport type { CachePolicy, RetryPolicy } from \"../pregel/utils/index.js\";\nimport { type SchemaMetaRegistry } from \"./zod/meta.js\";\nimport type { InferInterruptResumeType, InferInterruptInputType } from \"../interrupt.js\";\nimport type { InferWriterType } from \"../writer.js\";\nimport type { AnyStateSchema } from \"../state/schema.js\";\nimport { ContextSchemaInit, ExtractStateType, ExtractUpdateType, StateGraphInit, StateGraphOptions, ToStateDefinition, type StateDefinitionInit } from \"./types.js\";\nexport type ChannelReducers<Channels extends object> = {\n [K in keyof Channels]: SingleReducer<Channels[K], any>;\n};\nexport interface StateGraphArgs<Channels extends object | unknown> {\n channels: Channels extends object ? Channels extends unknown[] ? ChannelReducers<{\n __root__: Channels;\n }> : ChannelReducers<Channels> : ChannelReducers<{\n __root__: Channels;\n }>;\n}\nexport type StateGraphNodeSpec<RunInput, RunOutput> = NodeSpec<RunInput, RunOutput> & {\n input?: StateDefinition;\n retryPolicy?: RetryPolicy;\n cachePolicy?: CachePolicy;\n};\n/**\n * Options for StateGraph.addNode() method.\n *\n * @template Nodes - Node name constraints\n * @template InputSchema - Per-node input schema type (inferred from options.input)\n */\nexport type StateGraphAddNodeOptions<Nodes extends string = string, InputSchema extends StateDefinitionInit | undefined = StateDefinitionInit | undefined> = {\n retryPolicy?: RetryPolicy;\n cachePolicy?: CachePolicy | boolean;\n input?: InputSchema;\n} & AddNodeOptions<Nodes>;\nexport type StateGraphArgsWithStateSchema<SD extends StateDefinition, I extends StateDefinition, O extends StateDefinition> = {\n stateSchema: AnnotationRoot<SD>;\n input?: AnnotationRoot<I>;\n output?: AnnotationRoot<O>;\n};\nexport type StateGraphArgsWithInputOutputSchemas<SD extends StateDefinition, O extends StateDefinition = SD> = {\n input: AnnotationRoot<SD>;\n output: AnnotationRoot<O>;\n};\ntype ExtractStateDefinition<T> = T extends AnyStateSchema ? T : T extends StateDefinitionInit ? ToStateDefinition<T> : StateDefinition;\ntype NodeAction<S, U, C extends StateDefinitionInit, InterruptType, WriterType> = RunnableLike<S, U extends object ? U & Record<string, any> : U, Runtime<StateType<ToStateDefinition<C>>, InterruptType, WriterType>>;\ntype StrictNodeAction<S, U, C extends StateDefinitionInit, Nodes extends string, InterruptType, WriterType> = RunnableLike<Prettify<S>, U | Command<InferInterruptResumeType<InterruptType>, U & Record<string, any>, Nodes>, Runtime<StateType<ToStateDefinition<C>>, InterruptType, WriterType>>;\ndeclare const PartialStateSchema: unique symbol;\ntype PartialStateSchema = typeof PartialStateSchema;\ntype MergeReturnType<Prev, Curr> = Prev & Curr extends infer T ? {\n [K in keyof T]: T[K];\n} & unknown : never;\ntype Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n/**\n * A graph whose nodes communicate by reading and writing to a shared state.\n * Each node takes a defined `State` as input and returns a `Partial<State>`.\n *\n * Each state key can optionally be annotated with a reducer function that\n * will be used to aggregate the values of that key received from multiple nodes.\n * The signature of a reducer function is (left: Value, right: UpdateValue) => Value.\n *\n * See {@link Annotation} for more on defining state.\n *\n * After adding nodes and edges to your graph, you must call `.compile()` on it before\n * you can use it.\n *\n * @typeParam SD - The state definition used to construct the graph. Can be an\n * {@link AnnotationRoot}, {@link StateSchema}, or Zod object schema. This is the\n * primary generic from which `S` and `U` are derived.\n *\n * @typeParam S - The full state type representing the complete shape of your graph's\n * state after all reducers have been applied. Automatically inferred from `SD`.\n *\n * @typeParam U - The update type representing what nodes can return to modify state.\n * Typically a partial of the state type. Automatically inferred from `SD`.\n *\n * @typeParam N - Union of all node names in the graph (e.g., `\"agent\" | \"tool\"`).\n * Accumulated as you call `.addNode()`. Used for type-safe routing.\n *\n * @typeParam I - The input schema definition. Set via the `input` option in the\n * constructor to restrict what data the graph accepts when invoked.\n *\n * @typeParam O - The output schema definition. Set via the `output` option in the\n * constructor to restrict what data the graph returns after execution.\n *\n * @typeParam C - The config/context schema definition. Set via the `context` option\n * to define additional configuration passed at runtime.\n *\n * @typeParam NodeReturnType - Constrains what types nodes in this graph can return.\n *\n * @typeParam InterruptType - The type for {@link interrupt} resume values. Set via\n * the `interrupt` option for typed human-in-the-loop patterns.\n *\n * @typeParam WriterType - The type for custom stream writers. Set via the `writer`\n * option to enable typed custom streaming from within nodes.\n *\n * @example\n * ```ts\n * import {\n * type BaseMessage,\n * AIMessage,\n * HumanMessage,\n * } from \"@langchain/core/messages\";\n * import { StateGraph, Annotation } from \"@langchain/langgraph\";\n *\n * // Define a state with a single key named \"messages\" that will\n * // combine a returned BaseMessage or arrays of BaseMessages\n * const StateAnnotation = Annotation.Root({\n * sentiment: Annotation<string>,\n * messages: Annotation<BaseMessage[]>({\n * reducer: (left: BaseMessage[], right: BaseMessage | BaseMessage[]) => {\n * if (Array.isArray(right)) {\n * return left.concat(right);\n * }\n * return left.concat([right]);\n * },\n * default: () => [],\n * }),\n * });\n *\n * const graphBuilder = new StateGraph(StateAnnotation);\n *\n * // A node in the graph that returns an object with a \"messages\" key\n * // will update the state by combining the existing value with the returned one.\n * const myNode = (state: typeof StateAnnotation.State) => {\n * return {\n * messages: [new AIMessage(\"Some new response\")],\n * sentiment: \"positive\",\n * };\n * };\n *\n * const graph = graphBuilder\n * .addNode(\"myNode\", myNode)\n * .addEdge(\"__start__\", \"myNode\")\n * .addEdge(\"myNode\", \"__end__\")\n * .compile();\n *\n * await graph.invoke({ messages: [new HumanMessage(\"how are you?\")] });\n *\n * // {\n * // messages: [HumanMessage(\"how are you?\"), AIMessage(\"Some new response\")],\n * // sentiment: \"positive\",\n * // }\n * ```\n */\nexport declare class StateGraph<SD extends StateDefinitionInit | unknown, S = ExtractStateType<SD>, U = ExtractUpdateType<SD, S>, N extends string = typeof START, I extends StateDefinitionInit = ExtractStateDefinition<SD>, O extends StateDefinitionInit = ExtractStateDefinition<SD>, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends Graph<N, S, U, StateGraphNodeSpec<S, U>, ToStateDefinition<C>> {\n channels: Record<string, BaseChannel>;\n waitingEdges: Set<[N[], N]>;\n /** @internal */\n _schemaDefinition: StateDefinition;\n /** @internal */\n _schemaRuntimeDefinition: InteropZodObject | AnyStateSchema | undefined;\n /** @internal */\n _inputDefinition: I;\n /** @internal */\n _inputRuntimeDefinition: InteropZodObject | AnyStateSchema | PartialStateSchema | undefined;\n /** @internal */\n _outputDefinition: O;\n /** @internal */\n _outputRuntimeDefinition: InteropZodObject | AnyStateSchema | undefined;\n /**\n * Map schemas to managed values\n * @internal\n */\n _schemaDefinitions: Map<any, any>;\n /** @internal */\n _metaRegistry: SchemaMetaRegistry;\n /** @internal Used only for typing. */\n _configSchema: ToStateDefinition<C> | undefined;\n /** @internal */\n _configRuntimeSchema: InteropZodObject | undefined;\n /** @internal */\n _interrupt: InterruptType;\n /** @internal */\n _writer: WriterType;\n Node: StrictNodeAction<S, U, C, N, InterruptType, WriterType>;\n /**\n * Create a new StateGraph for building stateful, multi-step workflows.\n *\n * Accepts state definitions via `Annotation.Root`, `StateSchema`, or Zod schemas.\n *\n * @example Direct schema\n * ```ts\n * const StateAnnotation = Annotation.Root({\n * messages: Annotation<string[]>({ reducer: (a, b) => [...a, ...b] }),\n * });\n * const graph = new StateGraph(StateAnnotation);\n * ```\n *\n * @example Direct schema with input/output filtering\n * ```ts\n * const graph = new StateGraph(StateAnnotation, {\n * input: InputSchema,\n * output: OutputSchema,\n * });\n * ```\n *\n * @example Object pattern with state, input, output\n * ```ts\n * const graph = new StateGraph({\n * state: FullStateSchema,\n * input: InputSchema,\n * output: OutputSchema,\n * });\n * ```\n *\n * @example Input/output only (state inferred from input)\n * ```ts\n * const graph = new StateGraph({\n * input: InputAnnotation,\n * output: OutputAnnotation,\n * });\n * ```\n */\n constructor(state: SD extends StateDefinitionInit ? SD : never, options?: C | AnnotationRoot<ToStateDefinition<C>> | StateGraphOptions<I, O, C, N, InterruptType, WriterType>);\n constructor(fields: SD extends StateDefinition ? StateGraphArgsWithInputOutputSchemas<SD, ToStateDefinition<O>> : never, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(fields: SD extends StateDefinition ? AnnotationRoot<SD> | StateGraphArgsWithStateSchema<SD, ToStateDefinition<I>, ToStateDefinition<O>> : never, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(init: Omit<StateGraphInit<SD extends StateDefinitionInit ? SD : StateDefinitionInit, SD extends StateDefinitionInit ? SD : StateDefinitionInit, O, C extends ContextSchemaInit ? C : undefined, N, InterruptType, WriterType>, \"state\" | \"stateSchema\" | \"input\"> & {\n input: SD extends StateDefinitionInit ? SD : never;\n state?: never;\n stateSchema?: never;\n }, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(init: StateGraphInit<SD extends StateDefinitionInit ? SD : StateDefinitionInit, I, O, C extends ContextSchemaInit ? C : undefined, N, InterruptType, WriterType>);\n /** @deprecated Use `Annotation.Root`, `StateSchema`, or Zod schemas instead. */\n constructor(fields: StateGraphArgs<S>, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n /**\n * Normalize all constructor input patterns to a unified StateGraphInit object.\n * @internal\n */\n private _normalizeToStateGraphInit;\n /**\n * Convert any supported schema type to a StateDefinition (channel map).\n * @internal\n */\n private _getChannelsFromSchema;\n get allEdges(): Set<[string, string]>;\n _addSchema(stateDefinition: StateDefinitionInit): void;\n addNode<K extends string, NodeMap extends Record<K, NodeAction<S, U, C, InterruptType, WriterType>>>(nodes: NodeMap): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in keyof NodeMap]: NodeMap[key] extends NodeAction<S, infer U, C, InterruptType, WriterType> ? U : never;\n }>>;\n addNode<K extends string, NodeInput = S, NodeOutput extends U = U>(nodes: [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>,\n options?: StateGraphAddNodeOptions\n ][]): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, InputSchema extends StateDefinitionInit, NodeOutput extends U = U>(key: K, action: NodeAction<ExtractStateType<InputSchema>, NodeOutput, C, InterruptType, WriterType>, options: StateGraphAddNodeOptions<N | K, InputSchema>): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, InputSchema extends StateDefinitionInit, NodeOutput extends U = U>(key: K, action: NodeAction<ExtractStateType<InputSchema>, NodeOutput, C, InterruptType, WriterType>, options: StateGraphAddNodeOptions<N | K, InputSchema>): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, NodeInput = S, NodeOutput extends U = U>(key: K, action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>, options?: StateGraphAddNodeOptions): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, NodeInput = S>(key: K, action: NodeAction<NodeInput, U, C, InterruptType, WriterType>, options?: StateGraphAddNodeOptions): StateGraph<SD, S, U, N | K, I, O, C, NodeReturnType>;\n addEdge(startKey: typeof START | N | N[], endKey: N | typeof END): this;\n addSequence<K extends string, NodeInput = S, NodeOutput extends U = U>(nodes: [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>,\n options?: StateGraphAddNodeOptions\n ][]): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addSequence<K extends string, NodeMap extends Record<K, NodeAction<S, U, C, InterruptType, WriterType>>>(nodes: NodeMap): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in keyof NodeMap]: NodeMap[key] extends NodeAction<S, infer U, C, InterruptType, WriterType> ? U : never;\n }>>;\n compile({ checkpointer, store, cache, interruptBefore, interruptAfter, name, description }?: {\n checkpointer?: BaseCheckpointSaver | boolean;\n store?: BaseStore;\n cache?: BaseCache;\n interruptBefore?: N[] | All;\n interruptAfter?: N[] | All;\n name?: string;\n description?: string;\n }): CompiledStateGraph<Prettify<S>, Prettify<U>, N, I, O, C, NodeReturnType, InterruptType, WriterType>;\n}\n/**\n * Final result from building and compiling a {@link StateGraph}.\n * Should not be instantiated directly, only using the StateGraph `.compile()`\n * instance method.\n *\n * @typeParam S - The full state type representing the complete shape of your graph's\n * state after all reducers have been applied. This is the type you receive when\n * reading state in nodes or after invoking the graph.\n *\n * @typeParam U - The update type representing what nodes can return to modify state.\n * Typically a partial of the state type, allowing nodes to update only specific fields.\n * Can also include {@link Command} objects for advanced control flow.\n *\n * @typeParam N - Union of all node names in the graph (e.g., `\"agent\" | \"tool\"`).\n * Used for type-safe routing with {@link Command.goto} and edge definitions.\n *\n * @typeParam I - The input schema definition. Determines what shape of data the graph\n * accepts when invoked. Defaults to the main state schema if not explicitly set.\n *\n * @typeParam O - The output schema definition. Determines what shape of data the graph\n * returns after execution. Defaults to the main state schema if not explicitly set.\n *\n * @typeParam C - The config/context schema definition. Defines additional configuration\n * that can be passed to the graph at runtime via {@link LangGraphRunnableConfig}.\n *\n * @typeParam NodeReturnType - Constrains what types nodes in this graph can return.\n * Useful for enforcing consistent return patterns across all nodes.\n *\n * @typeParam InterruptType - The type of values that can be passed when resuming from\n * an {@link interrupt}. Used with human-in-the-loop patterns.\n *\n * @typeParam WriterType - The type for custom stream writers. Used with the `writer`\n * option to enable typed custom streaming from within nodes.\n */\nexport declare class CompiledStateGraph<S, U, N extends string = typeof START, I extends StateDefinitionInit = StateDefinition, O extends StateDefinitionInit = StateDefinition, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>> {\n builder: StateGraph<unknown, S, U, N, I, O, C, NodeReturnType>;\n /**\n * The description of the compiled graph.\n * This is used by the supervisor agent to describe the handoff to the agent.\n */\n description?: string;\n /** @internal */\n _metaRegistry: SchemaMetaRegistry;\n constructor({ description, ...rest }: {\n description?: string;\n } & ConstructorParameters<typeof CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>>>[0]);\n attachNode(key: typeof START, node?: never): void;\n attachNode(key: N, node: StateGraphNodeSpec<S, U>): void;\n attachEdge(starts: N | N[] | \"__start__\", end: N | \"__end__\"): void;\n attachBranch(start: N | typeof START, _: string, branch: Branch<S, N>, options?: {\n withReader?: boolean;\n }): void;\n protected _validateInput(input: ExtractUpdateType<I, ExtractStateType<I>>): Promise<ExtractUpdateType<I, ExtractStateType<I>>>;\n isInterrupted(input: unknown): input is {\n [INTERRUPT]: Interrupt<InferInterruptInputType<InterruptType>>[];\n };\n protected _validateContext(config: Partial<Record<string, unknown>>): Promise<Partial<Record<string, unknown>>>;\n}\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;KAaYqC,yDACIC,WAAWlB,cAAckB,SAASC,UADlD;AAA2B,UAGVC,cAHU,CAAA,iBAAA,MAAA,GAAA,OAAA,CAAA,CAAA;UACXF,EAGFA,QAHEA,SAAAA,MAAAA,GAGwBA,QAHxBA,SAAAA,OAAAA,EAAAA,GAGqDD,eAHrDC,CAAAA;IAAyBA,QAAAA,EAIvBA,QAJuBA;OAKhCD,eALyCE,CAKzBD,QALyBC,CAAAA,GAKbF,eALaE,CAAAA;IAAvBnB,QAAAA,EAMTkB,QANSlB;EAAa,CAAA,CAAA;AAExC;AAA+B,KAOnBqB,kBAPmB,CAAA,QAAA,EAAA,SAAA,CAAA,GAOuB7B,QAPvB,CAOgC8B,QAPhC,EAO0CC,SAP1C,CAAA,GAAA;OACjBL,CAAAA,EAOFjB,eAPEiB;aAA0BA,CAAAA,EAQtBd,WARsBc;aACtBA,CAAAA,EAQAf,WARAe;;;;;;;AAKlB;AAA8B,KAWlBM,wBAXkB,CAAA,cAAA,MAAA,GAAA,MAAA,EAAA,oBAW0DR,mBAX1D,GAAA,SAAA,GAW4FA,mBAX5F,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zG0B,OAnFyG1B,CAmFjG5B,iBAnFiG4B,CAmF/EX,CAnF+EW,EAmF5E7B,gBAnF4E6B,CAmF3DX,CAnF2DW,CAAAA,CAAAA,CAAAA;eAAxEN,CAAAA,KAAAA,EAAAA,OAAAA,CAAAA,EAAAA,KAAAA,IAAAA;IAAuHc,CAqF/NlD,SAAAA,CArF+NkD,EAqFnNnD,SArFmNmD,CAqFzMzC,uBArFyMyC,CAqFjLT,aArFiLS,CAAAA,CAAAA,EAAAA;;YAAOvB,gBAAAA,CAAAA,MAAAA,EAuFxM0C,OAvFwM1C,CAuFhMY,MAvFgMZ,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,CAAAA,CAAAA,EAuFrKyC,OAvFqKzC,CAuF7J0C,OAvF6J1C,CAuFrJY,MAvFqJZ,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,CAAAA,CAAAA"}
|
package/dist/graph/state.d.ts
CHANGED
|
@@ -66,6 +66,36 @@ type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
|
66
66
|
* After adding nodes and edges to your graph, you must call `.compile()` on it before
|
|
67
67
|
* you can use it.
|
|
68
68
|
*
|
|
69
|
+
* @typeParam SD - The state definition used to construct the graph. Can be an
|
|
70
|
+
* {@link AnnotationRoot}, {@link StateSchema}, or Zod object schema. This is the
|
|
71
|
+
* primary generic from which `S` and `U` are derived.
|
|
72
|
+
*
|
|
73
|
+
* @typeParam S - The full state type representing the complete shape of your graph's
|
|
74
|
+
* state after all reducers have been applied. Automatically inferred from `SD`.
|
|
75
|
+
*
|
|
76
|
+
* @typeParam U - The update type representing what nodes can return to modify state.
|
|
77
|
+
* Typically a partial of the state type. Automatically inferred from `SD`.
|
|
78
|
+
*
|
|
79
|
+
* @typeParam N - Union of all node names in the graph (e.g., `"agent" | "tool"`).
|
|
80
|
+
* Accumulated as you call `.addNode()`. Used for type-safe routing.
|
|
81
|
+
*
|
|
82
|
+
* @typeParam I - The input schema definition. Set via the `input` option in the
|
|
83
|
+
* constructor to restrict what data the graph accepts when invoked.
|
|
84
|
+
*
|
|
85
|
+
* @typeParam O - The output schema definition. Set via the `output` option in the
|
|
86
|
+
* constructor to restrict what data the graph returns after execution.
|
|
87
|
+
*
|
|
88
|
+
* @typeParam C - The config/context schema definition. Set via the `context` option
|
|
89
|
+
* to define additional configuration passed at runtime.
|
|
90
|
+
*
|
|
91
|
+
* @typeParam NodeReturnType - Constrains what types nodes in this graph can return.
|
|
92
|
+
*
|
|
93
|
+
* @typeParam InterruptType - The type for {@link interrupt} resume values. Set via
|
|
94
|
+
* the `interrupt` option for typed human-in-the-loop patterns.
|
|
95
|
+
*
|
|
96
|
+
* @typeParam WriterType - The type for custom stream writers. Set via the `writer`
|
|
97
|
+
* option to enable typed custom streaming from within nodes.
|
|
98
|
+
*
|
|
69
99
|
* @example
|
|
70
100
|
* ```ts
|
|
71
101
|
* import {
|
|
@@ -238,6 +268,35 @@ declare class StateGraph<SD extends StateDefinitionInit | unknown, S = ExtractSt
|
|
|
238
268
|
* Final result from building and compiling a {@link StateGraph}.
|
|
239
269
|
* Should not be instantiated directly, only using the StateGraph `.compile()`
|
|
240
270
|
* instance method.
|
|
271
|
+
*
|
|
272
|
+
* @typeParam S - The full state type representing the complete shape of your graph's
|
|
273
|
+
* state after all reducers have been applied. This is the type you receive when
|
|
274
|
+
* reading state in nodes or after invoking the graph.
|
|
275
|
+
*
|
|
276
|
+
* @typeParam U - The update type representing what nodes can return to modify state.
|
|
277
|
+
* Typically a partial of the state type, allowing nodes to update only specific fields.
|
|
278
|
+
* Can also include {@link Command} objects for advanced control flow.
|
|
279
|
+
*
|
|
280
|
+
* @typeParam N - Union of all node names in the graph (e.g., `"agent" | "tool"`).
|
|
281
|
+
* Used for type-safe routing with {@link Command.goto} and edge definitions.
|
|
282
|
+
*
|
|
283
|
+
* @typeParam I - The input schema definition. Determines what shape of data the graph
|
|
284
|
+
* accepts when invoked. Defaults to the main state schema if not explicitly set.
|
|
285
|
+
*
|
|
286
|
+
* @typeParam O - The output schema definition. Determines what shape of data the graph
|
|
287
|
+
* returns after execution. Defaults to the main state schema if not explicitly set.
|
|
288
|
+
*
|
|
289
|
+
* @typeParam C - The config/context schema definition. Defines additional configuration
|
|
290
|
+
* that can be passed to the graph at runtime via {@link LangGraphRunnableConfig}.
|
|
291
|
+
*
|
|
292
|
+
* @typeParam NodeReturnType - Constrains what types nodes in this graph can return.
|
|
293
|
+
* Useful for enforcing consistent return patterns across all nodes.
|
|
294
|
+
*
|
|
295
|
+
* @typeParam InterruptType - The type of values that can be passed when resuming from
|
|
296
|
+
* an {@link interrupt}. Used with human-in-the-loop patterns.
|
|
297
|
+
*
|
|
298
|
+
* @typeParam WriterType - The type for custom stream writers. Used with the `writer`
|
|
299
|
+
* option to enable typed custom streaming from within nodes.
|
|
241
300
|
*/
|
|
242
301
|
declare class CompiledStateGraph<S, U, N extends string = typeof START, I extends StateDefinitionInit = StateDefinition, O extends StateDefinitionInit = StateDefinition, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>> {
|
|
243
302
|
builder: StateGraph<unknown, S, U, N, I, O, C, NodeReturnType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","names":["All","BaseCache","BaseCheckpointSaver","BaseStore","InteropZodObject","RunnableLike","Runtime","BaseChannel","CompiledGraph","Graph","Branch","AddNodeOptions","NodeSpec","Command","START","END","CommandInstance","Interrupt","INTERRUPT","AnnotationRoot","SingleReducer","StateDefinition","StateType","CachePolicy","RetryPolicy","SchemaMetaRegistry","InferInterruptResumeType","InferInterruptInputType","InferWriterType","AnyStateSchema","ContextSchemaInit","ExtractStateType","ExtractUpdateType","StateGraphInit","StateGraphOptions","ToStateDefinition","StateDefinitionInit","ChannelReducers","Channels","K","StateGraphArgs","StateGraphNodeSpec","RunInput","RunOutput","StateGraphAddNodeOptions","InputSchema","Nodes","StateGraphArgsWithStateSchema","SD","I","O","StateGraphArgsWithInputOutputSchemas","ExtractStateDefinition","T","NodeAction","S","U","Record","C","InterruptType","WriterType","StrictNodeAction","Prettify","PartialStateSchema","MergeReturnType","Prev","Curr","StateGraph","N","Set","Map","Omit","NodeMap","NodeReturnType","key","NodeInput","NodeOutput","checkpointer","store","cache","interruptBefore","interruptAfter","name","description","CompiledStateGraph","ConstructorParameters","Promise","Partial"],"sources":["../../src/graph/state.d.ts"],"sourcesContent":["import { All, type BaseCache, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { type InteropZodObject } from \"@langchain/core/utils/types\";\nimport type { RunnableLike, Runtime } from \"../pregel/runnable_types.js\";\nimport { BaseChannel } from \"../channels/base.js\";\nimport { CompiledGraph, Graph, Branch, AddNodeOptions, NodeSpec } from \"./graph.js\";\nimport { Command, START, END, CommandInstance, Interrupt, INTERRUPT } from \"../constants.js\";\nimport { AnnotationRoot, SingleReducer, StateDefinition, StateType } from \"./annotation.js\";\nimport type { CachePolicy, RetryPolicy } from \"../pregel/utils/index.js\";\nimport { type SchemaMetaRegistry } from \"./zod/meta.js\";\nimport type { InferInterruptResumeType, InferInterruptInputType } from \"../interrupt.js\";\nimport type { InferWriterType } from \"../writer.js\";\nimport type { AnyStateSchema } from \"../state/schema.js\";\nimport { ContextSchemaInit, ExtractStateType, ExtractUpdateType, StateGraphInit, StateGraphOptions, ToStateDefinition, type StateDefinitionInit } from \"./types.js\";\nexport type ChannelReducers<Channels extends object> = {\n [K in keyof Channels]: SingleReducer<Channels[K], any>;\n};\nexport interface StateGraphArgs<Channels extends object | unknown> {\n channels: Channels extends object ? Channels extends unknown[] ? ChannelReducers<{\n __root__: Channels;\n }> : ChannelReducers<Channels> : ChannelReducers<{\n __root__: Channels;\n }>;\n}\nexport type StateGraphNodeSpec<RunInput, RunOutput> = NodeSpec<RunInput, RunOutput> & {\n input?: StateDefinition;\n retryPolicy?: RetryPolicy;\n cachePolicy?: CachePolicy;\n};\n/**\n * Options for StateGraph.addNode() method.\n *\n * @template Nodes - Node name constraints\n * @template InputSchema - Per-node input schema type (inferred from options.input)\n */\nexport type StateGraphAddNodeOptions<Nodes extends string = string, InputSchema extends StateDefinitionInit | undefined = StateDefinitionInit | undefined> = {\n retryPolicy?: RetryPolicy;\n cachePolicy?: CachePolicy | boolean;\n input?: InputSchema;\n} & AddNodeOptions<Nodes>;\nexport type StateGraphArgsWithStateSchema<SD extends StateDefinition, I extends StateDefinition, O extends StateDefinition> = {\n stateSchema: AnnotationRoot<SD>;\n input?: AnnotationRoot<I>;\n output?: AnnotationRoot<O>;\n};\nexport type StateGraphArgsWithInputOutputSchemas<SD extends StateDefinition, O extends StateDefinition = SD> = {\n input: AnnotationRoot<SD>;\n output: AnnotationRoot<O>;\n};\ntype ExtractStateDefinition<T> = T extends AnyStateSchema ? T : T extends StateDefinitionInit ? ToStateDefinition<T> : StateDefinition;\ntype NodeAction<S, U, C extends StateDefinitionInit, InterruptType, WriterType> = RunnableLike<S, U extends object ? U & Record<string, any> : U, Runtime<StateType<ToStateDefinition<C>>, InterruptType, WriterType>>;\ntype StrictNodeAction<S, U, C extends StateDefinitionInit, Nodes extends string, InterruptType, WriterType> = RunnableLike<Prettify<S>, U | Command<InferInterruptResumeType<InterruptType>, U & Record<string, any>, Nodes>, Runtime<StateType<ToStateDefinition<C>>, InterruptType, WriterType>>;\ndeclare const PartialStateSchema: unique symbol;\ntype PartialStateSchema = typeof PartialStateSchema;\ntype MergeReturnType<Prev, Curr> = Prev & Curr extends infer T ? {\n [K in keyof T]: T[K];\n} & unknown : never;\ntype Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n/**\n * A graph whose nodes communicate by reading and writing to a shared state.\n * Each node takes a defined `State` as input and returns a `Partial<State>`.\n *\n * Each state key can optionally be annotated with a reducer function that\n * will be used to aggregate the values of that key received from multiple nodes.\n * The signature of a reducer function is (left: Value, right: UpdateValue) => Value.\n *\n * See {@link Annotation} for more on defining state.\n *\n * After adding nodes and edges to your graph, you must call `.compile()` on it before\n * you can use it.\n *\n * @example\n * ```ts\n * import {\n * type BaseMessage,\n * AIMessage,\n * HumanMessage,\n * } from \"@langchain/core/messages\";\n * import { StateGraph, Annotation } from \"@langchain/langgraph\";\n *\n * // Define a state with a single key named \"messages\" that will\n * // combine a returned BaseMessage or arrays of BaseMessages\n * const StateAnnotation = Annotation.Root({\n * sentiment: Annotation<string>,\n * messages: Annotation<BaseMessage[]>({\n * reducer: (left: BaseMessage[], right: BaseMessage | BaseMessage[]) => {\n * if (Array.isArray(right)) {\n * return left.concat(right);\n * }\n * return left.concat([right]);\n * },\n * default: () => [],\n * }),\n * });\n *\n * const graphBuilder = new StateGraph(StateAnnotation);\n *\n * // A node in the graph that returns an object with a \"messages\" key\n * // will update the state by combining the existing value with the returned one.\n * const myNode = (state: typeof StateAnnotation.State) => {\n * return {\n * messages: [new AIMessage(\"Some new response\")],\n * sentiment: \"positive\",\n * };\n * };\n *\n * const graph = graphBuilder\n * .addNode(\"myNode\", myNode)\n * .addEdge(\"__start__\", \"myNode\")\n * .addEdge(\"myNode\", \"__end__\")\n * .compile();\n *\n * await graph.invoke({ messages: [new HumanMessage(\"how are you?\")] });\n *\n * // {\n * // messages: [HumanMessage(\"how are you?\"), AIMessage(\"Some new response\")],\n * // sentiment: \"positive\",\n * // }\n * ```\n */\nexport declare class StateGraph<SD extends StateDefinitionInit | unknown, S = ExtractStateType<SD>, U = ExtractUpdateType<SD, S>, N extends string = typeof START, I extends StateDefinitionInit = ExtractStateDefinition<SD>, O extends StateDefinitionInit = ExtractStateDefinition<SD>, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends Graph<N, S, U, StateGraphNodeSpec<S, U>, ToStateDefinition<C>> {\n channels: Record<string, BaseChannel>;\n waitingEdges: Set<[N[], N]>;\n /** @internal */\n _schemaDefinition: StateDefinition;\n /** @internal */\n _schemaRuntimeDefinition: InteropZodObject | AnyStateSchema | undefined;\n /** @internal */\n _inputDefinition: I;\n /** @internal */\n _inputRuntimeDefinition: InteropZodObject | AnyStateSchema | PartialStateSchema | undefined;\n /** @internal */\n _outputDefinition: O;\n /** @internal */\n _outputRuntimeDefinition: InteropZodObject | AnyStateSchema | undefined;\n /**\n * Map schemas to managed values\n * @internal\n */\n _schemaDefinitions: Map<any, any>;\n /** @internal */\n _metaRegistry: SchemaMetaRegistry;\n /** @internal Used only for typing. */\n _configSchema: ToStateDefinition<C> | undefined;\n /** @internal */\n _configRuntimeSchema: InteropZodObject | undefined;\n /** @internal */\n _interrupt: InterruptType;\n /** @internal */\n _writer: WriterType;\n Node: StrictNodeAction<S, U, C, N, InterruptType, WriterType>;\n /**\n * Create a new StateGraph for building stateful, multi-step workflows.\n *\n * Accepts state definitions via `Annotation.Root`, `StateSchema`, or Zod schemas.\n *\n * @example Direct schema\n * ```ts\n * const StateAnnotation = Annotation.Root({\n * messages: Annotation<string[]>({ reducer: (a, b) => [...a, ...b] }),\n * });\n * const graph = new StateGraph(StateAnnotation);\n * ```\n *\n * @example Direct schema with input/output filtering\n * ```ts\n * const graph = new StateGraph(StateAnnotation, {\n * input: InputSchema,\n * output: OutputSchema,\n * });\n * ```\n *\n * @example Object pattern with state, input, output\n * ```ts\n * const graph = new StateGraph({\n * state: FullStateSchema,\n * input: InputSchema,\n * output: OutputSchema,\n * });\n * ```\n *\n * @example Input/output only (state inferred from input)\n * ```ts\n * const graph = new StateGraph({\n * input: InputAnnotation,\n * output: OutputAnnotation,\n * });\n * ```\n */\n constructor(state: SD extends StateDefinitionInit ? SD : never, options?: C | AnnotationRoot<ToStateDefinition<C>> | StateGraphOptions<I, O, C, N, InterruptType, WriterType>);\n constructor(fields: SD extends StateDefinition ? StateGraphArgsWithInputOutputSchemas<SD, ToStateDefinition<O>> : never, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(fields: SD extends StateDefinition ? AnnotationRoot<SD> | StateGraphArgsWithStateSchema<SD, ToStateDefinition<I>, ToStateDefinition<O>> : never, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(init: Omit<StateGraphInit<SD extends StateDefinitionInit ? SD : StateDefinitionInit, SD extends StateDefinitionInit ? SD : StateDefinitionInit, O, C extends ContextSchemaInit ? C : undefined, N, InterruptType, WriterType>, \"state\" | \"stateSchema\" | \"input\"> & {\n input: SD extends StateDefinitionInit ? SD : never;\n state?: never;\n stateSchema?: never;\n }, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(init: StateGraphInit<SD extends StateDefinitionInit ? SD : StateDefinitionInit, I, O, C extends ContextSchemaInit ? C : undefined, N, InterruptType, WriterType>);\n /** @deprecated Use `Annotation.Root`, `StateSchema`, or Zod schemas instead. */\n constructor(fields: StateGraphArgs<S>, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n /**\n * Normalize all constructor input patterns to a unified StateGraphInit object.\n * @internal\n */\n private _normalizeToStateGraphInit;\n /**\n * Convert any supported schema type to a StateDefinition (channel map).\n * @internal\n */\n private _getChannelsFromSchema;\n get allEdges(): Set<[string, string]>;\n _addSchema(stateDefinition: StateDefinitionInit): void;\n addNode<K extends string, NodeMap extends Record<K, NodeAction<S, U, C, InterruptType, WriterType>>>(nodes: NodeMap): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in keyof NodeMap]: NodeMap[key] extends NodeAction<S, infer U, C, InterruptType, WriterType> ? U : never;\n }>>;\n addNode<K extends string, NodeInput = S, NodeOutput extends U = U>(nodes: [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>,\n options?: StateGraphAddNodeOptions\n ][]): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, InputSchema extends StateDefinitionInit, NodeOutput extends U = U>(key: K, action: NodeAction<ExtractStateType<InputSchema>, NodeOutput, C, InterruptType, WriterType>, options: StateGraphAddNodeOptions<N | K, InputSchema>): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, InputSchema extends StateDefinitionInit, NodeOutput extends U = U>(key: K, action: NodeAction<ExtractStateType<InputSchema>, NodeOutput, C, InterruptType, WriterType>, options: StateGraphAddNodeOptions<N | K, InputSchema>): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, NodeInput = S, NodeOutput extends U = U>(key: K, action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>, options?: StateGraphAddNodeOptions): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, NodeInput = S>(key: K, action: NodeAction<NodeInput, U, C, InterruptType, WriterType>, options?: StateGraphAddNodeOptions): StateGraph<SD, S, U, N | K, I, O, C, NodeReturnType>;\n addEdge(startKey: typeof START | N | N[], endKey: N | typeof END): this;\n addSequence<K extends string, NodeInput = S, NodeOutput extends U = U>(nodes: [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>,\n options?: StateGraphAddNodeOptions\n ][]): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addSequence<K extends string, NodeMap extends Record<K, NodeAction<S, U, C, InterruptType, WriterType>>>(nodes: NodeMap): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in keyof NodeMap]: NodeMap[key] extends NodeAction<S, infer U, C, InterruptType, WriterType> ? U : never;\n }>>;\n compile({ checkpointer, store, cache, interruptBefore, interruptAfter, name, description }?: {\n checkpointer?: BaseCheckpointSaver | boolean;\n store?: BaseStore;\n cache?: BaseCache;\n interruptBefore?: N[] | All;\n interruptAfter?: N[] | All;\n name?: string;\n description?: string;\n }): CompiledStateGraph<Prettify<S>, Prettify<U>, N, I, O, C, NodeReturnType, InterruptType, WriterType>;\n}\n/**\n * Final result from building and compiling a {@link StateGraph}.\n * Should not be instantiated directly, only using the StateGraph `.compile()`\n * instance method.\n */\nexport declare class CompiledStateGraph<S, U, N extends string = typeof START, I extends StateDefinitionInit = StateDefinition, O extends StateDefinitionInit = StateDefinition, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>> {\n builder: StateGraph<unknown, S, U, N, I, O, C, NodeReturnType>;\n /**\n * The description of the compiled graph.\n * This is used by the supervisor agent to describe the handoff to the agent.\n */\n description?: string;\n /** @internal */\n _metaRegistry: SchemaMetaRegistry;\n constructor({ description, ...rest }: {\n description?: string;\n } & ConstructorParameters<typeof CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>>>[0]);\n attachNode(key: typeof START, node?: never): void;\n attachNode(key: N, node: StateGraphNodeSpec<S, U>): void;\n attachEdge(starts: N | N[] | \"__start__\", end: N | \"__end__\"): void;\n attachBranch(start: N | typeof START, _: string, branch: Branch<S, N>, options?: {\n withReader?: boolean;\n }): void;\n protected _validateInput(input: ExtractUpdateType<I, ExtractStateType<I>>): Promise<ExtractUpdateType<I, ExtractStateType<I>>>;\n isInterrupted(input: unknown): input is {\n [INTERRUPT]: Interrupt<InferInterruptInputType<InterruptType>>[];\n };\n protected _validateContext(config: Partial<Record<string, unknown>>): Promise<Partial<Record<string, unknown>>>;\n}\nexport {};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AA;;YAA7CH,gBAAAA,CAAAA,MAAAA,EAoEP8B,OApEO9B,CAoECA,MApEDA,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,CAAAA,CAAAA,EAoE4B6B,OApE5B7B,CAoEoC8B,OApEpC9B,CAoE4CA,MApE5CA,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,CAAAA,CAAAA"}
|
|
1
|
+
{"version":3,"file":"state.d.ts","names":["All","BaseCache","BaseCheckpointSaver","BaseStore","InteropZodObject","RunnableLike","Runtime","BaseChannel","CompiledGraph","Graph","Branch","AddNodeOptions","NodeSpec","Command","START","END","CommandInstance","Interrupt","INTERRUPT","AnnotationRoot","SingleReducer","StateDefinition","StateType","CachePolicy","RetryPolicy","SchemaMetaRegistry","InferInterruptResumeType","InferInterruptInputType","InferWriterType","AnyStateSchema","ContextSchemaInit","ExtractStateType","ExtractUpdateType","StateGraphInit","StateGraphOptions","ToStateDefinition","StateDefinitionInit","ChannelReducers","Channels","K","StateGraphArgs","StateGraphNodeSpec","RunInput","RunOutput","StateGraphAddNodeOptions","InputSchema","Nodes","StateGraphArgsWithStateSchema","SD","I","O","StateGraphArgsWithInputOutputSchemas","ExtractStateDefinition","T","NodeAction","S","U","Record","C","InterruptType","WriterType","StrictNodeAction","Prettify","PartialStateSchema","MergeReturnType","Prev","Curr","StateGraph","N","Set","Map","Omit","NodeMap","NodeReturnType","key","NodeInput","NodeOutput","checkpointer","store","cache","interruptBefore","interruptAfter","name","description","CompiledStateGraph","ConstructorParameters","Promise","Partial"],"sources":["../../src/graph/state.d.ts"],"sourcesContent":["import { All, type BaseCache, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { type InteropZodObject } from \"@langchain/core/utils/types\";\nimport type { RunnableLike, Runtime } from \"../pregel/runnable_types.js\";\nimport { BaseChannel } from \"../channels/base.js\";\nimport { CompiledGraph, Graph, Branch, AddNodeOptions, NodeSpec } from \"./graph.js\";\nimport { Command, START, END, CommandInstance, Interrupt, INTERRUPT } from \"../constants.js\";\nimport { AnnotationRoot, SingleReducer, StateDefinition, StateType } from \"./annotation.js\";\nimport type { CachePolicy, RetryPolicy } from \"../pregel/utils/index.js\";\nimport { type SchemaMetaRegistry } from \"./zod/meta.js\";\nimport type { InferInterruptResumeType, InferInterruptInputType } from \"../interrupt.js\";\nimport type { InferWriterType } from \"../writer.js\";\nimport type { AnyStateSchema } from \"../state/schema.js\";\nimport { ContextSchemaInit, ExtractStateType, ExtractUpdateType, StateGraphInit, StateGraphOptions, ToStateDefinition, type StateDefinitionInit } from \"./types.js\";\nexport type ChannelReducers<Channels extends object> = {\n [K in keyof Channels]: SingleReducer<Channels[K], any>;\n};\nexport interface StateGraphArgs<Channels extends object | unknown> {\n channels: Channels extends object ? Channels extends unknown[] ? ChannelReducers<{\n __root__: Channels;\n }> : ChannelReducers<Channels> : ChannelReducers<{\n __root__: Channels;\n }>;\n}\nexport type StateGraphNodeSpec<RunInput, RunOutput> = NodeSpec<RunInput, RunOutput> & {\n input?: StateDefinition;\n retryPolicy?: RetryPolicy;\n cachePolicy?: CachePolicy;\n};\n/**\n * Options for StateGraph.addNode() method.\n *\n * @template Nodes - Node name constraints\n * @template InputSchema - Per-node input schema type (inferred from options.input)\n */\nexport type StateGraphAddNodeOptions<Nodes extends string = string, InputSchema extends StateDefinitionInit | undefined = StateDefinitionInit | undefined> = {\n retryPolicy?: RetryPolicy;\n cachePolicy?: CachePolicy | boolean;\n input?: InputSchema;\n} & AddNodeOptions<Nodes>;\nexport type StateGraphArgsWithStateSchema<SD extends StateDefinition, I extends StateDefinition, O extends StateDefinition> = {\n stateSchema: AnnotationRoot<SD>;\n input?: AnnotationRoot<I>;\n output?: AnnotationRoot<O>;\n};\nexport type StateGraphArgsWithInputOutputSchemas<SD extends StateDefinition, O extends StateDefinition = SD> = {\n input: AnnotationRoot<SD>;\n output: AnnotationRoot<O>;\n};\ntype ExtractStateDefinition<T> = T extends AnyStateSchema ? T : T extends StateDefinitionInit ? ToStateDefinition<T> : StateDefinition;\ntype NodeAction<S, U, C extends StateDefinitionInit, InterruptType, WriterType> = RunnableLike<S, U extends object ? U & Record<string, any> : U, Runtime<StateType<ToStateDefinition<C>>, InterruptType, WriterType>>;\ntype StrictNodeAction<S, U, C extends StateDefinitionInit, Nodes extends string, InterruptType, WriterType> = RunnableLike<Prettify<S>, U | Command<InferInterruptResumeType<InterruptType>, U & Record<string, any>, Nodes>, Runtime<StateType<ToStateDefinition<C>>, InterruptType, WriterType>>;\ndeclare const PartialStateSchema: unique symbol;\ntype PartialStateSchema = typeof PartialStateSchema;\ntype MergeReturnType<Prev, Curr> = Prev & Curr extends infer T ? {\n [K in keyof T]: T[K];\n} & unknown : never;\ntype Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n/**\n * A graph whose nodes communicate by reading and writing to a shared state.\n * Each node takes a defined `State` as input and returns a `Partial<State>`.\n *\n * Each state key can optionally be annotated with a reducer function that\n * will be used to aggregate the values of that key received from multiple nodes.\n * The signature of a reducer function is (left: Value, right: UpdateValue) => Value.\n *\n * See {@link Annotation} for more on defining state.\n *\n * After adding nodes and edges to your graph, you must call `.compile()` on it before\n * you can use it.\n *\n * @typeParam SD - The state definition used to construct the graph. Can be an\n * {@link AnnotationRoot}, {@link StateSchema}, or Zod object schema. This is the\n * primary generic from which `S` and `U` are derived.\n *\n * @typeParam S - The full state type representing the complete shape of your graph's\n * state after all reducers have been applied. Automatically inferred from `SD`.\n *\n * @typeParam U - The update type representing what nodes can return to modify state.\n * Typically a partial of the state type. Automatically inferred from `SD`.\n *\n * @typeParam N - Union of all node names in the graph (e.g., `\"agent\" | \"tool\"`).\n * Accumulated as you call `.addNode()`. Used for type-safe routing.\n *\n * @typeParam I - The input schema definition. Set via the `input` option in the\n * constructor to restrict what data the graph accepts when invoked.\n *\n * @typeParam O - The output schema definition. Set via the `output` option in the\n * constructor to restrict what data the graph returns after execution.\n *\n * @typeParam C - The config/context schema definition. Set via the `context` option\n * to define additional configuration passed at runtime.\n *\n * @typeParam NodeReturnType - Constrains what types nodes in this graph can return.\n *\n * @typeParam InterruptType - The type for {@link interrupt} resume values. Set via\n * the `interrupt` option for typed human-in-the-loop patterns.\n *\n * @typeParam WriterType - The type for custom stream writers. Set via the `writer`\n * option to enable typed custom streaming from within nodes.\n *\n * @example\n * ```ts\n * import {\n * type BaseMessage,\n * AIMessage,\n * HumanMessage,\n * } from \"@langchain/core/messages\";\n * import { StateGraph, Annotation } from \"@langchain/langgraph\";\n *\n * // Define a state with a single key named \"messages\" that will\n * // combine a returned BaseMessage or arrays of BaseMessages\n * const StateAnnotation = Annotation.Root({\n * sentiment: Annotation<string>,\n * messages: Annotation<BaseMessage[]>({\n * reducer: (left: BaseMessage[], right: BaseMessage | BaseMessage[]) => {\n * if (Array.isArray(right)) {\n * return left.concat(right);\n * }\n * return left.concat([right]);\n * },\n * default: () => [],\n * }),\n * });\n *\n * const graphBuilder = new StateGraph(StateAnnotation);\n *\n * // A node in the graph that returns an object with a \"messages\" key\n * // will update the state by combining the existing value with the returned one.\n * const myNode = (state: typeof StateAnnotation.State) => {\n * return {\n * messages: [new AIMessage(\"Some new response\")],\n * sentiment: \"positive\",\n * };\n * };\n *\n * const graph = graphBuilder\n * .addNode(\"myNode\", myNode)\n * .addEdge(\"__start__\", \"myNode\")\n * .addEdge(\"myNode\", \"__end__\")\n * .compile();\n *\n * await graph.invoke({ messages: [new HumanMessage(\"how are you?\")] });\n *\n * // {\n * // messages: [HumanMessage(\"how are you?\"), AIMessage(\"Some new response\")],\n * // sentiment: \"positive\",\n * // }\n * ```\n */\nexport declare class StateGraph<SD extends StateDefinitionInit | unknown, S = ExtractStateType<SD>, U = ExtractUpdateType<SD, S>, N extends string = typeof START, I extends StateDefinitionInit = ExtractStateDefinition<SD>, O extends StateDefinitionInit = ExtractStateDefinition<SD>, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends Graph<N, S, U, StateGraphNodeSpec<S, U>, ToStateDefinition<C>> {\n channels: Record<string, BaseChannel>;\n waitingEdges: Set<[N[], N]>;\n /** @internal */\n _schemaDefinition: StateDefinition;\n /** @internal */\n _schemaRuntimeDefinition: InteropZodObject | AnyStateSchema | undefined;\n /** @internal */\n _inputDefinition: I;\n /** @internal */\n _inputRuntimeDefinition: InteropZodObject | AnyStateSchema | PartialStateSchema | undefined;\n /** @internal */\n _outputDefinition: O;\n /** @internal */\n _outputRuntimeDefinition: InteropZodObject | AnyStateSchema | undefined;\n /**\n * Map schemas to managed values\n * @internal\n */\n _schemaDefinitions: Map<any, any>;\n /** @internal */\n _metaRegistry: SchemaMetaRegistry;\n /** @internal Used only for typing. */\n _configSchema: ToStateDefinition<C> | undefined;\n /** @internal */\n _configRuntimeSchema: InteropZodObject | undefined;\n /** @internal */\n _interrupt: InterruptType;\n /** @internal */\n _writer: WriterType;\n Node: StrictNodeAction<S, U, C, N, InterruptType, WriterType>;\n /**\n * Create a new StateGraph for building stateful, multi-step workflows.\n *\n * Accepts state definitions via `Annotation.Root`, `StateSchema`, or Zod schemas.\n *\n * @example Direct schema\n * ```ts\n * const StateAnnotation = Annotation.Root({\n * messages: Annotation<string[]>({ reducer: (a, b) => [...a, ...b] }),\n * });\n * const graph = new StateGraph(StateAnnotation);\n * ```\n *\n * @example Direct schema with input/output filtering\n * ```ts\n * const graph = new StateGraph(StateAnnotation, {\n * input: InputSchema,\n * output: OutputSchema,\n * });\n * ```\n *\n * @example Object pattern with state, input, output\n * ```ts\n * const graph = new StateGraph({\n * state: FullStateSchema,\n * input: InputSchema,\n * output: OutputSchema,\n * });\n * ```\n *\n * @example Input/output only (state inferred from input)\n * ```ts\n * const graph = new StateGraph({\n * input: InputAnnotation,\n * output: OutputAnnotation,\n * });\n * ```\n */\n constructor(state: SD extends StateDefinitionInit ? SD : never, options?: C | AnnotationRoot<ToStateDefinition<C>> | StateGraphOptions<I, O, C, N, InterruptType, WriterType>);\n constructor(fields: SD extends StateDefinition ? StateGraphArgsWithInputOutputSchemas<SD, ToStateDefinition<O>> : never, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(fields: SD extends StateDefinition ? AnnotationRoot<SD> | StateGraphArgsWithStateSchema<SD, ToStateDefinition<I>, ToStateDefinition<O>> : never, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(init: Omit<StateGraphInit<SD extends StateDefinitionInit ? SD : StateDefinitionInit, SD extends StateDefinitionInit ? SD : StateDefinitionInit, O, C extends ContextSchemaInit ? C : undefined, N, InterruptType, WriterType>, \"state\" | \"stateSchema\" | \"input\"> & {\n input: SD extends StateDefinitionInit ? SD : never;\n state?: never;\n stateSchema?: never;\n }, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n constructor(init: StateGraphInit<SD extends StateDefinitionInit ? SD : StateDefinitionInit, I, O, C extends ContextSchemaInit ? C : undefined, N, InterruptType, WriterType>);\n /** @deprecated Use `Annotation.Root`, `StateSchema`, or Zod schemas instead. */\n constructor(fields: StateGraphArgs<S>, contextSchema?: C | AnnotationRoot<ToStateDefinition<C>>);\n /**\n * Normalize all constructor input patterns to a unified StateGraphInit object.\n * @internal\n */\n private _normalizeToStateGraphInit;\n /**\n * Convert any supported schema type to a StateDefinition (channel map).\n * @internal\n */\n private _getChannelsFromSchema;\n get allEdges(): Set<[string, string]>;\n _addSchema(stateDefinition: StateDefinitionInit): void;\n addNode<K extends string, NodeMap extends Record<K, NodeAction<S, U, C, InterruptType, WriterType>>>(nodes: NodeMap): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in keyof NodeMap]: NodeMap[key] extends NodeAction<S, infer U, C, InterruptType, WriterType> ? U : never;\n }>>;\n addNode<K extends string, NodeInput = S, NodeOutput extends U = U>(nodes: [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>,\n options?: StateGraphAddNodeOptions\n ][]): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, InputSchema extends StateDefinitionInit, NodeOutput extends U = U>(key: K, action: NodeAction<ExtractStateType<InputSchema>, NodeOutput, C, InterruptType, WriterType>, options: StateGraphAddNodeOptions<N | K, InputSchema>): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, InputSchema extends StateDefinitionInit, NodeOutput extends U = U>(key: K, action: NodeAction<ExtractStateType<InputSchema>, NodeOutput, C, InterruptType, WriterType>, options: StateGraphAddNodeOptions<N | K, InputSchema>): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, NodeInput = S, NodeOutput extends U = U>(key: K, action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>, options?: StateGraphAddNodeOptions): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addNode<K extends string, NodeInput = S>(key: K, action: NodeAction<NodeInput, U, C, InterruptType, WriterType>, options?: StateGraphAddNodeOptions): StateGraph<SD, S, U, N | K, I, O, C, NodeReturnType>;\n addEdge(startKey: typeof START | N | N[], endKey: N | typeof END): this;\n addSequence<K extends string, NodeInput = S, NodeOutput extends U = U>(nodes: [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C, InterruptType, WriterType>,\n options?: StateGraphAddNodeOptions\n ][]): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in K]: NodeOutput;\n }>>;\n addSequence<K extends string, NodeMap extends Record<K, NodeAction<S, U, C, InterruptType, WriterType>>>(nodes: NodeMap): StateGraph<SD, S, U, N | K, I, O, C, MergeReturnType<NodeReturnType, {\n [key in keyof NodeMap]: NodeMap[key] extends NodeAction<S, infer U, C, InterruptType, WriterType> ? U : never;\n }>>;\n compile({ checkpointer, store, cache, interruptBefore, interruptAfter, name, description }?: {\n checkpointer?: BaseCheckpointSaver | boolean;\n store?: BaseStore;\n cache?: BaseCache;\n interruptBefore?: N[] | All;\n interruptAfter?: N[] | All;\n name?: string;\n description?: string;\n }): CompiledStateGraph<Prettify<S>, Prettify<U>, N, I, O, C, NodeReturnType, InterruptType, WriterType>;\n}\n/**\n * Final result from building and compiling a {@link StateGraph}.\n * Should not be instantiated directly, only using the StateGraph `.compile()`\n * instance method.\n *\n * @typeParam S - The full state type representing the complete shape of your graph's\n * state after all reducers have been applied. This is the type you receive when\n * reading state in nodes or after invoking the graph.\n *\n * @typeParam U - The update type representing what nodes can return to modify state.\n * Typically a partial of the state type, allowing nodes to update only specific fields.\n * Can also include {@link Command} objects for advanced control flow.\n *\n * @typeParam N - Union of all node names in the graph (e.g., `\"agent\" | \"tool\"`).\n * Used for type-safe routing with {@link Command.goto} and edge definitions.\n *\n * @typeParam I - The input schema definition. Determines what shape of data the graph\n * accepts when invoked. Defaults to the main state schema if not explicitly set.\n *\n * @typeParam O - The output schema definition. Determines what shape of data the graph\n * returns after execution. Defaults to the main state schema if not explicitly set.\n *\n * @typeParam C - The config/context schema definition. Defines additional configuration\n * that can be passed to the graph at runtime via {@link LangGraphRunnableConfig}.\n *\n * @typeParam NodeReturnType - Constrains what types nodes in this graph can return.\n * Useful for enforcing consistent return patterns across all nodes.\n *\n * @typeParam InterruptType - The type of values that can be passed when resuming from\n * an {@link interrupt}. Used with human-in-the-loop patterns.\n *\n * @typeParam WriterType - The type for custom stream writers. Used with the `writer`\n * option to enable typed custom streaming from within nodes.\n */\nexport declare class CompiledStateGraph<S, U, N extends string = typeof START, I extends StateDefinitionInit = StateDefinition, O extends StateDefinitionInit = StateDefinition, C extends StateDefinitionInit = StateDefinition, NodeReturnType = unknown, InterruptType = unknown, WriterType = unknown> extends CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>> {\n builder: StateGraph<unknown, S, U, N, I, O, C, NodeReturnType>;\n /**\n * The description of the compiled graph.\n * This is used by the supervisor agent to describe the handoff to the agent.\n */\n description?: string;\n /** @internal */\n _metaRegistry: SchemaMetaRegistry;\n constructor({ description, ...rest }: {\n description?: string;\n } & ConstructorParameters<typeof CompiledGraph<N, S, U, ExtractStateType<C>, ExtractUpdateType<I, ExtractStateType<I>>, ExtractStateType<O>, NodeReturnType, CommandInstance<InferInterruptResumeType<InterruptType>, Prettify<U>, N>, InferWriterType<WriterType>>>[0]);\n attachNode(key: typeof START, node?: never): void;\n attachNode(key: N, node: StateGraphNodeSpec<S, U>): void;\n attachEdge(starts: N | N[] | \"__start__\", end: N | \"__end__\"): void;\n attachBranch(start: N | typeof START, _: string, branch: Branch<S, N>, options?: {\n withReader?: boolean;\n }): void;\n protected _validateInput(input: ExtractUpdateType<I, ExtractStateType<I>>): Promise<ExtractUpdateType<I, ExtractStateType<I>>>;\n isInterrupted(input: unknown): input is {\n [INTERRUPT]: Interrupt<InferInterruptInputType<InterruptType>>[];\n };\n protected _validateContext(config: Partial<Record<string, unknown>>): Promise<Partial<Record<string, unknown>>>;\n}\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;KAaYqC,yDACIC,WAAWlB,cAAckB,SAASC,UADlD;AAA2B,UAGVC,cAHU,CAAA,iBAAA,MAAA,GAAA,OAAA,CAAA,CAAA;UACXF,EAGFA,QAHEA,SAAAA,MAAAA,GAGwBA,QAHxBA,SAAAA,OAAAA,EAAAA,GAGqDD,eAHrDC,CAAAA;IAAyBA,QAAAA,EAIvBA,QAJuBA;OAKhCD,eALyCE,CAKzBD,QALyBC,CAAAA,GAKbF,eALaE,CAAAA;IAAvBnB,QAAAA,EAMTkB,QANSlB;EAAa,CAAA,CAAA;AAExC;AAA+B,KAOnBqB,kBAPmB,CAAA,QAAA,EAAA,SAAA,CAAA,GAOuB7B,QAPvB,CAOgC8B,QAPhC,EAO0CC,SAP1C,CAAA,GAAA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AAA,QAAAA,EAAAA;IAAYlB,UAAAA,CAAAA,EAAAA,OAAAA;MAAGC,IAAAA;YAAeC,cAAAA,CAAAA,KAAAA,EAmFrJ5B,iBAnFqJ4B,CAmFnIX,CAnFmIW,EAmFhI7B,gBAnFgI6B,CAmF/GX,CAnF+GW,CAAAA,CAAAA,CAAAA,EAmFzG0B,OAnFyG1B,CAmFjG5B,iBAnFiG4B,CAmF/EX,CAnF+EW,EAmF5E7B,gBAnF4E6B,CAmF3DX,CAnF2DW,CAAAA,CAAAA,CAAAA;eAAxEN,CAAAA,KAAAA,EAAAA,OAAAA,CAAAA,EAAAA,KAAAA,IAAAA;IAAuHc,CAqF/NlD,SAAAA,CArF+NkD,EAqFnNnD,SArFmNmD,CAqFzMzC,uBArFyMyC,CAqFjLT,aArFiLS,CAAAA,CAAAA,EAAAA;;YAAOvB,gBAAAA,CAAAA,MAAAA,EAuFxM0C,OAvFwM1C,CAuFhMY,MAvFgMZ,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,CAAAA,CAAAA,EAuFrKyC,OAvFqKzC,CAuF7J0C,OAvF6J1C,CAuFrJY,MAvFqJZ,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,CAAAA,CAAAA"}
|
package/dist/graph/state.js
CHANGED
|
@@ -32,6 +32,36 @@ const PartialStateSchema = Symbol.for("langgraph.state.partial");
|
|
|
32
32
|
* After adding nodes and edges to your graph, you must call `.compile()` on it before
|
|
33
33
|
* you can use it.
|
|
34
34
|
*
|
|
35
|
+
* @typeParam SD - The state definition used to construct the graph. Can be an
|
|
36
|
+
* {@link AnnotationRoot}, {@link StateSchema}, or Zod object schema. This is the
|
|
37
|
+
* primary generic from which `S` and `U` are derived.
|
|
38
|
+
*
|
|
39
|
+
* @typeParam S - The full state type representing the complete shape of your graph's
|
|
40
|
+
* state after all reducers have been applied. Automatically inferred from `SD`.
|
|
41
|
+
*
|
|
42
|
+
* @typeParam U - The update type representing what nodes can return to modify state.
|
|
43
|
+
* Typically a partial of the state type. Automatically inferred from `SD`.
|
|
44
|
+
*
|
|
45
|
+
* @typeParam N - Union of all node names in the graph (e.g., `"agent" | "tool"`).
|
|
46
|
+
* Accumulated as you call `.addNode()`. Used for type-safe routing.
|
|
47
|
+
*
|
|
48
|
+
* @typeParam I - The input schema definition. Set via the `input` option in the
|
|
49
|
+
* constructor to restrict what data the graph accepts when invoked.
|
|
50
|
+
*
|
|
51
|
+
* @typeParam O - The output schema definition. Set via the `output` option in the
|
|
52
|
+
* constructor to restrict what data the graph returns after execution.
|
|
53
|
+
*
|
|
54
|
+
* @typeParam C - The config/context schema definition. Set via the `context` option
|
|
55
|
+
* to define additional configuration passed at runtime.
|
|
56
|
+
*
|
|
57
|
+
* @typeParam NodeReturnType - Constrains what types nodes in this graph can return.
|
|
58
|
+
*
|
|
59
|
+
* @typeParam InterruptType - The type for {@link interrupt} resume values. Set via
|
|
60
|
+
* the `interrupt` option for typed human-in-the-loop patterns.
|
|
61
|
+
*
|
|
62
|
+
* @typeParam WriterType - The type for custom stream writers. Set via the `writer`
|
|
63
|
+
* option to enable typed custom streaming from within nodes.
|
|
64
|
+
*
|
|
35
65
|
* @example
|
|
36
66
|
* ```ts
|
|
37
67
|
* import {
|
|
@@ -325,6 +355,35 @@ function _getChannels(schema) {
|
|
|
325
355
|
* Final result from building and compiling a {@link StateGraph}.
|
|
326
356
|
* Should not be instantiated directly, only using the StateGraph `.compile()`
|
|
327
357
|
* instance method.
|
|
358
|
+
*
|
|
359
|
+
* @typeParam S - The full state type representing the complete shape of your graph's
|
|
360
|
+
* state after all reducers have been applied. This is the type you receive when
|
|
361
|
+
* reading state in nodes or after invoking the graph.
|
|
362
|
+
*
|
|
363
|
+
* @typeParam U - The update type representing what nodes can return to modify state.
|
|
364
|
+
* Typically a partial of the state type, allowing nodes to update only specific fields.
|
|
365
|
+
* Can also include {@link Command} objects for advanced control flow.
|
|
366
|
+
*
|
|
367
|
+
* @typeParam N - Union of all node names in the graph (e.g., `"agent" | "tool"`).
|
|
368
|
+
* Used for type-safe routing with {@link Command.goto} and edge definitions.
|
|
369
|
+
*
|
|
370
|
+
* @typeParam I - The input schema definition. Determines what shape of data the graph
|
|
371
|
+
* accepts when invoked. Defaults to the main state schema if not explicitly set.
|
|
372
|
+
*
|
|
373
|
+
* @typeParam O - The output schema definition. Determines what shape of data the graph
|
|
374
|
+
* returns after execution. Defaults to the main state schema if not explicitly set.
|
|
375
|
+
*
|
|
376
|
+
* @typeParam C - The config/context schema definition. Defines additional configuration
|
|
377
|
+
* that can be passed to the graph at runtime via {@link LangGraphRunnableConfig}.
|
|
378
|
+
*
|
|
379
|
+
* @typeParam NodeReturnType - Constrains what types nodes in this graph can return.
|
|
380
|
+
* Useful for enforcing consistent return patterns across all nodes.
|
|
381
|
+
*
|
|
382
|
+
* @typeParam InterruptType - The type of values that can be passed when resuming from
|
|
383
|
+
* an {@link interrupt}. Used with human-in-the-loop patterns.
|
|
384
|
+
*
|
|
385
|
+
* @typeParam WriterType - The type for custom stream writers. Used with the `writer`
|
|
386
|
+
* option to enable typed custom streaming from within nodes.
|
|
328
387
|
*/
|
|
329
388
|
var CompiledStateGraph = class extends CompiledGraph {
|
|
330
389
|
/**
|