@langchain/langgraph-sdk 0.0.6 → 0.0.8

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.d.mts CHANGED
@@ -3,6 +3,7 @@ import { AsyncCaller, AsyncCallerParams } from "./utils/async_caller.mjs";
3
3
  import { RunsCreatePayload, RunsStreamPayload, RunsWaitPayload, StreamEvent, CronsCreatePayload, OnConflictBehavior } from "./types.mjs";
4
4
  interface ClientConfig {
5
5
  apiUrl?: string;
6
+ apiKey?: string;
6
7
  callerOptions?: AsyncCallerParams;
7
8
  timeoutMs?: number;
8
9
  defaultHeaders?: Record<string, string | null | undefined>;
package/dist/client.mjs CHANGED
@@ -35,6 +35,9 @@ class BaseClient {
35
35
  this.timeoutMs = config?.timeoutMs || 12_000;
36
36
  this.apiUrl = config?.apiUrl || "http://localhost:8123";
37
37
  this.defaultHeaders = config?.defaultHeaders || {};
38
+ if (config?.apiKey != null) {
39
+ this.defaultHeaders["X-Api-Key"] = config.apiKey;
40
+ }
38
41
  }
39
42
  prepareFetchOptions(path, options) {
40
43
  const mutatedOptions = {
@@ -387,6 +390,7 @@ export class RunsClient extends BaseClient {
387
390
  assistant_id: assistantId,
388
391
  interrupt_before: payload?.interruptBefore,
389
392
  interrupt_after: payload?.interruptAfter,
393
+ checkpoint_id: payload?.checkpointId,
390
394
  };
391
395
  if (payload?.multitaskStrategy != null) {
392
396
  json["multitask_strategy"] = payload?.multitaskStrategy;
@@ -447,6 +451,7 @@ export class RunsClient extends BaseClient {
447
451
  interrupt_before: payload?.interruptBefore,
448
452
  interrupt_after: payload?.interruptAfter,
449
453
  webhook: payload?.webhook,
454
+ checkpoint_id: payload?.checkpointId,
450
455
  };
451
456
  if (payload?.multitaskStrategy != null) {
452
457
  json["multitask_strategy"] = payload?.multitaskStrategy;
@@ -473,6 +478,7 @@ export class RunsClient extends BaseClient {
473
478
  assistant_id: assistantId,
474
479
  interrupt_before: payload?.interruptBefore,
475
480
  interrupt_after: payload?.interruptAfter,
481
+ checkpoint_id: payload?.checkpointId,
476
482
  };
477
483
  if (payload?.multitaskStrategy != null) {
478
484
  json["multitask_strategy"] = payload?.multitaskStrategy;
package/dist/types.d.mts CHANGED
@@ -16,6 +16,10 @@ interface RunsInvokePayload {
16
16
  * Additional configuration for the run.
17
17
  */
18
18
  config?: Config;
19
+ /**
20
+ * Checkpoint ID for when creating a new run.
21
+ */
22
+ checkpointId?: string;
19
23
  /**
20
24
  * Interrupt execution before entering these nodes.
21
25
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@1.22.19",