@langchain/langgraph 0.0.24 → 0.0.25

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.
@@ -27,7 +27,7 @@ function createCheckpoint(checkpoint, channels, step) {
27
27
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
28
  }
29
29
  catch (error) {
30
- if (error.name === errors_js_1.EmptyChannelError.name) {
30
+ if (error.name === errors_js_1.EmptyChannelError.unminifiable_name) {
31
31
  // no-op
32
32
  }
33
33
  else {
@@ -22,7 +22,7 @@ export function createCheckpoint(checkpoint, channels, step) {
22
22
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
23
  }
24
24
  catch (error) {
25
- if (error.name === EmptyChannelError.name) {
25
+ if (error.name === EmptyChannelError.unminifiable_name) {
26
26
  // no-op
27
27
  }
28
28
  else {
package/dist/errors.cjs CHANGED
@@ -6,6 +6,9 @@ class GraphRecursionError extends Error {
6
6
  super(message);
7
7
  this.name = "GraphRecursionError";
8
8
  }
9
+ static get unminifiable_name() {
10
+ return "GraphRecursionError";
11
+ }
9
12
  }
10
13
  exports.GraphRecursionError = GraphRecursionError;
11
14
  class GraphValueError extends Error {
@@ -13,6 +16,9 @@ class GraphValueError extends Error {
13
16
  super(message);
14
17
  this.name = "GraphValueError";
15
18
  }
19
+ static get unminifiable_name() {
20
+ return "GraphValueError";
21
+ }
16
22
  }
17
23
  exports.GraphValueError = GraphValueError;
18
24
  class EmptyChannelError extends Error {
@@ -20,6 +26,9 @@ class EmptyChannelError extends Error {
20
26
  super(message);
21
27
  this.name = "EmptyChannelError";
22
28
  }
29
+ static get unminifiable_name() {
30
+ return "EmptyChannelError";
31
+ }
23
32
  }
24
33
  exports.EmptyChannelError = EmptyChannelError;
25
34
  class InvalidUpdateError extends Error {
@@ -27,5 +36,8 @@ class InvalidUpdateError extends Error {
27
36
  super(message);
28
37
  this.name = "InvalidUpdateError";
29
38
  }
39
+ static get unminifiable_name() {
40
+ return "InvalidUpdateError";
41
+ }
30
42
  }
31
43
  exports.InvalidUpdateError = InvalidUpdateError;
package/dist/errors.d.ts CHANGED
@@ -1,12 +1,16 @@
1
1
  export declare class GraphRecursionError extends Error {
2
2
  constructor(message?: string);
3
+ static get unminifiable_name(): string;
3
4
  }
4
5
  export declare class GraphValueError extends Error {
5
6
  constructor(message?: string);
7
+ static get unminifiable_name(): string;
6
8
  }
7
9
  export declare class EmptyChannelError extends Error {
8
10
  constructor(message?: string);
11
+ static get unminifiable_name(): string;
9
12
  }
10
13
  export declare class InvalidUpdateError extends Error {
11
14
  constructor(message?: string);
15
+ static get unminifiable_name(): string;
12
16
  }
package/dist/errors.js CHANGED
@@ -3,22 +3,34 @@ export class GraphRecursionError extends Error {
3
3
  super(message);
4
4
  this.name = "GraphRecursionError";
5
5
  }
6
+ static get unminifiable_name() {
7
+ return "GraphRecursionError";
8
+ }
6
9
  }
7
10
  export class GraphValueError extends Error {
8
11
  constructor(message) {
9
12
  super(message);
10
13
  this.name = "GraphValueError";
11
14
  }
15
+ static get unminifiable_name() {
16
+ return "GraphValueError";
17
+ }
12
18
  }
13
19
  export class EmptyChannelError extends Error {
14
20
  constructor(message) {
15
21
  super(message);
16
22
  this.name = "EmptyChannelError";
17
23
  }
24
+ static get unminifiable_name() {
25
+ return "EmptyChannelError";
26
+ }
18
27
  }
19
28
  export class InvalidUpdateError extends Error {
20
29
  constructor(message) {
21
30
  super(message);
22
31
  this.name = "InvalidUpdateError";
23
32
  }
33
+ static get unminifiable_name() {
34
+ return "InvalidUpdateError";
35
+ }
24
36
  }
@@ -32,7 +32,7 @@ function* _readChannels(channels
32
32
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
33
  }
34
34
  catch (error) {
35
- if (error.name === errors_js_1.EmptyChannelError.name) {
35
+ if (error.name === errors_js_1.EmptyChannelError.unminifiable_name) {
36
36
  // Skip the channel if it's empty
37
37
  continue;
38
38
  }
@@ -27,7 +27,7 @@ function* _readChannels(channels
27
27
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
28
  }
29
29
  catch (error) {
30
- if (error.name === EmptyChannelError.name) {
30
+ if (error.name === EmptyChannelError.unminifiable_name) {
31
31
  // Skip the channel if it's empty
32
32
  continue;
33
33
  }
@@ -601,7 +601,7 @@ function _applyWrites(checkpoint, channels, pendingWrites) {
601
601
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
602
602
  }
603
603
  catch (e) {
604
- if (e.name === errors_js_1.InvalidUpdateError.name) {
604
+ if (e.name === errors_js_1.InvalidUpdateError.unminifiable_name) {
605
605
  throw new errors_js_1.InvalidUpdateError(`Invalid update for channel ${chan}. Values: ${vals}`);
606
606
  }
607
607
  }
@@ -655,7 +655,7 @@ function _prepareNextTasks(checkpoint, processes, channels, forExecution) {
655
655
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
656
656
  }
657
657
  catch (e) {
658
- if (e.name === errors_js_1.EmptyChannelError.name) {
658
+ if (e.name === errors_js_1.EmptyChannelError.unminifiable_name) {
659
659
  emptyChannels += 1;
660
660
  continue;
661
661
  }
@@ -677,7 +677,7 @@ function _prepareNextTasks(checkpoint, processes, channels, forExecution) {
677
677
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
678
678
  }
679
679
  catch (e) {
680
- if (e.name === errors_js_1.EmptyChannelError.name) {
680
+ if (e.name === errors_js_1.EmptyChannelError.unminifiable_name) {
681
681
  continue;
682
682
  }
683
683
  else {
@@ -594,7 +594,7 @@ export function _applyWrites(checkpoint, channels, pendingWrites) {
594
594
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
595
595
  }
596
596
  catch (e) {
597
- if (e.name === InvalidUpdateError.name) {
597
+ if (e.name === InvalidUpdateError.unminifiable_name) {
598
598
  throw new InvalidUpdateError(`Invalid update for channel ${chan}. Values: ${vals}`);
599
599
  }
600
600
  }
@@ -647,7 +647,7 @@ export function _prepareNextTasks(checkpoint, processes, channels, forExecution)
647
647
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
648
648
  }
649
649
  catch (e) {
650
- if (e.name === EmptyChannelError.name) {
650
+ if (e.name === EmptyChannelError.unminifiable_name) {
651
651
  emptyChannels += 1;
652
652
  continue;
653
653
  }
@@ -669,7 +669,7 @@ export function _prepareNextTasks(checkpoint, processes, channels, forExecution)
669
669
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
670
670
  }
671
671
  catch (e) {
672
- if (e.name === EmptyChannelError.name) {
672
+ if (e.name === EmptyChannelError.unminifiable_name) {
673
673
  continue;
674
674
  }
675
675
  else {
@@ -9,7 +9,7 @@ function readChannel(channels, chan, catch_ = true, returnException = false) {
9
9
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
10
  }
11
11
  catch (e) {
12
- if (e.name === errors_js_1.EmptyChannelError.name) {
12
+ if (e.name === errors_js_1.EmptyChannelError.unminifiable_name) {
13
13
  if (returnException) {
14
14
  return e;
15
15
  }
@@ -33,7 +33,7 @@ function readChannels(channels, select, skipEmpty = true
33
33
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
34
  }
35
35
  catch (e) {
36
- if (e.name === errors_js_1.EmptyChannelError.name) {
36
+ if (e.name === errors_js_1.EmptyChannelError.unminifiable_name) {
37
37
  continue;
38
38
  }
39
39
  }
package/dist/pregel/io.js CHANGED
@@ -6,7 +6,7 @@ export function readChannel(channels, chan, catch_ = true, returnException = fal
6
6
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
7
  }
8
8
  catch (e) {
9
- if (e.name === EmptyChannelError.name) {
9
+ if (e.name === EmptyChannelError.unminifiable_name) {
10
10
  if (returnException) {
11
11
  return e;
12
12
  }
@@ -29,7 +29,7 @@ export function readChannels(channels, select, skipEmpty = true
29
29
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
30
  }
31
31
  catch (e) {
32
- if (e.name === EmptyChannelError.name) {
32
+ if (e.name === EmptyChannelError.unminifiable_name) {
33
33
  continue;
34
34
  }
35
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {
@@ -43,8 +43,8 @@
43
43
  "devDependencies": {
44
44
  "@jest/globals": "^29.5.0",
45
45
  "@langchain/anthropic": "^0.1.21",
46
- "@langchain/community": "^0.2.2",
47
- "@langchain/openai": "^0.0.33",
46
+ "@langchain/community": "^0.2.12",
47
+ "@langchain/openai": "^0.1.3",
48
48
  "@langchain/scripts": "^0.0.13",
49
49
  "@swc/core": "^1.3.90",
50
50
  "@swc/jest": "^0.2.29",
@@ -53,7 +53,9 @@
53
53
  "@types/uuid": "^9",
54
54
  "@typescript-eslint/eslint-plugin": "^6.12.0",
55
55
  "@typescript-eslint/parser": "^6.12.0",
56
+ "@xenova/transformers": "^2.17.2",
56
57
  "better-sqlite3": "^9.5.0",
58
+ "cheerio": "1.0.0-rc.12",
57
59
  "dotenv": "^16.3.1",
58
60
  "dpdm": "^3.12.0",
59
61
  "eslint": "^8.33.0",