@langchain/langgraph 0.1.5 → 0.1.6

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.
@@ -2,14 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AnyValue = void 0;
4
4
  const errors_js_1 = require("../errors.cjs");
5
- const index_js_1 = require("./index.cjs");
5
+ const base_js_1 = require("./base.cjs");
6
6
  /**
7
7
  * Stores the last value received, assumes that if multiple values are received, they are all equal.
8
8
  *
9
9
  * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values
10
10
  * will be continuously overwritten.
11
+ *
12
+ * @internal
11
13
  */
12
- class AnyValue extends index_js_1.BaseChannel {
14
+ class AnyValue extends base_js_1.BaseChannel {
13
15
  constructor() {
14
16
  super();
15
17
  Object.defineProperty(this, "lc_graph_name", {
@@ -1,9 +1,11 @@
1
- import { BaseChannel } from "./index.js";
1
+ import { BaseChannel } from "./base.js";
2
2
  /**
3
3
  * Stores the last value received, assumes that if multiple values are received, they are all equal.
4
4
  *
5
5
  * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values
6
6
  * will be continuously overwritten.
7
+ *
8
+ * @internal
7
9
  */
8
10
  export declare class AnyValue<Value> extends BaseChannel<Value, Value, Value> {
9
11
  lc_graph_name: string;
@@ -1,10 +1,12 @@
1
1
  import { EmptyChannelError } from "../errors.js";
2
- import { BaseChannel } from "./index.js";
2
+ import { BaseChannel } from "./base.js";
3
3
  /**
4
4
  * Stores the last value received, assumes that if multiple values are received, they are all equal.
5
5
  *
6
6
  * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values
7
7
  * will be continuously overwritten.
8
+ *
9
+ * @internal
8
10
  */
9
11
  export class AnyValue extends BaseChannel {
10
12
  constructor() {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DynamicBarrierValue = void 0;
4
4
  const errors_js_1 = require("../errors.cjs");
5
- const index_js_1 = require("./index.cjs");
5
+ const base_js_1 = require("./base.cjs");
6
6
  const named_barrier_value_js_1 = require("./named_barrier_value.cjs");
7
7
  function isWaitForNames(v) {
8
8
  return v.__names !== undefined;
@@ -16,7 +16,7 @@ function isWaitForNames(v) {
16
16
  - once all named values are received, it can be read once, and it switches
17
17
  back to the "priming" state.
18
18
  */
19
- class DynamicBarrierValue extends index_js_1.BaseChannel {
19
+ class DynamicBarrierValue extends base_js_1.BaseChannel {
20
20
  constructor() {
21
21
  super();
22
22
  Object.defineProperty(this, "lc_graph_name", {
@@ -1,4 +1,4 @@
1
- import { BaseChannel } from "./index.js";
1
+ import { BaseChannel } from "./base.js";
2
2
  export interface WaitForNames<Value> {
3
3
  __names: Value[];
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import { EmptyChannelError, InvalidUpdateError } from "../errors.js";
2
- import { BaseChannel } from "./index.js";
2
+ import { BaseChannel } from "./base.js";
3
3
  import { areSetsEqual } from "./named_barrier_value.js";
4
4
  function isWaitForNames(v) {
5
5
  return v.__names !== undefined;
@@ -1,2 +1,7 @@
1
1
  export { BaseChannel, createCheckpoint, emptyChannels as empty, } from "./base.js";
2
2
  export { type BinaryOperator, BinaryOperatorAggregate } from "./binop.js";
3
+ export type { AnyValue } from "./any_value.js";
4
+ export type { WaitForNames, DynamicBarrierValue, } from "./dynamic_barrier_value.js";
5
+ export type { LastValue } from "./last_value.js";
6
+ export type { NamedBarrierValue } from "./named_barrier_value.js";
7
+ export type { Topic } from "./topic.js";
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LastValue = void 0;
4
4
  const errors_js_1 = require("../errors.cjs");
5
- const index_js_1 = require("./index.cjs");
5
+ const base_js_1 = require("./base.cjs");
6
6
  /**
7
7
  * Stores the last value received, can receive at most one value per step.
8
8
  *
@@ -10,7 +10,7 @@ const index_js_1 = require("./index.cjs");
10
10
  * LastValue always stores the last value of a single node. If multiple nodes attempt to
11
11
  * write to this channel in a single step, an error will be thrown.
12
12
  */
13
- class LastValue extends index_js_1.BaseChannel {
13
+ class LastValue extends base_js_1.BaseChannel {
14
14
  constructor() {
15
15
  super(...arguments);
16
16
  Object.defineProperty(this, "lc_graph_name", {
@@ -1,4 +1,4 @@
1
- import { BaseChannel } from "./index.js";
1
+ import { BaseChannel } from "./base.js";
2
2
  /**
3
3
  * Stores the last value received, can receive at most one value per step.
4
4
  *
@@ -1,5 +1,5 @@
1
1
  import { EmptyChannelError, InvalidUpdateError } from "../errors.js";
2
- import { BaseChannel } from "./index.js";
2
+ import { BaseChannel } from "./base.js";
3
3
  /**
4
4
  * Stores the last value received, can receive at most one value per step.
5
5
  *
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NamedBarrierValue = exports.areSetsEqual = void 0;
4
4
  const errors_js_1 = require("../errors.cjs");
5
- const index_js_1 = require("./index.cjs");
5
+ const base_js_1 = require("./base.cjs");
6
6
  const areSetsEqual = (a, b) => a.size === b.size && [...a].every((value) => b.has(value));
7
7
  exports.areSetsEqual = areSetsEqual;
8
8
  /**
@@ -11,7 +11,7 @@ exports.areSetsEqual = areSetsEqual;
11
11
  * This ensures that if node N and node M both write to channel C, the value of C will not be updated
12
12
  * until N and M have completed updating.
13
13
  */
14
- class NamedBarrierValue extends index_js_1.BaseChannel {
14
+ class NamedBarrierValue extends base_js_1.BaseChannel {
15
15
  constructor(names) {
16
16
  super();
17
17
  Object.defineProperty(this, "lc_graph_name", {
@@ -1,4 +1,4 @@
1
- import { BaseChannel } from "./index.js";
1
+ import { BaseChannel } from "./base.js";
2
2
  export declare const areSetsEqual: <T>(a: Set<T>, b: Set<T>) => boolean;
3
3
  /**
4
4
  * A channel that waits until all named values are received before making the value available.
@@ -1,5 +1,5 @@
1
1
  import { EmptyChannelError, InvalidUpdateError } from "../errors.js";
2
- import { BaseChannel } from "./index.js";
2
+ import { BaseChannel } from "./base.js";
3
3
  export const areSetsEqual = (a, b) => a.size === b.size && [...a].every((value) => b.has(value));
4
4
  /**
5
5
  * A channel that waits until all named values are received before making the value available.
package/dist/web.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { END, Graph, type StateGraphArgs, START, StateGraph, type CompiledStateGraph, MessageGraph, messagesStateReducer, Annotation, AnnotationRoot, type StateType, type UpdateType, type CompiledGraph, } from "./graph/index.js";
2
2
  export { GraphRecursionError, GraphValueError, InvalidUpdateError, EmptyChannelError, } from "./errors.js";
3
- export { BaseChannel, type BinaryOperator, BinaryOperatorAggregate, } from "./channels/index.js";
3
+ export { BaseChannel, type BinaryOperator, BinaryOperatorAggregate, type AnyValue, type WaitForNames, type DynamicBarrierValue, type LastValue, type NamedBarrierValue, type Topic, } from "./channels/index.js";
4
4
  export { type RetryPolicy } from "./pregel/utils.js";
5
5
  export { Send } from "./constants.js";
6
6
  export { MemorySaver, type Checkpoint, type CheckpointMetadata, type CheckpointTuple, copyCheckpoint, emptyCheckpoint, BaseCheckpointSaver, } from "@langchain/langgraph-checkpoint";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {