Merge pull request #2429 from langchain-ai/nc/15nov/sdk-js-types

sdk-js: Update types for state.task
This commit is contained in:
Nuno Campos
2024-11-15 11:54:59 -08:00
committed by GitHub
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@langchain/langgraph-sdk",
"version": "0.0.24",
"version": "0.0.25",
"description": "Client library for interacting with the LangGraph API",
"type": "module",
"packageManager": "yarn@1.22.19",
+1
View File
@@ -10,6 +10,7 @@ export type {
Metadata,
Run,
Thread,
ThreadTask,
ThreadState,
ThreadStatus,
Cron,
+7 -1
View File
@@ -208,8 +208,14 @@ export interface ThreadState<ValuesType = DefaultValues> {
export interface ThreadTask {
id: string;
name: string;
result?: unknown;
error: Optional<string>;
interrupts: Array<{ value: unknown; when: "during" }>;
interrupts: Array<{
value: unknown;
when: "during";
resumable: boolean;
ns?: string[];
}>;
checkpoint: Optional<Checkpoint>;
state: Optional<ThreadState>;
}