@langchain/langgraph-sdk 1.3.1 → 1.4.4

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 (185) hide show
  1. package/package.json +5 -5
  2. package/CHANGELOG.md +0 -281
  3. package/dist/_virtual/rolldown_runtime.cjs +0 -25
  4. package/dist/auth/error.cjs +0 -79
  5. package/dist/auth/error.cjs.map +0 -1
  6. package/dist/auth/error.d.cts +0 -13
  7. package/dist/auth/error.d.cts.map +0 -1
  8. package/dist/auth/error.d.ts +0 -13
  9. package/dist/auth/error.d.ts.map +0 -1
  10. package/dist/auth/error.js +0 -78
  11. package/dist/auth/error.js.map +0 -1
  12. package/dist/auth/index.cjs +0 -39
  13. package/dist/auth/index.cjs.map +0 -1
  14. package/dist/auth/index.d.cts +0 -31
  15. package/dist/auth/index.d.cts.map +0 -1
  16. package/dist/auth/index.d.ts +0 -31
  17. package/dist/auth/index.d.ts.map +0 -1
  18. package/dist/auth/index.js +0 -37
  19. package/dist/auth/index.js.map +0 -1
  20. package/dist/auth/types.d.cts +0 -294
  21. package/dist/auth/types.d.cts.map +0 -1
  22. package/dist/auth/types.d.ts +0 -294
  23. package/dist/auth/types.d.ts.map +0 -1
  24. package/dist/client.cjs +0 -1219
  25. package/dist/client.cjs.map +0 -1
  26. package/dist/client.d.cts +0 -803
  27. package/dist/client.d.cts.map +0 -1
  28. package/dist/client.d.ts +0 -803
  29. package/dist/client.d.ts.map +0 -1
  30. package/dist/client.js +0 -1212
  31. package/dist/client.js.map +0 -1
  32. package/dist/index.cjs +0 -6
  33. package/dist/index.d.cts +0 -7
  34. package/dist/index.d.ts +0 -7
  35. package/dist/index.js +0 -4
  36. package/dist/logging/index.cjs +0 -35
  37. package/dist/logging/index.cjs.map +0 -1
  38. package/dist/logging/index.d.cts +0 -47
  39. package/dist/logging/index.d.cts.map +0 -1
  40. package/dist/logging/index.d.ts +0 -47
  41. package/dist/logging/index.d.ts.map +0 -1
  42. package/dist/logging/index.js +0 -34
  43. package/dist/logging/index.js.map +0 -1
  44. package/dist/react/index.cjs +0 -5
  45. package/dist/react/index.d.cts +0 -4
  46. package/dist/react/index.d.ts +0 -4
  47. package/dist/react/index.js +0 -4
  48. package/dist/react/stream.cjs +0 -18
  49. package/dist/react/stream.cjs.map +0 -1
  50. package/dist/react/stream.custom.cjs +0 -129
  51. package/dist/react/stream.custom.cjs.map +0 -1
  52. package/dist/react/stream.custom.d.cts +0 -39
  53. package/dist/react/stream.custom.d.cts.map +0 -1
  54. package/dist/react/stream.custom.d.ts +0 -39
  55. package/dist/react/stream.custom.d.ts.map +0 -1
  56. package/dist/react/stream.custom.js +0 -127
  57. package/dist/react/stream.custom.js.map +0 -1
  58. package/dist/react/stream.d.cts +0 -73
  59. package/dist/react/stream.d.cts.map +0 -1
  60. package/dist/react/stream.d.ts +0 -73
  61. package/dist/react/stream.d.ts.map +0 -1
  62. package/dist/react/stream.js +0 -17
  63. package/dist/react/stream.js.map +0 -1
  64. package/dist/react/stream.lgp.cjs +0 -446
  65. package/dist/react/stream.lgp.cjs.map +0 -1
  66. package/dist/react/stream.lgp.js +0 -445
  67. package/dist/react/stream.lgp.js.map +0 -1
  68. package/dist/react/thread.cjs +0 -22
  69. package/dist/react/thread.cjs.map +0 -1
  70. package/dist/react/thread.js +0 -21
  71. package/dist/react/thread.js.map +0 -1
  72. package/dist/react/types.d.cts +0 -363
  73. package/dist/react/types.d.cts.map +0 -1
  74. package/dist/react/types.d.ts +0 -363
  75. package/dist/react/types.d.ts.map +0 -1
  76. package/dist/react-ui/client.cjs +0 -137
  77. package/dist/react-ui/client.cjs.map +0 -1
  78. package/dist/react-ui/client.d.cts +0 -90
  79. package/dist/react-ui/client.d.cts.map +0 -1
  80. package/dist/react-ui/client.d.ts +0 -90
  81. package/dist/react-ui/client.d.ts.map +0 -1
  82. package/dist/react-ui/client.js +0 -134
  83. package/dist/react-ui/client.js.map +0 -1
  84. package/dist/react-ui/index.cjs +0 -14
  85. package/dist/react-ui/index.cjs.map +0 -1
  86. package/dist/react-ui/index.d.cts +0 -3
  87. package/dist/react-ui/index.d.ts +0 -3
  88. package/dist/react-ui/index.js +0 -9
  89. package/dist/react-ui/index.js.map +0 -1
  90. package/dist/react-ui/server/index.cjs +0 -5
  91. package/dist/react-ui/server/index.d.cts +0 -3
  92. package/dist/react-ui/server/index.d.ts +0 -3
  93. package/dist/react-ui/server/index.js +0 -4
  94. package/dist/react-ui/server/server.cjs +0 -57
  95. package/dist/react-ui/server/server.cjs.map +0 -1
  96. package/dist/react-ui/server/server.d.cts +0 -55
  97. package/dist/react-ui/server/server.d.cts.map +0 -1
  98. package/dist/react-ui/server/server.d.ts +0 -55
  99. package/dist/react-ui/server/server.d.ts.map +0 -1
  100. package/dist/react-ui/server/server.js +0 -56
  101. package/dist/react-ui/server/server.js.map +0 -1
  102. package/dist/react-ui/types.cjs +0 -38
  103. package/dist/react-ui/types.cjs.map +0 -1
  104. package/dist/react-ui/types.d.cts +0 -25
  105. package/dist/react-ui/types.d.cts.map +0 -1
  106. package/dist/react-ui/types.d.ts +0 -25
  107. package/dist/react-ui/types.d.ts.map +0 -1
  108. package/dist/react-ui/types.js +0 -35
  109. package/dist/react-ui/types.js.map +0 -1
  110. package/dist/schema.d.cts +0 -284
  111. package/dist/schema.d.cts.map +0 -1
  112. package/dist/schema.d.ts +0 -284
  113. package/dist/schema.d.ts.map +0 -1
  114. package/dist/singletons/fetch.cjs +0 -24
  115. package/dist/singletons/fetch.cjs.map +0 -1
  116. package/dist/singletons/fetch.d.cts +0 -14
  117. package/dist/singletons/fetch.d.cts.map +0 -1
  118. package/dist/singletons/fetch.d.ts +0 -14
  119. package/dist/singletons/fetch.d.ts.map +0 -1
  120. package/dist/singletons/fetch.js +0 -22
  121. package/dist/singletons/fetch.js.map +0 -1
  122. package/dist/types.d.cts +0 -187
  123. package/dist/types.d.cts.map +0 -1
  124. package/dist/types.d.ts +0 -187
  125. package/dist/types.d.ts.map +0 -1
  126. package/dist/types.messages.d.cts +0 -91
  127. package/dist/types.messages.d.cts.map +0 -1
  128. package/dist/types.messages.d.ts +0 -91
  129. package/dist/types.messages.d.ts.map +0 -1
  130. package/dist/types.stream.d.cts +0 -235
  131. package/dist/types.stream.d.cts.map +0 -1
  132. package/dist/types.stream.d.ts +0 -235
  133. package/dist/types.stream.d.ts.map +0 -1
  134. package/dist/ui/branching.cjs +0 -153
  135. package/dist/ui/branching.cjs.map +0 -1
  136. package/dist/ui/branching.d.cts +0 -22
  137. package/dist/ui/branching.d.cts.map +0 -1
  138. package/dist/ui/branching.d.ts +0 -22
  139. package/dist/ui/branching.d.ts.map +0 -1
  140. package/dist/ui/branching.js +0 -152
  141. package/dist/ui/branching.js.map +0 -1
  142. package/dist/ui/errors.cjs +0 -15
  143. package/dist/ui/errors.cjs.map +0 -1
  144. package/dist/ui/errors.js +0 -14
  145. package/dist/ui/errors.js.map +0 -1
  146. package/dist/ui/manager.cjs +0 -182
  147. package/dist/ui/manager.cjs.map +0 -1
  148. package/dist/ui/manager.js +0 -182
  149. package/dist/ui/manager.js.map +0 -1
  150. package/dist/ui/messages.cjs +0 -70
  151. package/dist/ui/messages.cjs.map +0 -1
  152. package/dist/ui/messages.js +0 -68
  153. package/dist/ui/messages.js.map +0 -1
  154. package/dist/ui/utils.cjs +0 -14
  155. package/dist/ui/utils.cjs.map +0 -1
  156. package/dist/ui/utils.js +0 -12
  157. package/dist/ui/utils.js.map +0 -1
  158. package/dist/utils/async_caller.cjs +0 -111
  159. package/dist/utils/async_caller.cjs.map +0 -1
  160. package/dist/utils/async_caller.d.cts +0 -53
  161. package/dist/utils/async_caller.d.cts.map +0 -1
  162. package/dist/utils/async_caller.d.ts +0 -53
  163. package/dist/utils/async_caller.d.ts.map +0 -1
  164. package/dist/utils/async_caller.js +0 -110
  165. package/dist/utils/async_caller.js.map +0 -1
  166. package/dist/utils/env.cjs +0 -13
  167. package/dist/utils/env.cjs.map +0 -1
  168. package/dist/utils/env.js +0 -12
  169. package/dist/utils/env.js.map +0 -1
  170. package/dist/utils/error.cjs +0 -17
  171. package/dist/utils/error.cjs.map +0 -1
  172. package/dist/utils/error.js +0 -16
  173. package/dist/utils/error.js.map +0 -1
  174. package/dist/utils/signals.cjs +0 -20
  175. package/dist/utils/signals.cjs.map +0 -1
  176. package/dist/utils/signals.js +0 -19
  177. package/dist/utils/signals.js.map +0 -1
  178. package/dist/utils/sse.cjs +0 -124
  179. package/dist/utils/sse.cjs.map +0 -1
  180. package/dist/utils/sse.js +0 -122
  181. package/dist/utils/sse.js.map +0 -1
  182. package/dist/utils/stream.cjs +0 -176
  183. package/dist/utils/stream.cjs.map +0 -1
  184. package/dist/utils/stream.js +0 -175
  185. package/dist/utils/stream.js.map +0 -1
package/dist/types.d.ts DELETED
@@ -1,187 +0,0 @@
1
- import { Checkpoint, Config, Metadata } from "./schema.js";
2
- import { StreamMode } from "./types.stream.js";
3
- import { LangChainTracer } from "@langchain/core/tracers/tracer_langchain";
4
-
5
- //#region src/types.d.ts
6
- type MultitaskStrategy = "reject" | "interrupt" | "rollback" | "enqueue";
7
- type OnConflictBehavior = "raise" | "do_nothing";
8
- type OnCompletionBehavior = "complete" | "continue";
9
- type DisconnectMode = "cancel" | "continue";
10
- type Durability = "exit" | "async" | "sync";
11
- type StreamEvent = "events" | "metadata" | "debug" | "updates" | "values" | "messages/partial" | "messages/metadata" | "messages/complete" | "messages" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types
12
- interface Send {
13
- node: string;
14
- input: unknown | null;
15
- }
16
- interface Command {
17
- /**
18
- * An object to update the thread state with.
19
- */
20
- update?: Record<string, unknown> | [string, unknown][] | null;
21
- /**
22
- * The value to return from an `interrupt` function call.
23
- */
24
- resume?: unknown;
25
- /**
26
- * Determine the next node to navigate to. Can be one of the following:
27
- * - Name(s) of the node names to navigate to next.
28
- * - `Send` command(s) to execute node(s) with provided input.
29
- */
30
- goto?: Send | Send[] | string | string[];
31
- }
32
- interface RunsInvokePayload {
33
- /**
34
- * Input to the run. Pass `null` to resume from the current state of the thread.
35
- */
36
- input?: Record<string, unknown> | null;
37
- /**
38
- * Metadata for the run.
39
- */
40
- metadata?: Metadata;
41
- /**
42
- * Additional configuration for the run.
43
- */
44
- config?: Config;
45
- /**
46
- * Static context to add to the assistant.
47
- * @remarks Added in LangGraph.js 0.4
48
- */
49
- context?: unknown;
50
- /**
51
- * Checkpoint ID for when creating a new run.
52
- */
53
- checkpointId?: string;
54
- /**
55
- * Checkpoint for when creating a new run.
56
- */
57
- checkpoint?: Omit<Checkpoint, "thread_id">;
58
- /**
59
- * Whether to checkpoint during the run (or only at the end/interruption).
60
- * @deprecated Use `durability` instead.
61
- */
62
- checkpointDuring?: boolean;
63
- /**
64
- * Whether to checkpoint during the run (or only at the end/interruption).
65
- * - `"async"`: Save checkpoint asynchronously while the next step executes (default).
66
- * - `"sync"`: Save checkpoint synchronously before the next step starts.
67
- * - `"exit"`: Save checkpoint only when the graph exits.
68
- * @default "async"
69
- */
70
- durability?: Durability;
71
- /**
72
- * Interrupt execution before entering these nodes.
73
- */
74
- interruptBefore?: "*" | string[];
75
- /**
76
- * Interrupt execution after leaving these nodes.
77
- */
78
- interruptAfter?: "*" | string[];
79
- /**
80
- * Strategy to handle concurrent runs on the same thread. Only relevant if
81
- * there is a pending/inflight run on the same thread. One of:
82
- * - "reject": Reject the new run.
83
- * - "interrupt": Interrupt the current run, keeping steps completed until now,
84
- and start a new one.
85
- * - "rollback": Cancel and delete the existing run, rolling back the thread to
86
- the state before it had started, then start the new run.
87
- * - "enqueue": Queue up the new run to start after the current run finishes.
88
- */
89
- multitaskStrategy?: MultitaskStrategy;
90
- /**
91
- * Abort controller signal to cancel the run.
92
- */
93
- signal?: AbortController["signal"];
94
- /**
95
- * Behavior to handle run completion. Only relevant if
96
- * there is a pending/inflight run on the same thread. One of:
97
- * - "complete": Complete the run.
98
- * - "continue": Continue the run.
99
- */
100
- onCompletion?: OnCompletionBehavior;
101
- /**
102
- * Webhook to call when the run is complete.
103
- */
104
- webhook?: string;
105
- /**
106
- * Behavior to handle disconnection. Only relevant if
107
- * there is a pending/inflight run on the same thread. One of:
108
- * - "cancel": Cancel the run.
109
- * - "continue": Continue the run.
110
- */
111
- onDisconnect?: DisconnectMode;
112
- /**
113
- * The number of seconds to wait before starting the run.
114
- * Use to schedule future runs.
115
- */
116
- afterSeconds?: number;
117
- /**
118
- * Behavior if the specified run doesn't exist. Defaults to "reject".
119
- */
120
- ifNotExists?: "create" | "reject";
121
- /**
122
- * One or more commands to invoke the graph with.
123
- */
124
- command?: Command;
125
- /**
126
- * Callback when a run is created.
127
- */
128
- onRunCreated?: (params: {
129
- run_id: string;
130
- thread_id?: string;
131
- }) => void;
132
- /**
133
- * @internal
134
- * For LangSmith tracing purposes only. Not part of the public API.
135
- */
136
- _langsmithTracer?: LangChainTracer;
137
- }
138
- interface RunsStreamPayload<TStreamMode extends StreamMode | StreamMode[] = [], TSubgraphs extends boolean = false> extends RunsInvokePayload {
139
- /**
140
- * One of `"values"`, `"messages"`, `"messages-tuple"`, `"updates"`, `"events"`, `"debug"`, `"custom"`.
141
- */
142
- streamMode?: TStreamMode;
143
- /**
144
- * Stream output from subgraphs. By default, streams only the top graph.
145
- */
146
- streamSubgraphs?: TSubgraphs;
147
- /**
148
- * Whether the stream is considered resumable.
149
- * If true, the stream can be resumed and replayed in its entirety even after disconnection.
150
- */
151
- streamResumable?: boolean;
152
- /**
153
- * Pass one or more feedbackKeys if you want to request short-lived signed URLs
154
- * for submitting feedback to LangSmith with this key for this run.
155
- */
156
- feedbackKeys?: string[];
157
- }
158
- interface RunsCreatePayload extends RunsInvokePayload {
159
- /**
160
- * One of `"values"`, `"messages"`, `"messages-tuple"`, `"updates"`, `"events"`, `"debug"`, `"custom"`.
161
- */
162
- streamMode?: StreamMode | Array<StreamMode>;
163
- /**
164
- * Stream output from subgraphs. By default, streams only the top graph.
165
- */
166
- streamSubgraphs?: boolean;
167
- /**
168
- * Whether the stream is considered resumable.
169
- * If true, the stream can be resumed and replayed in its entirety even after disconnection.
170
- */
171
- streamResumable?: boolean;
172
- }
173
- interface CronsCreatePayload extends RunsCreatePayload {
174
- /**
175
- * Schedule for running the Cron Job
176
- */
177
- schedule: string;
178
- }
179
- interface RunsWaitPayload extends RunsStreamPayload {
180
- /**
181
- * Raise errors returned by the run. Default is `true`.
182
- */
183
- raiseError?: boolean;
184
- }
185
- //#endregion
186
- export { Command, CronsCreatePayload, DisconnectMode, Durability, MultitaskStrategy, OnCompletionBehavior, OnConflictBehavior, RunsCreatePayload, RunsInvokePayload, RunsStreamPayload, RunsWaitPayload, StreamEvent };
187
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","names":["LangChainTracer","Checkpoint","Config","Metadata","StreamMode","MultitaskStrategy","OnConflictBehavior","OnCompletionBehavior","DisconnectMode","Durability","StreamEvent","Send","Command","Record","RunsInvokePayload","Omit","AbortController","RunsStreamPayload","TStreamMode","TSubgraphs","RunsCreatePayload","Array","CronsCreatePayload","RunsWaitPayload"],"sources":["../src/types.d.ts"],"sourcesContent":["import { LangChainTracer } from \"@langchain/core/tracers/tracer_langchain\";\nimport { Checkpoint, Config, Metadata } from \"./schema.js\";\nimport { StreamMode } from \"./types.stream.js\";\nexport type MultitaskStrategy = \"reject\" | \"interrupt\" | \"rollback\" | \"enqueue\";\nexport type OnConflictBehavior = \"raise\" | \"do_nothing\";\nexport type OnCompletionBehavior = \"complete\" | \"continue\";\nexport type DisconnectMode = \"cancel\" | \"continue\";\nexport type Durability = \"exit\" | \"async\" | \"sync\";\nexport type StreamEvent = \"events\" | \"metadata\" | \"debug\" | \"updates\" | \"values\" | \"messages/partial\" | \"messages/metadata\" | \"messages/complete\" | \"messages\" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types\nexport interface Send {\n node: string;\n input: unknown | null;\n}\nexport interface Command {\n /**\n * An object to update the thread state with.\n */\n update?: Record<string, unknown> | [string, unknown][] | null;\n /**\n * The value to return from an `interrupt` function call.\n */\n resume?: unknown;\n /**\n * Determine the next node to navigate to. Can be one of the following:\n * - Name(s) of the node names to navigate to next.\n * - `Send` command(s) to execute node(s) with provided input.\n */\n goto?: Send | Send[] | string | string[];\n}\nexport interface RunsInvokePayload {\n /**\n * Input to the run. Pass `null` to resume from the current state of the thread.\n */\n input?: Record<string, unknown> | null;\n /**\n * Metadata for the run.\n */\n metadata?: Metadata;\n /**\n * Additional configuration for the run.\n */\n config?: Config;\n /**\n * Static context to add to the assistant.\n * @remarks Added in LangGraph.js 0.4\n */\n context?: unknown;\n /**\n * Checkpoint ID for when creating a new run.\n */\n checkpointId?: string;\n /**\n * Checkpoint for when creating a new run.\n */\n checkpoint?: Omit<Checkpoint, \"thread_id\">;\n /**\n * Whether to checkpoint during the run (or only at the end/interruption).\n * @deprecated Use `durability` instead.\n */\n checkpointDuring?: boolean;\n /**\n * Whether to checkpoint during the run (or only at the end/interruption).\n * - `\"async\"`: Save checkpoint asynchronously while the next step executes (default).\n * - `\"sync\"`: Save checkpoint synchronously before the next step starts.\n * - `\"exit\"`: Save checkpoint only when the graph exits.\n * @default \"async\"\n */\n durability?: Durability;\n /**\n * Interrupt execution before entering these nodes.\n */\n interruptBefore?: \"*\" | string[];\n /**\n * Interrupt execution after leaving these nodes.\n */\n interruptAfter?: \"*\" | string[];\n /**\n * Strategy to handle concurrent runs on the same thread. Only relevant if\n * there is a pending/inflight run on the same thread. One of:\n * - \"reject\": Reject the new run.\n * - \"interrupt\": Interrupt the current run, keeping steps completed until now,\n and start a new one.\n * - \"rollback\": Cancel and delete the existing run, rolling back the thread to\n the state before it had started, then start the new run.\n * - \"enqueue\": Queue up the new run to start after the current run finishes.\n */\n multitaskStrategy?: MultitaskStrategy;\n /**\n * Abort controller signal to cancel the run.\n */\n signal?: AbortController[\"signal\"];\n /**\n * Behavior to handle run completion. Only relevant if\n * there is a pending/inflight run on the same thread. One of:\n * - \"complete\": Complete the run.\n * - \"continue\": Continue the run.\n */\n onCompletion?: OnCompletionBehavior;\n /**\n * Webhook to call when the run is complete.\n */\n webhook?: string;\n /**\n * Behavior to handle disconnection. Only relevant if\n * there is a pending/inflight run on the same thread. One of:\n * - \"cancel\": Cancel the run.\n * - \"continue\": Continue the run.\n */\n onDisconnect?: DisconnectMode;\n /**\n * The number of seconds to wait before starting the run.\n * Use to schedule future runs.\n */\n afterSeconds?: number;\n /**\n * Behavior if the specified run doesn't exist. Defaults to \"reject\".\n */\n ifNotExists?: \"create\" | \"reject\";\n /**\n * One or more commands to invoke the graph with.\n */\n command?: Command;\n /**\n * Callback when a run is created.\n */\n onRunCreated?: (params: {\n run_id: string;\n thread_id?: string;\n }) => void;\n /**\n * @internal\n * For LangSmith tracing purposes only. Not part of the public API.\n */\n _langsmithTracer?: LangChainTracer;\n}\nexport interface RunsStreamPayload<TStreamMode extends StreamMode | StreamMode[] = [], TSubgraphs extends boolean = false> extends RunsInvokePayload {\n /**\n * One of `\"values\"`, `\"messages\"`, `\"messages-tuple\"`, `\"updates\"`, `\"events\"`, `\"debug\"`, `\"custom\"`.\n */\n streamMode?: TStreamMode;\n /**\n * Stream output from subgraphs. By default, streams only the top graph.\n */\n streamSubgraphs?: TSubgraphs;\n /**\n * Whether the stream is considered resumable.\n * If true, the stream can be resumed and replayed in its entirety even after disconnection.\n */\n streamResumable?: boolean;\n /**\n * Pass one or more feedbackKeys if you want to request short-lived signed URLs\n * for submitting feedback to LangSmith with this key for this run.\n */\n feedbackKeys?: string[];\n}\nexport interface RunsCreatePayload extends RunsInvokePayload {\n /**\n * One of `\"values\"`, `\"messages\"`, `\"messages-tuple\"`, `\"updates\"`, `\"events\"`, `\"debug\"`, `\"custom\"`.\n */\n streamMode?: StreamMode | Array<StreamMode>;\n /**\n * Stream output from subgraphs. By default, streams only the top graph.\n */\n streamSubgraphs?: boolean;\n /**\n * Whether the stream is considered resumable.\n * If true, the stream can be resumed and replayed in its entirety even after disconnection.\n */\n streamResumable?: boolean;\n}\nexport interface CronsCreatePayload extends RunsCreatePayload {\n /**\n * Schedule for running the Cron Job\n */\n schedule: string;\n}\nexport interface RunsWaitPayload extends RunsStreamPayload {\n /**\n * Raise errors returned by the run. Default is `true`.\n */\n raiseError?: boolean;\n}\n"],"mappings":";;;;;KAGYK,iBAAAA;KACAC,kBAAAA;AADAD,KAEAE,oBAAAA,GAFiB,UAAA,GAAA,UAAA;AACjBD,KAEAE,cAAAA,GAFkB,QAAA,GAAA,UAAA;AAClBD,KAEAE,UAAAA,GAFAF,MAAoB,GAAA,OAAA,GAAA,MAAA;AACpBC,KAEAE,WAAAA,GAFc,QAAA,GAAA,UAAA,GAAA,OAAA,GAAA,SAAA,GAAA,QAAA,GAAA,kBAAA,GAAA,mBAAA,GAAA,mBAAA,GAAA,UAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACdD,UAEKE,IAAAA,CAFK;EACVD,IAAAA,EAAAA,MAAAA;EACKC,KAAAA,EAAI,OAAA,GAAA,IAAA;AAIrB;AAAwB,UAAPC,OAAAA,CAAO;;;;WAIXC;EAYIC;;;QAQFX,CAAAA,EAAAA,OAAAA;;;;;;MAqDFa,CAAAA,EA/DFL,IA+DEK,GA/DKL,IA+DLK,EAAAA,GAAAA,MAAAA,GAAAA,MAAAA,EAAAA;;AAkBMR,UA/EFM,iBAAAA,CA+EEN;;;;EA2BFS,KAAAA,CAAAA,EAtGLJ,MAsGKI,CAAAA,MAAiB,EAAA,OAAA,CAAA,GAAA,IAAA;EAAA;;;UAIjBC,CAAAA,EAtGFf,QAsGEe;;;;EAgBAE,MAAAA,CAAAA,EAlHJlB,MAkHIkB;EAAiB;;;;SAASN,CAAAA,EAAAA,OAAAA;;AAe3C;AAMA;;;;;eA1HiBC,KAAKd;;;;;;;;;;;;;eAaLQ;;;;;;;;;;;;;;;;;;;sBAmBOJ;;;;WAIXW;;;;;;;iBAOMT;;;;;;;;;;;iBAWAC;;;;;;;;;;;;;YAaLI;;;;;;;;;;;;qBAYSZ;;UAENiB,sCAAsCb,aAAaA,+DAA+DU;;;;eAIlHI;;;;oBAIKC;;;;;;;;;;;;UAYLC,iBAAAA,SAA0BN;;;;eAI1BV,aAAaiB,MAAMjB;;;;;;;;;;;UAWnBkB,kBAAAA,SAA2BF;;;;;;UAM3BG,eAAAA,SAAwBN"}
@@ -1,91 +0,0 @@
1
- //#region src/types.messages.d.ts
2
- type ImageDetail = "auto" | "low" | "high";
3
- type MessageContentImageUrl = {
4
- type: "image_url";
5
- image_url: string | {
6
- url: string;
7
- detail?: ImageDetail | undefined;
8
- };
9
- };
10
- type MessageContentText = {
11
- type: "text";
12
- text: string;
13
- };
14
- type MessageContentComplex = MessageContentText | MessageContentImageUrl;
15
- type MessageContent = string | MessageContentComplex[];
16
- /**
17
- * Model-specific additional kwargs, which is passed back to the underlying LLM.
18
- */
19
- type MessageAdditionalKwargs = Record<string, unknown>;
20
- type BaseMessage = {
21
- additional_kwargs?: MessageAdditionalKwargs | undefined;
22
- content: MessageContent;
23
- id?: string | undefined;
24
- name?: string | undefined;
25
- response_metadata?: Record<string, unknown> | undefined;
26
- };
27
- type HumanMessage = BaseMessage & {
28
- type: "human";
29
- example?: boolean | undefined;
30
- };
31
- type AIMessage = BaseMessage & {
32
- type: "ai";
33
- example?: boolean | undefined;
34
- tool_calls?: {
35
- name: string;
36
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
- args: {
38
- [x: string]: any;
39
- };
40
- id?: string | undefined;
41
- type?: "tool_call" | undefined;
42
- }[] | undefined;
43
- invalid_tool_calls?: {
44
- name?: string | undefined;
45
- args?: string | undefined;
46
- id?: string | undefined;
47
- error?: string | undefined;
48
- type?: "invalid_tool_call" | undefined;
49
- }[] | undefined;
50
- usage_metadata?: {
51
- input_tokens: number;
52
- output_tokens: number;
53
- total_tokens: number;
54
- input_token_details?: {
55
- audio?: number | undefined;
56
- cache_read?: number | undefined;
57
- cache_creation?: number | undefined;
58
- } | undefined;
59
- output_token_details?: {
60
- audio?: number | undefined;
61
- reasoning?: number | undefined;
62
- } | undefined;
63
- } | undefined;
64
- };
65
- type ToolMessage = BaseMessage & {
66
- type: "tool";
67
- status?: "error" | "success" | undefined;
68
- tool_call_id: string;
69
- /**
70
- * Artifact of the Tool execution which is not meant to be sent to the model.
71
- *
72
- * Should only be specified if it is different from the message content, e.g. if only
73
- * a subset of the full tool output is being passed as message content but the full
74
- * output is needed in other parts of the code.
75
- */
76
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
77
- artifact?: any;
78
- };
79
- type SystemMessage = BaseMessage & {
80
- type: "system";
81
- };
82
- type FunctionMessage = BaseMessage & {
83
- type: "function";
84
- };
85
- type RemoveMessage = BaseMessage & {
86
- type: "remove";
87
- };
88
- type Message = HumanMessage | AIMessage | ToolMessage | SystemMessage | FunctionMessage | RemoveMessage;
89
- //#endregion
90
- export { AIMessage, FunctionMessage, HumanMessage, Message, RemoveMessage, SystemMessage, ToolMessage };
91
- //# sourceMappingURL=types.messages.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.messages.d.cts","names":["ImageDetail","MessageContentImageUrl","MessageContentText","MessageContentComplex","MessageContent","MessageAdditionalKwargs","Record","BaseMessage","HumanMessage","AIMessage","ToolMessage","SystemMessage","FunctionMessage","RemoveMessage","Message"],"sources":["../src/types.messages.d.ts"],"sourcesContent":["type ImageDetail = \"auto\" | \"low\" | \"high\";\ntype MessageContentImageUrl = {\n type: \"image_url\";\n image_url: string | {\n url: string;\n detail?: ImageDetail | undefined;\n };\n};\ntype MessageContentText = {\n type: \"text\";\n text: string;\n};\ntype MessageContentComplex = MessageContentText | MessageContentImageUrl;\ntype MessageContent = string | MessageContentComplex[];\n/**\n * Model-specific additional kwargs, which is passed back to the underlying LLM.\n */\ntype MessageAdditionalKwargs = Record<string, unknown>;\ntype BaseMessage = {\n additional_kwargs?: MessageAdditionalKwargs | undefined;\n content: MessageContent;\n id?: string | undefined;\n name?: string | undefined;\n response_metadata?: Record<string, unknown> | undefined;\n};\nexport type HumanMessage = BaseMessage & {\n type: \"human\";\n example?: boolean | undefined;\n};\nexport type AIMessage = BaseMessage & {\n type: \"ai\";\n example?: boolean | undefined;\n tool_calls?: {\n name: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n args: {\n [x: string]: any;\n };\n id?: string | undefined;\n type?: \"tool_call\" | undefined;\n }[] | undefined;\n invalid_tool_calls?: {\n name?: string | undefined;\n args?: string | undefined;\n id?: string | undefined;\n error?: string | undefined;\n type?: \"invalid_tool_call\" | undefined;\n }[] | undefined;\n usage_metadata?: {\n input_tokens: number;\n output_tokens: number;\n total_tokens: number;\n input_token_details?: {\n audio?: number | undefined;\n cache_read?: number | undefined;\n cache_creation?: number | undefined;\n } | undefined;\n output_token_details?: {\n audio?: number | undefined;\n reasoning?: number | undefined;\n } | undefined;\n } | undefined;\n};\nexport type ToolMessage = BaseMessage & {\n type: \"tool\";\n status?: \"error\" | \"success\" | undefined;\n tool_call_id: string;\n /**\n * Artifact of the Tool execution which is not meant to be sent to the model.\n *\n * Should only be specified if it is different from the message content, e.g. if only\n * a subset of the full tool output is being passed as message content but the full\n * output is needed in other parts of the code.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n artifact?: any;\n};\nexport type SystemMessage = BaseMessage & {\n type: \"system\";\n};\nexport type FunctionMessage = BaseMessage & {\n type: \"function\";\n};\nexport type RemoveMessage = BaseMessage & {\n type: \"remove\";\n};\nexport type Message = HumanMessage | AIMessage | ToolMessage | SystemMessage | FunctionMessage | RemoveMessage;\nexport {};\n"],"mappings":";KAAKA,WAAAA;KACAC,sBAAAA,GADW;EACXA,IAAAA,EAAAA,WAAAA;EAOAC,SAAAA,EAAAA,MAAAA,GAAAA;IAIAC,GAAAA,EAAAA,MAAAA;IAAqB,MAAA,CAAA,EAPTH,WAOS,GAAA,SAAA;;;KAJrBE,kBAAAA;EAKAE,IAAAA,EAAAA,MAAAA;EAIAC,IAAAA,EAAAA,MAAAA;AAAgC,CAAA;KALhCF,qBAAAA,GAAwBD,kBAMb,GANkCD,sBAMlC;KALXG,cAAAA,GAMmBC,MAAAA,GANOF,qBAMPE,EAAAA;;;;AAMxB,KARKA,uBAAAA,GAA0BC,MAQJC,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;AAI3B,KAXKA,WAAAA,GAWgB;EAkCTG,iBAAW,CAAA,EA5CCL,uBA4CEE,GAAAA,SAAAA;EAcdI,OAAAA,EAzDCP,cAyDY;EAGbQ,EAAAA,CAAAA,EAAAA,MAAAA,GAAAA,SAAe;EAGfC,IAAAA,CAAAA,EAAAA,MAAAA,GAAa,SAAA;EAGbC,iBAAO,CAAA,EA/DKR,MA+DL,CAAA,MAAA,EAAA,OAAA,CAAA,GAAA,SAAA;CAAA;AAAGE,KA7DVA,YAAAA,GAAeD,WA6DLC,GAAAA;MAAeC,EAAAA,OAAAA;SAAYC,CAAAA,EAAAA,OAAAA,GAAAA,SAAAA;;AAA8BE,KAzDnEH,SAAAA,GAAYF,WAyDuDK,GAAAA;MAAkBC,EAAAA,IAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAvBrFH,WAAAA,GAAcH;;;;;;;;;;;;;;KAcdI,aAAAA,GAAgBJ;;;KAGhBK,eAAAA,GAAkBL;;;KAGlBM,aAAAA,GAAgBN;;;KAGhBO,OAAAA,GAAUN,eAAeC,YAAYC,cAAcC,gBAAgBC,kBAAkBC"}
@@ -1,91 +0,0 @@
1
- //#region src/types.messages.d.ts
2
- type ImageDetail = "auto" | "low" | "high";
3
- type MessageContentImageUrl = {
4
- type: "image_url";
5
- image_url: string | {
6
- url: string;
7
- detail?: ImageDetail | undefined;
8
- };
9
- };
10
- type MessageContentText = {
11
- type: "text";
12
- text: string;
13
- };
14
- type MessageContentComplex = MessageContentText | MessageContentImageUrl;
15
- type MessageContent = string | MessageContentComplex[];
16
- /**
17
- * Model-specific additional kwargs, which is passed back to the underlying LLM.
18
- */
19
- type MessageAdditionalKwargs = Record<string, unknown>;
20
- type BaseMessage = {
21
- additional_kwargs?: MessageAdditionalKwargs | undefined;
22
- content: MessageContent;
23
- id?: string | undefined;
24
- name?: string | undefined;
25
- response_metadata?: Record<string, unknown> | undefined;
26
- };
27
- type HumanMessage = BaseMessage & {
28
- type: "human";
29
- example?: boolean | undefined;
30
- };
31
- type AIMessage = BaseMessage & {
32
- type: "ai";
33
- example?: boolean | undefined;
34
- tool_calls?: {
35
- name: string;
36
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
- args: {
38
- [x: string]: any;
39
- };
40
- id?: string | undefined;
41
- type?: "tool_call" | undefined;
42
- }[] | undefined;
43
- invalid_tool_calls?: {
44
- name?: string | undefined;
45
- args?: string | undefined;
46
- id?: string | undefined;
47
- error?: string | undefined;
48
- type?: "invalid_tool_call" | undefined;
49
- }[] | undefined;
50
- usage_metadata?: {
51
- input_tokens: number;
52
- output_tokens: number;
53
- total_tokens: number;
54
- input_token_details?: {
55
- audio?: number | undefined;
56
- cache_read?: number | undefined;
57
- cache_creation?: number | undefined;
58
- } | undefined;
59
- output_token_details?: {
60
- audio?: number | undefined;
61
- reasoning?: number | undefined;
62
- } | undefined;
63
- } | undefined;
64
- };
65
- type ToolMessage = BaseMessage & {
66
- type: "tool";
67
- status?: "error" | "success" | undefined;
68
- tool_call_id: string;
69
- /**
70
- * Artifact of the Tool execution which is not meant to be sent to the model.
71
- *
72
- * Should only be specified if it is different from the message content, e.g. if only
73
- * a subset of the full tool output is being passed as message content but the full
74
- * output is needed in other parts of the code.
75
- */
76
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
77
- artifact?: any;
78
- };
79
- type SystemMessage = BaseMessage & {
80
- type: "system";
81
- };
82
- type FunctionMessage = BaseMessage & {
83
- type: "function";
84
- };
85
- type RemoveMessage = BaseMessage & {
86
- type: "remove";
87
- };
88
- type Message = HumanMessage | AIMessage | ToolMessage | SystemMessage | FunctionMessage | RemoveMessage;
89
- //#endregion
90
- export { AIMessage, FunctionMessage, HumanMessage, Message, RemoveMessage, SystemMessage, ToolMessage };
91
- //# sourceMappingURL=types.messages.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.messages.d.ts","names":["ImageDetail","MessageContentImageUrl","MessageContentText","MessageContentComplex","MessageContent","MessageAdditionalKwargs","Record","BaseMessage","HumanMessage","AIMessage","ToolMessage","SystemMessage","FunctionMessage","RemoveMessage","Message"],"sources":["../src/types.messages.d.ts"],"sourcesContent":["type ImageDetail = \"auto\" | \"low\" | \"high\";\ntype MessageContentImageUrl = {\n type: \"image_url\";\n image_url: string | {\n url: string;\n detail?: ImageDetail | undefined;\n };\n};\ntype MessageContentText = {\n type: \"text\";\n text: string;\n};\ntype MessageContentComplex = MessageContentText | MessageContentImageUrl;\ntype MessageContent = string | MessageContentComplex[];\n/**\n * Model-specific additional kwargs, which is passed back to the underlying LLM.\n */\ntype MessageAdditionalKwargs = Record<string, unknown>;\ntype BaseMessage = {\n additional_kwargs?: MessageAdditionalKwargs | undefined;\n content: MessageContent;\n id?: string | undefined;\n name?: string | undefined;\n response_metadata?: Record<string, unknown> | undefined;\n};\nexport type HumanMessage = BaseMessage & {\n type: \"human\";\n example?: boolean | undefined;\n};\nexport type AIMessage = BaseMessage & {\n type: \"ai\";\n example?: boolean | undefined;\n tool_calls?: {\n name: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n args: {\n [x: string]: any;\n };\n id?: string | undefined;\n type?: \"tool_call\" | undefined;\n }[] | undefined;\n invalid_tool_calls?: {\n name?: string | undefined;\n args?: string | undefined;\n id?: string | undefined;\n error?: string | undefined;\n type?: \"invalid_tool_call\" | undefined;\n }[] | undefined;\n usage_metadata?: {\n input_tokens: number;\n output_tokens: number;\n total_tokens: number;\n input_token_details?: {\n audio?: number | undefined;\n cache_read?: number | undefined;\n cache_creation?: number | undefined;\n } | undefined;\n output_token_details?: {\n audio?: number | undefined;\n reasoning?: number | undefined;\n } | undefined;\n } | undefined;\n};\nexport type ToolMessage = BaseMessage & {\n type: \"tool\";\n status?: \"error\" | \"success\" | undefined;\n tool_call_id: string;\n /**\n * Artifact of the Tool execution which is not meant to be sent to the model.\n *\n * Should only be specified if it is different from the message content, e.g. if only\n * a subset of the full tool output is being passed as message content but the full\n * output is needed in other parts of the code.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n artifact?: any;\n};\nexport type SystemMessage = BaseMessage & {\n type: \"system\";\n};\nexport type FunctionMessage = BaseMessage & {\n type: \"function\";\n};\nexport type RemoveMessage = BaseMessage & {\n type: \"remove\";\n};\nexport type Message = HumanMessage | AIMessage | ToolMessage | SystemMessage | FunctionMessage | RemoveMessage;\nexport {};\n"],"mappings":";KAAKA,WAAAA;KACAC,sBAAAA,GADW;EACXA,IAAAA,EAAAA,WAAAA;EAOAC,SAAAA,EAAAA,MAAAA,GAAAA;IAIAC,GAAAA,EAAAA,MAAAA;IAAqB,MAAA,CAAA,EAPTH,WAOS,GAAA,SAAA;;;KAJrBE,kBAAAA;EAKAE,IAAAA,EAAAA,MAAAA;EAIAC,IAAAA,EAAAA,MAAAA;AAAgC,CAAA;KALhCF,qBAAAA,GAAwBD,kBAMb,GANkCD,sBAMlC;KALXG,cAAAA,GAMmBC,MAAAA,GANOF,qBAMPE,EAAAA;;;;AAMxB,KARKA,uBAAAA,GAA0BC,MAQJC,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;AAI3B,KAXKA,WAAAA,GAWgB;EAkCTG,iBAAW,CAAA,EA5CCL,uBA4CEE,GAAAA,SAAAA;EAcdI,OAAAA,EAzDCP,cAyDY;EAGbQ,EAAAA,CAAAA,EAAAA,MAAAA,GAAAA,SAAe;EAGfC,IAAAA,CAAAA,EAAAA,MAAAA,GAAa,SAAA;EAGbC,iBAAO,CAAA,EA/DKR,MA+DL,CAAA,MAAA,EAAA,OAAA,CAAA,GAAA,SAAA;CAAA;AAAGE,KA7DVA,YAAAA,GAAeD,WA6DLC,GAAAA;MAAeC,EAAAA,OAAAA;SAAYC,CAAAA,EAAAA,OAAAA,GAAAA,SAAAA;;AAA8BE,KAzDnEH,SAAAA,GAAYF,WAyDuDK,GAAAA;MAAkBC,EAAAA,IAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAvBrFH,WAAAA,GAAcH;;;;;;;;;;;;;;KAcdI,aAAAA,GAAgBJ;;;KAGhBK,eAAAA,GAAkBL;;;KAGlBM,aAAAA,GAAgBN;;;KAGhBO,OAAAA,GAAUN,eAAeC,YAAYC,cAAcC,gBAAgBC,kBAAkBC"}
@@ -1,235 +0,0 @@
1
- import { Config, Interrupt, Metadata, ThreadTask } from "./schema.cjs";
2
- import { Message } from "./types.messages.cjs";
3
-
4
- //#region src/types.stream.d.ts
5
-
6
- /**
7
- import type { SubgraphCheckpointsStreamEvent } from "./types.stream.subgraph.js";
8
- * Stream modes
9
- * - "values": Stream only the state values.
10
- * - "messages": Stream complete messages.
11
- * - "messages-tuple": Stream (message chunk, metadata) tuples.
12
- * - "updates": Stream updates to the state.
13
- * - "events": Stream events occurring during execution.
14
- * - "debug": Stream detailed debug information.
15
- * - "custom": Stream custom events.
16
- */
17
- type StreamMode = "values" | "messages" | "updates" | "events" | "debug" | "tasks" | "checkpoints" | "custom" | "messages-tuple";
18
- type ThreadStreamMode = "run_modes" | "lifecycle" | "state_update";
19
- type MessageTupleMetadata = {
20
- tags: string[];
21
- [key: string]: unknown;
22
- };
23
- type AsSubgraph<TEvent extends {
24
- id?: string;
25
- event: string;
26
- data: unknown;
27
- }> = {
28
- id?: TEvent["id"];
29
- event: TEvent["event"] | `${TEvent["event"]}|${string}`;
30
- data: TEvent["data"];
31
- };
32
- /**
33
- * Stream event with values after completion of each step.
34
- */
35
- type ValuesStreamEvent<StateType> = {
36
- id?: string;
37
- event: "values";
38
- data: StateType;
39
- };
40
- /** @internal */
41
- type SubgraphValuesStreamEvent<StateType> = AsSubgraph<ValuesStreamEvent<StateType>>;
42
- /**
43
- * Stream event with message chunks coming from LLM invocations inside nodes.
44
- */
45
- type MessagesTupleStreamEvent = {
46
- event: "messages";
47
- // TODO: add types for message and config, which do not depend on LangChain
48
- // while making sure it's easy to keep them in sync.
49
- data: [message: Message, config: MessageTupleMetadata];
50
- };
51
- /** @internal */
52
- type SubgraphMessagesTupleStreamEvent = AsSubgraph<MessagesTupleStreamEvent>;
53
- /**
54
- * Metadata stream event with information about the run and thread
55
- */
56
- type MetadataStreamEvent = {
57
- id?: string;
58
- event: "metadata";
59
- data: {
60
- run_id: string;
61
- thread_id: string;
62
- };
63
- };
64
- /**
65
- * Stream event with error information.
66
- */
67
- type ErrorStreamEvent = {
68
- id?: string;
69
- event: "error";
70
- data: {
71
- error: string;
72
- message: string;
73
- };
74
- };
75
- /** @internal */
76
- type SubgraphErrorStreamEvent = AsSubgraph<ErrorStreamEvent>;
77
- /**
78
- * Stream event with updates to the state after each step.
79
- * The streamed outputs include the name of the node that
80
- * produced the update as well as the update.
81
- */
82
- type UpdatesStreamEvent<UpdateType> = {
83
- id?: string;
84
- event: "updates";
85
- data: {
86
- [node: string]: UpdateType;
87
- };
88
- };
89
- /** @internal */
90
- type SubgraphUpdatesStreamEvent<UpdateType> = AsSubgraph<UpdatesStreamEvent<UpdateType>>;
91
- /**
92
- * Streaming custom data from inside the nodes.
93
- */
94
- type CustomStreamEvent<T> = {
95
- event: "custom";
96
- data: T;
97
- };
98
- /** @internal */
99
- type SubgraphCustomStreamEvent<T> = AsSubgraph<CustomStreamEvent<T>>;
100
- type MessagesMetadataStreamEvent = {
101
- id?: string;
102
- event: "messages/metadata";
103
- data: {
104
- [messageId: string]: {
105
- metadata: unknown;
106
- };
107
- };
108
- };
109
- type MessagesCompleteStreamEvent = {
110
- id?: string;
111
- event: "messages/complete";
112
- data: Message[];
113
- };
114
- type MessagesPartialStreamEvent = {
115
- id?: string;
116
- event: "messages/partial";
117
- data: Message[];
118
- };
119
- type TasksStreamCreateEvent<StateType> = {
120
- id?: string;
121
- event: "tasks";
122
- data: {
123
- id: string;
124
- name: string;
125
- interrupts: Interrupt[];
126
- input: StateType;
127
- triggers: string[];
128
- };
129
- };
130
- type TasksStreamResultEvent<UpdateType> = {
131
- id?: string;
132
- event: "tasks";
133
- data: {
134
- id: string;
135
- name: string;
136
- interrupts: Interrupt[];
137
- result: [string, UpdateType][];
138
- };
139
- };
140
- type TasksStreamErrorEvent = {
141
- id?: string;
142
- event: "tasks";
143
- data: {
144
- id: string;
145
- name: string;
146
- interrupts: Interrupt[];
147
- error: string;
148
- };
149
- };
150
- type TasksStreamEvent<StateType, UpdateType> = TasksStreamCreateEvent<StateType> | TasksStreamResultEvent<UpdateType> | TasksStreamErrorEvent;
151
- type SubgraphTasksStreamEvent<StateType, UpdateType> = AsSubgraph<TasksStreamCreateEvent<StateType>> | AsSubgraph<TasksStreamResultEvent<UpdateType>> | AsSubgraph<TasksStreamErrorEvent>;
152
- type CheckpointsStreamEvent<StateType> = {
153
- id?: string;
154
- event: "checkpoints";
155
- data: {
156
- values: StateType;
157
- next: string[];
158
- config: Config;
159
- metadata: Metadata;
160
- tasks: ThreadTask[];
161
- };
162
- };
163
- type SubgraphCheckpointsStreamEvent<StateType> = AsSubgraph<CheckpointsStreamEvent<StateType>>;
164
- /**
165
- * Message stream event specific to LangGraph Server.
166
- * @deprecated Use `streamMode: "messages-tuple"` instead.
167
- */
168
- type MessagesStreamEvent = MessagesMetadataStreamEvent | MessagesCompleteStreamEvent | MessagesPartialStreamEvent;
169
- /** @internal */
170
- type SubgraphMessagesStreamEvent = AsSubgraph<MessagesMetadataStreamEvent> | AsSubgraph<MessagesCompleteStreamEvent> | AsSubgraph<MessagesPartialStreamEvent>;
171
- /**
172
- * Stream event with detailed debug information.
173
- */
174
- type DebugStreamEvent = {
175
- id?: string;
176
- event: "debug";
177
- data: unknown;
178
- };
179
- /** @internal */
180
- type SubgraphDebugStreamEvent = AsSubgraph<DebugStreamEvent>;
181
- /**
182
- * Stream event with events occurring during execution.
183
- */
184
- type EventsStreamEvent = {
185
- id?: string;
186
- event: "events";
187
- data: {
188
- event: `on_${"chat_model" | "llm" | "chain" | "tool" | "retriever" | "prompt"}_${"start" | "stream" | "end"}` | (string & {}); // eslint-disable-line @typescript-eslint/ban-types
189
- name: string;
190
- tags: string[];
191
- run_id: string;
192
- metadata: Record<string, unknown>;
193
- parent_ids: string[];
194
- data: unknown;
195
- };
196
- };
197
- /** @internal */
198
- type SubgraphEventsStreamEvent = AsSubgraph<EventsStreamEvent>;
199
- /**
200
- * Stream event with a feedback key to signed URL map. Set `feedbackKeys` in
201
- * the `RunsStreamPayload` to receive this event.
202
- */
203
- type FeedbackStreamEvent = {
204
- id?: string;
205
- event: "feedback";
206
- data: {
207
- [feedbackKey: string]: string;
208
- };
209
- };
210
- type GetStreamModeMap<TStreamMode extends StreamMode | StreamMode[], TStateType = unknown, TUpdateType = TStateType, TCustomType = unknown> = {
211
- values: ValuesStreamEvent<TStateType>;
212
- updates: UpdatesStreamEvent<TUpdateType>;
213
- custom: CustomStreamEvent<TCustomType>;
214
- debug: DebugStreamEvent;
215
- messages: MessagesStreamEvent;
216
- "messages-tuple": MessagesTupleStreamEvent;
217
- tasks: TasksStreamEvent<TStateType, TUpdateType>;
218
- checkpoints: CheckpointsStreamEvent<TStateType>;
219
- events: EventsStreamEvent;
220
- }[TStreamMode extends StreamMode[] ? TStreamMode[number] : TStreamMode] | ErrorStreamEvent | MetadataStreamEvent | FeedbackStreamEvent;
221
- type GetSubgraphsStreamModeMap<TStreamMode extends StreamMode | StreamMode[], TStateType = unknown, TUpdateType = TStateType, TCustomType = unknown> = {
222
- values: SubgraphValuesStreamEvent<TStateType>;
223
- updates: SubgraphUpdatesStreamEvent<TUpdateType>;
224
- custom: SubgraphCustomStreamEvent<TCustomType>;
225
- debug: SubgraphDebugStreamEvent;
226
- messages: SubgraphMessagesStreamEvent;
227
- "messages-tuple": SubgraphMessagesTupleStreamEvent;
228
- events: SubgraphEventsStreamEvent;
229
- tasks: SubgraphTasksStreamEvent<TStateType, TUpdateType>;
230
- checkpoints: SubgraphCheckpointsStreamEvent<TStateType>;
231
- }[TStreamMode extends StreamMode[] ? TStreamMode[number] : TStreamMode] | SubgraphErrorStreamEvent | MetadataStreamEvent | FeedbackStreamEvent;
232
- type TypedAsyncGenerator<TStreamMode extends StreamMode | StreamMode[] = [], TSubgraphs extends boolean = false, TStateType = unknown, TUpdateType = TStateType, TCustomType = unknown> = AsyncGenerator<TSubgraphs extends true ? GetSubgraphsStreamModeMap<TStreamMode, TStateType, TUpdateType, TCustomType> : GetStreamModeMap<TStreamMode, TStateType, TUpdateType, TCustomType>>;
233
- //#endregion
234
- export { CheckpointsStreamEvent, CustomStreamEvent, DebugStreamEvent, ErrorStreamEvent, EventsStreamEvent, FeedbackStreamEvent, MessagesStreamEvent, MessagesTupleStreamEvent, MetadataStreamEvent, StreamMode, TasksStreamEvent, ThreadStreamMode, TypedAsyncGenerator, UpdatesStreamEvent, ValuesStreamEvent };
235
- //# sourceMappingURL=types.stream.d.cts.map