@langchain/langgraph-sdk 0.0.36 → 0.0.38

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
@@ -64,7 +64,7 @@ class BaseClient {
64
64
  maxConcurrency: 4,
65
65
  ...config?.callerOptions,
66
66
  });
67
- this.timeoutMs = config?.timeoutMs || 12_000;
67
+ this.timeoutMs = config?.timeoutMs;
68
68
  // default limit being capped by Chrome
69
69
  // https://github.com/nodejs/undici/issues/1373
70
70
  // Regex to remove trailing slash, if present
@@ -94,7 +94,7 @@ class BaseClient {
94
94
  timeoutSignal = AbortSignal.timeout(options.timeoutMs);
95
95
  }
96
96
  }
97
- else {
97
+ else if (this.timeoutMs != null) {
98
98
  timeoutSignal = AbortSignal.timeout(this.timeoutMs);
99
99
  }
100
100
  mutatedOptions.signal = (0, signals_js_1.mergeSignals)(timeoutSignal, mutatedOptions.signal);
@@ -456,7 +456,7 @@ class ThreadsClient extends BaseClient {
456
456
  async patchState(threadIdOrConfig, metadata) {
457
457
  let threadId;
458
458
  if (typeof threadIdOrConfig !== "string") {
459
- if (typeof threadIdOrConfig.configurable.thread_id !== "string") {
459
+ if (typeof threadIdOrConfig.configurable?.thread_id !== "string") {
460
460
  throw new Error("Thread ID is required when updating state with a config.");
461
461
  }
462
462
  threadId = threadIdOrConfig.configurable.thread_id;
package/dist/client.d.ts CHANGED
@@ -22,7 +22,7 @@ interface ClientConfig {
22
22
  }
23
23
  declare class BaseClient {
24
24
  protected asyncCaller: AsyncCaller;
25
- protected timeoutMs: number;
25
+ protected timeoutMs: number | undefined;
26
26
  protected apiUrl: string;
27
27
  protected defaultHeaders: Record<string, string | null | undefined>;
28
28
  constructor(config?: ClientConfig);
package/dist/client.js CHANGED
@@ -60,7 +60,7 @@ class BaseClient {
60
60
  maxConcurrency: 4,
61
61
  ...config?.callerOptions,
62
62
  });
63
- this.timeoutMs = config?.timeoutMs || 12_000;
63
+ this.timeoutMs = config?.timeoutMs;
64
64
  // default limit being capped by Chrome
65
65
  // https://github.com/nodejs/undici/issues/1373
66
66
  // Regex to remove trailing slash, if present
@@ -90,7 +90,7 @@ class BaseClient {
90
90
  timeoutSignal = AbortSignal.timeout(options.timeoutMs);
91
91
  }
92
92
  }
93
- else {
93
+ else if (this.timeoutMs != null) {
94
94
  timeoutSignal = AbortSignal.timeout(this.timeoutMs);
95
95
  }
96
96
  mutatedOptions.signal = mergeSignals(timeoutSignal, mutatedOptions.signal);
@@ -450,7 +450,7 @@ export class ThreadsClient extends BaseClient {
450
450
  async patchState(threadIdOrConfig, metadata) {
451
451
  let threadId;
452
452
  if (typeof threadIdOrConfig !== "string") {
453
- if (typeof threadIdOrConfig.configurable.thread_id !== "string") {
453
+ if (typeof threadIdOrConfig.configurable?.thread_id !== "string") {
454
454
  throw new Error("Thread ID is required when updating state with a config.");
455
455
  }
456
456
  threadId = threadIdOrConfig.configurable.thread_id;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Client } from "./client.js";
2
- export type { Assistant, AssistantVersion, AssistantGraph, Config, DefaultValues, GraphSchema, Metadata, Run, Thread, ThreadTask, ThreadState, ThreadStatus, Cron, Checkpoint, Interrupt, } from "./schema.js";
2
+ export type { Assistant, AssistantVersion, AssistantGraph, Config, DefaultValues, GraphSchema, Metadata, Run, Thread, ThreadTask, ThreadState, ThreadStatus, Cron, Checkpoint, Interrupt, ListNamespaceResponse, Item, SearchItem, SearchItemsResponse, CronCreateResponse, CronCreateForThreadResponse, } from "./schema.js";
3
3
  export { overrideFetchImplementation } from "./singletons/fetch.js";
4
4
  export type { OnConflictBehavior, Command } from "./types.js";
package/dist/schema.d.ts CHANGED
@@ -4,7 +4,7 @@ export type RunStatus = "pending" | "running" | "error" | "success" | "timeout"
4
4
  export type ThreadStatus = "idle" | "busy" | "interrupted" | "error";
5
5
  type MultitaskStrategy = "reject" | "interrupt" | "rollback" | "enqueue";
6
6
  export type CancelAction = "interrupt" | "rollback";
7
- export interface Config {
7
+ export type Config = {
8
8
  /**
9
9
  * Tags for this call and any sub-calls (eg. a Chain calling an LLM).
10
10
  * You can use these to filter calls.
@@ -18,18 +18,18 @@ export interface Config {
18
18
  /**
19
19
  * Runtime values for attributes previously made configurable on this Runnable.
20
20
  */
21
- configurable: {
21
+ configurable?: {
22
22
  /**
23
23
  * ID of the thread
24
24
  */
25
- thread_id?: string;
25
+ thread_id?: Optional<string>;
26
26
  /**
27
27
  * Timestamp of the state checkpoint
28
28
  */
29
- checkpoint_id?: string;
29
+ checkpoint_id?: Optional<string>;
30
30
  [key: string]: unknown;
31
31
  };
32
- }
32
+ };
33
33
  export interface GraphSchema {
34
34
  /**
35
35
  * The ID of the graph.
@@ -185,12 +185,12 @@ export interface Run {
185
185
  /** Strategy to handle concurrent runs on the same thread */
186
186
  multitask_strategy: Optional<MultitaskStrategy>;
187
187
  }
188
- export interface Checkpoint {
188
+ export type Checkpoint = {
189
189
  thread_id: string;
190
190
  checkpoint_ns: string;
191
191
  checkpoint_id: Optional<string>;
192
192
  checkpoint_map: Optional<Record<string, unknown>>;
193
- }
193
+ };
194
194
  export interface ListNamespaceResponse {
195
195
  namespaces: string[][];
196
196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@1.22.19",