@langchain/langgraph 0.0.20 → 0.0.22

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.
@@ -1,3 +1,3 @@
1
1
  export { END, START, Graph } from "./graph.js";
2
- export { type StateGraphArgs, StateGraph } from "./state.js";
2
+ export { type StateGraphArgs, StateGraph, type CompiledStateGraph, } from "./state.js";
3
3
  export { MessageGraph } from "./message.js";
@@ -1,3 +1,3 @@
1
1
  export { END, START, Graph } from "./graph.js";
2
- export { StateGraph } from "./state.js";
2
+ export { StateGraph, } from "./state.js";
3
3
  export { MessageGraph } from "./message.js";
@@ -135,10 +135,16 @@ function _getChannels(schema) {
135
135
  return channels;
136
136
  }
137
137
  function getChannel(reducer) {
138
- if (reducer && "reducer" in reducer && reducer.reducer) {
138
+ if (typeof reducer === "object" &&
139
+ reducer &&
140
+ "reducer" in reducer &&
141
+ reducer.reducer) {
139
142
  return new binop_js_1.BinaryOperatorAggregate(reducer.reducer, reducer.default);
140
143
  }
141
- if (reducer && "value" in reducer && reducer.value) {
144
+ if (typeof reducer === "object" &&
145
+ reducer &&
146
+ "value" in reducer &&
147
+ reducer.value) {
142
148
  return new binop_js_1.BinaryOperatorAggregate(reducer.value, reducer.default);
143
149
  }
144
150
  return new last_value_js_1.LastValue();
@@ -131,10 +131,16 @@ function _getChannels(schema) {
131
131
  return channels;
132
132
  }
133
133
  function getChannel(reducer) {
134
- if (reducer && "reducer" in reducer && reducer.reducer) {
134
+ if (typeof reducer === "object" &&
135
+ reducer &&
136
+ "reducer" in reducer &&
137
+ reducer.reducer) {
135
138
  return new BinaryOperatorAggregate(reducer.reducer, reducer.default);
136
139
  }
137
- if (reducer && "value" in reducer && reducer.value) {
140
+ if (typeof reducer === "object" &&
141
+ reducer &&
142
+ "value" in reducer &&
143
+ reducer.value) {
138
144
  return new BinaryOperatorAggregate(reducer.value, reducer.default);
139
145
  }
140
146
  return new LastValue();
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { END, Graph, type StateGraphArgs, START, StateGraph, MessageGraph, } from "./graph/index.js";
1
+ export { END, Graph, type StateGraphArgs, START, StateGraph, type CompiledStateGraph, MessageGraph, } from "./graph/index.js";
2
2
  export { MemorySaver } from "./checkpoint/memory.js";
3
3
  export { type Checkpoint, type CheckpointMetadata, copyCheckpoint, emptyCheckpoint, BaseCheckpointSaver, } from "./checkpoint/base.js";
4
4
  export { GraphRecursionError, GraphValueError, InvalidUpdateError, EmptyChannelError, } from "./errors.js";
@@ -16,5 +16,5 @@ export interface AgentExecutorState {
16
16
  export declare function createAgentExecutor({ agentRunnable, tools, }: {
17
17
  agentRunnable: Runnable;
18
18
  tools: Array<Tool> | ToolExecutor;
19
- }): import("../graph/state.js").CompiledStateGraph<AgentExecutorState, Partial<AgentExecutorState>, "__start__" | "agent" | "action">;
19
+ }): import("../index.js").CompiledStateGraph<AgentExecutorState, Partial<AgentExecutorState>, "__start__" | "agent" | "action">;
20
20
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {