@langchain/langgraph-sdk 0.0.67 → 0.0.69

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
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Client = exports.StoreClient = exports.RunsClient = exports.ThreadsClient = exports.AssistantsClient = exports.CronsClient = exports.getApiKey = void 0;
4
4
  const async_caller_js_1 = require("./utils/async_caller.cjs");
5
- const stream_js_1 = require("./utils/stream.cjs");
6
- const signals_js_1 = require("./utils/signals.cjs");
7
5
  const env_js_1 = require("./utils/env.cjs");
6
+ const signals_js_1 = require("./utils/signals.cjs");
8
7
  const sse_js_1 = require("./utils/sse.cjs");
8
+ const stream_js_1 = require("./utils/stream.cjs");
9
9
  /**
10
10
  * Get the API key from the environment.
11
11
  * Precedence:
@@ -430,6 +430,8 @@ class ThreadsClient extends BaseClient {
430
430
  limit: query?.limit ?? 10,
431
431
  offset: query?.offset ?? 0,
432
432
  status: query?.status,
433
+ sort_by: query?.sortBy,
434
+ sort_order: query?.sortOrder,
433
435
  },
434
436
  });
435
437
  }
package/dist/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Assistant, AssistantGraph, CancelAction, Config, DefaultValues, GraphSchema, Metadata, Run, RunStatus, Thread, ThreadState, Cron, AssistantVersion, Subgraphs, Checkpoint, SearchItemsResponse, ListNamespaceResponse, Item, ThreadStatus, CronCreateResponse, CronCreateForThreadResponse } from "./schema.js";
1
+ import { Assistant, AssistantGraph, AssistantVersion, CancelAction, Checkpoint, Config, Cron, CronCreateForThreadResponse, CronCreateResponse, DefaultValues, GraphSchema, Item, ListNamespaceResponse, Metadata, Run, RunStatus, SearchItemsResponse, Subgraphs, Thread, ThreadState, ThreadStatus } from "./schema.js";
2
+ import type { Command, CronsCreatePayload, OnConflictBehavior, RunsCreatePayload, RunsStreamPayload, RunsWaitPayload, StreamEvent } from "./types.js";
3
+ import type { StreamMode, TypedAsyncGenerator } from "./types.stream.js";
2
4
  import { AsyncCaller, AsyncCallerParams } from "./utils/async_caller.js";
3
- import type { RunsCreatePayload, RunsStreamPayload, RunsWaitPayload, StreamEvent, CronsCreatePayload, OnConflictBehavior, Command } from "./types.js";
4
- import type { TypedAsyncGenerator, StreamMode } from "./types.stream.js";
5
5
  /**
6
6
  * Get the API key from the environment.
7
7
  * Precedence:
@@ -268,6 +268,15 @@ export declare class ThreadsClient<TStateType = DefaultValues, TUpdateType = TSt
268
268
  * Must be one of 'idle', 'busy', 'interrupted' or 'error'.
269
269
  */
270
270
  status?: ThreadStatus;
271
+ /**
272
+ * Sort by.
273
+ */
274
+ sortBy?: "id" | "status" | "created_at" | "updated_at";
275
+ /**
276
+ * Sort order.
277
+ * Must be one of 'asc' or 'desc'.
278
+ */
279
+ sortOrder?: "asc" | "desc";
271
280
  }): Promise<Thread<ValuesType>[]>;
272
281
  /**
273
282
  * Get state for a thread.
package/dist/client.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { AsyncCaller } from "./utils/async_caller.js";
2
- import { IterableReadableStream } from "./utils/stream.js";
3
- import { mergeSignals } from "./utils/signals.js";
4
2
  import { getEnvironmentVariable } from "./utils/env.js";
3
+ import { mergeSignals } from "./utils/signals.js";
5
4
  import { BytesLineDecoder, SSEDecoder } from "./utils/sse.js";
5
+ import { IterableReadableStream } from "./utils/stream.js";
6
6
  /**
7
7
  * Get the API key from the environment.
8
8
  * Precedence:
@@ -424,6 +424,8 @@ export class ThreadsClient extends BaseClient {
424
424
  limit: query?.limit ?? 10,
425
425
  offset: query?.offset ?? 0,
426
426
  status: query?.status,
427
+ sort_by: query?.sortBy,
428
+ sort_order: query?.sortOrder,
427
429
  },
428
430
  });
429
431
  }
@@ -113,7 +113,7 @@ function LoadExternalComponent({ stream, namespace, message, meta, fallback, com
113
113
  });
114
114
  }, [uiClient, uiNamespace, message.name, shadowRootId, hasClientComponent]);
115
115
  if (hasClientComponent) {
116
- return React.createElement(clientComponent, message.props);
116
+ return ((0, jsx_runtime_1.jsx)(UseStreamContext.Provider, { value: { stream, meta }, children: React.createElement(clientComponent, message.props) }));
117
117
  }
118
118
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { id: shadowRootId, ref: ref, ...props }), (0, jsx_runtime_1.jsx)(UseStreamContext.Provider, { value: { stream, meta }, children: state?.target != null
119
119
  ? ReactDOM.createPortal(React.createElement(state.comp, message.props), state.target)
@@ -86,7 +86,7 @@ export function LoadExternalComponent({ stream, namespace, message, meta, fallba
86
86
  });
87
87
  }, [uiClient, uiNamespace, message.name, shadowRootId, hasClientComponent]);
88
88
  if (hasClientComponent) {
89
- return React.createElement(clientComponent, message.props);
89
+ return (_jsx(UseStreamContext.Provider, { value: { stream, meta }, children: React.createElement(clientComponent, message.props) }));
90
90
  }
91
91
  return (_jsxs(_Fragment, { children: [_jsx("div", { id: shadowRootId, ref: ref, ...props }), _jsx(UseStreamContext.Provider, { value: { stream, meta }, children: state?.target != null
92
92
  ? ReactDOM.createPortal(React.createElement(state.comp, message.props), state.target)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@1.22.19",