@langchain/langgraph
Version:
LangGraph
1 lines • 3.88 kB
Source Map (JSON)
{"version":3,"file":"interrupt.d.ts","names":["HumanInterruptConfig","ActionRequest","Record","HumanInterrupt","HumanResponse"],"sources":["../../src/prebuilt/interrupt.d.ts"],"sourcesContent":["/**\n * Configuration interface that defines what actions are allowed for a human interrupt.\n * This controls the available interaction options when the graph is paused for human input.\n *\n * @deprecated Use `HumanInterruptConfig` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { HumanInterruptConfig } from \"langchain\";`\n *\n * @property {boolean} allow_ignore - Whether the human can choose to ignore/skip the current step\n * @property {boolean} allow_respond - Whether the human can provide a text response/feedback\n * @property {boolean} allow_edit - Whether the human can edit the provided content/state\n * @property {boolean} allow_accept - Whether the human can accept/approve the current state\n */\nexport interface HumanInterruptConfig {\n allow_ignore: boolean;\n allow_respond: boolean;\n allow_edit: boolean;\n allow_accept: boolean;\n}\n/**\n * Represents a request for human action within the graph execution.\n * Contains the action type and any associated arguments needed for the action.\n *\n * @deprecated Use `ActionRequest` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { ActionRequest } from \"langchain/prebuilt/interrupt\";`\n *\n * @property {string} action - The type or name of action being requested (e.g., \"Approve XYZ action\")\n * @property {Record<string, any>} args - Key-value pairs of arguments needed for the action\n */\nexport interface ActionRequest {\n action: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n args: Record<string, any>;\n}\n/**\n * Represents an interrupt triggered by the graph that requires human intervention.\n * This is passed to the `interrupt` function when execution is paused for human input.\n *\n * @deprecated Use `HumanInterrupt` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { HumanInterrupt } from \"langchain/prebuilt/interrupt\";`\n *\n * @property {ActionRequest} action_request - The specific action being requested from the human\n * @property {HumanInterruptConfig} config - Configuration defining what actions are allowed\n * @property {string} [description] - Optional detailed description of what input is needed\n */\nexport interface HumanInterrupt {\n action_request: ActionRequest;\n config: HumanInterruptConfig;\n description?: string;\n}\n/**\n * The response provided by a human to an interrupt, which is returned when graph execution resumes.\n *\n * @deprecated Use `HumanResponse` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { HumanResponse } from \"langchain/prebuilt/interrupt\";`\n *\n * @property {(\"accept\"|\"ignore\"|\"response\"|\"edit\")} type - The type of response:\n * - \"accept\": Approves the current state without changes\n * - \"ignore\": Skips/ignores the current step\n * - \"response\": Provides text feedback or instructions\n * - \"edit\": Modifies the current state/content\n * @property {null|string|ActionRequest} args - The response payload:\n * - null: For ignore/accept actions\n * - string: For text responses\n * - ActionRequest: For edit actions with updated content\n */\nexport type HumanResponse = {\n type: \"accept\" | \"ignore\" | \"response\" | \"edit\";\n args: null | string | ActionRequest;\n};\n"],"mappings":";;AAYA;AAgBA;AAgBA;;;;;AAqBA;;;;UArDiBA,oBAAAA;;;;;;;;;;;;;;;;UAgBAC,aAAAA;;;QAGPC;;;;;;;;;;;;;UAaOC,cAAAA;kBACGF;UACRD;;;;;;;;;;;;;;;;;;;KAmBAI,aAAAA;;wBAEcH"}