@langchain/langgraph-sdk 0.0.32 → 0.0.34

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/dist/client.cjs CHANGED
@@ -571,6 +571,8 @@ class RunsClient extends BaseClient {
571
571
  command: payload?.command,
572
572
  config: payload?.config,
573
573
  metadata: payload?.metadata,
574
+ stream_mode: payload?.streamMode,
575
+ stream_subgraphs: payload?.streamSubgraphs,
574
576
  assistant_id: assistantId,
575
577
  interrupt_before: payload?.interruptBefore,
576
578
  interrupt_after: payload?.interruptAfter,
package/dist/client.js CHANGED
@@ -564,6 +564,8 @@ export class RunsClient extends BaseClient {
564
564
  command: payload?.command,
565
565
  config: payload?.config,
566
566
  metadata: payload?.metadata,
567
+ stream_mode: payload?.streamMode,
568
+ stream_subgraphs: payload?.streamSubgraphs,
567
569
  assistant_id: assistantId,
568
570
  interrupt_before: payload?.interruptBefore,
569
571
  interrupt_after: payload?.interruptAfter,
package/dist/types.d.ts CHANGED
@@ -1,4 +1,14 @@
1
1
  import { Checkpoint, Config, Metadata } from "./schema.js";
2
+ /**
3
+ * Stream modes
4
+ * - "values": Stream only the state values.
5
+ * - "messages": Stream complete messages.
6
+ * - "messages-tuple": Stream (message chunk, metadata) tuples.
7
+ * - "updates": Stream updates to the state.
8
+ * - "events": Stream events occurring during execution.
9
+ * - "debug": Stream detailed debug information.
10
+ * - "custom": Stream custom events.
11
+ */
2
12
  export type StreamMode = "values" | "messages" | "updates" | "events" | "debug" | "custom" | "messages-tuple";
3
13
  export type MultitaskStrategy = "reject" | "interrupt" | "rollback" | "enqueue";
4
14
  export type OnConflictBehavior = "raise" | "do_nothing";
@@ -13,7 +23,7 @@ export interface Command {
13
23
  /**
14
24
  * An object to update the thread state with.
15
25
  */
16
- update?: Record<string, unknown>;
26
+ update?: Record<string, unknown> | [string, unknown][];
17
27
  /**
18
28
  * The value to return from an `interrupt` function call.
19
29
  */
@@ -103,13 +113,7 @@ interface RunsInvokePayload {
103
113
  }
104
114
  export interface RunsStreamPayload extends RunsInvokePayload {
105
115
  /**
106
- * One of `"values"`, `"messages"`, `"updates"` or `"events"`.
107
- * - `"values"`: Stream the thread state any time it changes.
108
- * - `"messages"`: Stream chat messages from thread state and calls to chat models,
109
- * token-by-token where possible.
110
- * - `"updates"`: Stream the state updates returned by each node.
111
- * - `"events"`: Stream all events produced by the run. You can also access these
112
- * afterwards using the `client.runs.listEvents()` method.
116
+ * One of `"values"`, `"messages"`, `"messages-tuple"`, `"updates"`, `"events"`, `"debug"`, `"custom"`.
113
117
  */
114
118
  streamMode?: StreamMode | Array<StreamMode>;
115
119
  /**
@@ -123,6 +127,14 @@ export interface RunsStreamPayload extends RunsInvokePayload {
123
127
  feedbackKeys?: string[];
124
128
  }
125
129
  export interface RunsCreatePayload extends RunsInvokePayload {
130
+ /**
131
+ * One of `"values"`, `"messages"`, `"messages-tuple"`, `"updates"`, `"events"`, `"debug"`, `"custom"`.
132
+ */
133
+ streamMode?: StreamMode | Array<StreamMode>;
134
+ /**
135
+ * Stream output from subgraphs. By default, streams only the top graph.
136
+ */
137
+ streamSubgraphs?: boolean;
126
138
  }
127
139
  export interface CronsCreatePayload extends RunsCreatePayload {
128
140
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@1.22.19",