langgraph-api 0.2.8__py3-none-any.whl → 0.2.10__py3-none-any.whl
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.
Potentially problematic release.
This version of langgraph-api might be problematic. Click here for more details.
- langgraph_api/__init__.py +1 -1
- langgraph_api/js/build.mts +3 -6
- langgraph_api/js/client.mts +50 -29
- langgraph_api/js/package.json +2 -2
- langgraph_api/js/src/graph.mts +5 -32
- langgraph_api/js/tests/api.test.mts +7 -5
- langgraph_api/js/yarn.lock +9 -9
- langgraph_api/worker.py +21 -0
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.10.dist-info}/METADATA +1 -1
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.10.dist-info}/RECORD +13 -18
- langgraph_api/js/src/parser/parser.mts +0 -474
- langgraph_api/js/src/parser/parser.worker.mjs +0 -12
- langgraph_api/js/src/parser/schema/types.mts +0 -2016
- langgraph_api/js/src/parser/schema/types.template.mts +0 -78
- langgraph_api/js/tests/parser.test.mts +0 -885
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.10.dist-info}/LICENSE +0 -0
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.10.dist-info}/WHEEL +0 -0
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.10.dist-info}/entry_points.txt +0 -0
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { BaseMessage } from "@langchain/core/messages";
|
|
2
|
-
import type {
|
|
3
|
-
StateType,
|
|
4
|
-
UpdateType,
|
|
5
|
-
StateDefinition,
|
|
6
|
-
} from "@langchain/langgraph";
|
|
7
|
-
import type { Graph } from "@langchain/langgraph";
|
|
8
|
-
import type { Pregel } from "@langchain/langgraph/pregel";
|
|
9
|
-
|
|
10
|
-
type AnyPregel = Pregel<any, any>;
|
|
11
|
-
type AnyGraph = Graph<any, any, any, any, any>;
|
|
12
|
-
|
|
13
|
-
type Wrap<T> = (a: T) => void;
|
|
14
|
-
type MatchBaseMessage<T> = T extends BaseMessage ? BaseMessage : never;
|
|
15
|
-
type MatchBaseMessageArray<T> =
|
|
16
|
-
T extends Array<infer C>
|
|
17
|
-
? Wrap<MatchBaseMessage<C>> extends Wrap<BaseMessage>
|
|
18
|
-
? BaseMessage[]
|
|
19
|
-
: never
|
|
20
|
-
: never;
|
|
21
|
-
|
|
22
|
-
type Defactorify<T> = T extends (...args: any[]) => infer R
|
|
23
|
-
? Awaited<R>
|
|
24
|
-
: Awaited<T>;
|
|
25
|
-
|
|
26
|
-
type Inspect<T, CNT extends Array<0> = []> = CNT extends [0, 0, 0]
|
|
27
|
-
? any
|
|
28
|
-
: T extends unknown
|
|
29
|
-
? {
|
|
30
|
-
[K in keyof T]: 0 extends 1 & T[K]
|
|
31
|
-
? T[K]
|
|
32
|
-
: Wrap<MatchBaseMessageArray<T[K]>> extends Wrap<BaseMessage[]>
|
|
33
|
-
? BaseMessage[]
|
|
34
|
-
: Wrap<MatchBaseMessage<T[K]>> extends Wrap<BaseMessage>
|
|
35
|
-
? BaseMessage
|
|
36
|
-
: Inspect<T[K], [0, ...CNT]>;
|
|
37
|
-
}
|
|
38
|
-
: never;
|
|
39
|
-
|
|
40
|
-
type ReflectCompiled<T> = T extends { RunInput: infer S; RunOutput: infer U }
|
|
41
|
-
? { state: S; update: U }
|
|
42
|
-
: T extends { "~InputType": infer InputType; "~OutputType": infer OutputType }
|
|
43
|
-
? { state: OutputType; update: InputType }
|
|
44
|
-
: never;
|
|
45
|
-
|
|
46
|
-
type Reflect<T> =
|
|
47
|
-
Defactorify<T> extends infer DT
|
|
48
|
-
? DT extends {
|
|
49
|
-
compile(...args: any[]): infer Compiled;
|
|
50
|
-
}
|
|
51
|
-
? ReflectCompiled<Compiled>
|
|
52
|
-
: ReflectCompiled<DT>
|
|
53
|
-
: never;
|
|
54
|
-
|
|
55
|
-
type BuilderReflectCompiled<T> = T extends {
|
|
56
|
-
builder: {
|
|
57
|
-
_inputDefinition: infer I extends StateDefinition;
|
|
58
|
-
_outputDefinition: infer O extends StateDefinition;
|
|
59
|
-
_configSchema?: infer C extends StateDefinition | undefined;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
? {
|
|
63
|
-
input: UpdateType<I>;
|
|
64
|
-
output: StateType<O>;
|
|
65
|
-
config: UpdateType<Exclude<C, undefined>>;
|
|
66
|
-
}
|
|
67
|
-
: never;
|
|
68
|
-
|
|
69
|
-
type BuilderReflect<T> =
|
|
70
|
-
Defactorify<T> extends infer DT
|
|
71
|
-
? DT extends {
|
|
72
|
-
compile(...args: any[]): infer Compiled;
|
|
73
|
-
}
|
|
74
|
-
? BuilderReflectCompiled<Compiled>
|
|
75
|
-
: BuilderReflectCompiled<DT>
|
|
76
|
-
: never;
|
|
77
|
-
|
|
78
|
-
type FilterAny<T> = 0 extends 1 & T ? never : T;
|