@langchain/langgraph-sdk 0.0.1-rc.7 → 0.0.1-rc.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 +1 -0
- package/dist/client.mjs +3 -1
- package/dist/schema.d.ts +10 -2
- package/package.json +2 -1
package/dist/client.d.mts
CHANGED
|
@@ -168,6 +168,7 @@ declare class ThreadsClient extends BaseClient {
|
|
|
168
168
|
getHistory<ValuesType = DefaultValues>(threadId: string, options?: {
|
|
169
169
|
limit?: number;
|
|
170
170
|
before?: Config;
|
|
171
|
+
metadata?: Metadata;
|
|
171
172
|
}): Promise<ThreadState<ValuesType>[]>;
|
|
172
173
|
}
|
|
173
174
|
declare class RunsClient extends BaseClient {
|
package/dist/client.mjs
CHANGED
|
@@ -259,9 +259,11 @@ class ThreadsClient extends BaseClient {
|
|
|
259
259
|
*/
|
|
260
260
|
async getHistory(threadId, options) {
|
|
261
261
|
return this.fetch(`/threads/${threadId}/history`, {
|
|
262
|
-
|
|
262
|
+
method: "POST",
|
|
263
|
+
json: {
|
|
263
264
|
limit: options?.limit ?? 10,
|
|
264
265
|
before: options?.before,
|
|
266
|
+
metadata: options?.metadata,
|
|
265
267
|
},
|
|
266
268
|
});
|
|
267
269
|
}
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSONSchema7 } from "json-schema";
|
|
1
2
|
type Optional<T> = T | null | undefined;
|
|
2
3
|
export interface Config {
|
|
3
4
|
/**
|
|
@@ -14,7 +15,14 @@ export interface Config {
|
|
|
14
15
|
* Runtime values for attributes previously made configurable on this Runnable.
|
|
15
16
|
*/
|
|
16
17
|
configurable: {
|
|
18
|
+
/**
|
|
19
|
+
* ID of the thread
|
|
20
|
+
*/
|
|
17
21
|
thread_id?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Timestamp of the state checkpoint
|
|
24
|
+
*/
|
|
25
|
+
thread_ts?: string;
|
|
18
26
|
[key: string]: unknown;
|
|
19
27
|
};
|
|
20
28
|
}
|
|
@@ -26,11 +34,11 @@ export interface GraphSchema {
|
|
|
26
34
|
/**
|
|
27
35
|
* The schema for the graph state
|
|
28
36
|
*/
|
|
29
|
-
state_schema:
|
|
37
|
+
state_schema: JSONSchema7;
|
|
30
38
|
/**
|
|
31
39
|
* The schema for the graph config
|
|
32
40
|
*/
|
|
33
|
-
config_schema:
|
|
41
|
+
config_schema: JSONSchema7;
|
|
34
42
|
}
|
|
35
43
|
export type Metadata = Optional<Record<string, unknown>>;
|
|
36
44
|
export interface Assistant {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/langgraph-sdk",
|
|
3
|
-
"version": "0.0.1-rc.
|
|
3
|
+
"version": "0.0.1-rc.8",
|
|
4
4
|
"description": "Client library for interacting with the LangGraph API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "yarn@1.22.19",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@types/json-schema": "^7.0.15",
|
|
19
20
|
"eventsource-parser": "^1.1.2",
|
|
20
21
|
"p-queue": "^6.6.2",
|
|
21
22
|
"p-retry": "4",
|