@langchain/langgraph 0.2.62 → 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.
Files changed (52) hide show
  1. package/README.md +14 -0
  2. package/dist/prebuilt/react_agent_executor.cjs +34 -13
  3. package/dist/prebuilt/react_agent_executor.d.ts +3 -0
  4. package/dist/prebuilt/react_agent_executor.js +34 -15
  5. package/dist/prebuilt/react_agent_executor.js.map +1 -1
  6. package/dist/prebuilt/tool_node.cjs +26 -4
  7. package/dist/prebuilt/tool_node.js +27 -5
  8. package/dist/prebuilt/tool_node.js.map +1 -1
  9. package/dist/pregel/debug.cjs +9 -7
  10. package/dist/pregel/debug.d.ts +10 -0
  11. package/dist/pregel/debug.js +2 -2
  12. package/dist/pregel/debug.js.map +1 -1
  13. package/dist/pregel/debug.test.cjs +189 -0
  14. package/dist/pregel/debug.test.d.ts +1 -0
  15. package/dist/pregel/debug.test.js +187 -0
  16. package/dist/pregel/debug.test.js.map +1 -0
  17. package/dist/pregel/io.mapCommand.test.cjs +151 -0
  18. package/dist/pregel/io.mapCommand.test.d.ts +1 -0
  19. package/dist/pregel/io.mapCommand.test.js +149 -0
  20. package/dist/pregel/io.mapCommand.test.js.map +1 -0
  21. package/dist/pregel/messages.test.cjs +351 -0
  22. package/dist/pregel/messages.test.d.ts +1 -0
  23. package/dist/pregel/messages.test.js +349 -0
  24. package/dist/pregel/messages.test.js.map +1 -0
  25. package/dist/pregel/read.cjs +1 -1
  26. package/dist/pregel/read.js +1 -1
  27. package/dist/pregel/read.js.map +1 -1
  28. package/dist/pregel/read.test.cjs +194 -0
  29. package/dist/pregel/read.test.d.ts +1 -0
  30. package/dist/pregel/read.test.js +192 -0
  31. package/dist/pregel/read.test.js.map +1 -0
  32. package/dist/pregel/runner.test.cjs +66 -0
  33. package/dist/pregel/runner.test.d.ts +1 -0
  34. package/dist/pregel/runner.test.js +64 -0
  35. package/dist/pregel/runner.test.js.map +1 -0
  36. package/dist/pregel/utils/config.test.cjs +214 -0
  37. package/dist/pregel/utils/config.test.d.ts +1 -0
  38. package/dist/pregel/utils/config.test.js +212 -0
  39. package/dist/pregel/utils/config.test.js.map +1 -0
  40. package/dist/pregel/utils/subgraph.test.cjs +83 -0
  41. package/dist/pregel/utils/subgraph.test.d.ts +1 -0
  42. package/dist/pregel/utils/subgraph.test.js +81 -0
  43. package/dist/pregel/utils/subgraph.test.js.map +1 -0
  44. package/dist/pregel/validate.test.cjs +220 -0
  45. package/dist/pregel/validate.test.d.ts +1 -0
  46. package/dist/pregel/validate.test.js +218 -0
  47. package/dist/pregel/validate.test.js.map +1 -0
  48. package/dist/pregel/write.test.cjs +181 -0
  49. package/dist/pregel/write.test.d.ts +1 -0
  50. package/dist/pregel/write.test.js +179 -0
  51. package/dist/pregel/write.test.js.map +1 -0
  52. package/package.json +1 -1
@@ -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":"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
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const globals_1 = require("@jest/globals");
4
+ const runnables_1 = require("@langchain/core/runnables");
5
+ const write_js_1 = require("./write.cjs");
6
+ const constants_js_1 = require("../constants.cjs");
7
+ const errors_js_1 = require("../errors.cjs");
8
+ (0, globals_1.describe)("ChannelWrite", () => {
9
+ (0, globals_1.it)("should write a value to a channel", async () => {
10
+ // Setup write tracking
11
+ const writes = [];
12
+ // Mock config with send function
13
+ const mockSend = globals_1.jest
14
+ .fn()
15
+ .mockImplementation((values) => {
16
+ writes.push(...values);
17
+ });
18
+ const config = {
19
+ configurable: {
20
+ [constants_js_1.CONFIG_KEY_SEND]: mockSend,
21
+ },
22
+ };
23
+ // Create a channel write
24
+ const write = new write_js_1.ChannelWrite([
25
+ { channel: "output", value: "test_output" },
26
+ ]);
27
+ // Run the write with input
28
+ const result = await write.invoke("input_value", config);
29
+ // Verify the input is passed through
30
+ (0, globals_1.expect)(result).toBe("input_value");
31
+ // Verify the write happened
32
+ (0, globals_1.expect)(writes).toEqual([["output", "test_output"]]);
33
+ });
34
+ (0, globals_1.it)("should support writing multiple channels", async () => {
35
+ // Setup write tracking
36
+ const writes = [];
37
+ // Mock config with send function
38
+ const mockSend = globals_1.jest
39
+ .fn()
40
+ .mockImplementation((values) => {
41
+ writes.push(...values);
42
+ });
43
+ const config = {
44
+ configurable: {
45
+ [constants_js_1.CONFIG_KEY_SEND]: mockSend,
46
+ },
47
+ };
48
+ // Create a channel write with multiple channels
49
+ const write = new write_js_1.ChannelWrite([
50
+ { channel: "output1", value: "value1" },
51
+ { channel: "output2", value: "value2" },
52
+ ]);
53
+ // Run the write with input
54
+ await write.invoke("input_value", config);
55
+ // Verify the writes happened
56
+ (0, globals_1.expect)(writes).toEqual([
57
+ ["output1", "value1"],
58
+ ["output2", "value2"],
59
+ ]);
60
+ });
61
+ (0, globals_1.it)("should support using PASSTHROUGH to pass input value to channel", async () => {
62
+ // Setup write tracking
63
+ const writes = [];
64
+ // Mock config with send function
65
+ const mockSend = globals_1.jest
66
+ .fn()
67
+ .mockImplementation((values) => {
68
+ writes.push(...values);
69
+ });
70
+ const config = {
71
+ configurable: {
72
+ [constants_js_1.CONFIG_KEY_SEND]: mockSend,
73
+ },
74
+ };
75
+ // Create a channel write with PASSTHROUGH
76
+ const write = new write_js_1.ChannelWrite([{ channel: "output", value: write_js_1.PASSTHROUGH }]);
77
+ // Run the write with input
78
+ await write.invoke("input_value", config);
79
+ // Verify the input value was written to the channel
80
+ (0, globals_1.expect)(writes).toEqual([["output", "input_value"]]);
81
+ });
82
+ (0, globals_1.it)("should support using mapper to transform value", async () => {
83
+ // Setup write tracking
84
+ const writes = [];
85
+ // Mock config with send function
86
+ const mockSend = globals_1.jest
87
+ .fn()
88
+ .mockImplementation((values) => {
89
+ writes.push(...values);
90
+ });
91
+ const config = {
92
+ configurable: {
93
+ [constants_js_1.CONFIG_KEY_SEND]: mockSend,
94
+ },
95
+ };
96
+ // Create a transformer as a Runnable
97
+ const transformer = new runnables_1.RunnablePassthrough().pipe((value) => `transformed_${value}`);
98
+ // Create a channel write with a mapper
99
+ const write = new write_js_1.ChannelWrite([
100
+ { channel: "output", value: "original", mapper: transformer },
101
+ ]);
102
+ // Run the write
103
+ await write.invoke("input_value", config);
104
+ // Verify the transformed value was written
105
+ (0, globals_1.expect)(writes).toEqual([["output", "transformed_original"]]);
106
+ });
107
+ (0, globals_1.it)("should support SKIP_WRITE to conditionally skip writing", async () => {
108
+ // Setup write tracking
109
+ const writes = [];
110
+ // Mock config with send function
111
+ const mockSend = globals_1.jest
112
+ .fn()
113
+ .mockImplementation((values) => {
114
+ writes.push(...values);
115
+ });
116
+ const config = {
117
+ configurable: {
118
+ [constants_js_1.CONFIG_KEY_SEND]: mockSend,
119
+ },
120
+ };
121
+ // Create a mapper that returns SKIP_WRITE
122
+ const conditionalMapper = new runnables_1.RunnablePassthrough().pipe((_) => write_js_1.SKIP_WRITE);
123
+ // Create a channel write with writes that should and shouldn't happen
124
+ const write = new write_js_1.ChannelWrite([
125
+ { channel: "output1", value: "value1" },
126
+ { channel: "output2", value: "value2", mapper: conditionalMapper },
127
+ ]);
128
+ // Run the write
129
+ await write.invoke("input_value", config);
130
+ // Verify only the first write happened
131
+ (0, globals_1.expect)(writes).toEqual([["output1", "value1"]]);
132
+ });
133
+ (0, globals_1.it)("should handle Send objects by writing to TASKS", async () => {
134
+ // Setup write tracking
135
+ const writes = [];
136
+ // Mock config with send function
137
+ const mockSend = globals_1.jest
138
+ .fn()
139
+ .mockImplementation((values) => {
140
+ writes.push(...values);
141
+ });
142
+ const config = {
143
+ configurable: {
144
+ [constants_js_1.CONFIG_KEY_SEND]: mockSend,
145
+ },
146
+ };
147
+ // Create a Send object
148
+ const send = new constants_js_1.Send("target_node", { arg: "value" });
149
+ // Create a channel write with a Send
150
+ const write = new write_js_1.ChannelWrite([send]);
151
+ // Run the write
152
+ await write.invoke("input_value", config);
153
+ // Verify the Send was written to the TASKS channel
154
+ (0, globals_1.expect)(writes).toEqual([[constants_js_1.TASKS, send]]);
155
+ });
156
+ (0, globals_1.it)("should throw error when trying to write to reserved TASKS channel", async () => {
157
+ // Create a channel write with an invalid channel
158
+ const write = new write_js_1.ChannelWrite([{ channel: constants_js_1.TASKS, value: "value" }]);
159
+ // Mock config with send function
160
+ const config = {
161
+ configurable: {
162
+ [constants_js_1.CONFIG_KEY_SEND]: globals_1.jest.fn(),
163
+ },
164
+ };
165
+ // Verify it throws an error
166
+ await (0, globals_1.expect)(write.invoke("input_value", config)).rejects.toThrow(errors_js_1.InvalidUpdateError);
167
+ await (0, globals_1.expect)(write.invoke("input_value", config)).rejects.toThrow("Cannot write to the reserved channel TASKS");
168
+ });
169
+ });
170
+ (0, globals_1.describe)("ChannelWrite static methods", () => {
171
+ (0, globals_1.it)("isWriter should identify ChannelWrite instances", () => {
172
+ const write = new write_js_1.ChannelWrite([{ channel: "output", value: "value" }]);
173
+ (0, globals_1.expect)(write_js_1.ChannelWrite.isWriter(write)).toBe(true);
174
+ });
175
+ (0, globals_1.it)("registerWriter should mark a Runnable as a writer", () => {
176
+ const runnable = new runnables_1.RunnablePassthrough();
177
+ const writer = write_js_1.ChannelWrite.registerWriter(runnable);
178
+ (0, globals_1.expect)(write_js_1.ChannelWrite.isWriter(writer)).toBe(true);
179
+ });
180
+ });
181
+ //# sourceMappingURL=write.test.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,179 @@
1
+ import { describe, expect, it, jest } from "@jest/globals";
2
+ import { RunnablePassthrough } from "@langchain/core/runnables";
3
+ import { ChannelWrite, PASSTHROUGH, SKIP_WRITE } from "./write.js";
4
+ import { CONFIG_KEY_SEND, Send, TASKS } from "../constants.js";
5
+ import { InvalidUpdateError } from "../errors.js";
6
+ describe("ChannelWrite", () => {
7
+ it("should write a value to a channel", async () => {
8
+ // Setup write tracking
9
+ const writes = [];
10
+ // Mock config with send function
11
+ const mockSend = jest
12
+ .fn()
13
+ .mockImplementation((values) => {
14
+ writes.push(...values);
15
+ });
16
+ const config = {
17
+ configurable: {
18
+ [CONFIG_KEY_SEND]: mockSend,
19
+ },
20
+ };
21
+ // Create a channel write
22
+ const write = new ChannelWrite([
23
+ { channel: "output", value: "test_output" },
24
+ ]);
25
+ // Run the write with input
26
+ const result = await write.invoke("input_value", config);
27
+ // Verify the input is passed through
28
+ expect(result).toBe("input_value");
29
+ // Verify the write happened
30
+ expect(writes).toEqual([["output", "test_output"]]);
31
+ });
32
+ it("should support writing multiple channels", async () => {
33
+ // Setup write tracking
34
+ const writes = [];
35
+ // Mock config with send function
36
+ const mockSend = jest
37
+ .fn()
38
+ .mockImplementation((values) => {
39
+ writes.push(...values);
40
+ });
41
+ const config = {
42
+ configurable: {
43
+ [CONFIG_KEY_SEND]: mockSend,
44
+ },
45
+ };
46
+ // Create a channel write with multiple channels
47
+ const write = new ChannelWrite([
48
+ { channel: "output1", value: "value1" },
49
+ { channel: "output2", value: "value2" },
50
+ ]);
51
+ // Run the write with input
52
+ await write.invoke("input_value", config);
53
+ // Verify the writes happened
54
+ expect(writes).toEqual([
55
+ ["output1", "value1"],
56
+ ["output2", "value2"],
57
+ ]);
58
+ });
59
+ it("should support using PASSTHROUGH to pass input value to channel", async () => {
60
+ // Setup write tracking
61
+ const writes = [];
62
+ // Mock config with send function
63
+ const mockSend = jest
64
+ .fn()
65
+ .mockImplementation((values) => {
66
+ writes.push(...values);
67
+ });
68
+ const config = {
69
+ configurable: {
70
+ [CONFIG_KEY_SEND]: mockSend,
71
+ },
72
+ };
73
+ // Create a channel write with PASSTHROUGH
74
+ const write = new ChannelWrite([{ channel: "output", value: PASSTHROUGH }]);
75
+ // Run the write with input
76
+ await write.invoke("input_value", config);
77
+ // Verify the input value was written to the channel
78
+ expect(writes).toEqual([["output", "input_value"]]);
79
+ });
80
+ it("should support using mapper to transform value", async () => {
81
+ // Setup write tracking
82
+ const writes = [];
83
+ // Mock config with send function
84
+ const mockSend = jest
85
+ .fn()
86
+ .mockImplementation((values) => {
87
+ writes.push(...values);
88
+ });
89
+ const config = {
90
+ configurable: {
91
+ [CONFIG_KEY_SEND]: mockSend,
92
+ },
93
+ };
94
+ // Create a transformer as a Runnable
95
+ const transformer = new RunnablePassthrough().pipe((value) => `transformed_${value}`);
96
+ // Create a channel write with a mapper
97
+ const write = new ChannelWrite([
98
+ { channel: "output", value: "original", mapper: transformer },
99
+ ]);
100
+ // Run the write
101
+ await write.invoke("input_value", config);
102
+ // Verify the transformed value was written
103
+ expect(writes).toEqual([["output", "transformed_original"]]);
104
+ });
105
+ it("should support SKIP_WRITE to conditionally skip writing", async () => {
106
+ // Setup write tracking
107
+ const writes = [];
108
+ // Mock config with send function
109
+ const mockSend = jest
110
+ .fn()
111
+ .mockImplementation((values) => {
112
+ writes.push(...values);
113
+ });
114
+ const config = {
115
+ configurable: {
116
+ [CONFIG_KEY_SEND]: mockSend,
117
+ },
118
+ };
119
+ // Create a mapper that returns SKIP_WRITE
120
+ const conditionalMapper = new RunnablePassthrough().pipe((_) => SKIP_WRITE);
121
+ // Create a channel write with writes that should and shouldn't happen
122
+ const write = new ChannelWrite([
123
+ { channel: "output1", value: "value1" },
124
+ { channel: "output2", value: "value2", mapper: conditionalMapper },
125
+ ]);
126
+ // Run the write
127
+ await write.invoke("input_value", config);
128
+ // Verify only the first write happened
129
+ expect(writes).toEqual([["output1", "value1"]]);
130
+ });
131
+ it("should handle Send objects by writing to TASKS", async () => {
132
+ // Setup write tracking
133
+ const writes = [];
134
+ // Mock config with send function
135
+ const mockSend = jest
136
+ .fn()
137
+ .mockImplementation((values) => {
138
+ writes.push(...values);
139
+ });
140
+ const config = {
141
+ configurable: {
142
+ [CONFIG_KEY_SEND]: mockSend,
143
+ },
144
+ };
145
+ // Create a Send object
146
+ const send = new Send("target_node", { arg: "value" });
147
+ // Create a channel write with a Send
148
+ const write = new ChannelWrite([send]);
149
+ // Run the write
150
+ await write.invoke("input_value", config);
151
+ // Verify the Send was written to the TASKS channel
152
+ expect(writes).toEqual([[TASKS, send]]);
153
+ });
154
+ it("should throw error when trying to write to reserved TASKS channel", async () => {
155
+ // Create a channel write with an invalid channel
156
+ const write = new ChannelWrite([{ channel: TASKS, value: "value" }]);
157
+ // Mock config with send function
158
+ const config = {
159
+ configurable: {
160
+ [CONFIG_KEY_SEND]: jest.fn(),
161
+ },
162
+ };
163
+ // Verify it throws an error
164
+ await expect(write.invoke("input_value", config)).rejects.toThrow(InvalidUpdateError);
165
+ await expect(write.invoke("input_value", config)).rejects.toThrow("Cannot write to the reserved channel TASKS");
166
+ });
167
+ });
168
+ describe("ChannelWrite static methods", () => {
169
+ it("isWriter should identify ChannelWrite instances", () => {
170
+ const write = new ChannelWrite([{ channel: "output", value: "value" }]);
171
+ expect(ChannelWrite.isWriter(write)).toBe(true);
172
+ });
173
+ it("registerWriter should mark a Runnable as a writer", () => {
174
+ const runnable = new RunnablePassthrough();
175
+ const writer = ChannelWrite.registerWriter(runnable);
176
+ expect(ChannelWrite.isWriter(writer)).toBe(true);
177
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