mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-01 03:53:14 +00:00
19 lines
679 B
TypeScript
19 lines
679 B
TypeScript
import { HumanInterrupt } from "@langchain/langgraph/prebuilt";
|
|
|
|
export function isAgentInboxInterruptSchema(
|
|
value: unknown,
|
|
): value is HumanInterrupt | HumanInterrupt[] {
|
|
const valueAsObject = Array.isArray(value) ? value[0] : value;
|
|
return (
|
|
valueAsObject &&
|
|
typeof valueAsObject === "object" &&
|
|
"action_request" in valueAsObject &&
|
|
typeof valueAsObject.action_request === "object" &&
|
|
"config" in valueAsObject &&
|
|
typeof valueAsObject.config === "object" &&
|
|
"allow_respond" in valueAsObject.config &&
|
|
"allow_accept" in valueAsObject.config &&
|
|
"allow_edit" in valueAsObject.config &&
|
|
"allow_ignore" in valueAsObject.config
|
|
);
|
|
}
|