@langchain/langgraph 0.2.61 → 0.2.63
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/README.md +14 -0
- package/dist/constants.cjs +2 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/prebuilt/react_agent_executor.cjs +34 -13
- package/dist/prebuilt/react_agent_executor.d.ts +3 -0
- package/dist/prebuilt/react_agent_executor.js +34 -15
- package/dist/prebuilt/react_agent_executor.js.map +1 -1
- package/dist/prebuilt/tool_node.cjs +26 -4
- package/dist/prebuilt/tool_node.js +27 -5
- package/dist/prebuilt/tool_node.js.map +1 -1
- package/dist/pregel/debug.cjs +9 -7
- package/dist/pregel/debug.d.ts +10 -0
- package/dist/pregel/debug.js +2 -2
- package/dist/pregel/debug.js.map +1 -1
- package/dist/pregel/debug.test.cjs +189 -0
- package/dist/pregel/debug.test.d.ts +1 -0
- package/dist/pregel/debug.test.js +187 -0
- package/dist/pregel/debug.test.js.map +1 -0
- package/dist/pregel/index.cjs +12 -4
- package/dist/pregel/index.d.ts +3 -0
- package/dist/pregel/index.js +14 -6
- package/dist/pregel/index.js.map +1 -1
- package/dist/pregel/io.mapCommand.test.cjs +151 -0
- package/dist/pregel/io.mapCommand.test.d.ts +1 -0
- package/dist/pregel/io.mapCommand.test.js +149 -0
- package/dist/pregel/io.mapCommand.test.js.map +1 -0
- package/dist/pregel/messages.test.cjs +351 -0
- package/dist/pregel/messages.test.d.ts +1 -0
- package/dist/pregel/messages.test.js +349 -0
- package/dist/pregel/messages.test.js.map +1 -0
- package/dist/pregel/read.cjs +1 -1
- package/dist/pregel/read.js +1 -1
- package/dist/pregel/read.js.map +1 -1
- package/dist/pregel/read.test.cjs +194 -0
- package/dist/pregel/read.test.d.ts +1 -0
- package/dist/pregel/read.test.js +192 -0
- package/dist/pregel/read.test.js.map +1 -0
- package/dist/pregel/retry.cjs +5 -0
- package/dist/pregel/retry.d.ts +2 -0
- package/dist/pregel/retry.js +5 -0
- package/dist/pregel/retry.js.map +1 -1
- package/dist/pregel/runner.cjs +95 -27
- package/dist/pregel/runner.d.ts +14 -0
- package/dist/pregel/runner.js +97 -29
- package/dist/pregel/runner.js.map +1 -1
- package/dist/pregel/runner.test.cjs +66 -0
- package/dist/pregel/runner.test.d.ts +1 -0
- package/dist/pregel/runner.test.js +64 -0
- package/dist/pregel/runner.test.js.map +1 -0
- package/dist/pregel/stream.cjs +62 -1
- package/dist/pregel/stream.d.ts +23 -0
- package/dist/pregel/stream.js +60 -0
- package/dist/pregel/stream.js.map +1 -1
- package/dist/pregel/types.d.ts +19 -0
- package/dist/pregel/types.js.map +1 -1
- package/dist/pregel/utils/config.test.cjs +214 -0
- package/dist/pregel/utils/config.test.d.ts +1 -0
- package/dist/pregel/utils/config.test.js +212 -0
- package/dist/pregel/utils/config.test.js.map +1 -0
- package/dist/pregel/utils/index.cjs +26 -1
- package/dist/pregel/utils/index.d.ts +6 -0
- package/dist/pregel/utils/index.js +24 -0
- package/dist/pregel/utils/index.js.map +1 -1
- package/dist/pregel/utils/subgraph.test.cjs +83 -0
- package/dist/pregel/utils/subgraph.test.d.ts +1 -0
- package/dist/pregel/utils/subgraph.test.js +81 -0
- package/dist/pregel/utils/subgraph.test.js.map +1 -0
- package/dist/pregel/validate.test.cjs +220 -0
- package/dist/pregel/validate.test.d.ts +1 -0
- package/dist/pregel/validate.test.js +218 -0
- package/dist/pregel/validate.test.js.map +1 -0
- package/dist/pregel/write.test.cjs +181 -0
- package/dist/pregel/write.test.d.ts +1 -0
- package/dist/pregel/write.test.js +179 -0
- package/dist/pregel/write.test.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { describe, expect, it } from "@jest/globals";
|
|
2
|
+
import { isPregelLike, findSubgraphPregel } from "./subgraph.js";
|
|
3
|
+
describe("isPregelLike", () => {
|
|
4
|
+
it("should return true for objects with lg_is_pregel=true", () => {
|
|
5
|
+
const mockPregelObj = {
|
|
6
|
+
lg_is_pregel: true,
|
|
7
|
+
invoke: () => { },
|
|
8
|
+
someOtherProp: "value",
|
|
9
|
+
};
|
|
10
|
+
// Cast to any to test just the logic, not the type constraints
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
|
+
expect(isPregelLike(mockPregelObj)).toBe(true);
|
|
13
|
+
});
|
|
14
|
+
it("should return false for objects without lg_is_pregel property", () => {
|
|
15
|
+
const nonPregelObj = {
|
|
16
|
+
invoke: () => { },
|
|
17
|
+
someOtherProp: "value",
|
|
18
|
+
};
|
|
19
|
+
// Cast to any to test just the logic, not the type constraints
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
expect(isPregelLike(nonPregelObj)).toBe(false);
|
|
22
|
+
});
|
|
23
|
+
it("should return false for objects with lg_is_pregel=false", () => {
|
|
24
|
+
const nonPregelObj = {
|
|
25
|
+
lg_is_pregel: false,
|
|
26
|
+
invoke: () => { },
|
|
27
|
+
someOtherProp: "value",
|
|
28
|
+
};
|
|
29
|
+
// Cast to any to test just the logic, not the type constraints
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
expect(isPregelLike(nonPregelObj)).toBe(false);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
describe("findSubgraphPregel", () => {
|
|
35
|
+
it("should find Pregel object at the top level", () => {
|
|
36
|
+
const mockPregelObj = {
|
|
37
|
+
lg_is_pregel: true,
|
|
38
|
+
invoke: () => { },
|
|
39
|
+
someOtherProp: "value",
|
|
40
|
+
};
|
|
41
|
+
// Cast to Runnable to test the behavior
|
|
42
|
+
expect(findSubgraphPregel(mockPregelObj)).toBe(mockPregelObj);
|
|
43
|
+
});
|
|
44
|
+
it("should find Pregel object in a RunnableSequence", () => {
|
|
45
|
+
const mockPregelObj = {
|
|
46
|
+
lg_is_pregel: true,
|
|
47
|
+
invoke: () => { },
|
|
48
|
+
someOtherProp: "value",
|
|
49
|
+
};
|
|
50
|
+
const mockSequence = {
|
|
51
|
+
steps: [{ someProperty: "value", invoke: () => { } }, mockPregelObj],
|
|
52
|
+
};
|
|
53
|
+
expect(findSubgraphPregel(mockSequence)).toBe(mockPregelObj);
|
|
54
|
+
});
|
|
55
|
+
it("should find Pregel object in a nested RunnableSequence", () => {
|
|
56
|
+
const mockPregelObj = {
|
|
57
|
+
lg_is_pregel: true,
|
|
58
|
+
invoke: () => { },
|
|
59
|
+
someOtherProp: "value",
|
|
60
|
+
};
|
|
61
|
+
const innerSequence = {
|
|
62
|
+
steps: [{ someProperty: "value", invoke: () => { } }, mockPregelObj],
|
|
63
|
+
};
|
|
64
|
+
const outerSequence = {
|
|
65
|
+
steps: [{ someProperty: "otherValue", invoke: () => { } }, innerSequence],
|
|
66
|
+
};
|
|
67
|
+
expect(findSubgraphPregel(outerSequence)).toBe(mockPregelObj);
|
|
68
|
+
});
|
|
69
|
+
it("should return undefined if no Pregel object is found", () => {
|
|
70
|
+
const nonPregelRunnable = {
|
|
71
|
+
someProperty: "value",
|
|
72
|
+
invoke: () => { },
|
|
73
|
+
};
|
|
74
|
+
const sequence = {
|
|
75
|
+
steps: [{ someProperty: "value1" }, { someProperty: "value2" }],
|
|
76
|
+
};
|
|
77
|
+
expect(findSubgraphPregel(nonPregelRunnable)).toBeUndefined();
|
|
78
|
+
expect(findSubgraphPregel(sequence)).toBeUndefined();
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=subgraph.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subgraph.test.js","sourceRoot":"","sources":["../../../src/pregel/utils/subgraph.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEjE,QAAQ,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B,CAAC;QAEF,MAAM,QAAQ,GAAG;YACf,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;SAChE,CAAC;QAEF,MAAM,CACJ,kBAAkB,CAAC,iBAAwC,CAAC,CAC7D,CAAC,aAAa,EAAE,CAAC;QAClB,MAAM,CAAC,kBAAkB,CAAC,QAA+B,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;IAC9E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const globals_1 = require("@jest/globals");
|
|
4
|
+
const validate_js_1 = require("./validate.cjs");
|
|
5
|
+
const read_js_1 = require("./read.cjs");
|
|
6
|
+
const constants_js_1 = require("../constants.cjs");
|
|
7
|
+
const last_value_js_1 = require("../channels/last_value.cjs");
|
|
8
|
+
// Common test setup
|
|
9
|
+
const setupValidGraph = () => {
|
|
10
|
+
// Create test channels
|
|
11
|
+
const inputChannel = new last_value_js_1.LastValue();
|
|
12
|
+
const outputChannel = new last_value_js_1.LastValue();
|
|
13
|
+
// Create test nodes
|
|
14
|
+
const testNode = new read_js_1.PregelNode({
|
|
15
|
+
channels: {},
|
|
16
|
+
triggers: ["input"],
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
nodes: { testNode },
|
|
20
|
+
channels: {
|
|
21
|
+
input: inputChannel,
|
|
22
|
+
output: outputChannel,
|
|
23
|
+
},
|
|
24
|
+
inputChannels: "input",
|
|
25
|
+
outputChannels: "output",
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
(0, globals_1.describe)("GraphValidationError", () => {
|
|
29
|
+
(0, globals_1.it)("should be properly constructed with the right name", () => {
|
|
30
|
+
const error = new validate_js_1.GraphValidationError("Test error message");
|
|
31
|
+
(0, globals_1.expect)(error).toBeInstanceOf(Error);
|
|
32
|
+
(0, globals_1.expect)(error.name).toBe("GraphValidationError");
|
|
33
|
+
(0, globals_1.expect)(error.message).toBe("Test error message");
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
(0, globals_1.describe)("validateGraph", () => {
|
|
37
|
+
(0, globals_1.it)("should validate a correct graph without errors", () => {
|
|
38
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
39
|
+
// Act & Assert: Should not throw
|
|
40
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
41
|
+
nodes,
|
|
42
|
+
channels,
|
|
43
|
+
inputChannels,
|
|
44
|
+
outputChannels,
|
|
45
|
+
})).not.toThrow();
|
|
46
|
+
});
|
|
47
|
+
(0, globals_1.it)("should throw when channels are not provided", () => {
|
|
48
|
+
const { nodes, inputChannels, outputChannels } = setupValidGraph();
|
|
49
|
+
// Act & Assert: Should throw with specific message
|
|
50
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
51
|
+
nodes,
|
|
52
|
+
channels: null,
|
|
53
|
+
inputChannels,
|
|
54
|
+
outputChannels,
|
|
55
|
+
})).toThrow("Channels not provided");
|
|
56
|
+
});
|
|
57
|
+
(0, globals_1.it)("should throw when a node is named INTERRUPT", () => {
|
|
58
|
+
const { channels, inputChannels, outputChannels } = setupValidGraph();
|
|
59
|
+
// Create a node with the reserved name
|
|
60
|
+
const badNode = new read_js_1.PregelNode({
|
|
61
|
+
channels: {},
|
|
62
|
+
triggers: ["input"],
|
|
63
|
+
});
|
|
64
|
+
// Create nodes object with the reserved name
|
|
65
|
+
const nodes = { [constants_js_1.INTERRUPT]: badNode };
|
|
66
|
+
// Act & Assert: Should throw specific error
|
|
67
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
68
|
+
nodes,
|
|
69
|
+
channels,
|
|
70
|
+
inputChannels,
|
|
71
|
+
outputChannels,
|
|
72
|
+
})).toThrow(`"Node name ${constants_js_1.INTERRUPT} is reserved"`);
|
|
73
|
+
});
|
|
74
|
+
(0, globals_1.it)("should throw when a node is not a PregelNode instance", () => {
|
|
75
|
+
const { channels, inputChannels, outputChannels } = setupValidGraph();
|
|
76
|
+
// Create an invalid node (not a PregelNode)
|
|
77
|
+
const badNode = {
|
|
78
|
+
triggers: ["input"],
|
|
79
|
+
func: () => "not a pregel node",
|
|
80
|
+
};
|
|
81
|
+
// Create nodes object with invalid node
|
|
82
|
+
const nodes = {
|
|
83
|
+
badNode: badNode,
|
|
84
|
+
};
|
|
85
|
+
// Act & Assert: Should throw specific error
|
|
86
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
87
|
+
nodes,
|
|
88
|
+
channels,
|
|
89
|
+
inputChannels,
|
|
90
|
+
outputChannels,
|
|
91
|
+
})).toThrow("Invalid node type object, expected PregelNode");
|
|
92
|
+
});
|
|
93
|
+
(0, globals_1.it)("should throw when a subscribed channel is not in channels", () => {
|
|
94
|
+
const { channels, inputChannels, outputChannels } = setupValidGraph();
|
|
95
|
+
// Create a node that subscribes to a non-existent channel
|
|
96
|
+
const badNode = new read_js_1.PregelNode({
|
|
97
|
+
channels: {},
|
|
98
|
+
triggers: ["nonexistent"],
|
|
99
|
+
});
|
|
100
|
+
const nodes = { badNode };
|
|
101
|
+
// Act & Assert: Should throw specific error
|
|
102
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
103
|
+
nodes,
|
|
104
|
+
channels,
|
|
105
|
+
inputChannels,
|
|
106
|
+
outputChannels,
|
|
107
|
+
})).toThrow("Subcribed channel 'nonexistent' not in channels");
|
|
108
|
+
});
|
|
109
|
+
(0, globals_1.it)("should throw when a singular input channel is not subscribed by any node", () => {
|
|
110
|
+
const { nodes, channels } = setupValidGraph();
|
|
111
|
+
// Act & Assert: Should throw specific error for an unused input
|
|
112
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
113
|
+
nodes,
|
|
114
|
+
channels,
|
|
115
|
+
inputChannels: "output",
|
|
116
|
+
outputChannels: "output",
|
|
117
|
+
})).toThrow("Input channel output is not subscribed to by any node");
|
|
118
|
+
});
|
|
119
|
+
(0, globals_1.it)("should throw when none of the array input channels are subscribed by any node", () => {
|
|
120
|
+
const { nodes, channels } = setupValidGraph();
|
|
121
|
+
// Act & Assert: Should throw specific error for unused inputs
|
|
122
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
123
|
+
nodes,
|
|
124
|
+
channels,
|
|
125
|
+
inputChannels: [
|
|
126
|
+
"output",
|
|
127
|
+
"nonexistent",
|
|
128
|
+
],
|
|
129
|
+
outputChannels: "output",
|
|
130
|
+
})).toThrow("None of the input channels output,nonexistent are subscribed to by any node");
|
|
131
|
+
});
|
|
132
|
+
(0, globals_1.it)("should throw when an output channel is not in channels", () => {
|
|
133
|
+
const { nodes, channels, inputChannels } = setupValidGraph();
|
|
134
|
+
// Act & Assert: Should throw specific error
|
|
135
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
136
|
+
nodes,
|
|
137
|
+
channels,
|
|
138
|
+
inputChannels,
|
|
139
|
+
outputChannels: "nonexistent",
|
|
140
|
+
})).toThrow("Output channel 'nonexistent' not in channels");
|
|
141
|
+
});
|
|
142
|
+
(0, globals_1.it)("should throw when a stream channel is not in channels", () => {
|
|
143
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
144
|
+
// Act & Assert: Should throw specific error
|
|
145
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
146
|
+
nodes,
|
|
147
|
+
channels,
|
|
148
|
+
inputChannels,
|
|
149
|
+
outputChannels,
|
|
150
|
+
streamChannels: "nonexistent",
|
|
151
|
+
})).toThrow("Output channel 'nonexistent' not in channels");
|
|
152
|
+
});
|
|
153
|
+
(0, globals_1.it)("should throw when an interruptAfterNode is not in nodes", () => {
|
|
154
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
155
|
+
// Act & Assert: Should throw specific error
|
|
156
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
157
|
+
nodes,
|
|
158
|
+
channels,
|
|
159
|
+
inputChannels,
|
|
160
|
+
outputChannels,
|
|
161
|
+
interruptAfterNodes: [
|
|
162
|
+
"nonexistentNode",
|
|
163
|
+
],
|
|
164
|
+
})).toThrow("Node nonexistentNode not in nodes");
|
|
165
|
+
});
|
|
166
|
+
(0, globals_1.it)("should throw when an interruptBeforeNode is not in nodes", () => {
|
|
167
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
168
|
+
// Act & Assert: Should throw specific error
|
|
169
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
170
|
+
nodes,
|
|
171
|
+
channels,
|
|
172
|
+
inputChannels,
|
|
173
|
+
outputChannels,
|
|
174
|
+
interruptBeforeNodes: [
|
|
175
|
+
"nonexistentNode",
|
|
176
|
+
],
|
|
177
|
+
})).toThrow("Node nonexistentNode not in nodes");
|
|
178
|
+
});
|
|
179
|
+
(0, globals_1.it)("should accept '*' as a valid value for interruptAfterNodes", () => {
|
|
180
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
181
|
+
// Act & Assert: Should not throw
|
|
182
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
183
|
+
nodes,
|
|
184
|
+
channels,
|
|
185
|
+
inputChannels,
|
|
186
|
+
outputChannels,
|
|
187
|
+
interruptAfterNodes: "*",
|
|
188
|
+
})).not.toThrow();
|
|
189
|
+
});
|
|
190
|
+
(0, globals_1.it)("should accept '*' as a valid value for interruptBeforeNodes", () => {
|
|
191
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
192
|
+
// Act & Assert: Should not throw
|
|
193
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateGraph)({
|
|
194
|
+
nodes,
|
|
195
|
+
channels,
|
|
196
|
+
inputChannels,
|
|
197
|
+
outputChannels,
|
|
198
|
+
interruptBeforeNodes: "*",
|
|
199
|
+
})).not.toThrow();
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
(0, globals_1.describe)("validateKeys", () => {
|
|
203
|
+
(0, globals_1.it)("should validate keys that exist in channels", () => {
|
|
204
|
+
const { channels } = setupValidGraph();
|
|
205
|
+
// Act & Assert: Should not throw for valid keys
|
|
206
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateKeys)("input", channels)).not.toThrow();
|
|
207
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateKeys)(["input", "output"], channels)).not.toThrow();
|
|
208
|
+
});
|
|
209
|
+
(0, globals_1.it)("should throw when a single key doesn't exist in channels", () => {
|
|
210
|
+
const { channels } = setupValidGraph();
|
|
211
|
+
// Act & Assert: Should throw with specific message
|
|
212
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateKeys)("nonexistent", channels)).toThrow("Key nonexistent not found in channels");
|
|
213
|
+
});
|
|
214
|
+
(0, globals_1.it)("should throw when any key in an array doesn't exist in channels", () => {
|
|
215
|
+
const { channels } = setupValidGraph();
|
|
216
|
+
// Act & Assert: Should throw with specific message
|
|
217
|
+
(0, globals_1.expect)(() => (0, validate_js_1.validateKeys)(["input", "nonexistent"], channels)).toThrow("Key nonexistent not found in channels");
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
//# sourceMappingURL=validate.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { describe, expect, it } from "@jest/globals";
|
|
2
|
+
import { GraphValidationError, validateGraph, validateKeys, } from "./validate.js";
|
|
3
|
+
import { PregelNode } from "./read.js";
|
|
4
|
+
import { INTERRUPT } from "../constants.js";
|
|
5
|
+
import { LastValue } from "../channels/last_value.js";
|
|
6
|
+
// Common test setup
|
|
7
|
+
const setupValidGraph = () => {
|
|
8
|
+
// Create test channels
|
|
9
|
+
const inputChannel = new LastValue();
|
|
10
|
+
const outputChannel = new LastValue();
|
|
11
|
+
// Create test nodes
|
|
12
|
+
const testNode = new PregelNode({
|
|
13
|
+
channels: {},
|
|
14
|
+
triggers: ["input"],
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
nodes: { testNode },
|
|
18
|
+
channels: {
|
|
19
|
+
input: inputChannel,
|
|
20
|
+
output: outputChannel,
|
|
21
|
+
},
|
|
22
|
+
inputChannels: "input",
|
|
23
|
+
outputChannels: "output",
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
describe("GraphValidationError", () => {
|
|
27
|
+
it("should be properly constructed with the right name", () => {
|
|
28
|
+
const error = new GraphValidationError("Test error message");
|
|
29
|
+
expect(error).toBeInstanceOf(Error);
|
|
30
|
+
expect(error.name).toBe("GraphValidationError");
|
|
31
|
+
expect(error.message).toBe("Test error message");
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
describe("validateGraph", () => {
|
|
35
|
+
it("should validate a correct graph without errors", () => {
|
|
36
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
37
|
+
// Act & Assert: Should not throw
|
|
38
|
+
expect(() => validateGraph({
|
|
39
|
+
nodes,
|
|
40
|
+
channels,
|
|
41
|
+
inputChannels,
|
|
42
|
+
outputChannels,
|
|
43
|
+
})).not.toThrow();
|
|
44
|
+
});
|
|
45
|
+
it("should throw when channels are not provided", () => {
|
|
46
|
+
const { nodes, inputChannels, outputChannels } = setupValidGraph();
|
|
47
|
+
// Act & Assert: Should throw with specific message
|
|
48
|
+
expect(() => validateGraph({
|
|
49
|
+
nodes,
|
|
50
|
+
channels: null,
|
|
51
|
+
inputChannels,
|
|
52
|
+
outputChannels,
|
|
53
|
+
})).toThrow("Channels not provided");
|
|
54
|
+
});
|
|
55
|
+
it("should throw when a node is named INTERRUPT", () => {
|
|
56
|
+
const { channels, inputChannels, outputChannels } = setupValidGraph();
|
|
57
|
+
// Create a node with the reserved name
|
|
58
|
+
const badNode = new PregelNode({
|
|
59
|
+
channels: {},
|
|
60
|
+
triggers: ["input"],
|
|
61
|
+
});
|
|
62
|
+
// Create nodes object with the reserved name
|
|
63
|
+
const nodes = { [INTERRUPT]: badNode };
|
|
64
|
+
// Act & Assert: Should throw specific error
|
|
65
|
+
expect(() => validateGraph({
|
|
66
|
+
nodes,
|
|
67
|
+
channels,
|
|
68
|
+
inputChannels,
|
|
69
|
+
outputChannels,
|
|
70
|
+
})).toThrow(`"Node name ${INTERRUPT} is reserved"`);
|
|
71
|
+
});
|
|
72
|
+
it("should throw when a node is not a PregelNode instance", () => {
|
|
73
|
+
const { channels, inputChannels, outputChannels } = setupValidGraph();
|
|
74
|
+
// Create an invalid node (not a PregelNode)
|
|
75
|
+
const badNode = {
|
|
76
|
+
triggers: ["input"],
|
|
77
|
+
func: () => "not a pregel node",
|
|
78
|
+
};
|
|
79
|
+
// Create nodes object with invalid node
|
|
80
|
+
const nodes = {
|
|
81
|
+
badNode: badNode,
|
|
82
|
+
};
|
|
83
|
+
// Act & Assert: Should throw specific error
|
|
84
|
+
expect(() => validateGraph({
|
|
85
|
+
nodes,
|
|
86
|
+
channels,
|
|
87
|
+
inputChannels,
|
|
88
|
+
outputChannels,
|
|
89
|
+
})).toThrow("Invalid node type object, expected PregelNode");
|
|
90
|
+
});
|
|
91
|
+
it("should throw when a subscribed channel is not in channels", () => {
|
|
92
|
+
const { channels, inputChannels, outputChannels } = setupValidGraph();
|
|
93
|
+
// Create a node that subscribes to a non-existent channel
|
|
94
|
+
const badNode = new PregelNode({
|
|
95
|
+
channels: {},
|
|
96
|
+
triggers: ["nonexistent"],
|
|
97
|
+
});
|
|
98
|
+
const nodes = { badNode };
|
|
99
|
+
// Act & Assert: Should throw specific error
|
|
100
|
+
expect(() => validateGraph({
|
|
101
|
+
nodes,
|
|
102
|
+
channels,
|
|
103
|
+
inputChannels,
|
|
104
|
+
outputChannels,
|
|
105
|
+
})).toThrow("Subcribed channel 'nonexistent' not in channels");
|
|
106
|
+
});
|
|
107
|
+
it("should throw when a singular input channel is not subscribed by any node", () => {
|
|
108
|
+
const { nodes, channels } = setupValidGraph();
|
|
109
|
+
// Act & Assert: Should throw specific error for an unused input
|
|
110
|
+
expect(() => validateGraph({
|
|
111
|
+
nodes,
|
|
112
|
+
channels,
|
|
113
|
+
inputChannels: "output",
|
|
114
|
+
outputChannels: "output",
|
|
115
|
+
})).toThrow("Input channel output is not subscribed to by any node");
|
|
116
|
+
});
|
|
117
|
+
it("should throw when none of the array input channels are subscribed by any node", () => {
|
|
118
|
+
const { nodes, channels } = setupValidGraph();
|
|
119
|
+
// Act & Assert: Should throw specific error for unused inputs
|
|
120
|
+
expect(() => validateGraph({
|
|
121
|
+
nodes,
|
|
122
|
+
channels,
|
|
123
|
+
inputChannels: [
|
|
124
|
+
"output",
|
|
125
|
+
"nonexistent",
|
|
126
|
+
],
|
|
127
|
+
outputChannels: "output",
|
|
128
|
+
})).toThrow("None of the input channels output,nonexistent are subscribed to by any node");
|
|
129
|
+
});
|
|
130
|
+
it("should throw when an output channel is not in channels", () => {
|
|
131
|
+
const { nodes, channels, inputChannels } = setupValidGraph();
|
|
132
|
+
// Act & Assert: Should throw specific error
|
|
133
|
+
expect(() => validateGraph({
|
|
134
|
+
nodes,
|
|
135
|
+
channels,
|
|
136
|
+
inputChannels,
|
|
137
|
+
outputChannels: "nonexistent",
|
|
138
|
+
})).toThrow("Output channel 'nonexistent' not in channels");
|
|
139
|
+
});
|
|
140
|
+
it("should throw when a stream channel is not in channels", () => {
|
|
141
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
142
|
+
// Act & Assert: Should throw specific error
|
|
143
|
+
expect(() => validateGraph({
|
|
144
|
+
nodes,
|
|
145
|
+
channels,
|
|
146
|
+
inputChannels,
|
|
147
|
+
outputChannels,
|
|
148
|
+
streamChannels: "nonexistent",
|
|
149
|
+
})).toThrow("Output channel 'nonexistent' not in channels");
|
|
150
|
+
});
|
|
151
|
+
it("should throw when an interruptAfterNode is not in nodes", () => {
|
|
152
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
153
|
+
// Act & Assert: Should throw specific error
|
|
154
|
+
expect(() => validateGraph({
|
|
155
|
+
nodes,
|
|
156
|
+
channels,
|
|
157
|
+
inputChannels,
|
|
158
|
+
outputChannels,
|
|
159
|
+
interruptAfterNodes: [
|
|
160
|
+
"nonexistentNode",
|
|
161
|
+
],
|
|
162
|
+
})).toThrow("Node nonexistentNode not in nodes");
|
|
163
|
+
});
|
|
164
|
+
it("should throw when an interruptBeforeNode is not in nodes", () => {
|
|
165
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
166
|
+
// Act & Assert: Should throw specific error
|
|
167
|
+
expect(() => validateGraph({
|
|
168
|
+
nodes,
|
|
169
|
+
channels,
|
|
170
|
+
inputChannels,
|
|
171
|
+
outputChannels,
|
|
172
|
+
interruptBeforeNodes: [
|
|
173
|
+
"nonexistentNode",
|
|
174
|
+
],
|
|
175
|
+
})).toThrow("Node nonexistentNode not in nodes");
|
|
176
|
+
});
|
|
177
|
+
it("should accept '*' as a valid value for interruptAfterNodes", () => {
|
|
178
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
179
|
+
// Act & Assert: Should not throw
|
|
180
|
+
expect(() => validateGraph({
|
|
181
|
+
nodes,
|
|
182
|
+
channels,
|
|
183
|
+
inputChannels,
|
|
184
|
+
outputChannels,
|
|
185
|
+
interruptAfterNodes: "*",
|
|
186
|
+
})).not.toThrow();
|
|
187
|
+
});
|
|
188
|
+
it("should accept '*' as a valid value for interruptBeforeNodes", () => {
|
|
189
|
+
const { nodes, channels, inputChannels, outputChannels } = setupValidGraph();
|
|
190
|
+
// Act & Assert: Should not throw
|
|
191
|
+
expect(() => validateGraph({
|
|
192
|
+
nodes,
|
|
193
|
+
channels,
|
|
194
|
+
inputChannels,
|
|
195
|
+
outputChannels,
|
|
196
|
+
interruptBeforeNodes: "*",
|
|
197
|
+
})).not.toThrow();
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
describe("validateKeys", () => {
|
|
201
|
+
it("should validate keys that exist in channels", () => {
|
|
202
|
+
const { channels } = setupValidGraph();
|
|
203
|
+
// Act & Assert: Should not throw for valid keys
|
|
204
|
+
expect(() => validateKeys("input", channels)).not.toThrow();
|
|
205
|
+
expect(() => validateKeys(["input", "output"], channels)).not.toThrow();
|
|
206
|
+
});
|
|
207
|
+
it("should throw when a single key doesn't exist in channels", () => {
|
|
208
|
+
const { channels } = setupValidGraph();
|
|
209
|
+
// Act & Assert: Should throw with specific message
|
|
210
|
+
expect(() => validateKeys("nonexistent", channels)).toThrow("Key nonexistent not found in channels");
|
|
211
|
+
});
|
|
212
|
+
it("should throw when any key in an array doesn't exist in channels", () => {
|
|
213
|
+
const { channels } = setupValidGraph();
|
|
214
|
+
// Act & Assert: Should throw with specific message
|
|
215
|
+
expect(() => validateKeys(["input", "nonexistent"], channels)).toThrow("Key nonexistent not found in channels");
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
//# sourceMappingURL=validate.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.test.js","sourceRoot":"","sources":["../../src/pregel/validate.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAYtD,oBAAoB;AACpB,MAAM,eAAe,GAAG,GAAG,EAAE;IAC3B,uBAAuB;IACvB,MAAM,YAAY,GAAG,IAAI,SAAS,EAAU,CAAC;IAC7C,MAAM,aAAa,GAAG,IA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