mirror of
https://github.com/langchain-ai/langgraphjs.git
synced 2026-07-25 05:05:33 -04:00
fix(sdk): use new interrupt schema for SDK (#1427)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph-sdk": patch
|
||||
---
|
||||
|
||||
Rename `interrupt_id` to `id`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Relax `when` type for `Interrupt`
|
||||
@@ -185,4 +185,4 @@
|
||||
"zod/schema.d.ts",
|
||||
"zod/schema.d.cts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ export function _isSend(x: unknown): x is Send {
|
||||
export type Interrupt<Value = any> = {
|
||||
value?: Value;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
when: "during" | (string & {});
|
||||
when?: "during" | (string & {});
|
||||
resumable?: boolean;
|
||||
ns?: string[];
|
||||
interrupt_id?: string;
|
||||
|
||||
+24
-2
@@ -145,10 +145,32 @@ export interface AssistantGraph {
|
||||
* An interrupt thrown inside a thread.
|
||||
*/
|
||||
export interface Interrupt<TValue = unknown> {
|
||||
interrupt_id?: string;
|
||||
/**
|
||||
* The ID of the interrupt.
|
||||
*/
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* The value of the interrupt.
|
||||
*/
|
||||
value?: TValue;
|
||||
when: "during" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types
|
||||
|
||||
/**
|
||||
* Will be deprecated in the future.
|
||||
* @deprecated Will be removed in the future.
|
||||
*/
|
||||
when?: "during" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types
|
||||
|
||||
/**
|
||||
* Whether the interrupt can be resumed.
|
||||
* @deprecated Will be removed in the future.
|
||||
*/
|
||||
resumable?: boolean;
|
||||
|
||||
/**
|
||||
* The namespace of the interrupt.
|
||||
* @deprecated Replaced by `interrupt_id`
|
||||
*/
|
||||
ns?: string[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user