@langchain/langgraph-sdk 0.0.14 → 0.0.16

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
@@ -437,6 +437,7 @@ class ThreadsClient extends BaseClient {
437
437
  limit: options?.limit ?? 10,
438
438
  before: options?.before,
439
439
  metadata: options?.metadata,
440
+ checkpoint: options?.checkpoint,
440
441
  },
441
442
  });
442
443
  }
@@ -466,6 +467,7 @@ class RunsClient extends BaseClient {
466
467
  multitask_strategy: payload?.multitaskStrategy,
467
468
  on_completion: payload?.onCompletion,
468
469
  on_disconnect: payload?.onDisconnect,
470
+ after_seconds: payload?.afterSeconds,
469
471
  };
470
472
  const endpoint = threadId == null ? `/runs/stream` : `/threads/${threadId}/runs/stream`;
471
473
  const response = await this.asyncCaller.fetch(...this.prepareFetchOptions(endpoint, {
@@ -525,6 +527,7 @@ class RunsClient extends BaseClient {
525
527
  webhook: payload?.webhook,
526
528
  checkpoint_id: payload?.checkpointId,
527
529
  multitask_strategy: payload?.multitaskStrategy,
530
+ after_seconds: payload?.afterSeconds,
528
531
  };
529
532
  return this.fetch(`/threads/${threadId}/runs`, {
530
533
  method: "POST",
@@ -570,6 +573,7 @@ class RunsClient extends BaseClient {
570
573
  multitask_strategy: payload?.multitaskStrategy,
571
574
  on_completion: payload?.onCompletion,
572
575
  on_disconnect: payload?.onDisconnect,
576
+ after_seconds: payload?.afterSeconds,
573
577
  };
574
578
  const endpoint = threadId == null ? `/runs/wait` : `/threads/${threadId}/runs/wait`;
575
579
  return this.fetch(endpoint, {
package/dist/client.d.ts CHANGED
@@ -258,6 +258,7 @@ export declare class ThreadsClient extends BaseClient {
258
258
  getHistory<ValuesType = DefaultValues>(threadId: string, options?: {
259
259
  limit?: number;
260
260
  before?: Config;
261
+ checkpoint?: Partial<Omit<Checkpoint, "thread_id">>;
261
262
  metadata?: Metadata;
262
263
  }): Promise<ThreadState<ValuesType>[]>;
263
264
  }
package/dist/client.js CHANGED
@@ -432,6 +432,7 @@ export class ThreadsClient extends BaseClient {
432
432
  limit: options?.limit ?? 10,
433
433
  before: options?.before,
434
434
  metadata: options?.metadata,
435
+ checkpoint: options?.checkpoint,
435
436
  },
436
437
  });
437
438
  }
@@ -460,6 +461,7 @@ export class RunsClient extends BaseClient {
460
461
  multitask_strategy: payload?.multitaskStrategy,
461
462
  on_completion: payload?.onCompletion,
462
463
  on_disconnect: payload?.onDisconnect,
464
+ after_seconds: payload?.afterSeconds,
463
465
  };
464
466
  const endpoint = threadId == null ? `/runs/stream` : `/threads/${threadId}/runs/stream`;
465
467
  const response = await this.asyncCaller.fetch(...this.prepareFetchOptions(endpoint, {
@@ -519,6 +521,7 @@ export class RunsClient extends BaseClient {
519
521
  webhook: payload?.webhook,
520
522
  checkpoint_id: payload?.checkpointId,
521
523
  multitask_strategy: payload?.multitaskStrategy,
524
+ after_seconds: payload?.afterSeconds,
522
525
  };
523
526
  return this.fetch(`/threads/${threadId}/runs`, {
524
527
  method: "POST",
@@ -564,6 +567,7 @@ export class RunsClient extends BaseClient {
564
567
  multitask_strategy: payload?.multitaskStrategy,
565
568
  on_completion: payload?.onCompletion,
566
569
  on_disconnect: payload?.onDisconnect,
570
+ after_seconds: payload?.afterSeconds,
567
571
  };
568
572
  const endpoint = threadId == null ? `/runs/wait` : `/threads/${threadId}/runs/wait`;
569
573
  return this.fetch(endpoint, {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { Client } from "./client.js";
2
- export type { Assistant, AssistantVersion, AssistantGraph, Config, DefaultValues, GraphSchema, Metadata, Run, Thread, ThreadState, Cron, } from "./schema.js";
2
+ export type { Assistant, AssistantVersion, AssistantGraph, Config, DefaultValues, GraphSchema, Metadata, Run, Thread, ThreadState, Cron, Checkpoint, } from "./schema.js";
3
3
  export type { OnConflictBehavior } from "./types.js";
package/dist/types.d.ts CHANGED
@@ -63,6 +63,11 @@ interface RunsInvokePayload {
63
63
  * - "continue": Continue the run.
64
64
  */
65
65
  onDisconnect?: DisconnectMode;
66
+ /**
67
+ * The number of seconds to wait before starting the run.
68
+ * Use to schedule future runs.
69
+ */
70
+ afterSeconds?: number;
66
71
  }
67
72
  export interface RunsStreamPayload extends RunsInvokePayload {
68
73
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@1.22.19",