@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.
- package/dist/channels/any_value.cjs +4 -2
- package/dist/channels/any_value.d.ts +3 -1
- package/dist/channels/any_value.js +3 -1
- package/dist/channels/dynamic_barrier_value.cjs +2 -2
- package/dist/channels/dynamic_barrier_value.d.ts +1 -1
- package/dist/channels/dynamic_barrier_value.js +1 -1
- package/dist/channels/index.d.ts +5 -0
- package/dist/channels/last_value.cjs +2 -2
- package/dist/channels/last_value.d.ts +1 -1
- package/dist/channels/last_value.js +1 -1
- package/dist/channels/named_barrier_value.cjs +2 -2
- package/dist/channels/named_barrier_value.d.ts +1 -1
- package/dist/channels/named_barrier_value.js +1 -1
- package/dist/web.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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 "./
|
|
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 "./
|
|
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
|
|
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
|
|
19
|
+
class DynamicBarrierValue extends base_js_1.BaseChannel {
|
|
20
20
|
constructor() {
|
|
21
21
|
super();
|
|
22
22
|
Object.defineProperty(this, "lc_graph_name", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmptyChannelError, InvalidUpdateError } from "../errors.js";
|
|
2
|
-
import { BaseChannel } from "./
|
|
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;
|
package/dist/channels/index.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
13
|
+
class LastValue extends base_js_1.BaseChannel {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
Object.defineProperty(this, "lc_graph_name", {
|
|
@@ -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
|
|
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
|
|
14
|
+
class NamedBarrierValue extends base_js_1.BaseChannel {
|
|
15
15
|
constructor(names) {
|
|
16
16
|
super();
|
|
17
17
|
Object.defineProperty(this, "lc_graph_name", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmptyChannelError, InvalidUpdateError } from "../errors.js";
|
|
2
|
-
import { BaseChannel } from "./
|
|
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";
|